refactor: make MCP host diagnostics injectable - #311
Merged
Conversation
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
force-pushed
the
jlitola/research-webmcp-browser-adapter
branch
from
August 26, 2026 19:50
53b641d to
fa2ac9f
Compare
jlitola
marked this pull request as ready for review
August 26, 2026 19:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ServiceDiagnosticscontract to core service clients@githits/mcp/clientCompatibility
This removes the pre-1.0
startTelemetrySpan,endTelemetrySpan,flushTelemetry, andwithTelemetrySpanexports from@githits/mcp/client. Remote hosts can injectServiceDiagnosticsthrough service runtime options. Service clients remain silent by default.Verification
bun test— 3,203 passedbun run typecheckbun run format:checkbun run lintbun run plugins:generatebun run plugins:checkbun run build(cd packages/mcp && bun run build)bun run validate:packagesAuthenticated live smoke reached the service but was rate-limited with HTTP 429. All isolated unauthenticated and registration cohorts passed.
Review