@vm0/cli 9.176.1 → 9.176.3
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-TPUYVLNY.js → chunk-PK542UZ7.js} +4 -3
- package/{chunk-TPUYVLNY.js.map → chunk-PK542UZ7.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +16 -11
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
source_default,
|
|
68
68
|
volumeConfigSchema,
|
|
69
69
|
withErrorHandler
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-PK542UZ7.js";
|
|
71
71
|
import {
|
|
72
72
|
__toESM,
|
|
73
73
|
init_esm_shims
|
|
@@ -400,7 +400,7 @@ function getConfigPath() {
|
|
|
400
400
|
return join(os.homedir(), ".vm0", "config.json");
|
|
401
401
|
}
|
|
402
402
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
403
|
-
console.log(source_default.bold(`VM0 CLI v${"9.176.
|
|
403
|
+
console.log(source_default.bold(`VM0 CLI v${"9.176.3"}`));
|
|
404
404
|
console.log();
|
|
405
405
|
const config = await loadConfig();
|
|
406
406
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4293,7 +4293,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4293
4293
|
options.autoUpdate = false;
|
|
4294
4294
|
}
|
|
4295
4295
|
if (options.autoUpdate !== false) {
|
|
4296
|
-
await startSilentUpgrade("9.176.
|
|
4296
|
+
await startSilentUpgrade("9.176.3");
|
|
4297
4297
|
}
|
|
4298
4298
|
try {
|
|
4299
4299
|
let result;
|
|
@@ -4395,7 +4395,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4395
4395
|
withErrorHandler(
|
|
4396
4396
|
async (identifier, prompt, options) => {
|
|
4397
4397
|
if (options.autoUpdate !== false) {
|
|
4398
|
-
await startSilentUpgrade("9.176.
|
|
4398
|
+
await startSilentUpgrade("9.176.3");
|
|
4399
4399
|
}
|
|
4400
4400
|
const { name, version } = parseIdentifier(identifier);
|
|
4401
4401
|
let composeId;
|
|
@@ -6189,13 +6189,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6189
6189
|
if (latestVersion === null) {
|
|
6190
6190
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6191
6191
|
}
|
|
6192
|
-
if (latestVersion === "9.176.
|
|
6193
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.176.
|
|
6192
|
+
if (latestVersion === "9.176.3") {
|
|
6193
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.176.3"})`));
|
|
6194
6194
|
return;
|
|
6195
6195
|
}
|
|
6196
6196
|
console.log(
|
|
6197
6197
|
source_default.yellow(
|
|
6198
|
-
`Current version: ${"9.176.
|
|
6198
|
+
`Current version: ${"9.176.3"} -> Latest version: ${latestVersion}`
|
|
6199
6199
|
)
|
|
6200
6200
|
);
|
|
6201
6201
|
console.log();
|
|
@@ -6222,7 +6222,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6222
6222
|
const success = await performUpgrade(packageManager);
|
|
6223
6223
|
if (success) {
|
|
6224
6224
|
console.log(
|
|
6225
|
-
source_default.green(`\u2713 Upgraded from ${"9.176.
|
|
6225
|
+
source_default.green(`\u2713 Upgraded from ${"9.176.3"} to ${latestVersion}`)
|
|
6226
6226
|
);
|
|
6227
6227
|
return;
|
|
6228
6228
|
}
|
|
@@ -6289,7 +6289,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6289
6289
|
|
|
6290
6290
|
// src/index.ts
|
|
6291
6291
|
var program = new Command();
|
|
6292
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.176.
|
|
6292
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.176.3");
|
|
6293
6293
|
program.addCommand(authCommand);
|
|
6294
6294
|
program.addCommand(infoCommand);
|
|
6295
6295
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
withErrorHandler,
|
|
146
146
|
zeroAgentCustomSkillNameSchema,
|
|
147
147
|
zeroTokenAllowsFeatureSwitch
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-PK542UZ7.js";
|
|
149
149
|
import {
|
|
150
150
|
__toESM,
|
|
151
151
|
init_esm_shims
|
|
@@ -2450,16 +2450,21 @@ var zeroCreditCommand = new Command().name("credit").description("Create a Strip
|
|
|
2450
2450
|
const origin = await getPlatformOrigin();
|
|
2451
2451
|
const successUrl = `${origin}/?settings=usage&credit=success`;
|
|
2452
2452
|
const cancelUrl = `${origin}/?settings=usage&credit=canceled`;
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
}
|
|
2458
|
-
if (autoRecharge
|
|
2453
|
+
if (options.autoRecharge !== true && (options.autoRechargeThreshold !== void 0 || options.autoRechargeAmount !== void 0)) {
|
|
2454
|
+
throw new Error(
|
|
2455
|
+
"--auto-recharge-threshold and --auto-recharge-amount require --auto-recharge"
|
|
2456
|
+
);
|
|
2457
|
+
}
|
|
2458
|
+
if (options.autoRecharge === true && (options.autoRechargeThreshold === void 0 || options.autoRechargeAmount === void 0)) {
|
|
2459
2459
|
throw new Error(
|
|
2460
2460
|
"--auto-recharge requires --auto-recharge-threshold and --auto-recharge-amount"
|
|
2461
2461
|
);
|
|
2462
2462
|
}
|
|
2463
|
+
const autoRecharge = options.autoRecharge === true ? {
|
|
2464
|
+
enabled: true,
|
|
2465
|
+
threshold: options.autoRechargeThreshold,
|
|
2466
|
+
amount: options.autoRechargeAmount
|
|
2467
|
+
} : void 0;
|
|
2463
2468
|
const result = await createZeroCreditCheckout({
|
|
2464
2469
|
credits,
|
|
2465
2470
|
successUrl,
|
|
@@ -12948,7 +12953,7 @@ var COMMAND_CAPABILITY_MAP = {
|
|
|
12948
12953
|
run: "agent-run:write",
|
|
12949
12954
|
schedule: "schedule:read",
|
|
12950
12955
|
doctor: null,
|
|
12951
|
-
credit:
|
|
12956
|
+
credit: "billing:write",
|
|
12952
12957
|
model: null,
|
|
12953
12958
|
"model-provider": null,
|
|
12954
12959
|
logs: "agent-run:read",
|
|
@@ -13013,8 +13018,8 @@ function shouldHideCommand(name, payload) {
|
|
|
13013
13018
|
function buildZeroHelpText(payload = decodeZeroTokenPayload()) {
|
|
13014
13019
|
const examples = [
|
|
13015
13020
|
" Check a connector? zero doctor check-connector --env-name <ENV_NAME>",
|
|
13016
|
-
" Check credits? zero doctor credit",
|
|
13017
|
-
" Buy credits? zero credit 20000",
|
|
13021
|
+
...payload && !payload.capabilities.includes("billing:read") ? [] : [" Check credits? zero doctor credit"],
|
|
13022
|
+
...shouldHideCommand("credit", payload) ? [] : [" Buy credits? zero credit 20000"],
|
|
13018
13023
|
" Send a Slack message? zero slack message send --help",
|
|
13019
13024
|
" Upload GitHub? zero github upload-file --help",
|
|
13020
13025
|
" Download GitHub? zero github download-file --help",
|
|
@@ -13055,7 +13060,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
13055
13060
|
var program = new Command();
|
|
13056
13061
|
program.name("zero").description(
|
|
13057
13062
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
13058
|
-
).version("9.176.
|
|
13063
|
+
).version("9.176.3").addHelpText("after", () => {
|
|
13059
13064
|
return buildZeroHelpText();
|
|
13060
13065
|
});
|
|
13061
13066
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|