@askexenow/exe-os 0.9.336 → 0.9.338

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 (285) hide show
  1. package/dist/{active-agent-IM37G7MO.js → active-agent-EC6M7KTX.js} +3 -3
  2. package/dist/{active-agent-W5TKWMYT.js → active-agent-WHIUCHLA.js} +3 -3
  3. package/dist/{agentic-ontology-FG4YCUZG.js → agentic-ontology-RNSXGXW4.js} +1 -1
  4. package/dist/{backfill-metadata-AFXONF76.js → backfill-metadata-MFY6BHKE.js} +4 -4
  5. package/dist/{behaviors-EHEN4II7.js → behaviors-HLZUJSMP.js} +5 -5
  6. package/dist/bin/agentic-ontology-backfill.js +5 -5
  7. package/dist/bin/agentic-reflection-backfill.js +6 -6
  8. package/dist/bin/agentic-semantic-label.js +5 -5
  9. package/dist/bin/backfill-conversations.js +4 -4
  10. package/dist/bin/backfill-responses.js +4 -4
  11. package/dist/bin/backfill-vectors.js +5 -5
  12. package/dist/bin/bulk-sync-postgres.js +12 -10
  13. package/dist/bin/cc-doctor.js +4 -4
  14. package/dist/bin/cleanup-stale-review-tasks.js +14 -14
  15. package/dist/bin/cli.js +19 -16
  16. package/dist/bin/deferred-daemon-restart.js +71 -69
  17. package/dist/bin/exe-agent-config.js +3 -3
  18. package/dist/bin/exe-agent.js +14 -14
  19. package/dist/bin/exe-assign.js +5 -5
  20. package/dist/bin/exe-boot.js +24 -24
  21. package/dist/bin/exe-call.js +4 -4
  22. package/dist/bin/exe-cloud.js +12 -10
  23. package/dist/bin/exe-config-dump.js +3 -3
  24. package/dist/bin/exe-dispatch.js +14 -14
  25. package/dist/bin/exe-doctor.js +4 -4
  26. package/dist/bin/exe-export-behaviors.js +7 -7
  27. package/dist/bin/exe-forget.js +6 -6
  28. package/dist/bin/exe-gateway.js +7 -7
  29. package/dist/bin/exe-grant.js +126 -0
  30. package/dist/bin/exe-healthcheck.js +4 -4
  31. package/dist/bin/exe-heartbeat.js +14 -14
  32. package/dist/bin/exe-kill.js +17 -17
  33. package/dist/bin/exe-launch-agent.js +22 -22
  34. package/dist/bin/exe-new-employee.js +8 -8
  35. package/dist/bin/exe-pending-messages.js +15 -15
  36. package/dist/bin/exe-pending-notifications.js +14 -14
  37. package/dist/bin/exe-pending-reviews.js +14 -14
  38. package/dist/bin/exe-rename.js +4 -4
  39. package/dist/bin/exe-review.js +16 -16
  40. package/dist/bin/exe-search.js +5 -5
  41. package/dist/bin/exe-session-cleanup.js +18 -18
  42. package/dist/bin/exe-settings.js +13 -11
  43. package/dist/bin/exe-start-codex.js +12 -12
  44. package/dist/bin/exe-start-opencode.js +8 -8
  45. package/dist/bin/exe-status.js +15 -15
  46. package/dist/bin/exe-support.js +3 -3
  47. package/dist/bin/exe-team.js +3 -3
  48. package/dist/bin/git-sweep.js +15 -15
  49. package/dist/bin/graph-backfill.js +6 -6
  50. package/dist/bin/graph-export.js +5 -5
  51. package/dist/bin/import-history.js +9 -9
  52. package/dist/bin/install.js +73 -71
  53. package/dist/bin/intercom-check.js +4 -4
  54. package/dist/bin/mcp-sessions.js +2 -2
  55. package/dist/bin/orchestration-metrics.js +4 -4
  56. package/dist/bin/postgres-agentic-reflection-backfill.js +4 -4
  57. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  58. package/dist/bin/registry-proxy.js +1 -1
  59. package/dist/bin/scan-tasks.js +14 -14
  60. package/dist/bin/setup.js +1 -1
  61. package/dist/bin/shard-migrate.js +4 -4
  62. package/dist/bin/stack-update.js +7 -7
  63. package/dist/bin/vps-health-gate.js +1 -1
  64. package/dist/{branch-hygiene-55TKIWAZ.js → branch-hygiene-R5NVTRAY.js} +17 -15
  65. package/dist/{capability-cards-DUM76MEW.js → capability-cards-YOKVMMOL.js} +2 -2
  66. package/dist/{capacity-monitor-XY6TLPQR.js → capacity-monitor-S54IOWRL.js} +15 -15
  67. package/dist/{catchup-brief-JGRVXTBF.js → catchup-brief-S35QLMG3.js} +17 -17
  68. package/dist/{chunk-EVWJQBCW.js → chunk-2HZY3ECT.js} +5 -5
  69. package/dist/{chunk-5M7RPT2V.js → chunk-2SG2UGCH.js} +4 -4
  70. package/dist/{chunk-6E5DEC2D.js → chunk-3OBWSCJN.js} +11 -11
  71. package/dist/{chunk-VVFWJU3D.js → chunk-4IYSBPX3.js} +1 -1
  72. package/dist/{chunk-7JM2LGHO.js → chunk-52KNOQMK.js} +3 -3
  73. package/dist/{chunk-NCS7UNML.js → chunk-542EWGY3.js} +7 -7
  74. package/dist/{chunk-XUOSKPVP.js → chunk-65SVQELL.js} +1 -1
  75. package/dist/{chunk-S7LMZ6VM.js → chunk-6HBURYON.js} +1 -1
  76. package/dist/{chunk-UPH5EY5F.js → chunk-6IRVGOUL.js} +1 -1
  77. package/dist/{chunk-2DJTSJWW.js → chunk-6M36JFFD.js} +3 -3
  78. package/dist/{chunk-QWWGMK4Y.js → chunk-6MRWJMI5.js} +1 -1
  79. package/dist/{chunk-6ND3MBX7.js → chunk-7EA7LYW4.js} +2 -2
  80. package/dist/{chunk-5OM6Z22T.js → chunk-7WDXEKUL.js} +3 -3
  81. package/dist/{chunk-OMU7HDKI.js → chunk-AOO77BDE.js} +1 -1
  82. package/dist/{chunk-O2RF5NGI.js → chunk-AVKXCSBI.js} +1 -1
  83. package/dist/{chunk-JGHVEDZG.js → chunk-B2GLEEGY.js} +1 -1
  84. package/dist/chunk-B75BOKEI.js +193 -0
  85. package/dist/{chunk-SKFA42EO.js → chunk-B76TSEP3.js} +1 -1
  86. package/dist/{chunk-ELOJZIVD.js → chunk-BPC5LZ6Y.js} +1 -1
  87. package/dist/{chunk-DUSZ2ZQE.js → chunk-BU2QQWBQ.js} +1 -1
  88. package/dist/{chunk-B6QRDKL3.js → chunk-DADMPMYX.js} +1 -1
  89. package/dist/{chunk-5TWCO22U.js → chunk-DILD54TU.js} +46 -13
  90. package/dist/{chunk-YBVKLDT3.js → chunk-DZ6OQM67.js} +1 -1
  91. package/dist/{chunk-SGLZZJWX.js → chunk-EIF2LQHZ.js} +1 -1
  92. package/dist/{chunk-XYKCPHWT.js → chunk-FNZR3B7U.js} +1 -1
  93. package/dist/{chunk-X7BGMYZS.js → chunk-FUIIVSW6.js} +1 -1
  94. package/dist/{chunk-EFFE6UVN.js → chunk-GN45PBWI.js} +2 -2
  95. package/dist/{chunk-XGQU34XA.js → chunk-H2L4PHGH.js} +2 -2
  96. package/dist/{chunk-YOZJWU2I.js → chunk-H37HHX3E.js} +9 -9
  97. package/dist/{chunk-XZHA3WO2.js → chunk-HEPR6QTL.js} +4 -4
  98. package/dist/{chunk-YDTW2KYM.js → chunk-I3XKO3KQ.js} +1 -1
  99. package/dist/{chunk-W33EMSZB.js → chunk-I7Z6KTGF.js} +5 -5
  100. package/dist/{chunk-AMBCXARR.js → chunk-ISD7ZD45.js} +140 -140
  101. package/dist/chunk-JCBKARSK.js +113 -0
  102. package/dist/{chunk-2AWXDWUB.js → chunk-K5WFKEXQ.js} +67 -78
  103. package/dist/{chunk-BE7NKEGL.js → chunk-KCC5A7YL.js} +5 -5
  104. package/dist/{chunk-EGCYJ4LJ.js → chunk-KMBEL7VB.js} +1 -1
  105. package/dist/{chunk-FYPSGPYS.js → chunk-KTY7I7UH.js} +1 -1
  106. package/dist/{chunk-U5QPEYCA.js → chunk-LMZISHSJ.js} +13 -13
  107. package/dist/{chunk-AVOP32R7.js → chunk-LTVCRHHD.js} +4 -4
  108. package/dist/{chunk-6F2DZQQS.js → chunk-MQRFKSLI.js} +3 -3
  109. package/dist/{chunk-BF252PDD.js → chunk-MW2GJJ53.js} +2 -2
  110. package/dist/{chunk-K4SSTJHJ.js → chunk-N5I7RL3I.js} +1 -1
  111. package/dist/{chunk-CMZLULTW.js → chunk-OFX5B2S7.js} +1 -1
  112. package/dist/{chunk-FHOI6AFU.js → chunk-OJTJYEMX.js} +3 -3
  113. package/dist/{chunk-FQ55TZWJ.js → chunk-PAEXYFMY.js} +1 -1
  114. package/dist/{chunk-ROAUSSJI.js → chunk-PLRIJALF.js} +160 -34
  115. package/dist/{chunk-RIOJ7RWQ.js → chunk-Q7L6G6KV.js} +2 -2
  116. package/dist/{chunk-DUBZDAXS.js → chunk-QBTWXDFK.js} +9 -9
  117. package/dist/{chunk-Z6MVHWJF.js → chunk-QFPTDSY2.js} +1 -1
  118. package/dist/{chunk-4ZH65EXT.js → chunk-QXSBB26A.js} +1 -1
  119. package/dist/{chunk-UE7SPA54.js → chunk-QZLIZAS7.js} +2 -2
  120. package/dist/{chunk-LAVL2OMB.js → chunk-R44Z32O2.js} +3 -3
  121. package/dist/{chunk-QAD4YR57.js → chunk-RDTZTLVQ.js} +20 -11
  122. package/dist/{chunk-RQ3EUVVT.js → chunk-RLRT2BVM.js} +1 -1
  123. package/dist/chunk-RNAYCUNM.js +271 -0
  124. package/dist/{chunk-XDIYCXMJ.js → chunk-RRWDYOQS.js} +1 -1
  125. package/dist/{chunk-MZ222PUT.js → chunk-T4KZ2Z2N.js} +3 -3
  126. package/dist/{chunk-HDALYSEP.js → chunk-TLYAEISW.js} +2 -2
  127. package/dist/{chunk-QIJEW462.js → chunk-UIV2WPBT.js} +1 -13
  128. package/dist/{chunk-AVFMDS5Z.js → chunk-UPWE5NOG.js} +2 -2
  129. package/dist/{chunk-C5KHGDWX.js → chunk-UXBD22CD.js} +1 -1
  130. package/dist/{chunk-U3WSLO2R.js → chunk-VJHUVFIW.js} +3 -3
  131. package/dist/{chunk-SEEMHG5A.js → chunk-WYLV4S6A.js} +3 -3
  132. package/dist/{chunk-EVV2G3CW.js → chunk-X425OEYF.js} +4 -4
  133. package/dist/{chunk-RLY3O2F7.js → chunk-X7H3HMFH.js} +3 -3
  134. package/dist/{chunk-P6OW236E.js → chunk-XACL67CS.js} +1 -1
  135. package/dist/{chunk-IIEKPBKB.js → chunk-XCTGRD4S.js} +175 -11
  136. package/dist/{chunk-MS6F63JW.js → chunk-XJI7Z6LZ.js} +1 -1
  137. package/dist/{chunk-JGKV5DLX.js → chunk-XUKPALWT.js} +3 -3
  138. package/dist/{chunk-FUX5ZEB3.js → chunk-XWHE4LZK.js} +1 -1
  139. package/dist/{chunk-4E7DFDVQ.js → chunk-YE7NH53A.js} +1 -1
  140. package/dist/{chunk-N2JXHW4E.js → chunk-ZIVEA3NB.js} +1 -1
  141. package/dist/{cleanup-graph-garbage-MKSRWINB.js → cleanup-graph-garbage-KUABW6LS.js} +6 -6
  142. package/dist/{co-activation-W7QBHSUR.js → co-activation-XMPHKGHR.js} +2 -2
  143. package/dist/{co-occurrence-C5YW5JZ6.js → co-occurrence-SHKSJ6CV.js} +4 -4
  144. package/dist/{conversation-entity-extractor-FPAMTL3C.js → conversation-entity-extractor-D3EFTLT4.js} +2 -2
  145. package/dist/{crdt-sync-OTFYRPW2.js → crdt-sync-UJELKSNX.js} +1 -1
  146. package/dist/{crm-webhook-5WHYZW6K.js → crm-webhook-HHNBS7LY.js} +2 -2
  147. package/dist/{cto-delegation-gate-U2AEMPQD.js → cto-delegation-gate-DXNF5HVW.js} +13 -13
  148. package/dist/{daemon-orchestration-DIT3JLV7.js → daemon-orchestration-7QB6QOXT.js} +29 -17
  149. package/dist/{db-backup-CXNB2ZAG.js → db-backup-DLD4QZBO.js} +1 -1
  150. package/dist/{doc-graph-extractor-SDH4QDWF.js → doc-graph-extractor-3TRLGD7M.js} +4 -4
  151. package/dist/{documents-WBKAVVMO.js → documents-FHIBU7KJ.js} +5 -5
  152. package/dist/{dreaming-M23FLJDE.js → dreaming-OMFUEUCQ.js} +14 -14
  153. package/dist/{exe-drift-AZGPQH73.js → exe-drift-KY2KHZEL.js} +3 -3
  154. package/dist/{exe-export-523RIUSC.js → exe-export-SP6G3QF6.js} +6 -6
  155. package/dist/{exe-import-CCF76ZK7.js → exe-import-KJU7FBVQ.js} +6 -6
  156. package/dist/{exe-key-5ADXQDJY.js → exe-key-RWGMIHK7.js} +71 -69
  157. package/dist/{exe-snapshot-NQMKIQQO.js → exe-snapshot-ZNPGUKRZ.js} +17 -17
  158. package/dist/{fast-db-init-YDAY7TVI.js → fast-db-init-QQB6IVWV.js} +1 -1
  159. package/dist/{founder-context-CTNPSPVO.js → founder-context-PQR3BUS7.js} +2 -2
  160. package/dist/gateway/index.js +11 -11
  161. package/dist/{git-staleness-FIPWVHRJ.js → git-staleness-UGB5J3K7.js} +2 -2
  162. package/dist/{global-procedures-YT2RDNUD.js → global-procedures-R7KRREEK.js} +3 -3
  163. package/dist/{graph-auto-extract-T63GAUZF.js → graph-auto-extract-LKIQ57PL.js} +4 -4
  164. package/dist/{graph-rag-WAK2BRJH.js → graph-rag-JZZAB7PC.js} +2 -2
  165. package/dist/hooks/bug-report-worker.js +16 -16
  166. package/dist/hooks/codex-stop-task-finalizer.js +16 -16
  167. package/dist/hooks/commit-complete.js +16 -16
  168. package/dist/hooks/error-recall.js +6 -6
  169. package/dist/hooks/exe-heartbeat-hook.js +3 -3
  170. package/dist/hooks/ingest.js +6 -6
  171. package/dist/hooks/instructions-loaded.js +4 -4
  172. package/dist/hooks/manifest.json +19 -19
  173. package/dist/hooks/notification.js +4 -4
  174. package/dist/hooks/post-compact.js +15 -15
  175. package/dist/hooks/post-tool-combined.js +7 -7
  176. package/dist/hooks/pre-compact.js +16 -16
  177. package/dist/hooks/pre-tool-use.js +19 -19
  178. package/dist/hooks/prompt-submit.js +30 -30
  179. package/dist/hooks/session-end.js +20 -20
  180. package/dist/hooks/session-start.js +12 -12
  181. package/dist/hooks/stop.js +19 -19
  182. package/dist/hooks/subagent-stop.js +15 -15
  183. package/dist/hooks/summary-worker.js +19 -19
  184. package/dist/index.js +25 -25
  185. package/dist/{installer-UEPVZPFE.js → installer-MNPXDLGG.js} +6 -6
  186. package/dist/{installer-EGY5GPB7.js → installer-MZWWBXM6.js} +9 -9
  187. package/dist/{installer-MHVZ4RJU.js → installer-SB2N5NKH.js} +9 -9
  188. package/dist/{intercom-queue-NQFQZXQP.js → intercom-queue-VU2G6F5R.js} +15 -13
  189. package/dist/lib/agent-config.js +1 -1
  190. package/dist/lib/cloud-sync.js +12 -10
  191. package/dist/lib/consolidation.js +7 -7
  192. package/dist/lib/crypto.js +5 -1
  193. package/dist/lib/database.js +2 -2
  194. package/dist/lib/db.js +2 -2
  195. package/dist/lib/device-registry.js +1 -1
  196. package/dist/lib/employee-templates.js +4 -4
  197. package/dist/lib/employees.js +2 -2
  198. package/dist/lib/exe-daemon.js +330 -103
  199. package/dist/lib/hybrid-search.js +5 -5
  200. package/dist/lib/identity.js +2 -2
  201. package/dist/lib/license.js +2 -2
  202. package/dist/lib/messaging.js +14 -14
  203. package/dist/lib/registry-proxy.js +1 -1
  204. package/dist/lib/reminders.js +3 -3
  205. package/dist/lib/schedules.js +5 -5
  206. package/dist/lib/session-registry.js +4 -4
  207. package/dist/lib/skill-learning.js +6 -6
  208. package/dist/lib/store.js +4 -4
  209. package/dist/lib/task-router.js +3 -3
  210. package/dist/lib/tasks.js +15 -15
  211. package/dist/lib/tmux-routing.js +13 -13
  212. package/dist/lib/token-spend.js +3 -3
  213. package/dist/{license-gate-WCBZ4EBB.js → license-gate-BYDMFMFT.js} +3 -3
  214. package/dist/{license-sync-N63ORPQY.js → license-sync-N3RNYVP2.js} +2 -2
  215. package/dist/mcp/register-tools.js +70 -68
  216. package/dist/mcp/server.js +73 -71
  217. package/dist/mcp/tools/complete-reminder.js +4 -4
  218. package/dist/mcp/tools/create-reminder.js +4 -4
  219. package/dist/mcp/tools/create-task.js +17 -17
  220. package/dist/mcp/tools/deactivate-behavior.js +7 -7
  221. package/dist/mcp/tools/list-reminders.js +4 -4
  222. package/dist/mcp/tools/list-tasks.js +17 -17
  223. package/dist/mcp/tools/send-message.js +16 -16
  224. package/dist/mcp/tools/update-task.js +16 -16
  225. package/dist/{mcp-http-config-I2XKM6Y6.js → mcp-http-config-EMAVS2JI.js} +3 -3
  226. package/dist/{memory-cards-LJLITM2D.js → memory-cards-TQRLZI4D.js} +4 -4
  227. package/dist/{memory-graph-extractor-WIK2X7NW.js → memory-graph-extractor-IWGNVAFU.js} +5 -5
  228. package/dist/{memory-poisoning-defense-K5ZYLCBS.js → memory-poisoning-defense-T4ITBGSG.js} +2 -2
  229. package/dist/{memory-pressure-watchdog-GAIU4DFY.js → memory-pressure-watchdog-RRIAXPXQ.js} +14 -14
  230. package/dist/{memory-reflection-ERYZ6SJH.js → memory-reflection-6N4J2FL7.js} +2 -2
  231. package/dist/monitor-grants-RZOVSYVO.js +27 -0
  232. package/dist/monitor-identity-MOXISYNG.js +34 -0
  233. package/dist/{notifications-A43CXO7Q.js → notifications-KONB3C62.js} +13 -13
  234. package/dist/{orchestration-events-CRVRCTHR.js → orchestration-events-5SIJOE4H.js} +3 -3
  235. package/dist/{orchestrator-65ZCLW5C.js → orchestrator-DUUX7FQV.js} +15 -15
  236. package/dist/{pipeline-router-VZUIXWWJ.js → pipeline-router-O6HU7DKH.js} +3 -3
  237. package/dist/{plan-limits-QNY6FVQQ.js → plan-limits-GRNBOBB3.js} +5 -5
  238. package/dist/{projection-worker-EASTW4IP.js → projection-worker-ZVOFHTXT.js} +2 -2
  239. package/dist/{prospective-memory-T7Z67MF7.js → prospective-memory-W6S67LZZ.js} +2 -2
  240. package/dist/{reranker-2S766AWB.js → reranker-6UQSZVV2.js} +1 -1
  241. package/dist/{retrieval-health-HQ6JHDTD.js → retrieval-health-TWHKYCRK.js} +1 -1
  242. package/dist/{review-polling-4R7EPAHG.js → review-polling-PCMD5BFN.js} +14 -14
  243. package/dist/runtime/index.js +21 -21
  244. package/dist/{session-events-ZPPOVRDJ.js → session-events-3LCVQEL7.js} +14 -14
  245. package/dist/{session-kill-telemetry-BEAPGQEF.js → session-kill-telemetry-CZSPN5V6.js} +14 -14
  246. package/dist/{session-scope-B6Y2VP75.js → session-scope-CFHVSVAQ.js} +13 -13
  247. package/dist/{setup-wizard-X6HICSAF.js → setup-wizard-CJZMM43G.js} +1 -1
  248. package/dist/{skill-refinement-XYACEWES.js → skill-refinement-74T6VDFM.js} +3 -3
  249. package/dist/{stack-release-3AF7TQ5N.js → stack-release-XXMV7SPX.js} +40 -3
  250. package/dist/{stack-update-4JALV4DZ.js → stack-update-E2TKHHSQ.js} +3 -3
  251. package/dist/{steward-gate-WGP4QWXQ.js → steward-gate-WT7WXQIE.js} +3 -3
  252. package/dist/{task-enforcement-WFHEKFC3.js → task-enforcement-VI7L43DC.js} +14 -14
  253. package/dist/{task-scope-VMYGYVCH.js → task-scope-CQEG5SSJ.js} +13 -13
  254. package/dist/{tasks-crud-ELQ2JSRG.js → tasks-crud-UGK5A25L.js} +13 -13
  255. package/dist/{tasks-notify-R6KGKW5R.js → tasks-notify-SMLDFBWM.js} +14 -14
  256. package/dist/{tasks-review-E3YTGOFJ.js → tasks-review-JKBRACII.js} +13 -13
  257. package/dist/{telemetry-upload-RDJX4ZFD.js → telemetry-upload-7LBYGPCB.js} +7 -7
  258. package/dist/{token-budget-XZVEGHCT.js → token-budget-QBRJR4M5.js} +3 -3
  259. package/dist/{tool-telemetry-OQ423YOE.js → tool-telemetry-ULIDUK3P.js} +1 -1
  260. package/dist/tui/App.js +21 -21
  261. package/dist/{tui-data-7UMFG6GY.js → tui-data-NPTGKT37.js} +13 -13
  262. package/dist/{worker-gate-QENGURPJ.js → worker-gate-MXUQUG4M.js} +1 -1
  263. package/dist/{workflow-engine-HUSIWUSV.js → workflow-engine-EWCOLD47.js} +2 -2
  264. package/dist/{worktree-EZ3EZUOV.js → worktree-GVF2I5FP.js} +4 -4
  265. package/dist/{worktree-sweep-O2UXISLE.js → worktree-sweep-ZAG3V24E.js} +5 -5
  266. package/package.json +4 -3
  267. package/release-notes.json +28 -20
  268. package/dist/chunk-LO6L5ADL.js +0 -76
  269. package/dist/{chunk-DFJVHZ6Z.js → chunk-5Z5NATNS.js} +0 -0
  270. package/dist/{chunk-7UMCQQWS.js → chunk-A4DVMPYB.js} +3 -3
  271. /package/dist/{chunk-5KCRWAWF.js → chunk-ATOU6CYR.js} +0 -0
  272. /package/dist/{chunk-KK64O2G4.js → chunk-D3QASX2W.js} +0 -0
  273. /package/dist/{chunk-GOAPKDWS.js → chunk-HHIBOU3P.js} +0 -0
  274. /package/dist/{chunk-F6VD2OWU.js → chunk-IYB2NIW3.js} +0 -0
  275. /package/dist/{chunk-XETUG5DN.js → chunk-KTPG4XKI.js} +0 -0
  276. /package/dist/{chunk-LUO2MYQH.js → chunk-NQBRGXYR.js} +0 -0
  277. /package/dist/{chunk-IO3Z2JBX.js → chunk-QLFRCA6I.js} +0 -0
  278. /package/dist/{chunk-HHFQRC3F.js → chunk-TNJRWUCE.js} +0 -0
  279. /package/dist/{chunk-JIE4ZUMV.js → chunk-UFAXZ2PY.js} +0 -0
  280. /package/dist/{chunk-TBRNCEV4.js → chunk-UNVHIH7N.js} +0 -0
  281. /package/dist/{chunk-OG5CXUHI.js → chunk-Z7OZP3ET.js} +0 -0
  282. /package/dist/{core-memory-V2Q5G7CJ.js → core-memory-VO5ZIBKH.js} +0 -0
  283. /package/dist/{oauth-server-MLE5MGQO.js → oauth-server-ROQFOEMM.js} +0 -0
  284. /package/dist/{project-boot-27QXVGY3.js → project-boot-SD7GM24K.js} +0 -0
  285. /package/dist/{wiki-acl-NZMJUJGL.js → wiki-acl-JA5UCQZ4.js} +0 -0
@@ -0,0 +1,113 @@
1
+ import {
2
+ getMasterKey
3
+ } from "./chunk-Z42MXYWW.js";
4
+
5
+ // src/lib/monitor-identity.ts
6
+ import crypto from "crypto";
7
+ var MONITOR_HKDF_INFO = "exe-os-monitor-x25519-v1";
8
+ var ENVELOPE_WRAP_INFO = "exe-os-envelope-v1";
9
+ var X25519_PKCS8_PREFIX = Buffer.from("302e020100300506032b656e04220420", "hex");
10
+ var X25519_SPKI_PREFIX = Buffer.from("302a300506032b656e032100", "hex");
11
+ var _cachedIdentity = null;
12
+ function privateKeyFromScalar(seed) {
13
+ if (seed.length !== 32) {
14
+ throw new Error(`X25519 scalar must be 32 bytes, got ${seed.length}`);
15
+ }
16
+ return crypto.createPrivateKey({
17
+ key: Buffer.concat([X25519_PKCS8_PREFIX, seed]),
18
+ format: "der",
19
+ type: "pkcs8"
20
+ });
21
+ }
22
+ function publicKeyFromRaw(pub) {
23
+ if (pub.length !== 32) {
24
+ throw new Error(`X25519 public key must be 32 bytes, got ${pub.length}`);
25
+ }
26
+ return crypto.createPublicKey({
27
+ key: Buffer.concat([X25519_SPKI_PREFIX, pub]),
28
+ format: "der",
29
+ type: "spki"
30
+ });
31
+ }
32
+ function exportRawPublicKey(pubObj) {
33
+ const jwk = pubObj.export({ format: "jwk" });
34
+ if (!jwk.x) throw new Error("X25519 public key has no JWK 'x' component");
35
+ return Buffer.from(jwk.x, "base64url");
36
+ }
37
+ function deriveMonitorIdentityFromMaster(master) {
38
+ if (master.length !== 32) {
39
+ throw new Error(`Master key must be 32 bytes, got ${master.length}`);
40
+ }
41
+ const seed = Buffer.from(crypto.hkdfSync("sha256", master, "", MONITOR_HKDF_INFO, 32));
42
+ const priv = privateKeyFromScalar(seed);
43
+ const publicKey = exportRawPublicKey(crypto.createPublicKey(priv));
44
+ return { publicKey, privateKey: seed };
45
+ }
46
+ function pubKeyHash(publicKey) {
47
+ return crypto.createHash("sha256").update(publicKey).digest().subarray(0, 8);
48
+ }
49
+ function isValidX25519Recipient(pub) {
50
+ if (pub.length !== 32) return false;
51
+ if (pub.every((b) => b === 0)) return false;
52
+ try {
53
+ const throwaway = crypto.generateKeyPairSync("x25519");
54
+ const shared = crypto.diffieHellman({
55
+ privateKey: throwaway.privateKey,
56
+ publicKey: publicKeyFromRaw(pub)
57
+ });
58
+ if (shared.every((b) => b === 0)) return false;
59
+ return true;
60
+ } catch {
61
+ return false;
62
+ }
63
+ }
64
+ async function deriveMonitorIdentity() {
65
+ if (_cachedIdentity) return _cachedIdentity;
66
+ const master = await getMasterKey();
67
+ if (!master) {
68
+ throw new Error("Master key not available \u2014 cannot derive monitor identity");
69
+ }
70
+ _cachedIdentity = deriveMonitorIdentityFromMaster(master);
71
+ return _cachedIdentity;
72
+ }
73
+ function getCachedMonitorIdentity() {
74
+ return _cachedIdentity;
75
+ }
76
+ async function getMonitorPublicKeyB64() {
77
+ const id = await deriveMonitorIdentity();
78
+ return id.publicKey.toString("base64");
79
+ }
80
+ function deriveEnvelopeWrapKeyForRecipient(recipientPub) {
81
+ const recipientKeyObj = publicKeyFromRaw(recipientPub);
82
+ const eph = crypto.generateKeyPairSync("x25519");
83
+ const shared = crypto.diffieHellman({ privateKey: eph.privateKey, publicKey: recipientKeyObj });
84
+ const wrapKey = Buffer.from(crypto.hkdfSync("sha256", shared, "", ENVELOPE_WRAP_INFO, 32));
85
+ const ephemeralPublicKey = exportRawPublicKey(eph.publicKey);
86
+ return { ephemeralPublicKey, wrapKey };
87
+ }
88
+ function recomputeEnvelopeWrapKey(privateScalar, ephemeralPub) {
89
+ const priv = privateKeyFromScalar(privateScalar);
90
+ const ephObj = publicKeyFromRaw(ephemeralPub);
91
+ const shared = crypto.diffieHellman({ privateKey: priv, publicKey: ephObj });
92
+ return Buffer.from(crypto.hkdfSync("sha256", shared, "", ENVELOPE_WRAP_INFO, 32));
93
+ }
94
+ function _resetMonitorIdentityCache() {
95
+ _cachedIdentity = null;
96
+ }
97
+
98
+ export {
99
+ MONITOR_HKDF_INFO,
100
+ ENVELOPE_WRAP_INFO,
101
+ privateKeyFromScalar,
102
+ publicKeyFromRaw,
103
+ exportRawPublicKey,
104
+ deriveMonitorIdentityFromMaster,
105
+ pubKeyHash,
106
+ isValidX25519Recipient,
107
+ deriveMonitorIdentity,
108
+ getCachedMonitorIdentity,
109
+ getMonitorPublicKeyB64,
110
+ deriveEnvelopeWrapKeyForRecipient,
111
+ recomputeEnvelopeWrapKey,
112
+ _resetMonitorIdentityCache
113
+ };
@@ -1,28 +1,30 @@
1
1
  import {
2
2
  getGitRoot,
3
3
  isWorktreeDirty
4
- } from "./chunk-SKFA42EO.js";
4
+ } from "./chunk-B76TSEP3.js";
5
5
 
6
6
  // src/lib/worktree-sweep.ts
7
- import { execFileSync } from "child_process";
7
+ import { execFile } from "child_process";
8
+ import { promisify } from "util";
8
9
  import { existsSync, readdirSync, readFileSync, statSync } from "fs";
9
10
  import path from "path";
11
+ var execFileAsync = promisify(execFile);
10
12
  var GIT_TIMEOUT_MS = 1e4;
11
13
  var DIRTY_ORPHAN_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
12
- function isWorktreeUnpushed(wtPath, branch) {
14
+ async function isWorktreeUnpushed(wtPath, branch) {
13
15
  if (!branch) return false;
14
16
  try {
15
- const remote = execFileSync("git", ["-C", wtPath, "rev-parse", "--abbrev-ref", `${branch}@{upstream}`], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS, stdio: ["pipe", "pipe", "ignore"] }).trim();
17
+ const remote = (await execFileAsync("git", ["-C", wtPath, "rev-parse", "--abbrev-ref", `${branch}@{upstream}`], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS })).stdout.trim();
16
18
  if (!remote) return true;
17
- const ahead = execFileSync("git", ["-C", wtPath, "rev-list", `${remote}..${branch}`, "--count"], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS, stdio: ["pipe", "pipe", "ignore"] }).trim();
19
+ const ahead = (await execFileAsync("git", ["-C", wtPath, "rev-list", `${remote}..${branch}`, "--count"], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS })).stdout.trim();
18
20
  return parseInt(ahead, 10) > 0;
19
21
  } catch {
20
22
  try {
21
23
  let ahead = "";
22
24
  try {
23
- ahead = execFileSync("git", ["-C", wtPath, "rev-list", `main..${branch}`, "--count"], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS, stdio: ["pipe", "pipe", "ignore"] }).trim();
25
+ ahead = (await execFileAsync("git", ["-C", wtPath, "rev-list", `main..${branch}`, "--count"], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS })).stdout.trim();
24
26
  } catch {
25
- ahead = execFileSync("git", ["-C", wtPath, "rev-list", `master..${branch}`, "--count"], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS, stdio: ["pipe", "pipe", "ignore"] }).trim();
27
+ ahead = (await execFileAsync("git", ["-C", wtPath, "rev-list", `master..${branch}`, "--count"], { encoding: "utf-8", timeout: GIT_TIMEOUT_MS })).stdout.trim();
26
28
  }
27
29
  return parseInt(ahead, 10) > 0;
28
30
  } catch {
@@ -83,13 +85,12 @@ function discoverRepoPaths() {
83
85
  }
84
86
  return roots;
85
87
  }
86
- function listWorktrees(repoRoot) {
88
+ async function listWorktrees(repoRoot) {
87
89
  try {
88
- const output = execFileSync("git", ["worktree", "list", "--porcelain"], {
90
+ const { stdout: output } = await execFileAsync("git", ["worktree", "list", "--porcelain"], {
89
91
  cwd: repoRoot,
90
92
  encoding: "utf8",
91
- timeout: GIT_TIMEOUT_MS,
92
- stdio: ["pipe", "pipe", "pipe"]
93
+ timeout: GIT_TIMEOUT_MS
93
94
  });
94
95
  const worktrees = [];
95
96
  let currentPath = "";
@@ -107,14 +108,13 @@ function listWorktrees(repoRoot) {
107
108
  return [];
108
109
  }
109
110
  }
110
- function detectMainBranch(repoRoot) {
111
+ async function detectMainBranch(repoRoot) {
111
112
  for (const candidate of ["main", "master"]) {
112
113
  try {
113
- execFileSync("git", ["rev-parse", "--verify", `refs/heads/${candidate}`], {
114
+ await execFileAsync("git", ["rev-parse", "--verify", `refs/heads/${candidate}`], {
114
115
  cwd: repoRoot,
115
116
  encoding: "utf8",
116
- timeout: GIT_TIMEOUT_MS,
117
- stdio: ["pipe", "pipe", "pipe"]
117
+ timeout: GIT_TIMEOUT_MS
118
118
  });
119
119
  return candidate;
120
120
  } catch {
@@ -122,26 +122,24 @@ function detectMainBranch(repoRoot) {
122
122
  }
123
123
  return null;
124
124
  }
125
- function isBranchMerged(repoRoot, branch, into) {
125
+ async function isBranchMerged(repoRoot, branch, into) {
126
126
  try {
127
- const merged = execFileSync("git", ["branch", "--merged", into], {
127
+ const { stdout: merged } = await execFileAsync("git", ["branch", "--merged", into], {
128
128
  cwd: repoRoot,
129
129
  encoding: "utf8",
130
- timeout: GIT_TIMEOUT_MS,
131
- stdio: ["pipe", "pipe", "pipe"]
130
+ timeout: GIT_TIMEOUT_MS
132
131
  });
133
132
  return merged.split("\n").map((l) => l.replace(/^[*+]?\s+/, "").trim()).includes(branch);
134
133
  } catch {
135
134
  return false;
136
135
  }
137
136
  }
138
- function hasLiveTmuxSession(agentName) {
137
+ async function hasLiveTmuxSession(agentName) {
139
138
  try {
140
- const sessions = execFileSync("tmux", ["list-sessions", "-F", "#S"], {
139
+ const sessions = (await execFileAsync("tmux", ["list-sessions", "-F", "#S"], {
141
140
  encoding: "utf8",
142
- timeout: 5e3,
143
- stdio: ["pipe", "pipe", "ignore"]
144
- }).trim();
141
+ timeout: 5e3
142
+ })).stdout.trim();
145
143
  if (!sessions) return false;
146
144
  for (const session of sessions.split("\n")) {
147
145
  const agentPart = session.split("-")[0];
@@ -154,71 +152,65 @@ function hasLiveTmuxSession(agentName) {
154
152
  return false;
155
153
  }
156
154
  }
157
- function removeWorktree(repoRoot, wtPath) {
155
+ async function removeWorktree(repoRoot, wtPath) {
158
156
  try {
159
- execFileSync("git", ["worktree", "remove", wtPath, "--force"], {
157
+ await execFileAsync("git", ["worktree", "remove", wtPath, "--force"], {
160
158
  cwd: repoRoot,
161
159
  encoding: "utf8",
162
- timeout: GIT_TIMEOUT_MS,
163
- stdio: ["pipe", "pipe", "pipe"]
160
+ timeout: GIT_TIMEOUT_MS
164
161
  });
165
162
  return true;
166
163
  } catch {
167
164
  return false;
168
165
  }
169
166
  }
170
- function deleteBranch(repoRoot, branch) {
167
+ async function deleteBranch(repoRoot, branch) {
171
168
  try {
172
- execFileSync("git", ["branch", "-D", branch], {
169
+ await execFileAsync("git", ["branch", "-D", branch], {
173
170
  cwd: repoRoot,
174
171
  encoding: "utf8",
175
- timeout: GIT_TIMEOUT_MS,
176
- stdio: ["pipe", "pipe", "pipe"]
172
+ timeout: GIT_TIMEOUT_MS
177
173
  });
178
174
  return true;
179
175
  } catch {
180
176
  return false;
181
177
  }
182
178
  }
183
- function deleteRemoteBranch(repoRoot, branch) {
179
+ async function deleteRemoteBranch(repoRoot, branch) {
184
180
  try {
185
- execFileSync("git", ["push", "origin", "--delete", branch], {
181
+ await execFileAsync("git", ["push", "origin", "--delete", branch], {
186
182
  cwd: repoRoot,
187
183
  encoding: "utf8",
188
- timeout: 15e3,
189
- stdio: ["pipe", "pipe", "pipe"]
184
+ timeout: 15e3
190
185
  });
191
186
  return true;
192
187
  } catch {
193
188
  return false;
194
189
  }
195
190
  }
196
- function pruneWorktreeRegistry(repoRoot) {
191
+ async function pruneWorktreeRegistry(repoRoot) {
197
192
  try {
198
- execFileSync("git", ["worktree", "prune"], {
193
+ await execFileAsync("git", ["worktree", "prune"], {
199
194
  cwd: repoRoot,
200
195
  encoding: "utf8",
201
- timeout: GIT_TIMEOUT_MS,
202
- stdio: ["pipe", "pipe", "pipe"]
196
+ timeout: GIT_TIMEOUT_MS
203
197
  });
204
198
  } catch {
205
199
  }
206
200
  }
207
- function clearStashes(repoRoot) {
201
+ async function clearStashes(repoRoot) {
208
202
  try {
209
- const stashList = execFileSync("git", ["stash", "list"], {
203
+ const stashList = (await execFileAsync("git", ["stash", "list"], {
210
204
  cwd: repoRoot,
211
205
  encoding: "utf8",
212
- timeout: GIT_TIMEOUT_MS,
213
- stdio: ["pipe", "pipe", "pipe"]
214
- }).trim();
206
+ timeout: GIT_TIMEOUT_MS
207
+ })).stdout.trim();
215
208
  if (!stashList) return 0;
216
209
  const count = stashList.split("\n").length;
217
- execFileSync("git", ["stash", "clear"], {
210
+ await execFileAsync("git", ["stash", "clear"], {
218
211
  cwd: repoRoot,
219
212
  encoding: "utf8",
220
- timeout: GIT_TIMEOUT_MS,
221
- stdio: ["pipe", "pipe", "pipe"]
213
+ timeout: GIT_TIMEOUT_MS
222
214
  });
223
215
  return count;
224
216
  } catch {
@@ -237,21 +229,19 @@ function getDirMtimeMs(dirPath) {
237
229
  return null;
238
230
  }
239
231
  }
240
- function archiveDirtyWorktree(wtPath, agentName) {
232
+ async function archiveDirtyWorktree(wtPath, agentName) {
241
233
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
242
234
  const quarantineBranch = `quarantine/${agentName}-${timestamp}`;
243
235
  try {
244
- execFileSync("git", ["-C", wtPath, "checkout", "-b", quarantineBranch], {
236
+ await execFileAsync("git", ["-C", wtPath, "checkout", "-b", quarantineBranch], {
245
237
  encoding: "utf8",
246
- timeout: GIT_TIMEOUT_MS,
247
- stdio: ["pipe", "pipe", "pipe"]
238
+ timeout: GIT_TIMEOUT_MS
248
239
  });
249
- execFileSync("git", ["-C", wtPath, "add", "-A"], {
240
+ await execFileAsync("git", ["-C", wtPath, "add", "-A"], {
250
241
  encoding: "utf8",
251
- timeout: GIT_TIMEOUT_MS,
252
- stdio: ["pipe", "pipe", "pipe"]
242
+ timeout: GIT_TIMEOUT_MS
253
243
  });
254
- execFileSync("git", [
244
+ await execFileAsync("git", [
255
245
  "-C",
256
246
  wtPath,
257
247
  "commit",
@@ -264,7 +254,6 @@ Archived by worktree-sweep after ${DIRTY_ORPHAN_MAX_AGE_MS / 864e5}-day dirty or
264
254
  ], {
265
255
  encoding: "utf8",
266
256
  timeout: GIT_TIMEOUT_MS,
267
- stdio: ["pipe", "pipe", "pipe"],
268
257
  env: {
269
258
  ...process.env,
270
259
  GIT_AUTHOR_NAME: "exe-os daemon",
@@ -296,16 +285,16 @@ async function sweepWorktrees(options = {}) {
296
285
  if (!repoRoot) continue;
297
286
  result.reposScanned++;
298
287
  const repoName = path.basename(repoRoot);
299
- const mainBranch = detectMainBranch(repoRoot);
288
+ const mainBranch = await detectMainBranch(repoRoot);
300
289
  if (!dryRun) {
301
- pruneWorktreeRegistry(repoRoot);
290
+ await pruneWorktreeRegistry(repoRoot);
302
291
  }
303
- const worktrees = listWorktrees(repoRoot);
292
+ const worktrees = await listWorktrees(repoRoot);
304
293
  for (const wt of worktrees) {
305
294
  if (!wt.path.includes("/.worktrees/")) continue;
306
295
  const agentName = parseAgentName(wt.path);
307
296
  const wtName = path.basename(wt.path);
308
- if (agentName && hasLiveTmuxSession(agentName)) {
297
+ if (agentName && await hasLiveTmuxSession(agentName)) {
309
298
  result.skipped.push({
310
299
  repo: repoName,
311
300
  worktree: wtName,
@@ -323,7 +312,7 @@ async function sweepWorktrees(options = {}) {
323
312
  `[worktree-sweep] Dirty orphan aged out (${ageD}d), archiving: ${repoName}/.worktrees/${wtName}
324
313
  `
325
314
  );
326
- const archived = archiveDirtyWorktree(wt.path, agentName);
315
+ const archived = await archiveDirtyWorktree(wt.path, agentName);
327
316
  if (archived) {
328
317
  } else {
329
318
  result.skipped.push({
@@ -352,7 +341,7 @@ async function sweepWorktrees(options = {}) {
352
341
  continue;
353
342
  }
354
343
  }
355
- if (existsSync(wt.path) && isWorktreeUnpushed(wt.path, wt.branch)) {
344
+ if (existsSync(wt.path) && await isWorktreeUnpushed(wt.path, wt.branch)) {
356
345
  result.skipped.push({
357
346
  repo: repoName,
358
347
  worktree: wtName,
@@ -361,7 +350,7 @@ async function sweepWorktrees(options = {}) {
361
350
  });
362
351
  continue;
363
352
  }
364
- const isMerged = mainBranch ? isBranchMerged(repoRoot, wt.branch, mainBranch) : false;
353
+ const isMerged = mainBranch ? await isBranchMerged(repoRoot, wt.branch, mainBranch) : false;
365
354
  if (dryRun) {
366
355
  result.removed.push({ repo: repoName, worktree: wtName, branch: wt.branch });
367
356
  if (isMerged || !mainBranch) {
@@ -371,7 +360,7 @@ async function sweepWorktrees(options = {}) {
371
360
  }
372
361
  continue;
373
362
  }
374
- const removed = removeWorktree(repoRoot, wt.path);
363
+ const removed = await removeWorktree(repoRoot, wt.path);
375
364
  if (!removed) {
376
365
  result.errors.push(`${repoName}: failed to remove worktree ${wtName}`);
377
366
  continue;
@@ -379,17 +368,17 @@ async function sweepWorktrees(options = {}) {
379
368
  result.removed.push({ repo: repoName, worktree: wtName, branch: wt.branch });
380
369
  process.stderr.write(`[worktree-sweep] Removed ${repoName}/.worktrees/${wtName} (branch: ${wt.branch})
381
370
  `);
382
- const localDeleted = deleteBranch(repoRoot, wt.branch);
371
+ const localDeleted = await deleteBranch(repoRoot, wt.branch);
383
372
  let remoteDeleted = false;
384
373
  if (localDeleted) {
385
- remoteDeleted = deleteRemoteBranch(repoRoot, wt.branch);
374
+ remoteDeleted = await deleteRemoteBranch(repoRoot, wt.branch);
386
375
  }
387
376
  if (localDeleted) {
388
377
  result.branchesDeleted.push({ repo: repoName, branch: wt.branch, remote: remoteDeleted });
389
378
  }
390
379
  }
391
380
  if (!dryRun) {
392
- const cleared = clearStashes(repoRoot);
381
+ const cleared = await clearStashes(repoRoot);
393
382
  if (cleared > 0) {
394
383
  result.stashesCleared += cleared;
395
384
  process.stderr.write(`[worktree-sweep] Cleared ${cleared} stash(es) in ${repoName}
@@ -397,12 +386,12 @@ async function sweepWorktrees(options = {}) {
397
386
  }
398
387
  }
399
388
  if (!dryRun) {
400
- pruneWorktreeRegistry(repoRoot);
389
+ await pruneWorktreeRegistry(repoRoot);
401
390
  }
402
391
  }
403
392
  return result;
404
393
  }
405
- function cleanupAgentWorktree(repoRoot, agentName) {
394
+ async function cleanupAgentWorktree(repoRoot, agentName) {
406
395
  const worktreesDir = path.join(repoRoot, ".worktrees");
407
396
  if (!existsSync(worktreesDir)) return "";
408
397
  const notes = [];
@@ -413,20 +402,20 @@ function cleanupAgentWorktree(repoRoot, agentName) {
413
402
  const agentBase = agentName.replace(/\d+$/, "") || agentName;
414
403
  if (baseName !== agentBase) continue;
415
404
  const wtPath = path.join(worktreesDir, entry);
416
- const branch = getWorktreeBranch(repoRoot, wtPath);
405
+ const branch = await getWorktreeBranch(repoRoot, wtPath);
417
406
  if (isWorktreeDirty(wtPath)) {
418
407
  notes.push(`Worktree .worktrees/${entry} has uncommitted changes \u2014 preserved`);
419
408
  continue;
420
409
  }
421
- if (isWorktreeUnpushed(wtPath, branch)) {
410
+ if (await isWorktreeUnpushed(wtPath, branch)) {
422
411
  notes.push(`Worktree .worktrees/${entry} has unpushed commits \u2014 preserved`);
423
412
  continue;
424
413
  }
425
- if (removeWorktree(repoRoot, wtPath)) {
414
+ if (await removeWorktree(repoRoot, wtPath)) {
426
415
  notes.push(`Removed worktree .worktrees/${entry}`);
427
- if (branch && deleteBranch(repoRoot, branch)) {
416
+ if (branch && await deleteBranch(repoRoot, branch)) {
428
417
  notes.push(`Deleted branch ${branch}`);
429
- if (deleteRemoteBranch(repoRoot, branch)) {
418
+ if (await deleteRemoteBranch(repoRoot, branch)) {
430
419
  notes.push(`Deleted remote branch ${branch}`);
431
420
  }
432
421
  }
@@ -434,12 +423,12 @@ function cleanupAgentWorktree(repoRoot, agentName) {
434
423
  }
435
424
  } catch {
436
425
  }
437
- pruneWorktreeRegistry(repoRoot);
426
+ await pruneWorktreeRegistry(repoRoot);
438
427
  return notes.join("\n");
439
428
  }
440
- function getWorktreeBranch(repoRoot, wtPath) {
429
+ async function getWorktreeBranch(repoRoot, wtPath) {
441
430
  try {
442
- const worktrees = listWorktrees(repoRoot);
431
+ const worktrees = await listWorktrees(repoRoot);
443
432
  for (const wt of worktrees) {
444
433
  if (wt.path === wtPath) return wt.branch;
445
434
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatDegradations,
3
3
  getRetrievalHealth
4
- } from "./chunk-F6VD2OWU.js";
4
+ } from "./chunk-IYB2NIW3.js";
5
5
  import {
6
6
  buildRestartReport,
7
7
  formatRestartReport
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-OTVEIJUQ.js";
17
17
  import {
18
18
  offloadReadIfMain
19
- } from "./chunk-XZHA3WO2.js";
19
+ } from "./chunk-HEPR6QTL.js";
20
20
  import {
21
21
  isMainModule
22
22
  } from "./chunk-6Y4B3QF6.js";
@@ -959,7 +959,7 @@ function formatReport(report, flags) {
959
959
  return lines.join("\n");
960
960
  }
961
961
  async function fixNullVectors() {
962
- const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-QENGURPJ.js");
962
+ const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-MXUQUG4M.js");
963
963
  if (!tryAcquireWorkerSlot()) {
964
964
  process.stderr.write("[exe-doctor] Worker gate full \u2014 waiting for existing backfill workers to finish\n");
965
965
  await new Promise((r) => setTimeout(r, 5e3));
@@ -1144,7 +1144,7 @@ async function main(argv = process.argv.slice(2)) {
1144
1144
  console.log(formatRestartReport(restartReport));
1145
1145
  return emptyAuditReport();
1146
1146
  }
1147
- const { fastDbInit } = await import("./fast-db-init-YDAY7TVI.js");
1147
+ const { fastDbInit } = await import("./fast-db-init-QQB6IVWV.js");
1148
1148
  const client = await fastDbInit();
1149
1149
  const report = await runAudit(client, flags);
1150
1150
  console.log(formatReport(report, flags));
@@ -1155,7 +1155,7 @@ ${mode} Applying repairs...
1155
1155
  `);
1156
1156
  if (!flags.dryRun) {
1157
1157
  try {
1158
- const { createBackup } = await import("./db-backup-CXNB2ZAG.js");
1158
+ const { createBackup } = await import("./db-backup-DLD4QZBO.js");
1159
1159
  const backupPath = await createBackup("pre-fix");
1160
1160
  if (backupPath) {
1161
1161
  console.log(` Backup created: ${backupPath.split("/").pop()}`);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-XZHA3WO2.js";
3
+ } from "./chunk-HEPR6QTL.js";
4
4
  import {
5
5
  loadConfig
6
6
  } from "./chunk-7Y5UDEVM.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clean,
3
3
  stableId
4
- } from "./chunk-KK64O2G4.js";
4
+ } from "./chunk-D3QASX2W.js";
5
5
 
6
6
  // src/lib/reflection-checkpoints.ts
7
7
  function parsePayload(payload) {
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  recordSessionKill
3
- } from "./chunk-MZ222PUT.js";
3
+ } from "./chunk-T4KZ2Z2N.js";
4
4
  import {
5
5
  sessionScopeFilter,
6
6
  verifyPaneAtCapacity,
7
7
  writeNotification
8
- } from "./chunk-ROAUSSJI.js";
8
+ } from "./chunk-PLRIJALF.js";
9
9
  import {
10
10
  listSessions
11
- } from "./chunk-QIJEW462.js";
11
+ } from "./chunk-UIV2WPBT.js";
12
12
  import {
13
13
  getTransport
14
14
  } from "./chunk-RMOBQ6A5.js";
15
15
  import {
16
16
  recordOrchestrationEventBestEffort
17
- } from "./chunk-X7BGMYZS.js";
17
+ } from "./chunk-FUIIVSW6.js";
18
18
  import {
19
19
  getClient,
20
20
  isCoordinatorName
21
- } from "./chunk-XZHA3WO2.js";
21
+ } from "./chunk-HEPR6QTL.js";
22
22
 
23
23
  // src/lib/capacity-monitor.ts
24
24
  var CAPACITY_PATTERNS = [
@@ -297,12 +297,6 @@ async function pollCapacityDead() {
297
297
  continue;
298
298
  }
299
299
  try {
300
- transport.kill(windowName);
301
- void recordSessionKill({
302
- sessionName: windowName,
303
- agentId,
304
- reason: "capacity"
305
- });
306
300
  const client = getClient();
307
301
  const dashIdx = windowName.indexOf("-");
308
302
  const derivedScope = dashIdx >= 0 ? windowName.slice(dashIdx + 1) : null;
@@ -330,6 +324,14 @@ async function pollCapacityDead() {
330
324
  openTasks.rows,
331
325
  derivedScope
332
326
  );
327
+ const cacheKey = derivedScope ? `${agentId}::${derivedScope}` : agentId;
328
+ _lastRelaunch.set(cacheKey, Date.now());
329
+ transport.kill(windowName);
330
+ void recordSessionKill({
331
+ sessionName: windowName,
332
+ agentId,
333
+ reason: "capacity"
334
+ });
333
335
  if (created) {
334
336
  await writeNotification({
335
337
  agentId: "system",
@@ -339,8 +341,6 @@ async function pollCapacityDead() {
339
341
  summary: `${agentId} hit context capacity. Auto-relaunched with ${openTasks.rows.length} open task(s).`
340
342
  });
341
343
  }
342
- const cacheKey = derivedScope ? `${agentId}::${derivedScope}` : agentId;
343
- _lastRelaunch.set(cacheKey, Date.now());
344
344
  if (created) relaunched.push(agentId);
345
345
  } catch (err) {
346
346
  process.stderr.write(
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  updateTask
3
- } from "./chunk-NCS7UNML.js";
3
+ } from "./chunk-542EWGY3.js";
4
4
  import {
5
5
  TASK_ALREADY_CLAIMED_PREFIX
6
- } from "./chunk-ROAUSSJI.js";
6
+ } from "./chunk-PLRIJALF.js";
7
7
  import {
8
8
  getAgentContext
9
9
  } from "./chunk-GJV3WDWM.js";
10
10
  import {
11
11
  isCoordinatorName
12
- } from "./chunk-XZHA3WO2.js";
12
+ } from "./chunk-HEPR6QTL.js";
13
13
 
14
14
  // src/mcp/tools/update-task.ts
15
15
  import { z } from "zod";
@@ -63,7 +63,7 @@ function registerUpdateTask(server) {
63
63
  let callerAgentId;
64
64
  let callerSession;
65
65
  try {
66
- const { getActiveAgent: getAgent } = await import("./active-agent-IM37G7MO.js");
66
+ const { getActiveAgent: getAgent } = await import("./active-agent-EC6M7KTX.js");
67
67
  callerAgentId = getAgent().agentId;
68
68
  callerSession = resolveCallerSessionForUpdate();
69
69
  } catch {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  getActiveAgent
3
- } from "./chunk-YBVKLDT3.js";
3
+ } from "./chunk-DZ6OQM67.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-ROAUSSJI.js";
6
+ } from "./chunk-PLRIJALF.js";
7
7
  import {
8
8
  getAgentContext
9
9
  } from "./chunk-GJV3WDWM.js";
10
10
  import {
11
11
  isCoordinatorName
12
- } from "./chunk-XZHA3WO2.js";
12
+ } from "./chunk-HEPR6QTL.js";
13
13
 
14
14
  // src/mcp/tools/list-tasks.ts
15
15
  import { z } from "zod";
@@ -3,12 +3,12 @@ import {
3
3
  getClient,
4
4
  isInitialized,
5
5
  loadEmployees
6
- } from "./chunk-XZHA3WO2.js";
6
+ } from "./chunk-HEPR6QTL.js";
7
7
  import {
8
8
  PLAN_LIMITS,
9
9
  checkLicense,
10
10
  isFeatureAllowed
11
- } from "./chunk-P6OW236E.js";
11
+ } from "./chunk-XACL67CS.js";
12
12
  import {
13
13
  EXE_AI_DIR
14
14
  } from "./chunk-7Y5UDEVM.js";