@vm0/cli 9.64.0 → 9.64.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 +24 -24
- 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.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.64.
|
|
67
|
+
version: "9.64.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.64.
|
|
678
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.64.1"}`));
|
|
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
|
});
|
|
@@ -8526,9 +8524,16 @@ async function getConnector(type2) {
|
|
|
8526
8524
|
async function getUsage(options) {
|
|
8527
8525
|
const baseUrl = await getBaseUrl();
|
|
8528
8526
|
const headers = await getHeaders();
|
|
8527
|
+
const activeOrg = await getActiveOrg();
|
|
8528
|
+
if (!activeOrg) {
|
|
8529
|
+
throw new Error(
|
|
8530
|
+
"No active organization configured. Run: vm0 org use <slug>"
|
|
8531
|
+
);
|
|
8532
|
+
}
|
|
8529
8533
|
const params = new URLSearchParams({
|
|
8530
8534
|
start_date: options.startDate,
|
|
8531
|
-
end_date: options.endDate
|
|
8535
|
+
end_date: options.endDate,
|
|
8536
|
+
org: activeOrg
|
|
8532
8537
|
});
|
|
8533
8538
|
const response = await fetch(`${baseUrl}/api/usage?${params}`, {
|
|
8534
8539
|
method: "GET",
|
|
@@ -9975,7 +9980,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9975
9980
|
options.autoUpdate = false;
|
|
9976
9981
|
}
|
|
9977
9982
|
if (options.autoUpdate !== false) {
|
|
9978
|
-
await startSilentUpgrade("9.64.
|
|
9983
|
+
await startSilentUpgrade("9.64.1");
|
|
9979
9984
|
}
|
|
9980
9985
|
try {
|
|
9981
9986
|
let result;
|
|
@@ -10797,7 +10802,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10797
10802
|
withErrorHandler(
|
|
10798
10803
|
async (identifier, prompt, options) => {
|
|
10799
10804
|
if (options.autoUpdate !== false) {
|
|
10800
|
-
await startSilentUpgrade("9.64.
|
|
10805
|
+
await startSilentUpgrade("9.64.1");
|
|
10801
10806
|
}
|
|
10802
10807
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10803
10808
|
let composeId;
|
|
@@ -12517,7 +12522,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12517
12522
|
withErrorHandler(
|
|
12518
12523
|
async (prompt, options) => {
|
|
12519
12524
|
if (options.autoUpdate !== false) {
|
|
12520
|
-
const shouldExit = await checkAndUpgrade("9.64.
|
|
12525
|
+
const shouldExit = await checkAndUpgrade("9.64.1", prompt);
|
|
12521
12526
|
if (shouldExit) {
|
|
12522
12527
|
process.exit(0);
|
|
12523
12528
|
}
|
|
@@ -13347,13 +13352,8 @@ var ApiClient = class {
|
|
|
13347
13352
|
});
|
|
13348
13353
|
}
|
|
13349
13354
|
async searchLogs(options) {
|
|
13350
|
-
const
|
|
13351
|
-
const
|
|
13352
|
-
const client = initClient15(logsSearchContract, {
|
|
13353
|
-
baseUrl,
|
|
13354
|
-
baseHeaders: headers,
|
|
13355
|
-
jsonQuery: false
|
|
13356
|
-
});
|
|
13355
|
+
const config = await getClientConfig();
|
|
13356
|
+
const client = initClient15(logsSearchContract, config);
|
|
13357
13357
|
const result = await client.searchLogs({
|
|
13358
13358
|
query: {
|
|
13359
13359
|
keyword: options.keyword,
|
|
@@ -13516,10 +13516,10 @@ function buildPlatformLogsUrl(apiUrl, runId) {
|
|
|
13516
13516
|
return `http://${hostname}:3001/logs/${runId}`;
|
|
13517
13517
|
}
|
|
13518
13518
|
const parts = hostname.split(".");
|
|
13519
|
-
if (parts[0] === "www") {
|
|
13520
|
-
parts[0] = "
|
|
13519
|
+
if (parts[0] === "www" || parts[0] === "app" || parts[0] === "platform") {
|
|
13520
|
+
parts[0] = "app";
|
|
13521
13521
|
} else {
|
|
13522
|
-
parts.unshift("
|
|
13522
|
+
parts.unshift("app");
|
|
13523
13523
|
}
|
|
13524
13524
|
const platformHost = parts.join(".");
|
|
13525
13525
|
const port = url.port ? `:${url.port}` : "";
|
|
@@ -18147,13 +18147,13 @@ var upgradeCommand = new Command99().name("upgrade").description("Upgrade vm0 CL
|
|
|
18147
18147
|
if (latestVersion === null) {
|
|
18148
18148
|
throw new Error("Could not check for updates. Please try again later.");
|
|
18149
18149
|
}
|
|
18150
|
-
if (latestVersion === "9.64.
|
|
18151
|
-
console.log(chalk90.green(`\u2713 Already up to date (${"9.64.
|
|
18150
|
+
if (latestVersion === "9.64.1") {
|
|
18151
|
+
console.log(chalk90.green(`\u2713 Already up to date (${"9.64.1"})`));
|
|
18152
18152
|
return;
|
|
18153
18153
|
}
|
|
18154
18154
|
console.log(
|
|
18155
18155
|
chalk90.yellow(
|
|
18156
|
-
`Current version: ${"9.64.
|
|
18156
|
+
`Current version: ${"9.64.1"} -> Latest version: ${latestVersion}`
|
|
18157
18157
|
)
|
|
18158
18158
|
);
|
|
18159
18159
|
console.log();
|
|
@@ -18180,7 +18180,7 @@ var upgradeCommand = new Command99().name("upgrade").description("Upgrade vm0 CL
|
|
|
18180
18180
|
const success = await performUpgrade(packageManager);
|
|
18181
18181
|
if (success) {
|
|
18182
18182
|
console.log(
|
|
18183
|
-
chalk90.green(`\u2713 Upgraded from ${"9.64.
|
|
18183
|
+
chalk90.green(`\u2713 Upgraded from ${"9.64.1"} to ${latestVersion}`)
|
|
18184
18184
|
);
|
|
18185
18185
|
return;
|
|
18186
18186
|
}
|
|
@@ -18194,7 +18194,7 @@ var upgradeCommand = new Command99().name("upgrade").description("Upgrade vm0 CL
|
|
|
18194
18194
|
|
|
18195
18195
|
// src/index.ts
|
|
18196
18196
|
var program = new Command100();
|
|
18197
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.64.
|
|
18197
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.64.1");
|
|
18198
18198
|
program.addCommand(authCommand);
|
|
18199
18199
|
program.addCommand(infoCommand);
|
|
18200
18200
|
program.addCommand(composeCommand);
|