duclaw-cli 1.8.12 → 1.8.14

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/bundle.js CHANGED
@@ -30242,7 +30242,7 @@ function printHelp() {
30242
30242
  `);
30243
30243
  }
30244
30244
  function printVersion() {
30245
- console.log(`duclaw-cli v${true ? "1.8.12" : "unknown"}`);
30245
+ console.log(`duclaw-cli v${true ? "1.8.14" : "unknown"}`);
30246
30246
  }
30247
30247
  function getDuclawTemplate() {
30248
30248
  return {
@@ -30589,6 +30589,19 @@ var enqueueSpoolMessage = async (input) => {
30589
30589
  };
30590
30590
 
30591
30591
  // src/channels/feishu/feishuChannelsPlugin.ts
30592
+ var buildFeishuMarkdownPostContent = (text2) => JSON.stringify({
30593
+ zh_cn: {
30594
+ title: "",
30595
+ content: [
30596
+ [
30597
+ {
30598
+ tag: "md",
30599
+ text: text2
30600
+ }
30601
+ ]
30602
+ ]
30603
+ }
30604
+ });
30592
30605
  var feishuChannelPlugin = {
30593
30606
  id: `feishu-channel`,
30594
30607
  meta: {
@@ -30612,8 +30625,8 @@ var feishuChannelPlugin = {
30612
30625
  },
30613
30626
  data: {
30614
30627
  receive_id: ctx.to,
30615
- content: JSON.stringify({ text: ctx.text }),
30616
- msg_type: "text"
30628
+ content: buildFeishuMarkdownPostContent(ctx.text),
30629
+ msg_type: "post"
30617
30630
  }
30618
30631
  });
30619
30632
  },
@@ -40423,7 +40436,7 @@ var DESCRIPTION9 = `
40423
40436
  - MUST be called at least once in every user interaction to provide a response
40424
40437
  - Without calling this tool, users receive NO feedback or results whatsoever
40425
40438
  - Always call this tool to acknowledge user requests, report progress, and deliver final results
40426
- - \u4E0D\u8981\u7528markdown\u683C\u5F0F\u56DE\u590D\uFF0C\u7528\u6237\u63A5\u6536\u7AEF\u4E0D\u652F\u6301markdown\u683C\u5F0F\u6E32\u67D3
40439
+ - \u53EF\u4EE5\u4F7F\u7528\u57FA\u7840 Markdown \u63D0\u5347\u53EF\u8BFB\u6027\uFF0C\u4F8B\u5982\u52A0\u7C97\u3001\u5217\u8868\u3001\u94FE\u63A5\u548C\u4EE3\u7801\u5757\uFF1B\u907F\u514D\u590D\u6742\u8868\u683C\u7B49\u98DE\u4E66\u53EF\u80FD\u4E0D\u5B8C\u6574\u652F\u6301\u7684\u683C\u5F0F
40427
40440
  `;
40428
40441
  var sendMessage = {
40429
40442
  name: `send_message`,
@@ -44775,7 +44788,7 @@ The user will primarily request you perform software engineering tasks. This inc
44775
44788
  - Use specialized tools instead of bash commands when possible, as this provides a better user experience. For file operations, use dedicated tools: Read for reading files instead of cat/head/tail, Edit for editing instead of sed/awk, and Write for creating files instead of cat with heredoc or echo redirection. Reserve bash tools exclusively for actual system commands and terminal operations that require shell execution. NEVER use bash echo or other command-line tools to communicate thoughts, explanations, or instructions to the user. Output all communication directly in your response text instead.
44776
44789
  - VERY IMPORTANT: When exploring the codebase to gather context or to answer a question that is not a needle query for a specific file/class/function, it is CRITICAL that you use the Task tool instead of running search commands directly.
44777
44790
  - \u5F53\u7528\u6237\u63D0\u5230"\u4E4B\u524D"\u3001"\u4E0A\u6B21"\u3001"\u4EE5\u524D\u804A\u8FC7"\u7B49\u6D89\u53CA\u5386\u53F2\u5BF9\u8BDD\u7684\u5185\u5BB9\u65F6\uFF0C\u4F7F\u7528 recall_chat_history \u5DE5\u5177\u68C0\u7D22\u3002query \u5FC5\u987B\u5305\u542B\u5177\u4F53\u5173\u952E\u8BCD\uFF0C\u901A\u5E38\u53EA\u9700 1 \u6B21\u8C03\u7528\u5373\u53EF\uFF0C\u907F\u514D\u53CD\u590D\u68C0\u7D22\u6D6A\u8D39\u4E0A\u4E0B\u6587\u3002
44778
- - send_message \u5DE5\u5177\u662F\u4F60\u552F\u4E00\u548C\u7528\u6237\u901A\u4FE1\u7684\u5DE5\u5177\uFF0C\u6BCF\u6B21\u4EA4\u4E92\u90FD\u81F3\u5C11\u8981\u8C03\u7528\u4E00\u6B21\uFF0C\u5426\u5219\uFF0C\u7528\u6237\u5C06\u6536\u4E0D\u5230\u4F60\u7684\u5904\u7406\u7ED3\u679C\uFF0C\u8FD9\u662F\u4E0D\u53EF\u63A5\u53D7\u7684\u3002\u56DE\u590D\u5C3D\u91CF\u4E0D\u8981\u7528markdown\u683C\u5F0F\uFF0C\u65E0\u6CD5\u4FDD\u8BC1\u7528\u6237\u7AEF\u8BBE\u5907\u662F\u5426\u652F\u6301markdown\u6E32\u67D3\u3002
44791
+ - send_message \u5DE5\u5177\u662F\u4F60\u552F\u4E00\u548C\u7528\u6237\u901A\u4FE1\u7684\u5DE5\u5177\uFF0C\u6BCF\u6B21\u4EA4\u4E92\u90FD\u81F3\u5C11\u8981\u8C03\u7528\u4E00\u6B21\uFF0C\u5426\u5219\uFF0C\u7528\u6237\u5C06\u6536\u4E0D\u5230\u4F60\u7684\u5904\u7406\u7ED3\u679C\uFF0C\u8FD9\u662F\u4E0D\u53EF\u63A5\u53D7\u7684\u3002\u53EF\u4F7F\u7528\u57FA\u7840 Markdown \u63D0\u5347\u53EF\u8BFB\u6027\uFF0C\u4F8B\u5982\u52A0\u7C97\u3001\u5217\u8868\u3001\u94FE\u63A5\u548C\u4EE3\u7801\u5757\uFF1B\u907F\u514D\u590D\u6742\u8868\u683C\u7B49\u98DE\u4E66\u53EF\u80FD\u4E0D\u5B8C\u6574\u652F\u6301\u7684\u683C\u5F0F\u3002
44779
44792
  - /<skill-name> (e.g., /commit) is shorthand for users to invoke a user-invocable skill. When executed, the skill gets expanded to a full prompt. Use the Skill tool to execute them. IMPORTANT: Only use Skill for skills listed in its user-invocable skills section - do not guess or use built-in CLI commands.
44780
44793
  </Tool usage policy>
44781
44794
 
@@ -45503,7 +45516,7 @@ var getCronSystemPrompt = () => {
45503
45516
 
45504
45517
  <\u5173\u952E\u89C4\u5219>
45505
45518
  - send_message \u662F\u4F60\u552F\u4E00\u5C06\u7ED3\u679C\u9001\u8FBE\u7528\u6237\u7684\u65B9\u5F0F\uFF0C\u6BCF\u6B21\u6267\u884C\u5FC5\u987B\u81F3\u5C11\u8C03\u7528\u4E00\u6B21\uFF0C\u5426\u5219\u7528\u6237\u5C06\u6536\u4E0D\u5230\u4EFB\u4F55\u7ED3\u679C\u3002
45506
- - \u56DE\u590D\u5185\u5BB9\u4F7F\u7528\u7EAF\u6587\u672C\u683C\u5F0F\uFF0C\u4E0D\u8981\u4F7F\u7528 markdown\uFF0C\u7528\u6237\u63A5\u6536\u7AEF\u53EF\u80FD\u4E0D\u652F\u6301 markdown \u6E32\u67D3\u3002
45519
+ - \u53EF\u4F7F\u7528\u57FA\u7840 Markdown \u63D0\u5347\u56DE\u590D\u53EF\u8BFB\u6027\uFF0C\u4F8B\u5982\u52A0\u7C97\u3001\u5217\u8868\u3001\u94FE\u63A5\u548C\u4EE3\u7801\u5757\uFF1B\u907F\u514D\u590D\u6742\u8868\u683C\u7B49\u98DE\u4E66\u53EF\u80FD\u4E0D\u5B8C\u6574\u652F\u6301\u7684\u683C\u5F0F\u3002
45507
45520
  - \u56DE\u590D\u5185\u5BB9\u5E94\u7B80\u6D01\u3001\u6709\u4FE1\u606F\u91CF\uFF0C\u76F4\u63A5\u5448\u73B0\u7528\u6237\u5173\u5FC3\u7684\u7ED3\u679C\u3002
45508
45521
  - \u5982\u679C\u4EFB\u52A1\u6267\u884C\u8FC7\u7A0B\u4E2D\u9047\u5230\u9519\u8BEF\uFF0C\u4E5F\u8981\u901A\u8FC7 send_message \u544A\u77E5\u7528\u6237\u6267\u884C\u5931\u8D25\u53CA\u539F\u56E0\u3002
45509
45522
  - \u4F18\u5148\u4F7F\u7528\u4E13\u7528\u5DE5\u5177\u800C\u975E\u901A\u7528\u65B9\u6CD5\uFF1A\u7528 web_search \u641C\u7D22\u4FE1\u606F\uFF0C\u7528 read \u8BFB\u53D6\u6587\u4EF6\uFF0C\u4E0D\u8981\u731C\u6D4B\u6216\u7F16\u9020\u6570\u636E\u3002
@@ -50669,16 +50682,18 @@ var collectConversationMessages = async (userId, limit = 300) => {
50669
50682
  for (let i = 0; i < 7; i++) {
50670
50683
  const dateStr = dateKeyInShanghai(now - i * 864e5);
50671
50684
  const messages = await getMessages(storage, userId, limit, dateStr);
50672
- if (messages.length > 0) byDate.push(...messages);
50685
+ if (messages.length > 0) {
50686
+ byDate.push(...messages.map((message) => ({ message, sourceKey: dateStr })));
50687
+ }
50673
50688
  }
50674
- const fallback = byDate.length > 0 ? [] : await getMessages(storage, userId, limit);
50689
+ const fallback = byDate.length > 0 ? [] : (await getMessages(storage, userId, limit)).map((message) => ({ message, sourceKey: "legacy" }));
50675
50690
  const seen = /* @__PURE__ */ new Set();
50676
- return [...byDate, ...fallback].filter((message) => {
50677
- const key = `${message.role}:${message.timestamp ?? ""}:${JSON.stringify(message.content).slice(0, 80)}`;
50691
+ return [...byDate, ...fallback].filter(({ message, sourceKey }) => {
50692
+ const key = `${sourceKey}:${message.role}:${JSON.stringify(message.content).slice(0, 80)}`;
50678
50693
  if (seen.has(key)) return false;
50679
50694
  seen.add(key);
50680
50695
  return true;
50681
- });
50696
+ }).map(({ message }) => message);
50682
50697
  };
50683
50698
  var memoryRoutes = new Hono2();
50684
50699
  memoryRoutes.get("/memory/users", async (c) => {
@@ -50958,7 +50973,7 @@ var systemRoutes = new Hono2();
50958
50973
  var startTime = Date.now();
50959
50974
  systemRoutes.get("/system/info", (c) => {
50960
50975
  return c.json({
50961
- version: true ? "1.8.12" : "unknown",
50976
+ version: true ? "1.8.14" : "unknown",
50962
50977
  uptime: Math.floor((Date.now() - startTime) / 1e3),
50963
50978
  env: process.env.NODE_ENV || "development",
50964
50979
  nodeVersion: process.version