@vm0/cli 9.72.1 → 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 +34 -15
- 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
|
/**
|
|
@@ -10912,7 +10921,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
10912
10921
|
options.autoUpdate = false;
|
|
10913
10922
|
}
|
|
10914
10923
|
if (options.autoUpdate !== false) {
|
|
10915
|
-
await startSilentUpgrade("9.
|
|
10924
|
+
await startSilentUpgrade("9.73.0");
|
|
10916
10925
|
}
|
|
10917
10926
|
try {
|
|
10918
10927
|
let result;
|
|
@@ -11743,7 +11752,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
11743
11752
|
withErrorHandler(
|
|
11744
11753
|
async (identifier, prompt, options) => {
|
|
11745
11754
|
if (options.autoUpdate !== false) {
|
|
11746
|
-
await startSilentUpgrade("9.
|
|
11755
|
+
await startSilentUpgrade("9.73.0");
|
|
11747
11756
|
}
|
|
11748
11757
|
const { org, name, version } = parseIdentifier(identifier);
|
|
11749
11758
|
let composeId;
|
|
@@ -13499,7 +13508,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
13499
13508
|
withErrorHandler(
|
|
13500
13509
|
async (prompt, options) => {
|
|
13501
13510
|
if (options.autoUpdate !== false) {
|
|
13502
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
13511
|
+
const shouldExit = await checkAndUpgrade("9.73.0", prompt);
|
|
13503
13512
|
if (shouldExit) {
|
|
13504
13513
|
process.exit(0);
|
|
13505
13514
|
}
|
|
@@ -14512,7 +14521,17 @@ function formatNetworkRequest(entry) {
|
|
|
14512
14521
|
const error = entry.firewall_error ? ` ${chalk36.red(entry.firewall_error)}` : "";
|
|
14513
14522
|
return `[${entry.timestamp}] ${method.padEnd(6)} ${statusColor(status)} ${latencyColor(latencyMs + "ms")} ${formatBytes(requestSize)}/${formatBytes(responseSize)} ${chalk36.dim(url)}${firewall}${error}`;
|
|
14514
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
|
+
}
|
|
14515
14533
|
function formatNetworkLog(entry) {
|
|
14534
|
+
if (entry.type === "tcp") return formatNetworkTcp(entry);
|
|
14516
14535
|
if (entry.action === "DENY") return formatNetworkDeny(entry);
|
|
14517
14536
|
return formatNetworkRequest(entry);
|
|
14518
14537
|
}
|
|
@@ -18863,13 +18882,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
18863
18882
|
if (latestVersion === null) {
|
|
18864
18883
|
throw new Error("Could not check for updates. Please try again later.");
|
|
18865
18884
|
}
|
|
18866
|
-
if (latestVersion === "9.
|
|
18867
|
-
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"})`));
|
|
18868
18887
|
return;
|
|
18869
18888
|
}
|
|
18870
18889
|
console.log(
|
|
18871
18890
|
chalk86.yellow(
|
|
18872
|
-
`Current version: ${"9.
|
|
18891
|
+
`Current version: ${"9.73.0"} -> Latest version: ${latestVersion}`
|
|
18873
18892
|
)
|
|
18874
18893
|
);
|
|
18875
18894
|
console.log();
|
|
@@ -18896,7 +18915,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
18896
18915
|
const success = await performUpgrade(packageManager);
|
|
18897
18916
|
if (success) {
|
|
18898
18917
|
console.log(
|
|
18899
|
-
chalk86.green(`\u2713 Upgraded from ${"9.
|
|
18918
|
+
chalk86.green(`\u2713 Upgraded from ${"9.73.0"} to ${latestVersion}`)
|
|
18900
18919
|
);
|
|
18901
18920
|
return;
|
|
18902
18921
|
}
|
|
@@ -18970,7 +18989,7 @@ var whoamiCommand = new Command95().name("whoami").description("Show current ide
|
|
|
18970
18989
|
|
|
18971
18990
|
// src/index.ts
|
|
18972
18991
|
var program = new Command96();
|
|
18973
|
-
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");
|
|
18974
18993
|
program.addCommand(authCommand);
|
|
18975
18994
|
program.addCommand(infoCommand);
|
|
18976
18995
|
program.addCommand(composeCommand);
|