@alfe.ai/integrations 0.4.1 → 0.4.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/index.js +38 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1302,15 +1302,27 @@ var IntegrationManager = class {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
if (pluginFailures.length > 0 && pluginFailures.length === plugins.length) throw new Error(`All plugins failed to install: ${pluginFailures.join(", ")}`);
|
|
1304
1304
|
if (pluginFailures.length > 0) this.log.warn(`Continuing activation with ${String(pluginFailures.length)} failed plugin(s): ${pluginFailures.join(", ")}`);
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1305
|
+
const skillFailures = [];
|
|
1306
|
+
for (const skill of skills) {
|
|
1307
|
+
const skillLabel = skill.clawhub ?? skill.path ?? "unknown";
|
|
1308
|
+
try {
|
|
1309
|
+
if (skill.clawhub) {
|
|
1310
|
+
this.log.info(`Installing ClawHub skill ${skill.clawhub} to ${runtimeName}`);
|
|
1311
|
+
await applier.applyClawHubSkill(skill.clawhub);
|
|
1312
|
+
} else if (skill.path) {
|
|
1313
|
+
const skillName = skill.path.split("/").pop() ?? skill.path;
|
|
1314
|
+
const srcPath = join(installPath, skill.path);
|
|
1315
|
+
this.log.info(`Applying skill ${skillName} to ${runtimeName}`);
|
|
1316
|
+
await applier.applySkill(skillName, srcPath);
|
|
1317
|
+
}
|
|
1318
|
+
} catch (err) {
|
|
1319
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1320
|
+
this.log.error(`Failed to apply skill ${skillLabel}: ${msg}`);
|
|
1321
|
+
skillFailures.push(skillLabel);
|
|
1322
|
+
}
|
|
1313
1323
|
}
|
|
1324
|
+
if (skillFailures.length > 0 && skillFailures.length === skills.length) throw new Error(`All skills failed to install: ${skillFailures.join(", ")}`);
|
|
1325
|
+
if (skillFailures.length > 0) this.log.warn(`Continuing activation with ${String(skillFailures.length)} failed skill(s): ${skillFailures.join(", ")}`);
|
|
1314
1326
|
let runtimeConfigApplied = false;
|
|
1315
1327
|
if (runtimeConfig && Object.keys(runtimeConfig).length > 0) {
|
|
1316
1328
|
const agentConfig = entry.config;
|
|
@@ -2113,6 +2125,22 @@ const BUNDLED_BASELINE_ALLOW = ["browser"];
|
|
|
2113
2125
|
const CONFIG_SET_RETRIES$1 = 3;
|
|
2114
2126
|
const CONFIG_SET_RETRY_DELAY_MS$1 = 750;
|
|
2115
2127
|
/**
|
|
2128
|
+
* Boot-safe exec timeout for the OUT-OF-BAND `setConfigRaw` write (the daemon's
|
|
2129
|
+
* config-reconcile pass / `alfe.config_set`). Unlike integration `applyConfig`,
|
|
2130
|
+
* which runs under the gateway RuntimeGate with the runtime SUSPENDED (no CPU
|
|
2131
|
+
* contention, so the 10s execFile default is plenty), `setConfigRaw` fires while
|
|
2132
|
+
* `openclaw gateway run` is live and — on a fresh managed box — still BOOTING.
|
|
2133
|
+
* On a 2-vCPU Hetzner cx-class instance the `openclaw config set` CLI cold-start
|
|
2134
|
+
* takes >10s under that boot contention, so the 10s default SIGKILLs the child
|
|
2135
|
+
* mid-write and every retry lands inside the same ~30s boot window and times out
|
|
2136
|
+
* identically (observed in prod: two `config set agents.defaults.model` attempts
|
|
2137
|
+
* logged exactly 10s apart with no exit line, then a 3rd succeeded once load
|
|
2138
|
+
* eased). 60s clears the cold-start-under-contention worst case while still
|
|
2139
|
+
* bounding a genuinely hung CLI. This is ONLY for `setConfigRaw` — the
|
|
2140
|
+
* integration `applyConfig` paths keep the 10s default (they're not contended).
|
|
2141
|
+
*/
|
|
2142
|
+
const CONFIG_SET_RAW_TIMEOUT_MS = 6e4;
|
|
2143
|
+
/**
|
|
2116
2144
|
* Max `openclaw config get` spawns in flight at once during the batch
|
|
2117
2145
|
* verify-after-write. A naive `Promise.all(leaves.map(...))` fires one CLI
|
|
2118
2146
|
* process per leaf simultaneously — a 36-leaf model-provider batch on a 2-vCPU
|
|
@@ -2843,6 +2871,7 @@ var OpenClawApplier = class {
|
|
|
2843
2871
|
slug,
|
|
2844
2872
|
err: msg
|
|
2845
2873
|
}, "ClawHub skill install failed");
|
|
2874
|
+
throw new Error(`ClawHub skill install failed for "${slug}": ${msg}`);
|
|
2846
2875
|
}
|
|
2847
2876
|
});
|
|
2848
2877
|
}
|
|
@@ -3048,7 +3077,7 @@ var OpenClawApplier = class {
|
|
|
3048
3077
|
* config writes trigger.
|
|
3049
3078
|
*/
|
|
3050
3079
|
setConfigRaw(key, value) {
|
|
3051
|
-
return this.cliLock.run(() => this.runConfigSetUnlocked([key, value]));
|
|
3080
|
+
return this.cliLock.run(() => this.runConfigSetUnlocked([key, value], { timeout: CONFIG_SET_RAW_TIMEOUT_MS }));
|
|
3052
3081
|
}
|
|
3053
3082
|
/**
|
|
3054
3083
|
* Read a single config key back — `openclaw config get <key>` — and normalize
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/integrations",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Integration lifecycle management for Alfe — registry, resolution, installation, and state",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@auriclabs/logger": "^0.1.1",
|
|
16
16
|
"yaml": ">=2.8.3",
|
|
17
17
|
"@alfe.ai/integration-manifest": "^0.3.1",
|
|
18
|
-
"@alfe.ai/mcp-bundler": "^0.3.
|
|
18
|
+
"@alfe.ai/mcp-bundler": "^0.3.1"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|