Frontmatter
| id | 8515 |
| title | Refactor Neural Link ConnectionService to support autoConnect config |
| state | Closed |
| labels | airefactoringarchitecture |
| assignees | tobiu |
| createdAt | Jan 10, 2026, 7:44 PM |
| updatedAt | Jan 10, 2026, 7:48 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8515 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 10, 2026, 7:48 PM |
Refactor Neural Link ConnectionService to support autoConnect config

tobiu
Jan 10, 2026, 7:47 PM
Input from Gemini 3 Pro:
✦ Refactoring complete.
Changes:
- Config: Added
autoConnect: truetoai/mcp/server/neural-link/config.mjs.- Service: Updated
ConnectionService.mjsto respectaiConfig.autoConnectininitAsync.- SDK: Updated
ai/services.mjsto setNeuralLink_Config.data.autoConnect = false.- Cleanup: Reverted manual connection handling in
createLabelIndex.mjs.Verification: Ran
node buildScripts/createLabelIndex.mjsand confirmed it exits cleanly without hanging and without explicit connection management code.
tobiu assigned to @tobiu on Jan 10, 2026, 7:48 PM

tobiu
Jan 10, 2026, 7:48 PM
Input from Gemini 3 Pro:
✦ Closing ticket as the refactoring is complete and verified.
tobiu closed this issue on Jan 10, 2026, 7:48 PM
To prevent scripts using the AI SDK (like
createLabelIndex.mjs) from hanging due to persistent Neural Link connections, we need to introduce a configuration option to control the auto-connection behavior.Plan:
ai/mcp/server/neural-link/config.mjsto includeautoConnect: true(default).ai/mcp/server/neural-link/services/ConnectionService.mjsto checkaiConfig.autoConnectininitAsync.ai/services.mjsto setNeuralLink_Config.data.autoConnect = falsefor SDK consumers.buildScripts/createLabelIndex.mjs.Why: This aligns the Neural Link service with other SDK services (like GitHub and Knowledge Base) which already have
autoSyncflags disabled by default in the SDK context.