@vm0/cli 9.116.3 → 9.117.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-PK7CJPFD.js → chunk-HVVPJHCH.js} +325 -307
- package/chunk-HVVPJHCH.js.map +1 -0
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +97 -14
- package/zero.js.map +1 -1
- package/chunk-PK7CJPFD.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-HVVPJHCH.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.117.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.117.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.117.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.117.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.117.0") {
|
|
7124
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.117.0"})`));
|
|
7125
7125
|
return;
|
|
7126
7126
|
}
|
|
7127
7127
|
console.log(
|
|
7128
7128
|
source_default.yellow(
|
|
7129
|
-
`Current version: ${"9.
|
|
7129
|
+
`Current version: ${"9.117.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.117.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.117.0");
|
|
7224
7224
|
program.addCommand(authCommand);
|
|
7225
7225
|
program.addCommand(infoCommand);
|
|
7226
7226
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -112,6 +112,7 @@ import {
|
|
|
112
112
|
resolveZeroScheduleByAgent,
|
|
113
113
|
saveConfig,
|
|
114
114
|
searchZeroLogs,
|
|
115
|
+
sendChatMessage,
|
|
115
116
|
sendSlackMessage,
|
|
116
117
|
setZeroOrgModelProviderDefault,
|
|
117
118
|
setZeroOrgSecret,
|
|
@@ -131,7 +132,7 @@ import {
|
|
|
131
132
|
upsertZeroOrgModelProvider,
|
|
132
133
|
withErrorHandler,
|
|
133
134
|
zeroAgentCustomSkillNameSchema
|
|
134
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-HVVPJHCH.js";
|
|
135
136
|
|
|
136
137
|
// src/zero.ts
|
|
137
138
|
init_esm_shims();
|
|
@@ -3995,6 +3996,86 @@ var deleteCommand4 = new Command().name("delete").description("Delete a secret")
|
|
|
3995
3996
|
// src/commands/zero/secret/index.ts
|
|
3996
3997
|
var zeroSecretCommand = new Command().name("secret").description("Read or write secrets (API keys, tokens)").addCommand(listCommand8).addCommand(setCommand4).addCommand(deleteCommand4);
|
|
3997
3998
|
|
|
3999
|
+
// src/commands/zero/chat/index.ts
|
|
4000
|
+
init_esm_shims();
|
|
4001
|
+
|
|
4002
|
+
// src/commands/zero/chat/message/index.ts
|
|
4003
|
+
init_esm_shims();
|
|
4004
|
+
|
|
4005
|
+
// src/commands/zero/chat/message/send.ts
|
|
4006
|
+
init_esm_shims();
|
|
4007
|
+
import { readFileSync as readFileSync3 } from "fs";
|
|
4008
|
+
var sendCommand = new Command().name("send").description("Send a message to a web chat thread").option("-t, --thread <id>", "Existing chat thread ID").option("-a, --agent <agentId>", "Agent ID (creates a new thread)").option("--text <message>", "Message text").option("--title <title>", "Thread title (only with --agent)").addHelpText(
|
|
4009
|
+
"after",
|
|
4010
|
+
`
|
|
4011
|
+
Examples:
|
|
4012
|
+
Send to existing thread: zero chat message send -t <thread-id> --text "Hello!"
|
|
4013
|
+
Send to agent (new thread): zero chat message send -a <agent-id> --text "Hello!"
|
|
4014
|
+
|
|
4015
|
+
Notes:
|
|
4016
|
+
- Either --thread or --agent is required; they are mutually exclusive
|
|
4017
|
+
- --text is required (or pipe via stdin)`
|
|
4018
|
+
).action(
|
|
4019
|
+
withErrorHandler(
|
|
4020
|
+
async (options) => {
|
|
4021
|
+
let text = options.text;
|
|
4022
|
+
const { thread, agent, title } = options;
|
|
4023
|
+
if (!thread && !agent) {
|
|
4024
|
+
throw new Error("Either --thread or --agent must be provided", {
|
|
4025
|
+
cause: new Error(
|
|
4026
|
+
'Usage: zero chat message send -t THREAD_ID --text "your message"\n zero chat message send -a AGENT_ID --text "your message"'
|
|
4027
|
+
)
|
|
4028
|
+
});
|
|
4029
|
+
}
|
|
4030
|
+
if (thread && agent) {
|
|
4031
|
+
throw new Error("--thread and --agent are mutually exclusive", {
|
|
4032
|
+
cause: new Error(
|
|
4033
|
+
"Provide either --thread to send to an existing thread or --agent to create a new thread, not both"
|
|
4034
|
+
)
|
|
4035
|
+
});
|
|
4036
|
+
}
|
|
4037
|
+
if (!text && process.stdin.isTTY === false) {
|
|
4038
|
+
text = readFileSync3("/dev/stdin", "utf8").trim();
|
|
4039
|
+
}
|
|
4040
|
+
if (!text) {
|
|
4041
|
+
throw new Error("--text is required", {
|
|
4042
|
+
cause: new Error(
|
|
4043
|
+
'Usage: zero chat message send -t THREAD_ID --text "your message"'
|
|
4044
|
+
)
|
|
4045
|
+
});
|
|
4046
|
+
}
|
|
4047
|
+
const result = await sendChatMessage({
|
|
4048
|
+
thread: thread || void 0,
|
|
4049
|
+
agent: agent || void 0,
|
|
4050
|
+
text,
|
|
4051
|
+
title: title || void 0
|
|
4052
|
+
});
|
|
4053
|
+
console.log(
|
|
4054
|
+
source_default.green(
|
|
4055
|
+
`\u2713 Message sent (id: ${result.messageId}, thread: ${result.threadId})`
|
|
4056
|
+
)
|
|
4057
|
+
);
|
|
4058
|
+
}
|
|
4059
|
+
)
|
|
4060
|
+
);
|
|
4061
|
+
|
|
4062
|
+
// src/commands/zero/chat/message/index.ts
|
|
4063
|
+
var zeroChatMessageCommand = new Command().name("message").description("Manage chat messages").addCommand(sendCommand).addHelpText(
|
|
4064
|
+
"after",
|
|
4065
|
+
`
|
|
4066
|
+
Examples:
|
|
4067
|
+
zero chat message send -t <thread-id> --text "Hello!"`
|
|
4068
|
+
);
|
|
4069
|
+
|
|
4070
|
+
// src/commands/zero/chat/index.ts
|
|
4071
|
+
var zeroChatCommand = new Command().name("chat").description("Send messages to web chat threads").addCommand(zeroChatMessageCommand).addHelpText(
|
|
4072
|
+
"after",
|
|
4073
|
+
`
|
|
4074
|
+
Examples:
|
|
4075
|
+
Send to thread: zero chat message send -t <thread-id> --text "Hello!"
|
|
4076
|
+
Send to agent: zero chat message send -a <agent-id> --text "Hello!"`
|
|
4077
|
+
);
|
|
4078
|
+
|
|
3998
4079
|
// src/commands/zero/slack/index.ts
|
|
3999
4080
|
init_esm_shims();
|
|
4000
4081
|
|
|
@@ -4003,8 +4084,8 @@ init_esm_shims();
|
|
|
4003
4084
|
|
|
4004
4085
|
// src/commands/zero/slack/message/send.ts
|
|
4005
4086
|
init_esm_shims();
|
|
4006
|
-
import { readFileSync as
|
|
4007
|
-
var
|
|
4087
|
+
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>", "Slack user ID for DM").option("-t, --text <message>", "Message text").option("--thread <ts>", "Thread timestamp for replies").option("--blocks <json>", "Block Kit JSON string").addHelpText(
|
|
4008
4089
|
"after",
|
|
4009
4090
|
`
|
|
4010
4091
|
Examples:
|
|
@@ -4036,7 +4117,7 @@ Notes:
|
|
|
4036
4117
|
});
|
|
4037
4118
|
}
|
|
4038
4119
|
if (!text && process.stdin.isTTY === false) {
|
|
4039
|
-
text =
|
|
4120
|
+
text = readFileSync4("/dev/stdin", "utf8").trim();
|
|
4040
4121
|
}
|
|
4041
4122
|
let blocks;
|
|
4042
4123
|
if (blocksStr) {
|
|
@@ -4071,7 +4152,7 @@ Notes:
|
|
|
4071
4152
|
);
|
|
4072
4153
|
|
|
4073
4154
|
// src/commands/zero/slack/message/index.ts
|
|
4074
|
-
var zeroSlackMessageCommand = new Command().name("message").description("Manage Slack messages").addCommand(
|
|
4155
|
+
var zeroSlackMessageCommand = new Command().name("message").description("Manage Slack messages").addCommand(sendCommand2).addHelpText(
|
|
4075
4156
|
"after",
|
|
4076
4157
|
`
|
|
4077
4158
|
Examples:
|
|
@@ -4080,7 +4161,7 @@ Examples:
|
|
|
4080
4161
|
|
|
4081
4162
|
// src/commands/zero/slack/upload-file.ts
|
|
4082
4163
|
init_esm_shims();
|
|
4083
|
-
import { statSync, readFileSync as
|
|
4164
|
+
import { statSync, readFileSync as readFileSync5 } from "fs";
|
|
4084
4165
|
import { basename } from "path";
|
|
4085
4166
|
var uploadFileCommand = new Command().name("upload-file").description("Upload a file to a Slack channel as the bot").requiredOption("-f, --file <path>", "Local file path to upload").requiredOption("-c, --channel <id>", "Slack channel ID").option("--thread <ts>", "Thread timestamp to post as a reply").option("--title <title>", "Display title for the file").option("--comment <text>", "Initial comment to accompany the file").addHelpText(
|
|
4086
4167
|
"after",
|
|
@@ -4111,7 +4192,7 @@ Notes:
|
|
|
4111
4192
|
filename,
|
|
4112
4193
|
length: fileSize
|
|
4113
4194
|
});
|
|
4114
|
-
const fileContent =
|
|
4195
|
+
const fileContent = readFileSync5(options.file);
|
|
4115
4196
|
const uploadResponse = await fetch(uploadUrl, {
|
|
4116
4197
|
method: "POST",
|
|
4117
4198
|
body: fileContent
|
|
@@ -4426,7 +4507,7 @@ init_esm_shims();
|
|
|
4426
4507
|
|
|
4427
4508
|
// src/lib/skill-directory.ts
|
|
4428
4509
|
init_esm_shims();
|
|
4429
|
-
import { readFileSync as
|
|
4510
|
+
import { readFileSync as readFileSync6, readdirSync } from "fs";
|
|
4430
4511
|
import { join as join3 } from "path";
|
|
4431
4512
|
var IGNORED_NAMES = /* @__PURE__ */ new Set(["node_modules", ".git", ".DS_Store"]);
|
|
4432
4513
|
function readSkillDirectory(dirPath) {
|
|
@@ -4441,7 +4522,7 @@ function readSkillDirectory(dirPath) {
|
|
|
4441
4522
|
} else {
|
|
4442
4523
|
files.push({
|
|
4443
4524
|
path: relPath,
|
|
4444
|
-
content:
|
|
4525
|
+
content: readFileSync6(join3(dir, entry.name), "utf-8")
|
|
4445
4526
|
});
|
|
4446
4527
|
}
|
|
4447
4528
|
}
|
|
@@ -6253,7 +6334,7 @@ var voiceChatContextGetCommand = new Command().name("get").description("Read sha
|
|
|
6253
6334
|
|
|
6254
6335
|
// src/commands/zero/voice-chat/context/append.ts
|
|
6255
6336
|
init_esm_shims();
|
|
6256
|
-
import { readFileSync as
|
|
6337
|
+
import { readFileSync as readFileSync8 } from "fs";
|
|
6257
6338
|
var voiceChatContextAppendCommand = new Command().name("append").description("Append an event to voice-chat shared context").argument("<session-id>", "Voice-chat session ID").requiredOption(
|
|
6258
6339
|
"--source <source>",
|
|
6259
6340
|
"Event source (system|user|fast-brain|slow-brain)"
|
|
@@ -6271,7 +6352,7 @@ Examples:
|
|
|
6271
6352
|
async (sessionId, options) => {
|
|
6272
6353
|
let content = options.content;
|
|
6273
6354
|
if (!content && process.stdin.isTTY === false) {
|
|
6274
|
-
content =
|
|
6355
|
+
content = readFileSync8("/dev/stdin", "utf8").trim();
|
|
6275
6356
|
}
|
|
6276
6357
|
const data = await appendVoiceChatContextEvent(sessionId, {
|
|
6277
6358
|
source: options.source,
|
|
@@ -6285,7 +6366,7 @@ Examples:
|
|
|
6285
6366
|
|
|
6286
6367
|
// src/commands/zero/voice-chat/context/prepare.ts
|
|
6287
6368
|
init_esm_shims();
|
|
6288
|
-
import { readFileSync as
|
|
6369
|
+
import { readFileSync as readFileSync9 } from "fs";
|
|
6289
6370
|
var voiceChatContextPrepareCommand = new Command().name("prepare").description("Submit preparation directive content for a voice-chat run").option(
|
|
6290
6371
|
"--content <content>",
|
|
6291
6372
|
"Directive content (reads from stdin if not provided)"
|
|
@@ -6299,7 +6380,7 @@ Examples:
|
|
|
6299
6380
|
withErrorHandler(async (options) => {
|
|
6300
6381
|
let content = options.content;
|
|
6301
6382
|
if (!content && process.stdin.isTTY === false) {
|
|
6302
|
-
content =
|
|
6383
|
+
content = readFileSync9("/dev/stdin", "utf8").trim();
|
|
6303
6384
|
}
|
|
6304
6385
|
if (!content) {
|
|
6305
6386
|
throw new Error(
|
|
@@ -6333,6 +6414,7 @@ var COMMAND_CAPABILITY_MAP = {
|
|
|
6333
6414
|
schedule: "schedule:read",
|
|
6334
6415
|
doctor: null,
|
|
6335
6416
|
logs: "agent-run:read",
|
|
6417
|
+
chat: "chat-message:write",
|
|
6336
6418
|
slack: "slack:write",
|
|
6337
6419
|
whoami: null,
|
|
6338
6420
|
"developer-support": null,
|
|
@@ -6349,6 +6431,7 @@ var DEFAULT_COMMANDS = [
|
|
|
6349
6431
|
zeroRunCommand,
|
|
6350
6432
|
zeroScheduleCommand,
|
|
6351
6433
|
zeroSecretCommand,
|
|
6434
|
+
zeroChatCommand,
|
|
6352
6435
|
zeroSlackCommand,
|
|
6353
6436
|
zeroVariableCommand,
|
|
6354
6437
|
zeroLogsCommand,
|
|
@@ -6376,7 +6459,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
6376
6459
|
var program = new Command();
|
|
6377
6460
|
program.name("zero").description(
|
|
6378
6461
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
6379
|
-
).version("9.
|
|
6462
|
+
).version("9.117.0").addHelpText(
|
|
6380
6463
|
"after",
|
|
6381
6464
|
`
|
|
6382
6465
|
Examples:
|