@openclaw/voice-call 2026.7.1 → 2026.7.2-beta.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/README.md +1 -2
- package/dist/doctor-contract-api.js +34 -12
- package/dist/{guarded-json-api-CLVDU_h1.js → guarded-json-api-BKOgUU1q.js} +32 -41
- package/dist/index.js +12 -28
- package/dist/{plivo-D5wI4-pi.js → plivo-ByAIoPFp.js} +2 -2
- package/dist/{realtime-handler-Bz-MNWtD.js → realtime-handler-DJk-eYyf.js} +31 -20
- package/dist/{response-generator-D3YO-WtN.js → response-generator-Cdj8EuLg.js} +20 -4
- package/dist/{runtime-entry-DwMgbq2p.js → runtime-entry-DSgyqIwE.js} +820 -274
- package/dist/runtime-entry.js +1 -1
- package/dist/setup-api.js +86 -2
- package/dist/{store-DtewuuOb.js → store-path-nYL-yM0S.js} +12 -5
- package/dist/{telnyx-DksS6q0n.js → telnyx-DMbLYwj4.js} +1 -1
- package/dist/{twilio-BYcsdUkj.js → twilio-BTKKlkLT.js} +7 -10
- package/dist/twilio-region-4fkgz3UG.js +25 -0
- package/npm-shrinkwrap.json +3 -13
- package/openclaw.plugin.json +1 -0
- package/package.json +4 -6
- package/dist/config-CDSeuGp3.js +0 -674
- package/dist/config-compat-D8fcjOHp.js +0 -156
- package/node_modules/commander/LICENSE +0 -22
- package/node_modules/commander/Readme.md +0 -1172
- package/node_modules/commander/index.js +0 -21
- package/node_modules/commander/lib/argument.js +0 -147
- package/node_modules/commander/lib/command.js +0 -2790
- package/node_modules/commander/lib/error.js +0 -36
- package/node_modules/commander/lib/help.js +0 -731
- package/node_modules/commander/lib/option.js +0 -377
- package/node_modules/commander/lib/suggestSimilar.js +0 -99
- package/node_modules/commander/package-support.json +0 -19
- package/node_modules/commander/package.json +0 -64
- package/node_modules/commander/typings/index.d.ts +0 -1113
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { t as VoiceCallConfigSchema } from "./config-CDSeuGp3.js";
|
|
2
|
-
import { asOptionalRecord, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
//#region extensions/voice-call/src/config-compat.ts
|
|
4
|
-
/** Version where legacy voice-call config shape support is removed. */
|
|
5
|
-
const VOICE_CALL_LEGACY_CONFIG_REMOVAL_VERSION = "2026.6.0";
|
|
6
|
-
const asObject = asOptionalRecord;
|
|
7
|
-
const getString = readStringField;
|
|
8
|
-
/** Read finite numeric config values. */
|
|
9
|
-
function getNumber(obj, key) {
|
|
10
|
-
const value = obj?.[key];
|
|
11
|
-
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
12
|
-
}
|
|
13
|
-
/** Merge legacy provider-specific values into the canonical providers map. */
|
|
14
|
-
function mergeProviderConfig(providersValue, providerId, compatValues) {
|
|
15
|
-
if (Object.keys(compatValues).length === 0) return asObject(providersValue);
|
|
16
|
-
const providers = asObject(providersValue) ?? {};
|
|
17
|
-
const existing = asObject(providers[providerId]) ?? {};
|
|
18
|
-
return {
|
|
19
|
-
...providers,
|
|
20
|
-
[providerId]: {
|
|
21
|
-
...existing,
|
|
22
|
-
...compatValues
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/** Collect legacy voice-call config keys that should be migrated. */
|
|
27
|
-
function collectVoiceCallLegacyConfigIssues(value) {
|
|
28
|
-
const raw = asObject(value) ?? {};
|
|
29
|
-
const realtime = asObject(raw.realtime);
|
|
30
|
-
const realtimeAgentContext = asObject(realtime?.agentContext);
|
|
31
|
-
const twilio = asObject(raw.twilio);
|
|
32
|
-
const streaming = asObject(raw.streaming);
|
|
33
|
-
const issues = [];
|
|
34
|
-
if (raw.provider === "log") issues.push({
|
|
35
|
-
path: "provider",
|
|
36
|
-
replacement: "provider",
|
|
37
|
-
message: "Replace provider \"log\" with \"mock\"."
|
|
38
|
-
});
|
|
39
|
-
if (typeof twilio?.from === "string") issues.push({
|
|
40
|
-
path: "twilio.from",
|
|
41
|
-
replacement: "fromNumber",
|
|
42
|
-
message: "Move twilio.from to fromNumber."
|
|
43
|
-
});
|
|
44
|
-
if (typeof streaming?.sttProvider === "string") issues.push({
|
|
45
|
-
path: "streaming.sttProvider",
|
|
46
|
-
replacement: "streaming.provider",
|
|
47
|
-
message: "Move streaming.sttProvider to streaming.provider."
|
|
48
|
-
});
|
|
49
|
-
if (typeof streaming?.openaiApiKey === "string") issues.push({
|
|
50
|
-
path: "streaming.openaiApiKey",
|
|
51
|
-
replacement: "streaming.providers.openai.apiKey",
|
|
52
|
-
message: "Move streaming.openaiApiKey to streaming.providers.openai.apiKey."
|
|
53
|
-
});
|
|
54
|
-
if (typeof streaming?.sttModel === "string") issues.push({
|
|
55
|
-
path: "streaming.sttModel",
|
|
56
|
-
replacement: "streaming.providers.openai.model",
|
|
57
|
-
message: "Move streaming.sttModel to streaming.providers.openai.model."
|
|
58
|
-
});
|
|
59
|
-
if (typeof streaming?.silenceDurationMs === "number") issues.push({
|
|
60
|
-
path: "streaming.silenceDurationMs",
|
|
61
|
-
replacement: "streaming.providers.openai.silenceDurationMs",
|
|
62
|
-
message: "Move streaming.silenceDurationMs to streaming.providers.openai.silenceDurationMs."
|
|
63
|
-
});
|
|
64
|
-
if (typeof streaming?.vadThreshold === "number") issues.push({
|
|
65
|
-
path: "streaming.vadThreshold",
|
|
66
|
-
replacement: "streaming.providers.openai.vadThreshold",
|
|
67
|
-
message: "Move streaming.vadThreshold to streaming.providers.openai.vadThreshold."
|
|
68
|
-
});
|
|
69
|
-
if (realtimeAgentContext && Object.hasOwn(realtimeAgentContext, "includeSystemPrompt")) issues.push({
|
|
70
|
-
path: "realtime.agentContext.includeSystemPrompt",
|
|
71
|
-
replacement: "realtime.agentContext",
|
|
72
|
-
message: "Remove realtime.agentContext.includeSystemPrompt; realtime context now uses the generated agent prompt."
|
|
73
|
-
});
|
|
74
|
-
return issues;
|
|
75
|
-
}
|
|
76
|
-
/** Format runtime warnings for legacy voice-call config keys. */
|
|
77
|
-
function formatVoiceCallLegacyConfigWarnings(params) {
|
|
78
|
-
const issues = collectVoiceCallLegacyConfigIssues(params.value);
|
|
79
|
-
if (issues.length === 0) return [];
|
|
80
|
-
return [`[voice-call] legacy config keys detected under ${params.configPathPrefix}; runtime loading will not rewrite them, and support for the legacy shape will be removed in ${VOICE_CALL_LEGACY_CONFIG_REMOVAL_VERSION}. Run "${params.doctorFixCommand}".`, ...issues.map((issue) => `[voice-call] ${params.configPathPrefix}.${issue.path}: ${issue.message}`)];
|
|
81
|
-
}
|
|
82
|
-
/** Migrate legacy voice-call config input to the current canonical shape. */
|
|
83
|
-
function migrateVoiceCallLegacyConfigInput(params) {
|
|
84
|
-
const raw = asObject(params.value) ?? {};
|
|
85
|
-
const realtime = asObject(raw.realtime);
|
|
86
|
-
const realtimeAgentContext = asObject(realtime?.agentContext);
|
|
87
|
-
const twilio = asObject(raw.twilio);
|
|
88
|
-
const streaming = asObject(raw.streaming);
|
|
89
|
-
const configPathPrefix = params.configPathPrefix ?? "plugins.entries.voice-call.config";
|
|
90
|
-
const issues = collectVoiceCallLegacyConfigIssues(raw);
|
|
91
|
-
const legacyStreamingOpenAICompat = {};
|
|
92
|
-
const streamingOpenAIApiKey = getString(streaming, "openaiApiKey");
|
|
93
|
-
if (streamingOpenAIApiKey) legacyStreamingOpenAICompat.apiKey = streamingOpenAIApiKey;
|
|
94
|
-
const streamingSttModel = getString(streaming, "sttModel");
|
|
95
|
-
if (streamingSttModel) legacyStreamingOpenAICompat.model = streamingSttModel;
|
|
96
|
-
const streamingSilenceDurationMs = getNumber(streaming, "silenceDurationMs");
|
|
97
|
-
if (streamingSilenceDurationMs !== void 0) legacyStreamingOpenAICompat.silenceDurationMs = streamingSilenceDurationMs;
|
|
98
|
-
const streamingVadThreshold = getNumber(streaming, "vadThreshold");
|
|
99
|
-
if (streamingVadThreshold !== void 0) legacyStreamingOpenAICompat.vadThreshold = streamingVadThreshold;
|
|
100
|
-
const streamingProvider = getString(streaming, "provider");
|
|
101
|
-
const legacyStreamingProvider = getString(streaming, "sttProvider");
|
|
102
|
-
const normalizedStreaming = streaming ? {
|
|
103
|
-
...streaming,
|
|
104
|
-
provider: streamingProvider ?? legacyStreamingProvider,
|
|
105
|
-
providers: mergeProviderConfig(streaming.providers, "openai", legacyStreamingOpenAICompat)
|
|
106
|
-
} : void 0;
|
|
107
|
-
if (normalizedStreaming) {
|
|
108
|
-
delete normalizedStreaming.sttProvider;
|
|
109
|
-
delete normalizedStreaming.openaiApiKey;
|
|
110
|
-
delete normalizedStreaming.sttModel;
|
|
111
|
-
delete normalizedStreaming.silenceDurationMs;
|
|
112
|
-
delete normalizedStreaming.vadThreshold;
|
|
113
|
-
}
|
|
114
|
-
const normalizedTwilio = twilio ? { ...twilio } : void 0;
|
|
115
|
-
if (normalizedTwilio) delete normalizedTwilio.from;
|
|
116
|
-
const normalizedRealtimeAgentContext = realtimeAgentContext ? { ...realtimeAgentContext } : void 0;
|
|
117
|
-
if (normalizedRealtimeAgentContext) delete normalizedRealtimeAgentContext.includeSystemPrompt;
|
|
118
|
-
const normalizedRealtime = realtime ? {
|
|
119
|
-
...realtime,
|
|
120
|
-
agentContext: normalizedRealtimeAgentContext ?? realtime.agentContext
|
|
121
|
-
} : void 0;
|
|
122
|
-
const config = {
|
|
123
|
-
...raw,
|
|
124
|
-
provider: raw.provider === "log" ? "mock" : raw.provider,
|
|
125
|
-
fromNumber: raw.fromNumber ?? (typeof twilio?.from === "string" ? twilio.from : void 0),
|
|
126
|
-
twilio: normalizedTwilio,
|
|
127
|
-
streaming: normalizedStreaming,
|
|
128
|
-
realtime: normalizedRealtime
|
|
129
|
-
};
|
|
130
|
-
const changes = [];
|
|
131
|
-
if (raw.provider === "log") changes.push(`Moved ${configPathPrefix}.provider "log" → "mock".`);
|
|
132
|
-
if (typeof twilio?.from === "string" && typeof raw.fromNumber !== "string") changes.push(`Moved ${configPathPrefix}.twilio.from → ${configPathPrefix}.fromNumber.`);
|
|
133
|
-
if (typeof streaming?.sttProvider === "string") changes.push(`Moved ${configPathPrefix}.streaming.sttProvider → ${configPathPrefix}.streaming.provider.`);
|
|
134
|
-
if (typeof streaming?.openaiApiKey === "string") changes.push(`Moved ${configPathPrefix}.streaming.openaiApiKey → ${configPathPrefix}.streaming.providers.openai.apiKey.`);
|
|
135
|
-
if (typeof streaming?.sttModel === "string") changes.push(`Moved ${configPathPrefix}.streaming.sttModel → ${configPathPrefix}.streaming.providers.openai.model.`);
|
|
136
|
-
if (getNumber(streaming, "silenceDurationMs") !== void 0) changes.push(`Moved ${configPathPrefix}.streaming.silenceDurationMs → ${configPathPrefix}.streaming.providers.openai.silenceDurationMs.`);
|
|
137
|
-
else if (typeof streaming?.silenceDurationMs === "number") changes.push(`Removed invalid ${configPathPrefix}.streaming.silenceDurationMs.`);
|
|
138
|
-
if (getNumber(streaming, "vadThreshold") !== void 0) changes.push(`Moved ${configPathPrefix}.streaming.vadThreshold → ${configPathPrefix}.streaming.providers.openai.vadThreshold.`);
|
|
139
|
-
else if (typeof streaming?.vadThreshold === "number") changes.push(`Removed invalid ${configPathPrefix}.streaming.vadThreshold.`);
|
|
140
|
-
if (realtimeAgentContext && Object.hasOwn(realtimeAgentContext, "includeSystemPrompt")) changes.push(`Removed ${configPathPrefix}.realtime.agentContext.includeSystemPrompt.`);
|
|
141
|
-
return {
|
|
142
|
-
config,
|
|
143
|
-
changes,
|
|
144
|
-
issues
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
/** Normalize legacy voice-call config input without returning migration metadata. */
|
|
148
|
-
function normalizeVoiceCallLegacyConfigInput(value) {
|
|
149
|
-
return migrateVoiceCallLegacyConfigInput({ value }).config;
|
|
150
|
-
}
|
|
151
|
-
/** Parse voice-call plugin config after applying legacy normalization. */
|
|
152
|
-
function parseVoiceCallPluginConfig(value) {
|
|
153
|
-
return VoiceCallConfigSchema.parse(normalizeVoiceCallLegacyConfigInput(value));
|
|
154
|
-
}
|
|
155
|
-
//#endregion
|
|
156
|
-
export { parseVoiceCallPluginConfig as i, migrateVoiceCallLegacyConfigInput as n, normalizeVoiceCallLegacyConfigInput as r, formatVoiceCallLegacyConfigWarnings as t };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
'Software'), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|