@vm0/cli 9.65.0 → 9.65.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/index.js +40 -43
- 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.65.
|
|
48
|
+
release: "9.65.1",
|
|
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.65.
|
|
67
|
+
version: "9.65.1",
|
|
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.65.
|
|
678
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.65.1"}`));
|
|
679
679
|
console.log();
|
|
680
680
|
const config = await loadConfig();
|
|
681
681
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1291,7 +1291,8 @@ var orgDefaultAgentContract = c3.router({
|
|
|
1291
1291
|
400: apiErrorSchema,
|
|
1292
1292
|
401: apiErrorSchema,
|
|
1293
1293
|
403: apiErrorSchema,
|
|
1294
|
-
404: apiErrorSchema
|
|
1294
|
+
404: apiErrorSchema,
|
|
1295
|
+
409: apiErrorSchema
|
|
1295
1296
|
},
|
|
1296
1297
|
summary: "Set or unset the default agent for an org"
|
|
1297
1298
|
}
|
|
@@ -3508,7 +3509,7 @@ var deployScheduleRequestSchema = z19.object({
|
|
|
3508
3509
|
intervalSeconds: z19.number().int().min(0).optional(),
|
|
3509
3510
|
timezone: z19.string().default("UTC"),
|
|
3510
3511
|
prompt: z19.string().min(1, "Prompt required"),
|
|
3511
|
-
// vars and secrets removed - now managed via
|
|
3512
|
+
// vars and secrets removed - now managed via server-side tables
|
|
3512
3513
|
artifactName: z19.string().optional(),
|
|
3513
3514
|
artifactVersion: z19.string().optional(),
|
|
3514
3515
|
volumeVersions: z19.record(z19.string(), z19.string()).optional(),
|
|
@@ -3776,23 +3777,19 @@ var runnerRealtimeTokenContract = c17.router({
|
|
|
3776
3777
|
}
|
|
3777
3778
|
});
|
|
3778
3779
|
|
|
3779
|
-
// ../../packages/core/src/contracts/
|
|
3780
|
+
// ../../packages/core/src/contracts/logs.ts
|
|
3780
3781
|
import { z as z21 } from "zod";
|
|
3781
3782
|
var paginationSchema = z21.object({
|
|
3782
3783
|
hasMore: z21.boolean(),
|
|
3783
|
-
nextCursor: z21.string().nullable()
|
|
3784
|
+
nextCursor: z21.string().nullable(),
|
|
3785
|
+
totalPages: z21.number()
|
|
3784
3786
|
});
|
|
3785
3787
|
var listQuerySchema = z21.object({
|
|
3786
3788
|
cursor: z21.string().optional(),
|
|
3787
3789
|
limit: z21.coerce.number().min(1).max(100).default(20)
|
|
3788
3790
|
});
|
|
3789
3791
|
var c18 = initContract();
|
|
3790
|
-
var
|
|
3791
|
-
hasMore: z21.boolean(),
|
|
3792
|
-
nextCursor: z21.string().nullable(),
|
|
3793
|
-
totalPages: z21.number()
|
|
3794
|
-
});
|
|
3795
|
-
var platformLogStatusSchema = z21.enum([
|
|
3792
|
+
var logStatusSchema = z21.enum([
|
|
3796
3793
|
"queued",
|
|
3797
3794
|
"pending",
|
|
3798
3795
|
"running",
|
|
@@ -3801,33 +3798,33 @@ var platformLogStatusSchema = z21.enum([
|
|
|
3801
3798
|
"timeout",
|
|
3802
3799
|
"cancelled"
|
|
3803
3800
|
]);
|
|
3804
|
-
var
|
|
3801
|
+
var logEntrySchema = z21.object({
|
|
3805
3802
|
id: z21.uuid(),
|
|
3806
3803
|
sessionId: z21.string().nullable(),
|
|
3807
3804
|
agentName: z21.string(),
|
|
3808
3805
|
displayName: z21.string().nullable(),
|
|
3809
3806
|
orgSlug: z21.string().nullable(),
|
|
3810
3807
|
framework: z21.string().nullable(),
|
|
3811
|
-
status:
|
|
3808
|
+
status: logStatusSchema,
|
|
3812
3809
|
createdAt: z21.string(),
|
|
3813
3810
|
startedAt: z21.string().nullable(),
|
|
3814
3811
|
completedAt: z21.string().nullable()
|
|
3815
3812
|
});
|
|
3816
|
-
var
|
|
3817
|
-
data: z21.array(
|
|
3818
|
-
pagination:
|
|
3813
|
+
var logsListResponseSchema = z21.object({
|
|
3814
|
+
data: z21.array(logEntrySchema),
|
|
3815
|
+
pagination: paginationSchema
|
|
3819
3816
|
});
|
|
3820
3817
|
var artifactSchema = z21.object({
|
|
3821
3818
|
name: z21.string().nullable(),
|
|
3822
3819
|
version: z21.string().nullable()
|
|
3823
3820
|
});
|
|
3824
|
-
var
|
|
3821
|
+
var logDetailSchema = z21.object({
|
|
3825
3822
|
id: z21.uuid(),
|
|
3826
3823
|
sessionId: z21.string().nullable(),
|
|
3827
3824
|
agentName: z21.string(),
|
|
3828
3825
|
displayName: z21.string().nullable(),
|
|
3829
3826
|
framework: z21.string().nullable(),
|
|
3830
|
-
status:
|
|
3827
|
+
status: logStatusSchema,
|
|
3831
3828
|
prompt: z21.string(),
|
|
3832
3829
|
error: z21.string().nullable(),
|
|
3833
3830
|
createdAt: z21.string(),
|
|
@@ -3835,7 +3832,7 @@ var platformLogDetailSchema = z21.object({
|
|
|
3835
3832
|
completedAt: z21.string().nullable(),
|
|
3836
3833
|
artifact: artifactSchema
|
|
3837
3834
|
});
|
|
3838
|
-
var
|
|
3835
|
+
var logsListContract = c18.router({
|
|
3839
3836
|
list: {
|
|
3840
3837
|
method: "GET",
|
|
3841
3838
|
path: "/api/app/logs",
|
|
@@ -3844,16 +3841,16 @@ var platformLogsListContract = c18.router({
|
|
|
3844
3841
|
agent: z21.string().optional(),
|
|
3845
3842
|
name: z21.string().optional(),
|
|
3846
3843
|
org: z21.string().optional(),
|
|
3847
|
-
status:
|
|
3844
|
+
status: logStatusSchema.optional()
|
|
3848
3845
|
}),
|
|
3849
3846
|
responses: {
|
|
3850
|
-
200:
|
|
3847
|
+
200: logsListResponseSchema,
|
|
3851
3848
|
401: apiErrorSchema
|
|
3852
3849
|
},
|
|
3853
3850
|
summary: "List agent run logs with pagination"
|
|
3854
3851
|
}
|
|
3855
3852
|
});
|
|
3856
|
-
var
|
|
3853
|
+
var logsByIdContract = c18.router({
|
|
3857
3854
|
getById: {
|
|
3858
3855
|
method: "GET",
|
|
3859
3856
|
path: "/api/app/logs/:id",
|
|
@@ -3862,7 +3859,7 @@ var platformLogsByIdContract = c18.router({
|
|
|
3862
3859
|
id: z21.string().uuid("Invalid log ID")
|
|
3863
3860
|
}),
|
|
3864
3861
|
responses: {
|
|
3865
|
-
200:
|
|
3862
|
+
200: logDetailSchema,
|
|
3866
3863
|
401: apiErrorSchema,
|
|
3867
3864
|
404: apiErrorSchema
|
|
3868
3865
|
},
|
|
@@ -3873,7 +3870,7 @@ var artifactDownloadResponseSchema = z21.object({
|
|
|
3873
3870
|
url: z21.url(),
|
|
3874
3871
|
expiresAt: z21.string()
|
|
3875
3872
|
});
|
|
3876
|
-
var
|
|
3873
|
+
var artifactDownloadContract = c18.router({
|
|
3877
3874
|
getDownloadUrl: {
|
|
3878
3875
|
method: "GET",
|
|
3879
3876
|
path: "/api/app/artifacts/download",
|
|
@@ -7607,19 +7604,19 @@ var FEATURE_SWITCHES = {
|
|
|
7607
7604
|
maintainer: "ethan@vm0.ai",
|
|
7608
7605
|
enabled: true
|
|
7609
7606
|
},
|
|
7610
|
-
["
|
|
7607
|
+
["agents" /* Agents */]: {
|
|
7611
7608
|
maintainer: "ethan@vm0.ai",
|
|
7612
7609
|
enabled: true
|
|
7613
7610
|
},
|
|
7614
|
-
["
|
|
7611
|
+
["secrets" /* Secrets */]: {
|
|
7615
7612
|
maintainer: "ethan@vm0.ai",
|
|
7616
7613
|
enabled: false
|
|
7617
7614
|
},
|
|
7618
|
-
["
|
|
7615
|
+
["artifacts" /* Artifacts */]: {
|
|
7619
7616
|
maintainer: "ethan@vm0.ai",
|
|
7620
7617
|
enabled: false
|
|
7621
7618
|
},
|
|
7622
|
-
["
|
|
7619
|
+
["apiKeys" /* ApiKeys */]: {
|
|
7623
7620
|
maintainer: "ethan@vm0.ai",
|
|
7624
7621
|
enabled: false
|
|
7625
7622
|
},
|
|
@@ -9775,9 +9772,9 @@ function mergeSkillVariables(agent, variables) {
|
|
|
9775
9772
|
agent.environment = environment;
|
|
9776
9773
|
}
|
|
9777
9774
|
}
|
|
9778
|
-
function
|
|
9775
|
+
function getAppUrl(apiUrl) {
|
|
9779
9776
|
const url = new URL(apiUrl);
|
|
9780
|
-
url.hostname = url.hostname.replace("www", "
|
|
9777
|
+
url.hostname = url.hostname.replace("www", "app");
|
|
9781
9778
|
return url.origin;
|
|
9782
9779
|
}
|
|
9783
9780
|
async function checkAndPromptMissingItems(config, options) {
|
|
@@ -9810,7 +9807,7 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
9810
9807
|
return { missingSecrets: [], missingVars: [] };
|
|
9811
9808
|
}
|
|
9812
9809
|
const apiUrl = await getApiUrl();
|
|
9813
|
-
const
|
|
9810
|
+
const appUrl = getAppUrl(apiUrl);
|
|
9814
9811
|
const params = new URLSearchParams();
|
|
9815
9812
|
if (missingSecrets.length > 0) {
|
|
9816
9813
|
params.set("secrets", missingSecrets.join(","));
|
|
@@ -9818,7 +9815,7 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
9818
9815
|
if (missingVars.length > 0) {
|
|
9819
9816
|
params.set("vars", missingVars.join(","));
|
|
9820
9817
|
}
|
|
9821
|
-
const setupUrl = `${
|
|
9818
|
+
const setupUrl = `${appUrl}/environment-variables-setup?${params.toString()}`;
|
|
9822
9819
|
if (!options.json) {
|
|
9823
9820
|
console.log();
|
|
9824
9821
|
console.log(
|
|
@@ -9977,7 +9974,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9977
9974
|
options.autoUpdate = false;
|
|
9978
9975
|
}
|
|
9979
9976
|
if (options.autoUpdate !== false) {
|
|
9980
|
-
await startSilentUpgrade("9.65.
|
|
9977
|
+
await startSilentUpgrade("9.65.1");
|
|
9981
9978
|
}
|
|
9982
9979
|
try {
|
|
9983
9980
|
let result;
|
|
@@ -10799,7 +10796,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10799
10796
|
withErrorHandler(
|
|
10800
10797
|
async (identifier, prompt, options) => {
|
|
10801
10798
|
if (options.autoUpdate !== false) {
|
|
10802
|
-
await startSilentUpgrade("9.65.
|
|
10799
|
+
await startSilentUpgrade("9.65.1");
|
|
10803
10800
|
}
|
|
10804
10801
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10805
10802
|
let composeId;
|
|
@@ -12519,7 +12516,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12519
12516
|
withErrorHandler(
|
|
12520
12517
|
async (prompt, options) => {
|
|
12521
12518
|
if (options.autoUpdate !== false) {
|
|
12522
|
-
const shouldExit = await checkAndUpgrade("9.65.
|
|
12519
|
+
const shouldExit = await checkAndUpgrade("9.65.1", prompt);
|
|
12523
12520
|
if (shouldExit) {
|
|
12524
12521
|
process.exit(0);
|
|
12525
12522
|
}
|
|
@@ -13081,7 +13078,7 @@ var ApiClient = class {
|
|
|
13081
13078
|
}
|
|
13082
13079
|
/**
|
|
13083
13080
|
* Deploy schedule (create or update)
|
|
13084
|
-
* Note: vars and secrets are now managed via
|
|
13081
|
+
* Note: vars and secrets are now managed via server-side tables (vm0 secret set, vm0 var set)
|
|
13085
13082
|
*/
|
|
13086
13083
|
async deploySchedule(body) {
|
|
13087
13084
|
const baseUrl = await this.getBaseUrl();
|
|
@@ -17859,13 +17856,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17859
17856
|
if (latestVersion === null) {
|
|
17860
17857
|
throw new Error("Could not check for updates. Please try again later.");
|
|
17861
17858
|
}
|
|
17862
|
-
if (latestVersion === "9.65.
|
|
17863
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.65.
|
|
17859
|
+
if (latestVersion === "9.65.1") {
|
|
17860
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.65.1"})`));
|
|
17864
17861
|
return;
|
|
17865
17862
|
}
|
|
17866
17863
|
console.log(
|
|
17867
17864
|
chalk86.yellow(
|
|
17868
|
-
`Current version: ${"9.65.
|
|
17865
|
+
`Current version: ${"9.65.1"} -> Latest version: ${latestVersion}`
|
|
17869
17866
|
)
|
|
17870
17867
|
);
|
|
17871
17868
|
console.log();
|
|
@@ -17892,7 +17889,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17892
17889
|
const success = await performUpgrade(packageManager);
|
|
17893
17890
|
if (success) {
|
|
17894
17891
|
console.log(
|
|
17895
|
-
chalk86.green(`\u2713 Upgraded from ${"9.65.
|
|
17892
|
+
chalk86.green(`\u2713 Upgraded from ${"9.65.1"} to ${latestVersion}`)
|
|
17896
17893
|
);
|
|
17897
17894
|
return;
|
|
17898
17895
|
}
|
|
@@ -17906,7 +17903,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17906
17903
|
|
|
17907
17904
|
// src/index.ts
|
|
17908
17905
|
var program = new Command95();
|
|
17909
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.65.
|
|
17906
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.65.1");
|
|
17910
17907
|
program.addCommand(authCommand);
|
|
17911
17908
|
program.addCommand(infoCommand);
|
|
17912
17909
|
program.addCommand(composeCommand);
|