@vm0/cli 9.222.11 → 9.223.0
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/{agent-XNVQRMKI.js → agent-ZYBFKGZD.js} +4 -4
- package/{banking-QBTNNOCQ.js → banking-5GSHA6MQ.js} +2 -2
- package/{chat-ELAJKQXT.js → chat-D4WIQV73.js} +2 -2
- package/{chunk-ZPWEXRMA.js → chunk-3RHMXHVV.js} +3 -3
- package/{chunk-5EPGSDIQ.js → chunk-6OSJ34QC.js} +26 -17
- package/{chunk-5EPGSDIQ.js.map → chunk-6OSJ34QC.js.map} +1 -1
- package/{chunk-JOOQB7W3.js → chunk-CP7DUCZX.js} +2 -2
- package/{chunk-VTG6TDYL.js → chunk-JK2FKDJA.js} +2 -2
- package/{chunk-MJ4W2C3Z.js → chunk-R4UO2IJL.js} +3 -3
- package/{chunk-KBDCWC3F.js → chunk-T4KQF7JE.js} +129 -1
- package/chunk-T4KQF7JE.js.map +1 -0
- package/{chunk-Y4YHS5UO.js → chunk-UEP6QOTD.js} +2 -2
- package/{chunk-7ZJOZZXZ.js → chunk-UVNA7OIV.js} +2 -2
- package/{chunk-F774K6TY.js → chunk-X43ZEB2I.js} +2 -2
- package/{computer-use-XXPDTJSQ.js → computer-use-PKNPWMMH.js} +2 -2
- package/{connector-PWDJ3R6G.js → connector-LYITOPC7.js} +2 -2
- package/{credit-MYBUWRHP.js → credit-N6K3UPJI.js} +2 -2
- package/{developer-support-65OQ2RK4.js → developer-support-AAIH6JKB.js} +2 -2
- package/{doctor-2U4HK4AX.js → doctor-7QULTHB2.js} +5 -5
- package/{generate-UEDRCAKX.js → generate-ZGGB4VRQ.js} +2 -2
- package/{github-R6JKL74U.js → github-WKH4K6AO.js} +2 -2
- package/{goal-BG47S2RP.js → goal-BDCQT2KB.js} +2 -2
- package/{host-2VS2KOZQ.js → host-7SYB4J6N.js} +2 -2
- package/index.js +13 -13
- package/index.js.map +1 -1
- package/{logs-XFVZAKVG.js → logs-7222H6Z2.js} +6 -6
- package/{maps-ZBULOEZW.js → maps-FC4F3FKH.js} +2 -2
- package/{model-BFHGQJ5U.js → model-COXJNPG4.js} +3 -3
- package/{model-provider-OUSOKSWW.js → model-provider-JVNBJOH7.js} +3 -3
- package/{org-RI2EYUW7.js → org-47H2J7JE.js} +2 -2
- package/package.json +1 -1
- package/{phone-SNLGLD3J.js → phone-K25UXZHC.js} +2 -2
- package/{preference-XDSQRZWM.js → preference-LGHDHJZM.js} +2 -2
- package/relationship-BAUULK6G.js +188 -0
- package/relationship-BAUULK6G.js.map +1 -0
- package/{resource-BA4FQCNQ.js → resource-PJQX5QDW.js} +2 -2
- package/{search-KXVRANLT.js → search-MIJ7EYQZ.js} +6 -6
- package/{secret-NFJQKUPS.js → secret-CHWXYJSQ.js} +3 -3
- package/{slack-JPM5WVX6.js → slack-RMYGICYB.js} +2 -2
- package/{telegram-BNX4UZTT.js → telegram-7AXM2K2U.js} +2 -2
- package/{variable-IAIPAH3T.js → variable-Z44R6AF3.js} +2 -2
- package/{web-3TJGHZNA.js → web-UTOHAAUX.js} +2 -2
- package/{whoami-OVIXXMRR.js → whoami-HRV7WG4C.js} +4 -4
- package/{workflow-WWMTJDLF.js → workflow-HTAA3KWV.js} +2 -2
- package/zero.js +38 -30
- package/zero.js.map +1 -1
- package/chunk-KBDCWC3F.js.map +0 -1
- /package/{agent-XNVQRMKI.js.map → agent-ZYBFKGZD.js.map} +0 -0
- /package/{banking-QBTNNOCQ.js.map → banking-5GSHA6MQ.js.map} +0 -0
- /package/{chat-ELAJKQXT.js.map → chat-D4WIQV73.js.map} +0 -0
- /package/{chunk-ZPWEXRMA.js.map → chunk-3RHMXHVV.js.map} +0 -0
- /package/{chunk-JOOQB7W3.js.map → chunk-CP7DUCZX.js.map} +0 -0
- /package/{chunk-VTG6TDYL.js.map → chunk-JK2FKDJA.js.map} +0 -0
- /package/{chunk-MJ4W2C3Z.js.map → chunk-R4UO2IJL.js.map} +0 -0
- /package/{chunk-Y4YHS5UO.js.map → chunk-UEP6QOTD.js.map} +0 -0
- /package/{chunk-7ZJOZZXZ.js.map → chunk-UVNA7OIV.js.map} +0 -0
- /package/{chunk-F774K6TY.js.map → chunk-X43ZEB2I.js.map} +0 -0
- /package/{computer-use-XXPDTJSQ.js.map → computer-use-PKNPWMMH.js.map} +0 -0
- /package/{connector-PWDJ3R6G.js.map → connector-LYITOPC7.js.map} +0 -0
- /package/{credit-MYBUWRHP.js.map → credit-N6K3UPJI.js.map} +0 -0
- /package/{developer-support-65OQ2RK4.js.map → developer-support-AAIH6JKB.js.map} +0 -0
- /package/{doctor-2U4HK4AX.js.map → doctor-7QULTHB2.js.map} +0 -0
- /package/{generate-UEDRCAKX.js.map → generate-ZGGB4VRQ.js.map} +0 -0
- /package/{github-R6JKL74U.js.map → github-WKH4K6AO.js.map} +0 -0
- /package/{goal-BG47S2RP.js.map → goal-BDCQT2KB.js.map} +0 -0
- /package/{host-2VS2KOZQ.js.map → host-7SYB4J6N.js.map} +0 -0
- /package/{logs-XFVZAKVG.js.map → logs-7222H6Z2.js.map} +0 -0
- /package/{maps-ZBULOEZW.js.map → maps-FC4F3FKH.js.map} +0 -0
- /package/{model-BFHGQJ5U.js.map → model-COXJNPG4.js.map} +0 -0
- /package/{model-provider-OUSOKSWW.js.map → model-provider-JVNBJOH7.js.map} +0 -0
- /package/{org-RI2EYUW7.js.map → org-47H2J7JE.js.map} +0 -0
- /package/{phone-SNLGLD3J.js.map → phone-K25UXZHC.js.map} +0 -0
- /package/{preference-XDSQRZWM.js.map → preference-LGHDHJZM.js.map} +0 -0
- /package/{resource-BA4FQCNQ.js.map → resource-PJQX5QDW.js.map} +0 -0
- /package/{search-KXVRANLT.js.map → search-MIJ7EYQZ.js.map} +0 -0
- /package/{secret-NFJQKUPS.js.map → secret-CHWXYJSQ.js.map} +0 -0
- /package/{slack-JPM5WVX6.js.map → slack-RMYGICYB.js.map} +0 -0
- /package/{telegram-BNX4UZTT.js.map → telegram-7AXM2K2U.js.map} +0 -0
- /package/{variable-IAIPAH3T.js.map → variable-Z44R6AF3.js.map} +0 -0
- /package/{web-3TJGHZNA.js.map → web-UTOHAAUX.js.map} +0 -0
- /package/{whoami-OVIXXMRR.js.map → whoami-HRV7WG4C.js.map} +0 -0
- /package/{workflow-WWMTJDLF.js.map → workflow-HTAA3KWV.js.map} +0 -0
package/zero.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
configureGlobalProxyFromEnv
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3RHMXHVV.js";
|
|
7
7
|
import {
|
|
8
8
|
decodeZeroTokenPayload
|
|
9
9
|
} from "./chunk-LRHXR7JT.js";
|
|
@@ -21,6 +21,7 @@ var COMMAND_CAPABILITY_MAP = {
|
|
|
21
21
|
workflow: "agent:read",
|
|
22
22
|
goal: ["goal:read", "goal:agent-result:write", "goal:user-control:write"],
|
|
23
23
|
connector: "connector:read",
|
|
24
|
+
relationship: "relationship:read",
|
|
24
25
|
// "schedule" and "automation" are deliberately absent: the removal stubs
|
|
25
26
|
// stay out of token-scoped (agent) help but remain invokable and visible to
|
|
26
27
|
// humans.
|
|
@@ -51,56 +52,63 @@ var ZERO_COMMAND_DEFINITIONS = [
|
|
|
51
52
|
name: "org",
|
|
52
53
|
description: "Manage organization settings, members, and providers",
|
|
53
54
|
load: async () => {
|
|
54
|
-
return (await import("./org-
|
|
55
|
+
return (await import("./org-47H2J7JE.js")).zeroOrgCommand;
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
58
|
{
|
|
58
59
|
name: "model",
|
|
59
60
|
description: "List available models and model-switching guidance",
|
|
60
61
|
load: async () => {
|
|
61
|
-
return (await import("./model-
|
|
62
|
+
return (await import("./model-COXJNPG4.js")).zeroModelCommand;
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
{
|
|
65
66
|
name: "model-provider",
|
|
66
67
|
description: "Inspect model provider routing",
|
|
67
68
|
load: async () => {
|
|
68
|
-
return (await import("./model-provider-
|
|
69
|
+
return (await import("./model-provider-JVNBJOH7.js")).zeroModelProviderCommand;
|
|
69
70
|
}
|
|
70
71
|
},
|
|
71
72
|
{
|
|
72
73
|
name: "agent",
|
|
73
74
|
description: "View or manage zero agents",
|
|
74
75
|
load: async () => {
|
|
75
|
-
return (await import("./agent-
|
|
76
|
+
return (await import("./agent-ZYBFKGZD.js")).zeroAgentCommand;
|
|
76
77
|
}
|
|
77
78
|
},
|
|
78
79
|
{
|
|
79
80
|
name: "connector",
|
|
80
81
|
description: "Check third-party service connections (GitHub, Slack, etc.)",
|
|
81
82
|
load: async () => {
|
|
82
|
-
return (await import("./connector-
|
|
83
|
+
return (await import("./connector-LYITOPC7.js")).zeroConnectorCommand;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "relationship",
|
|
88
|
+
description: "Query relationship memory",
|
|
89
|
+
load: async () => {
|
|
90
|
+
return (await import("./relationship-BAUULK6G.js")).zeroRelationshipCommand;
|
|
83
91
|
}
|
|
84
92
|
},
|
|
85
93
|
{
|
|
86
94
|
name: "credit",
|
|
87
95
|
description: "Create a Stripe checkout link to buy credits",
|
|
88
96
|
load: async () => {
|
|
89
|
-
return (await import("./credit-
|
|
97
|
+
return (await import("./credit-N6K3UPJI.js")).zeroCreditCommand;
|
|
90
98
|
}
|
|
91
99
|
},
|
|
92
100
|
{
|
|
93
101
|
name: "doctor",
|
|
94
102
|
description: "Diagnose runtime issues (connector health, permission denials)",
|
|
95
103
|
load: async () => {
|
|
96
|
-
return (await import("./doctor-
|
|
104
|
+
return (await import("./doctor-7QULTHB2.js")).zeroDoctorCommand;
|
|
97
105
|
}
|
|
98
106
|
},
|
|
99
107
|
{
|
|
100
108
|
name: "preference",
|
|
101
109
|
description: "View or update user preferences (timezone, notifications)",
|
|
102
110
|
load: async () => {
|
|
103
|
-
return (await import("./preference-
|
|
111
|
+
return (await import("./preference-LGHDHJZM.js")).zeroPreferenceCommand;
|
|
104
112
|
}
|
|
105
113
|
},
|
|
106
114
|
{
|
|
@@ -121,119 +129,119 @@ var ZERO_COMMAND_DEFINITIONS = [
|
|
|
121
129
|
name: "secret",
|
|
122
130
|
description: "Read or write secrets (API keys, tokens)",
|
|
123
131
|
load: async () => {
|
|
124
|
-
return (await import("./secret-
|
|
132
|
+
return (await import("./secret-CHWXYJSQ.js")).zeroSecretCommand;
|
|
125
133
|
}
|
|
126
134
|
},
|
|
127
135
|
{
|
|
128
136
|
name: "github",
|
|
129
137
|
description: "Upload and download GitHub files",
|
|
130
138
|
load: async () => {
|
|
131
|
-
return (await import("./github-
|
|
139
|
+
return (await import("./github-WKH4K6AO.js")).zeroGithubCommand;
|
|
132
140
|
}
|
|
133
141
|
},
|
|
134
142
|
{
|
|
135
143
|
name: "slack",
|
|
136
144
|
description: "Send messages, upload files, and download files from Slack as the bot",
|
|
137
145
|
load: async () => {
|
|
138
|
-
return (await import("./slack-
|
|
146
|
+
return (await import("./slack-RMYGICYB.js")).zeroSlackCommand;
|
|
139
147
|
}
|
|
140
148
|
},
|
|
141
149
|
{
|
|
142
150
|
name: "telegram",
|
|
143
151
|
description: "Inspect bots, send messages, upload files, and download files from Telegram",
|
|
144
152
|
load: async () => {
|
|
145
|
-
return (await import("./telegram-
|
|
153
|
+
return (await import("./telegram-7AXM2K2U.js")).zeroTelegramCommand;
|
|
146
154
|
}
|
|
147
155
|
},
|
|
148
156
|
{
|
|
149
157
|
name: "phone",
|
|
150
158
|
description: "Send AgentPhone messages, upload files, and download media",
|
|
151
159
|
load: async () => {
|
|
152
|
-
return (await import("./phone-
|
|
160
|
+
return (await import("./phone-K25UXZHC.js")).zeroPhoneCommand;
|
|
153
161
|
}
|
|
154
162
|
},
|
|
155
163
|
{
|
|
156
164
|
name: "variable",
|
|
157
165
|
description: "Read or write non-sensitive configuration values",
|
|
158
166
|
load: async () => {
|
|
159
|
-
return (await import("./variable-
|
|
167
|
+
return (await import("./variable-Z44R6AF3.js")).zeroVariableCommand;
|
|
160
168
|
}
|
|
161
169
|
},
|
|
162
170
|
{
|
|
163
171
|
name: "logs",
|
|
164
172
|
description: "View and search agent run logs",
|
|
165
173
|
load: async () => {
|
|
166
|
-
return (await import("./logs-
|
|
174
|
+
return (await import("./logs-7222H6Z2.js")).zeroLogsCommand;
|
|
167
175
|
}
|
|
168
176
|
},
|
|
169
177
|
{
|
|
170
178
|
name: "search",
|
|
171
179
|
description: "Search logs, chat, or get a recipe for external sources",
|
|
172
180
|
load: async () => {
|
|
173
|
-
return (await import("./search-
|
|
181
|
+
return (await import("./search-MIJ7EYQZ.js")).zeroSearchCommand;
|
|
174
182
|
}
|
|
175
183
|
},
|
|
176
184
|
{
|
|
177
185
|
name: "chat",
|
|
178
186
|
description: "Manage the current web chat thread",
|
|
179
187
|
load: async () => {
|
|
180
|
-
return (await import("./chat-
|
|
188
|
+
return (await import("./chat-D4WIQV73.js")).zeroChatCommand;
|
|
181
189
|
}
|
|
182
190
|
},
|
|
183
191
|
{
|
|
184
192
|
name: "resource",
|
|
185
193
|
description: "Pull registry resources from private R2-backed archives",
|
|
186
194
|
load: async () => {
|
|
187
|
-
return (await import("./resource-
|
|
195
|
+
return (await import("./resource-PJQX5QDW.js")).zeroResourceCommand;
|
|
188
196
|
}
|
|
189
197
|
},
|
|
190
198
|
{
|
|
191
199
|
name: "whoami",
|
|
192
200
|
description: "Show agent identity, run ID, and capabilities",
|
|
193
201
|
load: async () => {
|
|
194
|
-
return (await import("./whoami-
|
|
202
|
+
return (await import("./whoami-HRV7WG4C.js")).zeroWhoamiCommand;
|
|
195
203
|
}
|
|
196
204
|
},
|
|
197
205
|
{
|
|
198
206
|
name: "workflow",
|
|
199
207
|
description: "Manage workflows",
|
|
200
208
|
load: async () => {
|
|
201
|
-
return (await import("./workflow-
|
|
209
|
+
return (await import("./workflow-HTAA3KWV.js")).zeroWorkflowCommand;
|
|
202
210
|
}
|
|
203
211
|
},
|
|
204
212
|
{
|
|
205
213
|
name: "goal",
|
|
206
214
|
description: "Manage the current thread goal",
|
|
207
215
|
load: async () => {
|
|
208
|
-
return (await import("./goal-
|
|
216
|
+
return (await import("./goal-BDCQT2KB.js")).zeroGoalCommand;
|
|
209
217
|
}
|
|
210
218
|
},
|
|
211
219
|
{
|
|
212
220
|
name: "developer-support",
|
|
213
221
|
description: "Submit a diagnostic report to the dev team",
|
|
214
222
|
load: async () => {
|
|
215
|
-
return (await import("./developer-support-
|
|
223
|
+
return (await import("./developer-support-AAIH6JKB.js")).zeroDeveloperSupportCommand;
|
|
216
224
|
}
|
|
217
225
|
},
|
|
218
226
|
{
|
|
219
227
|
name: "computer-use",
|
|
220
228
|
description: "Desktop app computer use through Zero CLI",
|
|
221
229
|
load: async () => {
|
|
222
|
-
return (await import("./computer-use-
|
|
230
|
+
return (await import("./computer-use-PKNPWMMH.js")).zeroComputerUseCommand;
|
|
223
231
|
}
|
|
224
232
|
},
|
|
225
233
|
{
|
|
226
234
|
name: "generate",
|
|
227
235
|
description: "Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance",
|
|
228
236
|
load: async () => {
|
|
229
|
-
return (await import("./generate-
|
|
237
|
+
return (await import("./generate-ZGGB4VRQ.js")).generateCommand;
|
|
230
238
|
}
|
|
231
239
|
},
|
|
232
240
|
{
|
|
233
241
|
name: "web",
|
|
234
242
|
description: "Upload and download files via the web chat endpoint",
|
|
235
243
|
load: async () => {
|
|
236
|
-
return (await import("./web-
|
|
244
|
+
return (await import("./web-UTOHAAUX.js")).zeroWebCommand;
|
|
237
245
|
}
|
|
238
246
|
},
|
|
239
247
|
{
|
|
@@ -247,21 +255,21 @@ var ZERO_COMMAND_DEFINITIONS = [
|
|
|
247
255
|
name: "host",
|
|
248
256
|
description: "Publish static sites and clone owned hosted site files",
|
|
249
257
|
load: async () => {
|
|
250
|
-
return (await import("./host-
|
|
258
|
+
return (await import("./host-7SYB4J6N.js")).zeroHostCommand;
|
|
251
259
|
}
|
|
252
260
|
},
|
|
253
261
|
{
|
|
254
262
|
name: "maps",
|
|
255
263
|
description: "Use managed zero maps services",
|
|
256
264
|
load: async () => {
|
|
257
|
-
return (await import("./maps-
|
|
265
|
+
return (await import("./maps-FC4F3FKH.js")).zeroMapsCommand;
|
|
258
266
|
}
|
|
259
267
|
},
|
|
260
268
|
{
|
|
261
269
|
name: "banking",
|
|
262
270
|
description: "Use managed zero banking services",
|
|
263
271
|
load: async () => {
|
|
264
|
-
return (await import("./banking-
|
|
272
|
+
return (await import("./banking-5GSHA6MQ.js")).zeroBankingCommand;
|
|
265
273
|
}
|
|
266
274
|
}
|
|
267
275
|
];
|
|
@@ -369,7 +377,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
369
377
|
var program = new Command();
|
|
370
378
|
program.name("zero").description(
|
|
371
379
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
372
|
-
).version("9.
|
|
380
|
+
).version("9.223.0").addHelpText("after", () => {
|
|
373
381
|
return buildZeroHelpText();
|
|
374
382
|
});
|
|
375
383
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|
package/zero.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/zero.ts"],"sourcesContent":["// Zero CLI entry point - standalone binary for zero platform commands\n// Sentry must be initialized before any other imports\nimport \"./instrument.js\";\nimport { Command } from \"commander\";\nimport { configureGlobalProxyFromEnv } from \"./lib/network/proxy.js\";\nimport {\n decodeZeroTokenPayload,\n type ZeroTokenPayload,\n} from \"./lib/api/zero-token.js\";\n\ninterface ZeroCommandDefinition {\n name: string;\n description: string;\n load: () => Promise<Command>;\n}\n\n/**\n * Map of command names to the capability required to see them.\n * Commands not in this map are hidden when ZERO_TOKEN is active.\n * Use an array when a top-level command has subcommands with different\n * capability gates and any one of them should make the command visible.\n * Use `null` for commands that should always be visible in sandbox.\n */\nconst COMMAND_CAPABILITY_MAP: Record<\n string,\n string | readonly string[] | null\n> = {\n agent: \"agent:read\",\n workflow: \"agent:read\",\n goal: [\"goal:read\", \"goal:agent-result:write\", \"goal:user-control:write\"],\n connector: \"connector:read\",\n // \"schedule\" and \"automation\" are deliberately absent: the removal stubs\n // stay out of token-scoped (agent) help but remain invokable and visible to\n // humans.\n doctor: null,\n credit: \"billing:write\",\n model: null,\n \"model-provider\": null,\n logs: \"agent-run:read\",\n search: \"chat-message:read\",\n chat: [\"chat-thread:read\", \"chat-thread:write\"],\n resource: null,\n github: [\"github:read\", \"github:write\"],\n slack: \"slack:write\",\n telegram: [\"telegram:read\", \"telegram:write\"],\n phone: [\"phone:read\", \"phone:write\"],\n whoami: null,\n \"developer-support\": null,\n \"computer-use\": \"computer-use:write\",\n generate: null,\n web: null,\n video: null,\n host: [\"host:read\", \"host:write\"],\n maps: \"maps:read\",\n banking: \"banking:read\",\n};\n\nconst ZERO_COMMAND_DEFINITIONS: readonly ZeroCommandDefinition[] = [\n {\n name: \"org\",\n description: \"Manage organization settings, members, and providers\",\n load: async () => {\n return (await import(\"./commands/zero/org\")).zeroOrgCommand;\n },\n },\n {\n name: \"model\",\n description: \"List available models and model-switching guidance\",\n load: async () => {\n return (await import(\"./commands/zero/model\")).zeroModelCommand;\n },\n },\n {\n name: \"model-provider\",\n description: \"Inspect model provider routing\",\n load: async () => {\n return (await import(\"./commands/zero/model-provider\"))\n .zeroModelProviderCommand;\n },\n },\n {\n name: \"agent\",\n description: \"View or manage zero agents\",\n load: async () => {\n return (await import(\"./commands/zero/agent\")).zeroAgentCommand;\n },\n },\n {\n name: \"connector\",\n description: \"Check third-party service connections (GitHub, Slack, etc.)\",\n load: async () => {\n return (await import(\"./commands/zero/connector\")).zeroConnectorCommand;\n },\n },\n {\n name: \"credit\",\n description: \"Create a Stripe checkout link to buy credits\",\n load: async () => {\n return (await import(\"./commands/zero/credit\")).zeroCreditCommand;\n },\n },\n {\n name: \"doctor\",\n description:\n \"Diagnose runtime issues (connector health, permission denials)\",\n load: async () => {\n return (await import(\"./commands/zero/doctor\")).zeroDoctorCommand;\n },\n },\n {\n name: \"preference\",\n description: \"View or update user preferences (timezone, notifications)\",\n load: async () => {\n return (await import(\"./commands/zero/preference\")).zeroPreferenceCommand;\n },\n },\n {\n name: \"schedule\",\n description:\n \"(removed: use `zero automation`) Schedules are Automations now\",\n load: async () => {\n return (await import(\"./commands/zero/schedule\")).zeroScheduleCommand;\n },\n },\n {\n name: \"automation\",\n description: \"(removed: use `zero workflow`) Automations are workflows now\",\n load: async () => {\n return (await import(\"./commands/zero/automation\")).zeroAutomationCommand;\n },\n },\n {\n name: \"secret\",\n description: \"Read or write secrets (API keys, tokens)\",\n load: async () => {\n return (await import(\"./commands/zero/secret\")).zeroSecretCommand;\n },\n },\n {\n name: \"github\",\n description: \"Upload and download GitHub files\",\n load: async () => {\n return (await import(\"./commands/zero/github\")).zeroGithubCommand;\n },\n },\n {\n name: \"slack\",\n description:\n \"Send messages, upload files, and download files from Slack as the bot\",\n load: async () => {\n return (await import(\"./commands/zero/slack\")).zeroSlackCommand;\n },\n },\n {\n name: \"telegram\",\n description:\n \"Inspect bots, send messages, upload files, and download files from Telegram\",\n load: async () => {\n return (await import(\"./commands/zero/telegram\")).zeroTelegramCommand;\n },\n },\n {\n name: \"phone\",\n description: \"Send AgentPhone messages, upload files, and download media\",\n load: async () => {\n return (await import(\"./commands/zero/phone\")).zeroPhoneCommand;\n },\n },\n {\n name: \"variable\",\n description: \"Read or write non-sensitive configuration values\",\n load: async () => {\n return (await import(\"./commands/zero/variable\")).zeroVariableCommand;\n },\n },\n {\n name: \"logs\",\n description: \"View and search agent run logs\",\n load: async () => {\n return (await import(\"./commands/zero/logs\")).zeroLogsCommand;\n },\n },\n {\n name: \"search\",\n description: \"Search logs, chat, or get a recipe for external sources\",\n load: async () => {\n return (await import(\"./commands/zero/search\")).zeroSearchCommand;\n },\n },\n {\n name: \"chat\",\n description: \"Manage the current web chat thread\",\n load: async () => {\n return (await import(\"./commands/zero/chat\")).zeroChatCommand;\n },\n },\n {\n name: \"resource\",\n description: \"Pull registry resources from private R2-backed archives\",\n load: async () => {\n return (await import(\"./commands/zero/resource\")).zeroResourceCommand;\n },\n },\n {\n name: \"whoami\",\n description: \"Show agent identity, run ID, and capabilities\",\n load: async () => {\n return (await import(\"./commands/zero/whoami\")).zeroWhoamiCommand;\n },\n },\n {\n name: \"workflow\",\n description: \"Manage workflows\",\n load: async () => {\n return (await import(\"./commands/zero/workflow\")).zeroWorkflowCommand;\n },\n },\n {\n name: \"goal\",\n description: \"Manage the current thread goal\",\n load: async () => {\n return (await import(\"./commands/zero/goal\")).zeroGoalCommand;\n },\n },\n {\n name: \"developer-support\",\n description: \"Submit a diagnostic report to the dev team\",\n load: async () => {\n return (await import(\"./commands/zero/developer-support\"))\n .zeroDeveloperSupportCommand;\n },\n },\n {\n name: \"computer-use\",\n description: \"Desktop app computer use through Zero CLI\",\n load: async () => {\n return (await import(\"./commands/zero/computer-use\"))\n .zeroComputerUseCommand;\n },\n },\n {\n name: \"generate\",\n description:\n \"Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance\",\n load: async () => {\n return (await import(\"./commands/zero/generate\")).generateCommand;\n },\n },\n {\n name: \"web\",\n description: \"Upload and download files via the web chat endpoint\",\n load: async () => {\n return (await import(\"./commands/zero/web\")).zeroWebCommand;\n },\n },\n {\n name: \"video\",\n description: \"Video processing utilities\",\n load: async () => {\n return (await import(\"./commands/zero/video\")).zeroVideoCommand;\n },\n },\n {\n name: \"host\",\n description: \"Publish static sites and clone owned hosted site files\",\n load: async () => {\n return (await import(\"./commands/zero/host\")).zeroHostCommand;\n },\n },\n {\n name: \"maps\",\n description: \"Use managed zero maps services\",\n load: async () => {\n return (await import(\"./commands/zero/maps\")).zeroMapsCommand;\n },\n },\n {\n name: \"banking\",\n description: \"Use managed zero banking services\",\n load: async () => {\n return (await import(\"./commands/zero/banking\")).zeroBankingCommand;\n },\n },\n];\n\nconst ZERO_COMMAND_DEFINITION_BY_NAME = new Map(\n ZERO_COMMAND_DEFINITIONS.map((definition) => {\n return [definition.name, definition];\n }),\n);\n\nfunction createZeroCommandStub(definition: ZeroCommandDefinition): Command {\n return new Command(definition.name).description(definition.description);\n}\n\nfunction buildDefaultCommands(): Command[] {\n return ZERO_COMMAND_DEFINITIONS.map(createZeroCommandStub);\n}\n\nfunction shouldHideCommand(\n name: string,\n payload: ZeroTokenPayload | undefined,\n): boolean {\n if (!payload) return false;\n const requiredCap = COMMAND_CAPABILITY_MAP[name];\n if (requiredCap === undefined) return true;\n if (requiredCap === null) return false;\n if (typeof requiredCap !== \"string\") {\n return !requiredCap.some((capability) => {\n return payload.capabilities.includes(capability);\n });\n }\n return !payload.capabilities.includes(requiredCap);\n}\n\nfunction addZeroCommand(\n prog: Command,\n cmd: Command,\n payload: ZeroTokenPayload | undefined,\n): void {\n const hidden = shouldHideCommand(cmd.name(), payload);\n prog.addCommand(cmd, hidden ? { hidden: true } : {});\n}\n\nfunction getNonOptionArgs(argv: string[]): string[] {\n const args: string[] = [];\n\n for (const arg of argv.slice(2)) {\n if (arg === \"--\") {\n break;\n }\n if (arg.startsWith(\"-\")) {\n continue;\n }\n args.push(arg);\n }\n\n return args;\n}\n\nfunction getRequestedZeroCommandName(argv = process.argv): string | undefined {\n const [firstArg, secondArg] = getNonOptionArgs(argv);\n\n if (!firstArg) {\n return undefined;\n }\n\n if (firstArg === \"help\") {\n return secondArg;\n }\n\n return firstArg;\n}\n\nasync function loadZeroCommand(\n name: string | undefined,\n): Promise<Command | undefined> {\n if (!name) {\n return undefined;\n }\n\n return ZERO_COMMAND_DEFINITION_BY_NAME.get(name)?.load();\n}\n\nexport function buildZeroHelpText(\n payload: ZeroTokenPayload | undefined = decodeZeroTokenPayload(),\n): string {\n const canReadHost = !payload || payload.capabilities.includes(\"host:read\");\n const canWriteHost = !payload || payload.capabilities.includes(\"host:write\");\n const examples = [\n \" Check a connector? zero doctor check-connector --env-name <ENV_NAME>\",\n ...(payload && !payload.capabilities.includes(\"billing:read\")\n ? []\n : [\" Check credits? zero doctor credit\"]),\n ...(shouldHideCommand(\"credit\", payload)\n ? []\n : [\" Buy credits? zero credit 20000\"]),\n \" Send a Slack message? zero slack message send --help\",\n \" Upload GitHub? zero github upload-file --help\",\n \" Download GitHub? zero github download-file --help\",\n \" List Telegram bots? zero telegram bot list\",\n \" Send Telegram? zero telegram message send --help\",\n \" Upload Telegram? zero telegram upload-file --help\",\n \" Download Telegram? zero telegram download-file --help\",\n \" Send AgentPhone? zero phone message --help\",\n \" Upload AgentPhone? zero phone upload-file --help\",\n \" Download AgentPhone? zero phone download-file --help\",\n \" List models? zero model ls\",\n \" Model routing? zero model-provider ls\",\n \" Update yourself? zero agent --help\",\n \" Manage workflows? zero workflow --help\",\n ...(shouldHideCommand(\"chat\", payload)\n ? []\n : [' Rename this chat? zero chat rename \"New title\"']),\n \" List generators? zero generate --help\",\n ' Generate image? zero generate image --prompt \"...\"',\n ' Generate website? zero generate website --prompt \"...\"',\n ' Generate voice? zero generate voice --prompt \"...\"',\n ...(canWriteHost\n ? [\" Host a static site? zero host ./dist --site my-site --spa\"]\n : []),\n ...(canReadHost\n ? [\" Clone hosted site? zero host clone <public-slug>\"]\n : []),\n ...(shouldHideCommand(\"maps\", payload)\n ? []\n : [\n ' Get directions? zero maps directions --origin \"SFO\" --destination \"Mountain View\" --json',\n ]),\n ...(shouldHideCommand(\"banking\", payload)\n ? []\n : [\" Read bank data? zero banking accounts --json\"]),\n \" Check your identity? zero whoami\",\n ];\n\n return `\\nExamples:\\n${examples.join(\"\\n\")}`;\n}\n\n/**\n * Register commands with visibility based on ZERO_TOKEN capabilities.\n * Commands not granted by the token are registered as hidden via\n * Commander's public `addCommand(cmd, { hidden: true })` API.\n * When no ZERO_TOKEN is present, all commands remain visible.\n *\n * @param commands - override default commands (used in tests)\n */\nexport function registerZeroCommands(\n prog: Command,\n commands?: Command[],\n): void {\n const token = process.env.ZERO_TOKEN;\n const payload = token ? decodeZeroTokenPayload(token) : undefined;\n\n for (const cmd of commands ?? buildDefaultCommands()) {\n addZeroCommand(prog, cmd, payload);\n }\n}\n\nconst program = new Command();\n\ndeclare const __CLI_VERSION__: string;\n\nprogram\n .name(\"zero\")\n .description(\n \"Zero CLI — interact with the zero platform from inside the sandbox\",\n )\n .version(__CLI_VERSION__)\n .addHelpText(\"after\", () => {\n return buildZeroHelpText();\n });\n\nexport { program };\n\nif (\n process.argv[1]?.endsWith(\"zero.js\") ||\n process.argv[1]?.endsWith(\"zero.ts\") ||\n process.argv[1]?.endsWith(\"zero\")\n) {\n await configureGlobalProxyFromEnv();\n const requestedCommand = await loadZeroCommand(getRequestedZeroCommandName());\n registerZeroCommands(\n program,\n requestedCommand ? [requestedCommand] : undefined,\n );\n program.parse();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAuBA,IAAM,yBAGF;AAAA,EACF,OAAO;AAAA,EACP,UAAU;AAAA,EACV,MAAM,CAAC,aAAa,2BAA2B,yBAAyB;AAAA,EACxE,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM,CAAC,oBAAoB,mBAAmB;AAAA,EAC9C,UAAU;AAAA,EACV,QAAQ,CAAC,eAAe,cAAc;AAAA,EACtC,OAAO;AAAA,EACP,UAAU,CAAC,iBAAiB,gBAAgB;AAAA,EAC5C,OAAO,CAAC,cAAc,aAAa;AAAA,EACnC,QAAQ;AAAA,EACR,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM,CAAC,aAAa,YAAY;AAAA,EAChC,MAAM;AAAA,EACN,SAAS;AACX;AAEA,IAAM,2BAA6D;AAAA,EACjE;AAAA,IACE,MAAM;AAAA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pC,CAAC,IACD,CAAC,sDAAsD;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO;AAAA;AAAA,EAAgB,SAAS,KAAK,IAAI,CAAC;AAC5C;AAUO,SAAS,qBACd,MACA,UACM;AACN,QAAM,QAAQ,QAAQ,IAAI;AAC1B,QAAM,UAAU,QAAQ,uBAAuB,KAAK,IAAI;AAExD,aAAW,OAAO,YAAY,qBAAqB,GAAG;AACpD,mBAAe,MAAM,KAAK,OAAO;AAAA,EACnC;AACF;AAEA,IAAM,UAAU,IAAI,QAAQ;AAI5B,QACG,KAAK,MAAM,EACX;AAAA,EACC;AACF,EACC,QAAQ,UAAe,EACvB,YAAY,SAAS,MAAM;AAC1B,SAAO,kBAAkB;AAC3B,CAAC;AAIH,IACE,QAAQ,KAAK,CAAC,GAAG,SAAS,SAAS,KACnC,QAAQ,KAAK,CAAC,GAAG,SAAS,SAAS,KACnC,QAAQ,KAAK,CAAC,GAAG,SAAS,MAAM,GAChC;AACA,QAAM,4BAA4B;AAClC,QAAM,mBAAmB,MAAM,gBAAgB,4BAA4B,CAAC;AAC5E;AAAA,IACE;AAAA,IACA,mBAAmB,CAAC,gBAAgB,IAAI;AAAA,EAC1C;AACA,UAAQ,MAAM;AAChB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/zero.ts"],"sourcesContent":["// Zero CLI entry point - standalone binary for zero platform commands\n// Sentry must be initialized before any other imports\nimport \"./instrument.js\";\nimport { Command } from \"commander\";\nimport { configureGlobalProxyFromEnv } from \"./lib/network/proxy.js\";\nimport {\n decodeZeroTokenPayload,\n type ZeroTokenPayload,\n} from \"./lib/api/zero-token.js\";\n\ninterface ZeroCommandDefinition {\n name: string;\n description: string;\n load: () => Promise<Command>;\n}\n\n/**\n * Map of command names to the capability required to see them.\n * Commands not in this map are hidden when ZERO_TOKEN is active.\n * Use an array when a top-level command has subcommands with different\n * capability gates and any one of them should make the command visible.\n * Use `null` for commands that should always be visible in sandbox.\n */\nconst COMMAND_CAPABILITY_MAP: Record<\n string,\n string | readonly string[] | null\n> = {\n agent: \"agent:read\",\n workflow: \"agent:read\",\n goal: [\"goal:read\", \"goal:agent-result:write\", \"goal:user-control:write\"],\n connector: \"connector:read\",\n relationship: \"relationship:read\",\n // \"schedule\" and \"automation\" are deliberately absent: the removal stubs\n // stay out of token-scoped (agent) help but remain invokable and visible to\n // humans.\n doctor: null,\n credit: \"billing:write\",\n model: null,\n \"model-provider\": null,\n logs: \"agent-run:read\",\n search: \"chat-message:read\",\n chat: [\"chat-thread:read\", \"chat-thread:write\"],\n resource: null,\n github: [\"github:read\", \"github:write\"],\n slack: \"slack:write\",\n telegram: [\"telegram:read\", \"telegram:write\"],\n phone: [\"phone:read\", \"phone:write\"],\n whoami: null,\n \"developer-support\": null,\n \"computer-use\": \"computer-use:write\",\n generate: null,\n web: null,\n video: null,\n host: [\"host:read\", \"host:write\"],\n maps: \"maps:read\",\n banking: \"banking:read\",\n};\n\nconst ZERO_COMMAND_DEFINITIONS: readonly ZeroCommandDefinition[] = [\n {\n name: \"org\",\n description: \"Manage organization settings, members, and providers\",\n load: async () => {\n return (await import(\"./commands/zero/org\")).zeroOrgCommand;\n },\n },\n {\n name: \"model\",\n description: \"List available models and model-switching guidance\",\n load: async () => {\n return (await import(\"./commands/zero/model\")).zeroModelCommand;\n },\n },\n {\n name: \"model-provider\",\n description: \"Inspect model provider routing\",\n load: async () => {\n return (await import(\"./commands/zero/model-provider\"))\n .zeroModelProviderCommand;\n },\n },\n {\n name: \"agent\",\n description: \"View or manage zero agents\",\n load: async () => {\n return (await import(\"./commands/zero/agent\")).zeroAgentCommand;\n },\n },\n {\n name: \"connector\",\n description: \"Check third-party service connections (GitHub, Slack, etc.)\",\n load: async () => {\n return (await import(\"./commands/zero/connector\")).zeroConnectorCommand;\n },\n },\n {\n name: \"relationship\",\n description: \"Query relationship memory\",\n load: async () => {\n return (await import(\"./commands/zero/relationship\"))\n .zeroRelationshipCommand;\n },\n },\n {\n name: \"credit\",\n description: \"Create a Stripe checkout link to buy credits\",\n load: async () => {\n return (await import(\"./commands/zero/credit\")).zeroCreditCommand;\n },\n },\n {\n name: \"doctor\",\n description:\n \"Diagnose runtime issues (connector health, permission denials)\",\n load: async () => {\n return (await import(\"./commands/zero/doctor\")).zeroDoctorCommand;\n },\n },\n {\n name: \"preference\",\n description: \"View or update user preferences (timezone, notifications)\",\n load: async () => {\n return (await import(\"./commands/zero/preference\")).zeroPreferenceCommand;\n },\n },\n {\n name: \"schedule\",\n description:\n \"(removed: use `zero automation`) Schedules are Automations now\",\n load: async () => {\n return (await import(\"./commands/zero/schedule\")).zeroScheduleCommand;\n },\n },\n {\n name: \"automation\",\n description: \"(removed: use `zero workflow`) Automations are workflows now\",\n load: async () => {\n return (await import(\"./commands/zero/automation\")).zeroAutomationCommand;\n },\n },\n {\n name: \"secret\",\n description: \"Read or write secrets (API keys, tokens)\",\n load: async () => {\n return (await import(\"./commands/zero/secret\")).zeroSecretCommand;\n },\n },\n {\n name: \"github\",\n description: \"Upload and download GitHub files\",\n load: async () => {\n return (await import(\"./commands/zero/github\")).zeroGithubCommand;\n },\n },\n {\n name: \"slack\",\n description:\n \"Send messages, upload files, and download files from Slack as the bot\",\n load: async () => {\n return (await import(\"./commands/zero/slack\")).zeroSlackCommand;\n },\n },\n {\n name: \"telegram\",\n description:\n \"Inspect bots, send messages, upload files, and download files from Telegram\",\n load: async () => {\n return (await import(\"./commands/zero/telegram\")).zeroTelegramCommand;\n },\n },\n {\n name: \"phone\",\n description: \"Send AgentPhone messages, upload files, and download media\",\n load: async () => {\n return (await import(\"./commands/zero/phone\")).zeroPhoneCommand;\n },\n },\n {\n name: \"variable\",\n description: \"Read or write non-sensitive configuration values\",\n load: async () => {\n return (await import(\"./commands/zero/variable\")).zeroVariableCommand;\n },\n },\n {\n name: \"logs\",\n description: \"View and search agent run logs\",\n load: async () => {\n return (await import(\"./commands/zero/logs\")).zeroLogsCommand;\n },\n },\n {\n name: \"search\",\n description: \"Search logs, chat, or get a recipe for external sources\",\n load: async () => {\n return (await import(\"./commands/zero/search\")).zeroSearchCommand;\n },\n },\n {\n name: \"chat\",\n description: \"Manage the current web chat thread\",\n load: async () => {\n return (await import(\"./commands/zero/chat\")).zeroChatCommand;\n },\n },\n {\n name: \"resource\",\n description: \"Pull registry resources from private R2-backed archives\",\n load: async () => {\n return (await import(\"./commands/zero/resource\")).zeroResourceCommand;\n },\n },\n {\n name: \"whoami\",\n description: \"Show agent identity, run ID, and capabilities\",\n load: async () => {\n return (await import(\"./commands/zero/whoami\")).zeroWhoamiCommand;\n },\n },\n {\n name: \"workflow\",\n description: \"Manage workflows\",\n load: async () => {\n return (await import(\"./commands/zero/workflow\")).zeroWorkflowCommand;\n },\n },\n {\n name: \"goal\",\n description: \"Manage the current thread goal\",\n load: async () => {\n return (await import(\"./commands/zero/goal\")).zeroGoalCommand;\n },\n },\n {\n name: \"developer-support\",\n description: \"Submit a diagnostic report to the dev team\",\n load: async () => {\n return (await import(\"./commands/zero/developer-support\"))\n .zeroDeveloperSupportCommand;\n },\n },\n {\n name: \"computer-use\",\n description: \"Desktop app computer use through Zero CLI\",\n load: async () => {\n return (await import(\"./commands/zero/computer-use\"))\n .zeroComputerUseCommand;\n },\n },\n {\n name: \"generate\",\n description:\n \"Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance\",\n load: async () => {\n return (await import(\"./commands/zero/generate\")).generateCommand;\n },\n },\n {\n name: \"web\",\n description: \"Upload and download files via the web chat endpoint\",\n load: async () => {\n return (await import(\"./commands/zero/web\")).zeroWebCommand;\n },\n },\n {\n name: \"video\",\n description: \"Video processing utilities\",\n load: async () => {\n return (await import(\"./commands/zero/video\")).zeroVideoCommand;\n },\n },\n {\n name: \"host\",\n description: \"Publish static sites and clone owned hosted site files\",\n load: async () => {\n return (await import(\"./commands/zero/host\")).zeroHostCommand;\n },\n },\n {\n name: \"maps\",\n description: \"Use managed zero maps services\",\n load: async () => {\n return (await import(\"./commands/zero/maps\")).zeroMapsCommand;\n },\n },\n {\n name: \"banking\",\n description: \"Use managed zero banking services\",\n load: async () => {\n return (await import(\"./commands/zero/banking\")).zeroBankingCommand;\n },\n },\n];\n\nconst ZERO_COMMAND_DEFINITION_BY_NAME = new Map(\n ZERO_COMMAND_DEFINITIONS.map((definition) => {\n return [definition.name, definition];\n }),\n);\n\nfunction createZeroCommandStub(definition: ZeroCommandDefinition): Command {\n return new Command(definition.name).description(definition.description);\n}\n\nfunction buildDefaultCommands(): Command[] {\n return ZERO_COMMAND_DEFINITIONS.map(createZeroCommandStub);\n}\n\nfunction shouldHideCommand(\n name: string,\n payload: ZeroTokenPayload | undefined,\n): boolean {\n if (!payload) return false;\n const requiredCap = COMMAND_CAPABILITY_MAP[name];\n if (requiredCap === undefined) return true;\n if (requiredCap === null) return false;\n if (typeof requiredCap !== \"string\") {\n return !requiredCap.some((capability) => {\n return payload.capabilities.includes(capability);\n });\n }\n return !payload.capabilities.includes(requiredCap);\n}\n\nfunction addZeroCommand(\n prog: Command,\n cmd: Command,\n payload: ZeroTokenPayload | undefined,\n): void {\n const hidden = shouldHideCommand(cmd.name(), payload);\n prog.addCommand(cmd, hidden ? { hidden: true } : {});\n}\n\nfunction getNonOptionArgs(argv: string[]): string[] {\n const args: string[] = [];\n\n for (const arg of argv.slice(2)) {\n if (arg === \"--\") {\n break;\n }\n if (arg.startsWith(\"-\")) {\n continue;\n }\n args.push(arg);\n }\n\n return args;\n}\n\nfunction getRequestedZeroCommandName(argv = process.argv): string | undefined {\n const [firstArg, secondArg] = getNonOptionArgs(argv);\n\n if (!firstArg) {\n return undefined;\n }\n\n if (firstArg === \"help\") {\n return secondArg;\n }\n\n return firstArg;\n}\n\nasync function loadZeroCommand(\n name: string | undefined,\n): Promise<Command | undefined> {\n if (!name) {\n return undefined;\n }\n\n return ZERO_COMMAND_DEFINITION_BY_NAME.get(name)?.load();\n}\n\nexport function buildZeroHelpText(\n payload: ZeroTokenPayload | undefined = decodeZeroTokenPayload(),\n): string {\n const canReadHost = !payload || payload.capabilities.includes(\"host:read\");\n const canWriteHost = !payload || payload.capabilities.includes(\"host:write\");\n const examples = [\n \" Check a connector? zero doctor check-connector --env-name <ENV_NAME>\",\n ...(payload && !payload.capabilities.includes(\"billing:read\")\n ? []\n : [\" Check credits? zero doctor credit\"]),\n ...(shouldHideCommand(\"credit\", payload)\n ? []\n : [\" Buy credits? zero credit 20000\"]),\n \" Send a Slack message? zero slack message send --help\",\n \" Upload GitHub? zero github upload-file --help\",\n \" Download GitHub? zero github download-file --help\",\n \" List Telegram bots? zero telegram bot list\",\n \" Send Telegram? zero telegram message send --help\",\n \" Upload Telegram? zero telegram upload-file --help\",\n \" Download Telegram? zero telegram download-file --help\",\n \" Send AgentPhone? zero phone message --help\",\n \" Upload AgentPhone? zero phone upload-file --help\",\n \" Download AgentPhone? zero phone download-file --help\",\n \" List models? zero model ls\",\n \" Model routing? zero model-provider ls\",\n \" Update yourself? zero agent --help\",\n \" Manage workflows? zero workflow --help\",\n ...(shouldHideCommand(\"chat\", payload)\n ? []\n : [' Rename this chat? zero chat rename \"New title\"']),\n \" List generators? zero generate --help\",\n ' Generate image? zero generate image --prompt \"...\"',\n ' Generate website? zero generate website --prompt \"...\"',\n ' Generate voice? zero generate voice --prompt \"...\"',\n ...(canWriteHost\n ? [\" Host a static site? zero host ./dist --site my-site --spa\"]\n : []),\n ...(canReadHost\n ? [\" Clone hosted site? zero host clone <public-slug>\"]\n : []),\n ...(shouldHideCommand(\"maps\", payload)\n ? []\n : [\n ' Get directions? zero maps directions --origin \"SFO\" --destination \"Mountain View\" --json',\n ]),\n ...(shouldHideCommand(\"banking\", payload)\n ? []\n : [\" Read bank data? zero banking accounts --json\"]),\n \" Check your identity? zero whoami\",\n ];\n\n return `\\nExamples:\\n${examples.join(\"\\n\")}`;\n}\n\n/**\n * Register commands with visibility based on ZERO_TOKEN capabilities.\n * Commands not granted by the token are registered as hidden via\n * Commander's public `addCommand(cmd, { hidden: true })` API.\n * When no ZERO_TOKEN is present, all commands remain visible.\n *\n * @param commands - override default commands (used in tests)\n */\nexport function registerZeroCommands(\n prog: Command,\n commands?: Command[],\n): void {\n const token = process.env.ZERO_TOKEN;\n const payload = token ? decodeZeroTokenPayload(token) : undefined;\n\n for (const cmd of commands ?? buildDefaultCommands()) {\n addZeroCommand(prog, cmd, payload);\n }\n}\n\nconst program = new Command();\n\ndeclare const __CLI_VERSION__: string;\n\nprogram\n .name(\"zero\")\n .description(\n \"Zero CLI — interact with the zero platform from inside the sandbox\",\n )\n .version(__CLI_VERSION__)\n .addHelpText(\"after\", () => {\n return buildZeroHelpText();\n });\n\nexport { program };\n\nif (\n process.argv[1]?.endsWith(\"zero.js\") ||\n process.argv[1]?.endsWith(\"zero.ts\") ||\n process.argv[1]?.endsWith(\"zero\")\n) {\n await configureGlobalProxyFromEnv();\n const requestedCommand = await loadZeroCommand(getRequestedZeroCommandName());\n registerZeroCommands(\n program,\n requestedCommand ? [requestedCommand] : undefined,\n );\n program.parse();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAuBA,IAAM,yBAGF;AAAA,EACF,OAAO;AAAA,EACP,UAAU;AAAA,EACV,MAAM,CAAC,aAAa,2BAA2B,yBAAyB;AAAA,EACxE,WAAW;AAAA,EACX,cAAc;AAAA;AAAA;AAAA;AAAA,EAId,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM,CAAC,oBAAoB,mBAAmB;AAAA,EAC9C,UAAU;AAAA,EACV,QAAQ,CAAC,eAAe,cAAc;AAAA,EACtC,OAAO;AAAA,EACP,UAAU,CAAC,iBAAiB,gBAAgB;AAAA,EAC5C,OAAO,CAAC,cAAc,aAAa;AAAA,EACnC,QAAQ;AAAA,EACR,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM,CAAC,aAAa,YA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