dominds 1.7.2 → 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.
- package/dist/cli/read.js +4 -1
- package/dist/course-transition.js +3 -2
- package/dist/docs/context-health.md +4 -0
- package/dist/docs/context-health.zh.md +2 -0
- package/dist/docs/dialog-system.md +4 -1
- package/dist/docs/dialog-system.zh.md +4 -1
- package/dist/docs/memory-system.md +3 -0
- package/dist/docs/memory-system.zh.md +3 -0
- package/dist/llm/gen/anthropic.js +2 -2
- package/dist/llm/gen/codex.js +8 -4
- package/dist/llm/gen/mock.js +2 -2
- package/dist/llm/gen/openai-compatible.js +2 -2
- package/dist/llm/gen/openai.js +2 -2
- package/dist/llm/kernel-driver/drive.js +14 -6
- package/dist/minds/system-prompt.js +4 -4
- package/dist/server/websocket-handler.js +3 -2
- package/dist/shared/i18n/driver-messages.js +41 -34
- package/dist/tools/mcp.js +15 -14
- package/dist/tools/os.js +30 -13
- package/dist/tools/pending-tellask-reminder.js +12 -8
- package/dist/tools/team_mgmt.js +4 -1
- package/package.json +2 -2
package/dist/cli/read.js
CHANGED
|
@@ -98,7 +98,10 @@ async function runFuxiAuditCall(runtime, userContent) {
|
|
|
98
98
|
},
|
|
99
99
|
};
|
|
100
100
|
const context = [{ type: 'environment_msg', role: 'user', content: userContent }];
|
|
101
|
-
await runtime.llmGen.genToReceiver(runtime.providerCfg, runtime.auditAgent, runtime.auditorSystemPrompt, [],
|
|
101
|
+
await runtime.llmGen.genToReceiver(runtime.providerCfg, runtime.auditAgent, runtime.auditorSystemPrompt, [], {
|
|
102
|
+
dialogSelfId: 'cli-read-audit',
|
|
103
|
+
dialogRootId: 'cli-read-audit',
|
|
104
|
+
}, context, receiver, 0);
|
|
102
105
|
const trimmed = output.trim();
|
|
103
106
|
if (trimmed.length > 0)
|
|
104
107
|
return trimmed;
|
|
@@ -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
|
|
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
|
|
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
|
|
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 条;能原地更新就不要新建
|
|
@@ -907,7 +907,7 @@ class AnthropicGen {
|
|
|
907
907
|
get apiType() {
|
|
908
908
|
return 'anthropic';
|
|
909
909
|
}
|
|
910
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, _genseq, abortSignal) {
|
|
910
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, receiver, _genseq, abortSignal) {
|
|
911
911
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
912
912
|
if (!apiKey)
|
|
913
913
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -957,7 +957,7 @@ class AnthropicGen {
|
|
|
957
957
|
const stream = client.messages.stream(streamParams);
|
|
958
958
|
return consumeAnthropicStream(stream, receiver, abortSignal, forceJsonResponse ? ANTHROPIC_JSON_RESPONSE_TOOL_NAME : undefined);
|
|
959
959
|
}
|
|
960
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, context, genseq, abortSignal) {
|
|
960
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, genseq, abortSignal) {
|
|
961
961
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
962
962
|
if (!apiKey)
|
|
963
963
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
package/dist/llm/gen/codex.js
CHANGED
|
@@ -432,7 +432,7 @@ async function buildCodexInput(context, providerConfig) {
|
|
|
432
432
|
}
|
|
433
433
|
return input;
|
|
434
434
|
}
|
|
435
|
-
async function buildCodexRequest(providerConfig, agent, instructions, assistantPrelude, funcTools, context) {
|
|
435
|
+
async function buildCodexRequest(providerConfig, agent, instructions, assistantPrelude, funcTools, requestContext, context) {
|
|
436
436
|
if (!agent.model) {
|
|
437
437
|
throw new Error(`Internal error: Model is undefined for agent '${agent.id}'`);
|
|
438
438
|
}
|
|
@@ -469,6 +469,10 @@ async function buildCodexRequest(providerConfig, agent, instructions, assistantP
|
|
|
469
469
|
store: false,
|
|
470
470
|
stream: true,
|
|
471
471
|
include,
|
|
472
|
+
...(requestContext.promptCacheKey !== undefined &&
|
|
473
|
+
requestContext.promptCacheKey.trim().length > 0
|
|
474
|
+
? { prompt_cache_key: requestContext.promptCacheKey }
|
|
475
|
+
: {}),
|
|
472
476
|
text,
|
|
473
477
|
};
|
|
474
478
|
}
|
|
@@ -476,7 +480,7 @@ class CodexGen {
|
|
|
476
480
|
get apiType() {
|
|
477
481
|
return 'codex';
|
|
478
482
|
}
|
|
479
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, _genseq, abortSignal) {
|
|
483
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, requestContext, context, receiver, _genseq, abortSignal) {
|
|
480
484
|
const codexHomeValue = process.env[providerConfig.apiKeyEnvVar] || '~/.codex';
|
|
481
485
|
const codexHome = codexHomeValue.startsWith('~')
|
|
482
486
|
? process.env['HOME'] + codexHomeValue.substring(1)
|
|
@@ -492,7 +496,7 @@ class CodexGen {
|
|
|
492
496
|
throw new Error(`Internal error: Model is undefined for agent '${agent.id}'`);
|
|
493
497
|
}
|
|
494
498
|
const resolvedInstructions = await resolveCodexInstructions(agent.model, systemPrompt, codexAuth.loadCodexPrompt);
|
|
495
|
-
const payload = await buildCodexRequest(providerConfig, agent, resolvedInstructions.instructions, resolvedInstructions.assistantPrelude, funcTools, context);
|
|
499
|
+
const payload = await buildCodexRequest(providerConfig, agent, resolvedInstructions.instructions, resolvedInstructions.assistantPrelude, funcTools, requestContext, context);
|
|
496
500
|
let sayingStarted = false;
|
|
497
501
|
let thinkingStarted = false;
|
|
498
502
|
let sawOutputText = false;
|
|
@@ -843,7 +847,7 @@ class CodexGen {
|
|
|
843
847
|
}
|
|
844
848
|
return { usage, llmGenModel: returnedModel };
|
|
845
849
|
}
|
|
846
|
-
async genMoreMessages(_providerConfig, _agent, _systemPrompt, _funcTools, _context, _genseq) {
|
|
850
|
+
async genMoreMessages(_providerConfig, _agent, _systemPrompt, _funcTools, _requestContext, _context, _genseq) {
|
|
847
851
|
throw new Error('Codex generator only supports streaming mode.');
|
|
848
852
|
}
|
|
849
853
|
}
|
package/dist/llm/gen/mock.js
CHANGED
|
@@ -289,7 +289,7 @@ responses:
|
|
|
289
289
|
response: "Your response here"
|
|
290
290
|
\`\`\``;
|
|
291
291
|
}
|
|
292
|
-
async genToReceiver(providerConfig, agent, systemPrompt, _funcTools, context, receiver, _genseq, abortSignal) {
|
|
292
|
+
async genToReceiver(providerConfig, agent, systemPrompt, _funcTools, _requestContext, context, receiver, _genseq, abortSignal) {
|
|
293
293
|
const dbPath = providerConfig.baseUrl;
|
|
294
294
|
if (!agent.model) {
|
|
295
295
|
throw new Error('Model undefined for agent: ' + agent.id);
|
|
@@ -384,7 +384,7 @@ responses:
|
|
|
384
384
|
}
|
|
385
385
|
return { usage, llmGenModel: modelName };
|
|
386
386
|
}
|
|
387
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, _funcTools, context, genseq, abortSignal) {
|
|
387
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, _funcTools, _requestContext, context, genseq, abortSignal) {
|
|
388
388
|
if (abortSignal?.aborted) {
|
|
389
389
|
throw new Error('AbortError');
|
|
390
390
|
}
|
|
@@ -534,7 +534,7 @@ class OpenAiCompatibleGen {
|
|
|
534
534
|
get apiType() {
|
|
535
535
|
return 'openai-compatible';
|
|
536
536
|
}
|
|
537
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, genseq, abortSignal) {
|
|
537
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, receiver, genseq, abortSignal) {
|
|
538
538
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
539
539
|
if (!apiKey)
|
|
540
540
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -738,7 +738,7 @@ class OpenAiCompatibleGen {
|
|
|
738
738
|
}
|
|
739
739
|
return { usage, ...(returnedModel ? { llmGenModel: returnedModel } : {}) };
|
|
740
740
|
}
|
|
741
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, context, genseq, abortSignal) {
|
|
741
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, genseq, abortSignal) {
|
|
742
742
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
743
743
|
if (!apiKey)
|
|
744
744
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
package/dist/llm/gen/openai.js
CHANGED
|
@@ -522,7 +522,7 @@ class OpenAiGen {
|
|
|
522
522
|
get apiType() {
|
|
523
523
|
return 'openai';
|
|
524
524
|
}
|
|
525
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, _genseq, abortSignal) {
|
|
525
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, receiver, _genseq, abortSignal) {
|
|
526
526
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
527
527
|
if (!apiKey)
|
|
528
528
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -977,7 +977,7 @@ class OpenAiGen {
|
|
|
977
977
|
}
|
|
978
978
|
return { usage, llmGenModel: returnedModel };
|
|
979
979
|
}
|
|
980
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, context, genseq, abortSignal) {
|
|
980
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, genseq, abortSignal) {
|
|
981
981
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
982
982
|
if (!apiKey)
|
|
983
983
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -418,8 +418,8 @@ async function renderRemindersForContext(dlg) {
|
|
|
418
418
|
continue;
|
|
419
419
|
}
|
|
420
420
|
rendered.push({
|
|
421
|
-
type: '
|
|
422
|
-
role: '
|
|
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: '
|
|
1137
|
-
role: '
|
|
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)({
|
|
@@ -1162,7 +1162,11 @@ async function driveDialogStreamCore(dlg, humanPrompt, driveOptions, callbacks)
|
|
|
1162
1162
|
retryMaxDelayMs: retryPolicy.maxDelayMs,
|
|
1163
1163
|
canRetry: () => true,
|
|
1164
1164
|
doRequest: async () => {
|
|
1165
|
-
const batchResult = await llmGen.genMoreMessages(providerCfg, agent, systemPrompt, funcTools,
|
|
1165
|
+
const batchResult = await llmGen.genMoreMessages(providerCfg, agent, systemPrompt, funcTools, {
|
|
1166
|
+
dialogSelfId: dlg.id.selfId,
|
|
1167
|
+
dialogRootId: dlg.id.rootId,
|
|
1168
|
+
promptCacheKey: dlg.id.selfId,
|
|
1169
|
+
}, ctxMsgs, dlg.activeGenSeq, abortSignal);
|
|
1166
1170
|
if (!hasMeaningfulBatchOutput(batchResult.messages)) {
|
|
1167
1171
|
throw {
|
|
1168
1172
|
status: 503,
|
|
@@ -1328,7 +1332,11 @@ async function driveDialogStreamCore(dlg, humanPrompt, driveOptions, callbacks)
|
|
|
1328
1332
|
streamSawWebSearchCall = false;
|
|
1329
1333
|
streamedFuncCalls.length = 0;
|
|
1330
1334
|
newMsgs.length = 0;
|
|
1331
|
-
const streamResult = await llmGen.genToReceiver(providerCfg, agent, systemPrompt, funcTools,
|
|
1335
|
+
const streamResult = await llmGen.genToReceiver(providerCfg, agent, systemPrompt, funcTools, {
|
|
1336
|
+
dialogSelfId: dlg.id.selfId,
|
|
1337
|
+
dialogRootId: dlg.id.rootId,
|
|
1338
|
+
promptCacheKey: dlg.id.selfId,
|
|
1339
|
+
}, ctxMsgs, receiver, dlg.activeGenSeq, abortSignal);
|
|
1332
1340
|
const hasThinkingContent = currentThinkingContent.trim() !== '';
|
|
1333
1341
|
const hasSayingContent = (streamAttemptSayingContent ?? '').trim() !== '';
|
|
1334
1342
|
const hasFunctionCall = streamedFuncCalls.length > 0;
|
|
@@ -294,8 +294,8 @@ function buildSystemPrompt(input) {
|
|
|
294
294
|
- 你可能会收到一条短的引导信息,形如"用户可见回复语言:X"。当你对用户作答时,请优先遵循该引导;若未给出引导,则使用工作语言作答。
|
|
295
295
|
|
|
296
296
|
## 消息类型
|
|
297
|
-
- 以
|
|
298
|
-
-
|
|
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
|
|
391
|
-
System
|
|
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
|
-
?
|
|
338
|
-
:
|
|
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
|
|
24
|
+
return `${prefix}\n你对用户的可见回复语言应使用:${uiName}。`;
|
|
20
25
|
}
|
|
21
|
-
return
|
|
26
|
+
return `${prefix}\n你对用户的可见回复语言应使用:${uiName}。\n你的内部工作语言保持为:${workingName}(用于系统提示、队友诉请与工具调用)。`;
|
|
22
27
|
}
|
|
23
28
|
if (uiLanguage === workingLanguage) {
|
|
24
|
-
return
|
|
29
|
+
return `${prefix}\nYour user-visible reply language should be: ${uiName}.`;
|
|
25
30
|
}
|
|
26
|
-
return
|
|
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
|
-
|
|
88
|
+
`这条提醒项由工具 ${managementTool} 管理;如果我要调整它,就用 ${managementTool}(不要用 update_reminder)。`,
|
|
84
89
|
'',
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
101
|
-
|
|
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
|
-
|
|
115
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
130
|
-
If
|
|
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
|
-
|
|
142
|
+
I treat this as resume information for the next course, not as an automatic must-do command.
|
|
138
143
|
|
|
139
|
-
|
|
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
|
|
142
|
-
If
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
153
|
-
If
|
|
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 [
|
|
165
|
+
return [
|
|
166
|
+
`${formatSystemNoticePrefix(language)} 已经鞭策了 ${maxInjectCount} 次,智能体仍不听劝。`,
|
|
167
|
+
].join('\n');
|
|
161
168
|
}
|
|
162
169
|
return [
|
|
163
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: '
|
|
144
|
-
role: '
|
|
145
|
+
type: 'environment_msg',
|
|
146
|
+
role: 'user',
|
|
145
147
|
content: workLanguage === 'zh'
|
|
146
|
-
?
|
|
147
|
-
:
|
|
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: '
|
|
154
|
-
role: '
|
|
154
|
+
type: 'environment_msg',
|
|
155
|
+
role: 'user',
|
|
155
156
|
content: workLanguage === 'zh'
|
|
156
157
|
? [
|
|
157
|
-
|
|
158
|
+
`${prefix} MCP 工具集租约 #${index + 1}: \`${serverId}\``,
|
|
158
159
|
'',
|
|
159
|
-
|
|
160
|
+
`你当前看到的是系统维护的 MCP 租约状态。该 MCP server 被视为非“真正无状态”;此对话已租用一个专用的 MCP client 实例。`,
|
|
160
161
|
'',
|
|
161
|
-
|
|
162
|
+
`当你确认近期不再需要这个工具集时,请释放它,以停止/回收底层 MCP 进程或连接:`,
|
|
162
163
|
`- \`mcp_release({\"serverId\":\"${serverId}\"})\``,
|
|
163
164
|
'',
|
|
164
165
|
`如果另一个对话同时使用同一个 MCP 工具集,Dominds 会为那个对话启动一个独立的 MCP client 实例。`,
|
|
165
166
|
].join('\n')
|
|
166
167
|
: [
|
|
167
|
-
|
|
168
|
+
`${prefix} MCP toolset lease #${index + 1}: \`${serverId}\``,
|
|
168
169
|
'',
|
|
169
|
-
`This MCP server is treated as non-stateless
|
|
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
|
|
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: '
|
|
474
|
-
role: '
|
|
475
|
-
content:
|
|
476
|
-
|
|
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: '
|
|
487
|
-
role: '
|
|
488
|
-
content:
|
|
489
|
-
|
|
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: '
|
|
502
|
-
role: '
|
|
503
|
-
content:
|
|
504
|
-
|
|
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
|
|
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: '
|
|
173
|
-
role: '
|
|
174
|
+
type: 'environment_msg',
|
|
175
|
+
role: 'user',
|
|
174
176
|
content: language === 'zh'
|
|
175
|
-
?
|
|
176
|
-
:
|
|
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: '
|
|
181
|
-
role: '
|
|
182
|
-
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/dist/tools/team_mgmt.js
CHANGED
|
@@ -710,7 +710,10 @@ exports.teamMgmtCheckProviderTool = {
|
|
|
710
710
|
];
|
|
711
711
|
const systemPrompt = 'Connectivity check: reply with a short confirmation (e.g. "ok").';
|
|
712
712
|
try {
|
|
713
|
-
await llmGen.genToReceiver(providerCfg, agent, systemPrompt, [],
|
|
713
|
+
await llmGen.genToReceiver(providerCfg, agent, systemPrompt, [], {
|
|
714
|
+
dialogSelfId: 'team-mgmt-connectivity-check',
|
|
715
|
+
dialogRootId: 'team-mgmt-connectivity-check',
|
|
716
|
+
}, context, receiver, 0);
|
|
714
717
|
const details = out.trim().length > 0
|
|
715
718
|
? out.trim().slice(0, 120)
|
|
716
719
|
: sawFuncCall
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominds",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "DevOps Mindsets — Sustainable Agentic Product Lifecycle",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"private": false,
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"pnpm": ">=10.30.3"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@longrun-ai/codex-auth": "^0.
|
|
56
|
+
"@longrun-ai/codex-auth": "^0.10.0",
|
|
57
57
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
58
58
|
"openai": "^6.27.0",
|
|
59
59
|
"@modelcontextprotocol/sdk": "^1.27.1",
|