dominds 1.8.10 → 1.8.11
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/apps/run-control.d.ts +2 -1
- package/dist/apps/run-control.js +45 -1
- package/dist/apps-host/client.js +16 -0
- package/dist/apps-host/host.js +90 -2
- package/dist/apps-host/ipc-types.d.ts +2 -6
- package/dist/dialog.js +0 -35
- package/dist/docs/app-constitution.md +43 -0
- package/dist/docs/app-constitution.zh.md +43 -0
- package/dist/docs/dialog-system.md +7 -7
- package/dist/docs/dialog-system.zh.md +16 -19
- package/dist/docs/fbr.zh.md +1 -1
- package/dist/docs/tellask-collab.md +1 -0
- package/dist/docs/tellask-collab.zh.md +3 -3
- package/dist/llm/defaults.yaml +45 -3
- package/dist/llm/kernel-driver/flow.js +3 -0
- package/dist/minds/system-prompt.js +74 -66
- package/dist/server/api-routes.js +2 -1
- package/package.json +1 -1
- package/webapp/dist/assets/{_basePickBy-C8hJ6yKK.js → _basePickBy-DG1QTE8n.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-C8hJ6yKK.js.map → _basePickBy-DG1QTE8n.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-DRQfuMfl.js → _baseUniq-D2LbmGtl.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-DRQfuMfl.js.map → _baseUniq-D2LbmGtl.js.map} +1 -1
- package/webapp/dist/assets/{arc-B_wpZocz.js → arc-C9t8aGIF.js} +2 -2
- package/webapp/dist/assets/{arc-B_wpZocz.js.map → arc-C9t8aGIF.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-VXUJARFQ-DXAPwtSX.js → architectureDiagram-VXUJARFQ-JbonIB12.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-VXUJARFQ-DXAPwtSX.js.map → architectureDiagram-VXUJARFQ-JbonIB12.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-VD42YOAC-BIDI5Cy0.js → blockDiagram-VD42YOAC-CcipRrJd.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-VD42YOAC-BIDI5Cy0.js.map → blockDiagram-VD42YOAC-CcipRrJd.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-YG6GDRKO-N_7HPcit.js → c4Diagram-YG6GDRKO-yqrIM2R1.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-YG6GDRKO-N_7HPcit.js.map → c4Diagram-YG6GDRKO-yqrIM2R1.js.map} +1 -1
- package/webapp/dist/assets/{channel-Dzb_rdsn.js → channel-DIBQDm_A.js} +2 -2
- package/webapp/dist/assets/{channel-Dzb_rdsn.js.map → channel-DIBQDm_A.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-XUZD2Pdn.js → chunk-4BX2VUAB-DZXxZ8yl.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-XUZD2Pdn.js.map → chunk-4BX2VUAB-DZXxZ8yl.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-C2UBsTCy.js → chunk-55IACEB6-BUyghx2N.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-C2UBsTCy.js.map → chunk-55IACEB6-BUyghx2N.js.map} +1 -1
- package/webapp/dist/assets/{chunk-B4BG7PRW-DTp6SYXa.js → chunk-B4BG7PRW-wDPTThCF.js} +5 -5
- package/webapp/dist/assets/{chunk-B4BG7PRW-DTp6SYXa.js.map → chunk-B4BG7PRW-wDPTThCF.js.map} +1 -1
- package/webapp/dist/assets/{chunk-DI55MBZ5-DH9L614H.js → chunk-DI55MBZ5-WXYYUPwz.js} +4 -4
- package/webapp/dist/assets/{chunk-DI55MBZ5-DH9L614H.js.map → chunk-DI55MBZ5-WXYYUPwz.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-DHWcMnCh.js → chunk-FMBD7UC4-B4jkxTOS.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-DHWcMnCh.js.map → chunk-FMBD7UC4-B4jkxTOS.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QN33PNHL-BOIBicxV.js → chunk-QN33PNHL-Da7wDGy5.js} +2 -2
- package/webapp/dist/assets/{chunk-QN33PNHL-BOIBicxV.js.map → chunk-QN33PNHL-Da7wDGy5.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-DN1oI6nK.js → chunk-QZHKN3VN-tIIrQvRJ.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-DN1oI6nK.js.map → chunk-QZHKN3VN-tIIrQvRJ.js.map} +1 -1
- package/webapp/dist/assets/{chunk-TZMSLE5B-LJiVG7pu.js → chunk-TZMSLE5B-CQ77jWEa.js} +2 -2
- package/webapp/dist/assets/{chunk-TZMSLE5B-LJiVG7pu.js.map → chunk-TZMSLE5B-CQ77jWEa.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-2ON5EDUG-BGx9XLqP.js → classDiagram-2ON5EDUG-C7QbOVXO.js} +6 -6
- package/webapp/dist/assets/{classDiagram-2ON5EDUG-BGx9XLqP.js.map → classDiagram-2ON5EDUG-C7QbOVXO.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-WZHVMYZB-BGx9XLqP.js → classDiagram-v2-WZHVMYZB-C7QbOVXO.js} +6 -6
- package/webapp/dist/assets/{classDiagram-v2-WZHVMYZB-BGx9XLqP.js.map → classDiagram-v2-WZHVMYZB-C7QbOVXO.js.map} +1 -1
- package/webapp/dist/assets/{clone-CLJ3hkWa.js → clone-CfEeXMBD.js} +2 -2
- package/webapp/dist/assets/{clone-CLJ3hkWa.js.map → clone-CfEeXMBD.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-bTUWYtqm.js → cose-bilkent-S5V4N54A-DYUD07XC.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-bTUWYtqm.js.map → cose-bilkent-S5V4N54A-DYUD07XC.js.map} +1 -1
- package/webapp/dist/assets/{dagre-6UL2VRFP-Dx2-08zX.js → dagre-6UL2VRFP-ByP6tuKY.js} +7 -7
- package/webapp/dist/assets/{dagre-6UL2VRFP-Dx2-08zX.js.map → dagre-6UL2VRFP-ByP6tuKY.js.map} +1 -1
- package/webapp/dist/assets/{diagram-PSM6KHXK-CaqjCMhu.js → diagram-PSM6KHXK-Cy8Pv31D.js} +8 -8
- package/webapp/dist/assets/{diagram-PSM6KHXK-CaqjCMhu.js.map → diagram-PSM6KHXK-Cy8Pv31D.js.map} +1 -1
- package/webapp/dist/assets/{diagram-QEK2KX5R-CNtV7L65.js → diagram-QEK2KX5R-DSIBvajB.js} +7 -7
- package/webapp/dist/assets/{diagram-QEK2KX5R-CNtV7L65.js.map → diagram-QEK2KX5R-DSIBvajB.js.map} +1 -1
- package/webapp/dist/assets/{diagram-S2PKOQOG-KfLA54rd.js → diagram-S2PKOQOG-BWeoKMM5.js} +7 -7
- package/webapp/dist/assets/{diagram-S2PKOQOG-KfLA54rd.js.map → diagram-S2PKOQOG-BWeoKMM5.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-Q2GNP2WA-BxXLN3g7.js → erDiagram-Q2GNP2WA-WyM4XxG5.js} +5 -5
- package/webapp/dist/assets/{erDiagram-Q2GNP2WA-BxXLN3g7.js.map → erDiagram-Q2GNP2WA-WyM4XxG5.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-NV44I4VS-DUcdld8A.js → flowDiagram-NV44I4VS-BPcojI0F.js} +6 -6
- package/webapp/dist/assets/{flowDiagram-NV44I4VS-DUcdld8A.js.map → flowDiagram-NV44I4VS-BPcojI0F.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-JELNMOA3-JnCDigk1.js → ganttDiagram-JELNMOA3-BZ_OjxIx.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-JELNMOA3-JnCDigk1.js.map → ganttDiagram-JELNMOA3-BZ_OjxIx.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-V2S2FVAM-DvCOOMqv.js → gitGraphDiagram-V2S2FVAM-9EhnjL-y.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-V2S2FVAM-DvCOOMqv.js.map → gitGraphDiagram-V2S2FVAM-9EhnjL-y.js.map} +1 -1
- package/webapp/dist/assets/{graph-CrHiw8ie.js → graph-DGSAVvxQ.js} +3 -3
- package/webapp/dist/assets/{graph-CrHiw8ie.js.map → graph-DGSAVvxQ.js.map} +1 -1
- package/webapp/dist/assets/{index-YIaAm3C1.js → index-BRgQnAkx.js} +61 -31
- package/webapp/dist/assets/index-BRgQnAkx.js.map +1 -0
- package/webapp/dist/assets/{infoDiagram-HS3SLOUP-32WFJdCO.js → infoDiagram-HS3SLOUP-ENDcix2A.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-HS3SLOUP-32WFJdCO.js.map → infoDiagram-HS3SLOUP-ENDcix2A.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-XKPGCS4Q-bzp4a134.js → journeyDiagram-XKPGCS4Q-DadnPokT.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-XKPGCS4Q-bzp4a134.js.map → journeyDiagram-XKPGCS4Q-DadnPokT.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-3W4ZIXB7-CKzmE6w4.js → kanban-definition-3W4ZIXB7-BXzaQjPo.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-3W4ZIXB7-CKzmE6w4.js.map → kanban-definition-3W4ZIXB7-BXzaQjPo.js.map} +1 -1
- package/webapp/dist/assets/{layout-1PVvUgz5.js → layout-CRhyA_vK.js} +5 -5
- package/webapp/dist/assets/{layout-1PVvUgz5.js.map → layout-CRhyA_vK.js.map} +1 -1
- package/webapp/dist/assets/{linear-CQxneL9_.js → linear-BeMCt_k6.js} +2 -2
- package/webapp/dist/assets/{linear-CQxneL9_.js.map → linear-BeMCt_k6.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-VGOIOE7T-5d_MpeSf.js → mindmap-definition-VGOIOE7T-DTyAPUbU.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-VGOIOE7T-5d_MpeSf.js.map → mindmap-definition-VGOIOE7T-DTyAPUbU.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-ADFJNKIX-Phz9V9S9.js → pieDiagram-ADFJNKIX-yEqBgoUh.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-ADFJNKIX-Phz9V9S9.js.map → pieDiagram-ADFJNKIX-yEqBgoUh.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-AYHSOK5B-DhY66aqk.js → quadrantDiagram-AYHSOK5B-DCIfL1qA.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-AYHSOK5B-DhY66aqk.js.map → quadrantDiagram-AYHSOK5B-DCIfL1qA.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-UZGBJVZJ-BKCTE3ev.js → requirementDiagram-UZGBJVZJ-BpGpyEPo.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-UZGBJVZJ-BKCTE3ev.js.map → requirementDiagram-UZGBJVZJ-BpGpyEPo.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-TZEHDZUN-CyfeAnll.js → sankeyDiagram-TZEHDZUN-BnLvkpsc.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-TZEHDZUN-CyfeAnll.js.map → sankeyDiagram-TZEHDZUN-BnLvkpsc.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-WL72ISMW-RyK9j-sB.js → sequenceDiagram-WL72ISMW-BIRSMXkN.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-WL72ISMW-RyK9j-sB.js.map → sequenceDiagram-WL72ISMW-BIRSMXkN.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-FKZM4ZOC-DK9GHWGV.js → stateDiagram-FKZM4ZOC-BHl5d1jD.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-FKZM4ZOC-DK9GHWGV.js.map → stateDiagram-FKZM4ZOC-BHl5d1jD.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-4FDKWEC3-CfUBvaXU.js → stateDiagram-v2-4FDKWEC3-CBk1peEJ.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-4FDKWEC3-CfUBvaXU.js.map → stateDiagram-v2-4FDKWEC3-CBk1peEJ.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-IT6M3QCI-CVBZPyrb.js → timeline-definition-IT6M3QCI-DByp3MyR.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-IT6M3QCI-CVBZPyrb.js.map → timeline-definition-IT6M3QCI-DByp3MyR.js.map} +1 -1
- package/webapp/dist/assets/{treemap-GDKQZRPO-BepTQXv6.js → treemap-GDKQZRPO-BiX6BP5A.js} +5 -5
- package/webapp/dist/assets/{treemap-GDKQZRPO-BepTQXv6.js.map → treemap-GDKQZRPO-BiX6BP5A.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-PRI3JC2R-CcskGEOH.js → xychartDiagram-PRI3JC2R-DOgxhO-R.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-PRI3JC2R-CcskGEOH.js.map → xychartDiagram-PRI3JC2R-DOgxhO-R.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
- package/webapp/dist/assets/index-YIaAm3C1.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DomindsAppRunControlContext, DomindsAppRunControlResult } from '@longrun-ai/kernel/app-host-contract';
|
|
1
|
+
import type { DomindsAppRunControlBlock, DomindsAppRunControlContext, DomindsAppRunControlResult } from '@longrun-ai/kernel/app-host-contract';
|
|
2
|
+
export declare function renderAppRunControlBlockForPreDrive(block: DomindsAppRunControlBlock): string;
|
|
2
3
|
export declare function applyAppDialogRunControl(params: {
|
|
3
4
|
controlId: string;
|
|
4
5
|
payload: DomindsAppRunControlContext;
|
package/dist/apps/run-control.js
CHANGED
|
@@ -1,11 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderAppRunControlBlockForPreDrive = renderAppRunControlBlockForPreDrive;
|
|
3
4
|
exports.applyAppDialogRunControl = applyAppDialogRunControl;
|
|
4
5
|
exports.applyRegisteredAppDialogRunControls = applyRegisteredAppDialogRunControls;
|
|
5
6
|
const log_1 = require("../log");
|
|
6
7
|
const dialog_run_controls_1 = require("./dialog-run-controls");
|
|
7
8
|
const runtime_1 = require("./runtime");
|
|
8
9
|
const log = (0, log_1.createLogger)('apps-run-control');
|
|
10
|
+
function formatOwnerRef(block) {
|
|
11
|
+
const owner = block.owner;
|
|
12
|
+
if (owner.kind === 'human')
|
|
13
|
+
return 'the human approver';
|
|
14
|
+
return owner.memberId;
|
|
15
|
+
}
|
|
16
|
+
function formatTargetRef(block) {
|
|
17
|
+
return block.targetRef.title ?? block.targetRef.id;
|
|
18
|
+
}
|
|
19
|
+
function canProjectAwaitAppAction(block) {
|
|
20
|
+
if (block.actionClass === 'select') {
|
|
21
|
+
return Array.isArray(block.optionsSummary) && block.optionsSummary.length > 0;
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
function projectAppActionLabel(block) {
|
|
26
|
+
if (block.actionClass === 'input')
|
|
27
|
+
return 'Provide information';
|
|
28
|
+
if (block.actionClass === 'confirm')
|
|
29
|
+
return 'Confirm and continue';
|
|
30
|
+
return 'Choose an option';
|
|
31
|
+
}
|
|
32
|
+
function renderAppRunControlBlockForPreDrive(block) {
|
|
33
|
+
if (block.blockKind === 'await_members') {
|
|
34
|
+
const waitingList = block.waitingFor.map((entry) => entry.memberId).join(', ');
|
|
35
|
+
return `Blocked while waiting for ${waitingList} on ${formatTargetRef(block)}. ${block.promptSummary}`;
|
|
36
|
+
}
|
|
37
|
+
if (block.blockKind === 'await_human') {
|
|
38
|
+
const suffix = block.question ?? block.promptSummary;
|
|
39
|
+
return `Blocked: human input is required for ${formatTargetRef(block)}. ${suffix}`;
|
|
40
|
+
}
|
|
41
|
+
if (!canProjectAwaitAppAction(block)) {
|
|
42
|
+
return `View problem details. ${block.title}: ${block.promptSummary}`;
|
|
43
|
+
}
|
|
44
|
+
return `${projectAppActionLabel(block)} via ${formatOwnerRef(block)} for ${formatTargetRef(block)}. ${block.promptSummary}`;
|
|
45
|
+
}
|
|
9
46
|
async function applyAppDialogRunControl(params) {
|
|
10
47
|
const controlId = params.controlId.trim();
|
|
11
48
|
if (controlId === '') {
|
|
@@ -19,6 +56,7 @@ async function applyAppDialogRunControl(params) {
|
|
|
19
56
|
return await hostClient.applyRunControl(controlId, params.payload);
|
|
20
57
|
}
|
|
21
58
|
async function applyRegisteredAppDialogRunControls(payload) {
|
|
59
|
+
let recoveryAction;
|
|
22
60
|
for (const control of (0, dialog_run_controls_1.listAppDialogRunControls)()) {
|
|
23
61
|
let result;
|
|
24
62
|
try {
|
|
@@ -42,6 +80,12 @@ async function applyRegisteredAppDialogRunControls(payload) {
|
|
|
42
80
|
if (result.kind === 'reject') {
|
|
43
81
|
return result;
|
|
44
82
|
}
|
|
83
|
+
if (result.kind === 'block') {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
if (recoveryAction === undefined && result.recoveryAction !== undefined) {
|
|
87
|
+
recoveryAction = result.recoveryAction;
|
|
88
|
+
}
|
|
45
89
|
}
|
|
46
|
-
return { kind: '
|
|
90
|
+
return recoveryAction ? { kind: 'allow', recoveryAction } : { kind: 'allow' };
|
|
47
91
|
}
|
package/dist/apps-host/client.js
CHANGED
|
@@ -100,6 +100,22 @@ function parseMessageToKernel(v) {
|
|
|
100
100
|
const callId = asString(v['callId']);
|
|
101
101
|
if (!callId)
|
|
102
102
|
throw new Error('Invalid run_control_result message: callId required');
|
|
103
|
+
const ok = v['ok'];
|
|
104
|
+
if (ok === true) {
|
|
105
|
+
return {
|
|
106
|
+
type,
|
|
107
|
+
callId,
|
|
108
|
+
ok: true,
|
|
109
|
+
result: v['result'],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if (ok === false) {
|
|
113
|
+
const errorText = asString(v['errorText']);
|
|
114
|
+
if (!errorText) {
|
|
115
|
+
throw new Error('Invalid run_control_result message: errorText required when ok=false');
|
|
116
|
+
}
|
|
117
|
+
return { type, callId, ok: false, errorText };
|
|
118
|
+
}
|
|
103
119
|
return v;
|
|
104
120
|
}
|
|
105
121
|
throw new Error(`Invalid IPC message from apps-host: unknown type '${type}'`);
|
package/dist/apps-host/host.js
CHANGED
|
@@ -298,12 +298,100 @@ function validateHostInstance(host, appId) {
|
|
|
298
298
|
function isValidRunControlResult(result) {
|
|
299
299
|
if (!isRecord(result))
|
|
300
300
|
return false;
|
|
301
|
+
if (result['kind'] === 'allow') {
|
|
302
|
+
const recoveryAction = result['recoveryAction'];
|
|
303
|
+
if (recoveryAction === undefined)
|
|
304
|
+
return true;
|
|
305
|
+
if (!isRecord(recoveryAction))
|
|
306
|
+
return false;
|
|
307
|
+
return (recoveryAction['actionId'] === 'continue' &&
|
|
308
|
+
typeof recoveryAction['promptSummary'] === 'string' &&
|
|
309
|
+
recoveryAction['promptSummary'].trim() !== '');
|
|
310
|
+
}
|
|
301
311
|
if (result['kind'] === 'reject') {
|
|
302
312
|
return typeof result['errorText'] === 'string' && result['errorText'].trim() !== '';
|
|
303
313
|
}
|
|
304
|
-
if (result['kind'] !== '
|
|
314
|
+
if (result['kind'] !== 'block')
|
|
305
315
|
return false;
|
|
306
|
-
return
|
|
316
|
+
return isValidRunControlBlock(result['block']);
|
|
317
|
+
}
|
|
318
|
+
function isValidRunControlBlock(block) {
|
|
319
|
+
if (!isRecord(block))
|
|
320
|
+
return false;
|
|
321
|
+
if (!isValidRunControlOwner(block['owner']))
|
|
322
|
+
return false;
|
|
323
|
+
if (!isValidRunControlTargetRef(block['targetRef']))
|
|
324
|
+
return false;
|
|
325
|
+
if (typeof block['title'] !== 'string' || block['title'].trim() === '')
|
|
326
|
+
return false;
|
|
327
|
+
if (typeof block['promptSummary'] !== 'string' || block['promptSummary'].trim() === '') {
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
330
|
+
if (block['blockKind'] === 'await_members') {
|
|
331
|
+
return isValidRunControlMemberRefs(block['waitingFor']) && block['waitingFor'].length > 0;
|
|
332
|
+
}
|
|
333
|
+
if (block['blockKind'] === 'await_human') {
|
|
334
|
+
const question = block['question'];
|
|
335
|
+
const optionsSummary = block['optionsSummary'];
|
|
336
|
+
if (question !== undefined && (typeof question !== 'string' || question.trim() === ''))
|
|
337
|
+
return false;
|
|
338
|
+
return optionsSummary === undefined || isStringArray(optionsSummary);
|
|
339
|
+
}
|
|
340
|
+
if (block['blockKind'] === 'await_app_action') {
|
|
341
|
+
if (block['actionClass'] !== 'input' &&
|
|
342
|
+
block['actionClass'] !== 'select' &&
|
|
343
|
+
block['actionClass'] !== 'confirm') {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
if (typeof block['actionId'] !== 'string' || block['actionId'].trim() === '')
|
|
347
|
+
return false;
|
|
348
|
+
if (block['resolutionMode'] !== 'explicit_continue' &&
|
|
349
|
+
block['resolutionMode'] !== 'auto_resume') {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
return block['optionsSummary'] === undefined || isStringArray(block['optionsSummary']);
|
|
353
|
+
}
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
function isValidRunControlOwner(owner) {
|
|
357
|
+
if (!isRecord(owner))
|
|
358
|
+
return false;
|
|
359
|
+
if (owner['kind'] === 'human')
|
|
360
|
+
return true;
|
|
361
|
+
if (owner['kind'] !== 'member')
|
|
362
|
+
return false;
|
|
363
|
+
if (typeof owner['memberId'] !== 'string' || owner['memberId'].trim() === '')
|
|
364
|
+
return false;
|
|
365
|
+
return owner['roleIds'] === undefined || isStringArray(owner['roleIds']);
|
|
366
|
+
}
|
|
367
|
+
function isValidRunControlTargetRef(targetRef) {
|
|
368
|
+
if (!isRecord(targetRef))
|
|
369
|
+
return false;
|
|
370
|
+
const kind = targetRef['kind'];
|
|
371
|
+
if (kind !== 'taskdoc' &&
|
|
372
|
+
kind !== 'phase' &&
|
|
373
|
+
kind !== 'gate' &&
|
|
374
|
+
kind !== 'change' &&
|
|
375
|
+
kind !== 'role' &&
|
|
376
|
+
kind !== 'member') {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
if (typeof targetRef['id'] !== 'string' || targetRef['id'].trim() === '')
|
|
380
|
+
return false;
|
|
381
|
+
if (targetRef['title'] === undefined)
|
|
382
|
+
return true;
|
|
383
|
+
return typeof targetRef['title'] === 'string' && targetRef['title'].trim() !== '';
|
|
384
|
+
}
|
|
385
|
+
function isValidRunControlMemberRefs(value) {
|
|
386
|
+
if (!Array.isArray(value))
|
|
387
|
+
return false;
|
|
388
|
+
return value.every((entry) => {
|
|
389
|
+
if (!isRecord(entry))
|
|
390
|
+
return false;
|
|
391
|
+
if (typeof entry['memberId'] !== 'string' || entry['memberId'].trim() === '')
|
|
392
|
+
return false;
|
|
393
|
+
return entry['roleIds'] === undefined || isStringArray(entry['roleIds']);
|
|
394
|
+
});
|
|
307
395
|
}
|
|
308
396
|
async function initOnce(msg) {
|
|
309
397
|
for (const app of msg.apps) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DomindsAppRunControlResult } from '@longrun-ai/kernel/app-host-contract';
|
|
1
2
|
import type { DomindsAppDialogReminderRequestBatch, DomindsAppHostReminderUpdateResult, DomindsAppInstallJsonV1, DomindsAppReminderApplyRequest, DomindsAppReminderApplyResult, DomindsAppReminderState } from '@longrun-ai/kernel/app-json';
|
|
2
3
|
import type { LanguageCode } from '@longrun-ai/kernel/types/language';
|
|
3
4
|
import type { ChatMessage } from '../llm/client';
|
|
@@ -180,12 +181,7 @@ export type AppsHostRunControlResultMessage = Readonly<{
|
|
|
180
181
|
callId: string;
|
|
181
182
|
} & (Readonly<{
|
|
182
183
|
ok: true;
|
|
183
|
-
result:
|
|
184
|
-
kind: 'continue';
|
|
185
|
-
}> | Readonly<{
|
|
186
|
-
kind: 'reject';
|
|
187
|
-
errorText: string;
|
|
188
|
-
}>;
|
|
184
|
+
result: DomindsAppRunControlResult;
|
|
189
185
|
}> | Readonly<{
|
|
190
186
|
ok: false;
|
|
191
187
|
errorText: string;
|
package/dist/dialog.js
CHANGED
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.DialogStore = exports.RootDialog = exports.SubDialog = exports.Dialog = exports.DialogID = void 0;
|
|
37
4
|
const util_1 = require("util");
|
|
@@ -838,8 +805,6 @@ class Dialog {
|
|
|
838
805
|
runControl: runControlSpec,
|
|
839
806
|
});
|
|
840
807
|
}
|
|
841
|
-
const { notifyWaitingDialogsOfClearedMind } = await Promise.resolve().then(() => __importStar(require('./course-transition')));
|
|
842
|
-
await notifyWaitingDialogsOfClearedMind(this);
|
|
843
808
|
}
|
|
844
809
|
// Proxy methods for DialogStore - route calls through dialog object instead of direct dlgStore access
|
|
845
810
|
async receiveFuncResult(result) {
|
|
@@ -248,6 +248,49 @@ If the root manifest / team config uses the wrong app id (for example, still dec
|
|
|
248
248
|
|
|
249
249
|
So even without `<rtws>/.apps/configuration.yaml` or `<rtws>/.apps/resolution.yaml`, as long as `.minds/app.yaml` declares dependencies, the kernel still resolves local apps via the default strategy; if the root manifest has no dependencies, the effective enabled apps set is empty.
|
|
250
250
|
|
|
251
|
+
### `phase-gate` first slice: frozen decisions
|
|
252
|
+
|
|
253
|
+
The following frozen decisions exist to let `phase-gate` become the first recommended TypeScript app without prematurely turning the whole change-governance space into a generic engine. The goal here is to freeze the smallest set of boundaries that would otherwise keep churning kernel contracts, host projection, product recovery actions, and user-facing copy.
|
|
254
|
+
|
|
255
|
+
This first slice only covers a single change moving through `intake -> routing -> advancement`, plus the two high-value product states `blocked` and `exception in progress`. The only loops included for the first slice are `blocking follow-up`, `exception handling`, and `rollback/recovery`. The first-slice object model stays limited to `change dossier`, `governance decision`, `recovery action`, and `route context`.
|
|
256
|
+
|
|
257
|
+
#### `Routing` must produce required governance semantics
|
|
258
|
+
|
|
259
|
+
- `Routing` is not merely “record that the change entered the flow”. It must produce the minimum business truth needed for later governance.
|
|
260
|
+
- For the first slice, that truth must include at least:
|
|
261
|
+
- the current governance intensity (for example large/medium/small, or an equivalent tiering),
|
|
262
|
+
- the responsibility boundary (who may continue by default, and who has blocking/approval authority),
|
|
263
|
+
- whether the default advancement path is allowed.
|
|
264
|
+
- These semantics should live inside the existing `route context + governance decision` surface. Do not introduce a fifth first-slice object just to carry them.
|
|
265
|
+
- Once the flow enters `exception in progress`, the decision must also carry scope, time limit, approving responsibility, and compensating action(s); otherwise a constrained exception degrades into an ungoverned bypass.
|
|
266
|
+
|
|
267
|
+
#### Minimal formal input contract for `pre-drive decision -> host projection`
|
|
268
|
+
|
|
269
|
+
- The key first-slice contract is not “push app-private vocabulary into kernel”. It is to freeze how an app expresses whether the host may continue driving.
|
|
270
|
+
- The target direction should widen the current `continue | reject` shape into a formal surface that can express `allow / reject / block`; and for now `block` should carry only mechanism-level orchestration primitives such as `await_members`, `await_human`, and `await_app_action`.
|
|
271
|
+
- For `await_app_action`, the app must provide at least the following stable fields before the host may project it into a product-level recovery action:
|
|
272
|
+
- `actionClass`
|
|
273
|
+
- `actionId`
|
|
274
|
+
- `owner`
|
|
275
|
+
- `resolutionMode`
|
|
276
|
+
- `targetRef`
|
|
277
|
+
- enough target/summary material such as `title`, `promptSummary`, and, for `select`, `optionsSummary`
|
|
278
|
+
- Admission responsibility belongs to host projection: the app provides structured material; the host decides whether the material is sufficient for a concrete recovery action or must be uniformly downgraded to the fallback diagnostic path.
|
|
279
|
+
- This contract should be frozen before implementation starts. `dominds/packages/kernel/src/app-host-contract.ts` still exposes `DomindsAppRunControlResult` as only `continue | reject`, while existing `phase-gate` contract tests already depend on richer blocked / primary-action structures. That gap is the current hard blocker.
|
|
280
|
+
|
|
281
|
+
#### `Resume advancement` is a product action, not an implicit state jump
|
|
282
|
+
|
|
283
|
+
- The first slice must expose one explicit, product-level recovery action: `resume advancement`.
|
|
284
|
+
- The reason is simple: `blocking follow-up`, `exception handling`, and `rollback/recovery` only cover “handle the abnormal condition first”. They do not answer “how does the user clearly re-enter the main path once the abnormal condition is resolved?”
|
|
285
|
+
- So after follow-up is completed, an exception is granted/closed, or recovery finishes, host projection must be able to surface a clear “you may now resume advancement” action, instead of hiding that step inside a silent state transition or an implementation detail.
|
|
286
|
+
|
|
287
|
+
#### Unified fallback label: `View problem details`
|
|
288
|
+
|
|
289
|
+
- When the app does not provide enough structured material to form a concrete recovery action, the product layer must not surface hollow action classes or implementation placeholders. It should uniformly downgrade to the `inspect_problem` path.
|
|
290
|
+
- The default external label for that path is now fixed as: `View problem details`.
|
|
291
|
+
- Internal identifiers such as `inspect_problem`, `select`, `confirm`, `input`, `driver`, `wiring`, and `host adapter` should not appear in user-facing primary sentences by default.
|
|
292
|
+
- If implementation keeps internal names such as `input`, the projected user copy should still say something like “Provide information” or “Fill in information”, not the raw internal identifier.
|
|
293
|
+
|
|
251
294
|
## App-provided `.minds/**` assets
|
|
252
295
|
|
|
253
296
|
### Asset types and goals
|
|
@@ -247,6 +247,49 @@ Install JSON 是 app 与 Kernel/CLI 之间的**安装/运行握手载荷**。它
|
|
|
247
247
|
|
|
248
248
|
因此,即使缺少 `<rtws>/.apps/configuration.yaml` 或 `<rtws>/.apps/resolution.yaml`,只要 `.minds/app.yaml` 声明了依赖,Kernel 仍会按默认策略去解析本地 app;反之若根 manifest 没有依赖,则最终已启用 app 集合为空。
|
|
249
249
|
|
|
250
|
+
### `phase-gate` 第一拍最小纵切:冻结说明
|
|
251
|
+
|
|
252
|
+
以下冻结点服务于 `phase-gate` 作为首个推荐 TypeScript app 的第一拍落地。它们不是要一次性把通用 change-governance 引擎做完,而是先把会反复影响 kernel contract、host projection、产品恢复动作与用户文案的最小边界钉死。
|
|
253
|
+
|
|
254
|
+
当前第一拍只覆盖单个 change 的 `进入 -> 定向 -> 推进` 主链路,以及 `已阻断` / `例外处理中` 两个高价值主状态;小循环仅先纳入 `阻断补料`、`豁免`、`回退/恢复`。首拍对象收口为:`change dossier`、`governance decision`、`recovery action`、`route context`。
|
|
255
|
+
|
|
256
|
+
#### `定向` 的必填语义
|
|
257
|
+
|
|
258
|
+
- `定向` 不是“登记一下 change 已进入流程”,而是必须产出后续治理所需的最小业务真相。
|
|
259
|
+
- 对第一拍而言,这些真相至少包括:
|
|
260
|
+
- 当前治理强度(例如大/中/小,或等价分级);
|
|
261
|
+
- 责任边界(谁可默认推进,谁有阻断/批准职责);
|
|
262
|
+
- 是否允许继续沿默认推进路径前进。
|
|
263
|
+
- 这些语义应落在现有 `route context + governance decision` 内,不应再新造“第五类对象”。
|
|
264
|
+
- 一旦进入 `例外处理中`,该 decision 还必须同时带出范围、时效、批准责任与补偿动作;否则“受约束的例外”会退化成“临时放行的口子”。
|
|
265
|
+
|
|
266
|
+
#### `pre-drive decision -> host projection` 的最小正式输入 contract
|
|
267
|
+
|
|
268
|
+
- `phase-gate` 第一拍的关键 contract 不是把 app 私有业务词汇直接塞进 kernel,而是冻结 app 如何把“是否允许继续 drive”表达给 host。
|
|
269
|
+
- 目标方向应从当前过窄的 `continue | reject`,收口到能表达 `allow / reject / block` 的正式输入面;其中 `block` 只先承载机制级 orchestration primitives,例如 `await_members`、`await_human`、`await_app_action`。
|
|
270
|
+
- 对 `await_app_action`,app 至少要提供这些稳定字段,host 才能把它投影成产品级恢复动作:
|
|
271
|
+
- `actionClass`
|
|
272
|
+
- `actionId`
|
|
273
|
+
- `owner`
|
|
274
|
+
- `resolutionMode`
|
|
275
|
+
- `targetRef`
|
|
276
|
+
- 足够的目标/摘要材料,例如 `title`、`promptSummary`,以及 `select` 场景所需的 `optionsSummary`
|
|
277
|
+
- 准入责任在 host projection:app 负责提供结构化材料,host 负责判断这些材料是否足以形成明确恢复动作,并决定是投影为产品级动作,还是统一降级到兜底诊断路径。
|
|
278
|
+
- 这层 contract 冻结前,不宜直接开做第一拍实现。当前 `dominds/packages/kernel/src/app-host-contract.ts` 里的 `DomindsAppRunControlResult` 仍只有 `continue | reject`,而现有 `phase-gate` contract tests 已经依赖更丰富的 blocked / primary-action 结构,这正是当前需要先补齐的硬缺口。
|
|
279
|
+
|
|
280
|
+
#### `继续推进` 是统一恢复动作,不是隐含状态跳转
|
|
281
|
+
|
|
282
|
+
- 第一拍产品面必须存在一个显式的统一恢复动作:`继续推进`。
|
|
283
|
+
- 原因很直接:`阻断补料`、`豁免`、`回退/恢复` 只覆盖“先处理异常”,并不自动回答“异常处理完后如何回挂主链路”。
|
|
284
|
+
- 因此,补料完成、豁免决议落定、或恢复动作完成之后,host projection 必须能够给出“现在可以继续推进”的明确动作,而不是把这一步隐含在状态切换或实现细节里。
|
|
285
|
+
|
|
286
|
+
#### 统一兜底文案:`查看问题详情`
|
|
287
|
+
|
|
288
|
+
- 当 app 提供的材料不足以形成明确恢复动作时,产品层不得显示空心动作类或实现占位词,而应统一降级到 `inspect_problem` 路径。
|
|
289
|
+
- 该路径的对外默认文案现在就固定为:`查看问题详情`。
|
|
290
|
+
- `inspect_problem`、`select`、`confirm`、`input`、`driver`、`wiring`、`host adapter` 等内部实现词,默认不进入用户主句。
|
|
291
|
+
- 若实现层保留 `input` 之类内部类名,对外文案也应投影成“提供信息 / 填写信息”一类用户可理解表达,而不是直接暴露内部标识。
|
|
292
|
+
|
|
250
293
|
## App 可提供的 `.minds/**` 资产
|
|
251
294
|
|
|
252
295
|
### 资产类型与目标
|
|
@@ -151,11 +151,11 @@ This section documents the three distinct types of teammate Tellasks in the Domi
|
|
|
151
151
|
|
|
152
152
|
```mermaid
|
|
153
153
|
flowchart TD
|
|
154
|
-
M[LLM emits tellaskSessionless(
|
|
155
|
-
Q -- yes --> A[TYPE A: TellaskBack<br/>(
|
|
154
|
+
M["LLM emits tellaskSessionless(...)"] --> Q{"Is this a subdialog Tellasking its direct supdialog (tellasker dialog for TYPE A)?"}
|
|
155
|
+
Q -- yes --> A["TYPE A: TellaskBack<br/>(TellaskBack)<br/>Primary: tellaskBack(...) (NO sessionSlug)"]
|
|
156
156
|
Q -- no --> T{Is sessionSlug present?}
|
|
157
|
-
T -- yes --> B[TYPE B: Registered subdialog Tellask<br/>(
|
|
158
|
-
T -- no --> C[TYPE C: Transient subdialog Tellask<br/>(
|
|
157
|
+
T -- yes --> B["TYPE B: Registered subdialog Tellask<br/>(Tellask Session / Registered Session Tellask)<br/>tellask(..., sessionSlug=...)"]
|
|
158
|
+
T -- no --> C["TYPE C: Transient subdialog Tellask<br/>(Fresh Tellask / One-shot Tellask)<br/>tellaskSessionless(...)"]
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
### TYPE A: TellaskBack (Type A / `TellaskBack`)
|
|
@@ -383,7 +383,7 @@ The Dominds dialog system is built on four interconnected core mechanisms that w
|
|
|
383
383
|
```mermaid
|
|
384
384
|
flowchart TD
|
|
385
385
|
H[Dialog hierarchy<br/>(root ↔ subdialogs)] <--> S[Subdialog supply<br/>(responses, pending list, registry)]
|
|
386
|
-
H --> Q[Q4H (askHuman(
|
|
386
|
+
H --> Q["Q4H (askHuman(...))<br/>(q4h.yaml index)"]
|
|
387
387
|
S --> Q
|
|
388
388
|
|
|
389
389
|
Q --> UI[Frontend Q4H panel<br/>(questions_count_update)]
|
|
@@ -839,7 +839,7 @@ researcher!market-analysis:
|
|
|
839
839
|
|
|
840
840
|
```mermaid
|
|
841
841
|
flowchart TD
|
|
842
|
-
Tellask[TYPE B Tellask: tellask(
|
|
842
|
+
Tellask["TYPE B Tellask: tellask(..., sessionSlug=...)"] --> Key[Compute key: agentId!sessionSlug]
|
|
843
843
|
Key --> Lookup{Registry hit?}
|
|
844
844
|
Lookup -- yes --> Resume[Restore + drive existing subdialog]
|
|
845
845
|
Lookup -- no --> Create[Create + register + drive new subdialog]
|
|
@@ -1254,7 +1254,7 @@ sequenceDiagram
|
|
|
1254
1254
|
|
|
1255
1255
|
```mermaid
|
|
1256
1256
|
flowchart TD
|
|
1257
|
-
A[askHuman(
|
|
1257
|
+
A["askHuman(...) Tellask emitted"] --> B[Append HumanQuestion entry to q4h.yaml]
|
|
1258
1258
|
B --> C[Emit questions_count_update]
|
|
1259
1259
|
C --> D[UI shows Q4H badge / list]
|
|
1260
1260
|
D --> E{How is it cleared?}
|
|
@@ -150,11 +150,11 @@
|
|
|
150
150
|
|
|
151
151
|
```mermaid
|
|
152
152
|
flowchart TD
|
|
153
|
-
M[LLM 发出 tellaskSessionless(
|
|
154
|
-
Q -- 是 --> A[TYPE A:回问诉请<br
|
|
153
|
+
M["LLM 发出 tellaskSessionless(...)"] --> Q{"这是子对话回问其直接上位对话(TYPE A 的诉请者对话)吗?"}
|
|
154
|
+
Q -- 是 --> A["TYPE A:回问诉请<br/>主要:tellaskBack(...)(无 sessionSlug)"]
|
|
155
155
|
Q -- 否 --> T{是否存在 sessionSlug?}
|
|
156
|
-
T -- 是 --> B[TYPE B:已注册子对话诉请<br/>(长线诉请)<br/>tellask(
|
|
157
|
-
T -- 否 --> C[TYPE C:瞬态子对话诉请<br/>(一次性诉请)<br/>tellaskSessionless(
|
|
156
|
+
T -- 是 --> B["TYPE B:已注册子对话诉请<br/>(长线诉请)<br/>tellask(..., sessionSlug=...)"]
|
|
157
|
+
T -- 否 --> C["TYPE C:瞬态子对话诉请<br/>(一次性诉请)<br/>tellaskSessionless(...)"]
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
### TYPE A:回问诉请
|
|
@@ -179,9 +179,9 @@ flowchart TD
|
|
|
179
179
|
|
|
180
180
|
**支线交付规则(规范)**:
|
|
181
181
|
|
|
182
|
-
-
|
|
182
|
+
- 只有当所有目标完成时,支线对话才可直接正常回复诉请者对话。
|
|
183
183
|
- 若任何目标未完成或关键信息缺失,必须先用 `tellaskBack({ tellaskContent: "..." })` 回问诉请者对话再继续。
|
|
184
|
-
- **FBR 例外**:FBR 支线对话禁止任何诉请(包括 `tellaskBack
|
|
184
|
+
- **FBR 例外**:FBR 支线对话禁止任何诉请(包括 `tellaskBack`),只能列出缺口与阻塞原因并直接回复。
|
|
185
185
|
|
|
186
186
|
**跨对话传递与标记(强制)**:
|
|
187
187
|
|
|
@@ -364,7 +364,7 @@ Dominds 对话系统建立在四个相互关联的核心机制之上,这些机
|
|
|
364
364
|
```mermaid
|
|
365
365
|
flowchart TD
|
|
366
366
|
H[对话层级<br/>(root ↔ 子对话)] <--> S[子对话供应<br/>(响应、待处理列表、注册表)]
|
|
367
|
-
H --> Q[Q4H
|
|
367
|
+
H --> Q["Q4H(askHuman(...))<br/>(q4h.yaml 索引)"]
|
|
368
368
|
S --> Q
|
|
369
369
|
|
|
370
370
|
Q --> UI[前端 Q4H 面板<br/>(questions_count_update)]
|
|
@@ -437,7 +437,7 @@ sequenceDiagram
|
|
|
437
437
|
|
|
438
438
|
D->>P: 将 HumanQuestion 条目追加到 q4h.yaml(索引)
|
|
439
439
|
D-->>UI: questions_count_update
|
|
440
|
-
|
|
440
|
+
Note over D: 对话在回答之前变为不可驱动
|
|
441
441
|
|
|
442
442
|
UI->>WS: drive_dialog_by_user_answer(questionId, content)
|
|
443
443
|
WS->>P: 从 q4h.yaml 中删除问题(如果为空则删除文件)
|
|
@@ -814,7 +814,7 @@ researcher!market-analysis:
|
|
|
814
814
|
|
|
815
815
|
```mermaid
|
|
816
816
|
flowchart TD
|
|
817
|
-
Tellask[TYPE B 长线诉请: tellask(
|
|
817
|
+
Tellask["TYPE B 长线诉请: tellask(..., sessionSlug=...)"] --> Key[计算键:agentId!sessionSlug]
|
|
818
818
|
Key --> Lookup{注册表命中?}
|
|
819
819
|
Lookup -- 是 --> Resume[恢复 + 驱动现有子对话]
|
|
820
820
|
Lookup -- 否 --> Create[创建 + 注册 + 驱动新的子对话]
|
|
@@ -1161,8 +1161,8 @@ flowchart TD
|
|
|
1161
1161
|
B -- 否 --> S[已暂停\\n(等待 Q4H 和/或子对话)]
|
|
1162
1162
|
S -->|Q4H 回答\\n或子对话响应供应| C{需要驱动?}
|
|
1163
1163
|
B -- 是 --> C{需要驱动?}
|
|
1164
|
-
C -- 否 --> I[空闲\\n(等待触发器)
|
|
1165
|
-
C -- 是 --> D[驱动循环\\n(流式传输时 generating=true)
|
|
1164
|
+
C -- 否 --> I[空闲\\n(等待触发器)]
|
|
1165
|
+
C -- 是 --> D[驱动循环\\n(流式传输时 generating=true)]
|
|
1166
1166
|
D --> E{有下一个?}
|
|
1167
1167
|
E -- 是 --> C
|
|
1168
1168
|
E -- 否 --> I
|
|
@@ -1211,13 +1211,10 @@ sequenceDiagram
|
|
|
1211
1211
|
Sub-->>Driver: 最终响应
|
|
1212
1212
|
Driver-->>Caller: 供应响应 + 清除待处理子对话
|
|
1213
1213
|
opt 调用者是根且现在已解除阻塞
|
|
1214
|
-
Driver-->>Caller: 设置
|
|
1214
|
+
Driver-->>Caller: 设置 needsDrive=true(自动重启调度)
|
|
1215
|
+
end
|
|
1215
1216
|
```
|
|
1216
1217
|
|
|
1217
|
-
end
|
|
1218
|
-
|
|
1219
|
-
````
|
|
1220
|
-
|
|
1221
1218
|
#### TYPE C:瞬态子对话诉请(一次性诉请)(`tellaskSessionless({ targetAgentId: "agentId", tellaskContent: "..." })`,或 `freshBootsReasoning({ tellaskContent: "..." })`)
|
|
1222
1219
|
|
|
1223
1220
|
```mermaid
|
|
@@ -1226,18 +1223,18 @@ sequenceDiagram
|
|
|
1226
1223
|
participant Driver as 后端驱动程序
|
|
1227
1224
|
participant Sub as 瞬态子对话
|
|
1228
1225
|
|
|
1229
|
-
Caller->>Driver: 发出
|
|
1226
|
+
Caller->>Driver: 发出 tellaskSessionless(...)
|
|
1230
1227
|
Driver->>Sub: 创建(不注册)
|
|
1231
1228
|
Driver->>Sub: 驱动
|
|
1232
1229
|
Sub-->>Driver: 最终响应
|
|
1233
1230
|
Driver-->>Caller: 供应响应(无注册表更新)
|
|
1234
|
-
|
|
1231
|
+
```
|
|
1235
1232
|
|
|
1236
1233
|
### Q4H 生命周期状态
|
|
1237
1234
|
|
|
1238
1235
|
```mermaid
|
|
1239
1236
|
flowchart TD
|
|
1240
|
-
A[askHuman(
|
|
1237
|
+
A["askHuman(...) 诉请发出"] --> B[将 HumanQuestion 条目追加到 q4h.yaml]
|
|
1241
1238
|
B --> C[发出 questions_count_update]
|
|
1242
1239
|
C --> D[UI 显示 Q4H 徽章/列表]
|
|
1243
1240
|
D --> E{如何清除?}
|
package/dist/docs/fbr.zh.md
CHANGED
|
@@ -117,7 +117,7 @@ FBR 支线对话的 system prompt 必须明确包含(措辞可不同,但语
|
|
|
117
117
|
### 4.3 诉请限制:一律禁止
|
|
118
118
|
|
|
119
119
|
FBR 支线对话不得发起任何队友诉请(包括 `tellaskBack({ tellaskContent: "..." })` 或 `askHuman({ tellaskContent: "..." })`)。
|
|
120
|
-
|
|
120
|
+
若关键上下文缺失,应**列出缺口与阻塞原因**,然后直接回复。
|
|
121
121
|
|
|
122
122
|
### 4.4 输出契约(便于诉请者对话综合)
|
|
123
123
|
|
|
@@ -116,6 +116,7 @@ That is a workflow break. The model should send the Tellask directly.
|
|
|
116
116
|
- Runtime treats that direct reply as the completion delivery to the tellasker dialog and injects the work-language marker automatically (`【Completed】` in English work language, and the localized Chinese completion marker in Chinese work language).
|
|
117
117
|
- If any goal is incomplete, the dialog is blocked, or critical context is missing, it MUST issue `tellaskBack({ tellaskContent: "..." })` before proceeding; do not post plain-text intermediate status updates while unfinished.
|
|
118
118
|
- **FBR exception**: FBR forbids all tellasks (including `tellaskBack` / `askHuman`); list missing context + reasoning and return.
|
|
119
|
+
- If a human user inserts a message or asks a follow-up in the sideline: just reply normally; no need to report back to the upstream requester.
|
|
119
120
|
|
|
120
121
|
Note: no extra "Status: ..." line is required; the first-line marker is the stage reminder.
|
|
121
122
|
|
|
@@ -109,10 +109,10 @@
|
|
|
109
109
|
|
|
110
110
|
**支线交付规则**:
|
|
111
111
|
|
|
112
|
-
-
|
|
113
|
-
- 该直接回贴会被运行时按工作语言自动加上完成标记(英文工作语言为 `【Completed】`,中文工作语言为 `【最终完成】`)。
|
|
112
|
+
- 只有当所有目标完成时,支线对话才可直接正常回复诉请者对话(直接发正文即可,不需要调用 tellaskBack;运行时自动注入完成标记)。
|
|
114
113
|
- 若任何目标未完成或关键信息缺失,必须先用 `tellaskBack({ tellaskContent: "..." })` 回问诉请者对话再继续;不得发送普通文本中间汇报。
|
|
115
|
-
- **FBR 例外**:FBR 禁止任何诉请(包括 `tellaskBack` / `askHuman`);只列缺口 +
|
|
114
|
+
- **FBR 例外**:FBR 禁止任何诉请(包括 `tellaskBack` / `askHuman`);只列缺口 + 推理与摘要并直接回复。
|
|
115
|
+
- 若人类用户在支线对话中插入消息或补问:直接正常回复,不需要向诉请者汇报。
|
|
116
116
|
|
|
117
117
|
说明:不需要额外的 “Status: …” 行;首行标记即为阶段提醒。
|
|
118
118
|
|
package/dist/llm/defaults.yaml
CHANGED
|
@@ -172,6 +172,12 @@ providers:
|
|
|
172
172
|
type: boolean
|
|
173
173
|
description: Force JSON object output via Anthropic tool_choice mode.
|
|
174
174
|
models:
|
|
175
|
+
MiniMax-M2.7:
|
|
176
|
+
name: MiniMax M2.7
|
|
177
|
+
context_length: 204800
|
|
178
|
+
input_length: 204800
|
|
179
|
+
output_length: 8192
|
|
180
|
+
context_window: '204K'
|
|
175
181
|
MiniMax-M2.5:
|
|
176
182
|
name: MiniMax M2.5
|
|
177
183
|
context_length: 204800
|
|
@@ -219,6 +225,12 @@ providers:
|
|
|
219
225
|
type: boolean
|
|
220
226
|
description: Force JSON object output via Anthropic tool_choice mode.
|
|
221
227
|
models:
|
|
228
|
+
MiniMax-M2.7:
|
|
229
|
+
name: MiniMax M2.7
|
|
230
|
+
context_length: 204800
|
|
231
|
+
input_length: 204800
|
|
232
|
+
output_length: 8192
|
|
233
|
+
context_window: '204K'
|
|
222
234
|
MiniMax-M2.5:
|
|
223
235
|
name: MiniMax M2.5
|
|
224
236
|
context_length: 204800
|
|
@@ -266,6 +278,12 @@ providers:
|
|
|
266
278
|
type: boolean
|
|
267
279
|
description: Force JSON object output via Anthropic tool_choice mode.
|
|
268
280
|
models:
|
|
281
|
+
MiniMax-M2.7:
|
|
282
|
+
name: MiniMax M2.7
|
|
283
|
+
context_length: 204800
|
|
284
|
+
input_length: 204800
|
|
285
|
+
output_length: 8192
|
|
286
|
+
context_window: '204K'
|
|
269
287
|
MiniMax-M2.5:
|
|
270
288
|
name: MiniMax M2.5
|
|
271
289
|
context_length: 204800
|
|
@@ -313,6 +331,12 @@ providers:
|
|
|
313
331
|
type: boolean
|
|
314
332
|
description: Force JSON object output via Anthropic tool_choice mode.
|
|
315
333
|
models:
|
|
334
|
+
MiniMax-M2.7:
|
|
335
|
+
name: MiniMax M2.7
|
|
336
|
+
context_length: 204800
|
|
337
|
+
input_length: 204800
|
|
338
|
+
output_length: 8192
|
|
339
|
+
context_window: '204K'
|
|
316
340
|
MiniMax-M2.5:
|
|
317
341
|
name: MiniMax M2.5
|
|
318
342
|
context_length: 204800
|
|
@@ -399,17 +423,35 @@ providers:
|
|
|
399
423
|
name: Volcano Engine Coding Plan
|
|
400
424
|
apiType: anthropic
|
|
401
425
|
baseUrl: https://ark.cn-beijing.volces.com/api/coding
|
|
402
|
-
apiKeyEnvVar:
|
|
403
|
-
tech_spec_url: https://
|
|
426
|
+
apiKeyEnvVar: ARK_CP_API_KEY
|
|
427
|
+
tech_spec_url: https://www.volcengine.com/docs/82379/1928261
|
|
404
428
|
api_mgmt_url: https://console.volcengine.com/ark
|
|
405
429
|
models:
|
|
406
|
-
doubao-seed-code
|
|
430
|
+
doubao-seed-code:
|
|
407
431
|
name: Doubao Seed Code Preview
|
|
408
432
|
context_length: 256000
|
|
409
433
|
input_length: 256000
|
|
410
434
|
output_length: 8192
|
|
411
435
|
context_window: '256K'
|
|
412
436
|
optimization: 专为Agentic Coding任务优化
|
|
437
|
+
deepseek-v3.2:
|
|
438
|
+
name: DeepSeek-V3.2
|
|
439
|
+
context_length: 128000
|
|
440
|
+
input_length: 96000
|
|
441
|
+
output_length: 32000
|
|
442
|
+
context_window: '128K'
|
|
443
|
+
glm-4.7:
|
|
444
|
+
name: GLM 4.7
|
|
445
|
+
context_length: 256000
|
|
446
|
+
input_length: 256000
|
|
447
|
+
output_length: 8192
|
|
448
|
+
context_window: '256K'
|
|
449
|
+
kimi-k2.5:
|
|
450
|
+
name: Kimi K2.5
|
|
451
|
+
context_length: 200000
|
|
452
|
+
input_length: 200000
|
|
453
|
+
output_length: 8192
|
|
454
|
+
context_window: '200K (约20万汉字)'
|
|
413
455
|
volcano-engine:
|
|
414
456
|
name: Volcano Engine
|
|
415
457
|
apiType: openai-compatible
|