Repository navigation
feat: stream tool-call arguments as incremental AG-UI deltas - #781
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
… document them Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
temporarily deployed
to
vercel-preview
September 22, 2026 04:50 — with
GitHub Actions
Inactive
This was referenced Sep 22, 2026
Merged
blove
added a commit
to liveloveapp/hashbrown
that referenced
this pull request
Sep 22, 2026
## Summary Bumps the invoicing server's seven `@b4run/*` pins from 0.9.0 to 0.10.0 and refreshes the root lockfile. 0.10.0 ships [cacheplane/b4run#781](cacheplane/b4run#781), which streams a tool call's arguments as several `TOOL_CALL_ARGS` deltas instead of one; the hashbrown client already parses partial arguments incrementally, so generative UI in the example now paints while the model is still writing the component tree. No code changes were needed in the example. The lockfile diff is the B4 package set plus two nested duplicates (`commander`, `typescript`) that now dedupe to the root. ## Test plan - [x] `nx run-many -t build test lint --projects invoicing-server,invoicing-contracts,invoicing-react` passes (server 213 tests, contracts 65, react 8). - [x] Every `@b4run/*` entry in the lockfile resolves to 0.10.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.1 <[email protected]>
This branch was successfully deployed
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
Tool-call arguments now reach the AG-UI wire as they are generated:
TOOL_CALL_START, one or moreTOOL_CALL_ARGSdeltas, thenTOOL_CALL_END, under the call's logical id. A client that renders from a tool call's arguments can paint progressively, as it already does for assistant text.@b4run/langchain: the agent adapter projects thetool_call_chunksfragments a provider streams onon_chat_model_streaminto a newtool_call_argschunk, correlated by model run and fragment index. Theon_chat_model_endannounce and its guards are unchanged, so identity across interrupt/resume and the resume-replay path behave exactly as before. Subagent models and the two orchestration tools (writeTodos,task) never stream.canonical-json-streamre-serializes the raw provider JSON token by token into exactly whatJSON.stringify(args)produces, so the concatenated deltas match today's single delta byte for byte. Duplicate or array-index-like keys, which cannot be canonicalized before their object closes, fall to raw passthrough that still parses to the same object.@b4run/ag-ui: the first fragment opens the call, each fragment is one delta, the announce emits any uncovered tail and thenTOOL_CALL_END. Atool_callwith no preceding fragments takes today's three-frame path unchanged (the silent fallback for providers that yield no fragments). Open streamed calls are ended on done, interrupt, error and exhausted streams.@b4run/cli: the middlewareafterhook treats a fragment as proof a held message was not final; the live tail renders nothing for fragments.Design:
docs/superpowers/specs/2026-09-21-stream-tool-call-args-design.md.Test plan
JSON.stringifyof the parse; whitespace, escapes, surrogates and number forms canonicalize; hazard shapes fall to passthrough that parses identically.@ag-ui/clientverifyEvents.TOOL_CALL_ARGSframes on the SSE stream.gpt-5-mini: 61 deltas over ~5 s, concatenation identical to the announce. Anthropic not verified (no API credit on the local key).turbo run lint typecheck testfor langchain, ag-ui and cli;node scripts/check-docs.mjspasses.🤖 Generated with Claude Code