Skip to content

feat: channel commands, voice context, and a greeting that waits for session.started - #38

Merged
MatthewHsu1 merged 1 commit into
mainfrom
feat/channel-commands
Oct 6, 2026
Merged

MatthewHsu1 merged 1 commit into
mainfrom
feat/channel-commands

Conversation

@MatthewHsu1

Copy link
Copy Markdown
Owner

Change

  • Channel commands. Conversation actions are now channel commands, in Conversation.Commands.
    • ToolCallScope.Conversation.Request(...) is now ToolCallScope.Channel.Send(...).
    • ConversationSession.Request(...) is now Send(...).
    • EndConversationAction → EndCommand, TransferAction → TransferCommand, ConversationActionResult → ChannelCommandResult.
  • Host handlers. ICallTransfer is gone. A host registers IChannelCommandHandler<TransferCommand, CallTransferOutcome> as a singleton instead. CallTransfer is now ChannelCommandContext.
  • Voice context. AddVoiceContextCommand gives GPT-Live a fact it should know but not say. It goes out as session.thinking.append with no delegation (OpenAI's live guide). The text is cut to 1,000 characters.
  • Channel attached early. The webhook attaches the GPT-Live channel before CallStarted. A hook can now send a command from OnCallStartedAsync.
  • Greeting. The greeting now goes out as commentary, not as session instructions. As instructions, GPT-Live spoke it in 5 of 10 probe sessions; as commentary, in 8 of 8. It waits for session.started, as OpenAI's guide says.

Public API

This breaks the API that v0.13.0 shipped: the Conversation.Actions types are removed and replaced by Conversation.Commands.

Tests

  • ChannelCommandsTests replaces ConversationActionsTests.
  • OpenAiLiveVoiceContextTests covers a fact sent mid-call, a fact sent before session.started, and a fact a hook sends from CallStarted.
  • TheGreetingWaitsForTheSessionToStart covers the greeting gate.
  • Local run: build 0 warnings, all tests pass. Postgres, Qdrant, and S3 tests were skipped locally.

…aits for session.started

- Rename conversation actions to channel commands (Conversation.Actions -> Conversation.Commands).
  ToolCallScope.Conversation.Request -> ToolCallScope.Channel.Send; ConversationSession.Request -> Send.
- Replace ICallTransfer with IChannelCommandHandler<TransferCommand, CallTransferOutcome>.
- Add AddVoiceContextCommand: a silent fact for GPT-Live, sent as session.thinking.append.
- Attach the GPT-Live channel before CallStarted, so a hook can send a command from it.
- Send the greeting as commentary, and only after session.started.
@MatthewHsu1
MatthewHsu1 merged commit 4a0bb66 into main Oct 6, 2026
1 of 2 checks passed
@MatthewHsu1
MatthewHsu1 deleted the feat/channel-commands branch October 6, 2026 07:55
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