feat(agents): add beta end call tool#1474
Conversation
🦋 Changeset detectedLatest commit: afe2a7c The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
43f6089 to
5ee8112
Compare
|
|
| get providerTools(): ProviderDefinedTool[] { | ||
| return this._providerTools; | ||
| } |
There was a problem hiding this comment.
🟡 providerTools getter exposes internal mutable array instead of returning a defensive copy
The ToolContext.providerTools getter at agents/src/llm/tool_context.ts:285 returns the internal _providerTools array directly, despite its JSDoc comment promising "A copy of all provider tools". This is inconsistent with the functionTools getter (which creates a new Object.fromEntries(...)) and the toolsets getter (which spreads into a new array [...this._toolsets]). External consumers can mutate the internal array (e.g. .push(), .length = 0), silently corrupting the ToolContext state and breaking invariants like equals(), hasTool(), and flatten().
| get providerTools(): ProviderDefinedTool[] { | |
| return this._providerTools; | |
| } | |
| get providerTools(): ProviderDefinedTool[] { | |
| return [...this._providerTools]; | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
EndCallToolported from Python for ending calls from a tool invocation.JobContext.deleteRoom()support and export worker credentials to child job env so room deletion works when options are passed programmatically.Testing
pnpm --filter @livekit/agents buildpnpm --filter @livekit/agents lint(passes with existing warnings)pnpm format:checkNotes
pnpm --filter @livekit/agents api:checkis currently blocked by API Extractor failing on existingexport * as ___syntax indist/index.d.tsbefore checking this API surface.