@vm0/cli 9.244.7 → 9.245.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-2TIFNP32.js → agent-VZXA6XR3.js} +6 -5
- package/{agent-2TIFNP32.js.map → agent-VZXA6XR3.js.map} +1 -1
- package/{banking-UR7XJI3L.js → banking-QOV2GZE6.js} +4 -3
- package/{banking-UR7XJI3L.js.map → banking-QOV2GZE6.js.map} +1 -1
- package/{chat-5N4C3FDV.js → chat-7PONFLUP.js} +5 -4
- package/{chat-5N4C3FDV.js.map → chat-7PONFLUP.js.map} +1 -1
- package/{chunk-NR6ANGRK.js → chunk-5XVBOER3.js} +74 -506
- package/chunk-5XVBOER3.js.map +1 -0
- package/{chunk-E32I3TNQ.js → chunk-6P7XBY46.js} +845 -1217
- package/chunk-6P7XBY46.js.map +1 -0
- package/{chunk-7KSTVBNN.js → chunk-ARENVRJY.js} +4 -4
- package/{chunk-M6GLCPCJ.js → chunk-DE4HMRSU.js} +3 -3
- package/{chunk-STMJYQTH.js → chunk-FVYB5CBP.js} +2 -2
- package/chunk-HOIDOML4.js +678 -0
- package/chunk-HOIDOML4.js.map +1 -0
- package/{chunk-BIJC6U3G.js → chunk-VN4PPSXU.js} +2 -2
- package/{chunk-26BGLMA3.js → chunk-XYZN3XWH.js} +3 -665
- package/chunk-XYZN3XWH.js.map +1 -0
- package/{chunk-JWDLLCI3.js → chunk-YSVL5RAP.js} +2 -2
- package/{chunk-QCG2H3VD.js → chunk-ZXCF4ARW.js} +2 -2
- package/{computer-use-3WUKJYHK.js → computer-use-Y54YFGNC.js} +4 -3
- package/{computer-use-3WUKJYHK.js.map → computer-use-Y54YFGNC.js.map} +1 -1
- package/{connector-PDEOFNTE.js → connector-2PAPMRZG.js} +7 -6
- package/{connector-PDEOFNTE.js.map → connector-2PAPMRZG.js.map} +1 -1
- package/{credit-ET4RS32X.js → credit-PX6354BA.js} +5 -4
- package/{credit-ET4RS32X.js.map → credit-PX6354BA.js.map} +1 -1
- package/{developer-support-3DJEJT2A.js → developer-support-R5K6XKFG.js} +4 -3
- package/{developer-support-3DJEJT2A.js.map → developer-support-R5K6XKFG.js.map} +1 -1
- package/{doctor-F7OWYXXH.js → doctor-JNHZPFHW.js} +4 -3
- package/{doctor-F7OWYXXH.js.map → doctor-JNHZPFHW.js.map} +1 -1
- package/{generate-4GKWSL6P.js → generate-TY4LZA3R.js} +10 -8
- package/{generate-4GKWSL6P.js.map → generate-TY4LZA3R.js.map} +1 -1
- package/{github-S5HFK2IC.js → github-UHTFPDZJ.js} +4 -3
- package/{github-S5HFK2IC.js.map → github-UHTFPDZJ.js.map} +1 -1
- package/{goal-ISJWIT2Q.js → goal-CKBOG76D.js} +4 -3
- package/{goal-ISJWIT2Q.js.map → goal-CKBOG76D.js.map} +1 -1
- package/{host-T52XQ2SZ.js → host-HAVFML26.js} +28 -7
- package/host-HAVFML26.js.map +1 -0
- package/index.js +4 -715
- package/index.js.map +1 -1
- package/{logs-D4IL5OLR.js → logs-OXZZHIMA.js} +13 -14
- package/logs-OXZZHIMA.js.map +1 -0
- package/{mail-JXO3GW72.js → mail-QCU47LFX.js} +6 -5
- package/{mail-JXO3GW72.js.map → mail-QCU47LFX.js.map} +1 -1
- package/{maps-T3YFBRLP.js → maps-F3YPBNGC.js} +4 -3
- package/{maps-T3YFBRLP.js.map → maps-F3YPBNGC.js.map} +1 -1
- package/{model-GJRTV6E5.js → model-5CYADUCZ.js} +5 -4
- package/{model-GJRTV6E5.js.map → model-5CYADUCZ.js.map} +1 -1
- package/{model-provider-T4VN4HNU.js → model-provider-676BK2JF.js} +5 -4
- package/{model-provider-T4VN4HNU.js.map → model-provider-676BK2JF.js.map} +1 -1
- package/{org-GNNU77Y5.js → org-M637OTRU.js} +4 -3
- package/{org-GNNU77Y5.js.map → org-M637OTRU.js.map} +1 -1
- package/package.json +1 -1
- package/{phone-EQ4R2GBO.js → phone-WBFLXP4V.js} +4 -3
- package/{phone-EQ4R2GBO.js.map → phone-WBFLXP4V.js.map} +1 -1
- package/{preference-3FHEQPKG.js → preference-5AVRP7UU.js} +4 -3
- package/{preference-3FHEQPKG.js.map → preference-5AVRP7UU.js.map} +1 -1
- package/{resource-EOO2VATC.js → resource-N6ADJPCL.js} +4 -3
- package/{resource-EOO2VATC.js.map → resource-N6ADJPCL.js.map} +1 -1
- package/{scrape-TZCFJY6X.js → scrape-XIJ5J6LW.js} +4 -3
- package/{scrape-TZCFJY6X.js.map → scrape-XIJ5J6LW.js.map} +1 -1
- package/{search-RXP4DMUC.js → search-V2PWSYSL.js} +9 -10
- package/search-V2PWSYSL.js.map +1 -0
- package/{secret-S4ZCVY2X.js → secret-JLGGOPTX.js} +4 -3
- package/{secret-S4ZCVY2X.js.map → secret-JLGGOPTX.js.map} +1 -1
- package/{slack-7YJFUJE6.js → slack-QNQY6TVX.js} +4 -3
- package/{slack-7YJFUJE6.js.map → slack-QNQY6TVX.js.map} +1 -1
- package/{teams-45MMUROF.js → teams-QZZG5ERQ.js} +4 -3
- package/{teams-45MMUROF.js.map → teams-QZZG5ERQ.js.map} +1 -1
- package/{telegram-7ZCSI24W.js → telegram-JEQYIW2X.js} +4 -3
- package/{telegram-7ZCSI24W.js.map → telegram-JEQYIW2X.js.map} +1 -1
- package/{variable-O33TDP4J.js → variable-LDKUIYU7.js} +4 -3
- package/{variable-O33TDP4J.js.map → variable-LDKUIYU7.js.map} +1 -1
- package/{video-D5LSABFJ.js → video-D3AUHQL2.js} +6 -4
- package/{video-D5LSABFJ.js.map → video-D3AUHQL2.js.map} +1 -1
- package/{web-JW7AH2UT.js → web-MUTRFMMA.js} +7 -5
- package/{web-JW7AH2UT.js.map → web-MUTRFMMA.js.map} +1 -1
- package/{web-search-MHFQFZS6.js → web-search-KBLKNBIF.js} +4 -3
- package/{web-search-MHFQFZS6.js.map → web-search-KBLKNBIF.js.map} +1 -1
- package/{whoami-5DJLOQUZ.js → whoami-POJMF7BB.js} +6 -5
- package/{whoami-5DJLOQUZ.js.map → whoami-POJMF7BB.js.map} +1 -1
- package/{workflow-TXG3RBJR.js → workflow-GXTNSIWC.js} +4 -3
- package/{workflow-TXG3RBJR.js.map → workflow-GXTNSIWC.js.map} +1 -1
- package/zero.js +35 -35
- package/chunk-26BGLMA3.js.map +0 -1
- package/chunk-5QJVQEHO.js +0 -240
- package/chunk-5QJVQEHO.js.map +0 -1
- package/chunk-E32I3TNQ.js.map +0 -1
- package/chunk-NR6ANGRK.js.map +0 -1
- package/chunk-ZUSDQG2O.js +0 -50
- package/chunk-ZUSDQG2O.js.map +0 -1
- package/host-T52XQ2SZ.js.map +0 -1
- package/logs-D4IL5OLR.js.map +0 -1
- package/search-RXP4DMUC.js.map +0 -1
- /package/{chunk-7KSTVBNN.js.map → chunk-ARENVRJY.js.map} +0 -0
- /package/{chunk-M6GLCPCJ.js.map → chunk-DE4HMRSU.js.map} +0 -0
- /package/{chunk-STMJYQTH.js.map → chunk-FVYB5CBP.js.map} +0 -0
- /package/{chunk-BIJC6U3G.js.map → chunk-VN4PPSXU.js.map} +0 -0
- /package/{chunk-JWDLLCI3.js.map → chunk-YSVL5RAP.js.map} +0 -0
- /package/{chunk-QCG2H3VD.js.map → chunk-ZXCF4ARW.js.map} +0 -0
package/index.js
CHANGED
|
@@ -1,39 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __createRequire } from "node:module";
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
|
-
import {
|
|
5
|
-
formatRelativeTime
|
|
6
|
-
} from "./chunk-ZUSDQG2O.js";
|
|
7
|
-
import {
|
|
8
|
-
collectArtifacts,
|
|
9
|
-
collectKeyValue,
|
|
10
|
-
collectMounts,
|
|
11
|
-
collectVolumeVersions,
|
|
12
|
-
extractSecretNames,
|
|
13
|
-
extractVarNames,
|
|
14
|
-
isUUID,
|
|
15
|
-
loadValues,
|
|
16
|
-
parseIdentifier,
|
|
17
|
-
parsePermissionPolicies,
|
|
18
|
-
parseTime,
|
|
19
|
-
pollEvents,
|
|
20
|
-
renderRunCreated,
|
|
21
|
-
showNextSteps
|
|
22
|
-
} from "./chunk-E32I3TNQ.js";
|
|
23
|
-
import "./chunk-DWWE7STW.js";
|
|
24
|
-
import {
|
|
25
|
-
ALL_RUN_STATUSES,
|
|
26
|
-
cancelRun,
|
|
27
|
-
createRun,
|
|
28
|
-
directRunModelProviderTypeSchema,
|
|
29
|
-
getCheckpoint,
|
|
30
|
-
getComposeById,
|
|
31
|
-
getComposeByName,
|
|
32
|
-
getComposeVersion,
|
|
33
|
-
getRunQueue,
|
|
34
|
-
getSession,
|
|
35
|
-
listRuns
|
|
36
|
-
} from "./chunk-NR6ANGRK.js";
|
|
37
4
|
import "./chunk-LTDQISD7.js";
|
|
38
5
|
import {
|
|
39
6
|
clearConfig,
|
|
@@ -45,14 +12,13 @@ import {
|
|
|
45
12
|
saveConfig,
|
|
46
13
|
source_default,
|
|
47
14
|
withErrorHandler
|
|
48
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XYZN3XWH.js";
|
|
49
16
|
import {
|
|
50
17
|
configureGlobalProxyFromEnv
|
|
51
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DE4HMRSU.js";
|
|
52
19
|
import "./chunk-LRHXR7JT.js";
|
|
53
20
|
import {
|
|
54
|
-
Command
|
|
55
|
-
Option
|
|
21
|
+
Command
|
|
56
22
|
} from "./chunk-B3W2RUBP.js";
|
|
57
23
|
import {
|
|
58
24
|
init_esm_shims
|
|
@@ -233,682 +199,6 @@ var setupTokenCommand = new Command().name("setup-token").description("Output au
|
|
|
233
199
|
// src/commands/auth/index.ts
|
|
234
200
|
var authCommand = new Command().name("auth").description("Authenticate vm0").addCommand(loginCommand).addCommand(logoutCommand).addCommand(statusCommand).addCommand(setupTokenCommand);
|
|
235
201
|
|
|
236
|
-
// src/commands/run/index.ts
|
|
237
|
-
init_esm_shims();
|
|
238
|
-
|
|
239
|
-
// src/commands/run/run.ts
|
|
240
|
-
init_esm_shims();
|
|
241
|
-
|
|
242
|
-
// src/lib/utils/update-checker.ts
|
|
243
|
-
init_esm_shims();
|
|
244
|
-
|
|
245
|
-
// src/lib/utils/spawn.ts
|
|
246
|
-
init_esm_shims();
|
|
247
|
-
import { spawn } from "child_process";
|
|
248
|
-
function safeSpawn(command, args, options) {
|
|
249
|
-
const isWindows = process.platform === "win32";
|
|
250
|
-
const resolvedCommand = isWindows ? `${command}.cmd` : command;
|
|
251
|
-
return spawn(resolvedCommand, args, {
|
|
252
|
-
...options,
|
|
253
|
-
shell: isWindows
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// src/lib/utils/update-checker.ts
|
|
258
|
-
var PACKAGE_NAME = "@vm0/cli";
|
|
259
|
-
var NPM_REGISTRY_URL = `https://registry.npmjs.org/${encodeURIComponent(PACKAGE_NAME)}/latest`;
|
|
260
|
-
var TIMEOUT_MS = 5e3;
|
|
261
|
-
var pendingUpgrade = null;
|
|
262
|
-
function detectPackageManager() {
|
|
263
|
-
const execPath = process.argv[1] ?? "";
|
|
264
|
-
if (execPath.includes("pnpm")) {
|
|
265
|
-
return "pnpm";
|
|
266
|
-
}
|
|
267
|
-
if (execPath.includes("/.bun/") || execPath.includes("/bun/")) {
|
|
268
|
-
return "bun";
|
|
269
|
-
}
|
|
270
|
-
if (execPath.includes("/.yarn/") || execPath.includes("/yarn/")) {
|
|
271
|
-
return "yarn";
|
|
272
|
-
}
|
|
273
|
-
if (execPath.includes("/usr/local/") || // Homebrew on Intel Mac
|
|
274
|
-
execPath.includes("/opt/homebrew/") || // Homebrew on arm64 Mac
|
|
275
|
-
execPath.includes("/.nvm/") || execPath.includes("/.fnm/") || execPath.includes("/.volta/") || execPath.includes("/.nodenv/") || execPath.includes("/.n/") || execPath.includes("/node_modules/") || execPath.includes("\\npm\\") || // Windows: AppData\Roaming\npm
|
|
276
|
-
execPath.includes("\\nodejs\\")) {
|
|
277
|
-
return "npm";
|
|
278
|
-
}
|
|
279
|
-
return "unknown";
|
|
280
|
-
}
|
|
281
|
-
function isAutoUpgradeSupported(pm) {
|
|
282
|
-
return pm === "npm" || pm === "pnpm";
|
|
283
|
-
}
|
|
284
|
-
function getManualUpgradeCommand(pm) {
|
|
285
|
-
switch (pm) {
|
|
286
|
-
case "bun":
|
|
287
|
-
return `bun add -g ${PACKAGE_NAME}@latest`;
|
|
288
|
-
case "yarn":
|
|
289
|
-
return `yarn global add ${PACKAGE_NAME}@latest`;
|
|
290
|
-
case "pnpm":
|
|
291
|
-
return `pnpm add -g ${PACKAGE_NAME}@latest`;
|
|
292
|
-
case "npm":
|
|
293
|
-
return `npm install -g ${PACKAGE_NAME}@latest`;
|
|
294
|
-
case "unknown":
|
|
295
|
-
return `npm install -g ${PACKAGE_NAME}@latest`;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
async function getLatestVersion() {
|
|
299
|
-
try {
|
|
300
|
-
const controller = new AbortController();
|
|
301
|
-
const timeoutId = setTimeout(() => {
|
|
302
|
-
return controller.abort();
|
|
303
|
-
}, TIMEOUT_MS);
|
|
304
|
-
const response = await fetch(NPM_REGISTRY_URL, {
|
|
305
|
-
signal: controller.signal
|
|
306
|
-
});
|
|
307
|
-
clearTimeout(timeoutId);
|
|
308
|
-
if (!response.ok) {
|
|
309
|
-
return null;
|
|
310
|
-
}
|
|
311
|
-
const json = await response.json();
|
|
312
|
-
return json.version ?? null;
|
|
313
|
-
} catch {
|
|
314
|
-
return null;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
async function startSilentUpgrade(currentVersion) {
|
|
318
|
-
pendingUpgrade = null;
|
|
319
|
-
const latestVersion = await getLatestVersion();
|
|
320
|
-
if (latestVersion === null || latestVersion === currentVersion) {
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
const packageManager = detectPackageManager();
|
|
324
|
-
if (!isAutoUpgradeSupported(packageManager)) {
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
const isWindows = process.platform === "win32";
|
|
328
|
-
const args = packageManager === "pnpm" ? ["add", "-g", `${PACKAGE_NAME}@latest`] : ["install", "-g", `${PACKAGE_NAME}@latest`];
|
|
329
|
-
const child = safeSpawn(packageManager, args, {
|
|
330
|
-
stdio: "pipe",
|
|
331
|
-
detached: !isWindows,
|
|
332
|
-
windowsHide: true
|
|
333
|
-
});
|
|
334
|
-
const promise = new Promise((resolve) => {
|
|
335
|
-
child.on("close", (code) => {
|
|
336
|
-
return resolve(code === 0);
|
|
337
|
-
});
|
|
338
|
-
child.on("error", () => {
|
|
339
|
-
return resolve(false);
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
pendingUpgrade = { promise, child, packageManager };
|
|
343
|
-
}
|
|
344
|
-
async function waitForSilentUpgrade(timeout = TIMEOUT_MS) {
|
|
345
|
-
if (!pendingUpgrade) {
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
const { promise, child, packageManager } = pendingUpgrade;
|
|
349
|
-
pendingUpgrade = null;
|
|
350
|
-
const result = await Promise.race([
|
|
351
|
-
promise,
|
|
352
|
-
new Promise((resolve) => {
|
|
353
|
-
setTimeout(() => {
|
|
354
|
-
child.kill();
|
|
355
|
-
resolve(false);
|
|
356
|
-
}, timeout);
|
|
357
|
-
})
|
|
358
|
-
]);
|
|
359
|
-
if (!result) {
|
|
360
|
-
console.log(
|
|
361
|
-
source_default.yellow(
|
|
362
|
-
`
|
|
363
|
-
\u26A0 vm0 auto upgrade failed. Please run: ${getManualUpgradeCommand(packageManager)}`
|
|
364
|
-
)
|
|
365
|
-
);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
// src/commands/run/run.ts
|
|
370
|
-
function parseModelProviderType(value) {
|
|
371
|
-
if (value === void 0) {
|
|
372
|
-
return void 0;
|
|
373
|
-
}
|
|
374
|
-
const parsed = directRunModelProviderTypeSchema.safeParse(value);
|
|
375
|
-
if (!parsed.success) {
|
|
376
|
-
throw new Error(`Invalid model provider type: ${value}`);
|
|
377
|
-
}
|
|
378
|
-
return parsed.data;
|
|
379
|
-
}
|
|
380
|
-
var mainRunCommand = new Command().name("run").description("Run an agent").argument(
|
|
381
|
-
"<agent-name>",
|
|
382
|
-
"Agent reference: name[:version] (e.g., 'my-agent', 'my-agent:abc123', 'my-agent:latest')"
|
|
383
|
-
).argument("<prompt>", "Prompt for the agent").option(
|
|
384
|
-
"--env-file <path>",
|
|
385
|
-
"Load environment variables from file (priority: CLI flags > file > env vars)"
|
|
386
|
-
).option(
|
|
387
|
-
"--vars <KEY=value>",
|
|
388
|
-
"Variables for ${{ vars.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
389
|
-
collectKeyValue,
|
|
390
|
-
{}
|
|
391
|
-
).option(
|
|
392
|
-
"--secrets <KEY=value>",
|
|
393
|
-
"Secrets for ${{ secrets.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
394
|
-
collectKeyValue,
|
|
395
|
-
{}
|
|
396
|
-
).option(
|
|
397
|
-
"--artifact <artifact>",
|
|
398
|
-
"Mount an artifact (repeatable, format: name:/path or name:version:/path)",
|
|
399
|
-
collectArtifacts,
|
|
400
|
-
[]
|
|
401
|
-
).option(
|
|
402
|
-
"--volume-version <name=version>",
|
|
403
|
-
"Volume version override (repeatable, format: volumeName=version)",
|
|
404
|
-
collectVolumeVersions,
|
|
405
|
-
{}
|
|
406
|
-
).option(
|
|
407
|
-
"--volume <volume>",
|
|
408
|
-
"Mount a volume (repeatable, format: name:/path or name:version:/path)",
|
|
409
|
-
collectMounts,
|
|
410
|
-
[]
|
|
411
|
-
).option(
|
|
412
|
-
"--conversation <id>",
|
|
413
|
-
"Resume from conversation ID (for fine-grained control)"
|
|
414
|
-
).option(
|
|
415
|
-
"--append-system-prompt <text>",
|
|
416
|
-
"Append text to the agent's system prompt"
|
|
417
|
-
).option(
|
|
418
|
-
"--disallowed-tools <tools...>",
|
|
419
|
-
"Tools to disable in Claude CLI (e.g., CronCreate WebSearch)"
|
|
420
|
-
).option(
|
|
421
|
-
"--tools <tools...>",
|
|
422
|
-
"Built-in tools to make available in Claude CLI (e.g., Bash Edit Read)"
|
|
423
|
-
).option(
|
|
424
|
-
"--settings <json>",
|
|
425
|
-
"Settings JSON to pass to Claude CLI (e.g., hooks, permissions)"
|
|
426
|
-
).option(
|
|
427
|
-
"--permission-policies <json>",
|
|
428
|
-
`Permission policies JSON (e.g., '{"github": {"actions:read": "allow"}}')`
|
|
429
|
-
).option("--verbose", "Show full tool inputs and outputs").option(
|
|
430
|
-
"--capture-network-bodies",
|
|
431
|
-
"Capture HTTP header names, selected safe header values, request bodies, and response bodies in network logs"
|
|
432
|
-
).addOption(new Option("--real-agent-in-preview").hideHelp()).addOption(new Option("--model-provider-type <type>").hideHelp()).addOption(new Option("--no-auto-update").hideHelp()).action(
|
|
433
|
-
withErrorHandler(
|
|
434
|
-
async (identifier, prompt, options) => {
|
|
435
|
-
if (options.autoUpdate !== false) {
|
|
436
|
-
await startSilentUpgrade("9.244.7");
|
|
437
|
-
}
|
|
438
|
-
const { name, version } = parseIdentifier(identifier);
|
|
439
|
-
let composeId;
|
|
440
|
-
let composeContent;
|
|
441
|
-
if (isUUID(name)) {
|
|
442
|
-
const compose = await getComposeById(name);
|
|
443
|
-
composeId = compose.id;
|
|
444
|
-
composeContent = compose.content;
|
|
445
|
-
} else {
|
|
446
|
-
const compose = await getComposeByName(name);
|
|
447
|
-
if (!compose) {
|
|
448
|
-
throw new Error(`Agent not found: ${identifier}`);
|
|
449
|
-
}
|
|
450
|
-
composeId = compose.id;
|
|
451
|
-
composeContent = compose.content;
|
|
452
|
-
}
|
|
453
|
-
let agentComposeVersionId;
|
|
454
|
-
if (version && version !== "latest") {
|
|
455
|
-
try {
|
|
456
|
-
const versionInfo = await getComposeVersion(composeId, version);
|
|
457
|
-
agentComposeVersionId = versionInfo.versionId;
|
|
458
|
-
} catch (error) {
|
|
459
|
-
throw new Error(`Version not found: ${version}`, {
|
|
460
|
-
cause: error
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
const varNames = extractVarNames(composeContent);
|
|
465
|
-
const vars = loadValues(options.vars, varNames, options.envFile);
|
|
466
|
-
const secretNames = extractSecretNames(composeContent);
|
|
467
|
-
const secrets = loadValues(
|
|
468
|
-
options.secrets,
|
|
469
|
-
secretNames,
|
|
470
|
-
options.envFile
|
|
471
|
-
);
|
|
472
|
-
const volumeVersions = Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0;
|
|
473
|
-
const additionalVolumes = options.volume.length > 0 ? options.volume : void 0;
|
|
474
|
-
const artifacts = options.artifact.length > 0 ? options.artifact : void 0;
|
|
475
|
-
const response = await createRun({
|
|
476
|
-
// Use agentComposeVersionId if resolved, otherwise use agentComposeId (resolves to HEAD)
|
|
477
|
-
...agentComposeVersionId ? { agentComposeVersionId } : { agentComposeId: composeId },
|
|
478
|
-
prompt,
|
|
479
|
-
vars,
|
|
480
|
-
secrets,
|
|
481
|
-
artifacts,
|
|
482
|
-
volumeVersions,
|
|
483
|
-
additionalVolumes,
|
|
484
|
-
conversationId: options.conversation,
|
|
485
|
-
appendSystemPrompt: options.appendSystemPrompt,
|
|
486
|
-
disallowedTools: options.disallowedTools,
|
|
487
|
-
tools: options.tools,
|
|
488
|
-
settings: options.settings,
|
|
489
|
-
permissionPolicies: parsePermissionPolicies(
|
|
490
|
-
options.permissionPolicies
|
|
491
|
-
),
|
|
492
|
-
captureNetworkBodies: options.captureNetworkBodies || void 0,
|
|
493
|
-
realAgentInPreview: options.realAgentInPreview || void 0,
|
|
494
|
-
modelProviderType: parseModelProviderType(options.modelProviderType)
|
|
495
|
-
});
|
|
496
|
-
if (response.status === "failed") {
|
|
497
|
-
throw new Error(
|
|
498
|
-
"Run preparation failed",
|
|
499
|
-
response.error ? { cause: new Error(response.error) } : void 0
|
|
500
|
-
);
|
|
501
|
-
}
|
|
502
|
-
renderRunCreated(response);
|
|
503
|
-
const result = await pollEvents(response.runId, {
|
|
504
|
-
verbose: options.verbose
|
|
505
|
-
});
|
|
506
|
-
if (!result.succeeded) {
|
|
507
|
-
throw new Error("Run failed");
|
|
508
|
-
}
|
|
509
|
-
showNextSteps(result);
|
|
510
|
-
if (options.autoUpdate !== false) {
|
|
511
|
-
await waitForSilentUpgrade();
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
)
|
|
515
|
-
);
|
|
516
|
-
|
|
517
|
-
// src/commands/run/resume.ts
|
|
518
|
-
init_esm_shims();
|
|
519
|
-
var resumeCommand = new Command().name("resume").description("Resume an agent run from a checkpoint (uses all snapshot data)").argument("<checkpointId>", "Checkpoint ID to resume from").argument("<prompt>", "Prompt for the resumed agent").option(
|
|
520
|
-
"--env-file <path>",
|
|
521
|
-
"Load environment variables from file (priority: CLI flags > file > env vars)"
|
|
522
|
-
).option(
|
|
523
|
-
"--vars <KEY=value>",
|
|
524
|
-
"Variables for ${{ vars.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
525
|
-
collectKeyValue,
|
|
526
|
-
{}
|
|
527
|
-
).option(
|
|
528
|
-
"--secrets <KEY=value>",
|
|
529
|
-
"Secrets for ${{ secrets.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
530
|
-
collectKeyValue,
|
|
531
|
-
{}
|
|
532
|
-
).option(
|
|
533
|
-
"--volume-version <name=version>",
|
|
534
|
-
"Volume version override (repeatable)",
|
|
535
|
-
collectVolumeVersions,
|
|
536
|
-
{}
|
|
537
|
-
).option(
|
|
538
|
-
"--artifact <artifact>",
|
|
539
|
-
"Mount an artifact (repeatable, format: name:/path or name:version:/path)",
|
|
540
|
-
collectArtifacts,
|
|
541
|
-
[]
|
|
542
|
-
).option(
|
|
543
|
-
"--volume <volume>",
|
|
544
|
-
"Mount a volume (repeatable, format: name:/path or name:version:/path)",
|
|
545
|
-
collectMounts,
|
|
546
|
-
[]
|
|
547
|
-
).option(
|
|
548
|
-
"--append-system-prompt <text>",
|
|
549
|
-
"Append text to the agent's system prompt"
|
|
550
|
-
).option(
|
|
551
|
-
"--disallowed-tools <tools...>",
|
|
552
|
-
"Tools to disable in Claude CLI (e.g., CronCreate WebSearch)"
|
|
553
|
-
).option(
|
|
554
|
-
"--tools <tools...>",
|
|
555
|
-
"Built-in tools to make available in Claude CLI (e.g., Bash Edit Read)"
|
|
556
|
-
).option(
|
|
557
|
-
"--settings <json>",
|
|
558
|
-
"Settings JSON to pass to Claude CLI (e.g., hooks, permissions)"
|
|
559
|
-
).option(
|
|
560
|
-
"--permission-policies <json>",
|
|
561
|
-
`Permission policies JSON (e.g., '{"github": {"actions:read": "allow"}}')`
|
|
562
|
-
).option("--verbose", "Show full tool inputs and outputs").addOption(new Option("--real-agent-in-preview").hideHelp()).action(
|
|
563
|
-
withErrorHandler(
|
|
564
|
-
async (checkpointId, prompt, options, command) => {
|
|
565
|
-
const allOpts = command.optsWithGlobals();
|
|
566
|
-
const vars = { ...allOpts.vars, ...options.vars };
|
|
567
|
-
const secrets = { ...allOpts.secrets, ...options.secrets };
|
|
568
|
-
if (!isUUID(checkpointId)) {
|
|
569
|
-
throw new Error(`Invalid checkpoint ID format: ${checkpointId}`, {
|
|
570
|
-
cause: new Error("Checkpoint ID must be a valid UUID")
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
const checkpointInfo = await getCheckpoint(checkpointId);
|
|
574
|
-
const requiredSecretNames = checkpointInfo.agentComposeSnapshot.secretNames || [];
|
|
575
|
-
const envFile = options.envFile || allOpts.envFile;
|
|
576
|
-
const loadedSecrets = loadValues(secrets, requiredSecretNames, envFile);
|
|
577
|
-
const artifactsInput = options.artifact.length > 0 ? options.artifact : allOpts.artifact;
|
|
578
|
-
const artifacts = artifactsInput.length > 0 ? artifactsInput : void 0;
|
|
579
|
-
const resolvedVars = Object.keys(vars).length > 0 ? vars : void 0;
|
|
580
|
-
const volumeVersions = Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0;
|
|
581
|
-
const additionalVolumes = allOpts.volume.length > 0 ? allOpts.volume : void 0;
|
|
582
|
-
const response = await createRun({
|
|
583
|
-
checkpointId,
|
|
584
|
-
prompt,
|
|
585
|
-
vars: resolvedVars,
|
|
586
|
-
secrets: loadedSecrets,
|
|
587
|
-
artifacts,
|
|
588
|
-
volumeVersions,
|
|
589
|
-
additionalVolumes,
|
|
590
|
-
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
591
|
-
disallowedTools: options.disallowedTools || allOpts.disallowedTools,
|
|
592
|
-
tools: options.tools || allOpts.tools,
|
|
593
|
-
settings: options.settings || allOpts.settings,
|
|
594
|
-
permissionPolicies: parsePermissionPolicies(
|
|
595
|
-
options.permissionPolicies || allOpts.permissionPolicies
|
|
596
|
-
),
|
|
597
|
-
realAgentInPreview: options.realAgentInPreview || allOpts.realAgentInPreview || void 0
|
|
598
|
-
});
|
|
599
|
-
if (response.status === "failed") {
|
|
600
|
-
throw new Error(
|
|
601
|
-
"Run preparation failed",
|
|
602
|
-
response.error ? { cause: new Error(response.error) } : void 0
|
|
603
|
-
);
|
|
604
|
-
}
|
|
605
|
-
renderRunCreated(response);
|
|
606
|
-
const verbose = options.verbose || allOpts.verbose;
|
|
607
|
-
const result = await pollEvents(response.runId, { verbose });
|
|
608
|
-
if (!result.succeeded) {
|
|
609
|
-
throw new Error("Run failed");
|
|
610
|
-
}
|
|
611
|
-
showNextSteps(result);
|
|
612
|
-
}
|
|
613
|
-
)
|
|
614
|
-
);
|
|
615
|
-
|
|
616
|
-
// src/commands/run/continue.ts
|
|
617
|
-
init_esm_shims();
|
|
618
|
-
function pickOpt(a, b) {
|
|
619
|
-
return a || b || void 0;
|
|
620
|
-
}
|
|
621
|
-
var continueCommand = new Command().name("continue").description(
|
|
622
|
-
"Continue an agent run from a session (uses latest artifact version)"
|
|
623
|
-
).argument("<agentSessionId>", "Agent session ID to continue from").argument("<prompt>", "Prompt for the continued agent").option(
|
|
624
|
-
"--env-file <path>",
|
|
625
|
-
"Load environment variables from file (priority: CLI flags > file > env vars)"
|
|
626
|
-
).option(
|
|
627
|
-
"--vars <KEY=value>",
|
|
628
|
-
"Variables for ${{ vars.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
629
|
-
collectKeyValue,
|
|
630
|
-
{}
|
|
631
|
-
).option(
|
|
632
|
-
"--secrets <KEY=value>",
|
|
633
|
-
"Secrets for ${{ secrets.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
634
|
-
collectKeyValue,
|
|
635
|
-
{}
|
|
636
|
-
).option(
|
|
637
|
-
"--artifact <artifact>",
|
|
638
|
-
"Mount an artifact (repeatable, format: name:/path or name:version:/path)",
|
|
639
|
-
collectArtifacts,
|
|
640
|
-
[]
|
|
641
|
-
).option(
|
|
642
|
-
"--volume <volume>",
|
|
643
|
-
"Mount a volume (repeatable, format: name:/path or name:version:/path)",
|
|
644
|
-
collectMounts,
|
|
645
|
-
[]
|
|
646
|
-
).option(
|
|
647
|
-
"--append-system-prompt <text>",
|
|
648
|
-
"Append text to the agent's system prompt"
|
|
649
|
-
).option(
|
|
650
|
-
"--disallowed-tools <tools...>",
|
|
651
|
-
"Tools to disable in Claude CLI (e.g., CronCreate WebSearch)"
|
|
652
|
-
).option(
|
|
653
|
-
"--tools <tools...>",
|
|
654
|
-
"Built-in tools to make available in Claude CLI (e.g., Bash Edit Read)"
|
|
655
|
-
).option(
|
|
656
|
-
"--settings <json>",
|
|
657
|
-
"Settings JSON to pass to Claude CLI (e.g., hooks, permissions)"
|
|
658
|
-
).option(
|
|
659
|
-
"--permission-policies <json>",
|
|
660
|
-
`Permission policies JSON (e.g., '{"github": {"actions:read": "allow"}}')`
|
|
661
|
-
).option("--verbose", "Show full tool inputs and outputs").addOption(new Option("--real-agent-in-preview").hideHelp()).action(
|
|
662
|
-
withErrorHandler(
|
|
663
|
-
async (agentSessionId, prompt, options, command) => {
|
|
664
|
-
const allOpts = command.optsWithGlobals();
|
|
665
|
-
const vars = { ...allOpts.vars, ...options.vars };
|
|
666
|
-
const secrets = { ...allOpts.secrets, ...options.secrets };
|
|
667
|
-
if (!isUUID(agentSessionId)) {
|
|
668
|
-
throw new Error(
|
|
669
|
-
`Invalid agent session ID format: ${agentSessionId}`,
|
|
670
|
-
{ cause: new Error("Agent session ID must be a valid UUID") }
|
|
671
|
-
);
|
|
672
|
-
}
|
|
673
|
-
const sessionInfo = await getSession(agentSessionId);
|
|
674
|
-
const requiredSecretNames = sessionInfo.secretNames || [];
|
|
675
|
-
const envFile = options.envFile || allOpts.envFile;
|
|
676
|
-
const loadedSecrets = loadValues(secrets, requiredSecretNames, envFile);
|
|
677
|
-
const artifactsInput = options.artifact.length > 0 ? options.artifact : allOpts.artifact;
|
|
678
|
-
const artifacts = artifactsInput.length > 0 ? artifactsInput : void 0;
|
|
679
|
-
const response = await createRun({
|
|
680
|
-
sessionId: agentSessionId,
|
|
681
|
-
prompt,
|
|
682
|
-
vars: Object.keys(vars).length > 0 ? vars : void 0,
|
|
683
|
-
secrets: loadedSecrets,
|
|
684
|
-
artifacts,
|
|
685
|
-
additionalVolumes: allOpts.volume.length > 0 ? allOpts.volume : void 0,
|
|
686
|
-
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
687
|
-
disallowedTools: options.disallowedTools || allOpts.disallowedTools,
|
|
688
|
-
tools: options.tools || allOpts.tools,
|
|
689
|
-
settings: options.settings || allOpts.settings,
|
|
690
|
-
permissionPolicies: parsePermissionPolicies(
|
|
691
|
-
options.permissionPolicies || allOpts.permissionPolicies
|
|
692
|
-
),
|
|
693
|
-
realAgentInPreview: pickOpt(
|
|
694
|
-
options.realAgentInPreview,
|
|
695
|
-
allOpts.realAgentInPreview
|
|
696
|
-
)
|
|
697
|
-
});
|
|
698
|
-
if (response.status === "failed") {
|
|
699
|
-
throw new Error(
|
|
700
|
-
"Run preparation failed",
|
|
701
|
-
response.error ? { cause: new Error(response.error) } : void 0
|
|
702
|
-
);
|
|
703
|
-
}
|
|
704
|
-
renderRunCreated(response);
|
|
705
|
-
const verbose = options.verbose || allOpts.verbose;
|
|
706
|
-
const result = await pollEvents(response.runId, { verbose });
|
|
707
|
-
if (!result.succeeded) {
|
|
708
|
-
throw new Error("Run failed");
|
|
709
|
-
}
|
|
710
|
-
showNextSteps(result);
|
|
711
|
-
}
|
|
712
|
-
)
|
|
713
|
-
);
|
|
714
|
-
|
|
715
|
-
// src/commands/run/list.ts
|
|
716
|
-
init_esm_shims();
|
|
717
|
-
var UUID_LENGTH = 36;
|
|
718
|
-
var VALID_STATUSES = ALL_RUN_STATUSES.join(",");
|
|
719
|
-
function formatRunStatus(status, width) {
|
|
720
|
-
const paddedStatus = width ? status.padEnd(width) : status;
|
|
721
|
-
switch (status) {
|
|
722
|
-
case "queued":
|
|
723
|
-
return source_default.blue(paddedStatus);
|
|
724
|
-
case "running":
|
|
725
|
-
return source_default.green(paddedStatus);
|
|
726
|
-
case "pending":
|
|
727
|
-
return source_default.yellow(paddedStatus);
|
|
728
|
-
case "completed":
|
|
729
|
-
return source_default.dim(paddedStatus);
|
|
730
|
-
case "failed":
|
|
731
|
-
case "timeout":
|
|
732
|
-
return source_default.red(paddedStatus);
|
|
733
|
-
default:
|
|
734
|
-
return paddedStatus;
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
function parseStatusFilter(options) {
|
|
738
|
-
if (options.all) {
|
|
739
|
-
return VALID_STATUSES;
|
|
740
|
-
}
|
|
741
|
-
if (options.status) {
|
|
742
|
-
const values = options.status.split(",").map((s) => {
|
|
743
|
-
return s.trim();
|
|
744
|
-
});
|
|
745
|
-
for (const v of values) {
|
|
746
|
-
if (!ALL_RUN_STATUSES.includes(v)) {
|
|
747
|
-
throw new Error(`Invalid status "${v}"`, {
|
|
748
|
-
cause: new Error(`Valid values: ${VALID_STATUSES}`)
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
return values.join(",");
|
|
753
|
-
}
|
|
754
|
-
if (options.since) {
|
|
755
|
-
return VALID_STATUSES;
|
|
756
|
-
}
|
|
757
|
-
return void 0;
|
|
758
|
-
}
|
|
759
|
-
function parseTimeOption(value, optionName) {
|
|
760
|
-
try {
|
|
761
|
-
return new Date(parseTime(value)).toISOString();
|
|
762
|
-
} catch {
|
|
763
|
-
throw new Error(
|
|
764
|
-
`Invalid ${optionName} format. Use ISO (2026-01-01) or relative (1h, 7d, 30d)`
|
|
765
|
-
);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
function parseLimit(value) {
|
|
769
|
-
if (!value) return void 0;
|
|
770
|
-
const limit = parseInt(value, 10);
|
|
771
|
-
if (isNaN(limit) || limit < 1 || limit > 100) {
|
|
772
|
-
throw new Error("--limit must be between 1 and 100");
|
|
773
|
-
}
|
|
774
|
-
return limit;
|
|
775
|
-
}
|
|
776
|
-
function displayRuns(runs) {
|
|
777
|
-
const agentWidth = Math.max(
|
|
778
|
-
5,
|
|
779
|
-
...runs.map((r) => {
|
|
780
|
-
return r.agentName.length;
|
|
781
|
-
})
|
|
782
|
-
);
|
|
783
|
-
const statusWidth = Math.max(
|
|
784
|
-
6,
|
|
785
|
-
...runs.map((r) => {
|
|
786
|
-
return r.status.length;
|
|
787
|
-
})
|
|
788
|
-
);
|
|
789
|
-
const header = [
|
|
790
|
-
"ID".padEnd(UUID_LENGTH),
|
|
791
|
-
"AGENT".padEnd(agentWidth),
|
|
792
|
-
"STATUS".padEnd(statusWidth),
|
|
793
|
-
"CREATED"
|
|
794
|
-
].join(" ");
|
|
795
|
-
console.log(source_default.dim(header));
|
|
796
|
-
for (const run of runs) {
|
|
797
|
-
const row = [
|
|
798
|
-
run.id.padEnd(UUID_LENGTH),
|
|
799
|
-
run.agentName.padEnd(agentWidth),
|
|
800
|
-
formatRunStatus(run.status, statusWidth),
|
|
801
|
-
formatRelativeTime(run.createdAt)
|
|
802
|
-
].join(" ");
|
|
803
|
-
console.log(row);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
function displayEmptyState(hasFilters) {
|
|
807
|
-
if (hasFilters) {
|
|
808
|
-
console.log(source_default.dim("No runs found matching filters"));
|
|
809
|
-
} else {
|
|
810
|
-
console.log(source_default.dim("No active runs"));
|
|
811
|
-
console.log(source_default.dim(' Run: vm0 run <agent> "<prompt>"'));
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
var listCommand = new Command().name("list").alias("ls").description("List runs").option(
|
|
815
|
-
"--status <status,...>",
|
|
816
|
-
`Filter by status: ${VALID_STATUSES} (default: pending,running)`
|
|
817
|
-
).option("--all", "Show all statuses (mutually exclusive with --status)").option("--agent <name>", "Filter by agent name").option("--since <date>", "Start time (ISO format or relative: 1h, 7d, 30d)").option("--until <date>", "End time (defaults to now)").option("--limit <n>", "Maximum number of results (default: 50, max: 100)").action(
|
|
818
|
-
withErrorHandler(async (options) => {
|
|
819
|
-
if (options.all && options.status) {
|
|
820
|
-
throw new Error("--all and --status are mutually exclusive");
|
|
821
|
-
}
|
|
822
|
-
const statusFilter = parseStatusFilter(options);
|
|
823
|
-
const since = options.since ? parseTimeOption(options.since, "--since") : void 0;
|
|
824
|
-
const until = options.until ? parseTimeOption(options.until, "--until") : void 0;
|
|
825
|
-
const limit = parseLimit(options.limit);
|
|
826
|
-
if (since && until && new Date(since) >= new Date(until)) {
|
|
827
|
-
throw new Error("--since must be before --until");
|
|
828
|
-
}
|
|
829
|
-
const response = await listRuns({
|
|
830
|
-
status: statusFilter,
|
|
831
|
-
agent: options.agent,
|
|
832
|
-
since,
|
|
833
|
-
until,
|
|
834
|
-
limit
|
|
835
|
-
});
|
|
836
|
-
const runs = response.runs;
|
|
837
|
-
if (runs.length === 0) {
|
|
838
|
-
const hasFilters = !!(options.status || options.all || options.agent || options.since);
|
|
839
|
-
displayEmptyState(hasFilters);
|
|
840
|
-
return;
|
|
841
|
-
}
|
|
842
|
-
displayRuns(runs);
|
|
843
|
-
})
|
|
844
|
-
);
|
|
845
|
-
|
|
846
|
-
// src/commands/run/kill.ts
|
|
847
|
-
init_esm_shims();
|
|
848
|
-
var killCommand = new Command().name("kill").description("Kill (cancel) a pending or running run").argument("<run-id>", "Run ID to kill").action(
|
|
849
|
-
withErrorHandler(async (runId) => {
|
|
850
|
-
await cancelRun(runId);
|
|
851
|
-
console.log(source_default.green(`\u2713 Run ${runId} cancelled`));
|
|
852
|
-
})
|
|
853
|
-
);
|
|
854
|
-
|
|
855
|
-
// src/commands/run/queue.ts
|
|
856
|
-
init_esm_shims();
|
|
857
|
-
var queueCommand = new Command().name("queue").description("Show org run queue status").action(
|
|
858
|
-
withErrorHandler(async () => {
|
|
859
|
-
const data = await getRunQueue();
|
|
860
|
-
const { concurrency, queue } = data;
|
|
861
|
-
const limitDisplay = concurrency.limit === 0 ? "unlimited" : `${concurrency.active}/${concurrency.limit} slots used`;
|
|
862
|
-
console.log(`Concurrency: ${limitDisplay} (${concurrency.tier} tier)`);
|
|
863
|
-
if (queue.length === 0) {
|
|
864
|
-
console.log(source_default.dim("Queue: empty \u2014 all slots available"));
|
|
865
|
-
return;
|
|
866
|
-
}
|
|
867
|
-
console.log(
|
|
868
|
-
`Queue: ${queue.length} run${queue.length > 1 ? "s" : ""} waiting`
|
|
869
|
-
);
|
|
870
|
-
console.log();
|
|
871
|
-
const posWidth = Math.max(1, String(queue.length).length);
|
|
872
|
-
const agentWidth = Math.max(
|
|
873
|
-
5,
|
|
874
|
-
...queue.map((e) => {
|
|
875
|
-
return (e.agentName ?? "-").length;
|
|
876
|
-
})
|
|
877
|
-
);
|
|
878
|
-
const emailWidth = Math.max(
|
|
879
|
-
4,
|
|
880
|
-
...queue.map((e) => {
|
|
881
|
-
return (e.userEmail ?? "-").length;
|
|
882
|
-
})
|
|
883
|
-
);
|
|
884
|
-
const header = [
|
|
885
|
-
"#".padEnd(posWidth),
|
|
886
|
-
"AGENT".padEnd(agentWidth),
|
|
887
|
-
"USER".padEnd(emailWidth),
|
|
888
|
-
"CREATED"
|
|
889
|
-
].join(" ");
|
|
890
|
-
console.log(source_default.dim(header));
|
|
891
|
-
for (const entry of queue) {
|
|
892
|
-
const marker = entry.runId !== null ? source_default.cyan(" \u2190 you") : "";
|
|
893
|
-
const row = [
|
|
894
|
-
String(entry.position).padEnd(posWidth),
|
|
895
|
-
(entry.agentName ?? "-").padEnd(agentWidth),
|
|
896
|
-
(entry.userEmail ?? "-").padEnd(emailWidth),
|
|
897
|
-
formatRelativeTime(entry.createdAt)
|
|
898
|
-
].join(" ");
|
|
899
|
-
console.log(row + marker);
|
|
900
|
-
}
|
|
901
|
-
})
|
|
902
|
-
);
|
|
903
|
-
|
|
904
|
-
// src/commands/run/index.ts
|
|
905
|
-
mainRunCommand.addCommand(resumeCommand);
|
|
906
|
-
mainRunCommand.addCommand(continueCommand);
|
|
907
|
-
mainRunCommand.addCommand(listCommand);
|
|
908
|
-
mainRunCommand.addCommand(killCommand);
|
|
909
|
-
mainRunCommand.addCommand(queueCommand);
|
|
910
|
-
var runCommand = mainRunCommand;
|
|
911
|
-
|
|
912
202
|
// src/commands/whoami.ts
|
|
913
203
|
init_esm_shims();
|
|
914
204
|
function isInsideSandbox() {
|
|
@@ -964,9 +254,8 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
964
254
|
|
|
965
255
|
// src/index.ts
|
|
966
256
|
var program = new Command();
|
|
967
|
-
program.name("vm0").description("VM0 CLI -
|
|
257
|
+
program.name("vm0").description("VM0 CLI - Developer authentication utilities").version("9.245.0");
|
|
968
258
|
program.addCommand(authCommand);
|
|
969
|
-
program.addCommand(runCommand);
|
|
970
259
|
program.addCommand(whoamiCommand);
|
|
971
260
|
if (process.argv[1]?.endsWith("index.js") || process.argv[1]?.endsWith("index.ts") || process.argv[1]?.endsWith("vm0")) {
|
|
972
261
|
await configureGlobalProxyFromEnv();
|