@efengx/openclaw-channel-dragon 0.5.40 → 0.5.42

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.
@@ -184,7 +184,22 @@ export class ChannelComponent {
184
184
  const current = previous
185
185
  .catch(() => { })
186
186
  .then(async () => {
187
+ const openClawCtx = {
188
+ Body: content,
189
+ From: sessionId === 'default' ? "workbench-user" : `workbench-user-${sessionId}`,
190
+ To: this.encodeWorkbenchTarget(sessionId),
191
+ ChatType: "direct",
192
+ Provider: channelId,
193
+ ChannelId: channelId,
194
+ AccountId: accountId,
195
+ SessionKey: sessionKey,
196
+ Timestamp: Date.now(),
197
+ Model: modelId || "google/gemini-3.5-flash",
198
+ Attachments: attachments,
199
+ CommandAuthorized: true,
200
+ };
187
201
  logger?.info?.(`[dragon channels][Dragon Plugin] v${dragonChannelPluginVersion} Sending to OpenClaw: "${content.substring(0, 50)}${content.length > 50 ? '...' : ''}" [WorkbenchSession: ${sessionId}] [OpenClawSessionKey: ${sessionKey}]`);
202
+ logger?.info?.(`[dragon channels][Dragon Plugin] Full outbound payload to OpenClaw: ${JSON.stringify(openClawCtx)}`);
188
203
  const progress = (payload) => this.telemetry.reportProgress({
189
204
  sessionId,
190
205
  msgId: replyMsgId,
@@ -192,20 +207,7 @@ export class ChannelComponent {
192
207
  });
193
208
  try {
194
209
  await replyDispatcher({
195
- ctx: {
196
- Body: content,
197
- From: sessionId === 'default' ? "workbench-user" : `workbench-user-${sessionId}`,
198
- To: this.encodeWorkbenchTarget(sessionId),
199
- ChatType: "direct",
200
- Provider: channelId,
201
- ChannelId: channelId,
202
- AccountId: accountId,
203
- SessionKey: sessionKey,
204
- Timestamp: Date.now(),
205
- Model: modelId || "google/gemini-3.5-flash",
206
- Attachments: attachments,
207
- CommandAuthorized: true,
208
- },
210
+ ctx: openClawCtx,
209
211
  cfg,
210
212
  dispatcherOptions: {
211
213
  deliver: async (payload) => {
@@ -93,6 +93,16 @@ export class MediaRegistryComponent {
93
93
  if (Array.isArray(value.mediaUrls)) {
94
94
  items.push(...value.mediaUrls.map((url) => ({ url })));
95
95
  }
96
+ if (value.media && typeof value.media === "object" && !Array.isArray(value.media)) {
97
+ if (Array.isArray(value.media.attachments))
98
+ items.push(...value.media.attachments);
99
+ if (Array.isArray(value.media.mediaUrls)) {
100
+ items.push(...value.media.mediaUrls.map((url) => ({ url })));
101
+ }
102
+ }
103
+ if (value.details && typeof value.details === "object") {
104
+ items.push(...this.collectStructuredMedia(value.details));
105
+ }
96
106
  return items.filter(Boolean);
97
107
  }
98
108
  async archiveStructuredMedia(value) {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const dragonChannelPluginVersion = "0.5.40";
1
+ export declare const dragonChannelPluginVersion = "0.5.42";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const dragonChannelPluginVersion = "0.5.40";
1
+ export const dragonChannelPluginVersion = "0.5.42";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@efengx/openclaw-channel-dragon",
3
- "version": "0.5.40",
3
+ "version": "0.5.42",
4
4
  "description": "Dragon workbench channel for OpenClaw",
5
5
  "author": "feng xiang <ofengx@gmail.com>",
6
6
  "type": "module",