@askexenow/exe-os 0.9.159 → 0.9.161

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 (221) hide show
  1. package/dist/{active-agent-XAA2YRRH.js → active-agent-SLC7NBGT.js} +2 -2
  2. package/dist/{active-agent-JCODH6ZT.js → active-agent-UKVJCFEF.js} +2 -2
  3. package/dist/{agentic-ontology-5EIAHTR4.js → agentic-ontology-F4B4DH7M.js} +1 -1
  4. package/dist/{backfill-metadata-2JEFIROE.js → backfill-metadata-SMFH4EJX.js} +3 -3
  5. package/dist/{behaviors-IFNDKKZG.js → behaviors-6CNOKKLR.js} +2 -2
  6. package/dist/bin/agentic-ontology-backfill.js +4 -4
  7. package/dist/bin/agentic-reflection-backfill.js +5 -5
  8. package/dist/bin/agentic-semantic-label.js +4 -4
  9. package/dist/bin/backfill-conversations.js +5 -5
  10. package/dist/bin/backfill-responses.js +5 -5
  11. package/dist/bin/backfill-vectors.js +6 -6
  12. package/dist/bin/bulk-sync-postgres.js +5 -5
  13. package/dist/bin/cleanup-stale-review-tasks.js +5 -5
  14. package/dist/bin/cli.js +13 -13
  15. package/dist/bin/customer-readiness.js +3 -3
  16. package/dist/bin/deferred-daemon-restart.js +102 -0
  17. package/dist/bin/exe-agent-config.js +1 -1
  18. package/dist/bin/exe-agent.js +7 -7
  19. package/dist/bin/exe-assign.js +7 -7
  20. package/dist/bin/exe-boot.js +12 -12
  21. package/dist/bin/exe-call.js +3 -3
  22. package/dist/bin/exe-cloud.js +3 -3
  23. package/dist/bin/exe-dispatch.js +5 -5
  24. package/dist/bin/exe-doctor.js +1 -1
  25. package/dist/bin/exe-export-behaviors.js +6 -6
  26. package/dist/bin/exe-forget.js +5 -5
  27. package/dist/bin/exe-gateway.js +5 -5
  28. package/dist/bin/exe-heartbeat.js +5 -5
  29. package/dist/bin/exe-kill.js +8 -8
  30. package/dist/bin/exe-launch-agent.js +24 -9
  31. package/dist/bin/exe-new-employee.js +5 -5
  32. package/dist/bin/exe-pending-messages.js +6 -6
  33. package/dist/bin/exe-pending-notifications.js +5 -5
  34. package/dist/bin/exe-pending-reviews.js +5 -5
  35. package/dist/bin/exe-rename.js +3 -3
  36. package/dist/bin/exe-review.js +7 -7
  37. package/dist/bin/exe-search.js +4 -4
  38. package/dist/bin/exe-session-cleanup.js +9 -9
  39. package/dist/bin/exe-settings.js +3 -3
  40. package/dist/bin/exe-start-codex.js +10 -10
  41. package/dist/bin/exe-start-opencode.js +7 -7
  42. package/dist/bin/exe-status.js +6 -6
  43. package/dist/bin/exe-team.js +2 -2
  44. package/dist/bin/git-sweep.js +5 -5
  45. package/dist/bin/graph-backfill.js +3 -3
  46. package/dist/bin/graph-export.js +4 -4
  47. package/dist/bin/install.js +70 -207
  48. package/dist/bin/intercom-check.js +4 -4
  49. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  50. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  51. package/dist/bin/scan-tasks.js +5 -5
  52. package/dist/bin/setup.js +1 -1
  53. package/dist/bin/shard-migrate.js +3 -3
  54. package/dist/{capacity-monitor-MSQGHO27.js → capacity-monitor-ORRMNHT5.js} +6 -6
  55. package/dist/{catchup-brief-TSMPWHXT.js → catchup-brief-MTPBB3KF.js} +7 -7
  56. package/dist/{chunk-VKCFXOWQ.js → chunk-2UO3QD7V.js} +1 -1
  57. package/dist/{chunk-KUEUXXO4.js → chunk-3U3UYYKE.js} +2 -2
  58. package/dist/{chunk-XFA26MHB.js → chunk-5G7BZIY3.js} +1 -1
  59. package/dist/{chunk-UHAED3MM.js → chunk-5OD3AFRW.js} +1 -1
  60. package/dist/{chunk-7WXL6XVN.js → chunk-5RWZNONS.js} +8 -8
  61. package/dist/{chunk-GP436PAK.js → chunk-72IIQLQ6.js} +1 -1
  62. package/dist/{chunk-HI5LPCAS.js → chunk-7OTFGJDW.js} +1 -1
  63. package/dist/{chunk-AGBFY64D.js → chunk-7RD4YGGJ.js} +1 -1
  64. package/dist/{chunk-BQMG77YQ.js → chunk-7SGJUQBZ.js} +1 -1
  65. package/dist/{chunk-SNTCGJAE.js → chunk-7X7HKWH7.js} +36 -15
  66. package/dist/{chunk-FVQ7BELN.js → chunk-A7HLWPKK.js} +2 -2
  67. package/dist/{chunk-37KXWPTL.js → chunk-A7SYUJ2W.js} +2 -2
  68. package/dist/{chunk-IKDK7NXN.js → chunk-BZYHF63H.js} +377 -30
  69. package/dist/{chunk-IJXYCSUR.js → chunk-CUQGNC3J.js} +2 -2
  70. package/dist/{chunk-GHB33FOB.js → chunk-D34YDPQA.js} +2 -2
  71. package/dist/{chunk-5HVWTVZI.js → chunk-DIRYKGUR.js} +3 -3
  72. package/dist/{chunk-CCOSYMVU.js → chunk-DQMGSEAJ.js} +1 -1
  73. package/dist/{chunk-PZWRXJBJ.js → chunk-E7HUZQ4W.js} +1 -1
  74. package/dist/{chunk-TLTQGQCX.js → chunk-FEP36D2I.js} +1 -1
  75. package/dist/{chunk-BOAP6EJD.js → chunk-FPBEJ2JV.js} +6 -6
  76. package/dist/{chunk-COUXA2IQ.js → chunk-FRH7EY2Z.js} +1 -1
  77. package/dist/{chunk-56N5BCXQ.js → chunk-G4FDG3LK.js} +3 -3
  78. package/dist/{chunk-ARTF7DMV.js → chunk-GFEXQ4NU.js} +2 -2
  79. package/dist/{chunk-CSTCUDVM.js → chunk-H3KFLVPW.js} +6 -6
  80. package/dist/{chunk-PQFTZDR4.js → chunk-HWVG6QXM.js} +1 -1
  81. package/dist/{chunk-SCZJGD2G.js → chunk-I3MRITK2.js} +1 -1
  82. package/dist/{chunk-H4FB7LB4.js → chunk-I67W2JMW.js} +1 -1
  83. package/dist/{chunk-NABY2RI6.js → chunk-IH6TK5HJ.js} +2 -2
  84. package/dist/{chunk-D5PHT3JX.js → chunk-J2Y7UEXH.js} +3 -3
  85. package/dist/{chunk-SI7P22A5.js → chunk-JKMM7UZH.js} +2 -2
  86. package/dist/{chunk-PWNIKVDA.js → chunk-KOJIL4NH.js} +1 -1
  87. package/dist/{chunk-NV3WVFZ2.js → chunk-KOO56JVC.js} +1 -1
  88. package/dist/{chunk-ACRIYPBC.js → chunk-KZ4AAXWM.js} +6 -6
  89. package/dist/{chunk-CQFBWHQT.js → chunk-LHLEFNFW.js} +1 -1
  90. package/dist/{chunk-2PI3WQ47.js → chunk-LJS2OZKR.js} +3 -3
  91. package/dist/{chunk-F6LDN5XB.js → chunk-MPCICOVG.js} +4 -4
  92. package/dist/{chunk-3J4AJLED.js → chunk-N27BYKRB.js} +5 -5
  93. package/dist/{chunk-VLQKYNIO.js → chunk-NOY424XX.js} +3 -3
  94. package/dist/{chunk-SPG7BS6Y.js → chunk-NP55D5Q6.js} +205 -105
  95. package/dist/{chunk-RUOLDPIR.js → chunk-O4HT7CKC.js} +1 -1
  96. package/dist/{chunk-SZERVMKQ.js → chunk-ODN7E7HJ.js} +1 -1
  97. package/dist/{chunk-TYOB34ZF.js → chunk-OSG4O5TU.js} +1 -1
  98. package/dist/{chunk-VUBQUWJH.js → chunk-PGXG2JUF.js} +1 -1
  99. package/dist/{chunk-3H4VU65X.js → chunk-PWMMIGVQ.js} +124 -1
  100. package/dist/{chunk-EWNH5O2J.js → chunk-QK5MFN77.js} +1 -1
  101. package/dist/{chunk-EEH5SNIW.js → chunk-S3R2FC6P.js} +3 -3
  102. package/dist/{chunk-OYQHH5SX.js → chunk-SARHW2CG.js} +109 -58
  103. package/dist/{chunk-2TKJQR7H.js → chunk-U2KFQTM5.js} +1 -1
  104. package/dist/{chunk-RSNIF5FB.js → chunk-UXEDBUVW.js} +5 -5
  105. package/dist/{chunk-7WZXLY52.js → chunk-WY2QFHBB.js} +1 -1
  106. package/dist/{chunk-VV6X2DRX.js → chunk-YL36L2SN.js} +1 -1
  107. package/dist/{chunk-RJTIEXYH.js → chunk-Z5OGXSXA.js} +2 -2
  108. package/dist/{chunk-5ICBFFSQ.js → chunk-Z734KCEG.js} +1 -1
  109. package/dist/{code-context-index-MPDSDOEL.js → code-context-index-B6VIWPSF.js} +3 -3
  110. package/dist/{conversation-wiki-populator-HVROKOEU.js → conversation-wiki-populator-YMNIDI4F.js} +1 -1
  111. package/dist/{crdt-sync-4PA3L6CQ.js → crdt-sync-6BT3YLUU.js} +1 -1
  112. package/dist/{crm-webhook-5RIOZV43.js → crm-webhook-YVGNLWJH.js} +2 -2
  113. package/dist/{cto-delegation-gate-WPYOYKCC.js → cto-delegation-gate-ACVGMP5V.js} +4 -4
  114. package/dist/{daemon-orchestration-WZ3ITBAJ.js → daemon-orchestration-47D3OQQV.js} +21 -7
  115. package/dist/{exe-drift-6U5ENBOQ.js → exe-drift-ZVZDRDN6.js} +2 -2
  116. package/dist/{exe-export-CJFBFOBQ.js → exe-export-E6SXUIOV.js} +4 -4
  117. package/dist/{exe-import-HWP2FOVB.js → exe-import-2ESJXCG6.js} +4 -4
  118. package/dist/{exe-key-S3Q3Q2LE.js → exe-key-FSNRXDEN.js} +1 -1
  119. package/dist/{fast-db-init-43JVJVVH.js → fast-db-init-FLMQJFDI.js} +1 -1
  120. package/dist/gateway/index.js +9 -9
  121. package/dist/{git-staleness-7PVIPSJZ.js → git-staleness-QSOOMGX3.js} +1 -1
  122. package/dist/{git-task-sweep-GXSLBPEQ.js → git-task-sweep-A4N5VNCJ.js} +5 -5
  123. package/dist/{global-procedures-3HLEPJTB.js → global-procedures-A2YYQL6Q.js} +2 -2
  124. package/dist/{graph-auto-extract-3TBVEMSM.js → graph-auto-extract-WKBJY3NQ.js} +1 -1
  125. package/dist/hooks/bug-report-worker.js +6 -6
  126. package/dist/hooks/codex-stop-task-finalizer.js +6 -6
  127. package/dist/hooks/commit-complete.js +35 -10
  128. package/dist/hooks/error-recall.js +5 -5
  129. package/dist/hooks/exe-heartbeat-hook.js +2 -2
  130. package/dist/hooks/ingest-worker.js +3 -3
  131. package/dist/hooks/ingest.js +5 -5
  132. package/dist/hooks/instructions-loaded.js +3 -3
  133. package/dist/hooks/notification.js +3 -3
  134. package/dist/hooks/post-compact.js +6 -6
  135. package/dist/hooks/post-tool-combined.js +5 -5
  136. package/dist/hooks/pre-compact.js +10 -10
  137. package/dist/hooks/pre-tool-use.js +10 -10
  138. package/dist/hooks/prompt-submit.js +16 -16
  139. package/dist/hooks/session-end.js +15 -15
  140. package/dist/hooks/session-start.js +6 -6
  141. package/dist/hooks/stop.js +13 -13
  142. package/dist/hooks/subagent-stop.js +6 -6
  143. package/dist/hooks/summary-worker.js +13 -13
  144. package/dist/index.js +14 -14
  145. package/dist/{installer-ZRARTRW6.js → installer-77L2ACSQ.js} +4 -4
  146. package/dist/{installer-BX3C5MT7.js → installer-IITLB3YS.js} +4 -4
  147. package/dist/{installer-STP2Z37F.js → installer-NZGIE6L4.js} +4 -4
  148. package/dist/lib/cloud-sync.js +3 -3
  149. package/dist/lib/consolidation.js +4 -4
  150. package/dist/lib/database.js +1 -1
  151. package/dist/lib/db-daemon-client.js +2 -2
  152. package/dist/lib/db.js +1 -1
  153. package/dist/lib/embedder.js +3 -3
  154. package/dist/lib/employee-templates.js +3 -3
  155. package/dist/lib/employees.js +1 -1
  156. package/dist/lib/exe-daemon-client.js +2 -2
  157. package/dist/lib/exe-daemon.js +79 -26
  158. package/dist/lib/hybrid-search.js +4 -4
  159. package/dist/lib/identity.js +1 -1
  160. package/dist/lib/messaging.js +5 -5
  161. package/dist/lib/reminders.js +2 -2
  162. package/dist/lib/schedules.js +4 -4
  163. package/dist/lib/skill-learning.js +3 -3
  164. package/dist/lib/store.js +3 -3
  165. package/dist/lib/task-router.js +2 -2
  166. package/dist/lib/tasks.js +5 -5
  167. package/dist/lib/tmux-routing.js +4 -4
  168. package/dist/lib/token-spend.js +2 -2
  169. package/dist/mcp/register-tools.js +46 -46
  170. package/dist/mcp/server.js +47 -47
  171. package/dist/mcp/tools/complete-reminder.js +3 -3
  172. package/dist/mcp/tools/create-reminder.js +3 -3
  173. package/dist/mcp/tools/create-task.js +7 -7
  174. package/dist/mcp/tools/deactivate-behavior.js +4 -4
  175. package/dist/mcp/tools/list-reminders.js +3 -3
  176. package/dist/mcp/tools/list-tasks.js +7 -7
  177. package/dist/mcp/tools/send-message.js +7 -7
  178. package/dist/mcp/tools/update-task.js +6 -6
  179. package/dist/{mcp-http-config-F7K3FSWG.js → mcp-http-config-GU7ANGPH.js} +2 -2
  180. package/dist/{memory-cards-B6I5ZGXM.js → memory-cards-MRF3JHTD.js} +1 -1
  181. package/dist/{memory-poisoning-defense-3ETR5HJJ.js → memory-poisoning-defense-UJ36FZ2U.js} +1 -1
  182. package/dist/{memory-queue-client-Z4Q3IX77.js → memory-queue-client-LFPZPPQA.js} +3 -3
  183. package/dist/{memory-reflection-B75N4BRO.js → memory-reflection-6QCSB2MQ.js} +1 -1
  184. package/dist/{notifications-WNSNHFH6.js → notifications-CSVHULU2.js} +4 -4
  185. package/dist/{orchestrator-KGIIN4BA.js → orchestrator-PWP2CALB.js} +6 -6
  186. package/dist/{plan-limits-LTAD6MZH.js → plan-limits-D3VGVCWX.js} +2 -2
  187. package/dist/{projection-worker-IEDLDFKB.js → projection-worker-QZCUNRFZ.js} +141 -2
  188. package/dist/{review-polling-MQ3AXSTB.js → review-polling-QH3X4ZGX.js} +5 -5
  189. package/dist/runtime/index.js +11 -11
  190. package/dist/{session-events-DUWUFNSD.js → session-events-4GDMLNBG.js} +5 -5
  191. package/dist/{session-kill-telemetry-SZPQAZS7.js → session-kill-telemetry-XNKGQYME.js} +2 -2
  192. package/dist/{session-scope-TU7M4FAA.js → session-scope-754VZARX.js} +4 -4
  193. package/dist/{setup-wizard-B5F7C765.js → setup-wizard-FBWZQGR4.js} +1 -1
  194. package/dist/{skill-refinement-RRSHVVV7.js → skill-refinement-65EE332E.js} +1 -1
  195. package/dist/{task-enforcement-6AAUCRFV.js → task-enforcement-Y4BZBB7O.js} +4 -4
  196. package/dist/{task-scope-3UOAF4QQ.js → task-scope-LMSSAAAY.js} +4 -4
  197. package/dist/{tasks-crud-NQLF7DVV.js → tasks-crud-GZLBSTH3.js} +4 -4
  198. package/dist/{tasks-review-K52CYJ3R.js → tasks-review-4MSMRTDM.js} +4 -4
  199. package/dist/{token-budget-6KUZD2BC.js → token-budget-6YGB6AVB.js} +1 -1
  200. package/dist/{tool-capability-index-4TT2VIQ2.js → tool-capability-index-6JJN6ZRC.js} +1 -1
  201. package/dist/{tool-telemetry-TOPP535O.js → tool-telemetry-SYTSDQBL.js} +1 -1
  202. package/dist/tui/App.js +17 -17
  203. package/dist/{tui-data-E3XA3HLZ.js → tui-data-XNWZBTZB.js} +4 -4
  204. package/dist/{wiki-client-NZR7RW4I.js → wiki-client-S6JKY7GG.js} +22 -1
  205. package/dist/{worker-gate-J5RRT27H.js → worker-gate-ULTQ3WTD.js} +1 -1
  206. package/dist/{workflow-engine-4U4H4V6K.js → workflow-engine-GKT7HTAK.js} +2 -2
  207. package/package.json +1 -1
  208. package/release-notes.json +142 -142
  209. /package/dist/{chunk-5UPBAAPS.js → chunk-2M3CULM3.js} +0 -0
  210. /package/dist/{chunk-PJI6UVFG.js → chunk-6IUZZMWD.js} +0 -0
  211. /package/dist/{chunk-33KYUOK2.js → chunk-6NSFB3JH.js} +0 -0
  212. /package/dist/{chunk-XMYY65PG.js → chunk-ESRI7MFI.js} +0 -0
  213. /package/dist/{chunk-JTS3IDOY.js → chunk-JYETM4KT.js} +0 -0
  214. /package/dist/{chunk-MJSWLLSM.js → chunk-KVXP2W2N.js} +0 -0
  215. /package/dist/{chunk-DHNTMNKR.js → chunk-MGRHSBXO.js} +0 -0
  216. /package/dist/{chunk-JC7GZZVA.js → chunk-X4X3J6FE.js} +0 -0
  217. /package/dist/{chunk-NGVIZCGB.js → chunk-ZKALIEHB.js} +0 -0
  218. /package/dist/{core-memory-TFPUGGWO.js → core-memory-EXKPFVIR.js} +0 -0
  219. /package/dist/{entity-boost-B7IGG24X.js → entity-boost-GHFPE6A2.js} +0 -0
  220. /package/dist/{message-queue-client-EMQYHDBK.js → message-queue-client-CHRQYBH5.js} +0 -0
  221. /package/dist/{wiki-acl-JDBEB5GL.js → wiki-acl-VC237WGO.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  recordSessionKill
3
- } from "./chunk-COUXA2IQ.js";
3
+ } from "./chunk-FRH7EY2Z.js";
4
4
  import {
5
5
  updateTask
6
- } from "./chunk-F6LDN5XB.js";
6
+ } from "./chunk-MPCICOVG.js";
7
7
  import {
8
8
  ensureEmployee,
9
9
  extractRootExe,
@@ -14,7 +14,7 @@ import {
14
14
  sessionScopeFilter,
15
15
  strictSessionScopeFilter,
16
16
  writeNotification
17
- } from "./chunk-SNTCGJAE.js";
17
+ } from "./chunk-7X7HKWH7.js";
18
18
  import {
19
19
  queueIntercom
20
20
  } from "./chunk-TXSJ2L5O.js";
@@ -35,7 +35,7 @@ import {
35
35
  baseAgentName,
36
36
  isCoordinatorName,
37
37
  shouldAutoInstance
38
- } from "./chunk-JTS3IDOY.js";
38
+ } from "./chunk-JYETM4KT.js";
39
39
  import {
40
40
  loadConfigSync
41
41
  } from "./chunk-4GXRETYL.js";
@@ -152,7 +152,7 @@ function classifyTtlKillReason(ageHours, contextPct) {
152
152
  function shouldKillIdleSession(input) {
153
153
  if (!input.enabled) return false;
154
154
  if (isExeSession(input.sessionName)) return false;
155
- if (input.state !== "idle") return false;
155
+ if (input.state !== "idle" && input.state !== "no_claude") return false;
156
156
  if (input.signals.hasOpenTasks) return false;
157
157
  if (input.signals.hasNeedsReview) return false;
158
158
  if (input.signals.hasUnreadInbox) return false;
@@ -282,7 +282,7 @@ async function pollIdleKill(deps, idleTickCounts, opts) {
282
282
  continue;
283
283
  }
284
284
  const state = deps.getSessionState(entry.windowName);
285
- if (state !== "idle") {
285
+ if (state !== "idle" && state !== "no_claude") {
286
286
  idleTickCounts.delete(entry.windowName);
287
287
  continue;
288
288
  }
@@ -611,7 +611,7 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
611
611
  `
612
612
  );
613
613
  try {
614
- const { writeNotification: writeNotification2 } = await import("./notifications-WNSNHFH6.js");
614
+ const { writeNotification: writeNotification2 } = await import("./notifications-CSVHULU2.js");
615
615
  await writeNotification2({
616
616
  agentId,
617
617
  agentRole: "employee",
@@ -628,16 +628,27 @@ async function pollOrphanedTasks(deps, nowMs = Date.now()) {
628
628
  const retries = _autoWakeTaskRetries.get(topTask.taskId) ?? 0;
629
629
  if (retries >= AUTO_WAKE_MAX_RETRIES) {
630
630
  try {
631
- await deps.markTaskBlocked(
631
+ await deps.markTaskNeedsReview(
632
632
  topTask.taskId,
633
- `Auto-wake failed ${AUTO_WAKE_MAX_RETRIES} times \u2014 marking blocked for manual intervention`
633
+ `Auto-wake failed ${AUTO_WAKE_MAX_RETRIES} times \u2014 auto-closed: session ended without explicit completion. Needs manual review.`
634
634
  );
635
635
  process.stderr.write(
636
- `[auto-wake] ${agentId} task ${topTask.taskId} exceeded ${AUTO_WAKE_MAX_RETRIES} retries \u2014 marked blocked
636
+ `[auto-wake] ${agentId} task ${topTask.taskId} exceeded ${AUTO_WAKE_MAX_RETRIES} retries \u2014 marked needs_review
637
637
  `
638
638
  );
639
639
  } catch (e) {
640
- process.stderr.write("[daemon-orch] mark task blocked after retries: " + (e instanceof Error ? e.message : String(e)) + "\n");
640
+ process.stderr.write("[daemon-orch] mark task needs_review after retries: " + (e instanceof Error ? e.message : String(e)) + "\n");
641
+ }
642
+ try {
643
+ await writeNotification({
644
+ agentId,
645
+ agentRole: "employee",
646
+ event: "orphan_task",
647
+ project: String(topTask.sessionScope ?? ""),
648
+ summary: `\u26A0\uFE0F Task ${topTask.taskId} for ${agentId} needs review \u2014 auto-wake failed ${AUTO_WAKE_MAX_RETRIES} times. Session could not be recovered.`,
649
+ sessionScope
650
+ });
651
+ } catch {
641
652
  }
642
653
  continue;
643
654
  }
@@ -702,16 +713,16 @@ async function releaseStuckTasks(deps, nowMs = Date.now()) {
702
713
  const ageMinutes = Math.round((nowMs - updatedMs) / 6e4);
703
714
  if (!liveAgents.has(t.agentId)) {
704
715
  if (nowMs - updatedMs < STUCK_TASK_GRACE_MS) continue;
705
- const reason = `[auto-release] Agent "${t.agentId}" session is dead and task has been in_progress for ${ageMinutes}m with no update. Marked blocked for triage.`;
716
+ const reason = `Auto-closed: agent "${t.agentId}" session ended without explicit completion (in_progress for ${ageMinutes}m, no live session). Needs manual review.`;
706
717
  try {
707
- await deps.markTaskBlocked(t.taskId, reason);
718
+ await deps.markTaskNeedsReview(t.taskId, reason);
708
719
  released.push(t.taskId);
709
720
  process.stderr.write(
710
- `[stuck-release] Task ${t.taskId} (${t.agentId}) \u2014 in_progress for ${ageMinutes}m, agent dead \u2192 blocked
721
+ `[stuck-release] Task ${t.taskId} (${t.agentId}) \u2014 in_progress for ${ageMinutes}m, agent dead \u2192 needs_review
711
722
  `
712
723
  );
713
724
  } catch (err) {
714
- process.stderr.write(`[stuck-release] Failed to block task ${t.taskId}: ${err instanceof Error ? err.message : String(err)}
725
+ process.stderr.write(`[stuck-release] Failed to mark task ${t.taskId} needs_review: ${err instanceof Error ? err.message : String(err)}
715
726
  `);
716
727
  }
717
728
  if (deps.notifyOrphan) {
@@ -761,13 +772,13 @@ function createStuckTaskRealDeps(getClient) {
761
772
  updatedAt: String(r.updated_at)
762
773
  }));
763
774
  },
764
- markTaskBlocked: async (taskId, reason) => {
775
+ markTaskNeedsReview: async (taskId, reason) => {
765
776
  try {
766
- await updateTask({ taskId, status: "blocked", result: reason });
777
+ await updateTask({ taskId, status: "needs_review", result: reason });
767
778
  } catch {
768
779
  const client = getClient();
769
780
  await client.execute({
770
- sql: `UPDATE tasks SET status = 'blocked', result = ?, updated_at = ? WHERE id = ?`,
781
+ sql: `UPDATE tasks SET status = 'needs_review', result = ?, updated_at = ? WHERE id = ?`,
771
782
  args: [reason, (/* @__PURE__ */ new Date()).toISOString(), taskId]
772
783
  });
773
784
  }
@@ -783,7 +794,7 @@ function createStuckTaskRealDeps(getClient) {
783
794
  agentRole: "employee",
784
795
  event: "orphan_task",
785
796
  project: "",
786
- summary: `Agent "${agentId}" session died \u2014 task ${taskId.slice(0, 8)} auto-released to blocked for triage`
797
+ summary: `Agent "${agentId}" session died \u2014 task ${taskId.slice(0, 8)} needs review (auto-closed: session ended without completion)`
787
798
  });
788
799
  }
789
800
  };
@@ -902,13 +913,13 @@ function createAutoWakeRealDeps(getClient, projectDir) {
902
913
  ensureEmployee: (agentName, scope) => {
903
914
  return ensureEmployee(agentName, scope, projectDir, shouldAutoInstance(agentName));
904
915
  },
905
- markTaskBlocked: async (taskId, reason) => {
916
+ markTaskNeedsReview: async (taskId, reason) => {
906
917
  try {
907
- await updateTask({ taskId, status: "blocked", result: reason });
918
+ await updateTask({ taskId, status: "needs_review", result: reason });
908
919
  } catch {
909
920
  const client = getClient();
910
921
  await client.execute({
911
- sql: `UPDATE tasks SET status = 'blocked', result = ?, updated_at = ? WHERE id = ?`,
922
+ sql: `UPDATE tasks SET status = 'needs_review', result = ?, updated_at = ? WHERE id = ?`,
912
923
  args: [reason, (/* @__PURE__ */ new Date()).toISOString(), taskId]
913
924
  });
914
925
  }
@@ -1075,37 +1086,207 @@ ${paneContent.slice(0, 500)}` : ""
1075
1086
  };
1076
1087
  }
1077
1088
  var ORPHAN_SIGKILL_DELAY_MS = 5e3;
1089
+ var ORPHAN_MAX_AGE_SECS = 120;
1078
1090
  var ORPHAN_PATTERNS = [
1079
1091
  "exe-os/dist/mcp/server.js",
1080
1092
  "exe-mem/dist/mcp/server.js",
1081
1093
  "exe-os/dist/hooks/ingest-worker.js",
1082
1094
  "exe-mem/dist/hooks/ingest-worker.js",
1083
- // Hook processes that become orphaned (PPID=1) and never get reaped.
1084
- // These accumulate at ~45MB each and caused 1.2GB+ memory waste (2026-05-29).
1095
+ // Hook processes that become orphaned and never get reaped.
1096
+ // These accumulate at ~70MB each and caused 1GB+ memory waste.
1097
+ "codex-stop-task-finalizer.js",
1098
+ "scan-tasks.js",
1099
+ "exe-pending-reviews.js",
1100
+ "exe-pending-messages.js",
1101
+ "exe-pending-notifications.js"
1102
+ ];
1103
+ var HOOK_PROCESS_PATTERNS = [
1085
1104
  "codex-stop-task-finalizer.js",
1086
1105
  "scan-tasks.js",
1087
1106
  "exe-pending-reviews.js",
1088
1107
  "exe-pending-messages.js",
1089
1108
  "exe-pending-notifications.js"
1090
1109
  ];
1110
+ var ZOMBIE_AGENT_MAX_AGE_SECS = 300;
1111
+ function reapZombieAgentProcesses(deps) {
1112
+ let liveSessions;
1113
+ try {
1114
+ liveSessions = new Set(deps.listTmuxSessions());
1115
+ } catch {
1116
+ return [];
1117
+ }
1118
+ const lines = deps.listProcesses();
1119
+ const reaped = [];
1120
+ const procMap = /* @__PURE__ */ new Map();
1121
+ for (const line of lines) {
1122
+ const match = line.trim().match(/^(\d+)\s+(\d+)\s+(\S+)\s+(.+)$/);
1123
+ if (!match) continue;
1124
+ procMap.set(parseInt(match[1], 10), {
1125
+ ppid: parseInt(match[2], 10),
1126
+ etime: match[3],
1127
+ args: match[4]
1128
+ });
1129
+ }
1130
+ const AGENT_PATTERNS = [
1131
+ /\bclaude\b/,
1132
+ // Claude Code CLI
1133
+ /\bcodex\b/,
1134
+ // OpenAI Codex CLI
1135
+ /\bopencode\b/
1136
+ // OpenCode CLI
1137
+ ];
1138
+ for (const [pid, info] of procMap) {
1139
+ if (pid === deps.selfPid) continue;
1140
+ const isAgent = AGENT_PATTERNS.some((pat) => pat.test(info.args));
1141
+ if (!isAgent) continue;
1142
+ const ageSecs = parseEtime(info.etime);
1143
+ if (ageSecs < ZOMBIE_AGENT_MAX_AGE_SECS) continue;
1144
+ let hasLiveSession = false;
1145
+ let cur = info.ppid;
1146
+ for (let depth = 0; depth < 5; depth++) {
1147
+ const parent = procMap.get(cur);
1148
+ if (!parent) break;
1149
+ cur = parent.ppid;
1150
+ }
1151
+ const wrapperPid = info.ppid;
1152
+ for (const session of liveSessions) {
1153
+ try {
1154
+ const panePids = execSync(
1155
+ `tmux list-panes -t ${JSON.stringify(session)} -F '#{pane_pid}' 2>/dev/null`,
1156
+ { encoding: "utf8", timeout: 3e3 }
1157
+ ).trim().split("\n").map(Number);
1158
+ if (panePids.includes(wrapperPid)) {
1159
+ hasLiveSession = true;
1160
+ break;
1161
+ }
1162
+ let ancestor = wrapperPid;
1163
+ for (let i = 0; i < 3; i++) {
1164
+ const p = procMap.get(ancestor);
1165
+ if (!p) break;
1166
+ if (panePids.includes(p.ppid)) {
1167
+ hasLiveSession = true;
1168
+ break;
1169
+ }
1170
+ ancestor = p.ppid;
1171
+ }
1172
+ if (hasLiveSession) break;
1173
+ } catch {
1174
+ }
1175
+ }
1176
+ if (hasLiveSession) continue;
1177
+ const rssKb = getRssKb(pid);
1178
+ const rssMb = rssKb ? Math.round(rssKb / 1024) : "?";
1179
+ const desc = `PID ${pid} (age=${ageSecs}s, RSS=${rssMb}MB, ${info.args.slice(0, 80)})`;
1180
+ try {
1181
+ deps.killProcess(pid, "SIGTERM");
1182
+ } catch {
1183
+ continue;
1184
+ }
1185
+ reaped.push(desc);
1186
+ process.stderr.write(`[zombie-agent-reaper] Killed ${desc}
1187
+ `);
1188
+ if (wrapperPid > 1 && procMap.has(wrapperPid)) {
1189
+ try {
1190
+ deps.killProcess(wrapperPid, "SIGTERM");
1191
+ process.stderr.write(`[zombie-agent-reaper] Killed wrapper PID ${wrapperPid}
1192
+ `);
1193
+ } catch {
1194
+ }
1195
+ }
1196
+ deps.scheduleKill(pid, ORPHAN_SIGKILL_DELAY_MS, () => {
1197
+ try {
1198
+ deps.killProcess(pid, "SIGKILL");
1199
+ } catch {
1200
+ }
1201
+ });
1202
+ if (wrapperPid > 1) {
1203
+ deps.scheduleKill(wrapperPid, ORPHAN_SIGKILL_DELAY_MS, () => {
1204
+ try {
1205
+ deps.killProcess(wrapperPid, "SIGKILL");
1206
+ } catch {
1207
+ }
1208
+ });
1209
+ }
1210
+ }
1211
+ return reaped;
1212
+ }
1213
+ function getRssKb(pid) {
1214
+ try {
1215
+ const out = execSync(`ps -o rss= -p ${pid} 2>/dev/null`, { encoding: "utf8", timeout: 2e3 });
1216
+ const val = parseInt(out.trim(), 10);
1217
+ return isNaN(val) ? null : val;
1218
+ } catch {
1219
+ return null;
1220
+ }
1221
+ }
1222
+ function createZombieAgentReaperRealDeps() {
1223
+ return {
1224
+ listProcesses: () => {
1225
+ const output = execSync("ps -eo pid,ppid,etime,args", {
1226
+ encoding: "utf8",
1227
+ timeout: 5e3
1228
+ });
1229
+ return output.split("\n");
1230
+ },
1231
+ listTmuxSessions: () => {
1232
+ const output = execSync("tmux list-sessions -F '#{session_name}' 2>/dev/null", {
1233
+ encoding: "utf8",
1234
+ timeout: 3e3
1235
+ });
1236
+ return output.trim().split("\n").filter(Boolean);
1237
+ },
1238
+ killProcess: (pid, signal) => {
1239
+ process.kill(pid, signal);
1240
+ },
1241
+ scheduleKill: (_pid, delayMs, cb) => {
1242
+ setTimeout(() => {
1243
+ try {
1244
+ cb();
1245
+ } catch {
1246
+ }
1247
+ }, delayMs).unref();
1248
+ },
1249
+ selfPid: process.pid
1250
+ };
1251
+ }
1252
+ function parseEtime(etime) {
1253
+ const trimmed = etime.trim();
1254
+ const dayMatch = trimmed.match(/^(\d+)-(\d+):(\d+):(\d+)$/);
1255
+ if (dayMatch) {
1256
+ return parseInt(dayMatch[1], 10) * 86400 + parseInt(dayMatch[2], 10) * 3600 + parseInt(dayMatch[3], 10) * 60 + parseInt(dayMatch[4], 10);
1257
+ }
1258
+ const parts = trimmed.split(":").map((p) => parseInt(p, 10));
1259
+ if (parts.length === 3) return parts[0] * 3600 + parts[1] * 60 + parts[2];
1260
+ if (parts.length === 2) return parts[0] * 60 + parts[1];
1261
+ if (parts.length === 1) return parts[0];
1262
+ return 0;
1263
+ }
1091
1264
  function reapOrphanedMcpProcesses(deps) {
1092
1265
  const lines = deps.listProcesses();
1093
1266
  const reaped = [];
1094
1267
  for (const line of lines) {
1095
1268
  const trimmed = line.trim();
1096
- const match = trimmed.match(/^(\d+)\s+1\s+(.+)$/);
1269
+ const match = trimmed.match(/^(\d+)\s+(\d+)\s+(\S+)\s+(.+)$/);
1097
1270
  if (!match) continue;
1098
1271
  const pid = parseInt(match[1], 10);
1099
- const args = match[2];
1272
+ const ppid = parseInt(match[2], 10);
1273
+ const etime = match[3];
1274
+ const args = match[4];
1100
1275
  if (pid === deps.selfPid) continue;
1101
- if (!ORPHAN_PATTERNS.some((pat) => args.includes(pat))) continue;
1276
+ const isPpid1Orphan = ppid === 1 && ORPHAN_PATTERNS.some((pat) => args.includes(pat));
1277
+ const ageSecs = parseEtime(etime);
1278
+ const isAgedHookOrphan = ageSecs > ORPHAN_MAX_AGE_SECS && HOOK_PROCESS_PATTERNS.some((pat) => args.includes(pat));
1279
+ if (!isPpid1Orphan && !isAgedHookOrphan) continue;
1102
1280
  try {
1103
1281
  deps.killProcess(pid, "SIGTERM");
1104
1282
  } catch {
1105
1283
  continue;
1106
1284
  }
1107
- const desc = `PID ${pid} (${args.slice(0, 100)})`;
1285
+ const reason = isPpid1Orphan ? "ppid=1" : `age=${ageSecs}s`;
1286
+ const desc = `PID ${pid} (${reason}, ${args.slice(0, 100)})`;
1108
1287
  reaped.push(desc);
1288
+ process.stderr.write(`[orphan-reaper] Killed ${desc}
1289
+ `);
1109
1290
  deps.scheduleKill(pid, ORPHAN_SIGKILL_DELAY_MS, () => {
1110
1291
  try {
1111
1292
  deps.killProcess(pid, "SIGKILL");
@@ -1118,7 +1299,7 @@ function reapOrphanedMcpProcesses(deps) {
1118
1299
  function createOrphanReaperRealDeps() {
1119
1300
  return {
1120
1301
  listProcesses: () => {
1121
- const output = execSync("ps -eo pid,ppid,args", {
1302
+ const output = execSync("ps -eo pid,ppid,etime,args", {
1122
1303
  encoding: "utf8",
1123
1304
  timeout: 5e3
1124
1305
  });
@@ -1138,6 +1319,165 @@ function createOrphanReaperRealDeps() {
1138
1319
  selfPid: process.pid
1139
1320
  };
1140
1321
  }
1322
+ var WORKTREE_REAPER_INTERVAL_MS = 30 * 60 * 1e3;
1323
+ var WORKTREE_MIN_AGE_MS = 60 * 60 * 1e3;
1324
+ var WORKTREE_MAX_PRUNES_PER_TICK = 5;
1325
+ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
1326
+ const result = { pruned: [], skipped: [] };
1327
+ let sessions;
1328
+ try {
1329
+ sessions = deps.listTmuxSessions();
1330
+ } catch {
1331
+ return result;
1332
+ }
1333
+ const liveAgents = /* @__PURE__ */ new Set();
1334
+ for (const s of sessions) {
1335
+ if (!s.includes("-")) continue;
1336
+ const agentPart = s.split("-")[0];
1337
+ liveAgents.add(baseAgentName(agentPart));
1338
+ }
1339
+ const repoRoots = /* @__PURE__ */ new Set();
1340
+ for (const s of sessions) {
1341
+ const cwd = deps.getPaneCwd(s);
1342
+ if (!cwd) continue;
1343
+ const root = deps.getGitRoot(cwd);
1344
+ if (root) repoRoots.add(root);
1345
+ }
1346
+ for (const repoRoot of repoRoots) {
1347
+ if (result.pruned.length >= WORKTREE_MAX_PRUNES_PER_TICK) break;
1348
+ let worktrees;
1349
+ try {
1350
+ worktrees = deps.listWorktrees(repoRoot);
1351
+ } catch {
1352
+ continue;
1353
+ }
1354
+ for (const wt of worktrees) {
1355
+ if (result.pruned.length >= WORKTREE_MAX_PRUNES_PER_TICK) break;
1356
+ if (!wt.path.includes("/.worktrees/")) continue;
1357
+ const agentName = deps.parseAgentFromWorktreePath(wt.path);
1358
+ if (!agentName) {
1359
+ result.skipped.push({ path: wt.path, reason: "could not parse agent name" });
1360
+ continue;
1361
+ }
1362
+ if (liveAgents.has(agentName)) continue;
1363
+ const mtimeMs = deps.getDirMtimeMs(wt.path);
1364
+ if (mtimeMs === null) continue;
1365
+ const ageMs = nowMs - mtimeMs;
1366
+ if (ageMs < WORKTREE_MIN_AGE_MS) {
1367
+ result.skipped.push({ path: wt.path, reason: `too young (${Math.round(ageMs / 6e4)}m < 60m)` });
1368
+ continue;
1369
+ }
1370
+ if (deps.isWorktreeDirty(wt.path)) {
1371
+ const ageH2 = Math.round(ageMs / 36e5);
1372
+ process.stderr.write(
1373
+ `[worktree-reaper] WARNING: Orphan worktree has uncommitted changes, skipping: ${wt.path} (agent: ${agentName}, age: ${ageH2}h)
1374
+ `
1375
+ );
1376
+ result.skipped.push({ path: wt.path, reason: "uncommitted changes" });
1377
+ continue;
1378
+ }
1379
+ const ageH = Math.round(ageMs / 36e5);
1380
+ const removed = deps.removeWorktree(repoRoot, wt.path);
1381
+ if (removed) {
1382
+ deps.deleteBranch(repoRoot, wt.branch);
1383
+ deps.deleteRemoteBranch(repoRoot, wt.branch);
1384
+ process.stderr.write(
1385
+ `[worktree-reaper] Pruned orphan worktree: ${wt.path} (agent: ${agentName}, age: ${ageH}h)
1386
+ `
1387
+ );
1388
+ result.pruned.push(wt.path);
1389
+ } else {
1390
+ result.skipped.push({ path: wt.path, reason: "git worktree remove failed" });
1391
+ }
1392
+ }
1393
+ }
1394
+ return result;
1395
+ }
1396
+ async function createWorktreeReaperRealDeps() {
1397
+ const { getPaneCwd } = await import("./lib/tmux-status.js");
1398
+ const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-OMPQEJH7.js");
1399
+ const { statSync } = await import("fs");
1400
+ const { basename } = await import("path");
1401
+ return {
1402
+ listTmuxSessions: () => listTmuxSessions(),
1403
+ getPaneCwd: (s) => getPaneCwd(s),
1404
+ listWorktrees: (repoRoot) => {
1405
+ try {
1406
+ const out = execSync("git worktree list --porcelain", {
1407
+ cwd: repoRoot,
1408
+ encoding: "utf-8",
1409
+ timeout: 1e4,
1410
+ stdio: ["pipe", "pipe", "pipe"]
1411
+ });
1412
+ const worktrees = [];
1413
+ let currentPath = "";
1414
+ for (const line of out.split("\n")) {
1415
+ if (line.startsWith("worktree ")) {
1416
+ currentPath = line.slice("worktree ".length);
1417
+ } else if (line.startsWith("branch ") && currentPath) {
1418
+ const branch = line.slice("branch refs/heads/".length);
1419
+ worktrees.push({ path: currentPath, branch });
1420
+ currentPath = "";
1421
+ }
1422
+ }
1423
+ return worktrees;
1424
+ } catch {
1425
+ return [];
1426
+ }
1427
+ },
1428
+ isWorktreeDirty: (wtPath) => isDirty(wtPath),
1429
+ getDirMtimeMs: (dirPath) => {
1430
+ try {
1431
+ return statSync(dirPath).mtimeMs;
1432
+ } catch {
1433
+ return null;
1434
+ }
1435
+ },
1436
+ removeWorktree: (repoRoot, wtPath) => {
1437
+ try {
1438
+ execSync(`git worktree remove ${JSON.stringify(wtPath)} --force`, {
1439
+ cwd: repoRoot,
1440
+ encoding: "utf-8",
1441
+ timeout: 1e4,
1442
+ stdio: ["pipe", "pipe", "pipe"]
1443
+ });
1444
+ return true;
1445
+ } catch {
1446
+ return false;
1447
+ }
1448
+ },
1449
+ deleteBranch: (repoRoot, branch) => {
1450
+ try {
1451
+ execSync(`git branch -D ${JSON.stringify(branch)}`, {
1452
+ cwd: repoRoot,
1453
+ encoding: "utf-8",
1454
+ timeout: 1e4,
1455
+ stdio: ["pipe", "pipe", "pipe"]
1456
+ });
1457
+ return true;
1458
+ } catch {
1459
+ return false;
1460
+ }
1461
+ },
1462
+ deleteRemoteBranch: (repoRoot, branch) => {
1463
+ try {
1464
+ execSync(`git push origin --delete ${JSON.stringify(branch)} 2>/dev/null`, {
1465
+ cwd: repoRoot,
1466
+ encoding: "utf-8",
1467
+ timeout: 15e3,
1468
+ stdio: ["pipe", "pipe", "pipe"]
1469
+ });
1470
+ } catch {
1471
+ }
1472
+ },
1473
+ parseAgentFromWorktreePath: (wtPath) => {
1474
+ const dirName = basename(wtPath);
1475
+ if (!dirName) return null;
1476
+ return baseAgentName(dirName);
1477
+ },
1478
+ getGitRoot: (dir) => getGitRoot(dir)
1479
+ };
1480
+ }
1141
1481
 
1142
1482
  export {
1143
1483
  IDLE_NUDGE_DEDUP_MS,
@@ -1178,7 +1518,14 @@ export {
1178
1518
  pollCoordinatorContextRestart,
1179
1519
  createCoordinatorRestartRealDeps,
1180
1520
  ORPHAN_SIGKILL_DELAY_MS,
1521
+ ORPHAN_MAX_AGE_SECS,
1181
1522
  ORPHAN_PATTERNS,
1523
+ HOOK_PROCESS_PATTERNS,
1524
+ reapZombieAgentProcesses,
1525
+ createZombieAgentReaperRealDeps,
1182
1526
  reapOrphanedMcpProcesses,
1183
- createOrphanReaperRealDeps
1527
+ createOrphanReaperRealDeps,
1528
+ WORKTREE_REAPER_INTERVAL_MS,
1529
+ reapOrphanedWorktrees,
1530
+ createWorktreeReaperRealDeps
1184
1531
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getActiveAgent
3
- } from "./chunk-XFA26MHB.js";
3
+ } from "./chunk-5G7BZIY3.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-SNTCGJAE.js";
6
+ } from "./chunk-7X7HKWH7.js";
7
7
  import {
8
8
  getProjectName
9
9
  } from "./chunk-OPU3NYOO.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GNHN5HRQ.js";
4
4
  import {
5
5
  buildClaudeHttpMcpEntry
6
- } from "./chunk-2TKJQR7H.js";
6
+ } from "./chunk-U2KFQTM5.js";
7
7
  import {
8
8
  EXE_HOOKS,
9
9
  isLegacyHomeDirHookCommand,
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-L3TB7CC3.js";
12
12
  import {
13
13
  ensureAllAgentSymlinks
14
- } from "./chunk-VKCFXOWQ.js";
14
+ } from "./chunk-2UO3QD7V.js";
15
15
  import {
16
16
  MCP_LEGACY_KEY,
17
17
  MCP_PRIMARY_KEY
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  updateTask
3
- } from "./chunk-F6LDN5XB.js";
3
+ } from "./chunk-MPCICOVG.js";
4
4
  import {
5
5
  TASK_ALREADY_CLAIMED_PREFIX
6
- } from "./chunk-SNTCGJAE.js";
6
+ } from "./chunk-7X7HKWH7.js";
7
7
 
8
8
  // src/mcp/tools/update-task.ts
9
9
  import { z } from "zod";
@@ -23,7 +23,7 @@ function registerUpdateTask(server) {
23
23
  const status = rawStatus;
24
24
  let callerAgentId;
25
25
  try {
26
- const { getActiveAgent: getAgent } = await import("./active-agent-XAA2YRRH.js");
26
+ const { getActiveAgent: getAgent } = await import("./active-agent-SLC7NBGT.js");
27
27
  callerAgentId = getAgent().agentId;
28
28
  } catch {
29
29
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clean,
3
3
  stableId
4
- } from "./chunk-PJI6UVFG.js";
4
+ } from "./chunk-6IUZZMWD.js";
5
5
 
6
6
  // src/lib/reflection-checkpoints.ts
7
7
  function parsePayload(payload) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createReminder
3
- } from "./chunk-SZERVMKQ.js";
3
+ } from "./chunk-ODN7E7HJ.js";
4
4
 
5
5
  // src/mcp/tools/create-reminder.ts
6
6
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listReminders
3
- } from "./chunk-SZERVMKQ.js";
3
+ } from "./chunk-ODN7E7HJ.js";
4
4
 
5
5
  // src/mcp/tools/list-reminders.ts
6
6
  import { z } from "zod";
@@ -3,10 +3,10 @@ import {
3
3
  buildRawVisibilityFilter,
4
4
  buildWikiScopeFilter,
5
5
  searchMemories
6
- } from "./chunk-CSTCUDVM.js";
6
+ } from "./chunk-H3KFLVPW.js";
7
7
  import {
8
8
  getClient
9
- } from "./chunk-JTS3IDOY.js";
9
+ } from "./chunk-JYETM4KT.js";
10
10
 
11
11
  // src/lib/hybrid-search.ts
12
12
  var RRF_K = 60;
@@ -205,7 +205,7 @@ async function hybridSearch(queryText, agentId, options) {
205
205
  queryVector ? searchMemories(queryVector, agentId, fetchOptions) : Promise.resolve([]),
206
206
  includeStructuredCards ? (async () => {
207
207
  try {
208
- const { searchMemoryCards } = await import("./memory-cards-B6I5ZGXM.js");
208
+ const { searchMemoryCards } = await import("./memory-cards-MRF3JHTD.js");
209
209
  return await searchMemoryCards(effectiveQuery, agentId, fetchOptions);
210
210
  } catch {
211
211
  return [];
@@ -214,7 +214,7 @@ async function hybridSearch(queryText, agentId, options) {
214
214
  // Reflection insights: patterns, contradictions, summaries across sessions
215
215
  includeStructuredCards ? (async () => {
216
216
  try {
217
- const { searchReflections } = await import("./memory-reflection-B75N4BRO.js");
217
+ const { searchReflections } = await import("./memory-reflection-6QCSB2MQ.js");
218
218
  const insights = await searchReflections(effectiveQuery, agentId, 5);
219
219
  return insights.map((ins) => ({
220
220
  id: ins.id,
@@ -268,7 +268,7 @@ async function hybridSearch(queryText, agentId, options) {
268
268
  let entityBoostRan = false;
269
269
  if (merged.length > 0) {
270
270
  try {
271
- const { applyEntityBoost } = await import("./entity-boost-B7IGG24X.js");
271
+ const { applyEntityBoost } = await import("./entity-boost-GHFPE6A2.js");
272
272
  const boosted = await applyEntityBoost(merged, effectiveQuery, getClient());
273
273
  merged = boosted.results;
274
274
  graphContextMap = boosted.graphContext;
@@ -608,7 +608,7 @@ async function lightweightSearch(queryText, agentId, options) {
608
608
  }
609
609
  if (options?.includeStructuredCards !== true) return results;
610
610
  try {
611
- const { searchMemoryCards } = await import("./memory-cards-B6I5ZGXM.js");
611
+ const { searchMemoryCards } = await import("./memory-cards-MRF3JHTD.js");
612
612
  const cardResults = await searchMemoryCards(queryText, agentId, options);
613
613
  if (cardResults.length > 0) {
614
614
  return rrfMergeMulti([results, cardResults], limit, RRF_K, [1, 0.85]);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-JTS3IDOY.js";
3
+ } from "./chunk-JYETM4KT.js";
4
4
 
5
5
  // src/lib/session-kill-telemetry.ts
6
6
  import crypto from "crypto";