dominds 0.10.0 → 0.10.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/docs/fbr.md +8 -6
- package/dist/docs/fbr.zh.md +8 -6
- package/dist/llm/driver-v2/core.js +65 -23
- package/dist/llm/driver-v2/tellask-bridge.js +53 -1
- package/dist/minds/system-prompt.js +8 -6
- package/dist/shared/i18n/driver-messages.js +2 -2
- package/package.json +4 -3
- package/dist/agent-priming.js +0 -2051
- package/dist/docs/dominds-agent-priming.md +0 -27
- package/dist/docs/dominds-agent-priming.zh.md +0 -27
- package/dist/docs/drive-logic-context-refactor-plan.zh.md +0 -338
- package/dist/docs/keep-going.md +0 -176
- package/dist/docs/team-mgmt-toolset.md +0 -482
- package/dist/docs/team-mgmt-toolset.zh.md +0 -426
- package/dist/llm/driver.js +0 -4093
- package/dist/minds/builtin/cmdr/persona.md +0 -3
- package/dist/minds/builtin/dijiang/knowledge.md +0 -287
- package/dist/minds/builtin/dijiang/persona.md +0 -7
- package/dist/server/prompts-routes.js +0 -545
- package/dist/shared/team-mgmt-manual.js +0 -120
- package/dist/shared/types/prompts.js +0 -2
- package/dist/shared/types/tellask.js +0 -8
- package/dist/showing-by-doing.js +0 -1088
- package/dist/snippets/README.md +0 -4
- package/dist/tellask.js +0 -439
- package/dist/tools/context-health.js +0 -177
- package/dist/tools/diag.js +0 -583
- package/dist/tools/team-mgmt.js +0 -3487
- package/dist/utils/task-doc.js +0 -236
package/dist/docs/fbr.md
CHANGED
|
@@ -9,7 +9,7 @@ Chinese version: [中文版](./fbr.zh.md)
|
|
|
9
9
|
**Fresh Boots Reasoning (FBR)** is a Dominds mechanism for “reasoning again from a clean slate” on a bounded sub-problem,
|
|
10
10
|
then reporting back to the tellasker dialog.
|
|
11
11
|
|
|
12
|
-
In Dominds, FBR is triggered by the dedicated function tool `freshBootsReasoning({ tellaskContent: "..." })`.
|
|
12
|
+
In Dominds, FBR is triggered by the dedicated function tool `freshBootsReasoning({ tellaskContent: "...", effort?: N })`.
|
|
13
13
|
The mechanism is the runtime-enforced contract applied to the spawned sideline dialog.
|
|
14
14
|
|
|
15
15
|
## 2. Design principles and tradeoffs
|
|
@@ -29,7 +29,7 @@ silent ignore is worse than an error.
|
|
|
29
29
|
|
|
30
30
|
### 2.3 Serial multi-pass reasoning, not “multi-agent collaboration”
|
|
31
31
|
|
|
32
|
-
`fbr-effort` is
|
|
32
|
+
`fbr-effort` is an FBR intensity setting. Runtime interprets intensity `N` as `N` serial passes inside a **single FBR sideline conversation window**. The tellasker dialog is responsible for distilling the results; passes do not coordinate with each other.
|
|
33
33
|
|
|
34
34
|
## 3. User syntax
|
|
35
35
|
|
|
@@ -37,16 +37,18 @@ silent ignore is worse than an error.
|
|
|
37
37
|
|
|
38
38
|
Use the dedicated FBR form:
|
|
39
39
|
|
|
40
|
-
- `freshBootsReasoning({ tellaskContent: "..." })`
|
|
40
|
+
- `freshBootsReasoning({ tellaskContent: "...", effort?: N })`
|
|
41
41
|
|
|
42
42
|
Notes:
|
|
43
43
|
|
|
44
44
|
- FBR does not use `targetAgentId`, `sessionSlug`, or `mentionList`.
|
|
45
45
|
- `tellaskContent` is the authoritative task context for the FBR sideline.
|
|
46
|
+
- `effort` is optional and sets per-call FBR intensity; when omitted, runtime uses the current member’s `fbr-effort`.
|
|
47
|
+
- Intensity `N` maps to `N` serial FBR passes inside one sideline window.
|
|
46
48
|
|
|
47
49
|
### 3.2 Scope
|
|
48
50
|
|
|
49
|
-
This document specifies the FBR mechanism and its `freshBootsReasoning({ tellaskContent: "..." })` contract. General teammate Tellasks (`tellaskSessionless({ targetAgentId: "<teammate>", tellaskContent: "..." })`) follow
|
|
51
|
+
This document specifies the FBR mechanism and its `freshBootsReasoning({ tellaskContent: "...", effort?: N })` contract. General teammate Tellasks (`tellaskSessionless({ targetAgentId: "<teammate>", tellaskContent: "..." })`) follow
|
|
50
52
|
the taxonomy and capability model in [`dialog-system.md`](./dialog-system.md).
|
|
51
53
|
|
|
52
54
|
If you want a “fresh” sideline dialog that still has tools, use an explicit teammate identity via the general teammate Tellask flow.
|
|
@@ -144,8 +146,8 @@ An FBR sideline dialog should produce per-round conclusions that are easy to dis
|
|
|
144
146
|
|
|
145
147
|
- Type: integer
|
|
146
148
|
- Default: `3`
|
|
147
|
-
- `0`: disable
|
|
148
|
-
- `1..100`:
|
|
149
|
+
- `0`: disable FBR by default for that member (runtime MUST reject when effective effort is `0`)
|
|
150
|
+
- `1..100`: valid intensity range (effective effort comes from explicit `effort` or fallback `fbr-effort`)
|
|
149
151
|
- `> 100` / non-integer / negative: validation error (reject; no clamping)
|
|
150
152
|
|
|
151
153
|
When `fbr-effort = N`:
|
package/dist/docs/fbr.zh.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**扪心自问(FBR, Fresh Boots Reasoning)** 是 Dominds 的一种工作机制:在诉请者对话推进过程中,智能体可以把一个边界清晰的子问题“拆出去”,以 **更干净的上下文** 重新推理一次,然后把结论回贴到诉请者对话中。
|
|
10
10
|
|
|
11
|
-
在 Dominds 里,FBR 通过专用函数工具 `freshBootsReasoning({ tellaskContent: "..." })` 触发;FBR 的核心是运行时对该支线对话施加的一组强制约束与串行语义。
|
|
11
|
+
在 Dominds 里,FBR 通过专用函数工具 `freshBootsReasoning({ tellaskContent: "...", effort?: N })` 触发;FBR 的核心是运行时对该支线对话施加的一组强制约束与串行语义。
|
|
12
12
|
|
|
13
13
|
## 2. 设计原则与取舍(为什么这样做)
|
|
14
14
|
|
|
@@ -27,7 +27,7 @@ FBR 的价值来自“把推理拉回文本”:让被诉请者只围绕诉请
|
|
|
27
27
|
|
|
28
28
|
### 2.3 串行多轮推理,而不是“多代理协作”
|
|
29
29
|
|
|
30
|
-
`fbr-effort`
|
|
30
|
+
`fbr-effort` 是 FBR 的力度设置。运行时会把力度 `N` 解释为在**单一子对话窗口**内执行 `N` 次串行推理,由诉请者对话负责综合提炼。不同轮次不协作,仅做不同视角的顺序补充。
|
|
31
31
|
|
|
32
32
|
## 3. 用户语法
|
|
33
33
|
|
|
@@ -35,16 +35,18 @@ FBR 的价值来自“把推理拉回文本”:让被诉请者只围绕诉请
|
|
|
35
35
|
|
|
36
36
|
触发 FBR 的语法只有一种:
|
|
37
37
|
|
|
38
|
-
- `freshBootsReasoning({ tellaskContent: "..." })`
|
|
38
|
+
- `freshBootsReasoning({ tellaskContent: "...", effort?: N })`
|
|
39
39
|
|
|
40
40
|
说明:
|
|
41
41
|
|
|
42
42
|
- FBR 不使用 `targetAgentId`、`sessionSlug`、`mentionList`。
|
|
43
43
|
- `tellaskContent` 是 FBR 支线的权威任务上下文。
|
|
44
|
+
- `effort` 为可选,用于设置本次调用的 FBR 力度;未传时运行时回退到当前成员 `fbr-effort`。
|
|
45
|
+
- 力度 `N` 会映射为同一 FBR 支线窗口内的 `N` 次串行推理。
|
|
44
46
|
|
|
45
47
|
### 3.2 作用域
|
|
46
48
|
|
|
47
|
-
本文档只定义 **FBR 机制**,并说明其通过 `freshBootsReasoning({ tellaskContent: "..." })` 触发的行为契约。一般的队友诉请(`tellaskSessionless({ targetAgentId: "<teammate>", tellaskContent: "..." })`)仍按 [`dialog-system.zh.md`](./dialog-system.zh.md) 的 Tellask 分类与能力模型执行。
|
|
49
|
+
本文档只定义 **FBR 机制**,并说明其通过 `freshBootsReasoning({ tellaskContent: "...", effort?: N })` 触发的行为契约。一般的队友诉请(`tellaskSessionless({ targetAgentId: "<teammate>", tellaskContent: "..." })`)仍按 [`dialog-system.zh.md`](./dialog-system.zh.md) 的 Tellask 分类与能力模型执行。
|
|
48
50
|
|
|
49
51
|
如果你需要“同人设但可用工具”的支线对话,请使用一般队友诉请路径,并显式指定队友身份。
|
|
50
52
|
|
|
@@ -139,8 +141,8 @@ FBR 支线对话应产出一份便于诉请者整合的简明推理结果。单
|
|
|
139
141
|
|
|
140
142
|
- 类型:整数
|
|
141
143
|
- 默认:`3`
|
|
142
|
-
- `0
|
|
143
|
-
- `1..100
|
|
144
|
+
- `0`:该成员默认禁用 FBR(当有效力度为 `0` 时必须明确报错拒绝)
|
|
145
|
+
- `1..100`:力度取值范围(有效力度来自显式 `effort`,未传时回退 `fbr-effort`)
|
|
144
146
|
- `> 100` / 非整数 / 负数:配置错误(直接报错,不做 clamp)
|
|
145
147
|
|
|
146
148
|
当 `fbr-effort = N`:
|
|
@@ -142,6 +142,52 @@ function resolveEffectiveOptimalMaxTokens(args) {
|
|
|
142
142
|
criticalMaxTokensConfigured,
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
+
function resolveFbrEffortDefaultForTool(member) {
|
|
146
|
+
const raw = member.fbr_effort;
|
|
147
|
+
if (typeof raw !== 'number' || !Number.isFinite(raw))
|
|
148
|
+
return 0;
|
|
149
|
+
if (!Number.isInteger(raw))
|
|
150
|
+
return 0;
|
|
151
|
+
if (raw < 0)
|
|
152
|
+
return 0;
|
|
153
|
+
if (raw > 100)
|
|
154
|
+
return 0;
|
|
155
|
+
return raw;
|
|
156
|
+
}
|
|
157
|
+
function createFreshBootsReasoningTool(args) {
|
|
158
|
+
const fbrDefault = args.fbrEffortDefault;
|
|
159
|
+
const fbrDefaultHint = fbrDefault > 0
|
|
160
|
+
? `Runtime default for \`effort\` is current member \`fbr_effort=${fbrDefault}\` when omitted.`
|
|
161
|
+
: 'Runtime default for `effort` is current member `fbr_effort=0` (FBR disabled unless reconfigured).';
|
|
162
|
+
const codexAuthHint = args.providerApiType === 'codex'
|
|
163
|
+
? ` Codex-auth note: function arguments are often emitted with all fields present; if user did not specify intensity, pass \`effort: ${fbrDefault}\` explicitly.`
|
|
164
|
+
: '';
|
|
165
|
+
return {
|
|
166
|
+
type: 'func',
|
|
167
|
+
name: 'freshBootsReasoning',
|
|
168
|
+
description: 'Start an FBR sideline dialog for tool-less fresh-boots reasoning. tellaskContent MUST stay neutral and fact-oriented (Goal/Facts/Constraints/Evidence[/Unknowns]); do not issue analysis directives (for example “from the following dimensions”, “analyze in steps 1..N”, or “N rounds per dimension”). ' +
|
|
169
|
+
fbrDefaultHint +
|
|
170
|
+
codexAuthHint,
|
|
171
|
+
parameters: {
|
|
172
|
+
type: 'object',
|
|
173
|
+
properties: {
|
|
174
|
+
tellaskContent: {
|
|
175
|
+
type: 'string',
|
|
176
|
+
description: 'Use a neutral factual body: Goal/Facts/Constraints/Evidence (optional Unknowns). Avoid dimension checklists and stepwise directives (e.g. “from the following dimensions/aspects”, “analyze in steps 1..N”, “N rounds per dimension”).',
|
|
177
|
+
},
|
|
178
|
+
effort: {
|
|
179
|
+
type: 'integer',
|
|
180
|
+
description: `Optional FBR intensity override (0..100 integer). Runtime maps intensity N to N serial FBR passes in one sideline window. When omitted, runtime defaults to current member fbr_effort=${fbrDefault}.`,
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
required: ['tellaskContent'],
|
|
184
|
+
additionalProperties: false,
|
|
185
|
+
},
|
|
186
|
+
call: async () => {
|
|
187
|
+
throw new Error('freshBootsReasoning is handled by driver-v2 tellask-special channel');
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
}
|
|
145
191
|
const TELLASK_SPECIAL_VIRTUAL_TOOLS = [
|
|
146
192
|
{
|
|
147
193
|
type: 'func',
|
|
@@ -210,32 +256,20 @@ const TELLASK_SPECIAL_VIRTUAL_TOOLS = [
|
|
|
210
256
|
throw new Error('askHuman is handled by driver-v2 tellask-special channel');
|
|
211
257
|
},
|
|
212
258
|
},
|
|
213
|
-
{
|
|
214
|
-
type: 'func',
|
|
215
|
-
name: 'freshBootsReasoning',
|
|
216
|
-
description: 'Start an FBR sideline dialog for tool-less fresh-boots reasoning. tellaskContent MUST stay neutral and fact-oriented (Goal/Facts/Constraints/Evidence[/Unknowns]); do not issue analysis directives (for example “from the following dimensions”, “analyze in steps 1..N”, or “N rounds per dimension”).',
|
|
217
|
-
parameters: {
|
|
218
|
-
type: 'object',
|
|
219
|
-
properties: {
|
|
220
|
-
tellaskContent: {
|
|
221
|
-
type: 'string',
|
|
222
|
-
description: 'Use a neutral factual body: Goal/Facts/Constraints/Evidence (optional Unknowns). Avoid dimension checklists and stepwise directives (e.g. “from the following dimensions/aspects”, “analyze in steps 1..N”, “N rounds per dimension”).',
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
required: ['tellaskContent'],
|
|
226
|
-
additionalProperties: false,
|
|
227
|
-
},
|
|
228
|
-
call: async () => {
|
|
229
|
-
throw new Error('freshBootsReasoning is handled by driver-v2 tellask-special channel');
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
259
|
];
|
|
233
260
|
function mergeTellaskSpecialVirtualTools(baseTools, options) {
|
|
234
261
|
const merged = [...baseTools];
|
|
235
262
|
const seen = new Set(merged.map((tool) => tool.name));
|
|
263
|
+
const freshBootsReasoning = createFreshBootsReasoningTool({
|
|
264
|
+
fbrEffortDefault: options.fbrEffortDefault,
|
|
265
|
+
providerApiType: options.providerApiType,
|
|
266
|
+
});
|
|
236
267
|
const specialTools = options.includeTellaskBack
|
|
237
|
-
? TELLASK_SPECIAL_VIRTUAL_TOOLS
|
|
238
|
-
:
|
|
268
|
+
? [...TELLASK_SPECIAL_VIRTUAL_TOOLS, freshBootsReasoning]
|
|
269
|
+
: [
|
|
270
|
+
...TELLASK_SPECIAL_VIRTUAL_TOOLS.filter((tool) => tool.name !== 'tellaskBack'),
|
|
271
|
+
freshBootsReasoning,
|
|
272
|
+
];
|
|
239
273
|
for (const virtualTool of specialTools) {
|
|
240
274
|
if (seen.has(virtualTool.name)) {
|
|
241
275
|
throw new Error(`driver-v2 tool invariant violation: function tool name '${virtualTool.name}' collides with tellask-special virtual tool`);
|
|
@@ -467,7 +501,10 @@ async function executeRoutedFunctionCalls(args) {
|
|
|
467
501
|
case 'askHuman':
|
|
468
502
|
return { tellaskContent: call.tellaskContent };
|
|
469
503
|
case 'freshBootsReasoning':
|
|
470
|
-
return {
|
|
504
|
+
return {
|
|
505
|
+
tellaskContent: call.tellaskContent,
|
|
506
|
+
...(call.effort !== undefined ? { effort: call.effort } : {}),
|
|
507
|
+
};
|
|
471
508
|
case 'tellask':
|
|
472
509
|
return {
|
|
473
510
|
targetAgentId: call.targetAgentId,
|
|
@@ -830,8 +867,13 @@ async function driveDialogStreamCoreV2(dlg, humanPrompt, driveOptions, callbacks
|
|
|
830
867
|
}
|
|
831
868
|
const canonicalFuncTools = agentTools.filter((t) => t.type === 'func');
|
|
832
869
|
const isSubdialog = dlg.id.rootId !== dlg.id.selfId;
|
|
870
|
+
const fbrEffortDefault = resolveFbrEffortDefaultForTool(agent);
|
|
833
871
|
const effectiveFuncTools = policy.allowFunctionCalls
|
|
834
|
-
? mergeTellaskSpecialVirtualTools(canonicalFuncTools, {
|
|
872
|
+
? mergeTellaskSpecialVirtualTools(canonicalFuncTools, {
|
|
873
|
+
includeTellaskBack: isSubdialog,
|
|
874
|
+
fbrEffortDefault,
|
|
875
|
+
providerApiType: providerCfg.apiType,
|
|
876
|
+
})
|
|
835
877
|
: canonicalFuncTools;
|
|
836
878
|
const projected = (0, tools_projection_1.projectFuncToolsForProvider)(providerCfg.apiType, effectiveFuncTools);
|
|
837
879
|
const funcTools = projected.tools;
|
|
@@ -67,6 +67,25 @@ function readOptionalStringField(obj, field) {
|
|
|
67
67
|
const trimmed = value.trim();
|
|
68
68
|
return trimmed === '' ? null : trimmed;
|
|
69
69
|
}
|
|
70
|
+
function readOptionalEffortField(obj, field) {
|
|
71
|
+
const value = obj[field];
|
|
72
|
+
if (value === undefined) {
|
|
73
|
+
return { ok: true, value: undefined };
|
|
74
|
+
}
|
|
75
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || !Number.isInteger(value)) {
|
|
76
|
+
return {
|
|
77
|
+
ok: false,
|
|
78
|
+
error: `field '${field}' must be an integer in [0, 100] when provided`,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (value < 0 || value > 100) {
|
|
82
|
+
return {
|
|
83
|
+
ok: false,
|
|
84
|
+
error: `field '${field}' must be an integer in [0, 100] when provided`,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return { ok: true, value };
|
|
88
|
+
}
|
|
70
89
|
function readTargetAgentId(obj) {
|
|
71
90
|
const target = readOptionalStringField(obj, 'targetAgentId') ??
|
|
72
91
|
readOptionalStringField(obj, 'agentId') ??
|
|
@@ -125,12 +144,17 @@ function parseTellaskSpecialCall(call) {
|
|
|
125
144
|
};
|
|
126
145
|
}
|
|
127
146
|
case 'freshBootsReasoning': {
|
|
147
|
+
const effort = readOptionalEffortField(args, 'effort');
|
|
148
|
+
if (!effort.ok) {
|
|
149
|
+
return effort;
|
|
150
|
+
}
|
|
128
151
|
return {
|
|
129
152
|
ok: true,
|
|
130
153
|
value: {
|
|
131
154
|
callId: call.id,
|
|
132
155
|
callName: 'freshBootsReasoning',
|
|
133
156
|
tellaskContent: tellaskContent.value,
|
|
157
|
+
effort: effort.value,
|
|
134
158
|
},
|
|
135
159
|
};
|
|
136
160
|
}
|
|
@@ -438,7 +462,33 @@ async function executeTellaskCall(dlg, agent, mentionList, body, callId, callbac
|
|
|
438
462
|
return { toolOutputs, suspend: false, subdialogsCreated: [] };
|
|
439
463
|
}
|
|
440
464
|
if (isFreshBootsCall) {
|
|
441
|
-
const
|
|
465
|
+
const memberFbrEffort = resolveFbrEffort(member);
|
|
466
|
+
if (memberFbrEffort < 1) {
|
|
467
|
+
const msg = (0, driver_messages_1.formatDomindsNoteFbrDisabled)((0, runtime_language_1.getWorkLanguage)());
|
|
468
|
+
toolOutputs.push({ type: 'environment_msg', role: 'user', content: msg });
|
|
469
|
+
toolOutputs.push({
|
|
470
|
+
type: 'tellask_result_msg',
|
|
471
|
+
role: 'tool',
|
|
472
|
+
responderId: 'dominds',
|
|
473
|
+
mentionList: normalizedMentionList,
|
|
474
|
+
tellaskContent: body,
|
|
475
|
+
status: 'failed',
|
|
476
|
+
callId,
|
|
477
|
+
content: msg,
|
|
478
|
+
});
|
|
479
|
+
await dlg.receiveTeammateCallResult('dominds', callName, mentionList, body, msg, 'failed', callId);
|
|
480
|
+
dlg.clearCurrentCallId();
|
|
481
|
+
return { toolOutputs, suspend: false, subdialogsCreated: [] };
|
|
482
|
+
}
|
|
483
|
+
const override = options.fbrEffortOverride;
|
|
484
|
+
if (override !== undefined &&
|
|
485
|
+
(!Number.isFinite(override) ||
|
|
486
|
+
!Number.isInteger(override) ||
|
|
487
|
+
override < 0 ||
|
|
488
|
+
override > 100)) {
|
|
489
|
+
throw new Error(`freshBootsReasoning invariant violation: effort override out of range [0,100] (got=${override})`);
|
|
490
|
+
}
|
|
491
|
+
const fbrEffort = override ?? memberFbrEffort;
|
|
442
492
|
if (fbrEffort < 1) {
|
|
443
493
|
const msg = (0, driver_messages_1.formatDomindsNoteFbrDisabled)((0, runtime_language_1.getWorkLanguage)());
|
|
444
494
|
toolOutputs.push({ type: 'environment_msg', role: 'user', content: msg });
|
|
@@ -937,6 +987,7 @@ function toExecutableValidTellaskCall(call) {
|
|
|
937
987
|
callName: call.callName,
|
|
938
988
|
tellaskContent: call.tellaskContent,
|
|
939
989
|
callId: call.callId,
|
|
990
|
+
effort: call.effort,
|
|
940
991
|
};
|
|
941
992
|
}
|
|
942
993
|
}
|
|
@@ -1067,6 +1118,7 @@ async function executeValidTellaskCalls(args) {
|
|
|
1067
1118
|
parseResult,
|
|
1068
1119
|
targetForError,
|
|
1069
1120
|
q4hRemainingCallIds: call.q4hRemainingCallIds,
|
|
1121
|
+
fbrEffortOverride: call.callName === 'freshBootsReasoning' ? call.effort : undefined,
|
|
1070
1122
|
});
|
|
1071
1123
|
results.push(result);
|
|
1072
1124
|
}
|
|
@@ -44,13 +44,13 @@ function buildSystemPrompt(input) {
|
|
|
44
44
|
const fbrPhaseContractZh = [
|
|
45
45
|
'- FBR 必须按“发起 → 逐轮推理 → 上游回帖”三段执行:发起 `freshBootsReasoning` 只代表发起,不代表你已完成推理。',
|
|
46
46
|
'- 发出 `freshBootsReasoning` 后,必须在该 FBR 子对话内按序走完整个 N 轮流程;只有最后一轮才会回帖给上游。',
|
|
47
|
-
'- 若 \\`fbr-effort = N
|
|
47
|
+
'- 若 \\`fbr-effort = N\\`(力度 N,内部映射为 N 次串行推理),等待该 FBR 子对话一次性完整回帖;收到全量回帖后完成提炼并据此做下游决策;不得基于未完成中间轮次提前定稿。',
|
|
48
48
|
'- 每一轮都应给出与此前不同的增量观点;每轮均不得复述前文结论。程序会把该 FBR 全量支线正文在最后一轮合并后回贴到上游。',
|
|
49
49
|
].join('\n');
|
|
50
50
|
const fbrPhaseContractEn = [
|
|
51
51
|
'- FBR MUST follow three phases: “initiate -> serial reasoning rounds -> upstream update”. Calling `freshBootsReasoning` means initiation only, not completed reasoning.',
|
|
52
52
|
'- After calling `freshBootsReasoning`, run all required rounds in that single FBR sideline window; only the final round may post upstream.',
|
|
53
|
-
'- If \\`fbr-effort = N
|
|
53
|
+
'- If \\`fbr-effort = N\\` (intensity N, internally mapped to N serial passes), wait for the complete sideline response from the final pass; after receiving the full reply, distill it before downstream action. Do not finalize based on partial passes.',
|
|
54
54
|
'- Every round must add a distinct incremental view. Every round, including the final one, must not repeat conclusions from earlier rounds. Runtime will relay the full accumulated FBR sideline output upstream in a single upstream-visible message.',
|
|
55
55
|
].join('\n');
|
|
56
56
|
const teammatePhaseContractZh = [
|
|
@@ -111,7 +111,8 @@ function buildSystemPrompt(input) {
|
|
|
111
111
|
'- FBR 禁止一切 tellask(包括 \`tellaskBack\` / \`tellask\` / \`tellaskSessionless\` / \`askHuman\`)。',
|
|
112
112
|
'- 当用户明确要求“做一次 FBR/扪心自问”,对话主理人必须发起 \\`freshBootsReasoning\\`。',
|
|
113
113
|
fbrScopeRuleZh,
|
|
114
|
-
'- FBR 的标准入口是 \\`freshBootsReasoning({ tellaskContent })\\`;禁止用 \\`tellask\\` / \\`tellaskSessionless\\` 对自己发起 self-target 诉请来替代。',
|
|
114
|
+
'- FBR 的标准入口是 \\`freshBootsReasoning({ tellaskContent, effort? })\\`;禁止用 \\`tellask\\` / \\`tellaskSessionless\\` 对自己发起 self-target 诉请来替代。',
|
|
115
|
+
'- 当用户自然语言里明确给了 FBR 力度(例如“做 fbr x6”/“做一次 6x fbr”),应把该力度映射到 \\`effort\\`(例如 \\`effort: 6\\`);若未指定力度,按工具说明中的动态默认值传参。',
|
|
115
116
|
'- 发起 FBR 时,\\`tellaskContent\\` 只写目标、事实、约束与证据,不要预设分析方向(例如固定问题清单/指定分析框架)。推理方向必须交由 FBR 支线自主拓展。',
|
|
116
117
|
'- 发起前自检(强制):若正文出现“请从以下维度/按以下方面/按步骤 1..N 分析”等预设提纲语句,必须先改写再调用 \\`freshBootsReasoning\\`;否则视为违规调用。',
|
|
117
118
|
'- 发起正文推荐模板(强制遵循语义):\\`目标\\` / \\`事实\\` / \\`约束\\` / \\`证据\\`(可选 \\`未知项\\`)。正文应是事实陈述,不是对 FBR 支线下达“按维度/按步骤分析”的命令。',
|
|
@@ -127,7 +128,8 @@ function buildSystemPrompt(input) {
|
|
|
127
128
|
'- FBR forbids all tellask calls (including \`tellaskBack\` / \`tellask\` / \`tellaskSessionless\` / \`askHuman\`).',
|
|
128
129
|
'- When the user explicitly requests “do an FBR / fresh boots reasoning”, the Dialog Responder must call `freshBootsReasoning`.',
|
|
129
130
|
fbrScopeRuleEn,
|
|
130
|
-
'- The standard FBR entry is \\`freshBootsReasoning({ tellaskContent })\\`; do not emulate FBR via self-targeted \\`tellask\\` / \\`tellaskSessionless\\`.',
|
|
131
|
+
'- The standard FBR entry is \\`freshBootsReasoning({ tellaskContent, effort? })\\`; do not emulate FBR via self-targeted \\`tellask\\` / \\`tellaskSessionless\\`.',
|
|
132
|
+
'- When the user gives an explicit FBR intensity in natural language (for example “do fbr x6” / “run one 6x fbr”), map it to \\`effort\\` (for example \\`effort: 6\\`); when the user does not specify intensity, pass the dynamic default described in the tool documentation.',
|
|
131
133
|
'- When initiating FBR, keep \\`tellaskContent\\` to goals, facts, constraints, and evidence only; do not predefine analysis directions (for example fixed question checklists or prescribed frameworks). Reasoning directions must be expanded autonomously by the FBR sideline.',
|
|
132
134
|
'- Pre-call self-check (mandatory): if the body contains scaffolded directives such as “from the following dimensions/aspects” or stepwise templates (“analyze in steps 1..N”), rewrite first, then call \\`freshBootsReasoning\\`; otherwise the call is a protocol violation.',
|
|
133
135
|
'- Recommended body template (semantic MUST): \\`Goal\\` / \\`Facts\\` / \\`Constraints\\` / \\`Evidence\\` (optional \\`Unknowns\\`). The body should present neutral facts, not command the FBR sideline to analyze by fixed dimensions or steps.',
|
|
@@ -142,14 +144,14 @@ function buildSystemPrompt(input) {
|
|
|
142
144
|
'- \\`tellask\\`:用于可恢复的长线诉请(必须提供 \\`targetAgentId\\` / \\`sessionSlug\\` / \\`tellaskContent\\`)。',
|
|
143
145
|
'- \\`tellaskSessionless\\`:用于一次性诉请(必须提供 \\`targetAgentId\\` / \\`tellaskContent\\`)。',
|
|
144
146
|
'- \\`askHuman\\`:用于 Q4H(向人类请求必要澄清/决策/授权/缺失输入)。',
|
|
145
|
-
'- \\`freshBootsReasoning\\`:用于发起扪心自问(FBR
|
|
147
|
+
'- \\`freshBootsReasoning\\`:用于发起扪心自问(FBR)支线(\\`tellaskContent\\` 必填,\\`effort\\` 可选)。',
|
|
146
148
|
].join('\n');
|
|
147
149
|
const tellaskInteractionRulesEn = [
|
|
148
150
|
'- \\`tellaskBack\\`: ask back upstream from a sideline dialog only.',
|
|
149
151
|
'- \\`tellask\\`: resumable tellask (requires \\`targetAgentId\\` / \\`sessionSlug\\` / \\`tellaskContent\\`).',
|
|
150
152
|
'- \\`tellaskSessionless\\`: one-shot tellask (requires \\`targetAgentId\\` / \\`tellaskContent\\`).',
|
|
151
153
|
'- \\`askHuman\\`: Q4H for necessary clarification/decision/authorization/missing input.',
|
|
152
|
-
'- \\`freshBootsReasoning\\`: starts an FBR sideline dialog (requires \\`tellaskContent\\`).',
|
|
154
|
+
'- \\`freshBootsReasoning\\`: starts an FBR sideline dialog (requires \\`tellaskContent\\`, optional \\`effort\\`).',
|
|
153
155
|
].join('\n');
|
|
154
156
|
const functionToolRulesZh = [
|
|
155
157
|
'- 回答必须基于可观测事实;为获取事实优先使用可用工具,缺乏观测事实时明确说明并请求/补充获取,不得臆测。',
|
|
@@ -211,11 +211,11 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
|
|
|
211
211
|
function formatDomindsNoteDirectSelfCall(language) {
|
|
212
212
|
if (language === 'zh') {
|
|
213
213
|
return ('错误:不允许通过 `tellask` / `tellaskSessionless` 对当前 agent 发起自诉请。\n' +
|
|
214
|
-
'- 若你要发起扪心自问(FBR),请使用 `freshBootsReasoning({ tellaskContent })`。\n' +
|
|
214
|
+
'- 若你要发起扪心自问(FBR),请使用 `freshBootsReasoning({ tellaskContent, effort? })`。\n' +
|
|
215
215
|
'- `tellask` / `tellaskSessionless` 仅用于队友诉请(targetAgentId 必须是队友 id)。');
|
|
216
216
|
}
|
|
217
217
|
return ('Error: self-targeted calls via `tellask` / `tellaskSessionless` are not allowed.\n' +
|
|
218
|
-
'- For FBR, use `freshBootsReasoning({ tellaskContent })`.\n' +
|
|
218
|
+
'- For FBR, use `freshBootsReasoning({ tellaskContent, effort? })`.\n' +
|
|
219
219
|
'- `tellask` / `tellaskSessionless` are teammate-only (targetAgentId must be a teammate id).');
|
|
220
220
|
}
|
|
221
221
|
function formatDomindsNoteFbrDisabled(language) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominds",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "DevOps Mindsets — Sustainable Agentic Product Lifecycle",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"private": false,
|
|
@@ -45,9 +45,10 @@
|
|
|
45
45
|
"url": "https://github.com/longrun-ai/dominds/issues"
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/longrun-ai/dominds#readme",
|
|
48
|
-
"packageManager": "pnpm@10.
|
|
48
|
+
"packageManager": "pnpm@10.30.2",
|
|
49
49
|
"engines": {
|
|
50
|
-
"node": ">=22 <23"
|
|
50
|
+
"node": ">=22 <23",
|
|
51
|
+
"pnpm": ">=10.30.2 <11"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
54
|
"@anthropic-ai/sdk": "^0.67.0",
|