dominds 1.6.5 → 1.6.7

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.
Files changed (160) hide show
  1. package/README.md +1 -1
  2. package/README.zh.md +1 -1
  3. package/dist/apps/app-id.js +36 -0
  4. package/dist/apps/enabled-apps.js +1 -1
  5. package/dist/apps/local-package-root.js +2 -1
  6. package/dist/apps/rtws-seed.js +2 -1
  7. package/dist/apps/run-control.js +13 -0
  8. package/dist/apps-host/host.js +2 -1
  9. package/dist/apps-host/ipc-types.js +10 -0
  10. package/dist/cli/uninstall.js +6 -5
  11. package/dist/dialog.js +3 -0
  12. package/dist/docs/app-constitution.md +32 -25
  13. package/dist/docs/app-constitution.zh.md +70 -62
  14. package/dist/docs/dialog-system.md +5 -3
  15. package/dist/docs/dominds-terminology.md +55 -2
  16. package/dist/docs/tellask-collab.md +3 -2
  17. package/dist/llm/kernel-driver/flow.js +88 -13
  18. package/dist/minds/system-prompt.js +16 -8
  19. package/dist/server/api-routes.js +72 -0
  20. package/dist/server/mime-types.js +108 -5
  21. package/dist/shared/i18n/driver-messages.js +50 -26
  22. package/dist/shared/utils/inter-dialog-format.js +2 -2
  23. package/dist/static/assets/{_basePickBy-BI5Rq0uy.js → _basePickBy-B9gw9xu3.js} +3 -3
  24. package/dist/static/assets/{_basePickBy-BI5Rq0uy.js.map → _basePickBy-B9gw9xu3.js.map} +1 -1
  25. package/dist/static/assets/{_baseUniq-B198d-KY.js → _baseUniq-CdteP2Ad.js} +2 -2
  26. package/dist/static/assets/{_baseUniq-B198d-KY.js.map → _baseUniq-CdteP2Ad.js.map} +1 -1
  27. package/dist/static/assets/{arc-DaOMBOGX.js → arc-BaFSInZP.js} +2 -2
  28. package/dist/static/assets/{arc-DaOMBOGX.js.map → arc-BaFSInZP.js.map} +1 -1
  29. package/dist/static/assets/{architectureDiagram-VXUJARFQ-D-S9nnw1.js → architectureDiagram-VXUJARFQ-kO0ROBqa.js} +7 -7
  30. package/dist/static/assets/{architectureDiagram-VXUJARFQ-D-S9nnw1.js.map → architectureDiagram-VXUJARFQ-kO0ROBqa.js.map} +1 -1
  31. package/dist/static/assets/{blockDiagram-VD42YOAC-BTOxO1BR.js → blockDiagram-VD42YOAC-D766EIYA.js} +7 -7
  32. package/dist/static/assets/{blockDiagram-VD42YOAC-BTOxO1BR.js.map → blockDiagram-VD42YOAC-D766EIYA.js.map} +1 -1
  33. package/dist/static/assets/{c4Diagram-YG6GDRKO-BC30TrOS.js → c4Diagram-YG6GDRKO-DwL98wWS.js} +3 -3
  34. package/dist/static/assets/{c4Diagram-YG6GDRKO-BC30TrOS.js.map → c4Diagram-YG6GDRKO-DwL98wWS.js.map} +1 -1
  35. package/dist/static/assets/{channel-BxJm9rVf.js → channel-CcUPWS87.js} +2 -2
  36. package/dist/static/assets/{channel-BxJm9rVf.js.map → channel-CcUPWS87.js.map} +1 -1
  37. package/dist/static/assets/{chunk-4BX2VUAB-DZhNVfjS.js → chunk-4BX2VUAB-BeTSwCuA.js} +2 -2
  38. package/dist/static/assets/{chunk-4BX2VUAB-DZhNVfjS.js.map → chunk-4BX2VUAB-BeTSwCuA.js.map} +1 -1
  39. package/dist/static/assets/{chunk-55IACEB6-CNu24wD5.js → chunk-55IACEB6-C6Tzr8i_.js} +2 -2
  40. package/dist/static/assets/{chunk-55IACEB6-CNu24wD5.js.map → chunk-55IACEB6-C6Tzr8i_.js.map} +1 -1
  41. package/dist/static/assets/{chunk-B4BG7PRW-B4pvVnuq.js → chunk-B4BG7PRW-DSi9x25j.js} +5 -5
  42. package/dist/static/assets/{chunk-B4BG7PRW-B4pvVnuq.js.map → chunk-B4BG7PRW-DSi9x25j.js.map} +1 -1
  43. package/dist/static/assets/{chunk-DI55MBZ5-DPtQdiEz.js → chunk-DI55MBZ5-CfAPRphL.js} +4 -4
  44. package/dist/static/assets/{chunk-DI55MBZ5-DPtQdiEz.js.map → chunk-DI55MBZ5-CfAPRphL.js.map} +1 -1
  45. package/dist/static/assets/{chunk-FMBD7UC4-BvHbQUmg.js → chunk-FMBD7UC4-B-M6vSiI.js} +2 -2
  46. package/dist/static/assets/{chunk-FMBD7UC4-BvHbQUmg.js.map → chunk-FMBD7UC4-B-M6vSiI.js.map} +1 -1
  47. package/dist/static/assets/{chunk-QN33PNHL-BDzIqYT9.js → chunk-QN33PNHL-yU2oNaRc.js} +2 -2
  48. package/dist/static/assets/{chunk-QN33PNHL-BDzIqYT9.js.map → chunk-QN33PNHL-yU2oNaRc.js.map} +1 -1
  49. package/dist/static/assets/{chunk-QZHKN3VN-DCSYTX8L.js → chunk-QZHKN3VN-jPTrvtzO.js} +2 -2
  50. package/dist/static/assets/{chunk-QZHKN3VN-DCSYTX8L.js.map → chunk-QZHKN3VN-jPTrvtzO.js.map} +1 -1
  51. package/dist/static/assets/{chunk-TZMSLE5B-CSzc4mi_.js → chunk-TZMSLE5B-Bls_D3TM.js} +2 -2
  52. package/dist/static/assets/{chunk-TZMSLE5B-CSzc4mi_.js.map → chunk-TZMSLE5B-Bls_D3TM.js.map} +1 -1
  53. package/dist/static/assets/{classDiagram-2ON5EDUG-CJsEP-fz.js → classDiagram-2ON5EDUG-6HSV8O5b.js} +6 -6
  54. package/dist/static/assets/{classDiagram-2ON5EDUG-CJsEP-fz.js.map → classDiagram-2ON5EDUG-6HSV8O5b.js.map} +1 -1
  55. package/dist/static/assets/{classDiagram-v2-WZHVMYZB-CJsEP-fz.js → classDiagram-v2-WZHVMYZB-6HSV8O5b.js} +6 -6
  56. package/dist/static/assets/{classDiagram-v2-WZHVMYZB-CJsEP-fz.js.map → classDiagram-v2-WZHVMYZB-6HSV8O5b.js.map} +1 -1
  57. package/dist/static/assets/{clone-CNyZHFPL.js → clone-CtKoD5Su.js} +2 -2
  58. package/dist/static/assets/{clone-CNyZHFPL.js.map → clone-CtKoD5Su.js.map} +1 -1
  59. package/dist/static/assets/{cose-bilkent-S5V4N54A-DMvvhmW4.js → cose-bilkent-S5V4N54A-C8Q_0ZER.js} +2 -2
  60. package/dist/static/assets/{cose-bilkent-S5V4N54A-DMvvhmW4.js.map → cose-bilkent-S5V4N54A-C8Q_0ZER.js.map} +1 -1
  61. package/dist/static/assets/{dagre-6UL2VRFP-BuNhcUpS.js → dagre-6UL2VRFP-CYIohfVW.js} +7 -7
  62. package/dist/static/assets/{dagre-6UL2VRFP-BuNhcUpS.js.map → dagre-6UL2VRFP-CYIohfVW.js.map} +1 -1
  63. package/dist/static/assets/{diagram-PSM6KHXK-D0APVthl.js → diagram-PSM6KHXK-BTYKp-4w.js} +8 -8
  64. package/dist/static/assets/{diagram-PSM6KHXK-D0APVthl.js.map → diagram-PSM6KHXK-BTYKp-4w.js.map} +1 -1
  65. package/dist/static/assets/{diagram-QEK2KX5R-_TJXK1XR.js → diagram-QEK2KX5R-CopAPXBx.js} +7 -7
  66. package/dist/static/assets/{diagram-QEK2KX5R-_TJXK1XR.js.map → diagram-QEK2KX5R-CopAPXBx.js.map} +1 -1
  67. package/dist/static/assets/{diagram-S2PKOQOG-D58YgxwF.js → diagram-S2PKOQOG-BxYzu2CQ.js} +7 -7
  68. package/dist/static/assets/{diagram-S2PKOQOG-D58YgxwF.js.map → diagram-S2PKOQOG-BxYzu2CQ.js.map} +1 -1
  69. package/dist/static/assets/{erDiagram-Q2GNP2WA-DoStgM_4.js → erDiagram-Q2GNP2WA-8SOoYoCD.js} +5 -5
  70. package/dist/static/assets/{erDiagram-Q2GNP2WA-DoStgM_4.js.map → erDiagram-Q2GNP2WA-8SOoYoCD.js.map} +1 -1
  71. package/dist/static/assets/{flowDiagram-NV44I4VS-CjRvEre8.js → flowDiagram-NV44I4VS-x3ds9tRp.js} +6 -6
  72. package/dist/static/assets/{flowDiagram-NV44I4VS-CjRvEre8.js.map → flowDiagram-NV44I4VS-x3ds9tRp.js.map} +1 -1
  73. package/dist/static/assets/{ganttDiagram-JELNMOA3-BUTAh-bt.js → ganttDiagram-JELNMOA3-JJe52R5B.js} +3 -3
  74. package/dist/static/assets/{ganttDiagram-JELNMOA3-BUTAh-bt.js.map → ganttDiagram-JELNMOA3-JJe52R5B.js.map} +1 -1
  75. package/dist/static/assets/{gitGraphDiagram-V2S2FVAM-jNkE61r9.js → gitGraphDiagram-V2S2FVAM-D5WErFAP.js} +8 -8
  76. package/dist/static/assets/{gitGraphDiagram-V2S2FVAM-jNkE61r9.js.map → gitGraphDiagram-V2S2FVAM-D5WErFAP.js.map} +1 -1
  77. package/dist/static/assets/{graph-CCjti2O0.js → graph-D2qG911_.js} +3 -3
  78. package/dist/static/assets/{graph-CCjti2O0.js.map → graph-D2qG911_.js.map} +1 -1
  79. package/dist/static/assets/{index-DLmfFirx.js → index-BRvFzt7r.js} +546 -131
  80. package/dist/static/assets/index-BRvFzt7r.js.map +1 -0
  81. package/dist/static/assets/{infoDiagram-HS3SLOUP-BFxdxbX3.js → infoDiagram-HS3SLOUP-CJgZXXei.js} +6 -6
  82. package/dist/static/assets/{infoDiagram-HS3SLOUP-BFxdxbX3.js.map → infoDiagram-HS3SLOUP-CJgZXXei.js.map} +1 -1
  83. package/dist/static/assets/{journeyDiagram-XKPGCS4Q-BCLnxPc7.js → journeyDiagram-XKPGCS4Q-DsA_9YlY.js} +5 -5
  84. package/dist/static/assets/{journeyDiagram-XKPGCS4Q-BCLnxPc7.js.map → journeyDiagram-XKPGCS4Q-DsA_9YlY.js.map} +1 -1
  85. package/dist/static/assets/{kanban-definition-3W4ZIXB7-BDeqtjCx.js → kanban-definition-3W4ZIXB7-l0WL_yMI.js} +3 -3
  86. package/dist/static/assets/{kanban-definition-3W4ZIXB7-BDeqtjCx.js.map → kanban-definition-3W4ZIXB7-l0WL_yMI.js.map} +1 -1
  87. package/dist/static/assets/{layout-BcSBhjCx.js → layout-CpX1UYDN.js} +5 -5
  88. package/dist/static/assets/{layout-BcSBhjCx.js.map → layout-CpX1UYDN.js.map} +1 -1
  89. package/dist/static/assets/{linear-yE500fJs.js → linear-BwAZ1jvU.js} +2 -2
  90. package/dist/static/assets/{linear-yE500fJs.js.map → linear-BwAZ1jvU.js.map} +1 -1
  91. package/dist/static/assets/{mindmap-definition-VGOIOE7T-B7T5bXb-.js → mindmap-definition-VGOIOE7T-CbPr4yzk.js} +4 -4
  92. package/dist/static/assets/{mindmap-definition-VGOIOE7T-B7T5bXb-.js.map → mindmap-definition-VGOIOE7T-CbPr4yzk.js.map} +1 -1
  93. package/dist/static/assets/{pieDiagram-ADFJNKIX-CWFbaJ0k.js → pieDiagram-ADFJNKIX-Dm1nDIqq.js} +8 -8
  94. package/dist/static/assets/{pieDiagram-ADFJNKIX-CWFbaJ0k.js.map → pieDiagram-ADFJNKIX-Dm1nDIqq.js.map} +1 -1
  95. package/dist/static/assets/{quadrantDiagram-AYHSOK5B-DNdamKCt.js → quadrantDiagram-AYHSOK5B-ZsrsqMXx.js} +3 -3
  96. package/dist/static/assets/{quadrantDiagram-AYHSOK5B-DNdamKCt.js.map → quadrantDiagram-AYHSOK5B-ZsrsqMXx.js.map} +1 -1
  97. package/dist/static/assets/{requirementDiagram-UZGBJVZJ-Ct8UB1vk.js → requirementDiagram-UZGBJVZJ-Dcm7em76.js} +4 -4
  98. package/dist/static/assets/{requirementDiagram-UZGBJVZJ-Ct8UB1vk.js.map → requirementDiagram-UZGBJVZJ-Dcm7em76.js.map} +1 -1
  99. package/dist/static/assets/{sankeyDiagram-TZEHDZUN-DC7E0Ymo.js → sankeyDiagram-TZEHDZUN-CZaCjU14.js} +2 -2
  100. package/dist/static/assets/{sankeyDiagram-TZEHDZUN-DC7E0Ymo.js.map → sankeyDiagram-TZEHDZUN-CZaCjU14.js.map} +1 -1
  101. package/dist/static/assets/{sequenceDiagram-WL72ISMW-IiC8_KXA.js → sequenceDiagram-WL72ISMW-CcfoaMSR.js} +4 -4
  102. package/dist/static/assets/{sequenceDiagram-WL72ISMW-IiC8_KXA.js.map → sequenceDiagram-WL72ISMW-CcfoaMSR.js.map} +1 -1
  103. package/dist/static/assets/{stateDiagram-FKZM4ZOC-CCJb2r9z.js → stateDiagram-FKZM4ZOC-BVIDD43e.js} +9 -9
  104. package/dist/static/assets/{stateDiagram-FKZM4ZOC-CCJb2r9z.js.map → stateDiagram-FKZM4ZOC-BVIDD43e.js.map} +1 -1
  105. package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-BvHtU6GE.js → stateDiagram-v2-4FDKWEC3-B9GL2xr3.js} +5 -5
  106. package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-BvHtU6GE.js.map → stateDiagram-v2-4FDKWEC3-B9GL2xr3.js.map} +1 -1
  107. package/dist/static/assets/{timeline-definition-IT6M3QCI-Bn2Z-SBO.js → timeline-definition-IT6M3QCI-8iKDS8Ig.js} +3 -3
  108. package/dist/static/assets/{timeline-definition-IT6M3QCI-Bn2Z-SBO.js.map → timeline-definition-IT6M3QCI-8iKDS8Ig.js.map} +1 -1
  109. package/dist/static/assets/{treemap-GDKQZRPO-BQopYfN_.js → treemap-GDKQZRPO-CbxnTnrn.js} +5 -5
  110. package/dist/static/assets/{treemap-GDKQZRPO-BQopYfN_.js.map → treemap-GDKQZRPO-CbxnTnrn.js.map} +1 -1
  111. package/dist/static/assets/{xychartDiagram-PRI3JC2R-CsLeQwkI.js → xychartDiagram-PRI3JC2R-C0KMwrOR.js} +3 -3
  112. package/dist/static/assets/{xychartDiagram-PRI3JC2R-CsLeQwkI.js.map → xychartDiagram-PRI3JC2R-C0KMwrOR.js.map} +1 -1
  113. package/dist/static/index.html +1 -1
  114. package/dist/tools/ctrl.js +102 -3
  115. package/dist/tools/team_mgmt.js +142 -26
  116. package/package.json +1 -1
  117. package/dist/apps/installed-file.js +0 -207
  118. package/dist/apps/runtime-port.js +0 -91
  119. package/dist/docs/kernel-app-architecture.md +0 -286
  120. package/dist/docs/kernel-app-architecture.zh.md +0 -285
  121. package/dist/llm/driver-entry.js +0 -28
  122. package/dist/llm/driver-v2/context-health.js +0 -121
  123. package/dist/llm/driver-v2/context.js +0 -56
  124. package/dist/llm/driver-v2/core.js +0 -1545
  125. package/dist/llm/driver-v2/index.js +0 -26
  126. package/dist/llm/driver-v2/orchestrator.js +0 -158
  127. package/dist/llm/driver-v2/policy.js +0 -129
  128. package/dist/llm/driver-v2/restore-dialog-hierarchy.js +0 -73
  129. package/dist/llm/driver-v2/round.js +0 -366
  130. package/dist/llm/driver-v2/runtime-utils.js +0 -365
  131. package/dist/llm/driver-v2/saying-events.js +0 -20
  132. package/dist/llm/driver-v2/subdialog-txn.js +0 -42
  133. package/dist/llm/driver-v2/supdialog-response.js +0 -400
  134. package/dist/llm/driver-v2/tellask-bridge.js +0 -1148
  135. package/dist/llm/driver-v2/types.js +0 -10
  136. package/dist/llm/driver-v2-ref-only/context-health.js +0 -121
  137. package/dist/llm/driver-v2-ref-only/context.js +0 -17
  138. package/dist/llm/driver-v2-ref-only/core.js +0 -1710
  139. package/dist/llm/driver-v2-ref-only/index.js +0 -26
  140. package/dist/llm/driver-v2-ref-only/orchestrator.js +0 -158
  141. package/dist/llm/driver-v2-ref-only/policy.js +0 -129
  142. package/dist/llm/driver-v2-ref-only/restore-dialog-hierarchy.js +0 -73
  143. package/dist/llm/driver-v2-ref-only/round.js +0 -366
  144. package/dist/llm/driver-v2-ref-only/runtime-utils.js +0 -473
  145. package/dist/llm/driver-v2-ref-only/saying-events.js +0 -18
  146. package/dist/llm/driver-v2-ref-only/subdialog-txn.js +0 -42
  147. package/dist/llm/driver-v2-ref-only/supdialog-response.js +0 -453
  148. package/dist/llm/driver-v2-ref-only/tellask-bridge.js +0 -1178
  149. package/dist/llm/driver-v2-ref-only/types.js +0 -10
  150. package/dist/static/assets/index-DLmfFirx.js.map +0 -1
  151. package/dist/tools/prompts/memory/en/errors.md +0 -155
  152. package/dist/tools/prompts/memory/en/index.md +0 -47
  153. package/dist/tools/prompts/memory/en/principles.md +0 -79
  154. package/dist/tools/prompts/memory/en/scenarios.md +0 -174
  155. package/dist/tools/prompts/memory/en/tools.md +0 -154
  156. package/dist/tools/prompts/memory/zh/errors.md +0 -155
  157. package/dist/tools/prompts/memory/zh/index.md +0 -47
  158. package/dist/tools/prompts/memory/zh/principles.md +0 -79
  159. package/dist/tools/prompts/memory/zh/scenarios.md +0 -174
  160. package/dist/tools/prompts/memory/zh/tools.md +0 -154
package/README.md CHANGED
@@ -122,7 +122,7 @@ Examples:
122
122
  dominds install @longrun-ai/web-dev --enable
123
123
 
124
124
  # Install a local app under development into the current rtws
125
- dominds install ./dominds-apps/web-dev --local --enable
125
+ dominds install ./dominds-apps/@longrun-ai/web-dev --local --enable
126
126
  ```
127
127
 
128
128
  Important distinctions:
package/README.zh.md CHANGED
@@ -77,7 +77,7 @@ npx -y dominds@latest
77
77
  dominds install @longrun-ai/web-dev --enable
78
78
 
79
79
  # 安装本地开发中的 app 到当前 rtws
80
- dominds install ./dominds-apps/web-dev --local --enable
80
+ dominds install ./dominds-apps/@longrun-ai/web-dev --local --enable
81
81
  ```
82
82
 
83
83
  几个关键区别:
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.normalizeDomindsAppId = normalizeDomindsAppId;
7
+ exports.isValidDomindsAppId = isValidDomindsAppId;
8
+ exports.domindsAppIdToPathParts = domindsAppIdToPathParts;
9
+ exports.resolveDomindsAppRtwsDirAbs = resolveDomindsAppRtwsDirAbs;
10
+ exports.resolveDomindsAppLocalPackageRootAbs = resolveDomindsAppLocalPackageRootAbs;
11
+ exports.formatDomindsAppRtwsDirRel = formatDomindsAppRtwsDirRel;
12
+ const node_path_1 = __importDefault(require("node:path"));
13
+ const DOMINDS_APP_ID_RE = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/;
14
+ function normalizeDomindsAppId(value) {
15
+ return value.trim();
16
+ }
17
+ function isValidDomindsAppId(value) {
18
+ const normalized = normalizeDomindsAppId(value);
19
+ return normalized !== '' && DOMINDS_APP_ID_RE.test(normalized);
20
+ }
21
+ function domindsAppIdToPathParts(appId) {
22
+ const normalized = normalizeDomindsAppId(appId);
23
+ if (!isValidDomindsAppId(normalized)) {
24
+ throw new Error(`Invalid Dominds app id: '${appId}'`);
25
+ }
26
+ return normalized.split('/');
27
+ }
28
+ function resolveDomindsAppRtwsDirAbs(rtwsRootAbs, appId) {
29
+ return node_path_1.default.resolve(rtwsRootAbs, '.apps', ...domindsAppIdToPathParts(appId));
30
+ }
31
+ function resolveDomindsAppLocalPackageRootAbs(rootAbs, appId) {
32
+ return node_path_1.default.resolve(rootAbs, ...domindsAppIdToPathParts(appId));
33
+ }
34
+ function formatDomindsAppRtwsDirRel(appId) {
35
+ return node_path_1.default.posix.join('.apps', ...domindsAppIdToPathParts(appId));
36
+ }
@@ -24,7 +24,7 @@ function getResolutionHint(params) {
24
24
  const filePathAbs = node_path_1.default.resolve(params.rtwsRootAbs, configuration_file_1.APPS_CONFIGURATION_REL_PATH);
25
25
  const action = params.hasConfigurationFile ? 'Edit' : 'Create';
26
26
  return (`${action} ${filePathAbs} to configure 'resolutionStrategy'. ` +
27
- `Default local root is 'dominds-apps' (rtws-relative) and expects local apps at '<root>/<appId>/'.`);
27
+ `Default local root is 'dominds-apps' (rtws-relative) and resolves app ids under '<root>/<appId path segments>/'.`);
28
28
  }
29
29
  async function loadManifestDepsFromResolvedApp(params) {
30
30
  const pkgInfo = await (0, package_info_1.readPackageInfo)({ packageRootAbs: params.packageRootAbs });
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.resolveLocalAppPackageRootAbs = resolveLocalAppPackageRootAbs;
7
7
  const promises_1 = __importDefault(require("node:fs/promises"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
+ const app_id_1 = require("./app-id");
9
10
  async function dirExists(dirPathAbs) {
10
11
  try {
11
12
  const stat = await promises_1.default.stat(dirPathAbs);
@@ -31,7 +32,7 @@ async function resolveLocalAppPackageRootAbs(params) {
31
32
  }
32
33
  for (const root of params.localRoots) {
33
34
  const rootAbs = node_path_1.default.isAbsolute(root) ? root : node_path_1.default.resolve(params.rtwsRootAbs, root);
34
- candidates.add(node_path_1.default.resolve(rootAbs, trimmedAppId));
35
+ candidates.add((0, app_id_1.resolveDomindsAppLocalPackageRootAbs)(rootAbs, trimmedAppId));
35
36
  }
36
37
  for (const candidateAbs of candidates) {
37
38
  if (await dirExists(candidateAbs))
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.applyRtwsSeed = applyRtwsSeed;
7
7
  const promises_1 = __importDefault(require("fs/promises"));
8
8
  const path_1 = __importDefault(require("path"));
9
+ const app_id_1 = require("./app-id");
9
10
  function ensureRelNoTraversal(rel) {
10
11
  const normalized = rel.replace(/\\/g, '/').replace(/^\/+/g, '');
11
12
  if (normalized.includes('..')) {
@@ -27,7 +28,7 @@ async function writeIfMissing(fileAbs, content, overwrite) {
27
28
  await promises_1.default.writeFile(fileAbs, content, 'utf-8');
28
29
  }
29
30
  async function applyRtwsSeed(params) {
30
- const rtwsAppDirAbs = path_1.default.resolve(params.rtwsRootAbs, '.apps', params.appId);
31
+ const rtwsAppDirAbs = (0, app_id_1.resolveDomindsAppRtwsDirAbs)(params.rtwsRootAbs, params.appId);
31
32
  await promises_1.default.mkdir(rtwsAppDirAbs, { recursive: true });
32
33
  const taskdocs = params.manifest.contributes?.rtwsSeed?.taskdocs ?? [];
33
34
  for (const td of taskdocs) {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applyAppDialogRunControl = applyAppDialogRunControl;
4
+ exports.applyRegisteredAppDialogRunControls = applyRegisteredAppDialogRunControls;
4
5
  const dialog_run_controls_1 = require("./dialog-run-controls");
5
6
  const runtime_1 = require("./runtime");
6
7
  async function applyAppDialogRunControl(params) {
@@ -15,3 +16,15 @@ async function applyAppDialogRunControl(params) {
15
16
  const hostClient = await (0, runtime_1.waitForAppsHostClient)();
16
17
  return await hostClient.applyRunControl(controlId, params.payload);
17
18
  }
19
+ async function applyRegisteredAppDialogRunControls(payload) {
20
+ for (const control of (0, dialog_run_controls_1.listAppDialogRunControls)()) {
21
+ const result = await applyAppDialogRunControl({
22
+ controlId: control.id,
23
+ payload,
24
+ });
25
+ if (result.kind === 'reject') {
26
+ return result;
27
+ }
28
+ }
29
+ return { kind: 'continue' };
30
+ }
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const url_1 = require("url");
9
9
  const log_1 = require("../log");
10
+ const app_id_1 = require("../apps/app-id");
10
11
  const ipc_types_1 = require("./ipc-types");
11
12
  const log = (0, log_1.createLogger)('apps-host');
12
13
  const dynamicImport = new Function('specifier', 'return import(specifier)');
@@ -313,7 +314,7 @@ async function initOnce(msg) {
313
314
  const mod = await dynamicImport((0, url_1.pathToFileURL)(moduleAbs).href);
314
315
  const factory = pickExportedFactory(mod, app.installJson.host.exportName, moduleAbs);
315
316
  const appId = app.appId;
316
- const rtwsAppDirAbs = path_1.default.resolve(msg.rtwsRootAbs, '.apps', appId);
317
+ const rtwsAppDirAbs = (0, app_id_1.resolveDomindsAppRtwsDirAbs)(msg.rtwsRootAbs, appId);
317
318
  const host = validateHostInstance(await factory({
318
319
  appId,
319
320
  rtwsRootAbs: msg.rtwsRootAbs,
@@ -356,6 +356,8 @@ function parseAppsHostMessageFromKernel(v) {
356
356
  throw new Error('Invalid run_control_apply message: payload must be object');
357
357
  const dialog = payload['dialog'];
358
358
  const prompt = payload['prompt'];
359
+ const agentId = asString(payload['agentId']);
360
+ const taskDocPath = asString(payload['taskDocPath']);
359
361
  const genIterNoRaw = payload['genIterNo'];
360
362
  const source = asString(payload['source']);
361
363
  const input = payload['input'];
@@ -376,6 +378,12 @@ function parseAppsHostMessageFromKernel(v) {
376
378
  if (!dialogSelfId || !dialogRootId) {
377
379
  throw new Error('Invalid run_control_apply payload: dialog.selfId/rootId required');
378
380
  }
381
+ if (!agentId) {
382
+ throw new Error('Invalid run_control_apply payload: agentId required');
383
+ }
384
+ if (!taskDocPath) {
385
+ throw new Error('Invalid run_control_apply payload: taskDocPath required');
386
+ }
379
387
  const promptParsed = (() => {
380
388
  if (prompt === undefined)
381
389
  return undefined;
@@ -435,6 +443,8 @@ function parseAppsHostMessageFromKernel(v) {
435
443
  controlId,
436
444
  payload: {
437
445
  dialog: { selfId: dialogSelfId, rootId: dialogRootId },
446
+ agentId,
447
+ taskDocPath,
438
448
  genIterNo,
439
449
  prompt: promptParsed,
440
450
  source,
@@ -6,7 +6,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.main = main;
8
8
  const promises_1 = __importDefault(require("node:fs/promises"));
9
- const node_path_1 = __importDefault(require("node:path"));
9
+ const app_id_1 = require("../apps/app-id");
10
10
  const app_lock_file_1 = require("../apps/app-lock-file");
11
11
  const configuration_file_1 = require("../apps/configuration-file");
12
12
  const manifest_1 = require("../apps/manifest");
@@ -16,7 +16,7 @@ function printHelp() {
16
16
  dominds uninstall <appId> [--purge]
17
17
 
18
18
  Options:
19
- --purge Also delete rtws app state directory: .apps/<appId>/
19
+ --purge Also delete rtws app state directory: .apps/<appId path segments>/
20
20
  `);
21
21
  }
22
22
  function parseArgs(argv) {
@@ -92,12 +92,13 @@ async function main() {
92
92
  await (0, app_lock_file_1.writeAppLockFileIfChanged)({ rtwsRootAbs, file: nextLock });
93
93
  await (0, workspace_app_state_1.refreshAppsDerivedState)({ rtwsRootAbs });
94
94
  if (args.purge) {
95
- const appDirAbs = node_path_1.default.resolve(rtwsRootAbs, '.apps', args.appId);
95
+ const rtwsDirRel = (0, app_id_1.formatDomindsAppRtwsDirRel)(args.appId);
96
+ const appDirAbs = (0, app_id_1.resolveDomindsAppRtwsDirAbs)(rtwsRootAbs, args.appId);
96
97
  await promises_1.default.rm(appDirAbs, { recursive: true, force: true });
97
- console.log(`Uninstalled app '${args.appId}' (purged rtws state: .apps/${args.appId}/)`);
98
+ console.log(`Uninstalled app '${args.appId}' (purged rtws state: ${rtwsDirRel}/)`);
98
99
  }
99
100
  else {
100
- console.log(`Uninstalled app '${args.appId}' (rtws data preserved under .apps/${args.appId}/)`);
101
+ console.log(`Uninstalled app '${args.appId}' (rtws data preserved under ${(0, app_id_1.formatDomindsAppRtwsDirRel)(args.appId)}/)`);
101
102
  }
102
103
  }
103
104
  if (require.main === module) {
package/dist/dialog.js CHANGED
@@ -606,6 +606,9 @@ class Dialog {
606
606
  hasUpNext() {
607
607
  return this._upNext !== undefined;
608
608
  }
609
+ peekUpNext() {
610
+ return this._upNext;
611
+ }
609
612
  takeUpNext() {
610
613
  const next = this._upNext;
611
614
  this._upNext = undefined;
@@ -214,10 +214,10 @@ Recommended user mental model:
214
214
 
215
215
  Self-heal only works when both prerequisites hold:
216
216
 
217
- - root `.minds/app.yaml` still declares the correct app id (for example `web-dev`), and
218
- - the current resolution strategy can actually resolve that app (for example, default `localRoots=['dominds-apps']` contains `dominds-apps/web-dev/`, and that package's install handshake / manifest also declares the same app id).
217
+ - root `.minds/app.yaml` still declares the correct app id (for example `@longrun-ai/web-dev`), and
218
+ - the current resolution strategy can actually resolve that app (for example, default `localRoots=['dominds-apps']` contains `dominds-apps/@longrun-ai/web-dev/`, and that package's install handshake / manifest also declares the same app id).
219
219
 
220
- If the root manifest / team config uses the wrong app id (for example, still declaring the legacy id `web_dev` inside `dependencies[].id` or `members.<id>.from` while the app now installs as `web-dev`), refresh will still re-materialize `resolution.yaml` as empty. That means self-heal did run; it just correctly recomputed an empty result from incorrect source declarations.
220
+ If the root manifest / team config uses the wrong app id (for example, still declaring the legacy id `web_dev` or the old unscoped id `web-dev` inside `dependencies[].id` or `members.<id>.from` while the app now installs as `@longrun-ai/web-dev`), refresh will still re-materialize `resolution.yaml` as empty. That means self-heal did run; it just correctly recomputed an empty result from incorrect source declarations.
221
221
 
222
222
  So even without `<rtws>/.apps/configuration.yaml` or `<rtws>/.apps/resolution.yaml`, as long as `.minds/app.yaml` declares dependencies, the kernel still resolves local apps via the default strategy; if the root manifest has no dependencies, the effective enabled apps set is empty.
223
223
 
@@ -249,7 +249,6 @@ It describes:
249
249
  - default toolsets/tools for those members;
250
250
  - how those members see each other and collaborate within the app.
251
251
 
252
- > Current prototype behavior: the kernel loads enabled app teammates YAML and **additively merges `members` into workspace `.minds/team.yaml`**.
253
252
  > Current (v0): the kernel loads enabled app teammates YAML but does **not** flatten-merge their `members` into workspace `.minds/team.yaml`.
254
253
  > You must explicitly reference a dependency app teammate via `members.<id>.from + (use|import)` in workspace `.minds/team.yaml`.
255
254
  > Loader: `dominds/main/apps/teammates.ts`; resolver/execution: `dominds/main/team.ts`.
@@ -282,38 +281,46 @@ Its goal is not to represent one specific product. Its goal is to provide a high
282
281
 
283
282
  Design stance:
284
283
 
285
- - `Web Dev App` is an **integrator-style app**. The important part is the packaging of team, toolsets, environment guidance, and workflow posture, not a demo business frontend.
284
+ - `Web Dev App` is an **integrator-style app**. The important part is the packaging of team, toolsets, environment guidance, and collaboration posture, not a demo business frontend.
286
285
  - It should reuse existing capabilities where possible instead of inventing a new browser automation protocol inside the app.
287
- - The current upstream capability to learn from is the repo-root `playwright-interactive/` skill. That skill is better understood as a workflow/method asset, not as a ready-to-install Dominds MCP server.
286
+ - The current upstream capability to learn from is OpenAI's `playwright-interactive` entry in the `skills` repo. It appears as a `SKILL.md` largely because the upstream product treats `js_repl` as a built-in capability and uses the skill layer to explain how to operate it. Dominds should not inherit that split directly. A more self-consistent Dominds packaging boundary is to ship **dedicated tools + toolset manual + recommended teammate definitions** as one app-level capability. In that sense, `Web Dev App` is not “wrapping a pure skill”; it is re-packaging the same capability family with a cleaner product boundary.
288
287
 
289
288
  So `Web Dev App` should make the `playwright-interactive` relationship explicit as two separate layers:
290
289
 
291
290
  1. **Product-semantic layer (in scope for this design)**
292
- - define a stable toolset semantic such as `playwright_interactive`;
291
+ - define a stable toolset name such as `playwright_interactive`;
293
292
  - define which teammates receive it, what problem it solves, and when to use it;
294
- - ship the related `.minds/team.yaml`, member persona/knowledge, `.minds/env.md`, etc.
293
+ - ship the related `.minds/team.yaml`, member persona/knowledge/lessons, `.minds/env.md`, toolset manual, etc.
295
294
  2. **Execution-backend layer (replaceable implementation detail)**
296
- - this may wrap the `playwright-interactive` skill into app-host tools;
297
- - or later be replaced by an equivalent MCP server / local host module;
295
+ - the app may provide its own dedicated tools and productize a browser-interaction capability in the same family as `playwright-interactive`;
296
+ - or later be replaced by an equivalent MCP server / local App Host module;
298
297
  - as long as the team-facing toolset contract does not drift.
299
298
 
300
- It must be explicit that **an app is not the same thing as a skill**:
299
+ It must be explicit that **an app is not the same thing as a skill**, and that both are now first-class mechanisms in the current implementation:
301
300
 
302
301
  - An **app** is a Dominds install/resolve/composition unit. It has an `id`, a manifest (`.minds/app.yaml`), team-facing assets (`.minds/team.yaml`, persona/knowledge/lessons), env docs (`.minds/env.md`), and participates in rtws-level lock/configuration/resolution.
303
- - A **skill** is closer to a workflow asset, method asset, or low-level execution material. A skill can be reused, wrapped, or replaced by an app, but it usually does not own rtws installation, dependency graph membership, or `team.yaml` import semantics by itself.
304
- - `playwright-interactive/` is currently closer to a skill: it provides browser-workflow capability that Web Dev can learn from or wrap. `Web Dev App` is the installable product unit that packages those capabilities into a stable team/toolset/env contract.
302
+ - A **skill** is a pure-Markdown capability asset inside the rtws. It is currently loaded from `.minds/skills/team_shared/**` and `.minds/skills/individual/**`, selects `SKILL.cn.md` / `SKILL.en.md` / `SKILL.md` by work language preference, and injects the body directly into the agent system prompt. It is best suited for soft guidance, checklists, decision heuristics, and team-specific methods, not for distributable product capability that depends on a stable tool contract.
303
+ - Skill frontmatter currently supports `name`, `description`, `allowed-tools`, `user-invocable`, and `disable-model-invocation`; the last three are currently compatibility/migration metadata only. They do not automatically grant tool permissions and do not replace team/toolset runtime policy.
304
+ - A **toolset manual / app-bundled manual** is a better place for guidance that is shipped together with tools: it is skill-like in tone, but distributed together with dedicated tools, toolsets, and app identity. That is a better fit for something like `web-dev`.
305
+ - `playwright-interactive/` should not be classified as that pure-Markdown rtws skill category. More precisely, it represents a guidance layer on top of built-in browser execution capability. In Dominds, the cleaner move is to package dedicated tools, toolset manual, recommended teammate definitions, and runtime state together as an app such as `@longrun-ai/web-dev`.
306
+ - In Dominds terminology, **workflow** should preferably be reserved for hard process mechanisms such as `phase-gate`, which carry phase/gate/quorum/rollback/auto-advance semantics. Skills and toolset manuals are closer to guidance layers or operating manuals than to a workflow engine.
305
307
 
306
- So the correct story is not “install a skill as an app”. The correct story is:
308
+ So the correct story is not “install a pure skill as an app”. The correct story is:
307
309
 
308
- - the skill is absorbed as implementation material by an app,
309
- - the app exposes a stable team-facing contract,
310
- - the low-level skill / MCP / host-module backend can change later without changing the app identity or team-facing semantics.
310
+ - if the content is **pure prompt/pure Markdown and needs no extra tool capability**, keep it directly as an rtws skill,
311
+ - once a capability package needs dedicated tools, external binaries, MCP, App-provided tools, stable toolset naming, teammate assembly, or dependency resolution, package **tools + toolset manual + recommended teammate definitions + team-facing contract** as an app,
312
+ - when other apps depend on that capability, they should depend on the packaged app rather than expecting each workspace to copy the skill and hand-wire tools,
313
+ - the app exposes the stable team/toolset/env contract, while the low-level skill / MCP / local App Host backend may change later without changing the app identity or team-facing semantics.
314
+
315
+ The shortest rule of thumb is:
316
+
317
+ - **skills own soft guidance, toolset manuals own tool-coupled operating guidance, and apps own tool capability, dependency relationships, and the team-facing contract.**
311
318
 
312
319
  Suggested user-facing installation flow:
313
320
 
314
321
  ```bash
315
322
  # Local app under development
316
- dominds install ./dominds-apps/web-dev --local --enable
323
+ dominds install ./dominds-apps/@longrun-ai/web-dev --local --enable
317
324
 
318
325
  # Published npm app (target shape)
319
326
  dominds install @longrun-ai/web-dev --enable
@@ -321,11 +328,11 @@ dominds install @longrun-ai/web-dev --enable
321
328
 
322
329
  Web Dev App needs three names kept distinct to avoid drift:
323
330
 
324
- - installable app id: `web-dev`
325
- - local development directory: `dominds-apps/web-dev/`
331
+ - installable app id: `@longrun-ai/web-dev`
332
+ - local development directory: `dominds-apps/@longrun-ai/web-dev/`
326
333
  - npm package name: `@longrun-ai/web-dev`
327
334
 
328
- That means workspace `.minds/app.yaml` `dependencies[].id`, `.minds/team.yaml` `members.<id>.from`, and `<rtws>/.apps/resolution.yaml` `apps[].id` must all use `web-dev`; the directory and package naming surfaces also stay `web-dev` so the app no longer carries two spellings.
335
+ That means workspace `.minds/app.yaml` `dependencies[].id`, `.minds/team.yaml` `members.<id>.from`, and `<rtws>/.apps/resolution.yaml` `apps[].id` must all use `@longrun-ai/web-dev`; the local development directory and npm package should stay aligned to that same scoped identity so the app no longer carries split naming.
329
336
 
330
337
  After installation, the user should expect these files to change:
331
338
 
@@ -337,7 +344,7 @@ After installation, the user should expect these files to change:
337
344
  Suggested minimal asset shape:
338
345
 
339
346
  ```text
340
- web-dev/
347
+ @longrun-ai/web-dev/
341
348
  ├── package.json
342
349
  ├── .minds/
343
350
  │ ├── app.yaml
@@ -398,10 +405,10 @@ Requirements for the `playwright_interactive` toolset design:
398
405
  - preserve the “reusable session across multiple fix iterations” mental model.
399
406
  - If the current phase does not yet ship a directly executable backend, the docs must label it as a **target contract (planned)** instead of pretending it is already built in.
400
407
 
401
- Current prototype note (`dominds-apps/web-dev`, as of March 8, 2026):
408
+ Current prototype note (`dominds-apps/@longrun-ai/web-dev`, as of March 8, 2026):
402
409
 
403
410
  - The app is already installable and contributes `web_tester` / `web_developer` teammates plus a live `playwright_interactive` toolset registration.
404
- - The installable app id remains `web-dev`; the directory name and npm package also keep the same `web-dev` spelling so the app no longer carries split naming.
411
+ - The installable app id remains `@longrun-ai/web-dev`; the local development directory and npm package also keep the same scoped identity so the app no longer carries split naming.
405
412
  - `playwright_session_new/list/status/eval/attach/detach/close` and cross-dialog reminder sync are already implemented.
406
413
  - `kind: "web"` sessions now create a real Playwright-backed browser/context/page runtime and report live page surfaces via session status/reminders.
407
414
  - `kind: "electron"` is **not** at the same completion level yet: it still falls back to the older prototype runtime path and should be treated as unfinished.
@@ -413,7 +420,7 @@ Current prototype note (`dominds-apps/web-dev`, as of March 8, 2026):
413
420
  Why this app shape matters:
414
421
 
415
422
  - It makes `.minds/team.yaml` collaboration semantics concrete: development and testing are two long-lived teammates, not vague temporary roles.
416
- - It validates whether “app provides team + toolset + env docs” is expressive enough for a real workflow.
423
+ - It validates whether “app provides team + toolset + env docs” is expressive enough for a real collaborative capability package.
417
424
  - It gives future skill/MCP/local-host convergence a stable semantic anchor at the app layer.
418
425
 
419
426
  ## `<rtws>/.apps/override/<app-id>/`: override layer