dominds 1.27.3 → 1.27.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/dialog-fork.js +2 -1
  2. package/dist/dialog.d.ts +3 -3
  3. package/dist/dialog.js +7 -4
  4. package/dist/docs/dialog-system.md +4 -4
  5. package/dist/docs/dialog-system.zh.md +4 -4
  6. package/dist/docs/diligence-push.md +6 -3
  7. package/dist/docs/diligence-push.zh.md +1 -1
  8. package/dist/llm/api-quirks.d.ts +1 -0
  9. package/dist/llm/api-quirks.js +3 -1
  10. package/dist/llm/defaults.yaml +8 -4
  11. package/dist/llm/gen/openai-compatible.js +14 -1
  12. package/dist/llm/kernel-driver/drive.js +67 -40
  13. package/dist/llm/kernel-driver/tellask-special.js +2 -2
  14. package/dist/mcp/supervisor.js +4 -1
  15. package/dist/minds/system-prompt-parts.js +30 -30
  16. package/dist/minds/system-prompt.js +6 -4
  17. package/dist/persistence.js +65 -16
  18. package/dist/priming.js +2 -3
  19. package/dist/runtime/driver-messages.js +42 -28
  20. package/dist/runtime/reply-prompt-copy.js +6 -5
  21. package/dist/server/websocket-handler.js +3 -3
  22. package/dist/shared-reminders.js +2 -2
  23. package/dist/tool.d.ts +7 -4
  24. package/dist/tool.js +10 -4
  25. package/dist/tools/app-reminders.js +4 -3
  26. package/dist/tools/ctrl.js +4 -1
  27. package/dist/tools/pending-tellask-reminder.js +1 -0
  28. package/dist/tools/prompts/control/en/index.md +3 -3
  29. package/dist/tools/prompts/control/en/principles.md +4 -4
  30. package/dist/tools/prompts/control/en/scenarios.md +10 -3
  31. package/dist/tools/prompts/control/en/tools.md +4 -4
  32. package/dist/tools/prompts/control/zh/index.md +3 -3
  33. package/dist/tools/prompts/control/zh/principles.md +4 -4
  34. package/dist/tools/prompts/control/zh/scenarios.md +10 -3
  35. package/dist/tools/prompts/control/zh/tools.md +4 -4
  36. package/dist/tools/team_mgmt-manual.js +2 -2
  37. package/package.json +4 -4
  38. package/webapp/package.json +0 -1
@@ -138,40 +138,40 @@ function getMemoryPromptCopy(ctx) {
138
138
  const runtimeMarkers = (0, inter_dialog_format_1.getRuntimeTransferMarkers)(ctx.language);
139
139
  const contextHealthLineZh = ctx.contextHealthPromptMode === 'critical'
140
140
  ? ctx.isSideDialog
141
- ? 'Dominds 已提醒上下文告急:立即停止继续大实现/大阅读。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,只维护足够详尽的接续包提醒项并 `clear_mind`。提醒项没有固定长度限制。'
142
- : 'Dominds 已提醒上下文告急:立即停止继续大实现/大阅读。本程只做保信息:先把当前对话历史中尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再提炼接续包提醒项并 `clear_mind`。'
141
+ ? 'Dominds 已提醒上下文告急:立即停止继续大实现/大阅读。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,只维护足够详尽的当前对话范围(scope=dialog)接续包提醒项并写明本路任务目标,然后 `clear_mind`。提醒项没有固定长度限制。'
142
+ : 'Dominds 已提醒上下文告急:立即停止继续大实现/大阅读。本程只做保信息:先用当前对话范围(scope=dialog)接续包提醒项写明本路任务目标,再把确需共享给同一差遣牒其它对话的讨论事实落到差遣牒合适章节,最后提炼恢复本路对话容易丢的接续包提醒项并 `clear_mind`。'
143
143
  : ctx.contextHealthPromptMode === 'caution'
144
144
  ? ctx.isSideDialog
145
- ? 'Dominds 已提醒上下文吃紧:不要继续扩张上下文。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,优先维护足够详尽的接续包提醒项并尽快 `clear_mind`。提醒项没有固定长度限制。'
146
- : 'Dominds 已提醒上下文吃紧:不要继续扩张上下文。本程优先把尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再提炼提醒项并尽快 `clear_mind`,不要继续大实现/大阅读。'
145
+ ? 'Dominds 已提醒上下文吃紧:不要继续扩张上下文。你当前处于支线对话;本程不维护差遣牒,也不整理差遣牒更新提案,优先维护足够详尽的当前对话范围(scope=dialog)接续包提醒项并写明本路任务目标,然后尽快 `clear_mind`。提醒项没有固定长度限制。'
146
+ : 'Dominds 已提醒上下文吃紧:不要继续扩张上下文。本程优先用当前对话范围(scope=dialog)接续包提醒项写明本路任务目标,再把确需共享给同一差遣牒其它对话的讨论事实落到差遣牒合适章节,最后提炼恢复本路对话容易丢的提醒项并尽快 `clear_mind`,不要继续大实现/大阅读。'
147
147
  : '当前没有生效中的上下文保全提示,按正常工作流推进。';
148
148
  const taskdocLogLineZh = ctx.contextHealthPromptMode === 'critical'
149
149
  ? ctx.isSideDialog
150
- ? 'Dominds 已提醒上下文告急:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项没有固定长度限制,宁可完整一些;允许多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
151
- : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。Dominds 已提醒上下文告急:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;本程允许先保留多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
150
+ ? 'Dominds 已提醒上下文告急:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前这一路支线对话的任务目标、讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入当前对话范围(scope=dialog)接续包提醒项。提醒项没有固定长度限制,宁可完整一些;允许多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步按 scope=dialog 提醒项里的本路任务目标继续,再复核整理:删除冗余、纠正偏激/失真思路,收敛成高质量提醒项。'
151
+ : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。Dominds 已提醒上下文告急:先确保当前对话范围(scope=dialog)接续包提醒项写明本路任务目标;再检查当前对话历史里尚未落文档的讨论细节,只有确需同一差遣牒其它对话/队友共享的状态/决策/约束/目标,主线才优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复本路对话容易丢的细节;本程允许先保留多条粗略提醒项求稳,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步按 scope=dialog 提醒项里的本路任务目标继续,再复核整理:删除冗余、纠正偏激/失真思路,收敛成高质量提醒项。'
152
152
  : ctx.contextHealthPromptMode === 'caution'
153
153
  ? ctx.isSideDialog
154
- ? 'Dominds 已提醒上下文吃紧:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前对话历史中下一程需要知道的讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入接续包提醒项。提醒项没有固定长度限制,宁可完整一些;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
155
- : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。Dominds 已提醒上下文吃紧:先检查当前对话历史里尚未落文档的讨论细节;能作为全队共享状态/决策/约束/目标的,主线优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复工作容易丢的细节;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步再复核整理:删除冗余、纠正偏激/失真思路,再收敛成高质量提醒项。'
156
- : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步;提醒项也只留可扫读摘录。接续包提醒项默认应保持结构化、便于快速恢复。';
154
+ ? 'Dominds 已提醒上下文吃紧:支线对话不要维护差遣牒,也不要整理差遣牒更新提案;把当前这一路支线对话的任务目标、讨论细节、下一步、关键定位、运行/验证信息、临时路径/ID/样例输入和恢复依据写入当前对话范围(scope=dialog)接续包提醒项。提醒项没有固定长度限制,宁可完整一些;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步按 scope=dialog 提醒项里的本路任务目标继续,再复核整理:删除冗余、纠正偏激/失真思路,收敛成高质量提醒项。'
155
+ : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步。Dominds 已提醒上下文吃紧:先确保当前对话范围(scope=dialog)接续包提醒项写明本路任务目标;再检查当前对话历史里尚未落文档的讨论细节,只有确需同一差遣牒其它对话/队友共享的状态/决策/约束/目标,主线才优先用 `do_mind` 新增章节保存;只有在确实需要改写已有章节、已完成合并并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash` 时,才用 `change_mind`。接续包提醒项只留差遣牒仍未覆盖、但恢复本路对话容易丢的细节;若一时来不及,可先保留多条粗略提醒项过桥,但不要在当前程提前做“新一程清醒复核”。Dominds 真正开启新一程后,第一步按 scope=dialog 提醒项里的本路任务目标继续,再复核整理:删除冗余、纠正偏激/失真思路,收敛成高质量提醒项。'
156
+ : '不要把长日志/大段 tool output 直接塞进差遣牒;差遣牒只写结论+下一步;提醒项也只留可扫读摘录。准备 `clear_mind` 的接续包提醒项必须是当前对话范围(scope=dialog),写明本路任务目标,并保持结构化、便于快速恢复。';
157
157
  const contextHealthLineEn = ctx.contextHealthPromptMode === 'critical'
158
158
  ? ctx.isSideDialog
159
- ? 'Dominds has warned that context is critical: stop large implementations/reads immediately. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Only maintain sufficiently detailed continuation-package reminders and `clear_mind`. Reminders have no fixed length limit.'
160
- : 'Dominds has warned that context is critical: stop large implementations/reads immediately. In this course, only preserve information: first record current-dialog discussion details that are not yet documented but the next course needs to know into the appropriate Taskdoc sections, then distill continuation-package reminders and `clear_mind`.'
159
+ ? 'Dominds has warned that context is critical: stop large implementations/reads immediately. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Only maintain sufficiently detailed current-dialog scoped (scope=dialog) continuation-package reminders, state this dialog task goal, then `clear_mind`. Reminders have no fixed length limit.'
160
+ : 'Dominds has warned that context is critical: stop large implementations/reads immediately. In this course, only preserve information: first state this dialog task goal in a current-dialog scoped (scope=dialog) continuation-package reminder, then record only discussion facts that other dialogs/teammates sharing the same Taskdoc truly need to know, then distill details easy to lose when resuming this dialog into continuation-package reminders and `clear_mind`.'
161
161
  : ctx.contextHealthPromptMode === 'caution'
162
162
  ? ctx.isSideDialog
163
- ? 'Dominds has warned that context is tight: do not keep expanding context. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Prioritize sufficiently detailed continuation-package reminders and `clear_mind`. Reminders have no fixed length limit.'
164
- : 'Dominds has warned that context is tight: do not keep expanding context. In this course, first record undocumented discussion details that the next course needs to know into the appropriate Taskdoc sections, then distill reminders and `clear_mind`; do not continue large implementations/reads.'
163
+ ? 'Dominds has warned that context is tight: do not keep expanding context. You are in a Side Dialog; in this course, do not maintain Taskdoc and do not draft Taskdoc update proposals. Prioritize sufficiently detailed current-dialog scoped (scope=dialog) continuation-package reminders, state this dialog task goal, then `clear_mind`. Reminders have no fixed length limit.'
164
+ : 'Dominds has warned that context is tight: do not keep expanding context. In this course, first state this dialog task goal in a current-dialog scoped (scope=dialog) continuation-package reminder, then record only discussion facts that other dialogs/teammates sharing the same Taskdoc truly need to know, then distill details easy to lose when resuming this dialog into reminders and `clear_mind`; do not continue large implementations/reads.'
165
165
  : 'There is no active context-preservation notice in effect right now; proceed with the normal workflow.';
166
166
  const taskdocLogLineEn = ctx.contextHealthPromptMode === 'critical'
167
167
  ? ctx.isSideDialog
168
- ? 'Dominds has warned that context is critical: 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. Reminders have no fixed length 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 Dominds 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. Dominds has warned that context is critical: 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 Dominds 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.'
168
+ ? 'Dominds has warned that context is critical: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put this specific Side Dialog task goal, discussion details, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into current-dialog scoped (scope=dialog) continuation-package reminders. Reminders have no fixed length 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 Dominds actually starts the new course, first continue from the task goal in scope=dialog reminders, then review/rewrite them: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
169
+ : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Dominds has warned that context is critical: first make sure a current-dialog scoped (scope=dialog) continuation-package reminder states this dialog task goal. Then review current-dialog discussion details not yet written into documentation; only if they truly need to be shared with other dialogs/teammates on the same Taskdoc, 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 when resuming this dialog. Rough multi-reminder bridge notes are acceptable in this course, but do not perform the new-course “clear-headed review” early. Once Dominds actually starts the new course, first continue from the task goal in scope=dialog reminders, then review/rewrite them: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
170
170
  : ctx.contextHealthPromptMode === 'caution'
171
171
  ? ctx.isSideDialog
172
- ? 'Dominds has warned that context is tight: 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. Reminders have no fixed length 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 Dominds 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. Dominds has warned that context is tight: 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 Dominds 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
- : '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.';
172
+ ? 'Dominds has warned that context is tight: in a Side Dialog, do not maintain Taskdoc and do not draft Taskdoc update proposals. Put this specific Side Dialog task goal, discussion details, next actions, key pointers, run/verify info, volatile paths/IDs/sample inputs, and resume reasoning into current-dialog scoped (scope=dialog) continuation-package reminders. Reminders have no fixed length 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 Dominds actually starts the new course, first continue from the task goal in scope=dialog reminders, then review/rewrite them: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
173
+ : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps. Dominds has warned that context is tight: first make sure a current-dialog scoped (scope=dialog) continuation-package reminder states this dialog task goal. Then review current-dialog discussion details not yet written into documentation; only if they truly need to be shared with other dialogs/teammates on the same Taskdoc, 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 when resuming this dialog. If needed, rough multi-reminder bridge notes are acceptable, but do not perform the new-course “clear-headed review” early. Once Dominds actually starts the new course, first continue from the task goal in scope=dialog reminders, then review/rewrite them: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
174
+ : 'Do not paste long logs/tool outputs into Taskdoc; Taskdoc should record decisions + next steps; reminders should also keep only scannable excerpts. Continuation-package reminders before `clear_mind` must be current-dialog scoped (scope=dialog), state this dialog task goal, and stay structured for fast resume.';
175
175
  if (ctx.language === 'zh') {
176
176
  return {
177
177
  title: '### 记忆系统(重要)',
@@ -180,29 +180,29 @@ function getMemoryPromptCopy(ctx) {
180
180
  taskdocContractLine: '- 差遣牒(`*.tsk/`):全队共享的任务契约(goals/constraints/progress);不是个人笔记,保持足够短,每轮都应可通读。',
181
181
  taskdocSemanticsLine: '- 章节语义约定:`progress` 是全队共享、准实时、可扫读的任务公告牌,用来记录当前有效状态、关键决策、下一步与仍成立阻塞;不是流水账,也不是个人工作记录。`goals` / `constraints` 是较稳定的任务契约;每次更新都必须保留仍然有效的他人条目。',
182
182
  taskdocSectionReplaceLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
183
- ? '- Dominds 已提醒当前上下文吃紧/告急,且你处于支线对话:本程不要维护差遣牒,也不要整理差遣牒更新提案;把下一程需要恢复的细节写入足够详尽的接续包提醒项。'
183
+ ? '- Dominds 已提醒当前上下文吃紧/告急,且你处于支线对话:本程不要维护差遣牒,也不要整理差遣牒更新提案;把本路任务目标和下一程需要恢复的细节写入足够详尽的当前对话范围(scope=dialog)接续包提醒项。'
184
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
- ? '- Dominds 已提醒当前上下文吃紧/告急,且你处于支线对话:本程不更新 `progress`;只把下一程接续所需信息写入提醒项。'
186
+ ? '- Dominds 已提醒当前上下文吃紧/告急,且你处于支线对话:本程不更新 `progress`;只把本路任务目标和下一程接续所需信息写入当前对话范围(scope=dialog)提醒项。'
187
187
  : '- 更新 `progress` 时:它必须始终是可供全队扫读的完整当前快照,而不是只追加自己这一轮的零散笔记。',
188
188
  injectedTaskdocLine: '- 重要:差遣牒内容会被系统以内联形式注入到上下文中(本轮生成视角下即为最新;注入内容不包括全局约束)。需要回顾时请直接基于上下文里的差遣牒内容回顾与决策,不要试图用通用文件工具读取 `*.tsk/` 下的文件(会被拒绝)。',
189
189
  constraintsLine: '- 约定:`constraints` 只写任务特有的硬要求,不得写入系统提示/工具文档里已明确且由系统强制执行的通用规则(例如 `*.tsk/` 封装禁止通用文件工具)。一经发现重复,必须删除并告知用户。',
190
190
  remindersLine: ctx.isSideDialog
191
- ? '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,整理“结构化接续包提醒项”;提醒项保留恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若 Dominds 已提醒当前程吃紧/告急,支线对话不要维护差遣牒,也不要整理差遣牒更新提案;只维护足够详尽的接续包提醒项,提醒项没有固定长度限制,允许先保留多条粗略提醒项把信息带过桥;当前程只做保信息 + clear_mind;只有 Dominds 实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。'
192
- : '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,先把尚未落实到文档、且下一程需要知会的讨论细节落到差遣牒合适章节,再整理“结构化接续包提醒项”;提醒项只保留差遣牒仍未覆盖、但恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若 Dominds 已提醒当前程吃紧/告急,则允许先保留多条粗略提醒项把信息带过桥;当前程只做落文档、保信息 + clear_mind;只有 Dominds 实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。',
191
+ ? '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,整理当前对话范围(scope=dialog)的“结构化接续包提醒项”,必须写明本路任务目标,并保留恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若 Dominds 已提醒当前程吃紧/告急,支线对话不要维护差遣牒,也不要整理差遣牒更新提案;只维护足够详尽的 scope=dialog 接续包提醒项,提醒项没有固定长度限制,允许先保留多条粗略提醒项把信息带过桥;当前程只做保信息 + clear_mind;只有 Dominds 实际开启新一程后,第一步才是按 scope=dialog 提醒项里的本路任务目标继续,再复核整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。'
192
+ : '- 提醒项(以 `reminder_id` 标识,手头工作):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,先用当前对话范围(scope=dialog)结构化接续包提醒项写明本路任务目标,再把尚未落实到文档、且下一程需要同一差遣牒其它对话/队友知会的讨论细节落到差遣牒合适章节;提醒项只保留差遣牒仍未覆盖、但恢复本路对话容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若 Dominds 已提醒当前程吃紧/告急,则允许先保留多条粗略 scope=dialog 提醒项把信息带过桥;当前程只做落文档、保信息 + clear_mind;只有 Dominds 实际开启新一程后,第一步才是按 scope=dialog 提醒项里的本路任务目标继续,再复核整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。',
193
193
  teamMemoryLine: '- 团队记忆:稳定的团队约定/工程规约(跨任务共享)。',
194
194
  personalMemoryLine: '- 个人记忆:稳定的个人习惯/偏好与职责域知识;记忆会在每次生成时自动注入上下文,应保持少量且准确(关键文档/代码的精确路径 + 最小必要事实)。不要记录具体任务状态。',
195
195
  skillsLine: '- Skills:可复用操作指引/检查清单/触发条件与边界。工作区关联强的事实、路径、局部契约进 memory/env;独立于工作区内容的“怎么做”进 skill。skill 不授予工具权限;需要脚本/MCP/外部能力时应配套 app/toolset/权限配置。',
196
196
  sideDialogDutyLine: ctx.contextHealthPromptMode === 'normal'
197
197
  ? `你当前处于支线对话:此处不允许 \`do_mind\` / \`mind_more\` / \`change_mind\` / \`never_mind\`。当你判断需要更新差遣牒(尤其是 progress 公告牌)时,请在合适时机直接诉请差遣牒维护人 \`@${ctx.taskdocMaintainerId}\` 执行更新,并给出要新增的章节、要追加的条目、已合并好的“新全文/替换稿”,或要删除的章节。不要声称已更新,除非看到回执。`
198
- : '你当前处于支线对话,且 Dominds 已提醒上下文吃紧/告急:本程不要维护差遣牒,也不要整理差遣牒更新提案。请把下一程需要恢复的讨论细节、定位、验证方式和临时信息写入足够详尽的接续包提醒项。',
198
+ : '你当前处于支线对话,且 Dominds 已提醒上下文吃紧/告急:本程不要维护差遣牒,也不要整理差遣牒更新提案。请把本路任务目标、下一程需要恢复的讨论细节、定位、验证方式和临时信息写入足够详尽的当前对话范围(scope=dialog)接续包提醒项。',
199
199
  mainDialogDutyLine: '你当前处于主线对话:你负责综合维护全队共享差遣牒(尤其是 progress 公告牌)。当队友/支线对话提出更新建议时,及时合并、压缩并保持清晰。',
200
200
  teammateTellaskRoundDoneLine: `队友诉请重要语义:当你在诉请者上下文中收到带${runtimeMarkers.finalCompleted}标记的回贴,表示该轮诉请已经结束;对方不会继续执行同一轮诉请。此时如果目标未达成,“等待”是错误的:必须显式发起新一轮 tellask 才能继续推进。并行语义:不要把智能体队友当成真人同事;祂不会因为你又发一条诉请而被打扰。同一个队友 + 同一个 sessionSlug = 接着同一件事说,并更新那件正在做的事;tellaskSessionless 或不同 sessionSlug = 另一件独立任务。`,
201
201
  teamMemoryHintLine: '提示:你具备团队记忆工具(`add_team_memory` / `replace_team_memory` / `drop_team_memory` / `clear_team_memory`),可在必要时维护团队记忆(谨慎、少量、只写稳定约定)。',
202
202
  personalMemoryHintLine: `提示:你具备个人记忆工具(\`add_personal_memory\` / \`replace_personal_memory\` / \`drop_personal_memory\` / \`clear_personal_memory\`)。个人记忆仅对当前智能体可见,且系统会自动按成员隔离到 \`.minds/memory/individual/<member-id>/...\`;因此 \`path\` 不应包含你的成员 id(不要写 \`${ctx.agentId}/...\`)。首次创建时直接用 \`add_personal_memory\` 即可,目录会由系统自动创建。记忆会在每次生成时自动注入上下文:保持少量、保持准确、按“未来会一起更新的内容”合并;写稳定事实(关键路径 + 最小必要约定),不要写任务进度/当天状态;一旦你修改了相关文件或发现记忆过期/冲突,立刻用 \`replace_personal_memory\` 更新。`,
203
203
  sideDialogWorkflowLine: ctx.contextHealthPromptMode === 'normal'
204
204
  ? `工作流:先做事 → 再提炼(\`update_reminder\`;必要时整理差遣牒追加条目/更新提案并诉请 \`@${ctx.taskdocMaintainerId}\` 合并写入)→ 然后 \`clear_mind\` 清空噪音。`
205
- : '工作流:停止扩张上下文 → 维护足够详尽的接续包提醒项(`add_reminder` 或 `update_reminder`,没有固定长度限制)→ 然后 `clear_mind` 开启新一程。',
205
+ : '工作流:停止扩张上下文 → 维护足够详尽的当前对话范围(scope=dialog)接续包提醒项(`add_reminder` 或 `update_reminder`,必须写明本路任务目标,没有固定长度限制)→ 然后 `clear_mind` 开启新一程。',
206
206
  mainDialogWorkflowLine: '工作流:先做事 -> 再提炼(`update_reminder` + `mind_more(progress)`;需要压缩/删旧时先 `recall_taskdoc` 取得 `content_hash`,再用带 `previous_content_hash` 的 `change_mind`;要删除整章文件时用 `never_mind`)-> 然后 `clear_mind` 清空噪音。',
207
207
  ...(ctx.isSideDialog
208
208
  ? {}
@@ -220,29 +220,29 @@ function getMemoryPromptCopy(ctx) {
220
220
  taskdocContractLine: '- Taskdoc (`*.tsk/`): the team-shared task contract (goals/constraints/progress). It is not a personal notebook; keep it small enough to read every course.',
221
221
  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.',
222
222
  taskdocSectionReplaceLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
223
- ? '- Dominds has warned that context is tight/critical in this 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.'
223
+ ? '- Dominds has warned that context is tight/critical in this Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course; put this dialog task goal and resume-critical details into sufficiently detailed current-dialog scoped (scope=dialog) continuation-package reminders.'
224
224
  : `- 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).`,
225
225
  progressLine: ctx.isSideDialog && ctx.contextHealthPromptMode !== 'normal'
226
- ? '- Dominds has warned that context is tight/critical in this Side Dialog: do not update `progress` in this course; put resume-critical information into reminders only.'
226
+ ? '- Dominds has warned that context is tight/critical in this Side Dialog: do not update `progress` in this course; put this dialog task goal and resume-critical information into current-dialog scoped (scope=dialog) reminders only.'
227
227
  : '- When updating `progress`, keep it as a complete, team-scannable current snapshot instead of appending only your own latest notes.',
228
228
  injectedTaskdocLine: '- Important: the Taskdoc content is injected inline into the context (the latest as of this generation; injected content excludes global constraints). Review the injected Taskdoc instead of trying to read files under `*.tsk/` via general file tools (they will be rejected).',
229
229
  constraintsLine: '- Convention: Taskdoc `constraints` must contain task-specific requirements only; do not include global, system-enforced rules already stated in system prompt/tool docs (e.g. `.tsk/` encapsulation bans general file tools). If duplication is found, you MUST remove it and notify the user.',
230
230
  remindersLine: ctx.isSideDialog
231
- ? '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, create a structured continuation-package reminder that preserves details easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If Dominds has warned that the current course is tight/critical, you are in a Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals; only maintain sufficiently detailed continuation-package reminders. Reminders have no fixed length limit, rough multi-reminder bridge notes are acceptable, and in the current course you should only preserve volatile information and clear_mind. Only after Dominds actually starts the new course does the mandatory first step become reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
232
- : '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, first record undocumented discussion details that the next course needs to know into the appropriate Taskdoc sections, then create a structured continuation-package reminder. Reminders should keep only details still not covered by Taskdoc but easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If Dominds has warned that the current course is tight/critical, rough multi-reminder bridge notes are acceptable; in the current course, only document missing details, preserve volatile information, and clear_mind. Only after Dominds actually starts the new course does the mandatory first step become reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.',
231
+ ? '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, create a current-dialog scoped (scope=dialog) structured continuation-package reminder, state this dialog task goal, and preserve details easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If Dominds has warned that the current course is tight/critical, you are in a Side Dialog: do not maintain Taskdoc and do not draft Taskdoc update proposals; only maintain sufficiently detailed scope=dialog continuation-package reminders. Reminders have no fixed length limit, rough multi-reminder bridge notes are acceptable, and in the current course you should only preserve volatile information and clear_mind. Only after Dominds actually starts the new course does the mandatory first step become continuing this dialog from the task goal in scope=dialog reminders, then reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.'
232
+ : '- Reminders (addressed by `reminder_id`, current work): your high-frequency per-dialog worklog + critical details (not a team bulletin board); keep it small by default (often 1–3 items), prefer `update_reminder` to compress/merge, and delete when obsolete. When preparing `clear_mind` to start a new course, first state this dialog task goal in a current-dialog scoped (scope=dialog) structured continuation-package reminder, then record undocumented discussion details that other dialogs/teammates sharing the same Taskdoc truly need to know into the appropriate Taskdoc sections. Reminders should keep only details still not covered by Taskdoc but easy to lose when resuming this dialog (first step, key pointers, run/verify info, volatile ids/paths). If Dominds has warned that the current course is tight/critical, rough multi-reminder scope=dialog bridge notes are acceptable; in the current course, only document missing details, preserve volatile information, and clear_mind. Only after Dominds actually starts the new course does the mandatory first step become continuing this dialog from the task goal in scope=dialog reminders, then reviewing and rewriting those continuation/rough reminders with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress them into high-quality reminders.',
233
233
  teamMemoryLine: '- Team memory: stable shared conventions (cross-task).',
234
234
  personalMemoryLine: '- Personal memory: stable personal habits/preferences and responsibility-scope knowledge. Memory is automatically injected into context on each generation: keep it small and accurate (exact key doc/code paths + minimal key facts); do not store per-task state.',
235
235
  skillsLine: '- Skills: reusable operating guidance, checklists, triggers, and boundaries. Workspace-coupled facts, paths, and local contracts belong in memory/env; workspace-independent “how to do it” procedures belong in skills. Skills do not grant tool permissions; pair scripts/MCP/external capabilities with apps/toolsets/permission configuration.',
236
236
  sideDialogDutyLine: ctx.contextHealthPromptMode === 'normal'
237
237
  ? `You are currently in a Side Dialog: \`do_mind\` / \`mind_more\` / \`change_mind\` / \`never_mind\` are not allowed here. When Taskdoc should be updated (especially the shared progress bulletin board), tellask the Taskdoc maintainer \`@${ctx.taskdocMaintainerId}\` with the new section to create, entries to append, a fully merged replacement draft, or the section to delete. Do not claim it is updated until you see a receipt.`
238
- : 'You are currently in a Side Dialog, and Dominds has warned that context is tight/critical: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course. Put discussion details, pointers, verification method, and volatile resume information into sufficiently detailed continuation-package reminders.',
238
+ : 'You are currently in a Side Dialog, and Dominds has warned that context is tight/critical: do not maintain Taskdoc and do not draft Taskdoc update proposals in this course. Put this dialog task goal, discussion details, pointers, verification method, and volatile resume information into sufficiently detailed current-dialog scoped (scope=dialog) continuation-package reminders.',
239
239
  mainDialogDutyLine: 'You are currently in the Main Dialog: you are responsible for keeping the team-shared Taskdoc coherent and up to date (especially the progress bulletin board). Merge proposals from teammates/Side Dialogs promptly and keep it concise.',
240
240
  teammateTellaskRoundDoneLine: `Teammate Tellask semantics: when you receive a tellasker reply with the ${runtimeMarkers.finalCompleted} marker, that Tellask round is finished; the tellaskee will not keep executing the same call in the background. If the objective is not met, “waiting” is wrong: you must explicitly start a new Tellask round to continue. Parallel semantics: do not treat an agent teammate like a human coworker who can only handle one conversation at a time. Same teammate + same sessionSlug = continue the same task and update that task; tellaskSessionless or a different sessionSlug = another independent task.`,
241
241
  teamMemoryHintLine: 'Hint: you have team-memory tools (`add_team_memory` / `replace_team_memory` / `drop_team_memory` / `clear_team_memory`) and may maintain team memory when it is truly stable and worth sharing.',
242
242
  personalMemoryHintLine: `Hint: you have personal-memory tools (\`add_personal_memory\` / \`replace_personal_memory\` / \`drop_personal_memory\` / \`clear_personal_memory\`). Personal memory is private to the current agent and is automatically isolated under \`.minds/memory/individual/<member-id>/...\`; therefore \`path\` MUST NOT include your member id (do not write \`${ctx.agentId}/...\`). For first-time setup, just call \`add_personal_memory\`—the directory will be created automatically. Memory is automatically injected into context on each generation: keep it small, keep it accurate, and group facts that are updated together. Store stable facts (exact key paths + minimal contracts), not daily state/progress. If you changed those files or detect staleness/conflicts, immediately \`replace_personal_memory\` to keep it accurate.`,
243
243
  sideDialogWorkflowLine: ctx.contextHealthPromptMode === 'normal'
244
244
  ? `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.`
245
- : 'Workflow: stop expanding context → maintain sufficiently detailed continuation-package reminders (`add_reminder` or `update_reminder`, with no fixed length limit) → then `clear_mind` to start a new course.',
245
+ : 'Workflow: stop expanding context → maintain sufficiently detailed current-dialog scoped (scope=dialog) continuation-package reminders (`add_reminder` or `update_reminder`, must state this dialog task goal, with no fixed length limit) → then `clear_mind` to start a new course.',
246
246
  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.',
247
247
  ...(ctx.isSideDialog
248
248
  ? {}
@@ -287,7 +287,7 @@ function buildTellaskInteractionRules(language) {
287
287
  '- `tellask`:用于可恢复的长线诉请(必须提供 `targetAgentId` / `sessionSlug` / `tellaskContent`)。',
288
288
  '- `tellaskSessionless`:用于一次性诉请(必须提供 `targetAgentId` / `tellaskContent`);它不能接着旧任务改要求,后续再次调用只是另一件独立任务,不会影响旧任务继续执行,也不会打扰同一队友正在执行的其它独立诉请。不要把智能体队友当成需要排队说话的真人同事。',
289
289
  '- `askHuman`:用于 Q4H(向人类请求必要澄清/决策/授权/缺失输入)。',
290
- '- `answerHuman`:用于把当前要给人类看的答复记录为 A2H(answer to human);不要用它向队友回贴。',
290
+ '- `answerHuman`:用于把当前要给人类看的答复或状态说明记录为 A2H(answer to human);当本轮必须使用工具、但确实没有其它实质工具应调用时,用它完成当前工具轮次。特别是正在等待 active callees 或诉请回贴、唯一正确动作是说明情况并等待时,应调用 `answerHuman({ answerContent })` 收口;不要用它向队友回贴。',
291
291
  '- `freshBootsReasoning`:用于发起扪心自问(FBR)支线(`tellaskContent` 必填,`effort` 可选)。',
292
292
  ],
293
293
  en: [
@@ -295,7 +295,7 @@ function buildTellaskInteractionRules(language) {
295
295
  '- `tellask`: resumable tellask (requires `targetAgentId` / `sessionSlug` / `tellaskContent`).',
296
296
  '- `tellaskSessionless`: one-shot tellask (requires `targetAgentId` / `tellaskContent`); it cannot continue an earlier task or change its requirements. Later calls are separate tasks and do not affect earlier work for the same teammate. Do not treat agent teammates like human coworkers who need you to wait in line to talk.',
297
297
  '- `askHuman`: Q4H for necessary clarification/decision/authorization/missing input.',
298
- '- `answerHuman`: record the current human-facing answer as A2H (answer to human); do not use it to reply to teammates.',
298
+ '- `answerHuman`: record the current human-facing answer or status as A2H (answer to human). When this round must use a tool but no other substantive tool should be called, use it to complete the current tool round. Especially while waiting for active callees or tellask replies, when the only correct action is to explain the situation and wait, call `answerHuman({ answerContent })` to close the round; do not use it to reply to teammates.',
299
299
  '- `freshBootsReasoning`: starts an FBR Side Dialog (requires `tellaskContent`, optional `effort`).',
300
300
  ],
301
301
  });
@@ -306,11 +306,13 @@ function buildFunctionToolRules(language, funcToolRulesText) {
306
306
  zh: [
307
307
  '- 回答必须基于可观测事实;为获取事实优先使用可用工具,缺乏观测事实时明确说明并请求/补充获取,不得臆测。',
308
308
  `- 你必须通过原生 function-calling 发起函数工具调用。请提供严格的 JSON 参数对象,并尽量匹配工具 schema。Dominds 会对 schema 做 best-effort 校验(例如 required / additionalProperties:false / 基础 type / primitive enum / primitive const);其余复杂关键字(pattern/format/min/max/oneOf 等)与语义约束以工具报错为准。${funcToolRulesText}`,
309
+ '- 若本轮被要求调用工具,但当前确实没有应调用的事实获取/执行/诉请/回贴工具,且唯一合理动作是停止并等待(例如等待 active callees 或诉请回贴),调用 `answerHuman({ answerContent })` 说明当前等待状态并完成本工具轮次;不要为了满足工具要求而重复调用无意义的普通工具。',
309
310
  '- 若遇到权限/沙盒/工具不可用:按要求申请升级或发起 Q4H;禁止编造结果。',
310
311
  ],
311
312
  en: [
312
313
  '- Answers must be grounded in observed facts. Use available tools to obtain facts; if facts are missing, say so and request/obtain them—do not guess.',
313
314
  `- You must invoke function tools via native function-calling. Provide a valid JSON object for the tool's arguments and match the tool schema as closely as possible. Dominds performs best-effort schema validation (for example required / additionalProperties:false / basic types / primitive enum / primitive const); other complex keywords (pattern/format/min/max/oneOf etc.) and semantic constraints are enforced via tool errors.${funcToolRulesText}`,
315
+ '- If this round requires a tool call but there is truly no fact-gathering, action, tellask, or reply tool that should be called, and the only reasonable action is to stop and wait (for example waiting for active callees or tellask replies), call `answerHuman({ answerContent })` to explain the current wait state and complete this tool round; do not repeat meaningless ordinary tool calls just to satisfy the tool requirement.',
314
316
  '- If a tool is unavailable due to permissions/sandboxing, request escalation or ask Q4H; do not fabricate results.',
315
317
  ],
316
318
  });
@@ -409,7 +411,7 @@ function buildSystemPrompt(input) {
409
411
  - 回问诉请:支线对话用 \`tellaskBack\` 回问诉请者以澄清。
410
412
  - 扪心自问(FBR):由 \`freshBootsReasoning\` 触发的“无工具”支线推理机制。
411
413
  - 向人请示(Q4H):通过 \`askHuman\` 向人类请求必要的澄清/决策/授权/缺失输入。
412
- - 答复人类(A2H):通过 \`answerHuman\` 记录当前要给人类看的答复。
414
+ - 答复人类(A2H):通过 \`answerHuman\` 记录当前要给人类看的答复或状态说明。
413
415
  - 长线诉请:使用 \`tellask\` + \`sessionSlug\` 的可恢复多轮协作。
414
416
  - 一次性诉请:一次性、不可恢复的诉请。
415
417
  - 主线对话:承载共享差遣牒并负责整体推进的对话。
@@ -510,7 +512,7 @@ System notices convey important state changes (e.g., context caution/critical, D
510
512
  - TellaskBack: a Side Dialog uses \`tellaskBack\` to ask the tellasker for clarification.
511
513
  - Fresh Boots Reasoning (FBR): a tool-less Side Dialog reasoning mechanism triggered by \`freshBootsReasoning\`.
512
514
  - Q4H (Question for Human): use \`askHuman\` to request necessary clarification/decision/authorization/missing input from a human.
513
- - A2H (Answer to Human): use \`answerHuman\` to record the current human-facing answer.
515
+ - A2H (Answer to Human): use \`answerHuman\` to record the current human-facing answer or status.
514
516
  - Tellask Session: resumable multi-turn work using \`tellask\` with \`sessionSlug\`.
515
517
  - Fresh Tellask: a one-shot, non-resumable Tellask.
516
518
  - Main Dialog: the dialog that owns the shared Taskdoc and overall progress.
@@ -697,8 +697,8 @@ function serializeReminderSnapshot(reminder) {
697
697
  ownerName: reminder.owner?.name,
698
698
  meta: reminder.meta,
699
699
  echoback: reminder.echoback,
700
- scope: reminder.scope ?? 'dialog',
701
- renderMode: reminder.renderMode ?? 'markdown',
700
+ scope: reminder.scope,
701
+ renderMode: reminder.renderMode,
702
702
  createdAt: reminder.createdAt ?? (0, time_1.formatUnifiedTimestamp)(new Date()),
703
703
  priority: reminder.priority ?? 'medium',
704
704
  };
@@ -9308,6 +9308,7 @@ class DialogPersistence {
9308
9308
  static resolvePendingUserInterjectionReplyFromCourseEvents(events, course) {
9309
9309
  let pendingUserInterjectionReply;
9310
9310
  let visibleReplySettled = false;
9311
+ let visibleReplyGenseq;
9311
9312
  for (const event of events) {
9312
9313
  if (event.type === 'human_text_record') {
9313
9314
  if (event.origin !== 'user')
@@ -9321,6 +9322,7 @@ class DialogPersistence {
9321
9322
  genseq: (0, storage_1.toCallSiteGenseqNo)(event.genseq),
9322
9323
  };
9323
9324
  visibleReplySettled = false;
9325
+ visibleReplyGenseq = undefined;
9324
9326
  continue;
9325
9327
  }
9326
9328
  if (pendingUserInterjectionReply === undefined) {
@@ -9328,23 +9330,38 @@ class DialogPersistence {
9328
9330
  }
9329
9331
  if (event.type === 'agent_words_record') {
9330
9332
  visibleReplySettled = true;
9333
+ visibleReplyGenseq = event.genseq;
9331
9334
  continue;
9332
9335
  }
9333
9336
  if (event.type === 'func_call_record' || event.type === 'tellask_call_record') {
9334
- visibleReplySettled = false;
9337
+ if (visibleReplyGenseq === undefined || event.genseq <= visibleReplyGenseq) {
9338
+ visibleReplySettled = false;
9339
+ visibleReplyGenseq = undefined;
9340
+ }
9335
9341
  }
9336
9342
  }
9337
9343
  return visibleReplySettled ? undefined : pendingUserInterjectionReply;
9338
9344
  }
9339
9345
  static resolveAnsweredUserInterjectionA2HFromCourseEvents(args) {
9340
9346
  let pendingUserInterjectionReply;
9341
- let lastVisibleAnswer;
9342
- let visibleReplySettled = false;
9347
+ let visibleAnswer;
9348
+ let hasAutoDriveAfterVisibleAnswer = false;
9349
+ let possibleAutoDriveStartGenseq;
9343
9350
  for (const event of args.events) {
9344
9351
  if (event.type === 'human_text_record') {
9345
- if (event.origin !== 'user')
9352
+ if (event.origin !== 'user') {
9353
+ if (visibleAnswer !== undefined &&
9354
+ possibleAutoDriveStartGenseq !== undefined &&
9355
+ event.genseq === possibleAutoDriveStartGenseq) {
9356
+ hasAutoDriveAfterVisibleAnswer = true;
9357
+ }
9346
9358
  continue;
9359
+ }
9347
9360
  if (typeof event.q4hAnswerCallId === 'string' && event.q4hAnswerCallId.trim() !== '') {
9361
+ pendingUserInterjectionReply = undefined;
9362
+ visibleAnswer = undefined;
9363
+ hasAutoDriveAfterVisibleAnswer = false;
9364
+ possibleAutoDriveStartGenseq = undefined;
9348
9365
  continue;
9349
9366
  }
9350
9367
  pendingUserInterjectionReply = {
@@ -9352,24 +9369,56 @@ class DialogPersistence {
9352
9369
  course: (0, storage_1.toDialogCourseNumber)(args.course),
9353
9370
  genseq: (0, storage_1.toCallSiteGenseqNo)(event.genseq),
9354
9371
  };
9355
- visibleReplySettled = false;
9356
- lastVisibleAnswer = undefined;
9372
+ visibleAnswer = undefined;
9373
+ hasAutoDriveAfterVisibleAnswer = false;
9374
+ possibleAutoDriveStartGenseq = undefined;
9357
9375
  continue;
9358
9376
  }
9359
9377
  if (pendingUserInterjectionReply === undefined) {
9360
9378
  continue;
9361
9379
  }
9362
9380
  if (event.type === 'agent_words_record') {
9363
- visibleReplySettled = true;
9364
- lastVisibleAnswer = { content: event.content, genseq: event.genseq };
9381
+ if (visibleAnswer !== undefined &&
9382
+ (hasAutoDriveAfterVisibleAnswer ||
9383
+ (possibleAutoDriveStartGenseq !== undefined &&
9384
+ event.genseq === possibleAutoDriveStartGenseq))) {
9385
+ hasAutoDriveAfterVisibleAnswer = true;
9386
+ continue;
9387
+ }
9388
+ visibleAnswer = { content: event.content, genseq: event.genseq };
9389
+ continue;
9390
+ }
9391
+ if (event.type === 'gen_start_record') {
9392
+ if (visibleAnswer !== undefined &&
9393
+ (typeof event.msgId !== 'string' || event.msgId.trim() === '')) {
9394
+ hasAutoDriveAfterVisibleAnswer = true;
9395
+ possibleAutoDriveStartGenseq = undefined;
9396
+ }
9397
+ else if (visibleAnswer !== undefined) {
9398
+ possibleAutoDriveStartGenseq = event.genseq;
9399
+ }
9400
+ continue;
9401
+ }
9402
+ if (event.type === 'agent_thought_record' || event.type === 'runtime_guide_record') {
9403
+ if (visibleAnswer !== undefined &&
9404
+ possibleAutoDriveStartGenseq !== undefined &&
9405
+ event.genseq === possibleAutoDriveStartGenseq) {
9406
+ hasAutoDriveAfterVisibleAnswer = true;
9407
+ }
9365
9408
  continue;
9366
9409
  }
9367
9410
  if (event.type === 'func_call_record' || event.type === 'tellask_call_record') {
9368
- visibleReplySettled = false;
9369
- lastVisibleAnswer = undefined;
9411
+ if (visibleAnswer !== undefined && event.genseq > visibleAnswer.genseq) {
9412
+ hasAutoDriveAfterVisibleAnswer = true;
9413
+ continue;
9414
+ }
9415
+ visibleAnswer = undefined;
9416
+ possibleAutoDriveStartGenseq = undefined;
9370
9417
  }
9371
9418
  }
9372
- if (!visibleReplySettled || pendingUserInterjectionReply === undefined || !lastVisibleAnswer) {
9419
+ if (pendingUserInterjectionReply === undefined ||
9420
+ visibleAnswer === undefined ||
9421
+ !hasAutoDriveAfterVisibleAnswer) {
9373
9422
  return undefined;
9374
9423
  }
9375
9424
  if (pendingUserInterjectionReply.msgId !== args.pending?.msgId) {
@@ -9379,16 +9428,16 @@ class DialogPersistence {
9379
9428
  args.dialogId.rootId,
9380
9429
  args.dialogId.selfId,
9381
9430
  `c${String(args.course)}`,
9382
- `g${String(lastVisibleAnswer.genseq)}`,
9431
+ `g${String(visibleAnswer.genseq)}`,
9383
9432
  pendingUserInterjectionReply.msgId,
9384
9433
  ].join('|');
9385
9434
  return {
9386
9435
  id: `a2h-${Buffer.from(answerIdSource).toString('base64url')}`,
9387
- content: lastVisibleAnswer.content,
9436
+ content: visibleAnswer.content,
9388
9437
  answeredAt: (0, time_1.formatUnifiedTimestamp)(new Date()),
9389
9438
  answerRef: {
9390
9439
  course: (0, storage_1.toDialogCourseNumber)(args.course),
9391
- genseq: (0, storage_1.toCallSiteGenseqNo)(lastVisibleAnswer.genseq),
9440
+ genseq: (0, storage_1.toCallSiteGenseqNo)(visibleAnswer.genseq),
9392
9441
  },
9393
9442
  };
9394
9443
  }
package/dist/priming.js CHANGED
@@ -227,7 +227,7 @@ function reminderToSnapshot(reminder) {
227
227
  meta: reminder.meta,
228
228
  echoback: reminder.echoback,
229
229
  scope: reminder.scope,
230
- renderMode: reminder.renderMode ?? 'markdown',
230
+ renderMode: reminder.renderMode,
231
231
  createdAt: reminder.createdAt,
232
232
  priority: reminder.priority,
233
233
  };
@@ -2203,8 +2203,7 @@ async function applyPrimingRemindersToDialog(args) {
2203
2203
  const taskReminders = [];
2204
2204
  const agentReminders = [];
2205
2205
  for (const reminder of args.reminders) {
2206
- const scope = reminder.scope ?? 'task';
2207
- switch (scope) {
2206
+ switch (reminder.scope) {
2208
2207
  case 'dialog':
2209
2208
  dialogReminders.push(reminder);
2210
2209
  break;