dominds 0.7.6 → 0.8.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.
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/agent-priming.js +169 -200
- package/dist/cli/read.js +2 -7
- package/dist/dialog-factory.js +6 -4
- package/dist/dialog-instance-registry.js +2 -2
- package/dist/dialog.js +99 -91
- package/dist/docs/dialog-persistence.md +2 -2
- package/dist/docs/dialog-persistence.zh.md +2 -2
- package/dist/docs/dialog-system.md +86 -90
- package/dist/docs/dialog-system.zh.md +82 -83
- package/dist/docs/diligence-push.md +2 -2
- package/dist/docs/diligence-push.zh.md +2 -2
- package/dist/docs/dominds-agent-priming.md +11 -11
- package/dist/docs/dominds-agent-priming.zh.md +9 -9
- package/dist/docs/dominds-terminology.md +34 -34
- package/dist/docs/fbr-implementation.md +4 -4
- package/dist/docs/fbr-implementation.zh.md +4 -4
- package/dist/docs/fbr.md +31 -53
- package/dist/docs/fbr.zh.md +30 -48
- package/dist/docs/mottos.md +2 -3
- package/dist/docs/mottos.zh.md +2 -2
- package/dist/docs/q4h.md +6 -6
- package/dist/docs/q4h.zh.md +6 -6
- package/dist/docs/tellask-collab.md +13 -13
- package/dist/docs/tellask-collab.zh.md +18 -18
- package/dist/llm/driver-entry.js +9 -33
- package/dist/llm/driver-v2/core.js +413 -111
- package/dist/llm/driver-v2/index.js +5 -0
- package/dist/llm/driver-v2/orchestrator.js +4 -3
- package/dist/llm/driver-v2/policy.js +17 -23
- package/dist/llm/driver-v2/restore-dialog-hierarchy.js +73 -0
- package/dist/llm/driver-v2/round.js +18 -7
- package/dist/llm/driver-v2/runtime-utils.js +3 -5
- package/dist/llm/driver-v2/saying-events.js +4 -42
- package/dist/llm/driver-v2/supdialog-response.js +110 -23
- package/dist/llm/driver-v2/tellask-bridge.js +560 -458
- package/dist/mcp/sdk-client.js +1 -1
- package/dist/mcp/server-runtime.js +1 -1
- package/dist/mcp/stdio-client.js +6 -6
- package/dist/mcp/tool-names.js +1 -1
- package/dist/minds/builtin/fuxi/persona.en.md +10 -10
- package/dist/minds/builtin/fuxi/persona.zh.md +12 -12
- package/dist/minds/builtin/pangu/persona.en.md +7 -7
- package/dist/minds/builtin/pangu/persona.zh.md +6 -6
- package/dist/minds/minds-i18n.js +2 -2
- package/dist/minds/system-prompt-parts.js +15 -12
- package/dist/minds/system-prompt.js +58 -56
- package/dist/persistence.js +675 -527
- package/dist/server/api-routes.js +1 -1
- package/dist/server/websocket-handler.js +10 -20
- package/dist/server.js +3 -3
- package/dist/shared/diligence.js +12 -12
- package/dist/shared/i18n/driver-messages.js +28 -118
- package/dist/shared/utils/inter-dialog-format.js +53 -53
- package/dist/snippets/starting.en.md +1 -1
- package/dist/snippets/starting.zh.md +1 -2
- package/dist/static/assets/{_baseUniq-2IQvcpiv.js → _baseUniq-D4N_zVXV.js} +2 -2
- package/dist/static/assets/{_baseUniq-2IQvcpiv.js.map → _baseUniq-D4N_zVXV.js.map} +1 -1
- package/dist/static/assets/{arc-Boi4s2EY.js → arc-7bP9qomB.js} +2 -2
- package/dist/static/assets/{arc-Boi4s2EY.js.map → arc-7bP9qomB.js.map} +1 -1
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-CV1IIalQ.js → architectureDiagram-VXUJARFQ-DToIiZuZ.js} +6 -6
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-CV1IIalQ.js.map → architectureDiagram-VXUJARFQ-DToIiZuZ.js.map} +1 -1
- package/dist/static/assets/{blockDiagram-VD42YOAC-C66ZvUb1.js → blockDiagram-VD42YOAC-C-pRNHpf.js} +7 -7
- package/dist/static/assets/{blockDiagram-VD42YOAC-C66ZvUb1.js.map → blockDiagram-VD42YOAC-C-pRNHpf.js.map} +1 -1
- package/dist/static/assets/{c4Diagram-YG6GDRKO-2YQZQ-KQ.js → c4Diagram-YG6GDRKO-Bnp-nWKO.js} +3 -3
- package/dist/static/assets/{c4Diagram-YG6GDRKO-2YQZQ-KQ.js.map → c4Diagram-YG6GDRKO-Bnp-nWKO.js.map} +1 -1
- package/dist/static/assets/{channel-DBG_xYT_.js → channel-CTv1SsAF.js} +2 -2
- package/dist/static/assets/{channel-DBG_xYT_.js.map → channel-CTv1SsAF.js.map} +1 -1
- package/dist/static/assets/{chunk-4BX2VUAB-D92pQ5qM.js → chunk-4BX2VUAB-D_OGa3ss.js} +2 -2
- package/dist/static/assets/{chunk-4BX2VUAB-D92pQ5qM.js.map → chunk-4BX2VUAB-D_OGa3ss.js.map} +1 -1
- package/dist/static/assets/{chunk-55IACEB6-T3IKxvjm.js → chunk-55IACEB6-I4o4MCuM.js} +2 -2
- package/dist/static/assets/{chunk-55IACEB6-T3IKxvjm.js.map → chunk-55IACEB6-I4o4MCuM.js.map} +1 -1
- package/dist/static/assets/{chunk-B4BG7PRW-SKDCq7xY.js → chunk-B4BG7PRW-Bp-TIXg6.js} +5 -5
- package/dist/static/assets/{chunk-B4BG7PRW-SKDCq7xY.js.map → chunk-B4BG7PRW-Bp-TIXg6.js.map} +1 -1
- package/dist/static/assets/{chunk-DI55MBZ5-CKY9xXzj.js → chunk-DI55MBZ5-Bnph5Hmd.js} +4 -4
- package/dist/static/assets/{chunk-DI55MBZ5-CKY9xXzj.js.map → chunk-DI55MBZ5-Bnph5Hmd.js.map} +1 -1
- package/dist/static/assets/{chunk-FMBD7UC4-CzaQthG_.js → chunk-FMBD7UC4-q3UyRsNI.js} +2 -2
- package/dist/static/assets/{chunk-FMBD7UC4-CzaQthG_.js.map → chunk-FMBD7UC4-q3UyRsNI.js.map} +1 -1
- package/dist/static/assets/{chunk-QN33PNHL-8v7ASP75.js → chunk-QN33PNHL-BxUlvLXP.js} +2 -2
- package/dist/static/assets/{chunk-QN33PNHL-8v7ASP75.js.map → chunk-QN33PNHL-BxUlvLXP.js.map} +1 -1
- package/dist/static/assets/{chunk-QZHKN3VN-Cd3_mr-D.js → chunk-QZHKN3VN-DpQR9BVw.js} +2 -2
- package/dist/static/assets/{chunk-QZHKN3VN-Cd3_mr-D.js.map → chunk-QZHKN3VN-DpQR9BVw.js.map} +1 -1
- package/dist/static/assets/{chunk-TZMSLE5B-BrTyfkJK.js → chunk-TZMSLE5B-BX8vrVo0.js} +2 -2
- package/dist/static/assets/{chunk-TZMSLE5B-BrTyfkJK.js.map → chunk-TZMSLE5B-BX8vrVo0.js.map} +1 -1
- package/dist/static/assets/{classDiagram-2ON5EDUG-pLBmQ3Qa.js → classDiagram-2ON5EDUG-Ccx5_2Xq.js} +6 -6
- package/dist/static/assets/{classDiagram-2ON5EDUG-pLBmQ3Qa.js.map → classDiagram-2ON5EDUG-Ccx5_2Xq.js.map} +1 -1
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-pLBmQ3Qa.js → classDiagram-v2-WZHVMYZB-Ccx5_2Xq.js} +6 -6
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-pLBmQ3Qa.js.map → classDiagram-v2-WZHVMYZB-Ccx5_2Xq.js.map} +1 -1
- package/dist/static/assets/{clone-rjxmrDHc.js → clone-Cl5zSMrO.js} +2 -2
- package/dist/static/assets/{clone-rjxmrDHc.js.map → clone-Cl5zSMrO.js.map} +1 -1
- package/dist/static/assets/{cose-bilkent-S5V4N54A-DaW3q2vS.js → cose-bilkent-S5V4N54A-B-FUX86B.js} +2 -2
- package/dist/static/assets/{cose-bilkent-S5V4N54A-DaW3q2vS.js.map → cose-bilkent-S5V4N54A-B-FUX86B.js.map} +1 -1
- package/dist/static/assets/{dagre-6UL2VRFP-BT252775.js → dagre-6UL2VRFP-Bj8vSSpT.js} +7 -7
- package/dist/static/assets/{dagre-6UL2VRFP-BT252775.js.map → dagre-6UL2VRFP-Bj8vSSpT.js.map} +1 -1
- package/dist/static/assets/{diagram-PSM6KHXK-Cp0jEYgm.js → diagram-PSM6KHXK-BPcgy7jf.js} +7 -7
- package/dist/static/assets/{diagram-PSM6KHXK-Cp0jEYgm.js.map → diagram-PSM6KHXK-BPcgy7jf.js.map} +1 -1
- package/dist/static/assets/{diagram-QEK2KX5R-BYEiCch_.js → diagram-QEK2KX5R-DHxd6LWi.js} +6 -6
- package/dist/static/assets/{diagram-QEK2KX5R-BYEiCch_.js.map → diagram-QEK2KX5R-DHxd6LWi.js.map} +1 -1
- package/dist/static/assets/{diagram-S2PKOQOG-SNGZ1B53.js → diagram-S2PKOQOG-C4ynhhLr.js} +6 -6
- package/dist/static/assets/{diagram-S2PKOQOG-SNGZ1B53.js.map → diagram-S2PKOQOG-C4ynhhLr.js.map} +1 -1
- package/dist/static/assets/{erDiagram-Q2GNP2WA-CMdkkngT.js → erDiagram-Q2GNP2WA-CQ25uxxf.js} +5 -5
- package/dist/static/assets/{erDiagram-Q2GNP2WA-CMdkkngT.js.map → erDiagram-Q2GNP2WA-CQ25uxxf.js.map} +1 -1
- package/dist/static/assets/{flowDiagram-NV44I4VS-k203P84f.js → flowDiagram-NV44I4VS-ChkkAldk.js} +6 -6
- package/dist/static/assets/{flowDiagram-NV44I4VS-k203P84f.js.map → flowDiagram-NV44I4VS-ChkkAldk.js.map} +1 -1
- package/dist/static/assets/{ganttDiagram-JELNMOA3-CgsVe01-.js → ganttDiagram-JELNMOA3-CBt_Zorl.js} +3 -3
- package/dist/static/assets/{ganttDiagram-JELNMOA3-CgsVe01-.js.map → ganttDiagram-JELNMOA3-CBt_Zorl.js.map} +1 -1
- package/dist/static/assets/{gitGraphDiagram-NY62KEGX-BGOR_N5w.js → gitGraphDiagram-NY62KEGX-CtBc2dOO.js} +7 -7
- package/dist/static/assets/{gitGraphDiagram-NY62KEGX-BGOR_N5w.js.map → gitGraphDiagram-NY62KEGX-CtBc2dOO.js.map} +1 -1
- package/dist/static/assets/{graph-DDHIhCSW.js → graph-BGzNnzuI.js} +3 -3
- package/dist/static/assets/{graph-DDHIhCSW.js.map → graph-BGzNnzuI.js.map} +1 -1
- package/dist/static/assets/{index-CUZD-Ua6.js → index-Vrp1PT3b.js} +654 -355
- package/dist/static/assets/index-Vrp1PT3b.js.map +1 -0
- package/dist/static/assets/{infoDiagram-WHAUD3N6-D0GlWUIm.js → infoDiagram-WHAUD3N6-BYJF-Ol5.js} +5 -5
- package/dist/static/assets/{infoDiagram-WHAUD3N6-D0GlWUIm.js.map → infoDiagram-WHAUD3N6-BYJF-Ol5.js.map} +1 -1
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-I0W1fDTZ.js → journeyDiagram-XKPGCS4Q-Cl2p8ZBw.js} +5 -5
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-I0W1fDTZ.js.map → journeyDiagram-XKPGCS4Q-Cl2p8ZBw.js.map} +1 -1
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-BY5xVZyl.js → kanban-definition-3W4ZIXB7-DBH-HEwY.js} +3 -3
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-BY5xVZyl.js.map → kanban-definition-3W4ZIXB7-DBH-HEwY.js.map} +1 -1
- package/dist/static/assets/{layout-C7mFT1m6.js → layout-DdWO-uEo.js} +5 -5
- package/dist/static/assets/{layout-C7mFT1m6.js.map → layout-DdWO-uEo.js.map} +1 -1
- package/dist/static/assets/{linear-WSX0brRY.js → linear-BY3MovaF.js} +2 -2
- package/dist/static/assets/{linear-WSX0brRY.js.map → linear-BY3MovaF.js.map} +1 -1
- package/dist/static/assets/{min-DOTQTP4p.js → min-aHCJK1uN.js} +3 -3
- package/dist/static/assets/{min-DOTQTP4p.js.map → min-aHCJK1uN.js.map} +1 -1
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-BWhHo-Hq.js → mindmap-definition-VGOIOE7T-BjJnBRtB.js} +4 -4
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-BWhHo-Hq.js.map → mindmap-definition-VGOIOE7T-BjJnBRtB.js.map} +1 -1
- package/dist/static/assets/{pieDiagram-ADFJNKIX-B91oxvos.js → pieDiagram-ADFJNKIX-xAcmdymv.js} +7 -7
- package/dist/static/assets/{pieDiagram-ADFJNKIX-B91oxvos.js.map → pieDiagram-ADFJNKIX-xAcmdymv.js.map} +1 -1
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-DqMUyBPr.js → quadrantDiagram-AYHSOK5B-BPbEGCEj.js} +3 -3
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-DqMUyBPr.js.map → quadrantDiagram-AYHSOK5B-BPbEGCEj.js.map} +1 -1
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-COUayA3m.js → requirementDiagram-UZGBJVZJ--w6UfXy0.js} +4 -4
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-COUayA3m.js.map → requirementDiagram-UZGBJVZJ--w6UfXy0.js.map} +1 -1
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-Bp9r8YDi.js → sankeyDiagram-TZEHDZUN-B_T6TQwh.js} +2 -2
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-Bp9r8YDi.js.map → sankeyDiagram-TZEHDZUN-B_T6TQwh.js.map} +1 -1
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-CpuTC5cG.js → sequenceDiagram-WL72ISMW-DX_oVvqA.js} +4 -4
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-CpuTC5cG.js.map → sequenceDiagram-WL72ISMW-DX_oVvqA.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-Bxoo7e6E.js → stateDiagram-FKZM4ZOC-BAybZU8l.js} +9 -9
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-Bxoo7e6E.js.map → stateDiagram-FKZM4ZOC-BAybZU8l.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-Q-DL7tae.js → stateDiagram-v2-4FDKWEC3-BUsvuCdD.js} +5 -5
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-Q-DL7tae.js.map → stateDiagram-v2-4FDKWEC3-BUsvuCdD.js.map} +1 -1
- package/dist/static/assets/{timeline-definition-IT6M3QCI-DuOiHQPk.js → timeline-definition-IT6M3QCI-DOYN-4XM.js} +3 -3
- package/dist/static/assets/{timeline-definition-IT6M3QCI-DuOiHQPk.js.map → timeline-definition-IT6M3QCI-DOYN-4XM.js.map} +1 -1
- package/dist/static/assets/{treemap-KMMF4GRG-YbrDC0fO.js → treemap-KMMF4GRG-CQXygT0T.js} +4 -4
- package/dist/static/assets/{treemap-KMMF4GRG-YbrDC0fO.js.map → treemap-KMMF4GRG-CQXygT0T.js.map} +1 -1
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-DDRlTIfV.js → xychartDiagram-PRI3JC2R-ByFAvTeN.js} +3 -3
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-DDRlTIfV.js.map → xychartDiagram-PRI3JC2R-ByFAvTeN.js.map} +1 -1
- package/dist/static/index.html +1 -1
- package/dist/tools/builtins.js +0 -8
- package/dist/tools/env.js +1 -1
- package/dist/tools/mcp.js +31 -9
- package/dist/tools/pending-tellask-reminder.js +14 -17
- package/dist/tools/team-mgmt.js +1 -1
- package/package.json +1 -1
- package/dist/static/assets/index-CUZD-Ua6.js.map +0 -1
|
@@ -34,7 +34,7 @@ For Taskdoc package structure and encapsulation rules, see [`encapsulated-taskdo
|
|
|
34
34
|
|
|
35
35
|
A **supdialog** (short for "super dialog") is the supdialog in a hierarchical dialog relationship. It orchestrates and manages subdialogs, providing context, objectives, and guidance while receiving results, questions, and escalations from its subdialogs. The supdialog maintains the overall task context and determines when subdialogs are no longer needed.
|
|
36
36
|
|
|
37
|
-
A supdialog may receive **TellaskBack** from its subdialogs during their task execution. When a subdialog needs guidance or additional context, it can Tellask back via
|
|
37
|
+
A supdialog may receive **TellaskBack** from its subdialogs during their task execution. When a subdialog needs guidance or additional context, it can Tellask back via `tellaskBack({ tellaskContent: "..." })` (TYPE A / `TellaskBack` / 回问诉请), which provides responses that feed back into the subdialog's context.
|
|
38
38
|
|
|
39
39
|
### Subdialog
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ The **main dialog** (also called **root dialog**) is the top-level dialog in a d
|
|
|
48
48
|
|
|
49
49
|
### Q4H (Questions for Human)
|
|
50
50
|
|
|
51
|
-
A **Q4H** is a pending question raised by a dialog (main or subdialog) that requires human input to proceed. Q4Hs are indexed in the dialog's `q4h.yaml` file (an index, not source of truth) and are **cleared by `clear_mind` operations**. The actual question content is stored in the dialog's messages where the
|
|
51
|
+
A **Q4H** is a pending question raised by a dialog (main or subdialog) that requires human input to proceed. Q4Hs are indexed in the dialog's `q4h.yaml` file (an index, not source of truth) and are **cleared by `clear_mind` operations**. The actual question content is stored in the dialog's messages where the `!?askHuman()` Tellask was recorded.
|
|
52
52
|
|
|
53
53
|
### Subdialog Index (subdlg.yaml)
|
|
54
54
|
|
|
@@ -60,8 +60,8 @@ A **subdlg.yaml** file indexes pending subdialogs that a supdialog is waiting fo
|
|
|
60
60
|
|
|
61
61
|
### Subdialog Registry
|
|
62
62
|
|
|
63
|
-
The **subdialog registry** is a root dialog-scoped Map that maintains persistent references to registered subdialogs. The registry uses `agentId!
|
|
64
|
-
If a sideline dialog is declared dead, its Type B registry entry is removed so the same `agentId!
|
|
63
|
+
The **subdialog registry** is a root dialog-scoped Map that maintains persistent references to registered subdialogs. The registry uses `agentId!sessionSlug` as its key format. It moves with the root to `done/` when the root completes, and is rebuilt on root load by scanning done/ subdialog YAMLs.
|
|
64
|
+
If a sideline dialog is declared dead, its Type B registry entry is removed so the same `agentId!sessionSlug` can start a brand-new sideline dialog on the next Tellask.
|
|
65
65
|
|
|
66
66
|
### Teammate Tellask
|
|
67
67
|
|
|
@@ -69,9 +69,9 @@ A **teammate Tellask** is a Dominds specific syntax that triggers communication
|
|
|
69
69
|
|
|
70
70
|
**Tellask block structure** (see also [`dominds-terminology.md`](./dominds-terminology.md)):
|
|
71
71
|
|
|
72
|
-
- **Tellask headline**: the first line
|
|
73
|
-
- **Tellask body**:
|
|
74
|
-
- Structured directives like
|
|
72
|
+
- **Tellask headline**: the first line `tellaskSessionless({ targetAgentId: "<name>", tellaskContent: "..." })` (additional `tellask* function call` lines in the same block are appended to the headline).
|
|
73
|
+
- **Tellask body**: `tellaskContent` payload carried by tellask-special function arguments.
|
|
74
|
+
- Structured directives like `sessionSlug` MUST be in the headline.
|
|
75
75
|
|
|
76
76
|
---
|
|
77
77
|
|
|
@@ -92,7 +92,7 @@ A server-wide mapping of `rootId → RootDialog` objects. This is the single sou
|
|
|
92
92
|
A per-root mapping of `selfId → Dialog` objects. This registry contains the root dialog itself plus all loaded subdialogs, enabling O(1) lookup of any dialog within a hierarchy.
|
|
93
93
|
|
|
94
94
|
**Subdialog Registry (Per RootDialog)**
|
|
95
|
-
A per-root mapping of `agentId!
|
|
95
|
+
A per-root mapping of `agentId!sessionSlug → Subdialog` objects. This registry tracks TYPE B registered subdialogs for resumption across multiple interactions. TYPE C transient subdialogs are never registered.
|
|
96
96
|
|
|
97
97
|
### Per-Dialog Mutex
|
|
98
98
|
|
|
@@ -140,18 +140,18 @@ This section documents the three distinct types of teammate Tellasks in the Domi
|
|
|
140
140
|
|
|
141
141
|
```mermaid
|
|
142
142
|
flowchart TD
|
|
143
|
-
M[LLM emits
|
|
144
|
-
Q -- yes --> A[TYPE A: TellaskBack<br/>(`TellaskBack` / 回问诉请)<br/>Primary:
|
|
145
|
-
Q -- no --> T{Is
|
|
146
|
-
T -- yes --> B[TYPE B: Registered subdialog Tellask<br/>(`Tellask Session` / 长线诉请)<br
|
|
147
|
-
T -- no --> C[TYPE C: Transient subdialog Tellask<br/>(`Fresh Tellask` / 一次性诉请)<br
|
|
143
|
+
M[LLM emits tellaskSessionless({ targetAgentId: "mention", tellaskContent: "..." })] --> Q{Is this a subdialog telling its direct supdialog?}
|
|
144
|
+
Q -- yes --> A[TYPE A: TellaskBack<br/>(`TellaskBack` / 回问诉请)<br/>Primary: tellaskBack({ tellaskContent: "..." }) (NO sessionSlug)]
|
|
145
|
+
Q -- no --> T{Is sessionSlug present?}
|
|
146
|
+
T -- yes --> B[TYPE B: Registered subdialog Tellask<br/>(`Tellask Session` / 长线诉请)<br/>tellask({ targetAgentId: "agentId", sessionSlug: "tellaskSession", tellaskContent: "..." })]
|
|
147
|
+
T -- no --> C[TYPE C: Transient subdialog Tellask<br/>(`Fresh Tellask` / 一次性诉请)<br/>tellaskSessionless({ targetAgentId: "agentId", tellaskContent: "..." })]
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
### TYPE A: Supdialog Tellask (Type A / `TellaskBack` / 回问诉请)
|
|
151
151
|
|
|
152
|
-
**Primary syntax**:
|
|
152
|
+
**Primary syntax**: `tellaskBack({ tellaskContent: "..." })` (NO `sessionSlug`) — `tellaskBack({ tellaskContent: "..." }) sessionSlug ...` is a **syntax error**
|
|
153
153
|
|
|
154
|
-
**Tolerated fallback**:
|
|
154
|
+
**Tolerated fallback**: `tellaskBack({ tellaskContent: "..." })` (NO `sessionSlug`)
|
|
155
155
|
|
|
156
156
|
**Behavior**:
|
|
157
157
|
|
|
@@ -165,10 +165,10 @@ flowchart TD
|
|
|
165
165
|
- Uses `subdialog.supdialog` reference (no registry lookup)
|
|
166
166
|
- No registration - supdialog relationship is inherent
|
|
167
167
|
- Supdialog is always the direct parent in the hierarchy
|
|
168
|
-
-
|
|
168
|
+
- `tellaskBack({ tellaskContent: "..." })` is the canonical Type A syntax: it always routes to the tellasker (the dialog that issued the current Tellask).
|
|
169
169
|
- This matters especially when the supdialog’s `agentId` is identical to the subdialog’s `agentId` (common when a sideline
|
|
170
|
-
is created via
|
|
171
|
-
- The explicit
|
|
170
|
+
is created via `freshBootsReasoning({ tellaskContent: "..." })`), where an explicit `tellaskBack({ tellaskContent: "..." })` is easier to get wrong by accident.
|
|
171
|
+
- The explicit `tellaskBack({ tellaskContent: "..." })` form is accepted as a semantic fallback for backwards compatibility, but is more
|
|
172
172
|
error-prone in FBR/self-subdialog cases.
|
|
173
173
|
|
|
174
174
|
**Example**:
|
|
@@ -177,7 +177,7 @@ flowchart TD
|
|
|
177
177
|
Current dialog: sub-001 (agentId: "backend-dev")
|
|
178
178
|
Parent supdialog: "orchestrator" (agentId)
|
|
179
179
|
|
|
180
|
-
LLM emits:
|
|
180
|
+
LLM emits: tellaskSessionless({ targetAgentId: "orchestrator", tellaskContent: "..." }) How should I handle the database migration?
|
|
181
181
|
|
|
182
182
|
Result:
|
|
183
183
|
- sub-001 suspends
|
|
@@ -188,36 +188,32 @@ Result:
|
|
|
188
188
|
|
|
189
189
|
### TYPE B: Registered Subdialog Tellask (Type B / `Tellask Session` / 长线诉请)
|
|
190
190
|
|
|
191
|
-
**Syntax**:
|
|
191
|
+
**Syntax**: `tellask({ targetAgentId: "<anyAgentId>", sessionSlug: "<tellaskSession>", tellaskContent: "..." })` (note the space before `sessionSlug`)
|
|
192
192
|
|
|
193
|
-
**Fresh Boots Reasoning (FBR)
|
|
193
|
+
**Fresh Boots Reasoning (FBR) syntax**: `freshBootsReasoning({ tellaskContent: "..." })`
|
|
194
194
|
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
- In Dominds, `!?@self` Tellasks are treated as FBR and are driven under a stricter, tool-less policy; see [`fbr.md`](./fbr.md).
|
|
199
|
-
- **FBR itself should be common**, but the `!tellaskSession`-addressed variant should be rare. Prefer `!?@self` (TYPE C, transient)
|
|
200
|
-
for most FBR usage. Use `!?@self !tellaskSession ...` only when you explicitly want a resumable, long-lived “fresh boots session”
|
|
201
|
-
for a multi-step sub-problem.
|
|
195
|
+
- `freshBootsReasoning` is a dedicated function tool, not a Tellask special-target alias.
|
|
196
|
+
- FBR does not accept `sessionSlug` or `mentionList`.
|
|
197
|
+
- FBR is driven under a stricter, tool-less policy; see [`fbr.md`](./fbr.md).
|
|
202
198
|
|
|
203
199
|
**Tellask Session Key Schema**: `<tellaskSession>` uses the same identifier schema as `<mention-id>`:
|
|
204
200
|
`[a-zA-Z][a-zA-Z0-9_-]*`. Parsing stops at whitespace or punctuation; any trailing
|
|
205
201
|
headline text is ignored for tellaskSession parsing.
|
|
206
202
|
|
|
207
|
-
**Registry Key**: `agentId!
|
|
203
|
+
**Registry Key**: `agentId!sessionSlug`
|
|
208
204
|
|
|
209
205
|
**Behavior**:
|
|
210
206
|
|
|
211
|
-
1. Check registry for existing subdialog with key `agentId!
|
|
207
|
+
1. Check registry for existing subdialog with key `agentId!sessionSlug`
|
|
212
208
|
2. **If exists**: Resume the registered subdialog
|
|
213
|
-
3. **If not exists**: Create NEW subdialog AND register it with key `agentId!
|
|
209
|
+
3. **If not exists**: Create NEW subdialog AND register it with key `agentId!sessionSlug`
|
|
214
210
|
4. Parent dialog **suspends** while subdialog runs
|
|
215
211
|
5. Subdialog response flows back to parent
|
|
216
212
|
6. Parent **resumes** with subdialog's response
|
|
217
213
|
|
|
218
214
|
**Current Caller Tracking (important for reuse):**
|
|
219
215
|
|
|
220
|
-
When a registered subdialog is Tellasked again (same `agentId!
|
|
216
|
+
When a registered subdialog is Tellasked again (same `agentId!sessionSlug`), the caller can be a **different dialog** (mainline or another sideline). On every Type B Tellask, the subdialog’s metadata is updated with:
|
|
221
217
|
|
|
222
218
|
- The **current caller dialog ID** (so responses route back to the _latest_ caller)
|
|
223
219
|
- The **Tellask info** (headline/body, origin role, origin member, callId)
|
|
@@ -226,7 +222,7 @@ This makes Type B subdialogs reusable across multiple Tellask sites without losi
|
|
|
226
222
|
|
|
227
223
|
**Tellask Context on Resume**:
|
|
228
224
|
|
|
229
|
-
- On every TYPE B Tellask (new or resumed), the parent-provided `
|
|
225
|
+
- On every TYPE B Tellask (new or resumed), the parent-provided `mentionList`/`tellaskContent`
|
|
230
226
|
is appended to the subdialog as a new user message before the subdialog is driven.
|
|
231
227
|
This ensures the subdialog receives the latest request context for each Tellask.
|
|
232
228
|
- System-injected resume prompts are context only and are **not parsed** for teammate/tool Tellasks.
|
|
@@ -244,7 +240,7 @@ This makes Type B subdialogs reusable across multiple Tellask sites without losi
|
|
|
244
240
|
Root dialog: orchestrator
|
|
245
241
|
Registry: {} (empty)
|
|
246
242
|
|
|
247
|
-
LLM emits:
|
|
243
|
+
LLM emits: tellask({ targetAgentId: "researcher", sessionSlug: "market-analysis", tellaskContent: "..." })
|
|
248
244
|
|
|
249
245
|
Result (first call):
|
|
250
246
|
- Registry lookup: no "researcher!market-analysis" exists
|
|
@@ -255,7 +251,7 @@ Result (first call):
|
|
|
255
251
|
- Response flows back to orchestrator
|
|
256
252
|
- orchestrator resumes
|
|
257
253
|
|
|
258
|
-
LLM emits again:
|
|
254
|
+
LLM emits again: tellask({ targetAgentId: "researcher", sessionSlug: "market-analysis", tellaskContent: "..." })
|
|
259
255
|
|
|
260
256
|
Result (second call):
|
|
261
257
|
- Registry lookup: "researcher!market-analysis" exists
|
|
@@ -268,12 +264,12 @@ Result (second call):
|
|
|
268
264
|
|
|
269
265
|
### TYPE C: Transient Subdialog Tellask (Type C / `Fresh Tellask` / 一次性诉请)
|
|
270
266
|
|
|
271
|
-
**Syntax**:
|
|
267
|
+
**Syntax**: `tellaskSessionless({ targetAgentId: "<nonSupdialogAgentId>", tellaskContent: "..." })` (NO `sessionSlug`)
|
|
272
268
|
|
|
273
|
-
**Fresh Boots Reasoning (FBR) self-tellask syntax (default; most common)**:
|
|
269
|
+
**Fresh Boots Reasoning (FBR) self-tellask syntax (default; most common)**: `freshBootsReasoning({ tellaskContent: "..." })`
|
|
274
270
|
|
|
275
|
-
-
|
|
276
|
-
- The sideline dialog created by
|
|
271
|
+
- `freshBootsReasoning({ tellaskContent: "..." })` targets the current dialog’s agentId and creates a **new ephemeral subdialog** routed to the same agentId.
|
|
272
|
+
- The sideline dialog created by `freshBootsReasoning({ tellaskContent: "..." })` is FBR and is driven under a stricter, tool-less policy; see [`fbr.md`](./fbr.md).
|
|
277
273
|
- Use this for most Fresh Boots Reasoning sessions: isolate a single sub-problem, produce an answer, and return.
|
|
278
274
|
|
|
279
275
|
**Behavior**:
|
|
@@ -282,7 +278,7 @@ Result (second call):
|
|
|
282
278
|
2. Create **NEW subdialog** with the specified agentId
|
|
283
279
|
3. Drive the new subdialog:
|
|
284
280
|
- For general Type C, the subdialog is full-fledged (supcalls, teammate Tellasks, tools per config).
|
|
285
|
-
- For
|
|
281
|
+
- For `freshBootsReasoning({ tellaskContent: "..." })`, runtime applies the FBR tool-less policy (no tools; restricted Tellasks).
|
|
286
282
|
4. Subdialog response flows back to parent
|
|
287
283
|
5. Parent **resumes** with subdialog's response
|
|
288
284
|
|
|
@@ -290,7 +286,7 @@ Result (second call):
|
|
|
290
286
|
|
|
291
287
|
- **No registry lookup** - always creates a new subdialog
|
|
292
288
|
- **Not registered** - no persistence across Tellasks
|
|
293
|
-
- The subdialog itself is fully capable **except** for
|
|
289
|
+
- The subdialog itself is fully capable **except** for `freshBootsReasoning({ tellaskContent: "..." })` FBR, which is tool-less and Tellask-restricted (see `fbr.md`).
|
|
294
290
|
- Only difference from TYPE B: no registry lookup/resume capability
|
|
295
291
|
- Used for one-off, independent tasks
|
|
296
292
|
|
|
@@ -319,16 +315,16 @@ Result:
|
|
|
319
315
|
|
|
320
316
|
### Comparison Summary
|
|
321
317
|
|
|
322
|
-
| Aspect | TYPE A: Supdialog Tellask (`TellaskBack`) | TYPE B: Registered Subdialog Tellask (`Tellask Session`)
|
|
323
|
-
| -------------------------- | ----------------------------------------- |
|
|
324
|
-
| **Syntax** |
|
|
325
|
-
|
|
|
326
|
-
| **Registry Lookup** | No (uses `subdialog.supdialog`) | Yes (`agentId!
|
|
327
|
-
| **Resumption** | No (supdialog not a subdialog) | Yes (lookup finds existing)
|
|
328
|
-
| **Registration** | Not applicable | Created AND registered
|
|
329
|
-
| **Parent Behavior** | Subdialog suspends | Parent suspends
|
|
330
|
-
| **Subdialog Capabilities** | Full (supcalls, teammates, tools) | Full (supcalls, teammates, tools)
|
|
331
|
-
| **Use Case** | Clarification from parent (`TellaskBack`) | Resume persistent subtask (`Tellask Session`)
|
|
318
|
+
| Aspect | TYPE A: Supdialog Tellask (`TellaskBack`) | TYPE B: Registered Subdialog Tellask (`Tellask Session`) | TYPE C: Transient Subdialog Tellask (`Fresh Tellask`) |
|
|
319
|
+
| -------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
320
|
+
| **Syntax** | `tellaskBack({ tellaskContent: "..." })` | `tellask({ targetAgentId: "<anyAgentId>", sessionSlug: "<id>", tellaskContent: "..." })` | `tellaskSessionless({ targetAgentId: "<nonSupdialogAgentId>", tellaskContent: "..." })` |
|
|
321
|
+
| **sessionSlug** | Not allowed | Required | Not allowed |
|
|
322
|
+
| **Registry Lookup** | No (uses `subdialog.supdialog`) | Yes (`agentId!sessionSlug`) | No (never registered) |
|
|
323
|
+
| **Resumption** | No (supdialog not a subdialog) | Yes (lookup finds existing) | No (always new) |
|
|
324
|
+
| **Registration** | Not applicable | Created AND registered | Never registered |
|
|
325
|
+
| **Parent Behavior** | Subdialog suspends | Parent suspends | Parent suspends |
|
|
326
|
+
| **Subdialog Capabilities** | Full (supcalls, teammates, tools) | Full (supcalls, teammates, tools) | Full (supcalls, teammates, tools) |
|
|
327
|
+
| **Use Case** | Clarification from parent (`TellaskBack`) | Resume persistent subtask (`Tellask Session`) | One-off independent task (`Fresh Tellask`) |
|
|
332
328
|
|
|
333
329
|
---
|
|
334
330
|
|
|
@@ -339,7 +335,7 @@ The Dominds dialog system is built on four interconnected core mechanisms that w
|
|
|
339
335
|
```mermaid
|
|
340
336
|
flowchart TD
|
|
341
337
|
H[Dialog hierarchy<br/>(root ↔ subdialogs)] <--> S[Subdialog supply<br/>(responses, pending list, registry)]
|
|
342
|
-
H --> Q[Q4H (
|
|
338
|
+
H --> Q[Q4H (!?askHuman())<br/>(q4h.yaml index)]
|
|
343
339
|
S --> Q
|
|
344
340
|
|
|
345
341
|
Q --> UI[Frontend Q4H panel<br/>(questions_count_update)]
|
|
@@ -353,7 +349,7 @@ flowchart TD
|
|
|
353
349
|
|
|
354
350
|
### Key Design Principles
|
|
355
351
|
|
|
356
|
-
1. **Q4H Index in `q4h.yaml`**: Q4H questions are indexed in `q4h.yaml` (as an index, not source of truth) and cleared by mental clarity operations. The actual question content is in the dialog's messages where the
|
|
352
|
+
1. **Q4H Index in `q4h.yaml`**: Q4H questions are indexed in `q4h.yaml` (as an index, not source of truth) and cleared by mental clarity operations. The actual question content is in the dialog's messages where the `!?askHuman()` Tellask was recorded. They do not survive `clear_mind`.
|
|
357
353
|
|
|
358
354
|
2. **Hierarchical Q4H**: Any dialog in the hierarchy can raise Q4H on its own right (root dialog or subdialog). Questions are indexed in the dialog that asked them, not passed upward.
|
|
359
355
|
|
|
@@ -385,20 +381,20 @@ Q4H (Questions for Human) is the mechanism by which dialogs can suspend executio
|
|
|
385
381
|
/**
|
|
386
382
|
* HumanQuestion - index entry persisted in q4h.yaml per dialog
|
|
387
383
|
* NOTE: This is an INDEX, not the source of truth. The actual question
|
|
388
|
-
* content is in the dialog's messages where the
|
|
389
|
-
* (invoked via
|
|
384
|
+
* content is in the dialog's messages where the askHuman() Tellask was recorded
|
|
385
|
+
* (invoked via !?askHuman()).
|
|
390
386
|
*/
|
|
391
387
|
interface HumanQuestion {
|
|
392
388
|
readonly id: string; // Unique identifier (UUID) - matches message ID
|
|
393
|
-
readonly
|
|
394
|
-
readonly
|
|
389
|
+
readonly mentionList: string; // Question headline/title
|
|
390
|
+
readonly tellaskContent: string; // Detailed question context
|
|
395
391
|
readonly askedAt: string; // ISO timestamp
|
|
396
392
|
}
|
|
397
393
|
```
|
|
398
394
|
|
|
399
395
|
**Storage Location**: `<dialog-path>/q4h.yaml` - serves as an index for quick lookup
|
|
400
396
|
|
|
401
|
-
**Source of Truth**: The actual
|
|
397
|
+
**Source of Truth**: The actual `!?askHuman()` Tellask is stored in the dialog's messages (course JSONL files), where the question was asked.
|
|
402
398
|
|
|
403
399
|
### Q4H Mechanism Flow
|
|
404
400
|
|
|
@@ -422,33 +418,33 @@ sequenceDiagram
|
|
|
422
418
|
|
|
423
419
|
### When Does a Dialog Raise Q4H?
|
|
424
420
|
|
|
425
|
-
Q4H is raised when the
|
|
421
|
+
Q4H is raised when the `!?askHuman()` teammate Tellask is invoked by ANY dialog (root or subdialog) on its own right:
|
|
426
422
|
|
|
427
423
|
```typescript
|
|
428
424
|
// From main/llm/driver.ts, executeTellaskCall function
|
|
429
|
-
const isQ4H =
|
|
425
|
+
const isQ4H = callKind === 'askHuman';
|
|
430
426
|
```
|
|
431
427
|
|
|
432
428
|
**Invocation Pattern**:
|
|
433
429
|
|
|
434
430
|
```
|
|
435
|
-
|
|
431
|
+
!?askHuman() <question headline>
|
|
436
432
|
!?<question body content>
|
|
437
433
|
```
|
|
438
434
|
|
|
439
435
|
### Q4H Recording Process
|
|
440
436
|
|
|
441
437
|
```typescript
|
|
442
|
-
// When
|
|
438
|
+
// When !?askHuman() is detected as a teammate Tellask
|
|
443
439
|
async function recordQuestionForHuman(
|
|
444
440
|
dlg: Dialog,
|
|
445
|
-
|
|
446
|
-
|
|
441
|
+
mentionList: string,
|
|
442
|
+
tellaskContent: string,
|
|
447
443
|
): Promise<void> {
|
|
448
444
|
const question: HumanQuestion = {
|
|
449
445
|
id: generateDialogID(),
|
|
450
|
-
|
|
451
|
-
|
|
446
|
+
mentionList,
|
|
447
|
+
tellaskContent,
|
|
452
448
|
askedAt: formatUnifiedTimestamp(new Date()),
|
|
453
449
|
};
|
|
454
450
|
|
|
@@ -513,7 +509,7 @@ interface DriveDialogByUserAnswerRequest {
|
|
|
513
509
|
**Process (Agent-Pull Model)**:
|
|
514
510
|
|
|
515
511
|
1. User sees Q4H indicator/badge in UI
|
|
516
|
-
2. User clicks Q4H in panel/list, navigates to the
|
|
512
|
+
2. User clicks Q4H in panel/list, navigates to the `askHuman()` Tellask site
|
|
517
513
|
3. User types answer in the input textarea (same as regular messages)
|
|
518
514
|
4. Frontend sends `drive_dialog_by_user_answer` packet
|
|
519
515
|
5. Backend validates `questionId` against q4h.yaml
|
|
@@ -557,7 +553,7 @@ sequenceDiagram
|
|
|
557
553
|
Sup->>Sub: creates subdialog (Type B or C)
|
|
558
554
|
Note over Sup: Supdialog is blocked on pending subdialogs
|
|
559
555
|
|
|
560
|
-
Sub->>WS: emits
|
|
556
|
+
Sub->>WS: emits !?askHuman() question
|
|
561
557
|
WS-->>UI: questions_count_update
|
|
562
558
|
Note over Sub: Subdialog cannot proceed until answered
|
|
563
559
|
|
|
@@ -735,7 +731,7 @@ Invoke the function tool `change_mind` with:
|
|
|
735
731
|
|
|
736
732
|
**Implementation Notes**:
|
|
737
733
|
|
|
738
|
-
- `change_mind` is only available in root dialogs (not subdialogs); subdialogs must ask the tellasker via a TellaskBack (
|
|
734
|
+
- `change_mind` is only available in root dialogs (not subdialogs); subdialogs must ask the tellasker via a TellaskBack (`tellaskBack({ tellaskContent: "..." })`) to update the shared Taskdoc.
|
|
739
735
|
- For `*.tsk/` Taskdoc packages, the Taskdoc is encapsulated: general file tools must not read/write/list/delete anything under `*.tsk/`. See [`encapsulated-taskdoc.md`](./encapsulated-taskdoc.md).
|
|
740
736
|
|
|
741
737
|
---
|
|
@@ -775,7 +771,7 @@ The **subdialog registry** is a root-dialog-scoped data structure that maintains
|
|
|
775
771
|
| Aspect | Description |
|
|
776
772
|
| --------------- | --------------------------------------------------------------- |
|
|
777
773
|
| **Scope** | Root dialog only (not accessible to subdialogs) |
|
|
778
|
-
| **Key Format** | `agentId!
|
|
774
|
+
| **Key Format** | `agentId!sessionSlug` (single-level Map) |
|
|
779
775
|
| **Storage** | `registry.yaml` in root dialog directory |
|
|
780
776
|
| **Lifecycle** | Retained during normal runs; dead subdialog entries are removed |
|
|
781
777
|
| **Persistence** | Moves with root to `done/` when root completes |
|
|
@@ -796,7 +792,7 @@ researcher!market-analysis:
|
|
|
796
792
|
|
|
797
793
|
```mermaid
|
|
798
794
|
flowchart TD
|
|
799
|
-
Tellask[TYPE B Tellask:
|
|
795
|
+
Tellask[TYPE B Tellask: tellask({ targetAgentId: "agentId", sessionSlug: "tellaskSession", tellaskContent: "..." })] --> Key[Compute key: agentId!sessionSlug]
|
|
800
796
|
Key --> Lookup{Registry hit?}
|
|
801
797
|
Lookup -- yes --> Resume[Restore + drive existing subdialog]
|
|
802
798
|
Lookup -- no --> Create[Create + register + drive new subdialog]
|
|
@@ -812,9 +808,9 @@ flowchart TD
|
|
|
812
808
|
|
|
813
809
|
- `RootDialog`
|
|
814
810
|
- Owns the TYPE B subdialog registry (`registry.yaml`)
|
|
815
|
-
- Creates/registers/looks up registered subdialogs (`agentId!
|
|
811
|
+
- Creates/registers/looks up registered subdialogs (`agentId!sessionSlug`)
|
|
816
812
|
- `SubDialog`
|
|
817
|
-
- Has a `supdialog` reference (direct parent) and uses it for TYPE A (
|
|
813
|
+
- Has a `supdialog` reference (direct parent) and uses it for TYPE A (`tellaskBack({ tellaskContent: "..." })`)
|
|
818
814
|
- Cannot access or mutate the root registry (by design)
|
|
819
815
|
|
|
820
816
|
**Mutex Semantics**:
|
|
@@ -926,7 +922,7 @@ interface RegistryMethods {
|
|
|
926
922
|
**Context Inheritance**: New subdialogs automatically receive:
|
|
927
923
|
|
|
928
924
|
- Reference to the same rtws (runtime workspace) Taskdoc (recommended: `tasks/feature-auth.tsk/`); `dlg.taskDocPath` is fixed at dialog creation and never reassigned
|
|
929
|
-
- Supdialog Tellask context (
|
|
925
|
+
- Supdialog Tellask context (mentionList + tellaskContent) explaining their purpose
|
|
930
926
|
- Access to shared team memories
|
|
931
927
|
- Access to their agent's individual memories
|
|
932
928
|
|
|
@@ -1093,7 +1089,7 @@ flowchart TD
|
|
|
1093
1089
|
These diagrams focus on **control flow** and avoid box-art alignment so they stay readable even when
|
|
1094
1090
|
rendered in different markdown viewers.
|
|
1095
1091
|
|
|
1096
|
-
#### TYPE A: TellaskBack (`TellaskBack`) (
|
|
1092
|
+
#### TYPE A: TellaskBack (`TellaskBack`) (`tellaskBack({ tellaskContent: "..." })`, no `sessionSlug`)
|
|
1097
1093
|
|
|
1098
1094
|
```mermaid
|
|
1099
1095
|
sequenceDiagram
|
|
@@ -1101,13 +1097,13 @@ sequenceDiagram
|
|
|
1101
1097
|
participant Driver as Backend driver
|
|
1102
1098
|
participant Sup as Supdialog (direct parent)
|
|
1103
1099
|
|
|
1104
|
-
Sub->>Driver: emits
|
|
1100
|
+
Sub->>Driver: emits `tellaskBack({ tellaskContent: "..." })` + question
|
|
1105
1101
|
Driver->>Sup: drive supdialog to answer
|
|
1106
1102
|
Sup-->>Driver: response text
|
|
1107
1103
|
Driver-->>Sub: resume subdialog with response in context
|
|
1108
1104
|
```
|
|
1109
1105
|
|
|
1110
|
-
#### TYPE B: Registered Subdialog Tellask (`Tellask Session`) (
|
|
1106
|
+
#### TYPE B: Registered Subdialog Tellask (`Tellask Session`) (`tellask({ targetAgentId: "agentId", sessionSlug: "tellaskSession", tellaskContent: "..." })`)
|
|
1111
1107
|
|
|
1112
1108
|
```mermaid
|
|
1113
1109
|
sequenceDiagram
|
|
@@ -1116,8 +1112,8 @@ sequenceDiagram
|
|
|
1116
1112
|
participant Reg as Root subdialog registry
|
|
1117
1113
|
participant Sub as Registered subdialog
|
|
1118
1114
|
|
|
1119
|
-
Caller->>Driver: emits
|
|
1120
|
-
Driver->>Reg: lookup `agentId!
|
|
1115
|
+
Caller->>Driver: emits `tellask({ targetAgentId: "agentId", sessionSlug: "tellaskSession", tellaskContent: "..." })`
|
|
1116
|
+
Driver->>Reg: lookup `agentId!sessionSlug`
|
|
1121
1117
|
alt registry hit
|
|
1122
1118
|
Reg-->>Driver: existing subdialog selfId
|
|
1123
1119
|
Driver->>Sub: restore + drive
|
|
@@ -1132,7 +1128,7 @@ sequenceDiagram
|
|
|
1132
1128
|
end
|
|
1133
1129
|
```
|
|
1134
1130
|
|
|
1135
|
-
#### TYPE C: Transient Subdialog Tellask (`Fresh Tellask`) (
|
|
1131
|
+
#### TYPE C: Transient Subdialog Tellask (`Fresh Tellask`) (`tellaskSessionless({ targetAgentId: "agentId", tellaskContent: "..." })`; `freshBootsReasoning({ tellaskContent: "..." })` is FBR tool-less)
|
|
1136
1132
|
|
|
1137
1133
|
```mermaid
|
|
1138
1134
|
sequenceDiagram
|
|
@@ -1140,7 +1136,7 @@ sequenceDiagram
|
|
|
1140
1136
|
participant Driver as Backend driver
|
|
1141
1137
|
participant Sub as Transient subdialog
|
|
1142
1138
|
|
|
1143
|
-
Caller->>Driver: emits
|
|
1139
|
+
Caller->>Driver: emits `tellaskSessionless({ targetAgentId: "agentId", tellaskContent: "..." })`
|
|
1144
1140
|
Driver->>Sub: create (NOT registered)
|
|
1145
1141
|
Driver->>Sub: drive
|
|
1146
1142
|
Sub-->>Driver: final response
|
|
@@ -1151,7 +1147,7 @@ sequenceDiagram
|
|
|
1151
1147
|
|
|
1152
1148
|
```mermaid
|
|
1153
1149
|
flowchart TD
|
|
1154
|
-
A[
|
|
1150
|
+
A[!?askHuman() Tellask emitted] --> B[Append HumanQuestion entry to q4h.yaml]
|
|
1155
1151
|
B --> C[Emit questions_count_update]
|
|
1156
1152
|
C --> D[UI shows Q4H badge / list]
|
|
1157
1153
|
D --> E{How is it cleared?}
|
|
@@ -1176,7 +1172,7 @@ sequenceDiagram
|
|
|
1176
1172
|
|
|
1177
1173
|
Sup->>Sub: create subdialog (Type B or C)
|
|
1178
1174
|
Note over Sup,Sub: Supdialog becomes blocked on pending subdialogs
|
|
1179
|
-
Sub->>WS: emits
|
|
1175
|
+
Sub->>WS: emits !?askHuman() question (Q4H)
|
|
1180
1176
|
WS-->>UI: questions_count_update (global)
|
|
1181
1177
|
|
|
1182
1178
|
Note over Sub: Subdialog cannot proceed until answered
|
|
@@ -1205,7 +1201,7 @@ sequenceDiagram
|
|
|
1205
1201
|
participant Store as Persistence (q4h.yaml)
|
|
1206
1202
|
participant UI as Frontend
|
|
1207
1203
|
|
|
1208
|
-
User->>Main:
|
|
1204
|
+
User->>Main: !?askHuman() question
|
|
1209
1205
|
Main->>Store: recordQuestionForHuman()
|
|
1210
1206
|
Main-->>UI: questions_count_update
|
|
1211
1207
|
Main-->>Main: suspend root drive loop
|
|
@@ -1248,7 +1244,7 @@ sequenceDiagram
|
|
|
1248
1244
|
sequenceDiagram
|
|
1249
1245
|
participant Root as Root Dialog
|
|
1250
1246
|
participant Store as Persistence (registry.yaml + dialogs/)
|
|
1251
|
-
participant Sub as Subdialog (@researcher
|
|
1247
|
+
participant Sub as Subdialog (@researcher sessionSlug market)
|
|
1252
1248
|
|
|
1253
1249
|
Root->>Store: lookup registry key "researcher!market"
|
|
1254
1250
|
alt not found
|
|
@@ -1322,11 +1318,11 @@ The Dominds dialog system provides a robust framework for hierarchical, human-in
|
|
|
1322
1318
|
|
|
1323
1319
|
### Three Types of Teammate Tellasks
|
|
1324
1320
|
|
|
1325
|
-
| Type (internal) | User-facing term | Syntax
|
|
1326
|
-
| --------------- | ----------------- |
|
|
1327
|
-
| TYPE A | `TellaskBack` |
|
|
1328
|
-
| TYPE B | `Tellask Session` |
|
|
1329
|
-
| TYPE C | `Fresh Tellask` |
|
|
1321
|
+
| Type (internal) | User-facing term | Syntax | Registry | Use Case |
|
|
1322
|
+
| --------------- | ----------------- | ----------------------------------------------------------------------------------- | --------------------- | -------------------------- |
|
|
1323
|
+
| TYPE A | `TellaskBack` | `tellaskBack({ tellaskContent: "..." })` | no registry | clarification (ask origin) |
|
|
1324
|
+
| TYPE B | `Tellask Session` | `tellask({ targetAgentId: "agentId", sessionSlug: "<id>", tellaskContent: "..." })` | `agentId!sessionSlug` | resumable multi-turn work |
|
|
1325
|
+
| TYPE C | `Fresh Tellask` | `tellaskSessionless({ targetAgentId: "agentId", tellaskContent: "..." })` | not registered | one-shot / non-resumable |
|
|
1330
1326
|
|
|
1331
1327
|
### Class Responsibility
|
|
1332
1328
|
|