@alfe.ai/gateway 0.10.1 → 0.10.2
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 +19 -4
- package/dist/node-remediation.js +1 -1
- package/dist/runtime-process.js +11 -1
- package/dist/runtime-upgrade.js +1 -5
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +1 -1
- package/package.json +2 -2
package/dist/health.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ErrorLineDetector, c as createLogger,
|
|
1
|
+
import { a as ErrorLineDetector, c as createLogger, f as parseOpenClawVersion, h as __require, i as CaptureThrottle, m as __commonJSMin, o as STRICT_ERROR_CAPTURE_PROFILE, r as RuntimeProcess, s as toFingerprintKey, t as DRAIN_GRACE_MS } from "./runtime-process.js";
|
|
2
2
|
import { a as captureFatal, d as flushSentry, f as initAgentSentry, h as logger, o as captureIntegrationFailure, p as setAgentContext, s as captureMcpFailure } from "./sentry.js";
|
|
3
3
|
import { chmod, mkdir, readFile, rename, stat, unlink, writeFile } from "node:fs/promises";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
@@ -8040,9 +8040,24 @@ function resolveRuntimeVersionCommand(runtime) {
|
|
|
8040
8040
|
return RUNTIME_VERSION_COMMANDS[runtime];
|
|
8041
8041
|
}
|
|
8042
8042
|
/**
|
|
8043
|
+
* Reduce a runtime's `--version` output to the bare version the control plane
|
|
8044
|
+
* compares against catalog versions. Every OpenClaw release prints a branded
|
|
8045
|
+
* line (`OpenClaw 2026.9.5 (ec9c1a1)`); reporting that verbatim hid every
|
|
8046
|
+
* dashboard upgrade affordance for the agents that most needed one. The agents
|
|
8047
|
+
* service also normalises at ingest (it reaches hosts on older daemons); this
|
|
8048
|
+
* is the producer-side half. Falls back to the trimmed output when no version
|
|
8049
|
+
* token is found so an unexpected format is still visible rather than blank.
|
|
8050
|
+
*/
|
|
8051
|
+
function normalizeRuntimeVersion(runtime, stdout) {
|
|
8052
|
+
const trimmed = stdout.trim();
|
|
8053
|
+
if (!trimmed) return void 0;
|
|
8054
|
+
if (runtime === "openclaw") return parseOpenClawVersion(trimmed) ?? trimmed;
|
|
8055
|
+
return trimmed;
|
|
8056
|
+
}
|
|
8057
|
+
/**
|
|
8043
8058
|
* Resolve the installed runtime version by running the per-runtime version
|
|
8044
|
-
* command and
|
|
8045
|
-
*
|
|
8059
|
+
* command and normalising its stdout. An unknown runtime (no command in the
|
|
8060
|
+
* map) returns `undefined` without spawning — it must never throw.
|
|
8046
8061
|
*/
|
|
8047
8062
|
async function getRuntimeVersion(runtime) {
|
|
8048
8063
|
const cmd = resolveRuntimeVersionCommand(runtime);
|
|
@@ -8052,7 +8067,7 @@ async function getRuntimeVersion(runtime) {
|
|
|
8052
8067
|
}
|
|
8053
8068
|
try {
|
|
8054
8069
|
const { stdout } = await execFileAsync$2(cmd.command, cmd.args);
|
|
8055
|
-
return stdout
|
|
8070
|
+
return normalizeRuntimeVersion(runtime, stdout);
|
|
8056
8071
|
} catch {
|
|
8057
8072
|
logger.debug({ runtime }, "Could not resolve runtime version");
|
|
8058
8073
|
return;
|
package/dist/node-remediation.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as supportsOpenClawNode, u as OPENCLAW_NODE_REQUIREMENT } from "./runtime-process.js";
|
|
2
2
|
import { mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
package/dist/runtime-process.js
CHANGED
|
@@ -90,6 +90,16 @@ function supportsOpenClawNode(nodeVersion) {
|
|
|
90
90
|
if (major === 26) return minor >= 1;
|
|
91
91
|
return major > 26;
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Extract the semver-like version token printed by `openclaw --version`.
|
|
95
|
+
* Every OpenClaw release prints a branded line (`OpenClaw 2026.6.11 (e085fa1)`,
|
|
96
|
+
* `OpenClaw 2026.9.5 (ec9c1a1)`); this reduces it to the bare token. Requires
|
|
97
|
+
* whitespace delimiters and a four-digit year major, so unexpected formats
|
|
98
|
+
* return `undefined` and callers fall back to the raw line.
|
|
99
|
+
*/
|
|
100
|
+
function parseOpenClawVersion(output) {
|
|
101
|
+
return /(?:^|\s)(\d{4}\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)(?:\s|$)/u.exec(output.trim())?.[1];
|
|
102
|
+
}
|
|
93
103
|
//#endregion
|
|
94
104
|
//#region ../../node_modules/.pnpm/dotenv@17.2.2/node_modules/dotenv/package.json
|
|
95
105
|
var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -15766,4 +15776,4 @@ var RuntimeProcess = class {
|
|
|
15766
15776
|
}
|
|
15767
15777
|
};
|
|
15768
15778
|
//#endregion
|
|
15769
|
-
export { ErrorLineDetector as a, createLogger as c, PINNED_OPENCLAW_VERSION as d,
|
|
15779
|
+
export { ErrorLineDetector as a, createLogger as c, PINNED_OPENCLAW_VERSION as d, parseOpenClawVersion as f, __require as h, CaptureThrottle as i, OPENCLAW_MANAGED_NODE_MAJOR as l, __commonJSMin as m, OPENCLAW_EXTERNAL_SUPERVISOR_ENV as n, STRICT_ERROR_CAPTURE_PROFILE as o, supportsOpenClawNode as p, RuntimeProcess as r, toFingerprintKey as s, DRAIN_GRACE_MS as t, OPENCLAW_NODE_REQUIREMENT as u };
|
package/dist/runtime-upgrade.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as
|
|
1
|
+
import { f as parseOpenClawVersion, n as OPENCLAW_EXTERNAL_SUPERVISOR_ENV, p as supportsOpenClawNode, u as OPENCLAW_NODE_REQUIREMENT } from "./runtime-process.js";
|
|
2
2
|
import { c as captureNodeRemediation, h as logger } from "./sentry.js";
|
|
3
3
|
import { n as remediateManagedNode, t as NodeRemediationError } from "./node-remediation.js";
|
|
4
4
|
import { mkdir } from "node:fs/promises";
|
|
@@ -70,10 +70,6 @@ function resolveUpgradeCommand(runtime, version) {
|
|
|
70
70
|
default: return;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
/** Extract the semver-like version token printed by `openclaw --version`. */
|
|
74
|
-
function parseOpenClawVersion(output) {
|
|
75
|
-
return /(?:^|\s)(\d{4}\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)(?:\s|$)/u.exec(output.trim())?.[1];
|
|
76
|
-
}
|
|
77
73
|
async function upgradeRuntime(runtime, version, runtimeProcess, options = {}) {
|
|
78
74
|
const runCommand = options.runCommand ?? (async (command, args, commandOptions) => {
|
|
79
75
|
const result = await execFileAsync(command, args, commandOptions);
|
package/dist/src/index.d.ts
CHANGED
|
@@ -76,6 +76,13 @@ declare const OPENCLAW_MANAGED_NODE_MAJOR = 24;
|
|
|
76
76
|
* Pre-release tags are rejected; build metadata (`+…`) is accepted.
|
|
77
77
|
*/
|
|
78
78
|
declare function supportsOpenClawNode(nodeVersion: string): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Extract the semver-like version token printed by `openclaw --version`.
|
|
81
|
+
* Every OpenClaw release prints a branded line (`OpenClaw 2026.6.11 (e085fa1)`,
|
|
82
|
+
* `OpenClaw 2026.9.5 (ec9c1a1)`); this reduces it to the bare token. Requires
|
|
83
|
+
* whitespace delimiters and a four-digit year major, so unexpected formats
|
|
84
|
+
* return `undefined` and callers fall back to the raw line.
|
|
85
|
+
*/
|
|
79
86
|
//#endregion
|
|
80
87
|
//#region src/node-remediation.d.ts
|
|
81
88
|
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as PINNED_OPENCLAW_VERSION,
|
|
1
|
+
import { d as PINNED_OPENCLAW_VERSION, l as OPENCLAW_MANAGED_NODE_MAJOR, p as supportsOpenClawNode, u as OPENCLAW_NODE_REQUIREMENT } from "../runtime-process.js";
|
|
2
2
|
import { _ as loadDaemonConfig, a as installService, c as startService, d as uninstallService, f as PROTOCOL_VERSION, g as fetchAgentConfig, h as SOCKET_PATH, i as checkExistingDaemon, l as stopExistingDaemon, m as PID_PATH, n as queryDaemonHealth, o as isServiceInstalled, p as ALFE_DIR, r as startDaemon, s as restartService, t as formatHealthReport, u as stopService, v as resolveAgentIdentity, y as PINNED_CLAUDE_CODE_HOST_VERSION } from "../health.js";
|
|
3
3
|
import { a as captureFatal, d as flushSentry, f as initAgentSentry, h as logger, i as captureCliFailure, l as captureRuntimeCrash, n as AGENT_MCP_SENTRY_DSN, o as captureIntegrationFailure, p as setAgentContext, r as AGENT_RUNTIME_SENTRY_DSN, s as captureMcpFailure, t as AGENT_DAEMON_SENTRY_DSN, u as captureRuntimeErrorOutput } from "../sentry.js";
|
|
4
4
|
import { n as remediateManagedNode } from "../node-remediation.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/gateway",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Alfe local gateway daemon — persistent control plane for agent integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@alfe.ai/ai-proxy-local": "^0.0.17",
|
|
28
28
|
"@alfe.ai/config": "^0.4.1",
|
|
29
29
|
"@alfe.ai/integration-manifest": "^0.4.2",
|
|
30
|
-
"@alfe.ai/integrations": "^0.6.
|
|
30
|
+
"@alfe.ai/integrations": "^0.6.8",
|
|
31
31
|
"@alfe.ai/mcp-bundler": "^0.4.2"
|
|
32
32
|
},
|
|
33
33
|
"license": "UNLICENSED",
|