dominds 1.17.5 → 1.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps/runtime.d.ts +24 -0
- package/dist/apps/runtime.js +50 -8
- package/dist/dialog.d.ts +6 -2
- package/dist/dialog.js +29 -10
- package/dist/docs/app-constitution.md +18 -1
- package/dist/docs/app-constitution.zh.md +9 -1
- package/dist/docs/diligence-push.md +20 -9
- package/dist/docs/diligence-push.zh.md +14 -6
- package/dist/docs/mcp-support.md +10 -6
- package/dist/docs/mcp-support.zh.md +10 -6
- package/dist/docs/tool-availability-protocol.md +255 -0
- package/dist/llm/kernel-driver/drive.js +17 -16
- package/dist/llm/kernel-driver/subdialog.js +14 -2
- package/dist/llm/kernel-driver/tellask-special.js +84 -22
- package/dist/mcp/supervisor.d.ts +4 -0
- package/dist/mcp/supervisor.js +38 -0
- package/dist/persistence.js +51 -33
- package/dist/priming.js +7 -4
- package/dist/server/api-routes.js +122 -73
- package/dist/server/static-server.js +2 -2
- package/dist/server/websocket-handler.js +4 -0
- package/dist/team-config-updates.js +3 -0
- package/dist/tool-availability-updates.d.ts +9 -0
- package/dist/tool-availability-updates.js +62 -0
- package/dist/tool-availability.d.ts +8 -0
- package/dist/tool-availability.js +276 -0
- package/dist/tool.js +2 -11
- package/dist/tools/mcp.js +12 -10
- package/dist/tools/prompts/mcp_admin/en/principles.md +4 -4
- package/dist/tools/prompts/mcp_admin/en/tools.md +1 -1
- package/dist/tools/prompts/mcp_admin/zh/principles.md +4 -4
- package/dist/tools/prompts/mcp_admin/zh/tools.md +1 -1
- package/dist/tools/team_mgmt-manual.js +2 -2
- package/dist/tools/team_mgmt-mcp-manual.js +2 -2
- package/package.json +4 -4
- package/webapp/dist/assets/{_basePickBy-CpHP1wBo.js → _basePickBy-CdAKD4rj.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-CpHP1wBo.js.map → _basePickBy-CdAKD4rj.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-CvZnDuif.js → _baseUniq-_dXSeigA.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-CvZnDuif.js.map → _baseUniq-_dXSeigA.js.map} +1 -1
- package/webapp/dist/assets/{arc-BHFujbnL.js → arc-DNnfKGXe.js} +2 -2
- package/webapp/dist/assets/{arc-BHFujbnL.js.map → arc-DNnfKGXe.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-VXUJARFQ-Di1oQVRu.js → architectureDiagram-VXUJARFQ-400MthuC.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-VXUJARFQ-Di1oQVRu.js.map → architectureDiagram-VXUJARFQ-400MthuC.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-VD42YOAC-DQvfo_FK.js → blockDiagram-VD42YOAC-UjvoDLu0.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-VD42YOAC-DQvfo_FK.js.map → blockDiagram-VD42YOAC-UjvoDLu0.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-YG6GDRKO-ZhmyLfpa.js → c4Diagram-YG6GDRKO-BUPEBKuT.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-YG6GDRKO-ZhmyLfpa.js.map → c4Diagram-YG6GDRKO-BUPEBKuT.js.map} +1 -1
- package/webapp/dist/assets/{channel-BzUmZVV0.js → channel-Bc-dSNjB.js} +2 -2
- package/webapp/dist/assets/{channel-BzUmZVV0.js.map → channel-Bc-dSNjB.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-btqBd7Au.js → chunk-4BX2VUAB-D0CwOvuG.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-btqBd7Au.js.map → chunk-4BX2VUAB-D0CwOvuG.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-Dd88jUsB.js → chunk-55IACEB6-_z-JPBKr.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-Dd88jUsB.js.map → chunk-55IACEB6-_z-JPBKr.js.map} +1 -1
- package/webapp/dist/assets/{chunk-B4BG7PRW-CF0szfFw.js → chunk-B4BG7PRW-D4q30SD5.js} +5 -5
- package/webapp/dist/assets/{chunk-B4BG7PRW-CF0szfFw.js.map → chunk-B4BG7PRW-D4q30SD5.js.map} +1 -1
- package/webapp/dist/assets/{chunk-DI55MBZ5-CuueZ5mR.js → chunk-DI55MBZ5-c4c0VIRJ.js} +4 -4
- package/webapp/dist/assets/{chunk-DI55MBZ5-CuueZ5mR.js.map → chunk-DI55MBZ5-c4c0VIRJ.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-BWirvwW5.js → chunk-FMBD7UC4-BZJ6MV7q.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-BWirvwW5.js.map → chunk-FMBD7UC4-BZJ6MV7q.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QN33PNHL-C8y0hbMe.js → chunk-QN33PNHL-Dt5_zoWx.js} +2 -2
- package/webapp/dist/assets/{chunk-QN33PNHL-C8y0hbMe.js.map → chunk-QN33PNHL-Dt5_zoWx.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-CYBh9MjS.js → chunk-QZHKN3VN-C233UTgJ.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-CYBh9MjS.js.map → chunk-QZHKN3VN-C233UTgJ.js.map} +1 -1
- package/webapp/dist/assets/{chunk-TZMSLE5B-Dp3nxkVa.js → chunk-TZMSLE5B-CYz6GjE2.js} +2 -2
- package/webapp/dist/assets/{chunk-TZMSLE5B-Dp3nxkVa.js.map → chunk-TZMSLE5B-CYz6GjE2.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-2ON5EDUG-DqWZ8QKp.js → classDiagram-2ON5EDUG-Bh9Mw-kt.js} +6 -6
- package/webapp/dist/assets/{classDiagram-2ON5EDUG-DqWZ8QKp.js.map → classDiagram-2ON5EDUG-Bh9Mw-kt.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-WZHVMYZB-DqWZ8QKp.js → classDiagram-v2-WZHVMYZB-Bh9Mw-kt.js} +6 -6
- package/webapp/dist/assets/{classDiagram-v2-WZHVMYZB-DqWZ8QKp.js.map → classDiagram-v2-WZHVMYZB-Bh9Mw-kt.js.map} +1 -1
- package/webapp/dist/assets/{clone-CUPRkFmQ.js → clone-2lFjyI7N.js} +2 -2
- package/webapp/dist/assets/{clone-CUPRkFmQ.js.map → clone-2lFjyI7N.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-DMy7cbOH.js → cose-bilkent-S5V4N54A-3DOT2IPV.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-DMy7cbOH.js.map → cose-bilkent-S5V4N54A-3DOT2IPV.js.map} +1 -1
- package/webapp/dist/assets/{dagre-6UL2VRFP-oKcmfGzQ.js → dagre-6UL2VRFP-ClogWVOL.js} +7 -7
- package/webapp/dist/assets/{dagre-6UL2VRFP-oKcmfGzQ.js.map → dagre-6UL2VRFP-ClogWVOL.js.map} +1 -1
- package/webapp/dist/assets/{diagram-PSM6KHXK-DaqJJraw.js → diagram-PSM6KHXK-C7W5uMOI.js} +8 -8
- package/webapp/dist/assets/{diagram-PSM6KHXK-DaqJJraw.js.map → diagram-PSM6KHXK-C7W5uMOI.js.map} +1 -1
- package/webapp/dist/assets/{diagram-QEK2KX5R-CYJxrEIt.js → diagram-QEK2KX5R-2hcqk2fE.js} +7 -7
- package/webapp/dist/assets/{diagram-QEK2KX5R-CYJxrEIt.js.map → diagram-QEK2KX5R-2hcqk2fE.js.map} +1 -1
- package/webapp/dist/assets/{diagram-S2PKOQOG-CLU09icu.js → diagram-S2PKOQOG-DSTjb4Ot.js} +7 -7
- package/webapp/dist/assets/{diagram-S2PKOQOG-CLU09icu.js.map → diagram-S2PKOQOG-DSTjb4Ot.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-Q2GNP2WA-DSZdQ4Um.js → erDiagram-Q2GNP2WA-Cyzo2gRU.js} +5 -5
- package/webapp/dist/assets/{erDiagram-Q2GNP2WA-DSZdQ4Um.js.map → erDiagram-Q2GNP2WA-Cyzo2gRU.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-NV44I4VS-BMQN6R95.js → flowDiagram-NV44I4VS-vwGV7In0.js} +6 -6
- package/webapp/dist/assets/{flowDiagram-NV44I4VS-BMQN6R95.js.map → flowDiagram-NV44I4VS-vwGV7In0.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-JELNMOA3-Bsx24uHi.js → ganttDiagram-JELNMOA3-BwnKcFdH.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-JELNMOA3-Bsx24uHi.js.map → ganttDiagram-JELNMOA3-BwnKcFdH.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-V2S2FVAM-zwxKKypo.js → gitGraphDiagram-V2S2FVAM-AHZBVTYC.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-V2S2FVAM-zwxKKypo.js.map → gitGraphDiagram-V2S2FVAM-AHZBVTYC.js.map} +1 -1
- package/webapp/dist/assets/{graph-E0vpJDes.js → graph-8UtNyWA6.js} +3 -3
- package/webapp/dist/assets/{graph-E0vpJDes.js.map → graph-8UtNyWA6.js.map} +1 -1
- package/webapp/dist/assets/{index-DN9U1zRL.js → index-BxP2ljx_.js} +354 -115
- package/webapp/dist/assets/index-BxP2ljx_.js.map +1 -0
- package/webapp/dist/assets/{infoDiagram-HS3SLOUP-DTsziUlk.js → infoDiagram-HS3SLOUP-BjVLGKXo.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-HS3SLOUP-DTsziUlk.js.map → infoDiagram-HS3SLOUP-BjVLGKXo.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-XKPGCS4Q-BRCxHm94.js → journeyDiagram-XKPGCS4Q-CR4SmnDB.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-XKPGCS4Q-BRCxHm94.js.map → journeyDiagram-XKPGCS4Q-CR4SmnDB.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-3W4ZIXB7-CpQyoAYJ.js → kanban-definition-3W4ZIXB7-BRwp6TGw.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-3W4ZIXB7-CpQyoAYJ.js.map → kanban-definition-3W4ZIXB7-BRwp6TGw.js.map} +1 -1
- package/webapp/dist/assets/{layout-CbfoT0O3.js → layout-CGl07Gcr.js} +5 -5
- package/webapp/dist/assets/{layout-CbfoT0O3.js.map → layout-CGl07Gcr.js.map} +1 -1
- package/webapp/dist/assets/{linear-D1HwcPmT.js → linear-BZLEuG3I.js} +2 -2
- package/webapp/dist/assets/{linear-D1HwcPmT.js.map → linear-BZLEuG3I.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-VGOIOE7T-C9bCAYD2.js → mindmap-definition-VGOIOE7T-CSKILdE-.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-VGOIOE7T-C9bCAYD2.js.map → mindmap-definition-VGOIOE7T-CSKILdE-.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-ADFJNKIX-CkWs3EqH.js → pieDiagram-ADFJNKIX-B_V3b26u.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-ADFJNKIX-CkWs3EqH.js.map → pieDiagram-ADFJNKIX-B_V3b26u.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-AYHSOK5B-lePBdGYd.js → quadrantDiagram-AYHSOK5B-CUtWvL54.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-AYHSOK5B-lePBdGYd.js.map → quadrantDiagram-AYHSOK5B-CUtWvL54.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-UZGBJVZJ-BM_GNlHQ.js → requirementDiagram-UZGBJVZJ-i2tJjoPk.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-UZGBJVZJ-BM_GNlHQ.js.map → requirementDiagram-UZGBJVZJ-i2tJjoPk.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-TZEHDZUN-Z3UUlzwo.js → sankeyDiagram-TZEHDZUN-nPQL9_d2.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-TZEHDZUN-Z3UUlzwo.js.map → sankeyDiagram-TZEHDZUN-nPQL9_d2.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-WL72ISMW-BmcsPWXz.js → sequenceDiagram-WL72ISMW-C2hX7rec.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-WL72ISMW-BmcsPWXz.js.map → sequenceDiagram-WL72ISMW-C2hX7rec.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-FKZM4ZOC-THsxiqRA.js → stateDiagram-FKZM4ZOC-C94MSmDQ.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-FKZM4ZOC-THsxiqRA.js.map → stateDiagram-FKZM4ZOC-C94MSmDQ.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-4FDKWEC3-B2oIvgOa.js → stateDiagram-v2-4FDKWEC3-C3pjtK0h.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-4FDKWEC3-B2oIvgOa.js.map → stateDiagram-v2-4FDKWEC3-C3pjtK0h.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-IT6M3QCI-DRB7VKTt.js → timeline-definition-IT6M3QCI-c087-Lzc.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-IT6M3QCI-DRB7VKTt.js.map → timeline-definition-IT6M3QCI-c087-Lzc.js.map} +1 -1
- package/webapp/dist/assets/{treemap-GDKQZRPO-h6k2E_-V.js → treemap-GDKQZRPO-PkjxSOwj.js} +5 -5
- package/webapp/dist/assets/{treemap-GDKQZRPO-h6k2E_-V.js.map → treemap-GDKQZRPO-PkjxSOwj.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-PRI3JC2R-CeoSM0y_.js → xychartDiagram-PRI3JC2R-DtMWPXHa.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-PRI3JC2R-CeoSM0y_.js.map → xychartDiagram-PRI3JC2R-DtMWPXHa.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
- package/dist/tools/registry-snapshot.d.ts +0 -4
- package/dist/tools/registry-snapshot.js +0 -35
- package/webapp/dist/assets/index-DN9U1zRL.js.map +0 -1
package/dist/apps/runtime.d.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { type AppsHostClient } from '../apps-host/client';
|
|
2
|
+
export type DynamicAppToolAvailabilityResult = Readonly<{
|
|
3
|
+
status: 'ready';
|
|
4
|
+
toolsetIds: ReadonlyArray<string>;
|
|
5
|
+
} | {
|
|
6
|
+
status: 'error';
|
|
7
|
+
toolsetIds: ReadonlyArray<string>;
|
|
8
|
+
errorText: string;
|
|
9
|
+
} | {
|
|
10
|
+
status: 'not_applicable';
|
|
11
|
+
toolsetIds: ReadonlyArray<string>;
|
|
12
|
+
}>;
|
|
2
13
|
export declare function getAppsHostClient(): AppsHostClient;
|
|
3
14
|
export declare function waitForAppsHostClient(): Promise<AppsHostClient>;
|
|
4
15
|
export declare function shutdownAppsRuntime(): Promise<void>;
|
|
@@ -9,7 +20,20 @@ export declare function listDynamicAppToolsetsForMember(_params: {
|
|
|
9
20
|
rtwsRootAbs: string;
|
|
10
21
|
taskDocPath: string;
|
|
11
22
|
memberId: string;
|
|
23
|
+
dialogId?: string;
|
|
24
|
+
rootDialogId?: string;
|
|
25
|
+
agentId?: string;
|
|
26
|
+
sessionSlug?: string;
|
|
12
27
|
}): Promise<readonly string[]>;
|
|
28
|
+
export declare function resolveDynamicAppToolAvailabilityForMember(_params: {
|
|
29
|
+
rtwsRootAbs: string;
|
|
30
|
+
taskDocPath: string;
|
|
31
|
+
memberId: string;
|
|
32
|
+
dialogId?: string;
|
|
33
|
+
rootDialogId?: string;
|
|
34
|
+
agentId?: string;
|
|
35
|
+
sessionSlug?: string;
|
|
36
|
+
}): Promise<DynamicAppToolAvailabilityResult>;
|
|
13
37
|
export declare function initAppsRuntime(params: {
|
|
14
38
|
rtwsRootAbs: string;
|
|
15
39
|
kernel: Readonly<{
|
package/dist/apps/runtime.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.waitForAppsHostClient = waitForAppsHostClient;
|
|
|
8
8
|
exports.shutdownAppsRuntime = shutdownAppsRuntime;
|
|
9
9
|
exports.registerEnabledAppsToolProxies = registerEnabledAppsToolProxies;
|
|
10
10
|
exports.listDynamicAppToolsetsForMember = listDynamicAppToolsetsForMember;
|
|
11
|
+
exports.resolveDynamicAppToolAvailabilityForMember = resolveDynamicAppToolAvailabilityForMember;
|
|
11
12
|
exports.initAppsRuntime = initAppsRuntime;
|
|
12
13
|
const crypto_1 = require("crypto");
|
|
13
14
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
@@ -16,6 +17,7 @@ const dialog_1 = require("../dialog");
|
|
|
16
17
|
const dialog_global_registry_1 = require("../dialog-global-registry");
|
|
17
18
|
const dialog_instance_registry_1 = require("../dialog-instance-registry");
|
|
18
19
|
const log_1 = require("../log");
|
|
20
|
+
const tool_availability_updates_1 = require("../tool-availability-updates");
|
|
19
21
|
const app_reminders_1 = require("../tools/app-reminders");
|
|
20
22
|
const registry_1 = require("../tools/registry");
|
|
21
23
|
const client_1 = require("../apps-host/client");
|
|
@@ -352,10 +354,12 @@ function registerAppArtifacts(app) {
|
|
|
352
354
|
});
|
|
353
355
|
}
|
|
354
356
|
function syncRegisteredAppArtifacts(params) {
|
|
357
|
+
let changed = false;
|
|
355
358
|
const nextAppIds = new Set(params.enabledApps.map((app) => app.appId));
|
|
356
359
|
for (const appId of registeredAppArtifactsById.keys()) {
|
|
357
360
|
if (!nextAppIds.has(appId)) {
|
|
358
361
|
unregisterRegisteredAppArtifacts(appId);
|
|
362
|
+
changed = true;
|
|
359
363
|
}
|
|
360
364
|
}
|
|
361
365
|
for (const app of params.enabledApps) {
|
|
@@ -368,7 +372,9 @@ function syncRegisteredAppArtifacts(params) {
|
|
|
368
372
|
unregisterRegisteredAppArtifacts(app.appId);
|
|
369
373
|
}
|
|
370
374
|
registerAppArtifacts(app);
|
|
375
|
+
changed = true;
|
|
371
376
|
}
|
|
377
|
+
return changed;
|
|
372
378
|
}
|
|
373
379
|
async function syncAppsHostToEnabledApps(params) {
|
|
374
380
|
const config = appsRuntimeConfig;
|
|
@@ -417,7 +423,13 @@ async function refreshEnabledAppsRuntimeNow(params) {
|
|
|
417
423
|
installJson: app.installJson,
|
|
418
424
|
}),
|
|
419
425
|
})));
|
|
420
|
-
syncRegisteredAppArtifacts({ enabledApps });
|
|
426
|
+
const appArtifactsChanged = syncRegisteredAppArtifacts({ enabledApps });
|
|
427
|
+
if (appArtifactsChanged) {
|
|
428
|
+
(0, tool_availability_updates_1.notifyToolAvailabilityRegistryMaybeChanged)({
|
|
429
|
+
reason: 'registry_changed',
|
|
430
|
+
trigger: 'apps-runtime:tool-proxies-refreshed',
|
|
431
|
+
});
|
|
432
|
+
}
|
|
421
433
|
if (params.ensureHost) {
|
|
422
434
|
await syncAppsHostToEnabledApps({ enabledApps });
|
|
423
435
|
}
|
|
@@ -431,29 +443,59 @@ async function registerEnabledAppsToolProxies(params) {
|
|
|
431
443
|
await run;
|
|
432
444
|
}
|
|
433
445
|
async function listDynamicAppToolsetsForMember(_params) {
|
|
446
|
+
const result = await resolveDynamicAppToolAvailabilityForMember(_params);
|
|
447
|
+
return result.status === 'ready' ? result.toolsetIds : [];
|
|
448
|
+
}
|
|
449
|
+
async function resolveDynamicAppToolAvailabilityForMember(_params) {
|
|
450
|
+
if (_params.taskDocPath.trim() === '') {
|
|
451
|
+
return { status: 'not_applicable', toolsetIds: [] };
|
|
452
|
+
}
|
|
434
453
|
try {
|
|
435
454
|
await registerEnabledAppsToolProxies({ rtwsRootAbs: _params.rtwsRootAbs });
|
|
436
455
|
}
|
|
437
456
|
catch (error) {
|
|
438
|
-
|
|
439
|
-
|
|
457
|
+
const err = asError(error);
|
|
458
|
+
log.warn(`Failed to refresh enabled app tool proxies while resolving dynamic toolsets for member '${_params.memberId}'.`, err);
|
|
459
|
+
return {
|
|
460
|
+
status: 'error',
|
|
461
|
+
toolsetIds: [],
|
|
462
|
+
errorText: err.message,
|
|
463
|
+
};
|
|
440
464
|
}
|
|
441
465
|
if (!appsRuntimeConfig && !appsHostClient && !appsHostTransition) {
|
|
442
|
-
return [];
|
|
466
|
+
return { status: 'not_applicable', toolsetIds: [] };
|
|
443
467
|
}
|
|
444
468
|
if (!appsHostClient && !appsHostTransition) {
|
|
445
|
-
return [];
|
|
469
|
+
return { status: 'not_applicable', toolsetIds: [] };
|
|
446
470
|
}
|
|
447
471
|
try {
|
|
448
472
|
const host = await ensureAppsHostReadyForToolCalls();
|
|
449
|
-
|
|
473
|
+
const toolsetIds = await host.listDynamicToolsets({
|
|
450
474
|
memberId: _params.memberId,
|
|
451
475
|
taskDocPath: _params.taskDocPath,
|
|
476
|
+
...(typeof _params.dialogId === 'string' && _params.dialogId.trim() !== ''
|
|
477
|
+
? { dialogId: _params.dialogId.trim() }
|
|
478
|
+
: {}),
|
|
479
|
+
...(typeof _params.rootDialogId === 'string' && _params.rootDialogId.trim() !== ''
|
|
480
|
+
? { rootDialogId: _params.rootDialogId.trim() }
|
|
481
|
+
: {}),
|
|
482
|
+
...(typeof _params.agentId === 'string' && _params.agentId.trim() !== ''
|
|
483
|
+
? { agentId: _params.agentId.trim() }
|
|
484
|
+
: {}),
|
|
485
|
+
...(typeof _params.sessionSlug === 'string' && _params.sessionSlug.trim() !== ''
|
|
486
|
+
? { sessionSlug: _params.sessionSlug.trim() }
|
|
487
|
+
: {}),
|
|
452
488
|
});
|
|
489
|
+
return { status: 'ready', toolsetIds };
|
|
453
490
|
}
|
|
454
491
|
catch (error) {
|
|
455
|
-
|
|
456
|
-
|
|
492
|
+
const err = asError(error);
|
|
493
|
+
log.warn(`Failed to load dynamic app toolsets for member '${_params.memberId}'.`, err);
|
|
494
|
+
return {
|
|
495
|
+
status: 'error',
|
|
496
|
+
toolsetIds: [],
|
|
497
|
+
errorText: err.message,
|
|
498
|
+
};
|
|
457
499
|
}
|
|
458
500
|
}
|
|
459
501
|
async function initAppsRuntime(params) {
|
package/dist/dialog.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import type { ContextHealthSnapshot } from '@longrun-ai/kernel/types/context-hea
|
|
|
16
16
|
import type { DialogEvent, NativeToolCallPayload, ReminderContent, WebSearchCallAction, WebSearchCallSource } from '@longrun-ai/kernel/types/dialog';
|
|
17
17
|
import type { DialogPrompt, DialogRunControlSpec, DialogSubdialogReplyTarget, DriveIntent } from '@longrun-ai/kernel/types/drive-intent';
|
|
18
18
|
import type { LanguageCode } from '@longrun-ai/kernel/types/language';
|
|
19
|
-
import type { CalleeCourseNumber, CalleeGenerationSeqNumber, CallingCourseNumber, DialogMetadataFile, HumanQuestion, ProviderData, ReasoningPayload, TellaskCallRecordName, TellaskReplyDirective } from '@longrun-ai/kernel/types/storage';
|
|
19
|
+
import type { CalleeCourseNumber, CalleeGenerationSeqNumber, CallingCourseNumber, CallingGenerationSeqNumber, DialogMetadataFile, HumanQuestion, ProviderData, ReasoningPayload, TellaskCallRecordName, TellaskReplyDirective } from '@longrun-ai/kernel/types/storage';
|
|
20
20
|
import { ChatMessage, FuncResultMsg, TellaskCarryoverMsg, TellaskResultMsg } from './llm/client';
|
|
21
21
|
import type { ToolResultImageIngest } from './llm/gen';
|
|
22
22
|
import type { JsonValue } from './tool';
|
|
@@ -376,13 +376,17 @@ export declare abstract class Dialog {
|
|
|
376
376
|
receiveFuncResult(result: FuncResultMsg): Promise<void>;
|
|
377
377
|
receiveTellaskResult(result: TellaskResultMsg): Promise<void>;
|
|
378
378
|
receiveTellaskCarryover(result: TellaskCarryoverMsg): Promise<void>;
|
|
379
|
-
receiveTellaskCallResult(responderId: string, callName: 'tellaskBack' | 'tellask' | 'tellaskSessionless' | 'askHuman' | 'freshBootsReasoning', mentionList: string[] | undefined, tellaskContent: string, result: string, status: 'completed' | 'failed', callId: string
|
|
379
|
+
receiveTellaskCallResult(responderId: string, callName: 'tellaskBack' | 'tellask' | 'tellaskSessionless' | 'askHuman' | 'freshBootsReasoning', mentionList: string[] | undefined, tellaskContent: string, result: string, status: 'completed' | 'failed', callId: string, options?: {
|
|
380
|
+
originCourse?: CallingCourseNumber;
|
|
381
|
+
calling_genseq?: CallingGenerationSeqNumber;
|
|
382
|
+
}): Promise<void>;
|
|
380
383
|
receiveTellaskResponse(responderId: string, callName: 'tellaskBack' | 'tellask' | 'tellaskSessionless' | 'askHuman' | 'freshBootsReasoning', mentionList: string[] | undefined, tellaskContent: string, status: 'completed' | 'failed', subdialogId: DialogID | undefined, options: {
|
|
381
384
|
response: string;
|
|
382
385
|
agentId: string;
|
|
383
386
|
callId: string;
|
|
384
387
|
originMemberId: string;
|
|
385
388
|
originCourse?: CallingCourseNumber;
|
|
389
|
+
calling_genseq?: CallingGenerationSeqNumber;
|
|
386
390
|
carryoverContent?: string;
|
|
387
391
|
sessionSlug?: string;
|
|
388
392
|
calleeCourse?: CalleeCourseNumber;
|
package/dist/dialog.js
CHANGED
|
@@ -936,16 +936,19 @@ class Dialog {
|
|
|
936
936
|
async receiveTellaskCarryover(result) {
|
|
937
937
|
return await this.dlgStore.receiveTellaskCarryover(this, result);
|
|
938
938
|
}
|
|
939
|
-
async receiveTellaskCallResult(responderId, callName, mentionList, tellaskContent, result, status, callId) {
|
|
939
|
+
async receiveTellaskCallResult(responderId, callName, mentionList, tellaskContent, result, status, callId, options) {
|
|
940
940
|
const tellaskResult = callName === 'tellask'
|
|
941
941
|
? {
|
|
942
942
|
type: 'tellask_result_msg',
|
|
943
943
|
role: 'tool',
|
|
944
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
945
944
|
callId,
|
|
946
945
|
callName,
|
|
947
946
|
status,
|
|
948
947
|
content: result,
|
|
948
|
+
...(options?.originCourse !== undefined ? { originCourse: options.originCourse } : {}),
|
|
949
|
+
...(options?.calling_genseq !== undefined
|
|
950
|
+
? { calling_genseq: options.calling_genseq }
|
|
951
|
+
: {}),
|
|
949
952
|
call: {
|
|
950
953
|
tellaskContent,
|
|
951
954
|
mentionList: mentionList ?? [],
|
|
@@ -958,11 +961,16 @@ class Dialog {
|
|
|
958
961
|
? {
|
|
959
962
|
type: 'tellask_result_msg',
|
|
960
963
|
role: 'tool',
|
|
961
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
962
964
|
callId,
|
|
963
965
|
callName,
|
|
964
966
|
status,
|
|
965
967
|
content: result,
|
|
968
|
+
...(options?.originCourse !== undefined
|
|
969
|
+
? { originCourse: options.originCourse }
|
|
970
|
+
: {}),
|
|
971
|
+
...(options?.calling_genseq !== undefined
|
|
972
|
+
? { calling_genseq: options.calling_genseq }
|
|
973
|
+
: {}),
|
|
966
974
|
call: {
|
|
967
975
|
tellaskContent,
|
|
968
976
|
mentionList: mentionList ?? [],
|
|
@@ -974,11 +982,16 @@ class Dialog {
|
|
|
974
982
|
: {
|
|
975
983
|
type: 'tellask_result_msg',
|
|
976
984
|
role: 'tool',
|
|
977
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
978
985
|
callId,
|
|
979
986
|
callName,
|
|
980
987
|
status,
|
|
981
988
|
content: result,
|
|
989
|
+
...(options?.originCourse !== undefined
|
|
990
|
+
? { originCourse: options.originCourse }
|
|
991
|
+
: {}),
|
|
992
|
+
...(options?.calling_genseq !== undefined
|
|
993
|
+
? { calling_genseq: options.calling_genseq }
|
|
994
|
+
: {}),
|
|
982
995
|
call: {
|
|
983
996
|
tellaskContent,
|
|
984
997
|
},
|
|
@@ -1050,11 +1063,14 @@ class Dialog {
|
|
|
1050
1063
|
? {
|
|
1051
1064
|
type: 'tellask_result_msg',
|
|
1052
1065
|
role: 'tool',
|
|
1053
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
1054
1066
|
callId: options.callId,
|
|
1055
1067
|
callName,
|
|
1056
1068
|
status,
|
|
1057
1069
|
content: options.response,
|
|
1070
|
+
...(options.originCourse !== undefined ? { originCourse: options.originCourse } : {}),
|
|
1071
|
+
...(options.calling_genseq !== undefined
|
|
1072
|
+
? { calling_genseq: options.calling_genseq }
|
|
1073
|
+
: {}),
|
|
1058
1074
|
call: {
|
|
1059
1075
|
tellaskContent,
|
|
1060
1076
|
mentionList: mentionList ?? [],
|
|
@@ -1071,11 +1087,14 @@ class Dialog {
|
|
|
1071
1087
|
? {
|
|
1072
1088
|
type: 'tellask_result_msg',
|
|
1073
1089
|
role: 'tool',
|
|
1074
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
1075
1090
|
callId: options.callId,
|
|
1076
1091
|
callName,
|
|
1077
1092
|
status,
|
|
1078
1093
|
content: options.response,
|
|
1094
|
+
...(options.originCourse !== undefined ? { originCourse: options.originCourse } : {}),
|
|
1095
|
+
...(options.calling_genseq !== undefined
|
|
1096
|
+
? { calling_genseq: options.calling_genseq }
|
|
1097
|
+
: {}),
|
|
1079
1098
|
call: {
|
|
1080
1099
|
tellaskContent,
|
|
1081
1100
|
mentionList: mentionList ?? [],
|
|
@@ -1090,11 +1109,14 @@ class Dialog {
|
|
|
1090
1109
|
: {
|
|
1091
1110
|
type: 'tellask_result_msg',
|
|
1092
1111
|
role: 'tool',
|
|
1093
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
1094
1112
|
callId: options.callId,
|
|
1095
1113
|
callName,
|
|
1096
1114
|
status,
|
|
1097
1115
|
content: options.response,
|
|
1116
|
+
...(options.originCourse !== undefined ? { originCourse: options.originCourse } : {}),
|
|
1117
|
+
...(options.calling_genseq !== undefined
|
|
1118
|
+
? { calling_genseq: options.calling_genseq }
|
|
1119
|
+
: {}),
|
|
1098
1120
|
call: {
|
|
1099
1121
|
tellaskContent,
|
|
1100
1122
|
},
|
|
@@ -1312,7 +1334,6 @@ class Dialog {
|
|
|
1312
1334
|
status: 'completed',
|
|
1313
1335
|
course: this.currentCourse,
|
|
1314
1336
|
callId,
|
|
1315
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
1316
1337
|
content: rawResponse,
|
|
1317
1338
|
responder: {
|
|
1318
1339
|
responderId,
|
|
@@ -1334,7 +1355,6 @@ class Dialog {
|
|
|
1334
1355
|
status: 'completed',
|
|
1335
1356
|
course: this.currentCourse,
|
|
1336
1357
|
callId,
|
|
1337
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
1338
1358
|
content: rawResponse,
|
|
1339
1359
|
responder: {
|
|
1340
1360
|
responderId,
|
|
@@ -1355,7 +1375,6 @@ class Dialog {
|
|
|
1355
1375
|
status: 'completed',
|
|
1356
1376
|
course: this.currentCourse,
|
|
1357
1377
|
callId,
|
|
1358
|
-
genseq: this.activeGenSeqOrUndefined ?? 1,
|
|
1359
1378
|
content: rawResponse,
|
|
1360
1379
|
responder: {
|
|
1361
1380
|
responderId,
|
|
@@ -129,6 +129,17 @@ rtws is the runtime workspace root (`process.cwd()`). The kernel reads/writes:
|
|
|
129
129
|
- App context: the app-local team (app `.minds/team.yaml` plus its dependency/override composition).
|
|
130
130
|
|
|
131
131
|
> Target direction: decouple “team visibility” from “tool availability”, but keep both encapsulated and overridable at app boundaries.
|
|
132
|
+
>
|
|
133
|
+
> Design principle: the app mechanism customizes Dominds by registering callbacks at explicit
|
|
134
|
+
> kernel control points. Tool availability is one such control point; it should not be modeled as a
|
|
135
|
+
> hidden side effect of lease/registry/cache behavior.
|
|
136
|
+
>
|
|
137
|
+
> Evolution policy: keep control points explicit and concrete first. Do not rush into a generalized
|
|
138
|
+
> app callback framework before several control points have independently matured.
|
|
139
|
+
>
|
|
140
|
+
> Current-stage note: app-side protocol details are still relatively sparse. This is expected at the
|
|
141
|
+
> current phase and should be read as “direction fixed, surface area still growing”, not as a sign
|
|
142
|
+
> that the app model is undefined.
|
|
132
143
|
|
|
133
144
|
## App packages and manifests
|
|
134
145
|
|
|
@@ -485,7 +496,13 @@ Current prototype note (`dominds-apps/@longrun-ai/web-dev`, as of March 8, 2026)
|
|
|
485
496
|
- `kind: "web"` sessions now create a real Playwright-backed browser/context/page runtime and report live page surfaces via session status/reminders.
|
|
486
497
|
- `kind: "electron"` is **not** at the same completion level yet: it still falls back to the older prototype runtime path and should be treated as unfinished.
|
|
487
498
|
- Reminder UX contract: tool output may summarize reminder-sync actions, but the reminder panel is the authoritative surface for attachment state.
|
|
488
|
-
- Runtime refresh contract: after enabling the app, a full Dominds instance restart should not be required just to discover the toolset; the next minds reload /
|
|
499
|
+
- Runtime refresh contract: after enabling the app, a full Dominds instance restart should not be required just to discover the toolset; the next minds reload / tool-availability fetch should refresh enabled app tool proxies. This does **not** mean in-flight prompts are rewritten retroactively.
|
|
500
|
+
- Dynamic tool availability protocol note: app-controlled dynamic availability is a protocol layer of
|
|
501
|
+
its own and must remain semantically orthogonal to MCP registry/lease and member binding. See
|
|
502
|
+
[tool-availability-protocol.md](./tool-availability-protocol.md).
|
|
503
|
+
- App mechanism note: this dynamic availability is expressed through an app callback registered at a
|
|
504
|
+
kernel control point, not through an app-owned registry or an implicit coupling to MCP/runtime
|
|
505
|
+
cache behavior.
|
|
489
506
|
- Remaining gap list for the browser capability layer: screenshot / console / network evidence are not yet exposed as first-class tool outputs, and there is not yet a production-grade browser lifecycle manager.
|
|
490
507
|
- Restart boundary: if the kernel/apps-host process restarts, persisted session records remain but the in-memory browser runtime degrades and must be recreated.
|
|
491
508
|
|
|
@@ -128,6 +128,12 @@ rtws 是一次运行的工作区根目录(`process.cwd()`)。Kernel 在其
|
|
|
128
128
|
- App 上下文:该 app 的本地团队(app 的 `.minds/team.yaml`,以及其依赖/覆盖组合之后的结果)。
|
|
129
129
|
|
|
130
130
|
> 目标:把“团队视野(能看见谁)”从“工具可用性(能调用什么)”中解耦,但都需要以 app 为单位封装与可覆写。
|
|
131
|
+
>
|
|
132
|
+
> 设计原则:app 机制的核心是“在 kernel 的显式 control points 注册 callback 来定制系统行为”。工具可用性只是其中一个 control point,不能被建模成 lease/registry/cache 的隐式副作用。
|
|
133
|
+
>
|
|
134
|
+
> 演进策略:先坚持“显式、具名、具体”的 control points,不要在多个 control point 都还未独立成熟之前,过早抽象成通用 app callback framework。
|
|
135
|
+
>
|
|
136
|
+
> 阶段说明:目前 app 侧协议细节仍然偏少,这是预期中的现状。它表达的是“方向先树稳、表面积后生长”,而不是 app 模型尚未定型。
|
|
131
137
|
|
|
132
138
|
## App 包与清单
|
|
133
139
|
|
|
@@ -484,7 +490,9 @@ members:
|
|
|
484
490
|
- `kind: "web"` 会话现在会创建真实的 Playwright browser/context/page 运行时,并通过 status/reminder 报告实时页面状态。
|
|
485
491
|
- `kind: "electron"` 还没有达到同等完成度:当前仍回落到旧的原型运行时路径,应视为未完成能力。
|
|
486
492
|
- 提醒体验契约:tool 输出可以摘要提示提醒同步动作,但附着状态的权威可见面仍是 reminder 面板本身。
|
|
487
|
-
- 运行时刷新契约:app 启用后,不应再要求为了“看见工具集”而整实例重启;下一次 minds 重新加载 /
|
|
493
|
+
- 运行时刷新契约:app 启用后,不应再要求为了“看见工具集”而整实例重启;下一次 minds 重新加载 / tool-availability 拉取应刷新已启用 app 的工具代理。但这 **不表示** 已经发出的进行中 prompt 会被追写更新。
|
|
494
|
+
- 动态工具可用性协议说明:app 控制的 dynamic availability 是独立协议层,语义上必须与 MCP registry/lease 和成员工具绑定正交;见 [tool-availability-protocol.md](./tool-availability-protocol.md)。
|
|
495
|
+
- app 机制说明:这里的 dynamic availability 应通过注册到 kernel control point 的 app callback 表达,而不是引入 app 自己的 registry,或与 MCP/runtime cache 隐式耦合。
|
|
488
496
|
- 浏览器能力层的剩余缺口:截图 / console / network 证据尚未作为一等 tool output 暴露,也还没有生产级浏览器生命周期管理器。
|
|
489
497
|
- 重启边界:若 kernel/apps-host 进程重启,已持久化的 session record 仍在,但内存态浏览器运行时会退化,需要后续 tool call 重新建立。
|
|
490
498
|
|
|
@@ -55,6 +55,14 @@ This is the "controlled convergence" path. The diligence-push mechanism should *
|
|
|
55
55
|
- no pending subdialogs (waiting for backfill).
|
|
56
56
|
- The driver would otherwise stop the generation loop (i.e., no tool/function outputs require another iteration).
|
|
57
57
|
|
|
58
|
+
### Exception: provider deadlock recovery
|
|
59
|
+
|
|
60
|
+
Some provider/API quirk handlers may request a one-time Diligence Push recovery after Dominds stops
|
|
61
|
+
same-context retries for a known deadlock pattern. This is not the ordinary "dialog is about to go
|
|
62
|
+
idle" path. In that recovery-only case, pending subdialogs do not veto the single Diligence Push
|
|
63
|
+
injection, because the deadlock may happen in a function-result-driven generation round right after
|
|
64
|
+
the root dialog has already registered an in-flight tellask/subdialog. Q4H remains a hard blocker.
|
|
65
|
+
|
|
58
66
|
### Action
|
|
59
67
|
|
|
60
68
|
The runtime auto-sends a diligence prompt (rendered as a normal user bubble) and runs another
|
|
@@ -63,8 +71,8 @@ generation iteration.
|
|
|
63
71
|
### Boundedness
|
|
64
72
|
|
|
65
73
|
To avoid infinite loops, diligence-push has a per-dialog budget (per-member `diligence-push-max`) that controls
|
|
66
|
-
how many auto-continued diligence prompts can be injected for a given dialog before the runtime
|
|
67
|
-
|
|
74
|
+
how many auto-continued diligence prompts can be injected for a given dialog before the runtime stops
|
|
75
|
+
issuing further automatic Diligence Pushes for that budget.
|
|
68
76
|
|
|
69
77
|
- Default: **3**
|
|
70
78
|
- If `< 1`, diligence-push is effectively disabled for that member
|
|
@@ -76,11 +84,10 @@ When a dialog becomes suspended due to a pending Q4H (Questions for Human), the
|
|
|
76
84
|
counter is reset. This ensures that after the human answers the Q4H and the dialog is resumed, the
|
|
77
85
|
dialog gets a fresh diligence-push budget again.
|
|
78
86
|
|
|
79
|
-
### Budget exhausted →
|
|
87
|
+
### Budget exhausted → stop auto-pushing for that budget
|
|
80
88
|
|
|
81
|
-
When the diligence-push budget is exhausted, the runtime
|
|
82
|
-
|
|
83
|
-
infinite auto-continue loops.
|
|
89
|
+
When the diligence-push budget is exhausted, the runtime emits an informational UI notice and stops
|
|
90
|
+
issuing further automatic Diligence Pushes for that budget. It does not create a Q4H by itself.
|
|
84
91
|
|
|
85
92
|
### Disable switch
|
|
86
93
|
|
|
@@ -135,13 +142,17 @@ Rules:
|
|
|
135
142
|
|
|
136
143
|
### Where
|
|
137
144
|
|
|
138
|
-
Implemented in the
|
|
145
|
+
Implemented in the kernel driver loop (`dominds/main/llm/kernel-driver/drive.ts`) as a small
|
|
146
|
+
post-iteration check:
|
|
139
147
|
|
|
140
|
-
1. If
|
|
148
|
+
1. If the dialog is suspended, stop (Q4H / subdialog pending), except for the deadlock-recovery
|
|
149
|
+
special case described above where one recovery-only Diligence Push may ignore pending
|
|
150
|
+
subdialogs.
|
|
141
151
|
2. If there is any tool feedback, continue normally.
|
|
142
152
|
3. Otherwise (root only), attempt diligence-push auto-continue:
|
|
143
153
|
- If disabled → stop normally.
|
|
144
|
-
- If budget exhausted →
|
|
154
|
+
- If budget exhausted → emit an informational UI notice and stop further automatic Diligence
|
|
155
|
+
Pushes for the current budget.
|
|
145
156
|
- Else → auto-send diligence prompt and continue.
|
|
146
157
|
|
|
147
158
|
### Message type
|
|
@@ -51,13 +51,20 @@ Dominds 根对话旨在长期运行。根对话"停止"(变为空闲)通常
|
|
|
51
51
|
- 没有待处理的子对话(等待回填)。
|
|
52
52
|
- 驱动程序即将停止生成循环(即没有工具/函数输出需要另一次迭代)。
|
|
53
53
|
|
|
54
|
+
### 例外:provider deadlock recovery
|
|
55
|
+
|
|
56
|
+
某些 provider/API quirk 在识别到已知的 same-context deadlock,并停止沿用同一上下文自动重试后,
|
|
57
|
+
会请求一次性的鞭策恢复。这不是普通的“对话即将空转停止”路径。在这个仅用于恢复的特例里,
|
|
58
|
+
即使根对话已经登记了在途诉请/支线对话,pending subdialog 也不应否决这一次鞭策注入;因为卡死
|
|
59
|
+
可能正发生在函数结果驱动的生成轮次里。Q4H 仍然是硬阻塞条件。
|
|
60
|
+
|
|
54
61
|
### 操作
|
|
55
62
|
|
|
56
63
|
运行时自动发送一个鞭策语(渲染为正常的用户气泡)并运行另一次生成迭代。
|
|
57
64
|
|
|
58
65
|
### 有界性
|
|
59
66
|
|
|
60
|
-
为避免无限循环,diligence-push 有一个按对话的预算(每个成员的 `diligence-push-max
|
|
67
|
+
为避免无限循环,diligence-push 有一个按对话的预算(每个成员的 `diligence-push-max`),控制对于给定对话在当前预算内还能注入多少个自动继续的鞭策语;预算耗尽后,运行时会停止继续自动鞭策。
|
|
61
68
|
|
|
62
69
|
- 默认值:**3**
|
|
63
70
|
- 如果 `< 1`,则该成员的 diligence-push 有效禁用
|
|
@@ -67,9 +74,9 @@ Dominds 根对话旨在长期运行。根对话"停止"(变为空闲)通常
|
|
|
67
74
|
|
|
68
75
|
当对话因待处理的 Q4H(Questions for Human)而暂停时,diligence-push 注入计数器会被重置。这确保在人类回答 Q4H 并恢复对话后,对话会获得新的 diligence-push 预算。
|
|
69
76
|
|
|
70
|
-
### 预算耗尽 →
|
|
77
|
+
### 预算耗尽 → 停止继续自动鞭策当前预算
|
|
71
78
|
|
|
72
|
-
当 diligence-push
|
|
79
|
+
当 diligence-push 预算耗尽时,运行时会发出一条仅用于提示的 UI 信息,并停止继续自动鞭策当前预算。它不会仅因预算耗尽而自动创建 Q4H。
|
|
73
80
|
|
|
74
81
|
### 禁用开关
|
|
75
82
|
|
|
@@ -121,13 +128,14 @@ members:
|
|
|
121
128
|
|
|
122
129
|
### 位置
|
|
123
130
|
|
|
124
|
-
在
|
|
131
|
+
在 kernel driver 循环中实现(`dominds/main/llm/kernel-driver/drive.ts`),作为迭代后的小检查:
|
|
125
132
|
|
|
126
|
-
1.
|
|
133
|
+
1. 如果对话处于暂停状态,则停止(Q4H / 子对话待处理);但上文所述 deadlock-recovery 特例除外,
|
|
134
|
+
即那一次恢复专用的鞭策可忽略 pending subdialog。
|
|
127
135
|
2. 如果有任何工具反馈,则正常继续。
|
|
128
136
|
3. 否则(仅限根),尝试 diligence-push 自动继续:
|
|
129
137
|
- 如果禁用 → 正常停止。
|
|
130
|
-
- 如果预算耗尽 →
|
|
138
|
+
- 如果预算耗尽 → 发出一条仅用于提示的 UI 信息,并停止继续自动鞭策当前预算。
|
|
131
139
|
- 否则 → 自动发送鞭策语并继续。
|
|
132
140
|
|
|
133
141
|
### 消息类型
|
package/dist/docs/mcp-support.md
CHANGED
|
@@ -67,6 +67,10 @@ or have global process-scoped caches.
|
|
|
67
67
|
|
|
68
68
|
Dominds therefore treats MCP client connections/processes as **leased resources** by default.
|
|
69
69
|
|
|
70
|
+
Lease semantics are intentionally **orthogonal** to tool visibility. A lease decides runtime
|
|
71
|
+
instance/process ownership only; it does not define the global MCP tool catalog or the final
|
|
72
|
+
member-visible tool set. See [tool-availability-protocol.md](./tool-availability-protocol.md).
|
|
73
|
+
|
|
70
74
|
### Server config: `truely-stateless` (default: `false`)
|
|
71
75
|
|
|
72
76
|
Each MCP server supports an explicit boolean flag:
|
|
@@ -81,23 +85,23 @@ implemented config surface.
|
|
|
81
85
|
### Default behavior (`truely-stateless: false`)
|
|
82
86
|
|
|
83
87
|
- The first time any MCP tool from that server’s toolset is used in a given dialog, Dominds creates
|
|
84
|
-
a **dedicated MCP
|
|
88
|
+
a **dedicated MCP runtime instance** (and thus a dedicated MCP server process/connection for that
|
|
85
89
|
dialog).
|
|
86
|
-
- That
|
|
90
|
+
- That runtime instance remains **leased to that dialog** for future function tool calls from the same
|
|
87
91
|
toolset.
|
|
88
|
-
- If another dialog uses the same MCP toolset concurrently, Dominds creates **another** MCP
|
|
92
|
+
- If another dialog uses the same MCP toolset concurrently, Dominds creates **another** MCP runtime
|
|
89
93
|
instance for that requesting dialog (no cross-dialog sharing).
|
|
90
94
|
- On first lease, Dominds adds a **sticky owned reminder** to the dialog instructing the agent to
|
|
91
|
-
release the lease when it is confident the
|
|
95
|
+
release the lease when it is confident the runtime instance won’t be needed again soon.
|
|
92
96
|
|
|
93
97
|
Releasing:
|
|
94
98
|
|
|
95
99
|
- Agents should call `mcp_release({"serverId":"<serverId>"})` (from `mcp_admin`) to release the
|
|
96
|
-
leased
|
|
100
|
+
leased runtime instance for the current dialog.
|
|
97
101
|
|
|
98
102
|
### Shared behavior (`truely-stateless: true`)
|
|
99
103
|
|
|
100
|
-
- Dominds may share a single MCP
|
|
104
|
+
- Dominds may share a single MCP runtime instance across dialogs for that server/toolset.
|
|
101
105
|
- No per-dialog lease reminder is required.
|
|
102
106
|
|
|
103
107
|
## Goals
|
|
@@ -52,6 +52,10 @@ Dominds 的行为:
|
|
|
52
52
|
|
|
53
53
|
因此,Dominds 默认将 MCP 客户端连接/进程视为**租赁资源**。
|
|
54
54
|
|
|
55
|
+
租约语义与工具可见性是**正交**的。租约只决定某个 HTTP 连接或 stdio 进程实例由谁持有,不决定
|
|
56
|
+
全局 MCP 工具目录,也不决定成员最终可见的工具集合。参见
|
|
57
|
+
[tool-availability-protocol.md](./tool-availability-protocol.md)。
|
|
58
|
+
|
|
55
59
|
### 服务器配置:`truely-stateless`(默认值:`false`)
|
|
56
60
|
|
|
57
61
|
每个 MCP 服务器支持一个显式的布尔标志:
|
|
@@ -63,18 +67,18 @@ Dominds 的行为:
|
|
|
63
67
|
|
|
64
68
|
### 默认行为(`truely-stateless: false`)
|
|
65
69
|
|
|
66
|
-
- 第一次在任何对话中使用来自该服务器工具集的 MCP 工具时,Dominds 为该对话创建一个**专用的 MCP
|
|
67
|
-
-
|
|
68
|
-
- 如果另一个对话并发使用相同的 MCP 工具集,Dominds 为请求对话创建**另一个**MCP
|
|
69
|
-
- 在首次租赁时,Dominds
|
|
70
|
+
- 第一次在任何对话中使用来自该服务器工具集的 MCP 工具时,Dominds 为该对话创建一个**专用的 MCP 运行时实例**(因此也是专用的 MCP 服务器进程/连接)。
|
|
71
|
+
- 该运行时实例在来自同一工具集的未来工具调用中保持**租赁给该对话**。
|
|
72
|
+
- 如果另一个对话并发使用相同的 MCP 工具集,Dominds 为请求对话创建**另一个**MCP 运行时实例(不跨对话共享)。
|
|
73
|
+
- 在首次租赁时,Dominds 向对话添加一个**粘性拥有提醒**,指示智能体在确信不再需要该运行时实例时释放租赁。
|
|
70
74
|
|
|
71
75
|
释放:
|
|
72
76
|
|
|
73
|
-
- 智能体应调用 `mcp_release({"serverId":"<serverId>"})`(来自 `mcp_admin
|
|
77
|
+
- 智能体应调用 `mcp_release({"serverId":"<serverId>"})`(来自 `mcp_admin`)来释放当前对话持有的租赁运行时实例。
|
|
74
78
|
|
|
75
79
|
### 共享行为(`truely-stateless: true`)
|
|
76
80
|
|
|
77
|
-
- Dominds 可以跨对话共享该服务器/工具集的单个 MCP
|
|
81
|
+
- Dominds 可以跨对话共享该服务器/工具集的单个 MCP 运行时实例。
|
|
78
82
|
- 不需要每个对话的租赁提醒。
|
|
79
83
|
|
|
80
84
|
## 目标
|