@alfe.ai/gateway 0.0.14 → 0.0.15

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 -2
  2. package/package.json +2 -2
package/dist/health.js CHANGED
@@ -4,7 +4,7 @@ import { mkdir, readFile, unlink, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
5
5
  import { homedir } from "node:os";
6
6
  import pino from "pino";
7
- import { chmodSync, existsSync, unlinkSync } from "node:fs";
7
+ import { chmodSync, existsSync, readFileSync, unlinkSync } from "node:fs";
8
8
  import { getEndpointFromToken, readConfig } from "@alfe.ai/config";
9
9
  import crypto from "crypto";
10
10
  import { parse } from "smol-toml";
@@ -3436,7 +3436,12 @@ async function loadRuntimeConfigs() {
3436
3436
  * of ~/.alfe/config.toml, and IPC/PID features are disabled.
3437
3437
  */
3438
3438
  function isManagedMode() {
3439
- return process.env.ALFE_MANAGED === "true";
3439
+ if (process.env.ALFE_MANAGED === "true") return true;
3440
+ try {
3441
+ return parse(readFileSync(join(homedir(), ".alfe", "config.toml"), "utf-8")).managed === true;
3442
+ } catch {
3443
+ return false;
3444
+ }
3440
3445
  }
3441
3446
  /**
3442
3447
  * Load configuration for managed mode (ECS Fargate).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/gateway",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Alfe local gateway daemon — persistent control plane for agent integrations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
  "@alfe.ai/ai-proxy-local": "^0.0.4",
26
26
  "@alfe.ai/config": "^0.0.4",
27
27
  "@alfe.ai/doctor": "^0.0.4",
28
- "@alfe.ai/integrations": "^0.0.7"
28
+ "@alfe.ai/integrations": "^0.0.8"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/ws": "^8.5.13",