@vm0/cli 9.72.0 → 9.73.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/index.js +36 -16
- 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.
|
|
48
|
+
release: "9.73.0",
|
|
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.
|
|
67
|
+
version: "9.73.0",
|
|
68
68
|
command: process.argv.slice(2).join(" ")
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("runtime", {
|
|
@@ -675,7 +675,7 @@ function getConfigPath() {
|
|
|
675
675
|
return join2(homedir2(), ".vm0", "config.json");
|
|
676
676
|
}
|
|
677
677
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
678
|
-
console.log(chalk4.bold(`VM0 CLI v${"9.
|
|
678
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.73.0"}`));
|
|
679
679
|
console.log();
|
|
680
680
|
const config = await loadConfig();
|
|
681
681
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1658,6 +1658,7 @@ var agentEventsResponseSchema = z8.object({
|
|
|
1658
1658
|
});
|
|
1659
1659
|
var networkLogEntrySchema = z8.object({
|
|
1660
1660
|
timestamp: z8.string(),
|
|
1661
|
+
type: z8.enum(["http", "tcp"]).optional(),
|
|
1661
1662
|
action: z8.enum(["ALLOW", "DENY"]).optional(),
|
|
1662
1663
|
host: z8.string().optional(),
|
|
1663
1664
|
port: z8.number().optional(),
|
|
@@ -1673,7 +1674,8 @@ var networkLogEntrySchema = z8.object({
|
|
|
1673
1674
|
firewall_permission: z8.string().optional(),
|
|
1674
1675
|
firewall_rule_match: z8.string().optional(),
|
|
1675
1676
|
firewall_params: z8.record(z8.string(), z8.string()).optional(),
|
|
1676
|
-
firewall_error: z8.string().optional()
|
|
1677
|
+
firewall_error: z8.string().optional(),
|
|
1678
|
+
error: z8.string().optional()
|
|
1677
1679
|
});
|
|
1678
1680
|
var networkLogsResponseSchema = z8.object({
|
|
1679
1681
|
networkLogs: z8.array(networkLogEntrySchema),
|
|
@@ -2326,17 +2328,24 @@ var sandboxOperationSchema = z10.object({
|
|
|
2326
2328
|
});
|
|
2327
2329
|
var networkLogSchema = z10.object({
|
|
2328
2330
|
timestamp: z10.string(),
|
|
2329
|
-
|
|
2331
|
+
type: z10.enum(["http", "tcp"]).optional(),
|
|
2330
2332
|
action: z10.enum(["ALLOW", "DENY"]).optional(),
|
|
2331
2333
|
host: z10.string().optional(),
|
|
2332
2334
|
port: z10.number().optional(),
|
|
2333
|
-
rule_matched: z10.string().nullable().optional(),
|
|
2334
2335
|
method: z10.string().optional(),
|
|
2335
2336
|
url: z10.string().optional(),
|
|
2336
2337
|
status: z10.number().optional(),
|
|
2337
2338
|
latency_ms: z10.number().optional(),
|
|
2338
2339
|
request_size: z10.number().optional(),
|
|
2339
|
-
response_size: z10.number().optional()
|
|
2340
|
+
response_size: z10.number().optional(),
|
|
2341
|
+
firewall_base: z10.string().optional(),
|
|
2342
|
+
firewall_name: z10.string().optional(),
|
|
2343
|
+
firewall_ref: z10.string().optional(),
|
|
2344
|
+
firewall_permission: z10.string().optional(),
|
|
2345
|
+
firewall_rule_match: z10.string().optional(),
|
|
2346
|
+
firewall_params: z10.record(z10.string(), z10.string()).optional(),
|
|
2347
|
+
firewall_error: z10.string().optional(),
|
|
2348
|
+
error: z10.string().optional()
|
|
2340
2349
|
});
|
|
2341
2350
|
var webhookTelemetryContract = c7.router({
|
|
2342
2351
|
/**
|
|
@@ -8660,7 +8669,8 @@ var GOOGLE_OAUTH_REVIEWER_EMAIL_HASHES = [
|
|
|
8660
8669
|
var FEATURE_SWITCHES = {
|
|
8661
8670
|
["pricing" /* Pricing */]: {
|
|
8662
8671
|
maintainer: "ethan@vm0.ai",
|
|
8663
|
-
enabled: false
|
|
8672
|
+
enabled: false,
|
|
8673
|
+
enabledUserHashes: STAFF_USER_HASHES
|
|
8664
8674
|
},
|
|
8665
8675
|
["dummy" /* Dummy */]: {
|
|
8666
8676
|
maintainer: "ethan@vm0.ai",
|
|
@@ -10911,7 +10921,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
10911
10921
|
options.autoUpdate = false;
|
|
10912
10922
|
}
|
|
10913
10923
|
if (options.autoUpdate !== false) {
|
|
10914
|
-
await startSilentUpgrade("9.
|
|
10924
|
+
await startSilentUpgrade("9.73.0");
|
|
10915
10925
|
}
|
|
10916
10926
|
try {
|
|
10917
10927
|
let result;
|
|
@@ -11742,7 +11752,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
11742
11752
|
withErrorHandler(
|
|
11743
11753
|
async (identifier, prompt, options) => {
|
|
11744
11754
|
if (options.autoUpdate !== false) {
|
|
11745
|
-
await startSilentUpgrade("9.
|
|
11755
|
+
await startSilentUpgrade("9.73.0");
|
|
11746
11756
|
}
|
|
11747
11757
|
const { org, name, version } = parseIdentifier(identifier);
|
|
11748
11758
|
let composeId;
|
|
@@ -13498,7 +13508,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
13498
13508
|
withErrorHandler(
|
|
13499
13509
|
async (prompt, options) => {
|
|
13500
13510
|
if (options.autoUpdate !== false) {
|
|
13501
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
13511
|
+
const shouldExit = await checkAndUpgrade("9.73.0", prompt);
|
|
13502
13512
|
if (shouldExit) {
|
|
13503
13513
|
process.exit(0);
|
|
13504
13514
|
}
|
|
@@ -14511,7 +14521,17 @@ function formatNetworkRequest(entry) {
|
|
|
14511
14521
|
const error = entry.firewall_error ? ` ${chalk36.red(entry.firewall_error)}` : "";
|
|
14512
14522
|
return `[${entry.timestamp}] ${method.padEnd(6)} ${statusColor(status)} ${latencyColor(latencyMs + "ms")} ${formatBytes(requestSize)}/${formatBytes(responseSize)} ${chalk36.dim(url)}${firewall}${error}`;
|
|
14513
14523
|
}
|
|
14524
|
+
function formatNetworkTcp(entry) {
|
|
14525
|
+
const host = entry.host || "unknown";
|
|
14526
|
+
const port = entry.port || 0;
|
|
14527
|
+
const requestSize = entry.request_size || 0;
|
|
14528
|
+
const responseSize = entry.response_size || 0;
|
|
14529
|
+
const latencyMs = entry.latency_ms || 0;
|
|
14530
|
+
const error = entry.error ? ` ${chalk36.red(entry.error)}` : "";
|
|
14531
|
+
return `[${entry.timestamp}] ${chalk36.blue("TCP")} ${latencyMs}ms ${formatBytes(requestSize)}/${formatBytes(responseSize)} ${chalk36.dim(`${host}:${port}`)}${error}`;
|
|
14532
|
+
}
|
|
14514
14533
|
function formatNetworkLog(entry) {
|
|
14534
|
+
if (entry.type === "tcp") return formatNetworkTcp(entry);
|
|
14515
14535
|
if (entry.action === "DENY") return formatNetworkDeny(entry);
|
|
14516
14536
|
return formatNetworkRequest(entry);
|
|
14517
14537
|
}
|
|
@@ -18862,13 +18882,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
18862
18882
|
if (latestVersion === null) {
|
|
18863
18883
|
throw new Error("Could not check for updates. Please try again later.");
|
|
18864
18884
|
}
|
|
18865
|
-
if (latestVersion === "9.
|
|
18866
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.
|
|
18885
|
+
if (latestVersion === "9.73.0") {
|
|
18886
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.73.0"})`));
|
|
18867
18887
|
return;
|
|
18868
18888
|
}
|
|
18869
18889
|
console.log(
|
|
18870
18890
|
chalk86.yellow(
|
|
18871
|
-
`Current version: ${"9.
|
|
18891
|
+
`Current version: ${"9.73.0"} -> Latest version: ${latestVersion}`
|
|
18872
18892
|
)
|
|
18873
18893
|
);
|
|
18874
18894
|
console.log();
|
|
@@ -18895,7 +18915,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
18895
18915
|
const success = await performUpgrade(packageManager);
|
|
18896
18916
|
if (success) {
|
|
18897
18917
|
console.log(
|
|
18898
|
-
chalk86.green(`\u2713 Upgraded from ${"9.
|
|
18918
|
+
chalk86.green(`\u2713 Upgraded from ${"9.73.0"} to ${latestVersion}`)
|
|
18899
18919
|
);
|
|
18900
18920
|
return;
|
|
18901
18921
|
}
|
|
@@ -18969,7 +18989,7 @@ var whoamiCommand = new Command95().name("whoami").description("Show current ide
|
|
|
18969
18989
|
|
|
18970
18990
|
// src/index.ts
|
|
18971
18991
|
var program = new Command96();
|
|
18972
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
18992
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.73.0");
|
|
18973
18993
|
program.addCommand(authCommand);
|
|
18974
18994
|
program.addCommand(infoCommand);
|
|
18975
18995
|
program.addCommand(composeCommand);
|