dominds 1.22.0 → 1.23.0
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/access-control.js +2 -2
- package/dist/dialog-instance-registry.js +3 -4
- package/dist/dialog.d.ts +2 -2
- package/dist/dialog.js +3 -3
- package/dist/docs/dialog-system.md +3 -2
- package/dist/docs/dialog-system.zh.md +3 -2
- package/dist/docs/diligence-push.md +19 -12
- package/dist/docs/diligence-push.zh.md +11 -9
- package/dist/docs/dominds-terminology.md +3 -3
- package/dist/docs/encapsulated-taskdoc.md +11 -2
- package/dist/docs/encapsulated-taskdoc.zh.md +10 -1
- package/dist/docs/llm-provider-isolation.md +1 -1
- package/dist/docs/llm-provider-isolation.zh.md +1 -1
- package/dist/docs/team_mgmt-toolset.md +2 -1
- package/dist/docs/team_mgmt-toolset.zh.md +2 -1
- package/dist/docs/volcengine-coding-plan-openai-compatible.zh.md +11 -10
- package/dist/llm/api-quirks.d.ts +0 -2
- package/dist/llm/api-quirks.js +1 -3
- package/dist/llm/client.d.ts +1 -0
- package/dist/llm/defaults.yaml +45 -6
- package/dist/llm/gen/anthropic.d.ts +0 -6
- package/dist/llm/gen/anthropic.js +21 -468
- package/dist/llm/gen/openai-compatible.d.ts +14 -1
- package/dist/llm/gen/openai-compatible.js +482 -19
- package/dist/llm/gen.d.ts +4 -2
- package/dist/llm/kernel-driver/drive.js +164 -114
- package/dist/llm/kernel-driver/runtime.js +36 -11
- package/dist/llm/kernel-driver/tellask-special.js +12 -9
- package/dist/minds/system-prompt-parts.js +8 -8
- package/dist/persistence.d.ts +2 -3
- package/dist/persistence.js +53 -76
- package/dist/problems.js +2 -1
- package/dist/runtime/driver-messages.js +4 -4
- package/dist/server/websocket-handler.js +17 -3
- package/dist/team.d.ts +2 -1
- package/dist/team.js +11 -1
- package/dist/tools/ctrl.js +48 -11
- package/dist/tools/prompts/control/en/principles.md +3 -3
- package/dist/tools/prompts/control/en/scenarios.md +4 -0
- package/dist/tools/prompts/control/en/tools.md +6 -3
- package/dist/tools/prompts/control/zh/principles.md +3 -3
- package/dist/tools/prompts/control/zh/scenarios.md +4 -0
- package/dist/tools/prompts/control/zh/tools.md +6 -3
- package/dist/tools/team_mgmt-manual.js +4 -4
- package/dist/tools/team_mgmt.js +15 -5
- package/dist/utils/task-package.d.ts +16 -0
- package/dist/utils/task-package.js +132 -55
- package/dist/utils/taskdoc.js +21 -16
- package/package.json +3 -3
- package/webapp/dist/assets/{_basePickBy-BYnYcdaa.js → _basePickBy-CGhMqD96.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-BYnYcdaa.js.map → _basePickBy-CGhMqD96.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-CHLBB955.js → _baseUniq-XCMW7z1Y.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-CHLBB955.js.map → _baseUniq-XCMW7z1Y.js.map} +1 -1
- package/webapp/dist/assets/{arc-DQXtgZdO.js → arc-B6fzk0T5.js} +2 -2
- package/webapp/dist/assets/{arc-DQXtgZdO.js.map → arc-B6fzk0T5.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CzP5Yf9x.js → architectureDiagram-2XIMDMQ5-DmSI_GUt.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CzP5Yf9x.js.map → architectureDiagram-2XIMDMQ5-DmSI_GUt.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-sOx5Byq8.js → blockDiagram-WCTKOSBZ-Bp0nb8IZ.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-sOx5Byq8.js.map → blockDiagram-WCTKOSBZ-Bp0nb8IZ.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-D8-GiS6c.js → c4Diagram-IC4MRINW-gYpylqGb.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-D8-GiS6c.js.map → c4Diagram-IC4MRINW-gYpylqGb.js.map} +1 -1
- package/webapp/dist/assets/{channel-Bvke0iMP.js → channel-BmQ3YyUn.js} +2 -2
- package/webapp/dist/assets/{channel-Bvke0iMP.js.map → channel-BmQ3YyUn.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-C9pln2M7.js → chunk-4BX2VUAB-B5pwFRwA.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-C9pln2M7.js.map → chunk-4BX2VUAB-B5pwFRwA.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-BLDXNtAM.js → chunk-55IACEB6-CZf6oMWM.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-BLDXNtAM.js.map → chunk-55IACEB6-CZf6oMWM.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-dYd3QdHa.js → chunk-FMBD7UC4-yZWCDzVz.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-dYd3QdHa.js.map → chunk-FMBD7UC4-yZWCDzVz.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-SqHEmHHd.js → chunk-JSJVCQXG-Cg1ST73M.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-SqHEmHHd.js.map → chunk-JSJVCQXG-Cg1ST73M.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-CRXgzI2d.js → chunk-KX2RTZJC-ByGtlX9q.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-CRXgzI2d.js.map → chunk-KX2RTZJC-ByGtlX9q.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-IMA2JZhH.js → chunk-NQ4KR5QH-DoXvfhSY.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-IMA2JZhH.js.map → chunk-NQ4KR5QH-DoXvfhSY.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-DBaGWjY3.js → chunk-QZHKN3VN-2gX2qsHB.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-DBaGWjY3.js.map → chunk-QZHKN3VN-2gX2qsHB.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-QLmsLbcS.js → chunk-WL4C6EOR-L-9bPNxS.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-QLmsLbcS.js.map → chunk-WL4C6EOR-L-9bPNxS.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-jN4lhUtx.js → classDiagram-VBA2DB6C-B79Oe3Df.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-jN4lhUtx.js.map → classDiagram-VBA2DB6C-B79Oe3Df.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-jN4lhUtx.js → classDiagram-v2-RAHNMMFH-B79Oe3Df.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-jN4lhUtx.js.map → classDiagram-v2-RAHNMMFH-B79Oe3Df.js.map} +1 -1
- package/webapp/dist/assets/{clone-DPC4Vt09.js → clone-DvlY9Sdn.js} +2 -2
- package/webapp/dist/assets/{clone-DPC4Vt09.js.map → clone-DvlY9Sdn.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BtVgObsc.js → cose-bilkent-S5V4N54A-CtkGd0W6.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BtVgObsc.js.map → cose-bilkent-S5V4N54A-CtkGd0W6.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-Bv6mn-UV.js → dagre-KLK3FWXG-B3W6QTXQ.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-Bv6mn-UV.js.map → dagre-KLK3FWXG-B3W6QTXQ.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-D2OPgDkq.js → diagram-E7M64L7V-B6-J_E5Q.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-D2OPgDkq.js.map → diagram-E7M64L7V-B6-J_E5Q.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-CZpDu-e5.js → diagram-IFDJBPK2-C-PH_Yx3.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-CZpDu-e5.js.map → diagram-IFDJBPK2-C-PH_Yx3.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-BkMbbW0p.js → diagram-P4PSJMXO-CB5xXDup.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-BkMbbW0p.js.map → diagram-P4PSJMXO-CB5xXDup.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-Kf17ek1z.js → erDiagram-INFDFZHY-CuAhTGVU.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-Kf17ek1z.js.map → erDiagram-INFDFZHY-CuAhTGVU.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-Cort4hNL.js → flowDiagram-PKNHOUZH-D3cIOfGj.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-Cort4hNL.js.map → flowDiagram-PKNHOUZH-D3cIOfGj.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-DcXFKB1Y.js → ganttDiagram-A5KZAMGK-CSFhVYXV.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-DcXFKB1Y.js.map → ganttDiagram-A5KZAMGK-CSFhVYXV.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-BORnqZ0-.js → gitGraphDiagram-K3NZZRJ6-CiEaxACG.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-BORnqZ0-.js.map → gitGraphDiagram-K3NZZRJ6-CiEaxACG.js.map} +1 -1
- package/webapp/dist/assets/{graph-D4Uth-MK.js → graph-CYGALRuy.js} +3 -3
- package/webapp/dist/assets/{graph-D4Uth-MK.js.map → graph-CYGALRuy.js.map} +1 -1
- package/webapp/dist/assets/{index-YBIJr7jH.js → index-BTazqQrV.js} +186 -58
- package/webapp/dist/assets/index-BTazqQrV.js.map +1 -0
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DDjsEPg3.js → infoDiagram-LFFYTUFH-CiWJjQyU.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DDjsEPg3.js.map → infoDiagram-LFFYTUFH-CiWJjQyU.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-Bb2sPnCX.js → ishikawaDiagram-PHBUUO56-MlIIUO7o.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-Bb2sPnCX.js.map → ishikawaDiagram-PHBUUO56-MlIIUO7o.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BtRY6eBa.js → journeyDiagram-4ABVD52K-BBqwkA3d.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BtRY6eBa.js.map → journeyDiagram-4ABVD52K-BBqwkA3d.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-aGmxT2H9.js → kanban-definition-K7BYSVSG-BS4GzDbo.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-aGmxT2H9.js.map → kanban-definition-K7BYSVSG-BS4GzDbo.js.map} +1 -1
- package/webapp/dist/assets/{layout-BuLicmwh.js → layout-DaJO-1DW.js} +5 -5
- package/webapp/dist/assets/{layout-BuLicmwh.js.map → layout-DaJO-1DW.js.map} +1 -1
- package/webapp/dist/assets/{linear-DIPh96mp.js → linear-SWy2Cl7G.js} +2 -2
- package/webapp/dist/assets/{linear-DIPh96mp.js.map → linear-SWy2Cl7G.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-ofWsysn9.js → mindmap-definition-YRQLILUH-B_gNrT3l.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-ofWsysn9.js.map → mindmap-definition-YRQLILUH-B_gNrT3l.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-DQqCTITO.js → pieDiagram-SKSYHLDU-CVh3lLBA.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-DQqCTITO.js.map → pieDiagram-SKSYHLDU-CVh3lLBA.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-DxWc0avu.js → quadrantDiagram-337W2JSQ-D0zAkVD7.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-DxWc0avu.js.map → quadrantDiagram-337W2JSQ-D0zAkVD7.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-DHgYfzwt.js → requirementDiagram-Z7DCOOCP--CTFD60w.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-DHgYfzwt.js.map → requirementDiagram-Z7DCOOCP--CTFD60w.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Cuhwe80W.js → sankeyDiagram-WA2Y5GQK-XZnViaAX.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Cuhwe80W.js.map → sankeyDiagram-WA2Y5GQK-XZnViaAX.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqSNoro8.js → sequenceDiagram-2WXFIKYE-BWAMhn_x.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqSNoro8.js.map → sequenceDiagram-2WXFIKYE-BWAMhn_x.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-D1mvuJi6.js → stateDiagram-RAJIS63D--jsLD0Dg.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-D1mvuJi6.js.map → stateDiagram-RAJIS63D--jsLD0Dg.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCYX5Gy-.js → stateDiagram-v2-FVOUBMTO-DUG9vyI5.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCYX5Gy-.js.map → stateDiagram-v2-FVOUBMTO-DUG9vyI5.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-DDLYGao7.js → timeline-definition-YZTLITO2-BROLp1hL.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-DDLYGao7.js.map → timeline-definition-YZTLITO2-BROLp1hL.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-DXkv1e6y.js → treemap-KZPCXAKY-BXuIlbYo.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-DXkv1e6y.js.map → treemap-KZPCXAKY-BXuIlbYo.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-DMxsg9P0.js → vennDiagram-LZ73GAT5-BXWd8gBB.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-DMxsg9P0.js.map → vennDiagram-LZ73GAT5-BXWd8gBB.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BJ2qipzT.js → xychartDiagram-JWTSCODW-DR5z9o6h.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BJ2qipzT.js.map → xychartDiagram-JWTSCODW-DR5z9o6h.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
- package/webapp/dist/assets/index-YBIJr7jH.js.map +0 -1
package/dist/access-control.js
CHANGED
|
@@ -311,12 +311,12 @@ function getAccessDeniedMessage(operation, targetPath, language = 'en') {
|
|
|
311
311
|
lines.push('');
|
|
312
312
|
if (language === 'zh') {
|
|
313
313
|
lines.push(`- 说明:\`*.tsk/\` 是封装差遣牒。通用文件工具无法读/写/列目录/删除其中内容(硬编码无条件拒绝)。`);
|
|
314
|
-
lines.push(`- 提示:新增章节请使用 \`do_mind\`;少量追加请使用 \`mind_more\`(默认 progress:\`mind_more({\"items\":[\"...\"]})
|
|
314
|
+
lines.push(`- 提示:新增章节请使用 \`do_mind\`;少量追加请使用 \`mind_more\`(默认 progress:\`mind_more({\"items\":[\"...\"]})\`);改写已有整章请使用带当前内容哈希的 \`change_mind\`(顶层:\`change_mind({\"selector\":\"goals|constraints|progress\",\"content\":\"...\",\"previous_content_hash\":\"sha256:...\"})\`;额外章节:先 \`recall_taskdoc\` 取得 \`content_hash\`,再 \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\",\"previous_content_hash\":\"sha256:...\"})\`)。`);
|
|
315
315
|
lines.push(`- 提示:读取额外章节请使用函数工具 \`recall_taskdoc\`:\`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`。`);
|
|
316
316
|
}
|
|
317
317
|
else {
|
|
318
318
|
lines.push(`- Note: \`*.tsk/\` is an encapsulated Taskdoc. It is hard-denied for all general file tools.`);
|
|
319
|
-
lines.push(`- Hint: To create a section, use \`do_mind\`; for small append-only updates, use \`mind_more\` (defaults to progress: \`mind_more({\"items\":[\"...\"]})\`); for full-section replacements
|
|
319
|
+
lines.push(`- Hint: To create a section, use \`do_mind\`; for small append-only updates, use \`mind_more\` (defaults to progress: \`mind_more({\"items\":[\"...\"]})\`); for full-section replacements, use \`change_mind\` with the current content hash (top-level: \`change_mind({\"selector\":\"goals|constraints|progress\",\"content\":\"...\",\"previous_content_hash\":\"sha256:...\"})\`; extra sections: call \`recall_taskdoc\` for \`content_hash\` first, then \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\",\"previous_content_hash\":\"sha256:...\"})\`).`);
|
|
320
320
|
lines.push(`- Hint: To read extra sections, use \`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`.`);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
@@ -85,10 +85,9 @@ async function getOrRestoreMainDialog(rootId, status) {
|
|
|
85
85
|
? latest.diligencePushRemainingBudget
|
|
86
86
|
: undefined;
|
|
87
87
|
const normalizedRemainingBudget = clampNonNegativeFiniteInt(persistedRemainingBudget, diligencePushMax > 0 ? diligencePushMax : 0);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
: normalizedRemainingBudget;
|
|
88
|
+
// `diligence-push-max` only seeds defaults. Persisted per-dialog budget is the runtime source of
|
|
89
|
+
// truth, including operator-added budget above (or despite) the current team default.
|
|
90
|
+
mainDialog.diligencePushRemainingBudget = normalizedRemainingBudget;
|
|
92
91
|
mainDialog.setPersistenceStatus(status);
|
|
93
92
|
dialog_global_registry_1.globalDialogRegistry.register(mainDialog);
|
|
94
93
|
// Keep the in-memory main dialog fully hydrated regardless of persistence status
|
package/dist/dialog.d.ts
CHANGED
|
@@ -438,7 +438,7 @@ export declare abstract class Dialog {
|
|
|
438
438
|
}): Promise<void>;
|
|
439
439
|
persistAgentMessage(content: string, genseq: number, type: 'thinking_msg' | 'saying_msg', provider_data?: ProviderData, reasoning?: ReasoningPayload): Promise<void>;
|
|
440
440
|
persistUiOnlyMarkdown(content: string, genseq: number): Promise<void>;
|
|
441
|
-
persistFunctionCall(id: string, name: string, rawArgumentsText: string, genseq: number): Promise<void>;
|
|
441
|
+
persistFunctionCall(id: string, name: string, rawArgumentsText: string, genseq: number, rawId?: string): Promise<void>;
|
|
442
442
|
persistTellaskCall(id: string, name: TellaskCallRecordName, rawArgumentsText: string, genseq: number, options?: {
|
|
443
443
|
deliveryMode?: 'tellask_call_start' | 'func_call_requested';
|
|
444
444
|
}): Promise<void>;
|
|
@@ -670,7 +670,7 @@ export declare abstract class DialogStore {
|
|
|
670
670
|
/**
|
|
671
671
|
* Persist a function call to storage
|
|
672
672
|
*/
|
|
673
|
-
persistFunctionCall(_dialog: Dialog, _id: string, _name: string, _rawArgumentsText: string, _genseq: number): Promise<void>;
|
|
673
|
+
persistFunctionCall(_dialog: Dialog, _id: string, _name: string, _rawArgumentsText: string, _genseq: number, _rawId?: string): Promise<void>;
|
|
674
674
|
persistTellaskCall(_dialog: Dialog, _id: string, _name: TellaskCallRecordName, _rawArgumentsText: string, _genseq: number, _options?: {
|
|
675
675
|
deliveryMode?: 'tellask_call_start' | 'func_call_requested';
|
|
676
676
|
}): Promise<void>;
|
package/dist/dialog.js
CHANGED
|
@@ -1452,8 +1452,8 @@ class Dialog {
|
|
|
1452
1452
|
async persistUiOnlyMarkdown(content, genseq) {
|
|
1453
1453
|
return await this.dlgStore.persistUiOnlyMarkdown(this, content, genseq);
|
|
1454
1454
|
}
|
|
1455
|
-
async persistFunctionCall(id, name, rawArgumentsText, genseq) {
|
|
1456
|
-
return await this.dlgStore.persistFunctionCall(this, id, name, rawArgumentsText, genseq);
|
|
1455
|
+
async persistFunctionCall(id, name, rawArgumentsText, genseq, rawId) {
|
|
1456
|
+
return await this.dlgStore.persistFunctionCall(this, id, name, rawArgumentsText, genseq, rawId);
|
|
1457
1457
|
}
|
|
1458
1458
|
async persistTellaskCall(id, name, rawArgumentsText, genseq, options) {
|
|
1459
1459
|
return await this.dlgStore.persistTellaskCall(this, id, name, rawArgumentsText, genseq, options);
|
|
@@ -1895,7 +1895,7 @@ class DialogStore {
|
|
|
1895
1895
|
/**
|
|
1896
1896
|
* Persist a function call to storage
|
|
1897
1897
|
*/
|
|
1898
|
-
async persistFunctionCall(_dialog, _id, _name, _rawArgumentsText, _genseq) { }
|
|
1898
|
+
async persistFunctionCall(_dialog, _id, _name, _rawArgumentsText, _genseq, _rawId) { }
|
|
1899
1899
|
async persistTellaskCall(_dialog, _id, _name, _rawArgumentsText, _genseq, _options) { }
|
|
1900
1900
|
/**
|
|
1901
1901
|
* Start a new course in storage
|
|
@@ -821,7 +821,7 @@ Invoke the function tool `clear_mind` with:
|
|
|
821
821
|
|
|
822
822
|
- `do_mind`: create one new section; fails if the target already exists.
|
|
823
823
|
- `mind_more`: append small entries to an existing section; defaults to `progress`.
|
|
824
|
-
- `change_mind`: replace one existing section; fails if the target does not exist.
|
|
824
|
+
- `change_mind`: replace one existing section; fails if the target does not exist or `previous_content_hash` does not match the current content hash.
|
|
825
825
|
- `never_mind`: delete one existing section.
|
|
826
826
|
|
|
827
827
|
**Common section arguments**:
|
|
@@ -829,11 +829,12 @@ Invoke the function tool `clear_mind` with:
|
|
|
829
829
|
- `selector: "goals" | "constraints" | "progress"` for top-level sections; or a valid selector with `category`
|
|
830
830
|
- `category?: string`
|
|
831
831
|
- `content: string` for `do_mind` / `change_mind`
|
|
832
|
+
- `previous_content_hash: string` for `change_mind`
|
|
832
833
|
|
|
833
834
|
Example:
|
|
834
835
|
|
|
835
836
|
```text
|
|
836
|
-
Invoke `do_mind` to create a missing section, or `change_mind` to replace an existing section.
|
|
837
|
+
Invoke `do_mind` to create a missing section, or `change_mind` with the current `content_hash` as `previous_content_hash` to replace an existing section.
|
|
837
838
|
```
|
|
838
839
|
|
|
839
840
|
**Behavior**:
|
|
@@ -798,7 +798,7 @@ async function checkSideDialogRevival(askerDialog: Dialog): Promise<void> {
|
|
|
798
798
|
|
|
799
799
|
- `do_mind`:创建一个新章节;若目标已存在则失败。
|
|
800
800
|
- `mind_more`:向已有章节追加少量条目;默认追加到 `progress`。
|
|
801
|
-
- `change_mind
|
|
801
|
+
- `change_mind`:替换一个已有章节;若目标不存在,或 `previous_content_hash` 与当前内容哈希不匹配,则失败。
|
|
802
802
|
- `never_mind`:删除一个已有章节。
|
|
803
803
|
|
|
804
804
|
**通用章节参数**:
|
|
@@ -806,11 +806,12 @@ async function checkSideDialogRevival(askerDialog: Dialog): Promise<void> {
|
|
|
806
806
|
- 顶层章节使用 `selector: "goals" | "constraints" | "progress"`;额外章节使用有效 `selector` 加 `category`
|
|
807
807
|
- `category?: string`
|
|
808
808
|
- `do_mind` / `change_mind` 使用 `content: string`
|
|
809
|
+
- `change_mind` 还需要 `previous_content_hash: string`
|
|
809
810
|
|
|
810
811
|
示例:
|
|
811
812
|
|
|
812
813
|
```text
|
|
813
|
-
调用 `do_mind` 创建缺失章节,或调用 `change_mind` 替换已有章节。
|
|
814
|
+
调用 `do_mind` 创建缺失章节,或调用 `change_mind` 并带上当前 `content_hash` 作为 `previous_content_hash` 替换已有章节。
|
|
814
815
|
```
|
|
815
816
|
|
|
816
817
|
**行为**:
|
|
@@ -82,15 +82,20 @@ To avoid infinite loops, diligence-push has a per-dialog budget (per-member `dil
|
|
|
82
82
|
how many auto-continued diligence prompts can be injected for a given dialog before the runtime stops
|
|
83
83
|
issuing further automatic Diligence Pushes for that budget.
|
|
84
84
|
|
|
85
|
-
- Default: **
|
|
86
|
-
- If `< 1`,
|
|
85
|
+
- Default: **99**
|
|
86
|
+
- If `< 1`, new dialogs start with no automatic Diligence Push budget
|
|
87
87
|
- Configurable per-member via `diligence-push-max` in `.minds/team.yaml`
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Important: `diligence-push-max` is only the default budget used when a dialog instance is created
|
|
90
|
+
or reset. Runtime decisions must use the concrete dialog's remaining budget
|
|
91
|
+
(`diligencePushRemainingBudget`), so a manually refilled dialog can keep auto-continuing even when
|
|
92
|
+
the team default is `0`.
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
dialog
|
|
94
|
+
### Q4H suspension
|
|
95
|
+
|
|
96
|
+
When a dialog becomes suspended due to a pending Q4H (Questions for Human), Diligence Push stops
|
|
97
|
+
while that suspension is active. Q4H does not reapply the member default budget; the dialog keeps its
|
|
98
|
+
own remaining budget so operator adjustments survive the suspension boundary.
|
|
94
99
|
|
|
95
100
|
### Budget exhausted → stop auto-pushing for that budget
|
|
96
101
|
|
|
@@ -103,9 +108,8 @@ Diligence-push can be disabled per-rtws in either of these ways:
|
|
|
103
108
|
|
|
104
109
|
- If the selected diligence file exists but its content is empty/whitespace, diligence-push is disabled (no injection).
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- If `diligence-push-max < 1`, diligence-push is disabled for that member (no injection).
|
|
111
|
+
To stop auto-continue for a specific dialog, set that dialog's remaining budget to `0` or use the
|
|
112
|
+
per-dialog Diligence Push disable switch.
|
|
109
113
|
|
|
110
114
|
## Diligence prompt resolution
|
|
111
115
|
|
|
@@ -122,9 +126,10 @@ If the first existing file in the above order has empty/whitespace content, **di
|
|
|
122
126
|
Note: YAML frontmatter in diligence files is **ignored** by the runtime. If present, it is treated as
|
|
123
127
|
non-content metadata and stripped from the prompt body.
|
|
124
128
|
|
|
125
|
-
### Team member
|
|
129
|
+
### Team member default budget: `diligence-push-max`
|
|
126
130
|
|
|
127
|
-
Each team member can optionally
|
|
131
|
+
Each team member can optionally set the starting Diligence Push budget for new or reset dialogs via
|
|
132
|
+
`.minds/team.yaml`:
|
|
128
133
|
|
|
129
134
|
```yaml
|
|
130
135
|
members:
|
|
@@ -135,7 +140,9 @@ members:
|
|
|
135
140
|
Rules:
|
|
136
141
|
|
|
137
142
|
- If missing, `diligence-push-max` defaults to **99** for that member.
|
|
138
|
-
- If `diligence-push-max < 1`,
|
|
143
|
+
- If `diligence-push-max < 1`, newly created dialogs start with remaining budget `0`.
|
|
144
|
+
- After creation or reset, runtime business logic follows the dialog's own remaining budget rather
|
|
145
|
+
than treating `diligence-push-max` as runtime authority.
|
|
139
146
|
- Built-in shadow members `fuxi` and `pangu` default to `diligence-push-max: 0` unless explicitly overridden in team.yaml.
|
|
140
147
|
|
|
141
148
|
## UX notes
|
|
@@ -70,12 +70,15 @@ Dominds 主线对话旨在长期运行。主线对话"停止"(变为空闲)
|
|
|
70
70
|
为避免无限循环,diligence-push 有一个按对话的预算(每个成员的 `diligence-push-max`),控制对于给定对话在当前预算内还能注入多少个自动继续的鞭策语;预算耗尽后,运行时会停止继续自动鞭策。
|
|
71
71
|
|
|
72
72
|
- 默认值:**99**
|
|
73
|
-
- 如果 `< 1
|
|
73
|
+
- 如果 `< 1`,则新建对话从 0 个自动鞭策预算开始
|
|
74
74
|
- 可通过 `.minds/team.yaml` 中的 `diligence-push-max` 按成员配置
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
重要:`diligence-push-max` 只是在创建或重置对话实例时使用的默认预算。运行时业务判断必须以具体对话自己的剩余预算
|
|
77
|
+
(`diligencePushRemainingBudget`)为准;因此即使团队默认值是 `0`,手工补充过预算的对话也应继续自动鞭策。
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
### Q4H 暂停
|
|
80
|
+
|
|
81
|
+
当对话因待处理的 Q4H(Questions for Human)而暂停时,鞭策会在该暂停期间停止。Q4H 不会重新套用成员默认预算;对话会保留自己的剩余预算,因此操作员调整过的预算能跨过暂停边界继续生效。
|
|
79
82
|
|
|
80
83
|
### 预算耗尽 → 停止继续自动鞭策当前预算
|
|
81
84
|
|
|
@@ -87,9 +90,7 @@ Dominds 主线对话旨在长期运行。主线对话"停止"(变为空闲)
|
|
|
87
90
|
|
|
88
91
|
- 如果选中的鞭策语文件存在但其内容为空/仅空白,则禁用 diligence-push(不注入)。
|
|
89
92
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- 如果 `diligence-push-max < 1`,则该成员的 diligence-push 被禁用(不注入)。
|
|
93
|
+
若要停止某个具体对话的自动续推,应将该对话的剩余预算设为 `0`,或使用该对话自己的鞭策禁用开关。
|
|
93
94
|
|
|
94
95
|
## 鞭策语解析
|
|
95
96
|
|
|
@@ -105,9 +106,9 @@ Dominds 主线对话旨在长期运行。主线对话"停止"(变为空闲)
|
|
|
105
106
|
|
|
106
107
|
注意:鞭策语文件中的 YAML frontmatter 会被运行时忽略。如果存在,它被视为非内容元数据并从提示正文中剥离。
|
|
107
108
|
|
|
108
|
-
###
|
|
109
|
+
### 团队成员默认预算:`diligence-push-max`
|
|
109
110
|
|
|
110
|
-
每个团队成员可以选择通过 `.minds/team.yaml`
|
|
111
|
+
每个团队成员可以选择通过 `.minds/team.yaml` 设置新建或重置对话的鞭策起始预算:
|
|
111
112
|
|
|
112
113
|
```yaml
|
|
113
114
|
members:
|
|
@@ -118,7 +119,8 @@ members:
|
|
|
118
119
|
规则:
|
|
119
120
|
|
|
120
121
|
- 如果缺失,`diligence-push-max` 对于该成员默认为 **99**。
|
|
121
|
-
- 如果 `diligence-push-max < 1
|
|
122
|
+
- 如果 `diligence-push-max < 1`,则新建对话的剩余预算从 `0` 开始。
|
|
123
|
+
- 创建或重置之后,运行时业务逻辑以对话自己的剩余预算为准,而不是再次把 `diligence-push-max` 当作启停闸门。
|
|
122
124
|
- 内置影子成员 `fuxi` 和 `pangu` 默认为 `diligence-push-max: 0`,除非在 team.yaml 中显式覆盖。
|
|
123
125
|
|
|
124
126
|
## UX 备注
|
|
@@ -425,11 +425,11 @@ Example / 示例(概念):
|
|
|
425
425
|
|
|
426
426
|
### Diligence Push(鞭策)
|
|
427
427
|
|
|
428
|
-
- EN: A proactive continuation mechanism that nudges an agent forward when it's idle or blocked (a "Diligence Push"), using configurable prompts and
|
|
429
|
-
- ZH:
|
|
428
|
+
- EN: A proactive continuation mechanism that nudges an agent forward when it's idle or blocked (a "Diligence Push"), using configurable prompts and per-dialog remaining budgets. **Always use "Diligence Push"; never use "keep-going", "勤奋", "proactive-push", or "auto-continue".**
|
|
429
|
+
- ZH: 一种主动继续机制,在智能体空闲或阻塞时通过可配置的提示词和每个对话自己的剩余预算进行"鞭策"。**统一使用"鞭策";禁止使用"保持运行"、"勤奋"、"自动继续"、"催促"等变体。**
|
|
430
430
|
|
|
431
431
|
- EN: Related terms: "Diligence Push prompt" (prompt file), "Diligence Push-max" config, "Diligence Push injection" (prompt injection).
|
|
432
|
-
- ZH: 相关术语:"鞭策提示词"(提示词文件)、"
|
|
432
|
+
- ZH: 相关术语:"鞭策提示词"(提示词文件)、"鞭策默认预算"(配置项)、"鞭策注入"(注入机制)。
|
|
433
433
|
|
|
434
434
|
### 用词原则:者 / 器 与 -or / -er
|
|
435
435
|
|
|
@@ -174,7 +174,7 @@ Taskdoc mutation function tools each affect **exactly one** section file of the
|
|
|
174
174
|
|
|
175
175
|
- `do_mind` creates a new section file and MUST fail if the target already exists.
|
|
176
176
|
- `mind_more` appends entries without deduplicating or rewriting old content.
|
|
177
|
-
- `change_mind` replaces an existing section file and MUST fail if the target does not exist.
|
|
177
|
+
- `change_mind` replaces an existing section file and MUST fail if the target does not exist or if the supplied `previous_content_hash` does not match the current section content hash.
|
|
178
178
|
- `never_mind` deletes an existing section file.
|
|
179
179
|
|
|
180
180
|
Critically:
|
|
@@ -191,6 +191,7 @@ They take:
|
|
|
191
191
|
|
|
192
192
|
- `selector` (required)
|
|
193
193
|
- `content` (required)
|
|
194
|
+
- `previous_content_hash` (required for `change_mind`)
|
|
194
195
|
- `category` (optional)
|
|
195
196
|
|
|
196
197
|
When `category` is missing/empty, `selector` targets the **top-level** section files:
|
|
@@ -218,6 +219,13 @@ Hard prohibitions:
|
|
|
218
219
|
- `contracts|acceptance|grants|runbook|decisions|risks` MUST NOT be written outside `category="bearinmind"`.
|
|
219
220
|
- No other category is auto-injected into the system prompt (only an index may be shown).
|
|
220
221
|
|
|
222
|
+
`previous_content_hash` is the `sha256:...` hash of the current section content after Dominds' canonical Markdown file-ending normalization. It is not stored as extra state.
|
|
223
|
+
|
|
224
|
+
- For auto-injected top-level sections (`goals`, `constraints`, `progress`), the injected Taskdoc status block shows each current `content_hash`.
|
|
225
|
+
- For non-auto-injected sections, call `recall_taskdoc({ category, selector })`; its result includes `content_hash`.
|
|
226
|
+
- On hash mismatch, the write MUST fail. The agent must re-read/review the current section and retry only after fully merging existing content.
|
|
227
|
+
- If the proposed replacement would overwrite, delete, or materially replace existing content, the agent must have either direct human confirmation for that replacement, or a human-approved explicit SOP/acceptance standard that authorizes the replacement after considering the existing content.
|
|
228
|
+
|
|
221
229
|
### `recall_taskdoc` (read-only; for non-auto-injected sections)
|
|
222
230
|
|
|
223
231
|
Because general file tools cannot read anything under `*.tsk/`, Dominds provides a dedicated read tool:
|
|
@@ -230,6 +238,7 @@ Behavior:
|
|
|
230
238
|
|
|
231
239
|
- Reads `bearinmind/<whitelisted>.md` or `<category>/<selector>.md`.
|
|
232
240
|
- The top-level three sections (`goals` / `constraints` / `progress`) are already auto-injected, so `recall_taskdoc` does not read them.
|
|
241
|
+
- Returns the section `content_hash` for use as `change_mind.previous_content_hash`.
|
|
233
242
|
|
|
234
243
|
Example (bearinmind):
|
|
235
244
|
|
|
@@ -249,7 +258,7 @@ Example:
|
|
|
249
258
|
|
|
250
259
|
```text
|
|
251
260
|
Call the function tool `change_mind` with:
|
|
252
|
-
{ "selector": "constraints", "content": "- MUST not browse the web.\n- MUST keep responses under 10 lines unless asked otherwise.\n" }
|
|
261
|
+
{ "selector": "constraints", "content": "- MUST not browse the web.\n- MUST keep responses under 10 lines unless asked otherwise.\n", "previous_content_hash": "sha256:..." }
|
|
253
262
|
```
|
|
254
263
|
|
|
255
264
|
### Behavioral rules
|
|
@@ -185,7 +185,7 @@ Dominds 必须从任务包构造一个**有效差遣牒**用于提示词和 UI
|
|
|
185
185
|
|
|
186
186
|
- `do_mind` 创建新章节文件;如果目标已存在,必须失败。
|
|
187
187
|
- `mind_more` 追加条目,不会自动去重或改写旧内容。
|
|
188
|
-
- `change_mind`
|
|
188
|
+
- `change_mind` 替换已有章节文件;如果目标不存在,或传入的 `previous_content_hash` 与当前章节内容哈希不匹配,必须失败。
|
|
189
189
|
- `never_mind` 删除已有章节文件。
|
|
190
190
|
|
|
191
191
|
关键点:
|
|
@@ -202,6 +202,7 @@ Dominds 必须从任务包构造一个**有效差遣牒**用于提示词和 UI
|
|
|
202
202
|
|
|
203
203
|
- `selector`(必需)
|
|
204
204
|
- `content`(必需)
|
|
205
|
+
- `previous_content_hash`(`change_mind` 必需)
|
|
205
206
|
- `category`(可选)
|
|
206
207
|
|
|
207
208
|
当 `category` 缺失/为空时,`selector` 指向**顶层**部分文件:
|
|
@@ -229,6 +230,13 @@ Dominds 必须从任务包构造一个**有效差遣牒**用于提示词和 UI
|
|
|
229
230
|
- `contracts|acceptance|grants|runbook|decisions|risks` 不得在 `category="bearinmind"` 之外编写。
|
|
230
231
|
- 没有其他类别会自动注入系统提示(只会显示一个索引)。
|
|
231
232
|
|
|
233
|
+
`previous_content_hash` 是当前章节内容在 Dominds 规范化 Markdown 文件结尾之后得到的 `sha256:...` 哈希;它不是额外持久状态。
|
|
234
|
+
|
|
235
|
+
- 顶层自动注入章节(`goals`、`constraints`、`progress`)的当前 `content_hash` 会显示在注入的差遣牒状态块中。
|
|
236
|
+
- 非自动注入章节需要先调用 `recall_taskdoc({ category, selector })`;返回结果会包含 `content_hash`。
|
|
237
|
+
- 哈希不匹配时写入必须失败。智能体必须重新读取/回顾当前章节,并且只在充分合并原有内容后重试。
|
|
238
|
+
- 如果拟替换内容会冲掉、删除或实质替换原有内容,智能体必须已获得该替换的直接人类确认,或存在人类认可的明确 SOP/验收标准,并且已按该标准考虑过原有内容。
|
|
239
|
+
|
|
232
240
|
### `recall_taskdoc`(只读;用于非自动注入的部分)
|
|
233
241
|
|
|
234
242
|
因为通用文件工具无法读取 `*.tsk/` 下的任何内容,Dominds 提供了一个专门的读取工具:
|
|
@@ -241,6 +249,7 @@ recall_taskdoc({ category, selector })
|
|
|
241
249
|
|
|
242
250
|
- 读取 `bearinmind/<whitelisted>.md` 或 `<category>/<selector>.md`。
|
|
243
251
|
- 顶层三段(`goals` / `constraints` / `progress`)已经自动注入,因此 `recall_taskdoc` 不会读取它们。
|
|
252
|
+
- 返回章节 `content_hash`,供 `change_mind.previous_content_hash` 使用。
|
|
244
253
|
|
|
245
254
|
示例(bearinmind):
|
|
246
255
|
|
|
@@ -12,7 +12,7 @@ This means:
|
|
|
12
12
|
- `apiType: anthropic` owns official Anthropic Messages semantics, including object-shaped `model_params.anthropic.thinking`.
|
|
13
13
|
- `apiType: anthropic-compatible` owns Anthropic-compatible gateway semantics, including boolean `model_params.anthropic-compatible.thinking` mapped to provider `enabled` / `disabled` request objects.
|
|
14
14
|
|
|
15
|
-
Some providers expose OpenAI-compatible or Anthropic-compatible endpoints while still requiring
|
|
15
|
+
Some providers expose OpenAI-compatible or Anthropic-compatible endpoints while still requiring explicit provider quirks. Volcano Engine Ark Coding Plan now uses the OpenAI-compatible Chat Completions shape with its dedicated `/api/coding/v3` endpoint; the historical Anthropic-compatible Volcano tool-call quirks have been removed. Kimi Code also uses the OpenAI-compatible Chat Completions shape, but must use the built-in `kimi-code` provider's dedicated `/coding/v1` endpoint, real Dominds User-Agent, `prompt_cache_key`, and Kimi-specific `thinking`/`reasoning_effort` request shaping. See [`volcengine-coding-plan-openai-compatible.zh.md`](./volcengine-coding-plan-openai-compatible.zh.md) for the Volcano migration design record.
|
|
16
16
|
|
|
17
17
|
Similar field names across wrappers do not imply compatibility. For example, `reasoning_effort`, `verbosity`, `parallel_tool_calls`, and web search controls may look similar but can still differ in accepted values, payload shape, lifecycle events, validation rules, and runtime meaning.
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ Dominds 把每个 LLM provider wrapper 视为独立的协议适配器,而不
|
|
|
12
12
|
- `apiType: anthropic` 只负责 Anthropic 官方 Messages 语义,包括 object 形态的 `model_params.anthropic.thinking`。
|
|
13
13
|
- `apiType: anthropic-compatible` 负责 Anthropic 兼容网关语义,包括 boolean 形态的 `model_params.anthropic-compatible.thinking`,并映射为 provider 请求里的 `enabled` / `disabled` object。
|
|
14
14
|
|
|
15
|
-
某些 provider 虽然暴露 OpenAI-compatible 或 Anthropic-compatible endpoint,但仍可能需要明确的 provider quirk profile
|
|
15
|
+
某些 provider 虽然暴露 OpenAI-compatible 或 Anthropic-compatible endpoint,但仍可能需要明确的 provider quirk profile。火山方舟 Coding Plan 现在走 OpenAI-compatible Chat Completions 形态,并使用专属 `/api/coding/v3` endpoint;历史 Anthropic-compatible 火山工具调用 quirk 已取消。Kimi Code 也走 OpenAI-compatible Chat Completions 形态,但必须使用内置 `kimi-code` provider 的专属 `/coding/v1` endpoint、真实 Dominds User-Agent、`prompt_cache_key` 和 Kimi 专用 `thinking`/`reasoning_effort` 请求整形。火山迁移设计记录见 [`volcengine-coding-plan-openai-compatible.zh.md`](./volcengine-coding-plan-openai-compatible.zh.md)。
|
|
16
16
|
|
|
17
17
|
不同 wrapper 下看起来同名的字段,不代表它们可以互相兼容。比如 `reasoning_effort`、`verbosity`、`parallel_tool_calls`、web search 相关开关,名字可能相似,但可接受值、请求载荷形状、流事件生命周期、校验规则和运行时含义都可能不同。
|
|
18
18
|
|
|
@@ -327,7 +327,8 @@ used in `.minds/team.yaml` member configurations.
|
|
|
327
327
|
- `openai`: uses the OpenAI **Responses API** (best for OpenAI official endpoints; requires a `/v1`-style `responses` endpoint)
|
|
328
328
|
- `anthropic`: uses the official Anthropic **Messages API**. `model_params.anthropic.thinking` uses the official Anthropic object shape.
|
|
329
329
|
- `anthropic-compatible`: uses Anthropic-compatible **Messages API**. `model_params.anthropic-compatible.thinking` uses the Dominds boolean switch: `true` sends `thinking.type=enabled`; `false` sends `thinking.type=disabled`.
|
|
330
|
-
- `openai-compatible`: uses the OpenAI **Chat Completions API** (best for most “OpenAI-compatible” third-party/proxy endpoints; e.g. a manually configured Ark `.../api/v3` endpoint; Volcano Engine Ark Coding Plan must use its dedicated `.../api/coding/v3` endpoint
|
|
330
|
+
- `openai-compatible`: uses the OpenAI **Chat Completions API** (best for most “OpenAI-compatible” third-party/proxy endpoints; e.g. a manually configured Ark `.../api/v3` endpoint; Volcano Engine Ark Coding Plan must use its dedicated `.../api/coding/v3` endpoint)
|
|
331
|
+
- Kimi Code uses the built-in `kimi-code` provider (`https://api.kimi.com/coding/v1`, `KIMI_CODE_API_KEY`, model `kimi-for-coding`) rather than a generic Moonshot/Open Platform endpoint.
|
|
331
332
|
- **Vision support**: if the provider/model supports multimodal Chat Completions, Dominds will pass tool-output images (`func_result_msg.contentItems[].type=input_image`, e.g. from MCP tools) to the model as `image_url` inputs after reading the persisted artifact; unsupported mime types are downgraded to text.
|
|
332
333
|
|
|
333
334
|
```yaml
|
|
@@ -268,7 +268,8 @@
|
|
|
268
268
|
- `openai`:使用 OpenAI **Responses API**(适用于 OpenAI 官方;需要 `/v1` 语义的 `responses` 端点)
|
|
269
269
|
- `anthropic`:使用 Anthropic 官方 **Messages API**。`model_params.anthropic.thinking` 使用 Anthropic 官方 object 形态。
|
|
270
270
|
- `anthropic-compatible`:使用 Anthropic 兼容的 **Messages API**。`model_params.anthropic-compatible.thinking` 使用 Dominds boolean 开关:`true` 发送 `thinking.type=enabled`,`false` 发送 `thinking.type=disabled`。
|
|
271
|
-
- `openai-compatible`:使用 OpenAI **Chat Completions API**(适用于多数“OpenAI 兼容”第三方/代理;例如手动配置的 Ark `.../api/v3` 端点;火山方舟 Coding Plan 必须使用专属 `.../api/coding/v3`
|
|
271
|
+
- `openai-compatible`:使用 OpenAI **Chat Completions API**(适用于多数“OpenAI 兼容”第三方/代理;例如手动配置的 Ark `.../api/v3` 端点;火山方舟 Coding Plan 必须使用专属 `.../api/coding/v3` 端点)
|
|
272
|
+
- Kimi Code 使用内置 `kimi-code` provider(`https://api.kimi.com/coding/v1`、`KIMI_CODE_API_KEY`、模型 `kimi-for-coding`),不要配置成普通 Moonshot/Open Platform endpoint。
|
|
272
273
|
- **识图支持**:如果该 provider/model 支持 Chat Completions 的多模态输入,Dominds 会把工具输出里的图片(`func_result_msg.contentItems[].type=input_image`,来自 MCP 等工具)读取 artifact 后作为 `image_url` 形式喂给模型;不支持的 mimeType 会降级成文本提示。
|
|
273
274
|
|
|
274
275
|
```yaml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 火山方舟 Coding Plan OpenAI-Compatible 接入记录
|
|
2
2
|
|
|
3
|
-
本文记录 Dominds
|
|
3
|
+
本文记录 Dominds 将火山方舟 Coding Plan 从 Anthropic-compatible 协议切换到 OpenAI-compatible 协议的调研结论、设计边界和实施记录。
|
|
4
4
|
|
|
5
5
|
调研日期:2026-05-06
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ Dominds 现有火山方舟 Coding Plan 接入主要围绕 Anthropic-compatible
|
|
|
15
15
|
|
|
16
16
|
官方明确提醒:Coding Plan 不应使用普通数据面 `https://ark.cn-beijing.volces.com/api/v3`,否则不会消耗 Coding Plan 额度,可能产生额外 API 调用费用。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
结论:Dominds 最终取消火山方舟 Coding Plan + Anthropic-compatible 组合,内置 `volcano-engine-coding-plan` 改用 OpenAI-compatible 路线,以降低工具调用、流式输出、thinking/saying 顺序与多模型支持上的兼容成本。
|
|
19
19
|
|
|
20
20
|
## 资料来源
|
|
21
21
|
|
|
@@ -56,19 +56,20 @@ Dominds 现有火山方舟 Coding Plan 接入主要围绕 Anthropic-compatible
|
|
|
56
56
|
|
|
57
57
|
### Provider Profile
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
当前内置 provider profile:
|
|
60
60
|
|
|
61
61
|
```yaml
|
|
62
62
|
providers:
|
|
63
63
|
volcano-engine-coding-plan:
|
|
64
64
|
name: Volcano Engine Coding Plan
|
|
65
65
|
apiType: openai-compatible
|
|
66
|
-
apiQuirks:
|
|
66
|
+
apiQuirks:
|
|
67
|
+
- same-context-empty-response
|
|
67
68
|
baseUrl: https://ark.cn-beijing.volces.com/api/coding/v3
|
|
68
69
|
apiKeyEnvVar: ARK_API_KEY
|
|
69
70
|
```
|
|
70
71
|
|
|
71
|
-
`apiType: openai-compatible`
|
|
72
|
+
`apiType: openai-compatible` 表示底层 HTTP endpoint、Chat Completions 请求形态和 SSE 基础形态接近 OpenAI Chat Completions。历史上用于火山 Anthropic-compatible 文本 tool_use / 空对象参数拼接的专项 quirks 已删除;当前内置只保留 `same-context-empty-response` 这类通用 provider 重试/诊断 quirk。
|
|
72
73
|
|
|
73
74
|
### 具体模型优先
|
|
74
75
|
|
|
@@ -86,9 +87,9 @@ Dominds 只声明具体模型,不声明 `ark-code-latest`。原因:
|
|
|
86
87
|
建议边界:
|
|
87
88
|
|
|
88
89
|
- 通用 OpenAI-compatible wrapper 保持 Chat Completions 标准假设。
|
|
89
|
-
- 火山 Coding Plan request shaping
|
|
90
|
-
- 火山 Coding Plan stream delta
|
|
91
|
-
- 火山 Coding Plan
|
|
90
|
+
- 火山 Coding Plan request shaping 以 OpenAI-compatible Chat Completions 形态为基准。
|
|
91
|
+
- 火山 Coding Plan stream delta 解释以 OpenAI-compatible SSE 形态为基准。
|
|
92
|
+
- 火山 Coding Plan 工具调用历史必须满足 Chat Completions 的 tool_calls / tool result 关联要求。
|
|
92
93
|
- driver/storage/UI 只接收 Dominds 已解码后的 thinking/saying/calling 投影事件。
|
|
93
94
|
|
|
94
95
|
## 支持模型与能力草案
|
|
@@ -291,13 +292,13 @@ OpenAI Chat Completions 风格下,`delta.tool_calls` 可能按 index 分块返
|
|
|
291
292
|
### Phase 1:文档与配置边界
|
|
292
293
|
|
|
293
294
|
- 新增本文档。
|
|
294
|
-
- 更新 provider 隔离文档,注明火山 Coding Plan
|
|
295
|
+
- 更新 provider 隔离文档,注明火山 Coding Plan 使用 OpenAI-compatible + 专属 endpoint,不再支持 Anthropic-compatible 火山工具 quirks。
|
|
295
296
|
- 在 defaults 中将 `volcano-engine-coding-plan` 调整为 OpenAI-compatible profile,仅列具体模型。
|
|
296
297
|
- 不提供 `ark-code-latest`。
|
|
297
298
|
|
|
298
299
|
### Phase 2:请求构造
|
|
299
300
|
|
|
300
|
-
-
|
|
301
|
+
- 使用 OpenAI-compatible wrapper 的标准工具调用与流式解析路径。
|
|
301
302
|
- 增加火山模型能力表。
|
|
302
303
|
- 为火山 provider 增加 `thinking` / `reasoning_effort` 参数冲突校验。
|
|
303
304
|
- 确保 tool call history 满足 `type: function`、arguments string 等要求。
|
package/dist/llm/api-quirks.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ import type { LanguageCode } from '@longrun-ai/kernel/types/language';
|
|
|
3
3
|
import type { ProviderConfig } from './client';
|
|
4
4
|
import type { LlmRetryStrategy } from './gen';
|
|
5
5
|
export type LlmFailureKind = 'retriable' | 'rejected' | 'fatal';
|
|
6
|
-
export declare const GLM_VIA_VOLCANO_API_QUIRK = "glm-via-volcano";
|
|
7
|
-
export declare const VOLCANO_TOOL_USE_API_QUIRK = "volcano-tool-use";
|
|
8
6
|
export declare const SAME_CONTEXT_EMPTY_RESPONSE_API_QUIRK = "same-context-empty-response";
|
|
9
7
|
export type LlmFailureSummary = {
|
|
10
8
|
kind: LlmFailureKind;
|
package/dist/llm/api-quirks.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XCODE_BEST_STREAM_INTERNAL_ERROR_CODE = exports.SAME_CONTEXT_EMPTY_RESPONSE_API_QUIRK =
|
|
3
|
+
exports.XCODE_BEST_STREAM_INTERNAL_ERROR_CODE = exports.SAME_CONTEXT_EMPTY_RESPONSE_API_QUIRK = void 0;
|
|
4
4
|
exports.normalizeProviderApiQuirks = normalizeProviderApiQuirks;
|
|
5
5
|
exports.createLlmFailureQuirkHandlerSession = createLlmFailureQuirkHandlerSession;
|
|
6
6
|
const persistence_errors_1 = require("../persistence-errors");
|
|
7
|
-
exports.GLM_VIA_VOLCANO_API_QUIRK = 'glm-via-volcano';
|
|
8
|
-
exports.VOLCANO_TOOL_USE_API_QUIRK = 'volcano-tool-use';
|
|
9
7
|
exports.SAME_CONTEXT_EMPTY_RESPONSE_API_QUIRK = 'same-context-empty-response';
|
|
10
8
|
const DOMINDS_LLM_EMPTY_RESPONSE_ERROR_CODE = 'DOMINDS_LLM_EMPTY_RESPONSE';
|
|
11
9
|
const XCODE_BEST_EMPTY_RESPONSE_SINGLE_RETRY_DELAY_MS = 3000;
|
package/dist/llm/client.d.ts
CHANGED
package/dist/llm/defaults.yaml
CHANGED
|
@@ -12,12 +12,6 @@
|
|
|
12
12
|
# repeated empty-response deadlock detection for the same unchanged dialog context, plus conservative retry
|
|
13
13
|
# classification for gateway-returned HTML 502 Bad Gateway pages and
|
|
14
14
|
# `500 auth_unavailable: no auth available` infrastructure failures.
|
|
15
|
-
# `apiQuirks: glm-via-volcano` enables a narrow Anthropic-compatible stream quirk for
|
|
16
|
-
# Volcano Ark Coding Plan tool calls where an empty-object tool input may arrive as
|
|
17
|
-
# content_block_start.input={} followed by a lone `partial_json: "}"`.
|
|
18
|
-
# `apiQuirks: volcano-tool-use` enables a narrow Anthropic-compatible stream quirk for
|
|
19
|
-
# Volcano Ark Coding Plan text blocks that render a tool call as textual
|
|
20
|
-
# "Function call emitted by the assistant." metadata instead of protocol tool_use blocks.
|
|
21
15
|
# `apiQuirks: same-context-empty-response` detects repeated empty responses in the same
|
|
22
16
|
# dialog generation context and stops same-context retry loops with a deadlock-break prompt.
|
|
23
17
|
# - tool_result_max_chars: optional transport-level cap for a single tool-result text payload
|
|
@@ -455,6 +449,49 @@ providers:
|
|
|
455
449
|
input_length: 128000
|
|
456
450
|
output_length: 8192
|
|
457
451
|
context_window: '128K'
|
|
452
|
+
kimi-code:
|
|
453
|
+
name: Kimi Code
|
|
454
|
+
apiType: openai-compatible
|
|
455
|
+
apiQuirks:
|
|
456
|
+
- kimi-code
|
|
457
|
+
- kimi-cli-cloak # TODO: remove this once Kimi officially admits Dominds
|
|
458
|
+
baseUrl: https://api.kimi.com/coding/v1
|
|
459
|
+
apiKeyEnvVar: KIMI_CODE_API_KEY
|
|
460
|
+
tech_spec_url: https://www.kimi.com/code/docs/en/third-party-tools/other-coding-agents.html
|
|
461
|
+
api_mgmt_url: https://www.kimi.com/code/console
|
|
462
|
+
model_param_options:
|
|
463
|
+
openai-compatible:
|
|
464
|
+
thinking:
|
|
465
|
+
prominent: true
|
|
466
|
+
default: medium
|
|
467
|
+
type: enum
|
|
468
|
+
values: [auto, off, low, medium, high]
|
|
469
|
+
description: Kimi Code thinking mode. auto leaves thinking/reasoning_effort unset; off sends thinking.type=disabled; low/medium/high send thinking.type=enabled plus the matching reasoning_effort.
|
|
470
|
+
reasoning_effort:
|
|
471
|
+
type: enum
|
|
472
|
+
values: [low, medium, high]
|
|
473
|
+
description: Advanced Kimi Code wire-level reasoning effort override. Prefer the prominent thinking enum for normal setup; do not combine with auto/off/disabled thinking.
|
|
474
|
+
temperature:
|
|
475
|
+
type: number
|
|
476
|
+
min: 0
|
|
477
|
+
max: 2
|
|
478
|
+
description: Sampling temperature. Leave unset unless you have verified the current Kimi Code API accepts the chosen value.
|
|
479
|
+
top_p:
|
|
480
|
+
type: number
|
|
481
|
+
min: 0
|
|
482
|
+
max: 1
|
|
483
|
+
description: Nucleus sampling parameter.
|
|
484
|
+
models:
|
|
485
|
+
kimi-for-coding:
|
|
486
|
+
name: Kimi For Coding
|
|
487
|
+
supports_thinking: true
|
|
488
|
+
default_thinking: true
|
|
489
|
+
supports_tool_choice: false
|
|
490
|
+
supports_image_input: true
|
|
491
|
+
context_length: 262144
|
|
492
|
+
input_length: 262144
|
|
493
|
+
output_length: 32768
|
|
494
|
+
context_window: '262K'
|
|
458
495
|
volcano-engine-coding-plan:
|
|
459
496
|
name: Volcano Ark Coding Plan
|
|
460
497
|
apiType: openai-compatible
|
|
@@ -568,6 +605,7 @@ providers:
|
|
|
568
605
|
name: Kimi-K2.6
|
|
569
606
|
supports_thinking: true
|
|
570
607
|
default_thinking: true
|
|
608
|
+
supports_tool_choice: false
|
|
571
609
|
supports_image_input: true
|
|
572
610
|
context_length: 200000
|
|
573
611
|
input_length: 200000
|
|
@@ -577,6 +615,7 @@ providers:
|
|
|
577
615
|
name: Kimi-K2.5
|
|
578
616
|
supports_thinking: true
|
|
579
617
|
default_thinking: false
|
|
618
|
+
supports_tool_choice: false
|
|
580
619
|
supports_image_input: true
|
|
581
620
|
context_length: 200000
|
|
582
621
|
input_length: 200000
|
|
@@ -4,16 +4,10 @@ import type { Team } from '../../team';
|
|
|
4
4
|
import type { FuncTool } from '../../tool';
|
|
5
5
|
import type { ChatMessage, ProviderConfig } from '../client';
|
|
6
6
|
import type { LlmBatchResult, LlmFailureDisposition, LlmGenerator, LlmRequestContext, LlmStreamReceiver, LlmStreamResult } from '../gen';
|
|
7
|
-
export type AnthropicStreamConsumeQuirks = {
|
|
8
|
-
normalizeLoneClosingBraceEmptyToolInputDelta: boolean;
|
|
9
|
-
convertVolcanoTextToolUseBlocks: boolean;
|
|
10
|
-
};
|
|
11
7
|
export type AnthropicStreamConsumeOptions = {
|
|
12
8
|
abortSignal?: AbortSignal;
|
|
13
9
|
forcedJsonToolName?: string;
|
|
14
|
-
quirks?: AnthropicStreamConsumeQuirks;
|
|
15
10
|
genseq?: number;
|
|
16
|
-
knownFunctionCallIds?: ReadonlySet<string>;
|
|
17
11
|
};
|
|
18
12
|
export type AnthropicStreamConsumeResult = {
|
|
19
13
|
usage: LlmUsageStats;
|