dominds 1.7.0 → 1.7.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 +1 -1
- package/README.zh.md +1 -1
- package/dist/dialog.js +8 -8
- package/dist/docs/OEC-philosophy.md +11 -11
- package/dist/docs/OEC-philosophy.zh.md +1 -1
- package/dist/docs/context-health.md +35 -14
- package/dist/docs/context-health.zh.md +28 -7
- package/dist/docs/design.zh.md +8 -8
- package/dist/docs/dialog-persistence.zh.md +4 -4
- package/dist/docs/dialog-system.md +19 -14
- package/dist/docs/dialog-system.zh.md +102 -97
- package/dist/docs/encapsulated-taskdoc.md +5 -17
- package/dist/docs/encapsulated-taskdoc.zh.md +11 -11
- package/dist/docs/fbr.zh.md +1 -1
- package/dist/docs/mcp-support.zh.md +1 -1
- package/dist/docs/memory-system.zh.md +4 -4
- package/dist/docs/mottos.zh.md +7 -7
- package/dist/docs/roadmap.zh.md +1 -1
- package/dist/docs/team_mgmt-toolset.zh.md +1 -1
- package/dist/docs/tellask-collab.md +9 -4
- package/dist/docs/tellask-collab.zh.md +21 -15
- package/dist/llm/kernel-driver/drive.js +8 -6
- package/dist/llm/kernel-driver/flow.js +4 -3
- package/dist/llm/kernel-driver/subdialog.js +1 -1
- package/dist/minds/load.js +12 -0
- package/dist/minds/system-prompt-parts.js +31 -9
- package/dist/minds/system-prompt.js +63 -31
- package/dist/persistence.js +11 -11
- package/dist/priming.js +4 -4
- package/dist/shared/i18n/driver-messages.js +25 -10
- package/dist/shared/utils/inter-dialog-format.js +27 -7
- package/dist/static/assets/{_basePickBy-B5JpcIlf.js → _basePickBy-DOCpneO0.js} +3 -3
- package/dist/static/assets/{_basePickBy-B5JpcIlf.js.map → _basePickBy-DOCpneO0.js.map} +1 -1
- package/dist/static/assets/{_baseUniq-B6ENA5xp.js → _baseUniq-DBZLqTK1.js} +2 -2
- package/dist/static/assets/{_baseUniq-B6ENA5xp.js.map → _baseUniq-DBZLqTK1.js.map} +1 -1
- package/dist/static/assets/{arc-CztgHQ6S.js → arc-Dw9YkyBZ.js} +2 -2
- package/dist/static/assets/{arc-CztgHQ6S.js.map → arc-Dw9YkyBZ.js.map} +1 -1
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-CdI-KLc0.js → architectureDiagram-VXUJARFQ-DiXBIlTy.js} +7 -7
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-CdI-KLc0.js.map → architectureDiagram-VXUJARFQ-DiXBIlTy.js.map} +1 -1
- package/dist/static/assets/{blockDiagram-VD42YOAC-BALBf4XM.js → blockDiagram-VD42YOAC-CBTqG3TT.js} +7 -7
- package/dist/static/assets/{blockDiagram-VD42YOAC-BALBf4XM.js.map → blockDiagram-VD42YOAC-CBTqG3TT.js.map} +1 -1
- package/dist/static/assets/{c4Diagram-YG6GDRKO-a1k6yPrP.js → c4Diagram-YG6GDRKO-CKltdqcg.js} +3 -3
- package/dist/static/assets/{c4Diagram-YG6GDRKO-a1k6yPrP.js.map → c4Diagram-YG6GDRKO-CKltdqcg.js.map} +1 -1
- package/dist/static/assets/{channel-CWNdqJ-I.js → channel-CsfA5ddv.js} +2 -2
- package/dist/static/assets/{channel-CWNdqJ-I.js.map → channel-CsfA5ddv.js.map} +1 -1
- package/dist/static/assets/{chunk-4BX2VUAB-BQeTUB5q.js → chunk-4BX2VUAB-BCdL9ibi.js} +2 -2
- package/dist/static/assets/{chunk-4BX2VUAB-BQeTUB5q.js.map → chunk-4BX2VUAB-BCdL9ibi.js.map} +1 -1
- package/dist/static/assets/{chunk-55IACEB6-DDefFY4X.js → chunk-55IACEB6-CcKnxlqS.js} +2 -2
- package/dist/static/assets/{chunk-55IACEB6-DDefFY4X.js.map → chunk-55IACEB6-CcKnxlqS.js.map} +1 -1
- package/dist/static/assets/{chunk-B4BG7PRW-B3r4W-g_.js → chunk-B4BG7PRW-BnypOYYo.js} +5 -5
- package/dist/static/assets/{chunk-B4BG7PRW-B3r4W-g_.js.map → chunk-B4BG7PRW-BnypOYYo.js.map} +1 -1
- package/dist/static/assets/{chunk-DI55MBZ5-BDKIjQbt.js → chunk-DI55MBZ5-BGYHpvhR.js} +4 -4
- package/dist/static/assets/{chunk-DI55MBZ5-BDKIjQbt.js.map → chunk-DI55MBZ5-BGYHpvhR.js.map} +1 -1
- package/dist/static/assets/{chunk-FMBD7UC4-BRjO7LO2.js → chunk-FMBD7UC4-Crf0Br1R.js} +2 -2
- package/dist/static/assets/{chunk-FMBD7UC4-BRjO7LO2.js.map → chunk-FMBD7UC4-Crf0Br1R.js.map} +1 -1
- package/dist/static/assets/{chunk-QN33PNHL-DtUbDqMq.js → chunk-QN33PNHL-Cg1EQYdQ.js} +2 -2
- package/dist/static/assets/{chunk-QN33PNHL-DtUbDqMq.js.map → chunk-QN33PNHL-Cg1EQYdQ.js.map} +1 -1
- package/dist/static/assets/{chunk-QZHKN3VN-HvxW4tgI.js → chunk-QZHKN3VN-DRH7UNkC.js} +2 -2
- package/dist/static/assets/{chunk-QZHKN3VN-HvxW4tgI.js.map → chunk-QZHKN3VN-DRH7UNkC.js.map} +1 -1
- package/dist/static/assets/{chunk-TZMSLE5B-8kvbFL8c.js → chunk-TZMSLE5B-CaZqBdnu.js} +2 -2
- package/dist/static/assets/{chunk-TZMSLE5B-8kvbFL8c.js.map → chunk-TZMSLE5B-CaZqBdnu.js.map} +1 -1
- package/dist/static/assets/{classDiagram-2ON5EDUG-BT0K1-Ue.js → classDiagram-2ON5EDUG-DSsG0iFI.js} +6 -6
- package/dist/static/assets/{classDiagram-2ON5EDUG-BT0K1-Ue.js.map → classDiagram-2ON5EDUG-DSsG0iFI.js.map} +1 -1
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-BT0K1-Ue.js → classDiagram-v2-WZHVMYZB-DSsG0iFI.js} +6 -6
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-BT0K1-Ue.js.map → classDiagram-v2-WZHVMYZB-DSsG0iFI.js.map} +1 -1
- package/dist/static/assets/{clone-C8ji-9VG.js → clone-xhbAL4G8.js} +2 -2
- package/dist/static/assets/{clone-C8ji-9VG.js.map → clone-xhbAL4G8.js.map} +1 -1
- package/dist/static/assets/{cose-bilkent-S5V4N54A-DgZIHStr.js → cose-bilkent-S5V4N54A-B7Rtmhjt.js} +2 -2
- package/dist/static/assets/{cose-bilkent-S5V4N54A-DgZIHStr.js.map → cose-bilkent-S5V4N54A-B7Rtmhjt.js.map} +1 -1
- package/dist/static/assets/{dagre-6UL2VRFP-CoLMSS7V.js → dagre-6UL2VRFP-BkqhLTnX.js} +7 -7
- package/dist/static/assets/{dagre-6UL2VRFP-CoLMSS7V.js.map → dagre-6UL2VRFP-BkqhLTnX.js.map} +1 -1
- package/dist/static/assets/{diagram-PSM6KHXK-BbaRu7Ko.js → diagram-PSM6KHXK-CZKtGq3a.js} +8 -8
- package/dist/static/assets/{diagram-PSM6KHXK-BbaRu7Ko.js.map → diagram-PSM6KHXK-CZKtGq3a.js.map} +1 -1
- package/dist/static/assets/{diagram-QEK2KX5R-w2QJoEvf.js → diagram-QEK2KX5R-CnMVuAHl.js} +7 -7
- package/dist/static/assets/{diagram-QEK2KX5R-w2QJoEvf.js.map → diagram-QEK2KX5R-CnMVuAHl.js.map} +1 -1
- package/dist/static/assets/{diagram-S2PKOQOG-CZ3V7aTH.js → diagram-S2PKOQOG-CeSf7JXc.js} +7 -7
- package/dist/static/assets/{diagram-S2PKOQOG-CZ3V7aTH.js.map → diagram-S2PKOQOG-CeSf7JXc.js.map} +1 -1
- package/dist/static/assets/{erDiagram-Q2GNP2WA-B_D5zZGW.js → erDiagram-Q2GNP2WA-CSt8_Jg8.js} +5 -5
- package/dist/static/assets/{erDiagram-Q2GNP2WA-B_D5zZGW.js.map → erDiagram-Q2GNP2WA-CSt8_Jg8.js.map} +1 -1
- package/dist/static/assets/{flowDiagram-NV44I4VS-CdleeZSt.js → flowDiagram-NV44I4VS-D5Ml-CXN.js} +6 -6
- package/dist/static/assets/{flowDiagram-NV44I4VS-CdleeZSt.js.map → flowDiagram-NV44I4VS-D5Ml-CXN.js.map} +1 -1
- package/dist/static/assets/{ganttDiagram-JELNMOA3-D4I0mcXy.js → ganttDiagram-JELNMOA3-CyMWbWsa.js} +3 -3
- package/dist/static/assets/{ganttDiagram-JELNMOA3-D4I0mcXy.js.map → ganttDiagram-JELNMOA3-CyMWbWsa.js.map} +1 -1
- package/dist/static/assets/{gitGraphDiagram-V2S2FVAM-2TDy5WsI.js → gitGraphDiagram-V2S2FVAM-vl516Is8.js} +8 -8
- package/dist/static/assets/{gitGraphDiagram-V2S2FVAM-2TDy5WsI.js.map → gitGraphDiagram-V2S2FVAM-vl516Is8.js.map} +1 -1
- package/dist/static/assets/{graph-6qmT9kvE.js → graph-BGZ_sL_x.js} +3 -3
- package/dist/static/assets/{graph-6qmT9kvE.js.map → graph-BGZ_sL_x.js.map} +1 -1
- package/dist/static/assets/{index-DZjf7VGN.js → index-C-RsyM0K.js} +33 -33
- package/dist/static/assets/{index-DZjf7VGN.js.map → index-C-RsyM0K.js.map} +1 -1
- package/dist/static/assets/{infoDiagram-HS3SLOUP-Cdngu1wO.js → infoDiagram-HS3SLOUP-6wx0LbHY.js} +6 -6
- package/dist/static/assets/{infoDiagram-HS3SLOUP-Cdngu1wO.js.map → infoDiagram-HS3SLOUP-6wx0LbHY.js.map} +1 -1
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-C8JGH9qX.js → journeyDiagram-XKPGCS4Q-YPjC-r77.js} +5 -5
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-C8JGH9qX.js.map → journeyDiagram-XKPGCS4Q-YPjC-r77.js.map} +1 -1
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-CgcdAoUr.js → kanban-definition-3W4ZIXB7-DlG-ZWTO.js} +3 -3
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-CgcdAoUr.js.map → kanban-definition-3W4ZIXB7-DlG-ZWTO.js.map} +1 -1
- package/dist/static/assets/{layout--9zDsdfQ.js → layout-BZJKhYY3.js} +5 -5
- package/dist/static/assets/{layout--9zDsdfQ.js.map → layout-BZJKhYY3.js.map} +1 -1
- package/dist/static/assets/{linear-f6M3OqrG.js → linear-Bau37zh5.js} +2 -2
- package/dist/static/assets/{linear-f6M3OqrG.js.map → linear-Bau37zh5.js.map} +1 -1
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-O6D8o0NA.js → mindmap-definition-VGOIOE7T-n2WXgX4b.js} +4 -4
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-O6D8o0NA.js.map → mindmap-definition-VGOIOE7T-n2WXgX4b.js.map} +1 -1
- package/dist/static/assets/{pieDiagram-ADFJNKIX-B73iJXia.js → pieDiagram-ADFJNKIX-DgW7FkI4.js} +8 -8
- package/dist/static/assets/{pieDiagram-ADFJNKIX-B73iJXia.js.map → pieDiagram-ADFJNKIX-DgW7FkI4.js.map} +1 -1
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-1MkdhL3o.js → quadrantDiagram-AYHSOK5B-BtsDjIpC.js} +3 -3
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-1MkdhL3o.js.map → quadrantDiagram-AYHSOK5B-BtsDjIpC.js.map} +1 -1
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-BANDg6Jt.js → requirementDiagram-UZGBJVZJ-DPzuPEge.js} +4 -4
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-BANDg6Jt.js.map → requirementDiagram-UZGBJVZJ-DPzuPEge.js.map} +1 -1
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-XEoMNqRv.js → sankeyDiagram-TZEHDZUN-BJS1ETtL.js} +2 -2
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-XEoMNqRv.js.map → sankeyDiagram-TZEHDZUN-BJS1ETtL.js.map} +1 -1
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-Brw-9CPI.js → sequenceDiagram-WL72ISMW-DXEpa4ly.js} +4 -4
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-Brw-9CPI.js.map → sequenceDiagram-WL72ISMW-DXEpa4ly.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-CVzsrvr2.js → stateDiagram-FKZM4ZOC-CGU6VJY5.js} +9 -9
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-CVzsrvr2.js.map → stateDiagram-FKZM4ZOC-CGU6VJY5.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-B9j-EAhS.js → stateDiagram-v2-4FDKWEC3-Dx_GvlFA.js} +5 -5
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-B9j-EAhS.js.map → stateDiagram-v2-4FDKWEC3-Dx_GvlFA.js.map} +1 -1
- package/dist/static/assets/{timeline-definition-IT6M3QCI-S3mM3ltV.js → timeline-definition-IT6M3QCI-DcWLmdgJ.js} +3 -3
- package/dist/static/assets/{timeline-definition-IT6M3QCI-S3mM3ltV.js.map → timeline-definition-IT6M3QCI-DcWLmdgJ.js.map} +1 -1
- package/dist/static/assets/{treemap-GDKQZRPO-Cf1b3Cgv.js → treemap-GDKQZRPO-BhUwKF9C.js} +5 -5
- package/dist/static/assets/{treemap-GDKQZRPO-Cf1b3Cgv.js.map → treemap-GDKQZRPO-BhUwKF9C.js.map} +1 -1
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-CYvqfglb.js → xychartDiagram-PRI3JC2R-Cr4t0oCq.js} +3 -3
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-CYvqfglb.js.map → xychartDiagram-PRI3JC2R-Cr4t0oCq.js.map} +1 -1
- package/dist/static/index.html +1 -1
- package/dist/tools/ctrl.js +5 -4
- package/dist/tools/prompts/control/en/principles.md +2 -2
- package/dist/tools/prompts/control/en/tools.md +2 -2
- package/dist/tools/prompts/control/zh/index.md +2 -2
- package/dist/tools/prompts/control/zh/principles.md +4 -4
- package/dist/tools/prompts/control/zh/tools.md +4 -4
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.formatTeamIntro = formatTeamIntro;
|
|
4
4
|
exports.buildSystemPrompt = buildSystemPrompt;
|
|
5
|
+
const inter_dialog_format_1 = require("../shared/utils/inter-dialog-format");
|
|
5
6
|
function formatTeamIntro(team, selfAgentId, language) {
|
|
6
7
|
const callSignLabel = language === 'zh' ? '呼号' : 'Call Sign';
|
|
7
8
|
const selfSuffix = language === 'zh' ? '(本人)' : ' (self)';
|
|
@@ -37,16 +38,36 @@ function formatTeamIntro(team, selfAgentId, language) {
|
|
|
37
38
|
function pickLocalized(language, localized) {
|
|
38
39
|
return language === 'zh' ? localized.zh : localized.en;
|
|
39
40
|
}
|
|
40
|
-
function buildFbrContextHealthScopeRule(scope, language) {
|
|
41
|
+
function buildFbrContextHealthScopeRule(scope, language, contextHealthPromptMode) {
|
|
42
|
+
if (contextHealthPromptMode === 'critical') {
|
|
43
|
+
return pickLocalized(language, {
|
|
44
|
+
zh: scope === 'mainline'
|
|
45
|
+
? '- 当前上下文处于系统告急处置态:本程禁止发起 FBR。先按处置要求保信息、维护提醒项,并立即 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR 与差遣牒更新。'
|
|
46
|
+
: '- 当前上下文处于系统告急处置态:本程禁止发起 FBR。先按处置要求保信息、维护提醒项,并立即 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR。',
|
|
47
|
+
en: scope === 'mainline'
|
|
48
|
+
? '- Current context is under system critical remediation: do not start FBR in this course. Preserve volatile information, maintain reminders, and clear immediately; resume FBR and Taskdoc updates only after the system starts the new course and the continuation package has been reviewed.'
|
|
49
|
+
: '- Current context is under system critical remediation: do not start FBR in this course. Preserve volatile information, maintain reminders, and clear immediately; resume FBR only after the system starts the new course and the continuation package has been reviewed.',
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (contextHealthPromptMode === 'caution') {
|
|
53
|
+
return pickLocalized(language, {
|
|
54
|
+
zh: scope === 'mainline'
|
|
55
|
+
? '- 当前上下文处于系统吃紧处置态:本程不要发起 FBR。先按处置要求提炼提醒项并尽快 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR 与差遣牒更新。'
|
|
56
|
+
: '- 当前上下文处于系统吃紧处置态:本程不要发起 FBR。先按处置要求提炼提醒项并尽快 `clear_mind`;系统真正开启新一程并完成接续包复核后,再恢复 FBR。',
|
|
57
|
+
en: scope === 'mainline'
|
|
58
|
+
? '- Current context is under system caution remediation: do not start FBR in this course. Distill reminders and clear soon; resume FBR and Taskdoc updates only after the system starts the new course and the continuation package has been reviewed.'
|
|
59
|
+
: '- Current context is under system caution remediation: do not start FBR in this course. Distill reminders and clear soon; resume FBR only after the system starts the new course and the continuation package has been reviewed.',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
41
62
|
if (scope === 'mainline') {
|
|
42
63
|
return pickLocalized(language, {
|
|
43
|
-
zh: '-
|
|
44
|
-
en: '-
|
|
64
|
+
zh: '- 当前没有生效中的上下文健康处置指令,可以按正常流程进行 FBR。完成 FBR 后,基于当前可观测事实调用 \\`change_mind\\` 更新差遣牒,体现任务最新进展情况。FBR 自诉请正文不要冗余包含差遣牒已有信息。',
|
|
65
|
+
en: '- There is no active context-health remediation instruction in effect, so FBR may proceed normally. After FBR, call \\`change_mind\\` based on currently observable facts to update the Taskdoc with the latest progress; do not redundantly include information already present in the Taskdoc in the FBR body.',
|
|
45
66
|
});
|
|
46
67
|
}
|
|
47
68
|
return pickLocalized(language, {
|
|
48
|
-
zh: '-
|
|
49
|
-
en: '-
|
|
69
|
+
zh: '- 当前没有生效中的上下文健康处置指令,可以按正常流程进行 FBR。随后基于当前可观测事实分析是否与差遣牒内容存在差异,并将发现的情况包含在 FBR 自诉请正文中。',
|
|
70
|
+
en: '- There is no active context-health remediation instruction in effect, so FBR may proceed normally. Then analyze whether currently observable facts differ from the Taskdoc, and include the findings in the FBR body.',
|
|
50
71
|
});
|
|
51
72
|
}
|
|
52
73
|
function buildFbrPhaseContract(language) {
|
|
@@ -67,68 +88,79 @@ function buildFbrPhaseContract(language) {
|
|
|
67
88
|
return lines.join('\n');
|
|
68
89
|
}
|
|
69
90
|
function buildTeammateTellaskPhaseContract(language) {
|
|
91
|
+
const runtimeMarkers = (0, inter_dialog_format_1.getRuntimeTransferMarkers)(language);
|
|
70
92
|
const lines = pickLocalized(language, {
|
|
71
93
|
zh: [
|
|
72
94
|
'- 队友诉请必须遵循“发起 → 等待 → 判定 → 续推”四段协议:若目标未达成,立即发出下一轮诉请推进。',
|
|
73
95
|
'- 对队友诉请而言,收到回贴即表示该轮调用已结束;不存在“对方仍在后台继续执行同一诉请”的默认语义。要继续必须显式再发一轮诉请函数(通常 \\`tellask\\` 复用同一 \\`sessionSlug\\`)。',
|
|
74
96
|
'- 只有在存在明确进行中诉请时,才可声明“等待回贴/等待结果”(通常应可在“⏳ 进行中诉请(自动添加,手动删除)”提醒项中观测到);若该提醒项不存在,或提醒项已明确“当前没有执行中的诉请”,则“等待”是错误动作,必须执行下一动作(直接诉请或本地执行)。',
|
|
75
97
|
'- 能由队友诉请完成的执行性工作,禁止转交 \\`askHuman\\` 做“转发员”;当你写“让 @X 执行 Y”时,必须在同一回复内直接发出 \\`tellask\\` 或 \\`tellaskSessionless\\`。',
|
|
76
|
-
|
|
98
|
+
`- 当你在诉请正文里定义“回贴格式/交付格式”时,必须明确写入:\`Dominds 会自动注入回贴标记,禁止手写标记\`;不得要求被诉请者手写 \`${runtimeMarkers.finalCompleted}\` / \`${runtimeMarkers.tellaskBack}\` / FBR 标记(\`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`)。`,
|
|
77
99
|
'- 当你处于队友诉请触发的支线且需要澄清时,必须使用 \\`tellaskBack\\` 回问上游诉请者;\\`tellaskBack\\` 不携带 \\`sessionSlug\\`。',
|
|
78
|
-
|
|
100
|
+
`- 回贴文本标记由运行时在跨对话传递正文中按语义自动添加(例如 \`${runtimeMarkers.tellaskBack}\` / \`${runtimeMarkers.finalCompleted}\` / FBR 标记 \`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`);该传递正文会进入目标智能体上下文,且 UI 与其一致。你不应手写这些标记。`,
|
|
79
101
|
],
|
|
80
102
|
en: [
|
|
81
103
|
'- Teammate Tellasks MUST follow four phases: “initiate -> wait -> judge -> continue”. If the objective is not met, immediately send the next Tellask round.',
|
|
82
104
|
'- For teammate Tellasks, a delivered response closes that call round; there is no default “still running in background” state for the same Tellask. To continue, emit a new Tellask function call explicitly (usually \\`tellask\\` with the same \\`sessionSlug\\`).',
|
|
83
105
|
'- You may claim “waiting for reply/result” only when a concrete pending Tellask exists (normally observable in the “⏳ In-flight Tellasks (auto-added, manually deleted)” reminder). If that reminder is absent, or it explicitly states there are no in-flight Tellasks, waiting is a wrong action; execute the next action now (direct Tellask or local action).',
|
|
84
106
|
'- Do not use \\`askHuman\\` as a relay for executable teammate work. If you write “ask @X to do Y”, emit \\`tellask\\` or \\`tellaskSessionless\\` in the same response.',
|
|
85
|
-
|
|
107
|
+
`- When you define a “reply/delivery format” inside tellask body, you must explicitly include: \`Dominds auto-injects reply markers; do not hand-write markers\`; do not require the responder to hand-write \`${runtimeMarkers.finalCompleted}\` / \`${runtimeMarkers.tellaskBack}\` / FBR markers (\`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`).`,
|
|
86
108
|
'- When you are in a teammate-triggered sideline and need clarification, you MUST issue \\`tellaskBack\\` to ask back upstream; \\`tellaskBack\\` must not carry \\`sessionSlug\\`.',
|
|
87
|
-
|
|
109
|
+
`- Reply markers are auto-added by runtime in the inter-dialog transfer payload (for example \`${runtimeMarkers.tellaskBack}\` / \`${runtimeMarkers.finalCompleted}\` / FBR markers \`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`); that same transfer payload is what the target agent receives in context and what UI shows. Do not hand-write markers.`,
|
|
88
110
|
],
|
|
89
111
|
});
|
|
90
112
|
return lines.join('\n');
|
|
91
113
|
}
|
|
92
114
|
function buildSidelineUpstreamReplyMarkerRules(language) {
|
|
115
|
+
const runtimeMarkers = (0, inter_dialog_format_1.getRuntimeTransferMarkers)(language);
|
|
93
116
|
const lines = pickLocalized(language, {
|
|
94
117
|
zh: [
|
|
95
118
|
'- 本规则仅用于当前支线向上游诉请者回贴,不适用于你发起新的 tellask。',
|
|
96
119
|
'- 当前支线未完成/不确定/阻塞/需要澄清时:必须发起 \\`tellaskBack({ tellaskContent: "..." })\\`,并在 \\`tellaskContent\\` 中给出具体问题。',
|
|
97
120
|
'- 当前支线已完成并可交付最终结果时:必须直接回复正文;禁止调用 \\`tellaskBack\\` 发送最终结果。',
|
|
98
|
-
|
|
121
|
+
`- 运行时会自动把这条直接回复作为完成结果投递给上游,并在传递正文中添加 ${runtimeMarkers.finalCompleted}。`,
|
|
99
122
|
'- “不得发普通文本中间汇报”只针对未完成态;若你已经完成任务并能给出最终交付,就应直接回复正文,不要使用 \\`tellaskBack\\`。',
|
|
100
|
-
'- 例外:FBR 支线为工具禁用模式(不得调用 \\`tellaskBack
|
|
123
|
+
'- 例外:FBR 支线为工具禁用模式(不得调用 \\`tellaskBack\\`);其回贴标记(`' +
|
|
124
|
+
runtimeMarkers.fbrDirectReply +
|
|
125
|
+
'` / `' +
|
|
126
|
+
runtimeMarkers.fbrReasoningOnly +
|
|
127
|
+
'`)也由运行时在传递正文中注入。',
|
|
101
128
|
],
|
|
102
129
|
en: [
|
|
103
130
|
'- This rule applies only when posting upstream from the current sideline, not when initiating a new tellask.',
|
|
104
131
|
'- If the current sideline is unfinished, uncertain, blocked, or needs clarification: you must emit \\`tellaskBack({ tellaskContent: "..." })\\` and put concrete questions in \\`tellaskContent\\`.',
|
|
105
132
|
'- If the current sideline is complete and ready to deliver a final result: you must reply with the response body directly; do not use \\`tellaskBack\\` to send final delivery.',
|
|
106
|
-
|
|
133
|
+
`- Runtime will deliver that direct reply upstream as the completion result and inject ${runtimeMarkers.finalCompleted} into the transfer payload.`,
|
|
107
134
|
'- “Do not post a plain-text progress update” only applies to unfinished states; if the task is done and you can deliver the final result, reply directly instead of using \\`tellaskBack\\`.',
|
|
108
|
-
'- Exception: FBR sideline is tool-less (no \\`tellaskBack\\`); its reply
|
|
135
|
+
'- Exception: FBR sideline is tool-less (no \\`tellaskBack\\`); its reply markers (`' +
|
|
136
|
+
runtimeMarkers.fbrDirectReply +
|
|
137
|
+
'` / `' +
|
|
138
|
+
runtimeMarkers.fbrReasoningOnly +
|
|
139
|
+
'`) are also injected by runtime into the transfer payload.',
|
|
109
140
|
],
|
|
110
141
|
});
|
|
111
142
|
return lines.join('\n');
|
|
112
143
|
}
|
|
113
144
|
function buildTellaskReplyMarkerScopePolicy(language, dialogScope) {
|
|
145
|
+
const runtimeMarkers = (0, inter_dialog_format_1.getRuntimeTransferMarkers)(language);
|
|
114
146
|
if (dialogScope === 'sideline') {
|
|
115
147
|
return [
|
|
116
148
|
...pickLocalized(language, {
|
|
117
149
|
zh: [
|
|
118
|
-
|
|
150
|
+
`- 回贴文本标记由运行时在跨对话传递正文中自动添加(常规完成=${runtimeMarkers.finalCompleted};FBR=${runtimeMarkers.fbrDirectReply} 或 ${runtimeMarkers.fbrReasoningOnly});该正文直接进入上游上下文,且 UI 展示与其一致。你无需、也不应手写标记。`,
|
|
119
151
|
'- 若你在正文中给下游写“回贴格式”,必须写明“Dominds 自动注入标记,禁止手写”;不得要求下游手写任何标记。',
|
|
120
152
|
'- `tellaskBack` 只允许用于回问/澄清/阻塞说明;禁止用 \\`tellaskBack\\` 发送最终结果。',
|
|
121
153
|
'- 当前支线未完成/不确定/阻塞/需要澄清时:必须调用 \\`tellaskBack({ tellaskContent: "..." })\\`,不得发普通文本中间汇报。',
|
|
122
154
|
'- 当前支线已完成并能给出最终交付时:必须直接回复正文;这条直接回复就是完成交付通道,不要再走 \\`tellaskBack\\`。',
|
|
123
|
-
|
|
155
|
+
`- 仅当确认当前支线已完成全部目标并直接回复时,运行时才会把该回复投递给上游并标注 ${runtimeMarkers.finalCompleted}。`,
|
|
124
156
|
],
|
|
125
157
|
en: [
|
|
126
|
-
|
|
158
|
+
`- Reply markers are runtime-added in the inter-dialog transfer payload (regular completed reply = ${runtimeMarkers.finalCompleted}; FBR = ${runtimeMarkers.fbrDirectReply} or ${runtimeMarkers.fbrReasoningOnly}); this payload is delivered to upstream context and shown identically in UI. Do not hand-write markers.`,
|
|
127
159
|
'- If you define a reply format for downstream, you must state “Dominds auto-injects markers; do not hand-write them”; do not require downstream to hand-write any marker.',
|
|
128
160
|
'- \\`tellaskBack\\` is allowed only for ask-back / clarification / blocked-state reporting; do not use \\`tellaskBack\\` to send final results.',
|
|
129
161
|
'- If the current sideline is unfinished, uncertain, blocked, or needs clarification: you must call \\`tellaskBack({ tellaskContent: "..." })\\` instead of posting a plain-text progress update.',
|
|
130
162
|
'- If the current sideline is complete and can deliver the final result: you must reply with the response body directly; that direct reply is the completion-delivery path, not \\`tellaskBack\\`.',
|
|
131
|
-
|
|
163
|
+
`- Runtime marks ${runtimeMarkers.finalCompleted} and delivers upstream only when the current sideline has fully completed its objectives and directly replies.`,
|
|
132
164
|
],
|
|
133
165
|
}),
|
|
134
166
|
];
|
|
@@ -169,8 +201,8 @@ function buildTellaskCollaborationProtocol(language, dialogScope) {
|
|
|
169
201
|
}
|
|
170
202
|
return lines.join('\n');
|
|
171
203
|
}
|
|
172
|
-
function buildFbrGuidelines(language, dialogScope) {
|
|
173
|
-
const fbrContextHealthRule = buildFbrContextHealthScopeRule(dialogScope, language);
|
|
204
|
+
function buildFbrGuidelines(language, dialogScope, contextHealthPromptMode) {
|
|
205
|
+
const fbrContextHealthRule = buildFbrContextHealthScopeRule(dialogScope, language, contextHealthPromptMode);
|
|
174
206
|
const fbrPhaseContract = buildFbrPhaseContract(language);
|
|
175
207
|
const lines = pickLocalized(language, {
|
|
176
208
|
zh: [
|
|
@@ -246,7 +278,7 @@ function buildFunctionToolRules(language, funcToolRulesText) {
|
|
|
246
278
|
}
|
|
247
279
|
function buildSystemPrompt(input) {
|
|
248
280
|
const collaborationProtocol = buildTellaskCollaborationProtocol(input.language, input.dialogScope);
|
|
249
|
-
const fbrGuidelines = buildFbrGuidelines(input.language, input.dialogScope);
|
|
281
|
+
const fbrGuidelines = buildFbrGuidelines(input.language, input.dialogScope, input.contextHealthPromptMode);
|
|
250
282
|
const tellaskInteractionRules = buildTellaskInteractionRules(input.language);
|
|
251
283
|
const functionToolRules = buildFunctionToolRules(input.language, input.funcToolRulesText);
|
|
252
284
|
if (input.language === 'zh') {
|
|
@@ -271,20 +303,20 @@ function buildSystemPrompt(input) {
|
|
|
271
303
|
|
|
272
304
|
## 术语表
|
|
273
305
|
|
|
274
|
-
-
|
|
306
|
+
- 诉请:对智能体的结构化请求。
|
|
275
307
|
- 提及列表(mentionList):仅用于 \`tellask\` / \`tellaskSessionless\` 的队友目标列表(\`@<agentId>\`)。
|
|
276
308
|
- 诉请内容(tellaskContent):tellask 系列函数的正文参数,用于承载上下文/约束/验收。
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
309
|
+
- 对话主理人:负责当前对话推进与输出的智能体。
|
|
310
|
+
- 诉请者:发出诉请的对话主理人。
|
|
311
|
+
- 被诉请者:接收诉请的对话主理人/队友。
|
|
312
|
+
- 回问诉请:支线对话用 \`tellaskBack\` 回问诉请者以澄清。
|
|
281
313
|
- 扪心自问(FBR):由 \`freshBootsReasoning\` 触发的“无工具”支线推理机制。
|
|
282
|
-
- Q4H
|
|
283
|
-
-
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
314
|
+
- 向人请示(Q4H):通过 \`askHuman\` 向人类请求必要的澄清/决策/授权/缺失输入。
|
|
315
|
+
- 长线诉请:使用 \`tellask\` + \`sessionSlug\` 的可恢复多轮协作。
|
|
316
|
+
- 一次性诉请:一次性、不可恢复的诉请。
|
|
317
|
+
- 主线对话:承载共享差遣牒并负责整体推进的对话。
|
|
318
|
+
- 支线对话:为分项任务临时创建的工作对话。
|
|
319
|
+
- 差遣牒:共享任务契约,包含必要的 goals/constraints/progress 章节以及可选更多的额外章节。
|
|
288
320
|
|
|
289
321
|
## 角色设定
|
|
290
322
|
|
package/dist/persistence.js
CHANGED
|
@@ -642,7 +642,7 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
642
642
|
* - Uses callId for correlation between call_start and response
|
|
643
643
|
* - Uses receiveTellaskCallResult() + callId parameter
|
|
644
644
|
*
|
|
645
|
-
* -
|
|
645
|
+
* - Tellask sideline response (subdialog response bubble)
|
|
646
646
|
* - Result displays in SEPARATE bubble (subdialog response)
|
|
647
647
|
* - Uses calleeDialogId for correlation
|
|
648
648
|
* - Uses receiveTellaskResponse() instead
|
|
@@ -730,18 +730,18 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
730
730
|
(0, evt_registry_1.postDialogEvent)(dialog, toolResponseEvt);
|
|
731
731
|
}
|
|
732
732
|
/**
|
|
733
|
-
* Receive and handle
|
|
733
|
+
* Receive and handle tellask responses (separate bubble for subdialog/supdialog replies)
|
|
734
734
|
*
|
|
735
735
|
* Call Types:
|
|
736
|
-
* -
|
|
736
|
+
* - Tellask sideline response
|
|
737
737
|
* - Result displays in SEPARATE bubble (subdialog or supdialog response)
|
|
738
738
|
* - Uses calleeDialogId for correlation (not callId)
|
|
739
739
|
* - Uses this method (receiveTellaskResponse)
|
|
740
740
|
*
|
|
741
741
|
* @param dialog - The dialog receiving the response
|
|
742
|
-
* @param responderId - ID of the
|
|
743
|
-
* @param mentionList - Mention list of the original
|
|
744
|
-
* @param tellaskContent - Tellask content of the original
|
|
742
|
+
* @param responderId - ID of the responder agent (e.g., "coder")
|
|
743
|
+
* @param mentionList - Mention list of the original tellask
|
|
744
|
+
* @param tellaskContent - Tellask content of the original tellask
|
|
745
745
|
* @param status - Response status ('completed' | 'failed')
|
|
746
746
|
* @param calleeDialogId - ID of the callee dialog (subdialog OR supdialog) for navigation links
|
|
747
747
|
*/
|
|
@@ -2159,7 +2159,7 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
2159
2159
|
break;
|
|
2160
2160
|
}
|
|
2161
2161
|
case 'tellask_call_result_record': {
|
|
2162
|
-
// Handle
|
|
2162
|
+
// Handle tellask-call inline results
|
|
2163
2163
|
const responseEvent = (() => {
|
|
2164
2164
|
switch (event.callName) {
|
|
2165
2165
|
case 'tellask':
|
|
@@ -2338,7 +2338,7 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
2338
2338
|
case 'subdialog_responses_reconciled_record':
|
|
2339
2339
|
break;
|
|
2340
2340
|
case 'tellask_response_record': {
|
|
2341
|
-
// Handle
|
|
2341
|
+
// Handle tellask response events (separate bubble for tellask sideline replies)
|
|
2342
2342
|
const mentionList = (() => {
|
|
2343
2343
|
switch (event.callName) {
|
|
2344
2344
|
case 'tellask':
|
|
@@ -4625,7 +4625,7 @@ class DialogPersistence {
|
|
|
4625
4625
|
break;
|
|
4626
4626
|
}
|
|
4627
4627
|
case 'tellask_call_result_record': {
|
|
4628
|
-
// Convert
|
|
4628
|
+
// Convert tellask-call inline result to ChatMessage
|
|
4629
4629
|
const mentionList = (() => {
|
|
4630
4630
|
switch (event.callName) {
|
|
4631
4631
|
case 'tellask':
|
|
@@ -4652,8 +4652,8 @@ class DialogPersistence {
|
|
|
4652
4652
|
case 'tellask_call_carryover_record':
|
|
4653
4653
|
break;
|
|
4654
4654
|
case 'tellask_response_record': {
|
|
4655
|
-
// Convert
|
|
4656
|
-
// Note:
|
|
4655
|
+
// Convert tellask response to ChatMessage (separate bubble)
|
|
4656
|
+
// Note: Tellask responses are stored as separate records but use same message type
|
|
4657
4657
|
const mentionList = (() => {
|
|
4658
4658
|
switch (event.callName) {
|
|
4659
4659
|
case 'tellask':
|
package/dist/priming.js
CHANGED
|
@@ -805,10 +805,10 @@ function normalizePrimingRecordFromJson(raw) {
|
|
|
805
805
|
switch (callName) {
|
|
806
806
|
case 'tellask': {
|
|
807
807
|
if (!Array.isArray(mentionList) || mentionList.length < 1) {
|
|
808
|
-
throw new Error(`${context}.mentionList is required for tellask
|
|
808
|
+
throw new Error(`${context}.mentionList is required for tellask response`);
|
|
809
809
|
}
|
|
810
810
|
if (typeof sessionSlug !== 'string' || sessionSlug.trim() === '') {
|
|
811
|
-
throw new Error(`${context}.sessionSlug is required for tellask
|
|
811
|
+
throw new Error(`${context}.sessionSlug is required for tellask response`);
|
|
812
812
|
}
|
|
813
813
|
return {
|
|
814
814
|
...base,
|
|
@@ -819,10 +819,10 @@ function normalizePrimingRecordFromJson(raw) {
|
|
|
819
819
|
}
|
|
820
820
|
case 'tellaskSessionless': {
|
|
821
821
|
if (!Array.isArray(mentionList) || mentionList.length < 1) {
|
|
822
|
-
throw new Error(`${context}.mentionList is required for tellaskSessionless
|
|
822
|
+
throw new Error(`${context}.mentionList is required for tellaskSessionless response`);
|
|
823
823
|
}
|
|
824
824
|
if (sessionSlug !== undefined) {
|
|
825
|
-
throw new Error(`${context}.sessionSlug must be undefined for tellaskSessionless
|
|
825
|
+
throw new Error(`${context}.sessionSlug must be undefined for tellaskSessionless response`);
|
|
826
826
|
}
|
|
827
827
|
return {
|
|
828
828
|
...base,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.formatCurrentUserLanguagePreference = formatCurrentUserLanguagePreference;
|
|
4
|
+
exports.formatNewCourseStartPrompt = formatNewCourseStartPrompt;
|
|
4
5
|
exports.formatReminderItemGuide = formatReminderItemGuide;
|
|
5
6
|
exports.formatQ4HDiligencePushBudgetExhausted = formatQ4HDiligencePushBudgetExhausted;
|
|
6
7
|
exports.formatDomindsNoteTellaskForTeammatesOnly = formatDomindsNoteTellaskForTeammatesOnly;
|
|
@@ -24,6 +25,20 @@ function formatCurrentUserLanguagePreference(workingLanguage, uiLanguage) {
|
|
|
24
25
|
}
|
|
25
26
|
return `User-visible response language: ${uiName}. Internal work language remains: ${workingName} (system prompt, teammate comms, function tools).`;
|
|
26
27
|
}
|
|
28
|
+
function formatNewCourseStartPrompt(language, args) {
|
|
29
|
+
if (language === 'zh') {
|
|
30
|
+
const prefix = args.source === 'clear_mind'
|
|
31
|
+
? `你刚清理头脑,开启了第 ${args.nextCourse} 程对话。`
|
|
32
|
+
: `系统因上下文已告急(critical)而自动开启了第 ${args.nextCourse} 程对话。`;
|
|
33
|
+
return (`${prefix} ` +
|
|
34
|
+
'现在已经进入新一程:第一步先复核并整理接续包提醒项,以清醒头脑删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项;再继续推进任务。');
|
|
35
|
+
}
|
|
36
|
+
const prefix = args.source === 'clear_mind'
|
|
37
|
+
? `This is course #${args.nextCourse} of the dialog. You just cleared your mind.`
|
|
38
|
+
: `System auto-started course #${args.nextCourse} of the dialog because context health is critical.`;
|
|
39
|
+
return (`${prefix} ` +
|
|
40
|
+
'You are now in a new course: your first step is to review and rewrite any continuation-package reminders with a clear head, remove redundancy, correct biased or distorted bridge notes, compress them into high-quality reminders, and then continue the task.');
|
|
41
|
+
}
|
|
27
42
|
function formatReminderItemGuide(language, index, content, options) {
|
|
28
43
|
function isRecord(value) {
|
|
29
44
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -80,7 +95,7 @@ function formatReminderItemGuide(language, index, content, options) {
|
|
|
80
95
|
'',
|
|
81
96
|
'说明:这是用于换程后快速恢复工作的接续包,不自动等于当前必须立刻执行的指令。',
|
|
82
97
|
'',
|
|
83
|
-
'
|
|
98
|
+
'建议:优先保留下一步行动、关键定位、运行/验证信息、容易丢的临时细节;不要重复差遣牒已覆盖的内容。进入新一程后,第一步就要以清醒头脑重新审视并整理更新:删除冗余、纠正偏激/失真思路、压缩成高质量提醒项。若目前只是粗略过桥笔记,进入新一程后必须尽快收敛。',
|
|
84
99
|
'',
|
|
85
100
|
`如需更新此接续包,可执行:update_reminder({ "reminder_no": ${index}, "content": "..." })`,
|
|
86
101
|
`如需删除此提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`,
|
|
@@ -121,7 +136,7 @@ ${content}`;
|
|
|
121
136
|
|
|
122
137
|
Note: this is resume information for the next course, not an automatic must-do command.
|
|
123
138
|
|
|
124
|
-
Guidance: keep the next step, key pointers, run/verify info, and easy-to-lose volatile details. Do not duplicate Taskdoc content. In the new course, review this
|
|
139
|
+
Guidance: keep the next step, key pointers, run/verify info, and easy-to-lose volatile details. Do not duplicate Taskdoc content. In the new course, your first step is to review and rewrite this with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress it into a high-quality reminder. If this is only a rough bridge note, reconcile it early in the new course.
|
|
125
140
|
|
|
126
141
|
If you need to update this package, run: update_reminder({ "reminder_no": ${index}, "content": "..." })
|
|
127
142
|
If you need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })
|
|
@@ -180,9 +195,9 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
|
|
|
180
195
|
'',
|
|
181
196
|
'影响:对话历史中的工具调用/结果信息很多已经过时,成为你的思考负担。',
|
|
182
197
|
'',
|
|
183
|
-
'
|
|
198
|
+
'行动:先尽量保住易丢信息,并优先把已经掌握的事实压缩成结构化接续包提醒项(下一步行动 + 关键定位信息 + 运行/验证信息 + 容易丢的临时细节);若不额外继续阅读/分析就做不到,允许先记成多条粗略提醒项。',
|
|
184
199
|
'',
|
|
185
|
-
'
|
|
200
|
+
'当前已处于吃紧处置阶段:不要继续扩张上下文,也不要提前进入“按接续包做清醒复核”的模式;那是系统真正开启新一程后的第一步。接续包只保留差遣牒未覆盖、但恢复工作会丢的信息。然后主动 clear_mind,开启新一程对话继续工作。',
|
|
186
201
|
'',
|
|
187
202
|
'操作:',
|
|
188
203
|
'- update_reminder({ "reminder_no": 1, "content": "..." })(推荐)',
|
|
@@ -194,14 +209,14 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
|
|
|
194
209
|
'',
|
|
195
210
|
`系统最多再提醒你 ${args.promptsRemainingAfterThis} 次,之后将自动清理头脑开启新一程对话。`,
|
|
196
211
|
'',
|
|
197
|
-
'行动:尽快保住易丢信息,然后 clear_mind
|
|
212
|
+
'行动:尽快保住易丢信息,然后 clear_mind。若能直接基于已掌握事实压缩成结构化接续包提醒项,就这样做;否则先保留多条粗略提醒项也可以。',
|
|
198
213
|
'',
|
|
199
214
|
'操作:',
|
|
200
215
|
'- update_reminder({ "reminder_no": 1, "content": "..." })',
|
|
201
216
|
'- add_reminder({ "content": "..." })',
|
|
202
217
|
'- clear_mind({})',
|
|
203
218
|
'',
|
|
204
|
-
'接续包要点:下一步行动 + 关键定位信息 + 运行验证方式 +
|
|
219
|
+
'接续包要点:下一步行动 + 关键定位信息 + 运行验证方式 + 容易丢的临时细节;不要重复差遣牒已有内容。当前处于告急处置阶段时,不要提前做“新一程清醒复核”;系统真正开启新一程后,第一步才是重新审视并整理:删除冗余、纠正偏激/失真思路、压缩成高质量提醒项。',
|
|
205
220
|
].join('\n');
|
|
206
221
|
}
|
|
207
222
|
if (args.kind === 'caution' && args.mode === 'soft') {
|
|
@@ -210,9 +225,9 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
|
|
|
210
225
|
'',
|
|
211
226
|
'Impact: stale call/results in dialog history are creating cognitive noise.',
|
|
212
227
|
'',
|
|
213
|
-
'Action: first preserve easy-to-lose information
|
|
228
|
+
'Action: first preserve easy-to-lose information, and prefer compressing already observed facts into a structured continuation-package reminder (next step + key pointers + run/verify info + easy-to-lose volatile details). If that cannot be done without more reading/analysis, rough multi-reminder carry-over is acceptable.',
|
|
214
229
|
'',
|
|
215
|
-
'
|
|
230
|
+
'You are already in caution remediation for the current course, so do not keep expanding context and do not switch early into “clear-headed continuation-package review” mode; that is the first step only after the system actually starts the new course. Keep only details not already covered by Taskdoc. Then proactively clear_mind to start a new dialog course.',
|
|
216
231
|
'',
|
|
217
232
|
'Operations:',
|
|
218
233
|
'- update_reminder({ "reminder_no": 1, "content": "..." })',
|
|
@@ -224,14 +239,14 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
|
|
|
224
239
|
'',
|
|
225
240
|
`System will remind you ${args.promptsRemainingAfterThis} more time(s), then automatically clear mind.`,
|
|
226
241
|
'',
|
|
227
|
-
'Action: preserve easy-to-lose information, then clear_mind.
|
|
242
|
+
'Action: preserve easy-to-lose information, then clear_mind. If you can compress already observed facts into one structured continuation-package reminder without more reading/analysis, do that; otherwise multiple rough reminders are acceptable as a bridge.',
|
|
228
243
|
'',
|
|
229
244
|
'Operations:',
|
|
230
245
|
'- update_reminder({ "reminder_no": 1, "content": "..." })',
|
|
231
246
|
'- add_reminder({ "content": "..." })',
|
|
232
247
|
'- clear_mind({})',
|
|
233
248
|
'',
|
|
234
|
-
'Continuation package: next step + key pointers + run/verify info + easy-to-lose volatile details. Do not duplicate Taskdoc content.
|
|
249
|
+
'Continuation package: next step + key pointers + run/verify info + easy-to-lose volatile details. Do not duplicate Taskdoc content. During critical remediation in the current course, do not start the new-course cleanup early; once the system actually starts the new course, the first step is to reconcile rough bridge reminders by removing redundancy, correcting biased or distorted bridge notes, and compressing them into high-quality reminders.',
|
|
235
250
|
].join('\n');
|
|
236
251
|
}
|
|
237
252
|
function formatDomindsNoteDirectSelfCall(language) {
|
|
@@ -9,25 +9,44 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Transfer payload contract:
|
|
11
11
|
* - Assignment/call payloads are generated from mention list + tellask content.
|
|
12
|
-
* -
|
|
12
|
+
* - Tellask-response payloads include runtime markers + response body + call-site summary.
|
|
13
13
|
* - The same transfer payload should be used for both model context and UI rendering.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.getRuntimeTransferMarkers = getRuntimeTransferMarkers;
|
|
16
17
|
exports.formatAssignmentFromSupdialog = formatAssignmentFromSupdialog;
|
|
17
18
|
exports.formatSupdialogCallPrompt = formatSupdialogCallPrompt;
|
|
18
19
|
exports.formatTellaskResponseContent = formatTellaskResponseContent;
|
|
19
20
|
exports.formatTellaskCarryoverResultContent = formatTellaskCarryoverResultContent;
|
|
20
21
|
const fmt_1 = require("./fmt");
|
|
22
|
+
function getRuntimeTransferMarkers(language) {
|
|
23
|
+
if (language === 'zh') {
|
|
24
|
+
return {
|
|
25
|
+
tellaskBack: '【回问诉请】',
|
|
26
|
+
finalCompleted: '【最终完成】',
|
|
27
|
+
fbrDirectReply: '【FBR-直接回复】',
|
|
28
|
+
fbrReasoningOnly: '【FBR-仅推理】',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
tellaskBack: '【TellaskBack】',
|
|
33
|
+
finalCompleted: '【Completed】',
|
|
34
|
+
fbrDirectReply: '【FBR-Direct Reply】',
|
|
35
|
+
fbrReasoningOnly: '【FBR-Reasoning Only】',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
21
38
|
function getRuntimeTransferMarker(input) {
|
|
39
|
+
const language = input.language ?? 'en';
|
|
40
|
+
const markers = getRuntimeTransferMarkers(language);
|
|
22
41
|
if (input.status === undefined)
|
|
23
42
|
return undefined;
|
|
24
43
|
if (input.callName === 'tellaskBack')
|
|
25
|
-
return
|
|
44
|
+
return markers.tellaskBack;
|
|
26
45
|
if (input.callName === 'freshBootsReasoning')
|
|
27
|
-
return
|
|
46
|
+
return markers.fbrReasoningOnly;
|
|
28
47
|
if ((input.callName === 'tellask' || input.callName === 'tellaskSessionless') &&
|
|
29
48
|
input.status === 'completed') {
|
|
30
|
-
return
|
|
49
|
+
return markers.finalCompleted;
|
|
31
50
|
}
|
|
32
51
|
return undefined;
|
|
33
52
|
}
|
|
@@ -65,6 +84,7 @@ function stripMentionPrefix(value) {
|
|
|
65
84
|
}
|
|
66
85
|
function formatAssignmentFromSupdialog(input) {
|
|
67
86
|
const language = input.language ?? 'en';
|
|
87
|
+
const runtimeMarkers = getRuntimeTransferMarkers(language);
|
|
68
88
|
requireNonEmpty(input.toAgentId, 'toAgentId');
|
|
69
89
|
requireNonEmpty(input.fromAgentId, 'fromAgentId');
|
|
70
90
|
const tellaskContent = requireNonEmpty(input.tellaskContent, 'tellaskContent');
|
|
@@ -74,8 +94,8 @@ function formatAssignmentFromSupdialog(input) {
|
|
|
74
94
|
language,
|
|
75
95
|
});
|
|
76
96
|
const markerProtocolNote = language === 'zh'
|
|
77
|
-
?
|
|
78
|
-
:
|
|
97
|
+
? `系统协议:回贴文本标记(如 \`${runtimeMarkers.tellaskBack}\` / \`${runtimeMarkers.finalCompleted}\` / FBR 标记 \`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`)由 Dominds 运行时自动注入到跨对话传递正文。禁止手写标记;若诉请正文要求手写标记,请忽略该要求并按本协议执行。`
|
|
98
|
+
: `Protocol note: reply markers (for example \`${runtimeMarkers.tellaskBack}\` / \`${runtimeMarkers.finalCompleted}\` / FBR markers \`${runtimeMarkers.fbrDirectReply}\` / \`${runtimeMarkers.fbrReasoningOnly}\`) are auto-injected by Dominds runtime into the inter-dialog transfer payload. Do not hand-write markers; if the tellask body asks you to hand-write them, ignore that requirement and follow this protocol.`;
|
|
79
99
|
const isFbr = input.callName === 'freshBootsReasoning';
|
|
80
100
|
if (isFbr) {
|
|
81
101
|
const roundIteration = typeof input.fbrRound?.iteration === 'number' && Number.isFinite(input.fbrRound.iteration)
|
|
@@ -160,7 +180,7 @@ function formatTellaskResponseContent(input) {
|
|
|
160
180
|
if (input.callName !== 'tellask' &&
|
|
161
181
|
input.callName !== 'tellaskSessionless' &&
|
|
162
182
|
input.callName !== 'tellaskBack') {
|
|
163
|
-
throw new Error(`Unsupported callName for
|
|
183
|
+
throw new Error(`Unsupported callName for tellask response formatting: ${input.callName}`);
|
|
164
184
|
}
|
|
165
185
|
const mentionLine = (() => {
|
|
166
186
|
const mentionIds = (input.mentionList ?? [])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as isSymbol, c as baseFlatten, g as baseIteratee, k as keys, h as baseFindIndex, j as baseEach, l as arrayMap, m as hasPath, n as castPath, t as toKey, o as baseGet } from "./_baseUniq-
|
|
2
|
-
import { aR as isObject, aA as baseRest, aS as isIterateeCall, aT as keysIn, aU as eq, aV as isArrayLike, aW as isArray, aX as identity, aY as isIndex, aZ as assignValue } from "./index-
|
|
1
|
+
import { e as isSymbol, c as baseFlatten, g as baseIteratee, k as keys, h as baseFindIndex, j as baseEach, l as arrayMap, m as hasPath, n as castPath, t as toKey, o as baseGet } from "./_baseUniq-DBZLqTK1.js";
|
|
2
|
+
import { aR as isObject, aA as baseRest, aS as isIterateeCall, aT as keysIn, aU as eq, aV as isArrayLike, aW as isArray, aX as identity, aY as isIndex, aZ as assignValue } from "./index-C-RsyM0K.js";
|
|
3
3
|
var reWhitespace = /\s/;
|
|
4
4
|
function trimmedEndIndex(string) {
|
|
5
5
|
var index = string.length;
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
map as m,
|
|
194
194
|
toFinite as t
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=_basePickBy-
|
|
196
|
+
//# sourceMappingURL=_basePickBy-DOCpneO0.js.map
|