@askexenow/exe-os 0.9.357 → 0.9.359

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 (334) hide show
  1. package/deploy/stack-manifests/v0.9.json +3 -3
  2. package/dist/.dist-verified.json +6 -0
  3. package/dist/{active-agent-PYMOMGQ7.js → active-agent-DMKNHGSG.js} +6 -4
  4. package/dist/{active-agent-LCRV3HVS.js → active-agent-Y3DCBD7J.js} +6 -4
  5. package/dist/{agentic-ontology-TNKI4FOM.js → agentic-ontology-3233PNKV.js} +1 -1
  6. package/dist/{backfill-metadata-SFS4ARNR.js → backfill-metadata-4DS4A5U3.js} +8 -6
  7. package/dist/{backup-verify-7NLKR4S6.js → backup-verify-JNYKXIU2.js} +6 -1
  8. package/dist/{behavior-injection-OT7VX7M6.js → behavior-injection-CGAMI552.js} +10 -8
  9. package/dist/{behaviors-6GW5AFG4.js → behaviors-57AMN5IP.js} +9 -7
  10. package/dist/bin/agentic-ontology-backfill.js +9 -7
  11. package/dist/bin/agentic-reflection-backfill.js +10 -8
  12. package/dist/bin/agentic-semantic-label.js +9 -7
  13. package/dist/bin/backfill-conversations.js +8 -6
  14. package/dist/bin/backfill-responses.js +8 -6
  15. package/dist/bin/backfill-vectors.js +9 -7
  16. package/dist/bin/bulk-sync-postgres.js +18 -14
  17. package/dist/bin/cc-doctor.js +7 -5
  18. package/dist/bin/cleanup-stale-review-tasks.js +16 -14
  19. package/dist/bin/cli.js +19 -19
  20. package/dist/bin/deferred-daemon-restart.js +81 -77
  21. package/dist/bin/exe-agent-config.js +5 -3
  22. package/dist/bin/exe-agent.js +14 -12
  23. package/dist/bin/exe-assign.js +9 -7
  24. package/dist/bin/exe-boot.js +62 -28
  25. package/dist/bin/exe-call.js +8 -6
  26. package/dist/bin/exe-cloud.js +20 -16
  27. package/dist/bin/exe-config-dump.js +5 -3
  28. package/dist/bin/exe-dispatch.js +16 -14
  29. package/dist/bin/exe-doctor.js +9 -6
  30. package/dist/bin/exe-export-behaviors.js +11 -9
  31. package/dist/bin/exe-forget.js +10 -8
  32. package/dist/bin/exe-gateway.js +10 -8
  33. package/dist/bin/exe-grant.js +17 -4
  34. package/dist/bin/exe-healthcheck.js +7 -5
  35. package/dist/bin/exe-heartbeat.js +18 -16
  36. package/dist/bin/exe-kill.js +20 -18
  37. package/dist/bin/exe-launch-agent.js +27 -25
  38. package/dist/bin/exe-memory-reads.js +8 -6
  39. package/dist/bin/exe-new-employee.js +12 -10
  40. package/dist/bin/exe-os-mcp-proxy.js +6 -4
  41. package/dist/bin/exe-pending-messages.js +17 -15
  42. package/dist/bin/exe-pending-notifications.js +16 -14
  43. package/dist/bin/exe-pending-reviews.js +16 -14
  44. package/dist/bin/exe-rename.js +8 -6
  45. package/dist/bin/exe-review.js +19 -17
  46. package/dist/bin/exe-search.js +9 -7
  47. package/dist/bin/exe-session-cleanup.js +20 -18
  48. package/dist/bin/exe-settings.js +18 -14
  49. package/dist/bin/exe-start-codex.js +16 -14
  50. package/dist/bin/exe-start-opencode.js +12 -10
  51. package/dist/bin/exe-status.js +17 -15
  52. package/dist/bin/exe-support.js +3 -3
  53. package/dist/bin/exe-team.js +6 -4
  54. package/dist/bin/exe-timers.js +2 -1
  55. package/dist/bin/git-sweep.js +17 -15
  56. package/dist/bin/graph-backfill.js +10 -8
  57. package/dist/bin/graph-export.js +9 -7
  58. package/dist/bin/import-history.js +13 -11
  59. package/dist/bin/install.js +83 -79
  60. package/dist/bin/intercom-check.js +4 -4
  61. package/dist/bin/mcp-sessions.js +2 -2
  62. package/dist/bin/orchestration-metrics.js +7 -5
  63. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  64. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  65. package/dist/bin/pre-publish.js +1 -1
  66. package/dist/bin/reconcile-backlog.js +2 -2
  67. package/dist/bin/registry-proxy.js +1 -1
  68. package/dist/bin/scan-tasks.js +16 -14
  69. package/dist/bin/setup.js +1 -1
  70. package/dist/bin/shard-migrate.js +9 -7
  71. package/dist/bin/stack-update.js +4 -4
  72. package/dist/bin/vps-health-gate.js +1 -1
  73. package/dist/{boot-generation-7ZI7JYGR.js → boot-generation-4D3CTT7X.js} +6 -4
  74. package/dist/{boot-review-sections-3MSXM6V7.js → boot-review-sections-NDFE5443.js} +15 -13
  75. package/dist/build-manifest.json +2961 -0
  76. package/dist/{capability-cards-4RD2SB2K.js → capability-cards-OBB7BMMX.js} +5 -3
  77. package/dist/{capacity-monitor-5XUR3JTN.js → capacity-monitor-QLPEL6S5.js} +17 -15
  78. package/dist/{catchup-brief-AYJWMQUZ.js → catchup-brief-EN7QR6MP.js} +20 -18
  79. package/dist/{chunk-ZMVVKOOS.js → chunk-2EAYZ3BK.js} +7 -7
  80. package/dist/{chunk-4KCLB4TY.js → chunk-2KLVTRY2.js} +1 -1
  81. package/dist/{chunk-4VU2VCEU.js → chunk-2OVTGZYH.js} +1 -1
  82. package/dist/{chunk-5Q2J6P4T.js → chunk-2YGAKBRG.js} +3 -3
  83. package/dist/{chunk-2TL5RKMC.js → chunk-3BAGFZFN.js} +1 -1
  84. package/dist/{chunk-PM4TIRCR.js → chunk-3ODATKWH.js} +1 -1
  85. package/dist/{chunk-RUBXKPOT.js → chunk-3ZEVMZ4G.js} +1 -1
  86. package/dist/{chunk-H4ZSOAP6.js → chunk-44WFVMZ5.js} +1 -1
  87. package/dist/{chunk-Y4JA5V22.js → chunk-46RPEWTH.js} +1 -1
  88. package/dist/{chunk-EHL4RCND.js → chunk-4DYJ6NOK.js} +6 -5
  89. package/dist/{chunk-ZWXSO4FN.js → chunk-4FQIWAXA.js} +9 -9
  90. package/dist/{chunk-YG4LS7TI.js → chunk-4WSUP4CC.js} +8 -8
  91. package/dist/{chunk-EWOMZLR6.js → chunk-57GRYGDU.js} +1 -1
  92. package/dist/{chunk-VCKIV5WG.js → chunk-5I3YC7ER.js} +2 -2
  93. package/dist/{chunk-UQCYG6EI.js → chunk-5UAMBMNR.js} +1 -1
  94. package/dist/chunk-5YEUPUV4.js +53 -0
  95. package/dist/{chunk-34MIJGQS.js → chunk-6EOLGE7T.js} +1 -1
  96. package/dist/{chunk-AWB7M62V.js → chunk-6KREY2Q7.js} +4 -4
  97. package/dist/{chunk-FWJFKWYA.js → chunk-6LY3QSJA.js} +2 -2
  98. package/dist/{chunk-7FKC2TIB.js → chunk-6SK4MM5B.js} +1 -1
  99. package/dist/{chunk-P7EUKYSQ.js → chunk-6WHYSLGF.js} +1 -1
  100. package/dist/{chunk-YSUHXDQU.js → chunk-74R44E4S.js} +21 -19
  101. package/dist/{chunk-DF5K4JJL.js → chunk-A5WEEND7.js} +3 -3
  102. package/dist/{chunk-OBWTTM7E.js → chunk-AL7JMA54.js} +2 -2
  103. package/dist/{chunk-JZXHLDQN.js → chunk-APR556TY.js} +1 -1
  104. package/dist/{chunk-G2MXTLOD.js → chunk-C5YZMYQH.js} +1 -1
  105. package/dist/{chunk-X7CWCQ5S.js → chunk-CAEWPEBA.js} +1 -1
  106. package/dist/{chunk-SFSB64NK.js → chunk-DKRSKC5R.js} +1 -1
  107. package/dist/{chunk-IIHFSNL4.js → chunk-DQ75MEPU.js} +1 -1
  108. package/dist/{chunk-H4IZKSOY.js → chunk-DWKH2H7W.js} +1 -1
  109. package/dist/{chunk-M5DPPJLS.js → chunk-EA5FVACM.js} +39 -7
  110. package/dist/{chunk-S3THSOWV.js → chunk-EUQF3JOH.js} +28 -100
  111. package/dist/{chunk-2LM5GO5R.js → chunk-EX2SSLNU.js} +5 -5
  112. package/dist/{chunk-4GGP4Q5N.js → chunk-F3QTF4T7.js} +2 -2
  113. package/dist/{chunk-EQQYCP6D.js → chunk-FASR2WLT.js} +1 -1
  114. package/dist/{chunk-NT4GET5B.js → chunk-G2KK64UB.js} +4 -4
  115. package/dist/{chunk-ABM3DZF3.js → chunk-G37RG543.js} +1 -1
  116. package/dist/{chunk-AW3WT3TJ.js → chunk-GD7VXXW6.js} +141 -140
  117. package/dist/{chunk-IT4TFJTK.js → chunk-GSVQBBE5.js} +3 -3
  118. package/dist/{chunk-LVZZ7YS3.js → chunk-HK7SQDKJ.js} +5 -5
  119. package/dist/chunk-HKK7LLS5.js +408 -0
  120. package/dist/{chunk-W3IXTUCL.js → chunk-HLEZ5O5P.js} +77 -37
  121. package/dist/{chunk-A5P2MMII.js → chunk-HNPHPGGF.js} +2 -2
  122. package/dist/{chunk-QGLAMWQJ.js → chunk-HPHF5VTT.js} +3 -3
  123. package/dist/{chunk-IO5FR7BZ.js → chunk-IQWAYXVF.js} +3 -3
  124. package/dist/{chunk-PNTRRXAN.js → chunk-JBAMYKBL.js} +1 -1
  125. package/dist/{chunk-2WWGTOVP.js → chunk-JE34CB5H.js} +19 -1
  126. package/dist/{chunk-APRVAUOR.js → chunk-JY5GAZYC.js} +1 -0
  127. package/dist/{chunk-PUAA3P47.js → chunk-KIXNMTGC.js} +4 -4
  128. package/dist/{chunk-ES4XE6AU.js → chunk-LPKTGK7L.js} +4 -4
  129. package/dist/{chunk-KT4RUFYO.js → chunk-LRETL4I3.js} +3 -3
  130. package/dist/{chunk-JO6TS75M.js → chunk-LXG37RB2.js} +1 -1
  131. package/dist/{chunk-CI3YVCUY.js → chunk-MCNDZU5W.js} +1 -1
  132. package/dist/{chunk-JLXJMDKG.js → chunk-NE57GONM.js} +1 -1
  133. package/dist/{chunk-72GUU6Z4.js → chunk-NKDKB2RT.js} +3 -3
  134. package/dist/{chunk-KP3PLOGC.js → chunk-NP2Y7P3I.js} +2 -2
  135. package/dist/{chunk-ES6PDSEK.js → chunk-OAYTQ4RY.js} +8 -8
  136. package/dist/{chunk-Z5DTZ464.js → chunk-OIS5VIAH.js} +6 -0
  137. package/dist/{chunk-VPMAC5VB.js → chunk-OY2PWHYR.js} +1 -1
  138. package/dist/{chunk-YQ7IZPVC.js → chunk-PDRIIEFV.js} +1 -1
  139. package/dist/{chunk-W3REQ37P.js → chunk-PLOEFBFW.js} +2 -2
  140. package/dist/{chunk-X4EDW3FH.js → chunk-POZGQQEZ.js} +1 -1
  141. package/dist/{chunk-AJGTBW3N.js → chunk-QH2XAUZ5.js} +1 -1
  142. package/dist/{chunk-6CZXY5BD.js → chunk-QROIFRKI.js} +5 -5
  143. package/dist/{chunk-P2Y6S53G.js → chunk-R6LNQAUG.js} +1 -1
  144. package/dist/{chunk-JKOEOHOD.js → chunk-R7F6HKTH.js} +6 -21
  145. package/dist/{chunk-6WAJJN5W.js → chunk-RFUTLZ2U.js} +3 -3
  146. package/dist/{chunk-CQPFNVWY.js → chunk-RJ67HG2P.js} +3 -3
  147. package/dist/{chunk-6H4ZEU7P.js → chunk-SHEWTDPC.js} +4 -4
  148. package/dist/{chunk-XPGUSSG7.js → chunk-SIGAQQHW.js} +1 -1
  149. package/dist/{chunk-PUNCHUEX.js → chunk-SNWV44E5.js} +3 -3
  150. package/dist/{chunk-WJIGSNJM.js → chunk-SQBNN44X.js} +12 -12
  151. package/dist/{chunk-6UTP7AIH.js → chunk-STFR72YH.js} +1 -1
  152. package/dist/chunk-TWMWHDOY.js +79 -0
  153. package/dist/{chunk-RZSPCNLY.js → chunk-UZ5RJYL3.js} +1 -1
  154. package/dist/chunk-V3W3SATA.js +135 -0
  155. package/dist/{chunk-WL3CT5KX.js → chunk-VCCZQDCU.js} +2 -2
  156. package/dist/{chunk-VU2MZ7BP.js → chunk-VNK3MNZE.js} +40 -3
  157. package/dist/{chunk-MVYB76QG.js → chunk-VRTCVZND.js} +16 -20
  158. package/dist/{chunk-UEXJYSJX.js → chunk-VXL7PJ56.js} +39 -2
  159. package/dist/{chunk-4OMIENRX.js → chunk-VY5VU7SX.js} +1 -1
  160. package/dist/{chunk-JUE37LOD.js → chunk-W3XUU36X.js} +4 -4
  161. package/dist/{chunk-WHQYVFE2.js → chunk-W5YV2PZE.js} +22 -15
  162. package/dist/{chunk-DZNXWCJN.js → chunk-WA2MJGPT.js} +1 -1
  163. package/dist/{chunk-LDRMNJJJ.js → chunk-WCP4OQUL.js} +2 -2
  164. package/dist/{chunk-25X4JD2V.js → chunk-WDA2KAV7.js} +20 -3
  165. package/dist/{chunk-YNYISUMW.js → chunk-WRP5AG4D.js} +1 -1
  166. package/dist/{chunk-HAOZB4W6.js → chunk-X2F6Q7TW.js} +1 -1
  167. package/dist/{chunk-TQ4O5A4S.js → chunk-XV42EAVK.js} +1 -1
  168. package/dist/{chunk-TAR5J7WI.js → chunk-XVTKJEI2.js} +4 -4
  169. package/dist/{chunk-XQAELSOQ.js → chunk-XWWNRFRF.js} +2 -2
  170. package/dist/{chunk-6SAQSXT2.js → chunk-YKRNH5LU.js} +1 -1
  171. package/dist/{chunk-QXAE6S3A.js → chunk-YMCIZCNK.js} +3 -3
  172. package/dist/chunk-YQGMSXT5.js +33 -0
  173. package/dist/{chunk-LLXYWNCH.js → chunk-Z2PAVJJ4.js} +1 -1
  174. package/dist/{cleanup-graph-garbage-XUNHVCRR.js → cleanup-graph-garbage-XFGY4EEE.js} +11 -9
  175. package/dist/{cloud-sync-shutdown-JRAERBUO.js → cloud-sync-shutdown-XCOATIJW.js} +5 -3
  176. package/dist/{co-activation-5AN2CF23.js → co-activation-XNBLOGK3.js} +5 -3
  177. package/dist/{co-occurrence-A7E774ZX.js → co-occurrence-HO4PGQC4.js} +9 -7
  178. package/dist/{conversation-entity-extractor-2XI2GC4N.js → conversation-entity-extractor-5G5DGRJU.js} +4 -4
  179. package/dist/{crdt-sync-2IUU6GZ6.js → crdt-sync-6TD7LSZW.js} +3 -2
  180. package/dist/{crm-webhook-BQCP77TI.js → crm-webhook-WZAV5776.js} +2 -2
  181. package/dist/{cto-delegation-gate-UHHNMWCL.js → cto-delegation-gate-UHMYFM4D.js} +15 -13
  182. package/dist/{daemon-orchestration-7WS3X5DQ.js → daemon-orchestration-DT5M2ZAR.js} +20 -19
  183. package/dist/{daemon-ready-signal-TVCPSG7J.js → daemon-ready-signal-CKXPUMJ2.js} +3 -1
  184. package/dist/{daemon-restart-report-QDRGKLL6.js → daemon-restart-report-HZU5LWXN.js} +2 -1
  185. package/dist/{daemon-timer-report-NM44WQRH.js → daemon-timer-report-TNJH5SFY.js} +2 -1
  186. package/dist/{doc-graph-extractor-NFERAJNP.js → doc-graph-extractor-FNCYPFKY.js} +9 -7
  187. package/dist/{documents-SW2MJUXY.js → documents-GKDZDUED.js} +9 -7
  188. package/dist/{dreaming-KSNJVNFH.js → dreaming-WPMQJAXW.js} +19 -17
  189. package/dist/{exe-drift-NBLYKQBQ.js → exe-drift-QTKD2FHT.js} +6 -4
  190. package/dist/{exe-export-44IWTJHL.js → exe-export-ESJ6KP6J.js} +11 -9
  191. package/dist/{exe-import-PPECH3KO.js → exe-import-N4X3GEQB.js} +11 -9
  192. package/dist/{exe-key-ZCRJQYA7.js → exe-key-KZCCHX3W.js} +84 -77
  193. package/dist/{exe-snapshot-OVINJ6MC.js → exe-snapshot-SCRPHCPZ.js} +20 -18
  194. package/dist/{fast-db-init-B5Q3SJQG.js → fast-db-init-6H67K76Q.js} +1 -1
  195. package/dist/{founder-context-5OFTZNDO.js → founder-context-C7X7IRDA.js} +2 -2
  196. package/dist/founder-monitor-envelope-DHSUMBWU.js +83 -0
  197. package/dist/gateway/index.js +11 -9
  198. package/dist/{git-staleness-XQJTOSGZ.js → git-staleness-JCKVMWPO.js} +5 -3
  199. package/dist/{global-procedures-YCJ3JPAP.js → global-procedures-BR7WGSE7.js} +7 -5
  200. package/dist/{graph-auto-extract-XJN6PQH3.js → graph-auto-extract-EOXWQRBZ.js} +9 -7
  201. package/dist/{graph-rag-HCQCZ2W7.js → graph-rag-5FVC5JXH.js} +4 -4
  202. package/dist/{hook-prefetch-FKXDTCDS.js → hook-prefetch-2CN3MK4H.js} +16 -14
  203. package/dist/hooks/bug-report-worker.js +18 -16
  204. package/dist/hooks/codex-stop-task-finalizer.js +19 -17
  205. package/dist/hooks/commit-complete.js +18 -16
  206. package/dist/hooks/error-recall.js +10 -8
  207. package/dist/hooks/exe-heartbeat-hook.js +6 -4
  208. package/dist/hooks/ingest.js +14 -102
  209. package/dist/hooks/instructions-loaded.js +7 -5
  210. package/dist/hooks/manifest.json +19 -19
  211. package/dist/hooks/notification.js +7 -5
  212. package/dist/hooks/post-compact.js +17 -15
  213. package/dist/hooks/post-tool-combined.js +10 -10
  214. package/dist/hooks/pre-compact.js +18 -16
  215. package/dist/hooks/pre-tool-use.js +23 -21
  216. package/dist/hooks/prompt-submit.js +34 -38
  217. package/dist/hooks/session-end.js +22 -20
  218. package/dist/hooks/session-start.js +13 -18
  219. package/dist/hooks/stop.js +21 -19
  220. package/dist/hooks/subagent-stop.js +19 -17
  221. package/dist/hooks/summary-worker.js +22 -25
  222. package/dist/index.js +25 -23
  223. package/dist/{installer-YSCUE6MT.js → installer-7UV3CNWZ.js} +8 -6
  224. package/dist/{installer-YTT5OSRL.js → installer-VPNTM3X6.js} +8 -6
  225. package/dist/{installer-G3DVMNC6.js → installer-YDLSXGD2.js} +8 -6
  226. package/dist/{intercom-queue-5D52JF3Q.js → intercom-queue-KHKJJYCQ.js} +15 -13
  227. package/dist/lib/cloud-sync.js +18 -14
  228. package/dist/lib/consolidation.js +11 -9
  229. package/dist/lib/crypto.js +2 -1
  230. package/dist/lib/database.js +9 -3
  231. package/dist/lib/db-backup.js +1 -1
  232. package/dist/lib/db-checkpoint-worker.js +4 -0
  233. package/dist/lib/db-daemon-client.js +3 -1
  234. package/dist/lib/db-read-worker.js +4 -0
  235. package/dist/lib/db-write-worker.js +3 -3
  236. package/dist/lib/db.js +9 -3
  237. package/dist/lib/device-registry.js +1 -1
  238. package/dist/lib/employee-templates.js +8 -6
  239. package/dist/lib/employees.js +5 -3
  240. package/dist/lib/exe-daemon.js +202 -93
  241. package/dist/lib/hybrid-search.js +9 -7
  242. package/dist/lib/identity.js +5 -3
  243. package/dist/lib/license.js +2 -2
  244. package/dist/lib/messaging.js +16 -14
  245. package/dist/lib/registry-proxy.js +1 -1
  246. package/dist/lib/reminders.js +6 -4
  247. package/dist/lib/schedules.js +9 -7
  248. package/dist/lib/session-registry.js +7 -5
  249. package/dist/lib/skill-learning.js +10 -8
  250. package/dist/lib/store.js +8 -6
  251. package/dist/lib/task-router.js +6 -4
  252. package/dist/lib/tasks.js +17 -15
  253. package/dist/lib/tmux-routing.js +15 -13
  254. package/dist/lib/token-spend.js +8 -4
  255. package/dist/{license-gate-DKYHCAMN.js → license-gate-YXUSNA2I.js} +3 -3
  256. package/dist/{license-sync-JVEXPDHN.js → license-sync-XFDOXL3Z.js} +2 -2
  257. package/dist/mcp/register-tools.js +80 -76
  258. package/dist/mcp/server.js +81 -77
  259. package/dist/mcp/tools/complete-reminder.js +7 -5
  260. package/dist/mcp/tools/create-reminder.js +7 -5
  261. package/dist/mcp/tools/create-task.js +19 -17
  262. package/dist/mcp/tools/deactivate-behavior.js +11 -9
  263. package/dist/mcp/tools/list-reminders.js +7 -5
  264. package/dist/mcp/tools/list-tasks.js +19 -17
  265. package/dist/mcp/tools/send-message.js +18 -16
  266. package/dist/mcp/tools/update-task.js +18 -16
  267. package/dist/{mcp-health-WDOB6XUB.js → mcp-health-HNVSWKFA.js} +6 -1
  268. package/dist/{mcp-http-config-L5RDDU6P.js → mcp-http-config-HIP5CEDV.js} +6 -4
  269. package/dist/{mcp-session-identity-S6UCHBER.js → mcp-session-identity-RTNZ2ZLW.js} +15 -13
  270. package/dist/{memory-cards-65RGFT5M.js → memory-cards-KG4TPNKK.js} +8 -6
  271. package/dist/{memory-graph-extractor-ZDZ5VQUX.js → memory-graph-extractor-6HTBLO2N.js} +10 -8
  272. package/dist/{memory-poisoning-defense-EQUQNXRE.js → memory-poisoning-defense-3ZT57RSJ.js} +5 -3
  273. package/dist/{memory-pressure-watchdog-CC344JBH.js → memory-pressure-watchdog-ZOZBIMKC.js} +16 -14
  274. package/dist/{memory-reflection-Q4OT4V55.js → memory-reflection-EQC4FXSW.js} +5 -3
  275. package/dist/{monitor-grants-NWSQ7ZCQ.js → monitor-grants-BDLVFVDR.js} +3 -1
  276. package/dist/{notification-ledger-GL3ZPZNR.js → notification-ledger-NZ4HO3M5.js} +16 -14
  277. package/dist/{notifications-FGYNO2FY.js → notifications-74YECZ4V.js} +15 -13
  278. package/dist/{orchestration-events-N5FQ4SKU.js → orchestration-events-KRQI4ED5.js} +6 -4
  279. package/dist/{orchestrator-XUJDK4EW.js → orchestrator-WV2YCHTK.js} +17 -15
  280. package/dist/org-membership-B32NS5NI.js +34 -0
  281. package/dist/{pipeline-router-YQOZ4M62.js → pipeline-router-6ZZV7JMA.js} +6 -4
  282. package/dist/{plan-limits-VBHKYKSK.js → plan-limits-B7AZKZ6U.js} +8 -6
  283. package/dist/{platform-procedures-F3XB6WWM.js → platform-procedures-2VQGBJU7.js} +1 -1
  284. package/dist/{projection-worker-NJUNGEXE.js → projection-worker-LRFFQ6JB.js} +2 -2
  285. package/dist/{prospective-memory-3MKUPDVI.js → prospective-memory-A4GDTIWG.js} +5 -3
  286. package/dist/{reranker-LGSIL6TX.js → reranker-YVTLJCFC.js} +1 -1
  287. package/dist/{retrieval-health-AEEQ5IO6.js → retrieval-health-PK2ODTXM.js} +1 -1
  288. package/dist/{review-polling-2RMEZ5QO.js → review-polling-JFWRNQF6.js} +16 -14
  289. package/dist/runtime/index.js +19 -17
  290. package/dist/{session-events-5XSYCV4I.js → session-events-VMQBCUH3.js} +16 -14
  291. package/dist/{session-kill-telemetry-QJUHG3IG.js → session-kill-telemetry-Z3W256T5.js} +16 -14
  292. package/dist/{session-scope-LIJ746K2.js → session-scope-2ADEVY3C.js} +15 -13
  293. package/dist/{setup-wizard-RLUCGGA7.js → setup-wizard-26B36FMC.js} +1 -1
  294. package/dist/{shard-manager-3L2NMJVJ.js → shard-manager-DFLCDZT5.js} +2 -1
  295. package/dist/{skill-refinement-FMN3WFSG.js → skill-refinement-APBYOSGX.js} +6 -4
  296. package/dist/{stack-promote-BGDGAYKG.js → stack-promote-SZYIPTFT.js} +29 -4
  297. package/dist/{stack-release-SOIHMI3I.js → stack-release-EYRDEGPD.js} +4 -4
  298. package/dist/{stack-update-AXFHJRK5.js → stack-update-YWK2YXP6.js} +3 -3
  299. package/dist/{steward-gate-R2XWABMV.js → steward-gate-CIOBPNX6.js} +6 -4
  300. package/dist/{support-inbox-IITW66TG.js → support-inbox-OAWGFRKW.js} +3 -3
  301. package/dist/{support-outbox-WHGPUYL2.js → support-outbox-DSWU3IXH.js} +1 -1
  302. package/dist/{task-enforcement-SFZGBY27.js → task-enforcement-YAU6ZGDC.js} +16 -14
  303. package/dist/{task-scope-74ZIFQRH.js → task-scope-44N7XP5N.js} +15 -13
  304. package/dist/{tasks-crud-N54JZCXU.js → tasks-crud-IWVDREXG.js} +15 -13
  305. package/dist/{tasks-notify-62IJZW55.js → tasks-notify-WK5HA77D.js} +16 -14
  306. package/dist/{tasks-review-3LHBE6ZJ.js → tasks-review-VDFWFETP.js} +15 -13
  307. package/dist/{telemetry-upload-HR3QIWZV.js → telemetry-upload-3X5ESEKM.js} +20 -180
  308. package/dist/{token-budget-DBXHLCMN.js → token-budget-WZGO22ME.js} +6 -4
  309. package/dist/{tool-telemetry-UFUTCNE3.js → tool-telemetry-F7RWUNVK.js} +1 -1
  310. package/dist/tui/App.js +24 -22
  311. package/dist/{tui-data-BPXEJKRQ.js → tui-data-KT7YGVQS.js} +15 -13
  312. package/dist/{update-support-HLZ7KMVM.js → update-support-ZVRMECNQ.js} +13 -11
  313. package/dist/{work-state-heartbeat-IQI3LCHN.js → work-state-heartbeat-CA4CN7DQ.js} +1 -1
  314. package/dist/{worker-gate-5ABYGLC2.js → worker-gate-52MVKYGZ.js} +1 -1
  315. package/dist/{workflow-engine-XSUWZK6I.js → workflow-engine-ZAFBPVUP.js} +2 -2
  316. package/dist/{worktree-EUYBBABA.js → worktree-NNVXVV6A.js} +7 -5
  317. package/dist/{worktree-sweep-LSKFA2PK.js → worktree-sweep-IM2ZQG6Z.js} +8 -6
  318. package/package.json +14 -4
  319. package/release-notes.json +34 -30
  320. package/dist/chunk-7HLWBYH7.js +0 -60
  321. /package/dist/{chunk-AK77MITT.js → chunk-6JTKIXLU.js} +0 -0
  322. /package/dist/{chunk-HABPXFHZ.js → chunk-BGYCUZYK.js} +0 -0
  323. /package/dist/{chunk-GVU3BW6N.js → chunk-COHHVCFA.js} +0 -0
  324. /package/dist/{chunk-VML2UQK7.js → chunk-FVWI2AR4.js} +0 -0
  325. /package/dist/{chunk-2267TRAO.js → chunk-R62ITJDQ.js} +0 -0
  326. /package/dist/{chunk-HMBMHZ3S.js → chunk-U7RZIY74.js} +0 -0
  327. /package/dist/{chunk-7GOSAV25.js → chunk-XLEYCOHX.js} +0 -0
  328. /package/dist/{chunk-A627QFOE.js → chunk-YBX3G5OP.js} +0 -0
  329. /package/dist/{chunk-IHKRHGKT.js → chunk-ZMYXQU4L.js} +0 -0
  330. /package/dist/{core-memory-KXE4QMOA.js → core-memory-AATZRQEY.js} +0 -0
  331. /package/dist/{memory-isolation-VSKUKTN4.js → memory-isolation-CF6FYSXD.js} +0 -0
  332. /package/dist/{oauth-server-JELOVN5D.js → oauth-server-VE5ELXTF.js} +0 -0
  333. /package/dist/{project-boot-LQ4CF6BI.js → project-boot-WEQSKDD7.js} +0 -0
  334. /package/dist/{wiki-acl-VR4AFJ3T.js → wiki-acl-GNIXYWHJ.js} +0 -0
@@ -34,12 +34,6 @@ import {
34
34
  deserializeArgs,
35
35
  serializeResultSet
36
36
  } from "../chunk-QGGH7LOU.js";
37
- import {
38
- clearDaemonReady,
39
- eventLoopBlockedMarkerPath,
40
- eventLoopHeartbeatPath,
41
- writeDaemonReady
42
- } from "../chunk-APRVAUOR.js";
43
37
  import {
44
38
  resolveEmbeddingsEnabled
45
39
  } from "../chunk-KWOAM7TA.js";
@@ -47,7 +41,7 @@ import {
47
41
  findScopedDuplicate,
48
42
  governMemoryRecord,
49
43
  schedulePostWriteMemoryHygiene
50
- } from "../chunk-VML2UQK7.js";
44
+ } from "../chunk-FVWI2AR4.js";
51
45
  import "../chunk-5MOYSU5A.js";
52
46
  import "../chunk-4QCFFW2H.js";
53
47
  import "../chunk-76CJBM36.js";
@@ -55,6 +49,7 @@ import {
55
49
  BUSY_PATTERN
56
50
  } from "../chunk-OSKWCKUC.js";
57
51
  import {
52
+ recordTimerPauseMs,
58
53
  runWithTimerPauseAccounting,
59
54
  sweepPauseTotalMs
60
55
  } from "../chunk-KI5PFRG6.js";
@@ -86,12 +81,6 @@ import {
86
81
  resolveEmbedWorkerRssKillMb,
87
82
  shouldRestartForRss
88
83
  } from "../chunk-NLEW62VC.js";
89
- import {
90
- getEventLoopLagMs,
91
- isEventLoopDegraded,
92
- markAsDaemonProcess,
93
- setEventLoopLagMs
94
- } from "../chunk-7HLWBYH7.js";
95
84
  import {
96
85
  logBoot,
97
86
  logCrash,
@@ -102,6 +91,18 @@ import {
102
91
  import {
103
92
  isPostgresBackendEnabled
104
93
  } from "../chunk-YMUZWC33.js";
94
+ import {
95
+ getEventLoopLagMs,
96
+ isEventLoopDegraded,
97
+ markAsDaemonProcess,
98
+ setEventLoopLagMs
99
+ } from "../chunk-V3W3SATA.js";
100
+ import {
101
+ clearDaemonReady,
102
+ eventLoopBlockedMarkerPath,
103
+ eventLoopHeartbeatPath,
104
+ writeDaemonReady
105
+ } from "../chunk-JY5GAZYC.js";
105
106
  import {
106
107
  EMBEDDING_DIM
107
108
  } from "../chunk-FXU7JOXK.js";
@@ -568,7 +569,9 @@ function startTimerTimeoutWatchdog(options) {
568
569
  let nextLagProbeDueMs = now() + lagProbeIntervalMs;
569
570
  let maxLagMs = 0;
570
571
  const recordLag = (lagMs) => {
571
- maxLagMs = Math.max(maxLagMs, validNonNegativeMs(lagMs));
572
+ const v = validNonNegativeMs(lagMs);
573
+ maxLagMs = Math.max(maxLagMs, v);
574
+ if (v > 0) options.onLagSample?.(v);
572
575
  };
573
576
  const currentMaxLagMs = () => {
574
577
  if (options.eventLoopLagSource) {
@@ -613,11 +616,13 @@ function startTimerTimeoutWatchdog(options) {
613
616
  armLagProbe();
614
617
  arm();
615
618
  return () => {
619
+ const finalMaxLagMs = currentMaxLagMs();
616
620
  stopped = true;
617
621
  if (handle) clearTimer(handle);
618
622
  if (lagProbeHandle) clearLagProbeTimer(lagProbeHandle);
619
623
  handle = null;
620
624
  lagProbeHandle = null;
625
+ return finalMaxLagMs;
621
626
  };
622
627
  }
623
628
 
@@ -1651,6 +1656,47 @@ var _lastBlockingTimer = null;
1651
1656
  function getLastBlockingTimer() {
1652
1657
  return _lastBlockingTimer;
1653
1658
  }
1659
+ var _lastLongSyncCallback = null;
1660
+ var _stallEpisode = null;
1661
+ var STALL_EPISODE_FLUSH_MS = 250;
1662
+ function flushStallEpisode() {
1663
+ const ep = _stallEpisode;
1664
+ _stallEpisode = null;
1665
+ if (!ep || ep.followers.size === 0) return;
1666
+ const blk = _lastLongSyncCallback && Date.now() - _lastLongSyncCallback.ts < 6e4 ? _lastLongSyncCallback : null;
1667
+ const blockerName = blk?.name ?? "unknown";
1668
+ const blockerExecMs = Math.round(blk?.execMs ?? 0);
1669
+ const followers = [...ep.followers];
1670
+ const n = followers.length;
1671
+ const stallS = (ep.maxWallMs / 1e3).toFixed(1);
1672
+ const msg = `[exed] EVENT LOOP STALLED ${stallS}s \u2014 first long sync callback: ${blockerName} (${blockerExecMs}ms); ${n} follower${n === 1 ? "" : "s"} delayed`;
1673
+ process.stderr.write(`${msg}
1674
+ `);
1675
+ logDaemonHealth({
1676
+ event: "process_stats",
1677
+ pid: process.pid,
1678
+ message: msg,
1679
+ data: {
1680
+ type: "event_loop_stall",
1681
+ blocker: blockerName,
1682
+ blockerExecMs,
1683
+ followerCount: n,
1684
+ followers,
1685
+ maxWallMs: Math.round(ep.maxWallMs)
1686
+ }
1687
+ });
1688
+ }
1689
+ function noteStalledFollower(name, wallMs) {
1690
+ if (!_stallEpisode) {
1691
+ _stallEpisode = { followers: /* @__PURE__ */ new Set(), maxWallMs: 0, flush: null };
1692
+ }
1693
+ _stallEpisode.followers.add(name);
1694
+ _stallEpisode.maxWallMs = Math.max(_stallEpisode.maxWallMs, wallMs);
1695
+ if (!_stallEpisode.flush) {
1696
+ _stallEpisode.flush = setTimeout(flushStallEpisode, STALL_EPISODE_FLUSH_MS);
1697
+ _stallEpisode.flush.unref?.();
1698
+ }
1699
+ }
1654
1700
  var _exitBreadcrumbWritten = false;
1655
1701
  function recordExitBreadcrumb(kind, exitCode, reason, extra) {
1656
1702
  if (_exitBreadcrumbWritten) return;
@@ -1703,11 +1749,15 @@ async function traceDaemonTimer(name, fn) {
1703
1749
  }
1704
1750
  const watchdogStart = Date.now();
1705
1751
  let timeoutWatchdogSawBlocking = false;
1752
+ let peakLoopLagMs = 0;
1706
1753
  const stopTimeoutWatchdog = startTimerTimeoutWatchdog({
1707
1754
  timeoutMs: TIMER_TIMEOUT_MS,
1708
1755
  startedAtMs: watchdogStart,
1709
1756
  pauseSnapshotMs: pauseSnapshot,
1710
1757
  pauseTotalMs: () => sweepPauseTotalMs(name),
1758
+ onLagSample: (lagMs) => {
1759
+ if (lagMs > peakLoopLagMs) peakLoopLagMs = lagMs;
1760
+ },
1711
1761
  onTimeout: () => {
1712
1762
  timeoutWatchdogSawBlocking = true;
1713
1763
  _lastBlockingTimer = { name, durationMs: TIMER_TIMEOUT_MS, ts: Date.now() };
@@ -1740,39 +1790,59 @@ async function traceDaemonTimer(name, fn) {
1740
1790
  });
1741
1791
  }
1742
1792
  });
1793
+ let syncExecMs = 0;
1743
1794
  try {
1744
- return await runWithTimerPauseAccounting(name, fn);
1795
+ const syncStart = monotonicNowMs();
1796
+ const pending = runWithTimerPauseAccounting(name, fn);
1797
+ syncExecMs = Math.max(0, monotonicNowMs() - syncStart);
1798
+ return await pending;
1745
1799
  } finally {
1746
- stopTimeoutWatchdog();
1800
+ const finalWatchdogLagMs = stopTimeoutWatchdog();
1801
+ if (finalWatchdogLagMs > peakLoopLagMs) peakLoopLagMs = finalWatchdogLagMs;
1747
1802
  _timerInFlight.delete(name);
1748
1803
  const span = measureSpan(probe);
1749
1804
  const durationMs = Math.round(span.monoMs);
1750
1805
  const slept = span.sleptMs > 1e3;
1751
1806
  const sweepPausedMs = Math.max(0, sweepPauseTotalMs(name) - pauseSnapshot);
1752
1807
  const busyMs = Math.max(0, durationMs - sweepPausedMs);
1808
+ const syncExecMsRounded = Math.round(syncExecMs);
1809
+ const peakLagMsRounded = Math.round(peakLoopLagMs);
1810
+ const ownSyncBlocked = syncExecMs >= TIMER_SLOW_WARN_MS;
1811
+ const loopStalledDuringTick = peakLoopLagMs >= TIMER_SLOW_WARN_MS;
1812
+ const anotherBlockerNamed = _lastLongSyncCallback !== null && _lastLongSyncCallback.name !== name && Date.now() - _lastLongSyncCallback.ts < STALL_EPISODE_FLUSH_MS * 4;
1813
+ const selfHeldLoop = ownSyncBlocked || loopStalledDuringTick && !anotherBlockerNamed;
1753
1814
  if (timeoutWatchdogSawBlocking && !slept && busyMs >= TIMER_TIMEOUT_MS) {
1754
1815
  _lastBlockingTimer = { name, durationMs: busyMs, ts: Date.now() };
1755
1816
  }
1756
1817
  if (shouldWarnSlowTimer(busyMs, slept, TIMER_SLOW_WARN_MS)) {
1757
- const msg = `[exed] Timer SLOW: ${name} busy ${busyMs}ms (wall ${durationMs}ms, sweep-paused ${sweepPausedMs}ms) \u2014 exceeded ${TIMER_SLOW_WARN_MS}ms per-tick budget (event loop was held)`;
1758
- process.stderr.write(`${msg}
1818
+ if (selfHeldLoop) {
1819
+ const attribution = ownSyncBlocked ? "sync-prefix" : "post-await/continuation";
1820
+ _lastLongSyncCallback = { name, execMs: ownSyncBlocked ? syncExecMs : busyMs, ts: Date.now() };
1821
+ const msg = `[exed] Timer SLOW: ${name} busy ${busyMs}ms (wall ${durationMs}ms, sync-exec ${syncExecMsRounded}ms, peak-lag ${peakLagMsRounded}ms, sweep-paused ${sweepPausedMs}ms) \u2014 exceeded ${TIMER_SLOW_WARN_MS}ms per-tick budget (event loop was held; attribution ${attribution})`;
1822
+ process.stderr.write(`${msg}
1759
1823
  `);
1760
- logDaemonHealth({
1761
- event: "process_stats",
1762
- pid: process.pid,
1763
- message: msg,
1764
- data: {
1765
- type: "timer_slow",
1766
- timer: name,
1767
- durationMs,
1768
- busyMs,
1769
- sweepPausedMs,
1770
- thresholdMs: TIMER_SLOW_WARN_MS,
1771
- wallMs: Math.round(span.wallMs),
1772
- sleptMs: Math.round(span.sleptMs),
1773
- uptimeMs: Date.now() - _startedAt2
1774
- }
1775
- });
1824
+ logDaemonHealth({
1825
+ event: "process_stats",
1826
+ pid: process.pid,
1827
+ message: msg,
1828
+ data: {
1829
+ type: "timer_slow",
1830
+ timer: name,
1831
+ durationMs,
1832
+ busyMs,
1833
+ syncExecMs: syncExecMsRounded,
1834
+ peakLagMs: peakLagMsRounded,
1835
+ attribution,
1836
+ sweepPausedMs,
1837
+ thresholdMs: TIMER_SLOW_WARN_MS,
1838
+ wallMs: Math.round(span.wallMs),
1839
+ sleptMs: Math.round(span.sleptMs),
1840
+ uptimeMs: Date.now() - _startedAt2
1841
+ }
1842
+ });
1843
+ } else {
1844
+ noteStalledFollower(name, durationMs);
1845
+ }
1776
1846
  }
1777
1847
  if (shouldTraceDaemonTimer(durationMs)) {
1778
1848
  const sleepNote = slept ? ` (wall ${Math.round(span.wallMs)}ms \u2014 host slept/clock-stepped ${Math.round(span.sleptMs)}ms; not an event-loop block)` : "";
@@ -2198,7 +2268,7 @@ async function loadModel() {
2198
2268
  void (async () => {
2199
2269
  try {
2200
2270
  if (_storeInitialized) {
2201
- const { writeNotification } = await import("../notifications-FGYNO2FY.js");
2271
+ const { writeNotification } = await import("../notifications-74YECZ4V.js");
2202
2272
  await writeNotification({
2203
2273
  agentId: "exe",
2204
2274
  agentRole: "system",
@@ -2314,7 +2384,7 @@ function disableEmbeddingsForInferenceTimeouts() {
2314
2384
  void (async () => {
2315
2385
  try {
2316
2386
  if (_storeInitialized) {
2317
- const { writeNotification } = await import("../notifications-FGYNO2FY.js");
2387
+ const { writeNotification } = await import("../notifications-74YECZ4V.js");
2318
2388
  await writeNotification({
2319
2389
  agentId: "exe",
2320
2390
  agentRole: "system",
@@ -2560,7 +2630,7 @@ async function shutdown(exitCode = 0, reason = null) {
2560
2630
  dbBytes = dbPath ? statSync4(dbPath).size : 0;
2561
2631
  } catch {
2562
2632
  }
2563
- const { getAvailableMemoryBytesSync } = await import("../memory-pressure-watchdog-CC344JBH.js");
2633
+ const { getAvailableMemoryBytesSync } = await import("../memory-pressure-watchdog-ZOZBIMKC.js");
2564
2634
  const freeBytes = getAvailableMemoryBytesSync();
2565
2635
  if (shouldSkipBackupUnderMemoryPressure(freeBytes, dbBytes)) {
2566
2636
  memoryGateSkip = true;
@@ -2613,12 +2683,12 @@ async function shutdown(exitCode = 0, reason = null) {
2613
2683
  `);
2614
2684
  }
2615
2685
  try {
2616
- const { stopProjectionWorker } = await import("../projection-worker-NJUNGEXE.js");
2686
+ const { stopProjectionWorker } = await import("../projection-worker-LRFFQ6JB.js");
2617
2687
  stopProjectionWorker();
2618
2688
  } catch {
2619
2689
  }
2620
2690
  try {
2621
- const { disposeShards } = await import("../shard-manager-3L2NMJVJ.js");
2691
+ const { disposeShards } = await import("../shard-manager-DFLCDZT5.js");
2622
2692
  disposeShards();
2623
2693
  } catch {
2624
2694
  }
@@ -2709,7 +2779,7 @@ async function handleHealthCheck(socket, requestId) {
2709
2779
  let pipelineStatus = "unknown";
2710
2780
  if (dbConnected) {
2711
2781
  try {
2712
- await import("../pipeline-router-YQOZ4M62.js");
2782
+ await import("../pipeline-router-6ZZV7JMA.js");
2713
2783
  pipelineStatus = "ok";
2714
2784
  } catch {
2715
2785
  pipelineStatus = "unavailable";
@@ -3152,7 +3222,7 @@ async function _writeMemoryRecordInner(entry, syncOnly = false) {
3152
3222
  const vRow = await client.execute({ sql: "SELECT version FROM memories WHERE id = ?", args: [id] });
3153
3223
  const version = Number(vRow.rows[0]?.version) || 0;
3154
3224
  try {
3155
- const { insertOntologyForMemory } = await import("../agentic-ontology-TNKI4FOM.js");
3225
+ const { insertOntologyForMemory } = await import("../agentic-ontology-3233PNKV.js");
3156
3226
  await insertOntologyForMemory({
3157
3227
  id,
3158
3228
  agent_id: record.agent_id,
@@ -3962,7 +4032,7 @@ async function startMcpHttpServer() {
3962
4032
  clearBootstrapFailureMarker();
3963
4033
  setBootPhase("db_ready");
3964
4034
  _storeInitialized = true;
3965
- const { initLicenseGate, getCachedLicenseGate } = await import("../license-gate-DKYHCAMN.js");
4035
+ const { initLicenseGate, getCachedLicenseGate } = await import("../license-gate-YXUSNA2I.js");
3966
4036
  const gateResult = await initLicenseGate();
3967
4037
  if (!gateResult.hasKey) {
3968
4038
  process.stderr.write(
@@ -3977,7 +4047,7 @@ async function startMcpHttpServer() {
3977
4047
  let _cachedWrapTelemetry = null;
3978
4048
  async function getWrapTelemetry() {
3979
4049
  if (!_cachedWrapTelemetry) {
3980
- const { wrapServerWithTelemetry } = await import("../tool-telemetry-UFUTCNE3.js");
4050
+ const { wrapServerWithTelemetry } = await import("../tool-telemetry-F7RWUNVK.js");
3981
4051
  _cachedWrapTelemetry = wrapServerWithTelemetry;
3982
4052
  }
3983
4053
  return _cachedWrapTelemetry;
@@ -4049,7 +4119,7 @@ async function startMcpHttpServer() {
4049
4119
  const expectedBuf = Buffer.from(_daemonToken);
4050
4120
  if (tokenBuf.length === expectedBuf.length && timingSafeEqual(tokenBuf, expectedBuf)) return true;
4051
4121
  try {
4052
- const { verifyAccessToken } = await import("../oauth-server-JELOVN5D.js");
4122
+ const { verifyAccessToken } = await import("../oauth-server-VE5ELXTF.js");
4053
4123
  const result = verifyAccessToken(token);
4054
4124
  return result.valid;
4055
4125
  } catch {
@@ -4302,7 +4372,7 @@ async function startMcpHttpServer() {
4302
4372
  return;
4303
4373
  }
4304
4374
  try {
4305
- const { handleOAuthRoute } = await import("../oauth-server-JELOVN5D.js");
4375
+ const { handleOAuthRoute } = await import("../oauth-server-VE5ELXTF.js");
4306
4376
  const handled = await handleOAuthRoute(req, res, url, MCP_HTTP_PORT);
4307
4377
  if (handled) return;
4308
4378
  } catch (err) {
@@ -4430,7 +4500,7 @@ async function startMcpHttpServer() {
4430
4500
  contextPct: body.context_pct
4431
4501
  });
4432
4502
  if (body.context_pct !== void 0 && body.context_pct > 70) {
4433
- void import("../orchestration-events-N5FQ4SKU.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
4503
+ void import("../orchestration-events-KRQI4ED5.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
4434
4504
  recordOE({
4435
4505
  eventType: "context.pressure",
4436
4506
  source: "exe-daemon.heartbeat",
@@ -4515,7 +4585,7 @@ async function startMcpHttpServer() {
4515
4585
  let sessionHint = req.headers["x-exe-session-name"] || req.headers["x-exe-session"] || "";
4516
4586
  if (sessionHint) {
4517
4587
  try {
4518
- const { sanitizeSessionHintHeader, rejectForgedSessionHint } = await import("../mcp-session-identity-S6UCHBER.js");
4588
+ const { sanitizeSessionHintHeader, rejectForgedSessionHint } = await import("../mcp-session-identity-RTNZ2ZLW.js");
4519
4589
  const rawHint = sessionHint;
4520
4590
  sessionHint = sanitizeSessionHintHeader(sessionHint);
4521
4591
  if (!sessionHint) {
@@ -4554,7 +4624,7 @@ async function startMcpHttpServer() {
4554
4624
  try {
4555
4625
  const liveSessions = await getTmuxSessionsAsync();
4556
4626
  const paneCommands = await getPaneCommandsAsync();
4557
- const { resolveMcpSessionHint } = await import("../mcp-session-identity-S6UCHBER.js");
4627
+ const { resolveMcpSessionHint } = await import("../mcp-session-identity-RTNZ2ZLW.js");
4558
4628
  let registrySessions = [];
4559
4629
  try {
4560
4630
  const { listSessions: listRegistrySessions } = await import("./session-registry.js");
@@ -4691,7 +4761,7 @@ async function startMcpHttpServer() {
4691
4761
  bindLive = await getTmuxSessionsAsync();
4692
4762
  } catch {
4693
4763
  }
4694
- const { isLauncherCorroboratedIdentity } = await import("../mcp-session-identity-S6UCHBER.js");
4764
+ const { isLauncherCorroboratedIdentity } = await import("../mcp-session-identity-RTNZ2ZLW.js");
4695
4765
  const corroborated = isLauncherCorroboratedIdentity({
4696
4766
  agentId,
4697
4767
  registrySessions: bindRegistry,
@@ -4934,7 +5004,7 @@ async function startMcpHttpServer() {
4934
5004
  }
4935
5005
  }
4936
5006
  try {
4937
- const { reconcileHintWithRegistryIdentity } = await import("../mcp-session-identity-S6UCHBER.js");
5007
+ const { reconcileHintWithRegistryIdentity } = await import("../mcp-session-identity-RTNZ2ZLW.js");
4938
5008
  const { listSessions: listRegistrySessions } = await import("./session-registry.js");
4939
5009
  const recon = reconcileHintWithRegistryIdentity({
4940
5010
  agentId,
@@ -5147,10 +5217,10 @@ async function ensureStoreForPolling() {
5147
5217
  await initDatabase({ dbPath: config.dbPath, encryptionKey: masterKey.toString("hex") });
5148
5218
  await ensureSchema();
5149
5219
  try {
5150
- const { isLedgerEnabled } = await import("../notification-ledger-GL3ZPZNR.js");
5220
+ const { isLedgerEnabled } = await import("../notification-ledger-NZ4HO3M5.js");
5151
5221
  if (isLedgerEnabled()) {
5152
- const { bumpBootGeneration } = await import("../boot-generation-7ZI7JYGR.js");
5153
- const { setDaemonReadyGeneration } = await import("../daemon-ready-signal-TVCPSG7J.js");
5222
+ const { bumpBootGeneration } = await import("../boot-generation-4D3CTT7X.js");
5223
+ const { setDaemonReadyGeneration } = await import("../daemon-ready-signal-CKXPUMJ2.js");
5154
5224
  const generation = await bumpBootGeneration();
5155
5225
  setDaemonReadyGeneration(generation);
5156
5226
  process.stderr.write(`[exed] notification ledger enabled \u2014 boot generation ${generation}
@@ -5189,13 +5259,13 @@ async function ensureStoreForPolling() {
5189
5259
  }
5190
5260
  }
5191
5261
  async function startReviewPolling() {
5192
- const polling = await import("../review-polling-2RMEZ5QO.js");
5262
+ const polling = await import("../review-polling-JFWRNQF6.js");
5193
5263
  const state = {
5194
5264
  lastIntercomSent: /* @__PURE__ */ new Map(),
5195
5265
  lastNudgeSent: /* @__PURE__ */ new Map(),
5196
5266
  intervalMs: REVIEW_POLL_INTERVAL_MS
5197
5267
  };
5198
- const { pollReviewNudge, createReviewNudgeRealDeps, loadNudgeState } = await import("../daemon-orchestration-7WS3X5DQ.js");
5268
+ const { pollReviewNudge, createReviewNudgeRealDeps, loadNudgeState } = await import("../daemon-orchestration-DT5M2ZAR.js");
5199
5269
  const nudgeState = loadNudgeState();
5200
5270
  const tick = async () => traceDaemonTimer("review_polling", async () => {
5201
5271
  fired("review_polling");
@@ -5203,7 +5273,7 @@ async function startReviewPolling() {
5203
5273
  try {
5204
5274
  const { getClient } = await import("./database.js");
5205
5275
  const deps = polling.createRealDeps(getClient);
5206
- const { strictSessionScopeFilter } = await import("../task-scope-74ZIFQRH.js");
5276
+ const { strictSessionScopeFilter } = await import("../task-scope-44N7XP5N.js");
5207
5277
  const { getCoordinatorName, DEFAULT_COORDINATOR_TEMPLATE_NAME } = await import("./employees.js");
5208
5278
  deps.findOrphanedDoneTasks = async (sessionScope) => {
5209
5279
  const coordinatorName = getCoordinatorName();
@@ -5282,7 +5352,7 @@ function startSessionTTL() {
5282
5352
  if (!await ensureStoreForPolling()) return;
5283
5353
  if (inPostRestartDestructiveGrace("session_ttl")) return;
5284
5354
  const { getClient } = await import("./database.js");
5285
- const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-7WS3X5DQ.js");
5355
+ const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-DT5M2ZAR.js");
5286
5356
  const deps = createSessionTTLRealDeps(getClient);
5287
5357
  const killed = await checkSessionTTL(deps, _wedgeObservations);
5288
5358
  if (killed.length > 0) acted("session_ttl");
@@ -5334,7 +5404,7 @@ function startIdleKill() {
5334
5404
  const cfg = await getCachedConfig();
5335
5405
  if (!cfg) return;
5336
5406
  const { getClient } = await import("./database.js");
5337
- const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-7WS3X5DQ.js");
5407
+ const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-DT5M2ZAR.js");
5338
5408
  const { sessions: liveSessions, paneCache, aliveSessions } = await getSharedOrchestrationCaches();
5339
5409
  const realDeps = createIdleKillRealDeps(
5340
5410
  getClient,
@@ -5707,7 +5777,7 @@ function startSkillRefinement() {
5707
5777
  if (!shouldRunHeavyJob("skill_refinement")) return;
5708
5778
  try {
5709
5779
  if (!await ensureStoreForPolling()) return;
5710
- const { runSkillRefinement } = await import("../skill-refinement-FMN3WFSG.js");
5780
+ const { runSkillRefinement } = await import("../skill-refinement-APBYOSGX.js");
5711
5781
  const result = await runSkillRefinement();
5712
5782
  if (result.reviewed > 0) {
5713
5783
  acted("skill_refinement");
@@ -5733,7 +5803,7 @@ function startStaleBranchSweep() {
5733
5803
  const tick = async () => {
5734
5804
  fired("stale_branch_sweep");
5735
5805
  try {
5736
- const { discoverRepoPaths } = await import("../worktree-sweep-LSKFA2PK.js");
5806
+ const { discoverRepoPaths } = await import("../worktree-sweep-IM2ZQG6Z.js");
5737
5807
  const { scanUnmergedBranchesCached } = await import("../branch-hygiene-HNSOUDJE.js");
5738
5808
  const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
5739
5809
  for (const k of _staleBranchAlertedToday) {
@@ -5765,7 +5835,7 @@ function startStaleBranchSweep() {
5765
5835
  if (!_storeInitialized) continue;
5766
5836
  const stale = scan.branches.filter((b) => b.ageHours >= STALE_BRANCH_HOURS).slice(0, 5).map((b) => `${b.name} (+${b.ahead} commits, ${(b.ageHours / 24).toFixed(1)}d)`).join("; ");
5767
5837
  try {
5768
- const { writeNotification } = await import("../notifications-FGYNO2FY.js");
5838
+ const { writeNotification } = await import("../notifications-74YECZ4V.js");
5769
5839
  await writeNotification({
5770
5840
  agentId: "exe",
5771
5841
  agentRole: "system",
@@ -5820,7 +5890,7 @@ function startWorkStateHeartbeat() {
5820
5890
  const { getClient } = await import("./database.js");
5821
5891
  const { listSessions } = await import("./session-registry.js");
5822
5892
  const { isCoordinatorName } = await import("./employees.js");
5823
- const { runWorkStateTick } = await import("../work-state-heartbeat-IQI3LCHN.js");
5893
+ const { runWorkStateTick } = await import("../work-state-heartbeat-CA4CN7DQ.js");
5824
5894
  let liveTmux = null;
5825
5895
  const loadLiveTmux = async () => {
5826
5896
  if (!liveTmux) liveTmux = await listTmuxSessionNamesAsync();
@@ -5885,7 +5955,7 @@ function startGraphExtraction() {
5885
5955
  if (!await ensureStoreForPolling()) return;
5886
5956
  const { getClient } = await import("./database.js");
5887
5957
  const client = getClient();
5888
- const { extractBatch } = await import("../graph-rag-HCQCZ2W7.js");
5958
+ const { extractBatch } = await import("../graph-rag-5FVC5JXH.js");
5889
5959
  const result = await extractBatch(client, 50, config.selfQueryModel);
5890
5960
  if (result.processed > 0) {
5891
5961
  acted("graph_extraction");
@@ -6157,6 +6227,7 @@ async function writeAgentStats() {
6157
6227
  }
6158
6228
  var AGENT_STATS_REFRESH_INTERVAL_MS = 60 * 60 * 1e3;
6159
6229
  var _agentRefreshInFlight = false;
6230
+ var _lastSpendCapLevel = null;
6160
6231
  async function refreshAgentData() {
6161
6232
  if (_agentRefreshInFlight) return;
6162
6233
  _agentRefreshInFlight = true;
@@ -6198,6 +6269,29 @@ async function refreshAgentData() {
6198
6269
  await yieldToEventLoop();
6199
6270
  const r30 = await getAgentSpend("30d");
6200
6271
  spend30d = new Map(r30.map((s) => [s.agentId, { inputTokens: s.inputTokens, outputTokens: s.outputTokens, costUSD: s.costUSD, sessions: s.sessions }]));
6272
+ try {
6273
+ const { evaluateGlobalSpendCap, evaluateSpendCapAlert } = await import("./token-spend.js");
6274
+ const total24hCost = r24.reduce((sum, s) => sum + s.costUSD, 0);
6275
+ const capStatus = evaluateGlobalSpendCap(total24hCost, "24h");
6276
+ const decision = evaluateSpendCapAlert(_lastSpendCapLevel, capStatus);
6277
+ _lastSpendCapLevel = decision.level;
6278
+ if (decision.shouldAlert && decision.summary) {
6279
+ const { writeNotification } = await import("../notifications-74YECZ4V.js");
6280
+ await writeNotification({
6281
+ agentId: "system",
6282
+ agentRole: "system",
6283
+ event: "spend_cap_alert",
6284
+ project: process.env.EXE_PROJECT_NAME ?? "all",
6285
+ summary: decision.summary,
6286
+ sessionScope: null
6287
+ });
6288
+ process.stderr.write(`[exed] Global spend cap alert (${decision.level}): ${decision.summary}
6289
+ `);
6290
+ }
6291
+ } catch (capErr) {
6292
+ process.stderr.write(`[exed] Spend cap alert error: ${capErr instanceof Error ? capErr.message : String(capErr)}
6293
+ `);
6294
+ }
6201
6295
  } catch (err) {
6202
6296
  process.stderr.write(`[exed] Agent spend refresh error: ${err instanceof Error ? err.message : String(err)}
6203
6297
  `);
@@ -6285,6 +6379,8 @@ function startConfidenceDecay() {
6285
6379
  `);
6286
6380
  }
6287
6381
  var REFLECTION_SWEEP_INTERVAL_MS = 6 * 60 * 60 * 1e3;
6382
+ var CARD_BACKFILL_TICK_BUDGET_MS = Number(process.env.EXE_CARD_BACKFILL_TICK_BUDGET_MS) || 200;
6383
+ var CARD_BACKFILL_RESCHEDULE_DELAY_MS = Number(process.env.EXE_CARD_BACKFILL_RESCHEDULE_DELAY_MS) || 50;
6288
6384
  function startReflectionSweep() {
6289
6385
  const tick = async () => {
6290
6386
  fired("reflection_sweep");
@@ -6302,7 +6398,7 @@ function startReflectionSweep() {
6302
6398
  );
6303
6399
  let runReflection;
6304
6400
  try {
6305
- ({ runReflection } = await import("../memory-reflection-Q4OT4V55.js"));
6401
+ ({ runReflection } = await import("../memory-reflection-EQC4FXSW.js"));
6306
6402
  } catch (importErr) {
6307
6403
  _reflectionImportFailed = true;
6308
6404
  process.stderr.write(`[exed] Reflection module unavailable (stale chunk hash?) \u2014 disabled until daemon restart: ${importErr instanceof Error ? importErr.message : String(importErr)}
@@ -6343,17 +6439,21 @@ function startReflectionSweep() {
6343
6439
  if (memories > 100 && cards < memories * 0.1) {
6344
6440
  process.stderr.write(`[exed] Memory cards sparse (${cards} cards / ${memories} memories) \u2014 running backfill...
6345
6441
  `);
6346
- const { insertMemoryCardsForBatch } = await import("../memory-cards-65RGFT5M.js");
6442
+ const { insertMemoryCardsForBatch } = await import("../memory-cards-KG4TPNKK.js");
6347
6443
  const batchSize = 500;
6348
6444
  let offset = 0;
6349
6445
  let totalCards = 0;
6446
+ let lastId = "";
6447
+ let budgetStart = monotonicNowMs();
6350
6448
  while (true) {
6351
6449
  const batch = await offloadReadQuery(
6352
6450
  `SELECT id, agent_id, session_id, project_name, timestamp, tool_name, raw_text
6353
6451
  FROM memories WHERE deleted_at IS NULL
6452
+ AND id > ?
6354
6453
  AND id NOT IN (SELECT DISTINCT memory_id FROM memory_cards)
6454
+ ORDER BY id
6355
6455
  LIMIT ?`,
6356
- [batchSize]
6456
+ [lastId, batchSize]
6357
6457
  );
6358
6458
  if (batch.rows.length === 0) break;
6359
6459
  try {
@@ -6363,9 +6463,18 @@ function startReflectionSweep() {
6363
6463
  process.stderr.write("[exe-daemon] card backfill batch: " + (e instanceof Error ? e.message : String(e)) + "\n");
6364
6464
  break;
6365
6465
  }
6466
+ lastId = String(batch.rows[batch.rows.length - 1].id);
6366
6467
  offset += batch.rows.length;
6367
6468
  if (offset > 5e4) break;
6368
6469
  await new Promise((r) => setImmediate(r));
6470
+ if (monotonicElapsedMs(budgetStart) >= CARD_BACKFILL_TICK_BUDGET_MS) {
6471
+ recordTimerPauseMs(CARD_BACKFILL_RESCHEDULE_DELAY_MS);
6472
+ await new Promise((r) => {
6473
+ const t = setTimeout(r, CARD_BACKFILL_RESCHEDULE_DELAY_MS);
6474
+ t.unref?.();
6475
+ });
6476
+ budgetStart = monotonicNowMs();
6477
+ }
6369
6478
  }
6370
6479
  if (totalCards > 0) {
6371
6480
  process.stderr.write(`[exed] Card backfill: ${totalCards} cards from ${offset} memories
@@ -6411,7 +6520,7 @@ function startDatabaseBackup() {
6411
6520
  `
6412
6521
  );
6413
6522
  try {
6414
- const { maybeVerifyDailyBackup } = await import("../backup-verify-7NLKR4S6.js");
6523
+ const { maybeVerifyDailyBackup } = await import("../backup-verify-JNYKXIU2.js");
6415
6524
  const verdict = await maybeVerifyDailyBackup(backupPath);
6416
6525
  if (verdict && !verdict.ok) {
6417
6526
  process.stderr.write(
@@ -6488,7 +6597,7 @@ function startSessionEventsRetention() {
6488
6597
  if (!await ensureStoreForPolling()) return;
6489
6598
  try {
6490
6599
  const { getClient } = await import("./database.js");
6491
- const { sweepExpiredSessionEvents, DEFAULT_SESSION_EVENTS_RETENTION_DAYS } = await import("../session-events-5XSYCV4I.js");
6600
+ const { sweepExpiredSessionEvents, DEFAULT_SESSION_EVENTS_RETENTION_DAYS } = await import("../session-events-VMQBCUH3.js");
6492
6601
  const days = SESSION_EVENTS_RETENTION_DAYS ?? DEFAULT_SESSION_EVENTS_RETENTION_DAYS;
6493
6602
  const count = await sweepExpiredSessionEvents(getClient(), days);
6494
6603
  if (count > 0) {
@@ -6519,7 +6628,7 @@ function startIntercomQueueDrain() {
6519
6628
  const tick = async () => traceDaemonTimer("intercom_queue_drain", async () => {
6520
6629
  fired("intercom_queue_drain");
6521
6630
  try {
6522
- const { drainQueueAsync, readQueue } = await import("../intercom-queue-5D52JF3Q.js");
6631
+ const { drainQueueAsync, readQueue } = await import("../intercom-queue-KHKJJYCQ.js");
6523
6632
  const {
6524
6633
  sendIntercomAsync: centralSendIntercomAsync,
6525
6634
  countScopedPendingReviews,
@@ -6651,7 +6760,7 @@ function startLedgerDrain() {
6651
6760
  const tick = async () => traceDaemonTimer("ledger_drain", async () => {
6652
6761
  fired("ledger_drain");
6653
6762
  try {
6654
- const { isLedgerEnabled, drainLedger } = await import("../notification-ledger-GL3ZPZNR.js");
6763
+ const { isLedgerEnabled, drainLedger } = await import("../notification-ledger-NZ4HO3M5.js");
6655
6764
  if (!isLedgerEnabled()) return;
6656
6765
  const result = await drainLedger({
6657
6766
  // Shadow "would-deliver": idle target = would-deliver, busy = retry.
@@ -6690,7 +6799,7 @@ function startOrphanReaper() {
6690
6799
  const tick = async () => traceDaemonTimer("orphan_reaper", async () => {
6691
6800
  fired("orphan_reaper");
6692
6801
  try {
6693
- const { reapOrphanedMcpProcesses, createOrphanReaperRealDepsAsync } = await import("../daemon-orchestration-7WS3X5DQ.js");
6802
+ const { reapOrphanedMcpProcesses, createOrphanReaperRealDepsAsync } = await import("../daemon-orchestration-DT5M2ZAR.js");
6694
6803
  const deps = await createOrphanReaperRealDepsAsync();
6695
6804
  const reaped = await reapOrphanedMcpProcesses(deps);
6696
6805
  if (reaped.length > 0) acted("orphan_reaper");
@@ -6715,7 +6824,7 @@ function startZombieAgentReaper() {
6715
6824
  const tick = async () => traceDaemonTimer("zombie_agent_reaper", async () => {
6716
6825
  fired("zombie_agent_reaper");
6717
6826
  try {
6718
- const { reapZombieAgentProcesses, createZombieAgentReaperRealDepsAsync } = await import("../daemon-orchestration-7WS3X5DQ.js");
6827
+ const { reapZombieAgentProcesses, createZombieAgentReaperRealDepsAsync } = await import("../daemon-orchestration-DT5M2ZAR.js");
6719
6828
  const deps = await createZombieAgentReaperRealDepsAsync();
6720
6829
  const reaped = reapZombieAgentProcesses(deps);
6721
6830
  if (reaped.length > 0) acted("zombie_agent_reaper");
@@ -6739,7 +6848,7 @@ async function startDaemonMemoryPressureWatchdog() {
6739
6848
  try {
6740
6849
  const cfg = await getCachedConfig();
6741
6850
  if (!cfg) return;
6742
- const { startMemoryPressureWatchdog: startWatchdog, MEMORY_PRESSURE_WATCHDOG_DEFAULTS } = await import("../memory-pressure-watchdog-CC344JBH.js");
6851
+ const { startMemoryPressureWatchdog: startWatchdog, MEMORY_PRESSURE_WATCHDOG_DEFAULTS } = await import("../memory-pressure-watchdog-ZOZBIMKC.js");
6743
6852
  const watchdogCfg = {
6744
6853
  ...MEMORY_PRESSURE_WATCHDOG_DEFAULTS,
6745
6854
  ...cfg.memoryPressureWatchdog ?? {}
@@ -6770,7 +6879,7 @@ function startWorktreeReaper() {
6770
6879
  const tick = async () => traceDaemonTimer("worktree_reaper", async () => {
6771
6880
  fired("worktree_reaper");
6772
6881
  try {
6773
- const { reapOrphanedWorktrees, createWorktreeReaperRealDeps } = await import("../daemon-orchestration-7WS3X5DQ.js");
6882
+ const { reapOrphanedWorktrees, createWorktreeReaperRealDeps } = await import("../daemon-orchestration-DT5M2ZAR.js");
6774
6883
  const deps = await createWorktreeReaperRealDeps();
6775
6884
  const result = await reapOrphanedWorktrees(deps);
6776
6885
  if (result.pruned.length > 0) {
@@ -6810,8 +6919,8 @@ function startWorktreeReaper() {
6810
6919
  }
6811
6920
  continue;
6812
6921
  }
6813
- const { cleanupAgentWorktree } = await import("../worktree-sweep-LSKFA2PK.js");
6814
- const { getMainRepoRootAsync } = await import("../worktree-EUYBBABA.js");
6922
+ const { cleanupAgentWorktree } = await import("../worktree-sweep-IM2ZQG6Z.js");
6923
+ const { getMainRepoRootAsync } = await import("../worktree-NNVXVV6A.js");
6815
6924
  const repoRoot = await getMainRepoRootAsync(signal.worktreePath);
6816
6925
  if (repoRoot && signal.agentId) {
6817
6926
  const notes = await cleanupAgentWorktree(repoRoot, signal.agentId);
@@ -6844,7 +6953,7 @@ function startAutoWake() {
6844
6953
  if (!await ensureStoreForPolling()) return;
6845
6954
  try {
6846
6955
  const { getClient } = await import("./database.js");
6847
- const { pollOrphanedTasks, createAutoWakeRealDeps } = await import("../daemon-orchestration-7WS3X5DQ.js");
6956
+ const { pollOrphanedTasks, createAutoWakeRealDeps } = await import("../daemon-orchestration-DT5M2ZAR.js");
6848
6957
  const deps = createAutoWakeRealDeps(getClient, process.cwd(), getTmuxSessionsAsync);
6849
6958
  const woken = await pollOrphanedTasks(deps);
6850
6959
  if (woken.length > 0) acted("auto_wake");
@@ -6895,7 +7004,7 @@ function startAutoWake() {
6895
7004
  if (age > 60 * 60 * 1e3) {
6896
7005
  try {
6897
7006
  unlinkSync4(signalPath);
6898
- void import("../orchestration-events-N5FQ4SKU.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
7007
+ void import("../orchestration-events-KRQI4ED5.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
6899
7008
  recordOE({ eventType: "signal.stale", source: "exe-daemon.autoWake", severity: "warn", payload: { file, ageMinutes: Math.round(age / 6e4) } });
6900
7009
  }).catch(() => {
6901
7010
  });
@@ -7043,7 +7152,7 @@ function startStuckTaskRelease() {
7043
7152
  createStaleClaimRealDeps,
7044
7153
  escalateStuckBlockedTasks,
7045
7154
  createStuckBlockedRealDeps
7046
- } = await import("../daemon-orchestration-7WS3X5DQ.js");
7155
+ } = await import("../daemon-orchestration-DT5M2ZAR.js");
7047
7156
  const deps = createStuckTaskRealDeps(getClient);
7048
7157
  const released = await releaseStuckTasks(deps);
7049
7158
  if (released.length > 0) {
@@ -7244,12 +7353,12 @@ function startTaskEnforcementScanner() {
7244
7353
  const tick = async () => traceDaemonTimer("task_enforcement", async () => {
7245
7354
  fired("task_enforcement");
7246
7355
  try {
7247
- const { runTaskEnforcementTick } = await import("../task-enforcement-SFZGBY27.js");
7356
+ const { runTaskEnforcementTick } = await import("../task-enforcement-YAU6ZGDC.js");
7248
7357
  const { getTransport } = await import("./transport.js");
7249
7358
  const { loadAgentConfig } = await import("./agent-config.js");
7250
7359
  const { getClient } = await import("./database.js");
7251
7360
  const { loadEmployeesSync } = await import("./employees.js");
7252
- const { sessionScopeFilter } = await import("../task-scope-74ZIFQRH.js");
7361
+ const { sessionScopeFilter } = await import("../task-scope-44N7XP5N.js");
7253
7362
  const transport = getTransport();
7254
7363
  const { sessions: allSessions, paneCache, aliveSessions } = await getSharedOrchestrationCaches();
7255
7364
  await yieldToEventLoop();
@@ -7260,10 +7369,10 @@ function startTaskEnforcementScanner() {
7260
7369
  sendKeysLiteral: transport.sendKeysLiteral?.bind(transport),
7261
7370
  isAlive: (session) => aliveSessions.has(session)
7262
7371
  };
7263
- const { checkAutoWakeGates } = await import("../daemon-orchestration-7WS3X5DQ.js");
7372
+ const { checkAutoWakeGates } = await import("../daemon-orchestration-DT5M2ZAR.js");
7264
7373
  const { ensureEmployeeAsync, employeeSessionName, sendIntercomAsync } = await import("./tmux-routing.js");
7265
7374
  const { shouldAutoInstance } = await import("./employees.js");
7266
- const { recordOrchestrationEventBestEffort } = await import("../orchestration-events-N5FQ4SKU.js");
7375
+ const { recordOrchestrationEventBestEffort } = await import("../orchestration-events-KRQI4ED5.js");
7267
7376
  const projectDir = process.cwd();
7268
7377
  await runTaskEnforcementTick({
7269
7378
  transport: enforcementTransport,
@@ -7590,7 +7699,7 @@ async function sweepExpiredTracesFromDaemonTimer() {
7590
7699
  const memoryIds = idsResult.rows.map((r) => String(r.id)).filter(Boolean);
7591
7700
  if (memoryIds.length === 0) return 0;
7592
7701
  const { getClient } = await import("./database.js");
7593
- const { cleanupGraphLinksForMemories, cleanupCardsForMemories } = await import("../graph-rag-HCQCZ2W7.js");
7702
+ const { cleanupGraphLinksForMemories, cleanupCardsForMemories } = await import("../graph-rag-5FVC5JXH.js");
7594
7703
  const client = getClient();
7595
7704
  await cleanupGraphLinksForMemories(client, memoryIds);
7596
7705
  await cleanupCardsForMemories(client, memoryIds);
@@ -8280,7 +8389,7 @@ function startEventLoopLagDetector() {
8280
8389
  const msg = `[exed] EVENT LOOP BLOCKED ${(lag / 1e3).toFixed(1)}s \u2014 MCP UNRESPONSIVE. Sessions will die.`;
8281
8390
  process.stderr.write(msg + "\n");
8282
8391
  logDaemonHealth({ event: "event_loop_blocked", pid: process.pid, message: msg, data: { lagMs: lag } });
8283
- void import("../orchestration-events-N5FQ4SKU.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
8392
+ void import("../orchestration-events-KRQI4ED5.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
8284
8393
  recordOE({ eventType: "daemon.event_loop_blocked", source: "exe-daemon.lagDetector", severity: "error", durationMs: lag });
8285
8394
  }).catch(() => {
8286
8395
  });
@@ -8474,7 +8583,7 @@ function startTaskFileResync() {
8474
8583
  });
8475
8584
  if (Number(res.rowsAffected ?? 0) > 0) {
8476
8585
  synced++;
8477
- void import("../orchestration-events-N5FQ4SKU.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
8586
+ void import("../orchestration-events-KRQI4ED5.js").then(({ recordOrchestrationEventBestEffort: recordOE }) => {
8478
8587
  recordOE({
8479
8588
  eventType: "task_file.resynced",
8480
8589
  source: "exe-daemon.taskFileResync",
@@ -8508,7 +8617,7 @@ function startTaskGroupBarriers() {
8508
8617
  fired("task_group_barriers");
8509
8618
  if (!await ensureStoreForPolling()) return;
8510
8619
  try {
8511
- const { pollTaskGroupBarriers } = await import("../daemon-orchestration-7WS3X5DQ.js");
8620
+ const { pollTaskGroupBarriers } = await import("../daemon-orchestration-DT5M2ZAR.js");
8512
8621
  const firedCount = await pollTaskGroupBarriers();
8513
8622
  if (firedCount > 0) {
8514
8623
  acted("task_group_barriers");
@@ -8530,7 +8639,7 @@ function startCheckpointGc() {
8530
8639
  fired("checkpoint_gc");
8531
8640
  if (!await ensureStoreForPolling()) return;
8532
8641
  try {
8533
- const { gcStaleCheckpoints } = await import("../daemon-orchestration-7WS3X5DQ.js");
8642
+ const { gcStaleCheckpoints } = await import("../daemon-orchestration-DT5M2ZAR.js");
8534
8643
  const cleared = await gcStaleCheckpoints();
8535
8644
  if (cleared > 0) {
8536
8645
  acted("checkpoint_gc");
@@ -8570,14 +8679,14 @@ function startDispatchAckCleanup() {
8570
8679
  function startProjectionWorkerDeferred() {
8571
8680
  setTimeout(async () => {
8572
8681
  try {
8573
- const { startProjectionWorker } = await import("../projection-worker-NJUNGEXE.js");
8682
+ const { startProjectionWorker } = await import("../projection-worker-LRFFQ6JB.js");
8574
8683
  startProjectionWorker();
8575
8684
  } catch {
8576
8685
  }
8577
8686
  }, 2e4);
8578
8687
  }
8579
8688
  async function startToolTelemetry() {
8580
- const { startToolTelemetryFlush } = await import("../tool-telemetry-UFUTCNE3.js");
8689
+ const { startToolTelemetryFlush } = await import("../tool-telemetry-F7RWUNVK.js");
8581
8690
  startToolTelemetryFlush();
8582
8691
  process.stderr.write("[exed] Tool telemetry started (flush every 5m)\n");
8583
8692
  }
@@ -8745,7 +8854,7 @@ function startLocalFirstTimers() {
8745
8854
  fired("orphan_task_cleanup");
8746
8855
  try {
8747
8856
  if (!await ensureStoreForPolling()) return;
8748
- const { cleanOrphanedTaskFiles } = await import("../tasks-crud-N54JZCXU.js");
8857
+ const { cleanOrphanedTaskFiles } = await import("../tasks-crud-IWVDREXG.js");
8749
8858
  const count = await cleanOrphanedTaskFiles();
8750
8859
  if (count > 0) {
8751
8860
  acted("orphan_task_cleanup");
@@ -8761,7 +8870,7 @@ function startLocalFirstTimers() {
8761
8870
  fired("task_file_consistency");
8762
8871
  try {
8763
8872
  if (!await ensureStoreForPolling()) return;
8764
- const { checkTaskFileConsistency } = await import("../tasks-crud-N54JZCXU.js");
8873
+ const { checkTaskFileConsistency } = await import("../tasks-crud-IWVDREXG.js");
8765
8874
  const mismatches = await checkTaskFileConsistency();
8766
8875
  if (mismatches > 0) {
8767
8876
  acted("task_file_consistency");
@@ -8780,7 +8889,7 @@ function startLocalFirstTimers() {
8780
8889
  const TELEMETRY_DAILY_MS = 24 * 60 * 60 * 1e3;
8781
8890
  const telemetryDaily = async () => {
8782
8891
  try {
8783
- const { sendTelemetry, isTelemetryEnabled } = await import("../telemetry-upload-HR3QIWZV.js");
8892
+ const { sendTelemetry, isTelemetryEnabled } = await import("../telemetry-upload-3X5ESEKM.js");
8784
8893
  if (!isTelemetryEnabled()) return;
8785
8894
  const { upstream } = await sendTelemetry(24);
8786
8895
  if (upstream.startsWith("sent")) {