prjct-cli 3.94.0 → 3.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +27 -21
- package/dist/bin/hook-chunks/{agent-identity-45BYQBU2.mjs → agent-identity-DH6DX72X.mjs} +1 -1
- package/dist/bin/hook-chunks/{agent-switch-2U2LOBGR.mjs → agent-switch-I4MTVE56.mjs} +1 -1
- package/dist/bin/hook-chunks/{analysis-N4NYGIG3.mjs → analysis-VN7APBHR.mjs} +3 -3
- package/dist/bin/hook-chunks/{auth-config-SP4PBALR.mjs → auth-config-JIITQ6GY.mjs} +1 -1
- package/dist/bin/hook-chunks/{auto-flush-BN6L6QHO.mjs → auto-flush-DX3FVSQE.mjs} +1 -1
- package/dist/bin/hook-chunks/{capture-gate-FRF2G3IG.mjs → capture-gate-MEIQD7ZS.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-OZJ6UKKP.mjs → chunk-22GFTUER.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-32RX4YGI.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-Q3EYM4GJ.mjs → chunk-33BHU4OM.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-HNEKXKOI.mjs → chunk-3AHW4XQH.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-JMCMTX6U.mjs → chunk-3CKNJ5RA.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-6RLCUGGG.mjs → chunk-3FEXJUO2.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-7GNWHWOO.mjs → chunk-3HGQPUKG.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-D6IONKRA.mjs → chunk-3UB6SFRA.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-AVRNHROK.mjs → chunk-64ZEBHDX.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-MI3JEFON.mjs → chunk-7PBWIO4K.mjs} +3 -3
- package/dist/bin/hook-chunks/{chunk-UA4Z5TGG.mjs → chunk-7WO5CEH3.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-A6K4H3YT.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-3VWBNLBC.mjs → chunk-ADYTBOCZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-TG5CQJD5.mjs → chunk-AORD3YDQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EHEQOF6Z.mjs → chunk-B36LC2JR.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-FX6VHIKB.mjs → chunk-BKJHD5JI.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-S7HQQILD.mjs → chunk-BVK7ZDLX.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-HHIGNKDO.mjs → chunk-CPR4FPXG.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-6UH244CC.mjs → chunk-D7DQABWO.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-Y4DUB7UN.mjs → chunk-DB226JIV.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-KOCROTRM.mjs → chunk-DCHIPMOG.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-IKIB42F7.mjs → chunk-E7NA34VQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-MHQTGU45.mjs → chunk-EGCYDLSO.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ZMKTR2IO.mjs → chunk-EI6VQZOX.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-INXNK57E.mjs → chunk-ETTDRXQ6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EQ5KNMLG.mjs → chunk-EXVL2OFE.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-5EQLQ7GF.mjs → chunk-FZS3XGEA.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-QYEASMFV.mjs → chunk-GSPDJSJ5.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-TKWAFYF7.mjs → chunk-H2DGDAQP.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-H5AVBDCH.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-SDUS2AT7.mjs → chunk-HGZQWYBL.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EMTCZG5I.mjs → chunk-IJ523YO2.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-NBKEOLDH.mjs → chunk-IWUF2LGO.mjs} +5 -5
- package/dist/bin/hook-chunks/chunk-JGZ3QGWX.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-66GE3IHX.mjs → chunk-JZDZH6IV.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-PUHX3ECX.mjs → chunk-KDNUQPAK.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-KV4NXLPT.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-XE4MJNBQ.mjs → chunk-LF3S3MYE.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-LQLCYBFF.mjs +36 -0
- package/dist/bin/hook-chunks/{chunk-YUKGWWL7.mjs → chunk-LR24AIEW.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-2HB2JHQE.mjs → chunk-M4YM7Z3F.mjs} +15 -15
- package/dist/bin/hook-chunks/{chunk-F4T7IAA7.mjs → chunk-MW54MTLB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-7O6OMD4X.mjs → chunk-NCLONKOT.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-HRWXMF7P.mjs → chunk-NJ74RHNC.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-JUZ5LNDI.mjs → chunk-NLL5AV2G.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-OIU4Y5WL.mjs → chunk-OC4CYF7V.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-OLQAMCYV.mjs +18 -0
- package/dist/bin/hook-chunks/{chunk-C3W2HLJT.mjs → chunk-PPWPUEBH.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-PVCEWFHS.mjs +51 -0
- package/dist/bin/hook-chunks/{chunk-Y3J7UUMR.mjs → chunk-QOQZHR3E.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-2UC4DTDO.mjs → chunk-QXCEBAIA.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-RT2DFIWF.mjs +19 -0
- package/dist/bin/hook-chunks/{chunk-NCOOKPXX.mjs → chunk-SQW2B7NW.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-IHECXD2M.mjs → chunk-SWJ7TLBD.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-X2AGNDGD.mjs → chunk-TB57OYGW.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-QPRNRLG6.mjs → chunk-TF6PN7IB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-KG7Z6OMK.mjs → chunk-TKXOMN4K.mjs} +4 -4
- package/dist/bin/hook-chunks/chunk-UMJ5D5I6.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-NWIQNII6.mjs → chunk-UVATSTRF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-NHIWYDQD.mjs → chunk-WJV24WE6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-Q3Z53QTH.mjs → chunk-WL6PKX3U.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-WUOVBBPC.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-TYEAIX3X.mjs → chunk-XDBJSJOT.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-JCYXFHQZ.mjs → chunk-XSJ7SPVR.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-J6TAD3OZ.mjs → chunk-XV2LJVYB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-7JEKBJAP.mjs → chunk-XYKVWO23.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-4O4D6DV7.mjs → chunk-Y3RHBU2R.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-JPSJWCFD.mjs → chunk-Y7MZA2G4.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-T2FCU3ZS.mjs → chunk-YHOZTAZH.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-YLOK4WRR.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-OENWCYLF.mjs → chunk-ZJW27EUC.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-VWOIUTAX.mjs → chunk-ZQI4TJ5C.mjs} +3 -3
- package/dist/bin/hook-chunks/chunk-ZYCNW75E.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-AZHE4VOM.mjs → chunk-ZZBNFNMG.mjs} +1 -1
- package/dist/bin/hook-chunks/{client-ERZ5CM3D.mjs → client-K3ZA2BLB.mjs} +3 -3
- package/dist/bin/hook-chunks/{code-graph-cloud-4GRWQSUK.mjs → code-graph-cloud-XGQF7XYC.mjs} +1 -1
- package/dist/bin/hook-chunks/{codex-skill-6DYQMPDJ.mjs → codex-skill-6CRFUF3A.mjs} +1 -1
- package/dist/bin/hook-chunks/{command-installer-MF4KUM3X.mjs → command-installer-MUHZWDZA.mjs} +1 -1
- package/dist/bin/hook-chunks/{config-manager-2VZPHUDG.mjs → config-manager-2JJPCLKC.mjs} +1 -1
- package/dist/bin/hook-chunks/{context7-service-V7CIDF3Q.mjs → context7-service-NH4BMGSJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{custom-workflow-storage-UOBQXY42.mjs → custom-workflow-storage-VBMWLKA7.mjs} +1 -1
- package/dist/bin/hook-chunks/cwd-changed-UTD6Y4MS.mjs +8 -0
- package/dist/bin/hook-chunks/{database-XYKQF3KR.mjs → database-ZCP76LMM.mjs} +1 -1
- package/dist/bin/hook-chunks/{detect-changes-DFRJOOB3.mjs → detect-changes-5W6EGEZG.mjs} +1 -1
- package/dist/bin/hook-chunks/{developer-evolution-SLC34HUU.mjs → developer-evolution-UTY3CWOK.mjs} +1 -1
- package/dist/bin/hook-chunks/{distill-U2LJGUG3.mjs → distill-5TNAM3LY.mjs} +1 -1
- package/dist/bin/hook-chunks/{editors-config-6XFYIOE6.mjs → editors-config-2CACBNS4.mjs} +1 -1
- package/dist/bin/hook-chunks/{enriched-recall-X6RDNNIE.mjs → enriched-recall-6VOIUNLN.mjs} +1 -1
- package/dist/bin/hook-chunks/{format-ALUX4QSI.mjs → format-IIOFTSBF.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-ledger-storage-SCGU3URM.mjs → judgment-ledger-storage-7Q7AEEY6.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-orchestrator-BYPG65RS.mjs → judgment-orchestrator-AAON4ZJ4.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-receipt-GWSSCLAB.mjs → judgment-receipt-QLV3MYFT.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-cue-MMISX2BI.mjs → land-cue-57B23PEL.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-synthesis-WG5JAS7B.mjs → land-synthesis-ZVPFJERV.mjs} +1 -1
- package/dist/bin/hook-chunks/{legacy-crew-sweep-2WSO5KEB.mjs → legacy-crew-sweep-GR6HRSHX.mjs} +2 -2
- package/dist/bin/hook-chunks/{memory-index-QK5QJOFJ.mjs → memory-index-XE2MWKQS.mjs} +1 -1
- package/dist/bin/hook-chunks/{notification-MPVWVV52.mjs → notification-GU2ZJP5K.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-integrity-XRYOROK5.mjs → pack-integrity-WV5U3AFF.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-manager-WWGQNJDQ.mjs → pack-manager-QLFQKP24.mjs} +1 -1
- package/dist/bin/hook-chunks/{path-manager-ZR5RAKTK.mjs → path-manager-375HH6TB.mjs} +1 -1
- package/dist/bin/hook-chunks/{planning-S55KBPN2.mjs → planning-VPAX5DZL.mjs} +2 -2
- package/dist/bin/hook-chunks/{post-edit-QMHSZHDN.mjs → post-edit-UXCFSR3Y.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-bash-RAM6L3G4.mjs → pre-bash-MB4JNNYG.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-commit-736ZLMDL.mjs → pre-commit-U7TRFKWX.mjs} +1 -1
- package/dist/bin/hook-chunks/pre-edit-MDCQXI5F.mjs +11 -0
- package/dist/bin/hook-chunks/{pre-package-LCIAWWGK.mjs → pre-package-A6ZI5R64.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-search-J5EOFMYN.mjs → pre-search-ZZO3LGXJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-secrets-TSUMTXHH.mjs → pre-secrets-MWPPZPWK.mjs} +1 -1
- package/dist/bin/hook-chunks/{prjct-md-T2DG236Y.mjs → prjct-md-MS52YLI2.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-agent-surfaces-VRY22I66.mjs → project-agent-surfaces-6AIW7KL6.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-file-inventory-5DEN5VLF.mjs → project-file-inventory-HHURZTMH.mjs} +1 -1
- package/dist/bin/hook-chunks/project-memory-UDH56VFP.mjs +8 -0
- package/dist/bin/hook-chunks/{project-style-evolution-7MAUSED2.mjs → project-style-evolution-IJXT2MCP.mjs} +1 -1
- package/dist/bin/hook-chunks/prompt-7VZLYONO.mjs +24 -0
- package/dist/bin/hook-chunks/{publish-helper-G54XQV5K.mjs → publish-helper-ZSL27HSX.mjs} +1 -1
- package/dist/bin/hook-chunks/{purge-MC5LFSAO.mjs → purge-N2WN6NDB.mjs} +1 -1
- package/dist/bin/hook-chunks/retention-RET4P2RO.mjs +8 -0
- package/dist/bin/hook-chunks/{sdd-5UCVX43H.mjs → sdd-PB6WKSLE.mjs} +1 -1
- package/dist/bin/hook-chunks/{session-continuity-RKNAJJHR.mjs → session-continuity-BIJXMN44.mjs} +1 -1
- package/dist/bin/hook-chunks/session-start-R2VMKW2L.mjs +8 -0
- package/dist/bin/hook-chunks/settings-installer-CQKMGMRG.mjs +9 -0
- package/dist/bin/hook-chunks/{setup-WQRJ6TQL.mjs → setup-PPIZHVXS.mjs} +3 -3
- package/dist/bin/hook-chunks/{shipping-5D5LTJ3P.mjs → shipping-C637PCOF.mjs} +4 -4
- package/dist/bin/hook-chunks/{skill-index-RAVJMC4P.mjs → skill-index-55I3HLAI.mjs} +1 -1
- package/dist/bin/hook-chunks/{spec-context-inference-7DDSTRTV.mjs → spec-context-inference-RTTDOZZO.mjs} +1 -1
- package/dist/bin/hook-chunks/{spec-service-LAO5Z2M5.mjs → spec-service-ENLAAMVL.mjs} +2 -2
- package/dist/bin/hook-chunks/{spec-task-breakdown-K3GMQKGH.mjs → spec-task-breakdown-RUDEP3AY.mjs} +1 -1
- package/dist/bin/hook-chunks/{state-storage-EIFGUO7X.mjs → state-storage-AJUPG7J5.mjs} +1 -1
- package/dist/bin/hook-chunks/stop-DPXAWJFN.mjs +16 -0
- package/dist/bin/hook-chunks/subagent-start-AFHPXL2S.mjs +8 -0
- package/dist/bin/hook-chunks/{subagent-stop-RBD2OILE.mjs → subagent-stop-5BMV63ML.mjs} +1 -1
- package/dist/bin/hook-chunks/{surface-attribution-K37N2NK7.mjs → surface-attribution-EGIKCVMF.mjs} +1 -1
- package/dist/bin/hook-chunks/{symbol-graph-BKQIMFRG.mjs → symbol-graph-MH42JSPX.mjs} +1 -1
- package/dist/bin/hook-chunks/{sync-client-EGBMWF3J.mjs → sync-client-PIRHMHXL.mjs} +1 -1
- package/dist/bin/hook-chunks/{sync-cursor-storage-E3LMZISA.mjs → sync-cursor-storage-ZB7FGT6D.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-orchestration-2ZYE5M6J.mjs → task-orchestration-7NGRIISS.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-overview-ITY5OSHX.mjs → task-overview-F3GB77OA.mjs} +1 -1
- package/dist/bin/hook-chunks/task-service-FZABHPFV.mjs +8 -0
- package/dist/bin/hook-chunks/{tdd-7S55S5C3.mjs → tdd-TAMBOPN3.mjs} +1 -1
- package/dist/bin/hook-chunks/{template-loader-SCM4C2A3.mjs → template-loader-MXOMU4XH.mjs} +1 -1
- package/dist/bin/hook-chunks/{transcript-jsonl-6X4DDD6R.mjs → transcript-jsonl-7W2NOJPZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{usefulness-SCH5ARGV.mjs → usefulness-TBD5EYAL.mjs} +1 -1
- package/dist/bin/hook-chunks/{vault-retire-notice-HT756AND.mjs → vault-retire-notice-7XHVNHU6.mjs} +1 -1
- package/dist/bin/hook-chunks/{velocity-storage-47CF3XWZ.mjs → velocity-storage-IOCVK2LU.mjs} +1 -1
- package/dist/bin/hook-chunks/{weak-model-mode-FLCEQ2BV.mjs → weak-model-mode-BMSPGEQY.mjs} +1 -1
- package/dist/bin/hook-chunks/{work-graph-JQHVVXIZ.mjs → work-graph-AVAOKY63.mjs} +1 -1
- package/dist/bin/hook-chunks/work-scope-YCS4GTXW.mjs +8 -0
- package/dist/bin/hook-chunks/{workspace-occupancy-UUW4UGGB.mjs → workspace-occupancy-JOBYNNXV.mjs} +1 -1
- package/dist/bin/hook-fast-darwin-arm64 +0 -0
- package/dist/bin/hook-fast-darwin-x64 +0 -0
- package/dist/bin/hook-fast-linux-x64 +0 -0
- package/dist/bin/prjct-core.mjs +739 -714
- package/dist/bin/prjct-hooks.mjs +3 -3
- package/dist/bin/prjct.mjs +22 -9
- package/dist/daemon/entry.mjs +620 -593
- package/dist/mcp/server.mjs +317 -303
- package/package.json +3 -5
- package/scripts/install.sh +28 -496
- package/dist/bin/hook-chunks/chunk-27XFSCOE.mjs +0 -43
- package/dist/bin/hook-chunks/chunk-4SKJWNKE.mjs +0 -11
- package/dist/bin/hook-chunks/chunk-AZYQFRPJ.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-DRGI5UHQ.mjs +0 -10
- package/dist/bin/hook-chunks/chunk-GFY4GY3Z.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-JAMSIKDE.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-NUJASVHN.mjs +0 -18
- package/dist/bin/hook-chunks/chunk-NWZEBCTC.mjs +0 -19
- package/dist/bin/hook-chunks/chunk-PW3KYKVS.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-TFCLMTJ5.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-TRMBRDKH.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-V2BSS7HW.mjs +0 -36
- package/dist/bin/hook-chunks/chunk-ZJXH76Q5.mjs +0 -11
- package/dist/bin/hook-chunks/cwd-changed-J6O46KS7.mjs +0 -8
- package/dist/bin/hook-chunks/pre-edit-GZ4QJ2MU.mjs +0 -11
- package/dist/bin/hook-chunks/project-memory-KKEMTEMP.mjs +0 -8
- package/dist/bin/hook-chunks/prompt-DVF6V2X2.mjs +0 -22
- package/dist/bin/hook-chunks/retention-LWETHQX3.mjs +0 -8
- package/dist/bin/hook-chunks/session-start-MFMFKUPK.mjs +0 -8
- package/dist/bin/hook-chunks/settings-installer-QDM3GB6J.mjs +0 -9
- package/dist/bin/hook-chunks/stop-RYLI4FGF.mjs +0 -16
- package/dist/bin/hook-chunks/subagent-start-CCUPSANT.mjs +0 -8
- package/dist/bin/hook-chunks/task-service-XREJLWEF.mjs +0 -8
- package/dist/bin/hook-chunks/work-scope-CDLSZ4U5.mjs +0 -8
|
@@ -0,0 +1,16 @@
|
|
|
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 ue,b as T,d as X}from"./chunk-32RX4YGI.mjs";import{a as L}from"./chunk-SQW2B7NW.mjs";import{b as ae}from"./chunk-NJ74RHNC.mjs";import{a as ce}from"./chunk-WUOVBBPC.mjs";import{a as W}from"./chunk-QOQZHR3E.mjs";import{a as ie,b as oe}from"./chunk-H5AVBDCH.mjs";import"./chunk-TPESWBA7.mjs";import{b as se}from"./chunk-FEFP6JOL.mjs";import{c as D}from"./chunk-TF6PN7IB.mjs";import{d as re}from"./chunk-7PBWIO4K.mjs";import"./chunk-Y5NQV46G.mjs";import{b as h}from"./chunk-PVCEWFHS.mjs";import"./chunk-LR24AIEW.mjs";import{g as ot,h as at}from"./chunk-UUULLTQV.mjs";import{a as ne,c as J}from"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-JGZ3QGWX.mjs";import{c as P}from"./chunk-QXCEBAIA.mjs";import"./chunk-GAOQHD5S.mjs";import{b as S}from"./chunk-ZZBNFNMG.mjs";import"./chunk-3FEXJUO2.mjs";import{a as te,b as st,e as v,f as it,g as G}from"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import{b as Q,h as et,v as ee,w as rt}from"./chunk-A6K4H3YT.mjs";import"./chunk-HDSS6UB3.mjs";import{b as B,c as nt}from"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import{k as Z,o as tt}from"./chunk-UH4MD3F3.mjs";import{e as I,g as M,l as C,p as V}from"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a,b as Y,e as q}from"./chunk-E66B27AL.mjs";import k from"node:fs/promises";import Ve from"node:path";import ct from"node:crypto";import ut from"node:fs/promises";function O(n){return typeof n=="string"?n:Array.isArray(n)?n.map(e=>{if(typeof e=="string")return e;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return typeof t=="string"?t:""}return""}).join(`
|
|
9
|
+
`).trim():""}a(O,"textOf");function x(n){try{let e=Y("node:fs"),s=Y("node:path").join(n,".prjct","prjct.config.json"),r=e.readFileSync(s,"utf-8");return JSON.parse(r).projectId??null}catch{return null}}a(x,"projectIdFromPath");var fe="friction-detector",le="friction-promote",pe=5,de=400,me=160,lt=[/^\s*no[,.!\s]/i,/^\s*nope\b/i,/^\s*stop\b/i,/^\s*wait\b/i,/^\s*cancel\b/i],pt=[/\bshould be\b/i,/\brather than\b/i,/\binstead\b/i],dt=[/\bdoesn'?t work\b/i,/\bbroken\b/i,/\bagain\b.*\bsame\b/i];async function ge(n,e,t,s={}){let r=s.preloadedLines?s.preloadedLines:await ut.readFile(e,"utf-8").then(ft).catch(()=>null);if(!r)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let i=mt(r);if(i.length===0)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let o=i.slice(0,pe).map(f=>({category:f.category,expectedBehavior:"Follow the user constraint without requiring correction.",observedBehavior:`The assistant response triggered user ${f.category}.`,relatedRuleId:null})),c=vt(n),l=x(n)??void 0;return{...await i.slice(0,pe).reduce(async(f,d)=>{let p=await f,y=ye(d.excerpt).slice(0,12);if(c.has(y))return await yt(n,l,d).catch(()=>{}),{...p,signalsSkipped:p.signalsSkipped+1};try{return await h.remember(n,{type:"improvement-signal",content:ht(d),tags:{source:fe,category:d.category,...s.runtime?{runtime:s.runtime}:{},...s.model?{model:s.model}:{},...t?{session:t}:{},key:y},provenance:"extracted",projectId:l}),c.add(y),{...p,signalsRecorded:p.signalsRecorded+1}}catch{return{...p,signalsSkipped:p.signalsSkipped+1}}},Promise.resolve({signalsRecorded:0,signalsSkipped:0})),failures:o}}a(ge,"detectFriction");function ft(n){return T(n)}a(ft,"parseJsonl");function mt(n){let e={signals:[],lastAssistantText:""};for(let t of n){let s=t.role??t.message?.role,r=O(t.content??t.message?.content);if(!r)continue;if(s==="assistant"){e.lastAssistantText=r;continue}if(s!=="user")continue;let i=gt(r.slice(0,300));i&&e.signals.push({excerpt:r.slice(0,de).trim(),category:i,precedingAssistantPreview:e.lastAssistantText.slice(0,de).trim()})}return e.signals}a(mt,"extractSignals");function gt(n){return dt.some(e=>e.test(n))?"complaint":lt.some(e=>e.test(n))?"negation":pt.some(e=>e.test(n))?"correction":null}a(gt,"classify");function ht(n){let e=wt(n.category),t=he(n.excerpt),s=t?`Obey developer constraint: ${t}`:e.lesson,r=t?`Always: ${t}`:e.nextAction;return[`[${n.category}] Lesson: ${s}`,"What happened: The user pushed back after the assistant response.",`Why it mattered: ${e.why}`,`Pattern: ${e.pattern}`,`Anti-pattern: ${e.antiPattern}`,`Next action: ${r}`].join(`
|
|
10
|
+
`)}a(ht,"formatSignal");function he(n){let e=n.replace(/\s+/g," ").trim();if(!e)return null;let t=e.replace(/^\s*(?:nope|no|stop|wait|cancel)[,.!\s:—-]*/i,"").trim(),s=t.match(/\bshould be\b\s+(.+?)$/i);if(s?.[1])return E(`Prefer ${s[1]}`);let r=t.match(/^(.+?)\s+rather than\s+(.+?)$/i);if(r?.[1]&&r[2])return E(`Prefer ${r[1].trim()} rather than ${r[2].trim()}`);let i=t.match(/\b(?:use|prefer|do|run|ship|write|keep)\s+(.+?)\s+instead(?:\s+of\s+(.+))?$/i);if(i?.[1]){let u=i[2]?` instead of ${i[2].trim()}`:" instead";return E(`Use ${i[1].trim()}${u}`)}let o=t.match(/\binstead of\b\s+(.+?)$/i);if(o?.[1])return E(`Avoid ${o[1].trim()}`);let c=t.match(/\b(?:don'?t|do not|never)\s+(.+?)$/i);if(c?.[1])return E(`Never ${c[1].trim()}`);let l=t.match(/\balways\s+(.+?)$/i);if(l?.[1])return E(`Always ${l[1].trim()}`);if(t.length>=12&&t.length<=me&&/^(?:run|use|do|ship|write|keep|add|fix|remove|prefer|test|check|verify|read|ask|stop|start)\b/i.test(t)){let u=t.charAt(0).toUpperCase()+t.slice(1);return E(u.replace(/[.!?]+$/,""))}return null}a(he,"extractSpecificConstraint");function E(n){let e=n.replace(/\s+/g," ").trim().replace(/^[-*•]\s+/,"").replace(/[.!?]+$/,"").slice(0,me);return e.length<12||/^(?:nope|no|stop|wait|cancel)\b/i.test(e)?null:e}a(E,"cleanConstraint");async function yt(n,e,t){if(!e)return;let s=he(t.excerpt);if(!s)return;let r=`Always: ${s}`,i=`fp:${ye(s).slice(0,12)}`;try{if(h.recall(e,{types:["feedback"],tags:{source:le,key:i},limit:1,dedupeByKey:!1}).length>0)return;await h.remember(n,{type:"feedback",content:r,tags:{source:le,key:i,category:t.category,from:"recurring-friction"},provenance:"extracted",projectId:e})}catch{}}a(yt,"maybePromoteStandingPreference");function wt(n){return n==="complaint"?{lesson:"Treat explicit failure complaints as evidence that the last result needs diagnosis, not repetition.",why:"The user reported that the delivered behavior or command did not work.",pattern:"User names a broken or non-working result after an assistant action.",antiPattern:"Retrying the same path or moving on without isolating the failure.",nextAction:"Stop, inspect the failing output or assumption, and propose the smallest verifiable fix."}:n==="correction"?{lesson:"Update the working assumption when the user corrects the intended direction.",why:"The assistant was using an assumption that did not match what the user wanted.",pattern:"User redirects the implementation or workflow with a correction.",antiPattern:"Continuing with the original plan after the user clarified a different target.",nextAction:"Restate the corrected target as an actionable rule before continuing."}:{lesson:"Recalibrate before continuing when the user rejects the assistant\u2019s last step.",why:"The assistant likely violated sequencing, scope, or approval expectations.",pattern:"User immediately rejects an assistant action or proposed next step.",antiPattern:"Treating the rejected action as acceptable and continuing without changing course.",nextAction:"Pause, convert the pushback into a workflow constraint, and adjust the next tool use."}}a(wt,"lessonTemplate");function ye(n){let e=n.toLowerCase().replace(/\s+/g," ").trim();return ct.createHash("sha256").update(e).digest("hex")}a(ye,"hashSignal");function vt(n){try{let e=x(n);if(!e)return new Set;let t=h.recall(e,{types:["improvement-signal"],tags:{source:fe},limit:100,dedupeByKey:!1}),s=new Set;for(let r of t){let i=r.tags.key;i&&s.add(i)}return s}catch{return new Set}}a(vt,"projectMemoryHashes");var bt=32;function we(n={}){let t=(n.hookHost===void 0?process.env.PRJCT_HOOK_HOST:n.hookHost)?.trim().toLowerCase().slice(0,bt);return t&&ie.has(t)?t:n.detectedRuntime??oe()}a(we,"resolveInstructionRuntime");V();function ve(n){try{return JSON.parse(n)}catch{return null}}a(ve,"safeJsonParse");function b(n,e,t,s){let r=[];try{let{prjctDb:i}=(G(),q(it)),o=i.query(n,e,...t);for(let c of o){let l=ve(c.data);if(!l||typeof l!="object")continue;let u=l.tags;if(!u)continue;let f=s(u,l);f!==void 0&&r.push(f)}}catch{}return r}a(b,"collectFromPersistedEvents");var ke="lean-detector",kt="lean-debt-growth",St=3,be=["off","lite","full","ultra"];function Tt(n){let e=n?.lean?.mode;if(e&&be.includes(e))return e;let t=process.env.PRJCT_LEAN_MODE?.toLowerCase();return t&&be.includes(t)?t:"off"}a(Tt,"effectiveMode");async function Se(n,e){let t={active:!1,total:0,previous:0,persisted:!1},s=e!==void 0?e:await S.readConfig(n).catch(()=>null);if(!s?.projectId||Tt(s)==="off")return t;t.active=!0;try{let r=await Rt(n);if(t.total=r,r===0)return t;let i=Et(s.projectId);t.previous=i;let o=r-i;i>0&&o>=St&&(await h.remember(n,{type:"lean-debt",content:`Lean debt growing: \`lean:\` markers rose by ${o} (now ${r}, was ${i}). Deferred simplifications are accumulating \u2014 consider a leaning pass via \`prjct lean debt\`.`,tags:{source:ke,pattern:kt,total:String(r),previous:String(i),delta:String(o)},provenance:"inferred",projectId:s.projectId}),t.persisted=!0)}catch{}return t}a(Se,"detectAndPersistLeanDebt");async function Rt(n){let e=await I(["grep","-cI","-e","lean:"],{cwd:n,maxBuffer:16777216});if(!e.ok){if(M(e,1))return 0;C(e)}return e.stdout.split(`
|
|
11
|
+
`).reduce((t,s)=>{let r=s.lastIndexOf(":");if(r<=0)return t;let i=Number.parseInt(s.slice(r+1),10);return Number.isFinite(i)?t+i:t},0)}a(Rt,"measureLeanMarkers");function Et(n){return b(n,"SELECT data FROM events WHERE type = 'memory.remember.lean-debt' ORDER BY id DESC LIMIT 50",[],t=>{if(t.source!==ke)return;let s=typeof t.total=="string"?Number.parseInt(t.total,10):0;return Number.isFinite(s)?s:void 0})[0]??0}a(Et,"collectPreviousSnapshot");import _t from"node:path";V();var At="hot-file",Te="pattern-detector-auto",It="recurring-bug",Re="pattern-detector-recurring",Ct="tech-debt-growth",Ee="pattern-detector-debt",N=7,xt=3,$=30,Pt=2,Mt=5,Dt=[/^package(-lock)?\.json$/,/^bun\.lock(b)?$/,/^pnpm-lock\.yaml$/,/^yarn\.lock$/,/^CHANGELOG\.md$/,/^\.gitignore$/,/\.snap$/,/^dist\//,/^node_modules\//];async function _e(n,e){let t={scanned:0,hotFiles:[],persisted:0,skipped:[],errors:[]},s=e!==void 0?e:await S.readConfig(n).catch(()=>null);if(!s?.projectId)return t.errors.push("no project config"),t;try{let r=await Lt(n);if(t.scanned+=r.length,t.hotFiles=r,r.length>0){let i=Ft(s.projectId);for(let o of r){if(i.has(o.path)){t.skipped.push({reason:"already-marked-this-window",file:o.path});continue}try{await h.remember(n,{type:"learning",content:`Hot file: \`${o.path}\` \u2014 ${o.touches} touches in the last ${N} days. Worth a refactor pass or a deliberate decision about why it churns this often.`,tags:{source:Te,pattern:At,file:o.path,touches:String(o.touches),window_days:String(N)},provenance:"inferred"}),t.persisted+=1}catch(c){t.errors.push(`remember failed for ${o.path}: ${c.message}`)}}}}catch(r){t.errors.push(`hot-file detection failed: ${r.message}`)}try{let r=Nt(s.projectId);if(r.length>0){let i=jt(s.projectId);for(let o of r){if(i.has(o.topic)){t.skipped.push({reason:"recurring-bug-already-marked",file:o.topic});continue}try{await h.remember(n,{type:"learning",content:`Recurring bug pattern: gotchas tagged \`topic:${o.topic}\` reported ${o.occurrences} times in the last ${$} days. Likely a real underlying issue \u2014 consider a focused investigation before patching the next instance.`,tags:{source:Re,pattern:It,topic:o.topic,occurrences:String(o.occurrences),window_days:String($)},provenance:"inferred"}),t.persisted+=1}catch(c){t.errors.push(`remember failed for recurring ${o.topic}: ${c.message}`)}}}}catch(r){t.errors.push(`recurring-bug detection failed: ${r.message}`)}try{let r=await $t(n);if(r.totalCount>0){let i=Ht(s.projectId),o=r.totalCount-i;if(i>0&&o>=Mt)try{await h.remember(n,{type:"learning",content:`Tech debt growing: TODO/FIXME/XXX count rose by ${o} (now ${r.totalCount}, was ${i}). Consider a focused debt-reduction pass before adding more features.`,tags:{source:Ee,pattern:Ct,total:String(r.totalCount),previous:String(i),delta:String(o)},provenance:"inferred"}),t.persisted+=1}catch(c){t.errors.push(`remember failed for tech-debt: ${c.message}`)}}}catch(r){t.errors.push(`tech-debt detection failed: ${r.message}`)}return t}a(_e,"detectAndPersistPatterns");async function Lt(n){let e=await I(["log",`--since=${N}.days.ago`,"--name-only","--pretty=format:","-z"],{cwd:n,maxBuffer:16777216,timeoutMs:15e3});if(!e.ok){if(e.kind==="exit")return[];C(e)}let t=new Map;for(let r of e.stdout.split("\0")){let i=r.trim();i&&(Ot(i)||t.set(i,(t.get(i)??0)+1))}let s=[];for(let[r,i]of t)i<xt||s.push({path:r,touches:i});return s.sort((r,i)=>i.touches-r.touches),s}a(Lt,"detectHotFiles");function Ot(n){let e=_t.basename(n);for(let t of Dt)if(t.test(n)||t.test(e))return!0;return!1}a(Ot,"isIgnored");function Nt(n){let e=new Date(Date.now()-$*24*60*60*1e3).toISOString(),t=b(n,"SELECT data, timestamp FROM events WHERE type = 'memory.remember.gotcha' AND timestamp >= ? ORDER BY id DESC LIMIT 500",[e],i=>{if(i.source==="transcript-auto")return;let o=typeof i.topic=="string"?i.topic:void 0,c=typeof i.area=="string"?i.area:void 0;return(o??c)||void 0}),s=new Map;for(let i of t)s.set(i,(s.get(i)??0)+1);let r=[];for(let[i,o]of s)o<Pt||r.push({topic:i,occurrences:o});return r.sort((i,o)=>o.occurrences-i.occurrences),r}a(Nt,"detectRecurringBugs");async function $t(n){let e=await I(["grep","-cE","\\b(TODO|FIXME|XXX)\\b"],{cwd:n,maxBuffer:16777216});if(!e.ok){if(M(e,1))return{totalCount:0};C(e)}return{totalCount:e.stdout.split(`
|
|
12
|
+
`).reduce((s,r)=>{let i=r.lastIndexOf(":");if(i<=0)return s;let o=Number.parseInt(r.slice(i+1),10);return Number.isFinite(o)?s+o:s},0)}}a($t,"measureTechDebt");function Ht(n){return b(n,"SELECT data FROM events WHERE type = 'memory.remember.learning' ORDER BY id DESC LIMIT 50",[],t=>{if(t.source!==Ee)return;let s=typeof t.total=="string"?Number.parseInt(t.total,10):0;return Number.isFinite(s)?s:void 0})[0]??0}a(Ht,"collectPreviousDebtSnapshot");function Ft(n){let e=Date.now()-N*24*60*60*1e3,t=b(n,"SELECT data FROM events WHERE type = 'memory.remember.learning' ORDER BY id DESC LIMIT 200",[],(s,r)=>{if(s.source!==Te)return;let i=s.file,o=r.rememberedAt;if(typeof i=="string"){if(typeof o=="string"){let c=Date.parse(o);if(!Number.isNaN(c)&&c<e)return}return i}});return new Set(t)}a(Ft,"collectAlreadyMarkedHotFiles");function jt(n){let e=Date.now()-$*24*60*60*1e3,t=b(n,"SELECT data FROM events WHERE type = 'memory.remember.learning' ORDER BY id DESC LIMIT 200",[],(s,r)=>{if(s.source!==Re)return;let i=s.topic,o=r.rememberedAt;if(typeof i=="string"){if(typeof o=="string"){let c=Date.parse(o);if(!Number.isNaN(c)&&c<e)return}return i}});return new Set(t)}a(jt,"collectAlreadyMarkedRecurringBugs");import R from"node:fs/promises";import K from"node:path";rt();st();G();var Ut={conservative:{inboxDays:30,archivesDays:180,checkpointsDays:null},standard:{inboxDays:14,archivesDays:90,checkpointsDays:30},aggressive:{inboxDays:7,archivesDays:30,checkpointsDays:14}};function Bt(n=process.env){let e=(n.PRJCT_CLEANUP_AGGRESSIVENESS??"standard").toLowerCase();return Ut[e==="conservative"||e==="standard"||e==="aggressive"?e:"standard"]}a(Bt,"resolveProfile");async function Gt(n,e){let t=Date.now()-e*24*60*60*1e3,r=h.recall(n,{types:["inbox"],limit:200}).filter(o=>Date.parse(o.rememberedAt)<t);if(r.length===0)return 0;let i=[];for(let o of r)try{J.archive(n,{entityType:"memory_entry",entityId:o.id,entityData:{type:o.type,content:o.content,tags:o.tags,rememberedAt:o.rememberedAt},summary:o.content.slice(0,80),reason:`inbox-age-out (>${e}d)`});let c=o.id.startsWith("mem_")?o.id.slice(4):null;c&&v.run(n,"UPDATE events SET type = ? WHERE id = ?","memory.archived.inbox",Number(c)),v.run(n,"UPDATE memory_entries SET deleted_at = ? WHERE id = ?",Date.now(),o.id),i.push(o.id)}catch{}return i.length}a(Gt,"archiveAgedInbox");async function Jt(n,e){if(e===null)return 0;let t=K.join(ee.getGlobalProjectPath(n),"checkpoints"),s=await R.readdir(t).catch(()=>null);if(!s)return 0;let r=Date.now()-e*24*60*60*1e3,i=[];for(let o of s){if(!o.endsWith(".json"))continue;let c=K.join(t,o);try{(await R.stat(c)).mtimeMs<r&&(await R.unlink(c),i.push(c))}catch{}}return i.length}a(Jt,"pruneOldCheckpoints");async function Wt(){let{getVerifyCachePath:n}=await import("./context7-service-NH4BMGSJ.mjs"),e=n();try{let t=await R.stat(e);if((Date.now()-t.mtimeMs)/(1440*60*1e3)>7)return await R.unlink(e),!0}catch{}return!1}a(Wt,"rotateContext7Cache");var Xt=1440*60*1e3,Kt=["prompt-state-","prompt-git-","prompt-afteremit-","stop-heavy-","kimi-session-"];async function zt(){let n=P.runDir(),e=await R.readdir(n).catch(()=>null);if(!e)return 0;let t=Date.now()-Xt,s=[];for(let r of e){if(!Kt.some(o=>r.startsWith(o)))continue;let i=K.join(n,r);try{(await R.stat(i)).mtimeMs<t&&(await R.unlink(i),s.push(i))}catch{}}return s.length}a(zt,"sweepRunDirStamps");async function Ae(n){let e=Bt(),t={inboxArchived:0,archivesPruned:0,checkpointsRemoved:0,context7CacheRotated:!1,stampsRemoved:0};try{t.inboxArchived=await Gt(n,e.inboxDays)}catch{}try{t.archivesPruned=J.pruneOldArchives(n,e.archivesDays)}catch{}try{t.checkpointsRemoved=await Jt(n,e.checkpointsDays)}catch{}try{t.context7CacheRotated=await Wt()}catch{}try{t.stampsRemoved=await zt()}catch{}return t}a(Ae,"runSessionCleanup");async function Ie(n,e){if(e.inboxArchived+e.archivesPruned+e.checkpointsRemoved+e.stampsRemoved+(e.context7CacheRotated?1:0)===0)return;let r=`Session cleanup: ${[e.inboxArchived>0?`${e.inboxArchived} inbox archived`:null,e.archivesPruned>0?`${e.archivesPruned} archives pruned`:null,e.checkpointsRemoved>0?`${e.checkpointsRemoved} checkpoints removed`:null,e.stampsRemoved>0?`${e.stampsRemoved} stale hook stamps removed`:null,e.context7CacheRotated?"context7 cache rotated":null].filter(i=>!!i).join(", ")}`;v.appendEvent(n,"memory.remember.system-event",{content:r,tags:{source:"session-cleanup",key:"last-cleanup"},provenance:"extracted",content_hash:te(r),project_id:n})}a(Ie,"recordCleanupReport");import Yt from"node:crypto";import qt from"node:fs/promises";import{z as w}from"zod";et();G();var xe="crew-run:",Ce=w.object({id:w.string().min(1),spec_id:w.string().nullable().default(null),task_id:w.string().nullable().default(null),started_at:w.string().min(1),ended_at:w.string().min(1),implementer_summary:w.string().default(""),files_touched:w.array(w.string()).default([]),reviewer_verdict:w.enum(["APPROVED","CHANGES_REQUESTED"]),reviewer_notes:w.string().nullable().default(null)});function H(n){return`${xe}${n}`}a(H,"keyFor");var z=class{static{a(this,"CrewRunStorage")}record(e,t){let s=t.runId??ne(),r=v.getDoc(e,H(s));if(r)return r;let i=Q(),o=Ce.parse({id:s,spec_id:t.specId??null,task_id:t.taskId??null,started_at:t.startedAt??i,ended_at:t.endedAt??i,implementer_summary:t.implementerSummary,files_touched:t.filesTouched,reviewer_verdict:t.reviewerVerdict,reviewer_notes:t.reviewerNotes??null});return v.setDoc(e,H(s),o),o}get(e,t){return v.getDoc(e,H(t))}list(e){return v.listDocsByPrefix(e,xe).map(s=>Ce.parse(s.data))}delete(e,t){v.deleteDoc(e,H(t))}},Pe=new z;var Oe="skill-miss-detector",Me=3,Vt=280,Qt=["decision","gotcha","anti-pattern"],Zt=5400*1e3,en=360*60*1e3,tn=2,Ne=5,nn=8,$e=new Set(["should","because","project","prjct","instead","always","never","using","value","state","change","changes","update","updated","function","return","returns","error","errors","tests","testing","config","default","import","export","before","after","without"]);async function He(n,e,t,s={}){let r=s.preloadedLines?s.preloadedLines:await qt.readFile(e,"utf-8").then(sn).catch(()=>null);if(!r)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let i=x(n);if(!i)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let o=on(r);if(!o)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let c=(()=>{try{return ln(i,t)}catch{return null}})();if(!c)return{signalsRecorded:0,signalsSkipped:0,failures:[]};if(c.length===0)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let l=await se(n).catch(()=>[]),u=(()=>{try{let m=Date.now()-en;return new Set(Pe.list(i).filter(g=>Date.parse(g.ended_at)>m).flatMap(g=>g.files_touched))}catch{return new Set}})(),f=rn(o,l,c,u);if(f.length===0)return{signalsRecorded:0,signalsSkipped:0,failures:[]};let d=pn(i),p=[];for(let m of f.slice(0,Me)){let g=un(m.memId,m.excerpt).slice(0,12);if(d.has(g)){p.push("skipped");continue}try{await h.remember(n,{type:"improvement-signal",content:cn(m),tags:{source:Oe,kind:"skill-miss",category:"skill-miss",...s.runtime?{runtime:s.runtime}:{},...s.model?{model:s.model}:{},relates:m.memId,file:m.evidenceFile,key:g,...t?{session:t}:{}},provenance:"extracted",projectId:i}),D.penalizeSkillMiss(i,m.memId),p.push("recorded")}catch{p.push("skipped")}}let y=p.filter(m=>m==="recorded").length,A=p.filter(m=>m==="skipped").length;return{signalsRecorded:y,signalsSkipped:A,failures:f.slice(0,Me).map(m=>({category:"skill-miss",expectedBehavior:`Apply relevant project rule ${m.memId}.`,observedBehavior:"Relevant project knowledge was not referenced in the session.",relatedRuleId:m.memId}))}}a(He,"detectSkillMisses");function rn(n,e,t,s=new Set){let r=De(n);if(r.size===0)return[];let i=e.filter(l=>!s.has(l)),o=F(i),c=[];for(let l of t){let u=De(`${l.content} ${l.fileTag}`);if(u.size===0)continue;let f=l.fileTag!==""&&i.some(g=>Le(g,l.fileTag))||[...o].some(g=>u.has(g)),d=an(u),p=[...u].filter(g=>!d.has(g)&&r.has(g)).length;if(!(f||p>=tn)||[...d].some(g=>r.has(g)))continue;let m=l.fileTag!==""&&i.some(g=>Le(g,l.fileTag))?l.fileTag:i.find(g=>[...F([g])].some(Ze=>u.has(Ze)))??"";c.push({miss:{memId:l.id,memType:l.type,excerpt:l.content.replace(/\s+/g," ").trim().slice(0,Vt),evidenceFile:m,reason:f?"path-overlap-unused":"topic-overlap-unused"},rank:f?2:1,overlap:p})}return c.sort((l,u)=>u.rank-l.rank||u.overlap-l.overlap),c.map(l=>l.miss)}a(rn,"analyze");function sn(n){return T(n)}a(sn,"parseJsonl");function on(n){let e=[];for(let t of n){let s=t.role??t.message?.role;if(s!=="user"&&s!=="assistant")continue;let r=O(t.content??t.message?.content);r&&e.push(r)}return e.join(`
|
|
13
|
+
`).toLowerCase()}a(on,"transcriptTextOf");function De(n){let e=new Set;for(let t of n.toLowerCase().split(/[^a-z0-9]+/))t.length<Ne||$e.has(t)||e.add(t);return e}a(De,"tokenize");function an(n){let e=[...n].filter(s=>s.length>=nn);if(e.length>0)return new Set(e);let t=[...n].sort((s,r)=>r.length-s.length||s.localeCompare(r))[0]??"";return t?new Set([t]):new Set}a(an,"signatureOf");function F(n){let e=new Set;for(let t of n)for(let s of t.split("/")){let r=s.replace(/\.[a-z0-9]+$/i,"").toLowerCase();r.length>=Ne&&!$e.has(r)&&e.add(r)}return e}a(F,"fileStems");function Le(n,e){let t=F([n]);for(let s of F([e]))if(t.has(s))return!0;return!1}a(Le,"sharesStem");function cn(n){let e=n.evidenceFile!==""?`touched \`${n.evidenceFile}\``:"worked the same area";return[`[skill-miss] Unused project knowledge (${n.memType}, ${n.memId}): "${n.excerpt}"`,`This session ${e} but never referenced it. Apply it, or supersede it via: prjct remember decision "<resolution>" --tags resolves:skill-miss,relates:${n.memId}`].join(`
|
|
14
|
+
`)}a(cn,"formatSkillMiss");function un(n,e){let t=`${n}::${e.toLowerCase().replace(/\s+/g," ").trim()}`;return Yt.createHash("sha256").update(t).digest("hex")}a(un,"hashKey");function ln(n,e){let t=h.recall(n,{types:[...Qt],limit:120}),s=Date.now()-Zt,r=[];for(let i of t)i.provenance!=="inferred"&&(Date.parse(i.rememberedAt)>s||e&&i.tags.session===e||r.push({id:i.id,type:i.type,content:i.content,fileTag:i.tags.file??"",rememberedAt:i.rememberedAt,provenance:i.provenance,session:i.tags.session??""}));return r}a(ln,"recallCandidates");function pn(n){try{let e=h.recall(n,{types:["improvement-signal"],tags:{source:Oe},limit:100,dedupeByKey:!1}),t=new Set;for(let s of e)s.tags.key&&t.add(s.tags.key);return t}catch{return new Set}}a(pn,"existingSkillMissKeys");import dn from"node:crypto";import fn from"node:fs/promises";var Ue="transcript-auto",mn="v2",Be=80,Ge=20,j=1500,gn=12,Fe=4,hn=[{phrase:"decided to",type:"decision"},{phrase:"we chose",type:"decision"},{phrase:"going with",type:"decision"},{phrase:"the right call",type:"decision"},{phrase:"best approach is",type:"decision"},{phrase:"we will use",type:"decision"},{phrase:"shipping with",type:"decision"},{phrase:"turns out that",type:"learning"},{phrase:"now i understand",type:"learning"},{phrase:"the key insight",type:"learning"},{phrase:"i learned that",type:"learning"},{phrase:"discovered that",type:"learning"},{phrase:"root cause is",type:"learning"},{phrase:"root cause was",type:"learning"},{phrase:"the fix is",type:"learning"},{phrase:"gotcha:",type:"gotcha"},{phrase:"bug:",type:"gotcha"},{phrase:"fails when",type:"gotcha"},{phrase:"breaks when",type:"gotcha"},{phrase:"be careful",type:"gotcha"},{phrase:"never do this",type:"gotcha"},{phrase:"trap:",type:"gotcha"},{phrase:"important:",type:"fact"},{phrase:"always use",type:"fact"},{phrase:"never write",type:"fact"},{phrase:"the pattern is",type:"pattern"},{phrase:"anti-pattern:",type:"anti-pattern"},{phrase:"antipattern:",type:"anti-pattern"}],Je=[{re:/^(?:[-*•]\s+)?(?:\*\*)?decision(?:\*\*)?\s*[:—-]\s+/i,type:"decision",phrase:"label:decision"},{re:/^(?:[-*•]\s+)?(?:\*\*)?(learning|insight)(?:\*\*)?\s*[:—-]\s+/i,type:"learning",phrase:"label:learning"},{re:/^(?:[-*•]\s+)?(?:\*\*)?(gotcha|trap|warning)(?:\*\*)?\s*[:—-]\s+/i,type:"gotcha",phrase:"label:gotcha"},{re:/^(?:[-*•]\s+)?(?:\*\*)?(fact|note)(?:\*\*)?\s*[:—-]\s+/i,type:"fact",phrase:"label:fact"},{re:/^(?:[-*•]\s+)?(?:\*\*)?root\s*cause(?:\*\*)?\s*[:—-]\s+/i,type:"learning",phrase:"label:root-cause"},{re:/^(?:[-*•]\s+)?(?:\*\*)?pattern(?:\*\*)?\s*[:—-]\s+/i,type:"pattern",phrase:"label:pattern"},{re:/^(?:[-*•]\s+)?(?:\*\*)?anti[- ]?pattern(?:\*\*)?\s*[:—-]\s+/i,type:"anti-pattern",phrase:"label:anti-pattern"}];async function We(n,e,t,s={}){let r={scanned:0,ingested:0,skipped:[],errors:[]},i=s.preloadedConfig!==void 0?s.preloadedConfig:await S.readConfig(n).catch(()=>null);if(!i?.projectId)return r.errors.push("no project config"),r;let o=await(async()=>{if(s.preloadedLines)return s.preloadedLines;try{return T(await fn.readFile(e,"utf-8"))}catch(p){return r.errors.push(`transcript read failed: ${p.message}`),null}})();if(o===null)return r;let c=yn(o),l=wn(o);if(r.scanned=c.length+l.length,c.length===0&&l.length===0)return r;let u=[...Sn(c),...bn(l)];if(u.length===0)return r;let f=Rn(i.projectId),d=t?t.slice(0,12):"unknown";for(let p of u){if(f.has(p.hash)){r.skipped.push({reason:"duplicate",phrase:p.matchedPhrase});continue}try{await h.remember(n,{type:p.type,content:p.content,tags:{source:Ue,capture:mn,session:d,hash:p.hash,phrase:p.matchedPhrase},provenance:"inferred",projectId:i.projectId}),r.ingested+=1}catch(y){r.errors.push(`remember failed: ${y.message}`)}}return r}a(We,"ingestTranscript");function yn(n){let e=[];for(let t of n){let s=Xe(t);if(s!=="assistant")continue;let r=Ke(t);!r||r.length<Be||e.push({role:s,text:r})}return e}a(yn,"projectMessages");function wn(n){let e=[];for(let t of n){let s=Xe(t);if(s!=="user")continue;let r=Ke(t);!r||r.length<Ge||e.push({role:s,text:r})}return e}a(wn,"projectUserMessages");var vn=[{re:/^(?:please\s+)?always\b/i,phrase:"user:always"},{re:/^(?:please\s+)?never\b/i,phrase:"user:never"},{re:/\bi (?:always|never|prefer)\b/i,phrase:"user:i-prefer"},{re:/^(?:rule|preference)\s*[:—-]/i,phrase:"user:rule"},{re:/\bno more\s+(?:features?|feature\s+creep)\b/i,phrase:"user:no-more-features"},{re:/\bdon'?t add (?:more )?(?:features?|surface)\b/i,phrase:"user:dont-add-features"}];function bn(n){let e=[],t=new Set;for(let s of n){if(e.length>=Fe)break;let r=s.text.split(/\n/).map(o=>o.replace(/^[-*•]\s+/,"").trim()).filter(o=>o.length>=Ge),i=r.length>0?r:[s.text.trim()];for(let o of i){if(e.length>=Fe)break;let c=vn.find(f=>f.re.test(o));if(!c)continue;let l=o.length>j?`${o.slice(0,j)}\u2026`:o,u=ze(l);t.has(u)||(t.add(u),e.push({type:"feedback",content:l,hash:u,matchedPhrase:c.phrase}))}}return e}a(bn,"extractUserPreferenceCandidates");function Xe(n){let e=n.role;if(typeof e=="string")return je(e);let t=n.message;if(t&&typeof t=="object"&&"role"in t){let r=t.role;if(typeof r=="string")return je(r)}let s=n.type;return s==="assistant"||s==="user"||s==="system"?s:null}a(Xe,"inferRole");function je(n){let e=n.toLowerCase();return e==="assistant"||e==="user"||e==="system"?e:null}a(je,"normalizeRole");function Ke(n){let e=n.content===void 0&&n.message&&typeof n.message=="object"?n.message.content:n.content;if(typeof e=="string")return e.trim();if(Array.isArray(e)){let t=[];for(let s of e){if(!s||typeof s!="object")continue;let r=s;r.type==="text"&&typeof r.text=="string"&&t.push(r.text)}return t.join(`
|
|
15
|
+
`).trim()}return""}a(Ke,"extractText");function kn(n){let e=n.trim();if(e.length<Be)return null;for(let r of Je)if(r.re.test(e))return{type:r.type,matchedPhrase:r.phrase};let t=e.toLowerCase(),s=hn.find(r=>t.includes(r.phrase));return s?{type:s.type,matchedPhrase:s.phrase}:null}a(kn,"classifyCaptureParagraph");function Sn(n){let e=[],t=new Set;for(let s of n){let r=Tn(s.text);for(let i of r){if(e.length>=gn)return e;let o=kn(i);if(!o)continue;let c=i.length>j?`${i.slice(0,j)}\u2026`:i,l=ze(c);t.has(l)||(t.add(l),e.push({type:o.type,content:c,hash:l,matchedPhrase:o.matchedPhrase}))}}return e}a(Sn,"extractCandidates");function Tn(n){let e=n.split(/\n\s*\n/).map(s=>s.trim()).filter(Boolean),t=[];for(let s of e){let r=s.split(`
|
|
16
|
+
`).map(o=>o.trim()).filter(Boolean);if(r.some(o=>Je.some(c=>c.re.test(o)))&&r.length>1)for(let o of r)t.push(o);else t.push(s)}return t}a(Tn,"splitParagraphs");function ze(n){return dn.createHash("sha256").update(n.toLowerCase().trim()).digest("hex").slice(0,16)}a(ze,"hashContent");function Rn(n){try{let{REMEMBER_EVENT_RANGE:e}=(at(),q(ot)),t=b(n,"SELECT data FROM events WHERE type >= ? AND type < ? ORDER BY id DESC LIMIT 500",[...e],s=>{if(s.source!==Ue)return;let r=s.hash;return typeof r=="string"?r:void 0});return new Set(t)}catch{return new Set}}a(Rn,"collectExistingAutoHashes");nt();tt();import En from"node:fs/promises";import Ye from"node:path";function _n(){return process.env.PRJCT_TEST_MODE==="1"?Ye.join(B(".prjct-tests"),"kimi-code","sessions"):B(".kimi-code","sessions")}a(_n,"getKimiSessionsRoot");async function qe(n,e=_n()){let t=n.replace(/[^a-zA-Z0-9_-]/g,"");if(!t)return;let s=t.startsWith("session_")?[t]:[t,`session_${t}`],r=await En.readdir(e,{withFileTypes:!0}).catch(()=>[]);for(let i of r)if(i.isDirectory())for(let o of s){let c=Ye.join(e,i.name,o,"agents","main","wire.jsonl");if(await Z(c))return c}}a(qe,"resolveKimiTranscriptPath");var U=600*1e3,_=new Map;function An(n){let e=n.replace(/[^a-zA-Z0-9._-]/g,"_");return Ve.join(P.runDir(),`stop-heavy-${e}.stamp`)}a(An,"heavyStepStampPath");async function Qe(n,e,t=!0){if(await k.stat(n).then(i=>e-i.mtimeMs<U).catch(()=>!1))return!1;let r=`${n}.lock`;try{await k.mkdir(r)}catch(i){if(i.code!=="EEXIST")throw i;return!await k.stat(r).then(c=>e-c.mtimeMs>=U).catch(()=>!1)||!t?!1:(await k.rmdir(r).catch(()=>{}),Qe(n,e,!1))}try{return await k.stat(n).then(o=>e-o.mtimeMs<U).catch(()=>!1)?!1:(await k.writeFile(n,String(e)),!0)}finally{await k.rmdir(r).catch(()=>{})}}a(Qe,"claimHeavyStep");async function In(n){let e=Date.now(),t=_.get(n)??0;if(e-t<U)return!1;try{let s=An(n);await k.mkdir(Ve.dirname(s),{recursive:!0});let r=await Qe(s,e);return _.size>32&&_.clear(),_.set(n,e),r}catch{}return _.size>32&&_.clear(),_.set(n,e),!0}a(In,"heavyStepsDue");function ls(n=process.cwd(),e){return ce({event:"Stop",projectPath:n,afterEmit:a(async(t,s,r)=>{let i=await S.readConfig(s).catch(()=>null);if(!i?.projectId)return;let o=we({hookHost:r}),c=t.transcript_path??(r==="kimi"&&t.session_id?await qe(t.session_id).catch(()=>{}):void 0),l=await In(i.projectId),u={};if(l&&c){let d=await k.readFile(c,"utf-8").catch(()=>null);d!==null&&(u.transcriptLines=T(d))}let f=ue(u.transcriptLines??[]);if(l)try{let{collectActiveTasks:d}=await import("./task-overview-F3GB77OA.mjs"),p=await d(i.projectId,s);u.activeTaskId=p.current?.id,u.activeTaskDescription=p.current?.description,u.activeTaskStartedAt=p.current?.startedAt}catch{}if(u.transcriptLines&&u.transcriptLines.length>0)try{if(u.transcriptUsage=X(u.transcriptLines),u.transcriptUsage.tokensIn+u.transcriptUsage.tokensOut>0){let d=u.activeTaskStartedAt?{sinceIso:u.activeTaskStartedAt}:void 0,p=X(u.transcriptLines,d);if(u.activeTaskId&&p.tokensIn+p.tokensOut>0){W(i.projectId,u.activeTaskId,p.tokensIn,p.tokensOut,{description:u.activeTaskDescription,agent:o,source:`${o}-transcript`});try{let{sumTranscriptUsageByModel:y}=await import("./transcript-jsonl-7W2NOJPZ.mjs");for(let[A,m]of y(u.transcriptLines,d))m.tokensIn+m.tokensOut<=0||W(i.projectId,u.activeTaskId,m.tokensIn,m.tokensOut,{model:A,agent:o,source:`${o}-transcript:${A}`})}catch{}}}}catch{}if(ae({projectId:i.projectId,sessionId:t.session_id,directory:s,taskId:u.activeTaskId,goal:u.activeTaskDescription,tokensIn:u.transcriptUsage?.tokensIn,tokensOut:u.transcriptUsage?.tokensOut,agent:o,model:f}),l&&c)try{await We(s,c,t.session_id??null,{preloadedConfig:i,preloadedLines:u.transcriptLines})}catch{}if(l){try{await _e(s,i)}catch{}try{await Se(s,i)}catch{}try{let d=await Ae(i.projectId);await Ie(i.projectId,d),L.pruneRetained(i.projectId)}catch{}}if(l&&c)try{let d=await ge(s,c,t.session_id??null,{preloadedLines:u.transcriptLines,runtime:o,model:f});for(let p of d.failures)try{L.record(i.projectId,{source:"friction-detector",runtime:o,model:f,sessionId:t.session_id??null,taskId:u.activeTaskId??null,...p})}catch{}d.signalsRecorded>0&&u.activeTaskId&&D.penalizeSurfaced(i.projectId,u.activeTaskId)}catch{}if(l&&c)try{let d=await He(s,c,t.session_id??null,{preloadedLines:u.transcriptLines,runtime:o,model:f});for(let p of d.failures)try{L.record(i.projectId,{source:"skill-miss-detector",runtime:o,model:f,sessionId:t.session_id??null,taskId:u.activeTaskId??null,...p})}catch{}}catch{}if(l)try{await re.backfill(i.projectId,i,new Date().toISOString())}catch{}if(l&&u.activeTaskId){let d={projectId:i.projectId,projectPath:s,cycleDescription:u.activeTaskDescription??null,cycleId:u.activeTaskId,tokensIn:u.transcriptUsage?.tokensIn,tokensOut:u.transcriptUsage?.tokensOut,model:f},p=a(async y=>{try{await y()}catch{}},"runBestEffort");await p(async()=>{let{synthesizeLandHandoff:y}=await import("./land-synthesis-ZVPFJERV.mjs");await y(d)}),await p(async()=>{let{synthesizeJudgmentReceipt:y}=await import("./judgment-receipt-QLV3MYFT.mjs");await y(d)})}try{let{flushIfLinked:d}=await import("./auto-flush-DX3FVSQE.mjs");await d(s,i)}catch{}},"afterEmit")},e)}a(ls,"runStopHook");export{An as heavyStepStampPath,In as heavyStepsDue,ls as runStopHook};
|
|
@@ -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}from"./chunk-OLQAMCYV.mjs";import"./chunk-NJ74RHNC.mjs";import{a as i}from"./chunk-WUOVBBPC.mjs";import"./chunk-KDNUQPAK.mjs";import"./chunk-33BHU4OM.mjs";import"./chunk-ZYCNW75E.mjs";import"./chunk-JR542RI2.mjs";import"./chunk-CPR4FPXG.mjs";import"./chunk-3HGQPUKG.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-TF6PN7IB.mjs";import"./chunk-XYKVWO23.mjs";import"./chunk-7PBWIO4K.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-PVCEWFHS.mjs";import"./chunk-LR24AIEW.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-JGZ3QGWX.mjs";import"./chunk-QXCEBAIA.mjs";import"./chunk-GAOQHD5S.mjs";import{b as n}from"./chunk-ZZBNFNMG.mjs";import"./chunk-3FEXJUO2.mjs";import{d as e,g as m}from"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as o}from"./chunk-E66B27AL.mjs";m();function l(c=process.cwd(),p){return i({event:"SubagentStart",projectPath:c,build:o((u,t)=>a(t),"build"),afterEmit:o(async(u,t)=>{try{let r=await n.readConfig(t);if(!r?.projectId)return;let{collectActiveTasks:s}=await import("./task-overview-F3GB77OA.mjs"),d=await s(r.projectId,t);e.appendEvent(r.projectId,"subagent.spawned",{taskId:d.current?.id??null})}catch{}},"afterEmit")},p)}o(l,"runSubagentStartHook");export{l as runSubagentStartHook};
|
|
@@ -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 f,b as p}from"./chunk-OWOPA2O7.mjs";import{a as s}from"./chunk-
|
|
8
|
+
import{a as f,b as p}from"./chunk-OWOPA2O7.mjs";import{a as s}from"./chunk-WUOVBBPC.mjs";import{a}from"./chunk-3UB6SFRA.mjs";import{a as c}from"./chunk-YHOZTAZH.mjs";import"./chunk-XSJ7SPVR.mjs";import"./chunk-R4ILCXKE.mjs";import"./chunk-D7DQABWO.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-ETTDRXQ6.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-JGZ3QGWX.mjs";import"./chunk-GAOQHD5S.mjs";import{b as r}from"./chunk-ZZBNFNMG.mjs";import"./chunk-3FEXJUO2.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a as i}from"./chunk-E66B27AL.mjs";function w(u=process.cwd(),g){return s({event:"SubagentStop",projectPath:u,afterEmit:i(async(d,n)=>{let o=await r.readConfig(n).catch(()=>null);if(!o?.projectId||f(o)==="off")return;let e=[];try{let t=await a(o.projectId,n);t.current&&e.push(`active: ${t.current.description}`)}catch{}try{let t=await c.getActiveTasks(o.projectId);t.length>0&&e.push(`pending: ${t.length}`)}catch{}await p("prjct \u2014 subagent finished",e.join(" \xB7 ")||"A subagent finished")},"afterEmit")},g)}i(w,"runSubagentStopHook");export{w as runSubagentStopHook};
|
package/dist/bin/hook-chunks/{surface-attribution-K37N2NK7.mjs → surface-attribution-EGIKCVMF.mjs}
RENAMED
|
@@ -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}from"./chunk-
|
|
8
|
+
import{a}from"./chunk-ADYTBOCZ.mjs";import"./chunk-TF6PN7IB.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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 recordSurfacedForActiveTask};
|
|
@@ -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,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n}from"./chunk-
|
|
8
|
+
import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n}from"./chunk-3HGQPUKG.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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{b as extractFile,l as fileFanIn,m as fileFanInByFile,n as filesCallingInto,e as hasSymbolIndex,c as indexSymbols,g as listAllSymbols,f as loadMeta,i as scoreFilesFromQuery,h as searchSymbols,a as stripNoise,j as symbolsInFile,k as tracePath,d as updateSymbols};
|
|
@@ -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}from"./chunk-
|
|
8
|
+
import{c as a,d as b}from"./chunk-OC4CYF7V.mjs";import"./chunk-3FBCOCPD.mjs";import"./chunk-XDBJSJOT.mjs";import"./chunk-A6K4H3YT.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{b as default,a as syncClient};
|
package/dist/bin/hook-chunks/{sync-cursor-storage-E3LMZISA.mjs → sync-cursor-storage-ZB7FGT6D.mjs}
RENAMED
|
@@ -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{e as s,g as a}from"./chunk-
|
|
8
|
+
import{e as s,g as a}from"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import{b as i,h as o}from"./chunk-A6K4H3YT.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 l}from"./chunk-E66B27AL.mjs";o();a();var d=class{static{l(this,"SyncCursorStorage")}get(t,r=null,e=null){if(!e)return null;let n=s.get(t,`SELECT * FROM sync_cursors
|
|
9
9
|
WHERE project_id = ?
|
|
10
10
|
AND device_id = ?
|
|
11
11
|
AND ${r===null?"user_id IS NULL":"user_id = ?"}`,...r===null?[t,e]:[t,e,r]);return n?this.rowToCursor(n):null}touch(t,r=null,e=null){if(!e)return;let n=i();this.upsert({userId:r,deviceId:e,projectId:t,lastEventId:this.getLastEventId(t,r,e),updatedAt:n})}advance(t,r,e={}){let n=e.userId??null,u=e.deviceId??null;if(!u)return;let _=this.getLastEventId(t,n,u);r<=_||this.upsert({userId:n,deviceId:u,projectId:t,lastEventId:r,updatedAt:i()})}getLastEventId(t,r,e){return s.get(t,`SELECT last_event_id FROM sync_cursors
|
package/dist/bin/hook-chunks/{task-orchestration-2ZYE5M6J.mjs → task-orchestration-7NGRIISS.mjs}
RENAMED
|
@@ -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-
|
|
8
|
+
import{a,b,c}from"./chunk-Y7MZA2G4.mjs";import"./chunk-TPESWBA7.mjs";import"./chunk-NCLONKOT.mjs";import"./chunk-22GFTUER.mjs";import"./chunk-YQ55MHKL.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KOGZCFBC.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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{c as orchestrationFor,a as pointsFromDiffLines,b as renderDelegationTrigger};
|
|
@@ -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-
|
|
8
|
+
import{a,b,c}from"./chunk-3UB6SFRA.mjs";import"./chunk-XSJ7SPVR.mjs";import"./chunk-D7DQABWO.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-ETTDRXQ6.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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 collectActiveTasks,b as formatActiveTaskLine,c as formatActiveTaskList};
|
|
@@ -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-M4YM7Z3F.mjs";import"./chunk-LF3S3MYE.mjs";import"./chunk-PPWPUEBH.mjs";import"./chunk-H4CA3XZ6.mjs";import"./chunk-Y3RHBU2R.mjs";import"./chunk-XSJ7SPVR.mjs";import"./chunk-Y7MZA2G4.mjs";import"./chunk-TPESWBA7.mjs";import"./chunk-FEFP6JOL.mjs";import"./chunk-NLL5AV2G.mjs";import"./chunk-NCLONKOT.mjs";import"./chunk-22GFTUER.mjs";import"./chunk-YQ55MHKL.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KOGZCFBC.mjs";import"./chunk-BKJHD5JI.mjs";import"./chunk-CPR4FPXG.mjs";import"./chunk-3HGQPUKG.mjs";import"./chunk-ZJW27EUC.mjs";import"./chunk-SJ75V4WG.mjs";import"./chunk-3CKNJ5RA.mjs";import"./chunk-R4ILCXKE.mjs";import"./chunk-XYKVWO23.mjs";import"./chunk-7PBWIO4K.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-PVCEWFHS.mjs";import"./chunk-LR24AIEW.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-3FBCOCPD.mjs";import"./chunk-D7DQABWO.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-ETTDRXQ6.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-ZZBNFNMG.mjs";import"./chunk-3FEXJUO2.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{e as TASK_CONTEXT_PROMPT,h as completeActiveTask,a as formatRelatedContextForAgent,b as formatRiskForAgent,i as readLastStatus,d as recallRisksForFiles,g as resolveActiveTask,f as setTaskStatus,c as startTask};
|
|
@@ -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 M,b as l}from"./chunk-
|
|
8
|
+
import{a as M,b as l}from"./chunk-WJV24WE6.mjs";import{a as d}from"./chunk-TB57OYGW.mjs";import{a as T,d as k}from"./chunk-MW54MTLB.mjs";import{a as u}from"./chunk-H4CA3XZ6.mjs";import{a as c}from"./chunk-Y3RHBU2R.mjs";import"./chunk-LR24AIEW.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-3FBCOCPD.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import{b as h}from"./chunk-ZZBNFNMG.mjs";import"./chunk-3FEXJUO2.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import{a as D,p as w}from"./chunk-QWQFF2UG.mjs";import"./chunk-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import{e as f,f as $}from"./chunk-BUDZL4DW.mjs";import{a as m}from"./chunk-E66B27AL.mjs";$();w();var i=["off","assist","strict"],C=class extends k{static{m(this,"TddCommands")}async tdd(s=null,t=process.cwd(),n={}){let e=M(s,i);return e.kind==="status"?this.showStatus(t,n):e.kind==="mode"?this.setMode(e.mode,t,n):e.sub==="check"?this.check(t,n):T(`Unknown tdd subcommand "${e.sub}". Use: check, or ${i.join("|")}.`,n)}async showStatus(s,t){let n=await l(s,t);if(!n.ok)return n.result;let e=n.value,o=y(e),a=(await u(s).catch(()=>null))?.test?.command??null,p=[`Mode: ${o}${o==="off"?" (guidance + ship TDD gate dormant)":""}`,`Test command: ${a??"none detected (add tests to enable the gate)"}`,"Set: prjct tdd off|assist|strict","Check: prjct tdd check \u2014 run the test command now (red/green)"];return t.md?console.log(d("## TDD",`> **Mode**: \`${o}\``,`- Test command: \`${a??"none detected"}\``,p.slice(2).join(`
|
|
9
9
|
`))):c.info(`TDD \u2014 ${p.join(`
|
|
10
10
|
`)}`),{success:!0,mode:o,testCommand:a}}async setMode(s,t,n){let e=await l(t,n);if(!e.ok)return e.result;let o=e.value;o.tdd={mode:s},await h.writeConfig(t,o);let r=s==="off"?"TDD mode off \u2014 test-first guidance and the ship TDD gate are dormant.":s==="assist"?"TDD mode \u2192 assist. Guidance biases test-first (red\u2192green\u2192refactor); `ship` reminds.":"TDD mode \u2192 strict. Test-first expected; `ship` surfaces a hard gate \u2014 run `prjct tdd check` and don't ship on red.";return n.md?console.log(d("## TDD",`> ${r}`)):c.done(r),{success:!0,mode:s}}async check(s,t){let e=(await u(s).catch(()=>null))?.test?.command;if(!e){let o="tdd check: no test command detected for this stack. Add a test script first.";return console.log(t.md?d("## TDD check",`> ${o}`):o),{success:!1,reason:"no_test_command"}}try{await D(e,{cwd:s,maxBuffer:32*1024*1024});let o=`tdd check: GREEN \u2014 \`${e}\` passed.`;return console.log(t.md?d("## TDD check",`> \u2705 ${o}`):o),{success:!0,green:!0,testCommand:e}}catch(o){let r=`tdd check: RED \u2014 \`${e}\` failed. Fix before shipping.`;return t.md?console.log(d("## TDD check",`> \u274C ${r}`,f(o))):(c.fail(r),c.info(f(o))),{success:!1,green:!1,testCommand:e}}}};function y(g){let s=g?.tdd?.mode;if(s&&i.includes(s))return s;let t=process.env.PRJCT_TDD_MODE?.toLowerCase();return t&&i.includes(t)?t:"off"}m(y,"effectiveTddMode");var L={effectiveTddMode:y,TDD_MODES:i};export{C as TddCommands,L as _internal,y as effectiveTddMode};
|
|
@@ -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,c as b,d as c,e as d}from"./chunk-
|
|
8
|
+
import{b as a,c as b,d as c,e as d}from"./chunk-EXVL2OFE.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{d as default,b as getTemplateContent,c as listTemplates,a as resetBundle};
|
package/dist/bin/hook-chunks/{transcript-jsonl-6X4DDD6R.mjs → transcript-jsonl-7W2NOJPZ.mjs}
RENAMED
|
@@ -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-
|
|
8
|
+
import{a,b,c,d,e}from"./chunk-32RX4YGI.mjs";import"./chunk-E66B27AL.mjs";export{a as identifyTranscriptModel,b as parseTranscriptJsonl,d as sumTranscriptUsage,e as sumTranscriptUsageByModel,c as sumTranscriptUsageDetailed};
|
|
@@ -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-
|
|
8
|
+
import{a,b,c}from"./chunk-TF6PN7IB.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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{b as extractCorrectionIds,a as extractRefIds,c as usefulnessService};
|
package/dist/bin/hook-chunks/{vault-retire-notice-HT756AND.mjs → vault-retire-notice-7XHVNHU6.mjs}
RENAMED
|
@@ -5,5 +5,5 @@ 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{e as t,g as a}from"./chunk-
|
|
8
|
+
import{e as t,g as a}from"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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 n}from"./chunk-E66B27AL.mjs";a();var r="vault-retire-notice-shown";async function c(o,e){try{return!(o?.vault?.mode==="export")||t.getDoc(e,r)?.shown?null:(t.setDoc(e,r,{shown:!0}),["> **prjct has removed the Obsidian/markdown vault feature.**","> Any files it previously generated are untouched on disk, but prjct no","> longer regenerates them. Agents read project knowledge through prjct","> tools (`prjct search`, `prjct context memory`, `prjct_analysis`, \u2026)."].join(`
|
|
9
9
|
`))}catch{return null}}n(c,"vaultRetirementNotice");export{c as vaultRetirementNotice};
|
package/dist/bin/hook-chunks/{velocity-storage-47CF3XWZ.mjs → velocity-storage-IOCVK2LU.mjs}
RENAMED
|
@@ -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-
|
|
8
|
+
import{a,b}from"./chunk-GSPDJSJ5.mjs";import"./chunk-ETTDRXQ6.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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 epochWeek,b as velocityStorage};
|
|
@@ -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{h as a,i as b,j as c,k as d,l as e}from"./chunk-
|
|
8
|
+
import{h as a,i as b,j as c,k as d,l as e}from"./chunk-EI6VQZOX.mjs";import"./chunk-PVCEWFHS.mjs";import"./chunk-LR24AIEW.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-ZZBNFNMG.mjs";import"./chunk-3FEXJUO2.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as conflictModeWithWeakModel,a as effectiveWeakModelMode,c as qualityFloorWithWeakModel,d as weakModelBanner,e as weakModelOneLiner};
|
|
@@ -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{d as i,g as E}from"./chunk-
|
|
8
|
+
import{d as i,g as E}from"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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 p}from"./chunk-E66B27AL.mjs";E();var _=["blocks","parent"];function m(d,t=0){return{id:d.id,description:d.description,type:d.type,priority:d.priority,section:d.section,claimedBy:d.claimed_by,createdAt:d.created_at,unblocks:t}}p(m,"rowToReadyItem");var u=`
|
|
9
9
|
SELECT d.from_id FROM work_dependencies d
|
|
10
10
|
WHERE d.dep_type IN ('blocks', 'parent')
|
|
11
11
|
AND (
|
|
@@ -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 a,d as b,e as c,f as d,g as e,h as f}from"./chunk-NLL5AV2G.mjs";import"./chunk-BKJHD5JI.mjs";import"./chunk-CPR4FPXG.mjs";import"./chunk-3HGQPUKG.mjs";import"./chunk-3CKNJ5RA.mjs";import"./chunk-R4ILCXKE.mjs";import"./chunk-PVCEWFHS.mjs";import"./chunk-LR24AIEW.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-ZZBNFNMG.mjs";import"./chunk-3FEXJUO2.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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-IJ523YO2.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{c as extractFilePathsFromEntries,d as formatWorkScopeBlock,f as isUsefulScopePath,b as resolveWorkScope,a as resolveWorkScopeSync,e as toLikelyFileHits};
|
package/dist/bin/hook-chunks/{workspace-occupancy-UUW4UGGB.mjs → workspace-occupancy-JOBYNNXV.mjs}
RENAMED
|
@@ -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 w,e as k}from"./chunk-
|
|
8
|
+
import{c as w,e as k}from"./chunk-H5AVBDCH.mjs";import{a as g}from"./chunk-3UB6SFRA.mjs";import{c as u,d}from"./chunk-XSJ7SPVR.mjs";import"./chunk-TPESWBA7.mjs";import{b as i}from"./chunk-D7DQABWO.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-ETTDRXQ6.mjs";import"./chunk-FZS3XGEA.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.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 s}from"./chunk-E66B27AL.mjs";function b(e,o){return{taskId:e.id,description:e.description,ownerAgent:e.ownerAgent,ownerIdentity:e.ownerIdentity,startedAt:e.startedAt,workspaceId:o,branch:e.branch}}s(b,"asOwner");async function W(e,o,c){let t=c??w(o),r=await d(o),f=await g(e,o),p=r.isMain?await i.getCurrentTask(e):await i.getCurrentTaskForWorkspace(e,r.workspaceId),a=p?b(p,r.isMain?u:r.workspaceId):null,y=f.all.filter(n=>!n.isCurrent).map(n=>({taskId:n.id,description:n.description,startedAt:n.startedAt,workspaceId:n.workspaceId,branch:n.branch})),l=a!==null,I=l&&k(a,t);return{workspaceId:r.workspaceId,isMain:r.isMain,current:a,others:y,occupied:l,occupiedByMe:I}}s(W,"getOccupancy");function M(e,o,c){if(o==="off")return{isolate:!1,reason:"autoWorktree off"};if(!e.occupied||e.occupiedByMe)return{isolate:!1,reason:"workspace free or owned by caller"};let t=e.current,r=[t.ownerAgent,t.ownerIdentity].filter(Boolean).join("/")||"another agent";return e.isMain?o==="ask"?{isolate:!1,block:!0,occupant:t,reason:`Workspace owned by ${r} on "${t.description}" (${t.taskId.slice(0,8)}). Re-run with isolation (config multiAgent.autoWorktree=auto) or \`prjct switch <agent>\` to yield that cycle.`}:{isolate:!0,occupant:t,reason:`Branch/workspace owned by ${r} on "${t.description}" (${t.taskId.slice(0,8)}). Isolating to a sibling worktree.`}:{isolate:!1,block:!0,occupant:t,reason:`Workspace already owned by ${r} on "${t.description}" (${t.taskId.slice(0,8)}). Work elsewhere or \`prjct switch\` to take over.`}}s(M,"shouldIsolate");function $(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||`work-${Date.now().toString(36)}`}s($,"worktreeSlugFromIntent");export{W as getOccupancy,M as shouldIsolate,$ as worktreeSlugFromIntent};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|