dominds 1.22.0 → 1.23.0

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 (145) hide show
  1. package/dist/access-control.js +2 -2
  2. package/dist/dialog-instance-registry.js +3 -4
  3. package/dist/dialog.d.ts +2 -2
  4. package/dist/dialog.js +3 -3
  5. package/dist/docs/dialog-system.md +3 -2
  6. package/dist/docs/dialog-system.zh.md +3 -2
  7. package/dist/docs/diligence-push.md +19 -12
  8. package/dist/docs/diligence-push.zh.md +11 -9
  9. package/dist/docs/dominds-terminology.md +3 -3
  10. package/dist/docs/encapsulated-taskdoc.md +11 -2
  11. package/dist/docs/encapsulated-taskdoc.zh.md +10 -1
  12. package/dist/docs/llm-provider-isolation.md +1 -1
  13. package/dist/docs/llm-provider-isolation.zh.md +1 -1
  14. package/dist/docs/team_mgmt-toolset.md +2 -1
  15. package/dist/docs/team_mgmt-toolset.zh.md +2 -1
  16. package/dist/docs/volcengine-coding-plan-openai-compatible.zh.md +11 -10
  17. package/dist/llm/api-quirks.d.ts +0 -2
  18. package/dist/llm/api-quirks.js +1 -3
  19. package/dist/llm/client.d.ts +1 -0
  20. package/dist/llm/defaults.yaml +45 -6
  21. package/dist/llm/gen/anthropic.d.ts +0 -6
  22. package/dist/llm/gen/anthropic.js +21 -468
  23. package/dist/llm/gen/openai-compatible.d.ts +14 -1
  24. package/dist/llm/gen/openai-compatible.js +482 -19
  25. package/dist/llm/gen.d.ts +4 -2
  26. package/dist/llm/kernel-driver/drive.js +164 -114
  27. package/dist/llm/kernel-driver/runtime.js +36 -11
  28. package/dist/llm/kernel-driver/tellask-special.js +12 -9
  29. package/dist/minds/system-prompt-parts.js +8 -8
  30. package/dist/persistence.d.ts +2 -3
  31. package/dist/persistence.js +53 -76
  32. package/dist/problems.js +2 -1
  33. package/dist/runtime/driver-messages.js +4 -4
  34. package/dist/server/websocket-handler.js +17 -3
  35. package/dist/team.d.ts +2 -1
  36. package/dist/team.js +11 -1
  37. package/dist/tools/ctrl.js +48 -11
  38. package/dist/tools/prompts/control/en/principles.md +3 -3
  39. package/dist/tools/prompts/control/en/scenarios.md +4 -0
  40. package/dist/tools/prompts/control/en/tools.md +6 -3
  41. package/dist/tools/prompts/control/zh/principles.md +3 -3
  42. package/dist/tools/prompts/control/zh/scenarios.md +4 -0
  43. package/dist/tools/prompts/control/zh/tools.md +6 -3
  44. package/dist/tools/team_mgmt-manual.js +4 -4
  45. package/dist/tools/team_mgmt.js +15 -5
  46. package/dist/utils/task-package.d.ts +16 -0
  47. package/dist/utils/task-package.js +132 -55
  48. package/dist/utils/taskdoc.js +21 -16
  49. package/package.json +3 -3
  50. package/webapp/dist/assets/{_basePickBy-BYnYcdaa.js → _basePickBy-CGhMqD96.js} +3 -3
  51. package/webapp/dist/assets/{_basePickBy-BYnYcdaa.js.map → _basePickBy-CGhMqD96.js.map} +1 -1
  52. package/webapp/dist/assets/{_baseUniq-CHLBB955.js → _baseUniq-XCMW7z1Y.js} +2 -2
  53. package/webapp/dist/assets/{_baseUniq-CHLBB955.js.map → _baseUniq-XCMW7z1Y.js.map} +1 -1
  54. package/webapp/dist/assets/{arc-DQXtgZdO.js → arc-B6fzk0T5.js} +2 -2
  55. package/webapp/dist/assets/{arc-DQXtgZdO.js.map → arc-B6fzk0T5.js.map} +1 -1
  56. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CzP5Yf9x.js → architectureDiagram-2XIMDMQ5-DmSI_GUt.js} +7 -7
  57. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CzP5Yf9x.js.map → architectureDiagram-2XIMDMQ5-DmSI_GUt.js.map} +1 -1
  58. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-sOx5Byq8.js → blockDiagram-WCTKOSBZ-Bp0nb8IZ.js} +7 -7
  59. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-sOx5Byq8.js.map → blockDiagram-WCTKOSBZ-Bp0nb8IZ.js.map} +1 -1
  60. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D8-GiS6c.js → c4Diagram-IC4MRINW-gYpylqGb.js} +3 -3
  61. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D8-GiS6c.js.map → c4Diagram-IC4MRINW-gYpylqGb.js.map} +1 -1
  62. package/webapp/dist/assets/{channel-Bvke0iMP.js → channel-BmQ3YyUn.js} +2 -2
  63. package/webapp/dist/assets/{channel-Bvke0iMP.js.map → channel-BmQ3YyUn.js.map} +1 -1
  64. package/webapp/dist/assets/{chunk-4BX2VUAB-C9pln2M7.js → chunk-4BX2VUAB-B5pwFRwA.js} +2 -2
  65. package/webapp/dist/assets/{chunk-4BX2VUAB-C9pln2M7.js.map → chunk-4BX2VUAB-B5pwFRwA.js.map} +1 -1
  66. package/webapp/dist/assets/{chunk-55IACEB6-BLDXNtAM.js → chunk-55IACEB6-CZf6oMWM.js} +2 -2
  67. package/webapp/dist/assets/{chunk-55IACEB6-BLDXNtAM.js.map → chunk-55IACEB6-CZf6oMWM.js.map} +1 -1
  68. package/webapp/dist/assets/{chunk-FMBD7UC4-dYd3QdHa.js → chunk-FMBD7UC4-yZWCDzVz.js} +2 -2
  69. package/webapp/dist/assets/{chunk-FMBD7UC4-dYd3QdHa.js.map → chunk-FMBD7UC4-yZWCDzVz.js.map} +1 -1
  70. package/webapp/dist/assets/{chunk-JSJVCQXG-SqHEmHHd.js → chunk-JSJVCQXG-Cg1ST73M.js} +2 -2
  71. package/webapp/dist/assets/{chunk-JSJVCQXG-SqHEmHHd.js.map → chunk-JSJVCQXG-Cg1ST73M.js.map} +1 -1
  72. package/webapp/dist/assets/{chunk-KX2RTZJC-CRXgzI2d.js → chunk-KX2RTZJC-ByGtlX9q.js} +2 -2
  73. package/webapp/dist/assets/{chunk-KX2RTZJC-CRXgzI2d.js.map → chunk-KX2RTZJC-ByGtlX9q.js.map} +1 -1
  74. package/webapp/dist/assets/{chunk-NQ4KR5QH-IMA2JZhH.js → chunk-NQ4KR5QH-DoXvfhSY.js} +4 -4
  75. package/webapp/dist/assets/{chunk-NQ4KR5QH-IMA2JZhH.js.map → chunk-NQ4KR5QH-DoXvfhSY.js.map} +1 -1
  76. package/webapp/dist/assets/{chunk-QZHKN3VN-DBaGWjY3.js → chunk-QZHKN3VN-2gX2qsHB.js} +2 -2
  77. package/webapp/dist/assets/{chunk-QZHKN3VN-DBaGWjY3.js.map → chunk-QZHKN3VN-2gX2qsHB.js.map} +1 -1
  78. package/webapp/dist/assets/{chunk-WL4C6EOR-QLmsLbcS.js → chunk-WL4C6EOR-L-9bPNxS.js} +6 -6
  79. package/webapp/dist/assets/{chunk-WL4C6EOR-QLmsLbcS.js.map → chunk-WL4C6EOR-L-9bPNxS.js.map} +1 -1
  80. package/webapp/dist/assets/{classDiagram-VBA2DB6C-jN4lhUtx.js → classDiagram-VBA2DB6C-B79Oe3Df.js} +7 -7
  81. package/webapp/dist/assets/{classDiagram-VBA2DB6C-jN4lhUtx.js.map → classDiagram-VBA2DB6C-B79Oe3Df.js.map} +1 -1
  82. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-jN4lhUtx.js → classDiagram-v2-RAHNMMFH-B79Oe3Df.js} +7 -7
  83. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-jN4lhUtx.js.map → classDiagram-v2-RAHNMMFH-B79Oe3Df.js.map} +1 -1
  84. package/webapp/dist/assets/{clone-DPC4Vt09.js → clone-DvlY9Sdn.js} +2 -2
  85. package/webapp/dist/assets/{clone-DPC4Vt09.js.map → clone-DvlY9Sdn.js.map} +1 -1
  86. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BtVgObsc.js → cose-bilkent-S5V4N54A-CtkGd0W6.js} +2 -2
  87. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BtVgObsc.js.map → cose-bilkent-S5V4N54A-CtkGd0W6.js.map} +1 -1
  88. package/webapp/dist/assets/{dagre-KLK3FWXG-Bv6mn-UV.js → dagre-KLK3FWXG-B3W6QTXQ.js} +7 -7
  89. package/webapp/dist/assets/{dagre-KLK3FWXG-Bv6mn-UV.js.map → dagre-KLK3FWXG-B3W6QTXQ.js.map} +1 -1
  90. package/webapp/dist/assets/{diagram-E7M64L7V-D2OPgDkq.js → diagram-E7M64L7V-B6-J_E5Q.js} +8 -8
  91. package/webapp/dist/assets/{diagram-E7M64L7V-D2OPgDkq.js.map → diagram-E7M64L7V-B6-J_E5Q.js.map} +1 -1
  92. package/webapp/dist/assets/{diagram-IFDJBPK2-CZpDu-e5.js → diagram-IFDJBPK2-C-PH_Yx3.js} +7 -7
  93. package/webapp/dist/assets/{diagram-IFDJBPK2-CZpDu-e5.js.map → diagram-IFDJBPK2-C-PH_Yx3.js.map} +1 -1
  94. package/webapp/dist/assets/{diagram-P4PSJMXO-BkMbbW0p.js → diagram-P4PSJMXO-CB5xXDup.js} +7 -7
  95. package/webapp/dist/assets/{diagram-P4PSJMXO-BkMbbW0p.js.map → diagram-P4PSJMXO-CB5xXDup.js.map} +1 -1
  96. package/webapp/dist/assets/{erDiagram-INFDFZHY-Kf17ek1z.js → erDiagram-INFDFZHY-CuAhTGVU.js} +5 -5
  97. package/webapp/dist/assets/{erDiagram-INFDFZHY-Kf17ek1z.js.map → erDiagram-INFDFZHY-CuAhTGVU.js.map} +1 -1
  98. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-Cort4hNL.js → flowDiagram-PKNHOUZH-D3cIOfGj.js} +7 -7
  99. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-Cort4hNL.js.map → flowDiagram-PKNHOUZH-D3cIOfGj.js.map} +1 -1
  100. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-DcXFKB1Y.js → ganttDiagram-A5KZAMGK-CSFhVYXV.js} +3 -3
  101. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-DcXFKB1Y.js.map → ganttDiagram-A5KZAMGK-CSFhVYXV.js.map} +1 -1
  102. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-BORnqZ0-.js → gitGraphDiagram-K3NZZRJ6-CiEaxACG.js} +8 -8
  103. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-BORnqZ0-.js.map → gitGraphDiagram-K3NZZRJ6-CiEaxACG.js.map} +1 -1
  104. package/webapp/dist/assets/{graph-D4Uth-MK.js → graph-CYGALRuy.js} +3 -3
  105. package/webapp/dist/assets/{graph-D4Uth-MK.js.map → graph-CYGALRuy.js.map} +1 -1
  106. package/webapp/dist/assets/{index-YBIJr7jH.js → index-BTazqQrV.js} +186 -58
  107. package/webapp/dist/assets/index-BTazqQrV.js.map +1 -0
  108. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DDjsEPg3.js → infoDiagram-LFFYTUFH-CiWJjQyU.js} +6 -6
  109. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DDjsEPg3.js.map → infoDiagram-LFFYTUFH-CiWJjQyU.js.map} +1 -1
  110. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-Bb2sPnCX.js → ishikawaDiagram-PHBUUO56-MlIIUO7o.js} +2 -2
  111. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-Bb2sPnCX.js.map → ishikawaDiagram-PHBUUO56-MlIIUO7o.js.map} +1 -1
  112. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BtRY6eBa.js → journeyDiagram-4ABVD52K-BBqwkA3d.js} +5 -5
  113. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BtRY6eBa.js.map → journeyDiagram-4ABVD52K-BBqwkA3d.js.map} +1 -1
  114. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-aGmxT2H9.js → kanban-definition-K7BYSVSG-BS4GzDbo.js} +3 -3
  115. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-aGmxT2H9.js.map → kanban-definition-K7BYSVSG-BS4GzDbo.js.map} +1 -1
  116. package/webapp/dist/assets/{layout-BuLicmwh.js → layout-DaJO-1DW.js} +5 -5
  117. package/webapp/dist/assets/{layout-BuLicmwh.js.map → layout-DaJO-1DW.js.map} +1 -1
  118. package/webapp/dist/assets/{linear-DIPh96mp.js → linear-SWy2Cl7G.js} +2 -2
  119. package/webapp/dist/assets/{linear-DIPh96mp.js.map → linear-SWy2Cl7G.js.map} +1 -1
  120. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-ofWsysn9.js → mindmap-definition-YRQLILUH-B_gNrT3l.js} +4 -4
  121. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-ofWsysn9.js.map → mindmap-definition-YRQLILUH-B_gNrT3l.js.map} +1 -1
  122. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-DQqCTITO.js → pieDiagram-SKSYHLDU-CVh3lLBA.js} +8 -8
  123. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-DQqCTITO.js.map → pieDiagram-SKSYHLDU-CVh3lLBA.js.map} +1 -1
  124. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-DxWc0avu.js → quadrantDiagram-337W2JSQ-D0zAkVD7.js} +3 -3
  125. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-DxWc0avu.js.map → quadrantDiagram-337W2JSQ-D0zAkVD7.js.map} +1 -1
  126. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-DHgYfzwt.js → requirementDiagram-Z7DCOOCP--CTFD60w.js} +4 -4
  127. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-DHgYfzwt.js.map → requirementDiagram-Z7DCOOCP--CTFD60w.js.map} +1 -1
  128. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Cuhwe80W.js → sankeyDiagram-WA2Y5GQK-XZnViaAX.js} +2 -2
  129. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Cuhwe80W.js.map → sankeyDiagram-WA2Y5GQK-XZnViaAX.js.map} +1 -1
  130. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqSNoro8.js → sequenceDiagram-2WXFIKYE-BWAMhn_x.js} +4 -4
  131. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqSNoro8.js.map → sequenceDiagram-2WXFIKYE-BWAMhn_x.js.map} +1 -1
  132. package/webapp/dist/assets/{stateDiagram-RAJIS63D-D1mvuJi6.js → stateDiagram-RAJIS63D--jsLD0Dg.js} +9 -9
  133. package/webapp/dist/assets/{stateDiagram-RAJIS63D-D1mvuJi6.js.map → stateDiagram-RAJIS63D--jsLD0Dg.js.map} +1 -1
  134. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCYX5Gy-.js → stateDiagram-v2-FVOUBMTO-DUG9vyI5.js} +5 -5
  135. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCYX5Gy-.js.map → stateDiagram-v2-FVOUBMTO-DUG9vyI5.js.map} +1 -1
  136. package/webapp/dist/assets/{timeline-definition-YZTLITO2-DDLYGao7.js → timeline-definition-YZTLITO2-BROLp1hL.js} +3 -3
  137. package/webapp/dist/assets/{timeline-definition-YZTLITO2-DDLYGao7.js.map → timeline-definition-YZTLITO2-BROLp1hL.js.map} +1 -1
  138. package/webapp/dist/assets/{treemap-KZPCXAKY-DXkv1e6y.js → treemap-KZPCXAKY-BXuIlbYo.js} +5 -5
  139. package/webapp/dist/assets/{treemap-KZPCXAKY-DXkv1e6y.js.map → treemap-KZPCXAKY-BXuIlbYo.js.map} +1 -1
  140. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-DMxsg9P0.js → vennDiagram-LZ73GAT5-BXWd8gBB.js} +2 -2
  141. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-DMxsg9P0.js.map → vennDiagram-LZ73GAT5-BXWd8gBB.js.map} +1 -1
  142. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BJ2qipzT.js → xychartDiagram-JWTSCODW-DR5z9o6h.js} +3 -3
  143. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BJ2qipzT.js.map → xychartDiagram-JWTSCODW-DR5z9o6h.js.map} +1 -1
  144. package/webapp/dist/index.html +1 -1
  145. package/webapp/dist/assets/index-YBIJr7jH.js.map +0 -1
@@ -370,8 +370,16 @@ function getCtrlMessages(language) {
370
370
  invalidReminderPosition: (positionHuman, totalPlusOne) => `位置 ${positionHuman} 无效。有效范围:1-${totalPlusOne}`,
371
371
  invalidFormatUpdate: '参数格式不对。用法:update_reminder({ reminder_id: string, content: string })',
372
372
  invalidFormatDoMind: '参数格式不对。用法:do_mind({ selector: string, category?: string, content: string })',
373
- invalidFormatChangeMind: '参数格式不对。用法:change_mind({ selector: string, category?: string, content: string })',
374
- tooManyArgsChangeMind: '参数格式不对。用法:change_mind({ selector: string, category?: string, content: string })',
373
+ invalidFormatChangeMind: '参数格式不对。用法:change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
374
+ tooManyArgsChangeMind: '参数格式不对。用法:change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
375
+ taskDocPreviousContentHashRequired: '错误:change_mind 需要 previous_content_hash。请先基于已注入的顶层差遣牒内容或 recall_taskdoc 返回的 content_hash,合并原有内容后再整段替换;没有把握时用 mind_more 追加小条目。',
376
+ taskDocPreviousContentHashInvalid: '错误:previous_content_hash 格式无效。它必须是 recall_taskdoc 或已注入差遣牒状态中显示的 sha256:<64位十六进制> content_hash。',
377
+ taskDocContentHashMismatch: (relativePath, currentContentHash) => `错误:${relativePath} 的内容哈希不匹配,说明该章节已变化或你没有基于当前内容改写。\n` +
378
+ `当前 content_hash:${currentContentHash}\n\n` +
379
+ `请重新读取/回顾当前章节内容,并只在已充分合并原有内容后重试。若新内容会冲掉、删除或实质替换原有内容,必须满足其一:\n` +
380
+ `- 获得人类对该替换的直接、针对性确认;或\n` +
381
+ `- 依据人类认可的明确 SOP/验收标准,已经充分考虑原有内容且该替换合规。\n` +
382
+ `否则不要覆盖;优先使用 mind_more 追加或向人类确认。`,
375
383
  invalidFormatMindMore: '参数格式不对。用法:mind_more({ items: string[], sep?: string, selector?: string, category?: string })(selector 默认 progress)',
376
384
  invalidFormatNeverMind: '参数格式不对。用法:never_mind({ selector: string, category?: string })',
377
385
  mindMoreItemsRequired: '需要提供要追加的条目(items),且每一项都必须是非空字符串。\n' +
@@ -395,9 +403,9 @@ function getCtrlMessages(language) {
395
403
  invalidCategorySelector: (selector) => `选择器 '${selector}' 无效。需匹配 ^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]*)*$。`,
396
404
  topLevelSelectorRequiresNoCategory: (category, selector) => `选择器 '${selector}' 是顶层保留分段(goals/constraints/progress),不能与 category='${category}' 一起用。`,
397
405
  bearInMindSelectorRequiresBearInMindCategory: (category, selector) => `选择器 '${selector}' 只能在 category='bearinmind' 下用(当前 category='${category}')。`,
398
- taskDocSectionAlreadyExists: (relativePath) => `无法新增:${relativePath} 已存在。若确有把握要改写已有章节,请使用 change_mind({ ... })。`,
406
+ taskDocSectionAlreadyExists: (relativePath) => `无法新增:${relativePath} 已存在。若确有把握要改写已有章节,请先取得当前 content_hash,再使用 change_mind({"selector":"<selector>","content":"...","previous_content_hash":"sha256:..."})。`,
399
407
  taskDocSectionChangeMissing: (relativePath) => `无法修改:${relativePath} 不存在。若要新增章节,请使用 do_mind({ ... })。`,
400
- taskDocSectionMissing: (relativePath) => `未找到:${relativePath}。\n\n新增章节请使用 do_mind;已有章节追加小条目用 mind_more;改写已有章节用 change_mind:\n- do_mind({"category":"<category>","selector":"<selector>","content":"..."})\n- mind_more({"category":"<category>","selector":"<selector>","items":["..."]})\n- change_mind({"category":"<category>","selector":"<selector>","content":"..."})`,
408
+ taskDocSectionMissing: (relativePath) => `未找到:${relativePath}。\n\n新增章节请使用 do_mind;已有章节追加小条目用 mind_more;改写已有章节用 change_mind 并带上当前 content_hash:\n- do_mind({"category":"<category>","selector":"<selector>","content":"..."})\n- mind_more({"category":"<category>","selector":"<selector>","items":["..."]})\n- change_mind({"category":"<category>","selector":"<selector>","content":"...","previous_content_hash":"sha256:..."})`,
401
409
  taskDocSectionDeleteMissing: (relativePath) => `无法删除:${relativePath} 不存在。请先确认要删除的差遣牒章节。`,
402
410
  clearedCoursePrompt: (nextCourse) => (0, driver_messages_1.formatNewCourseStartPrompt)('zh', { nextCourse, source: 'clear_mind' }),
403
411
  };
@@ -412,8 +420,16 @@ function getCtrlMessages(language) {
412
420
  invalidReminderPosition: (positionHuman, totalPlusOne) => `Error: Invalid reminder position ${positionHuman}. Valid range: 1-${totalPlusOne}`,
413
421
  invalidFormatUpdate: 'Error: Invalid args. Use: update_reminder({ reminder_id: string, content: string })',
414
422
  invalidFormatDoMind: 'Error: Invalid args. Use: do_mind({ selector: string, category?: string, content: string })',
415
- invalidFormatChangeMind: 'Error: Invalid args. Use: change_mind({ selector: string, category?: string, content: string })',
416
- tooManyArgsChangeMind: 'Error: Invalid args. Use: change_mind({ selector: string, category?: string, content: string })',
423
+ invalidFormatChangeMind: 'Error: Invalid args. Use: change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
424
+ tooManyArgsChangeMind: 'Error: Invalid args. Use: change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
425
+ taskDocPreviousContentHashRequired: 'Error: change_mind requires previous_content_hash. Use the content_hash from the injected top-level Taskdoc section or recall_taskdoc result, merge the existing content, then replace the full section. If unsure, use mind_more for small append-only updates.',
426
+ taskDocPreviousContentHashInvalid: 'Error: invalid previous_content_hash. It must be the sha256:<64 hex chars> content_hash shown by recall_taskdoc or the injected Taskdoc status block.',
427
+ taskDocContentHashMismatch: (relativePath, currentContentHash) => `Error: content hash mismatch for \`${relativePath}\`; the section changed or your replacement was not based on the current content.\n` +
428
+ `Current content_hash: ${currentContentHash}\n\n` +
429
+ `Re-read/review the current section and retry only after fully merging existing content. If the new content would overwrite, delete, or materially replace existing content, one of these must be true:\n` +
430
+ `- A human gave direct, targeted confirmation for this replacement; or\n` +
431
+ `- A human-approved explicit SOP/acceptance standard authorizes the replacement, and you have considered the existing content under that standard.\n` +
432
+ `Otherwise do not overwrite; prefer mind_more or ask the human to confirm.`,
417
433
  invalidFormatMindMore: 'Error: Invalid args. Use: mind_more({ items: string[], sep?: string, selector?: string, category?: string }) (selector defaults to progress).',
418
434
  invalidFormatNeverMind: 'Error: Invalid args. Use: never_mind({ selector: string, category?: string })',
419
435
  mindMoreItemsRequired: 'Error: items are required, and every item must be a non-empty string.\n' +
@@ -437,9 +453,9 @@ function getCtrlMessages(language) {
437
453
  invalidCategorySelector: (selector) => `Error: Invalid category selector '${selector}'. Must match \`^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*$\`.`,
438
454
  topLevelSelectorRequiresNoCategory: (category, selector) => `Error: Selector '${selector}' is reserved for top-level sections (goals/constraints/progress) and must not be used with category='${category}'.`,
439
455
  bearInMindSelectorRequiresBearInMindCategory: (category, selector) => `Error: Selector '${selector}' is only valid under category='bearinmind' (got category='${category}').`,
440
- taskDocSectionAlreadyExists: (relativePath) => `Cannot add: \`${relativePath}\` already exists. If you are sure you need to rewrite an existing section, use \`change_mind({ ... })\`.`,
456
+ taskDocSectionAlreadyExists: (relativePath) => `Cannot add: \`${relativePath}\` already exists. If you are sure you need to rewrite an existing section, get the current content_hash first, then use \`change_mind({"selector":"<selector>","content":"...","previous_content_hash":"sha256:..."})\`.`,
441
457
  taskDocSectionChangeMissing: (relativePath) => `Cannot change: \`${relativePath}\` does not exist. To create a new section, use \`do_mind({ ... })\`.`,
442
- taskDocSectionMissing: (relativePath) => `Not found: \`${relativePath}\`.\n\nUse \`do_mind\` to create a section, \`mind_more\` for small append-only updates to existing sections, and \`change_mind\` to rewrite existing sections:\n- \`do_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\"})\`\n- \`mind_more({\"category\":\"<category>\",\"selector\":\"<selector>\",\"items\":[\"...\"]})\`\n- \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\"})\``,
458
+ taskDocSectionMissing: (relativePath) => `Not found: \`${relativePath}\`.\n\nUse \`do_mind\` to create a section, \`mind_more\` for small append-only updates to existing sections, and \`change_mind\` with the current content_hash to rewrite existing sections:\n- \`do_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\"})\`\n- \`mind_more({\"category\":\"<category>\",\"selector\":\"<selector>\",\"items\":[\"...\"]})\`\n- \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\",\"previous_content_hash\":\"sha256:...\"})\``,
443
459
  taskDocSectionDeleteMissing: (relativePath) => `Cannot delete: \`${relativePath}\` does not exist. Check the Taskdoc section target first.`,
444
460
  clearedCoursePrompt: (nextCourse) => (0, driver_messages_1.formatNewCourseStartPrompt)('en', { nextCourse, source: 'clear_mind' }),
445
461
  };
@@ -721,7 +737,7 @@ exports.changeMindTool = {
721
737
  parameters: {
722
738
  type: 'object',
723
739
  additionalProperties: false,
724
- required: ['selector', 'content'],
740
+ required: ['selector', 'content', 'previous_content_hash'],
725
741
  properties: {
726
742
  selector: {
727
743
  type: 'string',
@@ -732,6 +748,10 @@ exports.changeMindTool = {
732
748
  description: 'Optional category directory within the Taskdoc package. When present, selector targets <category>/<selector>.md.',
733
749
  },
734
750
  content: { type: 'string', description: 'New section content.' },
751
+ previous_content_hash: {
752
+ type: 'string',
753
+ description: 'Content hash of the current section being replaced. Use the content_hash shown in the injected Taskdoc for top-level sections or returned by recall_taskdoc for extra sections.',
754
+ },
735
755
  },
736
756
  },
737
757
  argsValidation: 'dominds',
@@ -760,6 +780,13 @@ exports.changeMindTool = {
760
780
  const newTaskDocContent = typeof contentValue === 'string' ? contentValue.trim() : '';
761
781
  if (!newTaskDocContent)
762
782
  return (0, tool_1.toolFailure)(t.taskDocContentRequired);
783
+ const previousContentHashValue = args['previous_content_hash'];
784
+ const previousContentHash = typeof previousContentHashValue === 'string' ? previousContentHashValue.trim() : '';
785
+ if (!previousContentHash)
786
+ return (0, tool_1.toolFailure)(t.taskDocPreviousContentHashRequired);
787
+ if (!/^sha256:[0-9a-f]{64}$/u.test(previousContentHash)) {
788
+ return (0, tool_1.toolFailure)(t.taskDocPreviousContentHashInvalid);
789
+ }
763
790
  // Taskdoc path is immutable for the dialog lifecycle.
764
791
  const taskDocPath = dlg.taskDocPath;
765
792
  if (!taskDocPath)
@@ -799,6 +826,7 @@ exports.changeMindTool = {
799
826
  taskPackageDirFullPath: fullPath,
800
827
  target: parsed.target,
801
828
  content: newTaskDocContent,
829
+ previousContentHash,
802
830
  updatedBy: caller.id,
803
831
  });
804
832
  switch (result.kind) {
@@ -806,6 +834,8 @@ exports.changeMindTool = {
806
834
  return (0, tool_result_messages_1.formatToolActionResult)(language, 'mindChanged');
807
835
  case 'missing':
808
836
  return (0, tool_1.toolFailure)(t.taskDocSectionChangeMissing((0, task_package_1.taskPackageRelativePathForChangeMindTarget)(parsed.target)));
837
+ case 'content_hash_mismatch':
838
+ return (0, tool_1.toolFailure)(t.taskDocContentHashMismatch((0, task_package_1.taskPackageRelativePathForChangeMindTarget)(parsed.target), result.currentContentHash));
809
839
  default: {
810
840
  const _exhaustive = result;
811
841
  return _exhaustive;
@@ -1221,7 +1251,14 @@ exports.recallTaskdocTool = {
1221
1251
  }
1222
1252
  throw err;
1223
1253
  }
1224
- const content = await fs.promises.readFile(sectionPath, 'utf8');
1254
+ const current = await (0, task_package_1.readTaskPackageByChangeMindTarget)({
1255
+ taskPackageDirFullPath: fullPath,
1256
+ target,
1257
+ });
1258
+ if (current.kind === 'missing') {
1259
+ return (0, tool_1.toolFailure)(t.taskDocSectionMissing(relPath));
1260
+ }
1261
+ const content = current.content;
1225
1262
  const bytes = Buffer.byteLength(content, 'utf8');
1226
1263
  const maxSize = 100 * 1024;
1227
1264
  const clipped = bytes > maxSize ? content.slice(0, maxSize) : content;
@@ -1231,6 +1268,6 @@ exports.recallTaskdocTool = {
1231
1268
  : `\n\n⚠️ Truncated: content is too large (${bytes} bytes); showing first ${maxSize} bytes.`
1232
1269
  : '';
1233
1270
  const closingSeparatorPrefix = clipped.endsWith('\n') ? '' : '\n';
1234
- return (0, tool_1.toolSuccess)(`**recall_taskdoc:** \`${relPath}\`\n\n---\n${clipped}${closingSeparatorPrefix}---${note}`);
1271
+ return (0, tool_1.toolSuccess)(`**recall_taskdoc:** \`${relPath}\`\ncontent_hash: \`${current.contentHash}\`\n\n---\n${clipped}${closingSeparatorPrefix}---${note}`);
1235
1272
  },
1236
1273
  };
@@ -132,8 +132,8 @@ Taskdoc is a **task contract** and the task's **team-shared source of current tr
132
132
 
133
133
  - Keep concise: reminders are often 1-3 items; prefer `update_reminder` to compress/merge
134
134
  - Separate carriers: information that must synchronize the team's current effective state, key decisions, next steps, or still-active blockers belongs in `progress`, the quasi-real-time task bulletin board; reminders keep local resume details
135
- - Team-facing: keep `progress` scannable and centered on what is still effective now; do not let it degrade into a personal log, raw chronology, scratchpad, or stale history pile. Use `mind_more` for small additions and `change_mind` when cleanup/reordering/compression is needed
136
- - Condense when needed: `mind_more` is not the default bookkeeping move. If one topic already has several phase notes, prefer `change_mind` to merge them into the current summary; put the detailed expansion in formal rtws documentation and keep a document pointer in Taskdoc
135
+ - Team-facing: keep `progress` scannable and centered on what is still effective now; do not let it degrade into a personal log, raw chronology, scratchpad, or stale history pile. Use `mind_more` for small additions and `change_mind` with the current `content_hash` as `previous_content_hash` when cleanup/reordering/compression is needed
136
+ - Condense when needed: `mind_more` is not the default bookkeeping move. If one topic already has several phase notes, prefer `change_mind` to merge them into the current summary; put the detailed expansion in formal rtws documentation and keep a document pointer in Taskdoc. If the replacement would overwrite existing content, proceed only with direct human confirmation or after applying a human-approved SOP/acceptance standard that considers the existing content
137
137
  - Collapse before clearing: the Main Dialog first records undocumented discussion details the next course needs to know into the appropriate Taskdoc sections, then creates a structured continuation-package reminder; a Side Dialog must not maintain Taskdoc or draft Taskdoc update proposals, and should directly maintain sufficiently detailed continuation-package reminders. If the current course is already under system remediation, rough multi-reminder carry-over is acceptable but must be reconciled first in the new course
138
138
  - Avoid raw-material dumps: do not paste long logs or large tool outputs into reminders
139
139
  - Documentation layering: Taskdoc says “what the team should sync on / do next now”; formal rtws documentation carries “why, how, detailed evidence, and the full process”. When Taskdoc references formal rtws documentation, use a stable path/section name/relevant command instead of copying the full content
@@ -156,7 +156,7 @@ Taskdoc is a **task contract** and the task's **team-shared source of current tr
156
156
  ## Limitations and Notes
157
157
 
158
158
  1. `dialog` reminders end with the dialog; `personal` reminders stay visible in all later dialogs you lead
159
- 2. Use `do_mind` to create missing Taskdoc sections; use `mind_more` for small Taskdoc additions; use `change_mind` for full-section replacement of existing sections and merge existing content first; use `never_mind` when a whole section file should be deleted. Do not treat `mind_more` as a chronology tool; when cleanup, stale-entry removal, or same-topic consolidation is needed, use `change_mind`
159
+ 2. Use `do_mind` to create missing Taskdoc sections; use `mind_more` for small Taskdoc additions; use `change_mind` for full-section replacement of existing sections after merging existing content and include the current `content_hash` as `previous_content_hash`; use `never_mind` when a whole section file should be deleted. Do not treat `mind_more` as a chronology tool; when cleanup, stale-entry removal, or same-topic consolidation is needed, use `change_mind`
160
160
  3. `do_mind` / `mind_more` / `change_mind` / `never_mind` do not start a new course
161
161
  4. A continuation-package reminder should keep only details still not covered by Taskdoc but easy to lose during resume; in the Main Dialog, undocumented discussion details from current dialog history that the next course needs to know should be written to the appropriate Taskdoc sections first; in a Side Dialog under caution/critical remediation, maintain sufficiently detailed continuation-package reminders only
162
162
  5. Do not turn `personal` reminders into a long-term fact dump; move durable knowledge into `personal_memory`
@@ -134,6 +134,7 @@ change_mind({
134
134
  selector: 'progress',
135
135
  content:
136
136
  '## Progress\n\n### Current Effective State\n- The memory-carrier boundary cleanup is complete; next we strengthen the Taskdoc bulletin-board semantics; details: <doc-path>#<section>\n\n### Decisions In Effect\n- `personal_memory` is no longer treated as a short-term junk drawer\n- `team_memory` now carries only long-lived team conventions and invariants\n\n### Next Step\n- Add stronger `progress` bulletin-board guidance in control / team_mgmt manuals\n\n### Still-Active Blockers\n- None',
137
+ previous_content_hash: 'sha256:...',
137
138
  });
138
139
  ```
139
140
 
@@ -150,6 +151,7 @@ change_mind({
150
151
  selector: 'goals',
151
152
  content:
152
153
  '## Goals\n\n- [ ] Create all toolset manuals\n - [x] ws_mod\n - [x] team_mgmt\n - [x] personal_memory\n - [ ] control (In Progress)\n- [ ] Write tool descriptions',
154
+ previous_content_hash: 'sha256:...',
153
155
  });
154
156
  ```
155
157
 
@@ -166,6 +168,7 @@ change_mind({
166
168
  selector: 'constraints',
167
169
  content:
168
170
  '## Constraints\n\n- man function must dynamically filter toolsets based on team.yaml\n- Runtime effective: Changes to team.yaml immediately visible\n- Toolset names use underscore format\n- New constraint: Each toolset needs 5 topics × 2 languages',
171
+ previous_content_hash: 'sha256:...',
169
172
  });
170
173
  ```
171
174
 
@@ -205,5 +208,6 @@ change_mind({
205
208
  selector: 'progress',
206
209
  content:
207
210
  '## Progress\n\n### Current Effective State\n- The boundary wording has been propagated into handbook sources and tests; details: <doc-path>#<section>\n\n### Decisions In Effect\n- role assets / personal_memory / team_memory / Taskdoc-progress / reminders now have separated responsibilities\n\n### Next Step\n- Re-verify control manual wording, Taskdoc display text, and boundary tests\n\n### Still-Active Blockers\n- None',
211
+ previous_content_hash: 'sha256:...',
208
212
  });
209
213
  ```
@@ -150,7 +150,7 @@ Create a new Taskdoc section. It fails if the target section already exists.
150
150
 
151
151
  - Create-only: it does not overwrite existing content
152
152
  - Use this for missing resident sections or new extra sections that preserve details without touching existing Taskdoc text
153
- - If the target already exists and only needs small additions, use `mind_more`; if it needs a full rewrite/merge, use `change_mind`
153
+ - If the target already exists and only needs small additions, use `mind_more`; if it needs a full rewrite/merge, use `change_mind` with the current `content_hash` as `previous_content_hash`
154
154
  - Does not start a new course
155
155
  - Changes visible to all teammates
156
156
 
@@ -163,6 +163,7 @@ Update taskdoc chapter.
163
163
  - `selector` (required): Chapter selector (goals/constraints/progress)
164
164
  - `category` (optional): Extra section directory; with `selector`, targets `<category>/<selector>.md`
165
165
  - `content` (required): New content (full section replacement)
166
+ - `previous_content_hash` (required): The current section `content_hash` you based the replacement on
166
167
 
167
168
  **Returns:**
168
169
 
@@ -175,6 +176,7 @@ updated_at: <update timestamp>
175
176
  **Characteristics:**
176
177
 
177
178
  - Each call replaces an existing entire chapter; it does not create missing sections
179
+ - The replacement is rejected if `previous_content_hash` does not match the current section content hash
178
180
  - Does not start a new course
179
181
  - Changes visible to all teammates
180
182
  - Constraint rule: `constraints` must include only task-specific hard requirements; do not repeat global rules. If a duplicate is found, delete it and inform the user
@@ -206,7 +208,7 @@ mind_more({
206
208
  - Append-only: it does not deduplicate, rewrite, or compress old content
207
209
  - Good for adding one or two still-effective states, decisions, next steps, or blockers to `progress`
208
210
  - Not for appending every investigation step, long log, full plan, or acceptance record as a chronology; those details belong in formal rtws documentation, while Taskdoc keeps the summary and document pointer
209
- - If stale entries must be removed, reordered, or compressed, use `change_mind` for a full-section replacement; if a whole section file should be deleted, use `never_mind`
211
+ - If stale entries must be removed, reordered, or compressed, use `change_mind` with the current `content_hash` as `previous_content_hash` for a full-section replacement; if a whole section file should be deleted, use `never_mind`
210
212
  - When one topic already has several phase notes, prefer `change_mind` to merge them into a concise current announcement instead of continuing to call `mind_more`
211
213
 
212
214
  ### 8. never_mind
@@ -221,7 +223,7 @@ Delete a Taskdoc section file.
221
223
  **Characteristics:**
222
224
 
223
225
  - Deletes only the whole section file; it does not edit content
224
- - Use it only when the whole section is no longer valid. If you only need to remove stale entries or compress structure, prefer `change_mind` with the cleaned full section
226
+ - Use it only when the whole section is no longer valid. If you only need to remove stale entries or compress structure, prefer `change_mind` with the cleaned full section and current `content_hash` as `previous_content_hash`
225
227
  - Does not start a new course
226
228
 
227
229
  ### 9. recall_taskdoc
@@ -309,6 +311,7 @@ change_mind({
309
311
  selector: 'progress',
310
312
  content:
311
313
  '## Progress\n\n### Current Effective State\n- The handbook boundary split is now agreed: role assets / personal long-lived experience / Taskdoc-progress / reminders; details: <doc-path>#<section>\n\n### Decisions In Effect\n- `persona / knowhow / pitfalls` no longer absorb daily member experience\n- `personal_memory` is reserved for one member\\'s reusable long-lived experience\n\n### Next Step\n- Strengthen the bulletin-board semantics of Taskdoc `progress`\n\n### Still-Active Blockers\n- None',
314
+ previous_content_hash: 'sha256:...',
312
315
  });
313
316
  ```
314
317
 
@@ -132,8 +132,8 @@
132
132
 
133
133
  - 保持简洁:默认提醒项常见 1–3 条,优先 `update_reminder` 压缩/合并
134
134
  - 区分载体:需要向全队同步的当前有效状态、关键决策、下一步与仍成立阻塞,写入 `progress` 这一准实时任务公告牌;提醒项只留个人/当前对话恢复所需细节
135
- - 面向全队:`progress` 应保持可扫读、以“当前仍有效”为准,不要退化成个人日志、流水账、临时便签或历史残影堆积;少量新增用 `mind_more`,需要清旧/重排/压缩时用 `change_mind`
136
- - 按需整理:`mind_more` 不是默认记账动作。若同一主题已有多条阶段性记录,优先用 `change_mind` 合并成当前摘要;把细节放进 rtws 正式文档,并在差遣牒里保留文档定位 pointer
135
+ - 面向全队:`progress` 应保持可扫读、以“当前仍有效”为准,不要退化成个人日志、流水账、临时便签或历史残影堆积;少量新增用 `mind_more`,需要清旧/重排/压缩时用 `change_mind`,并携带当前 `content_hash` 作为 `previous_content_hash`
136
+ - 按需整理:`mind_more` 不是默认记账动作。若同一主题已有多条阶段性记录,优先用 `change_mind` 合并成当前摘要;把细节放进 rtws 正式文档,并在差遣牒里保留文档定位 pointer。若会冲掉原有内容,必须有直接人类确认,或已按人类认可 SOP/验收标准充分考虑原有内容后再改写
137
137
  - 换程前收束:主线对话先把尚未落实到文档、且下一程需要知会的讨论细节写入差遣牒合适章节,再整理结构化接续包提醒项;支线对话不要维护差遣牒,也不要整理差遣牒更新提案,直接维护足够详尽的接续包提醒项。若系统已把当前程切到吃紧/告急处置态,则先保留多条粗略提醒项过桥也可以;当前程只做落文档/保信息 + `clear_mind`(支线只做保信息 + `clear_mind`),系统真正开启新一程后第一步再收敛
138
138
  - 拒绝原料堆积:不要把长日志/大段 tool output 直接塞进提醒项
139
139
  - 文档分层:差遣牒写“现在应如何同步/推进”,正式文档写“为什么、怎么做、详细证据和完整过程”。差遣牒需要引用正式文档时,写稳定路径/章节名/相关命令,而不是复制整段内容
@@ -156,7 +156,7 @@
156
156
  ## 限制与注意事项
157
157
 
158
158
  1. `dialog` 提醒会随对话结束而结束;`personal` 提醒会在所有由你主理的后续对话里继续可见
159
- 2. 缺失差遣牒章节用 `do_mind` 创建;差遣牒少量新增可用 `mind_more` 追加;已有章节整段替换用 `change_mind`,请确保合并已有内容;确需删除整章文件时用 `never_mind`。不要把 `mind_more` 当流水账工具;需要整理、去旧、合并同主题记录时直接 `change_mind`
159
+ 2. 缺失差遣牒章节用 `do_mind` 创建;差遣牒少量新增可用 `mind_more` 追加;已有章节整段替换用 `change_mind`,请确保合并已有内容并带上当前 `content_hash` 作为 `previous_content_hash`;确需删除整章文件时用 `never_mind`。不要把 `mind_more` 当流水账工具;需要整理、去旧、合并同主题记录时直接 `change_mind`
160
160
  3. `do_mind` / `mind_more` / `change_mind` / `never_mind` 不开启新 course
161
161
  4. 接续包提醒项只保留差遣牒仍未覆盖、但恢复工作容易丢的细节;主线对话应先把当前对话历史中应由下一程知会的未落文档讨论细节写入差遣牒合适章节;支线对话在吃紧/告急时只维护足够详尽的接续包提醒项
162
162
  5. 不要把 `personal` 提醒堆成长期事实仓库;耐久知识应迁到 `personal_memory`
@@ -131,6 +131,7 @@ change_mind({
131
131
  selector: 'progress',
132
132
  content:
133
133
  '## Progress\n\n### 当前有效状态\n- 已完成三类记忆载体边界收口,准备补 Taskdoc 公告牌属性;细节见 <文档路径>#<章节>\n\n### 已生效决策\n- `personal_memory` 不再作为短期杂物柜\n- `team_memory` 只承接团队长期共识与不变量\n\n### 下一步\n- 在 control / team_mgmt 手册中补强 `progress` 的公告牌语义\n\n### 仍成立阻塞\n- 无',
134
+ previous_content_hash: 'sha256:...',
134
135
  });
135
136
  ```
136
137
 
@@ -147,6 +148,7 @@ change_mind({
147
148
  selector: 'goals',
148
149
  content:
149
150
  '## Goals\n\n- [ ] 创建所有工具集手册\n - [x] ws_mod\n - [x] team_mgmt\n - [x] personal_memory\n - [ ] control (进行中)\n- [ ] 编写工具描述',
151
+ previous_content_hash: 'sha256:...',
150
152
  });
151
153
  ```
152
154
 
@@ -163,6 +165,7 @@ change_mind({
163
165
  selector: 'constraints',
164
166
  content:
165
167
  '## Constraints\n\n- man 函数必须根据 team.yaml 动态过滤工具集\n- 运行时生效:team.yaml 配置变更后立即可见\n- 工具集名称使用下划线格式\n- 新增约束:每个工具集需要 5 个 topic × 2 个语言',
168
+ previous_content_hash: 'sha256:...',
166
169
  });
167
170
  ```
168
171
 
@@ -202,5 +205,6 @@ change_mind({
202
205
  selector: 'progress',
203
206
  content:
204
207
  '## Progress\n\n### 当前有效状态\n- 边界口径已统一到手册源头与测试;细节见 <文档路径>#<章节>\n\n### 已生效决策\n- 角色级资产 / personal_memory / team_memory / Taskdoc-progress / reminders 的职责已经切开\n\n### 下一步\n- 复验 control 手册、Taskdoc 展示文案与边界测试\n\n### 仍成立阻塞\n- 无',
208
+ previous_content_hash: 'sha256:...',
205
209
  });
206
210
  ```
@@ -150,7 +150,7 @@ status: ok|error
150
150
 
151
151
  - 只创建,不覆盖已有内容
152
152
  - 适合创建缺失的常驻章节,或新增额外章节来保留细节,同时不触碰已有差遣牒正文
153
- - 若目标已存在且只需少量补充,用 `mind_more`;若需要整章改写/合并,用 `change_mind`
153
+ - 若目标已存在且只需少量补充,用 `mind_more`;若需要整章改写/合并,用 `change_mind` 并带上当前 `content_hash` 作为 `previous_content_hash`
154
154
  - 不开启新 course
155
155
  - 变更对所有队友可见
156
156
 
@@ -163,6 +163,7 @@ status: ok|error
163
163
  - `selector`(必需):章节选择器(goals/constraints/progress)
164
164
  - `category`(可选):额外章节目录;与 `selector` 组合定位 `<category>/<selector>.md`
165
165
  - `content`(必需):新内容(整段替换)
166
+ - `previous_content_hash`(必需):本次替换所基于的当前章节 `content_hash`
166
167
 
167
168
  **返回:**
168
169
 
@@ -175,6 +176,7 @@ updated_at: <更新时间戳>
175
176
  **特点:**
176
177
 
177
178
  - 每次调用替换已有的整个章节;不会创建缺失章节
179
+ - 若 `previous_content_hash` 与当前章节内容哈希不匹配,替换会被拒绝
178
180
  - 不开启新 course
179
181
  - 变更对所有队友可见
180
182
  - 约束规则:`constraints` 只写任务特有硬要求,不得重复系统提示/工具文档中的全局规则;一经发现重复,必须删除并告知用户
@@ -203,7 +205,7 @@ mind_more({
203
205
  - 只追加,不会自动去重、改写或压缩旧内容
204
206
  - 适合给 `progress` 补一两条当前仍有效的状态、决策、下一步或阻塞
205
207
  - 不适合把每一步调查过程、长日志、完整方案或验收记录当流水账追加进去;这些细节应写入 rtws 正式文档,差遣牒只写摘要和文档定位 pointer
206
- - 若需要删除陈旧项、重排结构或压缩公告牌,仍使用 `change_mind` 做整章替换;若要删除整个章节文件,使用 `never_mind`
208
+ - 若需要删除陈旧项、重排结构或压缩公告牌,仍使用带当前 `content_hash` 作为 `previous_content_hash` 的 `change_mind` 做整章替换;若要删除整个章节文件,使用 `never_mind`
207
209
  - 当同一主题已经有多条阶段记录时,优先 `change_mind` 合并成当前仍有效的简明公告,而不是继续 `mind_more`
208
210
 
209
211
  ### 8. never_mind
@@ -218,7 +220,7 @@ mind_more({
218
220
  **特点:**
219
221
 
220
222
  - 只删除整章文件,不做内容编辑
221
- - 仅用于章节整体不再成立;如果只是删除几条陈旧项或压缩结构,优先用 `change_mind` 写回整理后的全文
223
+ - 仅用于章节整体不再成立;如果只是删除几条陈旧项或压缩结构,优先用带当前 `content_hash` 作为 `previous_content_hash` 的 `change_mind` 写回整理后的全文
222
224
  - 不开启新 course
223
225
 
224
226
  ### 9. recall_taskdoc
@@ -302,6 +304,7 @@ change_mind({
302
304
  selector: 'progress',
303
305
  content:
304
306
  '## Progress\n\n### 当前有效状态\n- 手册边界方案已确定:角色级资产 / 个人长期经验 / Taskdoc-progress / reminders 分流;细节见 <文档路径>#<章节>\n\n### 已生效决策\n- `persona / knowhow / pitfalls` 不承接成员日常经验\n- `personal_memory` 只承接成员自己的长期可复用经验\n\n### 下一步\n- 补齐 Taskdoc `progress` 的公告牌属性说明\n\n### 仍成立阻塞\n- 无',
307
+ previous_content_hash: 'sha256:...',
305
308
  });
306
309
  ```
307
310
 
@@ -114,8 +114,8 @@ async function renderTeamMgmtGuideContent(language, topicsRaw = []) {
114
114
  '`model_param_options` 可选:用于记录该 provider 支持的 `.minds/team.yaml model_params` 选项(文档用途)。',
115
115
  '`apiQuirks` 可选:写在 `providers.<providerKey>.apiQuirks`,类型是 `string|string[]`;需要多个 quirk 时用数组,例如 `apiQuirks: [same-context-empty-response]`。它是 provider 级 transport / 网关兼容开关,用来描述“这个供应商/网关的 API 有非标准行为”,不是 `.minds/team.yaml` 的成员参数,也不是 `model_params`。',
116
116
  '使用原则:只有在你确认某个上游网关确实偏离了标准协议,而且 Dominds 已为这个偏差实现了命名 quirk 时才配置;不要把它当作随意调参入口。当前实现里,未知 quirk 值通常不会报错,但也不会带来任何效果。',
117
- '当前已知示例:OpenAI Responses 包装层支持 `apiQuirks: xcode.best`(或数组里包含它),用于识别 vendor keepalive、处理 xcode.best 特有的失败模式,以及把网关返回的 HTML 版 502 Bad Gateway 错误页和 `500 auth_unavailable: no auth available` 这类基础设施失败归类为 conservative 策略重试。OpenAI-compatible Chat Completions 包装层支持 `apiQuirks: same-context-empty-response`,用于“同一对话 generation 上下文连续返回 empty response”时先做少量临时重试;如果在同一 generation 上下文里连续达到阈值,就判定为 provider same-context deadlock,并停止继续沿用同一上下文自动重试。Anthropic-compatible 包装层支持 `apiQuirks: glm-via-volcano` 和 `apiQuirks: volcano-tool-use`。最小示例:\n```yaml\nproviders:\n my_gateway:\n apiType: openai-compatible\n baseUrl: https://example.invalid/v1\n apiKeyEnvVar: MY_GATEWAY_API_KEY\n apiQuirks: same-context-empty-response\n models:\n my_model: { name: "upstream-model-id" }\n```',
118
- '边界提醒:`apiQuirks` 只影响实现里显式消费它的 provider/generator。就当前实现看,OpenAI Responses、OpenAI-compatibleAnthropic-compatible 路径会读取它;不要假设所有 `apiType` 都支持或需要它。若配置后行为仍异常,应继续检查上游网关文档、抓流事件类型,并结合 `team_mgmt_check_provider(...)` / 运行日志排查。',
117
+ '当前已知示例:OpenAI Responses 包装层支持 `apiQuirks: xcode.best`(或数组里包含它),用于识别 vendor keepalive、处理 xcode.best 特有的失败模式,以及把网关返回的 HTML 版 502 Bad Gateway 错误页和 `500 auth_unavailable: no auth available` 这类基础设施失败归类为 conservative 策略重试。OpenAI-compatible Chat Completions 包装层支持 `apiQuirks: same-context-empty-response`,用于“同一对话 generation 上下文连续返回 empty response”时先做少量临时重试;也支持内置 `kimi-code` provider 使用的 `apiQuirks: kimi-code`,用于 Kimi Code 专用 User-Agent、`prompt_cache_key` 和 `thinking`/`reasoning_effort` 请求整形。最小示例:\n```yaml\nproviders:\n my_gateway:\n apiType: openai-compatible\n baseUrl: https://example.invalid/v1\n apiKeyEnvVar: MY_GATEWAY_API_KEY\n apiQuirks: same-context-empty-response\n models:\n my_model: { name: "upstream-model-id" }\n```',
118
+ '边界提醒:`apiQuirks` 只影响实现里显式消费它的 provider/generator。就当前实现看,OpenAI Responses 与 OpenAI-compatible 路径会读取它;不要假设所有 `apiType` 都支持或需要它。若配置后行为仍异常,应继续检查上游网关文档、抓流事件类型,并结合 `team_mgmt_check_provider(...)` / 运行日志排查。',
119
119
  ])
120
120
  : fmtHeader('.minds/llm.yaml') +
121
121
  fmtList([
@@ -128,8 +128,8 @@ async function renderTeamMgmtGuideContent(language, topicsRaw = []) {
128
128
  'Optional: `model_param_options` documents `.minds/team.yaml model_params` knobs (documentation only).',
129
129
  '`apiQuirks` is optional under `providers.<providerKey>.apiQuirks`, with type `string|string[]`; use an array for multiple quirks, for example `apiQuirks: [same-context-empty-response]`. It is a provider-level transport / gateway compatibility switch for non-standard upstream API behavior. It is not a `.minds/team.yaml` member field and not part of `model_params`.',
130
130
  'Use it only when you have confirmed that an upstream gateway deviates from the expected protocol and Dominds has an explicitly named quirk for that deviation. Do not treat it as a generic tuning field. In the current implementation, unknown quirk values are usually ignored rather than rejected, so a typo may silently do nothing.',
131
- 'Known current example: the OpenAI Responses wrapper supports `apiQuirks: xcode.best` (or an array containing it) for vendor keepalive recognition, xcode.best-specific failures, and gateway-returned HTML 502 Bad Gateway plus `500 auth_unavailable: no auth available` infrastructure failures. The OpenAI-compatible Chat Completions wrapper supports `apiQuirks: same-context-empty-response` for repeated empty responses in the same dialog generation context: it tries a short burst first, then treats the streak as a provider-side same-context deadlock and stops repeating the same automatic retry path. The Anthropic-compatible wrapper supports `apiQuirks: glm-via-volcano` and `apiQuirks: volcano-tool-use`. Minimal example:\n```yaml\nproviders:\n my_gateway:\n apiType: openai-compatible\n baseUrl: https://example.invalid/v1\n apiKeyEnvVar: MY_GATEWAY_API_KEY\n apiQuirks: same-context-empty-response\n models:\n my_model: { name: "upstream-model-id" }\n```',
132
- 'Boundary reminder: `apiQuirks` only affects providers/generators that explicitly read it in code. In the current implementation, the OpenAI Responses, OpenAI-compatible, and Anthropic-compatible paths consume it; do not assume every `apiType` supports or needs it. If behavior is still wrong after setting it, continue with upstream gateway docs, raw stream event inspection, and `team_mgmt_check_provider(...)` / runtime logs.',
131
+ 'Known current example: the OpenAI Responses wrapper supports `apiQuirks: xcode.best` (or an array containing it) for vendor keepalive recognition, xcode.best-specific failures, and gateway-returned HTML 502 Bad Gateway plus `500 auth_unavailable: no auth available` infrastructure failures. The OpenAI-compatible Chat Completions wrapper supports `apiQuirks: same-context-empty-response` for repeated empty responses in the same dialog generation context, and `apiQuirks: kimi-code` for the built-in Kimi Code provider request shaping: Dominds User-Agent, `prompt_cache_key`, and `thinking`/`reasoning_effort`. Minimal example:\n```yaml\nproviders:\n my_gateway:\n apiType: openai-compatible\n baseUrl: https://example.invalid/v1\n apiKeyEnvVar: MY_GATEWAY_API_KEY\n apiQuirks: same-context-empty-response\n models:\n my_model: { name: "upstream-model-id" }\n```',
132
+ 'Boundary reminder: `apiQuirks` only affects providers/generators that explicitly read it in code. In the current implementation, the OpenAI Responses and OpenAI-compatible paths consume it; do not assume every `apiType` supports or needs it. If behavior is still wrong after setting it, continue with upstream gateway docs, raw stream event inspection, and `team_mgmt_check_provider(...)` / runtime logs.',
133
133
  ]);
134
134
  }
135
135
  if (want('mcp')) {
@@ -465,9 +465,10 @@ function getWorkspaceProblemPath(problem) {
465
465
  case 'mcp_tool_blacklisted':
466
466
  case 'mcp_tool_not_whitelisted':
467
467
  case 'mcp_tool_invalid_name':
468
- case 'llm_provider_rejected_request':
469
468
  case 'generic_problem':
470
469
  return null;
470
+ case 'llm_provider_rejected_request':
471
+ return problem.detail.requestPayloadPath ?? problem.detail.debugPath ?? null;
471
472
  }
472
473
  }
473
474
  function getProblemUpdatedAt(problem) {
@@ -574,6 +575,15 @@ function formatProblemDetailLines(problem, language) {
574
575
  case 'llm_provider_rejected_request':
575
576
  lines.push(` dialog: ${problem.detail.dialogId}`);
576
577
  lines.push(` provider: ${problem.detail.provider}`);
578
+ if (problem.detail.debugPath !== undefined) {
579
+ lines.push(` debug: ${problem.detail.debugPath}`);
580
+ }
581
+ if (problem.detail.requestPayloadPath !== undefined) {
582
+ lines.push(` request_payload: ${problem.detail.requestPayloadPath}`);
583
+ }
584
+ if (problem.detail.debugCaptureError !== undefined) {
585
+ lines.push(` debug_capture_error: ${problem.detail.debugCaptureError}`);
586
+ }
577
587
  lines.push(' ' +
578
588
  truncateProblemTextBlock(problem.detailTextI18n?.[language] ?? problem.detail.errorText)
579
589
  .split('\n')
@@ -3360,7 +3370,7 @@ function renderMemberProperties(language) {
3360
3370
  '`nogo`:可选的反向路由卡(建议 5 行内),写“不要找这个队友做什么、应改找哪类队友/路径”。它和 `gofor` 一样,是给其他队友/人类看的,不是该成员自己的内部守则清单。支持 string / YAML list / YAML object;object 的 key 完全 freeform(value 必须是 string)。若你写的是 `- 标签: 内容` 这类结构化 list,虽然允许,但 `team_mgmt_validate_team_cfg({})` 会给 warning,建议改成 object。',
3361
3371
  '`provider` / `model` / `model_params`',
3362
3372
  '`toolsets` / `tools`(两者可同时配置;多数情况下推荐用 toolsets 做粗粒度授权,用 tools 做少量补充/收敛。具体冲突/合并规则以当前实现为准)',
3363
- '`diligence-push-max`:鞭策 上限(number)。也接受兼容别名 `diligence_push_max`,但请优先用 `diligence-push-max`。',
3373
+ '`diligence-push-max`:新建/重置对话的鞭策默认预算(number)。也接受兼容别名 `diligence_push_max`,但请优先用 `diligence-push-max`。运行时以具体对话自己的剩余预算为准。',
3364
3374
  '`streaming`:是否启用流式输出。注意:若该成员解析后的 provider 的 `apiType` 是 `codex`,则 `streaming: false` 属于配置错误(Codex 仅支持流式);会在 team 校验与运行期被视为严重问题并中止请求。',
3365
3375
  '`hidden`(影子/隐藏成员:不出现在系统提示的团队目录里,但仍可被诉请)',
3366
3376
  '`read_dirs` / `write_dirs` / `no_read_dirs` / `no_write_dirs` / `read_file_ext_names` / `write_file_ext_names` / `no_read_file_ext_names` / `no_write_file_ext_names`(冲突规则见 `man({ "toolsetId": "team_mgmt", "topics": ["permissions"] })`;read 与 write 是独立控制,别默认 write implies read)',
@@ -3374,7 +3384,7 @@ function renderMemberProperties(language) {
3374
3384
  '`nogo`: an optional negative routing card (≤ 5 lines) for other teammates/humans. Write what should not be routed to this teammate and what kind of teammate/path should take it instead. Like `gofor`, this is external routing metadata, not the member’s own internal rule sheet. It accepts string / YAML list / YAML object; object keys are fully freeform (values must be strings). Structured lists are still allowed but YAML object form is preferred for labeled entries.',
3375
3385
  '`provider` / `model` / `model_params`',
3376
3386
  '`toolsets` / `tools`(两者可同时配置;多数情况下推荐用 toolsets 做粗粒度授权,用 tools 做少量补充/收敛。具体冲突/合并规则以当前实现为准)',
3377
- '`diligence-push-max`: Diligence Push cap (number). Compatibility alias `diligence_push_max` is accepted, but prefer `diligence-push-max`.',
3387
+ '`diligence-push-max`: Diligence Push default budget for newly created/reset dialogs (number). Compatibility alias `diligence_push_max` is accepted, but prefer `diligence-push-max`. Runtime decisions use each dialog’s own remaining budget.',
3378
3388
  '`streaming`: whether to enable streaming output. Note: if the member resolves to a provider whose `apiType` is `codex`, then `streaming: false` is a configuration error (Codex is streaming-only); it is treated as a severe issue during validation/runtime and the request will be aborted.',
3379
3389
  '`hidden` (shadow/hidden member: excluded from system-prompt team directory, but callable)',
3380
3390
  '`read_dirs` / `write_dirs` / `no_read_dirs` / `no_write_dirs` / `read_file_ext_names` / `write_file_ext_names` / `no_read_file_ext_names` / `no_write_file_ext_names`(冲突规则见 `man({ "toolsetId": "team_mgmt", "topics": ["permissions"] })`;read 与 write 是独立控制,别默认 write implies read)',
@@ -3999,7 +4009,7 @@ async function renderModelParamsManual(language) {
3999
4009
  '想查看某个 provider 的“有效配置” `model_param_options`:优先用 `team_mgmt_list_models({ source: \"effective\", provider_pattern: \"<providerKey>\", model_pattern: \"*\", include_param_options: true })`(会列出该 provider 可用的参数说明)。',
4000
4010
  '常见参数示例(不同 provider 支持不同):例如 `reasoning_effort`、`verbosity`、`temperature` 等。对内置 `codex` provider,这些参数应写在 `model_params.codex.*` 下。',
4001
4011
  '`model_params` 命名空间按 `apiType` 精确区分:官方 OpenAI 用 `openai`,OpenAI 兼容 Chat Completions 用 `openai-compatible`;官方 Anthropic 用 `anthropic`,Anthropic 兼容网关用 `anthropic-compatible`。同一个成员可以同时配置多套 namespace,运行时只读取当前 provider 对应的一套。',
4002
- '`model_params.openai-compatible.thinking` / `reasoning_effort` 属于 OpenAI-compatible Chat Completions 参数:`thinking` 可写 boolean 简写或 provider 自己文档里的 object;运行时会按当前 provider 透传;如果上游模型/网关不支持,对方可能拒绝请求。',
4012
+ '`model_params.openai-compatible.thinking` / `reasoning_effort` 属于 OpenAI-compatible Chat Completions 参数:普通 provider 的 `thinking` 可写 boolean 简写或 provider 自己文档里的 object;内置 `kimi-code` provider 还支持 `auto|off|low|medium|high` 档位并会展开成 Kimi Code 专用请求字段。如果上游模型/网关不支持,对方可能拒绝请求。',
4003
4013
  '`model_params.anthropic.thinking` 使用 Anthropic 官方 object(例如 `{ type: adaptive }`、`{ type: enabled, budget_tokens: 1024 }` 或 `{ type: disabled }`);`model_params.anthropic-compatible.thinking` 使用 boolean(`true` 发送 `thinking.type=enabled`,`false` 发送 `thinking.type=disabled`)。',
4004
4014
  '常见坑:不要把 `reasoning_effort` / `verbosity` 直接写在 `member_defaults` 或 `members.<id>` 根上(会被忽略,并会被 team.yaml 校验提示);应写在 `model_params.codex.*` 下。',
4005
4015
  '`model_param_options.<ns>.<param>.prominent: true`:表示“初始化/团队管理时应显式讨论并选定”的参数。不要依赖 provider/model 的隐含默认值。',
@@ -4031,7 +4041,7 @@ async function renderModelParamsManual(language) {
4031
4041
  'To inspect a provider’s effective `model_param_options`, prefer `team_mgmt_list_models({ source: \"effective\", provider_pattern: \"<providerKey>\", model_pattern: \"*\", include_param_options: true })` (lists the parameters documented for that provider).',
4032
4042
  'Common examples (provider-dependent): e.g. `reasoning_effort`, `verbosity`, `temperature`, etc. For the built-in `codex` provider, these go under `model_params.codex.*`.',
4033
4043
  '`model_params` namespaces are split by exact `apiType`: official OpenAI uses `openai`, OpenAI-compatible Chat Completions uses `openai-compatible`; official Anthropic uses `anthropic`, Anthropic-compatible gateways use `anthropic-compatible`. A member can configure multiple namespaces at once; runtime reads only the namespace matching the selected provider.',
4034
- '`model_params.openai-compatible.thinking` / `reasoning_effort` are OpenAI-compatible Chat Completions params: `thinking` accepts a boolean shorthand or the provider-documented object shape; Dominds passes them through for the current provider; unsupported upstream models/gateways may reject the request.',
4044
+ '`model_params.openai-compatible.thinking` / `reasoning_effort` are OpenAI-compatible Chat Completions params: for ordinary providers, `thinking` accepts a boolean shorthand or the provider-documented object shape; the built-in `kimi-code` provider also accepts `auto|off|low|medium|high` and expands it into Kimi Code request fields. Unsupported upstream models/gateways may reject the request.',
4035
4045
  '`model_params.anthropic.thinking` uses the official Anthropic object shape (for example `{ type: adaptive }`, `{ type: enabled, budget_tokens: 1024 }`, or `{ type: disabled }`); `model_params.anthropic-compatible.thinking` uses a boolean (`true` sends `thinking.type=enabled`, `false` sends `thinking.type=disabled`).',
4036
4046
  'Common pitfall: do not put `reasoning_effort` / `verbosity` directly under `member_defaults` or `members.<id>` (they are ignored and will be flagged by team.yaml validation); put them under `model_params.codex.*`.',
4037
4047
  '`model_param_options.<ns>.<param>.prominent: true` means “discuss and pick explicitly during bootstrap/team management”. Do not rely on implicit provider/model defaults.',
@@ -107,6 +107,7 @@ export type TaskPackageChangeMindTargetParseResult = {
107
107
  kind: 'err';
108
108
  error: TaskPackageChangeMindTargetError;
109
109
  };
110
+ export type TaskPackageContentHash = `sha256:${string}`;
110
111
  export declare function isTaskPackagePath(taskDocPath: string): boolean;
111
112
  export declare function taskPackageSectionFromSelector(selector: string): TaskPackageSection | null;
112
113
  export declare function bearInMindSectionFromSelector(selector: string): BearInMindSection | null;
@@ -120,11 +121,25 @@ export declare function updateTaskPackageByChangeMindTarget(params: {
120
121
  taskPackageDirFullPath: string;
121
122
  target: TaskPackageChangeMindTarget;
122
123
  content: string;
124
+ previousContentHash: string;
123
125
  updatedBy?: string;
124
126
  }): Promise<{
125
127
  kind: 'updated';
126
128
  } | {
127
129
  kind: 'missing';
130
+ } | {
131
+ kind: 'content_hash_mismatch';
132
+ currentContentHash: TaskPackageContentHash;
133
+ }>;
134
+ export declare function readTaskPackageByChangeMindTarget(params: {
135
+ taskPackageDirFullPath: string;
136
+ target: TaskPackageChangeMindTarget;
137
+ }): Promise<{
138
+ kind: 'present';
139
+ content: string;
140
+ contentHash: TaskPackageContentHash;
141
+ } | {
142
+ kind: 'missing';
128
143
  }>;
129
144
  export declare function createTaskPackageByChangeMindTarget(params: {
130
145
  taskPackageDirFullPath: string;
@@ -151,6 +166,7 @@ export declare function deleteTaskPackageByChangeMindTarget(params: {
151
166
  } | {
152
167
  kind: 'missing';
153
168
  }>;
169
+ export declare function computeTaskPackageContentHash(content: string): TaskPackageContentHash;
154
170
  export declare function taskPackageRelativePathForChangeMindTarget(target: TaskPackageChangeMindTarget): string;
155
171
  export declare function ensureTaskPackage(taskPackageDirFullPath: string, _updatedBy?: string): Promise<void>;
156
172
  export declare function readTaskPackageSections(taskPackageDirFullPath: string): Promise<TaskPackageSectionsState>;