@vm0/cli 9.62.2 → 9.62.3
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 +44 -30
- 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.62.
|
|
48
|
+
release: "9.62.3",
|
|
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.62.
|
|
67
|
+
version: "9.62.3",
|
|
68
68
|
command: process.argv.slice(2).join(" ")
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("runtime", {
|
|
@@ -673,7 +673,7 @@ function getConfigPath() {
|
|
|
673
673
|
return join2(homedir2(), ".vm0", "config.json");
|
|
674
674
|
}
|
|
675
675
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
676
|
-
console.log(chalk4.bold(`VM0 CLI v${"9.62.
|
|
676
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.62.3"}`));
|
|
677
677
|
console.log();
|
|
678
678
|
const config = await loadConfig();
|
|
679
679
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1606,10 +1606,9 @@ var logsSearchContract = c3.router({
|
|
|
1606
1606
|
});
|
|
1607
1607
|
var queueEntrySchema = z6.object({
|
|
1608
1608
|
position: z6.number(),
|
|
1609
|
-
agentName: z6.string(),
|
|
1610
|
-
userEmail: z6.string(),
|
|
1609
|
+
agentName: z6.string().nullable(),
|
|
1610
|
+
userEmail: z6.string().nullable(),
|
|
1611
1611
|
createdAt: z6.string(),
|
|
1612
|
-
isOwner: z6.boolean(),
|
|
1613
1612
|
runId: z6.string().nullable()
|
|
1614
1613
|
});
|
|
1615
1614
|
var concurrencyInfoSchema = z6.object({
|
|
@@ -7407,27 +7406,29 @@ function parseSkillFrontmatter(content) {
|
|
|
7407
7406
|
}
|
|
7408
7407
|
|
|
7409
7408
|
// ../../packages/core/src/instructions-frontmatter.ts
|
|
7410
|
-
var
|
|
7411
|
-
var
|
|
7412
|
-
|
|
7409
|
+
var LEGACY_PROFILE_START = "<!-- ZERO_PROFILE";
|
|
7410
|
+
var LEGACY_PROFILE_END = "ZERO_PROFILE -->";
|
|
7411
|
+
var PROFILE_START = "[AGENT_PROFILE]";
|
|
7412
|
+
var PROFILE_END = "[/AGENT_PROFILE]";
|
|
7413
|
+
function stripMarkerBlocks(content, startMarker, endMarker) {
|
|
7413
7414
|
let result = "";
|
|
7414
7415
|
let searchFrom = 0;
|
|
7415
7416
|
while (searchFrom < content.length) {
|
|
7416
|
-
const startIdx = content.indexOf(
|
|
7417
|
+
const startIdx = content.indexOf(startMarker + "\n", searchFrom);
|
|
7417
7418
|
if (startIdx === -1) {
|
|
7418
7419
|
result += content.slice(searchFrom);
|
|
7419
7420
|
break;
|
|
7420
7421
|
}
|
|
7421
7422
|
result += content.slice(searchFrom, startIdx);
|
|
7422
7423
|
const endIdx = content.indexOf(
|
|
7423
|
-
|
|
7424
|
-
startIdx +
|
|
7424
|
+
endMarker,
|
|
7425
|
+
startIdx + startMarker.length + 1
|
|
7425
7426
|
);
|
|
7426
7427
|
if (endIdx === -1) {
|
|
7427
7428
|
result += content.slice(startIdx);
|
|
7428
7429
|
break;
|
|
7429
7430
|
}
|
|
7430
|
-
let afterEnd = endIdx +
|
|
7431
|
+
let afterEnd = endIdx + endMarker.length;
|
|
7431
7432
|
if (content[afterEnd] === "\n") {
|
|
7432
7433
|
afterEnd++;
|
|
7433
7434
|
}
|
|
@@ -7435,6 +7436,14 @@ function stripProfileBlocks(content) {
|
|
|
7435
7436
|
}
|
|
7436
7437
|
return result;
|
|
7437
7438
|
}
|
|
7439
|
+
function stripProfileBlocks(content) {
|
|
7440
|
+
const withoutLegacy = stripMarkerBlocks(
|
|
7441
|
+
content,
|
|
7442
|
+
LEGACY_PROFILE_START,
|
|
7443
|
+
LEGACY_PROFILE_END
|
|
7444
|
+
);
|
|
7445
|
+
return stripMarkerBlocks(withoutLegacy, PROFILE_START, PROFILE_END);
|
|
7446
|
+
}
|
|
7438
7447
|
var LEGACY_METADATA_KEYS = /* @__PURE__ */ new Set(["name", "tone"]);
|
|
7439
7448
|
function stripLegacyFrontmatter(content) {
|
|
7440
7449
|
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---(\r?\n|$)/);
|
|
@@ -7492,15 +7501,14 @@ ${paragraph}
|
|
|
7492
7501
|
${PROFILE_END}`;
|
|
7493
7502
|
const stripped = stripProfileBlocks(
|
|
7494
7503
|
stripLegacyFrontmatter(content)
|
|
7495
|
-
).
|
|
7504
|
+
).trimStart();
|
|
7496
7505
|
if (!stripped) {
|
|
7497
7506
|
return `${block}
|
|
7498
7507
|
`;
|
|
7499
7508
|
}
|
|
7500
|
-
return `${
|
|
7509
|
+
return `${block}
|
|
7501
7510
|
|
|
7502
|
-
${
|
|
7503
|
-
`;
|
|
7511
|
+
${stripped}`;
|
|
7504
7512
|
}
|
|
7505
7513
|
|
|
7506
7514
|
// src/lib/api/core/http.ts
|
|
@@ -9502,7 +9510,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9502
9510
|
options.autoUpdate = false;
|
|
9503
9511
|
}
|
|
9504
9512
|
if (options.autoUpdate !== false) {
|
|
9505
|
-
await startSilentUpgrade("9.62.
|
|
9513
|
+
await startSilentUpgrade("9.62.3");
|
|
9506
9514
|
}
|
|
9507
9515
|
try {
|
|
9508
9516
|
let result;
|
|
@@ -10324,7 +10332,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10324
10332
|
withErrorHandler(
|
|
10325
10333
|
async (identifier, prompt, options) => {
|
|
10326
10334
|
if (options.autoUpdate !== false) {
|
|
10327
|
-
await startSilentUpgrade("9.62.
|
|
10335
|
+
await startSilentUpgrade("9.62.3");
|
|
10328
10336
|
}
|
|
10329
10337
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10330
10338
|
let composeId;
|
|
@@ -10721,8 +10729,14 @@ var queueCommand = new Command13().name("queue").description("Show org run queue
|
|
|
10721
10729
|
);
|
|
10722
10730
|
console.log();
|
|
10723
10731
|
const posWidth = Math.max(1, String(queue.length).length);
|
|
10724
|
-
const agentWidth = Math.max(
|
|
10725
|
-
|
|
10732
|
+
const agentWidth = Math.max(
|
|
10733
|
+
5,
|
|
10734
|
+
...queue.map((e) => (e.agentName ?? "-").length)
|
|
10735
|
+
);
|
|
10736
|
+
const emailWidth = Math.max(
|
|
10737
|
+
4,
|
|
10738
|
+
...queue.map((e) => (e.userEmail ?? "-").length)
|
|
10739
|
+
);
|
|
10726
10740
|
const header = [
|
|
10727
10741
|
"#".padEnd(posWidth),
|
|
10728
10742
|
"AGENT".padEnd(agentWidth),
|
|
@@ -10731,11 +10745,11 @@ var queueCommand = new Command13().name("queue").description("Show org run queue
|
|
|
10731
10745
|
].join(" ");
|
|
10732
10746
|
console.log(chalk12.dim(header));
|
|
10733
10747
|
for (const entry of queue) {
|
|
10734
|
-
const marker = entry.
|
|
10748
|
+
const marker = entry.runId !== null ? chalk12.cyan(" \u2190 you") : "";
|
|
10735
10749
|
const row = [
|
|
10736
10750
|
String(entry.position).padEnd(posWidth),
|
|
10737
|
-
entry.agentName.padEnd(agentWidth),
|
|
10738
|
-
entry.userEmail.padEnd(emailWidth),
|
|
10751
|
+
(entry.agentName ?? "-").padEnd(agentWidth),
|
|
10752
|
+
(entry.userEmail ?? "-").padEnd(emailWidth),
|
|
10739
10753
|
formatRelativeTime(entry.createdAt)
|
|
10740
10754
|
].join(" ");
|
|
10741
10755
|
console.log(row + marker);
|
|
@@ -12038,7 +12052,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12038
12052
|
withErrorHandler(
|
|
12039
12053
|
async (prompt, options) => {
|
|
12040
12054
|
if (options.autoUpdate !== false) {
|
|
12041
|
-
const shouldExit = await checkAndUpgrade("9.62.
|
|
12055
|
+
const shouldExit = await checkAndUpgrade("9.62.3", prompt);
|
|
12042
12056
|
if (shouldExit) {
|
|
12043
12057
|
process.exit(0);
|
|
12044
12058
|
}
|
|
@@ -17172,13 +17186,13 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
|
|
|
17172
17186
|
if (latestVersion === null) {
|
|
17173
17187
|
throw new Error("Could not check for updates. Please try again later.");
|
|
17174
17188
|
}
|
|
17175
|
-
if (latestVersion === "9.62.
|
|
17176
|
-
console.log(chalk79.green(`\u2713 Already up to date (${"9.62.
|
|
17189
|
+
if (latestVersion === "9.62.3") {
|
|
17190
|
+
console.log(chalk79.green(`\u2713 Already up to date (${"9.62.3"})`));
|
|
17177
17191
|
return;
|
|
17178
17192
|
}
|
|
17179
17193
|
console.log(
|
|
17180
17194
|
chalk79.yellow(
|
|
17181
|
-
`Current version: ${"9.62.
|
|
17195
|
+
`Current version: ${"9.62.3"} -> Latest version: ${latestVersion}`
|
|
17182
17196
|
)
|
|
17183
17197
|
);
|
|
17184
17198
|
console.log();
|
|
@@ -17205,7 +17219,7 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
|
|
|
17205
17219
|
const success = await performUpgrade(packageManager);
|
|
17206
17220
|
if (success) {
|
|
17207
17221
|
console.log(
|
|
17208
|
-
chalk79.green(`\u2713 Upgraded from ${"9.62.
|
|
17222
|
+
chalk79.green(`\u2713 Upgraded from ${"9.62.3"} to ${latestVersion}`)
|
|
17209
17223
|
);
|
|
17210
17224
|
return;
|
|
17211
17225
|
}
|
|
@@ -17219,7 +17233,7 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
|
|
|
17219
17233
|
|
|
17220
17234
|
// src/index.ts
|
|
17221
17235
|
var program = new Command87();
|
|
17222
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.62.
|
|
17236
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.62.3");
|
|
17223
17237
|
program.addCommand(authCommand);
|
|
17224
17238
|
program.addCommand(infoCommand);
|
|
17225
17239
|
program.addCommand(composeCommand);
|