@openclaw/voice-call 2026.10.10 → 2026.11.5-beta.1

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.
Files changed (120) hide show
  1. package/dist/.setup/{carrier-api-BgJdQC-e.mjs → carrier-api-CZQtPnYQ.mjs} +15 -28
  2. package/dist/.setup/{cli-CI9QzIaT.mjs → cli-BUVmNuk8.mjs} +113 -61
  3. package/dist/.setup/{config-BxESUUSm.mjs → config-D_w9HzxP.mjs} +55 -111
  4. package/dist/.setup/{mock-BO3pptb-.mjs → mock-fux1a_i_.mjs} +3 -4
  5. package/dist/.setup/{plivo-C5cLYAup.mjs → plivo-Cpxxx8BT.mjs} +6 -21
  6. package/dist/.setup/{realtime-handler-B2JJ-8wv.mjs → realtime-handler-BkoZ-ZYd.mjs} +190 -265
  7. package/dist/.setup/{response-generator-B2nVYBf_.mjs → response-generator-COluXT2F.mjs} +11 -15
  8. package/dist/.setup/{runtime-entry-CKPPin7r.mjs → runtime-entry-Br7ttAwq.mjs} +382 -522
  9. package/dist/.setup/{state-retention-api-y5WYfZsQ.mjs → state-retention-api-BDJR8dnG.mjs} +1 -1
  10. package/dist/.setup/{store-path-Bn3bLr8y.mjs → store-path-C0yJCDE8.mjs} +2 -2
  11. package/dist/.setup/{telnyx-ZopMHuZl.mjs → telnyx-DdFzdUEf.mjs} +4 -5
  12. package/dist/.setup/{twilio-BGLnhzpD.mjs → twilio-BqUbz9jp.mjs} +7 -15
  13. package/dist/.setup/webhook-replay-DnlMxw4z.mjs +30 -0
  14. package/dist/.source-module-urls/8b7cb5a3dc0f034090cbbda318ba348c0d48853d04f0e3b500529cf7666abe03.json +1 -1
  15. package/dist/doctor-contract-api.js +21 -2
  16. package/dist/index.js +106 -195
  17. package/dist/runtime-entry.js +1 -1
  18. package/dist/setup-api.js +1 -2
  19. package/dist/state-retention-api.js +1 -1
  20. package/node_modules/typebox/build/format/duration.d.mts +2 -2
  21. package/node_modules/typebox/build/format/duration.mjs +2 -2
  22. package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
  23. package/node_modules/typebox/build/format/idn_email.mjs +1 -0
  24. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
  25. package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
  26. package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
  27. package/node_modules/typebox/build/format/ipv4.mjs +2 -2
  28. package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
  29. package/node_modules/typebox/build/format/ipv6.mjs +1 -1
  30. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  31. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  32. package/node_modules/typebox/build/schema/build.mjs +1 -0
  33. package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
  34. package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
  35. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
  36. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
  37. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
  38. package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
  39. package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
  40. package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
  41. package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
  42. package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
  43. package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
  44. package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
  45. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
  46. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
  47. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  48. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  49. package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
  50. package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
  51. package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
  52. package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
  53. package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
  54. package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
  55. package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
  56. package/node_modules/typebox/build/system/memory/create.mjs +18 -13
  57. package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
  58. package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
  59. package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
  60. package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
  61. package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
  62. package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
  63. package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
  64. package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
  65. package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
  66. package/node_modules/typebox/build/system/memory/update.mjs +43 -16
  67. package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
  68. package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
  69. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
  70. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
  71. package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
  72. package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
  73. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
  74. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
  75. package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
  76. package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
  77. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
  78. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
  79. package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
  80. package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
  81. package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
  82. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  83. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
  84. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
  85. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
  86. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
  87. package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
  88. package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
  89. package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
  90. package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
  91. package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
  92. package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
  93. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
  94. package/node_modules/typebox/package.json +1 -1
  95. package/node_modules/typebox/readme.md +1 -1
  96. package/node_modules/zod/package.json +1 -1
  97. package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  98. package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  99. package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  100. package/node_modules/zod/src/v4/core/compile.ts +9 -0
  101. package/node_modules/zod/src/v4/core/schemas.ts +35 -1
  102. package/node_modules/zod/src/v4/core/util.ts +13 -0
  103. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  104. package/node_modules/zod/v4/core/compile.cjs +8 -0
  105. package/node_modules/zod/v4/core/compile.js +8 -0
  106. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  107. package/node_modules/zod/v4/core/schemas.d.cts +3 -1
  108. package/node_modules/zod/v4/core/schemas.d.ts +3 -1
  109. package/node_modules/zod/v4/core/schemas.js +30 -0
  110. package/node_modules/zod/v4/core/util.cjs +15 -0
  111. package/node_modules/zod/v4/core/util.d.cts +2 -0
  112. package/node_modules/zod/v4/core/util.d.ts +2 -0
  113. package/node_modules/zod/v4/core/util.js +14 -0
  114. package/node_modules/zod/v4/core/versions.cjs +1 -1
  115. package/node_modules/zod/v4/core/versions.js +1 -1
  116. package/openclaw.plugin.json +9 -2
  117. package/package.json +6 -6
  118. package/dist/.setup/webhook-replay-B0Eo3Ll5.mjs +0 -42
  119. package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
  120. package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
@@ -1,11 +1,10 @@
1
- import { c as resolveVoiceCallSessionKey } from "./config-BxESUUSm.mjs";
2
- import { m as resolveVoiceResponseModel, x as resolveCallAgentId } from "./runtime-entry-CKPPin7r.mjs";
1
+ import { s as resolveVoiceCallSessionKey } from "./config-D_w9HzxP.mjs";
2
+ import { b as resolveCallAgentId, p as resolveVoiceResponseModel } from "./runtime-entry-Br7ttAwq.mjs";
3
+ import crypto from "node:crypto";
3
4
  import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
4
- import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
5
5
  import { isValidAgentHarnessSessionStoreEntry } from "openclaw/plugin-sdk/session-store-runtime";
6
- import crypto from "node:crypto";
7
- import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
8
6
  import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
7
+ import { safeParseJson, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
9
8
  import { ModelSelectionLockedError, applyModelOverrideWithAuthProfileCompatibility, prepareAuthProfileProvider, resolvePersistedSessionRuntimeId } from "openclaw/plugin-sdk/model-session-runtime";
10
9
  // extensions/voice-call/src/response-generator.ts
11
10
  const VOICE_SPOKEN_OUTPUT_CONTRACT = [
@@ -65,18 +64,15 @@ function tryParseSpokenJson(text) {
65
64
  const firstBrace = trimmed.indexOf("{");
66
65
  const lastBrace = trimmed.lastIndexOf("}");
67
66
  if (firstBrace >= 0 && lastBrace > firstBrace) candidates.push(trimmed.slice(firstBrace, lastBrace + 1));
68
- for (const candidate of candidates) try {
69
- const parsed = JSON.parse(candidate);
67
+ for (const candidate of candidates) {
68
+ const parsed = safeParseJson(candidate);
70
69
  if (typeof parsed?.spoken !== "string") continue;
71
70
  return normalizeSpokenText(parsed.spoken) ?? "";
72
- } catch {}
71
+ }
73
72
  const inlineSpokenMatch = trimmed.match(/"spoken"\s*:\s*"((?:[^"\\]|\\.)*)"/i);
74
73
  if (!inlineSpokenMatch) return null;
75
- try {
76
- return normalizeSpokenText(JSON.parse(`"${inlineSpokenMatch[1] ?? ""}"`)) ?? "";
77
- } catch {
78
- return null;
79
- }
74
+ const decoded = safeParseJson(`"${inlineSpokenMatch[1] ?? ""}"`);
75
+ return decoded === null ? null : normalizeSpokenText(decoded) ?? "";
80
76
  }
81
77
  function isLikelyMetaReasoningParagraph(paragraph) {
82
78
  const lower = normalizeLowercaseStringOrEmpty(paragraph);
@@ -122,7 +118,6 @@ async function generateVoiceResponse(params) {
122
118
  explicitSessionKey: sessionKey,
123
119
  coreSession: cfg.session
124
120
  });
125
- const toolsAllow = resolveAgentConfig(cfg, agentId)?.tools?.allow;
126
121
  const storePath = agentRuntime.session.resolveStorePath(cfg.session?.store, { agentId });
127
122
  try {
128
123
  return await agentRuntime.session.runWithWorkAdmission({
@@ -138,6 +133,8 @@ async function generateVoiceResponse(params) {
138
133
  sessionKey: resolvedSessionKey
139
134
  });
140
135
  const { provider, model } = resolveVoiceResponseModel({
136
+ cfg,
137
+ agentId,
141
138
  voiceConfig,
142
139
  agentRuntime
143
140
  });
@@ -245,7 +242,6 @@ async function generateVoiceResponse(params) {
245
242
  extraSystemPrompt,
246
243
  agentDir,
247
244
  senderIsOwner,
248
- toolsAllow,
249
245
  abortSignal,
250
246
  blockReplyBreak: "text_end",
251
247
  resolveReplyDelivery: async (minimumAssistantMessageIndex = 0) => deliveredEarly && minimumAssistantMessageIndex === 0 ? "pending" : "missing",