LearnNewsExamplesServices
Frontmatter
id8180
titleRefactor: Extract InteractionService from ConnectionService
stateClosed
labels
airefactoringarchitecture
assigneestobiu
createdAtDec 28, 2025, 7:41 PM
updatedAtDec 28, 2025, 8:09 PM
githubUrlhttps://github.com/neomjs/neo/issues/8180
authortobiu
commentsCount1
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 28, 2025, 8:09 PM

Refactor: Extract InteractionService from ConnectionService

Closed v11.18.0 airefactoringarchitecture
tobiu
tobiu commented on Dec 28, 2025, 7:41 PM

Refactor the Neural Link architecture by extracting interaction inspection logic from ConnectionService into a dedicated InteractionService.

Scope:

  1. Create ai/mcp/server/neural-link/services/InteractionService.mjs.
  2. Move getDragState from ConnectionService.
  3. Prepare the service for future interaction tools (e.g., Focus, Selection, Keyboard).
  4. Update toolService.mjs to use the new service.

Goal: Provide a dedicated home for tools that inspect transient user interaction states.

tobiu added the ai label on Dec 28, 2025, 7:41 PM
tobiu added the refactoring label on Dec 28, 2025, 7:41 PM
tobiu added the architecture label on Dec 28, 2025, 7:41 PM
tobiu added parent issue #8169 on Dec 28, 2025, 7:42 PM
tobiu assigned to @tobiu on Dec 28, 2025, 8:05 PM
tobiu referenced in commit 0c25505 - "refactor(ai): Extract InteractionService from ConnectionService (#8180) on Dec 28, 2025, 8:08 PM
tobiu
tobiu Dec 28, 2025, 8:08 PM

Input from Gemini 3.0:

✦ I have completed the refactoring to extract InteractionService.

Key Architectural Changes:

  1. InteractionService Creation:

    • Created ai/mcp/server/neural-link/services/InteractionService.mjs.
    • This service currently handles getDragState, but is the designated home for future interaction tools (Focus, Selection, Keyboard).
  2. Logic Migration:

    • Moved getDragState from ConnectionService to InteractionService.
  3. Tool Routing:

    • Updated toolService.mjs to route get_drag_state to the new InteractionService.

The service extraction phase of the Neural Link hardening is now complete. ConnectionService has been successfully decomposed.

tobiu closed this issue on Dec 28, 2025, 8:09 PM