@vm0/cli 9.125.3 → 9.125.6
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-6QIJ6SUW.js → chunk-HJA75SSL.js} +366 -230
- package/{chunk-6QIJ6SUW.js.map → chunk-HJA75SSL.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +15 -9
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
source_default,
|
|
66
66
|
volumeConfigSchema,
|
|
67
67
|
withErrorHandler
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-HJA75SSL.js";
|
|
69
69
|
import {
|
|
70
70
|
__toESM,
|
|
71
71
|
init_esm_shims
|
|
@@ -398,7 +398,7 @@ function getConfigPath() {
|
|
|
398
398
|
return join(homedir(), ".vm0", "config.json");
|
|
399
399
|
}
|
|
400
400
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
401
|
-
console.log(source_default.bold(`VM0 CLI v${"9.125.
|
|
401
|
+
console.log(source_default.bold(`VM0 CLI v${"9.125.6"}`));
|
|
402
402
|
console.log();
|
|
403
403
|
const config = await loadConfig();
|
|
404
404
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4291,7 +4291,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4291
4291
|
options.autoUpdate = false;
|
|
4292
4292
|
}
|
|
4293
4293
|
if (options.autoUpdate !== false) {
|
|
4294
|
-
await startSilentUpgrade("9.125.
|
|
4294
|
+
await startSilentUpgrade("9.125.6");
|
|
4295
4295
|
}
|
|
4296
4296
|
try {
|
|
4297
4297
|
let result;
|
|
@@ -4381,7 +4381,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4381
4381
|
withErrorHandler(
|
|
4382
4382
|
async (identifier, prompt, options) => {
|
|
4383
4383
|
if (options.autoUpdate !== false) {
|
|
4384
|
-
await startSilentUpgrade("9.125.
|
|
4384
|
+
await startSilentUpgrade("9.125.6");
|
|
4385
4385
|
}
|
|
4386
4386
|
const { name, version } = parseIdentifier(identifier);
|
|
4387
4387
|
let composeId;
|
|
@@ -6393,13 +6393,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6393
6393
|
if (latestVersion === null) {
|
|
6394
6394
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6395
6395
|
}
|
|
6396
|
-
if (latestVersion === "9.125.
|
|
6397
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.125.
|
|
6396
|
+
if (latestVersion === "9.125.6") {
|
|
6397
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.125.6"})`));
|
|
6398
6398
|
return;
|
|
6399
6399
|
}
|
|
6400
6400
|
console.log(
|
|
6401
6401
|
source_default.yellow(
|
|
6402
|
-
`Current version: ${"9.125.
|
|
6402
|
+
`Current version: ${"9.125.6"} -> Latest version: ${latestVersion}`
|
|
6403
6403
|
)
|
|
6404
6404
|
);
|
|
6405
6405
|
console.log();
|
|
@@ -6426,7 +6426,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6426
6426
|
const success = await performUpgrade(packageManager);
|
|
6427
6427
|
if (success) {
|
|
6428
6428
|
console.log(
|
|
6429
|
-
source_default.green(`\u2713 Upgraded from ${"9.125.
|
|
6429
|
+
source_default.green(`\u2713 Upgraded from ${"9.125.6"} to ${latestVersion}`)
|
|
6430
6430
|
);
|
|
6431
6431
|
return;
|
|
6432
6432
|
}
|
|
@@ -6493,7 +6493,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6493
6493
|
|
|
6494
6494
|
// src/index.ts
|
|
6495
6495
|
var program = new Command();
|
|
6496
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.125.
|
|
6496
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.125.6");
|
|
6497
6497
|
program.addCommand(authCommand);
|
|
6498
6498
|
program.addCommand(infoCommand);
|
|
6499
6499
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
upsertZeroOrgModelProvider,
|
|
129
129
|
withErrorHandler,
|
|
130
130
|
zeroAgentCustomSkillNameSchema
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-HJA75SSL.js";
|
|
132
132
|
import {
|
|
133
133
|
__toESM,
|
|
134
134
|
init_esm_shims
|
|
@@ -2120,9 +2120,11 @@ async function checkConnectorStatus(ctx) {
|
|
|
2120
2120
|
);
|
|
2121
2121
|
console.log("");
|
|
2122
2122
|
if (!isConnected) {
|
|
2123
|
-
const connectUrl = ctx.agentId ? `${ctx.platformOrigin}/connectors/${ctx.connectorType}/connect?agentId=${ctx.agentId}` : `${ctx.platformOrigin}/connectors/${ctx.connectorType}/connect`;
|
|
2124
2123
|
console.log(`The ${ctx.label} connector is not connected.`);
|
|
2125
|
-
|
|
2124
|
+
if (!ctx.agentId) {
|
|
2125
|
+
const connectUrl = `${ctx.platformOrigin}/connectors/${ctx.connectorType}/connect`;
|
|
2126
|
+
console.log(`Connect it at: [Connect ${ctx.label}](${connectUrl})`);
|
|
2127
|
+
}
|
|
2126
2128
|
} else if (isExpired) {
|
|
2127
2129
|
const url = `${ctx.platformOrigin}/connectors`;
|
|
2128
2130
|
console.log(
|
|
@@ -2139,14 +2141,18 @@ async function checkConnectorStatus(ctx) {
|
|
|
2139
2141
|
console.log("");
|
|
2140
2142
|
if (!ctx.agentId) {
|
|
2141
2143
|
console.log("ZERO_AGENT_ID is not set \u2014 cannot check agent authorization.");
|
|
2142
|
-
} else if (
|
|
2144
|
+
} else if (isExpired) {
|
|
2145
|
+
console.log(
|
|
2146
|
+
`Skipped \u2014 agent authorization can only be checked once the ${ctx.label} connector is reconnected (see 2a).`
|
|
2147
|
+
);
|
|
2148
|
+
} else if (hasPermission) {
|
|
2149
|
+
console.log(`The ${ctx.label} connector is authorized for this agent.`);
|
|
2150
|
+
} else {
|
|
2143
2151
|
const url = `${ctx.platformOrigin}/connectors/${ctx.connectorType}/authorize?agentId=${ctx.agentId}`;
|
|
2144
2152
|
console.log(
|
|
2145
|
-
`The ${ctx.label} connector is not authorized for this agent (${ctx.agentId}).`
|
|
2153
|
+
isConnected ? `The ${ctx.label} connector is not authorized for this agent (${ctx.agentId}).` : `The ${ctx.label} connector needs to be connected and authorized for this agent (${ctx.agentId}).`
|
|
2146
2154
|
);
|
|
2147
2155
|
console.log(`Authorize it at: [Authorize ${ctx.label}](${url})`);
|
|
2148
|
-
} else {
|
|
2149
|
-
console.log(`The ${ctx.label} connector is authorized for this agent.`);
|
|
2150
2156
|
}
|
|
2151
2157
|
console.log("");
|
|
2152
2158
|
return { isConnected, isExpired, hasPermission };
|
|
@@ -2172,7 +2178,7 @@ async function checkConnectorDomains(ctx) {
|
|
|
2172
2178
|
}
|
|
2173
2179
|
function printConnectorDomains(ctx, runContext) {
|
|
2174
2180
|
const matchingEntry = runContext.firewalls.find((fw) => {
|
|
2175
|
-
return fw.
|
|
2181
|
+
return fw.name === ctx.connectorType;
|
|
2176
2182
|
});
|
|
2177
2183
|
if (!matchingEntry) {
|
|
2178
2184
|
console.log(
|
|
@@ -6603,7 +6609,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
6603
6609
|
var program = new Command();
|
|
6604
6610
|
program.name("zero").description(
|
|
6605
6611
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
6606
|
-
).version("9.125.
|
|
6612
|
+
).version("9.125.6").addHelpText(
|
|
6607
6613
|
"after",
|
|
6608
6614
|
`
|
|
6609
6615
|
Examples:
|