mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:50:43 +00:00
Fix Google Meet consult session key scoping
This commit is contained in:
committed by
Peter Steinberger
parent
12031582a0
commit
729a4498d9
@@ -2052,10 +2052,13 @@ describe("google-meet plugin", () => {
|
||||
expect.objectContaining({
|
||||
messageProvider: "google-meet",
|
||||
agentId: "jay",
|
||||
sessionKey: "agent:jay:google-meet:meet-1",
|
||||
sandboxSessionKey: "agent:jay:google-meet:meet-1",
|
||||
thinkLevel: "high",
|
||||
toolsAllow: ["read", "web_search", "web_fetch", "x_search", "memory_search", "memory_get"],
|
||||
}),
|
||||
);
|
||||
expect(sessionStore).toHaveProperty("agent:jay:google-meet:meet-1");
|
||||
|
||||
await handle.stop();
|
||||
expect(bridge.close).toHaveBeenCalled();
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
resolveRealtimeVoiceAgentConsultToolsAllow,
|
||||
type RealtimeVoiceTool,
|
||||
} from "openclaw/plugin-sdk/realtime-voice";
|
||||
import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
|
||||
import type { GoogleMeetConfig, GoogleMeetToolPolicy } from "./config.js";
|
||||
|
||||
export const GOOGLE_MEET_AGENT_CONSULT_TOOL_NAME = REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME;
|
||||
@@ -26,12 +27,14 @@ export async function consultOpenClawAgentForGoogleMeet(params: {
|
||||
args: unknown;
|
||||
transcript: Array<{ role: "user" | "assistant"; text: string }>;
|
||||
}): Promise<{ text: string }> {
|
||||
const agentId = normalizeAgentId(params.config.realtime.agentId);
|
||||
const sessionKey = `agent:${agentId}:google-meet:${params.meetingSessionId}`;
|
||||
return await consultRealtimeVoiceAgent({
|
||||
cfg: params.fullConfig,
|
||||
agentRuntime: params.runtime.agent,
|
||||
logger: params.logger,
|
||||
agentId: params.config.realtime.agentId,
|
||||
sessionKey: `google-meet:${params.meetingSessionId}`,
|
||||
agentId,
|
||||
sessionKey,
|
||||
messageProvider: "google-meet",
|
||||
lane: "google-meet",
|
||||
runIdPrefix: `google-meet:${params.meetingSessionId}`,
|
||||
|
||||
Reference in New Issue
Block a user