dominds 1.9.3 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/memory-system.md +8 -1
- package/dist/docs/memory-system.zh.md +8 -2
- package/dist/minds/load.js +1 -1
- package/dist/minds/system-prompt-parts.js +7 -4
- package/dist/minds/system-prompt.js +2 -0
- package/dist/runtime/driver-messages.js +30 -31
- package/dist/server/websocket-handler.js +21 -3
- package/dist/tools/app-reminders.js +50 -21
- package/dist/tools/builtins.js +34 -10
- package/dist/tools/ctrl.js +38 -8
- package/dist/tools/manual/spec.js +5 -6
- package/dist/tools/os.js +8 -5
- package/dist/tools/pending-tellask-reminder.js +36 -13
- package/dist/tools/plan.js +5 -4
- package/dist/tools/toolset-manual.d.ts +1 -1
- package/dist/tools/toolset-manual.js +73 -18
- package/dist/utils/taskdoc.js +2 -0
- package/package.json +3 -3
- package/webapp/dist/assets/{_basePickBy-BfH-AyMu.js → _basePickBy-D694K6Gh.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-BfH-AyMu.js.map → _basePickBy-D694K6Gh.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-BNsMcBuE.js → _baseUniq-ArneQk-G.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-BNsMcBuE.js.map → _baseUniq-ArneQk-G.js.map} +1 -1
- package/webapp/dist/assets/{arc-Bs3CcPvC.js → arc-8u9ipLr2.js} +2 -2
- package/webapp/dist/assets/{arc-Bs3CcPvC.js.map → arc-8u9ipLr2.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-C-KYTHQZ.js → architectureDiagram-2XIMDMQ5-DFV-xGAa.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-C-KYTHQZ.js.map → architectureDiagram-2XIMDMQ5-DFV-xGAa.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-D9B_SH9m.js → blockDiagram-WCTKOSBZ-pk6LU06K.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-D9B_SH9m.js.map → blockDiagram-WCTKOSBZ-pk6LU06K.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BDMmvUDN.js → c4Diagram-IC4MRINW-D4SBLYjK.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BDMmvUDN.js.map → c4Diagram-IC4MRINW-D4SBLYjK.js.map} +1 -1
- package/webapp/dist/assets/{channel-DkOACQ-Q.js → channel-D8M5j8c2.js} +2 -2
- package/webapp/dist/assets/{channel-DkOACQ-Q.js.map → channel-D8M5j8c2.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-C2YYQQdn.js → chunk-4BX2VUAB-B-6IvMRI.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-C2YYQQdn.js.map → chunk-4BX2VUAB-B-6IvMRI.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-BLL_vvlL.js → chunk-55IACEB6-DjEvYtPp.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-BLL_vvlL.js.map → chunk-55IACEB6-DjEvYtPp.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-DbvS-iIS.js → chunk-FMBD7UC4-CrfwnW9e.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-DbvS-iIS.js.map → chunk-FMBD7UC4-CrfwnW9e.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-BYsOBtUv.js → chunk-JSJVCQXG-DroABPma.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-BYsOBtUv.js.map → chunk-JSJVCQXG-DroABPma.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-qqotPQTC.js → chunk-KX2RTZJC--UaFwmvv.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-qqotPQTC.js.map → chunk-KX2RTZJC--UaFwmvv.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DtayaIyM.js → chunk-NQ4KR5QH-hGQ1BQy3.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DtayaIyM.js.map → chunk-NQ4KR5QH-hGQ1BQy3.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-ByCgInOy.js → chunk-QZHKN3VN-L1f-RVf4.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-ByCgInOy.js.map → chunk-QZHKN3VN-L1f-RVf4.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-n6R_kv7j.js → chunk-WL4C6EOR-BS6MGl-Y.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-n6R_kv7j.js.map → chunk-WL4C6EOR-BS6MGl-Y.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-Cr6hx981.js → classDiagram-VBA2DB6C-wDVeUi90.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-Cr6hx981.js.map → classDiagram-VBA2DB6C-wDVeUi90.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-Cr6hx981.js → classDiagram-v2-RAHNMMFH-wDVeUi90.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-Cr6hx981.js.map → classDiagram-v2-RAHNMMFH-wDVeUi90.js.map} +1 -1
- package/webapp/dist/assets/{clone-CVYUyjRt.js → clone-C2MtRhfG.js} +2 -2
- package/webapp/dist/assets/{clone-CVYUyjRt.js.map → clone-C2MtRhfG.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CbVvMD8B.js → cose-bilkent-S5V4N54A-CEf3Y19l.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CbVvMD8B.js.map → cose-bilkent-S5V4N54A-CEf3Y19l.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-BuefmyeA.js → dagre-KLK3FWXG-Dy_y44Tz.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-BuefmyeA.js.map → dagre-KLK3FWXG-Dy_y44Tz.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-DbxkA6bq.js → diagram-E7M64L7V-Bvv5WU0i.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-DbxkA6bq.js.map → diagram-E7M64L7V-Bvv5WU0i.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-6eTYxZlY.js → diagram-IFDJBPK2-DgKslRxt.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-6eTYxZlY.js.map → diagram-IFDJBPK2-DgKslRxt.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-BaxnuVrQ.js → diagram-P4PSJMXO-DKuN0W-K.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-BaxnuVrQ.js.map → diagram-P4PSJMXO-DKuN0W-K.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-CdM7JIpN.js → erDiagram-INFDFZHY-Buc2e1H3.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-CdM7JIpN.js.map → erDiagram-INFDFZHY-Buc2e1H3.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-DWXwTxvt.js → flowDiagram-PKNHOUZH-J69A4hB0.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-DWXwTxvt.js.map → flowDiagram-PKNHOUZH-J69A4hB0.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-icFBfjxa.js → ganttDiagram-A5KZAMGK-B_EUDSCl.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-icFBfjxa.js.map → ganttDiagram-A5KZAMGK-B_EUDSCl.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-DvG6Al7K.js → gitGraphDiagram-K3NZZRJ6-B1111A11.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-DvG6Al7K.js.map → gitGraphDiagram-K3NZZRJ6-B1111A11.js.map} +1 -1
- package/webapp/dist/assets/{graph-DttgpnyF.js → graph-CdxqCYb0.js} +3 -3
- package/webapp/dist/assets/{graph-DttgpnyF.js.map → graph-CdxqCYb0.js.map} +1 -1
- package/webapp/dist/assets/{index-glyVn6qA.js → index-BHe1oHIa.js} +91 -41
- package/webapp/dist/assets/{index-glyVn6qA.js.map → index-BHe1oHIa.js.map} +1 -1
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-Be7NVGsk.js → infoDiagram-LFFYTUFH-B0NHDULu.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-Be7NVGsk.js.map → infoDiagram-LFFYTUFH-B0NHDULu.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-aBgICO2W.js → ishikawaDiagram-PHBUUO56-zFZuCrGV.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-aBgICO2W.js.map → ishikawaDiagram-PHBUUO56-zFZuCrGV.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-6ZhQR2pT.js → journeyDiagram-4ABVD52K-C-Y3JIvI.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-6ZhQR2pT.js.map → journeyDiagram-4ABVD52K-C-Y3JIvI.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BD5WcwkZ.js → kanban-definition-K7BYSVSG-CAWm_s77.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BD5WcwkZ.js.map → kanban-definition-K7BYSVSG-CAWm_s77.js.map} +1 -1
- package/webapp/dist/assets/{layout-BicT-AKX.js → layout-DAf8AacP.js} +5 -5
- package/webapp/dist/assets/{layout-BicT-AKX.js.map → layout-DAf8AacP.js.map} +1 -1
- package/webapp/dist/assets/{linear-mfPB9dWF.js → linear-5V_bWmGQ.js} +2 -2
- package/webapp/dist/assets/{linear-mfPB9dWF.js.map → linear-5V_bWmGQ.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-kLbwaG3m.js → mindmap-definition-YRQLILUH-CbZFlmPZ.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-kLbwaG3m.js.map → mindmap-definition-YRQLILUH-CbZFlmPZ.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-C2kjOvDJ.js → pieDiagram-SKSYHLDU-BdjfUPSq.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-C2kjOvDJ.js.map → pieDiagram-SKSYHLDU-BdjfUPSq.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-EBFouDoS.js → quadrantDiagram-337W2JSQ-B_roS40E.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-EBFouDoS.js.map → quadrantDiagram-337W2JSQ-B_roS40E.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-q8a4FaYa.js → requirementDiagram-Z7DCOOCP-Cte4tBaS.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-q8a4FaYa.js.map → requirementDiagram-Z7DCOOCP-Cte4tBaS.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-BQB-fWeY.js → sankeyDiagram-WA2Y5GQK-_7BuCxMO.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-BQB-fWeY.js.map → sankeyDiagram-WA2Y5GQK-_7BuCxMO.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-VQq6HFC4.js → sequenceDiagram-2WXFIKYE-DIrNFVXO.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-VQq6HFC4.js.map → sequenceDiagram-2WXFIKYE-DIrNFVXO.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-CYdwXt96.js → stateDiagram-RAJIS63D-CleFEXbm.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-CYdwXt96.js.map → stateDiagram-RAJIS63D-CleFEXbm.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BtL9yVRW.js → stateDiagram-v2-FVOUBMTO-BPhDPWWG.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BtL9yVRW.js.map → stateDiagram-v2-FVOUBMTO-BPhDPWWG.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-Mir0gPkJ.js → timeline-definition-YZTLITO2-DrrU-OCU.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-Mir0gPkJ.js.map → timeline-definition-YZTLITO2-DrrU-OCU.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-BZkUTsQ5.js → treemap-KZPCXAKY-DShBAWxS.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-BZkUTsQ5.js.map → treemap-KZPCXAKY-DShBAWxS.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-01He2Gl0.js → vennDiagram-LZ73GAT5-DNQztUY0.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-01He2Gl0.js.map → vennDiagram-LZ73GAT5-DNQztUY0.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-D1Igvf_e.js → xychartDiagram-JWTSCODW-q8D6fe1E.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-D1Igvf_e.js.map → xychartDiagram-JWTSCODW-q8D6fe1E.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
|
@@ -124,10 +124,15 @@ Taskdocs are the canonical task contract shared by the team. They answer: what w
|
|
|
124
124
|
- `constraints`: hard rules (safety/style/process/compliance)
|
|
125
125
|
- `progress`: distilled progress (key decisions, current status, next steps)
|
|
126
126
|
|
|
127
|
+
#### Section semantics
|
|
128
|
+
|
|
129
|
+
- `progress` is the team’s shared milestone bulletin board: key decisions, current status, and next steps. It is not a raw log and not a personal work record.
|
|
130
|
+
- `goals` / `constraints` are the more stable task contract: every update must preserve still-valid entries from others instead of turning shared state into personal notes.
|
|
131
|
+
|
|
127
132
|
#### Practical rules (keep only the essentials)
|
|
128
133
|
|
|
129
134
|
- Treat `goals / constraints / progress` as a **shared bulletin board**, not a personal scratchpad.
|
|
130
|
-
- `progress` is a distilled snapshot; high-frequency details belong in reminders (working set).
|
|
135
|
+
- `progress` is a distilled snapshot; each update should preserve a complete current picture that teammates can scan quickly; high-frequency details belong in reminders (working set).
|
|
131
136
|
- Don’t paste huge tool outputs into Taskdocs. Distill conclusions/evidence, or keep a curated excerpt in reminders.
|
|
132
137
|
|
|
133
138
|
For extra sections and `*.tsk/` packaging semantics, see: [encapsulated-taskdoc.md](./encapsulated-taskdoc.md).
|
|
@@ -150,6 +155,8 @@ Never treat “I saw it earlier” as a durable assumption.
|
|
|
150
155
|
Some reminders are generated by the runtime (e.g. background process status, MCP rentals/expiration). Treat them as signals:
|
|
151
156
|
|
|
152
157
|
- read and adjust behavior
|
|
158
|
+
- if they do not materially change your judgment/plan/risk, make no user-visible reply at all (do not send filler like “silently noted” or “received”)
|
|
159
|
+
- if they do matter, reflect that only inside the next substantive reply rather than acknowledging them separately
|
|
153
160
|
- but don’t treat them as your personal worklog (their lifecycle is typically system-managed)
|
|
154
161
|
- in message semantics, these should be treated as **system notices**: they typically appear on the `role=user` side with an explicit notice prefix, so they do not get mistaken for self-authored work notes
|
|
155
162
|
|
|
@@ -123,10 +123,15 @@ TL;DR:
|
|
|
123
123
|
- `constraints`:硬规则(安全/风格/流程/合规)
|
|
124
124
|
- `progress`:精炼进展(关键决策、当前状态、下一步)
|
|
125
125
|
|
|
126
|
+
#### 章节语义约定
|
|
127
|
+
|
|
128
|
+
- `progress` 是全队共享的里程碑公告牌:记录关键决策、当前状态与下一步;不是流水账,不是个人工作记录。
|
|
129
|
+
- `goals` / `constraints` 是较稳定的任务契约:每次更新都要保留仍然有效的他人条目,不要把共享约定误改成个人笔记。
|
|
130
|
+
|
|
126
131
|
#### 使用要点(只保留最重要的约束)
|
|
127
132
|
|
|
128
133
|
- 把 `goals / constraints / progress` 当作**团队共享公告板**,不是个人草稿本。
|
|
129
|
-
- `progress`
|
|
134
|
+
- `progress` 只写“足以让下一程继续推进”的精炼状态;每次更新都应保持“当前全貌快照”完整可扫读;高频细节放到提醒项(工作集)。
|
|
130
135
|
- 不要把长工具输出塞进差遣牒:要么提炼成结论/证据,要么放到提醒项里做精炼摘录。
|
|
131
136
|
|
|
132
137
|
差遣牒附加章节(非自动注入)与 `*.tsk/` 封装语义,详见:[encapsulated-taskdoc.zh.md](./encapsulated-taskdoc.zh.md)
|
|
@@ -149,7 +154,8 @@ TL;DR:
|
|
|
149
154
|
有一类提醒项来自运行时环境(例如后台进程状态、MCP 租用/到期等)。它们更像信号灯:
|
|
150
155
|
|
|
151
156
|
- 你应该阅读并据此调整行为
|
|
152
|
-
-
|
|
157
|
+
- 若它没有实质改变当前判断/计划/风险,就禁止做任何用户可见回应(禁止写“静默吸收”“已收到”等占位语句)
|
|
158
|
+
- 若它确实改变了当前判断/计划/风险,也无需单独回一条“收到”;只需在下一条有实质内容的回复中体现
|
|
153
159
|
- 但它们的生命周期通常由系统管理(自动更新/自动清理),不要把它们当成个人工作日志
|
|
154
160
|
- 在消息语义上,这类提醒应视为**系统提示**:通常落在 `role=user` 侧,并带显眼头标(如 `【系统提示】`),避免与个人工作提醒混淆
|
|
155
161
|
|
package/dist/minds/load.js
CHANGED
|
@@ -272,7 +272,7 @@ async function loadAgentMinds(agentId, dialog, options) {
|
|
|
272
272
|
.filter((b) => b.trim() !== '')
|
|
273
273
|
.join('\n\n');
|
|
274
274
|
const intrinsicToolUsageText = (0, system_prompt_parts_1.buildIntrinsicToolUsageText)(workingLanguage, intrinsicFuncTools);
|
|
275
|
-
const toolsetManualIntro = (0, toolset_manual_1.formatToolsetManualIntro)(workingLanguage, manualTools.toolNames);
|
|
275
|
+
const toolsetManualIntro = (0, toolset_manual_1.formatToolsetManualIntro)(workingLanguage, manualTools.toolNames, toolsetNames);
|
|
276
276
|
const funcToolRulesText = funcTools.length > 0 ? (0, minds_i18n_1.funcToolRulesText)(workingLanguage) : '';
|
|
277
277
|
const systemPrompt = (0, system_prompt_1.buildSystemPrompt)({
|
|
278
278
|
language: workingLanguage,
|
|
@@ -161,9 +161,10 @@ function getMemoryPromptCopy(ctx) {
|
|
|
161
161
|
title: '### 记忆系统(重要)',
|
|
162
162
|
temporaryInfoLine: '你的聊天记录与工具输出是临时信息:会快速累积、很快过时,并增加你的认知负担。在同一轮对话中,除了 `clear_mind` 以外你无法真正丢弃这些历史。',
|
|
163
163
|
clearMindLine: '`clear_mind` 会开启新一程对话(保留差遣牒、提醒项与记忆层),从而卸掉这部分认知负载并继续推进。因此你必须先把关键信息提炼到高价值载体:',
|
|
164
|
-
taskdocContractLine: '- 差遣牒(`*.tsk/`):全队共享的任务契约(goals/constraints/progress
|
|
164
|
+
taskdocContractLine: '- 差遣牒(`*.tsk/`):全队共享的任务契约(goals/constraints/progress);不是个人笔记,保持足够短,每轮都应可通读。',
|
|
165
|
+
taskdocSemanticsLine: '- 章节语义约定:`progress` 是全队共享的里程碑公告牌,用来记录关键决策、当前状态与下一步;不是流水账,也不是个人工作记录。`goals` / `constraints` 是较稳定的任务契约;每次更新都必须保留仍然有效的他人条目。',
|
|
165
166
|
taskdocSectionReplaceLine: `- 更新差遣牒的任意分段时:每次调用会替换该分段全文;你必须先对照“上下文中注入的当前内容”做合并/压缩;禁止覆盖/抹掉他人条目;自己负责维护的条目必须标注责任人(例如 \`- [owner:@${ctx.agentId}] ...\` 或用 \`### @${ctx.agentId}\` 分块)。`,
|
|
166
|
-
progressLine: '-
|
|
167
|
+
progressLine: '- 更新 `progress` 时:它必须始终是可供全队扫读的完整当前快照,而不是只追加自己这一轮的零散笔记。',
|
|
167
168
|
injectedTaskdocLine: '- 重要:差遣牒内容会被系统以内联形式注入到上下文中(本轮生成视角下即为最新;注入内容不包括全局约束)。需要回顾时请直接基于上下文里的差遣牒内容回顾与决策,不要试图用通用文件工具读取 `*.tsk/` 下的文件(会被拒绝)。',
|
|
168
169
|
constraintsLine: '- 约定:`constraints` 只写任务特有的硬要求,不得写入系统提示/工具文档里已明确且由系统强制执行的通用规则(例如 `*.tsk/` 封装禁止通用文件工具)。一经发现重复,必须删除并告知用户。',
|
|
169
170
|
remindersLine: '- 提醒项(即编号提醒,工作集):当前对话的高频工作记录/关键细节(偏私有,不作为全队公告);默认保持少量(常见 1–3 条),优先 `update_reminder` 压缩/合并,不再需要就 `delete_reminder`。准备 `clear_mind` 开启新一程对话时,默认整理成“结构化接续包提醒项”;其中只保留差遣牒未覆盖、但恢复工作容易丢的细节(如第一步、关键定位、运行/验证信息、临时 ids/路径)。若系统已把当前程切到吃紧/告急处置态,则允许先保留多条粗略提醒项把信息带过桥;当前程只做保信息 + clear_mind;只有系统实际开启新一程后,第一步才是以清醒头脑复核并整理这些接续包/粗略提醒项:删除冗余、纠正偏激或失真的过桥思路、压缩成高质量提醒项。',
|
|
@@ -184,9 +185,10 @@ function getMemoryPromptCopy(ctx) {
|
|
|
184
185
|
title: '### Memory System (Important)',
|
|
185
186
|
temporaryInfoLine: 'Dialog history and tool outputs are temporary: they accumulate quickly, become stale, and increase cognitive load. Within a course, you cannot truly drop that history except via `clear_mind`.',
|
|
186
187
|
clearMindLine: '`clear_mind` starts a new course while preserving Taskdoc, reminders, and memory layers. Therefore, before clearing, distill key information into durable layers:',
|
|
187
|
-
taskdocContractLine: '- Taskdoc (`*.tsk/`): team-shared task contract (goals/constraints/progress).
|
|
188
|
+
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.',
|
|
189
|
+
taskdocSemanticsLine: '- Section semantics: `progress` is the team’s shared milestone bulletin board for key decisions, current status, and next steps; 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.',
|
|
188
190
|
taskdocSectionReplaceLine: `- When updating any Taskdoc section: each call replaces the entire section; always start from the current injected content and merge/compress; do not overwrite other contributors; add an explicit owner tag for entries you maintain (e.g., \`- [owner:@${ctx.agentId}] ...\` or a \`### @${ctx.agentId}\` block).`,
|
|
189
|
-
progressLine: '-
|
|
191
|
+
progressLine: '- When updating `progress`, keep it as a complete, team-scannable current snapshot instead of appending only your own latest notes.',
|
|
190
192
|
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).',
|
|
191
193
|
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.',
|
|
192
194
|
remindersLine: '- Reminders (i.e. numbered reminders, working set): 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, default to a structured continuation-package reminder that keeps only details not already covered by Taskdoc but easy to lose during resume (first step, key pointers, run/verify info, volatile ids/paths). If the system has already put the current course into caution/critical remediation, rough multi-reminder bridge notes are acceptable; in the current course, only preserve volatile information and clear_mind. Only after the system 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.',
|
|
@@ -209,6 +211,7 @@ function buildMemorySystemPrompt(ctx) {
|
|
|
209
211
|
copy.temporaryInfoLine,
|
|
210
212
|
copy.clearMindLine,
|
|
211
213
|
copy.taskdocContractLine,
|
|
214
|
+
copy.taskdocSemanticsLine,
|
|
212
215
|
copy.taskdocSectionReplaceLine,
|
|
213
216
|
copy.progressLine,
|
|
214
217
|
copy.injectedTaskdocLine,
|
|
@@ -300,6 +300,7 @@ function buildSystemPrompt(input) {
|
|
|
300
300
|
## 消息类型
|
|
301
301
|
- 以 \`【系统提示】\` 或 \`[System notice]\` 开头的消息是**系统提示**,不是用户输入。
|
|
302
302
|
- 系统提示不需要你直接回复给用户,但需要你根据提示内容执行相应的操作(如维护提醒项、调用 clear_mind 等)。
|
|
303
|
+
- 收到“运行中后台进程状态”等环境状态系统提示时:如果它没有实质改变你的判断/计划/风险,禁止做任何用户可见回应(禁止写“静默吸收”“已收到”等占位语句);如果有实质影响,只在下一条有实质内容的回复中体现。
|
|
303
304
|
|
|
304
305
|
## 指令优先级与冲突处理
|
|
305
306
|
- 优先级:系统 > 差遣牒 > 用户 > 工具回执。
|
|
@@ -395,6 +396,7 @@ ${functionToolRules}
|
|
|
395
396
|
## Message Types
|
|
396
397
|
- Messages starting with \`【系统提示】\` or \`[System notice]\` are **system notices**, not user input.
|
|
397
398
|
System notices convey important state changes (e.g., context caution/critical, Diligence Push triggered). Read carefully and follow the instructions.
|
|
399
|
+
- For environment-state notices such as active daemon status: if they do not materially change your judgment/plan/risk, make no user-visible reply at all (do not send filler like “silently noted” or “received”); if they do matter, reflect that only inside the next substantive reply.
|
|
398
400
|
|
|
399
401
|
## Instruction Priority & Conflicts
|
|
400
402
|
- Priority order: system > taskdoc > user > tool outputs.
|
|
@@ -157,34 +157,33 @@ function formatReminderItemGuide(language, index, content, options) {
|
|
|
157
157
|
// to keep reminder ownership/management loosely coupled and extensible.
|
|
158
158
|
const metaValue = options && 'meta' in options ? options.meta : undefined;
|
|
159
159
|
const isContinuationPackageReminder = isRecord(metaValue) && metaValue['kind'] === 'continuation_package';
|
|
160
|
-
const
|
|
161
|
-
|
|
160
|
+
const managerValue = isRecord(metaValue) ? metaValue['manager'] : undefined;
|
|
161
|
+
const managementTool = isRecord(managerValue) && typeof managerValue['tool'] === 'string'
|
|
162
|
+
? managerValue['tool'].trim()
|
|
162
163
|
: undefined;
|
|
163
|
-
const
|
|
164
|
-
|
|
164
|
+
const updateValue = isRecord(metaValue) ? metaValue['update'] : undefined;
|
|
165
|
+
const updateAltInstruction = isRecord(updateValue) && typeof updateValue['altInstruction'] === 'string'
|
|
166
|
+
? updateValue['altInstruction'].trim()
|
|
165
167
|
: undefined;
|
|
166
|
-
const
|
|
167
|
-
?
|
|
168
|
-
:
|
|
169
|
-
?
|
|
168
|
+
const updateInstruction = updateAltInstruction && updateAltInstruction.length > 0
|
|
169
|
+
? updateAltInstruction
|
|
170
|
+
: managementTool
|
|
171
|
+
? `${managementTool}({ ... })`
|
|
170
172
|
: undefined;
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
+
const deleteValue = isRecord(metaValue) ? metaValue['delete'] : undefined;
|
|
174
|
+
const deleteAltInstruction = isRecord(deleteValue) && typeof deleteValue['altInstruction'] === 'string'
|
|
175
|
+
? deleteValue['altInstruction'].trim()
|
|
173
176
|
: undefined;
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
? updateExampleFromEdit
|
|
182
|
-
: managementTool
|
|
183
|
-
? `${managementTool}({ ... })`
|
|
184
|
-
: undefined;
|
|
177
|
+
const deleteInstruction = language === 'zh'
|
|
178
|
+
? deleteAltInstruction
|
|
179
|
+
? `如果我要删除这条提醒项,不能用 delete_reminder;请执行:${deleteAltInstruction}`
|
|
180
|
+
: `如果我要删除这条提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`
|
|
181
|
+
: deleteAltInstruction
|
|
182
|
+
? `If I need to delete this reminder, I must not use delete_reminder; run: ${deleteAltInstruction}`
|
|
183
|
+
: `If I need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })`;
|
|
185
184
|
if (language === 'zh') {
|
|
186
185
|
if (managementTool) {
|
|
187
|
-
const
|
|
186
|
+
const updateInstructionSafe = updateInstruction ?? `${managementTool}({ ... })`;
|
|
188
187
|
return [
|
|
189
188
|
`提醒项 #${index}(工具状态)`,
|
|
190
189
|
'',
|
|
@@ -192,8 +191,8 @@ function formatReminderItemGuide(language, index, content, options) {
|
|
|
192
191
|
'',
|
|
193
192
|
`这条提醒项由工具 ${managementTool} 管理;如果我要调整它,就用 ${managementTool}(不要用 update_reminder)。`,
|
|
194
193
|
'',
|
|
195
|
-
`如果我要更新这条提醒项,可执行:${
|
|
196
|
-
|
|
194
|
+
`如果我要更新这条提醒项,可执行:${updateInstructionSafe}`,
|
|
195
|
+
deleteInstruction,
|
|
197
196
|
'',
|
|
198
197
|
'---',
|
|
199
198
|
content,
|
|
@@ -208,7 +207,7 @@ function formatReminderItemGuide(language, index, content, options) {
|
|
|
208
207
|
'我应优先保留下一步行动、关键定位、运行/验证信息、容易丢的临时细节;不要重复差遣牒已覆盖的内容。进入新一程后,我的第一步就是以清醒头脑重新审视并整理更新:删除冗余、纠正偏激/失真思路、压缩成高质量提醒项。若目前只是粗略过桥笔记,进入新一程后我必须尽快收敛。',
|
|
209
208
|
'',
|
|
210
209
|
`如果我要更新这份接续包,可执行:update_reminder({ "reminder_no": ${index}, "content": "..." })`,
|
|
211
|
-
|
|
210
|
+
deleteInstruction,
|
|
212
211
|
'',
|
|
213
212
|
'---',
|
|
214
213
|
content,
|
|
@@ -222,22 +221,22 @@ function formatReminderItemGuide(language, index, content, options) {
|
|
|
222
221
|
'我应保持简洁、及时更新;不再需要时就删除。若后续准备换程,也可以把它整理成接续包。',
|
|
223
222
|
'',
|
|
224
223
|
`如果我要更新这条提醒项,可执行:update_reminder({ "reminder_no": ${index}, "content": "..." })`,
|
|
225
|
-
|
|
224
|
+
deleteInstruction,
|
|
226
225
|
'',
|
|
227
226
|
'---',
|
|
228
227
|
content,
|
|
229
228
|
].join('\n');
|
|
230
229
|
}
|
|
231
230
|
if (managementTool) {
|
|
232
|
-
const
|
|
231
|
+
const updateInstructionSafe = updateInstruction ?? `${managementTool}({ ... })`;
|
|
233
232
|
return `REMINDER ITEM #${index} (TOOL STATE)
|
|
234
233
|
|
|
235
234
|
I treat this as a tool-maintained state reference. By default I should not explicitly acknowledge, restate, or summarize it in my outward reply; I should only extract the parts that materially change my current judgment, plan, or risk.
|
|
236
235
|
|
|
237
236
|
This reminder is managed by tool ${managementTool}; if I need to change it, I should use ${managementTool} instead of update_reminder.
|
|
238
237
|
|
|
239
|
-
If I need to update this reminder, run: ${
|
|
240
|
-
|
|
238
|
+
If I need to update this reminder, run: ${updateInstructionSafe}
|
|
239
|
+
${deleteInstruction}
|
|
241
240
|
---
|
|
242
241
|
${content}`;
|
|
243
242
|
}
|
|
@@ -249,7 +248,7 @@ I treat this as resume information for the next course, not as an automatic must
|
|
|
249
248
|
I should keep the next step, key pointers, run/verify info, and easy-to-lose volatile details here. I should not duplicate Taskdoc content. In the new course, my 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, I should reconcile it early in the new course.
|
|
250
249
|
|
|
251
250
|
If I need to update this package, run: update_reminder({ "reminder_no": ${index}, "content": "..." })
|
|
252
|
-
|
|
251
|
+
${deleteInstruction}
|
|
253
252
|
---
|
|
254
253
|
${content}`;
|
|
255
254
|
}
|
|
@@ -260,7 +259,7 @@ This is my conspicuous self-reminder for easy-to-lose work details in the curren
|
|
|
260
259
|
I should keep it concise, refresh it when needed, and delete it when obsolete. If I am preparing a new course, I can also rewrite it into a continuation package.
|
|
261
260
|
|
|
262
261
|
If I need to update this reminder, run: update_reminder({ "reminder_no": ${index}, "content": "..." })
|
|
263
|
-
|
|
262
|
+
${deleteInstruction}
|
|
264
263
|
---
|
|
265
264
|
${content}`;
|
|
266
265
|
}
|
|
@@ -51,6 +51,26 @@ function parseDialogStatusKind(raw) {
|
|
|
51
51
|
}
|
|
52
52
|
return raw;
|
|
53
53
|
}
|
|
54
|
+
function formatDeclaredDeadSubdialogNotice(language, dialogId, callName) {
|
|
55
|
+
if (language === 'zh') {
|
|
56
|
+
switch (callName) {
|
|
57
|
+
case 'tellask':
|
|
58
|
+
return `${(0, driver_messages_1.formatSystemNoticePrefix)('zh')} 支线对话 ${dialogId} 已被用户宣布卡死(不可逆)。后续仍可重用相同的 slug 发起全新支线对话;只是此前的上下文已不再,新的诉请正文请提供最新的完整上下文信息。`;
|
|
59
|
+
case 'tellaskSessionless':
|
|
60
|
+
return `${(0, driver_messages_1.formatSystemNoticePrefix)('zh')} 支线对话 ${dialogId} 已被用户宣布卡死(不可逆)。这是一次性支线对话;后续若仍需继续,请重新发起新的支线对话。由于不会续接此前上下文,新的诉请正文请提供最新的完整上下文信息。`;
|
|
61
|
+
case 'freshBootsReasoning':
|
|
62
|
+
return `${(0, driver_messages_1.formatSystemNoticePrefix)('zh')} 支线对话 ${dialogId} 已被用户宣布卡死(不可逆)。这是一次扪心自问(FBR)支线对话;后续若仍需继续,请重新发起新的扪心自问(FBR)支线对话。由于不会续接此前上下文,新的诉请正文请提供最新的完整上下文信息。`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
switch (callName) {
|
|
66
|
+
case 'tellask':
|
|
67
|
+
return `${(0, driver_messages_1.formatSystemNoticePrefix)('en')} sideline dialog ${dialogId} has been declared dead by the user (irreversible). You may reuse the same slug to start a brand-new sideline dialog, but previous context is no longer retained; include the latest complete context in the new tellask body.`;
|
|
68
|
+
case 'tellaskSessionless':
|
|
69
|
+
return `${(0, driver_messages_1.formatSystemNoticePrefix)('en')} sideline dialog ${dialogId} has been declared dead by the user (irreversible). This was a one-shot sideline dialog; if you still need the work, start a new sideline dialog. Previous context will not carry over, so include the latest complete context in the new tellask body.`;
|
|
70
|
+
case 'freshBootsReasoning':
|
|
71
|
+
return `${(0, driver_messages_1.formatSystemNoticePrefix)('en')} sideline dialog ${dialogId} has been declared dead by the user (irreversible). This was an FBR sideline dialog; if you still need the work, start a new FBR sideline dialog. Previous context will not carry over, so include the latest complete context in the new tellask body.`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
54
74
|
const log = (0, log_1.createLogger)('websocket-handler');
|
|
55
75
|
const wsLiveDlg = new WeakMap();
|
|
56
76
|
const wsSub = new WeakMap();
|
|
@@ -349,9 +369,7 @@ async function handleDeclareSubdialogDead(ws, packet) {
|
|
|
349
369
|
return;
|
|
350
370
|
}
|
|
351
371
|
const parentDialog = await restoreDialogForDrive(callerDialogIdObj, 'running');
|
|
352
|
-
const responseText = (0, work_language_1.getWorkLanguage)()
|
|
353
|
-
? `${(0, driver_messages_1.formatSystemNoticePrefix)('zh')} 支线对话 ${dialogIdObj.valueOf()} 已被用户宣布卡死(不可逆)。后续可以重用相同的 slug 发起全新支线对话;只是之前的上下文已不再,诉请正文请提供最新的完整上下文信息。`
|
|
354
|
-
: `${(0, driver_messages_1.formatSystemNoticePrefix)('en')} sideline dialog ${dialogIdObj.valueOf()} has been declared dead by the user (irreversible). You may reuse the same slug to start a brand-new sideline dialog, but previous context is no longer retained; include the latest complete context in the tellask body.`;
|
|
372
|
+
const responseText = formatDeclaredDeadSubdialogNotice((0, work_language_1.getWorkLanguage)(), dialogIdObj.valueOf(), metadata.assignmentFromSup.callName);
|
|
355
373
|
const responseTextWithNote = note === ''
|
|
356
374
|
? responseText
|
|
357
375
|
: (0, work_language_1.getWorkLanguage)() === 'zh'
|
|
@@ -13,9 +13,9 @@ const APP_REMINDER_META_KEYS = new Set([
|
|
|
13
13
|
'kind',
|
|
14
14
|
'appId',
|
|
15
15
|
'ownerRef',
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
16
|
+
'manager',
|
|
17
|
+
'update',
|
|
18
|
+
'delete',
|
|
19
19
|
'ownerMeta',
|
|
20
20
|
]);
|
|
21
21
|
const appReminderDescriptors = new Map();
|
|
@@ -34,12 +34,25 @@ function isAppReminderMeta(value) {
|
|
|
34
34
|
return false;
|
|
35
35
|
if (typeof value['ownerRef'] !== 'string' || value['ownerRef'].trim() === '')
|
|
36
36
|
return false;
|
|
37
|
-
|
|
37
|
+
const manager = value['manager'];
|
|
38
|
+
if (!isRecord(manager))
|
|
38
39
|
return false;
|
|
39
|
-
if (typeof
|
|
40
|
+
if (typeof manager['tool'] !== 'string' || manager['tool'].trim() === '')
|
|
40
41
|
return false;
|
|
41
|
-
|
|
42
|
+
const update = value['update'];
|
|
43
|
+
if (update !== undefined &&
|
|
44
|
+
(!isRecord(update) ||
|
|
45
|
+
typeof update['altInstruction'] !== 'string' ||
|
|
46
|
+
update['altInstruction'].trim() === '')) {
|
|
42
47
|
return false;
|
|
48
|
+
}
|
|
49
|
+
const del = value['delete'];
|
|
50
|
+
if (del !== undefined &&
|
|
51
|
+
(!isRecord(del) ||
|
|
52
|
+
typeof del['altInstruction'] !== 'string' ||
|
|
53
|
+
del['altInstruction'].trim() === '')) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
43
56
|
return true;
|
|
44
57
|
}
|
|
45
58
|
function normalizeInsertPosition(remindersLength, position) {
|
|
@@ -54,26 +67,28 @@ function normalizeInsertPosition(remindersLength, position) {
|
|
|
54
67
|
return remindersLength;
|
|
55
68
|
return normalized;
|
|
56
69
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
70
|
+
function toManagerTool(owner) {
|
|
71
|
+
const tool = owner.manager?.tool?.trim();
|
|
72
|
+
if (tool && tool.length > 0)
|
|
73
|
+
return tool;
|
|
61
74
|
return owner.ref;
|
|
62
75
|
}
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
function toUpdateAltInstruction(owner) {
|
|
77
|
+
const altInstruction = owner.update?.altInstruction?.trim();
|
|
78
|
+
return altInstruction && altInstruction.length > 0 ? altInstruction : undefined;
|
|
79
|
+
}
|
|
80
|
+
function toDeleteAltInstruction(owner) {
|
|
81
|
+
const altInstruction = owner.delete?.altInstruction?.trim();
|
|
82
|
+
return altInstruction && altInstruction.length > 0 ? altInstruction : undefined;
|
|
68
83
|
}
|
|
69
84
|
function buildDescriptor(params) {
|
|
70
85
|
return {
|
|
71
86
|
appId: params.appId,
|
|
72
87
|
ownerRef: params.owner.ref,
|
|
73
88
|
registryName: buildAppReminderOwnerRegistryName(params.appId, params.owner.ref),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
managerTool: toManagerTool(params.owner),
|
|
90
|
+
updateAltInstruction: toUpdateAltInstruction(params.owner),
|
|
91
|
+
deleteAltInstruction: toDeleteAltInstruction(params.owner),
|
|
77
92
|
};
|
|
78
93
|
}
|
|
79
94
|
function buildAppReminderMeta(descriptor, ownerMeta) {
|
|
@@ -81,9 +96,23 @@ function buildAppReminderMeta(descriptor, ownerMeta) {
|
|
|
81
96
|
kind: 'app_reminder_owner',
|
|
82
97
|
appId: descriptor.appId,
|
|
83
98
|
ownerRef: descriptor.ownerRef,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
99
|
+
manager: {
|
|
100
|
+
tool: descriptor.managerTool,
|
|
101
|
+
},
|
|
102
|
+
...(descriptor.updateAltInstruction === undefined
|
|
103
|
+
? {}
|
|
104
|
+
: {
|
|
105
|
+
update: {
|
|
106
|
+
altInstruction: descriptor.updateAltInstruction,
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
...(descriptor.deleteAltInstruction === undefined
|
|
110
|
+
? {}
|
|
111
|
+
: {
|
|
112
|
+
delete: {
|
|
113
|
+
altInstruction: descriptor.deleteAltInstruction,
|
|
114
|
+
},
|
|
115
|
+
}),
|
|
87
116
|
};
|
|
88
117
|
if (isJsonRecord(ownerMeta)) {
|
|
89
118
|
return { ...ownerMeta, ...baseMeta };
|
package/dist/tools/builtins.js
CHANGED
|
@@ -108,7 +108,10 @@ for (const tool of team_mgmt_1.teamMgmtTools) {
|
|
|
108
108
|
]);
|
|
109
109
|
(0, registry_1.setToolsetMeta)('personal_memory', {
|
|
110
110
|
source: 'dominds',
|
|
111
|
-
descriptionI18n: {
|
|
111
|
+
descriptionI18n: {
|
|
112
|
+
en: 'Private memory for this agent: keep stable preferences, responsibility-scope paths, and durable facts accurate.',
|
|
113
|
+
zh: '仅当前智能体可见的个人记忆:维护稳定偏好、职责域路径索引与长期事实。',
|
|
114
|
+
},
|
|
112
115
|
promptFilesI18n: promptFilesFor('personal_memory'),
|
|
113
116
|
manualSpec: manualSpecFor('personal_memory'),
|
|
114
117
|
});
|
|
@@ -120,7 +123,10 @@ for (const tool of team_mgmt_1.teamMgmtTools) {
|
|
|
120
123
|
]);
|
|
121
124
|
(0, registry_1.setToolsetMeta)('team_memory', {
|
|
122
125
|
source: 'dominds',
|
|
123
|
-
descriptionI18n: {
|
|
126
|
+
descriptionI18n: {
|
|
127
|
+
en: 'Shared team memory: record reusable conventions, invariants, and cross-task collaboration rules.',
|
|
128
|
+
zh: '团队共享记忆:沉淀可复用的约定、不变量与跨任务协作规则。',
|
|
129
|
+
},
|
|
124
130
|
promptFilesI18n: promptFilesFor('team_memory'),
|
|
125
131
|
manualSpec: manualSpecFor('team_memory'),
|
|
126
132
|
});
|
|
@@ -134,7 +140,10 @@ for (const tool of team_mgmt_1.teamMgmtTools) {
|
|
|
134
140
|
]);
|
|
135
141
|
(0, registry_1.setToolsetMeta)('control', {
|
|
136
142
|
source: 'dominds',
|
|
137
|
-
descriptionI18n: {
|
|
143
|
+
descriptionI18n: {
|
|
144
|
+
en: 'Dialog control: manage reminders, Taskdoc sections, and course resets via clear_mind/change_mind.',
|
|
145
|
+
zh: '对话控制:维护提醒项、差遣牒分段,并通过 clear_mind/change_mind 管理对话进程。',
|
|
146
|
+
},
|
|
138
147
|
promptFilesI18n: promptFilesFor('control'),
|
|
139
148
|
manualSpec: manualSpecFor('control'),
|
|
140
149
|
});
|
|
@@ -148,7 +157,10 @@ for (const tool of team_mgmt_1.teamMgmtTools) {
|
|
|
148
157
|
]);
|
|
149
158
|
(0, registry_1.setToolsetMeta)('os', {
|
|
150
159
|
source: 'dominds',
|
|
151
|
-
descriptionI18n: {
|
|
160
|
+
descriptionI18n: {
|
|
161
|
+
en: 'Shell and process operations: run commands, manage daemons, inspect output, and adjust local env vars.',
|
|
162
|
+
zh: '命令行与进程操作:执行命令、管理后台进程、查看输出,并调整本地环境变量。',
|
|
163
|
+
},
|
|
152
164
|
promptFilesI18n: promptFilesFor('os'),
|
|
153
165
|
manualSpec: manualSpecFor('os'),
|
|
154
166
|
});
|
|
@@ -161,7 +173,10 @@ for (const tool of team_mgmt_1.teamMgmtTools) {
|
|
|
161
173
|
]);
|
|
162
174
|
(0, registry_1.setToolsetMeta)('mcp_admin', {
|
|
163
175
|
source: 'dominds',
|
|
164
|
-
descriptionI18n: {
|
|
176
|
+
descriptionI18n: {
|
|
177
|
+
en: 'MCP administration: restart/release MCP servers and manage related local environment configuration.',
|
|
178
|
+
zh: 'MCP 管理:重启/释放 MCP 服务器,并维护相关本地环境配置。',
|
|
179
|
+
},
|
|
165
180
|
promptFilesI18n: promptFilesFor('mcp_admin'),
|
|
166
181
|
manualSpec: manualSpecFor('mcp_admin'),
|
|
167
182
|
});
|
|
@@ -176,7 +191,10 @@ for (const tool of team_mgmt_1.teamMgmtTools) {
|
|
|
176
191
|
]);
|
|
177
192
|
(0, registry_1.setToolsetMeta)('ws_read', {
|
|
178
193
|
source: 'dominds',
|
|
179
|
-
descriptionI18n: {
|
|
194
|
+
descriptionI18n: {
|
|
195
|
+
en: 'rtws read-only access: list directories, read files, and search code/content to gather facts safely.',
|
|
196
|
+
zh: '运行时工作区只读访问:列目录、读文件、检索代码与文本,用于安全获取事实。',
|
|
197
|
+
},
|
|
180
198
|
promptFilesI18n: promptFilesFor('ws_read'),
|
|
181
199
|
manualSpec: manualSpecFor('ws_read'),
|
|
182
200
|
});
|
|
@@ -204,7 +222,10 @@ for (const tool of team_mgmt_1.teamMgmtTools) {
|
|
|
204
222
|
]);
|
|
205
223
|
(0, registry_1.setToolsetMeta)('ws_mod', {
|
|
206
224
|
source: 'dominds',
|
|
207
|
-
descriptionI18n: {
|
|
225
|
+
descriptionI18n: {
|
|
226
|
+
en: 'rtws read/write access: inspect, create, move, delete, and precisely edit workspace files.',
|
|
227
|
+
zh: '运行时工作区读写访问:检查、创建、移动、删除,并精确编辑工作区文件。',
|
|
228
|
+
},
|
|
208
229
|
promptFilesI18n: promptFilesFor('ws_mod'),
|
|
209
230
|
manualSpec: manualSpecFor('ws_mod'),
|
|
210
231
|
});
|
|
@@ -214,8 +235,8 @@ if (process.platform !== 'win32') {
|
|
|
214
235
|
(0, registry_1.setToolsetMeta)('codex_style_tools', {
|
|
215
236
|
source: 'dominds',
|
|
216
237
|
descriptionI18n: {
|
|
217
|
-
en: 'Codex-style
|
|
218
|
-
zh: 'Codex
|
|
238
|
+
en: 'Codex-style helpers: readonly_shell for lightweight inspection, apply_patch for edits, and update_plan for task tracking.',
|
|
239
|
+
zh: 'Codex 风格辅助:用 readonly_shell 做轻量检查,用 apply_patch 修改文件,用 update_plan 维护计划。',
|
|
219
240
|
},
|
|
220
241
|
promptI18n: {
|
|
221
242
|
en: 'Use `apply_patch` (Codex-style patch format) to modify files. Use `readonly_shell` for simple rtws (runtime workspace) inspection via its small allowlist; commands outside the allowlist are rejected. For node/python, only exact version probes are allowed (no scripts). Chains via |/&&/|| are validated segment-by-segment. Use `update_plan` to record/update the task plan. You are explicitly authorized to call `readonly_shell` yourself; do not delegate it to a shell specialist. Avoid multi-line script-style commands; single-line is preferred (|, &&, || are ok). Paths must be relative to the rtws (runtime workspace). Hard denies: `readonly_shell` refuses rtws-root `.minds/` and `.dialogs/`; `apply_patch` is subject to the same access-control (including hard denies for `*.tsk/`, `.minds/`, and rtws-root `.dialogs/`).',
|
|
@@ -228,7 +249,10 @@ if (process.platform !== 'win32') {
|
|
|
228
249
|
(0, registry_1.registerToolset)('team_mgmt', [...team_mgmt_1.teamMgmtTools]);
|
|
229
250
|
(0, registry_1.setToolsetMeta)('team_mgmt', {
|
|
230
251
|
source: 'dominds',
|
|
231
|
-
descriptionI18n: {
|
|
252
|
+
descriptionI18n: {
|
|
253
|
+
en: 'Team management under `.minds/`: maintain team config, members, manuals, memory, and governed file changes.',
|
|
254
|
+
zh: '`.minds/` 下的团队管理:维护团队配置、成员、手册、记忆与受控文件修改。',
|
|
255
|
+
},
|
|
232
256
|
promptFilesI18n: promptFilesFor('team_mgmt'),
|
|
233
257
|
manualSpec: manualSpecFor('team_mgmt'),
|
|
234
258
|
});
|
package/dist/tools/ctrl.js
CHANGED
|
@@ -90,6 +90,35 @@ function isJsonValue(value) {
|
|
|
90
90
|
function isJsonObject(value) {
|
|
91
91
|
return isRecord(value) && Object.values(value).every((item) => isJsonValue(item));
|
|
92
92
|
}
|
|
93
|
+
function getManagerTool(meta) {
|
|
94
|
+
if (!isRecord(meta)) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
const manager = meta['manager'];
|
|
98
|
+
if (!isRecord(manager)) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
const tool = manager['tool'];
|
|
102
|
+
return typeof tool === 'string' && tool.trim().length > 0 ? tool.trim() : undefined;
|
|
103
|
+
}
|
|
104
|
+
function getDeleteAltInstruction(meta) {
|
|
105
|
+
if (!isRecord(meta)) {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
const deleteValue = meta['delete'];
|
|
109
|
+
if (!isRecord(deleteValue)) {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
const altInstruction = deleteValue['altInstruction'];
|
|
113
|
+
return typeof altInstruction === 'string' && altInstruction.trim().length > 0
|
|
114
|
+
? altInstruction.trim()
|
|
115
|
+
: undefined;
|
|
116
|
+
}
|
|
117
|
+
function formatManualDeleteBlockedError(language, altInstruction) {
|
|
118
|
+
return language === 'zh'
|
|
119
|
+
? `错误:该提醒项不能用 delete_reminder 删除;请改为执行:${altInstruction}`
|
|
120
|
+
: `Error: This reminder cannot be deleted via delete_reminder. Use instead: ${altInstruction}`;
|
|
121
|
+
}
|
|
93
122
|
function listNumberedReminderIndices(reminders) {
|
|
94
123
|
const indices = [];
|
|
95
124
|
for (let index = 0; index < reminders.length; index += 1) {
|
|
@@ -289,6 +318,10 @@ exports.deleteReminderTool = {
|
|
|
289
318
|
if (targetIndex < 0) {
|
|
290
319
|
return t.reminderDoesNotExist(String(reminderNoValue), numberedReminders.length);
|
|
291
320
|
}
|
|
321
|
+
const deleteAltInstruction = getDeleteAltInstruction(targetReminder.meta);
|
|
322
|
+
if (deleteAltInstruction !== undefined) {
|
|
323
|
+
return formatManualDeleteBlockedError(language, deleteAltInstruction);
|
|
324
|
+
}
|
|
292
325
|
dlg.deleteReminder(targetIndex);
|
|
293
326
|
return (0, tool_result_messages_1.formatToolActionResult)(language, 'deleted');
|
|
294
327
|
},
|
|
@@ -390,14 +423,11 @@ exports.updateReminderTool = {
|
|
|
390
423
|
// `reminder.meta` is persisted JSON. Runtime shape checks are unavoidable here because tools
|
|
391
424
|
// may attach arbitrary metadata for reminder ownership/management.
|
|
392
425
|
const meta = reminder?.meta;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
? `错误:该提醒项由工具 ${managedByTool} 管理,不能用 update_reminder 修改;请使用 ${managedByTool} 更新。`
|
|
399
|
-
: `Error: This reminder is managed by tool ${managedByTool}. Do not edit it via update_reminder; use ${managedByTool} instead.`;
|
|
400
|
-
}
|
|
426
|
+
const managerTool = getManagerTool(meta);
|
|
427
|
+
if (managerTool !== undefined) {
|
|
428
|
+
return language === 'zh'
|
|
429
|
+
? `错误:该提醒项由工具 ${managerTool} 管理,不能用 update_reminder 修改;请使用 ${managerTool} 更新。`
|
|
430
|
+
: `Error: This reminder is managed by tool ${managerTool}. Do not edit it via update_reminder; use ${managerTool} instead.`;
|
|
401
431
|
}
|
|
402
432
|
const contentValue = args['content'];
|
|
403
433
|
const reminderContent = typeof contentValue === 'string' ? contentValue.trim() : '';
|
|
@@ -82,15 +82,14 @@ function shouldIncludeSchemaToolsSection(spec) {
|
|
|
82
82
|
* No heuristics — `toolsetId` is an explicit parameter.
|
|
83
83
|
*/
|
|
84
84
|
function builtinManualTopicPaths(toolsetId, language) {
|
|
85
|
-
const suffix = language === 'en' ? '.en' : '';
|
|
86
85
|
const langDir = language;
|
|
87
86
|
const baseDir = `prompts/${toolsetId}`;
|
|
88
87
|
return {
|
|
89
|
-
index: path.join(baseDir, langDir,
|
|
90
|
-
principles: path.join(baseDir, langDir,
|
|
91
|
-
tools: path.join(baseDir, langDir,
|
|
92
|
-
scenarios: path.join(baseDir, langDir,
|
|
93
|
-
errors: path.join(baseDir, langDir,
|
|
88
|
+
index: path.join(baseDir, langDir, 'index.md'),
|
|
89
|
+
principles: path.join(baseDir, langDir, 'principles.md'),
|
|
90
|
+
tools: path.join(baseDir, langDir, 'tools.md'),
|
|
91
|
+
scenarios: path.join(baseDir, langDir, 'scenarios.md'),
|
|
92
|
+
errors: path.join(baseDir, langDir, 'errors.md'),
|
|
94
93
|
};
|
|
95
94
|
}
|
|
96
95
|
/**
|