Merge 1.5.0 into main#1851
Conversation
β¦1525) Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com> Co-authored-by: u9g <[email protected]>
Agent.llmNode now returns ReadableStream<ChatChunk | string | FlushSentinel>, but the agent_v2 hook overrides and AgentHookAdapter still declared the narrower ChatChunk | string union, so passing super.llmNode as the fallback failed to type-check. Widen the override return types and the adapter's fallback/return signatures to include FlushSentinel. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Brian Yin <[email protected]> Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com> Co-authored-by: u9g <[email protected]>
Catch end-call close listener errors to avoid unhandled rejections during shutdown, and make public tool type guards return false for null inputs.
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
β¦egment (#1760) Co-authored-by: Cursor <[email protected]>
β¦#1698) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com> Co-authored-by: Toubat <[email protected]>
# Conflicts: # agents/src/voice/agent_activity.test.ts # agents/src/voice/generation.ts # agents/src/voice/generation_tts_timeout.test.ts
The test asserted an exact tick count ([0,1,2]) against real timers with a 5ms margin, which flakes on loaded CI runners. Co-Authored-By: Claude Fable 5 <[email protected]>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
The HotelDB constructor seeded a queen_2beds garden booking for 4 guests, but queen_2beds rooms only hold 2, so pickRoom threw `sold out: garden queen_2beds` during construction β crashing the agent entrypoint on every job. Drop that seed booking to 2 guests so the inventory is consistent and the agent starts. Also align the README with the other multi-file examples (drive-thru, frontdesk): the `node ./examples/src/.../hotel_receptionist.ts dev` command fails because Node's type stripping can't resolve the relative `.js` imports to their `.ts` siblings. Point to the main README for setup and describe the file layout instead. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Long Chen <[email protected]>
Co-authored-by: Cursor <[email protected]> Co-authored-by: u9g <[email protected]>
Co-authored-by: Claude <[email protected]> Co-authored-by: Cursor <[email protected]>
Co-authored-by: u9g <[email protected]>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com> Co-authored-by: Chenghao Mou <[email protected]>
π¦ Changeset detectedLatest commit: e11c5b7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 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 |
| export function getMockTool(agent: Agent, toolName: string): MockToolFn | undefined { | ||
| if (!activeMockTools) return undefined; | ||
|
|
||
| for (const [agentConstructor, mocks] of activeMockTools) { | ||
| if (agent.constructor === agentConstructor) { | ||
| return mocks[toolName]; | ||
| } | ||
| } | ||
| return undefined; | ||
| } |
There was a problem hiding this comment.
π© mockTools (withMockTools) is incompatible with agents created via Agent.create()
getMockTool at agents/src/voice/testing/run_result.ts:972 matches by agent.constructor === agentConstructor. When Agent.create() is used (agents/src/voice/agent_v2.ts:126), the returned agent's constructor is an anonymous AgentV2 class defined inside createAgentV2, not the Agent base class. This means withMockTools(Agent, {...}) would never match an agent produced by Agent.create() β the user has no access to the anonymous constructor. The existing tests and examples only mock concrete subclasses (class DriveThruAgent extends Agent), not Agent.create() results, so this is currently a latent limitation rather than a broken feature. Worth documenting or addressing if Agent.create() becomes the recommended pattern.
Was this helpful? React with π or π to provide feedback.
|
Closing this incorrect PR; the intended main-targeted port for livekit/agents#6188 is in #1853. |
Summary
Testing