@openclaw/voice-call 2026.7.2-beta.7 → 2026.7.34
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/README.md +3 -2
- package/dist/.setup/config-BBpso-fA.mjs +674 -0
- package/dist/.setup/config-compat-CYRE-SSo.mjs +156 -0
- package/dist/{guarded-json-api-DS9sZa3C.js → .setup/guarded-json-api-BukKSVNW.mjs} +56 -42
- package/dist/{mock-YsvBTX-7.js → .setup/mock-DY4yTqR2.mjs} +1 -1
- package/dist/{plivo-vZ--Wqxv.js → .setup/plivo-DFHh72MH.mjs} +3 -2
- package/dist/{realtime-handler--i_OERv6.js → .setup/realtime-handler-DWLxvZuO.mjs} +198 -130
- package/dist/{response-generator-D-7ApVfT.js → .setup/response-generator-DoC6lfcm.mjs} +6 -21
- package/dist/{runtime-entry-D0UJiLfi.js → .setup/runtime-entry-CH-CV0Sf.mjs} +384 -868
- package/dist/{store-path-nYL-yM0S.js → .setup/store-1UfyY3HS.mjs} +6 -13
- package/dist/{telnyx-Dx6cfLvV.js → .setup/telnyx-Bb8X-nin.mjs} +1 -1
- package/dist/{twilio-D_D8KysU.js → .setup/twilio-Bsbf3O9A.mjs} +11 -15
- package/dist/{webhook-replay-aaP79dI8.js → .setup/webhook-replay-g3cDA5wr.mjs} +1 -1
- package/dist/cli-metadata.js +1 -5
- package/dist/doctor-contract-api.js +14 -36
- package/dist/index.js +46 -48
- package/dist/runtime-entry.js +1 -1
- package/dist/setup-api.js +2 -86
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1172 -0
- package/node_modules/commander/index.js +21 -0
- package/node_modules/commander/lib/argument.js +147 -0
- package/node_modules/commander/lib/command.js +2790 -0
- package/node_modules/commander/lib/error.js +36 -0
- package/node_modules/commander/lib/help.js +731 -0
- package/node_modules/commander/lib/option.js +377 -0
- package/node_modules/commander/lib/suggestSimilar.js +99 -0
- package/node_modules/commander/package-support.json +19 -0
- package/node_modules/commander/package.json +64 -0
- package/node_modules/commander/typings/index.d.ts +1113 -0
- package/node_modules/typebox/build/compile/validator.d.mts +4 -1
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +2 -5
- package/node_modules/typebox/build/guard/string.mjs +4 -16
- package/node_modules/typebox/build/schema/engine/_functions.mjs +15 -34
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -8
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +32 -29
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +15 -2
- package/package.json +8 -6
- package/dist/cli-output-mode.js +0 -27
- package/dist/twilio-region-4fkgz3UG.js +0 -25
- /package/dist/{realtime-transcription.runtime-CbJAs5t_.js → .setup/realtime-transcription.runtime-CbJAs5t_.mjs} +0 -0
- /package/dist/{realtime-voice.runtime-vtdCOWg-.js → .setup/realtime-voice.runtime-vtdCOWg-.mjs} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as resolveVoiceCallSessionKey } from "./config-BBpso-fA.mjs";
|
|
2
|
+
import { m as resolveCallAgentId, p as resolveVoiceResponseModel } from "./runtime-entry-CH-CV0Sf.mjs";
|
|
2
3
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
4
|
import crypto from "node:crypto";
|
|
4
|
-
import {
|
|
5
|
+
import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-session-runtime";
|
|
5
6
|
//#region extensions/voice-call/src/response-generator.ts
|
|
6
7
|
/**
|
|
7
8
|
* Voice call response generator - uses the embedded OpenClaw agent for tool support.
|
|
@@ -66,11 +67,7 @@ function sanitizePlainSpokenText(text) {
|
|
|
66
67
|
const withoutCodeFences = text.replace(/```[\s\S]*?```/g, " ").trim();
|
|
67
68
|
if (!withoutCodeFences) return null;
|
|
68
69
|
const paragraphs = normalizeStringEntries(withoutCodeFences.split(/\n\s*\n+/));
|
|
69
|
-
while (paragraphs.length > 1)
|
|
70
|
-
const firstParagraph = paragraphs.at(0);
|
|
71
|
-
if (!firstParagraph || !isLikelyMetaReasoningParagraph(firstParagraph)) break;
|
|
72
|
-
paragraphs.shift();
|
|
73
|
-
}
|
|
70
|
+
while (paragraphs.length > 1 && isLikelyMetaReasoningParagraph(paragraphs[0])) paragraphs.shift();
|
|
74
71
|
return normalizeSpokenText(paragraphs.join(" "));
|
|
75
72
|
}
|
|
76
73
|
function extractSpokenTextFromPayloads(payloads) {
|
|
@@ -107,7 +104,7 @@ function resolveVoiceSandboxSessionKey(agentId, sessionKey) {
|
|
|
107
104
|
* Uses the same agent infrastructure as messaging for consistent behavior.
|
|
108
105
|
*/
|
|
109
106
|
async function generateVoiceResponse(params) {
|
|
110
|
-
const { voiceConfig, callId, sessionKey, from, transcript, userMessage, coreConfig, agentRuntime, onEarlyText } = params;
|
|
107
|
+
const { voiceConfig, callId, sessionKey, from, senderIsOwner, transcript, userMessage, coreConfig, agentRuntime, onEarlyText } = params;
|
|
111
108
|
if (!coreConfig) return {
|
|
112
109
|
text: null,
|
|
113
110
|
deliveredEarly: false,
|
|
@@ -145,7 +142,6 @@ async function generateVoiceResponse(params) {
|
|
|
145
142
|
agentRuntime
|
|
146
143
|
});
|
|
147
144
|
let sessionEntry = existingSessionEntry;
|
|
148
|
-
if (sessionEntry?.modelSelectionLocked === true && voiceConfig.responseModel) throw new ModelSelectionLockedError();
|
|
149
145
|
if (!sessionEntry?.sessionId || voiceConfig.responseModel) sessionEntry = await agentRuntime.session.patchSessionEntry({
|
|
150
146
|
storePath,
|
|
151
147
|
sessionKey: resolvedSessionKey,
|
|
@@ -177,8 +173,6 @@ async function generateVoiceResponse(params) {
|
|
|
177
173
|
error: "Voice response session could not be initialized"
|
|
178
174
|
};
|
|
179
175
|
const sessionId = sessionEntry.sessionId;
|
|
180
|
-
const modelSelectionLocked = sessionEntry.modelSelectionLocked === true;
|
|
181
|
-
const persistedRuntimeId = resolvePersistedSessionRuntimeId(sessionEntry);
|
|
182
176
|
const thinkLevel = agentRuntime.resolveThinkingDefault({
|
|
183
177
|
cfg,
|
|
184
178
|
provider,
|
|
@@ -213,11 +207,6 @@ async function generateVoiceResponse(params) {
|
|
|
213
207
|
prompt: userMessage,
|
|
214
208
|
provider,
|
|
215
209
|
model,
|
|
216
|
-
modelSelectionLocked,
|
|
217
|
-
...persistedRuntimeId ? {
|
|
218
|
-
agentHarnessId: persistedRuntimeId,
|
|
219
|
-
agentHarnessRuntimeOverride: persistedRuntimeId
|
|
220
|
-
} : {},
|
|
221
210
|
thinkLevel,
|
|
222
211
|
verboseLevel: "off",
|
|
223
212
|
timeoutMs,
|
|
@@ -225,6 +214,7 @@ async function generateVoiceResponse(params) {
|
|
|
225
214
|
lane: "voice",
|
|
226
215
|
extraSystemPrompt,
|
|
227
216
|
agentDir,
|
|
217
|
+
senderIsOwner,
|
|
228
218
|
toolsAllow,
|
|
229
219
|
abortSignal,
|
|
230
220
|
blockReplyBreak: "text_end",
|
|
@@ -271,11 +261,6 @@ async function generateVoiceResponse(params) {
|
|
|
271
261
|
};
|
|
272
262
|
});
|
|
273
263
|
} catch (err) {
|
|
274
|
-
if (err instanceof ModelSelectionLockedError) return {
|
|
275
|
-
text: null,
|
|
276
|
-
deliveredEarly: false,
|
|
277
|
-
error: err.message
|
|
278
|
-
};
|
|
279
264
|
console.error(`[voice-call] Response generation failed:`, err);
|
|
280
265
|
return {
|
|
281
266
|
text: null,
|