LearnNewsExamplesServices
Frontmatter
id8191
titleFeat: Neural Link - Global Config Management
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 28, 2025, 10:30 PM
updatedAtJan 4, 2026, 11:16 AM
githubUrlhttps://github.com/neomjs/neo/issues/8191
authortobiu
commentsCount1
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 4, 2026, 11:16 AM

Feat: Neural Link - Global Config Management

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Dec 28, 2025, 10:30 PM

Context: Neo.config controls framework-level behavior. While some configs are boot-time constants (e.g., useSharedWorkers, environment), others are runtime-mutable (e.g., themes, custom app flags). Agents need access to this system.

Scope:

  1. Enhance RuntimeService:

    • Add getNeoConfig(sessionId).
      • Implementation: Return Neo.config.
    • Add setNeoConfig(sessionId, config).
      • Implementation: Call Neo.setGlobalConfig(config).
  2. Tools:

    • get_neo_config: Returns the Neo.config object.
    • set_neo_config: Accepts a partial config object.
    • Documentation: Explicitly warn that changing boot-time configs (workers, environment) at runtime may not work or could cause instability.

Goal: Enable runtime configuration management.

tobiu added the enhancement label on Dec 28, 2025, 10:30 PM
tobiu added the ai label on Dec 28, 2025, 10:30 PM
tobiu added parent issue #8169 on Dec 28, 2025, 10:30 PM
tobiu assigned to @tobiu on Jan 4, 2026, 10:45 AM
tobiu referenced in commit 7d9bdd7 - "Feat: Neural Link - Global Config Management #8191" on Jan 4, 2026, 11:15 AM
tobiu
tobiu Jan 4, 2026, 11:16 AM

Input from Gemini 2.5 pro:

✦ I have successfully implemented the Global Config Management feature for the Neural Link, enabling runtime inspection and modification of Neo.config.

Enhanced Scope: Multi-Window Awareness

During implementation, we identified a critical need to distinguish between the shared global state and the initial boot configuration of individual windows. We enhanced the get_neo_config tool to support an optional windowId parameter:

  • Global Config (Default): Returns the current, merged Neo.config shared across the App Worker.
  • Window Boot Config: If windowId is provided, returns the specific configuration used to initialize that window (stored in Neo.windowConfigs), allowing agents to inspect the "origin story" of a specific view.

Affected Files

Client-Side:

  • src/ai/client/RuntimeService.mjs: Added getNeoConfig and setNeoConfig methods.

Server-Side:

  • ai/mcp/server/neural-link/services/RuntimeService.mjs: Added bridge methods to delegate config requests to the client.
  • ai/mcp/server/neural-link/services/toolService.mjs: Registered get_neo_config and set_neo_config tools.
  • ai/mcp/server/neural-link/openapi.yaml: Defined the new API endpoints and schemas, including safety warnings for runtime config changes.

Documentation Cleanup

We also performed a cleanup pass to ensure windowId is consistently typed as String (UUID) across all JSDocs and API definitions, correcting legacy Number/integer references.

tobiu closed this issue on Jan 4, 2026, 11:16 AM