@alfe.ai/openclaw-chat 0.0.3 → 0.0.4
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 +5 -3
- package/package.json +2 -2
package/dist/plugin2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
|
-
import { ChatServiceClient } from "@alfe.ai/chat";
|
|
3
|
+
import { ChatServiceClient, resolveAlfeChat } from "@alfe.ai/chat";
|
|
4
4
|
import WebSocket from "ws";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
@@ -532,8 +532,10 @@ const plugin = {
|
|
|
532
532
|
api.registerChannel(alfeChannel);
|
|
533
533
|
log.info(`Registered channel: ${alfeChannel.id} (${alfeChannel.meta.label})`);
|
|
534
534
|
daemonIpcClient = await connectToDaemon(pluginConfig.daemonSocket ?? process.env.ALFE_GATEWAY_SOCKET ?? DEFAULT_SOCKET_PATH, log);
|
|
535
|
-
const chatWsUrl =
|
|
536
|
-
|
|
535
|
+
const { apiKey, chatWsUrl } = await resolveAlfeChat({
|
|
536
|
+
apiKey: pluginConfig.apiKey,
|
|
537
|
+
chatWsUrl: pluginConfig.chatWsUrl
|
|
538
|
+
});
|
|
537
539
|
const runtimeUrl = pluginConfig.openclawGatewayUrl ?? process.env.OPENCLAW_GATEWAY_URL ?? "ws://127.0.0.1:18789";
|
|
538
540
|
const runtimeToken = process.env.OPENCLAW_GATEWAY_TOKEN ?? "";
|
|
539
541
|
if (chatWsUrl && apiKey) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/openclaw-chat",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "OpenClaw chat plugin for Alfe — web widget and mobile app channels",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"ws": "^8.18.0",
|
|
29
|
-
"@alfe.ai/chat": "^0.0.
|
|
29
|
+
"@alfe.ai/chat": "^0.0.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/ws": "^8.5.13"
|