@vm0/cli 9.211.5 → 9.212.0

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 CHANGED
@@ -78,7 +78,7 @@ import {
78
78
  uo,
79
79
  volumeConfigSchema,
80
80
  withErrorHandler
81
- } from "./chunk-XLHYMFRS.js";
81
+ } from "./chunk-R6DK5A3B.js";
82
82
  import "./chunk-NR42YJMI.js";
83
83
  import {
84
84
  __toESM,
@@ -412,7 +412,7 @@ function getConfigPath() {
412
412
  return join(os.homedir(), ".vm0", "config.json");
413
413
  }
414
414
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
415
- console.log(source_default.bold(`VM0 CLI v${"9.211.5"}`));
415
+ console.log(source_default.bold(`VM0 CLI v${"9.212.0"}`));
416
416
  console.log();
417
417
  const config = await loadConfig();
418
418
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1114,7 +1114,7 @@ var composeCommand = new Command().name("compose").description("Create or update
1114
1114
  options.autoUpdate = false;
1115
1115
  }
1116
1116
  if (options.autoUpdate !== false) {
1117
- await startSilentUpgrade("9.211.5");
1117
+ await startSilentUpgrade("9.212.0");
1118
1118
  }
1119
1119
  try {
1120
1120
  const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
@@ -1211,7 +1211,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
1211
1211
  withErrorHandler(
1212
1212
  async (identifier, prompt, options) => {
1213
1213
  if (options.autoUpdate !== false) {
1214
- await startSilentUpgrade("9.211.5");
1214
+ await startSilentUpgrade("9.212.0");
1215
1215
  }
1216
1216
  const { name, version } = parseIdentifier(identifier);
1217
1217
  let composeId;
@@ -3070,13 +3070,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3070
3070
  if (latestVersion === null) {
3071
3071
  throw new Error("Could not check for updates. Please try again later.");
3072
3072
  }
3073
- if (latestVersion === "9.211.5") {
3074
- console.log(source_default.green(`\u2713 Already up to date (${"9.211.5"})`));
3073
+ if (latestVersion === "9.212.0") {
3074
+ console.log(source_default.green(`\u2713 Already up to date (${"9.212.0"})`));
3075
3075
  return;
3076
3076
  }
3077
3077
  console.log(
3078
3078
  source_default.yellow(
3079
- `Current version: ${"9.211.5"} -> Latest version: ${latestVersion}`
3079
+ `Current version: ${"9.212.0"} -> Latest version: ${latestVersion}`
3080
3080
  )
3081
3081
  );
3082
3082
  console.log();
@@ -3103,7 +3103,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3103
3103
  const success = await performUpgrade(packageManager);
3104
3104
  if (success) {
3105
3105
  console.log(
3106
- source_default.green(`\u2713 Upgraded from ${"9.211.5"} to ${latestVersion}`)
3106
+ source_default.green(`\u2713 Upgraded from ${"9.212.0"} to ${latestVersion}`)
3107
3107
  );
3108
3108
  return;
3109
3109
  }
@@ -3170,7 +3170,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
3170
3170
 
3171
3171
  // src/index.ts
3172
3172
  var program = new Command();
3173
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.211.5");
3173
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.212.0");
3174
3174
  program.addCommand(authCommand);
3175
3175
  program.addCommand(infoCommand);
3176
3176
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.211.5",
3
+ "version": "9.212.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -190,7 +190,7 @@ import {
190
190
  uploadWebFile,
191
191
  upsertZeroOrgModelProvider,
192
192
  withErrorHandler
193
- } from "./chunk-XLHYMFRS.js";
193
+ } from "./chunk-R6DK5A3B.js";
194
194
  import "./chunk-NR42YJMI.js";
195
195
  import {
196
196
  __toESM,
@@ -9336,7 +9336,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
9336
9336
  "baseUrlTemplates": [
9337
9337
  {
9338
9338
  "base": "${{ vars.ALTIUM365_WORKSPACE_URL }}",
9339
- "credentialed": true
9339
+ "credentialed": true,
9340
+ "hostPolicy": {
9341
+ "kind": "publicDestination"
9342
+ }
9340
9343
  }
9341
9344
  ],
9342
9345
  "secretPlaceholderNames": [
@@ -9535,7 +9538,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
9535
9538
  "baseUrlTemplates": [
9536
9539
  {
9537
9540
  "base": "${{ vars.BENTO_CLOUD_API_ENDPOINT }}",
9538
- "credentialed": true
9541
+ "credentialed": true,
9542
+ "hostPolicy": {
9543
+ "kind": "publicDestination"
9544
+ }
9539
9545
  }
9540
9546
  ],
9541
9547
  "secretPlaceholderNames": [
@@ -10427,7 +10433,13 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
10427
10433
  "baseUrlTemplates": [
10428
10434
  {
10429
10435
  "base": "https://${{ vars.GONG_API_BASE }}",
10430
- "credentialed": true
10436
+ "credentialed": true,
10437
+ "hostPolicy": {
10438
+ "kind": "providerOwned",
10439
+ "suffixes": [
10440
+ "gong.io"
10441
+ ]
10442
+ }
10431
10443
  }
10432
10444
  ],
10433
10445
  "secretPlaceholderNames": [
@@ -10776,7 +10788,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
10776
10788
  "baseUrlTemplates": [
10777
10789
  {
10778
10790
  "base": "https://${{ vars.INSFORGE_DOMAIN }}",
10779
- "credentialed": true
10791
+ "credentialed": true,
10792
+ "hostPolicy": {
10793
+ "kind": "publicDestination"
10794
+ }
10780
10795
  }
10781
10796
  ],
10782
10797
  "secretPlaceholderNames": [
@@ -10845,7 +10860,16 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
10845
10860
  "baseUrlTemplates": [
10846
10861
  {
10847
10862
  "base": "https://${{ vars.IRONCLAD_HOST }}",
10848
- "credentialed": true
10863
+ "credentialed": true,
10864
+ "hostPolicy": {
10865
+ "kind": "providerOwned",
10866
+ "exactHosts": [
10867
+ "ironcladapp.com",
10868
+ "na1.ironcladapp.com",
10869
+ "eu1.ironcladapp.com",
10870
+ "demo.ironcladapp.com"
10871
+ ]
10872
+ }
10849
10873
  }
10850
10874
  ],
10851
10875
  "secretPlaceholderNames": [
@@ -10876,7 +10900,13 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
10876
10900
  "baseUrlTemplates": [
10877
10901
  {
10878
10902
  "base": "https://${{ vars.JIRA_DOMAIN }}",
10879
- "credentialed": true
10903
+ "credentialed": true,
10904
+ "hostPolicy": {
10905
+ "kind": "providerOwned",
10906
+ "suffixes": [
10907
+ "atlassian.net"
10908
+ ]
10909
+ }
10880
10910
  }
10881
10911
  ],
10882
10912
  "secretPlaceholderNames": [
@@ -11190,7 +11220,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
11190
11220
  "baseUrlTemplates": [
11191
11221
  {
11192
11222
  "base": "${{ vars.METABASE_BASE_URL }}",
11193
- "credentialed": true
11223
+ "credentialed": true,
11224
+ "hostPolicy": {
11225
+ "kind": "publicDestination"
11226
+ }
11194
11227
  }
11195
11228
  ],
11196
11229
  "secretPlaceholderNames": [
@@ -11317,7 +11350,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
11317
11350
  "baseUrlTemplates": [
11318
11351
  {
11319
11352
  "base": "${{ vars.N8N_BASE_URL }}/api/v1",
11320
- "credentialed": true
11353
+ "credentialed": true,
11354
+ "hostPolicy": {
11355
+ "kind": "publicDestination"
11356
+ }
11321
11357
  }
11322
11358
  ],
11323
11359
  "secretPlaceholderNames": [
@@ -11734,7 +11770,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
11734
11770
  "baseUrlTemplates": [
11735
11771
  {
11736
11772
  "base": "${{ vars.QDRANT_BASE_URL }}",
11737
- "credentialed": true
11773
+ "credentialed": true,
11774
+ "hostPolicy": {
11775
+ "kind": "publicDestination"
11776
+ }
11738
11777
  }
11739
11778
  ],
11740
11779
  "secretPlaceholderNames": [
@@ -11810,7 +11849,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
11810
11849
  "baseUrlTemplates": [
11811
11850
  {
11812
11851
  "base": "${{ vars.REAP_API_BASE_URL }}",
11813
- "credentialed": true
11852
+ "credentialed": true,
11853
+ "hostPolicy": {
11854
+ "kind": "publicDestination"
11855
+ }
11814
11856
  }
11815
11857
  ],
11816
11858
  "secretPlaceholderNames": [
@@ -12243,7 +12285,10 @@ var FIREWALL_SERVER_EXECUTION_METADATA = {
12243
12285
  "baseUrlTemplates": [
12244
12286
  {
12245
12287
  "base": "${{ vars.STRAPI_BASE_URL }}",
12246
- "credentialed": true
12288
+ "credentialed": true,
12289
+ "hostPolicy": {
12290
+ "kind": "publicDestination"
12291
+ }
12247
12292
  }
12248
12293
  ],
12249
12294
  "secretPlaceholderNames": [
@@ -12773,24 +12818,29 @@ function hasRoutingPermissionRules(config) {
12773
12818
  return api.routes.length > 0;
12774
12819
  });
12775
12820
  }
12776
- function routingBaseIsCredentialed(type, base) {
12821
+ function routingBaseExecutionTemplate(type, base) {
12777
12822
  const executionMetadata = getFirewallExecutionMetadata(type);
12778
12823
  const template = executionMetadata?.baseUrlTemplates.find((entry) => {
12779
12824
  return entry.base === base;
12780
12825
  });
12781
- return template?.credentialed ?? true;
12826
+ return {
12827
+ credentialed: template?.credentialed ?? true,
12828
+ ...template?.hostPolicy !== void 0 ? { hostPolicy: template.hostPolicy } : {}
12829
+ };
12782
12830
  }
12783
12831
  function routingConfigFromMetadata(metadata, baseUrlVars, resolveBaseUrlVars) {
12784
12832
  return {
12785
12833
  type: metadata.type,
12786
12834
  label: metadata.label,
12787
12835
  apis: metadata.apis.map((api) => {
12836
+ const template = routingBaseExecutionTemplate(metadata.type, api.base);
12788
12837
  return {
12789
12838
  base: resolveBaseUrlVars ? resolveFirewallBaseUrlTemplate({
12790
12839
  serviceName: metadata.type,
12791
12840
  base: api.base,
12792
12841
  vars: baseUrlVars,
12793
- credentialed: routingBaseIsCredentialed(metadata.type, api.base)
12842
+ credentialed: template.credentialed,
12843
+ ...template.hostPolicy !== void 0 ? { hostPolicy: template.hostPolicy } : {}
12794
12844
  }) : api.base,
12795
12845
  routes: api.routes
12796
12846
  };
@@ -13516,16 +13566,26 @@ function resolveTriggerContext() {
13516
13566
  async function outputPermissionChangeMessage(connectorRef, label, permission, action, duration, agentId, triggerContext) {
13517
13567
  const platformOrigin = await getPlatformOrigin();
13518
13568
  if (triggerContext && agentId) {
13519
- const triggerUrl = `${platformOrigin}/agents/${agentId}/workflows/${triggerContext.workflowId}/triggers/${triggerContext.triggerId}/permissions?${new URLSearchParams(
13520
- { ref: connectorRef }
13521
- ).toString()}`;
13569
+ const workflowUrlParams = new URLSearchParams({
13570
+ tab: "authorization",
13571
+ ref: connectorRef,
13572
+ permission,
13573
+ action: action === "enable" ? "allow" : "deny"
13574
+ });
13575
+ if (action === "enable") {
13576
+ workflowUrlParams.set(
13577
+ "expiresIn",
13578
+ duration ?? DEFAULT_PERMISSION_GRANT_DURATION
13579
+ );
13580
+ }
13581
+ const workflowUrl = `${platformOrigin}/agents/${agentId}/workflows/${triggerContext.workflowId}?${workflowUrlParams.toString()}`;
13522
13582
  printSensitivePermissionGuidance(connectorRef, permission, action);
13523
13583
  printPermissionActionMessage({
13524
13584
  action,
13525
13585
  permission,
13526
13586
  label,
13527
- url: triggerUrl,
13528
- duration: void 0
13587
+ url: workflowUrl,
13588
+ duration: action === "enable" ? duration ?? DEFAULT_PERMISSION_GRANT_DURATION : void 0
13529
13589
  });
13530
13590
  return;
13531
13591
  }
@@ -22330,7 +22390,7 @@ function registerZeroCommands(prog, commands) {
22330
22390
  var program = new Command();
22331
22391
  program.name("zero").description(
22332
22392
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
22333
- ).version("9.211.5").addHelpText("after", () => {
22393
+ ).version("9.212.0").addHelpText("after", () => {
22334
22394
  return buildZeroHelpText();
22335
22395
  });
22336
22396
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {