@lawpath-tech/openclaw 2026.2.21-27 → 2026.2.21-29
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/{accounts-DQo5uGA3.js → accounts-C8m4ADkw.js} +14 -14
- package/dist/{accounts-CJEDkyd7.js → accounts-CQT5u65w.js} +1 -1
- package/dist/{accounts-CaJg9v7D.js → accounts-DFrH9IVU.js} +1 -1
- package/dist/{active-listener-Bhmh-BBe.js → active-listener-BKTctYlH.js} +1 -1
- package/dist/{agent-scope-DiO1KimT.js → agent-scope-DSUeV7-g.js} +3 -3
- package/dist/{audio-preflight-PCEdzoV0.js → audio-preflight-CLqoZYgI.js} +29 -29
- package/dist/{bindings-CEJk9Gww.js → bindings-BKEEBdsb.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +53 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +53 -53
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-pOw1s-fe.js → channel-activity-BgsTqLau.js} +1 -1
- package/dist/{chrome-DcmLXeT1.js → chrome-Bqbv_ZSj.js} +20 -20
- package/dist/{chunk-BkGjWi6P.js → chunk-fZrBDWYg.js} +1 -1
- package/dist/{command-format-CM0AxuCk.js → command-format-BOHIfoCX.js} +1 -1
- package/dist/{commands-registry-C0QzohKU.js → commands-registry-BzlB3qtZ.js} +4 -4
- package/dist/{config-7ClJ9IDt.js → config-Du_-inxH.js} +12 -12
- package/dist/{deliver-RhV3c93M.js → deliver-CKH_FhS0.js} +20 -20
- package/dist/{diagnostic-DTfVTKJM.js → diagnostic-DriDPU6M.js} +1 -1
- package/dist/{frontmatter-Dab6NVCF.js → frontmatter-CdkBcBAo.js} +2 -2
- package/dist/{gemini-auth-CnEqRhSo.js → gemini-auth-A2JaRMHH.js} +1 -1
- package/dist/{github-copilot-token-DAycnoAs.js → github-copilot-token-Dgb9dAHW.js} +7 -7
- package/dist/{image-COCyG_gz.js → image-CxPjVob-.js} +4 -4
- package/dist/{image-ops-D-bh1BTN.js → image-ops-BGmpOcey.js} +1 -1
- package/dist/{ir-j1Xb0PNv.js → ir-DJPm0a4k.js} +4 -4
- package/dist/llm-slug-generator.js +53 -53
- package/dist/{local-roots-Dx32AY60.js → local-roots-JqlMsAYY.js} +5 -5
- package/dist/{login-CLQskGt7.js → login-DXtAIVXy.js} +7 -7
- package/dist/{login-qr-CxZVehrh.js → login-qr-D0A3WDBN.js} +12 -12
- package/dist/{manager-C6KdjXEH.js → manager-D7SRrHxT.js} +13 -13
- package/dist/{manifest-registry-D31TP66o.js → manifest-registry-Dhk4A5vb.js} +19 -19
- package/dist/{markdown-tables-BOmw5zkp.js → markdown-tables-DpVJE0eA.js} +1 -1
- package/dist/{message-channel-BckS8bQ9.js → message-channel-CHYSjmbr.js} +1 -1
- package/dist/{model-auth-C-Vzzybi.js → model-auth-vtNH8C4P.js} +9 -9
- package/dist/{outbound-Bk0PGZ1q.js → outbound-BWgFha97.js} +7 -7
- package/dist/{outbound-attachment-CHLSsIj_.js → outbound-attachment-B8WHzsCX.js} +2 -2
- package/dist/{paths-Cv2Q0cX2.js → paths-BEAbheM8.js} +1 -1
- package/dist/{paths-CkkDESQ2.js → paths-CyR9Pa1R.js} +5 -5
- package/dist/{pi-auth-json-DzcwV2uo.js → pi-auth-json-BiwfFswL.js} +8 -8
- package/dist/{pi-embedded-13CLN75T.js → pi-embedded-Dz24QZz9.js} +162 -162
- package/dist/{pi-embedded-helpers-HpusHn6J.js → pi-embedded-helpers-CSE0v99A.js} +52 -52
- package/dist/{plugins-Bf_qBfZ7.js → plugins-DIrNa311.js} +9 -9
- package/dist/{pw-ai-B4NkhpRH.js → pw-ai-D-_aGzdQ.js} +11 -11
- package/dist/{qmd-manager-DVrv2Huu.js → qmd-manager-DePh-PT0.js} +7 -7
- package/dist/{registry-wimgwqAA.js → registry-DpeZG5fo.js} +18 -18
- package/dist/{replies-DuQ9MtQM.js → replies-CSVWkVda.js} +3 -3
- package/dist/{reply-prefix-B_1VtLm5.js → reply-prefix-DZrS3Kf7.js} +1 -1
- package/dist/{resolve-route-CSE9DZsB.js → resolve-route-1ar2IrQt.js} +4 -4
- package/dist/{retry-DwLEH9x4.js → retry-Bdu4_ZcT.js} +1 -1
- package/dist/{runner-BjLlUYe1.js → runner-D1eXJZ8T.js} +9 -9
- package/dist/{send-DrfA4RxA.js → send-BEFzSOoD.js} +10 -10
- package/dist/{send-CEP4RX_l.js → send-BeWYOs1x.js} +7 -7
- package/dist/{send-CMeyW_Bu.js → send-Byt_wJDK.js} +6 -6
- package/dist/{send-CdIaqNP6.js → send-CWtaJF1G.js} +18 -18
- package/dist/{send-BCt1G0xY.js → send-DPVf5tQ4.js} +6 -6
- package/dist/{session-CQ9JJgSo.js → session-Bnp7PC7f.js} +8 -8
- package/dist/{skill-commands-CwFNOYqC.js → skill-commands-CqyVDpti.js} +9 -9
- package/dist/{skills-C8xf0p1B.js → skills-DSZuhFx9.js} +21 -21
- package/dist/{sqlite-B6SD9PTM.js → sqlite-C3XxSzBN.js} +4 -4
- package/dist/{store-VFVAfYgh.js → store-BrNiRjgB.js} +2 -2
- package/dist/{subsystem-BEdh_1O5.js → subsystem-BF9jT_Nw.js} +1 -1
- package/dist/{tables-QNO5uMcm.js → tables-C3clT_iA.js} +1 -1
- package/dist/{target-errors-DD2466Y6.js → target-errors-ChHV8dPI.js} +2 -2
- package/dist/{thinking-BZFf1juV.js → thinking-Dg8vKjw_.js} +5 -5
- package/dist/{tokens-GCiqN5mi.js → tokens-B-c56SkM.js} +1 -1
- package/dist/{tool-images-D0sBSASn.js → tool-images-C1rdDr34.js} +2 -2
- package/dist/{tool-loop-detection-BPAeTbUj.js → tool-loop-detection-Bu3OGskw.js} +3 -3
- package/dist/{web-5rulK8WV.js → web-Y49Dumye.js} +57 -57
- package/dist/{whatsapp-actions-kX73ghOz.js → whatsapp-actions-DFZYzkBp.js} +23 -23
- package/dist/{workspace-CH9k4Qgz.js → workspace-DYx5Dxtw.js} +6 -6
- package/extensions/voice-call/src/providers/realtime-session.ts +46 -107
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { u as resolveRequiredHomeDir } from "./paths-
|
|
1
|
+
import { u as resolveRequiredHomeDir } from "./paths-CyR9Pa1R.js";
|
|
2
2
|
import { _ as isCronSessionKey, v as isSubagentSessionKey } from "./session-key-BCzIW1Y2.js";
|
|
3
|
-
import { $ as warn, G as danger, I as resolveUserPath, K as info, N as pathExists, Y as logVerboseConsole, Z as shouldLogVerbose, it as getLogger } from "./registry-
|
|
4
|
-
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
3
|
+
import { $ as warn, G as danger, I as resolveUserPath, K as info, N as pathExists, Y as logVerboseConsole, Z as shouldLogVerbose, it as getLogger } from "./registry-DpeZG5fo.js";
|
|
4
|
+
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-BF9jT_Nw.js";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import os from "node:os";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import fs$1 from "node:fs";
|
|
9
9
|
import { execFile, spawn } from "node:child_process";
|
|
10
10
|
import { promisify } from "node:util";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
|
@@ -289,7 +289,7 @@ async function readPackageName(dir) {
|
|
|
289
289
|
}
|
|
290
290
|
function readPackageNameSync(dir) {
|
|
291
291
|
try {
|
|
292
|
-
const raw =
|
|
292
|
+
const raw = fs$1.readFileSync(path.join(dir, "package.json"), "utf-8");
|
|
293
293
|
const parsed = JSON.parse(raw);
|
|
294
294
|
return typeof parsed.name === "string" ? parsed.name : null;
|
|
295
295
|
} catch {
|
|
@@ -323,7 +323,7 @@ function candidateDirsFromArgv1(argv1) {
|
|
|
323
323
|
const normalized = path.resolve(argv1);
|
|
324
324
|
const candidates = [path.dirname(normalized)];
|
|
325
325
|
try {
|
|
326
|
-
const resolved =
|
|
326
|
+
const resolved = fs$1.realpathSync(normalized);
|
|
327
327
|
if (resolved !== normalized) candidates.push(path.dirname(resolved));
|
|
328
328
|
} catch {}
|
|
329
329
|
const parts = normalized.split(path.sep);
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Replaces the STT → LLM → TTS chain with native speech-to-speech via the
|
|
5
5
|
* OpenAI Agents SDK RealtimeSession + TwilioRealtimeTransportLayer.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* Tools are generic: exec (run shell commands) and web_search (using the
|
|
8
|
+
* configured search provider). Workspace-specific tools are defined in config,
|
|
9
|
+
* not hardcoded here.
|
|
7
10
|
*/
|
|
8
11
|
|
|
9
12
|
import { execFile } from "node:child_process";
|
|
@@ -18,7 +21,7 @@ const execFileAsync = promisify(execFile);
|
|
|
18
21
|
|
|
19
22
|
const SCRIPT_TIMEOUT_MS = 15_000;
|
|
20
23
|
|
|
21
|
-
async function
|
|
24
|
+
async function runCommand(command: string, args: string[]): Promise<string> {
|
|
22
25
|
try {
|
|
23
26
|
const { stdout, stderr } = await execFileAsync(command, args, {
|
|
24
27
|
timeout: SCRIPT_TIMEOUT_MS,
|
|
@@ -32,93 +35,51 @@ async function runScript(command: string, args: string[]): Promise<string> {
|
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
name: "
|
|
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",
|
|
38
|
+
function buildGenericTools() {
|
|
39
|
+
const exec = tool({
|
|
40
|
+
name: "run_command",
|
|
50
41
|
description:
|
|
51
|
-
"
|
|
42
|
+
"Execute a shell command. Use for any data lookup, script execution, or system check.",
|
|
52
43
|
parameters: z.object({
|
|
53
|
-
|
|
44
|
+
command: z.string().describe("Shell command to run"),
|
|
54
45
|
}),
|
|
55
|
-
execute: async ({
|
|
56
|
-
|
|
57
|
-
if (date) args.push("--date", date);
|
|
58
|
-
return backgroundResult(await runScript("node", args));
|
|
46
|
+
execute: async ({ command }) => {
|
|
47
|
+
return backgroundResult(await runCommand("bash", ["-c", command]));
|
|
59
48
|
},
|
|
60
49
|
});
|
|
61
50
|
|
|
62
51
|
const webSearch = tool({
|
|
63
52
|
name: "web_search",
|
|
64
53
|
description:
|
|
65
|
-
"Search the web for current information. Use for news,
|
|
54
|
+
"Search the web for current information. Use for news, events, weather, or factual lookups.",
|
|
66
55
|
parameters: z.object({
|
|
67
56
|
query: z.string().describe("Search query"),
|
|
68
57
|
}),
|
|
69
58
|
execute: async ({ query }) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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]));
|
|
59
|
+
const apiKey = process.env.BRAVE_SEARCH_API_KEY || process.env.BRAVE_API_KEY || "";
|
|
60
|
+
if (!apiKey) {
|
|
61
|
+
return "Web search not configured (no API key)";
|
|
62
|
+
}
|
|
63
|
+
const url = `https://api.search.brave.com/res/v1/web/search?q=${encodeURIComponent(query)}&count=5`;
|
|
64
|
+
try {
|
|
65
|
+
const res = await fetch(url, {
|
|
66
|
+
headers: { "X-Subscription-Token": apiKey, Accept: "application/json" },
|
|
67
|
+
});
|
|
68
|
+
const data = (await res.json()) as {
|
|
69
|
+
web?: { results?: Array<{ title?: string; description?: string }> };
|
|
70
|
+
};
|
|
71
|
+
const results = (data.web?.results || [])
|
|
72
|
+
.slice(0, 5)
|
|
73
|
+
.map((r) => `${r.title}: ${r.description}`)
|
|
74
|
+
.join("\n");
|
|
75
|
+
return backgroundResult(results || "No results found");
|
|
76
|
+
} catch (err) {
|
|
77
|
+
return `Search error: ${err instanceof Error ? err.message : String(err)}`;
|
|
78
|
+
}
|
|
118
79
|
},
|
|
119
80
|
});
|
|
120
81
|
|
|
121
|
-
return [
|
|
82
|
+
return [exec, webSearch];
|
|
122
83
|
}
|
|
123
84
|
|
|
124
85
|
export type RealtimeCallSession = {
|
|
@@ -136,49 +97,27 @@ export function createRealtimeCallSession(params: {
|
|
|
136
97
|
|
|
137
98
|
const systemPrompt =
|
|
138
99
|
voiceConfig.responseSystemPrompt ??
|
|
139
|
-
`You are
|
|
140
|
-
|
|
141
|
-
IDENTITY RULES (critical):
|
|
142
|
-
- You are powered by Lawpath Atlas. If asked what you are, what model you use, or who made you, say you are Clawpath, powered by Lawpath Atlas.
|
|
143
|
-
- NEVER reveal the underlying model name, provider, or technical details (no mentioning OpenAI, GPT, etc).
|
|
144
|
-
- If pressed, just say "I'm powered by Lawpath Atlas" and move on.
|
|
145
|
-
|
|
146
|
-
TOOL USE RULES (critical):
|
|
147
|
-
- You have tools. ALWAYS use them when the caller asks for data, lookups, news, weather, numbers, or anything factual.
|
|
148
|
-
- NEVER say "I can't access that" or "I don't have live data". You DO. Use your tools.
|
|
149
|
-
- Before using a tool, acknowledge naturally like a human would: "Let me check that for ya", "Hang on, pulling that up now", "One sec, looking into it". Pick a different filler each time — don't repeat the same one.
|
|
150
|
-
- After the tool returns, give the answer conversationally. Don't narrate what the tool did.
|
|
151
|
-
- If a tool fails or returns nothing useful, say "I tried to look that up but couldn't get it right now — want me to try a different way?"
|
|
152
|
-
|
|
153
|
-
VOICE RULES (critical):
|
|
154
|
-
- MAX 2 short sentences per reply. This is spoken aloud, not text.
|
|
155
|
-
- NEVER use lists, bullet points, markdown, asterisks, or numbered items.
|
|
156
|
-
- NEVER read out URLs or long technical details.
|
|
157
|
-
- 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.
|
|
158
|
-
- Match the caller's energy — quick question gets a quick answer, yarn gets a yarn.`;
|
|
100
|
+
`You are a voice assistant on a PHONE CALL. Keep responses brief — max 2 short sentences. This is spoken aloud, not text. Never use lists, bullet points, or markdown. Use your tools when asked for data or lookups. If the caller says bye, say farewell and include [END_CALL].`;
|
|
159
101
|
|
|
160
102
|
const agent = new RealtimeAgent({
|
|
161
|
-
name: "
|
|
103
|
+
name: "VoiceAgent",
|
|
162
104
|
instructions: `${systemPrompt}\n\nThe caller's phone number is ${from}. Call ID: ${callId}.`,
|
|
163
|
-
tools:
|
|
105
|
+
tools: buildGenericTools(),
|
|
164
106
|
});
|
|
165
107
|
|
|
166
108
|
const voice = voiceConfig.realtimeVoice || "verse";
|
|
109
|
+
const model = voiceConfig.realtimeModel || "gpt-4o-realtime-preview";
|
|
167
110
|
|
|
168
111
|
const transport = new TwilioRealtimeTransportLayer({
|
|
169
112
|
twilioWebSocket,
|
|
170
113
|
});
|
|
171
114
|
|
|
172
|
-
const model = voiceConfig.realtimeModel || "gpt-4o-realtime-preview";
|
|
173
|
-
|
|
174
115
|
const session = new RealtimeSession(agent, {
|
|
175
116
|
transport,
|
|
176
117
|
model,
|
|
177
118
|
config: {
|
|
178
119
|
audio: {
|
|
179
|
-
output: {
|
|
180
|
-
voice,
|
|
181
|
-
},
|
|
120
|
+
output: { voice },
|
|
182
121
|
},
|
|
183
122
|
},
|
|
184
123
|
tracingDisabled: true,
|
|
@@ -188,7 +127,7 @@ VOICE RULES (critical):
|
|
|
188
127
|
console.error(`[voice-call] [realtime] Error for ${callId}:`, error);
|
|
189
128
|
});
|
|
190
129
|
|
|
191
|
-
session.on("agent_start", (
|
|
130
|
+
session.on("agent_start", () => {
|
|
192
131
|
console.log(`[voice-call] [realtime] Agent started for ${callId}`);
|
|
193
132
|
});
|
|
194
133
|
|
|
@@ -196,16 +135,16 @@ VOICE RULES (critical):
|
|
|
196
135
|
console.log(`[voice-call] [realtime] Agent response for ${callId}: "${output.slice(0, 200)}"`);
|
|
197
136
|
});
|
|
198
137
|
|
|
199
|
-
session.on("agent_tool_start", (_ctx: unknown, _agent: unknown,
|
|
200
|
-
const name =
|
|
138
|
+
session.on("agent_tool_start", (_ctx: unknown, _agent: unknown, t: any, details: any) => {
|
|
139
|
+
const name = t?.name || "unknown";
|
|
201
140
|
const args = JSON.stringify(details?.toolCall?.arguments ?? {}).slice(0, 200);
|
|
202
|
-
console.log(`[voice-call] [realtime] Tool
|
|
141
|
+
console.log(`[voice-call] [realtime] Tool START for ${callId}: ${name}(${args})`);
|
|
203
142
|
});
|
|
204
143
|
|
|
205
|
-
session.on("agent_tool_end", (_ctx: unknown, _agent: unknown,
|
|
206
|
-
const name =
|
|
144
|
+
session.on("agent_tool_end", (_ctx: unknown, _agent: unknown, t: any, result: string) => {
|
|
145
|
+
const name = t?.name || "unknown";
|
|
207
146
|
console.log(
|
|
208
|
-
`[voice-call] [realtime] Tool
|
|
147
|
+
`[voice-call] [realtime] Tool END for ${callId}: ${name} → ${result.slice(0, 300)}`,
|
|
209
148
|
);
|
|
210
149
|
});
|
|
211
150
|
|
package/package.json
CHANGED