@vm0/cli 9.70.2 → 9.71.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 +142 -48
- 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.71.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.71.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.71.0"}`));
|
|
679
679
|
console.log();
|
|
680
680
|
const config = await loadConfig();
|
|
681
681
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1162,7 +1162,7 @@ var logDetailSchema = z5.object({
|
|
|
1162
1162
|
var logsListContract = c2.router({
|
|
1163
1163
|
list: {
|
|
1164
1164
|
method: "GET",
|
|
1165
|
-
path: "/api/
|
|
1165
|
+
path: "/api/zero/logs",
|
|
1166
1166
|
query: listQuerySchema.extend({
|
|
1167
1167
|
search: z5.string().optional(),
|
|
1168
1168
|
agent: z5.string().optional(),
|
|
@@ -1180,7 +1180,7 @@ var logsListContract = c2.router({
|
|
|
1180
1180
|
var logsByIdContract = c2.router({
|
|
1181
1181
|
getById: {
|
|
1182
1182
|
method: "GET",
|
|
1183
|
-
path: "/api/
|
|
1183
|
+
path: "/api/zero/logs/:id",
|
|
1184
1184
|
headers: authHeadersSchema,
|
|
1185
1185
|
pathParams: z5.object({
|
|
1186
1186
|
id: z5.string().uuid("Invalid log ID")
|
|
@@ -1373,14 +1373,14 @@ var orgContract = c4.router({
|
|
|
1373
1373
|
});
|
|
1374
1374
|
var orgDefaultAgentContract = c4.router({
|
|
1375
1375
|
/**
|
|
1376
|
-
* PUT /api/
|
|
1376
|
+
* PUT /api/zero/default-agent?org={slug}
|
|
1377
1377
|
* Set or unset the default agent for an org.
|
|
1378
1378
|
* Only org admins can perform this action.
|
|
1379
1379
|
* The agent must belong to the same org.
|
|
1380
1380
|
*/
|
|
1381
1381
|
setDefaultAgent: {
|
|
1382
1382
|
method: "PUT",
|
|
1383
|
-
path: "/api/
|
|
1383
|
+
path: "/api/zero/default-agent",
|
|
1384
1384
|
headers: authHeadersSchema,
|
|
1385
1385
|
query: z7.object({
|
|
1386
1386
|
org: z7.string().optional()
|
|
@@ -1654,17 +1654,21 @@ var agentEventsResponseSchema = z8.object({
|
|
|
1654
1654
|
});
|
|
1655
1655
|
var networkLogEntrySchema = z8.object({
|
|
1656
1656
|
timestamp: z8.string(),
|
|
1657
|
-
|
|
1658
|
-
action: z8.enum(["ALLOW", "DENY"]).optional(),
|
|
1657
|
+
action: z8.enum(["ALLOW", "DENY", "ERROR"]).optional(),
|
|
1659
1658
|
host: z8.string().optional(),
|
|
1660
1659
|
port: z8.number().optional(),
|
|
1661
|
-
rule_matched: z8.string().nullable().optional(),
|
|
1662
1660
|
method: z8.string().optional(),
|
|
1663
1661
|
url: z8.string().optional(),
|
|
1664
1662
|
status: z8.number().optional(),
|
|
1665
1663
|
latency_ms: z8.number().optional(),
|
|
1666
1664
|
request_size: z8.number().optional(),
|
|
1667
|
-
response_size: z8.number().optional()
|
|
1665
|
+
response_size: z8.number().optional(),
|
|
1666
|
+
firewall_base: z8.string().optional(),
|
|
1667
|
+
firewall_name: z8.string().optional(),
|
|
1668
|
+
firewall_ref: z8.string().optional(),
|
|
1669
|
+
firewall_permission: z8.string().optional(),
|
|
1670
|
+
firewall_rule_match: z8.string().optional(),
|
|
1671
|
+
firewall_params: z8.record(z8.string(), z8.string()).optional()
|
|
1668
1672
|
});
|
|
1669
1673
|
var networkLogsResponseSchema = z8.object({
|
|
1670
1674
|
networkLogs: z8.array(networkLogEntrySchema),
|
|
@@ -3393,7 +3397,7 @@ var chatThreadDetailSchema = z18.object({
|
|
|
3393
3397
|
var chatThreadsContract = c14.router({
|
|
3394
3398
|
create: {
|
|
3395
3399
|
method: "POST",
|
|
3396
|
-
path: "/api/chat-threads",
|
|
3400
|
+
path: "/api/zero/chat-threads",
|
|
3397
3401
|
headers: authHeadersSchema,
|
|
3398
3402
|
body: z18.object({
|
|
3399
3403
|
agentComposeId: z18.string().min(1),
|
|
@@ -3407,7 +3411,7 @@ var chatThreadsContract = c14.router({
|
|
|
3407
3411
|
},
|
|
3408
3412
|
list: {
|
|
3409
3413
|
method: "GET",
|
|
3410
|
-
path: "/api/chat-threads",
|
|
3414
|
+
path: "/api/zero/chat-threads",
|
|
3411
3415
|
headers: authHeadersSchema,
|
|
3412
3416
|
query: z18.object({
|
|
3413
3417
|
agentComposeId: z18.string().min(1, "agentComposeId is required")
|
|
@@ -3422,7 +3426,7 @@ var chatThreadsContract = c14.router({
|
|
|
3422
3426
|
var chatThreadByIdContract = c14.router({
|
|
3423
3427
|
get: {
|
|
3424
3428
|
method: "GET",
|
|
3425
|
-
path: "/api/chat-threads/:id",
|
|
3429
|
+
path: "/api/zero/chat-threads/:id",
|
|
3426
3430
|
headers: authHeadersSchema,
|
|
3427
3431
|
pathParams: z18.object({ id: z18.string() }),
|
|
3428
3432
|
responses: {
|
|
@@ -3436,7 +3440,7 @@ var chatThreadByIdContract = c14.router({
|
|
|
3436
3440
|
var chatThreadRunsContract = c14.router({
|
|
3437
3441
|
addRun: {
|
|
3438
3442
|
method: "POST",
|
|
3439
|
-
path: "/api/chat-threads/:id/runs",
|
|
3443
|
+
path: "/api/zero/chat-threads/:id/runs",
|
|
3440
3444
|
headers: authHeadersSchema,
|
|
3441
3445
|
pathParams: z18.object({ id: z18.string() }),
|
|
3442
3446
|
body: z18.object({
|
|
@@ -4710,6 +4714,24 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
4710
4714
|
},
|
|
4711
4715
|
defaultAuthMethod: "api-token"
|
|
4712
4716
|
},
|
|
4717
|
+
loops: {
|
|
4718
|
+
label: "Loops",
|
|
4719
|
+
helpText: "Connect your Loops account to send behavioral and transactional emails for your SaaS product",
|
|
4720
|
+
authMethods: {
|
|
4721
|
+
"api-token": {
|
|
4722
|
+
label: "API Key",
|
|
4723
|
+
helpText: "1. Log in to [Loops](https://app.loops.so)\n2. Go to **Settings** \u2192 **API**\n3. Click **Generate key**\n4. Copy the generated API key",
|
|
4724
|
+
secrets: {
|
|
4725
|
+
LOOPS_TOKEN: {
|
|
4726
|
+
label: "API Key",
|
|
4727
|
+
required: true,
|
|
4728
|
+
placeholder: "d2d561f5ff80136f69b4b5a31b9fb3c9"
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4732
|
+
},
|
|
4733
|
+
defaultAuthMethod: "api-token"
|
|
4734
|
+
},
|
|
4713
4735
|
make: {
|
|
4714
4736
|
label: "Make",
|
|
4715
4737
|
helpText: "Connect your Make account to manage scenarios, organizations, and automation workflows",
|
|
@@ -5065,6 +5087,23 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
5065
5087
|
},
|
|
5066
5088
|
defaultAuthMethod: "api-token"
|
|
5067
5089
|
},
|
|
5090
|
+
salesforce: {
|
|
5091
|
+
label: "Salesforce",
|
|
5092
|
+
helpText: "Connect your Salesforce account to manage CRM data, contacts, leads, and sales workflows",
|
|
5093
|
+
authMethods: {
|
|
5094
|
+
"api-token": {
|
|
5095
|
+
label: "API Token",
|
|
5096
|
+
secrets: {
|
|
5097
|
+
SALESFORCE_TOKEN: {
|
|
5098
|
+
label: "API Token",
|
|
5099
|
+
required: true,
|
|
5100
|
+
placeholder: "00D..."
|
|
5101
|
+
}
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
},
|
|
5105
|
+
defaultAuthMethod: "api-token"
|
|
5106
|
+
},
|
|
5068
5107
|
reddit: {
|
|
5069
5108
|
label: "Reddit",
|
|
5070
5109
|
featureFlag: "redditConnector" /* RedditConnector */,
|
|
@@ -6109,6 +6148,24 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
6109
6148
|
},
|
|
6110
6149
|
defaultAuthMethod: "api-token"
|
|
6111
6150
|
},
|
|
6151
|
+
brevo: {
|
|
6152
|
+
label: "Brevo",
|
|
6153
|
+
helpText: "Connect your Brevo account to manage email campaigns, transactional emails, and CRM contacts",
|
|
6154
|
+
authMethods: {
|
|
6155
|
+
"api-token": {
|
|
6156
|
+
label: "API Key",
|
|
6157
|
+
helpText: "1. Log in to [Brevo](https://app.brevo.com)\n2. Go to **Settings** \u2192 **SMTP & API** \u2192 **API Keys**\n3. Copy your API key",
|
|
6158
|
+
secrets: {
|
|
6159
|
+
BREVO_TOKEN: {
|
|
6160
|
+
label: "API Key",
|
|
6161
|
+
required: true,
|
|
6162
|
+
placeholder: "xkeysib-..."
|
|
6163
|
+
}
|
|
6164
|
+
}
|
|
6165
|
+
}
|
|
6166
|
+
},
|
|
6167
|
+
defaultAuthMethod: "api-token"
|
|
6168
|
+
},
|
|
6112
6169
|
"brave-search": {
|
|
6113
6170
|
label: "Brave Search",
|
|
6114
6171
|
helpText: "Connect your Brave Search account to perform privacy-focused web, image, video, and news searches",
|
|
@@ -6873,10 +6930,11 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
6873
6930
|
},
|
|
6874
6931
|
v0: {
|
|
6875
6932
|
label: "v0",
|
|
6876
|
-
helpText: "Connect your v0 account to generate and iterate on React and Next.js
|
|
6933
|
+
helpText: "Connect your v0 account to generate UI components, chat completions, and iterate on React and Next.js code with the v0 Platform API",
|
|
6877
6934
|
authMethods: {
|
|
6878
6935
|
"api-token": {
|
|
6879
6936
|
label: "API Token",
|
|
6937
|
+
helpText: "1. Log in to [v0](https://v0.dev)\n2. Go to **Settings** \u2192 **Keys** ([direct link](https://v0.dev/chat/settings/keys))\n3. Create a new API key\n4. Copy the generated token",
|
|
6880
6938
|
secrets: {
|
|
6881
6939
|
V0_TOKEN: {
|
|
6882
6940
|
label: "API Token",
|
|
@@ -6980,6 +7038,7 @@ var connectorTypeSchema = z22.enum([
|
|
|
6980
7038
|
"serpapi",
|
|
6981
7039
|
"zeptomail",
|
|
6982
7040
|
"runway",
|
|
7041
|
+
"salesforce",
|
|
6983
7042
|
"shortio",
|
|
6984
7043
|
"streak",
|
|
6985
7044
|
"supadata",
|
|
@@ -7012,7 +7071,9 @@ var connectorTypeSchema = z22.enum([
|
|
|
7012
7071
|
"wix",
|
|
7013
7072
|
"cal-com",
|
|
7014
7073
|
"v0",
|
|
7015
|
-
"
|
|
7074
|
+
"brevo",
|
|
7075
|
+
"customer-io",
|
|
7076
|
+
"loops"
|
|
7016
7077
|
]);
|
|
7017
7078
|
function getConnectorEnvironmentMapping(type2) {
|
|
7018
7079
|
const config = CONNECTOR_TYPES[type2];
|
|
@@ -7711,7 +7772,7 @@ var onboardingStatusResponseSchema = z25.object({
|
|
|
7711
7772
|
var onboardingStatusContract = c21.router({
|
|
7712
7773
|
getStatus: {
|
|
7713
7774
|
method: "GET",
|
|
7714
|
-
path: "/api/onboarding/status",
|
|
7775
|
+
path: "/api/zero/onboarding/status",
|
|
7715
7776
|
headers: authHeadersSchema,
|
|
7716
7777
|
responses: {
|
|
7717
7778
|
200: onboardingStatusResponseSchema,
|
|
@@ -8494,6 +8555,27 @@ var zeroVariablesContract = c34.router({
|
|
|
8494
8555
|
}
|
|
8495
8556
|
});
|
|
8496
8557
|
|
|
8558
|
+
// ../../packages/core/src/contracts/zero-sessions.ts
|
|
8559
|
+
import { z as z36 } from "zod";
|
|
8560
|
+
var c35 = initContract();
|
|
8561
|
+
var zeroSessionsByIdContract = c35.router({
|
|
8562
|
+
getById: {
|
|
8563
|
+
method: "GET",
|
|
8564
|
+
path: "/api/zero/sessions/:id",
|
|
8565
|
+
headers: authHeadersSchema,
|
|
8566
|
+
pathParams: z36.object({
|
|
8567
|
+
id: z36.string().min(1, "Session ID is required")
|
|
8568
|
+
}),
|
|
8569
|
+
responses: {
|
|
8570
|
+
200: sessionResponseSchema,
|
|
8571
|
+
401: apiErrorSchema,
|
|
8572
|
+
403: apiErrorSchema,
|
|
8573
|
+
404: apiErrorSchema
|
|
8574
|
+
},
|
|
8575
|
+
summary: "Get session by ID (zero proxy)"
|
|
8576
|
+
}
|
|
8577
|
+
});
|
|
8578
|
+
|
|
8497
8579
|
// ../../packages/core/src/storage-names.ts
|
|
8498
8580
|
function getInstructionsStorageName(agentName) {
|
|
8499
8581
|
return `agent-instructions@${agentName}`;
|
|
@@ -9545,8 +9627,8 @@ async function resolveSkills(skillUrls) {
|
|
|
9545
9627
|
}
|
|
9546
9628
|
|
|
9547
9629
|
// src/lib/domain/yaml-validator.ts
|
|
9548
|
-
import { z as
|
|
9549
|
-
var cliAgentNameSchema =
|
|
9630
|
+
import { z as z37 } from "zod";
|
|
9631
|
+
var cliAgentNameSchema = z37.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
|
|
9550
9632
|
/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
|
|
9551
9633
|
"Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
|
|
9552
9634
|
);
|
|
@@ -9560,7 +9642,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
|
|
|
9560
9642
|
resolveSkillRef(skillRef);
|
|
9561
9643
|
} catch (error) {
|
|
9562
9644
|
ctx.addIssue({
|
|
9563
|
-
code:
|
|
9645
|
+
code: z37.ZodIssueCode.custom,
|
|
9564
9646
|
message: error instanceof Error ? error.message : `Invalid skill reference: ${skillRef}`,
|
|
9565
9647
|
path: ["skills", i]
|
|
9566
9648
|
});
|
|
@@ -9570,15 +9652,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
|
|
|
9570
9652
|
}
|
|
9571
9653
|
}
|
|
9572
9654
|
);
|
|
9573
|
-
var cliComposeSchema =
|
|
9574
|
-
version:
|
|
9575
|
-
agents:
|
|
9576
|
-
volumes:
|
|
9655
|
+
var cliComposeSchema = z37.object({
|
|
9656
|
+
version: z37.string().min(1, "Missing config.version"),
|
|
9657
|
+
agents: z37.record(cliAgentNameSchema, cliAgentDefinitionSchema),
|
|
9658
|
+
volumes: z37.record(z37.string(), volumeConfigSchema).optional()
|
|
9577
9659
|
}).superRefine((config, ctx) => {
|
|
9578
9660
|
const agentKeys = Object.keys(config.agents);
|
|
9579
9661
|
if (agentKeys.length === 0) {
|
|
9580
9662
|
ctx.addIssue({
|
|
9581
|
-
code:
|
|
9663
|
+
code: z37.ZodIssueCode.custom,
|
|
9582
9664
|
message: "agents must have at least one agent defined",
|
|
9583
9665
|
path: ["agents"]
|
|
9584
9666
|
});
|
|
@@ -9586,7 +9668,7 @@ var cliComposeSchema = z36.object({
|
|
|
9586
9668
|
}
|
|
9587
9669
|
if (agentKeys.length > 1) {
|
|
9588
9670
|
ctx.addIssue({
|
|
9589
|
-
code:
|
|
9671
|
+
code: z37.ZodIssueCode.custom,
|
|
9590
9672
|
message: "Multiple agents not supported yet. Only one agent allowed.",
|
|
9591
9673
|
path: ["agents"]
|
|
9592
9674
|
});
|
|
@@ -9598,7 +9680,7 @@ var cliComposeSchema = z36.object({
|
|
|
9598
9680
|
if (agentVolumes && agentVolumes.length > 0) {
|
|
9599
9681
|
if (!config.volumes) {
|
|
9600
9682
|
ctx.addIssue({
|
|
9601
|
-
code:
|
|
9683
|
+
code: z37.ZodIssueCode.custom,
|
|
9602
9684
|
message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
|
|
9603
9685
|
path: ["volumes"]
|
|
9604
9686
|
});
|
|
@@ -9608,7 +9690,7 @@ var cliComposeSchema = z36.object({
|
|
|
9608
9690
|
const parts = volDeclaration.split(":");
|
|
9609
9691
|
if (parts.length !== 2) {
|
|
9610
9692
|
ctx.addIssue({
|
|
9611
|
-
code:
|
|
9693
|
+
code: z37.ZodIssueCode.custom,
|
|
9612
9694
|
message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
|
|
9613
9695
|
path: ["agents", agentName, "volumes"]
|
|
9614
9696
|
});
|
|
@@ -9617,7 +9699,7 @@ var cliComposeSchema = z36.object({
|
|
|
9617
9699
|
const volumeKey = parts[0].trim();
|
|
9618
9700
|
if (!config.volumes[volumeKey]) {
|
|
9619
9701
|
ctx.addIssue({
|
|
9620
|
-
code:
|
|
9702
|
+
code: z37.ZodIssueCode.custom,
|
|
9621
9703
|
message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
|
|
9622
9704
|
path: ["volumes", volumeKey]
|
|
9623
9705
|
});
|
|
@@ -10816,7 +10898,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
10816
10898
|
options.autoUpdate = false;
|
|
10817
10899
|
}
|
|
10818
10900
|
if (options.autoUpdate !== false) {
|
|
10819
|
-
await startSilentUpgrade("9.
|
|
10901
|
+
await startSilentUpgrade("9.71.0");
|
|
10820
10902
|
}
|
|
10821
10903
|
try {
|
|
10822
10904
|
let result;
|
|
@@ -11641,7 +11723,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
11641
11723
|
withErrorHandler(
|
|
11642
11724
|
async (identifier, prompt, options) => {
|
|
11643
11725
|
if (options.autoUpdate !== false) {
|
|
11644
|
-
await startSilentUpgrade("9.
|
|
11726
|
+
await startSilentUpgrade("9.71.0");
|
|
11645
11727
|
}
|
|
11646
11728
|
const { org, name, version } = parseIdentifier(identifier);
|
|
11647
11729
|
let composeId;
|
|
@@ -13379,7 +13461,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
13379
13461
|
withErrorHandler(
|
|
13380
13462
|
async (prompt, options) => {
|
|
13381
13463
|
if (options.autoUpdate !== false) {
|
|
13382
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
13464
|
+
const shouldExit = await checkAndUpgrade("9.71.0", prompt);
|
|
13383
13465
|
if (shouldExit) {
|
|
13384
13466
|
process.exit(0);
|
|
13385
13467
|
}
|
|
@@ -14357,7 +14439,13 @@ function formatMetric(metric) {
|
|
|
14357
14439
|
const diskPercent = (metric.disk_used / metric.disk_total * 100).toFixed(1);
|
|
14358
14440
|
return `[${metric.ts}] CPU: ${metric.cpu.toFixed(1)}% | Mem: ${formatBytes(metric.mem_used)}/${formatBytes(metric.mem_total)} (${memPercent}%) | Disk: ${formatBytes(metric.disk_used)}/${formatBytes(metric.disk_total)} (${diskPercent}%)`;
|
|
14359
14441
|
}
|
|
14360
|
-
function
|
|
14442
|
+
function formatNetworkDeny(entry) {
|
|
14443
|
+
const method = entry.method || "???";
|
|
14444
|
+
const url = entry.url || entry.host || "unknown";
|
|
14445
|
+
const firewall = entry.firewall_name ? ` ${chalk36.cyan(`[${entry.firewall_name}]`)}` : "";
|
|
14446
|
+
return `[${entry.timestamp}] ${method.padEnd(6)} ${chalk36.red.bold("DENY")} ${chalk36.dim(url)}${firewall}`;
|
|
14447
|
+
}
|
|
14448
|
+
function formatNetworkRequest(entry) {
|
|
14361
14449
|
let statusColor;
|
|
14362
14450
|
const status = entry.status || 0;
|
|
14363
14451
|
if (status >= 200 && status < 300) {
|
|
@@ -14382,7 +14470,13 @@ function formatNetworkLog(entry) {
|
|
|
14382
14470
|
const requestSize = entry.request_size || 0;
|
|
14383
14471
|
const responseSize = entry.response_size || 0;
|
|
14384
14472
|
const url = entry.url || entry.host || "unknown";
|
|
14385
|
-
|
|
14473
|
+
const firewall = entry.firewall_name ? ` ${chalk36.cyan(`[${entry.firewall_name}]`)}` : "";
|
|
14474
|
+
const error = entry.action === "ERROR" ? ` ${chalk36.red("auth failed")}` : "";
|
|
14475
|
+
return `[${entry.timestamp}] ${method.padEnd(6)} ${statusColor(status)} ${latencyColor(latencyMs + "ms")} ${formatBytes(requestSize)}/${formatBytes(responseSize)} ${chalk36.dim(url)}${firewall}${error}`;
|
|
14476
|
+
}
|
|
14477
|
+
function formatNetworkLog(entry) {
|
|
14478
|
+
if (entry.action === "DENY") return formatNetworkDeny(entry);
|
|
14479
|
+
return formatNetworkRequest(entry);
|
|
14386
14480
|
}
|
|
14387
14481
|
function createLogRenderer(verbose) {
|
|
14388
14482
|
return new EventRenderer({
|
|
@@ -15731,7 +15825,7 @@ var listCommand9 = new Command65().name("list").alias("ls").description("List al
|
|
|
15731
15825
|
);
|
|
15732
15826
|
return;
|
|
15733
15827
|
}
|
|
15734
|
-
const nameWidth = Math.max(4, ...data.composes.map((
|
|
15828
|
+
const nameWidth = Math.max(4, ...data.composes.map((c36) => c36.name.length));
|
|
15735
15829
|
const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
|
|
15736
15830
|
" "
|
|
15737
15831
|
);
|
|
@@ -16332,7 +16426,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
|
|
|
16332
16426
|
if (!isInteractive()) {
|
|
16333
16427
|
throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
|
|
16334
16428
|
}
|
|
16335
|
-
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((
|
|
16429
|
+
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c36) => c36.value === existingFrequency) : 0;
|
|
16336
16430
|
frequency = await promptSelect(
|
|
16337
16431
|
"Schedule frequency",
|
|
16338
16432
|
FREQUENCY_CHOICES,
|
|
@@ -16357,7 +16451,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
|
|
|
16357
16451
|
throw new Error("--day is required for weekly/monthly");
|
|
16358
16452
|
}
|
|
16359
16453
|
if (frequency === "weekly") {
|
|
16360
|
-
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((
|
|
16454
|
+
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c36) => c36.value === existingDay) : 0;
|
|
16361
16455
|
const day2 = await promptSelect(
|
|
16362
16456
|
"Day of week",
|
|
16363
16457
|
DAY_OF_WEEK_CHOICES,
|
|
@@ -17807,7 +17901,7 @@ import chalk76 from "chalk";
|
|
|
17807
17901
|
var listCommand13 = new Command86().name("list").alias("ls").description("List all connectors and their status").action(
|
|
17808
17902
|
withErrorHandler(async () => {
|
|
17809
17903
|
const result = await listConnectors();
|
|
17810
|
-
const connectedMap = new Map(result.connectors.map((
|
|
17904
|
+
const connectedMap = new Map(result.connectors.map((c36) => [c36.type, c36]));
|
|
17811
17905
|
const allTypesRaw = Object.keys(CONNECTOR_TYPES);
|
|
17812
17906
|
const allTypes = [];
|
|
17813
17907
|
for (const type2 of allTypesRaw) {
|
|
@@ -18368,16 +18462,16 @@ async function handleModelProvider(ctx) {
|
|
|
18368
18462
|
const providerType = await step.prompt(
|
|
18369
18463
|
() => promptSelect(
|
|
18370
18464
|
"Select provider type:",
|
|
18371
|
-
choices.map((
|
|
18372
|
-
title:
|
|
18373
|
-
value:
|
|
18465
|
+
choices.map((c36) => ({
|
|
18466
|
+
title: c36.label,
|
|
18467
|
+
value: c36.type
|
|
18374
18468
|
}))
|
|
18375
18469
|
)
|
|
18376
18470
|
);
|
|
18377
18471
|
if (!providerType) {
|
|
18378
18472
|
process.exit(0);
|
|
18379
18473
|
}
|
|
18380
|
-
const selectedChoice = choices.find((
|
|
18474
|
+
const selectedChoice = choices.find((c36) => c36.type === providerType);
|
|
18381
18475
|
if (selectedChoice?.helpText) {
|
|
18382
18476
|
for (const line of selectedChoice.helpText.split("\n")) {
|
|
18383
18477
|
step.detail(chalk82.dim(line));
|
|
@@ -18731,13 +18825,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
18731
18825
|
if (latestVersion === null) {
|
|
18732
18826
|
throw new Error("Could not check for updates. Please try again later.");
|
|
18733
18827
|
}
|
|
18734
|
-
if (latestVersion === "9.
|
|
18735
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.
|
|
18828
|
+
if (latestVersion === "9.71.0") {
|
|
18829
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.71.0"})`));
|
|
18736
18830
|
return;
|
|
18737
18831
|
}
|
|
18738
18832
|
console.log(
|
|
18739
18833
|
chalk86.yellow(
|
|
18740
|
-
`Current version: ${"9.
|
|
18834
|
+
`Current version: ${"9.71.0"} -> Latest version: ${latestVersion}`
|
|
18741
18835
|
)
|
|
18742
18836
|
);
|
|
18743
18837
|
console.log();
|
|
@@ -18764,7 +18858,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
18764
18858
|
const success = await performUpgrade(packageManager);
|
|
18765
18859
|
if (success) {
|
|
18766
18860
|
console.log(
|
|
18767
|
-
chalk86.green(`\u2713 Upgraded from ${"9.
|
|
18861
|
+
chalk86.green(`\u2713 Upgraded from ${"9.71.0"} to ${latestVersion}`)
|
|
18768
18862
|
);
|
|
18769
18863
|
return;
|
|
18770
18864
|
}
|
|
@@ -18838,7 +18932,7 @@ var whoamiCommand = new Command95().name("whoami").description("Show current ide
|
|
|
18838
18932
|
|
|
18839
18933
|
// src/index.ts
|
|
18840
18934
|
var program = new Command96();
|
|
18841
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
18935
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.71.0");
|
|
18842
18936
|
program.addCommand(authCommand);
|
|
18843
18937
|
program.addCommand(infoCommand);
|
|
18844
18938
|
program.addCommand(composeCommand);
|