@vm0/cli 9.38.2 → 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 +49 -47
- 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,
|
|
@@ -4590,6 +4593,14 @@ function getFrameworkDisplayName(framework) {
|
|
|
4590
4593
|
assertSupportedFramework(framework);
|
|
4591
4594
|
return FRAMEWORK_DISPLAY_NAMES[framework];
|
|
4592
4595
|
}
|
|
4596
|
+
var FRAMEWORK_INSTRUCTIONS_FILENAMES = {
|
|
4597
|
+
"claude-code": "CLAUDE.md",
|
|
4598
|
+
codex: "AGENTS.md"
|
|
4599
|
+
};
|
|
4600
|
+
function getInstructionsFilename(framework) {
|
|
4601
|
+
const validated = getValidatedFramework(framework);
|
|
4602
|
+
return FRAMEWORK_INSTRUCTIONS_FILENAMES[validated];
|
|
4603
|
+
}
|
|
4593
4604
|
|
|
4594
4605
|
// ../../packages/core/src/feature-switch.ts
|
|
4595
4606
|
var FEATURE_SWITCHES = {
|
|
@@ -4621,16 +4632,41 @@ var FEATURE_SWITCHES = {
|
|
|
4621
4632
|
maintainer: "ethan@vm0.ai",
|
|
4622
4633
|
enabled: false
|
|
4623
4634
|
},
|
|
4624
|
-
["agentDetailPage" /* AgentDetailPage */]: {
|
|
4625
|
-
maintainer: "yuma@vm0.ai",
|
|
4626
|
-
enabled: false
|
|
4627
|
-
},
|
|
4628
4635
|
["connectorNango" /* ConnectorNango */]: {
|
|
4629
4636
|
maintainer: "ethan@vm0.ai",
|
|
4630
4637
|
enabled: false
|
|
4631
4638
|
}
|
|
4632
4639
|
};
|
|
4633
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
|
+
|
|
4634
4670
|
// src/lib/api/core/http.ts
|
|
4635
4671
|
async function getRawHeaders() {
|
|
4636
4672
|
const token = await getToken();
|
|
@@ -5398,7 +5434,6 @@ function validateAgentCompose(config) {
|
|
|
5398
5434
|
// src/lib/domain/github-skills.ts
|
|
5399
5435
|
import * as fs2 from "fs/promises";
|
|
5400
5436
|
import * as path2 from "path";
|
|
5401
|
-
import { parse as parseYaml } from "yaml";
|
|
5402
5437
|
|
|
5403
5438
|
// src/lib/external/git-client.ts
|
|
5404
5439
|
import * as fs from "fs/promises";
|
|
@@ -5528,32 +5563,6 @@ async function validateSkillDirectory(skillDir) {
|
|
|
5528
5563
|
);
|
|
5529
5564
|
}
|
|
5530
5565
|
}
|
|
5531
|
-
function parseSkillFrontmatter(content) {
|
|
5532
|
-
const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
5533
|
-
if (!frontmatterMatch) {
|
|
5534
|
-
return {};
|
|
5535
|
-
}
|
|
5536
|
-
const yamlContent = frontmatterMatch[1];
|
|
5537
|
-
if (!yamlContent) {
|
|
5538
|
-
return {};
|
|
5539
|
-
}
|
|
5540
|
-
let parsed;
|
|
5541
|
-
try {
|
|
5542
|
-
parsed = parseYaml(yamlContent);
|
|
5543
|
-
} catch {
|
|
5544
|
-
return {};
|
|
5545
|
-
}
|
|
5546
|
-
if (!parsed || typeof parsed !== "object") {
|
|
5547
|
-
return {};
|
|
5548
|
-
}
|
|
5549
|
-
const data = parsed;
|
|
5550
|
-
return {
|
|
5551
|
-
name: typeof data.name === "string" ? data.name : void 0,
|
|
5552
|
-
description: typeof data.description === "string" ? data.description : void 0,
|
|
5553
|
-
vm0_secrets: Array.isArray(data.vm0_secrets) ? data.vm0_secrets.filter((s) => typeof s === "string") : void 0,
|
|
5554
|
-
vm0_vars: Array.isArray(data.vm0_vars) ? data.vm0_vars.filter((s) => typeof s === "string") : void 0
|
|
5555
|
-
};
|
|
5556
|
-
}
|
|
5557
5566
|
async function readSkillFrontmatter(skillDir) {
|
|
5558
5567
|
const skillMdPath = path2.join(skillDir, "SKILL.md");
|
|
5559
5568
|
const content = await fs2.readFile(skillMdPath, "utf8");
|
|
@@ -5878,13 +5887,6 @@ async function directUpload(storageName, storageType, cwd, options) {
|
|
|
5878
5887
|
}
|
|
5879
5888
|
|
|
5880
5889
|
// src/lib/storage/system-storage.ts
|
|
5881
|
-
function getInstructionsFilename(framework) {
|
|
5882
|
-
const validatedFramework = getValidatedFramework(framework);
|
|
5883
|
-
if (validatedFramework === "codex") {
|
|
5884
|
-
return "AGENTS.md";
|
|
5885
|
-
}
|
|
5886
|
-
return "CLAUDE.md";
|
|
5887
|
-
}
|
|
5888
5890
|
async function uploadInstructions(agentName, instructionsFilePath, basePath, framework) {
|
|
5889
5891
|
const storageName = getInstructionsStorageName(agentName.toLowerCase());
|
|
5890
5892
|
const absolutePath = path5.isAbsolute(instructionsFilePath) ? instructionsFilePath : path5.join(basePath, instructionsFilePath);
|
|
@@ -6480,7 +6482,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
6480
6482
|
options.autoUpdate = false;
|
|
6481
6483
|
}
|
|
6482
6484
|
if (options.autoUpdate !== false) {
|
|
6483
|
-
await startSilentUpgrade("9.38.
|
|
6485
|
+
await startSilentUpgrade("9.38.4");
|
|
6484
6486
|
}
|
|
6485
6487
|
try {
|
|
6486
6488
|
let result;
|
|
@@ -8694,7 +8696,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
8694
8696
|
async (identifier, prompt, options) => {
|
|
8695
8697
|
try {
|
|
8696
8698
|
if (options.autoUpdate !== false) {
|
|
8697
|
-
await startSilentUpgrade("9.38.
|
|
8699
|
+
await startSilentUpgrade("9.38.4");
|
|
8698
8700
|
}
|
|
8699
8701
|
const { scope, name, version } = parseIdentifier(identifier);
|
|
8700
8702
|
if (scope && !options.experimentalSharedAgent) {
|
|
@@ -10270,7 +10272,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
|
|
|
10270
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(
|
|
10271
10273
|
async (prompt, options) => {
|
|
10272
10274
|
if (options.autoUpdate !== false) {
|
|
10273
|
-
const shouldExit = await checkAndUpgrade("9.38.
|
|
10275
|
+
const shouldExit = await checkAndUpgrade("9.38.4", prompt);
|
|
10274
10276
|
if (shouldExit) {
|
|
10275
10277
|
process.exit(0);
|
|
10276
10278
|
}
|
|
@@ -15198,7 +15200,7 @@ var preferenceCommand = new Command77().name("preference").description("View or
|
|
|
15198
15200
|
|
|
15199
15201
|
// src/index.ts
|
|
15200
15202
|
var program = new Command78();
|
|
15201
|
-
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");
|
|
15202
15204
|
program.addCommand(authCommand);
|
|
15203
15205
|
program.addCommand(infoCommand);
|
|
15204
15206
|
program.addCommand(composeCommand);
|