@alfe.ai/openclaw 0.0.21 → 0.0.23

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.
Files changed (2) hide show
  1. package/dist/plugin2.js +9 -5
  2. package/package.json +2 -2
package/dist/plugin2.js CHANGED
@@ -2,6 +2,7 @@ import { createRequire } from "node:module";
2
2
  import { join } from "node:path";
3
3
  import { homedir } from "node:os";
4
4
  import { resolveConfig } from "@alfe.ai/config";
5
+ import { AgentApiClient } from "@alfe.ai/agent-api-client";
5
6
  import { createConnection } from "node:net";
6
7
  import { randomUUID } from "node:crypto";
7
8
  import { EventEmitter } from "node:events";
@@ -3182,17 +3183,20 @@ const plugin = {
3182
3183
  const log = api.logger;
3183
3184
  log.info("Alfe OpenClaw Plugin activating...");
3184
3185
  const socketPath = ((api.config ?? {}).plugins?.entries?.["@alfe.ai/openclaw"]?.config ?? {}).socketPath ?? process.env.ALFE_GATEWAY_SOCKET ?? DEFAULT_SOCKET_PATH;
3185
- resolveConfig().then(async (cfg) => {
3186
- const { AgentApiClient } = await import("@alfe.ai/agent-api-client");
3186
+ let cfg = null;
3187
+ try {
3188
+ cfg = resolveConfig();
3189
+ } catch (err) {
3190
+ log.warn(`Integration tools not registered — config not available: ${err.message}`);
3191
+ }
3192
+ if (cfg) {
3187
3193
  const tools = buildIntegrationTools(new AgentApiClient({
3188
3194
  apiKey: cfg.apiKey,
3189
3195
  apiUrl: cfg.apiUrl
3190
3196
  }));
3191
3197
  for (const tool of tools) api.registerTool(tool);
3192
3198
  log.info(`Registered ${String(tools.length)} integration tools: ${tools.map((t) => t.name).join(", ")}`);
3193
- }).catch((err) => {
3194
- log.warn(`Integration tools not registered — config not available: ${err.message}`);
3195
- });
3199
+ }
3196
3200
  ipcClient = new IPCClient(socketPath);
3197
3201
  ipcClient.on("event", (event, payload) => {
3198
3202
  switch (event) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
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.5"
27
+ "@alfe.ai/config": "^0.0.6"
28
28
  },
29
29
  "files": [
30
30
  "dist",