agent_session: rename CustomEvent -> DebugMessage; drop type field#1593
Merged
Conversation
Renames the agent-session event added in #1588 before any consumer ships it. Repositioned as an internal debug/trace channel surfaced only to the debugger/recorder, not to user code -- the `type` discriminator was unnecessary since callers just emit a free-form JSON payload. Wire: AgentSessionEvent.custom_event (field 21) -> AgentSessionEvent.debug_message (same field number, same type slot). No schema-compat concerns -- nothing has been built downstream against this yet (livekit/agents#5855 and livekit/agents-js#1611 are both still open). Regenerated Go (.pb.go) with protoc 25.1; JS (@livekit/protocol) regenerated via `pnpm --filter @livekit/protocol generate:proto`. Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 54ce680 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: adaed5f3bd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
theomonnom
approved these changes
May 27, 2026
Merged
toubatbrian
added a commit
to livekit/python-sdks
that referenced
this pull request
May 27, 2026
…9 -> 1.1.10 Picks up livekit/protocol#1593 which renames AgentSessionEvent.custom_event (field 21) -> AgentSessionEvent.debug_message and renames CustomEvent -> DebugMessage (drops the `type` field; payload only). Field number is unchanged. Bot will regenerate the Python stubs against the new submodule pointer. Co-authored-by: Cursor <cursoragent@cursor.com>
toubatbrian
added a commit
to livekit/agents-js
that referenced
this pull request
May 27, 2026
…otocol 1.46.4 Picks up livekit/protocol#1593 which renamed the agent-session event before any consumer shipped it. The message is repositioned as an internal debug/trace channel surfaced only to the debugger/recorder (e.g. agents-cli), not to user code. Proto change (mechanical rename): - AgentSessionEvent.custom_event -> AgentSessionEvent.debug_message (field 21) - pb.CustomEvent (string type, Struct payload) -> pb.DebugMessage (Struct payload) Surface change: - AgentSession.emitCustomEvent(type, payload) -> AgentSession._emitDebugMessage(payload) - underscore prefix + `/* internal */` JSDoc signal: not for user code - type discriminator dropped; callers just emit a JSON payload - AgentSessionEventTypes.CustomEvent -> AgentSessionEventTypes.DebugMessage - RemoteSessionCallbacks.custom_event -> debug_message - SessionHost.onCustomEvent -> onDebugMessage - Dispatch oneof case 'customEvent' -> 'debugMessage' Bumps `@livekit/protocol` floor `^1.46.3` -> `^1.46.4`. tsc --noEmit clean; lint clean (only pre-existing test-file `any` warnings). Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
toubatbrian
added a commit
to livekit/agents
that referenced
this pull request
May 27, 2026
…_emit_debug_message Picks up livekit/protocol#1593 which renamed the agent-session event before any consumer shipped it. The message is repositioned as an internal debug/trace channel surfaced only to the debugger/recorder (e.g. agents-cli), not to user code. Proto change (mechanical rename): - AgentSessionEvent.custom_event -> AgentSessionEvent.debug_message (field 21) - agent_pb.CustomEvent (str type, Struct payload) -> agent_pb.DebugMessage (Struct payload) Surface change: - AgentSession.emit_custom_event(event_type, payload) -> AgentSession._emit_debug_message(payload) - underscore prefix + `:meta private:` docstring marker signal: not for user code - type discriminator dropped; callers just emit a JSON payload - EventTypes literal "custom_event" -> "debug_message" - SessionHost._on_custom_event -> _on_debug_message Pin bump: `livekit-protocol>=1.1.9` -> `>=1.1.10` to pick up DebugMessage. (CI type-check is blocked until livekit/python-sdks#689 merges and a new livekit-protocol release is cut to PyPI.) Drive-by deslop on the helper body: - `from google.protobuf...` imports lifted to module scope (avoids the no-inline-imports convention warning). - Dropped the defensive `if payload:` + `dict(payload)` cast and the `ignore_unknown_fields=True` kwarg (Struct fields aren't user fields). - Trimmed the 12-line docstring + 3-line inline comment down to the one non-obvious line that documents *why* we use `super().emit`. ruff check + ruff format --check clean. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
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.
Summary
Renames the agent-session event added in #1588 before any consumer ships it.
message CustomEvent { string type; Struct payload; }→message DebugMessage { Struct payload; }AgentSessionEvent.custom_event(field 21) →AgentSessionEvent.debug_message(same field number, same type slot)Why
Repositioned as an internal debug/trace channel surfaced only to the debugger/recorder (e.g.
agents-cli), not user code. With the user-facing API dropped, thetypediscriminator was unnecessary — callers just emit a free-form JSONpayload.Compat
No schema-compat concerns — nothing has been built downstream against this yet:
Both downstream PRs will be updated to consume
DebugMessageonce a new@livekit/protocolandlivekit-protocol(PyPI) are cut from this.Regen
livekit/agent/livekit_agent_session.pb.go) —protocw/protoc-gen-go@livekit/protocol) —pnpm --filter @livekit/protocol generate:protolivekit-protocol) — regenerated by thepython-sdksbot after the submodule pointer is bumped post-mergeTest plan
mageGo regen produces cleanDebugMessagesymbolpnpm generate:protoproduces cleanDebugMessagesymbolCustomEvent→DebugMessageand rename the helper to a private_emit_debug_messageper Slack discussionMade with Cursor