dominds 1.8.0 → 1.8.1

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.
@@ -39,14 +39,15 @@ const dialog_global_registry_1 = require("./dialog-global-registry");
39
39
  const dialog_instance_registry_1 = require("./dialog-instance-registry");
40
40
  const log_1 = require("./log");
41
41
  const persistence_1 = require("./persistence");
42
+ const driver_messages_1 = require("./shared/i18n/driver-messages");
42
43
  const runtime_language_1 = require("./shared/runtime-language");
43
44
  const inter_dialog_format_1 = require("./shared/utils/inter-dialog-format");
44
45
  const pending_tellask_reminder_1 = require("./tools/pending-tellask-reminder");
45
46
  function buildClearedMindInvalidationNotice(language) {
46
47
  if (language === 'zh') {
47
- return '系统反馈:诉请对象已清理头脑并开启新一程对话;本轮诉请已失效,请基于最新完整上下文重新诉请祂。';
48
+ return `${(0, driver_messages_1.formatSystemNoticePrefix)(language)} 诉请对象已清理头脑并开启新一程对话;本轮诉请已失效,请基于最新完整上下文重新诉请祂。`;
48
49
  }
49
- return 'System notice: the callee cleared its mind and started a new course; this tellask round is no longer valid. Re-tellask with the latest complete context.';
50
+ return `${(0, driver_messages_1.formatSystemNoticePrefix)(language)} the callee cleared its mind and started a new course; this tellask round is no longer valid. Re-tellask with the latest complete context.`;
50
51
  }
51
52
  async function loadWaitingOwnerRecords(dialog) {
52
53
  const allDialogIds = await persistence_1.DialogPersistence.listAllDialogIds('running');
@@ -148,6 +148,10 @@ When `level === 'caution'`, the driver auto-inserts a **role=user** guidance pro
148
148
  LLM generation turn, and **persists it as a normal user message** so the UI renders it as a normal
149
149
  user instruction.
150
150
 
151
+ The runtime prefix for this class of message is an explicit system-notice header (currently
152
+ `[System notice]` in English and `【系统提示】` in Chinese), so the agent should treat it as
153
+ system-directed runtime guidance rather than as a self-authored reminder.
154
+
151
155
  Current behavior:
152
156
 
153
157
  - On entering `caution`, Dominds inserts the prompt once (entry injection).
@@ -120,6 +120,8 @@ Dominds 计算比率:
120
120
 
121
121
  当 `level === 'caution'` 时,驱动程序在**下一个** LLM 生成轮次自动插入一条 **role=user** 指导提示,并**将其持久化为普通用户消息**,以便 UI 将其渲染为正常的用户指令。
122
122
 
123
+ 这类消息在运行时会带明确的系统提示头标(当前英文为 `[System notice]`,中文为 `【系统提示】`),语义上应视为系统投递的运行时提示,而不是智能体给自己写的提醒项。
124
+
123
125
  当前行为:
124
126
 
125
127
  - 进入 `caution` 时,Dominds 插入一次提示(入口注入)。
@@ -1116,7 +1116,10 @@ To make the UI **faithfully reflect the original generation order**, and to ensu
1116
1116
  Dominds persists fine-grained message entries (thinking/saying/tool call/tool result, etc.). In contrast, most mainstream LLM provider chat protocols only support `role=user|assistant` (plus limited tool-specific variants).
1117
1117
 
1118
1118
  - **Ideal target**: Provider SDKs/protocols should natively support `role='environment'` (or an equivalent mechanism) for runtime-injected environment/system content (e.g. reminders, transient guides), so we don't have to disguise environment content as user messages.
1119
- - **Current reality**: Most providers do not support `role='environment'`. Therefore, when projecting Dominds messages into provider request payloads, Dominds must temporarily project `environment_msg` / `transient_guide_msg` / reminders as `role='user'` text blocks to keep requests valid.
1119
+ - **Current reality**: Most providers do not support `role='environment'`. Therefore, when projecting Dominds messages into provider request payloads, Dominds must flatten internal message kinds into provider-supported roles.
1120
+ - Runtime/system notices (`environment_msg`) are projected as `role='user'` text blocks.
1121
+ - Self-authored guides / self-reminders (`transient_guide_msg`) are projected as `role='assistant'` text blocks.
1122
+ - Reminders follow their source semantics rather than one blanket rule: system-maintained reminders (for example runtime status signals) should land on the `user` side as explicit system notices, while self-maintained work reminders stay on the `assistant` side as first-person work notes.
1120
1123
 
1121
1124
  Additionally, some providers (especially Anthropic-compatible endpoints) enforce stricter validation around **role alternation** and **tool_use/tool_result boundaries**. Dominds' projection layer must assemble internal fine-grained entries into provider-friendly turns (turn assembly), rather than sending a 1:1 mapping of persisted entries.
1122
1125
 
@@ -1097,7 +1097,10 @@ Dominds 将 LLM 输出拆分为多个“子流”(thinking、saying,以及
1097
1097
  Dominds 内部持久化的消息粒度较细(thinking/saying/tool call/tool result 等会以独立条目出现),而当前主流 LLM Provider 的对话协议一般仅支持 `role=user|assistant`(以及少量实现把工具结果视作特殊的 tool/user 变体)。
1098
1098
 
1099
1099
  - **理想目标**:Provider 协议能够原生支持 `role='environment'`(或等价机制)来承载运行时注入的环境/系统信息(例如 reminders、transient guide 等),从而避免把“环境信息”伪装成用户发言。
1100
- - **当前现实**:大多数 Provider 不支持 `role='environment'`。因此 Dominds 在投影到 Provider 请求 payload 时,必须把 `environment_msg` / `transient_guide_msg` / reminders 等内容暂时投影为 `role='user'` 的文本块,以保证请求结构可被接受。
1100
+ - **当前现实**:大多数 Provider 不支持 `role='environment'`。因此 Dominds 在投影到 Provider 请求 payload 时,必须把内部消息类型压平到 Provider 可接受的角色集合中。
1101
+ - 运行时/系统提示(`environment_msg`)投影为 `role='user'` 的文本块。
1102
+ - 智能体自写的短指导/自我提醒(`transient_guide_msg`)投影为 `role='assistant'` 的文本块。
1103
+ - reminders 不再一刀切:系统托管的状态型提醒(如运行时状态信号)应落在 `user` 侧并带明确系统提示头标;智能体自维护的工作提醒项则保留在 `assistant` 侧,以第一人称工作便签的语义出现。
1101
1104
 
1102
1105
  另外,一些 Provider(尤其是 Anthropic-compatible endpoint)对 **role 交替** 与 **tool_use/tool_result 的边界** 有更严格的结构校验。Dominds 的投影层需要把内部细粒度条目组装为更“turn 化”的 Provider 消息序列(turn assembly),而不是把内部条目逐条 1:1 发送。
1103
1106
 
@@ -151,11 +151,14 @@ Some reminders are generated by the runtime (e.g. background process status, MCP
151
151
 
152
152
  - read and adjust behavior
153
153
  - but don’t treat them as your personal worklog (their lifecycle is typically system-managed)
154
+ - 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
154
155
 
155
156
  #### 3) Curated by the agent: work reminders (working set / worklog)
156
157
 
157
158
  Reminders are your tiny working set: injected every turn, and preserved across `clear_mind`.
158
159
 
160
+ In message semantics, these should be treated as **self reminders**: they belong on the `role=assistant` side and should read like first-person working notes rather than fresh external instructions.
161
+
159
162
  Guidelines:
160
163
 
161
164
  - keep it to 1–3 items; update-in-place whenever possible
@@ -150,11 +150,14 @@ TL;DR:
150
150
 
151
151
  - 你应该阅读并据此调整行为
152
152
  - 但它们的生命周期通常由系统管理(自动更新/自动清理),不要把它们当成个人工作日志
153
+ - 在消息语义上,这类提醒应视为**系统提示**:通常落在 `role=user` 侧,并带显眼头标(如 `【系统提示】`),避免与个人工作提醒混淆
153
154
 
154
155
  #### 3) 智能体自主增删改:工作提醒项(工作集/工作日志)
155
156
 
156
157
  提醒项是你为自己维护的“超小工作集”:它会在每次生成时注入上下文,并能跨 `clear_mind` 保留。
157
158
 
159
+ 在消息语义上,这类提醒应视为**自我提醒**:落在 `role=assistant` 侧,并使用第一人称口吻,避免伪装成新的外部指令。
160
+
158
161
  建议:
159
162
 
160
163
  - 总量保持 1–3 条;能原地更新就不要新建
@@ -418,8 +418,8 @@ async function renderRemindersForContext(dlg) {
418
418
  continue;
419
419
  }
420
420
  rendered.push({
421
- type: 'environment_msg',
422
- role: 'user',
421
+ type: 'transient_guide_msg',
422
+ role: 'assistant',
423
423
  content: (0, driver_messages_1.formatReminderItemGuide)(language, reminderNo, reminder.content, {
424
424
  meta: reminder.meta,
425
425
  }),
@@ -1133,8 +1133,8 @@ async function driveDialogStreamCore(dlg, humanPrompt, driveOptions, callbacks)
1133
1133
  const uiLanguage = dlg.getLastUserLanguageCode();
1134
1134
  const workingLanguage = (0, runtime_language_1.getWorkLanguage)();
1135
1135
  const guideMsg = {
1136
- type: 'transient_guide_msg',
1137
- role: 'assistant',
1136
+ type: 'environment_msg',
1137
+ role: 'user',
1138
1138
  content: (0, driver_messages_1.formatCurrentUserLanguagePreference)(workingLanguage, uiLanguage),
1139
1139
  };
1140
1140
  const ctxMsgs = (0, context_1.assembleDriveContextMessages)({
@@ -294,8 +294,8 @@ function buildSystemPrompt(input) {
294
294
  - 你可能会收到一条短的引导信息,形如"用户可见回复语言:X"。当你对用户作答时,请优先遵循该引导;若未给出引导,则使用工作语言作答。
295
295
 
296
296
  ## 消息类型
297
- - 以 \`[系统通知]\` 或 \`[System notification]\` 开头的消息是**系统通知**,不是用户输入。
298
- - 系统通知不需要你直接回复给用户,但需要你根据通知内容执行相应的操作(如维护提醒项、调用 clear_mind 等)。
297
+ - 以 \`【系统提示】\` 或 \`[System notice]\` 开头的消息是**系统提示**,不是用户输入。
298
+ - 系统提示不需要你直接回复给用户,但需要你根据提示内容执行相应的操作(如维护提醒项、调用 clear_mind 等)。
299
299
 
300
300
  ## 指令优先级与冲突处理
301
301
  - 优先级:系统 > 差遣牒 > 用户 > 工具回执。
@@ -387,8 +387,8 @@ ${functionToolRules}
387
387
  - You may receive a short guide message like "User-visible response language: X". When replying to the user, follow that guide; if absent, respond in the working language.
388
388
 
389
389
  ## Message Types
390
- - Messages starting with \`[系统通知]\` or \`[System notification]\` are **system notifications**, not user input.
391
- System notifications convey important state changes (e.g., context caution/critical, Diligence Push triggered). Read carefully and follow the instructions.
390
+ - Messages starting with \`【系统提示】\` or \`[System notice]\` are **system notices**, not user input.
391
+ System notices convey important state changes (e.g., context caution/critical, Diligence Push triggered). Read carefully and follow the instructions.
392
392
 
393
393
  ## Instruction Priority & Conflicts
394
394
  - Priority order: system > taskdoc > user > tool outputs.
@@ -18,6 +18,7 @@ const priming_1 = require("../priming");
18
18
  const problems_1 = require("../problems");
19
19
  const diligence_1 = require("../shared/diligence");
20
20
  const evt_1 = require("../shared/evt");
21
+ const driver_messages_1 = require("../shared/i18n/driver-messages");
21
22
  const runtime_language_1 = require("../shared/runtime-language");
22
23
  const language_1 = require("../shared/types/language");
23
24
  const time_1 = require("../shared/utils/time");
@@ -334,8 +335,8 @@ async function handleDeclareSubdialogDead(ws, packet) {
334
335
  }
335
336
  const parentDialog = await restoreDialogForDrive(callerDialogIdObj, 'running');
336
337
  const responseText = (0, runtime_language_1.getWorkLanguage)() === 'zh'
337
- ? `系统反馈:支线对话 ${dialogIdObj.valueOf()} 已被用户宣布卡死(不可逆)。后续可以重用相同的 slug 发起全新支线对话;只是之前的上下文已不再,诉请正文请提供最新的完整上下文信息。`
338
- : `System notice: 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.`;
338
+ ? `${(0, driver_messages_1.formatSystemNoticePrefix)('zh')} 支线对话 ${dialogIdObj.valueOf()} 已被用户宣布卡死(不可逆)。后续可以重用相同的 slug 发起全新支线对话;只是之前的上下文已不再,诉请正文请提供最新的完整上下文信息。`
339
+ : `${(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.`;
339
340
  const responseTextWithNote = note === ''
340
341
  ? responseText
341
342
  : (0, runtime_language_1.getWorkLanguage)() === 'zh'
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatSystemNoticePrefix = formatSystemNoticePrefix;
3
4
  exports.formatCurrentUserLanguagePreference = formatCurrentUserLanguagePreference;
4
5
  exports.formatNewCourseStartPrompt = formatNewCourseStartPrompt;
5
6
  exports.formatReminderItemGuide = formatReminderItemGuide;
@@ -11,19 +12,23 @@ exports.formatDomindsNoteDirectSelfCall = formatDomindsNoteDirectSelfCall;
11
12
  exports.formatDomindsNoteFbrDisabled = formatDomindsNoteFbrDisabled;
12
13
  exports.formatDomindsNoteFbrToollessViolation = formatDomindsNoteFbrToollessViolation;
13
14
  const language_1 = require("../types/language");
15
+ function formatSystemNoticePrefix(language) {
16
+ return language === 'zh' ? '【系统提示】' : '[System notice]';
17
+ }
14
18
  function formatCurrentUserLanguagePreference(workingLanguage, uiLanguage) {
15
19
  const uiName = (0, language_1.formatLanguageName)(uiLanguage, workingLanguage);
16
20
  const workingName = (0, language_1.formatLanguageName)(workingLanguage, workingLanguage);
21
+ const prefix = formatSystemNoticePrefix(workingLanguage);
17
22
  if (workingLanguage === 'zh') {
18
23
  if (uiLanguage === workingLanguage) {
19
- return `用户可见回复语言:${uiName}。`;
24
+ return `${prefix}\n你对用户的可见回复语言应使用:${uiName}。`;
20
25
  }
21
- return `用户可见回复语言:${uiName}。内部工作语言保持为:${workingName}(用于系统提示、队友诉请与工具调用)。`;
26
+ return `${prefix}\n你对用户的可见回复语言应使用:${uiName}。\n你的内部工作语言保持为:${workingName}(用于系统提示、队友诉请与工具调用)。`;
22
27
  }
23
28
  if (uiLanguage === workingLanguage) {
24
- return `User-visible response language: ${uiName}.`;
29
+ return `${prefix}\nYour user-visible reply language should be: ${uiName}.`;
25
30
  }
26
- return `User-visible response language: ${uiName}. Internal work language remains: ${workingName} (system prompt, teammate comms, function tools).`;
31
+ return `${prefix}\nYour user-visible reply language should be: ${uiName}.\nYour internal work language remains: ${workingName} (system prompt, teammate comms, function tools).`;
27
32
  }
28
33
  function formatNewCourseStartPrompt(language, args) {
29
34
  if (language === 'zh') {
@@ -78,12 +83,12 @@ function formatReminderItemGuide(language, index, content, options) {
78
83
  return [
79
84
  `提醒项 #${index}(工具状态)`,
80
85
  '',
81
- '说明:这是由工具维护的提醒展示,可视为当前状态参考;它不自动等于你现在必须立刻执行的指令。',
86
+ '我把这条当作工具维护的状态参考,不把它自动当成我现在必须立刻执行的指令。',
82
87
  '',
83
- `提示:该提醒项由工具 ${managementTool} 管理;如需调整,请使用 ${managementTool}(不要用 update_reminder)。`,
88
+ `这条提醒项由工具 ${managementTool} 管理;如果我要调整它,就用 ${managementTool}(不要用 update_reminder)。`,
84
89
  '',
85
- `如需更新此提醒项,可执行:${updateExampleSafe}`,
86
- `如需删除此提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`,
90
+ `如果我要更新这条提醒项,可执行:${updateExampleSafe}`,
91
+ `如果我要删除这条提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`,
87
92
  '',
88
93
  '---',
89
94
  content,
@@ -93,12 +98,12 @@ function formatReminderItemGuide(language, index, content, options) {
93
98
  return [
94
99
  `提醒项 #${index}(换程接续信息)`,
95
100
  '',
96
- '说明:这是用于换程后快速恢复工作的接续包,不自动等于当前必须立刻执行的指令。',
101
+ '我把这条当作换程后快速恢复工作的接续包,不把它自动当成当前必须立刻执行的指令。',
97
102
  '',
98
- '建议:优先保留下一步行动、关键定位、运行/验证信息、容易丢的临时细节;不要重复差遣牒已覆盖的内容。进入新一程后,第一步就要以清醒头脑重新审视并整理更新:删除冗余、纠正偏激/失真思路、压缩成高质量提醒项。若目前只是粗略过桥笔记,进入新一程后必须尽快收敛。',
103
+ '我应优先保留下一步行动、关键定位、运行/验证信息、容易丢的临时细节;不要重复差遣牒已覆盖的内容。进入新一程后,我的第一步就是以清醒头脑重新审视并整理更新:删除冗余、纠正偏激/失真思路、压缩成高质量提醒项。若目前只是粗略过桥笔记,进入新一程后我必须尽快收敛。',
99
104
  '',
100
- `如需更新此接续包,可执行:update_reminder({ "reminder_no": ${index}, "content": "..." })`,
101
- `如需删除此提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`,
105
+ `如果我要更新这份接续包,可执行:update_reminder({ "reminder_no": ${index}, "content": "..." })`,
106
+ `如果我要删除这条提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`,
102
107
  '',
103
108
  '---',
104
109
  content,
@@ -107,12 +112,12 @@ function formatReminderItemGuide(language, index, content, options) {
107
112
  return [
108
113
  `提醒项 #${index}`,
109
114
  '',
110
- '说明:这是你给自己的显眼提示,用于保留当前对话里容易丢的工作信息;它不自动等于系统下发的下一步动作。',
115
+ '这是我给自己的显眼提示,用于保留当前对话里容易丢的工作信息;我不把它自动当成系统下发的下一步动作。',
111
116
  '',
112
- '建议:保持简洁、及时更新;不再需要时删除。若后续准备换程,也可以把它整理成接续包。',
117
+ '我应保持简洁、及时更新;不再需要时就删除。若后续准备换程,也可以把它整理成接续包。',
113
118
  '',
114
- `如需更新此提醒项,可执行:update_reminder({ "reminder_no": ${index}, "content": "..." })`,
115
- `如需删除此提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`,
119
+ `如果我要更新这条提醒项,可执行:update_reminder({ "reminder_no": ${index}, "content": "..." })`,
120
+ `如果我要删除这条提醒项,可执行:delete_reminder({ "reminder_no": ${index} })`,
116
121
  '',
117
122
  '---',
118
123
  content,
@@ -122,45 +127,47 @@ function formatReminderItemGuide(language, index, content, options) {
122
127
  const updateExampleSafe = updateExample ?? `${managementTool}({ ... })`;
123
128
  return `REMINDER ITEM #${index} (TOOL STATE)
124
129
 
125
- Note: this is a tool-maintained reminder display. Treat it as state reference, not as an automatic must-do command.
130
+ I treat this as a tool-maintained state reference, not as an automatic must-do command.
126
131
 
127
- This reminder is managed by tool ${managementTool}; if you need to change it, use ${managementTool} instead of update_reminder.
132
+ This reminder is managed by tool ${managementTool}; if I need to change it, I should use ${managementTool} instead of update_reminder.
128
133
 
129
- If you need to update this reminder, run: ${updateExampleSafe}
130
- If you need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })
134
+ If I need to update this reminder, run: ${updateExampleSafe}
135
+ If I need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })
131
136
  ---
132
137
  ${content}`;
133
138
  }
134
139
  if (isContinuationPackageReminder) {
135
140
  return `REMINDER ITEM #${index} (CONTINUATION PACKAGE)
136
141
 
137
- Note: this is resume information for the next course, not an automatic must-do command.
142
+ I treat this as resume information for the next course, not as an automatic must-do command.
138
143
 
139
- Guidance: keep the next step, key pointers, run/verify info, and easy-to-lose volatile details. Do not duplicate Taskdoc content. In the new course, your first step is to review and rewrite this with a clear head: remove redundancy, correct biased or distorted bridge notes, and compress it into a high-quality reminder. If this is only a rough bridge note, reconcile it early in the new course.
144
+ 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.
140
145
 
141
- If you need to update this package, run: update_reminder({ "reminder_no": ${index}, "content": "..." })
142
- If you need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })
146
+ If I need to update this package, run: update_reminder({ "reminder_no": ${index}, "content": "..." })
147
+ If I need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })
143
148
  ---
144
149
  ${content}`;
145
150
  }
146
151
  return `REMINDER ITEM #${index}
147
152
 
148
- Note: this is a conspicuous reminder to yourself for easy-to-lose work details in the current dialog. It is not an automatically assigned next action.
153
+ This is my conspicuous self-reminder for easy-to-lose work details in the current dialog. I do not treat it as an automatically assigned next action.
149
154
 
150
- Guidance: keep it concise, refresh it when needed, and delete it when obsolete. If you are preparing a new course, you can also rewrite it into a continuation package.
155
+ 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.
151
156
 
152
- If you need to update this reminder, run: update_reminder({ "reminder_no": ${index}, "content": "..." })
153
- If you need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })
157
+ If I need to update this reminder, run: update_reminder({ "reminder_no": ${index}, "content": "..." })
158
+ If I need to delete this reminder, run: delete_reminder({ "reminder_no": ${index} })
154
159
  ---
155
160
  ${content}`;
156
161
  }
157
162
  function formatQ4HDiligencePushBudgetExhausted(language, args) {
158
163
  const maxInjectCount = args.maxInjectCount;
159
164
  if (language === 'zh') {
160
- return [`[系统通知] 已经鞭策了 ${maxInjectCount} 次,智能体仍不听劝。`].join('\n');
165
+ return [
166
+ `${formatSystemNoticePrefix(language)} 已经鞭策了 ${maxInjectCount} 次,智能体仍不听劝。`,
167
+ ].join('\n');
161
168
  }
162
169
  return [
163
- `[System notification] After ${maxInjectCount} Diligence Push attempts, the agent is still not moved.`,
170
+ `${formatSystemNoticePrefix(language)} After ${maxInjectCount} Diligence Push attempts, the agent is still not moved.`,
164
171
  ].join('\n');
165
172
  }
166
173
  function formatDomindsNoteTellaskForTeammatesOnly(language, args) {
@@ -191,7 +198,7 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
191
198
  if (language === 'zh') {
192
199
  if (args.kind === 'caution' && args.mode === 'soft') {
193
200
  return [
194
- '[系统通知] 上下文状态:🟡 吃紧',
201
+ `${formatSystemNoticePrefix(language)} 上下文状态:🟡 吃紧`,
195
202
  '',
196
203
  '影响:对话历史中的工具调用/结果信息很多已经过时,成为你的思考负担。',
197
204
  '',
@@ -205,7 +212,7 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
205
212
  ].join('\n');
206
213
  }
207
214
  return [
208
- '[系统通知] 上下文状态:🔴 告急',
215
+ `${formatSystemNoticePrefix(language)} 上下文状态:🔴 告急`,
209
216
  '',
210
217
  `系统最多再提醒你 ${args.promptsRemainingAfterThis} 次,之后将自动清理头脑开启新一程对话。`,
211
218
  '',
@@ -221,7 +228,7 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
221
228
  }
222
229
  if (args.kind === 'caution' && args.mode === 'soft') {
223
230
  return [
224
- '[System notification] Context state: 🟡 caution',
231
+ `${formatSystemNoticePrefix(language)} Context state: 🟡 caution`,
225
232
  '',
226
233
  'Impact: stale call/results in dialog history are creating cognitive noise.',
227
234
  '',
@@ -235,7 +242,7 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
235
242
  ].join('\n');
236
243
  }
237
244
  return [
238
- '[System notification] Context state: 🔴 critical',
245
+ `${formatSystemNoticePrefix(language)} Context state: 🔴 critical`,
239
246
  '',
240
247
  `System will remind you ${args.promptsRemainingAfterThis} more time(s), then automatically clear mind.`,
241
248
  '',
package/dist/tools/mcp.js CHANGED
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.mcpLeaseReminderOwner = exports.mcpReleaseTool = exports.mcpRestartTool = void 0;
9
9
  const log_1 = require("../log");
10
10
  const supervisor_1 = require("../mcp/supervisor");
11
+ const driver_messages_1 = require("../shared/i18n/driver-messages");
11
12
  const runtime_language_1 = require("../shared/runtime-language");
12
13
  const log = (0, log_1.createLogger)('tools/mcp');
13
14
  function parseMcpRestartArgs(args) {
@@ -137,38 +138,38 @@ exports.mcpLeaseReminderOwner = {
137
138
  return { treatment: 'keep' };
138
139
  },
139
140
  async renderReminder(dlg, reminder, index) {
141
+ const workLanguage = (0, runtime_language_1.getWorkLanguage)();
142
+ const prefix = (0, driver_messages_1.formatSystemNoticePrefix)(workLanguage);
140
143
  if (reminder.owner !== exports.mcpLeaseReminderOwner || !isMcpLeaseReminderMeta(reminder.meta)) {
141
- const workLanguage = (0, runtime_language_1.getWorkLanguage)();
142
144
  return {
143
- type: 'transient_guide_msg',
144
- role: 'assistant',
145
+ type: 'environment_msg',
146
+ role: 'user',
145
147
  content: workLanguage === 'zh'
146
- ? `系统提醒 #${index + 1}\n\n${reminder.content}`
147
- : `System Reminder #${index + 1}\n\n${reminder.content}`,
148
+ ? `${prefix} MCP 工具集租约提醒 #${index + 1}\n你正在查看系统维护的 MCP 租约状态,不要把它当成你自己写的工作便签。\n\n${reminder.content}`
149
+ : `${prefix} MCP toolset lease reminder #${index + 1}\nYou are looking at system-maintained MCP lease state. Do not treat it as a self-authored work note.\n\n${reminder.content}`,
148
150
  };
149
151
  }
150
152
  const serverId = reminder.meta.serverId;
151
- const workLanguage = (0, runtime_language_1.getWorkLanguage)();
152
153
  return {
153
- type: 'transient_guide_msg',
154
- role: 'assistant',
154
+ type: 'environment_msg',
155
+ role: 'user',
155
156
  content: workLanguage === 'zh'
156
157
  ? [
157
- `MCP 工具集租约 #${index + 1}: \`${serverId}\``,
158
+ `${prefix} MCP 工具集租约 #${index + 1}: \`${serverId}\``,
158
159
  '',
159
- `该 MCP server 被视为非“真正无状态”。此对话已租用一个专用的 MCP client 实例。`,
160
+ `你当前看到的是系统维护的 MCP 租约状态。该 MCP server 被视为非“真正无状态”;此对话已租用一个专用的 MCP client 实例。`,
160
161
  '',
161
- `当你确认近期不再需要这个工具集时,请释放以停止/回收底层 MCP 进程/连接:`,
162
+ `当你确认近期不再需要这个工具集时,请释放它,以停止/回收底层 MCP 进程或连接:`,
162
163
  `- \`mcp_release({\"serverId\":\"${serverId}\"})\``,
163
164
  '',
164
165
  `如果另一个对话同时使用同一个 MCP 工具集,Dominds 会为那个对话启动一个独立的 MCP client 实例。`,
165
166
  ].join('\n')
166
167
  : [
167
- `MCP toolset lease #${index + 1}: \`${serverId}\``,
168
+ `${prefix} MCP toolset lease #${index + 1}: \`${serverId}\``,
168
169
  '',
169
- `This MCP server is treated as non-stateless. A dedicated MCP client instance is leased to this dialog.`,
170
+ `You are looking at system-maintained MCP lease state. This MCP server is treated as non-stateless, and a dedicated MCP client instance is leased to this dialog.`,
170
171
  '',
171
- `When you are confident you won't need this toolset in the near future, release it to stop the underlying MCP process/connection:`,
172
+ `When you are confident you will not need this toolset soon, release it to stop the underlying MCP process/connection:`,
172
173
  `- \`mcp_release({\"serverId\":\"${serverId}\"})\``,
173
174
  '',
174
175
  `If another dialog uses the same MCP toolset concurrently, Dominds will spawn a separate MCP client instance for that dialog.`,
package/dist/tools/os.js CHANGED
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getDaemonOutputTool = exports.stopDaemonTool = exports.readonlyShellTool = exports.shellCmdTool = exports.shellCmdReminderOwner = void 0;
13
13
  const child_process_1 = require("child_process");
14
14
  const path_1 = __importDefault(require("path"));
15
+ const driver_messages_1 = require("../shared/i18n/driver-messages");
15
16
  const runtime_language_1 = require("../shared/runtime-language");
16
17
  const time_1 = require("../shared/utils/time");
17
18
  // Scrolling buffer that maintains a fixed number of lines like a terminal
@@ -467,13 +468,20 @@ exports.shellCmdReminderOwner = {
467
468
  };
468
469
  },
469
470
  async renderReminder(dlg, reminder, index) {
471
+ const language = (0, runtime_language_1.getWorkLanguage)();
472
+ const prefix = (0, driver_messages_1.formatSystemNoticePrefix)(language);
470
473
  if (reminder.owner !== exports.shellCmdReminderOwner || !isShellCmdReminderMeta(reminder.meta)) {
471
474
  // Fallback to default rendering if this reminder doesn't belong to this tool
472
475
  return {
473
- type: 'transient_guide_msg',
474
- role: 'assistant',
475
- content: `🔔 **System-managed reminder item #${index + 1}** - Process Management
476
- This reminder is system-managed and should update/drop automatically based on the underlying process lifecycle.
476
+ type: 'environment_msg',
477
+ role: 'user',
478
+ content: language === 'zh'
479
+ ? `${prefix} 后台进程状态提醒 #${index + 1}
480
+ 你正在查看系统维护的后台进程状态,不要把它当成你自己写的工作便签。该提醒会随进程生命周期自动更新或删除。
481
+ ---
482
+ ${reminder.content}`
483
+ : `${prefix} Background process status reminder #${index + 1}
484
+ You are looking at system-maintained background process state. Do not treat it as a self-authored work note. This reminder will update or disappear automatically with the process lifecycle.
477
485
  ---
478
486
  ${reminder.content}`,
479
487
  };
@@ -483,10 +491,13 @@ ${reminder.content}`,
483
491
  if (!daemon) {
484
492
  // Daemon no longer exists, render as completed
485
493
  return {
486
- type: 'transient_guide_msg',
487
- role: 'assistant',
488
- content: `⚰️ **Process Lifecycle Alert #${index + 1}** - Daemon Terminated (PID ${pid})
489
- This daemon process has completed its lifecycle and is no longer running. This reminder should auto-drop (or can be ignored).`,
494
+ type: 'environment_msg',
495
+ role: 'user',
496
+ content: language === 'zh'
497
+ ? `${prefix} 进程生命周期提醒 #${index + 1} - 后台进程已结束(PID ${pid})
498
+ 该后台进程的生命周期已经结束,当前不再运行。这条提醒应当很快自动消失;你也可以直接忽略它。`
499
+ : `${prefix} Process lifecycle reminder #${index + 1} - daemon terminated (PID ${pid})
500
+ This daemon process has finished its lifecycle and is no longer running. This reminder should disappear automatically soon, and you may also ignore it.`,
490
501
  };
491
502
  }
492
503
  // Render with current daemon status - fully dynamic
@@ -498,12 +509,18 @@ This daemon process has completed its lifecycle and is no longer running. This r
498
509
  : `${Math.floor(uptime / 3600)}h ${Math.floor((uptime % 3600) / 60)}m`;
499
510
  const statusInfo = formatDaemonStatus(daemon);
500
511
  return {
501
- type: 'transient_guide_msg',
502
- role: 'assistant',
503
- content: `🔄 **Active Daemon Monitor #${index + 1}** - PID ${pid} (Uptime: ${uptimeStr})
504
- This daemon process is actively running and requires periodic assessment. I should check its health, resource usage, and operational status. This reminder is system-managed and will update/drop automatically.
512
+ type: 'environment_msg',
513
+ role: 'user',
514
+ content: language === 'zh'
515
+ ? `🔄 ${prefix} 运行中后台进程监控 #${index + 1} - PID ${pid}(已运行 ${uptimeStr})
516
+ 你当前有一个仍在运行的后台进程。请按需要检查它的健康状态、资源占用和输出情况;这条提醒由系统自动维护,会随进程状态变化自动更新或删除。
517
+
518
+ **当前状态:**
519
+ ${statusInfo}`
520
+ : `🔄 ${prefix} Active daemon monitor #${index + 1} - PID ${pid} (uptime: ${uptimeStr})
521
+ You currently have a background process that is still running. Check its health, resource usage, and output as needed. This reminder is system-maintained and will update or disappear automatically as the process state changes.
505
522
 
506
- **Current Status:**
523
+ **Current status:**
507
524
  ${statusInfo}`,
508
525
  };
509
526
  },
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pendingTellaskReminderOwner = void 0;
4
4
  exports.syncPendingTellaskReminderState = syncPendingTellaskReminderState;
5
5
  const persistence_1 = require("../persistence");
6
+ const driver_messages_1 = require("../shared/i18n/driver-messages");
6
7
  const runtime_language_1 = require("../shared/runtime-language");
7
8
  const time_1 = require("../shared/utils/time");
8
9
  function isRecord(value) {
@@ -166,20 +167,23 @@ exports.pendingTellaskReminderOwner = {
166
167
  return { treatment: 'update', updatedContent, updatedMeta };
167
168
  },
168
169
  async renderReminder(_dlg, reminder, index) {
170
+ const language = (0, runtime_language_1.getWorkLanguage)();
171
+ const prefix = (0, driver_messages_1.formatSystemNoticePrefix)(language);
169
172
  if (reminder.owner !== exports.pendingTellaskReminderOwner) {
170
- const language = (0, runtime_language_1.getWorkLanguage)();
171
173
  return {
172
- type: 'transient_guide_msg',
173
- role: 'assistant',
174
+ type: 'environment_msg',
175
+ role: 'user',
174
176
  content: language === 'zh'
175
- ? `系统提醒 #${index + 1}\n\n${reminder.content}`
176
- : `System reminder #${index + 1}\n\n${reminder.content}`,
177
+ ? `${prefix} 自动维护诉请状态提醒 #${index + 1}\n你正在查看系统自动维护的诉请状态,不要把它当成你自己写的工作便签。\n\n${reminder.content}`
178
+ : `${prefix} Auto-maintained tellask status reminder #${index + 1}\nYou are looking at system-maintained tellask state. Do not treat it as a self-authored work note.\n\n${reminder.content}`,
177
179
  };
178
180
  }
179
181
  return {
180
- type: 'transient_guide_msg',
181
- role: 'assistant',
182
- content: reminder.content,
182
+ type: 'environment_msg',
183
+ role: 'user',
184
+ content: language === 'zh'
185
+ ? `${prefix} 自动维护诉请状态提醒 #${index + 1}\n你正在查看系统自动维护的诉请状态,不要把它当成你自己写的工作便签。\n\n${reminder.content}`
186
+ : `${prefix} Auto-maintained tellask status reminder #${index + 1}\nYou are looking at system-maintained tellask state. Do not treat it as a self-authored work note.\n\n${reminder.content}`,
183
187
  };
184
188
  },
185
189
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dominds",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "DevOps Mindsets — Sustainable Agentic Product Lifecycle",
5
5
  "type": "commonjs",
6
6
  "private": false,