@alfe.ai/gateway 0.9.4 → 0.9.6

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.
@@ -1,9 +1,5 @@
1
1
  import pino from "pino";
2
2
 
3
- //#region src/logger.d.ts
4
-
5
- declare const logger: pino.Logger<never, boolean>;
6
- //#endregion
7
3
  //#region src/protocol.d.ts
8
4
 
9
5
  interface IPCRequest {
@@ -77,7 +73,7 @@ declare const PINNED_OPENCLAW_VERSION = "2026.6.11";
77
73
  * `PINNED_OPENCLAW_VERSION` — there is no `services/compute/Dockerfile` mirror to
78
74
  * keep in sync.
79
75
  */
80
- declare const PINNED_CLAUDE_CODE_HOST_VERSION = "0.1.3";
76
+ declare const PINNED_CLAUDE_CODE_HOST_VERSION = "0.1.6";
81
77
  //#endregion
82
78
  //#region src/sentry.d.ts
83
79
  /**
@@ -299,12 +295,6 @@ interface AgentIdentity {
299
295
  * Returns agentId (derived from tokenId) and orgId (tenantId).
300
296
  */
301
297
  declare function resolveAgentIdentity(apiKey: string, apiEndpoint: string): Promise<AgentIdentity>;
302
- /**
303
- * Whether the daemon is running in managed mode (ECS Fargate container).
304
- * In managed mode, configuration comes from environment variables instead
305
- * of ~/.alfe/config.toml, and IPC/PID features are disabled.
306
- */
307
-
308
298
  /**
309
299
  * Load full daemon configuration.
310
300
  * Reads config.toml, validates the API key, resolves agent identity,
@@ -366,6 +356,9 @@ declare function queryDaemonHealth(socketPath: string, timeoutMs?: number): Prom
366
356
  */
367
357
  declare function formatHealthReport(health: DaemonHealth): string;
368
358
  //#endregion
359
+ //#region src/logger.d.ts
360
+ declare const logger: pino.Logger<never, boolean>;
361
+ //#endregion
369
362
  //#region src/process-manager.d.ts
370
363
  /**
371
364
  * Install the service unit for the current platform.
package/dist/upgrade.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { n as logger } from "./logger.js";
2
2
  import { i as captureCliFailure } from "./sentry.js";
3
+ import { existsSync } from "node:fs";
3
4
  import { execFile } from "node:child_process";
4
5
  import { promisify } from "node:util";
5
- import { existsSync } from "node:fs";
6
6
  //#region src/verify-cli-install.ts
7
7
  /**
8
8
  * Verify a global `@alfe.ai/cli` install is intact.
@@ -244,7 +244,7 @@ async function sweepOrphanReifyTempDirs(scopeDir) {
244
244
  //#endregion
245
245
  //#region src/upgrade.ts
246
246
  /**
247
- * CLI upgrade — runs npm install inline then exits.
247
+ * CLI upgrade — runs npm install inline and exits only after verification.
248
248
  *
249
249
  * Systemd has Restart=always, so after the daemon exits the service
250
250
  * restarts automatically with the new CLI version. No detached scripts,
@@ -267,8 +267,10 @@ async function sweepOrphanReifyTempDirs(scopeDir) {
267
267
  */
268
268
  const execFileAsync = promisify(execFile);
269
269
  /**
270
- * Upgrade the CLI to a target version and exit — UNLESS the resulting install
271
- * is broken, in which case we stay up on the current version.
270
+ * Upgrade the CLI to a target version and exit — UNLESS npm fails or the
271
+ * resulting install is broken, in which case the already-loaded daemon stays
272
+ * alive. npm may have partially mutated its live global tree before returning
273
+ * an error, so an install failure is not proof that a restart is safe.
272
274
  *
273
275
  * Returns `Promise<never>` on the success path (it exits). On a verification
274
276
  * failure it returns normally so the caller (and the daemon) keep running.
@@ -293,8 +295,9 @@ async function upgradeAndExit(version) {
293
295
  logger.error({
294
296
  err: message,
295
297
  version
296
- }, "CLI upgrade failed");
297
- process.exit(0);
298
+ }, "CLI upgrade failed — keeping the loaded daemon alive");
299
+ captureCliFailure("upgrade.install_failed", err);
300
+ return;
298
301
  }
299
302
  const result = await verifyCliInstall(void 0, await resolveCliEntryPath(import.meta.url));
300
303
  if (!result.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/gateway",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
4
4
  "description": "Alfe local gateway daemon — persistent control plane for agent integrations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -23,12 +23,12 @@
23
23
  "pino-roll": "^1.2.0",
24
24
  "smol-toml": ">=1.6.1",
25
25
  "ws": "^8.18.0",
26
- "@alfe.ai/agent-api-client": "^0.13.0",
27
- "@alfe.ai/ai-proxy-local": "^0.0.13",
28
- "@alfe.ai/config": "^0.3.0",
29
- "@alfe.ai/integration-manifest": "^0.3.4",
30
- "@alfe.ai/integrations": "^0.6.0",
31
- "@alfe.ai/mcp-bundler": "^0.4.0"
26
+ "@alfe.ai/agent-api-client": "^0.15.0",
27
+ "@alfe.ai/ai-proxy-local": "^0.0.15",
28
+ "@alfe.ai/config": "^0.4.1",
29
+ "@alfe.ai/integration-manifest": "^0.3.5",
30
+ "@alfe.ai/integrations": "^0.6.1",
31
+ "@alfe.ai/mcp-bundler": "^0.4.1"
32
32
  },
33
33
  "license": "UNLICENSED",
34
34
  "homepage": "https://alfe.ai",