@openclaw/voice-call 2026.11.1 → 2026.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{carrier-api-D0Mehu0z.mjs → carrier-api-C8icuJ0G.mjs} +8 -5
- package/dist/.setup/{cli-D5-VTleY.mjs → cli-B4FxOsgU.mjs} +11 -7
- package/dist/.setup/{config-BxESUUSm.mjs → config-BdbTQCSh.mjs} +15 -8
- package/dist/.setup/{mock-BO3pptb-.mjs → mock-rySvj-G6.mjs} +3 -2
- package/dist/.setup/{plivo-CVlhseOq.mjs → plivo-DHzGXxW2.mjs} +5 -4
- package/dist/.setup/{realtime-handler-Bh3dTrV0.mjs → realtime-handler-Bziu0nfs.mjs} +16 -9
- package/dist/.setup/{realtime-transcription.runtime-DIBopS1D.mjs → realtime-transcription.runtime-CbJAs5t_.mjs} +2 -1
- package/dist/.setup/{realtime-voice.runtime-S9H9Y0Cp.mjs → realtime-voice.runtime-MZjylF3n.mjs} +2 -1
- package/dist/.setup/{response-generator-DfALTCJn.mjs → response-generator-CZJCHbml.mjs} +4 -3
- package/dist/.setup/{runtime-entry-DckALJe-.mjs → runtime-entry-Cy51Uayg.mjs} +99 -55
- package/dist/.setup/{state-retention-api-y5WYfZsQ.mjs → state-retention-api-ONgqE-_V.mjs} +13 -7
- package/dist/.setup/{store-path-Bn3bLr8y.mjs → store-path-Cfwff6j7.mjs} +4 -2
- package/dist/.setup/{telnyx-D5Xg2uLQ.mjs → telnyx-ChcIdKAa.mjs} +3 -2
- package/dist/.setup/{twilio-BfTwBLIK.mjs → twilio-CrPMFGbz.mjs} +36 -17
- package/dist/.setup/{twilio-region-DVg9p6JJ.mjs → twilio-region-wBOx-8sz.mjs} +2 -1
- package/dist/.setup/{voice-mapping-CvuJ1B50.mjs → voice-mapping-1lzFmzOF.mjs} +2 -1
- package/dist/.setup/{webhook-replay-B0Eo3Ll5.mjs → webhook-replay-B7RJNWNG.mjs} +2 -1
- package/dist/cli-metadata.js +2 -1
- package/dist/cli-output-mode.js +2 -1
- package/dist/doctor-contract-api.js +4 -3
- package/dist/index.js +13 -8
- package/dist/runtime-entry.js +2 -1
- package/dist/setup-api.js +4 -2
- package/dist/state-retention-api.js +2 -1
- package/package.json +4 -4
- package/dist/.source-module-urls/8b7cb5a3dc0f034090cbbda318ba348c0d48853d04f0e3b500529cf7666abe03.json +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fetchWithSsrFGuard } from "../api.js";
|
|
2
|
-
import { c as getHeader, r as normalizeProxyIp } from "./runtime-entry-
|
|
3
|
-
import { n as reserveWebhookReplay, t as createWebhookReplayCache } from "./webhook-replay-
|
|
2
|
+
import { c as getHeader, r as normalizeProxyIp } from "./runtime-entry-Cy51Uayg.mjs";
|
|
3
|
+
import { n as reserveWebhookReplay, t as createWebhookReplayCache } from "./webhook-replay-B7RJNWNG.mjs";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
import { isLoopbackHost } from "openclaw/plugin-sdk/gateway-runtime";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -8,7 +8,7 @@ import crypto from "node:crypto";
|
|
|
8
8
|
import { isIP } from "node:net";
|
|
9
9
|
import { redactSensitiveText, safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
10
10
|
import { readResponseTextPrefix, readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
11
|
-
|
|
11
|
+
//#region extensions/voice-call/src/webhook-security.ts
|
|
12
12
|
const twilioReplayCache = createWebhookReplayCache();
|
|
13
13
|
const plivoReplayCache = createWebhookReplayCache();
|
|
14
14
|
const telnyxReplayCache = createWebhookReplayCache();
|
|
@@ -433,7 +433,8 @@ function verifyPlivoWebhook(ctx, authToken, options) {
|
|
|
433
433
|
verificationUrl
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region extensions/voice-call/src/providers/shared/guarded-json-api.ts
|
|
437
438
|
const VOICE_CALL_PROVIDER_API_TIMEOUT_MS = 3e4;
|
|
438
439
|
const PROVIDER_JSON_RESPONSE_MAX_BYTES = 1048576;
|
|
439
440
|
const PROVIDER_ERROR_RESPONSE_MAX_BYTES = 8192;
|
|
@@ -473,7 +474,8 @@ async function guardedJsonApiRequest(params) {
|
|
|
473
474
|
await release();
|
|
474
475
|
}
|
|
475
476
|
}
|
|
476
|
-
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region extensions/voice-call/src/providers/shared/carrier-api.ts
|
|
477
479
|
/** Keep call controls and recovery probes on the same carrier endpoint and credentials. */
|
|
478
480
|
function createCarrierApi(name, baseUrl, authorization, options = {}) {
|
|
479
481
|
const provider = name.toLowerCase();
|
|
@@ -524,4 +526,5 @@ function createCarrierApi(name, baseUrl, authorization, options = {}) {
|
|
|
524
526
|
}
|
|
525
527
|
};
|
|
526
528
|
}
|
|
529
|
+
//#endregion
|
|
527
530
|
export { verifyTwilioWebhook as a, verifyTelnyxWebhook as i, reconstructWebhookUrl as n, verifyPlivoWebhook as r, createCarrierApi as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sleep } from "../api.js";
|
|
2
|
-
import { g as CallBriefSchema, l as resolveVoiceCallStreamExposurePaths, u as validateProviderConfig } from "./config-
|
|
3
|
-
import { S as resolveVoiceCallAgentId, _ as findCallInStore, b as setVoiceCallStateRuntime, d as getTailscaleSelfInfo, f as setupTailscaleExposureRoutes, g as MAX_CALL_RECORD_EVENTS, l as resolveWebhookExposureStatus, u as cleanupTailscaleExposureRoute, v as getCallHistoryFromStore, y as loadActiveCallsFromStore } from "./runtime-entry-
|
|
4
|
-
import { r as resolveUserPath, t as resolveDefaultVoiceCallStoreDir } from "./store-path-
|
|
2
|
+
import { g as CallBriefSchema, l as resolveVoiceCallStreamExposurePaths, u as validateProviderConfig } from "./config-BdbTQCSh.mjs";
|
|
3
|
+
import { S as resolveVoiceCallAgentId, _ as findCallInStore, b as setVoiceCallStateRuntime, d as getTailscaleSelfInfo, f as setupTailscaleExposureRoutes, g as MAX_CALL_RECORD_EVENTS, l as resolveWebhookExposureStatus, u as cleanupTailscaleExposureRoute, v as getCallHistoryFromStore, y as loadActiveCallsFromStore } from "./runtime-entry-Cy51Uayg.mjs";
|
|
4
|
+
import { r as resolveUserPath, t as resolveDefaultVoiceCallStoreDir } from "./store-path-Cfwff6j7.mjs";
|
|
5
5
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
6
6
|
import { callGatewayFromCli, isGatewayClientRequestError, isGatewayTransportError, redactSensitiveUrlLikeString } from "openclaw/plugin-sdk/gateway-runtime";
|
|
7
7
|
import { isRecord, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -13,7 +13,7 @@ import { createDeferred } from "openclaw/plugin-sdk/concurrency-runtime";
|
|
|
13
13
|
import { readRegularFile } from "openclaw/plugin-sdk/file-access-runtime";
|
|
14
14
|
import { once } from "node:events";
|
|
15
15
|
import { format } from "node:util";
|
|
16
|
-
|
|
16
|
+
//#region extensions/voice-call/src/cli-command-io.ts
|
|
17
17
|
function writeCliLine(...values) {
|
|
18
18
|
process.stdout.write(`${format(...values)}\n`);
|
|
19
19
|
}
|
|
@@ -26,7 +26,8 @@ function parseCliInteger(raw, optionName, opts) {
|
|
|
26
26
|
if (parsed === void 0 || parsed < min || opts?.max !== void 0 && parsed > opts.max) throw new Error(`Invalid numeric value for ${optionName}: ${raw ?? ""}`);
|
|
27
27
|
return parsed;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region extensions/voice-call/src/cli-call-log.ts
|
|
30
31
|
const READ_BYTES = 65536;
|
|
31
32
|
async function writeLogChunk(chunk) {
|
|
32
33
|
if (!process.stdout.write(chunk)) await once(process.stdout, "drain");
|
|
@@ -182,7 +183,8 @@ function registerVoiceCallLogs(params) {
|
|
|
182
183
|
}
|
|
183
184
|
});
|
|
184
185
|
}
|
|
185
|
-
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region extensions/voice-call/src/cli-gateway-call.ts
|
|
186
188
|
const VOICE_CALL_GATEWAY_DEFAULT_TIMEOUT_MS = 5e3;
|
|
187
189
|
const VOICE_CALL_GATEWAY_OPERATION_TIMEOUT_MS = 3e4;
|
|
188
190
|
const VOICE_CALL_GATEWAY_TRANSCRIPT_BUFFER_MS = 1e4;
|
|
@@ -304,7 +306,8 @@ async function initiateVoiceCall(params) {
|
|
|
304
306
|
if (params.failureMessage && !result.callId) throw new Error(params.failureMessage);
|
|
305
307
|
return result.callId;
|
|
306
308
|
}
|
|
307
|
-
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region extensions/voice-call/src/cli.ts
|
|
308
311
|
async function readCliBrief(options) {
|
|
309
312
|
if (options.brief && options.briefFile) throw new Error("Use either --brief or --brief-file");
|
|
310
313
|
const raw = options.briefFile ? (await readRegularFile({ filePath: await realpath(resolveUserPath(options.briefFile)) })).buffer.toString("utf8") : options.brief;
|
|
@@ -628,4 +631,5 @@ function registerVoiceCallCli(params) {
|
|
|
628
631
|
});
|
|
629
632
|
});
|
|
630
633
|
}
|
|
634
|
+
//#endregion
|
|
631
635
|
export { registerVoiceCallCli };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TtsConfigSchema } from "../api.js";
|
|
2
|
-
import { t as TWILIO_REGIONS } from "./twilio-region-
|
|
2
|
+
import { t as TWILIO_REGIONS } from "./twilio-region-wBOx-8sz.mjs";
|
|
3
3
|
import { normalizeAgentId, parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME, REALTIME_VOICE_AGENT_CONSULT_TOOL_POLICIES, resolveRealtimeVoiceAgentConsultTools } from "openclaw/plugin-sdk/realtime-voice";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -9,7 +9,7 @@ import { canonicalizeMainSessionAlias } from "openclaw/plugin-sdk/session-store-
|
|
|
9
9
|
import { resolveSpeechProviderApiKey } from "openclaw/plugin-sdk/speech-core";
|
|
10
10
|
import { normalizeWebhookPath } from "openclaw/plugin-sdk/webhook-ingress";
|
|
11
11
|
import { MAX_TCP_PORT } from "openclaw/plugin-sdk/number-runtime";
|
|
12
|
-
|
|
12
|
+
//#region extensions/voice-call/src/call-brief-schema.ts
|
|
13
13
|
const text = (max) => z.string().trim().min(1).max(max);
|
|
14
14
|
const CallBriefSchema = z.object({
|
|
15
15
|
task: text(2e3).optional(),
|
|
@@ -25,7 +25,8 @@ const CallBriefSchema = z.object({
|
|
|
25
25
|
successCriteria: text(1e3).optional(),
|
|
26
26
|
maxDurationSeconds: z.number().int().positive().optional()
|
|
27
27
|
}).strict().refine((brief) => JSON.stringify(brief).length <= 8e3, "Call brief exceeds 8000 characters");
|
|
28
|
-
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region extensions/voice-call/src/allowlist.ts
|
|
29
30
|
function normalizePhoneNumber(input) {
|
|
30
31
|
return input?.replace(/\D/g, "") ?? "";
|
|
31
32
|
}
|
|
@@ -34,7 +35,8 @@ function isAllowlistedCaller(normalizedFrom, allowFrom) {
|
|
|
34
35
|
if (!normalizedFrom) return false;
|
|
35
36
|
return (allowFrom ?? []).some((num) => normalizePhoneNumber(num) === normalizedFrom);
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region extensions/voice-call/src/errand-config.ts
|
|
38
40
|
const CallReportsConfigSchema = z.object({
|
|
39
41
|
enabled: z.boolean().default(false),
|
|
40
42
|
includeTranscript: z.boolean().default(true),
|
|
@@ -78,7 +80,8 @@ const CallVoicemailConfigSchema = z.object({
|
|
|
78
80
|
machineDetectionSilenceTimeoutMs: 5e3,
|
|
79
81
|
machineDetectionTimeoutMs: 3e4
|
|
80
82
|
});
|
|
81
|
-
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region extensions/voice-call/src/realtime-call-control.ts
|
|
82
85
|
/** Stable provider-facing tool name for ending the current phone call. */
|
|
83
86
|
const REALTIME_VOICE_END_CALL_TOOL_NAME = "openclaw_end_call";
|
|
84
87
|
/** Closure-bound end-call control exposed on every realtime phone call. */
|
|
@@ -96,10 +99,12 @@ function resolveVoiceCallRealtimeTools(policy, customTools = []) {
|
|
|
96
99
|
const tools = resolveRealtimeVoiceAgentConsultTools(policy, customTools).filter((tool) => tool.name !== REALTIME_VOICE_END_CALL_TOOL_NAME);
|
|
97
100
|
return [REALTIME_VOICE_END_CALL_TOOL, ...tools];
|
|
98
101
|
}
|
|
99
|
-
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region extensions/voice-call/src/realtime-defaults.ts
|
|
100
104
|
/** Baseline instructions that keep realtime calls brief and route deep work to agent consult. */
|
|
101
105
|
const DEFAULT_VOICE_CALL_REALTIME_INSTRUCTIONS = `You are OpenClaw's phone-call realtime voice interface. Keep spoken replies brief and natural. When a question needs deeper reasoning, current information, or tools, call ${REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME} before answering. When the caller asks to end the call, speak any final words first, then call ${REALTIME_VOICE_END_CALL_TOOL_NAME}; it ends the call immediately and nothing after it will be spoken.`;
|
|
102
|
-
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region extensions/voice-call/src/tailscale-config.ts
|
|
103
108
|
const VoiceCallTailscaleConfigSchema = z.object({
|
|
104
109
|
mode: z.enum([
|
|
105
110
|
"off",
|
|
@@ -121,7 +126,8 @@ const TAILSCALE_FUNNEL_HTTPS_PORTS = /* @__PURE__ */ new Set([
|
|
|
121
126
|
function isTailscalePortAllowed(config) {
|
|
122
127
|
return !(config.tailscale.mode === "funnel" || config.tunnel.provider === "tailscale-funnel") || TAILSCALE_FUNNEL_HTTPS_PORTS.has(config.tailscale.port);
|
|
123
128
|
}
|
|
124
|
-
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region extensions/voice-call/src/config.ts
|
|
125
131
|
const E164Schema = z.string().regex(/^\+[1-9]\d{1,14}$/, "Expected E.164 format, e.g. +15550001234");
|
|
126
132
|
const InboundPolicySchema = z.enum([
|
|
127
133
|
"disabled",
|
|
@@ -600,4 +606,5 @@ function validateProviderConfig(config) {
|
|
|
600
606
|
errors
|
|
601
607
|
};
|
|
602
608
|
}
|
|
609
|
+
//#endregion
|
|
603
610
|
export { resolveVoiceCallEffectiveConfig as a, resolveVoiceCallSessionKey as c, REALTIME_VOICE_END_CALL_TOOL_NAME as d, resolveVoiceCallRealtimeTools as f, CallBriefSchema as g, normalizePhoneNumber as h, resolveVoiceCallConfig as i, resolveVoiceCallStreamExposurePaths as l, isAllowlistedCaller as m, normalizeVoiceCallConfig as n, resolveVoiceCallNumberRouteKeyForCall as o, DEFAULT_VOICEMAIL_HOLD_OPENING_MAX_MS as p, resolveTwilioAuthToken as r, resolveVoiceCallPublicPathPrefix as s, VoiceCallConfigSchema as t, validateProviderConfig as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as reserveWebhookReplay, t as createWebhookReplayCache } from "./webhook-replay-
|
|
1
|
+
import { n as reserveWebhookReplay, t as createWebhookReplayCache } from "./webhook-replay-B7RJNWNG.mjs";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
|
-
|
|
4
|
+
//#region extensions/voice-call/src/providers/mock.ts
|
|
5
5
|
/**
|
|
6
6
|
* Mock voice call provider for local testing.
|
|
7
7
|
*
|
|
@@ -135,4 +135,5 @@ var MockProvider = class {
|
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
|
+
//#endregion
|
|
138
139
|
export { MockProvider };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as getHeader } from "./runtime-entry-
|
|
2
|
-
import { t as escapeXml } from "./voice-mapping-
|
|
3
|
-
import { n as reconstructWebhookUrl, r as verifyPlivoWebhook, t as createCarrierApi } from "./carrier-api-
|
|
1
|
+
import { c as getHeader } from "./runtime-entry-Cy51Uayg.mjs";
|
|
2
|
+
import { t as escapeXml } from "./voice-mapping-1lzFmzOF.mjs";
|
|
3
|
+
import { n as reconstructWebhookUrl, r as verifyPlivoWebhook, t as createCarrierApi } from "./carrier-api-C8icuJ0G.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import crypto from "node:crypto";
|
|
6
|
-
|
|
6
|
+
//#region extensions/voice-call/src/providers/plivo.ts
|
|
7
7
|
function createPlivoRequestDedupeKey(ctx) {
|
|
8
8
|
const nonceV3 = getHeader(ctx.headers, "x-plivo-signature-v3-nonce");
|
|
9
9
|
if (nonceV3) return `plivo:v3:${nonceV3}`;
|
|
@@ -311,4 +311,5 @@ ${prompt} </GetInput>
|
|
|
311
311
|
return null;
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
+
//#endregion
|
|
314
315
|
export { PlivoProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as REALTIME_VOICE_END_CALL_TOOL_NAME, g as CallBriefSchema, s as resolveVoiceCallPublicPathPrefix } from "./config-
|
|
2
|
-
import { n as appendRecentTalkEventMetadata, s as canonicalizeVoiceCallMediaBase64 } from "./runtime-entry-
|
|
1
|
+
import { d as REALTIME_VOICE_END_CALL_TOOL_NAME, g as CallBriefSchema, s as resolveVoiceCallPublicPathPrefix } from "./config-BdbTQCSh.mjs";
|
|
2
|
+
import { n as appendRecentTalkEventMetadata, s as canonicalizeVoiceCallMediaBase64 } from "./runtime-entry-Cy51Uayg.mjs";
|
|
3
3
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { asNullableRecord, asOptionalObjectRecord, asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { createSubsystemLogger, sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -10,7 +10,7 @@ import { randomUUID } from "node:crypto";
|
|
|
10
10
|
import { safeParseJson, sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
11
11
|
import "node:http";
|
|
12
12
|
import { WebSocket, WebSocketServer, rejectWebSocketUpgrade } from "openclaw/plugin-sdk/websocket-runtime";
|
|
13
|
-
|
|
13
|
+
//#region extensions/voice-call/src/webhook/realtime-audio-pacer.ts
|
|
14
14
|
const TELEPHONY_SAMPLE_RATE = 8e3;
|
|
15
15
|
const TELEPHONY_CHUNK_BYTES = 160;
|
|
16
16
|
const LEAD_MS = 160;
|
|
@@ -231,7 +231,8 @@ var RealtimeAudioPacer = class {
|
|
|
231
231
|
return sent;
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
|
-
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region extensions/voice-call/src/webhook/realtime-call-session-control.ts
|
|
235
236
|
const OUTBOUND_GREETING_FALLBACK_MS = 3e3;
|
|
236
237
|
const REALTIME_MEDIA_INACTIVITY_TIMEOUT_MS = 3e4;
|
|
237
238
|
const REALTIME_DISCONNECT_HANGUP_GRACE_MS = 2e3;
|
|
@@ -471,7 +472,8 @@ function createRealtimeCallAudioController(params) {
|
|
|
471
472
|
cancelOutputAudioForBargeIn
|
|
472
473
|
};
|
|
473
474
|
}
|
|
474
|
-
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region extensions/voice-call/src/webhook/realtime-host-speech.ts
|
|
475
477
|
/** One host-requested utterance, completed by audible output rather than model receipts. */
|
|
476
478
|
function createRealtimeHostSpeechController(params) {
|
|
477
479
|
let closed = false;
|
|
@@ -521,7 +523,8 @@ function createRealtimeHostSpeechController(params) {
|
|
|
521
523
|
}
|
|
522
524
|
};
|
|
523
525
|
}
|
|
524
|
-
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region extensions/voice-call/src/webhook/realtime-call-playback.ts
|
|
525
528
|
const MAX_REALTIME_WS_BUFFERED_BYTES$1 = 1048576;
|
|
526
529
|
function createRealtimeCallPlayback(params) {
|
|
527
530
|
const { ws, callRecord, callSid, adapter, harness, initialGreetingInstructions } = params;
|
|
@@ -620,7 +623,8 @@ function createRealtimeCallPlayback(params) {
|
|
|
620
623
|
hostSpeech
|
|
621
624
|
};
|
|
622
625
|
}
|
|
623
|
-
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region extensions/voice-call/src/webhook/realtime-transcript-text.ts
|
|
624
628
|
const MAX_PARTIAL_USER_TRANSCRIPT_CHARS = 1200;
|
|
625
629
|
function limitPartialUserTranscript(text) {
|
|
626
630
|
if (text.length <= MAX_PARTIAL_USER_TRANSCRIPT_CHARS) return text;
|
|
@@ -663,7 +667,8 @@ function resolveFinalTranscriptText(params) {
|
|
|
663
667
|
if (compactRaw !== compactPartial) return appendTranscriptText(partial, params.final);
|
|
664
668
|
return normalizeTranscriptText(`${rawPartial}${params.final}`);
|
|
665
669
|
}
|
|
666
|
-
|
|
670
|
+
//#endregion
|
|
671
|
+
//#region extensions/voice-call/src/webhook/stream-frame-adapter.ts
|
|
667
672
|
/** Parse numeric timestamps sent as numbers or integer strings. */
|
|
668
673
|
function parseTimestampMs(value) {
|
|
669
674
|
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
@@ -745,7 +750,8 @@ var StreamFrameAdapter = class {
|
|
|
745
750
|
});
|
|
746
751
|
}
|
|
747
752
|
};
|
|
748
|
-
|
|
753
|
+
//#endregion
|
|
754
|
+
//#region extensions/voice-call/src/webhook/realtime-handler.ts
|
|
749
755
|
const STREAM_TOKEN_TTL_MS = 3e4;
|
|
750
756
|
const DEFAULT_HOST = "localhost:8443";
|
|
751
757
|
const MAX_REALTIME_MESSAGE_BYTES = 262144;
|
|
@@ -1973,4 +1979,5 @@ var RealtimeCallHandler = class {
|
|
|
1973
1979
|
return await submitFinalToolResult(result);
|
|
1974
1980
|
}
|
|
1975
1981
|
};
|
|
1982
|
+
//#endregion
|
|
1976
1983
|
export { RealtimeCallHandler };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { getRealtimeTranscriptionProvider, listRealtimeTranscriptionProviders } from "openclaw/plugin-sdk/realtime-transcription";
|
|
2
|
+
export { getRealtimeTranscriptionProvider, listRealtimeTranscriptionProviders };
|
package/dist/.setup/{realtime-voice.runtime-S9H9Y0Cp.mjs → realtime-voice.runtime-MZjylF3n.mjs}
RENAMED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { getRealtimeVoiceProvider, listRealtimeVoiceProviders, resolveConfiguredRealtimeVoiceProviderAsync } from "openclaw/plugin-sdk/realtime-voice";
|
|
2
|
+
export { getRealtimeVoiceProvider, listRealtimeVoiceProviders, resolveConfiguredRealtimeVoiceProviderAsync };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as resolveVoiceCallSessionKey } from "./config-
|
|
2
|
-
import { m as resolveVoiceResponseModel, x as resolveCallAgentId } from "./runtime-entry-
|
|
1
|
+
import { c as resolveVoiceCallSessionKey } from "./config-BdbTQCSh.mjs";
|
|
2
|
+
import { m as resolveVoiceResponseModel, x as resolveCallAgentId } from "./runtime-entry-Cy51Uayg.mjs";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
5
5
|
import { isValidAgentHarnessSessionStoreEntry } from "openclaw/plugin-sdk/session-store-runtime";
|
|
@@ -7,7 +7,7 @@ import crypto from "node:crypto";
|
|
|
7
7
|
import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
|
|
8
8
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
9
9
|
import { ModelSelectionLockedError, applyModelOverrideWithAuthProfileCompatibility, prepareAuthProfileProvider, resolvePersistedSessionRuntimeId } from "openclaw/plugin-sdk/model-session-runtime";
|
|
10
|
-
|
|
10
|
+
//#region extensions/voice-call/src/response-generator.ts
|
|
11
11
|
const VOICE_SPOKEN_OUTPUT_CONTRACT = [
|
|
12
12
|
"Output format requirements:",
|
|
13
13
|
"- Return only valid JSON in this exact shape: {\"spoken\":\"...\"}",
|
|
@@ -312,4 +312,5 @@ async function generateVoiceResponse(params) {
|
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
+
//#endregion
|
|
315
316
|
export { generateVoiceResponse };
|