@openclaw/voice-call 2026.5.2 → 2026.5.3-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 (126) hide show
  1. package/dist/api.js +2 -0
  2. package/dist/call-status-CXldV5o8.js +32 -0
  3. package/dist/cli-metadata.js +12 -0
  4. package/dist/config-7w04YpHh.js +548 -0
  5. package/dist/config-compat-B0me39_4.js +129 -0
  6. package/dist/guarded-json-api-Btx5EE4w.js +591 -0
  7. package/dist/http-headers-BrnxBasF.js +10 -0
  8. package/dist/index.js +1284 -0
  9. package/dist/mock-CeKvfVEd.js +135 -0
  10. package/dist/plivo-B-a7KFoT.js +393 -0
  11. package/dist/realtime-handler-B63CIDP2.js +325 -0
  12. package/dist/realtime-transcription.runtime-B2h70y2W.js +2 -0
  13. package/dist/realtime-voice.runtime-Bkh4nvLn.js +2 -0
  14. package/dist/response-generator-BrcmwDZU.js +182 -0
  15. package/dist/response-model-CyF5K80p.js +12 -0
  16. package/dist/runtime-api.js +6 -0
  17. package/dist/runtime-entry-88ytYAQa.js +3119 -0
  18. package/dist/runtime-entry.js +2 -0
  19. package/dist/setup-api.js +37 -0
  20. package/dist/telnyx-jjBE8boz.js +260 -0
  21. package/dist/twilio-1OqbcXLL.js +676 -0
  22. package/dist/voice-mapping-BYDGdWGx.js +40 -0
  23. package/package.json +14 -6
  24. package/api.ts +0 -16
  25. package/cli-metadata.ts +0 -10
  26. package/config-api.ts +0 -12
  27. package/index.test.ts +0 -943
  28. package/index.ts +0 -794
  29. package/runtime-api.ts +0 -20
  30. package/runtime-entry.ts +0 -1
  31. package/setup-api.ts +0 -47
  32. package/src/allowlist.test.ts +0 -18
  33. package/src/allowlist.ts +0 -19
  34. package/src/cli.ts +0 -845
  35. package/src/config-compat.test.ts +0 -120
  36. package/src/config-compat.ts +0 -227
  37. package/src/config.test.ts +0 -479
  38. package/src/config.ts +0 -808
  39. package/src/core-bridge.ts +0 -14
  40. package/src/deep-merge.test.ts +0 -40
  41. package/src/deep-merge.ts +0 -23
  42. package/src/gateway-continue-operation.ts +0 -200
  43. package/src/http-headers.test.ts +0 -16
  44. package/src/http-headers.ts +0 -15
  45. package/src/manager/context.ts +0 -42
  46. package/src/manager/events.test.ts +0 -581
  47. package/src/manager/events.ts +0 -288
  48. package/src/manager/lifecycle.ts +0 -53
  49. package/src/manager/lookup.test.ts +0 -52
  50. package/src/manager/lookup.ts +0 -35
  51. package/src/manager/outbound.test.ts +0 -528
  52. package/src/manager/outbound.ts +0 -486
  53. package/src/manager/state.ts +0 -48
  54. package/src/manager/store.ts +0 -106
  55. package/src/manager/timers.test.ts +0 -129
  56. package/src/manager/timers.ts +0 -113
  57. package/src/manager/twiml.test.ts +0 -13
  58. package/src/manager/twiml.ts +0 -17
  59. package/src/manager.closed-loop.test.ts +0 -236
  60. package/src/manager.inbound-allowlist.test.ts +0 -188
  61. package/src/manager.notify.test.ts +0 -377
  62. package/src/manager.restore.test.ts +0 -183
  63. package/src/manager.test-harness.ts +0 -127
  64. package/src/manager.ts +0 -392
  65. package/src/media-stream.test.ts +0 -768
  66. package/src/media-stream.ts +0 -708
  67. package/src/providers/base.ts +0 -97
  68. package/src/providers/mock.test.ts +0 -78
  69. package/src/providers/mock.ts +0 -185
  70. package/src/providers/plivo.test.ts +0 -93
  71. package/src/providers/plivo.ts +0 -601
  72. package/src/providers/shared/call-status.test.ts +0 -24
  73. package/src/providers/shared/call-status.ts +0 -24
  74. package/src/providers/shared/guarded-json-api.test.ts +0 -106
  75. package/src/providers/shared/guarded-json-api.ts +0 -42
  76. package/src/providers/telnyx.test.ts +0 -340
  77. package/src/providers/telnyx.ts +0 -394
  78. package/src/providers/twilio/api.test.ts +0 -145
  79. package/src/providers/twilio/api.ts +0 -93
  80. package/src/providers/twilio/twiml-policy.test.ts +0 -84
  81. package/src/providers/twilio/twiml-policy.ts +0 -87
  82. package/src/providers/twilio/webhook.ts +0 -34
  83. package/src/providers/twilio.test.ts +0 -591
  84. package/src/providers/twilio.ts +0 -861
  85. package/src/providers/twilio.types.ts +0 -17
  86. package/src/realtime-defaults.ts +0 -3
  87. package/src/realtime-fast-context.test.ts +0 -88
  88. package/src/realtime-fast-context.ts +0 -165
  89. package/src/realtime-transcription.runtime.ts +0 -4
  90. package/src/realtime-voice.runtime.ts +0 -5
  91. package/src/response-generator.test.ts +0 -321
  92. package/src/response-generator.ts +0 -318
  93. package/src/response-model.test.ts +0 -71
  94. package/src/response-model.ts +0 -23
  95. package/src/runtime.test.ts +0 -536
  96. package/src/runtime.ts +0 -510
  97. package/src/telephony-audio.test.ts +0 -61
  98. package/src/telephony-audio.ts +0 -12
  99. package/src/telephony-tts.test.ts +0 -196
  100. package/src/telephony-tts.ts +0 -235
  101. package/src/test-fixtures.ts +0 -73
  102. package/src/tts-provider-voice.test.ts +0 -34
  103. package/src/tts-provider-voice.ts +0 -21
  104. package/src/tunnel.test.ts +0 -166
  105. package/src/tunnel.ts +0 -314
  106. package/src/types.ts +0 -291
  107. package/src/utils.test.ts +0 -17
  108. package/src/utils.ts +0 -14
  109. package/src/voice-mapping.test.ts +0 -34
  110. package/src/voice-mapping.ts +0 -68
  111. package/src/webhook/realtime-handler.test.ts +0 -598
  112. package/src/webhook/realtime-handler.ts +0 -485
  113. package/src/webhook/stale-call-reaper.test.ts +0 -88
  114. package/src/webhook/stale-call-reaper.ts +0 -38
  115. package/src/webhook/tailscale.test.ts +0 -214
  116. package/src/webhook/tailscale.ts +0 -129
  117. package/src/webhook-exposure.test.ts +0 -33
  118. package/src/webhook-exposure.ts +0 -84
  119. package/src/webhook-security.test.ts +0 -770
  120. package/src/webhook-security.ts +0 -994
  121. package/src/webhook.hangup-once.lifecycle.test.ts +0 -135
  122. package/src/webhook.test.ts +0 -1470
  123. package/src/webhook.ts +0 -908
  124. package/src/webhook.types.ts +0 -5
  125. package/src/websocket-test-support.ts +0 -72
  126. package/tsconfig.json +0 -16
@@ -0,0 +1,40 @@
1
+ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
2
+ //#region extensions/voice-call/src/voice-mapping.ts
3
+ /**
4
+ * Voice mapping and XML utilities for voice call providers.
5
+ */
6
+ /**
7
+ * Escape XML special characters for TwiML and other XML responses.
8
+ */
9
+ function escapeXml(text) {
10
+ return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
11
+ }
12
+ /**
13
+ * Map of OpenAI voice names to similar Twilio Polly voices.
14
+ */
15
+ const OPENAI_TO_POLLY_MAP = {
16
+ alloy: "Polly.Joanna",
17
+ echo: "Polly.Matthew",
18
+ fable: "Polly.Amy",
19
+ onyx: "Polly.Brian",
20
+ nova: "Polly.Salli",
21
+ shimmer: "Polly.Kimberly"
22
+ };
23
+ /**
24
+ * Default Polly voice when no mapping is found.
25
+ */
26
+ const DEFAULT_POLLY_VOICE = "Polly.Joanna";
27
+ /**
28
+ * Map OpenAI voice names to Twilio Polly equivalents.
29
+ * Falls through if already a valid Polly/Google voice.
30
+ *
31
+ * @param voice - OpenAI voice name (alloy, echo, etc.) or Polly voice name
32
+ * @returns Polly voice name suitable for Twilio TwiML
33
+ */
34
+ function mapVoiceToPolly(voice) {
35
+ if (!voice) return DEFAULT_POLLY_VOICE;
36
+ if (voice.startsWith("Polly.") || voice.startsWith("Google.")) return voice;
37
+ return OPENAI_TO_POLLY_MAP[normalizeLowercaseStringOrEmpty(voice)] || "Polly.Joanna";
38
+ }
39
+ //#endregion
40
+ export { mapVoiceToPolly as n, escapeXml as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/voice-call",
3
- "version": "2026.5.2",
3
+ "version": "2026.5.3-beta.1",
4
4
  "description": "OpenClaw voice-call plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "openclaw": "workspace:*"
18
18
  },
19
19
  "peerDependencies": {
20
- "openclaw": ">=2026.5.2"
20
+ "openclaw": ">=2026.5.3-beta.1"
21
21
  },
22
22
  "peerDependenciesMeta": {
23
23
  "openclaw": {
@@ -34,14 +34,22 @@
34
34
  "minHostVersion": ">=2026.4.10"
35
35
  },
36
36
  "compat": {
37
- "pluginApi": ">=2026.5.2"
37
+ "pluginApi": ">=2026.5.3-beta.1"
38
38
  },
39
39
  "build": {
40
- "openclawVersion": "2026.5.2"
40
+ "openclawVersion": "2026.5.3-beta.1"
41
41
  },
42
42
  "release": {
43
43
  "publishToClawHub": true,
44
44
  "publishToNpm": true
45
- }
46
- }
45
+ },
46
+ "runtimeExtensions": [
47
+ "./dist/index.js"
48
+ ]
49
+ },
50
+ "files": [
51
+ "dist/**",
52
+ "openclaw.plugin.json",
53
+ "README.md"
54
+ ]
47
55
  }
package/api.ts DELETED
@@ -1,16 +0,0 @@
1
- export {
2
- definePluginEntry,
3
- fetchWithSsrFGuard,
4
- type GatewayRequestHandlerOptions,
5
- isBlockedHostnameOrIp,
6
- isRequestBodyLimitError,
7
- type OpenClawPluginApi,
8
- readRequestBodyWithLimit,
9
- requestBodyErrorToText,
10
- type SessionEntry,
11
- sleep,
12
- TtsAutoSchema,
13
- TtsConfigSchema,
14
- TtsModeSchema,
15
- TtsProviderSchema,
16
- } from "./runtime-api.js";
package/cli-metadata.ts DELETED
@@ -1,10 +0,0 @@
1
- import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
2
-
3
- export default definePluginEntry({
4
- id: "voice-call",
5
- name: "Voice Call",
6
- description: "Voice call channel plugin",
7
- register(api) {
8
- api.registerCli(() => {}, { commands: ["voicecall"] });
9
- },
10
- });
package/config-api.ts DELETED
@@ -1,12 +0,0 @@
1
- // Narrow barrel for config compatibility helpers consumed outside the plugin.
2
- // Keep this separate from api.ts so config migration code does not pull in the
3
- // full runtime-oriented voice-call surface.
4
-
5
- export {
6
- VOICE_CALL_LEGACY_CONFIG_REMOVAL_VERSION,
7
- collectVoiceCallLegacyConfigIssues,
8
- formatVoiceCallLegacyConfigWarnings,
9
- migrateVoiceCallLegacyConfigInput,
10
- normalizeVoiceCallLegacyConfigInput,
11
- parseVoiceCallPluginConfig,
12
- } from "./src/config-compat.js";