@askexenow/exe-os 0.9.340 → 0.9.342

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 (417) hide show
  1. package/README.md +159 -196
  2. package/deploy/compose/.env.customer.example +1 -0
  3. package/deploy/compose/.env.example +1 -0
  4. package/deploy/compose/docker-compose.yml +13 -4
  5. package/deploy/compose/generate-env.ts +4 -0
  6. package/dist/{active-agent-EC6M7KTX.js → active-agent-PVGE57FY.js} +5 -5
  7. package/dist/{active-agent-WHIUCHLA.js → active-agent-TNIO6IY3.js} +5 -5
  8. package/dist/{agentic-ontology-RNSXGXW4.js → agentic-ontology-3FXYMHKW.js} +1 -1
  9. package/dist/{backfill-gate-J7UXFNXU.js → backfill-gate-65LSYVE5.js} +3 -3
  10. package/dist/{backfill-metadata-MFY6BHKE.js → backfill-metadata-ZSMZC45J.js} +8 -8
  11. package/dist/{background-jobs-STURKDCS.js → background-jobs-EXR5RVGG.js} +3 -3
  12. package/dist/backup-verify-3Y2FHGZU.js +425 -0
  13. package/dist/{behaviors-HLZUJSMP.js → behaviors-KYRB3NGJ.js} +9 -9
  14. package/dist/bin/age-ontology-load.js +3 -3
  15. package/dist/bin/agentic-ontology-backfill.js +10 -10
  16. package/dist/bin/agentic-reflection-backfill.js +11 -11
  17. package/dist/bin/agentic-semantic-label.js +10 -10
  18. package/dist/bin/backfill-conversations.js +10 -10
  19. package/dist/bin/backfill-responses.js +10 -10
  20. package/dist/bin/backfill-vectors.js +14 -14
  21. package/dist/bin/bulk-sync-postgres.js +19 -19
  22. package/dist/bin/cc-doctor.js +10 -8
  23. package/dist/bin/cleanup-stale-review-tasks.js +26 -24
  24. package/dist/bin/cli.js +111 -25
  25. package/dist/bin/customer-readiness.js +1 -1
  26. package/dist/bin/deferred-daemon-restart.js +97 -90
  27. package/dist/bin/exe-agent-config.js +9 -8
  28. package/dist/bin/exe-agent.js +20 -20
  29. package/dist/bin/exe-assign.js +12 -12
  30. package/dist/bin/exe-boot.js +201 -68
  31. package/dist/bin/exe-call.js +7 -7
  32. package/dist/bin/exe-cloud.js +20 -20
  33. package/dist/bin/exe-config-dump.js +9 -8
  34. package/dist/bin/exe-dispatch.js +26 -24
  35. package/dist/bin/exe-doctor.js +10 -6
  36. package/dist/bin/exe-export-behaviors.js +11 -11
  37. package/dist/bin/exe-forget.js +12 -10
  38. package/dist/bin/exe-gateway.js +15 -10
  39. package/dist/bin/exe-grant.js +5 -5
  40. package/dist/bin/exe-healthcheck.js +14 -8
  41. package/dist/bin/exe-heartbeat.js +29 -28
  42. package/dist/bin/exe-kill.js +31 -29
  43. package/dist/bin/exe-launch-agent.js +129 -68
  44. package/dist/bin/exe-memory-reads.js +257 -0
  45. package/dist/bin/exe-new-employee.js +12 -11
  46. package/dist/bin/exe-pending-messages.js +27 -25
  47. package/dist/bin/exe-pending-notifications.js +26 -24
  48. package/dist/bin/exe-pending-reviews.js +26 -24
  49. package/dist/bin/exe-rename.js +7 -7
  50. package/dist/bin/exe-review.js +30 -28
  51. package/dist/bin/exe-search.js +11 -9
  52. package/dist/bin/exe-session-cleanup.js +116 -86
  53. package/dist/bin/exe-settings.js +24 -23
  54. package/dist/bin/exe-start-codex.js +163 -41
  55. package/dist/bin/exe-start-opencode.js +15 -15
  56. package/dist/bin/exe-status.js +27 -25
  57. package/dist/bin/exe-support.js +5 -5
  58. package/dist/bin/exe-team.js +5 -5
  59. package/dist/bin/exe-timers.js +32 -213
  60. package/dist/bin/exe-watchdog.js +6 -5
  61. package/dist/bin/git-sweep.js +27 -25
  62. package/dist/bin/graph-backfill.js +9 -9
  63. package/dist/bin/graph-export.js +9 -9
  64. package/dist/bin/import-history.js +11 -11
  65. package/dist/bin/install.js +102 -95
  66. package/dist/bin/intercom-check.js +4 -4
  67. package/dist/bin/mcp-sessions.js +2 -2
  68. package/dist/bin/orchestration-metrics.js +6 -6
  69. package/dist/bin/postgres-agentic-reflection-backfill.js +5 -5
  70. package/dist/bin/postgres-agentic-semantic-backfill.js +7 -7
  71. package/dist/bin/pre-publish.js +5 -3
  72. package/dist/bin/reconcile-backlog.js +484 -0
  73. package/dist/bin/registry-proxy.js +1 -1
  74. package/dist/bin/scan-tasks.js +26 -24
  75. package/dist/bin/setup.js +6 -5
  76. package/dist/bin/shard-migrate.js +9 -9
  77. package/dist/bin/stack-update.js +15 -9
  78. package/dist/bin/update.js +1 -1
  79. package/dist/bin/vps-health-gate.js +1 -1
  80. package/dist/boot-generation-BL2ISK4U.js +22 -0
  81. package/dist/boot-review-sections-DBMQJT5N.js +107 -0
  82. package/dist/branch-hygiene-TZWK6QCF.js +224 -0
  83. package/dist/{branding-JTEOF4ZV.js → branding-DVXBGVDH.js} +3 -3
  84. package/dist/{browser-session-store-CXQMOSEC.js → browser-session-store-B2NR3LIX.js} +2 -1
  85. package/dist/{capability-cards-YOKVMMOL.js → capability-cards-DN5UIKVN.js} +4 -4
  86. package/dist/{capacity-monitor-S54IOWRL.js → capacity-monitor-ZG5GGFR2.js} +27 -25
  87. package/dist/{catchup-brief-DRRQCMKA.js → catchup-brief-D6HH6DWS.js} +32 -29
  88. package/dist/{support-outbox-MGUVVGHT.js → chunk-25X4JD2V.js} +28 -12
  89. package/dist/{chunk-IYB2NIW3.js → chunk-2KZNGDSW.js} +1 -1
  90. package/dist/{chunk-FUIIVSW6.js → chunk-2WAVZ5UJ.js} +1 -1
  91. package/dist/{chunk-K5WFKEXQ.js → chunk-2ZYO73KO.js} +4 -3
  92. package/dist/{chunk-CLAYNAXC.js → chunk-3EUMUSLE.js} +1 -1
  93. package/dist/{chunk-BVV6NHKQ.js → chunk-3SW4OEHB.js} +5 -5
  94. package/dist/{task-enforcement-VI7L43DC.js → chunk-4CMVFVFC.js} +173 -69
  95. package/dist/{chunk-BU2QQWBQ.js → chunk-4J4PMPXZ.js} +3 -2
  96. package/dist/{chunk-JD5S5AAV.js → chunk-4N2NRGCM.js} +2 -2
  97. package/dist/chunk-4QCFFW2H.js +378 -0
  98. package/dist/{chunk-7EA7LYW4.js → chunk-4VSV5P4D.js} +4 -4
  99. package/dist/{chunk-52KNOQMK.js → chunk-4ZCD2UWW.js} +39 -10
  100. package/dist/{chunk-DZ6OQM67.js → chunk-5ERDIOV3.js} +2 -2
  101. package/dist/chunk-5H47VHB7.js +30 -0
  102. package/dist/{chunk-UCQITDLM.js → chunk-5TY4FPH6.js} +1 -1
  103. package/dist/{chunk-R44Z32O2.js → chunk-6CH3TPHR.js} +2 -2
  104. package/dist/{chunk-WYLV4S6A.js → chunk-6WQ3NNCE.js} +3 -3
  105. package/dist/{chunk-HHIBOU3P.js → chunk-6XWTQUO4.js} +1 -1
  106. package/dist/chunk-76CJBM36.js +88 -0
  107. package/dist/{chunk-H2L4PHGH.js → chunk-7CTRGNLW.js} +2 -2
  108. package/dist/{chunk-XUKPALWT.js → chunk-7V4JADD6.js} +2 -2
  109. package/dist/{chunk-RMOBQ6A5.js → chunk-AD2VCHSS.js} +1 -1
  110. package/dist/{chunk-QXSBB26A.js → chunk-AJYCFKJR.js} +1 -1
  111. package/dist/chunk-AM7S2TY6.js +54 -0
  112. package/dist/{chunk-HEPR6QTL.js → chunk-AOHXREB7.js} +334 -66
  113. package/dist/{chunk-FNZR3B7U.js → chunk-ASAFVDVR.js} +1 -1
  114. package/dist/{chunk-TALWBVZE.js → chunk-BUCXNV32.js} +1 -1
  115. package/dist/{chunk-SHIICYJW.js → chunk-BYTDMAGB.js} +4 -2
  116. package/dist/{chunk-32SXNM3G.js → chunk-C5QAPURN.js} +1 -1
  117. package/dist/{chunk-XCTGRD4S.js → chunk-CE7F6RHG.js} +587 -77
  118. package/dist/{chunk-7WPOJDTA.js → chunk-CNVBKDEY.js} +21 -15
  119. package/dist/{chunk-KPIN44GZ.js → chunk-CWXVH7WV.js} +1 -1
  120. package/dist/chunk-D74XYSA3.js +621 -0
  121. package/dist/{chunk-A47MXY2I.js → chunk-EQHQF5IM.js} +50 -32
  122. package/dist/{chunk-AOO77BDE.js → chunk-EUS4QUKP.js} +1 -1
  123. package/dist/{chunk-RLRT2BVM.js → chunk-EV46QTD3.js} +1 -1
  124. package/dist/{chunk-PAEXYFMY.js → chunk-F27XXN6C.js} +1 -1
  125. package/dist/{chunk-XQNNB5GY.js → chunk-F55P3H4S.js} +37 -2
  126. package/dist/{chunk-MWZFF3Q7.js → chunk-F5O7V7UK.js} +1 -1
  127. package/dist/{chunk-LMZISHSJ.js → chunk-FPFPLPUY.js} +6 -6
  128. package/dist/{chunk-7TS64TBG.js → chunk-G4RGKBCA.js} +8 -3
  129. package/dist/{chunk-4IYSBPX3.js → chunk-G5T6KDG4.js} +1 -1
  130. package/dist/{chunk-7WDXEKUL.js → chunk-GBTTBXAF.js} +4 -4
  131. package/dist/{chunk-6MRWJMI5.js → chunk-GDIJE6D7.js} +1 -1
  132. package/dist/{chunk-AVKXCSBI.js → chunk-GG5NDQNN.js} +2 -2
  133. package/dist/{chunk-I3XKO3KQ.js → chunk-GJ26DULE.js} +2 -2
  134. package/dist/chunk-GL57PO3K.js +104 -0
  135. package/dist/chunk-GWDSB25T.js +6 -0
  136. package/dist/{chunk-F55JF43M.js → chunk-H6BV5TKD.js} +39 -24
  137. package/dist/{chunk-HCJCW7X4.js → chunk-H7I47RS5.js} +34 -1
  138. package/dist/{chunk-65SVQELL.js → chunk-HA5R6USD.js} +31 -5
  139. package/dist/{chunk-VJHUVFIW.js → chunk-HAF2DJYV.js} +3 -3
  140. package/dist/chunk-HJ447YER.js +224 -0
  141. package/dist/chunk-HV4KESRY.js +395 -0
  142. package/dist/{chunk-B76TSEP3.js → chunk-I26FWCSP.js} +216 -9
  143. package/dist/{chunk-X2FHTDIU.js → chunk-IBYL4DHM.js} +1 -1
  144. package/dist/{chunk-JCBKARSK.js → chunk-IOEUAQWP.js} +1 -1
  145. package/dist/{chunk-MW2GJJ53.js → chunk-JGIPOUIK.js} +3 -3
  146. package/dist/{chunk-2233TQCA.js → chunk-JLZ4RYSD.js} +2 -2
  147. package/dist/{chunk-Q7L6G6KV.js → chunk-JMYHW3AL.js} +2 -2
  148. package/dist/{chunk-OJTJYEMX.js → chunk-JPUZPAAF.js} +4 -4
  149. package/dist/{chunk-XWHE4LZK.js → chunk-JTBIS4R5.js} +21 -2
  150. package/dist/{chunk-5Z5NATNS.js → chunk-K7KFGDWF.js} +1 -1
  151. package/dist/{chunk-UIV2WPBT.js → chunk-KGWRTRKC.js} +2 -2
  152. package/dist/{chunk-KTPG4XKI.js → chunk-KP3U5QGJ.js} +1 -1
  153. package/dist/{chunk-TLYAEISW.js → chunk-KW2SD2FL.js} +2 -2
  154. package/dist/{chunk-X7H3HMFH.js → chunk-KWZMQACA.js} +11 -7
  155. package/dist/{chunk-OFX5B2S7.js → chunk-L2R3LN2P.js} +1 -1
  156. package/dist/{chunk-T4KZ2Z2N.js → chunk-L4A5DL6Z.js} +3 -3
  157. package/dist/{chunk-X425OEYF.js → chunk-LU2FALL6.js} +3 -3
  158. package/dist/{chunk-6M36JFFD.js → chunk-MKYFAKDW.js} +4 -4
  159. package/dist/{chunk-I5RLNOFK.js → chunk-MOPUCPXK.js} +12 -4
  160. package/dist/{chunk-ZIVEA3NB.js → chunk-MR6LHP4F.js} +1 -1
  161. package/dist/chunk-MVYB76QG.js +341 -0
  162. package/dist/{chunk-2SG2UGCH.js → chunk-MZM6EJCU.js} +4 -4
  163. package/dist/{chunk-ZREGOV2Q.js → chunk-N7QJKQMX.js} +258 -14
  164. package/dist/{chunk-QLFRCA6I.js → chunk-NBZL5CGA.js} +93 -12
  165. package/dist/{chunk-QFPTDSY2.js → chunk-NN2B2QKU.js} +1 -1
  166. package/dist/chunk-NX5INHHG.js +40 -0
  167. package/dist/{chunk-B75BOKEI.js → chunk-NXUSDL37.js} +2 -2
  168. package/dist/{chunk-TPHCZDE3.js → chunk-O5V57XYE.js} +1 -1
  169. package/dist/chunk-O7LWR36Z.js +269 -0
  170. package/dist/{chunk-ATOU6CYR.js → chunk-OLMQ4UOF.js} +57 -11
  171. package/dist/{chunk-6HBURYON.js → chunk-OTF44GXL.js} +4 -4
  172. package/dist/{chunk-DILD54TU.js → chunk-OZEBAGKR.js} +277 -137
  173. package/dist/{chunk-DADMPMYX.js → chunk-P5HIWY2E.js} +1 -1
  174. package/dist/{chunk-EIF2LQHZ.js → chunk-PDWS3E22.js} +55 -4
  175. package/dist/{chunk-KTY7I7UH.js → chunk-PPCDBE6Z.js} +1 -1
  176. package/dist/{chunk-XACL67CS.js → chunk-PQIDGXSG.js} +13 -4
  177. package/dist/chunk-PWUFMX75.js +186 -0
  178. package/dist/{chunk-UPWE5NOG.js → chunk-QDGZJ653.js} +3 -3
  179. package/dist/{chunk-MQRFKSLI.js → chunk-QOO5RW3K.js} +6 -5
  180. package/dist/{chunk-KCC5A7YL.js → chunk-QQ4E2RYW.js} +95 -18
  181. package/dist/{chunk-BPC5LZ6Y.js → chunk-QRYVCDWS.js} +2 -2
  182. package/dist/{chunk-Z42MXYWW.js → chunk-QWVXN224.js} +110 -28
  183. package/dist/{chunk-542EWGY3.js → chunk-QYZJHTNE.js} +26 -27
  184. package/dist/{chunk-I7Z6KTGF.js → chunk-R2NN3JKH.js} +43 -6
  185. package/dist/{chunk-3OBWSCJN.js → chunk-RACAOE2Z.js} +14 -14
  186. package/dist/{chunk-5RACW3LX.js → chunk-RAXVPNMR.js} +1 -1
  187. package/dist/{chunk-2HZY3ECT.js → chunk-RHWZUUS4.js} +6 -6
  188. package/dist/{chunk-RNAYCUNM.js → chunk-S3THSOWV.js} +1 -1
  189. package/dist/{chunk-W7DHFGCB.js → chunk-S7QUM2UK.js} +2 -2
  190. package/dist/{chunk-SSTLTIF3.js → chunk-SKGMF2SO.js} +25 -2
  191. package/dist/{chunk-GN45PBWI.js → chunk-SQKXKV2Y.js} +2 -2
  192. package/dist/{chunk-QZLIZAS7.js → chunk-TLT7NZCW.js} +4 -4
  193. package/dist/chunk-TTCUG2CF.js +91 -0
  194. package/dist/chunk-UEA3LXOB.js +40 -0
  195. package/dist/{chunk-DRCRZIIJ.js → chunk-UNXQBELK.js} +1 -1
  196. package/dist/{chunk-PLRIJALF.js → chunk-UP75Z5X7.js} +921 -176
  197. package/dist/{chunk-TNJRWUCE.js → chunk-USSB56WK.js} +1 -1
  198. package/dist/{chunk-KMBEL7VB.js → chunk-UUEKJDK6.js} +90 -10
  199. package/dist/{chunk-XJI7Z6LZ.js → chunk-UUQBZPJJ.js} +1 -1
  200. package/dist/{chunk-RRWDYOQS.js → chunk-V3EEVY4L.js} +1 -1
  201. package/dist/{chunk-N5I7RL3I.js → chunk-VPZHJCKW.js} +2 -2
  202. package/dist/chunk-VRAQTFD6.js +265 -0
  203. package/dist/{chunk-H37HHX3E.js → chunk-VSRPS3J7.js} +14 -14
  204. package/dist/{chunk-5ZNY7IZI.js → chunk-WMESXBJM.js} +37 -3
  205. package/dist/{chunk-54QCG45Y.js → chunk-WOYADZF5.js} +56 -5
  206. package/dist/{chunk-7Y5UDEVM.js → chunk-WZHZCDDO.js} +6 -5
  207. package/dist/{chunk-3NGZ4PL7.js → chunk-X2Q5NLUL.js} +11 -2
  208. package/dist/{chunk-YE7NH53A.js → chunk-X33NYQYJ.js} +2 -2
  209. package/dist/{chunk-UXBD22CD.js → chunk-XHK3FS3W.js} +3 -2
  210. package/dist/{chunk-3QDSCJ3F.js → chunk-XZXBB3TN.js} +2 -2
  211. package/dist/{chunk-JSKBHUR7.js → chunk-YCANDMI2.js} +2 -2
  212. package/dist/{chunk-JBSCL2XT.js → chunk-YLXTKI6M.js} +1 -1
  213. package/dist/{chunk-G7WO77Z2.js → chunk-YTCFACP4.js} +812 -896
  214. package/dist/{chunk-LTVCRHHD.js → chunk-Z6RSN7KS.js} +7 -6
  215. package/dist/{cleanup-graph-garbage-KUABW6LS.js → cleanup-graph-garbage-XWUFAMFO.js} +6 -6
  216. package/dist/{co-activation-XMPHKGHR.js → co-activation-ZCHPLLP6.js} +4 -4
  217. package/dist/{co-occurrence-SHKSJ6CV.js → co-occurrence-KG3LKALN.js} +4 -4
  218. package/dist/{code-context-index-EXXDY3QZ.js → code-context-index-WSOJQ72R.js} +5 -5
  219. package/dist/{content-extractor-RHITF2KM.js → content-extractor-NXYNEF5K.js} +2 -2
  220. package/dist/{conversation-wiki-populator-WU4HEQ7C.js → conversation-wiki-populator-WQN3IUU6.js} +1 -1
  221. package/dist/{crdt-sync-UJELKSNX.js → crdt-sync-4PFGPZXV.js} +8 -1
  222. package/dist/{crm-webhook-HHNBS7LY.js → crm-webhook-II7Z45Q6.js} +2 -2
  223. package/dist/cto-delegation-gate-JWWOJPNC.js +669 -0
  224. package/dist/{daemon-auth-7IFSV5FG.js → daemon-auth-3FEAHFWC.js} +5 -3
  225. package/dist/{daemon-orchestration-7QB6QOXT.js → daemon-orchestration-FX4XZDR5.js} +46 -27
  226. package/dist/{daemon-ready-5XI5BIJD.js → daemon-ready-4JTSFKAY.js} +1 -1
  227. package/dist/{daemon-ready-signal-E7VMIQ6I.js → daemon-ready-signal-LPAZWQOV.js} +5 -1
  228. package/dist/daemon-restart-circuit-breaker-PEGEIP6H.js +35 -0
  229. package/dist/daemon-timer-report-NM44WQRH.js +25 -0
  230. package/dist/{db-backup-DLD4QZBO.js → db-backup-W2QFSYQC.js} +15 -5
  231. package/dist/{db-restore-events-JVEEP52Z.js → db-restore-events-MQ2DBGEQ.js} +2 -2
  232. package/dist/dispatch-ack-VYH3ONSS.js +27 -0
  233. package/dist/{doc-graph-extractor-3TRLGD7M.js → doc-graph-extractor-F6ODFIID.js} +4 -4
  234. package/dist/{documents-FHIBU7KJ.js → documents-23WX2FPQ.js} +12 -12
  235. package/dist/dreaming-NWD22UQ5.js +46 -0
  236. package/dist/{exe-drift-KY2KHZEL.js → exe-drift-CW72FBGE.js} +5 -5
  237. package/dist/{exe-export-SP6G3QF6.js → exe-export-AUJ7CV7G.js} +11 -11
  238. package/dist/{exe-import-KJU7FBVQ.js → exe-import-JX4I52VE.js} +11 -11
  239. package/dist/{exe-key-M6TYHNUW.js → exe-key-2N6LY2BU.js} +241 -226
  240. package/dist/{exe-org-BGZNNE4H.js → exe-org-X4CSNCKS.js} +3 -3
  241. package/dist/{exe-snapshot-ZNPGUKRZ.js → exe-snapshot-XZ7FVCYZ.js} +31 -29
  242. package/dist/{fast-db-init-QQB6IVWV.js → fast-db-init-4CWHSOOR.js} +1 -1
  243. package/dist/{founder-context-PQR3BUS7.js → founder-context-7L3CFPYN.js} +4 -4
  244. package/dist/gateway/index.js +14 -14
  245. package/dist/{gateway-client-GRBOJQYC.js → gateway-client-7LMZKHTH.js} +1 -1
  246. package/dist/git-main-guard-UZP3KXYI.js +39 -0
  247. package/dist/{git-staleness-UGB5J3K7.js → git-staleness-CI2R4QOJ.js} +4 -4
  248. package/dist/{global-procedures-R7KRREEK.js → global-procedures-XQX3LUH6.js} +6 -6
  249. package/dist/{graph-auto-extract-LKIQ57PL.js → graph-auto-extract-OURWMGBS.js} +4 -4
  250. package/dist/{hook-integrity-WURH6DS3.js → hook-integrity-XY47IM7G.js} +1 -1
  251. package/dist/hook-prefetch-PHRRKY4C.js +137 -0
  252. package/dist/hooks/bug-report-worker.js +32 -28
  253. package/dist/hooks/codex-stop-task-finalizer.js +32 -28
  254. package/dist/hooks/commit-complete.js +29 -27
  255. package/dist/hooks/error-recall.js +12 -11
  256. package/dist/hooks/exe-heartbeat-hook.js +6 -6
  257. package/dist/hooks/ingest-worker.js +11 -11
  258. package/dist/hooks/ingest.js +18 -18
  259. package/dist/hooks/instructions-loaded.js +7 -7
  260. package/dist/hooks/manifest.json +20 -20
  261. package/dist/hooks/notification.js +7 -7
  262. package/dist/hooks/post-compact.js +28 -26
  263. package/dist/hooks/post-tool-combined.js +12 -12
  264. package/dist/hooks/pre-compact.js +29 -27
  265. package/dist/hooks/pre-tool-use.js +180 -47
  266. package/dist/hooks/prompt-submit.js +324 -273
  267. package/dist/hooks/session-end.js +35 -33
  268. package/dist/hooks/session-start.js +28 -21
  269. package/dist/hooks/stop.js +35 -33
  270. package/dist/hooks/subagent-stop.js +28 -26
  271. package/dist/hooks/summary-worker.js +36 -34
  272. package/dist/index.js +39 -37
  273. package/dist/{installer-SB2N5NKH.js → installer-G3JAO3NT.js} +9 -9
  274. package/dist/{installer-MZWWBXM6.js → installer-JND3RJ6Q.js} +9 -9
  275. package/dist/{installer-MNPXDLGG.js → installer-L7EVH5U5.js} +9 -9
  276. package/dist/{intercom-queue-VU2G6F5R.js → intercom-queue-ZFEQALR3.js} +25 -23
  277. package/dist/{key-backup-status-TNEHXA2X.js → key-backup-status-LOSMVATJ.js} +2 -2
  278. package/dist/lib/agent-config.js +4 -3
  279. package/dist/lib/cloud-sync.js +19 -19
  280. package/dist/lib/config.js +2 -2
  281. package/dist/lib/consolidation.js +9 -9
  282. package/dist/lib/crypto.js +3 -3
  283. package/dist/lib/database.js +6 -4
  284. package/dist/lib/db-daemon-client.js +5 -5
  285. package/dist/lib/db-read-worker-client.js +9 -3
  286. package/dist/lib/db.js +6 -4
  287. package/dist/lib/device-registry.js +3 -3
  288. package/dist/lib/embed-worker.js +2 -2
  289. package/dist/lib/embedder.js +5 -5
  290. package/dist/lib/employee-templates.js +7 -7
  291. package/dist/lib/employees.js +10 -4
  292. package/dist/lib/exe-daemon-client.js +4 -4
  293. package/dist/lib/exe-daemon.js +651 -158
  294. package/dist/lib/hybrid-search.js +11 -9
  295. package/dist/lib/identity.js +4 -4
  296. package/dist/lib/keychain.js +1 -1
  297. package/dist/lib/license.js +4 -4
  298. package/dist/lib/messaging.js +28 -24
  299. package/dist/lib/post-tool-memory.js +3 -3
  300. package/dist/lib/registry-proxy.js +1 -1
  301. package/dist/lib/reminders.js +15 -7
  302. package/dist/lib/schedules.js +9 -9
  303. package/dist/lib/session-registry.js +6 -6
  304. package/dist/lib/skill-learning.js +10 -10
  305. package/dist/lib/status-brief.js +4 -4
  306. package/dist/lib/store.js +8 -8
  307. package/dist/lib/task-router.js +5 -5
  308. package/dist/lib/tasks.js +29 -25
  309. package/dist/lib/tmux-routing.js +56 -25
  310. package/dist/lib/tmux-status.js +9 -3
  311. package/dist/lib/tmux-transport.js +1 -1
  312. package/dist/lib/token-spend.js +5 -5
  313. package/dist/lib/transport.js +2 -2
  314. package/dist/lib/ws-client.js +1 -1
  315. package/dist/{license-gate-BYDMFMFT.js → license-gate-QTRQHV4F.js} +5 -5
  316. package/dist/{license-sync-N3RNYVP2.js → license-sync-N3UJFWAW.js} +4 -4
  317. package/dist/mcp/register-tools.js +96 -89
  318. package/dist/mcp/server.js +98 -91
  319. package/dist/mcp/tools/complete-reminder.js +6 -6
  320. package/dist/mcp/tools/create-reminder.js +6 -6
  321. package/dist/mcp/tools/create-task.js +37 -28
  322. package/dist/mcp/tools/deactivate-behavior.js +11 -11
  323. package/dist/mcp/tools/list-reminders.js +6 -6
  324. package/dist/mcp/tools/list-tasks.js +35 -29
  325. package/dist/mcp/tools/send-message.js +28 -26
  326. package/dist/mcp/tools/update-task.js +34 -28
  327. package/dist/{mcp-http-config-EMAVS2JI.js → mcp-http-config-BDL36JZ3.js} +6 -6
  328. package/dist/{mcp-port-config-FFAMMLLE.js → mcp-port-config-6HYY6J7K.js} +2 -2
  329. package/dist/mcp-session-identity-T7H2EKFQ.js +177 -0
  330. package/dist/{memory-cards-TQRLZI4D.js → memory-cards-ZRDW7QBX.js} +8 -8
  331. package/dist/{memory-graph-extractor-IWGNVAFU.js → memory-graph-extractor-QLXDMHRS.js} +5 -5
  332. package/dist/{memory-poisoning-defense-T4ITBGSG.js → memory-poisoning-defense-HJTXYCWH.js} +4 -4
  333. package/dist/{memory-pressure-watchdog-RRIAXPXQ.js → memory-pressure-watchdog-HN5X7AVN.js} +76 -37
  334. package/dist/{memory-queue-X2CSEAKE.js → memory-queue-2UOOF27L.js} +5 -3
  335. package/dist/{memory-queue-client-BKQHTYTH.js → memory-queue-client-O5U6F6XP.js} +6 -6
  336. package/dist/{memory-reflection-6N4J2FL7.js → memory-reflection-WVNFBJAA.js} +4 -4
  337. package/dist/{monitor-grants-RZOVSYVO.js → monitor-grants-E3ELDEWD.js} +5 -5
  338. package/dist/{monitor-identity-MOXISYNG.js → monitor-identity-GLFZSEAH.js} +2 -2
  339. package/dist/notification-ledger-SZEPGJQ7.js +409 -0
  340. package/dist/{notifications-KONB3C62.js → notifications-4UT53CDG.js} +25 -23
  341. package/dist/{orchestration-events-5SIJOE4H.js → orchestration-events-WV4NWKZH.js} +5 -5
  342. package/dist/{orchestration-phase-CXRCBCK7.js → orchestration-phase-AWBXPO52.js} +3 -3
  343. package/dist/orchestrator-UAC3RW2T.js +47 -0
  344. package/dist/{pipeline-router-O6HU7DKH.js → pipeline-router-LM53NMWJ.js} +5 -5
  345. package/dist/{plan-limits-GRNBOBB3.js → plan-limits-2FEY2GOS.js} +7 -7
  346. package/dist/platform-procedures-X5DFJFV7.js +13 -0
  347. package/dist/{preferences-TYTGDXQZ.js → preferences-TWIXZBKS.js} +2 -2
  348. package/dist/{project-boot-SD7GM24K.js → project-boot-4NUH5FRU.js} +2 -2
  349. package/dist/{projection-worker-ZVOFHTXT.js → projection-worker-FZ7YSN3G.js} +5 -5
  350. package/dist/{prospective-memory-W6S67LZZ.js → prospective-memory-6D2ASWM3.js} +4 -4
  351. package/dist/{push-notifications-W5JRXLKJ.js → push-notifications-U6FIBQRW.js} +3 -3
  352. package/dist/{reranker-QATGTAPC.js → reranker-GYYRPANK.js} +3 -3
  353. package/dist/{retrieval-health-TWHKYCRK.js → retrieval-health-4Z242P3B.js} +1 -1
  354. package/dist/{review-polling-PCMD5BFN.js → review-polling-HXAFJZDA.js} +26 -24
  355. package/dist/runtime/index.js +37 -35
  356. package/dist/{session-events-3LCVQEL7.js → session-events-O3BV56ZX.js} +26 -24
  357. package/dist/{session-kill-telemetry-CZSPN5V6.js → session-kill-telemetry-AELE4JDK.js} +26 -24
  358. package/dist/session-mcp-config-YKNXG5DW.js +50 -0
  359. package/dist/{session-scope-CFHVSVAQ.js → session-scope-5EAPUT45.js} +25 -23
  360. package/dist/setup-wizard-NB6R4QVS.js +14 -0
  361. package/dist/{shard-manager-MBWQEYNG.js → shard-manager-35PWFR3B.js} +3 -3
  362. package/dist/{skill-refinement-74T6VDFM.js → skill-refinement-DVSYXBBP.js} +5 -5
  363. package/dist/stack-promote-RSOWO6EY.js +130 -0
  364. package/dist/{stack-release-XXMV7SPX.js → stack-release-HGFFFCGC.js} +112 -22
  365. package/dist/{stack-update-E2TKHHSQ.js → stack-update-ATCJFOEK.js} +7 -5
  366. package/dist/{steward-gate-WT7WXQIE.js → steward-gate-3GQ5XKMJ.js} +5 -5
  367. package/dist/support-inbox-4L62P4EP.js +33 -0
  368. package/dist/support-outbox-WHGPUYL2.js +16 -0
  369. package/dist/task-enforcement-IPIZX2MM.js +90 -0
  370. package/dist/{task-scope-CQEG5SSJ.js → task-scope-FOIW25HR.js} +27 -23
  371. package/dist/{tasks-crud-UGK5A25L.js → tasks-crud-HBDKE6C5.js} +35 -23
  372. package/dist/tasks-notify-G2U2U2YA.js +53 -0
  373. package/dist/{tasks-review-JKBRACII.js → tasks-review-27SFX5XN.js} +27 -23
  374. package/dist/{telemetry-upload-7LBYGPCB.js → telemetry-upload-ZOXHRWR5.js} +9 -9
  375. package/dist/tmux-command-guard-KSJKIX3C.js +117 -0
  376. package/dist/{token-budget-QBRJR4M5.js → token-budget-5Y4YPDO3.js} +5 -5
  377. package/dist/{tool-capability-index-Q6YQDL7I.js → tool-capability-index-VYF5GNJ2.js} +1 -1
  378. package/dist/{tool-telemetry-ULIDUK3P.js → tool-telemetry-KBXSBDTK.js} +1 -1
  379. package/dist/tui/App.js +40 -38
  380. package/dist/{tui-data-NPTGKT37.js → tui-data-NLFMBIQI.js} +25 -23
  381. package/dist/{update-check-HFO4VHO4.js → update-check-3FHAWIG2.js} +7 -3
  382. package/dist/update-support-UVUSZG7R.js +355 -0
  383. package/dist/{whatsapp-accounts-BWRZUY23.js → whatsapp-accounts-BFIOXYW5.js} +1 -1
  384. package/dist/{whatsapp-config-GOSELKTE.js → whatsapp-config-FAX6EA5K.js} +20 -13
  385. package/dist/{worker-gate-MXUQUG4M.js → worker-gate-3KUBAU32.js} +3 -3
  386. package/dist/{workflow-engine-EWCOLD47.js → workflow-engine-YITHXZR5.js} +2 -2
  387. package/dist/{working-memory-PY4AG577.js → working-memory-NUVB5SFV.js} +1 -1
  388. package/dist/worktree-LL62PLQB.js +47 -0
  389. package/dist/{worktree-sweep-ZAG3V24E.js → worktree-sweep-WTK3MTKH.js} +7 -7
  390. package/package.json +3 -2
  391. package/release-notes.json +86 -76
  392. package/dist/branch-hygiene-R5NVTRAY.js +0 -138
  393. package/dist/chunk-6IRVGOUL.js +0 -30
  394. package/dist/chunk-HMP5VT6A.js +0 -118
  395. package/dist/chunk-PVYR4FCQ.js +0 -113
  396. package/dist/chunk-UFAXZ2PY.js +0 -138
  397. package/dist/chunk-Y25OJWOQ.js +0 -45
  398. package/dist/chunk-YGAAZN3E.js +0 -47
  399. package/dist/cto-delegation-gate-DXNF5HVW.js +0 -290
  400. package/dist/dispatch-ack-4S44HBWB.js +0 -15
  401. package/dist/dreaming-OMFUEUCQ.js +0 -44
  402. package/dist/orchestrator-DUUX7FQV.js +0 -45
  403. package/dist/setup-wizard-TOFEJPLF.js +0 -13
  404. package/dist/tasks-notify-SMLDFBWM.js +0 -50
  405. package/dist/worktree-GVF2I5FP.js +0 -31
  406. /package/dist/{chunk-FLNSJ2TC.js → chunk-GIBYNT6W.js} +0 -0
  407. /package/dist/{chunk-NQBRGXYR.js → chunk-JRM4TAGS.js} +0 -0
  408. /package/dist/{chunk-WHRTDN5J.js → chunk-MGGOSFCR.js} +0 -0
  409. /package/dist/{chunk-D3QASX2W.js → chunk-QIFYLIUF.js} +0 -0
  410. /package/dist/{chunk-OADURIIN.js → chunk-WTH4CSAP.js} +0 -0
  411. /package/dist/{core-memory-VO5ZIBKH.js → core-memory-GAC6EWOQ.js} +0 -0
  412. /package/dist/{entity-boost-DNI4A5I7.js → entity-boost-NT6UO2Z3.js} +0 -0
  413. /package/dist/{message-queue-client-Q5BW3O5W.js → message-queue-client-4EOQRUXW.js} +0 -0
  414. /package/dist/{oauth-server-ROQFOEMM.js → oauth-server-67YBDP32.js} +0 -0
  415. /package/dist/{webhook-pipe-FZYLO6RR.js → webhook-pipe-LEXMUQ5B.js} +0 -0
  416. /package/dist/{wiki-acl-JA5UCQZ4.js → wiki-acl-74BLWG6J.js} +0 -0
  417. /package/dist/{wiki-client-VNDOBK63.js → wiki-client-EAN7F5LV.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  // src/lib/keychain.ts
2
- import { readFile, writeFile, unlink, mkdir, chmod, rename, copyFile } from "fs/promises";
3
- import { existsSync, statSync, writeFileSync, readFileSync, readdirSync } from "fs";
2
+ import { readFile, writeFile, unlink, mkdir, chmod, rename, copyFile, open } from "fs/promises";
3
+ import { existsSync, statSync, writeFileSync, readFileSync, readdirSync, openSync, writeSync, fsyncSync, closeSync, chmodSync } from "fs";
4
4
  import { execFileSync, spawnSync } from "child_process";
5
5
  import crypto from "crypto";
6
6
  import path from "path";
@@ -291,7 +291,53 @@ async function tryKeytar() {
291
291
  }
292
292
  }
293
293
  var ENCRYPTED_PREFIX = "enc:";
294
- function deriveMachineKey() {
294
+ var MACHINE_KEY_SALT_FILE = ".machine-key-salt";
295
+ var MACHINE_KEY_SALT_BYTES = 32;
296
+ function getMachineKeySaltPath() {
297
+ return path.join(getKeyDir(), MACHINE_KEY_SALT_FILE);
298
+ }
299
+ function readMachineKeySalt() {
300
+ try {
301
+ const raw = readFileSync(getMachineKeySaltPath(), "utf8").trim();
302
+ const salt = Buffer.from(raw, "base64");
303
+ return salt.length === MACHINE_KEY_SALT_BYTES ? salt : null;
304
+ } catch {
305
+ return null;
306
+ }
307
+ }
308
+ async function ensureMachineKeySalt() {
309
+ const existing = readMachineKeySalt();
310
+ if (existing) return existing;
311
+ try {
312
+ await mkdir(getKeyDir(), { recursive: true });
313
+ const saltPath = getMachineKeySaltPath();
314
+ const salt = crypto.randomBytes(MACHINE_KEY_SALT_BYTES);
315
+ try {
316
+ const fd = openSync(saltPath, "wx", 384);
317
+ try {
318
+ writeSync(fd, `${salt.toString("base64")}
319
+ `);
320
+ fsyncSync(fd);
321
+ } finally {
322
+ closeSync(fd);
323
+ }
324
+ try {
325
+ chmodSync(saltPath, 384);
326
+ } catch {
327
+ }
328
+ return salt;
329
+ } catch (err) {
330
+ if (err.code === "EEXIST") {
331
+ const installed = readMachineKeySalt();
332
+ if (installed) return installed;
333
+ }
334
+ throw err;
335
+ }
336
+ } catch {
337
+ return null;
338
+ }
339
+ }
340
+ function deriveMachineKey(options = {}) {
295
341
  try {
296
342
  const material = [
297
343
  os.hostname(),
@@ -301,7 +347,9 @@ function deriveMachineKey() {
301
347
  // Machine ID on Linux (stable across reboots)
302
348
  process.platform === "linux" ? readMachineId() : ""
303
349
  ].join("|");
304
- return crypto.createHash("sha256").update(material).digest();
350
+ const base = crypto.createHash("sha256").update(material).digest();
351
+ if (!options.salt) return base;
352
+ return crypto.pbkdf2Sync(base, options.salt, 12e4, 32, "sha256");
305
353
  } catch {
306
354
  return null;
307
355
  }
@@ -338,14 +386,33 @@ function decryptWithMachineKey(encrypted, machineKey) {
338
386
  return null;
339
387
  }
340
388
  }
389
+ function decryptMachineBoundFileFallback(content) {
390
+ if (!content.startsWith(ENCRYPTED_PREFIX)) return null;
391
+ const salt = readMachineKeySalt();
392
+ if (salt) {
393
+ const saltedKey = deriveMachineKey({ salt });
394
+ const salted = saltedKey ? decryptWithMachineKey(content, saltedKey) : null;
395
+ if (salted) return { b64: salted, format: "salted" };
396
+ }
397
+ const legacyKey = deriveMachineKey();
398
+ const legacy = legacyKey ? decryptWithMachineKey(content, legacyKey) : null;
399
+ return legacy ? { b64: legacy, format: "legacy" } : null;
400
+ }
341
401
  async function writeMachineBoundFileFallback(b64) {
342
402
  const dir = getKeyDir();
343
403
  await mkdir(dir, { recursive: true });
344
404
  const keyPath = getKeyPath();
345
- const machineKey = deriveMachineKey();
346
- const content = machineKey ? encryptWithMachineKey(b64, machineKey) + "\n" : b64 + "\n";
347
- const result = machineKey ? "encrypted" : "plaintext";
348
- const tmpPath = keyPath + ".tmp";
405
+ const salt = await ensureMachineKeySalt();
406
+ if (!salt) {
407
+ throw new Error("machine-bound fallback refused: cannot create or read a valid machine-key salt");
408
+ }
409
+ const machineKey = deriveMachineKey({ salt });
410
+ if (!machineKey) {
411
+ throw new Error("machine-bound fallback refused: cannot derive the salted machine key");
412
+ }
413
+ const content = encryptWithMachineKey(b64, machineKey) + "\n";
414
+ const result = "encrypted";
415
+ const tmpPath = `${keyPath}.${process.pid}.${crypto.randomBytes(6).toString("hex")}.tmp`;
349
416
  try {
350
417
  if (existsSync(keyPath)) {
351
418
  await copyFile(keyPath, keyPath + ".bak").catch(() => {
@@ -353,6 +420,15 @@ async function writeMachineBoundFileFallback(b64) {
353
420
  }
354
421
  await writeFile(tmpPath, content, "utf-8");
355
422
  await chmod(tmpPath, 384);
423
+ try {
424
+ const fh = await open(tmpPath, "r+");
425
+ try {
426
+ await fh.sync();
427
+ } finally {
428
+ await fh.close();
429
+ }
430
+ } catch {
431
+ }
356
432
  await rename(tmpPath, keyPath);
357
433
  } catch (err) {
358
434
  try {
@@ -375,10 +451,7 @@ async function getMasterKey() {
375
451
  }
376
452
  try {
377
453
  const content = (await readFile(keyPath2, "utf-8")).trim();
378
- const b64Value = content.startsWith(ENCRYPTED_PREFIX) ? (() => {
379
- const machineKey = deriveMachineKey();
380
- return machineKey ? decryptWithMachineKey(content, machineKey) : null;
381
- })() : content;
454
+ const b64Value = content.startsWith(ENCRYPTED_PREFIX) ? decryptMachineBoundFileFallback(content)?.b64 ?? null : content;
382
455
  return b64Value ? Buffer.from(b64Value, "base64") : null;
383
456
  } catch (err) {
384
457
  process.stderr.write(
@@ -435,20 +508,17 @@ async function getMasterKey() {
435
508
  try {
436
509
  const content = (await readFile(keyPath, "utf-8")).trim();
437
510
  let b64Value;
511
+ let encryptedFormat = null;
438
512
  if (content.startsWith(ENCRYPTED_PREFIX)) {
439
- const machineKey = deriveMachineKey();
440
- if (!machineKey) {
441
- process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
442
- return null;
443
- }
444
- const decrypted = decryptWithMachineKey(content, machineKey);
513
+ const decrypted = decryptMachineBoundFileFallback(content);
445
514
  if (!decrypted) {
446
515
  process.stderr.write(
447
- "[keychain] Your computer's hostname or username appears to have changed.\n Use your 24-word recovery phrase to restore: exe-os setup (option 2)\n"
516
+ "[keychain] Could not decrypt encrypted master.key with the current machine key.\n This can mean the file is corrupted, copied from another machine, or was written by an incompatible fallback KDF.\n If you intentionally moved devices, restore with your 24-word recovery phrase: exe-os setup (option 2)\n"
448
517
  );
449
518
  return null;
450
519
  }
451
- b64Value = decrypted;
520
+ b64Value = decrypted.b64;
521
+ encryptedFormat = decrypted.format;
452
522
  } else {
453
523
  b64Value = content;
454
524
  }
@@ -469,15 +539,22 @@ async function getMasterKey() {
469
539
  } else {
470
540
  process.stderr.write("[keychain] Keychain migration could not be verified \u2014 keeping master.key file as a safe fallback.\n");
471
541
  }
472
- } else if (!content.startsWith(ENCRYPTED_PREFIX)) {
473
- const fallback = await writeMachineBoundFileFallback(b64Value);
474
- if (fallback === "encrypted") {
475
- process.stderr.write("[keychain] Upgraded legacy plaintext master.key to machine-bound encrypted fallback.\n");
476
- } else {
542
+ } else if (!content.startsWith(ENCRYPTED_PREFIX) || encryptedFormat === "legacy") {
543
+ try {
544
+ const fallback = await writeMachineBoundFileFallback(b64Value);
545
+ if (fallback === "encrypted") {
546
+ process.stderr.write(content.startsWith(ENCRYPTED_PREFIX) ? "[keychain] Rewrapped legacy encrypted master.key with salted machine-bound fallback.\n" : "[keychain] Upgraded legacy plaintext master.key to machine-bound encrypted fallback.\n");
547
+ } else {
548
+ process.stderr.write(
549
+ "[keychain] WARNING: Could not encrypt legacy master.key \u2014 plaintext fallback remains.\n"
550
+ );
551
+ warnPlaintextFallback();
552
+ }
553
+ } catch (err) {
477
554
  process.stderr.write(
478
- "[keychain] WARNING: Could not encrypt legacy master.key \u2014 plaintext fallback remains.\n"
555
+ `[keychain] WARNING: could not rewrap legacy master.key; continuing with the decrypted key: ${err instanceof Error ? err.message : String(err)}
556
+ `
479
557
  );
480
- warnPlaintextFallback();
481
558
  }
482
559
  }
483
560
  return key;
@@ -550,11 +627,12 @@ async function getKeyStorageInfo() {
550
627
  try {
551
628
  const content = (await readFile(keyPath, "utf-8")).trim();
552
629
  if (content.startsWith(ENCRYPTED_PREFIX)) {
630
+ const salt = readMachineKeySalt();
553
631
  return {
554
632
  kind: "encrypted-file",
555
633
  secure: true,
556
634
  path: keyPath,
557
- note: "stored in machine-bound encrypted file fallback"
635
+ note: salt ? "stored in salted machine-bound encrypted file fallback" : "stored in legacy deterministic machine-bound encrypted file fallback; next key read rewraps it with salt"
558
636
  };
559
637
  }
560
638
  if (isRootOnlyTrustedServerKeyFile(keyPath)) {
@@ -650,6 +728,10 @@ async function deleteMasterKey() {
650
728
  if (existsSync(keyPath)) {
651
729
  await unlink(keyPath);
652
730
  }
731
+ try {
732
+ await unlink(getMachineKeySaltPath());
733
+ } catch {
734
+ }
653
735
  }
654
736
  async function loadBip39() {
655
737
  try {
@@ -2,16 +2,24 @@ import {
2
2
  dispatchTaskToEmployee,
3
3
  markTaskNotificationsRead,
4
4
  notifyTaskDone
5
- } from "./chunk-I7Z6KTGF.js";
5
+ } from "./chunk-R2NN3JKH.js";
6
+ import {
7
+ clearCurrentTask,
8
+ writeCurrentTask
9
+ } from "./chunk-76CJBM36.js";
6
10
  import {
7
11
  cleanupReviewFile,
8
12
  createTaskCore,
9
13
  deleteTaskCore,
10
14
  markAsReadByTaskFile,
11
15
  sessionScopeFilter,
16
+ strictSessionScopeFilter,
12
17
  updateTaskStatus,
13
18
  writeNotification
14
- } from "./chunk-PLRIJALF.js";
19
+ } from "./chunk-UP75Z5X7.js";
20
+ import {
21
+ getAgentContext
22
+ } from "./chunk-GJV3WDWM.js";
15
23
  import {
16
24
  orgBus
17
25
  } from "./chunk-MP2AFCGL.js";
@@ -19,14 +27,7 @@ import {
19
27
  getClient,
20
28
  getCoordinatorName,
21
29
  isCoordinatorName
22
- } from "./chunk-HEPR6QTL.js";
23
- import {
24
- EXE_AI_DIR
25
- } from "./chunk-7Y5UDEVM.js";
26
-
27
- // src/lib/tasks.ts
28
- import path2 from "path";
29
- import { writeFileSync, mkdirSync, unlinkSync } from "fs";
30
+ } from "./chunk-AOHXREB7.js";
30
31
 
31
32
  // src/lib/tasks-chain.ts
32
33
  import path from "path";
@@ -61,7 +62,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
61
62
  }
62
63
  if (unblockedRows.rows.length > 0 && !process.env.VITEST) {
63
64
  try {
64
- const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-SMLDFBWM.js");
65
+ const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-G2U2U2YA.js");
65
66
  const dispatched = /* @__PURE__ */ new Set();
66
67
  for (const ur of unblockedRows.rows) {
67
68
  const assignee = String(ur.assigned_to);
@@ -86,7 +87,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
86
87
  }
87
88
  } catch {
88
89
  try {
89
- const { queueIntercom } = await import("./intercom-queue-VU2G6F5R.js");
90
+ const { queueIntercom } = await import("./intercom-queue-ZFEQALR3.js");
90
91
  const dispatched = /* @__PURE__ */ new Set();
91
92
  for (const ur of unblockedRows.rows) {
92
93
  const assignee = String(ur.assigned_to);
@@ -99,9 +100,9 @@ async function cascadeUnblock(taskId, baseDir, now) {
99
100
  }
100
101
  }
101
102
  }
102
- async function findNextTask(assignedTo) {
103
+ async function findNextTask(assignedTo, sessionScope) {
103
104
  const client = getClient();
104
- const ntScope = sessionScopeFilter();
105
+ const ntScope = sessionScope === void 0 ? sessionScopeFilter() : sessionScope === null ? { sql: " AND session_scope IS NULL", args: [] } : strictSessionScopeFilter(sessionScope);
105
106
  const nextResult = await client.execute({
106
107
  sql: `SELECT title, task_file, priority FROM tasks
107
108
  WHERE assigned_to = ? AND status = 'open'${ntScope.sql}
@@ -175,16 +176,11 @@ async function updateTask(input) {
175
176
  const { row, taskFile, now, taskId, previousStatus, requestedStatus } = await updateTaskStatus(input);
176
177
  try {
177
178
  const agent = String(row.assigned_to);
178
- const cacheDir = path2.join(EXE_AI_DIR, "session-cache");
179
- const cachePath = path2.join(cacheDir, `current-task-${agent}.json`);
179
+ const sessionScope = getAgentContext()?.sessionHint;
180
180
  if (input.status === "in_progress") {
181
- mkdirSync(cacheDir, { recursive: true });
182
- writeFileSync(cachePath, JSON.stringify({ taskId, title: String(row.title) }));
181
+ writeCurrentTask({ agent, taskId, title: String(row.title), sessionScope });
183
182
  } else if (input.status === "needs_review" || input.status === "done" || input.status === "blocked" || input.status === "cancelled" || input.status === "closed") {
184
- try {
185
- unlinkSync(cachePath);
186
- } catch {
187
- }
183
+ clearCurrentTask({ agent, taskId, sessionScope });
188
184
  }
189
185
  } catch (e) {
190
186
  process.stderr.write(`[tasks] trajectory tagging failed: ${e instanceof Error ? e.message : String(e)}
@@ -289,7 +285,7 @@ async function updateTask(input) {
289
285
  try {
290
286
  process.stderr.write(`[tasks] EVENT: tmux delivery failed for reviewer="${reviewer}". Queueing for daemon delivery.
291
287
  `);
292
- const { queueIntercom } = await import("./intercom-queue-VU2G6F5R.js");
288
+ const { queueIntercom } = await import("./intercom-queue-ZFEQALR3.js");
293
289
  const { resolveExeSession } = await import("./lib/tmux-routing.js");
294
290
  const exeSession = row.session_scope ? String(row.session_scope) : resolveExeSession();
295
291
  if (exeSession) {
@@ -306,7 +302,7 @@ async function updateTask(input) {
306
302
  }
307
303
  }
308
304
  try {
309
- const { pushNotifyAsync } = await import("./push-notifications-W5JRXLKJ.js");
305
+ const { pushNotifyAsync } = await import("./push-notifications-U6FIBQRW.js");
310
306
  pushNotifyAsync({
311
307
  event: "review_ready",
312
308
  title: `Review ready: ${taskTitle.slice(0, 50)}`,
@@ -318,7 +314,7 @@ async function updateTask(input) {
318
314
  }
319
315
  if (!isCoordinator && isCompletionReviewTransition) {
320
316
  try {
321
- const { pushNotifyAsync } = await import("./push-notifications-W5JRXLKJ.js");
317
+ const { pushNotifyAsync } = await import("./push-notifications-U6FIBQRW.js");
322
318
  const event = input.status === "needs_review" ? "review_ready" : "task_complete";
323
319
  pushNotifyAsync({
324
320
  event,
@@ -333,7 +329,7 @@ async function updateTask(input) {
333
329
  await markTaskNotificationsRead(taskFile);
334
330
  if (isCompletionReviewTransition && !isCoordinator && row.reviewer) {
335
331
  try {
336
- const { writeNotification: writeNotification2 } = await import("./notifications-KONB3C62.js");
332
+ const { writeNotification: writeNotification2 } = await import("./notifications-4UT53CDG.js");
337
333
  const reviewer = String(row.reviewer);
338
334
  await writeNotification2({
339
335
  agentId: reviewer,
@@ -399,7 +395,10 @@ async function updateTask(input) {
399
395
  let nextTask;
400
396
  if (isTerminal && !isCoordinatorName(String(row.assigned_to))) {
401
397
  try {
402
- nextTask = await findNextTask(String(row.assigned_to));
398
+ nextTask = await findNextTask(
399
+ String(row.assigned_to),
400
+ row.session_scope != null ? String(row.session_scope) : null
401
+ );
403
402
  } catch (e) {
404
403
  process.stderr.write(`[tasks] task chaining failed: ${e instanceof Error ? e.message : String(e)}
405
404
  `);
@@ -1,3 +1,7 @@
1
+ import {
2
+ releaseDispatchClaim,
3
+ tryAcquireDispatchClaim
4
+ } from "./chunk-O7LWR36Z.js";
1
5
  import {
2
6
  employeeSessionName,
3
7
  ensureEmployee,
@@ -5,16 +9,16 @@ import {
5
9
  notifyParentExe,
6
10
  resolveExeSession,
7
11
  sendIntercom
8
- } from "./chunk-PLRIJALF.js";
12
+ } from "./chunk-UP75Z5X7.js";
9
13
  import {
10
14
  getTransport
11
- } from "./chunk-RMOBQ6A5.js";
15
+ } from "./chunk-AD2VCHSS.js";
12
16
  import {
13
17
  recordOrchestrationEventBestEffort
14
- } from "./chunk-FUIIVSW6.js";
18
+ } from "./chunk-2WAVZ5UJ.js";
15
19
  import {
16
20
  getAgentRuntime
17
- } from "./chunk-65SVQELL.js";
21
+ } from "./chunk-HA5R6USD.js";
18
22
  import {
19
23
  getSessionKey
20
24
  } from "./chunk-CVYC6DUW.js";
@@ -22,7 +26,7 @@ import {
22
26
  isCoordinatorName,
23
27
  isMultiInstance,
24
28
  shouldAutoInstance
25
- } from "./chunk-HEPR6QTL.js";
29
+ } from "./chunk-AOHXREB7.js";
26
30
 
27
31
  // src/lib/tasks-notify.ts
28
32
  var VERIFY_DELAY_MS = 1e4;
@@ -68,7 +72,7 @@ async function dispatchTaskToEmployee(input) {
68
72
  let crossProject = false;
69
73
  if (input.projectName) {
70
74
  try {
71
- const { assertSessionScope } = await import("./session-scope-CFHVSVAQ.js");
75
+ const { assertSessionScope } = await import("./session-scope-5EAPUT45.js");
72
76
  const check = assertSessionScope("dispatch_task", input.projectName);
73
77
  if (check.reason === "cross_session_denied") {
74
78
  crossProject = true;
@@ -86,6 +90,35 @@ async function dispatchTaskToEmployee(input) {
86
90
  } catch {
87
91
  }
88
92
  }
93
+ let claimedDispatch = false;
94
+ if (input.taskId) {
95
+ claimedDispatch = tryAcquireDispatchClaim(input.taskId, input.assignedTo);
96
+ if (!claimedDispatch) {
97
+ process.stderr.write(
98
+ `[dispatch-audit] DEDUPED \u2192 ${input.assignedTo} | task="${input.title}" [${input.priority}] | a fresh dispatch for task ${input.taskId} is already in flight; not double-spawning
99
+ `
100
+ );
101
+ recordOrchestrationEventBestEffort({
102
+ eventType: "dispatch.deduped",
103
+ source: "tasks-notify.dispatchTaskToEmployee",
104
+ severity: "info",
105
+ taskId: input.taskId,
106
+ agentId: input.assignedTo,
107
+ runtime: dispatchRuntime,
108
+ result: "deduped",
109
+ payload: { priority: input.priority, reason: "fresh_dispatch_in_flight" }
110
+ });
111
+ return { dispatched: "skipped", deduped: true };
112
+ }
113
+ }
114
+ const releaseClaimOnFailure = (error) => {
115
+ if (claimedDispatch && input.taskId) {
116
+ try {
117
+ releaseDispatchClaim(input.taskId, input.assignedTo, error);
118
+ } catch {
119
+ }
120
+ }
121
+ };
89
122
  try {
90
123
  const transport = getTransport();
91
124
  const exeSession = resolveExeSession();
@@ -98,6 +131,7 @@ async function dispatchTaskToEmployee(input) {
98
131
  runtime: dispatchRuntime,
99
132
  errorCode: "no_exe_session"
100
133
  });
134
+ releaseClaimOnFailure("no_exe_session");
101
135
  return { dispatched: "session_missing" };
102
136
  }
103
137
  const multiInstance = isMultiInstance(input.assignedTo);
@@ -124,6 +158,7 @@ async function dispatchTaskToEmployee(input) {
124
158
  errorCode: "spawn_failed",
125
159
  payload: { path: "multi_instance", error: result.error }
126
160
  });
161
+ releaseClaimOnFailure("spawn_failed:multi_instance");
127
162
  return { dispatched: "session_missing" };
128
163
  }
129
164
  const dispatched = result.status === "intercom_sent" || result.status === "intercom_unprocessed" ? "sent_unverified" : "spawned";
@@ -185,6 +220,7 @@ async function dispatchTaskToEmployee(input) {
185
220
  errorCode: "spawn_failed",
186
221
  payload: { path: "single_instance_spawn", error: result.error }
187
222
  });
223
+ releaseClaimOnFailure("spawn_failed:single_instance");
188
224
  return { dispatched: "session_missing" };
189
225
  }
190
226
  process.stderr.write(
@@ -213,6 +249,7 @@ async function dispatchTaskToEmployee(input) {
213
249
  runtime: dispatchRuntime,
214
250
  errorCode: "exception"
215
251
  });
252
+ releaseClaimOnFailure("exception");
216
253
  return { dispatched: "session_missing" };
217
254
  }
218
255
  }
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  MultiAgentOrchestrator
3
- } from "./chunk-52KNOQMK.js";
3
+ } from "./chunk-4ZCD2UWW.js";
4
4
  import {
5
5
  createTokenBudgetMiddleware
6
- } from "./chunk-RRWDYOQS.js";
6
+ } from "./chunk-V3EEVY4L.js";
7
7
  import {
8
8
  createQuietRenderer,
9
9
  createTerminalRenderer,
10
10
  renderAgentEvents
11
11
  } from "./chunk-YZFZDJWZ.js";
12
- import {
13
- checkDangerousPatterns,
14
- hasCriticalPattern
15
- } from "./chunk-CMCYL2JC.js";
16
12
  import {
17
13
  checkPathSafety,
18
14
  checkReadPathSafety,
19
15
  containsPathTraversal
20
16
  } from "./chunk-NGVOA6ZQ.js";
17
+ import {
18
+ checkDangerousPatterns,
19
+ hasCriticalPattern
20
+ } from "./chunk-CMCYL2JC.js";
21
21
  import {
22
22
  ContextManager,
23
23
  agentLoop,
@@ -31,6 +31,10 @@ import {
31
31
  recordSuccess,
32
32
  shouldFallbackToAsk
33
33
  } from "./chunk-KSVLBATT.js";
34
+ import {
35
+ composeHooks,
36
+ createDefaultHooks
37
+ } from "./chunk-O377P7GM.js";
34
38
  import {
35
39
  ToolRegistry,
36
40
  partitionTools,
@@ -49,10 +53,6 @@ import {
49
53
  matchInputPattern,
50
54
  matchToolPattern
51
55
  } from "./chunk-HF25XPZE.js";
52
- import {
53
- composeHooks,
54
- createDefaultHooks
55
- } from "./chunk-O377P7GM.js";
56
56
  import {
57
57
  StateBus,
58
58
  orgBus
@@ -209,7 +209,7 @@ function createExeOSHooks(config) {
209
209
  );
210
210
  }
211
211
  try {
212
- const { listBehaviors } = await import("./behaviors-HLZUJSMP.js");
212
+ const { listBehaviors } = await import("./behaviors-KYRB3NGJ.js");
213
213
  const behaviors = await listBehaviors(config.agentId, config.projectName, 12);
214
214
  if (behaviors.length > 0) {
215
215
  process.stderr.write(
@@ -247,7 +247,7 @@ function createExeOSHooks(config) {
247
247
  const ALLOWED_RE = /^(Bash|Edit|Write|Read|Glob|Grep|Agent|mcp__.*)$/;
248
248
  if (!ALLOWED_RE.test(toolName)) return;
249
249
  try {
250
- const { extractSemanticText } = await import("./content-extractor-RHITF2KM.js");
250
+ const { extractSemanticText } = await import("./content-extractor-NXYNEF5K.js");
251
251
  const { writeMemory } = await import("./lib/store.js");
252
252
  const toolInput = block.input ?? {};
253
253
  const toolResponse = result.isError ? { error: result.content } : { output: result.content };
@@ -330,7 +330,7 @@ function createExeOSHooks(config) {
330
330
  async onSubagentStop(_reason) {
331
331
  try {
332
332
  const { getClient } = await import("./lib/database.js");
333
- const { sessionScopeFilter } = await import("./task-scope-CQEG5SSJ.js");
333
+ const { sessionScopeFilter } = await import("./task-scope-FOIW25HR.js");
334
334
  const client = getClient();
335
335
  const ehScope = sessionScopeFilter();
336
336
  const tasks = await client.execute({
@@ -422,7 +422,7 @@ function createExeOSHooks(config) {
422
422
  try {
423
423
  const { writeMemory, flushBatch } = await import("./lib/store.js");
424
424
  const { getClient } = await import("./lib/database.js");
425
- const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-CQEG5SSJ.js");
425
+ const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-FOIW25HR.js");
426
426
  const client = getClient();
427
427
  const cpScope = cpScopeFilter();
428
428
  const tasks = await client.execute({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EXE_AI_DIR
3
- } from "./chunk-7Y5UDEVM.js";
3
+ } from "./chunk-WZHZCDDO.js";
4
4
 
5
5
  // src/lib/mcp-transport-health.ts
6
6
  import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, statSync, writeFileSync } from "fs";
@@ -1,10 +1,13 @@
1
+ import {
2
+ SlackAdapter
3
+ } from "./chunk-ORCCI2VV.js";
1
4
  import {
2
5
  IMessageAdapter
3
6
  } from "./chunk-2SRG3B3D.js";
4
7
  import {
5
8
  createCRMWebhookHandler,
6
9
  parseTwentyWebhook
7
- } from "./chunk-6MRWJMI5.js";
10
+ } from "./chunk-GDIJE6D7.js";
8
11
  import {
9
12
  WhatsAppAdapter
10
13
  } from "./chunk-ECSNSHZ7.js";
@@ -17,9 +20,6 @@ import {
17
20
  import {
18
21
  DiscordAdapter
19
22
  } from "./chunk-N5RRQOAC.js";
20
- import {
21
- SlackAdapter
22
- } from "./chunk-ORCCI2VV.js";
23
23
  import {
24
24
  BotRegistry,
25
25
  BotRuntime,
@@ -42,7 +42,7 @@ import {
42
42
  retryWithBackoff,
43
43
  routeMessage,
44
44
  validateGatewayConfig
45
- } from "./chunk-7EA7LYW4.js";
45
+ } from "./chunk-4VSV5P4D.js";
46
46
  import {
47
47
  OllamaProvider
48
48
  } from "./chunk-FWFFZGSC.js";
@@ -55,7 +55,7 @@ import {
55
55
  getAccountByPhoneNumberId,
56
56
  getDefaultAccount,
57
57
  loadAccounts
58
- } from "./chunk-YGAAZN3E.js";
58
+ } from "./chunk-GL57PO3K.js";
59
59
  import {
60
60
  createPerson,
61
61
  findPersonByContact,
@@ -3,7 +3,7 @@ import {
3
3
  getCachedMonitorIdentity,
4
4
  pubKeyHash,
5
5
  recomputeEnvelopeWrapKey
6
- } from "./chunk-JCBKARSK.js";
6
+ } from "./chunk-IOEUAQWP.js";
7
7
 
8
8
  // src/lib/crypto.ts
9
9
  import crypto from "crypto";
@@ -7,10 +7,10 @@ import {
7
7
  import {
8
8
  connectEmbedDaemon,
9
9
  embedBatchViaClient
10
- } from "./chunk-7TS64TBG.js";
10
+ } from "./chunk-G4RGKBCA.js";
11
11
  import {
12
12
  EXE_AI_DIR
13
- } from "./chunk-7Y5UDEVM.js";
13
+ } from "./chunk-WZHZCDDO.js";
14
14
 
15
15
  // src/lib/code-context-index.ts
16
16
  import crypto from "crypto";