@askexenow/exe-os 0.9.414 → 0.9.415

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 (422) hide show
  1. package/deploy/compose/.env.customer.example +1 -1
  2. package/deploy/compose/.env.default +1 -1
  3. package/deploy/compose/.env.example +1 -1
  4. package/deploy/compose/docker-compose.yml +1 -1
  5. package/deploy/stack-manifests/v0.9.json +399 -2
  6. package/dist/.dist-verified.json +3 -3
  7. package/dist/{active-agent-MHWQDMML.js → active-agent-LB7T3TLZ.js} +7 -6
  8. package/dist/{active-agent-3YCLS7GB.js → active-agent-NUV4ZSZV.js} +7 -6
  9. package/dist/{agent-defs-generator-DNXMO34I.js → agent-defs-generator-GMN7JLNZ.js} +6 -5
  10. package/dist/{agentic-ontology-RA6CMND6.js → agentic-ontology-ARQVAAYP.js} +1 -1
  11. package/dist/{artifact-backup-EETHNFFP.js → artifact-backup-C6CYTX4E.js} +3 -3
  12. package/dist/{backfill-metadata-WYT257VG.js → backfill-metadata-OLMSQBJF.js} +9 -8
  13. package/dist/{backup-verify-AG54CYGR.js → backup-verify-TPKH64MK.js} +3 -2
  14. package/dist/{behavior-injection-G7GAUHGO.js → behavior-injection-UJ6CW5K7.js} +12 -11
  15. package/dist/{behavior-promotion-I2DIUFUR.js → behavior-promotion-QSVT4WGD.js} +11 -10
  16. package/dist/{behaviors-SKVKPCRW.js → behaviors-6HWTCOTR.js} +10 -9
  17. package/dist/bin/agentic-ontology-backfill.js +10 -9
  18. package/dist/bin/agentic-reflection-backfill.js +11 -10
  19. package/dist/bin/agentic-semantic-label.js +10 -9
  20. package/dist/bin/backfill-conversations.js +9 -8
  21. package/dist/bin/backfill-responses.js +9 -8
  22. package/dist/bin/backfill-vectors.js +9 -8
  23. package/dist/bin/bulk-sync-postgres.js +18 -17
  24. package/dist/bin/cc-doctor.js +11 -10
  25. package/dist/bin/cleanup-stale-review-tasks.js +18 -17
  26. package/dist/bin/cli.js +60 -36
  27. package/dist/bin/deferred-daemon-restart.js +106 -105
  28. package/dist/bin/exe-agent-config.js +5 -4
  29. package/dist/bin/exe-agent.js +17 -16
  30. package/dist/bin/exe-assign.js +10 -9
  31. package/dist/bin/exe-boot.js +39 -38
  32. package/dist/bin/exe-call.js +10 -9
  33. package/dist/bin/exe-cloud.js +19 -18
  34. package/dist/bin/exe-config-dump.js +5 -4
  35. package/dist/bin/exe-dispatch.js +19 -18
  36. package/dist/bin/exe-doctor.js +9 -8
  37. package/dist/bin/exe-export-behaviors.js +14 -13
  38. package/dist/bin/exe-forget.js +12 -11
  39. package/dist/bin/exe-gateway.js +11 -10
  40. package/dist/bin/exe-grant.js +6 -6
  41. package/dist/bin/exe-healthcheck.js +11 -10
  42. package/dist/bin/exe-heartbeat.js +24 -23
  43. package/dist/bin/exe-kill.js +23 -22
  44. package/dist/bin/exe-launch-agent.js +66 -33
  45. package/dist/bin/exe-mcp.js +8 -7
  46. package/dist/bin/exe-memory-reads.js +9 -8
  47. package/dist/bin/exe-new-employee.js +14 -13
  48. package/dist/bin/exe-os-mcp-proxy.js +8 -7
  49. package/dist/bin/exe-pending-messages.js +19 -18
  50. package/dist/bin/exe-pending-notifications.js +18 -17
  51. package/dist/bin/exe-pending-reviews.js +19 -18
  52. package/dist/bin/exe-rename.js +9 -8
  53. package/dist/bin/exe-review.js +22 -21
  54. package/dist/bin/exe-search.js +11 -10
  55. package/dist/bin/exe-session-cleanup.js +23 -22
  56. package/dist/bin/exe-settings.js +18 -17
  57. package/dist/bin/exe-start-codex.js +21 -20
  58. package/dist/bin/exe-start-opencode.js +19 -18
  59. package/dist/bin/exe-start.sh +10 -1
  60. package/dist/bin/exe-status.js +20 -19
  61. package/dist/bin/exe-support.js +3 -3
  62. package/dist/bin/exe-team.js +7 -6
  63. package/dist/bin/exe-telemetry.js +88 -0
  64. package/dist/bin/git-sweep.js +20 -19
  65. package/dist/bin/graph-backfill.js +10 -9
  66. package/dist/bin/graph-export.js +10 -9
  67. package/dist/bin/hooks-cli.js +1 -1
  68. package/dist/bin/import-history.js +14 -13
  69. package/dist/bin/install.js +109 -108
  70. package/dist/bin/intercom-check.js +5 -5
  71. package/dist/bin/mcp-sessions.js +2 -2
  72. package/dist/bin/orchestration-metrics.js +7 -6
  73. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  74. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  75. package/dist/bin/reconcile-backlog.js +2 -2
  76. package/dist/bin/registry-proxy.js +1 -1
  77. package/dist/bin/repair-document-chunks.js +9 -8
  78. package/dist/bin/scan-tasks.js +19 -18
  79. package/dist/bin/setup.js +4 -3
  80. package/dist/bin/shard-migrate.js +10 -9
  81. package/dist/bin/stack-update.js +4 -4
  82. package/dist/bin/vps-health-gate.js +1 -1
  83. package/dist/{boot-generation-RPJVFAQJ.js → boot-generation-UGKTVJQW.js} +6 -5
  84. package/dist/{boot-review-sections-FOPPZTJI.js → boot-review-sections-EW5FJU3N.js} +17 -16
  85. package/dist/{bug-landed-reconciler-FN5KPBRK.js → bug-landed-reconciler-7DLU65MM.js} +8 -7
  86. package/dist/build-info.json +3 -3
  87. package/dist/build-manifest.json +1158 -1133
  88. package/dist/{capability-cards-YQWBEG7A.js → capability-cards-EC7FLCFF.js} +5 -4
  89. package/dist/{capacity-monitor-7SMEJHYG.js → capacity-monitor-2TQMIGQV.js} +19 -18
  90. package/dist/{catchup-brief-IBQ26LEB.js → catchup-brief-Q2CEZ5LV.js} +24 -23
  91. package/dist/{chunk-M6SUJLNP.js → chunk-2PNEZSFH.js} +2 -2
  92. package/dist/{chunk-NCNT2C2P.js → chunk-2S3H4TRY.js} +2 -2
  93. package/dist/{chunk-27NG2NTG.js → chunk-2UAILEAO.js} +2 -2
  94. package/dist/{chunk-RHHEYC6H.js → chunk-3PMAZKLF.js} +3 -3
  95. package/dist/{chunk-W4H2MZAS.js → chunk-3W6D3XED.js} +1 -1
  96. package/dist/{chunk-JAIZCE6W.js → chunk-43BBN2ZV.js} +3 -3
  97. package/dist/{chunk-IPUDXR67.js → chunk-4FURM6R5.js} +12 -3
  98. package/dist/{chunk-JW5NUXPN.js → chunk-5GUSZMFP.js} +14 -14
  99. package/dist/{chunk-RHJOTGEU.js → chunk-5HCHK52F.js} +1 -1
  100. package/dist/{chunk-7HLAYQRG.js → chunk-5PNYCWYF.js} +5 -5
  101. package/dist/{chunk-HUHR5CKJ.js → chunk-5X5BOCLS.js} +4 -4
  102. package/dist/{chunk-2EYVXUGA.js → chunk-6DFP2ZMF.js} +4 -4
  103. package/dist/{chunk-6HJF7IA3.js → chunk-6QVWL7ZX.js} +227 -198
  104. package/dist/{chunk-TS4LSNRI.js → chunk-745M4HPM.js} +1 -1
  105. package/dist/{chunk-HDV2V25K.js → chunk-7BMIJMFY.js} +1 -1
  106. package/dist/{chunk-Z3LGAFMG.js → chunk-7D6432GR.js} +1 -1
  107. package/dist/{chunk-6L4VIYLZ.js → chunk-7MCEYNWK.js} +15 -1
  108. package/dist/{chunk-XDOCXKHW.js → chunk-7ZEIFHRE.js} +1 -1
  109. package/dist/{chunk-ZZR2WRNW.js → chunk-AAVLHB5A.js} +4 -4
  110. package/dist/{chunk-7YX73K2R.js → chunk-ALA7WYZZ.js} +6 -1
  111. package/dist/{chunk-CJ6CS2IH.js → chunk-BHIMHRRI.js} +5 -5
  112. package/dist/{chunk-CRW63CDI.js → chunk-BSSVSBHE.js} +1 -1
  113. package/dist/chunk-CCFWKW2D.js +92 -0
  114. package/dist/{chunk-FYV2CTKP.js → chunk-CL7P4RW3.js} +1 -1
  115. package/dist/{chunk-SXUABANK.js → chunk-CRO66YJ2.js} +3 -3
  116. package/dist/{chunk-GL5ZG72X.js → chunk-CTZTOAHJ.js} +2 -2
  117. package/dist/{chunk-LSHUX7P4.js → chunk-D4RU4Y57.js} +16 -16
  118. package/dist/{chunk-JGBYZTWH.js → chunk-D6D7LCMR.js} +1 -1
  119. package/dist/{chunk-HDQAVAV6.js → chunk-D6ORFO5E.js} +2 -2
  120. package/dist/{chunk-RIKFXHLE.js → chunk-DJZ4EAZ7.js} +1 -1
  121. package/dist/{chunk-3DXAJVXE.js → chunk-DNWWDHJM.js} +6 -6
  122. package/dist/{chunk-MZNLQC6W.js → chunk-E3TNFXWQ.js} +1 -1
  123. package/dist/{chunk-6PXFF6IV.js → chunk-EVSJUMO3.js} +1 -1
  124. package/dist/{chunk-CWHTUNJX.js → chunk-EXKT3GID.js} +2 -2
  125. package/dist/{chunk-J6U4ZR77.js → chunk-FDMZOLB3.js} +2 -2
  126. package/dist/{chunk-DHLJZDWI.js → chunk-FIAMVZ5I.js} +6 -6
  127. package/dist/{chunk-O3BLL6MY.js → chunk-FNRVCDFM.js} +1 -1
  128. package/dist/{chunk-BLTXAUP6.js → chunk-G32NPOUR.js} +2 -2
  129. package/dist/{chunk-QSW5DHMZ.js → chunk-GCMKH2PM.js} +1 -1
  130. package/dist/{chunk-BIPTWAEO.js → chunk-GDUQ3UQR.js} +1 -1
  131. package/dist/{chunk-L5JFVK5T.js → chunk-GDZJL5GQ.js} +15 -10
  132. package/dist/{chunk-RYMXD2NT.js → chunk-GELNQI77.js} +1 -1
  133. package/dist/{chunk-5ZMNFSHV.js → chunk-H3MFCDKR.js} +1 -1
  134. package/dist/{chunk-657I6PUF.js → chunk-H3ORS4N7.js} +3 -3
  135. package/dist/{chunk-W3ABSZ6G.js → chunk-H7ZVQUU2.js} +2 -2
  136. package/dist/{chunk-2YGBJHC2.js → chunk-HMEXSII5.js} +3 -3
  137. package/dist/{chunk-EWDBWOCX.js → chunk-HPCISMTN.js} +1 -1
  138. package/dist/{chunk-HA6BIZ6L.js → chunk-I2IG5GKQ.js} +8 -8
  139. package/dist/{chunk-SINIRUYZ.js → chunk-I4N7F54M.js} +117 -39
  140. package/dist/{chunk-XEAZJXMZ.js → chunk-IM2KTXBB.js} +2 -2
  141. package/dist/{chunk-XC5OASHV.js → chunk-IVPVCTXX.js} +1 -1
  142. package/dist/{chunk-CFFSHBQF.js → chunk-J56UXB2X.js} +1 -1
  143. package/dist/{chunk-6J2J3VJS.js → chunk-JHVRXXEB.js} +10 -10
  144. package/dist/{chunk-SO7KTH3Q.js → chunk-JJYL2K7E.js} +1 -1
  145. package/dist/{chunk-2BOLFLAU.js → chunk-JKDYZZGD.js} +2 -2
  146. package/dist/{chunk-VS7V5HNO.js → chunk-JOOWL33C.js} +1 -1
  147. package/dist/{chunk-7KPZQ65I.js → chunk-KAJC6L7D.js} +3 -3
  148. package/dist/{chunk-KN5GAVCG.js → chunk-KBJHOC6E.js} +2 -2
  149. package/dist/{chunk-KEDZRQI3.js → chunk-KKJ3BLYL.js} +2 -2
  150. package/dist/{chunk-QJWLQXR7.js → chunk-KYQ623IB.js} +1 -1
  151. package/dist/{chunk-W7VKGB42.js → chunk-L2IJM337.js} +1 -1
  152. package/dist/{chunk-IHAXXDBH.js → chunk-LCGQGYY6.js} +3 -3
  153. package/dist/{chunk-HTFM7ZDD.js → chunk-LFIDYVYE.js} +2 -2
  154. package/dist/chunk-LP5USONU.js +125 -0
  155. package/dist/{chunk-JJZZXEAN.js → chunk-LUB5P63H.js} +2 -2
  156. package/dist/{chunk-GATAYYAF.js → chunk-MLVDB65S.js} +3 -3
  157. package/dist/{chunk-2YFMBXUU.js → chunk-MSOPRLKE.js} +4 -4
  158. package/dist/{chunk-Q6KUBP6R.js → chunk-MXY47DBC.js} +5 -5
  159. package/dist/{chunk-PDQGR5LZ.js → chunk-N7PW2MXQ.js} +1 -1
  160. package/dist/{chunk-6DMURUBY.js → chunk-NLFYDDFL.js} +4 -4
  161. package/dist/{chunk-JNULO6I5.js → chunk-NPA3GSDP.js} +3 -3
  162. package/dist/{chunk-ZJ6AMC4Y.js → chunk-NXVVJE6C.js} +7 -7
  163. package/dist/{chunk-TVWYMOZ4.js → chunk-O3HLDFKY.js} +15 -4
  164. package/dist/{chunk-PYXXL7N7.js → chunk-OEH4DGFQ.js} +1 -1
  165. package/dist/{chunk-VBYSAQJD.js → chunk-OEJZFRT4.js} +1 -1
  166. package/dist/{chunk-VQQPYI4X.js → chunk-OJMM2CBY.js} +2 -2
  167. package/dist/{chunk-X2ZHCNNB.js → chunk-OL7KB6AV.js} +5 -5
  168. package/dist/{chunk-FSXMKIDO.js → chunk-OSAIUYF5.js} +1 -1
  169. package/dist/{chunk-GZVFHFO3.js → chunk-OVN35JFJ.js} +10 -10
  170. package/dist/{chunk-4J77TCTX.js → chunk-PMGEC42V.js} +1 -1
  171. package/dist/{chunk-LBSCOP25.js → chunk-PV5OGJYV.js} +1 -1
  172. package/dist/{chunk-M6AX64J2.js → chunk-QNFR7ZKH.js} +20 -8
  173. package/dist/{chunk-DWRULKB3.js → chunk-R32D6TBB.js} +2 -2
  174. package/dist/chunk-R3ZU4F7M.js +359 -0
  175. package/dist/{chunk-3N24FV22.js → chunk-REMAJEVA.js} +1 -1
  176. package/dist/{chunk-7SHU5MOD.js → chunk-RJ7RN5GE.js} +1 -1
  177. package/dist/{chunk-5BWDUUMH.js → chunk-RMXIDLAZ.js} +3 -3
  178. package/dist/{chunk-PTF5TB6O.js → chunk-RNFYJ7EQ.js} +9 -9
  179. package/dist/{chunk-RJIH7JXM.js → chunk-RV4DRCSF.js} +4 -4
  180. package/dist/{chunk-QOFQY7BJ.js → chunk-RYJTPWKV.js} +1 -1
  181. package/dist/{telemetry-upload-6DR6AL3V.js → chunk-SBHJ6YVB.js} +53 -28
  182. package/dist/{chunk-XQ7BIVLI.js → chunk-SOKGCUCF.js} +9 -9
  183. package/dist/{chunk-K2HIXAIF.js → chunk-SWU43K5E.js} +14 -14
  184. package/dist/{chunk-BE3UETW6.js → chunk-T4X35SUY.js} +3 -3
  185. package/dist/{chunk-LLZUL7M2.js → chunk-TDPDKE4M.js} +4 -2
  186. package/dist/{chunk-TCBWHLKH.js → chunk-TH3P7D7J.js} +9 -9
  187. package/dist/{chunk-47YGEM4N.js → chunk-TRH4DPXR.js} +1 -1
  188. package/dist/{chunk-EOWJXCYC.js → chunk-TSZ3JCQB.js} +1 -1
  189. package/dist/{chunk-FPF2PJFK.js → chunk-U34HVNLK.js} +3 -3
  190. package/dist/{chunk-OHHZNNUD.js → chunk-UC45TUAV.js} +1 -1
  191. package/dist/{chunk-IC2AONBH.js → chunk-UCXX7XZS.js} +9 -9
  192. package/dist/{chunk-N7POJZJT.js → chunk-UJRBX44K.js} +13 -13
  193. package/dist/{chunk-RYYFFCJG.js → chunk-UMBKEPUP.js} +1 -1
  194. package/dist/{chunk-GHYHNHDL.js → chunk-UOLIA6N6.js} +1 -1
  195. package/dist/{chunk-VAHQOIQY.js → chunk-UOPCGIEE.js} +1 -1
  196. package/dist/{chunk-5DLZJ3MY.js → chunk-UWIL3LFL.js} +1 -1
  197. package/dist/{chunk-BG6RAOCJ.js → chunk-UYK7NOJD.js} +3 -3
  198. package/dist/{chunk-LQGLGSBY.js → chunk-UYOWEAZB.js} +2 -2
  199. package/dist/{chunk-T3AM52YT.js → chunk-V4Q5FU7M.js} +4 -4
  200. package/dist/{chunk-A5I2GYVQ.js → chunk-VPXSW6MC.js} +3 -3
  201. package/dist/{chunk-7PDZBPGW.js → chunk-WECEOYOY.js} +1 -1
  202. package/dist/{chunk-GM4UEZDE.js → chunk-WEG7URND.js} +43 -30
  203. package/dist/{chunk-JTJP4JK7.js → chunk-X537FLO2.js} +3 -3
  204. package/dist/{chunk-RMC2A6EE.js → chunk-X6UH3DQE.js} +1 -1
  205. package/dist/{chunk-353XF4LU.js → chunk-XGQCOI3X.js} +2 -2
  206. package/dist/{chunk-FS7XF7SE.js → chunk-XHJO7XFR.js} +1 -1
  207. package/dist/{chunk-3GGMHSY2.js → chunk-XLUEY3SP.js} +3 -3
  208. package/dist/{chunk-D6NZNUVH.js → chunk-YAV55Y4U.js} +1 -1
  209. package/dist/{chunk-6777GNWI.js → chunk-YBVSVB6C.js} +19 -8
  210. package/dist/{chunk-6BD6JYR2.js → chunk-YV3AVQJW.js} +3 -3
  211. package/dist/{chunk-X4FHT6ST.js → chunk-YXGSP2MH.js} +9 -9
  212. package/dist/{chunk-O6KQAJCC.js → chunk-Z46GUZSY.js} +3 -3
  213. package/dist/{chunk-FUDXITKX.js → chunk-ZDD6IQGV.js} +1 -1
  214. package/dist/{chunk-QV26G2BF.js → chunk-ZO5S6T64.js} +1 -1
  215. package/dist/{cleanup-graph-garbage-SYGPMPUM.js → cleanup-graph-garbage-CNUIX5CD.js} +10 -9
  216. package/dist/{cli-shutdown-JI7CASE4.js → cli-shutdown-5PBVKPZJ.js} +1 -1
  217. package/dist/{cloud-sync-command-ZV3P5FP6.js → cloud-sync-command-3E4HKL3N.js} +2 -2
  218. package/dist/{cloud-sync-db-init-RQIHWKV4.js → cloud-sync-db-init-ASBDBYCS.js} +1 -1
  219. package/dist/{cloud-sync-shutdown-V2N7VLD3.js → cloud-sync-shutdown-P6ZT3O6P.js} +5 -4
  220. package/dist/{co-activation-SRE6DIRX.js → co-activation-7ZJFM3YK.js} +5 -4
  221. package/dist/{co-occurrence-F5TMSEQZ.js → co-occurrence-O7ON7AP3.js} +8 -7
  222. package/dist/{consent-passphrase-MWZRHJRC.js → consent-passphrase-ITU47UWT.js} +2 -2
  223. package/dist/{conversation-entity-extractor-XMOUHGMT.js → conversation-entity-extractor-JZNP4UGE.js} +3 -3
  224. package/dist/{conversations-retention-XTBFJBUM.js → conversations-retention-HFM2K6ND.js} +33 -12
  225. package/dist/{crdt-sync-FXEKABM7.js → crdt-sync-B2E3G5YE.js} +4 -4
  226. package/dist/{crm-webhook-D6IJOPRQ.js → crm-webhook-P543266X.js} +2 -2
  227. package/dist/{cto-delegation-gate-BU3JRCYN.js → cto-delegation-gate-ASFPC6L4.js} +18 -17
  228. package/dist/{daemon-orchestration-K4NKFYXO.js → daemon-orchestration-ZPUEHXRM.js} +24 -23
  229. package/dist/{doc-graph-extractor-TVK2NGAR.js → doc-graph-extractor-IADQDUXA.js} +8 -7
  230. package/dist/{documents-MDZ4VB5X.js → documents-MZ5N44EK.js} +10 -9
  231. package/dist/{dreaming-L24PSS35.js → dreaming-OXHEGMGQ.js} +22 -21
  232. package/dist/{employee-boot-brief-GQVL3FQC.js → employee-boot-brief-PMN4STQZ.js} +26 -25
  233. package/dist/{entity-boost-OMFA5QCG.js → entity-boost-5J6OOB4P.js} +1 -1
  234. package/dist/{exe-drift-JDDG3OPT.js → exe-drift-JPD3DP7R.js} +6 -5
  235. package/dist/{exe-export-EEGIE3JP.js → exe-export-TWJ2E235.js} +11 -10
  236. package/dist/{exe-import-UJNC5Q2L.js → exe-import-JTFPCMXG.js} +11 -10
  237. package/dist/{exe-key-TYEY4W4E.js → exe-key-47FOEEFU.js} +106 -105
  238. package/dist/{exe-org-B3ICTTEV.js → exe-org-SDLU427Y.js} +40 -40
  239. package/dist/{exe-snapshot-VBFBONYN.js → exe-snapshot-G6JSOA3W.js} +25 -24
  240. package/dist/{fast-db-init-TFRTK6EH.js → fast-db-init-BWZOVVBH.js} +1 -1
  241. package/dist/{founder-context-3X4QUWKD.js → founder-context-UMNCOSKR.js} +2 -2
  242. package/dist/{founder-monitor-envelope-54UNZNY4.js → founder-monitor-envelope-I4535R5I.js} +4 -4
  243. package/dist/gateway/index.js +19 -18
  244. package/dist/{gateway-client-OUDO5GGV.js → gateway-client-YD24RN7P.js} +1 -1
  245. package/dist/{git-staleness-73YZ5PGU.js → git-staleness-B4H3EE72.js} +5 -4
  246. package/dist/{global-procedures-PYNE2BQG.js → global-procedures-TTBNXTRS.js} +7 -6
  247. package/dist/{graph-auto-extract-PGUMEEQB.js → graph-auto-extract-E4RSCUEO.js} +8 -7
  248. package/dist/{graph-query-7YA3YNKL.js → graph-query-U4WIQNFV.js} +1 -1
  249. package/dist/{graph-rag-UWOTK4AQ.js → graph-rag-WPSWFLOX.js} +3 -3
  250. package/dist/{hook-integrity-6MNEPT6W.js → hook-integrity-G6L3XFGO.js} +1 -1
  251. package/dist/{hook-prefetch-JOF6YZSR.js → hook-prefetch-5AOLNRCY.js} +18 -17
  252. package/dist/{hook-tamper-log-HTWEP37U.js → hook-tamper-log-SWQVRDDV.js} +6 -1
  253. package/dist/hooks/bug-report-worker.js +22 -21
  254. package/dist/hooks/codex-stop-task-finalizer.js +24 -23
  255. package/dist/hooks/commit-complete.js +21 -20
  256. package/dist/hooks/error-recall.js +14 -13
  257. package/dist/hooks/exe-heartbeat-hook.js +8 -7
  258. package/dist/hooks/ingest-worker.js +20 -19
  259. package/dist/hooks/ingest.js +16 -15
  260. package/dist/hooks/instructions-loaded.js +10 -9
  261. package/dist/hooks/manifest.json +20 -20
  262. package/dist/hooks/notification.js +9 -8
  263. package/dist/hooks/post-compact.js +8 -7
  264. package/dist/hooks/post-tool-combined.js +13 -13
  265. package/dist/hooks/pre-compact.js +22 -21
  266. package/dist/hooks/pre-tool-use.js +2 -2
  267. package/dist/hooks/prompt-submit.js +40 -39
  268. package/dist/hooks/session-end.js +27 -26
  269. package/dist/hooks/session-start.js +18 -18
  270. package/dist/hooks/stop.js +25 -24
  271. package/dist/hooks/subagent-stop.js +25 -24
  272. package/dist/hooks/summary-worker.js +25 -24
  273. package/dist/index.js +32 -31
  274. package/dist/{installer-34XZ7JMW.js → installer-KQPRRYWJ.js} +9 -8
  275. package/dist/{installer-356RMQ2K.js → installer-NDH3XNBJ.js} +9 -8
  276. package/dist/{installer-7TN36Z7T.js → installer-SQXH44SB.js} +9 -8
  277. package/dist/{intercom-queue-ZJ3MNULM.js → intercom-queue-NKPPTIL4.js} +17 -16
  278. package/dist/lib/backup-verify-worker.js +3 -2
  279. package/dist/lib/cloud-sync.js +18 -17
  280. package/dist/lib/consolidation.js +11 -10
  281. package/dist/lib/crypto.js +3 -3
  282. package/dist/lib/database.js +5 -4
  283. package/dist/lib/db-backup.js +12 -1
  284. package/dist/lib/db-checkpoint-worker.js +25 -0
  285. package/dist/lib/db-read-worker-client.js +155 -26
  286. package/dist/lib/db-write-worker-client.js +5 -1
  287. package/dist/lib/db-write-worker.js +9 -8
  288. package/dist/lib/db.js +5 -4
  289. package/dist/lib/device-registry.js +1 -1
  290. package/dist/lib/employee-templates.js +8 -7
  291. package/dist/lib/employees.js +5 -4
  292. package/dist/lib/exe-daemon.js +127 -106
  293. package/dist/lib/file-grep.js +14 -1
  294. package/dist/lib/hybrid-search.js +11 -10
  295. package/dist/lib/identity.js +5 -4
  296. package/dist/lib/keychain.js +1 -1
  297. package/dist/lib/license.js +2 -2
  298. package/dist/lib/messaging.js +18 -17
  299. package/dist/lib/post-tool-memory.js +18 -17
  300. package/dist/lib/registry-proxy.js +1 -1
  301. package/dist/lib/reminders.js +6 -5
  302. package/dist/lib/schedules.js +10 -9
  303. package/dist/lib/session-registry.js +7 -6
  304. package/dist/lib/session-wrappers.js +1 -1
  305. package/dist/lib/skill-learning.js +11 -10
  306. package/dist/lib/store.js +9 -8
  307. package/dist/lib/task-router.js +6 -5
  308. package/dist/lib/tasks.js +19 -18
  309. package/dist/lib/telemetry-consent.js +29 -0
  310. package/dist/lib/tmux-routing.js +17 -16
  311. package/dist/lib/tmux-status.js +5 -1
  312. package/dist/lib/token-spend.js +6 -5
  313. package/dist/lib/ws-client.js +1 -1
  314. package/dist/{license-gate-4BXUTHLB.js → license-gate-Q37UDDE5.js} +3 -3
  315. package/dist/{license-recheck-QFPUKISQ.js → license-recheck-AJ7VHKXK.js} +1 -1
  316. package/dist/{license-sync-FDEDT4AC.js → license-sync-H7EMEVUL.js} +2 -2
  317. package/dist/{maintenance-worker-OY2E4BM5.js → maintenance-worker-3FNF2GA5.js} +1 -1
  318. package/dist/mcp/register-tools.js +105 -104
  319. package/dist/mcp/server.js +107 -106
  320. package/dist/mcp/tools/complete-reminder.js +7 -6
  321. package/dist/mcp/tools/create-reminder.js +7 -6
  322. package/dist/mcp/tools/create-task.js +22 -21
  323. package/dist/mcp/tools/deactivate-behavior.js +13 -12
  324. package/dist/mcp/tools/list-reminders.js +7 -6
  325. package/dist/mcp/tools/list-tasks.js +22 -21
  326. package/dist/mcp/tools/send-message.js +21 -20
  327. package/dist/mcp/tools/update-task.js +20 -19
  328. package/dist/{mcp-http-config-GKP5QGAO.js → mcp-http-config-4355SP7A.js} +8 -7
  329. package/dist/{mcp-session-identity-JHAGRB7B.js → mcp-session-identity-JKOJLE7C.js} +17 -16
  330. package/dist/{memory-cards-O377ETAM.js → memory-cards-WTRVBRVV.js} +9 -8
  331. package/dist/{memory-graph-extractor-4KJCCUOP.js → memory-graph-extractor-4T33LWJU.js} +9 -8
  332. package/dist/{memory-maintenance-RR5UPRW3.js → memory-maintenance-JGNZK33G.js} +1 -1
  333. package/dist/{memory-poisoning-defense-Y5TTKGOP.js → memory-poisoning-defense-AHMMXW44.js} +5 -4
  334. package/dist/{memory-pressure-watchdog-NGXTI4HR.js → memory-pressure-watchdog-L3Z4VEPV.js} +18 -17
  335. package/dist/{memory-reflection-EXNHRZL7.js → memory-reflection-4775DTOT.js} +9 -8
  336. package/dist/{memory-write-repository-S4TX7WQB.js → memory-write-repository-AQ7RXJVQ.js} +5 -3
  337. package/dist/{monitor-grants-57Q4NL25.js → monitor-grants-YCKRRH65.js} +3 -3
  338. package/dist/{monitor-identity-3FQ52SYU.js → monitor-identity-RC5HSDKY.js} +2 -2
  339. package/dist/{notification-ledger-O6KQYYGK.js → notification-ledger-EMZ676N7.js} +18 -17
  340. package/dist/{notifications-6FCQCJ4P.js → notifications-UITENQFG.js} +17 -16
  341. package/dist/{orchestration-events-2Z2BMMA5.js → orchestration-events-TXMCSNWZ.js} +6 -5
  342. package/dist/{orchestrator-AGOSKPHD.js → orchestrator-WJ55ZFL5.js} +19 -18
  343. package/dist/{org-brief-session-WJHZVXXJ.js → org-brief-session-YXCBRVSI.js} +17 -16
  344. package/dist/{org-consent-policy-X43UGTHI.js → org-consent-policy-ZVT2Y22K.js} +5 -5
  345. package/dist/{org-join-M3UTBMHC.js → org-join-PRWU2OBZ.js} +11 -11
  346. package/dist/{org-key-admin-AA2DRHB2.js → org-key-admin-FTGOH7RU.js} +13 -13
  347. package/dist/{org-key-epoch-Z5UIVUHT.js → org-key-epoch-IHN3UVUM.js} +5 -5
  348. package/dist/{org-key-pin-FE6YHEZ3.js → org-key-pin-TAL5ISYT.js} +3 -3
  349. package/dist/{org-membership-3J2MIGE4.js → org-membership-FZ7DUCZX.js} +4 -4
  350. package/dist/{org-partner-config-5HATZYG4.js → org-partner-config-Z45CGHE7.js} +8 -8
  351. package/dist/{org-partner-runtime-UI35IHUC.js → org-partner-runtime-J64U2Z7X.js} +17 -16
  352. package/dist/{org-row-visibility-TRJERVYP.js → org-row-visibility-JO2Z5XVO.js} +1 -1
  353. package/dist/{pipeline-router-EKQ6D7ZA.js → pipeline-router-ARYK3UAA.js} +6 -5
  354. package/dist/{plan-limits-3BGHIHX6.js → plan-limits-BA6ZSEQ2.js} +8 -7
  355. package/dist/{pre-tool-use-impl-7BT5TJVM.js → pre-tool-use-impl-NSPKU7SW.js} +34 -33
  356. package/dist/{project-name-PGJGUEJY.js → project-name-3WEMIXD6.js} +10 -5
  357. package/dist/{projection-worker-3GEVFPAI.js → projection-worker-OD7SCQVL.js} +2 -2
  358. package/dist/{prospective-memory-GEN7CN7H.js → prospective-memory-7M5EOED6.js} +5 -4
  359. package/dist/{push-notifications-QW4BWRC7.js → push-notifications-CT452G6K.js} +18 -17
  360. package/dist/{reproject-worktree-memories-DIULBEBD.js → reproject-worktree-memories-4X4FTVPN.js} +17 -16
  361. package/dist/{reranker-LQ6OPJOI.js → reranker-CZUA64BW.js} +1 -1
  362. package/dist/{retrieval-health-XDFYFEOP.js → retrieval-health-5K3EF7WW.js} +1 -1
  363. package/dist/{review-polling-ED33YLFT.js → review-polling-5W6HLGKH.js} +18 -17
  364. package/dist/runtime/index.js +25 -24
  365. package/dist/{seat-benefit-YEUQBNCS.js → seat-benefit-SBVGAMMY.js} +2 -2
  366. package/dist/{session-events-7IJGTBVH.js → session-events-OOYSDWTW.js} +26 -19
  367. package/dist/{session-kill-telemetry-RUTEARJ3.js → session-kill-telemetry-WTL757YS.js} +18 -17
  368. package/dist/{session-scope-SSYA64L3.js → session-scope-QNS6V4QZ.js} +17 -16
  369. package/dist/{setup-wizard-XD7FZVLJ.js → setup-wizard-2SPD7JW5.js} +4 -3
  370. package/dist/{shard-manager-FH5JZRSE.js → shard-manager-YZXA6L3J.js} +3 -3
  371. package/dist/{skill-refinement-UHD4E6GV.js → skill-refinement-XAL2VK7I.js} +6 -5
  372. package/dist/{skill-retrieval-F6PAJ3I5.js → skill-retrieval-H45FGACU.js} +13 -12
  373. package/dist/{skill-usage-2MBTF7Y4.js → skill-usage-Z4PY5DYL.js} +6 -5
  374. package/dist/{stack-generate-manifest-MVJDTU4F.js → stack-generate-manifest-ZWGGIXOW.js} +4 -4
  375. package/dist/{stack-promote-BMGEY6SQ.js → stack-promote-U34DKI2R.js} +4 -4
  376. package/dist/{stack-release-64UJ6Y4W.js → stack-release-IGZDQ2EA.js} +5 -5
  377. package/dist/{stack-update-EBATTQPP.js → stack-update-3MADKNUJ.js} +3 -3
  378. package/dist/{steward-gate-EWG2BHYQ.js → steward-gate-GXHJ3LLV.js} +6 -5
  379. package/dist/{subagent-brief-injection-YZGSWUEY.js → subagent-brief-injection-CONZI6JP.js} +29 -28
  380. package/dist/{subagent-spawn-ledger-PDICC43I.js → subagent-spawn-ledger-2XSOIL35.js} +3 -1
  381. package/dist/{support-bug-actions-RU6WZ3UV.js → support-bug-actions-GHMGOVQX.js} +3 -3
  382. package/dist/{support-inbox-A3S52SPS.js → support-inbox-3EDSKPUK.js} +15 -14
  383. package/dist/{task-enforcement-LVAS55AR.js → task-enforcement-DPOVUD2H.js} +18 -17
  384. package/dist/{task-request-inbox-2TN4ZUH2.js → task-request-inbox-6CCLPLZF.js} +5 -5
  385. package/dist/{task-scope-NLKUVCP5.js → task-scope-5OTHET2J.js} +17 -16
  386. package/dist/{tasks-crud-NQDPLHNZ.js → tasks-crud-ZPUVDX7W.js} +21 -16
  387. package/dist/{tasks-notify-BDM2NEHP.js → tasks-notify-3RODHYLI.js} +18 -17
  388. package/dist/{tasks-review-3G7CAW2O.js → tasks-review-H43CSMNK.js} +17 -16
  389. package/dist/telemetry-upload-4ZYZNO5R.js +42 -0
  390. package/dist/{token-budget-KNC2WGR7.js → token-budget-QGQRMS47.js} +6 -5
  391. package/dist/{tool-telemetry-I3SEU5M5.js → tool-telemetry-HPOHW2Y2.js} +1 -1
  392. package/dist/tui/App.js +27 -26
  393. package/dist/{tui-data-KJDWP4CB.js → tui-data-3E66SZPC.js} +21 -20
  394. package/dist/{update-support-UYDYMHVR.js → update-support-6PQDY3IQ.js} +14 -13
  395. package/dist/{whatsapp-5EMPZHF5.js → whatsapp-5YLHZDFB.js} +2 -2
  396. package/dist/{wiki-acl-M7BTQJBZ.js → wiki-acl-O4EOHWXE.js} +1 -1
  397. package/dist/{work-claims-5CFMZTML.js → work-claims-XGC47NTW.js} +6 -5
  398. package/dist/{work-state-heartbeat-7IA2DZ2E.js → work-state-heartbeat-WAVGL6QG.js} +1 -1
  399. package/dist/{workflow-engine-S5JOE2YR.js → workflow-engine-E7R4STX2.js} +2 -2
  400. package/dist/{worktree-7V4ZMF3D.js → worktree-GYH7OEVR.js} +7 -6
  401. package/dist/{worktree-sweep-34MXJ7S6.js → worktree-sweep-KMZ2KPSO.js} +8 -7
  402. package/package.json +2 -1
  403. package/release-notes.json +30 -21
  404. package/stack.release.json +3 -3
  405. package/dist/chunk-PEYQ6MWO.js +0 -175
  406. /package/dist/{chunk-EULAP6L6.js → chunk-2KBPXG43.js} +0 -0
  407. /package/dist/{chunk-J635FA7T.js → chunk-2WHPS3AR.js} +0 -0
  408. /package/dist/{chunk-QDSNEGJE.js → chunk-4ZWYHHUJ.js} +0 -0
  409. /package/dist/{chunk-J4B4M5PH.js → chunk-5LKFIUH3.js} +0 -0
  410. /package/dist/{chunk-542FBM5U.js → chunk-5TOYYGBC.js} +0 -0
  411. /package/dist/{chunk-CFO47VW4.js → chunk-BYNXKQG2.js} +0 -0
  412. /package/dist/{chunk-N45FAI6D.js → chunk-EORDC4BQ.js} +0 -0
  413. /package/dist/{chunk-6D2O5SAH.js → chunk-GTGXFYYI.js} +0 -0
  414. /package/dist/{chunk-YVWXI2HM.js → chunk-H6HWBMJ3.js} +0 -0
  415. /package/dist/{chunk-FYSKQPTE.js → chunk-QD3YZKZR.js} +0 -0
  416. /package/dist/{chunk-MOBZTIJQ.js → chunk-QTWQGGSP.js} +0 -0
  417. /package/dist/{chunk-SKSXROKP.js → chunk-TMJKP6WP.js} +0 -0
  418. /package/dist/{chunk-6NRZLVK3.js → chunk-YEUGS6CI.js} +0 -0
  419. /package/dist/{core-memory-PZEO3OWH.js → core-memory-RHW5ZX36.js} +0 -0
  420. /package/dist/{memory-isolation-MFNT2ITE.js → memory-isolation-J3KHDCE7.js} +0 -0
  421. /package/dist/{oauth-server-CBGEWD6H.js → oauth-server-WAR3PJOX.js} +0 -0
  422. /package/dist/{project-boot-VESAYDIH.js → project-boot-3BTM3FJ2.js} +0 -0
@@ -11,12 +11,46 @@ import "../chunk-MLKGABMK.js";
11
11
  import { fork } from "child_process";
12
12
  import { existsSync } from "fs";
13
13
  import path from "path";
14
+ import { fileURLToPath } from "url";
14
15
  import { randomUUID } from "crypto";
15
16
  var _worker = null;
16
17
  var _workerReady = false;
17
18
  var _spawnAttempts = 0;
18
19
  var MAX_SPAWN_ATTEMPTS = 5;
19
- var QUERY_TIMEOUT_MS = 12e4;
20
+ function queryTimeoutMs() {
21
+ return Number(process.env.EXE_DB_READ_WORKER_TIMEOUT_MS) || 12e4;
22
+ }
23
+ var _restarting = false;
24
+ var _lastSpawnArgs = null;
25
+ var _readyDeadline = null;
26
+ var _retryAfterExit = false;
27
+ function respawnReadyTimeoutMs() {
28
+ return Number(process.env.EXE_DB_READ_WORKER_READY_TIMEOUT_MS) || 3e4;
29
+ }
30
+ function clearReadyDeadline() {
31
+ if (_readyDeadline) clearTimeout(_readyDeadline);
32
+ _readyDeadline = null;
33
+ }
34
+ function armReadyDeadline(child) {
35
+ clearReadyDeadline();
36
+ const ms = respawnReadyTimeoutMs();
37
+ _readyDeadline = setTimeout(() => {
38
+ _readyDeadline = null;
39
+ if (_worker !== child || _workerReady) return;
40
+ process.stderr.write(
41
+ `[exed] DB read worker respawn (pid=${child.pid}) not ready after ${ms}ms \u2014 marking it unavailable (reads use the direct path) and retrying the spawn.
42
+ `
43
+ );
44
+ _restarting = false;
45
+ rejectAllPending(`db read worker not available (respawn not ready after ${ms}ms)`);
46
+ _retryAfterExit = true;
47
+ try {
48
+ child.kill("SIGKILL");
49
+ } catch {
50
+ }
51
+ }, ms);
52
+ _readyDeadline.unref?.();
53
+ }
20
54
  var _pending = /* @__PURE__ */ new Map();
21
55
  function buildDbReadWorkerEnv(dbPath, encryptionKey, source = process.env) {
22
56
  const env = {
@@ -29,18 +63,43 @@ function buildDbReadWorkerEnv(dbPath, encryptionKey, source = process.env) {
29
63
  if (encryptionKey) env.EXE_DB_READ_WORKER_KEY = encryptionKey;
30
64
  return env;
31
65
  }
32
- function rejectAllPending(reason) {
66
+ var DbReadWorkerTimeoutError = class extends Error {
67
+ constructor(timeoutMs) {
68
+ super(`db read worker query timed out after ${timeoutMs}ms (not re-run on the daemon event loop)`);
69
+ this.name = "DbReadWorkerTimeoutError";
70
+ }
71
+ };
72
+ var DbReadWorkerRestartedError = class extends Error {
73
+ retryable = true;
74
+ constructor(detail) {
75
+ super(`db read worker restarted (${detail}); retry the read`);
76
+ this.name = "DbReadWorkerRestartedError";
77
+ }
78
+ };
79
+ function isDbReadWorkerTimeout(err) {
80
+ return err instanceof DbReadWorkerTimeoutError || err instanceof DbReadWorkerRestartedError;
81
+ }
82
+ function rejectAll(make, which = () => true) {
33
83
  for (const [id, cb] of _pending) {
84
+ if (!which(cb)) continue;
34
85
  clearTimeout(cb.timer);
35
- cb.reject(new Error(reason));
86
+ cb.reject(make());
36
87
  _pending.delete(id);
37
88
  }
38
89
  }
90
+ function rejectAllPending(reason) {
91
+ rejectAll(() => new Error(reason));
92
+ }
93
+ function resolveReadWorkerPath() {
94
+ if (process.env.EXE_DB_READ_WORKER_BIN) return process.env.EXE_DB_READ_WORKER_BIN;
95
+ return path.join(path.dirname(fileURLToPath(import.meta.url)), "db-read-worker.js");
96
+ }
39
97
  function spawnDbReadWorker(dbPath, encryptionKey) {
40
98
  if (_worker) return;
99
+ _lastSpawnArgs = { dbPath, encryptionKey };
41
100
  if (_spawnAttempts >= MAX_SPAWN_ATTEMPTS) return;
42
101
  _spawnAttempts++;
43
- const workerPath = path.join(path.dirname(new URL(import.meta.url).pathname), "db-read-worker.js");
102
+ const workerPath = resolveReadWorkerPath();
44
103
  if (!existsSync(workerPath)) {
45
104
  process.stderr.write(`[db-read-worker-client] worker not found at ${workerPath} \u2014 heavy reads will run on the event loop.
46
105
  `);
@@ -52,20 +111,31 @@ function spawnDbReadWorker(dbPath, encryptionKey) {
52
111
  _spawnAttempts = Math.max(0, _spawnAttempts - 1);
53
112
  return;
54
113
  }
114
+ let child;
55
115
  try {
56
- _worker = fork(workerPath, [], { stdio: ["ignore", "ignore", "inherit", "ipc"], env });
116
+ child = fork(workerPath, [], { stdio: ["ignore", "ignore", "inherit", "ipc"], env });
57
117
  } catch (err) {
58
118
  process.stderr.write(`[db-read-worker-client] fork failed: ${err instanceof Error ? err.message : String(err)}
59
119
  `);
60
120
  _worker = null;
61
121
  return;
62
122
  }
63
- _worker.on("message", (msg) => {
123
+ _worker = child;
124
+ if (_restarting || _retryAfterExit) armReadyDeadline(child);
125
+ _retryAfterExit = false;
126
+ child.on("message", (msg) => {
64
127
  if (msg.type === "ready") {
128
+ if (_worker !== child) return;
129
+ clearReadyDeadline();
65
130
  _workerReady = !msg.error;
66
131
  _spawnAttempts = 0;
67
- process.stderr.write(`[exed] DB read worker ${msg.error ? `failed: ${msg.error}` : `ready (pid=${_worker?.pid})`}
132
+ process.stderr.write(`[exed] DB read worker ${msg.error ? `failed: ${msg.error}` : `ready (pid=${child.pid})`}
68
133
  `);
134
+ if (_restarting) {
135
+ _restarting = false;
136
+ if (_workerReady) flushQueued();
137
+ else rejectAll(() => new Error("db read worker not available (restart failed)"));
138
+ }
69
139
  return;
70
140
  }
71
141
  if (!msg.id) return;
@@ -77,22 +147,41 @@ function spawnDbReadWorker(dbPath, encryptionKey) {
77
147
  else if (msg.db) cb.resolve(msg.db);
78
148
  else cb.reject(new Error("invalid read-worker response"));
79
149
  });
80
- _worker.on("error", (err) => {
150
+ child.on("error", (err) => {
81
151
  process.stderr.write(`[exed] DB read worker error: ${err.message}
82
152
  `);
83
153
  _workerReady = false;
84
- rejectAllPending("read worker crashed");
154
+ if (!_restarting) rejectAllPending("read worker crashed");
85
155
  });
86
- _worker.on("exit", (code, signal) => {
156
+ child.on("exit", (code, signal) => {
87
157
  process.stderr.write(`[exed] DB read worker exited (code=${code}, signal=${signal ?? "none"}).
88
158
  `);
89
- _workerReady = false;
159
+ if (_worker !== child) return;
160
+ clearReadyDeadline();
90
161
  _worker = null;
91
- rejectAllPending("read worker exited");
162
+ _workerReady = false;
163
+ if (_retryAfterExit) {
164
+ if (_lastSpawnArgs) spawnDbReadWorker(_lastSpawnArgs.dbPath, _lastSpawnArgs.encryptionKey);
165
+ _retryAfterExit = false;
166
+ return;
167
+ }
168
+ if (!_restarting) {
169
+ rejectAllPending("read worker exited");
170
+ return;
171
+ }
172
+ rejectAll(
173
+ () => new DbReadWorkerRestartedError("killed after a query exceeded its timeout"),
174
+ (p) => p.sent
175
+ );
176
+ if (_lastSpawnArgs) spawnDbReadWorker(_lastSpawnArgs.dbPath, _lastSpawnArgs.encryptionKey);
177
+ if (!_worker) {
178
+ _restarting = false;
179
+ rejectAllPending("db read worker not available (respawn failed)");
180
+ }
92
181
  });
93
182
  }
94
183
  function isDbReadWorkerReady() {
95
- return _worker !== null && _workerReady;
184
+ return _worker !== null && (_workerReady || _restarting);
96
185
  }
97
186
  async function runReadQueryInWorker(sql, args = []) {
98
187
  return deserializeResultSet(
@@ -100,26 +189,62 @@ async function runReadQueryInWorker(sql, args = []) {
100
189
  );
101
190
  }
102
191
  function runReadQueryInWorkerSerialized(sql, args = []) {
103
- if (!_worker || !_workerReady) {
192
+ if (!_worker || !_workerReady && !_restarting) {
104
193
  return Promise.reject(new Error("db read worker not available"));
105
194
  }
106
195
  const id = randomUUID();
196
+ const timeoutMs = queryTimeoutMs();
107
197
  return new Promise((resolve, reject) => {
108
- const timer = setTimeout(() => {
109
- _pending.delete(id);
110
- reject(new Error("db read worker query timed out"));
111
- }, QUERY_TIMEOUT_MS);
112
- _pending.set(id, { resolve, reject, timer });
113
- try {
114
- _worker.send({ id, type: "query", sql, args });
115
- } catch (err) {
116
- _pending.delete(id);
117
- clearTimeout(timer);
118
- reject(err instanceof Error ? err : new Error(String(err)));
119
- }
198
+ const timer = setTimeout(() => onQueryTimeout(id, timeoutMs), timeoutMs);
199
+ const entry = { resolve, reject, timer, message: { id, type: "query", sql, args }, sent: false };
200
+ _pending.set(id, entry);
201
+ if (!_restarting) sendPending(id, entry);
120
202
  });
121
203
  }
204
+ function sendPending(id, entry) {
205
+ try {
206
+ _worker.send(entry.message);
207
+ entry.sent = true;
208
+ } catch (err) {
209
+ _pending.delete(id);
210
+ clearTimeout(entry.timer);
211
+ entry.reject(err instanceof Error ? err : new Error(String(err)));
212
+ }
213
+ }
214
+ function flushQueued() {
215
+ for (const [id, entry] of _pending) {
216
+ if (!entry.sent) sendPending(id, entry);
217
+ }
218
+ }
219
+ function onQueryTimeout(id, timeoutMs) {
220
+ const entry = _pending.get(id);
221
+ if (!entry) return;
222
+ _pending.delete(id);
223
+ if (!entry.sent) {
224
+ entry.reject(new DbReadWorkerRestartedError(`still restarting after ${timeoutMs}ms`));
225
+ return;
226
+ }
227
+ entry.reject(new DbReadWorkerTimeoutError(timeoutMs));
228
+ const worker = _worker;
229
+ if (!worker || _restarting) return;
230
+ process.stderr.write(
231
+ `[exed] DB read worker query ${id.slice(0, 8)} exceeded ${timeoutMs}ms \u2014 killing the read worker and respawning it.
232
+ `
233
+ );
234
+ _restarting = true;
235
+ _workerReady = false;
236
+ try {
237
+ worker.kill("SIGKILL");
238
+ } catch {
239
+ }
240
+ }
241
+ function _getDbReadWorkerForTests() {
242
+ return _worker;
243
+ }
122
244
  function disposeDbReadWorker() {
245
+ _restarting = false;
246
+ _retryAfterExit = false;
247
+ clearReadyDeadline();
123
248
  rejectAllPending("read worker disposed");
124
249
  if (_worker) {
125
250
  try {
@@ -131,9 +256,13 @@ function disposeDbReadWorker() {
131
256
  _workerReady = false;
132
257
  }
133
258
  export {
259
+ DbReadWorkerRestartedError,
260
+ DbReadWorkerTimeoutError,
261
+ _getDbReadWorkerForTests,
134
262
  buildDbReadWorkerEnv,
135
263
  disposeDbReadWorker,
136
264
  isDbReadWorkerReady,
265
+ isDbReadWorkerTimeout,
137
266
  runReadQueryInWorker,
138
267
  runReadQueryInWorkerSerialized,
139
268
  spawnDbReadWorker
@@ -4,12 +4,14 @@ import {
4
4
  disposeDbWriteWorker,
5
5
  isDbWriteWorkerReady,
6
6
  isWriteWorkerEnabled,
7
+ memoryWriteBehindSweepBoundMs,
7
8
  requestMaintenanceWrite,
9
+ resolveDbWriteWorkerPath,
8
10
  spawnDbWriteWorker,
9
11
  sweepConversationsRetentionInWorker,
10
12
  sweepSessionEventsRetentionInWorker,
11
13
  writeMemoryInWorker
12
- } from "../chunk-PEYQ6MWO.js";
14
+ } from "../chunk-R3ZU4F7M.js";
13
15
  import "../chunk-YYB5PMTK.js";
14
16
  import "../chunk-MLKGABMK.js";
15
17
  export {
@@ -18,7 +20,9 @@ export {
18
20
  disposeDbWriteWorker,
19
21
  isDbWriteWorkerReady,
20
22
  isWriteWorkerEnabled,
23
+ memoryWriteBehindSweepBoundMs,
21
24
  requestMaintenanceWrite,
25
+ resolveDbWriteWorkerPath,
22
26
  spawnDbWriteWorker,
23
27
  sweepConversationsRetentionInWorker,
24
28
  sweepSessionEventsRetentionInWorker,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  insertOntologyForMemory
3
- } from "../chunk-YVWXI2HM.js";
3
+ } from "../chunk-H6HWBMJ3.js";
4
4
  import {
5
5
  persistMemoryBatch
6
- } from "../chunk-6777GNWI.js";
6
+ } from "../chunk-YBVSVB6C.js";
7
7
  import "../chunk-7FE43JRU.js";
8
8
  import {
9
9
  isPostgresBackendEnabled
@@ -180,9 +180,9 @@ async function handleSessionEventsRetention(msg) {
180
180
  return;
181
181
  }
182
182
  try {
183
- const { sweepExpiredSessionEvents } = await import("../session-events-7IJGTBVH.js");
184
- const deleted = await sweepExpiredSessionEvents(_client, msg.retentionDays);
185
- send({ id: msg.id, deleted });
183
+ const { sweepExpiredSessionEventsBatches } = await import("../session-events-OOYSDWTW.js");
184
+ const { deleted, drained } = await sweepExpiredSessionEventsBatches(_client, msg.retentionDays, msg.maxBatches);
185
+ send({ id: msg.id, deleted, drained });
186
186
  } catch (err) {
187
187
  send({ id: msg.id, error: err instanceof Error ? err.message : String(err) });
188
188
  }
@@ -194,13 +194,14 @@ async function handleConversationsRetention(msg) {
194
194
  return;
195
195
  }
196
196
  try {
197
- const { sweepExpiredConversations, parseConversationsRetentionMode } = await import("../conversations-retention-XTBFJBUM.js");
197
+ const { sweepExpiredConversations, parseConversationsRetentionMode } = await import("../conversations-retention-HFM2K6ND.js");
198
198
  const res = await sweepExpiredConversations(
199
199
  _client,
200
200
  msg.retentionDays,
201
- parseConversationsRetentionMode(msg.retentionMode)
201
+ parseConversationsRetentionMode(msg.retentionMode),
202
+ { maxBatches: msg.maxBatches }
202
203
  );
203
- send({ id: msg.id, deleted: res.removed, archived: res.archived, purged: res.purged, mode: res.mode });
204
+ send({ id: msg.id, deleted: res.removed, archived: res.archived, purged: res.purged, mode: res.mode, drained: res.drained });
204
205
  } catch (err) {
205
206
  send({ id: msg.id, error: err instanceof Error ? err.message : String(err) });
206
207
  }
package/dist/lib/db.js CHANGED
@@ -44,13 +44,14 @@ import {
44
44
  sweepExpiredSoftDeletedMemories,
45
45
  tryGetRawClient,
46
46
  verifyAndCleanStaleDbLock
47
- } from "../chunk-L5JFVK5T.js";
47
+ } from "../chunk-GDZJL5GQ.js";
48
48
  import "../chunk-BBMTVAE3.js";
49
49
  import "../chunk-TKDITWDN.js";
50
- import "../chunk-SINIRUYZ.js";
51
- import "../chunk-6777GNWI.js";
52
- import "../chunk-7FE43JRU.js";
53
50
  import "../chunk-5YEUPUV4.js";
51
+ import "../chunk-I4N7F54M.js";
52
+ import "../chunk-CCFWKW2D.js";
53
+ import "../chunk-YBVSVB6C.js";
54
+ import "../chunk-7FE43JRU.js";
54
55
  import "../chunk-YYB5PMTK.js";
55
56
  import "../chunk-WAAGVFFN.js";
56
57
  import "../chunk-QH5ZQ5SJ.js";
@@ -3,7 +3,7 @@ import {
3
3
  getDeviceInfo,
4
4
  resolveTargetDevice,
5
5
  setFriendlyName
6
- } from "../chunk-6D2O5SAH.js";
6
+ } from "../chunk-GTGXFYYI.js";
7
7
  import "../chunk-MMS2HBRT.js";
8
8
  import "../chunk-RH4AH3YB.js";
9
9
  import "../chunk-HSGBZSCA.js";
@@ -11,17 +11,18 @@ import {
11
11
  getTemplateByRole,
12
12
  personalizePrompt,
13
13
  renderClientCOOTemplate
14
- } from "../chunk-TS4LSNRI.js";
15
- import "../chunk-HDQAVAV6.js";
14
+ } from "../chunk-745M4HPM.js";
15
+ import "../chunk-D6ORFO5E.js";
16
16
  import "../chunk-4CN3EE6U.js";
17
- import "../chunk-N45FAI6D.js";
18
- import "../chunk-L5JFVK5T.js";
17
+ import "../chunk-EORDC4BQ.js";
18
+ import "../chunk-GDZJL5GQ.js";
19
19
  import "../chunk-BBMTVAE3.js";
20
20
  import "../chunk-TKDITWDN.js";
21
- import "../chunk-SINIRUYZ.js";
22
- import "../chunk-6777GNWI.js";
23
- import "../chunk-7FE43JRU.js";
24
21
  import "../chunk-5YEUPUV4.js";
22
+ import "../chunk-I4N7F54M.js";
23
+ import "../chunk-CCFWKW2D.js";
24
+ import "../chunk-YBVSVB6C.js";
25
+ import "../chunk-7FE43JRU.js";
25
26
  import "../chunk-YYB5PMTK.js";
26
27
  import "../chunk-WAAGVFFN.js";
27
28
  import "../chunk-QH5ZQ5SJ.js";
@@ -31,13 +31,14 @@ import {
31
31
  saveEmployees,
32
32
  shouldAutoInstance,
33
33
  validateEmployeeName
34
- } from "../chunk-L5JFVK5T.js";
34
+ } from "../chunk-GDZJL5GQ.js";
35
35
  import "../chunk-BBMTVAE3.js";
36
36
  import "../chunk-TKDITWDN.js";
37
- import "../chunk-SINIRUYZ.js";
38
- import "../chunk-6777GNWI.js";
39
- import "../chunk-7FE43JRU.js";
40
37
  import "../chunk-5YEUPUV4.js";
38
+ import "../chunk-I4N7F54M.js";
39
+ import "../chunk-CCFWKW2D.js";
40
+ import "../chunk-YBVSVB6C.js";
41
+ import "../chunk-7FE43JRU.js";
41
42
  import "../chunk-YYB5PMTK.js";
42
43
  import "../chunk-WAAGVFFN.js";
43
44
  import "../chunk-QH5ZQ5SJ.js";