Pr 137 sdk#144
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK’s agent streaming/run event surface to better support tool invocation correlation by introducing a toolCallId and a first-class tool result event.
Changes:
- Extend
ChunkwithtoolCallIdfortool-calland add a newtool-resultchunk type. - Add
onToolResultand enrichonToolUsecallback payloads withtoolCallId. - Update agent run/stream SSE parsing and expand tests to cover the new behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/sdk/src/types.ts | Updates public SDK types for tool-call/tool-result chunks and callback option payloads. |
| packages/sdk/src/client.ts | Parses tool/tool_result SSE events, emits new chunk type, and triggers callbacks with toolCallId. |
| packages/sdk/src/tests/box-agent-run.test.ts | Adds/updates tests for toolCallId, tool-result chunks, and onToolResult. |
| .changeset/loose-adults-glow.md | Declares the release change for @upstash/box. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.