feat: add browser-callable MCP tools - #315
Merged
Merged
Conversation
Record the merged host-boundary increment, observed verification, and current publication state before evaluating Phase 2 readiness.
Record the verified browser dependency seams, define the Phase 2 callable get_example boundary, and specify host-owned auth, terms, and cancellation behavior.
Keep the scope and dependency sections aligned with the reviewed terms-remediation contract.
Move the mapped error envelope and terms classifier out of the code-navigation mapper so service error mapping does not load code-navigation taxonomy. Preserve existing mapper re-exports and terms remediation payloads for current callers.
Replace ambient MCP error state with explicit per-call context, keep local CLI remediation compatible, and expose URL-based terms guidance to hosted callers.
Thread optional caller signals through get_example, the GitHits search service, and token-refresh retries while preserving internal timeout mapping and existing callers.
Expose a narrow browser-neutral core error entry and a validated callable get_example adapter without importing MCP server dependencies.
Add the public @githits/mcp/tools export and build entry, then validate its packed runtime, declarations, and browser dependency graph without changing existing MCP entrypoints.
Describe the scoped @githits/mcp/tools boundary, injected search service, callable WebMCP adapter, and explicit Node dependency limitations. Add durable workspace architecture guidance and the MCP release fragment.
Keep the callable tools example transport-neutral by delegating to an application-supplied search function while preserving explicit request-option and abort-signal forwarding.
Phase 2 implementation and durable documentation are complete in the CLI repository. Future WebMCP registration, authentication, API, bundler, and CORS work belongs to the app.githits.com repository and requires a fresh plan against its actual conventions.
Keep the existing public type and constant re-exports while removing duplicate local imports identified by the full Phase 2 lint pass.
Document host-owned terms recovery as an intentional surface-native exception and move MappedError ownership to the shared contract module while preserving structured parity guarantees.
Remove cancellation checks that duplicate the guarded token and operation boundaries while retaining coverage for token lookup, refresh, and retry. Record the host-aware terms remediation and caller-cancellation behavior in the pending MCP release fragment.
Route unified search and search-status terms errors through the CLI mapped-error formatter before diagnostics and output branching. Preserve the command-specific JSON envelope and cover both actions with exact regression assertions.
Publish the neutral GitHits error constructors through the callable tools entry while keeping generated declarations private-core-free. Supply host-neutral authentication remediation and extend source and packed-consumer coverage for auth, terms, rate-limit, timeout, validation, and cancellation behavior.
Record the explicit browser service-error constructors and host-neutral remediation while clarifying selected-graph browser safety and keeping a separate SDK as an open future package decision.
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
@githits/mcp/toolsentry for the existingget_exampledefinitionVerification
bun test: 3306 passed, 0 failed@githits/mcpbuildsRelease impact
@githits/mcp: minorgithits: none