@efengx/openclaw-channel-dragon 0.4.8 → 0.4.9
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 +3 -21
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -59,6 +59,9 @@ const base = createChannelPluginBase({
|
|
|
59
59
|
finalize: async () => ({ ok: true })
|
|
60
60
|
},
|
|
61
61
|
config: {
|
|
62
|
+
listAccountIds: (cfg) => {
|
|
63
|
+
return Object.keys(cfg.channels?.[channelId]?.accounts || { "default": {} });
|
|
64
|
+
},
|
|
62
65
|
resolveAccount: (cfg, accountId = "default") => {
|
|
63
66
|
const accountConfig = cfg.channels?.[channelId]?.accounts?.[accountId] || {};
|
|
64
67
|
return {
|
|
@@ -96,33 +99,12 @@ const plugin = createChatChannelPlugin({
|
|
|
96
99
|
},
|
|
97
100
|
}),
|
|
98
101
|
},
|
|
99
|
-
config: {
|
|
100
|
-
get: (cfg) => cfg.channels?.[channelId] || {},
|
|
101
|
-
set: (cfg, value) => {
|
|
102
|
-
cfg.channels = cfg.channels || {};
|
|
103
|
-
cfg.channels[channelId] = value;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
102
|
});
|
|
107
103
|
const entry = defineChannelPluginEntry({
|
|
108
104
|
id: channelId,
|
|
109
105
|
name: "Dragon Workbench Channel",
|
|
110
106
|
description: "Connect OpenClaw to the Dragon agent-client workbench chat.",
|
|
111
107
|
plugin,
|
|
112
|
-
config: {
|
|
113
|
-
get: (cfg) => cfg.channels?.[channelId] || {},
|
|
114
|
-
set: (cfg, value) => {
|
|
115
|
-
cfg.channels = cfg.channels || {};
|
|
116
|
-
cfg.channels[channelId] = value;
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
configHelpers: {
|
|
120
|
-
get: (cfg) => cfg.channels?.[channelId] || {},
|
|
121
|
-
set: (cfg, value) => {
|
|
122
|
-
cfg.channels = cfg.channels || {};
|
|
123
|
-
cfg.channels[channelId] = value;
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
108
|
registerFull(api) {
|
|
127
109
|
cachedRuntime = api.runtime;
|
|
128
110
|
const agentEventHandler = api.runtime?.events?.onAgentEvent || InfraRuntime.onAgentEvent;
|
package/openclaw.plugin.json
CHANGED