@alfe.ai/gateway 0.0.30 → 0.0.31

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 +13 -3
  2. package/package.json +3 -3
package/dist/health.js CHANGED
@@ -20019,7 +20019,6 @@ function createLogger(component, additionalData) {
20019
20019
  const log$1 = createLogger("RuntimeProcess");
20020
20020
  const BACKOFF_INITIAL_MS = 1e3;
20021
20021
  const BACKOFF_MAX_MS = 3e4;
20022
- const STABLE_UPTIME_MS = 6e4;
20023
20022
  var RuntimeProcess = class {
20024
20023
  child = null;
20025
20024
  stopped = false;
@@ -20094,13 +20093,24 @@ var RuntimeProcess = class {
20094
20093
  }, "Runtime stopped (expected)");
20095
20094
  return;
20096
20095
  }
20096
+ if (code === 0 && signal == null) {
20097
+ log$1.info({
20098
+ runtime: this.options.runtime,
20099
+ code
20100
+ }, "Runtime exited gracefully — restarting");
20101
+ this.restartTimer = setTimeout(() => {
20102
+ this.restartTimer = null;
20103
+ this.start();
20104
+ }, 500);
20105
+ return;
20106
+ }
20097
20107
  log$1.warn({
20098
20108
  runtime: this.options.runtime,
20099
20109
  code,
20100
20110
  signal,
20101
20111
  backoffMs: this.backoffMs
20102
- }, "Runtime exited unexpectedly — scheduling restart");
20103
- if (Date.now() - this.lastStartTime >= STABLE_UPTIME_MS) this.backoffMs = BACKOFF_INITIAL_MS;
20112
+ }, "Runtime crashed — scheduling restart with backoff");
20113
+ if (Date.now() - this.lastStartTime >= 6e4) this.backoffMs = BACKOFF_INITIAL_MS;
20104
20114
  this.restartTimer = setTimeout(() => {
20105
20115
  this.restartTimer = null;
20106
20116
  this.start();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/gateway",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
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.5",
26
- "@alfe.ai/config": "^0.0.5",
25
+ "@alfe.ai/ai-proxy-local": "^0.0.6",
26
+ "@alfe.ai/config": "^0.0.6",
27
27
  "@alfe.ai/integration-manifest": "^0.0.8",
28
28
  "@alfe.ai/integrations": "^0.0.20"
29
29
  },