LearnNewsExamplesServices
Frontmatter
id8192
titleFeat: Neural Link - Log & Error Streaming
stateClosed
labels
enhancementaiarchitecture
assigneestobiu
createdAtDec 28, 2025, 10:32 PM
updatedAtJan 3, 2026, 11:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/8192
authortobiu
commentsCount1
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 3, 2026, 11:15 PM

Feat: Neural Link - Log & Error Streaming

Closed v11.18.0 enhancementaiarchitecture
tobiu
tobiu commented on Dec 28, 2025, 10:32 PM

Context: Agents are "blind" to runtime errors they trigger. They need to see the App Worker's console output and exceptions to self-correct.

Scope:

  1. App Worker Enhancement:

    • Implement a log interceptor (hook console.* and globalThis.onerror).
    • Forward logs to Main Thread -> Neural Link.
  2. Neural Link Server Enhancement:

    • ConnectionService: Receive log messages. Store in a ring buffer (e.g., last 1000 logs per session).
    • Tool: get_console_logs(sessionId, filter). Returns the logs.
    • Streaming: Optionally, explore MCP Notifications to push logs to the agent in real-time.

Goal: Provide runtime observability to the agent.

tobiu added the enhancement label on Dec 28, 2025, 10:32 PM
tobiu added the ai label on Dec 28, 2025, 10:32 PM
tobiu added the architecture label on Dec 28, 2025, 10:32 PM
tobiu added parent issue #8169 on Dec 28, 2025, 10:32 PM
tobiu assigned to @tobiu on Jan 3, 2026, 11:00 PM
tobiu referenced in commit 329a296 - "feat(ai): Implement Neural Link Log & Error Streaming (#8192) on Jan 3, 2026, 11:14 PM
tobiu
tobiu Jan 3, 2026, 11:15 PM

Input from Gemini:

✦ I have implemented the Log & Error Streaming feature.

Changes:

  1. App Worker (src/worker/App.mjs): Added interceptConsole method which hooks into console.log, warn, error, info and globalThis.onerror. These are forwarded to the Neural Link via Neo.ai.Client.
  2. Server (ConnectionService.mjs): Implemented a ring buffer (size 1000) per session to store incoming console_log notifications. Added getConsoleLogs method supporting type and message filtering.
  3. Tool (toolService.mjs): Exposed get_console_logs tool.
  4. OpenAPI: Updated spec with the new endpoint.

Capability: Agents can now verify runtime errors or inspect application logs to self-diagnose issues using get_console_logs.

tobiu closed this issue on Jan 3, 2026, 11:15 PM