@alfe.ai/gateway 0.6.0 → 0.6.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 +70 -6
- package/dist/src/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/health.js
CHANGED
|
@@ -73,7 +73,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
73
73
|
* silent fleet outage with no Alfe deploy. Bump deliberately after validating a new
|
|
74
74
|
* OpenClaw, then cut a CLI release so the pin travels with the CLI version.
|
|
75
75
|
*/
|
|
76
|
-
const PINNED_OPENCLAW_VERSION = "2026.6.
|
|
76
|
+
const PINNED_OPENCLAW_VERSION = "2026.6.11";
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region ../../packages-internal/ids/dist/prefixes.js
|
|
79
79
|
const ID_PREFIXES = {
|
|
@@ -5978,6 +5978,70 @@ var ReconciliationEngine = class {
|
|
|
5978
5978
|
});
|
|
5979
5979
|
return;
|
|
5980
5980
|
}
|
|
5981
|
+
if (local.status === "installing") {
|
|
5982
|
+
if (desired.reinstallRequestedAt && local.installedAt && desired.reinstallRequestedAt > local.installedAt) {
|
|
5983
|
+
await this.ensureSuspended();
|
|
5984
|
+
log$3.info(`Reinstalling ${id} from stale installing state (requested: ${desired.reinstallRequestedAt}, installed: ${local.installedAt})`);
|
|
5985
|
+
this.manager.resetReinstallAttempts(id);
|
|
5986
|
+
this.activateAttempts.delete(id);
|
|
5987
|
+
if ((await this.manager.reinstall(id, desired.version, desired.config, desired.customSource)).configApplied) report.configApplied = true;
|
|
5988
|
+
report.installed.push(id);
|
|
5989
|
+
report.activated.push(id);
|
|
5990
|
+
report.results.push({
|
|
5991
|
+
integrationId: id,
|
|
5992
|
+
action: "installed",
|
|
5993
|
+
actualStatus: "active"
|
|
5994
|
+
});
|
|
5995
|
+
return;
|
|
5996
|
+
}
|
|
5997
|
+
const attempts = this.manager.getReinstallAttempts(id);
|
|
5998
|
+
if (attempts >= 3) {
|
|
5999
|
+
const errorMessage = `Stale installing state — max auto-reinstall attempts (${String(attempts)}) reached — manual reinstall required`;
|
|
6000
|
+
log$3.error(`Auto-reinstall blocked for ${id} — stuck in "installing", ${String(attempts)} consecutive failures. Manual reinstall required.`);
|
|
6001
|
+
captureIntegrationFailure(id, "reinstall", errorMessage);
|
|
6002
|
+
report.errors.push({
|
|
6003
|
+
integrationId: id,
|
|
6004
|
+
error: `Max auto-reinstall attempts (${String(attempts)}) reached`
|
|
6005
|
+
});
|
|
6006
|
+
report.results.push({
|
|
6007
|
+
integrationId: id,
|
|
6008
|
+
action: "error",
|
|
6009
|
+
actualStatus: "error",
|
|
6010
|
+
errorMessage
|
|
6011
|
+
});
|
|
6012
|
+
return;
|
|
6013
|
+
}
|
|
6014
|
+
await this.ensureSuspended();
|
|
6015
|
+
log$3.info(`Recovering ${id} from stale installing state via reinstall (attempt ${String(attempts + 1)}/3)`);
|
|
6016
|
+
this.manager.incrementReinstallAttempts(id);
|
|
6017
|
+
try {
|
|
6018
|
+
if ((await this.manager.reinstall(id, desired.version, desired.config, desired.customSource)).configApplied) report.configApplied = true;
|
|
6019
|
+
this.manager.resetReinstallAttempts(id);
|
|
6020
|
+
this.activateAttempts.delete(id);
|
|
6021
|
+
report.installed.push(id);
|
|
6022
|
+
report.activated.push(id);
|
|
6023
|
+
report.results.push({
|
|
6024
|
+
integrationId: id,
|
|
6025
|
+
action: "installed",
|
|
6026
|
+
actualStatus: "active"
|
|
6027
|
+
});
|
|
6028
|
+
} catch (reinstallErr) {
|
|
6029
|
+
const reinstallMsg = reinstallErr instanceof Error ? reinstallErr.message : String(reinstallErr);
|
|
6030
|
+
log$3.error({ err: reinstallErr }, `Reinstall from stale installing state failed for ${id}`);
|
|
6031
|
+
captureIntegrationFailure(id, "reinstall", reinstallErr);
|
|
6032
|
+
report.errors.push({
|
|
6033
|
+
integrationId: id,
|
|
6034
|
+
error: reinstallMsg
|
|
6035
|
+
});
|
|
6036
|
+
report.results.push({
|
|
6037
|
+
integrationId: id,
|
|
6038
|
+
action: "error",
|
|
6039
|
+
actualStatus: "error",
|
|
6040
|
+
errorMessage: reinstallMsg
|
|
6041
|
+
});
|
|
6042
|
+
}
|
|
6043
|
+
return;
|
|
6044
|
+
}
|
|
5981
6045
|
if (local.status !== "active") {
|
|
5982
6046
|
await this.ensureSuspended();
|
|
5983
6047
|
log$3.info(`Activating ${id}`);
|
|
@@ -23746,7 +23810,7 @@ async function handleCloudCommand(command) {
|
|
|
23746
23810
|
};
|
|
23747
23811
|
const payload = command.payload;
|
|
23748
23812
|
const runtime = config.runtime;
|
|
23749
|
-
const version = payload?.version ?? (runtime === "openclaw" ? "2026.6.
|
|
23813
|
+
const version = payload?.version ?? (runtime === "openclaw" ? "2026.6.11" : void 0);
|
|
23750
23814
|
upgradingRuntime = true;
|
|
23751
23815
|
setTimeout(() => {
|
|
23752
23816
|
(async () => {
|
|
@@ -24309,10 +24373,6 @@ function handleIntegrationReport(params, pluginId) {
|
|
|
24309
24373
|
*/
|
|
24310
24374
|
async function queryDaemonHealth(socketPath, timeoutMs = 5e3) {
|
|
24311
24375
|
return new Promise((resolve, reject) => {
|
|
24312
|
-
const timer = setTimeout(() => {
|
|
24313
|
-
socket.destroy();
|
|
24314
|
-
reject(/* @__PURE__ */ new Error("Health check timed out"));
|
|
24315
|
-
}, timeoutMs);
|
|
24316
24376
|
let buffer = "";
|
|
24317
24377
|
const requestId = randomUUID();
|
|
24318
24378
|
const socket = createConnection(socketPath, () => {
|
|
@@ -24324,6 +24384,10 @@ async function queryDaemonHealth(socketPath, timeoutMs = 5e3) {
|
|
|
24324
24384
|
}) + "\n";
|
|
24325
24385
|
socket.write(request);
|
|
24326
24386
|
});
|
|
24387
|
+
const timer = setTimeout(() => {
|
|
24388
|
+
socket.destroy();
|
|
24389
|
+
reject(/* @__PURE__ */ new Error("Health check timed out"));
|
|
24390
|
+
}, timeoutMs);
|
|
24327
24391
|
socket.on("data", (data) => {
|
|
24328
24392
|
buffer += data.toString();
|
|
24329
24393
|
const newlineIdx = buffer.indexOf("\n");
|
package/dist/src/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare function startDaemon(): Promise<void>;
|
|
|
44
44
|
* silent fleet outage with no Alfe deploy. Bump deliberately after validating a new
|
|
45
45
|
* OpenClaw, then cut a CLI release so the pin travels with the CLI version.
|
|
46
46
|
*/
|
|
47
|
-
declare const PINNED_OPENCLAW_VERSION = "2026.6.
|
|
47
|
+
declare const PINNED_OPENCLAW_VERSION = "2026.6.11";
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/sentry.d.ts
|
|
50
50
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/gateway",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.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.13",
|
|
28
28
|
"@alfe.ai/config": "^0.3.0",
|
|
29
29
|
"@alfe.ai/integration-manifest": "^0.3.1",
|
|
30
|
-
"@alfe.ai/integrations": "^0.3.
|
|
30
|
+
"@alfe.ai/integrations": "^0.3.2",
|
|
31
31
|
"@alfe.ai/mcp-bundler": "^0.3.0"
|
|
32
32
|
},
|
|
33
33
|
"license": "UNLICENSED",
|