@vm0/cli 9.95.1 → 9.96.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-WN2AD3KW.js → chunk-T53WM66Z.js} +202 -97
- package/chunk-T53WM66Z.js.map +1 -0
- package/index.js +12 -79
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +328 -4
- package/zero.js.map +1 -1
- package/chunk-WN2AD3KW.js.map +0 -1
package/index.js
CHANGED
|
@@ -42,11 +42,13 @@ import {
|
|
|
42
42
|
listZeroVariables,
|
|
43
43
|
loadConfig,
|
|
44
44
|
loadValues,
|
|
45
|
+
paginate,
|
|
45
46
|
parseFirewallPolicies,
|
|
46
47
|
parseGitHubTreeUrl,
|
|
47
48
|
parseGitHubUrl,
|
|
48
49
|
parseIdentifier,
|
|
49
50
|
parseSkillFrontmatter,
|
|
51
|
+
parseTime,
|
|
50
52
|
pollEvents,
|
|
51
53
|
prepareStorage,
|
|
52
54
|
promptConfirm,
|
|
@@ -59,7 +61,7 @@ import {
|
|
|
59
61
|
showNextSteps,
|
|
60
62
|
volumeConfigSchema,
|
|
61
63
|
withErrorHandler
|
|
62
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-T53WM66Z.js";
|
|
63
65
|
|
|
64
66
|
// src/index.ts
|
|
65
67
|
import { Command as Command44 } from "commander";
|
|
@@ -452,7 +454,7 @@ function getConfigPath() {
|
|
|
452
454
|
return join(homedir(), ".vm0", "config.json");
|
|
453
455
|
}
|
|
454
456
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
455
|
-
console.log(chalk3.bold(`VM0 CLI v${"9.
|
|
457
|
+
console.log(chalk3.bold(`VM0 CLI v${"9.96.0"}`));
|
|
456
458
|
console.log();
|
|
457
459
|
const config = await loadConfig();
|
|
458
460
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1579,7 +1581,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
1579
1581
|
options.autoUpdate = false;
|
|
1580
1582
|
}
|
|
1581
1583
|
if (options.autoUpdate !== false) {
|
|
1582
|
-
await startSilentUpgrade("9.
|
|
1584
|
+
await startSilentUpgrade("9.96.0");
|
|
1583
1585
|
}
|
|
1584
1586
|
try {
|
|
1585
1587
|
let result;
|
|
@@ -1653,7 +1655,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
1653
1655
|
withErrorHandler(
|
|
1654
1656
|
async (identifier, prompt, options) => {
|
|
1655
1657
|
if (options.autoUpdate !== false) {
|
|
1656
|
-
await startSilentUpgrade("9.
|
|
1658
|
+
await startSilentUpgrade("9.96.0");
|
|
1657
1659
|
}
|
|
1658
1660
|
const { name, version } = parseIdentifier(identifier);
|
|
1659
1661
|
let composeId;
|
|
@@ -1896,52 +1898,6 @@ var continueCommand = new Command10().name("continue").description(
|
|
|
1896
1898
|
// src/commands/run/list.ts
|
|
1897
1899
|
import { Command as Command11 } from "commander";
|
|
1898
1900
|
import chalk5 from "chalk";
|
|
1899
|
-
|
|
1900
|
-
// src/lib/utils/time-parser.ts
|
|
1901
|
-
function parseTime(timeStr) {
|
|
1902
|
-
const relativeMatch = timeStr.match(/^(\d+)([smhdw])$/);
|
|
1903
|
-
if (relativeMatch) {
|
|
1904
|
-
const value = parseInt(relativeMatch[1], 10);
|
|
1905
|
-
const unit = relativeMatch[2];
|
|
1906
|
-
return parseRelativeTime(value, unit);
|
|
1907
|
-
}
|
|
1908
|
-
if (/^\d+$/.test(timeStr)) {
|
|
1909
|
-
const timestamp = parseInt(timeStr, 10);
|
|
1910
|
-
if (timestamp < 1e10) {
|
|
1911
|
-
return timestamp * 1e3;
|
|
1912
|
-
}
|
|
1913
|
-
return timestamp;
|
|
1914
|
-
}
|
|
1915
|
-
const date = new Date(timeStr);
|
|
1916
|
-
if (!isNaN(date.getTime())) {
|
|
1917
|
-
return date.getTime();
|
|
1918
|
-
}
|
|
1919
|
-
throw new Error(
|
|
1920
|
-
`Invalid time format: "${timeStr}". Supported formats: relative (5m, 2h, 1d), ISO 8601 (2024-01-15T10:30:00Z), Unix timestamp`
|
|
1921
|
-
);
|
|
1922
|
-
}
|
|
1923
|
-
function parseRelativeTime(value, unit) {
|
|
1924
|
-
const now = Date.now();
|
|
1925
|
-
const multipliers = {
|
|
1926
|
-
s: 1e3,
|
|
1927
|
-
// seconds
|
|
1928
|
-
m: 60 * 1e3,
|
|
1929
|
-
// minutes
|
|
1930
|
-
h: 60 * 60 * 1e3,
|
|
1931
|
-
// hours
|
|
1932
|
-
d: 24 * 60 * 60 * 1e3,
|
|
1933
|
-
// days
|
|
1934
|
-
w: 7 * 24 * 60 * 60 * 1e3
|
|
1935
|
-
// weeks
|
|
1936
|
-
};
|
|
1937
|
-
const multiplier = multipliers[unit];
|
|
1938
|
-
if (!multiplier) {
|
|
1939
|
-
throw new Error(`Unknown time unit: ${unit}`);
|
|
1940
|
-
}
|
|
1941
|
-
return now - value * multiplier;
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
// src/commands/run/list.ts
|
|
1945
1901
|
var UUID_LENGTH = 36;
|
|
1946
1902
|
var VALID_STATUSES = ALL_RUN_STATUSES.join(",");
|
|
1947
1903
|
function formatRunStatus(status, width) {
|
|
@@ -3457,7 +3413,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
3457
3413
|
withErrorHandler(
|
|
3458
3414
|
async (prompt, options) => {
|
|
3459
3415
|
if (options.autoUpdate !== false) {
|
|
3460
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
3416
|
+
const shouldExit = await checkAndUpgrade("9.96.0", prompt);
|
|
3461
3417
|
if (shouldExit) {
|
|
3462
3418
|
process.exit(0);
|
|
3463
3419
|
}
|
|
@@ -3642,29 +3598,6 @@ var cookCommand = cookAction;
|
|
|
3642
3598
|
import { Command as Command40 } from "commander";
|
|
3643
3599
|
import chalk31 from "chalk";
|
|
3644
3600
|
|
|
3645
|
-
// src/lib/utils/paginate.ts
|
|
3646
|
-
async function paginate(options) {
|
|
3647
|
-
const { fetchPage, getTimestamp, targetCount, initialSince } = options;
|
|
3648
|
-
const collected = [];
|
|
3649
|
-
let since = initialSince;
|
|
3650
|
-
let hasMore = true;
|
|
3651
|
-
while (hasMore) {
|
|
3652
|
-
const response = await fetchPage(since);
|
|
3653
|
-
collected.push(...response.items);
|
|
3654
|
-
hasMore = response.hasMore;
|
|
3655
|
-
if (targetCount !== "all" && collected.length >= targetCount) {
|
|
3656
|
-
return collected.slice(0, targetCount);
|
|
3657
|
-
}
|
|
3658
|
-
if (response.items.length > 0) {
|
|
3659
|
-
const lastItem = response.items[response.items.length - 1];
|
|
3660
|
-
since = getTimestamp(lastItem);
|
|
3661
|
-
} else {
|
|
3662
|
-
hasMore = false;
|
|
3663
|
-
}
|
|
3664
|
-
}
|
|
3665
|
-
return collected;
|
|
3666
|
-
}
|
|
3667
|
-
|
|
3668
3601
|
// src/commands/logs/search.ts
|
|
3669
3602
|
import { Command as Command39 } from "commander";
|
|
3670
3603
|
import chalk30 from "chalk";
|
|
@@ -4215,13 +4148,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4215
4148
|
if (latestVersion === null) {
|
|
4216
4149
|
throw new Error("Could not check for updates. Please try again later.");
|
|
4217
4150
|
}
|
|
4218
|
-
if (latestVersion === "9.
|
|
4219
|
-
console.log(chalk33.green(`\u2713 Already up to date (${"9.
|
|
4151
|
+
if (latestVersion === "9.96.0") {
|
|
4152
|
+
console.log(chalk33.green(`\u2713 Already up to date (${"9.96.0"})`));
|
|
4220
4153
|
return;
|
|
4221
4154
|
}
|
|
4222
4155
|
console.log(
|
|
4223
4156
|
chalk33.yellow(
|
|
4224
|
-
`Current version: ${"9.
|
|
4157
|
+
`Current version: ${"9.96.0"} -> Latest version: ${latestVersion}`
|
|
4225
4158
|
)
|
|
4226
4159
|
);
|
|
4227
4160
|
console.log();
|
|
@@ -4248,7 +4181,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4248
4181
|
const success = await performUpgrade(packageManager);
|
|
4249
4182
|
if (success) {
|
|
4250
4183
|
console.log(
|
|
4251
|
-
chalk33.green(`\u2713 Upgraded from ${"9.
|
|
4184
|
+
chalk33.green(`\u2713 Upgraded from ${"9.96.0"} to ${latestVersion}`)
|
|
4252
4185
|
);
|
|
4253
4186
|
return;
|
|
4254
4187
|
}
|
|
@@ -4316,7 +4249,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
|
|
|
4316
4249
|
|
|
4317
4250
|
// src/index.ts
|
|
4318
4251
|
var program = new Command44();
|
|
4319
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
4252
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.96.0");
|
|
4320
4253
|
program.addCommand(authCommand);
|
|
4321
4254
|
program.addCommand(infoCommand);
|
|
4322
4255
|
program.addCommand(composeCommand);
|