@efengx/openclaw-channel-dragon 0.5.7 → 0.5.8

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 CHANGED
@@ -57,10 +57,10 @@ const base = createChannelPluginBase({
57
57
  },
58
58
  config: {
59
59
  listAccountIds: (cfg) => {
60
- return Object.keys(cfg.channels?.[channelId]?.accounts || { "default": {} });
60
+ return Object.keys(cfg?.channels?.[channelId]?.accounts || { "default": {} });
61
61
  },
62
62
  resolveAccount: (cfg, accountId = "default") => {
63
- const accountConfig = cfg.channels?.[channelId]?.accounts?.[accountId] || {};
63
+ const accountConfig = cfg?.channels?.[channelId]?.accounts?.[accountId] || {};
64
64
  return {
65
65
  accountId,
66
66
  agentId: accountConfig.agentId || accountId,
@@ -113,11 +113,11 @@ const entry = defineChannelPluginEntry({
113
113
  if (!sessionKey || !sessionKey.startsWith(`${channelId}:`))
114
114
  return;
115
115
  const accountId = sessionKey.split(':')[2] || "default";
116
- const account = base.config.resolveAccount(api.runtime.cfg, accountId);
116
+ const account = base.config.resolveAccount(api?.runtime?.cfg, accountId);
117
117
  const container = await getOrCreateContainer(account, {
118
- cfg: api.runtime.cfg,
118
+ cfg: api?.runtime?.cfg,
119
119
  abortSignal: new AbortController().signal,
120
- channelRuntime: api.runtime.channelRuntime // Ensure runtime is passed
120
+ channelRuntime: api?.runtime?.channelRuntime // Ensure runtime is passed
121
121
  });
122
122
  const channel = container.get('channel');
123
123
  await channel.handleAgentEvent(evt);
@@ -2,7 +2,7 @@
2
2
  "id": "dragon",
3
3
  "name": "Dragon Workbench Channel",
4
4
  "description": "Connect OpenClaw to the Dragon agent-client workbench chat.",
5
- "version": "0.5.7",
5
+ "version": "0.5.8",
6
6
  "enabledByDefault": true,
7
7
  "activation": {
8
8
  "onCapabilities": ["hook"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@efengx/openclaw-channel-dragon",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Dragon workbench channel for OpenClaw",
5
5
  "author": "feng xiang <ofengx@gmail.com>",
6
6
  "type": "module",
@@ -11,10 +11,6 @@
11
11
  "openclaw.plugin.json",
12
12
  "README.md"
13
13
  ],
14
- "scripts": {
15
- "build": "tsc -p tsconfig.json",
16
- "lint": "echo \"(skip)\""
17
- },
18
14
  "dependencies": {
19
15
  "openclaw": "^2026.4.12"
20
16
  },
@@ -36,5 +32,9 @@
36
32
  },
37
33
  "publishConfig": {
38
34
  "access": "public"
35
+ },
36
+ "scripts": {
37
+ "build": "tsc -p tsconfig.json",
38
+ "lint": "echo \"(skip)\""
39
39
  }
40
- }
40
+ }