dominds 1.26.2 → 1.26.4

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.
Files changed (140) hide show
  1. package/README.md +2 -0
  2. package/README.zh.md +2 -0
  3. package/dist/cli.js +10 -8
  4. package/dist/docs/cli-usage.md +1 -1
  5. package/dist/docs/cli-usage.zh.md +1 -1
  6. package/dist/llm/gen/mock.js +11 -3
  7. package/dist/llm/kernel-driver/context-health.d.ts +1 -0
  8. package/dist/llm/kernel-driver/context-health.js +7 -0
  9. package/dist/llm/kernel-driver/drive.js +25 -30
  10. package/dist/llm/kernel-driver/idle-reminder-wake.js +6 -2
  11. package/dist/llm/kernel-driver/reminder-context.d.ts +26 -0
  12. package/dist/llm/kernel-driver/reminder-context.js +82 -0
  13. package/dist/llm/kernel-driver/reply-guidance.js +10 -4
  14. package/dist/llm/kernel-driver/tellask-special.js +50 -35
  15. package/dist/mcp/supervisor.js +2 -2
  16. package/dist/minds/system-prompt-parts.js +30 -30
  17. package/dist/minds/system-prompt.js +63 -40
  18. package/dist/persistence.js +15 -1
  19. package/dist/runtime/driver-messages.d.ts +38 -7
  20. package/dist/runtime/driver-messages.js +320 -119
  21. package/dist/runtime/inter-dialog-format.js +24 -12
  22. package/dist/runtime/reply-prompt-copy.d.ts +8 -8
  23. package/dist/runtime/reply-prompt-copy.js +69 -38
  24. package/dist/server/api-routes.js +7 -2
  25. package/dist/server/certificates.js +65 -25
  26. package/dist/server/dominds-self-update.d.ts +1 -0
  27. package/dist/server/dominds-self-update.js +113 -56
  28. package/dist/supervisor-protocol.d.ts +2 -3
  29. package/dist/tools/mcp.js +12 -12
  30. package/dist/tools/prompts/control/en/index.md +2 -2
  31. package/dist/tools/prompts/control/en/principles.md +12 -12
  32. package/dist/tools/prompts/control/en/scenarios.md +5 -5
  33. package/dist/tools/prompts/control/en/tools.md +10 -10
  34. package/dist/tools/prompts/control/zh/index.md +3 -3
  35. package/dist/tools/prompts/control/zh/principles.md +12 -12
  36. package/dist/tools/prompts/control/zh/scenarios.md +7 -7
  37. package/dist/tools/prompts/control/zh/tools.md +11 -11
  38. package/dist/tools/prompts/mcp_admin/en/principles.md +4 -4
  39. package/dist/tools/prompts/mcp_admin/en/scenarios.md +1 -1
  40. package/dist/tools/prompts/mcp_admin/en/tools.md +3 -3
  41. package/dist/tools/prompts/mcp_admin/zh/principles.md +4 -4
  42. package/dist/tools/prompts/mcp_admin/zh/scenarios.md +1 -1
  43. package/dist/tools/prompts/mcp_admin/zh/tools.md +3 -3
  44. package/dist/tools/team_mgmt-mcp-manual.js +12 -12
  45. package/package.json +2 -1
  46. package/webapp/dist/assets/{_basePickBy-DUivPKf7.js → _basePickBy-mFK6EVZU.js} +3 -3
  47. package/webapp/dist/assets/{_basePickBy-DUivPKf7.js.map → _basePickBy-mFK6EVZU.js.map} +1 -1
  48. package/webapp/dist/assets/{_baseUniq-hcs024vD.js → _baseUniq-C8zyOqn7.js} +2 -2
  49. package/webapp/dist/assets/{_baseUniq-hcs024vD.js.map → _baseUniq-C8zyOqn7.js.map} +1 -1
  50. package/webapp/dist/assets/{arc-Dr6-FXp5.js → arc-Vdl3uhV8.js} +2 -2
  51. package/webapp/dist/assets/{arc-Dr6-FXp5.js.map → arc-Vdl3uhV8.js.map} +1 -1
  52. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DXqcDq4R.js → architectureDiagram-2XIMDMQ5-D3Xtb8u_.js} +7 -7
  53. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DXqcDq4R.js.map → architectureDiagram-2XIMDMQ5-D3Xtb8u_.js.map} +1 -1
  54. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-IIP6LGXS.js → blockDiagram-WCTKOSBZ-Bozcnodw.js} +7 -7
  55. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-IIP6LGXS.js.map → blockDiagram-WCTKOSBZ-Bozcnodw.js.map} +1 -1
  56. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D_d3F9XD.js → c4Diagram-IC4MRINW-CLkxlY6N.js} +3 -3
  57. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D_d3F9XD.js.map → c4Diagram-IC4MRINW-CLkxlY6N.js.map} +1 -1
  58. package/webapp/dist/assets/{channel-CWWjsXtU.js → channel-CqGyLCM_.js} +2 -2
  59. package/webapp/dist/assets/{channel-CWWjsXtU.js.map → channel-CqGyLCM_.js.map} +1 -1
  60. package/webapp/dist/assets/{chunk-4BX2VUAB-BF4yph2W.js → chunk-4BX2VUAB-BNsJpMh4.js} +2 -2
  61. package/webapp/dist/assets/{chunk-4BX2VUAB-BF4yph2W.js.map → chunk-4BX2VUAB-BNsJpMh4.js.map} +1 -1
  62. package/webapp/dist/assets/{chunk-55IACEB6-Hn3CmDYz.js → chunk-55IACEB6-B59p6vzX.js} +2 -2
  63. package/webapp/dist/assets/{chunk-55IACEB6-Hn3CmDYz.js.map → chunk-55IACEB6-B59p6vzX.js.map} +1 -1
  64. package/webapp/dist/assets/{chunk-FMBD7UC4-C05pl9Ov.js → chunk-FMBD7UC4-CB17a_Ki.js} +2 -2
  65. package/webapp/dist/assets/{chunk-FMBD7UC4-C05pl9Ov.js.map → chunk-FMBD7UC4-CB17a_Ki.js.map} +1 -1
  66. package/webapp/dist/assets/{chunk-JSJVCQXG-BVlq_BAS.js → chunk-JSJVCQXG-DVnVflN-.js} +2 -2
  67. package/webapp/dist/assets/{chunk-JSJVCQXG-BVlq_BAS.js.map → chunk-JSJVCQXG-DVnVflN-.js.map} +1 -1
  68. package/webapp/dist/assets/{chunk-KX2RTZJC-BQoaRWif.js → chunk-KX2RTZJC-D9_5LvIO.js} +2 -2
  69. package/webapp/dist/assets/{chunk-KX2RTZJC-BQoaRWif.js.map → chunk-KX2RTZJC-D9_5LvIO.js.map} +1 -1
  70. package/webapp/dist/assets/{chunk-NQ4KR5QH-0okCAXtW.js → chunk-NQ4KR5QH-CZWI2G2c.js} +4 -4
  71. package/webapp/dist/assets/{chunk-NQ4KR5QH-0okCAXtW.js.map → chunk-NQ4KR5QH-CZWI2G2c.js.map} +1 -1
  72. package/webapp/dist/assets/{chunk-QZHKN3VN-DEiprgz-.js → chunk-QZHKN3VN-WCLg8cNX.js} +2 -2
  73. package/webapp/dist/assets/{chunk-QZHKN3VN-DEiprgz-.js.map → chunk-QZHKN3VN-WCLg8cNX.js.map} +1 -1
  74. package/webapp/dist/assets/{chunk-WL4C6EOR-B-Xkb3lo.js → chunk-WL4C6EOR-BFkz_P__.js} +6 -6
  75. package/webapp/dist/assets/{chunk-WL4C6EOR-B-Xkb3lo.js.map → chunk-WL4C6EOR-BFkz_P__.js.map} +1 -1
  76. package/webapp/dist/assets/{classDiagram-VBA2DB6C-DCCQrdwF.js → classDiagram-VBA2DB6C-DWQ1VnaI.js} +7 -7
  77. package/webapp/dist/assets/{classDiagram-VBA2DB6C-DCCQrdwF.js.map → classDiagram-VBA2DB6C-DWQ1VnaI.js.map} +1 -1
  78. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-DCCQrdwF.js → classDiagram-v2-RAHNMMFH-DWQ1VnaI.js} +7 -7
  79. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-DCCQrdwF.js.map → classDiagram-v2-RAHNMMFH-DWQ1VnaI.js.map} +1 -1
  80. package/webapp/dist/assets/{clone-Drtik9pk.js → clone-D3QHqx6z.js} +2 -2
  81. package/webapp/dist/assets/{clone-Drtik9pk.js.map → clone-D3QHqx6z.js.map} +1 -1
  82. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BBWvHErL.js → cose-bilkent-S5V4N54A-D2dZHRG3.js} +2 -2
  83. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BBWvHErL.js.map → cose-bilkent-S5V4N54A-D2dZHRG3.js.map} +1 -1
  84. package/webapp/dist/assets/{dagre-KLK3FWXG-2qk0ikdt.js → dagre-KLK3FWXG-Cwz7pFDo.js} +7 -7
  85. package/webapp/dist/assets/{dagre-KLK3FWXG-2qk0ikdt.js.map → dagre-KLK3FWXG-Cwz7pFDo.js.map} +1 -1
  86. package/webapp/dist/assets/{diagram-E7M64L7V-C1DbHDbf.js → diagram-E7M64L7V-C6z0VVoW.js} +8 -8
  87. package/webapp/dist/assets/{diagram-E7M64L7V-C1DbHDbf.js.map → diagram-E7M64L7V-C6z0VVoW.js.map} +1 -1
  88. package/webapp/dist/assets/{diagram-IFDJBPK2-DToz8zk9.js → diagram-IFDJBPK2-CZ1KR1hO.js} +7 -7
  89. package/webapp/dist/assets/{diagram-IFDJBPK2-DToz8zk9.js.map → diagram-IFDJBPK2-CZ1KR1hO.js.map} +1 -1
  90. package/webapp/dist/assets/{diagram-P4PSJMXO-B9V-tQMe.js → diagram-P4PSJMXO-ChwZDZYa.js} +7 -7
  91. package/webapp/dist/assets/{diagram-P4PSJMXO-B9V-tQMe.js.map → diagram-P4PSJMXO-ChwZDZYa.js.map} +1 -1
  92. package/webapp/dist/assets/{erDiagram-INFDFZHY-CV68FwGf.js → erDiagram-INFDFZHY-DCnHsk_Z.js} +5 -5
  93. package/webapp/dist/assets/{erDiagram-INFDFZHY-CV68FwGf.js.map → erDiagram-INFDFZHY-DCnHsk_Z.js.map} +1 -1
  94. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-CW06almb.js → flowDiagram-PKNHOUZH-C5Hi85ST.js} +7 -7
  95. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-CW06almb.js.map → flowDiagram-PKNHOUZH-C5Hi85ST.js.map} +1 -1
  96. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-C96NncCU.js → ganttDiagram-A5KZAMGK-vT15RP6A.js} +3 -3
  97. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-C96NncCU.js.map → ganttDiagram-A5KZAMGK-vT15RP6A.js.map} +1 -1
  98. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CAuIexWi.js → gitGraphDiagram-K3NZZRJ6-Ct5XDpFu.js} +8 -8
  99. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CAuIexWi.js.map → gitGraphDiagram-K3NZZRJ6-Ct5XDpFu.js.map} +1 -1
  100. package/webapp/dist/assets/{graph-CvhwAY6w.js → graph-CqFTrHii.js} +3 -3
  101. package/webapp/dist/assets/{graph-CvhwAY6w.js.map → graph-CqFTrHii.js.map} +1 -1
  102. package/webapp/dist/assets/{index-BOO_zFrI.js → index-C_PzQ5W5.js} +600 -400
  103. package/webapp/dist/assets/{index-BOO_zFrI.js.map → index-C_PzQ5W5.js.map} +1 -1
  104. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-C16Sckpz.js → infoDiagram-LFFYTUFH-DlyOw8IT.js} +6 -6
  105. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-C16Sckpz.js.map → infoDiagram-LFFYTUFH-DlyOw8IT.js.map} +1 -1
  106. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-oNG6I0p3.js → ishikawaDiagram-PHBUUO56-iZCVn19K.js} +2 -2
  107. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-oNG6I0p3.js.map → ishikawaDiagram-PHBUUO56-iZCVn19K.js.map} +1 -1
  108. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-437hhFHC.js → journeyDiagram-4ABVD52K-B95gnBKj.js} +5 -5
  109. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-437hhFHC.js.map → journeyDiagram-4ABVD52K-B95gnBKj.js.map} +1 -1
  110. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DsCV_Tpx.js → kanban-definition-K7BYSVSG-DQ2gfPUK.js} +3 -3
  111. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DsCV_Tpx.js.map → kanban-definition-K7BYSVSG-DQ2gfPUK.js.map} +1 -1
  112. package/webapp/dist/assets/{layout-BttZf7fQ.js → layout-VOBFudHV.js} +5 -5
  113. package/webapp/dist/assets/{layout-BttZf7fQ.js.map → layout-VOBFudHV.js.map} +1 -1
  114. package/webapp/dist/assets/{linear-B75vD4Ho.js → linear-BtBp93s2.js} +2 -2
  115. package/webapp/dist/assets/{linear-B75vD4Ho.js.map → linear-BtBp93s2.js.map} +1 -1
  116. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-DA1-XaNi.js → mindmap-definition-YRQLILUH-m2w1nBbY.js} +4 -4
  117. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-DA1-XaNi.js.map → mindmap-definition-YRQLILUH-m2w1nBbY.js.map} +1 -1
  118. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-Bx6hUJ4Q.js → pieDiagram-SKSYHLDU-ByoyS2as.js} +8 -8
  119. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-Bx6hUJ4Q.js.map → pieDiagram-SKSYHLDU-ByoyS2as.js.map} +1 -1
  120. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-zyduIle0.js → quadrantDiagram-337W2JSQ-BnKSsLfA.js} +3 -3
  121. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-zyduIle0.js.map → quadrantDiagram-337W2JSQ-BnKSsLfA.js.map} +1 -1
  122. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-BgfjyEJM.js → requirementDiagram-Z7DCOOCP-jU2C7qJN.js} +4 -4
  123. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-BgfjyEJM.js.map → requirementDiagram-Z7DCOOCP-jU2C7qJN.js.map} +1 -1
  124. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-lmOWaczS.js → sankeyDiagram-WA2Y5GQK-R175tX8b.js} +2 -2
  125. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-lmOWaczS.js.map → sankeyDiagram-WA2Y5GQK-R175tX8b.js.map} +1 -1
  126. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqJz-iYI.js → sequenceDiagram-2WXFIKYE-CBhN4j2Q.js} +4 -4
  127. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqJz-iYI.js.map → sequenceDiagram-2WXFIKYE-CBhN4j2Q.js.map} +1 -1
  128. package/webapp/dist/assets/{stateDiagram-RAJIS63D-CngWYuX-.js → stateDiagram-RAJIS63D-DZSAyRfJ.js} +9 -9
  129. package/webapp/dist/assets/{stateDiagram-RAJIS63D-CngWYuX-.js.map → stateDiagram-RAJIS63D-DZSAyRfJ.js.map} +1 -1
  130. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BxyHvrvU.js → stateDiagram-v2-FVOUBMTO-x29lKJpl.js} +5 -5
  131. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BxyHvrvU.js.map → stateDiagram-v2-FVOUBMTO-x29lKJpl.js.map} +1 -1
  132. package/webapp/dist/assets/{timeline-definition-YZTLITO2-C7t6WVS3.js → timeline-definition-YZTLITO2-BQR2qEXt.js} +3 -3
  133. package/webapp/dist/assets/{timeline-definition-YZTLITO2-C7t6WVS3.js.map → timeline-definition-YZTLITO2-BQR2qEXt.js.map} +1 -1
  134. package/webapp/dist/assets/{treemap-KZPCXAKY-BDZ3n5TC.js → treemap-KZPCXAKY-b823qTE1.js} +5 -5
  135. package/webapp/dist/assets/{treemap-KZPCXAKY-BDZ3n5TC.js.map → treemap-KZPCXAKY-b823qTE1.js.map} +1 -1
  136. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-CEw7GPed.js → vennDiagram-LZ73GAT5-BrxPNUYz.js} +2 -2
  137. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-CEw7GPed.js.map → vennDiagram-LZ73GAT5-BrxPNUYz.js.map} +1 -1
  138. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DmS8BiaA.js → xychartDiagram-JWTSCODW-BgOzlz6Z.js} +3 -3
  139. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DmS8BiaA.js.map → xychartDiagram-JWTSCODW-BgOzlz6Z.js.map} +1 -1
  140. package/webapp/dist/index.html +1 -1
@@ -40,7 +40,7 @@ const TELLASK_SPECIAL_FUNCTION_NAMES = [
40
40
  'freshBootsReasoning',
41
41
  ];
42
42
  const MULTIPLE_ASKHUMAN_CALLS_ERROR = '不允许一轮多次调用 askHuman,必须单次调用问所有问题。 Do not call askHuman multiple times in one round; ask all questions in a single askHuman call.';
43
- const MULTIPLE_REPLY_TELLASK_CALLS_ERROR = '不允许一轮多次调用 replyTellask*,必须只用当前诉请要求的唯一 reply special 完成交付。 Do not call multiple replyTellask* functions in one round; deliver with exactly one reply special required by the current tellask.';
43
+ const MULTIPLE_REPLY_TELLASK_CALLS_ERROR = '不允许一轮多次调用回复工具;只能用当前诉请要求的那个回复工具发送最终结果。 Do not call multiple reply tools in one round; send the final result with the one reply tool required by the current tellask.';
44
44
  function isTellaskCallFunctionName(name) {
45
45
  return TELLASK_SPECIAL_FUNCTION_NAMES.includes(name);
46
46
  }
@@ -63,6 +63,11 @@ function formatReplyFuncResult(args) {
63
63
  ? `已通过 \`${args.replyCallName}\` 送达回复。`
64
64
  : `Reply delivered via \`${args.replyCallName}\`.`;
65
65
  }
66
+ // Business scenario: the model called a reply tool when Dominds durable state says either "wrong
67
+ // reply path" or "nothing is waiting for this reply anymore". These are programmatic facts from the
68
+ // active reply record, not something the model should infer from transcript history. Keep the
69
+ // tool result actionable: name the exact tool to use, or tell the model to stop trying to send a
70
+ // reply and continue the current local conversation.
66
71
  function formatReplyFuncErrorResult(args) {
67
72
  const language = (0, work_language_1.getWorkLanguage)();
68
73
  if (language === 'zh') {
@@ -74,11 +79,11 @@ function formatReplyFuncErrorResult(args) {
74
79
  return (`错误:当前精确应调用 \`${args.expectedCallName}\`,而不是 \`${args.attemptedCallName}\`。\n\n` +
75
80
  `请改用 \`${args.expectedCallName}({ replyContent })\`。`);
76
81
  case 'no_active':
77
- return (`错误:当前没有待完成的跨对话回复义务。\n\n` +
78
- `不要调用 \`${args.attemptedCallName}\`;请直接继续当前本地对话。`);
82
+ return (`错误:当前没有别的对话在等你发送最终回贴。\n\n` +
83
+ `你刚才调用的 \`${args.attemptedCallName}\` 这次不会送达给别的对话。请按当前对话正常交流;如果用户提出了问题,就直接回答这个问题。`);
79
84
  case 'no_pending':
80
- return (`错误:当前已没有待本对话送达的跨对话回复义务(可能已回复或已失效)。\n\n` +
81
- `不要再次调用 \`${args.attemptedCallName}\`;请直接继续当前本地对话。`);
85
+ return (`错误:这条回贴任务已经不再等待本对话送达(可能已回复或已失效)。\n\n` +
86
+ `你刚才调用的 \`${args.attemptedCallName}\` 这次不会送达给别的对话。请按当前对话正常交流;如果用户提出了问题,就直接回答这个问题。`);
82
87
  }
83
88
  }
84
89
  switch (args.reason) {
@@ -89,11 +94,11 @@ function formatReplyFuncErrorResult(args) {
89
94
  return (`Error: the exact reply tool for the current state is \`${args.expectedCallName}\`, not \`${args.attemptedCallName}\`.\n\n` +
90
95
  `Call \`${args.expectedCallName}({ replyContent })\` instead.`);
91
96
  case 'no_active':
92
- return ('Error: there is no active inter-dialog reply obligation right now.\n\n' +
93
- `Do not call \`${args.attemptedCallName}\`; continue the current local conversation instead.`);
97
+ return ('Error: no other dialog is waiting for your final reply right now.\n\n' +
98
+ `Your \`${args.attemptedCallName}\` call will not deliver anything to another dialog this time. Handle this as a normal turn in the current conversation; if the user asked a question, answer that question directly.`);
94
99
  case 'no_pending':
95
- return ('Error: there is no longer a pending inter-dialog reply obligation for this dialog (it may already be resolved or no longer valid).\n\n' +
96
- `Do not call \`${args.attemptedCallName}\` again; continue the current local conversation instead.`);
100
+ return ('Error: this reply task is no longer waiting for delivery from this dialog; it may already be resolved or no longer valid.\n\n' +
101
+ `Your \`${args.attemptedCallName}\` call will not deliver anything to another dialog this time. Handle this as a normal turn in the current conversation; if the user asked a question, answer that question directly.`);
97
102
  }
98
103
  }
99
104
  function buildAssignmentReplyDirective(args) {
@@ -554,49 +559,54 @@ function formatPendingTellaskFuncResultContent(name, startedAtMs, callId) {
554
559
  const elapsedSec = Math.floor(elapsedMs / 1000);
555
560
  return language === 'zh' ? `${elapsedSec} 秒` : `${elapsedSec}s`;
556
561
  })();
562
+ // Business scenario: a tool call has been accepted and dispatched, but no answer has arrived
563
+ // yet. This tool result is a waiting status, not the teammate/human answer body. If the copy
564
+ // exposes only call IDs and "tellask status", models often treat it as a result and continue
565
+ // with invented content. Say plainly who we are waiting for and that Dominds will add the real
566
+ // answer later.
557
567
  if (name === 'askHuman') {
558
568
  return language === 'zh'
559
569
  ? [
560
- '[Dominds 诉请状态]',
570
+ '[Dominds 等待人类回复]',
561
571
  '',
562
- '`askHuman` 诉请已发出,当前仍在等待人类回复。',
572
+ '你已经向人类提问,当前仍在等待回答。',
563
573
  '',
564
574
  ...(callId ? [`- callId: ${callId}`] : []),
565
575
  `- 已等待: ${elapsed}`,
566
576
  '',
567
- '这不是回贴内容。若后续收到回复,运行时会在后续上下文中用同一 callId 补入对应回复事实。',
577
+ '这不是回答正文。若人类稍后回复,Dominds 会把对应结果补入后续上下文。',
568
578
  ].join('\n')
569
579
  : [
570
- '[Dominds tellask status]',
580
+ '[Dominds waiting for human answer]',
571
581
  '',
572
- '`askHuman` has been issued and is still waiting for human reply.',
582
+ 'You already asked the human and are still waiting for their answer.',
573
583
  '',
574
584
  ...(callId ? [`- callId: ${callId}`] : []),
575
585
  `- Elapsed: ${elapsed}`,
576
586
  '',
577
- 'This is not reply content. If a reply arrives later, runtime will append the corresponding reply fact in later context with the same callId.',
587
+ 'This is not the answer body. If the human replies later, Dominds will add the result to later context.',
578
588
  ].join('\n');
579
589
  }
580
590
  return language === 'zh'
581
591
  ? [
582
- '[Dominds 诉请状态]',
592
+ '[Dominds 等待队友回贴]',
583
593
  '',
584
- `\`${name}\` 诉请已发出,当前仍在等待回贴。`,
594
+ `你已经发出 \`${name}\`,当前仍在等待队友回贴。`,
585
595
  '',
586
596
  ...(callId ? [`- callId: ${callId}`] : []),
587
597
  `- 已等待: ${elapsed}`,
588
598
  '',
589
- '这不是回贴内容。若后续收到回贴,运行时会在后续上下文中用同一 callId 补入对应回贴事实。',
599
+ '这不是回贴正文。若稍后收到回贴,Dominds 会把对应结果补入后续上下文。',
590
600
  ].join('\n')
591
601
  : [
592
- '[Dominds tellask status]',
602
+ '[Dominds waiting for teammate reply]',
593
603
  '',
594
- `\`${name}\` has been issued and is still waiting for a reply.`,
604
+ `You already sent \`${name}\` and are still waiting for the teammate's reply.`,
595
605
  '',
596
606
  ...(callId ? [`- callId: ${callId}`] : []),
597
607
  `- Elapsed: ${elapsed}`,
598
608
  '',
599
- 'This is not reply content. If a reply arrives later, runtime will append the corresponding reply fact in later context with the same callId.',
609
+ 'This is not the reply body. If a reply arrives later, Dominds will add the result to later context.',
600
610
  ].join('\n');
601
611
  }
602
612
  function formatResolvedTellaskFuncResultContent(args) {
@@ -605,55 +615,60 @@ function formatResolvedTellaskFuncResultContent(args) {
605
615
  if (callId === '') {
606
616
  throw new Error(`tellask status formatter invariant violation: empty callId for ${args.name}`);
607
617
  }
618
+ // Business scenario: a previously dispatched teammate request is being summarized back into
619
+ // context as status. For `pending`, there is still no reply body. For `completed`/`failed`, the
620
+ // actual reply/failure fact is injected separately. The model-facing text must keep those
621
+ // separate so the model neither hallucinates a pending result nor treats this status line as the
622
+ // teammate's answer.
608
623
  if (language === 'zh') {
609
624
  if (args.status === 'pending') {
610
625
  return [
611
- '[Dominds 诉请状态]',
626
+ '[Dominds 等待队友回贴]',
612
627
  '',
613
- `\`${args.name}\` 诉请仍在等待回贴,当前没有回贴正文。`,
628
+ `\`${args.name}\` 仍在等待队友回贴,当前没有回贴正文。`,
614
629
  '',
615
630
  `- callId: ${callId}`,
616
631
  '',
617
- '不要把本工具结果当作回贴正文;若后续收到回贴,运行时会用同一 callId 补入对应回贴事实。',
632
+ '不要把这条状态当作回贴正文;若稍后收到回贴,Dominds 会补入对应结果。',
618
633
  ].join('\n');
619
634
  }
620
635
  const statusLabel = args.status === 'completed' ? '已收到回贴' : '已失败收口';
621
636
  return [
622
- '[Dominds 诉请状态]',
637
+ '[Dominds 队友回贴状态]',
623
638
  '',
624
- `\`${args.name}\` 诉请${statusLabel},对应回贴事实已作为独立上下文事实补入。`,
639
+ `\`${args.name}\` ${statusLabel},对应结果已作为独立上下文补入。`,
625
640
  '',
626
641
  `- callId: ${callId}`,
627
642
  '',
628
- '请以同一 callId 的独立回贴事实为准;不要把本工具结果当作回贴正文。',
643
+ '请以那条独立结果为准;不要把这条状态当作回贴正文。',
629
644
  ].join('\n');
630
645
  }
631
646
  if (args.status === 'pending') {
632
647
  return [
633
- '[Dominds tellask status]',
648
+ '[Dominds waiting for teammate reply]',
634
649
  '',
635
- `\`${args.name}\` is still waiting for a reply; there is no reply body yet.`,
650
+ `\`${args.name}\` is still waiting for the teammate's reply; there is no reply body yet.`,
636
651
  '',
637
652
  `- callId: ${callId}`,
638
653
  '',
639
- 'Do not treat this tool result as reply content. If a reply arrives later, runtime will append the corresponding reply fact with the same callId.',
654
+ 'Do not treat this status as the reply body. If a reply arrives later, Dominds will add the result.',
640
655
  ].join('\n');
641
656
  }
642
657
  const statusLabel = args.status === 'completed' ? 'has received a reply' : 'has failed/closed';
643
658
  return [
644
- '[Dominds tellask status]',
659
+ '[Dominds teammate reply status]',
645
660
  '',
646
- `\`${args.name}\` ${statusLabel}; the corresponding reply fact is present separately in context.`,
661
+ `\`${args.name}\` ${statusLabel}; the corresponding result is present separately in context.`,
647
662
  '',
648
663
  `- callId: ${callId}`,
649
664
  '',
650
- 'Use the separate reply fact with the same callId as authoritative; do not treat this tool result as reply content.',
665
+ 'Use that separate result as authoritative; do not treat this status as the reply body.',
651
666
  ].join('\n');
652
667
  }
653
668
  function formatResolvedAskHumanResultContent() {
654
669
  return (0, work_language_1.getWorkLanguage)() === 'zh'
655
- ? 'Q4H 已结束等待状态,请参考 askHuman 结果气泡。'
656
- : 'Q4H wait is resolved; refer to the askHuman result bubble.';
670
+ ? '人类已经回答;请参考 askHuman 结果气泡。'
671
+ : 'The human has answered; refer to the askHuman result bubble.';
657
672
  }
658
673
  function buildPendingTellaskFuncResult(args) {
659
674
  return {
@@ -927,14 +927,14 @@ function upsertMcpToolCallProblem(args) {
927
927
  const hintLines = workLanguage === 'zh'
928
928
  ? [
929
929
  '建议排查:',
930
- `- 如果需要全局重建该 MCP server,直接调用 mcp_restart({"serverId":"${args.serverId}"});它成功后会清理旧 runtime 的全部 lease`,
930
+ `- 如果需要全局重建该 MCP server,直接调用 mcp_restart({"serverId":"${args.serverId}"});它成功后会清理旧连接/进程的全部 lease`,
931
931
  `- 如果只想丢弃当前对话的连接,再调用 mcp_release({"serverId":"${args.serverId}"})`,
932
932
  `- 重新打开/关闭浏览器窗口,避免 Playwright persistent context 残留`,
933
933
  `- 查看 ${MCP_YAML_PATH} 是否已加载且配置正确(Problems 面板 / 后端日志)`,
934
934
  ]
935
935
  : [
936
936
  'Suggested checks:',
937
- `- To rebuild this MCP server globally, call mcp_restart({"serverId":"${args.serverId}"}) directly; a successful restart clears all leases on the old runtime`,
937
+ `- To rebuild this MCP server globally, call mcp_restart({"serverId":"${args.serverId}"}) directly; a successful restart clears all leases on the old connection/process`,
938
938
  `- To discard only this dialog's connection, call mcp_release({"serverId":"${args.serverId}"})`,
939
939
  `- Close/reopen browser windows to avoid leftover Playwright persistent contexts`,
940
940
  `- Verify ${MCP_YAML_PATH} is loaded and valid (Problems panel / backend logs)`,
@@ -138,39 +138,39 @@ function getMemoryPromptCopy(ctx) {
138
138
  const runtimeMarkers = (0, inter_dialog_format_1.getRuntimeTransferMarkers)(ctx.language);
139
139
  const contextHealthLineZh = ctx.contextHealthPromptMode === 'critical'
140
140
  ? ctx.isSideDialog
141
- ? '当前上下文处于系统告急处置态:立即停止继续大实现/大阅读。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,只维护足够详尽的接续包提醒项并 `clear_mind`。提醒项长度没有技术限制。'
142
- : '当前上下文处于系统告急处置态:立即停止继续大实现/大阅读。本程只做保信息:先把当前对话历史中尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再提炼接续包提醒项并 `clear_mind`。'
141
+ ? 'Dominds 已提醒上下文告急:立即停止继续大实现/大阅读。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,只维护足够详尽的接续包提醒项并 `clear_mind`。提醒项没有固定长度限制。'
142
+ : 'Dominds 已提醒上下文告急:立即停止继续大实现/大阅读。本程只做保信息:先把当前对话历史中尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再提炼接续包提醒项并 `clear_mind`。'
143
143
  : ctx.contextHealthPromptMode === 'caution'
144
144
  ? ctx.isSideDialog
145
- ? '当前上下文处于系统吃紧处置态:不要继续扩张上下文。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,优先维护足够详尽的接续包提醒项并尽快 `clear_mind`。提醒项长度没有技术限制。'
146
- : '当前上下文处于系统吃紧处置态:不要继续扩张上下文。本程优先把尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再提炼提醒项并尽快 `clear_mind`,不要继续大实现/大阅读。'
147
- : '当前没有生效中的上下文健康处置指令,按正常工作流推进。';
145
+ ? 'Dominds 已提醒上下文吃紧:不要继续扩张上下文。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,优先维护足够详尽的接续包提醒项并尽快 `clear_mind`。提醒项没有固定长度限制。'
146
+ : 'Dominds 已提醒上下文吃紧:不要继续扩张上下文。本程优先把尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再提炼提醒项并尽快 `clear_mind`,不要继续大实现/大阅读。'
147
+ : '当前没有生效中的上下文保全提示,按正常工作流推进。';
148
148
  const taskdocLogLineZh = ctx.contextHealthPromptMode === 'critical'
149
149
  ? ctx.isSideDialog
150
- ? '当前是告急处置态:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项长度没有技术限制,宁可完整一些;允许多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
151
- : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。当前是告急处置态:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;本程允许先保留多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
150
+ ? 'Dominds 已提醒上下文告急:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项没有固定长度限制,宁可完整一些;允许多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
151
+ : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。Dominds 已提醒上下文告急:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;本程允许先保留多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
152
152
  : ctx.contextHealthPromptMode === 'caution'
153
153
  ? ctx.isSideDialog
154
- ? '当前是吃紧处置态:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项长度没有技术限制,宁可完整一些;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
155
- : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。当前是吃紧处置态:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
154
+ ? 'Dominds 已提醒上下文吃紧:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项没有固定长度限制,宁可完整一些;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
155
+ : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。Dominds 已提醒上下文吃紧:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
156
156
  : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步;提醒项也只留可扫读摘录。接续包提醒项默认应保持结构化、便于快速恢复。';
157
157
  const contextHealthLineEn = ctx.contextHealthPromptMode === 'critical'
158
158
  ? ctx.isSideDialog
159
- ? 'Current context is under system critical remediation: stop large implementations/reads immediately. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Only maintain sufficiently detailed continuation-package reminders and `clear_mind`. Reminder length has no technical limit.'
160
- : 'Current context is under system critical remediation: stop large implementations/reads immediately. In this course, only preserve information: first record current-dialog discussion details that are not yet documented but the next course needs to know into the appropriate Taskdoc sections, then distill continuation-package reminders and `clear_mind`.'
159
+ ? 'Dominds has warned that context is critical: stop large implementations/reads immediately. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Only maintain sufficiently detailed continuation-package reminders and `clear_mind`. Reminders have no fixed length limit.'
160
+ : 'Dominds has warned that context is critical: stop large implementations/reads immediately. In this course, only preserve information: first record current-dialog discussion details that are not yet documented but the next course needs to know into the appropriate Taskdoc sections, then distill continuation-package reminders and `clear_mind`.'
161
161
  : ctx.contextHealthPromptMode === 'caution'
162
162
  ? ctx.isSideDialog
163
- ? 'Current context is under system caution remediation: do not keep expanding context. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Prioritize sufficiently detailed continuation-package reminders and `clear_mind`. Reminder length has no technical limit.'
164
- : 'Current context is under system caution remediation: do not keep expanding context. In this course, first record undocumented discussion details that the next course needs to know into the appropriate Taskdoc sections, then distill reminders and `clear_mind`; do not continue large implementations/reads.'
165
- : 'There is no active context-health remediation instruction in effect right now; proceed with the normal workflow.';
163
+ ? 'Dominds has warned that context is tight: do not keep expanding context. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Prioritize sufficiently detailed continuation-package reminders and `clear_mind`. Reminders have no fixed length limit.'
164
+ : 'Dominds has warned that context is tight: do not keep expanding context. In this course, first record undocumented discussion details that the next course needs to know into the appropriate Taskdoc sections, then distill reminders and `clear_mind`; do not continue large implementations/reads.'
165
+ : 'There is no active context-preservation notice in effect right now; proceed with the normal workflow.';
166
166
  const taskdocLogLineEn = ctx.contextHealthPromptMode === 'critical'
167
167
  ? ctx.isSideDialog
168
- ? 'Current mode is critical remediation: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put discussion details from current dialog history that the next course needs to know, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into continuation-package reminders. Reminder length has no technical limit, so prefer being complete. Rough multi-reminder bridge notes are acceptable in this course, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
169
- : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Current mode is critical remediation: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you have first called `recall_taskdoc` to get the current `content_hash` as `previous_content_hash`. Continuation-package reminders should keep only details still not covered by Taskdoc but easy to lose during resume. Rough multi-reminder bridge notes are acceptable in this course, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
168
+ ? 'Dominds has warned that context is critical: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put discussion details from current dialog history that the next course needs to know, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into continuation-package reminders. Reminders have no fixed length limit, so prefer being complete. Rough multi-reminder bridge notes are acceptable in this course, but do not perform the new-course “clear-headed review” early. Once Dominds actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
169
+ : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Dominds has warned that context is critical: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you have first called `recall_taskdoc` to get the current `content_hash` as `previous_content_hash`. Continuation-package reminders should keep only details still not covered by Taskdoc but easy to lose during resume. Rough multi-reminder bridge notes are acceptable in this course, but do not perform the new-course “clear-headed review” early. Once Dominds actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
170
170
  : ctx.contextHealthPromptMode === 'caution'
171
171
  ? ctx.isSideDialog
172
- ? 'Current mode is caution remediation: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put discussion details from current dialog history that the next course needs to know, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into continuation-package reminders. Reminder length has no technical limit, so prefer being complete. If needed, rough multi-reminder bridge notes are acceptable, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
173
- : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Current mode is caution remediation: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you have first called `recall_taskdoc` to get the current `content_hash` as `previous_content_hash`. Continuation-package reminders should keep only details still not covered by Taskdoc but easy to lose during resume. If needed, rough multi-reminder bridge notes are acceptable, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
172
+ ? 'Dominds has warned that context is tight: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put discussion details from current dialog history that the next course needs to know, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into continuation-package reminders. Reminders have no fixed length limit, so prefer being complete. If needed, rough multi-reminder bridge notes are acceptable, but do not perform the new-course “clear-headed review” early. Once Dominds actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
173
+ : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Dominds has warned that context is tight: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you have first called `recall_taskdoc` to get the current `content_hash` as `previous_content_hash`. Continuation-package reminders should keep only details still not covered by Taskdoc but easy to lose during resume. If needed, rough multi-reminder bridge notes are acceptable, but do not perform the new-course “clear-headed review” early. Once Dominds actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
174
174
  : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps; reminders should also keep only scannable excerpts. Keep continuation-package reminders structured and fast to resume from by default.';
175
175
  if (ctx.language === 'zh') {
176
176
  return {
@@ -180,29 +180,29 @@ function getMemoryPromptCopy(ctx) {
180
180
  taskdocContractLine: '- 差遣牒(`*.tsk/`):全队共享的任务契约(goals/constraints/progress);不是个人笔记,保持足够短,每轮都应可通读。',
181
181
  taskdocSemanticsLine: '- 章节语义约定:`progress` 是全队共享、准实时、可扫读的任务公告牌,用来记录当前有效状态、关键决策、下一步与仍成立阻塞;不是流水账,也不是个人工作记录。`goals` / `constraints` 是较稳定的任务契约;每次更新都必须保留仍然有效的他人条目。',
182
182
  taskdocSectionReplaceLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
183
- ? '- 当前处于支线对话的上下文健康处置态:本程不要维护差遣牒,也不要整理差遣牒更新提案;把下一程需要恢复的细节写入足够详尽的接续包提醒项。'
183
+ ? '- Dominds 已提醒当前上下文吃紧/告急,且你处于支线对话:本程不要维护差遣牒,也不要整理差遣牒更新提案;把下一程需要恢复的细节写入足够详尽的接续包提醒项。'
184
184
  : `- 更新差遣牒时:少量新增条目可用 \`mind_more\` 追加(默认 progress);缺失章节用 \`do_mind\` 创建;需要删除陈旧项、重排结构或压缩时,先对照上下文中注入的当前内容完成合并,再调用 \`recall_taskdoc\` 取得当前 \`content_hash\`,然后用带 \`previous_content_hash\` 的 \`change_mind\` 整章替换;需要删除整章文件时用 \`never_mind\`;禁止覆盖/抹掉他人条目;自己负责维护的条目必须标注责任人(例如 \`- [owner:@${ctx.agentId}] ...\` 或用 \`### @${ctx.agentId}\` 分块)。`,
185
185
  progressLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
186
- ? '- 当前处于支线对话的上下文健康处置态:本程不更新 `progress`;只把下一程接续所需信息写入提醒项。'
186
+ ? '- Dominds 已提醒当前上下文吃紧/告急,且你处于支线对话:本程不更新 `progress`;只把下一程接续所需信息写入提醒项。'
187
187
  : '- 更新 `progress` 时:它必须始终是可供全队扫读的完整当前快照,而不是只追加自己这一轮的零散笔记。',
188
188
  injectedTaskdocLine: '- 重要:差遣牒内容会被系统以内联形式注入到上下文中(本轮生成视角下即为最新;注入内容不包括全局约束)。需要回顾时请直接基于上下文里的差遣牒内容回顾与决策,不要试图用通用文件工具读取 `*.tsk/` 下的文件(会被拒绝)。',
189
189
  constraintsLine: '- 约定:`constraints` 只写任务特有的硬要求,不得写入系统提示/工具文档里已明确且由系统强制执行的通用规则(例如 `*.tsk/` 封装禁止通用文件工具)。一经发现重复,必须删除并告知用户。',
190
190
  remindersLine: ctx.isSideDialog
191
- ? '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,整理“结构化接续包提醒项”;提醒项保留恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若系统已把当前程切到吃紧/告急处置态,支线对话不要维护差遣牒,也不要整理差遣牒更新提案;只维护足够详尽的接续包提醒项,提醒项长度没有技术限制,允许先保留多条粗略提醒项把信息带过桥;当前程只做保信息 + clear_mind;只有系统实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。'
192
- : '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,先把尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再整理“结构化接续包提醒项”;提醒项只保留差遣牒仍未覆盖、但恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若系统已把当前程切到吃紧/告急处置态,则允许先保留多条粗略提醒项把信息带过桥;当前程只做落文档、保信息 + clear_mind;只有系统实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。',
191
+ ? '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,整理“结构化接续包提醒项”;提醒项保留恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若 Dominds 已提醒当前程吃紧/告急,支线对话不要维护差遣牒,也不要整理差遣牒更新提案;只维护足够详尽的接续包提醒项,提醒项没有固定长度限制,允许先保留多条粗略提醒项把信息带过桥;当前程只做保信息 + clear_mind;只有 Dominds 实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。'
192
+ : '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,先把尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再整理“结构化接续包提醒项”;提醒项只保留差遣牒仍未覆盖、但恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若 Dominds 已提醒当前程吃紧/告急,则允许先保留多条粗略提醒项把信息带过桥;当前程只做落文档、保信息 + clear_mind;只有 Dominds 实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。',
193
193
  teamMemoryLine: '- 团队记忆:稳定的团队约定/工程规约(跨任务共享)。',
194
194
  personalMemoryLine: '- 个人记忆:稳定的个人习惯/偏好与职责域知识;记忆会在每次生成时自动注入上下文,应保持少量且准确(关键文档/代码的精确路径 + 最小必要事实)。不要记录具体任务状态。',
195
195
  skillsLine: '- Skills:可复用操作指引/检查清单/触发条件与边界。工作区关联强的事实、路径、局部契约进 memory/env;独立于工作区内容的“怎么做”进 skill。skill 不授予工具权限;需要脚本/MCP/外部能力时应配套 app/toolset/权限配置。',
196
196
  sideDialogDutyLine: ctx.contextHealthPromptMode === 'normal'
197
197
  ? `你当前处于支线对话:此处不允许 \`do_mind\` / \`mind_more\` / \`change_mind\` / \`never_mind\`。当你判断需要更新差遣牒(尤其是 progress 公告牌)时,请在合适时机直接诉请差遣牒维护人 \`@${ctx.taskdocMaintainerId}\` 执行更新,并给出要新增的章节、要追加的条目、已合并好的“新全文/替换稿”,或要删除的章节。不要声称已更新,除非看到回执。`
198
- : '你当前处于支线对话,且上下文已进入吃紧/告急处置态:本程不要维护差遣牒,也不要整理差遣牒更新提案。请把下一程需要恢复的讨论细节、定位、验证方式和临时信息写入足够详尽的接续包提醒项。',
198
+ : '你当前处于支线对话,且 Dominds 已提醒上下文吃紧/告急:本程不要维护差遣牒,也不要整理差遣牒更新提案。请把下一程需要恢复的讨论细节、定位、验证方式和临时信息写入足够详尽的接续包提醒项。',
199
199
  mainDialogDutyLine: '你当前处于主线对话:你负责综合维护全队共享差遣牒(尤其是 progress 公告牌)。当队友/支线对话提出更新建议时,及时合并、压缩并保持清晰。',
200
200
  teammateTellaskRoundDoneLine: `队友诉请重要语义:当你在诉请者上下文中收到带${runtimeMarkers.finalCompleted}标记的回贴,表示该轮诉请已经结束;对方不会继续执行同一轮诉请。此时如果目标未达成,“等待”是错误的:必须显式发起新一轮 tellask 才能继续推进。并行语义:不要把智能体队友当成真人同事;祂不会因为你又发一条诉请而被打扰。同一个队友 + 同一个 sessionSlug = 接着同一件事说,并更新那件正在做的事;tellaskSessionless 或不同 sessionSlug = 另一件独立任务。`,
201
201
  teamMemoryHintLine: '提示:你具备团队记忆工具(`add_team_memory` / `replace_team_memory` / `drop_team_memory` / `clear_team_memory`),可在必要时维护团队记忆(谨慎、少量、只写稳定约定)。',
202
202
  personalMemoryHintLine: `提示:你具备个人记忆工具(\`add_personal_memory\` / \`replace_personal_memory\` / \`drop_personal_memory\` / \`clear_personal_memory\`)。个人记忆仅对当前智能体可见,且系统会自动按成员隔离到 \`.minds/memory/individual/<member-id>/...\`;因此 \`path\` 不应包含你的成员 id(不要写 \`${ctx.agentId}/...\`)。首次创建时直接用 \`add_personal_memory\` 即可,目录会由系统自动创建。记忆会在每次生成时自动注入上下文:保持少量、保持准确、按“未来会一起更新的内容”合并;写稳定事实(关键路径 + 最小必要约定),不要写任务进度/当天状态;一旦你修改了相关文件或发现记忆过期/冲突,立刻用 \`replace_personal_memory\` 更新。`,
203
203
  sideDialogWorkflowLine: ctx.contextHealthPromptMode === 'normal'
204
204
  ? `工作流:先做事 → 再提炼(\`update_reminder\`;必要时整理差遣牒追加条目/更新提案并诉请 \`@${ctx.taskdocMaintainerId}\` 合并写入)→ 然后 \`clear_mind\` 清空噪音。`
205
- : '工作流:停止扩张上下文 → 维护足够详尽的接续包提醒项(`add_reminder` 或 `update_reminder`,长度没有技术限制)→ 然后 `clear_mind` 开启新一程。',
205
+ : '工作流:停止扩张上下文 → 维护足够详尽的接续包提醒项(`add_reminder` 或 `update_reminder`,没有固定长度限制)→ 然后 `clear_mind` 开启新一程。',
206
206
  mainDialogWorkflowLine: '工作流:先做事 -> 再提炼(`update_reminder` + `mind_more(progress)`;需要压缩/删旧时先 `recall_taskdoc` 取得 `content_hash`,再用带 `previous_content_hash` 的 `change_mind`;要删除整章文件时用 `never_mind`)-> 然后 `clear_mind` 清空噪音。',
207
207
  ...(ctx.isSideDialog
208
208
  ? {}
@@ -220,29 +220,29 @@ function getMemoryPromptCopy(ctx) {
220
220
  taskdocContractLine: '- Taskdoc (`*.tsk/`): the team-shared task contract (goals/constraints/progress). It is not a personal notebook; keep it small enough to read every course.',
221
221
  taskdocSemanticsLine: '- Section semantics: `progress` is the team-shared, quasi-real-time, scannable task bulletin board for current effective state, key decisions, next steps, and still-active blockers; it is not a raw log or personal work record. `goals` / `constraints` are the more stable task contract; every update must preserve still-valid entries from others.',
222
222
  taskdocSectionReplaceLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
223
- ? '- Current mode is context-health remediation in a Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course; put resume-critical details into sufficiently detailed continuation-package reminders.'
223
+ ? '- Dominds has warned that context is tight/critical in this Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course; put resume-critical details into sufficiently detailed continuation-package reminders.'
224
224
  : `- When updating Taskdoc: use \`mind_more\` for small append-only additions (defaults to progress); create missing sections with \`do_mind\`; when stale entries must be removed, reordered, or compressed, first merge against the current injected content, then call \`recall_taskdoc\` to get the current \`content_hash\`, then use \`change_mind\` for a full-section replacement with that value as \`previous_content_hash\`; when a whole section file should be removed, use \`never_mind\`; do not overwrite other contributors; add an explicit owner tag for entries you maintain (e.g., \`- [owner:@${ctx.agentId}] ...\` or a \`### @${ctx.agentId}\` block).`,
225
225
  progressLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
226
- ? '- Current mode is context-health remediation in a Side Dialog: do not update `progress` in this course; put resume-critical information into reminders only.'
226
+ ? '- Dominds has warned that context is tight/critical in this Side Dialog: do not update `progress` in this course; put resume-critical information into reminders only.'
227
227
  : '- When updating `progress`, keep it as a complete, team-scannable current snapshot instead of appending only your own latest notes.',
228
228
  injectedTaskdocLine: '- Important: the Taskdoc content is injected inline into the context (the latest as of this generation; injected content excludes global constraints). Review the injected Taskdoc instead of trying to read files under `*.tsk/` via general file tools (they will be rejected).',
229
229
  constraintsLine: '- Convention: Taskdoc `constraints` must contain task-specific requirements only; do not include global, system-enforced rules already stated in system prompt/tool docs (e.g. `.tsk/` encapsulation bans general file tools). If duplication is found, you MUST remove it and notify the user.',
230
230
  remindersLine: ctx.isSideDialog
231
- ? '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, create a structured continuation-package reminder that preserves details easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If the system has already put the current course into caution/critical remediation, you are in a Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals; only maintain sufficiently detailed continuation-package reminders. Reminder length has no technical limit, rough multi-reminder bridge notes are acceptable, and in the current course you should only preserve volatile information and clear_mind. Only after the system actually starts the new course does the mandatory first step become reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
232
- : '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, first record undocumented discussion details that the next course needs to know into the appropriate Taskdoc sections, then create a structured continuation-package reminder. Reminders should keep only details still not covered by Taskdoc but easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If the system has already put the current course into caution/critical remediation, rough multi-reminder bridge notes are acceptable; in the current course, only document missing details, preserve volatile information, and clear_mind. Only after the system actually starts the new course does the mandatory first step become reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.',
231
+ ? '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, create a structured continuation-package reminder that preserves details easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If Dominds has warned that the current course is tight/critical, you are in a Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals; only maintain sufficiently detailed continuation-package reminders. Reminders have no fixed length limit, rough multi-reminder bridge notes are acceptable, and in the current course you should only preserve volatile information and clear_mind. Only after Dominds actually starts the new course does the mandatory first step become reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
232
+ : '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, first record undocumented discussion details that the next course needs to know into the appropriate Taskdoc sections, then create a structured continuation-package reminder. Reminders should keep only details still not covered by Taskdoc but easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If Dominds has warned that the current course is tight/critical, rough multi-reminder bridge notes are acceptable; in the current course, only document missing details, preserve volatile information, and clear_mind. Only after Dominds actually starts the new course does the mandatory first step become reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.',
233
233
  teamMemoryLine: '- Team memory: stable shared conventions (cross-task).',
234
234
  personalMemoryLine: '- Personal memory: stable personal habits/preferences and responsibility-scope knowledge. Memory is automatically injected into context on each generation: keep it small and accurate (exact key doc/code paths + minimal key facts); do not store per-task state.',
235
235
  skillsLine: '- Skills: reusable operating guidance, checklists, triggers, and boundaries. Workspace-coupled facts, paths, and local contracts belong in memory/env; workspace-independent “how to do it” procedures belong in skills. Skills do not grant tool permissions; pair scripts/MCP/external capabilities with apps/toolsets/permission configuration.',
236
236
  sideDialogDutyLine: ctx.contextHealthPromptMode === 'normal'
237
237
  ? `You are currently in a Side Dialog: \`do_mind\` / \`mind_more\` / \`change_mind\` / \`never_mind\` are not allowed here. When Taskdoc should be updated (especially the shared progress bulletin board), tellask the Taskdoc maintainer \`@${ctx.taskdocMaintainerId}\` with the new section to create, entries to append, a fully merged replacement draft, or the section to delete. Do not claim it is updated until you see a receipt.`
238
- : 'You are currently in a Side Dialog under caution/critical context-health remediation: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course. Put discussion details, pointers, verification method, and volatile resume information into sufficiently detailed continuation-package reminders.',
238
+ : 'You are currently in a Side Dialog, and Dominds has warned that context is tight/critical: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course. Put discussion details, pointers, verification method, and volatile resume information into sufficiently detailed continuation-package reminders.',
239
239
  mainDialogDutyLine: 'You are currently in the Main Dialog: you are responsible for keeping the team-shared Taskdoc coherent and up to date (especially the progress bulletin board). Merge proposals from teammates/Side Dialogs promptly and keep it concise.',
240
240
  teammateTellaskRoundDoneLine: `Teammate Tellask semantics: when you receive a tellasker reply with the ${runtimeMarkers.finalCompleted} marker, that Tellask round is finished; the tellaskee will not keep executing the same call in the background. If the objective is not met, “waiting” is wrong: you must explicitly start a new Tellask round to continue. Parallel semantics: do not treat an agent teammate like a human coworker who can only handle one conversation at a time. Same teammate + same sessionSlug = continue the same task and update that task; tellaskSessionless or a different sessionSlug = another independent task.`,
241
241
  teamMemoryHintLine: 'Hint: you have team-memory tools (`add_team_memory` / `replace_team_memory` / `drop_team_memory` / `clear_team_memory`) and may maintain team memory when it is truly stable and worth sharing.',
242
242
  personalMemoryHintLine: `Hint: you have personal-memory tools (\`add_personal_memory\` / \`replace_personal_memory\` / \`drop_personal_memory\` / \`clear_personal_memory\`). Personal memory is private to the current agent and is automatically isolated under \`.minds/memory/individual/<member-id>/...\`; therefore \`path\` MUST NOT include your member id (do not write \`${ctx.agentId}/...\`). For first-time setup, just call \`add_personal_memory\`—the directory will be created automatically. Memory is automatically injected into context on each generation: keep it small, keep it accurate, and group facts that are updated together. Store stable facts (exact key paths + minimal contracts), not daily state/progress. If you changed those files or detect staleness/conflicts, immediately \`replace_personal_memory\` to keep it accurate.`,
243
243
  sideDialogWorkflowLine: ctx.contextHealthPromptMode === 'normal'
244
244
  ? `Workflow: do work → distill (\`update_reminder\`; when Taskdoc needs updates, draft append entries, a merged replacement, or a section deletion and ask \`@${ctx.taskdocMaintainerId}\`) → then \`clear_mind\` to drop noise.`
245
- : 'Workflow: stop expanding context → maintain sufficiently detailed continuation-package reminders (`add_reminder` or `update_reminder`, with no technical length limit) → then `clear_mind` to start a new course.',
245
+ : 'Workflow: stop expanding context → maintain sufficiently detailed continuation-package reminders (`add_reminder` or `update_reminder`, with no fixed length limit) → then `clear_mind` to start a new course.',
246
246
  mainDialogWorkflowLine: 'Workflow: do work -> distill (`update_reminder` + `mind_more(progress)`; when compression/deletion is needed, first use `recall_taskdoc` to get `content_hash`, then use `change_mind` with `previous_content_hash`; use `never_mind` when removing a whole section file) -> then `clear_mind` to drop noise.',
247
247
  ...(ctx.isSideDialog
248
248
  ? {}