@askexenow/exe-os 0.9.144 → 0.9.145

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 (391) hide show
  1. package/deploy/compose/.env.customer.example +2 -2
  2. package/deploy/compose/.env.default +1 -1
  3. package/deploy/compose/.env.example +2 -2
  4. package/deploy/compose/README.md +1 -1
  5. package/deploy/compose/docker-compose.yml +7 -7
  6. package/deploy/compose/generate-env.ts +5 -5
  7. package/deploy/stack-manifests/v0.9.json +31 -31
  8. package/dist/{active-agent-NVYSMA2V.js → active-agent-GJOJUEMF.js} +9 -9
  9. package/dist/{active-agent-Q3IKFOF6.js → active-agent-HUDSZRUG.js} +9 -9
  10. package/dist/agent-context-HH7TL5ZP.js +9 -0
  11. package/dist/{agent-loop-G4VUR5ME.js → agent-loop-OCJFYO72.js} +1 -1
  12. package/dist/{agentic-ontology-Q3OVWKAK.js → agentic-ontology-5PGUVMDP.js} +2 -2
  13. package/dist/{asana-ASFYLGKF.js → asana-BSDR6NW4.js} +1 -1
  14. package/dist/{backfill-metadata-GZIPWZAJ.js → backfill-metadata-ZDJ5B37R.js} +10 -14
  15. package/dist/{background-jobs-LS6PTJKF.js → background-jobs-4N4JSZVZ.js} +4 -4
  16. package/dist/{bash-Y5PEW5UQ.js → bash-X54PZMOG.js} +1 -1
  17. package/dist/behaviors-TXLHEM5J.js +22 -0
  18. package/dist/bin/age-ontology-load.js +4 -4
  19. package/dist/bin/agentic-ontology-backfill.js +13 -15
  20. package/dist/bin/agentic-reflection-backfill.js +13 -13
  21. package/dist/bin/agentic-semantic-label.js +13 -17
  22. package/dist/bin/backfill-conversations.js +14 -19
  23. package/dist/bin/backfill-responses.js +14 -19
  24. package/dist/bin/backfill-vectors.js +17 -20
  25. package/dist/bin/bulk-sync-postgres.js +15 -17
  26. package/dist/bin/cc-doctor.js +5 -5
  27. package/dist/bin/cleanup-stale-review-tasks.js +25 -29
  28. package/dist/bin/cli.js +19 -19
  29. package/dist/bin/exe-agent-config.js +9 -15
  30. package/dist/bin/exe-agent.js +9 -9
  31. package/dist/bin/exe-assign.js +16 -19
  32. package/dist/bin/exe-boot.js +47 -64
  33. package/dist/bin/exe-call.js +10 -12
  34. package/dist/bin/exe-cloud.js +12 -12
  35. package/dist/bin/exe-dispatch.js +25 -31
  36. package/dist/bin/exe-doctor.js +2 -2
  37. package/dist/bin/exe-export-behaviors.js +13 -13
  38. package/dist/bin/exe-forget.js +13 -15
  39. package/dist/bin/exe-gateway.js +21 -23
  40. package/dist/bin/exe-healthcheck.js +5 -5
  41. package/dist/bin/exe-heartbeat.js +25 -35
  42. package/dist/bin/exe-kill.js +13 -17
  43. package/dist/bin/exe-launch-agent.js +55 -54
  44. package/dist/bin/exe-new-employee.js +13 -17
  45. package/dist/bin/exe-pending-messages.js +25 -25
  46. package/dist/bin/exe-pending-notifications.js +29 -29
  47. package/dist/bin/exe-pending-reviews.js +24 -28
  48. package/dist/bin/exe-rename.js +9 -11
  49. package/dist/bin/exe-review.js +27 -33
  50. package/dist/bin/exe-search.js +11 -11
  51. package/dist/bin/exe-session-cleanup.js +94 -41
  52. package/dist/bin/exe-settings.js +13 -19
  53. package/dist/bin/exe-start-codex.js +21 -31
  54. package/dist/bin/exe-start-opencode.js +16 -20
  55. package/dist/bin/exe-start.sh +7 -2
  56. package/dist/bin/exe-status.js +25 -25
  57. package/dist/bin/exe-support.js +5 -5
  58. package/dist/bin/exe-team.js +7 -11
  59. package/dist/bin/git-sweep.js +24 -24
  60. package/dist/bin/graph-backfill.js +13 -15
  61. package/dist/bin/graph-export.js +12 -14
  62. package/dist/bin/graph-layer-benchmark.js +1 -1
  63. package/dist/bin/install.js +54 -23
  64. package/dist/bin/intercom-check.js +12 -8
  65. package/dist/bin/list-providers.js +1 -1
  66. package/dist/bin/postgres-agentic-reflection-backfill.js +6 -6
  67. package/dist/bin/postgres-agentic-semantic-backfill.js +5 -5
  68. package/dist/bin/pre-publish.js +2 -2
  69. package/dist/bin/registry-proxy.js +2 -2
  70. package/dist/bin/scan-tasks.js +26 -30
  71. package/dist/bin/setup.js +5 -5
  72. package/dist/bin/shard-migrate.js +12 -14
  73. package/dist/bin/stack-update.js +4 -6
  74. package/dist/bin/update.js +1 -1
  75. package/dist/{branding-ZOKU45NY.js → branding-52J2ILJX.js} +3 -3
  76. package/dist/capacity-monitor-HWN2JX5W.js +46 -0
  77. package/dist/{catchup-brief-HLGROPH6.js → catchup-brief-UERCIVM5.js} +28 -32
  78. package/dist/{chunk-XSF6G7O2.js → chunk-2R3N4DQY.js} +4 -4
  79. package/dist/{chunk-AV77PUPD.js → chunk-32LFUJVG.js} +1076 -841
  80. package/dist/chunk-3H4VU65X.js +209 -0
  81. package/dist/chunk-3TXOH3SJ.js +20 -0
  82. package/dist/{chunk-GPCQRSAR.js → chunk-4F56OUR7.js} +3 -9
  83. package/dist/{chunk-ZCYQZQTA.js → chunk-53VUIKOE.js} +1 -1
  84. package/dist/{chunk-7YZJUTQ4.js → chunk-56T5TMNK.js} +2 -2
  85. package/dist/{chunk-TBO4RYRU.js → chunk-5F3EXHT7.js} +1 -1
  86. package/dist/{chunk-KKYDUT2Z.js → chunk-5WTYETQO.js} +6 -15
  87. package/dist/{chunk-YSRJHKHL.js → chunk-63UVIM7S.js} +5 -10
  88. package/dist/{chunk-KRLOFIPI.js → chunk-64WZEXXA.js} +2 -21
  89. package/dist/{chunk-DUXNECD3.js → chunk-65UQ7H5U.js} +3 -7
  90. package/dist/{chunk-53JBNNU3.js → chunk-6BUUY7FG.js} +6 -28
  91. package/dist/{chunk-YGHMRSH5.js → chunk-6D23UNXU.js} +3 -9
  92. package/dist/{chunk-MI4RRRX5.js → chunk-7APRWURX.js} +37 -26
  93. package/dist/{chunk-3RT5V3M4.js → chunk-7KR5PV4P.js} +2 -4
  94. package/dist/{chunk-KVM3XRPC.js → chunk-7PEYIW53.js} +2 -4
  95. package/dist/{chunk-VISRYICE.js → chunk-7PTII6F4.js} +2 -4
  96. package/dist/{chunk-CO7XAJJ2.js → chunk-AAVODJ4F.js} +2 -4
  97. package/dist/{chunk-2WGSIVI4.js → chunk-AHMUF6RO.js} +1 -3
  98. package/dist/{chunk-47MZMRQZ.js → chunk-AJ2XDY27.js} +35 -105
  99. package/dist/{chunk-FCNKI3SH.js → chunk-B6Q6WAD7.js} +2 -7
  100. package/dist/{chunk-ZK3WQY7Q.js → chunk-BHV7PX5V.js} +2 -4
  101. package/dist/{chunk-HLYXFVVT.js → chunk-BXCJOACQ.js} +6 -12
  102. package/dist/{chunk-T2WBLUN7.js → chunk-BY4OTURZ.js} +5 -17
  103. package/dist/{chunk-SI5TLMB6.js → chunk-C4EVFN7J.js} +88 -12
  104. package/dist/{chunk-YRLMCI3J.js → chunk-CDDRSIGK.js} +271 -131
  105. package/dist/{chunk-QC34Z6ZI.js → chunk-CQCURHDV.js} +41 -31
  106. package/dist/{chunk-HP43GLZ6.js → chunk-CVYC6DUW.js} +8 -19
  107. package/dist/{chunk-4C3NEI64.js → chunk-CWPE6QVM.js} +1 -1
  108. package/dist/{chunk-DDUIVBH6.js → chunk-DBLBWWFS.js} +4 -6
  109. package/dist/{chunk-HHKKLWAI.js → chunk-DCJ42FEN.js} +1 -1
  110. package/dist/{chunk-52LCN4JK.js → chunk-ER3UJ2VL.js} +3 -5
  111. package/dist/{chunk-XCTQO7TN.js → chunk-F7JVVLGH.js} +1 -1
  112. package/dist/{chunk-VU447UAO.js → chunk-FLSASUV3.js} +6 -2
  113. package/dist/chunk-FXU7JOXK.js +6 -0
  114. package/dist/{chunk-VTQRACP7.js → chunk-G3VR3MJI.js} +23 -50
  115. package/dist/{chunk-VAOAI6DS.js → chunk-GCMT6RWI.js} +1 -1
  116. package/dist/chunk-GJV3WDWM.js +14 -0
  117. package/dist/{chunk-5JIVAJJU.js → chunk-GK5VMHSN.js} +1 -1
  118. package/dist/{chunk-DC4ZD76Y.js → chunk-GZIAQYGI.js} +2 -28
  119. package/dist/{chunk-76HPWZJC.js → chunk-H4KUTL2T.js} +1 -1
  120. package/dist/{chunk-V3YNF3JK.js → chunk-H4YONWQX.js} +218 -253
  121. package/dist/{chunk-OCYP6VU6.js → chunk-H6OEU54G.js} +22 -19
  122. package/dist/{chunk-HJMM4QMY.js → chunk-HOKOOBDL.js} +6 -25
  123. package/dist/{chunk-LXX2UDWL.js → chunk-HV75RBMK.js} +1 -3
  124. package/dist/{chunk-6BFIFI5F.js → chunk-HYZV25LY.js} +7 -18
  125. package/dist/{chunk-TLXIKKEG.js → chunk-I4WAKJ6W.js} +74 -67
  126. package/dist/{chunk-AFEXRICE.js → chunk-I5VJNTDL.js} +34 -45
  127. package/dist/{chunk-LT55GKEK.js → chunk-IBVB2NGY.js} +6 -10
  128. package/dist/{chunk-KX3KLDG7.js → chunk-IPSFAUK5.js} +3 -7
  129. package/dist/{chunk-EVP2WD5S.js → chunk-JUITBJ7J.js} +1 -5
  130. package/dist/{chunk-IUQL3KZV.js → chunk-K3PSCQLK.js} +2 -4
  131. package/dist/{chunk-CNNT4QSN.js → chunk-K6MMN6AW.js} +7 -20
  132. package/dist/{chunk-QASVYG2B.js → chunk-KHV55ME4.js} +4 -3
  133. package/dist/{chunk-EOWQ6DMH.js → chunk-KLRP6ZG3.js} +10 -16
  134. package/dist/{chunk-C54PGWHV.js → chunk-KQTGSD23.js} +11 -14
  135. package/dist/{chunk-V6O4GN5M.js → chunk-LOQCOHEW.js} +2 -12
  136. package/dist/{chunk-OC7FNHGA.js → chunk-LWVZLTMD.js} +3 -7
  137. package/dist/{chunk-YEXCXJRS.js → chunk-MFGARIVE.js} +1 -1
  138. package/dist/chunk-MP2AFCGL.js +53 -0
  139. package/dist/{chunk-WZDI6UJ6.js → chunk-MPXPPKJ4.js} +3 -3
  140. package/dist/{chunk-A46SAHYB.js → chunk-MUVPQCQA.js} +1 -1
  141. package/dist/{chunk-WLW7QV2C.js → chunk-NA3MXUU6.js} +135 -187
  142. package/dist/{chunk-R23EMFJV.js → chunk-NAFWZIP3.js} +2 -7
  143. package/dist/{chunk-AYUYBWGD.js → chunk-NE6RPW5C.js} +7 -32
  144. package/dist/chunk-NGP6LSV2.js +25 -0
  145. package/dist/{chunk-EZY3BNIW.js → chunk-NQAZ2CP7.js} +40 -51
  146. package/dist/{chunk-XMAP37LE.js → chunk-NT6R4ATM.js} +1 -1
  147. package/dist/{chunk-NCVFW4JS.js → chunk-O7CTVDC3.js} +2 -2
  148. package/dist/{chunk-TOR5ZPKF.js → chunk-OPU3NYOO.js} +5 -17
  149. package/dist/{chunk-SRQXDGUO.js → chunk-OYCQ6PFC.js} +6 -6
  150. package/dist/{chunk-KFQGP6VL.js → chunk-PNKVD2UK.js} +0 -7
  151. package/dist/{chunk-MFO7MNSD.js → chunk-QGGH7LOU.js} +1 -10
  152. package/dist/{chunk-3XUWTXNC.js → chunk-QSSABSCM.js} +41 -7
  153. package/dist/chunk-RLCZBSUB.js +123 -0
  154. package/dist/{chunk-37RJAKHZ.js → chunk-RNN4MZDN.js} +4 -12
  155. package/dist/{chunk-BNH4LWKE.js → chunk-RWJY7KMP.js} +34 -13
  156. package/dist/{chunk-VH2CK32C.js → chunk-RWURKLS3.js} +1 -1
  157. package/dist/{chunk-UAAOJHVR.js → chunk-S465RWY7.js} +41 -128
  158. package/dist/{chunk-TGR3H3DM.js → chunk-SR6D65DA.js} +5 -11
  159. package/dist/{chunk-MAA3266Q.js → chunk-TFZZL3QF.js} +1 -1
  160. package/dist/{chunk-NEAHEC5G.js → chunk-TXSJ2L5O.js} +7 -30
  161. package/dist/{chunk-TDIUACZ6.js → chunk-UVH6FA5E.js} +5 -2
  162. package/dist/{chunk-QLQCSJC4.js → chunk-UWBU44UP.js} +1 -1
  163. package/dist/{chunk-ROTT6N5K.js → chunk-UXDQ4ERA.js} +74 -33
  164. package/dist/{chunk-WDN5IY66.js → chunk-V4O2APMI.js} +1 -1
  165. package/dist/{chunk-PNLYLN6K.js → chunk-VRD452MQ.js} +2 -4
  166. package/dist/{chunk-SCP545OR.js → chunk-VX4X2O6J.js} +7 -12
  167. package/dist/{chunk-EHF676BW.js → chunk-VXQDZH5T.js} +5 -13
  168. package/dist/{chunk-2RCYI7O4.js → chunk-W7NQE65M.js} +1 -3
  169. package/dist/{chunk-QBLI377G.js → chunk-WJW564IP.js} +55 -6
  170. package/dist/{chunk-QUPRWJKI.js → chunk-WLEVAIL5.js} +11 -5
  171. package/dist/{chunk-DSVN3QRR.js → chunk-WTJS6PCC.js} +1 -1
  172. package/dist/{chunk-EYRQWVPQ.js → chunk-X7DJ2QZW.js} +3 -5
  173. package/dist/{chunk-76R35J76.js → chunk-XAHIVBTU.js} +7 -15
  174. package/dist/{chunk-67WOKLTZ.js → chunk-XEA6DSLR.js} +12 -27
  175. package/dist/{chunk-AV4RLRM2.js → chunk-XQ2ZBOAD.js} +64 -41
  176. package/dist/{chunk-7PJP3TZV.js → chunk-Y2VVTK2E.js} +2 -13
  177. package/dist/chunk-YSU7JB7H.js +0 -0
  178. package/dist/{chunk-PJHHFJAN.js → chunk-ZQX6UOP6.js} +10 -28
  179. package/dist/{code-context-index-WCJ6RWCY.js → code-context-index-SRTAWCZQ.js} +7 -6
  180. package/dist/content-extractor-H4IPL533.js +8 -0
  181. package/dist/{conversation-entity-extractor-7S4JFUOM.js → conversation-entity-extractor-IZ3ECP4A.js} +2 -2
  182. package/dist/{conversation-wiki-populator-H6WM5SFU.js → conversation-wiki-populator-K4BQXHHO.js} +2 -2
  183. package/dist/{core-memory-N2SN7CF5.js → core-memory-JZ34WT5R.js} +34 -3
  184. package/dist/{crdt-sync-WYAIMNUX.js → crdt-sync-4TOVD4QN.js} +2 -2
  185. package/dist/{crm-bridge-Q5JBVJ6P.js → crm-bridge-27QVOWPI.js} +1 -1
  186. package/dist/{crm-webhook-PIFEQH7A.js → crm-webhook-77XHBWL7.js} +3 -3
  187. package/dist/{cto-delegation-gate-MKIVEDB4.js → cto-delegation-gate-AWENA4VT.js} +23 -29
  188. package/dist/daemon-auth-Z7O3LO23.js +13 -0
  189. package/dist/{daemon-orchestration-RZLIILS6.js → daemon-orchestration-BG4NPWOK.js} +40 -28
  190. package/dist/{daemon-protocol-RLH2XM2K.js → daemon-protocol-N7MOJ4U3.js} +2 -4
  191. package/dist/{db-backup-K2M7HENN.js → db-backup-E34JMBZD.js} +4 -6
  192. package/dist/{devtools-PLJCAU53.js → devtools-ZL5NCINM.js} +1 -1
  193. package/dist/{discord-G4BQJ2VX.js → discord-QOFQKX6S.js} +1 -1
  194. package/dist/{email-XMRNMFXR.js → email-NY5HB4WA.js} +1 -1
  195. package/dist/{entity-boost-62SBVNCD.js → entity-boost-V6KSRGG4.js} +2 -2
  196. package/dist/{exe-drift-2LL7OCRF.js → exe-drift-YFWCC26O.js} +7 -7
  197. package/dist/{exe-export-TQZ6FVKC.js → exe-export-YRACBEUY.js} +12 -12
  198. package/dist/{exe-import-PB3VIFF7.js → exe-import-DY57L2OI.js} +12 -12
  199. package/dist/{exe-key-BZTGYI2O.js → exe-key-U2JJH4MO.js} +8 -10
  200. package/dist/{exe-org-7ZJNIBL2.js → exe-org-45OTYZZJ.js} +4 -4
  201. package/dist/{factory-YTD23AW7.js → factory-2PB537KA.js} +1 -1
  202. package/dist/fast-db-init-67TQTHWT.js +7 -0
  203. package/dist/{file-edit-FJVEO7XZ.js → file-edit-GSXUFUDC.js} +1 -1
  204. package/dist/{file-read-Q2NH3J35.js → file-read-Z3F3PUCK.js} +1 -1
  205. package/dist/{file-write-UNSFXNH4.js → file-write-X77JXZ2C.js} +1 -1
  206. package/dist/gateway/index.js +13 -13
  207. package/dist/{gateway-client-E4UWC45R.js → gateway-client-IPKKEYKY.js} +2 -2
  208. package/dist/{git-staleness-QXWQPH74.js → git-staleness-I662R7RL.js} +7 -9
  209. package/dist/git-task-sweep-XWFCP2HA.js +37 -0
  210. package/dist/{glob-GRMXLDMB.js → glob-2PWAXTZ2.js} +1 -1
  211. package/dist/global-procedures-IEIJBCAH.js +19 -0
  212. package/dist/{graph-query-JBQDJJFP.js → graph-query-NCDYOT4Y.js} +1 -1
  213. package/dist/{graph-rag-73U3RTBB.js → graph-rag-2YLGRBW5.js} +2 -2
  214. package/dist/{grep-NBV6SKYZ.js → grep-GTV6WAZ4.js} +1 -1
  215. package/dist/{hook-integrity-LAWB6YQH.js → hook-integrity-LLPJPAXW.js} +2 -2
  216. package/dist/hooks/bug-report-worker.js +27 -35
  217. package/dist/hooks/codex-stop-task-finalizer.js +26 -32
  218. package/dist/hooks/commit-complete.js +26 -26
  219. package/dist/hooks/error-recall.js +17 -19
  220. package/dist/hooks/exe-heartbeat-hook.js +10 -12
  221. package/dist/hooks/ingest-worker.js +14 -13
  222. package/dist/hooks/ingest.js +23 -25
  223. package/dist/hooks/instructions-loaded.js +11 -13
  224. package/dist/hooks/notification.js +10 -10
  225. package/dist/hooks/post-compact.js +25 -27
  226. package/dist/hooks/post-tool-combined.js +6 -6
  227. package/dist/hooks/pre-compact.js +31 -32
  228. package/dist/hooks/pre-tool-use.js +31 -35
  229. package/dist/hooks/prompt-submit.js +90 -67
  230. package/dist/hooks/session-end.js +40 -42
  231. package/dist/hooks/session-start.js +10 -10
  232. package/dist/hooks/stop.js +36 -44
  233. package/dist/hooks/subagent-stop.js +26 -30
  234. package/dist/hooks/summary-worker.js +36 -43
  235. package/dist/{hooks-KD3N2D7P.js → hooks-UK2AYRCA.js} +1 -1
  236. package/dist/imessage-LINH4V4D.js +7 -0
  237. package/dist/index.js +32 -32
  238. package/dist/{installer-BIDJSBAP.js → installer-PB63JTTG.js} +11 -11
  239. package/dist/{installer-2O362XY7.js → installer-SSR2OOLO.js} +11 -11
  240. package/dist/{installer-OYGB6GAI.js → installer-ZONYB3XK.js} +11 -11
  241. package/dist/{intercom-queue-PEEGAJ33.js → intercom-queue-MMZT2MA2.js} +2 -4
  242. package/dist/{key-backup-status-2CMNBKEM.js → key-backup-status-4WKIQOAS.js} +3 -3
  243. package/dist/lib/agent-config.js +5 -7
  244. package/dist/lib/cloud-sync.js +14 -10
  245. package/dist/lib/cloudflare-dns.js +1 -1
  246. package/dist/lib/config.js +3 -3
  247. package/dist/lib/consolidation.js +17 -13
  248. package/dist/lib/crypto.js +2 -4
  249. package/dist/lib/database.js +6 -8
  250. package/dist/lib/db-daemon-client.js +7 -17
  251. package/dist/lib/db.js +6 -10
  252. package/dist/lib/device-registry.js +3 -3
  253. package/dist/lib/embedder.js +9 -10
  254. package/dist/lib/employee-templates.js +9 -9
  255. package/dist/lib/employees.js +10 -8
  256. package/dist/lib/error-detector.js +3 -3
  257. package/dist/lib/exe-daemon-client.js +6 -7
  258. package/dist/lib/exe-daemon.js +368 -399
  259. package/dist/lib/file-grep.js +1 -1
  260. package/dist/lib/hybrid-search.js +11 -11
  261. package/dist/lib/identity-templates.js +1 -1
  262. package/dist/lib/identity.js +6 -8
  263. package/dist/lib/keychain.js +2 -2
  264. package/dist/lib/license.js +4 -6
  265. package/dist/lib/messaging.js +24 -24
  266. package/dist/lib/post-tool-memory.js +7 -7
  267. package/dist/lib/registry-proxy.js +1 -1
  268. package/dist/lib/reminders.js +7 -7
  269. package/dist/lib/runtime-table.js +3 -5
  270. package/dist/lib/schedules.js +11 -11
  271. package/dist/lib/session-registry.js +2 -4
  272. package/dist/lib/session-wrappers.js +1 -1
  273. package/dist/lib/skill-learning.js +8 -10
  274. package/dist/lib/status-brief.js +2 -2
  275. package/dist/lib/store.js +10 -10
  276. package/dist/lib/task-router.js +7 -7
  277. package/dist/lib/tasks.js +24 -28
  278. package/dist/lib/tmux-routing.js +23 -25
  279. package/dist/lib/tmux-status.js +2 -4
  280. package/dist/lib/tmux-transport.js +3 -5
  281. package/dist/lib/token-spend.js +7 -7
  282. package/dist/lib/transport.js +3 -5
  283. package/dist/lib/ws-auth.js +1 -1
  284. package/dist/lib/ws-client.js +2 -2
  285. package/dist/license-gate-JY2KFIKO.js +14 -0
  286. package/dist/mcp/register-tools.js +77 -77
  287. package/dist/mcp/server.js +92 -86
  288. package/dist/mcp/tools/complete-reminder.js +8 -8
  289. package/dist/mcp/tools/create-reminder.js +8 -8
  290. package/dist/mcp/tools/create-task.js +26 -28
  291. package/dist/mcp/tools/deactivate-behavior.js +11 -11
  292. package/dist/mcp/tools/list-reminders.js +8 -8
  293. package/dist/mcp/tools/list-tasks.js +27 -28
  294. package/dist/mcp/tools/send-message.js +26 -26
  295. package/dist/mcp/tools/update-task.js +25 -27
  296. package/dist/{mcp-diagnostics-OOZ3TDPY.js → mcp-diagnostics-CWMVPHVC.js} +1 -1
  297. package/dist/{mcp-disconnect-tracker-I5WJ4LQ5.js → mcp-disconnect-tracker-RM3GEERR.js} +1 -1
  298. package/dist/{mcp-http-config-GLSLF2OL.js → mcp-http-config-PDGSOYNQ.js} +7 -7
  299. package/dist/{memory-cards-PCZ2KWMN.js → memory-cards-OLE6MGO7.js} +7 -9
  300. package/dist/{memory-poisoning-defense-JY4NU3AY.js → memory-poisoning-defense-OOHJIXIX.js} +7 -9
  301. package/dist/{memory-queue-7N7ZEY2K.js → memory-queue-TGWXMENR.js} +4 -4
  302. package/dist/memory-queue-client-RZP5F4EA.js +15 -0
  303. package/dist/{memory-reflection-IVHZRUQQ.js → memory-reflection-Z7CT6JLY.js} +7 -9
  304. package/dist/{message-queue-client-3RWYNZIR.js → message-queue-client-TWIA2GIH.js} +1 -1
  305. package/dist/notifications-SREXGSAQ.js +42 -0
  306. package/dist/{oauth-server-S45RTRRF.js → oauth-server-NSWGKLLA.js} +1 -1
  307. package/dist/{orchestration-phase-NTQZNPAZ.js → orchestration-phase-WLQMEP4M.js} +4 -4
  308. package/dist/orchestrator-CHQURQSC.js +30 -0
  309. package/dist/{permission-presets-WI524OSE.js → permission-presets-3XKJNM6N.js} +1 -1
  310. package/dist/{permissions-TYT6YMNZ.js → permissions-EZH3ULLD.js} +1 -1
  311. package/dist/{pg-ssl-KFHNJPGO.js → pg-ssl-4ZNXKUNH.js} +1 -1
  312. package/dist/plan-limits-7L75PB33.js +25 -0
  313. package/dist/{preferences-5YRRHGXS.js → preferences-K2GKUQSJ.js} +3 -3
  314. package/dist/project-name-OBIDABHE.js +10 -0
  315. package/dist/{projection-worker-YIJ7Q66A.js → projection-worker-HSGE44JA.js} +5 -5
  316. package/dist/push-notifications-EOTMKJ6B.js +15 -0
  317. package/dist/{reranker-2BSQ2V5M.js → reranker-ME4CK2ZQ.js} +4 -4
  318. package/dist/{review-gate-E6K7QQE5.js → review-gate-M3U2YAW6.js} +1 -1
  319. package/dist/review-polling-DQCN4TNM.js +121 -0
  320. package/dist/runtime/index.js +26 -26
  321. package/dist/{self-query-router-IZANO632.js → self-query-router-TRPHL54X.js} +50 -2
  322. package/dist/session-events-ZZBFYL5Z.js +34 -0
  323. package/dist/{session-kill-telemetry-2IB6IQSS.js → session-kill-telemetry-MUFET632.js} +7 -9
  324. package/dist/{chunk-YPQMQWA2.js → session-scope-QUUDZM2L.js} +27 -32
  325. package/dist/setup-wizard-NXWCEK63.js +12 -0
  326. package/dist/{shard-manager-IIII7AAS.js → shard-manager-VYMJM7NR.js} +4 -4
  327. package/dist/{signal-XN2C7PIG.js → signal-C263RUND.js} +1 -1
  328. package/dist/{slack-Z77TFJCK.js → slack-N7PL6QMX.js} +1 -1
  329. package/dist/{task-enforcement-VDCQ5H3H.js → task-enforcement-WJ3S6JTL.js} +23 -27
  330. package/dist/{task-scanner-IMIR3T7T.js → task-scanner-YHWRG4ZJ.js} +1 -1
  331. package/dist/task-scope-V2CTRHG7.js +32 -0
  332. package/dist/tasks-crud-W2XPUGKK.js +54 -0
  333. package/dist/tasks-review-BR2SBSYG.js +44 -0
  334. package/dist/{telegram-CRPZO7JT.js → telegram-B54FFOXD.js} +1 -1
  335. package/dist/{telemetry-SPVGPKU7.js → telemetry-7IQCPV4Q.js} +1 -1
  336. package/dist/{token-budget-VX5ZTLAG.js → token-budget-H2XSWO4D.js} +7 -9
  337. package/dist/{tool-capability-index-JBS2FDIG.js → tool-capability-index-5X2CCGIK.js} +3 -3
  338. package/dist/{tool-gates-FSNGZNXW.js → tool-gates-3DNTD7G3.js} +1 -1
  339. package/dist/{tool-gates-P6HATVYH.js → tool-gates-SGFMDREY.js} +1 -1
  340. package/dist/{tool-registry-436LVVLY.js → tool-registry-2VUAZXTW.js} +1 -1
  341. package/dist/{tool-telemetry-ASYRVRIY.js → tool-telemetry-NVPSPRYP.js} +2 -2
  342. package/dist/tui/App.js +75 -87
  343. package/dist/{tui-data-UHFRO64P.js → tui-data-QN4O565C.js} +24 -28
  344. package/dist/{update-check-LZGZISRJ.js → update-check-ERUKV2G6.js} +1 -1
  345. package/dist/{webhook-VVP7KQVC.js → webhook-L5FGAUPJ.js} +1 -1
  346. package/dist/{webhook-pipe-B6Z2QMRY.js → webhook-pipe-B7GJCJAI.js} +1 -1
  347. package/dist/{whatsapp-4IDUW46W.js → whatsapp-7FK2PRWO.js} +1 -1
  348. package/dist/{whatsapp-accounts-RTJF3LM6.js → whatsapp-accounts-VIHRSLGB.js} +1 -1
  349. package/dist/{wiki-acl-OSBQJD2E.js → wiki-acl-R4IIHICT.js} +1 -1
  350. package/dist/{wiki-client-TDZ74RHN.js → wiki-client-EUDJA7O2.js} +1 -1
  351. package/dist/{worker-gate-CVWHVSX3.js → worker-gate-3KDXLIJC.js} +6 -4
  352. package/dist/{workflow-engine-2XZK77ZX.js → workflow-engine-GISKRYSO.js} +3 -3
  353. package/dist/{worktree-O2DKCB33.js → worktree-B3FHAHEM.js} +2 -4
  354. package/package.json +4 -3
  355. package/release-notes.json +146 -146
  356. package/src/commands/exe/intercom.md +19 -3
  357. package/stack.release.json +8 -8
  358. package/dist/agent-context-CDWUZEXY.js +0 -11
  359. package/dist/behaviors-A4W3CBE5.js +0 -22
  360. package/dist/capacity-monitor-7VX6NW5J.js +0 -48
  361. package/dist/chunk-4NYQAS33.js +0 -17
  362. package/dist/chunk-57HCNSFO.js +0 -39
  363. package/dist/chunk-ELE2C7L4.js +0 -31
  364. package/dist/chunk-GGTUUI7J.js +0 -6
  365. package/dist/chunk-JT76KRZQ.js +0 -35
  366. package/dist/chunk-MBRLA4E3.js +0 -119
  367. package/dist/chunk-WZQ4CPRG.js +0 -64
  368. package/dist/content-extractor-UVZXRIPC.js +0 -8
  369. package/dist/daemon-auth-5WZWXJWL.js +0 -15
  370. package/dist/fast-db-init-TLDOE64G.js +0 -7
  371. package/dist/git-task-sweep-HELKXKNQ.js +0 -37
  372. package/dist/global-procedures-4BN6BD4N.js +0 -19
  373. package/dist/imessage-L7WKA2WD.js +0 -7
  374. package/dist/license-gate-PAW5WWP6.js +0 -14
  375. package/dist/memory-queue-client-W63JO34U.js +0 -14
  376. package/dist/notifications-FCTKUQAU.js +0 -44
  377. package/dist/orchestrator-VQL47YQP.js +0 -30
  378. package/dist/plan-limits-TK4424RV.js +0 -27
  379. package/dist/project-name-7G6XPXQ6.js +0 -12
  380. package/dist/push-notifications-66EQCPHZ.js +0 -17
  381. package/dist/session-events-JZPK3UUM.js +0 -34
  382. package/dist/session-scope-QPBPO5XV.js +0 -36
  383. package/dist/setup-wizard-UFLDL2QP.js +0 -12
  384. package/dist/task-scope-YIPIPEVK.js +0 -34
  385. package/dist/tasks-crud-E4B3ORQX.js +0 -54
  386. package/dist/tasks-review-6Y7IB572.js +0 -46
  387. /package/dist/{chunk-GGFH5MTN.js → chunk-2HV2EQW2.js} +0 -0
  388. /package/dist/{chunk-V2UBYCSC.js → chunk-APRP5D27.js} +0 -0
  389. /package/dist/{chunk-E3ZIGQH4.js → chunk-D5MPHVWH.js} +0 -0
  390. /package/dist/{chunk-VKFBVBAN.js → chunk-F3ULERRZ.js} +0 -0
  391. /package/dist/{chunk-5OANXJSV.js → chunk-HIQ5RDA7.js} +0 -0
@@ -0,0 +1,209 @@
1
+ // src/lib/daemon-restart-orchestrator.ts
2
+ import {
3
+ existsSync,
4
+ readFileSync,
5
+ writeFileSync,
6
+ appendFileSync,
7
+ mkdirSync,
8
+ openSync,
9
+ closeSync,
10
+ unlinkSync,
11
+ statSync,
12
+ renameSync,
13
+ readdirSync
14
+ } from "fs";
15
+ import { execSync } from "child_process";
16
+ import path from "path";
17
+ import os from "os";
18
+ var EXE_DIR = path.join(os.homedir(), ".exe-os");
19
+ var LOG_DIR = path.join(EXE_DIR, "logs");
20
+ var RESTART_LOG = path.join(LOG_DIR, "daemon-restarts.log");
21
+ var RESTART_MARKER = path.join(EXE_DIR, "last-daemon-restart");
22
+ var SPAWN_LOCK_PATH = path.join(EXE_DIR, "exed-spawn.lock");
23
+ var PID_PATH = process.env.EXE_DAEMON_PID ?? path.join(EXE_DIR, "exed.pid");
24
+ var SOCKET_PATH = process.env.EXE_DAEMON_SOCK ?? path.join(EXE_DIR, "exed.sock");
25
+ var OOM_MARKER_PATH = path.join(EXE_DIR, "embedding-oom-marker");
26
+ var WORKER_PIDS_DIR = path.join(EXE_DIR, "worker-pids");
27
+ var MCP_VERSION_PATH = path.join(EXE_DIR, "mcp-version");
28
+ var COOLDOWN_MS = 6e4;
29
+ var MIN_DAEMON_AGE_MS = 3e4;
30
+ var SPAWN_LOCK_STALE_MS = 3e4;
31
+ var SIGTERM_GRACE_MS = 5e3;
32
+ var MAX_LOG_SIZE = 2 * 1024 * 1024;
33
+ var _logDirChecked = false;
34
+ function ensureLogDir() {
35
+ if (_logDirChecked) return;
36
+ if (!existsSync(LOG_DIR)) mkdirSync(LOG_DIR, { recursive: true });
37
+ _logDirChecked = true;
38
+ }
39
+ function maybeRotateLog() {
40
+ try {
41
+ if (!existsSync(RESTART_LOG)) return;
42
+ const s = statSync(RESTART_LOG);
43
+ if (s.size > MAX_LOG_SIZE) {
44
+ try {
45
+ renameSync(RESTART_LOG, `${RESTART_LOG}.1`);
46
+ } catch {
47
+ }
48
+ }
49
+ } catch {
50
+ }
51
+ }
52
+ function logRestart(entry) {
53
+ try {
54
+ ensureLogDir();
55
+ maybeRotateLog();
56
+ appendFileSync(RESTART_LOG, JSON.stringify({ ts: (/* @__PURE__ */ new Date()).toISOString(), pid: process.pid, ...entry }) + "\n");
57
+ } catch {
58
+ }
59
+ }
60
+ function logRestartEvent(event, data) {
61
+ logRestart({ event, ...data });
62
+ }
63
+ function isCooldownActive() {
64
+ try {
65
+ if (!existsSync(RESTART_MARKER)) return { active: false, remainingMs: 0 };
66
+ const last = parseInt(readFileSync(RESTART_MARKER, "utf8").trim(), 10);
67
+ if (isNaN(last)) return { active: false, remainingMs: 0 };
68
+ const elapsed = Date.now() - last;
69
+ if (elapsed < COOLDOWN_MS) return { active: true, remainingMs: COOLDOWN_MS - elapsed };
70
+ } catch {
71
+ }
72
+ return { active: false, remainingMs: 0 };
73
+ }
74
+ function isDaemonTooYoung() {
75
+ try {
76
+ return Date.now() - statSync(PID_PATH).mtimeMs < MIN_DAEMON_AGE_MS;
77
+ } catch {
78
+ return false;
79
+ }
80
+ }
81
+ function isOomMarkerSet() {
82
+ return existsSync(OOM_MARKER_PATH);
83
+ }
84
+ function acquireLock() {
85
+ try {
86
+ const fd = openSync(SPAWN_LOCK_PATH, "wx");
87
+ closeSync(fd);
88
+ return true;
89
+ } catch {
90
+ try {
91
+ if (Date.now() - statSync(SPAWN_LOCK_PATH).mtimeMs > SPAWN_LOCK_STALE_MS) {
92
+ try {
93
+ unlinkSync(SPAWN_LOCK_PATH);
94
+ } catch {
95
+ }
96
+ try {
97
+ const fd = openSync(SPAWN_LOCK_PATH, "wx");
98
+ closeSync(fd);
99
+ return true;
100
+ } catch {
101
+ }
102
+ }
103
+ } catch {
104
+ }
105
+ return false;
106
+ }
107
+ }
108
+ function releaseLock() {
109
+ try {
110
+ unlinkSync(SPAWN_LOCK_PATH);
111
+ } catch {
112
+ }
113
+ }
114
+ function readDaemonPid() {
115
+ try {
116
+ if (!existsSync(PID_PATH)) return null;
117
+ const pid = parseInt(readFileSync(PID_PATH, "utf8").trim(), 10);
118
+ return pid > 0 ? pid : null;
119
+ } catch {
120
+ return null;
121
+ }
122
+ }
123
+ function isProcessAlive(pid) {
124
+ try {
125
+ process.kill(pid, 0);
126
+ return true;
127
+ } catch {
128
+ return false;
129
+ }
130
+ }
131
+ function killDaemonGracefully(pid) {
132
+ try {
133
+ process.kill(pid, "SIGTERM");
134
+ } catch {
135
+ return;
136
+ }
137
+ const deadline = Date.now() + SIGTERM_GRACE_MS;
138
+ while (Date.now() < deadline) {
139
+ if (!isProcessAlive(pid)) return;
140
+ const waitEnd = Date.now() + 200;
141
+ while (Date.now() < waitEnd) {
142
+ }
143
+ }
144
+ try {
145
+ process.kill(pid, "SIGKILL");
146
+ logRestart({ event: "sigkill_escalation", target_pid: pid, message: "SIGTERM grace expired, sent SIGKILL" });
147
+ } catch {
148
+ }
149
+ }
150
+ function requestRestart(reason, opts) {
151
+ const isEmbedRelated = opts?.isEmbedRelated ?? false;
152
+ const cooldown = isCooldownActive();
153
+ if (cooldown.active) {
154
+ const msg = `Restart cooldown active (${Math.round(cooldown.remainingMs / 1e3)}s left)`;
155
+ process.stderr.write(`[restart-orchestrator] ${msg} \u2014 skipping
156
+ `);
157
+ logRestart({ event: "skipped", reason, skip_reason: "cooldown" });
158
+ return { ok: false, skipped: msg };
159
+ }
160
+ if (isDaemonTooYoung()) {
161
+ const msg = `Daemon too young (< ${MIN_DAEMON_AGE_MS / 1e3}s)`;
162
+ process.stderr.write(`[restart-orchestrator] ${msg} \u2014 skipping
163
+ `);
164
+ logRestart({ event: "skipped", reason, skip_reason: "too_young" });
165
+ return { ok: false, skipped: msg };
166
+ }
167
+ if (isEmbedRelated && isOomMarkerSet()) {
168
+ const msg = "Embeddings disabled (OOM marker)";
169
+ process.stderr.write(`[restart-orchestrator] ${msg} \u2014 skipping
170
+ `);
171
+ logRestart({ event: "skipped", reason, skip_reason: "oom_marker" });
172
+ return { ok: false, skipped: msg };
173
+ }
174
+ if (!acquireLock()) {
175
+ const msg = "Another process is already restarting daemon";
176
+ process.stderr.write(`[restart-orchestrator] ${msg} \u2014 skipping
177
+ `);
178
+ logRestart({ event: "skipped", reason, skip_reason: "lock_held" });
179
+ return { ok: false, skipped: msg };
180
+ }
181
+ try {
182
+ try {
183
+ writeFileSync(RESTART_MARKER, String(Date.now()));
184
+ } catch {
185
+ }
186
+ const pid = readDaemonPid();
187
+ logRestart({ event: "restart_initiated", reason, target_pid: pid, is_embed_related: isEmbedRelated });
188
+ process.stderr.write(`[restart-orchestrator] Killing daemon (PID ${pid ?? "unknown"}) \u2014 reason: ${reason}
189
+ `);
190
+ if (pid !== null && isProcessAlive(pid)) killDaemonGracefully(pid);
191
+ try {
192
+ unlinkSync(PID_PATH);
193
+ } catch {
194
+ }
195
+ try {
196
+ unlinkSync(SOCKET_PATH);
197
+ } catch {
198
+ }
199
+ logRestart({ event: "restart_complete", reason, killed_pid: pid });
200
+ return { ok: true, pid, reason };
201
+ } finally {
202
+ releaseLock();
203
+ }
204
+ }
205
+
206
+ export {
207
+ logRestartEvent,
208
+ requestRestart
209
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ TmuxTransport
3
+ } from "./chunk-RLCZBSUB.js";
4
+
5
+ // src/lib/transport.ts
6
+ var _transport = null;
7
+ function getTransport() {
8
+ if (!_transport) {
9
+ _transport = new TmuxTransport();
10
+ }
11
+ return _transport;
12
+ }
13
+ function setTransport(t) {
14
+ _transport = t;
15
+ }
16
+
17
+ export {
18
+ getTransport,
19
+ setTransport
20
+ };
@@ -1,21 +1,15 @@
1
1
  import {
2
2
  employeeSessionName,
3
- init_task_scope,
4
- init_tmux_routing,
5
3
  isEmployeeAlive,
6
4
  resolveExeSession,
7
5
  sendIntercom,
8
6
  strictSessionScopeFilter
9
- } from "./chunk-V3YNF3JK.js";
7
+ } from "./chunk-H4YONWQX.js";
10
8
  import {
11
- getClient,
12
- init_database
13
- } from "./chunk-WLW7QV2C.js";
9
+ getClient
10
+ } from "./chunk-NA3MXUU6.js";
14
11
 
15
12
  // src/lib/messaging.ts
16
- init_database();
17
- init_tmux_routing();
18
- init_task_scope();
19
13
  import crypto from "crypto";
20
14
  function generateUlid() {
21
15
  const timestamp = Date.now().toString(36).padStart(10, "0");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getGlobalProceduresBlock
3
- } from "./chunk-52LCN4JK.js";
3
+ } from "./chunk-ER3UJ2VL.js";
4
4
 
5
5
  // src/lib/employee-templates.ts
6
6
  var BASE_OPERATING_PROCEDURES = `
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  sendMessage
3
- } from "./chunk-GPCQRSAR.js";
3
+ } from "./chunk-4F56OUR7.js";
4
4
  import {
5
5
  getActiveAgent
6
- } from "./chunk-HLYXFVVT.js";
6
+ } from "./chunk-BXCJOACQ.js";
7
7
 
8
8
  // src/mcp/tools/send-message.ts
9
9
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MODELS_DIR,
3
3
  init_config
4
- } from "./chunk-QASVYG2B.js";
4
+ } from "./chunk-KHV55ME4.js";
5
5
 
6
6
  // src/lib/reranker.ts
7
7
  init_config();
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  EXE_AI_DIR,
3
3
  init_config
4
- } from "./chunk-QASVYG2B.js";
4
+ } from "./chunk-KHV55ME4.js";
5
5
  import {
6
6
  enforcePrivateFileSync,
7
7
  ensurePrivateDirSync,
8
8
  init_secure_files
9
- } from "./chunk-VAOAI6DS.js";
10
- import {
11
- __esm
12
- } from "./chunk-KFQGP6VL.js";
9
+ } from "./chunk-GCMT6RWI.js";
13
10
 
14
11
  // src/lib/daemon-auth.ts
12
+ init_config();
13
+ init_secure_files();
15
14
  import crypto from "crypto";
16
15
  import path from "path";
17
16
  import { existsSync, readFileSync, writeFileSync } from "fs";
17
+ var DAEMON_TOKEN_PATH = path.join(EXE_AI_DIR, "exed.token");
18
18
  function normalizeToken(token) {
19
19
  if (!token) return null;
20
20
  const trimmed = token.trim();
@@ -38,18 +38,9 @@ function ensureDaemonToken(seed) {
38
38
  enforcePrivateFileSync(DAEMON_TOKEN_PATH);
39
39
  return token;
40
40
  }
41
- var DAEMON_TOKEN_PATH;
42
- var init_daemon_auth = __esm({
43
- "src/lib/daemon-auth.ts"() {
44
- init_config();
45
- init_secure_files();
46
- DAEMON_TOKEN_PATH = path.join(EXE_AI_DIR, "exed.token");
47
- }
48
- });
49
41
 
50
42
  export {
51
43
  DAEMON_TOKEN_PATH,
52
44
  readDaemonToken,
53
- ensureDaemonToken,
54
- init_daemon_auth
45
+ ensureDaemonToken
55
46
  };
@@ -1,17 +1,12 @@
1
1
  import {
2
- init_behaviors,
3
2
  listBehaviors
4
- } from "./chunk-BNH4LWKE.js";
3
+ } from "./chunk-RWJY7KMP.js";
5
4
  import {
6
- config_exports,
7
- init_config
8
- } from "./chunk-QASVYG2B.js";
9
- import {
10
- __toCommonJS
11
- } from "./chunk-KFQGP6VL.js";
5
+ init_config,
6
+ loadConfigSync
7
+ } from "./chunk-KHV55ME4.js";
12
8
 
13
9
  // src/lib/behaviors-export.ts
14
- init_behaviors();
15
10
  import os from "os";
16
11
  import path from "path";
17
12
  import {
@@ -22,6 +17,7 @@ import {
22
17
  unlinkSync,
23
18
  writeFileSync
24
19
  } from "fs";
20
+ init_config();
25
21
  var BEHAVIORS_EXPORT_DIR = path.join(
26
22
  os.homedir(),
27
23
  ".exe-os",
@@ -31,7 +27,6 @@ var STALE_EXPORT_AGE_MS = 60 * 60 * 1e3;
31
27
  var DEFAULT_BEHAVIOR_LIMIT = 30;
32
28
  function getBehaviorLimit() {
33
29
  try {
34
- const { loadConfigSync } = (init_config(), __toCommonJS(config_exports));
35
30
  const cfg = loadConfigSync();
36
31
  return cfg.behaviorExportLimit ?? DEFAULT_BEHAVIOR_LIMIT;
37
32
  } catch {
@@ -1,20 +1,9 @@
1
- import {
2
- __esm,
3
- __export
4
- } from "./chunk-KFQGP6VL.js";
5
-
6
1
  // src/lib/session-registry.ts
7
- var session_registry_exports = {};
8
- __export(session_registry_exports, {
9
- listSessions: () => listSessions,
10
- pruneStaleSessions: () => pruneStaleSessions,
11
- refreshSessionProject: () => refreshSessionProject,
12
- registerSession: () => registerSession
13
- });
14
2
  import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
15
3
  import { execSync } from "child_process";
16
4
  import path from "path";
17
5
  import os from "os";
6
+ var REGISTRY_PATH = path.join(os.homedir(), ".exe-os", "session-registry.json");
18
7
  function registerSession(entry) {
19
8
  const dir = path.dirname(REGISTRY_PATH);
20
9
  if (!existsSync(dir)) {
@@ -66,18 +55,10 @@ function pruneStaleSessions() {
66
55
  }
67
56
  return pruned;
68
57
  }
69
- var REGISTRY_PATH;
70
- var init_session_registry = __esm({
71
- "src/lib/session-registry.ts"() {
72
- REGISTRY_PATH = path.join(os.homedir(), ".exe-os", "session-registry.json");
73
- }
74
- });
75
58
 
76
59
  export {
77
60
  registerSession,
78
61
  refreshSessionProject,
79
62
  listSessions,
80
- pruneStaleSessions,
81
- session_registry_exports,
82
- init_session_registry
63
+ pruneStaleSessions
83
64
  };
@@ -1,23 +1,19 @@
1
1
  import {
2
2
  PLATFORM_PROCEDURE_TITLES
3
- } from "./chunk-WZDI6UJ6.js";
3
+ } from "./chunk-MPXPPKJ4.js";
4
4
  import {
5
5
  getClient,
6
6
  getIdentity,
7
- init_database,
8
- init_identity,
9
7
  listIdentities,
10
8
  updateIdentity
11
- } from "./chunk-WLW7QV2C.js";
9
+ } from "./chunk-NA3MXUU6.js";
12
10
  import {
13
11
  atomicWriteJsonSync,
14
12
  init_secure_files
15
- } from "./chunk-VAOAI6DS.js";
13
+ } from "./chunk-GCMT6RWI.js";
16
14
 
17
15
  // src/lib/orchestration-package.ts
18
16
  init_secure_files();
19
- init_database();
20
- init_identity();
21
17
  import { randomUUID } from "crypto";
22
18
  import { copyFileSync, existsSync, mkdirSync, readFileSync } from "fs";
23
19
  import os from "os";
@@ -1,27 +1,16 @@
1
1
  import {
2
2
  EXE_AI_DIR,
3
3
  init_config
4
- } from "./chunk-QASVYG2B.js";
5
- import {
6
- __esm,
7
- __export
8
- } from "./chunk-KFQGP6VL.js";
4
+ } from "./chunk-KHV55ME4.js";
9
5
 
10
6
  // src/lib/db-backup.ts
11
- var db_backup_exports = {};
12
- __export(db_backup_exports, {
13
- createBackup: () => createBackup,
14
- findActiveDb: () => findActiveDb,
15
- getBackupDir: () => getBackupDir,
16
- getLatestBackup: () => getLatestBackup,
17
- hasBackupToday: () => hasBackupToday,
18
- listBackups: () => listBackups,
19
- restoreBackup: () => restoreBackup,
20
- rotateBackups: () => rotateBackups
21
- });
7
+ init_config();
22
8
  import { copyFileSync, existsSync, mkdirSync, readdirSync, unlinkSync, statSync } from "fs";
23
9
  import { execFileSync } from "child_process";
24
10
  import path from "path";
11
+ var BACKUP_DIR = path.join(EXE_AI_DIR, "backups");
12
+ var DEFAULT_KEEP_DAYS = 3;
13
+ var DB_NAMES = ["memories.db", "exe-mem.db", "exe-os.db", "exe.db"];
25
14
  function findActiveDb() {
26
15
  for (const name of DB_NAMES) {
27
16
  const p = path.join(EXE_AI_DIR, name);
@@ -162,15 +151,6 @@ function restoreBackup(backupPath) {
162
151
  function getBackupDir() {
163
152
  return BACKUP_DIR;
164
153
  }
165
- var BACKUP_DIR, DEFAULT_KEEP_DAYS, DB_NAMES;
166
- var init_db_backup = __esm({
167
- "src/lib/db-backup.ts"() {
168
- init_config();
169
- BACKUP_DIR = path.join(EXE_AI_DIR, "backups");
170
- DEFAULT_KEEP_DAYS = 3;
171
- DB_NAMES = ["memories.db", "exe-mem.db", "exe-os.db", "exe.db"];
172
- }
173
- });
174
154
 
175
155
  export {
176
156
  findActiveDb,
@@ -180,7 +160,5 @@ export {
180
160
  hasBackupToday,
181
161
  getLatestBackup,
182
162
  restoreBackup,
183
- getBackupDir,
184
- db_backup_exports,
185
- init_db_backup
163
+ getBackupDir
186
164
  };
@@ -1,10 +1,6 @@
1
- import {
2
- __require
3
- } from "./chunk-KFQGP6VL.js";
4
-
5
1
  // src/lib/keychain.ts
6
2
  import { readFile, writeFile, unlink, mkdir, chmod, rename, copyFile } from "fs/promises";
7
- import { existsSync, statSync, writeFileSync } from "fs";
3
+ import { existsSync, statSync, writeFileSync, readFileSync } from "fs";
8
4
  import { execSync } from "child_process";
9
5
  import crypto from "crypto";
10
6
  import path from "path";
@@ -195,16 +191,14 @@ function deriveMachineKey() {
195
191
  }
196
192
  function readMachineId() {
197
193
  try {
198
- const { readFileSync } = __require("fs");
199
194
  return readFileSync("/etc/machine-id", "utf-8").trim();
200
195
  } catch {
201
196
  return "";
202
197
  }
203
198
  }
204
199
  function encryptWithMachineKey(plaintext, machineKey) {
205
- const crypto2 = __require("crypto");
206
- const iv = crypto2.randomBytes(12);
207
- const cipher = crypto2.createCipheriv("aes-256-gcm", machineKey, iv);
200
+ const iv = crypto.randomBytes(12);
201
+ const cipher = crypto.createCipheriv("aes-256-gcm", machineKey, iv);
208
202
  let encrypted = cipher.update(plaintext, "utf-8", "base64");
209
203
  encrypted += cipher.final("base64");
210
204
  const authTag = cipher.getAuthTag().toString("base64");
@@ -2,35 +2,29 @@ import {
2
2
  findScopedDuplicate,
3
3
  governMemoryRecord,
4
4
  schedulePostWriteMemoryHygiene
5
- } from "./chunk-E3ZIGQH4.js";
5
+ } from "./chunk-D5MPHVWH.js";
6
6
  import {
7
- init_state_bus,
8
7
  orgBus
9
- } from "./chunk-WZQ4CPRG.js";
8
+ } from "./chunk-MP2AFCGL.js";
10
9
  import {
11
10
  disposeTurso,
12
11
  ensureSchema,
13
12
  getClient,
14
- initTurso,
15
- init_database
16
- } from "./chunk-WLW7QV2C.js";
13
+ initTurso
14
+ } from "./chunk-NA3MXUU6.js";
17
15
  import {
18
- EMBEDDING_DIM,
19
- init_memory
20
- } from "./chunk-4NYQAS33.js";
16
+ EMBEDDING_DIM
17
+ } from "./chunk-FXU7JOXK.js";
21
18
  import {
22
19
  getMasterKey
23
- } from "./chunk-YGHMRSH5.js";
20
+ } from "./chunk-6D23UNXU.js";
24
21
  import {
25
22
  init_config,
26
23
  loadConfig
27
- } from "./chunk-QASVYG2B.js";
24
+ } from "./chunk-KHV55ME4.js";
28
25
 
29
26
  // src/lib/store.ts
30
- init_memory();
31
- init_database();
32
27
  init_config();
33
- init_state_bus();
34
28
  var _debugStore = process.env.EXE_DEBUG === "1";
35
29
  function logStoreDebug(context, err) {
36
30
  if (_debugStore) {
@@ -114,7 +108,7 @@ async function initStore(options) {
114
108
  if (!options?.lightweight) {
115
109
  try {
116
110
  if (process.env.EXE_DISABLE_SHARDING !== "1") {
117
- const { initShardManager } = await import("./shard-manager-IIII7AAS.js");
111
+ const { initShardManager } = await import("./shard-manager-VYMJM7NR.js");
118
112
  initShardManager(hexKey);
119
113
  }
120
114
  } catch (e) {
@@ -127,7 +121,7 @@ async function initStore(options) {
127
121
  );
128
122
  _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
129
123
  try {
130
- const { loadGlobalProcedures } = await import("./global-procedures-4BN6BD4N.js");
124
+ const { loadGlobalProcedures } = await import("./global-procedures-IEIJBCAH.js");
131
125
  await loadGlobalProcedures();
132
126
  } catch (e) {
133
127
  logStoreWarn("catch", e);
@@ -244,7 +238,7 @@ async function writeMemory(record) {
244
238
  procedure_for: record.procedure_for ?? null
245
239
  };
246
240
  try {
247
- const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-JY4NU3AY.js");
241
+ const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-OOHJIXIX.js");
248
242
  const poisonResult = await checkMemoryPoisoning({
249
243
  memoryId: dbRow.id,
250
244
  vector: Array.isArray(dbRow.vector) ? dbRow.vector : void 0,
@@ -418,13 +412,13 @@ async function flushBatch() {
418
412
  }
419
413
  _nextVersion = baseVersion;
420
414
  try {
421
- const { insertMemoryCardsForBatch } = await import("./memory-cards-PCZ2KWMN.js");
415
+ const { insertMemoryCardsForBatch } = await import("./memory-cards-OLE6MGO7.js");
422
416
  await insertMemoryCardsForBatch(batch);
423
417
  } catch (e) {
424
418
  logStoreWarn("catch", e);
425
419
  }
426
420
  try {
427
- const { insertOntologyForBatch } = await import("./agentic-ontology-Q3OVWKAK.js");
421
+ const { insertOntologyForBatch } = await import("./agentic-ontology-5PGUVMDP.js");
428
422
  await insertOntologyForBatch(batch);
429
423
  } catch (e) {
430
424
  logStoreWarn("catch", e);
@@ -432,7 +426,7 @@ async function flushBatch() {
432
426
  schedulePostWriteMemoryHygiene(batch.map((row) => row.id));
433
427
  _pendingRecords.splice(0, batch.length);
434
428
  try {
435
- const { isShardingEnabled, getReadyShardClient } = await import("./shard-manager-IIII7AAS.js");
429
+ const { isShardingEnabled, getReadyShardClient } = await import("./shard-manager-VYMJM7NR.js");
436
430
  if (process.env.EXE_DISABLE_SHARDING !== "1" && isShardingEnabled()) {
437
431
  const byProject = /* @__PURE__ */ new Map();
438
432
  let skippedUnknown = 0;
@@ -503,7 +497,7 @@ function buildRawVisibilityFilter(options, columnPrefix) {
503
497
  async function searchMemories(queryVector, agentId, options) {
504
498
  let client;
505
499
  try {
506
- const { isShardingEnabled, shardExists, getReadyShardClient } = await import("./shard-manager-IIII7AAS.js");
500
+ const { isShardingEnabled, shardExists, getReadyShardClient } = await import("./shard-manager-VYMJM7NR.js");
507
501
  if (isShardingEnabled() && options?.projectName && shardExists(options.projectName)) {
508
502
  client = await getReadyShardClient(options.projectName);
509
503
  } else {
@@ -674,12 +668,29 @@ async function updateMemoryStatus(id, status) {
674
668
  args: [status, id]
675
669
  });
676
670
  }
677
- function reserveVersions(count) {
678
- const reserved = [];
679
- for (let i = 0; i < count; i++) {
680
- reserved.push(_nextVersion++);
671
+ async function reserveVersions(count) {
672
+ const client = getClient();
673
+ await client.execute("BEGIN IMMEDIATE");
674
+ try {
675
+ const vResult = await client.execute("SELECT COALESCE(MAX(version), 0) as max_v FROM memories");
676
+ let baseVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
677
+ if (_nextVersion > baseVersion) {
678
+ baseVersion = _nextVersion;
679
+ }
680
+ const reserved = [];
681
+ for (let i = 0; i < count; i++) {
682
+ reserved.push(baseVersion + i);
683
+ }
684
+ _nextVersion = baseVersion + count;
685
+ await client.execute("COMMIT");
686
+ return reserved;
687
+ } catch (err) {
688
+ try {
689
+ await client.execute("ROLLBACK");
690
+ } catch {
691
+ }
692
+ throw err;
681
693
  }
682
- return reserved;
683
694
  }
684
695
  async function getMemoryCardinality(agentId) {
685
696
  try {
@@ -1,10 +1,8 @@
1
1
  import {
2
- getClient,
3
- init_database
4
- } from "./chunk-WLW7QV2C.js";
2
+ getClient
3
+ } from "./chunk-NA3MXUU6.js";
5
4
 
6
5
  // src/lib/token-spend.ts
7
- init_database();
8
6
  import { readdir } from "fs/promises";
9
7
  import { createReadStream } from "fs";
10
8
  import { createInterface } from "readline";