@askexenow/exe-os 0.9.302 → 0.9.310

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 (311) hide show
  1. package/deploy/compose/.env.example +8 -2
  2. package/deploy/compose/README.md +7 -3
  3. package/deploy/compose/add-routes.sh +107 -0
  4. package/deploy/compose/docker-compose.yml +91 -18
  5. package/deploy/compose/gateway-watchdog.sh +223 -0
  6. package/deploy/compose/generate-env.ts +16 -4
  7. package/deploy/compose/setup.sh +7 -8
  8. package/deploy/stack-manifests/v0.9.json +125 -4
  9. package/dist/{active-agent-ODI6GGVD.js → active-agent-ORX47ZKW.js} +4 -3
  10. package/dist/{active-agent-GGQAP4QE.js → active-agent-S5T2YMOR.js} +4 -3
  11. package/dist/{agentic-ontology-M7T72M6V.js → agentic-ontology-6KBAXLSJ.js} +1 -1
  12. package/dist/{backfill-metadata-GSZP2BEW.js → backfill-metadata-FV7GX6AS.js} +5 -4
  13. package/dist/{behaviors-JM6KFSXL.js → behaviors-47CPEKJ7.js} +6 -5
  14. package/dist/bin/agentic-ontology-backfill.js +6 -5
  15. package/dist/bin/agentic-reflection-backfill.js +7 -6
  16. package/dist/bin/agentic-semantic-label.js +6 -5
  17. package/dist/bin/backfill-conversations.js +8 -7
  18. package/dist/bin/backfill-responses.js +8 -7
  19. package/dist/bin/backfill-vectors.js +10 -9
  20. package/dist/bin/bulk-sync-postgres.js +14 -13
  21. package/dist/bin/cc-doctor.js +5 -4
  22. package/dist/bin/cleanup-stale-review-tasks.js +13 -12
  23. package/dist/bin/cli.js +20 -17
  24. package/dist/bin/deferred-daemon-restart.js +4 -4
  25. package/dist/bin/exe-agent-config.js +3 -2
  26. package/dist/bin/exe-agent.js +12 -11
  27. package/dist/bin/exe-assign.js +10 -9
  28. package/dist/bin/exe-boot.js +21 -20
  29. package/dist/bin/exe-call.js +5 -4
  30. package/dist/bin/exe-cloud.js +14 -13
  31. package/dist/bin/exe-config-dump.js +525 -0
  32. package/dist/bin/exe-dispatch.js +13 -12
  33. package/dist/bin/exe-doctor.js +2 -2
  34. package/dist/bin/exe-export-behaviors.js +8 -7
  35. package/dist/bin/exe-forget.js +7 -6
  36. package/dist/bin/exe-gateway.js +22 -11
  37. package/dist/bin/exe-healthcheck.js +7 -4
  38. package/dist/bin/exe-heartbeat.js +13 -12
  39. package/dist/bin/exe-kill.js +16 -15
  40. package/dist/bin/exe-launch-agent.js +41 -25
  41. package/dist/bin/exe-new-employee.js +9 -8
  42. package/dist/bin/exe-pending-messages.js +14 -13
  43. package/dist/bin/exe-pending-notifications.js +13 -12
  44. package/dist/bin/exe-pending-reviews.js +13 -12
  45. package/dist/bin/exe-preflight.js +108 -0
  46. package/dist/bin/exe-rename.js +5 -4
  47. package/dist/bin/exe-review.js +15 -14
  48. package/dist/bin/exe-search-quality.js +282 -0
  49. package/dist/bin/exe-search.js +6 -5
  50. package/dist/bin/exe-session-cleanup.js +18 -17
  51. package/dist/bin/exe-settings.js +15 -14
  52. package/dist/bin/exe-start-codex.js +13 -12
  53. package/dist/bin/exe-start-opencode.js +9 -8
  54. package/dist/bin/exe-status.js +14 -13
  55. package/dist/bin/exe-support.js +4 -4
  56. package/dist/bin/exe-team.js +4 -3
  57. package/dist/bin/exe-timers.js +237 -0
  58. package/dist/bin/git-sweep.js +14 -13
  59. package/dist/bin/graph-backfill.js +7 -6
  60. package/dist/bin/graph-export.js +6 -5
  61. package/dist/bin/import-history.js +10 -9
  62. package/dist/bin/install-launchd.js +5 -2
  63. package/dist/bin/install.js +16 -15
  64. package/dist/bin/intercom-check.js +4 -4
  65. package/dist/bin/mcp-sessions.js +2 -2
  66. package/dist/bin/orchestration-metrics.js +5 -4
  67. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  68. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  69. package/dist/bin/prune-orphan-chunks.js +43 -10
  70. package/dist/bin/scan-tasks.js +13 -12
  71. package/dist/bin/setup.js +1 -1
  72. package/dist/bin/shard-migrate.js +5 -4
  73. package/dist/bin/stack-update.js +30 -5
  74. package/dist/bin/vps-health-gate.js +1 -1
  75. package/dist/{capability-cards-BCTFKT4G.js → capability-cards-WQVY7WSS.js} +3 -2
  76. package/dist/{capacity-monitor-B4S3XEDO.js → capacity-monitor-BUKYPSWR.js} +14 -13
  77. package/dist/{catchup-brief-I35KHK62.js → catchup-brief-X5IVQAOH.js} +16 -15
  78. package/dist/{chunk-74TUYU5A.js → chunk-255DIG4B.js} +1 -1
  79. package/dist/{chunk-CXKR5Z5F.js → chunk-2EJ636HI.js} +4 -0
  80. package/dist/{chunk-ST3X3YMZ.js → chunk-2NGPZCWX.js} +4 -4
  81. package/dist/{chunk-LD2JKEJT.js → chunk-2NVEKSSP.js} +7 -7
  82. package/dist/{chunk-V6P7TPPA.js → chunk-2UVN2NBN.js} +148 -2
  83. package/dist/{chunk-OZRO37JW.js → chunk-3KH6GXXX.js} +2 -2
  84. package/dist/{chunk-IMJNYREY.js → chunk-43R2GILO.js} +1 -1
  85. package/dist/{chunk-6X2YNVLB.js → chunk-4BANMHJ5.js} +3 -3
  86. package/dist/{chunk-QNJPDIWY.js → chunk-4L4R6AQJ.js} +1 -1
  87. package/dist/{chunk-QWLPAEG5.js → chunk-4Q5VNQTV.js} +3 -3
  88. package/dist/{chunk-VLSYKMCJ.js → chunk-4RJJ5FJ2.js} +14 -2
  89. package/dist/{chunk-4AN6KMVG.js → chunk-5DPE7B7K.js} +1 -1
  90. package/dist/{chunk-H7ZNSQ2E.js → chunk-62UZWGFX.js} +2 -2
  91. package/dist/{chunk-ZQ2QHGWE.js → chunk-66JPZELX.js} +20 -24
  92. package/dist/{chunk-BUGMW7YF.js → chunk-6LNSZADA.js} +11 -11
  93. package/dist/{chunk-PBCRUNIK.js → chunk-6OD2RVIA.js} +492 -157
  94. package/dist/chunk-7ODTYODO.js +350 -0
  95. package/dist/{chunk-5YL4Y27D.js → chunk-7WDIGRSO.js} +1 -1
  96. package/dist/{chunk-WIL6LXNG.js → chunk-AC6DKMVS.js} +1 -1
  97. package/dist/{chunk-HZEAAKCR.js → chunk-B2J3BBJC.js} +3 -3
  98. package/dist/{chunk-LE7CDIOA.js → chunk-BUOMSIXH.js} +1 -1
  99. package/dist/{chunk-XKGNKH6V.js → chunk-DFUCFLZH.js} +1 -1
  100. package/dist/{chunk-U724Z3S3.js → chunk-DKHBMIVE.js} +100 -37
  101. package/dist/{chunk-MY36XDUK.js → chunk-DNFU56ZS.js} +1 -1
  102. package/dist/{chunk-GSWGOGP5.js → chunk-EOS7VPVT.js} +5 -5
  103. package/dist/{chunk-P33JVGSP.js → chunk-FM7XZDZI.js} +1 -1
  104. package/dist/chunk-G6EJKYK3.js +33 -0
  105. package/dist/{chunk-OMCNFTSI.js → chunk-GMZMBLHT.js} +1 -1
  106. package/dist/{chunk-4LZ54YGA.js → chunk-GSY6HL3T.js} +5 -5
  107. package/dist/{chunk-OVKNFTCL.js → chunk-HED6D5KR.js} +132 -21
  108. package/dist/{chunk-ALH6QLYF.js → chunk-HQODUV3G.js} +2 -2
  109. package/dist/{chunk-US64UR5O.js → chunk-IIHE3FNC.js} +3 -3
  110. package/dist/{chunk-H2ISTRWU.js → chunk-IRIPGGGL.js} +1 -1
  111. package/dist/{chunk-Z3EXECOX.js → chunk-ISILDO7P.js} +1 -1
  112. package/dist/{chunk-6ERZFDBS.js → chunk-IZPO6IOZ.js} +1 -1
  113. package/dist/{chunk-W65Z4SJS.js → chunk-J3QZPDNH.js} +1 -1
  114. package/dist/{chunk-3IJCP6ZH.js → chunk-JDYO76PI.js} +1 -1
  115. package/dist/{chunk-ORNKGGFX.js → chunk-JNARUXDC.js} +1 -1
  116. package/dist/{chunk-VME3UH4D.js → chunk-JV225JBX.js} +1 -1
  117. package/dist/{chunk-EI7PBUIA.js → chunk-JZW5AOWI.js} +1 -1
  118. package/dist/{chunk-TLOILHSL.js → chunk-K7KBAJQL.js} +36 -18
  119. package/dist/{chunk-RHMWSUJB.js → chunk-KAVUTP5G.js} +2 -2
  120. package/dist/{chunk-7FNELLMX.js → chunk-KPVVTHPK.js} +8 -8
  121. package/dist/{chunk-35U72CD2.js → chunk-KSMITUGY.js} +3 -3
  122. package/dist/{chunk-D6UICP3C.js → chunk-LMX7UKGX.js} +81 -3
  123. package/dist/{chunk-7ZWC5HVG.js → chunk-MTIJ2NXY.js} +1 -1
  124. package/dist/{chunk-KVHPBQV4.js → chunk-NCC3F6GM.js} +1 -1
  125. package/dist/{chunk-AYMSIV7X.js → chunk-NIZQ3CIS.js} +1 -1
  126. package/dist/{chunk-LTI2DLHY.js → chunk-OBJXZII2.js} +2 -2
  127. package/dist/{chunk-WHOT5NZ7.js → chunk-OR3TAZL3.js} +14 -2
  128. package/dist/{chunk-RQUHAXMM.js → chunk-PHFPIUWU.js} +2 -0
  129. package/dist/{chunk-N76VTMMF.js → chunk-PMEOSD6S.js} +2 -2
  130. package/dist/{chunk-TCJEFW5V.js → chunk-PPXQE7AS.js} +4 -4
  131. package/dist/{chunk-KHZQVLNZ.js → chunk-QE7UVQDP.js} +46 -0
  132. package/dist/{chunk-SXJACGQ5.js → chunk-QEGXNJGR.js} +4 -4
  133. package/dist/{chunk-W3E4VEEJ.js → chunk-RPBTYQKJ.js} +1 -1
  134. package/dist/chunk-RQ7OVXUZ.js +81 -0
  135. package/dist/{chunk-7L2EV3XX.js → chunk-RVXWGPD3.js} +39 -6
  136. package/dist/{chunk-YNALY3SX.js → chunk-RZJ6DXVE.js} +1 -1
  137. package/dist/{chunk-P3SIFDES.js → chunk-SCYWCWKY.js} +16 -4
  138. package/dist/{chunk-7I43GVER.js → chunk-SOT23KWW.js} +3 -3
  139. package/dist/{chunk-T62GAN7I.js → chunk-SPOXL7HF.js} +7 -7
  140. package/dist/{chunk-3YJMI422.js → chunk-TN2YCFQE.js} +4 -4
  141. package/dist/{chunk-YMSWCERY.js → chunk-U63BZI2B.js} +3 -3
  142. package/dist/{chunk-KA5RK5HZ.js → chunk-V42BSVX6.js} +2 -2
  143. package/dist/{chunk-PJTRAFL4.js → chunk-V4BW5HFQ.js} +3 -3
  144. package/dist/{chunk-4FG6IX7U.js → chunk-VFSYVQX4.js} +1 -1
  145. package/dist/chunk-VQRTO7IS.js +290 -0
  146. package/dist/{chunk-OR7J7TIA.js → chunk-VT6P7FV4.js} +1 -1
  147. package/dist/{chunk-BEIYF4NS.js → chunk-W2J2RF5N.js} +3 -3
  148. package/dist/{chunk-Y5ASPRP7.js → chunk-WBJXJ2R4.js} +17 -13
  149. package/dist/chunk-WCGNCH3Q.js +72 -0
  150. package/dist/{chunk-2LJDLQNO.js → chunk-WJ2PZGRV.js} +1 -1
  151. package/dist/{chunk-AAPPSMPH.js → chunk-WZBUKC5N.js} +1 -1
  152. package/dist/{chunk-RO7EXVSJ.js → chunk-X4AFBL4N.js} +1 -1
  153. package/dist/{chunk-BR74NYEF.js → chunk-XV5HRIXG.js} +5 -5
  154. package/dist/chunk-XXJRZ75E.js +43 -0
  155. package/dist/{chunk-VDHUHXFF.js → chunk-XYG722JW.js} +2 -2
  156. package/dist/{chunk-MM7SWUQ4.js → chunk-YB7U4WTY.js} +4 -4
  157. package/dist/{chunk-RMRZXPUU.js → chunk-Z6H6Y4BS.js} +1 -1
  158. package/dist/{token-budget-UMHRRDBT.js → chunk-ZOVHXTGC.js} +2 -9
  159. package/dist/{chunk-HNLBHP6P.js → chunk-ZZXADKAP.js} +3 -3
  160. package/dist/{co-activation-OKAHEMPE.js → co-activation-WN25AJOC.js} +3 -2
  161. package/dist/{co-occurrence-IHSPB53O.js → co-occurrence-YP2Q3OEA.js} +5 -4
  162. package/dist/{code-context-index-KGY4LKCA.js → code-context-index-ZWONKBKX.js} +4 -4
  163. package/dist/{conversation-entity-extractor-KXJSHRGJ.js → conversation-entity-extractor-KYOBXNID.js} +2 -2
  164. package/dist/{crdt-sync-K2G3C6XY.js → crdt-sync-ZFIFL2QM.js} +1 -1
  165. package/dist/{crm-webhook-ERZSQ3CW.js → crm-webhook-DGPHULOO.js} +2 -2
  166. package/dist/{cto-delegation-gate-ZCJ53LBQ.js → cto-delegation-gate-OF2A3TSS.js} +12 -11
  167. package/dist/daemon-auth-N6P2MZAV.js +17 -0
  168. package/dist/{daemon-orchestration-V6HALVDS.js → daemon-orchestration-G4RRTPP7.js} +16 -15
  169. package/dist/daemon-ready-signal-3L2MJT7C.js +13 -0
  170. package/dist/{db-backup-VZHSFUVA.js → db-backup-EORG4LBO.js} +1 -1
  171. package/dist/{doc-graph-extractor-LQ2IFND2.js → doc-graph-extractor-APZS3DFD.js} +5 -4
  172. package/dist/{dreaming-QAKUASYV.js → dreaming-Q4E3WBGY.js} +13 -12
  173. package/dist/{exe-drift-H3UWNFFY.js → exe-drift-CI5R6GUT.js} +4 -3
  174. package/dist/{exe-export-MN5D4JMT.js → exe-export-HQIQASIT.js} +7 -6
  175. package/dist/{exe-import-IFFMEVD7.js → exe-import-ULZK56WC.js} +7 -6
  176. package/dist/{exe-key-RSZC72QK.js → exe-key-ILNSBGRN.js} +5 -4
  177. package/dist/{exe-snapshot-I622MPLS.js → exe-snapshot-RUZTWZOF.js} +16 -15
  178. package/dist/{factory-CTFAGZUA.js → factory-YHQZ6RZZ.js} +14 -6
  179. package/dist/{fast-db-init-QEFVT7Q3.js → fast-db-init-KNJRL7T3.js} +1 -1
  180. package/dist/{founder-context-3SOKEW76.js → founder-context-QCTMEK66.js} +2 -2
  181. package/dist/gateway/index.js +12 -11
  182. package/dist/{git-staleness-E7RPQA5U.js → git-staleness-KIA5YI4H.js} +3 -2
  183. package/dist/{git-task-sweep-D3A2C5BW.js → git-task-sweep-WH6QE7HL.js} +13 -12
  184. package/dist/{global-procedures-POG4V6IK.js → global-procedures-SYZZCGDS.js} +4 -3
  185. package/dist/{graph-auto-extract-E7KALNWA.js → graph-auto-extract-J2TIWZEE.js} +5 -4
  186. package/dist/{graph-rag-3RZN7JR3.js → graph-rag-HITZZ63L.js} +2 -2
  187. package/dist/hooks/bug-report-worker.js +15 -14
  188. package/dist/hooks/codex-stop-task-finalizer.js +15 -14
  189. package/dist/hooks/commit-complete.js +15 -14
  190. package/dist/hooks/error-recall.js +8 -7
  191. package/dist/hooks/exe-heartbeat-hook.js +4 -3
  192. package/dist/hooks/ingest-worker.js +4 -4
  193. package/dist/hooks/ingest.js +8 -7
  194. package/dist/hooks/instructions-loaded.js +5 -4
  195. package/dist/hooks/manifest.json +20 -20
  196. package/dist/hooks/notification.js +5 -4
  197. package/dist/hooks/post-compact.js +14 -13
  198. package/dist/hooks/post-tool-combined.js +7 -7
  199. package/dist/hooks/pre-compact.js +19 -18
  200. package/dist/hooks/pre-tool-use.js +18 -17
  201. package/dist/hooks/prompt-submit.js +28 -27
  202. package/dist/hooks/session-end.js +24 -23
  203. package/dist/hooks/session-start.js +46 -22
  204. package/dist/hooks/stop.js +22 -21
  205. package/dist/hooks/subagent-stop.js +14 -13
  206. package/dist/hooks/summary-worker.js +22 -21
  207. package/dist/index.js +25 -23
  208. package/dist/{installer-IXUX73JN.js → installer-3NB3IBHF.js} +10 -9
  209. package/dist/{installer-RCUPPZ7Y.js → installer-IIJFCTMH.js} +10 -9
  210. package/dist/{installer-HDD6OH5Z.js → installer-PSDYMGN7.js} +7 -6
  211. package/dist/lib/cloud-sync.js +14 -13
  212. package/dist/lib/consolidation.js +8 -7
  213. package/dist/lib/database.js +3 -2
  214. package/dist/lib/db-daemon-client.js +4 -4
  215. package/dist/lib/db.js +3 -2
  216. package/dist/lib/device-registry.js +3 -1
  217. package/dist/lib/embedder.js +4 -4
  218. package/dist/lib/employee-templates.js +5 -4
  219. package/dist/lib/employees.js +3 -2
  220. package/dist/lib/exe-daemon-client.js +3 -3
  221. package/dist/lib/exe-daemon.js +256 -406
  222. package/dist/lib/hybrid-search.js +6 -5
  223. package/dist/lib/identity.js +3 -2
  224. package/dist/lib/license.js +2 -2
  225. package/dist/lib/messaging.js +13 -12
  226. package/dist/lib/reminders.js +4 -3
  227. package/dist/lib/schedules.js +6 -5
  228. package/dist/lib/session-registry.js +5 -4
  229. package/dist/lib/skill-learning.js +7 -6
  230. package/dist/lib/store.js +7 -4
  231. package/dist/lib/task-router.js +4 -3
  232. package/dist/lib/tasks.js +14 -13
  233. package/dist/lib/tmux-routing.js +16 -11
  234. package/dist/lib/token-spend.js +4 -3
  235. package/dist/{license-gate-V2UCK4KJ.js → license-gate-7SDHCJUO.js} +3 -3
  236. package/dist/mcp/register-tools.js +74 -73
  237. package/dist/mcp/server.js +97 -79
  238. package/dist/mcp/tools/complete-reminder.js +5 -4
  239. package/dist/mcp/tools/create-reminder.js +5 -4
  240. package/dist/mcp/tools/create-task.js +16 -15
  241. package/dist/mcp/tools/deactivate-behavior.js +8 -7
  242. package/dist/mcp/tools/list-reminders.js +5 -4
  243. package/dist/mcp/tools/list-tasks.js +16 -15
  244. package/dist/mcp/tools/send-message.js +15 -14
  245. package/dist/mcp/tools/update-task.js +15 -14
  246. package/dist/{mcp-http-config-7LFFPNGV.js → mcp-http-config-QSOVFXHW.js} +4 -3
  247. package/dist/mcp-tool-surface-CSPFXL3F.js +15 -0
  248. package/dist/{memory-cards-BGI6MJRN.js → memory-cards-II67WFL2.js} +3 -2
  249. package/dist/{memory-graph-extractor-DTRRNWHZ.js → memory-graph-extractor-PM4Q2KJG.js} +6 -5
  250. package/dist/{memory-poisoning-defense-MOCWJK6S.js → memory-poisoning-defense-ECXSX7HK.js} +3 -2
  251. package/dist/{memory-queue-client-DD4E5SIZ.js → memory-queue-client-HLURQEV6.js} +4 -4
  252. package/dist/{memory-reflection-UKKTGZYR.js → memory-reflection-PXF6YFDU.js} +3 -2
  253. package/dist/{notifications-AMJ2K3MM.js → notifications-UP7WQGG4.js} +12 -11
  254. package/dist/{orchestration-events-MB4QVHTD.js → orchestration-events-PZLLPCKY.js} +4 -3
  255. package/dist/orchestration-health-read-EJWVUARG.js +191 -0
  256. package/dist/{orchestrator-M7DJH6TN.js → orchestrator-PUT45J4O.js} +14 -13
  257. package/dist/{pipeline-router-4LT5YG5P.js → pipeline-router-5CRWKESM.js} +4 -3
  258. package/dist/{plan-limits-ENS7OJWP.js → plan-limits-SH2NDFNX.js} +6 -5
  259. package/dist/{project-boot-6W5JPGSB.js → project-boot-2TCPDZ4S.js} +25 -1
  260. package/dist/{projection-worker-WWXZK7QD.js → projection-worker-HWY37MNC.js} +2 -2
  261. package/dist/{prospective-memory-VNGLPMS6.js → prospective-memory-FQSVMCGG.js} +3 -2
  262. package/dist/{reranker-6XBS55FA.js → reranker-AALRMGMM.js} +1 -1
  263. package/dist/{retrieval-health-ATX5TIQ2.js → retrieval-health-PNWJSJNG.js} +1 -1
  264. package/dist/{review-polling-E4ALHTQE.js → review-polling-65JZUE3T.js} +13 -12
  265. package/dist/runtime/index.js +24 -22
  266. package/dist/{session-events-3J6APMKN.js → session-events-EJ3OSAA6.js} +13 -12
  267. package/dist/session-kill-telemetry-3HGM7SNQ.js +63 -0
  268. package/dist/{session-scope-E54VIYTJ.js → session-scope-JGDYAMJO.js} +12 -11
  269. package/dist/{setup-wizard-XV736U5D.js → setup-wizard-44LMFM2C.js} +1 -1
  270. package/dist/shared-rate-limit-store-QZPQEVE2.js +80 -0
  271. package/dist/{skill-refinement-FTURVWFN.js → skill-refinement-DUOO6B7V.js} +3 -2
  272. package/dist/{stack-release-JZVTSBJJ.js → stack-release-XYMKU7NT.js} +53 -4
  273. package/dist/{stack-update-BIK2QHOE.js → stack-update-XHQJRJEP.js} +5 -3
  274. package/dist/{steward-gate-YGU4VXPP.js → steward-gate-6NWRDLX2.js} +4 -3
  275. package/dist/{task-enforcement-GY3VTY6L.js → task-enforcement-UOULTGFB.js} +12 -11
  276. package/dist/{task-scope-PYOK7OQ6.js → task-scope-P5STKYAC.js} +12 -11
  277. package/dist/{tasks-crud-HLJEJ2UU.js → tasks-crud-24HMTULR.js} +12 -11
  278. package/dist/{tasks-notify-NGS3DWUJ.js → tasks-notify-LAIU7UUI.js} +13 -12
  279. package/dist/{tasks-review-BP5V2X34.js → tasks-review-AFJAU2DY.js} +12 -11
  280. package/dist/{telemetry-upload-AXYPFAPS.js → telemetry-upload-DWFGC2XJ.js} +8 -7
  281. package/dist/token-budget-4RFZKWGH.js +16 -0
  282. package/dist/{tool-capability-index-RHPVMMDD.js → tool-capability-index-ZEXBWKUZ.js} +1 -1
  283. package/dist/{tool-telemetry-BLSVABFJ.js → tool-telemetry-BS5JXM5M.js} +1 -1
  284. package/dist/tui/App.js +21 -20
  285. package/dist/{tui-data-EYPOFYLS.js → tui-data-UNO5B7PU.js} +12 -11
  286. package/dist/{worker-gate-SMFOBMMX.js → worker-gate-C6CTTYMD.js} +1 -1
  287. package/dist/{workflow-engine-TDJZ3TXB.js → workflow-engine-4W2KYCDV.js} +2 -2
  288. package/dist/{worktree-XISIYRM4.js → worktree-2CXY6NEB.js} +5 -4
  289. package/dist/{worktree-sweep-AS6GAR6X.js → worktree-sweep-K3CJFSUL.js} +6 -5
  290. package/package.json +9 -4
  291. package/release-notes.json +17 -88
  292. package/stack.release.json +51 -4
  293. package/dist/chunk-PHOQAVTK.js +0 -42
  294. package/dist/daemon-auth-BK7ON5ZH.js +0 -13
  295. package/dist/session-kill-telemetry-KOAHLRBT.js +0 -31
  296. package/dist/{chunk-XDE5IGBX.js → chunk-2NS3QRMJ.js} +0 -0
  297. package/dist/{chunk-JTMKRUX6.js → chunk-A2YZG4AD.js} +0 -0
  298. package/dist/{chunk-UZATXREL.js → chunk-AE74NOE6.js} +0 -0
  299. package/dist/{chunk-LUGWK6QB.js → chunk-FF5DA4XP.js} +3 -3
  300. /package/dist/{chunk-BGOMFGSW.js → chunk-GWPICNSO.js} +0 -0
  301. /package/dist/{chunk-NLHUA3YB.js → chunk-I3DPCSDG.js} +0 -0
  302. /package/dist/{chunk-YM3367VC.js → chunk-J3SR5MGG.js} +0 -0
  303. /package/dist/{chunk-FKFVNV7X.js → chunk-K4BKJJ4F.js} +0 -0
  304. /package/dist/{chunk-PTDBHQX7.js → chunk-MQCTK6EF.js} +0 -0
  305. /package/dist/{chunk-GBV5PV5T.js → chunk-QNXM2HXW.js} +0 -0
  306. /package/dist/{chunk-GZSG2ZOX.js → chunk-YUBTHJVV.js} +0 -0
  307. /package/dist/{core-memory-4OM7LR77.js → core-memory-OC5ITKKV.js} +0 -0
  308. /package/dist/{entity-boost-SFHIRXT5.js → entity-boost-NF3LE6OJ.js} +0 -0
  309. /package/dist/{message-queue-client-QTC3VHJT.js → message-queue-client-4VDU6BZY.js} +0 -0
  310. /package/dist/{oauth-server-BPN55EJM.js → oauth-server-EWUL7DMD.js} +0 -0
  311. /package/dist/{wiki-acl-45SIGG4O.js → wiki-acl-CONNF6ES.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  updateTask
3
- } from "./chunk-GSWGOGP5.js";
3
+ } from "./chunk-EOS7VPVT.js";
4
4
  import {
5
5
  TASK_ALREADY_CLAIMED_PREFIX
6
- } from "./chunk-OVKNFTCL.js";
6
+ } from "./chunk-HED6D5KR.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-GGQAP4QE.js");
43
+ const { getActiveAgent: getAgent } = await import("./active-agent-S5T2YMOR.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,17 +1,68 @@
1
1
  import {
2
- getClient
3
- } from "./chunk-P3SIFDES.js";
2
+ isExeSession
3
+ } from "./chunk-HED6D5KR.js";
4
+ import {
5
+ recordOrchestrationEventBestEffort
6
+ } from "./chunk-OR3TAZL3.js";
7
+ import {
8
+ getClient,
9
+ isCoordinatorName
10
+ } from "./chunk-SCYWCWKY.js";
11
+ import {
12
+ isDaemonAlive
13
+ } from "./chunk-7HLWBYH7.js";
4
14
 
5
15
  // src/lib/session-kill-telemetry.ts
6
16
  import crypto from "crypto";
7
- import { appendFileSync } from "fs";
17
+ import { appendFileSync, statSync } from "fs";
8
18
  import path from "path";
9
19
  import os from "os";
10
20
  var KILL_FILE_LOG = path.join(os.homedir(), ".exe-os", "logs", "session-kills.jsonl");
21
+ var EVENT_LOOP_BLOCKED_MARKER = path.join(
22
+ os.homedir(),
23
+ ".exe-os",
24
+ "session-cache",
25
+ "event-loop-blocked.marker"
26
+ );
27
+ function isDaemonAlive2() {
28
+ const { alive } = isDaemonAlive();
29
+ if (!alive) return false;
30
+ try {
31
+ const st = statSync(EVENT_LOOP_BLOCKED_MARKER);
32
+ if (Date.now() - st.mtimeMs < 6e4) return false;
33
+ } catch {
34
+ }
35
+ return true;
36
+ }
37
+ var CPU_STARVATION_LOAD_RATIO = 0.8;
11
38
  var TOKENS_PER_IDLE_MINUTE = 50;
39
+ function classifyRole(sessionName, agentId) {
40
+ return isExeSession(sessionName) || isCoordinatorName(agentId) ? "coordinator" : "worker";
41
+ }
42
+ function captureLoadAtDeath() {
43
+ const load1 = os.loadavg()[0] ?? 0;
44
+ const cpus = Math.max(1, os.cpus().length);
45
+ return { load1, cpus, loadRatio: load1 / cpus };
46
+ }
47
+ function classifyDeathCause(reason, loadRatio, daemonReady) {
48
+ if (loadRatio >= CPU_STARVATION_LOAD_RATIO) return "cpu_starvation";
49
+ if (!daemonReady) return "daemon_loss";
50
+ if (reason) return reason;
51
+ return "unknown";
52
+ }
12
53
  async function recordSessionKill(input) {
13
54
  const killedAt = (/* @__PURE__ */ new Date()).toISOString();
14
55
  const id = crypto.randomUUID();
56
+ let role = "worker";
57
+ let loadAtDeath = null;
58
+ let cause = input.reason;
59
+ try {
60
+ role = classifyRole(input.sessionName, input.agentId);
61
+ loadAtDeath = captureLoadAtDeath();
62
+ cause = classifyDeathCause(input.reason, loadAtDeath.loadRatio, isDaemonAlive2());
63
+ } catch {
64
+ cause = input.reason;
65
+ }
15
66
  try {
16
67
  const logEntry = JSON.stringify({
17
68
  id,
@@ -19,6 +70,9 @@ async function recordSessionKill(input) {
19
70
  session: input.sessionName,
20
71
  agent: input.agentId,
21
72
  reason: input.reason,
73
+ role,
74
+ cause,
75
+ loadAtDeath,
22
76
  ticksIdle: input.ticksIdle ?? null,
23
77
  tokensSaved: input.estimatedTokensSaved ?? null
24
78
  });
@@ -29,6 +83,25 @@ async function recordSessionKill(input) {
29
83
  `
30
84
  );
31
85
  }
86
+ try {
87
+ recordOrchestrationEventBestEffort({
88
+ eventType: "session.died",
89
+ source: "session-kill-telemetry",
90
+ severity: cause === "cpu_starvation" && role === "coordinator" ? "error" : "warn",
91
+ agentId: input.agentId,
92
+ tmuxSession: input.sessionName,
93
+ result: cause,
94
+ payload: {
95
+ role,
96
+ cause,
97
+ reason: input.reason,
98
+ load1: loadAtDeath?.load1 ?? null,
99
+ cpus: loadAtDeath?.cpus ?? null,
100
+ loadRatio: loadAtDeath?.loadRatio ?? null
101
+ }
102
+ });
103
+ } catch {
104
+ }
32
105
  try {
33
106
  const client = getClient();
34
107
  await client.execute({
@@ -111,7 +184,12 @@ async function sumTokensSavedSince(sinceISO) {
111
184
  }
112
185
 
113
186
  export {
187
+ isDaemonAlive2 as isDaemonAlive,
188
+ CPU_STARVATION_LOAD_RATIO,
114
189
  TOKENS_PER_IDLE_MINUTE,
190
+ classifyRole,
191
+ captureLoadAtDeath,
192
+ classifyDeathCause,
115
193
  recordSessionKill,
116
194
  countKillsSince,
117
195
  IDLE_KILL_STREAK_META_KEY,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getGitRoot,
3
3
  isWorktreeDirty
4
- } from "./chunk-YNALY3SX.js";
4
+ } from "./chunk-RZJ6DXVE.js";
5
5
 
6
6
  // src/lib/worktree-sweep.ts
7
7
  import { execFileSync } from "child_process";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  isClientConnected,
6
6
  sendDaemonRequest
7
- } from "./chunk-TCJEFW5V.js";
7
+ } from "./chunk-PPXQE7AS.js";
8
8
 
9
9
  // src/lib/memory-queue-client.ts
10
10
  async function writeMemoryViaDaemon(entry) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadEmployees
3
- } from "./chunk-P3SIFDES.js";
3
+ } from "./chunk-SCYWCWKY.js";
4
4
 
5
5
  // src/lib/agent-symlinks.ts
6
6
  import os from "os";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-VUH67PT4.js";
4
4
  import {
5
5
  isGhostBehaviorRow
6
- } from "./chunk-N76VTMMF.js";
6
+ } from "./chunk-PMEOSD6S.js";
7
7
  import {
8
8
  getClient,
9
9
  getIdentity,
10
10
  listIdentities,
11
11
  updateIdentity
12
- } from "./chunk-P3SIFDES.js";
12
+ } from "./chunk-SCYWCWKY.js";
13
13
  import {
14
14
  atomicWriteJsonSync
15
15
  } from "./chunk-65DBIEM2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-P3SIFDES.js";
3
+ } from "./chunk-SCYWCWKY.js";
4
4
 
5
5
  // src/lib/orchestration-events.ts
6
6
  import crypto from "crypto";
@@ -42,6 +42,8 @@ var ORCHESTRATION_COUNTER_KEYS = [
42
42
  "tmuxNudgeCompleted",
43
43
  "tmuxSpawnAttempted",
44
44
  "tmuxSpawnCompleted",
45
+ "tmuxSpawnFailed",
46
+ "spawnFailureByCause",
45
47
  "consistencyMismatches",
46
48
  "consistencyRepaired",
47
49
  "fileRowsResynced",
@@ -251,6 +253,8 @@ async function getOrchestrationMetrics(input = {}) {
251
253
  tmuxNudgeCompleted: 0,
252
254
  tmuxSpawnAttempted: 0,
253
255
  tmuxSpawnCompleted: 0,
256
+ tmuxSpawnFailed: 0,
257
+ spawnFailureByCause: {},
254
258
  consistencyMismatches: 0,
255
259
  consistencyRepaired: 0,
256
260
  fileRowsResynced: 0,
@@ -311,7 +315,14 @@ async function getOrchestrationMetrics(input = {}) {
311
315
  if (String(row.result ?? "") === "debounced") counts.duplicateNudges++;
312
316
  }
313
317
  if (type === "tmux.spawn.attempted") counts.tmuxSpawnAttempted++;
314
- if (type === "tmux.spawn.completed") counts.tmuxSpawnCompleted++;
318
+ if (type === "tmux.spawn.completed") {
319
+ counts.tmuxSpawnCompleted++;
320
+ if (String(row.result ?? "") === "failed") {
321
+ counts.tmuxSpawnFailed++;
322
+ const code = String(row.error_code ?? "unknown") || "unknown";
323
+ counts.spawnFailureByCause[code] = (counts.spawnFailureByCause[code] ?? 0) + 1;
324
+ }
325
+ }
315
326
  if (type === "consistency.mismatch") counts.consistencyMismatches++;
316
327
  if (type === "consistency.repaired") counts.consistencyRepaired++;
317
328
  if (type === "task_file.resynced") counts.fileRowsResynced++;
@@ -529,6 +540,7 @@ function formatOrchestrationMetrics(metrics) {
529
540
  `- worker instances selected: ${metrics.counts.workerInstancesSelected}`,
530
541
  `- tmux spawn attempted: ${metrics.counts.tmuxSpawnAttempted}`,
531
542
  `- tmux spawn completed: ${metrics.counts.tmuxSpawnCompleted}`,
543
+ `- tmux spawn FAILED: ${metrics.counts.tmuxSpawnFailed}${metrics.counts.tmuxSpawnFailed > 0 ? ` (${Object.entries(metrics.counts.spawnFailureByCause).map(([cause, n]) => `${cause}=${n}`).join(" ")})` : ""}`,
532
544
  `- worktrees created: ${metrics.counts.worktreeCreated}`,
533
545
  `- worktrees reused: ${metrics.counts.worktreeReused}`,
534
546
  `- worktrees failed: ${metrics.counts.worktreeFailed}`,
@@ -54,6 +54,8 @@ function resolveHookSearchEnabled(env, config, sentinelPath = EMBEDDINGS_SENTINE
54
54
  }
55
55
 
56
56
  export {
57
+ EMBEDDINGS_SENTINEL_PATH,
58
+ readSentinel,
57
59
  resolveEmbeddingsEnabled,
58
60
  setEmbeddingsEnabled,
59
61
  resolveHookSearchEnabled
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  vectorToSqlLiteral
3
- } from "./chunk-Y5ASPRP7.js";
3
+ } from "./chunk-WBJXJ2R4.js";
4
4
  import {
5
5
  blobToVector
6
6
  } from "./chunk-OTVEIJUQ.js";
7
7
  import {
8
8
  getClient
9
- } from "./chunk-P3SIFDES.js";
9
+ } from "./chunk-SCYWCWKY.js";
10
10
 
11
11
  // src/lib/behaviors.ts
12
12
  import crypto from "crypto";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ensureDaemonToken,
3
3
  readDaemonToken
4
- } from "./chunk-PHOQAVTK.js";
4
+ } from "./chunk-RQ7OVXUZ.js";
5
+ import {
6
+ requestRestart
7
+ } from "./chunk-RVXWGPD3.js";
5
8
  import {
6
9
  computeDaemonHeapCapMb
7
10
  } from "./chunk-7XGDTKHX.js";
8
- import {
9
- requestRestart
10
- } from "./chunk-7L2EV3XX.js";
11
11
  import {
12
12
  EXE_AI_DIR
13
13
  } from "./chunk-DFIOOK5R.js";
@@ -1,9 +1,52 @@
1
1
  // src/bin/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
+ }
2
41
  async function fastDbInit(opts) {
3
42
  const { isInitialized, getClient, setExternalClient } = await import("./lib/database.js");
4
43
  if (isInitialized()) {
5
44
  return getClient();
6
45
  }
46
+ if (opts?.daemonOnly) {
47
+ const { isDaemonReady } = await import("./daemon-ready-signal-3L2MJT7C.js");
48
+ if (!isDaemonReady()) return makeNoopClient();
49
+ }
7
50
  const forceDirect = process.env.EXE_DB_DIRECT === "1" || process.env.EXE_DB_READONLY === "1" || process.env.EXE_SKIP_DAEMON === "1";
8
51
  if (!forceDirect) {
9
52
  try {
@@ -71,6 +114,9 @@ async function fastDbInit(opts) {
71
114
  } catch {
72
115
  }
73
116
  }
117
+ if (opts?.daemonOnly) {
118
+ return makeNoopClient();
119
+ }
74
120
  if (opts?.socketOnly) {
75
121
  throw new Error("Daemon socket unavailable and socketOnly=true \u2014 skipping slow DB fallback");
76
122
  }
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  deactivateBehavior
3
- } from "./chunk-N76VTMMF.js";
3
+ } from "./chunk-PMEOSD6S.js";
4
4
  import {
5
5
  getActiveAgent
6
- } from "./chunk-LE7CDIOA.js";
6
+ } from "./chunk-BUOMSIXH.js";
7
7
  import {
8
8
  canCoordinate,
9
9
  getClient
10
- } from "./chunk-P3SIFDES.js";
10
+ } from "./chunk-SCYWCWKY.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-YGU4VXPP.js");
27
+ const { StewardGate } = await import("./steward-gate-6NWRDLX2.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,6 +1,6 @@
1
1
  import {
2
2
  listReminders
3
- } from "./chunk-ORNKGGFX.js";
3
+ } from "./chunk-JNARUXDC.js";
4
4
 
5
5
  // src/mcp/tools/list-reminders.ts
6
6
  import { z } from "zod";
@@ -0,0 +1,81 @@
1
+ import {
2
+ EXE_AI_DIR
3
+ } from "./chunk-DFIOOK5R.js";
4
+ import {
5
+ enforcePrivateFileSync,
6
+ ensurePrivateDirSync
7
+ } from "./chunk-65DBIEM2.js";
8
+
9
+ // src/lib/daemon-auth.ts
10
+ import crypto from "crypto";
11
+ import path from "path";
12
+ import { existsSync, readFileSync, writeFileSync } from "fs";
13
+ var DAEMON_TOKEN_PATH = path.join(EXE_AI_DIR, "exed.token");
14
+ function normalizeToken(token) {
15
+ if (!token) return null;
16
+ const trimmed = token.trim();
17
+ return trimmed.length > 0 ? trimmed : null;
18
+ }
19
+ function readDaemonToken() {
20
+ try {
21
+ if (!existsSync(DAEMON_TOKEN_PATH)) return null;
22
+ return normalizeToken(readFileSync(DAEMON_TOKEN_PATH, "utf8"));
23
+ } catch {
24
+ return null;
25
+ }
26
+ }
27
+ function ensureDaemonToken(seed) {
28
+ const existing = readDaemonToken();
29
+ if (existing) return existing;
30
+ const token = normalizeToken(seed) ?? crypto.randomBytes(32).toString("hex");
31
+ ensurePrivateDirSync(EXE_AI_DIR);
32
+ writeFileSync(DAEMON_TOKEN_PATH, `${token}
33
+ `, "utf8");
34
+ enforcePrivateFileSync(DAEMON_TOKEN_PATH);
35
+ return token;
36
+ }
37
+ function isUnclaimedAgentId(agentId) {
38
+ if (!agentId || agentId === "default") return true;
39
+ if (/^\$\{[^}]*\}$/.test(agentId)) return true;
40
+ return false;
41
+ }
42
+ function shouldEnforceSessionIdentity(env = process.env) {
43
+ const v = (env.EXE_ENFORCE_SESSION_IDENTITY ?? "").trim().toLowerCase();
44
+ return v === "1" || v === "true" || v === "yes" || v === "on";
45
+ }
46
+ function reconcileSessionAgentIdentity(boundAgentId, claimedAgentId, enforce = false) {
47
+ const bound = normalizeToken(boundAgentId ?? null);
48
+ if (!bound) {
49
+ return {
50
+ effectiveAgentId: claimedAgentId,
51
+ impersonationDetected: false,
52
+ reject: false,
53
+ claimedAgentId,
54
+ boundAgentId: claimedAgentId
55
+ };
56
+ }
57
+ if (isUnclaimedAgentId(claimedAgentId) || claimedAgentId === bound) {
58
+ return {
59
+ effectiveAgentId: bound,
60
+ impersonationDetected: false,
61
+ reject: false,
62
+ claimedAgentId,
63
+ boundAgentId: bound
64
+ };
65
+ }
66
+ return {
67
+ effectiveAgentId: bound,
68
+ impersonationDetected: true,
69
+ reject: enforce,
70
+ claimedAgentId,
71
+ boundAgentId: bound
72
+ };
73
+ }
74
+
75
+ export {
76
+ DAEMON_TOKEN_PATH,
77
+ readDaemonToken,
78
+ ensureDaemonToken,
79
+ shouldEnforceSessionIdentity,
80
+ reconcileSessionAgentIdentity
81
+ };
@@ -295,15 +295,48 @@ function cleanWorkerPidFiles() {
295
295
  } catch {
296
296
  }
297
297
  }
298
- function updateMcpVersionMarker() {
298
+ async function updateMcpVersionMarker(opts) {
299
299
  try {
300
- writeFileSync(MCP_VERSION_PATH, `deploy-${Date.now()}`);
301
- process.stderr.write("[restart-orchestrator] MCP version marker updated \u2014 servers will hot-reload within 10s\n");
302
- logRestart({ event: "mcp_marker_updated" });
300
+ let surfaceHash = opts?.surfaceHash;
301
+ if (surfaceHash === void 0) {
302
+ surfaceHash = await computeMcpSurfaceHash();
303
+ }
304
+ const { buildMcpVersionMarker } = await import("./mcp-tool-surface-CSPFXL3F.js");
305
+ const marker = buildMcpVersionMarker(surfaceHash ?? null);
306
+ let current = null;
307
+ try {
308
+ current = existsSync(MCP_VERSION_PATH) ? readFileSync(MCP_VERSION_PATH, "utf8").trim() : null;
309
+ } catch {
310
+ }
311
+ if (current === marker) {
312
+ process.stderr.write(
313
+ "[restart-orchestrator] MCP tool surface unchanged \u2014 marker NOT updated, no hot-reload\n"
314
+ );
315
+ logRestart({ event: "mcp_marker_unchanged", marker });
316
+ return;
317
+ }
318
+ writeFileSync(MCP_VERSION_PATH, marker);
319
+ const surfaceMode = surfaceHash ? "surface-hash" : "timestamp-fallback";
320
+ process.stderr.write(
321
+ `[restart-orchestrator] MCP version marker updated (${surfaceMode}) \u2014 servers will hot-reload within 10s
322
+ `
323
+ );
324
+ logRestart({ event: "mcp_marker_updated", mode: surfaceMode });
303
325
  } catch {
304
326
  }
305
327
  }
306
- function requestDeployRestart(reason) {
328
+ async function computeMcpSurfaceHash() {
329
+ try {
330
+ const [{ computeToolSurfaceHash }, { registerAllTools }] = await Promise.all([
331
+ import("./mcp-tool-surface-CSPFXL3F.js"),
332
+ import("./mcp/register-tools.js")
333
+ ]);
334
+ return computeToolSurfaceHash((server) => registerAllTools(server));
335
+ } catch {
336
+ return null;
337
+ }
338
+ }
339
+ async function requestDeployRestart(reason) {
307
340
  const deployReason = reason ?? "deploy";
308
341
  if (!acquireLock()) {
309
342
  process.stderr.write("[restart-orchestrator] Lock held \u2014 waiting briefly for deploy\n");
@@ -340,7 +373,7 @@ function requestDeployRestart(reason) {
340
373
  }
341
374
  const orphansKilled = killOrphanedDaemons();
342
375
  const backfillKilled = killOrphanedBackfill();
343
- updateMcpVersionMarker();
376
+ await updateMcpVersionMarker();
344
377
  cleanWorkerPidFiles();
345
378
  try {
346
379
  unlinkSync(SOCKET_PATH);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  recordOrchestrationEventBestEffort
3
- } from "./chunk-WHOT5NZ7.js";
3
+ } from "./chunk-OR3TAZL3.js";
4
4
 
5
5
  // src/lib/worktree.ts
6
6
  import { execSync } from "child_process";
@@ -3,11 +3,14 @@ import {
3
3
  } from "./chunk-2I23RPSI.js";
4
4
  import {
5
5
  listBackups
6
- } from "./chunk-BGOMFGSW.js";
6
+ } from "./chunk-GWPICNSO.js";
7
7
  import {
8
8
  getEmotionalBaseline,
9
9
  renderEmotionalBaselineSection
10
10
  } from "./chunk-PNQDP3OA.js";
11
+ import {
12
+ logDaemonHealth
13
+ } from "./chunk-VQRTO7IS.js";
11
14
  import {
12
15
  isDaemonAlive
13
16
  } from "./chunk-7HLWBYH7.js";
@@ -1116,7 +1119,7 @@ async function migrateReflectionDedup(client) {
1116
1119
  "ALTER TABLE memory_reflections ADD COLUMN dedup_key TEXT",
1117
1120
  "migration add memory_reflections.dedup_key"
1118
1121
  );
1119
- const { reflectionDedupKey } = await import("./memory-reflection-UKKTGZYR.js");
1122
+ const { reflectionDedupKey } = await import("./memory-reflection-PXF6YFDU.js");
1120
1123
  const keyForRow = (row) => {
1121
1124
  let sources = [];
1122
1125
  try {
@@ -1365,7 +1368,7 @@ async function _attemptBackupRestore(config) {
1365
1368
  } catch {
1366
1369
  }
1367
1370
  try {
1368
- const { pruneCorruptQuarantine } = await import("./db-backup-VZHSFUVA.js");
1371
+ const { pruneCorruptQuarantine } = await import("./db-backup-EORG4LBO.js");
1369
1372
  pruneCorruptQuarantine();
1370
1373
  } catch {
1371
1374
  }
@@ -1637,7 +1640,7 @@ async function sweepExpiredSoftDeletedMemories(client, options = {}) {
1637
1640
  const purgeArchived = archDays !== void 0;
1638
1641
  const BATCH_SIZE = 2e3;
1639
1642
  const MAX_BATCHES = 500;
1640
- const { cleanupCardsForMemories, cleanupGraphLinksForMemories } = await import("./graph-rag-3RZN7JR3.js");
1643
+ const { cleanupCardsForMemories, cleanupGraphLinksForMemories } = await import("./graph-rag-HITZZ63L.js");
1641
1644
  const softCutoff = `-${softDays} days`;
1642
1645
  const selectArgsBase = [softCutoff];
1643
1646
  let predicate = `status = 'deleted' AND COALESCE(deleted_at, timestamp) < datetime('now', ?)`;
@@ -1713,6 +1716,15 @@ function getClient() {
1713
1716
  process.stderr.write(
1714
1717
  "[database] WARN: daemon unavailable \u2014 using direct SQLite (single-writer CLI mode).\n"
1715
1718
  );
1719
+ logDaemonHealth({
1720
+ event: "direct_sqlite_fallback",
1721
+ pid: process.pid,
1722
+ message: "CLI opened encrypted DB directly \u2014 daemon unavailable",
1723
+ data: {
1724
+ hook: process.env.EXE_HOOK_NAME ?? null,
1725
+ mcpMode: process.env.EXE_MCP_MODE === "1"
1726
+ }
1727
+ });
1716
1728
  }
1717
1729
  return _resilientClient;
1718
1730
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-P3SIFDES.js";
3
+ } from "./chunk-SCYWCWKY.js";
4
4
 
5
5
  // src/lib/pipeline-router.ts
6
6
  import crypto from "crypto";
@@ -140,8 +140,8 @@ Agent response: ${agentResponse}` : ""
140
140
  }
141
141
  async function sinkEntityExtraction(msg, agentResponse, agentName) {
142
142
  try {
143
- const { extractFromConversation } = await import("./conversation-entity-extractor-KXJSHRGJ.js");
144
- const { storeExtraction } = await import("./graph-rag-3RZN7JR3.js");
143
+ const { extractFromConversation } = await import("./conversation-entity-extractor-KYOBXNID.js");
144
+ const { storeExtraction } = await import("./graph-rag-HITZZ63L.js");
145
145
  if ((msg.text?.length ?? 0) < 20) return false;
146
146
  if (msg.isHistorical) return false;
147
147
  const extraction = await extractFromConversation(msg, agentResponse, agentName);
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isCrdtSyncEnabled
3
- } from "./chunk-FKFVNV7X.js";
3
+ } from "./chunk-K4BKJJ4F.js";
4
4
  import {
5
5
  GHOST_BEHAVIOR_SQL,
6
6
  isGhostBehaviorRow
7
- } from "./chunk-N76VTMMF.js";
7
+ } from "./chunk-PMEOSD6S.js";
8
8
  import {
9
9
  decryptSyncBlob,
10
10
  encryptSyncBlob,
@@ -13,16 +13,16 @@ import {
13
13
  } from "./chunk-LO6L5ADL.js";
14
14
  import {
15
15
  retryOnDaemonTransportError
16
- } from "./chunk-MY36XDUK.js";
16
+ } from "./chunk-DNFU56ZS.js";
17
17
  import {
18
18
  getClient,
19
19
  loadEmployees,
20
20
  registerBinSymlinks,
21
21
  saveEmployees
22
- } from "./chunk-P3SIFDES.js";
22
+ } from "./chunk-SCYWCWKY.js";
23
23
  import {
24
24
  loadDeviceId
25
- } from "./chunk-VME3UH4D.js";
25
+ } from "./chunk-JV225JBX.js";
26
26
  import {
27
27
  EXE_AI_DIR
28
28
  } from "./chunk-DFIOOK5R.js";
@@ -584,7 +584,7 @@ async function cloudSync(config, options) {
584
584
  let pulled = 0;
585
585
  if (pullResult.records.length > 0) {
586
586
  if (shouldUseCrdtMergeForCloudSync()) {
587
- const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-K2G3C6XY.js");
587
+ const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-ZFIFL2QM.js");
588
588
  initCrdtDoc();
589
589
  importExistingMemories(
590
590
  pullResult.records.map((rec) => ({
@@ -1023,7 +1023,7 @@ async function cloudSync(config, options) {
1023
1023
  }
1024
1024
  const totalMemories = await countRows("SELECT COUNT(*) as cnt FROM memories WHERE status = 'active' OR status IS NULL");
1025
1025
  try {
1026
- const { getLatestBackup } = await import("./db-backup-VZHSFUVA.js");
1026
+ const { getLatestBackup } = await import("./db-backup-EORG4LBO.js");
1027
1027
  const latestBackup = getLatestBackup();
1028
1028
  if (latestBackup) {
1029
1029
  const backupSize = statSync(latestBackup).size;