dominds 1.18.2 → 1.19.2

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 (277) hide show
  1. package/dist/access-control.js +6 -6
  2. package/dist/apps/runtime.d.ts +2 -2
  3. package/dist/apps/runtime.js +28 -28
  4. package/dist/apps-host/client.d.ts +1 -1
  5. package/dist/apps-host/host.js +7 -7
  6. package/dist/apps-host/ipc-types.d.ts +2 -2
  7. package/dist/apps-host/ipc-types.js +10 -10
  8. package/dist/cli/read.d.ts +0 -1
  9. package/dist/cli/read.js +1 -6
  10. package/dist/dialog-display-state.d.ts +6 -6
  11. package/dist/dialog-display-state.js +46 -46
  12. package/dist/dialog-factory.d.ts +12 -12
  13. package/dist/dialog-factory.js +33 -30
  14. package/dist/dialog-fork.d.ts +2 -2
  15. package/dist/dialog-fork.js +140 -115
  16. package/dist/dialog-global-registry.d.ts +5 -5
  17. package/dist/dialog-global-registry.js +11 -11
  18. package/dist/dialog-instance-registry.d.ts +3 -3
  19. package/dist/dialog-instance-registry.js +52 -41
  20. package/dist/dialog.d.ts +100 -113
  21. package/dist/dialog.js +274 -229
  22. package/dist/docs/agent-priming.md +5 -5
  23. package/dist/docs/agent-priming.zh.md +5 -5
  24. package/dist/docs/app-constitution.md +1 -1
  25. package/dist/docs/app-constitution.zh.md +1 -1
  26. package/dist/docs/cli-usage.md +1 -1
  27. package/dist/docs/cli-usage.zh.md +1 -1
  28. package/dist/docs/design.md +14 -14
  29. package/dist/docs/design.zh.md +14 -14
  30. package/dist/docs/dialog-persistence.md +58 -58
  31. package/dist/docs/dialog-persistence.zh.md +61 -61
  32. package/dist/docs/dialog-system.md +363 -367
  33. package/dist/docs/dialog-system.zh.md +355 -357
  34. package/dist/docs/diligence-push.md +18 -18
  35. package/dist/docs/diligence-push.zh.md +17 -17
  36. package/dist/docs/dominds-agent-collaboration.zh.md +3 -3
  37. package/dist/docs/dominds-terminology.md +46 -47
  38. package/dist/docs/encapsulated-taskdoc.md +4 -4
  39. package/dist/docs/encapsulated-taskdoc.zh.md +3 -3
  40. package/dist/docs/fbr.md +30 -30
  41. package/dist/docs/fbr.zh.md +15 -15
  42. package/dist/docs/i18n.md +2 -2
  43. package/dist/docs/i18n.zh.md +2 -2
  44. package/dist/docs/mcp-support.md +5 -4
  45. package/dist/docs/mcp-support.zh.md +3 -2
  46. package/dist/docs/memory-system.md +4 -4
  47. package/dist/docs/memory-system.zh.md +1 -1
  48. package/dist/docs/mottos.md +1 -1
  49. package/dist/docs/mottos.zh.md +1 -1
  50. package/dist/docs/q4h.md +3 -3
  51. package/dist/docs/q4h.zh.md +1 -1
  52. package/dist/docs/roadmap.md +2 -2
  53. package/dist/docs/team_mgmt-toolset.md +11 -3
  54. package/dist/docs/team_mgmt-toolset.zh.md +9 -2
  55. package/dist/docs/tellask-collab.md +18 -18
  56. package/dist/docs/tellask-collab.zh.md +8 -8
  57. package/dist/docs/tellask-revive-context-refactor.zh.md +591 -0
  58. package/dist/evt-registry.d.ts +1 -2
  59. package/dist/evt-registry.js +2 -7
  60. package/dist/llm/gen/mock.js +9 -0
  61. package/dist/llm/kernel-driver/context.d.ts +1 -2
  62. package/dist/llm/kernel-driver/context.js +12 -26
  63. package/dist/llm/kernel-driver/drive.js +99 -75
  64. package/dist/llm/kernel-driver/engine.d.ts +2 -2
  65. package/dist/llm/kernel-driver/engine.js +10 -10
  66. package/dist/llm/kernel-driver/fbr.js +6 -6
  67. package/dist/llm/kernel-driver/flow.d.ts +1 -1
  68. package/dist/llm/kernel-driver/flow.js +129 -93
  69. package/dist/llm/kernel-driver/guardrails.js +4 -4
  70. package/dist/llm/kernel-driver/index.d.ts +1 -1
  71. package/dist/llm/kernel-driver/index.js +2 -2
  72. package/dist/llm/kernel-driver/loop.js +30 -30
  73. package/dist/llm/kernel-driver/reply-guidance.js +47 -52
  74. package/dist/llm/kernel-driver/restore.d.ts +3 -3
  75. package/dist/llm/kernel-driver/restore.js +23 -28
  76. package/dist/llm/kernel-driver/runtime.d.ts +1 -1
  77. package/dist/llm/kernel-driver/runtime.js +1 -1
  78. package/dist/llm/kernel-driver/sideDialog-txn.d.ts +8 -0
  79. package/dist/llm/kernel-driver/{subdialog-txn.js → sideDialog-txn.js} +13 -13
  80. package/dist/llm/kernel-driver/{subdialog.d.ts → sideDialog.d.ts} +13 -13
  81. package/dist/llm/kernel-driver/{subdialog.js → sideDialog.js} +203 -170
  82. package/dist/llm/kernel-driver/tellask-special.d.ts +7 -3
  83. package/dist/llm/kernel-driver/tellask-special.js +474 -497
  84. package/dist/llm/kernel-driver/types.d.ts +25 -9
  85. package/dist/mcp/config.d.ts +1 -0
  86. package/dist/mcp/config.js +7 -2
  87. package/dist/mcp/supervisor.d.ts +2 -0
  88. package/dist/mcp/supervisor.js +2 -1
  89. package/dist/minds/builtin/pangu/persona.en.md +4 -4
  90. package/dist/minds/load.js +6 -6
  91. package/dist/minds/system-prompt-parts.d.ts +1 -1
  92. package/dist/minds/system-prompt-parts.js +12 -12
  93. package/dist/minds/system-prompt.d.ts +1 -1
  94. package/dist/minds/system-prompt.js +56 -56
  95. package/dist/persistence-errors.d.ts +1 -1
  96. package/dist/persistence.d.ts +126 -121
  97. package/dist/persistence.js +1190 -786
  98. package/dist/priming.d.ts +3 -3
  99. package/dist/priming.js +62 -61
  100. package/dist/recovery/reply-special.js +5 -5
  101. package/dist/runtime/driver-messages.d.ts +3 -2
  102. package/dist/runtime/driver-messages.js +68 -57
  103. package/dist/runtime/inter-dialog-format.d.ts +12 -10
  104. package/dist/runtime/inter-dialog-format.js +80 -35
  105. package/dist/runtime/interjection-pause-stop.js +1 -1
  106. package/dist/runtime/reply-prompt-copy.d.ts +7 -3
  107. package/dist/runtime/reply-prompt-copy.js +39 -14
  108. package/dist/server/api-routes.js +87 -83
  109. package/dist/server/static-server.js +1 -1
  110. package/dist/server/websocket-handler.js +163 -153
  111. package/dist/tool-availability.js +1 -1
  112. package/dist/tools/app-reminders.js +17 -4
  113. package/dist/tools/ctrl.js +5 -5
  114. package/dist/tools/os.js +16 -16
  115. package/dist/tools/pending-tellask-reminder.js +20 -14
  116. package/dist/tools/prompts/control/en/index.md +1 -1
  117. package/dist/tools/prompts/control/en/principles.md +8 -8
  118. package/dist/tools/prompts/control/en/scenarios.md +7 -7
  119. package/dist/tools/prompts/control/en/tools.md +7 -7
  120. package/dist/tools/prompts/control/zh/principles.md +4 -4
  121. package/dist/tools/prompts/control/zh/scenarios.md +5 -5
  122. package/dist/tools/prompts/control/zh/tools.md +3 -3
  123. package/dist/tools/prompts/team_memory/en/scenarios.md +1 -1
  124. package/dist/tools/prompts/team_memory/zh/scenarios.md +1 -1
  125. package/dist/tools/team_mgmt-manual.js +2 -2
  126. package/dist/tools/team_mgmt-mcp-manual.js +10 -0
  127. package/dist/tools/team_mgmt.js +4 -4
  128. package/dist/utils/taskdoc.js +12 -12
  129. package/package.json +3 -3
  130. package/webapp/dist/assets/{_basePickBy-BPJaiZdW.js → _basePickBy-B7M9Q0Fa.js} +3 -3
  131. package/webapp/dist/assets/_basePickBy-B7M9Q0Fa.js.map +1 -0
  132. package/webapp/dist/assets/{_baseUniq-BEetT15i.js → _baseUniq-DAeYoL6j.js} +2 -2
  133. package/webapp/dist/assets/_baseUniq-DAeYoL6j.js.map +1 -0
  134. package/webapp/dist/assets/{arc-Dm7Zf36f.js → arc-Bh4nDbNR.js} +2 -2
  135. package/webapp/dist/assets/arc-Bh4nDbNR.js.map +1 -0
  136. package/webapp/dist/assets/{architectureDiagram-VXUJARFQ-BpTPtkuo.js → architectureDiagram-2XIMDMQ5-CxqmdsIm.js} +26 -8
  137. package/webapp/dist/assets/architectureDiagram-2XIMDMQ5-CxqmdsIm.js.map +1 -0
  138. package/webapp/dist/assets/{blockDiagram-VD42YOAC-C8fLN0iu.js → blockDiagram-WCTKOSBZ-CxIWLtpt.js} +187 -170
  139. package/webapp/dist/assets/blockDiagram-WCTKOSBZ-CxIWLtpt.js.map +1 -0
  140. package/webapp/dist/assets/{c4Diagram-YG6GDRKO-BpPr62CH.js → c4Diagram-IC4MRINW-1qErOIgG.js} +4 -4
  141. package/webapp/dist/assets/c4Diagram-IC4MRINW-1qErOIgG.js.map +1 -0
  142. package/webapp/dist/assets/{channel-EMYoPjW3.js → channel-DkgZHNUe.js} +2 -2
  143. package/webapp/dist/assets/channel-DkgZHNUe.js.map +1 -0
  144. package/webapp/dist/assets/{chunk-4BX2VUAB-CefNtjWG.js → chunk-4BX2VUAB-BmdMbU9v.js} +2 -2
  145. package/webapp/dist/assets/chunk-4BX2VUAB-BmdMbU9v.js.map +1 -0
  146. package/webapp/dist/assets/{chunk-55IACEB6-C_X7T43V.js → chunk-55IACEB6-D6LDTDBy.js} +2 -2
  147. package/webapp/dist/assets/chunk-55IACEB6-D6LDTDBy.js.map +1 -0
  148. package/webapp/dist/assets/{chunk-FMBD7UC4-ORmtkrtS.js → chunk-FMBD7UC4-C-BdCe4C.js} +2 -2
  149. package/webapp/dist/assets/chunk-FMBD7UC4-C-BdCe4C.js.map +1 -0
  150. package/webapp/dist/assets/{chunk-TZMSLE5B-Gao4qrq7.js → chunk-JSJVCQXG-WA_BLIm9.js} +14 -6
  151. package/webapp/dist/assets/chunk-JSJVCQXG-WA_BLIm9.js.map +1 -0
  152. package/webapp/dist/assets/{chunk-QN33PNHL-LTAOVhWu.js → chunk-KX2RTZJC-CA7sDJO5.js} +2 -2
  153. package/webapp/dist/assets/chunk-KX2RTZJC-CA7sDJO5.js.map +1 -0
  154. package/webapp/dist/assets/{chunk-DI55MBZ5-CbvrsI_w.js → chunk-NQ4KR5QH-wlvxalE3.js} +9 -7
  155. package/webapp/dist/assets/chunk-NQ4KR5QH-wlvxalE3.js.map +1 -0
  156. package/webapp/dist/assets/{chunk-QZHKN3VN-ZoUM_4u5.js → chunk-QZHKN3VN-Bo1VMcph.js} +2 -2
  157. package/webapp/dist/assets/chunk-QZHKN3VN-Bo1VMcph.js.map +1 -0
  158. package/webapp/dist/assets/{chunk-B4BG7PRW-BRe3_2oA.js → chunk-WL4C6EOR-B-Pk44be.js} +171 -121
  159. package/webapp/dist/assets/chunk-WL4C6EOR-B-Pk44be.js.map +1 -0
  160. package/webapp/dist/assets/{classDiagram-2ON5EDUG-uha1vIGN.js → classDiagram-VBA2DB6C-BqKuyb49.js} +7 -6
  161. package/webapp/dist/assets/classDiagram-VBA2DB6C-BqKuyb49.js.map +1 -0
  162. package/webapp/dist/assets/{classDiagram-v2-WZHVMYZB-uha1vIGN.js → classDiagram-v2-RAHNMMFH-BqKuyb49.js} +7 -6
  163. package/webapp/dist/assets/classDiagram-v2-RAHNMMFH-BqKuyb49.js.map +1 -0
  164. package/webapp/dist/assets/{clone-_9Ayb1Gp.js → clone-BX5z8WVZ.js} +2 -2
  165. package/webapp/dist/assets/clone-BX5z8WVZ.js.map +1 -0
  166. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-C8wDw3NY.js → cose-bilkent-S5V4N54A-B-s11SgN.js} +2 -2
  167. package/webapp/dist/assets/cose-bilkent-S5V4N54A-B-s11SgN.js.map +1 -0
  168. package/webapp/dist/assets/cytoscape.esm-Bm8DJGmZ.js.map +1 -1
  169. package/webapp/dist/assets/{dagre-6UL2VRFP-BUSeNot0.js → dagre-KLK3FWXG-DmQFV2qK.js} +7 -7
  170. package/webapp/dist/assets/dagre-KLK3FWXG-DmQFV2qK.js.map +1 -0
  171. package/webapp/dist/assets/defaultLocale-B2RvLBDe.js.map +1 -1
  172. package/webapp/dist/assets/{diagram-PSM6KHXK-CMZAksVC.js → diagram-E7M64L7V-QRaBfST8.js} +10 -10
  173. package/webapp/dist/assets/diagram-E7M64L7V-QRaBfST8.js.map +1 -0
  174. package/webapp/dist/assets/{diagram-QEK2KX5R-BQKoRtwy.js → diagram-IFDJBPK2-lrWn1Obo.js} +9 -8
  175. package/webapp/dist/assets/diagram-IFDJBPK2-lrWn1Obo.js.map +1 -0
  176. package/webapp/dist/assets/{diagram-S2PKOQOG-DjMG97kd.js → diagram-P4PSJMXO-sTU7Hh-Y.js} +8 -8
  177. package/webapp/dist/assets/diagram-P4PSJMXO-sTU7Hh-Y.js.map +1 -0
  178. package/webapp/dist/assets/{erDiagram-Q2GNP2WA-BujwA137.js → erDiagram-INFDFZHY-Cx6jc9Wq.js} +96 -75
  179. package/webapp/dist/assets/erDiagram-INFDFZHY-Cx6jc9Wq.js.map +1 -0
  180. package/webapp/dist/assets/{flowDiagram-NV44I4VS-DgwPjg4y.js → flowDiagram-PKNHOUZH-DfGI49Dz.js} +98 -81
  181. package/webapp/dist/assets/flowDiagram-PKNHOUZH-DfGI49Dz.js.map +1 -0
  182. package/webapp/dist/assets/{ganttDiagram-JELNMOA3-Db2ykf3E.js → ganttDiagram-A5KZAMGK-nrcHWWaM.js} +28 -3
  183. package/webapp/dist/assets/ganttDiagram-A5KZAMGK-nrcHWWaM.js.map +1 -0
  184. package/webapp/dist/assets/{gitGraphDiagram-V2S2FVAM-D_gSifkv.js → gitGraphDiagram-K3NZZRJ6-D8ivAqd6.js} +38 -46
  185. package/webapp/dist/assets/gitGraphDiagram-K3NZZRJ6-D8ivAqd6.js.map +1 -0
  186. package/webapp/dist/assets/graph-R5G-y8tB.js +782 -0
  187. package/webapp/dist/assets/graph-R5G-y8tB.js.map +1 -0
  188. package/webapp/dist/assets/{index-DLajsIDJ.js → index--fy89xGh.js} +2214 -2023
  189. package/webapp/dist/assets/index--fy89xGh.js.map +1 -0
  190. package/webapp/dist/assets/{index-xvYYeHuy.css → index-DZFkLLVz.css} +18 -10
  191. package/webapp/dist/assets/{infoDiagram-HS3SLOUP-BDba5pKs.js → infoDiagram-LFFYTUFH-PIoZHr7s.js} +7 -7
  192. package/webapp/dist/assets/infoDiagram-LFFYTUFH-PIoZHr7s.js.map +1 -0
  193. package/webapp/dist/assets/init-ZxktEp_H.js.map +1 -1
  194. package/webapp/dist/assets/ishikawaDiagram-PHBUUO56-oCM-LYk1.js +966 -0
  195. package/webapp/dist/assets/ishikawaDiagram-PHBUUO56-oCM-LYk1.js.map +1 -0
  196. package/webapp/dist/assets/{journeyDiagram-XKPGCS4Q-CmJAbmlm.js → journeyDiagram-4ABVD52K-C2qidjQ5.js} +5 -5
  197. package/webapp/dist/assets/journeyDiagram-4ABVD52K-C2qidjQ5.js.map +1 -0
  198. package/webapp/dist/assets/{kanban-definition-3W4ZIXB7-DxQeBTDk.js → kanban-definition-K7BYSVSG-Du0TC8WS.js} +5 -3
  199. package/webapp/dist/assets/kanban-definition-K7BYSVSG-Du0TC8WS.js.map +1 -0
  200. package/webapp/dist/assets/{layout-DteV_yE8.js → layout-VmEo1OEB.js} +5 -5
  201. package/webapp/dist/assets/layout-VmEo1OEB.js.map +1 -0
  202. package/webapp/dist/assets/{linear-zItbPrND.js → linear-B662YHAc.js} +2 -2
  203. package/webapp/dist/assets/linear-B662YHAc.js.map +1 -0
  204. package/webapp/dist/assets/{mindmap-definition-VGOIOE7T-BJXI7UqO.js → mindmap-definition-YRQLILUH-D7arZj95.js} +7 -5
  205. package/webapp/dist/assets/mindmap-definition-YRQLILUH-D7arZj95.js.map +1 -0
  206. package/webapp/dist/assets/ordinal-CxptdPJm.js.map +1 -1
  207. package/webapp/dist/assets/{pieDiagram-ADFJNKIX-BpM-aH2p.js → pieDiagram-SKSYHLDU-DvjPP4PA.js} +8 -8
  208. package/webapp/dist/assets/pieDiagram-SKSYHLDU-DvjPP4PA.js.map +1 -0
  209. package/webapp/dist/assets/{quadrantDiagram-AYHSOK5B-NXdIpA15.js → quadrantDiagram-337W2JSQ-B_JUGMj_.js} +3 -3
  210. package/webapp/dist/assets/quadrantDiagram-337W2JSQ-B_JUGMj_.js.map +1 -0
  211. package/webapp/dist/assets/{requirementDiagram-UZGBJVZJ-D1AICAA0.js → requirementDiagram-Z7DCOOCP-DF0mpvE3.js} +16 -6
  212. package/webapp/dist/assets/requirementDiagram-Z7DCOOCP-DF0mpvE3.js.map +1 -0
  213. package/webapp/dist/assets/{sankeyDiagram-TZEHDZUN-WiReDPfo.js → sankeyDiagram-WA2Y5GQK-CoXlxv00.js} +2 -2
  214. package/webapp/dist/assets/sankeyDiagram-WA2Y5GQK-CoXlxv00.js.map +1 -0
  215. package/webapp/dist/assets/{sequenceDiagram-WL72ISMW-Cw76oP8t.js → sequenceDiagram-2WXFIKYE-DYqT5Pg7.js} +601 -201
  216. package/webapp/dist/assets/sequenceDiagram-2WXFIKYE-DYqT5Pg7.js.map +1 -0
  217. package/webapp/dist/assets/{stateDiagram-FKZM4ZOC-QjCeRczs.js → stateDiagram-RAJIS63D-D9b1mN8-.js} +9 -9
  218. package/webapp/dist/assets/stateDiagram-RAJIS63D-D9b1mN8-.js.map +1 -0
  219. package/webapp/dist/assets/{stateDiagram-v2-4FDKWEC3-IClqxQ4s.js → stateDiagram-v2-FVOUBMTO-DNzgudL_.js} +5 -5
  220. package/webapp/dist/assets/stateDiagram-v2-FVOUBMTO-DNzgudL_.js.map +1 -0
  221. package/webapp/dist/assets/{timeline-definition-IT6M3QCI-BfyfTY7m.js → timeline-definition-YZTLITO2-CkyKUY7A.js} +3 -3
  222. package/webapp/dist/assets/timeline-definition-YZTLITO2-CkyKUY7A.js.map +1 -0
  223. package/webapp/dist/assets/{treemap-GDKQZRPO-C5MiL6--.js → treemap-KZPCXAKY-CZd09kF-.js} +37 -24
  224. package/webapp/dist/assets/treemap-KZPCXAKY-CZd09kF-.js.map +1 -0
  225. package/webapp/dist/assets/vennDiagram-LZ73GAT5-BxVF5Olo.js +2487 -0
  226. package/webapp/dist/assets/vennDiagram-LZ73GAT5-BxVF5Olo.js.map +1 -0
  227. package/webapp/dist/assets/{xychartDiagram-PRI3JC2R-ybaJrSry.js → xychartDiagram-JWTSCODW-BRwRloPc.js} +4 -4
  228. package/webapp/dist/assets/xychartDiagram-JWTSCODW-BRwRloPc.js.map +1 -0
  229. package/webapp/dist/index.html +2 -2
  230. package/dist/docs/issues/global-dialog-event-broadcaster-missing.md +0 -128
  231. package/dist/llm/kernel-driver/subdialog-txn.d.ts +0 -8
  232. package/webapp/dist/assets/_basePickBy-BPJaiZdW.js.map +0 -1
  233. package/webapp/dist/assets/_baseUniq-BEetT15i.js.map +0 -1
  234. package/webapp/dist/assets/arc-Dm7Zf36f.js.map +0 -1
  235. package/webapp/dist/assets/architectureDiagram-VXUJARFQ-BpTPtkuo.js.map +0 -1
  236. package/webapp/dist/assets/blockDiagram-VD42YOAC-C8fLN0iu.js.map +0 -1
  237. package/webapp/dist/assets/c4Diagram-YG6GDRKO-BpPr62CH.js.map +0 -1
  238. package/webapp/dist/assets/channel-EMYoPjW3.js.map +0 -1
  239. package/webapp/dist/assets/chunk-4BX2VUAB-CefNtjWG.js.map +0 -1
  240. package/webapp/dist/assets/chunk-55IACEB6-C_X7T43V.js.map +0 -1
  241. package/webapp/dist/assets/chunk-B4BG7PRW-BRe3_2oA.js.map +0 -1
  242. package/webapp/dist/assets/chunk-DI55MBZ5-CbvrsI_w.js.map +0 -1
  243. package/webapp/dist/assets/chunk-FMBD7UC4-ORmtkrtS.js.map +0 -1
  244. package/webapp/dist/assets/chunk-QN33PNHL-LTAOVhWu.js.map +0 -1
  245. package/webapp/dist/assets/chunk-QZHKN3VN-ZoUM_4u5.js.map +0 -1
  246. package/webapp/dist/assets/chunk-TZMSLE5B-Gao4qrq7.js.map +0 -1
  247. package/webapp/dist/assets/classDiagram-2ON5EDUG-uha1vIGN.js.map +0 -1
  248. package/webapp/dist/assets/classDiagram-v2-WZHVMYZB-uha1vIGN.js.map +0 -1
  249. package/webapp/dist/assets/clone-_9Ayb1Gp.js.map +0 -1
  250. package/webapp/dist/assets/cose-bilkent-S5V4N54A-C8wDw3NY.js.map +0 -1
  251. package/webapp/dist/assets/dagre-6UL2VRFP-BUSeNot0.js.map +0 -1
  252. package/webapp/dist/assets/diagram-PSM6KHXK-CMZAksVC.js.map +0 -1
  253. package/webapp/dist/assets/diagram-QEK2KX5R-BQKoRtwy.js.map +0 -1
  254. package/webapp/dist/assets/diagram-S2PKOQOG-DjMG97kd.js.map +0 -1
  255. package/webapp/dist/assets/erDiagram-Q2GNP2WA-BujwA137.js.map +0 -1
  256. package/webapp/dist/assets/flowDiagram-NV44I4VS-DgwPjg4y.js.map +0 -1
  257. package/webapp/dist/assets/ganttDiagram-JELNMOA3-Db2ykf3E.js.map +0 -1
  258. package/webapp/dist/assets/gitGraphDiagram-V2S2FVAM-D_gSifkv.js.map +0 -1
  259. package/webapp/dist/assets/graph-BHjCU5xP.js +0 -425
  260. package/webapp/dist/assets/graph-BHjCU5xP.js.map +0 -1
  261. package/webapp/dist/assets/index-DLajsIDJ.js.map +0 -1
  262. package/webapp/dist/assets/infoDiagram-HS3SLOUP-BDba5pKs.js.map +0 -1
  263. package/webapp/dist/assets/journeyDiagram-XKPGCS4Q-CmJAbmlm.js.map +0 -1
  264. package/webapp/dist/assets/kanban-definition-3W4ZIXB7-DxQeBTDk.js.map +0 -1
  265. package/webapp/dist/assets/layout-DteV_yE8.js.map +0 -1
  266. package/webapp/dist/assets/linear-zItbPrND.js.map +0 -1
  267. package/webapp/dist/assets/mindmap-definition-VGOIOE7T-BJXI7UqO.js.map +0 -1
  268. package/webapp/dist/assets/pieDiagram-ADFJNKIX-BpM-aH2p.js.map +0 -1
  269. package/webapp/dist/assets/quadrantDiagram-AYHSOK5B-NXdIpA15.js.map +0 -1
  270. package/webapp/dist/assets/requirementDiagram-UZGBJVZJ-D1AICAA0.js.map +0 -1
  271. package/webapp/dist/assets/sankeyDiagram-TZEHDZUN-WiReDPfo.js.map +0 -1
  272. package/webapp/dist/assets/sequenceDiagram-WL72ISMW-Cw76oP8t.js.map +0 -1
  273. package/webapp/dist/assets/stateDiagram-FKZM4ZOC-QjCeRczs.js.map +0 -1
  274. package/webapp/dist/assets/stateDiagram-v2-4FDKWEC3-IClqxQ4s.js.map +0 -1
  275. package/webapp/dist/assets/timeline-definition-IT6M3QCI-BfyfTY7m.js.map +0 -1
  276. package/webapp/dist/assets/treemap-GDKQZRPO-C5MiL6--.js.map +0 -1
  277. package/webapp/dist/assets/xychartDiagram-PRI3JC2R-ybaJrSry.js.map +0 -1
@@ -1,23 +1,39 @@
1
1
  import type { DialogDisplayState, DialogInterruptionReason } from '@longrun-ai/kernel/types/display-state';
2
- import type { DialogDiligencePrompt, DialogPrompt, DialogRunControlSpec, DialogRuntimeGuidePrompt, DialogRuntimePrompt, DialogRuntimeReplyPrompt, DialogRuntimeSubdialogPrompt, DialogUserPrompt } from '@longrun-ai/kernel/types/drive-intent';
2
+ import type { DialogDiligencePrompt, DialogPrompt, DialogRunControlSpec, DialogRuntimeGuidePrompt, DialogRuntimePrompt, DialogRuntimeReplyPrompt, DialogRuntimeSideDialogPrompt, DialogUserPrompt } from '@longrun-ai/kernel/types/drive-intent';
3
3
  import type { Dialog, DialogID } from '../../dialog';
4
4
  export type KernelDriverRunControl = DialogRunControlSpec;
5
- export type KernelDriverDriveSource = 'unspecified' | 'ws_user_message' | 'ws_user_answer' | 'ws_diligence_push' | 'ws_resume_dialog' | 'ws_resume_all' | 'kernel_driver_backend_loop' | 'kernel_driver_follow_up' | 'kernel_driver_subdialog_init' | 'kernel_driver_subdialog_resume' | 'kernel_driver_fbr_subdialog_round' | 'kernel_driver_type_a_supdialog_call' | 'kernel_driver_supply_response_parent_revive';
5
+ export type KernelDriverDriveSource = 'unspecified' | 'ws_user_message' | 'ws_user_answer' | 'ws_diligence_push' | 'ws_resume_dialog' | 'ws_resume_all' | 'kernel_driver_backend_loop' | 'kernel_driver_follow_up' | 'kernel_driver_sideDialog_init' | 'kernel_driver_sideDialog_resume' | 'kernel_driver_fbr_sideDialog_round' | 'kernel_driver_type_a_askerDialog_call' | 'kernel_driver_supply_response_parent_revive';
6
6
  export type KernelDriverDriveOptions = Readonly<{
7
7
  suppressDiligencePush?: boolean;
8
8
  allowResumeFromInterrupted?: boolean;
9
- noPromptSubdialogResumeEntitlement?: Readonly<{
9
+ noPromptSideDialogResumeEntitlement?: Readonly<{
10
10
  ownerDialogId: string;
11
- reason: 'resolved_pending_subdialog_reply' | 'reply_tellask_back_delivered';
12
- subdialogId?: string;
11
+ reason: 'reply_tellask_back_delivered';
12
+ sideDialogId?: string;
13
13
  callType?: 'A' | 'B' | 'C';
14
14
  callId?: string;
15
+ }> | Readonly<{
16
+ ownerDialogId: string;
17
+ reason: 'replaced_pending_sideDialog_reply';
18
+ sideDialogId?: string;
19
+ callType?: 'A' | 'B' | 'C';
20
+ callId?: string;
21
+ }> | Readonly<{
22
+ ownerDialogId: string;
23
+ reason: 'resolved_pending_sideDialog_reply';
24
+ sideDialogId?: string;
25
+ callType?: 'A' | 'B' | 'C';
26
+ callId?: string;
27
+ callSiteCourse: number;
28
+ callSiteGenseq: number;
29
+ resolvedCallIds?: readonly string[];
30
+ triggerCallId?: string;
15
31
  }>;
16
32
  runControl?: KernelDriverRunControl;
17
33
  source: KernelDriverDriveSource;
18
34
  reason: string;
19
35
  }>;
20
- export type KernelDriverSubdialogReplyTarget = {
36
+ export type KernelDriverSideDialogReplyTarget = {
21
37
  ownerDialogId: string;
22
38
  callType: 'A' | 'B' | 'C';
23
39
  callId: string;
@@ -29,7 +45,7 @@ export type KernelDriverUserPrompt = KernelDriverPromptWithRunControl<DialogUser
29
45
  export type KernelDriverDiligencePrompt = KernelDriverPromptWithRunControl<DialogDiligencePrompt>;
30
46
  export type KernelDriverRuntimeGuidePrompt = KernelDriverPromptWithRunControl<DialogRuntimeGuidePrompt>;
31
47
  export type KernelDriverRuntimeReplyPrompt = KernelDriverPromptWithRunControl<DialogRuntimeReplyPrompt>;
32
- export type KernelDriverRuntimeSubdialogPrompt = KernelDriverPromptWithRunControl<DialogRuntimeSubdialogPrompt>;
48
+ export type KernelDriverRuntimeSideDialogPrompt = KernelDriverPromptWithRunControl<DialogRuntimeSideDialogPrompt>;
33
49
  export type KernelDriverRuntimePrompt = KernelDriverPromptWithRunControl<DialogRuntimePrompt>;
34
50
  export type KernelDriverPrompt = KernelDriverPromptWithRunControl<DialogPrompt>;
35
51
  export type KernelDriverDriveCallOptions = Readonly<{
@@ -63,7 +79,7 @@ export type KernelDriverEmitSayingArgs = [dlg: Dialog, content: string];
63
79
  export type KernelDriverEmitSayingResult = Promise<void>;
64
80
  export type KernelDriverSupplyResponseArgs = [
65
81
  parentDialog: Dialog,
66
- subdialogId: DialogID,
82
+ sideDialogId: DialogID,
67
83
  responseText: string,
68
84
  callType: 'A' | 'B' | 'C',
69
85
  callId?: string,
@@ -86,7 +102,7 @@ export type KernelDriverCoreResult = {
86
102
  lastAssistantSayingContent: string | null;
87
103
  lastAssistantSayingGenseq: number | null;
88
104
  lastFunctionCallGenseq: number | null;
89
- lastAssistantReplyTarget?: KernelDriverSubdialogReplyTarget;
105
+ lastAssistantReplyTarget?: KernelDriverSideDialogReplyTarget;
90
106
  fbrConclusion?: {
91
107
  responseText: string;
92
108
  responseGenseq: number;
@@ -12,6 +12,7 @@ export type McpHeaderValue = {
12
12
  } | {
13
13
  kind: 'from_env';
14
14
  env: string;
15
+ prefix: string;
15
16
  };
16
17
  export type McpTransport = 'stdio' | 'streamable_http';
17
18
  type McpServerConfigBase = {
@@ -168,9 +168,14 @@ function parseServerConfig(serverId, value) {
168
168
  const mapped = asRecord(v, `servers.${serverId}.headers.${k}`);
169
169
  const fromEnv = mapped.env;
170
170
  if (typeof fromEnv !== 'string' || !fromEnv.trim()) {
171
- throw new Error(`Invalid mcp.yaml: servers.${serverId}.headers.${k} must be a string or { env: 'NAME' }`);
171
+ throw new Error(`Invalid mcp.yaml: servers.${serverId}.headers.${k} must be a string, { env: 'NAME' }, or { prefix: 'Bearer ', env: 'NAME' }`);
172
172
  }
173
- headers[k] = { kind: 'from_env', env: fromEnv };
173
+ const prefixVal = mapped.prefix;
174
+ if (prefixVal !== undefined && typeof prefixVal !== 'string') {
175
+ throw new Error(`Invalid mcp.yaml: servers.${serverId}.headers.${k}.prefix must be a string`);
176
+ }
177
+ const prefix = prefixVal ?? '';
178
+ headers[k] = { kind: 'from_env', env: fromEnv, prefix };
174
179
  }
175
180
  const sessionIdVal = obj.sessionId;
176
181
  const sessionId = sessionIdVal === undefined
@@ -1,3 +1,4 @@
1
+ import type { McpStreamableHttpServerConfig } from './config';
1
2
  export type McpDeclaredServerRuntimeStatus = Readonly<{
2
3
  serverId: string;
3
4
  transport: 'stdio' | 'streamable_http' | 'invalid' | 'unknown';
@@ -31,3 +32,4 @@ export declare function requestMcpConfigReload(reason?: string): Promise<{
31
32
  ok: false;
32
33
  errorText: string;
33
34
  }>;
35
+ export declare function buildHttpHeaders(cfg: McpStreamableHttpServerConfig, serverId: string): Record<string, string>;
@@ -41,6 +41,7 @@ exports.startMcpSupervisor = startMcpSupervisor;
41
41
  exports.stopMcpSupervisor = stopMcpSupervisor;
42
42
  exports.requestMcpServerRestart = requestMcpServerRestart;
43
43
  exports.requestMcpConfigReload = requestMcpConfigReload;
44
+ exports.buildHttpHeaders = buildHttpHeaders;
44
45
  const time_1 = require("@longrun-ai/kernel/utils/time");
45
46
  const fs = __importStar(require("fs"));
46
47
  const node_crypto_1 = require("node:crypto");
@@ -1417,7 +1418,7 @@ function buildHttpHeaders(cfg, serverId) {
1417
1418
  if (val === undefined) {
1418
1419
  throw new Error(`MCP server '${serverId}' missing required host env var '${v.env}' (for headers.${k})`);
1419
1420
  }
1420
- headers[k] = val;
1421
+ headers[k] = `${v.prefix}${val}`;
1421
1422
  break;
1422
1423
  }
1423
1424
  default: {
@@ -18,7 +18,7 @@ Build and maintain the rtws scaffolding and operational health:
18
18
  - Execute all legitimate rtws-operation requests from @fuxi.
19
19
  - Execute other teammates’ requests **only** after explicit per-item authorization from @fuxi.
20
20
  - Provide a stable, executable substrate for the visible DevOps team that @fuxi builds.
21
- - Only intervene proactively for **foundational scaffolding** or **cleaning up severe breakage**; otherwise stay in responder mode.
21
+ - Only intervene proactively for **foundational scaffolding** or **cleaning up severe breakage**; otherwise stay in Dialog Responder mode.
22
22
  - Never perform team governance; defer all team-related decisions to @fuxi.
23
23
 
24
24
  ## Core Permissions (Explicit boundary; mutually known with @fuxi)
@@ -31,7 +31,7 @@ Build and maintain the rtws scaffolding and operational health:
31
31
  ## Core Principles
32
32
 
33
33
  1. **Mutual trust, division of labor**: strictly follow “@pangu manages the rtws; @fuxi manages the team”. Do not do team-management work.
34
- 2. **Minimal intervention**: usually act as a precise executor/responder. Only go “hands-on” for foundational scaffolding or severe cleanup.
34
+ 2. **Minimal intervention**: usually act as a precise executor / Dialog Responder. Only go “hands-on” for foundational scaffolding or severe cleanup.
35
35
  3. **Authorization before execution**: treat @fuxi authorization as the only execution basis. For non-@fuxi requests, confirm authorization first; without it, do nothing (no probing, no pre-work).
36
36
  4. **Foundation aligned to team**: before foundational work, sync direction with @fuxi so rtws structure matches the team plan and collaboration patterns.
37
37
  5. **Encourage exploration**: explore rtws setup and operational workflows when aligned with product needs and team execution.
@@ -42,7 +42,7 @@ Build and maintain the rtws scaffolding and operational health:
42
42
  ### 1) Request execution (daily default)
43
43
 
44
44
  1. **Directly respond to @fuxi**: execute rtws operations requested by @fuxi (directory structure, file edits outside `.minds/`, repo setup, command execution, etc.) and report results back to `tellask(targetAgentId: "fuxi", ...)`.
45
- 2. **Respond to other teammates only with authorization**: when any other teammate requests something, immediately ask `tellask(targetAgentId: "fuxi", ...)` for explicit authorization, including caller + request details; execute only after authorization, and then report back to both `tellask(targetAgentId: "fuxi", ...)` and the requester.
45
+ 2. **Respond to other teammates only with authorization**: when any other teammate requests something, immediately ask `tellask(targetAgentId: "fuxi", ...)` for explicit authorization, including tellasker + request details; execute only after authorization, and then report back to both `tellask(targetAgentId: "fuxi", ...)` and the tellasker.
46
46
 
47
47
  ### 2) Foundational work (the only proactive mode; discuss first)
48
48
 
@@ -67,7 +67,7 @@ Only intervene when the rtws is fundamentally broken and @fuxi asks for help. Co
67
67
  1. **With @fuxi**: every execution/progress/direction/authorization exchange starts with **tellask(targetAgentId: "fuxi", ...)**. Be concise and direct.
68
68
  2. **With the user**: only in foundational work or severe cleanup. Start with **askHuman()** and ask minimal, high-leverage questions.
69
69
  3. **With other visible teammates**: without @fuxi authorization, provide no operational commitments. With authorization, execute precisely and report results.
70
- 4. **Cadence**: communicate proactively. If blocked, immediately alert both the requester and `tellask(targetAgentId: "fuxi", ...)`.
70
+ 4. **Cadence**: communicate proactively. If blocked, immediately alert both the tellasker and `tellask(targetAgentId: "fuxi", ...)`.
71
71
 
72
72
  ## Operating Rules
73
73
 
@@ -213,8 +213,8 @@ async function loadAgentMinds(agentId, dialog, options) {
213
213
  ctrl_1.clearMindTool,
214
214
  ctrl_1.recallTaskdocTool,
215
215
  ];
216
- // change_mind is only available in main dialogs (not subdialogs).
217
- if (dialog === undefined || dialog.supdialog === undefined) {
216
+ // change_mind is only available in main dialogs (not sideDialogs).
217
+ if (dialog === undefined || dialog.askerDialog === undefined) {
218
218
  intrinsicFuncTools.push(ctrl_1.changeMindTool);
219
219
  }
220
220
  const agentTools = (() => {
@@ -271,8 +271,8 @@ async function loadAgentMinds(agentId, dialog, options) {
271
271
  }
272
272
  const agentHasTeamMemoryTools = funcTools.some((t) => isTeamMemoryToolName(t.name));
273
273
  const agentHasPersonalMemoryTools = funcTools.some((t) => isPersonalMemoryToolName(t.name));
274
- const isSubdialog = dialog !== undefined && dialog.supdialog !== undefined;
275
- const taskdocMaintainerId = dialog && dialog instanceof dialog_1.SubDialog ? dialog.rootDialog.agentId : agent.id;
274
+ const isSideDialog = dialog !== undefined && dialog.askerDialog !== undefined;
275
+ const taskdocMaintainerId = dialog && dialog instanceof dialog_1.SideDialog ? dialog.mainDialog.agentId : agent.id;
276
276
  const contextHealthSnapshot = dialog?.getLastContextHealth();
277
277
  const contextHealthPromptMode = contextHealthSnapshot &&
278
278
  contextHealthSnapshot.kind === 'available' &&
@@ -286,7 +286,7 @@ async function loadAgentMinds(agentId, dialog, options) {
286
286
  const promptdocContext = {
287
287
  language: workingLanguage,
288
288
  agentId: agent.id,
289
- isSubdialog,
289
+ isSideDialog,
290
290
  taskdocMaintainerId,
291
291
  agentHasTeamMemoryTools,
292
292
  agentHasPersonalMemoryTools,
@@ -312,7 +312,7 @@ async function loadAgentMinds(agentId, dialog, options) {
312
312
  const funcToolRulesText = funcTools.length > 0 ? (0, minds_i18n_1.funcToolRulesText)(workingLanguage) : '';
313
313
  const systemPrompt = (0, system_prompt_1.buildSystemPrompt)({
314
314
  language: workingLanguage,
315
- dialogScope: isSubdialog ? 'sideline' : 'mainline',
315
+ dialogScope: isSideDialog ? 'sideDialog' : 'mainDialog',
316
316
  contextHealthPromptMode,
317
317
  agent,
318
318
  persona,
@@ -4,7 +4,7 @@ export type ContextHealthPromptMode = 'normal' | 'caution' | 'critical';
4
4
  export type PromptdocContext = {
5
5
  language: LanguageCode;
6
6
  agentId: string;
7
- isSubdialog: boolean;
7
+ isSideDialog: boolean;
8
8
  taskdocMaintainerId: string;
9
9
  agentHasTeamMemoryTools: boolean;
10
10
  agentHasPersonalMemoryTools: boolean;
@@ -170,13 +170,13 @@ function getMemoryPromptCopy(ctx) {
170
170
  remindersLine: '- 提醒项(以 `reminder_id` 标识,工作集):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,默认整理成“结构化接续包提醒项”;其中只保留差遣牒未覆盖、但恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若系统已把当前程切到吃紧/告急处置态,则允许先保留多条粗略提醒项把信息带过桥;当前程只做保信息 + clear_mind;只有系统实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。',
171
171
  teamMemoryLine: '- 团队记忆:稳定的团队约定/工程规约(跨任务共享)。',
172
172
  personalMemoryLine: '- 个人记忆:稳定的个人习惯/偏好与职责域知识;记忆会在每次生成时自动注入上下文,应保持少量且准确(关键文档/代码的精确路径 + 最小必要事实)。不要记录具体任务状态。',
173
- subdialogDutyLine: `你当前处于支线对话:此处不允许 \`change_mind\`。当你判断需要更新差遣牒(尤其是 progress 公告牌)时,请在合适时机直接诉请差遣牒维护人 \`@${ctx.taskdocMaintainerId}\` 执行更新,并给出你已合并好的“新全文/替换稿”(用于替换对应章节全文)。不要声称已更新,除非看到回执。`,
174
- mainlineDutyLine: '你当前处于主线对话:你负责综合维护全队共享差遣牒(尤其是 progress 公告牌)。当队友/支线对话提出更新建议时,及时合并、压缩并保持清晰。',
175
- teammateTellaskRoundDoneLine: `队友诉请重要语义:当你在上游上下文中收到带${runtimeMarkers.finalCompleted}标记的回贴,表示该轮诉请已经结束;对方不会继续执行同一轮诉请。此时如果目标未达成,“等待”是错误的:必须显式发起新一轮 tellask 才能继续推进。`,
173
+ sideDialogDutyLine: `你当前处于支线对话:此处不允许 \`change_mind\`。当你判断需要更新差遣牒(尤其是 progress 公告牌)时,请在合适时机直接诉请差遣牒维护人 \`@${ctx.taskdocMaintainerId}\` 执行更新,并给出你已合并好的“新全文/替换稿”(用于替换对应章节全文)。不要声称已更新,除非看到回执。`,
174
+ mainDialogDutyLine: '你当前处于主线对话:你负责综合维护全队共享差遣牒(尤其是 progress 公告牌)。当队友/支线对话提出更新建议时,及时合并、压缩并保持清晰。',
175
+ teammateTellaskRoundDoneLine: `队友诉请重要语义:当你在诉请者上下文中收到带${runtimeMarkers.finalCompleted}标记的回贴,表示该轮诉请已经结束;对方不会继续执行同一轮诉请。此时如果目标未达成,“等待”是错误的:必须显式发起新一轮 tellask 才能继续推进。`,
176
176
  teamMemoryHintLine: '提示:你具备团队记忆工具(`add_team_memory` / `replace_team_memory` / `drop_team_memory` / `clear_team_memory`),可在必要时维护团队记忆(谨慎、少量、只写稳定约定)。',
177
177
  personalMemoryHintLine: `提示:你具备个人记忆工具(\`add_personal_memory\` / \`replace_personal_memory\` / \`drop_personal_memory\` / \`clear_personal_memory\`)。个人记忆仅对当前智能体可见,且系统会自动按成员隔离到 \`.minds/memory/individual/<member-id>/...\`;因此 \`path\` 不应包含你的成员 id(不要写 \`${ctx.agentId}/...\`)。首次创建时直接用 \`add_personal_memory\` 即可,目录会由系统自动创建。记忆会在每次生成时自动注入上下文:保持少量、保持准确、按“未来会一起更新的内容”合并;写稳定事实(关键路径 + 最小必要约定),不要写任务进度/当天状态;一旦你修改了相关文件或发现记忆过期/冲突,立刻用 \`replace_personal_memory\` 更新。`,
178
- subdialogWorkflowLine: `工作流:先做事 → 再提炼(\`update_reminder\`;必要时整理差遣牒更新提案并诉请 \`@${ctx.taskdocMaintainerId}\` 合并写入)→ 然后 \`clear_mind\` 清空噪音。`,
179
- mainlineWorkflowLine: '工作流:先做事 → 再提炼(`update_reminder` + `change_mind(progress)`)→ 然后 `clear_mind` 清空噪音。',
178
+ sideDialogWorkflowLine: `工作流:先做事 → 再提炼(\`update_reminder\`;必要时整理差遣牒更新提案并诉请 \`@${ctx.taskdocMaintainerId}\` 合并写入)→ 然后 \`clear_mind\` 清空噪音。`,
179
+ mainDialogWorkflowLine: '工作流:先做事 → 再提炼(`update_reminder` + `change_mind(progress)`)→ 然后 `clear_mind` 清空噪音。',
180
180
  contextHealthLine: contextHealthLineZh,
181
181
  taskdocLogLine: taskdocLogLineZh,
182
182
  };
@@ -194,13 +194,13 @@ function getMemoryPromptCopy(ctx) {
194
194
  remindersLine: '- Reminders (addressed by `reminder_id`, working set): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, default to a structured continuation-package reminder that keeps only details not already covered by Taskdoc but easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If the system has already put the current course into caution/critical remediation, rough multi-reminder bridge notes are acceptable; in the current course, only preserve volatile information and clear_mind. Only after the system actually starts the new course does the mandatory first step become reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.',
195
195
  teamMemoryLine: '- Team memory: stable shared conventions (cross-task).',
196
196
  personalMemoryLine: '- Personal memory: stable personal habits/preferences and responsibility-scope knowledge. Memory is automatically injected into context on each generation: keep it small and accurate (exact key doc/code paths + minimal key facts); do not store per-task state.',
197
- subdialogDutyLine: `You are currently in a subdialog: \`change_mind\` is not allowed here. When Taskdoc should be updated (especially the shared progress bulletin board), tellask the Taskdoc maintainer \`@${ctx.taskdocMaintainerId}\` with a fully merged replacement draft (full-section replacement). Do not claim it is updated until you see a receipt.`,
198
- mainlineDutyLine: 'You are currently in the main dialog: you are responsible for keeping the team-shared Taskdoc coherent and up to date (especially the progress bulletin board). Merge proposals from teammates/subdialogs promptly and keep it concise.',
199
- teammateTellaskRoundDoneLine: `Teammate Tellask semantics: when you receive an upstream reply with the ${runtimeMarkers.finalCompleted} marker, that Tellask round is finished; the responder will not keep executing the same call in the background. If the objective is not met, “waiting” is wrong: you must explicitly start a new Tellask round to continue.`,
197
+ sideDialogDutyLine: `You are currently in a Side Dialog: \`change_mind\` is not allowed here. When Taskdoc should be updated (especially the shared progress bulletin board), tellask the Taskdoc maintainer \`@${ctx.taskdocMaintainerId}\` with a fully merged replacement draft (full-section replacement). Do not claim it is updated until you see a receipt.`,
198
+ mainDialogDutyLine: 'You are currently in the Main Dialog: you are responsible for keeping the team-shared Taskdoc coherent and up to date (especially the progress bulletin board). Merge proposals from teammates/Side Dialogs promptly and keep it concise.',
199
+ teammateTellaskRoundDoneLine: `Teammate Tellask semantics: when you receive a tellasker reply with the ${runtimeMarkers.finalCompleted} marker, that Tellask round is finished; the tellaskee will not keep executing the same call in the background. If the objective is not met, “waiting” is wrong: you must explicitly start a new Tellask round to continue.`,
200
200
  teamMemoryHintLine: 'Hint: you have team-memory tools (`add_team_memory` / `replace_team_memory` / `drop_team_memory` / `clear_team_memory`) and may maintain team memory when it is truly stable and worth sharing.',
201
201
  personalMemoryHintLine: `Hint: you have personal-memory tools (\`add_personal_memory\` / \`replace_personal_memory\` / \`drop_personal_memory\` / \`clear_personal_memory\`). Personal memory is private to the current agent and is automatically isolated under \`.minds/memory/individual/<member-id>/...\`; therefore \`path\` MUST NOT include your member id (do not write \`${ctx.agentId}/...\`). For first-time setup, just call \`add_personal_memory\`—the directory will be created automatically. Memory is automatically injected into context on each generation: keep it small, keep it accurate, and group facts that are updated together. Store stable facts (exact key paths + minimal contracts), not daily state/progress. If you changed those files or detect staleness/conflicts, immediately \`replace_personal_memory\` to keep it accurate.`,
202
- subdialogWorkflowLine: `Workflow: do work → distill (\`update_reminder\`; when Taskdoc needs updates, draft a merged replacement and ask \`@${ctx.taskdocMaintainerId}\`) → then \`clear_mind\` to drop noise.`,
203
- mainlineWorkflowLine: 'Workflow: do work → distill (`update_reminder` + `change_mind(progress)`) → then `clear_mind` to drop noise.',
202
+ sideDialogWorkflowLine: `Workflow: do work → distill (\`update_reminder\`; when Taskdoc needs updates, draft a merged replacement and ask \`@${ctx.taskdocMaintainerId}\`) → then \`clear_mind\` to drop noise.`,
203
+ mainDialogWorkflowLine: 'Workflow: do work → distill (`update_reminder` + `change_mind(progress)`) → then `clear_mind` to drop noise.',
204
204
  contextHealthLine: contextHealthLineEn,
205
205
  taskdocLogLine: taskdocLogLineEn,
206
206
  };
@@ -220,11 +220,11 @@ function buildMemorySystemPrompt(ctx) {
220
220
  copy.teamMemoryLine,
221
221
  copy.personalMemoryLine,
222
222
  '',
223
- ctx.isSubdialog ? copy.subdialogDutyLine : copy.mainlineDutyLine,
223
+ ctx.isSideDialog ? copy.sideDialogDutyLine : copy.mainDialogDutyLine,
224
224
  copy.teammateTellaskRoundDoneLine,
225
225
  ...(ctx.agentHasTeamMemoryTools ? [copy.teamMemoryHintLine] : []),
226
226
  ...(ctx.agentHasPersonalMemoryTools ? [copy.personalMemoryHintLine] : []),
227
- ctx.isSubdialog ? copy.subdialogWorkflowLine : copy.mainlineWorkflowLine,
227
+ ctx.isSideDialog ? copy.sideDialogWorkflowLine : copy.mainDialogWorkflowLine,
228
228
  copy.contextHealthLine,
229
229
  copy.taskdocLogLine,
230
230
  ].join('\n');
@@ -4,7 +4,7 @@ import type { ContextHealthPromptMode } from './system-prompt-parts';
4
4
  export declare function formatTeamIntro(team: Team, selfAgentId: string, language: LanguageCode): string;
5
5
  export type BuildSystemPromptInput = {
6
6
  language: LanguageCode;
7
- dialogScope: 'mainline' | 'sideline';
7
+ dialogScope: 'mainDialog' | 'sideDialog';
8
8
  contextHealthPromptMode: ContextHealthPromptMode;
9
9
  agent: Team.Member;
10
10
  persona: string;
@@ -46,25 +46,25 @@ function pickLocalized(language, localized) {
46
46
  function buildFbrContextHealthScopeRule(scope, language, contextHealthPromptMode) {
47
47
  if (contextHealthPromptMode === 'critical') {
48
48
  return pickLocalized(language, {
49
- zh: scope === 'mainline'
49
+ zh: scope === 'mainDialog'
50
50
  ? '- 当前上下文处于系统告急处置态:本程禁止发起 FBR。先按处置要求保信息、维护提醒项,并立即 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR 与差遣牒更新。'
51
51
  : '- 当前上下文处于系统告急处置态:本程禁止发起 FBR。先按处置要求保信息、维护提醒项,并立即 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR。',
52
- en: scope === 'mainline'
52
+ en: scope === 'mainDialog'
53
53
  ? '- Current context is under system critical remediation: do not start FBR in this course. Preserve volatile information, maintain reminders, and clear immediately; resume FBR and Taskdoc updates only after the system starts the new course and the continuation package has been reviewed.'
54
54
  : '- Current context is under system critical remediation: do not start FBR in this course. Preserve volatile information, maintain reminders, and clear immediately; resume FBR only after the system starts the new course and the continuation package has been reviewed.',
55
55
  });
56
56
  }
57
57
  if (contextHealthPromptMode === 'caution') {
58
58
  return pickLocalized(language, {
59
- zh: scope === 'mainline'
59
+ zh: scope === 'mainDialog'
60
60
  ? '- 当前上下文处于系统吃紧处置态:本程不要发起 FBR。先按处置要求提炼提醒项并尽快 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR 与差遣牒更新。'
61
61
  : '- 当前上下文处于系统吃紧处置态:本程不要发起 FBR。先按处置要求提炼提醒项并尽快 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR。',
62
- en: scope === 'mainline'
62
+ en: scope === 'mainDialog'
63
63
  ? '- Current context is under system caution remediation: do not start FBR in this course. Distill reminders and clear soon; resume FBR and Taskdoc updates only after the system starts the new course and the continuation package has been reviewed.'
64
64
  : '- Current context is under system caution remediation: do not start FBR in this course. Distill reminders and clear soon; resume FBR only after the system starts the new course and the continuation package has been reviewed.',
65
65
  });
66
66
  }
67
- if (scope === 'mainline') {
67
+ if (scope === 'mainDialog') {
68
68
  return pickLocalized(language, {
69
69
  zh: '- 当前没有生效中的上下文健康处置指令,可以按正常流程进行 FBR。完成 FBR 后,基于当前可观测事实调用 `change_mind` 更新差遣牒,体现任务最新进展情况。FBR 自诉请正文不要冗余包含差遣牒已有信息。',
70
70
  en: '- There is no active context-health remediation instruction in effect, so FBR may proceed normally. After FBR, call `change_mind` based on currently observable facts to update the Taskdoc with the latest progress; do not redundantly include information already present in the Taskdoc in the FBR body.',
@@ -78,16 +78,16 @@ function buildFbrContextHealthScopeRule(scope, language, contextHealthPromptMode
78
78
  function buildFbrPhaseContract(language) {
79
79
  const lines = pickLocalized(language, {
80
80
  zh: [
81
- '- FBR 必须按“发起 → 逐轮推理 → 上游回帖”三段执行:发起 `freshBootsReasoning` 只代表发起,不代表你已完成推理。',
82
- '- 发出 `freshBootsReasoning` 后,必须在该 FBR 子对话内按序走完整个 N 轮流程;只有最后一轮才会回帖给上游。',
83
- '- 若 `fbr-effort = N`(力度 N,内部映射为 N 次串行推理),等待该 FBR 子对话一次性完整回帖;收到全量回帖后完成提炼并据此做下游决策;不得基于未完成中间轮次提前定稿。',
84
- '- 每一轮都应给出与此前不同的增量观点;每轮均不得复述前文结论。程序会把该 FBR 全量支线正文在最后一轮合并后回贴到上游。',
81
+ '- FBR 必须按“发起 → 逐轮推理 → 诉请者回帖”三段执行:发起 `freshBootsReasoning` 只代表发起,不代表你已完成推理。',
82
+ '- 发出 `freshBootsReasoning` 后,必须在该 FBR 支线对话内按序走完整个 N 轮流程;只有最后一轮才会回帖给诉请者。',
83
+ '- 若 `fbr-effort = N`(力度 N,内部映射为 N 次串行推理),等待该 FBR 支线对话一次性完整回帖;收到全量回帖后完成提炼并据此做下游决策;不得基于未完成中间轮次提前定稿。',
84
+ '- 每一轮都应给出与此前不同的增量观点;每轮均不得复述前文结论。程序会把该 FBR 全量支线正文在最后一轮合并后回贴给诉请者。',
85
85
  ],
86
86
  en: [
87
- '- FBR MUST follow three phases: “initiate -> serial reasoning rounds -> upstream update”. Calling `freshBootsReasoning` means initiation only, not completed reasoning.',
88
- '- After calling `freshBootsReasoning`, run all required rounds in that single FBR sideline window; only the final round may post upstream.',
89
- '- If `fbr-effort = N` (intensity N, internally mapped to N serial passes), wait for the complete sideline response from the final pass; after receiving the full reply, distill it before downstream action. Do not finalize based on partial passes.',
90
- '- Every round must add a distinct incremental view. Every round, including the final one, must not repeat conclusions from earlier rounds. Runtime will relay the full accumulated FBR sideline output upstream in a single upstream-visible message.',
87
+ '- FBR MUST follow three phases: “initiate -> serial reasoning rounds -> tellasker update”. Calling `freshBootsReasoning` means initiation only, not completed reasoning.',
88
+ '- After calling `freshBootsReasoning`, run all required rounds in that single FBR Side Dialog window; only the final round may post to tellasker.',
89
+ '- If `fbr-effort = N` (intensity N, internally mapped to N serial passes), wait for the complete Side Dialog response from the final pass; after receiving the full reply, distill it before downstream action. Do not finalize based on partial passes.',
90
+ '- Every round must add a distinct incremental view. Every round, including the final one, must not repeat conclusions from earlier rounds. Runtime will relay the full accumulated FBR Side Dialog output to tellasker in a single tellasker-visible message.',
91
91
  ],
92
92
  });
93
93
  return lines.join('\n');
@@ -104,33 +104,33 @@ function buildTeammateTellaskPhaseContract(language) {
104
104
  '- 只有长线诉请(`tellask` + `sessionSlug`)才有“更新任务安排”的通道;一次性诉请(`tellaskSessionless`)没有这个通道。再次发起 `tellaskSessionless` 只会创建新的瞬态支线,不会更新、更不会要求旧支线主理人停止;若你后来发现可能需要改要求/提前收口,一开始就不该选择 `tellaskSessionless`。',
105
105
  '- 能由队友诉请完成的执行性工作,禁止转交 `askHuman` 做“转发员”;当你写“让 @X 执行 Y”时,必须在同一回复内直接发出 `tellask` 或 `tellaskSessionless`。',
106
106
  `- 当你在诉请正文里定义“回贴格式/交付格式”时,只写业务交付结构即可;不要要求被诉请者手写 \`${runtimeMarkers.finalCompleted}\` / \`${runtimeMarkers.tellaskBack}\` / FBR 标记(\`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`),这些标记由 Dominds 运行时自动注入。`,
107
- '- 当你处于队友诉请触发的支线时,不要把“阻塞/不确定”默认等同于 `tellaskBack`:若按当前团队规程/SOP/职责卡已能明确判定执行负责人,直接用 `tellask` / `tellaskSessionless` 诉请对应负责人;只有确实需要上游诉请者补充需求、做裁决、澄清验收口径、提供缺失输入,或现有规程无法明确判责时,才使用 `tellaskBack`。`tellaskBack` 不携带 `sessionSlug`。',
107
+ '- 当你处于队友诉请触发的支线时,不要把“阻塞/不确定”默认等同于 `tellaskBack`:若按当前团队规程/SOP/职责卡已能明确判定执行负责人,直接用 `tellask` / `tellaskSessionless` 诉请对应负责人;只有确实需要诉请者补充需求、做裁决、澄清验收口径、提供缺失输入,或现有规程无法明确判责时,才使用 `tellaskBack`。`tellaskBack` 不携带 `sessionSlug`。',
108
108
  `- 回贴文本标记由运行时在跨对话传递正文中按语义自动添加(例如 \`${runtimeMarkers.tellaskBack}\` / \`${runtimeMarkers.finalCompleted}\` / FBR 标记 \`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`);该传递正文会进入目标智能体上下文,且 UI 与其一致。你不应手写这些标记。`,
109
109
  ],
110
110
  en: [
111
111
  '- Teammate Tellasks MUST follow four phases: “initiate -> wait -> judge -> continue”. If the objective is not met, immediately send the next Tellask round.',
112
112
  '- For teammate Tellasks, a delivered response closes that call round; there is no default “still running in background after the reply is already delivered” state for the same Tellask. To continue, emit a new Tellask function call explicitly (usually `tellask` with the same `sessionSlug`).',
113
- '- If the callee starts a new course via `clear_mind` before delivering the reply, the same in-flight Tellask stays live by default; the new course naturally continues it until a reply is delivered or an explicit failure is returned. Do not re-tellask solely because the callee changed course.',
113
+ '- If the tellaskee starts a new course via `clear_mind` before delivering the reply, the same in-flight Tellask stays live by default; the new course naturally continues it until a reply is delivered or an explicit failure is returned. Do not re-tellask solely because the tellaskee changed course.',
114
114
  '- You may claim “waiting for reply/result” only when a concrete pending Tellask exists (normally observable in a “⏳ In-flight Tellasks (N total, auto-maintained; manually deletable only at zero in-flight)” reminder). If that reminder is absent, or it explicitly states there are no in-flight Tellasks, waiting is a wrong action; execute the next action now (direct Tellask or local action).',
115
- '- The “⏳ In-flight Tellasks” reminder is only a system status window, not a control surface: its content is not hand-editable; while any Tellask is still active, it is not deletable, and mistaken deletion will be rejected with guidance. If one Tellask needs a changed scope, earlier closure, or correction, update that Tellask’s assignment instead (for a sessioned Tellask, usually send another `tellask` with the same `sessionSlug`) so the responder can deliver a final reply naturally under the latest assignment.',
116
- '- Only a sessioned Tellask (`tellask` + `sessionSlug`) has an assignment-update channel. A one-shot Tellask (`tellaskSessionless`) has no such channel: another `tellaskSessionless` creates a new transient sideline and does not update, stop, or instruct the earlier one to stop. If you may need later correction or earlier wrap-up, do not choose `tellaskSessionless` in the first place.',
115
+ '- The “⏳ In-flight Tellasks” reminder is only a system status window, not a control surface: its content is not hand-editable; while any Tellask is still active, it is not deletable, and mistaken deletion will be rejected with guidance. If one Tellask needs a changed scope, earlier closure, or correction, update that Tellask’s assignment instead (for a sessioned Tellask, usually send another `tellask` with the same `sessionSlug`) so the tellaskee can deliver a final reply naturally under the latest assignment.',
116
+ '- Only a sessioned Tellask (`tellask` + `sessionSlug`) has an assignment-update channel. A one-shot Tellask (`tellaskSessionless`) has no such channel: another `tellaskSessionless` creates a new transient Side Dialog and does not update, stop, or instruct the earlier one to stop. If you may need later correction or earlier wrap-up, do not choose `tellaskSessionless` in the first place.',
117
117
  '- Do not use `askHuman` as a relay for executable teammate work. If you write “ask @X to do Y”, emit `tellask` or `tellaskSessionless` in the same response.',
118
- `- When you define a “reply/delivery format” inside tellask body, keep it to the business delivery structure; do not require the responder to hand-write \`${runtimeMarkers.finalCompleted}\` / \`${runtimeMarkers.tellaskBack}\` / FBR markers (\`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`), because Dominds runtime injects those markers automatically.`,
119
- '- In a teammate-triggered sideline, do not treat “blocked / uncertain” as an automatic `tellaskBack`: if current team SOP / role ownership already identifies the responsible executor, directly use `tellask` / `tellaskSessionless` for that owner; use `tellaskBack` only when you truly need the upstream requester to clarify, decide, confirm acceptance criteria, provide missing input, or when existing SOP cannot determine ownership. `tellaskBack` must not carry `sessionSlug`.',
118
+ `- When you define a “reply/delivery format” inside tellask body, keep it to the business delivery structure; do not require the tellaskee to hand-write \`${runtimeMarkers.finalCompleted}\` / \`${runtimeMarkers.tellaskBack}\` / FBR markers (\`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`), because Dominds runtime injects those markers automatically.`,
119
+ '- In a teammate-triggered Side Dialog, do not treat “blocked / uncertain” as an automatic `tellaskBack`: if current team SOP / role ownership already identifies the responsible executor, directly use `tellask` / `tellaskSessionless` for that owner; use `tellaskBack` only when you truly need the tellasker to clarify, decide, confirm acceptance criteria, provide missing input, or when existing SOP cannot determine ownership. `tellaskBack` must not carry `sessionSlug`.',
120
120
  `- Reply markers are auto-added by runtime in the inter-dialog transfer payload (for example \`${runtimeMarkers.tellaskBack}\` / \`${runtimeMarkers.finalCompleted}\` / FBR markers \`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`); that same transfer payload is what the target agent receives in context and what UI shows. Do not hand-write markers.`,
121
121
  ],
122
122
  });
123
123
  return lines.join('\n');
124
124
  }
125
- function buildSidelineUpstreamReplyMarkerRules(language) {
125
+ function buildSideDialogTellaskerReplyMarkerRules(language) {
126
126
  const runtimeMarkers = (0, inter_dialog_format_1.getRuntimeTransferMarkers)(language);
127
127
  const lines = pickLocalized(language, {
128
128
  zh: [
129
- '- 本规则仅用于当前支线向上游回复;`tellask` 用于**发起新的下游诉请对话**(委托队友做事),不用于向上游汇报。',
130
- '- 当前支线未完成时,不要默认直接 `tellaskBack`。先判断当前团队规程/SOP/职责卡能否明确负责人:若能明确且属于执行性处理,直接 `tellask` / `tellaskSessionless` 对应负责人;只有当必须向上游诉请者补充需求、做业务裁决、澄清验收口径、提供缺失输入,或现有规程无法明确判责时,才发起 `tellaskBack({ tellaskContent: "..." })`,并在 `tellaskContent` 中给出具体问题。',
129
+ '- 本规则仅用于当前支线向诉请者回复;`tellask` 用于**发起新的下游诉请对话**(委托队友做事),不用于向诉请者汇报。',
130
+ '- 当前支线未完成时,不要默认直接 `tellaskBack`。先判断当前团队规程/SOP/职责卡能否明确负责人:若能明确且属于执行性处理,直接 `tellask` / `tellaskSessionless` 对应负责人;只有当必须向诉请者补充需求、做业务裁决、澄清验收口径、提供缺失输入,或现有规程无法明确判责时,才发起 `tellaskBack({ tellaskContent: "..." })`,并在 `tellaskContent` 中给出具体问题。',
131
131
  '- 是否存在“待你收口的跨对话回复义务”、以及精确该调用哪个 reply 函数,均由运行时程序化判断;运行时会在 assignment 或最新 runtime/user 提示里直接点名。',
132
132
  '- 若运行时点名了精确 reply 函数名,你只需调用那个被点名的函数;不要自己判断 `reply*` 变体。禁止调用 `tellaskBack` 发送最终结果,也禁止用 `tellask` 向诉请者发送最终结果。',
133
- `- 只有在运行时当前明确点名了某个精确 reply 函数,且你通过那个函数回复时,运行时才会把该回复作为完成结果投递给上游,并在传递正文中添加 ${runtimeMarkers.finalCompleted}。`,
133
+ `- 只有在运行时当前明确点名了某个精确 reply 函数,且你通过那个函数回复时,运行时才会把该回复作为完成结果投递给诉请者,并在传递正文中添加 ${runtimeMarkers.finalCompleted}。`,
134
134
  '- 若运行时当前明确提示“没有待完成的跨对话回复义务”,就直接继续当前本地对话;不要凭记忆再次调用 `reply*`。',
135
135
  '- "不得发普通文本中间汇报"只针对未完成态;若你已经完成任务并能给出最终交付,就应使用运行时当前点名的精确 reply 函数,不要使用 `tellaskBack` 或 `tellask`。',
136
136
  '- 例外:FBR 支线为工具禁用模式(不得调用 `tellaskBack`);其回贴标记(`' +
@@ -138,47 +138,47 @@ function buildSidelineUpstreamReplyMarkerRules(language) {
138
138
  '` / `' +
139
139
  runtimeMarkers.fbrReasoningOnly +
140
140
  '`)也由运行时在传递正文中注入。',
141
- '- 若人类用户在支线对话中插入消息或补问:直接正常回复即可,不需要向诉请者汇报(支线不需要主动汇报上游,默认行为就是直接回复)。',
141
+ '- 若人类用户在支线对话中插入消息或补问:直接正常回复即可,不需要向诉请者汇报(支线不需要主动汇报诉请者,默认行为就是直接回复)。',
142
142
  ],
143
143
  en: [
144
- '- This rule applies only when replying upstream from the current sideline; tellask is for initiating a new downstream tellask dialog (delegating work to a teammate), not for reporting back to the requester.',
145
- '- If the current sideline is unfinished, do not default to `tellaskBack`. First judge whether current team SOP / role ownership already identifies the responsible executor: if yes and the issue is execution work, directly use `tellask` / `tellaskSessionless` for that owner; use `tellaskBack({ tellaskContent: "..." })` only when the upstream requester must provide clarification, business decision, acceptance-criteria confirmation, missing input, or when existing SOP cannot determine ownership. Put concrete questions in `tellaskContent`.',
144
+ '- This rule applies only when replying to the tellasker from the current Side Dialog; tellask is for initiating a new downstream tellask dialog (delegating work to a teammate), not for reporting back to the tellasker.',
145
+ '- If the current Side Dialog is unfinished, do not default to `tellaskBack`. First judge whether current team SOP / role ownership already identifies the responsible executor: if yes and the issue is execution work, directly use `tellask` / `tellaskSessionless` for that owner; use `tellaskBack({ tellaskContent: "..." })` only when the tellasker must provide clarification, business decision, acceptance-criteria confirmation, missing input, or when existing SOP cannot determine ownership. Put concrete questions in `tellaskContent`.',
146
146
  '- Runtime programmatically decides whether there is an active inter-dialog reply obligation for you, and which exact reply function name applies; runtime will state that directly in the assignment or the latest runtime/user prompt.',
147
147
  '- If runtime names an exact reply function, call that named function and do not choose a `reply*` variant by yourself. Do not use `tellaskBack` or `tellask` to send final delivery.',
148
- `- Only replies sent through the exact reply function currently named by runtime are delivered upstream as completion results and marked with ${runtimeMarkers.finalCompleted}.`,
148
+ `- Only replies sent through the exact reply function currently named by runtime are delivered to the tellasker as completion results and marked with ${runtimeMarkers.finalCompleted}.`,
149
149
  '- If runtime explicitly tells you there is no active inter-dialog reply obligation right now, just continue the current local conversation; do not call `reply*` again from memory.',
150
150
  '- "Do not post a plain-text progress update" only applies to unfinished states; if the task is done and you can deliver the final result, use the exact reply function currently named by runtime instead of `tellaskBack` or `tellask`.',
151
- '- Exception: FBR sideline is tool-less (no \`tellaskBack\`); its reply markers (`' +
151
+ '- Exception: FBR Side Dialog is tool-less (no \`tellaskBack\`); its reply markers (`' +
152
152
  runtimeMarkers.fbrDirectReply +
153
153
  '` / `' +
154
154
  runtimeMarkers.fbrReasoningOnly +
155
155
  '`) are also injected by runtime into the transfer payload.',
156
- '- If a human user inserts a message or asks a follow-up in the sideline: just reply normally; no need to report back to the upstream requester (sideline has no standing obligation to report upstream).',
156
+ '- If a human user inserts a message or asks a follow-up in the Side Dialog: just reply normally; no need to report back to the tellasker (Side Dialog has no standing obligation to report to the tellasker).',
157
157
  ],
158
158
  });
159
159
  return lines.join('\n');
160
160
  }
161
161
  function buildTellaskReplyMarkerScopePolicy(language, dialogScope) {
162
162
  const runtimeMarkers = (0, inter_dialog_format_1.getRuntimeTransferMarkers)(language);
163
- if (dialogScope === 'sideline') {
163
+ if (dialogScope === 'sideDialog') {
164
164
  return [
165
165
  ...pickLocalized(language, {
166
166
  zh: [
167
- `- 回贴文本标记由运行时在跨对话传递正文中自动添加(常规完成=${runtimeMarkers.finalCompleted};FBR=${runtimeMarkers.fbrDirectReply} 或 ${runtimeMarkers.fbrReasoningOnly});该正文直接进入上游上下文,且 UI 展示与其一致。你无需、也不应手写标记。`,
167
+ `- 回贴文本标记由运行时在跨对话传递正文中自动添加(常规完成=${runtimeMarkers.finalCompleted};FBR=${runtimeMarkers.fbrDirectReply} 或 ${runtimeMarkers.fbrReasoningOnly});该正文直接进入诉请者上下文,且 UI 展示与其一致。你无需、也不应手写标记。`,
168
168
  '- 若你在正文中给下游写“回贴格式”,只写业务交付结构;不得要求下游手写任何标记,运行时会自动注入。',
169
- '- `tellaskBack` 只允许用于回问上游诉请者;仅当必须向上游补需求/澄清/裁决/缺失输入,或现有团队规程无法明确判责时才使用。禁止用 `tellaskBack` 发送最终结果。',
169
+ '- `tellaskBack` 只允许用于回问诉请者;仅当必须向诉请者补需求/澄清/裁决/缺失输入,或现有团队规程无法明确判责时才使用。禁止用 `tellaskBack` 发送最终结果。',
170
170
  '- 当前支线未完成时,不得把“阻塞/不确定”机械等同于 `tellaskBack`;若团队规程/SOP/职责卡已明确负责人,应直接 `tellask` / `tellaskSessionless` 对应负责人,不得发普通文本中间汇报。',
171
- `- ${(0, reply_prompt_copy_1.buildSidelineCompletionRule)('zh')}`,
172
- `- 仅当运行时当前明确点名了某个精确 reply 函数,且你通过那个函数回复时,运行时才会把该回复投递给上游并标注 ${runtimeMarkers.finalCompleted}。`,
171
+ `- ${(0, reply_prompt_copy_1.buildSideDialogCompletionRule)('zh')}`,
172
+ `- 仅当运行时当前明确点名了某个精确 reply 函数,且你通过那个函数回复时,运行时才会把该回复投递给诉请者并标注 ${runtimeMarkers.finalCompleted}。`,
173
173
  '- 若运行时当前明确提示“没有待完成的跨对话回复义务”,说明这轮不是待你收口的跨对话回复义务;不要重复调用 `reply*`。',
174
174
  ],
175
175
  en: [
176
- `- Reply markers are runtime-added in the inter-dialog transfer payload (regular completed reply = ${runtimeMarkers.finalCompleted}; FBR = ${runtimeMarkers.fbrDirectReply} or ${runtimeMarkers.fbrReasoningOnly}); this payload is delivered to upstream context and shown identically in UI. Do not hand-write markers.`,
176
+ `- Reply markers are runtime-added in the inter-dialog transfer payload (regular completed reply = ${runtimeMarkers.finalCompleted}; FBR = ${runtimeMarkers.fbrDirectReply} or ${runtimeMarkers.fbrReasoningOnly}); this payload is delivered to tellasker context and shown identically in UI. Do not hand-write markers.`,
177
177
  '- If you define a reply format for downstream, keep it to the business delivery structure; do not require downstream to hand-write any marker, because runtime injects markers automatically.',
178
- '- `tellaskBack` is only for asking the upstream requester back; use it only when upstream clarification / decision / missing input is required, or current team SOP cannot determine ownership. Do not use `tellaskBack` to send final results.',
179
- '- If the current sideline is unfinished, do not mechanically map “blocked / uncertain” to `tellaskBack`; when team SOP / role ownership already identifies the responsible owner, directly use `tellask` / `tellaskSessionless` for that owner instead of posting a plain-text progress update.',
180
- `- ${(0, reply_prompt_copy_1.buildSidelineCompletionRule)('en')}`,
181
- `- Runtime marks ${runtimeMarkers.finalCompleted} and delivers upstream only when runtime currently names an exact reply function and you reply through that named function.`,
178
+ '- `tellaskBack` is only for asking the tellasker back; use it only when tellasker clarification / decision / missing input is required, or current team SOP cannot determine ownership. Do not use `tellaskBack` to send final results.',
179
+ '- If the current Side Dialog is unfinished, do not mechanically map “blocked / uncertain” to `tellaskBack`; when team SOP / role ownership already identifies the responsible owner, directly use `tellask` / `tellaskSessionless` for that owner instead of posting a plain-text progress update.',
180
+ `- ${(0, reply_prompt_copy_1.buildSideDialogCompletionRule)('en')}`,
181
+ `- Runtime marks ${runtimeMarkers.finalCompleted} and delivers to the tellasker only when runtime currently names an exact reply function and you reply through that named function.`,
182
182
  '- If runtime currently tells you there is no active inter-dialog reply obligation, then this turn is not awaiting another inter-dialog closure from you; do not call `reply*` again.',
183
183
  ],
184
184
  }),
@@ -197,7 +197,7 @@ function buildTellaskCollaborationProtocol(language, dialogScope) {
197
197
  zh: [
198
198
  '- Tellask 统一走函数工具通道:`tellaskBack` / `tellask` / `tellaskSessionless` / `askHuman` / `freshBootsReasoning`。',
199
199
  '- 对队友诉请默认使用 `tellask` 并复用 `sessionSlug`;仅在确认一次性诉请足够、且后续不需要更新任务安排/提前收口时才使用 `tellaskSessionless`,并需说明理由。',
200
- '- 例外优先级(强制):`tellaskBack` 仅用于回问上游诉请者,不适用队友长线默认规则,也不携带 `sessionSlug`。',
200
+ '- 例外优先级(强制):`tellaskBack` 仅用于回问诉请者,不适用队友长线默认规则,也不携带 `sessionSlug`。',
201
201
  ],
202
202
  en: [
203
203
  '- Tellask must use the function-tool channel: `tellaskBack` / `tellask` / `tellaskSessionless` / `askHuman` / `freshBootsReasoning`.',
@@ -212,11 +212,11 @@ function buildTellaskCollaborationProtocol(language, dialogScope) {
212
212
  }),
213
213
  buildTeammateTellaskPhaseContract(language),
214
214
  ];
215
- if (dialogScope === 'sideline') {
215
+ if (dialogScope === 'sideDialog') {
216
216
  lines.push(pickLocalized(language, {
217
217
  zh: '- 支线对话交付规则(强制):',
218
- en: '- Sideline completion rule (mandatory):',
219
- }), buildSidelineUpstreamReplyMarkerRules(language));
218
+ en: '- Side Dialog completion rule (mandatory):',
219
+ }), buildSideDialogTellaskerReplyMarkerRules(language));
220
220
  }
221
221
  return lines.join('\n');
222
222
  }
@@ -249,9 +249,9 @@ function buildFbrGuidelines(language, dialogScope, contextHealthPromptMode) {
249
249
  fbrContextHealthRule,
250
250
  '- The standard FBR entry is `freshBootsReasoning({ tellaskContent, effort? })`; do not emulate FBR via self-targeted `tellask` / `tellaskSessionless`.',
251
251
  '- When the user explicitly says “FBR x3” / “3x FBR”, pass `effort: 3` directly; here `x3` is the absolute effort value, not “3 × current fbr_effort”. Use the current member default only when the user did not specify an effort.',
252
- '- When initiating FBR, keep `tellaskContent` to goals, facts, constraints, and evidence only; do not predefine analysis directions (for example fixed question checklists or prescribed frameworks). Reasoning directions must be expanded autonomously by the FBR sideline.',
252
+ '- When initiating FBR, keep `tellaskContent` to goals, facts, constraints, and evidence only; do not predefine analysis directions (for example fixed question checklists or prescribed frameworks). Reasoning directions must be expanded autonomously by the FBR Side Dialog.',
253
253
  '- Pre-call self-check (mandatory): if the body contains scaffolded directives such as “from the following dimensions/aspects” or stepwise templates (“analyze in steps 1..N”), rewrite first, then call `freshBootsReasoning`; otherwise the call is a protocol violation.',
254
- '- Recommended body template (semantic MUST): `Goal` / `Facts` / `Constraints` / `Evidence` (optional `Unknowns`). The body should present neutral facts, not command the FBR sideline to analyze by fixed dimensions or steps.',
254
+ '- Recommended body template (semantic MUST): `Goal` / `Facts` / `Constraints` / `Evidence` (optional `Unknowns`). The body should present neutral facts, not command the FBR Side Dialog to analyze by fixed dimensions or steps.',
255
255
  '- Forbidden patterns: “from the following dimensions”, “analyze in steps 1..N”, “at least N rounds per dimension”. Rewrite these into neutral factual context before calling FBR.',
256
256
  '- Even without an explicit request, before resorting to `askHuman` (Q4H), if the goal is unclear or deciding the next action is difficult, you should first initiate FBR and summarize current dialog facts as the FBR body; do not finalize the next action before that FBR feedback returns.',
257
257
  '- FBR phase contract (mandatory):',
@@ -264,18 +264,18 @@ function buildFbrGuidelines(language, dialogScope, contextHealthPromptMode) {
264
264
  function buildTellaskInteractionRules(language) {
265
265
  const lines = pickLocalized(language, {
266
266
  zh: [
267
- '- `tellaskBack`:仅用于支线回问上游诉请者。',
267
+ '- `tellaskBack`:仅用于支线回问诉请者。',
268
268
  '- `tellask`:用于可恢复的长线诉请(必须提供 `targetAgentId` / `sessionSlug` / `tellaskContent`)。',
269
269
  '- `tellaskSessionless`:用于一次性诉请(必须提供 `targetAgentId` / `tellaskContent`);它不会建立可更新的任务安排通道,后续再次调用只会新开支线,不会影响旧支线继续执行。',
270
270
  '- `askHuman`:用于 Q4H(向人类请求必要澄清/决策/授权/缺失输入)。',
271
271
  '- `freshBootsReasoning`:用于发起扪心自问(FBR)支线(`tellaskContent` 必填,`effort` 可选)。',
272
272
  ],
273
273
  en: [
274
- '- `tellaskBack`: ask back upstream from a sideline dialog only.',
274
+ '- `tellaskBack`: ask back to tellasker from a Side Dialog only.',
275
275
  '- `tellask`: resumable tellask (requires `targetAgentId` / `sessionSlug` / `tellaskContent`).',
276
- '- `tellaskSessionless`: one-shot tellask (requires `targetAgentId` / `tellaskContent`); it does not create an assignment-update channel, and later calls create new sidelines instead of affecting the earlier one.',
276
+ '- `tellaskSessionless`: one-shot tellask (requires `targetAgentId` / `tellaskContent`); it does not create an assignment-update channel, and later calls create new Side Dialogs instead of affecting the earlier one.',
277
277
  '- `askHuman`: Q4H for necessary clarification/decision/authorization/missing input.',
278
- '- `freshBootsReasoning`: starts an FBR sideline dialog (requires `tellaskContent`, optional `effort`).',
278
+ '- `freshBootsReasoning`: starts an FBR Side Dialog (requires `tellaskContent`, optional `effort`).',
279
279
  ],
280
280
  });
281
281
  return lines.join('\n');
@@ -447,7 +447,7 @@ ${functionToolRules}
447
447
  - Full Name: ${input.agent.name}
448
448
 
449
449
  ## Language Model
450
- - Your internal working language is English (system prompt, tool rules, teammate/sideline-dialog narrative formatting).
450
+ - Your internal working language is English (system prompt, tool rules, teammate/Side Dialog narrative formatting).
451
451
  - You may receive a short guide message like "User-visible response language: X". When replying to the user, follow that guide; if absent, respond in the working language.
452
452
 
453
453
  ## Message Types
@@ -465,15 +465,15 @@ System notices convey important state changes (e.g., context caution/critical, D
465
465
  - Mention list (\`mentionList\`): teammate targets for \`tellask\` / \`tellaskSessionless\` only (\`@<agentId>\`).
466
466
  - Tellask content (\`tellaskContent\`): main call payload carrying context/constraints/acceptance.
467
467
  - Dialog Responder: the role responsible for driving a dialog and producing responses.
468
- - tellasker: the Dialog Responder that issued the Tellask.
469
- - tellaskee: the Dialog Responder/agent that receives the Tellask.
470
- - TellaskBack: a sideline uses \`tellaskBack\` to ask the tellasker for clarification.
471
- - Fresh Boots Reasoning (FBR): a tool-less sideline reasoning mechanism triggered by \`freshBootsReasoning\`.
468
+ - tellasker: the dialog / Dialog Responder that issued the Tellask.
469
+ - tellaskee: the dialog / Dialog Responder that receives the Tellask.
470
+ - TellaskBack: a Side Dialog uses \`tellaskBack\` to ask the tellasker for clarification.
471
+ - Fresh Boots Reasoning (FBR): a tool-less Side Dialog reasoning mechanism triggered by \`freshBootsReasoning\`.
472
472
  - Q4H (Question for Human): use \`askHuman\` to request necessary clarification/decision/authorization/missing input from a human.
473
473
  - Tellask Session: resumable multi-turn work using \`tellask\` with \`sessionSlug\`.
474
474
  - Fresh Tellask: a one-shot, non-resumable Tellask.
475
- - Mainline dialog: the dialog that owns the shared Taskdoc and overall progress.
476
- - Sideline dialog: a temporary dialog for a subtask.
475
+ - Main Dialog: the dialog that owns the shared Taskdoc and overall progress.
476
+ - Side Dialog: a temporary dialog for a subtask.
477
477
  - Taskdoc: the shared task contract with required goals/constraints/progress sections plus optional extra sections.
478
478
 
479
479
  ## Persona
@@ -1,4 +1,4 @@
1
- export type DomindsPersistenceFileSource = 'dialog_state' | 'dialog_latest' | 'dialog_metadata' | 'dialog_course_events' | 'reminder_state' | 'questions4human_state' | 'pending_subdialogs' | 'subdialog_responses' | 'subdialog_registry';
1
+ export type DomindsPersistenceFileSource = 'dialog_state' | 'dialog_latest' | 'dialog_metadata' | 'dialog_asker_stack' | 'dialog_course_events' | 'reminder_state' | 'questions4human_state' | 'pending_sideDialogs' | 'sideDialog_responses' | 'sideDialog_registry';
2
2
  export type DomindsPersistenceFileOperation = 'read' | 'parse';
3
3
  export type DomindsPersistenceFileFormat = 'yaml' | 'json' | 'jsonl';
4
4
  type DomindsPersistenceFileErrorArgs = {