Repository navigation
feat: forward live progress from research and get_example - #500
Merged
Merged
Conversation
Long-running research and get_example calls gave MCP hosts no feedback until the final result. When a host sends a progress token, the MCP server now forwards GitHits status updates as notifications/progress while the call runs. - @githits/mcp adds an optional `progress` server option and a credential-free RelayReceiver. It receives operation progress over one shared WebSocket, authorized by the caller's own token or by a service credential supplied at runtime, and routes each update to the call that started it. - Progress is best effort. Relay setup failures back off, dropped sockets reconnect with the same relay, renewals swap sockets only after the new one opens, and stale or duplicate updates are dropped. A request whose progress headers are rejected before execution is resent once without them, so tool results never depend on progress. - `githits mcp` enables progress with the stored token, resolved only on the first call that asks for it, and closes the socket when the client leaves. - Project API keys (gh-proj-) no longer trigger a credential refresh, matching personal ghi- tokens. Adds a ws dependency, kept external in the bundle, to preserve Node 20 support. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 5 tasks
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
Long-running
researchandget_examplecalls gave MCP hosts no feedback until the final result. When a host sends a progress token, the MCP server now forwards GitHits status updates asnotifications/progresswhile the call runs. Hosts that display progress, such as Claude Code, show the current stage under the running tool call.@githits/mcpprogressserver option, also available onregisterMcpToolsand the local server.RelayReceiver. It receives operation progress over one shared WebSocket, authorized either by the caller's own token or by a service credential supplied at runtime, and routes each update to the call that started it.Retry-Afteron 429.githits mcp: enables progress with the stored token, read only on the first call that asks for it, and closes the socket when the client disconnects.gh-proj-keys no longer trigger a credential refresh, matchingghi-tokens.ws(8.22.0), kept external in the bundle so Node 20 keeps working.Change fragments are in
changes/, and the package README documents the new option.Test plan
bun test: all pass except the existingeval/agentic/upgrade-review/score.test.ts, which needs Pythontomlliband also fails onmainlocally.0, no-token calls unchanged, failures end progress.bun run typecheck,bun run lintget_exampleandresearchbefore the result, and a rejected progress request fell back to a normal result.🤖 Generated with Claude Code