@efengx/openclaw-channel-dragon 0.5.39 → 0.5.41

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.
@@ -164,9 +164,10 @@ export class ChannelComponent {
164
164
  }
165
165
  deliverToOpenClaw = async (content, sessionId = 'default', modelId, attachments, messageId) => {
166
166
  const replyMsgId = messageId ? `dragon_msg_${messageId}` : `dragon_msg_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
167
- if (messageId && this.processedMessageIds.has(messageId))
167
+ const isNewCmd = content?.trim() === '/new' || messageId === 'cmd_new';
168
+ if (!isNewCmd && messageId && this.processedMessageIds.has(messageId))
168
169
  return;
169
- if (messageId) {
170
+ if (!isNewCmd && messageId) {
170
171
  this.processedMessageIds.add(messageId);
171
172
  if (this.processedMessageIds.size > 1000) {
172
173
  const first = this.processedMessageIds.values().next().value;
@@ -183,7 +184,22 @@ export class ChannelComponent {
183
184
  const current = previous
184
185
  .catch(() => { })
185
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
+ };
186
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)}`);
187
203
  const progress = (payload) => this.telemetry.reportProgress({
188
204
  sessionId,
189
205
  msgId: replyMsgId,
@@ -191,20 +207,7 @@ export class ChannelComponent {
191
207
  });
192
208
  try {
193
209
  await replyDispatcher({
194
- ctx: {
195
- Body: content,
196
- From: sessionId === 'default' ? "workbench-user" : `workbench-user-${sessionId}`,
197
- To: this.encodeWorkbenchTarget(sessionId),
198
- ChatType: "direct",
199
- Provider: channelId,
200
- ChannelId: channelId,
201
- AccountId: accountId,
202
- SessionKey: sessionKey,
203
- Timestamp: Date.now(),
204
- Model: modelId || "google/gemini-3.5-flash",
205
- Attachments: attachments,
206
- CommandAuthorized: true,
207
- },
210
+ ctx: openClawCtx,
208
211
  cfg,
209
212
  dispatcherOptions: {
210
213
  deliver: async (payload) => {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const dragonChannelPluginVersion = "0.5.39";
1
+ export declare const dragonChannelPluginVersion = "0.5.41";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const dragonChannelPluginVersion = "0.5.39";
1
+ export const dragonChannelPluginVersion = "0.5.41";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@efengx/openclaw-channel-dragon",
3
- "version": "0.5.39",
3
+ "version": "0.5.41",
4
4
  "description": "Dragon workbench channel for OpenClaw",
5
5
  "author": "feng xiang <ofengx@gmail.com>",
6
6
  "type": "module",