@alfe.ai/gateway 0.1.3 → 0.1.4

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",
@@ -585,6 +602,19 @@ var IntegrationsService = class {
585
602
  });
586
603
  return this.client.request(`/integrations/scoped/${encodeURIComponent(integrationId)}?${params}`, { method: "DELETE" });
587
604
  }
605
+ /**
606
+ * Reinstall (re-apply latest) a scope-level install. Agent scope is rejected
607
+ * by the route — use {@link reinstallIntegration} for agent-scoped reinstall.
608
+ */
609
+ reinstallScoped(integrationId, scope, scopeId) {
610
+ return this.client.request(`/integrations/scoped/${encodeURIComponent(integrationId)}/reinstall`, {
611
+ method: "POST",
612
+ body: JSON.stringify({
613
+ scope,
614
+ scopeId
615
+ })
616
+ });
617
+ }
588
618
  listIntegrations(agentId, options) {
589
619
  const qs = options?.includeInherited ? "?includeInherited=true" : "";
590
620
  return this.client.request(`/integrations/agents/${agentId}${qs}`);
@@ -4371,6 +4401,8 @@ enumValues({
4371
4401
  enumValues({
4372
4402
  Free: "free",
4373
4403
  Personal: "personal",
4404
+ PersonalPlus: "personal_plus",
4405
+ PersonalPro: "personal_pro",
4374
4406
  Tier1: "tier_1",
4375
4407
  Tier2: "tier_2"
4376
4408
  });
@@ -4437,6 +4469,7 @@ enumValues({
4437
4469
  });
4438
4470
  enumValues({
4439
4471
  Usage: "usage",
4472
+ SubscriptionUsage: "subscription_usage",
4440
4473
  TopUp: "top_up",
4441
4474
  SubscriptionCredit: "subscription_credit",
4442
4475
  AutoRecharge: "auto_recharge",
@@ -4534,6 +4567,8 @@ enumValues({
4534
4567
  //#endregion
4535
4568
  //#region ../../packages-internal/types/dist/models.js
4536
4569
  const AnthropicModel = {
4570
+ Opus48: "claude-opus-4-8",
4571
+ Opus47: "claude-opus-4-7",
4537
4572
  Opus: "claude-opus-4-6",
4538
4573
  Sonnet: "claude-sonnet-4-6",
4539
4574
  Haiku: "claude-haiku-4-5"
@@ -4564,6 +4599,9 @@ const DeepSeekModel = {
4564
4599
  };
4565
4600
  const DEEPSEEK_MODELS = enumValues(DeepSeekModel);
4566
4601
  const GoogleModel = {
4602
+ Gemini35Flash: "gemini-3.5-flash",
4603
+ Gemini31Pro: "gemini-3.1-pro-preview",
4604
+ Gemini31FlashLite: "gemini-3.1-flash-lite",
4567
4605
  Gemini25Pro: "gemini-2.5-pro",
4568
4606
  Gemini25Flash: "gemini-2.5-flash",
4569
4607
  Gemini25FlashLite: "gemini-2.5-flash-lite",
@@ -4571,6 +4609,7 @@ const GoogleModel = {
4571
4609
  };
4572
4610
  const GOOGLE_MODELS = enumValues(GoogleModel);
4573
4611
  const MiniMaxModel = {
4612
+ M3: "MiniMax-M3",
4574
4613
  M27: "MiniMax-M2.7",
4575
4614
  M27HighSpeed: "MiniMax-M2.7-highspeed",
4576
4615
  M25: "MiniMax-M2.5"
@@ -4583,16 +4622,18 @@ const MistralModel = {
4583
4622
  };
4584
4623
  const MISTRAL_MODELS = enumValues(MistralModel);
4585
4624
  const XAIModel = {
4625
+ Grok43: "grok-4.3",
4586
4626
  Grok4: "grok-4",
4587
4627
  Grok41Fast: "grok-4.1-fast"
4588
4628
  };
4589
4629
  const XAI_MODELS = enumValues(XAIModel);
4590
4630
  const ZhipuModel = {
4591
- GLM51: "glm-5-1",
4592
- GLM51Air: "glm-5-1-air"
4631
+ GLM52: "glm-5.2",
4632
+ GLM51: "glm-5.1",
4633
+ GLM51Air: "glm-5.1-air"
4593
4634
  };
4594
4635
  const ZHIPU_MODELS = enumValues(ZhipuModel);
4595
- AnthropicModel.Sonnet;
4636
+ AnthropicModel.Opus48;
4596
4637
  [
4597
4638
  ...ANTHROPIC_MODELS,
4598
4639
  ...OPENAI_MODELS,
@@ -4612,8 +4653,8 @@ _enum(MISTRAL_MODELS);
4612
4653
  _enum(XAI_MODELS);
4613
4654
  _enum(ZHIPU_MODELS);
4614
4655
  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;
4656
+ 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;
4657
+ 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
4658
  enumValues({
4618
4659
  PendingChallenge: "pending_challenge",
4619
4660
  Creating: "creating",
@@ -22520,6 +22561,18 @@ async function handleCloudCommand(command) {
22520
22561
  }
22521
22562
  };
22522
22563
  }
22564
+ if (command.command === "daemon.restart") {
22565
+ logger$1.info("Restart requested — exiting for systemd restart");
22566
+ setTimeout(() => {
22567
+ process.exit(0);
22568
+ }, 500);
22569
+ return {
22570
+ type: "COMMAND_ACK",
22571
+ commandId: command.commandId,
22572
+ status: "ok",
22573
+ result: { restarting: true }
22574
+ };
22575
+ }
22523
22576
  if (command.command === "runtime.update") {
22524
22577
  if (upgradingRuntime) return {
22525
22578
  type: "COMMAND_ACK",
@@ -22530,7 +22583,7 @@ async function handleCloudCommand(command) {
22530
22583
  message: "Runtime upgrade already in progress"
22531
22584
  }
22532
22585
  };
22533
- const version = command.payload?.version ?? "latest";
22586
+ const version = command.payload?.version ?? "2026.6.8";
22534
22587
  upgradingRuntime = true;
22535
22588
  setTimeout(() => {
22536
22589
  (async () => {
@@ -23147,4 +23200,4 @@ function formatDuration(ms) {
23147
23200
  return `${String(Math.round(seconds / 3600))}h`;
23148
23201
  }
23149
23202
  //#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 };
23203
+ 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.4",
4
4
  "description": "Alfe local gateway daemon — persistent control plane for agent integrations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,8 +26,8 @@
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.5",
30
+ "@alfe.ai/mcp-bundler": "^0.2.1"
31
31
  },
32
32
  "license": "UNLICENSED",
33
33
  "scripts": {