@alfe.ai/gateway 0.5.0 → 0.6.0
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 +44 -12
- package/package.json +2 -2
package/dist/health.js
CHANGED
|
@@ -5824,16 +5824,48 @@ var ReconciliationEngine = class {
|
|
|
5824
5824
|
return;
|
|
5825
5825
|
}
|
|
5826
5826
|
if (local.version !== desired.version && desired.version !== "" && local.version !== "unknown") {
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5827
|
+
if (desired.reinstallRequestedAt && local.installedAt && desired.reinstallRequestedAt > local.installedAt) {
|
|
5828
|
+
await this.ensureSuspended();
|
|
5829
|
+
log$3.info(`Reinstalling ${id} on version change (reinstall requested: ${desired.reinstallRequestedAt}, installed: ${local.installedAt}): ${local.version} → ${desired.version}`);
|
|
5830
|
+
this.manager.resetReinstallAttempts(id);
|
|
5831
|
+
this.activateAttempts.delete(id);
|
|
5832
|
+
if ((await this.manager.reinstall(id, desired.version, desired.config, desired.customSource)).configApplied) report.configApplied = true;
|
|
5833
|
+
report.installed.push(id);
|
|
5834
|
+
report.activated.push(id);
|
|
5835
|
+
report.results.push({
|
|
5836
|
+
integrationId: id,
|
|
5837
|
+
action: "installed",
|
|
5838
|
+
actualStatus: "active"
|
|
5839
|
+
});
|
|
5840
|
+
return;
|
|
5841
|
+
}
|
|
5842
|
+
log$3.info(`Upgrading ${id} in place: ${local.version} → ${desired.version}`);
|
|
5843
|
+
try {
|
|
5844
|
+
if ((await this.manager.upgrade(id, desired.version, desired.config, desired.customSource, { onBeforeRuntimeMutation: () => this.ensureSuspended() })).configApplied) report.configApplied = true;
|
|
5845
|
+
this.manager.resetReinstallAttempts(id);
|
|
5846
|
+
this.activateAttempts.delete(id);
|
|
5847
|
+
report.installed.push(id);
|
|
5848
|
+
report.activated.push(id);
|
|
5849
|
+
report.results.push({
|
|
5850
|
+
integrationId: id,
|
|
5851
|
+
action: "activated",
|
|
5852
|
+
actualStatus: "active"
|
|
5853
|
+
});
|
|
5854
|
+
} catch (upgradeErr) {
|
|
5855
|
+
const upgradeMsg = upgradeErr instanceof Error ? upgradeErr.message : String(upgradeErr);
|
|
5856
|
+
log$3.error({ err: upgradeErr }, `Upgrade failed for ${id}`);
|
|
5857
|
+
captureIntegrationFailure(id, "upgrade", upgradeErr);
|
|
5858
|
+
report.errors.push({
|
|
5859
|
+
integrationId: id,
|
|
5860
|
+
error: upgradeMsg
|
|
5861
|
+
});
|
|
5862
|
+
report.results.push({
|
|
5863
|
+
integrationId: id,
|
|
5864
|
+
action: "error",
|
|
5865
|
+
actualStatus: "error",
|
|
5866
|
+
errorMessage: upgradeMsg
|
|
5867
|
+
});
|
|
5868
|
+
}
|
|
5837
5869
|
return;
|
|
5838
5870
|
}
|
|
5839
5871
|
if (local.status === "error") {
|
|
@@ -5906,7 +5938,7 @@ var ReconciliationEngine = class {
|
|
|
5906
5938
|
await this.ensureSuspended();
|
|
5907
5939
|
log$3.info(`Re-activating ${id} from error state (attempt ${String(activateAttempts + 1)}/${String(MAX_ERROR_ACTIVATE_ATTEMPTS)})`);
|
|
5908
5940
|
try {
|
|
5909
|
-
if ((await this.manager.activate(id)).configApplied) report.configApplied = true;
|
|
5941
|
+
if ((await this.manager.activate(id, { forcePlugins: true })).configApplied) report.configApplied = true;
|
|
5910
5942
|
this.activateAttempts.delete(id);
|
|
5911
5943
|
report.activated.push(id);
|
|
5912
5944
|
report.results.push({
|
|
@@ -5949,7 +5981,7 @@ var ReconciliationEngine = class {
|
|
|
5949
5981
|
if (local.status !== "active") {
|
|
5950
5982
|
await this.ensureSuspended();
|
|
5951
5983
|
log$3.info(`Activating ${id}`);
|
|
5952
|
-
if ((await this.manager.activate(id)).configApplied) report.configApplied = true;
|
|
5984
|
+
if ((await this.manager.activate(id, { forcePlugins: true })).configApplied) report.configApplied = true;
|
|
5953
5985
|
report.activated.push(id);
|
|
5954
5986
|
report.results.push({
|
|
5955
5987
|
integrationId: id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/gateway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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.
|
|
30
|
+
"@alfe.ai/integrations": "^0.3.0",
|
|
31
31
|
"@alfe.ai/mcp-bundler": "^0.3.0"
|
|
32
32
|
},
|
|
33
33
|
"license": "UNLICENSED",
|