@umimoney/clawdbot-relay-plugin 0.1.14 → 0.1.15

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.
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://clawdbot.dev/schemas/plugin.json",
3
3
  "id": "umi-relay",
4
4
  "name": "UMI Relay",
5
- "version": "0.1.14",
5
+ "version": "0.1.15",
6
6
  "description": "Connect to UMI relay server for real-time chat visibility in UMI web UI",
7
7
  "type": "channel",
8
8
  "main": "index.js",
@@ -10,38 +10,8 @@
10
10
  "license": "MIT",
11
11
  "configSchema": {
12
12
  "type": "object",
13
- "additionalProperties": false,
14
- "properties": {
15
- "apiKey": {
16
- "type": "string",
17
- "description": "UMI API key (starts with umi_)"
18
- },
19
- "relayUrl": {
20
- "type": "string",
21
- "default": "wss://ws.umi.app/ws/relay",
22
- "description": "UMI relay server URL"
23
- },
24
- "agentVersion": {
25
- "type": "string",
26
- "default": "1.0.0",
27
- "description": "Agent version string"
28
- },
29
- "capabilities": {
30
- "type": "array",
31
- "items": { "type": "string" },
32
- "default": ["chat"],
33
- "description": "Agent capabilities"
34
- },
35
- "autoReconnect": {
36
- "type": "boolean",
37
- "default": true,
38
- "description": "Reconnect on disconnect"
39
- }
40
- }
41
- },
42
- "uiHints": {
43
- "apiKey": { "label": "API Key", "sensitive": true, "env": "UMI_API_KEY" },
44
- "relayUrl": { "label": "Relay URL", "placeholder": "wss://ws.umi.app/ws/relay" }
13
+ "additionalProperties": true,
14
+ "properties": {}
45
15
  },
46
16
  "channels": ["umi-relay"]
47
17
  }
package/dist/index.js CHANGED
@@ -290,10 +290,11 @@ var umiRelayChannel = {
290
290
  chatTypes: ["direct"],
291
291
  media: false
292
292
  },
293
+ // Empty plugin config - all config comes from channel (channels.umi-relay)
293
294
  configSchema: {
294
295
  type: "object",
295
296
  properties: {},
296
- additionalProperties: false
297
+ additionalProperties: true
297
298
  },
298
299
  config: {
299
300
  listAccountIds: () => ["default"],
@@ -323,20 +324,15 @@ var umiRelayChannel = {
323
324
  },
324
325
  gateway: {
325
326
  startAccount: async (ctx) => {
326
- console.log("[UmiRelay] ctx keys:", Object.keys(ctx));
327
- console.log("[UmiRelay] ctx.account:", ctx.account);
328
- console.log("[UmiRelay] ctx.cfg:", ctx.cfg);
329
- console.log("[UmiRelay] ctx.cfg?.channels:", ctx.cfg?.channels);
330
- console.log('[UmiRelay] ctx.cfg?.channels?.["umi-relay"]:', ctx.cfg?.channels?.["umi-relay"]);
331
- const channelConfig = ctx.account?.config || ctx.cfg?.channels?.["umi-relay"] || ctx.cfg || {};
327
+ const account = ctx.account || {};
332
328
  const config = {
333
- apiKey: channelConfig.apiKey || process.env.UMI_API_KEY || "",
334
- relayUrl: channelConfig.relayUrl || "wss://ws.umi.app/ws/relay",
335
- agentVersion: channelConfig.agentVersion || "1.0.0",
336
- capabilities: channelConfig.capabilities || ["chat"],
337
- autoReconnect: channelConfig.autoReconnect ?? true
329
+ apiKey: account.apiKey || account.config?.apiKey || process.env.UMI_API_KEY || "",
330
+ relayUrl: account.relayUrl || account.config?.relayUrl || "wss://ws.umi.app/ws/relay",
331
+ agentVersion: account.agentVersion || account.config?.agentVersion || "1.0.0",
332
+ capabilities: account.capabilities || account.config?.capabilities || ["chat"],
333
+ autoReconnect: account.autoReconnect ?? account.config?.autoReconnect ?? true
338
334
  };
339
- console.log("[UmiRelay] Resolved config:", { ...config, apiKey: config.apiKey ? "***" : "MISSING" });
335
+ console.log("[UmiRelay] Config from channel:", { ...config, apiKey: config.apiKey ? "***" : "MISSING" });
340
336
  if (!config.apiKey) {
341
337
  console.error("[UmiRelay] No API key provided. Set UMI_API_KEY or pass apiKey in config.");
342
338
  return { stop: () => {
package/dist/index.mjs CHANGED
@@ -255,10 +255,11 @@ var umiRelayChannel = {
255
255
  chatTypes: ["direct"],
256
256
  media: false
257
257
  },
258
+ // Empty plugin config - all config comes from channel (channels.umi-relay)
258
259
  configSchema: {
259
260
  type: "object",
260
261
  properties: {},
261
- additionalProperties: false
262
+ additionalProperties: true
262
263
  },
263
264
  config: {
264
265
  listAccountIds: () => ["default"],
@@ -288,20 +289,15 @@ var umiRelayChannel = {
288
289
  },
289
290
  gateway: {
290
291
  startAccount: async (ctx) => {
291
- console.log("[UmiRelay] ctx keys:", Object.keys(ctx));
292
- console.log("[UmiRelay] ctx.account:", ctx.account);
293
- console.log("[UmiRelay] ctx.cfg:", ctx.cfg);
294
- console.log("[UmiRelay] ctx.cfg?.channels:", ctx.cfg?.channels);
295
- console.log('[UmiRelay] ctx.cfg?.channels?.["umi-relay"]:', ctx.cfg?.channels?.["umi-relay"]);
296
- const channelConfig = ctx.account?.config || ctx.cfg?.channels?.["umi-relay"] || ctx.cfg || {};
292
+ const account = ctx.account || {};
297
293
  const config = {
298
- apiKey: channelConfig.apiKey || process.env.UMI_API_KEY || "",
299
- relayUrl: channelConfig.relayUrl || "wss://ws.umi.app/ws/relay",
300
- agentVersion: channelConfig.agentVersion || "1.0.0",
301
- capabilities: channelConfig.capabilities || ["chat"],
302
- autoReconnect: channelConfig.autoReconnect ?? true
294
+ apiKey: account.apiKey || account.config?.apiKey || process.env.UMI_API_KEY || "",
295
+ relayUrl: account.relayUrl || account.config?.relayUrl || "wss://ws.umi.app/ws/relay",
296
+ agentVersion: account.agentVersion || account.config?.agentVersion || "1.0.0",
297
+ capabilities: account.capabilities || account.config?.capabilities || ["chat"],
298
+ autoReconnect: account.autoReconnect ?? account.config?.autoReconnect ?? true
303
299
  };
304
- console.log("[UmiRelay] Resolved config:", { ...config, apiKey: config.apiKey ? "***" : "MISSING" });
300
+ console.log("[UmiRelay] Config from channel:", { ...config, apiKey: config.apiKey ? "***" : "MISSING" });
305
301
  if (!config.apiKey) {
306
302
  console.error("[UmiRelay] No API key provided. Set UMI_API_KEY or pass apiKey in config.");
307
303
  return { stop: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umimoney/clawdbot-relay-plugin",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Clawdbot plugin for connecting to UMI relay server",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",