@yaoyuanchao/dingtalk 1.4.17 → 1.4.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaoyuanchao/dingtalk",
3
- "version": "1.4.17",
3
+ "version": "1.4.18",
4
4
  "type": "module",
5
5
  "description": "DingTalk channel plugin for Clawdbot with Stream Mode support",
6
6
  "license": "MIT",
package/src/channel.ts CHANGED
@@ -427,7 +427,14 @@ export const dingtalkPlugin = {
427
427
  }
428
428
 
429
429
  console.log(`[dingtalk] sendAttachment success: ${filename}`);
430
- return { ok: true, channel: 'dingtalk', filename };
430
+ // Return format compatible with SDK expectations
431
+ return {
432
+ ok: true,
433
+ channel: 'dingtalk',
434
+ filename,
435
+ // SDK expects content array format for tool results
436
+ content: [{ type: 'text', text: JSON.stringify({ ok: true, filename }) }],
437
+ };
431
438
  },
432
439
  },
433
440
 
@@ -81,8 +81,8 @@ export const dingTalkConfigSchema = z.object({
81
81
  ' - chunk: Split into multiple messages (default, same as official channels)\n' +
82
82
  ' - file: Convert to .md file and send as attachment'
83
83
  ),
84
- longTextThreshold: z.number().int().positive().default(4000).optional()
85
- .describe('Character threshold for longTextMode=file (default 4000)'),
84
+ longTextThreshold: z.number().int().positive().default(8000).optional()
85
+ .describe('Character threshold for longTextMode=file (default 8000)'),
86
86
  }).strict();
87
87
 
88
88
  // 导出配置类型