vigthoria-cli 1.13.12 → 1.13.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.
@@ -57,8 +57,9 @@ export declare class LegionCommand {
57
57
  private confirmExecution;
58
58
  /**
59
59
  * SSE streaming URL for the Legion execution endpoint.
60
- * Always hits Hyper Loop directly (port 8020) with the service key to avoid
61
- * gateway JWT expiry killing long-running Cortex jobs.
60
+ * Server installs use the loopback service credential. User installations
61
+ * must use the authenticated Coder gateway; localhost:8020 on a customer's
62
+ * machine is not Vigthoria infrastructure.
62
63
  */
63
64
  private getLegionStreamUrl;
64
65
  private getLegionServiceKey;
@@ -1077,14 +1077,27 @@ export class LegionCommand {
1077
1077
  }
1078
1078
  /**
1079
1079
  * SSE streaming URL for the Legion execution endpoint.
1080
- * Always hits Hyper Loop directly (port 8020) with the service key to avoid
1081
- * gateway JWT expiry killing long-running Cortex jobs.
1080
+ * Server installs use the loopback service credential. User installations
1081
+ * must use the authenticated Coder gateway; localhost:8020 on a customer's
1082
+ * machine is not Vigthoria infrastructure.
1082
1083
  */
1083
1084
  getLegionStreamUrl() {
1084
- const envOverride = String(process.env.VIGTHORIA_HYPERLOOP_URL || '').trim().replace(/\/$/, '');
1085
+ const normalizeBase = (raw) => {
1086
+ let base = raw.trim().replace(/\/$/, '');
1087
+ base = base.replace(/\/api\/hyperloop\/(?:health|modules|execute)$/i, '/api/hyperloop');
1088
+ if (!/\/api\/hyperloop$/i.test(base)) {
1089
+ base += '/api/hyperloop';
1090
+ }
1091
+ return base;
1092
+ };
1093
+ const envOverride = String(process.env.VIGTHORIA_HYPERLOOP_URL || '').trim();
1085
1094
  if (envOverride)
1086
- return `${envOverride}/legion/stream`;
1087
- return 'http://localhost:8020/api/hyperloop/legion/stream';
1095
+ return `${normalizeBase(envOverride)}/legion/stream`;
1096
+ if (isServerRuntime()) {
1097
+ return 'http://localhost:8020/api/hyperloop/legion/stream';
1098
+ }
1099
+ const configuredApiUrl = String(this.config.get('apiUrl') || 'https://coder.vigthoria.io').trim();
1100
+ return `${normalizeBase(configuredApiUrl)}/legion/stream`;
1088
1101
  }
1089
1102
  getLegionServiceKey() {
1090
1103
  // Service key lets on-server CLI calls bypass gateway JWT validation
@@ -17,9 +17,9 @@ export function applyLocalTestfarmDefaults() {
17
17
  process.env.VIGTHORIA_ALLOW_LOCAL_SERVICES ??= '1';
18
18
  process.env.VIGTHORIA_ALLOW_LOCAL_V3_AGENT ??= '1';
19
19
  process.env.VIGTHORIA_SELF_HOSTED_MODELS_API_URL ??= 'http://127.0.0.1:4009';
20
- process.env.VIGTHORIA_HYPERLOOP_URL ??= 'http://127.0.0.1:8020';
21
- process.env.VIGTHORIA_HYPERLOOP_EXECUTE_URL ??= 'http://127.0.0.1:8020/execute';
22
- process.env.VIGTHORIA_HYPERLOOP_MODULES_URL ??= 'http://127.0.0.1:8020/modules';
20
+ process.env.VIGTHORIA_HYPERLOOP_URL ??= 'http://127.0.0.1:8020/api/hyperloop/health';
21
+ process.env.VIGTHORIA_HYPERLOOP_EXECUTE_URL ??= 'http://127.0.0.1:8020/api/hyperloop/execute';
22
+ process.env.VIGTHORIA_HYPERLOOP_MODULES_URL ??= 'http://127.0.0.1:8020/api/hyperloop/modules';
23
23
  process.env.VIGTHORIA_V3_AGENT_URL ??= 'http://127.0.0.1:8030';
24
24
  process.env.VIGTHORIA_TEMPLATE_SERVICE_URL ??= 'http://127.0.0.1:4011';
25
25
  process.env.VIGTHORIA_HYPERLOOP_TIMEOUT_MS ??= '180000';
package/install.ps1 CHANGED
@@ -5,7 +5,7 @@
5
5
  $ErrorActionPreference = "Stop"
6
6
 
7
7
  # Configuration
8
- $CLI_VERSION = "1.13.12"
8
+ $CLI_VERSION = "1.13.13"
9
9
  $INSTALL_DIR = "$env:USERPROFILE\.vigthoria"
10
10
  $NPM_PACKAGE = "vigthoria-cli"
11
11
  $GIT_PACKAGE_URL = "git+https://market.vigthoria.io/vigthoria/vigthoria-cli.git"
package/install.sh CHANGED
@@ -26,7 +26,7 @@ else
26
26
  fi
27
27
 
28
28
  # Configuration
29
- CLI_VERSION="1.13.12"
29
+ CLI_VERSION="1.13.13"
30
30
  INSTALL_DIR="$HOME/.vigthoria"
31
31
  REPO_URL="https://market.vigthoria.io/vigthoria/vigthoria-cli"
32
32
  GIT_PACKAGE_URL="git+https://market.vigthoria.io/vigthoria/vigthoria-cli.git"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigthoria-cli",
3
- "version": "1.13.12",
3
+ "version": "1.13.13",
4
4
  "description": "Vigthoria Coder CLI - AI-powered terminal coding assistant",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",