fix(agent): emit MCP progress for completed steps - #250
HsiangNianian wants to merge 3 commits into
Conversation
📝 WalkthroughWalkthroughAgent pipeline phases and search/fetch execution steps now emit progress callbacks. The MCP server forwards callbacks for streaming agent requests, while callback failures are suppressed and final responses remain successful. ChangesAgent progress reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant MCPClient
participant server
participant handleAgent
participant runAgentPipeline
participant executeAgentPlan
MCPClient->>server: call agent with stream true
server->>handleAgent: forward onProgress
handleAgent->>runAgentPipeline: pass streaming callback
runAgentPipeline->>executeAgentPlan: pass reportStep
runAgentPipeline-->>MCPClient: plan progress
executeAgentPlan-->>MCPClient: search and fetch progress
runAgentPipeline-->>MCPClient: extraction and synthesis progress
runAgentPipeline-->>MCPClient: final agent result
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @HsiangNianian — thank you for this PR, and I'm sorry it's been sitting here without a proper review. I've been heads-down building some pretty big features and improvements for wigolo, and as a solo dev, shipping that while also reviewing and maintaining every issue and PR has been genuinely hard. This one isn't forgotten — it just hasn't had the attention it deserves yet. I'd really appreciate your patience here. I'm going to work through the open PRs and issues properly over the next few weeks (sooner if I can free up), and I'll follow up right here. In the meantime, the wigolo Discord is open if you'd like to follow what's being built, ask questions, or nudge me directly: https://discord.gg/BkUUgz2bNF Thanks again for contributing, and for understanding — it genuinely means a lot. 🙏 |
No worries at all, and thanks for the heads-up. Totally understand — take your time. I’m glad to hear the PR is still on your radar. Happy to help with anything needed when you get around to reviewing it. Good luck with the big wigolo updates! |
What & why
The
agenttool documentsstream: trueas sending progress for completed steps, but the MCP handler never passed its progress callback into the agent pipeline. Clients that supplied a progress token therefore received only the final result.Fixes #248.
Changes
agentonly when streaming is enabled.Testing
npm run test:unit— 589 files, 7,333 tests passed.npx vitest run tests/integration/agent.test.ts tests/unit/agent/executor.test.ts— 28 tests passed.npx vitest run tests/unit/server/schema-registration.test.ts— 7 tests passed.npm run lintnpm run buildnpm test— passed in PR CI; one local RESTfind_similarcold-start timeout while loading fastembed did not reproduce on the clean runner.Checklist
CONTRIBUTING.mdand agree to its contribution terms.