@vm0/cli 9.86.4 → 9.86.5
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-O22JKC6F.js → chunk-CHFMXDPQ.js} +3 -3
- package/{chunk-O22JKC6F.js.map → chunk-CHFMXDPQ.js.map} +1 -1
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +206 -23
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
showNextSteps,
|
|
61
61
|
volumeConfigSchema,
|
|
62
62
|
withErrorHandler
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-CHFMXDPQ.js";
|
|
64
64
|
|
|
65
65
|
// src/index.ts
|
|
66
66
|
import { Command as Command44 } from "commander";
|
|
@@ -445,7 +445,7 @@ function getConfigPath() {
|
|
|
445
445
|
return join(homedir(), ".vm0", "config.json");
|
|
446
446
|
}
|
|
447
447
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
448
|
-
console.log(chalk3.bold(`VM0 CLI v${"9.86.
|
|
448
|
+
console.log(chalk3.bold(`VM0 CLI v${"9.86.5"}`));
|
|
449
449
|
console.log();
|
|
450
450
|
const config = await loadConfig();
|
|
451
451
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1549,7 +1549,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
1549
1549
|
options.autoUpdate = false;
|
|
1550
1550
|
}
|
|
1551
1551
|
if (options.autoUpdate !== false) {
|
|
1552
|
-
await startSilentUpgrade("9.86.
|
|
1552
|
+
await startSilentUpgrade("9.86.5");
|
|
1553
1553
|
}
|
|
1554
1554
|
try {
|
|
1555
1555
|
let result;
|
|
@@ -1623,7 +1623,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
1623
1623
|
withErrorHandler(
|
|
1624
1624
|
async (identifier, prompt, options) => {
|
|
1625
1625
|
if (options.autoUpdate !== false) {
|
|
1626
|
-
await startSilentUpgrade("9.86.
|
|
1626
|
+
await startSilentUpgrade("9.86.5");
|
|
1627
1627
|
}
|
|
1628
1628
|
const { org, name, version } = parseIdentifier(identifier);
|
|
1629
1629
|
let composeId;
|
|
@@ -3379,7 +3379,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
3379
3379
|
withErrorHandler(
|
|
3380
3380
|
async (prompt, options) => {
|
|
3381
3381
|
if (options.autoUpdate !== false) {
|
|
3382
|
-
const shouldExit = await checkAndUpgrade("9.86.
|
|
3382
|
+
const shouldExit = await checkAndUpgrade("9.86.5", prompt);
|
|
3383
3383
|
if (shouldExit) {
|
|
3384
3384
|
process.exit(0);
|
|
3385
3385
|
}
|
|
@@ -4119,13 +4119,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4119
4119
|
if (latestVersion === null) {
|
|
4120
4120
|
throw new Error("Could not check for updates. Please try again later.");
|
|
4121
4121
|
}
|
|
4122
|
-
if (latestVersion === "9.86.
|
|
4123
|
-
console.log(chalk33.green(`\u2713 Already up to date (${"9.86.
|
|
4122
|
+
if (latestVersion === "9.86.5") {
|
|
4123
|
+
console.log(chalk33.green(`\u2713 Already up to date (${"9.86.5"})`));
|
|
4124
4124
|
return;
|
|
4125
4125
|
}
|
|
4126
4126
|
console.log(
|
|
4127
4127
|
chalk33.yellow(
|
|
4128
|
-
`Current version: ${"9.86.
|
|
4128
|
+
`Current version: ${"9.86.5"} -> Latest version: ${latestVersion}`
|
|
4129
4129
|
)
|
|
4130
4130
|
);
|
|
4131
4131
|
console.log();
|
|
@@ -4152,7 +4152,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4152
4152
|
const success = await performUpgrade(packageManager);
|
|
4153
4153
|
if (success) {
|
|
4154
4154
|
console.log(
|
|
4155
|
-
chalk33.green(`\u2713 Upgraded from ${"9.86.
|
|
4155
|
+
chalk33.green(`\u2713 Upgraded from ${"9.86.5"} to ${latestVersion}`)
|
|
4156
4156
|
);
|
|
4157
4157
|
return;
|
|
4158
4158
|
}
|
|
@@ -4220,7 +4220,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
|
|
|
4220
4220
|
|
|
4221
4221
|
// src/index.ts
|
|
4222
4222
|
var program = new Command44();
|
|
4223
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.86.
|
|
4223
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.86.5");
|
|
4224
4224
|
program.addCommand(authCommand);
|
|
4225
4225
|
program.addCommand(infoCommand);
|
|
4226
4226
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
updateZeroUserPreferences,
|
|
92
92
|
upsertZeroOrgModelProvider,
|
|
93
93
|
withErrorHandler
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-CHFMXDPQ.js";
|
|
95
95
|
|
|
96
96
|
// src/zero.ts
|
|
97
97
|
import { Command as Command61 } from "commander";
|
|
@@ -1074,7 +1074,14 @@ var createCommand = new Command24().name("create").description("Create a new zer
|
|
|
1074
1074
|
).option("--display-name <name>", "Agent display name").option("--description <text>", "Agent description").option(
|
|
1075
1075
|
"--sound <tone>",
|
|
1076
1076
|
"Agent tone: professional, friendly, direct, supportive"
|
|
1077
|
-
).option("--instructions-file <path>", "Path to instructions file").
|
|
1077
|
+
).option("--instructions-file <path>", "Path to instructions file").addHelpText(
|
|
1078
|
+
"after",
|
|
1079
|
+
`
|
|
1080
|
+
Examples:
|
|
1081
|
+
Minimal: zero agent create --connectors github
|
|
1082
|
+
With display name: zero agent create --connectors github,linear --display-name "My Agent"
|
|
1083
|
+
With instructions: zero agent create --connectors github --instructions-file ./instructions.md`
|
|
1084
|
+
).action(
|
|
1078
1085
|
withErrorHandler(
|
|
1079
1086
|
async (options) => {
|
|
1080
1087
|
const connectors = options.connectors.split(",").map((s) => s.trim());
|
|
@@ -1108,7 +1115,19 @@ var editCommand = new Command25().name("edit").description("Edit a zero agent").
|
|
|
1108
1115
|
).option("--display-name <name>", "New display name").option("--description <text>", "New description").option(
|
|
1109
1116
|
"--sound <tone>",
|
|
1110
1117
|
"New tone: professional, friendly, direct, supportive"
|
|
1111
|
-
).option("--instructions-file <path>", "Path to new instructions file").
|
|
1118
|
+
).option("--instructions-file <path>", "Path to new instructions file").addHelpText(
|
|
1119
|
+
"after",
|
|
1120
|
+
`
|
|
1121
|
+
Examples:
|
|
1122
|
+
Update description: zero agent edit <agent-id> --description "new role"
|
|
1123
|
+
Update tone: zero agent edit <agent-id> --sound friendly
|
|
1124
|
+
Update instructions: zero agent edit <agent-id> --instructions-file ./instructions.md
|
|
1125
|
+
Update yourself: zero agent edit $ZERO_AGENT_ID --description "new role"
|
|
1126
|
+
|
|
1127
|
+
Notes:
|
|
1128
|
+
- At least one option is required
|
|
1129
|
+
- Unspecified fields are preserved (not cleared)`
|
|
1130
|
+
).action(
|
|
1112
1131
|
withErrorHandler(
|
|
1113
1132
|
async (agentId, options) => {
|
|
1114
1133
|
const hasAgentUpdate = options.connectors !== void 0 || options.displayName !== void 0 || options.description !== void 0 || options.sound !== void 0;
|
|
@@ -1139,7 +1158,14 @@ var editCommand = new Command25().name("edit").description("Edit a zero agent").
|
|
|
1139
1158
|
// src/commands/zero/agent/view.ts
|
|
1140
1159
|
import { Command as Command26 } from "commander";
|
|
1141
1160
|
import chalk23 from "chalk";
|
|
1142
|
-
var viewCommand = new Command26().name("view").description("View a zero agent").argument("<agent-id>", "Agent ID").option("--instructions", "Also show instructions content").
|
|
1161
|
+
var viewCommand = new Command26().name("view").description("View a zero agent").argument("<agent-id>", "Agent ID").option("--instructions", "Also show instructions content").addHelpText(
|
|
1162
|
+
"after",
|
|
1163
|
+
`
|
|
1164
|
+
Examples:
|
|
1165
|
+
View basic info: zero agent view <agent-id>
|
|
1166
|
+
Include instructions: zero agent view <agent-id> --instructions
|
|
1167
|
+
View yourself: zero agent view $ZERO_AGENT_ID --instructions`
|
|
1168
|
+
).action(
|
|
1143
1169
|
withErrorHandler(
|
|
1144
1170
|
async (agentId, options) => {
|
|
1145
1171
|
const agent = await getZeroAgent(agentId);
|
|
@@ -1168,7 +1194,15 @@ var viewCommand = new Command26().name("view").description("View a zero agent").
|
|
|
1168
1194
|
// src/commands/zero/agent/list.ts
|
|
1169
1195
|
import { Command as Command27 } from "commander";
|
|
1170
1196
|
import chalk24 from "chalk";
|
|
1171
|
-
var listCommand5 = new Command27().name("list").alias("ls").description("List all zero agents").
|
|
1197
|
+
var listCommand5 = new Command27().name("list").alias("ls").description("List all zero agents").addHelpText(
|
|
1198
|
+
"after",
|
|
1199
|
+
`
|
|
1200
|
+
Examples:
|
|
1201
|
+
zero agent list
|
|
1202
|
+
|
|
1203
|
+
Notes:
|
|
1204
|
+
- Use this to discover teammate agent IDs before delegating with "zero run"`
|
|
1205
|
+
).action(
|
|
1172
1206
|
withErrorHandler(async () => {
|
|
1173
1207
|
const agents = await listZeroAgents();
|
|
1174
1208
|
if (agents.length === 0) {
|
|
@@ -1205,7 +1239,16 @@ var listCommand5 = new Command27().name("list").alias("ls").description("List al
|
|
|
1205
1239
|
// src/commands/zero/agent/delete.ts
|
|
1206
1240
|
import { Command as Command28 } from "commander";
|
|
1207
1241
|
import chalk25 from "chalk";
|
|
1208
|
-
var deleteCommand2 = new Command28().name("delete").alias("rm").description("Delete a zero agent").argument("<agent-id>", "Agent ID").option("-y, --yes", "Skip confirmation prompt").
|
|
1242
|
+
var deleteCommand2 = new Command28().name("delete").alias("rm").description("Delete a zero agent").argument("<agent-id>", "Agent ID").option("-y, --yes", "Skip confirmation prompt").addHelpText(
|
|
1243
|
+
"after",
|
|
1244
|
+
`
|
|
1245
|
+
Examples:
|
|
1246
|
+
zero agent delete <agent-id>
|
|
1247
|
+
zero agent delete <agent-id> -y
|
|
1248
|
+
|
|
1249
|
+
Notes:
|
|
1250
|
+
- Use -y to skip confirmation in non-interactive mode`
|
|
1251
|
+
).action(
|
|
1209
1252
|
withErrorHandler(async (agentId, options) => {
|
|
1210
1253
|
await getZeroAgent(agentId);
|
|
1211
1254
|
if (!options.yes) {
|
|
@@ -1230,7 +1273,7 @@ var deleteCommand2 = new Command28().name("delete").alias("rm").description("Del
|
|
|
1230
1273
|
var zeroAgentCommand = new Command29("agent").description("View or manage zero agents").addCommand(createCommand).addCommand(editCommand).addCommand(viewCommand).addCommand(listCommand5).addCommand(deleteCommand2).addHelpText(
|
|
1231
1274
|
"after",
|
|
1232
1275
|
`
|
|
1233
|
-
|
|
1276
|
+
Examples:
|
|
1234
1277
|
Your agent ID is in $ZERO_AGENT_ID (or run: zero whoami)
|
|
1235
1278
|
View your config: zero agent view $ZERO_AGENT_ID --instructions
|
|
1236
1279
|
Update description: zero agent edit $ZERO_AGENT_ID --description "new role"
|
|
@@ -1851,7 +1894,18 @@ import { Command as Command36 } from "commander";
|
|
|
1851
1894
|
import { Command as Command35 } from "commander";
|
|
1852
1895
|
var missingTokenCommand = new Command35().name("missing-token").description(
|
|
1853
1896
|
"Diagnose a missing token and find the connector that provides it"
|
|
1854
|
-
).argument("<token-name>", "The environment variable / token name to look up").
|
|
1897
|
+
).argument("<token-name>", "The environment variable / token name to look up").addHelpText(
|
|
1898
|
+
"after",
|
|
1899
|
+
`
|
|
1900
|
+
Examples:
|
|
1901
|
+
zero doctor missing-token GITHUB_TOKEN
|
|
1902
|
+
zero doctor missing-token LINEAR_API_KEY
|
|
1903
|
+
zero doctor missing-token NOTION_TOKEN
|
|
1904
|
+
|
|
1905
|
+
Notes:
|
|
1906
|
+
- Outputs which connector provides the token and a URL for the user to connect it
|
|
1907
|
+
- Use this to guide the user when a required token is not available in the sandbox`
|
|
1908
|
+
).action(
|
|
1855
1909
|
withErrorHandler(async (tokenName) => {
|
|
1856
1910
|
const connectorType = getConnectorTypeForSecretName(tokenName);
|
|
1857
1911
|
if (!connectorType) {
|
|
@@ -1878,7 +1932,16 @@ var missingTokenCommand = new Command35().name("missing-token").description(
|
|
|
1878
1932
|
);
|
|
1879
1933
|
|
|
1880
1934
|
// src/commands/zero/doctor/index.ts
|
|
1881
|
-
var zeroDoctorCommand = new Command36().name("doctor").description("Diagnose runtime issues (missing tokens, connectors)").addCommand(missingTokenCommand)
|
|
1935
|
+
var zeroDoctorCommand = new Command36().name("doctor").description("Diagnose runtime issues (missing tokens, connectors)").addCommand(missingTokenCommand).addHelpText(
|
|
1936
|
+
"after",
|
|
1937
|
+
`
|
|
1938
|
+
Examples:
|
|
1939
|
+
Missing an API key? zero doctor missing-token GITHUB_TOKEN
|
|
1940
|
+
|
|
1941
|
+
Notes:
|
|
1942
|
+
- Use this when your task fails due to a missing environment variable
|
|
1943
|
+
- The doctor will identify which connector provides the token and give the user a link to connect it`
|
|
1944
|
+
);
|
|
1882
1945
|
|
|
1883
1946
|
// src/commands/zero/preference/index.ts
|
|
1884
1947
|
import { Command as Command37 } from "commander";
|
|
@@ -2048,7 +2111,18 @@ var mainRunCommand = new Command38().name("run").description("Delegate a task to
|
|
|
2048
2111
|
).option(
|
|
2049
2112
|
"--model-provider <type>",
|
|
2050
2113
|
"Override model provider (e.g., anthropic-api-key)"
|
|
2051
|
-
).option("--verbose", "Show full tool inputs and outputs").
|
|
2114
|
+
).option("--verbose", "Show full tool inputs and outputs").addHelpText(
|
|
2115
|
+
"after",
|
|
2116
|
+
`
|
|
2117
|
+
Examples:
|
|
2118
|
+
Delegate a task: zero run <agent-id> "summarize the latest issues"
|
|
2119
|
+
With verbose output: zero run <agent-id> "fix the bug" --verbose
|
|
2120
|
+
|
|
2121
|
+
Notes:
|
|
2122
|
+
- Get agent IDs from "zero agent list"
|
|
2123
|
+
- The command streams events until the delegated run completes
|
|
2124
|
+
- On success, a session ID is printed for follow-up with "zero run continue"`
|
|
2125
|
+
).action(
|
|
2052
2126
|
withErrorHandler(
|
|
2053
2127
|
async (agentId, prompt, options) => {
|
|
2054
2128
|
if (!isUUID(agentId)) {
|
|
@@ -2090,7 +2164,17 @@ var continueCommand = new Command39().name("continue").description("Continue a p
|
|
|
2090
2164
|
).option(
|
|
2091
2165
|
"--model-provider <type>",
|
|
2092
2166
|
"Override model provider (e.g., anthropic-api-key)"
|
|
2093
|
-
).option("--verbose", "Show full tool inputs and outputs").
|
|
2167
|
+
).option("--verbose", "Show full tool inputs and outputs").addHelpText(
|
|
2168
|
+
"after",
|
|
2169
|
+
`
|
|
2170
|
+
Examples:
|
|
2171
|
+
zero run continue <session-id> "now deploy it"
|
|
2172
|
+
zero run continue <session-id> "add tests" --verbose
|
|
2173
|
+
|
|
2174
|
+
Notes:
|
|
2175
|
+
- The session ID is printed after a successful "zero run" delegation
|
|
2176
|
+
- Continues the same agent session with full prior context`
|
|
2177
|
+
).action(
|
|
2094
2178
|
withErrorHandler(
|
|
2095
2179
|
async (sessionId, prompt, options) => {
|
|
2096
2180
|
if (!isUUID(sessionId)) {
|
|
@@ -2127,7 +2211,7 @@ mainRunCommand.addCommand(continueCommand);
|
|
|
2127
2211
|
mainRunCommand.addHelpText(
|
|
2128
2212
|
"after",
|
|
2129
2213
|
`
|
|
2130
|
-
|
|
2214
|
+
Examples:
|
|
2131
2215
|
Discover teammates: zero agent list
|
|
2132
2216
|
Delegate a task: zero run <agent-id> "your task"
|
|
2133
2217
|
Continue delegation: zero run continue <session-id> "follow up"`
|
|
@@ -2569,7 +2653,22 @@ async function handleScheduleEnabling(params) {
|
|
|
2569
2653
|
showEnableHint(agentName);
|
|
2570
2654
|
}
|
|
2571
2655
|
}
|
|
2572
|
-
var setupCommand2 = new Command40().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-id>", "Agent ID").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").option("--notify-email", "Enable email notifications (default: true)").option("--no-notify-email", "Disable email notifications").option("--notify-slack", "Enable Slack notifications (default: true)").option("--no-notify-slack", "Disable Slack notifications").
|
|
2656
|
+
var setupCommand2 = new Command40().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-id>", "Agent ID").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").option("--notify-email", "Enable email notifications (default: true)").option("--no-notify-email", "Disable email notifications").option("--notify-slack", "Enable Slack notifications (default: true)").option("--no-notify-slack", "Disable Slack notifications").addHelpText(
|
|
2657
|
+
"after",
|
|
2658
|
+
`
|
|
2659
|
+
Examples:
|
|
2660
|
+
Daily at 9am: zero schedule setup <agent-id> -f daily -t 09:00 -p "run report"
|
|
2661
|
+
Weekly on Monday: zero schedule setup <agent-id> -f weekly -d mon -t 10:00 -p "weekly sync"
|
|
2662
|
+
Monthly on the 1st: zero schedule setup <agent-id> -f monthly -d 1 -t 08:00 -p "monthly review"
|
|
2663
|
+
One-time: zero schedule setup <agent-id> -f once -d 2026-04-01 -t 14:00 -p "one-off task"
|
|
2664
|
+
Loop every 5 minutes: zero schedule setup <agent-id> -f loop -i 300 -p "poll for updates"
|
|
2665
|
+
Create and enable: zero schedule setup <agent-id> -f daily -t 09:00 -p "run report" --enable
|
|
2666
|
+
|
|
2667
|
+
Notes:
|
|
2668
|
+
- Re-running setup with the same agent updates the existing "default" schedule
|
|
2669
|
+
- Use -n to manage multiple named schedules for the same agent
|
|
2670
|
+
- All flags are required in non-interactive mode; interactive mode prompts for missing values`
|
|
2671
|
+
).action(
|
|
2573
2672
|
withErrorHandler(async (agentIdentifier, options) => {
|
|
2574
2673
|
const compose = await resolveCompose(agentIdentifier);
|
|
2575
2674
|
if (!compose) {
|
|
@@ -2653,7 +2752,12 @@ var setupCommand2 = new Command40().name("setup").description("Create or edit a
|
|
|
2653
2752
|
// src/commands/zero/schedule/list.ts
|
|
2654
2753
|
import { Command as Command41 } from "commander";
|
|
2655
2754
|
import chalk34 from "chalk";
|
|
2656
|
-
var listCommand7 = new Command41().name("list").alias("ls").description("List all zero schedules").
|
|
2755
|
+
var listCommand7 = new Command41().name("list").alias("ls").description("List all zero schedules").addHelpText(
|
|
2756
|
+
"after",
|
|
2757
|
+
`
|
|
2758
|
+
Examples:
|
|
2759
|
+
zero schedule list`
|
|
2760
|
+
).action(
|
|
2657
2761
|
withErrorHandler(async () => {
|
|
2658
2762
|
const result = await listZeroSchedules();
|
|
2659
2763
|
if (result.schedules.length === 0) {
|
|
@@ -2764,6 +2868,12 @@ function printTimeSchedule(schedule) {
|
|
|
2764
2868
|
var statusCommand3 = new Command42().name("status").description("Show detailed status of a zero schedule").argument("<agent-id>", "Agent ID").option(
|
|
2765
2869
|
"-n, --name <schedule-name>",
|
|
2766
2870
|
"Schedule name (required when agent has multiple schedules)"
|
|
2871
|
+
).addHelpText(
|
|
2872
|
+
"after",
|
|
2873
|
+
`
|
|
2874
|
+
Examples:
|
|
2875
|
+
zero schedule status <agent-id>
|
|
2876
|
+
zero schedule status <agent-id> -n my-schedule`
|
|
2767
2877
|
).action(
|
|
2768
2878
|
withErrorHandler(async (agentName, options) => {
|
|
2769
2879
|
const schedule = await resolveZeroScheduleByAgent(
|
|
@@ -2785,7 +2895,16 @@ import chalk36 from "chalk";
|
|
|
2785
2895
|
var deleteCommand3 = new Command43().name("delete").alias("rm").description("Delete a zero schedule").argument("<agent-id>", "Agent ID").option(
|
|
2786
2896
|
"-n, --name <schedule-name>",
|
|
2787
2897
|
"Schedule name (required when agent has multiple schedules)"
|
|
2788
|
-
).option("-y, --yes", "Skip confirmation prompt").
|
|
2898
|
+
).option("-y, --yes", "Skip confirmation prompt").addHelpText(
|
|
2899
|
+
"after",
|
|
2900
|
+
`
|
|
2901
|
+
Examples:
|
|
2902
|
+
zero schedule delete <agent-id>
|
|
2903
|
+
zero schedule delete <agent-id> -n my-schedule -y
|
|
2904
|
+
|
|
2905
|
+
Notes:
|
|
2906
|
+
- Use -y to skip confirmation in non-interactive mode`
|
|
2907
|
+
).action(
|
|
2789
2908
|
withErrorHandler(
|
|
2790
2909
|
async (agentName, options) => {
|
|
2791
2910
|
const resolved = await resolveZeroScheduleByAgent(
|
|
@@ -2820,6 +2939,12 @@ import chalk37 from "chalk";
|
|
|
2820
2939
|
var enableCommand = new Command44().name("enable").description("Enable a zero schedule").argument("<agent-id>", "Agent ID").option(
|
|
2821
2940
|
"-n, --name <schedule-name>",
|
|
2822
2941
|
"Schedule name (required when agent has multiple schedules)"
|
|
2942
|
+
).addHelpText(
|
|
2943
|
+
"after",
|
|
2944
|
+
`
|
|
2945
|
+
Examples:
|
|
2946
|
+
zero schedule enable <agent-id>
|
|
2947
|
+
zero schedule enable <agent-id> -n my-schedule`
|
|
2823
2948
|
).action(
|
|
2824
2949
|
withErrorHandler(async (agentName, options) => {
|
|
2825
2950
|
const resolved = await resolveZeroScheduleByAgent(
|
|
@@ -2840,6 +2965,12 @@ import chalk38 from "chalk";
|
|
|
2840
2965
|
var disableCommand = new Command45().name("disable").description("Disable a zero schedule").argument("<agent-id>", "Agent ID").option(
|
|
2841
2966
|
"-n, --name <schedule-name>",
|
|
2842
2967
|
"Schedule name (required when agent has multiple schedules)"
|
|
2968
|
+
).addHelpText(
|
|
2969
|
+
"after",
|
|
2970
|
+
`
|
|
2971
|
+
Examples:
|
|
2972
|
+
zero schedule disable <agent-id>
|
|
2973
|
+
zero schedule disable <agent-id> -n my-schedule`
|
|
2843
2974
|
).action(
|
|
2844
2975
|
withErrorHandler(async (agentName, options) => {
|
|
2845
2976
|
const resolved = await resolveZeroScheduleByAgent(
|
|
@@ -2855,7 +2986,20 @@ var disableCommand = new Command45().name("disable").description("Disable a zero
|
|
|
2855
2986
|
);
|
|
2856
2987
|
|
|
2857
2988
|
// src/commands/zero/schedule/index.ts
|
|
2858
|
-
var zeroScheduleCommand = new Command46().name("schedule").description("Create or manage recurring scheduled tasks").addCommand(setupCommand2).addCommand(listCommand7).addCommand(statusCommand3).addCommand(deleteCommand3).addCommand(enableCommand).addCommand(disableCommand)
|
|
2989
|
+
var zeroScheduleCommand = new Command46().name("schedule").description("Create or manage recurring scheduled tasks").addCommand(setupCommand2).addCommand(listCommand7).addCommand(statusCommand3).addCommand(deleteCommand3).addCommand(enableCommand).addCommand(disableCommand).addHelpText(
|
|
2990
|
+
"after",
|
|
2991
|
+
`
|
|
2992
|
+
Examples:
|
|
2993
|
+
Create a daily schedule: zero schedule setup <agent-id> -f daily -t 09:00 -p "run report"
|
|
2994
|
+
Create a loop schedule: zero schedule setup <agent-id> -f loop -i 300 -p "poll for updates"
|
|
2995
|
+
Check all schedules: zero schedule list
|
|
2996
|
+
Pause a schedule: zero schedule disable <agent-id>
|
|
2997
|
+
Resume a schedule: zero schedule enable <agent-id>
|
|
2998
|
+
|
|
2999
|
+
Notes:
|
|
3000
|
+
- setup is idempotent \u2014 re-running it with the same agent updates the existing schedule
|
|
3001
|
+
- Schedules are created disabled by default; use --enable or enable separately`
|
|
3002
|
+
);
|
|
2859
3003
|
|
|
2860
3004
|
// src/commands/zero/secret/index.ts
|
|
2861
3005
|
import { Command as Command50 } from "commander";
|
|
@@ -2999,7 +3143,17 @@ import { Command as Command52 } from "commander";
|
|
|
2999
3143
|
import { readFileSync as readFileSync3 } from "fs";
|
|
3000
3144
|
import { Command as Command51 } from "commander";
|
|
3001
3145
|
import chalk42 from "chalk";
|
|
3002
|
-
var sendCommand = new Command51().name("send").description("Send a message to a Slack channel").requiredOption("-c, --channel <id>", "Channel ID").option("-t, --text <message>", "Message text").option("--thread <ts>", "Thread timestamp for replies").option("--blocks <json>", "Block Kit JSON string").
|
|
3146
|
+
var sendCommand = new Command51().name("send").description("Send a message to a Slack channel").requiredOption("-c, --channel <id>", "Channel ID").option("-t, --text <message>", "Message text").option("--thread <ts>", "Thread timestamp for replies").option("--blocks <json>", "Block Kit JSON string").addHelpText(
|
|
3147
|
+
"after",
|
|
3148
|
+
`
|
|
3149
|
+
Examples:
|
|
3150
|
+
Simple message: zero slack message send -c C01234 -t "Hello!"
|
|
3151
|
+
Reply in thread: zero slack message send -c C01234 --thread 1234567890.123456 -t "reply"
|
|
3152
|
+
Rich blocks: zero slack message send -c C01234 --blocks '[{"type":"section","text":{"type":"mrkdwn","text":"*Bold*"}}]'
|
|
3153
|
+
|
|
3154
|
+
Notes:
|
|
3155
|
+
- Either --text or --blocks is required; both can be used together`
|
|
3156
|
+
).action(
|
|
3003
3157
|
withErrorHandler(
|
|
3004
3158
|
async (options) => {
|
|
3005
3159
|
let text = options.text;
|
|
@@ -3039,10 +3193,21 @@ var sendCommand = new Command51().name("send").description("Send a message to a
|
|
|
3039
3193
|
);
|
|
3040
3194
|
|
|
3041
3195
|
// src/commands/zero/slack/message/index.ts
|
|
3042
|
-
var zeroSlackMessageCommand = new Command52().name("message").description("Manage Slack messages").addCommand(sendCommand)
|
|
3196
|
+
var zeroSlackMessageCommand = new Command52().name("message").description("Manage Slack messages").addCommand(sendCommand).addHelpText(
|
|
3197
|
+
"after",
|
|
3198
|
+
`
|
|
3199
|
+
Examples:
|
|
3200
|
+
zero slack message send -c <channel-id> -t "Hello!"`
|
|
3201
|
+
);
|
|
3043
3202
|
|
|
3044
3203
|
// src/commands/zero/slack/index.ts
|
|
3045
|
-
var zeroSlackCommand = new Command53().name("slack").description("Send messages to Slack channels as the bot").addCommand(zeroSlackMessageCommand)
|
|
3204
|
+
var zeroSlackCommand = new Command53().name("slack").description("Send messages to Slack channels as the bot").addCommand(zeroSlackMessageCommand).addHelpText(
|
|
3205
|
+
"after",
|
|
3206
|
+
`
|
|
3207
|
+
Examples:
|
|
3208
|
+
Send a message: zero slack message send -c <channel-id> -t "Hello!"
|
|
3209
|
+
Reply in a thread: zero slack message send -c <channel-id> --thread <ts> -t "reply"`
|
|
3210
|
+
);
|
|
3046
3211
|
|
|
3047
3212
|
// src/commands/zero/variable/index.ts
|
|
3048
3213
|
import { Command as Command57 } from "commander";
|
|
@@ -3175,7 +3340,16 @@ async function showLocalInfo() {
|
|
|
3175
3340
|
console.log(` Active: ${activeOrg}`);
|
|
3176
3341
|
}
|
|
3177
3342
|
}
|
|
3178
|
-
var zeroWhoamiCommand = new Command58().name("whoami").description("Show agent identity, run ID, and capabilities").
|
|
3343
|
+
var zeroWhoamiCommand = new Command58().name("whoami").description("Show agent identity, run ID, and capabilities").addHelpText(
|
|
3344
|
+
"after",
|
|
3345
|
+
`
|
|
3346
|
+
Examples:
|
|
3347
|
+
zero whoami
|
|
3348
|
+
|
|
3349
|
+
Notes:
|
|
3350
|
+
- Inside sandbox: shows agent ID, run ID, org ID, and granted capabilities
|
|
3351
|
+
- Your agent ID is also available as $ZERO_AGENT_ID`
|
|
3352
|
+
).action(
|
|
3179
3353
|
withErrorHandler(async () => {
|
|
3180
3354
|
if (isInsideSandbox()) {
|
|
3181
3355
|
await showSandboxInfo();
|
|
@@ -3282,7 +3456,16 @@ Notes:
|
|
|
3282
3456
|
);
|
|
3283
3457
|
|
|
3284
3458
|
// src/commands/zero/ask-user/index.ts
|
|
3285
|
-
var zeroAskUserCommand = new Command60().name("ask-user").description("Ask the user a question and wait for the answer").addCommand(questionCommand)
|
|
3459
|
+
var zeroAskUserCommand = new Command60().name("ask-user").description("Ask the user a question and wait for the answer").addCommand(questionCommand).addHelpText(
|
|
3460
|
+
"after",
|
|
3461
|
+
`
|
|
3462
|
+
Examples:
|
|
3463
|
+
zero ask-user question "Deploy to production?" --option "Yes" --option "No"
|
|
3464
|
+
|
|
3465
|
+
Notes:
|
|
3466
|
+
- The command blocks until the user responds or the timeout expires (default 300s)
|
|
3467
|
+
- The user's answer is printed to stdout for your consumption`
|
|
3468
|
+
);
|
|
3286
3469
|
|
|
3287
3470
|
// src/zero.ts
|
|
3288
3471
|
var COMMAND_CAPABILITY_MAP = {
|
|
@@ -3325,10 +3508,10 @@ function registerZeroCommands(prog, commands) {
|
|
|
3325
3508
|
var program = new Command61();
|
|
3326
3509
|
program.name("zero").description(
|
|
3327
3510
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
3328
|
-
).version("9.86.
|
|
3511
|
+
).version("9.86.5").addHelpText(
|
|
3329
3512
|
"after",
|
|
3330
3513
|
`
|
|
3331
|
-
|
|
3514
|
+
Examples:
|
|
3332
3515
|
Missing a token? zero doctor missing-token <TOKEN_NAME>
|
|
3333
3516
|
Delegate to teammate? zero run <agent-id> "your task"
|
|
3334
3517
|
Send a Slack message? zero slack message send -c <channel> -t "text"
|