@openclaw/voice-call 2026.5.9-beta.1 → 2026.5.10-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/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { definePluginEntry, sleep } from "./runtime-api.js";
2
2
  import "./api.js";
3
3
  import { i as resolveVoiceCallConfig, s as validateProviderConfig } from "./config-D1yqfwMq.js";
4
- import { a as setupTailscaleExposureRoute, i as getTailscaleSelfInfo, n as resolveWebhookExposureStatus, r as cleanupTailscaleExposureRoute, s as resolveUserPath, t as createVoiceCallRuntime } from "./runtime-entry-VXl0_xKZ.js";
4
+ import { a as setupTailscaleExposureRoute, i as getTailscaleSelfInfo, n as resolveWebhookExposureStatus, r as cleanupTailscaleExposureRoute, s as resolveUserPath, t as createVoiceCallRuntime } from "./runtime-entry-DNd6gGW5.js";
5
5
  import { i as parseVoiceCallPluginConfig, r as normalizeVoiceCallLegacyConfigInput, t as formatVoiceCallLegacyConfigWarnings } from "./config-compat-DphZfbFl.js";
6
6
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { ErrorCodes, callGatewayFromCli, errorShape } from "openclaw/plugin-sdk/gateway-runtime";
@@ -277,13 +277,14 @@ function appendRecentTalkEventMetadata(call, event) {
277
277
  call.metadata = metadata;
278
278
  }
279
279
  var RealtimeCallHandler = class {
280
- constructor(config, manager, provider, realtimeProvider, providerConfig, servePath) {
280
+ constructor(config, manager, provider, realtimeProvider, providerConfig, servePath, coreConfig) {
281
281
  this.config = config;
282
282
  this.manager = manager;
283
283
  this.provider = provider;
284
284
  this.realtimeProvider = realtimeProvider;
285
285
  this.providerConfig = providerConfig;
286
286
  this.servePath = servePath;
287
+ this.coreConfig = coreConfig;
287
288
  this.toolHandlers = /* @__PURE__ */ new Map();
288
289
  this.pendingStreamTokens = /* @__PURE__ */ new Map();
289
290
  this.activeBridgesByCallId = /* @__PURE__ */ new Map();
@@ -533,6 +534,7 @@ var RealtimeCallHandler = class {
533
534
  const speechDetector = new RealtimeMulawSpeechStartDetector({ requiredLoudChunks: BARGE_IN_REQUIRED_LOUD_CHUNKS });
534
535
  const session = createRealtimeVoiceBridgeSession({
535
536
  provider: this.realtimeProvider,
537
+ cfg: this.coreConfig,
536
538
  providerConfig: this.providerConfig,
537
539
  instructions: this.config.instructions,
538
540
  tools: this.config.tools,
@@ -8,6 +8,21 @@ import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-sess
8
8
  * Voice call response generator - uses the embedded Pi agent for tool support.
9
9
  * Routes voice responses through the same agent infrastructure as messaging.
10
10
  */
11
+ function isRecord$1(value) {
12
+ return typeof value === "object" && value !== null && !Array.isArray(value);
13
+ }
14
+ function readExplicitToolsAllow(value) {
15
+ if (!isRecord$1(value)) return;
16
+ const allow = value.allow;
17
+ if (!Array.isArray(allow)) return;
18
+ return allow.filter((entry) => typeof entry === "string");
19
+ }
20
+ function resolveVoiceAgentToolsAllow(config, agentId) {
21
+ const agents = isRecord$1(config.agents) ? config.agents : void 0;
22
+ const agent = (Array.isArray(agents?.list) ? agents.list : []).find((entry) => isRecord$1(entry) && entry.id === agentId);
23
+ if (!isRecord$1(agent)) return;
24
+ return readExplicitToolsAllow(isRecord$1(agent.tools) ? agent.tools : void 0);
25
+ }
11
26
  const VOICE_SPOKEN_OUTPUT_CONTRACT = [
12
27
  "Output format requirements:",
13
28
  "- Return only valid JSON in this exact shape: {\"spoken\":\"...\"}",
@@ -97,6 +112,7 @@ async function generateVoiceResponse(params) {
97
112
  explicitSessionKey: sessionKey
98
113
  });
99
114
  const agentId = voiceConfig.agentId ?? "main";
115
+ const toolsAllow = resolveVoiceAgentToolsAllow(cfg, agentId);
100
116
  const storePath = agentRuntime.session.resolveStorePath(cfg.session?.store, { agentId });
101
117
  const agentDir = agentRuntime.resolveAgentDir(cfg, agentId);
102
118
  const workspaceDir = agentRuntime.resolveAgentWorkspaceDir(cfg, agentId);
@@ -162,7 +178,8 @@ async function generateVoiceResponse(params) {
162
178
  runId,
163
179
  lane: "voice",
164
180
  extraSystemPrompt,
165
- agentDir
181
+ agentDir,
182
+ toolsAllow
166
183
  });
167
184
  const text = extractSpokenTextFromPayloads(result.payloads ?? []);
168
185
  if (!text && result.meta?.aborted) return {
@@ -1899,6 +1899,7 @@ var MediaStreamHandler = class {
1899
1899
  streamSid,
1900
1900
  ws,
1901
1901
  sttSession: this.config.transcriptionProvider.createSession({
1902
+ cfg: this.config.cfg,
1902
1903
  providerConfig: this.config.providerConfig,
1903
1904
  onPartial: (partial) => {
1904
1905
  const session = this.sessions.get(streamSid);
@@ -2393,7 +2394,7 @@ function loadRealtimeTranscriptionRuntime() {
2393
2394
  return realtimeTranscriptionRuntimePromise;
2394
2395
  }
2395
2396
  function loadResponseGeneratorModule() {
2396
- responseGeneratorModulePromise ??= import("./response-generator-WvI4YRlo.js");
2397
+ responseGeneratorModulePromise ??= import("./response-generator-BI1iXxVR.js");
2397
2398
  return responseGeneratorModulePromise;
2398
2399
  }
2399
2400
  function sanitizeTranscriptForLog(value) {
@@ -2568,6 +2569,7 @@ var VoiceCallWebhookServer = class {
2568
2569
  const streamConfig = {
2569
2570
  transcriptionProvider: resolution.provider,
2570
2571
  providerConfig: resolution.providerConfig,
2572
+ cfg: this.fullConfig ?? this.coreConfig ?? void 0,
2571
2573
  preStartTimeoutMs: streaming.preStartTimeoutMs,
2572
2574
  maxPendingConnections: streaming.maxPendingConnections,
2573
2575
  maxPendingConnectionsPerIp: streaming.maxPendingConnectionsPerIp,
@@ -3029,7 +3031,7 @@ function loadRealtimeVoiceRuntime() {
3029
3031
  return realtimeVoiceRuntimePromise;
3030
3032
  }
3031
3033
  function loadRealtimeHandler() {
3032
- realtimeHandlerPromise ??= import("./realtime-handler-CVtmnjtU.js");
3034
+ realtimeHandlerPromise ??= import("./realtime-handler-B_aqJXZj.js");
3033
3035
  return realtimeHandlerPromise;
3034
3036
  }
3035
3037
  function resolveVoiceCallConsultSessionKey(call) {
@@ -3167,7 +3169,7 @@ async function createVoiceCallRuntime(params) {
3167
3169
  ...config.realtime,
3168
3170
  instructions: realtimeInstructions,
3169
3171
  tools: resolveRealtimeVoiceAgentConsultTools(config.realtime.toolPolicy, config.realtime.tools)
3170
- }, manager, provider, realtimeProvider.provider, realtimeProvider.providerConfig, config.serve.path);
3172
+ }, manager, provider, realtimeProvider.provider, realtimeProvider.providerConfig, config.serve.path, cfg);
3171
3173
  if (config.realtime.toolPolicy !== "none") realtimeHandler.registerToolHandler(REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME, async (args, callId, handlerContext) => {
3172
3174
  const call = manager.getCall(callId);
3173
3175
  if (!call) return { error: `Call "${callId}" not found` };
@@ -1,2 +1,2 @@
1
- import { t as createVoiceCallRuntime } from "./runtime-entry-VXl0_xKZ.js";
1
+ import { t as createVoiceCallRuntime } from "./runtime-entry-DNd6gGW5.js";
2
2
  export { createVoiceCallRuntime };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/voice-call",
3
- "version": "2026.5.9-beta.1",
3
+ "version": "2026.5.10-beta.2",
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.9-beta.1"
20
+ "openclaw": ">=2026.5.10-beta.2"
21
21
  },
22
22
  "peerDependenciesMeta": {
23
23
  "openclaw": {
@@ -34,10 +34,10 @@
34
34
  "minHostVersion": ">=2026.4.10"
35
35
  },
36
36
  "compat": {
37
- "pluginApi": ">=2026.5.9-beta.1"
37
+ "pluginApi": ">=2026.5.10-beta.2"
38
38
  },
39
39
  "build": {
40
- "openclawVersion": "2026.5.9-beta.1"
40
+ "openclawVersion": "2026.5.10-beta.2"
41
41
  },
42
42
  "release": {
43
43
  "publishToClawHub": true,