@vm0/cli 9.83.0 → 9.83.1
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-Z7ZCVASY.js → chunk-5BLBSO2W.js} +146 -63
- package/chunk-5BLBSO2W.js.map +1 -0
- package/index.js +15 -103
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +2 -2
- package/chunk-Z7ZCVASY.js.map +0 -1
package/index.js
CHANGED
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
expandFirewallConfigs,
|
|
13
13
|
extractAndGroupVariables,
|
|
14
14
|
getActiveOrg,
|
|
15
|
+
getAgentEvents,
|
|
15
16
|
getApiUrl,
|
|
16
17
|
getCheckpoint,
|
|
17
|
-
getClientConfig,
|
|
18
18
|
getComposeById,
|
|
19
19
|
getComposeByName,
|
|
20
20
|
getComposeVersion,
|
|
@@ -22,13 +22,15 @@ import {
|
|
|
22
22
|
getFrameworkDisplayName,
|
|
23
23
|
getInstructionsFilename,
|
|
24
24
|
getInstructionsStorageName,
|
|
25
|
+
getMetrics,
|
|
26
|
+
getNetworkLogs,
|
|
25
27
|
getRunQueue,
|
|
26
28
|
getSession,
|
|
27
29
|
getSkillStorageName,
|
|
28
30
|
getStorageDownload,
|
|
31
|
+
getSystemLog,
|
|
29
32
|
getToken,
|
|
30
33
|
getZeroOrg,
|
|
31
|
-
handleError,
|
|
32
34
|
isInteractive,
|
|
33
35
|
isSupportedFramework,
|
|
34
36
|
listRuns,
|
|
@@ -37,7 +39,6 @@ import {
|
|
|
37
39
|
listZeroSecrets,
|
|
38
40
|
listZeroVariables,
|
|
39
41
|
loadConfig,
|
|
40
|
-
logsSearchContract,
|
|
41
42
|
parseGitHubTreeUrl,
|
|
42
43
|
parseGitHubUrl,
|
|
43
44
|
parseSkillFrontmatter,
|
|
@@ -46,14 +47,11 @@ import {
|
|
|
46
47
|
promptText,
|
|
47
48
|
resolveSkillRef,
|
|
48
49
|
resolveSkills,
|
|
49
|
-
runAgentEventsContract,
|
|
50
|
-
runMetricsContract,
|
|
51
|
-
runNetworkLogsContract,
|
|
52
|
-
runSystemLogContract,
|
|
53
50
|
saveConfig,
|
|
51
|
+
searchLogs,
|
|
54
52
|
volumeConfigSchema,
|
|
55
53
|
withErrorHandler
|
|
56
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-5BLBSO2W.js";
|
|
57
55
|
|
|
58
56
|
// src/index.ts
|
|
59
57
|
import { Command as Command44 } from "commander";
|
|
@@ -439,7 +437,7 @@ function getConfigPath() {
|
|
|
439
437
|
return join(homedir(), ".vm0", "config.json");
|
|
440
438
|
}
|
|
441
439
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
442
|
-
console.log(chalk3.bold(`VM0 CLI v${"9.83.
|
|
440
|
+
console.log(chalk3.bold(`VM0 CLI v${"9.83.1"}`));
|
|
443
441
|
console.log();
|
|
444
442
|
const config = await loadConfig();
|
|
445
443
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1665,7 +1663,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
1665
1663
|
options.autoUpdate = false;
|
|
1666
1664
|
}
|
|
1667
1665
|
if (options.autoUpdate !== false) {
|
|
1668
|
-
await startSilentUpgrade("9.83.
|
|
1666
|
+
await startSilentUpgrade("9.83.1");
|
|
1669
1667
|
}
|
|
1670
1668
|
try {
|
|
1671
1669
|
let result;
|
|
@@ -2500,7 +2498,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
2500
2498
|
withErrorHandler(
|
|
2501
2499
|
async (identifier, prompt, options) => {
|
|
2502
2500
|
if (options.autoUpdate !== false) {
|
|
2503
|
-
await startSilentUpgrade("9.83.
|
|
2501
|
+
await startSilentUpgrade("9.83.1");
|
|
2504
2502
|
}
|
|
2505
2503
|
const { org, name, version } = parseIdentifier(identifier);
|
|
2506
2504
|
let composeId;
|
|
@@ -4256,7 +4254,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
4256
4254
|
withErrorHandler(
|
|
4257
4255
|
async (prompt, options) => {
|
|
4258
4256
|
if (options.autoUpdate !== false) {
|
|
4259
|
-
const shouldExit = await checkAndUpgrade("9.83.
|
|
4257
|
+
const shouldExit = await checkAndUpgrade("9.83.1", prompt);
|
|
4260
4258
|
if (shouldExit) {
|
|
4261
4259
|
process.exit(0);
|
|
4262
4260
|
}
|
|
@@ -4441,92 +4439,6 @@ var cookCommand = cookAction;
|
|
|
4441
4439
|
import { Command as Command40 } from "commander";
|
|
4442
4440
|
import chalk34 from "chalk";
|
|
4443
4441
|
|
|
4444
|
-
// src/lib/api/domains/logs.ts
|
|
4445
|
-
import { initClient } from "@ts-rest/core";
|
|
4446
|
-
async function getSystemLog(runId, options) {
|
|
4447
|
-
const config = await getClientConfig();
|
|
4448
|
-
const client = initClient(runSystemLogContract, config);
|
|
4449
|
-
const result = await client.getSystemLog({
|
|
4450
|
-
params: { id: runId },
|
|
4451
|
-
query: {
|
|
4452
|
-
since: options?.since,
|
|
4453
|
-
limit: options?.limit,
|
|
4454
|
-
order: options?.order
|
|
4455
|
-
}
|
|
4456
|
-
});
|
|
4457
|
-
if (result.status === 200) {
|
|
4458
|
-
return result.body;
|
|
4459
|
-
}
|
|
4460
|
-
handleError(result, "Failed to fetch system log");
|
|
4461
|
-
}
|
|
4462
|
-
async function getMetrics(runId, options) {
|
|
4463
|
-
const config = await getClientConfig();
|
|
4464
|
-
const client = initClient(runMetricsContract, config);
|
|
4465
|
-
const result = await client.getMetrics({
|
|
4466
|
-
params: { id: runId },
|
|
4467
|
-
query: {
|
|
4468
|
-
since: options?.since,
|
|
4469
|
-
limit: options?.limit,
|
|
4470
|
-
order: options?.order
|
|
4471
|
-
}
|
|
4472
|
-
});
|
|
4473
|
-
if (result.status === 200) {
|
|
4474
|
-
return result.body;
|
|
4475
|
-
}
|
|
4476
|
-
handleError(result, "Failed to fetch metrics");
|
|
4477
|
-
}
|
|
4478
|
-
async function getAgentEvents(runId, options) {
|
|
4479
|
-
const config = await getClientConfig();
|
|
4480
|
-
const client = initClient(runAgentEventsContract, config);
|
|
4481
|
-
const result = await client.getAgentEvents({
|
|
4482
|
-
params: { id: runId },
|
|
4483
|
-
query: {
|
|
4484
|
-
since: options?.since,
|
|
4485
|
-
limit: options?.limit,
|
|
4486
|
-
order: options?.order
|
|
4487
|
-
}
|
|
4488
|
-
});
|
|
4489
|
-
if (result.status === 200) {
|
|
4490
|
-
return result.body;
|
|
4491
|
-
}
|
|
4492
|
-
handleError(result, "Failed to fetch agent events");
|
|
4493
|
-
}
|
|
4494
|
-
async function getNetworkLogs(runId, options) {
|
|
4495
|
-
const config = await getClientConfig();
|
|
4496
|
-
const client = initClient(runNetworkLogsContract, config);
|
|
4497
|
-
const result = await client.getNetworkLogs({
|
|
4498
|
-
params: { id: runId },
|
|
4499
|
-
query: {
|
|
4500
|
-
since: options?.since,
|
|
4501
|
-
limit: options?.limit,
|
|
4502
|
-
order: options?.order
|
|
4503
|
-
}
|
|
4504
|
-
});
|
|
4505
|
-
if (result.status === 200) {
|
|
4506
|
-
return result.body;
|
|
4507
|
-
}
|
|
4508
|
-
handleError(result, "Failed to fetch network logs");
|
|
4509
|
-
}
|
|
4510
|
-
async function searchLogs(options) {
|
|
4511
|
-
const config = await getClientConfig();
|
|
4512
|
-
const client = initClient(logsSearchContract, config);
|
|
4513
|
-
const result = await client.searchLogs({
|
|
4514
|
-
query: {
|
|
4515
|
-
keyword: options.keyword,
|
|
4516
|
-
agent: options.agent,
|
|
4517
|
-
runId: options.runId,
|
|
4518
|
-
since: options.since,
|
|
4519
|
-
limit: options.limit,
|
|
4520
|
-
before: options.before,
|
|
4521
|
-
after: options.after
|
|
4522
|
-
}
|
|
4523
|
-
});
|
|
4524
|
-
if (result.status === 200) {
|
|
4525
|
-
return result.body;
|
|
4526
|
-
}
|
|
4527
|
-
handleError(result, "Failed to search logs");
|
|
4528
|
-
}
|
|
4529
|
-
|
|
4530
4442
|
// src/lib/utils/paginate.ts
|
|
4531
4443
|
async function paginate(options) {
|
|
4532
4444
|
const { fetchPage, getTimestamp, targetCount, initialSince } = options;
|
|
@@ -5082,13 +4994,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
5082
4994
|
if (latestVersion === null) {
|
|
5083
4995
|
throw new Error("Could not check for updates. Please try again later.");
|
|
5084
4996
|
}
|
|
5085
|
-
if (latestVersion === "9.83.
|
|
5086
|
-
console.log(chalk36.green(`\u2713 Already up to date (${"9.83.
|
|
4997
|
+
if (latestVersion === "9.83.1") {
|
|
4998
|
+
console.log(chalk36.green(`\u2713 Already up to date (${"9.83.1"})`));
|
|
5087
4999
|
return;
|
|
5088
5000
|
}
|
|
5089
5001
|
console.log(
|
|
5090
5002
|
chalk36.yellow(
|
|
5091
|
-
`Current version: ${"9.83.
|
|
5003
|
+
`Current version: ${"9.83.1"} -> Latest version: ${latestVersion}`
|
|
5092
5004
|
)
|
|
5093
5005
|
);
|
|
5094
5006
|
console.log();
|
|
@@ -5115,7 +5027,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
5115
5027
|
const success = await performUpgrade(packageManager);
|
|
5116
5028
|
if (success) {
|
|
5117
5029
|
console.log(
|
|
5118
|
-
chalk36.green(`\u2713 Upgraded from ${"9.83.
|
|
5030
|
+
chalk36.green(`\u2713 Upgraded from ${"9.83.1"} to ${latestVersion}`)
|
|
5119
5031
|
);
|
|
5120
5032
|
return;
|
|
5121
5033
|
}
|
|
@@ -5183,7 +5095,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
|
|
|
5183
5095
|
|
|
5184
5096
|
// src/index.ts
|
|
5185
5097
|
var program = new Command44();
|
|
5186
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.83.
|
|
5098
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.83.1");
|
|
5187
5099
|
program.addCommand(authCommand);
|
|
5188
5100
|
program.addCommand(infoCommand);
|
|
5189
5101
|
program.addCommand(composeCommand);
|