dominds 1.23.2 → 1.23.4
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-display-state.js +112 -9
- package/dist/dialog.js +4 -0
- package/dist/docs/dialog-system.md +6 -2
- package/dist/docs/dialog-system.zh.md +5 -1
- package/dist/docs/diligence-push.md +27 -6
- package/dist/docs/diligence-push.zh.md +13 -6
- package/dist/docs/llm-provider-isolation.md +1 -1
- package/dist/docs/llm-provider-isolation.zh.md +1 -1
- package/dist/docs/tellask-revive-context-refactor.zh.md +13 -1
- package/dist/docs/volcengine-coding-plan-openai-compatible.zh.md +3 -2
- package/dist/llm/api-quirks.d.ts +1 -0
- package/dist/llm/api-quirks.js +35 -1
- package/dist/llm/defaults.yaml +6 -0
- package/dist/llm/gen/anthropic.js +6 -2
- package/dist/llm/gen/mock.js +44 -11
- package/dist/llm/gen/openai-compatible.d.ts +2 -1
- package/dist/llm/gen/openai-compatible.js +88 -20
- package/dist/llm/gen.d.ts +12 -0
- package/dist/llm/kernel-driver/context-health.d.ts +3 -4
- package/dist/llm/kernel-driver/context-health.js +5 -2
- package/dist/llm/kernel-driver/context.d.ts +4 -8
- package/dist/llm/kernel-driver/context.js +5 -25
- package/dist/llm/kernel-driver/drive.js +263 -59
- package/dist/llm/kernel-driver/engine.d.ts +1 -1
- package/dist/llm/kernel-driver/engine.js +5 -3
- package/dist/llm/kernel-driver/flow.js +162 -45
- package/dist/llm/kernel-driver/runtime.d.ts +12 -11
- package/dist/llm/kernel-driver/runtime.js +106 -18
- package/dist/llm/kernel-driver/sideDialog.d.ts +3 -0
- package/dist/llm/kernel-driver/sideDialog.js +4 -1
- package/dist/llm/kernel-driver/tellask-special.d.ts +1 -0
- package/dist/llm/kernel-driver/tellask-special.js +30 -30
- package/dist/llm/kernel-driver/types.d.ts +7 -3
- package/dist/log.js +35 -2
- package/dist/persistence.js +12 -1
- package/dist/recovery/reply-special.js +1 -1
- package/dist/runtime/driver-messages.d.ts +14 -1
- package/dist/runtime/driver-messages.js +116 -6
- package/dist/runtime/inter-dialog-format.d.ts +1 -0
- package/dist/runtime/inter-dialog-format.js +7 -3
- package/dist/server/websocket-handler.js +0 -1
- package/dist/tools/team_mgmt-manual.js +2 -2
- package/package.json +2 -2
- package/webapp/dist/assets/{_basePickBy-C3SVVywm.js → _basePickBy-DMD1UhXs.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-C3SVVywm.js.map → _basePickBy-DMD1UhXs.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-egNq6cCa.js → _baseUniq-CsE8Qvwt.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-egNq6cCa.js.map → _baseUniq-CsE8Qvwt.js.map} +1 -1
- package/webapp/dist/assets/{arc-CASAlRvm.js → arc-0h8sV6e1.js} +2 -2
- package/webapp/dist/assets/{arc-CASAlRvm.js.map → arc-0h8sV6e1.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-B6n5FQmS.js → architectureDiagram-2XIMDMQ5-BbMESECO.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-B6n5FQmS.js.map → architectureDiagram-2XIMDMQ5-BbMESECO.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-D2UGGjic.js → blockDiagram-WCTKOSBZ-DwkN-9a4.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-D2UGGjic.js.map → blockDiagram-WCTKOSBZ-DwkN-9a4.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BOY_bQFP.js → c4Diagram-IC4MRINW-CGYONEh1.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BOY_bQFP.js.map → c4Diagram-IC4MRINW-CGYONEh1.js.map} +1 -1
- package/webapp/dist/assets/{channel-CZ_X09H1.js → channel-DbSJhm5-.js} +2 -2
- package/webapp/dist/assets/{channel-CZ_X09H1.js.map → channel-DbSJhm5-.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-BIwyAzZQ.js → chunk-4BX2VUAB-D1inRfgf.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-BIwyAzZQ.js.map → chunk-4BX2VUAB-D1inRfgf.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-zSjTFoCX.js → chunk-55IACEB6-DL1IDg_h.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-zSjTFoCX.js.map → chunk-55IACEB6-DL1IDg_h.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-CTpuRfdB.js → chunk-FMBD7UC4-CugIlRDV.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-CTpuRfdB.js.map → chunk-FMBD7UC4-CugIlRDV.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-CJ3DM4in.js → chunk-JSJVCQXG-DKHSdeu1.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-CJ3DM4in.js.map → chunk-JSJVCQXG-DKHSdeu1.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-B97EakhO.js → chunk-KX2RTZJC-DCU9tkq6.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-B97EakhO.js.map → chunk-KX2RTZJC-DCU9tkq6.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-5o1o5x0z.js → chunk-NQ4KR5QH-DN3O2s2M.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-5o1o5x0z.js.map → chunk-NQ4KR5QH-DN3O2s2M.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-D33FSIEb.js → chunk-QZHKN3VN-e3ztIJg0.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-D33FSIEb.js.map → chunk-QZHKN3VN-e3ztIJg0.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-C2InqFin.js → chunk-WL4C6EOR-Dv907NPM.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-C2InqFin.js.map → chunk-WL4C6EOR-Dv907NPM.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-BfLZmK48.js → classDiagram-VBA2DB6C-DOTXtxYZ.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-BfLZmK48.js.map → classDiagram-VBA2DB6C-DOTXtxYZ.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-BfLZmK48.js → classDiagram-v2-RAHNMMFH-DOTXtxYZ.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-BfLZmK48.js.map → classDiagram-v2-RAHNMMFH-DOTXtxYZ.js.map} +1 -1
- package/webapp/dist/assets/{clone-BSCHnHfl.js → clone-6lYQMWpu.js} +2 -2
- package/webapp/dist/assets/{clone-BSCHnHfl.js.map → clone-6lYQMWpu.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CeQ1jAJJ.js → cose-bilkent-S5V4N54A-DoJeDXV0.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CeQ1jAJJ.js.map → cose-bilkent-S5V4N54A-DoJeDXV0.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-WUuNYzcK.js → dagre-KLK3FWXG-F_n_vhV9.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-WUuNYzcK.js.map → dagre-KLK3FWXG-F_n_vhV9.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-jOVCIExP.js → diagram-E7M64L7V-Crwhgyjv.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-jOVCIExP.js.map → diagram-E7M64L7V-Crwhgyjv.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-cCeQqotA.js → diagram-IFDJBPK2-CIt1nnn5.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-cCeQqotA.js.map → diagram-IFDJBPK2-CIt1nnn5.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-DjAYFRLv.js → diagram-P4PSJMXO-qowipEfV.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-DjAYFRLv.js.map → diagram-P4PSJMXO-qowipEfV.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-Dl_6U5fV.js → erDiagram-INFDFZHY-DV2BcYNa.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-Dl_6U5fV.js.map → erDiagram-INFDFZHY-DV2BcYNa.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-D80nrZ3S.js → flowDiagram-PKNHOUZH-CAbWV161.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-D80nrZ3S.js.map → flowDiagram-PKNHOUZH-CAbWV161.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-T3WdMrgj.js → ganttDiagram-A5KZAMGK-CfdR7FRr.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-T3WdMrgj.js.map → ganttDiagram-A5KZAMGK-CfdR7FRr.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-ifV-jkKL.js → gitGraphDiagram-K3NZZRJ6-DuJFTELz.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-ifV-jkKL.js.map → gitGraphDiagram-K3NZZRJ6-DuJFTELz.js.map} +1 -1
- package/webapp/dist/assets/{graph-D5jmnb35.js → graph-cjRyzujT.js} +3 -3
- package/webapp/dist/assets/{graph-D5jmnb35.js.map → graph-cjRyzujT.js.map} +1 -1
- package/webapp/dist/assets/{index-CGbZlct2.js → index-DgfF56L4.js} +36 -36
- package/webapp/dist/assets/{index-CGbZlct2.js.map → index-DgfF56L4.js.map} +1 -1
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-C340CY5x.js → infoDiagram-LFFYTUFH-3wx-7AdD.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-C340CY5x.js.map → infoDiagram-LFFYTUFH-3wx-7AdD.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-Bu4RsELK.js → ishikawaDiagram-PHBUUO56-g6CMb1Qc.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-Bu4RsELK.js.map → ishikawaDiagram-PHBUUO56-g6CMb1Qc.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-Dvv3ypKA.js → journeyDiagram-4ABVD52K-DdCcmOBO.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-Dvv3ypKA.js.map → journeyDiagram-4ABVD52K-DdCcmOBO.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-D_rsetjW.js → kanban-definition-K7BYSVSG-BFw2emGl.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-D_rsetjW.js.map → kanban-definition-K7BYSVSG-BFw2emGl.js.map} +1 -1
- package/webapp/dist/assets/{layout-CLmOfwnS.js → layout-Clazq06r.js} +5 -5
- package/webapp/dist/assets/{layout-CLmOfwnS.js.map → layout-Clazq06r.js.map} +1 -1
- package/webapp/dist/assets/{linear-DFAmViqi.js → linear-jdsBGgvD.js} +2 -2
- package/webapp/dist/assets/{linear-DFAmViqi.js.map → linear-jdsBGgvD.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-Ce3_czeS.js → mindmap-definition-YRQLILUH-DLSZrW6l.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-Ce3_czeS.js.map → mindmap-definition-YRQLILUH-DLSZrW6l.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-U6_un5Sc.js → pieDiagram-SKSYHLDU-Uj-Zpci6.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-U6_un5Sc.js.map → pieDiagram-SKSYHLDU-Uj-Zpci6.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-DmVJQItS.js → quadrantDiagram-337W2JSQ-DO7Sl1nV.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-DmVJQItS.js.map → quadrantDiagram-337W2JSQ-DO7Sl1nV.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-BkNhSY-g.js → requirementDiagram-Z7DCOOCP-WrurrDKQ.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-BkNhSY-g.js.map → requirementDiagram-Z7DCOOCP-WrurrDKQ.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-E3UEy5SX.js → sankeyDiagram-WA2Y5GQK-gcxbxuZB.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-E3UEy5SX.js.map → sankeyDiagram-WA2Y5GQK-gcxbxuZB.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-k0w9WKAO.js → sequenceDiagram-2WXFIKYE-B98U2Npa.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-k0w9WKAO.js.map → sequenceDiagram-2WXFIKYE-B98U2Npa.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-DRgdJrlx.js → stateDiagram-RAJIS63D-BUgfHMbd.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-DRgdJrlx.js.map → stateDiagram-RAJIS63D-BUgfHMbd.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-edtkX9x6.js → stateDiagram-v2-FVOUBMTO-C8gH0rSW.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-edtkX9x6.js.map → stateDiagram-v2-FVOUBMTO-C8gH0rSW.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-D0zyXyNL.js → timeline-definition-YZTLITO2-DnVikX3B.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-D0zyXyNL.js.map → timeline-definition-YZTLITO2-DnVikX3B.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-CglsYqbQ.js → treemap-KZPCXAKY-BjhjT1IM.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-CglsYqbQ.js.map → treemap-KZPCXAKY-BjhjT1IM.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-DsUizzvt.js → vennDiagram-LZ73GAT5-CXjPMxrl.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-DsUizzvt.js.map → vennDiagram-LZ73GAT5-CXjPMxrl.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DvYQ4zKY.js → xychartDiagram-JWTSCODW-ByKmk3Cb.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DvYQ4zKY.js.map → xychartDiagram-JWTSCODW-ByKmk3Cb.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
|
@@ -151,6 +151,7 @@ async function deliverTellaskBackReplyFromDirective(args) {
|
|
|
151
151
|
responseBody: args.replyContent,
|
|
152
152
|
status: 'completed',
|
|
153
153
|
deliveryMode: args.deliveryMode,
|
|
154
|
+
directFallbackSource: args.directFallbackSource,
|
|
154
155
|
language: (0, work_language_1.getWorkLanguage)(),
|
|
155
156
|
});
|
|
156
157
|
const targetCallSiteCourse = (0, storage_1.toCallSiteCourseNo)(askBackAskerDialog.currentCourse);
|
|
@@ -997,23 +998,6 @@ async function reviveDialogIfUnblocked(dialog, callbacks, reason) {
|
|
|
997
998
|
},
|
|
998
999
|
});
|
|
999
1000
|
}
|
|
1000
|
-
function extractLastAssistantResponse(messages, defaultMessage) {
|
|
1001
|
-
let responseText = '';
|
|
1002
|
-
for (let i = messages.length - 1; i >= 0; i--) {
|
|
1003
|
-
const msg = messages[i];
|
|
1004
|
-
if (msg.type === 'saying_msg' && typeof msg.content === 'string') {
|
|
1005
|
-
responseText = msg.content;
|
|
1006
|
-
break;
|
|
1007
|
-
}
|
|
1008
|
-
if (msg.type === 'thinking_msg' && typeof msg.content === 'string') {
|
|
1009
|
-
responseText = msg.content;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
if (!responseText) {
|
|
1013
|
-
responseText = defaultMessage;
|
|
1014
|
-
}
|
|
1015
|
-
return responseText;
|
|
1016
|
-
}
|
|
1017
1001
|
function findDeliveredTellaskBackReplyOnAskBackAsker(args) {
|
|
1018
1002
|
// `replyTellaskBack` persists the canonical tellaskBack business result onto the ask-back
|
|
1019
1003
|
// asker immediately. Type-A orchestration must check that canonical delivery first
|
|
@@ -1031,15 +1015,6 @@ function findDeliveredTellaskBackReplyOnAskBackAsker(args) {
|
|
|
1031
1015
|
}
|
|
1032
1016
|
return undefined;
|
|
1033
1017
|
}
|
|
1034
|
-
async function extractAskBackTellaskeePlaintextFallback(args) {
|
|
1035
|
-
try {
|
|
1036
|
-
return extractLastAssistantResponse(args.tellaskeeDialog.msgs, 'AskerDialog completed without producing output.');
|
|
1037
|
-
}
|
|
1038
|
-
catch (err) {
|
|
1039
|
-
log_1.log.warn('Failed to extract askerDialog response for Type A', err);
|
|
1040
|
-
return 'AskerDialog completed with errors.';
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
1018
|
async function executeTellaskCall(dlg, mentionList, body, callId, callbacks, options) {
|
|
1044
1019
|
const toolOutputs = [];
|
|
1045
1020
|
const callName = options.callName;
|
|
@@ -1387,7 +1362,7 @@ async function executeTellaskCall(dlg, mentionList, body, callId, callbacks, opt
|
|
|
1387
1362
|
origin: 'runtime',
|
|
1388
1363
|
tellaskReplyDirective: tellaskBackReplyDirective,
|
|
1389
1364
|
};
|
|
1390
|
-
await callbacks.driveDialog(askBackTellaskeeDialog, {
|
|
1365
|
+
const askBackTellaskeeDriveResult = await callbacks.driveDialog(askBackTellaskeeDialog, {
|
|
1391
1366
|
humanPrompt: askerPrompt,
|
|
1392
1367
|
waitInQue: true,
|
|
1393
1368
|
driveOptions: {
|
|
@@ -1407,9 +1382,22 @@ async function executeTellaskCall(dlg, mentionList, body, callId, callbacks, opt
|
|
|
1407
1382
|
toolOutputs.push(explicitReplyDelivery);
|
|
1408
1383
|
return toolOutputs;
|
|
1409
1384
|
}
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1412
|
-
|
|
1385
|
+
const fallbackResponse = askBackTellaskeeDriveResult?.lastAssistantSayingContent !== null &&
|
|
1386
|
+
askBackTellaskeeDriveResult?.lastAssistantSayingContent !== undefined &&
|
|
1387
|
+
askBackTellaskeeDriveResult.lastAssistantSayingContent.trim() !== ''
|
|
1388
|
+
? {
|
|
1389
|
+
text: askBackTellaskeeDriveResult.lastAssistantSayingContent,
|
|
1390
|
+
source: 'saying',
|
|
1391
|
+
}
|
|
1392
|
+
: askBackTellaskeeDriveResult?.lastAssistantThinkingContent !== null &&
|
|
1393
|
+
askBackTellaskeeDriveResult?.lastAssistantThinkingContent !== undefined &&
|
|
1394
|
+
askBackTellaskeeDriveResult.lastAssistantThinkingContent.trim() !== ''
|
|
1395
|
+
? {
|
|
1396
|
+
text: askBackTellaskeeDriveResult.lastAssistantThinkingContent,
|
|
1397
|
+
source: 'thinking_only',
|
|
1398
|
+
}
|
|
1399
|
+
: undefined;
|
|
1400
|
+
const responseText = fallbackResponse?.text ?? 'AskerDialog completed without producing output.';
|
|
1413
1401
|
const responseContent = (0, inter_dialog_format_1.formatTellaskResponseContent)({
|
|
1414
1402
|
callName,
|
|
1415
1403
|
callId,
|
|
@@ -1420,6 +1408,7 @@ async function executeTellaskCall(dlg, mentionList, body, callId, callbacks, opt
|
|
|
1420
1408
|
responseBody: responseText,
|
|
1421
1409
|
status: 'completed',
|
|
1422
1410
|
deliveryMode: 'direct_fallback',
|
|
1411
|
+
directFallbackSource: fallbackResponse?.source,
|
|
1423
1412
|
language: (0, work_language_1.getWorkLanguage)(),
|
|
1424
1413
|
});
|
|
1425
1414
|
askBackAskerDialog.setSuspensionState('resumed');
|
|
@@ -1693,6 +1682,13 @@ async function executeTellaskCall(dlg, mentionList, body, callId, callbacks, opt
|
|
|
1693
1682
|
}
|
|
1694
1683
|
if (result.kind === 'existing' && result.replacedPending !== undefined) {
|
|
1695
1684
|
const previousPendingOwner = await resolveDialogWithinRoot(mainDialog, result.previousPendingOwnerId);
|
|
1685
|
+
// Design boundary:
|
|
1686
|
+
// A registered-assignment update is accepted once pending state + asker stack are updated,
|
|
1687
|
+
// but the tellaskee has not necessarily consumed the runtime update prompt yet. Do not
|
|
1688
|
+
// phrase this replacement notice as "delivered to / being handled by the Side Dialog"
|
|
1689
|
+
// unless an assignment anchor for the new call is known; phrase it as superseded +
|
|
1690
|
+
// registered instead. The up-next prompt remains runtime scheduling state, not a durable
|
|
1691
|
+
// redo log.
|
|
1696
1692
|
await finishRegisteredTellaskReplacement({
|
|
1697
1693
|
ownerDialog: previousPendingOwner,
|
|
1698
1694
|
sideDialog: result.sideDialog,
|
|
@@ -1736,6 +1732,10 @@ async function executeTellaskCall(dlg, mentionList, body, callId, callbacks, opt
|
|
|
1736
1732
|
let queuedIntoActiveLoop = false;
|
|
1737
1733
|
let queuedRuntimePrompt = false;
|
|
1738
1734
|
try {
|
|
1735
|
+
// Keep registered assignment updates as in-memory up-next scheduling. This deliberately
|
|
1736
|
+
// avoids turning the queue into a persistence/redo-log protocol: backend restart
|
|
1737
|
+
// recovery should expose loud facts for the LLM to reason from, not pretend this
|
|
1738
|
+
// runtime prompt was durably delivered to the tellaskee before it is consumed.
|
|
1739
1739
|
result.sideDialog.queueRegisteredAssignmentUpdatePrompt({
|
|
1740
1740
|
prompt: resumePrompt.content,
|
|
1741
1741
|
msgId: resumePrompt.msgId,
|
|
@@ -8,6 +8,7 @@ export type KernelDriverDriveOptions = Readonly<{
|
|
|
8
8
|
suppressDiligencePush?: boolean;
|
|
9
9
|
allowResumeFromInterrupted?: boolean;
|
|
10
10
|
resumeInProgressGeneration?: boolean;
|
|
11
|
+
criticalUserInterjectionRuntimeGuide?: string;
|
|
11
12
|
noPromptSideDialogResumeEntitlement?: Readonly<{
|
|
12
13
|
ownerDialogId: string;
|
|
13
14
|
reason: 'reply_tellask_back_delivered';
|
|
@@ -62,7 +63,7 @@ export type KernelDriverDriveCallOptions = Readonly<{
|
|
|
62
63
|
driveOptions: KernelDriverDriveOptions;
|
|
63
64
|
}>;
|
|
64
65
|
export type KernelDriverDriveScheduler = (dialog: Dialog, options: KernelDriverDriveCallOptions) => void;
|
|
65
|
-
export type KernelDriverDriveInvoker = (dialog: Dialog, options: KernelDriverDriveCallOptions) => Promise<void>;
|
|
66
|
+
export type KernelDriverDriveInvoker = (dialog: Dialog, options: KernelDriverDriveCallOptions) => Promise<KernelDriverCoreResult | void>;
|
|
66
67
|
export type KernelDriverDriveCallbacks = Readonly<{
|
|
67
68
|
scheduleDrive: KernelDriverDriveScheduler;
|
|
68
69
|
driveDialog: KernelDriverDriveInvoker;
|
|
@@ -78,7 +79,7 @@ export type KernelDriverDriveArgs = readonly [
|
|
|
78
79
|
waitInQue: boolean,
|
|
79
80
|
driveOptions: KernelDriverDriveOptions
|
|
80
81
|
];
|
|
81
|
-
export type KernelDriverDriveResult = Promise<void>;
|
|
82
|
+
export type KernelDriverDriveResult = Promise<KernelDriverCoreResult | void>;
|
|
82
83
|
export type KernelDriverEmitSayingArgs = [dlg: Dialog, content: string];
|
|
83
84
|
export type KernelDriverEmitSayingResult = Promise<void>;
|
|
84
85
|
export type KernelDriverSupplyResponseArgs = [
|
|
@@ -91,7 +92,8 @@ export type KernelDriverSupplyResponseArgs = [
|
|
|
91
92
|
calleeResponseRef?: {
|
|
92
93
|
course: number;
|
|
93
94
|
genseq: number;
|
|
94
|
-
}
|
|
95
|
+
},
|
|
96
|
+
directFallbackSource?: 'saying' | 'thinking_only'
|
|
95
97
|
];
|
|
96
98
|
export type KernelDriverSupplyResponseResult = Promise<void>;
|
|
97
99
|
export type KernelDriverRunBackendResult = Promise<void>;
|
|
@@ -105,6 +107,8 @@ export type KernelDriverRuntimeState = {
|
|
|
105
107
|
export type KernelDriverCoreResult = {
|
|
106
108
|
lastAssistantSayingContent: string | null;
|
|
107
109
|
lastAssistantSayingGenseq: number | null;
|
|
110
|
+
lastAssistantThinkingContent: string | null;
|
|
111
|
+
lastAssistantThinkingGenseq: number | null;
|
|
108
112
|
lastFunctionCallGenseq: number | null;
|
|
109
113
|
lastAssistantReplyTarget?: KernelDriverSideDialogReplyTarget;
|
|
110
114
|
fbrConclusion?: {
|
package/dist/log.js
CHANGED
|
@@ -78,6 +78,39 @@ const DETAIL_INSPECT_PROFILES = [
|
|
|
78
78
|
maxStringLength: 192,
|
|
79
79
|
},
|
|
80
80
|
];
|
|
81
|
+
const LOG_KEY_PRIORITY = new Map([
|
|
82
|
+
'rootId',
|
|
83
|
+
'selfId',
|
|
84
|
+
'dialogId',
|
|
85
|
+
'course',
|
|
86
|
+
'genseq',
|
|
87
|
+
'callId',
|
|
88
|
+
'questionId',
|
|
89
|
+
'agentId',
|
|
90
|
+
'toolName',
|
|
91
|
+
'provider',
|
|
92
|
+
'model',
|
|
93
|
+
'dialogClass',
|
|
94
|
+
'status',
|
|
95
|
+
'error',
|
|
96
|
+
'detail',
|
|
97
|
+
'message',
|
|
98
|
+
'code',
|
|
99
|
+
'name',
|
|
100
|
+
'type',
|
|
101
|
+
].map((key, index) => [key, index]));
|
|
102
|
+
function compareLogObjectKeys(left, right) {
|
|
103
|
+
const leftPriority = LOG_KEY_PRIORITY.get(left);
|
|
104
|
+
const rightPriority = LOG_KEY_PRIORITY.get(right);
|
|
105
|
+
if (leftPriority !== undefined || rightPriority !== undefined) {
|
|
106
|
+
return (leftPriority ?? Number.MAX_SAFE_INTEGER) - (rightPriority ?? Number.MAX_SAFE_INTEGER);
|
|
107
|
+
}
|
|
108
|
+
const leftInternal = left.startsWith('_') || left.startsWith('__');
|
|
109
|
+
const rightInternal = right.startsWith('_') || right.startsWith('__');
|
|
110
|
+
if (leftInternal !== rightInternal)
|
|
111
|
+
return leftInternal ? 1 : -1;
|
|
112
|
+
return left.localeCompare(right);
|
|
113
|
+
}
|
|
81
114
|
function truncateText(value, maxChars, suffix) {
|
|
82
115
|
if (maxChars <= 0) {
|
|
83
116
|
return { text: '', truncated: value.length > 0 };
|
|
@@ -248,7 +281,7 @@ function pruneForLog(value, profile, depth, seen) {
|
|
|
248
281
|
return { value: `[${ctorName} byteLength=${byteLen}]`, pruned: true };
|
|
249
282
|
}
|
|
250
283
|
const source = value;
|
|
251
|
-
const allKeys = Object.keys(source).sort();
|
|
284
|
+
const allKeys = Object.keys(source).sort(compareLogObjectKeys);
|
|
252
285
|
const visibleKeys = allKeys.slice(0, profile.maxObjectKeys);
|
|
253
286
|
const ctorName = getConstructorName(value);
|
|
254
287
|
const reduced = {};
|
|
@@ -286,7 +319,7 @@ function inspectAdaptive(value, maxChars) {
|
|
|
286
319
|
depth: null,
|
|
287
320
|
breakLength: 120,
|
|
288
321
|
compact: false,
|
|
289
|
-
sorted:
|
|
322
|
+
sorted: false,
|
|
290
323
|
maxArrayLength: profile.maxArrayItems,
|
|
291
324
|
maxStringLength: profile.maxStringLength,
|
|
292
325
|
});
|
package/dist/persistence.js
CHANGED
|
@@ -2573,9 +2573,20 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
|
|
|
2573
2573
|
* Emit stream error for current generation lifecycle (uses active genseq when present)
|
|
2574
2574
|
*/
|
|
2575
2575
|
async streamError(dialog, error) {
|
|
2576
|
-
log_1.log.error(`Dialog stream error '${error}'`, new Error(), { dialog });
|
|
2577
2576
|
const course = dialog.activeGenCourseOrUndefined ?? dialog.currentCourse;
|
|
2578
2577
|
const genseq = dialog.activeGenSeqOrUndefined;
|
|
2578
|
+
log_1.log.error(`Dialog stream error '${error}'`, new Error(), {
|
|
2579
|
+
dialogId: dialog.id.valueOf(),
|
|
2580
|
+
rootId: dialog.id.rootId,
|
|
2581
|
+
selfId: dialog.id.selfId,
|
|
2582
|
+
course,
|
|
2583
|
+
genseq,
|
|
2584
|
+
agentId: dialog.agentId,
|
|
2585
|
+
dialogClass: dialog.constructor.name,
|
|
2586
|
+
status: dialog.status,
|
|
2587
|
+
activeGeneration: dialog.hasActiveGeneration,
|
|
2588
|
+
dialogSnapshot: dialog,
|
|
2589
|
+
});
|
|
2579
2590
|
// Enhanced stream error event with better error classification
|
|
2580
2591
|
const streamErrorEvent = {
|
|
2581
2592
|
type: 'stream_error_evt',
|
|
@@ -32,7 +32,7 @@ async function recoverPendingReplyTellaskCallsForDialog(dialog) {
|
|
|
32
32
|
void dispatchDrive(scheduledDialog, options);
|
|
33
33
|
},
|
|
34
34
|
driveDialog: async (scheduledDialog, options) => {
|
|
35
|
-
await dispatchDrive(scheduledDialog, options);
|
|
35
|
+
return await dispatchDrive(scheduledDialog, options);
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
});
|
|
@@ -9,8 +9,16 @@ export declare function formatNewCourseStartPrompt(language: LanguageCode, args:
|
|
|
9
9
|
source: 'clear_mind' | 'critical_auto_clear';
|
|
10
10
|
}): string;
|
|
11
11
|
export declare function formatDiligenceAutoContinuePrompt(language: LanguageCode, diligenceText: string): string;
|
|
12
|
+
type SideDialogDiligenceVariant = 0 | 1 | 2;
|
|
13
|
+
export declare function formatSideDialogDiligenceAutoContinuePrompt(language: LanguageCode, args: {
|
|
14
|
+
now: Date;
|
|
15
|
+
tellaskContent: string;
|
|
16
|
+
replyToolName: 'replyTellask' | 'replyTellaskSessionless' | 'replyTellaskBack';
|
|
17
|
+
variant: SideDialogDiligenceVariant;
|
|
18
|
+
}): string;
|
|
12
19
|
export declare function formatReminderContextGuide(language: LanguageCode): string;
|
|
13
|
-
export
|
|
20
|
+
export type ReminderContextFollowingDialogState = 'user_message' | 'runtime_notice' | 'none';
|
|
21
|
+
export declare function formatReminderContextFooter(language: LanguageCode, followingState: ReminderContextFollowingDialogState): string;
|
|
14
22
|
export declare function formatReminderItemGuide(language: LanguageCode, reminderId: string, content: string, options?: {
|
|
15
23
|
meta?: unknown;
|
|
16
24
|
scope?: 'dialog' | 'personal' | 'agent_shared';
|
|
@@ -37,9 +45,14 @@ export type ContextHealthV3RemediationGuideArgs = {
|
|
|
37
45
|
promptsTotal: number;
|
|
38
46
|
};
|
|
39
47
|
export declare function formatAgentFacingContextHealthV3RemediationGuide(language: LanguageCode, args: ContextHealthV3RemediationGuideArgs): string;
|
|
48
|
+
export declare function formatAgentFacingCriticalUserInterjectionRemediationGuide(language: LanguageCode, args: {
|
|
49
|
+
dialogScope: ContextHealthV3RemediationDialogScope;
|
|
50
|
+
promptsRemainingAfterThis: number;
|
|
51
|
+
}): string;
|
|
40
52
|
export declare function formatDomindsNoteDirectSelfCall(language: LanguageCode): string;
|
|
41
53
|
export declare function formatDomindsNoteFbrDisabled(language: LanguageCode): string;
|
|
42
54
|
export type FbrToollessViolationKind = 'tellask' | 'tool' | 'tellask_and_tool' | 'internal_error';
|
|
43
55
|
export declare function formatDomindsNoteFbrToollessViolation(language: LanguageCode, args: {
|
|
44
56
|
kind: FbrToollessViolationKind;
|
|
45
57
|
}): string;
|
|
58
|
+
export {};
|
|
@@ -7,6 +7,7 @@ exports.formatRegisteredTellaskTellaskerUpdateNotice = formatRegisteredTellaskTe
|
|
|
7
7
|
exports.formatRegisteredTellaskTellaskeeUpdateNotice = formatRegisteredTellaskTellaskeeUpdateNotice;
|
|
8
8
|
exports.formatNewCourseStartPrompt = formatNewCourseStartPrompt;
|
|
9
9
|
exports.formatDiligenceAutoContinuePrompt = formatDiligenceAutoContinuePrompt;
|
|
10
|
+
exports.formatSideDialogDiligenceAutoContinuePrompt = formatSideDialogDiligenceAutoContinuePrompt;
|
|
10
11
|
exports.formatReminderContextGuide = formatReminderContextGuide;
|
|
11
12
|
exports.formatReminderContextFooter = formatReminderContextFooter;
|
|
12
13
|
exports.formatReminderItemGuide = formatReminderItemGuide;
|
|
@@ -14,6 +15,7 @@ exports.formatQ4HDiligencePushBudgetExhausted = formatQ4HDiligencePushBudgetExha
|
|
|
14
15
|
exports.formatDomindsNoteTellaskForTeammatesOnly = formatDomindsNoteTellaskForTeammatesOnly;
|
|
15
16
|
exports.formatDomindsNoteQ4HRegisterFailed = formatDomindsNoteQ4HRegisterFailed;
|
|
16
17
|
exports.formatAgentFacingContextHealthV3RemediationGuide = formatAgentFacingContextHealthV3RemediationGuide;
|
|
18
|
+
exports.formatAgentFacingCriticalUserInterjectionRemediationGuide = formatAgentFacingCriticalUserInterjectionRemediationGuide;
|
|
17
19
|
exports.formatDomindsNoteDirectSelfCall = formatDomindsNoteDirectSelfCall;
|
|
18
20
|
exports.formatDomindsNoteFbrDisabled = formatDomindsNoteFbrDisabled;
|
|
19
21
|
exports.formatDomindsNoteFbrToollessViolation = formatDomindsNoteFbrToollessViolation;
|
|
@@ -80,12 +82,14 @@ function formatRegisteredTellaskTellaskerUpdateNotice(language) {
|
|
|
80
82
|
if (language === 'zh') {
|
|
81
83
|
return [
|
|
82
84
|
prefix,
|
|
83
|
-
'
|
|
85
|
+
'刚才那轮诉请已被你后续发出的新要求取代;运行时已登记这次更新。',
|
|
86
|
+
'如果目标支线正忙,更新会在下一次安全推进边界进入目标支线;请把目标支线里的更新气泡作为可见确认点。',
|
|
84
87
|
].join('\n');
|
|
85
88
|
}
|
|
86
89
|
return [
|
|
87
90
|
prefix,
|
|
88
|
-
'
|
|
91
|
+
'That earlier request has been superseded by your later updated request; runtime has registered the update.',
|
|
92
|
+
'If the target Side Dialog is busy, the update will enter it at the next safe drive boundary. Use the target Side Dialog update bubble as the visible confirmation point.',
|
|
89
93
|
].join('\n');
|
|
90
94
|
}
|
|
91
95
|
function formatRegisteredTellaskTellaskeeUpdateNotice(language) {
|
|
@@ -151,6 +155,64 @@ function formatDiligenceAutoContinuePrompt(language, diligenceText) {
|
|
|
151
155
|
trimmed,
|
|
152
156
|
].join('\n');
|
|
153
157
|
}
|
|
158
|
+
function truncateSideDialogGoal(goal) {
|
|
159
|
+
const normalized = goal.trim().replace(/\s+/g, ' ');
|
|
160
|
+
if (normalized.length <= 900)
|
|
161
|
+
return normalized;
|
|
162
|
+
return `${normalized.slice(0, 900).trimEnd()}...`;
|
|
163
|
+
}
|
|
164
|
+
function pad2(value) {
|
|
165
|
+
return String(value).padStart(2, '0');
|
|
166
|
+
}
|
|
167
|
+
function formatSideDialogDiligenceTimestamp(language, date) {
|
|
168
|
+
const year = date.getFullYear();
|
|
169
|
+
const month = pad2(date.getMonth() + 1);
|
|
170
|
+
const day = pad2(date.getDate());
|
|
171
|
+
const hour = pad2(date.getHours());
|
|
172
|
+
const minute = pad2(date.getMinutes());
|
|
173
|
+
const second = pad2(date.getSeconds());
|
|
174
|
+
return language === 'zh'
|
|
175
|
+
? `${year} 年 ${month} 月 ${day} 日 ${hour} 时 ${minute} 分 ${second} 秒`
|
|
176
|
+
: `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
|
177
|
+
}
|
|
178
|
+
function formatSideDialogDiligenceAutoContinuePrompt(language, args) {
|
|
179
|
+
const noticePrefix = formatSystemNoticePrefix(language);
|
|
180
|
+
const goal = truncateSideDialogGoal(args.tellaskContent);
|
|
181
|
+
const timestamp = formatSideDialogDiligenceTimestamp(language, args.now);
|
|
182
|
+
const replyCall = `${args.replyToolName}({ replyContent })`;
|
|
183
|
+
if (language === 'zh') {
|
|
184
|
+
const lines = args.variant === 0
|
|
185
|
+
? [
|
|
186
|
+
`${noticePrefix} 现在是 ${timestamp},这是一条支线对话运行时续推指令,不是新的用户诉求。`,
|
|
187
|
+
`请继续完成当前诉请任务;若已经形成可交付结果,必须调用 \`${replyCall}\` 回复诉请者。`,
|
|
188
|
+
]
|
|
189
|
+
: args.variant === 1
|
|
190
|
+
? [
|
|
191
|
+
`${noticePrefix} 现在是 ${timestamp}。当前支线还不能停在空回复或仅确认状态。`,
|
|
192
|
+
`围绕下面的诉请目标继续推进;准备好最终交付后,精确调用 \`${replyCall}\` 回复。`,
|
|
193
|
+
]
|
|
194
|
+
: [
|
|
195
|
+
`${noticePrefix} 当前时间:${timestamp}。系统检测到这条支线需要继续推进。`,
|
|
196
|
+
`请直接执行下一步有效动作,或在结果已完整时调用 \`${replyCall}\` 完成回贴。`,
|
|
197
|
+
];
|
|
198
|
+
return [...lines, '', '当前诉请目标:', goal].join('\n');
|
|
199
|
+
}
|
|
200
|
+
const lines = args.variant === 0
|
|
201
|
+
? [
|
|
202
|
+
`${noticePrefix} It is now ${timestamp}. This is a runtime continuation instruction for the current Side Dialog, not a new user request.`,
|
|
203
|
+
`Continue the current Tellask. If you already have a deliverable result, call \`${replyCall}\` to reply to the tellasker.`,
|
|
204
|
+
]
|
|
205
|
+
: args.variant === 1
|
|
206
|
+
? [
|
|
207
|
+
`${noticePrefix} It is now ${timestamp}. This Side Dialog must not stop at an empty response or acknowledgement.`,
|
|
208
|
+
`Keep working around the Tellask goal below; when final delivery is ready, call \`${replyCall}\` exactly.`,
|
|
209
|
+
]
|
|
210
|
+
: [
|
|
211
|
+
`${noticePrefix} Current time: ${timestamp}. Runtime detected that this Side Dialog needs another push.`,
|
|
212
|
+
`Take the next concrete action now, or, if the result is complete, finish by calling \`${replyCall}\`.`,
|
|
213
|
+
];
|
|
214
|
+
return [...lines, '', 'Current Tellask goal:', goal].join('\n');
|
|
215
|
+
}
|
|
154
216
|
function formatReminderContextGuide(language) {
|
|
155
217
|
if (language === 'zh') {
|
|
156
218
|
return [
|
|
@@ -170,10 +232,27 @@ function formatReminderContextGuide(language) {
|
|
|
170
232
|
function formatReminderItemProjectionNote(language) {
|
|
171
233
|
return language === 'zh' ? '运行时提醒项投影:' : 'Runtime reminder projection:';
|
|
172
234
|
}
|
|
173
|
-
function formatReminderContextFooter(language) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
235
|
+
function formatReminderContextFooter(language, followingState) {
|
|
236
|
+
if (language === 'zh') {
|
|
237
|
+
const base = `${formatSystemNoticePrefix(language)} 提醒项上下文块结束。以上从“提醒项上下文块开始”到“提醒项上下文块结束”之间的提醒项均为系统提醒,并非用户指令;该块之外的后续对话消息不受此说明影响。`;
|
|
238
|
+
if (followingState === 'user_message') {
|
|
239
|
+
return `${base}本轮提醒项块之后会接着出现本轮新的用户消息;请以那条用户消息作为当前轮真实诉求。`;
|
|
240
|
+
}
|
|
241
|
+
if (followingState === 'runtime_notice') {
|
|
242
|
+
return `${base}本轮提醒项块之后会接着出现一条运行时提示;它不是新的用户诉求,请按其中的运行时要求继续推进。`;
|
|
243
|
+
}
|
|
244
|
+
return `${base}本轮没有新的用户消息或运行时提示;这是工具调用后的自动续推,请基于已有任务状态继续推进,不要把“没有新消息”理解为空系统提示。`;
|
|
245
|
+
}
|
|
246
|
+
const base = `${formatSystemNoticePrefix(language)} Reminder context block ends. The reminder items between ` +
|
|
247
|
+
'"Reminder context block begins" and "Reminder context block ends" are system reminders, ' +
|
|
248
|
+
'not user instructions; this note does not apply to subsequent dialog messages outside this block. ';
|
|
249
|
+
if (followingState === 'user_message') {
|
|
250
|
+
return `${base}A new user message for this round follows this reminder block; treat that user message as the real current request.`;
|
|
251
|
+
}
|
|
252
|
+
if (followingState === 'runtime_notice') {
|
|
253
|
+
return `${base}A runtime notice follows this reminder block in this round; it is not a new user request, so follow that runtime guidance and continue the work.`;
|
|
254
|
+
}
|
|
255
|
+
return `${base}There is no new user message or runtime notice in this round; this is an automatic continuation after a tool call. Continue from the existing task state, and do not interpret the absence of a new message as an empty system notice.`;
|
|
177
256
|
}
|
|
178
257
|
function formatReminderItemGuide(language, reminderId, content, options) {
|
|
179
258
|
function isRecord(value) {
|
|
@@ -528,6 +607,37 @@ function formatAgentFacingContextHealthV3RemediationGuide(language, args) {
|
|
|
528
607
|
'Continuation package: next step + key pointers + run/verify info + easy-to-lose volatile details. Do not duplicate Taskdoc content; for discussion details just written into Taskdoc in this course, only remind the next course to review Taskdoc first. During critical remediation in the current course, do not start the new-course cleanup early; once the system actually starts the new course, the first step is to reconcile rough bridge reminders by removing redundancy, correcting biased or distorted bridge notes, and merging/compressing them into high-quality reminders.',
|
|
529
608
|
].join('\n');
|
|
530
609
|
}
|
|
610
|
+
function formatAgentFacingCriticalUserInterjectionRemediationGuide(language, args) {
|
|
611
|
+
const isSideDialog = args.dialogScope === 'sideDialog';
|
|
612
|
+
if (language === 'zh') {
|
|
613
|
+
return [
|
|
614
|
+
`${formatSystemNoticePrefix(language)} 上下文状态:🔴 告急;收到用户插话`,
|
|
615
|
+
'',
|
|
616
|
+
'下面紧跟的是一条真实用户消息,不是普通运行时处置提示;必须把它当作有效用户轮次处理,让用户看到你已经接住了这次插话。',
|
|
617
|
+
'',
|
|
618
|
+
`这次用户轮次已计入告急处置倒计数。系统最多再提醒你 ${args.promptsRemainingAfterThis} 次,之后将自动清理头脑开启新一程对话。`,
|
|
619
|
+
'',
|
|
620
|
+
isSideDialog
|
|
621
|
+
? '行动:先直接回应用户这条插话;不要继续扩张上下文,不要维护差遣牒,也不要整理差遣牒更新提案。若还需要保留接续信息,只维护足够详尽的接续包提醒项,然后尽快 clear_mind。'
|
|
622
|
+
: '行动:先直接回应用户这条插话;不要继续扩张上下文。若仍有当前对话中尚未落实到文档、且下一程需要知会的讨论细节,先落到差遣牒合适章节;再把差遣牒仍未覆盖、但恢复工作会丢的信息新增提醒项带过桥,然后尽快 clear_mind。',
|
|
623
|
+
'',
|
|
624
|
+
'要求:不要因为 critical 状态沉默、挂起或只回复“收到/好的”。若必须调用工具才能回答用户,工具结果回来后继续给出用户可见回复;保持回答聚焦,并把清理/换程作为紧随其后的处置动作。',
|
|
625
|
+
].join('\n');
|
|
626
|
+
}
|
|
627
|
+
return [
|
|
628
|
+
`${formatSystemNoticePrefix(language)} Context state: 🔴 critical; user interjection received`,
|
|
629
|
+
'',
|
|
630
|
+
'The next message is a real user message, not an ordinary runtime remediation notice. Treat it as an effective user turn and make the system reaction visible to the user.',
|
|
631
|
+
'',
|
|
632
|
+
`This user turn has been counted toward critical remediation. System will remind you ${args.promptsRemainingAfterThis} more time(s), then automatically clear mind.`,
|
|
633
|
+
'',
|
|
634
|
+
isSideDialog
|
|
635
|
+
? 'Action: answer this user interjection directly first. Do not expand context, do not maintain Taskdoc, and do not draft Taskdoc update proposals. If continuation info still needs preserving, maintain sufficiently detailed continuation-package reminders only, then clear_mind as soon as possible.'
|
|
636
|
+
: 'Action: answer this user interjection directly first. Do not expand context. If current-dialog discussion details are still undocumented but the next course needs to know them, record them into the appropriate Taskdoc sections first; then add bridge reminders for information still not covered by Taskdoc but easy to lose, and clear_mind as soon as possible.',
|
|
637
|
+
'',
|
|
638
|
+
'Requirement: do not go silent, suspend, or reply only with "acknowledged/ok" because context is critical. If a tool call is necessary to answer the user, continue with a user-visible reply after the tool result returns; keep the answer focused, and perform cleanup/course transition immediately after that.',
|
|
639
|
+
].join('\n');
|
|
640
|
+
}
|
|
531
641
|
function formatDomindsNoteDirectSelfCall(language) {
|
|
532
642
|
if (language === 'zh') {
|
|
533
643
|
return ('错误:不允许通过 `tellask` / `tellaskSessionless` 对当前 agent 发起自诉请。\n' +
|
|
@@ -48,6 +48,7 @@ export type TellaskResponseFormatInput = {
|
|
|
48
48
|
responseBody: string;
|
|
49
49
|
status?: 'completed' | 'failed';
|
|
50
50
|
deliveryMode?: 'reply_tool' | 'direct_fallback';
|
|
51
|
+
directFallbackSource?: 'saying' | 'thinking_only';
|
|
51
52
|
language?: LanguageCode;
|
|
52
53
|
};
|
|
53
54
|
export type TellaskReplacementNoticeFormatInput = {
|
|
@@ -261,9 +261,13 @@ function formatTellaskResponseContent(input) {
|
|
|
261
261
|
const marker = getRuntimeTransferMarker(input);
|
|
262
262
|
const markerPrefix = marker ? `${marker}\n\n` : '';
|
|
263
263
|
const deliveryNotice = input.deliveryMode === 'direct_fallback'
|
|
264
|
-
?
|
|
265
|
-
?
|
|
266
|
-
|
|
264
|
+
? input.directFallbackSource === 'thinking_only'
|
|
265
|
+
? language === 'zh'
|
|
266
|
+
? '> 系统提示:本次回贴未调用 replyTellask* 工具,且模型仅产出 thinking;Dominds 已将该 thinking 内容按 direct-reply fallback 投递,并保留此标记便于追踪。\n\n'
|
|
267
|
+
: '> System note: this reply did not use a replyTellask* tool, and the model only produced thinking. Dominds delivered that thinking content via direct-reply fallback and kept this marker for traceability.\n\n'
|
|
268
|
+
: language === 'zh'
|
|
269
|
+
? '> 系统提示:本次回贴未调用 replyTellask* 工具,Dominds 已按 direct-reply fallback 投递,并保留此标记便于追踪。\n\n'
|
|
270
|
+
: '> System note: this reply did not use a replyTellask* tool. Dominds delivered it via direct-reply fallback and kept this marker for traceability.\n\n'
|
|
267
271
|
: '';
|
|
268
272
|
if (isFbr) {
|
|
269
273
|
const title = language === 'zh' ? '【扪心自问(FBR)支线对话回贴】' : '[FBR Side Dialog response]';
|
|
@@ -707,7 +707,6 @@ async function maybeTriggerImmediateDiligencePrompt(mainDialog) {
|
|
|
707
707
|
const team = await team_1.Team.load();
|
|
708
708
|
const prepared = await (0, runtime_2.maybePrepareDiligenceAutoContinuePrompt)({
|
|
709
709
|
dlg: mainDialog,
|
|
710
|
-
isMainDialog: true,
|
|
711
710
|
remainingBudget: mainDialog.diligencePushRemainingBudget,
|
|
712
711
|
diligencePushMax: resolveMemberDiligencePushMax(team, mainDialog.agentId),
|
|
713
712
|
});
|
|
@@ -114,7 +114,7 @@ async function renderTeamMgmtGuideContent(language, topicsRaw = []) {
|
|
|
114
114
|
'`model_param_options` 可选:用于记录该 provider 支持的 `.minds/team.yaml model_params` 选项(文档用途)。',
|
|
115
115
|
'`apiQuirks` 可选:写在 `providers.<providerKey>.apiQuirks`,类型是 `string|string[]`;需要多个 quirk 时用数组,例如 `apiQuirks: [same-context-empty-response]`。它是 provider 级 transport / 网关兼容开关,用来描述“这个供应商/网关的 API 有非标准行为”,不是 `.minds/team.yaml` 的成员参数,也不是 `model_params`。',
|
|
116
116
|
'使用原则:只有在你确认某个上游网关确实偏离了标准协议,而且 Dominds 已为这个偏差实现了命名 quirk 时才配置;不要把它当作随意调参入口。当前实现里,未知 quirk 值通常不会报错,但也不会带来任何效果。',
|
|
117
|
-
'当前已知示例:OpenAI Responses 包装层支持 `apiQuirks: xcode.best`(或数组里包含它),用于识别 vendor keepalive、处理 xcode.best 特有的失败模式,以及把网关返回的 HTML 版 502 Bad Gateway 错误页和 `500 auth_unavailable: no auth available` 这类基础设施失败归类为 conservative 策略重试。OpenAI-compatible Chat Completions 包装层支持 `apiQuirks: same-context-empty-response`,用于“同一对话 generation 上下文连续返回 empty response
|
|
117
|
+
'当前已知示例:OpenAI Responses 包装层支持 `apiQuirks: xcode.best`(或数组里包含它),用于识别 vendor keepalive、处理 xcode.best 特有的失败模式,以及把网关返回的 HTML 版 502 Bad Gateway 错误页和 `500 auth_unavailable: no auth available` 这类基础设施失败归类为 conservative 策略重试。OpenAI-compatible Chat Completions 包装层支持 `apiQuirks: same-context-empty-response`,用于“同一对话 generation 上下文连续返回 empty response”时先做少量临时重试;支持 `apiQuirks: volcengine-invalid-parameter-aggressive-retry`,用于火山方舟 Coding Plan 偶发 `400 InvalidParameter` 但同 payload 可重放成功的场景,将其归类为 aggressive 策略重试;也支持内置 `kimi-code` provider 使用的 `apiQuirks: kimi-code`,用于 Kimi Code 专用 User-Agent(`KimiCLI/Dominds/<version>`)、`prompt_cache_key` 和 `thinking`/`reasoning_effort` 请求整形。最小示例:\n```yaml\nproviders:\n my_gateway:\n apiType: openai-compatible\n baseUrl: https://example.invalid/v1\n apiKeyEnvVar: MY_GATEWAY_API_KEY\n apiQuirks: same-context-empty-response\n models:\n my_model: { name: "upstream-model-id" }\n```',
|
|
118
118
|
'边界提醒:`apiQuirks` 只影响实现里显式消费它的 provider/generator。就当前实现看,OpenAI Responses 与 OpenAI-compatible 路径会读取它;不要假设所有 `apiType` 都支持或需要它。若配置后行为仍异常,应继续检查上游网关文档、抓流事件类型,并结合 `team_mgmt_check_provider(...)` / 运行日志排查。',
|
|
119
119
|
])
|
|
120
120
|
: fmtHeader('.minds/llm.yaml') +
|
|
@@ -128,7 +128,7 @@ async function renderTeamMgmtGuideContent(language, topicsRaw = []) {
|
|
|
128
128
|
'Optional: `model_param_options` documents `.minds/team.yaml model_params` knobs (documentation only).',
|
|
129
129
|
'`apiQuirks` is optional under `providers.<providerKey>.apiQuirks`, with type `string|string[]`; use an array for multiple quirks, for example `apiQuirks: [same-context-empty-response]`. It is a provider-level transport / gateway compatibility switch for non-standard upstream API behavior. It is not a `.minds/team.yaml` member field and not part of `model_params`.',
|
|
130
130
|
'Use it only when you have confirmed that an upstream gateway deviates from the expected protocol and Dominds has an explicitly named quirk for that deviation. Do not treat it as a generic tuning field. In the current implementation, unknown quirk values are usually ignored rather than rejected, so a typo may silently do nothing.',
|
|
131
|
-
'Known current example: the OpenAI Responses wrapper supports `apiQuirks: xcode.best` (or an array containing it) for vendor keepalive recognition, xcode.best-specific failures, and gateway-returned HTML 502 Bad Gateway plus `500 auth_unavailable: no auth available` infrastructure failures. The OpenAI-compatible Chat Completions wrapper supports `apiQuirks: same-context-empty-response` for repeated empty responses in the same dialog generation context, and `apiQuirks: kimi-code` for the built-in Kimi Code provider request shaping: Dominds User-Agent, `prompt_cache_key`, and `thinking`/`reasoning_effort`. Minimal example:\n```yaml\nproviders:\n my_gateway:\n apiType: openai-compatible\n baseUrl: https://example.invalid/v1\n apiKeyEnvVar: MY_GATEWAY_API_KEY\n apiQuirks: same-context-empty-response\n models:\n my_model: { name: "upstream-model-id" }\n```',
|
|
131
|
+
'Known current example: the OpenAI Responses wrapper supports `apiQuirks: xcode.best` (or an array containing it) for vendor keepalive recognition, xcode.best-specific failures, and gateway-returned HTML 502 Bad Gateway plus `500 auth_unavailable: no auth available` infrastructure failures. The OpenAI-compatible Chat Completions wrapper supports `apiQuirks: same-context-empty-response` for repeated empty responses in the same dialog generation context; `apiQuirks: volcengine-invalid-parameter-aggressive-retry` for Volcano Ark Coding Plan transient `400 InvalidParameter` failures where the same payload can succeed on replay, classified as aggressive retry; and `apiQuirks: kimi-code` for the built-in Kimi Code provider request shaping: `KimiCLI/Dominds/<version>` User-Agent, `prompt_cache_key`, and `thinking`/`reasoning_effort`. Minimal example:\n```yaml\nproviders:\n my_gateway:\n apiType: openai-compatible\n baseUrl: https://example.invalid/v1\n apiKeyEnvVar: MY_GATEWAY_API_KEY\n apiQuirks: same-context-empty-response\n models:\n my_model: { name: "upstream-model-id" }\n```',
|
|
132
132
|
'Boundary reminder: `apiQuirks` only affects providers/generators that explicitly read it in code. In the current implementation, the OpenAI Responses and OpenAI-compatible paths consume it; do not assume every `apiType` supports or needs it. If behavior is still wrong after setting it, continue with upstream gateway docs, raw stream event inspection, and `team_mgmt_check_provider(...)` / runtime logs.',
|
|
133
133
|
]);
|
|
134
134
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominds",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.4",
|
|
4
4
|
"description": "Dominds CLI and aggregation shell for the LongRun AI kernel/runtime packages.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"publishConfig": {
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"ws": "^8.19.0",
|
|
53
53
|
"yaml": "^2.8.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@longrun-ai/kernel": "1.13.1",
|
|
56
55
|
"@longrun-ai/codex-auth": "0.13.0",
|
|
56
|
+
"@longrun-ai/kernel": "1.13.1",
|
|
57
57
|
"@longrun-ai/shell": "1.13.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as isSymbol, c as baseFlatten, g as baseIteratee, k as keys, h as baseFindIndex, j as baseEach, l as arrayMap, m as hasPath, n as castPath, t as toKey, o as baseGet } from "./_baseUniq-
|
|
2
|
-
import { aU as isObject, aC as baseRest, aV as isIterateeCall, aW as keysIn, aX as eq, aY as isArrayLike, aZ as isArray, a_ as identity, a$ as isIndex, b0 as assignValue } from "./index-
|
|
1
|
+
import { e as isSymbol, c as baseFlatten, g as baseIteratee, k as keys, h as baseFindIndex, j as baseEach, l as arrayMap, m as hasPath, n as castPath, t as toKey, o as baseGet } from "./_baseUniq-CsE8Qvwt.js";
|
|
2
|
+
import { aU as isObject, aC as baseRest, aV as isIterateeCall, aW as keysIn, aX as eq, aY as isArrayLike, aZ as isArray, a_ as identity, a$ as isIndex, b0 as assignValue } from "./index-DgfF56L4.js";
|
|
3
3
|
var reWhitespace = /\s/;
|
|
4
4
|
function trimmedEndIndex(string) {
|
|
5
5
|
var index = string.length;
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
map as m,
|
|
194
194
|
toFinite as t
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=_basePickBy-
|
|
196
|
+
//# sourceMappingURL=_basePickBy-DMD1UhXs.js.map
|