dominds 1.16.0 → 1.16.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/dialog-display-state.d.ts +2 -1
- package/dist/dialog-display-state.js +7 -1
- package/dist/llm/kernel-driver/drive.js +74 -0
- package/dist/llm/kernel-driver/runtime.js +63 -17
- package/dist/persistence.d.ts +7 -0
- package/dist/persistence.js +92 -13
- package/dist/server/api-routes.js +79 -56
- package/dist/server/static-server.js +0 -1
- package/dist/server/websocket-handler.d.ts +2 -2
- package/dist/server/websocket-handler.js +67 -52
- package/dist/server.js +10 -1
- package/dist/tools/ctrl.js +0 -3
- package/dist/tools/plan.js +0 -1
- package/package.json +5 -5
- package/webapp/dist/assets/{_basePickBy-Q203DmRN.js → _basePickBy-C0MXVhMo.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-Q203DmRN.js.map → _basePickBy-C0MXVhMo.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-Be8kQUYz.js → _baseUniq-CRygl41M.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-Be8kQUYz.js.map → _baseUniq-CRygl41M.js.map} +1 -1
- package/webapp/dist/assets/{arc-6xSICGFS.js → arc-BeHJtnt2.js} +2 -2
- package/webapp/dist/assets/{arc-6xSICGFS.js.map → arc-BeHJtnt2.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DNHfOnE-.js → architectureDiagram-2XIMDMQ5-CGdo5TVi.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DNHfOnE-.js.map → architectureDiagram-2XIMDMQ5-CGdo5TVi.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-CYMJiPsJ.js → blockDiagram-WCTKOSBZ-C59VaSGw.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-CYMJiPsJ.js.map → blockDiagram-WCTKOSBZ-C59VaSGw.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BvqRsE5C.js → c4Diagram-IC4MRINW-B3YCBmTx.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-BvqRsE5C.js.map → c4Diagram-IC4MRINW-B3YCBmTx.js.map} +1 -1
- package/webapp/dist/assets/{channel-GAdDc_yy.js → channel-Dn4i8EAY.js} +2 -2
- package/webapp/dist/assets/{channel-GAdDc_yy.js.map → channel-Dn4i8EAY.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-CYJrLCGp.js → chunk-4BX2VUAB-CQbB3HlW.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-CYJrLCGp.js.map → chunk-4BX2VUAB-CQbB3HlW.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-DFaHS4Ma.js → chunk-55IACEB6-CkQR_Qu9.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-DFaHS4Ma.js.map → chunk-55IACEB6-CkQR_Qu9.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-ynhrYc5z.js → chunk-FMBD7UC4-YSIOuaST.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-ynhrYc5z.js.map → chunk-FMBD7UC4-YSIOuaST.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-BBgi_Jq7.js → chunk-JSJVCQXG-CWDLRawz.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-BBgi_Jq7.js.map → chunk-JSJVCQXG-CWDLRawz.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-CLimzawP.js → chunk-KX2RTZJC-DFiwgnFf.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-CLimzawP.js.map → chunk-KX2RTZJC-DFiwgnFf.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DO4qGcdv.js → chunk-NQ4KR5QH-DBxY8LL2.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DO4qGcdv.js.map → chunk-NQ4KR5QH-DBxY8LL2.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-Cb-0-hlo.js → chunk-QZHKN3VN-BAdR6lLc.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-Cb-0-hlo.js.map → chunk-QZHKN3VN-BAdR6lLc.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-CwJGUOIB.js → chunk-WL4C6EOR-Bjl-j3bf.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-CwJGUOIB.js.map → chunk-WL4C6EOR-Bjl-j3bf.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-Ce74VnqH.js → classDiagram-VBA2DB6C-KBeS6WXD.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-Ce74VnqH.js.map → classDiagram-VBA2DB6C-KBeS6WXD.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-Ce74VnqH.js → classDiagram-v2-RAHNMMFH-KBeS6WXD.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-Ce74VnqH.js.map → classDiagram-v2-RAHNMMFH-KBeS6WXD.js.map} +1 -1
- package/webapp/dist/assets/{clone-Bg0lMfZU.js → clone-C7-aS2vm.js} +2 -2
- package/webapp/dist/assets/{clone-Bg0lMfZU.js.map → clone-C7-aS2vm.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-G8K9A1UF.js → cose-bilkent-S5V4N54A-Bo5IsL-5.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-G8K9A1UF.js.map → cose-bilkent-S5V4N54A-Bo5IsL-5.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-cdleQdp9.js → dagre-KLK3FWXG-C3FeHj7D.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-cdleQdp9.js.map → dagre-KLK3FWXG-C3FeHj7D.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-DcUifE0l.js → diagram-E7M64L7V-0HfiRW0u.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-DcUifE0l.js.map → diagram-E7M64L7V-0HfiRW0u.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-B8ao825o.js → diagram-IFDJBPK2-DJwh7SMO.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-B8ao825o.js.map → diagram-IFDJBPK2-DJwh7SMO.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-dLzEGj29.js → diagram-P4PSJMXO-Y0RbvUZX.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-dLzEGj29.js.map → diagram-P4PSJMXO-Y0RbvUZX.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-U1yKOjA_.js → erDiagram-INFDFZHY-B183xyLa.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-U1yKOjA_.js.map → erDiagram-INFDFZHY-B183xyLa.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-BUfRnh1D.js → flowDiagram-PKNHOUZH-C_BR3Y3J.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-BUfRnh1D.js.map → flowDiagram-PKNHOUZH-C_BR3Y3J.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-CplbNx1T.js → ganttDiagram-A5KZAMGK-CHLgkuJT.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-CplbNx1T.js.map → ganttDiagram-A5KZAMGK-CHLgkuJT.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CpFa6Gm4.js → gitGraphDiagram-K3NZZRJ6-D6C_HU1q.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CpFa6Gm4.js.map → gitGraphDiagram-K3NZZRJ6-D6C_HU1q.js.map} +1 -1
- package/webapp/dist/assets/{graph-X4xh5254.js → graph-D0hgB-X8.js} +3 -3
- package/webapp/dist/assets/{graph-X4xh5254.js.map → graph-D0hgB-X8.js.map} +1 -1
- package/webapp/dist/assets/{index-VrF4deb4.js → index-CLoNHmSQ.js} +275 -268
- package/webapp/dist/assets/{index-VrF4deb4.js.map → index-CLoNHmSQ.js.map} +1 -1
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DLqJrnX2.js → infoDiagram-LFFYTUFH-mnMS61NO.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DLqJrnX2.js.map → infoDiagram-LFFYTUFH-mnMS61NO.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-DS0xVc39.js → ishikawaDiagram-PHBUUO56-XFIJsnJj.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-DS0xVc39.js.map → ishikawaDiagram-PHBUUO56-XFIJsnJj.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CoKHZIli.js → journeyDiagram-4ABVD52K-BdeERn0r.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CoKHZIli.js.map → journeyDiagram-4ABVD52K-BdeERn0r.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-CkhxYQD4.js → kanban-definition-K7BYSVSG-MLeCGcYg.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-CkhxYQD4.js.map → kanban-definition-K7BYSVSG-MLeCGcYg.js.map} +1 -1
- package/webapp/dist/assets/{layout-BGbl5ERx.js → layout-DY9VEQ9M.js} +5 -5
- package/webapp/dist/assets/{layout-BGbl5ERx.js.map → layout-DY9VEQ9M.js.map} +1 -1
- package/webapp/dist/assets/{linear-DYR4qG3c.js → linear-D-T1xRsr.js} +2 -2
- package/webapp/dist/assets/{linear-DYR4qG3c.js.map → linear-D-T1xRsr.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-CI6s6HGL.js → mindmap-definition-YRQLILUH-CrVm8vj2.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-CI6s6HGL.js.map → mindmap-definition-YRQLILUH-CrVm8vj2.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-D7hBaJ3p.js → pieDiagram-SKSYHLDU-GtLLV0r1.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-D7hBaJ3p.js.map → pieDiagram-SKSYHLDU-GtLLV0r1.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-C2FhBe5h.js → quadrantDiagram-337W2JSQ-BCgk_2LP.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-C2FhBe5h.js.map → quadrantDiagram-337W2JSQ-BCgk_2LP.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-D3055xhP.js → requirementDiagram-Z7DCOOCP-DYUKHWKR.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-D3055xhP.js.map → requirementDiagram-Z7DCOOCP-DYUKHWKR.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-N-xzUXIx.js → sankeyDiagram-WA2Y5GQK-CFAH8OaY.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-N-xzUXIx.js.map → sankeyDiagram-WA2Y5GQK-CFAH8OaY.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-MaaWXY3J.js → sequenceDiagram-2WXFIKYE-BTnhbv6w.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-MaaWXY3J.js.map → sequenceDiagram-2WXFIKYE-BTnhbv6w.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-Cbh4Y23d.js → stateDiagram-RAJIS63D-DWUnJTwO.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-Cbh4Y23d.js.map → stateDiagram-RAJIS63D-DWUnJTwO.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-C8FJ5C15.js → stateDiagram-v2-FVOUBMTO-B-fc52bp.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-C8FJ5C15.js.map → stateDiagram-v2-FVOUBMTO-B-fc52bp.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-mQ5VlR3Y.js → timeline-definition-YZTLITO2-BMZ52QaG.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-mQ5VlR3Y.js.map → timeline-definition-YZTLITO2-BMZ52QaG.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-B42URX3s.js → treemap-KZPCXAKY-fgSrze0S.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-B42URX3s.js.map → treemap-KZPCXAKY-fgSrze0S.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-Ld7mOnHA.js → vennDiagram-LZ73GAT5-D5DmDY9l.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-Ld7mOnHA.js.map → vennDiagram-LZ73GAT5-D5DmDY9l.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-CQy5At2t.js → xychartDiagram-JWTSCODW-D6aviLtC.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-CQy5At2t.js.map → xychartDiagram-JWTSCODW-D6aviLtC.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
- package/dist/course-transition.d.ts +0 -4
- package/dist/course-transition.js +0 -229
- package/dist/main/access-control.d.ts +0 -54
- package/dist/main/access-control.js +0 -357
- package/dist/main/apps/app-id.d.ts +0 -6
- package/dist/main/apps/app-id.js +0 -36
- package/dist/main/apps/app-lock-file.d.ts +0 -45
- package/dist/main/apps/app-lock-file.js +0 -204
- package/dist/main/apps/assigned-port.d.ts +0 -28
- package/dist/main/apps/assigned-port.js +0 -124
- package/dist/main/apps/configuration-file.d.ts +0 -51
- package/dist/main/apps/configuration-file.js +0 -288
- package/dist/main/apps/dialog-run-controls.d.ts +0 -16
- package/dist/main/apps/dialog-run-controls.js +0 -35
- package/dist/main/apps/enabled-apps.d.ts +0 -35
- package/dist/main/apps/enabled-apps.js +0 -416
- package/dist/main/apps/local-package-root.d.ts +0 -7
- package/dist/main/apps/local-package-root.js +0 -42
- package/dist/main/apps/manifest.d.ts +0 -101
- package/dist/main/apps/manifest.js +0 -422
- package/dist/main/apps/npx-resolve.d.ts +0 -11
- package/dist/main/apps/npx-resolve.js +0 -102
- package/dist/main/apps/override-paths.d.ts +0 -25
- package/dist/main/apps/override-paths.js +0 -59
- package/dist/main/apps/package-info.d.ts +0 -8
- package/dist/main/apps/package-info.js +0 -55
- package/dist/main/apps/problems.d.ts +0 -4
- package/dist/main/apps/problems.js +0 -43
- package/dist/main/apps/resolution-file.d.ts +0 -60
- package/dist/main/apps/resolution-file.js +0 -258
- package/dist/main/apps/rtws-seed.d.ts +0 -7
- package/dist/main/apps/rtws-seed.js +0 -51
- package/dist/main/apps/run-app-json.d.ts +0 -8
- package/dist/main/apps/run-app-json.js +0 -86
- package/dist/main/apps/run-control.d.ts +0 -7
- package/dist/main/apps/run-control.js +0 -91
- package/dist/main/apps/runtime.d.ts +0 -19
- package/dist/main/apps/runtime.js +0 -470
- package/dist/main/apps/teammates.d.ts +0 -7
- package/dist/main/apps/teammates.js +0 -154
- package/dist/main/apps/workspace-app-state.d.ts +0 -4
- package/dist/main/apps/workspace-app-state.js +0 -8
- package/dist/main/apps-host/client.d.ts +0 -41
- package/dist/main/apps-host/client.js +0 -515
- package/dist/main/apps-host/host.d.ts +0 -2
- package/dist/main/apps-host/host.js +0 -738
- package/dist/main/apps-host/ipc-types.d.ts +0 -190
- package/dist/main/apps-host/ipc-types.js +0 -454
- package/dist/main/bootstrap/dotenv.d.ts +0 -13
- package/dist/main/bootstrap/dotenv.js +0 -144
- package/dist/main/bootstrap/global-dialog-event-broadcaster.d.ts +0 -18
- package/dist/main/bootstrap/global-dialog-event-broadcaster.js +0 -81
- package/dist/main/bootstrap/rtws-cli.d.ts +0 -8
- package/dist/main/bootstrap/rtws-cli.js +0 -73
- package/dist/main/cli/apps-cli-hints.d.ts +0 -11
- package/dist/main/cli/apps-cli-hints.js +0 -24
- package/dist/main/cli/create.d.ts +0 -14
- package/dist/main/cli/create.js +0 -263
- package/dist/main/cli/disable.d.ts +0 -3
- package/dist/main/cli/disable.js +0 -80
- package/dist/main/cli/doctor.d.ts +0 -45
- package/dist/main/cli/doctor.js +0 -283
- package/dist/main/cli/enable.d.ts +0 -3
- package/dist/main/cli/enable.js +0 -80
- package/dist/main/cli/install.d.ts +0 -9
- package/dist/main/cli/install.js +0 -244
- package/dist/main/cli/manual.d.ts +0 -14
- package/dist/main/cli/manual.js +0 -185
- package/dist/main/cli/read.d.ts +0 -18
- package/dist/main/cli/read.js +0 -534
- package/dist/main/cli/team-definition-audit.d.ts +0 -35
- package/dist/main/cli/team-definition-audit.js +0 -159
- package/dist/main/cli/tui.d.ts +0 -18
- package/dist/main/cli/tui.js +0 -199
- package/dist/main/cli/uninstall.d.ts +0 -3
- package/dist/main/cli/uninstall.js +0 -126
- package/dist/main/cli/update.d.ts +0 -3
- package/dist/main/cli/update.js +0 -104
- package/dist/main/cli/validate-team-def.d.ts +0 -2
- package/dist/main/cli/validate-team-def.js +0 -89
- package/dist/main/cli/webui.d.ts +0 -15
- package/dist/main/cli/webui.js +0 -169
- package/dist/main/cli.d.ts +0 -31
- package/dist/main/cli.js +0 -353
- package/dist/main/dialog-display-state.d.ts +0 -55
- package/dist/main/dialog-display-state.js +0 -454
- package/dist/main/dialog-factory.d.ts +0 -37
- package/dist/main/dialog-factory.js +0 -63
- package/dist/main/dialog-fork.d.ts +0 -25
- package/dist/main/dialog-fork.js +0 -654
- package/dist/main/dialog-global-registry.d.ts +0 -37
- package/dist/main/dialog-global-registry.js +0 -129
- package/dist/main/dialog-instance-registry.d.ts +0 -4
- package/dist/main/dialog-instance-registry.js +0 -121
- package/dist/main/dialog.d.ts +0 -684
- package/dist/main/dialog.js +0 -1631
- package/dist/main/evt-registry.d.ts +0 -68
- package/dist/main/evt-registry.js +0 -167
- package/dist/main/llm/api-quirks.d.ts +0 -35
- package/dist/main/llm/api-quirks.js +0 -82
- package/dist/main/llm/client.d.ts +0 -82
- package/dist/main/llm/client.js +0 -69
- package/dist/main/llm/gen/anthropic.d.ts +0 -34
- package/dist/main/llm/gen/anthropic.js +0 -948
- package/dist/main/llm/gen/artifacts.d.ts +0 -25
- package/dist/main/llm/gen/artifacts.js +0 -129
- package/dist/main/llm/gen/codex.d.ts +0 -28
- package/dist/main/llm/gen/codex.js +0 -831
- package/dist/main/llm/gen/failure-classifier.d.ts +0 -10
- package/dist/main/llm/gen/failure-classifier.js +0 -309
- package/dist/main/llm/gen/mock.d.ts +0 -77
- package/dist/main/llm/gen/mock.js +0 -579
- package/dist/main/llm/gen/openai-compatible.d.ts +0 -27
- package/dist/main/llm/gen/openai-compatible.js +0 -759
- package/dist/main/llm/gen/openai.d.ts +0 -19
- package/dist/main/llm/gen/openai.js +0 -1782
- package/dist/main/llm/gen/registry.d.ts +0 -10
- package/dist/main/llm/gen/registry.js +0 -28
- package/dist/main/llm/gen/tool-call-context.d.ts +0 -24
- package/dist/main/llm/gen/tool-call-context.js +0 -160
- package/dist/main/llm/gen/tool-output-limit.d.ts +0 -9
- package/dist/main/llm/gen/tool-output-limit.js +0 -50
- package/dist/main/llm/gen.d.ts +0 -120
- package/dist/main/llm/gen.js +0 -2
- package/dist/main/llm/kernel-driver/context-health.d.ts +0 -24
- package/dist/main/llm/kernel-driver/context-health.js +0 -120
- package/dist/main/llm/kernel-driver/context.d.ts +0 -23
- package/dist/main/llm/kernel-driver/context.js +0 -50
- package/dist/main/llm/kernel-driver/drive.d.ts +0 -3
- package/dist/main/llm/kernel-driver/drive.js +0 -2154
- package/dist/main/llm/kernel-driver/engine.d.ts +0 -10
- package/dist/main/llm/kernel-driver/engine.js +0 -67
- package/dist/main/llm/kernel-driver/events.d.ts +0 -4
- package/dist/main/llm/kernel-driver/events.js +0 -18
- package/dist/main/llm/kernel-driver/fbr.d.ts +0 -52
- package/dist/main/llm/kernel-driver/fbr.js +0 -390
- package/dist/main/llm/kernel-driver/flow.d.ts +0 -8
- package/dist/main/llm/kernel-driver/flow.js +0 -692
- package/dist/main/llm/kernel-driver/guardrails.d.ts +0 -36
- package/dist/main/llm/kernel-driver/guardrails.js +0 -128
- package/dist/main/llm/kernel-driver/index.d.ts +0 -4
- package/dist/main/llm/kernel-driver/index.js +0 -11
- package/dist/main/llm/kernel-driver/loop.d.ts +0 -2
- package/dist/main/llm/kernel-driver/loop.js +0 -130
- package/dist/main/llm/kernel-driver/reply-guidance.d.ts +0 -27
- package/dist/main/llm/kernel-driver/reply-guidance.js +0 -143
- package/dist/main/llm/kernel-driver/restore.d.ts +0 -13
- package/dist/main/llm/kernel-driver/restore.js +0 -73
- package/dist/main/llm/kernel-driver/runtime.d.ts +0 -57
- package/dist/main/llm/kernel-driver/runtime.js +0 -1084
- package/dist/main/llm/kernel-driver/subdialog-txn.d.ts +0 -8
- package/dist/main/llm/kernel-driver/subdialog-txn.js +0 -58
- package/dist/main/llm/kernel-driver/subdialog.d.ts +0 -48
- package/dist/main/llm/kernel-driver/subdialog.js +0 -621
- package/dist/main/llm/kernel-driver/tellask-special.d.ts +0 -117
- package/dist/main/llm/kernel-driver/tellask-special.js +0 -2149
- package/dist/main/llm/kernel-driver/types.d.ts +0 -106
- package/dist/main/llm/kernel-driver/types.js +0 -10
- package/dist/main/llm/kernel-driver.d.ts +0 -1
- package/dist/main/llm/kernel-driver.js +0 -17
- package/dist/main/llm/tools-projection.d.ts +0 -13
- package/dist/main/llm/tools-projection.js +0 -12
- package/dist/main/log.d.ts +0 -30
- package/dist/main/log.js +0 -587
- package/dist/main/markdown/frontmatter.d.ts +0 -7
- package/dist/main/markdown/frontmatter.js +0 -44
- package/dist/main/mcp/config.d.ts +0 -75
- package/dist/main/mcp/config.js +0 -256
- package/dist/main/mcp/sdk-client.d.ts +0 -40
- package/dist/main/mcp/sdk-client.js +0 -359
- package/dist/main/mcp/server-runtime.d.ts +0 -23
- package/dist/main/mcp/server-runtime.js +0 -72
- package/dist/main/mcp/stdio-client.d.ts +0 -27
- package/dist/main/mcp/stdio-client.js +0 -280
- package/dist/main/mcp/supervisor.d.ts +0 -29
- package/dist/main/mcp/supervisor.js +0 -1375
- package/dist/main/mcp/tool-names.d.ts +0 -29
- package/dist/main/mcp/tool-names.js +0 -109
- package/dist/main/minds/load.d.ts +0 -13
- package/dist/main/minds/load.js +0 -508
- package/dist/main/minds/minds-i18n.d.ts +0 -30
- package/dist/main/minds/minds-i18n.js +0 -131
- package/dist/main/minds/system-prompt-parts.d.ts +0 -20
- package/dist/main/minds/system-prompt-parts.js +0 -269
- package/dist/main/minds/system-prompt.d.ts +0 -28
- package/dist/main/minds/system-prompt.js +0 -539
- package/dist/main/persistence.d.ts +0 -582
- package/dist/main/persistence.js +0 -5329
- package/dist/main/priming.d.ts +0 -83
- package/dist/main/priming.js +0 -2448
- package/dist/main/problems.d.ts +0 -21
- package/dist/main/problems.js +0 -236
- package/dist/main/recovery/reply-special.d.ts +0 -3
- package/dist/main/recovery/reply-special.js +0 -106
- package/dist/main/runtime/async-fifo-mutex.d.ts +0 -12
- package/dist/main/runtime/async-fifo-mutex.js +0 -36
- package/dist/main/runtime/driver-messages.d.ts +0 -40
- package/dist/main/runtime/driver-messages.js +0 -465
- package/dist/main/runtime/fbr-body.d.ts +0 -10
- package/dist/main/runtime/fbr-body.js +0 -42
- package/dist/main/runtime/i18n-text.d.ts +0 -6
- package/dist/main/runtime/i18n-text.js +0 -9
- package/dist/main/runtime/inter-dialog-format.d.ts +0 -85
- package/dist/main/runtime/inter-dialog-format.js +0 -374
- package/dist/main/runtime/markdown-format.d.ts +0 -1
- package/dist/main/runtime/markdown-format.js +0 -9
- package/dist/main/runtime/reply-prompt-copy.d.ts +0 -33
- package/dist/main/runtime/reply-prompt-copy.js +0 -140
- package/dist/main/runtime/tellask-labels.d.ts +0 -8
- package/dist/main/runtime/tellask-labels.js +0 -47
- package/dist/main/runtime/tool-result-messages.d.ts +0 -6
- package/dist/main/runtime/tool-result-messages.js +0 -52
- package/dist/main/runtime/work-language.d.ts +0 -11
- package/dist/main/runtime/work-language.js +0 -47
- package/dist/main/server/api-routes.d.ts +0 -11
- package/dist/main/server/api-routes.js +0 -2741
- package/dist/main/server/auth.d.ts +0 -44
- package/dist/main/server/auth.js +0 -201
- package/dist/main/server/create-dialog-contract.d.ts +0 -12
- package/dist/main/server/create-dialog-contract.js +0 -89
- package/dist/main/server/mime-types.d.ts +0 -8
- package/dist/main/server/mime-types.js +0 -135
- package/dist/main/server/server-core.d.ts +0 -80
- package/dist/main/server/server-core.js +0 -269
- package/dist/main/server/setup-routes.d.ts +0 -45
- package/dist/main/server/setup-routes.js +0 -803
- package/dist/main/server/snippets-routes.d.ts +0 -61
- package/dist/main/server/snippets-routes.js +0 -685
- package/dist/main/server/static-server.d.ts +0 -14
- package/dist/main/server/static-server.js +0 -136
- package/dist/main/server/websocket-handler.d.ts +0 -17
- package/dist/main/server/websocket-handler.js +0 -1530
- package/dist/main/server.d.ts +0 -17
- package/dist/main/server.js +0 -186
- package/dist/main/shared-reminders.d.ts +0 -4
- package/dist/main/shared-reminders.js +0 -176
- package/dist/main/skills/load.d.ts +0 -24
- package/dist/main/skills/load.js +0 -281
- package/dist/main/team-config-updates.d.ts +0 -21
- package/dist/main/team-config-updates.js +0 -206
- package/dist/main/team.d.ts +0 -187
- package/dist/main/team.js +0 -2300
- package/dist/main/tool.d.ts +0 -110
- package/dist/main/tool.js +0 -395
- package/dist/main/tools/app-reminders.d.ts +0 -16
- package/dist/main/tools/app-reminders.js +0 -310
- package/dist/main/tools/apply-patch.d.ts +0 -2
- package/dist/main/tools/apply-patch.js +0 -547
- package/dist/main/tools/builtins.d.ts +0 -1
- package/dist/main/tools/builtins.js +0 -260
- package/dist/main/tools/cmd-runner-protocol.d.ts +0 -94
- package/dist/main/tools/cmd-runner-protocol.js +0 -278
- package/dist/main/tools/cmd-runner.d.ts +0 -1
- package/dist/main/tools/cmd-runner.js +0 -320
- package/dist/main/tools/ctrl.d.ts +0 -34
- package/dist/main/tools/ctrl.js +0 -796
- package/dist/main/tools/env.d.ts +0 -12
- package/dist/main/tools/env.js +0 -193
- package/dist/main/tools/fs.d.ts +0 -7
- package/dist/main/tools/fs.js +0 -967
- package/dist/main/tools/manual/render.d.ts +0 -16
- package/dist/main/tools/manual/render.js +0 -364
- package/dist/main/tools/manual/schema.d.ts +0 -3
- package/dist/main/tools/manual/schema.js +0 -163
- package/dist/main/tools/manual/spec.d.ts +0 -53
- package/dist/main/tools/manual/spec.js +0 -151
- package/dist/main/tools/mcp.d.ts +0 -9
- package/dist/main/tools/mcp.js +0 -183
- package/dist/main/tools/mem.d.ts +0 -9
- package/dist/main/tools/mem.js +0 -355
- package/dist/main/tools/os.d.ts +0 -13
- package/dist/main/tools/os.js +0 -2014
- package/dist/main/tools/output-limit.d.ts +0 -16
- package/dist/main/tools/output-limit.js +0 -101
- package/dist/main/tools/pending-tellask-reminder.d.ts +0 -4
- package/dist/main/tools/pending-tellask-reminder.js +0 -228
- package/dist/main/tools/plan.d.ts +0 -2
- package/dist/main/tools/plan.js +0 -171
- package/dist/main/tools/registry-snapshot.d.ts +0 -4
- package/dist/main/tools/registry-snapshot.js +0 -35
- package/dist/main/tools/registry.d.ts +0 -48
- package/dist/main/tools/registry.js +0 -116
- package/dist/main/tools/ripgrep.d.ts +0 -6
- package/dist/main/tools/ripgrep.js +0 -1083
- package/dist/main/tools/shell-tools.d.ts +0 -5
- package/dist/main/tools/shell-tools.js +0 -21
- package/dist/main/tools/team_mgmt.d.ts +0 -43
- package/dist/main/tools/team_mgmt.js +0 -5413
- package/dist/main/tools/toolset-manual.d.ts +0 -20
- package/dist/main/tools/toolset-manual.js +0 -368
- package/dist/main/tools/txt.d.ts +0 -43
- package/dist/main/tools/txt.js +0 -3316
- package/dist/main/utils/id.d.ts +0 -20
- package/dist/main/utils/id.js +0 -72
- package/dist/main/utils/task-package.d.ts +0 -140
- package/dist/main/utils/task-package.js +0 -522
- package/dist/main/utils/taskdoc-search.d.ts +0 -19
- package/dist/main/utils/taskdoc-search.js +0 -295
- package/dist/main/utils/taskdoc.d.ts +0 -7
- package/dist/main/utils/taskdoc.js +0 -402
- package/dist/package.json +0 -91
- package/dist/shared/async-fifo-mutex.d.ts +0 -12
- package/dist/shared/async-fifo-mutex.js +0 -36
- package/dist/shared/diligence.d.ts +0 -3
- package/dist/shared/diligence.js +0 -64
- package/dist/shared/dotenv.d.ts +0 -13
- package/dist/shared/dotenv.js +0 -144
- package/dist/shared/evt.d.ts +0 -85
- package/dist/shared/evt.js +0 -195
- package/dist/shared/i18n/driver-messages.d.ts +0 -39
- package/dist/shared/i18n/driver-messages.js +0 -426
- package/dist/shared/i18n/text.d.ts +0 -6
- package/dist/shared/i18n/text.js +0 -9
- package/dist/shared/i18n/tool-result-messages.d.ts +0 -5
- package/dist/shared/i18n/tool-result-messages.js +0 -51
- package/dist/shared/markdown-frontmatter.d.ts +0 -7
- package/dist/shared/markdown-frontmatter.js +0 -44
- package/dist/shared/rtws-cli.d.ts +0 -8
- package/dist/shared/rtws-cli.js +0 -73
- package/dist/shared/runtime-language.d.ts +0 -11
- package/dist/shared/runtime-language.js +0 -47
- package/dist/shared/team_mgmt-manual.d.ts +0 -31
- package/dist/shared/team_mgmt-manual.js +0 -138
- package/dist/shared/utils/fbr.d.ts +0 -10
- package/dist/shared/utils/fbr.js +0 -42
- package/dist/shared/utils/fmt.d.ts +0 -1
- package/dist/shared/utils/fmt.js +0 -9
- package/dist/shared/utils/html.d.ts +0 -2
- package/dist/shared/utils/html.js +0 -20
- package/dist/shared/utils/id.d.ts +0 -12
- package/dist/shared/utils/id.js +0 -18
- package/dist/shared/utils/inter-dialog-format.d.ts +0 -73
- package/dist/shared/utils/inter-dialog-format.js +0 -297
- package/dist/shared/utils/time.d.ts +0 -1
- package/dist/shared/utils/time.js +0 -13
- package/dist/tools/prompts/team_mgmt/en/errors.md +0 -74
- package/dist/tools/prompts/team_mgmt/en/index.md +0 -88
- package/dist/tools/prompts/team_mgmt/en/principles.md +0 -70
- package/dist/tools/prompts/team_mgmt/en/scenarios.md +0 -183
- package/dist/tools/prompts/team_mgmt/en/tools.md +0 -110
- package/dist/tools/prompts/team_mgmt/zh/errors.md +0 -74
- package/dist/tools/prompts/team_mgmt/zh/index.md +0 -88
- package/dist/tools/prompts/team_mgmt/zh/principles.md +0 -70
- package/dist/tools/prompts/team_mgmt/zh/scenarios.md +0 -183
- package/dist/tools/prompts/team_mgmt/zh/tools.md +0 -110
- /package/dist/{main/server → server}/dominds-running-version.d.ts +0 -0
- /package/dist/{main/server → server}/dominds-running-version.js +0 -0
- /package/dist/{main/server → server}/dominds-runtime-status.d.ts +0 -0
- /package/dist/{main/server → server}/dominds-runtime-status.js +0 -0
- /package/dist/{main/server → server}/dominds-self-update.d.ts +0 -0
- /package/dist/{main/server → server}/dominds-self-update.js +0 -0
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* so multi-tab views converge without polling.
|
|
17
17
|
*/
|
|
18
18
|
import type { DialogDisplayState, DialogInterruptionReason } from '@longrun-ai/kernel/types/display-state';
|
|
19
|
-
import type { DialogExecutionMarker } from '@longrun-ai/kernel/types/storage';
|
|
19
|
+
import type { DialogExecutionMarker, DialogLatestFile } from '@longrun-ai/kernel/types/storage';
|
|
20
20
|
import type { WebSocketMessage } from '@longrun-ai/kernel/types/wire';
|
|
21
21
|
import { DialogID, type Dialog } from './dialog';
|
|
22
22
|
type StopRequestedReason = 'user_stop' | 'emergency_stop';
|
|
@@ -28,6 +28,7 @@ export declare function setDisplayStateBroadcaster(fn: (msg: WebSocketMessage) =
|
|
|
28
28
|
export declare function isStoppedReasonResumable(reason: DialogInterruptionReason): boolean;
|
|
29
29
|
export declare function isDisplayStateResumable(state: DialogDisplayState | undefined): boolean;
|
|
30
30
|
export declare function isExecutionMarkerResumable(executionMarker: DialogExecutionMarker | undefined): boolean;
|
|
31
|
+
export declare function isDialogLatestResumable(latest: DialogLatestFile | null | undefined): boolean;
|
|
31
32
|
export declare function getRunControlCountsSnapshot(): Promise<RunControlCountsSnapshot>;
|
|
32
33
|
export declare function broadcastRunControlCountsSnapshot(): Promise<void>;
|
|
33
34
|
export declare function hasActiveRun(dialogId: DialogID): boolean;
|
|
@@ -21,6 +21,7 @@ exports.setDisplayStateBroadcaster = setDisplayStateBroadcaster;
|
|
|
21
21
|
exports.isStoppedReasonResumable = isStoppedReasonResumable;
|
|
22
22
|
exports.isDisplayStateResumable = isDisplayStateResumable;
|
|
23
23
|
exports.isExecutionMarkerResumable = isExecutionMarkerResumable;
|
|
24
|
+
exports.isDialogLatestResumable = isDialogLatestResumable;
|
|
24
25
|
exports.getRunControlCountsSnapshot = getRunControlCountsSnapshot;
|
|
25
26
|
exports.broadcastRunControlCountsSnapshot = broadcastRunControlCountsSnapshot;
|
|
26
27
|
exports.hasActiveRun = hasActiveRun;
|
|
@@ -70,6 +71,11 @@ function isDisplayStateResumable(state) {
|
|
|
70
71
|
function isExecutionMarkerResumable(executionMarker) {
|
|
71
72
|
return (executionMarker?.kind === 'interrupted' && isStoppedReasonResumable(executionMarker.reason));
|
|
72
73
|
}
|
|
74
|
+
function isDialogLatestResumable(latest) {
|
|
75
|
+
return (latest?.displayState?.kind === 'stopped' &&
|
|
76
|
+
latest.displayState.continueEnabled &&
|
|
77
|
+
latest.executionMarker?.kind === 'interrupted');
|
|
78
|
+
}
|
|
73
79
|
function classifyRunControlBucket(state) {
|
|
74
80
|
if (!state)
|
|
75
81
|
return 'none';
|
|
@@ -103,7 +109,7 @@ async function getRunControlCountsSnapshot() {
|
|
|
103
109
|
if (latest?.generating === true) {
|
|
104
110
|
proceeding++;
|
|
105
111
|
}
|
|
106
|
-
else if (
|
|
112
|
+
else if (isDialogLatestResumable(latest)) {
|
|
107
113
|
resumable++;
|
|
108
114
|
}
|
|
109
115
|
}
|
|
@@ -790,6 +790,7 @@ async function emitAssistantSaying(dlg, content) {
|
|
|
790
790
|
await dlg.sayingChunk(content);
|
|
791
791
|
await dlg.sayingFinish();
|
|
792
792
|
}
|
|
793
|
+
const KERNEL_DRIVER_IDENTICAL_UPDATE_PLAN_ONLY_STOP_THRESHOLD = 3;
|
|
793
794
|
function resolveFuncToolFollowupMode(tool) {
|
|
794
795
|
return tool?.followupMode ?? 'immediate';
|
|
795
796
|
}
|
|
@@ -802,6 +803,20 @@ function shouldImmediatelyFollowUpToolOutcome(tool, outcome) {
|
|
|
802
803
|
}
|
|
803
804
|
return shouldImmediatelyFollowUpSuccessfulToolResult(tool);
|
|
804
805
|
}
|
|
806
|
+
function formatIdenticalUpdatePlanLoopStopDetail(language) {
|
|
807
|
+
return language === 'zh'
|
|
808
|
+
? `检测到连续 ${String(KERNEL_DRIVER_IDENTICAL_UPDATE_PLAN_ONLY_STOP_THRESHOLD)} 次完全相同的 update_plan 自动续跑,已停止本次自动执行以避免自激发循环。你可以点击“继续”人工观察,或先修改计划内容再继续。`
|
|
809
|
+
: `Detected ${String(KERNEL_DRIVER_IDENTICAL_UPDATE_PLAN_ONLY_STOP_THRESHOLD)} consecutive identical update_plan auto-follow-up rounds. Stopped this automatic run to avoid a self-trigger loop. You can click Continue to inspect manually, or change the plan content before resuming.`;
|
|
810
|
+
}
|
|
811
|
+
function extractAssistantSayingRoundSignature(newMsgs) {
|
|
812
|
+
const contents = newMsgs
|
|
813
|
+
.filter((msg) => msg.type === 'saying_msg' && msg.role === 'assistant')
|
|
814
|
+
.map((msg) => msg.content);
|
|
815
|
+
if (contents.length === 0) {
|
|
816
|
+
return undefined;
|
|
817
|
+
}
|
|
818
|
+
return JSON.stringify(contents);
|
|
819
|
+
}
|
|
805
820
|
async function executeFunctionCalls(args) {
|
|
806
821
|
const functionPromises = args.funcCalls.map(async (func) => {
|
|
807
822
|
throwIfAborted(args.abortSignal, args.dlg);
|
|
@@ -944,6 +959,27 @@ async function executeFunctionRound(args) {
|
|
|
944
959
|
}
|
|
945
960
|
return shouldImmediatelyFollowUpToolOutcome(tool, outcome);
|
|
946
961
|
});
|
|
962
|
+
const updatePlanOnlyRawArgumentsSignature = (() => {
|
|
963
|
+
if (tellaskRound.normalCalls.length === 0) {
|
|
964
|
+
return undefined;
|
|
965
|
+
}
|
|
966
|
+
if (tellaskRound.handledCallIds.length > 0 || tellaskRound.toolOutputs.length > 0) {
|
|
967
|
+
return undefined;
|
|
968
|
+
}
|
|
969
|
+
const signatures = [];
|
|
970
|
+
for (const call of tellaskRound.normalCalls) {
|
|
971
|
+
if (call.name !== 'update_plan') {
|
|
972
|
+
return undefined;
|
|
973
|
+
}
|
|
974
|
+
const outcome = genericOutcomeByCallId.get(call.id);
|
|
975
|
+
if (outcome !== 'success') {
|
|
976
|
+
return undefined;
|
|
977
|
+
}
|
|
978
|
+
const argsStr = typeof call.arguments === 'string' ? call.arguments : JSON.stringify(call.arguments ?? {});
|
|
979
|
+
signatures.push(argsStr);
|
|
980
|
+
}
|
|
981
|
+
return JSON.stringify(signatures);
|
|
982
|
+
})();
|
|
947
983
|
const resultByCallId = new Map();
|
|
948
984
|
const register = (result) => {
|
|
949
985
|
const existing = resultByCallId.get(result.id);
|
|
@@ -992,6 +1028,7 @@ async function executeFunctionRound(args) {
|
|
|
992
1028
|
shouldStopAfterReplyTool: tellaskRound.shouldStopAfterReplyTool,
|
|
993
1029
|
pairedMessages,
|
|
994
1030
|
tellaskToolOutputs: [...tellaskRound.toolOutputs],
|
|
1031
|
+
updatePlanOnlyRawArgumentsSignature,
|
|
995
1032
|
};
|
|
996
1033
|
}
|
|
997
1034
|
async function resetDiligenceBudgetAfterQ4H(dlg, team) {
|
|
@@ -1139,6 +1176,8 @@ async function driveDialogStreamCore(dlg, callbacks, humanPrompt, driveOptions)
|
|
|
1139
1176
|
let pendingPrompt = humanPrompt;
|
|
1140
1177
|
let skipTaskdocForThisDrive = humanPrompt?.skipTaskdoc === true;
|
|
1141
1178
|
let genIterNo = 0;
|
|
1179
|
+
let consecutiveIdenticalUpdatePlanOnlyRounds = 0;
|
|
1180
|
+
let lastIdenticalUpdatePlanRoundSignature;
|
|
1142
1181
|
if (!humanPrompt) {
|
|
1143
1182
|
try {
|
|
1144
1183
|
const executionMarker = await (0, dialog_display_state_1.loadDialogExecutionMarker)(dlg.id, 'running');
|
|
@@ -1852,6 +1891,27 @@ async function driveDialogStreamCore(dlg, callbacks, humanPrompt, driveOptions)
|
|
|
1852
1891
|
newMsgs.push(...routed.pairedMessages);
|
|
1853
1892
|
}
|
|
1854
1893
|
await dlg.addChatMessages(...newMsgs);
|
|
1894
|
+
const assistantSayingRoundSignature = extractAssistantSayingRoundSignature(newMsgs);
|
|
1895
|
+
const identicalUpdatePlanRoundSignature = routed.updatePlanOnlyRawArgumentsSignature !== undefined &&
|
|
1896
|
+
assistantSayingRoundSignature !== undefined
|
|
1897
|
+
? JSON.stringify({
|
|
1898
|
+
assistantSayingRoundSignature,
|
|
1899
|
+
updatePlanRawArgumentsSignature: routed.updatePlanOnlyRawArgumentsSignature,
|
|
1900
|
+
})
|
|
1901
|
+
: undefined;
|
|
1902
|
+
if (identicalUpdatePlanRoundSignature !== undefined) {
|
|
1903
|
+
if (identicalUpdatePlanRoundSignature === lastIdenticalUpdatePlanRoundSignature) {
|
|
1904
|
+
consecutiveIdenticalUpdatePlanOnlyRounds += 1;
|
|
1905
|
+
}
|
|
1906
|
+
else {
|
|
1907
|
+
consecutiveIdenticalUpdatePlanOnlyRounds = 1;
|
|
1908
|
+
lastIdenticalUpdatePlanRoundSignature = identicalUpdatePlanRoundSignature;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
else {
|
|
1912
|
+
consecutiveIdenticalUpdatePlanOnlyRounds = 0;
|
|
1913
|
+
lastIdenticalUpdatePlanRoundSignature = undefined;
|
|
1914
|
+
}
|
|
1855
1915
|
const persistedFbrState = await loadDialogFbrState(dlg);
|
|
1856
1916
|
if (persistedFbrState) {
|
|
1857
1917
|
if (persistedFbrState.phase === 'finalization') {
|
|
@@ -1937,6 +1997,20 @@ async function driveDialogStreamCore(dlg, callbacks, humanPrompt, driveOptions)
|
|
|
1937
1997
|
await resetDiligenceBudgetAfterQ4H(dlg, team);
|
|
1938
1998
|
break;
|
|
1939
1999
|
}
|
|
2000
|
+
if (consecutiveIdenticalUpdatePlanOnlyRounds >=
|
|
2001
|
+
KERNEL_DRIVER_IDENTICAL_UPDATE_PLAN_ONLY_STOP_THRESHOLD) {
|
|
2002
|
+
const detail = formatIdenticalUpdatePlanLoopStopDetail((0, work_language_1.getWorkLanguage)());
|
|
2003
|
+
log_1.log.error(detail, new Error('kernel_driver_identical_update_plan_loop_stopped'), {
|
|
2004
|
+
dialogId: dlg.id.valueOf(),
|
|
2005
|
+
rootId: dlg.id.rootId,
|
|
2006
|
+
selfId: dlg.id.selfId,
|
|
2007
|
+
course: dlg.currentCourse,
|
|
2008
|
+
genseq: dlg.activeGenSeqOrUndefined ?? null,
|
|
2009
|
+
consecutiveIdenticalUpdatePlanOnlyRounds,
|
|
2010
|
+
identicalUpdatePlanRoundSignature,
|
|
2011
|
+
});
|
|
2012
|
+
throw new KernelDriverInterruptedError({ kind: 'system_stop', detail });
|
|
2013
|
+
}
|
|
1940
2014
|
// Start an immediate post-tool generation only when this round produced tool outputs that
|
|
1941
2015
|
// warrant same-drive LLM reaction right away. Provider-native side-channel UI events are
|
|
1942
2016
|
// meaningful output, but they are not transcript/context inputs and therefore must not
|
|
@@ -272,6 +272,44 @@ function isRetriableLlmMessage(message) {
|
|
|
272
272
|
}
|
|
273
273
|
return false;
|
|
274
274
|
}
|
|
275
|
+
function readGenericRetriableMessage(err) {
|
|
276
|
+
if (err instanceof Error) {
|
|
277
|
+
const message = err.message.trim();
|
|
278
|
+
if (message !== '')
|
|
279
|
+
return message;
|
|
280
|
+
const name = err.name.trim();
|
|
281
|
+
return name !== '' ? name : undefined;
|
|
282
|
+
}
|
|
283
|
+
if (typeof err === 'string') {
|
|
284
|
+
const trimmed = err.trim();
|
|
285
|
+
return trimmed !== '' ? trimmed : undefined;
|
|
286
|
+
}
|
|
287
|
+
if (!isPlainObject(err)) {
|
|
288
|
+
return undefined;
|
|
289
|
+
}
|
|
290
|
+
if ('message' in err && typeof err.message === 'string') {
|
|
291
|
+
const trimmed = err.message.trim();
|
|
292
|
+
if (trimmed !== '')
|
|
293
|
+
return trimmed;
|
|
294
|
+
}
|
|
295
|
+
if ('error' in err &&
|
|
296
|
+
isPlainObject(err.error) &&
|
|
297
|
+
'message' in err.error &&
|
|
298
|
+
typeof err.error.message === 'string') {
|
|
299
|
+
const trimmed = err.error.message.trim();
|
|
300
|
+
if (trimmed !== '')
|
|
301
|
+
return trimmed;
|
|
302
|
+
}
|
|
303
|
+
if ('cause' in err &&
|
|
304
|
+
isPlainObject(err.cause) &&
|
|
305
|
+
'message' in err.cause &&
|
|
306
|
+
typeof err.cause.message === 'string') {
|
|
307
|
+
const trimmed = err.cause.message.trim();
|
|
308
|
+
if (trimmed !== '')
|
|
309
|
+
return trimmed;
|
|
310
|
+
}
|
|
311
|
+
return undefined;
|
|
312
|
+
}
|
|
275
313
|
function normalizeFailureDisposition(err, disposition) {
|
|
276
314
|
const fallbackMessage = err instanceof Error
|
|
277
315
|
? err.message || err.name
|
|
@@ -290,6 +328,13 @@ function normalizeFailureDisposition(err, disposition) {
|
|
|
290
328
|
};
|
|
291
329
|
}
|
|
292
330
|
function classifyGenericLlmFailure(err) {
|
|
331
|
+
// Ownership boundary:
|
|
332
|
+
// - Wrapper classifiers own provider/API semantics such as HTTP status handling, response-body
|
|
333
|
+
// rejection semantics, rate limits, overload signals, and provider-advised backoff headers.
|
|
334
|
+
// - The runtime generic classifier only owns provider-agnostic transport/runtime failures such
|
|
335
|
+
// as local timeout / socket / fetch failures and Dominds internal retriable error codes.
|
|
336
|
+
// When a new unexpected pattern appears, keep it here only if it is clearly transport/runtime
|
|
337
|
+
// scoped and not tied to any specific upstream API contract.
|
|
293
338
|
const fallbackMessage = err instanceof Error
|
|
294
339
|
? err.message || err.name
|
|
295
340
|
: typeof err === 'string'
|
|
@@ -317,23 +362,24 @@ function classifyGenericLlmFailure(err) {
|
|
|
317
362
|
retryStrategy: 'aggressive',
|
|
318
363
|
};
|
|
319
364
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
:
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
365
|
+
const msg = readGenericRetriableMessage(err);
|
|
366
|
+
if (typeof msg === 'string' && isRetriableLlmMessage(msg)) {
|
|
367
|
+
return {
|
|
368
|
+
kind: 'retriable',
|
|
369
|
+
code: errCode ?? causeCode,
|
|
370
|
+
message: msg,
|
|
371
|
+
retryStrategy: 'aggressive',
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
if (isPlainObject(err) && 'cause' in err) {
|
|
375
|
+
const causeMessage = readGenericRetriableMessage(err.cause);
|
|
376
|
+
if (typeof causeMessage === 'string' && isRetriableLlmMessage(causeMessage)) {
|
|
377
|
+
return {
|
|
378
|
+
kind: 'retriable',
|
|
379
|
+
code: errCode ?? causeCode,
|
|
380
|
+
message: causeMessage,
|
|
381
|
+
retryStrategy: 'aggressive',
|
|
382
|
+
};
|
|
337
383
|
}
|
|
338
384
|
}
|
|
339
385
|
return { kind: 'fatal', message: fallbackMessage };
|
package/dist/persistence.d.ts
CHANGED
|
@@ -258,6 +258,7 @@ type DialogLatestMutation = {
|
|
|
258
258
|
*/
|
|
259
259
|
export declare class DialogPersistence {
|
|
260
260
|
private static readonly DIALOGS_DIR;
|
|
261
|
+
private static readonly MALFORMED_DIR;
|
|
261
262
|
private static readonly RUN_DIR;
|
|
262
263
|
private static readonly DONE_DIR;
|
|
263
264
|
private static readonly ARCHIVE_DIR;
|
|
@@ -313,6 +314,12 @@ export declare class DialogPersistence {
|
|
|
313
314
|
* Get the path for a subdialog within a supdialog
|
|
314
315
|
*/
|
|
315
316
|
static getSubdialogPath(dialogId: DialogID, status?: 'running' | 'completed' | 'archived'): string;
|
|
317
|
+
private static isMalformedDialogLoadError;
|
|
318
|
+
private static getMalformedRootDialogPath;
|
|
319
|
+
private static pathExists;
|
|
320
|
+
private static clearLatestWriteBackState;
|
|
321
|
+
private static quarantineMalformedRootDialog;
|
|
322
|
+
private static parseDialogLatestYaml;
|
|
316
323
|
/**
|
|
317
324
|
* Ensure dialog directory structure exists
|
|
318
325
|
*/
|
package/dist/persistence.js
CHANGED
|
@@ -3092,6 +3092,76 @@ class DialogPersistence {
|
|
|
3092
3092
|
const rootPath = this.getRootDialogPath(new dialog_1.DialogID(dialogId.rootId), status);
|
|
3093
3093
|
return path.join(rootPath, this.SUBDIALOGS_DIR, dialogId.selfId);
|
|
3094
3094
|
}
|
|
3095
|
+
static isMalformedDialogLoadError(error) {
|
|
3096
|
+
return (error instanceof Error &&
|
|
3097
|
+
(error.message.startsWith('Invalid latest.yaml in ') ||
|
|
3098
|
+
error.message.startsWith('Invalid dialog metadata in ')));
|
|
3099
|
+
}
|
|
3100
|
+
static getMalformedRootDialogPath(dialogId, status) {
|
|
3101
|
+
if (dialogId.rootId !== dialogId.selfId) {
|
|
3102
|
+
throw new Error('Expected root dialog id');
|
|
3103
|
+
}
|
|
3104
|
+
void status;
|
|
3105
|
+
return path.join(this.getDialogsRootDir(), this.MALFORMED_DIR, dialogId.selfId);
|
|
3106
|
+
}
|
|
3107
|
+
static async pathExists(targetPath) {
|
|
3108
|
+
try {
|
|
3109
|
+
await fs.promises.access(targetPath);
|
|
3110
|
+
return true;
|
|
3111
|
+
}
|
|
3112
|
+
catch (error) {
|
|
3113
|
+
if (getErrorCode(error) === 'ENOENT') {
|
|
3114
|
+
return false;
|
|
3115
|
+
}
|
|
3116
|
+
throw error;
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
static clearLatestWriteBackState(dialogId, status) {
|
|
3120
|
+
const key = this.getLatestWriteBackKey(dialogId, status);
|
|
3121
|
+
const entry = this.latestWriteBack.get(key);
|
|
3122
|
+
if (entry?.kind === 'scheduled') {
|
|
3123
|
+
clearTimeout(entry.timer);
|
|
3124
|
+
}
|
|
3125
|
+
this.latestWriteBack.delete(key);
|
|
3126
|
+
this.latestWriteBackMutexes.delete(key);
|
|
3127
|
+
}
|
|
3128
|
+
static async quarantineMalformedRootDialog(dialogId, status, reason, error) {
|
|
3129
|
+
if (dialogId.rootId !== dialogId.selfId) {
|
|
3130
|
+
throw error;
|
|
3131
|
+
}
|
|
3132
|
+
const sourcePath = this.getRootDialogPath(dialogId, status);
|
|
3133
|
+
if (!(await this.pathExists(sourcePath))) {
|
|
3134
|
+
return;
|
|
3135
|
+
}
|
|
3136
|
+
let destinationPath = this.getMalformedRootDialogPath(dialogId, status);
|
|
3137
|
+
if (await this.pathExists(destinationPath)) {
|
|
3138
|
+
destinationPath = path.join(this.getDialogsRootDir(), this.MALFORMED_DIR, `${dialogId.selfId}__${(0, node_crypto_1.randomUUID)()}`);
|
|
3139
|
+
}
|
|
3140
|
+
await fs.promises.mkdir(path.dirname(destinationPath), { recursive: true });
|
|
3141
|
+
await fs.promises.rename(sourcePath, destinationPath);
|
|
3142
|
+
this.clearLatestWriteBackState(dialogId, status);
|
|
3143
|
+
log_1.log.warn(`Quarantined malformed root dialog ${dialogId.selfId}`, undefined, {
|
|
3144
|
+
status,
|
|
3145
|
+
reason,
|
|
3146
|
+
sourcePath,
|
|
3147
|
+
destinationPath,
|
|
3148
|
+
errorMessage: error.message,
|
|
3149
|
+
});
|
|
3150
|
+
}
|
|
3151
|
+
static parseDialogLatestYaml(content, latestFilePath) {
|
|
3152
|
+
let parsed;
|
|
3153
|
+
try {
|
|
3154
|
+
parsed = yaml.parse(content);
|
|
3155
|
+
}
|
|
3156
|
+
catch {
|
|
3157
|
+
throw new Error(`Invalid latest.yaml in ${latestFilePath}`);
|
|
3158
|
+
}
|
|
3159
|
+
const latest = parseDialogLatestFile(parsed);
|
|
3160
|
+
if (!latest) {
|
|
3161
|
+
throw new Error(`Invalid latest.yaml in ${latestFilePath}`);
|
|
3162
|
+
}
|
|
3163
|
+
return latest;
|
|
3164
|
+
}
|
|
3095
3165
|
/**
|
|
3096
3166
|
* Ensure dialog directory structure exists
|
|
3097
3167
|
*/
|
|
@@ -4532,7 +4602,13 @@ class DialogPersistence {
|
|
|
4532
4602
|
const metadataFilePath = path.join(dialogPath, 'dialog.yaml');
|
|
4533
4603
|
try {
|
|
4534
4604
|
const content = await fs.promises.readFile(metadataFilePath, 'utf-8');
|
|
4535
|
-
|
|
4605
|
+
let parsed;
|
|
4606
|
+
try {
|
|
4607
|
+
parsed = yaml.parse(content);
|
|
4608
|
+
}
|
|
4609
|
+
catch {
|
|
4610
|
+
throw new Error(`Invalid dialog metadata in ${metadataFilePath}`);
|
|
4611
|
+
}
|
|
4536
4612
|
if (!isDialogMetadataFile(parsed)) {
|
|
4537
4613
|
throw new Error(`Invalid dialog metadata in ${metadataFilePath}`);
|
|
4538
4614
|
}
|
|
@@ -4547,6 +4623,10 @@ class DialogPersistence {
|
|
|
4547
4623
|
if (getErrorCode(error) === 'ENOENT') {
|
|
4548
4624
|
return null;
|
|
4549
4625
|
}
|
|
4626
|
+
if (this.isMalformedDialogLoadError(error)) {
|
|
4627
|
+
await this.quarantineMalformedRootDialog(dialogId, status, 'loadRootDialogMetadata', error);
|
|
4628
|
+
return null;
|
|
4629
|
+
}
|
|
4550
4630
|
throw error;
|
|
4551
4631
|
}
|
|
4552
4632
|
}
|
|
@@ -4650,17 +4730,16 @@ class DialogPersistence {
|
|
|
4650
4730
|
const dialogPath = this.getDialogEventsPath(dialogId, status);
|
|
4651
4731
|
const latestFilePath = path.join(dialogPath, 'latest.yaml');
|
|
4652
4732
|
const content = await fs.promises.readFile(latestFilePath, 'utf-8');
|
|
4653
|
-
|
|
4654
|
-
const latest = parseDialogLatestFile(parsed);
|
|
4655
|
-
if (!latest) {
|
|
4656
|
-
throw new Error(`Invalid latest.yaml in ${latestFilePath}`);
|
|
4657
|
-
}
|
|
4658
|
-
return latest;
|
|
4733
|
+
return this.parseDialogLatestYaml(content, latestFilePath);
|
|
4659
4734
|
}
|
|
4660
4735
|
catch (error) {
|
|
4661
4736
|
if (getErrorCode(error) === 'ENOENT') {
|
|
4662
4737
|
return null;
|
|
4663
4738
|
}
|
|
4739
|
+
if (dialogId.rootId === dialogId.selfId && this.isMalformedDialogLoadError(error)) {
|
|
4740
|
+
await this.quarantineMalformedRootDialog(dialogId, status, 'loadDialogLatest', error);
|
|
4741
|
+
return null;
|
|
4742
|
+
}
|
|
4664
4743
|
throw error;
|
|
4665
4744
|
}
|
|
4666
4745
|
}
|
|
@@ -4736,17 +4815,16 @@ class DialogPersistence {
|
|
|
4736
4815
|
const dialogPath = this.getDialogEventsPath(dialogId, status);
|
|
4737
4816
|
const latestFilePath = path.join(dialogPath, 'latest.yaml');
|
|
4738
4817
|
const content = await fs.promises.readFile(latestFilePath, 'utf-8');
|
|
4739
|
-
|
|
4740
|
-
const latest = parseDialogLatestFile(parsed);
|
|
4741
|
-
if (!latest) {
|
|
4742
|
-
throw new Error(`Invalid latest.yaml in ${latestFilePath}`);
|
|
4743
|
-
}
|
|
4744
|
-
return latest;
|
|
4818
|
+
return this.parseDialogLatestYaml(content, latestFilePath);
|
|
4745
4819
|
}
|
|
4746
4820
|
catch (error) {
|
|
4747
4821
|
if (getErrorCode(error) === 'ENOENT') {
|
|
4748
4822
|
return null;
|
|
4749
4823
|
}
|
|
4824
|
+
if (dialogId.rootId === dialogId.selfId && this.isMalformedDialogLoadError(error)) {
|
|
4825
|
+
await this.quarantineMalformedRootDialog(dialogId, status, 'loadDialogLatestFromDisk', error);
|
|
4826
|
+
return null;
|
|
4827
|
+
}
|
|
4750
4828
|
throw error;
|
|
4751
4829
|
}
|
|
4752
4830
|
}
|
|
@@ -5313,6 +5391,7 @@ class DialogPersistence {
|
|
|
5313
5391
|
}
|
|
5314
5392
|
exports.DialogPersistence = DialogPersistence;
|
|
5315
5393
|
DialogPersistence.DIALOGS_DIR = '.dialogs';
|
|
5394
|
+
DialogPersistence.MALFORMED_DIR = 'malformed';
|
|
5316
5395
|
DialogPersistence.RUN_DIR = 'run';
|
|
5317
5396
|
DialogPersistence.DONE_DIR = 'done';
|
|
5318
5397
|
DialogPersistence.ARCHIVE_DIR = 'archive';
|
|
@@ -62,13 +62,13 @@ const registry_snapshot_1 = require("../tools/registry-snapshot");
|
|
|
62
62
|
const id_1 = require("../utils/id");
|
|
63
63
|
const taskdoc_search_1 = require("../utils/taskdoc-search");
|
|
64
64
|
const create_dialog_contract_1 = require("./create-dialog-contract");
|
|
65
|
+
const dominds_self_update_1 = require("./dominds-self-update");
|
|
65
66
|
const mime_types_1 = require("./mime-types");
|
|
66
67
|
const setup_routes_1 = require("./setup-routes");
|
|
67
68
|
const snippets_routes_1 = require("./snippets-routes");
|
|
68
69
|
// Dialog lookup is performed via file-backed persistence; no in-memory registry
|
|
69
70
|
const log = (0, log_1.createLogger)('api-routes');
|
|
70
71
|
const PRIMING_WARNING_SAMPLE_MAX = 5;
|
|
71
|
-
let cachedDomindsVersion;
|
|
72
72
|
function resolveMemberDiligencePushMax(team, agentId) {
|
|
73
73
|
const member = team.getMember(agentId);
|
|
74
74
|
if (member && member.diligence_push_max !== undefined) {
|
|
@@ -81,26 +81,6 @@ function normalizeDiligencePushMax(value) {
|
|
|
81
81
|
return 0;
|
|
82
82
|
return Math.floor(value);
|
|
83
83
|
}
|
|
84
|
-
async function readDomindsPackageVersion() {
|
|
85
|
-
if (cachedDomindsVersion !== undefined)
|
|
86
|
-
return cachedDomindsVersion;
|
|
87
|
-
try {
|
|
88
|
-
const packagePath = path.join(__dirname, '..', '..', 'package.json');
|
|
89
|
-
const raw = await promises_1.default.readFile(packagePath, 'utf8');
|
|
90
|
-
const parsed = JSON.parse(raw);
|
|
91
|
-
if (!isRecord(parsed)) {
|
|
92
|
-
cachedDomindsVersion = null;
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
const version = parsed['version'];
|
|
96
|
-
cachedDomindsVersion = typeof version === 'string' ? version : null;
|
|
97
|
-
return cachedDomindsVersion;
|
|
98
|
-
}
|
|
99
|
-
catch {
|
|
100
|
-
cachedDomindsVersion = null;
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
84
|
function getErrorCode(error) {
|
|
105
85
|
if (typeof error !== 'object' || error === null)
|
|
106
86
|
return undefined;
|
|
@@ -323,6 +303,14 @@ async function handleSaveCurrentCoursePriming(req, res) {
|
|
|
323
303
|
return true;
|
|
324
304
|
}
|
|
325
305
|
}
|
|
306
|
+
function parseDomindsSelfUpdateAction(body) {
|
|
307
|
+
if (!isRecord(body))
|
|
308
|
+
return null;
|
|
309
|
+
const action = body['action'];
|
|
310
|
+
if (action === 'install' || action === 'restart')
|
|
311
|
+
return action;
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
326
314
|
async function handleWorkspaceFilePreviewPage(req, res, pathname) {
|
|
327
315
|
const pseudoPathRel = parseWorkspacePseudoPreviewPathname(pathname);
|
|
328
316
|
if (pseudoPathRel !== null) {
|
|
@@ -962,14 +950,46 @@ async function handleWorkspaceFilePreviewPage(req, res, pathname) {
|
|
|
962
950
|
*/
|
|
963
951
|
async function handleApiRoute(req, res, pathname, context) {
|
|
964
952
|
try {
|
|
965
|
-
// Health check endpoint
|
|
966
|
-
if (pathname === '/api/health' && req.method === 'GET') {
|
|
967
|
-
return await handleHealthCheck(res, context);
|
|
968
|
-
}
|
|
969
953
|
// Live reload endpoint for development
|
|
970
954
|
if (pathname === '/api/live-reload' && req.method === 'GET') {
|
|
971
955
|
return await handleLiveReload(res, context);
|
|
972
956
|
}
|
|
957
|
+
if (pathname === '/api/dominds/self-update' && req.method === 'POST') {
|
|
958
|
+
const body = await readRequestBody(req);
|
|
959
|
+
let parsed;
|
|
960
|
+
try {
|
|
961
|
+
parsed = JSON.parse(body);
|
|
962
|
+
}
|
|
963
|
+
catch {
|
|
964
|
+
respondJson(res, 400, { success: false, error: 'Invalid JSON body' });
|
|
965
|
+
return true;
|
|
966
|
+
}
|
|
967
|
+
const action = parseDomindsSelfUpdateAction(parsed);
|
|
968
|
+
if (action === null) {
|
|
969
|
+
respondJson(res, 400, {
|
|
970
|
+
success: false,
|
|
971
|
+
error: "Invalid action. Expected 'install' or 'restart'",
|
|
972
|
+
});
|
|
973
|
+
return true;
|
|
974
|
+
}
|
|
975
|
+
try {
|
|
976
|
+
if (action === 'install') {
|
|
977
|
+
const status = await (0, dominds_self_update_1.installLatestDominds)();
|
|
978
|
+
respondJson(res, 200, { success: true, update: status });
|
|
979
|
+
return true;
|
|
980
|
+
}
|
|
981
|
+
const status = await (0, dominds_self_update_1.restartDomindsIntoLatest)();
|
|
982
|
+
respondJson(res, 202, { success: true, update: status });
|
|
983
|
+
return true;
|
|
984
|
+
}
|
|
985
|
+
catch (error) {
|
|
986
|
+
respondJson(res, 409, {
|
|
987
|
+
success: false,
|
|
988
|
+
error: error instanceof Error ? error.message : String(error),
|
|
989
|
+
});
|
|
990
|
+
return true;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
973
993
|
// Team configuration endpoint (renamed)
|
|
974
994
|
if (pathname === '/api/team/config' && req.method === 'GET') {
|
|
975
995
|
return await handleGetTeamConfig(res);
|
|
@@ -1901,33 +1921,6 @@ async function handleGetToolsRegistry(req, res) {
|
|
|
1901
1921
|
return true;
|
|
1902
1922
|
}
|
|
1903
1923
|
}
|
|
1904
|
-
/**
|
|
1905
|
-
* Health check endpoint
|
|
1906
|
-
*/
|
|
1907
|
-
async function handleHealthCheck(res, context) {
|
|
1908
|
-
try {
|
|
1909
|
-
const version = (await readDomindsPackageVersion()) ?? 'unknown';
|
|
1910
|
-
const workspace = process.cwd();
|
|
1911
|
-
const healthData = {
|
|
1912
|
-
ok: true,
|
|
1913
|
-
timestamp: (0, time_1.formatUnifiedTimestamp)(new Date()),
|
|
1914
|
-
server: 'dominds',
|
|
1915
|
-
version,
|
|
1916
|
-
// `workspace` is the canonical name used by WebUI indicators.
|
|
1917
|
-
// Keep `rtws` for backward compatibility.
|
|
1918
|
-
workspace,
|
|
1919
|
-
rtws: workspace,
|
|
1920
|
-
mode: context.mode,
|
|
1921
|
-
};
|
|
1922
|
-
respondJson(res, 200, healthData);
|
|
1923
|
-
return true;
|
|
1924
|
-
}
|
|
1925
|
-
catch (error) {
|
|
1926
|
-
log.error('Health check failed:', error);
|
|
1927
|
-
respondJson(res, 500, { ok: false, error: 'Health check failed' });
|
|
1928
|
-
return true;
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
1924
|
/**
|
|
1932
1925
|
* Live reload endpoint for development
|
|
1933
1926
|
*/
|
|
@@ -1998,14 +1991,27 @@ async function handleGetDialogs(res, status) {
|
|
|
1998
1991
|
const rootDialogs = [];
|
|
1999
1992
|
const ids = await persistence_1.DialogPersistence.listDialogs(status);
|
|
2000
1993
|
for (const id of ids) {
|
|
2001
|
-
const
|
|
1994
|
+
const dialogId = new dialog_1.DialogID(id);
|
|
1995
|
+
const meta = await persistence_1.DialogPersistence.loadRootDialogMetadata(dialogId, status);
|
|
2002
1996
|
if (!meta)
|
|
2003
1997
|
continue;
|
|
2004
1998
|
// Load latest.yaml for currentCourse and lastModified timestamp
|
|
2005
|
-
const latest = await persistence_1.DialogPersistence.loadDialogLatest(
|
|
2006
|
-
const
|
|
1999
|
+
const latest = await persistence_1.DialogPersistence.loadDialogLatest(dialogId, status);
|
|
2000
|
+
const rootPath = persistence_1.DialogPersistence.getRootDialogPath(dialogId, status);
|
|
2001
|
+
const rootStillExists = await promises_1.default
|
|
2002
|
+
.access(rootPath)
|
|
2003
|
+
.then(() => true)
|
|
2004
|
+
.catch((error) => {
|
|
2005
|
+
if (getErrorCode(error) === 'ENOENT') {
|
|
2006
|
+
return false;
|
|
2007
|
+
}
|
|
2008
|
+
throw error;
|
|
2009
|
+
});
|
|
2010
|
+
if (!rootStillExists) {
|
|
2011
|
+
continue;
|
|
2012
|
+
}
|
|
2013
|
+
const waitingForFreshBootsReasoning = await detectWaitingForFreshBootsReasoning(dialogId, status);
|
|
2007
2014
|
// Count subdialogs for this root dialog
|
|
2008
|
-
const rootPath = persistence_1.DialogPersistence.getRootDialogPath(new dialog_1.DialogID(id), status);
|
|
2009
2015
|
const subPath = path.join(rootPath, 'subdialogs');
|
|
2010
2016
|
const subdialogCount = await countSubdialogs(subPath);
|
|
2011
2017
|
rootDialogs.push({
|
|
@@ -2097,6 +2103,23 @@ async function handleGetDialogHierarchy(res, rootId, status) {
|
|
|
2097
2103
|
}
|
|
2098
2104
|
// Load latest.yaml for root dialog currentCourse and lastModified timestamp
|
|
2099
2105
|
const rootLatest = await persistence_1.DialogPersistence.loadDialogLatest(new dialog_1.DialogID(rootId), status);
|
|
2106
|
+
const rootPath = persistence_1.DialogPersistence.getRootDialogPath(new dialog_1.DialogID(rootId), status);
|
|
2107
|
+
const rootStillExists = await promises_1.default
|
|
2108
|
+
.access(rootPath)
|
|
2109
|
+
.then(() => true)
|
|
2110
|
+
.catch((error) => {
|
|
2111
|
+
if (getErrorCode(error) === 'ENOENT') {
|
|
2112
|
+
return false;
|
|
2113
|
+
}
|
|
2114
|
+
throw error;
|
|
2115
|
+
});
|
|
2116
|
+
if (!rootStillExists) {
|
|
2117
|
+
respondJson(res, 404, {
|
|
2118
|
+
success: false,
|
|
2119
|
+
error: `Root dialog ${rootId} was quarantined as malformed`,
|
|
2120
|
+
});
|
|
2121
|
+
return true;
|
|
2122
|
+
}
|
|
2100
2123
|
const rootInfo = {
|
|
2101
2124
|
id: rootMeta.id,
|
|
2102
2125
|
agentId: rootMeta.agentId,
|
|
@@ -35,7 +35,6 @@ API Server is running in development mode
|
|
|
35
35
|
Frontend (Vite dev server) should be started by your outer dev-server.sh
|
|
36
36
|
|
|
37
37
|
Available API endpoints:
|
|
38
|
-
• GET /api/health - Server health check
|
|
39
38
|
• GET /api/live-reload - Development status
|
|
40
39
|
• GET /api/team/config - Team configuration
|
|
41
40
|
• GET /api/dialogs - List all dialogs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WebSocketMessage } from '@longrun-ai/kernel/types';
|
|
1
|
+
import type { DomindsRuntimeMode, WebSocketMessage } from '@longrun-ai/kernel/types';
|
|
2
2
|
import { type LanguageCode } from '@longrun-ai/kernel/types/language';
|
|
3
3
|
import type { Server } from 'http';
|
|
4
4
|
import { WebSocket, WebSocketServer } from 'ws';
|
|
@@ -10,7 +10,7 @@ export declare function handleWebSocketMessage(ws: WebSocket, packet: WebSocketM
|
|
|
10
10
|
/**
|
|
11
11
|
* Setup WebSocket server with dialog handling
|
|
12
12
|
*/
|
|
13
|
-
export declare function setupWebSocketServer(httpServer: Server, clients: Set<WebSocket>, auth: AuthConfig, serverWorkLanguage: LanguageCode): WebSocketServer;
|
|
13
|
+
export declare function setupWebSocketServer(httpServer: Server, clients: Set<WebSocket>, auth: AuthConfig, serverWorkLanguage: LanguageCode, mode: DomindsRuntimeMode): WebSocketServer;
|
|
14
14
|
/**
|
|
15
15
|
* Clean up all event channels and subscriptions
|
|
16
16
|
*/
|