feat(typescript): forward GroundedAgent widget chunk through the orchestrator stream - #599
Merged
Merged
Conversation
cornelcroi
force-pushed
the
feat/typescript-mcp-tool-ui
branch
from
July 14, 2026 20:28
bd3668a to
77677c6
Compare
…estrator
AccumulatorTransform now forwards a { ui } object chunk to the stream consumer
and keeps it out of the accumulated text answer, so widgets reach callers via
AgentSquad.routeRequest — not only when driving the agent directly. A stream
with no widget chunk is byte-identical to before; object chunks (e.g. thinking)
already flowed through this transform. Docs updated.
Closes #598
Code written by Claude (Opus 4.8), architected and approved by @cornelcroi.
cornelcroi
force-pushed
the
feat/typescript-orchestrator-widget-forward
branch
from
July 14, 2026 20:30
7ebf2b0 to
4849841
Compare
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.
Issue Link
Closes #598
Summary
Makes
AgentSquad.routeRequestforward aGroundedAgent{ ui }widget chunk to the caller instead of dropping it. Previously the orchestrator'sAccumulatorTransformforwarded only text, so widgets worked only when consuming the agent directly — a usability gap and a divergence from Python (whose orchestrator forwards the chunk unchanged).Stacked on #597 (base
feat/typescript-mcp-tool-ui) to keep the TS stack linear and update both docs notes without conflict. Merge order: #591 → #593 → #597 → this.Changes
AccumulatorTransform._transform: a{ ui }object chunk is pushed downstream and returns early — never added to the text accumulator, so the saved assistant text stays clean.User experience
Streaming via
orchestrator.routeRequest, the caller now receives the{ ui }widget chunk interleaved with text-string chunks (check each chunk's type) — matching how Python delivers it.Checklist
object && chunk.ui; a stream with no widget is byte-identical; object chunks (thinking) already flowed through this transform; saved text unaffected.uinot treated as widget);npm run build/lint/coveragegreen (172 tests, 17 suites)Code written by Claude (Opus 4.8), architected and approved by @cornelcroi.