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

Refactor: Extract RuntimeService from ConnectionService

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

Refactor the Neural Link architecture by extracting application runtime logic from ConnectionService into a dedicated RuntimeService.

Scope:

  1. Create ai/mcp/server/neural-link/services/RuntimeService.mjs.
  2. Move the following logic from ConnectionService:
    • reloadPage
    • getWorkerTopology
    • getWindowTopology
  3. Update toolService.mjs to use the new service.

Goal: Centralize app-level lifecycle and topology operations.

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
tobiu Dec 28, 2025, 8:01 PM

Input from Gemini 3.0:

✦ I have completed the refactoring to extract RuntimeService.

Key Architectural Changes:

  1. RuntimeService Creation:

    • Created ai/mcp/server/neural-link/services/RuntimeService.mjs.
    • This service now manages application lifecycle (reloadPage) and topology inspection (getWorkerTopology, getWindowTopology).
  2. Logic Migration:

    • Moved the topology aggregation logic from ConnectionService to RuntimeService.
    • RuntimeService accesses the raw session data from ConnectionService (which acts as the state store) to build the topology views.
  3. Tool Routing:

    • Updated toolService.mjs to route reload_page, get_worker_topology, and get_window_topology to the new RuntimeService.

This further decomposes the monolithic ConnectionService, focusing it purely on transport and session state management.

tobiu assigned to @tobiu on Dec 28, 2025, 8:01 PM
tobiu referenced in commit 9676329 - "refactor(ai): Extract RuntimeService from ConnectionService (#8179) on Dec 28, 2025, 8:01 PM
tobiu closed this issue on Dec 28, 2025, 8:04 PM