import { randomUUID } from "node:crypto"; import type { RunEmbeddedPiAgentParams } from "../agents/pi-embedded-runner/run/params.js"; import type { OpenClawConfig } from "../config/types.openclaw.js"; import type { RuntimeLogger, PluginRuntimeCore } from "../plugins/runtime/types-core.js"; import {
buildRealtimeVoiceAgentConsultPrompt,
collectRealtimeVoiceAgentConsultVisibleText,
type RealtimeVoiceAgentConsultTranscriptEntry,
} from "./agent-consult-tool.js";
export type RealtimeVoiceAgentConsultRuntime = PluginRuntimeCore["agent"];
export type RealtimeVoiceAgentConsultResult = { text: string };
export {
resolveRealtimeVoiceAgentConsultTools,
resolveRealtimeVoiceAgentConsultToolsAllow,
} from "./agent-consult-tool.js";
function resolveRealtimeVoiceAgentSandboxSessionKey(agentId: string, sessionKey: string): string { const trimmed = sessionKey.trim(); if (trimmed.toLowerCase().startsWith("agent:")) { return trimmed;
} return `agent:${agentId}:${trimmed}`;
}
const text = collectRealtimeVoiceAgentConsultVisibleText(result.payloads ?? []); if (!text) { const reason = result.meta?.aborted ? "agent run aborted" : "agent returned no speakable text";
params.logger.warn(`[realtime-voice] agent consult produced no answer: ${reason}`); return { text: params.fallbackText ?? "I need a moment to verify that before answering." };
} return { text };
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.16 Sekunden
(vorverarbeitet am 2026-06-05)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.