@heretek-ai/openclaw 2026.3.30 → 2026.3.32
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-BnmWhMEa.mjs +214 -0
- package/dist/chunks/command-registry-CCc0vZoH.mjs +14 -0
- package/dist/chunks/command-registry-CLOY087q.mjs +14 -0
- package/dist/chunks/command-registry-CjAG33h3.mjs +14 -0
- package/dist/chunks/command-registry-DPx6M6gw.mjs +214 -0
- package/dist/chunks/completion-cli-BDWbmV-o.mjs +448 -0
- package/dist/chunks/completion-cli-CBrKGQfJ.mjs +17 -0
- package/dist/chunks/completion-cli-CpJ8IzQO.mjs +448 -0
- package/dist/chunks/completion-cli-CwouPhbG.mjs +17 -0
- package/dist/chunks/completion-cli-DuMZk0lN.mjs +448 -0
- package/dist/chunks/completion-cli-DxUdlYt0.mjs +17 -0
- package/dist/chunks/doctor-completion-1UqU9aiy.mjs +92 -0
- package/dist/chunks/doctor-completion-B_LLsQm-.mjs +92 -0
- package/dist/chunks/doctor-completion-CCuL-Cen.mjs +92 -0
- package/dist/chunks/gateway-cli-Bc4J6-zj.mjs +43508 -0
- package/dist/chunks/gateway-cli-CqAlS2xh.mjs +43508 -0
- package/dist/chunks/gateway-cli-CxfnMGx8.mjs +43508 -0
- package/dist/chunks/onboard-CRZ2jxOE.mjs +601 -0
- package/dist/chunks/onboard-CyzbNCBF.mjs +601 -0
- package/dist/chunks/onboard-Y9qZW5yw.mjs +601 -0
- package/dist/chunks/program-B27s-BhZ.mjs +163 -0
- package/dist/chunks/program-B3JSAo3Q.mjs +163 -0
- package/dist/chunks/program-DVTI5ouc.mjs +163 -0
- package/dist/chunks/prompt-select-styled-AhC9B2Sr.mjs +5035 -0
- package/dist/chunks/prompt-select-styled-DWTJpQCH.mjs +5035 -0
- package/dist/chunks/prompt-select-styled-PxJbW1Dj.mjs +5035 -0
- package/dist/chunks/register.maintenance-DkQKQI29.mjs +685 -0
- package/dist/chunks/register.maintenance-DrxPWWzR.mjs +685 -0
- package/dist/chunks/register.maintenance-ofEvddjM.mjs +685 -0
- package/dist/chunks/register.onboard-3m3OGP7x.mjs +168 -0
- package/dist/chunks/register.onboard-BpL-OvP9.mjs +168 -0
- package/dist/chunks/register.onboard-CvtQ4Z6V.mjs +168 -0
- package/dist/chunks/register.setup-Dz3jKcQw.mjs +188 -0
- package/dist/chunks/register.setup-NRV53Eo_.mjs +188 -0
- package/dist/chunks/register.setup-xf9cH3sc.mjs +188 -0
- package/dist/chunks/register.subclis-B6xOze_R.mjs +319 -0
- package/dist/chunks/register.subclis-B_qUKZPW.mjs +13 -0
- package/dist/chunks/register.subclis-BvClctGE.mjs +319 -0
- package/dist/chunks/register.subclis-CXtcQnsP.mjs +13 -0
- package/dist/chunks/register.subclis-Dd7Q2x2W.mjs +13 -0
- package/dist/chunks/register.subclis-Dj9qGYdr.mjs +319 -0
- package/dist/chunks/run-main-BYaCWOd9.mjs +437 -0
- package/dist/chunks/run-main-CpZzBbaq.mjs +437 -0
- package/dist/chunks/run-main-nT8E6iSo.mjs +437 -0
- package/dist/chunks/setup-BufxzaUK.mjs +399 -0
- package/dist/chunks/setup-DHU6h2yc.mjs +399 -0
- package/dist/chunks/setup-Ddj3KzQ7.mjs +399 -0
- package/dist/chunks/setup.finalize-Cc2mg8-p.mjs +544 -0
- package/dist/chunks/setup.finalize-DVacBRaT.mjs +544 -0
- package/dist/chunks/setup.finalize-ZR-Hv0hQ.mjs +544 -0
- package/dist/chunks/update-cli-DK2TX2U4.mjs +1632 -0
- package/dist/chunks/update-cli-DWGkI141.mjs +1632 -0
- package/dist/chunks/update-cli-JcUKNsam.mjs +1632 -0
- package/dist/entry.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +134 -134
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1774380850062,"head":"7020203275d0af6632ad2369a4bd9cfcb1f02b33"}
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
13931627181f5d937516d85f77ace90cf979c7bd9132771ff48afaec13d7c2e9
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { E as getPrimaryCommand, k as hasHelpOrVersion } from "./logger-vRSRu9wD.mjs";
|
|
2
|
+
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-BvClctGE.mjs";
|
|
3
|
+
import { t as getCoreCliCommandDescriptors } from "./core-command-descriptors-TFRcY_t7.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/program/command-registry.ts
|
|
6
|
+
const shouldRegisterCorePrimaryOnly = (argv) => {
|
|
7
|
+
if (hasHelpOrVersion(argv)) return false;
|
|
8
|
+
return true;
|
|
9
|
+
};
|
|
10
|
+
const coreEntries = [
|
|
11
|
+
{
|
|
12
|
+
commands: [{
|
|
13
|
+
name: "setup",
|
|
14
|
+
description: "Initialize local config and agent workspace",
|
|
15
|
+
hasSubcommands: false
|
|
16
|
+
}],
|
|
17
|
+
register: async ({ program }) => {
|
|
18
|
+
(await import("./register.setup-Dz3jKcQw.mjs")).registerSetupCommand(program);
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
commands: [{
|
|
23
|
+
name: "onboard",
|
|
24
|
+
description: "Interactive onboarding for gateway, workspace, and skills",
|
|
25
|
+
hasSubcommands: false
|
|
26
|
+
}],
|
|
27
|
+
register: async ({ program }) => {
|
|
28
|
+
(await import("./register.onboard-CvtQ4Z6V.mjs")).registerOnboardCommand(program);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
commands: [{
|
|
33
|
+
name: "configure",
|
|
34
|
+
description: "Interactive configuration for credentials, channels, gateway, and agent defaults",
|
|
35
|
+
hasSubcommands: false
|
|
36
|
+
}],
|
|
37
|
+
register: async ({ program }) => {
|
|
38
|
+
(await import("./register.configure-C35miHGC.mjs")).registerConfigureCommand(program);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
commands: [{
|
|
43
|
+
name: "config",
|
|
44
|
+
description: "Non-interactive config helpers (get/set/unset/file/validate). Default: starts guided setup.",
|
|
45
|
+
hasSubcommands: true
|
|
46
|
+
}],
|
|
47
|
+
register: async ({ program }) => {
|
|
48
|
+
(await import("./config-cli-BuJIvAcn.mjs")).registerConfigCli(program);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
commands: [{
|
|
53
|
+
name: "backup",
|
|
54
|
+
description: "Create and verify local backup archives for OpenClaw state",
|
|
55
|
+
hasSubcommands: true
|
|
56
|
+
}],
|
|
57
|
+
register: async ({ program }) => {
|
|
58
|
+
(await import("./register.backup-xkhaqqi_.mjs")).registerBackupCommand(program);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
commands: [
|
|
63
|
+
{
|
|
64
|
+
name: "doctor",
|
|
65
|
+
description: "Health checks + quick fixes for the gateway and channels",
|
|
66
|
+
hasSubcommands: false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "dashboard",
|
|
70
|
+
description: "Open the Control UI with your current token",
|
|
71
|
+
hasSubcommands: false
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "reset",
|
|
75
|
+
description: "Reset local config/state (keeps the CLI installed)",
|
|
76
|
+
hasSubcommands: false
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "uninstall",
|
|
80
|
+
description: "Uninstall the gateway service + local data (CLI remains)",
|
|
81
|
+
hasSubcommands: false
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
register: async ({ program }) => {
|
|
85
|
+
(await import("./register.maintenance-DrxPWWzR.mjs")).registerMaintenanceCommands(program);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
commands: [{
|
|
90
|
+
name: "message",
|
|
91
|
+
description: "Send, read, and manage messages",
|
|
92
|
+
hasSubcommands: true
|
|
93
|
+
}],
|
|
94
|
+
register: async ({ program, ctx }) => {
|
|
95
|
+
(await import("./register.message-ClqmrUu2.mjs")).registerMessageCommands(program, ctx);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
commands: [{
|
|
100
|
+
name: "memory",
|
|
101
|
+
description: "Search and reindex memory files",
|
|
102
|
+
hasSubcommands: true
|
|
103
|
+
}],
|
|
104
|
+
register: async ({ program }) => {
|
|
105
|
+
(await import("../cli/memory-cli.mjs")).registerMemoryCli(program);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
commands: [{
|
|
110
|
+
name: "mcp",
|
|
111
|
+
description: "Manage embedded Pi MCP servers",
|
|
112
|
+
hasSubcommands: true
|
|
113
|
+
}],
|
|
114
|
+
register: async ({ program }) => {
|
|
115
|
+
(await import("./mcp-cli-C-78eMUr.mjs")).registerMcpCli(program);
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
commands: [{
|
|
120
|
+
name: "agent",
|
|
121
|
+
description: "Run one agent turn via the Gateway",
|
|
122
|
+
hasSubcommands: false
|
|
123
|
+
}, {
|
|
124
|
+
name: "agents",
|
|
125
|
+
description: "Manage isolated agents (workspaces, auth, routing)",
|
|
126
|
+
hasSubcommands: true
|
|
127
|
+
}],
|
|
128
|
+
register: async ({ program, ctx }) => {
|
|
129
|
+
(await import("./register.agent-FGxnXwju.mjs")).registerAgentCommands(program, { agentChannelOptions: ctx.agentChannelOptions });
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
commands: [
|
|
134
|
+
{
|
|
135
|
+
name: "status",
|
|
136
|
+
description: "Show channel health and recent session recipients",
|
|
137
|
+
hasSubcommands: false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "health",
|
|
141
|
+
description: "Fetch health from the running gateway",
|
|
142
|
+
hasSubcommands: false
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "sessions",
|
|
146
|
+
description: "List stored conversation sessions",
|
|
147
|
+
hasSubcommands: true
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
register: async ({ program }) => {
|
|
151
|
+
(await import("./register.status-health-sessions-BOU7-IS_.mjs")).registerStatusHealthSessionsCommands(program);
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
commands: [{
|
|
156
|
+
name: "browser",
|
|
157
|
+
description: "Manage OpenClaw's dedicated browser (Chrome/Chromium)",
|
|
158
|
+
hasSubcommands: true
|
|
159
|
+
}],
|
|
160
|
+
register: async ({ program }) => {
|
|
161
|
+
(await import("./browser-cli-Dh3oTAem.mjs")).registerBrowserCli(program);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
function getCoreCliCommandNames() {
|
|
166
|
+
return getCoreCliCommandDescriptors().map((command) => command.name);
|
|
167
|
+
}
|
|
168
|
+
function removeEntryCommands(program, entry) {
|
|
169
|
+
for (const cmd of entry.commands) removeCommandByName(program, cmd.name);
|
|
170
|
+
}
|
|
171
|
+
function registerLazyCoreCommand(program, ctx, entry, command) {
|
|
172
|
+
const placeholder = program.command(command.name).description(command.description);
|
|
173
|
+
placeholder.allowUnknownOption(true);
|
|
174
|
+
placeholder.allowExcessArguments(true);
|
|
175
|
+
placeholder.action(async (...actionArgs) => {
|
|
176
|
+
removeEntryCommands(program, entry);
|
|
177
|
+
await entry.register({
|
|
178
|
+
program,
|
|
179
|
+
ctx,
|
|
180
|
+
argv: process.argv
|
|
181
|
+
});
|
|
182
|
+
await reparseProgramFromActionArgs(program, actionArgs);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
async function registerCoreCliByName(program, ctx, name, argv = process.argv) {
|
|
186
|
+
const entry = coreEntries.find((candidate) => candidate.commands.some((cmd) => cmd.name === name));
|
|
187
|
+
if (!entry) return false;
|
|
188
|
+
removeEntryCommands(program, entry);
|
|
189
|
+
await entry.register({
|
|
190
|
+
program,
|
|
191
|
+
ctx,
|
|
192
|
+
argv
|
|
193
|
+
});
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
function registerCoreCliCommands(program, ctx, argv) {
|
|
197
|
+
const primary = getPrimaryCommand(argv);
|
|
198
|
+
if (primary && shouldRegisterCorePrimaryOnly(argv)) {
|
|
199
|
+
const entry = coreEntries.find((candidate) => candidate.commands.some((cmd) => cmd.name === primary));
|
|
200
|
+
if (entry) {
|
|
201
|
+
const cmd = entry.commands.find((c) => c.name === primary);
|
|
202
|
+
if (cmd) registerLazyCoreCommand(program, ctx, entry, cmd);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
for (const entry of coreEntries) for (const cmd of entry.commands) registerLazyCoreCommand(program, ctx, entry, cmd);
|
|
207
|
+
}
|
|
208
|
+
function registerProgramCommands(program, ctx, argv = process.argv) {
|
|
209
|
+
registerCoreCliCommands(program, ctx, argv);
|
|
210
|
+
registerSubCliCommands(program, argv);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
export { registerProgramCommands as i, registerCoreCliByName as n, registerCoreCliCommands as r, getCoreCliCommandNames as t };
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { E as getPrimaryCommand, k as hasHelpOrVersion } from "./logger-vRSRu9wD.mjs";
|
|
2
|
+
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-Dj9qGYdr.mjs";
|
|
3
|
+
import { t as getCoreCliCommandDescriptors } from "./core-command-descriptors-TFRcY_t7.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/program/command-registry.ts
|
|
6
|
+
const shouldRegisterCorePrimaryOnly = (argv) => {
|
|
7
|
+
if (hasHelpOrVersion(argv)) return false;
|
|
8
|
+
return true;
|
|
9
|
+
};
|
|
10
|
+
const coreEntries = [
|
|
11
|
+
{
|
|
12
|
+
commands: [{
|
|
13
|
+
name: "setup",
|
|
14
|
+
description: "Initialize local config and agent workspace",
|
|
15
|
+
hasSubcommands: false
|
|
16
|
+
}],
|
|
17
|
+
register: async ({ program }) => {
|
|
18
|
+
(await import("./register.setup-NRV53Eo_.mjs")).registerSetupCommand(program);
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
commands: [{
|
|
23
|
+
name: "onboard",
|
|
24
|
+
description: "Interactive onboarding for gateway, workspace, and skills",
|
|
25
|
+
hasSubcommands: false
|
|
26
|
+
}],
|
|
27
|
+
register: async ({ program }) => {
|
|
28
|
+
(await import("./register.onboard-BpL-OvP9.mjs")).registerOnboardCommand(program);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
commands: [{
|
|
33
|
+
name: "configure",
|
|
34
|
+
description: "Interactive configuration for credentials, channels, gateway, and agent defaults",
|
|
35
|
+
hasSubcommands: false
|
|
36
|
+
}],
|
|
37
|
+
register: async ({ program }) => {
|
|
38
|
+
(await import("./register.configure-C35miHGC.mjs")).registerConfigureCommand(program);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
commands: [{
|
|
43
|
+
name: "config",
|
|
44
|
+
description: "Non-interactive config helpers (get/set/unset/file/validate). Default: starts guided setup.",
|
|
45
|
+
hasSubcommands: true
|
|
46
|
+
}],
|
|
47
|
+
register: async ({ program }) => {
|
|
48
|
+
(await import("./config-cli-BuJIvAcn.mjs")).registerConfigCli(program);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
commands: [{
|
|
53
|
+
name: "backup",
|
|
54
|
+
description: "Create and verify local backup archives for OpenClaw state",
|
|
55
|
+
hasSubcommands: true
|
|
56
|
+
}],
|
|
57
|
+
register: async ({ program }) => {
|
|
58
|
+
(await import("./register.backup-xkhaqqi_.mjs")).registerBackupCommand(program);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
commands: [
|
|
63
|
+
{
|
|
64
|
+
name: "doctor",
|
|
65
|
+
description: "Health checks + quick fixes for the gateway and channels",
|
|
66
|
+
hasSubcommands: false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "dashboard",
|
|
70
|
+
description: "Open the Control UI with your current token",
|
|
71
|
+
hasSubcommands: false
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "reset",
|
|
75
|
+
description: "Reset local config/state (keeps the CLI installed)",
|
|
76
|
+
hasSubcommands: false
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "uninstall",
|
|
80
|
+
description: "Uninstall the gateway service + local data (CLI remains)",
|
|
81
|
+
hasSubcommands: false
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
register: async ({ program }) => {
|
|
85
|
+
(await import("./register.maintenance-DkQKQI29.mjs")).registerMaintenanceCommands(program);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
commands: [{
|
|
90
|
+
name: "message",
|
|
91
|
+
description: "Send, read, and manage messages",
|
|
92
|
+
hasSubcommands: true
|
|
93
|
+
}],
|
|
94
|
+
register: async ({ program, ctx }) => {
|
|
95
|
+
(await import("./register.message-ClqmrUu2.mjs")).registerMessageCommands(program, ctx);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
commands: [{
|
|
100
|
+
name: "memory",
|
|
101
|
+
description: "Search and reindex memory files",
|
|
102
|
+
hasSubcommands: true
|
|
103
|
+
}],
|
|
104
|
+
register: async ({ program }) => {
|
|
105
|
+
(await import("../cli/memory-cli.mjs")).registerMemoryCli(program);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
commands: [{
|
|
110
|
+
name: "mcp",
|
|
111
|
+
description: "Manage embedded Pi MCP servers",
|
|
112
|
+
hasSubcommands: true
|
|
113
|
+
}],
|
|
114
|
+
register: async ({ program }) => {
|
|
115
|
+
(await import("./mcp-cli-C-78eMUr.mjs")).registerMcpCli(program);
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
commands: [{
|
|
120
|
+
name: "agent",
|
|
121
|
+
description: "Run one agent turn via the Gateway",
|
|
122
|
+
hasSubcommands: false
|
|
123
|
+
}, {
|
|
124
|
+
name: "agents",
|
|
125
|
+
description: "Manage isolated agents (workspaces, auth, routing)",
|
|
126
|
+
hasSubcommands: true
|
|
127
|
+
}],
|
|
128
|
+
register: async ({ program, ctx }) => {
|
|
129
|
+
(await import("./register.agent-FGxnXwju.mjs")).registerAgentCommands(program, { agentChannelOptions: ctx.agentChannelOptions });
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
commands: [
|
|
134
|
+
{
|
|
135
|
+
name: "status",
|
|
136
|
+
description: "Show channel health and recent session recipients",
|
|
137
|
+
hasSubcommands: false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "health",
|
|
141
|
+
description: "Fetch health from the running gateway",
|
|
142
|
+
hasSubcommands: false
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "sessions",
|
|
146
|
+
description: "List stored conversation sessions",
|
|
147
|
+
hasSubcommands: true
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
register: async ({ program }) => {
|
|
151
|
+
(await import("./register.status-health-sessions-BOU7-IS_.mjs")).registerStatusHealthSessionsCommands(program);
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
commands: [{
|
|
156
|
+
name: "browser",
|
|
157
|
+
description: "Manage OpenClaw's dedicated browser (Chrome/Chromium)",
|
|
158
|
+
hasSubcommands: true
|
|
159
|
+
}],
|
|
160
|
+
register: async ({ program }) => {
|
|
161
|
+
(await import("./browser-cli-Dh3oTAem.mjs")).registerBrowserCli(program);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
function getCoreCliCommandNames() {
|
|
166
|
+
return getCoreCliCommandDescriptors().map((command) => command.name);
|
|
167
|
+
}
|
|
168
|
+
function removeEntryCommands(program, entry) {
|
|
169
|
+
for (const cmd of entry.commands) removeCommandByName(program, cmd.name);
|
|
170
|
+
}
|
|
171
|
+
function registerLazyCoreCommand(program, ctx, entry, command) {
|
|
172
|
+
const placeholder = program.command(command.name).description(command.description);
|
|
173
|
+
placeholder.allowUnknownOption(true);
|
|
174
|
+
placeholder.allowExcessArguments(true);
|
|
175
|
+
placeholder.action(async (...actionArgs) => {
|
|
176
|
+
removeEntryCommands(program, entry);
|
|
177
|
+
await entry.register({
|
|
178
|
+
program,
|
|
179
|
+
ctx,
|
|
180
|
+
argv: process.argv
|
|
181
|
+
});
|
|
182
|
+
await reparseProgramFromActionArgs(program, actionArgs);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
async function registerCoreCliByName(program, ctx, name, argv = process.argv) {
|
|
186
|
+
const entry = coreEntries.find((candidate) => candidate.commands.some((cmd) => cmd.name === name));
|
|
187
|
+
if (!entry) return false;
|
|
188
|
+
removeEntryCommands(program, entry);
|
|
189
|
+
await entry.register({
|
|
190
|
+
program,
|
|
191
|
+
ctx,
|
|
192
|
+
argv
|
|
193
|
+
});
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
function registerCoreCliCommands(program, ctx, argv) {
|
|
197
|
+
const primary = getPrimaryCommand(argv);
|
|
198
|
+
if (primary && shouldRegisterCorePrimaryOnly(argv)) {
|
|
199
|
+
const entry = coreEntries.find((candidate) => candidate.commands.some((cmd) => cmd.name === primary));
|
|
200
|
+
if (entry) {
|
|
201
|
+
const cmd = entry.commands.find((c) => c.name === primary);
|
|
202
|
+
if (cmd) registerLazyCoreCommand(program, ctx, entry, cmd);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
for (const entry of coreEntries) for (const cmd of entry.commands) registerLazyCoreCommand(program, ctx, entry, cmd);
|
|
207
|
+
}
|
|
208
|
+
function registerProgramCommands(program, ctx, argv = process.argv) {
|
|
209
|
+
registerCoreCliCommands(program, ctx, argv);
|
|
210
|
+
registerSubCliCommands(program, argv);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
export { registerProgramCommands as i, registerCoreCliByName as n, registerCoreCliCommands as r, getCoreCliCommandNames as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./logger-vRSRu9wD.mjs";
|
|
2
|
+
import "./paths-CNST7z3O.mjs";
|
|
3
|
+
import "./tmp-openclaw-dir-BeWwpCKM.mjs";
|
|
4
|
+
import "./theme-w86ra_7m.mjs";
|
|
5
|
+
import "./globals-DZFR3wyP.mjs";
|
|
6
|
+
import "./subsystem-yLe4Gjha.mjs";
|
|
7
|
+
import "./ansi-BJ9IOlIp.mjs";
|
|
8
|
+
import "./boolean-Bwxxidw8.mjs";
|
|
9
|
+
import "./env-9fhyzTaG.mjs";
|
|
10
|
+
import "./register.subclis-BvClctGE.mjs";
|
|
11
|
+
import { n as getCoreCliCommandsWithSubcommands, t as getCoreCliCommandDescriptors } from "./core-command-descriptors-TFRcY_t7.mjs";
|
|
12
|
+
import { i as registerProgramCommands, n as registerCoreCliByName, r as registerCoreCliCommands, t as getCoreCliCommandNames } from "./command-registry-BeAmVjny.mjs";
|
|
13
|
+
|
|
14
|
+
export { registerCoreCliByName };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./logger-vRSRu9wD.mjs";
|
|
2
|
+
import "./paths-CNST7z3O.mjs";
|
|
3
|
+
import "./tmp-openclaw-dir-BeWwpCKM.mjs";
|
|
4
|
+
import "./theme-w86ra_7m.mjs";
|
|
5
|
+
import "./globals-DZFR3wyP.mjs";
|
|
6
|
+
import "./subsystem-yLe4Gjha.mjs";
|
|
7
|
+
import "./ansi-BJ9IOlIp.mjs";
|
|
8
|
+
import "./boolean-Bwxxidw8.mjs";
|
|
9
|
+
import "./env-9fhyzTaG.mjs";
|
|
10
|
+
import "./register.subclis-Dj9qGYdr.mjs";
|
|
11
|
+
import { n as getCoreCliCommandsWithSubcommands, t as getCoreCliCommandDescriptors } from "./core-command-descriptors-TFRcY_t7.mjs";
|
|
12
|
+
import { i as registerProgramCommands, n as registerCoreCliByName, r as registerCoreCliCommands, t as getCoreCliCommandNames } from "./command-registry-BnmWhMEa.mjs";
|
|
13
|
+
|
|
14
|
+
export { registerCoreCliByName };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./logger-vRSRu9wD.mjs";
|
|
2
|
+
import "./paths-CNST7z3O.mjs";
|
|
3
|
+
import "./tmp-openclaw-dir-BeWwpCKM.mjs";
|
|
4
|
+
import "./theme-w86ra_7m.mjs";
|
|
5
|
+
import "./globals-DZFR3wyP.mjs";
|
|
6
|
+
import "./subsystem-yLe4Gjha.mjs";
|
|
7
|
+
import "./ansi-BJ9IOlIp.mjs";
|
|
8
|
+
import "./boolean-Bwxxidw8.mjs";
|
|
9
|
+
import "./env-9fhyzTaG.mjs";
|
|
10
|
+
import "./register.subclis-B6xOze_R.mjs";
|
|
11
|
+
import { n as getCoreCliCommandsWithSubcommands, t as getCoreCliCommandDescriptors } from "./core-command-descriptors-TFRcY_t7.mjs";
|
|
12
|
+
import { i as registerProgramCommands, n as registerCoreCliByName, r as registerCoreCliCommands, t as getCoreCliCommandNames } from "./command-registry-DPx6M6gw.mjs";
|
|
13
|
+
|
|
14
|
+
export { registerCoreCliByName };
|