@vm0/cli 9.177.12 → 9.177.13
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-6E4KIIR5.js → chunk-CGUELQJH.js} +2041 -697
- package/{chunk-6E4KIIR5.js.map → chunk-CGUELQJH.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +11 -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-CGUELQJH.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.177.
|
|
403
|
+
console.log(source_default.bold(`VM0 CLI v${"9.177.13"}`));
|
|
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.177.
|
|
4296
|
+
await startSilentUpgrade("9.177.13");
|
|
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.177.
|
|
4398
|
+
await startSilentUpgrade("9.177.13");
|
|
4399
4399
|
}
|
|
4400
4400
|
const { name, version } = parseIdentifier(identifier);
|
|
4401
4401
|
let composeId;
|
|
@@ -6192,13 +6192,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6192
6192
|
if (latestVersion === null) {
|
|
6193
6193
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6194
6194
|
}
|
|
6195
|
-
if (latestVersion === "9.177.
|
|
6196
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.177.
|
|
6195
|
+
if (latestVersion === "9.177.13") {
|
|
6196
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.177.13"})`));
|
|
6197
6197
|
return;
|
|
6198
6198
|
}
|
|
6199
6199
|
console.log(
|
|
6200
6200
|
source_default.yellow(
|
|
6201
|
-
`Current version: ${"9.177.
|
|
6201
|
+
`Current version: ${"9.177.13"} -> Latest version: ${latestVersion}`
|
|
6202
6202
|
)
|
|
6203
6203
|
);
|
|
6204
6204
|
console.log();
|
|
@@ -6225,7 +6225,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6225
6225
|
const success = await performUpgrade(packageManager);
|
|
6226
6226
|
if (success) {
|
|
6227
6227
|
console.log(
|
|
6228
|
-
source_default.green(`\u2713 Upgraded from ${"9.177.
|
|
6228
|
+
source_default.green(`\u2713 Upgraded from ${"9.177.13"} to ${latestVersion}`)
|
|
6229
6229
|
);
|
|
6230
6230
|
return;
|
|
6231
6231
|
}
|
|
@@ -6292,7 +6292,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6292
6292
|
|
|
6293
6293
|
// src/index.ts
|
|
6294
6294
|
var program = new Command();
|
|
6295
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.177.
|
|
6295
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.177.13");
|
|
6296
6296
|
program.addCommand(authCommand);
|
|
6297
6297
|
program.addCommand(infoCommand);
|
|
6298
6298
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -107,6 +107,7 @@ import {
|
|
|
107
107
|
listZeroSchedules,
|
|
108
108
|
listZeroSecrets,
|
|
109
109
|
listZeroVariables,
|
|
110
|
+
matchFirewallBaseUrl,
|
|
110
111
|
paginate,
|
|
111
112
|
parseEvent,
|
|
112
113
|
parseTime,
|
|
@@ -147,7 +148,7 @@ import {
|
|
|
147
148
|
upsertZeroOrgModelProvider,
|
|
148
149
|
withErrorHandler,
|
|
149
150
|
zeroAgentCustomSkillNameSchema
|
|
150
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-CGUELQJH.js";
|
|
151
152
|
import {
|
|
152
153
|
__toESM,
|
|
153
154
|
init_esm_shims
|
|
@@ -2556,16 +2557,15 @@ async function connectorTypeIsAvailable(type) {
|
|
|
2556
2557
|
}
|
|
2557
2558
|
function resolveConnectorFromUrl(url) {
|
|
2558
2559
|
const allTypes = CONNECTOR_TYPE_KEYS;
|
|
2559
|
-
const normalized = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
2560
2560
|
let bestMatch = null;
|
|
2561
2561
|
for (const type of allTypes) {
|
|
2562
2562
|
if (!isFirewallConnectorType(type)) continue;
|
|
2563
2563
|
const config = getConnectorFirewall(type);
|
|
2564
2564
|
for (const api of config.apis) {
|
|
2565
|
-
const
|
|
2566
|
-
if (
|
|
2567
|
-
if (!bestMatch ||
|
|
2568
|
-
bestMatch = { connectorType: type,
|
|
2565
|
+
const match = matchFirewallBaseUrl(url, api.base);
|
|
2566
|
+
if (match !== null) {
|
|
2567
|
+
if (!bestMatch || match.score > bestMatch.match.score) {
|
|
2568
|
+
bestMatch = { connectorType: type, match };
|
|
2569
2569
|
}
|
|
2570
2570
|
}
|
|
2571
2571
|
}
|
|
@@ -2576,12 +2576,11 @@ function resolveConnectorFromUrl(url) {
|
|
|
2576
2576
|
);
|
|
2577
2577
|
const envName = envBindingEntries[0]?.envName;
|
|
2578
2578
|
if (!envName) return null;
|
|
2579
|
-
const relativePath = normalized === bestMatch.base ? "/" : normalized.slice(bestMatch.base.length);
|
|
2580
2579
|
return {
|
|
2581
2580
|
connectorType: bestMatch.connectorType,
|
|
2582
2581
|
envName,
|
|
2583
|
-
matchedBase: bestMatch.
|
|
2584
|
-
relativePath
|
|
2582
|
+
matchedBase: bestMatch.match.displayBase,
|
|
2583
|
+
relativePath: bestMatch.match.relativePath
|
|
2585
2584
|
};
|
|
2586
2585
|
}
|
|
2587
2586
|
function checkEnvName(ctx) {
|
|
@@ -2790,7 +2789,8 @@ function resolvePermissionFromUrl(connectorType, label, method, relativePath, ma
|
|
|
2790
2789
|
const matchedPermissions = findMatchingPermissions(
|
|
2791
2790
|
method,
|
|
2792
2791
|
relativePath,
|
|
2793
|
-
config
|
|
2792
|
+
config,
|
|
2793
|
+
{ apiBase: matchedBase }
|
|
2794
2794
|
);
|
|
2795
2795
|
if (matchedPermissions.length === 0) {
|
|
2796
2796
|
console.log(
|
|
@@ -13229,7 +13229,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
13229
13229
|
var program = new Command();
|
|
13230
13230
|
program.name("zero").description(
|
|
13231
13231
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
13232
|
-
).version("9.177.
|
|
13232
|
+
).version("9.177.13").addHelpText("after", () => {
|
|
13233
13233
|
return buildZeroHelpText();
|
|
13234
13234
|
});
|
|
13235
13235
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|