@heretek-ai/openclaw 2026.3.30 → 2026.3.31
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/.buildstamp +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/chunks/command-registry-BeAmVjny.mjs +214 -0
- package/dist/chunks/command-registry-CCc0vZoH.mjs +14 -0
- package/dist/chunks/completion-cli-CpJ8IzQO.mjs +448 -0
- package/dist/chunks/completion-cli-DxUdlYt0.mjs +17 -0
- package/dist/chunks/doctor-completion-CCuL-Cen.mjs +92 -0
- package/dist/chunks/gateway-cli-Bc4J6-zj.mjs +43508 -0
- package/dist/chunks/onboard-Y9qZW5yw.mjs +601 -0
- package/dist/chunks/program-B27s-BhZ.mjs +163 -0
- package/dist/chunks/prompt-select-styled-PxJbW1Dj.mjs +5035 -0
- package/dist/chunks/register.maintenance-DrxPWWzR.mjs +685 -0
- package/dist/chunks/register.onboard-CvtQ4Z6V.mjs +168 -0
- package/dist/chunks/register.setup-Dz3jKcQw.mjs +188 -0
- package/dist/chunks/register.subclis-B_qUKZPW.mjs +13 -0
- package/dist/chunks/register.subclis-BvClctGE.mjs +319 -0
- package/dist/chunks/run-main-CpZzBbaq.mjs +437 -0
- package/dist/chunks/setup-Ddj3KzQ7.mjs +399 -0
- package/dist/chunks/setup.finalize-ZR-Hv0hQ.mjs +544 -0
- package/dist/chunks/update-cli-DWGkI141.mjs +1632 -0
- package/dist/entry.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { E as getPrimaryCommand, k as hasHelpOrVersion, x as buildParseArgv } from "./logger-vRSRu9wD.mjs";
|
|
2
|
+
import { t as isTruthyEnvValue } from "./env-9fhyzTaG.mjs";
|
|
3
|
+
import { r as resolveActionArgs } from "./helpers-CgjNFOnR.mjs";
|
|
4
|
+
import { n as getSubCliEntries } from "./subcli-descriptors-BDQPQ3D7.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/cli/program/action-reparse.ts
|
|
7
|
+
async function reparseProgramFromActionArgs(program, actionArgs) {
|
|
8
|
+
const actionCommand = actionArgs.at(-1);
|
|
9
|
+
const rawArgs = (actionCommand?.parent ?? program).rawArgs;
|
|
10
|
+
const actionArgsList = resolveActionArgs(actionCommand);
|
|
11
|
+
const fallbackArgv = actionCommand?.name() ? [actionCommand.name(), ...actionArgsList] : actionArgsList;
|
|
12
|
+
const parseArgv = buildParseArgv({
|
|
13
|
+
programName: program.name(),
|
|
14
|
+
rawArgs,
|
|
15
|
+
fallbackArgv
|
|
16
|
+
});
|
|
17
|
+
await program.parseAsync(parseArgv);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/cli/program/command-tree.ts
|
|
22
|
+
function removeCommand(program, command) {
|
|
23
|
+
const commands = program.commands;
|
|
24
|
+
const index = commands.indexOf(command);
|
|
25
|
+
if (index < 0) return false;
|
|
26
|
+
commands.splice(index, 1);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function removeCommandByName(program, name) {
|
|
30
|
+
const existing = program.commands.find((command) => command.name() === name);
|
|
31
|
+
if (!existing) return false;
|
|
32
|
+
return removeCommand(program, existing);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/cli/program/register.subclis.ts
|
|
37
|
+
const shouldRegisterPrimaryOnly = (argv) => {
|
|
38
|
+
if (isTruthyEnvValue(process.env.OPENCLAW_DISABLE_LAZY_SUBCOMMANDS)) return false;
|
|
39
|
+
if (hasHelpOrVersion(argv)) return false;
|
|
40
|
+
return true;
|
|
41
|
+
};
|
|
42
|
+
const shouldEagerRegisterSubcommands = (_argv) => {
|
|
43
|
+
return isTruthyEnvValue(process.env.OPENCLAW_DISABLE_LAZY_SUBCOMMANDS);
|
|
44
|
+
};
|
|
45
|
+
const loadValidatedConfigForPluginRegistration = async () => {
|
|
46
|
+
const mod = await import("./config-DfX2y6D8.mjs");
|
|
47
|
+
if (!(await mod.readConfigFileSnapshot()).valid) return null;
|
|
48
|
+
return mod.loadConfig();
|
|
49
|
+
};
|
|
50
|
+
const entries = [
|
|
51
|
+
{
|
|
52
|
+
name: "acp",
|
|
53
|
+
description: "Agent Control Protocol tools",
|
|
54
|
+
hasSubcommands: true,
|
|
55
|
+
register: async (program) => {
|
|
56
|
+
(await import("./acp-cli-BKQYMzAb.mjs")).registerAcpCli(program);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "gateway",
|
|
61
|
+
description: "Run, inspect, and query the WebSocket Gateway",
|
|
62
|
+
hasSubcommands: true,
|
|
63
|
+
register: async (program) => {
|
|
64
|
+
(await import("./gateway-cli-Bc4J6-zj.mjs")).registerGatewayCli(program);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "daemon",
|
|
69
|
+
description: "Gateway service (legacy alias)",
|
|
70
|
+
hasSubcommands: true,
|
|
71
|
+
register: async (program) => {
|
|
72
|
+
(await import("../cli/daemon-cli.mjs")).registerDaemonCli(program);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "logs",
|
|
77
|
+
description: "Tail gateway file logs via RPC",
|
|
78
|
+
hasSubcommands: false,
|
|
79
|
+
register: async (program) => {
|
|
80
|
+
(await import("./logs-cli-BX0gDPjX.mjs")).registerLogsCli(program);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "system",
|
|
85
|
+
description: "System events, heartbeat, and presence",
|
|
86
|
+
hasSubcommands: true,
|
|
87
|
+
register: async (program) => {
|
|
88
|
+
(await import("./system-cli-UIyhy0Qi.mjs")).registerSystemCli(program);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "models",
|
|
93
|
+
description: "Discover, scan, and configure models",
|
|
94
|
+
hasSubcommands: true,
|
|
95
|
+
register: async (program) => {
|
|
96
|
+
(await import("./models-cli-BOPsWLgm.mjs")).registerModelsCli(program);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "approvals",
|
|
101
|
+
description: "Manage exec approvals (gateway or node host)",
|
|
102
|
+
hasSubcommands: true,
|
|
103
|
+
register: async (program) => {
|
|
104
|
+
(await import("./exec-approvals-cli-CPCJBM6c.mjs")).registerExecApprovalsCli(program);
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "nodes",
|
|
109
|
+
description: "Manage gateway-owned node pairing and node commands",
|
|
110
|
+
hasSubcommands: true,
|
|
111
|
+
register: async (program) => {
|
|
112
|
+
(await import("./nodes-cli-BQTeJmI3.mjs")).registerNodesCli(program);
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "devices",
|
|
117
|
+
description: "Device pairing + token management",
|
|
118
|
+
hasSubcommands: true,
|
|
119
|
+
register: async (program) => {
|
|
120
|
+
(await import("./devices-cli-BwR5Zx9n.mjs")).registerDevicesCli(program);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "node",
|
|
125
|
+
description: "Run and manage the headless node host service",
|
|
126
|
+
hasSubcommands: true,
|
|
127
|
+
register: async (program) => {
|
|
128
|
+
(await import("./node-cli-CK8CMe0o.mjs")).registerNodeCli(program);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "sandbox",
|
|
133
|
+
description: "Manage sandbox containers for agent isolation",
|
|
134
|
+
hasSubcommands: true,
|
|
135
|
+
register: async (program) => {
|
|
136
|
+
(await import("./sandbox-cli-DFULzMlg.mjs")).registerSandboxCli(program);
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "tui",
|
|
141
|
+
description: "Open a terminal UI connected to the Gateway",
|
|
142
|
+
hasSubcommands: false,
|
|
143
|
+
register: async (program) => {
|
|
144
|
+
(await import("./tui-cli-Dm_Bi77A.mjs")).registerTuiCli(program);
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "cron",
|
|
149
|
+
description: "Manage cron jobs via the Gateway scheduler",
|
|
150
|
+
hasSubcommands: true,
|
|
151
|
+
register: async (program) => {
|
|
152
|
+
(await import("./cron-cli-ByYRUByu.mjs")).registerCronCli(program);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "dns",
|
|
157
|
+
description: "DNS helpers for wide-area discovery (Tailscale + CoreDNS)",
|
|
158
|
+
hasSubcommands: true,
|
|
159
|
+
register: async (program) => {
|
|
160
|
+
(await import("./dns-cli-CsExsCR_.mjs")).registerDnsCli(program);
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "docs",
|
|
165
|
+
description: "Search the live OpenClaw docs",
|
|
166
|
+
hasSubcommands: false,
|
|
167
|
+
register: async (program) => {
|
|
168
|
+
(await import("./docs-cli-Hp_Ca_r0.mjs")).registerDocsCli(program);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "hooks",
|
|
173
|
+
description: "Manage internal agent hooks",
|
|
174
|
+
hasSubcommands: true,
|
|
175
|
+
register: async (program) => {
|
|
176
|
+
(await import("./hooks-cli-0SgUsaan.mjs")).registerHooksCli(program);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "webhooks",
|
|
181
|
+
description: "Webhook helpers and integrations",
|
|
182
|
+
hasSubcommands: true,
|
|
183
|
+
register: async (program) => {
|
|
184
|
+
(await import("./webhooks-cli-BLnT5e5Y.mjs")).registerWebhooksCli(program);
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "qr",
|
|
189
|
+
description: "Generate iOS pairing QR/setup code",
|
|
190
|
+
hasSubcommands: false,
|
|
191
|
+
register: async (program) => {
|
|
192
|
+
(await import("./qr-cli-D8FxwnnL.mjs")).registerQrCli(program);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "clawbot",
|
|
197
|
+
description: "Legacy clawbot command aliases",
|
|
198
|
+
hasSubcommands: true,
|
|
199
|
+
register: async (program) => {
|
|
200
|
+
(await import("./clawbot-cli-BZbqCXpT.mjs")).registerClawbotCli(program);
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "pairing",
|
|
205
|
+
description: "Secure DM pairing (approve inbound requests)",
|
|
206
|
+
hasSubcommands: true,
|
|
207
|
+
register: async (program) => {
|
|
208
|
+
const { registerPluginCliCommands } = await import("./cli-CDO-BM0n.mjs");
|
|
209
|
+
const config = await loadValidatedConfigForPluginRegistration();
|
|
210
|
+
if (config) registerPluginCliCommands(program, config);
|
|
211
|
+
(await import("./pairing-cli-0PRXJupo.mjs")).registerPairingCli(program);
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "plugins",
|
|
216
|
+
description: "Manage OpenClaw plugins and extensions",
|
|
217
|
+
hasSubcommands: true,
|
|
218
|
+
register: async (program) => {
|
|
219
|
+
(await import("./plugins-cli-BkrCbO40.mjs")).registerPluginsCli(program);
|
|
220
|
+
const { registerPluginCliCommands } = await import("./cli-CDO-BM0n.mjs");
|
|
221
|
+
const config = await loadValidatedConfigForPluginRegistration();
|
|
222
|
+
if (config) registerPluginCliCommands(program, config);
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "channels",
|
|
227
|
+
description: "Manage connected chat channels (Telegram, Discord, etc.)",
|
|
228
|
+
hasSubcommands: true,
|
|
229
|
+
register: async (program) => {
|
|
230
|
+
(await import("./channels-cli-D37UUOt7.mjs")).registerChannelsCli(program);
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: "directory",
|
|
235
|
+
description: "Lookup contact and group IDs (self, peers, groups) for supported chat channels",
|
|
236
|
+
hasSubcommands: true,
|
|
237
|
+
register: async (program) => {
|
|
238
|
+
(await import("./directory-cli-gZpcvyTh.mjs")).registerDirectoryCli(program);
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "security",
|
|
243
|
+
description: "Security tools and local config audits",
|
|
244
|
+
hasSubcommands: true,
|
|
245
|
+
register: async (program) => {
|
|
246
|
+
(await import("./security-cli-2645HOPv.mjs")).registerSecurityCli(program);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: "secrets",
|
|
251
|
+
description: "Secrets runtime reload controls",
|
|
252
|
+
hasSubcommands: true,
|
|
253
|
+
register: async (program) => {
|
|
254
|
+
(await import("./secrets-cli-DzhyfbP0.mjs")).registerSecretsCli(program);
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: "skills",
|
|
259
|
+
description: "List and inspect available skills",
|
|
260
|
+
hasSubcommands: true,
|
|
261
|
+
register: async (program) => {
|
|
262
|
+
(await import("./skills-cli-CJwRCbhJ.mjs")).registerSkillsCli(program);
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "update",
|
|
267
|
+
description: "Update OpenClaw and inspect update channel status",
|
|
268
|
+
hasSubcommands: true,
|
|
269
|
+
register: async (program) => {
|
|
270
|
+
(await import("./update-cli-DWGkI141.mjs")).registerUpdateCli(program);
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "completion",
|
|
275
|
+
description: "Generate shell completion script",
|
|
276
|
+
hasSubcommands: false,
|
|
277
|
+
register: async (program) => {
|
|
278
|
+
(await import("./completion-cli-DxUdlYt0.mjs")).registerCompletionCli(program);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
];
|
|
282
|
+
function getSubCliEntries$1() {
|
|
283
|
+
return getSubCliEntries();
|
|
284
|
+
}
|
|
285
|
+
async function registerSubCliByName(program, name) {
|
|
286
|
+
const entry = entries.find((candidate) => candidate.name === name);
|
|
287
|
+
if (!entry) return false;
|
|
288
|
+
removeCommandByName(program, entry.name);
|
|
289
|
+
await entry.register(program);
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
function registerLazyCommand(program, entry) {
|
|
293
|
+
const placeholder = program.command(entry.name).description(entry.description);
|
|
294
|
+
placeholder.allowUnknownOption(true);
|
|
295
|
+
placeholder.allowExcessArguments(true);
|
|
296
|
+
placeholder.action(async (...actionArgs) => {
|
|
297
|
+
removeCommand(program, placeholder);
|
|
298
|
+
await entry.register(program);
|
|
299
|
+
await reparseProgramFromActionArgs(program, actionArgs);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
function registerSubCliCommands(program, argv = process.argv) {
|
|
303
|
+
if (shouldEagerRegisterSubcommands(argv)) {
|
|
304
|
+
for (const entry of entries) entry.register(program);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
const primary = getPrimaryCommand(argv);
|
|
308
|
+
if (primary && shouldRegisterPrimaryOnly(argv)) {
|
|
309
|
+
const entry = entries.find((candidate) => candidate.name === primary);
|
|
310
|
+
if (entry) {
|
|
311
|
+
registerLazyCommand(program, entry);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
for (const candidate of entries) registerLazyCommand(program, candidate);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
//#endregion
|
|
319
|
+
export { removeCommandByName as a, registerSubCliCommands as i, loadValidatedConfigForPluginRegistration as n, reparseProgramFromActionArgs as o, registerSubCliByName as r, getSubCliEntries$1 as t };
|