@vm0/cli 9.64.0 → 9.64.2
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 +42 -70
- 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.64.
|
|
48
|
+
release: "9.64.2",
|
|
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.64.
|
|
67
|
+
version: "9.64.2",
|
|
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.64.
|
|
678
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.64.2"}`));
|
|
679
679
|
console.log();
|
|
680
680
|
const config = await loadConfig();
|
|
681
681
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -2934,8 +2934,6 @@ var modelProviderResponseSchema = z15.object({
|
|
|
2934
2934
|
// For multi-auth providers
|
|
2935
2935
|
isDefault: z15.boolean(),
|
|
2936
2936
|
selectedModel: z15.string().nullable(),
|
|
2937
|
-
scope: z15.enum(["org", "user"]).optional(),
|
|
2938
|
-
// Optional for backward compat
|
|
2939
2937
|
createdAt: z15.string(),
|
|
2940
2938
|
updatedAt: z15.string()
|
|
2941
2939
|
});
|
|
@@ -3825,7 +3823,7 @@ var platformLogDetailSchema = z21.object({
|
|
|
3825
3823
|
var platformLogsListContract = c18.router({
|
|
3826
3824
|
list: {
|
|
3827
3825
|
method: "GET",
|
|
3828
|
-
path: "/api/
|
|
3826
|
+
path: "/api/app/logs",
|
|
3829
3827
|
query: listQuerySchema.extend({
|
|
3830
3828
|
search: z21.string().optional(),
|
|
3831
3829
|
agent: z21.string().optional(),
|
|
@@ -3843,7 +3841,7 @@ var platformLogsListContract = c18.router({
|
|
|
3843
3841
|
var platformLogsByIdContract = c18.router({
|
|
3844
3842
|
getById: {
|
|
3845
3843
|
method: "GET",
|
|
3846
|
-
path: "/api/
|
|
3844
|
+
path: "/api/app/logs/:id",
|
|
3847
3845
|
headers: authHeadersSchema,
|
|
3848
3846
|
pathParams: z21.object({
|
|
3849
3847
|
id: z21.string().uuid("Invalid log ID")
|
|
@@ -3863,7 +3861,7 @@ var artifactDownloadResponseSchema = z21.object({
|
|
|
3863
3861
|
var platformArtifactDownloadContract = c18.router({
|
|
3864
3862
|
getDownloadUrl: {
|
|
3865
3863
|
method: "GET",
|
|
3866
|
-
path: "/api/
|
|
3864
|
+
path: "/api/app/artifacts/download",
|
|
3867
3865
|
query: z21.object({
|
|
3868
3866
|
name: z21.string().min(1, "Artifact name is required"),
|
|
3869
3867
|
version: z21.string().optional()
|
|
@@ -7210,6 +7208,7 @@ import { z as z26 } from "zod";
|
|
|
7210
7208
|
var c23 = initContract();
|
|
7211
7209
|
var onboardingStatusResponseSchema = z26.object({
|
|
7212
7210
|
needsOnboarding: z26.boolean(),
|
|
7211
|
+
isAdmin: z26.boolean(),
|
|
7213
7212
|
hasOrg: z26.boolean(),
|
|
7214
7213
|
hasModelProvider: z26.boolean(),
|
|
7215
7214
|
hasDefaultAgent: z26.boolean(),
|
|
@@ -7219,7 +7218,8 @@ var onboardingStatusResponseSchema = z26.object({
|
|
|
7219
7218
|
displayName: z26.string().optional(),
|
|
7220
7219
|
description: z26.string().optional(),
|
|
7221
7220
|
sound: z26.string().optional()
|
|
7222
|
-
}).nullable()
|
|
7221
|
+
}).nullable(),
|
|
7222
|
+
defaultAgentSkills: z26.array(z26.string())
|
|
7223
7223
|
});
|
|
7224
7224
|
var onboardingStatusContract = c23.router({
|
|
7225
7225
|
getStatus: {
|
|
@@ -8526,9 +8526,16 @@ async function getConnector(type2) {
|
|
|
8526
8526
|
async function getUsage(options) {
|
|
8527
8527
|
const baseUrl = await getBaseUrl();
|
|
8528
8528
|
const headers = await getHeaders();
|
|
8529
|
+
const activeOrg = await getActiveOrg();
|
|
8530
|
+
if (!activeOrg) {
|
|
8531
|
+
throw new Error(
|
|
8532
|
+
"No active organization configured. Run: vm0 org use <slug>"
|
|
8533
|
+
);
|
|
8534
|
+
}
|
|
8529
8535
|
const params = new URLSearchParams({
|
|
8530
8536
|
start_date: options.startDate,
|
|
8531
|
-
end_date: options.endDate
|
|
8537
|
+
end_date: options.endDate,
|
|
8538
|
+
org: activeOrg
|
|
8532
8539
|
});
|
|
8533
8540
|
const response = await fetch(`${baseUrl}/api/usage?${params}`, {
|
|
8534
8541
|
method: "GET",
|
|
@@ -9975,7 +9982,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9975
9982
|
options.autoUpdate = false;
|
|
9976
9983
|
}
|
|
9977
9984
|
if (options.autoUpdate !== false) {
|
|
9978
|
-
await startSilentUpgrade("9.64.
|
|
9985
|
+
await startSilentUpgrade("9.64.2");
|
|
9979
9986
|
}
|
|
9980
9987
|
try {
|
|
9981
9988
|
let result;
|
|
@@ -10797,7 +10804,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10797
10804
|
withErrorHandler(
|
|
10798
10805
|
async (identifier, prompt, options) => {
|
|
10799
10806
|
if (options.autoUpdate !== false) {
|
|
10800
|
-
await startSilentUpgrade("9.64.
|
|
10807
|
+
await startSilentUpgrade("9.64.2");
|
|
10801
10808
|
}
|
|
10802
10809
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10803
10810
|
let composeId;
|
|
@@ -12517,7 +12524,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12517
12524
|
withErrorHandler(
|
|
12518
12525
|
async (prompt, options) => {
|
|
12519
12526
|
if (options.autoUpdate !== false) {
|
|
12520
|
-
const shouldExit = await checkAndUpgrade("9.64.
|
|
12527
|
+
const shouldExit = await checkAndUpgrade("9.64.2", prompt);
|
|
12521
12528
|
if (shouldExit) {
|
|
12522
12529
|
process.exit(0);
|
|
12523
12530
|
}
|
|
@@ -12830,13 +12837,8 @@ var ApiClient = class {
|
|
|
12830
12837
|
throw new Error(message);
|
|
12831
12838
|
}
|
|
12832
12839
|
async getEvents(runId, options) {
|
|
12833
|
-
const
|
|
12834
|
-
const
|
|
12835
|
-
const client = initClient15(runEventsContract, {
|
|
12836
|
-
baseUrl,
|
|
12837
|
-
baseHeaders: headers,
|
|
12838
|
-
jsonQuery: false
|
|
12839
|
-
});
|
|
12840
|
+
const config = await getClientConfig();
|
|
12841
|
+
const client = initClient15(runEventsContract, config);
|
|
12840
12842
|
const result = await client.getEvents({
|
|
12841
12843
|
params: { id: runId },
|
|
12842
12844
|
query: {
|
|
@@ -12852,13 +12854,8 @@ var ApiClient = class {
|
|
|
12852
12854
|
throw new Error(message);
|
|
12853
12855
|
}
|
|
12854
12856
|
async getSystemLog(runId, options) {
|
|
12855
|
-
const
|
|
12856
|
-
const
|
|
12857
|
-
const client = initClient15(runSystemLogContract, {
|
|
12858
|
-
baseUrl,
|
|
12859
|
-
baseHeaders: headers,
|
|
12860
|
-
jsonQuery: false
|
|
12861
|
-
});
|
|
12857
|
+
const config = await getClientConfig();
|
|
12858
|
+
const client = initClient15(runSystemLogContract, config);
|
|
12862
12859
|
const result = await client.getSystemLog({
|
|
12863
12860
|
params: { id: runId },
|
|
12864
12861
|
query: {
|
|
@@ -12875,13 +12872,8 @@ var ApiClient = class {
|
|
|
12875
12872
|
throw new Error(message);
|
|
12876
12873
|
}
|
|
12877
12874
|
async getMetrics(runId, options) {
|
|
12878
|
-
const
|
|
12879
|
-
const
|
|
12880
|
-
const client = initClient15(runMetricsContract, {
|
|
12881
|
-
baseUrl,
|
|
12882
|
-
baseHeaders: headers,
|
|
12883
|
-
jsonQuery: false
|
|
12884
|
-
});
|
|
12875
|
+
const config = await getClientConfig();
|
|
12876
|
+
const client = initClient15(runMetricsContract, config);
|
|
12885
12877
|
const result = await client.getMetrics({
|
|
12886
12878
|
params: { id: runId },
|
|
12887
12879
|
query: {
|
|
@@ -12898,13 +12890,8 @@ var ApiClient = class {
|
|
|
12898
12890
|
throw new Error(message);
|
|
12899
12891
|
}
|
|
12900
12892
|
async getAgentEvents(runId, options) {
|
|
12901
|
-
const
|
|
12902
|
-
const
|
|
12903
|
-
const client = initClient15(runAgentEventsContract, {
|
|
12904
|
-
baseUrl,
|
|
12905
|
-
baseHeaders: headers,
|
|
12906
|
-
jsonQuery: false
|
|
12907
|
-
});
|
|
12893
|
+
const config = await getClientConfig();
|
|
12894
|
+
const client = initClient15(runAgentEventsContract, config);
|
|
12908
12895
|
const result = await client.getAgentEvents({
|
|
12909
12896
|
params: { id: runId },
|
|
12910
12897
|
query: {
|
|
@@ -12921,13 +12908,8 @@ var ApiClient = class {
|
|
|
12921
12908
|
throw new Error(message);
|
|
12922
12909
|
}
|
|
12923
12910
|
async getNetworkLogs(runId, options) {
|
|
12924
|
-
const
|
|
12925
|
-
const
|
|
12926
|
-
const client = initClient15(runNetworkLogsContract, {
|
|
12927
|
-
baseUrl,
|
|
12928
|
-
baseHeaders: headers,
|
|
12929
|
-
jsonQuery: false
|
|
12930
|
-
});
|
|
12911
|
+
const config = await getClientConfig();
|
|
12912
|
+
const client = initClient15(runNetworkLogsContract, config);
|
|
12931
12913
|
const result = await client.getNetworkLogs({
|
|
12932
12914
|
params: { id: runId },
|
|
12933
12915
|
query: {
|
|
@@ -13008,13 +12990,8 @@ var ApiClient = class {
|
|
|
13008
12990
|
* Used by run resume to fetch checkpoint info including secretNames
|
|
13009
12991
|
*/
|
|
13010
12992
|
async getCheckpoint(checkpointId) {
|
|
13011
|
-
const
|
|
13012
|
-
const
|
|
13013
|
-
const client = initClient15(checkpointsByIdContract, {
|
|
13014
|
-
baseUrl,
|
|
13015
|
-
baseHeaders: headers,
|
|
13016
|
-
jsonQuery: false
|
|
13017
|
-
});
|
|
12993
|
+
const config = await getClientConfig();
|
|
12994
|
+
const client = initClient15(checkpointsByIdContract, config);
|
|
13018
12995
|
const result = await client.getById({
|
|
13019
12996
|
params: { id: checkpointId }
|
|
13020
12997
|
});
|
|
@@ -13347,13 +13324,8 @@ var ApiClient = class {
|
|
|
13347
13324
|
});
|
|
13348
13325
|
}
|
|
13349
13326
|
async searchLogs(options) {
|
|
13350
|
-
const
|
|
13351
|
-
const
|
|
13352
|
-
const client = initClient15(logsSearchContract, {
|
|
13353
|
-
baseUrl,
|
|
13354
|
-
baseHeaders: headers,
|
|
13355
|
-
jsonQuery: false
|
|
13356
|
-
});
|
|
13327
|
+
const config = await getClientConfig();
|
|
13328
|
+
const client = initClient15(logsSearchContract, config);
|
|
13357
13329
|
const result = await client.searchLogs({
|
|
13358
13330
|
query: {
|
|
13359
13331
|
keyword: options.keyword,
|
|
@@ -13516,10 +13488,10 @@ function buildPlatformLogsUrl(apiUrl, runId) {
|
|
|
13516
13488
|
return `http://${hostname}:3001/logs/${runId}`;
|
|
13517
13489
|
}
|
|
13518
13490
|
const parts = hostname.split(".");
|
|
13519
|
-
if (parts[0] === "www") {
|
|
13520
|
-
parts[0] = "
|
|
13491
|
+
if (parts[0] === "www" || parts[0] === "app" || parts[0] === "platform") {
|
|
13492
|
+
parts[0] = "app";
|
|
13521
13493
|
} else {
|
|
13522
|
-
parts.unshift("
|
|
13494
|
+
parts.unshift("app");
|
|
13523
13495
|
}
|
|
13524
13496
|
const platformHost = parts.join(".");
|
|
13525
13497
|
const port = url.port ? `:${url.port}` : "";
|
|
@@ -18147,13 +18119,13 @@ var upgradeCommand = new Command99().name("upgrade").description("Upgrade vm0 CL
|
|
|
18147
18119
|
if (latestVersion === null) {
|
|
18148
18120
|
throw new Error("Could not check for updates. Please try again later.");
|
|
18149
18121
|
}
|
|
18150
|
-
if (latestVersion === "9.64.
|
|
18151
|
-
console.log(chalk90.green(`\u2713 Already up to date (${"9.64.
|
|
18122
|
+
if (latestVersion === "9.64.2") {
|
|
18123
|
+
console.log(chalk90.green(`\u2713 Already up to date (${"9.64.2"})`));
|
|
18152
18124
|
return;
|
|
18153
18125
|
}
|
|
18154
18126
|
console.log(
|
|
18155
18127
|
chalk90.yellow(
|
|
18156
|
-
`Current version: ${"9.64.
|
|
18128
|
+
`Current version: ${"9.64.2"} -> Latest version: ${latestVersion}`
|
|
18157
18129
|
)
|
|
18158
18130
|
);
|
|
18159
18131
|
console.log();
|
|
@@ -18180,7 +18152,7 @@ var upgradeCommand = new Command99().name("upgrade").description("Upgrade vm0 CL
|
|
|
18180
18152
|
const success = await performUpgrade(packageManager);
|
|
18181
18153
|
if (success) {
|
|
18182
18154
|
console.log(
|
|
18183
|
-
chalk90.green(`\u2713 Upgraded from ${"9.64.
|
|
18155
|
+
chalk90.green(`\u2713 Upgraded from ${"9.64.2"} to ${latestVersion}`)
|
|
18184
18156
|
);
|
|
18185
18157
|
return;
|
|
18186
18158
|
}
|
|
@@ -18194,7 +18166,7 @@ var upgradeCommand = new Command99().name("upgrade").description("Upgrade vm0 CL
|
|
|
18194
18166
|
|
|
18195
18167
|
// src/index.ts
|
|
18196
18168
|
var program = new Command100();
|
|
18197
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.64.
|
|
18169
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.64.2");
|
|
18198
18170
|
program.addCommand(authCommand);
|
|
18199
18171
|
program.addCommand(infoCommand);
|
|
18200
18172
|
program.addCommand(composeCommand);
|