@askexenow/exe-os 0.9.364 → 0.9.367

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 (433) hide show
  1. package/deploy/compose/.env.customer.example +36 -1
  2. package/deploy/compose/.env.example +39 -1
  3. package/deploy/compose/docker-compose.yml +131 -19
  4. package/deploy/compose/generate-env.ts +65 -1
  5. package/deploy/stack-manifests/v0.9.json +117 -2
  6. package/dist/.dist-verified.json +3 -3
  7. package/dist/{active-agent-WL3VEPS3.js → active-agent-R6Q7UEUD.js} +6 -6
  8. package/dist/{active-agent-MVEEEKUD.js → active-agent-V3CUDNED.js} +6 -6
  9. package/dist/{agent-defs-generator-MLQ4ULA2.js → agent-defs-generator-MLPRGY75.js} +5 -5
  10. package/dist/agent-heartbeat-CQPGJIFF.js +13 -0
  11. package/dist/{agent-loop-E7RZCFDB.js → agent-loop-FOK2IRZQ.js} +1 -1
  12. package/dist/{agentic-ontology-X3JMWNAM.js → agentic-ontology-5FMQWGDZ.js} +1 -1
  13. package/dist/{artifact-backup-6VQ2332X.js → artifact-backup-767STHSW.js} +1 -1
  14. package/dist/{backfill-gate-BWFX6B55.js → backfill-gate-VX2RZTQV.js} +2 -2
  15. package/dist/{backfill-metadata-FFDTWSGA.js → backfill-metadata-YXUMCKRV.js} +7 -7
  16. package/dist/{background-jobs-EB4BPQMT.js → background-jobs-LTPWCMA3.js} +2 -2
  17. package/dist/{backup-verify-BZQ5RI5I.js → backup-verify-GYHKAX7K.js} +3 -3
  18. package/dist/{behavior-injection-U7FGR6VM.js → behavior-injection-7VGYY2KO.js} +13 -12
  19. package/dist/{behaviors-NLOMQW34.js → behaviors-O6HKTSOF.js} +12 -11
  20. package/dist/bin/age-ontology-load.js +2 -2
  21. package/dist/bin/agentic-ontology-backfill.js +9 -9
  22. package/dist/bin/agentic-reflection-backfill.js +10 -10
  23. package/dist/bin/agentic-semantic-label.js +9 -9
  24. package/dist/bin/backfill-conversations.js +10 -9
  25. package/dist/bin/backfill-responses.js +10 -9
  26. package/dist/bin/backfill-vectors.js +14 -13
  27. package/dist/bin/bulk-sync-postgres.js +19 -18
  28. package/dist/bin/cc-doctor.js +11 -9
  29. package/dist/bin/cleanup-stale-review-tasks.js +23 -21
  30. package/dist/bin/cli.js +25 -25
  31. package/dist/bin/deferred-daemon-restart.js +105 -100
  32. package/dist/bin/exe-agent-config.js +5 -5
  33. package/dist/bin/exe-agent.js +258 -20
  34. package/dist/bin/exe-assign.js +12 -11
  35. package/dist/bin/exe-boot.js +49 -46
  36. package/dist/bin/exe-call.js +7 -7
  37. package/dist/bin/exe-cloud.js +21 -20
  38. package/dist/bin/exe-config-dump.js +5 -5
  39. package/dist/bin/exe-dispatch.js +24 -22
  40. package/dist/bin/exe-doctor.js +10 -9
  41. package/dist/bin/exe-export-behaviors.js +14 -13
  42. package/dist/bin/exe-forget.js +9 -9
  43. package/dist/bin/exe-gateway.js +9 -9
  44. package/dist/bin/exe-grant.js +5 -5
  45. package/dist/bin/exe-healthcheck.js +11 -9
  46. package/dist/bin/exe-heartbeat.js +29 -27
  47. package/dist/bin/exe-kill.js +27 -25
  48. package/dist/bin/exe-launch-agent.js +35 -33
  49. package/dist/bin/exe-mcp.js +5 -5
  50. package/dist/bin/exe-memory-reads.js +7 -7
  51. package/dist/bin/exe-new-employee.js +11 -11
  52. package/dist/bin/exe-os-mcp-proxy.js +5 -5
  53. package/dist/bin/exe-pending-messages.js +24 -22
  54. package/dist/bin/exe-pending-notifications.js +23 -21
  55. package/dist/bin/exe-pending-reviews.js +24 -22
  56. package/dist/bin/exe-rename.js +7 -7
  57. package/dist/bin/exe-review.js +26 -24
  58. package/dist/bin/exe-search.js +8 -8
  59. package/dist/bin/exe-session-cleanup.js +28 -26
  60. package/dist/bin/exe-settings.js +20 -19
  61. package/dist/bin/exe-start-codex.js +28 -19
  62. package/dist/bin/exe-start-opencode.js +15 -14
  63. package/dist/bin/exe-status.js +25 -23
  64. package/dist/bin/exe-support.js +4 -4
  65. package/dist/bin/exe-team.js +6 -6
  66. package/dist/bin/exe-watchdog.js +16 -6
  67. package/dist/bin/git-sweep.js +32 -22
  68. package/dist/bin/graph-backfill.js +9 -9
  69. package/dist/bin/graph-export.js +8 -8
  70. package/dist/bin/import-history.js +12 -12
  71. package/dist/bin/install.js +107 -102
  72. package/dist/bin/intercom-check.js +5 -5
  73. package/dist/bin/mcp-sessions.js +2 -2
  74. package/dist/bin/orchestration-metrics.js +6 -6
  75. package/dist/bin/postgres-agentic-reflection-backfill.js +4 -4
  76. package/dist/bin/postgres-agentic-semantic-backfill.js +3 -3
  77. package/dist/bin/pre-publish.js +1 -1
  78. package/dist/bin/reconcile-backlog.js +2 -2
  79. package/dist/bin/registry-proxy.js +1 -1
  80. package/dist/bin/scan-tasks.js +23 -21
  81. package/dist/bin/setup.js +3 -3
  82. package/dist/bin/shard-migrate.js +8 -8
  83. package/dist/bin/stack-update.js +115 -40
  84. package/dist/bin/verify-stack.js +6 -1
  85. package/dist/bin/vps-health-gate.js +1 -1
  86. package/dist/{boot-generation-LGWKWMCF.js → boot-generation-EZ2Y74IG.js} +5 -5
  87. package/dist/{boot-review-sections-IXBD7UGL.js → boot-review-sections-7CNQTAYR.js} +22 -20
  88. package/dist/{branch-hygiene-UYHJ5SC5.js → branch-hygiene-HFJ3HA62.js} +1 -1
  89. package/dist/{branding-J2MTHQUP.js → branding-GH43W3PU.js} +2 -2
  90. package/dist/build-manifest.json +1072 -1032
  91. package/dist/{capability-cards-3OGBIJRM.js → capability-cards-ZTFMK4VJ.js} +4 -4
  92. package/dist/{capacity-monitor-6VDEATYE.js → capacity-monitor-B2XU4YHP.js} +24 -22
  93. package/dist/{catchup-brief-XYX5SOC6.js → catchup-brief-3BEOL7EV.js} +27 -25
  94. package/dist/{chunk-H5G2VUIX.js → chunk-25EN7XXN.js} +6 -6
  95. package/dist/{chunk-SCGQOY5F.js → chunk-267QB6VB.js} +1 -1
  96. package/dist/{chunk-UXX2JSZO.js → chunk-2ADYTOHQ.js} +20 -1
  97. package/dist/{chunk-7ZBIZFC3.js → chunk-2CWS374F.js} +1 -1
  98. package/dist/{chunk-QY6B23U2.js → chunk-2IZH6W73.js} +3 -3
  99. package/dist/{chunk-OJ56HXDB.js → chunk-3CIMDFXG.js} +1 -1
  100. package/dist/{chunk-B5T43JSQ.js → chunk-4DJDC4Y2.js} +13 -13
  101. package/dist/{chunk-6BDSDDKT.js → chunk-4WOOCTON.js} +3 -3
  102. package/dist/{chunk-P7JLMFKX.js → chunk-52CFP2AV.js} +1 -1
  103. package/dist/{chunk-Y2DUIE6X.js → chunk-53LCVVX5.js} +2 -2
  104. package/dist/{chunk-CAV64C4J.js → chunk-5CH6XKVC.js} +2 -2
  105. package/dist/{chunk-6WBEFNO4.js → chunk-65ZSFW3O.js} +1 -1
  106. package/dist/{chunk-AU7AVWTM.js → chunk-66BFQOWR.js} +4 -4
  107. package/dist/{chunk-HJQILEBL.js → chunk-6MCUXRIP.js} +1 -1
  108. package/dist/{chunk-RKUGAHPO.js → chunk-6NJURKRG.js} +1 -1
  109. package/dist/{chunk-XE23TMKN.js → chunk-7W5LCREK.js} +82 -14
  110. package/dist/{chunk-U4KDN5B7.js → chunk-7W6FDHHY.js} +1 -1
  111. package/dist/{chunk-E6ORBQHP.js → chunk-AAMGHW5W.js} +1 -0
  112. package/dist/{chunk-ZT5PSVWW.js → chunk-AE3PYLLS.js} +11 -11
  113. package/dist/{chunk-G4XMAGTW.js → chunk-AEVE654G.js} +2 -2
  114. package/dist/{chunk-JCVDT3DG.js → chunk-ALKYXAMB.js} +5 -5
  115. package/dist/{chunk-74H5NWLY.js → chunk-ALYI3P5D.js} +2 -2
  116. package/dist/{chunk-FXPWMPU2.js → chunk-BNHAZ65R.js} +42 -50
  117. package/dist/{chunk-UCSD67VW.js → chunk-BQYQES2Z.js} +14 -14
  118. package/dist/{chunk-7WVR5UQF.js → chunk-BTMX2D4X.js} +12 -12
  119. package/dist/chunk-BTSWFMEH.js +14 -0
  120. package/dist/{chunk-W33NLSKN.js → chunk-BY3V5CLX.js} +6 -5
  121. package/dist/{chunk-Z75FBAP2.js → chunk-CDUB5Q6J.js} +1 -1
  122. package/dist/{chunk-W3Q53NBI.js → chunk-CKKLSY7B.js} +299 -26
  123. package/dist/{chunk-NQKZKOYF.js → chunk-CTPG4KYZ.js} +1 -1
  124. package/dist/{chunk-VFYF7EMB.js → chunk-CW2UCKHS.js} +2 -2
  125. package/dist/{chunk-RSDCOZVM.js → chunk-CWBFOAGM.js} +2 -2
  126. package/dist/{chunk-HJVXKDEK.js → chunk-CX4MVEM3.js} +1 -1
  127. package/dist/{chunk-X24VCGZA.js → chunk-CYNL3ZFD.js} +3 -3
  128. package/dist/{chunk-YNR3DSAF.js → chunk-DTTISDTI.js} +2 -2
  129. package/dist/{chunk-6NGFGT23.js → chunk-DXCTHNEF.js} +57 -25
  130. package/dist/{chunk-MM45YT2B.js → chunk-E5HAY3DQ.js} +1 -1
  131. package/dist/{chunk-KSVLBATT.js → chunk-E5QQZDQN.js} +53 -0
  132. package/dist/{chunk-TLBAZU3V.js → chunk-EDZ5URGR.js} +1 -1
  133. package/dist/{chunk-J2OTTJWG.js → chunk-F3PIHVVY.js} +2 -2
  134. package/dist/{chunk-4DJCHH5R.js → chunk-FSIAGX55.js} +1 -1
  135. package/dist/{chunk-HEFM2DBN.js → chunk-GTOMDMJL.js} +21 -27
  136. package/dist/{chunk-6G6JGJD3.js → chunk-GUOMZ3JM.js} +2 -2
  137. package/dist/{chunk-G6EUAI67.js → chunk-H37FSTF2.js} +1 -1
  138. package/dist/{chunk-IR2MLURD.js → chunk-H74466TM.js} +1 -1
  139. package/dist/{chunk-ZACPAM2C.js → chunk-HHGOCBVQ.js} +4 -4
  140. package/dist/{chunk-KAF66DIP.js → chunk-HSBKV5LB.js} +43 -12
  141. package/dist/{chunk-2HRAVECR.js → chunk-IIVFXD6P.js} +1 -1
  142. package/dist/{chunk-JLG3GAQS.js → chunk-J5EYOBFF.js} +1 -1
  143. package/dist/{chunk-M4REI3JS.js → chunk-J6VQ7HYV.js} +5 -5
  144. package/dist/{chunk-YWFFAM2S.js → chunk-JFOZHVNO.js} +1 -1
  145. package/dist/{chunk-P5OPYQZE.js → chunk-JJRZE2LD.js} +2 -2
  146. package/dist/{chunk-DSQCXCPS.js → chunk-JOKKIFRN.js} +3 -3
  147. package/dist/{chunk-X73CND7J.js → chunk-JTB5V6BV.js} +1 -1
  148. package/dist/{chunk-JWLZQSHW.js → chunk-K2OFS57E.js} +2 -2
  149. package/dist/{chunk-4LYIZD3H.js → chunk-KDD26FUY.js} +1 -1
  150. package/dist/{chunk-L3TB7CC3.js → chunk-KM6XSFHP.js} +12 -2
  151. package/dist/{chunk-OFQBR26Y.js → chunk-KOYGRP2L.js} +3 -3
  152. package/dist/{chunk-BIMCKCGZ.js → chunk-LIZ3QQGK.js} +1 -1
  153. package/dist/chunk-LNOS24GV.js +214 -0
  154. package/dist/{chunk-6LNT6NCB.js → chunk-LW5WRSDD.js} +2 -2
  155. package/dist/{chunk-4KFTA7U7.js → chunk-MLPPG2OG.js} +2 -2
  156. package/dist/{chunk-M2IZ3TQT.js → chunk-MQ3N4KZY.js} +1 -1
  157. package/dist/{chunk-34XAUB2R.js → chunk-N3JLNMPF.js} +3 -3
  158. package/dist/{chunk-BRZR76TS.js → chunk-NJFJWQNN.js} +49 -14
  159. package/dist/{chunk-Y4JCCHHJ.js → chunk-NPND34FS.js} +4 -4
  160. package/dist/{chunk-TPXBX2LD.js → chunk-O3F5P6Z5.js} +2 -2
  161. package/dist/{chunk-FLK5IS6R.js → chunk-OADOH45L.js} +3 -3
  162. package/dist/{chunk-6ML32VHG.js → chunk-OISZ2I4X.js} +5 -5
  163. package/dist/{chunk-XI2BLVH6.js → chunk-OPS7KUFV.js} +3 -3
  164. package/dist/{chunk-GVZI4MK2.js → chunk-OUIEDJFO.js} +1 -1
  165. package/dist/{chunk-CA7JP44I.js → chunk-P5XER5QY.js} +3 -3
  166. package/dist/{chunk-5M6LXPR4.js → chunk-P5XTVIEC.js} +3 -3
  167. package/dist/{chunk-6TF4ZOXP.js → chunk-P76VYS6V.js} +207 -60
  168. package/dist/{chunk-XOFIXD5U.js → chunk-PFOJX6CR.js} +5 -5
  169. package/dist/chunk-PFR6EOUY.js +356 -0
  170. package/dist/{agent-heartbeat-I5UPGXAU.js → chunk-PHUHIVD5.js} +4 -5
  171. package/dist/{chunk-VVXXMY6I.js → chunk-PQ6NRLKL.js} +1 -1
  172. package/dist/{chunk-J2W3XZHV.js → chunk-PR3AHVFW.js} +5 -5
  173. package/dist/{chunk-3NETEIM6.js → chunk-PS4NA7PM.js} +1458 -968
  174. package/dist/{chunk-E5TFF3M7.js → chunk-PS6VPW64.js} +1 -1
  175. package/dist/{chunk-OZIDGXKH.js → chunk-PVEM537A.js} +2 -2
  176. package/dist/{chunk-PX2OHZKN.js → chunk-PWCZFIQH.js} +4 -4
  177. package/dist/{chunk-EKOWJXHN.js → chunk-QMSEL5YS.js} +77 -23
  178. package/dist/{chunk-Z6VZ62MY.js → chunk-QS6HI4B6.js} +34 -11
  179. package/dist/{chunk-GETICKB4.js → chunk-QWDZNQXA.js} +3 -3
  180. package/dist/{chunk-ZVZEYHWY.js → chunk-QX33D4CH.js} +32 -38
  181. package/dist/{chunk-TOLJH6XP.js → chunk-R3H3WW7H.js} +2 -2
  182. package/dist/chunk-R4AROSYI.js +496 -0
  183. package/dist/{chunk-CE323JHD.js → chunk-RIECV7SR.js} +1 -1
  184. package/dist/{chunk-IANRPLHA.js → chunk-RLDMUSRM.js} +2 -2
  185. package/dist/{chunk-LYXICKAH.js → chunk-SBJV2PCU.js} +1 -1
  186. package/dist/{chunk-U6E3CLKI.js → chunk-SFKIZYKK.js} +3 -3
  187. package/dist/{chunk-7JR2IRBY.js → chunk-TCR7NBHD.js} +6 -6
  188. package/dist/{chunk-DVPBCGC2.js → chunk-TJSTWACD.js} +2 -2
  189. package/dist/chunk-TX3Q2GIL.js +97 -0
  190. package/dist/{chunk-V3K6FLAS.js → chunk-TZFOWWPM.js} +1 -1
  191. package/dist/{chunk-4FNUBXYO.js → chunk-UI3K73LD.js} +1 -1
  192. package/dist/{chunk-5WADTD5Y.js → chunk-URHJDUWO.js} +1 -1
  193. package/dist/{chunk-K2HYCBAG.js → chunk-V3ISR2QT.js} +17 -6
  194. package/dist/{chunk-UPCXDJ2S.js → chunk-VMJ2UH4S.js} +1 -1
  195. package/dist/{chunk-JQTM2UFN.js → chunk-VV5EZZNT.js} +1 -1
  196. package/dist/{chunk-AA6AD7OM.js → chunk-VY3QUSWS.js} +10 -10
  197. package/dist/{chunk-OPU3NYOO.js → chunk-W2IRQJ6R.js} +12 -0
  198. package/dist/{chunk-5G46JZTE.js → chunk-WBKIU6UJ.js} +3 -3
  199. package/dist/{chunk-EUEESRS6.js → chunk-WCDIDSLR.js} +3 -3
  200. package/dist/{chunk-43PHKRHR.js → chunk-WSLFGJBA.js} +2 -2
  201. package/dist/{chunk-DNRLIHUO.js → chunk-WYVBWDFY.js} +1 -1
  202. package/dist/{chunk-BU36IRW2.js → chunk-X2P43TB2.js} +1 -1
  203. package/dist/{chunk-UIUO3N5Y.js → chunk-XA4EU3CW.js} +2 -2
  204. package/dist/{chunk-AIVK4A5Y.js → chunk-XAMLDTRA.js} +4 -4
  205. package/dist/{chunk-ZSQNPN2W.js → chunk-XKFMNAJ7.js} +1 -1
  206. package/dist/{chunk-5KLQCGI5.js → chunk-XKZD5FGK.js} +55 -0
  207. package/dist/{chunk-AYMOVFBG.js → chunk-XM7HJ5SS.js} +1 -1
  208. package/dist/{chunk-HKQH4R5X.js → chunk-XSXZVKJ7.js} +6 -6
  209. package/dist/{chunk-J4VETNHT.js → chunk-XTEKGO44.js} +1 -1
  210. package/dist/{chunk-2ROXEOGE.js → chunk-XTWHNLGD.js} +1 -1
  211. package/dist/{chunk-MR56CIB5.js → chunk-XUGOVOID.js} +3 -3
  212. package/dist/{chunk-T26JNDO3.js → chunk-XVRQZCTS.js} +2 -2
  213. package/dist/{chunk-O3OGCHUZ.js → chunk-Y4JVM3SI.js} +1 -1
  214. package/dist/{chunk-AUIXAFYX.js → chunk-Y7OK5PJE.js} +5 -5
  215. package/dist/{chunk-PGJG5TCQ.js → chunk-YA4PM3MV.js} +3 -3
  216. package/dist/{chunk-J7EXACGN.js → chunk-YYA5LXCT.js} +1 -1
  217. package/dist/{chunk-JVLQJWUG.js → chunk-YYLVHUYZ.js} +1 -1
  218. package/dist/{chunk-TF5T2ASS.js → chunk-Z5Z3MYUW.js} +3 -3
  219. package/dist/chunk-ZNUJFX7L.js +135 -0
  220. package/dist/{chunk-K5RPFS6A.js → chunk-ZSHLY5BS.js} +1 -1
  221. package/dist/{chunk-ECVWCFY4.js → chunk-ZVTKWWLV.js} +2 -2
  222. package/dist/{chunk-ASBMFQAY.js → chunk-ZZ3JQM5I.js} +9 -9
  223. package/dist/{chunk-JN7IFPIQ.js → chunk-ZZXMB5F2.js} +1 -1
  224. package/dist/{cleanup-graph-garbage-MLRFYWDJ.js → cleanup-graph-garbage-XDIX3HLN.js} +9 -9
  225. package/dist/{cloud-sync-command-LU5KLLQY.js → cloud-sync-command-VPYE4FIH.js} +2 -2
  226. package/dist/{cloud-sync-db-init-G7LBCE7T.js → cloud-sync-db-init-NSDBTFGI.js} +1 -1
  227. package/dist/{cloud-sync-shutdown-4IZXMEKK.js → cloud-sync-shutdown-6OUYTG4T.js} +4 -4
  228. package/dist/{co-activation-FCEZYVGI.js → co-activation-EAAKGGZH.js} +4 -4
  229. package/dist/{co-occurrence-5WBK7HPH.js → co-occurrence-OFVF55RX.js} +7 -7
  230. package/dist/{code-context-index-4EQJW44K.js → code-context-index-XOP6TLPZ.js} +5 -4
  231. package/dist/codex-consolidation-PPXNBXCV.js +96 -0
  232. package/dist/{conversation-entity-extractor-JXAKVKF2.js → conversation-entity-extractor-ZR5GFKAI.js} +3 -3
  233. package/dist/{conversation-wiki-populator-6BCICVAB.js → conversation-wiki-populator-EBUZXYEU.js} +1 -1
  234. package/dist/{crdt-sync-RTAWVLV4.js → crdt-sync-FGH4SBFW.js} +1 -1
  235. package/dist/{crm-webhook-EWALI4C5.js → crm-webhook-PJATR2DC.js} +2 -2
  236. package/dist/{cto-delegation-gate-HU4YUH7C.js → cto-delegation-gate-PO4LSSQ4.js} +38 -21
  237. package/dist/{daemon-auth-LXP5I6BA.js → daemon-auth-SSPY5ODS.js} +2 -2
  238. package/dist/{daemon-orchestration-35RSNUNI.js → daemon-orchestration-IJFZFQUX.js} +27 -25
  239. package/dist/{daemon-ready-ZC2ANOR3.js → daemon-ready-MKBH4QWD.js} +1 -1
  240. package/dist/db-integrity-events-5DTASXJF.js +22 -0
  241. package/dist/{db-restore-events-NBARRGAC.js → db-restore-events-2FI4ZMKA.js} +1 -1
  242. package/dist/{doc-graph-extractor-PTNIPSDV.js → doc-graph-extractor-CAYUAM5A.js} +7 -7
  243. package/dist/{documents-BUFAJHVZ.js → documents-W2G477QE.js} +12 -11
  244. package/dist/{dreaming-ZPUWXFEJ.js → dreaming-FVXSIIWV.js} +26 -24
  245. package/dist/{employee-boot-brief-QD2SP4FM.js → employee-boot-brief-OYMSHFHA.js} +29 -27
  246. package/dist/{exe-drift-KCZFM2RP.js → exe-drift-67RGJOBX.js} +5 -5
  247. package/dist/{exe-export-W2SXNMYL.js → exe-export-SGYX6XZG.js} +14 -13
  248. package/dist/{exe-import-YCYNUMER.js → exe-import-UABVA5N3.js} +14 -13
  249. package/dist/{exe-key-7IIKQRR2.js → exe-key-XNYDCVFE.js} +107 -102
  250. package/dist/{exe-org-223EX7VP.js → exe-org-XJVSU5HN.js} +23 -23
  251. package/dist/{exe-snapshot-QX3RERAL.js → exe-snapshot-YXOGYZUX.js} +30 -37
  252. package/dist/{fast-db-init-PAC3C5O5.js → fast-db-init-GDFJY5UH.js} +1 -1
  253. package/dist/{founder-context-XM47756J.js → founder-context-KUXSNXKS.js} +3 -3
  254. package/dist/{founder-monitor-envelope-4WFWI26F.js → founder-monitor-envelope-5KTKNL5G.js} +4 -4
  255. package/dist/{fts-integrity-4M2MF2LQ.js → fts-integrity-LKAZEZJE.js} +2 -2
  256. package/dist/gateway/index.js +10 -10
  257. package/dist/{git-staleness-XT6GXOYG.js → git-staleness-NN6RWNLW.js} +4 -4
  258. package/dist/{global-procedures-QICIAC33.js → global-procedures-XDNA3TNA.js} +6 -6
  259. package/dist/{graph-auto-extract-RYX57CW5.js → graph-auto-extract-KTOR45V4.js} +7 -7
  260. package/dist/{graph-rag-MOBZTWOD.js → graph-rag-L5NV5YWD.js} +3 -3
  261. package/dist/{hook-integrity-LGUYWWQX.js → hook-integrity-X3YAVGUW.js} +1 -1
  262. package/dist/{hook-prefetch-VE2NXAFN.js → hook-prefetch-WE4MIXBM.js} +23 -21
  263. package/dist/hooks/bug-report-worker.js +27 -25
  264. package/dist/hooks/codex-stop-task-finalizer.js +29 -27
  265. package/dist/hooks/commit-complete.js +42 -27
  266. package/dist/hooks/error-recall.js +11 -11
  267. package/dist/hooks/exe-heartbeat-hook.js +7 -7
  268. package/dist/hooks/ingest-worker.js +10 -9
  269. package/dist/hooks/ingest.js +18 -17
  270. package/dist/hooks/instructions-loaded.js +12 -9
  271. package/dist/hooks/manifest.json +20 -20
  272. package/dist/hooks/notification.js +8 -8
  273. package/dist/hooks/post-compact.js +7 -7
  274. package/dist/hooks/post-tool-combined.js +16 -15
  275. package/dist/hooks/pre-compact.js +28 -26
  276. package/dist/hooks/pre-tool-use.js +79 -33
  277. package/dist/hooks/prompt-submit.js +42 -40
  278. package/dist/hooks/session-end.js +128 -111
  279. package/dist/hooks/session-start.js +20 -20
  280. package/dist/hooks/stop.js +101 -34
  281. package/dist/hooks/subagent-stop.js +29 -27
  282. package/dist/hooks/summary-worker.js +32 -30
  283. package/dist/index.js +34 -32
  284. package/dist/{installer-4VXHJEVU.js → installer-EAAYEEEF.js} +8 -8
  285. package/dist/{installer-CH7GIFHI.js → installer-EPQAOI6M.js} +154 -10
  286. package/dist/{installer-IK4HFXD4.js → installer-UDRMFY75.js} +8 -8
  287. package/dist/{intercom-queue-PI5APF65.js → intercom-queue-IBOAVT2I.js} +22 -20
  288. package/dist/{key-backup-status-G7CHESRL.js → key-backup-status-6L2ARCXW.js} +1 -1
  289. package/dist/lib/agent-config.js +2 -2
  290. package/dist/lib/cloud-sync.js +19 -18
  291. package/dist/lib/config.js +1 -1
  292. package/dist/lib/consolidation.js +9 -9
  293. package/dist/lib/database.js +4 -4
  294. package/dist/lib/db-backup.js +2 -2
  295. package/dist/lib/db-daemon-client.js +5 -4
  296. package/dist/lib/db-write-worker.js +3 -3
  297. package/dist/lib/db.js +4 -4
  298. package/dist/lib/device-registry.js +2 -2
  299. package/dist/lib/embed-worker.js +1 -1
  300. package/dist/lib/embedder.js +5 -4
  301. package/dist/lib/employee-templates.js +7 -7
  302. package/dist/lib/employees.js +4 -4
  303. package/dist/lib/exe-daemon-client.js +4 -3
  304. package/dist/lib/exe-daemon.js +219 -112
  305. package/dist/lib/hybrid-search.js +8 -8
  306. package/dist/lib/identity-templates.js +1 -1
  307. package/dist/lib/identity.js +4 -4
  308. package/dist/lib/license.js +3 -3
  309. package/dist/lib/messaging.js +23 -21
  310. package/dist/lib/post-tool-memory.js +2 -2
  311. package/dist/lib/registry-proxy.js +1 -1
  312. package/dist/lib/reminders.js +5 -5
  313. package/dist/lib/schedules.js +8 -8
  314. package/dist/lib/session-registry.js +6 -6
  315. package/dist/lib/skill-learning.js +13 -12
  316. package/dist/lib/status-brief.js +4 -3
  317. package/dist/lib/store.js +7 -7
  318. package/dist/lib/task-router.js +5 -5
  319. package/dist/lib/tasks.js +24 -22
  320. package/dist/lib/tmux-routing.js +22 -20
  321. package/dist/lib/token-spend.js +5 -5
  322. package/dist/{license-gate-Z5YXTWMH.js → license-gate-3TTWJABL.js} +4 -4
  323. package/dist/{license-sync-LLX3FTHY.js → license-sync-ZC6TPKVV.js} +3 -3
  324. package/dist/mcp/register-tools.js +104 -99
  325. package/dist/mcp/server.js +106 -101
  326. package/dist/mcp/tools/complete-reminder.js +6 -6
  327. package/dist/mcp/tools/create-reminder.js +6 -6
  328. package/dist/mcp/tools/create-task.js +27 -25
  329. package/dist/mcp/tools/deactivate-behavior.js +15 -14
  330. package/dist/mcp/tools/list-reminders.js +6 -6
  331. package/dist/mcp/tools/list-tasks.js +27 -25
  332. package/dist/mcp/tools/send-message.js +26 -24
  333. package/dist/mcp/tools/update-task.js +25 -23
  334. package/dist/{mcp-http-config-PTGZH6RV.js → mcp-http-config-ROF5EPEF.js} +5 -5
  335. package/dist/{mcp-session-identity-JRR4ZW2F.js → mcp-session-identity-ERU6FEUB.js} +22 -20
  336. package/dist/{memory-cards-ENOF74LR.js → memory-cards-3QTXI2SG.js} +7 -7
  337. package/dist/{memory-graph-extractor-V4ZUDCUN.js → memory-graph-extractor-7GAILMYG.js} +8 -8
  338. package/dist/{memory-poisoning-defense-VNCV5BFL.js → memory-poisoning-defense-TPXSRJTQ.js} +4 -4
  339. package/dist/{memory-pressure-watchdog-5WKDX7KP.js → memory-pressure-watchdog-ZSOP6T2F.js} +23 -21
  340. package/dist/{memory-queue-RD5CSMSC.js → memory-queue-QJNWKWKG.js} +2 -2
  341. package/dist/{memory-queue-client-2NHZQRSD.js → memory-queue-client-HIHCA3W4.js} +6 -5
  342. package/dist/{memory-reflection-H7AGGSO5.js → memory-reflection-3AI4JBV2.js} +4 -4
  343. package/dist/{monitor-grants-5KVETEJB.js → monitor-grants-BW2WL4IU.js} +3 -3
  344. package/dist/{notification-ledger-4DRPS7GP.js → notification-ledger-ZU7ZFJJX.js} +26 -23
  345. package/dist/{notifications-ZNIPKB3G.js → notifications-S4GU22GF.js} +22 -20
  346. package/dist/{orchestration-events-FWR64GIC.js → orchestration-events-HVG56HJ5.js} +5 -5
  347. package/dist/{orchestration-phase-ZED4QYF3.js → orchestration-phase-UDS24CVQ.js} +2 -2
  348. package/dist/{orchestrator-AVQRCIMG.js → orchestrator-UW3Q3WYG.js} +24 -22
  349. package/dist/{org-brief-session-XK2BTYHE.js → org-brief-session-G36TJBN4.js} +12 -12
  350. package/dist/{org-consent-policy-ULCYJC4W.js → org-consent-policy-RMYVMM3X.js} +1 -1
  351. package/dist/{org-join-P6PHLFFK.js → org-join-BMBQDMVF.js} +7 -7
  352. package/dist/{org-key-admin-BXGBQ3XY.js → org-key-admin-SCCVVE2H.js} +8 -8
  353. package/dist/{org-key-pin-CVVHZIMZ.js → org-key-pin-5WUSPGVN.js} +3 -3
  354. package/dist/{org-membership-VC54DLZ7.js → org-membership-ESALTLLN.js} +4 -4
  355. package/dist/{org-partner-config-VQVT62IZ.js → org-partner-config-YKHPDPZR.js} +6 -6
  356. package/dist/{org-partner-runtime-CCXM2LEA.js → org-partner-runtime-KXMGEYFW.js} +12 -12
  357. package/dist/{org-row-visibility-OSDGUOYT.js → org-row-visibility-UI5PGN76.js} +1 -1
  358. package/dist/{pipeline-router-YA6JZ7SA.js → pipeline-router-IODWXDDI.js} +5 -5
  359. package/dist/{plan-limits-YC6TLA4S.js → plan-limits-XMAQVEJZ.js} +7 -7
  360. package/dist/{platform-procedures-QNOMEXJF.js → platform-procedures-44NDFTB6.js} +1 -1
  361. package/dist/{postinstall-failure-M6PCKX4P.js → postinstall-failure-B2JHNFPM.js} +2 -2
  362. package/dist/{project-boot-INRUUEND.js → project-boot-LCFBQ6NB.js} +9 -1
  363. package/dist/project-name-ILJTETUE.js +14 -0
  364. package/dist/{projection-worker-G3AO6ASG.js → projection-worker-6LZUCI3B.js} +4 -4
  365. package/dist/{prospective-memory-GXCBC5WL.js → prospective-memory-G5VK5GCD.js} +4 -4
  366. package/dist/{push-notifications-BZZJTMN6.js → push-notifications-S2RYRXLF.js} +23 -21
  367. package/dist/reproject-worktree-memories-IXYGHTGA.js +224 -0
  368. package/dist/{reranker-O3NLXWT3.js → reranker-EHQTAA3L.js} +2 -2
  369. package/dist/{retrieval-health-5OSAJIQF.js → retrieval-health-WZ4ICGNF.js} +5 -1
  370. package/dist/{review-polling-3D2KID2T.js → review-polling-MAWLRDSP.js} +23 -21
  371. package/dist/runtime/index.js +31 -29
  372. package/dist/{session-events-KJKEKAXC.js → session-events-BRUIZ5E4.js} +23 -21
  373. package/dist/{session-kill-telemetry-RRAZEXLS.js → session-kill-telemetry-PTZLHT33.js} +23 -21
  374. package/dist/{session-mcp-config-JTPM2XBN.js → session-mcp-config-F7KATWOF.js} +2 -2
  375. package/dist/{session-scope-IPEVYKRA.js → session-scope-G4RVJJGR.js} +23 -21
  376. package/dist/{setup-wizard-7XF4NFQK.js → setup-wizard-WFEUB63Z.js} +3 -3
  377. package/dist/{shard-manager-FW4KRSE4.js → shard-manager-UROHZE46.js} +2 -2
  378. package/dist/{skill-refinement-5444QK44.js → skill-refinement-2OYPH7WD.js} +5 -5
  379. package/dist/{stack-promote-FZAXOG5N.js → stack-promote-DLYYQXQI.js} +6 -5
  380. package/dist/{stack-release-AF4KZWQA.js → stack-release-OPWARLXI.js} +6 -5
  381. package/dist/{stack-update-RIL3XYZG.js → stack-update-SJ43IEQE.js} +39 -6
  382. package/dist/{steward-gate-V3CDSK35.js → steward-gate-V7PBGVFK.js} +5 -5
  383. package/dist/{subagent-brief-injection-WZJRP6VC.js → subagent-brief-injection-BLCRI2AJ.js} +31 -29
  384. package/dist/{subagent-spawn-ledger-P6Q6JX3E.js → subagent-spawn-ledger-USYZXU3M.js} +4 -2
  385. package/dist/{support-inbox-45CEKHAK.js → support-inbox-6HOQYFD2.js} +4 -4
  386. package/dist/{task-enforcement-HG6LBTYU.js → task-enforcement-EF6O2V26.js} +23 -21
  387. package/dist/{task-request-inbox-ZIQW2TPL.js → task-request-inbox-OB2KIJWO.js} +1 -1
  388. package/dist/{task-scope-ZWRHD2PQ.js → task-scope-74JBTKJN.js} +26 -23
  389. package/dist/{tasks-crud-QN33WNXT.js → tasks-crud-ZU6RZDEZ.js} +22 -20
  390. package/dist/{tasks-notify-DQKP253B.js → tasks-notify-767DRYAA.js} +23 -21
  391. package/dist/{tasks-review-P7JTBLWK.js → tasks-review-4F6PZZ3B.js} +22 -20
  392. package/dist/{telemetry-upload-55GD4D27.js → telemetry-upload-2JM6KIAB.js} +9 -9
  393. package/dist/{token-budget-PPDT7CLD.js → token-budget-NH2RD4YX.js} +5 -5
  394. package/dist/{tool-capability-index-MOZ5EOIO.js → tool-capability-index-BT2GGLLI.js} +1 -1
  395. package/dist/{tool-gates-3IC7DK4R.js → tool-gates-2OZY3GZM.js} +1 -1
  396. package/dist/{tool-gates-GXSYBVK4.js → tool-gates-7PLIOLAL.js} +1 -1
  397. package/dist/{tool-telemetry-R27EMAEB.js → tool-telemetry-CHCBD4OQ.js} +1 -1
  398. package/dist/tui/App.js +37 -35
  399. package/dist/{tui-data-KJNJBAAT.js → tui-data-244GF3BI.js} +22 -20
  400. package/dist/{update-support-VDS4ME3L.js → update-support-P2LO3DAB.js} +16 -15
  401. package/dist/work-claims-4QOE7DT2.js +53 -0
  402. package/dist/{work-state-heartbeat-RUE6ETPX.js → work-state-heartbeat-GX3VWWWK.js} +1 -1
  403. package/dist/{worker-gate-LAXZSHSZ.js → worker-gate-62PZATOV.js} +2 -2
  404. package/dist/{workflow-engine-RPKV7XM3.js → workflow-engine-7YIRU62F.js} +2 -2
  405. package/dist/{worktree-6LRKLO2U.js → worktree-3TUKIZWY.js} +6 -6
  406. package/dist/{worktree-sweep-NAPVXZHQ.js → worktree-sweep-MYQHUXDE.js} +7 -7
  407. package/package.json +8 -2
  408. package/release-notes.json +90 -89
  409. package/src/commands/exe/call.md +6 -4
  410. package/src/commands/exe-reference.md +11 -7
  411. package/src/commands/exe.md +16 -20
  412. package/dist/chunk-6MQWZZS5.js +0 -275
  413. package/dist/chunk-CTXNEZFW.js +0 -78
  414. package/dist/db-integrity-events-RBX7FN5E.js +0 -16
  415. package/dist/project-name-EWG5KAZP.js +0 -10
  416. /package/dist/{chunk-GSWAKK5Q.js → chunk-62U63R3E.js} +0 -0
  417. /package/dist/{chunk-HVMZBCP4.js → chunk-6CAX7YH4.js} +0 -0
  418. /package/dist/{chunk-CLCNYC3F.js → chunk-BTFDA3UJ.js} +0 -0
  419. /package/dist/{chunk-VNVDUM5X.js → chunk-DAXFAXLN.js} +0 -0
  420. /package/dist/{chunk-3DWNESVC.js → chunk-FLP2BQOA.js} +0 -0
  421. /package/dist/{chunk-ESOETGYC.js → chunk-JLYHJJHU.js} +0 -0
  422. /package/dist/{chunk-W352QOGG.js → chunk-JZBZI36P.js} +0 -0
  423. /package/dist/{chunk-QKOLA6FI.js → chunk-WM7Y5ZV2.js} +0 -0
  424. /package/dist/{chunk-IY7LTYEP.js → chunk-YNPOELAN.js} +0 -0
  425. /package/dist/{chunk-7VBIK4HP.js → chunk-YSDIJ3VI.js} +0 -0
  426. /package/dist/{core-memory-RZHRZPKR.js → core-memory-EARETDZ6.js} +0 -0
  427. /package/dist/{entity-boost-ZLQIQ4JU.js → entity-boost-CDFAXVYL.js} +0 -0
  428. /package/dist/{memory-isolation-OSZBBUHB.js → memory-isolation-XASOGA7G.js} +0 -0
  429. /package/dist/{message-queue-client-UKGJ6QKQ.js → message-queue-client-PL2POQOV.js} +0 -0
  430. /package/dist/{oauth-server-MHOTAUOI.js → oauth-server-C3BXAKAW.js} +0 -0
  431. /package/dist/{webhook-pipe-BVLWBMIC.js → webhook-pipe-UQSEHFPO.js} +0 -0
  432. /package/dist/{wiki-acl-E24PM3YR.js → wiki-acl-XQH4UBP2.js} +0 -0
  433. /package/dist/{wiki-client-ZDPDQDX2.js → wiki-client-AXNM5FWY.js} +0 -0
@@ -0,0 +1,496 @@
1
+ import {
2
+ sessionScopeFilter
3
+ } from "./chunk-QX33D4CH.js";
4
+
5
+ // src/lib/verification-evidence.ts
6
+ import { execFileSync } from "child_process";
7
+ var TEST_PATH = /(?:^|\/)(?:tests?|__tests__|__mocks__|e2e|fixtures)\//i;
8
+ var TEST_FILE = /\.(?:test|spec)\.[cm]?[jt]sx?$/i;
9
+ var NON_SOURCE_FILE = /\.(?:md|mdx|txt|rst|adoc|snap|lock)$/i;
10
+ var COMMENT_LINE = /^(?:\/\/|\/\*|\*\/|\*(?!\/)|#|--|<!--|-->)/;
11
+ function isTestPath(path) {
12
+ return TEST_PATH.test(path) || TEST_FILE.test(path);
13
+ }
14
+ function isNonSourcePath(path) {
15
+ return NON_SOURCE_FILE.test(path);
16
+ }
17
+ function isCommentOrBlank(line) {
18
+ const trimmed = line.trim();
19
+ if (!trimmed) return true;
20
+ return COMMENT_LINE.test(trimmed);
21
+ }
22
+ function measureUnifiedDiff(diff) {
23
+ let added = 0;
24
+ let deleted = 0;
25
+ let substantiveAdded = 0;
26
+ const sourceFiles = /* @__PURE__ */ new Set();
27
+ let currentPath = "";
28
+ let currentIsSource = false;
29
+ for (const line of diff.split(/\r?\n/)) {
30
+ if (line.startsWith("+++ ")) {
31
+ const path = line.slice(4).replace(/^b\//, "").trim();
32
+ currentPath = path === "/dev/null" ? "" : path;
33
+ currentIsSource = Boolean(currentPath) && !isTestPath(currentPath) && !isNonSourcePath(currentPath);
34
+ continue;
35
+ }
36
+ if (line.startsWith("--- ") || line.startsWith("diff ") || line.startsWith("index ") || line.startsWith("@@")) {
37
+ continue;
38
+ }
39
+ if (line.startsWith("+")) {
40
+ added += 1;
41
+ if (currentIsSource) {
42
+ const content = line.slice(1);
43
+ if (!isCommentOrBlank(content)) {
44
+ substantiveAdded += 1;
45
+ sourceFiles.add(currentPath);
46
+ }
47
+ }
48
+ } else if (line.startsWith("-")) {
49
+ deleted += 1;
50
+ if (currentIsSource) {
51
+ const content = line.slice(1);
52
+ if (!isCommentOrBlank(content)) sourceFiles.add(currentPath);
53
+ }
54
+ }
55
+ }
56
+ return {
57
+ added,
58
+ deleted,
59
+ substantive_added: substantiveAdded,
60
+ source_files: sourceFiles.size
61
+ };
62
+ }
63
+ function measureCommitSubstance(sha, cwd) {
64
+ if (!/^[0-9a-f]{7,64}$/i.test(sha)) return null;
65
+ try {
66
+ const diff = execFileSync(
67
+ "git",
68
+ ["show", "--format=", "--unified=0", "--no-color", sha],
69
+ { cwd, encoding: "utf8", timeout: 15e3, maxBuffer: 32 * 1024 * 1024 }
70
+ );
71
+ return measureUnifiedDiff(diff);
72
+ } catch {
73
+ return null;
74
+ }
75
+ }
76
+
77
+ // src/shared/verification-artifact.ts
78
+ var ok = { ok: true, code: "ok", message: "verified" };
79
+ function deny(code, message) {
80
+ return { ok: false, code, message };
81
+ }
82
+ var HEX_SHA = /^[0-9a-f]{7,64}$/i;
83
+ var MIN_OBSERVATION_CHARS = 40;
84
+ function isRecord(value) {
85
+ return typeof value === "object" && value !== null && !Array.isArray(value);
86
+ }
87
+ function str(value) {
88
+ return typeof value === "string" ? value.trim() : "";
89
+ }
90
+ function num(value) {
91
+ return typeof value === "number" && Number.isFinite(value) ? value : null;
92
+ }
93
+ function isSubstantiveCommit(substance) {
94
+ if (!isRecord(substance)) return false;
95
+ const added = num(substance.added);
96
+ const deleted = num(substance.deleted);
97
+ const substantive = num(substance.substantive_added);
98
+ const sourceFiles = num(substance.source_files);
99
+ if (added === null || deleted === null || substantive === null || sourceFiles === null) return false;
100
+ if (added < 0 || deleted < 0 || substantive < 0 || sourceFiles < 0) return false;
101
+ if (substantive > added) return false;
102
+ if (sourceFiles < 1) return false;
103
+ if (substantive < 1 && deleted < 1) return false;
104
+ return true;
105
+ }
106
+ function assessVerificationArtifact(raw, context = {}) {
107
+ if (raw === void 0 || raw === null || raw === "") {
108
+ return deny("artifact_missing", "closing requires a verification artifact showing the defect is absent");
109
+ }
110
+ let artifact = raw;
111
+ if (typeof raw === "string") {
112
+ try {
113
+ artifact = JSON.parse(raw);
114
+ } catch {
115
+ return deny("artifact_malformed", "verification artifact must be valid JSON");
116
+ }
117
+ }
118
+ if (!isRecord(artifact)) {
119
+ return deny("artifact_malformed", "verification artifact must be an object");
120
+ }
121
+ const kind = str(artifact.kind);
122
+ if (kind !== "regression_test" && kind !== "manual") {
123
+ return deny("artifact_unknown_kind", "verification artifact kind must be regression_test or manual");
124
+ }
125
+ if (!isSubstantiveCommit(artifact.substance)) {
126
+ return deny(
127
+ "commit_not_substantive",
128
+ "the fix commit changes no executable production source (comment-only, whitespace-only, or test-only diffs are not fixes)"
129
+ );
130
+ }
131
+ if (kind === "regression_test") {
132
+ const testId = str(artifact.test_id);
133
+ const fixCommit = str(artifact.fix_commit);
134
+ const parentCommit = str(artifact.parent_commit);
135
+ if (!testId || !HEX_SHA.test(fixCommit) || !HEX_SHA.test(parentCommit)) {
136
+ return deny("artifact_malformed", "regression_test requires test_id, fix_commit and parent_commit");
137
+ }
138
+ if (fixCommit.toLowerCase() === parentCommit.toLowerCase()) {
139
+ return deny("parent_equals_fix", "parent_commit must be the commit BEFORE the fix");
140
+ }
141
+ if (str(artifact.parent_result) !== "fail") {
142
+ return deny(
143
+ "test_did_not_fail_at_parent",
144
+ "the named test must FAIL at the parent commit \u2014 a test that already passed does not detect the defect"
145
+ );
146
+ }
147
+ if (str(artifact.fix_result) !== "pass") {
148
+ return deny("test_did_not_pass_at_fix", "the named test must PASS at the fix commit");
149
+ }
150
+ return ok;
151
+ }
152
+ const verifier = str(artifact.verifier);
153
+ if (!verifier) {
154
+ return deny("manual_verifier_missing", "manual verification requires a named verifier");
155
+ }
156
+ const authors = (context.authorIdentities ?? []).map((a) => str(a).toLowerCase()).filter(Boolean);
157
+ if (authors.includes(verifier.toLowerCase())) {
158
+ return deny(
159
+ "manual_verifier_is_author",
160
+ "manual verification must be attested by someone other than the bug's author or assignee"
161
+ );
162
+ }
163
+ if (!str(artifact.method)) {
164
+ return deny("artifact_malformed", "manual verification requires a method");
165
+ }
166
+ if (str(artifact.observation).length < MIN_OBSERVATION_CHARS) {
167
+ return deny(
168
+ "manual_observation_too_thin",
169
+ "manual verification requires an observation describing the defect's absence"
170
+ );
171
+ }
172
+ if (!HEX_SHA.test(str(artifact.fix_commit))) {
173
+ return deny("artifact_malformed", "manual verification requires a fix_commit");
174
+ }
175
+ return ok;
176
+ }
177
+
178
+ // src/shared/task-completion-gate.ts
179
+ var COMPLETION_CLAIM_STATUSES = ["done", "needs_review", "closed"];
180
+ function isCompletionClaim(status) {
181
+ const normalized = typeof status === "string" ? status.trim() : "";
182
+ return COMPLETION_CLAIM_STATUSES.includes(normalized);
183
+ }
184
+ var ok2 = { ok: true, code: "ok", message: "verified" };
185
+ function assessAutomatedTaskCompletion(input) {
186
+ if (!isCompletionClaim(input.status)) return ok2;
187
+ if (!isSubstantiveCommit(input.substance)) {
188
+ return {
189
+ ok: false,
190
+ code: "commit_not_substantive",
191
+ message: "the matched commit changes no executable production source (comment-only, whitespace-only, docs-only or test-only diffs are not work)"
192
+ };
193
+ }
194
+ if (input.verificationArtifact !== void 0 && input.verificationArtifact !== null) {
195
+ return assessVerificationArtifact(input.verificationArtifact, input.context ?? {});
196
+ }
197
+ return ok2;
198
+ }
199
+
200
+ // src/lib/git-task-sweep.ts
201
+ import { execSync } from "child_process";
202
+ var DEFAULT_COMMIT_LIMIT = 50;
203
+ var DEFAULT_STALE_MINUTES = 10;
204
+ var AUTO_ESCALATE_THRESHOLD = 0.6;
205
+ var EXACT_UUID_SCORE = 1;
206
+ var TITLE_KEYWORD_SCORE = 0.5;
207
+ var FILE_PATH_SCORE = 0.3;
208
+ var MIN_KEYWORD_OVERLAP = 3;
209
+ var STOP_WORDS = /* @__PURE__ */ new Set([
210
+ "a",
211
+ "an",
212
+ "the",
213
+ "and",
214
+ "or",
215
+ "but",
216
+ "in",
217
+ "on",
218
+ "at",
219
+ "to",
220
+ "for",
221
+ "of",
222
+ "with",
223
+ "by",
224
+ "from",
225
+ "is",
226
+ "it",
227
+ "as",
228
+ "be",
229
+ "was",
230
+ "are",
231
+ "this",
232
+ "that",
233
+ "not",
234
+ "no",
235
+ "if",
236
+ "so",
237
+ "do",
238
+ "up"
239
+ ]);
240
+ function extractKeywords(text) {
241
+ return text.toLowerCase().replace(/[^a-z0-9\s-]/g, " ").split(/\s+/).filter((w) => w.length >= 3 && !STOP_WORDS.has(w));
242
+ }
243
+ function matchScore(task, commitMessage, changedFiles) {
244
+ if (task.id.length >= 8 && commitMessage.includes(task.id)) {
245
+ return EXACT_UUID_SCORE;
246
+ }
247
+ let score = 0;
248
+ const titleWords = extractKeywords(task.title);
249
+ const commitWords = new Set(extractKeywords(commitMessage));
250
+ const overlap = titleWords.filter((w) => commitWords.has(w));
251
+ if (overlap.length >= MIN_KEYWORD_OVERLAP) {
252
+ score += TITLE_KEYWORD_SCORE;
253
+ }
254
+ if (task.context && changedFiles.length > 0) {
255
+ const contextLower = task.context.toLowerCase();
256
+ const hasFileMatch = changedFiles.some(
257
+ (f) => contextLower.includes(f.toLowerCase())
258
+ );
259
+ if (hasFileMatch) {
260
+ score += FILE_PATH_SCORE;
261
+ }
262
+ }
263
+ return score;
264
+ }
265
+ function getRecentCommits(limit = DEFAULT_COMMIT_LIMIT) {
266
+ try {
267
+ const SEPARATOR = "<<SEP>>";
268
+ const output = execSync(
269
+ `git log --format="%h${SEPARATOR}%s${SEPARATOR}%aI" --name-only -n ${limit} -z`,
270
+ { encoding: "utf8", timeout: 1e4 }
271
+ );
272
+ const entries = output.split("\0").filter(Boolean);
273
+ const commits = [];
274
+ let current = null;
275
+ for (const entry of entries) {
276
+ if (entry.includes(SEPARATOR)) {
277
+ const lines = entry.split("\n");
278
+ const headerLine = lines[0];
279
+ const parts = headerLine.split(SEPARATOR);
280
+ if (parts.length >= 3) {
281
+ if (current) commits.push(current);
282
+ current = {
283
+ hash: parts[0],
284
+ message: parts[1],
285
+ files: lines.slice(1).filter(Boolean),
286
+ date: new Date(parts[2])
287
+ };
288
+ }
289
+ } else if (current) {
290
+ const files = entry.split("\n").filter(Boolean);
291
+ current.files.push(...files);
292
+ }
293
+ }
294
+ if (current) commits.push(current);
295
+ return commits;
296
+ } catch {
297
+ return [];
298
+ }
299
+ }
300
+ function pushUnpushedCommits() {
301
+ const run = (args) => execSync(`git ${args}`, { encoding: "utf8", timeout: 15e3, stdio: ["pipe", "pipe", "pipe"] }).trim();
302
+ let branch;
303
+ try {
304
+ branch = run("rev-parse --abbrev-ref HEAD");
305
+ } catch {
306
+ return { branch: null, ahead: 0, pushed: false, status: "not_a_repo" };
307
+ }
308
+ if (!branch || branch === "HEAD") {
309
+ return { branch: null, ahead: 0, pushed: false, status: "no_branch" };
310
+ }
311
+ if (branch === "main" || branch === "master") {
312
+ return { branch, ahead: 0, pushed: false, status: "default_branch_skipped" };
313
+ }
314
+ let ahead = 0;
315
+ let hasUpstream = false;
316
+ try {
317
+ run("rev-parse --abbrev-ref --symbolic-full-name @{u}");
318
+ hasUpstream = true;
319
+ const count = run("rev-list --count @{u}..HEAD");
320
+ ahead = Number.parseInt(count, 10) || 0;
321
+ } catch {
322
+ hasUpstream = false;
323
+ for (const base of ["origin/main", "origin/master"]) {
324
+ try {
325
+ const count = run(`rev-list --count ${base}..HEAD`);
326
+ ahead = Number.parseInt(count, 10) || 0;
327
+ if (ahead > 0) break;
328
+ } catch {
329
+ }
330
+ }
331
+ if (ahead === 0) {
332
+ try {
333
+ const count = run("rev-list --count HEAD");
334
+ ahead = Number.parseInt(count, 10) || 0;
335
+ } catch {
336
+ ahead = 0;
337
+ }
338
+ }
339
+ }
340
+ if (ahead <= 0) {
341
+ return { branch, ahead: 0, pushed: false, status: "nothing_to_push" };
342
+ }
343
+ try {
344
+ if (hasUpstream) {
345
+ run("push");
346
+ } else {
347
+ run(`push --set-upstream origin ${branch}`);
348
+ }
349
+ return { branch, ahead, pushed: true, status: "pushed" };
350
+ } catch (err) {
351
+ return {
352
+ branch,
353
+ ahead,
354
+ pushed: false,
355
+ status: "push_failed",
356
+ error: err instanceof Error ? err.message : String(err)
357
+ };
358
+ }
359
+ }
360
+ function isStale(updatedAt, staleMinutes) {
361
+ const updated = new Date(updatedAt).getTime();
362
+ const threshold = Date.now() - staleMinutes * 6e4;
363
+ return updated < threshold;
364
+ }
365
+ function findBestMatch(task, commits) {
366
+ let best = null;
367
+ for (const commit of commits) {
368
+ const score = matchScore(task, commit.message, commit.files);
369
+ if (score >= AUTO_ESCALATE_THRESHOLD && (!best || score > best.score)) {
370
+ best = { commit, score };
371
+ }
372
+ }
373
+ return best;
374
+ }
375
+ async function sweepTasks(projectName, options = {}) {
376
+ const commitLimit = options.commitLimit ?? DEFAULT_COMMIT_LIMIT;
377
+ const staleMinutes = options.staleMinutes ?? DEFAULT_STALE_MINUTES;
378
+ const dryRun = options.dryRun ?? false;
379
+ const result = { escalated: [], rejected: [], unchanged: 0, errors: [] };
380
+ const substanceCache = /* @__PURE__ */ new Map();
381
+ const commitIsAdmissible = (hash) => {
382
+ if (!substanceCache.has(hash)) {
383
+ substanceCache.set(hash, measureCommitSubstance(hash, process.cwd()));
384
+ }
385
+ return assessAutomatedTaskCompletion({
386
+ status: "needs_review",
387
+ substance: substanceCache.get(hash) ?? null
388
+ }).ok;
389
+ };
390
+ const commits = getRecentCommits(commitLimit);
391
+ if (commits.length === 0) {
392
+ result.errors.push("No git commits found (not a git repo or empty history)");
393
+ return result;
394
+ }
395
+ let tasks;
396
+ try {
397
+ const { initStore } = await import("./lib/store.js");
398
+ await initStore();
399
+ const { getClient } = await import("./lib/database.js");
400
+ const client = getClient();
401
+ const conditions = ["status = 'in_progress'"];
402
+ const args = [];
403
+ if (projectName) {
404
+ conditions.push("project_name = ?");
405
+ args.push(projectName);
406
+ }
407
+ const swScope = sessionScopeFilter();
408
+ if (swScope.sql) {
409
+ conditions.push("(session_scope IS NULL OR session_scope = ?)");
410
+ args.push(...swScope.args);
411
+ }
412
+ const queryResult = await client.execute({
413
+ sql: `SELECT id, title, assigned_to, project_name, status, updated_at, context
414
+ FROM tasks WHERE ${conditions.join(" AND ")}
415
+ ORDER BY updated_at ASC`,
416
+ args
417
+ });
418
+ tasks = queryResult.rows.map((r) => ({
419
+ id: String(r.id),
420
+ title: String(r.title),
421
+ assignedTo: String(r.assigned_to),
422
+ projectName: String(r.project_name),
423
+ status: String(r.status),
424
+ updatedAt: String(r.updated_at),
425
+ context: r.context ? String(r.context) : void 0
426
+ }));
427
+ } catch (err) {
428
+ result.errors.push(`DB query failed: ${err instanceof Error ? err.message : String(err)}`);
429
+ return result;
430
+ }
431
+ if (tasks.length === 0) {
432
+ return result;
433
+ }
434
+ for (const task of tasks) {
435
+ if (!isStale(task.updatedAt, staleMinutes)) {
436
+ result.unchanged++;
437
+ continue;
438
+ }
439
+ const match = findBestMatch(task, commits);
440
+ if (!match) {
441
+ result.unchanged++;
442
+ continue;
443
+ }
444
+ if (!commitIsAdmissible(match.commit.hash)) {
445
+ result.rejected.push({
446
+ taskId: task.id,
447
+ title: task.title,
448
+ matchedCommit: match.commit.hash,
449
+ score: match.score
450
+ });
451
+ result.unchanged++;
452
+ process.stderr.write(
453
+ `[git-sweep] Rejected task ${task.id} \u2192 commit ${match.commit.hash} (score: ${match.score.toFixed(2)}) \u2014 commit changes no executable production source
454
+ `
455
+ );
456
+ continue;
457
+ }
458
+ if (!dryRun) {
459
+ try {
460
+ const { updateTaskStatus } = await import("./tasks-crud-ZU6RZDEZ.js");
461
+ await updateTaskStatus({
462
+ taskId: task.id,
463
+ status: "needs_review",
464
+ result: `Auto-escalated by git-sweep: matching commit ${match.commit.hash} found (score: ${match.score.toFixed(2)})`
465
+ });
466
+ } catch (err) {
467
+ result.errors.push(
468
+ `Failed to escalate task ${task.id}: ${err instanceof Error ? err.message : String(err)}`
469
+ );
470
+ continue;
471
+ }
472
+ }
473
+ result.escalated.push({
474
+ taskId: task.id,
475
+ title: task.title,
476
+ matchedCommit: match.commit.hash,
477
+ score: match.score
478
+ });
479
+ process.stderr.write(
480
+ `[git-sweep] ${dryRun ? "WOULD escalate" : "Escalated"} task ${task.id} \u2192 commit ${match.commit.hash} (score: ${match.score.toFixed(2)})
481
+ `
482
+ );
483
+ }
484
+ return result;
485
+ }
486
+
487
+ export {
488
+ measureCommitSubstance,
489
+ assessAutomatedTaskCompletion,
490
+ extractKeywords,
491
+ matchScore,
492
+ getRecentCommits,
493
+ pushUnpushedCommits,
494
+ findBestMatch,
495
+ sweepTasks
496
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EXE_AI_DIR
3
- } from "./chunk-EKOWJXHN.js";
3
+ } from "./chunk-QMSEL5YS.js";
4
4
  import {
5
5
  enforcePrivateFileSync,
6
6
  ensurePrivateDirSync
@@ -2,14 +2,14 @@ import {
2
2
  connectEmbedDaemon,
3
3
  disconnectClient,
4
4
  embedViaClient
5
- } from "./chunk-FXPWMPU2.js";
5
+ } from "./chunk-BNHAZ65R.js";
6
6
  import {
7
7
  EMBEDDING_DIM
8
8
  } from "./chunk-FXU7JOXK.js";
9
9
  import {
10
10
  MODELS_DIR,
11
11
  loadConfigSync
12
- } from "./chunk-EKOWJXHN.js";
12
+ } from "./chunk-QMSEL5YS.js";
13
13
 
14
14
  // src/lib/embedder.ts
15
15
  var MAX_EMBED_CHARS = 24e3;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveDataDir
3
- } from "./chunk-EKOWJXHN.js";
3
+ } from "./chunk-QMSEL5YS.js";
4
4
 
5
5
  // src/lib/postinstall-failure.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  PLATFORM_PROCEDURE_TITLES
3
- } from "./chunk-ZACPAM2C.js";
3
+ } from "./chunk-HHGOCBVQ.js";
4
4
  import {
5
5
  isGhostBehaviorRow
6
- } from "./chunk-5G46JZTE.js";
6
+ } from "./chunk-WBKIU6UJ.js";
7
7
  import {
8
8
  getClient,
9
9
  getIdentity,
10
10
  listIdentities,
11
11
  updateIdentity
12
- } from "./chunk-KAF66DIP.js";
12
+ } from "./chunk-HSBKV5LB.js";
13
13
  import {
14
14
  atomicWriteJsonSync
15
15
  } from "./chunk-HSGBZSCA.js";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  isExeSession,
3
3
  strictSessionScopeFilter
4
- } from "./chunk-ZVZEYHWY.js";
4
+ } from "./chunk-QX33D4CH.js";
5
5
  import {
6
6
  recordOrchestrationEventBestEffort
7
- } from "./chunk-4FNUBXYO.js";
7
+ } from "./chunk-UI3K73LD.js";
8
8
  import {
9
9
  getProjectName
10
- } from "./chunk-OPU3NYOO.js";
10
+ } from "./chunk-W2IRQJ6R.js";
11
11
  import {
12
12
  DEFAULT_COORDINATOR_TEMPLATE_NAME,
13
13
  getCoordinatorName
14
- } from "./chunk-KAF66DIP.js";
14
+ } from "./chunk-HSBKV5LB.js";
15
15
  import {
16
16
  loadConfigSync
17
- } from "./chunk-EKOWJXHN.js";
17
+ } from "./chunk-QMSEL5YS.js";
18
18
 
19
19
  // src/lib/review-polling.ts
20
20
  import { execSync } from "child_process";
@@ -260,7 +260,7 @@ function createRealDeps(getClient) {
260
260
  });
261
261
  },
262
262
  createReviewForOrphan: async (task) => {
263
- const { createReviewForCompletedTask } = await import("./tasks-review-P7JTBLWK.js");
263
+ const { createReviewForCompletedTask } = await import("./tasks-review-4F6PZZ3B.js");
264
264
  const cwd = process.cwd();
265
265
  await createReviewForCompletedTask(
266
266
  task,
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  createCRMWebhookHandler,
12
12
  parseTwentyWebhook
13
- } from "./chunk-TLBAZU3V.js";
13
+ } from "./chunk-EDZ5URGR.js";
14
14
  import {
15
15
  WhatsAppAdapter
16
16
  } from "./chunk-WSOA3WMC.js";
@@ -42,7 +42,7 @@ import {
42
42
  retryWithBackoff,
43
43
  routeMessage,
44
44
  validateGatewayConfig
45
- } from "./chunk-TOLJH6XP.js";
45
+ } from "./chunk-R3H3WW7H.js";
46
46
  import {
47
47
  OllamaProvider
48
48
  } from "./chunk-FWFFZGSC.js";