dominds 1.26.3 → 1.26.5

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 (111) hide show
  1. package/dist/cli.js +10 -8
  2. package/dist/dialog.d.ts +7 -0
  3. package/dist/dialog.js +43 -21
  4. package/dist/llm/kernel-driver/drive.js +2 -0
  5. package/dist/llm/kernel-driver/reminder-context.d.ts +2 -1
  6. package/dist/llm/kernel-driver/reminder-context.js +1 -0
  7. package/dist/minds/system-prompt.js +8 -0
  8. package/dist/persistence.js +1 -1
  9. package/dist/runtime/driver-messages.d.ts +6 -0
  10. package/dist/runtime/driver-messages.js +68 -12
  11. package/dist/server/api-routes.js +7 -2
  12. package/dist/server/dominds-self-update.d.ts +1 -0
  13. package/dist/server/dominds-self-update.js +113 -56
  14. package/dist/server/websocket-handler.js +63 -19
  15. package/dist/supervisor-protocol.d.ts +2 -3
  16. package/package.json +1 -1
  17. package/webapp/dist/assets/{_basePickBy-DTJFxmut.js → _basePickBy-zyTFuJGa.js} +3 -3
  18. package/webapp/dist/assets/{_basePickBy-DTJFxmut.js.map → _basePickBy-zyTFuJGa.js.map} +1 -1
  19. package/webapp/dist/assets/{_baseUniq-CVu4lo4P.js → _baseUniq-nq34n_7W.js} +2 -2
  20. package/webapp/dist/assets/{_baseUniq-CVu4lo4P.js.map → _baseUniq-nq34n_7W.js.map} +1 -1
  21. package/webapp/dist/assets/{arc-4mEKx1Qr.js → arc-Bv7_22Od.js} +2 -2
  22. package/webapp/dist/assets/{arc-4mEKx1Qr.js.map → arc-Bv7_22Od.js.map} +1 -1
  23. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CmUkdSiN.js → architectureDiagram-2XIMDMQ5-CQe-mbPP.js} +7 -7
  24. package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CmUkdSiN.js.map → architectureDiagram-2XIMDMQ5-CQe-mbPP.js.map} +1 -1
  25. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-CijmZ89y.js → blockDiagram-WCTKOSBZ-CX4Uu1s4.js} +7 -7
  26. package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-CijmZ89y.js.map → blockDiagram-WCTKOSBZ-CX4Uu1s4.js.map} +1 -1
  27. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D0GcQMKs.js → c4Diagram-IC4MRINW-75vPtXd7.js} +3 -3
  28. package/webapp/dist/assets/{c4Diagram-IC4MRINW-D0GcQMKs.js.map → c4Diagram-IC4MRINW-75vPtXd7.js.map} +1 -1
  29. package/webapp/dist/assets/{channel-6pgfGez4.js → channel-lMsMuju8.js} +2 -2
  30. package/webapp/dist/assets/{channel-6pgfGez4.js.map → channel-lMsMuju8.js.map} +1 -1
  31. package/webapp/dist/assets/{chunk-4BX2VUAB-BQDAaqXK.js → chunk-4BX2VUAB-I371XlIM.js} +2 -2
  32. package/webapp/dist/assets/{chunk-4BX2VUAB-BQDAaqXK.js.map → chunk-4BX2VUAB-I371XlIM.js.map} +1 -1
  33. package/webapp/dist/assets/{chunk-55IACEB6-DGYbZ_6j.js → chunk-55IACEB6-GMAfwcRQ.js} +2 -2
  34. package/webapp/dist/assets/{chunk-55IACEB6-DGYbZ_6j.js.map → chunk-55IACEB6-GMAfwcRQ.js.map} +1 -1
  35. package/webapp/dist/assets/{chunk-FMBD7UC4-EVNnQ_SU.js → chunk-FMBD7UC4-X9ms5_sJ.js} +2 -2
  36. package/webapp/dist/assets/{chunk-FMBD7UC4-EVNnQ_SU.js.map → chunk-FMBD7UC4-X9ms5_sJ.js.map} +1 -1
  37. package/webapp/dist/assets/{chunk-JSJVCQXG-BSQe2NHw.js → chunk-JSJVCQXG-s2a971Od.js} +2 -2
  38. package/webapp/dist/assets/{chunk-JSJVCQXG-BSQe2NHw.js.map → chunk-JSJVCQXG-s2a971Od.js.map} +1 -1
  39. package/webapp/dist/assets/{chunk-KX2RTZJC-I1LMYfrr.js → chunk-KX2RTZJC-CSSBs5H9.js} +2 -2
  40. package/webapp/dist/assets/{chunk-KX2RTZJC-I1LMYfrr.js.map → chunk-KX2RTZJC-CSSBs5H9.js.map} +1 -1
  41. package/webapp/dist/assets/{chunk-NQ4KR5QH-C9HmN9dA.js → chunk-NQ4KR5QH-B8-jtfW1.js} +4 -4
  42. package/webapp/dist/assets/{chunk-NQ4KR5QH-C9HmN9dA.js.map → chunk-NQ4KR5QH-B8-jtfW1.js.map} +1 -1
  43. package/webapp/dist/assets/{chunk-QZHKN3VN-73ijGXNd.js → chunk-QZHKN3VN-3ZZehtFv.js} +2 -2
  44. package/webapp/dist/assets/{chunk-QZHKN3VN-73ijGXNd.js.map → chunk-QZHKN3VN-3ZZehtFv.js.map} +1 -1
  45. package/webapp/dist/assets/{chunk-WL4C6EOR-DeVu-9ac.js → chunk-WL4C6EOR-D_AtipPw.js} +6 -6
  46. package/webapp/dist/assets/{chunk-WL4C6EOR-DeVu-9ac.js.map → chunk-WL4C6EOR-D_AtipPw.js.map} +1 -1
  47. package/webapp/dist/assets/{classDiagram-VBA2DB6C-2HURCFLk.js → classDiagram-VBA2DB6C-CTxhuDjN.js} +7 -7
  48. package/webapp/dist/assets/{classDiagram-VBA2DB6C-2HURCFLk.js.map → classDiagram-VBA2DB6C-CTxhuDjN.js.map} +1 -1
  49. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-2HURCFLk.js → classDiagram-v2-RAHNMMFH-CTxhuDjN.js} +7 -7
  50. package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-2HURCFLk.js.map → classDiagram-v2-RAHNMMFH-CTxhuDjN.js.map} +1 -1
  51. package/webapp/dist/assets/{clone-BNPlfGMh.js → clone-C9MfpI1S.js} +2 -2
  52. package/webapp/dist/assets/{clone-BNPlfGMh.js.map → clone-C9MfpI1S.js.map} +1 -1
  53. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BeoZCFA5.js → cose-bilkent-S5V4N54A-CCYyTSie.js} +2 -2
  54. package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BeoZCFA5.js.map → cose-bilkent-S5V4N54A-CCYyTSie.js.map} +1 -1
  55. package/webapp/dist/assets/{dagre-KLK3FWXG-DYxCt50h.js → dagre-KLK3FWXG-DxM19yfA.js} +7 -7
  56. package/webapp/dist/assets/{dagre-KLK3FWXG-DYxCt50h.js.map → dagre-KLK3FWXG-DxM19yfA.js.map} +1 -1
  57. package/webapp/dist/assets/{diagram-E7M64L7V-BWxcTI3B.js → diagram-E7M64L7V-BSc4Txf5.js} +8 -8
  58. package/webapp/dist/assets/{diagram-E7M64L7V-BWxcTI3B.js.map → diagram-E7M64L7V-BSc4Txf5.js.map} +1 -1
  59. package/webapp/dist/assets/{diagram-IFDJBPK2-BAIPE4Rn.js → diagram-IFDJBPK2-Cdj6m54B.js} +7 -7
  60. package/webapp/dist/assets/{diagram-IFDJBPK2-BAIPE4Rn.js.map → diagram-IFDJBPK2-Cdj6m54B.js.map} +1 -1
  61. package/webapp/dist/assets/{diagram-P4PSJMXO-CvcxPsVp.js → diagram-P4PSJMXO-BKd75i65.js} +7 -7
  62. package/webapp/dist/assets/{diagram-P4PSJMXO-CvcxPsVp.js.map → diagram-P4PSJMXO-BKd75i65.js.map} +1 -1
  63. package/webapp/dist/assets/{erDiagram-INFDFZHY-BDO90e-f.js → erDiagram-INFDFZHY-eI9rTfbL.js} +5 -5
  64. package/webapp/dist/assets/{erDiagram-INFDFZHY-BDO90e-f.js.map → erDiagram-INFDFZHY-eI9rTfbL.js.map} +1 -1
  65. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-hd4TorKR.js → flowDiagram-PKNHOUZH-BFDDBCeb.js} +7 -7
  66. package/webapp/dist/assets/{flowDiagram-PKNHOUZH-hd4TorKR.js.map → flowDiagram-PKNHOUZH-BFDDBCeb.js.map} +1 -1
  67. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-mID1sFSl.js → ganttDiagram-A5KZAMGK-ClhbFgCt.js} +3 -3
  68. package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-mID1sFSl.js.map → ganttDiagram-A5KZAMGK-ClhbFgCt.js.map} +1 -1
  69. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-DaA7yodM.js → gitGraphDiagram-K3NZZRJ6-DOiQN8_s.js} +8 -8
  70. package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-DaA7yodM.js.map → gitGraphDiagram-K3NZZRJ6-DOiQN8_s.js.map} +1 -1
  71. package/webapp/dist/assets/{graph-B86JxOkQ.js → graph-_a0YpojF.js} +3 -3
  72. package/webapp/dist/assets/{graph-B86JxOkQ.js.map → graph-_a0YpojF.js.map} +1 -1
  73. package/webapp/dist/assets/{index-DYO4ZL8y.js → index-Dou-k_rC.js} +286 -69
  74. package/webapp/dist/assets/{index-DYO4ZL8y.js.map → index-Dou-k_rC.js.map} +1 -1
  75. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DxF36W9g.js → infoDiagram-LFFYTUFH-txkiQJKc.js} +6 -6
  76. package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DxF36W9g.js.map → infoDiagram-LFFYTUFH-txkiQJKc.js.map} +1 -1
  77. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-wvAzRzSO.js → ishikawaDiagram-PHBUUO56-D91OZx5x.js} +2 -2
  78. package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-wvAzRzSO.js.map → ishikawaDiagram-PHBUUO56-D91OZx5x.js.map} +1 -1
  79. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CIBXsttK.js → journeyDiagram-4ABVD52K-BdmmINf5.js} +5 -5
  80. package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CIBXsttK.js.map → journeyDiagram-4ABVD52K-BdmmINf5.js.map} +1 -1
  81. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DQTPyM5m.js → kanban-definition-K7BYSVSG-C-S70Yrl.js} +3 -3
  82. package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DQTPyM5m.js.map → kanban-definition-K7BYSVSG-C-S70Yrl.js.map} +1 -1
  83. package/webapp/dist/assets/{layout-BG7IzQAG.js → layout-BRJaSqhR.js} +5 -5
  84. package/webapp/dist/assets/{layout-BG7IzQAG.js.map → layout-BRJaSqhR.js.map} +1 -1
  85. package/webapp/dist/assets/{linear-5XR-mXYw.js → linear-DyNGMbe9.js} +2 -2
  86. package/webapp/dist/assets/{linear-5XR-mXYw.js.map → linear-DyNGMbe9.js.map} +1 -1
  87. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-BwTQE6uN.js → mindmap-definition-YRQLILUH-sDQWtZwL.js} +4 -4
  88. package/webapp/dist/assets/{mindmap-definition-YRQLILUH-BwTQE6uN.js.map → mindmap-definition-YRQLILUH-sDQWtZwL.js.map} +1 -1
  89. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-ZYB35zd5.js → pieDiagram-SKSYHLDU-CxO-PR0P.js} +8 -8
  90. package/webapp/dist/assets/{pieDiagram-SKSYHLDU-ZYB35zd5.js.map → pieDiagram-SKSYHLDU-CxO-PR0P.js.map} +1 -1
  91. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-BM041Q-W.js → quadrantDiagram-337W2JSQ-2eCl6G-9.js} +3 -3
  92. package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-BM041Q-W.js.map → quadrantDiagram-337W2JSQ-2eCl6G-9.js.map} +1 -1
  93. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-r_xMoroM.js → requirementDiagram-Z7DCOOCP-BZP0MViS.js} +4 -4
  94. package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-r_xMoroM.js.map → requirementDiagram-Z7DCOOCP-BZP0MViS.js.map} +1 -1
  95. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Ju2-t24N.js → sankeyDiagram-WA2Y5GQK-BFByQmrg.js} +2 -2
  96. package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Ju2-t24N.js.map → sankeyDiagram-WA2Y5GQK-BFByQmrg.js.map} +1 -1
  97. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-D83Bocd1.js → sequenceDiagram-2WXFIKYE-vs-caW9J.js} +4 -4
  98. package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-D83Bocd1.js.map → sequenceDiagram-2WXFIKYE-vs-caW9J.js.map} +1 -1
  99. package/webapp/dist/assets/{stateDiagram-RAJIS63D-mTmpZzpU.js → stateDiagram-RAJIS63D-B_yOKRoN.js} +9 -9
  100. package/webapp/dist/assets/{stateDiagram-RAJIS63D-mTmpZzpU.js.map → stateDiagram-RAJIS63D-B_yOKRoN.js.map} +1 -1
  101. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCn7mFeH.js → stateDiagram-v2-FVOUBMTO-B285fcqL.js} +5 -5
  102. package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCn7mFeH.js.map → stateDiagram-v2-FVOUBMTO-B285fcqL.js.map} +1 -1
  103. package/webapp/dist/assets/{timeline-definition-YZTLITO2-C1QBcYz8.js → timeline-definition-YZTLITO2-B_yCavMb.js} +3 -3
  104. package/webapp/dist/assets/{timeline-definition-YZTLITO2-C1QBcYz8.js.map → timeline-definition-YZTLITO2-B_yCavMb.js.map} +1 -1
  105. package/webapp/dist/assets/{treemap-KZPCXAKY-BEyfK-Fo.js → treemap-KZPCXAKY-cErPVx9g.js} +5 -5
  106. package/webapp/dist/assets/{treemap-KZPCXAKY-BEyfK-Fo.js.map → treemap-KZPCXAKY-cErPVx9g.js.map} +1 -1
  107. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-C6SZhLMq.js → vennDiagram-LZ73GAT5-C9qgK3p0.js} +2 -2
  108. package/webapp/dist/assets/{vennDiagram-LZ73GAT5-C6SZhLMq.js.map → vennDiagram-LZ73GAT5-C9qgK3p0.js.map} +1 -1
  109. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BUlvexnm.js → xychartDiagram-JWTSCODW-B-gCl1Yj.js} +3 -3
  110. package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BUlvexnm.js.map → xychartDiagram-JWTSCODW-B-gCl1Yj.js.map} +1 -1
  111. package/webapp/dist/index.html +1 -1
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();
package/dist/dialog.d.ts CHANGED
@@ -272,6 +272,13 @@ export declare abstract class Dialog {
272
272
  listVisibleReminders(): Promise<Reminder[]>;
273
273
  resolveReminderTargetById(reminderId: string): Promise<VisibleReminderTarget | null>;
274
274
  private processReminderCollection;
275
+ private buildVisibleReminderContents;
276
+ private emitFullRemindersUpdate;
277
+ /**
278
+ * Emits current visible reminders without reconciling tool-owned state or writing persistence.
279
+ * This is for read-only dialog display, especially completed/archived dialogs opened from old tabs.
280
+ */
281
+ emitReminderSnapshot(): Promise<ReminderContent[]>;
275
282
  /**
276
283
  * Process reminder updates before LLM generation.
277
284
  * Calls updateReminder on each tool that owns reminders to allow them to update/drop/keep their reminders.
package/dist/dialog.js CHANGED
@@ -629,6 +629,47 @@ class Dialog {
629
629
  }
630
630
  return changed;
631
631
  }
632
+ buildVisibleReminderContents(taskSharedReminders, runtimeReminders) {
633
+ const visibleReminders = [
634
+ ...this.reminders.map((reminder) => (0, tool_1.cloneReminder)(reminder)),
635
+ ...taskSharedReminders.map((reminder) => (0, tool_1.cloneReminder)(reminder)),
636
+ ...runtimeReminders.map((reminder) => (0, tool_1.cloneReminder)(reminder)),
637
+ ];
638
+ visibleReminders.sort(tool_1.compareReminderDisplayOrder);
639
+ return visibleReminders.map((r) => ({
640
+ content: r.content,
641
+ meta: r.meta,
642
+ reminder_id: r.id,
643
+ renderRevision: (0, tool_1.computeReminderRenderRevision)(r),
644
+ echoback: (0, tool_1.reminderEchoBackEnabled)(r),
645
+ scope: r.scope,
646
+ renderMode: r.renderMode ?? 'markdown',
647
+ }));
648
+ }
649
+ emitFullRemindersUpdate(reminders) {
650
+ const fullRemindersEvt = {
651
+ type: 'full_reminders_update',
652
+ reminders,
653
+ };
654
+ (0, evt_registry_1.postDialogEvent)(this, fullRemindersEvt);
655
+ }
656
+ /**
657
+ * Emits current visible reminders without reconciling tool-owned state or writing persistence.
658
+ * This is for read-only dialog display, especially completed/archived dialogs opened from old tabs.
659
+ */
660
+ async emitReminderSnapshot() {
661
+ const taskSharedTarget = {
662
+ kind: 'task',
663
+ agentId: this.agentId,
664
+ taskDocPath: this.taskDocPath,
665
+ };
666
+ const runtimeTarget = { kind: 'agent', agentId: this.agentId };
667
+ const taskSharedReminders = await (0, shared_reminders_1.loadSharedReminders)(taskSharedTarget);
668
+ const runtimeReminders = await (0, shared_reminders_1.loadSharedReminders)(runtimeTarget);
669
+ const reminders = this.buildVisibleReminderContents(taskSharedReminders, runtimeReminders);
670
+ this.emitFullRemindersUpdate(reminders);
671
+ return reminders;
672
+ }
632
673
  /**
633
674
  * Process reminder updates before LLM generation.
634
675
  * Calls updateReminder on each tool that owns reminders to allow them to update/drop/keep their reminders.
@@ -676,27 +717,8 @@ class Dialog {
676
717
  agentId: this.agentId,
677
718
  });
678
719
  }
679
- const visibleReminders = [
680
- ...this.reminders.map((reminder) => (0, tool_1.cloneReminder)(reminder)),
681
- ...taskSharedReminders,
682
- ...runtimeReminders,
683
- ];
684
- visibleReminders.sort(tool_1.compareReminderDisplayOrder);
685
- const reminders = visibleReminders.map((r) => ({
686
- content: r.content,
687
- meta: r.meta,
688
- reminder_id: r.id,
689
- renderRevision: (0, tool_1.computeReminderRenderRevision)(r),
690
- echoback: (0, tool_1.reminderEchoBackEnabled)(r),
691
- scope: r.scope,
692
- renderMode: r.renderMode ?? 'markdown',
693
- }));
694
- // Emit full_reminders_update event with complete reminder list including metadata
695
- const fullRemindersEvt = {
696
- type: 'full_reminders_update',
697
- reminders,
698
- };
699
- (0, evt_registry_1.postDialogEvent)(this, fullRemindersEvt);
720
+ const reminders = this.buildVisibleReminderContents(taskSharedReminders, runtimeReminders);
721
+ this.emitFullRemindersUpdate(reminders);
700
722
  return reminders;
701
723
  }
702
724
  setCoursePrefixMsgs(msgs) {
@@ -269,7 +269,9 @@ async function resolveReminderContextFooterState(args) {
269
269
  const hasCompletedHandoffWithoutPendingReply = latest?.sideDialogFinalResponse !== undefined &&
270
270
  !hasDeferredReplyReassertion &&
271
271
  !hasActiveReplyObligation;
272
+ const dialogScope = args.dlg instanceof dialog_1.SideDialog ? { kind: 'side_dialog' } : { kind: 'main_dialog' };
272
273
  return (0, reminder_context_1.resolveReminderContextFooterStateFromSignals)({
274
+ dialogScope,
273
275
  prompt: args.prompt,
274
276
  currentTurnDialogMsgsForContext: args.currentTurnDialogMsgsForContext,
275
277
  contextHealth: args.dlg.getLastContextHealth(),
@@ -1,5 +1,5 @@
1
1
  import type { ContextHealthSnapshot } from '@longrun-ai/kernel/types/context-health';
2
- import type { ReminderContextBusiness, ReminderContextFollowingMessage, ReminderContextFooterState, ReminderContextHealth } from '../../runtime/driver-messages';
2
+ import type { ReminderContextBusiness, ReminderContextDialogScope, ReminderContextFollowingMessage, ReminderContextFooterState, ReminderContextHealth } from '../../runtime/driver-messages';
3
3
  import type { ChatMessage } from '../client';
4
4
  import type { KernelDriverPrompt } from './types';
5
5
  export declare function resolveReminderContextFollowingMessage(args: {
@@ -15,6 +15,7 @@ export declare function resolveReminderContextBusinessState(args: {
15
15
  hasActiveReplyObligation: boolean;
16
16
  }): ReminderContextBusiness;
17
17
  export declare function resolveReminderContextFooterStateFromSignals(args: {
18
+ dialogScope: ReminderContextDialogScope;
18
19
  prompt: KernelDriverPrompt | undefined;
19
20
  currentTurnDialogMsgsForContext: readonly ChatMessage[];
20
21
  contextHealth: ContextHealthSnapshot | undefined;
@@ -70,6 +70,7 @@ function resolveReminderContextFooterStateFromSignals(args) {
70
70
  return {
71
71
  followingMessage,
72
72
  contextHealth: resolveReminderContextHealth(args.contextHealth),
73
+ dialogScope: args.dialogScope,
73
74
  business: resolveReminderContextBusinessState({
74
75
  followingMessage,
75
76
  pendingUserInterjectionReply: args.pendingUserInterjectionReply,
@@ -367,6 +367,12 @@ function buildSystemPrompt(input) {
367
367
  const fbrGuidelines = buildFbrGuidelines(input.language, input.dialogScope, input.contextHealthPromptMode);
368
368
  const tellaskInteractionRules = buildTellaskInteractionRules(input.language);
369
369
  const functionToolRules = buildFunctionToolRules(input.language, input.funcToolRulesText);
370
+ // Business scenario: many runtime notices say "Dominds has reminded / decided / injected ..."
371
+ // because Dominds, not the human user, maintains dialog state, reminder projection, course
372
+ // transitions, and inter-dialog routing. Without a plain glossary definition, models may treat
373
+ // "Dominds" as a user request source, a third-party product name, or an abstract platform.
374
+ // Define it once near the top of the system prompt so later Dominds notices read as state and
375
+ // guidance from the current autonomous runtime.
370
376
  if (input.language === 'zh') {
371
377
  return `
372
378
  # Agent 系统提示
@@ -390,6 +396,7 @@ function buildSystemPrompt(input) {
390
396
 
391
397
  ## 术语表
392
398
 
399
+ - Dominds:你当前所在的智能体自主运行环境;它负责维护对话、提醒项、换程、队友诉请和系统提示。看到“Dominds 提示”时,把它当作当前运行环境给你的状态说明或行动引导,不是用户的新诉求。
393
400
  - 诉请:对智能体的结构化请求。
394
401
  - 诉请内容(tellaskContent):tellask 系列函数的正文参数,用于承载上下文/约束/验收。
395
402
  - 提及列表(mentionList):仅用于 \`tellask\` / \`tellaskSessionless\` 的队友目标列表(\`@<agentId>\`)。
@@ -488,6 +495,7 @@ System notices convey important state changes (e.g., context caution/critical, D
488
495
 
489
496
  ## Glossary
490
497
 
498
+ - Dominds: your current autonomous agent runtime. It maintains dialogs, reminders, course transitions, teammate tellasks, and system notices. When you see a "Dominds notice", treat it as state or action guidance from the current runtime, not as a new user request.
491
499
  - Tellask: a structured request addressed to an agent.
492
500
  - Mention list (\`mentionList\`): teammate targets for \`tellask\` / \`tellaskSessionless\` only (\`@<agentId>\`).
493
501
  - Tellask content (\`tellaskContent\`): main call payload carrying context/constraints/acceptance.
@@ -3590,7 +3590,7 @@ class DiskFileDialogStore extends dialog_1.DialogStore {
3590
3590
  * Note: Event emission is handled by processReminderUpdates() in Dialog
3591
3591
  */
3592
3592
  async persistReminders(dialog, reminders) {
3593
- await DialogPersistence._saveReminderState(this.dialogId, reminders);
3593
+ await DialogPersistence._saveReminderState(this.dialogId, reminders, dialog.status);
3594
3594
  await DialogPersistence.appendRemindersReconciledRecord(this.dialogId, reminders, resolveReconciledRecordWriteTarget(dialog), dialog.status);
3595
3595
  }
3596
3596
  /**
@@ -28,6 +28,11 @@ export type ReminderContextHealth = Readonly<{
28
28
  }> | Readonly<{
29
29
  kind: 'critical';
30
30
  }>;
31
+ export type ReminderContextDialogScope = Readonly<{
32
+ kind: 'main_dialog';
33
+ }> | Readonly<{
34
+ kind: 'side_dialog';
35
+ }>;
31
36
  export type ReminderContextBusiness = Readonly<{
32
37
  kind: 'none';
33
38
  }> | Readonly<{
@@ -44,6 +49,7 @@ export type ReminderContextBusiness = Readonly<{
44
49
  export type ReminderContextFooterState = Readonly<{
45
50
  followingMessage: ReminderContextFollowingMessage;
46
51
  contextHealth: ReminderContextHealth;
52
+ dialogScope: ReminderContextDialogScope;
47
53
  business: ReminderContextBusiness;
48
54
  }>;
49
55
  export declare function formatReminderContextFooter(language: LanguageCode, state: ReminderContextFooterState): string;
@@ -179,6 +179,7 @@ function formatReminderContextGuide(language) {
179
179
  if (language === 'zh') {
180
180
  return [
181
181
  `${formatSystemNoticePrefix(language)} 提醒项上下文块开始`,
182
+ 'Dominds 是你当前所在的自主运行环境;它会把运行中需要你看到的提醒、提示和状态放进上下文。',
182
183
  '以下是 Dominds 为你放到当前上下文里的可见提醒项。它们不是用户的新诉求/指令,也不是聊天正文。',
183
184
  '在 WebUI 中,用户通过独立的 Reminder 小组件/面板项看到这些提醒,并能把它们和聊天正文区分开。',
184
185
  '请把提醒项作为手头工作/状态参考;只有实际改变你的判断、计划或风险的信息,才需要提炼进后续有实质内容的对外回复。不要为了提醒项单独回复“收到/已了解/静默吸收”。',
@@ -186,6 +187,7 @@ function formatReminderContextGuide(language) {
186
187
  }
187
188
  return [
188
189
  `${formatSystemNoticePrefix(language)} Reminder context block begins`,
190
+ 'Dominds is the autonomous runtime environment you are currently working in; it places needed reminders, notices, and state into your context.',
189
191
  'The following visible reminders were added to the current context by Dominds. They are not new user requests/instructions, and not chat transcript text.',
190
192
  'In the WebUI, the user sees these reminders through a separate Reminder widget/panel item and can distinguish them from the chat transcript.',
191
193
  'Use reminders as current-work/state references; only carry information into a later substantive outward reply when it materially changes your current judgment, plan, or risk. Do not send a standalone "acknowledged/noted/silently absorbed" reply for reminder items.',
@@ -328,6 +330,54 @@ function joinReminderFooterTails(language, tails) {
328
330
  return '';
329
331
  return language === 'zh' ? nonEmptyTails.join('') : nonEmptyTails.join(' ');
330
332
  }
333
+ function formatZhNormalAutoContinueByDialogScope(scope) {
334
+ switch (scope.kind) {
335
+ case 'main_dialog':
336
+ // Main Dialogs own the broad task and do not have a requester to tellaskBack. Business
337
+ // scenario: this is a tool-followup turn with no new user/runtime message, and stale
338
+ // reminders can distort the model's next-step choice. Tell the model to first reconcile
339
+ // reminders that affect the current judgment, then proceed from the corrected task state.
340
+ // This is deliberately positive wording: users may ask the agent to fix reminders, and a
341
+ // stale reminder should be corrected instead of preserved by a blanket "do not maintain
342
+ // reminders" warning.
343
+ return '当前是主线对话。先校对会影响当前判断的提醒项:如果某条提醒项已经过时、失真、互相冲突或会误导当前行动,就先修正或删除;其余提醒项只作为背景参考。然后按校正后的真实任务状态行动:已有明确、相关且有价值的任务动作就继续执行;确实缺少人类本人澄清、裁决、验收口径、授权或输入时,用 `askHuman({ tellaskContent })` 提出一个最小且可回答的问题;如果既不缺这些信息、也没有真实任务动作,就交给 Dominds 按主线安排处理,鞭策开启时会继续续推,鞭策关闭且没有真实动作时可以自然收住。';
344
+ case 'side_dialog':
345
+ // Side Dialogs are answering a requester. Business scenario: in a reminder-only
346
+ // tool-followup turn, runtime already knows this is a Sideline Dialog, so the model should
347
+ // not infer whether askHuman or tellaskBack is appropriate. First reconcile reminders that
348
+ // could mislead the current answer; then ask the requester before the human whenever the
349
+ // requester can supply the missing requirement/decision/criteria/input.
350
+ return '当前是支线对话。先校对会影响当前判断的提醒项:如果某条提醒项已经过时、失真、互相冲突或会误导当前行动,就先修正或删除;其余提醒项只作为背景参考。然后按校正后的真实任务状态行动:已有明确、相关且有价值的任务动作就继续执行;若缺少需求澄清、业务裁决、验收口径、授权或输入,先判断缺的东西该由谁补:如果诉请者能补需求澄清、业务裁决、验收口径或缺失输入,先按当前工具规则考虑 `tellaskBack({ tellaskContent })` 回问诉请者;只有确实需要人类本人澄清、决策、授权或输入时,才用 `askHuman({ tellaskContent })` 提出一个最小且可回答的问题;如果既不缺这些信息、也没有真实任务动作,就交给 Dominds 按支线安排处理:需要回贴时会收到回贴提醒,已完成且无新诉求时可以自然收住。';
351
+ default: {
352
+ const _exhaustive = scope;
353
+ throw new Error(`Unhandled zh reminder dialog scope: ${String(_exhaustive)}`);
354
+ }
355
+ }
356
+ }
357
+ function formatEnNormalAutoContinueByDialogScope(scope) {
358
+ switch (scope.kind) {
359
+ case 'main_dialog':
360
+ // Main Dialogs own the broad task and do not have a requester to tellaskBack. Business
361
+ // scenario: this is a tool-followup turn with no new user/runtime message, and stale
362
+ // reminders can distort the model's next-step choice. Tell the model to first reconcile
363
+ // reminders that affect the current judgment, then proceed from the corrected task state.
364
+ // This is deliberately positive wording: users may ask the agent to fix reminders, and a
365
+ // stale reminder should be corrected instead of preserved by a blanket "do not maintain
366
+ // reminders" warning.
367
+ return 'This is a Main Dialog. First check reminders that affect your current judgment: if a reminder is stale, distorted, conflicting, or would mislead the current action, correct or delete it; use the other reminders only as background reference. Then act from the corrected real task state: continue any clear, relevant, valuable task action; use `askHuman({ tellaskContent })` only when you truly need clarification, a decision, acceptance criteria, authorization, or input from the human, and ask one minimal, answerable question; if none of that is needed and there is no real task action, hand control back to Dominds mainline behavior, where diligence can continue it when enabled, and when diligence is disabled with no real action, it may naturally settle.';
368
+ case 'side_dialog':
369
+ // Side Dialogs are answering a requester. Business scenario: in a reminder-only
370
+ // tool-followup turn, runtime already knows this is a Sideline Dialog, so the model should
371
+ // not infer whether askHuman or tellaskBack is appropriate. First reconcile reminders that
372
+ // could mislead the current answer; then ask the requester before the human whenever the
373
+ // requester can supply the missing requirement/decision/criteria/input.
374
+ return 'This is a Side Dialog. First check reminders that affect your current judgment: if a reminder is stale, distorted, conflicting, or would mislead the current action, correct or delete it; use the other reminders only as background reference. Then act from the corrected real task state: continue any clear, relevant, valuable task action. If you are missing clarification, a business decision, acceptance criteria, authorization, or input, first identify who should provide it: when the requester can provide the missing requirement clarification, business decision, acceptance criteria, or missing input, follow the current tool rules and consider `tellaskBack({ tellaskContent })` first; use `askHuman({ tellaskContent })` only when the needed clarification, decision, authorization, or input truly must come from the human. If none of that is needed and there is no real task action, hand control back to Dominds sideline behavior: it can receive reply reminders when a reply is needed, and when it is complete with no new request, it may naturally settle.';
375
+ default: {
376
+ const _exhaustive = scope;
377
+ throw new Error(`Unhandled en reminder dialog scope: ${String(_exhaustive)}`);
378
+ }
379
+ }
380
+ }
331
381
  function formatReminderContextFooter(language, state) {
332
382
  const contextHealthIsNormal = state.contextHealth.kind === 'normal';
333
383
  if (language === 'zh') {
@@ -357,14 +407,15 @@ function formatReminderContextFooter(language, state) {
357
407
  // When context is tight/critical, the context-preservation notice owns the turn. Do not add
358
408
  // ordinary continuation wording that could encourage more work from old reminders.
359
409
  return (`${base}本轮没有新的用户消息或 Dominds 提示;这是工具调用后的自动续推。` +
360
- `不要把“没有新消息”理解为空系统提示。${statusTail}`);
410
+ `这里的“没有新消息”只说明本轮没有额外用户消息或 Dominds 提示。${statusTail}`);
361
411
  }
362
412
  // Normal tool-followup rounds may continue real business work, but reminder maintenance
363
- // paths are merely references. This is the guard against loops that only add/delete/merge
364
- // reminders after a task is otherwise done.
413
+ // paths are merely references. Runtime already knows whether this is a Main Dialog or Side
414
+ // Dialog, so do not ask the model to self-classify before choosing askHuman vs tellaskBack.
415
+ const scopeTail = formatZhNormalAutoContinueByDialogScope(state.dialogScope);
365
416
  return (`${base}本轮没有新的用户消息或 Dominds 提示;这是工具调用后的自动续推。` +
366
- '请基于提醒项之外的已有任务状态判断下一步:若已有明确、相关且有价值的任务动作,就继续执行;若唯一看似可做的动作只是新增、更新、删除、压缩或整理提醒项,则不要单独为提醒项维护继续调用工具。若当前确实只能等待外部结果或用户输入,不要为了避免“等待”而寻找无关小事。' +
367
- `不要把“没有新消息”理解为空系统提示。${businessTail}`);
417
+ scopeTail +
418
+ `这里的“没有新消息”只说明本轮没有额外用户消息或 Dominds 提示。${businessTail}`);
368
419
  default: {
369
420
  const _exhaustive = state.followingMessage;
370
421
  throw new Error(`Unhandled zh reminder following-message state: ${String(_exhaustive)}`);
@@ -399,14 +450,15 @@ function formatReminderContextFooter(language, state) {
399
450
  // When context is tight/critical, the context-preservation notice owns the turn. Do not add
400
451
  // ordinary continuation wording that could encourage more work from old reminders.
401
452
  return (`${base}There is no new user message or Dominds notice in this round; this is an automatic continuation after a tool call. ` +
402
- `Do not interpret the absence of a new message as an empty system notice. ${statusTail}`);
453
+ `Here, "no new message" only means this round has no extra user message or Dominds notice. ${statusTail}`);
403
454
  }
404
455
  // Normal tool-followup rounds may continue real business work, but reminder maintenance
405
- // paths are merely references. This is the guard against loops that only add/delete/merge
406
- // reminders after a task is otherwise done.
456
+ // paths are merely references. Runtime already knows whether this is a Main Dialog or Side
457
+ // Dialog, so do not ask the model to self-classify before choosing askHuman vs tellaskBack.
458
+ const scopeTail = formatEnNormalAutoContinueByDialogScope(state.dialogScope);
407
459
  return (`${base}There is no new user message or Dominds notice in this round; this is an automatic continuation after a tool call. ` +
408
- 'Judge the next step from existing task state outside the reminder items: if there is a clear, relevant, valuable actual task action, continue with it; if the only apparent action is to add, update, delete, compress, or organize reminders, do not keep calling tools solely for reminder maintenance. If the work genuinely can only wait for an external result or user input, do not invent unrelated work just to avoid "waiting". ' +
409
- `Do not interpret the absence of a new message as an empty system notice. ${businessTail}`);
460
+ `${scopeTail} ` +
461
+ `Here, "no new message" only means this round has no extra user message or Dominds notice. ${businessTail}`);
410
462
  default: {
411
463
  const _exhaustive = state.followingMessage;
412
464
  throw new Error(`Unhandled en reminder following-message state: ${String(_exhaustive)}`);
@@ -501,15 +553,19 @@ function formatReminderMaintenanceReference(language, reminders) {
501
553
  }
502
554
  if (lines.length === 0)
503
555
  return undefined;
556
+ // Business scenario: this block exposes exact reminder_id maintenance channels. The footer
557
+ // decides what the model should do next; this note only tells the model how to repair a concrete
558
+ // reminder when the current user message, Dominds notice, or task state makes that repair useful.
559
+ // Keep it positive: stale reminders should be fixed, while accurate reminders remain references.
504
560
  if (language === 'zh') {
505
561
  return [
506
- `${formatSystemNoticePrefix(language)} 我把下面的提醒项维护通道仅作为操作参考;如果我在处理真实用户消息、Dominds 提示或当前任务动作时确实需要维护某条 reminder,我会按对应 reminder_id 选择工具。我不会把这些参考当成当前轮必须立即执行的动作;没有新的用户消息、Dominds 提示或提醒项之外的任务动作时,我不会只为了清理/整理提醒项而继续调用提醒项工具,也不会因此延迟回应后续真实用户消息。`,
562
+ `${formatSystemNoticePrefix(language)} 下面列出这些提醒项可用的修正、更新或删除方式,按 reminder_id 对照使用。处理真实用户消息、Dominds 提示或当前任务时,如果某条提醒项已经过时、失真、重复或会误导当前判断,就用对应方式维护;如果它仍然准确,就把它当作参考继续处理当前场景。`,
507
563
  '',
508
564
  ...lines,
509
565
  ].join('\n');
510
566
  }
511
567
  return [
512
- `${formatSystemNoticePrefix(language)} I treat the following reminder-maintenance channels as an operational reference only. If I truly need to maintain a reminder while handling a real user message, Dominds notice, or current task action, I match the corresponding reminder_id and choose the tool from there. I do not treat these references as actions I must perform immediately in this turn; when there is no new user message, no Dominds notice, and no task action outside reminders, I do not keep calling reminder tools solely to clean up or organize reminders, and I do not let them delay my response to any following real user message.`,
568
+ `${formatSystemNoticePrefix(language)} The following are the available ways to correct, update, or delete these reminders; use the matching reminder_id. While handling a real user message, Dominds notice, or current task, if a reminder is stale, distorted, duplicate, or would mislead your current judgment, maintain it through the matching path; if it is still accurate, use it as a reference and continue with the current situation.`,
513
569
  '',
514
570
  ...lines,
515
571
  ].join('\n');
@@ -414,7 +414,7 @@ function parseDomindsSelfUpdateAction(body) {
414
414
  if (!isRecord(body))
415
415
  return null;
416
416
  const action = body['action'];
417
- if (action === 'install' || action === 'restart')
417
+ if (action === 'install' || action === 'restart' || action === 'force_restart')
418
418
  return action;
419
419
  return null;
420
420
  }
@@ -1084,7 +1084,7 @@ async function handleApiRoute(req, res, pathname, context) {
1084
1084
  if (action === null) {
1085
1085
  respondJson(res, 400, {
1086
1086
  success: false,
1087
- error: "Invalid action. Expected 'install' or 'restart'",
1087
+ error: "Invalid action. Expected 'install', 'restart', or 'force_restart'",
1088
1088
  });
1089
1089
  return true;
1090
1090
  }
@@ -1094,6 +1094,11 @@ async function handleApiRoute(req, res, pathname, context) {
1094
1094
  respondJson(res, 200, { success: true, update: status });
1095
1095
  return true;
1096
1096
  }
1097
+ if (action === 'force_restart') {
1098
+ const status = await (0, dominds_self_update_1.forceRestartDominds)();
1099
+ respondJson(res, 202, { success: true, update: status });
1100
+ return true;
1101
+ }
1097
1102
  const status = await (0, dominds_self_update_1.restartDomindsIntoLatest)();
1098
1103
  respondJson(res, 202, { success: true, update: status });
1099
1104
  return true;
@@ -12,4 +12,5 @@ export declare function setDomindsSelfUpdateBroadcaster(next: ((status: DomindsS
12
12
  export declare function getDomindsSelfUpdateStatus(): Promise<DomindsSelfUpdateStatus>;
13
13
  export declare function installLatestDominds(): Promise<DomindsSelfUpdateStatus>;
14
14
  export declare function restartDomindsIntoLatest(): Promise<DomindsSelfUpdateStatus>;
15
+ export declare function forceRestartDominds(): Promise<DomindsSelfUpdateStatus>;
15
16
  export {};