dominds 1.23.0 → 1.23.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/dist/access-control.js +4 -4
- package/dist/cli/webui.js +8 -1
- package/dist/dialog-display-state.d.ts +1 -0
- package/dist/dialog-display-state.js +36 -4
- package/dist/docs/encapsulated-taskdoc.md +11 -8
- package/dist/docs/encapsulated-taskdoc.zh.md +12 -9
- package/dist/llm/defaults.yaml +3 -0
- package/dist/llm/gen/mock.js +3 -6
- package/dist/llm/kernel-driver/flow.js +11 -13
- package/dist/llm/kernel-driver/loop.js +3 -1
- package/dist/llm/kernel-driver/reply-guidance.js +3 -7
- package/dist/llm/kernel-driver/types.d.ts +1 -0
- package/dist/minds/minds-i18n.js +2 -2
- package/dist/minds/system-prompt-parts.js +8 -8
- package/dist/persistence.js +1 -0
- package/dist/recovery/proceeding-drive.d.ts +1 -0
- package/dist/recovery/proceeding-drive.js +89 -0
- package/dist/runtime/driver-messages.js +4 -4
- package/dist/runtime/reply-prompt-copy.d.ts +5 -1
- package/dist/runtime/reply-prompt-copy.js +13 -3
- package/dist/server.d.ts +1 -0
- package/dist/server.js +68 -14
- package/dist/tools/cmd-runner.js +76 -17
- package/dist/tools/ctrl.d.ts +1 -1
- package/dist/tools/ctrl.js +29 -27
- package/dist/tools/prompts/control/en/principles.md +2 -2
- package/dist/tools/prompts/control/en/scenarios.md +25 -4
- package/dist/tools/prompts/control/en/tools.md +17 -8
- package/dist/tools/prompts/control/zh/principles.md +2 -2
- package/dist/tools/prompts/control/zh/scenarios.md +25 -4
- package/dist/tools/prompts/control/zh/tools.md +17 -8
- package/dist/utils/task-package.d.ts +1 -1
- package/dist/utils/task-package.js +3 -4
- package/dist/utils/taskdoc.js +18 -23
- package/package.json +1 -1
- package/webapp/dist/assets/{_basePickBy-CGhMqD96.js → _basePickBy-C3SVVywm.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-CGhMqD96.js.map → _basePickBy-C3SVVywm.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-XCMW7z1Y.js → _baseUniq-egNq6cCa.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-XCMW7z1Y.js.map → _baseUniq-egNq6cCa.js.map} +1 -1
- package/webapp/dist/assets/{arc-B6fzk0T5.js → arc-CASAlRvm.js} +2 -2
- package/webapp/dist/assets/{arc-B6fzk0T5.js.map → arc-CASAlRvm.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DmSI_GUt.js → architectureDiagram-2XIMDMQ5-B6n5FQmS.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DmSI_GUt.js.map → architectureDiagram-2XIMDMQ5-B6n5FQmS.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-Bp0nb8IZ.js → blockDiagram-WCTKOSBZ-D2UGGjic.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-Bp0nb8IZ.js.map → blockDiagram-WCTKOSBZ-D2UGGjic.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-gYpylqGb.js → c4Diagram-IC4MRINW-BOY_bQFP.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-gYpylqGb.js.map → c4Diagram-IC4MRINW-BOY_bQFP.js.map} +1 -1
- package/webapp/dist/assets/{channel-BmQ3YyUn.js → channel-CZ_X09H1.js} +2 -2
- package/webapp/dist/assets/{channel-BmQ3YyUn.js.map → channel-CZ_X09H1.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-B5pwFRwA.js → chunk-4BX2VUAB-BIwyAzZQ.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-B5pwFRwA.js.map → chunk-4BX2VUAB-BIwyAzZQ.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-CZf6oMWM.js → chunk-55IACEB6-zSjTFoCX.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-CZf6oMWM.js.map → chunk-55IACEB6-zSjTFoCX.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-yZWCDzVz.js → chunk-FMBD7UC4-CTpuRfdB.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-yZWCDzVz.js.map → chunk-FMBD7UC4-CTpuRfdB.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-Cg1ST73M.js → chunk-JSJVCQXG-CJ3DM4in.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-Cg1ST73M.js.map → chunk-JSJVCQXG-CJ3DM4in.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-ByGtlX9q.js → chunk-KX2RTZJC-B97EakhO.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-ByGtlX9q.js.map → chunk-KX2RTZJC-B97EakhO.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DoXvfhSY.js → chunk-NQ4KR5QH-5o1o5x0z.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DoXvfhSY.js.map → chunk-NQ4KR5QH-5o1o5x0z.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-2gX2qsHB.js → chunk-QZHKN3VN-D33FSIEb.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-2gX2qsHB.js.map → chunk-QZHKN3VN-D33FSIEb.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-L-9bPNxS.js → chunk-WL4C6EOR-C2InqFin.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-L-9bPNxS.js.map → chunk-WL4C6EOR-C2InqFin.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-B79Oe3Df.js → classDiagram-VBA2DB6C-BfLZmK48.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-B79Oe3Df.js.map → classDiagram-VBA2DB6C-BfLZmK48.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-B79Oe3Df.js → classDiagram-v2-RAHNMMFH-BfLZmK48.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-B79Oe3Df.js.map → classDiagram-v2-RAHNMMFH-BfLZmK48.js.map} +1 -1
- package/webapp/dist/assets/{clone-DvlY9Sdn.js → clone-BSCHnHfl.js} +2 -2
- package/webapp/dist/assets/{clone-DvlY9Sdn.js.map → clone-BSCHnHfl.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CtkGd0W6.js → cose-bilkent-S5V4N54A-CeQ1jAJJ.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CtkGd0W6.js.map → cose-bilkent-S5V4N54A-CeQ1jAJJ.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-B3W6QTXQ.js → dagre-KLK3FWXG-WUuNYzcK.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-B3W6QTXQ.js.map → dagre-KLK3FWXG-WUuNYzcK.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-B6-J_E5Q.js → diagram-E7M64L7V-jOVCIExP.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-B6-J_E5Q.js.map → diagram-E7M64L7V-jOVCIExP.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-C-PH_Yx3.js → diagram-IFDJBPK2-cCeQqotA.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-C-PH_Yx3.js.map → diagram-IFDJBPK2-cCeQqotA.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-CB5xXDup.js → diagram-P4PSJMXO-DjAYFRLv.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-CB5xXDup.js.map → diagram-P4PSJMXO-DjAYFRLv.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-CuAhTGVU.js → erDiagram-INFDFZHY-Dl_6U5fV.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-CuAhTGVU.js.map → erDiagram-INFDFZHY-Dl_6U5fV.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-D3cIOfGj.js → flowDiagram-PKNHOUZH-D80nrZ3S.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-D3cIOfGj.js.map → flowDiagram-PKNHOUZH-D80nrZ3S.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-CSFhVYXV.js → ganttDiagram-A5KZAMGK-T3WdMrgj.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-CSFhVYXV.js.map → ganttDiagram-A5KZAMGK-T3WdMrgj.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CiEaxACG.js → gitGraphDiagram-K3NZZRJ6-ifV-jkKL.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CiEaxACG.js.map → gitGraphDiagram-K3NZZRJ6-ifV-jkKL.js.map} +1 -1
- package/webapp/dist/assets/{graph-CYGALRuy.js → graph-D5jmnb35.js} +3 -3
- package/webapp/dist/assets/{graph-CYGALRuy.js.map → graph-D5jmnb35.js.map} +1 -1
- package/webapp/dist/assets/{index-BTazqQrV.js → index-CGbZlct2.js} +503 -142
- package/webapp/dist/assets/{index-BTazqQrV.js.map → index-CGbZlct2.js.map} +1 -1
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-CiWJjQyU.js → infoDiagram-LFFYTUFH-C340CY5x.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-CiWJjQyU.js.map → infoDiagram-LFFYTUFH-C340CY5x.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-MlIIUO7o.js → ishikawaDiagram-PHBUUO56-Bu4RsELK.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-MlIIUO7o.js.map → ishikawaDiagram-PHBUUO56-Bu4RsELK.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BBqwkA3d.js → journeyDiagram-4ABVD52K-Dvv3ypKA.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BBqwkA3d.js.map → journeyDiagram-4ABVD52K-Dvv3ypKA.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BS4GzDbo.js → kanban-definition-K7BYSVSG-D_rsetjW.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BS4GzDbo.js.map → kanban-definition-K7BYSVSG-D_rsetjW.js.map} +1 -1
- package/webapp/dist/assets/{layout-DaJO-1DW.js → layout-CLmOfwnS.js} +5 -5
- package/webapp/dist/assets/{layout-DaJO-1DW.js.map → layout-CLmOfwnS.js.map} +1 -1
- package/webapp/dist/assets/{linear-SWy2Cl7G.js → linear-DFAmViqi.js} +2 -2
- package/webapp/dist/assets/{linear-SWy2Cl7G.js.map → linear-DFAmViqi.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-B_gNrT3l.js → mindmap-definition-YRQLILUH-Ce3_czeS.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-B_gNrT3l.js.map → mindmap-definition-YRQLILUH-Ce3_czeS.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-CVh3lLBA.js → pieDiagram-SKSYHLDU-U6_un5Sc.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-CVh3lLBA.js.map → pieDiagram-SKSYHLDU-U6_un5Sc.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-D0zAkVD7.js → quadrantDiagram-337W2JSQ-DmVJQItS.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-D0zAkVD7.js.map → quadrantDiagram-337W2JSQ-DmVJQItS.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP--CTFD60w.js → requirementDiagram-Z7DCOOCP-BkNhSY-g.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP--CTFD60w.js.map → requirementDiagram-Z7DCOOCP-BkNhSY-g.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-XZnViaAX.js → sankeyDiagram-WA2Y5GQK-E3UEy5SX.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-XZnViaAX.js.map → sankeyDiagram-WA2Y5GQK-E3UEy5SX.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-BWAMhn_x.js → sequenceDiagram-2WXFIKYE-k0w9WKAO.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-BWAMhn_x.js.map → sequenceDiagram-2WXFIKYE-k0w9WKAO.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D--jsLD0Dg.js → stateDiagram-RAJIS63D-DRgdJrlx.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D--jsLD0Dg.js.map → stateDiagram-RAJIS63D-DRgdJrlx.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-DUG9vyI5.js → stateDiagram-v2-FVOUBMTO-edtkX9x6.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-DUG9vyI5.js.map → stateDiagram-v2-FVOUBMTO-edtkX9x6.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-BROLp1hL.js → timeline-definition-YZTLITO2-D0zyXyNL.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-BROLp1hL.js.map → timeline-definition-YZTLITO2-D0zyXyNL.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-BXuIlbYo.js → treemap-KZPCXAKY-CglsYqbQ.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-BXuIlbYo.js.map → treemap-KZPCXAKY-CglsYqbQ.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-BXWd8gBB.js → vennDiagram-LZ73GAT5-DsUizzvt.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-BXWd8gBB.js.map → vennDiagram-LZ73GAT5-DsUizzvt.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DR5z9o6h.js → xychartDiagram-JWTSCODW-DvYQ4zKY.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DR5z9o6h.js.map → xychartDiagram-JWTSCODW-DvYQ4zKY.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
package/dist/access-control.js
CHANGED
|
@@ -311,13 +311,13 @@ function getAccessDeniedMessage(operation, targetPath, language = 'en') {
|
|
|
311
311
|
lines.push('');
|
|
312
312
|
if (language === 'zh') {
|
|
313
313
|
lines.push(`- 说明:\`*.tsk/\` 是封装差遣牒。通用文件工具无法读/写/列目录/删除其中内容(硬编码无条件拒绝)。`);
|
|
314
|
-
lines.push(`- 提示:新增章节请使用 \`do_mind\`;少量追加请使用 \`mind_more\`(默认 progress:\`mind_more({\"items\":[\"...\"]})
|
|
315
|
-
lines.push(`-
|
|
314
|
+
lines.push(`- 提示:新增章节请使用 \`do_mind\`;少量追加请使用 \`mind_more\`(默认 progress:\`mind_more({\"items\":[\"...\"]})\`);改写已有整章请先用 \`recall_taskdoc\` 取得当前内容哈希,再使用带 \`previous_content_hash\` 的 \`change_mind\`(顶层示例:先 \`recall_taskdoc({\"selector\":\"progress\"})\`,再 \`change_mind({\"selector\":\"progress\",\"content\":\"...\",\"previous_content_hash\":\"crc32:...\"})\`;额外章节:先 \`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`,再 \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\",\"previous_content_hash\":\"crc32:...\"})\`)。`);
|
|
315
|
+
lines.push(`- 提示:读取章节或取得 content_hash 请使用函数工具 \`recall_taskdoc\`:顶层 \`recall_taskdoc({\"selector\":\"progress\"})\`;额外章节 \`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`。`);
|
|
316
316
|
}
|
|
317
317
|
else {
|
|
318
318
|
lines.push(`- Note: \`*.tsk/\` is an encapsulated Taskdoc. It is hard-denied for all general file tools.`);
|
|
319
|
-
lines.push(`- Hint: To create a section, use \`do_mind\`; for small append-only updates, use \`mind_more\` (defaults to progress: \`mind_more({\"items\":[\"...\"]})\`); for full-section replacements,
|
|
320
|
-
lines.push(`- Hint: To read
|
|
319
|
+
lines.push(`- Hint: To create a section, use \`do_mind\`; for small append-only updates, use \`mind_more\` (defaults to progress: \`mind_more({\"items\":[\"...\"]})\`); for full-section replacements, call \`recall_taskdoc\` for the current content hash first, then use \`change_mind\` with \`previous_content_hash\` (top-level example: first \`recall_taskdoc({\"selector\":\"progress\"})\`, then \`change_mind({\"selector\":\"progress\",\"content\":\"...\",\"previous_content_hash\":\"crc32:...\"})\`; extra sections: first \`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`, then \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\",\"previous_content_hash\":\"crc32:...\"})\`).`);
|
|
320
|
+
lines.push(`- Hint: To read a section or get content_hash, use \`recall_taskdoc\`: top-level \`recall_taskdoc({\"selector\":\"progress\"})\`; extra section \`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`.`);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
if (isMindsPath(targetPath)) {
|
package/dist/cli/webui.js
CHANGED
|
@@ -134,7 +134,14 @@ async function main() {
|
|
|
134
134
|
const { language: resolvedLanguage, source } = (0, work_language_1.resolveWorkLanguage)({ env: process.env });
|
|
135
135
|
(0, work_language_1.setWorkLanguage)(resolvedLanguage);
|
|
136
136
|
log.info(`working language: ${(0, work_language_1.getWorkLanguage)()} (source: ${source})`);
|
|
137
|
-
const started = await (0, server_1.startServer)({
|
|
137
|
+
const started = await (0, server_1.startServer)({
|
|
138
|
+
port,
|
|
139
|
+
host,
|
|
140
|
+
mode,
|
|
141
|
+
strictPort,
|
|
142
|
+
portAutoDirection,
|
|
143
|
+
returnAfterListen: true,
|
|
144
|
+
});
|
|
138
145
|
const httpServer = started.httpServer;
|
|
139
146
|
const auth = started.auth;
|
|
140
147
|
const baseUrl = `http://${started.host}:${started.port}`;
|
|
@@ -52,6 +52,7 @@ export declare function broadcastDisplayStateMarker(dialogId: DialogID, marker:
|
|
|
52
52
|
}): void;
|
|
53
53
|
export declare function computeIdleDisplayState(dlg: Dialog): Promise<DialogDisplayState>;
|
|
54
54
|
export declare function refreshRunControlProjectionFromPersistenceFacts(dialogId: DialogID, trigger: 'resume_dialog' | 'resume_all' | 'run_control_snapshot' | 'pending_sideDialogs_changed' | 'q4h_changed'): Promise<DialogLatestFile | null>;
|
|
55
|
+
export declare function isRecoverableGeneratingLatest(latest: DialogLatestFile | null): boolean;
|
|
55
56
|
export declare function reconcileDisplayStatesAfterRestart(): Promise<void>;
|
|
56
57
|
export declare function requestInterruptDialog(dialogId: DialogID, reason: StopRequestedReason): Promise<{
|
|
57
58
|
applied: boolean;
|
|
@@ -40,6 +40,7 @@ exports.setDialogDisplayState = setDialogDisplayState;
|
|
|
40
40
|
exports.broadcastDisplayStateMarker = broadcastDisplayStateMarker;
|
|
41
41
|
exports.computeIdleDisplayState = computeIdleDisplayState;
|
|
42
42
|
exports.refreshRunControlProjectionFromPersistenceFacts = refreshRunControlProjectionFromPersistenceFacts;
|
|
43
|
+
exports.isRecoverableGeneratingLatest = isRecoverableGeneratingLatest;
|
|
43
44
|
exports.reconcileDisplayStatesAfterRestart = reconcileDisplayStatesAfterRestart;
|
|
44
45
|
exports.requestInterruptDialog = requestInterruptDialog;
|
|
45
46
|
exports.requestEmergencyStopAll = requestEmergencyStopAll;
|
|
@@ -580,6 +581,19 @@ async function computeIdleDisplayStateForReconciliation(dialogId) {
|
|
|
580
581
|
return null;
|
|
581
582
|
}
|
|
582
583
|
}
|
|
584
|
+
function isRecoverableGeneratingLatest(latest) {
|
|
585
|
+
if (latest?.generating !== true) {
|
|
586
|
+
return false;
|
|
587
|
+
}
|
|
588
|
+
const marker = latest.executionMarker;
|
|
589
|
+
if (!marker) {
|
|
590
|
+
return true;
|
|
591
|
+
}
|
|
592
|
+
if (marker.kind === 'dead') {
|
|
593
|
+
return false;
|
|
594
|
+
}
|
|
595
|
+
return marker.kind !== 'interrupted' || marker.reason.kind === 'pending_course_start';
|
|
596
|
+
}
|
|
583
597
|
async function reconcileDisplayStatesAfterRestart() {
|
|
584
598
|
const dialogIds = await persistence_1.DialogPersistence.listAllDialogIds('running');
|
|
585
599
|
for (const dialogId of dialogIds) {
|
|
@@ -618,10 +632,28 @@ async function reconcileDisplayStatesAfterRestart() {
|
|
|
618
632
|
}
|
|
619
633
|
continue;
|
|
620
634
|
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
(
|
|
624
|
-
|
|
635
|
+
if (isRecoverableGeneratingLatest(latest)) {
|
|
636
|
+
try {
|
|
637
|
+
await persistence_1.DialogPersistence.mutateDialogLatest(dialogId, () => ({
|
|
638
|
+
kind: 'patch',
|
|
639
|
+
patch: {
|
|
640
|
+
needsDrive: true,
|
|
641
|
+
displayState: { kind: 'proceeding' },
|
|
642
|
+
executionMarker: existingMarker?.kind === 'interrupted' &&
|
|
643
|
+
existingMarker.reason.kind === 'pending_course_start'
|
|
644
|
+
? undefined
|
|
645
|
+
: existingMarker,
|
|
646
|
+
},
|
|
647
|
+
}));
|
|
648
|
+
}
|
|
649
|
+
catch (err) {
|
|
650
|
+
log.warn('Failed to preserve proceeding dialog for auto-drive after restart', err, {
|
|
651
|
+
dialogId: dialogId.valueOf(),
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
656
|
+
if (latest?.generating === true || latest?.needsDrive === true) {
|
|
625
657
|
const nextIdle = await computeIdleDisplayStateForReconciliation(dialogId);
|
|
626
658
|
if (!nextIdle) {
|
|
627
659
|
continue;
|
|
@@ -149,7 +149,7 @@ Below is the canonical copy. If you need to rephrase it for UI layout, you MUST
|
|
|
149
149
|
|
|
150
150
|
- Any `.tsk/` directory and its subpaths (`**/*.tsk/**`) are encapsulated state: general file tools MUST NOT read/write/list them (e.g. `read_file` / `write_file` / `list_dir`).
|
|
151
151
|
- Taskdoc updates MUST go through explicit Taskdoc function tools: `do_mind` creates a new section, `mind_more` appends small entries to an existing section, `change_mind` replaces an existing section, and `never_mind` deletes a section.
|
|
152
|
-
- To read
|
|
152
|
+
- To read any Taskdoc section or get its `content_hash`, use the function tool `recall_taskdoc({ selector, category? })`.
|
|
153
153
|
|
|
154
154
|
**Taskdoc auto-injection rules (system prompt)**
|
|
155
155
|
|
|
@@ -219,25 +219,25 @@ Hard prohibitions:
|
|
|
219
219
|
- `contracts|acceptance|grants|runbook|decisions|risks` MUST NOT be written outside `category="bearinmind"`.
|
|
220
220
|
- No other category is auto-injected into the system prompt (only an index may be shown).
|
|
221
221
|
|
|
222
|
-
`previous_content_hash` is the `
|
|
222
|
+
`previous_content_hash` is the `crc32:...` checksum of the current section content after Dominds' canonical Markdown file-ending normalization. It is not stored as extra state.
|
|
223
223
|
|
|
224
|
-
- For
|
|
225
|
-
- For non-auto-injected sections, call `recall_taskdoc({ category, selector })`; its result includes `content_hash`.
|
|
224
|
+
- For top-level sections (`goals`, `constraints`, `progress`), call `recall_taskdoc({ selector })`; its result includes `content_hash`.
|
|
225
|
+
- For extra non-auto-injected sections, call `recall_taskdoc({ category, selector })`; its result includes `content_hash`.
|
|
226
226
|
- On hash mismatch, the write MUST fail. The agent must re-read/review the current section and retry only after fully merging existing content.
|
|
227
227
|
- If the proposed replacement would overwrite, delete, or materially replace existing content, the agent must have either direct human confirmation for that replacement, or a human-approved explicit SOP/acceptance standard that authorizes the replacement after considering the existing content.
|
|
228
228
|
|
|
229
|
-
### `recall_taskdoc` (read-only; for
|
|
229
|
+
### `recall_taskdoc` (read-only; for Taskdoc sections and content_hash)
|
|
230
230
|
|
|
231
231
|
Because general file tools cannot read anything under `*.tsk/`, Dominds provides a dedicated read tool:
|
|
232
232
|
|
|
233
233
|
```
|
|
234
|
-
recall_taskdoc({
|
|
234
|
+
recall_taskdoc({ selector, category? })
|
|
235
235
|
```
|
|
236
236
|
|
|
237
237
|
Behavior:
|
|
238
238
|
|
|
239
239
|
- Reads `bearinmind/<whitelisted>.md` or `<category>/<selector>.md`.
|
|
240
|
-
- The top-level three sections (`goals` / `constraints` / `progress`) are
|
|
240
|
+
- The top-level three sections (`goals` / `constraints` / `progress`) are auto-injected as content, but their `content_hash` is only returned by `recall_taskdoc`.
|
|
241
241
|
- Returns the section `content_hash` for use as `change_mind.previous_content_hash`.
|
|
242
242
|
|
|
243
243
|
Example (bearinmind):
|
|
@@ -257,8 +257,11 @@ Call the function tool `recall_taskdoc` with:
|
|
|
257
257
|
Example:
|
|
258
258
|
|
|
259
259
|
```text
|
|
260
|
+
Call the function tool `recall_taskdoc` with:
|
|
261
|
+
{ "selector": "constraints" }
|
|
262
|
+
|
|
260
263
|
Call the function tool `change_mind` with:
|
|
261
|
-
{ "selector": "constraints", "content": "- MUST not browse the web.\n- MUST keep responses under 10 lines unless asked otherwise.\n", "previous_content_hash": "
|
|
264
|
+
{ "selector": "constraints", "content": "- MUST not browse the web.\n- MUST keep responses under 10 lines unless asked otherwise.\n", "previous_content_hash": "crc32:..." }
|
|
262
265
|
```
|
|
263
266
|
|
|
264
267
|
### Behavioral rules
|
|
@@ -148,7 +148,7 @@ Dominds 必须从任务包构造一个**有效差遣牒**用于提示词和 UI
|
|
|
148
148
|
|
|
149
149
|
- 任何 `.tsk/` 目录及其子路径(`**/*.tsk/**`)都是封装状态:禁止使用任何通用文件工具读取/写入/列目录(例如 `read_file` / `write_file` / `list_dir` 等)。
|
|
150
150
|
- 更新差遣牒只能使用显式差遣牒函数工具:`do_mind` 创建新章节,`mind_more` 向已有章节追加少量条目,`change_mind` 替换已有章节,`never_mind` 删除章节。
|
|
151
|
-
-
|
|
151
|
+
- 读取任意差遣牒章节或取得其 `content_hash`,只能使用函数工具 `recall_taskdoc({ selector, category? })`。
|
|
152
152
|
|
|
153
153
|
**差遣牒自动注入规则(系统提示)**
|
|
154
154
|
|
|
@@ -164,7 +164,7 @@ Dominds 必须从任务包构造一个**有效差遣牒**用于提示词和 UI
|
|
|
164
164
|
|
|
165
165
|
- Any `.tsk/` directory and its subpaths (`**/*.tsk/**`) are encapsulated state: general file tools MUST NOT read/write/list them (e.g. `read_file` / `write_file` / `list_dir`).
|
|
166
166
|
- Taskdoc updates MUST go through explicit Taskdoc function tools: `do_mind` creates a new section, `mind_more` appends small entries to an existing section, `change_mind` replaces an existing section, and `never_mind` deletes a section.
|
|
167
|
-
- To read
|
|
167
|
+
- To read any Taskdoc section or get its `content_hash`, use the function tool `recall_taskdoc({ selector, category? })`.
|
|
168
168
|
|
|
169
169
|
**Taskdoc auto-injection rules (system prompt)**
|
|
170
170
|
|
|
@@ -230,25 +230,25 @@ Dominds 必须从任务包构造一个**有效差遣牒**用于提示词和 UI
|
|
|
230
230
|
- `contracts|acceptance|grants|runbook|decisions|risks` 不得在 `category="bearinmind"` 之外编写。
|
|
231
231
|
- 没有其他类别会自动注入系统提示(只会显示一个索引)。
|
|
232
232
|
|
|
233
|
-
`previous_content_hash` 是当前章节内容在 Dominds 规范化 Markdown 文件结尾之后得到的 `
|
|
233
|
+
`previous_content_hash` 是当前章节内容在 Dominds 规范化 Markdown 文件结尾之后得到的 `crc32:...` 校验值;它不是额外持久状态。
|
|
234
234
|
|
|
235
|
-
-
|
|
236
|
-
-
|
|
235
|
+
- 顶层章节(`goals`、`constraints`、`progress`)需要调用 `recall_taskdoc({ selector })`;返回结果会包含 `content_hash`。
|
|
236
|
+
- 额外非自动注入章节需要调用 `recall_taskdoc({ category, selector })`;返回结果会包含 `content_hash`。
|
|
237
237
|
- 哈希不匹配时写入必须失败。智能体必须重新读取/回顾当前章节,并且只在充分合并原有内容后重试。
|
|
238
238
|
- 如果拟替换内容会冲掉、删除或实质替换原有内容,智能体必须已获得该替换的直接人类确认,或存在人类认可的明确 SOP/验收标准,并且已按该标准考虑过原有内容。
|
|
239
239
|
|
|
240
|
-
### `recall_taskdoc
|
|
240
|
+
### `recall_taskdoc`(只读;用于差遣牒章节与 content_hash)
|
|
241
241
|
|
|
242
242
|
因为通用文件工具无法读取 `*.tsk/` 下的任何内容,Dominds 提供了一个专门的读取工具:
|
|
243
243
|
|
|
244
244
|
```
|
|
245
|
-
recall_taskdoc({
|
|
245
|
+
recall_taskdoc({ selector, category? })
|
|
246
246
|
```
|
|
247
247
|
|
|
248
248
|
行为:
|
|
249
249
|
|
|
250
250
|
- 读取 `bearinmind/<whitelisted>.md` 或 `<category>/<selector>.md`。
|
|
251
|
-
- 顶层三段(`goals` / `constraints` / `progress
|
|
251
|
+
- 顶层三段(`goals` / `constraints` / `progress`)会自动注入正文,但其 `content_hash` 只通过 `recall_taskdoc` 返回。
|
|
252
252
|
- 返回章节 `content_hash`,供 `change_mind.previous_content_hash` 使用。
|
|
253
253
|
|
|
254
254
|
示例(bearinmind):
|
|
@@ -268,8 +268,11 @@ recall_taskdoc({ category, selector })
|
|
|
268
268
|
示例:
|
|
269
269
|
|
|
270
270
|
```text
|
|
271
|
+
使用函数工具 `recall_taskdoc` 调用:
|
|
272
|
+
{ "selector": "constraints" }
|
|
273
|
+
|
|
271
274
|
使用函数工具 `change_mind` 调用:
|
|
272
|
-
{ "selector": "constraints", "content": "- MUST not browse the web.\n- MUST keep responses under 10 lines unless asked otherwise.\n" }
|
|
275
|
+
{ "selector": "constraints", "content": "- MUST not browse the web.\n- MUST keep responses under 10 lines unless asked otherwise.\n", "previous_content_hash": "crc32:..." }
|
|
273
276
|
```
|
|
274
277
|
|
|
275
278
|
### 行为规则
|
package/dist/llm/defaults.yaml
CHANGED
|
@@ -484,6 +484,7 @@ providers:
|
|
|
484
484
|
models:
|
|
485
485
|
kimi-for-coding:
|
|
486
486
|
name: Kimi For Coding
|
|
487
|
+
optimal_max_tokens: 180000
|
|
487
488
|
supports_thinking: true
|
|
488
489
|
default_thinking: true
|
|
489
490
|
supports_tool_choice: false
|
|
@@ -603,6 +604,7 @@ providers:
|
|
|
603
604
|
context_window: '128K'
|
|
604
605
|
kimi-k2.6:
|
|
605
606
|
name: Kimi-K2.6
|
|
607
|
+
optimal_max_tokens: 180000
|
|
606
608
|
supports_thinking: true
|
|
607
609
|
default_thinking: true
|
|
608
610
|
supports_tool_choice: false
|
|
@@ -613,6 +615,7 @@ providers:
|
|
|
613
615
|
context_window: '200K'
|
|
614
616
|
kimi-k2.5:
|
|
615
617
|
name: Kimi-K2.5
|
|
618
|
+
optimal_max_tokens: 180000
|
|
616
619
|
supports_thinking: true
|
|
617
620
|
default_thinking: false
|
|
618
621
|
supports_tool_choice: false
|
package/dist/llm/gen/mock.js
CHANGED
|
@@ -66,13 +66,11 @@ const log_1 = require("../../log");
|
|
|
66
66
|
const reply_prompt_copy_1 = require("../../runtime/reply-prompt-copy");
|
|
67
67
|
const gen_1 = require("../gen");
|
|
68
68
|
const stop_reason_i18n_1 = require("../stop-reason-i18n");
|
|
69
|
-
const REPLY_TOOL_REMINDER_PREFIXES = [
|
|
70
|
-
'[Dominds replyTellask required]',
|
|
71
|
-
'[Dominds 必须调用回复工具]',
|
|
72
|
-
];
|
|
73
69
|
const RUNTIME_PROMPT_WRAPPER_PREFIXES = [
|
|
74
70
|
reply_prompt_copy_1.ACTIVE_REPLY_TOOL_PREFIX_EN,
|
|
75
71
|
reply_prompt_copy_1.ACTIVE_REPLY_TOOL_PREFIX_ZH,
|
|
72
|
+
reply_prompt_copy_1.NO_ACTIVE_REPLY_PREFIX_EN,
|
|
73
|
+
reply_prompt_copy_1.NO_ACTIVE_REPLY_PREFIX_ZH,
|
|
76
74
|
reply_prompt_copy_1.REPLY_REASSERTION_PREFIX_EN,
|
|
77
75
|
reply_prompt_copy_1.REPLY_REASSERTION_PREFIX_ZH,
|
|
78
76
|
reply_prompt_copy_1.REPLY_SUPPRESSION_PREFIX_EN,
|
|
@@ -277,8 +275,7 @@ class MockGen {
|
|
|
277
275
|
return null;
|
|
278
276
|
}
|
|
279
277
|
buildReplyToolReminderAutoResponse(input, role, context) {
|
|
280
|
-
if (role !== 'user' ||
|
|
281
|
-
!REPLY_TOOL_REMINDER_PREFIXES.some((prefix) => input.startsWith(prefix))) {
|
|
278
|
+
if (role !== 'user' || !(0, reply_prompt_copy_1.isReplyToolReminderPromptContent)(input)) {
|
|
282
279
|
return null;
|
|
283
280
|
}
|
|
284
281
|
const toolMatch = input.match(/`(replyTellask(?:Sessionless|Back)?)`/);
|
|
@@ -23,12 +23,8 @@ const idle_reminder_wake_1 = require("./idle-reminder-wake");
|
|
|
23
23
|
const reply_guidance_1 = require("./reply-guidance");
|
|
24
24
|
const sideDialog_1 = require("./sideDialog");
|
|
25
25
|
const tellask_special_1 = require("./tellask-special");
|
|
26
|
-
const REPLY_TOOL_REMINDER_PREFIX_EN = '[Dominds replyTellask required]';
|
|
27
|
-
const REPLY_TOOL_REMINDER_PREFIX_ZH = '[Dominds 必须调用回复工具]';
|
|
28
26
|
function isReplyToolReminderPrompt(prompt) {
|
|
29
|
-
return
|
|
30
|
-
(prompt.content.startsWith(REPLY_TOOL_REMINDER_PREFIX_EN) ||
|
|
31
|
-
prompt.content.startsWith(REPLY_TOOL_REMINDER_PREFIX_ZH)));
|
|
27
|
+
return typeof prompt?.content === 'string' && (0, reply_prompt_copy_1.isReplyToolReminderPromptContent)(prompt.content);
|
|
32
28
|
}
|
|
33
29
|
function isIgnorablePostResponseAnchorTailEvent(type) {
|
|
34
30
|
return type === 'tellask_reply_resolution_record' || type === 'gen_finish_record';
|
|
@@ -37,7 +33,6 @@ async function buildReplyToolReminderPrompt(args) {
|
|
|
37
33
|
return (0, reply_prompt_copy_1.buildReplyToolReminderText)({
|
|
38
34
|
language: args.language,
|
|
39
35
|
directive: args.directive,
|
|
40
|
-
prefix: args.language === 'zh' ? REPLY_TOOL_REMINDER_PREFIX_ZH : REPLY_TOOL_REMINDER_PREFIX_EN,
|
|
41
36
|
replyTargetAgentId: await (0, reply_guidance_1.resolveReplyTargetAgentId)({
|
|
42
37
|
dlg: args.dlg,
|
|
43
38
|
directive: args.directive,
|
|
@@ -280,6 +275,7 @@ async function inspectNoPromptSideDialogDrive(args) {
|
|
|
280
275
|
: undefined;
|
|
281
276
|
const explicitInterruptedResumeAllowed = args.driveOptions?.allowResumeFromInterrupted === true &&
|
|
282
277
|
latest?.executionMarker?.kind === 'interrupted';
|
|
278
|
+
const inProgressGenerationResumeAllowed = args.driveOptions?.resumeInProgressGeneration === true;
|
|
283
279
|
const supplyResponseParentReviveAllowed = source === 'kernel_driver_supply_response_parent_revive' &&
|
|
284
280
|
hasNoPromptSideDialogResumeEntitlement(args.dialog, args.driveOptions);
|
|
285
281
|
if (lastEvent?.type === 'tellask_anchor_record' && lastEvent.anchorRole === 'response') {
|
|
@@ -292,7 +288,9 @@ async function inspectNoPromptSideDialogDrive(args) {
|
|
|
292
288
|
lastEvent,
|
|
293
289
|
};
|
|
294
290
|
}
|
|
295
|
-
if (!explicitInterruptedResumeAllowed &&
|
|
291
|
+
if (!explicitInterruptedResumeAllowed &&
|
|
292
|
+
!inProgressGenerationResumeAllowed &&
|
|
293
|
+
!supplyResponseParentReviveAllowed) {
|
|
296
294
|
return {
|
|
297
295
|
shouldReject: true,
|
|
298
296
|
source,
|
|
@@ -578,7 +576,7 @@ async function executeDriveRound(args) {
|
|
|
578
576
|
: hasEntitledParentRevive
|
|
579
577
|
? await loadFreshSuspensionStatusFromPersistence(dialog, driveOptions)
|
|
580
578
|
: await dialog.getSuspensionStatus({
|
|
581
|
-
allowPendingSideDialogs:
|
|
579
|
+
allowPendingSideDialogs: driveOptions?.resumeInProgressGeneration === true,
|
|
582
580
|
});
|
|
583
581
|
const queuedPrompt = dialog.peekUpNext();
|
|
584
582
|
const queuedSideDialogPromptCanResume = dialog instanceof dialog_1.SideDialog && queuedPrompt !== undefined;
|
|
@@ -810,8 +808,7 @@ async function executeDriveRound(args) {
|
|
|
810
808
|
});
|
|
811
809
|
}
|
|
812
810
|
else {
|
|
813
|
-
|
|
814
|
-
if (!activePromptWasReplyToolReminder && !shouldDirectFallbackAfterParentRevive) {
|
|
811
|
+
if (!activePromptWasReplyToolReminder) {
|
|
815
812
|
const language = (0, work_language_1.getWorkLanguage)();
|
|
816
813
|
followUp =
|
|
817
814
|
sideDialogReplyTarget === undefined
|
|
@@ -846,7 +843,6 @@ async function executeDriveRound(args) {
|
|
|
846
843
|
dialogId: dialog.id.valueOf(),
|
|
847
844
|
targetCallId: activeTellaskReplyDirective.targetCallId,
|
|
848
845
|
targetOwnerDialogId: sideDialogReplyTarget?.ownerDialogId,
|
|
849
|
-
directFallbackAfterParentRevive: shouldDirectFallbackAfterParentRevive,
|
|
850
846
|
});
|
|
851
847
|
}
|
|
852
848
|
else {
|
|
@@ -1015,7 +1011,8 @@ async function executeDriveRound(args) {
|
|
|
1015
1011
|
: { skipTaskdoc: followUp.skipTaskdoc }),
|
|
1016
1012
|
};
|
|
1017
1013
|
if (followUp.kind === 'registered_assignment_update' ||
|
|
1018
|
-
followUp.kind === 'new_course_runtime_sideDialog'
|
|
1014
|
+
followUp.kind === 'new_course_runtime_sideDialog' ||
|
|
1015
|
+
followUp.kind === 'runtime_sideDialog_reply_reminder') {
|
|
1019
1016
|
const prompt = {
|
|
1020
1017
|
...runtimeCommon,
|
|
1021
1018
|
tellaskReplyDirective: followUp.tellaskReplyDirective,
|
|
@@ -1023,7 +1020,8 @@ async function executeDriveRound(args) {
|
|
|
1023
1020
|
};
|
|
1024
1021
|
return prompt;
|
|
1025
1022
|
}
|
|
1026
|
-
if (followUp.kind === 'new_course_runtime_reply'
|
|
1023
|
+
if (followUp.kind === 'new_course_runtime_reply' ||
|
|
1024
|
+
followUp.kind === 'runtime_reply_reminder') {
|
|
1027
1025
|
const prompt = {
|
|
1028
1026
|
...runtimeCommon,
|
|
1029
1027
|
tellaskReplyDirective: followUp.tellaskReplyDirective,
|
|
@@ -46,12 +46,14 @@ async function driveQueuedDialogsOnce() {
|
|
|
46
46
|
dialog_global_registry_1.globalDialogRegistry.noteActiveRunBlockedQueuedDrive(mainDialog.id.rootId);
|
|
47
47
|
continue;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
const resumeInProgressGeneration = latest?.generating === true;
|
|
50
|
+
if (!resumeInProgressGeneration && !(await mainDialog.canDrive())) {
|
|
50
51
|
continue;
|
|
51
52
|
}
|
|
52
53
|
await (0, engine_1.driveDialogStream)(mainDialog, undefined, true, {
|
|
53
54
|
source: 'kernel_driver_backend_loop',
|
|
54
55
|
reason: 'global_dialog_registry_needs_drive',
|
|
56
|
+
...(resumeInProgressGeneration ? { resumeInProgressGeneration: true } : {}),
|
|
55
57
|
});
|
|
56
58
|
const status = await mainDialog.getSuspensionStatus();
|
|
57
59
|
const shouldStayQueued = mainDialog.hasUpNext() || !status.canDrive;
|
|
@@ -11,8 +11,6 @@ const interjection_pause_stop_1 = require("../../runtime/interjection-pause-stop
|
|
|
11
11
|
const reply_prompt_copy_1 = require("../../runtime/reply-prompt-copy");
|
|
12
12
|
const work_language_1 = require("../../runtime/work-language");
|
|
13
13
|
const tellask_special_1 = require("./tellask-special");
|
|
14
|
-
const REPLY_TOOL_REMINDER_PREFIX_EN = '[Dominds replyTellask required]';
|
|
15
|
-
const REPLY_TOOL_REMINDER_PREFIX_ZH = '[Dominds 必须调用回复工具]';
|
|
16
14
|
async function resolveReplyTargetAgentId(args) {
|
|
17
15
|
const mainDialog = args.dlg instanceof dialog_1.MainDialog
|
|
18
16
|
? args.dlg
|
|
@@ -30,13 +28,11 @@ async function resolveReplyTargetAgentId(args) {
|
|
|
30
28
|
function buildPromptContentWithExactReplyToolName(args) {
|
|
31
29
|
const isFbrSideDialog = args.dlg instanceof dialog_1.SideDialog &&
|
|
32
30
|
args.dlg.assignmentFromAsker.callName === 'freshBootsReasoning';
|
|
33
|
-
const noActivePrefix = args.language === 'zh'
|
|
34
|
-
? '[Dominds 当前无跨对话回复义务]'
|
|
35
|
-
: '[Dominds no active inter-dialog reply]';
|
|
31
|
+
const noActivePrefix = args.language === 'zh' ? reply_prompt_copy_1.NO_ACTIVE_REPLY_PREFIX_ZH : reply_prompt_copy_1.NO_ACTIVE_REPLY_PREFIX_EN;
|
|
36
32
|
const activePrefix = args.language === 'zh' ? reply_prompt_copy_1.ACTIVE_REPLY_TOOL_PREFIX_ZH : reply_prompt_copy_1.ACTIVE_REPLY_TOOL_PREFIX_EN;
|
|
37
33
|
const reminderPrefixes = [
|
|
38
|
-
REPLY_TOOL_REMINDER_PREFIX_EN,
|
|
39
|
-
REPLY_TOOL_REMINDER_PREFIX_ZH,
|
|
34
|
+
reply_prompt_copy_1.REPLY_TOOL_REMINDER_PREFIX_EN,
|
|
35
|
+
reply_prompt_copy_1.REPLY_TOOL_REMINDER_PREFIX_ZH,
|
|
40
36
|
reply_prompt_copy_1.REPLY_REASSERTION_PREFIX_EN,
|
|
41
37
|
reply_prompt_copy_1.REPLY_REASSERTION_PREFIX_ZH,
|
|
42
38
|
];
|
|
@@ -7,6 +7,7 @@ export type KernelDriverDriveSource = 'unspecified' | 'ws_user_message' | 'ws_us
|
|
|
7
7
|
export type KernelDriverDriveOptions = Readonly<{
|
|
8
8
|
suppressDiligencePush?: boolean;
|
|
9
9
|
allowResumeFromInterrupted?: boolean;
|
|
10
|
+
resumeInProgressGeneration?: boolean;
|
|
10
11
|
noPromptSideDialogResumeEntitlement?: Readonly<{
|
|
11
12
|
ownerDialogId: string;
|
|
12
13
|
reason: 'reply_tellask_back_delivered';
|
package/dist/minds/minds-i18n.js
CHANGED
|
@@ -55,7 +55,7 @@ function taskdocCanonicalCopy(language) {
|
|
|
55
55
|
'',
|
|
56
56
|
'- 任何 `.tsk/` 目录及其子路径(`**/*.tsk/**`)都是封装状态:禁止使用任何通用文件工具读取/写入/列目录(例如 `read_file` / `write_file` / `list_dir` 等)。',
|
|
57
57
|
'- 更新 Taskdoc 只能使用函数工具 `do_mind` / `mind_more` / `change_mind` / `never_mind`:缺失章节用 `do_mind` 创建;少量新增用 `mind_more` 追加(默认 progress);需要删除陈旧项、重排或压缩时用 `change_mind` 整章替换;确需删除整章文件时用 `never_mind`。',
|
|
58
|
-
'-
|
|
58
|
+
'- 读取章节或取得 `change_mind.previous_content_hash` 需要使用函数工具 `recall_taskdoc({ selector, category? })`;顶层三段省略 `category`,额外章节传入 `category`。',
|
|
59
59
|
'',
|
|
60
60
|
'**Taskdoc 自动注入规则(系统提示)**',
|
|
61
61
|
'',
|
|
@@ -71,7 +71,7 @@ function taskdocCanonicalCopy(language) {
|
|
|
71
71
|
'',
|
|
72
72
|
'- Any `.tsk/` directory and its subpaths (`**/*.tsk/**`) are encapsulated state: general file tools MUST NOT read/write/list them (e.g. `read_file` / `write_file` / `list_dir`).',
|
|
73
73
|
'- Taskdoc updates MUST go through `do_mind` / `mind_more` / `change_mind` / `never_mind`: use `do_mind` to create missing sections, use `mind_more` for small append-only additions (defaults to progress), use `change_mind` for full-section replacement when cleanup, reordering, or compression is needed, and use `never_mind` when a whole section file should be deleted.',
|
|
74
|
-
'- To read
|
|
74
|
+
'- To read a section or get `change_mind.previous_content_hash`, use the function tool `recall_taskdoc({ selector, category? })`; omit `category` for top-level sections and pass it for extra sections.',
|
|
75
75
|
'',
|
|
76
76
|
'**Taskdoc auto-injection rules (system prompt)**',
|
|
77
77
|
'',
|
|
@@ -148,11 +148,11 @@ function getMemoryPromptCopy(ctx) {
|
|
|
148
148
|
const taskdocLogLineZh = ctx.contextHealthPromptMode === 'critical'
|
|
149
149
|
? ctx.isSideDialog
|
|
150
150
|
? '当前是告急处置态:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项长度没有技术限制,宁可完整一些;允许多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
|
|
151
|
-
: '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。当前是告急处置态:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind`
|
|
151
|
+
: '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。当前是告急处置态:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;本程允许先保留多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
|
|
152
152
|
: ctx.contextHealthPromptMode === 'caution'
|
|
153
153
|
? ctx.isSideDialog
|
|
154
154
|
? '当前是吃紧处置态:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项长度没有技术限制,宁可完整一些;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
|
|
155
|
-
: '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。当前是吃紧处置态:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind`
|
|
155
|
+
: '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。当前是吃紧处置态:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。系统真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
|
|
156
156
|
: '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步;提醒项也只留可扫读摘录。接续包提醒项默认应保持结构化、便于快速恢复。';
|
|
157
157
|
const contextHealthLineEn = ctx.contextHealthPromptMode === 'critical'
|
|
158
158
|
? ctx.isSideDialog
|
|
@@ -166,11 +166,11 @@ function getMemoryPromptCopy(ctx) {
|
|
|
166
166
|
const taskdocLogLineEn = ctx.contextHealthPromptMode === 'critical'
|
|
167
167
|
? ctx.isSideDialog
|
|
168
168
|
? 'Current mode is critical remediation: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put discussion details from current dialog history that the next course needs to know, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into continuation-package reminders. Reminder length has no technical limit, so prefer being complete. Rough multi-reminder bridge notes are acceptable in this course, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
|
|
169
|
-
: 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Current mode is critical remediation: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you
|
|
169
|
+
: 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Current mode is critical remediation: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you have first called `recall_taskdoc` to get the current `content_hash` as `previous_content_hash`. Continuation-package reminders should keep only details still not covered by Taskdoc but easy to lose during resume. Rough multi-reminder bridge notes are acceptable in this course, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
|
|
170
170
|
: ctx.contextHealthPromptMode === 'caution'
|
|
171
171
|
? ctx.isSideDialog
|
|
172
172
|
? 'Current mode is caution remediation: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put discussion details from current dialog history that the next course needs to know, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into continuation-package reminders. Reminder length has no technical limit, so prefer being complete. If needed, rough multi-reminder bridge notes are acceptable, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
|
|
173
|
-
: 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Current mode is caution remediation: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you
|
|
173
|
+
: 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Current mode is caution remediation: first review current-dialog discussion details not yet written into documentation. If they belong to team-shared state, decisions, constraints, or goals, prefer creating a new section with `do_mind`; use `change_mind` only when an existing section truly needs rewriting, you have merged against the current content, and you have first called `recall_taskdoc` to get the current `content_hash` as `previous_content_hash`. Continuation-package reminders should keep only details still not covered by Taskdoc but easy to lose during resume. If needed, rough multi-reminder bridge notes are acceptable, but do not perform the new-course “clear-headed review” early. Once the system actually starts the new course, the first step is to review/rewrite them: remove redundancy, correct biased or distorted bridge notes, then compress them into high-quality reminders.'
|
|
174
174
|
: 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps; reminders should also keep only scannable excerpts. Keep continuation-package reminders structured and fast to resume from by default.';
|
|
175
175
|
if (ctx.language === 'zh') {
|
|
176
176
|
return {
|
|
@@ -181,7 +181,7 @@ function getMemoryPromptCopy(ctx) {
|
|
|
181
181
|
taskdocSemanticsLine: '- 章节语义约定:`progress` 是全队共享、准实时、可扫读的任务公告牌,用来记录当前有效状态、关键决策、下一步与仍成立阻塞;不是流水账,也不是个人工作记录。`goals` / `constraints` 是较稳定的任务契约;每次更新都必须保留仍然有效的他人条目。',
|
|
182
182
|
taskdocSectionReplaceLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
|
|
183
183
|
? '- 当前处于支线对话的上下文健康处置态:本程不要维护差遣牒,也不要整理差遣牒更新提案;把下一程需要恢复的细节写入足够详尽的接续包提醒项。'
|
|
184
|
-
: `- 更新差遣牒时:少量新增条目可用 \`mind_more\` 追加(默认 progress);缺失章节用 \`do_mind\`
|
|
184
|
+
: `- 更新差遣牒时:少量新增条目可用 \`mind_more\` 追加(默认 progress);缺失章节用 \`do_mind\` 创建;需要删除陈旧项、重排结构或压缩时,先对照上下文中注入的当前内容完成合并,再调用 \`recall_taskdoc\` 取得当前 \`content_hash\`,然后用带 \`previous_content_hash\` 的 \`change_mind\` 整章替换;需要删除整章文件时用 \`never_mind\`;禁止覆盖/抹掉他人条目;自己负责维护的条目必须标注责任人(例如 \`- [owner:@${ctx.agentId}] ...\` 或用 \`### @${ctx.agentId}\` 分块)。`,
|
|
185
185
|
progressLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
|
|
186
186
|
? '- 当前处于支线对话的上下文健康处置态:本程不更新 `progress`;只把下一程接续所需信息写入提醒项。'
|
|
187
187
|
: '- 更新 `progress` 时:它必须始终是可供全队扫读的完整当前快照,而不是只追加自己这一轮的零散笔记。',
|
|
@@ -202,7 +202,7 @@ function getMemoryPromptCopy(ctx) {
|
|
|
202
202
|
sideDialogWorkflowLine: ctx.contextHealthPromptMode === 'normal'
|
|
203
203
|
? `工作流:先做事 → 再提炼(\`update_reminder\`;必要时整理差遣牒追加条目/更新提案并诉请 \`@${ctx.taskdocMaintainerId}\` 合并写入)→ 然后 \`clear_mind\` 清空噪音。`
|
|
204
204
|
: '工作流:停止扩张上下文 → 维护足够详尽的接续包提醒项(`add_reminder` 或 `update_reminder`,长度没有技术限制)→ 然后 `clear_mind` 开启新一程。',
|
|
205
|
-
mainDialogWorkflowLine: '工作流:先做事 -> 再提炼(`update_reminder` + `mind_more(progress)
|
|
205
|
+
mainDialogWorkflowLine: '工作流:先做事 -> 再提炼(`update_reminder` + `mind_more(progress)`;需要压缩/删旧时先 `recall_taskdoc` 取得 `content_hash`,再用带 `previous_content_hash` 的 `change_mind`;要删除整章文件时用 `never_mind`)-> 然后 `clear_mind` 清空噪音。',
|
|
206
206
|
contextHealthLine: contextHealthLineZh,
|
|
207
207
|
taskdocLogLine: taskdocLogLineZh,
|
|
208
208
|
};
|
|
@@ -215,7 +215,7 @@ function getMemoryPromptCopy(ctx) {
|
|
|
215
215
|
taskdocSemanticsLine: '- Section semantics: `progress` is the team-shared, quasi-real-time, scannable task bulletin board for current effective state, key decisions, next steps, and still-active blockers; it is not a raw log or personal work record. `goals` / `constraints` are the more stable task contract; every update must preserve still-valid entries from others.',
|
|
216
216
|
taskdocSectionReplaceLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
|
|
217
217
|
? '- Current mode is context-health remediation in a Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course; put resume-critical details into sufficiently detailed continuation-package reminders.'
|
|
218
|
-
: `- When updating Taskdoc: use \`mind_more\` for small append-only additions (defaults to progress); create missing sections with \`do_mind\`; when stale entries must be removed, reordered, or compressed,
|
|
218
|
+
: `- When updating Taskdoc: use \`mind_more\` for small append-only additions (defaults to progress); create missing sections with \`do_mind\`; when stale entries must be removed, reordered, or compressed, first merge against the current injected content, then call \`recall_taskdoc\` to get the current \`content_hash\`, then use \`change_mind\` for a full-section replacement with that value as \`previous_content_hash\`; when a whole section file should be removed, use \`never_mind\`; do not overwrite other contributors; add an explicit owner tag for entries you maintain (e.g., \`- [owner:@${ctx.agentId}] ...\` or a \`### @${ctx.agentId}\` block).`,
|
|
219
219
|
progressLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
|
|
220
220
|
? '- Current mode is context-health remediation in a Side Dialog: do not update `progress` in this course; put resume-critical information into reminders only.'
|
|
221
221
|
: '- When updating `progress`, keep it as a complete, team-scannable current snapshot instead of appending only your own latest notes.',
|
|
@@ -236,7 +236,7 @@ function getMemoryPromptCopy(ctx) {
|
|
|
236
236
|
sideDialogWorkflowLine: ctx.contextHealthPromptMode === 'normal'
|
|
237
237
|
? `Workflow: do work → distill (\`update_reminder\`; when Taskdoc needs updates, draft append entries, a merged replacement, or a section deletion and ask \`@${ctx.taskdocMaintainerId}\`) → then \`clear_mind\` to drop noise.`
|
|
238
238
|
: 'Workflow: stop expanding context → maintain sufficiently detailed continuation-package reminders (`add_reminder` or `update_reminder`, with no technical length limit) → then `clear_mind` to start a new course.',
|
|
239
|
-
mainDialogWorkflowLine: 'Workflow: do work -> distill (`update_reminder` + `mind_more(progress)`; use `
|
|
239
|
+
mainDialogWorkflowLine: 'Workflow: do work -> distill (`update_reminder` + `mind_more(progress)`; when compression/deletion is needed, first use `recall_taskdoc` to get `content_hash`, then use `change_mind` with `previous_content_hash`; use `never_mind` when removing a whole section file) -> then `clear_mind` to drop noise.',
|
|
240
240
|
contextHealthLine: contextHealthLineEn,
|
|
241
241
|
taskdocLogLine: taskdocLogLineEn,
|
|
242
242
|
};
|
package/dist/persistence.js
CHANGED
|
@@ -3764,6 +3764,7 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
3764
3764
|
case 'pending_sideDialogs_reconciled_record':
|
|
3765
3765
|
case 'sideDialog_registry_reconciled_record':
|
|
3766
3766
|
case 'sideDialog_responses_reconciled_record':
|
|
3767
|
+
case 'tellask_anchor_record':
|
|
3767
3768
|
break;
|
|
3768
3769
|
case 'tellask_carryover_record': {
|
|
3769
3770
|
const base = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function recoverProceedingDrivesAfterRestart(): Promise<void>;
|