@vm0/cli 9.102.9 → 9.103.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-MHEPYHLR.js → chunk-LIBXYI24.js} +39 -94
- package/{chunk-MHEPYHLR.js.map → chunk-LIBXYI24.js.map} +1 -1
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +29 -6
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
showNextSteps,
|
|
62
62
|
volumeConfigSchema,
|
|
63
63
|
withErrorHandler
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-LIBXYI24.js";
|
|
65
65
|
|
|
66
66
|
// src/index.ts
|
|
67
67
|
import { Command as Command44 } from "commander";
|
|
@@ -454,7 +454,7 @@ function getConfigPath() {
|
|
|
454
454
|
return join(homedir(), ".vm0", "config.json");
|
|
455
455
|
}
|
|
456
456
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
457
|
-
console.log(chalk3.bold(`VM0 CLI v${"9.
|
|
457
|
+
console.log(chalk3.bold(`VM0 CLI v${"9.103.0"}`));
|
|
458
458
|
console.log();
|
|
459
459
|
const config = await loadConfig();
|
|
460
460
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1581,7 +1581,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
1581
1581
|
options.autoUpdate = false;
|
|
1582
1582
|
}
|
|
1583
1583
|
if (options.autoUpdate !== false) {
|
|
1584
|
-
await startSilentUpgrade("9.
|
|
1584
|
+
await startSilentUpgrade("9.103.0");
|
|
1585
1585
|
}
|
|
1586
1586
|
try {
|
|
1587
1587
|
let result;
|
|
@@ -1655,7 +1655,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
1655
1655
|
withErrorHandler(
|
|
1656
1656
|
async (identifier, prompt, options) => {
|
|
1657
1657
|
if (options.autoUpdate !== false) {
|
|
1658
|
-
await startSilentUpgrade("9.
|
|
1658
|
+
await startSilentUpgrade("9.103.0");
|
|
1659
1659
|
}
|
|
1660
1660
|
const { name, version } = parseIdentifier(identifier);
|
|
1661
1661
|
let composeId;
|
|
@@ -3413,7 +3413,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
3413
3413
|
withErrorHandler(
|
|
3414
3414
|
async (prompt, options) => {
|
|
3415
3415
|
if (options.autoUpdate !== false) {
|
|
3416
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
3416
|
+
const shouldExit = await checkAndUpgrade("9.103.0", prompt);
|
|
3417
3417
|
if (shouldExit) {
|
|
3418
3418
|
process.exit(0);
|
|
3419
3419
|
}
|
|
@@ -4156,13 +4156,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4156
4156
|
if (latestVersion === null) {
|
|
4157
4157
|
throw new Error("Could not check for updates. Please try again later.");
|
|
4158
4158
|
}
|
|
4159
|
-
if (latestVersion === "9.
|
|
4160
|
-
console.log(chalk33.green(`\u2713 Already up to date (${"9.
|
|
4159
|
+
if (latestVersion === "9.103.0") {
|
|
4160
|
+
console.log(chalk33.green(`\u2713 Already up to date (${"9.103.0"})`));
|
|
4161
4161
|
return;
|
|
4162
4162
|
}
|
|
4163
4163
|
console.log(
|
|
4164
4164
|
chalk33.yellow(
|
|
4165
|
-
`Current version: ${"9.
|
|
4165
|
+
`Current version: ${"9.103.0"} -> Latest version: ${latestVersion}`
|
|
4166
4166
|
)
|
|
4167
4167
|
);
|
|
4168
4168
|
console.log();
|
|
@@ -4189,7 +4189,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4189
4189
|
const success = await performUpgrade(packageManager);
|
|
4190
4190
|
if (success) {
|
|
4191
4191
|
console.log(
|
|
4192
|
-
chalk33.green(`\u2713 Upgraded from ${"9.
|
|
4192
|
+
chalk33.green(`\u2713 Upgraded from ${"9.103.0"} to ${latestVersion}`)
|
|
4193
4193
|
);
|
|
4194
4194
|
return;
|
|
4195
4195
|
}
|
|
@@ -4257,7 +4257,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
|
|
|
4257
4257
|
|
|
4258
4258
|
// src/index.ts
|
|
4259
4259
|
var program = new Command44();
|
|
4260
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
4260
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.103.0");
|
|
4261
4261
|
program.addCommand(authCommand);
|
|
4262
4262
|
program.addCommand(infoCommand);
|
|
4263
4263
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -113,8 +113,9 @@ import {
|
|
|
113
113
|
updateZeroOrgModelProviderModel,
|
|
114
114
|
updateZeroUserPreferences,
|
|
115
115
|
upsertZeroOrgModelProvider,
|
|
116
|
-
withErrorHandler
|
|
117
|
-
|
|
116
|
+
withErrorHandler,
|
|
117
|
+
zeroAgentCustomSkillNameSchema
|
|
118
|
+
} from "./chunk-LIBXYI24.js";
|
|
118
119
|
|
|
119
120
|
// src/zero.ts
|
|
120
121
|
import { Command as Command77 } from "commander";
|
|
@@ -1161,6 +1162,16 @@ Examples:
|
|
|
1161
1162
|
const customSkills = options.skills ? options.skills.split(",").map((s) => {
|
|
1162
1163
|
return s.trim();
|
|
1163
1164
|
}) : void 0;
|
|
1165
|
+
if (customSkills) {
|
|
1166
|
+
for (const name of customSkills) {
|
|
1167
|
+
const result = zeroAgentCustomSkillNameSchema.safeParse(name);
|
|
1168
|
+
if (!result.success) {
|
|
1169
|
+
throw new Error(
|
|
1170
|
+
`Invalid skill name "${name}": must be 2-64 characters, lowercase alphanumeric and hyphens only (e.g. my-skill)`
|
|
1171
|
+
);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1164
1175
|
const agent = await createZeroAgent({
|
|
1165
1176
|
displayName: options.displayName,
|
|
1166
1177
|
description: options.description,
|
|
@@ -1187,16 +1198,29 @@ Examples:
|
|
|
1187
1198
|
import { Command as Command25 } from "commander";
|
|
1188
1199
|
import { readFileSync as readFileSync2 } from "fs";
|
|
1189
1200
|
import chalk22 from "chalk";
|
|
1201
|
+
function validateSkillName(name) {
|
|
1202
|
+
const result = zeroAgentCustomSkillNameSchema.safeParse(name);
|
|
1203
|
+
if (!result.success) {
|
|
1204
|
+
throw new Error(
|
|
1205
|
+
`Invalid skill name "${name}": must be 2-64 characters, lowercase alphanumeric and hyphens only (e.g. my-skill)`
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1190
1209
|
function resolveCustomSkills(options, existing) {
|
|
1191
1210
|
if (options.skills && (options.addSkill || options.removeSkill)) {
|
|
1192
1211
|
throw new Error("Cannot use --skills with --add-skill or --remove-skill");
|
|
1193
1212
|
}
|
|
1194
1213
|
if (options.skills) {
|
|
1195
|
-
|
|
1214
|
+
const names = options.skills.split(",").map((s) => {
|
|
1196
1215
|
return s.trim();
|
|
1197
1216
|
});
|
|
1217
|
+
for (const name of names) {
|
|
1218
|
+
validateSkillName(name);
|
|
1219
|
+
}
|
|
1220
|
+
return names;
|
|
1198
1221
|
}
|
|
1199
1222
|
if (options.addSkill) {
|
|
1223
|
+
validateSkillName(options.addSkill);
|
|
1200
1224
|
if (existing.includes(options.addSkill)) {
|
|
1201
1225
|
throw new Error(
|
|
1202
1226
|
`Skill "${options.addSkill}" is already attached to this agent`
|
|
@@ -2222,8 +2246,7 @@ Notes:
|
|
|
2222
2246
|
);
|
|
2223
2247
|
}
|
|
2224
2248
|
if (!hasPermission) {
|
|
2225
|
-
const
|
|
2226
|
-
const url = `${platformUrl.origin}${path}?tab=authorization`;
|
|
2249
|
+
const url = agentId ? `${platformUrl.origin}/connectors/${connectorType}/authorize?agentId=${agentId}` : `${platformUrl.origin}/connectors`;
|
|
2227
2250
|
issues.push(
|
|
2228
2251
|
`The ${label} connector is not authorized for this agent. Ask the user to enable it at: [Authorize ${label}](${url})`
|
|
2229
2252
|
);
|
|
@@ -5729,7 +5752,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
5729
5752
|
var program = new Command77();
|
|
5730
5753
|
program.name("zero").description(
|
|
5731
5754
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
5732
|
-
).version("9.
|
|
5755
|
+
).version("9.103.0").addHelpText(
|
|
5733
5756
|
"after",
|
|
5734
5757
|
`
|
|
5735
5758
|
Examples:
|