@alfe.ai/openclaw 0.0.21 → 0.0.22
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/plugin2.js +18 -10
- package/package.json +2 -2
package/dist/plugin2.js
CHANGED
|
@@ -3182,17 +3182,25 @@ const plugin = {
|
|
|
3182
3182
|
const log = api.logger;
|
|
3183
3183
|
log.info("Alfe OpenClaw Plugin activating...");
|
|
3184
3184
|
const socketPath = ((api.config ?? {}).plugins?.entries?.["@alfe.ai/openclaw"]?.config ?? {}).socketPath ?? process.env.ALFE_GATEWAY_SOCKET ?? DEFAULT_SOCKET_PATH;
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
apiUrl: cfg.apiUrl
|
|
3190
|
-
}));
|
|
3191
|
-
for (const tool of tools) api.registerTool(tool);
|
|
3192
|
-
log.info(`Registered ${String(tools.length)} integration tools: ${tools.map((t) => t.name).join(", ")}`);
|
|
3193
|
-
}).catch((err) => {
|
|
3185
|
+
let cfg = null;
|
|
3186
|
+
try {
|
|
3187
|
+
cfg = resolveConfig();
|
|
3188
|
+
} catch (err) {
|
|
3194
3189
|
log.warn(`Integration tools not registered — config not available: ${err.message}`);
|
|
3195
|
-
}
|
|
3190
|
+
}
|
|
3191
|
+
if (cfg) {
|
|
3192
|
+
const resolvedCfg = cfg;
|
|
3193
|
+
import("@alfe.ai/agent-api-client").then(({ AgentApiClient }) => {
|
|
3194
|
+
const tools = buildIntegrationTools(new AgentApiClient({
|
|
3195
|
+
apiKey: resolvedCfg.apiKey,
|
|
3196
|
+
apiUrl: resolvedCfg.apiUrl
|
|
3197
|
+
}));
|
|
3198
|
+
for (const tool of tools) api.registerTool(tool);
|
|
3199
|
+
log.info(`Registered ${String(tools.length)} integration tools: ${tools.map((t) => t.name).join(", ")}`);
|
|
3200
|
+
}).catch((err) => {
|
|
3201
|
+
log.warn(`Integration tools not registered — agent-api-client import failed: ${err.message}`);
|
|
3202
|
+
});
|
|
3203
|
+
}
|
|
3196
3204
|
ipcClient = new IPCClient(socketPath);
|
|
3197
3205
|
ipcClient.on("event", (event, payload) => {
|
|
3198
3206
|
switch (event) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/openclaw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "OpenClaw plugin for Alfe — connects to local gateway daemon via IPC for integration management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@auriclabs/logger": "^0.1.1",
|
|
25
25
|
"@sinclair/typebox": "^0.34.48",
|
|
26
26
|
"@alfe.ai/agent-api-client": "^0.0.4",
|
|
27
|
-
"@alfe.ai/config": "^0.0.
|
|
27
|
+
"@alfe.ai/config": "^0.0.6"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist",
|