@askexenow/exe-os 0.9.372 → 0.9.374

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 (470) hide show
  1. package/deploy/compose/.env.customer.example +45 -10
  2. package/deploy/compose/.env.example +46 -9
  3. package/deploy/compose/docker-compose.yml +136 -18
  4. package/deploy/compose/generate-env.ts +142 -34
  5. package/deploy/compose/sso-edge/default.conf.template +78 -7
  6. package/deploy/compose/sso-edge/sso-redirect.conf +109 -13
  7. package/deploy/stack-manifests/v0.9.30-apps.json +1 -1
  8. package/deploy/stack-manifests/v0.9.json +4 -4
  9. package/dist/.dist-verified.json +3 -3
  10. package/dist/{active-agent-GRT5MKD5.js → active-agent-ONPPEWQV.js} +7 -6
  11. package/dist/{active-agent-L2ZSSXDK.js → active-agent-UJKMG7LJ.js} +7 -6
  12. package/dist/{agent-defs-generator-M4ZNYIVX.js → agent-defs-generator-ZWI6DXOE.js} +6 -5
  13. package/dist/{agent-loop-FOK2IRZQ.js → agent-loop-OYHJKNYH.js} +1 -1
  14. package/dist/{agentic-ontology-DMPRDEUX.js → agentic-ontology-WHFJ3QFS.js} +1 -1
  15. package/dist/{artifact-backup-767STHSW.js → artifact-backup-WXZNB7KE.js} +2 -1
  16. package/dist/{backfill-gate-VX2RZTQV.js → backfill-gate-KWJQ35YX.js} +3 -2
  17. package/dist/{backfill-metadata-ZMEHJQ5M.js → backfill-metadata-3OUSQD5V.js} +8 -7
  18. package/dist/{background-jobs-LTPWCMA3.js → background-jobs-6VMD55PK.js} +3 -2
  19. package/dist/{backup-verify-EX2K732J.js → backup-verify-ZKTUYLTA.js} +4 -3
  20. package/dist/{behavior-injection-22AGMS25.js → behavior-injection-M6UYZCMW.js} +17 -15
  21. package/dist/{behaviors-DVFXAWF5.js → behaviors-ZJ45TFBJ.js} +21 -13
  22. package/dist/bin/age-ontology-load.js +3 -2
  23. package/dist/bin/agentic-ontology-backfill.js +10 -9
  24. package/dist/bin/agentic-reflection-backfill.js +11 -10
  25. package/dist/bin/agentic-semantic-label.js +10 -9
  26. package/dist/bin/backfill-conversations.js +13 -11
  27. package/dist/bin/backfill-responses.js +13 -11
  28. package/dist/bin/backfill-vectors.js +17 -15
  29. package/dist/bin/bulk-sync-postgres.js +22 -20
  30. package/dist/bin/cc-doctor.js +10 -9
  31. package/dist/bin/cleanup-stale-review-tasks.js +29 -26
  32. package/dist/bin/cli.js +36 -26
  33. package/dist/bin/deferred-daemon-restart.js +114 -110
  34. package/dist/bin/exe-agent-config.js +6 -5
  35. package/dist/bin/exe-agent.js +127 -33
  36. package/dist/bin/exe-assign.js +15 -13
  37. package/dist/bin/exe-boot.js +57 -54
  38. package/dist/bin/exe-call.js +8 -7
  39. package/dist/bin/exe-cloud.js +24 -22
  40. package/dist/bin/exe-config-dump.js +6 -5
  41. package/dist/bin/exe-dispatch.js +30 -27
  42. package/dist/bin/exe-doctor.js +14 -10
  43. package/dist/bin/exe-export-behaviors.js +19 -17
  44. package/dist/bin/exe-forget.js +10 -9
  45. package/dist/bin/exe-gateway.js +199 -19
  46. package/dist/bin/exe-grant.js +5 -5
  47. package/dist/bin/exe-healthcheck.js +10 -9
  48. package/dist/bin/exe-heartbeat.js +35 -32
  49. package/dist/bin/exe-kill.js +34 -31
  50. package/dist/bin/exe-launch-agent.js +126 -54
  51. package/dist/bin/exe-mcp.js +6 -5
  52. package/dist/bin/exe-memory-reads.js +8 -7
  53. package/dist/bin/exe-new-employee.js +12 -11
  54. package/dist/bin/exe-os-mcp-proxy.js +6 -5
  55. package/dist/bin/exe-pending-messages.js +30 -27
  56. package/dist/bin/exe-pending-notifications.js +29 -26
  57. package/dist/bin/exe-pending-reviews.js +30 -27
  58. package/dist/bin/exe-rename.js +8 -7
  59. package/dist/bin/exe-repo-truth.js +1 -1
  60. package/dist/bin/exe-review.js +33 -30
  61. package/dist/bin/exe-search.js +9 -8
  62. package/dist/bin/exe-session-cleanup.js +35 -32
  63. package/dist/bin/exe-settings.js +24 -22
  64. package/dist/bin/exe-start-codex.js +137 -55
  65. package/dist/bin/exe-start-opencode.js +121 -23
  66. package/dist/bin/exe-status.js +31 -28
  67. package/dist/bin/exe-support.js +5 -4
  68. package/dist/bin/exe-team.js +7 -6
  69. package/dist/bin/exe-watchdog.js +31 -11
  70. package/dist/bin/generate-hook-manifest.js +44 -7
  71. package/dist/bin/git-sweep.js +31 -28
  72. package/dist/bin/graph-backfill.js +89 -35
  73. package/dist/bin/graph-export.js +9 -8
  74. package/dist/bin/import-history.js +14 -13
  75. package/dist/bin/install.js +137 -113
  76. package/dist/bin/intercom-check.js +5 -5
  77. package/dist/bin/mcp-sessions.js +2 -2
  78. package/dist/bin/orchestration-metrics.js +7 -6
  79. package/dist/bin/postgres-agentic-reflection-backfill.js +5 -4
  80. package/dist/bin/postgres-agentic-semantic-backfill.js +4 -3
  81. package/dist/bin/pre-publish.js +1 -1
  82. package/dist/bin/reconcile-backlog.js +2 -2
  83. package/dist/bin/registry-proxy.js +1 -1
  84. package/dist/bin/scan-tasks.js +29 -26
  85. package/dist/bin/setup.js +5 -4
  86. package/dist/bin/shard-migrate.js +9 -8
  87. package/dist/bin/stack-update.js +40 -9
  88. package/dist/bin/verify-stack.js +2 -2
  89. package/dist/bin/vps-health-gate.js +1 -1
  90. package/dist/{boot-generation-OHXH4YC5.js → boot-generation-JKVZ4ZAT.js} +6 -5
  91. package/dist/{boot-review-sections-N5IXIGSS.js → boot-review-sections-2M6BTG73.js} +28 -25
  92. package/dist/{branch-hygiene-KCGXRAWP.js → branch-hygiene-U5GFRSTP.js} +31 -7
  93. package/dist/{branding-GH43W3PU.js → branding-I6KIMB7F.js} +3 -2
  94. package/dist/budget-fallback-XJRPMP2D.js +11 -0
  95. package/dist/build-manifest.json +1318 -1233
  96. package/dist/{capability-cards-4PXVLIVS.js → capability-cards-5IMJT6J7.js} +5 -4
  97. package/dist/{capacity-monitor-FKMQXORX.js → capacity-monitor-SAXCQK7O.js} +30 -27
  98. package/dist/{catchup-brief-SN5EKO4N.js → catchup-brief-U2TXBLHD.js} +34 -31
  99. package/dist/{chunk-CNC57JCS.js → chunk-23MVDXLY.js} +4 -4
  100. package/dist/{chunk-V4XAKXXF.js → chunk-2AJGV5UL.js} +1 -1
  101. package/dist/{chunk-FBYAXTDM.js → chunk-2ZOEC4KC.js} +10 -2
  102. package/dist/{chunk-ELXFSIIM.js → chunk-32YV32VA.js} +2 -2
  103. package/dist/{chunk-44C7QNZS.js → chunk-3KDCORDO.js} +1 -1
  104. package/dist/{chunk-JTB5V6BV.js → chunk-3SXHEQ7X.js} +1 -1
  105. package/dist/{chunk-HDW4XPDV.js → chunk-3UUX5OY4.js} +1 -1
  106. package/dist/{chunk-7PSLK36P.js → chunk-44TLJZJ5.js} +1 -1
  107. package/dist/{chunk-JTWTBX2M.js → chunk-4EN3IZ3Q.js} +2 -1
  108. package/dist/{chunk-KPMC7PY7.js → chunk-4HKTO2SV.js} +1 -1
  109. package/dist/{chunk-CDUB5Q6J.js → chunk-4IK2K3B3.js} +1 -1
  110. package/dist/{chunk-GH6YJOOC.js → chunk-4SJ4LK4V.js} +6 -6
  111. package/dist/{chunk-PVEM537A.js → chunk-4YLBKEL5.js} +2 -2
  112. package/dist/chunk-4YNA3CM6.js +872 -0
  113. package/dist/{chunk-KYFFVTGO.js → chunk-55BEFF4V.js} +3 -3
  114. package/dist/{chunk-SEP5ITFQ.js → chunk-636LKCKE.js} +2 -2
  115. package/dist/{chunk-QTI4QAWA.js → chunk-6EZQUNE6.js} +338 -5
  116. package/dist/{chunk-WAEKYKTK.js → chunk-6RKKVPYF.js} +1 -1
  117. package/dist/{chunk-VX2F4ZUY.js → chunk-6SCGLHJ7.js} +3 -3
  118. package/dist/{chunk-MEGRQ53A.js → chunk-6VHOQ3IM.js} +51 -6
  119. package/dist/{chunk-HIIXCAEE.js → chunk-6YVUR3OU.js} +3 -3
  120. package/dist/{chunk-L6ZNURWN.js → chunk-7GE2EQ23.js} +1 -1
  121. package/dist/{chunk-2CWS374F.js → chunk-7RI2CNXJ.js} +1 -1
  122. package/dist/{chunk-OL3QP3AU.js → chunk-7TSBV3SD.js} +1 -1
  123. package/dist/{chunk-DSOQUQTV.js → chunk-A27Q27CT.js} +27 -0
  124. package/dist/{chunk-5AHRZI3R.js → chunk-AETLDRZB.js} +1 -1
  125. package/dist/{chunk-RNLF3CBB.js → chunk-AKLJ4JH3.js} +1 -1
  126. package/dist/{chunk-XHYHX6F7.js → chunk-AKLQSC6W.js} +329 -164
  127. package/dist/chunk-ANLFH23R.js +261 -0
  128. package/dist/{chunk-QLA3RTH4.js → chunk-AWWKRZMB.js} +5 -5
  129. package/dist/{chunk-ERVQTR7P.js → chunk-BBSIEYF5.js} +17 -3
  130. package/dist/{chunk-IPMUWYRQ.js → chunk-BJ7AVSY6.js} +2 -2
  131. package/dist/{chunk-HV6Y6F4X.js → chunk-C2L622QJ.js} +89 -3
  132. package/dist/{chunk-TX3Q2GIL.js → chunk-C5HUMAA7.js} +24 -1
  133. package/dist/{chunk-QTYJPWJN.js → chunk-CBCGDEJA.js} +7 -7
  134. package/dist/{chunk-XXSNLM6R.js → chunk-DB55JZHU.js} +1 -1
  135. package/dist/{chunk-LAZKEJMS.js → chunk-DIXXEE3S.js} +840 -607
  136. package/dist/{chunk-FB343XQX.js → chunk-DJ7YXOTU.js} +2 -2
  137. package/dist/{chunk-YFCNWQAM.js → chunk-DJOIMFKV.js} +2 -2
  138. package/dist/{chunk-UTDMTQNH.js → chunk-DSJI76XL.js} +92 -14
  139. package/dist/{chunk-EEXX4UMQ.js → chunk-DZKPOSFD.js} +1 -1
  140. package/dist/{chunk-WSOA3WMC.js → chunk-E426DOSY.js} +161 -4
  141. package/dist/{chunk-ZISQOOER.js → chunk-EKE37MO4.js} +3 -3
  142. package/dist/{chunk-RIECV7SR.js → chunk-EKYYMIVT.js} +1 -1
  143. package/dist/{chunk-HIVZ53YB.js → chunk-EXTZSNWL.js} +2 -2
  144. package/dist/{chunk-YYA5LXCT.js → chunk-FNEZ4BWT.js} +1 -1
  145. package/dist/chunk-FTZET5YX.js +313 -0
  146. package/dist/chunk-GHR4ZPJ7.js +70 -0
  147. package/dist/{chunk-MINXPXAB.js → chunk-GJI77VDO.js} +3 -3
  148. package/dist/{chunk-AAMGHW5W.js → chunk-GLQEJOXE.js} +1 -0
  149. package/dist/{chunk-ADNBOKYZ.js → chunk-GM7TLYOK.js} +60 -18
  150. package/dist/{chunk-RUWWES2K.js → chunk-GNUAL43X.js} +2 -2
  151. package/dist/{chunk-QZL6E4UB.js → chunk-GOMQ7PVQ.js} +2 -2
  152. package/dist/{chunk-GB3AHV5F.js → chunk-GQOEWNVM.js} +1 -1
  153. package/dist/{chunk-NQZUSEAR.js → chunk-GS7LIT34.js} +246 -17
  154. package/dist/{chunk-XTWHNLGD.js → chunk-GZOG2MAX.js} +1 -1
  155. package/dist/{chunk-E5HAY3DQ.js → chunk-HDLAB7W3.js} +1 -1
  156. package/dist/{chunk-E5QQZDQN.js → chunk-HNWS7YHN.js} +358 -136
  157. package/dist/{chunk-VV5EZZNT.js → chunk-HTBEVCO2.js} +1 -1
  158. package/dist/{chunk-OZBII5E3.js → chunk-I4DNJFDR.js} +4 -4
  159. package/dist/{chunk-SI5SZAJA.js → chunk-IBS2FAI4.js} +21 -4
  160. package/dist/{chunk-J5EYOBFF.js → chunk-IHXW4VUI.js} +1 -1
  161. package/dist/{chunk-RUVO3NJC.js → chunk-IN6CAM4F.js} +9 -3
  162. package/dist/{chunk-53PYNYTW.js → chunk-IRVOXUSK.js} +5 -5
  163. package/dist/{chunk-THM7J6UI.js → chunk-JHI5WMK5.js} +5 -5
  164. package/dist/{chunk-3KTQWMHI.js → chunk-JSMDRKPJ.js} +12 -4
  165. package/dist/chunk-JTVIANUB.js +131 -0
  166. package/dist/{chunk-2ADYTOHQ.js → chunk-K4ESASPL.js} +1 -1
  167. package/dist/{chunk-YWUQVHDL.js → chunk-KTCXJWJG.js} +1 -1
  168. package/dist/{chunk-RGUDGC6A.js → chunk-KTU3EAWK.js} +5 -5
  169. package/dist/{chunk-DKBPCOU4.js → chunk-L6RXG36J.js} +2 -2
  170. package/dist/{chunk-T4EK56WI.js → chunk-LDNYSMPZ.js} +1 -1
  171. package/dist/{chunk-RIK5GRWI.js → chunk-LGS2V2XD.js} +3 -3
  172. package/dist/{chunk-JKXZGRWR.js → chunk-LP4GB656.js} +2 -2
  173. package/dist/{chunk-H74466TM.js → chunk-M7O7TGGU.js} +1 -1
  174. package/dist/chunk-MJCSEIFI.js +54 -0
  175. package/dist/{chunk-IDZPQG2D.js → chunk-MOGA4Q7F.js} +2 -2
  176. package/dist/{chunk-OYQNNKNS.js → chunk-MXPNVSXI.js} +37 -14
  177. package/dist/{chunk-UVW7YFAF.js → chunk-N7VEP5B3.js} +4 -4
  178. package/dist/{chunk-HHE2HV3V.js → chunk-NBXDXKLC.js} +1 -1
  179. package/dist/{chunk-LDL3S7AC.js → chunk-NKETJCB5.js} +7 -3
  180. package/dist/{chunk-ECHLVLA7.js → chunk-NMH5ZQPU.js} +1 -1
  181. package/dist/{chunk-U3XLRMJD.js → chunk-NT7W4RXD.js} +1 -1
  182. package/dist/{chunk-UQUUNGTP.js → chunk-NUK7EEN5.js} +11 -9
  183. package/dist/{chunk-GBNB4EWD.js → chunk-ORM7ZFKC.js} +16 -0
  184. package/dist/{chunk-O4ZFRK6W.js → chunk-OVEQE6YS.js} +244 -49
  185. package/dist/{chunk-4ZJ5BPY6.js → chunk-PB5S7YOF.js} +2 -2
  186. package/dist/{chunk-JR23BL74.js → chunk-PDVXWXTL.js} +4 -4
  187. package/dist/{chunk-3CIMDFXG.js → chunk-PFQ3VEEM.js} +1 -1
  188. package/dist/{chunk-SBJV2PCU.js → chunk-PHBU4LGO.js} +1 -1
  189. package/dist/{chunk-W25RLOQ2.js → chunk-PLZSZOZN.js} +3 -3
  190. package/dist/{chunk-THIJIOE2.js → chunk-PY3FOMRN.js} +18 -6
  191. package/dist/{chunk-AAUWFXOX.js → chunk-Q3AXXKDF.js} +3 -3
  192. package/dist/{chunk-VKXS2YGN.js → chunk-QHJR7IMX.js} +2 -2
  193. package/dist/chunk-QLZ46RCK.js +45 -0
  194. package/dist/{chunk-UHPMK6QZ.js → chunk-R3CZWFFC.js} +10 -2
  195. package/dist/{chunk-6XEYELCA.js → chunk-R4CBHKZ2.js} +1 -1
  196. package/dist/{chunk-5APCDDJZ.js → chunk-R522MWAR.js} +9 -9
  197. package/dist/chunk-RH4AH3YB.js +80 -0
  198. package/dist/{chunk-AMKSDKMK.js → chunk-S2WBS6BG.js} +22 -35
  199. package/dist/{chunk-WUKQVNLP.js → chunk-SEQIPGLU.js} +1 -1
  200. package/dist/{chunk-7WQRFSZI.js → chunk-SL6KQYDU.js} +26 -6
  201. package/dist/chunk-SLLLOOEI.js +103 -0
  202. package/dist/{chunk-5N4SG5NB.js → chunk-T35RCQFE.js} +3 -3
  203. package/dist/{chunk-7V6M3QUS.js → chunk-T3QUKNLI.js} +1 -1
  204. package/dist/{chunk-CW2UCKHS.js → chunk-TADAO3HV.js} +2 -2
  205. package/dist/{chunk-5DCCKHDY.js → chunk-TAMDAOCU.js} +109 -13
  206. package/dist/{chunk-ZXB56YR2.js → chunk-TFKCERAK.js} +101 -23
  207. package/dist/{chunk-RBYHJDAT.js → chunk-TQAZTRQ3.js} +3 -3
  208. package/dist/{chunk-OKGIOWOB.js → chunk-U6SUKSZR.js} +2 -2
  209. package/dist/{chunk-23QKEUF6.js → chunk-U73AC5AN.js} +34 -12
  210. package/dist/{chunk-PM6WSWVU.js → chunk-UBK7HK3J.js} +3 -3
  211. package/dist/{chunk-H37FSTF2.js → chunk-UBMZ3YQU.js} +1 -1
  212. package/dist/{chunk-JJUGI2YL.js → chunk-UCFC2AEI.js} +1 -1
  213. package/dist/{chunk-6IWLAQ7O.js → chunk-UCUOGVDX.js} +4 -0
  214. package/dist/{chunk-E7UCDSUE.js → chunk-UKLN57Q5.js} +2 -2
  215. package/dist/{chunk-ZYCLSEZT.js → chunk-ULIBLJ6W.js} +33 -11
  216. package/dist/{chunk-RLR6VVKV.js → chunk-UM3N6VND.js} +4 -4
  217. package/dist/{chunk-ZNUJFX7L.js → chunk-UQGSBM3U.js} +1 -1
  218. package/dist/{chunk-ZZXMB5F2.js → chunk-UZDF6FLJ.js} +1 -1
  219. package/dist/{chunk-LNOS24GV.js → chunk-V3WLC5TJ.js} +2 -95
  220. package/dist/{chunk-UXLO7VHX.js → chunk-VI4ATC6I.js} +1 -1
  221. package/dist/{chunk-77JP3LK4.js → chunk-VKJGHAZT.js} +92 -21
  222. package/dist/{chunk-7R73IAHU.js → chunk-VMTZ4RUW.js} +67 -150
  223. package/dist/{chunk-TGPQMMQP.js → chunk-VYQ7B7DI.js} +30 -17
  224. package/dist/{chunk-E2WEFZOR.js → chunk-W75GTHR3.js} +1 -1
  225. package/dist/{chunk-UKLF7F3Z.js → chunk-WJG344NC.js} +9 -9
  226. package/dist/{chunk-MBNIJXKI.js → chunk-WMEYJT4R.js} +18 -4
  227. package/dist/{chunk-R6FLELV6.js → chunk-XFTEX77S.js} +3 -3
  228. package/dist/{chunk-MDGYXUOV.js → chunk-XH7YL7JM.js} +1 -1
  229. package/dist/{chunk-JOO35RHR.js → chunk-XL5MFGMR.js} +3 -3
  230. package/dist/{chunk-OW5RZIDW.js → chunk-XNNECNDL.js} +95 -33
  231. package/dist/{chunk-5AHDQCTB.js → chunk-XXFKSJYA.js} +6 -6
  232. package/dist/{chunk-TGEPLJ66.js → chunk-XXOPG4BW.js} +3 -3
  233. package/dist/{chunk-PGLPUP37.js → chunk-XZ65ST2I.js} +1 -1
  234. package/dist/{chunk-3TTKAT6V.js → chunk-YKC7QDZH.js} +9 -4
  235. package/dist/{chunk-KXYFBBZR.js → chunk-YMP2QSOP.js} +20 -3
  236. package/dist/{chunk-TK4MI6F6.js → chunk-YSLGFPWX.js} +6 -6
  237. package/dist/{chunk-X2P43TB2.js → chunk-YTSXPJUQ.js} +1 -1
  238. package/dist/{chunk-HECXZGGZ.js → chunk-ZCERWHY2.js} +33 -35
  239. package/dist/{chunk-IVU3WN7S.js → chunk-ZG62LIK3.js} +74 -4
  240. package/dist/{chunk-GU62SNDH.js → chunk-ZGYNKA3O.js} +744 -111
  241. package/dist/{chunk-QMSEL5YS.js → chunk-ZIG7VPJV.js} +28 -76
  242. package/dist/{chunk-WZJVGA5I.js → chunk-ZL4AGWAH.js} +258 -13
  243. package/dist/{chunk-QR624DER.js → chunk-ZSODLMFV.js} +2 -2
  244. package/dist/{cleanup-graph-garbage-IPYDS5OX.js → cleanup-graph-garbage-DPJGO52H.js} +11 -10
  245. package/dist/{cloud-sync-command-JLNVG7H4.js → cloud-sync-command-JPNTT4OQ.js} +2 -2
  246. package/dist/{cloud-sync-db-init-JXUF6GI3.js → cloud-sync-db-init-V2LWIUQU.js} +1 -1
  247. package/dist/{cloud-sync-shutdown-Z4SBP6PL.js → cloud-sync-shutdown-BNALPWGX.js} +5 -4
  248. package/dist/{co-activation-74RDFTKS.js → co-activation-CMNSWS6B.js} +5 -4
  249. package/dist/{co-occurrence-CN3TBYVR.js → co-occurrence-WRI2NAN6.js} +9 -8
  250. package/dist/{code-context-index-D4MJ4VFX.js → code-context-index-NOJSHLPN.js} +12 -6
  251. package/dist/code-context-watcher-VZNZU3BO.js +118 -0
  252. package/dist/{codex-consolidation-PPXNBXCV.js → codex-consolidation-SH4UKFBQ.js} +2 -1
  253. package/dist/{conversation-entity-extractor-QGTLH4BP.js → conversation-entity-extractor-74252CAO.js} +4 -4
  254. package/dist/{conversation-wiki-populator-EBUZXYEU.js → conversation-wiki-populator-OS4C6W54.js} +1 -1
  255. package/dist/conversations-retention-C4BLKFEL.js +54 -0
  256. package/dist/coordinator-notice-MHUY7AQB.js +55 -0
  257. package/dist/{crdt-sync-7T4WCOKD.js → crdt-sync-B3JN6AIV.js} +1 -1
  258. package/dist/{crm-webhook-FTW3XZTO.js → crm-webhook-GYWQRFET.js} +2 -2
  259. package/dist/{cto-delegation-gate-SZCE34LB.js → cto-delegation-gate-LQHVLEMW.js} +29 -26
  260. package/dist/{daemon-auth-SSPY5ODS.js → daemon-auth-QZHEO7IQ.js} +3 -2
  261. package/dist/{daemon-orchestration-IGPHVNFR.js → daemon-orchestration-5HIQALZH.js} +36 -34
  262. package/dist/{daemon-ready-OT2VQLS7.js → daemon-ready-P2BR2XP5.js} +1 -1
  263. package/dist/{db-integrity-events-5DTASXJF.js → db-integrity-events-2DTFO37N.js} +3 -2
  264. package/dist/{db-restore-events-2FI4ZMKA.js → db-restore-events-G6NOQOVE.js} +2 -1
  265. package/dist/{destructive-data-guard-6I5MDFVD.js → destructive-data-guard-BVFWPPIS.js} +1 -1
  266. package/dist/doc-graph-extractor-PQHDHQPQ.js +367 -0
  267. package/dist/{documents-URULIXGM.js → documents-C4SSPJMC.js} +15 -13
  268. package/dist/{dreaming-VIZO3QDO.js → dreaming-XAO3FCBV.js} +33 -30
  269. package/dist/{employee-boot-brief-XLOG4ULP.js → employee-boot-brief-W4OHUMRQ.js} +37 -34
  270. package/dist/{exe-drift-TLQM3IHD.js → exe-drift-AG2KMKD5.js} +6 -5
  271. package/dist/{exe-export-7YWYWJHY.js → exe-export-IC5BT335.js} +17 -15
  272. package/dist/{exe-import-DW6VAUKW.js → exe-import-A35ZLDPG.js} +17 -15
  273. package/dist/{exe-key-TLJP2B4Y.js → exe-key-TCMJNYLA.js} +116 -112
  274. package/dist/{exe-org-LU46N36E.js → exe-org-JXCR3JYZ.js} +24 -23
  275. package/dist/{exe-snapshot-QHUZRS62.js → exe-snapshot-SV6SRIG6.js} +36 -33
  276. package/dist/{fast-db-init-SCTOOIUT.js → fast-db-init-L2RGKJWH.js} +1 -1
  277. package/dist/{founder-context-ZFZC4UHO.js → founder-context-D4HFIESJ.js} +4 -3
  278. package/dist/{founder-monitor-envelope-5KTKNL5G.js → founder-monitor-envelope-TFKRGCFE.js} +5 -4
  279. package/dist/{fts-integrity-LKAZEZJE.js → fts-integrity-4YB34KWX.js} +3 -2
  280. package/dist/gateway/index.js +19 -17
  281. package/dist/{git-main-guard-TN27QBAI.js → git-main-guard-VTW4N3CM.js} +7 -1
  282. package/dist/{git-staleness-GSGP344N.js → git-staleness-TN7CYGFG.js} +5 -4
  283. package/dist/{global-procedures-YAR7G4C6.js → global-procedures-YFDEIOG7.js} +7 -6
  284. package/dist/{graph-auto-extract-GNQS64F5.js → graph-auto-extract-3YR3TYRW.js} +9 -8
  285. package/dist/{graph-rag-RMSFLUOB.js → graph-rag-Z2KCJTPK.js} +6 -4
  286. package/dist/{hook-integrity-CF567MVN.js → hook-integrity-KGAV6ZC2.js} +14 -4
  287. package/dist/{hook-prefetch-36BK4F7U.js → hook-prefetch-K5DN3TOQ.js} +29 -26
  288. package/dist/hooks/bug-report-worker.js +34 -30
  289. package/dist/hooks/codex-stop-task-finalizer.js +36 -32
  290. package/dist/hooks/commit-complete.js +33 -30
  291. package/dist/hooks/error-recall.js +12 -11
  292. package/dist/hooks/exe-heartbeat-hook.js +8 -7
  293. package/dist/hooks/ingest-worker.js +23 -11
  294. package/dist/hooks/ingest.js +18 -17
  295. package/dist/hooks/instructions-loaded.js +10 -9
  296. package/dist/hooks/manifest.json +20 -20
  297. package/dist/hooks/notification.js +9 -8
  298. package/dist/hooks/post-compact.js +8 -7
  299. package/dist/hooks/post-tool-combined.js +26 -15
  300. package/dist/hooks/pre-compact.js +33 -30
  301. package/dist/hooks/pre-tool-use.js +404 -46
  302. package/dist/hooks/prompt-submit.js +57 -47
  303. package/dist/hooks/session-end.js +40 -41
  304. package/dist/hooks/session-start.js +21 -20
  305. package/dist/hooks/stop.js +40 -37
  306. package/dist/hooks/subagent-stop.js +38 -35
  307. package/dist/hooks/summary-worker.js +39 -36
  308. package/dist/hyde-MP4QNMU5.js +80 -0
  309. package/dist/index.js +44 -39
  310. package/dist/{installer-LUN4HQIC.js → installer-54HTN5RE.js} +8 -7
  311. package/dist/{installer-OC5VXNC7.js → installer-LK35OX6R.js} +8 -7
  312. package/dist/{installer-MPRFUQJE.js → installer-LLWKZI2S.js} +8 -7
  313. package/dist/intercom-ack-VCW755TN.js +13 -0
  314. package/dist/{intercom-queue-6DZ7BANV.js → intercom-queue-5NOT2RKI.js} +28 -25
  315. package/dist/{key-backup-status-6L2ARCXW.js → key-backup-status-LQPINQ3W.js} +2 -1
  316. package/dist/lib/agent-config.js +3 -2
  317. package/dist/lib/cloud-sync.js +26 -20
  318. package/dist/lib/config.js +2 -1
  319. package/dist/lib/consolidation.js +17 -10
  320. package/dist/lib/database.js +7 -4
  321. package/dist/lib/db-backup.js +17 -2
  322. package/dist/lib/db-daemon-client.js +8 -6
  323. package/dist/lib/db-write-worker-client.js +3 -1
  324. package/dist/lib/db-write-worker.js +20 -3
  325. package/dist/lib/db.js +7 -4
  326. package/dist/lib/device-registry.js +3 -2
  327. package/dist/lib/embed-worker.js +2 -1
  328. package/dist/lib/embedder.js +8 -6
  329. package/dist/lib/employee-templates.js +8 -7
  330. package/dist/lib/employees.js +5 -4
  331. package/dist/lib/exe-daemon-client.js +7 -5
  332. package/dist/lib/exe-daemon.js +467 -221
  333. package/dist/lib/hybrid-search.js +11 -8
  334. package/dist/lib/identity.js +5 -4
  335. package/dist/lib/license.js +4 -3
  336. package/dist/lib/messaging.js +29 -26
  337. package/dist/lib/post-tool-memory.js +16 -2
  338. package/dist/lib/registry-proxy.js +3 -1
  339. package/dist/lib/reminders.js +6 -5
  340. package/dist/lib/schedules.js +9 -8
  341. package/dist/lib/session-registry.js +7 -6
  342. package/dist/lib/skill-learning.js +16 -14
  343. package/dist/lib/stack-invariants.js +17 -1
  344. package/dist/lib/status-brief.js +5 -4
  345. package/dist/lib/store.js +10 -7
  346. package/dist/lib/task-router.js +6 -5
  347. package/dist/lib/tasks.js +31 -27
  348. package/dist/lib/tmux-routing.js +40 -25
  349. package/dist/lib/tmux-status.js +3 -1
  350. package/dist/lib/tmux-transport.js +2 -1
  351. package/dist/lib/token-spend.js +6 -5
  352. package/dist/lib/transport.js +3 -2
  353. package/dist/{license-gate-ESER24PJ.js → license-gate-JVMB6OFD.js} +5 -4
  354. package/dist/{license-sync-JVG5KNIY.js → license-sync-5VYS2F2W.js} +4 -3
  355. package/dist/mcp/register-tools.js +113 -109
  356. package/dist/mcp/server.js +118 -114
  357. package/dist/mcp/tools/complete-reminder.js +7 -6
  358. package/dist/mcp/tools/create-reminder.js +7 -6
  359. package/dist/mcp/tools/create-task.js +34 -30
  360. package/dist/mcp/tools/deactivate-behavior.js +18 -16
  361. package/dist/mcp/tools/list-reminders.js +7 -6
  362. package/dist/mcp/tools/list-tasks.js +34 -30
  363. package/dist/mcp/tools/send-message.js +32 -29
  364. package/dist/mcp/tools/update-task.js +32 -28
  365. package/dist/mcp-child-registry-OTG4MWO7.js +25 -0
  366. package/dist/{mcp-http-config-6K6IKH5F.js → mcp-http-config-DQWL7U2Z.js} +6 -5
  367. package/dist/{mcp-session-identity-LRC6WJSD.js → mcp-session-identity-277GASTQ.js} +28 -25
  368. package/dist/{memory-cards-V3OZHIYP.js → memory-cards-3S2ZQPR7.js} +17 -8
  369. package/dist/{memory-graph-extractor-JC2Z64L4.js → memory-graph-extractor-A6DFEFIN.js} +10 -9
  370. package/dist/{memory-poisoning-defense-YM4QJHCX.js → memory-poisoning-defense-ZVP4H6DY.js} +5 -4
  371. package/dist/{memory-pressure-watchdog-6F6KEQHN.js → memory-pressure-watchdog-6W5F6R7H.js} +29 -26
  372. package/dist/{memory-queue-QJNWKWKG.js → memory-queue-YF7IDSFY.js} +3 -2
  373. package/dist/{memory-queue-client-COA4ABEV.js → memory-queue-client-ADSDP6OX.js} +9 -7
  374. package/dist/{memory-reflection-QXHJPYPC.js → memory-reflection-BKB2YOE6.js} +52 -6
  375. package/dist/{monitor-grants-BW2WL4IU.js → monitor-grants-EV747HMW.js} +4 -3
  376. package/dist/{notification-ledger-6QRLQW4Q.js → notification-ledger-CLGM7ODF.js} +30 -27
  377. package/dist/{notifications-7B6D7Y5C.js → notifications-MACUZPYP.js} +28 -25
  378. package/dist/{oauth-server-TZFNQAFS.js → oauth-server-AYM37SQ4.js} +25 -4
  379. package/dist/{orchestration-events-GY5VP5LU.js → orchestration-events-N7LYMUGA.js} +6 -5
  380. package/dist/{orchestration-phase-UDS24CVQ.js → orchestration-phase-T2WD45UA.js} +3 -2
  381. package/dist/{orchestrator-JVPVOYWA.js → orchestrator-4X24EWHV.js} +30 -27
  382. package/dist/{org-brief-session-GRV5R5E3.js → org-brief-session-FZOFMO5U.js} +13 -12
  383. package/dist/{org-consent-policy-3FHHSYXV.js → org-consent-policy-O5E6HXBL.js} +1 -1
  384. package/dist/{org-join-BY4PV6UO.js → org-join-POWUG25F.js} +8 -7
  385. package/dist/{org-key-admin-WSCPT2CZ.js → org-key-admin-E7EMDOZZ.js} +9 -8
  386. package/dist/{org-key-pin-5WUSPGVN.js → org-key-pin-WHWHVWUO.js} +4 -3
  387. package/dist/{org-membership-ESALTLLN.js → org-membership-WRT2IHJK.js} +5 -4
  388. package/dist/{org-partner-config-YKHPDPZR.js → org-partner-config-B7T4CL2T.js} +7 -6
  389. package/dist/{org-partner-runtime-UJDGECZ4.js → org-partner-runtime-FODONVTM.js} +13 -12
  390. package/dist/{org-row-visibility-V5DXIHTE.js → org-row-visibility-VX4AVV5Q.js} +1 -1
  391. package/dist/{pipeline-router-YY5FQKTY.js → pipeline-router-6GGT2ZW3.js} +6 -5
  392. package/dist/{plan-limits-OVX6SN6B.js → plan-limits-FUN76LYY.js} +8 -7
  393. package/dist/{platform-procedures-I57ITMDC.js → platform-procedures-7YSCLF4Z.js} +1 -1
  394. package/dist/{postinstall-failure-B2JHNFPM.js → postinstall-failure-O6TSSNJB.js} +3 -2
  395. package/dist/{project-boot-LXLU2J32.js → project-boot-3Q65LCIP.js} +2 -1
  396. package/dist/project-name-LJVFMYTQ.js +30 -0
  397. package/dist/{projection-worker-D2472IOD.js → projection-worker-4OANGP5K.js} +5 -4
  398. package/dist/{prospective-memory-JXO2A6PL.js → prospective-memory-KR3P4T6N.js} +5 -4
  399. package/dist/{push-notifications-HR3FZRDI.js → push-notifications-NCZLH6DI.js} +29 -26
  400. package/dist/ref-provenance-gate-M4AQO4OT.js +269 -0
  401. package/dist/{reproject-worktree-memories-OSS3PGRF.js → reproject-worktree-memories-PWYKPB2U.js} +106 -23
  402. package/dist/{reranker-IMZRPYJ2.js → reranker-6V3C2AO4.js} +3 -2
  403. package/dist/resolve-image-labels-ZI6UBW5W.js +15 -0
  404. package/dist/{retrieval-health-W7OD44FE.js → retrieval-health-5D7O6VH6.js} +4 -3
  405. package/dist/{review-polling-2INP7H6M.js → review-polling-QW3LJ4KN.js} +29 -26
  406. package/dist/runtime/index.js +38 -34
  407. package/dist/{session-events-G4XUPVWV.js → session-events-T45SSTMF.js} +31 -26
  408. package/dist/{session-kill-telemetry-W7MHWJTQ.js → session-kill-telemetry-QSPVJGBF.js} +29 -26
  409. package/dist/{session-mcp-config-F7KATWOF.js → session-mcp-config-SC5BLWZG.js} +3 -2
  410. package/dist/{session-scope-LG2J4EMQ.js → session-scope-KRWE54C4.js} +28 -25
  411. package/dist/{setup-wizard-YQJI3SVM.js → setup-wizard-GP3TBTPF.js} +5 -4
  412. package/dist/{shard-manager-UROHZE46.js → shard-manager-OE36A4MY.js} +3 -2
  413. package/dist/{skill-refinement-RA37U756.js → skill-refinement-C7JTMLJG.js} +6 -5
  414. package/dist/stack-generate-manifest-MFMDWRUP.js +810 -0
  415. package/dist/{stack-promote-IYBRXHTA.js → stack-promote-EKSCYY63.js} +8 -6
  416. package/dist/{stack-release-OXWLVVG6.js → stack-release-2GZAAFO4.js} +8 -6
  417. package/dist/{stack-update-2CZEROPK.js → stack-update-J6JXSTAZ.js} +51 -5
  418. package/dist/{steward-gate-LTNFB3FY.js → steward-gate-BFCCMCSW.js} +6 -5
  419. package/dist/{subagent-brief-injection-OHLWLECQ.js → subagent-brief-injection-ED36PLYY.js} +44 -36
  420. package/dist/{subagent-spawn-ledger-USYZXU3M.js → subagent-spawn-ledger-E6U3OY6Z.js} +3 -2
  421. package/dist/{supervisor-handoff-CSJQMI53.js → supervisor-handoff-SGLEPOCY.js} +12 -3
  422. package/dist/{support-inbox-4KCEPAZQ.js → support-inbox-YW47SYJF.js} +20 -5
  423. package/dist/{task-enforcement-LGXWXGVZ.js → task-enforcement-CECTQX4U.js} +29 -26
  424. package/dist/{task-request-inbox-WHCOSUCP.js → task-request-inbox-Q5T4N5K7.js} +1 -1
  425. package/dist/{task-scope-KXF7Y6KA.js → task-scope-ERVEUEYU.js} +28 -25
  426. package/dist/{tasks-crud-5EM55WRZ.js → tasks-crud-ZRQNJXQ2.js} +28 -25
  427. package/dist/{tasks-notify-VFMAURTN.js → tasks-notify-MIZH4C2O.js} +29 -26
  428. package/dist/{tasks-review-MHGMBHUZ.js → tasks-review-Z7J2P6DG.js} +28 -25
  429. package/dist/{telemetry-upload-6NRTN7QJ.js → telemetry-upload-LVQUQYFP.js} +10 -9
  430. package/dist/{token-budget-LZPOYTRP.js → token-budget-BU4NOVZF.js} +6 -5
  431. package/dist/{tool-capability-index-ED5OAPMW.js → tool-capability-index-7F42MOJT.js} +1 -1
  432. package/dist/{tool-gates-7PLIOLAL.js → tool-gates-JWVSAYTW.js} +1 -1
  433. package/dist/{tool-gates-2OZY3GZM.js → tool-gates-VXITVRFQ.js} +1 -1
  434. package/dist/{tool-telemetry-ZX7VSAXK.js → tool-telemetry-O27EVMBR.js} +1 -1
  435. package/dist/tui/App.js +43 -40
  436. package/dist/{tui-data-CC5POSUV.js → tui-data-TPWWBIUQ.js} +28 -25
  437. package/dist/{update-support-KH6NSQON.js → update-support-F2F5537B.js} +22 -20
  438. package/dist/{whatsapp-QW3X7OCN.js → whatsapp-YM4A2CSK.js} +3 -1
  439. package/dist/{work-claims-MNK7PEPW.js → work-claims-B73X5NE7.js} +6 -5
  440. package/dist/{work-state-heartbeat-YEWT5NMZ.js → work-state-heartbeat-P4YX6E2R.js} +1 -1
  441. package/dist/{worker-gate-BOQSIU2Z.js → worker-gate-BEEIIVWA.js} +3 -2
  442. package/dist/{workflow-engine-MUUD7ZEX.js → workflow-engine-5X46PFCW.js} +4 -2
  443. package/dist/{worktree-GOGT2LZP.js → worktree-W47CIMJ6.js} +9 -6
  444. package/dist/worktree-ownership-guard-OUWJROW2.js +88 -0
  445. package/dist/{worktree-sweep-46VWPVQT.js → worktree-sweep-BNBD4RFX.js} +8 -7
  446. package/package.json +14 -5
  447. package/release-notes.json +5 -5
  448. package/src/commands/exe/call.md +1 -1
  449. package/stack.release.json +6 -0
  450. package/dist/chunk-KZXMP6JG.js +0 -319
  451. package/dist/chunk-TCTED52S.js +0 -120
  452. package/dist/chunk-W2IRQJ6R.js +0 -67
  453. package/dist/doc-graph-extractor-VPTRIEKN.js +0 -149
  454. package/dist/project-name-ILJTETUE.js +0 -14
  455. /package/dist/{chunk-3Y5THOU6.js → chunk-6WIFPD2P.js} +0 -0
  456. /package/dist/{chunk-7XGXRD22.js → chunk-AISULNGL.js} +0 -0
  457. /package/dist/{chunk-3F2UB4IQ.js → chunk-DN4YVV4Z.js} +0 -0
  458. /package/dist/{chunk-WV3TOOL7.js → chunk-KQ6RJWRW.js} +0 -0
  459. /package/dist/{chunk-HR2R2QER.js → chunk-M4IRPXSZ.js} +0 -0
  460. /package/dist/{chunk-ORA5BWCV.js → chunk-NRG7KZIP.js} +0 -0
  461. /package/dist/{chunk-7UTJA6HF.js → chunk-VZAFWPAY.js} +0 -0
  462. /package/dist/{chunk-VJSDGDNS.js → chunk-WSQASFLP.js} +0 -0
  463. /package/dist/{chunk-FZQWVQJG.js → chunk-YO4BO2CL.js} +0 -0
  464. /package/dist/{core-memory-6WBNT2HL.js → core-memory-7I7RE2SJ.js} +0 -0
  465. /package/dist/{entity-boost-MT336PI3.js → entity-boost-3UWGXG5O.js} +0 -0
  466. /package/dist/{memory-isolation-EJ45IXBH.js → memory-isolation-2TUZ7Z4K.js} +0 -0
  467. /package/dist/{message-queue-client-MVBTYCSV.js → message-queue-client-XQN7QABL.js} +0 -0
  468. /package/dist/{webhook-pipe-UQSEHFPO.js → webhook-pipe-W2FVXY7M.js} +0 -0
  469. /package/dist/{wiki-acl-WXRJGZ5Q.js → wiki-acl-IBQLLBTS.js} +0 -0
  470. /package/dist/{wiki-client-AXNM5FWY.js → wiki-client-W65IOSWF.js} +0 -0
@@ -1,74 +1,80 @@
1
1
  import {
2
- evaluateMainGuard
3
- } from "../chunk-HV6Y6F4X.js";
2
+ MAIN_GUARD_OVERRIDE_TOKEN,
3
+ evaluateMainGuard,
4
+ splitShellSegments,
5
+ tokenizeShell
6
+ } from "../chunk-C2L622QJ.js";
4
7
  import {
5
8
  resolveSidechainAgentIdentity
6
- } from "../chunk-6IWLAQ7O.js";
9
+ } from "../chunk-UCUOGVDX.js";
7
10
  import "../chunk-YSU7JB7H.js";
8
11
  import "../chunk-SH45SJQW.js";
9
12
  import {
10
13
  getActiveAgent
11
- } from "../chunk-KYFFVTGO.js";
12
- import "../chunk-2ADYTOHQ.js";
14
+ } from "../chunk-55BEFF4V.js";
15
+ import "../chunk-K4ESASPL.js";
13
16
  import {
14
17
  sessionScopeFilter
15
- } from "../chunk-XHYHX6F7.js";
18
+ } from "../chunk-AKLQSC6W.js";
16
19
  import "../chunk-BTSWFMEH.js";
17
- import "../chunk-WAEKYKTK.js";
18
- import "../chunk-44C7QNZS.js";
19
- import "../chunk-JTWTBX2M.js";
20
+ import "../chunk-6RKKVPYF.js";
21
+ import "../chunk-4EN3IZ3Q.js";
20
22
  import "../chunk-KI5PFRG6.js";
23
+ import "../chunk-3KDCORDO.js";
21
24
  import "../chunk-WT4RI36X.js";
22
25
  import "../chunk-E23LNUWJ.js";
23
26
  import "../chunk-QAEWWYHL.js";
24
27
  import "../chunk-EIKATSE4.js";
25
- import "../chunk-MDGYXUOV.js";
26
- import "../chunk-GBNB4EWD.js";
27
- import "../chunk-UXLO7VHX.js";
28
- import "../chunk-DSOQUQTV.js";
29
- import "../chunk-E2WEFZOR.js";
28
+ import "../chunk-MJCSEIFI.js";
29
+ import "../chunk-XH7YL7JM.js";
30
+ import "../chunk-ORM7ZFKC.js";
31
+ import "../chunk-VI4ATC6I.js";
32
+ import "../chunk-A27Q27CT.js";
33
+ import "../chunk-W75GTHR3.js";
30
34
  import "../chunk-AJIXH5JF.js";
31
- import "../chunk-L6ZNURWN.js";
32
- import "../chunk-XTWHNLGD.js";
35
+ import "../chunk-7GE2EQ23.js";
36
+ import "../chunk-GZOG2MAX.js";
33
37
  import "../chunk-AM7S2TY6.js";
34
- import "../chunk-HIIXCAEE.js";
38
+ import "../chunk-6YVUR3OU.js";
35
39
  import {
36
40
  getSessionKey
37
41
  } from "../chunk-CVYC6DUW.js";
38
- import "../chunk-QZL6E4UB.js";
39
- import "../chunk-CDUB5Q6J.js";
40
- import "../chunk-UQUUNGTP.js";
41
- import "../chunk-IVU3WN7S.js";
42
- import "../chunk-RIECV7SR.js";
43
- import "../chunk-LNOS24GV.js";
42
+ import "../chunk-GOMQ7PVQ.js";
43
+ import "../chunk-4IK2K3B3.js";
44
+ import "../chunk-NUK7EEN5.js";
45
+ import "../chunk-ZG62LIK3.js";
46
+ import "../chunk-EKYYMIVT.js";
44
47
  import "../chunk-NLEW62VC.js";
45
- import "../chunk-W2IRQJ6R.js";
48
+ import "../chunk-SLLLOOEI.js";
49
+ import "../chunk-V3WLC5TJ.js";
50
+ import "../chunk-JTVIANUB.js";
46
51
  import "../chunk-HYZV25LY.js";
47
52
  import "../chunk-GJV3WDWM.js";
48
53
  import "../chunk-MP2AFCGL.js";
49
54
  import {
50
55
  canCoordinate,
51
56
  loadEmployeesSync
52
- } from "../chunk-5DCCKHDY.js";
53
- import "../chunk-TKDITWDN.js";
57
+ } from "../chunk-TAMDAOCU.js";
54
58
  import "../chunk-BBMTVAE3.js";
59
+ import "../chunk-TKDITWDN.js";
55
60
  import "../chunk-5YEUPUV4.js";
56
- import "../chunk-UTDMTQNH.js";
61
+ import "../chunk-DSJI76XL.js";
57
62
  import "../chunk-YYB5PMTK.js";
58
63
  import "../chunk-NJFJWQNN.js";
59
64
  import "../chunk-V3W3SATA.js";
60
65
  import "../chunk-JY5GAZYC.js";
61
66
  import "../chunk-FXU7JOXK.js";
62
67
  import "../chunk-WNBZJSQT.js";
63
- import "../chunk-DKBPCOU4.js";
68
+ import "../chunk-L6RXG36J.js";
64
69
  import "../chunk-A7XLR3K7.js";
65
- import "../chunk-GB3AHV5F.js";
70
+ import "../chunk-GQOEWNVM.js";
66
71
  import "../chunk-A7JYF4RG.js";
67
72
  import "../chunk-ARX6TAGN.js";
68
73
  import {
69
74
  EXE_AI_DIR
70
- } from "../chunk-QMSEL5YS.js";
75
+ } from "../chunk-ZIG7VPJV.js";
71
76
  import "../chunk-HSGBZSCA.js";
77
+ import "../chunk-RH4AH3YB.js";
72
78
  import "../chunk-JKKZGDLP.js";
73
79
  import "../chunk-MLKGABMK.js";
74
80
 
@@ -164,6 +170,279 @@ function settingsTamperDenyMessage(target) {
164
170
  return `ACTION BLOCKED: ${target} is protected exe-os/Claude settings. Agents must not edit hook/MCP settings directly. Use exe-os install/update paths or ask the coordinator to approve the settings change.`;
165
171
  }
166
172
 
173
+ // src/lib/remote-ref-delete-guard.ts
174
+ var REF_DELETE_OVERRIDE_ENV = "EXE_FORCE_ALLOW_REMOTE_REF_DELETE";
175
+ var REF_DELETE_OVERRIDE_TOKEN = `${REF_DELETE_OVERRIDE_ENV}=1`;
176
+ var SHELLS = /* @__PURE__ */ new Set(["sh", "bash", "zsh", "dash", "ksh"]);
177
+ var HTTP_CLIENTS = /* @__PURE__ */ new Set(["curl", "wget", "http", "https", "httpie"]);
178
+ function basename(tok) {
179
+ return tok.split("/").pop() ?? tok;
180
+ }
181
+ function isProgram(tok, name) {
182
+ return basename(tok) === name;
183
+ }
184
+ function isShellProgram(tok) {
185
+ return SHELLS.has(basename(tok));
186
+ }
187
+ function isDashC(tok) {
188
+ return /^-[a-z]*c[a-z]*$/i.test(tok) && tok.includes("c");
189
+ }
190
+ function methodFlagValue(tok, next) {
191
+ let m = /^(?:-X|--method|--request)=(.+)$/i.exec(tok);
192
+ if (m) return m[1];
193
+ m = /^-X(.+)$/.exec(tok);
194
+ if (m) return m[1];
195
+ if (/^(?:-X|--method|--request)$/i.test(tok)) return next ?? null;
196
+ return null;
197
+ }
198
+ function hasDeleteMethod(tokens) {
199
+ for (let i = 0; i < tokens.length; i++) {
200
+ const v = methodFlagValue(tokens[i], tokens[i + 1]);
201
+ if (v && v.trim().toUpperCase() === "DELETE") return true;
202
+ }
203
+ return false;
204
+ }
205
+ function refPathOf(tok) {
206
+ const m = /(?:^|[/\s])git\/refs\/([^\s?#'"]+)/.exec(tok);
207
+ if (!m) return null;
208
+ return m[1].replace(/\/+$/, "");
209
+ }
210
+ function isTagRef(refPath) {
211
+ return /^tags\//.test(refPath);
212
+ }
213
+ function firstNonTagRef(tokens) {
214
+ for (const t of tokens) {
215
+ const ref = refPathOf(t);
216
+ if (ref && !isTagRef(ref)) return ref;
217
+ }
218
+ return null;
219
+ }
220
+ function looksLikeGitHubApi(tok) {
221
+ return /api\.github\.com|\/api\/v3\/|\/api\/graphql/.test(tok);
222
+ }
223
+ function mentionsDeleteRefMutation(text) {
224
+ return /\bdeleteRef\b/.test(text);
225
+ }
226
+ function hasStdinRedirect(segment) {
227
+ let inSingle = false;
228
+ let inDouble = false;
229
+ for (let i = 0; i < segment.length; i++) {
230
+ const ch = segment[i];
231
+ if (ch === "\\") {
232
+ i++;
233
+ continue;
234
+ }
235
+ if (inSingle) {
236
+ if (ch === "'") inSingle = false;
237
+ continue;
238
+ }
239
+ if (inDouble) {
240
+ if (ch === '"') inDouble = false;
241
+ continue;
242
+ }
243
+ if (ch === "'") {
244
+ inSingle = true;
245
+ continue;
246
+ }
247
+ if (ch === '"') {
248
+ inDouble = true;
249
+ continue;
250
+ }
251
+ if (ch === "<") return true;
252
+ }
253
+ return false;
254
+ }
255
+ function hasExternalPayload(tokens) {
256
+ for (let i = 0; i < tokens.length; i++) {
257
+ const t = tokens[i];
258
+ if (/^(?:--input|-T|--upload-file)$/.test(t)) return true;
259
+ if (/^--input=/.test(t)) return true;
260
+ if (t.startsWith("@")) return true;
261
+ if (/=@/.test(t)) return true;
262
+ if (t.startsWith("-") && t.includes("@")) return true;
263
+ }
264
+ return false;
265
+ }
266
+ var WRAPPERS = /* @__PURE__ */ new Set(["env", "command", "builtin", "exec", "nohup", "time", "stdbuf", "nice", "ionice", "setsid", "timeout", "caffeinate"]);
267
+ function stripWrappers(tokens, depth = 0) {
268
+ if (depth > 6) return { kind: "argv", argv: [...tokens] };
269
+ let i = 0;
270
+ while (i < tokens.length && /^[A-Za-z_][A-Za-z0-9_]*=/.test(tokens[i])) i++;
271
+ const head = tokens[i];
272
+ if (head === void 0) return { kind: "argv", argv: [] };
273
+ if (!WRAPPERS.has(basename(head))) return { kind: "argv", argv: tokens.slice(i) };
274
+ let j = i + 1;
275
+ while (j < tokens.length) {
276
+ const t = tokens[j];
277
+ if (t.startsWith("-")) {
278
+ const inlineSplit = /^--split-string=(.*)$/.exec(t) ?? /^-S(.+)$/.exec(t);
279
+ if (inlineSplit) return { kind: "nested", script: inlineSplit[1] };
280
+ if (/^(?:-S|--split-string)$/.test(t)) {
281
+ const script = tokens[j + 1];
282
+ if (script !== void 0) return { kind: "nested", script };
283
+ return { kind: "argv", argv: tokens.slice(i) };
284
+ }
285
+ if (/^(?:-u|--unset|-n|-k|--kill-after|-s|--signal)$/.test(t)) j++;
286
+ j++;
287
+ continue;
288
+ }
289
+ if (/^[A-Za-z_][A-Za-z0-9_]*=/.test(t)) {
290
+ j++;
291
+ continue;
292
+ }
293
+ if (basename(head) === "timeout" && /^[0-9]+(?:\.[0-9]+)?[smhd]?$/.test(t)) {
294
+ j++;
295
+ continue;
296
+ }
297
+ break;
298
+ }
299
+ if (j >= tokens.length) return { kind: "argv", argv: tokens.slice(i) };
300
+ return stripWrappers(tokens.slice(j), depth + 1);
301
+ }
302
+ function shellScripts(tokens) {
303
+ const out = [];
304
+ for (let i = 0; i < tokens.length; i++) {
305
+ if (!isShellProgram(tokens[i])) continue;
306
+ for (let j = i + 1; j < tokens.length; j++) {
307
+ if (!isDashC(tokens[j])) continue;
308
+ const script = tokens[j + 1];
309
+ if (script !== void 0) out.push(script);
310
+ }
311
+ }
312
+ return out;
313
+ }
314
+ function positionalsAfter(tokens, startIndex) {
315
+ const out = [];
316
+ for (let i = startIndex; i < tokens.length; i++) {
317
+ const t = tokens[i];
318
+ if (t.startsWith("-")) {
319
+ if (/^(?:-X|--method|--request|-f|-F|--field|--raw-field|-H|--header|--input|--hostname|--jq|-q|--template|-t|-d|--data|--data-raw|--data-binary|-o|--output|-u|--user|-A|--user-agent|-e|--referer)$/i.test(t)) i++;
320
+ continue;
321
+ }
322
+ if (/^[A-Za-z_][A-Za-z0-9_.-]*=/.test(t)) continue;
323
+ out.push(t);
324
+ }
325
+ return out;
326
+ }
327
+ function blockMessage(spelling, target) {
328
+ return `\u{1F6D1} BLOCKED: remote ref DELETION via ${spelling}.
329
+
330
+ ` + (target ? `TARGET: refs/${target}
331
+
332
+ ` : "") + `WHY: deleting a remote ref destroys the only copy of any work that lives only on it, and this repo's policy allows remote deletes only for TAGS. Blocking the git spelling while leaving the REST/GraphQL spelling open made the guard bypassable in one step (bug c0547f31), so the gate is on the OPERATION now, whatever tool performs it.
333
+
334
+ INSTEAD:
335
+ \u2022 Prove the work landed first: exe-os repo-truth
336
+ \u2022 Keep a recovery point: git fetch origin <branch> && git branch keep/<branch> FETCH_HEAD
337
+ \u2022 Ask the ref's owner, or delete it in the GitHub UI where the act is attributable.
338
+
339
+ OVERRIDE (deliberate, audited): prefix the command with ${REF_DELETE_OVERRIDE_TOKEN}.
340
+ The shared-main guard runs FIRST and independently covers the \`gh api\` REST
341
+ spelling, so for that one you need BOTH tokens: ${MAIN_GUARD_OVERRIDE_TOKEN} ${REF_DELETE_OVERRIDE_TOKEN} <command>`;
342
+ }
343
+ function evaluateSegment(segment, depth) {
344
+ if (depth > 3) {
345
+ return {
346
+ block: true,
347
+ message: blockMessage("a pathologically nested shell invocation", null),
348
+ spelling: "nested-shell",
349
+ target: null
350
+ };
351
+ }
352
+ const { tokens } = tokenizeShell(segment);
353
+ if (tokens.length === 0) return { block: false };
354
+ for (const script of shellScripts(tokens)) {
355
+ const inner = evaluateCommandInternal(script, depth + 1);
356
+ if (inner.block) return inner;
357
+ }
358
+ const unwrapped = stripWrappers(tokens);
359
+ if (unwrapped.kind === "nested") return evaluateCommandInternal(unwrapped.script, depth + 1);
360
+ const argv = unwrapped.argv;
361
+ const program = argv[0];
362
+ if (!program) return { block: false };
363
+ if (isProgram(program, "gh")) {
364
+ const allOperands = positionalsAfter(argv, 1);
365
+ const apiIndex = allOperands.indexOf("api");
366
+ if (apiIndex === -1) return { block: false };
367
+ const operands = allOperands.slice(apiIndex + 1);
368
+ if (operands.includes("graphql")) {
369
+ if (mentionsDeleteRefMutation(segment)) {
370
+ return {
371
+ block: true,
372
+ message: blockMessage("a `gh api graphql` deleteRef mutation", null),
373
+ spelling: "gh-api-graphql-deleteRef",
374
+ target: null
375
+ };
376
+ }
377
+ if (hasExternalPayload(argv) || hasStdinRedirect(segment)) {
378
+ return {
379
+ block: true,
380
+ message: blockMessage("a `gh api graphql` call whose payload is read from a file, stdin, or a redirect", null),
381
+ spelling: "gh-api-graphql-opaque-payload",
382
+ target: null
383
+ };
384
+ }
385
+ }
386
+ if (!hasDeleteMethod(argv)) return { block: false };
387
+ const ref = firstNonTagRef(operands);
388
+ if (!ref) return { block: false };
389
+ return {
390
+ block: true,
391
+ message: blockMessage("a `gh api` DELETE on a git ref", ref),
392
+ spelling: "gh-api-delete",
393
+ target: ref
394
+ };
395
+ }
396
+ if (HTTP_CLIENTS.has(basename(program))) {
397
+ if (!argv.some((t) => looksLikeGitHubApi(t))) return { block: false };
398
+ if (mentionsDeleteRefMutation(segment)) {
399
+ return {
400
+ block: true,
401
+ message: blockMessage(`a \`${basename(program)}\` GitHub GraphQL deleteRef mutation`, null),
402
+ spelling: "http-graphql-deleteRef",
403
+ target: null
404
+ };
405
+ }
406
+ if (argv.some((t) => /\/graphql\b/.test(t)) && (hasExternalPayload(argv) || hasStdinRedirect(segment))) {
407
+ return {
408
+ block: true,
409
+ message: blockMessage(`a \`${basename(program)}\` GitHub GraphQL call whose payload is read from a file, stdin, or a redirect`, null),
410
+ spelling: "http-graphql-opaque-payload",
411
+ target: null
412
+ };
413
+ }
414
+ const bareVerb = argv.slice(1).some((t) => t === "DELETE");
415
+ if (!hasDeleteMethod(argv) && !bareVerb) return { block: false };
416
+ const ref = firstNonTagRef(argv);
417
+ if (!ref) return { block: false };
418
+ return {
419
+ block: true,
420
+ message: blockMessage(`a \`${basename(program)}\` DELETE on a GitHub git ref`, ref),
421
+ spelling: "http-delete",
422
+ target: ref
423
+ };
424
+ }
425
+ return { block: false };
426
+ }
427
+ function evaluateCommandInternal(command, depth) {
428
+ for (const segment of splitShellSegments(command)) {
429
+ const d = evaluateSegment(segment, depth);
430
+ if (d.block) return d;
431
+ }
432
+ return { block: false };
433
+ }
434
+ function evaluateRemoteRefDeleteGuard(command, env = process.env) {
435
+ try {
436
+ if (env[REF_DELETE_OVERRIDE_ENV] === "1") return { block: false, overridden: true };
437
+ if (new RegExp(String.raw`^\s*${REF_DELETE_OVERRIDE_ENV}=1\s`).test(command)) {
438
+ return { block: false, overridden: true };
439
+ }
440
+ return evaluateCommandInternal(command, 0);
441
+ } catch {
442
+ return { block: false };
443
+ }
444
+ }
445
+
167
446
  // src/adapters/claude/hooks/pre-tool-use.ts
168
447
  process.on("uncaughtException", (err) => {
169
448
  console.error(`[exe-os:hook:pre-tool-use] FATAL: ${err instanceof Error ? err.stack ?? err.message : String(err)}`);
@@ -174,7 +453,7 @@ process.on("unhandledRejection", (err) => {
174
453
  process.exit(1);
175
454
  });
176
455
  try {
177
- const { verifyOrBlock } = await import("../hook-integrity-CF567MVN.js");
456
+ const { verifyOrBlock } = await import("../hook-integrity-KGAV6ZC2.js");
178
457
  if (!await verifyOrBlock(new URL(import.meta.url).pathname)) process.exit(2);
179
458
  } catch (err) {
180
459
  const code = err?.code;
@@ -195,9 +474,19 @@ if (!process.env.AGENT_ID) {
195
474
  var DELEGATION_TASK_THRESHOLD = 3;
196
475
  var CTO_ROLES = ["CTO", "executive"];
197
476
  var CACHE_DIR = path2.join(EXE_AI_DIR, "session-cache");
477
+ var PRE_TOOL_SAFEGUARD_MS = Number(process.env.EXE_HOOK_PRE_TOOL_TIMEOUT_MS) || 5e3;
478
+ var hookStdoutWritten = false;
479
+ function emitDegradedProceedOnce() {
480
+ if (hookStdoutWritten) return;
481
+ hookStdoutWritten = true;
482
+ process.stdout.write(
483
+ JSON.stringify({ hookSpecificOutput: { hookEventName: "PreToolUse" } })
484
+ );
485
+ }
198
486
  var timeout = setTimeout(() => {
487
+ emitDegradedProceedOnce();
199
488
  process.exit(0);
200
- }, 5e3);
489
+ }, PRE_TOOL_SAFEGUARD_MS);
201
490
  timeout.unref();
202
491
  function getDelegationFlagPath() {
203
492
  return path2.join(CACHE_DIR, `delegation-checkpoint-${getSessionKey()}.json`);
@@ -322,7 +611,7 @@ process.stdin.on("end", async () => {
322
611
  let wroteStdout = false;
323
612
  try {
324
613
  if (data.tool_name === "Task" || data.tool_name === "Agent") {
325
- const { recordSpawnFromPreToolPayload } = await import("../subagent-spawn-ledger-USYZXU3M.js");
614
+ const { recordSpawnFromPreToolPayload } = await import("../subagent-spawn-ledger-E6U3OY6Z.js");
326
615
  recordSpawnFromPreToolPayload(data);
327
616
  }
328
617
  } catch {
@@ -332,11 +621,11 @@ process.stdin.on("end", async () => {
332
621
  const ti = data.tool_input;
333
622
  const haystack = `${ti?.description ?? ""}
334
623
  ${ti?.prompt ?? ""}`;
335
- const { extractWorkRefCandidates } = await import("../work-claims-MNK7PEPW.js");
624
+ const { extractWorkRefCandidates } = await import("../work-claims-B73X5NE7.js");
336
625
  if (extractWorkRefCandidates(haystack).length > 0) {
337
- const { fastDbInit } = await import("../fast-db-init-SCTOOIUT.js");
626
+ const { fastDbInit } = await import("../fast-db-init-L2RGKJWH.js");
338
627
  await fastDbInit({ caller: "hook" });
339
- const { findConflictsInText, describeConflict, resolveHolderSession } = await import("../work-claims-MNK7PEPW.js");
628
+ const { findConflictsInText, describeConflict, resolveHolderSession } = await import("../work-claims-B73X5NE7.js");
340
629
  const holderSession = await resolveHolderSession();
341
630
  if (holderSession) {
342
631
  const conflicts = await findConflictsInText(haystack, holderSession);
@@ -371,6 +660,51 @@ Session ${holderSession} does not hold this. Two sessions doing the same work is
371
660
  );
372
661
  }
373
662
  }
663
+ if (data.tool_name === "Task" || data.tool_name === "Agent") {
664
+ try {
665
+ const { evaluateNestedSpawnGuard } = await import("../worktree-ownership-guard-OUWJROW2.js");
666
+ const nestedDecision = evaluateNestedSpawnGuard({
667
+ toolName: data.tool_name,
668
+ toolInput: data.tool_input,
669
+ cwd: data.cwd ?? process.cwd()
670
+ });
671
+ if (nestedDecision.outcome === "block") {
672
+ process.stderr.write(`[pre-tool-use] nested-spawn isolation BLOCKED ${data.tool_name}
673
+ `);
674
+ process.stdout.write(JSON.stringify({
675
+ hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny" },
676
+ systemMessage: nestedDecision.reason
677
+ }));
678
+ process.exit(0);
679
+ }
680
+ } catch (err) {
681
+ process.stderr.write(`[pre-tool-use] nested-spawn guard degraded (non-fatal): ${err instanceof Error ? err.message : String(err)}
682
+ `);
683
+ }
684
+ }
685
+ if (["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit"].includes(data.tool_name)) {
686
+ try {
687
+ const { evaluateWorktreeOwnership } = await import("../worktree-ownership-guard-OUWJROW2.js");
688
+ const ownershipDecision = evaluateWorktreeOwnership({
689
+ toolName: data.tool_name,
690
+ cwd: data.cwd ?? process.cwd(),
691
+ actorAgentId: data.agent_id ?? null,
692
+ sessionKey: getSessionKey()
693
+ });
694
+ if (ownershipDecision.outcome === "block") {
695
+ process.stderr.write(`[pre-tool-use] worktree-ownership BLOCKED ${data.tool_name}
696
+ `);
697
+ process.stdout.write(JSON.stringify({
698
+ hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny" },
699
+ systemMessage: ownershipDecision.reason
700
+ }));
701
+ process.exit(0);
702
+ }
703
+ } catch (err) {
704
+ process.stderr.write(`[pre-tool-use] worktree-ownership guard degraded (non-fatal): ${err instanceof Error ? err.message : String(err)}
705
+ `);
706
+ }
707
+ }
374
708
  if (data.tool_name === "Bash") {
375
709
  const command = data.tool_input?.command ?? "";
376
710
  const isCoordinator = canCoordinate(agent.agentId, agent.agentRole);
@@ -387,6 +721,26 @@ Session ${holderSession} does not hold this. Two sessions doing the same work is
387
721
  if (guard.overridden) {
388
722
  process.stderr.write(
389
723
  `[pre-tool-use] MAIN-GUARD OVERRIDE used \u2014 destructive main-rewrite allowed via EXE_FORCE_ALLOW_MAIN_HISTORY_REWRITE=1: ${command}
724
+ `
725
+ );
726
+ }
727
+ }
728
+ {
729
+ const refGuard = evaluateRemoteRefDeleteGuard(command, process.env);
730
+ if (refGuard.block) {
731
+ process.stderr.write(
732
+ `[pre-tool-use] remote-ref-delete BLOCKED (${refGuard.spelling}): ${command}
733
+ `
734
+ );
735
+ process.stdout.write(JSON.stringify({
736
+ hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny" },
737
+ systemMessage: refGuard.message
738
+ }));
739
+ process.exit(0);
740
+ }
741
+ if (refGuard.overridden) {
742
+ process.stderr.write(
743
+ `[pre-tool-use] REF-DELETE OVERRIDE used \u2014 remote ref deletion allowed via EXE_FORCE_ALLOW_REMOTE_REF_DELETE=1: ${command}
390
744
  `
391
745
  );
392
746
  }
@@ -395,7 +749,7 @@ Session ${holderSession} does not hold this. Two sessions doing the same work is
395
749
  let decision = null;
396
750
  let guardError = null;
397
751
  try {
398
- const { evaluateDestructiveDataGuard, formatAllowAudit } = await import("../destructive-data-guard-6I5MDFVD.js");
752
+ const { evaluateDestructiveDataGuard, formatAllowAudit } = await import("../destructive-data-guard-BVFWPPIS.js");
399
753
  const result = evaluateDestructiveDataGuard(command, { cwd: process.cwd(), env: process.env });
400
754
  decision = result;
401
755
  if (!result.block && result.ops.length > 0) {
@@ -664,7 +1018,7 @@ Do NOT report this as successful. No file was changed. If you are a sub-agent, r
664
1018
  process.exit(0);
665
1019
  }
666
1020
  }
667
- const { getGatedAgent } = await import("../cto-delegation-gate-SZCE34LB.js");
1021
+ const { getGatedAgent } = await import("../cto-delegation-gate-LQHVLEMW.js");
668
1022
  const gatedAgent = getGatedAgent();
669
1023
  if (agent.agentId === gatedAgent) {
670
1024
  const isStructured = /^(Write|Edit|MultiEdit|NotebookEdit)$/.test(data.tool_name);
@@ -676,7 +1030,7 @@ Do NOT report this as successful. No file was changed. If you are a sub-agent, r
676
1030
  evaluateDelegationGate,
677
1031
  evaluateBashWriteGate,
678
1032
  GATE_BLOCK_MESSAGE
679
- } = await import("../cto-delegation-gate-SZCE34LB.js");
1033
+ } = await import("../cto-delegation-gate-LQHVLEMW.js");
680
1034
  let decision = null;
681
1035
  let surfaceLabel = data.tool_name;
682
1036
  let targetLabel = "";
@@ -685,7 +1039,7 @@ Do NOT report this as successful. No file was changed. If you are a sub-agent, r
685
1039
  const filePath = data.tool_name === "NotebookEdit" ? ti.notebook_path ?? "" : ti.file_path ?? "";
686
1040
  const content = data.tool_name === "MultiEdit" ? (ti.edits ?? []).map((e) => e.new_string ?? "").filter(Boolean) : data.tool_name === "NotebookEdit" ? ti.new_source : ti.content ?? ti.new_string;
687
1041
  if (filePath) {
688
- const { fastDbInit } = await import("../fast-db-init-SCTOOIUT.js");
1042
+ const { fastDbInit } = await import("../fast-db-init-L2RGKJWH.js");
689
1043
  await fastDbInit({ caller: "hook" });
690
1044
  targetLabel = filePath;
691
1045
  decision = await evaluateDelegationGate({
@@ -698,10 +1052,10 @@ Do NOT report this as successful. No file was changed. If you are a sub-agent, r
698
1052
  }
699
1053
  } else {
700
1054
  const command = data.tool_input?.command ?? "";
701
- const { detectBashSourceWrites } = await import("../cto-delegation-gate-SZCE34LB.js");
1055
+ const { detectBashSourceWrites } = await import("../cto-delegation-gate-LQHVLEMW.js");
702
1056
  const targets = detectBashSourceWrites(command, process.cwd());
703
1057
  if (targets.length > 0) {
704
- const { fastDbInit } = await import("../fast-db-init-SCTOOIUT.js");
1058
+ const { fastDbInit } = await import("../fast-db-init-L2RGKJWH.js");
705
1059
  await fastDbInit({ caller: "hook" });
706
1060
  surfaceLabel = "Bash-write";
707
1061
  targetLabel = targets.join(", ");
@@ -778,7 +1132,7 @@ Reason: ${decision.reason ?? "engineer-delegatable edit"}`;
778
1132
  const isUpdateTaskDone = (data.tool_name === "mcp__exe-os__update_task" || data.tool_name === "mcp__exe-mem__update_task") && toolInput.status === "done" && CTO_ROLES.includes(agent.agentRole);
779
1133
  if (isUpdateTaskDone) {
780
1134
  try {
781
- const { fastDbInit } = await import("../fast-db-init-SCTOOIUT.js");
1135
+ const { fastDbInit } = await import("../fast-db-init-L2RGKJWH.js");
782
1136
  const client = await fastDbInit({ caller: "hook" });
783
1137
  const taskId = String(toolInput.task_id ?? "");
784
1138
  const ptScope = sessionScopeFilter();
@@ -836,7 +1190,7 @@ Reason: ${decision.reason ?? "engineer-delegatable edit"}`;
836
1190
  }
837
1191
  if (data.agent_type == null && CTO_ROLES.includes(agent.agentRole) && !hasDelegationFired()) {
838
1192
  try {
839
- const { fastDbInit } = await import("../fast-db-init-SCTOOIUT.js");
1193
+ const { fastDbInit } = await import("../fast-db-init-L2RGKJWH.js");
840
1194
  const client = await fastDbInit({ caller: "hook" });
841
1195
  const dlScope = sessionScopeFilter();
842
1196
  const result = await client.execute({
@@ -873,6 +1227,7 @@ Reason: ${decision.reason ?? "engineer-delegatable edit"}`;
873
1227
  });
874
1228
  process.stdout.write(output);
875
1229
  wroteStdout = true;
1230
+ hookStdoutWritten = true;
876
1231
  }
877
1232
  }
878
1233
  } catch {
@@ -907,7 +1262,7 @@ Do NOT attempt workarounds \u2014 direct DB access bypasses encryption, breaks d
907
1262
  }
908
1263
  if (!wroteStdout && data.agent_type != null) {
909
1264
  try {
910
- const { buildSubagentBootstrapContext } = await import("../subagent-brief-injection-OHLWLECQ.js");
1265
+ const { buildSubagentBootstrapContext } = await import("../subagent-brief-injection-ED36PLYY.js");
911
1266
  const subagentBrief = await buildSubagentBootstrapContext(data);
912
1267
  if (subagentBrief) {
913
1268
  const output = JSON.stringify({
@@ -918,6 +1273,7 @@ Do NOT attempt workarounds \u2014 direct DB access bypasses encryption, breaks d
918
1273
  });
919
1274
  process.stdout.write(output);
920
1275
  wroteStdout = true;
1276
+ hookStdoutWritten = true;
921
1277
  }
922
1278
  } catch {
923
1279
  }
@@ -943,7 +1299,7 @@ Do NOT attempt workarounds \u2014 direct DB access bypasses encryption, breaks d
943
1299
  writeFileSync(throttlePath, JSON.stringify({ ts: Date.now() }));
944
1300
  } catch {
945
1301
  }
946
- const { fastDbInit } = await import("../fast-db-init-SCTOOIUT.js");
1302
+ const { fastDbInit } = await import("../fast-db-init-L2RGKJWH.js");
947
1303
  const client = await fastDbInit({ daemonOnly: true, caller: "hook" });
948
1304
  const { isInitialized } = await import("../lib/database.js");
949
1305
  if (isInitialized()) {
@@ -970,6 +1326,7 @@ Do NOT attempt workarounds \u2014 direct DB access bypasses encryption, breaks d
970
1326
  });
971
1327
  process.stdout.write(output);
972
1328
  wroteStdout = true;
1329
+ hookStdoutWritten = true;
973
1330
  }
974
1331
  }
975
1332
  }
@@ -977,6 +1334,7 @@ Do NOT attempt workarounds \u2014 direct DB access bypasses encryption, breaks d
977
1334
  }
978
1335
  }
979
1336
  } catch {
1337
+ emitDegradedProceedOnce();
980
1338
  }
981
1339
  clearTimeout(timeout);
982
1340
  process.exit(0);