@alfe.ai/gateway 0.1.3 → 0.1.5

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.
package/dist/health.js CHANGED
@@ -58,6 +58,23 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
58
58
  }) : target, mod));
59
59
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
60
60
  //#endregion
61
+ //#region src/openclaw-version.ts
62
+ /**
63
+ * The OpenClaw runtime version Alfe pins managed agents to — the single source of
64
+ * truth for every install path:
65
+ * - `@alfe.ai/cli` `installRuntime` (fresh `alfe setup`)
66
+ * - the daemon `runtime.update` default (this package)
67
+ * - the managed Docker image (`services/compute/Dockerfile` — build args can't import
68
+ * TypeScript, so it hardcodes this same value; keep them in sync)
69
+ *
70
+ * Pinning (rather than floating `npm install -g openclaw` → `latest`) is deliberate:
71
+ * OpenClaw runs on every managed agent, so a `latest` that changes runtime semantics —
72
+ * e.g. 2026.6.8 made a non-empty `plugins.allow` an exclusive allowlist — becomes a
73
+ * silent fleet outage with no Alfe deploy. Bump deliberately after validating a new
74
+ * OpenClaw, then cut a CLI release so the pin travels with the CLI version.
75
+ */
76
+ const PINNED_OPENCLAW_VERSION = "2026.6.8";
77
+ //#endregion
61
78
  //#region ../../packages-internal/ids/dist/prefixes.js
62
79
  const ID_PREFIXES = {
63
80
  agent: "agt",
@@ -92,6 +109,8 @@ const ID_PREFIXES = {
92
109
  identityVerification: "ivf",
93
110
  role: "role",
94
111
  directGrant: "dgr",
112
+ revision: "rev",
113
+ fact: "kfc",
95
114
  oauthConnection: "con",
96
115
  channel: "chn",
97
116
  oauthConnectionRequest: "crq",
@@ -585,6 +604,19 @@ var IntegrationsService = class {
585
604
  });
586
605
  return this.client.request(`/integrations/scoped/${encodeURIComponent(integrationId)}?${params}`, { method: "DELETE" });
587
606
  }
607
+ /**
608
+ * Reinstall (re-apply latest) a scope-level install. Agent scope is rejected
609
+ * by the route — use {@link reinstallIntegration} for agent-scoped reinstall.
610
+ */
611
+ reinstallScoped(integrationId, scope, scopeId) {
612
+ return this.client.request(`/integrations/scoped/${encodeURIComponent(integrationId)}/reinstall`, {
613
+ method: "POST",
614
+ body: JSON.stringify({
615
+ scope,
616
+ scopeId
617
+ })
618
+ });
619
+ }
588
620
  listIntegrations(agentId, options) {
589
621
  const qs = options?.includeInherited ? "?includeInherited=true" : "";
590
622
  return this.client.request(`/integrations/agents/${agentId}${qs}`);
@@ -1262,6 +1294,7 @@ const string$1 = (params) => {
1262
1294
  };
1263
1295
  const integer = /^-?\d+$/;
1264
1296
  const number$1 = /^-?\d+(?:\.\d+)?$/;
1297
+ const boolean$1 = /^(?:true|false)$/i;
1265
1298
  const lowercase = /^[^A-Z]*$/;
1266
1299
  const uppercase = /^[^a-z]*$/;
1267
1300
  //#endregion
@@ -2036,6 +2069,24 @@ const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst,
2036
2069
  $ZodCheckNumberFormat.init(inst, def);
2037
2070
  $ZodNumber.init(inst, def);
2038
2071
  });
2072
+ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
2073
+ $ZodType.init(inst, def);
2074
+ inst._zod.pattern = boolean$1;
2075
+ inst._zod.parse = (payload, _ctx) => {
2076
+ if (def.coerce) try {
2077
+ payload.value = Boolean(payload.value);
2078
+ } catch (_) {}
2079
+ const input = payload.value;
2080
+ if (typeof input === "boolean") return payload;
2081
+ payload.issues.push({
2082
+ expected: "boolean",
2083
+ code: "invalid_type",
2084
+ input,
2085
+ inst
2086
+ });
2087
+ return payload;
2088
+ };
2089
+ });
2039
2090
  const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
2040
2091
  $ZodType.init(inst, def);
2041
2092
  inst._zod.parse = (payload) => payload;
@@ -3016,6 +3067,13 @@ function _int(Class, params) {
3016
3067
  });
3017
3068
  }
3018
3069
  /* @__NO_SIDE_EFFECTS__ */
3070
+ function _boolean(Class, params) {
3071
+ return new Class({
3072
+ type: "boolean",
3073
+ ...normalizeParams(params)
3074
+ });
3075
+ }
3076
+ /* @__NO_SIDE_EFFECTS__ */
3019
3077
  function _unknown(Class) {
3020
3078
  return new Class({ type: "unknown" });
3021
3079
  }
@@ -3558,6 +3616,9 @@ const numberProcessor = (schema, ctx, _json, _params) => {
3558
3616
  }
3559
3617
  if (typeof multipleOf === "number") json.multipleOf = multipleOf;
3560
3618
  };
3619
+ const booleanProcessor = (_schema, _ctx, json, _params) => {
3620
+ json.type = "boolean";
3621
+ };
3561
3622
  const neverProcessor = (_schema, _ctx, json, _params) => {
3562
3623
  json.not = {};
3563
3624
  };
@@ -4033,6 +4094,14 @@ const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, d
4033
4094
  function int(params) {
4034
4095
  return /* @__PURE__ */ _int(ZodNumberFormat, params);
4035
4096
  }
4097
+ const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
4098
+ $ZodBoolean.init(inst, def);
4099
+ ZodType.init(inst, def);
4100
+ inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
4101
+ });
4102
+ function boolean(params) {
4103
+ return /* @__PURE__ */ _boolean(ZodBoolean, params);
4104
+ }
4036
4105
  const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
4037
4106
  $ZodUnknown.init(inst, def);
4038
4107
  ZodType.init(inst, def);
@@ -4361,7 +4430,10 @@ enumValues({
4361
4430
  Month: "month",
4362
4431
  Year: "year"
4363
4432
  });
4364
- object({ gracePeriodDays: number().int().positive().optional() });
4433
+ object({
4434
+ gracePeriodDays: number().int().positive().optional(),
4435
+ launchDiscountEnabled: boolean().optional()
4436
+ });
4365
4437
  enumValues({
4366
4438
  ManagedHosting: "managed-hosting",
4367
4439
  PlatformTier: "platform-tier",
@@ -4369,10 +4441,13 @@ enumValues({
4369
4441
  Other: "other"
4370
4442
  });
4371
4443
  enumValues({
4372
- Free: "free",
4373
- Personal: "personal",
4374
- Tier1: "tier_1",
4375
- Tier2: "tier_2"
4444
+ IndividualLite: "individual_lite",
4445
+ IndividualNormal: "individual_normal",
4446
+ IndividualPro: "individual_pro",
4447
+ IndividualMax: "individual_max",
4448
+ OrgFree: "org_free",
4449
+ OrgProfessional: "org_professional",
4450
+ OrgEnterprise: "org_enterprise"
4376
4451
  });
4377
4452
  enumValues({
4378
4453
  Pending: "pending",
@@ -4437,6 +4512,7 @@ enumValues({
4437
4512
  });
4438
4513
  enumValues({
4439
4514
  Usage: "usage",
4515
+ SubscriptionUsage: "subscription_usage",
4440
4516
  TopUp: "top_up",
4441
4517
  SubscriptionCredit: "subscription_credit",
4442
4518
  AutoRecharge: "auto_recharge",
@@ -4534,6 +4610,8 @@ enumValues({
4534
4610
  //#endregion
4535
4611
  //#region ../../packages-internal/types/dist/models.js
4536
4612
  const AnthropicModel = {
4613
+ Opus48: "claude-opus-4-8",
4614
+ Opus47: "claude-opus-4-7",
4537
4615
  Opus: "claude-opus-4-6",
4538
4616
  Sonnet: "claude-sonnet-4-6",
4539
4617
  Haiku: "claude-haiku-4-5"
@@ -4564,6 +4642,9 @@ const DeepSeekModel = {
4564
4642
  };
4565
4643
  const DEEPSEEK_MODELS = enumValues(DeepSeekModel);
4566
4644
  const GoogleModel = {
4645
+ Gemini35Flash: "gemini-3.5-flash",
4646
+ Gemini31Pro: "gemini-3.1-pro-preview",
4647
+ Gemini31FlashLite: "gemini-3.1-flash-lite",
4567
4648
  Gemini25Pro: "gemini-2.5-pro",
4568
4649
  Gemini25Flash: "gemini-2.5-flash",
4569
4650
  Gemini25FlashLite: "gemini-2.5-flash-lite",
@@ -4571,6 +4652,7 @@ const GoogleModel = {
4571
4652
  };
4572
4653
  const GOOGLE_MODELS = enumValues(GoogleModel);
4573
4654
  const MiniMaxModel = {
4655
+ M3: "MiniMax-M3",
4574
4656
  M27: "MiniMax-M2.7",
4575
4657
  M27HighSpeed: "MiniMax-M2.7-highspeed",
4576
4658
  M25: "MiniMax-M2.5"
@@ -4583,16 +4665,18 @@ const MistralModel = {
4583
4665
  };
4584
4666
  const MISTRAL_MODELS = enumValues(MistralModel);
4585
4667
  const XAIModel = {
4668
+ Grok43: "grok-4.3",
4586
4669
  Grok4: "grok-4",
4587
4670
  Grok41Fast: "grok-4.1-fast"
4588
4671
  };
4589
4672
  const XAI_MODELS = enumValues(XAIModel);
4590
4673
  const ZhipuModel = {
4591
- GLM51: "glm-5-1",
4592
- GLM51Air: "glm-5-1-air"
4674
+ GLM52: "glm-5.2",
4675
+ GLM51: "glm-5.1",
4676
+ GLM51Air: "glm-5.1-air"
4593
4677
  };
4594
4678
  const ZHIPU_MODELS = enumValues(ZhipuModel);
4595
- AnthropicModel.Sonnet;
4679
+ AnthropicModel.Opus48;
4596
4680
  [
4597
4681
  ...ANTHROPIC_MODELS,
4598
4682
  ...OPENAI_MODELS,
@@ -4612,8 +4696,8 @@ _enum(MISTRAL_MODELS);
4612
4696
  _enum(XAI_MODELS);
4613
4697
  _enum(ZHIPU_MODELS);
4614
4698
  string().min(1);
4615
- AnthropicModel.Opus, AnthropicModel.Sonnet, AnthropicModel.Haiku, OpenAIModel.GPT4o, OpenAIModel.GPT4oMini, OpenAIModel.O3, OpenAIModel.GPT41, OpenAIModel.GPT41Mini, OpenAIModel.GPT41Nano, OpenAIModel.GPT54, OpenAIModel.GPT54Mini, OpenAIModel.GPT54Nano, OpenAIModel.GPT54Pro, OpenAIModel.GPT55, OpenAIModel.O3Mini, OpenAIModel.O4Mini, OpenAIModel.TextEmbedding3Small, DeepSeekModel.Chat, DeepSeekModel.Reasoner, DeepSeekModel.V4Flash, DeepSeekModel.V4Pro, GoogleModel.Gemini25Pro, GoogleModel.Gemini25Flash, GoogleModel.Gemini25FlashLite, GoogleModel.Gemini20Flash, MiniMaxModel.M27, MiniMaxModel.M27HighSpeed, MiniMaxModel.M25, MistralModel.Large, MistralModel.Small, MistralModel.Codestral, XAIModel.Grok4, XAIModel.Grok41Fast, ZhipuModel.GLM51, ZhipuModel.GLM51Air;
4616
- AnthropicModel.Opus, AnthropicModel.Sonnet, AnthropicModel.Haiku, OpenAIModel.GPT4o, OpenAIModel.GPT4oMini, OpenAIModel.O3, OpenAIModel.GPT41, OpenAIModel.GPT41Mini, OpenAIModel.GPT41Nano, OpenAIModel.GPT54, OpenAIModel.GPT54Mini, OpenAIModel.GPT54Nano, OpenAIModel.GPT54Pro, OpenAIModel.GPT55, OpenAIModel.O3Mini, OpenAIModel.O4Mini, OpenAIModel.TextEmbedding3Small, DeepSeekModel.Chat, DeepSeekModel.Reasoner, DeepSeekModel.V4Flash, DeepSeekModel.V4Pro, GoogleModel.Gemini25Pro, GoogleModel.Gemini25Flash, GoogleModel.Gemini25FlashLite, GoogleModel.Gemini20Flash, MiniMaxModel.M27, MiniMaxModel.M27HighSpeed, MiniMaxModel.M25, MistralModel.Large, MistralModel.Small, MistralModel.Codestral, XAIModel.Grok4, XAIModel.Grok41Fast, ZhipuModel.GLM51, ZhipuModel.GLM51Air;
4699
+ AnthropicModel.Opus48, AnthropicModel.Opus47, AnthropicModel.Opus, AnthropicModel.Sonnet, AnthropicModel.Haiku, OpenAIModel.GPT4o, OpenAIModel.GPT4oMini, OpenAIModel.O3, OpenAIModel.GPT41, OpenAIModel.GPT41Mini, OpenAIModel.GPT41Nano, OpenAIModel.GPT54, OpenAIModel.GPT54Mini, OpenAIModel.GPT54Nano, OpenAIModel.GPT54Pro, OpenAIModel.GPT55, OpenAIModel.O3Mini, OpenAIModel.O4Mini, OpenAIModel.TextEmbedding3Small, DeepSeekModel.Chat, DeepSeekModel.Reasoner, DeepSeekModel.V4Flash, DeepSeekModel.V4Pro, GoogleModel.Gemini35Flash, GoogleModel.Gemini31Pro, GoogleModel.Gemini31FlashLite, GoogleModel.Gemini25Pro, GoogleModel.Gemini25Flash, GoogleModel.Gemini25FlashLite, GoogleModel.Gemini20Flash, MiniMaxModel.M3, MiniMaxModel.M27, MiniMaxModel.M27HighSpeed, MiniMaxModel.M25, MistralModel.Large, MistralModel.Small, MistralModel.Codestral, XAIModel.Grok43, XAIModel.Grok4, XAIModel.Grok41Fast, ZhipuModel.GLM52, ZhipuModel.GLM51, ZhipuModel.GLM51Air;
4700
+ AnthropicModel.Opus48, AnthropicModel.Opus47, AnthropicModel.Opus, AnthropicModel.Sonnet, AnthropicModel.Haiku, OpenAIModel.GPT4o, OpenAIModel.GPT4oMini, OpenAIModel.O3, OpenAIModel.GPT41, OpenAIModel.GPT41Mini, OpenAIModel.GPT41Nano, OpenAIModel.GPT54, OpenAIModel.GPT54Mini, OpenAIModel.GPT54Nano, OpenAIModel.GPT54Pro, OpenAIModel.GPT55, OpenAIModel.O3Mini, OpenAIModel.O4Mini, OpenAIModel.TextEmbedding3Small, DeepSeekModel.Chat, DeepSeekModel.Reasoner, DeepSeekModel.V4Flash, DeepSeekModel.V4Pro, GoogleModel.Gemini35Flash, GoogleModel.Gemini31Pro, GoogleModel.Gemini31FlashLite, GoogleModel.Gemini25Pro, GoogleModel.Gemini25Flash, GoogleModel.Gemini25FlashLite, GoogleModel.Gemini20Flash, MiniMaxModel.M3, MiniMaxModel.M27, MiniMaxModel.M27HighSpeed, MiniMaxModel.M25, MistralModel.Large, MistralModel.Small, MistralModel.Codestral, XAIModel.Grok43, XAIModel.Grok4, XAIModel.Grok41Fast, ZhipuModel.GLM52, ZhipuModel.GLM51, ZhipuModel.GLM51Air;
4617
4701
  enumValues({
4618
4702
  PendingChallenge: "pending_challenge",
4619
4703
  Creating: "creating",
@@ -5131,7 +5215,18 @@ const PROTOCOL_VERSION = 1;
5131
5215
  //#endregion
5132
5216
  //#region src/reconciliation.ts
5133
5217
  const log$2 = logger$1.child({ component: "Reconciliation" });
5218
+ /**
5219
+ * How many times reconcile will re-attempt activation of an intact integration
5220
+ * stuck in `error` (with no reinstall requested) before giving up and waiting
5221
+ * for a manual reinstall. Each reconcile pass = one cloud DESIRED_STATE push,
5222
+ * so these attempts are spread across pushes, not a tight loop. This lets a
5223
+ * transient activation failure (e.g. an `openclaw config set` racing a runtime
5224
+ * hot-reload) self-heal without the user clicking Reinstall.
5225
+ */
5226
+ const MAX_ERROR_ACTIVATE_ATTEMPTS = 3;
5134
5227
  var ReconciliationEngine = class {
5228
+ /** Consecutive re-activation attempts for an intact error-state integration, keyed by id. */
5229
+ activateAttempts = /* @__PURE__ */ new Map();
5135
5230
  constructor(manager) {
5136
5231
  this.manager = manager;
5137
5232
  }
@@ -5195,6 +5290,7 @@ var ReconciliationEngine = class {
5195
5290
  if (desired.reinstallRequestedAt && local.installedAt && desired.reinstallRequestedAt > local.installedAt) {
5196
5291
  log$2.info(`Reinstalling ${id} from error state (requested: ${desired.reinstallRequestedAt}, installed: ${local.installedAt})`);
5197
5292
  this.manager.resetReinstallAttempts(id);
5293
+ this.activateAttempts.delete(id);
5198
5294
  if ((await this.manager.reinstall(id, desired.version, desired.config, desired.customSource)).configApplied) report.configApplied = true;
5199
5295
  report.installed.push(id);
5200
5296
  report.activated.push(id);
@@ -5226,6 +5322,7 @@ var ReconciliationEngine = class {
5226
5322
  try {
5227
5323
  if ((await this.manager.reinstall(id, desired.version, desired.config, desired.customSource)).configApplied) report.configApplied = true;
5228
5324
  this.manager.resetReinstallAttempts(id);
5325
+ this.activateAttempts.delete(id);
5229
5326
  report.installed.push(id);
5230
5327
  report.activated.push(id);
5231
5328
  report.results.push({
@@ -5249,7 +5346,37 @@ var ReconciliationEngine = class {
5249
5346
  }
5250
5347
  return;
5251
5348
  }
5252
- log$2.warn(`Integration ${id} is in error state — waiting for reinstall request`);
5349
+ const activateAttempts = this.activateAttempts.get(id) ?? 0;
5350
+ if (activateAttempts < MAX_ERROR_ACTIVATE_ATTEMPTS) {
5351
+ this.activateAttempts.set(id, activateAttempts + 1);
5352
+ log$2.info(`Re-activating ${id} from error state (attempt ${String(activateAttempts + 1)}/${String(MAX_ERROR_ACTIVATE_ATTEMPTS)})`);
5353
+ try {
5354
+ if ((await this.manager.activate(id)).configApplied) report.configApplied = true;
5355
+ this.activateAttempts.delete(id);
5356
+ report.activated.push(id);
5357
+ report.results.push({
5358
+ integrationId: id,
5359
+ action: "activated",
5360
+ actualStatus: "active"
5361
+ });
5362
+ return;
5363
+ } catch (reactivateErr) {
5364
+ const reactivateMsg = reactivateErr instanceof Error ? reactivateErr.message : String(reactivateErr);
5365
+ log$2.warn(`Re-activation of ${id} from error state failed (attempt ${String(activateAttempts + 1)}/${String(MAX_ERROR_ACTIVATE_ATTEMPTS)}): ${reactivateMsg}`);
5366
+ report.errors.push({
5367
+ integrationId: id,
5368
+ error: reactivateMsg
5369
+ });
5370
+ report.results.push({
5371
+ integrationId: id,
5372
+ action: "error",
5373
+ actualStatus: "error",
5374
+ errorMessage: reactivateMsg
5375
+ });
5376
+ return;
5377
+ }
5378
+ }
5379
+ log$2.warn(`Integration ${id} is in error state — re-activation exhausted, waiting for reinstall request`);
5253
5380
  report.errors.push({
5254
5381
  integrationId: id,
5255
5382
  error: "Integration is in error state"
@@ -5276,6 +5403,7 @@ var ReconciliationEngine = class {
5276
5403
  if (desired.reinstallRequestedAt && local.installedAt && desired.reinstallRequestedAt > local.installedAt) {
5277
5404
  log$2.info(`Reinstall requested for ${id} (requested: ${desired.reinstallRequestedAt}, installed: ${local.installedAt})`);
5278
5405
  this.manager.resetReinstallAttempts(id);
5406
+ this.activateAttempts.delete(id);
5279
5407
  if ((await this.manager.reinstall(id, desired.version, desired.config, desired.customSource)).configApplied) report.configApplied = true;
5280
5408
  report.installed.push(id);
5281
5409
  report.activated.push(id);
@@ -5286,6 +5414,7 @@ var ReconciliationEngine = class {
5286
5414
  });
5287
5415
  return;
5288
5416
  }
5417
+ this.activateAttempts.delete(id);
5289
5418
  report.results.push({
5290
5419
  integrationId: id,
5291
5420
  action: "up_to_date",
@@ -22520,6 +22649,18 @@ async function handleCloudCommand(command) {
22520
22649
  }
22521
22650
  };
22522
22651
  }
22652
+ if (command.command === "daemon.restart") {
22653
+ logger$1.info("Restart requested — exiting for systemd restart");
22654
+ setTimeout(() => {
22655
+ process.exit(0);
22656
+ }, 500);
22657
+ return {
22658
+ type: "COMMAND_ACK",
22659
+ commandId: command.commandId,
22660
+ status: "ok",
22661
+ result: { restarting: true }
22662
+ };
22663
+ }
22523
22664
  if (command.command === "runtime.update") {
22524
22665
  if (upgradingRuntime) return {
22525
22666
  type: "COMMAND_ACK",
@@ -22530,7 +22671,7 @@ async function handleCloudCommand(command) {
22530
22671
  message: "Runtime upgrade already in progress"
22531
22672
  }
22532
22673
  };
22533
- const version = command.payload?.version ?? "latest";
22674
+ const version = command.payload?.version ?? "2026.6.8";
22534
22675
  upgradingRuntime = true;
22535
22676
  setTimeout(() => {
22536
22677
  (async () => {
@@ -23147,4 +23288,4 @@ function formatDuration(ms) {
23147
23288
  return `${String(Math.round(seconds / 3600))}h`;
23148
23289
  }
23149
23290
  //#endregion
23150
- export { installService as a, uninstallService as c, PID_PATH as d, SOCKET_PATH as f, resolveAgentIdentity as h, checkExistingDaemon as i, PROTOCOL_VERSION as l, loadDaemonConfig as m, queryDaemonHealth as n, startService as o, fetchAgentConfig as p, startDaemon as r, stopExistingDaemon as s, formatHealthReport as t, ALFE_DIR as u };
23291
+ export { installService as a, uninstallService as c, PID_PATH as d, SOCKET_PATH as f, PINNED_OPENCLAW_VERSION as g, resolveAgentIdentity as h, checkExistingDaemon as i, PROTOCOL_VERSION as l, loadDaemonConfig as m, queryDaemonHealth as n, startService as o, fetchAgentConfig as p, startDaemon as r, stopExistingDaemon as s, formatHealthReport as t, ALFE_DIR as u };
@@ -29,6 +29,23 @@ declare const PROTOCOL_VERSION = 1;
29
29
 
30
30
  declare function startDaemon(): Promise<void>;
31
31
  //#endregion
32
+ //#region src/openclaw-version.d.ts
33
+ /**
34
+ * The OpenClaw runtime version Alfe pins managed agents to — the single source of
35
+ * truth for every install path:
36
+ * - `@alfe.ai/cli` `installRuntime` (fresh `alfe setup`)
37
+ * - the daemon `runtime.update` default (this package)
38
+ * - the managed Docker image (`services/compute/Dockerfile` — build args can't import
39
+ * TypeScript, so it hardcodes this same value; keep them in sync)
40
+ *
41
+ * Pinning (rather than floating `npm install -g openclaw` → `latest`) is deliberate:
42
+ * OpenClaw runs on every managed agent, so a `latest` that changes runtime semantics —
43
+ * e.g. 2026.6.8 made a non-empty `plugins.allow` an exclusive allowlist — becomes a
44
+ * silent fleet outage with no Alfe deploy. Bump deliberately after validating a new
45
+ * OpenClaw, then cut a CLI release so the pin travels with the CLI version.
46
+ */
47
+ declare const PINNED_OPENCLAW_VERSION = "2026.6.8";
48
+ //#endregion
32
49
  //#region src/config.d.ts
33
50
  /**
34
51
  * Daemon configuration — reads ~/.alfe/config.toml and resolves agent identity.
@@ -189,4 +206,4 @@ declare function checkExistingDaemon(): Promise<number | null>;
189
206
  */
190
207
  declare function stopExistingDaemon(): Promise<boolean>;
191
208
  //#endregion
192
- export { ALFE_DIR, type AgentIdentity, type AgentWorkspaceConfig, type DaemonConfig, type DaemonHealth, type IPCEvent, type IPCRequest, type IPCResponse, PID_PATH, PROTOCOL_VERSION, SOCKET_PATH, checkExistingDaemon, fetchAgentConfig, formatHealthReport, installService, loadDaemonConfig, logger, queryDaemonHealth, resolveAgentIdentity, startDaemon, startService, stopExistingDaemon, uninstallService };
209
+ export { ALFE_DIR, type AgentIdentity, type AgentWorkspaceConfig, type DaemonConfig, type DaemonHealth, type IPCEvent, type IPCRequest, type IPCResponse, PID_PATH, PINNED_OPENCLAW_VERSION, PROTOCOL_VERSION, SOCKET_PATH, checkExistingDaemon, fetchAgentConfig, formatHealthReport, installService, loadDaemonConfig, logger, queryDaemonHealth, resolveAgentIdentity, startDaemon, startService, stopExistingDaemon, uninstallService };
package/dist/src/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as installService, c as uninstallService, d as PID_PATH, f as SOCKET_PATH, h as resolveAgentIdentity, i as checkExistingDaemon, l as PROTOCOL_VERSION, m as loadDaemonConfig, n as queryDaemonHealth, o as startService, p as fetchAgentConfig, r as startDaemon, s as stopExistingDaemon, t as formatHealthReport, u as ALFE_DIR } from "../health.js";
1
+ import { a as installService, c as uninstallService, d as PID_PATH, f as SOCKET_PATH, g as PINNED_OPENCLAW_VERSION, h as resolveAgentIdentity, i as checkExistingDaemon, l as PROTOCOL_VERSION, m as loadDaemonConfig, n as queryDaemonHealth, o as startService, p as fetchAgentConfig, r as startDaemon, s as stopExistingDaemon, t as formatHealthReport, u as ALFE_DIR } from "../health.js";
2
2
  import { n as logger } from "../logger.js";
3
- export { ALFE_DIR, PID_PATH, PROTOCOL_VERSION, SOCKET_PATH, checkExistingDaemon, fetchAgentConfig, formatHealthReport, installService, loadDaemonConfig, logger, queryDaemonHealth, resolveAgentIdentity, startDaemon, startService, stopExistingDaemon, uninstallService };
3
+ export { ALFE_DIR, PID_PATH, PINNED_OPENCLAW_VERSION, PROTOCOL_VERSION, SOCKET_PATH, checkExistingDaemon, fetchAgentConfig, formatHealthReport, installService, loadDaemonConfig, logger, queryDaemonHealth, resolveAgentIdentity, startDaemon, startService, stopExistingDaemon, uninstallService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/gateway",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Alfe local gateway daemon — persistent control plane for agent integrations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,12 +22,12 @@
22
22
  "pino-roll": "^1.2.0",
23
23
  "smol-toml": ">=1.6.1",
24
24
  "ws": "^8.18.0",
25
- "@alfe.ai/agent-api-client": "^0.2.2",
25
+ "@alfe.ai/agent-api-client": "^0.2.3",
26
26
  "@alfe.ai/ai-proxy-local": "^0.0.10",
27
27
  "@alfe.ai/config": "^0.0.9",
28
28
  "@alfe.ai/integration-manifest": "^0.2.1",
29
- "@alfe.ai/integrations": "^0.1.3",
30
- "@alfe.ai/mcp-bundler": "^0.2.0"
29
+ "@alfe.ai/integrations": "^0.1.6",
30
+ "@alfe.ai/mcp-bundler": "^0.2.1"
31
31
  },
32
32
  "license": "UNLICENSED",
33
33
  "scripts": {