dominds 0.7.5 → 0.7.6
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 +10 -0
- package/README.zh.md +10 -0
- package/dist/dialog.js +4 -13
- package/dist/llm/driver-v2/core.js +4 -4
- package/dist/llm/driver-v2/orchestrator.js +2 -2
- package/dist/llm/driver-v2/round.js +3 -3
- package/dist/llm/driver-v2/supdialog-response.js +1 -1
- package/dist/llm/driver-v2/tellask-bridge.js +1 -1
- package/dist/llm/driver.js +3 -3
- package/dist/persistence.js +106 -18
- package/dist/shared/i18n/driver-messages.js +4 -4
- package/dist/static/assets/{_baseUniq-Dv0SNM-n.js → _baseUniq-2IQvcpiv.js} +2 -2
- package/dist/static/assets/{_baseUniq-Dv0SNM-n.js.map → _baseUniq-2IQvcpiv.js.map} +1 -1
- package/dist/static/assets/{arc-nblUuKKs.js → arc-Boi4s2EY.js} +2 -2
- package/dist/static/assets/{arc-nblUuKKs.js.map → arc-Boi4s2EY.js.map} +1 -1
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-Q49jOqLH.js → architectureDiagram-VXUJARFQ-CV1IIalQ.js} +6 -6
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-Q49jOqLH.js.map → architectureDiagram-VXUJARFQ-CV1IIalQ.js.map} +1 -1
- package/dist/static/assets/{blockDiagram-VD42YOAC-DOz0byeQ.js → blockDiagram-VD42YOAC-C66ZvUb1.js} +7 -7
- package/dist/static/assets/{blockDiagram-VD42YOAC-DOz0byeQ.js.map → blockDiagram-VD42YOAC-C66ZvUb1.js.map} +1 -1
- package/dist/static/assets/{c4Diagram-YG6GDRKO-CuE9ekBX.js → c4Diagram-YG6GDRKO-2YQZQ-KQ.js} +3 -3
- package/dist/static/assets/{c4Diagram-YG6GDRKO-CuE9ekBX.js.map → c4Diagram-YG6GDRKO-2YQZQ-KQ.js.map} +1 -1
- package/dist/static/assets/{channel-C6JhcfrE.js → channel-DBG_xYT_.js} +2 -2
- package/dist/static/assets/{channel-C6JhcfrE.js.map → channel-DBG_xYT_.js.map} +1 -1
- package/dist/static/assets/{chunk-4BX2VUAB-D9HNI-Q6.js → chunk-4BX2VUAB-D92pQ5qM.js} +2 -2
- package/dist/static/assets/{chunk-4BX2VUAB-D9HNI-Q6.js.map → chunk-4BX2VUAB-D92pQ5qM.js.map} +1 -1
- package/dist/static/assets/{chunk-55IACEB6-D_Pczcp6.js → chunk-55IACEB6-T3IKxvjm.js} +2 -2
- package/dist/static/assets/{chunk-55IACEB6-D_Pczcp6.js.map → chunk-55IACEB6-T3IKxvjm.js.map} +1 -1
- package/dist/static/assets/{chunk-B4BG7PRW-CPzaEhe0.js → chunk-B4BG7PRW-SKDCq7xY.js} +5 -5
- package/dist/static/assets/{chunk-B4BG7PRW-CPzaEhe0.js.map → chunk-B4BG7PRW-SKDCq7xY.js.map} +1 -1
- package/dist/static/assets/{chunk-DI55MBZ5-CZ3yprSl.js → chunk-DI55MBZ5-CKY9xXzj.js} +4 -4
- package/dist/static/assets/{chunk-DI55MBZ5-CZ3yprSl.js.map → chunk-DI55MBZ5-CKY9xXzj.js.map} +1 -1
- package/dist/static/assets/{chunk-FMBD7UC4-DgRX4mC9.js → chunk-FMBD7UC4-CzaQthG_.js} +2 -2
- package/dist/static/assets/{chunk-FMBD7UC4-DgRX4mC9.js.map → chunk-FMBD7UC4-CzaQthG_.js.map} +1 -1
- package/dist/static/assets/{chunk-QN33PNHL-Czn5ZbJU.js → chunk-QN33PNHL-8v7ASP75.js} +2 -2
- package/dist/static/assets/{chunk-QN33PNHL-Czn5ZbJU.js.map → chunk-QN33PNHL-8v7ASP75.js.map} +1 -1
- package/dist/static/assets/{chunk-QZHKN3VN-CNl9lQSy.js → chunk-QZHKN3VN-Cd3_mr-D.js} +2 -2
- package/dist/static/assets/{chunk-QZHKN3VN-CNl9lQSy.js.map → chunk-QZHKN3VN-Cd3_mr-D.js.map} +1 -1
- package/dist/static/assets/{chunk-TZMSLE5B-B4SsArOO.js → chunk-TZMSLE5B-BrTyfkJK.js} +2 -2
- package/dist/static/assets/{chunk-TZMSLE5B-B4SsArOO.js.map → chunk-TZMSLE5B-BrTyfkJK.js.map} +1 -1
- package/dist/static/assets/{classDiagram-2ON5EDUG-D96Cleku.js → classDiagram-2ON5EDUG-pLBmQ3Qa.js} +6 -6
- package/dist/static/assets/{classDiagram-2ON5EDUG-D96Cleku.js.map → classDiagram-2ON5EDUG-pLBmQ3Qa.js.map} +1 -1
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-D96Cleku.js → classDiagram-v2-WZHVMYZB-pLBmQ3Qa.js} +6 -6
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-D96Cleku.js.map → classDiagram-v2-WZHVMYZB-pLBmQ3Qa.js.map} +1 -1
- package/dist/static/assets/{clone-FxJrYcZB.js → clone-rjxmrDHc.js} +2 -2
- package/dist/static/assets/{clone-FxJrYcZB.js.map → clone-rjxmrDHc.js.map} +1 -1
- package/dist/static/assets/{cose-bilkent-S5V4N54A-BbEE6cnq.js → cose-bilkent-S5V4N54A-DaW3q2vS.js} +2 -2
- package/dist/static/assets/{cose-bilkent-S5V4N54A-BbEE6cnq.js.map → cose-bilkent-S5V4N54A-DaW3q2vS.js.map} +1 -1
- package/dist/static/assets/{dagre-6UL2VRFP-CGR7eURR.js → dagre-6UL2VRFP-BT252775.js} +7 -7
- package/dist/static/assets/{dagre-6UL2VRFP-CGR7eURR.js.map → dagre-6UL2VRFP-BT252775.js.map} +1 -1
- package/dist/static/assets/{diagram-PSM6KHXK-WWLa68Lv.js → diagram-PSM6KHXK-Cp0jEYgm.js} +7 -7
- package/dist/static/assets/{diagram-PSM6KHXK-WWLa68Lv.js.map → diagram-PSM6KHXK-Cp0jEYgm.js.map} +1 -1
- package/dist/static/assets/{diagram-QEK2KX5R-Cb0ZJQOH.js → diagram-QEK2KX5R-BYEiCch_.js} +6 -6
- package/dist/static/assets/{diagram-QEK2KX5R-Cb0ZJQOH.js.map → diagram-QEK2KX5R-BYEiCch_.js.map} +1 -1
- package/dist/static/assets/{diagram-S2PKOQOG-zqkdDUKQ.js → diagram-S2PKOQOG-SNGZ1B53.js} +6 -6
- package/dist/static/assets/{diagram-S2PKOQOG-zqkdDUKQ.js.map → diagram-S2PKOQOG-SNGZ1B53.js.map} +1 -1
- package/dist/static/assets/{erDiagram-Q2GNP2WA-BmPf0wOM.js → erDiagram-Q2GNP2WA-CMdkkngT.js} +5 -5
- package/dist/static/assets/{erDiagram-Q2GNP2WA-BmPf0wOM.js.map → erDiagram-Q2GNP2WA-CMdkkngT.js.map} +1 -1
- package/dist/static/assets/{flowDiagram-NV44I4VS-DXrfnkgV.js → flowDiagram-NV44I4VS-k203P84f.js} +6 -6
- package/dist/static/assets/{flowDiagram-NV44I4VS-DXrfnkgV.js.map → flowDiagram-NV44I4VS-k203P84f.js.map} +1 -1
- package/dist/static/assets/{ganttDiagram-JELNMOA3-bfZ5tWX_.js → ganttDiagram-JELNMOA3-CgsVe01-.js} +3 -3
- package/dist/static/assets/{ganttDiagram-JELNMOA3-bfZ5tWX_.js.map → ganttDiagram-JELNMOA3-CgsVe01-.js.map} +1 -1
- package/dist/static/assets/{gitGraphDiagram-NY62KEGX-DXitZi7r.js → gitGraphDiagram-NY62KEGX-BGOR_N5w.js} +7 -7
- package/dist/static/assets/{gitGraphDiagram-NY62KEGX-DXitZi7r.js.map → gitGraphDiagram-NY62KEGX-BGOR_N5w.js.map} +1 -1
- package/dist/static/assets/{graph-mjLq--Ga.js → graph-DDHIhCSW.js} +3 -3
- package/dist/static/assets/{graph-mjLq--Ga.js.map → graph-DDHIhCSW.js.map} +1 -1
- package/dist/static/assets/{index-DRzDnV-j.js → index-CUZD-Ua6.js} +112 -61
- package/dist/static/assets/index-CUZD-Ua6.js.map +1 -0
- package/dist/static/assets/{infoDiagram-WHAUD3N6-Ba9c7MOp.js → infoDiagram-WHAUD3N6-D0GlWUIm.js} +5 -5
- package/dist/static/assets/{infoDiagram-WHAUD3N6-Ba9c7MOp.js.map → infoDiagram-WHAUD3N6-D0GlWUIm.js.map} +1 -1
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-5Wkm5er9.js → journeyDiagram-XKPGCS4Q-I0W1fDTZ.js} +5 -5
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-5Wkm5er9.js.map → journeyDiagram-XKPGCS4Q-I0W1fDTZ.js.map} +1 -1
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-CeARk6gJ.js → kanban-definition-3W4ZIXB7-BY5xVZyl.js} +3 -3
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-CeARk6gJ.js.map → kanban-definition-3W4ZIXB7-BY5xVZyl.js.map} +1 -1
- package/dist/static/assets/{layout-CHbcpbOV.js → layout-C7mFT1m6.js} +5 -5
- package/dist/static/assets/{layout-CHbcpbOV.js.map → layout-C7mFT1m6.js.map} +1 -1
- package/dist/static/assets/{linear-DPPAqhrM.js → linear-WSX0brRY.js} +2 -2
- package/dist/static/assets/{linear-DPPAqhrM.js.map → linear-WSX0brRY.js.map} +1 -1
- package/dist/static/assets/{min-JoIHYtgB.js → min-DOTQTP4p.js} +3 -3
- package/dist/static/assets/{min-JoIHYtgB.js.map → min-DOTQTP4p.js.map} +1 -1
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-DKkSIiut.js → mindmap-definition-VGOIOE7T-BWhHo-Hq.js} +4 -4
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-DKkSIiut.js.map → mindmap-definition-VGOIOE7T-BWhHo-Hq.js.map} +1 -1
- package/dist/static/assets/{pieDiagram-ADFJNKIX-QjFxhjCK.js → pieDiagram-ADFJNKIX-B91oxvos.js} +7 -7
- package/dist/static/assets/{pieDiagram-ADFJNKIX-QjFxhjCK.js.map → pieDiagram-ADFJNKIX-B91oxvos.js.map} +1 -1
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-D8rsSvFI.js → quadrantDiagram-AYHSOK5B-DqMUyBPr.js} +3 -3
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-D8rsSvFI.js.map → quadrantDiagram-AYHSOK5B-DqMUyBPr.js.map} +1 -1
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-C1x_1vZ2.js → requirementDiagram-UZGBJVZJ-COUayA3m.js} +4 -4
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-C1x_1vZ2.js.map → requirementDiagram-UZGBJVZJ-COUayA3m.js.map} +1 -1
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-C3Ou5-Sj.js → sankeyDiagram-TZEHDZUN-Bp9r8YDi.js} +2 -2
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-C3Ou5-Sj.js.map → sankeyDiagram-TZEHDZUN-Bp9r8YDi.js.map} +1 -1
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-CRVq_Rpl.js → sequenceDiagram-WL72ISMW-CpuTC5cG.js} +4 -4
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-CRVq_Rpl.js.map → sequenceDiagram-WL72ISMW-CpuTC5cG.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-DAp-SG30.js → stateDiagram-FKZM4ZOC-Bxoo7e6E.js} +9 -9
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-DAp-SG30.js.map → stateDiagram-FKZM4ZOC-Bxoo7e6E.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-BLi0n8xt.js → stateDiagram-v2-4FDKWEC3-Q-DL7tae.js} +5 -5
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-BLi0n8xt.js.map → stateDiagram-v2-4FDKWEC3-Q-DL7tae.js.map} +1 -1
- package/dist/static/assets/{timeline-definition-IT6M3QCI-DaJrX5LR.js → timeline-definition-IT6M3QCI-DuOiHQPk.js} +3 -3
- package/dist/static/assets/{timeline-definition-IT6M3QCI-DaJrX5LR.js.map → timeline-definition-IT6M3QCI-DuOiHQPk.js.map} +1 -1
- package/dist/static/assets/{treemap-KMMF4GRG-WuFw4QSO.js → treemap-KMMF4GRG-YbrDC0fO.js} +4 -4
- package/dist/static/assets/{treemap-KMMF4GRG-WuFw4QSO.js.map → treemap-KMMF4GRG-YbrDC0fO.js.map} +1 -1
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-B8iG9ezA.js → xychartDiagram-PRI3JC2R-DDRlTIfV.js} +3 -3
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-B8iG9ezA.js.map → xychartDiagram-PRI3JC2R-DDRlTIfV.js.map} +1 -1
- package/dist/static/index.html +1 -1
- package/package.json +1 -1
- package/dist/static/assets/index-DRzDnV-j.js.map +0 -1
package/README.md
CHANGED
|
@@ -108,6 +108,16 @@ https://github.com/longrun-ai/dominds-feat-dev
|
|
|
108
108
|
2. Clone your dominds fork into dominds-feat-dev/dominds/
|
|
109
109
|
3. Open PRs against [longrun-ai/dominds](https://github.com/longrun-ai/dominds) from that inner repo
|
|
110
110
|
|
|
111
|
+
### Contributor Test Rule (Script rtws Isolation)
|
|
112
|
+
|
|
113
|
+
When running script tests inside the Dominds repo (for example `pnpm -C tests run rtws -- ...`):
|
|
114
|
+
|
|
115
|
+
- Start with `pnpm -C tests run` to list available scripts, then run target suites via `pnpm -C tests run <script-name>`.
|
|
116
|
+
- Default mode is **isolated rtws**: each run copies `tests/script-rtws` into a unique temp rtws before execution.
|
|
117
|
+
- Because isolation is default, script tests are safe to run in parallel; do not rely on shared-rtws serial assumptions.
|
|
118
|
+
- Use `--shared-rtws` for debugging only; it runs directly in `tests/script-rtws` and must not be used concurrently.
|
|
119
|
+
- Set `DOMINDS_TEST_RTWS_KEEP_TMP=1` if you want to keep temporary rtws artifacts for post-failure debugging.
|
|
120
|
+
|
|
111
121
|
### rtws Setup
|
|
112
122
|
|
|
113
123
|
There are two common ways to create an rtws:
|
package/README.zh.md
CHANGED
|
@@ -65,6 +65,16 @@ https://github.com/longrun-ai/dominds-feat-dev
|
|
|
65
65
|
2. 在 dominds-feat-dev/dominds/ 目录下,克隆你自己的 Dominds fork 仓库
|
|
66
66
|
3. 在内层 dominds/ 目录中,向 longrun-ai/dominds 提交 PR
|
|
67
67
|
|
|
68
|
+
### 贡献者测试约定(脚本测试 rtws 隔离)
|
|
69
|
+
|
|
70
|
+
当你在 Dominds 仓库里运行脚本测试(如 `pnpm -C tests run rtws -- ...`)时:
|
|
71
|
+
|
|
72
|
+
- 可先用 `pnpm -C tests run` 查看可用测试脚本,再用 `pnpm -C tests run <script-name>` 运行目标用例。
|
|
73
|
+
- 默认是**隔离 rtws**:每次运行都会把 `tests/script-rtws` 复制到独立临时目录后执行。
|
|
74
|
+
- 因为默认隔离,脚本测试可安全并发运行,不再依赖共享 `script-rtws` 的串行假设。
|
|
75
|
+
- `--shared-rtws` 仅用于调试,会直接使用 `tests/script-rtws`,禁止并发运行多个用例。
|
|
76
|
+
- 需要保留失败现场时,设置 `DOMINDS_TEST_RTWS_KEEP_TMP=1`,测试 CLI 会保留临时 rtws 路径。
|
|
77
|
+
|
|
68
78
|
## 快速上手(推荐:通过模板创建运行时工作区)
|
|
69
79
|
|
|
70
80
|
```bash
|
package/dist/dialog.js
CHANGED
|
@@ -790,24 +790,15 @@ class SubDialog extends Dialog {
|
|
|
790
790
|
this.assignmentFromSup = assignmentFromSup;
|
|
791
791
|
const resolvedSupdialog = rootDialog.lookupDialog(assignmentFromSup.callerDialogId);
|
|
792
792
|
if (resolvedSupdialog && resolvedSupdialog.id.selfId === this.id.selfId) {
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
callerDialogId: assignmentFromSup.callerDialogId,
|
|
796
|
-
});
|
|
797
|
-
this._supdialog = rootDialog;
|
|
793
|
+
throw new Error(`SubDialog supdialog invariant violation: caller resolved to self ` +
|
|
794
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${this.id.selfId}, callerDialogId=${assignmentFromSup.callerDialogId})`);
|
|
798
795
|
}
|
|
799
796
|
else if (resolvedSupdialog) {
|
|
800
797
|
this._supdialog = resolvedSupdialog;
|
|
801
798
|
}
|
|
802
799
|
else {
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
log_1.log.warn('SubDialog failed to resolve callerDialogId in root registry; falling back to root', {
|
|
806
|
-
dialogId: this.id.selfId,
|
|
807
|
-
callerDialogId: assignmentFromSup.callerDialogId,
|
|
808
|
-
rootId: rootDialog.id.rootId,
|
|
809
|
-
});
|
|
810
|
-
this._supdialog = rootDialog;
|
|
800
|
+
throw new Error(`SubDialog supdialog invariant violation: caller missing from root registry ` +
|
|
801
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${this.id.selfId}, callerDialogId=${assignmentFromSup.callerDialogId})`);
|
|
811
802
|
}
|
|
812
803
|
this.rootDialog.registerDialog(this);
|
|
813
804
|
}
|
|
@@ -474,11 +474,11 @@ async function driveDialogStreamCoreV2(dlg, humanPrompt, driveOptions, callbacks
|
|
|
474
474
|
else if (!hasQueuedUpNext) {
|
|
475
475
|
const language = (0, runtime_language_1.getWorkLanguage)();
|
|
476
476
|
const guideText = healthDecision.reason === 'caution_soft_remediation'
|
|
477
|
-
? (0, driver_messages_1.
|
|
477
|
+
? (0, driver_messages_1.formatAgentFacingContextHealthV3RemediationGuide)(language, {
|
|
478
478
|
kind: 'caution',
|
|
479
479
|
mode: 'soft',
|
|
480
480
|
})
|
|
481
|
-
: (0, driver_messages_1.
|
|
481
|
+
: (0, driver_messages_1.formatAgentFacingContextHealthV3RemediationGuide)(language, {
|
|
482
482
|
kind: 'critical',
|
|
483
483
|
mode: 'countdown',
|
|
484
484
|
promptsRemainingAfterThis: (0, context_health_1.consumeCriticalCountdown)(dlg.id.key()),
|
|
@@ -504,7 +504,7 @@ async function driveDialogStreamCoreV2(dlg, humanPrompt, driveOptions, callbacks
|
|
|
504
504
|
const promptOrigin = currentPrompt.origin ?? 'user';
|
|
505
505
|
const isDiligencePrompt = promptOrigin === 'diligence_push';
|
|
506
506
|
if (isDiligencePrompt && (dlg.disableDiligencePush || suppressDiligencePushForDrive)) {
|
|
507
|
-
log_1.log.info('driver-v2 skip diligence prompt after disable toggle', {
|
|
507
|
+
log_1.log.info('driver-v2 skip diligence prompt after disable toggle', undefined, {
|
|
508
508
|
dialogId: dlg.id.valueOf(),
|
|
509
509
|
msgId: currentPrompt.msgId,
|
|
510
510
|
});
|
|
@@ -616,7 +616,7 @@ async function driveDialogStreamCoreV2(dlg, humanPrompt, driveOptions, callbacks
|
|
|
616
616
|
const guideMsg = {
|
|
617
617
|
type: 'transient_guide_msg',
|
|
618
618
|
role: 'assistant',
|
|
619
|
-
content: (0, driver_messages_1.
|
|
619
|
+
content: (0, driver_messages_1.formatCurrentUserLanguagePreference)(workingLanguage, uiLanguage),
|
|
620
620
|
};
|
|
621
621
|
const ctxMsgs = (0, context_1.assembleDriveContextMessages)({
|
|
622
622
|
base: {
|
|
@@ -91,7 +91,7 @@ async function driveQueuedDialogsOnce() {
|
|
|
91
91
|
const lastTrigger = dialog_global_registry_1.globalDialogRegistry.getLastDriveTrigger(rootDialog.id.rootId);
|
|
92
92
|
const lastTriggerAgeMs = lastTrigger !== undefined ? Math.max(0, Date.now() - lastTrigger.emittedAtMs) : undefined;
|
|
93
93
|
if (status.subdialogs) {
|
|
94
|
-
log_1.log.info(`Dialog ${rootDialog.id.rootId} suspended, waiting for subdialogs`, {
|
|
94
|
+
log_1.log.info(`Dialog ${rootDialog.id.rootId} suspended, waiting for subdialogs`, undefined, {
|
|
95
95
|
rootId: rootDialog.id.rootId,
|
|
96
96
|
waitingQ4H: status.q4h,
|
|
97
97
|
waitingSubdialogs: status.subdialogs,
|
|
@@ -111,7 +111,7 @@ async function driveQueuedDialogsOnce() {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
if (status.q4h) {
|
|
114
|
-
log_1.log.info(`Dialog ${rootDialog.id.rootId} awaiting Q4H answer`, {
|
|
114
|
+
log_1.log.info(`Dialog ${rootDialog.id.rootId} awaiting Q4H answer`, undefined, {
|
|
115
115
|
rootId: rootDialog.id.rootId,
|
|
116
116
|
waitingQ4H: status.q4h,
|
|
117
117
|
waitingSubdialogs: status.subdialogs,
|
|
@@ -118,7 +118,7 @@ async function executeDriveRound(args) {
|
|
|
118
118
|
if (!suspension.canDrive) {
|
|
119
119
|
const lastTrigger = dialog_global_registry_1.globalDialogRegistry.getLastDriveTrigger(dialog.id.rootId);
|
|
120
120
|
const lastTriggerAgeMs = lastTrigger !== undefined ? Math.max(0, Date.now() - lastTrigger.emittedAtMs) : undefined;
|
|
121
|
-
log_1.log.info('driver-v2 skip queued auto-drive while dialog is suspended', {
|
|
121
|
+
log_1.log.info('driver-v2 skip queued auto-drive while dialog is suspended', undefined, {
|
|
122
122
|
dialogId: dialog.id.valueOf(),
|
|
123
123
|
rootId: dialog.id.rootId,
|
|
124
124
|
selfId: dialog.id.selfId,
|
|
@@ -179,11 +179,11 @@ async function executeDriveRound(args) {
|
|
|
179
179
|
else if (!hasQueuedUpNext) {
|
|
180
180
|
const language = (0, runtime_language_1.getWorkLanguage)();
|
|
181
181
|
const guideText = healthDecision.reason === 'caution_soft_remediation'
|
|
182
|
-
? (0, driver_messages_1.
|
|
182
|
+
? (0, driver_messages_1.formatAgentFacingContextHealthV3RemediationGuide)(language, {
|
|
183
183
|
kind: 'caution',
|
|
184
184
|
mode: 'soft',
|
|
185
185
|
})
|
|
186
|
-
: (0, driver_messages_1.
|
|
186
|
+
: (0, driver_messages_1.formatAgentFacingContextHealthV3RemediationGuide)(language, {
|
|
187
187
|
kind: 'critical',
|
|
188
188
|
mode: 'countdown',
|
|
189
189
|
promptsRemainingAfterThis: (0, context_health_1.consumeCriticalCountdown)(dialog.id.key()),
|
|
@@ -139,7 +139,7 @@ async function supplyResponseToSupdialogV2(args) {
|
|
|
139
139
|
const hasRegistryEntry = isRoot
|
|
140
140
|
? dialog_global_registry_1.globalDialogRegistry.get(parentDialog.id.rootId) !== undefined
|
|
141
141
|
: false;
|
|
142
|
-
log_1.log.info(`All Type ${callType} subdialogs complete, parent ${parentDialog.id.selfId} scheduling auto-revive`, {
|
|
142
|
+
log_1.log.info(`All Type ${callType} subdialogs complete, parent ${parentDialog.id.selfId} scheduling auto-revive`, undefined, {
|
|
143
143
|
rootId: parentDialog.id.rootId,
|
|
144
144
|
selfId: parentDialog.id.selfId,
|
|
145
145
|
via: isRoot && hasRegistryEntry ? 'backend_loop_trigger' : 'direct_schedule_drive',
|
|
@@ -1121,7 +1121,7 @@ async function executeTellaskCalls(args) {
|
|
|
1121
1121
|
body: mergedBody,
|
|
1122
1122
|
q4hRemainingCallIds: remainingCallIds.length > 0 ? remainingCallIds : undefined,
|
|
1123
1123
|
};
|
|
1124
|
-
log_1.log.info('Q4H multi-question normalized into a single prompt', {
|
|
1124
|
+
log_1.log.info('Q4H multi-question normalized into a single prompt', undefined, {
|
|
1125
1125
|
rootId: dlg.id.rootId,
|
|
1126
1126
|
selfId: dlg.id.selfId,
|
|
1127
1127
|
mergedCount: q4hCalls.length,
|
package/dist/llm/driver.js
CHANGED
|
@@ -626,7 +626,7 @@ async function applyContextHealthV3Remediation(args) {
|
|
|
626
626
|
if (activeGenSeq === undefined) {
|
|
627
627
|
return { kind: 'proceed', ctxMsgs: args.ctxMsgs };
|
|
628
628
|
}
|
|
629
|
-
const guideText = (0, driver_messages_1.
|
|
629
|
+
const guideText = (0, driver_messages_1.formatAgentFacingContextHealthV3RemediationGuide)((0, runtime_language_1.getWorkLanguage)(), {
|
|
630
630
|
kind: 'caution',
|
|
631
631
|
mode: 'soft',
|
|
632
632
|
});
|
|
@@ -692,7 +692,7 @@ async function applyContextHealthV3Remediation(args) {
|
|
|
692
692
|
const nextPrompt = resolveUpNextPrompt(dlg);
|
|
693
693
|
return { kind: 'continue', nextPrompt };
|
|
694
694
|
}
|
|
695
|
-
const guideText = (0, driver_messages_1.
|
|
695
|
+
const guideText = (0, driver_messages_1.formatAgentFacingContextHealthV3RemediationGuide)((0, runtime_language_1.getWorkLanguage)(), {
|
|
696
696
|
kind: 'critical',
|
|
697
697
|
mode: 'countdown',
|
|
698
698
|
promptsRemainingAfterThis: promptsBeforeAutoClear - 1,
|
|
@@ -1432,7 +1432,7 @@ async function _driveDialogStream(dlg, humanPrompt, driveOptions) {
|
|
|
1432
1432
|
const guideMsg = {
|
|
1433
1433
|
type: 'transient_guide_msg',
|
|
1434
1434
|
role: 'assistant',
|
|
1435
|
-
content: (0, driver_messages_1.
|
|
1435
|
+
content: (0, driver_messages_1.formatCurrentUserLanguagePreference)(workingLanguage, uiLanguage),
|
|
1436
1436
|
};
|
|
1437
1437
|
const ctxMsgs = (0, context_1.assembleDriveContextMessages)({
|
|
1438
1438
|
base: {
|
package/dist/persistence.js
CHANGED
|
@@ -964,6 +964,98 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
964
964
|
const entries = await DialogPersistence.loadSubdialogRegistry(rootDialog.id, status);
|
|
965
965
|
const shouldPruneDead = status === 'running';
|
|
966
966
|
let prunedDeadRegistryEntries = false;
|
|
967
|
+
const restoringSubdialogs = new Map();
|
|
968
|
+
const ensureSubdialogLoaded = async (subdialogId, ancestry = new Set()) => {
|
|
969
|
+
if (ancestry.has(subdialogId.selfId)) {
|
|
970
|
+
throw new Error(`Subdialog registry restore invariant violation: cyclic parent chain ` +
|
|
971
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${subdialogId.selfId})`);
|
|
972
|
+
}
|
|
973
|
+
const existing = rootDialog.lookupDialog(subdialogId.selfId);
|
|
974
|
+
if (existing) {
|
|
975
|
+
if (!(existing instanceof dialog_1.SubDialog)) {
|
|
976
|
+
throw new Error(`Dialog registry type invariant violation: expected SubDialog ` +
|
|
977
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${subdialogId.selfId})`);
|
|
978
|
+
}
|
|
979
|
+
return existing;
|
|
980
|
+
}
|
|
981
|
+
const inFlight = restoringSubdialogs.get(subdialogId.selfId);
|
|
982
|
+
if (inFlight) {
|
|
983
|
+
return await inFlight;
|
|
984
|
+
}
|
|
985
|
+
const task = (async () => {
|
|
986
|
+
const nextAncestry = new Set(ancestry);
|
|
987
|
+
nextAncestry.add(subdialogId.selfId);
|
|
988
|
+
const subdialogState = await DialogPersistence.restoreDialog(subdialogId, status);
|
|
989
|
+
if (!subdialogState) {
|
|
990
|
+
throw new Error(`Subdialog registry restore invariant violation: missing dialog state ` +
|
|
991
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${subdialogId.selfId})`);
|
|
992
|
+
}
|
|
993
|
+
const metadata = subdialogState.metadata;
|
|
994
|
+
if (!isSubdialogMetadataFile(metadata)) {
|
|
995
|
+
throw new Error(`Subdialog registry restore invariant violation: expected subdialog metadata ` +
|
|
996
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${subdialogId.selfId})`);
|
|
997
|
+
}
|
|
998
|
+
const assignmentFromSup = metadata.assignmentFromSup;
|
|
999
|
+
if (!assignmentFromSup) {
|
|
1000
|
+
throw new Error(`Subdialog registry restore invariant violation: missing assignmentFromSup ` +
|
|
1001
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${subdialogId.selfId})`);
|
|
1002
|
+
}
|
|
1003
|
+
const parentIds = [];
|
|
1004
|
+
const maybePushParentId = (candidate) => {
|
|
1005
|
+
if (!candidate)
|
|
1006
|
+
return;
|
|
1007
|
+
if (candidate === rootDialog.id.rootId)
|
|
1008
|
+
return;
|
|
1009
|
+
if (candidate === subdialogId.selfId)
|
|
1010
|
+
return;
|
|
1011
|
+
if (parentIds.includes(candidate))
|
|
1012
|
+
return;
|
|
1013
|
+
parentIds.push(candidate);
|
|
1014
|
+
};
|
|
1015
|
+
maybePushParentId(metadata.supdialogId);
|
|
1016
|
+
maybePushParentId(assignmentFromSup.callerDialogId);
|
|
1017
|
+
for (const parentId of parentIds) {
|
|
1018
|
+
if (rootDialog.lookupDialog(parentId)) {
|
|
1019
|
+
continue;
|
|
1020
|
+
}
|
|
1021
|
+
const parentDialogId = new dialog_1.DialogID(parentId, rootDialog.id.rootId);
|
|
1022
|
+
const parentMeta = await DialogPersistence.loadDialogMetadata(parentDialogId, status);
|
|
1023
|
+
if (!parentMeta) {
|
|
1024
|
+
throw new Error(`Subdialog registry restore invariant violation: missing parent metadata ` +
|
|
1025
|
+
`(rootId=${rootDialog.id.rootId}, childId=${subdialogId.selfId}, parentId=${parentId})`);
|
|
1026
|
+
}
|
|
1027
|
+
if (!isSubdialogMetadataFile(parentMeta)) {
|
|
1028
|
+
throw new Error(`Subdialog registry restore invariant violation: parent is not a subdialog ` +
|
|
1029
|
+
`(rootId=${rootDialog.id.rootId}, childId=${subdialogId.selfId}, parentId=${parentId})`);
|
|
1030
|
+
}
|
|
1031
|
+
await ensureSubdialogLoaded(parentDialogId, nextAncestry);
|
|
1032
|
+
if (!rootDialog.lookupDialog(parentId)) {
|
|
1033
|
+
throw new Error(`Subdialog registry restore invariant violation: parent restore failed ` +
|
|
1034
|
+
`(rootId=${rootDialog.id.rootId}, childId=${subdialogId.selfId}, parentId=${parentId})`);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
const subdialogStore = new DiskFileDialogStore(subdialogId);
|
|
1038
|
+
const subdialog = new dialog_1.SubDialog(subdialogStore, rootDialog, metadata.taskDocPath, new dialog_1.DialogID(subdialogId.selfId, rootDialog.id.rootId), metadata.agentId, assignmentFromSup, metadata.tellaskSession, {
|
|
1039
|
+
messages: subdialogState.messages,
|
|
1040
|
+
reminders: subdialogState.reminders,
|
|
1041
|
+
currentCourse: subdialogState.currentCourse,
|
|
1042
|
+
contextHealth: subdialogState.contextHealth,
|
|
1043
|
+
});
|
|
1044
|
+
const latest = await DialogPersistence.loadDialogLatest(subdialogId, status);
|
|
1045
|
+
subdialog.disableDiligencePush = latest?.disableDiligencePush ?? false;
|
|
1046
|
+
if (subdialog.tellaskSession) {
|
|
1047
|
+
rootDialog.registerSubdialog(subdialog);
|
|
1048
|
+
}
|
|
1049
|
+
return subdialog;
|
|
1050
|
+
})();
|
|
1051
|
+
restoringSubdialogs.set(subdialogId.selfId, task);
|
|
1052
|
+
try {
|
|
1053
|
+
return await task;
|
|
1054
|
+
}
|
|
1055
|
+
finally {
|
|
1056
|
+
restoringSubdialogs.delete(subdialogId.selfId);
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
967
1059
|
for (const entry of entries) {
|
|
968
1060
|
if (!entry.tellaskSession)
|
|
969
1061
|
continue;
|
|
@@ -982,25 +1074,21 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
982
1074
|
continue;
|
|
983
1075
|
}
|
|
984
1076
|
}
|
|
985
|
-
const
|
|
986
|
-
if (
|
|
987
|
-
|
|
988
|
-
rootDialog.
|
|
989
|
-
|
|
990
|
-
|
|
1077
|
+
const subdialog = await ensureSubdialogLoaded(entry.subdialogId);
|
|
1078
|
+
if (!subdialog.tellaskSession) {
|
|
1079
|
+
throw new Error(`Subdialog registry invariant violation: missing tellaskSession on loaded subdialog ` +
|
|
1080
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${entry.subdialogId.selfId}, expectedTellaskSession=${entry.tellaskSession})`);
|
|
1081
|
+
}
|
|
1082
|
+
if (subdialog.tellaskSession !== entry.tellaskSession) {
|
|
1083
|
+
throw new Error(`Subdialog registry invariant violation: tellaskSession mismatch ` +
|
|
1084
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${entry.subdialogId.selfId}, ` +
|
|
1085
|
+
`expected=${entry.tellaskSession}, actual=${subdialog.tellaskSession})`);
|
|
1086
|
+
}
|
|
1087
|
+
if (subdialog.agentId !== entry.agentId) {
|
|
1088
|
+
throw new Error(`Subdialog registry invariant violation: agentId mismatch ` +
|
|
1089
|
+
`(rootId=${rootDialog.id.rootId}, selfId=${entry.subdialogId.selfId}, ` +
|
|
1090
|
+
`expected=${entry.agentId}, actual=${subdialog.agentId})`);
|
|
991
1091
|
}
|
|
992
|
-
const subdialogState = await DialogPersistence.restoreDialog(entry.subdialogId, status);
|
|
993
|
-
if (!subdialogState)
|
|
994
|
-
continue;
|
|
995
|
-
const assignmentFromSup = subdialogState.metadata.assignmentFromSup;
|
|
996
|
-
if (!assignmentFromSup)
|
|
997
|
-
continue;
|
|
998
|
-
const subdialogStore = new DiskFileDialogStore(entry.subdialogId);
|
|
999
|
-
const subdialog = new dialog_1.SubDialog(subdialogStore, rootDialog, subdialogState.metadata.taskDocPath, new dialog_1.DialogID(entry.subdialogId.selfId, rootDialog.id.rootId), subdialogState.metadata.agentId, assignmentFromSup, entry.tellaskSession, {
|
|
1000
|
-
messages: subdialogState.messages,
|
|
1001
|
-
reminders: subdialogState.reminders,
|
|
1002
|
-
currentCourse: subdialogState.currentCourse,
|
|
1003
|
-
});
|
|
1004
1092
|
rootDialog.registerSubdialog(subdialog);
|
|
1005
1093
|
}
|
|
1006
1094
|
if (prunedDeadRegistryEntries) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatCurrentUserLanguagePreference = formatCurrentUserLanguagePreference;
|
|
4
4
|
exports.formatReminderItemGuide = formatReminderItemGuide;
|
|
5
5
|
exports.formatQ4HDiligencePushBudgetExhausted = formatQ4HDiligencePushBudgetExhausted;
|
|
6
6
|
exports.formatDomindsNoteTellaskForTeammatesOnly = formatDomindsNoteTellaskForTeammatesOnly;
|
|
7
7
|
exports.formatDomindsNoteQ4HRegisterFailed = formatDomindsNoteQ4HRegisterFailed;
|
|
8
|
-
exports.
|
|
8
|
+
exports.formatAgentFacingContextHealthV3RemediationGuide = formatAgentFacingContextHealthV3RemediationGuide;
|
|
9
9
|
exports.formatDomindsNoteTellaskerOnlyInSidelineDialog = formatDomindsNoteTellaskerOnlyInSidelineDialog;
|
|
10
10
|
exports.formatDomindsNoteTellaskerNoTellaskSession = formatDomindsNoteTellaskerNoTellaskSession;
|
|
11
11
|
exports.formatDomindsNoteDirectSelfCall = formatDomindsNoteDirectSelfCall;
|
|
@@ -16,7 +16,7 @@ exports.formatDomindsNoteInvalidMultiTeammateTargets = formatDomindsNoteInvalidM
|
|
|
16
16
|
exports.formatDomindsNoteInvalidTellaskSessionDirective = formatDomindsNoteInvalidTellaskSessionDirective;
|
|
17
17
|
exports.formatDomindsNoteMultipleTellaskSessionDirectives = formatDomindsNoteMultipleTellaskSessionDirectives;
|
|
18
18
|
const language_1 = require("../types/language");
|
|
19
|
-
function
|
|
19
|
+
function formatCurrentUserLanguagePreference(workingLanguage, uiLanguage) {
|
|
20
20
|
const uiName = (0, language_1.formatLanguageName)(uiLanguage, workingLanguage);
|
|
21
21
|
const workingName = (0, language_1.formatLanguageName)(workingLanguage, workingLanguage);
|
|
22
22
|
if (workingLanguage === 'zh') {
|
|
@@ -152,7 +152,7 @@ function formatDomindsNoteQ4HRegisterFailed(language, args) {
|
|
|
152
152
|
`- Reason: ${error}\n` +
|
|
153
153
|
`- Next: retry; if this keeps failing, delete the dialog's \`q4h.yaml\` (will drop pending questions) or check server logs.`);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
|
|
156
156
|
if (language === 'zh') {
|
|
157
157
|
if (args.kind === 'caution' && args.mode === 'soft') {
|
|
158
158
|
return [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aV as isObjectLike, br as baseGetTag, aE as isArray, aT as Symbol$1, bs as arrayLikeKeys, bt as baseKeys, aD as isArrayLike, bu as memoize, bv as isArguments, bw as MapCache, bm as eq, bx as Uint8Array, aW as getTag, a$ as isBuffer, b2 as Stack, by as isTypedArray, aZ as isObject, bz as isLength, bp as isIndex, aF as identity, bn as baseFor, bA as Set } from "./index-
|
|
1
|
+
import { aV as isObjectLike, br as baseGetTag, aE as isArray, aT as Symbol$1, bs as arrayLikeKeys, bt as baseKeys, aD as isArrayLike, bu as memoize, bv as isArguments, bw as MapCache, bm as eq, bx as Uint8Array, aW as getTag, a$ as isBuffer, b2 as Stack, by as isTypedArray, aZ as isObject, bz as isLength, bp as isIndex, aF as identity, bn as baseFor, bA as Set } from "./index-CUZD-Ua6.js";
|
|
2
2
|
var symbolTag$1 = "[object Symbol]";
|
|
3
3
|
function isSymbol(value) {
|
|
4
4
|
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
|
|
@@ -658,4 +658,4 @@ export {
|
|
|
658
658
|
hasIn as x,
|
|
659
659
|
toString as y
|
|
660
660
|
};
|
|
661
|
-
//# sourceMappingURL=_baseUniq-
|
|
661
|
+
//# sourceMappingURL=_baseUniq-2IQvcpiv.js.map
|