prjct-cli 3.96.0 → 3.98.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 (511) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/bin/prjct.cjs +14 -0
  3. package/dist/bin/core-chunks/agent-3N2MSSGT.mjs +31 -0
  4. package/dist/bin/core-chunks/agent-codenames-7N4DU62I.mjs +7 -0
  5. package/dist/bin/core-chunks/agent-identity-4KFRR5OU.mjs +7 -0
  6. package/dist/bin/core-chunks/agent-runtime-registry-3RMVBEV2.mjs +7 -0
  7. package/dist/bin/core-chunks/agent-switch-4SE6GF7R.mjs +7 -0
  8. package/dist/bin/core-chunks/agents-ZPNNCOH7.mjs +10 -0
  9. package/dist/bin/core-chunks/ai-provider-RVXK7D7R.mjs +7 -0
  10. package/dist/bin/core-chunks/analysis-OARMM4AH.mjs +41 -0
  11. package/dist/bin/core-chunks/auth-config-KWLVKHCY.mjs +7 -0
  12. package/dist/bin/core-chunks/auto-flush-XA3V7BJ6.mjs +7 -0
  13. package/dist/bin/core-chunks/auto-updater-PKYQRBGQ.mjs +8 -0
  14. package/dist/bin/core-chunks/bin-commands-FYID6EYI.mjs +21 -0
  15. package/dist/bin/core-chunks/capture-3JJPWIF3.mjs +7 -0
  16. package/dist/bin/core-chunks/capture-gate-G5LGVDME.mjs +7 -0
  17. package/dist/bin/core-chunks/ceremonies-B565WDCA.mjs +19 -0
  18. package/dist/bin/core-chunks/changelog-LPJ4GKB6.mjs +10 -0
  19. package/dist/bin/core-chunks/chunk-225DWS4D.mjs +7 -0
  20. package/dist/bin/core-chunks/chunk-24EN5Y62.mjs +48 -0
  21. package/dist/bin/core-chunks/chunk-2EEMQV7N.mjs +9 -0
  22. package/dist/bin/core-chunks/chunk-2FRLIQKX.mjs +10 -0
  23. package/dist/bin/core-chunks/chunk-2I5PUQWY.mjs +7 -0
  24. package/dist/bin/core-chunks/chunk-2JJM3YMW.mjs +44 -0
  25. package/dist/bin/core-chunks/chunk-2NI4EEK2.mjs +8 -0
  26. package/dist/bin/core-chunks/chunk-2TJRTFIS.mjs +9 -0
  27. package/dist/bin/core-chunks/chunk-2VRS5CUH.mjs +9 -0
  28. package/dist/bin/core-chunks/chunk-2VXPFULA.mjs +7 -0
  29. package/dist/bin/core-chunks/chunk-3OWKIRK6.mjs +7 -0
  30. package/dist/bin/core-chunks/chunk-3TRXQAU4.mjs +7 -0
  31. package/dist/bin/core-chunks/chunk-45LKWJ5D.mjs +7 -0
  32. package/dist/bin/core-chunks/chunk-4IE7LRH3.mjs +7 -0
  33. package/dist/bin/core-chunks/chunk-4MR5XSLO.mjs +8 -0
  34. package/dist/bin/core-chunks/chunk-4PPIE6GA.mjs +102 -0
  35. package/dist/bin/core-chunks/chunk-4PRD4EU2.mjs +7 -0
  36. package/dist/bin/core-chunks/chunk-4T7NGLNQ.mjs +16 -0
  37. package/dist/bin/core-chunks/chunk-5DZ2LTII.mjs +52 -0
  38. package/dist/bin/core-chunks/chunk-5EF5EOCL.mjs +7 -0
  39. package/dist/bin/core-chunks/chunk-5OWPZWEU.mjs +13 -0
  40. package/dist/bin/core-chunks/chunk-5TGZSK4C.mjs +10 -0
  41. package/dist/bin/core-chunks/chunk-5YLI5V3Q.mjs +8 -0
  42. package/dist/bin/core-chunks/chunk-5ZBACKED.mjs +14 -0
  43. package/dist/bin/core-chunks/chunk-623SNKDH.mjs +7 -0
  44. package/dist/bin/core-chunks/chunk-6FUCOGOW.mjs +7 -0
  45. package/dist/bin/core-chunks/chunk-6KNMT46X.mjs +18 -0
  46. package/dist/bin/core-chunks/chunk-6OYLZ4NM.mjs +10 -0
  47. package/dist/bin/core-chunks/chunk-6POAOY5C.mjs +19 -0
  48. package/dist/bin/core-chunks/chunk-6RT2P22O.mjs +7 -0
  49. package/dist/bin/core-chunks/chunk-6U3CYLY5.mjs +7 -0
  50. package/dist/bin/core-chunks/chunk-6U3MV7KZ.mjs +15 -0
  51. package/dist/bin/core-chunks/chunk-6XTLPAPZ.mjs +15 -0
  52. package/dist/bin/core-chunks/chunk-76YMLNLF.mjs +7 -0
  53. package/dist/bin/core-chunks/chunk-7BU6SJBC.mjs +17 -0
  54. package/dist/bin/core-chunks/chunk-7QTE6X4J.mjs +7 -0
  55. package/dist/bin/core-chunks/chunk-7ZHWJSW5.mjs +8 -0
  56. package/dist/bin/core-chunks/chunk-ACIOJQSI.mjs +14 -0
  57. package/dist/bin/core-chunks/chunk-AJXELVNH.mjs +7 -0
  58. package/dist/bin/core-chunks/chunk-ALTQ3KL4.mjs +7 -0
  59. package/dist/bin/core-chunks/chunk-ANBDOI53.mjs +8 -0
  60. package/dist/bin/core-chunks/chunk-ANVCA6LF.mjs +7 -0
  61. package/dist/bin/core-chunks/chunk-AS3LWTQ4.mjs +16 -0
  62. package/dist/bin/core-chunks/chunk-B2HY22OD.mjs +50 -0
  63. package/dist/bin/core-chunks/chunk-B7AQHL7B.mjs +7 -0
  64. package/dist/bin/core-chunks/chunk-BSR3XUBD.mjs +24 -0
  65. package/dist/bin/core-chunks/chunk-BTSHD3XJ.mjs +9 -0
  66. package/dist/bin/core-chunks/chunk-BUD3R6LF.mjs +9 -0
  67. package/dist/bin/core-chunks/chunk-C35JQUWD.mjs +8 -0
  68. package/dist/bin/core-chunks/chunk-C7YBUD4K.mjs +10 -0
  69. package/dist/bin/core-chunks/chunk-CA2VFWFP.mjs +21 -0
  70. package/dist/bin/core-chunks/chunk-CB3CNJTL.mjs +10 -0
  71. package/dist/bin/core-chunks/chunk-CFD6CW7T.mjs +46 -0
  72. package/dist/bin/core-chunks/chunk-CKYBGRCF.mjs +8 -0
  73. package/dist/bin/core-chunks/chunk-CUIB6CTG.mjs +20 -0
  74. package/dist/bin/core-chunks/chunk-CVKMV22J.mjs +17 -0
  75. package/dist/bin/core-chunks/chunk-CWLGRKA7.mjs +6 -0
  76. package/dist/bin/core-chunks/chunk-CXKDKMYE.mjs +9 -0
  77. package/dist/bin/core-chunks/chunk-CXNVDJNN.mjs +7 -0
  78. package/dist/bin/core-chunks/chunk-D62TAZG6.mjs +9 -0
  79. package/dist/bin/core-chunks/chunk-DEYAQEF5.mjs +7 -0
  80. package/dist/bin/core-chunks/chunk-DIEPWXJJ.mjs +7 -0
  81. package/dist/bin/core-chunks/chunk-DMO3ZFUG.mjs +1259 -0
  82. package/dist/bin/core-chunks/chunk-DOJPSIMG.mjs +7 -0
  83. package/dist/bin/core-chunks/chunk-DTMZBK4E.mjs +7 -0
  84. package/dist/bin/core-chunks/chunk-DW4QMD6J.mjs +10 -0
  85. package/dist/bin/core-chunks/chunk-DZDEBDAB.mjs +10 -0
  86. package/dist/bin/core-chunks/chunk-DZVOFEM5.mjs +7 -0
  87. package/dist/bin/core-chunks/chunk-E5QQDYBR.mjs +7 -0
  88. package/dist/bin/core-chunks/chunk-E73HSXCX.mjs +7 -0
  89. package/dist/bin/core-chunks/chunk-EFSPBB4S.mjs +8 -0
  90. package/dist/bin/core-chunks/chunk-EHVU2SMR.mjs +34 -0
  91. package/dist/bin/core-chunks/chunk-ESB4ALH2.mjs +7 -0
  92. package/dist/bin/core-chunks/chunk-EZRNQXCC.mjs +7 -0
  93. package/dist/bin/core-chunks/chunk-F2FKQUYE.mjs +19 -0
  94. package/dist/bin/core-chunks/chunk-F7OOBAJO.mjs +30 -0
  95. package/dist/bin/core-chunks/chunk-FATYLG3L.mjs +14 -0
  96. package/dist/bin/core-chunks/chunk-FOUBHU4X.mjs +7 -0
  97. package/dist/bin/core-chunks/chunk-FOWTB762.mjs +7 -0
  98. package/dist/bin/core-chunks/chunk-GGGDYL4P.mjs +7 -0
  99. package/dist/bin/core-chunks/chunk-GHSRH4GL.mjs +8 -0
  100. package/dist/bin/core-chunks/chunk-GSNQKBHZ.mjs +11 -0
  101. package/dist/bin/core-chunks/chunk-GTG67Z45.mjs +11 -0
  102. package/dist/bin/core-chunks/chunk-H2KNJUPN.mjs +23 -0
  103. package/dist/bin/core-chunks/chunk-HA7Y76GF.mjs +7 -0
  104. package/dist/bin/core-chunks/chunk-HCPQZRR3.mjs +7 -0
  105. package/dist/bin/core-chunks/chunk-HPCSSJXH.mjs +7 -0
  106. package/dist/bin/core-chunks/chunk-HU5ERAAV.mjs +8 -0
  107. package/dist/bin/core-chunks/chunk-HVXWQ2XZ.mjs +7 -0
  108. package/dist/bin/core-chunks/chunk-HYIT7MF5.mjs +8 -0
  109. package/dist/bin/core-chunks/chunk-HYMJVHAX.mjs +13 -0
  110. package/dist/bin/core-chunks/chunk-ID2C2S33.mjs +18 -0
  111. package/dist/bin/core-chunks/chunk-ID5KE74L.mjs +7 -0
  112. package/dist/bin/core-chunks/chunk-IJNKHQIS.mjs +10 -0
  113. package/dist/bin/core-chunks/chunk-INJ5WT2D.mjs +7 -0
  114. package/dist/bin/core-chunks/chunk-IOFCSTGM.mjs +7 -0
  115. package/dist/bin/core-chunks/chunk-J6Y7IVFQ.mjs +7 -0
  116. package/dist/bin/core-chunks/chunk-JCWA7NLM.mjs +7 -0
  117. package/dist/bin/core-chunks/chunk-JGGQSMZC.mjs +8 -0
  118. package/dist/bin/core-chunks/chunk-JPMUJY42.mjs +7 -0
  119. package/dist/bin/core-chunks/chunk-JT4RNQ67.mjs +15 -0
  120. package/dist/bin/core-chunks/chunk-KI4OY3UQ.mjs +18 -0
  121. package/dist/bin/core-chunks/chunk-KPR5TWSN.mjs +7 -0
  122. package/dist/bin/core-chunks/chunk-KUQLXY2P.mjs +11 -0
  123. package/dist/bin/core-chunks/chunk-L3DJN3XD.mjs +12 -0
  124. package/dist/bin/core-chunks/chunk-L4TUXFCL.mjs +7 -0
  125. package/dist/bin/core-chunks/chunk-L5LFLI4R.mjs +7 -0
  126. package/dist/bin/core-chunks/chunk-LFOQ7FCR.mjs +10 -0
  127. package/dist/bin/core-chunks/chunk-LGX2GM45.mjs +7 -0
  128. package/dist/bin/core-chunks/chunk-LTKUTRRL.mjs +7 -0
  129. package/dist/bin/core-chunks/chunk-LZILSE5H.mjs +8 -0
  130. package/dist/bin/core-chunks/chunk-MCY7OXED.mjs +10 -0
  131. package/dist/bin/core-chunks/chunk-MG3YN3AI.mjs +7 -0
  132. package/dist/bin/core-chunks/chunk-MPU3VM6Z.mjs +7 -0
  133. package/dist/bin/core-chunks/chunk-MR5XXHRK.mjs +8 -0
  134. package/dist/bin/core-chunks/chunk-MXJF3FA7.mjs +7 -0
  135. package/dist/bin/core-chunks/chunk-MXJKULJY.mjs +9 -0
  136. package/dist/bin/core-chunks/chunk-NINFE7GS.mjs +9 -0
  137. package/dist/bin/core-chunks/chunk-NNILF7R3.mjs +7 -0
  138. package/dist/bin/core-chunks/chunk-NNOX3UU4.mjs +7 -0
  139. package/dist/bin/core-chunks/chunk-NOHSLOLL.mjs +7 -0
  140. package/dist/bin/core-chunks/chunk-NXUIMC22.mjs +13 -0
  141. package/dist/bin/core-chunks/chunk-NZKUCQZK.mjs +8 -0
  142. package/dist/bin/core-chunks/chunk-O5N6XYPU.mjs +8 -0
  143. package/dist/bin/core-chunks/chunk-O5VCBMEK.mjs +25 -0
  144. package/dist/bin/core-chunks/chunk-OE27RFLJ.mjs +8 -0
  145. package/dist/bin/core-chunks/chunk-OGM34Z6W.mjs +8 -0
  146. package/dist/bin/core-chunks/chunk-OIE3AKKO.mjs +7 -0
  147. package/dist/bin/core-chunks/chunk-OXKGN3HG.mjs +7 -0
  148. package/dist/bin/core-chunks/chunk-P2KU4FFA.mjs +11 -0
  149. package/dist/bin/core-chunks/chunk-PIA26GWG.mjs +7 -0
  150. package/dist/bin/core-chunks/chunk-PPSVWUXC.mjs +15 -0
  151. package/dist/bin/core-chunks/chunk-PQTR6XVW.mjs +7 -0
  152. package/dist/bin/core-chunks/chunk-PWL3KS7Y.mjs +7 -0
  153. package/dist/bin/core-chunks/chunk-Q3LUL6LL.mjs +7 -0
  154. package/dist/bin/core-chunks/chunk-Q6C27OL7.mjs +7 -0
  155. package/dist/bin/core-chunks/chunk-Q7GJIU6D.mjs +8 -0
  156. package/dist/bin/core-chunks/chunk-QAIEAOJF.mjs +7 -0
  157. package/dist/bin/core-chunks/chunk-QWRPJARA.mjs +14 -0
  158. package/dist/bin/core-chunks/chunk-QZ7T2EYR.mjs +25 -0
  159. package/dist/bin/core-chunks/chunk-RACISWUV.mjs +10 -0
  160. package/dist/bin/core-chunks/chunk-RCIWCKL7.mjs +9 -0
  161. package/dist/bin/core-chunks/chunk-ROOCBUKH.mjs +8 -0
  162. package/dist/bin/core-chunks/chunk-RP7F67ZT.mjs +7 -0
  163. package/dist/bin/core-chunks/chunk-RXZJB43D.mjs +7 -0
  164. package/dist/bin/core-chunks/chunk-S6FBPXQL.mjs +9 -0
  165. package/dist/bin/core-chunks/chunk-SLYLGDX7.mjs +8 -0
  166. package/dist/bin/core-chunks/chunk-SO3ZPNWT.mjs +7 -0
  167. package/dist/bin/core-chunks/chunk-SRJEX6XF.mjs +12 -0
  168. package/dist/bin/core-chunks/chunk-SROBBOJB.mjs +11 -0
  169. package/dist/bin/core-chunks/chunk-STFUT7R7.mjs +28 -0
  170. package/dist/bin/core-chunks/chunk-SUXIKMTS.mjs +30 -0
  171. package/dist/bin/core-chunks/chunk-TDTPDVUM.mjs +8 -0
  172. package/dist/bin/core-chunks/chunk-TIBYHZFA.mjs +8 -0
  173. package/dist/bin/core-chunks/chunk-TILUQF6L.mjs +8 -0
  174. package/dist/bin/core-chunks/chunk-TOORPP6K.mjs +7 -0
  175. package/dist/bin/core-chunks/chunk-U24YKPYX.mjs +7 -0
  176. package/dist/bin/core-chunks/chunk-U55OPVYR.mjs +9 -0
  177. package/dist/bin/core-chunks/chunk-UAYTDSYG.mjs +64 -0
  178. package/dist/bin/core-chunks/chunk-UHXV7MDW.mjs +12 -0
  179. package/dist/bin/core-chunks/chunk-UNIBFM6J.mjs +13 -0
  180. package/dist/bin/core-chunks/chunk-UNNY2IWZ.mjs +9 -0
  181. package/dist/bin/core-chunks/chunk-UX2ORID4.mjs +9 -0
  182. package/dist/bin/core-chunks/chunk-UYMZ3NAF.mjs +8 -0
  183. package/dist/bin/core-chunks/chunk-V6L5PLD7.mjs +18 -0
  184. package/dist/bin/core-chunks/chunk-V7R3L54M.mjs +7 -0
  185. package/dist/bin/core-chunks/chunk-V7VA4EQX.mjs +7 -0
  186. package/dist/bin/core-chunks/chunk-VCSESVZ4.mjs +9 -0
  187. package/dist/bin/core-chunks/chunk-VCYVYFWE.mjs +9 -0
  188. package/dist/bin/core-chunks/chunk-VJCTTFKP.mjs +8 -0
  189. package/dist/bin/core-chunks/chunk-VRFYDYQY.mjs +7 -0
  190. package/dist/bin/core-chunks/chunk-VWFVSNQT.mjs +7 -0
  191. package/dist/bin/core-chunks/chunk-W23JLJJZ.mjs +109 -0
  192. package/dist/bin/core-chunks/chunk-WCTVZQBG.mjs +8 -0
  193. package/dist/bin/core-chunks/chunk-WTDUJB4I.mjs +8 -0
  194. package/dist/bin/core-chunks/chunk-WZ6W5ZQ5.mjs +7 -0
  195. package/dist/bin/core-chunks/chunk-X433BB6F.mjs +7 -0
  196. package/dist/bin/core-chunks/chunk-XBR63NJA.mjs +7 -0
  197. package/dist/bin/core-chunks/chunk-XC6YAP36.mjs +7 -0
  198. package/dist/bin/core-chunks/chunk-XJTEPHLC.mjs +7 -0
  199. package/dist/bin/core-chunks/chunk-XLAGA5B7.mjs +10 -0
  200. package/dist/bin/core-chunks/chunk-XLFEWZRA.mjs +7 -0
  201. package/dist/bin/core-chunks/chunk-XSZOHNL4.mjs +7 -0
  202. package/dist/bin/core-chunks/chunk-XWLTEAGN.mjs +7 -0
  203. package/dist/bin/core-chunks/chunk-Y7XOKG4O.mjs +7 -0
  204. package/dist/bin/core-chunks/chunk-YEALP3WX.mjs +7 -0
  205. package/dist/bin/core-chunks/chunk-YJOC2JJK.mjs +12 -0
  206. package/dist/bin/core-chunks/chunk-YLYAYRSJ.mjs +8 -0
  207. package/dist/bin/core-chunks/chunk-YOGI4WE6.mjs +8 -0
  208. package/dist/bin/core-chunks/chunk-YOWW4LHK.mjs +8 -0
  209. package/dist/bin/core-chunks/chunk-YPLFWN62.mjs +7 -0
  210. package/dist/bin/core-chunks/chunk-YQ6HM3YO.mjs +10 -0
  211. package/dist/bin/core-chunks/chunk-YZEO5DZA.mjs +7 -0
  212. package/dist/bin/core-chunks/chunk-ZAUJWUUN.mjs +20 -0
  213. package/dist/bin/core-chunks/chunk-ZBBNCCGV.mjs +12 -0
  214. package/dist/bin/core-chunks/chunk-ZQ2XH76U.mjs +12 -0
  215. package/dist/bin/core-chunks/chunk-ZSANMA7K.mjs +7 -0
  216. package/dist/bin/core-chunks/chunk-ZXTJLMVZ.mjs +7 -0
  217. package/dist/bin/core-chunks/chunk-ZZR3LXCK.mjs +9 -0
  218. package/dist/bin/core-chunks/cleanup-installs-LD43GI4K.mjs +7 -0
  219. package/dist/bin/core-chunks/client-D43KKUYH.mjs +8 -0
  220. package/dist/bin/core-chunks/closest-command-YYNABM7V.mjs +7 -0
  221. package/dist/bin/core-chunks/cloud-RXHFZ7MX.mjs +14 -0
  222. package/dist/bin/core-chunks/code-IYK65A62.mjs +12 -0
  223. package/dist/bin/core-chunks/code-graph-cloud-G3WQBICY.mjs +7 -0
  224. package/dist/bin/core-chunks/codex-hooks-N5UHKK5B.mjs +7 -0
  225. package/dist/bin/core-chunks/codex-mcp-G7WNAT6T.mjs +7 -0
  226. package/dist/bin/core-chunks/codex-skill-IZNP76BJ.mjs +7 -0
  227. package/dist/bin/core-chunks/command-installer-4ENM4GZR.mjs +7 -0
  228. package/dist/bin/core-chunks/config-UVF7YOR6.mjs +8 -0
  229. package/dist/bin/core-chunks/config-manager-QY73WM5U.mjs +7 -0
  230. package/dist/bin/core-chunks/content-bound-stamp-2PJNI4JC.mjs +7 -0
  231. package/dist/bin/core-chunks/context-4GB6ICXK.mjs +38 -0
  232. package/dist/bin/core-chunks/context-MPHOQPXF.mjs +10 -0
  233. package/dist/bin/core-chunks/context-checkpoint-NBI5HKPV.mjs +27 -0
  234. package/dist/bin/core-chunks/context-pressure-5URQVNBC.mjs +7 -0
  235. package/dist/bin/core-chunks/context-tiers-NOKJ75QP.mjs +7 -0
  236. package/dist/bin/core-chunks/context7-service-2MYRUNKY.mjs +7 -0
  237. package/dist/bin/core-chunks/core-WMEHDCOK.mjs +70 -0
  238. package/dist/bin/core-chunks/crew-EYVSIX4L.mjs +24 -0
  239. package/dist/bin/core-chunks/cursor-hooks-DGDJVAI6.mjs +7 -0
  240. package/dist/bin/core-chunks/custom-workflow-storage-EBEIG54R.mjs +7 -0
  241. package/dist/bin/core-chunks/cwd-changed-EUJZOBIC.mjs +7 -0
  242. package/dist/bin/core-chunks/cycle-budget-card-H37XRAIX.mjs +7 -0
  243. package/dist/bin/core-chunks/daemon-QARP3RVX.mjs +13 -0
  244. package/dist/bin/core-chunks/database-UU2ZXSD4.mjs +7 -0
  245. package/dist/bin/core-chunks/delivery-geometry-GSJ6LXUC.mjs +7 -0
  246. package/dist/bin/core-chunks/detect-changes-2YIEX7AY.mjs +7 -0
  247. package/dist/bin/core-chunks/detection-KKDZYWVD.mjs +7 -0
  248. package/dist/bin/core-chunks/developer-evolution-AVAXGDKQ.mjs +11 -0
  249. package/dist/bin/core-chunks/developer-profile-2VSFJGCU.mjs +7 -0
  250. package/dist/bin/core-chunks/discuss-lock-CWXKBBYJ.mjs +7 -0
  251. package/dist/bin/core-chunks/distill-ZF7WHGCZ.mjs +7 -0
  252. package/dist/bin/core-chunks/doctor-heal-XFSVPSEY.mjs +7 -0
  253. package/dist/bin/core-chunks/doctor-service-6ZJBWIXR.mjs +8 -0
  254. package/dist/bin/core-chunks/drift-refresh-XPJAO2B3.mjs +7 -0
  255. package/dist/bin/core-chunks/dynasty-outcomes-KDWIEA4Y.mjs +11 -0
  256. package/dist/bin/core-chunks/editors-config-ELAQA6RV.mjs +7 -0
  257. package/dist/bin/core-chunks/embeddings-354ZYFKX.mjs +7 -0
  258. package/dist/bin/core-chunks/enriched-recall-MKBOXB7M.mjs +7 -0
  259. package/dist/bin/core-chunks/eval-O4YD6YOV.mjs +76 -0
  260. package/dist/bin/core-chunks/exec-34V6SJYO.mjs +7 -0
  261. package/dist/bin/core-chunks/file-helper-LLQKU6YF.mjs +7 -0
  262. package/dist/bin/core-chunks/format-SYVL4CV5.mjs +7 -0
  263. package/dist/bin/core-chunks/gemini-settings-RGD7JLSP.mjs +7 -0
  264. package/dist/bin/core-chunks/git-context-ZSWE3KWM.mjs +8 -0
  265. package/dist/bin/core-chunks/git-helpers-UC53D4FT.mjs +7 -0
  266. package/dist/bin/core-chunks/grok-mcp-IE2RRRRW.mjs +7 -0
  267. package/dist/bin/core-chunks/grok-plugin-SSANHBS7.mjs +7 -0
  268. package/dist/bin/core-chunks/grok-skill-7ZP7R7KO.mjs +7 -0
  269. package/dist/bin/core-chunks/guard-RT7U3LJX.mjs +13 -0
  270. package/dist/bin/core-chunks/guards-AXH6V2IJ.mjs +7 -0
  271. package/dist/bin/core-chunks/handoff-storage-NGUA4Y2L.mjs +7 -0
  272. package/dist/bin/core-chunks/harness-V7J7WIT2.mjs +43 -0
  273. package/dist/bin/core-chunks/health-TNB5OC37.mjs +11 -0
  274. package/dist/bin/core-chunks/help-P7EYELVK.mjs +14 -0
  275. package/dist/bin/core-chunks/hooks-service-REI56DDC.mjs +91 -0
  276. package/dist/bin/core-chunks/infer-memory-file-ATP7PSAQ.mjs +7 -0
  277. package/dist/bin/core-chunks/install-FZQJJWT5.mjs +9 -0
  278. package/dist/bin/core-chunks/judgment-G5KH6QFC.mjs +21 -0
  279. package/dist/bin/core-chunks/judgment-ledger-storage-ZTYXPMM4.mjs +7 -0
  280. package/dist/bin/core-chunks/judgment-orchestrator-E3SO3NVE.mjs +7 -0
  281. package/dist/bin/core-chunks/judgment-receipt-GO6QEZQC.mjs +7 -0
  282. package/dist/bin/core-chunks/kimi-hooks-TR6J3OVG.mjs +7 -0
  283. package/dist/bin/core-chunks/kimi-mcp-ETG7O6O5.mjs +7 -0
  284. package/dist/bin/core-chunks/land-cue-3BUD3KJJ.mjs +8 -0
  285. package/dist/bin/core-chunks/land-rho-MCTQDPRH.mjs +8 -0
  286. package/dist/bin/core-chunks/land-synthesis-MU4EZEYL.mjs +7 -0
  287. package/dist/bin/core-chunks/lean-26BWCUOR.mjs +34 -0
  288. package/dist/bin/core-chunks/legacy-crew-sweep-G5UJT2PM.mjs +23 -0
  289. package/dist/bin/core-chunks/living-context-contract-HZIVBMXX.mjs +7 -0
  290. package/dist/bin/core-chunks/llm-KMVXVBHG.mjs +18 -0
  291. package/dist/bin/core-chunks/mcp-BD5TOTCK.mjs +17 -0
  292. package/dist/bin/core-chunks/memory-dream-6GFV2GXN.mjs +14 -0
  293. package/dist/bin/core-chunks/memory-export-WJ4H7CFV.mjs +13 -0
  294. package/dist/bin/core-chunks/memory-index-7NIU34EI.mjs +7 -0
  295. package/dist/bin/core-chunks/notification-G654IX3O.mjs +7 -0
  296. package/dist/bin/core-chunks/notify-EWYUBKGO.mjs +9 -0
  297. package/dist/bin/core-chunks/nyquist-lite-A23B7G4B.mjs +9 -0
  298. package/dist/bin/core-chunks/one-breath-install-LVNIVN6S.mjs +7 -0
  299. package/dist/bin/core-chunks/opencode-mcp-L7NC77JF.mjs +7 -0
  300. package/dist/bin/core-chunks/output-D27IOQXR.mjs +7 -0
  301. package/dist/bin/core-chunks/pack-integrity-X277OVRB.mjs +9 -0
  302. package/dist/bin/core-chunks/pack-manager-VN7F6R47.mjs +7 -0
  303. package/dist/bin/core-chunks/package-R4FUTGOE.mjs +7 -0
  304. package/dist/bin/core-chunks/package-legitimacy-VHHGI4P7.mjs +7 -0
  305. package/dist/bin/core-chunks/path-manager-E5DCU5LP.mjs +7 -0
  306. package/dist/bin/core-chunks/performance-tracker-BFBNR3LY.mjs +7 -0
  307. package/dist/bin/core-chunks/pi-skill-IZQEUILZ.mjs +7 -0
  308. package/dist/bin/core-chunks/planning-NOWLKZDS.mjs +8 -0
  309. package/dist/bin/core-chunks/post-edit-GTBY32JU.mjs +7 -0
  310. package/dist/bin/core-chunks/pr-convention-37YHTUKM.mjs +7 -0
  311. package/dist/bin/core-chunks/pre-bash-32ZOGNSP.mjs +10 -0
  312. package/dist/bin/core-chunks/pre-commit-7TU2A7H4.mjs +7 -0
  313. package/dist/bin/core-chunks/pre-edit-ASEWA5TS.mjs +8 -0
  314. package/dist/bin/core-chunks/pre-package-ZTZACEBB.mjs +7 -0
  315. package/dist/bin/core-chunks/pre-search-MKDRFJSE.mjs +8 -0
  316. package/dist/bin/core-chunks/pre-secrets-RJELPDFY.mjs +7 -0
  317. package/dist/bin/core-chunks/precision-classifier-AV75OEVA.mjs +7 -0
  318. package/dist/bin/core-chunks/precision-judgment-MCX4MIIG.mjs +7 -0
  319. package/dist/bin/core-chunks/preferences-KO5U2ELK.mjs +31 -0
  320. package/dist/bin/core-chunks/primitives-GNUMBYOK.mjs +13 -0
  321. package/dist/bin/core-chunks/prjct-md-BSFV7OQQ.mjs +7 -0
  322. package/dist/bin/core-chunks/product-GUHSUNIH.mjs +68 -0
  323. package/dist/bin/core-chunks/project-agent-surfaces-BXCJJXB7.mjs +7 -0
  324. package/dist/bin/core-chunks/project-alignment-ADKW3ZWQ.mjs +17 -0
  325. package/dist/bin/core-chunks/project-file-inventory-XIHHJZUP.mjs +7 -0
  326. package/dist/bin/core-chunks/project-memory-L5MDZYST.mjs +7 -0
  327. package/dist/bin/core-chunks/project-style-evolution-HIMSJQQB.mjs +7 -0
  328. package/dist/bin/core-chunks/prompt-47YP5JIR.mjs +25 -0
  329. package/dist/bin/core-chunks/protocol-4AJ4J5SI.mjs +7 -0
  330. package/dist/bin/core-chunks/provider-cache-IWVTFLGT.mjs +7 -0
  331. package/dist/bin/core-chunks/provider-status-HQUBKMH5.mjs +7 -0
  332. package/dist/bin/core-chunks/publish-helper-2T2EHM3V.mjs +7 -0
  333. package/dist/bin/core-chunks/purge-6SJKHKIY.mjs +7 -0
  334. package/dist/bin/core-chunks/queue-storage-BKH5XX2E.mjs +7 -0
  335. package/dist/bin/core-chunks/registry-YM2EYUXY.mjs +7 -0
  336. package/dist/bin/core-chunks/reliability-repair-JMPZWDD4.mjs +20 -0
  337. package/dist/bin/core-chunks/removed-verbs-EU3WPRNK.mjs +7 -0
  338. package/dist/bin/core-chunks/retention-QSXWKE4H.mjs +7 -0
  339. package/dist/bin/core-chunks/retro-B2EBN4TA.mjs +13 -0
  340. package/dist/bin/core-chunks/review-risk-LBPY5M3K.mjs +12 -0
  341. package/dist/bin/core-chunks/run-recorder-EZQ32M55.mjs +7 -0
  342. package/dist/bin/core-chunks/safe-artifacts-PE2TMEZQ.mjs +9 -0
  343. package/dist/bin/core-chunks/sdd-3WNZJ6FU.mjs +9 -0
  344. package/dist/bin/core-chunks/seed-MMDJE2UO.mjs +10 -0
  345. package/dist/bin/core-chunks/self-heal-R5FBXEVQ.mjs +7 -0
  346. package/dist/bin/core-chunks/session-continuity-OQDB5UYI.mjs +10 -0
  347. package/dist/bin/core-chunks/session-start-FM6UL7MT.mjs +7 -0
  348. package/dist/bin/core-chunks/session-tracker-RG2FBWMS.mjs +7 -0
  349. package/dist/bin/core-chunks/settings-installer-4XHM3HAZ.mjs +7 -0
  350. package/dist/bin/core-chunks/setup-BL36ZWPW.mjs +140 -0
  351. package/dist/bin/core-chunks/setup-V75BWRHU.mjs +38 -0
  352. package/dist/bin/core-chunks/shipping-NZVM57JJ.mjs +12 -0
  353. package/dist/bin/core-chunks/signals-digest-P5BG6MZF.mjs +7 -0
  354. package/dist/bin/core-chunks/skill-adherence-JE3N3Y67.mjs +13 -0
  355. package/dist/bin/core-chunks/skill-generator-LKS5BNMY.mjs +7 -0
  356. package/dist/bin/core-chunks/skill-index-L4UWQCQE.mjs +11 -0
  357. package/dist/bin/core-chunks/spec-VC3VTUI3.mjs +27 -0
  358. package/dist/bin/core-chunks/spec-context-inference-KOINWBC7.mjs +9 -0
  359. package/dist/bin/core-chunks/spec-inventory-2TT7BTFZ.mjs +9 -0
  360. package/dist/bin/core-chunks/spec-service-UZ53XL6X.mjs +7 -0
  361. package/dist/bin/core-chunks/spec-task-breakdown-3Y7YXCIQ.mjs +7 -0
  362. package/dist/bin/core-chunks/state-storage-6CGFWW5D.mjs +7 -0
  363. package/dist/bin/core-chunks/stdin-spill-Y2A6WOOW.mjs +7 -0
  364. package/dist/bin/core-chunks/stop-6SH36ULT.mjs +15 -0
  365. package/dist/bin/core-chunks/subagent-start-TVGBV2V2.mjs +7 -0
  366. package/dist/bin/core-chunks/subagent-stop-APWY6KMX.mjs +7 -0
  367. package/dist/bin/core-chunks/surface-attribution-CQVM2SWY.mjs +7 -0
  368. package/dist/bin/core-chunks/symbol-graph-PCS43SHZ.mjs +7 -0
  369. package/dist/bin/core-chunks/sync-analyzer-M37Q4LE4.mjs +7 -0
  370. package/dist/bin/core-chunks/sync-client-6TAOTJWR.mjs +7 -0
  371. package/dist/bin/core-chunks/sync-cursor-storage-GKO4X2QN.mjs +18 -0
  372. package/dist/bin/core-chunks/task-orchestration-GS4J4KGS.mjs +7 -0
  373. package/dist/bin/core-chunks/task-overview-XSMK7YEN.mjs +7 -0
  374. package/dist/bin/core-chunks/task-service-KFYL5NT4.mjs +7 -0
  375. package/dist/bin/core-chunks/tdd-P2PP4RR4.mjs +9 -0
  376. package/dist/bin/core-chunks/team-WKAAOEFE.mjs +42 -0
  377. package/dist/bin/core-chunks/template-loader-H4FE37HV.mjs +7 -0
  378. package/dist/bin/core-chunks/token-backfill-WPXXD5MP.mjs +12 -0
  379. package/dist/bin/core-chunks/token-economics-JZAQJUET.mjs +7 -0
  380. package/dist/bin/core-chunks/transcript-jsonl-OC7TH4Q3.mjs +7 -0
  381. package/dist/bin/core-chunks/trust-boundary-24F662RM.mjs +7 -0
  382. package/dist/bin/core-chunks/uninstall-W6EAUS7N.mjs +13 -0
  383. package/dist/bin/core-chunks/update-PSHEJJI5.mjs +11 -0
  384. package/dist/bin/core-chunks/update-checker-LZCUPWQB.mjs +7 -0
  385. package/dist/bin/core-chunks/usefulness-A3GRKFL3.mjs +7 -0
  386. package/dist/bin/core-chunks/user-home-BODIAXR4.mjs +7 -0
  387. package/dist/bin/core-chunks/vault-retire-notice-FDRT7BJG.mjs +8 -0
  388. package/dist/bin/core-chunks/velocity-storage-5T7RYOWH.mjs +7 -0
  389. package/dist/bin/core-chunks/verb-names-QWGYABFH.mjs +7 -0
  390. package/dist/bin/core-chunks/version-B5DBRVGQ.mjs +7 -0
  391. package/dist/bin/core-chunks/watch-service-7V3O52TW.mjs +9 -0
  392. package/dist/bin/core-chunks/weak-frontier-demo-ZCDTMYRO.mjs +7 -0
  393. package/dist/bin/core-chunks/weak-model-mode-LOAPFJPQ.mjs +7 -0
  394. package/dist/bin/core-chunks/work-graph-WHMCFN6U.mjs +7 -0
  395. package/dist/bin/core-chunks/work-graph-ZNV7S6EU.mjs +16 -0
  396. package/dist/bin/core-chunks/work-scope-XXPUH6TU.mjs +7 -0
  397. package/dist/bin/core-chunks/workflow-XM77QYRF.mjs +61 -0
  398. package/dist/bin/core-chunks/workflows-reference-T7RH7IGJ.mjs +7 -0
  399. package/dist/bin/core-chunks/workspace-occupancy-JUXKZBUZ.mjs +7 -0
  400. package/dist/bin/core-chunks/worktree-service-YRRPFU57.mjs +11 -0
  401. package/dist/bin/core-chunks/world-model-impact-FAGGNUGN.mjs +7 -0
  402. package/dist/bin/hook-chunks/{agent-switch-I4MTVE56.mjs → agent-switch-TAJWH2ZD.mjs} +1 -1
  403. package/dist/bin/hook-chunks/{analysis-VN7APBHR.mjs → analysis-34WDLUXK.mjs} +2 -2
  404. package/dist/bin/hook-chunks/{auto-flush-DX3FVSQE.mjs → auto-flush-7TIEBPPQ.mjs} +1 -1
  405. package/dist/bin/hook-chunks/{capture-gate-MEIQD7ZS.mjs → capture-gate-JFVGG7RB.mjs} +1 -1
  406. package/dist/bin/hook-chunks/{chunk-UVATSTRF.mjs → chunk-22CBVTZ3.mjs} +1 -1
  407. package/dist/bin/hook-chunks/{chunk-MW54MTLB.mjs → chunk-3JOZN7YJ.mjs} +1 -1
  408. package/dist/bin/hook-chunks/{chunk-E7NA34VQ.mjs → chunk-4X3KUIXK.mjs} +1 -1
  409. package/dist/bin/hook-chunks/{chunk-3AHW4XQH.mjs → chunk-5ALQBNIZ.mjs} +1 -1
  410. package/dist/bin/hook-chunks/{chunk-H2DGDAQP.mjs → chunk-5VPZI2ZF.mjs} +1 -1
  411. package/dist/bin/hook-chunks/{chunk-XYKVWO23.mjs → chunk-6EHYPQ5U.mjs} +1 -1
  412. package/dist/bin/hook-chunks/chunk-6NMHVPAI.mjs +35 -0
  413. package/dist/bin/hook-chunks/chunk-7H5UVM6X.mjs +9 -0
  414. package/dist/bin/hook-chunks/{chunk-LR24AIEW.mjs → chunk-A3R47SP6.mjs} +1 -1
  415. package/dist/bin/hook-chunks/chunk-AFGXKRRP.mjs +12 -0
  416. package/dist/bin/hook-chunks/{chunk-64ZEBHDX.mjs → chunk-CGAKJDKT.mjs} +1 -1
  417. package/dist/bin/hook-chunks/{chunk-EI6VQZOX.mjs → chunk-CJY4Y5SO.mjs} +1 -1
  418. package/dist/bin/hook-chunks/chunk-FSFURDAE.mjs +16 -0
  419. package/dist/bin/hook-chunks/{chunk-ZZBNFNMG.mjs → chunk-FTBBQHI4.mjs} +1 -1
  420. package/dist/bin/hook-chunks/chunk-G4VJKPG7.mjs +69 -0
  421. package/dist/bin/hook-chunks/{chunk-7PBWIO4K.mjs → chunk-GAJOSSB4.mjs} +2 -2
  422. package/dist/bin/hook-chunks/{chunk-DB226JIV.mjs → chunk-GER6HFWV.mjs} +1 -1
  423. package/dist/bin/hook-chunks/{chunk-LQLCYBFF.mjs → chunk-H3GIYI4Q.mjs} +2 -2
  424. package/dist/bin/hook-chunks/{chunk-KDNUQPAK.mjs → chunk-HRU2KNEB.mjs} +1 -1
  425. package/dist/bin/hook-chunks/{chunk-33BHU4OM.mjs → chunk-LCGWETJ6.mjs} +1 -1
  426. package/dist/bin/hook-chunks/{chunk-WL6PKX3U.mjs → chunk-MG2DNP4Z.mjs} +1 -1
  427. package/dist/bin/hook-chunks/{chunk-XV2LJVYB.mjs → chunk-MIJZT4ZR.mjs} +1 -1
  428. package/dist/bin/hook-chunks/chunk-NGB6JNSB.mjs +18 -0
  429. package/dist/bin/hook-chunks/{chunk-IJ523YO2.mjs → chunk-OALZUWC6.mjs} +1 -1
  430. package/dist/bin/hook-chunks/{chunk-EGCYDLSO.mjs → chunk-PZMBZ6GE.mjs} +1 -1
  431. package/dist/bin/hook-chunks/{chunk-RT2DFIWF.mjs → chunk-QIB6Y6AH.mjs} +2 -2
  432. package/dist/bin/hook-chunks/{chunk-ZQI4TJ5C.mjs → chunk-QMNZPNVY.mjs} +1 -1
  433. package/dist/bin/hook-chunks/{chunk-YLOK4WRR.mjs → chunk-R4YDE3GU.mjs} +1 -1
  434. package/dist/bin/hook-chunks/{chunk-WJV24WE6.mjs → chunk-RFKRKUHB.mjs} +1 -1
  435. package/dist/bin/hook-chunks/{chunk-SWJ7TLBD.mjs → chunk-RGOTJCZU.mjs} +1 -1
  436. package/dist/bin/hook-chunks/{chunk-FZS3XGEA.mjs → chunk-RLKYEL3F.mjs} +1 -1
  437. package/dist/bin/hook-chunks/{chunk-LF3S3MYE.mjs → chunk-T2KVL6PZ.mjs} +1 -1
  438. package/dist/bin/hook-chunks/{chunk-NLL5AV2G.mjs → chunk-T7DRHVK3.mjs} +2 -2
  439. package/dist/bin/hook-chunks/{chunk-KV4NXLPT.mjs → chunk-TWFLW6OJ.mjs} +1 -1
  440. package/dist/bin/hook-chunks/{chunk-ADYTBOCZ.mjs → chunk-UJIOGFNP.mjs} +1 -1
  441. package/dist/bin/hook-chunks/{chunk-Y3RHBU2R.mjs → chunk-UK24P7PV.mjs} +2 -2
  442. package/dist/bin/hook-chunks/{chunk-OLQAMCYV.mjs → chunk-ULNGKZB6.mjs} +5 -5
  443. package/dist/bin/hook-chunks/{chunk-UMJ5D5I6.mjs → chunk-UWHVPO6X.mjs} +2 -2
  444. package/dist/bin/hook-chunks/{chunk-YHOZTAZH.mjs → chunk-V6GGH6H5.mjs} +1 -1
  445. package/dist/bin/hook-chunks/{chunk-EXVL2OFE.mjs → chunk-XC2BSGWF.mjs} +1 -1
  446. package/dist/bin/hook-chunks/{chunk-JZDZH6IV.mjs → chunk-YATXTHDL.mjs} +1 -1
  447. package/dist/bin/hook-chunks/{chunk-DCHIPMOG.mjs → chunk-ZF2EVMY7.mjs} +1 -1
  448. package/dist/bin/hook-chunks/{chunk-PVCEWFHS.mjs → chunk-ZPAY2NSF.mjs} +2 -2
  449. package/dist/bin/hook-chunks/{codex-skill-6CRFUF3A.mjs → codex-skill-BFRU5FTP.mjs} +1 -1
  450. package/dist/bin/hook-chunks/{command-installer-MUHZWDZA.mjs → command-installer-3XOZGKOQ.mjs} +1 -1
  451. package/dist/bin/hook-chunks/{config-manager-2JJPCLKC.mjs → config-manager-UPB7NEXF.mjs} +1 -1
  452. package/dist/bin/hook-chunks/{context7-service-NH4BMGSJ.mjs → context7-service-7VFXEQVN.mjs} +1 -1
  453. package/dist/bin/hook-chunks/{cwd-changed-UTD6Y4MS.mjs → cwd-changed-USNJYUH7.mjs} +1 -1
  454. package/dist/bin/hook-chunks/{distill-5TNAM3LY.mjs → distill-47YVL7IH.mjs} +1 -1
  455. package/dist/bin/hook-chunks/{enriched-recall-6VOIUNLN.mjs → enriched-recall-CVYI52NO.mjs} +1 -1
  456. package/dist/bin/hook-chunks/{format-IIOFTSBF.mjs → format-DPIN45EG.mjs} +1 -1
  457. package/dist/bin/hook-chunks/{judgment-receipt-QLV3MYFT.mjs → judgment-receipt-G2DKQR7U.mjs} +1 -1
  458. package/dist/bin/hook-chunks/{land-cue-57B23PEL.mjs → land-cue-3JD2TXFP.mjs} +1 -1
  459. package/dist/bin/hook-chunks/{land-synthesis-ZVPFJERV.mjs → land-synthesis-5C4KGCTB.mjs} +1 -1
  460. package/dist/bin/hook-chunks/{legacy-crew-sweep-GR6HRSHX.mjs → legacy-crew-sweep-XQNXNZES.mjs} +2 -2
  461. package/dist/bin/hook-chunks/{memory-index-XE2MWKQS.mjs → memory-index-LL6SQJ2N.mjs} +1 -1
  462. package/dist/bin/hook-chunks/{notification-GU2ZJP5K.mjs → notification-ACQBRJG3.mjs} +1 -1
  463. package/dist/bin/hook-chunks/{pack-integrity-WV5U3AFF.mjs → pack-integrity-DCXVRRJZ.mjs} +1 -1
  464. package/dist/bin/hook-chunks/{pack-manager-QLFQKP24.mjs → pack-manager-KYWKNYUY.mjs} +1 -1
  465. package/dist/bin/hook-chunks/{planning-VPAX5DZL.mjs → planning-KOU3XKWS.mjs} +2 -2
  466. package/dist/bin/hook-chunks/{post-edit-UXCFSR3Y.mjs → post-edit-CK2MYQEN.mjs} +1 -1
  467. package/dist/bin/hook-chunks/{pre-bash-MB4JNNYG.mjs → pre-bash-W5A5CTR3.mjs} +1 -1
  468. package/dist/bin/hook-chunks/{pre-commit-U7TRFKWX.mjs → pre-commit-5Q24RM4S.mjs} +1 -1
  469. package/dist/bin/hook-chunks/{pre-edit-MDCQXI5F.mjs → pre-edit-YIJ4BCYL.mjs} +1 -1
  470. package/dist/bin/hook-chunks/{pre-package-A6ZI5R64.mjs → pre-package-O4RMVA4T.mjs} +1 -1
  471. package/dist/bin/hook-chunks/{pre-search-ZZO3LGXJ.mjs → pre-search-WYOWC3D6.mjs} +1 -1
  472. package/dist/bin/hook-chunks/{prjct-md-MS52YLI2.mjs → prjct-md-2UVHFYTJ.mjs} +1 -1
  473. package/dist/bin/hook-chunks/{project-agent-surfaces-6AIW7KL6.mjs → project-agent-surfaces-BKFYUMRV.mjs} +1 -1
  474. package/dist/bin/hook-chunks/{project-memory-UDH56VFP.mjs → project-memory-OC5GTJPY.mjs} +1 -1
  475. package/dist/bin/hook-chunks/{project-style-evolution-IJXT2MCP.mjs → project-style-evolution-2IFJCACQ.mjs} +1 -1
  476. package/dist/bin/hook-chunks/prompt-JIWMP563.mjs +26 -0
  477. package/dist/bin/hook-chunks/{purge-N2WN6NDB.mjs → purge-FQK3Z4QS.mjs} +1 -1
  478. package/dist/bin/hook-chunks/{retention-RET4P2RO.mjs → retention-2FETBJFG.mjs} +1 -1
  479. package/dist/bin/hook-chunks/{sdd-PB6WKSLE.mjs → sdd-V43TSJ2P.mjs} +1 -1
  480. package/dist/bin/hook-chunks/{session-continuity-BIJXMN44.mjs → session-continuity-RO2ACICF.mjs} +1 -1
  481. package/dist/bin/hook-chunks/{session-start-R2VMKW2L.mjs → session-start-FKKFMKQ5.mjs} +1 -1
  482. package/dist/bin/hook-chunks/{setup-PPIZHVXS.mjs → setup-YV2DKG5L.mjs} +2 -2
  483. package/dist/bin/hook-chunks/{shipping-C637PCOF.mjs → shipping-SCNFEXBY.mjs} +4 -4
  484. package/dist/bin/hook-chunks/{spec-context-inference-RTTDOZZO.mjs → spec-context-inference-BD3ANTXA.mjs} +1 -1
  485. package/dist/bin/hook-chunks/{spec-service-ENLAAMVL.mjs → spec-service-OWYOAGXS.mjs} +2 -2
  486. package/dist/bin/hook-chunks/{spec-task-breakdown-RUDEP3AY.mjs → spec-task-breakdown-HOTLUFDM.mjs} +1 -1
  487. package/dist/bin/hook-chunks/{state-storage-AJUPG7J5.mjs → state-storage-EMWLIFQJ.mjs} +1 -1
  488. package/dist/bin/hook-chunks/{stop-DPXAWJFN.mjs → stop-MIXT7WXA.mjs} +3 -3
  489. package/dist/bin/hook-chunks/{subagent-start-AFHPXL2S.mjs → subagent-start-NO3TN65K.mjs} +1 -1
  490. package/dist/bin/hook-chunks/{subagent-stop-5BMV63ML.mjs → subagent-stop-CKWIXX7W.mjs} +1 -1
  491. package/dist/bin/hook-chunks/{surface-attribution-EGIKCVMF.mjs → surface-attribution-BYESPLXM.mjs} +1 -1
  492. package/dist/bin/hook-chunks/{task-overview-F3GB77OA.mjs → task-overview-P3VRH2FD.mjs} +1 -1
  493. package/dist/bin/hook-chunks/{task-service-FZABHPFV.mjs → task-service-5ONSBKKP.mjs} +1 -1
  494. package/dist/bin/hook-chunks/{tdd-TAMBOPN3.mjs → tdd-SESB4IG3.mjs} +1 -1
  495. package/dist/bin/hook-chunks/{template-loader-MXOMU4XH.mjs → template-loader-KO67FVHO.mjs} +1 -1
  496. package/dist/bin/hook-chunks/{weak-model-mode-BMSPGEQY.mjs → weak-model-mode-HPXBKXJT.mjs} +1 -1
  497. package/dist/bin/hook-chunks/{work-scope-YCS4GTXW.mjs → work-scope-RNPGACPA.mjs} +1 -1
  498. package/dist/bin/hook-chunks/{workspace-occupancy-JOBYNNXV.mjs → workspace-occupancy-3NEAXILW.mjs} +1 -1
  499. package/dist/bin/prjct-core.mjs +9 -3323
  500. package/dist/bin/prjct-hooks.mjs +1 -1
  501. package/dist/bin/prjct.mjs +7 -1
  502. package/dist/daemon/entry.mjs +591 -582
  503. package/dist/mcp/server.mjs +320 -313
  504. package/package.json +4 -2
  505. package/dist/bin/hook-chunks/chunk-3UB6SFRA.mjs +0 -11
  506. package/dist/bin/hook-chunks/chunk-D7DQABWO.mjs +0 -35
  507. package/dist/bin/hook-chunks/chunk-IWUF2LGO.mjs +0 -18
  508. package/dist/bin/hook-chunks/chunk-M4YM7Z3F.mjs +0 -69
  509. package/dist/bin/hook-chunks/chunk-TB57OYGW.mjs +0 -16
  510. package/dist/bin/hook-chunks/chunk-ZYCNW75E.mjs +0 -9
  511. package/dist/bin/hook-chunks/prompt-7VZLYONO.mjs +0 -24
@@ -0,0 +1,13 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{c as R}from"./chunk-YLYAYRSJ.mjs";import{a as x}from"./chunk-5ZBACKED.mjs";import{b as g,c as M}from"./chunk-DOJPSIMG.mjs";import{a as i}from"./chunk-3TRXQAU4.mjs";M();import h from"node:fs/promises";import C from"node:path";var H="_prjctManaged",T=new Set(["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","Stop","SubagentStart","SubagentStop"]),v="# prjct:features:start - managed by prjct, do not edit between markers",b="# prjct:features:end";function w(){return process.env.PRJCT_TEST_MODE==="1"?C.join(g(".prjct-tests"),"codex","hooks.json"):g(".codex","hooks.json")}i(w,"getCodexHooksJsonPath");function _(t){let e=process.env.PRJCT_BIN??"prjct";return`command -v ${e} >/dev/null 2>&1 && ${e} hook ${t} || exit 0`}i(_,"hookCommandUnix");function F(t){let e=process.env.PRJCT_BIN??"prjct";return`where ${e} >nul 2>&1 && ${e} hook ${t} || exit /b 0`}i(F,"hookCommandWindows");function p(t){return t[H]===!0}i(p,"isPrjctHandler");function S(t){if(t[H]===!0)return!1;let e=t.command?.trim()??"";return/(^|\/|\\|\s)prjct(\.cmd)?\s+hook\s+\S+/i.test(e)}i(S,"isLegacyPrjctHandler");function j(t){let e=t.command?.match(/\bhook\s+(\S+)/i);return e?e[1]:null}i(j,"subcommandOf");function A(t,e){let n={type:"command",command:_(t),commandWindows:F(t),timeout:30,[H]:!0};return e&&(n.statusMessage=e),n}i(A,"handlerFor");function $(t){return`prjct ${t}`}i($,"statusFor");function P(){return R.filter(t=>T.has(t.event))}i(P,"codexHookSpecs");async function y(t){try{let e=await h.readFile(t,"utf-8"),n=JSON.parse(e);return n&&typeof n=="object"?n:{}}catch(e){if(e.code==="ENOENT")return{};throw e}}i(y,"readHooksFile");async function O(t,e){await h.mkdir(C.dirname(t),{recursive:!0}),await h.writeFile(t,`${JSON.stringify(e,null,2)}
8
+ `,"utf-8")}i(O,"writeHooksFile");function N(t){let e=new Set(P().map(o=>o.subcommand)),n=[];for(let o of Object.keys(t)){let a=[];for(let r of t[o]??[])r.hooks=r.hooks.filter(c=>{if(!p(c))return!0;let u=j(c);return u&&!e.has(u)?(n.push(c),!1):!0}),r.hooks.length>0&&a.push(r);a.length>0?t[o]=a:delete t[o]}return n.length}i(N,"pruneOrphans");async function W(t=x()){let e=await h.readFile(t,"utf-8").catch(()=>""),n=[v,"[features]","hooks = true",b,""].join(`
9
+ `),o=e.indexOf(v),a=e.indexOf(b);if(o===-1&&(/^\s*hooks\s*=\s*true\b/m.test(e)||/^\s*codex_hooks\s*=\s*true\b/m.test(e)))return{path:t,changed:!1,enabled:!0};let r=(()=>{if(o!==-1&&a!==-1&&a>o){let u=e.slice(0,o),s=e.slice(a+b.length),k=s.startsWith(`
10
+ `)?s.slice(1):s;return u+n+k}return/^\s*hooks\s*=\s*true\b/m.test(e)||/^\s*codex_hooks\s*=\s*true\b/m.test(e)?e:/^\s*\[features\]/m.test(e)?!/^\s*hooks\s*=/m.test(e)&&!/^\s*codex_hooks\s*=/m.test(e)?e.replace(/^(\s*\[features\]\s*)$/m,`$1
11
+ hooks = true`):e:e.trim().length>0?`${e.trimEnd()}
12
+
13
+ ${n}`:n})(),c=r!==e;return c&&(await h.mkdir(C.dirname(t),{recursive:!0}),await h.writeFile(t,r,"utf-8")),{path:t,changed:c,enabled:!0}}i(W,"ensureCodexHooksFeature");async function K(t){let e=t?.hooksPath??w(),n=t?.configPath??x(),o=await y(e),a=o.hooks??{},r=[];for(let s of P()){let k=a[s.event]??[],E=k.find(f=>(f.matcher??"")===(s.matcher??"")),m=E??{matcher:s.matcher||void 0,hooks:[]};E||k.push(m),m.hooks=m.hooks.filter(f=>!S(f));let d=A(s.subcommand,$(s.subcommand)),l=m.hooks.find(f=>p(f)&&j(f)===s.subcommand);l?l.command===d.command&&l.commandWindows===d.commandWindows&&l.timeout===d.timeout?r.push("present"):(l.command=d.command,l.commandWindows=d.commandWindows,l.timeout=d.timeout,l.statusMessage=d.statusMessage,r.push("written")):(m.hooks.push(d),r.push("written")),m.matcher||delete m.matcher,a[s.event]=k}let c=N(a);o.hooks=a,await O(e,o);let u=await W(n);return{hooksPath:e,configPath:n,hooksWritten:r.filter(s=>s==="written").length,alreadyPresent:r.filter(s=>s==="present").length,hooksPruned:c,featuresEnabled:u.enabled,featuresChanged:u.changed}}i(K,"installCodexHooks");async function B(t=w()){let e=await y(t);if(!e.hooks)return{hooksPath:t,hooksRemoved:0};let n=[];for(let[o,a]of Object.entries(e.hooks)){let r=[];for(let c of a){let u=c.hooks.filter(s=>p(s)||S(s)?(n.push(s),!1):!0);u.length>0&&r.push({...c,hooks:u})}r.length>0?e.hooks[o]=r:delete e.hooks[o]}return Object.keys(e.hooks).length===0&&delete e.hooks,await O(t,e),{hooksPath:t,hooksRemoved:n.length}}i(B,"uninstallCodexHooks");async function L(t=w()){let e=await y(t);return{installed:Object.values(e.hooks??{}).flat().flatMap(o=>o.hooks).filter(o=>p(o)||S(o)).length,expected:P().length,path:t}}i(L,"codexHooksStatus");export{T as a,w as b,P as c,W as d,K as e,B as f,L as g};
@@ -0,0 +1,10 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as u}from"./chunk-PIA26GWG.mjs";import{a as e,b as G}from"./chunk-RP7F67ZT.mjs";import{a as m}from"./chunk-INJ5WT2D.mjs";import{b as a,f as S}from"./chunk-OE27RFLJ.mjs";import{d as l,g as d}from"./chunk-XWLTEAGN.mjs";import{b as i,c as h}from"./chunk-DOJPSIMG.mjs";import{l as c,p as L}from"./chunk-HYIT7MF5.mjs";import{e as s,g as k}from"./chunk-225DWS4D.mjs";import{a as r}from"./chunk-3TRXQAU4.mjs";S();k();L();import E from"node:fs/promises";import g from"node:path";G();d();h();var I="prjct-grok-skill";function p(){return process.env.PRJCT_TEST_MODE==="1"?g.join(i(".prjct-tests"),"grok","skills","prjct","SKILL.md"):i(".grok","skills","prjct","SKILL.md")}r(p,"getGrokSkillPath");function y(){return p()}r(y,"getGrokSkillInstallPath");function w(t){return`<!-- ${I}: ${JSON.stringify({v:l,h:t})} -->`}r(w,"getGrokSkillMetadata");function x(t){return m(t).slice(0,12)}r(x,"hashContent");function K(){return a("codex/SKILL.md")}r(K,"getGrokSkillTemplate");function C(t){let o=t.trimEnd(),n=x(o),f=w(n);return{content:`${o}
8
+
9
+ ${f}
10
+ `,templateHash:n}}r(C,"buildGrokSkillContent");async function A(){try{let t=p();await E.mkdir(g.dirname(t),{recursive:!0});let o=await c(t),n=K();return n?await u({skillMdPath:t,skillExists:o,templateContent:n,build:C,logLabel:"Grok"}):(e.warn("Grok SKILL.md template not found"),{success:!1,action:null})}catch(t){return e.warn(`Grok skill warning: ${s(t)}`),{success:!1,action:null}}}r(A,"installGrokSkill");export{y as a,K as b,C as c,A as d};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as e}from"./chunk-3TRXQAU4.mjs";function a(s,n){let t=s.replace(/\s+/g," ").trim();return t.length>n?`${t.slice(0,n-1)}\u2026`:t}e(a,"truncate");function u(s,n=220){let t=e(r=>r.replace(/\s+/g," ").trim(),"compact"),c=s.split(`
8
+ `).map(t).filter(Boolean),o=c[0]??t(s),i=o.match(/^\[[^\]]+\]\s+Lesson:\s*(.+)$/i)?.[1];if(!i)return a(o,n);let l=c.find(r=>/^Next action:\s*/i.test(r))?.replace(/^Next action:\s*/i,""),p=l?`${i} Next: ${l}`:i;return a(p,n)}e(u,"summarizeFrictionLesson");export{a,u as b};
@@ -0,0 +1,14 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as h,b as x,g as l,h as d}from"./chunk-DW4QMD6J.mjs";import{b as p,c as E}from"./chunk-DOJPSIMG.mjs";import{a as n}from"./chunk-3TRXQAU4.mjs";E();import g from"node:fs/promises";import M from"node:path";var C="# prjct:mcp:start - managed by prjct, do not edit between markers",b="# prjct:mcp:end",j="# prjct:mcp:context7:start - managed by prjct, do not edit between markers",S="# prjct:mcp:context7:end",T=["model-with-reasoning","current-dir","git-branch","context-remaining","five-hour-limit","weekly-limit","task-progress"];function f(){return process.env.PRJCT_TEST_MODE==="1"?M.join(p(".prjct-tests"),"codex","config.toml"):p(".codex","config.toml")}n(f,"getCodexConfigTomlPath");function u(t){return`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}n(u,"tomlString");function k(t,e,c,o){let s=(e.args??[]).map(u).join(", "),r=[c,`[mcp_servers.${t}]`,`command = ${u(e.command)}`,`args = [${s}]`];if(e.env&&Object.keys(e.env).length>0){let a=Object.entries(e.env).map(([i,m])=>`${i} = ${u(m)}`).join(", ");r.push(`env = { ${a} }`)}return r.push(o,""),r.join(`
8
+ `)}n(k,"buildMcpTomlBlock");function _(t=h()){return k("prjct",t,C,b)}n(_,"buildPrjctMcpTomlBlock");function $(t=x.context7){return k("context7",t,j,S)}n($,"buildContext7McpTomlBlock");function R(){return["[tui]",`status_line = [${T.map(u).join(", ")}]`,""].join(`
9
+ `)}n(R,"buildCodexStatusLineToml");function v(t){return/^\s*(?:tui\.)?status_line\s*=/m.test(t)}n(v,"hasCodexStatusLine");function P(t){if(v(t))return{toml:t,changed:!1};let c=`status_line = [${T.map(u).join(", ")}]
10
+ `,o=/^\s*\[tui\]\s*$/m.exec(t);if(o){let r=o.index+o[0].length,a=t.slice(0,r),i=t.slice(r),m=i.startsWith(`
11
+ `)?i.slice(1):i;return{toml:`${a}
12
+ ${c}${m}`,changed:!0}}let s=R();return{toml:t.trim().length>0?`${t.trimEnd()}
13
+
14
+ ${s}`:s,changed:!0}}n(P,"ensureCodexStatusLineToml");async function O(t=f()){let e=await g.readFile(t,"utf-8").catch(()=>""),c=_(),o=l(e,c,C,b,"prjct"),s=o.skipped,r=P(o.next),a=r.toml,i=await d(t,e,a);return{...i,skipped:s,...i.changed?{statusLineChanged:r.changed}:{}}}n(O,"ensureCodexMcpServer");async function N(t=f()){let e=await g.readFile(t,"utf-8").catch(()=>""),c=$(),{next:o,skipped:s}=l(e,c,j,S,"context7");return{...await d(t,e,o),skipped:s}}n(N,"ensureCodexContext7Server");async function B(t=f()){try{let e=await g.readFile(t,"utf-8");return/^\s*\[mcp_servers\.context7\]/m.test(e)}catch{return!1}}n(B,"codexHasContext7Server");export{f as a,_ as b,$ as c,R as d,O as e,N as f,B as g};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as e,c}from"./chunk-3TRXQAU4.mjs";function u(t){return t instanceof i}function p(t){return u(t)||t instanceof Error?t.message:typeof t=="string"?t:"Unknown error"}var i,s,o,a,E=c(()=>{"use strict";i=class extends Error{static{e(this,"PrjctError")}code;isOperational;constructor(r,n="PRJCT_ERROR"){super(r),this.name="PrjctError",this.code=n,this.isOperational=!0,Error.captureStackTrace?.(this,this.constructor)}},s=class t extends i{static{e(this,"ProjectError")}constructor(r,n="PROJECT_ERROR"){super(r,n),this.name="ProjectError"}static notInitialized(){return new t("Project not initialized. Run p. init first.","PROJECT_NOT_INIT")}static notFound(r){return new t(`Project not found: ${r}`,"PROJECT_NOT_FOUND")}static invalidId(r){return new t(`Invalid project ID: ${r}`,"PROJECT_INVALID_ID")}},o=class t extends i{static{e(this,"TemplateError")}constructor(r,n="TEMPLATE_ERROR"){super(r,n),this.name="TemplateError"}static notFound(r){return new t(`Template not found: ${r}.md`,"TEMPLATE_NOT_FOUND")}static parseFailed(r){return new t(`Failed to parse template: ${r}`,"TEMPLATE_PARSE_ERROR")}},a=class t extends i{static{e(this,"AgentError")}constructor(r,n="AGENT_ERROR"){super(r,n),this.name="AgentError"}static notSupported(r){return new t(`Unsupported agent type: ${r}`,"AGENT_NOT_SUPPORTED")}static initFailed(r){return new t(`Agent initialization failed: ${r}`,"AGENT_INIT_FAILED")}};e(u,"isPrjctError");e(p,"getErrorMessage")});export{s as a,o as b,a as c,p as d,E as e};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{f as d,h as p,l as i,o as u,p as F}from"./chunk-HYIT7MF5.mjs";import{a as c}from"./chunk-3TRXQAU4.mjs";F();import t from"node:path";async function E(e,s){let o=s?.packageManager?.trim().toLowerCase();return o?.startsWith("pnpm@")?"pnpm":o?.startsWith("yarn@")?"yarn":o?.startsWith("bun@")?"bun":o?.startsWith("npm@")?"npm":await i(t.join(e,"pnpm-lock.yaml"))?"pnpm":await i(t.join(e,"yarn.lock"))?"yarn":await i(t.join(e,"bun.lockb"))||await i(t.join(e,"bun.lock"))?"bun":(await i(t.join(e,"package-lock.json")),"npm")}c(E,"detectPackageManager");function w(e,s){return e==="yarn"?`yarn ${s}`:e==="pnpm"?`pnpm run ${s}`:e==="bun"?`bun run ${s}`:`npm run ${s}`}c(w,"pmRun");function H(e){return e==="yarn"?"yarn test":e==="pnpm"?"pnpm test":e==="bun"?"bun test":"npm test"}c(H,"pmTest");var x=["package.json","Cargo.toml","pyproject.toml","VERSION","version.txt"],b=".csproj",v=["CHANGELOG.md","HISTORY.md","NEWS.md","CHANGES.md"];async function g(e,s){for(let l of x)if(await i(t.join(e,l)))return l;let m=(s??await u(e)).find(l=>l.endsWith(b));if(m)return m}c(g,"detectVersionFile");async function r(e){for(let s of v)if(await i(t.join(e,s)))return s}c(r,"detectChangelogFile");async function M(e){let s=t.join(e,"package.json"),o=await d(s,null);if(o){let n=await E(e,o),a=o.scripts||{},f={stack:"js",packageManager:n};return a.lint&&(f.lint={tool:n,command:w(n,"lint")}),a.typecheck&&(f.typecheck={tool:n,command:w(n,"typecheck")}),a.test&&(f.test={tool:n,command:H(n)}),f.versionFile=await g(e),f.changelogFile=await r(e),f}if(await i(t.join(e,"pytest.ini"))){let n=await g(e),a=await r(e);return{stack:"python",test:{tool:"pytest",command:"pytest"},versionFile:n,changelogFile:a}}let m=await p(t.join(e,"pyproject.toml"),"");if(m.includes("[tool.pytest")||m.includes("pytest")){let n=await g(e),a=await r(e);return{stack:"python",test:{tool:"pytest",command:"pytest"},versionFile:n,changelogFile:a}}if(await i(t.join(e,"Cargo.toml"))){let n=await r(e);return{stack:"rust",test:{tool:"cargo",command:"cargo test"},versionFile:"Cargo.toml",changelogFile:n}}if(await i(t.join(e,"go.mod"))){let n=await g(e),a=await r(e);return{stack:"go",test:{tool:"go",command:"go test ./..."},versionFile:n,changelogFile:a}}let l=await u(e);if(l.some(n=>n.endsWith(".sln")||n.endsWith(".csproj")||n.endsWith(".fsproj"))){let n=await g(e,l),a=await r(e);return{stack:"dotnet",test:{tool:"dotnet",command:"dotnet test"},versionFile:n,changelogFile:a}}if(await i(t.join(e,"pom.xml"))){let n=await r(e);return{stack:"java",test:{tool:"maven",command:"mvn test"},versionFile:"pom.xml",changelogFile:n}}if(await i(t.join(e,"gradlew"))&&(await i(t.join(e,"build.gradle"))||await i(t.join(e,"build.gradle.kts")))){let n=await r(e);return{stack:"java",test:{tool:"gradle",command:"./gradlew test"},changelogFile:n}}let k=await g(e),y=await r(e);return{stack:"unknown",versionFile:k,changelogFile:y}}c(M,"detectProjectCommands");export{M as a};
@@ -0,0 +1,18 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{b as d}from"./chunk-B2HY22OD.mjs";import{b as l}from"./chunk-B7AQHL7B.mjs";import{g as a,i as _}from"./chunk-DMO3ZFUG.mjs";import{a as m}from"./chunk-3TRXQAU4.mjs";_();var E=7,A=90,f=20,T=["pattern-detector","transcript-auto","skill-miss","friction","land-auto","sync-context-quality"];function D(e){return e?T.some(t=>e===t||e.startsWith(`${t}-`)||e.startsWith(t)):!1}m(D,"isAutoSource");function O(e,t=E,o=500){let u=Date.now()-t*864e5;try{let n=a.query(e,`SELECT id FROM memory_entries
8
+ WHERE deleted_at IS NOT NULL AND deleted_at < ?
9
+ ORDER BY deleted_at ASC
10
+ LIMIT ?`,u,o);return n.length===0?0:(a.transaction(e,s=>{let i=s.prepare("DELETE FROM memory_embeddings WHERE memory_id = ?"),r=s.prepare("DELETE FROM memory_entries WHERE id = ?");for(let c of n){try{i.run(c.id)}catch{}r.run(c.id)}}),n.length)}catch{return 0}}m(O,"purgeSoftDeleted");function L(e,t=E,o=500){let u=new Date(Date.now()-t*864e5).toISOString();try{let n=a.query(e,`SELECT e.id FROM events e
11
+ WHERE e.type >= 'memory.remember.' AND e.type < 'memory.remember/'
12
+ AND e.timestamp < ?
13
+ AND NOT EXISTS (
14
+ SELECT 1 FROM memory_entries m
15
+ WHERE m.id = 'mem_' || e.id AND m.deleted_at IS NULL
16
+ )
17
+ ORDER BY e.id ASC
18
+ LIMIT ?`,u,o);return n.length===0?0:(a.transaction(e,s=>{let i=s.prepare("DELETE FROM events WHERE id = ?");for(let r of n)i.run(r.id)}),n.length)}catch{return 0}}m(L,"purgeOrphanRememberEvents");function g(e,t=f){if(t<=0)return 0;let o=[];try{let u=d.allEntriesForIndex(e),n=new Map;for(let s of u){let i=s.tags?.source;if(!D(i))continue;let r=i,c=n.get(r)??[];c.push(s),n.set(r,c)}for(let[,s]of n){if(s.length<=t)continue;s.sort((r,c)=>r.rememberedAt.localeCompare(c.rememberedAt));let i=s.slice(0,s.length-t);for(let r of i){try{l.archive(e,{entityType:"memory_entry",entityId:r.id,entityData:{id:r.id,type:r.type,content:r.content,tags:r.tags,rememberedAt:r.rememberedAt},summary:r.content.slice(0,80),reason:`auto-source-cap (>${t})`})}catch{}d.forget(e,r.id)&&o.push(r)}}}catch{return o.length}return o.length}m(g,"trimAutoSourceCap");function C(e){let t=a.get(e,"SELECT COUNT(*) AS c FROM memory_entries WHERE deleted_at IS NULL")?.c??0,o=a.get(e,"SELECT COUNT(*) AS c FROM memory_entries WHERE deleted_at IS NOT NULL")?.c??0,u=a.get(e,"SELECT COUNT(*) AS c FROM archives")?.c??0,n=a.get(e,"SELECT COUNT(*) AS c FROM events WHERE type >= 'memory.remember.' AND type < 'memory.remember/'")?.c??0,s=(()=>{try{return d.allEntriesForIndex(e).filter(i=>D(i.tags?.source)).length}catch{return 0}})();return{live:t,softDeleted:o,archives:u,rememberEvents:n,autoSourceLive:s}}m(C,"vaultHealth");async function F(e,t={}){let o=t.softDeletedPurgeDays??E,u=t.archivePruneDays??A,n=t.autoSourceMaxLive??f;if(t.dryRun===!0)return{softDeletedPurged:0,orphanEventsPurged:0,archivesPruned:0,autoSourceTrimmed:0,distilledDiscarded:0,digestsWritten:0};let i=await(async()=>{if(t.projectPath)try{let{distillAndDiscardAllAutoSources:p}=await import("./distill-ZF7WHGCZ.mjs"),y=await p(t.projectPath,e,n);return{distilledDiscarded:y.discarded,digestsWritten:y.digests}}catch{return g(e,n),{distilledDiscarded:0,digestsWritten:0}}else return g(e,n),{distilledDiscarded:0,digestsWritten:0}})(),{distilledDiscarded:r,digestsWritten:c}=i,{eliminateSoftDeletedNoValue:b}=await import("./distill-ZF7WHGCZ.mjs"),h=b(e,o).purged||O(e,o),S=L(e,o),R=(()=>{try{return l.pruneOldArchives(e,u)}catch{return 0}})();return{softDeletedPurged:h,orphanEventsPurged:S,archivesPruned:R,autoSourceTrimmed:r,distilledDiscarded:r,digestsWritten:c}}m(F,"runVaultPurge");export{E as a,A as b,f as c,T as d,D as e,O as f,L as g,g as h,C as i,F as j};
@@ -0,0 +1,10 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{c as h}from"./chunk-HCPQZRR3.mjs";import{g as m,i as S}from"./chunk-DMO3ZFUG.mjs";import{a as x,p as A}from"./chunk-D62TAZG6.mjs";import{a as u}from"./chunk-3TRXQAU4.mjs";S();A();async function _(n,e=100){try{let{stdout:o}=await x(`git log --name-only --pretty=format:'---COMMIT---' -${e}`,{cwd:n,maxBuffer:10485760}),t=o.split(`
8
+ `).reduce((r,i)=>{let s=i.trim();return s==="---COMMIT---"?(r.currentFiles&&r.currentFiles.size>0&&r.currentFiles.size<=30&&r.commits.push(r.currentFiles),r.currentFiles=new Set):s&&r.currentFiles&&w(s)&&r.currentFiles.add(s),r},{commits:[],currentFiles:null});return t.currentFiles&&t.currentFiles.size>0&&t.currentFiles.size<=30&&t.commits.push(t.currentFiles),t.commits}catch{return[]}}u(_,"parseGitLog");function w(n){return/\.(ts|tsx|js|jsx|mjs|cjs|py|go|rs|java|cs|rb|php|vue|svelte)$/i.test(n)&&!n.includes("node_modules/")}u(w,"isSourceFile");async function I(n,e=100){let o=await _(n,e),t=new Map,r=new Map;for(let s of o){let a=Array.from(s);for(let c of a)t.set(c,(t.get(c)||0)+1);for(let[c,l]of a.entries())for(let g of a.slice(c+1)){let f=O(l,g);r.set(f,(r.get(f)||0)+1)}}let i={};for(let[s,a]of r){let[c,l]=s.split("\0"),g=t.get(c)||0,f=t.get(l)||0;if(g<2||f<2)continue;let y=g+f-a,C=y>0?a/y:0;C<.1||(i[c]||(i[c]={}),i[l]||(i[l]={}),i[c][l]=C,i[l][c]=C)}return{matrix:i,commitsAnalyzed:o.length,filesAnalyzed:t.size,builtAt:new Date().toISOString()}}u(I,"buildMatrix");function O(n,e){return n<e?`${n}\0${e}`:`${e}\0${n}`}u(O,"pairKey");function R(n,e){let o=new Set(n),t=new Map;for(let r of n){let i=e.matrix[r];if(i)for(let[s,a]of Object.entries(i)){if(o.has(s))continue;let c=t.get(s)||0;a>c&&t.set(s,a)}}return h(t)}u(R,"scoreFromSeeds");var p="cochange-index",d=new Map;function b(n,e){m.setDoc(n,p,e),d.delete(n)}u(b,"saveMatrix");function v(n){let e=m.get(n,"SELECT updated_at FROM kv_store WHERE key = ?",p);if(!e)return d.delete(n),null;let o=d.get(n);if(o&&o.updatedAt===e.updated_at)return o.matrix;let t=m.getDoc(n,p);return t&&d.set(n,{matrix:t,updatedAt:e.updated_at}),t}u(v,"loadMatrix");async function z(n,e){try{let{stdout:o}=await x(`git rev-list --max-count=${e} HEAD`,{cwd:n,maxBuffer:1048576}),t=o.split(`
9
+ `).map(r=>r.trim()).filter(Boolean);return t.length>0?t.join(`
10
+ `):null}catch{return null}}u(z,"recentHistoryFingerprint");async function T(n,e,o=100){let t=await z(n,o),r=t?v(e):null;if(r?.historyFingerprint===t)return r;let i=await I(n,o);return t&&(i.historyFingerprint=t),b(e,i),i}u(T,"indexCoChanges");export{R as a,v as b,T as c};
@@ -0,0 +1,19 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{b as d,g as p}from"./chunk-XWLTEAGN.mjs";import{a as i}from"./chunk-3TRXQAU4.mjs";p();function f(...n){let t=c(...n.filter(Boolean));return process.env.PRJCT_DEBUG?c(t,`---
8
+ prjct v${d()}`):t}i(f,"mdOutput");function g(n,t){let r=`| ${n.join(" | ")} |`,e=`|${n.map(()=>"---").join("|")}|`,s=t.map(o=>`| ${o.join(" | ")} |`);return[r,e,...s].join(`
9
+ `)}i(g,"mdTable");function l(n,t=""){return`\`\`\`${t}
10
+ ${n}
11
+ \`\`\``}i(l,"mdCodeBlock");function $(n,t){return`**${n}**: \`${t}\``}i($,"mdBadge");function h(n,t,r=3){return`### ${n}
12
+ ${t}`}i(h,"mdSection");function x(n,t=!1){return n.map((r,e)=>t?`${e+1}. ${r}`:`- ${r}`).join(`
13
+ `)}i(x,"mdList");function b(n){let t=[];n.branch&&t.push(`Branch: \`${n.branch}\``),n.linearId&&t.push(`Linear: \`${n.linearId}\``),n.type&&t.push(`Type: ${n.type}`),n.estimatedPoints&&t.push(`~${n.estimatedPoints}pts`),n.estimatedMinutes&&t.push(`~${n.estimatedMinutes}min`),n.domains&&n.domains.length>0&&t.push(`Domains: ${n.domains.join(", ")}`),n.duration&&t.push(`Duration: ${n.duration}`),n.status&&t.push(`Status: ${n.status}`);let r=t.length>0?`
14
+ > ${t.join(" | ")}`:"";return`## ${n.description}${r}`}i(b,"mdTaskHeader");function j(n){let t=["Command","Action"],r=n.map(e=>[`\`${e.command}\``,e.label]);return`### Next
15
+ ${g(t,r)}`}i(j,"mdNextSteps");function S(n){let t=Object.entries(n).filter(([,s])=>s!=null);if(t.length===0)return"";let r=["Metric","Value"],e=t.map(([s,o])=>[s,String(o)]);return g(r,e)}i(S,"mdStats");function R(n,t){return t?`## ${n}
16
+ > ${t}`:`## ${n}`}i(R,"mdDone");function T(n){return`> **WARNING:** ${n}`}i(T,"mdWarn");function c(...n){return n.filter(Boolean).join(`
17
+
18
+ `)}i(c,"mdJoin");function y(n,t,r,e){let s=t.replace(/_/g," "),o=[`> **${n}**: ${s}`];if(e)for(let[u,a]of Object.entries(e))o.push(`> ${u}: ${a}`);if(r.length>0){o.push("");for(let u of r)o.push(`- ${u.label}: \`${u.command}\``)}console.log(o.join(`
19
+ `))}i(y,"mdActionRequired");export{f as a,l as b,$ as c,h as d,x as e,b as f,j as g,S as h,R as i,T as j,c as k,y as l};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{b as e,p as l}from"./chunk-D62TAZG6.mjs";import{a as r,c}from"./chunk-3TRXQAU4.mjs";import{execFileSync as o}from"node:child_process";function i(n){for(let t of n.split(/\r?\n/)){let s=t.trim();if(s)return s}return null}function u(n){if(!n||n.includes("\0"))return null;try{if(process.platform==="win32"){let t=o("where.exe",[n],{encoding:"utf-8",stdio:["ignore","pipe","ignore"],windowsHide:!0});return i(t)}try{let t=o("which",[n],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]});return i(t)}catch{let t=o("/bin/sh",["-c",`command -v ${JSON.stringify(n)}`],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]});return i(t)}}catch{return null}}async function f(n){if(!n||n.includes("\0"))return null;try{if(process.platform==="win32"){let{stdout:t}=await e("where.exe",[n],{encoding:"utf-8",windowsHide:!0});return i(String(t))}try{let{stdout:t}=await e("which",[n]);return i(String(t))}catch{return u(n)}}catch{return null}}function w(n){return u(n)!==null}async function a(n){return await f(n)!==null}var g=c(()=>{"use strict";l();r(i,"firstNonEmptyLine");r(u,"whichSync");r(f,"whichAsync");r(w,"commandOnPath");r(a,"commandOnPathAsync")});export{u as a,f as b,w as c,a as d,g as e};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{h as f}from"./chunk-ID2C2S33.mjs";import{a as d,b as i}from"./chunk-XSZOHNL4.mjs";import{F as c,G as A}from"./chunk-HU5ERAAV.mjs";import{a as h,e as p}from"./chunk-623SNKDH.mjs";import{o as u,p as y}from"./chunk-HYIT7MF5.mjs";import{a as s,e as a,g as w}from"./chunk-225DWS4D.mjs";import{a as g}from"./chunk-3TRXQAU4.mjs";p();A();w();y();var l=class{static{g(this,"ProjectService")}currentAuthor=null;async ensureInit(r){if(await i.isConfigured(r))return{success:!0};try{let{worktreeService:o}=await import("./worktree-service-YRRPFU57.mjs");if(await o.detect(r)){let n=await o.getMainWorktree(r);if(n&&n!==r&&await i.isConfigured(n))return await o.setup(r,n),{success:!0}}}catch{}f.spin("initializing project...");let{PlanningCommands:t}=await import("./planning-NOWLKZDS.mjs"),e=await new t().init(null,r);return e.success?{success:!0}:e}async getProjectId(r){let t=await i.getProjectId(r);if(!t)throw h.notInitialized();return t}async getGlobalPath(r){let t=await this.getProjectId(r);return await c.ensureProjectStructure(t),c.getGlobalProjectPath(t)}async ensureAuthor(){if(this.currentAuthor)return this.currentAuthor;let r=await d();return this.currentAuthor={name:r.name??void 0,email:r.email??void 0,github:r.github??void 0},this.currentAuthor}getCurrentAuthor(){return this.currentAuthor}clearAuthorCache(){this.currentAuthor=null}async isEmptyDirectory(r){try{return(await u(r)).filter(e=>!e.startsWith(".")&&e!=="node_modules"&&e!=="package.json"&&e!=="package-lock.json"&&e!=="README.md").length===0}catch(t){return s(t)||console.error(`Directory check error: ${a(t)}`),!0}}async hasExistingCode(r){try{let t=["src","lib","app","components","pages","api","main.go","main.rs","main.py"];return(await u(r)).some(e=>t.includes(e))}catch(t){return s(t)||console.error(`Code check error: ${a(t)}`),!1}}async isConfigured(r){return await i.isConfigured(r)}async needsMigration(r){return await i.needsMigration(r)}},P=new l,R=P;export{P as a,R as b};
@@ -0,0 +1,15 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as f}from"./chunk-L5LFLI4R.mjs";import{a as i}from"./chunk-5YLI5V3Q.mjs";import{b as y}from"./chunk-B2HY22OD.mjs";import{f as g,i as x}from"./chunk-DMO3ZFUG.mjs";import{a}from"./chunk-3TRXQAU4.mjs";import{execFileSync as S}from"node:child_process";x();var j="land-auto",$="session-close";async function N(t){let o=L(t);if(!o)return{wrote:!1,content:null,reason:"nothing-to-land"};try{return await y.remember(t.projectPath,{type:"context",content:o,tags:{source:j,topic:$,capture:"land-v2",context_schema:"living-v2",synthesis:"deterministic"},provenance:"extracted",projectId:t.projectId}),{wrote:!0,content:o}}catch(r){return{wrote:!1,content:o,reason:`remember-failed: ${r.message}`}}}a(N,"synthesizeLandHandoff");function L(t){let o=t.cycleDescription?.trim()||null,r=f(t.projectId,t.cycleId),u=k(t.projectPath),c=b(t.projectId);if(!o&&r.length===0&&u.length===0&&c.length===0)return null;let e=[];o?e.push(`Session close: Work cycle "${i(o,120)}" still open or just closed.`):e.push("Session close: no open work cycle \u2014 landed repo + capture signals only."),e.push("Context synthesis: Passive land hand-off from durable signals (cycle, journal, commits, auto-captures). Not a model essay."),e.push(`Key data: source=${j}; topic=${$}; capture=land-v2`);let l=[];if(o&&l.push(`cycle="${i(o,100)}"`),r.length>0&&l.push(`journal: ${r.map(s=>i(s,70)).join(" \xB7 ")}`),l.length>0&&e.push(`What happened: ${l.join("; ")}`),r.length>0&&e.push(`Why it mattered: Journal trail shows progression \u2014 ${r.slice(0,2).map(s=>i(s,80)).join(" \xB7 ")}`),c.length>0){let s=c.filter(n=>n.type==="learning"||n.type==="decision"||n.type==="fact").slice(0,4),p=c.filter(n=>n.type==="gotcha"||n.type==="anti-pattern").slice(0,3);s.length>0&&e.push(`Learned this session: ${s.map(n=>`[${n.type}] ${i(n.content,100)}`).join(" \xB7 ")}`),p.length>0&&e.push(`Decision/trap: ${p.map(n=>`[${n.type}] ${i(n.content,100)}`).join(" \xB7 ")}`);let I=new Set([...s,...p]),d=c.filter(n=>!I.has(n)).slice(0,3);d.length>0&&s.length===0&&p.length===0&&e.push(`Decision/trap: ${d.map(n=>`[${n.type}] ${i(n.content,100)}`).join(" \xB7 ")}`)}u.length>0&&e.push(`Outcome: Recent commits: ${u.join("; ")}`),t.author&&e.push(`Who/author: ${t.author}`),t.model&&e.push(`Model: ${t.model}`);let m=t.tokensIn,h=t.tokensOut;if(m!=null||h!=null){let s=(m??0)+(h??0);e.push(`Token usage: in=${m??0} out=${h??0} total=${s} (compound judgment \u2014 not a fresh-window thrash loop)`)}e.push("Feature/domain: session-close"),e.push("Pattern: land auto-synthesis without agent remember"),e.push("Anti-pattern: relying on the model to remember to remember at session end"),e.push("Competitive: next window must `prjct prime` \u2014 act as this developer with SQLite judgment, not re-research from zero (GSD tax).");let w=o!=null?"Finish or pause the open cycle (`prjct status done` / `prjct pause`); next agent should `prjct work --md` or `prjct prime`.":"Next agent: `prjct prime` then pick from `prjct next --md`.";return e.push(`Next implication: ${w}`),e.join(" \xB7 ")}a(L,"buildLandHandoffContent");function k(t){try{return S("git",["log","-5","--oneline","--no-decorate"],{cwd:t,encoding:"utf-8",timeout:3e3,stdio:["ignore","pipe","ignore"]}).split(`
8
+ `).map(r=>r.trim()).filter(Boolean)}catch{return[]}}a(k,"recentCommits");function b(t){try{return g.query(t,`SELECT me.type, me.content
9
+ FROM memory_entries me
10
+ JOIN memory_entry_tags t ON t.entry_id = me.id
11
+ WHERE me.deleted_at IS NULL
12
+ AND t.key = 'source'
13
+ AND t.value IN ('transcript-auto', 'land-auto')
14
+ ORDER BY me.created_at DESC
15
+ LIMIT 8`).map(r=>({type:r.type,content:r.content}))}catch{return[]}}a(b,"recentAutoCaptures");export{N as a,L as b};
@@ -0,0 +1,15 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as c}from"./chunk-L4TUXFCL.mjs";import{f as i,i as _}from"./chunk-DMO3ZFUG.mjs";import{e as o,l as p}from"./chunk-HU5ERAAV.mjs";import{a as s}from"./chunk-3TRXQAU4.mjs";p();_();function k(t){if(!t)return null;try{return JSON.parse(t)}catch{return null}}s(k,"parseEvidence");function d(t){return{id:t.id,projectId:t.project_id,taskId:t.task_id,taskDescription:t.task_description,fromAgent:t.from_agent,fromIdentity:t.from_identity,toAgent:t.to_agent,reason:t.reason,evidence:k(t.evidence),status:t.status,workspaceId:t.workspace_id,worktreePath:t.worktree_path,branch:t.branch,createdAt:t.created_at,acceptedAt:t.accepted_at,acceptedBy:t.accepted_by,expiresAt:t.expires_at}}s(d,"toHandoff");function f(t){let e=new Date;return e.setTime(e.getTime()+Math.max(1,t)*36e5),e.toISOString()}s(f,"expiresAtIso");function x(t){let e=`hand_${c()}`,n=o(),r=t.ttlHours??24,a=t.evidence?JSON.stringify(t.evidence):null;return i.run(t.projectId,`INSERT INTO task_handoffs (
8
+ id, project_id, task_id, task_description, from_agent, from_identity,
9
+ to_agent, reason, evidence, status, workspace_id, worktree_path, branch,
10
+ created_at, accepted_at, accepted_by, expires_at
11
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 'pending', ?, ?, ?, ?, NULL, NULL, ?)`,e,t.projectId,t.taskId,t.taskDescription,t.fromAgent,t.fromIdentity??null,t.toAgent,t.reason,a,t.workspaceId??null,t.worktreePath??null,t.branch??null,n,f(r)),{id:e,projectId:t.projectId,taskId:t.taskId,taskDescription:t.taskDescription,fromAgent:t.fromAgent,fromIdentity:t.fromIdentity??null,toAgent:t.toAgent,reason:t.reason,evidence:t.evidence??null,status:"pending",workspaceId:t.workspaceId??null,worktreePath:t.worktreePath??null,branch:t.branch??null,createdAt:n,acceptedAt:null,acceptedBy:null,expiresAt:f(r)}}s(x,"createHandoff");function S(t,e){let n=i.get(t,"SELECT * FROM task_handoffs WHERE id = ? OR id LIKE ?",e,`${e}%`);return n?d(n):null}s(S,"getHandoff");var g=new Map,m=60*1e3;function l(t){let e=Date.now(),n=g.get(t)??0;if(e-n<m)return 0;g.set(t,e);try{i.run(t,`UPDATE task_handoffs SET status = 'expired'
12
+ WHERE status = 'pending' AND expires_at IS NOT NULL AND expires_at < ?`,o())}catch{return 0}return 0}s(l,"expireStaleHandoffs");function A(t,e={}){l(t);let n=e.limit??20,r=[],a=[];e.status&&(r.push("status = ?"),a.push(e.status),e.status==="pending"&&(r.push("(expires_at IS NULL OR expires_at >= ?)"),a.push(o()))),e.toAgent&&(r.push("to_agent = ?"),a.push(e.toAgent));let u=r.length>0?`WHERE ${r.join(" AND ")}`:"";return i.query(t,`SELECT * FROM task_handoffs ${u} ORDER BY created_at DESC LIMIT ?`,...a,n).map(d)}s(A,"listHandoffs");function b(t,e){return A(t,{status:"pending",toAgent:e,limit:10})}s(b,"listPendingForAgent");function T(t,e,n){l(t);let r=o();i.run(t,`UPDATE task_handoffs
13
+ SET status = 'accepted', accepted_at = ?, accepted_by = ?
14
+ WHERE (id = ? OR id LIKE ?) AND status = 'pending'
15
+ AND (expires_at IS NULL OR expires_at >= ?)`,r,n,e,`${e}%`,r);let a=i.get(t,"SELECT * FROM task_handoffs WHERE (id = ? OR id LIKE ?) AND status = ? AND accepted_by = ?",e,`${e}%`,"accepted",n);return a?d(a):null}s(T,"acceptHandoff");export{x as a,S as b,l as c,A as d,b as e,T as f};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ var n={core:{title:"Work Cycle",description:"Intent, context, execution, learning, and improvement",order:1},optional:{title:"Intelligence & Quality",description:"Project intelligence, quality proof, and advanced policies",order:2},setup:{title:"Setup & Infrastructure",description:"Installation, configuration, and integration plumbing",order:3},legacy:{title:"Compatibility",description:"v2 aliases kept for existing users and scripts",order:4}},a={upgrade:"legacy",hook:"internal"},o=[{name:"intent",group:"core",surface:"ai-agile",routing:{group:"spec",method:"draft"},routingMode:"cold-only",optionSchema:{strings:["goal","tags"]},description:"Frame the work brief: objective, constraints, risks, and success signal",usage:{claude:'p. intent "<title>"',terminal:'prjct intent "<title>" [--goal "..."] [--tags k:v,...]'},params:'"<title>" [--goal] [--tags]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:["v3 work-cycle replacement for ticket-style planning","Stores the durable brief in SQLite","Sub-verbs mirror spec for compatibility: list, show, update, audit, link-work, ship"]},{name:"work",group:"core",surface:"ai-agile",routing:{group:"workflow",method:"now"},optionSchema:{strings:["spec","geometry"],booleans:["extend"]},description:"Start or inspect a work cycle with context and evidence",usage:{claude:'p. work "<intent>"',terminal:'prjct work "<intent>" [--geometry split|single|direct]'},params:"[intent] [--geometry]",implemented:!0,hasTemplate:!0,requiresProject:!0,features:["v3 name for the execution cycle formerly exposed as task","No arg \u2192 shows the active work cycle","Surfaces related context before planning/editing","Captures harness/evidence expectations for the cycle"]},{name:"init",group:"core",surface:"support",routing:{group:"planning",method:"init"},description:"Deep project analysis and initialization",usage:{claude:'p. init "[idea]"',terminal:'prjct init "[idea]" [--yes] [--pack code,daily]'},params:"[idea] [--yes]",implemented:!0,hasTemplate:!0,requiresProject:!1,requiresLlm:!0,features:["Architect mode for blank projects","Auto tech stack recommendation","Analyzes existing codebases","`--yes` skips wizard (CI / 60s quickstart)"]},{name:"quickstart",group:"core",surface:"support",routing:{group:"planning",method:"quickstart"},optionSchema:{strings:["pack"]},description:"One-shot init + packs + agent surfaces (\u224860s install)",usage:{claude:"p. quickstart",terminal:"prjct quickstart [--pack code,daily]"},params:"[--pack]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Non-interactive init --yes","Default packs + AGENTS/CLAUDE routing","Prints three next verbs for the agent"]},{name:"task",group:"legacy",surface:"legacy",routing:{group:"workflow",method:"now"},optionSchema:{strings:["spec"],booleans:["extend"]},description:"Compatibility alias for `work`",usage:{claude:null,terminal:'prjct task "<description>"'},params:"[description]",implemented:!0,hasTemplate:!0,requiresProject:!0,features:["No arg \u2192 shows the active task (or none)","Deprecated public language: use `prjct work` for the v3 work cycle","Auto-harness classifies H0-H3 and stores expected evidence on the task","Writes to stateStorage; runs before/after workflow rules","Optional Linear issue link when the arg matches `[A-Z]+-\\d+`"]},{name:"ship",group:"core",surface:"ai-agile",routing:{group:"shipping",method:"ship"},optionSchema:{booleans:["skipHooks","noSpecGate","noTestGate","allowNewDeps","forcePressure","noJudgmentGate"],strings:["intent","geometry"]},description:"Commit, push, and celebrate shipped feature",usage:{claude:'p. ship ["feature"]',terminal:'prjct ship ["feature"]'},params:"[feature]",implemented:!0,hasTemplate:!0,requiresProject:!0,requiresLlm:!0,features:["No arg \u2192 ships the active task description, or derives a summary from the branch"]},{name:"sync",group:"core",surface:"ai-agile",routing:{group:"analysis",method:"sync"},description:"Sync project state and update workflow agents",usage:{claude:"p. sync",terminal:"prjct sync [--package=<name>] [--full]"},implemented:!0,hasTemplate:!0,requiresProject:!0,requiresLlm:!0,features:["Incremental sync: only re-analyzes changed files (default)","Force full sync: --full bypasses incremental cache","Monorepo support: --package=<name> for single package sync","Nested PRJCT.md inheritance","Per-package CLAUDE.md generation"]},{name:"eval",group:"optional",surface:"support",routing:{group:"eval",method:"eval"},optionSchema:{booleans:["publish","dryRun","json"],strings:["baseline","candidate","source","target","file"]},description:"Run product evals, compare versions, and publish actionable results",usage:{claude:"p. eval run [--candidate <version>] [--publish]",terminal:"prjct eval <run|compare|report|publish> [--baseline <version>] [--candidate <version>] [--target cloud] [--dry-run]"},params:"[run|compare|report|publish]",implemented:!0,hasTemplate:!1,requiresProject:!1,requiresLlm:!1,features:["Deterministic local eval runs stored under PRJCT_CLI_HOME/evals","Version comparisons with regression/improvement actionables","Cloud publication for shared benchmark history with server-side ownership and subscription checks"]},{name:"status",group:"legacy",surface:"legacy",routing:{group:"primitives",method:"status"},optionSchema:{strings:["tokensIn","tokensOut"]},description:"Compatibility lifecycle escape hatch; prefer `work` outcomes",usage:{claude:null,terminal:"prjct status <value>"},params:"[value]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["No args \u2192 prints active task + current status","Workflows are the primary status-change mechanism; this is the escape"]},{name:"tag",group:"legacy",surface:"legacy",routing:{group:"primitives",method:"tag"},optionSchema:{},description:"Compatibility metadata escape hatch; prefer synthesized context tags",usage:{claude:null,terminal:"prjct tag type:bug domain:auth"},params:"<pairs...>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Claude decides what to tag \u2014 no heuristic classifier","type:<feature|bug|improvement|chore> promotes to tasks.type"]},{name:"remember",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"remember"},optionSchema:{strings:["tags"],booleans:["force","global"]},description:"Capture a project memory entry (fact, decision, learning, gotcha, \u2026)",usage:{claude:'p. remember learning "message"',terminal:'prjct remember learning "message" --tags domain:auth'},params:'<type> "<content>" [--tags k:v,...]',implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Types: fact, decision, learning, gotcha, pattern, anti-pattern, shipped, inbox, todo, idea, insight, question, source, person \u2014 plus user-defined","Grows the project memory consumable via `prjct context memory`"]},{name:"forget",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"forget"},optionSchema:{},description:"Delete a project memory entry by id (the delete half of `remember`)",usage:{claude:"p. forget mem_1234",terminal:"prjct forget mem_1234 [--md]"},params:"<id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Accepts `mem_1234`, `mem-1234`, or a bare `1234`","Hard-deletes the source event + drops the FTS mirror and any embedding \u2014 cannot resurface lexically or semantically"]},{name:"close",group:"core",surface:"ai-agile",routing:{group:"primitives",method:"close"},optionSchema:{strings:["reason"]},description:"Resolve/close a memory entry (inbox, signal, trap) so it leaves rotation \u2014 soft-delete + closed tag",usage:{claude:'p. close mem_1234 --reason "fixed in PR"',terminal:'prjct close mem_1234 [--reason "..."] [--md]'},params:"<id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Soft-removes from recall/FTS/embeddings; records status:closed for audit","Use for resolved inbox/improvement-signals \u2014 prefer over silent forget when the resolution matters"]},{name:"capture",group:"legacy",surface:"legacy",routing:{group:"capture",method:"capture"},optionSchema:{strings:["tags"],booleans:["force","fromCurrent"]},description:"Compatibility inbox fallback; prefer synthesized `remember context`",usage:{claude:null,terminal:'prjct capture "call Ana re pricing" --tags domain:sales'},params:'"<content>" [--tags k:v,...]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Writes memory type=inbox; Claude retypes later via a clarify workflow","No task id, no branch, no worktree \u2014 just persists",'Bare `prjct "<text>"` auto-routes to `capture`']},{name:"seed",group:"setup",surface:"support",routing:{group:"seed",method:"seed"},routingMode:"bin-only",optionSchema:{},description:"Manage declarative packs (persona, memory types, workflow slots, hook signals)",usage:{claude:"p. seed list",terminal:"prjct seed add pm,daily"},params:"[add|remove|list|suggest] [pack,pack,...]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Packs declare signals only \u2014 no bash is written","Add or remove multi-persona contexts per project","Auto-detect suggestion from project stack"]},{name:"mcp",group:"setup",surface:"support",routing:{group:"mcp",method:"mcp"},routingMode:"bin-only",optionSchema:{},description:"Toggle MCP servers per-project \u2014 interactive multi-select in your terminal, list/deny/allow for scripts",usage:{claude:"p. mcp list",terminal:"prjct mcp"},params:"[list|status|deny|allow] [serverName]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Interactive multi-select with live tool-cost delta (default UX in TTY)","Project-local \u2014 writes only to .claude/settings.local.json","Knows the well-known cloud MCPs from claude.ai (PostHog, Atlassian, etc.)","Headless list/deny/allow for LLM agents and scripts (--md flag)"]},{name:"install",group:"setup",surface:"support",routing:{group:"install",method:"install"},routingMode:"bin-only",optionSchema:{},description:"Install universal agent surfaces, Claude hooks, and Codex config",usage:{claude:"p. install",terminal:"prjct install"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Inside a prjct project, refreshes AGENTS.md as the portable baseline","Writes Claude passive hooks: SessionStart, UserPromptSubmit, \u2026","Repairs detected Codex config.toml with prjct MCP and TUI status_line","Idempotent; existing non-prjct hooks stay intact","Audit agent support with `prjct agents doctor`"]},{name:"help",group:"setup",surface:"support",routingMode:"bin-only",description:"Contextual help and guidance",usage:{claude:"p. help [topic]",terminal:"prjct help [topic]"},params:"[topic]",implemented:!0,hasTemplate:!0,requiresProject:!1},{name:"analysis-save-llm",group:"optional",surface:"internal",routing:{group:"analysis",method:"saveLlmAnalysis"},description:"Persist analysis notes produced by an LLM run",usage:{claude:null,terminal:"prjct analysis-save-llm <file|text|json>"},params:"<file|text|json>",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0},{name:"analyze",group:"legacy",surface:"legacy",routing:{group:"analysis",method:"analyze"},description:"Compatibility alias for sync analysis",usage:{claude:null,terminal:"prjct analyze"},implemented:!0,hasTemplate:!0,requiresProject:!0,isOptional:!0,requiresLlm:!0},{name:"code",group:"optional",surface:"support",routing:{group:"code",method:"code"},optionSchema:{},description:"Structural code graph: symbols, trace, impact/risk, architecture (run after sync)",usage:{claude:"p. code [symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm]",terminal:"prjct code [symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm]"},params:"[symbols|trace|impact|architecture|dead|export|import|push-graph|reindex|cbm] [args]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Symbol index on sync; 4th work-scope signal; CALLS with enclosing + imports","trace / impact (hunk-level) / architecture / dead one-shots","Per-project cache under ~/.prjct-cli/projects/<id>/ (never in client repo)","push-graph: full Function/Class/File + CALLS/IMPORTS graph \u2192 cloud 3D (no node/link caps)","PreToolUse Grep|Glob augment; ship structural risk cue; optional CBM cli"]},{name:"lean",group:"optional",surface:"support",routing:{group:"lean",method:"lean"},optionSchema:{},description:"Anti-over-engineering: set intensity, review/audit/debt (read-only)",usage:{claude:"p. lean [review|audit|debt|off|lite|full|ultra]",terminal:"prjct lean [sub]"},params:"[review|audit|debt|off|lite|full|ultra]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show active intensity mode + a one-screen summary","review/audit/debt are advisory \u2014 no gate, no source writes","off|lite|full|ultra sets the intensity (mirrors ponytail modes)"]},{name:"tdd",group:"optional",surface:"support",routing:{group:"tdd",method:"tdd"},optionSchema:{},description:"Test-Driven Development: set intensity, run the test command (check)",usage:{claude:"p. tdd [check|off|assist|strict]",terminal:"prjct tdd [sub]"},params:"[check|off|assist|strict]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show mode + the auto-detected test command","off|assist|strict sets the intensity (opt-in, like lean)","check runs the detected test command now (red/green) \u2014 the real gate"]},{name:"judgment",group:"optional",surface:"support",routing:{group:"judgment",method:"judgment"},optionSchema:{booleans:["md"]},description:"Precision judgment v2: evidence tax, DNA, RED/BLUE merge, ghosts, next card, ship gate",usage:{claude:"p. judgment [plan|open|add|merge|challenge|next|approve|\u2026]",terminal:"prjct judgment [sub]"},params:"[plan|open|add|merge|challenge|fix-round|fixed|verify|brief|next|ghosts|approve|escalate|status|clear]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["next \u2192 machine directive card (agent loop never re-derives state)","evidence tax + finding DNA + project ghost FP memory","RED/BLUE dual-blind merge; contradiction auto-escalates","code-strict ship hard-gates on ledger.approved before task complete"]},{name:"sdd",group:"optional",surface:"support",routing:{group:"sdd",method:"sdd"},optionSchema:{},description:"Spec-Driven Development: gate the spec pipeline (off/advisory/strict)",usage:{claude:"p. sdd [off|advisory|strict]",terminal:"prjct sdd [sub]"},params:"[off|advisory|strict]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["No arg \u2192 show mode + the active task spec station (pipeline checklist)","off|advisory|strict sets the intensity (opt-in, like lean)","strict: every task needs a reviewed spec; ship blocks unspecced work"]},{name:"notify",group:"setup",surface:"support",routing:{group:"notify",method:"notify"},optionSchema:{},description:"Desktop notifications (default on): ping on Claude-waiting + subagent-finished",usage:{claude:"p. notify [on|off]",terminal:"prjct notify [on|off]"},params:"[on|off]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Default ON \u2014 pings when Claude is waiting or a subagent finishes","No arg \u2192 show mode + what fires","off silences OS notifications (per-prompt work-state block stays)"]},{name:"agents",group:"setup",surface:"support",routing:{group:"agents",method:"agents"},optionSchema:{booleans:["fix"]},description:"Show the concrete compatibility matrix for AI coding agents (doctor) or harness surface map (surfaces)",usage:{claude:"p. agents [doctor|surfaces|doctor --fix]",terminal:"prjct agents [doctor|surfaces [--detail]|doctor --fix]"},params:"[doctor|status|list|surfaces] [--fix] [--detail]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Derives support levels from the runtime registry","Reports AGENTS.md, MCP, skills, hooks, ACP, and project-rule support","surfaces: benchmark-tier harness map (hooks/MCP/skills wire status)","doctor --fix refreshes repo-local agent surfaces when run inside a project",'Use this to audit claims like "works with Codex/Gemini/OpenCode/Cursor/Grok"']},{name:"value",group:"legacy",surface:"legacy",routing:{group:"product",method:"value"},optionSchema:{},description:"Compatibility alias for `insights value`",usage:{claude:null,terminal:"prjct value [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Scores project continuity from real SQLite data","Counts durable memory, preventive guardrails, shipped work, sync metrics, and agent coverage","Designed as the paid-tier proof screen for humans and agents"]},{name:"memory-doctor",group:"legacy",surface:"legacy",routing:{group:"product",method:"memoryDoctor"},optionSchema:{},description:"Compatibility alias for `insights quality`",usage:{claude:null,terminal:"prjct memory-doctor [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Finds duplicate groups, stale inbox entries, low-signal memories, and missing types","Read-only by default; recommends exact cleanup actions","Protects recall quality across Claude, Codex, Gemini, OpenCode, and future agents"]},{name:"report",group:"legacy",surface:"legacy",routing:{group:"product",method:"report"},optionSchema:{numbers:["days"]},description:"Compatibility alias for `insights report`",usage:{claude:null,terminal:"prjct report [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Summarizes shipped features, completed tasks, active work, and carry-forward lessons","Uses real project state instead of a marketing changelog","Useful for founders, teams, and paid Cloud status emails"]},{name:"handoff",group:"legacy",surface:"legacy",routing:{group:"product",method:"handoff"},optionSchema:{},description:'Static continuation brief for another agent. For realtime ownership transfer use `prjct switch <agent> --reason "\u2026"` + `prjct accept`.',usage:{claude:null,terminal:"prjct handoff codex [--md]"},params:"[agent]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Gives the next agent the active task, required prjct checks, and high-value memories","Works across Codex, Claude, Gemini, Cursor, OpenCode, Qwen, Kimi, Grok, and unknown future agents","For stuck same-branch rescue with ownership transfer: prjct switch / accept (not this alias)"]},{name:"guardrails",group:"legacy",surface:"legacy",routing:{group:"product",method:"guardrails"},optionSchema:{},description:"Compatibility alias for `insights guardrails`",usage:{claude:null,terminal:"prjct guardrails [--md]"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Checks changed files against preventive memory","Falls back to general project traps when no file-specific hit exists","Advisory only; no gate, no mutation"]},{name:"insights",group:"optional",surface:"ai-agile",routing:{group:"product",method:"insights"},optionSchema:{numbers:["days"]},description:"Harness intelligence: value, quality, reliability, token cost, reports, continuation, and guardrails",usage:{claude:"p. insights [value|quality|reliability|cost|report|continue|guardrails]",terminal:"prjct insights [value|quality|reliability|cost|report|continue|guardrails] [--md]"},params:"[value|quality|reliability|cost|report|continue|guardrails] [agent|days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["v3 surface for project intelligence formerly spread across value/report/handoff/memory-doctor/guardrails","Default view summarizes whether the project is compounding","reliability/trust shows whether value, cost, and performance metrics are decision-ready","cost/spend/tokens shows subscription burn, token coverage, context reuse, and capture gaps","Subcommands remain read-only except where underlying compatibility commands already mutate nothing"]},{name:"performance",group:"optional",surface:"ai-agile",routing:{group:"product",method:"performance"},optionSchema:{numbers:["days"]},description:"Measure dev+LLM efficiency per work cycle: time, tokens, model/runtime, tools, friction",usage:{claude:"p. performance [7]",terminal:"prjct performance [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Uses real task/session rows and available token columns","Stores unknown when a runtime does not expose exact model/token data","Designed to guide the next work cycle, not to create scrum velocity reports"]},{name:"perf",group:"optional",surface:"ai-agile",routing:{group:"product",method:"perf"},optionSchema:{numbers:["days"]},description:"Report p50/p95 latency for commands and hooks from local telemetry",usage:{claude:"p. perf [7]",terminal:"prjct perf [days] [--md]"},params:"[days]",implemented:!0,hasTemplate:!1,requiresProject:!0,isOptional:!0,features:["Reads existing command_duration samples from SQLite","Groups hook samples under hook:<subcommand>","Reports p50, p95, average, min, max, and sample count"]},{name:"cloud",group:"setup",surface:"support",routing:{group:"cloud",method:"cloud"},optionSchema:{},description:"Cloud sync (paid): connect/disconnect projects, sync/pull, pause/resume, list, status",usage:{claude:"p. cloud [link|unlink|projects|sync|pull|pause|resume|status] [--all|--interactive|--yes]",terminal:"prjct cloud [sub] [--all|--interactive|--yes]"},params:"[link|unlink|projects|sync|pull|pause|resume|status] [--all|--interactive|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Local-first: nothing leaves until `prjct connect` / `prjct cloud link`","One project (cwd), one-by-one (--interactive), or all (--all --yes)","Disconnect is soft \u2014 cloud history kept; local vault untouched","Auto-syncs on `prjct ship` and at session end once connected"]},{name:"connect",group:"setup",surface:"support",routing:{group:"cloud",method:"connect"},optionSchema:{},description:"Connect this project to Cloud Sync (alias of `prjct cloud link`)",usage:{claude:"p. connect [--all|--interactive|--yes]",terminal:"prjct connect [--all|--interactive|--yes]"},params:"[--all|--interactive|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["cwd: connect one repo after `prjct login`","--all --yes: bulk connect (confirm with human first)","--interactive: one-by-one Y/n (TTY)"]},{name:"disconnect",group:"setup",surface:"support",routing:{group:"cloud",method:"disconnect"},optionSchema:{},description:"Disconnect this project from Cloud Sync (alias of `prjct cloud unlink`)",usage:{claude:"p. disconnect [--all|--yes]",terminal:"prjct disconnect [--all|--yes]"},params:"[--all|--yes]",implemented:!0,hasTemplate:!1,requiresProject:!1,isOptional:!0,features:["Soft disconnect \u2014 leaves Cloud list; records kept; local vault untouched","Re-connect with `prjct connect`","--all --yes: bulk disconnect after human confirm"]},{name:"workflow",group:"optional",surface:"support",routing:{group:"workflow",method:"workflow"},optionSchema:{},description:"Configure workflow hooks via natural language",usage:{claude:'p. workflow ["config"]',terminal:'prjct workflow ["config"]'},params:'["natural language config"]',implemented:!0,hasTemplate:!0,requiresProject:!0,isOptional:!0,requiresLlm:!0,features:["Natural language configuration","Before/after hooks for task, done, ship, sync","Permanent, session, or one-time preferences"]},{name:"start",group:"setup",surface:"support",routing:{group:"setup",method:"start"},routingMode:"bin-only",description:"First-time setup (install commands to editors)",usage:{claude:null,terminal:"prjct start"},implemented:!0,hasTemplate:!1,requiresProject:!1},{name:"setup",group:"setup",surface:"support",routing:{group:"setup",method:"setup"},routingMode:"bin-only",description:"Reconfigure editor installations and user-owned defaults",usage:{claude:"p. setup",terminal:"prjct setup"},params:"[--force]",implemented:!0,hasTemplate:!0,requiresProject:!1},{name:"login",group:"setup",surface:"support",routing:{group:"setup",method:"login"},description:"Authenticate with prjct cloud (opens browser)",usage:{claude:null,terminal:"prjct login"},params:"",implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"logout",group:"setup",surface:"support",routing:{group:"setup",method:"logout"},description:"Sign out from prjct cloud",usage:{claude:null,terminal:"prjct logout"},implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"auth",group:"setup",surface:"support",routing:{group:"setup",method:"auth"},description:"Manage cloud authentication",usage:{claude:"p. auth [action]",terminal:"prjct auth [action]"},params:"[logout|status]",implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"},{name:"context",group:"setup",surface:"support",routing:{group:"context",method:"context"},routingMode:"bin-only",optionSchema:{},description:"Smart context filtering tools for AI agents",usage:{claude:null,terminal:"prjct context <tool> [args]"},params:"<tool> [args]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["memory|learnings [topic] \u2014 recall project memory (BM25 + semantic + recall)","tiers \u2014 context cache tiers L0\u2013L3 contract + live L0 budget","project \u2014 verified per-project facts preview (stack + real commands)","artifacts \u2014 safe artifact repo (judgment, ships, handoffs, checkpoints)","skills \u2014 refreshed skill catalog index","--md prints the tool markdown rendering; --json forces the JSON envelope"]},{name:"search",group:"core",surface:"ai-agile",routing:{group:"context",method:"search"},optionSchema:{booleans:["global"]},description:"Search project memory (decisions, learnings, gotchas, ships\u2026) \u2014 BM25 + semantic + recall",usage:{claude:'p. search "<query>"',terminal:'prjct search "<query>" [--md]'},params:"<query>",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Blended retrieval: FTS5 BM25 + opt-in semantic + recency recall","Reranks by proven usefulness, expands one hop of the memory graph","`prjct search mem_1234` resolves a specific entry by id"]},{name:"update",group:"setup",surface:"support",routing:{group:"update",method:"update"},routingMode:"bin-only",description:"Update prjct system-wide: package + migrations + daemon restart",usage:{claude:null,terminal:"prjct update [--dry-run]"},params:"[--dry-run]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Phase 1: npm update (migrates homebrew \u2192 npm if needed)","Phase 2: All projects \u2014 migrate, sweep, reinstall commands","Phase 3: Daemon stop + restart with new code","--dry-run to preview without changes"]},{name:"uninstall",group:"setup",surface:"support",routing:{group:"uninstall",method:"uninstall"},routingMode:"bin-only",description:"Complete system removal of prjct",usage:{claude:null,terminal:"prjct uninstall"},params:"[--force|-f] [--backup|-b] [--dry-run|-n] [--keep-package]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Removes ~/.prjct-cli/ data","Cleans CLAUDE.md prjct section","Uninstalls Homebrew/npm packages","Backup option before deletion"]},{name:"team",group:"setup",surface:"support",routing:{group:"team",method:"team"},optionSchema:{booleans:["required","enforce"],strings:["minVersion"]},description:"Enroll this repo in prjct team mode \u2014 commits .prjct/team.json + .claude/CLAUDE.md so teammates pick up shared expectations",usage:{claude:"p. team",terminal:"prjct team [--required] [--min-version <semver>]"},params:"[--required] [--min-version <semver>]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Writes .prjct/team.json with required/minVersion config","Adds prjct context block to .claude/CLAUDE.md (per-project)","Stages both files for the next commit (does NOT commit)","Teammates clone repo + install prjct \u2192 ready to go"]},{name:"embeddings",group:"setup",surface:"support",routing:{group:"embeddings",method:"embeddings"},optionSchema:{strings:["key","model","baseUrl","authHeader","authScheme","headers","query"]},description:"Configure the GLOBAL semantic-embeddings provider (BYOT) \u2014 one API key, stored securely, used by every project.",usage:{claude:"p. embeddings status",terminal:'prjct embeddings <set|status|test|clear> [--key <K>] [--model <M>] [--base-url <U>] [--auth-header <H>] [--auth-scheme <S|none>] [--headers "k=v,..."] [--query <qs>]'},params:"[set|status|test|clear]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["BYOT: bring your own embedding API key \u2014 ANY OpenAI-compatible provider","Zero-config: paste just --key, the base URL is auto-detected from its prefix","OpenAI, OpenRouter, Ollama, Together, Mistral, Voyage, Jina, LM Studio\u2026",'Non-Bearer providers too: --auth-header api-key --auth-scheme none --query "api-version=..." (Azure OpenAI)',"Key stored in the macOS Keychain (else a 0600 file), never in config","Global \u2014 applies to all projects; per-project config still overrides","Without a key, recall uses the always-on local subword embedder","Validate with: prjct embeddings test"]},{name:"llm",group:"setup",surface:"support",routing:{group:"llm",method:"llm"},optionSchema:{strings:["name","key","model","baseUrl","wire","provider","authHeader","authScheme"],booleans:["weak","all"]},description:"OPT-IN (default OFF): machine-local LLM brain profiles for a future owned agent loop. Does not change guest mode. enable|disable|set|use|status|test|clear.",usage:{claude:"p. llm status",terminal:"prjct llm <enable|disable|set|use|status|test|clear> [--name <n>] [--key <K>] [--model <M>] [--base-url <U>] [--wire openai-compatible|anthropic] [--weak] [--all]"},params:"[enable|disable|set|use|status|test|clear]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Default OFF \u2014 zero impact on guest harnesses until prjct llm enable (or PRJCT_OWNED_LLM=1)","Does not alter embeddings setup gate or existing verbs","Multi-profile brains: Anthropic / OpenAI / xAI / OpenRouter / Ollama / LM Studio","Partial set merges; clear <name> or clear --all (keys wiped, no orphans)","Honest probe + HTTP timeouts","Pairs with prjct agent (print mode) when enabled"]},{name:"agent",group:"setup",surface:"support",routing:{group:"agent",method:"run"},optionSchema:{numbers:["maxSteps"],booleans:["quiet","noWork"]},description:"OPT-IN owned print-mode agent (one-shot). Requires prjct llm enable + brain. Starts a work cycle by default (risks + file map injected). Tools: FS + prjct_search/guard/remember/work. Guest unchanged.",usage:{claude:null,terminal:'prjct agent "<intent>" [--max-steps N] [--no-work] [--quiet] [--md]'},params:'"<intent>"',implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Blocked unless prjct llm enable (or PRJCT_OWNED_LLM=1) and a brain profile is set","Binds to prjct work cycle (startTask) unless --no-work; attaches if one is already open","Print/one-shot only \u2014 no interactive TUI yet","Tools scoped to project root; secret-like paths denied","Does not replace Claude Code / Grok / Codex guest mode"]},{name:"log",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"log"},optionSchema:{strings:["task"]},params:"<note>",description:'Append-only implementation journal on the active work cycle \u2014 "what did the last agent try", the cheapest session-to-session continuity. Surfaced in prjct brief and prime.',usage:{claude:'p. log "tried X, blocked on Y"',terminal:'prjct log "<note>" [--task id]'}},{name:"brief",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"brief"},optionSchema:{},description:"COMPILED context artifact for a task: orchestration directive + journal + related memory + recently-landed conventions + graph position. Persisted, regenerable \u2014 retrieval as a build step.",usage:{claude:"p. brief",terminal:"prjct brief [task-id] [--md]"}},{name:"replan",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"replan"},optionSchema:{},params:"<what-changed>",description:"Cascading drift repair: captures the pivot as a decision memory FIRST, then serves a re-plan directive over the open frontier so downstream items get re-evaluated against reality.",usage:{claude:'p. replan "auth moved to JWT"',terminal:'prjct replan "<what changed>"'}},{name:"plan",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"plan"},optionSchema:{},params:'["title"] | show | write "<md>" | approve | clear',description:"Plan-mode ceremony (read-only until approve): SQLite-backed plan with Context/Approach/Files/Reuse/Verification. Host must not edit source while status is draft.",usage:{claude:'p. plan "Add auth"',terminal:'prjct plan ["title"] | show | write "..." | approve | clear [--md]'},features:["Grok Build plan-mode pattern at the harness layer (no TUI ownership)","draft \u2192 write \u2192 approve; approve persists a decision memory","Single SoT in kv_store work-plan:active"]},{name:"prime",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"prime"},optionSchema:{},description:"Session-open bundle in ONE pull: active cycle + its last journal entries + ready frontier + pull-pointers. The named start-of-session ceremony.",usage:{claude:"p. prime",terminal:"prjct prime [--md]"}},{name:"land",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"land"},optionSchema:{},description:'Session-close checklist ("land the plane"): open cycle, claimed-but-unfinished items, pending sync, hand-off reminder \u2014 everything that must not die with the context.',usage:{claude:"p. land",terminal:"prjct land [--md]"}},{name:"dream",group:"ceremonies",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"ceremonies",method:"dream"},optionSchema:{booleans:["force","dryRun","md"],numbers:["minHours","minSessions"]},description:"Memory auto-dream: consolidate vault (triage inbox + Rho retention) and rebuild the L0 memory index \u2014 Claude Code KAIROS pattern, deterministic (no model call).",usage:{claude:"p. dream --force",terminal:"prjct dream [--force] [--dry-run] [--min-hours=24] [--min-sessions=5] [--md]"},params:"[--force] [--dry-run]",features:["Gates: \u226524h since last dream AND \u22655 lands (session counter) \u2014 bypass with --force","Phases: orient \u2192 gather \u2192 consolidate (triageInbox + applyRetention) \u2192 prune (L0 index)","Land auto-runs when gates open; dry-run previews without writes"]},{name:"ready",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"ready"},optionSchema:{},description:'The ready frontier: open backlog items with zero unresolved blocking dependencies \u2014 "what can I work on NOW" as a structural query, ranked by how much each item unblocks.',usage:{claude:"p. ready",terminal:"prjct ready [--md]"}},{name:"next",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"next"},optionSchema:{},description:'Deterministic "what now": top unclaimed item of the ready frontier, served WITH its orchestration directive (model tier, effort, ceremony, fan-out, points).',usage:{claude:"p. next",terminal:"prjct next [--md]"}},{name:"claim",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"claim"},optionSchema:{strings:["as"]},params:"<id>",description:"Race-free claim of a backlog item for multi-agent fan-out: succeeds only if unclaimed (atomic check-and-set).",usage:{claude:"p. claim <id>",terminal:"prjct claim <id> [--as name]"}},{name:"depend",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"depend"},optionSchema:{strings:["on","type"]},params:"<id>",description:"Add a typed dependency edge between work items: blocks | parent | related | discovered-from. Blocking edges are cycle-checked.",usage:{claude:"p. depend <id> --on <id>",terminal:"prjct depend <id> --on <id> [--type blocks|parent|related|discovered-from]"}},{name:"phases",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"phases"},optionSchema:{},description:"Topological execution phases over the dependency graph: items in the same phase are parallelizable \u2014 a data-driven fan-out plan with per-item orchestration.",usage:{claude:"p. phases",terminal:"prjct phases [--md]"}},{name:"expand",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"expand"},optionSchema:{},params:"<id>",description:"Decomposition loop: read the persisted complexity record + expansion directive for an item, or persist the agent's decomposition as subtasks with parent edges.",usage:{claude:"p. expand <id>",terminal:'prjct expand <id> ["subtask 1" "subtask 2" ...]'}},{name:"switch",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"switch"},optionSchema:{booleans:["launch"],strings:["reason"]},params:"<agent>",description:"Yield the active work cycle to another agent runtime (codex/claude/grok/\u2026) with who started + why \u2014 realtime handoff for stuck multi-terminal work.",usage:{claude:'p. switch codex --reason "\u2026"',terminal:'prjct switch <agent> [--reason "\u2026"] [--launch]'}},{name:"accept",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"accept"},optionSchema:{},params:"[hand_id]",description:"Accept a pending multi-agent handoff: rebind ownership of the live cycle and print the resume brief (who/why/task id).",usage:{claude:"p. accept [hand_id]",terminal:"prjct accept [hand_id] [--md]"}},{name:"handoffs",group:"workGraph",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"workGraph",method:"handoffs"},optionSchema:{},description:"List pending and recent multi-agent handoffs for this project.",usage:{claude:"p. handoffs",terminal:"prjct handoffs [--md]"}},{name:"changelog",group:"changelog",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"changelog",method:"changelog"},optionSchema:{},description:"Release notes from the typed delivery record: what shipped (by version) + completed work cycles in the window. Zero LLM \u2014 pure data-plane render.",usage:{claude:"p. changelog 14",terminal:"prjct changelog [days]"}},{name:"workflows",group:"workflowsReference",surface:"ai-agile",requiresProject:!1,implemented:!0,hasTemplate:!1,routing:{group:"workflowsReference",method:"workflows"},optionSchema:{},description:"Print the quality methodology reference (subagent dispatch, model policy, review/judgment/security workflows) \u2014 the rig-agnostic pull of what Claude reads as workflows.md.",usage:{claude:"p. workflows",terminal:"prjct workflows --md"}},{name:"memory",group:"memoryExport",surface:"ai-agile",requiresProject:!0,implemented:!0,hasTemplate:!1,routing:{group:"memoryExport",method:"memory"},optionSchema:{booleans:["force","dryRun","md"],strings:["reason"]},description:"Memory surface: export|import (git-shareable), index (L0 TOC), close|forget (lifecycle), dream (auto-consolidation).",usage:{claude:"p. memory index",terminal:"prjct memory export|import|index|close <id>|forget <id>|dream [--force] [--dry-run]"},features:["export/import \u2014 git-shareable JSONL under .prjct/memory-export/","index \u2014 rebuild/show L0 compact memory TOC (SessionStart injects it)","close/forget \u2014 lifecycle aliases of top-level verbs","dream \u2014 auto-consolidation + L0 rebuild"]},{name:"guard",group:"core",surface:"ai-agile",routing:{group:"guard",method:"guard"},optionSchema:{numbers:["limit"],strings:["diff"],booleans:["strict"]},description:"Surface preventive memory (gotchas, anti-patterns, recurring-bugs) recorded against a file BEFORE you edit it \u2014 anticipation, provider-agnostic.",usage:{claude:"p. guard <file>",terminal:"prjct guard <file> | prjct guard --diff <range> [--strict]"},params:"[file]",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Pillar 3 (anticipation): see the trap before you step in it","Pull, not push \u2014 also exposed as the prjct_guard MCP tool for Claude + Codex","Strict: only gotchas / anti-patterns / recurring-bugs \u2014 never plain decisions, so no noise",'Quiet by design: "clear to edit" when nothing preventive matches',"Matches absolute or repo-relative paths by exact / suffix / basename"]},{name:"config",group:"setup",surface:"support",routing:{group:"config",method:"config"},optionSchema:{},description:"Read/write global prjct config \u2014 auto-update opt-in, suggestions toggle, etc.",usage:{claude:"p. config list",terminal:"prjct config <list|get|set|unset> [key] [value]"},params:"<list|get|set|unset> [key] [value]",implemented:!0,hasTemplate:!1,requiresProject:!1,features:["Stored at ~/.prjct-cli/config/global.json","Opt into silent auto-update: prjct config set auto-update on","Toggle proactive suggestions: prjct config set suggestions off","Booleans accept on/off/true/false; numbers parsed automatically"]},{name:"spec",group:"legacy",surface:"legacy",routing:{group:"spec",method:"draft"},routingMode:"cold-only",description:"Compatibility alias for `intent` \u2014 Goal/Acceptance/Scope/Risks before work starts.",usage:{claude:null,terminal:'prjct spec "<title>" [--goal "..."] [--tags k:v,...]'},params:'"<title>" [--goal] [--tags]',implemented:!0,hasTemplate:!1,requiresProject:!0,features:['Drafting: `prjct spec "<title>"` IS the create action \u2014 there is no `draft` subverb (aliases `draft`/`new`/`create` are tolerated and stripped)',"Persists in `specs` SQLite table + memory event stream","Sub-verbs: list, show, update, apply-delta, validate, set-status, record-review, link-task, ship, audit, inventory"]},{name:"audit-spec",group:"legacy",surface:"legacy",routing:{group:"spec",method:"audit"},routingMode:"cold-only",description:"Compatibility alias for `intent audit <id>`",usage:{claude:null,terminal:"prjct audit-spec <id>"},params:"<spec-id>",implemented:!0,hasTemplate:!1,requiresProject:!0,features:["Emits dispatch prompt \u2014 Claude runs three Agent calls in parallel","Each reviewer writes back via `prjct spec record-review`","All three pass \u2192 spec auto-promotes draft \u2192 reviewed"]},...[["daemon","Run the prjct daemon in the foreground",void 0,"start [--foreground|-f] | stop | restart | status | logs [--follow|-f] [--lines=N|-n N]"],["stop","Stop the running prjct daemon",void 0,"[--force|-f]"],["restart","Restart the prjct daemon"],["upgrade","Alias of `prjct update`",{group:"update",method:"update"}],["hook","Run a Claude Code hook event (internal; called by the hook scripts)"],["hooks","Inspect or reinstall the Claude Code hooks",void 0,"install | uninstall | status"],["claude","Claude Code integration management (install/uninstall)"],["crew","Run a crew (multi-subagent) workflow"],["harness","Harness scorecard, instruction observability/disposition, and Body/rig adoption (score \xB7 instructions \xB7 learn-from \xB7 list \xB7 use)"],["doctor","Diagnose the local prjct installation",void 0,"[--fix|--heal]"],["watch","Watch project files and react to changes",void 0,"[--verbose|-v] [--debounce=<ms>] [--interval=<sec>]"],["version","Print the installed prjct version + provider status"],["prefs","Inspect or set workflow preferences"],["retro","Summarize what shipped over a time window",void 0,"[window] \u2014 24h, 7d, \u2026"],["health","Codebase health snapshot"],["skill-adherence","Report how well sessions follow the prjct skill"],["review-risk","Risk-ranked review hints for the working tree"],["context-save","Save the current working context for later restore"],["context-restore","Restore a previously saved working context"]].map(([e,t,s,r])=>({name:e,group:"setup",description:t,routing:s,usage:{claude:null,terminal:`prjct ${e}`},...r?{params:r}:{},...a[e]?{surface:a[e]}:{},implemented:!0,hasTemplate:!1,requiresProject:!1,routingMode:"bin-only"}))],i={"-h":"help","--help":"help","-v":"version","--version":"version"},l=new Set([...o.filter(e=>e.routingMode==="bin-only").map(e=>e.name),...Object.entries(i).filter(([,e])=>o.some(t=>t.name===e&&t.routingMode==="bin-only")).map(([e])=>e)]);export{n as a,o as b,l as c};
@@ -0,0 +1,17 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as W}from"./chunk-BSR3XUBD.mjs";import{a as J}from"./chunk-MCY7OXED.mjs";import{i as _}from"./chunk-YQ6HM3YO.mjs";import{a as O,b as U}from"./chunk-2VXPFULA.mjs";import{i as R}from"./chunk-CXKDKMYE.mjs";import{a as K}from"./chunk-XLAGA5B7.mjs";import{a as z}from"./chunk-45LKWJ5D.mjs";import{a as G}from"./chunk-KI4OY3UQ.mjs";import{d as B}from"./chunk-TILUQF6L.mjs";import{c as P}from"./chunk-F2FKQUYE.mjs";import{g as E,h as I}from"./chunk-BUD3R6LF.mjs";import{b as k}from"./chunk-B2HY22OD.mjs";import{b as j}from"./chunk-XSZOHNL4.mjs";import{d as N}from"./chunk-WTDUJB4I.mjs";import{f as L,i as st}from"./chunk-DMO3ZFUG.mjs";import{e as v,p as tt}from"./chunk-D62TAZG6.mjs";import{d as x,g as nt}from"./chunk-XWLTEAGN.mjs";import{e as F,g as et}from"./chunk-225DWS4D.mjs";import{a as m}from"./chunk-3TRXQAU4.mjs";import T from"node:fs/promises";import Z from"node:path";st();et();tt();var it={commitThreshold:10,dayThreshold:3,significantFiles:["package.json","tsconfig.json","Cargo.toml","go.mod","requirements.txt","pyproject.toml",".env.example","docker-compose.yml","Dockerfile"]},M=class{static{m(this,"StalenessChecker")}projectPath;config;constructor(e,t={}){this.projectPath=e,this.config={...it,...t}}async check(e){let t={isStale:!1,reason:null,lastSyncCommit:null,currentCommit:null,commitsSinceSync:0,daysSinceSync:0,changedFiles:[],significantChanges:[]};try{let n=(()=>{try{return L.getDoc(e,"project")}catch{return null}})();if(!n)return t.isStale=!0,t.reason="No sync history found. Run `prjct sync` to initialize.",t;t.lastSyncCommit=n.lastSyncCommit||null;let s=n.lastSync;if(!t.lastSyncCommit)return t.isStale=!0,t.reason="No sync commit recorded. Run `prjct sync` to track.",t;let a={cwd:this.projectPath,timeoutMs:3e3,maxBuffer:1024*256},c=`${t.lastSyncCommit}..HEAD`,[r,l]=await Promise.all([v(["rev-parse","--short","HEAD"],a),v(["rev-list","--count",c],a)]);if(!r.ok)return t.reason=r.kind==="exit"?"Not a git repository":`git ${r.kind} \u2014 staleness unknown`,t;if(t.currentCommit=r.stdout.trim(),t.lastSyncCommit===t.currentCommit)return t.reason="Context is up to date",t;if(!l.ok)return l.kind==="exit"?(t.isStale=!0,t.reason="Sync commit no longer exists (history changed). Run `prjct sync`."):t.reason=`git ${l.kind} reading history \u2014 staleness unknown. Retry shortly.`,t;if(t.commitsSinceSync=parseInt(l.stdout.trim(),10)||0,s){let g=new Date(s),h=new Date;t.daysSinceSync=Math.floor((h.getTime()-g.getTime())/(1e3*60*60*24))}if(t.commitsSinceSync>0&&t.commitsSinceSync<this.config.commitThreshold){let g=await v(["diff","--name-only",c],a),h=g.ok?g.stdout.trim().split(`
8
+ `).filter(Boolean).slice(0,200):[];t.changedFiles=h,t.significantChanges=h.filter(f=>this.config.significantFiles.some(p=>f.endsWith(p)||f.includes(p)))}else t.changedFiles=[],t.significantChanges=[];return t.commitsSinceSync>=this.config.commitThreshold?(t.isStale=!0,t.reason=`${t.commitsSinceSync} commits since last sync (threshold: ${this.config.commitThreshold})`):t.daysSinceSync>=this.config.dayThreshold?(t.isStale=!0,t.reason=`${t.daysSinceSync} days since last sync (threshold: ${this.config.dayThreshold})`):t.significantChanges.length>0?(t.isStale=!0,t.reason=`Significant files changed: ${t.significantChanges.join(", ")}`):t.commitsSinceSync>0?t.reason=`${t.commitsSinceSync} commits since sync (threshold: ${this.config.commitThreshold})`:t.reason="Context is up to date",t}catch(n){return t.reason=`Error checking staleness: ${F(n)}`,t}}formatStatus(e){let t=[];e.isStale?t.push("CLAUDE.md status: \u26A0\uFE0F STALE"):t.push("CLAUDE.md status: \u2713 Fresh");let n=[];if(e.lastSyncCommit&&n.push(`Last sync: ${e.lastSyncCommit}`),e.currentCommit&&n.push(`Current: ${e.currentCommit}`),e.commitsSinceSync>0&&n.push(`Commits since: ${e.commitsSinceSync}`),e.daysSinceSync>0&&n.push(`Days since: ${e.daysSinceSync}`),e.changedFiles.length>0&&n.push(`Files changed: ${e.changedFiles.length}`),n.length>0&&t.push(...q(n)),e.significantChanges.length>0){t.push(""),t.push("Significant changes:");for(let s of e.significantChanges.slice(0,5))t.push(` \u2022 ${s}`);e.significantChanges.length>5&&t.push(` ... and ${e.significantChanges.length-5} more`)}return e.reason&&(t.push(""),t.push(e.reason)),e.isStale&&(t.push(""),t.push("Run `prjct sync` to update context")),t.join(`
9
+ `)}async getSessionInfo(e){return z.getInfo(e)}formatSessionInfo(e){let t=[];if(!e.active)return t.push("Session: \u25CB No active session"),t.join(`
10
+ `);t.push(`Session: \u25B6 Active (${e.duration})`);let n=[];if(e.commandCount>0){let s=new Set,o=[];for(let a of e.commands)s.has(a)||(s.add(a),o.push(a));n.push(`Commands: ${o.join(" \u2192 ")} (${e.commandCount} total)`)}return(e.filesRead>0||e.filesWritten>0)&&n.push(`Files: ${e.filesRead} read, ${e.filesWritten} written`),n.push(`Idle: ${e.expiresIn} until timeout`),n.length>0&&t.push(...q(n)),t.join(`
11
+ `)}getWarning(e){return e.isStale?e.commitsSinceSync>0?`\u26A0\uFE0F Context stale (${e.commitsSinceSync} commits behind). Run \`prjct sync\``:e.daysSinceSync>0?`\u26A0\uFE0F Context stale (${e.daysSinceSync} days old). Run \`prjct sync\``:"\u26A0\uFE0F Context may be stale. Run `prjct sync`":null}};function q(i){let e=Math.max(...i.map(n=>n.length)),t="\u2500".repeat(e+2);return[`\u250C${t}\u2510`,...i.map(n=>`\u2502 ${n.padEnd(e)} \u2502`),`\u2514${t}\u2518`]}m(q,"boxLines");var V=m((i,e)=>new M(i,e),"createStalenessChecker");nt();var rt=1600,b=3,ot=4,H={minTeaser:24,maxTeaser:90};async function ct(i,e,t={}){let n=e??await j.readConfig(i);if(!n?.projectId)return null;let s=n.persona,o=t.digest?await(async()=>{try{let{memoryL0IndexForSession:d}=await import("./memory-index-7NIU34EI.mjs");return d(n.projectId,{rebuildIfStale:!0})||X(n.projectId)}catch{return X(n.projectId)}})():null,a=at(i,n.projectId),c=import("./vault-retire-notice-FDRT7BJG.mjs").then(({vaultRetirementNotice:d})=>d(n,n.projectId)),r=(async()=>{try{let{buildLandCue:d}=await import("./land-cue-3BUD3KJJ.mjs");return await d(n.projectId,i,n)}catch{return null}})(),l=(async()=>{try{let{effectiveWeakModelMode:d,weakModelBanner:S}=await import("./weak-model-mode-LOAPFJPQ.mjs");return d(n)==="on"?S():null}catch{return null}})(),C=t.digest?(async()=>{try{let{formatPendingHandoffCue:d}=await import("./agent-switch-4SE6GF7R.mjs"),S=d(n.projectId);return S?`# prjct: pending handoff
12
+ ${S}`:null}catch{return null}})():Promise.resolve(null),g=t.digest?(async()=>{try{let{loadSessionContinuity:d,formatContinuitySessionCue:S}=await import("./session-continuity-OQDB5UYI.mjs");return S(d(n.projectId))}catch{return null}})():Promise.resolve(null),h=mt(i,n.projectId),[f,p,y,w,$,A,D]=await Promise.all([a,c,r,l,C,g,h]);if(!D&&!s&&!o&&!f&&!p&&!y&&!w&&!$&&!A)return null;let u=["# prjct: project context",""];return D&&u.push(D,""),s&&u.push(ut(s),"","> Exposed as state, not prescription. Decide whether any of this matters for the current turn."),o&&(s&&u.push(""),u.push(o)),f&&((s||o)&&u.push(""),u.push(f)),p&&((s||o||f)&&u.push(""),u.push(p)),y&&((s||o||f||p)&&u.push(""),u.push(y)),w&&((s||o||f||p||y)&&u.push(""),u.push(w)),$&&((s||o||f||p||y||w)&&u.push(""),u.push($)),A&&((s||o||f||p||y||w||$)&&u.push(""),u.push(A)),u.join(`
13
+ `)}m(ct,"buildSessionContext");async function at(i,e){try{let t=V(i),n=await t.check(e);if(!n.isStale||n.commitsSinceSync<=0)return null;let s=t.getWarning(n);if(!s)return null;try{let a=await import("node:path"),c=await import("node:os"),{maybeDetachDriftRefresh:r,readDriftStamp:l,formatDriftNotice:C,driftStaleResolved:g}=await import("./drift-refresh-XPJAO2B3.mjs"),h=process.env.PRJCT_CLI_HOME?a.resolve(process.env.PRJCT_CLI_HOME):a.join(c.homedir(),".prjct-cli"),f=l(h);if(g(f))return C({warning:s,commitsSinceSync:n.commitsSinceSync,stamp:f,refreshScheduled:!1});let p=r({projectPath:i,cliHome:h,commitsSinceSync:n.commitsSinceSync}),y=l(h);return C({warning:s,commitsSinceSync:n.commitsSinceSync,stamp:y,refreshScheduled:p})}catch{}let o=await(async()=>{try{let{hasSymbolIndex:a,loadMeta:c}=await import("./symbol-graph-PCS43SHZ.mjs");if(!a(e))return" Code graph empty \u2014 `prjct code reindex` (or `prjct sync`) before trace/impact.";if(n.commitsSinceSync<5)return"";let r=c(e);return` Symbol index may lag${r?.builtAt?` (index ${r.builtAt.slice(0,10)})`:""} \u2014 prefer \`prjct code reindex\` after big pulls.`}catch{return""}})();return`**Understanding may be stale:** ${s} \u2014 run \`prjct sync\` before big calls.${o}`}catch{return null}}m(at,"buildStalenessNotice");function X(i){let e=(()=>{try{let r=P.rerank(i,k.recall(i,{types:["gotcha","anti-pattern"],limit:b*4})).slice(0,b),l=P.rerank(i,k.recall(i,{types:["decision"],limit:b*4})).slice(0,b);return{gotchas:r,decisions:l}}catch{return null}})();if(!e)return null;let{gotchas:t,decisions:n}=e,s=(()=>{try{let r=k.recall(i,{types:["feedback","improvement-signal"],limit:40,dedupeByKey:!1});return K(r,ot)}catch{return[]}})(),o=R(i,new Set([...t,...n].map(r=>r.id))),a=(()=>{try{let r=G(i);return r?B(r,{maxConventions:4,maxPatterns:3,maxAnti:2}):null}catch{return null}})();if(t.length===0&&n.length===0&&!o&&s.length===0&&!a)return null;let c=["## What this project already knows",""];if(c.push("> Carried across sessions and model updates \u2014 this survived even if your conversation context did not. Apply these; do not re-derive from source."),s.length>0){c.push("","**How this developer works (act as them):**");for(let r of s){let l=r.rule.length>140?`${r.rule.slice(0,139)}\u2026`:r.rule;c.push(`- ${l} \`${r.sourceId}\``)}}if(a){let r=a.replace(/^## How this repo works \(project style\)\n?/,"").trim();r&&c.push("","**How this repo works (match house style):**",r)}if(t.length>0){c.push("","**Traps to avoid:**");for(let r of t)c.push(`- ${I(r,H)}`)}if(n.length>0){c.push("","**Decisions in force:**");for(let r of n)c.push(`- ${I(r,H)}`)}return o&&c.push("","**Keeps being missed:**",`- ${I(o.entry,H)} \u2014 flagged relevant-but-unused ${o.count}\xD7. Apply it or supersede it.`),c.push("","> Resolve any `mem_id` with `prjct search <id>`. Full developer model: MCP `prjct_developer`. Project style: `prjct analysis` / sync evolution."),_(c.join(`
14
+ `),rt)}m(X,"buildKnowledgeDigest");var lt=500,Y=2;async function Mt(i){let e=await j.readConfig(i).catch(()=>null);if(!e?.projectId)return null;let t=["# prjct: subagent context"];e.persona?.role&&t.push(`Role in this project: ${e.persona.role}`);try{let{resolveActiveTask:n}=await import("./task-service-KFYL5NT4.mjs"),s=await n(e.projectId,i);s&&t.push(`Active work cycle (this worktree): ${s.description}`)}catch{}try{let n=P.rerank(e.projectId,k.recall(e.projectId,{types:["gotcha","anti-pattern"],limit:Y*4})).slice(0,Y);if(n.length>0){t.push("Traps to avoid:");for(let o of n)t.push(`- ${E(o)} \`${o.id}\``)}let s=R(e.projectId,new Set(n.map(o=>o.id)));s&&t.push(`Keeps being missed: ${E(s.entry)} \`${s.entry.id}\``)}catch{}return t.length<=1?null:_(t.join(`
15
+ `),lt)}m(Mt,"buildSubagentDigest");function ut(i){let e=[];return e.push(`## Your role in this project: **${i.role}**`),i.focus&&e.push(`Focus: ${i.focus}`),i.mcps&&i.mcps.length>0&&e.push(`Available MCPs this project expects: ${i.mcps.join(", ")}`),i.packs&&i.packs.length>0&&e.push(`Active packs: ${i.packs.join(", ")}`),e.join(`
16
+ `)}m(ut,"formatPersona");async function mt(i,e){try{let t=await import("node:path"),{execFileAsync:n}=await import("./exec-34V6SJYO.mjs"),s=t.basename(i),o=await(async()=>{try{let{stdout:r}=await n("git",["branch","--show-current"],{cwd:i});return r.trim()}catch{return""}})(),a=e.length>12?`${e.slice(0,8)}\u2026`:e,c=["## Project identity (cwd)",`- **${s}** \xB7 id \`${a}\``];return o&&c.push(`- Branch: \`${o}\``),c.push("- Skill is portable L0 \u2014 if skill text names another project, ignore it; trust this block + `prjct context --md`."),c.join(`
17
+ `)}catch{return null}}m(mt,"buildProjectIdentityLine");function Q(i,e,t="kimi"){let n=i.replace(/[^a-zA-Z0-9._-]/g,"_"),s=(e??`nosession-${t}`).replace(/[^a-zA-Z0-9._-]/g,"_");return Z.join(N.runDir(),`kimi-session-${n}-${s}.pending`)}m(Q,"kimiSessionStampPath");async function Ht(i,e,t="kimi"){let n=Q(i,e,t),s=await T.readFile(n,"utf-8").catch(()=>null);return s===null?null:(await T.rm(n,{force:!0}).catch(()=>{}),s.trim()==="digest"?"digest":"persona")}m(Ht,"consumeKimiSessionInjection");function Ft(i=process.cwd(),e){let t=j.readConfig(i).catch(()=>null);return J({event:"SessionStart",projectPath:i,build:m(async(n,s,o)=>{let a=s===i?await t:await j.readConfig(s).catch(()=>null),c=n.source??"startup",r=c==="startup"||c==="clear"||c==="compact";if(o==="kimi"){if(a?.projectId){let l=Q(a.projectId,n.session_id,o);await T.mkdir(Z.dirname(l),{recursive:!0}).then(()=>T.writeFile(l,r?"digest":"persona")).catch(()=>{})}return null}return ct(s,a,{digest:r})},"build"),afterEmit:m(async(n,s)=>{let o=await t;if(o?.projectId){let a=await(async()=>{try{let{collectActiveTasks:c}=await import("./task-overview-XSMK7YEN.mjs"),r=await c(o.projectId,s);return{taskId:r.current?.id??null,goal:r.current?.description??n.source??null}}catch{return{taskId:null,goal:n.source??null}}})();W({projectId:o.projectId,sessionId:n.session_id,directory:s,taskId:a.taskId,goal:a.goal})}O(x)||await U(x).catch(()=>{});try{let{maybeAutoUpdate:a}=await import("./auto-updater-PKYQRBGQ.mjs");a(x)}catch{}},"afterEmit")},e)}m(Ft,"runSessionStartHook");export{ct as a,Mt as b,mt as c,Ht as d,Ft as e};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{c as d}from"./chunk-4PPIE6GA.mjs";import{a as p}from"./chunk-5EF5EOCL.mjs";import{a as l}from"./chunk-3TRXQAU4.mjs";var k={memories:"memories",tasks:"tasks",subtasks:"subtasks",ideas:"ideas",queue_tasks:"queue_tasks",custom_workflows:"custom_workflows",workflow_rules:"workflow_rules",archives:"archives",shipped_items:"shipped_items",shipped_features:"shipped_features",metrics_daily:"metrics_daily",work_cost_snapshots:"work_cost_snapshots",velocity_sprints:"velocity_sprints",analysis:"analysis",specs:"specs",memory:"memories",memory_entry:"memories",task:"tasks",paused_task:"tasks",subtask:"subtasks",idea:"ideas",queue:"queue_tasks",queue_task:"queue_tasks",shipped:"shipped_items",feature:"roadmap_features",workflow:"custom_workflows",workflow_rule:"workflow_rules",metric:"metrics_daily",work_cost_snapshot:"work_cost_snapshots",velocity:"velocity_sprints",spec:"specs",project:"projects",session:"sessions",agent:"agents"};function y(c){if(c)return k[c]}l(y,"toCloudTable");var w={memories:"memories",tasks:"tasks",subtasks:"tasks",queue_tasks:"tasks",ideas:"ideas",shipped_items:"shipped",shipped_features:"shipped",custom_workflows:"workflows",workflow_rules:"workflows",metrics_daily:"metrics",work_cost_snapshots:"metrics",velocity_sprints:"metrics",archives:"archives",analysis:"analysis",specs:"specs"},f={memories:!0,tasks:!0,ideas:!0,shipped:!0,workflows:!0,metrics:!0,archives:!0,user_prompts:!1,agent_sessions:!1,analysis:!0,specs:!0};function T(c,e){let t=w[c];return t?{...f,...e??{}}[t]!==!1:!0}l(T,"isTableIncluded");var v=Object.keys(f);function _(c){return c.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}l(_,"camelToSnake");function R(c){let e={};for(let[t,s]of Object.entries(c))e[_(t)]=s;return e}l(R,"snakeCaseKeys");function E(c,e){let[t,s]=e.type.split("."),r=y(e.entityType)??y(t);if(!r)return null;let i=e.eventType==="delete"||s==="deleted"||s==="archived"||s==="removed"?"delete":"upsert",n=e.data||{},a=R(n),h=e.entityId||(typeof a.id=="string"?a.id:"")||(typeof n.id=="string"?n.id:"")||(typeof a.task_id=="string"?a.task_id:"")||(typeof n.taskId=="string"?n.taskId:"")||(typeof a.entity_id=="string"?a.entity_id:"")||"";h&&a.id==null&&(a.id=h);let u={event_type:i,entity_type:r,entity_id:h,data:{...a,project_id:c},project_id:c};return e.originDeviceId!==void 0&&(u.origin_device_id=e.originDeviceId),e.contentHash!==void 0&&(u.content_hash=e.contentHash),e.revisionCount!==void 0&&(u.revision_count=e.revisionCount),e.timestamp&&(u.ts=e.timestamp),u}l(E,"mapCliEventToWebFormat");function g(c,e){return e.map(t=>E(c,t)).filter(t=>t!==null)}l(g,"mapCliEventsToWebFormat");var m=class{static{l(this,"SyncClient")}retryConfig={maxRetries:3,baseDelayMs:1e3,maxDelayMs:3e4};async pushEvents(e,t){let{apiUrl:s,apiKey:r,deviceId:o}=await this.getAuthHeaders();if(!r)throw this.createError("AUTH_REQUIRED","No API key configured");let i=g(e,t),n=await this.fetchWithRetry(`${s}/sync/batch`,{method:"POST",headers:{"Content-Type":"application/json",...this.authHeaders(r,o)},body:JSON.stringify({projectId:e,events:i})});if(!n.ok)throw await this.parseErrorResponse(n);return await n.json()}async pullEvents(e,t,s){let{apiUrl:r,apiKey:o,deviceId:i}=await this.getAuthHeaders();if(!o)throw this.createError("AUTH_REQUIRED","No API key configured");let n={projectId:e};typeof t=="number"&&t>0&&(n.sinceEventId=t);let a=await this.fetchWithRetry(`${r}/sync/pull`,{method:"POST",headers:{"Content-Type":"application/json",...this.authHeaders(o,i)},body:JSON.stringify(n)});if(!a.ok)throw await this.parseErrorResponse(a);return await a.json()}async getStatus(e){let{apiUrl:t,apiKey:s,deviceId:r}=await this.getAuthHeaders();if(!s)throw this.createError("AUTH_REQUIRED","No API key configured");let o=await this.fetchWithRetry(`${t}/sync/status/${e}`,{method:"GET",headers:{...this.authHeaders(s,r)}});if(!o.ok)throw await this.parseErrorResponse(o);return await o.json()}async linkProject(e,t,s){let{apiUrl:r,apiKey:o,deviceId:i}=await this.getAuthHeaders();if(!o)throw this.createError("AUTH_REQUIRED","No API key configured");let n=await this.fetchWithRetry(`${r}/sync/link`,{method:"POST",headers:{"Content-Type":"application/json",...this.authHeaders(o,i)},body:JSON.stringify({projectId:e,...t?{name:t}:{},...s?{meta:s}:{}})});if(!n.ok)throw await this.parseErrorResponse(n);return await n.json()}async setCloudLifecycle(e,t){try{let{apiUrl:s,apiKey:r,deviceId:o}=await this.getAuthHeaders();return r?(await this.fetchWithRetry(`${s}/sync/projects/${e}/${t}`,{method:"POST",headers:{...this.authHeaders(r,o)}})).ok:!1}catch{return!1}}async uploadCodeGraph(e,t){try{let{apiUrl:s,apiKey:r,deviceId:o}=await this.getAuthHeaders();if(!r)return{ok:!1,reason:"unauthenticated"};let i=await this.fetchWithRetry(`${s}/sync/projects/${e}/code-graph`,{method:"POST",headers:{"Content-Type":"application/json",...this.authHeaders(r,o)},body:JSON.stringify(t)});if(!i.ok)return{ok:!1,reason:await(async()=>{let h=`${i.status} ${i.statusText}`;try{let u=await i.json();return typeof u.detail=="string"?u.detail:u.detail!=null?JSON.stringify(u.detail).slice(0,300):h}catch{return h}})()};let n=await i.json();return{ok:n.ok!==!1,nodes:n.nodes,links:n.links}}catch(s){return{ok:!1,reason:s instanceof Error?s.message:String(s)}}}async publishBenchmark(e,t){let{apiUrl:s,apiKey:r,deviceId:o}=await this.getAuthHeaders();if(!r)throw this.createError("AUTH_REQUIRED","No API key configured");let i=await this.fetchWithRetry(`${s}/benchmarks/evals`,{method:"POST",headers:{"Content-Type":"application/json",...this.authHeaders(r,o)},body:JSON.stringify({projectId:e,...t})});if(!i.ok)throw await this.parseErrorResponse(i);return await i.json()}async testConnection(){let e=new AbortController,t=setTimeout(()=>e.abort(),p("API_REQUEST"));try{let{apiUrl:s,apiKey:r,deviceId:o}=await this.getAuthHeaders();if(!r)return clearTimeout(t),!1;let i=await fetch(`${s}/auth/verify`,{method:"GET",headers:{...this.authHeaders(r,o)},signal:e.signal});return clearTimeout(t),i.status===401||i.status===403?(await d.clearAuth(),!1):i.ok}catch{return clearTimeout(t),!1}}async hasAuth(){return await d.hasAuth()}async getAuthHeaders(){let[e,t,s]=await Promise.all([d.getApiUrl(),d.getApiKey(),d.getDeviceId()]);return{apiUrl:e,apiKey:t,deviceId:s}}authHeaders(e,t){return{"X-Api-Key":e,"X-Device-Id":t}}async fetchWithRetry(e,t,s=0){let r=new AbortController,o=setTimeout(()=>r.abort(),p("API_REQUEST")),i=(t.method??"GET").toUpperCase(),n=i==="GET"||i==="HEAD";try{let a=await fetch(e,{...t,signal:r.signal});return clearTimeout(o),n&&a.status>=500&&s<this.retryConfig.maxRetries?this.scheduleRetry(e,t,s):a}catch(a){if(clearTimeout(o),a instanceof Error&&a.name==="AbortError")throw this.createError("NETWORK_ERROR",`Request timed out. Try increasing PRJCT_TIMEOUT_API_REQUEST (current: ${p("API_REQUEST")}ms)`);if(n&&s<this.retryConfig.maxRetries)return this.scheduleRetry(e,t,s);throw this.createError("NETWORK_ERROR",a instanceof Error?a.message:"Network request failed")}}async scheduleRetry(e,t,s){let r=Math.min(this.retryConfig.baseDelayMs*2**s,this.retryConfig.maxDelayMs);return await this.sleep(r),this.fetchWithRetry(e,t,s+1)}async parseErrorResponse(e){try{let t=await e.json(),s=t.detail||t.message||t.error||`HTTP ${e.status}`;return e.status===401||e.status===403?(await d.clearAuth(),this.createError("AUTH_REQUIRED",s,e.status)):e.status===402?this.createError("PAYMENT_REQUIRED",s,e.status):this.createError("API_ERROR",s,e.status)}catch{return e.status===401||e.status===403?(await d.clearAuth(),this.createError("AUTH_REQUIRED",`HTTP ${e.status}`,e.status)):this.createError("API_ERROR",`HTTP ${e.status}`,e.status)}}createError(e,t,s){return{code:e,message:t,status:s}}sleep(e){return new Promise(t=>setTimeout(t,e))}},b=new m,D=b;export{y as a,f as b,T as c,b as d,D as e};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as r}from"./chunk-3TRXQAU4.mjs";function l(e){let a=[{id:"detect",label:"Detect runtimes",status:e.detectedCount>0?"done":"skip",detail:e.detectedCount>0?`${e.detectedCount} host(s) on this machine`:"no agent CLIs detected (hooks still installed for Claude path)"},{id:"wire",label:"Wire hooks + MCP + skills",status:e.claudeHooksNew+e.claudeHooksPresent>0&&e.runtimesWired.length>0?"done":"partial",detail:`Claude hooks +${e.claudeHooksNew}/~${e.claudeHooksPresent}`+(e.runtimesWired.length?` \xB7 adapters: ${e.runtimesWired.join(", ")}`:" \xB7 multi-runtime: none detected")},{id:"surface",label:"Project surface",status:e.projectSurface?"done":"skip",detail:e.projectSurface?"AGENTS.md / adapters refreshed":"skipped (not inside initialized prjct project)"},{id:"board",label:"Organic multi-runtime board",status:e.detectedCount===0?"skip":e.liveCount>=Math.min(2,e.detectedCount)?"done":"partial",detail:`${e.liveCount}/${e.detectedCount} live (${e.organicPct}%)`},{id:"proof",label:"Harness \u0394 proof",status:e.deltaLine?"done":"skip",detail:e.deltaLine??"run `bun run demo:weak-vs-frontier`"}],o=e.detectedCount===0||e.liveCount>=Math.min(2,e.detectedCount),s=r(t=>t==="done"?"\u2713":t==="partial"?"\u25B3":"\xB7","mark"),n=`One-breath install: organic ${e.liveCount}/${e.detectedCount} (${e.organicPct}%) \xB7 wired [${e.runtimesWired.join(", ")||"claude"}] \xB7 ${o?"PASS":"NEEDS doctor --fix"}`,d=["# One-breath install","","Detect \u2192 wire all surfaces \u2192 organic board \u2192 proof. Zero multi-install ceremony.","","| Step | Status | Detail |","|---|:---:|---|",...a.map(t=>`| ${t.label} | ${s(t.status)} | ${t.detail} |`),"",`**${n}**`,"","_Dynasty: one install \xB7 one SQLite brain \xB7 every agent compounds. Never re-learn the OS._",""].join(`
8
+ `);return{title:"One-breath install",steps:a,line:n,md:d,organicOk:o}}r(l,"buildOneBreathReport");export{l as a};
@@ -0,0 +1,14 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as y,b as N}from"./chunk-YOGI4WE6.mjs";import{b as k}from"./chunk-XSZOHNL4.mjs";import{c as d,d as l,e as u,f,g as j}from"./chunk-2EEMQV7N.mjs";import{f as g,h as p,l as m,p as P}from"./chunk-HYIT7MF5.mjs";import{a}from"./chunk-3TRXQAU4.mjs";P();import c from"node:path";var A=[{scriptName:"typecheck",kind:"typecheck"},{scriptName:"lint",kind:"lint"},{scriptName:"test",kind:"test"},{scriptName:"build",kind:"build"},{scriptName:"dev",kind:"dev"},{scriptName:"format",kind:"format"}],R=[{file:"bun.lock",manager:"bun"},{file:"bun.lockb",manager:"bun"},{file:"pnpm-lock.yaml",manager:"pnpm"},{file:"yarn.lock",manager:"yarn"},{file:"package-lock.json",manager:"npm"}];async function w(t){for(let{file:n,manager:e}of R)if(await m(c.join(t,n)))return e;return null}a(w,"detectPackageManager");async function M(t){let n=c.join(t,"package.json");if(!await m(n))return[];let r=(await g(n,null))?.scripts??{};return A.filter(({scriptName:i})=>!!r[i]).map(({scriptName:i,kind:o})=>{let s=r[i];return{scriptName:i,command:s,kind:o,mutating:x(s)}})}a(M,"detectNodeCommands");async function _(t){return await m(c.join(t,"Cargo.toml"))?[{scriptName:"test",command:"cargo test",kind:"test",mutating:!1},{scriptName:"build",command:"cargo build",kind:"build",mutating:!1},{scriptName:"lint",command:"cargo clippy",kind:"lint",mutating:!1},{scriptName:"format",command:"cargo fmt",kind:"format",mutating:!0}]:[]}a(_,"detectCargoCommands");async function h(t){return await m(c.join(t,"go.mod"))?[{scriptName:"test",command:"go test ./...",kind:"test",mutating:!1},{scriptName:"build",command:"go build ./...",kind:"build",mutating:!1},{scriptName:"format",command:"gofmt -l .",kind:"format",mutating:!1}]:[]}a(h,"detectGoCommands");var V=[{marker:/\[tool\.pytest\b/,scriptName:"test",command:"pytest",kind:"test",mutating:!1},{marker:/\[tool\.ruff\b/,scriptName:"lint",command:"ruff check .",kind:"lint",mutating:!1},{marker:/\[tool\.black\b/,scriptName:"format",command:"black .",kind:"format",mutating:!0},{marker:/\[tool\.mypy\b/,scriptName:"typecheck",command:"mypy .",kind:"typecheck",mutating:!1}];async function T(t){let n=c.join(t,"pyproject.toml");if(!await m(n))return[];let e=await p(n,"");return V.filter(({marker:r})=>r.test(e)).map(({marker:r,...i})=>i)}a(T,"detectPythonCommands");async function C(t){let[n,e,r,i,o]=await Promise.all([M(t),_(t),h(t),T(t),w(t)]);return{packageManager:o,commands:[...n,...e,...r,...i]}}a(C,"detectVerifiedCommands");var E=/^(?:--fix|--write|--update|-w|--fix-type)$/,S=new Set(["migrate","push","publish","deploy","release","commit"]);function x(t){for(let n of y(t)){let e=N(n);if(e.some(r=>E.test(r))||e.some(r=>S.has(r.toLowerCase())))return!0}return!1}a(x,"classifyCommandMutation");j();var O=6,I=3,G=80;function K(t){let n=new Set;return t.filter(e=>n.has(e.kind)?!1:(n.add(e.kind),!0))}a(K,"dedupeByKind");function L(t,n){let e=t.replace(/\s+/g," ").trim();return e.length>n?`${e.slice(0,n-1)}\u2026`:e}a(L,"truncate");async function $(t){try{let n=await k.getProjectId(t),{getActiveProjectStyle:e}=await import("./project-style-evolution-HIMSJQQB.mjs"),r=e(n);if(!r)return null;let i=r.payload.stack,o=[i.ecosystem&&i.ecosystem!=="unknown"?i.ecosystem:null,i.languages.slice(0,I).join(", ")||null,i.frameworks.slice(0,O).join(", ")||null].filter(s=>!!s);return o.length>0?o.join(" \xB7 "):null}catch{return null}}a($,"buildStackLine");async function b(t){let[n,e]=await Promise.all([$(t),C(t)]),r=K(e.commands);if(!n&&r.length===0)return null;let i=[];n&&i.push(`- stack: ${n}`);for(let o of r){let s=o.mutating?"mutating":"read-only";i.push(`- ${o.kind}: \`${L(o.command,G)}\` (${s})`)}return i.push("- deeper: `prjct context --md` \xB7 `prjct_analysis` MCP \xB7 `prjct_relevant_files` MCP"),i.join(`
8
+ `)}a(b,"buildProjectFactsSection");async function B(t){let n=await b(t),e=[u];return n&&e.push("","## This project",n),e.join(`
9
+ `)}a(B,"buildPrjctMdBody");async function Y(t){let n=await B(t),e=`${d}
10
+ ${n}
11
+ ${l}
12
+ `;return f(t,"PRJCT.md",e)}a(Y,"writeProjectPrjctMd");async function z(t){let n=await b(t);return n?["# Project facts","",n].join(`
13
+ `):["# Project facts","","No verified facts yet \u2014 run `prjct sync` for the stack line, and make sure a recognized manifest exists (package.json / Cargo.toml / go.mod / pyproject.toml) for verified commands."].join(`
14
+ `)}a(z,"formatProjectFactsMd");export{b as a,B as b,Y as c,z as d};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{c as v}from"./chunk-HCPQZRR3.mjs";import{g as f,i as _}from"./chunk-DMO3ZFUG.mjs";import{d as M,e as I,p as A}from"./chunk-HYIT7MF5.mjs";import{a as l}from"./chunk-3TRXQAU4.mjs";import D from"node:fs/promises";import E from"node:path";_();A();var B=new Set(["the","a","an","is","are","was","were","be","been","being","have","has","had","do","does","did","will","would","could","should","may","might","shall","can","of","in","to","for","with","on","at","from","by","as","or","and","but","if","not","no","so","up","out","this","that","it","its","all","any","import","export","default","const","let","var","function","class","interface","type","return","new","true","false","null","undefined","void","async","await","static","public","private","protected","readonly","string","number","boolean","object","array"]);function h(t){return t.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/[-_./]/g," ").toLowerCase().split(/\s+/).filter(e=>e.length>1)}l(h,"splitIdentifier");function k(t,e){let n=[],o=e.replace(/\.[^.]+$/,"").split(/[/\\]/).filter(Boolean);for(let i of o)n.push(...h(i));let r=[/export\s+(?:async\s+)?function\s+(\w+)/g,/export\s+class\s+(\w+)/g,/export\s+interface\s+(\w+)/g,/export\s+type\s+(\w+)/g,/export\s+(?:const|let|var)\s+(\w+)/g,/export\s+default\s+(?:class|function)\s+(\w+)/g];for(let i of r)for(let s of t.matchAll(i))s[1]&&n.push(...h(s[1]));let a=[/(?:async\s+)?function\s+(\w+)/g,/class\s+(\w+)/g,/interface\s+(\w+)/g,/type\s+(\w+)\s*=/g];for(let i of a)for(let s of t.matchAll(i))s[1]&&n.push(...h(s[1]));let d=/(?:from|import)\s+['"]([^'"]+)['"]/g;for(let i of t.matchAll(d)){let s=i[1];if(s.startsWith(".")||s.startsWith("@/"))n.push(...h(s));else{let g=s.startsWith("@")?s.split("/").slice(0,2).join("/"):s.split("/")[0];n.push(...h(g))}}let c=/\/\/\s*(.+)/g;for(let i of t.matchAll(c)){let s=i[1].toLowerCase().split(/\s+/).filter(g=>g.length>2);n.push(...s)}let u=/\/\*\*?([\s\S]*?)\*\//g;for(let i of t.matchAll(u)){let s=i[1].replace(/@\w+/g,"").replace(/\*/g,"").toLowerCase().split(/\s+/).filter(g=>g.length>2&&/^[a-z]+$/.test(g));n.push(...s)}return n.filter(i=>i.length>1&&!B.has(i)&&/^[a-z][a-z0-9]*$/.test(i))}l(k,"tokenizeFile");function R(t){return t.split(/\s+/).flatMap(e=>h(e)).filter(e=>e.length>1&&!B.has(e)&&/^[a-z][a-z0-9]*$/.test(e))}l(R,"tokenizeQuery");function x(){return Object.create(null)}l(x,"emptyInvertedIndex");async function F(t){let e=await M(t),n={},o=x(),r=await I(e,50,async c=>{try{let u=await D.readFile(E.join(t,c),"utf-8"),i=k(u,c);return i.length>0?{filePath:c,tokens:i}:null}catch{return null}});for(let{filePath:c,tokens:u}of r){n[c]={tokens:u,length:u.length};for(let[i,s]of b(u))o[i]||(o[i]=[]),o[i].push({path:c,tf:s})}let a=r.reduce((c,u)=>c+u.tokens.length,0),d=Object.keys(n).length;return{documents:n,invertedIndex:o,avgDocLength:d>0?a/d:0,totalDocs:d,builtAt:new Date().toISOString()}}l(F,"buildIndex");function C(t,e){return Math.log((e-t+.5)/(t+.5)+1)}l(C,"idf");function N(t,e){let n=R(t);if(n.length===0)return[];let o=new Map;for(let r of n){let a=e.invertedIndex[r];if(!a)continue;let d=C(a.length,e.totalDocs);for(let{path:c,tf:u}of a){let i=e.documents[c];if(!i)continue;let s=u*(1.2+1),g=u+1.2*(1-.75+.75*(i.length/e.avgDocLength)),T=d*(s/g);o.set(c,(o.get(c)||0)+T)}}return v(o)}l(N,"score");var p="bm25-index";function b(t){let e=new Map;for(let n of t)e.set(n,(e.get(n)||0)+1);return e}l(b,"termFrequencies");function P(t,e){let n=t.documents[e];if(!n)return;delete t.documents[e];let o=new Set(n.tokens),r=o.size>0?o:new Set(Object.keys(t.invertedIndex));for(let a of r){let d=t.invertedIndex[a];if(!d)continue;let c=d.filter(u=>u.path!==e);c.length===0?delete t.invertedIndex[a]:t.invertedIndex[a]=c}}l(P,"removeDocument");function z(t,e,n){if(n.length!==0){t.documents[e]={tokens:n,length:n.length};for(let[o,r]of b(n))t.invertedIndex[o]||(t.invertedIndex[o]=[]),t.invertedIndex[o].push({path:e,tf:r})}}l(z,"addDocument");function q(t){let e=Object.values(t.documents).map(o=>o.length),n=e.reduce((o,r)=>o+r,0);t.totalDocs=e.length,t.avgDocLength=e.length>0?n/e.length:0,t.builtAt=new Date().toISOString()}l(q,"recalculateStats");var m=new Map;function y(t){return{schemaVersion:2,avgDocLength:t.avgDocLength,totalDocs:t.totalDocs,builtAt:t.builtAt,docLengths:Object.fromEntries(Object.entries(t.documents).map(([e,n])=>[e,n.length]))}}l(y,"indexMetadata");function L(t,e,n,o,r){if(o.length!==0){t.run(n,JSON.stringify(o),o.length,r);for(let[a,d]of b(o))e.run(a,n,d)}}l(L,"writeDocumentRows");function W(t,e){try{f.transaction(t,n=>{n.prepare("DELETE FROM bm25_terms").run(),n.prepare("DELETE FROM bm25_documents").run();let o=new Date().toISOString(),r=n.prepare("INSERT INTO bm25_documents (path, tokens, length, updated_at) VALUES (?, ?, ?, ?)"),a=n.prepare("INSERT INTO bm25_terms (token, path, tf) VALUES (?, ?, ?)");for(let[d,c]of Object.entries(e.documents))L(r,a,d,c.tokens,o)})}catch{}}l(W,"replacePerFileTables");function $(t,e,n,o){try{f.transaction(t,r=>{let a=r.prepare("DELETE FROM bm25_terms WHERE path = ?"),d=r.prepare("DELETE FROM bm25_documents WHERE path = ?"),c=r.prepare("INSERT INTO bm25_documents (path, tokens, length, updated_at) VALUES (?, ?, ?, ?)"),u=r.prepare("INSERT INTO bm25_terms (token, path, tf) VALUES (?, ?, ?)"),i=new Date().toISOString();for(let s of new Set([...n,...o]))a.run(s),d.run(s);for(let s of n){let g=e.documents[s];g&&L(c,u,s,g.tokens,i)}})}catch{}}l($,"updatePerFileTables");function V(t,e){f.setDoc(t,p,y(e)),W(t,e),m.delete(t)}l(V,"saveIndex");function U(t,e,n,o){f.setDoc(t,p,y(e)),$(t,e,n,o),m.delete(t)}l(U,"saveIndexUpdate");function H(t,e,n){try{let o=f.query(t,"SELECT path, length FROM bm25_documents ORDER BY path");if(o.length===0){if(n?.totalDocs===0){let s={documents:{},invertedIndex:x(),avgDocLength:0,totalDocs:0,builtAt:n.builtAt};return m.set(t,{index:s,updatedAt:e}),s}return null}let r={},a=x();for(let s of o)r[s.path]={tokens:[],length:s.length};let d=o.reduce((s,g)=>s+g.length,0),c=f.query(t,"SELECT token, path, tf FROM bm25_terms ORDER BY token, path");for(let s of c)a[s.token]||(a[s.token]=[]),a[s.token].push({path:s.path,tf:s.tf});let u=o.length,i={documents:r,invertedIndex:a,avgDocLength:u>0?d/u:0,totalDocs:u,builtAt:n?.builtAt??e};return m.set(t,{index:i,updatedAt:e}),i}catch{return null}}l(H,"loadIndexFromPerFileTables");function G(t){try{return f.get(t,"SELECT key AS k FROM kv_store WHERE key = ? LIMIT 1",p)!=null}catch{return!1}}l(G,"hasIndex");function O(t){let e=f.get(t,"SELECT updated_at FROM kv_store WHERE key = ?",p);if(!e)return m.delete(t),null;let n=m.get(t);if(n&&n.updatedAt===e.updated_at)return n.index;let o=f.getDoc(t,p),r=H(t,e.updated_at,o);if(r)return r;if(!o?.invertedIndex)return null;let a={};for(let[c,u]of Object.entries(o.docLengths))a[c]={tokens:[],length:u};let d={documents:a,invertedIndex:Object.assign(x(),o.invertedIndex),avgDocLength:o.avgDocLength,totalDocs:o.totalDocs,builtAt:o.builtAt};return m.set(t,{index:d,updatedAt:e.updated_at}),d}l(O,"loadIndex");async function Y(t,e){let n=await F(t);return V(e,n),n}l(Y,"indexProject");async function tt(t,e,n,o=[]){let r=O(e);if(!r)return Y(t,e);let a=new Set([...n,...o]);for(let c of a)P(r,c);let d=await I(n,50,async c=>{try{let u=await D.readFile(E.join(t,c),"utf-8"),i=k(u,c);return{filePath:c,tokens:i}}catch{return null}});for(let{filePath:c,tokens:u}of d)z(r,c,u);return q(r),U(e,r,n,o),r}l(tt,"updateProjectIndex");function et(t,e,n=15){let o=O(t);return o?N(e,o).slice(0,n):[]}l(et,"queryFiles");export{G as a,O as b,Y as c,tt as d,et as e};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{g as e,i as f}from"./chunk-DMO3ZFUG.mjs";import{e as i,l as w}from"./chunk-HU5ERAAV.mjs";import{b as u,f as g}from"./chunk-OE27RFLJ.mjs";import{a as c}from"./chunk-3TRXQAU4.mjs";g();w();f();import{z as n}from"zod";var r="crew:checkpoints",m="crew/CHECKPOINTS.md",h=n.object({content:n.string(),source:n.enum(["default","user","migrated"]),updated_at:n.string().min(1)});function l(){let s=u(m);if(!s)throw new Error(`Missing bundled crew checkpoints template: ${m}`);return s}c(l,"getBundledDefault");var p=class{static{c(this,"CheckpointsStorage")}get(t){let o=e.getDoc(t,r);return o===null?{content:l(),source:"default",updated_at:i()}:h.parse(o)}hasCustomization(t){return e.hasDoc(t,r)}set(t,o,d="user"){let a={content:o,source:d,updated_at:i()};return e.setDoc(t,r,a),a}reset(t){e.deleteDoc(t,r)}},C=new p,R=C;export{C as a,R as b};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{c as p}from"./chunk-LTKUTRRL.mjs";import{c as a}from"./chunk-DTMZBK4E.mjs";import{A as u,B as m,E as x}from"./chunk-HU5ERAAV.mjs";import{e as f,f as g}from"./chunk-5ZBACKED.mjs";import{b as c,c as l,d as s,e as d}from"./chunk-DW4QMD6J.mjs";import{e as r,g as y}from"./chunk-225DWS4D.mjs";import{a as i}from"./chunk-3TRXQAU4.mjs";x();y();var v=[{name:"prjct",ready:"\u2705 prjct MCP already configured",added:"\u2705 prjct MCP added to mcp.json",failed:"prjct MCP setup failed",manual:" Run `prjct start` again to retry."}];async function R(o={}){o.silent||console.log(`
8
+ \u{1F50C} Configuring MCP servers...`);try{await a.install();let e=o.verifyContext7===!1?null:await a.verify();o.silent||(e?.verified?console.log("\u2705 Context7 MCP ready (framework API lookups)"):(console.log(`\u26A0\uFE0F Context7 configured but not yet verified: ${e?.message||""}`),console.log(" It will activate on the next time you open your AI client.")))}catch(e){o.silent||(console.log(`\u26A0\uFE0F Context7 MCP setup failed: ${r(e)}`),console.log(" Run `prjct start` again to retry."))}for(let e of v)try{let t=l(),n=await d(e.name,t),C=await s(e.name,c[e.name],t);n&&!C.changed?o.silent||console.log(e.ready):o.silent||console.log(e.added)}catch(t){o.silent||(console.log(`\u26A0\uFE0F ${e.failed}: ${r(t)}`),console.log(e.manual))}try{if((await u()).installed){let t=await f(),n=await g();o.silent||(t.skipped==="user-managed"?console.log("\u2705 prjct Codex config ready (MCP user-managed)"):t.changed||n.changed?console.log("\u2705 prjct Codex config updated in ~/.codex/config.toml"):console.log("\u2705 prjct Codex config already ready"))}}catch(e){o.silent||(console.log(`\u26A0\uFE0F Codex config setup failed: ${r(e)}`),console.log(" Run `prjct start` again to retry."))}try{if((await m()).installed){let t=await p();o.silent||console.log(t.changed?`\u2705 prjct Kimi config updated in ${t.path}`:"\u2705 prjct Kimi config already ready")}}catch(e){o.silent||(console.log(`\u26A0\uFE0F Kimi config setup failed: ${r(e)}`),console.log(" Run `prjct start` again to retry."))}}i(R,"setupMcpServers");export{R as a};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'module';
2
+ import { fileURLToPath as __fileURLToPath } from 'url';
3
+ import { dirname as __pathDirname } from 'path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{g,i as v}from"./chunk-DMO3ZFUG.mjs";import{a as h}from"./chunk-3TRXQAU4.mjs";v();var y=BigInt(300*1e9),b=class{static{h(this,"PerformanceTracker")}marks=new Map;markStart(e){this.pruneStaleMarks(),this.marks.set(e,process.hrtime.bigint())}markEnd(e){let r=this.marks.get(e);if(r===void 0)return null;let n=process.hrtime.bigint();return this.marks.delete(e),Number(n-r)/1e6}pruneStaleMarks(){if(this.marks.size<10)return;let e=process.hrtime.bigint();for(let[r,n]of this.marks)e-n>y&&this.marks.delete(r)}computeMetricStats(e){return{avg:Math.round(e.reduce((r,n)=>r+n,0)/e.length),min:Math.min(...e),max:Math.max(...e),count:e.length}}recordSample(e,r,n,a,s){let m=new Date().toISOString();g.run(e,"INSERT INTO perf_samples (metric, value, unit, data, timestamp) VALUES (?, ?, ?, ?, ?)",r,a??null,s??null,JSON.stringify(n),m)}recordTiming(e,r,n,a){let s=Math.round(n*100)/100;this.recordSample(e,r,{metric:r,value:s,unit:"ms",context:a},s,"ms")}snapshotMemory(){let e=process.memoryUsage();return{heapUsed:e.heapUsed,heapTotal:e.heapTotal,rss:e.rss,external:e.external}}recordMemory(e,r){let n=this.snapshotMemory(),a=[{metric:"heap_used",value:n.heapUsed,unit:"bytes"},{metric:"heap_total",value:n.heapTotal,unit:"bytes"},{metric:"rss",value:n.rss,unit:"bytes"},{metric:"external_memory",value:n.external,unit:"bytes"}];for(let s of a)this.recordSample(e,s.metric,{metric:s.metric,value:s.value,unit:s.unit,context:r},s.value,s.unit);return n}recordContextCorrectness(e,r){this.recordSample(e,"context_correctness",{metric:"context_correctness",...r})}recordSubtaskHandoff(e,r){this.recordSample(e,"subtask_handoff",{metric:"subtask_handoff",...r})}getMetrics(e,r){r||(r=new Date,r.setDate(r.getDate()-7));let n=r.toISOString(),a=[];try{let m=g.query(e,"SELECT data, timestamp FROM perf_samples WHERE timestamp >= ? ORDER BY id DESC",n);for(let o of m){let d=JSON.parse(o.data);a.push({...d,timestamp:o.timestamp})}}catch{}let s=g.query(e,"SELECT data, timestamp FROM events WHERE type LIKE ? AND timestamp >= ? ORDER BY id DESC","perf.%",n);for(let m of s){let o=JSON.parse(m.data);a.push({...o,timestamp:m.timestamp})}return a}getReport(e,r=7){let n=new Date;n.setDate(n.getDate()-r),n.setHours(0,0,0,0);let a=this.getMetrics(e,n),s={period:`${r}d`},m=a.filter(t=>"metric"in t&&t.metric==="startup_time");if(m.length>0){let t=m.map(c=>c.value);s.startup={...this.computeMetricStats(t),unit:"ms"}}let o=a.filter(t=>"metric"in t&&t.metric==="heap_used"),d=a.filter(t=>"metric"in t&&t.metric==="rss");if(o.length>0){let t=h(p=>Math.round(p/1048576*10)/10,"toMB"),c=o.map(p=>p.value),u=d.map(p=>p.value);s.memory={avgHeapMB:t(c.reduce((p,M)=>p+M,0)/c.length),peakHeapMB:t(Math.max(...c)),avgRssMB:u.length>0?t(u.reduce((p,M)=>p+M,0)/u.length):0}}let i=a.filter(t=>"metric"in t&&t.metric==="context_correctness");if(i.length>0){let t=i.filter(c=>c.receivedSync).length;s.contextCorrectness={total:i.length,receivedSync:t,rate:Math.round(t/i.length*100)}}let f=a.filter(t=>"metric"in t&&t.metric==="subtask_handoff");if(f.length>0){let t=f.filter(c=>c.outputPopulated).length;s.subtaskHandoff={total:f.length,outputPopulated:t,rate:Math.round(t/f.length*100)}}let l=a.filter(t=>"metric"in t&&t.metric==="command_duration");if(l.length>0){let t={};for(let c of l){let u=c.context?.command||"unknown";t[u]||(t[u]=[]),t[u].push(c.value)}s.commandDurations={};for(let[c,u]of Object.entries(t))s.commandDurations[c]={...this.computeMetricStats(u),unit:"ms"}}return s}getLatencyReport(e,r=7){let n=new Date;n.setDate(n.getDate()-r);let a=this.getMetrics(e,n).filter(o=>"metric"in o&&o.metric==="command_duration"),s=new Map;for(let o of a){let d=typeof o.context?.command=="string"?o.context.command:"unknown",i=s.get(d)??[];i.push(o.value),s.set(d,i)}let m={};for(let[o,d]of s){let i=[...d].sort((l,t)=>l-t),f=h(l=>i[Math.min(i.length-1,Math.max(0,Math.ceil(i.length*l)-1))],"percentile");m[o]={count:i.length,min:i[0],p50:f(.5),p95:f(.95),max:i.at(-1),avg:Math.round(i.reduce((l,t)=>l+t,0)/i.length*100)/100}}return{period:`${r}d`,commands:m}}},S=new b,k=S;export{S as a,k as b};