mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:10:44 +00:00
Add Google Meet realtime consult agentId
This commit is contained in:
committed by
Peter Steinberger
parent
735890d955
commit
12031582a0
@@ -287,6 +287,16 @@ describe("google-meet plugin", () => {
|
||||
expect(resolveGoogleMeetConfig({}).realtime.instructions).toContain("openclaw_agent_consult");
|
||||
});
|
||||
|
||||
it("resolves the realtime consult agent id", () => {
|
||||
expect(
|
||||
resolveGoogleMeetConfig({
|
||||
realtime: {
|
||||
agentId: " jay ",
|
||||
},
|
||||
}).realtime.agentId,
|
||||
).toBe("jay");
|
||||
});
|
||||
|
||||
it("uses env fallbacks for OAuth, preview, and default meeting values", () => {
|
||||
expect(
|
||||
resolveGoogleMeetConfigWithEnv(
|
||||
@@ -1976,7 +1986,7 @@ describe("google-meet plugin", () => {
|
||||
|
||||
const handle = await startCommandRealtimeAudioBridge({
|
||||
config: resolveGoogleMeetConfig({
|
||||
realtime: { provider: "openai", model: "gpt-realtime" },
|
||||
realtime: { provider: "openai", model: "gpt-realtime", agentId: "jay" },
|
||||
}),
|
||||
fullConfig: {} as never,
|
||||
runtime: runtime as never,
|
||||
@@ -2041,6 +2051,7 @@ describe("google-meet plugin", () => {
|
||||
expect(runtime.agent.runEmbeddedPiAgent).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
messageProvider: "google-meet",
|
||||
agentId: "jay",
|
||||
thinkLevel: "high",
|
||||
toolsAllow: ["read", "web_search", "web_fetch", "x_search", "memory_search", "memory_get"],
|
||||
}),
|
||||
|
||||
@@ -129,6 +129,11 @@
|
||||
"label": "Realtime Intro Message",
|
||||
"help": "Spoken once when the realtime bridge is ready. Set to an empty string to join silently."
|
||||
},
|
||||
"realtime.agentId": {
|
||||
"label": "Realtime Consult Agent",
|
||||
"help": "OpenClaw agent id to consult when realtime.toolPolicy exposes openclaw_agent_consult.",
|
||||
"advanced": true
|
||||
},
|
||||
"realtime.toolPolicy": {
|
||||
"label": "Realtime Tool Policy",
|
||||
"help": "Safe read-only tools are available by default; owner requests can unlock broader tools.",
|
||||
@@ -353,6 +358,10 @@
|
||||
"type": "string",
|
||||
"default": "Say exactly: I'm here and listening."
|
||||
},
|
||||
"agentId": {
|
||||
"type": "string",
|
||||
"description": "OpenClaw agent id to consult when realtime.toolPolicy exposes openclaw_agent_consult."
|
||||
},
|
||||
"toolPolicy": {
|
||||
"type": "string",
|
||||
"enum": ["safe-read-only", "owner", "none"],
|
||||
|
||||
@@ -30,6 +30,7 @@ export async function consultOpenClawAgentForGoogleMeet(params: {
|
||||
cfg: params.fullConfig,
|
||||
agentRuntime: params.runtime.agent,
|
||||
logger: params.logger,
|
||||
agentId: params.config.realtime.agentId,
|
||||
sessionKey: `google-meet:${params.meetingSessionId}`,
|
||||
messageProvider: "google-meet",
|
||||
lane: "google-meet",
|
||||
|
||||
@@ -57,6 +57,7 @@ export type GoogleMeetConfig = {
|
||||
model?: string;
|
||||
instructions?: string;
|
||||
introMessage?: string;
|
||||
agentId?: string;
|
||||
toolPolicy: GoogleMeetToolPolicy;
|
||||
providers: Record<string, Record<string, unknown>>;
|
||||
};
|
||||
@@ -361,6 +362,7 @@ export function resolveGoogleMeetConfigWithEnv(
|
||||
introMessage:
|
||||
normalizeOptionalString(realtime.introMessage) ??
|
||||
DEFAULT_GOOGLE_MEET_CONFIG.realtime.introMessage,
|
||||
agentId: normalizeOptionalString(realtime.agentId),
|
||||
toolPolicy: resolveRealtimeVoiceAgentConsultToolPolicy(
|
||||
realtime.toolPolicy,
|
||||
DEFAULT_GOOGLE_MEET_CONFIG.realtime.toolPolicy,
|
||||
|
||||
Reference in New Issue
Block a user