LearnNewsExamplesServices
Frontmatter
id8310
titleFeat: Environment-Aware Neural Link Config
stateClosed
labels
enhancementaiarchitecture
assigneestobiu
createdAtJan 4, 2026, 2:19 PM
updatedAtJan 4, 2026, 2:23 PM
githubUrlhttps://github.com/neomjs/neo/issues/8310
authortobiu
commentsCount0
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 4, 2026, 2:23 PM

Feat: Environment-Aware Neural Link Config

Closed v11.18.0 enhancementaiarchitecture
tobiu
tobiu commented on Jan 4, 2026, 2:19 PM

Context: Currently, Neo.config.useAiClient is a boolean. This means the Neural Link is either always on or always off for a given configuration file. To support safer deployments (e.g., enabling AI only in 'development' but not 'production' using the same config file), we need environment-aware configuration similar to useServiceWorker.

Scope:

  1. Update src/DefaultConfig.mjs:
    • Change useAiClient type definition to Boolean|String|String[].
    • Document the usage (e.g., 'development', ['development', 'dist/esm']).
  2. Update src/worker/App.mjs:
    • In onRegisterNeoConfig, implement logic to compare useAiClient value against Neo.config.environment.
    • Only import/initialize Neo.ai.Client if the environment matches.

Goal: Allow developers to restrict Neural Link access to specific environments.

tobiu added the enhancement label on Jan 4, 2026, 2:19 PM
tobiu added the ai label on Jan 4, 2026, 2:19 PM
tobiu added the architecture label on Jan 4, 2026, 2:19 PM
tobiu added parent issue #8169 on Jan 4, 2026, 2:19 PM
tobiu assigned to @tobiu on Jan 4, 2026, 2:19 PM
tobiu referenced in commit fd5152e - "feat(ai): Environment-Aware Neural Link Config (#8310) on Jan 4, 2026, 2:22 PM
tobiu closed this issue on Jan 4, 2026, 2:23 PM