@vm0/cli 9.82.0 → 9.82.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-RGS2GO4Q.js → chunk-2KN52BP2.js} +55 -24
- package/chunk-2KN52BP2.js.map +1 -0
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +9 -26
- package/zero.js.map +1 -1
- package/chunk-RGS2GO4Q.js.map +0 -1
package/index.js
CHANGED
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
storagesPrepareContract,
|
|
66
66
|
volumeConfigSchema,
|
|
67
67
|
withErrorHandler
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-2KN52BP2.js";
|
|
69
69
|
|
|
70
70
|
// src/index.ts
|
|
71
71
|
import { Command as Command44 } from "commander";
|
|
@@ -451,7 +451,7 @@ function getConfigPath() {
|
|
|
451
451
|
return join(homedir(), ".vm0", "config.json");
|
|
452
452
|
}
|
|
453
453
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
454
|
-
console.log(chalk3.bold(`VM0 CLI v${"9.82.
|
|
454
|
+
console.log(chalk3.bold(`VM0 CLI v${"9.82.1"}`));
|
|
455
455
|
console.log();
|
|
456
456
|
const config = await loadConfig();
|
|
457
457
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1677,7 +1677,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
1677
1677
|
options.autoUpdate = false;
|
|
1678
1678
|
}
|
|
1679
1679
|
if (options.autoUpdate !== false) {
|
|
1680
|
-
await startSilentUpgrade("9.82.
|
|
1680
|
+
await startSilentUpgrade("9.82.1");
|
|
1681
1681
|
}
|
|
1682
1682
|
try {
|
|
1683
1683
|
let result;
|
|
@@ -2512,7 +2512,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
2512
2512
|
withErrorHandler(
|
|
2513
2513
|
async (identifier, prompt, options) => {
|
|
2514
2514
|
if (options.autoUpdate !== false) {
|
|
2515
|
-
await startSilentUpgrade("9.82.
|
|
2515
|
+
await startSilentUpgrade("9.82.1");
|
|
2516
2516
|
}
|
|
2517
2517
|
const { org, name, version } = parseIdentifier(identifier);
|
|
2518
2518
|
let composeId;
|
|
@@ -4268,7 +4268,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
4268
4268
|
withErrorHandler(
|
|
4269
4269
|
async (prompt, options) => {
|
|
4270
4270
|
if (options.autoUpdate !== false) {
|
|
4271
|
-
const shouldExit = await checkAndUpgrade("9.82.
|
|
4271
|
+
const shouldExit = await checkAndUpgrade("9.82.1", prompt);
|
|
4272
4272
|
if (shouldExit) {
|
|
4273
4273
|
process.exit(0);
|
|
4274
4274
|
}
|
|
@@ -5434,13 +5434,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
5434
5434
|
if (latestVersion === null) {
|
|
5435
5435
|
throw new Error("Could not check for updates. Please try again later.");
|
|
5436
5436
|
}
|
|
5437
|
-
if (latestVersion === "9.82.
|
|
5438
|
-
console.log(chalk36.green(`\u2713 Already up to date (${"9.82.
|
|
5437
|
+
if (latestVersion === "9.82.1") {
|
|
5438
|
+
console.log(chalk36.green(`\u2713 Already up to date (${"9.82.1"})`));
|
|
5439
5439
|
return;
|
|
5440
5440
|
}
|
|
5441
5441
|
console.log(
|
|
5442
5442
|
chalk36.yellow(
|
|
5443
|
-
`Current version: ${"9.82.
|
|
5443
|
+
`Current version: ${"9.82.1"} -> Latest version: ${latestVersion}`
|
|
5444
5444
|
)
|
|
5445
5445
|
);
|
|
5446
5446
|
console.log();
|
|
@@ -5467,7 +5467,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
5467
5467
|
const success = await performUpgrade(packageManager);
|
|
5468
5468
|
if (success) {
|
|
5469
5469
|
console.log(
|
|
5470
|
-
chalk36.green(`\u2713 Upgraded from ${"9.82.
|
|
5470
|
+
chalk36.green(`\u2713 Upgraded from ${"9.82.1"} to ${latestVersion}`)
|
|
5471
5471
|
);
|
|
5472
5472
|
return;
|
|
5473
5473
|
}
|
|
@@ -5535,7 +5535,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
|
|
|
5535
5535
|
|
|
5536
5536
|
// src/index.ts
|
|
5537
5537
|
var program = new Command44();
|
|
5538
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.82.
|
|
5538
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.82.1");
|
|
5539
5539
|
program.addCommand(authCommand);
|
|
5540
5540
|
program.addCommand(infoCommand);
|
|
5541
5541
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
updateZeroUserPreferences,
|
|
81
81
|
upsertZeroOrgModelProvider,
|
|
82
82
|
withErrorHandler
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-2KN52BP2.js";
|
|
84
84
|
|
|
85
85
|
// src/zero.ts
|
|
86
86
|
import { Command as Command55 } from "commander";
|
|
@@ -1179,7 +1179,7 @@ var deleteCommand2 = new Command28().name("delete").alias("rm").description("Del
|
|
|
1179
1179
|
);
|
|
1180
1180
|
|
|
1181
1181
|
// src/commands/zero/agent/index.ts
|
|
1182
|
-
var
|
|
1182
|
+
var zeroAgentCommand = new Command29("agent").description("Manage zero agents").addCommand(createCommand).addCommand(editCommand).addCommand(viewCommand).addCommand(listCommand5).addCommand(deleteCommand2);
|
|
1183
1183
|
|
|
1184
1184
|
// src/commands/zero/connector/index.ts
|
|
1185
1185
|
import { Command as Command34 } from "commander";
|
|
@@ -1772,7 +1772,7 @@ var disconnectCommand = new Command33().name("disconnect").description("Disconne
|
|
|
1772
1772
|
);
|
|
1773
1773
|
|
|
1774
1774
|
// src/commands/zero/connector/index.ts
|
|
1775
|
-
var zeroConnectorCommand = new Command34().name("connector").description("Manage third-party service connections
|
|
1775
|
+
var zeroConnectorCommand = new Command34().name("connector").description("Manage third-party service connections").addCommand(listCommand6).addCommand(statusCommand2).addCommand(connectCommand).addCommand(disconnectCommand);
|
|
1776
1776
|
|
|
1777
1777
|
// src/commands/zero/preference/index.ts
|
|
1778
1778
|
import { Command as Command35 } from "commander";
|
|
@@ -2924,43 +2924,27 @@ var zeroWhoamiCommand = new Command54().name("whoami").description("Show current
|
|
|
2924
2924
|
var COMMAND_CAPABILITY_MAP = {
|
|
2925
2925
|
agent: "agent:read",
|
|
2926
2926
|
schedule: "schedule:read",
|
|
2927
|
+
slack: "slack:write",
|
|
2927
2928
|
whoami: null
|
|
2928
2929
|
};
|
|
2929
|
-
function decodeCapabilitiesFromZeroToken(token) {
|
|
2930
|
-
const prefix = "vm0_sandbox_";
|
|
2931
|
-
if (!token.startsWith(prefix)) return null;
|
|
2932
|
-
const jwt = token.slice(prefix.length);
|
|
2933
|
-
const parts = jwt.split(".");
|
|
2934
|
-
if (parts.length !== 3) return null;
|
|
2935
|
-
try {
|
|
2936
|
-
const payload = JSON.parse(
|
|
2937
|
-
Buffer.from(parts[1], "base64url").toString()
|
|
2938
|
-
);
|
|
2939
|
-
if (payload.scope === "zero" && Array.isArray(payload.capabilities)) {
|
|
2940
|
-
return payload.capabilities;
|
|
2941
|
-
}
|
|
2942
|
-
} catch {
|
|
2943
|
-
}
|
|
2944
|
-
return null;
|
|
2945
|
-
}
|
|
2946
2930
|
function applyCapabilityVisibility(prog) {
|
|
2947
2931
|
const token = process.env.ZERO_TOKEN;
|
|
2948
2932
|
if (!token) return;
|
|
2949
|
-
const
|
|
2950
|
-
if (!
|
|
2933
|
+
const payload = decodeZeroTokenPayload(token);
|
|
2934
|
+
if (!payload) return;
|
|
2951
2935
|
for (const cmd of prog.commands) {
|
|
2952
2936
|
const requiredCap = COMMAND_CAPABILITY_MAP[cmd.name()];
|
|
2953
2937
|
if (requiredCap === void 0) {
|
|
2954
2938
|
cmd._hidden = true;
|
|
2955
|
-
} else if (requiredCap !== null && !capabilities.includes(requiredCap)) {
|
|
2939
|
+
} else if (requiredCap !== null && !payload.capabilities.includes(requiredCap)) {
|
|
2956
2940
|
cmd._hidden = true;
|
|
2957
2941
|
}
|
|
2958
2942
|
}
|
|
2959
2943
|
}
|
|
2960
2944
|
var program = new Command55();
|
|
2961
|
-
program.name("zero").description("Zero CLI - Manage your zero platform").version("9.82.
|
|
2945
|
+
program.name("zero").description("Zero CLI - Manage your zero platform").version("9.82.1");
|
|
2962
2946
|
program.addCommand(zeroOrgCommand);
|
|
2963
|
-
program.addCommand(
|
|
2947
|
+
program.addCommand(zeroAgentCommand);
|
|
2964
2948
|
program.addCommand(zeroConnectorCommand);
|
|
2965
2949
|
program.addCommand(zeroPreferenceCommand);
|
|
2966
2950
|
program.addCommand(zeroScheduleCommand);
|
|
@@ -2983,7 +2967,6 @@ if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts")
|
|
|
2983
2967
|
}
|
|
2984
2968
|
export {
|
|
2985
2969
|
applyCapabilityVisibility,
|
|
2986
|
-
decodeCapabilitiesFromZeroToken,
|
|
2987
2970
|
program
|
|
2988
2971
|
};
|
|
2989
2972
|
//# sourceMappingURL=zero.js.map
|