dominds 1.8.12 → 1.9.1
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/problems.js +1 -1
- package/dist/bootstrap/dotenv.d.ts +13 -0
- package/dist/bootstrap/dotenv.js +144 -0
- package/dist/bootstrap/rtws-cli.d.ts +8 -0
- package/dist/bootstrap/rtws-cli.js +73 -0
- package/dist/cli/webui.js +4 -4
- package/dist/cli.js +2 -2
- package/dist/dialog-display-state.js +1 -1
- package/dist/dialog-fork.js +1 -1
- package/dist/dialog-global-registry.js +1 -1
- package/dist/dialog-instance-registry.js +1 -1
- package/dist/dialog.d.ts +3 -0
- package/dist/dialog.js +18 -11
- package/dist/docs/app-constitution.md +2 -2
- package/dist/docs/app-constitution.zh.md +2 -2
- package/dist/docs/dialog-system.md +1 -1
- package/dist/docs/dialog-system.zh.md +1 -1
- package/dist/docs/fbr.md +24 -21
- package/dist/docs/fbr.zh.md +27 -22
- package/dist/evt-registry.d.ts +1 -1
- package/dist/evt-registry.js +2 -2
- package/dist/llm/defaults.yaml +25 -7
- package/dist/llm/gen/anthropic.js +3 -3
- package/dist/llm/gen/codex.d.ts +7 -0
- package/dist/llm/gen/codex.js +30 -13
- package/dist/llm/gen/openai-compatible.js +3 -3
- package/dist/llm/gen/openai.js +19 -9
- package/dist/llm/kernel-driver/drive.js +47 -30
- package/dist/llm/kernel-driver/fbr.d.ts +39 -0
- package/dist/llm/kernel-driver/fbr.js +279 -0
- package/dist/llm/kernel-driver/flow.js +8 -8
- package/dist/llm/kernel-driver/guardrails.d.ts +2 -1
- package/dist/llm/kernel-driver/guardrails.js +37 -38
- package/dist/llm/kernel-driver/runtime.js +8 -8
- package/dist/llm/kernel-driver/subdialog-txn.js +1 -1
- package/dist/llm/kernel-driver/subdialog.js +6 -39
- package/dist/llm/kernel-driver/tellask-special.js +175 -82
- package/dist/markdown/frontmatter.d.ts +7 -0
- package/dist/markdown/frontmatter.js +44 -0
- package/dist/mcp/supervisor.js +5 -5
- package/dist/minds/load.js +9 -3
- package/dist/minds/system-prompt-parts.js +1 -1
- package/dist/minds/system-prompt.js +1 -1
- package/dist/persistence.js +2 -2
- package/dist/priming.js +3 -3
- package/dist/problems.d.ts +8 -0
- package/dist/problems.js +76 -2
- package/dist/runtime/async-fifo-mutex.d.ts +12 -0
- package/dist/runtime/async-fifo-mutex.js +36 -0
- package/dist/runtime/driver-messages.d.ts +39 -0
- package/dist/runtime/driver-messages.js +426 -0
- package/dist/runtime/fbr-body.d.ts +10 -0
- package/dist/runtime/fbr-body.js +42 -0
- package/dist/runtime/i18n-text.d.ts +6 -0
- package/dist/runtime/i18n-text.js +9 -0
- package/dist/runtime/inter-dialog-format.d.ts +73 -0
- package/dist/runtime/inter-dialog-format.js +297 -0
- package/dist/runtime/markdown-format.d.ts +1 -0
- package/dist/runtime/markdown-format.js +9 -0
- package/dist/runtime/tool-result-messages.d.ts +5 -0
- package/dist/runtime/tool-result-messages.js +51 -0
- package/dist/runtime/work-language.d.ts +11 -0
- package/dist/runtime/work-language.js +47 -0
- package/dist/server/api-routes.js +9 -4
- package/dist/server/setup-routes.js +2 -0
- package/dist/server/websocket-handler.d.ts +0 -5
- package/dist/server/websocket-handler.js +13 -8
- package/dist/server.js +5 -5
- package/dist/shared/utils/fbr.js +12 -8
- package/dist/shared/utils/inter-dialog-format.js +6 -4
- package/dist/skills/load.js +2 -2
- package/dist/team-config-updates.js +1 -1
- package/dist/team.d.ts +3 -2
- package/dist/team.js +12 -1
- package/dist/tools/app-reminders.js +4 -4
- package/dist/tools/apply-patch.js +3 -3
- package/dist/tools/ctrl.js +9 -9
- package/dist/tools/fs.js +7 -7
- package/dist/tools/mcp.js +3 -3
- package/dist/tools/mem.js +10 -10
- package/dist/tools/os.js +8 -8
- package/dist/tools/pending-tellask-reminder.js +6 -6
- package/dist/tools/plan.js +4 -4
- package/dist/tools/prompts/team_mgmt/en/errors.md +2 -2
- package/dist/tools/prompts/team_mgmt/en/scenarios.md +3 -3
- package/dist/tools/prompts/team_mgmt/en/tools.md +6 -2
- package/dist/tools/prompts/team_mgmt/zh/errors.md +2 -2
- package/dist/tools/prompts/team_mgmt/zh/scenarios.md +3 -3
- package/dist/tools/prompts/team_mgmt/zh/tools.md +20 -16
- package/dist/tools/prompts/team_mgmt.en.md +2 -2
- package/dist/tools/prompts/team_mgmt.zh.md +2 -2
- package/dist/tools/registry-snapshot.js +1 -1
- package/dist/tools/team_mgmt.d.ts +2 -0
- package/dist/tools/team_mgmt.js +468 -62
- package/dist/tools/toolset-manual.js +2 -2
- package/dist/tools/txt.js +10 -10
- package/dist/utils/taskdoc-search.js +16 -1
- package/dist/utils/taskdoc.js +2 -2
- package/package.json +2 -2
- package/webapp/dist/assets/{_basePickBy-p_FLYxUB.js → _basePickBy-BCSeQ8Mb.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-p_FLYxUB.js.map → _basePickBy-BCSeQ8Mb.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-DOyVMmph.js → _baseUniq-B5WIJgde.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-DOyVMmph.js.map → _baseUniq-B5WIJgde.js.map} +1 -1
- package/webapp/dist/assets/{arc-CGiesLhn.js → arc-CWDgoT74.js} +2 -2
- package/webapp/dist/assets/{arc-CGiesLhn.js.map → arc-CWDgoT74.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-BHAsFH7p.js → architectureDiagram-2XIMDMQ5-DFdZI4Uu.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-BHAsFH7p.js.map → architectureDiagram-2XIMDMQ5-DFdZI4Uu.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-D5twe3l4.js → blockDiagram-WCTKOSBZ-DRcKQf9Q.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-D5twe3l4.js.map → blockDiagram-WCTKOSBZ-DRcKQf9Q.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BlYpIPtB.js → c4Diagram-IC4MRINW-B0AMlCwV.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BlYpIPtB.js.map → c4Diagram-IC4MRINW-B0AMlCwV.js.map} +1 -1
- package/webapp/dist/assets/{channel-B17KbYat.js → channel-B0ljx2su.js} +2 -2
- package/webapp/dist/assets/{channel-B17KbYat.js.map → channel-B0ljx2su.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-lrScLXR8.js → chunk-4BX2VUAB-DbKTqY07.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-lrScLXR8.js.map → chunk-4BX2VUAB-DbKTqY07.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-gQXchNSL.js → chunk-55IACEB6-DwJgszOl.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-gQXchNSL.js.map → chunk-55IACEB6-DwJgszOl.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-DNrvbONw.js → chunk-FMBD7UC4-BzUcOjMH.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-DNrvbONw.js.map → chunk-FMBD7UC4-BzUcOjMH.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-Bl5wBjOA.js → chunk-JSJVCQXG-B-adw7iw.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-Bl5wBjOA.js.map → chunk-JSJVCQXG-B-adw7iw.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-BiyIObsM.js → chunk-KX2RTZJC-a1S8VCMi.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-BiyIObsM.js.map → chunk-KX2RTZJC-a1S8VCMi.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-D06lLk1n.js → chunk-NQ4KR5QH-BkpgGRb2.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-D06lLk1n.js.map → chunk-NQ4KR5QH-BkpgGRb2.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-BWfa3ZSp.js → chunk-QZHKN3VN-BzG0M8E7.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-BWfa3ZSp.js.map → chunk-QZHKN3VN-BzG0M8E7.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-B88KZXwP.js → chunk-WL4C6EOR-Jdr3sqWq.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-B88KZXwP.js.map → chunk-WL4C6EOR-Jdr3sqWq.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-Do2CJG-b.js → classDiagram-VBA2DB6C-Bgs-IGF1.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-Do2CJG-b.js.map → classDiagram-VBA2DB6C-Bgs-IGF1.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-Do2CJG-b.js → classDiagram-v2-RAHNMMFH-Bgs-IGF1.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-Do2CJG-b.js.map → classDiagram-v2-RAHNMMFH-Bgs-IGF1.js.map} +1 -1
- package/webapp/dist/assets/{clone-2_rmaZjp.js → clone-8W6qtrsz.js} +2 -2
- package/webapp/dist/assets/{clone-2_rmaZjp.js.map → clone-8W6qtrsz.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CKqz88LV.js → cose-bilkent-S5V4N54A-gwXVRMa3.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CKqz88LV.js.map → cose-bilkent-S5V4N54A-gwXVRMa3.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-CDPJqGYU.js → dagre-KLK3FWXG-CgLK6cUW.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-CDPJqGYU.js.map → dagre-KLK3FWXG-CgLK6cUW.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-6hBHJ24w.js → diagram-E7M64L7V-BUDea9FM.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-6hBHJ24w.js.map → diagram-E7M64L7V-BUDea9FM.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-CcHFXWUK.js → diagram-IFDJBPK2-CiVS6fbK.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-CcHFXWUK.js.map → diagram-IFDJBPK2-CiVS6fbK.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-BUnW3ZXQ.js → diagram-P4PSJMXO-DpYGO4Wi.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-BUnW3ZXQ.js.map → diagram-P4PSJMXO-DpYGO4Wi.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-DPXabBgU.js → erDiagram-INFDFZHY-Cz1TI05E.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-DPXabBgU.js.map → erDiagram-INFDFZHY-Cz1TI05E.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-BvWvbd03.js → flowDiagram-PKNHOUZH-CxjVowsG.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-BvWvbd03.js.map → flowDiagram-PKNHOUZH-CxjVowsG.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-vkN5mDwT.js → ganttDiagram-A5KZAMGK-C3t2AHs5.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-vkN5mDwT.js.map → ganttDiagram-A5KZAMGK-C3t2AHs5.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-LW5Kz-rM.js → gitGraphDiagram-K3NZZRJ6-D3Fz3qNA.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-LW5Kz-rM.js.map → gitGraphDiagram-K3NZZRJ6-D3Fz3qNA.js.map} +1 -1
- package/webapp/dist/assets/{graph-B2Hdw72q.js → graph-DEeBvsT_.js} +3 -3
- package/webapp/dist/assets/{graph-B2Hdw72q.js.map → graph-DEeBvsT_.js.map} +1 -1
- package/webapp/dist/assets/{index-Dzo3pRxk.js → index-D-SgXZTb.js} +54 -57
- package/webapp/dist/assets/index-D-SgXZTb.js.map +1 -0
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DvIbffvQ.js → infoDiagram-LFFYTUFH-CcsQeBG4.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DvIbffvQ.js.map → infoDiagram-LFFYTUFH-CcsQeBG4.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-sGhcEObJ.js → ishikawaDiagram-PHBUUO56-CAV8iv45.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-sGhcEObJ.js.map → ishikawaDiagram-PHBUUO56-CAV8iv45.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CpYH21tW.js → journeyDiagram-4ABVD52K-C_mKL3Wf.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CpYH21tW.js.map → journeyDiagram-4ABVD52K-C_mKL3Wf.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BiRYQ0uj.js → kanban-definition-K7BYSVSG-Ptg6jh3y.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BiRYQ0uj.js.map → kanban-definition-K7BYSVSG-Ptg6jh3y.js.map} +1 -1
- package/webapp/dist/assets/{layout-okihjLBI.js → layout-vY-lESK1.js} +5 -5
- package/webapp/dist/assets/{layout-okihjLBI.js.map → layout-vY-lESK1.js.map} +1 -1
- package/webapp/dist/assets/{linear-DYaYsDyY.js → linear-Cw12N-49.js} +2 -2
- package/webapp/dist/assets/{linear-DYaYsDyY.js.map → linear-Cw12N-49.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-CSrZmIYT.js → mindmap-definition-YRQLILUH--gGSoZfe.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-CSrZmIYT.js.map → mindmap-definition-YRQLILUH--gGSoZfe.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-DpEvc7ey.js → pieDiagram-SKSYHLDU-DBQkeFNk.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-DpEvc7ey.js.map → pieDiagram-SKSYHLDU-DBQkeFNk.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-A1Evs-qI.js → quadrantDiagram-337W2JSQ-BRqQEQ5R.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-A1Evs-qI.js.map → quadrantDiagram-337W2JSQ-BRqQEQ5R.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-Da-TuLlB.js → requirementDiagram-Z7DCOOCP-Bg-ZQVHw.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-Da-TuLlB.js.map → requirementDiagram-Z7DCOOCP-Bg-ZQVHw.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-DH24Lrug.js → sankeyDiagram-WA2Y5GQK-ADkSZ215.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-DH24Lrug.js.map → sankeyDiagram-WA2Y5GQK-ADkSZ215.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-BayDtOQN.js → sequenceDiagram-2WXFIKYE-D4N6ze3Y.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-BayDtOQN.js.map → sequenceDiagram-2WXFIKYE-D4N6ze3Y.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-C88pKwCL.js → stateDiagram-RAJIS63D-vNdpo2RN.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-C88pKwCL.js.map → stateDiagram-RAJIS63D-vNdpo2RN.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BH48Boiw.js → stateDiagram-v2-FVOUBMTO-DklmFziq.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BH48Boiw.js.map → stateDiagram-v2-FVOUBMTO-DklmFziq.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-Co73nLWa.js → timeline-definition-YZTLITO2-BrGjv8Mt.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-Co73nLWa.js.map → timeline-definition-YZTLITO2-BrGjv8Mt.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-BZvYsHrD.js → treemap-KZPCXAKY-CuF9Fl6a.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-BZvYsHrD.js.map → treemap-KZPCXAKY-CuF9Fl6a.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-CaNMvHKJ.js → vennDiagram-LZ73GAT5-BsWMgmkQ.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-CaNMvHKJ.js.map → vennDiagram-LZ73GAT5-BsWMgmkQ.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-L1MT4IU4.js → xychartDiagram-JWTSCODW-MwmjJKc5.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-L1MT4IU4.js.map → xychartDiagram-JWTSCODW-MwmjJKc5.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
- package/webapp/dist/assets/index-Dzo3pRxk.js.map +0 -1
package/dist/apps/problems.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reconcileAppsResolutionIssuesToProblems = reconcileAppsResolutionIssuesToProblems;
|
|
4
|
+
const time_1 = require("@longrun-ai/kernel/utils/time");
|
|
4
5
|
const problems_1 = require("../problems");
|
|
5
|
-
const time_1 = require("../shared/utils/time");
|
|
6
6
|
const APPS_PROBLEM_PREFIX = 'apps/apps_resolution/';
|
|
7
7
|
function sanitizeProblemIdSegment(segment) {
|
|
8
8
|
return segment.replace(/[^a-zA-Z0-9_-]/g, '_');
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type DotenvLoadResult = Readonly<{
|
|
2
|
+
cwd: string;
|
|
3
|
+
loadedFiles: ReadonlyArray<'.env' | '.env.local'>;
|
|
4
|
+
errors: ReadonlyArray<Readonly<{
|
|
5
|
+
file: '.env' | '.env.local';
|
|
6
|
+
lineNumber: number;
|
|
7
|
+
raw: string;
|
|
8
|
+
reason: 'missing_equals' | 'empty_key' | 'invalid_key';
|
|
9
|
+
}>>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function loadRtwsDotenv(params?: Readonly<{
|
|
12
|
+
cwd?: string;
|
|
13
|
+
}>): DotenvLoadResult;
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.loadRtwsDotenv = loadRtwsDotenv;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
function isEnvKeyValid(key) {
|
|
40
|
+
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(key);
|
|
41
|
+
}
|
|
42
|
+
function unescapeDoubleQuoted(value) {
|
|
43
|
+
let out = '';
|
|
44
|
+
for (let i = 0; i < value.length; i++) {
|
|
45
|
+
const ch = value[i];
|
|
46
|
+
if (ch !== '\\') {
|
|
47
|
+
out += ch;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const next = value[i + 1];
|
|
51
|
+
if (next === undefined) {
|
|
52
|
+
out += '\\';
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
i++;
|
|
56
|
+
if (next === 'n')
|
|
57
|
+
out += '\n';
|
|
58
|
+
else if (next === 'r')
|
|
59
|
+
out += '\r';
|
|
60
|
+
else if (next === 't')
|
|
61
|
+
out += '\t';
|
|
62
|
+
else if (next === '\\')
|
|
63
|
+
out += '\\';
|
|
64
|
+
else if (next === '"')
|
|
65
|
+
out += '"';
|
|
66
|
+
else
|
|
67
|
+
out += next;
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
function stripInlineCommentFromUnquotedValue(raw) {
|
|
72
|
+
// Strip `# ...` only when it is preceded by whitespace.
|
|
73
|
+
for (let i = 0; i < raw.length; i++) {
|
|
74
|
+
const ch = raw[i];
|
|
75
|
+
if (ch !== '#')
|
|
76
|
+
continue;
|
|
77
|
+
if (i === 0)
|
|
78
|
+
return '';
|
|
79
|
+
const prev = raw[i - 1];
|
|
80
|
+
if (prev === ' ' || prev === '\t')
|
|
81
|
+
return raw.slice(0, i).trimEnd();
|
|
82
|
+
}
|
|
83
|
+
return raw.trimEnd();
|
|
84
|
+
}
|
|
85
|
+
function parseLine(line) {
|
|
86
|
+
const trimmed = line.trim();
|
|
87
|
+
if (trimmed.length === 0)
|
|
88
|
+
return { kind: 'skip' };
|
|
89
|
+
if (trimmed.startsWith('#'))
|
|
90
|
+
return { kind: 'skip' };
|
|
91
|
+
const withoutExport = trimmed.startsWith('export ')
|
|
92
|
+
? trimmed.slice('export '.length).trim()
|
|
93
|
+
: trimmed;
|
|
94
|
+
const equalsIndex = withoutExport.indexOf('=');
|
|
95
|
+
if (equalsIndex < 0)
|
|
96
|
+
return { kind: 'error', reason: 'missing_equals' };
|
|
97
|
+
const rawKey = withoutExport.slice(0, equalsIndex).trim();
|
|
98
|
+
if (rawKey.length === 0)
|
|
99
|
+
return { kind: 'error', reason: 'empty_key' };
|
|
100
|
+
if (!isEnvKeyValid(rawKey))
|
|
101
|
+
return { kind: 'error', reason: 'invalid_key' };
|
|
102
|
+
let rawValue = withoutExport.slice(equalsIndex + 1).trim();
|
|
103
|
+
if (rawValue.length >= 2 && rawValue.startsWith('"') && rawValue.endsWith('"')) {
|
|
104
|
+
rawValue = unescapeDoubleQuoted(rawValue.slice(1, -1));
|
|
105
|
+
}
|
|
106
|
+
else if (rawValue.length >= 2 && rawValue.startsWith("'") && rawValue.endsWith("'")) {
|
|
107
|
+
rawValue = rawValue.slice(1, -1);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
rawValue = stripInlineCommentFromUnquotedValue(rawValue);
|
|
111
|
+
}
|
|
112
|
+
return { kind: 'entry', key: rawKey, value: rawValue };
|
|
113
|
+
}
|
|
114
|
+
function loadRtwsDotenv(params) {
|
|
115
|
+
const cwd = params && typeof params.cwd === 'string' ? params.cwd : process.cwd();
|
|
116
|
+
const files = ['.env', '.env.local'];
|
|
117
|
+
const loadedFiles = [];
|
|
118
|
+
const errors = [];
|
|
119
|
+
for (const file of files) {
|
|
120
|
+
const absPath = path.join(cwd, file);
|
|
121
|
+
if (!fs.existsSync(absPath))
|
|
122
|
+
continue;
|
|
123
|
+
loadedFiles.push(file);
|
|
124
|
+
const content = fs.readFileSync(absPath, 'utf8');
|
|
125
|
+
const lines = content.split(/\r?\n/);
|
|
126
|
+
for (let i = 0; i < lines.length; i++) {
|
|
127
|
+
const raw = lines[i];
|
|
128
|
+
const parsed = parseLine(raw);
|
|
129
|
+
if (parsed.kind === 'skip')
|
|
130
|
+
continue;
|
|
131
|
+
if (parsed.kind === 'error') {
|
|
132
|
+
errors.push({ file, lineNumber: i + 1, raw, reason: parsed.reason });
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (parsed.kind === 'entry') {
|
|
136
|
+
process.env[parsed.key] = parsed.value;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
const _exhaustive = parsed;
|
|
140
|
+
throw new Error(`Unexpected dotenv parse result: ${String(_exhaustive)}`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return { cwd, loadedFiles, errors };
|
|
144
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.extractGlobalRtwsChdir = extractGlobalRtwsChdir;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
function extractGlobalRtwsChdir(params) {
|
|
39
|
+
let chdir;
|
|
40
|
+
const out = [];
|
|
41
|
+
for (let i = 0; i < params.argv.length; i++) {
|
|
42
|
+
const arg = params.argv[i];
|
|
43
|
+
if (arg === '--') {
|
|
44
|
+
out.push(...params.argv.slice(i));
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
if (arg === '-C' || arg === '--cwd' || arg === '--chdir') {
|
|
48
|
+
const next = params.argv[i + 1];
|
|
49
|
+
if (typeof next !== 'string' || next.length === 0 || next === '--') {
|
|
50
|
+
throw new Error(`${arg} requires a directory argument`);
|
|
51
|
+
}
|
|
52
|
+
chdir = path.isAbsolute(next) ? next : path.resolve(params.baseCwd, next);
|
|
53
|
+
i++;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (arg.startsWith('--cwd=')) {
|
|
57
|
+
const value = arg.slice('--cwd='.length);
|
|
58
|
+
if (value.length === 0)
|
|
59
|
+
throw new Error(`--cwd requires a directory argument`);
|
|
60
|
+
chdir = path.isAbsolute(value) ? value : path.resolve(params.baseCwd, value);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (arg.startsWith('--chdir=')) {
|
|
64
|
+
const value = arg.slice('--chdir='.length);
|
|
65
|
+
if (value.length === 0)
|
|
66
|
+
throw new Error(`--chdir requires a directory argument`);
|
|
67
|
+
chdir = path.isAbsolute(value) ? value : path.resolve(params.baseCwd, value);
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
out.push(arg);
|
|
71
|
+
}
|
|
72
|
+
return { chdir, argv: out };
|
|
73
|
+
}
|
package/dist/cli/webui.js
CHANGED
|
@@ -16,9 +16,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.main = main;
|
|
17
17
|
const child_process_1 = require("child_process");
|
|
18
18
|
const log_1 = require("../log");
|
|
19
|
+
const work_language_1 = require("../runtime/work-language");
|
|
19
20
|
const server_1 = require("../server");
|
|
20
21
|
const auth_1 = require("../server/auth");
|
|
21
|
-
const runtime_language_1 = require("../shared/runtime-language");
|
|
22
22
|
const log = (0, log_1.createLogger)('webui');
|
|
23
23
|
function printHelp() {
|
|
24
24
|
console.log(`
|
|
@@ -111,9 +111,9 @@ async function main() {
|
|
|
111
111
|
}
|
|
112
112
|
log.info('Starting Dominds WebUI…');
|
|
113
113
|
try {
|
|
114
|
-
const { language: resolvedLanguage, source } = (0,
|
|
115
|
-
(0,
|
|
116
|
-
log.info(`working language: ${(0,
|
|
114
|
+
const { language: resolvedLanguage, source } = (0, work_language_1.resolveWorkLanguage)({ env: process.env });
|
|
115
|
+
(0, work_language_1.setWorkLanguage)(resolvedLanguage);
|
|
116
|
+
log.info(`working language: ${(0, work_language_1.getWorkLanguage)()} (source: ${source})`);
|
|
117
117
|
const started = await (0, server_1.startServer)({ port, host, mode });
|
|
118
118
|
const httpServer = started.httpServer;
|
|
119
119
|
const auth = started.auth;
|
package/dist/cli.js
CHANGED
|
@@ -64,6 +64,8 @@ exports.main = main;
|
|
|
64
64
|
const fs = __importStar(require("fs"));
|
|
65
65
|
const path = __importStar(require("path"));
|
|
66
66
|
const runtime_1 = require("./apps/runtime");
|
|
67
|
+
const dotenv_1 = require("./bootstrap/dotenv");
|
|
68
|
+
const rtws_cli_1 = require("./bootstrap/rtws-cli");
|
|
67
69
|
const create_1 = require("./cli/create");
|
|
68
70
|
const disable_1 = require("./cli/disable");
|
|
69
71
|
const doctor_1 = require("./cli/doctor");
|
|
@@ -75,8 +77,6 @@ const tui_1 = require("./cli/tui");
|
|
|
75
77
|
const uninstall_1 = require("./cli/uninstall");
|
|
76
78
|
const update_1 = require("./cli/update");
|
|
77
79
|
const webui_1 = require("./cli/webui");
|
|
78
|
-
const dotenv_1 = require("./shared/dotenv");
|
|
79
|
-
const rtws_cli_1 = require("./shared/rtws-cli");
|
|
80
80
|
require("./tools/builtins");
|
|
81
81
|
function printHelp() {
|
|
82
82
|
console.log(`
|
|
@@ -34,11 +34,11 @@ exports.computeIdleDisplayState = computeIdleDisplayState;
|
|
|
34
34
|
exports.reconcileDisplayStatesAfterRestart = reconcileDisplayStatesAfterRestart;
|
|
35
35
|
exports.requestInterruptDialog = requestInterruptDialog;
|
|
36
36
|
exports.requestEmergencyStopAll = requestEmergencyStopAll;
|
|
37
|
+
const time_1 = require("@longrun-ai/kernel/utils/time");
|
|
37
38
|
const dialog_1 = require("./dialog");
|
|
38
39
|
const evt_registry_1 = require("./evt-registry");
|
|
39
40
|
const log_1 = require("./log");
|
|
40
41
|
const persistence_1 = require("./persistence");
|
|
41
|
-
const time_1 = require("./shared/utils/time");
|
|
42
42
|
const log = (0, log_1.createLogger)('dialog-display-state');
|
|
43
43
|
let broadcastToClients;
|
|
44
44
|
const activeRunsByDialogKey = new Map();
|
package/dist/dialog-fork.js
CHANGED
|
@@ -7,9 +7,9 @@ exports.forkRootDialogTreeAtGeneration = forkRootDialogTreeAtGeneration;
|
|
|
7
7
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const storage_1 = require("@longrun-ai/kernel/types/storage");
|
|
10
|
+
const time_1 = require("@longrun-ai/kernel/utils/time");
|
|
10
11
|
const dialog_1 = require("./dialog");
|
|
11
12
|
const persistence_1 = require("./persistence");
|
|
12
|
-
const time_1 = require("./shared/utils/time");
|
|
13
13
|
const id_1 = require("./utils/id");
|
|
14
14
|
const FORK_BASELINE_ANCHOR = (0, storage_1.toRootGenerationAnchor)({
|
|
15
15
|
rootCourse: 1,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.globalDialogRegistry = void 0;
|
|
4
|
+
const evt_1 = require("@longrun-ai/kernel/evt");
|
|
4
5
|
const persistence_1 = require("./persistence");
|
|
5
|
-
const evt_1 = require("./shared/evt");
|
|
6
6
|
class GlobalDialogRegistry {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.entries = new Map();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOrRestoreRootDialog = getOrRestoreRootDialog;
|
|
4
4
|
exports.ensureDialogLoaded = ensureDialogLoaded;
|
|
5
|
+
const diligence_1 = require("@longrun-ai/kernel/diligence");
|
|
5
6
|
const dialog_1 = require("./dialog");
|
|
6
7
|
const dialog_global_registry_1 = require("./dialog-global-registry");
|
|
7
8
|
const persistence_1 = require("./persistence");
|
|
8
|
-
const diligence_1 = require("./shared/diligence");
|
|
9
9
|
const team_1 = require("./team");
|
|
10
10
|
function resolveMemberDiligencePushMax(team, agentId) {
|
|
11
11
|
const member = team.getMember(agentId);
|
package/dist/dialog.d.ts
CHANGED
|
@@ -417,9 +417,12 @@ export declare class SubDialog extends Dialog {
|
|
|
417
417
|
readonly sessionSlug?: string;
|
|
418
418
|
assignmentFromSup: AssignmentFromSup;
|
|
419
419
|
protected readonly _supdialog: Dialog;
|
|
420
|
+
private _fbrConclusionToolsEnabled;
|
|
420
421
|
constructor(dlgStore: DialogStore, rootDialog: RootDialog, taskDocPath: string, id: DialogID | undefined, agentId: string, assignmentFromSup: AssignmentFromSup, sessionSlug?: string, initialState?: DialogInitParams['initialState']);
|
|
421
422
|
get supdialog(): Dialog;
|
|
422
423
|
get status(): 'running' | 'completed' | 'archived';
|
|
424
|
+
setFbrConclusionToolsEnabled(enabled: boolean): void;
|
|
425
|
+
areFbrConclusionToolsEnabled(): boolean;
|
|
423
426
|
/**
|
|
424
427
|
* Create a subdialog under the same root dialog tree.
|
|
425
428
|
* The new subdialog's effective supdialog is resolved via AssignmentFromSup.callerDialogId.
|
package/dist/dialog.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DialogStore = exports.RootDialog = exports.SubDialog = exports.Dialog = exports.DialogID = void 0;
|
|
4
|
+
const id_1 = require("@longrun-ai/kernel/utils/id");
|
|
5
|
+
const time_1 = require("@longrun-ai/kernel/utils/time");
|
|
4
6
|
const util_1 = require("util");
|
|
5
7
|
const evt_registry_1 = require("./evt-registry");
|
|
6
8
|
const log_1 = require("./log");
|
|
7
|
-
const async_fifo_mutex_1 = require("./
|
|
8
|
-
const driver_messages_1 = require("./
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const inter_dialog_format_1 = require("./shared/utils/inter-dialog-format");
|
|
12
|
-
const time_1 = require("./shared/utils/time");
|
|
9
|
+
const async_fifo_mutex_1 = require("./runtime/async-fifo-mutex");
|
|
10
|
+
const driver_messages_1 = require("./runtime/driver-messages");
|
|
11
|
+
const inter_dialog_format_1 = require("./runtime/inter-dialog-format");
|
|
12
|
+
const work_language_1 = require("./runtime/work-language");
|
|
13
13
|
const tool_1 = require("./tool");
|
|
14
14
|
const id_2 = require("./utils/id");
|
|
15
15
|
class DialogID {
|
|
@@ -124,8 +124,8 @@ class Dialog {
|
|
|
124
124
|
this._createdAt = initialState?.createdAt || now;
|
|
125
125
|
this._updatedAt = initialState?.updatedAt || now;
|
|
126
126
|
this._currentCourse = initialState?.currentCourse || 1;
|
|
127
|
-
this._uiLanguage = (0,
|
|
128
|
-
this._lastUserLanguageCode = (0,
|
|
127
|
+
this._uiLanguage = (0, work_language_1.getWorkLanguage)();
|
|
128
|
+
this._lastUserLanguageCode = (0, work_language_1.getWorkLanguage)();
|
|
129
129
|
this._lastContextHealth = initialState?.contextHealth;
|
|
130
130
|
this._lastContextHealthGenseq = undefined;
|
|
131
131
|
this.resetCourseLanguageNotice();
|
|
@@ -170,14 +170,14 @@ class Dialog {
|
|
|
170
170
|
}
|
|
171
171
|
resetCourseLanguageNotice() {
|
|
172
172
|
this._courseRuntimeNoticeMsgs = [
|
|
173
|
-
this.buildCourseRuntimeNotice((0, driver_messages_1.formatCurrentUserLanguagePreference)((0,
|
|
173
|
+
this.buildCourseRuntimeNotice((0, driver_messages_1.formatCurrentUserLanguagePreference)((0, work_language_1.getWorkLanguage)(), this._lastUserLanguageCode)),
|
|
174
174
|
];
|
|
175
175
|
}
|
|
176
176
|
appendCourseLanguageChangedNotice(previousLanguage, nextLanguage) {
|
|
177
177
|
if (previousLanguage === nextLanguage) {
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
this._courseRuntimeNoticeMsgs.push(this.buildCourseRuntimeNotice((0, driver_messages_1.formatUserLanguagePreferenceChangedNotice)((0,
|
|
180
|
+
this._courseRuntimeNoticeMsgs.push(this.buildCourseRuntimeNotice((0, driver_messages_1.formatUserLanguagePreferenceChangedNotice)((0, work_language_1.getWorkLanguage)(), previousLanguage, nextLanguage)));
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
183
|
* Get the current callId for tellask call correlation
|
|
@@ -758,7 +758,7 @@ class Dialog {
|
|
|
758
758
|
callName: this.assignmentFromSup.callName,
|
|
759
759
|
mentionList: this.assignmentFromSup.mentionList,
|
|
760
760
|
tellaskContent: this.assignmentFromSup.tellaskContent,
|
|
761
|
-
language: (0,
|
|
761
|
+
language: (0, work_language_1.getWorkLanguage)(),
|
|
762
762
|
collectiveTargets: this.assignmentFromSup.collectiveTargets ?? [this.agentId],
|
|
763
763
|
})}\n---\n${trimmedPrompt}`
|
|
764
764
|
: trimmedPrompt;
|
|
@@ -1049,6 +1049,7 @@ exports.Dialog = Dialog;
|
|
|
1049
1049
|
class SubDialog extends Dialog {
|
|
1050
1050
|
constructor(dlgStore, rootDialog, taskDocPath, id, agentId, assignmentFromSup, sessionSlug, initialState) {
|
|
1051
1051
|
super(dlgStore, taskDocPath, id, agentId, initialState);
|
|
1052
|
+
this._fbrConclusionToolsEnabled = false;
|
|
1052
1053
|
this.rootDialog = rootDialog;
|
|
1053
1054
|
this.sessionSlug = sessionSlug;
|
|
1054
1055
|
this.assignmentFromSup = assignmentFromSup;
|
|
@@ -1072,6 +1073,12 @@ class SubDialog extends Dialog {
|
|
|
1072
1073
|
get status() {
|
|
1073
1074
|
return this.rootDialog.status;
|
|
1074
1075
|
}
|
|
1076
|
+
setFbrConclusionToolsEnabled(enabled) {
|
|
1077
|
+
this._fbrConclusionToolsEnabled = enabled;
|
|
1078
|
+
}
|
|
1079
|
+
areFbrConclusionToolsEnabled() {
|
|
1080
|
+
return this._fbrConclusionToolsEnabled;
|
|
1081
|
+
}
|
|
1075
1082
|
/**
|
|
1076
1083
|
* Create a subdialog under the same root dialog tree.
|
|
1077
1084
|
* The new subdialog's effective supdialog is resolved via AssignmentFromSup.callerDialogId.
|
|
@@ -188,7 +188,7 @@ Recommended principles:
|
|
|
188
188
|
#### Public import surface (current contract)
|
|
189
189
|
|
|
190
190
|
- The package split is now the contract. Formal consumers should depend on `@longrun-ai/kernel` for app/runtime-facing contracts, and use `@longrun-ai/shell` only when a shell-facing contract is explicitly defined there; they must not depend on `dominds/main/**` or any root-package aggregation shim.
|
|
191
|
-
- `dominds/main/**`, `dominds/main/
|
|
191
|
+
- `dominds/main/**` is a private implementation tree. Paths such as `dominds/main/runtime/**`, `dominds/main/bootstrap/**`, `dominds/main/markdown/**`, and `dominds/main/apps-host/**` are repo-internal source organization only, not a source-level public surface.
|
|
192
192
|
- `dominds/main/index.ts` is intentionally gone. The repo must not keep a legacy aggregation entry that suggests `main pkg` still offers a consumer import contract.
|
|
193
193
|
- `tests/**` is explicitly **not** evidence for widening the public surface. Test convenience imports must not turn private implementation modules into de-facto public API.
|
|
194
194
|
|
|
@@ -197,7 +197,7 @@ The boundary must be written once, in the actual published package contracts:
|
|
|
197
197
|
- `packages/kernel/package.json#exports` defines the supported `@longrun-ai/kernel` surface.
|
|
198
198
|
- `packages/shell/package.json#exports` defines the supported shell-facing `@longrun-ai/shell` surface; it does not imply CLI or integrated runtime ownership.
|
|
199
199
|
- `dominds/package.json#exports` is limited to CLI/aggregation-shell entrypoints such as `./cli`; it must not grow a root runtime import surface again.
|
|
200
|
-
- Published package resolution must reject deep imports such as `dominds/main/**`, `dominds/main/
|
|
200
|
+
- Published package resolution must reject deep imports such as `dominds/main/**`, `dominds/main/runtime/**`, `dominds/main/bootstrap/**`, `dominds/main/markdown/**`, `dominds/main/apps-host/**`, and `dominds/dist/**`.
|
|
201
201
|
|
|
202
202
|
Keep the responsibilities split cleanly:
|
|
203
203
|
|
|
@@ -187,7 +187,7 @@ Install JSON 是 app 与 Kernel/CLI 之间的**安装/运行握手载荷**。它
|
|
|
187
187
|
#### 对外导入面(当前正式 contract)
|
|
188
188
|
|
|
189
189
|
- package 拆分本身已经是正式 contract。对外正式 consumer 对 app/runtime-facing contract 应依赖 `@longrun-ai/kernel`;只有在 shell-facing contract 被明确放入 shell 包时才应依赖 `@longrun-ai/shell`;不得依赖 `dominds/main/**` 或任何 root-package 聚合中转层。
|
|
190
|
-
- `dominds/main/**`、`dominds/main/
|
|
190
|
+
- `dominds/main/**` 整体都是私有实现树;其中 `dominds/main/runtime/**`、`dominds/main/bootstrap/**`、`dominds/main/markdown/**`、`dominds/main/apps-host/**` 这类路径都只服务仓内源码组织,不再构成任何源码层公开面。
|
|
191
191
|
- `dominds/main/index.ts` 已被有意删除。仓内不得再保留这种 legacy 聚合入口,否则会继续制造“main pkg 仍提供 consumer import contract”的错误心智。
|
|
192
192
|
- `tests/**` 被明确排除在公开面扩张依据之外。测试写起来方便,不足以把私有实现模块抬升成事实上的 public API。
|
|
193
193
|
|
|
@@ -196,7 +196,7 @@ Install JSON 是 app 与 Kernel/CLI 之间的**安装/运行握手载荷**。它
|
|
|
196
196
|
- `packages/kernel/package.json#exports` 定义受支持的 `@longrun-ai/kernel` 导入面。
|
|
197
197
|
- `packages/shell/package.json#exports` 定义受支持的 shell-facing `@longrun-ai/shell` 导入面;它不意味着 CLI 或 integrated runtime 归 shell 包承载。
|
|
198
198
|
- `dominds/package.json#exports` 仅限 CLI/聚合壳入口(如 `./cli`);不得再长出 root runtime import surface。
|
|
199
|
-
- 发布态 package resolution 必须拒绝 `dominds/main/**`、`dominds/main/
|
|
199
|
+
- 发布态 package resolution 必须拒绝 `dominds/main/**`、`dominds/main/runtime/**`、`dominds/main/bootstrap/**`、`dominds/main/markdown/**`、`dominds/main/apps-host/**`、`dominds/dist/**` 这类 deep import。
|
|
200
200
|
|
|
201
201
|
职责切分应保持清晰:
|
|
202
202
|
|
|
@@ -986,7 +986,7 @@ At the start of every subdialog course, the runtime must prepend a role header t
|
|
|
986
986
|
- Chinese variant example: see [the Chinese doc](./dialog-system.zh.md) for the corresponding FBR header example.
|
|
987
987
|
|
|
988
988
|
**Insertion point**: prefer a single insertion point by updating `formatAssignmentFromSupdialog()` (covers `dialog.ts`, `tellask-bridge`).
|
|
989
|
-
|
|
989
|
+
There is no separate frontend twin anymore; [`main/runtime/inter-dialog-format.ts`](../main/runtime/inter-dialog-format.ts) is the authoritative formatter.
|
|
990
990
|
|
|
991
991
|
**Storage**: All subdialogs are stored flat under the main dialog's (root dialog's) `subdialogs/` directory, regardless of nesting depth.
|
|
992
992
|
|
|
@@ -1003,7 +1003,7 @@ interface RegistryMethods {
|
|
|
1003
1003
|
- ZH:`这是一次 FBR 支线对话;诉请者对话为 @xxx(可能与当前对话同一 agent)。`
|
|
1004
1004
|
- EN:`This is an FBR sideline dialog; the tellasker dialog is @xxx (may be the same agent).`
|
|
1005
1005
|
|
|
1006
|
-
**插入点**:优先通过 `formatAssignmentFromSupdialog()` 单点注入(覆盖 `dialog.ts` / `tellask-bridge
|
|
1006
|
+
**插入点**:优先通过 `formatAssignmentFromSupdialog()` 单点注入(覆盖 `dialog.ts` / `tellask-bridge`)。现在不再保留单独的前端 twin;权威格式化实现位于 [`main/runtime/inter-dialog-format.ts`](../main/runtime/inter-dialog-format.ts)。
|
|
1007
1007
|
|
|
1008
1008
|
### 生命周期管理
|
|
1009
1009
|
|
package/dist/docs/fbr.md
CHANGED
|
@@ -14,12 +14,13 @@ The mechanism is the runtime-enforced contract applied to the spawned sideline d
|
|
|
14
14
|
|
|
15
15
|
## 2. Design principles and tradeoffs
|
|
16
16
|
|
|
17
|
-
### 2.1 Predictability first: FBR is tool-less
|
|
17
|
+
### 2.1 Predictability first: FBR is tool-less until final closure
|
|
18
18
|
|
|
19
19
|
FBR is meant to be “reasoning over text”, not “an agent run that explores the environment”. To keep it safe and
|
|
20
20
|
predictable, FBR sideline dialogs must be:
|
|
21
21
|
|
|
22
|
-
- **tool-less by construction** (technically enforced; not “please don’t use tools”), and
|
|
22
|
+
- **tool-less by construction during divergence/convergence** (technically enforced; not “please don’t use tools”), and
|
|
23
|
+
- **closure-only in the final stage** (exactly two conclusion functions, no other tools), and
|
|
23
24
|
- **body-first** (the tellask body is the authoritative task context).
|
|
24
25
|
|
|
25
26
|
### 2.2 No silent failure
|
|
@@ -29,7 +30,7 @@ silent ignore is worse than an error.
|
|
|
29
30
|
|
|
30
31
|
### 2.3 Serial multi-pass reasoning, not “multi-agent collaboration”
|
|
31
32
|
|
|
32
|
-
`fbr-effort` is an FBR intensity setting. Runtime interprets intensity `N` as `N`
|
|
33
|
+
`fbr-effort` is an FBR intensity setting. Runtime interprets intensity `N` as `N` divergence rounds, then `N` convergence rounds, inside a **single FBR sideline conversation window**. The FBR sideline itself must finish denoising and closure before reporting upstream.
|
|
33
34
|
|
|
34
35
|
## 3. User syntax
|
|
35
36
|
|
|
@@ -78,8 +79,8 @@ still inject baseline policy/safety/formatting context, but the tellask body rem
|
|
|
78
79
|
|
|
79
80
|
Tool-less FBR has two layers, both required:
|
|
80
81
|
|
|
81
|
-
1. **Prompt contract**: the runtime must communicate the
|
|
82
|
-
2. **API/transport contract**:
|
|
82
|
+
1. **Prompt contract**: the runtime must communicate the current phase constraints unambiguously.
|
|
83
|
+
2. **API/transport contract**: divergence/convergence must be technically tool-less; final closure may expose exactly two conclusion functions and nothing else.
|
|
83
84
|
|
|
84
85
|
#### 4.2.1 System prompt requirements (no tool instructions)
|
|
85
86
|
|
|
@@ -111,12 +112,17 @@ Under no circumstances should the FBR sideline dialog see any tool definitions.
|
|
|
111
112
|
|
|
112
113
|
#### 4.2.3 The LLM request MUST be “zero tools”
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
For divergence/convergence, the LLM request for an FBR sideline dialog (`freshBootsReasoning`) MUST have **zero tools available**:
|
|
115
116
|
|
|
116
117
|
- the request payload must not include tool/function definitions (effective tool list must be empty)
|
|
117
118
|
- provider tool-calling / function-calling modes must not be enabled
|
|
118
119
|
|
|
119
|
-
|
|
120
|
+
In the final closure phase, runtime MAY expose exactly these two functions and no others:
|
|
121
|
+
|
|
122
|
+
- `presentLowNoiseHighlyInformativeConclusion({ content })`
|
|
123
|
+
- `presentUnreasonableSituation({ content })`
|
|
124
|
+
|
|
125
|
+
If the model attempts any other tool/function call, runtime MUST hard-reject it (see 4.5).
|
|
120
126
|
|
|
121
127
|
### 4.3 Tellask restriction: none allowed
|
|
122
128
|
|
|
@@ -125,14 +131,12 @@ If critical context is missing, the FBR sideline should **list the missing items
|
|
|
125
131
|
|
|
126
132
|
### 4.4 Output contract (easy to distill)
|
|
127
133
|
|
|
128
|
-
An FBR sideline dialog should
|
|
134
|
+
An FBR sideline dialog should denoise internally and post only one upstream-visible final artifact.
|
|
129
135
|
|
|
130
|
-
1. **
|
|
131
|
-
2. **
|
|
132
|
-
3. **
|
|
133
|
-
4. **
|
|
134
|
-
5. **Unknowns / missing context**
|
|
135
|
-
6. **Next steps for tellasker dialog** (where tools/teammates may exist)
|
|
136
|
+
1. **Divergence**: stay open to wild or minority ideas without forcing early consensus.
|
|
137
|
+
2. **Convergence**: discard unsupported wild ideas as noise and keep only stable cross-round consensus.
|
|
138
|
+
3. **Final closure**: end by calling exactly one of the two conclusion functions above.
|
|
139
|
+
4. **Upstream delivery**: caller receives only the final low-noise conclusion, or the final “unreasonable situation” conclusion.
|
|
136
140
|
|
|
137
141
|
### 4.5 Violations and errors (loud + debuggable)
|
|
138
142
|
|
|
@@ -152,13 +156,12 @@ An FBR sideline dialog should produce per-round conclusions that are easy to dis
|
|
|
152
156
|
|
|
153
157
|
When `fbr-effort = N`:
|
|
154
158
|
|
|
155
|
-
- runtime expands
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
- tellasker dialog receives the full consolidated result after all rounds complete
|
|
159
|
+
- runtime expands one `freshBootsReasoning({ tellaskContent: "..." })` into **N divergence rounds + N convergence rounds + up to N finalization retries** inside one sideline dialog
|
|
160
|
+
- divergence rounds must explore distinct angles and stay open to ideas that may later be discarded
|
|
161
|
+
- convergence rounds must denoise autonomously and preserve only stable consensus
|
|
162
|
+
- conclusion functions are exposed only after divergence and convergence are complete
|
|
163
|
+
- if the model still does not end via one of the required conclusion functions after `N` finalization retries, runtime must programmatically produce the `presentUnreasonableSituation` result
|
|
164
|
+
- tellasker dialog receives only the final low-noise conclusion or the final unreasonable-situation conclusion
|
|
162
165
|
|
|
163
166
|
## 6. FBR-only model overrides: `fbr_model_params`
|
|
164
167
|
|