Repository navigation
fix(sdk-js): merge a live UI patch onto the router's base; sample apps name their tools - #2196
Merged
Merged
Conversation
…s name their tools - Conversation merges an OpenUI patch onto the latest earlier card that completed and was not interrupted, whatever its format, as the router and Kotlin (#2089) do. A patch whose base is not OpenUI shows no UI. - swift_assistant and swift_demo agent.yaml name the apps' session tools in a tool group, which the router requires since #2088. - react_assistant answers approvals with chat.decide, so a call shown from history is answered, and offers edit/regenerate outside incognito.
martinmitrevski
approved these changes
Nov 23, 2026
oliverlaz
added a commit
that referenced
this pull request
Nov 23, 2026
…or (#2210) ## Why `Agent.Sync` skips a directory whose `.agent_sync` stamp matches the folder's hash, but the stamp doesn't record which router it was written for. Syncing `examples/voice_agents/swift_assistant` to a local router and then to the hosted one (`go run ./configure` with a different `STREAM_ACCELERATION_URL`) printed success and sent nothing. The hosted config kept `tools: []`, so every sample-app session there failed with `400 tool_not_configured` until `.agent_sync` was deleted by hand. The JS SDK already guards against this: it trusts a matching stamp only when the stored config's `sync_hash` matches too. ## Changes - `sdks/go/agents/config.go`: when the stamp matches, the stored config must also carry the same `sync_hash`. Otherwise the folder is synced. - `agent_test.go`: the fake router now records `sync_hash` on sync, as the real one does (`acceleration/internal/api/sync.go`). - `CHANGELOG.md` bug-fix entry. - `.claude/skills/sdk/SKILL.md`: a note for Python, .NET, Ruby, Rust and PHP to check their stamp logic. ## Validation - New test `TestAnUnchangedDirectoryIsSyncedToARouterItWasNeverSyncedTo`: sync to router A, then the same folder to router B. B must get the sync, and must not get it again on a third run. It fails on main ("the router that never had the directory got 0 syncs") and passes with this change. - `go test ./...` and `go vet ./...` in `sdks/go` pass. - Found while verifying #2196 against the hosted router.
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.
Why
An audit of main against the JS SDK, react_assistant and the React/RN docs found three gaps:
accelerate-v0.6.365+), a session under an agent config fails with400 tool_not_configuredwhen it declares a tool that notools:group names (acceleration/internal/session/manager.go:482).swift_assistantandswift_demodeclare no groups. Their apps (iOS, Android, Flutter, React and React Native) all pass their own tools tosessions.create, so every one of those sessions is refused.Conversationmerged a patch onto the latest OpenUI card it held. The router uses the latest card it completed and didn't cut off, whatever its format. So with an A2UI card in between, or after an interrupted reply, the live preview showed a card that Stream Chat's copy then replaced.session.decide(id)withoutcall, so the SDK leaves an approval shown from history unanswered (after a reload, or one asked on another device). The RN app fixed this in chore(examples): answer approvals with chat.decide in the React Native apps #2007.Changes
swift_assistant/agent.yamlgets adevicegroup:get_local_context,get_location,list_events,add_reminder,send_email,reserve_table.swift_demo/agent.yamlgets asupportgroup:lookup_order,issue_refund.go run ./configure.sdks/jsConversation:writeUi.chat.decide.Validation
sdks/js:npm testpasses, 801/801.npm run typecheck,vitest run(50/50) andvite buildpass.agents.Load, which reads the newtoolsgroups. Not run against a live router.