@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,9 +1,12 @@
1
1
  import {
2
2
  mcpHttpPort
3
- } from "./chunk-AVKXCSBI.js";
3
+ } from "./chunk-GG5NDQNN.js";
4
4
  import {
5
5
  checkCpuStealSync
6
6
  } from "./chunk-SSC7EKY2.js";
7
+ import {
8
+ inventoryLocalSecretResidue
9
+ } from "./chunk-VRAQTFD6.js";
7
10
  import {
8
11
  CC_NATIVE_ONLY_CUTOFF,
9
12
  compareSemver,
@@ -12,10 +15,10 @@ import {
12
15
  import {
13
16
  readMcpHttpEvents,
14
17
  summarizeMcpTransport
15
- } from "./chunk-5RACW3LX.js";
18
+ } from "./chunk-RAXVPNMR.js";
16
19
  import {
17
20
  EXE_AI_DIR
18
- } from "./chunk-7Y5UDEVM.js";
21
+ } from "./chunk-WZHZCDDO.js";
19
22
 
20
23
  // src/bin/exe-healthcheck.ts
21
24
  import { existsSync, readFileSync, readdirSync } from "fs";
@@ -529,6 +532,50 @@ function checkRetrievalHealth() {
529
532
  }
530
533
  return results;
531
534
  }
535
+ function checkLocalSecretResidue() {
536
+ const inventory = inventoryLocalSecretResidue();
537
+ if (inventory.residues.length === 0) {
538
+ return [{ name: "security/local-secret-residue", pass: true, detail: "No plaintext recovery/key export residue detected" }];
539
+ }
540
+ const shown = inventory.residues.slice(0, 3).map((r) => `${r.kind}: ${r.path}`).join("; ");
541
+ return [{
542
+ name: "security/local-secret-residue",
543
+ pass: false,
544
+ detail: `${inventory.residues.length} plaintext secret residue file(s) detected: ${shown}${inventory.residues.length > 3 ? " ..." : ""}. Vault needed secrets, then run: exe-os doctor --delete-local-secret-residue`
545
+ }];
546
+ }
547
+ function checkKeyStorageFallback() {
548
+ const keyPath = path.join(EXE_AI_DIR, "master.key");
549
+ if (!existsSync(keyPath)) {
550
+ return [{ name: "security/key-storage", pass: true, detail: "No master.key file fallback detected (expected when OS keychain owns the key)" }];
551
+ }
552
+ let first = "";
553
+ try {
554
+ first = readFileSync(keyPath, "utf8").slice(0, 4);
555
+ } catch {
556
+ return [{ name: "security/key-storage", pass: false, detail: `master.key exists but is not readable: ${keyPath}` }];
557
+ }
558
+ const saltPath = path.join(EXE_AI_DIR, ".machine-key-salt");
559
+ if (first === "enc:" && existsSync(saltPath)) {
560
+ return [{
561
+ name: "security/key-storage",
562
+ pass: false,
563
+ detail: `\u{1F7E0} Key is using salted encrypted file fallback at ${keyPath}; migrate to OS keychain when available`
564
+ }];
565
+ }
566
+ if (first === "enc:") {
567
+ return [{
568
+ name: "security/key-storage",
569
+ pass: false,
570
+ detail: `\u{1F534} Key is using legacy deterministic encrypted file fallback at ${keyPath}; run exe-os key status or exe-os setup to re-migrate/rewrite with salt`
571
+ }];
572
+ }
573
+ return [{
574
+ name: "security/key-storage",
575
+ pass: false,
576
+ detail: `\u{1F534} Key is stored in plaintext file fallback at ${keyPath}; run exe-os key status or exe-os setup to migrate/encrypt it`
577
+ }];
578
+ }
532
579
  var HEALTHCHECK_CHILD_ENV = "EXE_HEALTHCHECK_CHILD";
533
580
  var DEFAULT_HEALTHCHECK_TIMEOUT_MS = 3e4;
534
581
  function healthcheckTimeoutMs() {
@@ -579,7 +626,9 @@ function runHealthCheck() {
579
626
  ...checkMcpTransport(),
580
627
  ...checkClaudeCodeInstall(),
581
628
  ...checkCpuSteal(),
582
- ...checkRetrievalHealth()
629
+ ...checkRetrievalHealth(),
630
+ ...checkKeyStorageFallback(),
631
+ ...checkLocalSecretResidue()
583
632
  ];
584
633
  const passed = results.filter((r) => r.pass).length;
585
634
  const failed = results.filter((r) => !r.pass).length;
@@ -611,6 +660,8 @@ export {
611
660
  checkClaudeCodeInstall,
612
661
  checkCpuSteal,
613
662
  checkRetrievalHealth,
663
+ checkLocalSecretResidue,
664
+ checkKeyStorageFallback,
614
665
  HEALTHCHECK_CHILD_ENV,
615
666
  DEFAULT_HEALTHCHECK_TIMEOUT_MS,
616
667
  healthcheckTimeoutMs,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clean,
3
3
  stableId
4
- } from "./chunk-D3QASX2W.js";
4
+ } from "./chunk-QIFYLIUF.js";
5
5
 
6
6
  // src/lib/reflection-checkpoints.ts
7
7
  function parsePayload(payload) {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getDeviceInfo
3
- } from "./chunk-5Z5NATNS.js";
3
+ } from "./chunk-K7KFGDWF.js";
4
4
  import {
5
5
  EXE_AI_DIR
6
- } from "./chunk-7Y5UDEVM.js";
6
+ } from "./chunk-WZHZCDDO.js";
7
7
 
8
8
  // src/lib/license.ts
9
- import { readFileSync, writeFileSync, existsSync, mkdirSync, statSync, renameSync } from "fs";
9
+ import { chmodSync, readFileSync, writeFileSync, existsSync, mkdirSync, statSync, renameSync } from "fs";
10
10
  import { randomUUID } from "crypto";
11
11
  import os from "os";
12
12
  import path from "path";
@@ -190,7 +190,16 @@ function getLicenseCacheAgeMs() {
190
190
  }
191
191
  function cacheResponse(token) {
192
192
  try {
193
- writeFileSync(CACHE_PATH, JSON.stringify({ token }), "utf8");
193
+ mkdirSync(EXE_AI_DIR, { recursive: true, mode: 448 });
194
+ try {
195
+ chmodSync(EXE_AI_DIR, 448);
196
+ } catch {
197
+ }
198
+ writeFileSync(CACHE_PATH, JSON.stringify({ token }), { encoding: "utf8", mode: 384 });
199
+ try {
200
+ chmodSync(CACHE_PATH, 384);
201
+ } catch {
202
+ }
194
203
  } catch {
195
204
  }
196
205
  }
@@ -0,0 +1,186 @@
1
+ // src/lib/fast-db-init.ts
2
+ function makeNoopClient() {
3
+ const emptyResult = {
4
+ columns: [],
5
+ columnTypes: [],
6
+ rows: [],
7
+ rowsAffected: 0,
8
+ lastInsertRowid: void 0,
9
+ toJSON() {
10
+ return {};
11
+ }
12
+ };
13
+ return {
14
+ async execute() {
15
+ return emptyResult;
16
+ },
17
+ async batch(stmts) {
18
+ return stmts.map(() => emptyResult);
19
+ },
20
+ async transaction() {
21
+ throw new Error("Transactions not supported in daemon-down no-op mode");
22
+ },
23
+ async executeMultiple() {
24
+ },
25
+ async migrate() {
26
+ return [];
27
+ },
28
+ sync() {
29
+ return Promise.resolve(void 0);
30
+ },
31
+ close() {
32
+ },
33
+ get closed() {
34
+ return false;
35
+ },
36
+ get protocol() {
37
+ return "file";
38
+ }
39
+ };
40
+ }
41
+ var DAEMON_PROBE_TIMEOUT_MS = (() => {
42
+ const raw = Number(process.env.EXE_DAEMON_PROBE_TIMEOUT_MS);
43
+ return Number.isFinite(raw) && raw > 0 ? raw : 1500;
44
+ })();
45
+ var DAEMON_FAST_PATH_BUDGET_MS = (() => {
46
+ const raw = Number(process.env.EXE_DAEMON_FAST_PATH_BUDGET_MS);
47
+ return Number.isFinite(raw) && raw > 0 ? raw : 4e3;
48
+ })();
49
+ async function fastDbInit(opts) {
50
+ const { isInitialized, getClient, setExternalClient } = await import("./lib/database.js");
51
+ if (isInitialized()) {
52
+ return getClient();
53
+ }
54
+ let effectiveDaemonOnly = opts?.daemonOnly;
55
+ if (effectiveDaemonOnly === void 0) {
56
+ try {
57
+ const { loadConfigSync } = await import("./lib/config.js");
58
+ effectiveDaemonOnly = loadConfigSync().hookDaemonOnly === true;
59
+ } catch {
60
+ }
61
+ }
62
+ if (effectiveDaemonOnly) {
63
+ const { isDaemonReady } = await import("./daemon-ready-signal-LPAZWQOV.js");
64
+ if (!isDaemonReady()) return makeNoopClient();
65
+ }
66
+ const forceDirect = process.env.EXE_DB_DIRECT === "1" || process.env.EXE_DB_READONLY === "1" || process.env.EXE_SKIP_DAEMON === "1";
67
+ const tryDaemonSocket = async () => {
68
+ try {
69
+ const { connectEmbedDaemon, sendDaemonRequest, isClientConnected, disconnectClient } = await import("./lib/exe-daemon-client.js");
70
+ const { deserializeResultSet } = await import("./daemon-protocol-XW2OLNBS.js");
71
+ await Promise.race([
72
+ connectEmbedDaemon(),
73
+ new Promise((_, reject) => setTimeout(() => reject(new Error("Daemon socket timeout (2s)")), 2e3))
74
+ ]);
75
+ if (!isClientConnected()) return null;
76
+ const daemonClient = {
77
+ async execute(stmt) {
78
+ const sql = typeof stmt === "string" ? stmt : stmt.sql;
79
+ const args = typeof stmt === "string" ? [] : Array.isArray(stmt.args) ? stmt.args : [];
80
+ const resp = await sendDaemonRequest({ type: "db-execute", sql, args });
81
+ if (resp.error) throw new Error(String(resp.error));
82
+ if (resp.db) return deserializeResultSet(resp.db);
83
+ throw new Error("Unexpected daemon response");
84
+ },
85
+ async batch(stmts, mode) {
86
+ const statements = stmts.map((s) => {
87
+ const sql = typeof s === "string" ? s : s.sql;
88
+ const args = typeof s === "string" ? [] : Array.isArray(s.args) ? s.args : [];
89
+ return { sql, args };
90
+ });
91
+ const resp = await sendDaemonRequest({ type: "db-batch", statements, mode: mode ?? "deferred" });
92
+ if (resp.error) throw new Error(String(resp.error));
93
+ const batchResults = resp["db-batch"];
94
+ if (batchResults) return batchResults.map(deserializeResultSet);
95
+ throw new Error("Unexpected daemon batch response");
96
+ },
97
+ async transaction(_mode) {
98
+ throw new Error("Transactions not supported via daemon socket");
99
+ },
100
+ async executeMultiple(_sql) {
101
+ throw new Error("executeMultiple not supported via daemon socket");
102
+ },
103
+ async migrate(_stmts) {
104
+ throw new Error("migrate not supported via daemon socket");
105
+ },
106
+ sync() {
107
+ return Promise.resolve(void 0);
108
+ },
109
+ close() {
110
+ },
111
+ get closed() {
112
+ return false;
113
+ },
114
+ get protocol() {
115
+ return "file";
116
+ }
117
+ };
118
+ try {
119
+ const probe = await sendDaemonRequest(
120
+ { type: "db-execute", sql: "SELECT 1", args: [] },
121
+ DAEMON_PROBE_TIMEOUT_MS
122
+ );
123
+ if (probe.error) throw new Error(String(probe.error));
124
+ } catch {
125
+ try {
126
+ disconnectClient();
127
+ } catch {
128
+ }
129
+ return null;
130
+ }
131
+ setExternalClient(daemonClient);
132
+ return daemonClient;
133
+ } catch {
134
+ return null;
135
+ }
136
+ };
137
+ const fastPathStart = Date.now();
138
+ if (!forceDirect) {
139
+ const client = await tryDaemonSocket();
140
+ if (client) return client;
141
+ let daemonLooksPresent = false;
142
+ try {
143
+ const { isDaemonReady } = await import("./daemon-ready-signal-LPAZWQOV.js");
144
+ const { existsSync } = await import("fs");
145
+ const { join } = await import("path");
146
+ const { EXE_AI_DIR } = await import("./lib/config.js");
147
+ const socketPath = process.env.EXE_DAEMON_SOCK ?? process.env.EXE_EMBED_SOCK ?? join(EXE_AI_DIR, "exed.sock");
148
+ daemonLooksPresent = isDaemonReady() || existsSync(socketPath);
149
+ } catch {
150
+ }
151
+ const budgetLeft = DAEMON_FAST_PATH_BUDGET_MS - (Date.now() - fastPathStart);
152
+ if (daemonLooksPresent && budgetLeft > 500) {
153
+ await new Promise((resolve) => setTimeout(resolve, 500));
154
+ const retryClient = await tryDaemonSocket();
155
+ if (retryClient) return retryClient;
156
+ }
157
+ }
158
+ if (effectiveDaemonOnly) {
159
+ return makeNoopClient();
160
+ }
161
+ if (opts?.socketOnly) {
162
+ throw new Error("Daemon socket unavailable and socketOnly=true \u2014 skipping slow DB fallback");
163
+ }
164
+ if (!forceDirect) {
165
+ let daemonOwnsDb = false;
166
+ try {
167
+ const { isDaemonReady } = await import("./daemon-ready-signal-LPAZWQOV.js");
168
+ const { isDbLockHeldByLiveProcess } = await import("./lib/database.js");
169
+ daemonOwnsDb = isDaemonReady() || isDbLockHeldByLiveProcess();
170
+ } catch {
171
+ }
172
+ if (daemonOwnsDb) {
173
+ process.stderr.write(
174
+ "[fast-db-init] daemon is alive but did not answer SELECT 1 in time \u2014 degrading to a no-op DB client instead of opening the encrypted DB as a second writer (bug 96a28cf2). Reads return empty; writes are dropped (memory ingest still queues via the daemon WAL). Set EXE_DB_DIRECT=1 to force a direct open.\n"
175
+ );
176
+ return makeNoopClient();
177
+ }
178
+ }
179
+ const { initStore } = await import("./lib/store.js");
180
+ await initStore({ lightweight: true });
181
+ return getClient();
182
+ }
183
+
184
+ export {
185
+ fastDbInit
186
+ };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  storeBehavior
3
- } from "./chunk-TLYAEISW.js";
3
+ } from "./chunk-KW2SD2FL.js";
4
4
  import {
5
5
  getClient
6
- } from "./chunk-HEPR6QTL.js";
6
+ } from "./chunk-AOHXREB7.js";
7
7
  import {
8
8
  loadConfig
9
- } from "./chunk-7Y5UDEVM.js";
9
+ } from "./chunk-WZHZCDDO.js";
10
10
 
11
11
  // src/lib/skill-learning.ts
12
12
  import crypto from "crypto";
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  getActiveAgent
3
- } from "./chunk-DZ6OQM67.js";
3
+ } from "./chunk-5ERDIOV3.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-PLRIJALF.js";
6
+ } from "./chunk-UP75Z5X7.js";
7
7
  import {
8
8
  getAgentContext
9
9
  } from "./chunk-GJV3WDWM.js";
10
10
  import {
11
11
  isCoordinatorName
12
- } from "./chunk-HEPR6QTL.js";
12
+ } from "./chunk-AOHXREB7.js";
13
13
 
14
14
  // src/mcp/tools/list-tasks.ts
15
15
  import { z } from "zod";
16
16
  import { execFileSync } from "child_process";
17
17
  function resolveCallerSessionForList() {
18
- const contextual = getAgentContext()?.sessionHint || process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || null;
18
+ if (getAgentContext()) return getAgentContext()?.sessionHint || null;
19
+ const contextual = process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || null;
19
20
  if (contextual) return contextual;
20
- if (getAgentContext()) return null;
21
21
  if (process.env.VITEST === "true" || process.env.NODE_ENV === "test") return null;
22
22
  try {
23
23
  const session = execFileSync(
@@ -144,5 +144,6 @@ ${lines.join("\n")}`
144
144
  }
145
145
 
146
146
  export {
147
+ resolveCallerSessionForList,
147
148
  registerListTasks
148
149
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatDegradations,
3
3
  getRetrievalHealth
4
- } from "./chunk-IYB2NIW3.js";
4
+ } from "./chunk-2KZNGDSW.js";
5
5
  import {
6
6
  buildRestartReport,
7
7
  formatRestartReport
@@ -11,12 +11,16 @@ import {
11
11
  LEGACY_SPLIT_POST_TOOL_HOOK_MARKERS,
12
12
  manifestEntryForCommand
13
13
  } from "./chunk-L3TB7CC3.js";
14
+ import {
15
+ cleanupLocalSecretResidue,
16
+ inventoryLocalSecretResidue
17
+ } from "./chunk-VRAQTFD6.js";
14
18
  import {
15
19
  blobToVector
16
20
  } from "./chunk-OTVEIJUQ.js";
17
21
  import {
18
22
  offloadReadIfMain
19
- } from "./chunk-HEPR6QTL.js";
23
+ } from "./chunk-AOHXREB7.js";
20
24
  import {
21
25
  isMainModule
22
26
  } from "./chunk-6Y4B3QF6.js";
@@ -290,14 +294,23 @@ async function detectConflicts(client, projectFilter, agentFilter2) {
290
294
 
291
295
  // src/bin/exe-doctor.ts
292
296
  function parseFlags(argv) {
293
- const flags = { fix: false, dryRun: false, verbose: false, conflicts: false, restarts: false };
297
+ const flags = {
298
+ fix: false,
299
+ dryRun: false,
300
+ verbose: false,
301
+ conflicts: false,
302
+ restarts: false,
303
+ deleteLocalSecretResidue: false
304
+ };
294
305
  for (let i = 0; i < argv.length; i++) {
295
306
  const arg = argv[i];
296
307
  if (arg === "--fix") flags.fix = true;
297
308
  else if (arg === "--dry-run") flags.dryRun = true;
298
309
  else if (arg === "--verbose") flags.verbose = true;
310
+ else if (arg === "--bounded") flags.bounded = true;
299
311
  else if (arg === "--conflicts") flags.conflicts = true;
300
312
  else if (arg === "--restarts" || arg === "--daemon-restarts") flags.restarts = true;
313
+ else if (arg === "--delete-local-secret-residue" || arg === "--cleanup-local-secret-residue") flags.deleteLocalSecretResidue = true;
301
314
  else if (arg === "--agent" && argv[i + 1]) flags.agent = argv[++i];
302
315
  else if (arg === "--project" && argv[i + 1]) flags.project = argv[++i];
303
316
  }
@@ -317,6 +330,10 @@ function agentFilter(flags) {
317
330
  const clause = clauses.length > 0 ? " WHERE " + clauses.join(" AND ") : "";
318
331
  return { clause, args };
319
332
  }
333
+ function boundedAuditLimit(value, fallback, max) {
334
+ if (!Number.isFinite(value) || value === void 0) return fallback;
335
+ return Math.max(1, Math.min(Math.floor(value), max));
336
+ }
320
337
  async function auditStats(client, flags) {
321
338
  const { clause, args } = agentFilter(flags);
322
339
  const summary = await offloadReadIfMain(
@@ -367,6 +384,16 @@ async function auditNullVectors(client, flags) {
367
384
  }
368
385
  async function auditDuplicates(client, flags) {
369
386
  const { clause, args } = agentFilter(flags);
387
+ const groupLimit = boundedAuditLimit(
388
+ flags.duplicateGroupLimit,
389
+ flags.bounded ? 25 : 500,
390
+ 500
391
+ );
392
+ const memberLimit = boundedAuditLimit(
393
+ flags.duplicateMemberLimit,
394
+ flags.bounded ? 250 : 1e4,
395
+ 1e4
396
+ );
370
397
  const liveOnly = " AND COALESCE(status, 'active') = 'active'";
371
398
  const backfillExclude = clause ? " AND tool_name != 'ConversationBackfill'" : " WHERE tool_name != 'ConversationBackfill'";
372
399
  const groups = await offloadReadIfMain(
@@ -376,7 +403,7 @@ async function auditDuplicates(client, flags) {
376
403
  GROUP BY text_head, text_len
377
404
  HAVING cnt > 1
378
405
  ORDER BY cnt DESC
379
- LIMIT 500`,
406
+ LIMIT ${groupLimit}`,
380
407
  args,
381
408
  true
382
409
  );
@@ -390,7 +417,7 @@ async function auditDuplicates(client, flags) {
390
417
  if (flags.project) filterClause += " AND project_name = ?";
391
418
  const ids = await offloadReadIfMain(
392
419
  client,
393
- `SELECT id, raw_text FROM memories${filterClause} ORDER BY timestamp DESC LIMIT 10000`,
420
+ `SELECT id, raw_text FROM memories${filterClause} ORDER BY timestamp DESC LIMIT ${memberLimit}`,
394
421
  filterArgs,
395
422
  true
396
423
  );
@@ -621,7 +648,7 @@ function auditHookOwnership() {
621
648
  }
622
649
  async function auditShards() {
623
650
  try {
624
- const { auditShardHealth } = await import("./shard-manager-MBWQEYNG.js");
651
+ const { auditShardHealth } = await import("./shard-manager-35PWFR3B.js");
625
652
  const report = await auditShardHealth();
626
653
  return {
627
654
  total: report.total,
@@ -638,23 +665,34 @@ async function auditShards() {
638
665
  }
639
666
  async function auditKeyHealth() {
640
667
  try {
641
- const { getMasterKey } = await import("./lib/keychain.js");
642
- const { getKeyBackupStatus } = await import("./key-backup-status-TNEHXA2X.js");
643
- const key = await getMasterKey();
668
+ const { getMasterKey, getKeyStorageInfo } = await import("./lib/keychain.js");
669
+ const { getKeyBackupStatus } = await import("./key-backup-status-LOSMVATJ.js");
670
+ const [key, storage] = await Promise.all([getMasterKey(), getKeyStorageInfo()]);
644
671
  const backup = getKeyBackupStatus();
645
672
  return {
646
673
  masterKeyPresent: Boolean(key),
647
674
  recoveryBackupMarked: backup.exists,
648
675
  recoveryBackupConfirmedAt: backup.confirmedAt,
649
- recoveryBackupSource: backup.source
676
+ recoveryBackupSource: backup.source,
677
+ storageKind: storage.kind,
678
+ storageSecure: storage.secure,
679
+ storageNote: storage.note,
680
+ storagePath: storage.path
650
681
  };
651
682
  } catch {
652
683
  return { masterKeyPresent: false, recoveryBackupMarked: false };
653
684
  }
654
685
  }
686
+ function auditLocalSecretResidue() {
687
+ try {
688
+ return inventoryLocalSecretResidue();
689
+ } catch {
690
+ return { dataDir: "", residues: [] };
691
+ }
692
+ }
655
693
  async function auditOutbox() {
656
694
  try {
657
- const { getOutboxStatus } = await import("./support-outbox-MGUVVGHT.js");
695
+ const { getOutboxStatus } = await import("./support-outbox-WHGPUYL2.js");
658
696
  return await getOutboxStatus();
659
697
  } catch {
660
698
  return {
@@ -686,7 +724,7 @@ async function auditCpuSteal() {
686
724
  }
687
725
  async function runAudit(client, flags) {
688
726
  const runConflicts = flags.conflicts || process.env.EXE_AUDIT_CONFLICTS === "1";
689
- const [stats, nullVectors, duplicates, bloated, fts, orphanedProjects, shards, keyHealth, outbox, cpuSteal] = await Promise.all([
727
+ const [stats, nullVectors, duplicates, bloated, fts, orphanedProjects, shards, keyHealth, localSecretResidue, outbox, cpuSteal] = await Promise.all([
690
728
  auditStats(client, flags),
691
729
  auditNullVectors(client, flags),
692
730
  auditDuplicates(client, flags),
@@ -695,6 +733,7 @@ async function runAudit(client, flags) {
695
733
  auditOrphanedProjects(client),
696
734
  auditShards(),
697
735
  auditKeyHealth(),
736
+ Promise.resolve(auditLocalSecretResidue()),
698
737
  auditOutbox(),
699
738
  auditCpuSteal()
700
739
  ]);
@@ -723,7 +762,7 @@ async function runAudit(client, flags) {
723
762
  } catch {
724
763
  retrievalHealth = void 0;
725
764
  }
726
- return { stats, nullVectors, duplicates, duplicateCount, bloated, fts, orphanedProjects, conflicts, hookHealth, hookOwnership, shards, keyHealth, outbox, cpuSteal, retrievalHealth };
765
+ return { stats, nullVectors, duplicates, duplicateCount, bloated, fts, orphanedProjects, conflicts, hookHealth, hookOwnership, shards, keyHealth, localSecretResidue, outbox, cpuSteal, retrievalHealth };
727
766
  }
728
767
  function indicator(value, warn) {
729
768
  if (value === 0) return "\u{1F7E2}";
@@ -768,18 +807,43 @@ function formatReport(report, flags) {
768
807
  const dupPct = s.total > 0 ? report.duplicateCount / s.total * 100 : 0;
769
808
  const dupIndicator = dupPct === 0 ? "\u{1F7E2}" : dupPct <= 5 ? "\u{1F7E0}" : "\u{1F534}";
770
809
  lines.push(`${dupIndicator} Duplicates: ${fmtNum(report.duplicateCount)} / ${fmtNum(s.total)} (${pct(report.duplicateCount, s.total)})`);
810
+ if (flags.bounded) {
811
+ const groupLimit = boundedAuditLimit(flags.duplicateGroupLimit, 25, 500);
812
+ const memberLimit = boundedAuditLimit(flags.duplicateMemberLimit, 250, 1e4);
813
+ lines.push(` bounded scan: top ${fmtNum(groupLimit)} bucket(s), ${fmtNum(memberLimit)} row(s)/bucket`);
814
+ }
771
815
  lines.push(`${indicator(report.bloated.length, 20)} Bloated (>5KB): ${fmtNum(report.bloated.length)} / ${fmtNum(s.total)} (${pct(report.bloated.length, s.total)})`);
772
816
  const ftsIndicator = report.fts.inSync ? "\u{1F7E2}" : "\u{1F534}";
773
817
  lines.push(`${ftsIndicator} FTS index: ${report.fts.inSync ? "in sync" : "OUT OF SYNC"} (${fmtNum(report.fts.memoryCount)} / ${fmtNum(report.fts.ftsCount)})`);
774
818
  const kh = report.keyHealth;
775
819
  if (!kh.masterKeyPresent) {
776
820
  lines.push("\u{1F534} Recovery key: master key missing \u2014 import phrase or run setup before syncing");
777
- } else if (!kh.recoveryBackupMarked) {
821
+ } else {
822
+ lines.push("\u{1F7E2} Recovery key: present");
823
+ }
824
+ if (kh.storageKind && kh.storageKind !== "macos-keychain" && kh.storageKind !== "linux-secret-service" && kh.storageKind !== "legacy-keytar") {
825
+ const icon = kh.storageSecure ? "\u{1F7E0}" : "\u{1F534}";
826
+ lines.push(`${icon} Key storage: ${kh.storageKind} \u2014 ${kh.storageNote ?? "file fallback in use"}`);
827
+ if (kh.storagePath) lines.push(` ${kh.storagePath}`);
828
+ }
829
+ if (!kh.recoveryBackupMarked) {
778
830
  lines.push("\u{1F534} Recovery backup: not confirmed \u2014 run `exe-os cloud link --show-full` in your local Terminal and save the 24-word phrase");
779
831
  } else {
780
832
  const suffix = kh.recoveryBackupConfirmedAt ? ` (${kh.recoveryBackupConfirmedAt.slice(0, 10)}${kh.recoveryBackupSource ? ` via ${kh.recoveryBackupSource}` : ""})` : "";
781
833
  lines.push(`\u{1F7E2} Recovery backup: confirmed${suffix}`);
782
834
  }
835
+ if (report.localSecretResidue.residues.length > 0) {
836
+ lines.push(`\u{1F534} Local plaintext residue: ${report.localSecretResidue.residues.length} file(s) need operator cleanup`);
837
+ for (const residue of report.localSecretResidue.residues.slice(0, 5)) {
838
+ lines.push(` ${residue.kind}: ${residue.path}`);
839
+ }
840
+ if (report.localSecretResidue.residues.length > 5) {
841
+ lines.push(` ...${report.localSecretResidue.residues.length - 5} more`);
842
+ }
843
+ lines.push(" Vault anything needed, then run: exe-os doctor --delete-local-secret-residue");
844
+ } else {
845
+ lines.push("\u{1F7E2} Local plaintext residue: none detected");
846
+ }
783
847
  if (report.orphanedProjects.length > 0) {
784
848
  const orphanList = report.orphanedProjects.map((o) => `${o.project_name} \u2014 ${o.count} memories`).join(", ");
785
849
  lines.push(`\u2139\uFE0F Orphaned projects: ${report.orphanedProjects.length} (${orphanList})`);
@@ -959,7 +1023,7 @@ function formatReport(report, flags) {
959
1023
  return lines.join("\n");
960
1024
  }
961
1025
  async function fixNullVectors() {
962
- const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-MXUQUG4M.js");
1026
+ const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-3KUBAU32.js");
963
1027
  if (!tryAcquireWorkerSlot()) {
964
1028
  process.stderr.write("[exe-doctor] Worker gate full \u2014 waiting for existing backfill workers to finish\n");
965
1029
  await new Promise((r) => setTimeout(r, 5e3));
@@ -1073,7 +1137,7 @@ function shouldFixShards(shards) {
1073
1137
  return shards.unreadable > 0 || shards.schemaMismatches > 0;
1074
1138
  }
1075
1139
  async function fixShards(dryRun) {
1076
- const { auditShardHealth } = await import("./shard-manager-MBWQEYNG.js");
1140
+ const { auditShardHealth } = await import("./shard-manager-35PWFR3B.js");
1077
1141
  const report = await auditShardHealth({ repair: true, dryRun });
1078
1142
  return {
1079
1143
  total: report.total,
@@ -1133,6 +1197,7 @@ function emptyAuditReport() {
1133
1197
  hookOwnership: { checkedFiles: [], issues: [], staleLegacyHooks: [] },
1134
1198
  shards: { total: 0, ok: 0, unreadable: 0, schemaMismatches: 0, archived: 0, unreadableNames: [], schemaIssueNames: [] },
1135
1199
  keyHealth: { masterKeyPresent: true, recoveryBackupMarked: true },
1200
+ localSecretResidue: { dataDir: "", residues: [] },
1136
1201
  outbox: { bugReports: { total: 0, unsent: 0 }, featureRequests: { total: 0, unsent: 0 } },
1137
1202
  cpuSteal: { available: false, stealPercent: null, severity: "na", source: "none", message: "not checked" }
1138
1203
  };
@@ -1144,10 +1209,21 @@ async function main(argv = process.argv.slice(2)) {
1144
1209
  console.log(formatRestartReport(restartReport));
1145
1210
  return emptyAuditReport();
1146
1211
  }
1147
- const { fastDbInit } = await import("./fast-db-init-QQB6IVWV.js");
1212
+ const { fastDbInit } = await import("./fast-db-init-4CWHSOOR.js");
1148
1213
  const client = await fastDbInit();
1149
1214
  const report = await runAudit(client, flags);
1150
1215
  console.log(formatReport(report, flags));
1216
+ if (flags.deleteLocalSecretResidue) {
1217
+ const cleanup = cleanupLocalSecretResidue({ dryRun: flags.dryRun });
1218
+ const verb = flags.dryRun ? "Would delete" : "Deleted";
1219
+ console.log(`
1220
+ [local-secret-residue] ${verb} ${cleanup.deleted.length} file(s).`);
1221
+ for (const file of cleanup.deleted) console.log(` ${file}`);
1222
+ if (cleanup.skipped.length > 0) {
1223
+ console.log(`[local-secret-residue] Skipped ${cleanup.skipped.length} file(s):`);
1224
+ for (const file of cleanup.skipped) console.log(` ${file}`);
1225
+ }
1226
+ }
1151
1227
  if (flags.fix || flags.dryRun) {
1152
1228
  const mode = flags.dryRun ? "[dry-run]" : "[fix]";
1153
1229
  console.log(`
@@ -1155,7 +1231,7 @@ ${mode} Applying repairs...
1155
1231
  `);
1156
1232
  if (!flags.dryRun) {
1157
1233
  try {
1158
- const { createBackup } = await import("./db-backup-DLD4QZBO.js");
1234
+ const { createBackup } = await import("./db-backup-W2QFSYQC.js");
1159
1235
  const backupPath = await createBackup("pre-fix");
1160
1236
  if (backupPath) {
1161
1237
  console.log(` Backup created: ${backupPath.split("/").pop()}`);
@@ -1228,6 +1304,7 @@ export {
1228
1304
  auditHookOwnership,
1229
1305
  auditShards,
1230
1306
  auditKeyHealth,
1307
+ auditLocalSecretResidue,
1231
1308
  auditOutbox,
1232
1309
  auditCpuSteal,
1233
1310
  runAudit,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-HEPR6QTL.js";
3
+ } from "./chunk-AOHXREB7.js";
4
4
  import {
5
5
  loadConfigSync
6
- } from "./chunk-7Y5UDEVM.js";
6
+ } from "./chunk-WZHZCDDO.js";
7
7
 
8
8
  // src/lib/token-spend.ts
9
9
  import { readdir, stat } from "fs/promises";