vigthoria-cli 1.6.50 → 1.6.51

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.
Files changed (2) hide show
  1. package/dist/utils/api.js +8 -11
  2. package/package.json +2 -2
package/dist/utils/api.js CHANGED
@@ -425,11 +425,12 @@ class APIClient {
425
425
  }
426
426
  getOperatorBaseUrls() {
427
427
  const configuredModelsApiUrl = String(this.config.get('modelsApiUrl') || 'https://api.vigthoria.io').replace(/\/$/, '');
428
+ const allowLocal = process.env.VIGTHORIA_ALLOW_LOCAL_SERVICES === '1';
428
429
  const urls = [
429
430
  process.env.VIGTHORIA_OPERATOR_URL,
430
431
  process.env.OPERATOR_URL,
431
- 'http://127.0.0.1:4009',
432
432
  configuredModelsApiUrl,
433
+ ...(allowLocal ? ['http://127.0.0.1:4009'] : []),
433
434
  ].filter(Boolean).map((url) => String(url).replace(/\/$/, ''));
434
435
  return [...new Set(urls)];
435
436
  }
@@ -438,39 +439,35 @@ class APIClient {
438
439
  }
439
440
  getMcpBaseUrls() {
440
441
  const configuredApiUrl = String(this.config.get('apiUrl') || 'https://coder.vigthoria.io').replace(/\/$/, '');
442
+ const allowLocal = process.env.VIGTHORIA_ALLOW_LOCAL_SERVICES === '1';
441
443
  const urls = [
442
444
  process.env.VIGTHORIA_MCP_URL,
443
445
  process.env.MCP_SERVER_URL,
444
- 'http://127.0.0.1:4008',
445
446
  configuredApiUrl,
447
+ ...(allowLocal ? ['http://127.0.0.1:4008'] : []),
446
448
  ].filter(Boolean).map((url) => String(url).replace(/\/$/, ''));
447
449
  return [...new Set(urls)];
448
450
  }
449
451
  getVigFlowBaseUrls() {
450
452
  const configuredApiUrl = String(this.config.get('apiUrl') || 'https://coder.vigthoria.io').replace(/\/$/, '');
451
- // Put the remote gateway first, since local VigFlow servers are
452
- // rarely running for end-user CLI installations. This avoids
453
- // wasting connection-attempt time on 127.0.0.1 and hitting the
454
- // remote gateway only after the local attempts have already
455
- // errored — which surfaces as a confusing "last error" 404 in
456
- // some setups.
453
+ const allowLocal = process.env.VIGTHORIA_ALLOW_LOCAL_SERVICES === '1';
457
454
  const urls = [
458
455
  process.env.VIGTHORIA_VIGFLOW_URL,
459
456
  process.env.VIGFLOW_URL,
460
457
  process.env.WORKFLOW_BUILDER_URL,
461
458
  `${configuredApiUrl}/api/vigflow`,
462
- 'http://127.0.0.1:5060',
463
- 'http://127.0.0.1:5050',
459
+ ...(allowLocal ? ['http://127.0.0.1:5060', 'http://127.0.0.1:5050'] : []),
464
460
  ].filter(Boolean).map((url) => String(url).replace(/\/$/, ''));
465
461
  return [...new Set(urls)];
466
462
  }
467
463
  getTemplateServiceBaseUrls() {
468
464
  const configuredApiUrl = String(this.config.get('apiUrl') || 'https://coder.vigthoria.io').replace(/\/$/, '');
465
+ const allowLocal = process.env.VIGTHORIA_ALLOW_LOCAL_SERVICES === '1';
469
466
  const urls = [
470
467
  process.env.VIGTHORIA_TEMPLATE_SERVICE_URL,
471
468
  process.env.TEMPLATE_SERVICE_URL,
472
- 'http://127.0.0.1:4011',
473
469
  `${configuredApiUrl}/api/template-service`,
470
+ ...(allowLocal ? ['http://127.0.0.1:4011'] : []),
474
471
  ].filter(Boolean).map((url) => String(url).replace(/\/$/, ''));
475
472
  return [...new Set(urls)];
476
473
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigthoria-cli",
3
- "version": "1.6.50",
3
+ "version": "1.6.51",
4
4
  "description": "Vigthoria Coder CLI - AI-powered terminal coding assistant",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -86,4 +86,4 @@
86
86
  "engines": {
87
87
  "node": ">=18.0.0"
88
88
  }
89
- }
89
+ }