@vm0/cli 9.117.1 → 9.119.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/{chunk-BMBAB5QA.js → chunk-BESNYOIM.js} +23476 -23647
- package/chunk-BESNYOIM.js.map +1 -0
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +68 -6
- package/zero.js.map +1 -1
- package/chunk-BMBAB5QA.js.map +0 -1
package/index.js
CHANGED
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
source_default,
|
|
73
73
|
volumeConfigSchema,
|
|
74
74
|
withErrorHandler
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-BESNYOIM.js";
|
|
76
76
|
|
|
77
77
|
// src/index.ts
|
|
78
78
|
init_esm_shims();
|
|
@@ -465,7 +465,7 @@ function getConfigPath() {
|
|
|
465
465
|
return join(homedir(), ".vm0", "config.json");
|
|
466
466
|
}
|
|
467
467
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
468
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
468
|
+
console.log(source_default.bold(`VM0 CLI v${"9.119.0"}`));
|
|
469
469
|
console.log();
|
|
470
470
|
const config = await loadConfig();
|
|
471
471
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4494,7 +4494,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4494
4494
|
options.autoUpdate = false;
|
|
4495
4495
|
}
|
|
4496
4496
|
if (options.autoUpdate !== false) {
|
|
4497
|
-
await startSilentUpgrade("9.
|
|
4497
|
+
await startSilentUpgrade("9.119.0");
|
|
4498
4498
|
}
|
|
4499
4499
|
try {
|
|
4500
4500
|
let result;
|
|
@@ -4579,7 +4579,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4579
4579
|
withErrorHandler(
|
|
4580
4580
|
async (identifier, prompt, options) => {
|
|
4581
4581
|
if (options.autoUpdate !== false) {
|
|
4582
|
-
await startSilentUpgrade("9.
|
|
4582
|
+
await startSilentUpgrade("9.119.0");
|
|
4583
4583
|
}
|
|
4584
4584
|
const { name, version } = parseIdentifier(identifier);
|
|
4585
4585
|
let composeId;
|
|
@@ -6353,7 +6353,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
|
|
|
6353
6353
|
withErrorHandler(
|
|
6354
6354
|
async (prompt, options) => {
|
|
6355
6355
|
if (options.autoUpdate !== false) {
|
|
6356
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
6356
|
+
const shouldExit = await checkAndUpgrade("9.119.0", prompt);
|
|
6357
6357
|
if (shouldExit) {
|
|
6358
6358
|
process.exit(0);
|
|
6359
6359
|
}
|
|
@@ -7120,13 +7120,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7120
7120
|
if (latestVersion === null) {
|
|
7121
7121
|
throw new Error("Could not check for updates. Please try again later.");
|
|
7122
7122
|
}
|
|
7123
|
-
if (latestVersion === "9.
|
|
7124
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
7123
|
+
if (latestVersion === "9.119.0") {
|
|
7124
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.119.0"})`));
|
|
7125
7125
|
return;
|
|
7126
7126
|
}
|
|
7127
7127
|
console.log(
|
|
7128
7128
|
source_default.yellow(
|
|
7129
|
-
`Current version: ${"9.
|
|
7129
|
+
`Current version: ${"9.119.0"} -> Latest version: ${latestVersion}`
|
|
7130
7130
|
)
|
|
7131
7131
|
);
|
|
7132
7132
|
console.log();
|
|
@@ -7153,7 +7153,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7153
7153
|
const success = await performUpgrade(packageManager);
|
|
7154
7154
|
if (success) {
|
|
7155
7155
|
console.log(
|
|
7156
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
7156
|
+
source_default.green(`\u2713 Upgraded from ${"9.119.0"} to ${latestVersion}`)
|
|
7157
7157
|
);
|
|
7158
7158
|
return;
|
|
7159
7159
|
}
|
|
@@ -7220,7 +7220,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
7220
7220
|
|
|
7221
7221
|
// src/index.ts
|
|
7222
7222
|
var program = new Command();
|
|
7223
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
7223
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.119.0");
|
|
7224
7224
|
program.addCommand(authCommand);
|
|
7225
7225
|
program.addCommand(infoCommand);
|
|
7226
7226
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
deployZeroSchedule,
|
|
39
39
|
disableZeroSchedule,
|
|
40
40
|
downloadSlackFile,
|
|
41
|
+
downloadWebFile,
|
|
41
42
|
enableZeroSchedule,
|
|
42
43
|
extractSecretNamesFromApis,
|
|
43
44
|
findMatchingPermissions,
|
|
@@ -132,7 +133,7 @@ import {
|
|
|
132
133
|
upsertZeroOrgModelProvider,
|
|
133
134
|
withErrorHandler,
|
|
134
135
|
zeroAgentCustomSkillNameSchema
|
|
135
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-BESNYOIM.js";
|
|
136
137
|
|
|
137
138
|
// src/zero.ts
|
|
138
139
|
init_esm_shims();
|
|
@@ -3551,7 +3552,8 @@ Examples:
|
|
|
3551
3552
|
Notes:
|
|
3552
3553
|
- Re-running setup with the same agent updates the existing "default" schedule
|
|
3553
3554
|
- Use -n to manage multiple named schedules for the same agent
|
|
3554
|
-
- All flags are required in non-interactive mode; interactive mode prompts for missing values
|
|
3555
|
+
- All flags are required in non-interactive mode; interactive mode prompts for missing values
|
|
3556
|
+
- If the user wants to be notified when a schedule completes, ask them where they want to receive the notification: web chat or Slack, then include it in the prompt`
|
|
3555
3557
|
).action(
|
|
3556
3558
|
withErrorHandler(async (agentIdentifier, options) => {
|
|
3557
3559
|
const compose = await resolveCompose(agentIdentifier);
|
|
@@ -4085,12 +4087,13 @@ init_esm_shims();
|
|
|
4085
4087
|
// src/commands/zero/slack/message/send.ts
|
|
4086
4088
|
init_esm_shims();
|
|
4087
4089
|
import { readFileSync as readFileSync4 } from "fs";
|
|
4088
|
-
var sendCommand2 = new Command().name("send").description("Send a message to a Slack channel or DM a user").option("-c, --channel <id>", "Channel ID").option("-u, --user <id>",
|
|
4090
|
+
var sendCommand2 = new Command().name("send").description("Send a message to a Slack channel or DM a user").option("-c, --channel <id>", "Channel ID").option("-u, --user <id>", 'Slack user ID for DM (use "me" for yourself)').option("-t, --text <message>", "Message text").option("--thread <ts>", "Thread timestamp for replies").option("--blocks <json>", "Block Kit JSON string").addHelpText(
|
|
4089
4091
|
"after",
|
|
4090
4092
|
`
|
|
4091
4093
|
Examples:
|
|
4092
4094
|
Simple message: zero slack message send -c C01234 -t "Hello!"
|
|
4093
4095
|
DM a user: zero slack message send -u U0A8V9X98QJ -t "Hello!"
|
|
4096
|
+
DM yourself: zero slack message send -u me -t "Hello!"
|
|
4094
4097
|
Reply in thread: zero slack message send -c C01234 --thread 1234567890.123456 -t "reply"
|
|
4095
4098
|
Rich blocks: zero slack message send -c C01234 --blocks '[{"type":"section","text":{"type":"mrkdwn","text":"*Bold*"}}]'
|
|
4096
4099
|
|
|
@@ -4236,6 +4239,13 @@ Output:
|
|
|
4236
4239
|
Prints a JSON object to stdout on success:
|
|
4237
4240
|
{"path":"/tmp/slack-F01234ABCD","mimetype":"image/png","size":12345}
|
|
4238
4241
|
|
|
4242
|
+
How to read the downloaded file:
|
|
4243
|
+
- Images (png/jpg/gif/webp/svg): open the file path with your image viewing tool
|
|
4244
|
+
- Videos (mp4/mov/webm): extract frames first with
|
|
4245
|
+
ffmpeg -i <path> -vf "fps=1" -q:v 2 /tmp/<file-id>_frame_%03d.jpg
|
|
4246
|
+
then view the extracted frames
|
|
4247
|
+
- PDF/text/csv/json/markdown: read the file directly
|
|
4248
|
+
|
|
4239
4249
|
Notes:
|
|
4240
4250
|
- Uses the bot token on the server side; no user Slack token is needed
|
|
4241
4251
|
- Streams the file bytes directly to disk`
|
|
@@ -6405,6 +6415,56 @@ Examples:
|
|
|
6405
6415
|
Append an event: zero voice-chat context append <session-id> --source slow-brain --type directive --content "Done"`
|
|
6406
6416
|
);
|
|
6407
6417
|
|
|
6418
|
+
// src/commands/zero/web/index.ts
|
|
6419
|
+
init_esm_shims();
|
|
6420
|
+
|
|
6421
|
+
// src/commands/zero/web/download-file.ts
|
|
6422
|
+
init_esm_shims();
|
|
6423
|
+
import { join as join6 } from "path";
|
|
6424
|
+
import { tmpdir as tmpdir3 } from "os";
|
|
6425
|
+
function defaultOutPath2(fileId) {
|
|
6426
|
+
return join6(tmpdir3(), `web-${fileId}`);
|
|
6427
|
+
}
|
|
6428
|
+
var downloadFileCommand2 = new Command().name("download-file").description("Download a web-uploaded file by id").argument("<file-id>", "File id (UUID returned by the upload API)").option(
|
|
6429
|
+
"-o, --out <path>",
|
|
6430
|
+
"Output path for the downloaded file (default: /tmp/web-<file-id>)"
|
|
6431
|
+
).addHelpText(
|
|
6432
|
+
"after",
|
|
6433
|
+
`
|
|
6434
|
+
Examples:
|
|
6435
|
+
Download to default temp path: zero web download-file abc-123-def
|
|
6436
|
+
Download to explicit path: zero web download-file abc-123-def -o /tmp/report.pdf
|
|
6437
|
+
|
|
6438
|
+
Output:
|
|
6439
|
+
Prints a JSON object to stdout on success:
|
|
6440
|
+
{"path":"/tmp/web-abc-123-def","mimetype":"application/pdf","size":12345}
|
|
6441
|
+
|
|
6442
|
+
How to read the downloaded file:
|
|
6443
|
+
- Images (png/jpg/gif/webp/svg): open the file path with your image viewing tool
|
|
6444
|
+
- Videos (mp4/mov/webm): extract frames first with
|
|
6445
|
+
ffmpeg -i <path> -vf "fps=1" -q:v 2 /tmp/<file-id>_frame_%03d.jpg
|
|
6446
|
+
then view the extracted frames
|
|
6447
|
+
- PDF/text/csv/json/markdown: read the file directly
|
|
6448
|
+
|
|
6449
|
+
Notes:
|
|
6450
|
+
- Authenticates via ZERO_TOKEN
|
|
6451
|
+
- Streams the file bytes directly to disk`
|
|
6452
|
+
).action(
|
|
6453
|
+
withErrorHandler(async (fileId, options) => {
|
|
6454
|
+
const outPath = options.out ?? defaultOutPath2(fileId);
|
|
6455
|
+
const result = await downloadWebFile(fileId, outPath);
|
|
6456
|
+
console.log(JSON.stringify(result));
|
|
6457
|
+
})
|
|
6458
|
+
);
|
|
6459
|
+
|
|
6460
|
+
// src/commands/zero/web/index.ts
|
|
6461
|
+
var zeroWebCommand = new Command().name("web").description("Download files uploaded via the web chat UI").addCommand(downloadFileCommand2).addHelpText(
|
|
6462
|
+
"after",
|
|
6463
|
+
`
|
|
6464
|
+
Examples:
|
|
6465
|
+
Download a file: zero web download-file <file-id> -o /tmp/out.pdf`
|
|
6466
|
+
);
|
|
6467
|
+
|
|
6408
6468
|
// src/zero.ts
|
|
6409
6469
|
var COMMAND_CAPABILITY_MAP = {
|
|
6410
6470
|
agent: "agent:read",
|
|
@@ -6420,7 +6480,8 @@ var COMMAND_CAPABILITY_MAP = {
|
|
|
6420
6480
|
"developer-support": null,
|
|
6421
6481
|
"computer-use": "computer-use:write",
|
|
6422
6482
|
phone: "phone:write",
|
|
6423
|
-
"voice-chat": "voice-chat:write"
|
|
6483
|
+
"voice-chat": "voice-chat:write",
|
|
6484
|
+
web: null
|
|
6424
6485
|
};
|
|
6425
6486
|
var DEFAULT_COMMANDS = [
|
|
6426
6487
|
zeroOrgCommand,
|
|
@@ -6440,7 +6501,8 @@ var DEFAULT_COMMANDS = [
|
|
|
6440
6501
|
zeroDeveloperSupportCommand,
|
|
6441
6502
|
zeroComputerUseCommand,
|
|
6442
6503
|
zeroPhoneCommand,
|
|
6443
|
-
zeroVoiceChatCommand
|
|
6504
|
+
zeroVoiceChatCommand,
|
|
6505
|
+
zeroWebCommand
|
|
6444
6506
|
];
|
|
6445
6507
|
function shouldHideCommand(name, payload) {
|
|
6446
6508
|
if (!payload) return false;
|
|
@@ -6459,7 +6521,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
6459
6521
|
var program = new Command();
|
|
6460
6522
|
program.name("zero").description(
|
|
6461
6523
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
6462
|
-
).version("9.
|
|
6524
|
+
).version("9.119.0").addHelpText(
|
|
6463
6525
|
"after",
|
|
6464
6526
|
`
|
|
6465
6527
|
Examples:
|