Skip to content

refactor: make MCP host diagnostics injectable - #311

Merged
jlitola merged 5 commits into
mainfrom
jlitola/research-webmcp-browser-adapter
Aug 26, 2026
Merged

refactor: make MCP host diagnostics injectable#311
jlitola merged 5 commits into
mainfrom
jlitola/research-webmcp-browser-adapter

Conversation

@jlitola

@jlitola jlitola commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an optional transport-neutral ServiceDiagnostics contract to core service clients
  • move telemetry, debug environment handling, and stderr output to the CLI host while keeping CLI diagnostics behavior
  • make MCP error classification pure and remove module-global telemetry lifecycle exports from @githits/mcp/client
  • enforce filesystem-free core source and packed MCP entry graphs, including positive-control and external-consumer checks
  • document the boundary, release impacts, and the remaining Phase 2 browser/WebMCP blockers

Compatibility

This removes the pre-1.0 startTelemetrySpan, endTelemetrySpan, flushTelemetry, and withTelemetrySpan exports from @githits/mcp/client. Remote hosts can inject ServiceDiagnostics through service runtime options. Service clients remain silent by default.

Verification

  • bun test — 3,203 passed
  • bun run typecheck
  • bun run format:check
  • bun run lint
  • bun run plugins:generate
  • bun run plugins:check
  • bun run build
  • (cd packages/mcp && bun run build)
  • bun run validate:packages
  • source and built CLI unauthenticated smoke
  • source and built MCP registration smoke

Authenticated live smoke reached the service but was rate-limited with HTTP 429. All isolated unauthenticated and registration cohorts passed.

Review

  • Luna plan-conformance preflight: passed
  • bounded internal code review: runtime/privacy/validator delta clean; generic SemVer objection rejected against repository release policy
  • fresh retained Opus review: approved with no remaining findings

@jlitola jlitola added the enhancement New feature or request label Aug 26, 2026
Route service telemetry and debug events through an optional host-supplied diagnostics contract. Keep core clients silent without diagnostics while preserving CLI container instrumentation and privacy gates.
Keep telemetry and debug output in the CLI host while core clients remain transport-neutral. Make MCP error mapping pure and preserve opt-in CLI classification events through a host wrapper.
Enforce the core and packed MCP filesystem boundary with source scans, static import-graph probes, and packed consumer checks. Document host-owned diagnostics and the next browser/WebMCP investigation without claiming compatibility.
Document the content-disclosure implications of injected diagnostic areas and preserve the distinction between silent MCP mapping and CLI-injected core diagnostics. Record the remaining host-specific schema-mismatch remediation boundary for Phase 2.
Record the terms-acceptance CLI guidance alongside schema-mismatch recovery prose so Phase 2 can move all host-specific remediation into host mappings.
@jlitola
jlitola force-pushed the jlitola/research-webmcp-browser-adapter branch from 53b641d to fa2ac9f Compare August 26, 2026 19:50
@jlitola
jlitola marked this pull request as ready for review August 26, 2026 19:53
@jlitola
jlitola merged commit 9c3b613 into main Aug 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant