@askexenow/exe-os 0.9.311 → 0.9.313

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 (344) hide show
  1. package/deploy/compose/.env.askexe-control-plane.example +1 -1
  2. package/deploy/compose/.env.customer.example +11 -7
  3. package/deploy/compose/.env.default +4 -4
  4. package/deploy/compose/.env.example +7 -7
  5. package/deploy/compose/docker-compose.yml +43 -19
  6. package/deploy/compose/gateway.json +2 -2
  7. package/deploy/compose/init-db.sql +6 -20
  8. package/deploy/compose/setup.sh +74 -132
  9. package/deploy/compose/status.sh +5 -0
  10. package/deploy/stack-manifests/v0.9.json +25 -4
  11. package/dist/{active-agent-ORX47ZKW.js → active-agent-EWF2HJ3W.js} +6 -6
  12. package/dist/{active-agent-S5T2YMOR.js → active-agent-FFN5ARMC.js} +6 -6
  13. package/dist/{agentic-ontology-6KBAXLSJ.js → agentic-ontology-AAUATKUS.js} +1 -1
  14. package/dist/{backfill-metadata-FV7GX6AS.js → backfill-metadata-FBYFDOTH.js} +7 -7
  15. package/dist/{background-jobs-A2LV36UX.js → background-jobs-2QZ5IQKE.js} +5 -3
  16. package/dist/{behaviors-47CPEKJ7.js → behaviors-PQ77IPJR.js} +8 -8
  17. package/dist/bin/age-ontology-load.js +3 -3
  18. package/dist/bin/agentic-ontology-backfill.js +9 -9
  19. package/dist/bin/agentic-reflection-backfill.js +10 -10
  20. package/dist/bin/agentic-semantic-label.js +9 -9
  21. package/dist/bin/backfill-conversations.js +10 -10
  22. package/dist/bin/backfill-responses.js +10 -10
  23. package/dist/bin/backfill-vectors.js +13 -13
  24. package/dist/bin/bulk-sync-postgres.js +16 -16
  25. package/dist/bin/cc-doctor.js +9 -9
  26. package/dist/bin/cleanup-stale-review-tasks.js +15 -15
  27. package/dist/bin/cli.js +21 -21
  28. package/dist/bin/deferred-daemon-restart.js +1 -1
  29. package/dist/bin/exe-agent-config.js +6 -6
  30. package/dist/bin/exe-agent.js +14 -14
  31. package/dist/bin/exe-assign.js +12 -12
  32. package/dist/bin/exe-boot.js +78 -57
  33. package/dist/bin/exe-call.js +7 -7
  34. package/dist/bin/exe-cloud.js +17 -17
  35. package/dist/bin/exe-config-dump.js +7 -7
  36. package/dist/bin/exe-dispatch.js +15 -15
  37. package/dist/bin/exe-doctor.js +11 -2
  38. package/dist/bin/exe-export-behaviors.js +10 -10
  39. package/dist/bin/exe-forget.js +9 -9
  40. package/dist/bin/exe-gateway.js +10 -10
  41. package/dist/bin/exe-healthcheck.js +9 -9
  42. package/dist/bin/exe-heartbeat.js +15 -15
  43. package/dist/bin/exe-kill.js +18 -18
  44. package/dist/bin/exe-launch-agent.js +30 -28
  45. package/dist/bin/exe-new-employee.js +36 -15
  46. package/dist/bin/exe-pending-messages.js +16 -16
  47. package/dist/bin/exe-pending-notifications.js +15 -15
  48. package/dist/bin/exe-pending-reviews.js +15 -15
  49. package/dist/bin/exe-preflight.js +1 -1
  50. package/dist/bin/exe-rename.js +19 -29
  51. package/dist/bin/exe-review.js +17 -17
  52. package/dist/bin/exe-search.js +8 -8
  53. package/dist/bin/exe-session-cleanup.js +41 -20
  54. package/dist/bin/exe-settings.js +18 -18
  55. package/dist/bin/exe-start-codex.js +15 -15
  56. package/dist/bin/exe-start-opencode.js +11 -11
  57. package/dist/bin/exe-status.js +16 -16
  58. package/dist/bin/exe-support.js +5 -5
  59. package/dist/bin/exe-team.js +6 -6
  60. package/dist/bin/exe-watchdog.js +33 -4
  61. package/dist/bin/git-sweep.js +16 -16
  62. package/dist/bin/graph-backfill.js +8 -8
  63. package/dist/bin/graph-export.js +8 -8
  64. package/dist/bin/import-history.js +10 -10
  65. package/dist/bin/install-launchd.js +2 -2
  66. package/dist/bin/install.js +15 -15
  67. package/dist/bin/intercom-check.js +4 -4
  68. package/dist/bin/mcp-sessions.js +2 -2
  69. package/dist/bin/orchestration-metrics.js +7 -7
  70. package/dist/bin/postgres-agentic-reflection-backfill.js +5 -5
  71. package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
  72. package/dist/bin/pre-build-guard.js +12 -1
  73. package/dist/bin/scan-tasks.js +15 -15
  74. package/dist/bin/setup.js +3 -3
  75. package/dist/bin/shard-migrate.js +8 -8
  76. package/dist/bin/stack-update.js +8 -8
  77. package/dist/bin/verify-stack.js +3 -1
  78. package/dist/bin/vps-health-gate.js +1 -1
  79. package/dist/{branding-SC4BOPUY.js → branding-EDUC7TUP.js} +2 -2
  80. package/dist/{browser-session-store-DV5TDXXD.js → browser-session-store-CXQMOSEC.js} +1 -1
  81. package/dist/{capability-cards-WQVY7WSS.js → capability-cards-2U3XWCDP.js} +5 -5
  82. package/dist/{capacity-monitor-BUKYPSWR.js → capacity-monitor-ZRLW7TVL.js} +16 -16
  83. package/dist/{catchup-brief-X5IVQAOH.js → catchup-brief-FSBZVYPL.js} +18 -18
  84. package/dist/{chunk-PMEOSD6S.js → chunk-24BUDF3J.js} +9 -6
  85. package/dist/{chunk-2NVEKSSP.js → chunk-2FULKRDO.js} +56 -38
  86. package/dist/{chunk-QB5JOGPK.js → chunk-2PI6JBJL.js} +5 -4
  87. package/dist/{chunk-MTIJ2NXY.js → chunk-2PWRUIKZ.js} +1 -1
  88. package/dist/{chunk-NIZQ3CIS.js → chunk-3AMGSCRH.js} +1 -1
  89. package/dist/{chunk-7ODTYODO.js → chunk-3LGID56M.js} +10 -7
  90. package/dist/{chunk-GSY6HL3T.js → chunk-4JI54RHR.js} +5 -5
  91. package/dist/{chunk-ISILDO7P.js → chunk-4THK7IA4.js} +1 -1
  92. package/dist/{chunk-IRIPGGGL.js → chunk-4UHQYBMQ.js} +1 -1
  93. package/dist/{chunk-HQODUV3G.js → chunk-552IGUBB.js} +2 -2
  94. package/dist/{chunk-IRHNV4GY.js → chunk-5KLQCGI5.js} +72 -18
  95. package/dist/{chunk-SOT23KWW.js → chunk-63UEWYM3.js} +4 -4
  96. package/dist/{chunk-QE7UVQDP.js → chunk-6PR2RAKM.js} +1 -1
  97. package/dist/{chunk-ZZXADKAP.js → chunk-6SPUK67A.js} +2 -2
  98. package/dist/{chunk-RVXWGPD3.js → chunk-75TM3APG.js} +29 -6
  99. package/dist/{chunk-IZPO6IOZ.js → chunk-7QSXARI3.js} +1 -1
  100. package/dist/{chunk-A2YZG4AD.js → chunk-AIUXE3ZJ.js} +6 -6
  101. package/dist/{chunk-U63BZI2B.js → chunk-AJERMFD6.js} +3 -3
  102. package/dist/{chunk-BUOMSIXH.js → chunk-BMNX3YWX.js} +2 -2
  103. package/dist/{chunk-YUBTHJVV.js → chunk-BRSMAFBN.js} +1 -1
  104. package/dist/{chunk-JZW5AOWI.js → chunk-BSPALHIR.js} +2 -2
  105. package/dist/{chunk-VDYUKTNS.js → chunk-CLAYNAXC.js} +4 -5
  106. package/dist/{chunk-J3QZPDNH.js → chunk-CNQ25C4C.js} +1 -1
  107. package/dist/{chunk-GWPICNSO.js → chunk-CSTL7BMK.js} +49 -4
  108. package/dist/{chunk-5DPE7B7K.js → chunk-CTYHSVHP.js} +1 -1
  109. package/dist/{chunk-EM4EYF3P.js → chunk-CVTWQZOR.js} +13 -5
  110. package/dist/{chunk-JNARUXDC.js → chunk-CW3FPWUW.js} +2 -2
  111. package/dist/{chunk-V42BSVX6.js → chunk-CWACO2D4.js} +51 -4
  112. package/dist/{chunk-RPBTYQKJ.js → chunk-CWUCD7C7.js} +1 -1
  113. package/dist/{chunk-DFUCFLZH.js → chunk-D4EMVYI7.js} +2 -2
  114. package/dist/{chunk-W2J2RF5N.js → chunk-DIHMGQGV.js} +3 -3
  115. package/dist/{chunk-YB7U4WTY.js → chunk-DJ4RG3RK.js} +2 -2
  116. package/dist/{chunk-KSMITUGY.js → chunk-DR7QPGX4.js} +3 -3
  117. package/dist/{chunk-QNXM2HXW.js → chunk-ELFFRVNL.js} +1 -1
  118. package/dist/{chunk-QEGXNJGR.js → chunk-EV2SMRLF.js} +4 -4
  119. package/dist/{chunk-VFSYVQX4.js → chunk-F3QMXKKJ.js} +8 -2
  120. package/dist/{chunk-NCC3F6GM.js → chunk-F5XPKUPK.js} +2 -2
  121. package/dist/{chunk-43R2GILO.js → chunk-FIBL4JRZ.js} +2 -2
  122. package/dist/{chunk-B2J3BBJC.js → chunk-FQH4R6UG.js} +2 -2
  123. package/dist/{chunk-AC6DKMVS.js → chunk-FSAKWKWU.js} +1 -1
  124. package/dist/{chunk-GL5NU6IK.js → chunk-FXS5OFGH.js} +1 -1
  125. package/dist/{chunk-K7KBAJQL.js → chunk-GHJRLETI.js} +10 -10
  126. package/dist/{chunk-VQRTO7IS.js → chunk-H73TUI4Y.js} +9 -2
  127. package/dist/{chunk-IIHE3FNC.js → chunk-HSXWUZOD.js} +3 -3
  128. package/dist/{chunk-JV225JBX.js → chunk-I6RHLHVW.js} +2 -2
  129. package/dist/{chunk-S6HVQF27.js → chunk-IEDCQRGG.js} +88 -4
  130. package/dist/{chunk-4Q5VNQTV.js → chunk-IFSOVXGN.js} +3 -3
  131. package/dist/{chunk-JDYO76PI.js → chunk-ITVMRPCQ.js} +17 -9
  132. package/dist/{chunk-VT6P7FV4.js → chunk-IU44MPY3.js} +1 -1
  133. package/dist/{chunk-6OD2RVIA.js → chunk-IXTDBQYU.js} +273 -397
  134. package/dist/{chunk-2NGPZCWX.js → chunk-JB7QUK3D.js} +3 -3
  135. package/dist/{chunk-VT2B5BHM.js → chunk-JBSCL2XT.js} +2 -1
  136. package/dist/{chunk-MPX3TRMQ.js → chunk-JD5S5AAV.js} +1 -1
  137. package/dist/{chunk-XYG722JW.js → chunk-JIJKUZIO.js} +3 -3
  138. package/dist/{chunk-DKHBMIVE.js → chunk-K5C6LC2G.js} +244 -45
  139. package/dist/{chunk-DAOHCXM2.js → chunk-KH6BCYLC.js} +1 -1
  140. package/dist/{chunk-4L4R6AQJ.js → chunk-KMI4TUTW.js} +1 -1
  141. package/dist/{chunk-PHFPIUWU.js → chunk-KWOAM7TA.js} +3 -0
  142. package/dist/{chunk-RZJ6DXVE.js → chunk-L6QI2NNG.js} +1 -1
  143. package/dist/{chunk-HED6D5KR.js → chunk-MMNMQNLD.js} +43 -29
  144. package/dist/{chunk-KAVUTP5G.js → chunk-N3CRJ2VW.js} +3 -3
  145. package/dist/{chunk-OBJXZII2.js → chunk-N7LBAQGK.js} +3 -3
  146. package/dist/{chunk-LMX7UKGX.js → chunk-OUAGTQC4.js} +17 -11
  147. package/dist/{chunk-WZBUKC5N.js → chunk-OUJI2ZTY.js} +2 -2
  148. package/dist/{chunk-YUGLOZOR.js → chunk-OXTZEKVA.js} +1 -1
  149. package/dist/{chunk-OR3TAZL3.js → chunk-P4ULFI2N.js} +1 -1
  150. package/dist/{chunk-6LNSZADA.js → chunk-PVC4RNHQ.js} +50 -11
  151. package/dist/{chunk-FM7XZDZI.js → chunk-R2WP3XIN.js} +1 -1
  152. package/dist/{chunk-IBDPPBFK.js → chunk-R5IPZ5ZC.js} +1 -1
  153. package/dist/{chunk-7WDIGRSO.js → chunk-R5TZ2FC3.js} +1 -1
  154. package/dist/{chunk-2UVN2NBN.js → chunk-RICNNGYH.js} +3 -3
  155. package/dist/{chunk-WBJXJ2R4.js → chunk-RLBVY5FE.js} +17 -14
  156. package/dist/{chunk-XXJRZ75E.js → chunk-RV634O2W.js} +5 -2
  157. package/dist/{chunk-3KH6GXXX.js → chunk-RYPFOZQH.js} +2 -2
  158. package/dist/{chunk-DNFU56ZS.js → chunk-SB7W6XI4.js} +1 -1
  159. package/dist/{chunk-PPXQE7AS.js → chunk-SE6MLUOK.js} +33 -34
  160. package/dist/{chunk-65DBIEM2.js → chunk-SHIICYJW.js} +7 -1
  161. package/dist/{chunk-KPVVTHPK.js → chunk-SRMNWAHN.js} +15 -10
  162. package/dist/chunk-T2DJR7ND.js +367 -0
  163. package/dist/{chunk-Z6H6Y4BS.js → chunk-TA22MGGN.js} +1 -1
  164. package/dist/{chunk-ZOVHXTGC.js → chunk-TN7SC2ZQ.js} +1 -1
  165. package/dist/{chunk-XV5HRIXG.js → chunk-TRPGNCVB.js} +8 -8
  166. package/dist/{chunk-4BANMHJ5.js → chunk-UDZP2SHJ.js} +3 -3
  167. package/dist/{chunk-GMZMBLHT.js → chunk-UM6WUSQ7.js} +2 -2
  168. package/dist/{chunk-2EJ636HI.js → chunk-UST3MKK7.js} +1 -1
  169. package/dist/{chunk-RQ7OVXUZ.js → chunk-V2CZVZUO.js} +2 -2
  170. package/dist/{chunk-4RJJ5FJ2.js → chunk-V4UKBUUA.js} +1 -1
  171. package/dist/{chunk-EOS7VPVT.js → chunk-VA2MDALR.js} +8 -8
  172. package/dist/{chunk-SCYWCWKY.js → chunk-VG4ZH2Z3.js} +24 -10
  173. package/dist/{chunk-255DIG4B.js → chunk-VHLI6CTD.js} +1 -1
  174. package/dist/{chunk-DFIOOK5R.js → chunk-WCES22KG.js} +4 -3
  175. package/dist/{chunk-5A6KTWQL.js → chunk-WOTKNUKK.js} +126 -2
  176. package/dist/{chunk-62UZWGFX.js → chunk-WZZBGGSD.js} +63 -2
  177. package/dist/{chunk-ELXR65AN.js → chunk-X2FHTDIU.js} +6 -3
  178. package/dist/{chunk-V4BW5HFQ.js → chunk-X5I5QRC2.js} +3 -3
  179. package/dist/{chunk-X4AFBL4N.js → chunk-XCORXJ3M.js} +1 -1
  180. package/dist/{chunk-66JPZELX.js → chunk-Y5CNGG4F.js} +24 -16
  181. package/dist/{chunk-SPOXL7HF.js → chunk-YEWNIBNA.js} +9 -9
  182. package/dist/{chunk-WJ2PZGRV.js → chunk-ZAA344BL.js} +29 -2
  183. package/dist/{chunk-TN2YCFQE.js → chunk-ZGLJ2VD7.js} +5 -5
  184. package/dist/{co-activation-WN25AJOC.js → co-activation-RH46OQ3N.js} +5 -5
  185. package/dist/{co-occurrence-YP2Q3OEA.js → co-occurrence-MJWERUWY.js} +5 -5
  186. package/dist/{code-context-index-ZWONKBKX.js → code-context-index-WFUBYGQT.js} +6 -6
  187. package/dist/{content-extractor-EYRVGD6O.js → content-extractor-RHITF2KM.js} +1 -1
  188. package/dist/{conversation-wiki-populator-XFUC7S5P.js → conversation-wiki-populator-SK233TL4.js} +1 -1
  189. package/dist/{crdt-sync-ZFIFL2QM.js → crdt-sync-4R7SXTNB.js} +1 -1
  190. package/dist/{crm-webhook-DGPHULOO.js → crm-webhook-YDXX5FDK.js} +2 -2
  191. package/dist/{cto-delegation-gate-OF2A3TSS.js → cto-delegation-gate-ZJHLPK4Y.js} +14 -14
  192. package/dist/{daemon-auth-N6P2MZAV.js → daemon-auth-5FCYVQIZ.js} +3 -3
  193. package/dist/{daemon-orchestration-G4RRTPP7.js → daemon-orchestration-NBU5RZ2O.js} +18 -18
  194. package/dist/{daemon-ready-signal-3L2MJT7C.js → daemon-ready-signal-KXLL6ZFL.js} +1 -1
  195. package/dist/{db-backup-EORG4LBO.js → db-backup-BTL2FBBL.js} +9 -3
  196. package/dist/{db-restore-events-3R7G4FP4.js → db-restore-events-3A57GMLW.js} +2 -2
  197. package/dist/{doc-graph-extractor-APZS3DFD.js → doc-graph-extractor-ADYRG7DB.js} +5 -5
  198. package/dist/documents-VWPZTDFA.js +56 -0
  199. package/dist/{dreaming-Q4E3WBGY.js → dreaming-76WKGTL6.js} +15 -15
  200. package/dist/embeddings-config-FANLORDH.js +21 -0
  201. package/dist/{exe-drift-CI5R6GUT.js → exe-drift-T3IO2SPX.js} +6 -6
  202. package/dist/{exe-export-HQIQASIT.js → exe-export-6YEHSJMP.js} +9 -9
  203. package/dist/{exe-import-ULZK56WC.js → exe-import-3NERK63O.js} +9 -9
  204. package/dist/{exe-key-ILNSBGRN.js → exe-key-RCMBMLSQ.js} +8 -8
  205. package/dist/{exe-org-WQWQZRLR.js → exe-org-KCOOLUTW.js} +3 -3
  206. package/dist/{exe-snapshot-RUZTWZOF.js → exe-snapshot-JIY7MNRI.js} +18 -18
  207. package/dist/{fast-db-init-KNJRL7T3.js → fast-db-init-PVJ72264.js} +1 -1
  208. package/dist/{founder-context-QCTMEK66.js → founder-context-A4VUEKDH.js} +4 -4
  209. package/dist/gateway/index.js +17 -17
  210. package/dist/{git-staleness-KIA5YI4H.js → git-staleness-IOAHAGBI.js} +5 -5
  211. package/dist/{git-task-sweep-WH6QE7HL.js → git-task-sweep-IGM5RILF.js} +17 -15
  212. package/dist/{global-procedures-SYZZCGDS.js → global-procedures-VZL2X4RK.js} +6 -6
  213. package/dist/{graph-auto-extract-J2TIWZEE.js → graph-auto-extract-TIXRGBC5.js} +5 -5
  214. package/dist/{hook-integrity-I6PWJQER.js → hook-integrity-XNPNCMAS.js} +1 -1
  215. package/dist/hooks/bug-report-worker.js +47 -17
  216. package/dist/hooks/codex-stop-task-finalizer.js +47 -17
  217. package/dist/hooks/commit-complete.js +18 -18
  218. package/dist/hooks/error-recall.js +11 -11
  219. package/dist/hooks/exe-heartbeat-hook.js +7 -7
  220. package/dist/hooks/ingest-worker.js +39 -9
  221. package/dist/hooks/ingest.js +17 -17
  222. package/dist/hooks/instructions-loaded.js +8 -8
  223. package/dist/hooks/manifest.json +20 -20
  224. package/dist/hooks/notification.js +8 -8
  225. package/dist/hooks/post-compact.js +17 -17
  226. package/dist/hooks/post-tool-combined.js +60 -7
  227. package/dist/hooks/pre-compact.js +23 -23
  228. package/dist/hooks/pre-tool-use.js +64 -34
  229. package/dist/hooks/prompt-submit.js +40 -32
  230. package/dist/hooks/session-end.js +29 -29
  231. package/dist/hooks/session-start.js +17 -17
  232. package/dist/hooks/stop.js +24 -24
  233. package/dist/hooks/subagent-stop.js +17 -17
  234. package/dist/hooks/summary-worker.js +55 -25
  235. package/dist/index.js +27 -27
  236. package/dist/{installer-PSDYMGN7.js → installer-D7D5O4KL.js} +10 -10
  237. package/dist/{installer-3NB3IBHF.js → installer-EQP2EMNZ.js} +10 -10
  238. package/dist/{installer-IIJFCTMH.js → installer-IWRYH55Z.js} +10 -10
  239. package/dist/{key-backup-status-FNSN3NXH.js → key-backup-status-ZNGDSPLT.js} +2 -2
  240. package/dist/lib/agent-config.js +3 -3
  241. package/dist/lib/cloud-sync.js +16 -16
  242. package/dist/lib/config.js +2 -2
  243. package/dist/lib/consolidation.js +8 -8
  244. package/dist/lib/database.js +7 -5
  245. package/dist/lib/db-daemon-client.js +6 -6
  246. package/dist/lib/db.js +7 -5
  247. package/dist/lib/device-registry.js +3 -3
  248. package/dist/lib/embed-worker.js +2 -2
  249. package/dist/lib/embedder.js +6 -6
  250. package/dist/lib/employee-templates.js +7 -7
  251. package/dist/lib/employees.js +5 -5
  252. package/dist/lib/exe-daemon-client.js +5 -5
  253. package/dist/lib/exe-daemon.js +449 -89
  254. package/dist/lib/hybrid-search.js +8 -8
  255. package/dist/lib/identity.js +5 -5
  256. package/dist/lib/license.js +4 -4
  257. package/dist/lib/messaging.js +15 -15
  258. package/dist/lib/post-tool-memory.js +2 -2
  259. package/dist/lib/reminders.js +6 -6
  260. package/dist/lib/schedules.js +8 -8
  261. package/dist/lib/session-registry.js +9 -7
  262. package/dist/lib/session-wrappers.js +1 -1
  263. package/dist/lib/skill-learning.js +9 -9
  264. package/dist/lib/store.js +7 -7
  265. package/dist/lib/task-router.js +6 -6
  266. package/dist/lib/tasks.js +16 -16
  267. package/dist/lib/tmux-routing.js +14 -14
  268. package/dist/lib/token-spend.js +6 -6
  269. package/dist/{license-gate-7SDHCJUO.js → license-gate-PZOP7S2S.js} +5 -5
  270. package/dist/mcp/register-tools.js +73 -72
  271. package/dist/mcp/server.js +74 -73
  272. package/dist/mcp/tools/complete-reminder.js +7 -7
  273. package/dist/mcp/tools/create-reminder.js +7 -7
  274. package/dist/mcp/tools/create-task.js +18 -18
  275. package/dist/mcp/tools/deactivate-behavior.js +10 -10
  276. package/dist/mcp/tools/list-reminders.js +7 -7
  277. package/dist/mcp/tools/list-tasks.js +18 -18
  278. package/dist/mcp/tools/send-message.js +17 -17
  279. package/dist/mcp/tools/update-task.js +17 -17
  280. package/dist/{mcp-http-config-QSOVFXHW.js → mcp-http-config-23DHJAU4.js} +7 -7
  281. package/dist/{mcp-port-config-AWWRZA22.js → mcp-port-config-FFAMMLLE.js} +2 -1
  282. package/dist/{memory-cards-II67WFL2.js → memory-cards-CNLMHSZC.js} +5 -5
  283. package/dist/{memory-graph-extractor-PM4Q2KJG.js → memory-graph-extractor-HIXP2BQS.js} +6 -6
  284. package/dist/{memory-poisoning-defense-ECXSX7HK.js → memory-poisoning-defense-YL53IBBF.js} +5 -5
  285. package/dist/{memory-queue-VAE6WMSS.js → memory-queue-3Q5P43AM.js} +3 -3
  286. package/dist/memory-queue-client-YP2QKX6J.js +16 -0
  287. package/dist/{memory-reflection-PXF6YFDU.js → memory-reflection-VHQRUZWK.js} +5 -5
  288. package/dist/{notifications-UP7WQGG4.js → notifications-Q5NEAP6K.js} +14 -14
  289. package/dist/{orchestration-events-PZLLPCKY.js → orchestration-events-7SNWRJYE.js} +6 -6
  290. package/dist/{orchestration-phase-SJOXDB7X.js → orchestration-phase-U45T4VG3.js} +3 -3
  291. package/dist/{orchestrator-PUT45J4O.js → orchestrator-XWLKNWUG.js} +16 -16
  292. package/dist/{pipeline-router-5CRWKESM.js → pipeline-router-5IBJBH7P.js} +6 -6
  293. package/dist/{plan-limits-SH2NDFNX.js → plan-limits-PBEZVHRQ.js} +8 -8
  294. package/dist/{preferences-YWBTKW3M.js → preferences-TYTGDXQZ.js} +2 -2
  295. package/dist/{project-boot-2TCPDZ4S.js → project-boot-OHEGJD2L.js} +2 -2
  296. package/dist/{projection-worker-HWY37MNC.js → projection-worker-HELRBNDR.js} +5 -5
  297. package/dist/{prospective-memory-FQSVMCGG.js → prospective-memory-N55XRGJP.js} +5 -5
  298. package/dist/{push-notifications-DK6XA5B3.js → push-notifications-PAFNP3EC.js} +3 -3
  299. package/dist/{reranker-AALRMGMM.js → reranker-MNJSTOPR.js} +3 -3
  300. package/dist/{retrieval-health-PNWJSJNG.js → retrieval-health-W4HNR3WX.js} +1 -1
  301. package/dist/{review-polling-65JZUE3T.js → review-polling-SRYZU2PI.js} +15 -15
  302. package/dist/runtime/index.js +22 -22
  303. package/dist/{session-events-EJ3OSAA6.js → session-events-L4DK5J6J.js} +15 -15
  304. package/dist/{session-kill-telemetry-3HGM7SNQ.js → session-kill-telemetry-U2YHKHCB.js} +15 -15
  305. package/dist/{session-scope-JGDYAMJO.js → session-scope-JTPHECAU.js} +14 -14
  306. package/dist/{setup-wizard-44LMFM2C.js → setup-wizard-IP5R66LR.js} +3 -3
  307. package/dist/{shard-manager-KUCJPLC6.js → shard-manager-RASGFMGS.js} +3 -3
  308. package/dist/{skill-refinement-DUOO6B7V.js → skill-refinement-VTYL4OMJ.js} +5 -5
  309. package/dist/{stack-release-XYMKU7NT.js → stack-release-TOCCJQOF.js} +244 -45
  310. package/dist/{stack-update-XHQJRJEP.js → stack-update-MRNVHUZZ.js} +15 -5
  311. package/dist/{steward-gate-6NWRDLX2.js → steward-gate-JEVUDTBI.js} +6 -6
  312. package/dist/{task-enforcement-UOULTGFB.js → task-enforcement-VFSAAZUN.js} +14 -14
  313. package/dist/{task-scope-P5STKYAC.js → task-scope-P4VLIQNP.js} +14 -14
  314. package/dist/{tasks-crud-24HMTULR.js → tasks-crud-SC3ERIUR.js} +14 -14
  315. package/dist/{tasks-notify-LAIU7UUI.js → tasks-notify-WJYBUCIB.js} +15 -15
  316. package/dist/{tasks-review-AFJAU2DY.js → tasks-review-XPVPHCGD.js} +14 -14
  317. package/dist/{telemetry-upload-DWFGC2XJ.js → telemetry-upload-4QEYQROW.js} +10 -10
  318. package/dist/{token-budget-4RFZKWGH.js → token-budget-UBOP3HVE.js} +6 -6
  319. package/dist/{tool-capability-index-ZEXBWKUZ.js → tool-capability-index-SHYCBE2Z.js} +1 -1
  320. package/dist/{tool-telemetry-BS5JXM5M.js → tool-telemetry-CDNPES5B.js} +1 -1
  321. package/dist/tui/App.js +27 -27
  322. package/dist/{tui-data-UNO5B7PU.js → tui-data-HVYY7GRK.js} +14 -14
  323. package/dist/{worker-gate-C6CTTYMD.js → worker-gate-KQTODSUQ.js} +3 -3
  324. package/dist/{workflow-engine-4W2KYCDV.js → workflow-engine-OP2DQISD.js} +2 -2
  325. package/dist/{working-memory-FXHQCJJE.js → working-memory-PY4AG577.js} +22 -2
  326. package/dist/{worktree-2CXY6NEB.js → worktree-Z2G4CP4Z.js} +7 -7
  327. package/dist/{worktree-sweep-K3CJFSUL.js → worktree-sweep-LWSCAZW6.js} +8 -8
  328. package/package.json +2 -2
  329. package/release-notes.json +40 -88
  330. package/stack.release.json +11 -11
  331. package/dist/memory-queue-client-HLURQEV6.js +0 -16
  332. /package/dist/{chunk-J3SR5MGG.js → chunk-GIS4GBZE.js} +0 -0
  333. /package/dist/{chunk-AE74NOE6.js → chunk-NAPBIDGH.js} +0 -0
  334. /package/dist/{chunk-I3DPCSDG.js → chunk-OJS2H5HR.js} +0 -0
  335. /package/dist/{chunk-K4BKJJ4F.js → chunk-PCRRDXGL.js} +0 -0
  336. /package/dist/{chunk-MQCTK6EF.js → chunk-RRYJTPVW.js} +0 -0
  337. /package/dist/{chunk-2NS3QRMJ.js → chunk-ZIVUMDHA.js} +0 -0
  338. /package/dist/{core-memory-OC5ITKKV.js → core-memory-4JWCAGJI.js} +0 -0
  339. /package/dist/{entity-boost-NF3LE6OJ.js → entity-boost-AU342QRK.js} +0 -0
  340. /package/dist/{message-queue-client-4VDU6BZY.js → message-queue-client-IXYLJJVJ.js} +0 -0
  341. /package/dist/{oauth-server-EWUL7DMD.js → oauth-server-F4QWESK2.js} +0 -0
  342. /package/dist/{webhook-pipe-DHIGZHPW.js → webhook-pipe-S4CWK6H5.js} +0 -0
  343. /package/dist/{wiki-acl-CONNF6ES.js → wiki-acl-6GZHUA44.js} +0 -0
  344. /package/dist/{wiki-client-N6PT5P7W.js → wiki-client-CIJXRMKL.js} +0 -0
@@ -61,6 +61,26 @@ function logRestart(entry) {
61
61
  function logRestartEvent(event, data) {
62
62
  logRestart({ event, ...data });
63
63
  }
64
+ function attributeSignalSource(reason) {
65
+ const attr = {
66
+ source: reason ?? "external/unknown",
67
+ restart_intent: reason !== null
68
+ };
69
+ try {
70
+ const ppid = process.ppid;
71
+ attr.ppid = ppid;
72
+ if (process.platform !== "win32" && Number.isInteger(ppid) && ppid > 0) {
73
+ try {
74
+ const comm = execSync(`ps -o comm= -p ${ppid}`, { timeout: 2e3, encoding: "utf8" }).trim();
75
+ if (comm) attr.parent_comm = comm;
76
+ } catch {
77
+ }
78
+ }
79
+ } catch {
80
+ }
81
+ attr.launchd_managed = Boolean(process.env.XPC_SERVICE_NAME || process.env.LAUNCHD_SOCKET || process.env.INVOCATION_ID);
82
+ return attr;
83
+ }
64
84
  function isCooldownActive() {
65
85
  try {
66
86
  if (!existsSync(RESTART_MARKER)) return { active: false, remainingMs: 0 };
@@ -95,9 +115,9 @@ function isRestartIntentTimestampFresh(markerTimestampMs, nowMs = Date.now()) {
95
115
  if (markerTimestampMs === null || !Number.isFinite(markerTimestampMs)) return false;
96
116
  return nowMs - markerTimestampMs < RESTART_INTENT_WINDOW_MS;
97
117
  }
98
- function consumeRestartIntent() {
118
+ function consumeRestartIntentDetail() {
99
119
  try {
100
- if (!existsSync(RESTART_MARKER)) return false;
120
+ if (!existsSync(RESTART_MARKER)) return { intent: false, reason: null };
101
121
  const raw = readFileSync(RESTART_MARKER, "utf8").trim();
102
122
  try {
103
123
  unlinkSync(RESTART_MARKER);
@@ -105,12 +125,14 @@ function consumeRestartIntent() {
105
125
  }
106
126
  if (raw.startsWith("{")) {
107
127
  const marker = JSON.parse(raw);
108
- return typeof marker.reason === "string" && typeof marker.nonce === "string";
128
+ const intent2 = typeof marker.reason === "string" && typeof marker.nonce === "string";
129
+ return { intent: intent2, reason: intent2 ? marker.reason ?? null : null };
109
130
  }
110
131
  const last = parseInt(raw, 10);
111
- return isRestartIntentTimestampFresh(isNaN(last) ? null : last);
132
+ const intent = isRestartIntentTimestampFresh(isNaN(last) ? null : last);
133
+ return { intent, reason: intent ? "legacy-timestamp-marker" : null };
112
134
  } catch {
113
- return false;
135
+ return { intent: false, reason: null };
114
136
  }
115
137
  }
116
138
  function isOomMarkerSet() {
@@ -392,7 +414,8 @@ async function requestDeployRestart(reason) {
392
414
 
393
415
  export {
394
416
  logRestartEvent,
395
- consumeRestartIntent,
417
+ attributeSignalSource,
418
+ consumeRestartIntentDetail,
396
419
  requestRestart,
397
420
  updateMcpVersionMarker,
398
421
  requestDeployRestart
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getGlobalProceduresBlock
3
- } from "./chunk-ISILDO7P.js";
3
+ } from "./chunk-4THK7IA4.js";
4
4
 
5
5
  // src/lib/employee-templates.ts
6
6
  var BASE_OPERATING_PROCEDURES = `
@@ -7,11 +7,11 @@ import {
7
7
  MODELS_DIR,
8
8
  loadConfig,
9
9
  saveConfig
10
- } from "./chunk-DFIOOK5R.js";
10
+ } from "./chunk-WCES22KG.js";
11
11
  import {
12
12
  atomicWriteJsonSync,
13
13
  atomicWriteSync
14
- } from "./chunk-65DBIEM2.js";
14
+ } from "./chunk-SHIICYJW.js";
15
15
 
16
16
  // src/lib/setup-wizard.ts
17
17
  import crypto from "crypto";
@@ -497,7 +497,7 @@ async function runSetupWizard(opts = {}) {
497
497
  );
498
498
  }
499
499
  if (!nonInteractive) {
500
- const { markKeyBackupConfirmed } = await import("./key-backup-status-FNSN3NXH.js");
500
+ const { markKeyBackupConfirmed } = await import("./key-backup-status-ZNGDSPLT.js");
501
501
  markKeyBackupConfirmed("setup-wizard");
502
502
  }
503
503
  }
@@ -658,7 +658,7 @@ async function runSetupWizard(opts = {}) {
658
658
  if (cloudConfig) {
659
659
  config.cloud = cloudConfig;
660
660
  }
661
- const { applyDefaultOrchestrationPhase } = await import("./orchestration-phase-SJOXDB7X.js");
661
+ const { applyDefaultOrchestrationPhase } = await import("./orchestration-phase-U45T4VG3.js");
662
662
  applyDefaultOrchestrationPhase(config);
663
663
  await saveConfig(config);
664
664
  log("");
@@ -684,7 +684,7 @@ async function runSetupWizard(opts = {}) {
684
684
  log("Step 5 already complete \u2014 skipping.");
685
685
  }
686
686
  if (!state.completedSteps.includes(55)) {
687
- const { savePreferences, loadPreferences: loadPrefs } = await import("./preferences-YWBTKW3M.js");
687
+ const { savePreferences, loadPreferences: loadPrefs } = await import("./preferences-TYTGDXQZ.js");
688
688
  const existingPrefs = loadPrefs();
689
689
  const prefs = { ...existingPrefs };
690
690
  log("=== Config Defaults ===");
@@ -1000,7 +1000,7 @@ async function runSetupWizard(opts = {}) {
1000
1000
  log(" Phase 3: Parallel org \u2014 specialists execute in parallel with reviews");
1001
1001
  log("");
1002
1002
  const unlockExecutives = (await askOrEnv("Unlock Phase 2 executives now? (y/N): ", void 0, "n")).toLowerCase() === "y";
1003
- const { setOrchestrationPhase } = await import("./orchestration-phase-SJOXDB7X.js");
1003
+ const { setOrchestrationPhase } = await import("./orchestration-phase-U45T4VG3.js");
1004
1004
  if (!unlockExecutives) {
1005
1005
  await setOrchestrationPhase("phase_1_coo", "setup-wizard");
1006
1006
  log("");
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  fastDbInit
3
- } from "./chunk-QE7UVQDP.js";
3
+ } from "./chunk-6PR2RAKM.js";
4
4
  import {
5
5
  sessionScopeFilter
6
- } from "./chunk-HED6D5KR.js";
6
+ } from "./chunk-MMNMQNLD.js";
7
7
  import {
8
8
  formatStatusAll,
9
9
  formatStatusDeep,
@@ -14,7 +14,7 @@ import {
14
14
  getClient,
15
15
  isCoordinatorRole,
16
16
  loadEmployees
17
- } from "./chunk-SCYWCWKY.js";
17
+ } from "./chunk-VG4ZH2Z3.js";
18
18
  import {
19
19
  isMainModule
20
20
  } from "./chunk-6Y4B3QF6.js";
@@ -9,10 +9,10 @@ import {
9
9
  getCoordinatorEmployee,
10
10
  getEmployee,
11
11
  loadEmployeesSync
12
- } from "./chunk-SCYWCWKY.js";
12
+ } from "./chunk-VG4ZH2Z3.js";
13
13
  import {
14
14
  EXE_AI_DIR
15
- } from "./chunk-DFIOOK5R.js";
15
+ } from "./chunk-WCES22KG.js";
16
16
 
17
17
  // src/lib/active-agent.ts
18
18
  import { readFileSync, writeFileSync, mkdirSync, unlinkSync, readdirSync } from "fs";
@@ -87,7 +87,7 @@ async function getRetrievalHealth() {
87
87
  const coveragePct = totalMemories > 0 ? Math.round(memoriesWithVectors / totalMemories * 100) : null;
88
88
  let dbRestore = { hasEvents: false, count: 0, last: null, quarantineFiles: 0 };
89
89
  try {
90
- const { getDbRestoreHealth } = await import("./db-restore-events-3R7G4FP4.js");
90
+ const { getDbRestoreHealth } = await import("./db-restore-events-3A57GMLW.js");
91
91
  dbRestore = getDbRestoreHealth();
92
92
  } catch {
93
93
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  sanitizePort
3
- } from "./chunk-ELXR65AN.js";
3
+ } from "./chunk-X2FHTDIU.js";
4
4
  import {
5
5
  loadEmployeesSync
6
- } from "./chunk-SCYWCWKY.js";
6
+ } from "./chunk-VG4ZH2Z3.js";
7
7
 
8
8
  // src/adapters/mcp-http-config.ts
9
9
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -1,10 +1,10 @@
1
1
  import {
2
- enforcePrivateFileSync,
2
+ atomicWriteJsonSync,
3
3
  ensurePrivateDirSync
4
- } from "./chunk-65DBIEM2.js";
4
+ } from "./chunk-SHIICYJW.js";
5
5
 
6
6
  // src/lib/preferences.ts
7
- import { existsSync, readFileSync, writeFileSync } from "fs";
7
+ import { existsSync, readFileSync } from "fs";
8
8
  import path from "path";
9
9
  import os from "os";
10
10
  function loadPreferences(homeDir = os.homedir()) {
@@ -30,8 +30,7 @@ function savePreferences(prefs, homeDir = os.homedir()) {
30
30
  }
31
31
  }
32
32
  config.preferences = prefs;
33
- writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
34
- enforcePrivateFileSync(configPath);
33
+ atomicWriteJsonSync(configPath, config);
35
34
  }
36
35
 
37
36
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  completeReminder
3
- } from "./chunk-JNARUXDC.js";
3
+ } from "./chunk-CW3FPWUW.js";
4
4
 
5
5
  // src/mcp/tools/complete-reminder.ts
6
6
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EXE_AI_DIR
3
- } from "./chunk-DFIOOK5R.js";
3
+ } from "./chunk-WCES22KG.js";
4
4
 
5
5
  // src/lib/db-backup.ts
6
6
  import { existsSync, readdirSync, unlinkSync, statSync, statfsSync } from "fs";
@@ -241,7 +241,7 @@ function rotateBackupsByReason(reason, keep) {
241
241
  for (const file of files) {
242
242
  if (file.endsWith(".tmp")) continue;
243
243
  if (!file.endsWith(".db")) continue;
244
- if (!file.includes(`-${reason}-`)) continue;
244
+ if (!matchesBackupReason(file, reason)) continue;
245
245
  const filePath = path.join(BACKUP_DIR, file);
246
246
  try {
247
247
  matches.push({ path: filePath, mtimeMs: statSync(filePath).mtimeMs });
@@ -263,10 +263,52 @@ function rotateBackupsByReason(reason, keep) {
263
263
  }
264
264
  return deleted;
265
265
  }
266
+ function matchesBackupReason(name, reason) {
267
+ if (name.endsWith(".tmp") || !name.endsWith(".db")) return false;
268
+ for (const db of DB_NAMES) {
269
+ if (name.startsWith(`${path.basename(db, ".db")}-${reason}-`)) return true;
270
+ }
271
+ return false;
272
+ }
273
+ var BACKUP_TS_SUFFIX_RE = /-\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}$/;
274
+ function reasonFromBackupName(name) {
275
+ if (name.endsWith(".tmp") || !name.endsWith(".db")) return null;
276
+ const base = name.slice(0, -3);
277
+ for (const db of DB_NAMES) {
278
+ const prefix = `${path.basename(db, ".db")}-`;
279
+ if (!base.startsWith(prefix)) continue;
280
+ const rest = base.slice(prefix.length);
281
+ if (BACKUP_TS_SUFFIX_RE.test(rest)) {
282
+ const reason = rest.replace(BACKUP_TS_SUFFIX_RE, "");
283
+ return reason.length > 0 ? reason : null;
284
+ }
285
+ const lastDash = rest.lastIndexOf("-");
286
+ if (lastDash <= 0) return null;
287
+ return rest.slice(0, lastDash);
288
+ }
289
+ return null;
290
+ }
291
+ function discoverBackupReasons() {
292
+ if (!existsSync(BACKUP_DIR)) return [];
293
+ const reasons = /* @__PURE__ */ new Set();
294
+ try {
295
+ for (const file of readdirSync(BACKUP_DIR)) {
296
+ if (file.endsWith(".tmp")) continue;
297
+ if (!file.endsWith(".db")) continue;
298
+ const reason = reasonFromBackupName(file);
299
+ if (reason) reasons.add(reason);
300
+ }
301
+ } catch {
302
+ }
303
+ return [...reasons];
304
+ }
266
305
  function enforceRetention(reason, keepDays = DEFAULT_KEEP_DAYS) {
267
306
  let deleted = rotateBackups(keepDays);
268
- const cap = REASON_COUNT_CAP[reason] ?? DEFAULT_RETENTION_COUNT;
269
- deleted += rotateBackupsByReason(reason, cap);
307
+ const reasons = /* @__PURE__ */ new Set([reason, ...discoverBackupReasons()]);
308
+ for (const r of reasons) {
309
+ const cap = REASON_COUNT_CAP[r] ?? DEFAULT_RETENTION_COUNT;
310
+ deleted += rotateBackupsByReason(r, cap);
311
+ }
270
312
  deleted += cleanupStaleTmp();
271
313
  return deleted;
272
314
  }
@@ -407,6 +449,9 @@ export {
407
449
  cleanupStaleTmp,
408
450
  hasEnoughDiskSpace,
409
451
  rotateBackupsByReason,
452
+ matchesBackupReason,
453
+ reasonFromBackupName,
454
+ discoverBackupReasons,
410
455
  enforceRetention,
411
456
  pruneCorruptQuarantine,
412
457
  cleanupCrashDebris,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-SCYWCWKY.js";
3
+ } from "./chunk-VG4ZH2Z3.js";
4
4
 
5
5
  // src/lib/token-spend.ts
6
6
  import { readdir, stat } from "fs/promises";
@@ -35,10 +35,10 @@ function generateSessionWrappers(packageRoot, homeDir) {
35
35
  try {
36
36
  employees = JSON.parse(readFileSync(rosterPath, "utf8"));
37
37
  } catch {
38
- return { created: 0, pathConfigured: false };
38
+ return { created: 0, failed: 0, pathConfigured: false };
39
39
  }
40
40
  if (employees.length === 0) {
41
- return { created: 0, pathConfigured: false };
41
+ return { created: 0, failed: 0, pathConfigured: false };
42
42
  }
43
43
  try {
44
44
  for (const f of readdirSync(binDir)) {
@@ -55,6 +55,7 @@ function generateSessionWrappers(packageRoot, homeDir) {
55
55
  } catch {
56
56
  }
57
57
  let created = 0;
58
+ let failed = 0;
58
59
  const wrapperContent = `#!/bin/bash
59
60
  exec "${exeStartDst}" "$0" "$@"
60
61
  `;
@@ -63,16 +64,21 @@ exec "${exeStartDst}" "$0" "$@"
63
64
  for (let n = 1; n <= MAX_N; n++) {
64
65
  for (const suffix of RUNTIME_SUFFIXES) {
65
66
  const wrapperName = `${emp.name}${n}${suffix}`;
66
- writeWrapper(path.join(binDir, wrapperName), wrapperContent);
67
+ const canonicalPath = path.join(binDir, wrapperName);
68
+ const ok = writeWrapper(canonicalPath, wrapperContent);
67
69
  if (globalBinDir) {
68
70
  writeWrapper(path.join(globalBinDir, wrapperName), wrapperContent);
69
71
  }
70
- created++;
72
+ if (ok && existsSync(canonicalPath)) {
73
+ created++;
74
+ } else {
75
+ failed++;
76
+ }
71
77
  }
72
78
  }
73
79
  }
74
80
  const pathConfigured = ensurePath(home, binDir);
75
- return { created, pathConfigured };
81
+ return { created, failed, pathConfigured };
76
82
  }
77
83
  function renderExeStartScript(template, globalBinDir) {
78
84
  return template.replaceAll("__EXE_OS_BIN_DIR__", globalBinDir ?? "");
@@ -81,7 +87,9 @@ function writeWrapper(wrapperPath, content) {
81
87
  try {
82
88
  writeFileSync(wrapperPath, content);
83
89
  chmodSync(wrapperPath, 493);
90
+ return true;
84
91
  } catch {
92
+ return false;
85
93
  }
86
94
  }
87
95
  function resolveGlobalBinDir() {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-SCYWCWKY.js";
3
+ } from "./chunk-VG4ZH2Z3.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-DFIOOK5R.js";
6
+ } from "./chunk-WCES22KG.js";
7
7
 
8
8
  // src/lib/reminders.ts
9
9
  import crypto from "crypto";
@@ -1,17 +1,62 @@
1
1
  import {
2
2
  initStore
3
- } from "./chunk-WBJXJ2R4.js";
3
+ } from "./chunk-RLBVY5FE.js";
4
4
  import {
5
5
  getClient,
6
6
  isInitialized
7
- } from "./chunk-SCYWCWKY.js";
7
+ } from "./chunk-VG4ZH2Z3.js";
8
8
 
9
9
  // src/lib/schedules.ts
10
10
  import crypto from "crypto";
11
11
  import os from "os";
12
12
  import path from "path";
13
- import { mkdirSync, writeFileSync, rmSync } from "fs";
13
+ import { mkdirSync, writeFileSync, rmSync, existsSync, readdirSync } from "fs";
14
14
  import { spawnSync } from "child_process";
15
+ var _resolvedClaudePath = null;
16
+ function resolveClaudeBinary() {
17
+ if (_resolvedClaudePath) return _resolvedClaudePath;
18
+ try {
19
+ const res = spawnSync("which", ["claude"], {
20
+ encoding: "utf8",
21
+ timeout: 5e3,
22
+ stdio: ["ignore", "pipe", "ignore"]
23
+ });
24
+ const found = res.status === 0 && typeof res.stdout === "string" ? res.stdout.trim() : "";
25
+ if (found && path.isAbsolute(found) && existsSync(found)) {
26
+ _resolvedClaudePath = found;
27
+ return found;
28
+ }
29
+ } catch {
30
+ }
31
+ const candidates = [
32
+ "/usr/local/bin/claude",
33
+ "/opt/homebrew/bin/claude",
34
+ path.join(os.homedir(), ".local", "bin", "claude"),
35
+ path.join(os.homedir(), ".claude", "bin", "claude"),
36
+ path.join(os.homedir(), ".bun", "bin", "claude")
37
+ ];
38
+ try {
39
+ const execDir = path.dirname(process.execPath);
40
+ candidates.unshift(path.join(execDir, "claude"));
41
+ } catch {
42
+ }
43
+ const nvmVersionsDir = path.join(os.homedir(), ".nvm", "versions", "node");
44
+ try {
45
+ if (existsSync(nvmVersionsDir)) {
46
+ for (const version of readdirSync(nvmVersionsDir)) {
47
+ candidates.push(path.join(nvmVersionsDir, version, "bin", "claude"));
48
+ }
49
+ }
50
+ } catch {
51
+ }
52
+ for (const p of candidates) {
53
+ if (existsSync(p)) {
54
+ _resolvedClaudePath = p;
55
+ return p;
56
+ }
57
+ }
58
+ return "claude";
59
+ }
15
60
  function schedulePromptsDir() {
16
61
  return path.join(os.homedir(), ".exe-os", "schedule-prompts");
17
62
  }
@@ -46,7 +91,9 @@ function buildCrontabEntry(id, cron, promptFile, projectDir) {
46
91
  }
47
92
  const cwd = projectDir ? `cd ${shellQuoteSafe(projectDir)} && ` : "";
48
93
  const promptArg = shellQuoteSafe(promptFile);
49
- return `${cron} ${cwd}claude -p --dangerously-skip-permissions < ${promptArg} # exe-schedule:${id}`;
94
+ const claudeBin = resolveClaudeBinary();
95
+ const claudeArg = path.isAbsolute(claudeBin) && isSafePath(claudeBin) ? shellQuoteSafe(claudeBin) : "claude";
96
+ return `${cron} ${cwd}${claudeArg} -p --dangerously-skip-permissions < ${promptArg} # exe-schedule:${id}`;
50
97
  }
51
98
  async function ensureDb() {
52
99
  if (!isInitialized()) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listReminders
3
- } from "./chunk-JNARUXDC.js";
3
+ } from "./chunk-CW3FPWUW.js";
4
4
 
5
5
  // src/mcp/tools/list-reminders.ts
6
6
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  listBehaviors
3
- } from "./chunk-PMEOSD6S.js";
3
+ } from "./chunk-24BUDF3J.js";
4
4
  import {
5
5
  loadConfigSync
6
- } from "./chunk-DFIOOK5R.js";
6
+ } from "./chunk-WCES22KG.js";
7
7
 
8
8
  // src/lib/behaviors-export.ts
9
9
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  routeTask
3
- } from "./chunk-4L4R6AQJ.js";
3
+ } from "./chunk-KMI4TUTW.js";
4
4
  import {
5
5
  createTaskCore,
6
6
  employeeSessionName,
@@ -9,11 +9,11 @@ import {
9
9
  isEmployeeAlive,
10
10
  sessionScopeFilter,
11
11
  updateTaskStatus
12
- } from "./chunk-HED6D5KR.js";
12
+ } from "./chunk-MMNMQNLD.js";
13
13
  import {
14
14
  DEFAULT_COORDINATOR_TEMPLATE_NAME,
15
15
  getCoordinatorName
16
- } from "./chunk-SCYWCWKY.js";
16
+ } from "./chunk-VG4ZH2Z3.js";
17
17
 
18
18
  // src/runtime/orchestrator.ts
19
19
  var STALE_THRESHOLD_MS = 2 * 60 * 60 * 1e3;
@@ -8,11 +8,11 @@ import {
8
8
  import {
9
9
  loadLicense,
10
10
  readCachedLicenseToken
11
- } from "./chunk-JV225JBX.js";
11
+ } from "./chunk-I6RHLHVW.js";
12
12
  import {
13
13
  EXE_AI_DIR,
14
14
  loadConfig
15
- } from "./chunk-DFIOOK5R.js";
15
+ } from "./chunk-WCES22KG.js";
16
16
 
17
17
  // src/bin/exe-support.ts
18
18
  import { mkdirSync, readFileSync, unlinkSync, writeFileSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  updateTask
3
- } from "./chunk-EOS7VPVT.js";
3
+ } from "./chunk-VA2MDALR.js";
4
4
  import {
5
5
  TASK_ALREADY_CLAIMED_PREFIX
6
- } from "./chunk-HED6D5KR.js";
6
+ } from "./chunk-MMNMQNLD.js";
7
7
 
8
8
  // src/mcp/tools/update-task.ts
9
9
  import { z } from "zod";
@@ -40,7 +40,7 @@ function registerUpdateTask(server) {
40
40
  let callerAgentId;
41
41
  let callerSession;
42
42
  try {
43
- const { getActiveAgent: getAgent } = await import("./active-agent-S5T2YMOR.js");
43
+ const { getActiveAgent: getAgent } = await import("./active-agent-FFN5ARMC.js");
44
44
  callerAgentId = getAgent().agentId;
45
45
  const { getAgentContext } = await import("./agent-context-AZTTMUHP.js");
46
46
  callerSession = getAgentContext()?.sessionHint || process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || void 0;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MODELS_DIR
3
- } from "./chunk-DFIOOK5R.js";
3
+ } from "./chunk-WCES22KG.js";
4
4
 
5
5
  // src/lib/reranker.ts
6
6
  import path from "path";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  deactivateBehavior
3
- } from "./chunk-PMEOSD6S.js";
3
+ } from "./chunk-24BUDF3J.js";
4
4
  import {
5
5
  getActiveAgent
6
- } from "./chunk-BUOMSIXH.js";
6
+ } from "./chunk-BMNX3YWX.js";
7
7
  import {
8
8
  canCoordinate,
9
9
  getClient
10
- } from "./chunk-SCYWCWKY.js";
10
+ } from "./chunk-VG4ZH2Z3.js";
11
11
 
12
12
  // src/mcp/tools/deactivate-behavior.ts
13
13
  import { z } from "zod";
@@ -24,7 +24,7 @@ function registerDeactivateBehavior(server) {
24
24
  async ({ behavior_id }) => {
25
25
  const caller = getActiveAgent();
26
26
  try {
27
- const { StewardGate } = await import("./steward-gate-6NWRDLX2.js");
27
+ const { StewardGate } = await import("./steward-gate-JEVUDTBI.js");
28
28
  const steward = new StewardGate();
29
29
  const gateDecision = await steward.checkAuthority(caller.agentId || "unknown", "deactivate_behavior", behavior_id);
30
30
  if (!gateDecision.allowed) {
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  getCurrentSessionScope,
3
3
  strictSessionScopeFilter
4
- } from "./chunk-HED6D5KR.js";
4
+ } from "./chunk-MMNMQNLD.js";
5
5
  import {
6
6
  getProjectName
7
7
  } from "./chunk-OPU3NYOO.js";
8
8
 
9
9
  // src/lib/session-events.ts
10
10
  import { randomUUID } from "crypto";
11
- async function ensureSessionEventsTable(client) {
11
+ var _schemaEnsured = /* @__PURE__ */ new WeakSet();
12
+ async function ensureSchemaDDL(client) {
12
13
  await client.execute(`
13
14
  CREATE TABLE IF NOT EXISTS session_events (
14
15
  id TEXT PRIMARY KEY,
@@ -44,6 +45,11 @@ async function ensureSessionEventsTable(client) {
44
45
  ON session_events(created_at)
45
46
  `);
46
47
  }
48
+ async function ensureSessionEventsTable(client) {
49
+ if (_schemaEnsured.has(client)) return;
50
+ await ensureSchemaDDL(client);
51
+ _schemaEnsured.add(client);
52
+ }
47
53
  var DEFAULT_SESSION_EVENTS_RETENTION_DAYS = 14;
48
54
  async function sweepExpiredSessionEvents(client, retentionDays = DEFAULT_SESSION_EVENTS_RETENTION_DAYS) {
49
55
  const days = Number.isFinite(retentionDays) && retentionDays > 0 ? Math.floor(retentionDays) : DEFAULT_SESSION_EVENTS_RETENTION_DAYS;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  enqueueMemory
3
- } from "./chunk-YUGLOZOR.js";
3
+ } from "./chunk-OXTZEKVA.js";
4
4
  import {
5
5
  isClientConnected,
6
6
  sendDaemonRequest
7
- } from "./chunk-PPXQE7AS.js";
7
+ } from "./chunk-SE6MLUOK.js";
8
8
 
9
9
  // src/lib/memory-queue-client.ts
10
10
  async function writeMemoryViaDaemon(entry) {
@@ -2,14 +2,14 @@ import {
2
2
  connectEmbedDaemon,
3
3
  disconnectClient,
4
4
  embedViaClient
5
- } from "./chunk-PPXQE7AS.js";
5
+ } from "./chunk-SE6MLUOK.js";
6
6
  import {
7
7
  EMBEDDING_DIM
8
8
  } from "./chunk-FXU7JOXK.js";
9
9
  import {
10
10
  MODELS_DIR,
11
11
  loadConfigSync
12
- } from "./chunk-DFIOOK5R.js";
12
+ } from "./chunk-WCES22KG.js";
13
13
 
14
14
  // src/lib/embedder.ts
15
15
  var MAX_EMBED_CHARS = 24e3;
@@ -7,14 +7,14 @@ import {
7
7
  } from "./chunk-PROQW3NL.js";
8
8
  import {
9
9
  vectorToBlob
10
- } from "./chunk-WBJXJ2R4.js";
10
+ } from "./chunk-RLBVY5FE.js";
11
11
  import {
12
12
  extractKeywords,
13
13
  keywordsToString
14
14
  } from "./chunk-CHCA3ZM2.js";
15
15
  import {
16
16
  isCoordinatorName
17
- } from "./chunk-SCYWCWKY.js";
17
+ } from "./chunk-VG4ZH2Z3.js";
18
18
 
19
19
  // src/lib/consolidation.ts
20
20
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-2NS3QRMJ.js";
3
+ } from "./chunk-ZIVUMDHA.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {