Skip to content

Send console server info to CLI host#2000

Closed
rosetta-livekit-bot[bot] wants to merge 1 commit into
mainfrom
affirmed-softener-paradox
Closed

Send console server info to CLI host#2000
rosetta-livekit-bot[bot] wants to merge 1 commit into
mainfrom
affirmed-softener-paradox

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Send AgentDev.ServerInfo to the local CLI host immediately after the console TCP transport connects.
  • Thread agentName and wsURL from CLI ServerOptions into runConsole so the CLI can surface agent/project context.
  • Add a changeset for @livekit/agents.

Source diff coverage

Coverage classification
  • livekit-agents/livekit/agents/cli/watcher.py: adapted to agents/src/console.ts, agents/src/cli.ts, and agents/src/voice/remote_session.ts. The JS target does not have Python's dev hot-reload watcher; the equivalent CLI host path is runConsole using TcpSessionTransport. The port sends an AgentDev.ServerInfo frame immediately after TCP connect, with agentName and wsURL passed from CLI ServerOptions.
  • livekit-agents/pyproject.toml: not applicable. The target counterpart is agents/package.json; its declared @livekit/protocol range already includes 1.48.0, and AgentDev.ServerInfo exists in @livekit/protocol@1.48.0.
  • uv.lock: not applicable. The target counterpart is pnpm-lock.yaml; no protocol dependency bump is needed, so there is no lockfile update to port.

Validation

  • pnpm --filter @livekit/agents typecheck passed.
  • pnpm --filter @livekit/agents lint passed with existing warnings.
  • pnpm --filter @livekit/agents build passed.
  • pnpm prettier --check "agents/src/cli.ts" "agents/src/console.ts" "agents/src/voice/remote_session.ts" ".changeset/console-server-info.md" passed.
  • git diff --check passed.
  • pnpm vitest run agents/src failed: 90 files passed, agents/src/voice/amd.test.ts failed 11 AMD assertions/timeouts unrelated to this TCP console change.
  • pnpm vitest run agents/src/voice/amd.test.ts failed with the same 11 AMD failures.
  • pnpm --filter @livekit/agents api:check failed because API Extractor does not support generated export * as ___ syntax in agents/dist/index.d.ts:10.

No target infrastructure gaps were identified.


Ported from livekit/agents#6260

Original PR description

No description.

@rosetta-livekit-bot rosetta-livekit-bot Bot requested a review from a team as a code owner July 8, 2026 21:28
@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4440f7c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@livekit/agents Major
@livekit/agents-plugin-anam Major
@livekit/agents-plugin-anthropic Major
@livekit/agents-plugin-assemblyai Major
@livekit/agents-plugin-baseten Major
@livekit/agents-plugin-bey Major
@livekit/agents-plugin-cartesia Major
@livekit/agents-plugin-cerebras Major
@livekit/agents-plugin-deepgram Major
@livekit/agents-plugin-did Major
@livekit/agents-plugin-elevenlabs Major
@livekit/agents-plugin-fishaudio Major
@livekit/agents-plugin-google Major
@livekit/agents-plugin-hedra Major
@livekit/agents-plugin-hume Major
@livekit/agents-plugin-inworld Major
@livekit/agents-plugin-lemonslice Major
@livekit/agents-plugin-liveavatar Major
@livekit/agents-plugin-livekit Major
@livekit/agents-plugin-minimax Major
@livekit/agents-plugin-mistral Major
@livekit/agents-plugin-mistralai Major
@livekit/agents-plugin-neuphonic Major
@livekit/agents-plugin-openai Major
@livekit/agents-plugin-perplexity Major
@livekit/agents-plugin-phonic Major
@livekit/agents-plugin-resemble Major
@livekit/agents-plugin-rime Major
@livekit/agents-plugin-runway Major
@livekit/agents-plugin-sarvam Major
@livekit/agents-plugin-silero Major
@livekit/agents-plugin-soniox Major
@livekit/agents-plugin-tavus Major
@livekit/agents-plugins-test Major
@livekit/agents-plugin-trugen Major
@livekit/agents-plugin-xai Major

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

@rosetta-livekit-bot rosetta-livekit-bot Bot requested a review from davidzhao July 8, 2026 21:28

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +308 to +316
if (this.options.serverInfo) {
const msg = new AgentDev.AgentDevMessage({
message: {
case: 'serverInfo',
value: new AgentDev.ServerInfo(this.options.serverInfo),
},
});
await this.sendFramed(msg.toBinary());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Server info handshake uses a different protobuf type than session messages on the same TCP stream

The start() method at agents/src/voice/remote_session.ts:308-316 sends an AgentDev.AgentDevMessage over the same length-prefixed TCP stream that subsequently carries pb.AgentSessionMessage frames. The broker (LiveKit CLI host) must know to parse the first frame as AgentDevMessage rather than AgentSessionMessage. This is a protocol-level contract that isn't enforced or documented in this codebase — correctness depends on the broker implementation matching this expectation. If the broker doesn't handle this, the first frame will be silently misinterpreted or cause a parse error.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@davidzhao davidzhao closed this Jul 9, 2026
@davidzhao davidzhao deleted the affirmed-softener-paradox branch July 9, 2026 22:34
@davidzhao

Copy link
Copy Markdown
Member

replaced with #2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant