@alfe.ai/gateway 0.0.43 → 0.0.44

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/health.js +7 -3
  2. package/package.json +3 -3
package/dist/health.js CHANGED
@@ -3415,6 +3415,7 @@ enumValues({
3415
3415
  enumValues({
3416
3416
  Dev: "dev",
3417
3417
  Test: "test",
3418
+ Demo: "demo",
3418
3419
  Live: "live"
3419
3420
  });
3420
3421
  //#endregion
@@ -3686,9 +3687,12 @@ function deriveAgentId(apiKey) {
3686
3687
  * The cloud gateway runs on Fly.io — its URL follows a convention.
3687
3688
  */
3688
3689
  function deriveGatewayWsUrl(apiEndpoint) {
3689
- if (apiEndpoint.includes("dev.alfe.ai")) return process.env.ALFE_GATEWAY_WS_URL ?? "wss://gateway.dev.alfe.ai/ws";
3690
- if (apiEndpoint.includes("test.alfe.ai")) return process.env.ALFE_GATEWAY_WS_URL ?? "wss://gateway.test.alfe.ai/ws";
3691
- return process.env.ALFE_GATEWAY_WS_URL ?? "wss://gateway.alfe.ai/ws";
3690
+ if (process.env.ALFE_GATEWAY_WS_URL) return process.env.ALFE_GATEWAY_WS_URL;
3691
+ try {
3692
+ return `wss://${new URL(apiEndpoint).hostname.replace(/^api\./, "gateway.")}/ws`;
3693
+ } catch {
3694
+ return "wss://gateway.alfe.ai/ws";
3695
+ }
3692
3696
  }
3693
3697
  /**
3694
3698
  * Parse [runtimes.*] sections from config.toml.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/gateway",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "Alfe local gateway daemon — persistent control plane for agent integrations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,8 +22,8 @@
22
22
  "pino-roll": "^1.2.0",
23
23
  "smol-toml": ">=1.6.1",
24
24
  "ws": "^8.18.0",
25
- "@alfe.ai/ai-proxy-local": "^0.0.7",
26
- "@alfe.ai/config": "^0.0.7",
25
+ "@alfe.ai/ai-proxy-local": "^0.0.8",
26
+ "@alfe.ai/config": "^0.0.8",
27
27
  "@alfe.ai/integration-manifest": "^0.0.10",
28
28
  "@alfe.ai/integrations": "^0.0.28"
29
29
  },