@lawpath-tech/openclaw 2026.2.21-20 → 2026.2.21-21
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/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/plugin-sdk/{accounts-DUBJHEgi.js → accounts-BcQo4OUu.js} +1 -1
- package/dist/plugin-sdk/{accounts-wSu5JyDM.js → accounts-DEsAwvaZ.js} +1 -1
- package/dist/plugin-sdk/{accounts-Ciwy7Yxd.js → accounts-fnLsjAOi.js} +3 -3
- package/dist/plugin-sdk/{active-listener-Bnau4oiu.js → active-listener-CeaKSm29.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-cT7IxdHY.js → agent-scope-D5PlT0Z0.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-ElOMCP9r.js → api-key-rotation-B3O1qn0m.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-DtozH3sJ.js → audio-preflight-CYSy3uuZ.js} +24 -24
- package/dist/plugin-sdk/{bindings-CKqdifyU.js → bindings-C0XEX0yK.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-CCnr-9bS.js → channel-activity-WgE8Z4Bb.js} +1 -1
- package/dist/plugin-sdk/{channel-web-BHNS_E7F.js → channel-web-Nw-bUgtV.js} +22 -22
- package/dist/plugin-sdk/{chrome-BO7SUTgY.js → chrome-C1xnOQsc.js} +3 -3
- package/dist/plugin-sdk/{chunk-DyzO7IVo.js → chunk-CQk9vawA.js} +1 -1
- package/dist/plugin-sdk/{command-format-DcBXOX9Z.js → command-format-DHXa0Clc.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-BsSKPwgj.js → commands-registry-yTZdwtLj.js} +4 -4
- package/dist/plugin-sdk/{config-9OZuRn0C.js → config--kW4R0el.js} +9 -9
- package/dist/plugin-sdk/{deliver-BO_wt0wd.js → deliver-C2gjA_UH.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-DKyVS3IK.js → diagnostic-Up1aMyxZ.js} +1 -1
- package/dist/plugin-sdk/{image-C31B_R8P.js → image-Bcc99tVA.js} +4 -4
- package/dist/plugin-sdk/{image-ops-B8aJIly2.js → image-ops-C6RLbtSJ.js} +1 -1
- package/dist/plugin-sdk/index.js +53 -53
- package/dist/plugin-sdk/{ir-CD5VqKGg.js → ir-Cwi1KVG5.js} +4 -4
- package/dist/plugin-sdk/{local-roots-D4PCK2jj.js → local-roots-6BSl8AoA.js} +3 -3
- package/dist/plugin-sdk/{login-CW17h3xU.js → login-Cau5eVVj.js} +7 -7
- package/dist/plugin-sdk/{login-qr-CMdk06CS.js → login-qr-CLWtfA9m.js} +9 -9
- package/dist/plugin-sdk/{manager-CZPPxI6R.js → manager-C3Eb_8Hz.js} +8 -8
- package/dist/plugin-sdk/{manifest-registry-sgHvjA6E.js → manifest-registry-DvEm2HHf.js} +1 -1
- package/dist/plugin-sdk/{markdown-tables-Bo-r4msS.js → markdown-tables-cJqvQe9j.js} +1 -1
- package/dist/plugin-sdk/{message-channel-DmB4bGFh.js → message-channel-DY9wVB2A.js} +1 -1
- package/dist/plugin-sdk/{model-selection-CXooYLb2.js → model-selection-BjVTBZiY.js} +4 -4
- package/dist/plugin-sdk/{outbound-dAcQHyyr.js → outbound-Co1QSkdS.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-CCxMtk8m.js → outbound-attachment-CsmRyZPI.js} +2 -2
- package/dist/plugin-sdk/{pi-auth-json-C-euHc3x.js → pi-auth-json-DfEOhoTK.js} +5 -5
- package/dist/plugin-sdk/{pi-embedded-helpers-DU0nLxRU.js → pi-embedded-helpers-D3EACnFn.js} +17 -17
- package/dist/plugin-sdk/{plugins-DIzw7Ncy.js → plugins-Dyz98ZJX.js} +4 -4
- package/dist/plugin-sdk/{pw-ai-CYmDAwXD.js → pw-ai-smoXiGqZ.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-DQiT4WTr.js → qmd-manager-CUhJ7WG2.js} +4 -4
- package/dist/plugin-sdk/{registry-O1yza0Vh.js → registry-DL-33c9X.js} +2 -2
- package/dist/plugin-sdk/{replies-Bnu7HnvW.js → replies-Bkaifx0j.js} +3 -3
- package/dist/plugin-sdk/{reply-DEepmBkT.js → reply-Cb54ddUA.js} +78 -78
- package/dist/plugin-sdk/{reply-prefix-BF0omhZE.js → reply-prefix-5vdbga0R.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-DzZIT1V1.js → resolve-outbound-target-CP7QDN14.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-B63ztF-V.js → resolve-route-eopifBrM.js} +3 -3
- package/dist/plugin-sdk/{retry-JFNwfUew.js → retry-5P3d0rYw.js} +1 -1
- package/dist/plugin-sdk/{runner-DztRiWhh.js → runner-DqwPn56n.js} +9 -9
- package/dist/plugin-sdk/{send-DEV4iiFj.js → send-C2NQjVF9.js} +10 -10
- package/dist/plugin-sdk/{send-D-spKwjf.js → send-D_X6p9H0.js} +10 -10
- package/dist/plugin-sdk/{send-CK3DCPv-.js → send-DnFB-v5n.js} +6 -6
- package/dist/plugin-sdk/{send-D1C2sJG1.js → send-PPtjKj-0.js} +7 -7
- package/dist/plugin-sdk/{send-DrYvH25B.js → send-_uj_NuFI.js} +6 -6
- package/dist/plugin-sdk/{session-DRJl5tKC.js → session-CZngPTYk.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-Dv5AeOZQ.js → skill-commands-Cr54qPdy.js} +5 -5
- package/dist/plugin-sdk/{skills-5hEda4_Y.js → skills-Dcu4o-9l.js} +7 -7
- package/dist/plugin-sdk/{sqlite-DUu0dwic.js → sqlite-ulpcowfN.js} +1 -1
- package/dist/plugin-sdk/{store-DoRXD0QB.js → store-EUYCRBvs.js} +2 -2
- package/dist/plugin-sdk/{subsystem-C4Rh0kdL.js → subsystem-C9WnrKN8.js} +1 -1
- package/dist/plugin-sdk/{tables-C_81Ve2l.js → tables-CMdQECje.js} +1 -1
- package/dist/plugin-sdk/{target-errors-C638yp2-.js → target-errors-CrR2lAF7.js} +2 -2
- package/dist/plugin-sdk/{thinking-DexKPSsI.js → thinking-C7zYA2s9.js} +5 -5
- package/dist/plugin-sdk/{tokens-K9ITCatc.js → tokens-2475WU2Z.js} +1 -1
- package/dist/plugin-sdk/{tool-images-BvjD_HnR.js → tool-images-DCvC8yL7.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-BBRtoox8.js → tool-loop-detection-D0ADW0h2.js} +2 -2
- package/dist/plugin-sdk/web-BVkjyY4A.js +65 -0
- package/dist/plugin-sdk/{whatsapp-actions-D8i2vCxS.js → whatsapp-actions-DC4RRNqv.js} +21 -21
- package/extensions/voice-call/package.json +2 -0
- package/extensions/voice-call/src/config.ts +16 -3
- package/extensions/voice-call/src/providers/realtime-session.ts +210 -0
- package/extensions/voice-call/src/webhook.ts +174 -8
- package/package.json +1 -1
- package/dist/plugin-sdk/web-DBo-6RyH.js +0 -65
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { n as fetchWithTimeout } from "./fetch-timeout-ChYuW7LE.js";
|
|
3
3
|
import { t as resolveFetch } from "./fetch-b2Zm8y7X.js";
|
|
4
|
-
import { n as loadConfig } from "./config
|
|
5
|
-
import { v as mediaKindFromMime } from "./image-ops-
|
|
6
|
-
import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
7
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
8
|
-
import { i as resolveSignalAccount } from "./accounts-
|
|
9
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
4
|
+
import { n as loadConfig } from "./config--kW4R0el.js";
|
|
5
|
+
import { v as mediaKindFromMime } from "./image-ops-C6RLbtSJ.js";
|
|
6
|
+
import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-Cwi1KVG5.js";
|
|
7
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-cJqvQe9j.js";
|
|
8
|
+
import { i as resolveSignalAccount } from "./accounts-BcQo4OUu.js";
|
|
9
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-CsmRyZPI.js";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
|
|
12
12
|
//#region src/signal/client.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as readCredsJsonRaw, h as resolveWebCredsPath, l as maybeRestoreCredsFromBackup, m as resolveWebCredsBackupPath, p as resolveDefaultWebAuthDir } from "./accounts-
|
|
2
|
-
import { P as resolveUserPath, U as danger, X as success, at as toPinoLikeLogger, tt as getChildLogger, w as ensureDir } from "./registry-
|
|
3
|
-
import { Z as VERSION } from "./config
|
|
4
|
-
import { t as formatCliCommand } from "./command-format-
|
|
1
|
+
import { d as readCredsJsonRaw, h as resolveWebCredsPath, l as maybeRestoreCredsFromBackup, m as resolveWebCredsBackupPath, p as resolveDefaultWebAuthDir } from "./accounts-fnLsjAOi.js";
|
|
2
|
+
import { P as resolveUserPath, U as danger, X as success, at as toPinoLikeLogger, tt as getChildLogger, w as ensureDir } from "./registry-DL-33c9X.js";
|
|
3
|
+
import { Z as VERSION } from "./config--kW4R0el.js";
|
|
4
|
+
import { t as formatCliCommand } from "./command-format-DHXa0Clc.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { s as resolveStateDir } from "./paths-DVWx7USN.js";
|
|
3
|
-
import { P as resolveUserPath, b as CONFIG_DIR } from "./registry-
|
|
4
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
5
|
-
import { s as resolveAgentWorkspaceDir, t as listAgentIds } from "./agent-scope-
|
|
6
|
-
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-
|
|
7
|
-
import { i as listChatCommands } from "./commands-registry-
|
|
3
|
+
import { P as resolveUserPath, b as CONFIG_DIR } from "./registry-DL-33c9X.js";
|
|
4
|
+
import { t as createSubsystemLogger } from "./subsystem-C9WnrKN8.js";
|
|
5
|
+
import { s as resolveAgentWorkspaceDir, t as listAgentIds } from "./agent-scope-D5PlT0Z0.js";
|
|
6
|
+
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-Dcu4o-9l.js";
|
|
7
|
+
import { i as listChatCommands } from "./commands-registry-yTZdwtLj.js";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import os from "node:os";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as resolveUserPath, b as CONFIG_DIR } from "./registry-
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { i as parseBooleanValue } from "./command-format-
|
|
4
|
-
import { M as normalizeSkillFilter, w as resolveOpenClawPackageRootSync } from "./agent-scope-
|
|
5
|
-
import { a as LEGACY_MANIFEST_KEYS, c as normalizePluginsConfig, l as resolveEnableState, o as MANIFEST_KEY, p as isDangerousHostEnvVarName, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-
|
|
1
|
+
import { P as resolveUserPath, b as CONFIG_DIR } from "./registry-DL-33c9X.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-C9WnrKN8.js";
|
|
3
|
+
import { i as parseBooleanValue } from "./command-format-DHXa0Clc.js";
|
|
4
|
+
import { M as normalizeSkillFilter, w as resolveOpenClawPackageRootSync } from "./agent-scope-D5PlT0Z0.js";
|
|
5
|
+
import { a as LEGACY_MANIFEST_KEYS, c as normalizePluginsConfig, l as resolveEnableState, o as MANIFEST_KEY, p as isDangerousHostEnvVarName, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-DvEm2HHf.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import os from "node:os";
|
|
9
|
-
import
|
|
9
|
+
import json5 from "json5";
|
|
10
10
|
import { createHash, timingSafeEqual } from "node:crypto";
|
|
11
11
|
import fs$1 from "node:fs/promises";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
@@ -226,7 +226,7 @@ function resolveOpenClawManifestBlock(params) {
|
|
|
226
226
|
const raw = getFrontmatterString(params.frontmatter, params.key ?? "metadata");
|
|
227
227
|
if (!raw) return;
|
|
228
228
|
try {
|
|
229
|
-
const parsed =
|
|
229
|
+
const parsed = json5.parse(raw);
|
|
230
230
|
if (!parsed || typeof parsed !== "object") return;
|
|
231
231
|
const manifestKeys = [MANIFEST_KEY, ...LEGACY_MANIFEST_KEYS];
|
|
232
232
|
for (const key of manifestKeys) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-C9WnrKN8.js";
|
|
2
2
|
import { t as redactSensitiveText } from "./redact-DPnDWsnT.js";
|
|
3
3
|
import { o as resolveSessionTranscriptsDirForAgent } from "./paths-BNQjLbn7.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as resolveConfigDir } from "./registry-
|
|
2
|
-
import { c as detectMime, l as extensionForMime } from "./image-ops-
|
|
1
|
+
import { M as resolveConfigDir } from "./registry-DL-33c9X.js";
|
|
2
|
+
import { c as detectMime, l as extensionForMime } from "./image-ops-C6RLbtSJ.js";
|
|
3
3
|
import { createWriteStream } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import crypto from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as isVerbose, ct as normalizeLogLevel, lt as readLoggingConfig, n as CHAT_CHANNEL_ORDER, ot as loggingState, rt as isFileLogLevelEnabled, st as levelToMinLevel, tt as getChildLogger } from "./registry-
|
|
1
|
+
import { G as isVerbose, ct as normalizeLogLevel, lt as readLoggingConfig, n as CHAT_CHANNEL_ORDER, ot as loggingState, rt as isFileLogLevelEnabled, st as levelToMinLevel, tt as getChildLogger } from "./registry-DL-33c9X.js";
|
|
2
2
|
import { Chalk } from "chalk";
|
|
3
3
|
|
|
4
4
|
//#region src/terminal/progress-line.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as detectMime } from "./image-ops-
|
|
2
|
-
import { r as sanitizeToolResultImages } from "./tool-images-
|
|
1
|
+
import { c as detectMime } from "./image-ops-C6RLbtSJ.js";
|
|
2
|
+
import { r as sanitizeToolResultImages } from "./tool-images-DCvC8yL7.js";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
|
|
5
5
|
//#region src/agents/tools/common.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { p as normalizeAccountId } from "./session-key-C_0eELjb.js";
|
|
2
|
-
import { r as resolveWhatsAppAccount } from "./accounts-
|
|
3
|
-
import { D as resolveSlackAccount, F as resolveDiscordAccount, O as resolveSlackReplyToMode, S as resolveTelegramAccount, _ as normalizeWhatsAppTarget } from "./plugins-
|
|
4
|
-
import { A as normalizeE164, T as escapeRegExp, i as getChatChannelMeta, l as requireActivePluginRegistry, n as CHAT_CHANNEL_ORDER } from "./registry-
|
|
5
|
-
import { r as resolveIMessageAccount } from "./accounts-
|
|
6
|
-
import { i as resolveSignalAccount } from "./accounts-
|
|
2
|
+
import { r as resolveWhatsAppAccount } from "./accounts-fnLsjAOi.js";
|
|
3
|
+
import { D as resolveSlackAccount, F as resolveDiscordAccount, O as resolveSlackReplyToMode, S as resolveTelegramAccount, _ as normalizeWhatsAppTarget } from "./plugins-Dyz98ZJX.js";
|
|
4
|
+
import { A as normalizeE164, T as escapeRegExp, i as getChatChannelMeta, l as requireActivePluginRegistry, n as CHAT_CHANNEL_ORDER } from "./registry-DL-33c9X.js";
|
|
5
|
+
import { r as resolveIMessageAccount } from "./accounts-DEsAwvaZ.js";
|
|
6
|
+
import { i as resolveSignalAccount } from "./accounts-BcQo4OUu.js";
|
|
7
7
|
|
|
8
8
|
//#region src/config/group-policy.ts
|
|
9
9
|
function resolveChannelGroupConfig(groups, groupId, caseInsensitive = false) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-C9WnrKN8.js";
|
|
2
|
+
import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-C6RLbtSJ.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agents/image-sanitization.ts
|
|
5
5
|
const DEFAULT_IMAGE_MAX_DIMENSION_PX = 1200;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./paths-DVWx7USN.js";
|
|
2
|
-
import { H as isPlainObject } from "./registry-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
+
import { H as isPlainObject } from "./registry-DL-33c9X.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-C9WnrKN8.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
|
|
6
6
|
//#region src/agents/tool-loop-detection.ts
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { a as WA_WEB_AUTH_DIR, g as webAuthExists, s as logWebSelfId, u as pickWebChannel } from "./accounts-fnLsjAOi.js";
|
|
2
|
+
import "./reply-Cb54ddUA.js";
|
|
3
|
+
import "./paths-DVWx7USN.js";
|
|
4
|
+
import "./github-copilot-token-Cg0YPPSu.js";
|
|
5
|
+
import "./plugins-Dyz98ZJX.js";
|
|
6
|
+
import "./fetch-b2Zm8y7X.js";
|
|
7
|
+
import "./registry-DL-33c9X.js";
|
|
8
|
+
import "./retry-5P3d0rYw.js";
|
|
9
|
+
import "./send-C2NQjVF9.js";
|
|
10
|
+
import "./config--kW4R0el.js";
|
|
11
|
+
import "./subsystem-C9WnrKN8.js";
|
|
12
|
+
import "./command-format-DHXa0Clc.js";
|
|
13
|
+
import "./model-selection-BjVTBZiY.js";
|
|
14
|
+
import "./agent-scope-D5PlT0Z0.js";
|
|
15
|
+
import "./manifest-registry-DvEm2HHf.js";
|
|
16
|
+
import "./redact-DPnDWsnT.js";
|
|
17
|
+
import "./errors-Bv8oZiTO.js";
|
|
18
|
+
import "./channel-activity-WgE8Z4Bb.js";
|
|
19
|
+
import "./image-ops-C6RLbtSJ.js";
|
|
20
|
+
import "./ssrf-DKZ8eBrk.js";
|
|
21
|
+
import "./local-roots-6BSl8AoA.js";
|
|
22
|
+
import "./ir-Cwi1KVG5.js";
|
|
23
|
+
import "./chunk-CQk9vawA.js";
|
|
24
|
+
import "./message-channel-DY9wVB2A.js";
|
|
25
|
+
import "./bindings-C0XEX0yK.js";
|
|
26
|
+
import "./markdown-tables-cJqvQe9j.js";
|
|
27
|
+
import "./render-BiJZ5W4Z.js";
|
|
28
|
+
import "./tables-CMdQECje.js";
|
|
29
|
+
import "./send-PPtjKj-0.js";
|
|
30
|
+
import "./tool-images-DCvC8yL7.js";
|
|
31
|
+
import "./target-errors-CrR2lAF7.js";
|
|
32
|
+
import "./send-DnFB-v5n.js";
|
|
33
|
+
import "./send-D_X6p9H0.js";
|
|
34
|
+
import "./runner-DqwPn56n.js";
|
|
35
|
+
import "./reply-prefix-5vdbga0R.js";
|
|
36
|
+
import "./tokens-2475WU2Z.js";
|
|
37
|
+
import "./skill-commands-Cr54qPdy.js";
|
|
38
|
+
import "./skills-Dcu4o-9l.js";
|
|
39
|
+
import "./chrome-C1xnOQsc.js";
|
|
40
|
+
import "./thinking-C7zYA2s9.js";
|
|
41
|
+
import "./accounts-DEsAwvaZ.js";
|
|
42
|
+
import "./accounts-BcQo4OUu.js";
|
|
43
|
+
import "./deliver-C2gjA_UH.js";
|
|
44
|
+
import "./pi-embedded-helpers-D3EACnFn.js";
|
|
45
|
+
import "./paths-BNQjLbn7.js";
|
|
46
|
+
import "./diagnostic-Up1aMyxZ.js";
|
|
47
|
+
import "./store-EUYCRBvs.js";
|
|
48
|
+
import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-Nw-bUgtV.js";
|
|
49
|
+
import "./image-Bcc99tVA.js";
|
|
50
|
+
import "./pi-model-discovery-LbcEa65a.js";
|
|
51
|
+
import "./api-key-rotation-B3O1qn0m.js";
|
|
52
|
+
import "./sqlite-ulpcowfN.js";
|
|
53
|
+
import "./diagnostic-session-state-Wd5tNeQG.js";
|
|
54
|
+
import "./manager-C3Eb_8Hz.js";
|
|
55
|
+
import "./commands-registry-yTZdwtLj.js";
|
|
56
|
+
import "./send-_uj_NuFI.js";
|
|
57
|
+
import "./proxy-MquBDehr.js";
|
|
58
|
+
import "./resolve-route-eopifBrM.js";
|
|
59
|
+
import "./replies-Bkaifx0j.js";
|
|
60
|
+
import "./outbound-attachment-CsmRyZPI.js";
|
|
61
|
+
import { n as sendMessageWhatsApp } from "./outbound-Co1QSkdS.js";
|
|
62
|
+
import { i as waitForWaConnection, t as createWaSocket } from "./session-CZngPTYk.js";
|
|
63
|
+
import { t as loginWeb } from "./login-Cau5eVVj.js";
|
|
64
|
+
|
|
65
|
+
export { WA_WEB_AUTH_DIR, createWaSocket, logWebSelfId, loginWeb, monitorWebChannel, monitorWebInbox, pickWebChannel, sendMessageWhatsApp, waitForWaConnection, webAuthExists };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { r as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { r as resolveWhatsAppAccount } from "./accounts-fnLsjAOi.js";
|
|
2
2
|
import "./paths-DVWx7USN.js";
|
|
3
3
|
import "./github-copilot-token-Cg0YPPSu.js";
|
|
4
|
-
import "./plugins-
|
|
5
|
-
import "./registry-
|
|
6
|
-
import "./config
|
|
7
|
-
import "./subsystem-
|
|
8
|
-
import "./command-format-
|
|
9
|
-
import "./model-selection-
|
|
10
|
-
import "./agent-scope-
|
|
11
|
-
import "./manifest-registry-
|
|
12
|
-
import "./image-ops-
|
|
4
|
+
import "./plugins-Dyz98ZJX.js";
|
|
5
|
+
import "./registry-DL-33c9X.js";
|
|
6
|
+
import "./config--kW4R0el.js";
|
|
7
|
+
import "./subsystem-C9WnrKN8.js";
|
|
8
|
+
import "./command-format-DHXa0Clc.js";
|
|
9
|
+
import "./model-selection-BjVTBZiY.js";
|
|
10
|
+
import "./agent-scope-D5PlT0Z0.js";
|
|
11
|
+
import "./manifest-registry-DvEm2HHf.js";
|
|
12
|
+
import "./image-ops-C6RLbtSJ.js";
|
|
13
13
|
import "./ssrf-DKZ8eBrk.js";
|
|
14
|
-
import "./local-roots-
|
|
15
|
-
import "./ir-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./message-channel-
|
|
18
|
-
import "./bindings-
|
|
19
|
-
import "./markdown-tables-
|
|
14
|
+
import "./local-roots-6BSl8AoA.js";
|
|
15
|
+
import "./ir-Cwi1KVG5.js";
|
|
16
|
+
import "./chunk-CQk9vawA.js";
|
|
17
|
+
import "./message-channel-DY9wVB2A.js";
|
|
18
|
+
import "./bindings-C0XEX0yK.js";
|
|
19
|
+
import "./markdown-tables-cJqvQe9j.js";
|
|
20
20
|
import "./render-BiJZ5W4Z.js";
|
|
21
|
-
import "./tables-
|
|
22
|
-
import "./tool-images-
|
|
23
|
-
import { a as createActionGate, c as jsonResult, d as readReactionParams, i as ToolAuthorizationError, m as readStringParam } from "./target-errors-
|
|
24
|
-
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-
|
|
25
|
-
import { r as sendReactionWhatsApp } from "./outbound-
|
|
21
|
+
import "./tables-CMdQECje.js";
|
|
22
|
+
import "./tool-images-DCvC8yL7.js";
|
|
23
|
+
import { a as createActionGate, c as jsonResult, d as readReactionParams, i as ToolAuthorizationError, m as readStringParam } from "./target-errors-CrR2lAF7.js";
|
|
24
|
+
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CP7QDN14.js";
|
|
25
|
+
import { r as sendReactionWhatsApp } from "./outbound-Co1QSkdS.js";
|
|
26
26
|
|
|
27
27
|
//#region src/agents/tools/whatsapp-target-auth.ts
|
|
28
28
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
@@ -213,8 +213,8 @@ export const VoiceCallStreamingConfigSchema = z
|
|
|
213
213
|
openaiApiKey: z.string().min(1).optional(),
|
|
214
214
|
/** OpenAI transcription model (default: gpt-4o-transcribe) */
|
|
215
215
|
sttModel: z.string().min(1).default("gpt-4o-transcribe"),
|
|
216
|
-
/** VAD silence duration in ms before considering speech ended */
|
|
217
|
-
silenceDurationMs: z.number().int().positive().default(
|
|
216
|
+
/** VAD silence duration in ms before considering speech ended (lower = snappier turn detection) */
|
|
217
|
+
silenceDurationMs: z.number().int().positive().default(500),
|
|
218
218
|
/** VAD threshold 0-1 (higher = less sensitive) */
|
|
219
219
|
vadThreshold: z.number().min(0).max(1).default(0.5),
|
|
220
220
|
/** WebSocket path for media stream connections */
|
|
@@ -225,7 +225,7 @@ export const VoiceCallStreamingConfigSchema = z
|
|
|
225
225
|
enabled: false,
|
|
226
226
|
sttProvider: "openai-realtime",
|
|
227
227
|
sttModel: "gpt-4o-transcribe",
|
|
228
|
-
silenceDurationMs:
|
|
228
|
+
silenceDurationMs: 500,
|
|
229
229
|
vadThreshold: 0.5,
|
|
230
230
|
streamPath: "/voice/stream",
|
|
231
231
|
});
|
|
@@ -331,6 +331,19 @@ export const VoiceCallConfigSchema = z
|
|
|
331
331
|
|
|
332
332
|
/** Timeout for response generation in ms (default 30s) */
|
|
333
333
|
responseTimeoutMs: z.number().int().positive().default(30000),
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Response mode:
|
|
337
|
+
* - "embedded": Use the embedded Pi agent (STT → LLM → TTS chain). Full tool support but higher latency.
|
|
338
|
+
* - "realtime": Use OpenAI Realtime API for native speech-to-speech. Much lower latency (~200-500ms).
|
|
339
|
+
*/
|
|
340
|
+
responseMode: z.enum(["embedded", "realtime"]).default("embedded"),
|
|
341
|
+
|
|
342
|
+
/** Model for realtime speech-to-speech mode (only used when responseMode is "realtime") */
|
|
343
|
+
realtimeModel: z.string().default("gpt-4o-realtime-preview"),
|
|
344
|
+
|
|
345
|
+
/** Voice for realtime mode (only used when responseMode is "realtime") */
|
|
346
|
+
realtimeVoice: z.string().default("verse"),
|
|
334
347
|
})
|
|
335
348
|
.strict();
|
|
336
349
|
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Realtime API session provider for voice calls.
|
|
3
|
+
*
|
|
4
|
+
* Replaces the STT → LLM → TTS chain with native speech-to-speech via the
|
|
5
|
+
* OpenAI Agents SDK RealtimeSession + TwilioRealtimeTransportLayer.
|
|
6
|
+
* Achieves ~200-500ms response latency vs 2-14s with the embedded agent.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { execFile } from "node:child_process";
|
|
10
|
+
import { promisify } from "node:util";
|
|
11
|
+
import type { WebSocket as NodeWebSocket } from "ws";
|
|
12
|
+
import { RealtimeAgent, RealtimeSession, tool, backgroundResult } from "@openai/agents/realtime";
|
|
13
|
+
import { TwilioRealtimeTransportLayer } from "@openai/agents-extensions";
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
import type { VoiceCallConfig } from "../config.js";
|
|
16
|
+
|
|
17
|
+
const execFileAsync = promisify(execFile);
|
|
18
|
+
|
|
19
|
+
const SCRIPT_TIMEOUT_MS = 15_000;
|
|
20
|
+
|
|
21
|
+
async function runScript(command: string, args: string[]): Promise<string> {
|
|
22
|
+
try {
|
|
23
|
+
const { stdout, stderr } = await execFileAsync(command, args, {
|
|
24
|
+
timeout: SCRIPT_TIMEOUT_MS,
|
|
25
|
+
maxBuffer: 1024 * 512,
|
|
26
|
+
env: process.env,
|
|
27
|
+
});
|
|
28
|
+
return stdout.trim() || stderr.trim() || "(no output)";
|
|
29
|
+
} catch (err) {
|
|
30
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
31
|
+
return `Error: ${msg}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function buildRealtimeTools() {
|
|
36
|
+
const stripeGross = tool({
|
|
37
|
+
name: "stripe_gross_mtd",
|
|
38
|
+
description:
|
|
39
|
+
"Get Stripe gross revenue month-to-date. Returns current MTD figures, daily average, and target tracking.",
|
|
40
|
+
parameters: z.object({}),
|
|
41
|
+
execute: async () => {
|
|
42
|
+
return backgroundResult(
|
|
43
|
+
await runScript("node", ["/root/clawd/skills/stripe/scripts/stripe.js", "gross-mtd"]),
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const stripeDailySummary = tool({
|
|
49
|
+
name: "stripe_daily_summary",
|
|
50
|
+
description:
|
|
51
|
+
"Get Stripe daily summary for a specific date (charges, refunds, net). Defaults to yesterday if no date provided.",
|
|
52
|
+
parameters: z.object({
|
|
53
|
+
date: z.string().optional().describe("Date in YYYY-MM-DD format. Defaults to yesterday."),
|
|
54
|
+
}),
|
|
55
|
+
execute: async ({ date }) => {
|
|
56
|
+
const args = ["/root/clawd/skills/stripe/scripts/stripe.js", "daily-summary"];
|
|
57
|
+
if (date) args.push("--date", date);
|
|
58
|
+
return backgroundResult(await runScript("node", args));
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const webSearch = tool({
|
|
63
|
+
name: "web_search",
|
|
64
|
+
description:
|
|
65
|
+
"Search the web for current information. Use for news, current events, factual lookups.",
|
|
66
|
+
parameters: z.object({
|
|
67
|
+
query: z.string().describe("Search query"),
|
|
68
|
+
}),
|
|
69
|
+
execute: async ({ query }) => {
|
|
70
|
+
return backgroundResult(
|
|
71
|
+
await runScript("node", [
|
|
72
|
+
"-e",
|
|
73
|
+
`import('undici').then(({fetch})=>fetch('https://api.search.brave.com/res/v1/web/search?q='+encodeURIComponent(${JSON.stringify(query)}),{headers:{'X-Subscription-Token':process.env.BRAVE_SEARCH_API_KEY||''}}).then(r=>r.json()).then(d=>{const results=(d.web?.results||[]).slice(0,5).map(r=>r.title+': '+r.description).join('\\n');console.log(results||'No results')})).catch(e=>console.error(e.message))`,
|
|
74
|
+
]),
|
|
75
|
+
);
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const memoryRecall = tool({
|
|
80
|
+
name: "memory_recall",
|
|
81
|
+
description:
|
|
82
|
+
"Recall stored memories and context. Use to check preferences, past decisions, or remembered facts.",
|
|
83
|
+
parameters: z.object({
|
|
84
|
+
query: z.string().describe("What to recall — topic, person name, or context"),
|
|
85
|
+
}),
|
|
86
|
+
execute: async ({ query }) => {
|
|
87
|
+
return backgroundResult(
|
|
88
|
+
await runScript("node", [
|
|
89
|
+
"/root/clawd/skills/memory/scripts/memory.js",
|
|
90
|
+
"recall",
|
|
91
|
+
"UCH9TS4TB",
|
|
92
|
+
query,
|
|
93
|
+
]),
|
|
94
|
+
);
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const uptimeCheck = tool({
|
|
99
|
+
name: "uptime_check",
|
|
100
|
+
description: "Check current uptime status of monitored services via UptimeRobot.",
|
|
101
|
+
parameters: z.object({}),
|
|
102
|
+
execute: async () => {
|
|
103
|
+
return backgroundResult(
|
|
104
|
+
await runScript("node", ["/root/clawd/skills/uptime-robot/scripts/uptime.js"]),
|
|
105
|
+
);
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const shellExec = tool({
|
|
110
|
+
name: "run_command",
|
|
111
|
+
description:
|
|
112
|
+
"Execute a shell command on the server. Use for quick checks like date, uptime, disk usage, git status, etc.",
|
|
113
|
+
parameters: z.object({
|
|
114
|
+
command: z.string().describe("Shell command to run"),
|
|
115
|
+
}),
|
|
116
|
+
execute: async ({ command }) => {
|
|
117
|
+
return backgroundResult(await runScript("bash", ["-c", command]));
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
return [stripeGross, stripeDailySummary, webSearch, memoryRecall, uptimeCheck, shellExec];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type RealtimeCallSession = {
|
|
125
|
+
session: RealtimeSession;
|
|
126
|
+
close: () => void;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export function createRealtimeCallSession(params: {
|
|
130
|
+
twilioWebSocket: WebSocket | NodeWebSocket;
|
|
131
|
+
voiceConfig: VoiceCallConfig;
|
|
132
|
+
callId: string;
|
|
133
|
+
from: string;
|
|
134
|
+
}): RealtimeCallSession {
|
|
135
|
+
const { twilioWebSocket, voiceConfig, callId, from } = params;
|
|
136
|
+
|
|
137
|
+
const systemPrompt =
|
|
138
|
+
voiceConfig.responseSystemPrompt ??
|
|
139
|
+
`You are Clawpath — Lawpath's AI intern — on a PHONE CALL. You're Australian, warm, and casual. You naturally say things like "no worries", "reckon", "too easy", "beauty". You're a proud Rabbitohs fan.
|
|
140
|
+
|
|
141
|
+
VOICE RULES (critical):
|
|
142
|
+
- MAX 2 short sentences per reply. This is spoken aloud, not text.
|
|
143
|
+
- NEVER use lists, bullet points, markdown, asterisks, or numbered items.
|
|
144
|
+
- NEVER read out URLs or long technical details.
|
|
145
|
+
- Use tools when the caller asks you to look something up, check data, or do something. Say "gimme a sec" first so they know you're working on it.
|
|
146
|
+
- If the caller says bye, goodbye, or wants to end the call, say a brief farewell and include [END_CALL] at the end of your response.
|
|
147
|
+
- Match the caller's energy — quick question gets a quick answer, yarn gets a yarn.`;
|
|
148
|
+
|
|
149
|
+
const agent = new RealtimeAgent({
|
|
150
|
+
name: "Clawpath",
|
|
151
|
+
instructions: `${systemPrompt}\n\nThe caller's phone number is ${from}. Call ID: ${callId}.`,
|
|
152
|
+
tools: buildRealtimeTools(),
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const voice = voiceConfig.realtimeVoice || "verse";
|
|
156
|
+
|
|
157
|
+
const transport = new TwilioRealtimeTransportLayer({
|
|
158
|
+
twilioWebSocket,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const model = voiceConfig.realtimeModel || "gpt-4o-realtime-preview";
|
|
162
|
+
|
|
163
|
+
const session = new RealtimeSession(agent, {
|
|
164
|
+
transport,
|
|
165
|
+
model,
|
|
166
|
+
config: {
|
|
167
|
+
audio: {
|
|
168
|
+
output: {
|
|
169
|
+
voice,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
tracingDisabled: true,
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
session.on("error", (error: unknown) => {
|
|
177
|
+
console.error(`[voice-call] [realtime] Session error for call ${callId}:`, error);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
session.on("agent_updated" as any, (newAgent: unknown) => {
|
|
181
|
+
console.log(`[voice-call] [realtime] Agent updated for call ${callId}:`, newAgent);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
const apiKey = voiceConfig.streaming?.openaiApiKey || process.env.OPENAI_API_KEY;
|
|
185
|
+
if (!apiKey) {
|
|
186
|
+
throw new Error("OpenAI API key required for realtime voice mode");
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
session
|
|
190
|
+
.connect({ apiKey })
|
|
191
|
+
.then(() => {
|
|
192
|
+
console.log(
|
|
193
|
+
`[voice-call] [realtime] Connected for call ${callId} (model=${model}, voice=${voice})`,
|
|
194
|
+
);
|
|
195
|
+
})
|
|
196
|
+
.catch((err) => {
|
|
197
|
+
console.error(`[voice-call] [realtime] Connection failed for call ${callId}:`, err);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
return {
|
|
201
|
+
session,
|
|
202
|
+
close: () => {
|
|
203
|
+
try {
|
|
204
|
+
session.close();
|
|
205
|
+
} catch {
|
|
206
|
+
// best effort
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|