dominds 1.26.2 → 1.26.4

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 (140) hide show
  1. package/README.md +2 -0
  2. package/README.zh.md +2 -0
  3. package/dist/cli.js +10 -8
  4. package/dist/docs/cli-usage.md +1 -1
  5. package/dist/docs/cli-usage.zh.md +1 -1
  6. package/dist/llm/gen/mock.js +11 -3
  7. package/dist/llm/kernel-driver/context-health.d.ts +1 -0
  8. package/dist/llm/kernel-driver/context-health.js +7 -0
  9. package/dist/llm/kernel-driver/drive.js +25 -30
  10. package/dist/llm/kernel-driver/idle-reminder-wake.js +6 -2
  11. package/dist/llm/kernel-driver/reminder-context.d.ts +26 -0
  12. package/dist/llm/kernel-driver/reminder-context.js +82 -0
  13. package/dist/llm/kernel-driver/reply-guidance.js +10 -4
  14. package/dist/llm/kernel-driver/tellask-special.js +50 -35
  15. package/dist/mcp/supervisor.js +2 -2
  16. package/dist/minds/system-prompt-parts.js +30 -30
  17. package/dist/minds/system-prompt.js +63 -40
  18. package/dist/persistence.js +15 -1
  19. package/dist/runtime/driver-messages.d.ts +38 -7
  20. package/dist/runtime/driver-messages.js +320 -119
  21. package/dist/runtime/inter-dialog-format.js +24 -12
  22. package/dist/runtime/reply-prompt-copy.d.ts +8 -8
  23. package/dist/runtime/reply-prompt-copy.js +69 -38
  24. package/dist/server/api-routes.js +7 -2
  25. package/dist/server/certificates.js +65 -25
  26. package/dist/server/dominds-self-update.d.ts +1 -0
  27. package/dist/server/dominds-self-update.js +113 -56
  28. package/dist/supervisor-protocol.d.ts +2 -3
  29. package/dist/tools/mcp.js +12 -12
  30. package/dist/tools/prompts/control/en/index.md +2 -2
  31. package/dist/tools/prompts/control/en/principles.md +12 -12
  32. package/dist/tools/prompts/control/en/scenarios.md +5 -5
  33. package/dist/tools/prompts/control/en/tools.md +10 -10
  34. package/dist/tools/prompts/control/zh/index.md +3 -3
  35. package/dist/tools/prompts/control/zh/principles.md +12 -12
  36. package/dist/tools/prompts/control/zh/scenarios.md +7 -7
  37. package/dist/tools/prompts/control/zh/tools.md +11 -11
  38. package/dist/tools/prompts/mcp_admin/en/principles.md +4 -4
  39. package/dist/tools/prompts/mcp_admin/en/scenarios.md +1 -1
  40. package/dist/tools/prompts/mcp_admin/en/tools.md +3 -3
  41. package/dist/tools/prompts/mcp_admin/zh/principles.md +4 -4
  42. package/dist/tools/prompts/mcp_admin/zh/scenarios.md +1 -1
  43. package/dist/tools/prompts/mcp_admin/zh/tools.md +3 -3
  44. package/dist/tools/team_mgmt-mcp-manual.js +12 -12
  45. package/package.json +2 -1
  46. package/webapp/dist/assets/{_basePickBy-DUivPKf7.js → _basePickBy-mFK6EVZU.js} +3 -3
  47. package/webapp/dist/assets/{_basePickBy-DUivPKf7.js.map → _basePickBy-mFK6EVZU.js.map} +1 -1
  48. package/webapp/dist/assets/{_baseUniq-hcs024vD.js → _baseUniq-C8zyOqn7.js} +2 -2
  49. package/webapp/dist/assets/{_baseUniq-hcs024vD.js.map → _baseUniq-C8zyOqn7.js.map} +1 -1
  50. package/webapp/dist/assets/{arc-Dr6-FXp5.js → arc-Vdl3uhV8.js} +2 -2
  51. package/webapp/dist/assets/{arc-Dr6-FXp5.js.map → arc-Vdl3uhV8.js.map} +1 -1
  52. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DXqcDq4R.js → architectureDiagram-2XIMDMQ5-D3Xtb8u_.js} +7 -7
  53. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DXqcDq4R.js.map → architectureDiagram-2XIMDMQ5-D3Xtb8u_.js.map} +1 -1
  54. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-IIP6LGXS.js → blockDiagram-WCTKOSBZ-Bozcnodw.js} +7 -7
  55. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-IIP6LGXS.js.map → blockDiagram-WCTKOSBZ-Bozcnodw.js.map} +1 -1
  56. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D_d3F9XD.js → c4Diagram-IC4MRINW-CLkxlY6N.js} +3 -3
  57. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D_d3F9XD.js.map → c4Diagram-IC4MRINW-CLkxlY6N.js.map} +1 -1
  58. package/webapp/dist/assets/{channel-CWWjsXtU.js → channel-CqGyLCM_.js} +2 -2
  59. package/webapp/dist/assets/{channel-CWWjsXtU.js.map → channel-CqGyLCM_.js.map} +1 -1
  60. package/webapp/dist/assets/{chunk-4BX2VUAB-BF4yph2W.js → chunk-4BX2VUAB-BNsJpMh4.js} +2 -2
  61. package/webapp/dist/assets/{chunk-4BX2VUAB-BF4yph2W.js.map → chunk-4BX2VUAB-BNsJpMh4.js.map} +1 -1
  62. package/webapp/dist/assets/{chunk-55IACEB6-Hn3CmDYz.js → chunk-55IACEB6-B59p6vzX.js} +2 -2
  63. package/webapp/dist/assets/{chunk-55IACEB6-Hn3CmDYz.js.map → chunk-55IACEB6-B59p6vzX.js.map} +1 -1
  64. package/webapp/dist/assets/{chunk-FMBD7UC4-C05pl9Ov.js → chunk-FMBD7UC4-CB17a_Ki.js} +2 -2
  65. package/webapp/dist/assets/{chunk-FMBD7UC4-C05pl9Ov.js.map → chunk-FMBD7UC4-CB17a_Ki.js.map} +1 -1
  66. package/webapp/dist/assets/{chunk-JSJVCQXG-BVlq_BAS.js → chunk-JSJVCQXG-DVnVflN-.js} +2 -2
  67. package/webapp/dist/assets/{chunk-JSJVCQXG-BVlq_BAS.js.map → chunk-JSJVCQXG-DVnVflN-.js.map} +1 -1
  68. package/webapp/dist/assets/{chunk-KX2RTZJC-BQoaRWif.js → chunk-KX2RTZJC-D9_5LvIO.js} +2 -2
  69. package/webapp/dist/assets/{chunk-KX2RTZJC-BQoaRWif.js.map → chunk-KX2RTZJC-D9_5LvIO.js.map} +1 -1
  70. package/webapp/dist/assets/{chunk-NQ4KR5QH-0okCAXtW.js → chunk-NQ4KR5QH-CZWI2G2c.js} +4 -4
  71. package/webapp/dist/assets/{chunk-NQ4KR5QH-0okCAXtW.js.map → chunk-NQ4KR5QH-CZWI2G2c.js.map} +1 -1
  72. package/webapp/dist/assets/{chunk-QZHKN3VN-DEiprgz-.js → chunk-QZHKN3VN-WCLg8cNX.js} +2 -2
  73. package/webapp/dist/assets/{chunk-QZHKN3VN-DEiprgz-.js.map → chunk-QZHKN3VN-WCLg8cNX.js.map} +1 -1
  74. package/webapp/dist/assets/{chunk-WL4C6EOR-B-Xkb3lo.js → chunk-WL4C6EOR-BFkz_P__.js} +6 -6
  75. package/webapp/dist/assets/{chunk-WL4C6EOR-B-Xkb3lo.js.map → chunk-WL4C6EOR-BFkz_P__.js.map} +1 -1
  76. package/webapp/dist/assets/{classDiagram-VBA2DB6C-DCCQrdwF.js → classDiagram-VBA2DB6C-DWQ1VnaI.js} +7 -7
  77. package/webapp/dist/assets/{classDiagram-VBA2DB6C-DCCQrdwF.js.map → classDiagram-VBA2DB6C-DWQ1VnaI.js.map} +1 -1
  78. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-DCCQrdwF.js → classDiagram-v2-RAHNMMFH-DWQ1VnaI.js} +7 -7
  79. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-DCCQrdwF.js.map → classDiagram-v2-RAHNMMFH-DWQ1VnaI.js.map} +1 -1
  80. package/webapp/dist/assets/{clone-Drtik9pk.js → clone-D3QHqx6z.js} +2 -2
  81. package/webapp/dist/assets/{clone-Drtik9pk.js.map → clone-D3QHqx6z.js.map} +1 -1
  82. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BBWvHErL.js → cose-bilkent-S5V4N54A-D2dZHRG3.js} +2 -2
  83. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BBWvHErL.js.map → cose-bilkent-S5V4N54A-D2dZHRG3.js.map} +1 -1
  84. package/webapp/dist/assets/{dagre-KLK3FWXG-2qk0ikdt.js → dagre-KLK3FWXG-Cwz7pFDo.js} +7 -7
  85. package/webapp/dist/assets/{dagre-KLK3FWXG-2qk0ikdt.js.map → dagre-KLK3FWXG-Cwz7pFDo.js.map} +1 -1
  86. package/webapp/dist/assets/{diagram-E7M64L7V-C1DbHDbf.js → diagram-E7M64L7V-C6z0VVoW.js} +8 -8
  87. package/webapp/dist/assets/{diagram-E7M64L7V-C1DbHDbf.js.map → diagram-E7M64L7V-C6z0VVoW.js.map} +1 -1
  88. package/webapp/dist/assets/{diagram-IFDJBPK2-DToz8zk9.js → diagram-IFDJBPK2-CZ1KR1hO.js} +7 -7
  89. package/webapp/dist/assets/{diagram-IFDJBPK2-DToz8zk9.js.map → diagram-IFDJBPK2-CZ1KR1hO.js.map} +1 -1
  90. package/webapp/dist/assets/{diagram-P4PSJMXO-B9V-tQMe.js → diagram-P4PSJMXO-ChwZDZYa.js} +7 -7
  91. package/webapp/dist/assets/{diagram-P4PSJMXO-B9V-tQMe.js.map → diagram-P4PSJMXO-ChwZDZYa.js.map} +1 -1
  92. package/webapp/dist/assets/{erDiagram-INFDFZHY-CV68FwGf.js → erDiagram-INFDFZHY-DCnHsk_Z.js} +5 -5
  93. package/webapp/dist/assets/{erDiagram-INFDFZHY-CV68FwGf.js.map → erDiagram-INFDFZHY-DCnHsk_Z.js.map} +1 -1
  94. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-CW06almb.js → flowDiagram-PKNHOUZH-C5Hi85ST.js} +7 -7
  95. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-CW06almb.js.map → flowDiagram-PKNHOUZH-C5Hi85ST.js.map} +1 -1
  96. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-C96NncCU.js → ganttDiagram-A5KZAMGK-vT15RP6A.js} +3 -3
  97. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-C96NncCU.js.map → ganttDiagram-A5KZAMGK-vT15RP6A.js.map} +1 -1
  98. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CAuIexWi.js → gitGraphDiagram-K3NZZRJ6-Ct5XDpFu.js} +8 -8
  99. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CAuIexWi.js.map → gitGraphDiagram-K3NZZRJ6-Ct5XDpFu.js.map} +1 -1
  100. package/webapp/dist/assets/{graph-CvhwAY6w.js → graph-CqFTrHii.js} +3 -3
  101. package/webapp/dist/assets/{graph-CvhwAY6w.js.map → graph-CqFTrHii.js.map} +1 -1
  102. package/webapp/dist/assets/{index-BOO_zFrI.js → index-C_PzQ5W5.js} +600 -400
  103. package/webapp/dist/assets/{index-BOO_zFrI.js.map → index-C_PzQ5W5.js.map} +1 -1
  104. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-C16Sckpz.js → infoDiagram-LFFYTUFH-DlyOw8IT.js} +6 -6
  105. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-C16Sckpz.js.map → infoDiagram-LFFYTUFH-DlyOw8IT.js.map} +1 -1
  106. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-oNG6I0p3.js → ishikawaDiagram-PHBUUO56-iZCVn19K.js} +2 -2
  107. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-oNG6I0p3.js.map → ishikawaDiagram-PHBUUO56-iZCVn19K.js.map} +1 -1
  108. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-437hhFHC.js → journeyDiagram-4ABVD52K-B95gnBKj.js} +5 -5
  109. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-437hhFHC.js.map → journeyDiagram-4ABVD52K-B95gnBKj.js.map} +1 -1
  110. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DsCV_Tpx.js → kanban-definition-K7BYSVSG-DQ2gfPUK.js} +3 -3
  111. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DsCV_Tpx.js.map → kanban-definition-K7BYSVSG-DQ2gfPUK.js.map} +1 -1
  112. package/webapp/dist/assets/{layout-BttZf7fQ.js → layout-VOBFudHV.js} +5 -5
  113. package/webapp/dist/assets/{layout-BttZf7fQ.js.map → layout-VOBFudHV.js.map} +1 -1
  114. package/webapp/dist/assets/{linear-B75vD4Ho.js → linear-BtBp93s2.js} +2 -2
  115. package/webapp/dist/assets/{linear-B75vD4Ho.js.map → linear-BtBp93s2.js.map} +1 -1
  116. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-DA1-XaNi.js → mindmap-definition-YRQLILUH-m2w1nBbY.js} +4 -4
  117. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-DA1-XaNi.js.map → mindmap-definition-YRQLILUH-m2w1nBbY.js.map} +1 -1
  118. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-Bx6hUJ4Q.js → pieDiagram-SKSYHLDU-ByoyS2as.js} +8 -8
  119. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-Bx6hUJ4Q.js.map → pieDiagram-SKSYHLDU-ByoyS2as.js.map} +1 -1
  120. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-zyduIle0.js → quadrantDiagram-337W2JSQ-BnKSsLfA.js} +3 -3
  121. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-zyduIle0.js.map → quadrantDiagram-337W2JSQ-BnKSsLfA.js.map} +1 -1
  122. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-BgfjyEJM.js → requirementDiagram-Z7DCOOCP-jU2C7qJN.js} +4 -4
  123. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-BgfjyEJM.js.map → requirementDiagram-Z7DCOOCP-jU2C7qJN.js.map} +1 -1
  124. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-lmOWaczS.js → sankeyDiagram-WA2Y5GQK-R175tX8b.js} +2 -2
  125. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-lmOWaczS.js.map → sankeyDiagram-WA2Y5GQK-R175tX8b.js.map} +1 -1
  126. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqJz-iYI.js → sequenceDiagram-2WXFIKYE-CBhN4j2Q.js} +4 -4
  127. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-DqJz-iYI.js.map → sequenceDiagram-2WXFIKYE-CBhN4j2Q.js.map} +1 -1
  128. package/webapp/dist/assets/{stateDiagram-RAJIS63D-CngWYuX-.js → stateDiagram-RAJIS63D-DZSAyRfJ.js} +9 -9
  129. package/webapp/dist/assets/{stateDiagram-RAJIS63D-CngWYuX-.js.map → stateDiagram-RAJIS63D-DZSAyRfJ.js.map} +1 -1
  130. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BxyHvrvU.js → stateDiagram-v2-FVOUBMTO-x29lKJpl.js} +5 -5
  131. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BxyHvrvU.js.map → stateDiagram-v2-FVOUBMTO-x29lKJpl.js.map} +1 -1
  132. package/webapp/dist/assets/{timeline-definition-YZTLITO2-C7t6WVS3.js → timeline-definition-YZTLITO2-BQR2qEXt.js} +3 -3
  133. package/webapp/dist/assets/{timeline-definition-YZTLITO2-C7t6WVS3.js.map → timeline-definition-YZTLITO2-BQR2qEXt.js.map} +1 -1
  134. package/webapp/dist/assets/{treemap-KZPCXAKY-BDZ3n5TC.js → treemap-KZPCXAKY-b823qTE1.js} +5 -5
  135. package/webapp/dist/assets/{treemap-KZPCXAKY-BDZ3n5TC.js.map → treemap-KZPCXAKY-b823qTE1.js.map} +1 -1
  136. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-CEw7GPed.js → vennDiagram-LZ73GAT5-BrxPNUYz.js} +2 -2
  137. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-CEw7GPed.js.map → vennDiagram-LZ73GAT5-BrxPNUYz.js.map} +1 -1
  138. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DmS8BiaA.js → xychartDiagram-JWTSCODW-BgOzlz6Z.js} +3 -3
  139. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DmS8BiaA.js.map → xychartDiagram-JWTSCODW-BgOzlz6Z.js.map} +1 -1
  140. package/webapp/dist/index.html +1 -1
package/README.md CHANGED
@@ -257,6 +257,8 @@ Platform note:
257
257
 
258
258
  Dominds always keeps an HTTP listener. When a valid certificate matching the current `--host` exists under `~/.dominds/certs/`, Dominds also starts HTTPS. Certificates match DNS/IP hostnames, not ports, so one certificate covers all Dominds WebUI ports on that host.
259
259
 
260
+ Dominds generates certificates through npm dependencies, so no separate `openssl` command is required.
261
+
260
262
  ```bash
261
263
  # Create a 10-year self-signed certificate for detected non-loopback LAN hosts
262
264
  dominds cert create
package/README.zh.md CHANGED
@@ -196,6 +196,8 @@ dominds
196
196
 
197
197
  Dominds 默认始终提供 HTTP 监听;当 `~/.dominds/certs/` 下存在匹配当前 `--host` 的有效证书时,会额外启用 HTTPS。证书按 DNS/IP 主机名匹配,不绑定端口,因此同一张证书可覆盖该主机上的所有 Dominds WebUI 端口。
198
198
 
199
+ 证书由 Dominds 通过 npm 依赖生成,无需额外安装 `openssl` 等系统命令。
200
+
199
201
  ```bash
200
202
  # 自动为检测到的一个或多个非 loopback LAN 主机创建 10 年有效的自签名证书
201
203
  dominds cert create
package/dist/cli.js CHANGED
@@ -93,8 +93,8 @@ function parseSupervisorArgs(argv) {
93
93
  function isRecord(value) {
94
94
  return typeof value === 'object' && value !== null && !Array.isArray(value);
95
95
  }
96
- function isRestartRunKind(value) {
97
- return value === 'global' || value === 'npx';
96
+ function isRestartStrategy(value) {
97
+ return value === 'current_entrypoint' || value === 'npx_latest';
98
98
  }
99
99
  function parseRunnerMessage(message) {
100
100
  if (!isRecord(message))
@@ -108,7 +108,7 @@ function parseRunnerMessage(message) {
108
108
  const debugDir = message['debugDir'];
109
109
  const currentVersion = message['currentVersion'];
110
110
  const targetVersion = message['targetVersion'];
111
- const runKind = message['runKind'];
111
+ const restartStrategy = message['restartStrategy'];
112
112
  const invalid = (reason) => ({
113
113
  kind: 'invalid',
114
114
  reason,
@@ -131,8 +131,9 @@ function parseRunnerMessage(message) {
131
131
  if (targetVersion !== null && typeof targetVersion !== 'string') {
132
132
  return invalid('targetVersion must be a string or null');
133
133
  }
134
- if (!isRestartRunKind(runKind))
135
- return invalid('runKind must be global or npx');
134
+ if (!isRestartStrategy(restartStrategy)) {
135
+ return invalid('restartStrategy must be current_entrypoint or npx_latest');
136
+ }
136
137
  return {
137
138
  kind: 'restart',
138
139
  message: {
@@ -144,7 +145,7 @@ function parseRunnerMessage(message) {
144
145
  debugDir,
145
146
  currentVersion,
146
147
  targetVersion,
147
- runKind,
148
+ restartStrategy,
148
149
  },
149
150
  };
150
151
  }
@@ -186,7 +187,7 @@ function appendInvalidSupervisorTraceSoon(parsed, event = 'supervisor.invalid_re
186
187
  debugDir: parsed.debugDir,
187
188
  currentVersion: 'unknown',
188
189
  targetVersion: null,
189
- runKind: 'global',
190
+ restartStrategy: 'current_entrypoint',
190
191
  };
191
192
  appendSupervisorTraceSoon(message, event, {
192
193
  ...details,
@@ -490,6 +491,7 @@ async function runSupervised(params) {
490
491
  cwd: message.cwd,
491
492
  host: message.host,
492
493
  port: message.port,
494
+ restartStrategy: message.restartStrategy,
493
495
  });
494
496
  scheduleRestartExitEnforcement(child, message);
495
497
  });
@@ -540,7 +542,7 @@ async function runSupervised(params) {
540
542
  return 0;
541
543
  backoffMs = Math.min(backoffMs * 2, MAX_RESTART_BACKOFF_MS);
542
544
  }
543
- if (restart.runKind === 'npx') {
545
+ if (restart.restartStrategy === 'npx_latest') {
544
546
  while (true) {
545
547
  try {
546
548
  const runnerEntrypoint = await resolveNpxLatestRunnerEntrypoint();
@@ -153,7 +153,7 @@ dominds cert create [--host <host>] [--days <days>] [--force]
153
153
  dominds cert status [--host <host>] [--port <port>] [--origin]
154
154
  ```
155
155
 
156
- Create or inspect local HTTPS certificates for the Dominds WebUI. Certificates live in `~/.dominds/certs/` and match DNS/IP hostnames, not ports; one certificate covers every WebUI port on that host.
156
+ Create or inspect local HTTPS certificates for the Dominds WebUI. Dominds generates certificates through npm dependencies, so no separate `openssl` command is required. Certificates live in `~/.dominds/certs/` and match DNS/IP hostnames, not ports; one certificate covers every WebUI port on that host.
157
157
 
158
158
  **Options:**
159
159
 
@@ -160,7 +160,7 @@ dominds cert create [--host <host>] [--days <days>] [--force]
160
160
  dominds cert status [--host <host>] [--port <port>] [--origin]
161
161
  ```
162
162
 
163
- 创建或检查 Dominds WebUI 的本机 HTTPS 证书。证书保存在 `~/.dominds/certs/`,按 DNS/IP 主机名匹配,不绑定端口;同一张证书可覆盖该主机上的所有 WebUI 端口。
163
+ 创建或检查 Dominds WebUI 的本机 HTTPS 证书。证书由 Dominds 通过 npm 依赖生成,无需额外安装 `openssl` 等系统命令。证书保存在 `~/.dominds/certs/`,按 DNS/IP 主机名匹配,不绑定端口;同一张证书可覆盖该主机上的所有 WebUI 端口。
164
164
 
165
165
  **选项:**
166
166
 
@@ -326,9 +326,17 @@ class MockGen {
326
326
  if (trimmed !== '') {
327
327
  variants.add(trimmed.toLowerCase());
328
328
  }
329
- const tellaskStatusIndexZh = trimmed.lastIndexOf('\n[Dominds 诉请状态]\n');
330
- const tellaskStatusIndexEn = trimmed.lastIndexOf('\n[Dominds tellask status]\n');
331
- const tellaskStatusIndex = Math.max(tellaskStatusIndexZh, tellaskStatusIndexEn);
329
+ const tellaskStatusPrefixes = [
330
+ '\n[Dominds 诉请状态]\n',
331
+ '\n[Dominds tellask status]\n',
332
+ '\n[Dominds 等待人类回复]\n',
333
+ '\n[Dominds waiting for human answer]\n',
334
+ '\n[Dominds 等待队友回贴]\n',
335
+ '\n[Dominds waiting for teammate reply]\n',
336
+ '\n[Dominds 队友回贴状态]\n',
337
+ '\n[Dominds teammate reply status]\n',
338
+ ];
339
+ const tellaskStatusIndex = Math.max(...tellaskStatusPrefixes.map((prefix) => trimmed.lastIndexOf(prefix)));
332
340
  if (tellaskStatusIndex >= 0) {
333
341
  const strippedTellaskStatus = trimmed.slice(0, tellaskStatusIndex).trim();
334
342
  if (strippedTellaskStatus !== '') {
@@ -7,6 +7,7 @@ export type KernelDriverContextHealthDecision = Readonly<{
7
7
  }>;
8
8
  export declare const KERNEL_DRIVER_DEFAULT_CRITICAL_COUNTDOWN_GENERATIONS = 5;
9
9
  export declare const KERNEL_DRIVER_DEFAULT_CAUTION_REMEDIATION_CADENCE_GENERATIONS = 10;
10
+ export declare function getContextHealthRemediationLevel(snapshot: ContextHealthSnapshot | undefined): 'caution' | 'critical' | undefined;
10
11
  export declare function resetContextHealthRoundState(dialogKey: string): void;
11
12
  export declare function resolveCriticalCountdownRemaining(dialogKey: string, snapshot: ContextHealthSnapshot | undefined): number;
12
13
  export declare function consumeCriticalCountdown(dialogKey: string): number;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KERNEL_DRIVER_DEFAULT_CAUTION_REMEDIATION_CADENCE_GENERATIONS = exports.KERNEL_DRIVER_DEFAULT_CRITICAL_COUNTDOWN_GENERATIONS = void 0;
4
+ exports.getContextHealthRemediationLevel = getContextHealthRemediationLevel;
4
5
  exports.resetContextHealthRoundState = resetContextHealthRoundState;
5
6
  exports.resolveCriticalCountdownRemaining = resolveCriticalCountdownRemaining;
6
7
  exports.consumeCriticalCountdown = consumeCriticalCountdown;
@@ -9,6 +10,12 @@ exports.decideKernelDriverContextHealth = decideKernelDriverContextHealth;
9
10
  exports.KERNEL_DRIVER_DEFAULT_CRITICAL_COUNTDOWN_GENERATIONS = 5;
10
11
  exports.KERNEL_DRIVER_DEFAULT_CAUTION_REMEDIATION_CADENCE_GENERATIONS = 10;
11
12
  const stateByDialogKey = new Map();
13
+ function getContextHealthRemediationLevel(snapshot) {
14
+ if (snapshot?.kind !== 'available') {
15
+ return undefined;
16
+ }
17
+ return snapshot.level === 'caution' || snapshot.level === 'critical' ? snapshot.level : undefined;
18
+ }
12
19
  function getOrCreateState(dialogKey) {
13
20
  const existing = stateByDialogKey.get(dialogKey);
14
21
  if (existing)
@@ -34,6 +34,7 @@ const context_health_1 = require("./context-health");
34
34
  const events_1 = require("./events");
35
35
  const fbr_1 = require("./fbr");
36
36
  const guardrails_1 = require("./guardrails");
37
+ const reminder_context_1 = require("./reminder-context");
37
38
  const reply_guidance_1 = require("./reply-guidance");
38
39
  const runtime_1 = require("./runtime");
39
40
  const tellask_special_1 = require("./tellask-special");
@@ -254,31 +255,31 @@ function isUserOriginPrompt(prompt) {
254
255
  return false;
255
256
  return prompt.origin === 'user' && normalizeQ4HAnswerCallId(prompt.q4hAnswerCallId) === undefined;
256
257
  }
257
- function resolveReminderContextFollowingDialogState(prompt, currentTurnDialogMsgsForContext) {
258
- if (prompt === undefined || currentTurnDialogMsgsForContext.length === 0)
259
- return 'none';
260
- return prompt.origin === 'user' ? 'user_message' : 'runtime_notice';
261
- }
262
- function resolveReminderContextHealthState(snapshot) {
263
- const remediationLevel = getContextHealthRemediationLevel(snapshot);
264
- return remediationLevel === undefined ? 'normal' : remediationLevel;
265
- }
266
258
  async function resolveReminderContextFooterState(args) {
267
259
  const latest = await persistence_1.DialogPersistence.loadDialogLatest(args.dlg.id, args.dlg.status);
268
260
  const deferredReplyReassertion = latest?.deferredReplyReassertion;
269
261
  const activeReplyObligation = await persistence_1.DialogPersistence.loadActiveTellaskReplyObligation(args.dlg.id, args.dlg.status);
270
262
  const pendingUserInterjectionReply = latest?.pendingUserInterjectionReply !== undefined;
271
- const interDialogReplyObligation = deferredReplyReassertion?.reason === 'user_interjection_with_parked_original_task'
272
- ? 'parked_by_user_interjection'
273
- : activeReplyObligation !== undefined
274
- ? 'active'
275
- : 'none';
276
- return {
277
- followingDialogState: resolveReminderContextFollowingDialogState(args.prompt, args.currentTurnDialogMsgsForContext),
263
+ const hasDeferredReplyReassertion = deferredReplyReassertion?.reason === 'user_interjection_with_parked_original_task';
264
+ const hasActiveReplyObligation = activeReplyObligation !== undefined;
265
+ // Business scenario: a user can reopen a completed Side Dialog to ask a follow-up. A recorded
266
+ // final response with no active/parked reply task means the old handoff has already been
267
+ // reported back; if a real user message is now present, the footer should say "talk with the
268
+ // user now" instead of making the model infer that from old transcript/reminder context.
269
+ const hasCompletedHandoffWithoutPendingReply = latest?.sideDialogFinalResponse !== undefined &&
270
+ !hasDeferredReplyReassertion &&
271
+ !hasActiveReplyObligation;
272
+ const dialogScope = args.dlg instanceof dialog_1.SideDialog ? { kind: 'side_dialog' } : { kind: 'main_dialog' };
273
+ return (0, reminder_context_1.resolveReminderContextFooterStateFromSignals)({
274
+ dialogScope,
275
+ prompt: args.prompt,
276
+ currentTurnDialogMsgsForContext: args.currentTurnDialogMsgsForContext,
277
+ contextHealth: args.dlg.getLastContextHealth(),
278
278
  pendingUserInterjectionReply,
279
- interDialogReplyObligation,
280
- contextHealthState: resolveReminderContextHealthState(args.dlg.getLastContextHealth()),
281
- };
279
+ hasCompletedHandoffWithoutPendingReply,
280
+ hasDeferredReplyReassertion,
281
+ hasActiveReplyObligation,
282
+ });
282
283
  }
283
284
  function splitDialogMsgsForReminderInsertion(args) {
284
285
  const msgId = args.currentPrompt?.msgId;
@@ -722,12 +723,6 @@ const TELLASK_SPECIAL_VIRTUAL_TOOLS = [
722
723
  const CONTEXT_HEALTH_TOOL_RESULT_VISIBLE_BYTE_LIMIT = 2000;
723
724
  const CONTEXT_HEALTH_LARGE_TOOL_RETURN_UNAVAILABLE_ZH = '这次函数返回内容太大,清理头脑之前不会显示给你。';
724
725
  const CONTEXT_HEALTH_LARGE_TOOL_RETURN_UNAVAILABLE_EN = 'This function returned too much content. It will not be shown to you before you clear your mind.';
725
- function getContextHealthRemediationLevel(snapshot) {
726
- if (snapshot?.kind !== 'available') {
727
- return undefined;
728
- }
729
- return snapshot.level === 'caution' || snapshot.level === 'critical' ? snapshot.level : undefined;
730
- }
731
726
  function pickContextHealthForLargeToolResultVisibility(args) {
732
727
  if (args.current?.kind === 'available') {
733
728
  return args.current;
@@ -809,7 +804,7 @@ function countToolResultVisibleBytes(output) {
809
804
  return bytes;
810
805
  }
811
806
  function applyContextHealthToolResultVisibilityLimit(args) {
812
- if (getContextHealthRemediationLevel(args.contextHealth) === undefined) {
807
+ if ((0, context_health_1.getContextHealthRemediationLevel)(args.contextHealth) === undefined) {
813
808
  return { output: args.output, largeReturnUnavailable: false };
814
809
  }
815
810
  const visibleBytes = countToolResultVisibleBytes(args.output);
@@ -1336,7 +1331,7 @@ function formatInvalidFuncCallRuntimeGuide(language, call) {
1336
1331
  const indexLine = call.toolCallIndex === undefined ? undefined : `- toolCallIndex: ${String(call.toolCallIndex)}`;
1337
1332
  if (language === 'en') {
1338
1333
  return [
1339
- '[Runtime notice] The previous model output contained an invalid tool-call payload that could not be represented as a normal provider tool call in the next generation context.',
1334
+ '[Runtime notice] Your previous response tried to call a tool, but the tool call was malformed and could not be run.',
1340
1335
  '',
1341
1336
  `- provider: ${call.provider}`,
1342
1337
  `- callId: ${call.callId}`,
@@ -1348,13 +1343,13 @@ function formatInvalidFuncCallRuntimeGuide(language, call) {
1348
1343
  '```',
1349
1344
  ...(indexLine === undefined ? [] : [indexLine]),
1350
1345
  '',
1351
- 'Treat that payload as failed. Do not assume the tool ran. Continue from the current task, and if a tool call is still needed, emit a new valid tool call with a non-empty function name and valid arguments.',
1346
+ 'Treat that tool call as failed. Do not assume the tool ran. Continue the current task; if you still need a tool, call it again with a real tool name and valid arguments.',
1352
1347
  ]
1353
1348
  .filter((line) => line.length > 0)
1354
1349
  .join('\n');
1355
1350
  }
1356
1351
  return [
1357
- '[运行时提示] 上一轮模型输出包含一个无效工具调用载荷,无法按正常 provider tool call 形态进入下一轮生成上下文。',
1352
+ '[Dominds 提示] 你上一轮尝试调用工具,但工具调用格式无效,Dominds 没有执行它。',
1358
1353
  '',
1359
1354
  `- provider: ${call.provider}`,
1360
1355
  `- callId: ${call.callId}`,
@@ -1366,7 +1361,7 @@ function formatInvalidFuncCallRuntimeGuide(language, call) {
1366
1361
  '```',
1367
1362
  ...(indexLine === undefined ? [] : [indexLine]),
1368
1363
  '',
1369
- '请把该载荷视为调用失败,不要假设工具已经执行。继续当前任务;如果仍需要调用工具,请重新发起一个函数名非空、参数有效的新工具调用。',
1364
+ '请把这次工具调用视为失败,不要假设工具已经执行。继续当前任务;如果仍需要工具,请重新发起一次工具名明确、参数有效的调用。',
1370
1365
  ]
1371
1366
  .filter((line) => line.length > 0)
1372
1367
  .join('\n');
@@ -89,15 +89,19 @@ function buildAggregatedWakePromptContent(events) {
89
89
  return `${String(index + 1)}. ${eventText}`;
90
90
  })
91
91
  .join('\n\n');
92
+ // Business scenario: several reminder/environment wakes arrived while the dialog was idle.
93
+ // The model needs the events as state updates, but they are not a new human request and should
94
+ // not trigger a standalone acknowledgement. Say the product meaning plainly instead of exposing
95
+ // internal "runtime event" wording.
92
96
  return language === 'zh'
93
97
  ? `${prefix}
94
- 以下是对话空闲期间发生的 runtime 环境事件。这些事件不是新的用户指令。
98
+ 以下是对话空闲期间 Dominds 收到的环境事件。这些事件不是新的用户指令。
95
99
 
96
100
  ${body}
97
101
 
98
102
  请结合当前任务上下文继续推进;若这些事件不影响当前工作,不要发送占位式确认。`
99
103
  : `${prefix}
100
- The following runtime environment events happened while the dialog was idle. These events are not new user instructions.
104
+ The following environment events reached Dominds while the dialog was idle. These events are not new user instructions.
101
105
 
102
106
  ${body}
103
107
 
@@ -0,0 +1,26 @@
1
+ import type { ContextHealthSnapshot } from '@longrun-ai/kernel/types/context-health';
2
+ import type { ReminderContextBusiness, ReminderContextDialogScope, ReminderContextFollowingMessage, ReminderContextFooterState, ReminderContextHealth } from '../../runtime/driver-messages';
3
+ import type { ChatMessage } from '../client';
4
+ import type { KernelDriverPrompt } from './types';
5
+ export declare function resolveReminderContextFollowingMessage(args: {
6
+ prompt: KernelDriverPrompt | undefined;
7
+ currentTurnDialogMsgsForContext: readonly ChatMessage[];
8
+ }): ReminderContextFollowingMessage;
9
+ export declare function resolveReminderContextHealth(snapshot: ContextHealthSnapshot | undefined): ReminderContextHealth;
10
+ export declare function resolveReminderContextBusinessState(args: {
11
+ followingMessage: ReminderContextFollowingMessage;
12
+ pendingUserInterjectionReply: boolean;
13
+ hasCompletedHandoffWithoutPendingReply: boolean;
14
+ hasDeferredReplyReassertion: boolean;
15
+ hasActiveReplyObligation: boolean;
16
+ }): ReminderContextBusiness;
17
+ export declare function resolveReminderContextFooterStateFromSignals(args: {
18
+ dialogScope: ReminderContextDialogScope;
19
+ prompt: KernelDriverPrompt | undefined;
20
+ currentTurnDialogMsgsForContext: readonly ChatMessage[];
21
+ contextHealth: ContextHealthSnapshot | undefined;
22
+ pendingUserInterjectionReply: boolean;
23
+ hasCompletedHandoffWithoutPendingReply: boolean;
24
+ hasDeferredReplyReassertion: boolean;
25
+ hasActiveReplyObligation: boolean;
26
+ }): ReminderContextFooterState;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveReminderContextFollowingMessage = resolveReminderContextFollowingMessage;
4
+ exports.resolveReminderContextHealth = resolveReminderContextHealth;
5
+ exports.resolveReminderContextBusinessState = resolveReminderContextBusinessState;
6
+ exports.resolveReminderContextFooterStateFromSignals = resolveReminderContextFooterStateFromSignals;
7
+ const context_health_1 = require("./context-health");
8
+ function resolveReminderContextFollowingMessage(args) {
9
+ if (args.prompt === undefined || args.currentTurnDialogMsgsForContext.length === 0) {
10
+ return { kind: 'none' };
11
+ }
12
+ if (args.prompt.origin !== 'user') {
13
+ return { kind: 'runtime_notice' };
14
+ }
15
+ return typeof args.prompt.q4hAnswerCallId === 'string' &&
16
+ args.prompt.q4hAnswerCallId.trim() !== ''
17
+ ? { kind: 'human_answer' }
18
+ : { kind: 'user_message' };
19
+ }
20
+ function resolveReminderContextHealth(snapshot) {
21
+ const remediationLevel = (0, context_health_1.getContextHealthRemediationLevel)(snapshot);
22
+ return remediationLevel === undefined ? { kind: 'normal' } : { kind: remediationLevel };
23
+ }
24
+ function resolveReminderContextBusinessState(args) {
25
+ if (args.followingMessage.kind === 'human_answer') {
26
+ // askHuman answers resume a waiting task. They are not fresh user follow-ups and should not
27
+ // inherit interjection or completed-handoff wording from adjacent durable state.
28
+ return { kind: 'none' };
29
+ }
30
+ if (args.followingMessage.kind === 'user_message' &&
31
+ args.hasCompletedHandoffWithoutPendingReply) {
32
+ // Business scenario: the requester-side work has already received its final report, and now a
33
+ // user is speaking again inside that completed Side Dialog. Dominds can know this from durable
34
+ // handoff state; the model should hear the simple product meaning directly instead of guessing
35
+ // from older task context or reminder-maintenance references.
36
+ return { kind: 'user_followup_after_completed_handoff' };
37
+ }
38
+ if (args.pendingUserInterjectionReply) {
39
+ // User-visible reply gaps take priority over handoff continuation state. The completed
40
+ // handoff case is most specific: Dominds already knows the old delegated task is done. The
41
+ // footer should say there is no old handoff to advance and the model should handle the current
42
+ // user message normally. Do not narrow this to "only answer" or "do not organize reminders":
43
+ // a user may explicitly ask for reminder cleanup/correction as the current conversation topic.
44
+ //
45
+ // This branch may run on a later tool-followup turn where no user message immediately
46
+ // follows the reminder block anymore. That is still the same pending user follow-up; do not
47
+ // demote it to generic auto-continuation wording just because the prompt itself is absent
48
+ // on this retry/continuation round.
49
+ if (args.hasCompletedHandoffWithoutPendingReply) {
50
+ return { kind: 'user_followup_after_completed_handoff' };
51
+ }
52
+ if (args.hasDeferredReplyReassertion) {
53
+ return { kind: 'pending_user_interjection_with_parked_reply' };
54
+ }
55
+ if (args.hasActiveReplyObligation) {
56
+ return { kind: 'pending_user_interjection_with_active_reply' };
57
+ }
58
+ return { kind: 'pending_user_interjection' };
59
+ }
60
+ if (args.hasActiveReplyObligation) {
61
+ return { kind: 'active_reply_obligation' };
62
+ }
63
+ return { kind: 'none' };
64
+ }
65
+ function resolveReminderContextFooterStateFromSignals(args) {
66
+ const followingMessage = resolveReminderContextFollowingMessage({
67
+ prompt: args.prompt,
68
+ currentTurnDialogMsgsForContext: args.currentTurnDialogMsgsForContext,
69
+ });
70
+ return {
71
+ followingMessage,
72
+ contextHealth: resolveReminderContextHealth(args.contextHealth),
73
+ dialogScope: args.dialogScope,
74
+ business: resolveReminderContextBusinessState({
75
+ followingMessage,
76
+ pendingUserInterjectionReply: args.pendingUserInterjectionReply,
77
+ hasCompletedHandoffWithoutPendingReply: args.hasCompletedHandoffWithoutPendingReply,
78
+ hasDeferredReplyReassertion: args.hasDeferredReplyReassertion,
79
+ hasActiveReplyObligation: args.hasActiveReplyObligation,
80
+ }),
81
+ };
82
+ }
@@ -38,6 +38,12 @@ function buildPromptContentWithExactReplyToolName(args) {
38
38
  ];
39
39
  const directive = args.activeReplyDirective;
40
40
  if (!directive) {
41
+ // Business scenario: a user can come back to a Side Dialog after its final reply has already
42
+ // been delivered to the requester. At that point the business obligation is complete and the
43
+ // visible user is simply asking a follow-up in this dialog. Old assignment text and reply tool
44
+ // names remain in transcript history, so the model may otherwise "finish" the old request
45
+ // again. Dominds has already checked durable reply state here; the prompt says the current
46
+ // business expectation directly: answer/continue this conversation normally.
41
47
  if (isFbrSideDialog) {
42
48
  return args.prompt.content;
43
49
  }
@@ -50,13 +56,13 @@ function buildPromptContentWithExactReplyToolName(args) {
50
56
  const note = args.language === 'zh'
51
57
  ? [
52
58
  noActivePrefix,
53
- '当前没有待完成的跨对话回复义务。',
54
- '这轮不要调用任何 `reply*`;直接按当前本地对话继续即可。',
59
+ 'Dominds 已经判断好:当前没有别的对话在等你发送最终回贴。',
60
+ '本轮按当前对话正常交流即可;如果用户提出了问题,就直接回答这个问题。',
55
61
  ].join('\n')
56
62
  : [
57
63
  noActivePrefix,
58
- 'There is no active inter-dialog reply obligation right now.',
59
- 'Do not call any `reply*` tool in this turn; just continue the current local conversation.',
64
+ 'Dominds has already decided that no other dialog is waiting for your final reply right now.',
65
+ 'Handle this as a normal turn in the current conversation; if the user asked a question, answer that question directly.',
60
66
  ].join('\n');
61
67
  return `${note}\n\n${args.prompt.content}`;
62
68
  }