@askexenow/exe-os 0.9.341 → 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 (419) 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-AIQP4DFL.js → active-agent-PVGE57FY.js} +5 -5
  7. package/dist/{active-agent-LW45DSJ4.js → active-agent-TNIO6IY3.js} +5 -5
  8. package/dist/{agentic-ontology-RVUNRCQY.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-ZSDJ4O2T.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-ZAJLEL4X.js → backup-verify-3Y2FHGZU.js} +4 -4
  13. package/dist/{behaviors-EO7KCP3H.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 +25 -23
  24. package/dist/bin/cli.js +79 -25
  25. package/dist/bin/customer-readiness.js +1 -1
  26. package/dist/bin/deferred-daemon-restart.js +98 -92
  27. package/dist/bin/exe-agent-config.js +9 -8
  28. package/dist/bin/exe-agent.js +17 -17
  29. package/dist/bin/exe-assign.js +12 -12
  30. package/dist/bin/exe-boot.js +200 -67
  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 +25 -23
  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 +28 -27
  42. package/dist/bin/exe-kill.js +30 -28
  43. package/dist/bin/exe-launch-agent.js +128 -67
  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 +26 -24
  47. package/dist/bin/exe-pending-notifications.js +25 -23
  48. package/dist/bin/exe-pending-reviews.js +25 -23
  49. package/dist/bin/exe-rename.js +7 -7
  50. package/dist/bin/exe-review.js +29 -27
  51. package/dist/bin/exe-search.js +11 -9
  52. package/dist/bin/exe-session-cleanup.js +115 -85
  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 +26 -24
  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 +26 -24
  62. package/dist/bin/graph-backfill.js +11 -11
  63. package/dist/bin/graph-export.js +9 -9
  64. package/dist/bin/import-history.js +13 -13
  65. package/dist/bin/install.js +103 -97
  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 +2 -2
  73. package/dist/bin/registry-proxy.js +1 -1
  74. package/dist/bin/scan-tasks.js +25 -23
  75. package/dist/bin/setup.js +6 -5
  76. package/dist/bin/shard-migrate.js +9 -9
  77. package/dist/bin/stack-update.js +6 -6
  78. package/dist/bin/update.js +1 -1
  79. package/dist/bin/vps-health-gate.js +1 -1
  80. package/dist/{boot-generation-GSMPJOWM.js → boot-generation-BL2ISK4U.js} +5 -5
  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-OBYQNAKZ.js → capability-cards-DN5UIKVN.js} +4 -4
  86. package/dist/{capacity-monitor-MG3FTUD5.js → capacity-monitor-ZG5GGFR2.js} +26 -24
  87. package/dist/{catchup-brief-BVJOF3GL.js → catchup-brief-D6HH6DWS.js} +31 -28
  88. package/dist/{chunk-Q5AIPSSC.js → chunk-25X4JD2V.js} +10 -6
  89. package/dist/{chunk-6MVI4QH2.js → chunk-2KZNGDSW.js} +1 -1
  90. package/dist/{chunk-WH7XN5ER.js → chunk-2WAVZ5UJ.js} +1 -1
  91. package/dist/{chunk-PTJBWC77.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-X5QVL6RE.js → chunk-4CMVFVFC.js} +173 -69
  95. package/dist/{chunk-2YCFNBC4.js → chunk-4J4PMPXZ.js} +3 -2
  96. package/dist/{chunk-EDOO23B2.js → chunk-4N2NRGCM.js} +2 -2
  97. package/dist/chunk-4QCFFW2H.js +378 -0
  98. package/dist/{chunk-6MVC43X7.js → chunk-4VSV5P4D.js} +2 -2
  99. package/dist/{chunk-HJX6NCJF.js → chunk-4ZCD2UWW.js} +39 -10
  100. package/dist/{chunk-C445WRUX.js → chunk-5ERDIOV3.js} +2 -2
  101. package/dist/chunk-5H47VHB7.js +30 -0
  102. package/dist/{chunk-BJ23BNED.js → chunk-5TY4FPH6.js} +1 -1
  103. package/dist/{chunk-WD55PEBM.js → chunk-6CH3TPHR.js} +3 -3
  104. package/dist/{chunk-TIXTHUVJ.js → chunk-6WQ3NNCE.js} +3 -3
  105. package/dist/{chunk-7LF5DS3A.js → chunk-6XWTQUO4.js} +1 -1
  106. package/dist/chunk-76CJBM36.js +88 -0
  107. package/dist/{chunk-NFBW7N4D.js → chunk-7CTRGNLW.js} +2 -2
  108. package/dist/{chunk-ITMEE7PQ.js → chunk-7V4JADD6.js} +3 -3
  109. package/dist/{chunk-RMOBQ6A5.js → chunk-AD2VCHSS.js} +1 -1
  110. package/dist/{chunk-DNVFWFYF.js → chunk-AJYCFKJR.js} +1 -1
  111. package/dist/chunk-AM7S2TY6.js +54 -0
  112. package/dist/{chunk-RWSLVYTE.js → chunk-AOHXREB7.js} +295 -67
  113. package/dist/{chunk-DGGDUKH6.js → chunk-ASAFVDVR.js} +1 -1
  114. package/dist/{chunk-NTI22F3R.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-BMHQPIJ2.js → chunk-CE7F6RHG.js} +585 -75
  118. package/dist/{chunk-YWQMWFYR.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-YHUNDGVV.js → chunk-EUS4QUKP.js} +1 -1
  123. package/dist/{chunk-6D2PI4QD.js → chunk-EV46QTD3.js} +1 -1
  124. package/dist/{chunk-N7A5D25S.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-MC4ATFJV.js → chunk-FPFPLPUY.js} +6 -6
  128. package/dist/{chunk-UU4UINUX.js → chunk-G4RGKBCA.js} +2 -2
  129. package/dist/{chunk-HAZO7TRD.js → chunk-G5T6KDG4.js} +1 -1
  130. package/dist/{chunk-TWXZM34M.js → chunk-GBTTBXAF.js} +6 -6
  131. package/dist/{chunk-LA2Z6RMS.js → chunk-GDIJE6D7.js} +1 -1
  132. package/dist/{chunk-4QSJVMMT.js → chunk-GG5NDQNN.js} +2 -2
  133. package/dist/{chunk-6BQG7EKO.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-HSYJ6DZ2.js → chunk-H6BV5TKD.js} +39 -24
  137. package/dist/{chunk-HCJCW7X4.js → chunk-H7I47RS5.js} +34 -1
  138. package/dist/{chunk-GFDGDFBF.js → chunk-HA5R6USD.js} +22 -5
  139. package/dist/{chunk-L2YGXJGF.js → chunk-HAF2DJYV.js} +3 -3
  140. package/dist/chunk-HJ447YER.js +224 -0
  141. package/dist/{chunk-6QW6JHRE.js → chunk-HV4KESRY.js} +59 -32
  142. package/dist/{chunk-BJOBR6P2.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-2UGGBIDL.js → chunk-JGIPOUIK.js} +3 -3
  146. package/dist/{chunk-LLU6WZLK.js → chunk-JLZ4RYSD.js} +2 -2
  147. package/dist/{chunk-WWNQFOSP.js → chunk-JMYHW3AL.js} +2 -2
  148. package/dist/{chunk-KP4PY2Z2.js → chunk-JPUZPAAF.js} +4 -4
  149. package/dist/{chunk-4LWV633D.js → chunk-JTBIS4R5.js} +1 -1
  150. package/dist/{chunk-PPZOWQHP.js → chunk-K7KFGDWF.js} +1 -1
  151. package/dist/{chunk-HNLXMD2V.js → chunk-KGWRTRKC.js} +2 -2
  152. package/dist/{chunk-IB336P52.js → chunk-KP3U5QGJ.js} +1 -1
  153. package/dist/{chunk-OUEFW4RK.js → chunk-KW2SD2FL.js} +2 -2
  154. package/dist/{chunk-2P4WJNN5.js → chunk-KWZMQACA.js} +11 -7
  155. package/dist/{chunk-ATKW3SYL.js → chunk-L2R3LN2P.js} +1 -1
  156. package/dist/{chunk-IELUDZAA.js → chunk-L4A5DL6Z.js} +3 -3
  157. package/dist/{chunk-2C455MU3.js → chunk-LU2FALL6.js} +3 -3
  158. package/dist/{chunk-LOBCQXV5.js → chunk-MKYFAKDW.js} +4 -4
  159. package/dist/{chunk-3BRVLPPA.js → chunk-MOPUCPXK.js} +4 -0
  160. package/dist/{chunk-BR4423AS.js → chunk-MR6LHP4F.js} +1 -1
  161. package/dist/chunk-MVYB76QG.js +341 -0
  162. package/dist/{chunk-ZNE6H2JO.js → chunk-MZM6EJCU.js} +4 -4
  163. package/dist/{chunk-FOV57K47.js → chunk-N7QJKQMX.js} +258 -14
  164. package/dist/{chunk-AYLNJGCS.js → chunk-NBZL5CGA.js} +93 -12
  165. package/dist/{chunk-YLQXP7T7.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-BV6GBSRP.js → chunk-OLMQ4UOF.js} +42 -10
  171. package/dist/{chunk-UIU2DGRV.js → chunk-OTF44GXL.js} +4 -4
  172. package/dist/{chunk-GOGSWXNZ.js → chunk-OZEBAGKR.js} +277 -137
  173. package/dist/{chunk-NDSNM5OH.js → chunk-P5HIWY2E.js} +1 -1
  174. package/dist/{chunk-MJB5ZFQM.js → chunk-PDWS3E22.js} +55 -4
  175. package/dist/{chunk-4FJZ6SO7.js → chunk-PPCDBE6Z.js} +1 -1
  176. package/dist/{chunk-7SEC2AG5.js → chunk-PQIDGXSG.js} +13 -4
  177. package/dist/chunk-PWUFMX75.js +186 -0
  178. package/dist/{chunk-GPW32HVB.js → chunk-QDGZJ653.js} +3 -3
  179. package/dist/{chunk-CYA5S5OD.js → chunk-QOO5RW3K.js} +6 -5
  180. package/dist/{chunk-IXBIVKWZ.js → chunk-QQ4E2RYW.js} +95 -18
  181. package/dist/{chunk-2WMTTIAZ.js → chunk-QRYVCDWS.js} +2 -2
  182. package/dist/{chunk-Z42MXYWW.js → chunk-QWVXN224.js} +110 -28
  183. package/dist/{chunk-XSMRR4IW.js → chunk-QYZJHTNE.js} +26 -27
  184. package/dist/{chunk-I7ECEP3W.js → chunk-R2NN3JKH.js} +43 -6
  185. package/dist/{chunk-B7CUBLF7.js → chunk-RACAOE2Z.js} +13 -13
  186. package/dist/{chunk-5RACW3LX.js → chunk-RAXVPNMR.js} +1 -1
  187. package/dist/{chunk-CMR64RYM.js → chunk-RHWZUUS4.js} +17 -17
  188. package/dist/{chunk-RNAYCUNM.js → chunk-S3THSOWV.js} +1 -1
  189. package/dist/{chunk-U2MREVXQ.js → chunk-S7QUM2UK.js} +2 -2
  190. package/dist/{chunk-SSTLTIF3.js → chunk-SKGMF2SO.js} +25 -2
  191. package/dist/{chunk-J6SEDDOR.js → chunk-SQKXKV2Y.js} +2 -2
  192. package/dist/{chunk-DPFQ2WQX.js → chunk-TLT7NZCW.js} +4 -4
  193. package/dist/chunk-TTCUG2CF.js +91 -0
  194. package/dist/{chunk-W6K4XB6G.js → chunk-UEA3LXOB.js} +1 -1
  195. package/dist/{chunk-WNKVKNOM.js → chunk-UNXQBELK.js} +1 -1
  196. package/dist/{chunk-KKOLHBNC.js → chunk-UP75Z5X7.js} +904 -167
  197. package/dist/{chunk-Y3S4H77G.js → chunk-USSB56WK.js} +1 -1
  198. package/dist/{chunk-PVIH3ZGV.js → chunk-UUEKJDK6.js} +90 -10
  199. package/dist/{chunk-T2PYVVZ5.js → chunk-UUQBZPJJ.js} +1 -1
  200. package/dist/{chunk-32YHCHWW.js → chunk-V3EEVY4L.js} +1 -1
  201. package/dist/{chunk-2IWBY7XK.js → chunk-VPZHJCKW.js} +2 -2
  202. package/dist/chunk-VRAQTFD6.js +265 -0
  203. package/dist/{chunk-EDH54E5A.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-CCIEIRV2.js → chunk-X33NYQYJ.js} +2 -2
  209. package/dist/{chunk-K6KRBXQP.js → chunk-XHK3FS3W.js} +3 -2
  210. package/dist/{chunk-AP455LBW.js → chunk-XZXBB3TN.js} +2 -2
  211. package/dist/{chunk-JSKBHUR7.js → chunk-YCANDMI2.js} +2 -2
  212. package/dist/{chunk-YIIME2OW.js → chunk-YLXTKI6M.js} +1 -1
  213. package/dist/{chunk-LEJ25726.js → chunk-YTCFACP4.js} +650 -434
  214. package/dist/{chunk-HUSVERE6.js → chunk-Z6RSN7KS.js} +7 -6
  215. package/dist/{cleanup-graph-garbage-MXQ4Q2MA.js → cleanup-graph-garbage-XWUFAMFO.js} +8 -8
  216. package/dist/{co-activation-QI5BK4RT.js → co-activation-ZCHPLLP6.js} +4 -4
  217. package/dist/{co-occurrence-BYSQNZSV.js → co-occurrence-KG3LKALN.js} +6 -6
  218. package/dist/{code-context-index-BNBHDXHW.js → code-context-index-WSOJQ72R.js} +5 -5
  219. package/dist/{content-extractor-JRJDNIHP.js → content-extractor-NXYNEF5K.js} +2 -2
  220. package/dist/{conversation-entity-extractor-FPAMTL3C.js → conversation-entity-extractor-D3EFTLT4.js} +2 -2
  221. package/dist/{conversation-wiki-populator-WU4HEQ7C.js → conversation-wiki-populator-WQN3IUU6.js} +1 -1
  222. package/dist/{crdt-sync-ETPKNBCU.js → crdt-sync-4PFGPZXV.js} +8 -1
  223. package/dist/{crm-webhook-M566ZMZS.js → crm-webhook-II7Z45Q6.js} +2 -2
  224. package/dist/cto-delegation-gate-JWWOJPNC.js +669 -0
  225. package/dist/{daemon-auth-7IFSV5FG.js → daemon-auth-3FEAHFWC.js} +5 -3
  226. package/dist/{daemon-orchestration-XV5GN73R.js → daemon-orchestration-FX4XZDR5.js} +45 -26
  227. package/dist/{daemon-ready-RKKB4P6K.js → daemon-ready-4JTSFKAY.js} +1 -1
  228. package/dist/{daemon-ready-signal-WKEJQNRA.js → daemon-ready-signal-LPAZWQOV.js} +3 -1
  229. package/dist/daemon-restart-circuit-breaker-PEGEIP6H.js +35 -0
  230. package/dist/daemon-timer-report-NM44WQRH.js +25 -0
  231. package/dist/{db-backup-MX2G3CEK.js → db-backup-W2QFSYQC.js} +15 -5
  232. package/dist/{db-restore-events-JVEEP52Z.js → db-restore-events-MQ2DBGEQ.js} +2 -2
  233. package/dist/dispatch-ack-VYH3ONSS.js +27 -0
  234. package/dist/{doc-graph-extractor-LR5KMPH7.js → doc-graph-extractor-F6ODFIID.js} +6 -6
  235. package/dist/{documents-FA6N7QDA.js → documents-23WX2FPQ.js} +12 -12
  236. package/dist/dreaming-NWD22UQ5.js +46 -0
  237. package/dist/{exe-drift-TUKTCXZE.js → exe-drift-CW72FBGE.js} +5 -5
  238. package/dist/{exe-export-ZLHBXMZC.js → exe-export-AUJ7CV7G.js} +11 -11
  239. package/dist/{exe-import-VVKBZWSA.js → exe-import-JX4I52VE.js} +11 -11
  240. package/dist/{exe-key-QJXFBF6G.js → exe-key-2N6LY2BU.js} +242 -228
  241. package/dist/{exe-org-BGZNNE4H.js → exe-org-X4CSNCKS.js} +3 -3
  242. package/dist/{exe-snapshot-JRLUO645.js → exe-snapshot-XZ7FVCYZ.js} +30 -28
  243. package/dist/{fast-db-init-JKJEEHUI.js → fast-db-init-4CWHSOOR.js} +1 -1
  244. package/dist/{founder-context-HWPLMZVR.js → founder-context-7L3CFPYN.js} +4 -4
  245. package/dist/gateway/index.js +25 -25
  246. package/dist/{gateway-client-GRBOJQYC.js → gateway-client-7LMZKHTH.js} +1 -1
  247. package/dist/git-main-guard-UZP3KXYI.js +39 -0
  248. package/dist/{git-staleness-X5XZONX3.js → git-staleness-CI2R4QOJ.js} +4 -4
  249. package/dist/{global-procedures-VIIVWB6R.js → global-procedures-XQX3LUH6.js} +6 -6
  250. package/dist/{graph-auto-extract-HCQQF5AG.js → graph-auto-extract-OURWMGBS.js} +6 -6
  251. package/dist/{graph-rag-WAK2BRJH.js → graph-rag-JZZAB7PC.js} +2 -2
  252. package/dist/{hook-integrity-WURH6DS3.js → hook-integrity-XY47IM7G.js} +1 -1
  253. package/dist/hook-prefetch-PHRRKY4C.js +137 -0
  254. package/dist/hooks/bug-report-worker.js +31 -27
  255. package/dist/hooks/codex-stop-task-finalizer.js +31 -27
  256. package/dist/hooks/commit-complete.js +28 -26
  257. package/dist/hooks/error-recall.js +12 -11
  258. package/dist/hooks/exe-heartbeat-hook.js +6 -6
  259. package/dist/hooks/ingest-worker.js +11 -11
  260. package/dist/hooks/ingest.js +18 -18
  261. package/dist/hooks/instructions-loaded.js +7 -7
  262. package/dist/hooks/manifest.json +20 -20
  263. package/dist/hooks/notification.js +7 -7
  264. package/dist/hooks/post-compact.js +27 -25
  265. package/dist/hooks/post-tool-combined.js +12 -12
  266. package/dist/hooks/pre-compact.js +28 -26
  267. package/dist/hooks/pre-tool-use.js +179 -46
  268. package/dist/hooks/prompt-submit.js +323 -272
  269. package/dist/hooks/session-end.js +34 -32
  270. package/dist/hooks/session-start.js +28 -21
  271. package/dist/hooks/stop.js +34 -32
  272. package/dist/hooks/subagent-stop.js +27 -25
  273. package/dist/hooks/summary-worker.js +35 -33
  274. package/dist/index.js +40 -38
  275. package/dist/{installer-6IFVEQI4.js → installer-G3JAO3NT.js} +9 -9
  276. package/dist/{installer-NX2CLNV5.js → installer-JND3RJ6Q.js} +9 -9
  277. package/dist/{installer-T2LGHZKL.js → installer-L7EVH5U5.js} +9 -9
  278. package/dist/{intercom-queue-KYHXXZCQ.js → intercom-queue-ZFEQALR3.js} +24 -22
  279. package/dist/{key-backup-status-TNEHXA2X.js → key-backup-status-LOSMVATJ.js} +2 -2
  280. package/dist/lib/agent-config.js +4 -3
  281. package/dist/lib/cloud-sync.js +19 -19
  282. package/dist/lib/config.js +2 -2
  283. package/dist/lib/consolidation.js +11 -11
  284. package/dist/lib/crypto.js +3 -3
  285. package/dist/lib/database.js +6 -4
  286. package/dist/lib/db-daemon-client.js +5 -5
  287. package/dist/lib/db-read-worker-client.js +9 -3
  288. package/dist/lib/db.js +6 -4
  289. package/dist/lib/device-registry.js +3 -3
  290. package/dist/lib/embed-worker.js +2 -2
  291. package/dist/lib/embedder.js +5 -5
  292. package/dist/lib/employee-templates.js +7 -7
  293. package/dist/lib/employees.js +10 -4
  294. package/dist/lib/exe-daemon-client.js +4 -4
  295. package/dist/lib/exe-daemon.js +588 -164
  296. package/dist/lib/hybrid-search.js +11 -9
  297. package/dist/lib/identity.js +4 -4
  298. package/dist/lib/keychain.js +1 -1
  299. package/dist/lib/license.js +4 -4
  300. package/dist/lib/messaging.js +27 -23
  301. package/dist/lib/post-tool-memory.js +3 -3
  302. package/dist/lib/registry-proxy.js +1 -1
  303. package/dist/lib/reminders.js +15 -7
  304. package/dist/lib/schedules.js +9 -9
  305. package/dist/lib/session-registry.js +6 -6
  306. package/dist/lib/skill-learning.js +10 -10
  307. package/dist/lib/status-brief.js +4 -4
  308. package/dist/lib/store.js +8 -8
  309. package/dist/lib/task-router.js +5 -5
  310. package/dist/lib/tasks.js +28 -24
  311. package/dist/lib/tmux-routing.js +55 -24
  312. package/dist/lib/tmux-status.js +9 -3
  313. package/dist/lib/tmux-transport.js +1 -1
  314. package/dist/lib/token-spend.js +5 -5
  315. package/dist/lib/transport.js +2 -2
  316. package/dist/lib/ws-client.js +1 -1
  317. package/dist/{license-gate-MGDR4YNI.js → license-gate-QTRQHV4F.js} +5 -5
  318. package/dist/{license-sync-UWE6GEB4.js → license-sync-N3UJFWAW.js} +4 -4
  319. package/dist/mcp/register-tools.js +97 -91
  320. package/dist/mcp/server.js +99 -93
  321. package/dist/mcp/tools/complete-reminder.js +6 -6
  322. package/dist/mcp/tools/create-reminder.js +6 -6
  323. package/dist/mcp/tools/create-task.js +36 -27
  324. package/dist/mcp/tools/deactivate-behavior.js +11 -11
  325. package/dist/mcp/tools/list-reminders.js +6 -6
  326. package/dist/mcp/tools/list-tasks.js +34 -28
  327. package/dist/mcp/tools/send-message.js +27 -25
  328. package/dist/mcp/tools/update-task.js +33 -27
  329. package/dist/{mcp-http-config-RQLYEPTL.js → mcp-http-config-BDL36JZ3.js} +6 -6
  330. package/dist/{mcp-port-config-FFAMMLLE.js → mcp-port-config-6HYY6J7K.js} +2 -2
  331. package/dist/mcp-session-identity-T7H2EKFQ.js +177 -0
  332. package/dist/{memory-cards-VYQ5DPMR.js → memory-cards-ZRDW7QBX.js} +8 -8
  333. package/dist/{memory-graph-extractor-GX2HNYLU.js → memory-graph-extractor-QLXDMHRS.js} +7 -7
  334. package/dist/{memory-poisoning-defense-TX7627BD.js → memory-poisoning-defense-HJTXYCWH.js} +4 -4
  335. package/dist/{memory-pressure-watchdog-MLNNH26B.js → memory-pressure-watchdog-HN5X7AVN.js} +75 -36
  336. package/dist/{memory-queue-X2CSEAKE.js → memory-queue-2UOOF27L.js} +5 -3
  337. package/dist/{memory-queue-client-YRL6XTGU.js → memory-queue-client-O5U6F6XP.js} +6 -6
  338. package/dist/{memory-reflection-KIGEFSI4.js → memory-reflection-WVNFBJAA.js} +4 -4
  339. package/dist/{monitor-grants-RZOVSYVO.js → monitor-grants-E3ELDEWD.js} +5 -5
  340. package/dist/{monitor-identity-MOXISYNG.js → monitor-identity-GLFZSEAH.js} +2 -2
  341. package/dist/{notification-ledger-B6AVEGMV.js → notification-ledger-SZEPGJQ7.js} +25 -23
  342. package/dist/{notifications-DWXV7SVL.js → notifications-4UT53CDG.js} +24 -22
  343. package/dist/{orchestration-events-ZG7O4HRY.js → orchestration-events-WV4NWKZH.js} +5 -5
  344. package/dist/{orchestration-phase-CXRCBCK7.js → orchestration-phase-AWBXPO52.js} +3 -3
  345. package/dist/orchestrator-UAC3RW2T.js +47 -0
  346. package/dist/{pipeline-router-RTLAGZTA.js → pipeline-router-LM53NMWJ.js} +5 -5
  347. package/dist/{plan-limits-WLQZTCSF.js → plan-limits-2FEY2GOS.js} +7 -7
  348. package/dist/platform-procedures-X5DFJFV7.js +13 -0
  349. package/dist/{preferences-TYTGDXQZ.js → preferences-TWIXZBKS.js} +2 -2
  350. package/dist/{project-boot-6CGQ3EAH.js → project-boot-4NUH5FRU.js} +2 -2
  351. package/dist/{projection-worker-44SEKTZ5.js → projection-worker-FZ7YSN3G.js} +5 -5
  352. package/dist/{prospective-memory-UACFTYXK.js → prospective-memory-6D2ASWM3.js} +4 -4
  353. package/dist/{push-notifications-W5JRXLKJ.js → push-notifications-U6FIBQRW.js} +3 -3
  354. package/dist/{reranker-NL4YAV6R.js → reranker-GYYRPANK.js} +3 -3
  355. package/dist/{retrieval-health-4C2PO6HH.js → retrieval-health-4Z242P3B.js} +1 -1
  356. package/dist/{review-polling-W5AMHNLT.js → review-polling-HXAFJZDA.js} +25 -23
  357. package/dist/runtime/index.js +35 -33
  358. package/dist/{session-events-PGL5GJEB.js → session-events-O3BV56ZX.js} +25 -23
  359. package/dist/{session-kill-telemetry-6YDGEF27.js → session-kill-telemetry-AELE4JDK.js} +25 -23
  360. package/dist/session-mcp-config-YKNXG5DW.js +50 -0
  361. package/dist/{session-scope-3MEOO557.js → session-scope-5EAPUT45.js} +24 -22
  362. package/dist/setup-wizard-NB6R4QVS.js +14 -0
  363. package/dist/{shard-manager-MBWQEYNG.js → shard-manager-35PWFR3B.js} +3 -3
  364. package/dist/{skill-refinement-EOROTBPX.js → skill-refinement-DVSYXBBP.js} +5 -5
  365. package/dist/{stack-release-PR2XKJ4Q.js → stack-release-HGFFFCGC.js} +90 -15
  366. package/dist/{stack-update-LMDM27ZW.js → stack-update-ATCJFOEK.js} +5 -5
  367. package/dist/{steward-gate-4A2XHYFD.js → steward-gate-3GQ5XKMJ.js} +5 -5
  368. package/dist/{support-inbox-Z77ACQUY.js → support-inbox-4L62P4EP.js} +7 -6
  369. package/dist/{support-outbox-GB5SQFRJ.js → support-outbox-WHGPUYL2.js} +2 -2
  370. package/dist/task-enforcement-IPIZX2MM.js +90 -0
  371. package/dist/{task-scope-EKYDCVUF.js → task-scope-FOIW25HR.js} +26 -22
  372. package/dist/{tasks-crud-6LBNU43G.js → tasks-crud-HBDKE6C5.js} +34 -22
  373. package/dist/tasks-notify-G2U2U2YA.js +53 -0
  374. package/dist/{tasks-review-PBIUYXAL.js → tasks-review-27SFX5XN.js} +26 -22
  375. package/dist/{telemetry-upload-WQDFABTF.js → telemetry-upload-ZOXHRWR5.js} +9 -9
  376. package/dist/tmux-command-guard-KSJKIX3C.js +117 -0
  377. package/dist/{token-budget-KWGL5DY7.js → token-budget-5Y4YPDO3.js} +5 -5
  378. package/dist/{tool-capability-index-EH3HQVHU.js → tool-capability-index-VYF5GNJ2.js} +1 -1
  379. package/dist/{tool-telemetry-UC55LSIH.js → tool-telemetry-KBXSBDTK.js} +1 -1
  380. package/dist/tui/App.js +39 -37
  381. package/dist/{tui-data-M3RBSJL3.js → tui-data-NLFMBIQI.js} +24 -22
  382. package/dist/{update-check-HFO4VHO4.js → update-check-3FHAWIG2.js} +7 -3
  383. package/dist/{update-support-VPBD5SD2.js → update-support-UVUSZG7R.js} +93 -93
  384. package/dist/{whatsapp-accounts-BWRZUY23.js → whatsapp-accounts-BFIOXYW5.js} +1 -1
  385. package/dist/{whatsapp-config-GOSELKTE.js → whatsapp-config-FAX6EA5K.js} +20 -13
  386. package/dist/{worker-gate-4QLLMXZM.js → worker-gate-3KUBAU32.js} +3 -3
  387. package/dist/{workflow-engine-MMEHKUN4.js → workflow-engine-YITHXZR5.js} +2 -2
  388. package/dist/{working-memory-PY4AG577.js → working-memory-NUVB5SFV.js} +1 -1
  389. package/dist/worktree-LL62PLQB.js +47 -0
  390. package/dist/{worktree-sweep-5WKBU7E6.js → worktree-sweep-WTK3MTKH.js} +7 -7
  391. package/package.json +3 -2
  392. package/release-notes.json +75 -43
  393. package/dist/branch-hygiene-R5NVTRAY.js +0 -138
  394. package/dist/chunk-7YORGTXC.js +0 -138
  395. package/dist/chunk-CCPHEPLU.js +0 -30
  396. package/dist/chunk-HMP5VT6A.js +0 -118
  397. package/dist/chunk-PVYR4FCQ.js +0 -113
  398. package/dist/chunk-RP5GETX5.js +0 -140
  399. package/dist/chunk-YGAAZN3E.js +0 -47
  400. package/dist/cto-delegation-gate-S734XDXT.js +0 -290
  401. package/dist/dispatch-ack-4S44HBWB.js +0 -15
  402. package/dist/dreaming-UKGTQT6I.js +0 -44
  403. package/dist/orchestrator-PGHJDUUT.js +0 -45
  404. package/dist/setup-wizard-CJIYDSSP.js +0 -13
  405. package/dist/tasks-notify-TFJLSQ3B.js +0 -50
  406. package/dist/worktree-YXBDRYOC.js +0 -31
  407. package/dist/{chunk-7UMCQQWS.js → chunk-A4DVMPYB.js} +3 -3
  408. /package/dist/{chunk-2KLAYDFB.js → chunk-GIBYNT6W.js} +0 -0
  409. /package/dist/{chunk-MC6VPZKS.js → chunk-JRM4TAGS.js} +0 -0
  410. /package/dist/{chunk-3NCZKWPO.js → chunk-MGGOSFCR.js} +0 -0
  411. /package/dist/{chunk-C2SRRCRK.js → chunk-QIFYLIUF.js} +0 -0
  412. /package/dist/{chunk-OADURIIN.js → chunk-WTH4CSAP.js} +0 -0
  413. /package/dist/{core-memory-3IBWM4WR.js → core-memory-GAC6EWOQ.js} +0 -0
  414. /package/dist/{entity-boost-DWAWXFKN.js → entity-boost-NT6UO2Z3.js} +0 -0
  415. /package/dist/{message-queue-client-3PTHPG5Q.js → message-queue-client-4EOQRUXW.js} +0 -0
  416. /package/dist/{oauth-server-M5TGXT6D.js → oauth-server-67YBDP32.js} +0 -0
  417. /package/dist/{webhook-pipe-FZYLO6RR.js → webhook-pipe-LEXMUQ5B.js} +0 -0
  418. /package/dist/{wiki-acl-7CROE3MJ.js → wiki-acl-74BLWG6J.js} +0 -0
  419. /package/dist/{wiki-client-VNDOBK63.js → wiki-client-EAN7F5LV.js} +0 -0
@@ -0,0 +1,107 @@
1
+ import {
2
+ queryTaskRows
3
+ } from "./chunk-UP75Z5X7.js";
4
+ import "./chunk-L2R3LN2P.js";
5
+ import "./chunk-I26FWCSP.js";
6
+ import "./chunk-EV46QTD3.js";
7
+ import "./chunk-E23LNUWJ.js";
8
+ import "./chunk-4JERP7NT.js";
9
+ import "./chunk-EIKATSE4.js";
10
+ import "./chunk-KGWRTRKC.js";
11
+ import "./chunk-AD2VCHSS.js";
12
+ import "./chunk-WOYADZF5.js";
13
+ import "./chunk-SKGMF2SO.js";
14
+ import "./chunk-2WAVZ5UJ.js";
15
+ import "./chunk-HA5R6USD.js";
16
+ import "./chunk-AM7S2TY6.js";
17
+ import "./chunk-JGIPOUIK.js";
18
+ import "./chunk-GWDSB25T.js";
19
+ import "./chunk-CVYC6DUW.js";
20
+ import "./chunk-JLZ4RYSD.js";
21
+ import "./chunk-H7I47RS5.js";
22
+ import "./chunk-OPU3NYOO.js";
23
+ import "./chunk-G4RGKBCA.js";
24
+ import "./chunk-AFNRE2RV.js";
25
+ import "./chunk-X2Q5NLUL.js";
26
+ import "./chunk-NLEW62VC.js";
27
+ import "./chunk-HYZV25LY.js";
28
+ import "./chunk-GJV3WDWM.js";
29
+ import "./chunk-MP2AFCGL.js";
30
+ import "./chunk-AOHXREB7.js";
31
+ import "./chunk-2I23RPSI.js";
32
+ import "./chunk-OLMQ4UOF.js";
33
+ import "./chunk-PNQDP3OA.js";
34
+ import "./chunk-H73TUI4Y.js";
35
+ import "./chunk-7HLWBYH7.js";
36
+ import "./chunk-FXU7JOXK.js";
37
+ import "./chunk-NGP6LSV2.js";
38
+ import "./chunk-PQIDGXSG.js";
39
+ import "./chunk-K7KFGDWF.js";
40
+ import "./chunk-WZHZCDDO.js";
41
+ import "./chunk-BYTDMAGB.js";
42
+ import "./chunk-MLKGABMK.js";
43
+
44
+ // src/lib/boot-review-sections.ts
45
+ var QUERY_LIMIT = 50;
46
+ var DISPLAY_LIMIT = 10;
47
+ var COLUMNS = "id, title, priority, project_name, status, assigned_to";
48
+ function formatRow(r, suffix) {
49
+ const priority = String(r.priority ?? "med").toUpperCase();
50
+ const title = String(r.title ?? "(untitled)");
51
+ const project = r.project_name ? String(r.project_name) : "unknown";
52
+ return `- [${priority}] ${title} (${project})${suffix}`;
53
+ }
54
+ function renderSection(header, lead, rows, suffixFor) {
55
+ if (rows.length === 0) return "";
56
+ const shown = rows.slice(0, DISPLAY_LIMIT);
57
+ const lines = shown.map((r) => formatRow(r, suffixFor(r)));
58
+ const hidden = rows.length - shown.length;
59
+ if (hidden > 0) lines.push(`... and ${hidden} more`);
60
+ return `## ${header}
61
+ ${lead}
62
+ ${lines.join("\n")}`;
63
+ }
64
+ async function buildReviewSections(agentId, sessionScope) {
65
+ if (!agentId || agentId === "default") return "";
66
+ const [pendingRows, blockedRows] = await Promise.all([
67
+ // Tasks where THIS agent is the reviewer and work is waiting on them.
68
+ queryTaskRows({
69
+ reviewer: agentId,
70
+ status: "needs_review",
71
+ columns: COLUMNS,
72
+ sessionScope: sessionScope ?? null,
73
+ projectName: null,
74
+ orderBy: "priority ASC, updated_at ASC",
75
+ limit: QUERY_LIMIT
76
+ }).catch(() => []),
77
+ // Tasks assigned to THIS agent that are blocked.
78
+ queryTaskRows({
79
+ assignedTo: agentId,
80
+ status: "blocked",
81
+ columns: COLUMNS,
82
+ sessionScope: sessionScope ?? null,
83
+ projectName: null,
84
+ orderBy: "priority ASC, updated_at ASC",
85
+ limit: QUERY_LIMIT
86
+ }).catch(() => [])
87
+ ]);
88
+ const sections = [];
89
+ const pending = renderSection(
90
+ "\u{1F4CB} PENDING YOUR REVIEW",
91
+ "Work is done and waiting on YOU \u2014 it stalls until you review it:",
92
+ pendingRows,
93
+ (r) => ` \u2014 from ${r.assigned_to ? String(r.assigned_to) : "unknown"}`
94
+ );
95
+ if (pending) sections.push(pending);
96
+ const blocked = renderSection(
97
+ "\u{1F534} BLOCKED TASKS",
98
+ "Your tasks that are blocked and cannot progress:",
99
+ blockedRows,
100
+ () => ""
101
+ );
102
+ if (blocked) sections.push(blocked);
103
+ return sections.join("\n\n");
104
+ }
105
+ export {
106
+ buildReviewSections
107
+ };
@@ -0,0 +1,224 @@
1
+ import {
2
+ EXE_AI_DIR
3
+ } from "./chunk-WZHZCDDO.js";
4
+ import "./chunk-BYTDMAGB.js";
5
+ import "./chunk-MLKGABMK.js";
6
+
7
+ // src/lib/branch-hygiene.ts
8
+ import { execFile } from "child_process";
9
+ import { promisify } from "util";
10
+ import { mkdirSync, readFileSync, writeFileSync } from "fs";
11
+ import { join } from "path";
12
+ var execFileAsync = promisify(execFile);
13
+ var GIT_TIMEOUT_MS = 4e3;
14
+ var MAX_BRANCHES_SCANNED = 60;
15
+ var DEFAULT_LISTING_CAP = 10;
16
+ var SCAN_CONCURRENCY = 8;
17
+ var DEFAULT_CACHE_MAX_AGE_MS = 90 * 60 * 1e3;
18
+ async function git(repoRoot, args) {
19
+ const { stdout } = await execFileAsync("git", args, {
20
+ cwd: repoRoot,
21
+ encoding: "utf8",
22
+ timeout: GIT_TIMEOUT_MS
23
+ });
24
+ return stdout.trim();
25
+ }
26
+ async function detectRemoteBase(repoRoot) {
27
+ for (const candidate of ["main", "master"]) {
28
+ try {
29
+ await git(repoRoot, ["rev-parse", "--verify", `refs/remotes/origin/${candidate}`]);
30
+ return `origin/${candidate}`;
31
+ } catch {
32
+ }
33
+ }
34
+ return null;
35
+ }
36
+ function parseRefLine(line) {
37
+ const [name, committedAt] = line.split("");
38
+ if (!name) return null;
39
+ return { name: name.replace(/^origin\//, ""), committedAt: committedAt ?? "" };
40
+ }
41
+ async function mapPool(items, concurrency, fn) {
42
+ const results = new Array(items.length);
43
+ let next = 0;
44
+ const worker = async () => {
45
+ for (; ; ) {
46
+ const i = next++;
47
+ if (i >= items.length) return;
48
+ results[i] = await fn(items[i]);
49
+ }
50
+ };
51
+ const lanes = Math.max(1, Math.min(concurrency, items.length));
52
+ await Promise.all(Array.from({ length: lanes }, () => worker()));
53
+ return results;
54
+ }
55
+ async function scanUnmergedBranchesRaw(repoRoot) {
56
+ const emptyRaw = { branches: [], truncated: false };
57
+ let base;
58
+ try {
59
+ base = await detectRemoteBase(repoRoot);
60
+ } catch {
61
+ return emptyRaw;
62
+ }
63
+ if (!base) return emptyRaw;
64
+ const baseRef = base;
65
+ let lines;
66
+ try {
67
+ const raw = await git(repoRoot, [
68
+ "for-each-ref",
69
+ `--no-merged=${baseRef}`,
70
+ "--sort=-committerdate",
71
+ "--format=%(refname:short)%(committerdate:iso-strict)",
72
+ "refs/remotes/origin"
73
+ ]);
74
+ lines = raw ? raw.split("\n") : [];
75
+ } catch {
76
+ return emptyRaw;
77
+ }
78
+ const baseShort = baseRef.replace(/^origin\//, "");
79
+ const candidates = [];
80
+ let truncated = false;
81
+ for (const line of lines) {
82
+ const parsed = parseRefLine(line);
83
+ if (!parsed) continue;
84
+ if (parsed.name === baseShort || parsed.name === "HEAD") continue;
85
+ if (candidates.length >= MAX_BRANCHES_SCANNED) {
86
+ truncated = true;
87
+ break;
88
+ }
89
+ candidates.push(parsed);
90
+ }
91
+ const counted = await mapPool(candidates, SCAN_CONCURRENCY, async (c) => {
92
+ let ahead = 0;
93
+ try {
94
+ const cnt = await git(repoRoot, ["rev-list", "--count", `${baseRef}..origin/${c.name}`]);
95
+ ahead = parseInt(cnt, 10) || 0;
96
+ } catch {
97
+ ahead = 0;
98
+ }
99
+ return { c, ahead };
100
+ });
101
+ const now = Date.now();
102
+ const out = [];
103
+ for (const { c, ahead } of counted) {
104
+ if (ahead <= 0) continue;
105
+ const committedMs = c.committedAt ? Date.parse(c.committedAt) : NaN;
106
+ const ageHours = Number.isFinite(committedMs) ? Math.max(0, (now - committedMs) / 36e5) : 0;
107
+ out.push({ name: c.name, ahead, committedAt: c.committedAt, ageHours, filesChanged: 0 });
108
+ }
109
+ return { branches: out, truncated };
110
+ }
111
+ function finalizeScan(rawBranches, truncated, staleHours, listingCap, now = Date.now()) {
112
+ const refreshed = rawBranches.map((b) => {
113
+ const ms = b.committedAt ? Date.parse(b.committedAt) : NaN;
114
+ const ageHours = Number.isFinite(ms) ? Math.max(0, (now - ms) / 36e5) : b.ageHours;
115
+ return { ...b, ageHours };
116
+ });
117
+ const staleCount = refreshed.filter((b) => b.ageHours >= staleHours).length;
118
+ return {
119
+ branches: refreshed.slice(0, listingCap),
120
+ total: refreshed.length,
121
+ staleCount,
122
+ truncated
123
+ };
124
+ }
125
+ async function scanUnmergedBranches(repoRoot, options = {}) {
126
+ const staleHours = options.staleHours ?? 24;
127
+ const listingCap = options.listingCap ?? DEFAULT_LISTING_CAP;
128
+ let raw;
129
+ try {
130
+ raw = await scanUnmergedBranchesRaw(repoRoot);
131
+ } catch {
132
+ return { branches: [], total: 0, staleCount: 0, truncated: false };
133
+ }
134
+ return finalizeScan(raw.branches, raw.truncated, staleHours, listingCap);
135
+ }
136
+ var BRANCH_SCAN_CACHE_VERSION = 1;
137
+ function branchScanCacheDir() {
138
+ return join(EXE_AI_DIR, "session-cache");
139
+ }
140
+ function branchScanCachePath() {
141
+ return join(branchScanCacheDir(), "branch-scan.json");
142
+ }
143
+ function readBranchScanCacheFile() {
144
+ try {
145
+ const parsed = JSON.parse(readFileSync(branchScanCachePath(), "utf8"));
146
+ if (!parsed || parsed.version !== BRANCH_SCAN_CACHE_VERSION || typeof parsed.repos !== "object") {
147
+ return null;
148
+ }
149
+ return parsed;
150
+ } catch {
151
+ return null;
152
+ }
153
+ }
154
+ function writeBranchScanCacheEntry(repoRoot, entry) {
155
+ try {
156
+ mkdirSync(branchScanCacheDir(), { recursive: true });
157
+ const file = readBranchScanCacheFile() ?? { version: BRANCH_SCAN_CACHE_VERSION, repos: {} };
158
+ file.repos[repoRoot] = entry;
159
+ writeFileSync(branchScanCachePath(), JSON.stringify(file));
160
+ } catch {
161
+ }
162
+ }
163
+ async function scanUnmergedBranchesCached(repoRoot, options = {}, cacheOpts = {}) {
164
+ const staleHours = options.staleHours ?? 24;
165
+ const listingCap = options.listingCap ?? DEFAULT_LISTING_CAP;
166
+ const maxAgeMs = cacheOpts.maxAgeMs ?? DEFAULT_CACHE_MAX_AGE_MS;
167
+ if (!cacheOpts.forceRefresh) {
168
+ const entry = readBranchScanCacheFile()?.repos[repoRoot];
169
+ if (entry?.scannedAt) {
170
+ const age = Date.now() - Date.parse(entry.scannedAt);
171
+ if (Number.isFinite(age) && age >= 0 && age <= maxAgeMs) {
172
+ return finalizeScan(entry.branches ?? [], entry.truncated ?? false, staleHours, listingCap);
173
+ }
174
+ }
175
+ }
176
+ let raw;
177
+ try {
178
+ raw = await scanUnmergedBranchesRaw(repoRoot);
179
+ } catch {
180
+ return { branches: [], total: 0, staleCount: 0, truncated: false };
181
+ }
182
+ writeBranchScanCacheEntry(repoRoot, {
183
+ scannedAt: (/* @__PURE__ */ new Date()).toISOString(),
184
+ branches: raw.branches,
185
+ truncated: raw.truncated
186
+ });
187
+ return finalizeScan(raw.branches, raw.truncated, staleHours, listingCap);
188
+ }
189
+ function slugForMatch(input) {
190
+ return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
191
+ }
192
+ async function findMatchingBranches(repoRoot, opts) {
193
+ const result = [];
194
+ const scan = await scanUnmergedBranches(repoRoot, { listingCap: MAX_BRANCHES_SCANNED });
195
+ if (scan.branches.length === 0) return result;
196
+ const idToken = opts.id ? slugForMatch(opts.id) : "";
197
+ const shortId = idToken ? idToken.replace(/-/g, "").slice(0, 8) : "";
198
+ const titleSlug = opts.title ? slugForMatch(opts.title) : "";
199
+ const titleTokens = new Set(titleSlug.split("-").filter((t) => t.length >= 4));
200
+ for (const b of scan.branches) {
201
+ const branchSlug = slugForMatch(b.name);
202
+ const branchCompact = branchSlug.replace(/-/g, "");
203
+ let matched = false;
204
+ if (idToken && (branchSlug.includes(idToken) || shortId && branchCompact.includes(shortId))) {
205
+ matched = true;
206
+ } else if (titleTokens.size > 0) {
207
+ const branchTokens = new Set(branchSlug.split("-"));
208
+ let overlap = 0;
209
+ for (const t of titleTokens) if (branchTokens.has(t)) overlap++;
210
+ if (overlap >= 2) matched = true;
211
+ }
212
+ if (matched) {
213
+ result.push({ name: b.name, ahead: b.ahead, ageHours: b.ageHours });
214
+ }
215
+ }
216
+ return result;
217
+ }
218
+ export {
219
+ DEFAULT_LISTING_CAP,
220
+ findMatchingBranches,
221
+ scanUnmergedBranches,
222
+ scanUnmergedBranchesCached,
223
+ slugForMatch
224
+ };
@@ -8,9 +8,9 @@ import {
8
8
  loadBranding,
9
9
  saveBranding,
10
10
  validateBranding
11
- } from "./chunk-TPHCZDE3.js";
12
- import "./chunk-7Y5UDEVM.js";
13
- import "./chunk-SHIICYJW.js";
11
+ } from "./chunk-O5V57XYE.js";
12
+ import "./chunk-WZHZCDDO.js";
13
+ import "./chunk-BYTDMAGB.js";
14
14
  import "./chunk-MLKGABMK.js";
15
15
  export {
16
16
  BRANDING_PATH,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  enforcePrivateFileSync,
3
3
  ensurePrivateDirSync
4
- } from "./chunk-SHIICYJW.js";
4
+ } from "./chunk-BYTDMAGB.js";
5
5
  import "./chunk-MLKGABMK.js";
6
6
 
7
7
  // src/lib/browser-session-store.ts
@@ -36,6 +36,7 @@ function isCookieCryptoInitialized() {
36
36
  }
37
37
  function encrypt(data) {
38
38
  if (!_cookieKey) {
39
+ process.stderr.write("[browser-session-store] WARNING: cookie encryption key not initialized \u2014 storing cookies with base64 encoding only (file permissions protect)\n");
39
40
  return "plain:" + Buffer.from(data, "utf-8").toString("base64");
40
41
  }
41
42
  const iv = crypto.randomBytes(IV_LENGTH);
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getIdentity,
3
3
  loadEmployeesSync
4
- } from "./chunk-RWSLVYTE.js";
4
+ } from "./chunk-AOHXREB7.js";
5
5
  import "./chunk-2I23RPSI.js";
6
- import "./chunk-BV6GBSRP.js";
6
+ import "./chunk-OLMQ4UOF.js";
7
7
  import {
8
8
  getRoleCapabilities
9
9
  } from "./chunk-PNQDP3OA.js";
10
10
  import "./chunk-H73TUI4Y.js";
11
11
  import "./chunk-7HLWBYH7.js";
12
12
  import "./chunk-FXU7JOXK.js";
13
- import "./chunk-7Y5UDEVM.js";
14
- import "./chunk-SHIICYJW.js";
13
+ import "./chunk-WZHZCDDO.js";
14
+ import "./chunk-BYTDMAGB.js";
15
15
  import "./chunk-MLKGABMK.js";
16
16
 
17
17
  // src/lib/capability-cards.ts
@@ -8,45 +8,47 @@ import {
8
8
  isAtCapacity,
9
9
  isWithinRelaunchCooldown,
10
10
  pollCapacityDead
11
- } from "./chunk-MC4ATFJV.js";
12
- import "./chunk-IELUDZAA.js";
13
- import "./chunk-KKOLHBNC.js";
14
- import "./chunk-ATKW3SYL.js";
15
- import "./chunk-BJOBR6P2.js";
16
- import "./chunk-6D2PI4QD.js";
11
+ } from "./chunk-FPFPLPUY.js";
12
+ import "./chunk-L4A5DL6Z.js";
13
+ import "./chunk-UP75Z5X7.js";
14
+ import "./chunk-L2R3LN2P.js";
15
+ import "./chunk-I26FWCSP.js";
16
+ import "./chunk-EV46QTD3.js";
17
17
  import "./chunk-E23LNUWJ.js";
18
18
  import "./chunk-4JERP7NT.js";
19
19
  import "./chunk-EIKATSE4.js";
20
- import "./chunk-HNLXMD2V.js";
21
- import "./chunk-RMOBQ6A5.js";
22
- import "./chunk-54QCG45Y.js";
23
- import "./chunk-SSTLTIF3.js";
24
- import "./chunk-WH7XN5ER.js";
25
- import "./chunk-GFDGDFBF.js";
26
- import "./chunk-NGP6LSV2.js";
27
- import "./chunk-2UGGBIDL.js";
20
+ import "./chunk-KGWRTRKC.js";
21
+ import "./chunk-AD2VCHSS.js";
22
+ import "./chunk-WOYADZF5.js";
23
+ import "./chunk-SKGMF2SO.js";
24
+ import "./chunk-2WAVZ5UJ.js";
25
+ import "./chunk-HA5R6USD.js";
26
+ import "./chunk-AM7S2TY6.js";
27
+ import "./chunk-JGIPOUIK.js";
28
+ import "./chunk-GWDSB25T.js";
28
29
  import "./chunk-CVYC6DUW.js";
29
- import "./chunk-LLU6WZLK.js";
30
- import "./chunk-HCJCW7X4.js";
30
+ import "./chunk-JLZ4RYSD.js";
31
+ import "./chunk-H7I47RS5.js";
31
32
  import "./chunk-OPU3NYOO.js";
32
- import "./chunk-UU4UINUX.js";
33
+ import "./chunk-G4RGKBCA.js";
33
34
  import "./chunk-AFNRE2RV.js";
34
- import "./chunk-3NGZ4PL7.js";
35
+ import "./chunk-X2Q5NLUL.js";
35
36
  import "./chunk-NLEW62VC.js";
36
37
  import "./chunk-HYZV25LY.js";
37
38
  import "./chunk-GJV3WDWM.js";
38
39
  import "./chunk-MP2AFCGL.js";
39
- import "./chunk-RWSLVYTE.js";
40
+ import "./chunk-AOHXREB7.js";
40
41
  import "./chunk-2I23RPSI.js";
41
- import "./chunk-BV6GBSRP.js";
42
+ import "./chunk-OLMQ4UOF.js";
42
43
  import "./chunk-PNQDP3OA.js";
43
44
  import "./chunk-H73TUI4Y.js";
44
45
  import "./chunk-7HLWBYH7.js";
45
46
  import "./chunk-FXU7JOXK.js";
46
- import "./chunk-7SEC2AG5.js";
47
- import "./chunk-PPZOWQHP.js";
48
- import "./chunk-7Y5UDEVM.js";
49
- import "./chunk-SHIICYJW.js";
47
+ import "./chunk-NGP6LSV2.js";
48
+ import "./chunk-PQIDGXSG.js";
49
+ import "./chunk-K7KFGDWF.js";
50
+ import "./chunk-WZHZCDDO.js";
51
+ import "./chunk-BYTDMAGB.js";
50
52
  import "./chunk-MLKGABMK.js";
51
53
  export {
52
54
  CTX_FLOOR_PERCENT,
@@ -1,55 +1,58 @@
1
1
  import {
2
2
  lightweightSearch
3
- } from "./chunk-FOV57K47.js";
3
+ } from "./chunk-N7QJKQMX.js";
4
4
  import "./chunk-AB4PAQYK.js";
5
- import "./chunk-EDH54E5A.js";
5
+ import "./chunk-VSRPS3J7.js";
6
6
  import "./chunk-CHCA3ZM2.js";
7
7
  import "./chunk-OTVEIJUQ.js";
8
- import "./chunk-7LF5DS3A.js";
9
- import "./chunk-RP5GETX5.js";
8
+ import "./chunk-6XWTQUO4.js";
9
+ import "./chunk-76CJBM36.js";
10
+ import "./chunk-4QCFFW2H.js";
10
11
  import {
11
12
  sessionScopeFilter,
12
13
  strictSessionScopeFilter
13
- } from "./chunk-KKOLHBNC.js";
14
- import "./chunk-ATKW3SYL.js";
15
- import "./chunk-BJOBR6P2.js";
16
- import "./chunk-6D2PI4QD.js";
14
+ } from "./chunk-UP75Z5X7.js";
15
+ import "./chunk-L2R3LN2P.js";
16
+ import "./chunk-I26FWCSP.js";
17
+ import "./chunk-EV46QTD3.js";
17
18
  import "./chunk-E23LNUWJ.js";
18
19
  import "./chunk-4JERP7NT.js";
19
20
  import "./chunk-EIKATSE4.js";
20
- import "./chunk-HNLXMD2V.js";
21
- import "./chunk-RMOBQ6A5.js";
22
- import "./chunk-54QCG45Y.js";
23
- import "./chunk-SSTLTIF3.js";
24
- import "./chunk-WH7XN5ER.js";
25
- import "./chunk-GFDGDFBF.js";
26
- import "./chunk-NGP6LSV2.js";
27
- import "./chunk-2UGGBIDL.js";
21
+ import "./chunk-KGWRTRKC.js";
22
+ import "./chunk-AD2VCHSS.js";
23
+ import "./chunk-WOYADZF5.js";
24
+ import "./chunk-SKGMF2SO.js";
25
+ import "./chunk-2WAVZ5UJ.js";
26
+ import "./chunk-HA5R6USD.js";
27
+ import "./chunk-AM7S2TY6.js";
28
+ import "./chunk-JGIPOUIK.js";
29
+ import "./chunk-GWDSB25T.js";
28
30
  import "./chunk-CVYC6DUW.js";
29
- import "./chunk-LLU6WZLK.js";
30
- import "./chunk-HCJCW7X4.js";
31
+ import "./chunk-JLZ4RYSD.js";
32
+ import "./chunk-H7I47RS5.js";
31
33
  import "./chunk-OPU3NYOO.js";
32
- import "./chunk-UU4UINUX.js";
34
+ import "./chunk-G4RGKBCA.js";
33
35
  import "./chunk-AFNRE2RV.js";
34
- import "./chunk-3NGZ4PL7.js";
36
+ import "./chunk-X2Q5NLUL.js";
35
37
  import "./chunk-NLEW62VC.js";
36
38
  import "./chunk-HYZV25LY.js";
37
39
  import "./chunk-GJV3WDWM.js";
38
40
  import "./chunk-MP2AFCGL.js";
39
41
  import {
40
42
  getClient
41
- } from "./chunk-RWSLVYTE.js";
43
+ } from "./chunk-AOHXREB7.js";
42
44
  import "./chunk-2I23RPSI.js";
43
- import "./chunk-BV6GBSRP.js";
45
+ import "./chunk-OLMQ4UOF.js";
44
46
  import "./chunk-PNQDP3OA.js";
45
47
  import "./chunk-H73TUI4Y.js";
46
48
  import "./chunk-7HLWBYH7.js";
47
49
  import "./chunk-FXU7JOXK.js";
48
- import "./chunk-Z42MXYWW.js";
49
- import "./chunk-7SEC2AG5.js";
50
- import "./chunk-PPZOWQHP.js";
51
- import "./chunk-7Y5UDEVM.js";
52
- import "./chunk-SHIICYJW.js";
50
+ import "./chunk-QWVXN224.js";
51
+ import "./chunk-NGP6LSV2.js";
52
+ import "./chunk-PQIDGXSG.js";
53
+ import "./chunk-K7KFGDWF.js";
54
+ import "./chunk-WZHZCDDO.js";
55
+ import "./chunk-BYTDMAGB.js";
53
56
  import "./chunk-MLKGABMK.js";
54
57
 
55
58
  // src/lib/catchup-brief.ts
@@ -156,7 +159,7 @@ ${msgLines}`);
156
159
  } catch {
157
160
  }
158
161
  try {
159
- const { getPendingProspective, markSurfaced } = await import("./prospective-memory-UACFTYXK.js");
162
+ const { getPendingProspective, markSurfaced } = await import("./prospective-memory-6D2ASWM3.js");
160
163
  const due = await getPendingProspective(agentId, { projectName, limit: 5 });
161
164
  if (due.length > 0) {
162
165
  const now = Date.now();
@@ -4,8 +4,10 @@ import {
4
4
  } from "./chunk-MMRUBN3I.js";
5
5
  import {
6
6
  isTelemetryRedactionEnabled,
7
+ sanitizeSupportEndpointPath,
8
+ sanitizeUpstreamId,
7
9
  sanitizeUpstreamPayload
8
- } from "./chunk-RP5GETX5.js";
10
+ } from "./chunk-4QCFFW2H.js";
9
11
 
10
12
  // src/lib/support-outbox.ts
11
13
  import { mkdirSync, readdirSync, readFileSync, writeFileSync, existsSync } from "fs";
@@ -75,7 +77,8 @@ function normalizeBaseEndpoint(value, fallback) {
75
77
  }
76
78
  return raw.replace(/\/+$/, "").replace(/\/(bug-reports|feature-requests)\/?$/, "");
77
79
  }
78
- function buildStatusUpdateEndpoint(endpointPath, adminToken) {
80
+ function buildStatusUpdateEndpoint(rawEndpointPath, adminToken) {
81
+ const endpointPath = sanitizeSupportEndpointPath(rawEndpointPath);
79
82
  const config = loadConfigFile();
80
83
  const support = config?.support;
81
84
  const routerUrl = process.env.API_ROUTER_URL?.replace(/\/+$/, "");
@@ -118,8 +121,9 @@ function findExistingUnsentStatusUpdate(kind, id) {
118
121
  return void 0;
119
122
  }
120
123
  function queueSupportStatusUpdateSync(input) {
121
- const id = input.id.trim();
124
+ const id = sanitizeUpstreamId(input.id.trim());
122
125
  if (!id) return void 0;
126
+ const endpointPath = sanitizeSupportEndpointPath(input.endpointPath);
123
127
  try {
124
128
  mkdirSync(STATUS_UPDATE_DIR, { recursive: true });
125
129
  const existingPath = findExistingUnsentStatusUpdate(input.kind, id);
@@ -137,7 +141,7 @@ function queueSupportStatusUpdateSync(input) {
137
141
  const record = {
138
142
  id,
139
143
  kind: input.kind,
140
- endpointPath: input.endpointPath,
144
+ endpointPath,
141
145
  method: input.method ?? "PATCH",
142
146
  payload: input.payload,
143
147
  created_at: existingPath ? JSON.parse(readFileSync(existingPath, "utf-8")).created_at : createdAt,
@@ -514,7 +518,7 @@ async function reconcileUpstreamStatus() {
514
518
  for (const file of files) {
515
519
  const filePath = path.join(dir, file);
516
520
  const content = readFileSync(filePath, "utf-8");
517
- const idMatch = content.match(/^id:\s*([0-9a-f-]{36})\s*$/m);
521
+ const idMatch = content.match(/^id:\s*([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\s*$/mi);
518
522
  if (!idMatch) continue;
519
523
  const id = idMatch[1];
520
524
  const statusMatch = content.match(/^status:\s*(\S+)\s*$/m);
@@ -522,7 +526,7 @@ async function reconcileUpstreamStatus() {
522
526
  if (localStatus === "closed" || localStatus === "shipped") continue;
523
527
  try {
524
528
  const resp = await fetch(
525
- `https://api.askexe.com/admin/support/${kind}/${encodeURIComponent(id)}`,
529
+ `https://api.askexe.com/admin/support/${kind}/${encodeURIComponent(sanitizeUpstreamId(id))}`,
526
530
  {
527
531
  headers: { authorization: `Bearer ${adminToken}` },
528
532
  signal: AbortSignal.timeout(5e3)
@@ -89,7 +89,7 @@ async function getRetrievalHealth() {
89
89
  const coveragePct = totalMemories > 0 ? Math.round(memoriesWithVectors / totalMemories * 100) : null;
90
90
  let dbRestore = { hasEvents: false, count: 0, last: null, quarantineFiles: 0 };
91
91
  try {
92
- const { getDbRestoreHealth } = await import("./db-restore-events-JVEEP52Z.js");
92
+ const { getDbRestoreHealth } = await import("./db-restore-events-MQ2DBGEQ.js");
93
93
  dbRestore = getDbRestoreHealth();
94
94
  } catch {
95
95
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-RWSLVYTE.js";
3
+ } from "./chunk-AOHXREB7.js";
4
4
 
5
5
  // src/lib/orchestration-events.ts
6
6
  import crypto from "crypto";
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  getGitRoot,
3
- isWorktreeDirty
4
- } from "./chunk-BJOBR6P2.js";
3
+ isWorktreeDirty,
4
+ isWorktreeDirtyAsync
5
+ } from "./chunk-I26FWCSP.js";
5
6
 
6
7
  // src/lib/worktree-sweep.ts
7
8
  import { execFile } from "child_process";
@@ -403,7 +404,7 @@ async function cleanupAgentWorktree(repoRoot, agentName) {
403
404
  if (baseName !== agentBase) continue;
404
405
  const wtPath = path.join(worktreesDir, entry);
405
406
  const branch = await getWorktreeBranch(repoRoot, wtPath);
406
- if (isWorktreeDirty(wtPath)) {
407
+ if (await isWorktreeDirtyAsync(wtPath)) {
407
408
  notes.push(`Worktree .worktrees/${entry} has uncommitted changes \u2014 preserved`);
408
409
  continue;
409
410
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  atomicWriteJsonSync,
3
3
  ensurePrivateDirSync
4
- } from "./chunk-SHIICYJW.js";
4
+ } from "./chunk-BYTDMAGB.js";
5
5
 
6
6
  // src/lib/preferences.ts
7
7
  import { existsSync, readFileSync } from "fs";