prjct-cli 3.93.0 → 3.94.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 (254) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/bin/hook-chunks/{agent-switch-A6AYZRJ5.mjs → agent-switch-2U2LOBGR.mjs} +1 -1
  3. package/dist/bin/hook-chunks/{analysis-WPRPBYHY.mjs → analysis-N4NYGIG3.mjs} +3 -3
  4. package/dist/bin/hook-chunks/{auth-config-WNUARXTJ.mjs → auth-config-SP4PBALR.mjs} +1 -1
  5. package/dist/bin/hook-chunks/auto-flush-BN6L6QHO.mjs +8 -0
  6. package/dist/bin/hook-chunks/{auto-updater-EHRRMCYY.mjs → auto-updater-4TIXYSEX.mjs} +1 -1
  7. package/dist/bin/hook-chunks/capture-gate-FRF2G3IG.mjs +8 -0
  8. package/dist/bin/hook-chunks/{chunk-3WY2AYPE.mjs → chunk-27XFSCOE.mjs} +4 -4
  9. package/dist/bin/hook-chunks/chunk-2HB2JHQE.mjs +69 -0
  10. package/dist/bin/hook-chunks/{chunk-LFY5O66D.mjs → chunk-3VWBNLBC.mjs} +1 -1
  11. package/dist/bin/hook-chunks/{chunk-V37VTXDW.mjs → chunk-4KVPAHFV.mjs} +1 -1
  12. package/dist/bin/hook-chunks/{chunk-PWMMLXZS.mjs → chunk-4O4D6DV7.mjs} +2 -2
  13. package/dist/bin/hook-chunks/chunk-4SKJWNKE.mjs +11 -0
  14. package/dist/bin/hook-chunks/{chunk-3LG3ACQV.mjs → chunk-5EQLQ7GF.mjs} +1 -1
  15. package/dist/bin/hook-chunks/{chunk-HZIORCPO.mjs → chunk-66GE3IHX.mjs} +1 -1
  16. package/dist/bin/hook-chunks/{chunk-MEQS4VPO.mjs → chunk-6RLCUGGG.mjs} +1 -1
  17. package/dist/bin/hook-chunks/{chunk-BISPGBNN.mjs → chunk-6UH244CC.mjs} +1 -1
  18. package/dist/bin/hook-chunks/chunk-7GNWHWOO.mjs +26 -0
  19. package/dist/bin/hook-chunks/chunk-7JEKBJAP.mjs +9 -0
  20. package/dist/bin/hook-chunks/{chunk-LLQUB6YR.mjs → chunk-7O6OMD4X.mjs} +2 -2
  21. package/dist/bin/hook-chunks/chunk-7YT2FGO7.mjs +8 -0
  22. package/dist/bin/hook-chunks/{chunk-6WXGOGAN.mjs → chunk-AVRNHROK.mjs} +1 -1
  23. package/dist/bin/hook-chunks/chunk-AZHE4VOM.mjs +8 -0
  24. package/dist/bin/hook-chunks/{chunk-7OZDWT6C.mjs → chunk-AZYQFRPJ.mjs} +1 -1
  25. package/dist/bin/hook-chunks/chunk-BCAHWZH7.mjs +8 -0
  26. package/dist/bin/hook-chunks/{chunk-Q5I2UPD6.mjs → chunk-C3W2HLJT.mjs} +1 -1
  27. package/dist/bin/hook-chunks/{chunk-ZX2KFQV5.mjs → chunk-D6IONKRA.mjs} +1 -1
  28. package/dist/bin/hook-chunks/chunk-DRGI5UHQ.mjs +10 -0
  29. package/dist/bin/hook-chunks/{chunk-7SI6X3Z7.mjs → chunk-EHEQOF6Z.mjs} +1 -1
  30. package/dist/bin/hook-chunks/{chunk-P5ZYAXSE.mjs → chunk-EMTCZG5I.mjs} +1 -1
  31. package/dist/bin/hook-chunks/{chunk-7AN7VQHN.mjs → chunk-EQ5KNMLG.mjs} +1 -1
  32. package/dist/bin/hook-chunks/{chunk-742LOGHA.mjs → chunk-F4T7IAA7.mjs} +1 -1
  33. package/dist/bin/hook-chunks/{chunk-ODWWIFSN.mjs → chunk-FEFP6JOL.mjs} +1 -1
  34. package/dist/bin/hook-chunks/{chunk-2OU2MKNS.mjs → chunk-FX6VHIKB.mjs} +1 -1
  35. package/dist/bin/hook-chunks/{chunk-P4J6TY2L.mjs → chunk-GFY4GY3Z.mjs} +1 -1
  36. package/dist/bin/hook-chunks/{chunk-PSSR7LSW.mjs → chunk-H4CA3XZ6.mjs} +1 -1
  37. package/dist/bin/hook-chunks/chunk-HHIGNKDO.mjs +8 -0
  38. package/dist/bin/hook-chunks/chunk-HNEKXKOI.mjs +16 -0
  39. package/dist/bin/hook-chunks/{chunk-45I2C2UB.mjs → chunk-HRWXMF7P.mjs} +1 -1
  40. package/dist/bin/hook-chunks/{chunk-TSCXXNUF.mjs → chunk-IHECXD2M.mjs} +1 -1
  41. package/dist/bin/hook-chunks/chunk-IKIB42F7.mjs +31 -0
  42. package/dist/bin/hook-chunks/chunk-INXNK57E.mjs +8 -0
  43. package/dist/bin/hook-chunks/{chunk-WDGDFXSB.mjs → chunk-J6TAD3OZ.mjs} +1 -1
  44. package/dist/bin/hook-chunks/chunk-JAMSIKDE.mjs +9 -0
  45. package/dist/bin/hook-chunks/{chunk-CREPUNOS.mjs → chunk-JCYXFHQZ.mjs} +1 -1
  46. package/dist/bin/hook-chunks/chunk-JMCMTX6U.mjs +8 -0
  47. package/dist/bin/hook-chunks/{chunk-D7TRY3CO.mjs → chunk-JPSJWCFD.mjs} +1 -1
  48. package/dist/bin/hook-chunks/{chunk-QDQ7DTDV.mjs → chunk-JR542RI2.mjs} +1 -1
  49. package/dist/bin/hook-chunks/chunk-JUZ5LNDI.mjs +14 -0
  50. package/dist/bin/hook-chunks/{chunk-HDHVBB6Q.mjs → chunk-KG7Z6OMK.mjs} +1 -1
  51. package/dist/bin/hook-chunks/{chunk-OGOCHZ3S.mjs → chunk-KOCROTRM.mjs} +1 -1
  52. package/dist/bin/hook-chunks/{chunk-75UJIVMO.mjs → chunk-KOGZCFBC.mjs} +1 -1
  53. package/dist/bin/hook-chunks/{chunk-ZTZTVBAZ.mjs → chunk-LNB2GLYI.mjs} +1 -1
  54. package/dist/bin/hook-chunks/chunk-M5E2YOZ4.mjs +8 -0
  55. package/dist/bin/hook-chunks/{chunk-HT3ZCLLJ.mjs → chunk-MHQTGU45.mjs} +1 -1
  56. package/dist/bin/hook-chunks/{chunk-KXWBIQGJ.mjs → chunk-MI3JEFON.mjs} +2 -2
  57. package/dist/bin/hook-chunks/chunk-NBKEOLDH.mjs +18 -0
  58. package/dist/bin/hook-chunks/{chunk-EM6ZDJAK.mjs → chunk-NCOOKPXX.mjs} +1 -1
  59. package/dist/bin/hook-chunks/chunk-NHIWYDQD.mjs +8 -0
  60. package/dist/bin/hook-chunks/chunk-NUJASVHN.mjs +18 -0
  61. package/dist/bin/hook-chunks/chunk-NWIQNII6.mjs +11 -0
  62. package/dist/bin/hook-chunks/{chunk-UK7D7EFV.mjs → chunk-NWZEBCTC.mjs} +2 -2
  63. package/dist/bin/hook-chunks/{chunk-6EWGHM32.mjs → chunk-OENWCYLF.mjs} +1 -1
  64. package/dist/bin/hook-chunks/{chunk-3JUE6MNF.mjs → chunk-OIU4Y5WL.mjs} +1 -1
  65. package/dist/bin/hook-chunks/chunk-OUAS3LZ3.mjs +8 -0
  66. package/dist/bin/hook-chunks/{chunk-X5RDLFPM.mjs → chunk-OWOPA2O7.mjs} +1 -1
  67. package/dist/bin/hook-chunks/{chunk-NLG2EW6M.mjs → chunk-OZJ6UKKP.mjs} +1 -1
  68. package/dist/bin/hook-chunks/chunk-PUHX3ECX.mjs +11 -0
  69. package/dist/bin/hook-chunks/chunk-Q3EYM4GJ.mjs +19 -0
  70. package/dist/bin/hook-chunks/{chunk-4OYUJTPR.mjs → chunk-Q3Z53QTH.mjs} +3 -3
  71. package/dist/bin/hook-chunks/{chunk-ZZ65CN5F.mjs → chunk-QPRNRLG6.mjs} +1 -1
  72. package/dist/bin/hook-chunks/chunk-QWQFF2UG.mjs +10 -0
  73. package/dist/bin/hook-chunks/{chunk-DMXFGLZE.mjs → chunk-QYEASMFV.mjs} +1 -1
  74. package/dist/bin/hook-chunks/chunk-R4ILCXKE.mjs +8 -0
  75. package/dist/bin/hook-chunks/{chunk-4WHS7CO7.mjs → chunk-S7HQQILD.mjs} +1 -1
  76. package/dist/bin/hook-chunks/chunk-SDUS2AT7.mjs +8 -0
  77. package/dist/bin/hook-chunks/chunk-T2FCU3ZS.mjs +12 -0
  78. package/dist/bin/hook-chunks/{chunk-A5RNWWTH.mjs → chunk-TFCLMTJ5.mjs} +1 -1
  79. package/dist/bin/hook-chunks/{chunk-AUUWQH3S.mjs → chunk-TG5CQJD5.mjs} +1 -1
  80. package/dist/bin/hook-chunks/{chunk-GIMUTVLP.mjs → chunk-TKWAFYF7.mjs} +1 -1
  81. package/dist/bin/hook-chunks/{chunk-YUOTOCKK.mjs → chunk-TYEAIX3X.mjs} +1 -1
  82. package/dist/bin/hook-chunks/{chunk-AOPJ4Z6O.mjs → chunk-UA4Z5TGG.mjs} +1 -1
  83. package/dist/bin/hook-chunks/chunk-UH4MD3F3.mjs +9 -0
  84. package/dist/bin/hook-chunks/chunk-V2BSS7HW.mjs +36 -0
  85. package/dist/bin/hook-chunks/{chunk-DLHSCKBJ.mjs → chunk-VWOIUTAX.mjs} +1 -1
  86. package/dist/bin/hook-chunks/{chunk-ACKEPXP4.mjs → chunk-X2AGNDGD.mjs} +1 -1
  87. package/dist/bin/hook-chunks/{chunk-L4376X2P.mjs → chunk-XE4MJNBQ.mjs} +1 -1
  88. package/dist/bin/hook-chunks/{chunk-2NMSEZTQ.mjs → chunk-XFQ7NNLN.mjs} +1 -1
  89. package/dist/bin/hook-chunks/{chunk-SOPRYWUY.mjs → chunk-XS45K7ZQ.mjs} +1 -1
  90. package/dist/bin/hook-chunks/chunk-Y3J7UUMR.mjs +47 -0
  91. package/dist/bin/hook-chunks/{chunk-HIFIDMH5.mjs → chunk-Y4DUB7UN.mjs} +2 -2
  92. package/dist/bin/hook-chunks/{chunk-6IKHMK2U.mjs → chunk-YQ55MHKL.mjs} +1 -1
  93. package/dist/bin/hook-chunks/{chunk-QK2IMCDC.mjs → chunk-YUKGWWL7.mjs} +1 -1
  94. package/dist/bin/hook-chunks/chunk-ZJXH76Q5.mjs +11 -0
  95. package/dist/bin/hook-chunks/{chunk-RXD7MHJ6.mjs → chunk-ZMKTR2IO.mjs} +1 -1
  96. package/dist/bin/hook-chunks/{chunk-54LH63LM.mjs → chunk-ZMLA5SKR.mjs} +1 -0
  97. package/dist/bin/hook-chunks/client-ERZ5CM3D.mjs +10 -0
  98. package/dist/bin/hook-chunks/code-graph-cloud-4GRWQSUK.mjs +8 -0
  99. package/dist/bin/hook-chunks/{codex-skill-ZCAUF2RM.mjs → codex-skill-6DYQMPDJ.mjs} +1 -1
  100. package/dist/bin/hook-chunks/{command-installer-LNK7WC5I.mjs → command-installer-MF4KUM3X.mjs} +1 -1
  101. package/dist/bin/hook-chunks/{config-manager-4VWDBPMG.mjs → config-manager-2VZPHUDG.mjs} +1 -1
  102. package/dist/bin/hook-chunks/{content-bound-stamp-72EQVZLP.mjs → content-bound-stamp-OG2KKN3L.mjs} +1 -1
  103. package/dist/bin/hook-chunks/{context7-service-4C6VNJUS.mjs → context7-service-V7CIDF3Q.mjs} +1 -1
  104. package/dist/bin/hook-chunks/custom-workflow-storage-UOBQXY42.mjs +8 -0
  105. package/dist/bin/hook-chunks/cwd-changed-J6O46KS7.mjs +8 -0
  106. package/dist/bin/hook-chunks/{database-SLDTQXWG.mjs → database-XYKQF3KR.mjs} +1 -1
  107. package/dist/bin/hook-chunks/{delivery-geometry-VHCURJ7E.mjs → delivery-geometry-WYOEMKMO.mjs} +1 -1
  108. package/dist/bin/hook-chunks/{detect-changes-M2OYIOE5.mjs → detect-changes-DFRJOOB3.mjs} +1 -1
  109. package/dist/bin/hook-chunks/{detection-MEYHME4X.mjs → detection-QRVSNMKL.mjs} +1 -1
  110. package/dist/bin/hook-chunks/developer-evolution-SLC34HUU.mjs +12 -0
  111. package/dist/bin/hook-chunks/distill-U2LJGUG3.mjs +8 -0
  112. package/dist/bin/hook-chunks/{editors-config-3N6VREZR.mjs → editors-config-6XFYIOE6.mjs} +1 -1
  113. package/dist/bin/hook-chunks/enriched-recall-X6RDNNIE.mjs +8 -0
  114. package/dist/bin/hook-chunks/exec-2P5VOBHM.mjs +8 -0
  115. package/dist/bin/hook-chunks/format-ALUX4QSI.mjs +8 -0
  116. package/dist/bin/hook-chunks/{git-helpers-6JLP2OJZ.mjs → git-helpers-HELM6DXJ.mjs} +1 -1
  117. package/dist/bin/hook-chunks/{judgment-ledger-storage-UKROWRVA.mjs → judgment-ledger-storage-SCGU3URM.mjs} +1 -1
  118. package/dist/bin/hook-chunks/{judgment-orchestrator-UFGNBTEK.mjs → judgment-orchestrator-BYPG65RS.mjs} +1 -1
  119. package/dist/bin/hook-chunks/judgment-receipt-GWSSCLAB.mjs +8 -0
  120. package/dist/bin/hook-chunks/land-cue-MMISX2BI.mjs +9 -0
  121. package/dist/bin/hook-chunks/land-synthesis-WG5JAS7B.mjs +8 -0
  122. package/dist/bin/hook-chunks/legacy-crew-sweep-2WSO5KEB.mjs +24 -0
  123. package/dist/bin/hook-chunks/memory-index-QK5QJOFJ.mjs +8 -0
  124. package/dist/bin/hook-chunks/notification-MPVWVV52.mjs +8 -0
  125. package/dist/bin/hook-chunks/{pack-integrity-62XJ5A75.mjs → pack-integrity-XRYOROK5.mjs} +1 -1
  126. package/dist/bin/hook-chunks/{pack-manager-K3PQ7MCS.mjs → pack-manager-WWGQNJDQ.mjs} +1 -1
  127. package/dist/bin/hook-chunks/{package-legitimacy-HXC4L73B.mjs → package-legitimacy-MIR3VZSF.mjs} +1 -1
  128. package/dist/bin/hook-chunks/{path-manager-F2HE2GGK.mjs → path-manager-ZR5RAKTK.mjs} +1 -1
  129. package/dist/bin/hook-chunks/{planning-WMLFXZMA.mjs → planning-S55KBPN2.mjs} +2 -2
  130. package/dist/bin/hook-chunks/post-edit-QMHSZHDN.mjs +8 -0
  131. package/dist/bin/hook-chunks/{pr-convention-7UGI7TFA.mjs → pr-convention-5NPXQJ2R.mjs} +1 -1
  132. package/dist/bin/hook-chunks/pre-bash-RAM6L3G4.mjs +11 -0
  133. package/dist/bin/hook-chunks/pre-commit-736ZLMDL.mjs +8 -0
  134. package/dist/bin/hook-chunks/pre-edit-GZ4QJ2MU.mjs +11 -0
  135. package/dist/bin/hook-chunks/pre-package-LCIAWWGK.mjs +8 -0
  136. package/dist/bin/hook-chunks/pre-search-J5EOFMYN.mjs +9 -0
  137. package/dist/bin/hook-chunks/pre-secrets-TSUMTXHH.mjs +8 -0
  138. package/dist/bin/hook-chunks/{precision-judgment-WPTCNTGV.mjs → precision-judgment-TT3DRNAX.mjs} +1 -1
  139. package/dist/bin/hook-chunks/{prjct-md-Q6C5YNI3.mjs → prjct-md-T2DG236Y.mjs} +1 -1
  140. package/dist/bin/hook-chunks/{project-agent-surfaces-3BBZIQNI.mjs → project-agent-surfaces-VRY22I66.mjs} +1 -1
  141. package/dist/bin/hook-chunks/{project-file-inventory-ZAPKPKY6.mjs → project-file-inventory-5DEN5VLF.mjs} +1 -1
  142. package/dist/bin/hook-chunks/project-memory-KKEMTEMP.mjs +8 -0
  143. package/dist/bin/hook-chunks/project-style-evolution-7MAUSED2.mjs +8 -0
  144. package/dist/bin/hook-chunks/{prompt-AYY7BZFG.mjs → prompt-DVF6V2X2.mjs} +7 -7
  145. package/dist/bin/hook-chunks/{velocity-storage-UPW6TLK6.mjs → publish-helper-G54XQV5K.mjs} +1 -1
  146. package/dist/bin/hook-chunks/purge-MC5LFSAO.mjs +8 -0
  147. package/dist/bin/hook-chunks/retention-LWETHQX3.mjs +8 -0
  148. package/dist/bin/hook-chunks/sdd-5UCVX43H.mjs +10 -0
  149. package/dist/bin/hook-chunks/session-continuity-RKNAJJHR.mjs +11 -0
  150. package/dist/bin/hook-chunks/session-start-MFMFKUPK.mjs +8 -0
  151. package/dist/bin/hook-chunks/setup-WQRJ6TQL.mjs +141 -0
  152. package/dist/bin/hook-chunks/{shipping-HV5IAM2J.mjs → shipping-5D5LTJ3P.mjs} +5 -5
  153. package/dist/bin/hook-chunks/{skill-index-OOVAXHYJ.mjs → skill-index-RAVJMC4P.mjs} +1 -1
  154. package/dist/bin/hook-chunks/{spec-context-inference-UBHJLOIJ.mjs → spec-context-inference-7DDSTRTV.mjs} +1 -1
  155. package/dist/bin/hook-chunks/{spec-service-TA4Q5S3X.mjs → spec-service-LAO5Z2M5.mjs} +2 -2
  156. package/dist/bin/hook-chunks/spec-task-breakdown-K3GMQKGH.mjs +8 -0
  157. package/dist/bin/hook-chunks/state-storage-EIFGUO7X.mjs +8 -0
  158. package/dist/bin/hook-chunks/stop-RYLI4FGF.mjs +16 -0
  159. package/dist/bin/hook-chunks/subagent-start-CCUPSANT.mjs +8 -0
  160. package/dist/bin/hook-chunks/subagent-stop-RBD2OILE.mjs +8 -0
  161. package/dist/bin/hook-chunks/{surface-attribution-HYCBHBTC.mjs → surface-attribution-K37N2NK7.mjs} +1 -1
  162. package/dist/bin/hook-chunks/symbol-graph-BKQIMFRG.mjs +8 -0
  163. package/dist/bin/hook-chunks/{sync-analyzer-FKC57RTV.mjs → sync-analyzer-6U5GHYV3.mjs} +1 -1
  164. package/dist/bin/hook-chunks/{sync-client-DJWOG2ZQ.mjs → sync-client-EGBMWF3J.mjs} +1 -1
  165. package/dist/bin/hook-chunks/{sync-cursor-storage-2VKG757H.mjs → sync-cursor-storage-E3LMZISA.mjs} +1 -1
  166. package/dist/bin/hook-chunks/{task-orchestration-MLOCR7GA.mjs → task-orchestration-2ZYE5M6J.mjs} +1 -1
  167. package/dist/bin/hook-chunks/{task-overview-6ZQKJGSH.mjs → task-overview-ITY5OSHX.mjs} +1 -1
  168. package/dist/bin/hook-chunks/task-service-XREJLWEF.mjs +8 -0
  169. package/dist/bin/hook-chunks/tdd-7S55S5C3.mjs +10 -0
  170. package/dist/bin/hook-chunks/{template-loader-SO6OHPJI.mjs → template-loader-SCM4C2A3.mjs} +1 -1
  171. package/dist/bin/hook-chunks/{trust-boundary-ERMDF2C5.mjs → trust-boundary-EX65SUYR.mjs} +1 -1
  172. package/dist/bin/hook-chunks/{usefulness-253CZLNY.mjs → usefulness-SCH5ARGV.mjs} +1 -1
  173. package/dist/bin/hook-chunks/{vault-retire-notice-GRT3QRLZ.mjs → vault-retire-notice-HT756AND.mjs} +1 -1
  174. package/dist/bin/hook-chunks/velocity-storage-47CF3XWZ.mjs +8 -0
  175. package/dist/bin/hook-chunks/weak-model-mode-FLCEQ2BV.mjs +8 -0
  176. package/dist/bin/hook-chunks/work-graph-JQHVVXIZ.mjs +49 -0
  177. package/dist/bin/hook-chunks/work-scope-CDLSZ4U5.mjs +8 -0
  178. package/dist/bin/hook-chunks/{workspace-occupancy-UVIRHY5Z.mjs → workspace-occupancy-UUW4UGGB.mjs} +1 -1
  179. package/dist/bin/hook-chunks/{worktree-service-XGRN5TTE.mjs → worktree-service-AS7JVBK5.mjs} +1 -1
  180. package/dist/bin/prjct-core.mjs +720 -732
  181. package/dist/bin/prjct-hooks.mjs +2 -2
  182. package/dist/daemon/entry.mjs +638 -647
  183. package/dist/mcp/server.mjs +310 -312
  184. package/package.json +1 -1
  185. package/dist/bin/hook-chunks/auto-flush-5D4PKOMM.mjs +0 -8
  186. package/dist/bin/hook-chunks/capture-gate-EOOSAGAP.mjs +0 -8
  187. package/dist/bin/hook-chunks/chunk-4DDCWMI6.mjs +0 -8
  188. package/dist/bin/hook-chunks/chunk-4KY2EHXS.mjs +0 -9
  189. package/dist/bin/hook-chunks/chunk-A7SGMNOK.mjs +0 -11
  190. package/dist/bin/hook-chunks/chunk-AKIN5WSQ.mjs +0 -9
  191. package/dist/bin/hook-chunks/chunk-BNWB77U5.mjs +0 -9
  192. package/dist/bin/hook-chunks/chunk-CQHPIYNM.mjs +0 -8
  193. package/dist/bin/hook-chunks/chunk-CTWZQ7YI.mjs +0 -8
  194. package/dist/bin/hook-chunks/chunk-DV7KV2O4.mjs +0 -38
  195. package/dist/bin/hook-chunks/chunk-EHP4DYVQ.mjs +0 -71
  196. package/dist/bin/hook-chunks/chunk-FGQZ62ZP.mjs +0 -47
  197. package/dist/bin/hook-chunks/chunk-HJ4HEI45.mjs +0 -8
  198. package/dist/bin/hook-chunks/chunk-J6JZ4PQA.mjs +0 -18
  199. package/dist/bin/hook-chunks/chunk-JRKGG2E3.mjs +0 -8
  200. package/dist/bin/hook-chunks/chunk-L4COZ7ZH.mjs +0 -13
  201. package/dist/bin/hook-chunks/chunk-LT5WSSQO.mjs +0 -8
  202. package/dist/bin/hook-chunks/chunk-MHRMV4WI.mjs +0 -31
  203. package/dist/bin/hook-chunks/chunk-N5WOHG36.mjs +0 -8
  204. package/dist/bin/hook-chunks/chunk-NJAMZSHM.mjs +0 -26
  205. package/dist/bin/hook-chunks/chunk-NWY5M34K.mjs +0 -12
  206. package/dist/bin/hook-chunks/chunk-OB5GRS7T.mjs +0 -18
  207. package/dist/bin/hook-chunks/chunk-SVZHJZ5T.mjs +0 -9
  208. package/dist/bin/hook-chunks/chunk-UB53HQMG.mjs +0 -14
  209. package/dist/bin/hook-chunks/chunk-UBMIPWJR.mjs +0 -19
  210. package/dist/bin/hook-chunks/chunk-VPPHD762.mjs +0 -11
  211. package/dist/bin/hook-chunks/chunk-VV7VNUTF.mjs +0 -16
  212. package/dist/bin/hook-chunks/chunk-YJMWY4Y6.mjs +0 -8
  213. package/dist/bin/hook-chunks/client-SKFMAUI5.mjs +0 -10
  214. package/dist/bin/hook-chunks/code-graph-cloud-65GCWNII.mjs +0 -8
  215. package/dist/bin/hook-chunks/custom-workflow-storage-M77INP6Z.mjs +0 -8
  216. package/dist/bin/hook-chunks/cwd-changed-FYNPPO73.mjs +0 -8
  217. package/dist/bin/hook-chunks/developer-evolution-R5BXQH6G.mjs +0 -12
  218. package/dist/bin/hook-chunks/distill-W7QGQUDX.mjs +0 -8
  219. package/dist/bin/hook-chunks/enriched-recall-W7KYRYVR.mjs +0 -8
  220. package/dist/bin/hook-chunks/exec-I7XE7NMD.mjs +0 -8
  221. package/dist/bin/hook-chunks/format-BOWFDUBP.mjs +0 -8
  222. package/dist/bin/hook-chunks/judgment-receipt-WGTFKID7.mjs +0 -8
  223. package/dist/bin/hook-chunks/land-cue-WLGSULSO.mjs +0 -9
  224. package/dist/bin/hook-chunks/land-synthesis-V7UH5QV6.mjs +0 -8
  225. package/dist/bin/hook-chunks/legacy-crew-sweep-MFE4BDNR.mjs +0 -24
  226. package/dist/bin/hook-chunks/memory-index-B53F5HAX.mjs +0 -10
  227. package/dist/bin/hook-chunks/notification-HJLS4L7Y.mjs +0 -8
  228. package/dist/bin/hook-chunks/post-edit-TT3XOG55.mjs +0 -8
  229. package/dist/bin/hook-chunks/pre-bash-2KKF4V6G.mjs +0 -11
  230. package/dist/bin/hook-chunks/pre-commit-UU4SKKWV.mjs +0 -8
  231. package/dist/bin/hook-chunks/pre-edit-RTBLZPWH.mjs +0 -11
  232. package/dist/bin/hook-chunks/pre-package-LQTINBT4.mjs +0 -8
  233. package/dist/bin/hook-chunks/pre-search-UJU3XZ2K.mjs +0 -9
  234. package/dist/bin/hook-chunks/pre-secrets-IE5NX5X5.mjs +0 -8
  235. package/dist/bin/hook-chunks/project-memory-YHQBRX3D.mjs +0 -8
  236. package/dist/bin/hook-chunks/project-style-evolution-HS6HYI7W.mjs +0 -8
  237. package/dist/bin/hook-chunks/publish-helper-I37V4L7U.mjs +0 -8
  238. package/dist/bin/hook-chunks/purge-AXMYTZVM.mjs +0 -8
  239. package/dist/bin/hook-chunks/retention-22OSCAGV.mjs +0 -8
  240. package/dist/bin/hook-chunks/sdd-W3OUQPHD.mjs +0 -10
  241. package/dist/bin/hook-chunks/session-continuity-LO2KNHXU.mjs +0 -11
  242. package/dist/bin/hook-chunks/session-start-5UZSL6OY.mjs +0 -8
  243. package/dist/bin/hook-chunks/setup-BSWLQJPE.mjs +0 -142
  244. package/dist/bin/hook-chunks/spec-task-breakdown-QJWGCON2.mjs +0 -8
  245. package/dist/bin/hook-chunks/state-storage-KNGP2CQV.mjs +0 -8
  246. package/dist/bin/hook-chunks/stop-QVDK6LUV.mjs +0 -17
  247. package/dist/bin/hook-chunks/subagent-start-UYBSD7VK.mjs +0 -8
  248. package/dist/bin/hook-chunks/subagent-stop-FHLL7X66.mjs +0 -8
  249. package/dist/bin/hook-chunks/symbol-graph-LZM4RZXZ.mjs +0 -8
  250. package/dist/bin/hook-chunks/task-service-RMCQEHV6.mjs +0 -8
  251. package/dist/bin/hook-chunks/tdd-LV63NXZ3.mjs +0 -10
  252. package/dist/bin/hook-chunks/weak-model-mode-VDYJ25PX.mjs +0 -8
  253. package/dist/bin/hook-chunks/work-graph-QJGNBVIP.mjs +0 -49
  254. package/dist/bin/hook-chunks/work-scope-OKFSTW6D.mjs +0 -8
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{d as c,e as p,h as l}from"./chunk-UUULLTQV.mjs";import{b as E,c as d}from"./chunk-3LG3ACQV.mjs";import{b as m}from"./chunk-JRKGG2E3.mjs";import{e as i,g as R}from"./chunk-HDHVBB6Q.mjs";import{a as g}from"./chunk-E66B27AL.mjs";l();R();var y=class{static{g(this,"MemoryService")}async log(t,r,n,o,s){try{let e=s?.projectId??await m.getProjectId(t);return e?{eventId:i.appendEvent(e,`memory.${r}`,{...n,author:o}),projectId:e}:null}catch(e){let a=e instanceof Error?e.message:String(e);if(s?.required)throw new Error(a);return console.error(`Memory log error: ${a}`),null}}async clear(t){try{let r=await m.getProjectId(t);if(!r)return;i.run(r,"DELETE FROM events WHERE type >= ? AND type < ?",...c)}catch(r){console.error(`Memory clear error: ${r instanceof Error?r.message:String(r)}`)}}async getRecentEvents(t,r=100){try{return i.query(t,"SELECT type, data, timestamp FROM events WHERE type >= ? AND type < ? ORDER BY id DESC LIMIT ?",...c,r).reverse().map(o=>{let s=JSON.parse(o.data);return{timestamp:o.timestamp,action:o.type.replace("memory.",""),...s}})}catch(n){return console.error(`Memory read error: ${n instanceof Error?n.message:String(n)}`),[]}}async capEntries(t){try{let n=i.get(t,"SELECT COUNT(*) as cnt FROM events WHERE type >= ? AND type < ? AND NOT (type >= ? AND type < ?)",...c,...p)?.cnt??0;if(n<=E.MEMORY_MAX_ENTRIES)return 0;let o=n-E.MEMORY_MAX_ENTRIES,s=i.query(t,"SELECT id, type, data, timestamp FROM events WHERE type >= ? AND type < ? AND NOT (type >= ? AND type < ?) ORDER BY id ASC LIMIT ?",...c,...p,o);return d.archiveMany(t,s.map((e,a)=>({entityType:"memory_entry",entityId:`memory-${e.timestamp||a}`,entityData:{type:e.type,data:JSON.parse(e.data),timestamp:e.timestamp},summary:e.type.replace("memory.",""),reason:"overflow"}))),i.transaction(t,e=>{let a=e.prepare("DELETE FROM events WHERE id = ?");for(let u of s)a.run(u.id)}),o}catch(r){return console.error(`Memory cap error: ${r instanceof Error?r.message:String(r)}`),0}}},O=new y;export{O as a};
8
+ import{d as c,e as p,h as l}from"./chunk-UUULLTQV.mjs";import{b as E,c as d}from"./chunk-5EQLQ7GF.mjs";import{b as m}from"./chunk-AZHE4VOM.mjs";import{e as i,g as R}from"./chunk-KG7Z6OMK.mjs";import{a as g}from"./chunk-E66B27AL.mjs";l();R();var y=class{static{g(this,"MemoryService")}async log(t,r,n,o,s){try{let e=s?.projectId??await m.getProjectId(t);return e?{eventId:i.appendEvent(e,`memory.${r}`,{...n,author:o}),projectId:e}:null}catch(e){let a=e instanceof Error?e.message:String(e);if(s?.required)throw new Error(a);return console.error(`Memory log error: ${a}`),null}}async clear(t){try{let r=await m.getProjectId(t);if(!r)return;i.run(r,"DELETE FROM events WHERE type >= ? AND type < ?",...c)}catch(r){console.error(`Memory clear error: ${r instanceof Error?r.message:String(r)}`)}}async getRecentEvents(t,r=100){try{return i.query(t,"SELECT type, data, timestamp FROM events WHERE type >= ? AND type < ? ORDER BY id DESC LIMIT ?",...c,r).reverse().map(o=>{let s=JSON.parse(o.data);return{timestamp:o.timestamp,action:o.type.replace("memory.",""),...s}})}catch(n){return console.error(`Memory read error: ${n instanceof Error?n.message:String(n)}`),[]}}async capEntries(t){try{let n=i.get(t,"SELECT COUNT(*) as cnt FROM events WHERE type >= ? AND type < ? AND NOT (type >= ? AND type < ?)",...c,...p)?.cnt??0;if(n<=E.MEMORY_MAX_ENTRIES)return 0;let o=n-E.MEMORY_MAX_ENTRIES,s=i.query(t,"SELECT id, type, data, timestamp FROM events WHERE type >= ? AND type < ? AND NOT (type >= ? AND type < ?) ORDER BY id ASC LIMIT ?",...c,...p,o);return d.archiveMany(t,s.map((e,a)=>({entityType:"memory_entry",entityId:`memory-${e.timestamp||a}`,entityData:{type:e.type,data:JSON.parse(e.data),timestamp:e.timestamp},summary:e.type.replace("memory.",""),reason:"overflow"}))),i.transaction(t,e=>{let a=e.prepare("DELETE FROM events WHERE id = ?");for(let u of s)a.run(u.id)}),o}catch(r){return console.error(`Memory cap error: ${r instanceof Error?r.message:String(r)}`),0}}},O=new y;export{O as a};
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a as c,b as o,d as l,e as u,f as s,i as d}from"./chunk-DRGI5UHQ.mjs";import{a as f}from"./chunk-E66B27AL.mjs";async function E(t,n){let e=t.projectPath??process.cwd();if(n){try{let i=n.input;if(n.afterEmitOnly){t.afterEmit&&n.detachAfterEmit(()=>t.afterEmit(i,e));return}let r=t.decide?await t.decide(i,e):null;if(r){let k=o(c(t.event,r.deny));n.sink(`${JSON.stringify(k)}
9
+ `);return}let a=t.build?await t.build(i,e):null,m=o(d(t.event,a));n.sink(`${JSON.stringify(m)}
10
+ `),t.afterEmit&&n.detachAfterEmit(()=>t.afterEmit(i,e))}catch{n.sink(`{}
11
+ `)}return}await s(async()=>{let i=l(),r=t.decide?await t.decide(i,e):null;if(r){u(c(t.event,r.deny));return}let a=t.build?await t.build(i,e):null;u(d(t.event,a)),t.afterEmit&&await t.afterEmit(i,e)})}f(E,"runHook");export{E as a};
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a as p}from"./chunk-3WY2AYPE.mjs";import{d as g,g as M}from"./chunk-HDHVBB6Q.mjs";import{a as o}from"./chunk-E66B27AL.mjs";M();var h=300,x=3;function v(t){let e=t?.judgment?.conflictMode;if(e==="off"||e==="advisory"||e==="strict")return e;let n=t?.persona?.packs??[];return n.includes("code-strict")?"strict":n.includes("code")?"advisory":"off"}o(v,"effectiveConflictMode");function N(t){let e={action:"none",memoryIds:[],reason:"",recovery:"",message:""};if(t.mode==="off")return e;let n=new Set(t.overriddenIds??[]),r=t.candidates.filter(c=>c.id&&!n.has(c.id));if(r.length===0)return e;let i=r.filter(c=>c.confidence==="high"),l=r.filter(c=>c.confidence==="low"),s=i[0]??l[0];if(!s)return e;let f=r.map(c=>c.id),u=t.fileLabel?` on \`${t.fileLabel}\``:"",a=`Edit may contradict [${s.type}] ${m(s.content,80)} (\`${s.id}\`)${u}`,d='To supersede: `prjct remember decision "\u2026why supersede\u2026" --tags supersedes:'+s.id+'`. To lift deny for this memory: `prjct remember feedback "override conflict '+s.id+': <why>" --tags conflict:override,memory:'+s.id+"`.";return i.length===0?{action:"warn",memoryIds:f,reason:`Low-confidence preventive signal${u}: ${m(s.content,80)}`,recovery:d,message:y(a,d,f,!1)}:t.mode==="strict"?{action:"deny",memoryIds:i.map(c=>c.id),reason:a,recovery:d,message:_(a,d,i.map(c=>c.id))}:{action:"warn",memoryIds:f,reason:a,recovery:d,message:y(a,d,f,!0)}}o(N,"decisionConflictVerdict");function y(t,e,n,r){return[r?"# prjct: CONFLICT \u2014 decision/gotcha may block this path":"# prjct: heads-up \u2014 weak preventive signal","",t,"",`Memory: ${n.map(l=>`\`${l}\``).join(", ")}`,"",e,"",r?"> Not a soft nudge. Revise the edit or supersede the decision with rationale before proceeding.":"> Apply if it still holds; proceed if not."].join(`
8
+ import{a as p}from"./chunk-27XFSCOE.mjs";import{d as g,g as M}from"./chunk-KG7Z6OMK.mjs";import{a as o}from"./chunk-E66B27AL.mjs";M();var h=300,x=3;function v(t){let e=t?.judgment?.conflictMode;if(e==="off"||e==="advisory"||e==="strict")return e;let n=t?.persona?.packs??[];return n.includes("code-strict")?"strict":n.includes("code")?"advisory":"off"}o(v,"effectiveConflictMode");function N(t){let e={action:"none",memoryIds:[],reason:"",recovery:"",message:""};if(t.mode==="off")return e;let n=new Set(t.overriddenIds??[]),r=t.candidates.filter(c=>c.id&&!n.has(c.id));if(r.length===0)return e;let i=r.filter(c=>c.confidence==="high"),l=r.filter(c=>c.confidence==="low"),s=i[0]??l[0];if(!s)return e;let f=r.map(c=>c.id),u=t.fileLabel?` on \`${t.fileLabel}\``:"",a=`Edit may contradict [${s.type}] ${m(s.content,80)} (\`${s.id}\`)${u}`,d='To supersede: `prjct remember decision "\u2026why supersede\u2026" --tags supersedes:'+s.id+'`. To lift deny for this memory: `prjct remember feedback "override conflict '+s.id+': <why>" --tags conflict:override,memory:'+s.id+"`.";return i.length===0?{action:"warn",memoryIds:f,reason:`Low-confidence preventive signal${u}: ${m(s.content,80)}`,recovery:d,message:y(a,d,f,!1)}:t.mode==="strict"?{action:"deny",memoryIds:i.map(c=>c.id),reason:a,recovery:d,message:_(a,d,i.map(c=>c.id))}:{action:"warn",memoryIds:f,reason:a,recovery:d,message:y(a,d,f,!0)}}o(N,"decisionConflictVerdict");function y(t,e,n,r){return[r?"# prjct: CONFLICT \u2014 decision/gotcha may block this path":"# prjct: heads-up \u2014 weak preventive signal","",t,"",`Memory: ${n.map(l=>`\`${l}\``).join(", ")}`,"",e,"",r?"> Not a soft nudge. Revise the edit or supersede the decision with rationale before proceeding.":"> Apply if it still holds; proceed if not."].join(`
9
9
  `)}o(y,"formatWarnMessage");function _(t,e,n){return[`\u26D4 prjct conflict deny: ${t}`,`Memories: ${n.join(", ")}`,e,"Host will block Edit|Write until override or supersede. Fail-open only on hook errors, not on intentional deny."].join(" ")}o(_,"formatDenyMessage");function E(t){let e=new Set;try{let n=Date.now()-6048e5,r=g.query(t,`SELECT t.value AS value
10
10
  FROM memory_entry_tags t
11
11
  JOIN memory_entries me ON me.id = t.entry_id
@@ -5,3 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
+ import{a as s}from"./chunk-E66B27AL.mjs";function i(e,n){let t=e.replace(/\s+/g," ").trim();return t.length>n?`${t.slice(0,n-1)}\u2026`:t}s(i,"truncate");export{i as a};
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a as g,b as c,c as j,d as C}from"./chunk-2UC4DTDO.mjs";import{b as _,c as I}from"./chunk-CE4RCNC7.mjs";import"./chunk-WUHGODSQ.mjs";import{a as o}from"./chunk-E66B27AL.mjs";I();import k from"node:crypto";import i from"node:fs";import{connect as U}from"node:net";import x from"node:path";import l from"node:fs";import A from"node:path";var V=1024*1024;function N(n){try{return process.kill(n,0),!0}catch{return!1}}o(N,"isProcessRunning");function L(n=c.runDir()){return A.join(n,"daemon.spawn.lock")}o(L,"spawnLockPath");function E(n=c.runDir(),e=process.pid){l.mkdirSync(n,{recursive:!0});let t=L(n);for(let s of[0,1])try{let r=l.openSync(t,"wx");try{l.writeFileSync(r,`${e}
9
+ `)}catch{try{l.closeSync(r)}catch{}try{l.unlinkSync(t)}catch{}return null}return{fd:r,path:t}}catch{let r=(()=>{try{return parseInt(l.readFileSync(t,"utf-8").trim(),10)}catch{return null}})();if(r&&!Number.isNaN(r)&&N(r))return null;try{l.unlinkSync(t)}catch{return null}}return null}o(E,"tryAcquireSpawnLock");function R(n){if(n){try{l.closeSync(n.fd)}catch{}try{if(l.existsSync(n.path)){let e=l.readFileSync(n.path,"utf-8").trim();(e===String(process.pid)||e===`${process.pid}`)&&l.unlinkSync(n.path)}}catch{}}}o(R,"releaseSpawnLock");function v(n){if(!n||typeof n!="object"||!("code"in n))return null;let e=n.code;return typeof e=="string"?e:null}o(v,"systemErrorCode");function H(n){let e=v(n);return e==="ENOENT"||e==="ECONNREFUSED"}o(H,"shouldUnlinkDaemonSocket");async function y(){let n=c.socket(),e=g(n);if(!e&&!i.existsSync(n))return!1;try{return(await D({id:k.randomUUID(),command:"__ping",args:[],options:{},cwd:process.cwd()},{timeoutMs:1e3})).success}catch(t){if(!e&&H(t))try{i.unlinkSync(n)}catch{}return!1}}o(y,"isDaemonRunning");async function sn(){let n=c.socket(),e=c.pid();if(!g(n)&&!i.existsSync(n))return{running:!1};try{let s=await D({id:k.randomUUID(),command:"daemon",args:["status"],options:{},cwd:process.cwd()});if(s.success&&s.result)return s.result}catch{}return i.existsSync(e)?{running:!1,pid:parseInt(i.readFileSync(e,"utf-8").trim(),10),socketPath:n}:{running:!1}}o(sn,"getDaemonStatus");function D(n,e={}){let t=e.timeoutMs??j(n.command);return new Promise((s,r)=>{let f=c.socket(),a=U(f),p=[],u=new AbortController,d=setTimeout(()=>{u.signal.aborted||(u.abort(),a.destroy(),r(new Error("Daemon request timed out")))},t);a.on("connect",()=>{a.write(C(n))}),a.on("data",h=>{p.push(h.toString());let m=p.join("");if(m.length>8*1024*1024){u.signal.aborted||(u.abort(),clearTimeout(d),a.destroy(),r(new Error("Daemon response too large")));return}let S=m.indexOf(`
10
+ `);if(S!==-1){let O=m.slice(0,S);p.splice(0,p.length,m.slice(S+1));try{let P=JSON.parse(O);u.abort(),clearTimeout(d),a.end(),s(P)}catch(P){u.abort(),clearTimeout(d),a.end(),r(new Error(`Invalid daemon response: ${P.message}`))}}}),a.on("error",h=>{u.signal.aborted||(u.abort(),clearTimeout(d),r(h))}),a.on("close",()=>{u.signal.aborted||(u.abort(),clearTimeout(d),r(new Error("Connection closed before response")))})})}o(D,"sendRequest");async function an(n,e,t,s,r,f=!0){let a=c.socket();if(!g(a)&&!i.existsSync(a))return f&&b().catch(()=>{}),null;try{return await D({id:k.randomUUID(),command:n,args:e,options:t,cwd:s,perfStartNs:r})}catch{return f&&b().catch(()=>{}),null}}o(an,"executeViaDaemon");async function F(){try{return(await D({id:k.randomUUID(),command:"daemon",args:["stop"],options:{},cwd:process.cwd()})).success}catch{return!1}}o(F,"stopDaemon");function M(){let n=c.pid(),e=c.socket(),t=(()=>{if(!i.existsSync(n))return{killed:!1,safeToCleanOwnership:!0};let s=parseInt(i.readFileSync(n,"utf-8").trim(),10);if(Number.isNaN(s))return{killed:!1,safeToCleanOwnership:!0};try{return process.kill(s,"SIGKILL"),{killed:!0,safeToCleanOwnership:!0}}catch(r){return{killed:!1,safeToCleanOwnership:v(r)==="ESRCH"}}})();if(!t.safeToCleanOwnership)return!1;try{i.existsSync(n)&&i.unlinkSync(n)}catch{}if(!g(e))try{i.existsSync(e)&&i.unlinkSync(e)}catch{}return t.killed}o(M,"forceKillDaemon");var w={inFlight:null};async function b(){return w.inFlight||(w.inFlight=$().finally(()=>{w.inFlight=null})),w.inFlight}o(b,"spawnDaemon");async function $(){if(await y())return!0;let n=E();if(!n)return await T(3e3);try{if(await y())return!0;let{spawn:e}=await import("node:child_process"),t=x.join(__dirname,"entry.ts"),s=x.join(__dirname,"..","daemon","entry.mjs"),r=x.join(__dirname,"..","dist","daemon","entry.mjs"),f=process.platform!=="win32"&&_(),a=i.existsSync(t)?{entryPath:t,runtime:"bun"}:i.existsSync(s)?{entryPath:s,runtime:f?"bun":"node"}:i.existsSync(r)?{entryPath:r,runtime:f?"bun":"node"}:null;if(!a)return!1;let{entryPath:p,runtime:u}=a,d=c.runDir();i.mkdirSync(d,{recursive:!0});let h=c.log(),m=i.openSync(h,"a");return e(u,[p],{detached:!0,stdio:["ignore",m,m],env:process.env}).unref(),i.closeSync(m),await T(3e3)}finally{R(n)}}o($,"spawnDaemonExclusive");async function T(n){let e=Date.now()+n,t=o(async s=>Date.now()>=e?y():await y()?!0:(await new Promise(r=>setTimeout(r,s)),t(Math.min(s*2,250))),"poll");return t(40)}o(T,"waitUntilDaemonRunning");async function cn(){try{return await y()?(await F()||M(),await new Promise(e=>setTimeout(e,300)),await b()):!1}catch{return!1}}o(cn,"restartDaemon");async function un(){return await y()?(await F()||M(),await new Promise(e=>setTimeout(e,300))):M(),await b()}o(un,"forceRestartDaemon");export{an as executeViaDaemon,M as forceKillDaemon,un as forceRestartDaemon,sn as getDaemonStatus,y as isDaemonRunning,cn as restartDaemon,D as sendRequest,H as shouldUnlinkDaemonSocket,b as spawnDaemon,F as stopDaemon};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{b as S,g as k,h as x,i as N}from"./chunk-7GNWHWOO.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import{a as o}from"./chunk-E66B27AL.mjs";var w={function:"Function",method:"Method",class:"Class",interface:"Interface",type:"Type",enum:"Enum",const:"Const",route:"Route",file:"File"},G={CALLS:5,IMPORTS:4,DEFINES:3,HANDLES:2,TESTS:1};function A(n){return w[n.toLowerCase()]??"Symbol"}o(A,"mapKind");function I(n){return typeof n=="number"&&Number.isFinite(n)&&n>=0}o(I,"hasFiniteCap");function $(n,i={}){if(!k(n))return null;let u=N(n);if(u.length===0)return null;let c=S(n),l=x(n),s=new Map;for(let e of c){let t=G[e.edgeType]??1;s.set(e.src,(s.get(e.src)??0)+t),s.set(e.dst,(s.get(e.dst)??0)+t)}let E=o(e=>{switch(e){case"class":return 8;case"function":case"method":return 6;case"interface":case"type":return 4;case"route":return 5;default:return 2}},"kindWeight"),h=u.map(e=>{let t=s.get(e.id)??0,F=e.exported?4:0;return{s:e,score:t+F+E(e.kind)}}).sort((e,t)=>t.score-e.score||e.s.name.localeCompare(t.s.name)),d=I(i.maxNodes)?h.slice(0,i.maxNodes).map(e=>e.s):h.map(e=>e.s),p=new Set(d.map(e=>e.id)),f=new Map;for(let e of d)f.set(e.file,(f.get(e.file)??0)+1);let C=[...f.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).map(([e])=>e),m=o(e=>`file:${e}`,"fileNodeId"),g=[];for(let e of C){let t=e.split("/").pop()||e;g.push({id:m(e),name:t,kind:"File",file:e,exported:!1}),p.add(m(e))}for(let e of d)g.push({id:e.id,name:e.name,kind:A(e.kind),file:e.file,exported:e.exported});let y=[],L=new Set(C);for(let e of d)L.has(e.file)&&y.push({source:m(e.file),target:e.id,type:"DEFINES"});let T=c.filter(e=>p.has(e.src)&&p.has(e.dst)&&e.src!==e.dst).map(e=>({source:e.src,target:e.dst,type:e.edgeType,prio:G[e.edgeType]??0,conf:e.confidence})).sort((e,t)=>t.prio-e.prio||t.conf-e.conf),a=new Set,r=[],b=I(i.maxLinks)?i.maxLinks:Number.POSITIVE_INFINITY;for(let e of y){if(r.length>=b)break;let t=`${e.source}->${e.target}:${e.type}`;a.has(t)||(a.add(t),r.push({source:e.source,target:e.target,type:e.type}))}for(let e of T){if(r.length>=b)break;let t=`${e.source}->${e.target}:${e.type}`;a.has(t)||(a.add(t),r.push({source:e.source,target:e.target,type:e.type}))}return{version:1,builtAt:l?.builtAt??new Date().toISOString(),symbolCount:l?.symbolCount??u.length,edgeCount:l?.edgeCount??c.length,nodes:g,links:r}}o($,"buildCloudCodeGraphSnapshot");function D(n){return!!n&&n.nodes.length>0}o(D,"isUploadableGraph");export{$ as buildCloudCodeGraphSnapshot,D as isUploadableGraph};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b,c,d}from"./chunk-A7SGMNOK.mjs";import"./chunk-QDQ7DTDV.mjs";import"./chunk-DYHYDHCW.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-7AN7VQHN.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-P5ZYAXSE.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as CODEX_SKILL_MAX_BYTES,b as buildCodexSkillContent,c as installCodexSkill,d as verifyCodexPRouterReady};
8
+ import{a,b,c,d}from"./chunk-NWIQNII6.mjs";import"./chunk-DYHYDHCW.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-EQ5KNMLG.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as CODEX_SKILL_MAX_BYTES,b as buildCodexSkillContent,c as installCodexSkill,d as verifyCodexPRouterReady};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b,c,d}from"./chunk-VPPHD762.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-7AN7VQHN.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-P5ZYAXSE.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as CommandInstaller,d as default,c as getProviderPaths,a as installGlobalConfig};
8
+ import{a,b,c,d}from"./chunk-4SKJWNKE.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-EQ5KNMLG.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as CommandInstaller,d as default,c as getProviderPaths,a as installGlobalConfig};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{b as a}from"./chunk-JRKGG2E3.mjs";import"./chunk-MEQS4VPO.mjs";import"./chunk-HDHVBB6Q.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-P5ZYAXSE.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as default};
8
+ import{b as a}from"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as default};
@@ -5,6 +5,6 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{i as c,n as f,o as S}from"./chunk-CTWZQ7YI.mjs";import{a as n}from"./chunk-E66B27AL.mjs";S();import{createHash as C}from"node:crypto";import B from"node:fs/promises";import g from"node:path";var x="missing",T=1,u=200;function H(t){return C("sha256").update(t).digest("hex")}n(H,"sha256Hex");function v(t){return t===null?x:H(typeof t=="string"?Buffer.from(t,"utf8"):t)}n(v,"hashBlobContent");function w(t){let e=[...t].map(r=>({path:h(r.path),blobHash:r.blobHash})).filter(r=>r.path.length>0).sort((r,s)=>r.path<s.path?-1:r.path>s.path?1:0).map(r=>`${r.path}\0${r.blobHash}`);return H(e.join(`
8
+ import{i as c,n as f,p as S}from"./chunk-QWQFF2UG.mjs";import{a as n}from"./chunk-E66B27AL.mjs";S();import{createHash as C}from"node:crypto";import B from"node:fs/promises";import g from"node:path";var x="missing",T=1,u=200;function H(t){return C("sha256").update(t).digest("hex")}n(H,"sha256Hex");function v(t){return t===null?x:H(typeof t=="string"?Buffer.from(t,"utf8"):t)}n(v,"hashBlobContent");function w(t){let e=[...t].map(r=>({path:h(r.path),blobHash:r.blobHash})).filter(r=>r.path.length>0).sort((r,s)=>r.path<s.path?-1:r.path>s.path?1:0).map(r=>`${r.path}\0${r.blobHash}`);return H(e.join(`
9
9
  `))}n(w,"buildTreeHash");function h(t){return t.replace(/\\/g,"/").replace(/^\.\//,"").trim()}n(h,"normalizeStampPath");function A(t,e){let r=e.maxPaths??u,s=t.map(o=>({path:h(o.path),blobHash:v(o.content)})).filter(o=>o.path.length>0),i=new Map;for(let o of s)i.set(o.path,o.blobHash);let a=[...i.entries()].map(([o,m])=>({path:o,blobHash:m})).sort((o,m)=>o.path<m.path?-1:o.path>m.path?1:0),p=w(a);return{version:T,treeHash:p,pathCount:a.length,paths:a.slice(0,r),stampedAt:e.stampedAt,headSha:e.headSha}}n(A,"stampFromContents");function _(t){if(t.override)return{blocked:!1,reason:"override",message:""};if(!t.stamp?.treeHash)return t.hard?{blocked:!0,reason:"no-stamp",message:"Content-bound stamp missing: re-run `prjct judgment approve` so ship binds to the reviewed tree. Override only with consent: `prjct ship --no-judgment-gate`."}:{blocked:!1,reason:"no-stamp",message:""};if(t.stamp.pathCount===0)return{blocked:!1,reason:"empty-scope",message:"Content-bound stamp empty (no scoped paths) \u2014 advisory only.",stampedTreeHash:t.stamp.treeHash};if(t.currentTreeHash===null)return{blocked:!1,reason:"unverified",message:`\u2696\uFE0F Content-bound stamp ${d(t.stamp.treeHash)} not re-verified (IO).`,stampedTreeHash:t.stamp.treeHash};if(t.currentTreeHash===t.stamp.treeHash)return{blocked:!1,reason:"match",message:`\u2696\uFE0F Content-bound match tree=${d(t.stamp.treeHash)} (${t.stamp.pathCount} paths)`,stampedTreeHash:t.stamp.treeHash,currentTreeHash:t.currentTreeHash};let e=`Content-bound drift: approved tree=${d(t.stamp.treeHash)} now=${d(t.currentTreeHash)} (${t.stamp.pathCount} paths). Re-run \`prjct judgment approve\` after re-review. Override only with consent: \`prjct ship --no-judgment-gate\`.`;return{blocked:t.hard,reason:"drift",message:t.hard?e:`\u2696\uFE0F ${e}`,stampedTreeHash:t.stamp.treeHash,currentTreeHash:t.currentTreeHash}}n(_,"contentBoundDriftVerdict");function d(t){return t.slice(0,12)}n(d,"shortHash");async function l(t,e){return f(t,e,{timeoutMs:5e3})}n(l,"safeGit");async function b(t,e){if(e&&e.length>0)return[...new Set(e.map(h).filter(a=>a.length>0&&!a.endsWith("/")))].slice(0,u);let r=await l(t,["diff","--name-only","HEAD"])??await l(t,["diff","--name-only","--cached"])??"",s=await l(t,["diff","--name-only","HEAD~1..HEAD"])??"",i=r.trim()||s.trim();return i?[...new Set(i.split(`
10
10
  `).map(h).filter(a=>a.length>0))].slice(0,u):[]}n(b,"resolveStampPaths");async function N(t){try{return await B.readFile(t)}catch{return null}}n(N,"readFileOrNull");async function y(t,e,r){let s=[];for(let i of e){let a=h(i);if(!a||a.includes(".."))continue;let p=g.join(t,a);p.startsWith(g.resolve(t))&&s.push({path:a,content:await N(p)})}return A(s,r)}n(y,"stampProjectPaths");async function $(t,e,r){let s=await b(t,e),i=await l(t,["rev-parse","HEAD"])??void 0;return y(t,s,{stampedAt:r,headSha:i})}n($,"stampForApprove");async function k(t,e){try{let r=e.paths.length>0?e.paths.map(i=>i.path):await b(t,null);return(await y(t,r,{stampedAt:e.stampedAt,headSha:e.headSha})).treeHash}catch(r){if(r instanceof c)throw r;return null}}n(k,"currentTreeHashForStamp");export{x as BLOB_MISSING,u as CONTENT_BOUND_MAX_PATHS,T as CONTENT_BOUND_VERSION,w as buildTreeHash,_ as contentBoundDriftVerdict,k as currentTreeHashForStamp,v as hashBlobContent,h as normalizeStampPath,b as resolveStampPaths,d as shortHash,$ as stampForApprove,A as stampFromContents,y as stampProjectPaths};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{g as a,h as b,i as c}from"./chunk-J6JZ4PQA.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as buildContext7SmokePath,c as default,a as getVerifyCachePath};
8
+ import{g as a,h as b,i as c}from"./chunk-NBKEOLDH.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as buildContext7SmokePath,c as default,a as getVerifyCachePath};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a}from"./chunk-OENWCYLF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as customWorkflowStorage};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a as t}from"./chunk-NUJASVHN.mjs";import"./chunk-HRWXMF7P.mjs";import{a as n}from"./chunk-ZJXH76Q5.mjs";import"./chunk-PUHX3ECX.mjs";import"./chunk-Q3EYM4GJ.mjs";import"./chunk-AZYQFRPJ.mjs";import"./chunk-JR542RI2.mjs";import"./chunk-HHIGNKDO.mjs";import"./chunk-7GNWHWOO.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-QPRNRLG6.mjs";import"./chunk-7JEKBJAP.mjs";import"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-DRGI5UHQ.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as o}from"./chunk-E66B27AL.mjs";function p(r=process.cwd(),e){return n({event:"CwdChanged",projectPath:r,build:o(async(d,i)=>{let c=d.cwd||i;return t(c)},"build")},e)}o(p,"runCwdChangedHook");export{p as runCwdChangedHook};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{c as a,d as b,e as c,g as d}from"./chunk-HDHVBB6Q.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";d();export{a as PrjctDatabase,c as default,b as prjctDb};
8
+ import{c as a,d as b,e as c,g as d}from"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";d();export{a as PrjctDatabase,c as default,b as prjctDb};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-75UJIVMO.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-E66B27AL.mjs";export{c as NORMAL_MAX_FILES,d as NORMAL_MAX_LOC,a as TRIVIAL_MAX_FILES,b as TRIVIAL_MAX_LOC,g as computeCommittedChangeset,h as computeWorkingTreeChangeset,i as geometryBlockMessage,f as geometryOf,j as intentGeometryVerdict,k as shipGeometryVerdict,e as tierOf};
8
+ import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-KOGZCFBC.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-E66B27AL.mjs";export{c as NORMAL_MAX_FILES,d as NORMAL_MAX_LOC,a as TRIVIAL_MAX_FILES,b as TRIVIAL_MAX_LOC,g as computeCommittedChangeset,h as computeWorkingTreeChangeset,i as geometryBlockMessage,f as geometryOf,j as intentGeometryVerdict,k as shipGeometryVerdict,e as tierOf};
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{b as S}from"./chunk-YJMWY4Y6.mjs";import{e as A,j as k,l as x,n as E}from"./chunk-NJAMZSHM.mjs";import"./chunk-HDHVBB6Q.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import{n as H,o as T}from"./chunk-CTWZQ7YI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as o}from"./chunk-E66B27AL.mjs";import{createHash as W}from"node:crypto";import G from"node:fs/promises";import U from"node:path";T();var B=20,p=new Map;function v(e){return W("sha256").update(e).digest("hex")}o(v,"sha256Hex");async function N(e,n,t){if(t.length===0)return`${n}:empty`;let s=await M(e,n),a=s?await f(e,["diff",s,"--",...t])??"":"",i=await f(e,["ls-files","--others","--exclude-standard","--",...t])??"",c=[];for(let l of i.split(`
8
+ import{b as S}from"./chunk-HHIGNKDO.mjs";import{g as A,l as k,n as x,p as E}from"./chunk-7GNWHWOO.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import{n as H,p as T}from"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import{a as o}from"./chunk-E66B27AL.mjs";import{createHash as W}from"node:crypto";import G from"node:fs/promises";import U from"node:path";T();var B=20,p=new Map;function v(e){return W("sha256").update(e).digest("hex")}o(v,"sha256Hex");async function N(e,n,t){if(t.length===0)return`${n}:empty`;let s=await M(e,n),a=s?await f(e,["diff",s,"--",...t])??"":"",i=await f(e,["ls-files","--others","--exclude-standard","--",...t])??"",c=[];for(let l of i.split(`
9
9
  `).filter(Boolean)){let u=await G.readFile(U.join(e,l)).catch(()=>null);c.push(`${l}:${u?v(u.toString("utf8")):"missing"}`)}let g=[n,[...t].sort().join(","),a,c.sort().join(",")];return v(g.join(`
10
10
  `))}o(N,"computeDiffSignature");async function f(e,n){return H(e,n)}o(f,"safeGit");async function z(e){let n=await f(e,["diff","--name-only","HEAD"])??"",t=await f(e,["diff","--name-only","--cached"])??"",s=await f(e,["ls-files","--others","--exclude-standard"])??"",a=new Set;for(let i of[n,t,s])for(let c of i.split(`
11
11
  `))c.trim()&&a.add(c.trim());return[...a]}o(z,"listWorkingTreeFiles");async function K(e){let n=await _(e);if(!n)return[];let t=await f(e,["merge-base",n,"HEAD"]);return t?(await f(e,["diff","--name-only",`${t}..HEAD`])??"").split(`
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b,c,d,e}from"./chunk-2NMSEZTQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as AI_AGENTS,a as PROJECT_TYPES,d as detectInstalledAgents,c as detectProjectType,e as detectStack};
8
+ import{a,b,c,d,e}from"./chunk-XFQ7NNLN.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as AI_AGENTS,a as PROJECT_TYPES,d as detectInstalledAgents,c as detectProjectType,e as detectStack};
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a as p,b as g}from"./chunk-QYEASMFV.mjs";import"./chunk-INXNK57E.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import{d as a,g as m}from"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import{a as o}from"./chunk-E66B27AL.mjs";m();var u=o(e=>({week:e.week,capturedAt:e.captured_at,preferences:e.preferences,frictions:e.frictions,decisions7d:e.decisions_7d,gotchas7d:e.gotchas_7d,learnings7d:e.learnings_7d,tasksCompleted7d:e.tasks_completed_7d,ships7d:e.ships_7d,velocityAvg:e.velocity_avg,summary:e.summary}),"rowToSnapshot");function d(e,r,t){let i=t?"SELECT COUNT(*) AS c FROM memory_entries WHERE type = ? AND deleted_at IS NULL AND created_at >= ?":"SELECT COUNT(*) AS c FROM memory_entries WHERE type = ? AND deleted_at IS NULL",s=t?[r,t]:[r];return a.get(e,i,...s)?.c??0}o(d,"countEntries");function f(e){let r=e.decisions7d+e.gotchas7d+e.learnings7d;return`Week digest: ${e.ships7d>0||e.tasksCompleted7d>0?`shipped ${e.ships7d}, completed ${e.tasksCompleted7d} cycles`:"no deliveries recorded"}; velocity avg ${e.velocityAvg.toFixed(1)} pts/wk. Agent's model of the dev: ${e.preferences} standing preferences, ${e.frictions} friction signals; +${r} knowledge entries this week (${e.decisions7d} decisions, ${e.gotchas7d} gotchas, ${e.learnings7d} learnings).`}o(f,"buildSummary");async function y(e){let r=new Date().toISOString(),t=p(r);if(t===null)return!1;let i=Date.now()-10080*60*1e3,s=new Date(i).toISOString(),c=await g.getMetrics(e),n={preferences:d(e,"feedback"),frictions:d(e,"improvement-signal"),decisions7d:d(e,"decision",i),gotchas7d:d(e,"gotcha",i),learnings7d:d(e,"learning",i),tasksCompleted7d:a.get(e,"SELECT COUNT(*) AS c FROM tasks WHERE completed_at IS NOT NULL AND completed_at >= ?",s)?.c??0,ships7d:a.get(e,"SELECT COUNT(*) AS c FROM shipped_features WHERE shipped_at >= ?",s)?.c??0,velocityAvg:c.averageVelocity};return a.run(e,`INSERT OR IGNORE INTO developer_profile_snapshots
9
+ (week, captured_at, preferences, frictions, decisions_7d, gotchas_7d, learnings_7d,
10
+ tasks_completed_7d, ships_7d, velocity_avg, summary)
11
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,t,r,n.preferences,n.frictions,n.decisions7d,n.gotchas7d,n.learnings7d,n.tasksCompleted7d,n.ships7d,n.velocityAvg,f(n)).changes>0}o(y,"captureDeveloperSnapshot");function v(e,r=8){return a.query(e,"SELECT * FROM developer_profile_snapshots ORDER BY week DESC LIMIT ?",r).map(u)}o(v,"getDeveloperEvolution");function S(e,r=6){let t=v(e,r);if(t.length===0)return null;let i=["## Evolution (weekly snapshots)"];if(t.length>=2){let s=t[0],c=t[t.length-1],n=s.velocityAvg-c.velocityAvg,l=s.preferences-c.preferences;i.push(`Over ${t.length} weeks: velocity ${n>=0?"+":""}${n.toFixed(1)} pts/wk, standing preferences ${l>=0?"+":""}${l}, frictions ${s.frictions-c.frictions>=0?"+":""}${s.frictions-c.frictions}.`)}for(let s of t)i.push(`- ${s.capturedAt.slice(0,10)} \u2014 ${s.summary}`);return i.join(`
12
+ `)}o(S,"renderDeveloperEvolution");export{y as captureDeveloperSnapshot,v as getDeveloperEvolution,S as renderDeveloperEvolution};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a,b,c,d,e}from"./chunk-TKWAFYF7.mjs";import"./chunk-7JEKBJAP.mjs";import"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-NWZEBCTC.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as buildDistillContent,d as distillAndDiscardAllAutoSources,c as distillAndDiscardAutoSource,e as eliminateSoftDeletedNoValue,a as hardDeleteEntries};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{s as l,t as d}from"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import{g as t,j as c,n as u}from"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import{e as o,f}from"./chunk-BUDZL4DW.mjs";import{a}from"./chunk-E66B27AL.mjs";f();u();d();import n from"node:fs/promises";import m from"node:path";var s=class{static{a(this,"EditorsConfig")}get configDir(){return l.globalConfigDir}get configFile(){return m.join(this.configDir,"installed-editors.json")}async ensureConfigDir(){try{await n.mkdir(this.configDir,{recursive:!0})}catch(r){console.error("[editors-config] Error creating config directory:",o(r))}}async loadConfig(){try{let r=await n.readFile(this.configFile,"utf-8");return JSON.parse(r)}catch(r){return r.code==="ENOENT"||console.error("[editors-config] Error loading config:",o(r)),null}}async saveConfig(r,i,g="claude"){try{await this.ensureConfigDir();let e={version:r,provider:g,lastInstall:new Date().toISOString(),path:i};return await t(this.configFile,e),!0}catch(e){return console.error("[editors-config] Error saving config:",o(e)),!1}}async getProvider(){let r=await this.loadConfig();return r?r.provider||"claude":null}async getLastVersion(){let r=await this.loadConfig();return r?r.version:null}async hasVersionChanged(r){let i=await this.getLastVersion();return i!==null&&i!==r}async updateVersion(r){try{let i=await this.loadConfig();return i?(i.version=r,i.lastInstall=new Date().toISOString(),await t(this.configFile,i),!0):!1}catch(i){return!1}}async configExists(){return c(this.configFile)}async deleteConfig(){try{return await this.configExists()&&await n.unlink(this.configFile),!0}catch(r){return console.error("[editors-config] Error deleting config:",o(r)),!1}}},h=new s,C=h;export{C as default};
8
+ import{v as l,w as d}from"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import{g as t,k as c,o as u}from"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import{e as o,f}from"./chunk-BUDZL4DW.mjs";import{a}from"./chunk-E66B27AL.mjs";f();u();d();import n from"node:fs/promises";import m from"node:path";var s=class{static{a(this,"EditorsConfig")}get configDir(){return l.globalConfigDir}get configFile(){return m.join(this.configDir,"installed-editors.json")}async ensureConfigDir(){try{await n.mkdir(this.configDir,{recursive:!0})}catch(r){console.error("[editors-config] Error creating config directory:",o(r))}}async loadConfig(){try{let r=await n.readFile(this.configFile,"utf-8");return JSON.parse(r)}catch(r){return r.code==="ENOENT"||console.error("[editors-config] Error loading config:",o(r)),null}}async saveConfig(r,i,g="claude"){try{await this.ensureConfigDir();let e={version:r,provider:g,lastInstall:new Date().toISOString(),path:i};return await t(this.configFile,e),!0}catch(e){return console.error("[editors-config] Error saving config:",o(e)),!1}}async getProvider(){let r=await this.loadConfig();return r?r.provider||"claude":null}async getLastVersion(){let r=await this.loadConfig();return r?r.version:null}async hasVersionChanged(r){let i=await this.getLastVersion();return i!==null&&i!==r}async updateVersion(r){try{let i=await this.loadConfig();return i?(i.version=r,i.lastInstall=new Date().toISOString(),await t(this.configFile,i),!0):!1}catch(i){return!1}}async configExists(){return c(this.configFile)}async deleteConfig(){try{return await this.configExists()&&await n.unlink(this.configFile),!0}catch(r){return console.error("[editors-config] Error deleting config:",o(r)),!1}}},h=new s,C=h;export{C as default};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{c as y}from"./chunk-QPRNRLG6.mjs";import{c as T}from"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import{a as g}from"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import{b as A}from"./chunk-6UH244CC.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-INXNK57E.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import{b}from"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import{b as _,e as M}from"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as x}from"./chunk-E66B27AL.mjs";var R=new Set(["decision","gotcha","learning","fact","feedback","spec"]);async function q(C,r,p={}){let{topic:c,types:i,tags:a}=p,l=p.limit??30,w=c?(()=>{let e=c.split(/\s+/).filter(Boolean);try{return g.searchFts(r,e,l).filter(t=>(!i||i.includes(t.type))&&(!a||M(t,a)))}catch{return[]}})():[],m=w.length>0?w:g.recall(r,{topic:c,types:i,tags:a,limit:l}).slice(0,l),d=(c?await(async()=>{try{let e=await b.readConfig(C);if(e&&T.isEnabled(e)){let n=await T.semanticSearch(r,c,e,10);if(n.length>0){let t=new Set(m.map(o=>o.id));return[...n.filter(o=>!t.has(o.id)&&(!i||i.includes(o.type))&&(!a||M(o,a))),...m].slice(0,l)}}return m}catch{return m}})():m).filter(e=>_(e)||(i?.includes(e.type)??!1)),h=i?.includes("improvement-signal")?d:await(async()=>{try{let{isAutoSource:e}=await import("./purge-MC5LFSAO.mjs"),n=45*864e5,t=Date.now(),u=d.filter(s=>{if(!e(s.tags?.source)||R.has(s.type)&&!e(s.tags?.source))return!0;let S=Date.parse(s.rememberedAt);return Number.isFinite(S)?t-S<n:!0}),o=u.filter(s=>!e(s.tags?.source)),O=u.filter(s=>e(s.tags?.source));return[...o,...O].slice(0,Math.max(l,u.length))}catch{return d}})(),f=h.length>1?y.rerank(r,h):h,k=p.expandLinks!==!1&&f.length>0?g.expandWithLinks(r,f,5):[],E=k.length>0?f.concat(k):f;try{let e=await A.getCurrentTask(r),n=new Date().toISOString();e?.id&&y.recordSurfaced(r,E.map(t=>t.id),e.id,n,{queryText:c,surface:"context-memory"});for(let t of E)y.recordFetch(r,t.id,n)}catch{}return E}x(q,"enrichedRecall");export{q as enrichedRecall};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-QWQFF2UG.mjs";import"./chunk-E66B27AL.mjs";p();export{i as GitInfraError,c as PROC_ENVELOPE_MAX,a as execAsync,b as execFileAsync,g as exitCodeMeans,j as gitInfraErrorOf,n as gitStdout,f as isProcInfra,o as listChangedFiles,m as matchProc,k as procErrorOf,e as runGit,d as runProc,h as sanitizeProcEnvelope,l as throwProc};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a,b,c,d,e,f,g}from"./chunk-7JEKBJAP.mjs";import"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as MACHINE_TAG_KEYS,d as deriveTitle,c as flatDetail,e as formatMemoryDigestLine,g as formatMemoryMd,f as linkifyMemRefs,b as preventiveLabel};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b}from"./chunk-ODWWIFSN.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-E66B27AL.mjs";export{a as getGitBranch,b as getModifiedFiles};
8
+ import{a,b}from"./chunk-FEFP6JOL.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-E66B27AL.mjs";export{a as getGitBranch,b as getModifiedFiles};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b,c}from"./chunk-NLG2EW6M.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-HDHVBB6Q.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as JUDGMENT_ACTIVE_KEY,b as JUDGMENT_GHOSTS_KEY,c as judgmentLedgerStorage};
8
+ import{a,b,c}from"./chunk-OZJ6UKKP.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as JUDGMENT_ACTIVE_KEY,b as JUDGMENT_GHOSTS_KEY,c as judgmentLedgerStorage};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b,c,d,e,f,g,h}from"./chunk-LLQUB6YR.mjs";import"./chunk-NLG2EW6M.mjs";import"./chunk-6IKHMK2U.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-75UJIVMO.mjs";import"./chunk-HDHVBB6Q.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as SHIP_USER_ONLY,e as ensureJudgmentLedger,f as formatQualityInject,c as intensityFromQuality,b as qualityFromIntensity,g as qualityInjectForProject,d as resolveWorkIntensity,h as shipRequiresQuality};
8
+ import{a,b,c,d,e,f,g,h}from"./chunk-7O6OMD4X.mjs";import"./chunk-OZJ6UKKP.mjs";import"./chunk-YQ55MHKL.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KOGZCFBC.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as SHIP_USER_ONLY,e as ensureJudgmentLedger,f as formatQualityInject,c as intensityFromQuality,b as qualityFromIntensity,g as qualityInjectForProject,d as resolveWorkIntensity,h as shipRequiresQuality};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-IKIB42F7.mjs";import"./chunk-SDUS2AT7.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{c as RECEIPT_CAPTURE,a as RECEIPT_SOURCE,b as RECEIPT_TOPIC,d as buildJudgmentReceipt,i as countReceiptsWritten,h as latestJudgmentReceipt24h,f as persistJudgmentReceipt,e as summarizeJudgmentReceipt,g as synthesizeJudgmentReceipt};
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a as d}from"./chunk-5TBQNW2G.mjs";import{h as f}from"./chunk-IKIB42F7.mjs";import"./chunk-SDUS2AT7.mjs";import{a as p}from"./chunk-D6IONKRA.mjs";import"./chunk-JCYXFHQZ.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-6UH244CC.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-INXNK57E.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as c}from"./chunk-E66B27AL.mjs";function j(n){return n?.land?.mode??"advisory"}c(j,"effectiveLandMode");async function L(n,m,u){let l=j(u);if(l==="off")return null;let t=await p(n,m).catch(()=>null),r=f(n);if(!t?.current&&!r)return null;let e=[];if(t?.current){let i=t.current.description.slice(0,60),s=t.current.isCurrent?await import("./state-storage-EIFGUO7X.mjs").then(({stateStorage:g})=>g.getCurrentTask(n)).catch(()=>null):null,o=d(u,{description:t.current.description,turnCount:s?.turnCount,tokensIn:s?.tokensIn,tokensOut:s?.tokensOut}),a=l==="strict"||o.level==="critical"||o.level==="warn",h=a?"# prjct: LAND REQUIRED before context dies":"# prjct: land the plane";e.push(h,`Open cycle: "${i}${t.current.description.length>60?"\u2026":""}"`,a?'Before ending the session: `prjct status done` or `prjct log "\u2026"`, then `prjct land` (auto-synthesizes the Session close hand-off \u2014 no manual remember). Next window: `prjct prime`.':"Before ending the session: `prjct land` (auto hand-off + judgment receipt) \xB7 optional `prjct memory export` for the team."),o.cue&&e.push("",o.cue)}if(r){e.length>0&&e.push("");let i=r.trapCount>0?`${r.trapCount} trap(s) re-surfaced last session`:"judgment continuity landed last session";e.push("# prjct: prior judgment receipt (24h)",`${i} \xB7 \`${r.id}\` \u2014 closed-loop proof, not bulk memory. \`prjct search "judgment-receipt"\` if you need the full receipt.`)}return e.length>0?e.join(`
9
+ `):null}c(L,"buildLandCue");export{L as buildLandCue,j as effectiveLandMode};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a,b}from"./chunk-HNEKXKOI.mjs";import"./chunk-SDUS2AT7.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as buildLandHandoffContent,a as synthesizeLandHandoff};
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a as F}from"./chunk-EHEQOF6Z.mjs";import{a as N}from"./chunk-DYHYDHCW.mjs";import{e as f,g as x}from"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import{b,h as ne}from"./chunk-JAMSIKDE.mjs";import{a as Q,f as re}from"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import{c as R}from"./chunk-EQ5KNMLG.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as l}from"./chunk-E66B27AL.mjs";import p from"node:fs/promises";import d from"node:path";re();import{z as _}from"zod";ne();x();var D="crew:checkpoints",Y="crew/CHECKPOINTS.md",se=_.object({content:_.string(),source:_.enum(["default","user","migrated"]),updated_at:_.string().min(1)});function ie(){let t=R(Y);if(!t)throw new Error(`Missing bundled crew checkpoints template: ${Y}`);return t}l(ie,"getBundledDefault");var A=class{static{l(this,"CheckpointsStorage")}get(n){let e=f.getDoc(n,D);return e===null?{content:ie(),source:"default",updated_at:b()}:se.parse(e)}hasCustomization(n){return f.hasDoc(n,D)}set(n,e,r="user"){let o={content:e,source:r,updated_at:b()};return f.setDoc(n,D,o),o}reset(n){f.deleteDoc(n,D)}},oe=new A,E=oe;x();x();import{z as S}from"zod";var M="team:enrollment",V=S.object({required:S.boolean(),minVersion:S.string().min(1),enrolledAt:S.string().min(1),enrolledBy:S.string().nullable().default(null)}),$=class{static{l(this,"TeamEnrollmentStorage")}get(n){let e=f.getDoc(n,M);return e===null?null:V.parse(e)}set(n,e){let r=V.parse(e);f.setDoc(n,M,r)}clear(n){f.deleteDoc(n,M)}};var ae=new $,C=ae;var P=".prjct/CHECKPOINTS.md",L=".prjct/team.json",I="migration:v2.19.8:last-flagged-checkpoints",H="migration:v2.19.8:last-flagged-team",O="migration:v3.77:last-ghost-purge-warn",q="migration:v3.77:last-agent-repair-warn",ce=["sessions","audits","deploy"],le=[/\.prjct\/sessions\/<task/i,/\.prjct\/sessions\/\$\{/i,/->\s*`?\.prjct\/sessions\//i,/write(?:s|n)?\s+(?:a\s+)?(?:plan|report|results?|verdict|findings?)[^\n]{0,120}\.prjct\/sessions\//i,/write(?:s|n)?\s+its\s+results[^\n]{0,80}\.prjct\/sessions\//i,/Session artifacts at `?\.prjct\/sessions\//i,/Implementer report at `?\.prjct\/sessions\//i,/Reviewer verdict at `?\.prjct\/sessions\//i,/\.prjct\/audits\//i,/\.prjct\/deploy\//i,/SESSION_ROOT\s*=/i,/Write under `?SESSION_ROOT/i,/~\/\.prjct-cli\/projects\/[^\s`]+\/sessions\//i,/sessions\/<task-slug>\/\{?plan/i],We=[".prjct/sessions/<task",".prjct/audits/",".prjct/deploy/"],ge=F.map(t=>({destRelative:`.claude/agents/${t.name}.md`,templateKey:`crew/roles/${t.name}.md`})),v="CLAUDE.md",W="CREW.md",me="crew/leader-mode.md",K="<!-- prjct:crew:start - DO NOT REMOVE THIS MARKER -->",U="<!-- prjct:crew:end - DO NOT REMOVE THIS MARKER -->",G="<!-- prjct:crew:end -->",X="<!-- prjct:checkpoints:start - DO NOT EDIT (managed by `prjct crew checkpoints set|reset`) -->",ue="<!-- prjct:checkpoints:end -->",pe=["prjct.config.json","memory-export"];async function te(t){try{return(await p.stat(t)).mtimeMs}catch{return null}}l(te,"statMtimeMs");async function k(t){try{return await p.readFile(t,"utf-8")}catch{return null}}l(k,"tryReadFile");async function J(t){try{return await p.access(t),!0}catch{return!1}}l(J,"pathExists");function j(t,n){return f.getDoc(t,n)}l(j,"readFlag");function w(t,n,e){f.setDoc(t,n,{mtime_ms:e,migrated_at:new Date().toISOString()})}l(w,"writeFlag");async function y(t,n,e){try{let{projectMemory:r}=await import("./project-memory-KKEMTEMP.mjs");await r.remember(t,{type:"inbox",content:n,tags:e,provenance:"declared"})}catch(r){N.debug("Legacy sweep inbox capture failed (non-critical)",{error:r instanceof Error?r.message:String(r)})}}l(y,"captureInboxWarning");function T(t){return le.some(n=>n.test(t))}l(T,"containsForbiddenWriteInstruction");function de(t,n){let e=F.find(o=>`.claude/agents/${o.name}.md`===n)?.role;if(!e)return t;let{model:r}=Q(e);return t.replace(/^model:[ \t].*$/m,`model: ${r}`)}l(de,"stampCrewModelPolicy");function fe(t,n){let e=t.indexOf(X),r=t.indexOf(ue);if(e<0||r<0||r<e)return t;let o=t.slice(0,e+X.length),c=t.slice(r);return`${o}
9
+ ${n.trimEnd()}
10
+ ${c}`}l(fe,"spliceCheckpoints");function we(t,n){let e=l(c=>{let i=c.indexOf(K);if(i<0)return c;let a=c.slice(i+K.length),s=a.indexOf(U),m=a.indexOf(G),g=s>=0&&(m<0||s<=m)?{relative:s,length:U.length}:m>=0?{relative:m,length:G.length}:null;if(!g)return c.slice(0,i);let u=i+K.length+g.relative;return e(`${c.slice(0,i)}${c.slice(u+g.length)}`)},"stripMarkerBlocks"),r=e(t).replace(/\n{3,}/g,`
11
+
12
+ `).trimEnd(),o=r.length>0?`
13
+
14
+ `:"";return`${r}${o}${n.trimEnd()}
15
+ `}l(we,"replaceCrewSnippet");function Z(t){return T(t)?`${t.split(`
16
+ `).filter(e=>!T(e)).join(`
17
+ `).replace(/\n{3,}/g,`
18
+
19
+ `).trimEnd()}
20
+ `:t}l(Z,"sanitizeCheckpointsContent");async function he(t,n,e){let r=d.join(t,P),o=await te(r);if(o===null)return;let c=j(n,I),i=await k(r);if(i!==null)try{c===null?(E.set(n,i,"migrated"),w(n,I,o),e.checkpointsMigrated=!0,await y(t,"Legacy .prjct/CHECKPOINTS.md migrated into kv_store crew:checkpoints and DELETED from the client worktree. Manage with 'prjct crew checkpoints show|set|reset|export'. Product law: nothing but prjct.config.json under client .prjct/.",{"migration:v3.79":"1",topic:"crew-checkpoints"})):o>c.mtime_ms&&(E.set(n,i,"migrated"),w(n,I,o),e.checkpointsHandEditWarned=!0,await y(t,"Legacy .prjct/CHECKPOINTS.md hand-edited after migration \u2014 content re-adopted into kv_store and file DELETED. Prefer 'prjct crew checkpoints set' going forward.",{"migration:v3.79":"1",topic:"crew-checkpoints",state:"re-adopted"}))}catch(a){e.errors.push({file:P,reason:a instanceof Error?a.message:String(a)})}try{await p.rm(r,{force:!0}),e.clientPrjctJunkPurged.push("CHECKPOINTS.md")}catch(a){e.errors.push({file:P,reason:a instanceof Error?a.message:String(a)})}}l(he,"sweepCheckpoints");function ee(t){return{required:t.required===!0,minVersion:typeof t.minVersion=="string"?t.minVersion:"0.0.0",enrolledAt:typeof t.enrolledAt=="string"?t.enrolledAt:new Date().toISOString(),enrolledBy:typeof t.enrolledBy=="string"?t.enrolledBy:null}}l(ee,"parseTeamEnrollment");async function Ee(t,n,e){let r=d.join(t,L),o=await te(r);if(o===null)return;let c=j(n,H),i=C.get(n),a=await k(r);if(a!==null)try{if(c===null||i===null){if(i===null){let s=JSON.parse(a),m=ee(s);C.set(n,m),e.teamMigrated=!0,await y(t,"Legacy .prjct/team.json adopted into kv_store team:enrollment and DELETED from the client worktree. Team state is SQL-only; manage with 'prjct team'.",{"migration:v3.79":"1",topic:"team-enrollment"})}w(n,H,o)}else if(o>c.mtime_ms){try{let s=JSON.parse(a),m=ee(s);C.set(n,m)}catch{}w(n,H,o),e.teamHandEditWarned=!0}}catch(s){e.errors.push({file:L,reason:s instanceof Error?s.message:String(s)})}try{await p.rm(r,{force:!0}),e.clientPrjctJunkPurged.push("team.json")}catch(s){e.errors.push({file:L,reason:s instanceof Error?s.message:String(s)})}}l(Ee,"sweepTeamJson");async function z(t){let n=[],e=await p.readdir(t,{withFileTypes:!0}).catch(()=>[]);for(let r of e){let o=d.join(t,r.name);r.isDirectory()?n.push(...await z(o)):r.isFile()&&n.push(o)}return n}l(z,"listFilesRecursive");async function B(t,n,e,r){let o=new Set([".md",".txt",".json",".yml",".yaml",".toml",".csv",".log"]),c=d.extname(e).toLowerCase();if(!o.has(c)&&c!=="")return!1;let i=await p.readFile(e).then(g=>{if(g.byteLength>2e5)return null;let u=g.toString("utf-8");return u.includes("\0")?null:u}).catch(()=>null);if(i===null||!i.trim())return!1;let a=12e3,s=i.length>a?`${i.slice(0,a)}
21
+
22
+ \u2026[truncated ${i.length-a} chars]`:i,m=["Rescued worktree ghost (physical files are not traceable \u2014 ingested to SQLite, disk deleted).",`source: ${r}`,"",s].join(`
23
+ `);try{let{projectMemory:g}=await import("./project-memory-KKEMTEMP.mjs");return await g.remember(t,{type:"context",content:m,tags:{topic:"worktree-ghost-ingest",source_path:r,"migration:v3.77":"1"},provenance:"declared",projectId:n,force:!0}),!0}catch(g){return N.debug("Ghost file SQL ingest failed (non-critical)",{file:r,error:g instanceof Error?g.message:String(g)}),!1}}l(B,"ingestGhostFileToSql");async function ye(t,n,e){let r=d.join(t,".prjct");if(!await J(r))return;for(let c of ce){let i=d.join(r,c);if(await J(i))try{let a=await z(i);for(let s of a){let m=d.relative(t,s);await B(t,n,s,m)&&(e.ghostFilesIngested+=1)}await p.rm(i,{recursive:!0,force:!0}),e.ghostDirsPurged.push(c)}catch(a){e.errors.push({file:`.prjct/${c}/`,reason:a instanceof Error?a.message:String(a)})}}if(e.ghostDirsPurged.length===0)return;if(j(n,O)===null){let c=e.ghostFilesIngested>0?` ${e.ghostFilesIngested} text file(s) ingested into SQLite (topic:worktree-ghost-ingest) for traceability.`:"";await y(t,`Purged forbidden prjct ghost dir(s) from the customer worktree: ${e.ghostDirsPurged.map(i=>`.prjct/${i}/`).join(", ")}.${c} Product law: plans and work data live ONLY in project SQLite (prjct plan / prjct spec / prjct remember / prjct crew record-run) \u2014 never as physical files in the repo or under ~/.prjct-cli. The only hand-editable file under .prjct/ is prjct.config.json.`,{"migration:v3.77":"1",topic:"worktree-ghost-purge"}),w(n,O,Date.now())}}l(ye,"purgeWorktreeGhostDirs");async function Re(t,n,e){try{let s=E.get(n),m=Z(s.content);if(m!==s.content){let g=s.source==="user"?"user":"migrated";E.set(n,m,g),e.agentFilesRepaired.push("kv_store[crew:checkpoints]")}}catch(s){e.errors.push({file:"kv_store[crew:checkpoints]",reason:s instanceof Error?s.message:String(s)})}for(let s of ge){let m=d.join(t,s.destRelative),g=await k(m);if(g===null||!T(g))continue;let u=R(s.templateKey);if(!u){e.errors.push({file:s.destRelative,reason:"template missing"});continue}try{let h=de(s.destRelative===".claude/agents/reviewer.md"?fe(u,Z(E.get(n).content)):u,s.destRelative);await p.mkdir(d.dirname(m),{recursive:!0}),await p.writeFile(m,h,"utf-8"),e.agentFilesRepaired.push(s.destRelative)}catch(h){e.errors.push({file:s.destRelative,reason:h instanceof Error?h.message:String(h)})}}let r=d.join(t,v),o=await k(r);if(o!==null){let s=(o.match(/prjct:crew:start/g)??[]).length;if(T(o)||s>1||o.includes(G)){let g=R(me)?.trim();if(!g)e.errors.push({file:v,reason:"leader-mode template missing"});else try{let u=we(o,g);await p.writeFile(r,u,"utf-8"),e.agentFilesRepaired.push(v)}catch(u){e.errors.push({file:v,reason:u instanceof Error?u.message:String(u)})}}}let c=d.join(t,W),i=await k(c);if(i!==null&&T(i))try{let s=["# CREW.md \u2014 reinstall required","","This file previously instructed agents to write plans/reports under","`.prjct/sessions/` (or other worktree paths). That is forbidden.","","Run `prjct crew install` to regenerate the emulated crew protocol.","Durable state goes through `prjct` CLI verbs only (SQLite).",""].join(`
24
+ `);await p.writeFile(c,s,"utf-8"),e.agentFilesRepaired.push(W)}catch(s){e.errors.push({file:W,reason:s instanceof Error?s.message:String(s)})}if(e.agentFilesRepaired.length===0)return;j(n,q)===null&&(await y(t,`Repaired crew instruction files that still told agents to write plans/reports to disk (${e.agentFilesRepaired.join(", ")}). Refreshed from current prjct templates. Product law: plans + work data ONLY in project SQLite via prjct plan / prjct spec / prjct remember / prjct crew record-run \u2014 physical files are not traceable.`,{"migration:v3.77":"1",topic:"crew-disk-write-repair"}),w(n,q,Date.now()))}l(Re,"repairCrewDiskWriteInstructions");async function Se(t,n,e){let r=d.join(t,".prjct");if(!await J(r))return;let o=await p.readdir(r).catch(()=>[]);for(let i of o){if(pe.includes(i))continue;let a=d.join(r,i);try{let s=await p.stat(a);if(s.isDirectory()){let m=await z(a);for(let g of m){let u=d.relative(t,g);await B(t,n,g,u)&&(e.ghostFilesIngested+=1)}}else if(s.isFile()){let m=d.relative(t,a);i!=="CHECKPOINTS.md"&&i!=="team.json"&&await B(t,n,a,m)&&(e.ghostFilesIngested+=1)}await p.rm(a,{recursive:!0,force:!0}),e.clientPrjctJunkPurged.includes(i)||e.clientPrjctJunkPurged.push(i)}catch(s){e.errors.push({file:`.prjct/${i}`,reason:s instanceof Error?s.message:String(s)})}}if(e.clientPrjctJunkPurged.length===0)return;j(n,O)===null&&e.ghostDirsPurged.length===0&&(await y(t,`Client .prjct/ cleaned to config-only. Removed: ${e.clientPrjctJunkPurged.join(", ")}. Durable state is SQLite only (prjct crew checkpoints / prjct team / prjct remember).`,{"migration:v3.79":"1",topic:"client-prjct-config-only"}),w(n,O,Date.now()))}l(Se,"enforcePrjctConfigOnly");async function Ke(t,n){let e={checkpointsMigrated:!1,checkpointsHandEditWarned:!1,teamMigrated:!1,teamHandEditWarned:!1,ghostDirsPurged:[],agentFilesRepaired:[],ghostFilesIngested:0,clientPrjctJunkPurged:[],errors:[]};return await he(t,n,e).catch(r=>{e.errors.push({file:P,reason:r instanceof Error?r.message:String(r)})}),await Ee(t,n,e).catch(r=>{e.errors.push({file:L,reason:r instanceof Error?r.message:String(r)})}),await ye(t,n,e).catch(r=>{e.errors.push({file:".prjct/*/",reason:r instanceof Error?r.message:String(r)})}),await Se(t,n,e).catch(r=>{e.errors.push({file:".prjct/",reason:r instanceof Error?r.message:String(r)})}),await Re(t,n,e).catch(r=>{e.errors.push({file:".claude/agents/*",reason:r instanceof Error?r.message:String(r)})}),e}l(Ke,"legacyCrewSweep");export{pe as CLIENT_PRJCT_ALLOWLIST,We as FORBIDDEN_WORKTREE_WRITE_NEEDLES,le as FORBIDDEN_WORKTREE_WRITE_PATTERNS,ce as WORKTREE_GHOST_DIRS,T as containsForbiddenWriteInstruction,Ke as legacyCrewSweep};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i}from"./chunk-PUHX3ECX.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-QPRNRLG6.mjs";import"./chunk-7JEKBJAP.mjs";import"./chunk-MI3JEFON.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-27XFSCOE.mjs";import"./chunk-YUKGWWL7.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{c as L0_INDEX_FRESH_MS,b as L0_INDEX_MAX_CHARS,a as MEMORY_L0_INDEX_KEY,d as buildAndStoreMemoryL0Index,e as buildMemoryL0Index,i as findRepeatMissedEntry,g as isMemoryL0IndexFresh,f as loadMemoryL0Index,h as memoryL0IndexForSession};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from 'module';
3
+ import { fileURLToPath as __fileURLToPath } from 'url';
4
+ import { dirname as __pathDirname } from 'path';
5
+ const require = __createRequire(import.meta.url);
6
+ const __filename = __fileURLToPath(import.meta.url);
7
+ const __dirname = __pathDirname(__filename);
8
+ import{a,b as f}from"./chunk-OWOPA2O7.mjs";import{a as c}from"./chunk-ZJXH76Q5.mjs";import{a as e}from"./chunk-D6IONKRA.mjs";import"./chunk-JCYXFHQZ.mjs";import"./chunk-6UH244CC.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-INXNK57E.mjs";import"./chunk-5EQLQ7GF.mjs";import"./chunk-UA4Z5TGG.mjs";import"./chunk-TG5CQJD5.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-DRGI5UHQ.mjs";import"./chunk-GAOQHD5S.mjs";import{b as n}from"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as t}from"./chunk-E66B27AL.mjs";function l(u=process.cwd(),p){return c({event:"Notification",projectPath:u,afterEmit:t(async(d,i)=>{let o=await n.readConfig(i).catch(()=>null);if(!o?.projectId||a(o)==="off")return;let s=await e(o.projectId,i).then(r=>r.current?`Waiting \u2014 active: ${r.current.description}`:"Waiting for your input").catch(()=>"Waiting for your input");await f("prjct \u2014 Claude needs you",s)},"afterEmit")},p)}t(l,"runNotificationHook");export{l as runNotificationHook};
@@ -5,6 +5,6 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a as k,b as d,c as v}from"./chunk-N5WOHG36.mjs";import{b as y}from"./chunk-JRKGG2E3.mjs";import"./chunk-MEQS4VPO.mjs";import{d as g,g as $}from"./chunk-HDHVBB6Q.mjs";import"./chunk-CE4RCNC7.mjs";import{b as m,e as T}from"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-P5ZYAXSE.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as c}from"./chunk-E66B27AL.mjs";import{createHash as b}from"node:crypto";$();T();var h="packs:installs";function P(t){let n={name:t.name,version:t.version,description:t.description,memoryTypes:[...t.memoryTypes].sort(),workflowSlots:j(t.workflowSlots),hookSignals:t.hookSignals,suggestedTags:t.suggestedTags?Object.fromEntries(Object.entries(t.suggestedTags).sort(([e],[s])=>e.localeCompare(s)).map(([e,s])=>[e,[...s].sort()])):void 0,suggestedPersona:t.suggestedPersona,configDefaults:t.configDefaults};return b("sha256").update(JSON.stringify(n)).digest("hex").slice(0,16)}c(P,"packIntegrityHash");function j(t){let n={};for(let e of Object.keys(t).sort())n[e]=t[e];return n}c(j,"sortKeys");function u(t){try{let n=g.getDoc(t,h);return!n||typeof n!="object"?{}:n}catch{return{}}}c(u,"loadPackInstalls");function w(t,n){g.setDoc(t,h,n)}c(w,"savePackInstalls");function M(t,n,e=m()){let s=u(t),r=[];for(let o of n){let i=v(o);if(!i)continue;let a={name:i.name,version:i.version,integrity:P(i),activatedAt:e};s[o]=a,r.push(a)}return w(t,s),r}c(M,"stampPackInstalls");function O(t,n){let e=u(t),s=[];for(let r of n)e[r]&&(delete e[r],s.push(r));s.length>0&&w(t,e)}c(O,"clearPackInstalls");async function x(t){let n=await y.readConfig(t),e=new Set(n?.persona?.packs??[]),s=n?.projectId,r=s?u(s):{},o=[];for(let i of d){let a=k[i],f=P(a),p=e.has(i),l=r[i],I=p&&l&&(l.integrity!==f||l.version!==a.version)?"stale":p?"active":"available";o.push({name:a.name,version:a.version,description:a.description,integrity:f,active:p,status:I,memoryTypes:a.memoryTypes,slots:Object.keys(a.workflowSlots),receipt:l})}for(let i of e){if(k[i])continue;let a=r[i];o.push({name:i,version:a?.version??"?",description:"Unknown pack (not in built-in catalog)",integrity:a?.integrity??"\u2014",active:!0,status:"unknown",memoryTypes:[],slots:[],receipt:a})}return o.sort((i,a)=>i.name.localeCompare(a.name))}c(x,"buildPackCatalog");async function D(t){let e=(await x(t)).filter(o=>o.active),s=e.filter(o=>o.status==="stale").map(o=>o.name),r=e.filter(o=>o.status==="unknown").map(o=>o.name);return{ok:s.length===0&&r.length===0,active:e.length,stale:s,unknown:r,entries:e}}c(D,"verifyActivePacks");function K(t){let n=["# prjct pack catalog (marketplace-lite)","","Local built-in packs with version + integrity. Activate with `prjct seed add <name>`.","Not a third-party MCP marketplace \u2014 packs = persona + memory types + workflow slots.","","| Pack | Ver | Active | Status | Integrity | Description |","|---|---|---|---|---|---|"];for(let e of t){let s=e.active?"yes":"\u2014";n.push(`| \`${e.name}\` | ${e.version} | ${s} | ${e.status} | \`${e.integrity}\` | ${e.description.replace(/\|/g,"\\|")} |`)}return n.push(""),n.push("## Integrity"),n.push(""),n.push("- On `seed add`, prjct stamps `version@integrity` into project SoT (`packs:installs`)."),n.push("- `prjct seed verify` flags **stale** (CLI pack upgraded since activate) or **unknown**."),n.push("- Re-activate with `prjct seed add <name>` to refresh the receipt after upgrade."),n.push(""),n.join(`
8
+ import{a as k,b as d,c as v}from"./chunk-7YT2FGO7.mjs";import{b as y}from"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import{d as g,g as $}from"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import{b as m,h as T}from"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as c}from"./chunk-E66B27AL.mjs";import{createHash as b}from"node:crypto";$();T();var h="packs:installs";function P(t){let n={name:t.name,version:t.version,description:t.description,memoryTypes:[...t.memoryTypes].sort(),workflowSlots:j(t.workflowSlots),hookSignals:t.hookSignals,suggestedTags:t.suggestedTags?Object.fromEntries(Object.entries(t.suggestedTags).sort(([e],[s])=>e.localeCompare(s)).map(([e,s])=>[e,[...s].sort()])):void 0,suggestedPersona:t.suggestedPersona,configDefaults:t.configDefaults};return b("sha256").update(JSON.stringify(n)).digest("hex").slice(0,16)}c(P,"packIntegrityHash");function j(t){let n={};for(let e of Object.keys(t).sort())n[e]=t[e];return n}c(j,"sortKeys");function u(t){try{let n=g.getDoc(t,h);return!n||typeof n!="object"?{}:n}catch{return{}}}c(u,"loadPackInstalls");function w(t,n){g.setDoc(t,h,n)}c(w,"savePackInstalls");function M(t,n,e=m()){let s=u(t),r=[];for(let o of n){let i=v(o);if(!i)continue;let a={name:i.name,version:i.version,integrity:P(i),activatedAt:e};s[o]=a,r.push(a)}return w(t,s),r}c(M,"stampPackInstalls");function O(t,n){let e=u(t),s=[];for(let r of n)e[r]&&(delete e[r],s.push(r));s.length>0&&w(t,e)}c(O,"clearPackInstalls");async function x(t){let n=await y.readConfig(t),e=new Set(n?.persona?.packs??[]),s=n?.projectId,r=s?u(s):{},o=[];for(let i of d){let a=k[i],f=P(a),p=e.has(i),l=r[i],I=p&&l&&(l.integrity!==f||l.version!==a.version)?"stale":p?"active":"available";o.push({name:a.name,version:a.version,description:a.description,integrity:f,active:p,status:I,memoryTypes:a.memoryTypes,slots:Object.keys(a.workflowSlots),receipt:l})}for(let i of e){if(k[i])continue;let a=r[i];o.push({name:i,version:a?.version??"?",description:"Unknown pack (not in built-in catalog)",integrity:a?.integrity??"\u2014",active:!0,status:"unknown",memoryTypes:[],slots:[],receipt:a})}return o.sort((i,a)=>i.name.localeCompare(a.name))}c(x,"buildPackCatalog");async function D(t){let e=(await x(t)).filter(o=>o.active),s=e.filter(o=>o.status==="stale").map(o=>o.name),r=e.filter(o=>o.status==="unknown").map(o=>o.name);return{ok:s.length===0&&r.length===0,active:e.length,stale:s,unknown:r,entries:e}}c(D,"verifyActivePacks");function K(t){let n=["# prjct pack catalog (marketplace-lite)","","Local built-in packs with version + integrity. Activate with `prjct seed add <name>`.","Not a third-party MCP marketplace \u2014 packs = persona + memory types + workflow slots.","","| Pack | Ver | Active | Status | Integrity | Description |","|---|---|---|---|---|---|"];for(let e of t){let s=e.active?"yes":"\u2014";n.push(`| \`${e.name}\` | ${e.version} | ${s} | ${e.status} | \`${e.integrity}\` | ${e.description.replace(/\|/g,"\\|")} |`)}return n.push(""),n.push("## Integrity"),n.push(""),n.push("- On `seed add`, prjct stamps `version@integrity` into project SoT (`packs:installs`)."),n.push("- `prjct seed verify` flags **stale** (CLI pack upgraded since activate) or **unknown**."),n.push("- Re-activate with `prjct seed add <name>` to refresh the receipt after upgrade."),n.push(""),n.join(`
9
9
  `)}c(K,"formatPackCatalogMd");function V(t){let n=["# prjct pack verify","",t.ok?`**OK** \u2014 ${t.active} active pack(s), integrity clean.`:`**Attention** \u2014 ${t.stale.length} stale, ${t.unknown.length} unknown.`,""];if(t.stale.length&&n.push(`- Stale (re-add to refresh): ${t.stale.map(e=>`\`${e}\``).join(", ")}`),t.unknown.length&&n.push(`- Unknown (remove or restore): ${t.unknown.map(e=>`\`${e}\``).join(", ")}`),t.entries.length){n.push("","| Pack | Ver | Status | Integrity |","|---|---|---|---|");for(let e of t.entries)n.push(`| \`${e.name}\` | ${e.version} | ${e.status} | \`${e.integrity}\` |`)}return n.push(""),n.join(`
10
10
  `)}c(V,"formatPackVerifyMd");export{h as PACK_INSTALLS_KEY,x as buildPackCatalog,O as clearPackInstalls,K as formatPackCatalogMd,V as formatPackVerifyMd,u as loadPackInstalls,P as packIntegrityHash,w as savePackInstalls,M as stampPackInstalls,D as verifyActivePacks};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a as u,c as m}from"./chunk-N5WOHG36.mjs";import{b as f}from"./chunk-JRKGG2E3.mjs";import"./chunk-MEQS4VPO.mjs";import"./chunk-HDHVBB6Q.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-P5ZYAXSE.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as d}from"./chunk-E66B27AL.mjs";async function P(t){let i=await import("node:fs/promises"),n=await import("node:path"),s=new Set(["daily"]),o=["package.json","go.mod","Cargo.toml","pyproject.toml","Gemfile","pom.xml","build.gradle"];for(let e of o)try{await i.stat(n.join(t,e)),s.add("code");break}catch{}return[...s]}d(P,"detectSuggestedPacks");async function C(t){let i=await f.readConfig(t);if(!i)return{healed:!1,activated:[],reason:"no-config"};if(i.judgment?.conflictMode==="off")return{healed:!1,activated:[],reason:"conflictMode-off"};let n=i.persona?.packs??[];if(n.includes("code")||n.includes("code-strict"))return!i.judgment?.conflictMode&&n.includes("code")?(await f.writeConfig(t,{...i,judgment:{...i.judgment,conflictMode:"advisory"}}),{healed:!0,activated:[],reason:"conflictMode-healed"}):{healed:!1,activated:[],reason:"already-coding-pack"};if(!(await P(t)).includes("code"))return{healed:!1,activated:[],reason:"not-code-repo"};let e=await y(t,["code"],{suggestPersona:!0});return e.activated.includes("code")?{healed:!0,activated:e.activated,reason:"activated-code"}:{healed:!1,activated:[],reason:"noop"}}d(C,"ensureCodingAnticipationDefaults");async function y(t,i,n={}){let s=[],o=[],e=await f.readConfig(t);if(!e)throw new Error("No prjct project here \u2014 run `prjct init` first.");let a=e.persona??{role:"DEV"},r=new Set(a.packs??[]);for(let g of i){if(!u[g]){o.push(g);continue}r.has(g)||(r.add(g),s.push(g))}let l=[...r],c={...a,packs:l};n.suggestPersona&&s.length>0&&k(c,s);let p={...e,persona:c,...v(e,s)};if(await f.writeConfig(t,p),s.length>0&&e.projectId)try{let{stampPackInstalls:g}=await import("./pack-integrity-62XJ5A75.mjs");g(e.projectId,s)}catch{}return{activated:s,skipped:o}}d(y,"activatePacks");function v(t,i){let n={};for(let s of i){let o=u[s]?.configDefaults;o&&(o.sdd&&!t.sdd&&(n.sdd={mode:o.sdd}),o.tdd&&!t.tdd&&(n.tdd={mode:o.tdd}),o.maxTurnsPerCycle!=null&&t.maxTurnsPerCycle==null&&n.maxTurnsPerCycle==null&&(n.maxTurnsPerCycle=o.maxTurnsPerCycle),o.deliveryGeometry&&!t.deliveryGeometry&&(n.deliveryGeometry={mode:o.deliveryGeometry}),o.land&&!t.land&&(n.land={mode:o.land}),o.conflictMode&&!t.judgment?.conflictMode&&(n.judgment={...t.judgment,...n.judgment,conflictMode:o.conflictMode}))}return n}d(v,"packConfigDefaults");async function j(t,i){let n=await f.readConfig(t);if(!n)throw new Error("No prjct project here \u2014 run `prjct init` first.");let s=n.persona??{role:"DEV"},o=new Set(s.packs??[]),e=[],a=[];for(let c of i)o.delete(c)?e.push(c):a.push(c);let r={...s,packs:[...o]},l={...n,persona:r};if(await f.writeConfig(t,l),e.length>0&&n.projectId)try{let{clearPackInstalls:c}=await import("./pack-integrity-62XJ5A75.mjs");c(n.projectId,e)}catch{}return{deactivated:e,notActive:a}}d(j,"deactivatePacks");async function M(t){let n=(await f.readConfig(t))?.persona?.packs??[],s=await import("./pack-integrity-62XJ5A75.mjs").then(({buildPackCatalog:a})=>a(t)).catch(()=>[]),o=Object.fromEntries(s.filter(a=>a.active).map(a=>[a.name,{version:a.version,integrity:a.integrity,status:a.status}])),e=[];for(let a of n){let r=u[a];if(!r){let c=o[a];e.push({name:a,description:"Unknown pack (not in built-in catalog)",memoryTypes:[],slots:[],version:c?.version,integrity:c?.integrity,status:c?.status??"unknown"});continue}let l=o[a];e.push({name:r.name,description:r.description,memoryTypes:r.memoryTypes,slots:Object.keys(r.workflowSlots),version:l?.version??r.version,integrity:l?.integrity,status:l?.status??"active"})}return e}d(M,"listActivePacks");function k(t,i){let n=t.role&&t.role!=="DEV",s=t.mcps&&t.mcps.length>0;for(let o of i){let e=m(o);if(e?.suggestedPersona&&(!n&&e.suggestedPersona.role&&(t.role=e.suggestedPersona.role),!t.focus&&e.suggestedPersona.focus&&(t.focus=e.suggestedPersona.focus),!s&&e.suggestedPersona.mcps&&(t.mcps=[...e.suggestedPersona.mcps]),t.role&&t.role!=="DEV"))break}}d(k,"applyPersonaSuggestion");export{y as activatePacks,j as deactivatePacks,P as detectSuggestedPacks,C as ensureCodingAnticipationDefaults,M as listActivePacks};
8
+ import{a as u,c as m}from"./chunk-7YT2FGO7.mjs";import{b as f}from"./chunk-AZHE4VOM.mjs";import"./chunk-6RLCUGGG.mjs";import"./chunk-KG7Z6OMK.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-EMTCZG5I.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as d}from"./chunk-E66B27AL.mjs";async function P(t){let i=await import("node:fs/promises"),n=await import("node:path"),s=new Set(["daily"]),o=["package.json","go.mod","Cargo.toml","pyproject.toml","Gemfile","pom.xml","build.gradle"];for(let e of o)try{await i.stat(n.join(t,e)),s.add("code");break}catch{}return[...s]}d(P,"detectSuggestedPacks");async function C(t){let i=await f.readConfig(t);if(!i)return{healed:!1,activated:[],reason:"no-config"};if(i.judgment?.conflictMode==="off")return{healed:!1,activated:[],reason:"conflictMode-off"};let n=i.persona?.packs??[];if(n.includes("code")||n.includes("code-strict"))return!i.judgment?.conflictMode&&n.includes("code")?(await f.writeConfig(t,{...i,judgment:{...i.judgment,conflictMode:"advisory"}}),{healed:!0,activated:[],reason:"conflictMode-healed"}):{healed:!1,activated:[],reason:"already-coding-pack"};if(!(await P(t)).includes("code"))return{healed:!1,activated:[],reason:"not-code-repo"};let e=await y(t,["code"],{suggestPersona:!0});return e.activated.includes("code")?{healed:!0,activated:e.activated,reason:"activated-code"}:{healed:!1,activated:[],reason:"noop"}}d(C,"ensureCodingAnticipationDefaults");async function y(t,i,n={}){let s=[],o=[],e=await f.readConfig(t);if(!e)throw new Error("No prjct project here \u2014 run `prjct init` first.");let a=e.persona??{role:"DEV"},r=new Set(a.packs??[]);for(let g of i){if(!u[g]){o.push(g);continue}r.has(g)||(r.add(g),s.push(g))}let l=[...r],c={...a,packs:l};n.suggestPersona&&s.length>0&&k(c,s);let p={...e,persona:c,...v(e,s)};if(await f.writeConfig(t,p),s.length>0&&e.projectId)try{let{stampPackInstalls:g}=await import("./pack-integrity-XRYOROK5.mjs");g(e.projectId,s)}catch{}return{activated:s,skipped:o}}d(y,"activatePacks");function v(t,i){let n={};for(let s of i){let o=u[s]?.configDefaults;o&&(o.sdd&&!t.sdd&&(n.sdd={mode:o.sdd}),o.tdd&&!t.tdd&&(n.tdd={mode:o.tdd}),o.maxTurnsPerCycle!=null&&t.maxTurnsPerCycle==null&&n.maxTurnsPerCycle==null&&(n.maxTurnsPerCycle=o.maxTurnsPerCycle),o.deliveryGeometry&&!t.deliveryGeometry&&(n.deliveryGeometry={mode:o.deliveryGeometry}),o.land&&!t.land&&(n.land={mode:o.land}),o.conflictMode&&!t.judgment?.conflictMode&&(n.judgment={...t.judgment,...n.judgment,conflictMode:o.conflictMode}))}return n}d(v,"packConfigDefaults");async function j(t,i){let n=await f.readConfig(t);if(!n)throw new Error("No prjct project here \u2014 run `prjct init` first.");let s=n.persona??{role:"DEV"},o=new Set(s.packs??[]),e=[],a=[];for(let c of i)o.delete(c)?e.push(c):a.push(c);let r={...s,packs:[...o]},l={...n,persona:r};if(await f.writeConfig(t,l),e.length>0&&n.projectId)try{let{clearPackInstalls:c}=await import("./pack-integrity-XRYOROK5.mjs");c(n.projectId,e)}catch{}return{deactivated:e,notActive:a}}d(j,"deactivatePacks");async function M(t){let n=(await f.readConfig(t))?.persona?.packs??[],s=await import("./pack-integrity-XRYOROK5.mjs").then(({buildPackCatalog:a})=>a(t)).catch(()=>[]),o=Object.fromEntries(s.filter(a=>a.active).map(a=>[a.name,{version:a.version,integrity:a.integrity,status:a.status}])),e=[];for(let a of n){let r=u[a];if(!r){let c=o[a];e.push({name:a,description:"Unknown pack (not in built-in catalog)",memoryTypes:[],slots:[],version:c?.version,integrity:c?.integrity,status:c?.status??"unknown"});continue}let l=o[a];e.push({name:r.name,description:r.description,memoryTypes:r.memoryTypes,slots:Object.keys(r.workflowSlots),version:l?.version??r.version,integrity:l?.integrity,status:l?.status??"active"})}return e}d(M,"listActivePacks");function k(t,i){let n=t.role&&t.role!=="DEV",s=t.mcps&&t.mcps.length>0;for(let o of i){let e=m(o);if(e?.suggestedPersona&&(!n&&e.suggestedPersona.role&&(t.role=e.suggestedPersona.role),!t.focus&&e.suggestedPersona.focus&&(t.focus=e.suggestedPersona.focus),!s&&e.suggestedPersona.mcps&&(t.mcps=[...e.suggestedPersona.mcps]),t.role&&t.role!=="DEV"))break}}d(k,"applyPersonaSuggestion");export{y as activatePacks,j as deactivatePacks,P as detectSuggestedPacks,C as ensureCodingAnticipationDefaults,M as listActivePacks};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{a,b,c,d}from"./chunk-V37VTXDW.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-E66B27AL.mjs";export{d as checkPackageLegitimacy,b as decidePackageInstall,c as loadKnownDependencyNames,a as parsePackageInstallCommand};
8
+ import{a,b,c,d}from"./chunk-4KVPAHFV.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-E66B27AL.mjs";export{d as checkPackageLegitimacy,b as decidePackageInstall,c as loadKnownDependencyNames,a as parsePackageInstallCommand};
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{s as a,t as b}from"./chunk-AKIN5WSQ.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-SVZHJZ5T.mjs";import"./chunk-CTWZQ7YI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";b();export{a as default};
8
+ import{v as a,w as b}from"./chunk-JAMSIKDE.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";b();export{a as default};