惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
GbyAI
GbyAI
博客园 - 司徒正美
美团技术团队
Vercel News
Vercel News
IT之家
IT之家
U
Unit 42
Y
Y Combinator Blog
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
V
Visual Studio Blog
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MyScale Blog
MyScale Blog
博客园 - 叶小钗
A
About on SuperTechFans
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(gateway): steer realtime relay agent runs · openclaw...
steipete · 2026-05-24 · via Recent Commits to openclaw:main

@@ -3,6 +3,8 @@ import {

33

normalizeOptionalString,

44

} from "../../shared/string-coerce.js";

55

import { REALTIME_VOICE_AGENT_CONSULT_TOOL } from "../../talk/agent-consult-tool.js";

6+

import { REALTIME_VOICE_AGENT_CONTROL_TOOL } from "../../talk/agent-run-control-shared.js";

7+

import { controlRealtimeVoiceAgentRun } from "../../talk/agent-run-control.js";

68

import { resolveConfiguredRealtimeVoiceProvider } from "../../talk/provider-resolver.js";

79

import type { TalkBrain, TalkMode, TalkTransport } from "../../talk/talk-events.js";

810

import { ADMIN_SCOPE } from "../operator-scopes.js";

@@ -16,6 +18,7 @@ import {

1618

validateTalkSessionCloseParams,

1719

validateTalkSessionCreateParams,

1820

validateTalkSessionJoinParams,

21+

validateTalkSessionSteerParams,

1922

validateTalkSessionSubmitToolResultParams,

2023

validateTalkSessionTurnParams,

2124

} from "../protocol/index.js";

@@ -33,6 +36,7 @@ import {

3336

cancelTalkRealtimeRelayTurn,

3437

createTalkRealtimeRelaySession,

3538

sendTalkRealtimeRelayAudio,

39+

steerTalkRealtimeRelayAgentRun,

3640

stopTalkRealtimeRelaySession,

3741

submitTalkRealtimeRelayToolResult,

3842

} from "../talk-realtime-relay.js";

@@ -270,8 +274,9 @@ export const talkSessionHandlers: GatewayRequestHandlers = {

270274

provider: resolution.provider,

271275

providerConfig: withRealtimeBrowserOverrides(resolution.providerConfig, launchOptions),

272276

instructions: buildRealtimeInstructions(realtimeConfig.instructions),

273-

tools: [REALTIME_VOICE_AGENT_CONSULT_TOOL],

277+

tools: [REALTIME_VOICE_AGENT_CONSULT_TOOL, REALTIME_VOICE_AGENT_CONTROL_TOOL],

274278

model: launchOptions.model,

279+

sessionKey: normalizeOptionalString(params.sessionKey),

275280

voice: launchOptions.voice,

276281

forceAgentConsultOnFinalTranscript:

277282

realtimeConfig.consultRouting === "force-agent-consult",

@@ -682,6 +687,80 @@ export const talkSessionHandlers: GatewayRequestHandlers = {

682687

respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, formatForLog(err)));

683688

}

684689

},

690+

"talk.session.steer": async ({ params, respond, client }) => {

691+

if (!validateTalkSessionSteerParams(params)) {

692+

respond(

693+

false,

694+

undefined,

695+

errorShape(

696+

ErrorCodes.INVALID_REQUEST,

697+

`invalid talk.session.steer params: ${formatValidationErrors(validateTalkSessionSteerParams.errors)}`,

698+

),

699+

);

700+

return;

701+

}

702+

try {

703+

const session = getUnifiedTalkSession(params.sessionId);

704+

if (session.kind === "realtime-relay") {

705+

const connId = requireUnifiedTalkSessionConn(session, client?.connId);

706+

const result = await steerTalkRealtimeRelayAgentRun({

707+

relaySessionId: session.relaySessionId,

708+

connId,

709+

sessionKey: normalizeOptionalString(params.sessionKey),

710+

text: params.text,

711+

mode: normalizeOptionalString(params.mode),

712+

});

713+

respond(true, result, undefined);

714+

return;

715+

}

716+

if (session.kind === "transcription-relay") {

717+

respond(

718+

false,

719+

undefined,

720+

errorShape(

721+

ErrorCodes.INVALID_REQUEST,

722+

"talk.session.steer requires an agent-backed Talk session",

723+

),

724+

);

725+

return;

726+

}

727+

if (!isActiveManagedRoomClient(session, client?.connId)) {

728+

respond(false, undefined, managedRoomOwnershipError("steer"));

729+

return;

730+

}

731+

const handoff = getTalkHandoff(session.handoffId);

732+

const sessionKey = handoff?.sessionKey;

733+

if (!sessionKey) {

734+

respond(

735+

false,

736+

undefined,

737+

errorShape(ErrorCodes.INVALID_REQUEST, "talk.session.steer requires a session key"),

738+

);

739+

return;

740+

}

741+

const requestedSessionKey = normalizeOptionalString(params.sessionKey);

742+

if (requestedSessionKey && requestedSessionKey !== sessionKey) {

743+

respond(

744+

false,

745+

undefined,

746+

errorShape(

747+

ErrorCodes.INVALID_REQUEST,

748+

"talk.session.steer sessionKey does not match the managed-room session",

749+

),

750+

);

751+

return;

752+

}

753+

const result = await controlRealtimeVoiceAgentRun({

754+

sessionKey,

755+

text: params.text,

756+

mode: params.mode,

757+

recentEvents: handoff?.room.talk.recentEvents,

758+

});

759+

respond(true, result, undefined);

760+

} catch (err) {

761+

respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, formatForLog(err)));

762+

}

763+

},

685764

"talk.session.close": async ({ params, respond, client, context }) => {

686765

if (!validateTalkSessionCloseParams(params)) {

687766

respond(