dominds 1.27.5 → 1.27.6
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/dialog.d.ts
CHANGED
|
@@ -479,6 +479,7 @@ export declare abstract class Dialog {
|
|
|
479
479
|
persistTellaskCall(id: string, name: TellaskCallRecordName, rawArgumentsText: string, genseq: number, options?: {
|
|
480
480
|
deliveryMode?: 'tellask_call_start' | 'func_call_requested';
|
|
481
481
|
replyDirective?: TellaskReplyDirective;
|
|
482
|
+
recordReplyDelivery?: boolean;
|
|
482
483
|
}): Promise<void>;
|
|
483
484
|
/**
|
|
484
485
|
* Post sideDialog completion response to this dialog.
|
|
@@ -714,6 +715,7 @@ export declare abstract class DialogStore {
|
|
|
714
715
|
persistTellaskCall(_dialog: Dialog, _id: string, _name: TellaskCallRecordName, _rawArgumentsText: string, _genseq: number, _options?: {
|
|
715
716
|
deliveryMode?: 'tellask_call_start' | 'func_call_requested';
|
|
716
717
|
replyDirective?: TellaskReplyDirective;
|
|
718
|
+
recordReplyDelivery?: boolean;
|
|
717
719
|
}): Promise<void>;
|
|
718
720
|
/**
|
|
719
721
|
* Start a new course in storage
|
|
@@ -129,6 +129,7 @@ export declare function executeTellaskCalls(args: {
|
|
|
129
129
|
}): Promise<{
|
|
130
130
|
toolOutputs: ChatMessage[];
|
|
131
131
|
successfulReplyCallIds: string[];
|
|
132
|
+
failedReplyCallIds: string[];
|
|
132
133
|
answerHumanOutputs: AnswerHumanStructuredOutput[];
|
|
133
134
|
}>;
|
|
134
135
|
export type TellaskFunctionRoundResult = Readonly<{
|
|
@@ -2234,6 +2234,7 @@ function toExecutableValidTellaskCall(call) {
|
|
|
2234
2234
|
async function executeValidTellaskCalls(args) {
|
|
2235
2235
|
const results = [];
|
|
2236
2236
|
const successfulReplyCallIds = [];
|
|
2237
|
+
const failedReplyCallIds = [];
|
|
2237
2238
|
const answerHumanOutputs = [];
|
|
2238
2239
|
const deferredScheduleCalls = [];
|
|
2239
2240
|
const registrationPhaseCallbacks = {
|
|
@@ -2293,6 +2294,9 @@ async function executeValidTellaskCalls(args) {
|
|
|
2293
2294
|
if (replyResult.delivered) {
|
|
2294
2295
|
successfulReplyCallIds.push(call.callId);
|
|
2295
2296
|
}
|
|
2297
|
+
else {
|
|
2298
|
+
failedReplyCallIds.push(call.callId);
|
|
2299
|
+
}
|
|
2296
2300
|
results.push(replyResult.messages);
|
|
2297
2301
|
continue;
|
|
2298
2302
|
}
|
|
@@ -2354,12 +2358,18 @@ async function executeValidTellaskCalls(args) {
|
|
|
2354
2358
|
return {
|
|
2355
2359
|
toolOutputs: results.flatMap((result) => result),
|
|
2356
2360
|
successfulReplyCallIds,
|
|
2361
|
+
failedReplyCallIds,
|
|
2357
2362
|
answerHumanOutputs,
|
|
2358
2363
|
};
|
|
2359
2364
|
}
|
|
2360
2365
|
async function executeTellaskCalls(args) {
|
|
2361
2366
|
if (args.calls.length === 0) {
|
|
2362
|
-
return {
|
|
2367
|
+
return {
|
|
2368
|
+
toolOutputs: [],
|
|
2369
|
+
successfulReplyCallIds: [],
|
|
2370
|
+
failedReplyCallIds: [],
|
|
2371
|
+
answerHumanOutputs: [],
|
|
2372
|
+
};
|
|
2363
2373
|
}
|
|
2364
2374
|
return await executeValidTellaskCalls({
|
|
2365
2375
|
dlg: args.dlg,
|
|
@@ -2451,7 +2461,10 @@ async function processTellaskFunctionRound(args) {
|
|
|
2451
2461
|
continue;
|
|
2452
2462
|
}
|
|
2453
2463
|
const issue = disposition.issue;
|
|
2454
|
-
await args.dlg.persistTellaskCall(issue.originalCall.id, disposition.callName, issue.rawArgumentsText, issue.originalCall.genseq, {
|
|
2464
|
+
await args.dlg.persistTellaskCall(issue.originalCall.id, disposition.callName, issue.rawArgumentsText, issue.originalCall.genseq, {
|
|
2465
|
+
deliveryMode: 'func_call_requested',
|
|
2466
|
+
...(isReplyTellaskCallName(disposition.callName) ? { recordReplyDelivery: false } : {}),
|
|
2467
|
+
});
|
|
2455
2468
|
const result = formatTellaskInvalidCallResult({
|
|
2456
2469
|
call: issue.originalCall,
|
|
2457
2470
|
error: issue.error,
|
|
@@ -2523,6 +2536,7 @@ async function processTellaskFunctionRound(args) {
|
|
|
2523
2536
|
const tellaskFuncResultByCallId = new Map();
|
|
2524
2537
|
const tellaskToolOutputs = [];
|
|
2525
2538
|
const immediateTellaskOutputCallIds = [];
|
|
2539
|
+
const failedReplyCallIds = new Set(tellaskExecution.failedReplyCallIds);
|
|
2526
2540
|
let hasImmediateTellaskOutputs = false;
|
|
2527
2541
|
let shouldStopAfterPendingTellaskWait = false;
|
|
2528
2542
|
for (const output of tellaskExecution.toolOutputs) {
|
|
@@ -2533,6 +2547,10 @@ async function processTellaskFunctionRound(args) {
|
|
|
2533
2547
|
const originatingCall = specialCallById.get(result.id);
|
|
2534
2548
|
if (originatingCall !== undefined &&
|
|
2535
2549
|
usesFuncRequestedSpecialLifecycle(originatingCall.callName)) {
|
|
2550
|
+
if (isReplyTellaskCallName(originatingCall.callName) && failedReplyCallIds.has(result.id)) {
|
|
2551
|
+
hasImmediateTellaskOutputs = true;
|
|
2552
|
+
immediateTellaskOutputCallIds.push(result.id);
|
|
2553
|
+
}
|
|
2536
2554
|
continue;
|
|
2537
2555
|
}
|
|
2538
2556
|
hasImmediateTellaskOutputs = true;
|
|
@@ -283,19 +283,23 @@ function buildFbrGuidelines(language, dialogScope, contextHealthPromptMode) {
|
|
|
283
283
|
function buildTellaskInteractionRules(language) {
|
|
284
284
|
const lines = pickLocalized(language, {
|
|
285
285
|
zh: [
|
|
286
|
+
'- **通道隔离**:所有队友都是智能体,不是人。对人类用户说话走 `askHuman` / `answerHuman` 这条人类通道;对队友说话走 `tellask` / `tellaskSessionless` / `tellaskBack` / `replyTellask*` / `freshBootsReasoning` 这条智能体通道。两条通道互不相通——尤其不要用 `answerHuman` 给队友写东西,队友看不到。',
|
|
287
|
+
'- **向人类发内容时的三段式判定**:(1)用户这一轮有插话、追问、提问、评论,先回应用户 → `answerHuman`(A2H)。(2)目标清晰、你能或队友能推进 → 直接推进,把决策记在 \`progress\` 里,必要时用 `answerHuman` 主动同步阶段性结论。(3)只有当你和所有队友都拿不到结果(缺信息、缺授权、缺能力)时,才用 `askHuman`(Q4H)请示。Q4H 是最后手段,不是默认动作。',
|
|
286
288
|
'- `tellaskBack`:仅用于支线回问诉请者。',
|
|
287
289
|
'- `tellask`:用于可恢复的长线诉请(必须提供 `targetAgentId` / `sessionSlug` / `tellaskContent`)。',
|
|
288
290
|
'- `tellaskSessionless`:用于一次性诉请(必须提供 `targetAgentId` / `tellaskContent`);它不能接着旧任务改要求,后续再次调用只是另一件独立任务,不会影响旧任务继续执行,也不会打扰同一队友正在执行的其它独立诉请。不要把智能体队友当成需要排队说话的真人同事。',
|
|
289
|
-
'- `askHuman
|
|
290
|
-
'- `answerHuman
|
|
291
|
+
'- `askHuman`(Q4H,最后手段):向人类请求必要澄清/决策/授权/缺失输入。适合 Q4H 的典型场景:你和所有队友都查不到的凭据或外部信息、多个合理方向都需要人类拍板长期方向、涉及外部不可逆操作的授权。**不要**用 `askHuman` 来发诊断报告、进度更新、已做完的总结、日常 A/B 选择——自己能挑的就自己挑,记在 \`progress\` 里,让人类审阅,必要时回滚。',
|
|
292
|
+
'- `answerHuman`(A2H):**主用途**是回应人类用户的插话、追问、提问、评论;**次用途**是在合适时机主动给人类一份自由文本说明(阶段性诊断、变更总结、阻塞说明等),它仍然走人类通道;**末位用途**是本轮必须出工具调用、但确实没有其它实质工具应调用、唯一正确动作是说明情况并等待(典型场景:等活跃诉请对象或诉请回贴),用 `answerHuman({ answerContent })` 收口。对象只能是人类——回队友走 `replyTellask*`,不要在 A2H 里夹带对队友的指令或反馈。',
|
|
291
293
|
'- `freshBootsReasoning`:用于发起扪心自问(FBR)支线(`tellaskContent` 必填,`effort` 可选)。',
|
|
292
294
|
],
|
|
293
295
|
en: [
|
|
294
|
-
'- `
|
|
296
|
+
'- **Channels are isolated**: every teammate is an agent, not a person. To talk to the human user, use the human channel (`askHuman` / `answerHuman`). To talk to a teammate, use the agent channel (`tellask` / `tellaskSessionless` / `tellaskBack` / `replyTellask*` / `freshBootsReasoning`). The two channels do not overlap; in particular, never write to a teammate via `answerHuman`—teammates will not see it.',
|
|
297
|
+
'- **Three-way rule for anything you want to say to the human**: (1) The user spoke this round—an interjection, a follow-up, a question, a comment → use `answerHuman` (A2H). (2) The goal is clear and you or a teammate can move it forward → move it forward, record the decision in `progress`, and proactively brief the human via `answerHuman` when there is something worth saying. (3) Only when neither you nor any teammate can make progress—missing info, missing authorization, or missing capability—reach for `askHuman` (Q4H). Q4H is the last resort, not the default.',
|
|
298
|
+
'- `tellaskBack`: ask back to the tellasker from a Side Dialog only.',
|
|
295
299
|
'- `tellask`: resumable tellask (requires `targetAgentId` / `sessionSlug` / `tellaskContent`).',
|
|
296
300
|
'- `tellaskSessionless`: one-shot tellask (requires `targetAgentId` / `tellaskContent`); it cannot continue an earlier task or change its requirements. Later calls are separate tasks and do not affect earlier work for the same teammate. Do not treat agent teammates like human coworkers who need you to wait in line to talk.',
|
|
297
|
-
'- `askHuman
|
|
298
|
-
'- `answerHuman
|
|
301
|
+
'- `askHuman` (Q4H, last resort): request necessary clarification, decision, authorization, or missing input from the human. Q4H fits when neither you nor any teammate can resolve it on your own—a credential you cannot find, a long-term direction with multiple defensible options that needs a human call, authorization for an external irreversible action. Do not use `askHuman` to send a diagnosis report, a status update, a wrap-up summary, or a routine A/B choice—pick the more defensible option yourself, record the rationale in `progress`, and let the human review or roll back if needed.',
|
|
302
|
+
'- `answerHuman` (A2H): the **primary** use is to react to the human user’s interjection, follow-up, question, or comment; the **secondary** use is a proactive free-form note to the human at a natural checkpoint (a stage diagnosis, a change summary, a blocker note)—still on the human channel, just not reactive; the **fallback** use is when the round must emit a tool call but no substantive tool applies and the only correct action is to state the situation and wait (typical case: waiting for active callees or tellask replies), in which case call `answerHuman({ answerContent })` to close the round. The target is always the human. To reply to a teammate, use `replyTellask*`. Do not embed instructions or feedback for a teammate inside an A2H.',
|
|
299
303
|
'- `freshBootsReasoning`: starts an FBR Side Dialog (requires `tellaskContent`, optional `effort`).',
|
|
300
304
|
],
|
|
301
305
|
});
|
|
@@ -445,6 +449,10 @@ ${input.mcpToolsetRuntimeNote ? `## MCP 工具集当前状态\n\n${input.mcpTool
|
|
|
445
449
|
**Q4H 机制**:通过 \`askHuman\` 发起向人类请求(澄清/决策/授权/缺失输入),或汇报当前环境中无法由智能体自主完成的阻塞事项。
|
|
446
450
|
**注意**:不要把可由智能体完成的执行性工作外包给 \`askHuman\`。Q4H 请求应尽量最小化、可验证(给出需要的具体信息、预期格式/选项),并在得到答复后继续由智能体自主完成后续工作。
|
|
447
451
|
**补充**:像“发起队友诉请/推进迭代/收集回贴”这类常规协作动作属于智能体的自主工作流,不要向 \`askHuman\` 询问“是否要执行”;直接执行并在必要时汇报进度即可。
|
|
452
|
+
**自主 vs Q4H**:每次准备发 \`askHuman\` 前先做这道题。
|
|
453
|
+
- 目标清晰 + 你或队友能推进 → 直接推进,把决策记在 \`progress\`,必要时用 \`answerHuman\` 主动同步阶段性结论。
|
|
454
|
+
- 目标清晰 + 你或队友推不动(缺信息、缺授权、缺能力)→ 先自助一轮:查文档、查既有提示、向能补位的能力来源求助;实在拿不到结果再 \`askHuman\`。
|
|
455
|
+
- 目标本身不清晰 → 优先用 \`freshBootsReasoning\` 做一轮扪心自问,把已知事实与未知数写清;扪心自问仍无法收敛才 \`askHuman\`。
|
|
448
456
|
|
|
449
457
|
你与以下智能体队友协作。使用他们的呼号与其交流、安排分项工作。
|
|
450
458
|
|
|
@@ -546,6 +554,10 @@ ${input.mcpToolsetRuntimeNote ? `## MCP Toolset Runtime Status\n\n${input.mcpToo
|
|
|
546
554
|
**Q4H mechanism**: Use \`askHuman\` when you need clarification/decision/authorization/missing inputs from a human, or when reporting blockers that cannot be completed autonomously in the current environment.
|
|
547
555
|
**Note**: Do not outsource executable work through \`askHuman\`. Keep Q4H requests minimal and verifiable (ask for specific info, expected format/options), then continue the remaining work autonomously after receiving the answer.
|
|
548
556
|
**Addendum**: Routine coordination actions (e.g., tellasking teammates, driving iterations, collecting replies) are part of the agent’s autonomous workflow; do not use \`askHuman\` for permission-seeking on those actions. Execute and report progress when needed.
|
|
557
|
+
**Self-driven vs. Q4H**: before sending \`askHuman\`, run this decision.
|
|
558
|
+
- The goal is clear and you or a teammate can move it forward → move it forward, record the decision in \`progress\`, and proactively brief the human via \`answerHuman\` when there is something worth saying.
|
|
559
|
+
- The goal is clear but you or a teammate is stuck (missing info, authorization, or capability) → first try self-help: re-read docs, check existing guidance, ask a teammate who can fill the gap. Reach for \`askHuman\` only when self-help does not resolve it.
|
|
560
|
+
- The goal itself is unclear → first run \`freshBootsReasoning\` to lay out what is known and what is not. Only escalate to \`askHuman\` if FBR still does not converge.
|
|
549
561
|
|
|
550
562
|
You collaborate with the following teammates. Use their call signs to address them.
|
|
551
563
|
|
package/dist/persistence.d.ts
CHANGED
|
@@ -160,6 +160,7 @@ export declare class DiskFileDialogStore extends DialogStore {
|
|
|
160
160
|
persistTellaskCall(dialog: Dialog, id: string, name: 'tellaskBack' | 'tellask' | 'tellaskSessionless' | 'replyTellask' | 'replyTellaskSessionless' | 'replyTellaskBack' | 'askHuman' | 'answerHuman' | 'freshBootsReasoning', rawArgumentsText: string, genseq: number, options?: {
|
|
161
161
|
deliveryMode?: 'tellask_call_start' | 'func_call_requested';
|
|
162
162
|
replyDirective?: TellaskReplyDirective;
|
|
163
|
+
recordReplyDelivery?: boolean;
|
|
163
164
|
}): Promise<void>;
|
|
164
165
|
/**
|
|
165
166
|
* Update questions for human state (exceptional overwrite pattern)
|
package/dist/persistence.js
CHANGED
|
@@ -3742,7 +3742,7 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
3742
3742
|
throw error;
|
|
3743
3743
|
}
|
|
3744
3744
|
await this.appendEvent(dialog, course, tellaskCallEvent);
|
|
3745
|
-
if (isReplyTellaskCallRecordName(name)) {
|
|
3745
|
+
if (isReplyTellaskCallRecordName(name) && options?.recordReplyDelivery !== false) {
|
|
3746
3746
|
const activeReplyObligation = options?.replyDirective ??
|
|
3747
3747
|
(await DialogPersistence.loadActiveTellaskReplyObligation(dialog.id, dialog.status));
|
|
3748
3748
|
const currentActiveReplyObligation = await DialogPersistence.loadActiveTellaskReplyObligation(dialog.id, dialog.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominds",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.6",
|
|
4
4
|
"description": "Dominds CLI and aggregation shell for the LongRun AI kernel/runtime packages.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"publishConfig": {
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"ws": "^8.21.0",
|
|
55
55
|
"yaml": "^2.9.0",
|
|
56
56
|
"zod": "^4.4.3",
|
|
57
|
-
"@longrun-ai/codex-auth": "0.15.0",
|
|
58
57
|
"@longrun-ai/kernel": "1.17.5",
|
|
58
|
+
"@longrun-ai/codex-auth": "0.15.0",
|
|
59
59
|
"@longrun-ai/shell": "1.17.5"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|