dominds 0.7.1 → 0.7.3

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 (120) hide show
  1. package/dist/dialog-global-registry.js +58 -3
  2. package/dist/dialog.js +17 -0
  3. package/dist/docs/dialog-system.md +18 -16
  4. package/dist/docs/dialog-system.zh.md +20 -19
  5. package/dist/evt-registry.js +16 -7
  6. package/dist/llm/driver-v2/context.js +2 -1
  7. package/dist/llm/driver-v2/core.js +102 -119
  8. package/dist/llm/driver-v2/orchestrator.js +65 -38
  9. package/dist/llm/driver-v2/round.js +213 -35
  10. package/dist/llm/driver-v2/runtime-utils.js +1 -0
  11. package/dist/llm/driver-v2/supdialog-response.js +5 -18
  12. package/dist/llm/driver-v2/tellask-bridge.js +95 -6
  13. package/dist/llm/driver.js +29 -2
  14. package/dist/minds/builtin/cmdr/persona.md +3 -0
  15. package/dist/minds/builtin/dijiang/knowledge.md +287 -0
  16. package/dist/minds/builtin/dijiang/persona.md +7 -0
  17. package/dist/persistence.js +28 -0
  18. package/dist/server/websocket-handler.js +134 -25
  19. package/dist/shared/diligence.js +8 -2
  20. package/dist/showing-by-doing.js +31 -34
  21. package/dist/static/assets/{_baseUniq-BxKNVs_E.js → _baseUniq-zV3pyJ-s.js} +2 -2
  22. package/dist/static/assets/{_baseUniq-BxKNVs_E.js.map → _baseUniq-zV3pyJ-s.js.map} +1 -1
  23. package/dist/static/assets/{arc-SobL0GO-.js → arc-Ctgmrh71.js} +2 -2
  24. package/dist/static/assets/{arc-SobL0GO-.js.map → arc-Ctgmrh71.js.map} +1 -1
  25. package/dist/static/assets/{architectureDiagram-VXUJARFQ-MMDS1QOC.js → architectureDiagram-VXUJARFQ-CAH1Zinn.js} +6 -6
  26. package/dist/static/assets/{architectureDiagram-VXUJARFQ-MMDS1QOC.js.map → architectureDiagram-VXUJARFQ-CAH1Zinn.js.map} +1 -1
  27. package/dist/static/assets/{blockDiagram-VD42YOAC-BOsSirNK.js → blockDiagram-VD42YOAC-Djz6JdD2.js} +7 -7
  28. package/dist/static/assets/{blockDiagram-VD42YOAC-BOsSirNK.js.map → blockDiagram-VD42YOAC-Djz6JdD2.js.map} +1 -1
  29. package/dist/static/assets/{c4Diagram-YG6GDRKO-D4jQkzwx.js → c4Diagram-YG6GDRKO-CSuskOyq.js} +3 -3
  30. package/dist/static/assets/{c4Diagram-YG6GDRKO-D4jQkzwx.js.map → c4Diagram-YG6GDRKO-CSuskOyq.js.map} +1 -1
  31. package/dist/static/assets/{channel-CNJ5IKbI.js → channel-Ym6U59Kh.js} +2 -2
  32. package/dist/static/assets/{channel-CNJ5IKbI.js.map → channel-Ym6U59Kh.js.map} +1 -1
  33. package/dist/static/assets/{chunk-4BX2VUAB-Dzp3xxyo.js → chunk-4BX2VUAB-CqbVylSz.js} +2 -2
  34. package/dist/static/assets/{chunk-4BX2VUAB-Dzp3xxyo.js.map → chunk-4BX2VUAB-CqbVylSz.js.map} +1 -1
  35. package/dist/static/assets/{chunk-55IACEB6-CbmixuSI.js → chunk-55IACEB6-CeWj8Jm_.js} +2 -2
  36. package/dist/static/assets/{chunk-55IACEB6-CbmixuSI.js.map → chunk-55IACEB6-CeWj8Jm_.js.map} +1 -1
  37. package/dist/static/assets/{chunk-B4BG7PRW-CdpmYjdb.js → chunk-B4BG7PRW-BjxJkuhq.js} +5 -5
  38. package/dist/static/assets/{chunk-B4BG7PRW-CdpmYjdb.js.map → chunk-B4BG7PRW-BjxJkuhq.js.map} +1 -1
  39. package/dist/static/assets/{chunk-DI55MBZ5-wBUIgR3h.js → chunk-DI55MBZ5-9kxfXB4B.js} +4 -4
  40. package/dist/static/assets/{chunk-DI55MBZ5-wBUIgR3h.js.map → chunk-DI55MBZ5-9kxfXB4B.js.map} +1 -1
  41. package/dist/static/assets/{chunk-FMBD7UC4-l62jcBz-.js → chunk-FMBD7UC4-DyM3IVWB.js} +2 -2
  42. package/dist/static/assets/{chunk-FMBD7UC4-l62jcBz-.js.map → chunk-FMBD7UC4-DyM3IVWB.js.map} +1 -1
  43. package/dist/static/assets/{chunk-QN33PNHL-BXfKZUpE.js → chunk-QN33PNHL-DGU21aEB.js} +2 -2
  44. package/dist/static/assets/{chunk-QN33PNHL-BXfKZUpE.js.map → chunk-QN33PNHL-DGU21aEB.js.map} +1 -1
  45. package/dist/static/assets/{chunk-QZHKN3VN-BYB4VxWj.js → chunk-QZHKN3VN-Cw9Hpt-y.js} +2 -2
  46. package/dist/static/assets/{chunk-QZHKN3VN-BYB4VxWj.js.map → chunk-QZHKN3VN-Cw9Hpt-y.js.map} +1 -1
  47. package/dist/static/assets/{chunk-TZMSLE5B-CvlWEnXl.js → chunk-TZMSLE5B-J-eTCnFj.js} +2 -2
  48. package/dist/static/assets/{chunk-TZMSLE5B-CvlWEnXl.js.map → chunk-TZMSLE5B-J-eTCnFj.js.map} +1 -1
  49. package/dist/static/assets/{classDiagram-2ON5EDUG-x2kw_AQY.js → classDiagram-2ON5EDUG-BvoDAd8E.js} +6 -6
  50. package/dist/static/assets/{classDiagram-2ON5EDUG-x2kw_AQY.js.map → classDiagram-2ON5EDUG-BvoDAd8E.js.map} +1 -1
  51. package/dist/static/assets/{classDiagram-v2-WZHVMYZB-x2kw_AQY.js → classDiagram-v2-WZHVMYZB-BvoDAd8E.js} +6 -6
  52. package/dist/static/assets/{classDiagram-v2-WZHVMYZB-x2kw_AQY.js.map → classDiagram-v2-WZHVMYZB-BvoDAd8E.js.map} +1 -1
  53. package/dist/static/assets/{clone-CfBpi3MU.js → clone-CojsCkky.js} +2 -2
  54. package/dist/static/assets/{clone-CfBpi3MU.js.map → clone-CojsCkky.js.map} +1 -1
  55. package/dist/static/assets/{cose-bilkent-S5V4N54A-DQSzPb7y.js → cose-bilkent-S5V4N54A-BEtK3OcG.js} +2 -2
  56. package/dist/static/assets/{cose-bilkent-S5V4N54A-DQSzPb7y.js.map → cose-bilkent-S5V4N54A-BEtK3OcG.js.map} +1 -1
  57. package/dist/static/assets/{dagre-6UL2VRFP-BuBo_U3J.js → dagre-6UL2VRFP-C5DMaVj0.js} +7 -7
  58. package/dist/static/assets/{dagre-6UL2VRFP-BuBo_U3J.js.map → dagre-6UL2VRFP-C5DMaVj0.js.map} +1 -1
  59. package/dist/static/assets/{diagram-PSM6KHXK-J2z13Z5A.js → diagram-PSM6KHXK-kVP0dZ6K.js} +7 -7
  60. package/dist/static/assets/{diagram-PSM6KHXK-J2z13Z5A.js.map → diagram-PSM6KHXK-kVP0dZ6K.js.map} +1 -1
  61. package/dist/static/assets/{diagram-QEK2KX5R-x8XUGykE.js → diagram-QEK2KX5R-C4p2yibe.js} +6 -6
  62. package/dist/static/assets/{diagram-QEK2KX5R-x8XUGykE.js.map → diagram-QEK2KX5R-C4p2yibe.js.map} +1 -1
  63. package/dist/static/assets/{diagram-S2PKOQOG-BE6Nr1BM.js → diagram-S2PKOQOG-B3vObsYY.js} +6 -6
  64. package/dist/static/assets/{diagram-S2PKOQOG-BE6Nr1BM.js.map → diagram-S2PKOQOG-B3vObsYY.js.map} +1 -1
  65. package/dist/static/assets/{erDiagram-Q2GNP2WA-D3qVnFAh.js → erDiagram-Q2GNP2WA-AKQItpVu.js} +5 -5
  66. package/dist/static/assets/{erDiagram-Q2GNP2WA-D3qVnFAh.js.map → erDiagram-Q2GNP2WA-AKQItpVu.js.map} +1 -1
  67. package/dist/static/assets/{flowDiagram-NV44I4VS-Cjp9Rt9t.js → flowDiagram-NV44I4VS-2dalJoL3.js} +6 -6
  68. package/dist/static/assets/{flowDiagram-NV44I4VS-Cjp9Rt9t.js.map → flowDiagram-NV44I4VS-2dalJoL3.js.map} +1 -1
  69. package/dist/static/assets/{ganttDiagram-JELNMOA3-D_hc66FC.js → ganttDiagram-JELNMOA3-DUw98Lbz.js} +3 -3
  70. package/dist/static/assets/{ganttDiagram-JELNMOA3-D_hc66FC.js.map → ganttDiagram-JELNMOA3-DUw98Lbz.js.map} +1 -1
  71. package/dist/static/assets/{gitGraphDiagram-NY62KEGX-1I_zaTtz.js → gitGraphDiagram-NY62KEGX-DdwIFk8M.js} +7 -7
  72. package/dist/static/assets/{gitGraphDiagram-NY62KEGX-1I_zaTtz.js.map → gitGraphDiagram-NY62KEGX-DdwIFk8M.js.map} +1 -1
  73. package/dist/static/assets/{graph-K6mmQESm.js → graph-BBEAP9Z9.js} +3 -3
  74. package/dist/static/assets/{graph-K6mmQESm.js.map → graph-BBEAP9Z9.js.map} +1 -1
  75. package/dist/static/assets/{index-RV1MEt3b.js → index-CqMOe9zt.js} +195 -114
  76. package/dist/static/assets/index-CqMOe9zt.js.map +1 -0
  77. package/dist/static/assets/{infoDiagram-WHAUD3N6-CqazW4ov.js → infoDiagram-WHAUD3N6-Cep11ST9.js} +5 -5
  78. package/dist/static/assets/{infoDiagram-WHAUD3N6-CqazW4ov.js.map → infoDiagram-WHAUD3N6-Cep11ST9.js.map} +1 -1
  79. package/dist/static/assets/{journeyDiagram-XKPGCS4Q-CCwUViz2.js → journeyDiagram-XKPGCS4Q-Ba8wkBNB.js} +5 -5
  80. package/dist/static/assets/{journeyDiagram-XKPGCS4Q-CCwUViz2.js.map → journeyDiagram-XKPGCS4Q-Ba8wkBNB.js.map} +1 -1
  81. package/dist/static/assets/{kanban-definition-3W4ZIXB7-BKj9P06Z.js → kanban-definition-3W4ZIXB7-DhxNBORX.js} +3 -3
  82. package/dist/static/assets/{kanban-definition-3W4ZIXB7-BKj9P06Z.js.map → kanban-definition-3W4ZIXB7-DhxNBORX.js.map} +1 -1
  83. package/dist/static/assets/{layout-BcrPlYah.js → layout-Ckbr6Zyz.js} +5 -5
  84. package/dist/static/assets/{layout-BcrPlYah.js.map → layout-Ckbr6Zyz.js.map} +1 -1
  85. package/dist/static/assets/{linear-DYXbzldi.js → linear-BrSsI51I.js} +2 -2
  86. package/dist/static/assets/{linear-DYXbzldi.js.map → linear-BrSsI51I.js.map} +1 -1
  87. package/dist/static/assets/{min-CAfJrdkg.js → min-CeEvLc8D.js} +3 -3
  88. package/dist/static/assets/{min-CAfJrdkg.js.map → min-CeEvLc8D.js.map} +1 -1
  89. package/dist/static/assets/{mindmap-definition-VGOIOE7T-CXWJYrd0.js → mindmap-definition-VGOIOE7T-7ctLd3o3.js} +4 -4
  90. package/dist/static/assets/{mindmap-definition-VGOIOE7T-CXWJYrd0.js.map → mindmap-definition-VGOIOE7T-7ctLd3o3.js.map} +1 -1
  91. package/dist/static/assets/{pieDiagram-ADFJNKIX-DjKlsPYr.js → pieDiagram-ADFJNKIX-CqyILziW.js} +7 -7
  92. package/dist/static/assets/{pieDiagram-ADFJNKIX-DjKlsPYr.js.map → pieDiagram-ADFJNKIX-CqyILziW.js.map} +1 -1
  93. package/dist/static/assets/{quadrantDiagram-AYHSOK5B-fcJtlyUO.js → quadrantDiagram-AYHSOK5B-Byi_xYum.js} +3 -3
  94. package/dist/static/assets/{quadrantDiagram-AYHSOK5B-fcJtlyUO.js.map → quadrantDiagram-AYHSOK5B-Byi_xYum.js.map} +1 -1
  95. package/dist/static/assets/{requirementDiagram-UZGBJVZJ-DmB9Ezaa.js → requirementDiagram-UZGBJVZJ-Boj5vxiZ.js} +4 -4
  96. package/dist/static/assets/{requirementDiagram-UZGBJVZJ-DmB9Ezaa.js.map → requirementDiagram-UZGBJVZJ-Boj5vxiZ.js.map} +1 -1
  97. package/dist/static/assets/{sankeyDiagram-TZEHDZUN-CdGDwaMo.js → sankeyDiagram-TZEHDZUN-DzoUAdfa.js} +2 -2
  98. package/dist/static/assets/{sankeyDiagram-TZEHDZUN-CdGDwaMo.js.map → sankeyDiagram-TZEHDZUN-DzoUAdfa.js.map} +1 -1
  99. package/dist/static/assets/{sequenceDiagram-WL72ISMW-C-jiKkhi.js → sequenceDiagram-WL72ISMW-BKKxpG1m.js} +4 -4
  100. package/dist/static/assets/{sequenceDiagram-WL72ISMW-C-jiKkhi.js.map → sequenceDiagram-WL72ISMW-BKKxpG1m.js.map} +1 -1
  101. package/dist/static/assets/{stateDiagram-FKZM4ZOC-M9808W5W.js → stateDiagram-FKZM4ZOC-B-J7uRZT.js} +9 -9
  102. package/dist/static/assets/{stateDiagram-FKZM4ZOC-M9808W5W.js.map → stateDiagram-FKZM4ZOC-B-J7uRZT.js.map} +1 -1
  103. package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-JE0YQyVh.js → stateDiagram-v2-4FDKWEC3-BOzmoUba.js} +5 -5
  104. package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-JE0YQyVh.js.map → stateDiagram-v2-4FDKWEC3-BOzmoUba.js.map} +1 -1
  105. package/dist/static/assets/{timeline-definition-IT6M3QCI-a2Rh8B62.js → timeline-definition-IT6M3QCI-zu1Rojx9.js} +3 -3
  106. package/dist/static/assets/{timeline-definition-IT6M3QCI-a2Rh8B62.js.map → timeline-definition-IT6M3QCI-zu1Rojx9.js.map} +1 -1
  107. package/dist/static/assets/{treemap-KMMF4GRG-D3tvybuo.js → treemap-KMMF4GRG-C4D91awC.js} +4 -4
  108. package/dist/static/assets/{treemap-KMMF4GRG-D3tvybuo.js.map → treemap-KMMF4GRG-C4D91awC.js.map} +1 -1
  109. package/dist/static/assets/{xychartDiagram-PRI3JC2R-kmwKLP3Y.js → xychartDiagram-PRI3JC2R-YvLKaPZ-.js} +3 -3
  110. package/dist/static/assets/{xychartDiagram-PRI3JC2R-kmwKLP3Y.js.map → xychartDiagram-PRI3JC2R-YvLKaPZ-.js.map} +1 -1
  111. package/dist/static/index.html +1 -1
  112. package/dist/tools/context-health.js +7 -7
  113. package/dist/utils/task-doc.js +16 -16
  114. package/package.json +1 -1
  115. package/dist/docs/keep-going.zh.md +0 -162
  116. package/dist/docs/showing-by-doing.md +0 -208
  117. package/dist/docs/showing-by-doing.zh.md +0 -177
  118. package/dist/minds/promptdocs.js +0 -263
  119. package/dist/snippets/README.en.md +0 -3
  120. package/dist/static/assets/index-RV1MEt3b.js.map +0 -1
@@ -52,7 +52,7 @@
52
52
  padding: 20px;
53
53
  }
54
54
  </style>
55
- <script type="module" crossorigin src="/assets/index-RV1MEt3b.js"></script>
55
+ <script type="module" crossorigin src="/assets/index-CqMOe9zt.js"></script>
56
56
  <link rel="stylesheet" crossorigin href="/assets/index-DaIsSzC_.css">
57
57
  </head>
58
58
  <body>
@@ -39,12 +39,12 @@ function formatContextHealthOwnerHeader(args) {
39
39
  ];
40
40
  if (!snapshot) {
41
41
  lines.push('- 状态:未知(尚未获取上下文统计)');
42
- lines.push('- 优先动作:change_mind(progress) → clear_mind');
42
+ lines.push('- 现在就做:用提醒项收敛关键细节(update_reminder)→ change_mind(progress) → clear_mind');
43
43
  return lines.join('\n');
44
44
  }
45
45
  if (snapshot.kind !== 'available') {
46
46
  lines.push('- 状态:未知(token 统计不可用)');
47
- lines.push('- 优先动作:change_mind(progress) → clear_mind');
47
+ lines.push('- 现在就做:用提醒项收敛关键细节(update_reminder)→ change_mind(progress) → clear_mind');
48
48
  return lines.join('\n');
49
49
  }
50
50
  switch (snapshot.level) {
@@ -53,16 +53,16 @@ function formatContextHealthOwnerHeader(args) {
53
53
  return lines.join('\n');
54
54
  }
55
55
  case 'caution': {
56
- lines.push('- 状态:🟡 黄(警告)');
57
- lines.push('- 优先动作:change_mind(progress) → clear_mind');
56
+ lines.push('- 状态:🟡 黄(必须尽快清理)');
57
+ lines.push('- 硬规程:先 update_reminder 收敛工作集 → 再 change_mind(progress) → 然后 clear_mind');
58
58
  return lines.join('\n');
59
59
  }
60
60
  case 'critical': {
61
- lines.push('- 状态:🔴 红(危险)');
61
+ lines.push('- 状态:🔴 红(硬闸门)');
62
62
  if (remainingGenTurns !== undefined) {
63
- lines.push(`- 倒数:剩余 ${remainingGenTurns} 次生成机会;到 0 系统将自动开启新一轮以保持稳定性`);
63
+ lines.push(`- 倒数:剩余 ${remainingGenTurns} 次生成机会;到 0 系统将被动开启新一轮/新回合以保持稳定性`);
64
64
  }
65
- lines.push('- 立刻:change_mind(progress) → clear_mind');
65
+ lines.push('- 禁止继续推进实现:先 update_reminder 收敛工作集 → 再 change_mind(progress) → 然后 clear_mind');
66
66
  return lines.join('\n');
67
67
  }
68
68
  default: {
@@ -120,33 +120,33 @@ If you provided a regular file path (e.g. a \`.md\`), that is unexpected. Please
120
120
  return [
121
121
  `**差遣牒结构(封装差遣牒 \`*.tsk/\`):**`,
122
122
  `- 我们的差遣牒是一个 \`*.tsk/\` 目录,分为 3 个分段:\`goals\` / \`constraints\` / \`progress\`。`,
123
- `- 维护方式:每次调用函数工具 \`change_mind\` 必须指定一个分段(selector: \`!goals\` / \`!constraints\` / \`!progress\`);可在同一轮中多次调用 \`change_mind\` 来一次更新多个分段。`,
123
+ `- 维护方式:每次 \`!?@change_mind\` 必须指定一个分段(\`!goals\` / \`!constraints\` / \`!progress\`);可在同一条消息中连续发出多个 \`!?@change_mind\` 来一次更新多个分段。`,
124
124
  ``,
125
125
  `**分段状态:**`,
126
126
  `- \`goals.md\`:${goalsZh}`,
127
127
  `- \`constraints.md\`:${constraintsZh}`,
128
128
  `- \`progress.md\`:${progressZh}`,
129
129
  ``,
130
- `若某个分段缺失,请用函数工具 \`change_mind\` 创建(不要用通用文件工具):`,
131
- `- \`change_mind({\"selector\":\"!goals\",\"content\":\"...\"})\``,
132
- `- \`change_mind({\"selector\":\"!constraints\",\"content\":\"...\"})\``,
133
- `- \`change_mind({\"selector\":\"!progress\",\"content\":\"...\"})\``,
130
+ `若某个分段缺失,请用 \`!?@change_mind\` 创建(不要用通用文件工具):`,
131
+ `- \`!?@change_mind !goals\\n!?<content>\``,
132
+ `- \`!?@change_mind !constraints\\n!?<content>\``,
133
+ `- \`!?@change_mind !progress\\n!?<content>\``,
134
134
  ].join('\n');
135
135
  }
136
136
  return [
137
137
  `**Task Doc Constitution (Encapsulated \`*.tsk/\`):**`,
138
138
  `- Our Task Doc is a \`*.tsk/\` directory with exactly 3 sections: \`goals\` / \`constraints\` / \`progress\`.`,
139
- `- Maintenance: each function tool call \`change_mind\` must target one section (selector: \`!goals\` / \`!constraints\` / \`!progress\`). You may call \`change_mind\` multiple times in a single turn to update multiple sections.`,
139
+ `- Maintenance: each \`!?@change_mind\` call must target one section (\`!goals\` / \`!constraints\` / \`!progress\`). You may include multiple \`!?@change_mind\` calls in a single message to update multiple sections.`,
140
140
  ``,
141
141
  `**Sections:**`,
142
142
  `- \`goals.md\`: ${goalsStatus}`,
143
143
  `- \`constraints.md\`: ${constraintsStatus}`,
144
144
  `- \`progress.md\`: ${progressStatus}`,
145
145
  ``,
146
- `If any section is missing, create it with the function tool \`change_mind\` (never via general file tools):`,
147
- `- \`change_mind({\"selector\":\"!goals\",\"content\":\"...\"})\``,
148
- `- \`change_mind({\"selector\":\"!constraints\",\"content\":\"...\"})\``,
149
- `- \`change_mind({\"selector\":\"!progress\",\"content\":\"...\"})\``,
146
+ `If any section is missing, create it with \`!?@change_mind\` (never via general file tools):`,
147
+ `- \`!?@change_mind !goals\\n!?<content>\``,
148
+ `- \`!?@change_mind !constraints\\n!?<content>\``,
149
+ `- \`!?@change_mind !progress\\n!?<content>\``,
150
150
  ].join('\n');
151
151
  })();
152
152
  const effectiveDoc = (0, task_package_1.formatEffectiveTaskDocFromSections)(language, sections);
@@ -164,7 +164,7 @@ If you provided a regular file path (e.g. a \`.md\`), that is unexpected. Please
164
164
  ${statusBlock}
165
165
 
166
166
  ⚠️ **注意:** 差遣牒是封装的。不要用文件工具去读/写/列目录 \`*.tsk/\` 下的任何路径。
167
- 请用函数工具 \`change_mind\` 来更新(每次调用只更新一个分段;你可以在同一轮中多次调用来批量更新),例如:\`change_mind({\"selector\":\"!goals\",\"content\":\"...\"})\` / \`change_mind({\"selector\":\"!constraints\",\"content\":\"...\"})\` / \`change_mind({\"selector\":\"!progress\",\"content\":\"...\"})\`。`,
167
+ 请用 \`!?@change_mind !goals\` / \`!?@change_mind !constraints\` / \`!?@change_mind !progress\` 来更新(每次调用只更新一个分段;你可以在同一条消息里写多个 \`!?@change_mind\` 调用来批量更新)。`,
168
168
  };
169
169
  }
170
170
  return {
@@ -177,7 +177,7 @@ ${statusBlock}
177
177
  ${statusBlock}
178
178
 
179
179
  ⚠️ **Note:** Task Docs are encapsulated. Do not use file tools to read/write/list anything under \`*.tsk/\`.
180
- Use the function tool \`change_mind\` to update (each call updates one section; you may call it multiple times in a single turn to batch updates), e.g. \`change_mind({\"selector\":\"!goals\",\"content\":\"...\"})\` / \`change_mind({\"selector\":\"!constraints\",\"content\":\"...\"})\` / \`change_mind({\"selector\":\"!progress\",\"content\":\"...\"})\`.`,
180
+ Use \`!?@change_mind !goals\` / \`!?@change_mind !constraints\` / \`!?@change_mind !progress\` to update (each call updates one section; you may include multiple \`!?@change_mind\` calls in a single message to batch updates).`,
181
181
  };
182
182
  }
183
183
  if (language === 'zh') {
@@ -194,9 +194,9 @@ ${statusBlock}
194
194
  ${effectiveDoc}
195
195
  ---
196
196
 
197
- *用函数工具 \`change_mind\` 来替换分段(每次调用只替换一个分段;你可以在同一轮中多次调用来批量替换)。*
197
+ *用 \`!?@change_mind !goals\` / \`!?@change_mind !constraints\` / \`!?@change_mind !progress\` 来替换分段(每次调用只替换一个分段;你可以在同一条消息里写多个 \`!?@change_mind\` 调用来批量替换)。*
198
198
 
199
- 指令:不要对 \`*.tsk/\` 下的任何路径调用通用文件工具(\`read_file\`, \`overwrite_entire_file\`, \`preview_file_modification\`, \`apply_file_modification\`, \`list_dir\`, \`rm_file\`, \`rm_dir\`)。差遣牒状态只能通过显式的差遣牒操作进行管理。`,
199
+ 指令:不要对 \`*.tsk/\` 下的任何路径调用通用文件工具(\`!?@read_file\`, \`!?@replace_file_contents\`, \`!?@plan_file_modification\`, \`!?@apply_file_modification\`, \`!?@list_dir\`, \`!?@rm_file\`, \`!?@rm_dir\`)。差遣牒状态只能通过显式的差遣牒操作进行管理。`,
200
200
  };
201
201
  }
202
202
  return {
@@ -212,9 +212,9 @@ ${statusBlock}
212
212
  ${effectiveDoc}
213
213
  ---
214
214
 
215
- *Use the function tool \`change_mind\` to replace sections (each call replaces one section; you may call it multiple times in a single turn to batch replacements).*
215
+ *Use \`!?@change_mind !goals\` / \`!?@change_mind !constraints\` / \`!?@change_mind !progress\` to replace sections (each call replaces one section; you may include multiple \`!?@change_mind\` calls in a single message to batch replacements).*
216
216
 
217
- Directive: Do not invoke any general file tools (\`read_file\`, \`overwrite_entire_file\`, \`preview_file_modification\`, \`apply_file_modification\`, \`list_dir\`, \`rm_file\`, \`rm_dir\`) on any path under \`*.tsk/\`. Task package state is managed only through explicit task-doc actions.`,
217
+ Directive: Do not invoke any general file tools (\`!?@read_file\`, \`!?@replace_file_contents\`, \`!?@plan_file_modification\`, \`!?@apply_file_modification\`, \`!?@list_dir\`, \`!?@rm_file\`, \`!?@rm_dir\`) on any path under \`*.tsk/\`. Task package state is managed only through explicit task-doc actions.`,
218
218
  };
219
219
  }
220
220
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dominds",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "DevOps Mindsets — Sustainable Agentic Product Lifecycle",
5
5
  "type": "commonjs",
6
6
  "private": false,
@@ -1,162 +0,0 @@
1
- # Keep-Going(鞭策)— 设计文档
2
-
3
- ## 概述
4
-
5
- Dominds 根对话旨在长期运行。根对话"停止"(变为空闲)通常不是操作员想要的:他们希望智能体持续推进,直到:
6
-
7
- - 合法地暂停等待人类决策(Q4H),或
8
- - 合法地暂停等待子对话(tellask/backfill)。
9
-
10
- 本文档指定了一个运行时机制("keep-going"),仅针对**根/主对话**,防止对话停止:每当驱动程序即将停止时,它会自动发送一个简短的鞭策语(渲染为正常的用户气泡)并继续生成,除非对话处于合法暂停状态(Q4H 或待处理的子对话)。
11
-
12
- ## 目标
13
-
14
- - 防止根对话停止,除非处于合法暂停状态(Q4H / 子对话)。
15
- - 保持行为可预测和有界(无无限循环)。
16
- - 使鞭策语文本可按工作区(rtws)和语言配置。
17
- - 提供清晰的用户控制的"禁用"机制。
18
-
19
- ## 非目标
20
-
21
- - 自动完成/自动将对话标记为完成。
22
- - 将此行为应用于子对话(子对话保持范围,应向其调用者报告)。
23
-
24
- ## 定义
25
-
26
- - **根/主对话**:`RootDialog`(`dlg.id.rootId === dlg.id.selfId`),主要对话线程。
27
- - **子对话**:`SubDialog`,为 tellask / 作用域工作创建。
28
- - **Q4H**:"Questions for Human",通过 `!?@human` 发起,暂停对话进度直到人类响应。
29
-
30
- ## 预期的"正常"完成路径(推荐)
31
-
32
- 当智能体需要人类决策来结束时(例如,确认选择或决定是否将对话标记为完成),正确的路径是:
33
-
34
- 1. 智能体发出 Q4H(`!?@human`)并提供必要的上下文和明确的决策请求。
35
- 2. WebUI 清楚地呈现 Q4H。
36
- 3. 人类决定并:
37
- - 手动将根对话标记为"完成",或
38
- - 提供请求的信息以便对话继续。
39
-
40
- 这是"受控收敛"路径。keep-going 机制不应覆盖合法的暂停状态。
41
-
42
- ## Keep-Going 行为("自动继续"回退)
43
-
44
- ### 触发条件(必须全部满足)
45
-
46
- - 对话是**根/主对话**(绝不会是子对话)。
47
- - 对话**未暂停**:
48
- - 没有待处理的 Q4H,并且
49
- - 没有待处理的子对话(等待回填)。
50
- - 驱动程序即将停止生成循环(即没有工具/函数输出需要另一次迭代)。
51
-
52
- ### 操作
53
-
54
- 运行时自动发送一个鞭策语(渲染为正常的用户气泡)并运行另一次生成迭代。
55
-
56
- ### 有界性
57
-
58
- 为避免无限循环,keep-going 有一个按对话的预算(每个成员的 `diligence-push-max`),控制对于给定对话在运行时强制 Q4H 暂停之前可以注入多少个自动继续的鞭策语。
59
-
60
- - 默认值:**3**
61
- - 如果 `< 1`,则该成员的 keep-going 有效禁用
62
- - 可通过 `.minds/team.yaml` 中的 `diligence-push-max` 按成员配置
63
-
64
- ### Q4H 时重置
65
-
66
- 当对话因待处理的 Q4H(Questions for Human)而暂停时,keep-going 注入计数器会被重置。这确保在人类回答 Q4H 并恢复对话后,对话会获得新的 keep-going 预算。
67
-
68
- ### 预算耗尽 → 强制 Q4H
69
-
70
- 当 keep-going 预算耗尽时,运行时会创建一个 Q4H 条目,询问人类是否继续或停止。这将"有界性"转换为合法的暂停点,并避免无限自动继续循环。
71
-
72
- ### 禁用开关
73
-
74
- 可以通过以下任一方式按 rtws 禁用 keep-going:
75
-
76
- - 如果选中的鞭策语文件存在但其内容为空/仅空白,则禁用 keep-going(不注入)。
77
-
78
- 可以通过以下任一方式按成员禁用 keep-going:
79
-
80
- - 如果 `diligence-push-max < 1`,则该成员的 keep-going 被禁用(不注入)。
81
-
82
- ## 鞭策语解析
83
-
84
- 让 `<rtws>` 为当前运行时工作区(即 `process.cwd()`)。
85
-
86
- 解析顺序:
87
-
88
- 1. `<rtws>/.minds/diligence.<work-lang-id>.md`(例如,`diligence.zh.md`)
89
- 2. `<rtws>/.minds/diligence.md`(语言无关的回退)
90
- 3. 内置回退文本(硬编码的 i18n;`zh` 是规范的并嵌入在源代码中)
91
-
92
- 如果上述顺序中第一个存在的文件具有空/空白内容,则**禁用** keep-going。
93
-
94
- 注意:鞭策语文件中的 YAML frontmatter 会被运行时忽略。如果存在,它被视为非内容元数据并从提示正文中剥离。
95
-
96
- ### 团队成员上限:`diligence-push-max`
97
-
98
- 每个团队成员可以选择通过 `.minds/team.yaml` 限制 keep-going:
99
-
100
- ```yaml
101
- members:
102
- alice:
103
- diligence-push-max: 10
104
- ```
105
-
106
- 规则:
107
-
108
- - 如果缺失,`diligence-push-max` 对于该成员默认为 **3**。
109
- - 如果 `diligence-push-max < 1`,则该成员的 keep-going 被禁用(不注入),即使鞭策语文件存在。
110
- - 内置影子成员 `fuxi` 和 `pangu` 默认为 `diligence-push-max: 0`,除非在 team.yaml 中显式覆盖。
111
-
112
- ## UX 备注
113
-
114
- - Keep-going 是一个仅运行时的提示,但它应该是**可见的**:鞭策语渲染为正常的用户消息气泡(由运行时自动发送),以便操作员理解为什么会出现额外的迭代。
115
- - 用户应该观察到智能体在仅工具操作后继续简短的跟进。
116
- - 当智能体真正需要用户干预时,它应该使用 Q4H。Keep-going 不应试图"假装"完成。
117
-
118
- ## 实现(后端)
119
-
120
- ### 位置
121
-
122
- 在 LLM 驱动程序循环中实现(`dominds/main/llm/driver.ts`),作为迭代后的小检查:
123
-
124
- 1. 如果 `suspendForHuman` 为 true,则停止(Q4H / 子对话待处理)。
125
- 2. 如果有任何工具反馈,则正常继续。
126
- 3. 否则(仅限根),尝试 keep-going 自动继续:
127
- - 如果禁用 → 正常停止。
128
- - 如果预算耗尽 → 创建 Q4H 并停止。
129
- - 否则 → 自动发送鞭策语并继续。
130
-
131
- ### 消息类型
132
-
133
- 我们将鞭策语作为自动发送的用户消息注入:
134
-
135
- - 类型为 `prompting_msg`、角色为 `'user'` 的 `ChatMessage`
136
-
137
- 这确保了:
138
-
139
- - 它存在于模型上下文中
140
- - 它作为人类消息记录持久化
141
- - 它在聊天时间线中渲染为正常的用户气泡(像任何其他用户消息一样)
142
-
143
- ## 可观察性
144
-
145
- 建议的后续步骤(初始实现不需要):
146
-
147
- - 当触发 keep-going 时添加结构化日志行,包括:
148
- - 对话 id
149
- - 语言
150
- - 使用的鞭策语来源(语言特定/通用/内置/禁用)
151
- - 为"keep-going 触发"和"keep-going 因空文件禁用"添加可选的指标计数器。
152
-
153
- ## 测试
154
-
155
- 回归测试应覆盖:
156
-
157
- - 根对话:仅工具输出 → 鞭策语注入 → 继续响应
158
- - 根对话:空助手输出 → 鞭策语注入 → 继续响应
159
- - 子对话:无鞭策语注入
160
- - 工作区配置:
161
- - 当语言特定文件缺失时,`.minds/diligence.md` 被遵守
162
- - 空的鞭策语文件禁用 keep-going
@@ -1,208 +0,0 @@
1
- # Showing-by-Doing (做给祂看): Make Tellask Real
2
-
3
- Chinese version: [中文版](./showing-by-doing.zh.md)
4
-
5
- ## Summary
6
-
7
- Dominds has a real, runtime-enforced Tellask mechanism (`!?@...`) and a real, runtime-enforced Fresh Boots Reasoning
8
- (FBR) mechanism (`!?@self`). Even if system prompts explain these mechanisms in detail, most foundation models were not
9
- trained in a world where “asking a teammate to run a shell command” is actually possible, so they often treat such text
10
- as aspirational or hypothetical.
11
-
12
- **Showing-by-Doing (做给祂看)** is a tiny, highly realistic “first impression” procedure executed at dialog creation
13
- time. It runs a short, real Tellask + real FBR round-trip so the model gains _felt-sense_ that:
14
-
15
- - teammate Tellasks are real and will be executed
16
- - tool outputs are real and will be returned
17
- - FBR is real and will produce a report back to the caller
18
-
19
- This makes subsequent use of Tellasks and `!?@self` FBR more reliable across the entire dialog lifecycle.
20
-
21
- As a consequence, we can **dramatically simplify system prompts**: keep only short, accurate statements of the Tellask/FBR
22
- contracts, and rely on Showing-by-Doing to establish “this is real and works here”.
23
-
24
- Related docs:
25
-
26
- - Tellask runtime: `dominds/docs/dialog-system.md`
27
- - Terminology (Mainline/Sideline): `dominds/docs/dominds-terminology.md`
28
- - FBR (`!?@self`): `dominds/docs/fbr.md`
29
- - Work language vs UI language: `dominds/docs/i18n.md`
30
-
31
- ---
32
-
33
- ## Goals
34
-
35
- - Establish immediate trust that **Tellask is not “just prompt text”**: it is an executable, backend-driven mechanism.
36
- - Establish immediate trust that **FBR is not “just reasoning”**: it is a concrete sideline dialog that reports back.
37
- - Keep the procedure safe, small, and deterministic (default command: `uname -a`).
38
- - Persist and display the interaction so it is credible from multiple angles (backend record + frontend transcript).
39
-
40
- ## Non-goals
41
-
42
- - Running arbitrary user-provided commands as part of dialog creation.
43
- - Collecting sensitive system information (beyond minimal OS/kernel identification).
44
- - Replacing proper documentation: this is an experiential supplement, not the main spec.
45
-
46
- ---
47
-
48
- ## Definitions (user-facing)
49
-
50
- - **Mainline dialog**: the primary thread where the user and the main agent interact.
51
- - **Sideline dialog**: a temporary work thread created by Tellask / FBR, reporting results back to the mainline.
52
- - **Tellask**: a structured request (`!?@<memberId> ...`) from a tellasker to a tellaskee.
53
- - **Shell specialist**: a teammate designated to run shell commands safely (configured via `shell_specialists`).
54
- - **FBR**: Fresh Boots Reasoning, implemented as `!?@self` (a tool-less sideline dialog). See `dominds/docs/fbr.md`.
55
-
56
- ---
57
-
58
- ## Runtime flow (at dialog creation)
59
-
60
- Showing-by-Doing runs **before** the first user message is processed (a “prelude”), unless the user opts out.
61
-
62
- ### 1) Choose the shell execution path
63
-
64
- 1. If the team config includes at least one `shell_specialists` member, pick one deterministically (e.g. the first).
65
- 2. Otherwise, let the **Dominds runtime** execute the baseline command directly (not via agent tools).
66
-
67
- Note: team config validation normally requires `shell_specialists` to be non-empty if any teammate has shell tools, and
68
- also requires that only listed shell specialists have shell tools. In other words, “no `shell_specialists` configured”
69
- usually means “shell tools are disabled for all user-facing teammates”.
70
-
71
- Baseline command:
72
-
73
- - `uname -a`
74
-
75
- If `uname -a` fails (e.g. non-POSIX host), the runtime should fall back to a platform-appropriate equivalent, but the
76
- default “muscle memory” path is intentionally `uname -a` because it is common, low-risk, and quick.
77
-
78
- ### 2) Real teammate Tellask: ask for `uname -a`
79
-
80
- If a shell specialist exists, the main agent (tellasker) issues **a real Tellask** to the shell specialist (tellaskee),
81
- in the server-wide **work language** (see `dominds/docs/i18n.md`).
82
-
83
- The Tellask body should be short and operational:
84
-
85
- - ask the shell specialist to run `uname -a`
86
- - ask them to return the raw output verbatim
87
- - ask them to include an error + alternative command if `uname` is not available
88
-
89
- The result must be recorded as a normal, debuggable transcript that clearly shows:
90
-
91
- - the Tellask headline + body
92
- - the shell specialist’s command execution
93
- - the returned output
94
-
95
- Minimal configuration example:
96
-
97
- ```yaml
98
- # .minds/team.yaml
99
- shell_specialists:
100
- - cmdr
101
- ```
102
-
103
- ### 3) Real FBR: reflect on what the environment implies
104
-
105
- After obtaining the environment snapshot (from the shell specialist or direct tool run), the main agent issues a real
106
- `!?@self` Tellask to trigger **FBR**.
107
-
108
- The FBR Tellask body should include:
109
-
110
- - the exact `uname -a` output
111
- - the main agent’s tool availability assumptions (e.g. “in mainline I may have `fs`/`os`/`mem`; in FBR you have no tools”)
112
- - the question: “What should I be careful about in this environment? Which CLI tools should I prioritize, and why?”
113
-
114
- The FBR response should return a compact report that the main agent can reuse, typically:
115
-
116
- - environment notes (OS family, kernel, container/VM hints if any)
117
- - do/don’t list (pitfalls)
118
- - a short “preferred commands” shortlist (e.g. `rg`, `sed`, `jq`, `tar`, `ps`, `lsof`, depending on host)
119
-
120
- ### 4) Summarize into an “Environment Quickstart” note
121
-
122
- The main agent then writes a short, user-visible summary to the mainline dialog so the knowledge is explicit and
123
- searchable in the transcript.
124
-
125
- ---
126
-
127
- ## Fallback behavior
128
-
129
- Showing-by-Doing should degrade gracefully:
130
-
131
- - **No `shell_specialists` configured**: the Dominds runtime runs `uname -a` directly, then do FBR.
132
- - **Shell specialist fails or times out**: the Dominds runtime runs `uname -a` directly and continue, marking the
133
- specialist attempt as failed in the transcript.
134
- - **`uname` not available / command fails**: run FBR with “environment unknown”; the report should explicitly list what
135
- is missing and suggest what to gather later.
136
-
137
- ---
138
-
139
- ## Persistence, caching, and reuse
140
-
141
- ### 1) Persist as real dialog records (backend + frontend)
142
-
143
- All Showing-by-Doing steps must be persisted as standard dialog artifacts (messages + events) so they remain credible:
144
-
145
- - they survive restarts (subject to normal dialog persistence rules)
146
- - they are debuggable in logs/storage
147
- - they are rendered in the WebUI transcript (ideally as a collapsible “Prelude” section)
148
-
149
- ### 2) Process-wide cache (per teammate)
150
-
151
- To avoid repeating `uname -a` + FBR on every new dialog, the backend process may maintain a **server-scoped cache** keyed
152
- by (at minimum):
153
-
154
- - tellasker teammate id (the agent whose dialogs are being created)
155
- - an environment fingerprint derived from the `uname -a` output (exact string or hashed)
156
-
157
- Cache payload (recommended):
158
-
159
- - the full Showing-by-Doing transcript (Tellask + output + FBR + summary)
160
- - a short “Environment Quickstart” distilled form (for compact context injection)
161
- - timestamps + a version tag for future schema changes
162
-
163
- Reuse policy:
164
-
165
- - If a valid cache entry exists, a new dialog may **reuse** the cached transcript instead of re-running.
166
- - Reused entries should still be visible in the new dialog’s transcript, clearly labeled as “Reused from cache”.
167
-
168
- Invalidation (recommended):
169
-
170
- - invalidate when the environment fingerprint changes
171
- - allow a manual “Refresh environment snapshot” action for debugging
172
-
173
- ### 3) Carry across `clear_mind`
174
-
175
- After each `clear_mind` (entering the next “journey stage”), do **not** rely on reminders for this.
176
-
177
- Instead, inject a small, stable **course prefix** into the model context at the start of each new course (i.e. the first
178
- few messages in the historical dialog section). This prefix should be a condensed transcript distilled from the original
179
- Showing-by-Doing run (shell snapshot + FBR highlights + quickstart), so the agent keeps its “felt-sense” of Tellask/FBR
180
- and environment constraints without re-running the prelude.
181
-
182
- ---
183
-
184
- ## UX requirements (WebUI)
185
-
186
- ### Display
187
-
188
- - Render Showing-by-Doing as a realistic transcript the user can inspect.
189
- - Prefer a collapsible “Prelude” section at the top of the dialog, with clear labels:
190
- - “Teammate Tellask (shell)”
191
- - “FBR (`!?@self`)”
192
- - “Environment Quickstart”
193
-
194
- ### Opt-out
195
-
196
- The dialog creation UI should include an explicit opt-out, e.g.:
197
-
198
- - Checkbox: “Skip Showing-by-Doing (do not run environment prelude)”
199
-
200
- If opted out, no prelude actions are executed and no prelude transcript is generated.
201
-
202
- ---
203
-
204
- ## Safety notes
205
-
206
- - Default to a single, low-risk command (`uname -a`).
207
- - Do not run anything that modifies the filesystem or network as part of this prelude.
208
- - Treat the prelude transcript as user-visible by default; avoid including secrets or personally identifying details.