@vm0/cli 9.38.3 → 9.38.4
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/index.js +41 -40
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -45,7 +45,7 @@ if (DSN) {
|
|
|
45
45
|
Sentry.init({
|
|
46
46
|
dsn: DSN,
|
|
47
47
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
48
|
-
release: "9.38.
|
|
48
|
+
release: "9.38.4",
|
|
49
49
|
sendDefaultPii: false,
|
|
50
50
|
tracesSampleRate: 0,
|
|
51
51
|
shutdownTimeout: 500,
|
|
@@ -64,7 +64,7 @@ if (DSN) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Sentry.setContext("cli", {
|
|
67
|
-
version: "9.38.
|
|
67
|
+
version: "9.38.4",
|
|
68
68
|
command: process.argv.slice(2).join(" ")
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("runtime", {
|
|
@@ -607,7 +607,7 @@ function getConfigPath() {
|
|
|
607
607
|
return join2(homedir2(), ".vm0", "config.json");
|
|
608
608
|
}
|
|
609
609
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
610
|
-
console.log(chalk7.bold(`VM0 CLI v${"9.38.
|
|
610
|
+
console.log(chalk7.bold(`VM0 CLI v${"9.38.4"}`));
|
|
611
611
|
console.log();
|
|
612
612
|
const config = await loadConfig();
|
|
613
613
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -854,8 +854,9 @@ var composeVersionQuerySchema = z4.string().min(1, "Missing version query parame
|
|
|
854
854
|
/^[a-f0-9]{8,64}$|^latest$/i,
|
|
855
855
|
"Version must be 8-64 hex characters or 'latest'"
|
|
856
856
|
);
|
|
857
|
+
var AGENT_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/;
|
|
857
858
|
var agentNameSchema = z4.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
|
|
858
|
-
|
|
859
|
+
AGENT_NAME_REGEX,
|
|
859
860
|
"Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
|
|
860
861
|
);
|
|
861
862
|
var volumeConfigSchema = z4.object({
|
|
@@ -992,7 +993,9 @@ var composesMainContract = c2.router({
|
|
|
992
993
|
path: "/api/agent/composes",
|
|
993
994
|
headers: authHeadersSchema,
|
|
994
995
|
body: z4.object({
|
|
995
|
-
content: agentComposeContentSchema
|
|
996
|
+
content: agentComposeContentSchema,
|
|
997
|
+
/** When renaming an agent, pass the previous name so the server can migrate storage volumes. */
|
|
998
|
+
previousName: agentNameSchema.optional()
|
|
996
999
|
}),
|
|
997
1000
|
responses: {
|
|
998
1001
|
200: createComposeResponseSchema,
|
|
@@ -4629,16 +4632,41 @@ var FEATURE_SWITCHES = {
|
|
|
4629
4632
|
maintainer: "ethan@vm0.ai",
|
|
4630
4633
|
enabled: false
|
|
4631
4634
|
},
|
|
4632
|
-
["agentDetailPage" /* AgentDetailPage */]: {
|
|
4633
|
-
maintainer: "yuma@vm0.ai",
|
|
4634
|
-
enabled: false
|
|
4635
|
-
},
|
|
4636
4635
|
["connectorNango" /* ConnectorNango */]: {
|
|
4637
4636
|
maintainer: "ethan@vm0.ai",
|
|
4638
4637
|
enabled: false
|
|
4639
4638
|
}
|
|
4640
4639
|
};
|
|
4641
4640
|
|
|
4641
|
+
// ../../packages/core/src/skill-frontmatter.ts
|
|
4642
|
+
import { parse as parseYaml } from "yaml";
|
|
4643
|
+
function parseSkillFrontmatter(content) {
|
|
4644
|
+
const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
4645
|
+
if (!frontmatterMatch) {
|
|
4646
|
+
return {};
|
|
4647
|
+
}
|
|
4648
|
+
const yamlContent = frontmatterMatch[1];
|
|
4649
|
+
if (!yamlContent) {
|
|
4650
|
+
return {};
|
|
4651
|
+
}
|
|
4652
|
+
let parsed;
|
|
4653
|
+
try {
|
|
4654
|
+
parsed = parseYaml(yamlContent);
|
|
4655
|
+
} catch {
|
|
4656
|
+
return {};
|
|
4657
|
+
}
|
|
4658
|
+
if (!parsed || typeof parsed !== "object") {
|
|
4659
|
+
return {};
|
|
4660
|
+
}
|
|
4661
|
+
const data = parsed;
|
|
4662
|
+
return {
|
|
4663
|
+
name: typeof data.name === "string" ? data.name : void 0,
|
|
4664
|
+
description: typeof data.description === "string" ? data.description : void 0,
|
|
4665
|
+
vm0_secrets: Array.isArray(data.vm0_secrets) ? data.vm0_secrets.filter((s) => typeof s === "string") : void 0,
|
|
4666
|
+
vm0_vars: Array.isArray(data.vm0_vars) ? data.vm0_vars.filter((s) => typeof s === "string") : void 0
|
|
4667
|
+
};
|
|
4668
|
+
}
|
|
4669
|
+
|
|
4642
4670
|
// src/lib/api/core/http.ts
|
|
4643
4671
|
async function getRawHeaders() {
|
|
4644
4672
|
const token = await getToken();
|
|
@@ -5406,7 +5434,6 @@ function validateAgentCompose(config) {
|
|
|
5406
5434
|
// src/lib/domain/github-skills.ts
|
|
5407
5435
|
import * as fs2 from "fs/promises";
|
|
5408
5436
|
import * as path2 from "path";
|
|
5409
|
-
import { parse as parseYaml } from "yaml";
|
|
5410
5437
|
|
|
5411
5438
|
// src/lib/external/git-client.ts
|
|
5412
5439
|
import * as fs from "fs/promises";
|
|
@@ -5536,32 +5563,6 @@ async function validateSkillDirectory(skillDir) {
|
|
|
5536
5563
|
);
|
|
5537
5564
|
}
|
|
5538
5565
|
}
|
|
5539
|
-
function parseSkillFrontmatter(content) {
|
|
5540
|
-
const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
5541
|
-
if (!frontmatterMatch) {
|
|
5542
|
-
return {};
|
|
5543
|
-
}
|
|
5544
|
-
const yamlContent = frontmatterMatch[1];
|
|
5545
|
-
if (!yamlContent) {
|
|
5546
|
-
return {};
|
|
5547
|
-
}
|
|
5548
|
-
let parsed;
|
|
5549
|
-
try {
|
|
5550
|
-
parsed = parseYaml(yamlContent);
|
|
5551
|
-
} catch {
|
|
5552
|
-
return {};
|
|
5553
|
-
}
|
|
5554
|
-
if (!parsed || typeof parsed !== "object") {
|
|
5555
|
-
return {};
|
|
5556
|
-
}
|
|
5557
|
-
const data = parsed;
|
|
5558
|
-
return {
|
|
5559
|
-
name: typeof data.name === "string" ? data.name : void 0,
|
|
5560
|
-
description: typeof data.description === "string" ? data.description : void 0,
|
|
5561
|
-
vm0_secrets: Array.isArray(data.vm0_secrets) ? data.vm0_secrets.filter((s) => typeof s === "string") : void 0,
|
|
5562
|
-
vm0_vars: Array.isArray(data.vm0_vars) ? data.vm0_vars.filter((s) => typeof s === "string") : void 0
|
|
5563
|
-
};
|
|
5564
|
-
}
|
|
5565
5566
|
async function readSkillFrontmatter(skillDir) {
|
|
5566
5567
|
const skillMdPath = path2.join(skillDir, "SKILL.md");
|
|
5567
5568
|
const content = await fs2.readFile(skillMdPath, "utf8");
|
|
@@ -6481,7 +6482,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
6481
6482
|
options.autoUpdate = false;
|
|
6482
6483
|
}
|
|
6483
6484
|
if (options.autoUpdate !== false) {
|
|
6484
|
-
await startSilentUpgrade("9.38.
|
|
6485
|
+
await startSilentUpgrade("9.38.4");
|
|
6485
6486
|
}
|
|
6486
6487
|
try {
|
|
6487
6488
|
let result;
|
|
@@ -8695,7 +8696,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
8695
8696
|
async (identifier, prompt, options) => {
|
|
8696
8697
|
try {
|
|
8697
8698
|
if (options.autoUpdate !== false) {
|
|
8698
|
-
await startSilentUpgrade("9.38.
|
|
8699
|
+
await startSilentUpgrade("9.38.4");
|
|
8699
8700
|
}
|
|
8700
8701
|
const { scope, name, version } = parseIdentifier(identifier);
|
|
8701
8702
|
if (scope && !options.experimentalSharedAgent) {
|
|
@@ -10271,7 +10272,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
|
|
|
10271
10272
|
).option("-y, --yes", "Skip confirmation prompts").option("-v, --verbose", "Show full tool inputs and outputs").addOption(new Option5("--debug-no-mock-claude").hideHelp()).addOption(new Option5("--no-auto-update").hideHelp()).action(
|
|
10272
10273
|
async (prompt, options) => {
|
|
10273
10274
|
if (options.autoUpdate !== false) {
|
|
10274
|
-
const shouldExit = await checkAndUpgrade("9.38.
|
|
10275
|
+
const shouldExit = await checkAndUpgrade("9.38.4", prompt);
|
|
10275
10276
|
if (shouldExit) {
|
|
10276
10277
|
process.exit(0);
|
|
10277
10278
|
}
|
|
@@ -15199,7 +15200,7 @@ var preferenceCommand = new Command77().name("preference").description("View or
|
|
|
15199
15200
|
|
|
15200
15201
|
// src/index.ts
|
|
15201
15202
|
var program = new Command78();
|
|
15202
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.38.
|
|
15203
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.38.4");
|
|
15203
15204
|
program.addCommand(authCommand);
|
|
15204
15205
|
program.addCommand(infoCommand);
|
|
15205
15206
|
program.addCommand(composeCommand);
|