prjct-cli 3.94.0 → 3.96.0

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 (190) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +27 -21
  3. package/dist/bin/hook-chunks/{agent-identity-45BYQBU2.mjs → agent-identity-DH6DX72X.mjs} +1 -1
  4. package/dist/bin/hook-chunks/{agent-switch-2U2LOBGR.mjs → agent-switch-I4MTVE56.mjs} +1 -1
  5. package/dist/bin/hook-chunks/{analysis-N4NYGIG3.mjs → analysis-VN7APBHR.mjs} +3 -3
  6. package/dist/bin/hook-chunks/{auth-config-SP4PBALR.mjs → auth-config-JIITQ6GY.mjs} +1 -1
  7. package/dist/bin/hook-chunks/{auto-flush-BN6L6QHO.mjs → auto-flush-DX3FVSQE.mjs} +1 -1
  8. package/dist/bin/hook-chunks/{capture-gate-FRF2G3IG.mjs → capture-gate-MEIQD7ZS.mjs} +1 -1
  9. package/dist/bin/hook-chunks/{chunk-OZJ6UKKP.mjs → chunk-22GFTUER.mjs} +1 -1
  10. package/dist/bin/hook-chunks/chunk-32RX4YGI.mjs +9 -0
  11. package/dist/bin/hook-chunks/{chunk-Q3EYM4GJ.mjs → chunk-33BHU4OM.mjs} +2 -2
  12. package/dist/bin/hook-chunks/{chunk-HNEKXKOI.mjs → chunk-3AHW4XQH.mjs} +1 -1
  13. package/dist/bin/hook-chunks/{chunk-JMCMTX6U.mjs → chunk-3CKNJ5RA.mjs} +1 -1
  14. package/dist/bin/hook-chunks/{chunk-6RLCUGGG.mjs → chunk-3FEXJUO2.mjs} +1 -1
  15. package/dist/bin/hook-chunks/{chunk-7GNWHWOO.mjs → chunk-3HGQPUKG.mjs} +1 -1
  16. package/dist/bin/hook-chunks/{chunk-D6IONKRA.mjs → chunk-3UB6SFRA.mjs} +1 -1
  17. package/dist/bin/hook-chunks/{chunk-AVRNHROK.mjs → chunk-64ZEBHDX.mjs} +1 -1
  18. package/dist/bin/hook-chunks/{chunk-MI3JEFON.mjs → chunk-7PBWIO4K.mjs} +3 -3
  19. package/dist/bin/hook-chunks/{chunk-UA4Z5TGG.mjs → chunk-7WO5CEH3.mjs} +1 -1
  20. package/dist/bin/hook-chunks/chunk-A6K4H3YT.mjs +9 -0
  21. package/dist/bin/hook-chunks/{chunk-3VWBNLBC.mjs → chunk-ADYTBOCZ.mjs} +1 -1
  22. package/dist/bin/hook-chunks/{chunk-TG5CQJD5.mjs → chunk-AORD3YDQ.mjs} +1 -1
  23. package/dist/bin/hook-chunks/{chunk-EHEQOF6Z.mjs → chunk-B36LC2JR.mjs} +1 -1
  24. package/dist/bin/hook-chunks/{chunk-FX6VHIKB.mjs → chunk-BKJHD5JI.mjs} +1 -1
  25. package/dist/bin/hook-chunks/{chunk-S7HQQILD.mjs → chunk-BVK7ZDLX.mjs} +1 -1
  26. package/dist/bin/hook-chunks/{chunk-HHIGNKDO.mjs → chunk-CPR4FPXG.mjs} +1 -1
  27. package/dist/bin/hook-chunks/{chunk-6UH244CC.mjs → chunk-D7DQABWO.mjs} +1 -1
  28. package/dist/bin/hook-chunks/{chunk-Y4DUB7UN.mjs → chunk-DB226JIV.mjs} +2 -2
  29. package/dist/bin/hook-chunks/{chunk-KOCROTRM.mjs → chunk-DCHIPMOG.mjs} +1 -1
  30. package/dist/bin/hook-chunks/{chunk-IKIB42F7.mjs → chunk-E7NA34VQ.mjs} +1 -1
  31. package/dist/bin/hook-chunks/{chunk-MHQTGU45.mjs → chunk-EGCYDLSO.mjs} +1 -1
  32. package/dist/bin/hook-chunks/{chunk-ZMKTR2IO.mjs → chunk-EI6VQZOX.mjs} +1 -1
  33. package/dist/bin/hook-chunks/{chunk-INXNK57E.mjs → chunk-ETTDRXQ6.mjs} +1 -1
  34. package/dist/bin/hook-chunks/{chunk-EQ5KNMLG.mjs → chunk-EXVL2OFE.mjs} +1 -1
  35. package/dist/bin/hook-chunks/{chunk-5EQLQ7GF.mjs → chunk-FZS3XGEA.mjs} +1 -1
  36. package/dist/bin/hook-chunks/{chunk-QYEASMFV.mjs → chunk-GSPDJSJ5.mjs} +1 -1
  37. package/dist/bin/hook-chunks/{chunk-TKWAFYF7.mjs → chunk-H2DGDAQP.mjs} +1 -1
  38. package/dist/bin/hook-chunks/chunk-H5AVBDCH.mjs +8 -0
  39. package/dist/bin/hook-chunks/{chunk-SDUS2AT7.mjs → chunk-HGZQWYBL.mjs} +1 -1
  40. package/dist/bin/hook-chunks/{chunk-EMTCZG5I.mjs → chunk-IJ523YO2.mjs} +1 -1
  41. package/dist/bin/hook-chunks/{chunk-NBKEOLDH.mjs → chunk-IWUF2LGO.mjs} +5 -5
  42. package/dist/bin/hook-chunks/chunk-JGZ3QGWX.mjs +11 -0
  43. package/dist/bin/hook-chunks/{chunk-66GE3IHX.mjs → chunk-JZDZH6IV.mjs} +1 -1
  44. package/dist/bin/hook-chunks/{chunk-PUHX3ECX.mjs → chunk-KDNUQPAK.mjs} +1 -1
  45. package/dist/bin/hook-chunks/chunk-KV4NXLPT.mjs +11 -0
  46. package/dist/bin/hook-chunks/{chunk-XE4MJNBQ.mjs → chunk-LF3S3MYE.mjs} +1 -1
  47. package/dist/bin/hook-chunks/chunk-LQLCYBFF.mjs +36 -0
  48. package/dist/bin/hook-chunks/{chunk-YUKGWWL7.mjs → chunk-LR24AIEW.mjs} +1 -1
  49. package/dist/bin/hook-chunks/{chunk-2HB2JHQE.mjs → chunk-M4YM7Z3F.mjs} +15 -15
  50. package/dist/bin/hook-chunks/{chunk-F4T7IAA7.mjs → chunk-MW54MTLB.mjs} +1 -1
  51. package/dist/bin/hook-chunks/{chunk-7O6OMD4X.mjs → chunk-NCLONKOT.mjs} +1 -1
  52. package/dist/bin/hook-chunks/{chunk-HRWXMF7P.mjs → chunk-NJ74RHNC.mjs} +1 -1
  53. package/dist/bin/hook-chunks/{chunk-JUZ5LNDI.mjs → chunk-NLL5AV2G.mjs} +2 -2
  54. package/dist/bin/hook-chunks/{chunk-OIU4Y5WL.mjs → chunk-OC4CYF7V.mjs} +1 -1
  55. package/dist/bin/hook-chunks/chunk-OLQAMCYV.mjs +18 -0
  56. package/dist/bin/hook-chunks/{chunk-C3W2HLJT.mjs → chunk-PPWPUEBH.mjs} +1 -1
  57. package/dist/bin/hook-chunks/chunk-PVCEWFHS.mjs +51 -0
  58. package/dist/bin/hook-chunks/{chunk-Y3J7UUMR.mjs → chunk-QOQZHR3E.mjs} +1 -1
  59. package/dist/bin/hook-chunks/{chunk-2UC4DTDO.mjs → chunk-QXCEBAIA.mjs} +1 -1
  60. package/dist/bin/hook-chunks/chunk-RT2DFIWF.mjs +19 -0
  61. package/dist/bin/hook-chunks/{chunk-NCOOKPXX.mjs → chunk-SQW2B7NW.mjs} +1 -1
  62. package/dist/bin/hook-chunks/{chunk-IHECXD2M.mjs → chunk-SWJ7TLBD.mjs} +1 -1
  63. package/dist/bin/hook-chunks/{chunk-X2AGNDGD.mjs → chunk-TB57OYGW.mjs} +1 -1
  64. package/dist/bin/hook-chunks/{chunk-QPRNRLG6.mjs → chunk-TF6PN7IB.mjs} +1 -1
  65. package/dist/bin/hook-chunks/{chunk-KG7Z6OMK.mjs → chunk-TKXOMN4K.mjs} +4 -4
  66. package/dist/bin/hook-chunks/chunk-UMJ5D5I6.mjs +9 -0
  67. package/dist/bin/hook-chunks/{chunk-NWIQNII6.mjs → chunk-UVATSTRF.mjs} +1 -1
  68. package/dist/bin/hook-chunks/{chunk-NHIWYDQD.mjs → chunk-WJV24WE6.mjs} +1 -1
  69. package/dist/bin/hook-chunks/{chunk-Q3Z53QTH.mjs → chunk-WL6PKX3U.mjs} +1 -1
  70. package/dist/bin/hook-chunks/chunk-WUOVBBPC.mjs +11 -0
  71. package/dist/bin/hook-chunks/{chunk-TYEAIX3X.mjs → chunk-XDBJSJOT.mjs} +1 -1
  72. package/dist/bin/hook-chunks/{chunk-JCYXFHQZ.mjs → chunk-XSJ7SPVR.mjs} +1 -1
  73. package/dist/bin/hook-chunks/{chunk-J6TAD3OZ.mjs → chunk-XV2LJVYB.mjs} +1 -1
  74. package/dist/bin/hook-chunks/{chunk-7JEKBJAP.mjs → chunk-XYKVWO23.mjs} +1 -1
  75. package/dist/bin/hook-chunks/{chunk-4O4D6DV7.mjs → chunk-Y3RHBU2R.mjs} +2 -2
  76. package/dist/bin/hook-chunks/{chunk-JPSJWCFD.mjs → chunk-Y7MZA2G4.mjs} +1 -1
  77. package/dist/bin/hook-chunks/{chunk-T2FCU3ZS.mjs → chunk-YHOZTAZH.mjs} +1 -1
  78. package/dist/bin/hook-chunks/chunk-YLOK4WRR.mjs +8 -0
  79. package/dist/bin/hook-chunks/{chunk-OENWCYLF.mjs → chunk-ZJW27EUC.mjs} +1 -1
  80. package/dist/bin/hook-chunks/{chunk-VWOIUTAX.mjs → chunk-ZQI4TJ5C.mjs} +3 -3
  81. package/dist/bin/hook-chunks/chunk-ZYCNW75E.mjs +9 -0
  82. package/dist/bin/hook-chunks/{chunk-AZHE4VOM.mjs → chunk-ZZBNFNMG.mjs} +1 -1
  83. package/dist/bin/hook-chunks/{client-ERZ5CM3D.mjs → client-K3ZA2BLB.mjs} +3 -3
  84. package/dist/bin/hook-chunks/{code-graph-cloud-4GRWQSUK.mjs → code-graph-cloud-XGQF7XYC.mjs} +1 -1
  85. package/dist/bin/hook-chunks/{codex-skill-6DYQMPDJ.mjs → codex-skill-6CRFUF3A.mjs} +1 -1
  86. package/dist/bin/hook-chunks/{command-installer-MF4KUM3X.mjs → command-installer-MUHZWDZA.mjs} +1 -1
  87. package/dist/bin/hook-chunks/{config-manager-2VZPHUDG.mjs → config-manager-2JJPCLKC.mjs} +1 -1
  88. package/dist/bin/hook-chunks/{context7-service-V7CIDF3Q.mjs → context7-service-NH4BMGSJ.mjs} +1 -1
  89. package/dist/bin/hook-chunks/{custom-workflow-storage-UOBQXY42.mjs → custom-workflow-storage-VBMWLKA7.mjs} +1 -1
  90. package/dist/bin/hook-chunks/cwd-changed-UTD6Y4MS.mjs +8 -0
  91. package/dist/bin/hook-chunks/{database-XYKQF3KR.mjs → database-ZCP76LMM.mjs} +1 -1
  92. package/dist/bin/hook-chunks/{detect-changes-DFRJOOB3.mjs → detect-changes-5W6EGEZG.mjs} +1 -1
  93. package/dist/bin/hook-chunks/{developer-evolution-SLC34HUU.mjs → developer-evolution-UTY3CWOK.mjs} +1 -1
  94. package/dist/bin/hook-chunks/{distill-U2LJGUG3.mjs → distill-5TNAM3LY.mjs} +1 -1
  95. package/dist/bin/hook-chunks/{editors-config-6XFYIOE6.mjs → editors-config-2CACBNS4.mjs} +1 -1
  96. package/dist/bin/hook-chunks/{enriched-recall-X6RDNNIE.mjs → enriched-recall-6VOIUNLN.mjs} +1 -1
  97. package/dist/bin/hook-chunks/{format-ALUX4QSI.mjs → format-IIOFTSBF.mjs} +1 -1
  98. package/dist/bin/hook-chunks/{judgment-ledger-storage-SCGU3URM.mjs → judgment-ledger-storage-7Q7AEEY6.mjs} +1 -1
  99. package/dist/bin/hook-chunks/{judgment-orchestrator-BYPG65RS.mjs → judgment-orchestrator-AAON4ZJ4.mjs} +1 -1
  100. package/dist/bin/hook-chunks/{judgment-receipt-GWSSCLAB.mjs → judgment-receipt-QLV3MYFT.mjs} +1 -1
  101. package/dist/bin/hook-chunks/{land-cue-MMISX2BI.mjs → land-cue-57B23PEL.mjs} +1 -1
  102. package/dist/bin/hook-chunks/{land-synthesis-WG5JAS7B.mjs → land-synthesis-ZVPFJERV.mjs} +1 -1
  103. package/dist/bin/hook-chunks/{legacy-crew-sweep-2WSO5KEB.mjs → legacy-crew-sweep-GR6HRSHX.mjs} +2 -2
  104. package/dist/bin/hook-chunks/{memory-index-QK5QJOFJ.mjs → memory-index-XE2MWKQS.mjs} +1 -1
  105. package/dist/bin/hook-chunks/{notification-MPVWVV52.mjs → notification-GU2ZJP5K.mjs} +1 -1
  106. package/dist/bin/hook-chunks/{pack-integrity-XRYOROK5.mjs → pack-integrity-WV5U3AFF.mjs} +1 -1
  107. package/dist/bin/hook-chunks/{pack-manager-WWGQNJDQ.mjs → pack-manager-QLFQKP24.mjs} +1 -1
  108. package/dist/bin/hook-chunks/{path-manager-ZR5RAKTK.mjs → path-manager-375HH6TB.mjs} +1 -1
  109. package/dist/bin/hook-chunks/{planning-S55KBPN2.mjs → planning-VPAX5DZL.mjs} +2 -2
  110. package/dist/bin/hook-chunks/{post-edit-QMHSZHDN.mjs → post-edit-UXCFSR3Y.mjs} +1 -1
  111. package/dist/bin/hook-chunks/{pre-bash-RAM6L3G4.mjs → pre-bash-MB4JNNYG.mjs} +1 -1
  112. package/dist/bin/hook-chunks/{pre-commit-736ZLMDL.mjs → pre-commit-U7TRFKWX.mjs} +1 -1
  113. package/dist/bin/hook-chunks/pre-edit-MDCQXI5F.mjs +11 -0
  114. package/dist/bin/hook-chunks/{pre-package-LCIAWWGK.mjs → pre-package-A6ZI5R64.mjs} +1 -1
  115. package/dist/bin/hook-chunks/{pre-search-J5EOFMYN.mjs → pre-search-ZZO3LGXJ.mjs} +1 -1
  116. package/dist/bin/hook-chunks/{pre-secrets-TSUMTXHH.mjs → pre-secrets-MWPPZPWK.mjs} +1 -1
  117. package/dist/bin/hook-chunks/{prjct-md-T2DG236Y.mjs → prjct-md-MS52YLI2.mjs} +1 -1
  118. package/dist/bin/hook-chunks/{project-agent-surfaces-VRY22I66.mjs → project-agent-surfaces-6AIW7KL6.mjs} +1 -1
  119. package/dist/bin/hook-chunks/{project-file-inventory-5DEN5VLF.mjs → project-file-inventory-HHURZTMH.mjs} +1 -1
  120. package/dist/bin/hook-chunks/project-memory-UDH56VFP.mjs +8 -0
  121. package/dist/bin/hook-chunks/{project-style-evolution-7MAUSED2.mjs → project-style-evolution-IJXT2MCP.mjs} +1 -1
  122. package/dist/bin/hook-chunks/prompt-7VZLYONO.mjs +24 -0
  123. package/dist/bin/hook-chunks/{publish-helper-G54XQV5K.mjs → publish-helper-ZSL27HSX.mjs} +1 -1
  124. package/dist/bin/hook-chunks/{purge-MC5LFSAO.mjs → purge-N2WN6NDB.mjs} +1 -1
  125. package/dist/bin/hook-chunks/retention-RET4P2RO.mjs +8 -0
  126. package/dist/bin/hook-chunks/{sdd-5UCVX43H.mjs → sdd-PB6WKSLE.mjs} +1 -1
  127. package/dist/bin/hook-chunks/{session-continuity-RKNAJJHR.mjs → session-continuity-BIJXMN44.mjs} +1 -1
  128. package/dist/bin/hook-chunks/session-start-R2VMKW2L.mjs +8 -0
  129. package/dist/bin/hook-chunks/settings-installer-CQKMGMRG.mjs +9 -0
  130. package/dist/bin/hook-chunks/{setup-WQRJ6TQL.mjs → setup-PPIZHVXS.mjs} +3 -3
  131. package/dist/bin/hook-chunks/{shipping-5D5LTJ3P.mjs → shipping-C637PCOF.mjs} +4 -4
  132. package/dist/bin/hook-chunks/{skill-index-RAVJMC4P.mjs → skill-index-55I3HLAI.mjs} +1 -1
  133. package/dist/bin/hook-chunks/{spec-context-inference-7DDSTRTV.mjs → spec-context-inference-RTTDOZZO.mjs} +1 -1
  134. package/dist/bin/hook-chunks/{spec-service-LAO5Z2M5.mjs → spec-service-ENLAAMVL.mjs} +2 -2
  135. package/dist/bin/hook-chunks/{spec-task-breakdown-K3GMQKGH.mjs → spec-task-breakdown-RUDEP3AY.mjs} +1 -1
  136. package/dist/bin/hook-chunks/{state-storage-EIFGUO7X.mjs → state-storage-AJUPG7J5.mjs} +1 -1
  137. package/dist/bin/hook-chunks/stop-DPXAWJFN.mjs +16 -0
  138. package/dist/bin/hook-chunks/subagent-start-AFHPXL2S.mjs +8 -0
  139. package/dist/bin/hook-chunks/{subagent-stop-RBD2OILE.mjs → subagent-stop-5BMV63ML.mjs} +1 -1
  140. package/dist/bin/hook-chunks/{surface-attribution-K37N2NK7.mjs → surface-attribution-EGIKCVMF.mjs} +1 -1
  141. package/dist/bin/hook-chunks/{symbol-graph-BKQIMFRG.mjs → symbol-graph-MH42JSPX.mjs} +1 -1
  142. package/dist/bin/hook-chunks/{sync-client-EGBMWF3J.mjs → sync-client-PIRHMHXL.mjs} +1 -1
  143. package/dist/bin/hook-chunks/{sync-cursor-storage-E3LMZISA.mjs → sync-cursor-storage-ZB7FGT6D.mjs} +1 -1
  144. package/dist/bin/hook-chunks/{task-orchestration-2ZYE5M6J.mjs → task-orchestration-7NGRIISS.mjs} +1 -1
  145. package/dist/bin/hook-chunks/{task-overview-ITY5OSHX.mjs → task-overview-F3GB77OA.mjs} +1 -1
  146. package/dist/bin/hook-chunks/task-service-FZABHPFV.mjs +8 -0
  147. package/dist/bin/hook-chunks/{tdd-7S55S5C3.mjs → tdd-TAMBOPN3.mjs} +1 -1
  148. package/dist/bin/hook-chunks/{template-loader-SCM4C2A3.mjs → template-loader-MXOMU4XH.mjs} +1 -1
  149. package/dist/bin/hook-chunks/{transcript-jsonl-6X4DDD6R.mjs → transcript-jsonl-7W2NOJPZ.mjs} +1 -1
  150. package/dist/bin/hook-chunks/{usefulness-SCH5ARGV.mjs → usefulness-TBD5EYAL.mjs} +1 -1
  151. package/dist/bin/hook-chunks/{vault-retire-notice-HT756AND.mjs → vault-retire-notice-7XHVNHU6.mjs} +1 -1
  152. package/dist/bin/hook-chunks/{velocity-storage-47CF3XWZ.mjs → velocity-storage-IOCVK2LU.mjs} +1 -1
  153. package/dist/bin/hook-chunks/{weak-model-mode-FLCEQ2BV.mjs → weak-model-mode-BMSPGEQY.mjs} +1 -1
  154. package/dist/bin/hook-chunks/{work-graph-JQHVVXIZ.mjs → work-graph-AVAOKY63.mjs} +1 -1
  155. package/dist/bin/hook-chunks/work-scope-YCS4GTXW.mjs +8 -0
  156. package/dist/bin/hook-chunks/{workspace-occupancy-UUW4UGGB.mjs → workspace-occupancy-JOBYNNXV.mjs} +1 -1
  157. package/dist/bin/hook-fast-darwin-arm64 +0 -0
  158. package/dist/bin/hook-fast-darwin-x64 +0 -0
  159. package/dist/bin/hook-fast-linux-x64 +0 -0
  160. package/dist/bin/prjct-core.mjs +739 -714
  161. package/dist/bin/prjct-hooks.mjs +3 -3
  162. package/dist/bin/prjct.mjs +22 -9
  163. package/dist/daemon/entry.mjs +620 -593
  164. package/dist/mcp/server.mjs +317 -303
  165. package/package.json +3 -5
  166. package/scripts/install.sh +28 -496
  167. package/dist/bin/hook-chunks/chunk-27XFSCOE.mjs +0 -43
  168. package/dist/bin/hook-chunks/chunk-4SKJWNKE.mjs +0 -11
  169. package/dist/bin/hook-chunks/chunk-AZYQFRPJ.mjs +0 -9
  170. package/dist/bin/hook-chunks/chunk-DRGI5UHQ.mjs +0 -10
  171. package/dist/bin/hook-chunks/chunk-GFY4GY3Z.mjs +0 -8
  172. package/dist/bin/hook-chunks/chunk-JAMSIKDE.mjs +0 -9
  173. package/dist/bin/hook-chunks/chunk-NUJASVHN.mjs +0 -18
  174. package/dist/bin/hook-chunks/chunk-NWZEBCTC.mjs +0 -19
  175. package/dist/bin/hook-chunks/chunk-PW3KYKVS.mjs +0 -9
  176. package/dist/bin/hook-chunks/chunk-TFCLMTJ5.mjs +0 -9
  177. package/dist/bin/hook-chunks/chunk-TRMBRDKH.mjs +0 -8
  178. package/dist/bin/hook-chunks/chunk-V2BSS7HW.mjs +0 -36
  179. package/dist/bin/hook-chunks/chunk-ZJXH76Q5.mjs +0 -11
  180. package/dist/bin/hook-chunks/cwd-changed-J6O46KS7.mjs +0 -8
  181. package/dist/bin/hook-chunks/pre-edit-GZ4QJ2MU.mjs +0 -11
  182. package/dist/bin/hook-chunks/project-memory-KKEMTEMP.mjs +0 -8
  183. package/dist/bin/hook-chunks/prompt-DVF6V2X2.mjs +0 -22
  184. package/dist/bin/hook-chunks/retention-LWETHQX3.mjs +0 -8
  185. package/dist/bin/hook-chunks/session-start-MFMFKUPK.mjs +0 -8
  186. package/dist/bin/hook-chunks/settings-installer-QDM3GB6J.mjs +0 -9
  187. package/dist/bin/hook-chunks/stop-RYLI4FGF.mjs +0 -16
  188. package/dist/bin/hook-chunks/subagent-start-CCUPSANT.mjs +0 -8
  189. package/dist/bin/hook-chunks/task-service-XREJLWEF.mjs +0 -8
  190. package/dist/bin/hook-chunks/work-scope-CDLSZ4U5.mjs +0 -8
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __createRequire } from 'module';
3
- import { fileURLToPath as __fileURLToPath } from 'url';
4
- import { dirname as __pathDirname } from 'path';
5
- const require = __createRequire(import.meta.url);
6
- const __filename = __fileURLToPath(import.meta.url);
7
- const __dirname = __pathDirname(__filename);
8
- import{a as r}from"./chunk-E66B27AL.mjs";import{existsSync as S}from"node:fs";import k from"node:fs/promises";import O from"node:os";import l from"node:path";function f(){let t=process.env.HOME||O.homedir();return l.join(t,".claude","settings.json")}r(f,"settingsPath");var p="_prjctManaged",j=10,g=[{event:"SessionStart",matcher:"",subcommand:"session-start"},{event:"UserPromptSubmit",matcher:"",subcommand:"prompt"},{event:"PreToolUse",matcher:"Bash",subcommand:"pre-bash"},{event:"PreToolUse",matcher:"Edit|Write",subcommand:"pre-edit"},{event:"PreToolUse",matcher:"Grep|Glob",subcommand:"pre-search"},{event:"PostToolUse",matcher:"Edit|Write",subcommand:"post-edit"},{event:"Stop",matcher:"",subcommand:"stop"},{event:"SubagentStart",matcher:"",subcommand:"subagent-start"},{event:"SubagentStop",matcher:"",subcommand:"subagent-stop"},{event:"Notification",matcher:"",subcommand:"notification"},{event:"CwdChanged",matcher:"",subcommand:"cwd-changed"}];function y(t){let e=t.command?.match(/\bhook\s+(\S+)/);return e?e[1]:null}r(y,"subcommandOf");function w(t){let e=new Set(g.map(s=>s.subcommand)),o=[];for(let s of Object.keys(t)){let c=t[s],n=[];for(let a of c)a.hooks=a.hooks.filter(m=>{if(!d(m))return!0;let u=y(m);return u&&!e.has(u)?(o.push(m),!1):!0}),a.hooks.length>0&&n.push(a);n.length>0?t[s]=n:delete t[s]}return o.length}r(w,"pruneOrphanedManagedHooks");async function b(){try{let t=await k.readFile(f(),"utf-8"),e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch(t){if(t.code==="ENOENT")return{};throw t}}r(b,"readSettings");async function P(t){await k.mkdir(l.dirname(f()),{recursive:!0}),await k.writeFile(f(),`${JSON.stringify(t,null,2)}
9
- `,"utf-8")}r(P,"writeSettings");function x(){if(process.platform==="win32")return null;let t=process.execPath;if(!t)return null;let e=__dirname,o=[l.join(e,"prjct.mjs"),l.resolve(e,"..","prjct.mjs"),l.resolve(e,"..","..","dist","bin","prjct.mjs")].find(c=>S(c));return o?`${l.basename(t).includes("bun")?"":'NODE_OPTIONS="--experimental-sqlite${NODE_OPTIONS:+ $NODE_OPTIONS}" '}"${t}" "${o}"`:null}r(x,"directHookPrefix");function R(){if(process.platform==="win32")return null;let t=__dirname,e=`hook-fast-${process.platform}-${process.arch}`;return[l.join(t,e),l.resolve(t,"..",e),l.resolve(t,"..","..","dist","bin",e)].find(o=>S(o))??null}r(R,"nativeHookFastBinary");function $(t){let e=process.env.PRJCT_BIN??"prjct",o=`command -v ${e} >/dev/null 2>&1 && ${e} hook ${t} || exit 0`;if(process.env.PRJCT_BIN)return o;let s=x();if(!s)return o;let c=`${s} hook ${t}`,n=R();return`${n?`"${n}" ${t} || ${c}`:c} || { ${o.replace(" || exit 0","")}; } || exit 0`}r($,"hookCommand");function d(t){return t[p]===!0}r(d,"isPrjctHook");function N(t){if(t[p]===!0)return!1;let e=t.command?.trim()??"";return/(^|\/|\s)prjct\s+hook\s+\S+/.test(e)}r(N,"isLegacyPrjctHook");function v(t){let e={type:"command",command:$(t.subcommand),timeout:j,[p]:!0},o="ifClause"in t?t.ifClause:void 0;return typeof o=="string"&&o&&(e.if=o),e}r(v,"hookEntryFor");async function F(){let t=await b(),e=t.hooks??{},o=[],s=[];for(let n of g){let a=e[n.event]??[],m=a.find(i=>(i.matcher??"")===n.matcher),u=m??{matcher:n.matcher,hooks:[]};m||a.push(u);let H=u.hooks.length;u.hooks=u.hooks.filter(i=>!N(i));let E=H-u.hooks.length,h=u.hooks.find(i=>d(i)&&y(i)===n.subcommand);if(h){let i=v(n);h.command===i.command&&h.if===i.if&&h.timeout===i.timeout&&E===0?s.push(n):(h.command=i.command,h.if=i.if,h.timeout=i.timeout,o.push(n))}else u.hooks.push(v(n)),o.push(n);e[n.event]=a}let c=w(e);return t.hooks=e,await P(t),{settingsPath:f(),hooksWritten:o.length,alreadyPresent:s.length,hooksPruned:c}}r(F,"install");async function I(){let t=await b();if(!t.hooks)return{settingsPath:f(),hooksRemoved:0};let e=[];for(let[o,s]of Object.entries(t.hooks)){let c=[];for(let n of s){let a=n.hooks.filter(m=>d(m)?(e.push(m),!1):!0);a.length>0&&c.push({...n,hooks:a})}c.length>0?t.hooks[o]=c:delete t.hooks[o]}return Object.keys(t.hooks).length===0&&delete t.hooks,await P(t),{settingsPath:f(),hooksRemoved:e.length}}r(I,"uninstall");async function U(){let e=(await b()).hooks??{};return{installed:Object.values(e).flat().flatMap(s=>s.hooks).filter(d).length,expected:g.length}}r(U,"status");export{j as HOOK_TIMEOUT_SECONDS,g as PRJCT_HOOKS,F as install,U as status,I as uninstall};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __createRequire } from 'module';
3
- import { fileURLToPath as __fileURLToPath } from 'url';
4
- import { dirname as __pathDirname } from 'path';
5
- const require = __createRequire(import.meta.url);
6
- const __filename = __fileURLToPath(import.meta.url);
7
- const __dirname = __pathDirname(__filename);
8
- import{a as oe,b as R,d as G}from"./chunk-PW3KYKVS.mjs";import{b as se}from"./chunk-HRWXMF7P.mjs";import{a as L}from"./chunk-NCOOKPXX.mjs";import{a as ie}from"./chunk-ZJXH76Q5.mjs";import{b as re}from"./chunk-2UC4DTDO.mjs";import{a as B}from"./chunk-Y3J7UUMR.mjs";import{a as te,b as ne}from"./chunk-TRMBRDKH.mjs";import"./chunk-TPESWBA7.mjs";import{b as ee}from"./chunk-FEFP6JOL.mjs";import{c as M}from"./chunk-QPRNRLG6.mjs";import{c as Z}from"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import{a as m}from"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import{g as et,h as tt}from"./chunk-UUULLTQV.mjs";import{a as Q,c as U}from"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-DRGI5UHQ.mjs";import"./chunk-GAOQHD5S.mjs";import{b as v}from"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import{a as V,b as Qe,e as b,f as Ze,g as j}from"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import{b as Y,h as qe,v as q,w as Ve}from"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import{e as _,g as x,l as A,p as K}from"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as c,b as X,e as z}from"./chunk-E66B27AL.mjs";import k from"node:fs/promises";import ze from"node:path";import nt from"node:crypto";import rt from"node:fs/promises";function P(n){return typeof n=="string"?n:Array.isArray(n)?n.map(t=>{if(typeof t=="string")return t;if(t&&typeof t=="object"&&"text"in t){let e=t.text;return typeof e=="string"?e:""}return""}).join(`
9
- `).trim():""}c(P,"textOf");function C(n){try{let t=X("node:fs"),s=X("node:path").join(n,".prjct","prjct.config.json"),r=t.readFileSync(s,"utf-8");return JSON.parse(r).projectId??null}catch{return null}}c(C,"projectIdFromPath");var ue="friction-detector",ae="friction-promote",ce=5,le=400,pe=160,st=[/^\s*no[,.!\s]/i,/^\s*nope\b/i,/^\s*stop\b/i,/^\s*wait\b/i,/^\s*cancel\b/i],it=[/\bshould be\b/i,/\brather than\b/i,/\binstead\b/i],ot=[/\bdoesn'?t work\b/i,/\bbroken\b/i,/\bagain\b.*\bsame\b/i];async function de(n,t,e,s={}){let r=s.preloadedLines?s.preloadedLines:await rt.readFile(t,"utf-8").then(at).catch(()=>null);if(!r)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let i=ct(r);if(i.length===0)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let o=i.slice(0,ce).map(p=>({category:p.category,expectedBehavior:"Follow the user constraint without requiring correction.",observedBehavior:`The assistant response triggered user ${p.category}.`,relatedRuleId:null})),a=ft(n),l=C(n)??void 0;return{...await i.slice(0,ce).reduce(async(p,f)=>{let d=await p,y=ge(f.excerpt).slice(0,12);if(a.has(y))return await pt(n,l,f).catch(()=>{}),{...d,signalsSkipped:d.signalsSkipped+1};try{return await m.remember(n,{type:"improvement-signal",content:ut(f),tags:{source:ue,category:f.category,...s.runtime?{runtime:s.runtime}:{},...s.model?{model:s.model}:{},...e?{session:e}:{},key:y},provenance:"extracted",projectId:l}),a.add(y),{...d,signalsRecorded:d.signalsRecorded+1}}catch{return{...d,signalsSkipped:d.signalsSkipped+1}}},Promise.resolve({signalsRecorded:0,signalsSkipped:0})),failures:o}}c(de,"detectFriction");function at(n){return R(n)}c(at,"parseJsonl");function ct(n){let t={signals:[],lastAssistantText:""};for(let e of n){let s=e.role??e.message?.role,r=P(e.content??e.message?.content);if(!r)continue;if(s==="assistant"){t.lastAssistantText=r;continue}if(s!=="user")continue;let i=lt(r.slice(0,300));i&&t.signals.push({excerpt:r.slice(0,le).trim(),category:i,precedingAssistantPreview:t.lastAssistantText.slice(0,le).trim()})}return t.signals}c(ct,"extractSignals");function lt(n){return ot.some(t=>t.test(n))?"complaint":st.some(t=>t.test(n))?"negation":it.some(t=>t.test(n))?"correction":null}c(lt,"classify");function ut(n){let t=dt(n.category),e=fe(n.excerpt),s=e?`Obey developer constraint: ${e}`:t.lesson,r=e?`Always: ${e}`:t.nextAction;return[`[${n.category}] Lesson: ${s}`,"What happened: The user pushed back after the assistant response.",`Why it mattered: ${t.why}`,`Pattern: ${t.pattern}`,`Anti-pattern: ${t.antiPattern}`,`Next action: ${r}`].join(`
10
- `)}c(ut,"formatSignal");function fe(n){let t=n.replace(/\s+/g," ").trim();if(!t)return null;let e=t.replace(/^\s*(?:nope|no|stop|wait|cancel)[,.!\s:—-]*/i,"").trim(),s=e.match(/\bshould be\b\s+(.+?)$/i);if(s?.[1])return T(`Prefer ${s[1]}`);let r=e.match(/^(.+?)\s+rather than\s+(.+?)$/i);if(r?.[1]&&r[2])return T(`Prefer ${r[1].trim()} rather than ${r[2].trim()}`);let i=e.match(/\b(?:use|prefer|do|run|ship|write|keep)\s+(.+?)\s+instead(?:\s+of\s+(.+))?$/i);if(i?.[1]){let u=i[2]?` instead of ${i[2].trim()}`:" instead";return T(`Use ${i[1].trim()}${u}`)}let o=e.match(/\binstead of\b\s+(.+?)$/i);if(o?.[1])return T(`Avoid ${o[1].trim()}`);let a=e.match(/\b(?:don'?t|do not|never)\s+(.+?)$/i);if(a?.[1])return T(`Never ${a[1].trim()}`);let l=e.match(/\balways\s+(.+?)$/i);if(l?.[1])return T(`Always ${l[1].trim()}`);if(e.length>=12&&e.length<=pe&&/^(?:run|use|do|ship|write|keep|add|fix|remove|prefer|test|check|verify|read|ask|stop|start)\b/i.test(e)){let u=e.charAt(0).toUpperCase()+e.slice(1);return T(u.replace(/[.!?]+$/,""))}return null}c(fe,"extractSpecificConstraint");function T(n){let t=n.replace(/\s+/g," ").trim().replace(/^[-*•]\s+/,"").replace(/[.!?]+$/,"").slice(0,pe);return t.length<12||/^(?:nope|no|stop|wait|cancel)\b/i.test(t)?null:t}c(T,"cleanConstraint");async function pt(n,t,e){if(!t)return;let s=fe(e.excerpt);if(!s)return;let r=`Always: ${s}`,i=`fp:${ge(s).slice(0,12)}`;try{if(m.recall(t,{types:["feedback"],tags:{source:ae,key:i},limit:1,dedupeByKey:!1}).length>0)return;await m.remember(n,{type:"feedback",content:r,tags:{source:ae,key:i,category:e.category,from:"recurring-friction"},provenance:"extracted",projectId:t})}catch{}}c(pt,"maybePromoteStandingPreference");function dt(n){return n==="complaint"?{lesson:"Treat explicit failure complaints as evidence that the last result needs diagnosis, not repetition.",why:"The user reported that the delivered behavior or command did not work.",pattern:"User names a broken or non-working result after an assistant action.",antiPattern:"Retrying the same path or moving on without isolating the failure.",nextAction:"Stop, inspect the failing output or assumption, and propose the smallest verifiable fix."}:n==="correction"?{lesson:"Update the working assumption when the user corrects the intended direction.",why:"The assistant was using an assumption that did not match what the user wanted.",pattern:"User redirects the implementation or workflow with a correction.",antiPattern:"Continuing with the original plan after the user clarified a different target.",nextAction:"Restate the corrected target as an actionable rule before continuing."}:{lesson:"Recalibrate before continuing when the user rejects the assistant\u2019s last step.",why:"The assistant likely violated sequencing, scope, or approval expectations.",pattern:"User immediately rejects an assistant action or proposed next step.",antiPattern:"Treating the rejected action as acceptable and continuing without changing course.",nextAction:"Pause, convert the pushback into a workflow constraint, and adjust the next tool use."}}c(dt,"lessonTemplate");function ge(n){let t=n.toLowerCase().replace(/\s+/g," ").trim();return nt.createHash("sha256").update(t).digest("hex")}c(ge,"hashSignal");function ft(n){try{let t=C(n);if(!t)return new Set;let e=m.recall(t,{types:["improvement-signal"],tags:{source:ue},limit:100,dedupeByKey:!1}),s=new Set;for(let r of e){let i=r.tags.key;i&&s.add(i)}return s}catch{return new Set}}c(ft,"projectMemoryHashes");var gt=32;function me(n={}){let e=(n.hookHost===void 0?process.env.PRJCT_HOOK_HOST:n.hookHost)?.trim().toLowerCase().slice(0,gt);return e&&te.has(e)?e:n.detectedRuntime??ne()}c(me,"resolveInstructionRuntime");K();function he(n){try{return JSON.parse(n)}catch{return null}}c(he,"safeJsonParse");function S(n,t,e,s){let r=[];try{let{prjctDb:i}=(j(),z(Ze)),o=i.query(n,t,...e);for(let a of o){let l=he(a.data);if(!l||typeof l!="object")continue;let u=l.tags;if(!u)continue;let p=s(u,l);p!==void 0&&r.push(p)}}catch{}return r}c(S,"collectFromPersistedEvents");var we="lean-detector",mt="lean-debt-growth",ht=3,ye=["off","lite","full","ultra"];function yt(n){let t=n?.lean?.mode;if(t&&ye.includes(t))return t;let e=process.env.PRJCT_LEAN_MODE?.toLowerCase();return e&&ye.includes(e)?e:"off"}c(yt,"effectiveMode");async function be(n,t){let e={active:!1,total:0,previous:0,persisted:!1},s=t!==void 0?t:await v.readConfig(n).catch(()=>null);if(!s?.projectId||yt(s)==="off")return e;e.active=!0;try{let r=await wt(n);if(e.total=r,r===0)return e;let i=bt(s.projectId);e.previous=i;let o=r-i;i>0&&o>=ht&&(await m.remember(n,{type:"lean-debt",content:`Lean debt growing: \`lean:\` markers rose by ${o} (now ${r}, was ${i}). Deferred simplifications are accumulating \u2014 consider a leaning pass via \`prjct lean debt\`.`,tags:{source:we,pattern:mt,total:String(r),previous:String(i),delta:String(o)},provenance:"inferred",projectId:s.projectId}),e.persisted=!0)}catch{}return e}c(be,"detectAndPersistLeanDebt");async function wt(n){let t=await _(["grep","-cI","-e","lean:"],{cwd:n,maxBuffer:16777216});if(!t.ok){if(x(t,1))return 0;A(t)}return t.stdout.split(`
11
- `).reduce((e,s)=>{let r=s.lastIndexOf(":");if(r<=0)return e;let i=Number.parseInt(s.slice(r+1),10);return Number.isFinite(i)?e+i:e},0)}c(wt,"measureLeanMarkers");function bt(n){return S(n,"SELECT data FROM events WHERE type = 'memory.remember.lean-debt' ORDER BY id DESC LIMIT 50",[],e=>{if(e.source!==we)return;let s=typeof e.total=="string"?Number.parseInt(e.total,10):0;return Number.isFinite(s)?s:void 0})[0]??0}c(bt,"collectPreviousSnapshot");import St from"node:path";K();var kt="hot-file",Se="pattern-detector-auto",vt="recurring-bug",ke="pattern-detector-recurring",Rt="tech-debt-growth",ve="pattern-detector-debt",D=7,Tt=3,O=30,Et=2,_t=5,At=[/^package(-lock)?\.json$/,/^bun\.lock(b)?$/,/^pnpm-lock\.yaml$/,/^yarn\.lock$/,/^CHANGELOG\.md$/,/^\.gitignore$/,/\.snap$/,/^dist\//,/^node_modules\//];async function Re(n,t){let e={scanned:0,hotFiles:[],persisted:0,skipped:[],errors:[]},s=t!==void 0?t:await v.readConfig(n).catch(()=>null);if(!s?.projectId)return e.errors.push("no project config"),e;try{let r=await Ct(n);if(e.scanned+=r.length,e.hotFiles=r,r.length>0){let i=Pt(s.projectId);for(let o of r){if(i.has(o.path)){e.skipped.push({reason:"already-marked-this-window",file:o.path});continue}try{await m.remember(n,{type:"learning",content:`Hot file: \`${o.path}\` \u2014 ${o.touches} touches in the last ${D} days. Worth a refactor pass or a deliberate decision about why it churns this often.`,tags:{source:Se,pattern:kt,file:o.path,touches:String(o.touches),window_days:String(D)},provenance:"inferred"}),e.persisted+=1}catch(a){e.errors.push(`remember failed for ${o.path}: ${a.message}`)}}}}catch(r){e.errors.push(`hot-file detection failed: ${r.message}`)}try{let r=xt(s.projectId);if(r.length>0){let i=Dt(s.projectId);for(let o of r){if(i.has(o.topic)){e.skipped.push({reason:"recurring-bug-already-marked",file:o.topic});continue}try{await m.remember(n,{type:"learning",content:`Recurring bug pattern: gotchas tagged \`topic:${o.topic}\` reported ${o.occurrences} times in the last ${O} days. Likely a real underlying issue \u2014 consider a focused investigation before patching the next instance.`,tags:{source:ke,pattern:vt,topic:o.topic,occurrences:String(o.occurrences),window_days:String(O)},provenance:"inferred"}),e.persisted+=1}catch(a){e.errors.push(`remember failed for recurring ${o.topic}: ${a.message}`)}}}}catch(r){e.errors.push(`recurring-bug detection failed: ${r.message}`)}try{let r=await Mt(n);if(r.totalCount>0){let i=Lt(s.projectId),o=r.totalCount-i;if(i>0&&o>=_t)try{await m.remember(n,{type:"learning",content:`Tech debt growing: TODO/FIXME/XXX count rose by ${o} (now ${r.totalCount}, was ${i}). Consider a focused debt-reduction pass before adding more features.`,tags:{source:ve,pattern:Rt,total:String(r.totalCount),previous:String(i),delta:String(o)},provenance:"inferred"}),e.persisted+=1}catch(a){e.errors.push(`remember failed for tech-debt: ${a.message}`)}}}catch(r){e.errors.push(`tech-debt detection failed: ${r.message}`)}return e}c(Re,"detectAndPersistPatterns");async function Ct(n){let t=await _(["log",`--since=${D}.days.ago`,"--name-only","--pretty=format:","-z"],{cwd:n,maxBuffer:16777216,timeoutMs:15e3});if(!t.ok){if(t.kind==="exit")return[];A(t)}let e=new Map;for(let r of t.stdout.split("\0")){let i=r.trim();i&&(It(i)||e.set(i,(e.get(i)??0)+1))}let s=[];for(let[r,i]of e)i<Tt||s.push({path:r,touches:i});return s.sort((r,i)=>i.touches-r.touches),s}c(Ct,"detectHotFiles");function It(n){let t=St.basename(n);for(let e of At)if(e.test(n)||e.test(t))return!0;return!1}c(It,"isIgnored");function xt(n){let t=new Date(Date.now()-O*24*60*60*1e3).toISOString(),e=S(n,"SELECT data, timestamp FROM events WHERE type = 'memory.remember.gotcha' AND timestamp >= ? ORDER BY id DESC LIMIT 500",[t],i=>{if(i.source==="transcript-auto")return;let o=typeof i.topic=="string"?i.topic:void 0,a=typeof i.area=="string"?i.area:void 0;return(o??a)||void 0}),s=new Map;for(let i of e)s.set(i,(s.get(i)??0)+1);let r=[];for(let[i,o]of s)o<Et||r.push({topic:i,occurrences:o});return r.sort((i,o)=>o.occurrences-i.occurrences),r}c(xt,"detectRecurringBugs");async function Mt(n){let t=await _(["grep","-cE","\\b(TODO|FIXME|XXX)\\b"],{cwd:n,maxBuffer:16777216});if(!t.ok){if(x(t,1))return{totalCount:0};A(t)}return{totalCount:t.stdout.split(`
12
- `).reduce((s,r)=>{let i=r.lastIndexOf(":");if(i<=0)return s;let o=Number.parseInt(r.slice(i+1),10);return Number.isFinite(o)?s+o:s},0)}}c(Mt,"measureTechDebt");function Lt(n){return S(n,"SELECT data FROM events WHERE type = 'memory.remember.learning' ORDER BY id DESC LIMIT 50",[],e=>{if(e.source!==ve)return;let s=typeof e.total=="string"?Number.parseInt(e.total,10):0;return Number.isFinite(s)?s:void 0})[0]??0}c(Lt,"collectPreviousDebtSnapshot");function Pt(n){let t=Date.now()-D*24*60*60*1e3,e=S(n,"SELECT data FROM events WHERE type = 'memory.remember.learning' ORDER BY id DESC LIMIT 200",[],(s,r)=>{if(s.source!==Se)return;let i=s.file,o=r.rememberedAt;if(typeof i=="string"){if(typeof o=="string"){let a=Date.parse(o);if(!Number.isNaN(a)&&a<t)return}return i}});return new Set(e)}c(Pt,"collectAlreadyMarkedHotFiles");function Dt(n){let t=Date.now()-O*24*60*60*1e3,e=S(n,"SELECT data FROM events WHERE type = 'memory.remember.learning' ORDER BY id DESC LIMIT 200",[],(s,r)=>{if(s.source!==ke)return;let i=s.topic,o=r.rememberedAt;if(typeof i=="string"){if(typeof o=="string"){let a=Date.parse(o);if(!Number.isNaN(a)&&a<t)return}return i}});return new Set(e)}c(Dt,"collectAlreadyMarkedRecurringBugs");Ve();Qe();import I from"node:fs/promises";import Te from"node:path";j();var Ot={conservative:{inboxDays:30,archivesDays:180,checkpointsDays:null},standard:{inboxDays:14,archivesDays:90,checkpointsDays:30},aggressive:{inboxDays:7,archivesDays:30,checkpointsDays:14}};function Nt(n=process.env){let t=(n.PRJCT_CLEANUP_AGGRESSIVENESS??"standard").toLowerCase();return Ot[t==="conservative"||t==="standard"||t==="aggressive"?t:"standard"]}c(Nt,"resolveProfile");async function $t(n,t){let e=Date.now()-t*24*60*60*1e3,r=m.recall(n,{types:["inbox"],limit:200}).filter(o=>Date.parse(o.rememberedAt)<e);if(r.length===0)return 0;let i=[];for(let o of r)try{U.archive(n,{entityType:"memory_entry",entityId:o.id,entityData:{type:o.type,content:o.content,tags:o.tags,rememberedAt:o.rememberedAt},summary:o.content.slice(0,80),reason:`inbox-age-out (>${t}d)`});let a=o.id.startsWith("mem_")?o.id.slice(4):null;a&&b.run(n,"UPDATE events SET type = ? WHERE id = ?","memory.archived.inbox",Number(a)),b.run(n,"UPDATE memory_entries SET deleted_at = ? WHERE id = ?",Date.now(),o.id),i.push(o.id)}catch{}return i.length}c($t,"archiveAgedInbox");async function Ht(n,t){if(t===null)return 0;let e=Te.join(q.getGlobalProjectPath(n),"checkpoints"),s=await I.readdir(e).catch(()=>null);if(!s)return 0;let r=Date.now()-t*24*60*60*1e3,i=[];for(let o of s){if(!o.endsWith(".json"))continue;let a=Te.join(e,o);try{(await I.stat(a)).mtimeMs<r&&(await I.unlink(a),i.push(a))}catch{}}return i.length}c(Ht,"pruneOldCheckpoints");async function Ft(){let{getVerifyCachePath:n}=await import("./context7-service-V7CIDF3Q.mjs"),t=n();try{let e=await I.stat(t);if((Date.now()-e.mtimeMs)/(1440*60*1e3)>7)return await I.unlink(t),!0}catch{}return!1}c(Ft,"rotateContext7Cache");async function Ee(n){let t=Nt(),e={inboxArchived:0,archivesPruned:0,checkpointsRemoved:0,context7CacheRotated:!1};try{e.inboxArchived=await $t(n,t.inboxDays)}catch{}try{e.archivesPruned=U.pruneOldArchives(n,t.archivesDays)}catch{}try{e.checkpointsRemoved=await Ht(n,t.checkpointsDays)}catch{}try{e.context7CacheRotated=await Ft()}catch{}return e}c(Ee,"runSessionCleanup");async function _e(n,t){if(t.inboxArchived+t.archivesPruned+t.checkpointsRemoved+(t.context7CacheRotated?1:0)===0)return;let r=`Session cleanup: ${[t.inboxArchived>0?`${t.inboxArchived} inbox archived`:null,t.archivesPruned>0?`${t.archivesPruned} archives pruned`:null,t.checkpointsRemoved>0?`${t.checkpointsRemoved} checkpoints removed`:null,t.context7CacheRotated?"context7 cache rotated":null].filter(i=>!!i).join(", ")}`;b.appendEvent(n,"memory.remember.system-event",{content:r,tags:{source:"session-cleanup",key:"last-cleanup"},provenance:"extracted",content_hash:V(r),project_id:n})}c(_e,"recordCleanupReport");import jt from"node:crypto";import Ut from"node:fs/promises";import{z as w}from"zod";qe();j();var Ce="crew-run:",Ae=w.object({id:w.string().min(1),spec_id:w.string().nullable().default(null),task_id:w.string().nullable().default(null),started_at:w.string().min(1),ended_at:w.string().min(1),implementer_summary:w.string().default(""),files_touched:w.array(w.string()).default([]),reviewer_verdict:w.enum(["APPROVED","CHANGES_REQUESTED"]),reviewer_notes:w.string().nullable().default(null)});function N(n){return`${Ce}${n}`}c(N,"keyFor");var J=class{static{c(this,"CrewRunStorage")}record(t,e){let s=e.runId??Q(),r=b.getDoc(t,N(s));if(r)return r;let i=Y(),o=Ae.parse({id:s,spec_id:e.specId??null,task_id:e.taskId??null,started_at:e.startedAt??i,ended_at:e.endedAt??i,implementer_summary:e.implementerSummary,files_touched:e.filesTouched,reviewer_verdict:e.reviewerVerdict,reviewer_notes:e.reviewerNotes??null});return b.setDoc(t,N(s),o),o}get(t,e){return b.getDoc(t,N(e))}list(t){return b.listDocsByPrefix(t,Ce).map(s=>Ae.parse(s.data))}delete(t,e){b.deleteDoc(t,N(e))}},Ie=new J;var Pe="skill-miss-detector",xe=3,Bt=280,Gt=["decision","gotcha","anti-pattern"],Jt=5400*1e3,Wt=360*60*1e3,Xt=2,De=5,zt=8,Oe=new Set(["should","because","project","prjct","instead","always","never","using","value","state","change","changes","update","updated","function","return","returns","error","errors","tests","testing","config","default","import","export","before","after","without"]);async function Ne(n,t,e,s={}){let r=s.preloadedLines?s.preloadedLines:await Ut.readFile(t,"utf-8").then(Yt).catch(()=>null);if(!r)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let i=C(n);if(!i)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let o=qt(r);if(!o)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let a=(()=>{try{return en(i,e)}catch{return null}})();if(!a)return{signalsRecorded:0,signalsSkipped:0,failures:[]};if(a.length===0)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let l=await ee(n).catch(()=>[]),u=(()=>{try{let h=Date.now()-Wt;return new Set(Ie.list(i).filter(g=>Date.parse(g.ended_at)>h).flatMap(g=>g.files_touched))}catch{return new Set}})(),p=Kt(o,l,a,u);if(p.length===0)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let f=tn(i),d=[];for(let h of p.slice(0,xe)){let g=Zt(h.memId,h.excerpt).slice(0,12);if(f.has(g)){d.push("skipped");continue}try{await m.remember(n,{type:"improvement-signal",content:Qt(h),tags:{source:Pe,kind:"skill-miss",category:"skill-miss",...s.runtime?{runtime:s.runtime}:{},...s.model?{model:s.model}:{},relates:h.memId,file:h.evidenceFile,key:g,...e?{session:e}:{}},provenance:"extracted",projectId:i}),M.penalizeSkillMiss(i,h.memId),d.push("recorded")}catch{d.push("skipped")}}let y=d.filter(h=>h==="recorded").length,W=d.filter(h=>h==="skipped").length;return{signalsRecorded:y,signalsSkipped:W,failures:p.slice(0,xe).map(h=>({category:"skill-miss",expectedBehavior:`Apply relevant project rule ${h.memId}.`,observedBehavior:"Relevant project knowledge was not referenced in the session.",relatedRuleId:h.memId}))}}c(Ne,"detectSkillMisses");function Kt(n,t,e,s=new Set){let r=Me(n);if(r.size===0)return[];let i=t.filter(l=>!s.has(l)),o=$(i),a=[];for(let l of e){let u=Me(`${l.content} ${l.fileTag}`);if(u.size===0)continue;let p=l.fileTag!==""&&i.some(g=>Le(g,l.fileTag))||[...o].some(g=>u.has(g)),f=Vt(u),d=[...u].filter(g=>!f.has(g)&&r.has(g)).length;if(!(p||d>=Xt)||[...f].some(g=>r.has(g)))continue;let h=l.fileTag!==""&&i.some(g=>Le(g,l.fileTag))?l.fileTag:i.find(g=>[...$([g])].some(Ye=>u.has(Ye)))??"";a.push({miss:{memId:l.id,memType:l.type,excerpt:l.content.replace(/\s+/g," ").trim().slice(0,Bt),evidenceFile:h,reason:p?"path-overlap-unused":"topic-overlap-unused"},rank:p?2:1,overlap:d})}return a.sort((l,u)=>u.rank-l.rank||u.overlap-l.overlap),a.map(l=>l.miss)}c(Kt,"analyze");function Yt(n){return R(n)}c(Yt,"parseJsonl");function qt(n){let t=[];for(let e of n){let s=e.role??e.message?.role;if(s!=="user"&&s!=="assistant")continue;let r=P(e.content??e.message?.content);r&&t.push(r)}return t.join(`
13
- `).toLowerCase()}c(qt,"transcriptTextOf");function Me(n){let t=new Set;for(let e of n.toLowerCase().split(/[^a-z0-9]+/))e.length<De||Oe.has(e)||t.add(e);return t}c(Me,"tokenize");function Vt(n){let t=[...n].filter(s=>s.length>=zt);if(t.length>0)return new Set(t);let e=[...n].sort((s,r)=>r.length-s.length||s.localeCompare(r))[0]??"";return e?new Set([e]):new Set}c(Vt,"signatureOf");function $(n){let t=new Set;for(let e of n)for(let s of e.split("/")){let r=s.replace(/\.[a-z0-9]+$/i,"").toLowerCase();r.length>=De&&!Oe.has(r)&&t.add(r)}return t}c($,"fileStems");function Le(n,t){let e=$([n]);for(let s of $([t]))if(e.has(s))return!0;return!1}c(Le,"sharesStem");function Qt(n){let t=n.evidenceFile!==""?`touched \`${n.evidenceFile}\``:"worked the same area";return[`[skill-miss] Unused project knowledge (${n.memType}, ${n.memId}): "${n.excerpt}"`,`This session ${t} but never referenced it. Apply it, or supersede it via: prjct remember decision "<resolution>" --tags resolves:skill-miss,relates:${n.memId}`].join(`
14
- `)}c(Qt,"formatSkillMiss");function Zt(n,t){let e=`${n}::${t.toLowerCase().replace(/\s+/g," ").trim()}`;return jt.createHash("sha256").update(e).digest("hex")}c(Zt,"hashKey");function en(n,t){let e=m.recall(n,{types:[...Gt],limit:120}),s=Date.now()-Jt,r=[];for(let i of e)i.provenance!=="inferred"&&(Date.parse(i.rememberedAt)>s||t&&i.tags.session===t||r.push({id:i.id,type:i.type,content:i.content,fileTag:i.tags.file??"",rememberedAt:i.rememberedAt,provenance:i.provenance,session:i.tags.session??""}));return r}c(en,"recallCandidates");function tn(n){try{let t=m.recall(n,{types:["improvement-signal"],tags:{source:Pe},limit:100,dedupeByKey:!1}),e=new Set;for(let s of t)s.tags.key&&e.add(s.tags.key);return e}catch{return new Set}}c(tn,"existingSkillMissKeys");import nn from"node:crypto";import rn from"node:fs/promises";var Fe="transcript-auto",sn="v2",je=80,Ue=20,H=1500,on=12,$e=4,an=[{phrase:"decided to",type:"decision"},{phrase:"we chose",type:"decision"},{phrase:"going with",type:"decision"},{phrase:"the right call",type:"decision"},{phrase:"best approach is",type:"decision"},{phrase:"we will use",type:"decision"},{phrase:"shipping with",type:"decision"},{phrase:"turns out that",type:"learning"},{phrase:"now i understand",type:"learning"},{phrase:"the key insight",type:"learning"},{phrase:"i learned that",type:"learning"},{phrase:"discovered that",type:"learning"},{phrase:"root cause is",type:"learning"},{phrase:"root cause was",type:"learning"},{phrase:"the fix is",type:"learning"},{phrase:"gotcha:",type:"gotcha"},{phrase:"bug:",type:"gotcha"},{phrase:"fails when",type:"gotcha"},{phrase:"breaks when",type:"gotcha"},{phrase:"be careful",type:"gotcha"},{phrase:"never do this",type:"gotcha"},{phrase:"trap:",type:"gotcha"},{phrase:"important:",type:"fact"},{phrase:"always use",type:"fact"},{phrase:"never write",type:"fact"},{phrase:"the pattern is",type:"pattern"},{phrase:"anti-pattern:",type:"anti-pattern"},{phrase:"antipattern:",type:"anti-pattern"}],Be=[{re:/^(?:[-*•]\s+)?(?:\*\*)?decision(?:\*\*)?\s*[:—-]\s+/i,type:"decision",phrase:"label:decision"},{re:/^(?:[-*•]\s+)?(?:\*\*)?(learning|insight)(?:\*\*)?\s*[:—-]\s+/i,type:"learning",phrase:"label:learning"},{re:/^(?:[-*•]\s+)?(?:\*\*)?(gotcha|trap|warning)(?:\*\*)?\s*[:—-]\s+/i,type:"gotcha",phrase:"label:gotcha"},{re:/^(?:[-*•]\s+)?(?:\*\*)?(fact|note)(?:\*\*)?\s*[:—-]\s+/i,type:"fact",phrase:"label:fact"},{re:/^(?:[-*•]\s+)?(?:\*\*)?root\s*cause(?:\*\*)?\s*[:—-]\s+/i,type:"learning",phrase:"label:root-cause"},{re:/^(?:[-*•]\s+)?(?:\*\*)?pattern(?:\*\*)?\s*[:—-]\s+/i,type:"pattern",phrase:"label:pattern"},{re:/^(?:[-*•]\s+)?(?:\*\*)?anti[- ]?pattern(?:\*\*)?\s*[:—-]\s+/i,type:"anti-pattern",phrase:"label:anti-pattern"}];async function Ge(n,t,e,s={}){let r={scanned:0,ingested:0,skipped:[],errors:[]},i=s.preloadedConfig!==void 0?s.preloadedConfig:await v.readConfig(n).catch(()=>null);if(!i?.projectId)return r.errors.push("no project config"),r;let o=await(async()=>{if(s.preloadedLines)return s.preloadedLines;try{return R(await rn.readFile(t,"utf-8"))}catch(d){return r.errors.push(`transcript read failed: ${d.message}`),null}})();if(o===null)return r;let a=cn(o),l=ln(o);if(r.scanned=a.length+l.length,a.length===0&&l.length===0)return r;let u=[...fn(a),...pn(l)];if(u.length===0)return r;let p=mn(i.projectId),f=e?e.slice(0,12):"unknown";for(let d of u){if(p.has(d.hash)){r.skipped.push({reason:"duplicate",phrase:d.matchedPhrase});continue}try{await m.remember(n,{type:d.type,content:d.content,tags:{source:Fe,capture:sn,session:f,hash:d.hash,phrase:d.matchedPhrase},provenance:"inferred",projectId:i.projectId}),r.ingested+=1}catch(y){r.errors.push(`remember failed: ${y.message}`)}}return r}c(Ge,"ingestTranscript");function cn(n){let t=[];for(let e of n){let s=Je(e);if(s!=="assistant")continue;let r=We(e);!r||r.length<je||t.push({role:s,text:r})}return t}c(cn,"projectMessages");function ln(n){let t=[];for(let e of n){let s=Je(e);if(s!=="user")continue;let r=We(e);!r||r.length<Ue||t.push({role:s,text:r})}return t}c(ln,"projectUserMessages");var un=[{re:/^(?:please\s+)?always\b/i,phrase:"user:always"},{re:/^(?:please\s+)?never\b/i,phrase:"user:never"},{re:/\bi (?:always|never|prefer)\b/i,phrase:"user:i-prefer"},{re:/^(?:rule|preference)\s*[:—-]/i,phrase:"user:rule"},{re:/\bno more\s+(?:features?|feature\s+creep)\b/i,phrase:"user:no-more-features"},{re:/\bdon'?t add (?:more )?(?:features?|surface)\b/i,phrase:"user:dont-add-features"}];function pn(n){let t=[],e=new Set;for(let s of n){if(t.length>=$e)break;let r=s.text.split(/\n/).map(o=>o.replace(/^[-*•]\s+/,"").trim()).filter(o=>o.length>=Ue),i=r.length>0?r:[s.text.trim()];for(let o of i){if(t.length>=$e)break;let a=un.find(p=>p.re.test(o));if(!a)continue;let l=o.length>H?`${o.slice(0,H)}\u2026`:o,u=Xe(l);e.has(u)||(e.add(u),t.push({type:"feedback",content:l,hash:u,matchedPhrase:a.phrase}))}}return t}c(pn,"extractUserPreferenceCandidates");function Je(n){let t=n.role;if(typeof t=="string")return He(t);let e=n.message;if(e&&typeof e=="object"&&"role"in e){let r=e.role;if(typeof r=="string")return He(r)}let s=n.type;return s==="assistant"||s==="user"||s==="system"?s:null}c(Je,"inferRole");function He(n){let t=n.toLowerCase();return t==="assistant"||t==="user"||t==="system"?t:null}c(He,"normalizeRole");function We(n){let t=n.content===void 0&&n.message&&typeof n.message=="object"?n.message.content:n.content;if(typeof t=="string")return t.trim();if(Array.isArray(t)){let e=[];for(let s of t){if(!s||typeof s!="object")continue;let r=s;r.type==="text"&&typeof r.text=="string"&&e.push(r.text)}return e.join(`
15
- `).trim()}return""}c(We,"extractText");function dn(n){let t=n.trim();if(t.length<je)return null;for(let r of Be)if(r.re.test(t))return{type:r.type,matchedPhrase:r.phrase};let e=t.toLowerCase(),s=an.find(r=>e.includes(r.phrase));return s?{type:s.type,matchedPhrase:s.phrase}:null}c(dn,"classifyCaptureParagraph");function fn(n){let t=[],e=new Set;for(let s of n){let r=gn(s.text);for(let i of r){if(t.length>=on)return t;let o=dn(i);if(!o)continue;let a=i.length>H?`${i.slice(0,H)}\u2026`:i,l=Xe(a);e.has(l)||(e.add(l),t.push({type:o.type,content:a,hash:l,matchedPhrase:o.matchedPhrase}))}}return t}c(fn,"extractCandidates");function gn(n){let t=n.split(/\n\s*\n/).map(s=>s.trim()).filter(Boolean),e=[];for(let s of t){let r=s.split(`
16
- `).map(o=>o.trim()).filter(Boolean);if(r.some(o=>Be.some(a=>a.re.test(o)))&&r.length>1)for(let o of r)e.push(o);else e.push(s)}return e}c(gn,"splitParagraphs");function Xe(n){return nn.createHash("sha256").update(n.toLowerCase().trim()).digest("hex").slice(0,16)}c(Xe,"hashContent");function mn(n){try{let{REMEMBER_EVENT_RANGE:t}=(tt(),z(et)),e=S(n,"SELECT data FROM events WHERE type >= ? AND type < ? ORDER BY id DESC LIMIT 500",[...t],s=>{if(s.source!==Fe)return;let r=s.hash;return typeof r=="string"?r:void 0});return new Set(e)}catch{return new Set}}c(mn,"collectExistingAutoHashes");var F=600*1e3,E=new Map;function hn(n){let t=n.replace(/[^a-zA-Z0-9._-]/g,"_");return ze.join(re.runDir(),`stop-heavy-${t}.stamp`)}c(hn,"heavyStepStampPath");async function Ke(n,t,e=!0){if(await k.stat(n).then(i=>t-i.mtimeMs<F).catch(()=>!1))return!1;let r=`${n}.lock`;try{await k.mkdir(r)}catch(i){if(i.code!=="EEXIST")throw i;return!await k.stat(r).then(a=>t-a.mtimeMs>=F).catch(()=>!1)||!e?!1:(await k.rmdir(r).catch(()=>{}),Ke(n,t,!1))}try{return await k.stat(n).then(o=>t-o.mtimeMs<F).catch(()=>!1)?!1:(await k.writeFile(n,String(t)),!0)}finally{await k.rmdir(r).catch(()=>{})}}c(Ke,"claimHeavyStep");async function yn(n){let t=Date.now(),e=E.get(n)??0;if(t-e<F)return!1;try{let s=hn(n);await k.mkdir(ze.dirname(s),{recursive:!0});let r=await Ke(s,t);return E.size>32&&E.clear(),E.set(n,t),r}catch{}return E.size>32&&E.clear(),E.set(n,t),!0}c(yn,"heavyStepsDue");function Wr(n=process.cwd(),t){return ie({event:"Stop",projectPath:n,afterEmit:c(async(e,s)=>{let r=await v.readConfig(s).catch(()=>null);if(!r?.projectId)return;let i=me(),o=await yn(r.projectId),a={};if(o&&e.transcript_path){let u=await k.readFile(e.transcript_path,"utf-8").catch(()=>null);u!==null&&(a.transcriptLines=R(u))}let l=oe(a.transcriptLines??[]);if(o)try{let{collectActiveTasks:u}=await import("./task-overview-ITY5OSHX.mjs"),p=await u(r.projectId,s);a.activeTaskId=p.current?.id,a.activeTaskDescription=p.current?.description,a.activeTaskStartedAt=p.current?.startedAt}catch{}if(a.transcriptLines&&a.transcriptLines.length>0)try{if(a.transcriptUsage=G(a.transcriptLines),a.transcriptUsage.tokensIn+a.transcriptUsage.tokensOut>0){let u=a.activeTaskStartedAt?{sinceIso:a.activeTaskStartedAt}:void 0,p=G(a.transcriptLines,u);if(a.activeTaskId&&p.tokensIn+p.tokensOut>0){B(r.projectId,a.activeTaskId,p.tokensIn,p.tokensOut,{description:a.activeTaskDescription,agent:i,source:`${i}-transcript`});try{let{sumTranscriptUsageByModel:f}=await import("./transcript-jsonl-6X4DDD6R.mjs");for(let[d,y]of f(a.transcriptLines,u))y.tokensIn+y.tokensOut<=0||B(r.projectId,a.activeTaskId,y.tokensIn,y.tokensOut,{model:d,agent:i,source:`${i}-transcript:${d}`})}catch{}}}}catch{}if(se({projectId:r.projectId,sessionId:e.session_id,directory:s,taskId:a.activeTaskId,goal:a.activeTaskDescription,tokensIn:a.transcriptUsage?.tokensIn,tokensOut:a.transcriptUsage?.tokensOut,agent:i,model:l}),o&&e.transcript_path)try{await Ge(s,e.transcript_path,e.session_id??null,{preloadedConfig:r,preloadedLines:a.transcriptLines})}catch{}if(o){try{await Re(s,r)}catch{}try{await be(s,r)}catch{}try{let u=await Ee(r.projectId);await _e(r.projectId,u),L.pruneRetained(r.projectId)}catch{}}if(o&&e.transcript_path)try{let u=await de(s,e.transcript_path,e.session_id??null,{preloadedLines:a.transcriptLines,runtime:i,model:l});for(let p of u.failures)try{L.record(r.projectId,{source:"friction-detector",runtime:i,model:l,sessionId:e.session_id??null,taskId:a.activeTaskId??null,...p})}catch{}u.signalsRecorded>0&&a.activeTaskId&&M.penalizeSurfaced(r.projectId,a.activeTaskId)}catch{}if(o&&e.transcript_path)try{let u=await Ne(s,e.transcript_path,e.session_id??null,{preloadedLines:a.transcriptLines,runtime:i,model:l});for(let p of u.failures)try{L.record(r.projectId,{source:"skill-miss-detector",runtime:i,model:l,sessionId:e.session_id??null,taskId:a.activeTaskId??null,...p})}catch{}}catch{}if(o)try{await Z.backfill(r.projectId,r,new Date().toISOString())}catch{}if(o&&a.activeTaskId){let u={projectId:r.projectId,projectPath:s,cycleDescription:a.activeTaskDescription??null,cycleId:a.activeTaskId,tokensIn:a.transcriptUsage?.tokensIn,tokensOut:a.transcriptUsage?.tokensOut,model:l},p=c(async f=>{try{await f()}catch{}},"runBestEffort");await p(async()=>{let{synthesizeLandHandoff:f}=await import("./land-synthesis-WG5JAS7B.mjs");await f(u)}),await p(async()=>{let{synthesizeJudgmentReceipt:f}=await import("./judgment-receipt-GWSSCLAB.mjs");await f(u)})}try{let{flushIfLinked:u}=await import("./auto-flush-BN6L6QHO.mjs");await u(s,r)}catch{}},"afterEmit")},t)}c(Wr,"runStopHook");export{hn as heavyStepStampPath,yn as heavyStepsDue,Wr as runStopHook};
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __createRequire } from 'module';
3
- import { fileURLToPath as __fileURLToPath } from 'url';
4
- import { dirname as __pathDirname } from 'path';
5
- const require = __createRequire(import.meta.url);
6
- const __filename = __fileURLToPath(import.meta.url);
7
- const __dirname = __pathDirname(__filename);
8
- import{b as a}from"./chunk-NUJASVHN.mjs";import"./chunk-HRWXMF7P.mjs";import{a as i}from"./chunk-ZJXH76Q5.mjs";import"./chunk-PUHX3ECX.mjs";import"./chunk-Q3EYM4GJ.mjs";import"./chunk-AZYQFRPJ.mjs";import"./chunk-JR542RI2.mjs";import"./chunk-HHIGNKDO.mjs";import"./chunk-7GNWHWOO.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-QPRNRLG6.mjs";import"./chunk-7JEKBJAP.mjs";import"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-DRGI5UHQ.mjs";import"./chunk-GAOQHD5S.mjs";import{b as n}from"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import{d as e,g as m}from"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as o}from"./chunk-E66B27AL.mjs";m();function l(c=process.cwd(),p){return i({event:"SubagentStart",projectPath:c,build:o((u,t)=>a(t),"build"),afterEmit:o(async(u,t)=>{try{let r=await n.readConfig(t);if(!r?.projectId)return;let{collectActiveTasks:s}=await import("./task-overview-ITY5OSHX.mjs"),d=await s(r.projectId,t);e.appendEvent(r.projectId,"subagent.spawned",{taskId:d.current?.id??null})}catch{}},"afterEmit")},p)}o(l,"runSubagentStartHook");export{l as runSubagentStartHook};
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __createRequire } from 'module';
3
- import { fileURLToPath as __fileURLToPath } from 'url';
4
- import { dirname as __pathDirname } from 'path';
5
- const require = __createRequire(import.meta.url);
6
- const __filename = __fileURLToPath(import.meta.url);
7
- const __dirname = __pathDirname(__filename);
8
- import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i}from"./chunk-2HB2JHQE.mjs";import"./chunk-XE4MJNBQ.mjs";import"./chunk-C3W2HLJT.mjs";import"./chunk-H4CA3XZ6.mjs";import"./chunk-4O4D6DV7.mjs";import"./chunk-JCYXFHQZ.mjs";import"./chunk-JPSJWCFD.mjs";import"./chunk-TPESWBA7.mjs";import"./chunk-FEFP6JOL.mjs";import"./chunk-JUZ5LNDI.mjs";import"./chunk-7O6OMD4X.mjs";import"./chunk-OZJ6UKKP.mjs";import"./chunk-YQ55MHKL.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KOGZCFBC.mjs";import"./chunk-FX6VHIKB.mjs";import"./chunk-HHIGNKDO.mjs";import"./chunk-7GNWHWOO.mjs";import"./chunk-OENWCYLF.mjs";import"./chunk-SJ75V4WG.mjs";import"./chunk-JMCMTX6U.mjs";import"./chunk-R4ILCXKE.mjs";import"./chunk-7JEKBJAP.mjs";import"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-3FBCOCPD.mjs";import"./chunk-6UH244CC.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-INXNK57E.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{e as TASK_CONTEXT_PROMPT,h as completeActiveTask,a as formatRelatedContextForAgent,b as formatRiskForAgent,i as readLastStatus,d as recallRisksForFiles,g as resolveActiveTask,f as setTaskStatus,c as startTask};
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __createRequire } from 'module';
3
- import { fileURLToPath as __fileURLToPath } from 'url';
4
- import { dirname as __pathDirname } from 'path';
5
- const require = __createRequire(import.meta.url);
6
- const __filename = __fileURLToPath(import.meta.url);
7
- const __dirname = __pathDirname(__filename);
8
- import{c as a,d as b,e as c,f as d,g as e,h as f}from"./chunk-JUZ5LNDI.mjs";import"./chunk-FX6VHIKB.mjs";import"./chunk-HHIGNKDO.mjs";import"./chunk-7GNWHWOO.mjs";import"./chunk-JMCMTX6U.mjs";import"./chunk-R4ILCXKE.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{c as extractFilePathsFromEntries,d as formatWorkScopeBlock,f as isUsefulScopePath,b as resolveWorkScope,a as resolveWorkScopeSync,e as toLikelyFileHits};