prjct-cli 3.93.0 → 3.95.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-switch-A6AYZRJ5.mjs → agent-switch-4ZJJWKMD.mjs} +1 -1
- package/dist/bin/hook-chunks/{analysis-WPRPBYHY.mjs → analysis-UGHAG2SK.mjs} +3 -3
- package/dist/bin/hook-chunks/{auth-config-WNUARXTJ.mjs → auth-config-JIITQ6GY.mjs} +1 -1
- package/dist/bin/hook-chunks/auto-flush-CXWTU3RF.mjs +8 -0
- package/dist/bin/hook-chunks/{auto-updater-EHRRMCYY.mjs → auto-updater-4TIXYSEX.mjs} +1 -1
- package/dist/bin/hook-chunks/capture-gate-PS6QUXLX.mjs +8 -0
- package/dist/bin/hook-chunks/chunk-22AXWLI6.mjs +26 -0
- package/dist/bin/hook-chunks/chunk-32RX4YGI.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-6EWGHM32.mjs → chunk-3WQBTXUC.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ZZ65CN5F.mjs → chunk-4HAKTI36.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-V37VTXDW.mjs → chunk-4KVPAHFV.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-4KXXDQYI.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-4WHS7CO7.mjs → chunk-4NTVXJD7.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-HIFIDMH5.mjs → chunk-5H3KJWQS.mjs} +2 -2
- package/dist/bin/hook-chunks/chunk-5XA5RL5I.mjs +8 -0
- package/dist/bin/hook-chunks/chunk-6GAFRIUQ.mjs +18 -0
- package/dist/bin/hook-chunks/{chunk-4OYUJTPR.mjs → chunk-76GDLA3Z.mjs} +3 -3
- package/dist/bin/hook-chunks/chunk-7YT2FGO7.mjs +8 -0
- package/dist/bin/hook-chunks/chunk-A6K4H3YT.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-MEQS4VPO.mjs → chunk-ABJNOG2I.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-7SI6X3Z7.mjs → chunk-B36LC2JR.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-BCAHWZH7.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-EM6ZDJAK.mjs → chunk-BDOAQVIF.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-BOBFTVAY.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-7OZDWT6C.mjs → chunk-BU22R6JX.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-BX7VKYA7.mjs +8 -0
- package/dist/bin/hook-chunks/chunk-C4O243NG.mjs +9 -0
- package/dist/bin/hook-chunks/chunk-CYZ7ST2P.mjs +36 -0
- package/dist/bin/hook-chunks/chunk-DCSKTMDX.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-WDGDFXSB.mjs → chunk-DVDZA63F.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ZX2KFQV5.mjs → chunk-EWOK4VE7.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ODWWIFSN.mjs → chunk-FEFP6JOL.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-7AN7VQHN.mjs → chunk-FW4MEPTB.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-FXFG6PV6.mjs +69 -0
- package/dist/bin/hook-chunks/chunk-G7QQZMAO.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-P5ZYAXSE.mjs → chunk-GCDLPKOH.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ACKEPXP4.mjs → chunk-GDECEHO5.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-GDESYWTD.mjs +14 -0
- package/dist/bin/hook-chunks/chunk-GLPKMG5A.mjs +18 -0
- package/dist/bin/hook-chunks/chunk-GPZP7NXL.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-PSSR7LSW.mjs → chunk-H4CA3XZ6.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-HEDZA6KC.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-3LG3ACQV.mjs → chunk-I26F7TLM.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-IGHY4FGS.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-DMXFGLZE.mjs → chunk-IWJG7CZX.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-LLQUB6YR.mjs → chunk-J5UQVJUW.mjs} +2 -2
- package/dist/bin/hook-chunks/chunk-J5UVRZ44.mjs +15 -0
- package/dist/bin/hook-chunks/{chunk-QDQ7DTDV.mjs → chunk-JR542RI2.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-P4J6TY2L.mjs → chunk-KHLYWNHT.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-75UJIVMO.mjs → chunk-KOGZCFBC.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-Q5I2UPD6.mjs → chunk-KSSRINDX.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ZTZTVBAZ.mjs → chunk-LNB2GLYI.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-M5E2YOZ4.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-PWMMLXZS.mjs → chunk-MHNWIB7B.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-LFY5O66D.mjs → chunk-N3L77UNM.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-TSCXXNUF.mjs → chunk-NLKPAJND.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-3JUE6MNF.mjs → chunk-OC4CYF7V.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-OGIFB3OE.mjs +19 -0
- package/dist/bin/hook-chunks/chunk-OUAS3LZ3.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-6WXGOGAN.mjs → chunk-OUAVSD47.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-X5RDLFPM.mjs → chunk-OWOPA2O7.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-PGWFGRX4.mjs +47 -0
- package/dist/bin/hook-chunks/chunk-PO3QDKTE.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-RXD7MHJ6.mjs → chunk-PP6DANGV.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-HT3ZCLLJ.mjs → chunk-PTA7DMLM.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-45I2C2UB.mjs → chunk-QBYHZX33.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-QL3NYJTW.mjs +16 -0
- package/dist/bin/hook-chunks/{chunk-AOPJ4Z6O.mjs → chunk-QP5USCDX.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-QWQFF2UG.mjs +10 -0
- package/dist/bin/hook-chunks/chunk-R4ILCXKE.mjs +8 -0
- package/dist/bin/hook-chunks/{chunk-D7TRY3CO.mjs → chunk-RHKF7EJW.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-HZIORCPO.mjs → chunk-ROA2AJXY.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-AUUWQH3S.mjs → chunk-RTEEXGEA.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-QK2IMCDC.mjs → chunk-S5ISOGDB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-GIMUTVLP.mjs → chunk-S5N2ZZDL.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-742LOGHA.mjs → chunk-S6L3FECF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-CREPUNOS.mjs → chunk-T6ELTQZM.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-UK7D7EFV.mjs → chunk-TXSLON7M.mjs} +2 -2
- package/dist/bin/hook-chunks/chunk-U4OON3S7.mjs +31 -0
- package/dist/bin/hook-chunks/chunk-UH4MD3F3.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-HDHVBB6Q.mjs → chunk-UHVYBU7F.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-UYQC63MC.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-3WY2AYPE.mjs → chunk-V2FR2NPL.mjs} +4 -4
- package/dist/bin/hook-chunks/{chunk-L4376X2P.mjs → chunk-WGWE3CSC.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-KXWBIQGJ.mjs → chunk-X5W2UYQK.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-YUOTOCKK.mjs → chunk-XDBJSJOT.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-2NMSEZTQ.mjs → chunk-XFQ7NNLN.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-SOPRYWUY.mjs → chunk-XS45K7ZQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-BISPGBNN.mjs → chunk-XXRAQZNC.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-NLG2EW6M.mjs → chunk-YDBZO6I3.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-6IKHMK2U.mjs → chunk-YQ55MHKL.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-Z4X7JIAP.mjs +11 -0
- package/dist/bin/hook-chunks/{chunk-2OU2MKNS.mjs → chunk-Z6KVLCMK.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-OGOCHZ3S.mjs → chunk-ZFLIVOFX.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-54LH63LM.mjs → chunk-ZMLA5SKR.mjs} +1 -0
- package/dist/bin/hook-chunks/chunk-ZOX6OV6X.mjs +12 -0
- package/dist/bin/hook-chunks/client-CRXA774S.mjs +10 -0
- package/dist/bin/hook-chunks/code-graph-cloud-GTSLO7CD.mjs +8 -0
- package/dist/bin/hook-chunks/{codex-skill-ZCAUF2RM.mjs → codex-skill-NUBNPSMF.mjs} +1 -1
- package/dist/bin/hook-chunks/{command-installer-LNK7WC5I.mjs → command-installer-UHSXC3UG.mjs} +1 -1
- package/dist/bin/hook-chunks/{config-manager-4VWDBPMG.mjs → config-manager-DX5OOPW5.mjs} +1 -1
- package/dist/bin/hook-chunks/{content-bound-stamp-72EQVZLP.mjs → content-bound-stamp-OG2KKN3L.mjs} +1 -1
- package/dist/bin/hook-chunks/{context7-service-4C6VNJUS.mjs → context7-service-GDJ3QICX.mjs} +1 -1
- package/dist/bin/hook-chunks/custom-workflow-storage-FD47DPA3.mjs +8 -0
- package/dist/bin/hook-chunks/cwd-changed-EP3UIRK6.mjs +8 -0
- package/dist/bin/hook-chunks/{database-SLDTQXWG.mjs → database-ZUC7OEZG.mjs} +1 -1
- package/dist/bin/hook-chunks/{delivery-geometry-VHCURJ7E.mjs → delivery-geometry-WYOEMKMO.mjs} +1 -1
- package/dist/bin/hook-chunks/{detect-changes-M2OYIOE5.mjs → detect-changes-OJUBWWTU.mjs} +1 -1
- package/dist/bin/hook-chunks/{detection-MEYHME4X.mjs → detection-QRVSNMKL.mjs} +1 -1
- package/dist/bin/hook-chunks/developer-evolution-WNSTHDAA.mjs +12 -0
- package/dist/bin/hook-chunks/distill-GOGPFQFK.mjs +8 -0
- package/dist/bin/hook-chunks/{editors-config-3N6VREZR.mjs → editors-config-2CACBNS4.mjs} +1 -1
- package/dist/bin/hook-chunks/enriched-recall-QF22RIK7.mjs +8 -0
- package/dist/bin/hook-chunks/exec-2P5VOBHM.mjs +8 -0
- package/dist/bin/hook-chunks/format-J3X3R225.mjs +8 -0
- package/dist/bin/hook-chunks/{git-helpers-6JLP2OJZ.mjs → git-helpers-HELM6DXJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-ledger-storage-UKROWRVA.mjs → judgment-ledger-storage-FE4HXTHM.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-orchestrator-UFGNBTEK.mjs → judgment-orchestrator-YDJTKNV2.mjs} +1 -1
- package/dist/bin/hook-chunks/judgment-receipt-7A2DXVJA.mjs +8 -0
- package/dist/bin/hook-chunks/land-cue-SZWJH6XP.mjs +9 -0
- package/dist/bin/hook-chunks/land-synthesis-JLYUBKHR.mjs +8 -0
- package/dist/bin/hook-chunks/legacy-crew-sweep-JXYO62UE.mjs +24 -0
- package/dist/bin/hook-chunks/memory-index-CIYDXN2G.mjs +8 -0
- package/dist/bin/hook-chunks/notification-UA7RTVHG.mjs +8 -0
- package/dist/bin/hook-chunks/{pack-integrity-62XJ5A75.mjs → pack-integrity-GZC5NGFN.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-manager-K3PQ7MCS.mjs → pack-manager-AF5F7PRT.mjs} +1 -1
- package/dist/bin/hook-chunks/{package-legitimacy-HXC4L73B.mjs → package-legitimacy-MIR3VZSF.mjs} +1 -1
- package/dist/bin/hook-chunks/{path-manager-F2HE2GGK.mjs → path-manager-375HH6TB.mjs} +1 -1
- package/dist/bin/hook-chunks/{planning-WMLFXZMA.mjs → planning-M3RAOZVB.mjs} +2 -2
- package/dist/bin/hook-chunks/post-edit-QRDYPZLZ.mjs +8 -0
- package/dist/bin/hook-chunks/{pr-convention-7UGI7TFA.mjs → pr-convention-5NPXQJ2R.mjs} +1 -1
- package/dist/bin/hook-chunks/pre-bash-TWWFVNQ7.mjs +11 -0
- package/dist/bin/hook-chunks/pre-commit-PTFF7JIN.mjs +8 -0
- package/dist/bin/hook-chunks/pre-edit-PMMWDR2B.mjs +11 -0
- package/dist/bin/hook-chunks/pre-package-325ALZKD.mjs +8 -0
- package/dist/bin/hook-chunks/pre-search-GOHVFAFH.mjs +9 -0
- package/dist/bin/hook-chunks/pre-secrets-MYNM5KI4.mjs +8 -0
- package/dist/bin/hook-chunks/{precision-judgment-WPTCNTGV.mjs → precision-judgment-TT3DRNAX.mjs} +1 -1
- package/dist/bin/hook-chunks/{prjct-md-Q6C5YNI3.mjs → prjct-md-RCB6FWD6.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-agent-surfaces-3BBZIQNI.mjs → project-agent-surfaces-V4P5RTUR.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-file-inventory-ZAPKPKY6.mjs → project-file-inventory-OKIP4LBO.mjs} +1 -1
- package/dist/bin/hook-chunks/project-memory-JK2MXRJB.mjs +8 -0
- package/dist/bin/hook-chunks/project-style-evolution-RPGATIYJ.mjs +8 -0
- package/dist/bin/hook-chunks/prompt-DOENKHLQ.mjs +24 -0
- package/dist/bin/hook-chunks/{velocity-storage-UPW6TLK6.mjs → publish-helper-SX7HEV2L.mjs} +1 -1
- package/dist/bin/hook-chunks/purge-XKHUAB4H.mjs +8 -0
- package/dist/bin/hook-chunks/retention-C3NQT65W.mjs +8 -0
- package/dist/bin/hook-chunks/sdd-6PF7MBAY.mjs +10 -0
- package/dist/bin/hook-chunks/session-continuity-UEXQDGZE.mjs +11 -0
- package/dist/bin/hook-chunks/session-start-B4P7L33E.mjs +8 -0
- package/dist/bin/hook-chunks/setup-ZOHG6MGF.mjs +141 -0
- package/dist/bin/hook-chunks/{shipping-HV5IAM2J.mjs → shipping-QVGTOO6U.mjs} +5 -5
- package/dist/bin/hook-chunks/{skill-index-OOVAXHYJ.mjs → skill-index-FGDQVYHM.mjs} +1 -1
- package/dist/bin/hook-chunks/{spec-context-inference-UBHJLOIJ.mjs → spec-context-inference-6Z52BT37.mjs} +1 -1
- package/dist/bin/hook-chunks/{spec-service-TA4Q5S3X.mjs → spec-service-UAQ5AEXQ.mjs} +2 -2
- package/dist/bin/hook-chunks/spec-task-breakdown-LAXGVLMY.mjs +8 -0
- package/dist/bin/hook-chunks/state-storage-XU35ZYNA.mjs +8 -0
- package/dist/bin/hook-chunks/stop-CFB2H3XC.mjs +16 -0
- package/dist/bin/hook-chunks/subagent-start-KFAZZUHS.mjs +8 -0
- package/dist/bin/hook-chunks/subagent-stop-OUG4PR7S.mjs +8 -0
- package/dist/bin/hook-chunks/{surface-attribution-HYCBHBTC.mjs → surface-attribution-A6GCGRFM.mjs} +1 -1
- package/dist/bin/hook-chunks/symbol-graph-DMPBNBX7.mjs +8 -0
- package/dist/bin/hook-chunks/{sync-analyzer-FKC57RTV.mjs → sync-analyzer-6U5GHYV3.mjs} +1 -1
- package/dist/bin/hook-chunks/{sync-client-DJWOG2ZQ.mjs → sync-client-PIRHMHXL.mjs} +1 -1
- package/dist/bin/hook-chunks/{sync-cursor-storage-2VKG757H.mjs → sync-cursor-storage-VVLA3L2U.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-orchestration-MLOCR7GA.mjs → task-orchestration-HFZYWYLR.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-overview-6ZQKJGSH.mjs → task-overview-PCUZWL5Q.mjs} +1 -1
- package/dist/bin/hook-chunks/task-service-PXCDU55T.mjs +8 -0
- package/dist/bin/hook-chunks/tdd-QZL4OSM7.mjs +10 -0
- package/dist/bin/hook-chunks/{template-loader-SO6OHPJI.mjs → template-loader-SKXILJLJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{transcript-jsonl-6X4DDD6R.mjs → transcript-jsonl-7W2NOJPZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{trust-boundary-ERMDF2C5.mjs → trust-boundary-EX65SUYR.mjs} +1 -1
- package/dist/bin/hook-chunks/{usefulness-253CZLNY.mjs → usefulness-SZLG6LVC.mjs} +1 -1
- package/dist/bin/hook-chunks/{vault-retire-notice-GRT3QRLZ.mjs → vault-retire-notice-HOXPURNQ.mjs} +1 -1
- package/dist/bin/hook-chunks/velocity-storage-5J6BAMCW.mjs +8 -0
- package/dist/bin/hook-chunks/weak-model-mode-ZRNKFTFF.mjs +8 -0
- package/dist/bin/hook-chunks/work-graph-PGYHFLEL.mjs +49 -0
- package/dist/bin/hook-chunks/work-scope-FIB6LBKE.mjs +8 -0
- package/dist/bin/hook-chunks/{workspace-occupancy-UVIRHY5Z.mjs → workspace-occupancy-3D4OKQRB.mjs} +1 -1
- package/dist/bin/hook-chunks/{worktree-service-XGRN5TTE.mjs → worktree-service-AS7JVBK5.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 +737 -736
- package/dist/bin/prjct-hooks.mjs +2 -2
- package/dist/bin/prjct.mjs +1 -1
- package/dist/daemon/entry.mjs +651 -647
- package/dist/mcp/server.mjs +310 -312
- package/package.json +1 -1
- package/dist/bin/hook-chunks/auto-flush-5D4PKOMM.mjs +0 -8
- package/dist/bin/hook-chunks/capture-gate-EOOSAGAP.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-4DDCWMI6.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-4KY2EHXS.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-A5RNWWTH.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-A7SGMNOK.mjs +0 -11
- package/dist/bin/hook-chunks/chunk-AKIN5WSQ.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-BNWB77U5.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-CQHPIYNM.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-CTWZQ7YI.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-DLHSCKBJ.mjs +0 -15
- package/dist/bin/hook-chunks/chunk-DV7KV2O4.mjs +0 -38
- package/dist/bin/hook-chunks/chunk-EHP4DYVQ.mjs +0 -71
- package/dist/bin/hook-chunks/chunk-FGQZ62ZP.mjs +0 -47
- package/dist/bin/hook-chunks/chunk-HJ4HEI45.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-J6JZ4PQA.mjs +0 -18
- package/dist/bin/hook-chunks/chunk-JRKGG2E3.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-L4COZ7ZH.mjs +0 -13
- package/dist/bin/hook-chunks/chunk-LT5WSSQO.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-MHRMV4WI.mjs +0 -31
- package/dist/bin/hook-chunks/chunk-N5WOHG36.mjs +0 -8
- package/dist/bin/hook-chunks/chunk-NJAMZSHM.mjs +0 -26
- package/dist/bin/hook-chunks/chunk-NWY5M34K.mjs +0 -12
- package/dist/bin/hook-chunks/chunk-OB5GRS7T.mjs +0 -18
- package/dist/bin/hook-chunks/chunk-PW3KYKVS.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-SVZHJZ5T.mjs +0 -9
- package/dist/bin/hook-chunks/chunk-UB53HQMG.mjs +0 -14
- package/dist/bin/hook-chunks/chunk-UBMIPWJR.mjs +0 -19
- package/dist/bin/hook-chunks/chunk-VPPHD762.mjs +0 -11
- package/dist/bin/hook-chunks/chunk-VV7VNUTF.mjs +0 -16
- package/dist/bin/hook-chunks/chunk-YJMWY4Y6.mjs +0 -8
- package/dist/bin/hook-chunks/client-SKFMAUI5.mjs +0 -10
- package/dist/bin/hook-chunks/code-graph-cloud-65GCWNII.mjs +0 -8
- package/dist/bin/hook-chunks/custom-workflow-storage-M77INP6Z.mjs +0 -8
- package/dist/bin/hook-chunks/cwd-changed-FYNPPO73.mjs +0 -8
- package/dist/bin/hook-chunks/developer-evolution-R5BXQH6G.mjs +0 -12
- package/dist/bin/hook-chunks/distill-W7QGQUDX.mjs +0 -8
- package/dist/bin/hook-chunks/enriched-recall-W7KYRYVR.mjs +0 -8
- package/dist/bin/hook-chunks/exec-I7XE7NMD.mjs +0 -8
- package/dist/bin/hook-chunks/format-BOWFDUBP.mjs +0 -8
- package/dist/bin/hook-chunks/judgment-receipt-WGTFKID7.mjs +0 -8
- package/dist/bin/hook-chunks/land-cue-WLGSULSO.mjs +0 -9
- package/dist/bin/hook-chunks/land-synthesis-V7UH5QV6.mjs +0 -8
- package/dist/bin/hook-chunks/legacy-crew-sweep-MFE4BDNR.mjs +0 -24
- package/dist/bin/hook-chunks/memory-index-B53F5HAX.mjs +0 -10
- package/dist/bin/hook-chunks/notification-HJLS4L7Y.mjs +0 -8
- package/dist/bin/hook-chunks/post-edit-TT3XOG55.mjs +0 -8
- package/dist/bin/hook-chunks/pre-bash-2KKF4V6G.mjs +0 -11
- package/dist/bin/hook-chunks/pre-commit-UU4SKKWV.mjs +0 -8
- package/dist/bin/hook-chunks/pre-edit-RTBLZPWH.mjs +0 -11
- package/dist/bin/hook-chunks/pre-package-LQTINBT4.mjs +0 -8
- package/dist/bin/hook-chunks/pre-search-UJU3XZ2K.mjs +0 -9
- package/dist/bin/hook-chunks/pre-secrets-IE5NX5X5.mjs +0 -8
- package/dist/bin/hook-chunks/project-memory-YHQBRX3D.mjs +0 -8
- package/dist/bin/hook-chunks/project-style-evolution-HS6HYI7W.mjs +0 -8
- package/dist/bin/hook-chunks/prompt-AYY7BZFG.mjs +0 -22
- package/dist/bin/hook-chunks/publish-helper-I37V4L7U.mjs +0 -8
- package/dist/bin/hook-chunks/purge-AXMYTZVM.mjs +0 -8
- package/dist/bin/hook-chunks/retention-22OSCAGV.mjs +0 -8
- package/dist/bin/hook-chunks/sdd-W3OUQPHD.mjs +0 -10
- package/dist/bin/hook-chunks/session-continuity-LO2KNHXU.mjs +0 -11
- package/dist/bin/hook-chunks/session-start-5UZSL6OY.mjs +0 -8
- package/dist/bin/hook-chunks/setup-BSWLQJPE.mjs +0 -142
- package/dist/bin/hook-chunks/spec-task-breakdown-QJWGCON2.mjs +0 -8
- package/dist/bin/hook-chunks/state-storage-KNGP2CQV.mjs +0 -8
- package/dist/bin/hook-chunks/stop-QVDK6LUV.mjs +0 -17
- package/dist/bin/hook-chunks/subagent-start-UYBSD7VK.mjs +0 -8
- package/dist/bin/hook-chunks/subagent-stop-FHLL7X66.mjs +0 -8
- package/dist/bin/hook-chunks/symbol-graph-LZM4RZXZ.mjs +0 -8
- package/dist/bin/hook-chunks/task-service-RMCQEHV6.mjs +0 -8
- package/dist/bin/hook-chunks/tdd-LV63NXZ3.mjs +0 -10
- package/dist/bin/hook-chunks/weak-model-mode-VDYJ25PX.mjs +0 -8
- package/dist/bin/hook-chunks/work-graph-QJGNBVIP.mjs +0 -49
- package/dist/bin/hook-chunks/work-scope-OKFSTW6D.mjs +0 -8
|
@@ -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 W,b as R}from"./chunk-
|
|
8
|
+
import{a as W,b as R}from"./chunk-OUAS3LZ3.mjs";import{a as I}from"./chunk-5XA5RL5I.mjs";import{a as _,c as B}from"./chunk-I26F7TLM.mjs";import{d as x,e as b,g as E}from"./chunk-UHVYBU7F.mjs";import{b as d,h as g}from"./chunk-A6K4H3YT.mjs";import{a as u}from"./chunk-E66B27AL.mjs";g();var f={idle:{transitions:["task"],prompt:"prjct work <intent> Start working",description:"No active work cycle"},working:{transitions:["done","pause"],prompt:"prjct status done Complete work | prjct status paused Switch context",description:"Work in progress"},paused:{transitions:["resume","task","ship"],prompt:"prjct status active Continue | prjct work <new> Start different | prjct ship Ship directly",description:"Task paused"},completed:{transitions:["ship","task","pause","reopen"],prompt:"prjct ship Ship it | prjct work <next> Start next | prjct status active Reopen",description:"Task completed"},shipped:{transitions:["task"],prompt:"prjct work <intent> Start new work cycle",description:"Feature shipped"}},h=class{static{u(this,"WorkflowStateMachine")}getCurrentState(t,s){if(s){let a=(t?.activeTasks??[]).find(n=>n.workspaceId===s);return a?this.statusToState(a):"idle"}let e=t?.currentTask;return e?this.statusToState(e):(t?.pausedTasks?.length||0)>0||t?.previousTask?.status==="paused"?"paused":"idle"}statusToState(t){switch((typeof t.status=="string"?t.status:"").toLowerCase()){case"in_progress":case"working":return"working";case"paused":return"paused";case"completed":case"done":return"completed";case"shipped":return"shipped";default:return"working"}}canTransition(t,s){if(f[t].transitions.includes(s))return{valid:!0};let a=this.formatNextSteps(t).join(" | ");return{valid:!1,error:`Cannot transition to '${s}' from '${t}' state`,suggestion:`Valid next steps: ${a}`}}getNextState(t,s){switch(s){case"task":return"working";case"done":return"completed";case"pause":return"paused";case"resume":return"working";case"ship":return"shipped";case"reopen":return"working";default:return t}}getStateInfo(t){return f[t]}getPrompt(t){return f[t].prompt}getValidCommands(t){return f[t].transitions}formatNextSteps(t){return f[t].transitions.map(e=>{switch(e){case"task":return"prjct work <intent> Start new work cycle";case"done":return"prjct status done Complete current work";case"pause":return"prjct status paused Pause and switch context";case"resume":return"prjct status active Continue paused task";case"ship":return"prjct ship Ship the feature";case"reopen":return"prjct status active Reopen completed task";default:return`prjct ${e}`}})}},S=new h;E();g();async function H(r,t,s){let e={pausedCount:0};if(await r.update(t,n=>{if(!n.currentTask)return n;r.validateTransition(n,"pause"),e.pausedTask={...n.currentTask,status:"paused",pausedAt:d(),pauseReason:s};let i=[e.pausedTask,...r.getPausedTasksFromState(n)].slice(0,r.maxPausedTasks);return e.pausedCount=i.length,{...n,currentTask:null,previousTask:null,pausedTasks:i,lastUpdated:d()}}),!e.pausedTask)return null;let a=e.pausedTask;return await r.publish(t,"task.paused",{taskId:a.id,description:a.description,pausedAt:a.pausedAt,reason:s,pausedCount:e.pausedCount}),a}u(H,"pauseTask");async function O(r,t,s){let e={remainingPaused:0};if(await r.update(t,n=>{let i=r.getPausedTasksFromState(n);if(i.length===0)return n;r.validateTransition(n,"resume");let o=s?i.findIndex(A=>A.id===s):0;if(o===-1)return n;let c=i[o],k=i.filter((A,lt)=>lt!==o),{status:l,pausedAt:T,pauseReason:p,...m}=c;return e.currentTask={...m,startedAt:d(),sessionId:c.sessionId??_()},e.remainingPaused=k.length,{...n,currentTask:e.currentTask,previousTask:null,pausedTasks:k,lastUpdated:d()}}),!e.currentTask)return null;let a=e.currentTask;return await r.publish(t,"task.resumed",{taskId:a.id,description:a.description,resumedAt:a.startedAt,remainingPaused:e.remainingPaused}),a}u(O,"resumeTask");async function D(r,t){let s=await r.read(t),e=r.getPausedTasksFromState(s),a=Date.now()-r.stalenessThresholdDays*24*60*60*1e3;return e.filter(n=>new Date(n.pausedAt).getTime()<a)}u(D,"getStalePausedTasks");async function F(r,t){let s=Date.now()-r.stalenessThresholdDays*24*60*60*1e3,e=[];await r.update(t,n=>{let i=r.getPausedTasksFromState(n),o=i.filter(k=>new Date(k.pausedAt).getTime()<s);if(e.push(o),o.length===0)return n;let c=i.filter(k=>new Date(k.pausedAt).getTime()>=s);return{...n,pausedTasks:c,previousTask:null,lastUpdated:d()}});let a=e[0]??[];if(a.length===0)return[];B.archiveMany(t,a.map(n=>({entityType:"paused_task",entityId:n.id,entityData:n,summary:n.description,reason:"staleness"})));for(let n of a)await r.publish(t,"task.archived",{taskId:n.id,description:n.description,pausedAt:n.pausedAt,reason:"staleness"});return a}u(F,"archiveStalePausedTasks");g();E();var mt=20;function Tt(r){let t=(()=>{if(!r.data)return{};try{return JSON.parse(r.data)}catch{return{}}})(),s={taskId:r.id,title:t.title??r.description,classification:r.type??"improvement",startedAt:r.started_at,completedAt:r.completed_at,subtaskCount:t.subtaskCount??0,subtaskSummaries:t.subtaskSummaries??[],outcome:t.outcome??"Task completed",branchName:r.branch??"unknown"};return r.linear_id!=null&&(s.linearId=r.linear_id),t.linearUuid!=null&&(s.linearUuid=t.linearUuid),r.pr_url!=null&&(s.prUrl=r.pr_url),t.feedback&&(s.feedback=t.feedback),t.harness&&(s.harness=t.harness),r.tokens_in&&(s.tokensIn=r.tokens_in),r.tokens_out&&(s.tokensOut=r.tokens_out),s}u(Tt,"rowToHistoryEntry");function w(r,t="",...s){try{return x.query(r,`SELECT id, description, type, branch, linear_id, pr_url, started_at, completed_at, tokens_in, tokens_out, data
|
|
9
9
|
FROM tasks
|
|
10
10
|
WHERE status = 'completed' AND completed_at IS NOT NULL ${t}
|
|
11
11
|
ORDER BY completed_at DESC, rowid DESC LIMIT ${mt}`,...s).map(Tt)}catch{return[]}}u(w,"queryHistory");async function N(r,t){await r.update(t,()=>({currentTask:null,previousTask:null,pausedTasks:[],activeTasks:[],lastUpdated:d()}))}u(N,"clearTask");async function U(r,t){let s=await r.read(t),e=r.getPausedTasksFromState(s);return s.currentTask!==null||e.length>0}u(U,"hasTask");async function J(r,t){let s=await r.read(t);return r.getPausedTasksFromState(s)[0]||null}u(J,"getPausedTask");async function L(r,t){let s=await r.read(t);return r.getPausedTasksFromState(s)}u(L,"getAllPausedTasks");async function P(r,t){return w(t)}u(P,"getTaskHistory");async function q(r,t){return w(t)[0]||null}u(q,"getMostRecentTask");async function M(r,t,s){return w(t,"AND type = ?",s)}u(M,"getTaskHistoryByType");async function $(r,t){let e=(await P(r,t)).filter(p=>p.feedback),a=[],n=[],i=[],o=[];for(let p of e){let m=p.feedback;Array.isArray(m.stackConfirmed)&&a.push(...m.stackConfirmed),Array.isArray(m.patternsDiscovered)&&n.push(...m.patternsDiscovered),Array.isArray(m.agentAccuracy)&&i.push(...m.agentAccuracy),Array.isArray(m.issuesEncountered)&&o.push(...m.issuesEncountered)}let c=[...new Set(a)],k=[...new Set(n)],l=new Map;for(let p of o)l.set(p,(l.get(p)||0)+1);let T=[...l.entries()].filter(([p,m])=>m>=2).map(([p])=>p);return{stackConfirmed:c,patternsDiscovered:k,agentAccuracy:i,issuesEncountered:[...new Set(o)],knownGotchas:T}}u($,"getAggregatedFeedback");g();var ft=u(r=>r.filter(t=>t.status==="completed").length,"countCompleted"),j=u(r=>r.filter(t=>t.status==="completed"||t.status==="failed"||t.status==="skipped").length,"countResolved");async function y(r,t,s,e){let a={};return await r.update(t,n=>{if(!n.currentTask?.subtasks)return n;let i=n.currentTask.currentSubtaskIndex||0,o=n.currentTask.subtasks[i];if(!o)return n;let c=[...n.currentTask.subtasks];c[i]=s(o);let k=i+1,l=c.length;k<l&&(c[k]={...c[k],status:"in_progress",startedAt:d()});let T=k<l?c[k]:null,p=e?Q(e(c),l):void 0;return a.value={taskId:n.currentTask.id,current:c[i],next:T,...p?{progress:p}:{}},{...n,currentTask:{...n.currentTask,subtasks:c,currentSubtaskIndex:k<l?k:i,...p?{subtaskProgress:p}:{}},lastUpdated:d()}}),a.value??null}u(y,"mutateCurrentSubtask");function Q(r,t){return{completed:r,total:t,percentage:t>0?Math.round(r/t*100):0}}u(Q,"progressFrom");async function V(r,t,s){let e=await r.update(t,i=>{if(!i.currentTask)return i;let o=s.map((c,k)=>({...c,status:k===0?"in_progress":"pending",startedAt:k===0?d():void 0,dependsOn:c.dependsOn||[]}));return{...i,currentTask:{...i.currentTask,subtasks:o,currentSubtaskIndex:0,subtaskProgress:Q(0,o.length)},lastUpdated:d()}}),a=e.currentTask?.id??null,n=e.currentTask?.subtasks??[];a&&await r.publish(t,"subtasks.created",{taskId:a,subtaskCount:n.length,subtasks:n.map(i=>({id:i.id,description:i.description,domain:i.domain}))})}u(V,"createSubtasks");async function G(r,t,s){let e=W.safeParse(s);if(!e.success){let o=e.error.issues.map(c=>`${c.path.join(".")}: ${c.message}`);throw new Error(`Subtask completion requires handoff data:
|
|
@@ -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 r,c as d}from"./chunk-QSAA6LZF.mjs";import{e as o,g as p}from"./chunk-
|
|
8
|
+
import{b as r,c as d}from"./chunk-QSAA6LZF.mjs";import{e as o,g as p}from"./chunk-UHVYBU7F.mjs";import{b as n,h as m}from"./chunk-A6K4H3YT.mjs";import{a}from"./chunk-E66B27AL.mjs";m();p();var u="judgment:active",c="judgment:ghosts",g=class{static{a(this,"JudgmentLedgerStorage")}get(s){let t=o.getDoc(s,u);if(t===null)return null;let e=r.safeParse(t);return e.success?e.data:null}set(s,t){let e=t.updatedAt||n();return o.updateDoc(s,u,()=>r.parse({...t,updatedAt:e}),()=>r.parse({...t,updatedAt:e}))}clear(s){o.deleteDoc(s,u)}getGhosts(s){let t=o.getDoc(s,c);if(t===null)return{ghosts:[],updatedAt:n()};let e=d.safeParse(t);return e.success?e.data:{ghosts:[],updatedAt:n()}}setGhosts(s,t){let e=d.parse(t);return o.setDoc(s,c,e),e}},w=new g;export{u as a,c as b,w as c};
|
|
@@ -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 y}from"./chunk-QSAA6LZF.mjs";import{e as O}from"./chunk-
|
|
8
|
+
import{a as y}from"./chunk-QSAA6LZF.mjs";import{e as O}from"./chunk-KOGZCFBC.mjs";import{a as s}from"./chunk-E66B27AL.mjs";var q=/(^|\/)(auth|security|crypto|migration|migrations|password|oauth|payment|billing|secret|token|session|rbac|acl)(\/|\.|$)/i;function T(e){return e?.length?e.some(n=>q.test(n)):!1}s(T,"isHotPath");function X(e,n={}){return n.harnessLevel==="H3"||n.harnessKind==="security"||T(n.paths)?"full":e==="trivial"?"skip":e==="normal"?"standard":"full"}s(X,"routeIntensity");function ge(e,n={}){let t=O(e);return{tier:t,intensity:X(t,n)}}s(ge,"intensityFromChangeset");function b(e){let n=e.title.toLowerCase().replace(/[^a-z0-9\s]/g," ").replace(/\s+/g," ").trim().slice(0,120),t=(e.file??"").toLowerCase().replace(/\\/g,"/"),i=e.line&&e.line>0?String(Math.floor(e.line/5)*5):"";return`dna:${Y(`${n}|${t}|${i}`)}`}s(b,"findingDna");function Y(e){return(e.split("").reduce((t,i)=>Math.imul(t^i.charCodeAt(0),16777619),2166136261)>>>0).toString(16).padStart(8,"0")}s(Y,"hash32");function F(e){let n=!!e.file?.trim(),t=typeof e.line=="number"&&e.line>0,i=!!(e.evidence&&e.evidence.trim().length>=12);return n&&t&&i?3:n&&t?2:n?1:0}s(F,"evidenceScore");function _(e){let n=F(e),t=e.severity,i=t==="blocker"&&n<2?"critical":t==="critical"&&n===0?"warning":t,r=i==="warning"||i==="suggestion"?"info":e.status==="info"?"candidate":e.status;return{...e,severity:i,status:r,evidenceScore:n,dna:e.dna??b(e),blast:e.blast??S({...e,severity:i,evidenceScore:n})}}s(_,"applyEvidenceTax");var Q=/\b(prefer[- ]const|use const|should be const|can be const|const instead|instead of let|never reassigned|not reassigned|let\s*→\s*const|change let to const|let is unnecessary|why let|por qu[eé] let)\b/i;function Z(e){return Q.test(e)}s(Z,"isPreferConstClaim");function fe(e){let n=`${e.title}
|
|
9
9
|
${e.evidence??""}`;if(!Z(n))return e;if(F(e)<3){let i="[CONST-ONLY TAX: include file:line + snippet and propose an immutable rewrite; title-only findings are noise]";return _({...e,severity:"suggestion",status:"info",evidence:e.evidence?`${e.evidence}
|
|
10
10
|
${i}`:i})}return e}s(fe,"applyMechanicalStyleRefute");var R={blocker:100,critical:70,warning:20,suggestion:5};function S(e){return(R[e.severity]??0)+(e.evidenceScore??0)*5+(e.file&&T([e.file])?25:0)+(e.status==="stands"?10:0)+(e.status==="open"?15:0)}s(S,"blastRank");function N(e,n){return[...e].filter(t=>f(t.severity)&&(t.status==="stands"||t.status==="candidate"||t.status==="open"||t.status==="fixed")&&A(t.file,n)).sort((t,i)=>(i.blast??S(i))-(t.blast??S(t)))}s(N,"rankFindingsForFix");function f(e){return e==="blocker"||e==="critical"}s(f,"isActionableSeverity");function j(e){let n=_(e);return f(n.severity)?n.status==="info"?{...n,status:"candidate"}:n:{...n,status:"info"}}s(j,"applySeverityFloor");function pe(e){return e.map(j)}s(pe,"applySeverityFloorAll");function ee(e,n,t,i){let r=n.dna;return r?{ghosts:(e.ghosts.find(d=>d.dna===r)?e.ghosts.map(d=>d.dna===r?{...d,times:d.times+1,lastSeenAt:t,lastReason:i??d.lastReason,title:n.title||d.title}:d):[...e.ghosts,{dna:r,title:n.title,times:1,lastSeenAt:t,lastReason:i}]).sort((d,p)=>p.times-d.times).slice(0,200),updatedAt:t}:e}s(ee,"markGhost");function me(e,n,t){return n.reduce((i,r)=>r.status==="refuted"&&r.dna?ee(i,r,t,"refuted by panel"):i,e)}s(me,"recordRefutedAsGhosts");function he(e,n){if(!n?.ghosts.length)return e;let t=new Map(n.ghosts.map(i=>[i.dna,i]));return e.map(i=>{let r=i.dna??b(i),o=t.get(r);return o?{...i,dna:r,knownFalsePositive:!0,evidence:i.evidence?`${i.evidence} [GHOST: refuted ${o.times}\xD7 in this project]`:`[GHOST: refuted ${o.times}\xD7 here \u2014 challenge hard]`}:{...i,dna:r}})}s(he,"applyGhostFilter");function ve(e,n,t=se){let i=new Map,r=s(c=>{for(let m of c.findings){let h=b(m),v=i.get(h)??[];v.push({role:c.role,raw:m}),i.set(h,v)}},"ingest");r({...e,role:"red"}),r({...n,role:"blue"});let o=[...i].map(([c,m])=>{let h=new Set(m.map(l=>l.role)),v=h.has("red"),P=h.has("blue"),H=m.filter(l=>l.role==="red"),V=m.filter(l=>l.role==="blue"),x=[...m].sort((l,B)=>{let W=R[l.raw.severity]+F(l.raw)*5;return R[B.raw.severity]+F(B.raw)*5-W})[0].raw,z=[...h],M=H.some(l=>f(l.raw.severity)),U=V.some(l=>f(l.raw.severity)),K=v&&P?M!==U?"contradicted":"agreed":v?"onlyRed":"onlyBlue";return{finding:j({id:t(),severity:x.severity,status:"candidate",title:x.title,file:x.file,line:x.line,evidence:x.evidence,judge:x.judge??[...h].join("+"),role:v&&P?void 0:v?"red":"blue",dna:c,agreedBy:z}),outcome:K}}),a=o.map(({finding:c})=>c),u=o.filter(({outcome:c})=>c==="agreed").length,d=o.filter(({outcome:c})=>c==="onlyRed").length,p=o.filter(({outcome:c})=>c==="onlyBlue").length,g=o.filter(({outcome:c})=>c==="contradicted").length,C=g>0;return{findings:a,agreed:u,onlyRed:d,onlyBlue:p,contradicted:g,shouldEscalate:C,escalateReason:C?`${g} dual-blind contradiction(s): red says actionable, blue says not (or reverse). Do not tie-break \u2014 escalate to user.`:""}}s(ve,"mergeDualJudges");function D(e){return e==="full"?3:1}s(D,"refutePanelSize");function te(e,n){let t=e??[];if(t.length===0)return"stands";if(n===1)return t[0]==="refuted"?"refuted":"stands";let i=[...t];for(;i.length<3;)i.push("stands");return i.slice(0,3).filter(o=>o==="refuted").length>=2?"refuted":"stands"}s(te,"resolveRefuteVotes");function xe(e,n,t){let i=D(t);return e.map(r=>{if(r.status==="info"||r.status==="refuted"||r.status==="verified")return r;if(!f(r.severity))return{...r,status:"info"};if(r.status!=="candidate"&&r.status!=="stands")return r;let o=n[r.id],a=te(o,i);return{...r,status:a,refuteVotes:o??r.refuteVotes}})}s(xe,"applyBatchRefutation");function k(e){return e.filter(n=>f(n.severity)&&(n.status==="stands"||n.status==="candidate"||n.status==="open"))}s(k,"actionableOpen");function ye(e){return k(e.findings).length===0?{ok:!1,reason:"no actionable open findings"}:e.fixRound>=e.maxFixRounds?{ok:!1,reason:`convergence budget exhausted (${e.fixRound}/${e.maxFixRounds}) \u2014 leftover stays open; do not start round 3`}:{ok:!0,reason:""}}s(ye,"canStartFixRound");function be(e,n){let t=e.fixRound+1;return t>e.maxFixRounds?ne(e,n):{...e,fixRound:t,updatedAt:n,verdict:"in_progress"}}s(be,"advanceFixRound");function ne(e,n){let t=e.findings.map(r=>f(r.severity)&&(r.status==="stands"||r.status==="candidate")?{...r,status:"open"}:r),i=k(t).length>0||t.some(r=>r.status==="open");return{...e,findings:t,fixRound:e.maxFixRounds,updatedAt:n,verdict:i?"blocked":"approved",precisionHint:E(t)}}s(ne,"markLeftoversOpen");function Re(e,n,t,i){let r=new Set(n),o=e.findings.map(a=>!r.has(a.id)||(t==="fixed"||t==="verified")&&!G(a,e.scopePaths)?a:{...a,status:t});return{...e,findings:o,updatedAt:i,precisionHint:E(o)}}s(Re,"markFindings");function Fe(e,n,t){if(t!=="fixed"&&t!=="verified")return[];let i=new Set(n);return e.findings.filter(r=>i.has(r.id)&&!G(r,e.scopePaths)).map(r=>r.id)}s(Fe,"markFindingsSkippedByScope");function E(e){let n=e.filter(r=>r.status==="verified").length,t=e.filter(r=>r.status==="refuted").length,i=n+t;if(i!==0)return Math.round(n/i*1e3)/1e3}s(E,"computePrecisionHint");function L(e){if(e.verdict==="escalated")return"escalated";if(e.verdict==="approved")return"approved";if(e.findings.length===0)return"in_progress";let n=k(e.findings),t=e.findings.some(r=>r.status==="open");return n.length>0||t?"blocked":e.findings.some(r=>f(r.severity)&&r.status==="candidate")?"in_progress":"approved"}s(L,"computeVerdict");function je(e,n){let t=L(e);return{...e,verdict:t,updatedAt:n,precisionHint:E(e.findings)}}s(je,"finalizeLedger");function ke(e){let t=N(e.findings.filter(i=>f(i.severity)&&(i.status==="fixed"||i.status==="stands"||i.status==="open")),e.scopePaths).map(({id:i,severity:r,status:o,title:a,file:u,line:d,blast:p,dna:g})=>({id:i,severity:r,status:o,title:a,file:u,line:d,blast:p,dna:g}));return{intensity:e.intensity,fixRound:e.fixRound,maxFixRounds:e.maxFixRounds,findings:t,fixOrder:t.map(i=>i.id),scope:(()=>{let i=e.scopePaths??[];return`Re-judge ONLY the persisted ledger findings below plus the fix-diff for those items. Confirm each fixed finding is actually resolved; report regressions on those lines only. Fix order is blast-ranked \u2014 do not reorder by preference.${i.length>0?` Frozen scope (${i.length} paths): ${i.slice(0,12).join(", ")}${i.length>12?"\u2026":""}.`:""}`})(),outOfScope:"Do NOT reopen the original full PR diff. Do NOT invent new WARNING/SUGGESTION loops. Findings whose file is outside the frozen git scope are follow-up only (info) \u2014 they do not enter fix loops. New BLOCKER/CRITICAL on in-scope fix-diff may be added as candidates (evidence tax + severity floor + challenge still apply)."}}s(ke,"buildReReviewBrief");var w="RED (attack): assume the change is hostile. Hunt production killers \u2014 races, auth holes, data loss, silent fail. Prefer over-calling; blue + refuters will kill FPs. Output severity + file:line + 1-line repro. Enforce const-only bindings with a concrete immutable rewrite when reassignment exists.",J="BLUE (defense): assume the author is competent. Only report defects you can reproduce from the code. Challenge red overclaims. Same schema: severity + file:line + evidence. For const-only findings, require a viable immutable rewrite rather than a keyword-only suggestion.";function Se(e,n){if(n==="skip"&&!e)return{kind:"skip_ship",directive:"Intensity skip \u2014 ship without judgment tax.",steps:["prjct ship"],intensity:n,fixRound:0,maxFixRounds:0,counts:$(),rankedFixIds:[]};if(!e)return{kind:"open_ledger",directive:`Open a judgment ledger (intensity=${n}).`,steps:["prjct judgment open","prjct judgment next"],intensity:n,fixRound:0,maxFixRounds:y,counts:$(),rankedFixIds:[],judgeCharters:n==="full"?{red:w,blue:J}:void 0};let t=ie(e.findings),i=N(e.findings),r={intensity:e.intensity,fixRound:e.fixRound,maxFixRounds:e.maxFixRounds,counts:t,rankedFixIds:i.map(o=>o.id),judgeCharters:e.intensity==="full"?{red:w,blue:J}:void 0};if(e.verdict==="escalated")return{...r,kind:"escalate",directive:`ESCALATED: ${e.escalateReason??"judges contradict"}. Surface to user.`,steps:["Present both judge verdicts to the user","Do not ship"]};if(e.verdict==="approved")return{...r,kind:"approve",directive:"Ledger APPROVED \u2014 ship is clear for judgment gate.",steps:["prjct ship"]};if(e.findings.length===0)return{...r,kind:"dispatch_reviewers",directive:e.intensity==="full"?"Dispatch RED + BLUE judges in parallel (blind). Then prjct judgment merge. If both find nothing: prjct judgment approve.":"Dispatch ONE focused reviewer. Record findings with prjct judgment add (or approve if truly clean).",steps:e.intensity==="full"?["Spawn RED judge (attack charter) + BLUE judge (defense charter) in parallel","prjct judgment merge --red '[...]' --blue '[...]'","prjct judgment next"]:["Spawn one fresh-context reviewer (model: sonnet)","prjct judgment add --severity \u2026 --title \u2026 --file \u2026 --line \u2026","prjct judgment challenge --verdicts \u2026"]};if(t.candidates>0&&t.stands===0&&t.fixed===0)return{...r,kind:"dispatch_refuters",directive:`Batch-challenge ${t.candidates} candidate(s). Ceiling: ${D(e.intensity)} vote(s) total \u2014 never per-finding tasks.`,steps:["Spawn ONE batched refuter (or 3-lens panel on full) over ALL candidates","prjct judgment challenge --verdicts id:stands|refuted[,\u2026]","prjct judgment next"]};if(t.stands>0||t.open>0){if(e.fixRound>=e.maxFixRounds)return{...r,kind:"blocked_budget",directive:"Convergence budget exhausted with leftovers \u2014 report open, no round 3.",steps:["prjct judgment fix-round # marks leftovers open","Surface open findings to user or escalate"]};let o=i.slice(0,5).map(a=>`${a.id}(${a.severity})`).join(", ");return{...r,kind:"fix_ranked",directive:`Fix blast-ranked stands (${t.stands} open). Top: ${o||"\u2014"}`,steps:["prjct judgment fix-round",`Implementer fixes ONLY stands \u2014 order: ${r.rankedFixIds.join(" \u2192 ")||"\u2014"}`,`prjct judgment fixed ${r.rankedFixIds.join(" ")}`,"prjct judgment brief # scoped re-judge",`prjct judgment verify ${r.rankedFixIds.join(" ")}`]}}return t.fixed>0?{...r,kind:"rejudge_scoped",directive:`Re-judge ${t.fixed} fixed finding(s) with scoped brief only.`,steps:["prjct judgment brief","Fresh judge on ledger+fix-diff only","prjct judgment verify <ids>","prjct judgment approve"]}:L(e)==="approved"?{...r,kind:"approve",directive:"Clean ledger \u2014 approve and ship.",steps:["prjct judgment approve","prjct ship"]}:{...r,kind:"idle",directive:"Ledger in progress \u2014 run prjct judgment status.",steps:["prjct judgment status","prjct judgment next"]}}s(Se,"buildNextAction");function $(){return{candidates:0,stands:0,refuted:0,fixed:0,verified:0,info:0,open:0,ghosts:0}}s($,"emptyCounts");function ie(e){let n=$();for(let t of e)t.status==="candidate"?n.candidates++:t.status==="stands"?n.stands++:t.status==="refuted"?n.refuted++:t.status==="fixed"?n.fixed++:t.status==="verified"?n.verified++:t.status==="info"?n.info++:t.status==="open"&&n.open++,t.knownFalsePositive&&n.ghosts++;return n}s(ie,"countStatuses");function we(e){switch(e){case"skip":return{intensity:e,reviewers:"none \u2014 trivial/docs-only changeset",refuters:"none",severityFloor:"n/a",evidenceTax:"n/a",maxFixRounds:0,shipExpectation:"ship without judgment ledger"};case"standard":return{intensity:e,reviewers:"exactly ONE focused review pass (fresh-context subagent)",refuters:"exactly ONE batched refuter over all BLOCKER/CRITICAL candidates",severityFloor:"only verified BLOCKER/CRITICAL enter fix loops; WARNING/SUGGESTION = info once",evidenceTax:"blocker without file:line demoted to critical; title-only critical \u2192 info",maxFixRounds:y,shipExpectation:"ledger verdict approved (or --no-spec-gate override)"};case"full":return{intensity:e,reviewers:"dual-blind RED (attack) + BLUE (defense) in parallel \u2014 merge via prjct judgment merge",refuters:"exactly THREE batched refuter votes (correctness/impact/repro); 2-of-3 kills; fail-closed stands",severityFloor:"only verified BLOCKER/CRITICAL enter fix loops; WARNING/SUGGESTION = info once",evidenceTax:"blocker without file:line demoted to critical; title-only critical \u2192 info",maxFixRounds:y,shipExpectation:"ledger verdict approved after \u22642 fix rounds (or escalate)",redCharter:w,blueCharter:J}}}s(we,"intensityProtocol");function Je(e){let{codeStrict:n,intensity:t,ledger:i,override:r}=e;if(r)return{blocked:!1,mode:"none",message:"",reason:"override"};if(t==="skip")return{blocked:!1,mode:"none",message:"",reason:"skip-intensity"};if(!i){let d=`Precision judgment required (intensity=${t}): run \`prjct judgment plan\` \u2192 \`prjct judgment open\` \u2192 follow \`prjct judgment next\`.${t==="full"?" Dual-blind RED+BLUE required (code-strict default).":""} Override only with explicit consent: \`prjct ship --no-judgment-gate\`.`;return n?{blocked:!0,mode:"hard",message:d,reason:"missing-ledger"}:{blocked:!1,mode:"soft",message:`\u2696\uFE0F ${d}`,reason:"soft-reminder"}}let o=L(i);if(o==="approved"){let u=i.precisionHint!==void 0?`, precision\u2248${Math.round(i.precisionHint*100)}%`:"";return{blocked:!1,mode:"none",message:`\u2696\uFE0F judgment ${i.id.slice(0,8)} \u2192 APPROVED (intensity=${i.intensity}, rounds=${i.fixRound}/${i.maxFixRounds}${u})`,reason:"approved"}}if(o==="escalated"){let u=`Judgment escalated: ${i.escalateReason??"judges contradict"}. Resolve with the user before ship.`;return n?{blocked:!0,mode:"hard",message:u,reason:"escalated"}:{blocked:!1,mode:"soft",message:`\u2696\uFE0F ${u}`,reason:"escalated"}}if(o==="blocked"){let u=[...k(i.findings),...i.findings.filter(g=>g.status==="open")],d=u.slice(0,5).map(g=>`${g.severity}:${g.title}`).join("; "),p=`Judgment blocked \u2014 open actionable (${u.length}): ${d||"see ledger"}. Fix blast-ranked + re-judge (\u2264${y} rounds) or escalate. \u2192 \`prjct judgment next\``;return n?{blocked:!0,mode:"hard",message:p,reason:"blocked-findings"}:{blocked:!1,mode:"soft",message:`\u2696\uFE0F ${p}`,reason:"blocked-findings"}}let a=`Judgment in progress (round ${i.fixRound}/${i.maxFixRounds}, ${i.findings.length} findings). \u2192 \`prjct judgment next\``;return n?{blocked:!0,mode:"hard",message:a,reason:"in-progress"}:{blocked:!1,mode:"soft",message:`\u2696\uFE0F ${a}`,reason:"in-progress"}}s(Je,"judgmentShipVerdict");function $e(e,n){let t=j(n),i=t.dna??b(t),r=e.findIndex(d=>(d.dna??b(d))===i);if(r<0){let d={...t,dna:i};return{findings:[...e,d],finding:d,deduped:!1}}let o=e[r],a=j({...o,severity:R[t.severity]>R[o.severity]?t.severity:o.severity,title:t.title.length>=o.title.length?t.title:o.title,file:t.file??o.file,line:t.line??o.line,evidence:(t.evidence?.length??0)>(o.evidence?.length??0)?t.evidence:o.evidence,judge:[o.judge,t.judge].filter(Boolean).join("+")||o.judge,agreedBy:[...new Set([...o.agreedBy??[],...t.agreedBy??[],t.judge].filter(Boolean))],dna:i}),u=[...e];return u[r]=a,{findings:u,finding:a,deduped:!0}}s($e,"upsertFinding");function I(e){return e.replace(/\\/g,"/").replace(/^\.\//,"").replace(/\/+/g,"/").replace(/\/$/,"").trim()}s(I,"normalizeScopePath");function A(e,n){if(!n||n.length===0||!e||!e.trim())return!0;let t=I(e);if(!t)return!0;for(let i of n){let r=I(i);if(r&&(t===r||t.startsWith(`${r}/`)))return!0}return!1}s(A,"pathInScope");function re(e,n){return A(e.file,n)||e.status==="info"||e.status==="refuted"?e:{...e,status:"info",evidence:(e.evidence?`${e.evidence} \xB7 `:"")+"out of frozen review scope (follow-up only; does not enter fix loops or block ship)"}}s(re,"applyScopeFreeze");function Ie(e,n){return e.map(t=>re(t,n))}s(Ie,"applyScopeFreezeAll");function G(e,n){return e.status==="info"||e.status==="refuted"?!1:A(e.file,n)}s(G,"findingInFixScope");function se(){return`jf_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,8)}`}s(se,"newFindingId");function oe(){return`jl_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,8)}`}s(oe,"newLedgerId");function Ee(e){let n=e.scopePaths&&e.scopePaths.length>0?[...new Set(e.scopePaths.map(I).filter(Boolean))]:void 0;return{id:oe(),target:e.target,intensity:e.intensity,maxFixRounds:y,fixRound:0,findings:[],verdict:"in_progress",createdAt:e.now,updatedAt:e.now,baseSha:e.baseSha,headSha:e.headSha,deliveryTier:e.deliveryTier,scopePaths:n,scopeFrozenAt:n?e.now:void 0}}s(Ee,"createLedger");export{q as a,T as b,X as c,ge as d,b as e,F as f,_ as g,Q as h,Z as i,fe as j,S as k,N as l,f as m,j as n,pe as o,ee as p,me as q,he as r,ve as s,D as t,te as u,xe as v,k as w,ye as x,be as y,ne as z,Re as A,Fe as B,E as C,L as D,je as E,ke as F,Se as G,we as H,Je as I,$e as J,I as K,A as L,re as M,Ie as N,G as O,se as P,oe as Q,Ee as R};
|
|
@@ -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 u}from"./chunk-GAOQHD5S.mjs";import{a as r}from"./chunk-E66B27AL.mjs";import{readSync as c}from"node:fs";import{isatty as d}from"node:tty";var p=new Set(["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse"]);function T(e,t){return{hookSpecificOutput:{hookEventName:e,permissionDecision:"deny",permissionDecisionReason:a(t)}}}r(T,"buildDenyOutput");function f(e){let t=(e??"claude").trim().toLowerCase();return t==="gemini"||t==="codex"||t==="cursor"||t==="kimi"?t:"claude"}r(f,"hookHostFrom");function g(){return f(process.env.PRJCT_HOOK_HOST)}r(g,"currentHookHost");function l(e,t=g()){return t==="claude"||t==="codex"||!e||Object.keys(e).length===0?e:t==="gemini"?h(e):t==="cursor"?k(e):t==="kimi"?m(e):e}r(l,"adaptHookOutputForHost");function m(e){if(e.hookSpecificOutput?.permissionDecision==="deny")return e;let n=e;return n.hookSpecificOutput?.additionalContext?n.hookSpecificOutput.additionalContext:n.systemMessage?n.systemMessage:e}r(m,"adaptForKimi");function h(e){let t=e;if(t.hookSpecificOutput?.permissionDecision==="deny")return{decision:"deny",reason:t.hookSpecificOutput.permissionDecisionReason??"blocked by prjct"};let n=e,o=n.hookSpecificOutput;return o?.additionalContext?{hookSpecificOutput:{hookEventName:y(o.hookEventName),additionalContext:o.additionalContext}}:n.systemMessage?{systemMessage:n.systemMessage}:e}r(h,"adaptForGemini");function k(e){let t=e;if(t.hookSpecificOutput?.permissionDecision==="deny")return{decision:"deny",reason:t.hookSpecificOutput.permissionDecisionReason??"blocked by prjct",permissionDecision:"deny",permissionDecisionReason:t.hookSpecificOutput.permissionDecisionReason??"blocked by prjct"};let n=e,o=n.hookSpecificOutput;return o?.additionalContext?{hookSpecificOutput:{hookEventName:S(o.hookEventName),additionalContext:o.additionalContext,additional_context:o.additionalContext},additional_context:o.additionalContext}:n.systemMessage?{systemMessage:n.systemMessage}:e}r(k,"adaptForCursor");function y(e){switch(e){case"UserPromptSubmit":return"BeforeAgent";case"PreToolUse":return"BeforeTool";case"PostToolUse":return"AfterTool";case"Stop":return"AfterAgent";default:return e}}r(y,"mapClaudeEventToGemini");function S(e){switch(e){case"SessionStart":return"sessionStart";case"UserPromptSubmit":return"beforeSubmitPrompt";case"PreToolUse":return"preToolUse";case"PostToolUse":return"postToolUse";case"Stop":return"stop";case"SubagentStart":return"subagentStart";case"SubagentStop":return"subagentStop";default:return e.charAt(0).toLowerCase()+e.slice(1)}}r(S,"mapClaudeEventToCursor");function O(e){if(d(0))return Buffer.alloc(0);try{process.stdin.fd}catch{}let t=Date.now()+e,n=new Int32Array(new SharedArrayBuffer(4)),o=Buffer.alloc(65536),i=[];for(;;)try{let s=c(0,o,0,o.length,null);if(s===0)break;i.push(Buffer.from(o.subarray(0,s)))}catch(s){if(s.code==="EAGAIN"&&Date.now()<t){Atomics.wait(n,0,0,1);continue}break}return Buffer.concat(i)}r(O,"readStdinRaw");function C(){try{let e=O(200).toString("utf-8").trim();return e?JSON.parse(e):{}}catch{return{}}}r(C,"readStdinSafe");function w(e){let t=l(e);process.stdout.write(typeof t=="string"?`${t}
|
|
9
|
+
`:`${JSON.stringify(t)}
|
|
10
|
+
`)}r(w,"emit");function D(){w({})}r(D,"emitEmpty");async function v(e){try{await e()}catch{D()}}r(v,"safeRun");var x=new Set(["this","that","with","from","have","your","please","would","about","there","these","those","what","when","where","which","while","will","been","were","they","them","their","que","como","cuando","donde","porque","para","pero","por","con","sin","los","las","del","una","uno","unos","unas","este","esta","esto","estos","estas","eso","esos","esas","mas","muy","todo","toda","todos","todas","sobre","entre","hasta","desde","hace","hacer","tiene","tienen","debe","deben","puede","pueden","estan","ser","son","algo","ahora","aqui","bien","cada","dale"]);function E(e,t=8){let n=u(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")).toLowerCase(),o=new Set,i=[];for(let s of n.split(/[^\p{L}\p{N}]+/u))if(!(s.length<3)&&!x.has(s)&&!o.has(s)&&(o.add(s),i.push(s),i.length>=t))break;return i}r(E,"extractKeywords");function a(e){return e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,"\uFFFD")}r(a,"stripLoneSurrogates");function A(e,t,n=`
|
|
11
|
+
\u2026 [truncated]`){if(e.length<=t)return e;let o=Math.max(0,t-n.length),i=e.charCodeAt(o-1),s=i>=55296&&i<=56319?o-1:o;return e.slice(0,Math.max(0,s))+n}r(A,"safeTruncate");function N(e,t){if(!t)return{};let n=a(t);return p.has(e)?{hookSpecificOutput:{hookEventName:e,additionalContext:n}}:{systemMessage:n}}r(N,"buildHookOutput");export{T as a,g as b,l as c,O as d,C as e,w as f,v as g,E as h,A as i,N as j};
|
|
@@ -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 p,g as b}from"./chunk-
|
|
8
|
+
import{d as p,g as b}from"./chunk-UHVYBU7F.mjs";import{d as f,o as S}from"./chunk-UH4MD3F3.mjs";import{a as o}from"./chunk-E66B27AL.mjs";b();S();import a from"node:path";var g="file-inventory",m=/^(package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb?|composer\.lock|Cargo\.lock|poetry\.lock|CHANGELOG(\.md)?|LICENSE(\.md)?|\.DS_Store)$/i,x=/(^|\/)(node_modules|dist|build|\.git|coverage|\.next|target|vendor)(\/|$)/i,y=new Set([".png",".jpg",".jpeg",".gif",".webp",".ico",".woff",".woff2",".ttf",".eot",".mp4",".mp3",".zip",".gz",".tar",".wasm",".exe",".dll",".so",".dylib",".bin",".pdf",".ico"]),v={".ts":"TypeScript",".tsx":"TypeScript",".js":"JavaScript",".jsx":"JavaScript",".mjs":"JavaScript",".cjs":"JavaScript",".vue":"Vue",".svelte":"Svelte",".py":"Python",".go":"Go",".rs":"Rust",".java":"Java",".kt":"Kotlin",".kts":"Kotlin",".swift":"Swift",".rb":"Ruby",".php":"PHP",".cs":"C#",".fs":"F#",".cpp":"C++",".cc":"C++",".c":"C",".h":"C/C++",".hpp":"C++",".m":"Objective-C",".mm":"Objective-C++",".scala":"Scala",".clj":"Clojure",".ex":"Elixir",".exs":"Elixir",".erl":"Erlang",".hs":"Haskell",".lua":"Lua",".r":"R",".dart":"Dart",".sql":"SQL",".graphql":"GraphQL",".gql":"GraphQL",".proto":"Protobuf",".md":"Markdown",".mdx":"MDX",".json":"JSON",".yml":"YAML",".yaml":"YAML",".toml":"TOML",".css":"CSS",".scss":"SCSS",".sass":"Sass",".less":"Less",".html":"HTML",".htm":"HTML",".sh":"Shell",".bash":"Shell",".zsh":"Shell",".ps1":"PowerShell",".swiftui":"Swift"};async function h(e,n={}){let t=(await f(e,{skipDotfiles:!0,maxFiles:n.maxFiles??5e4})).filter(l=>{if(x.test(l))return!1;let u=a.basename(l);if(m.test(u))return!1;let c=a.extname(u).toLowerCase();return!!(c&&c!=="."&&!y.has(c))}),r=t.reduce((l,u)=>{let c=a.extname(a.basename(u)).toLowerCase();return l[c]=(l[c]??0)+1,l},Object.create(null)),i=j(r);return{extensions:r,languages:i,fileCount:t.length,builtAt:new Date().toISOString(),projectHint:a.basename(e)}}o(h,"buildFileInventory");function j(e){let n=new Set,s=Object.entries(e).sort((t,r)=>r[1]-t[1]);for(let[t]of s){let r=v[t];r&&n.add(r)}return[...n]}o(j,"languagesFromExtensions");function C(e,n){p.setDoc(e,g,n)}o(C,"saveFileInventory");function d(e){try{return p.getDoc(e,g)}catch{return null}}o(d,"loadFileInventory");async function L(e,n){let s=await h(n);return C(e,s),s}o(L,"refreshFileInventory");function E(e){let n=d(e);return n?.extensions?new Set(Object.keys(n.extensions).map(s=>s.toLowerCase())):new Set}o(E,"inventoryExtensions");function k(e,n,s={}){let t=n.replace(/^\.\//,"").replace(/\\/g,"/").trim();if(!t||x.test(t))return!1;let r=t.split("/").pop()??t;if(m.test(r))return!1;let i=a.extname(r).toLowerCase();return i?!y.has(i):t.includes("/")}o(k,"pathMatchesInventory");function O(e,n){let s=n.replace(/^\.\//,"").replace(/\\/g,"/").trim(),t=s.split("/").pop()??s,r=a.extname(t).toLowerCase();if(!r)return .7;let i=E(e);return i.size===0||i.has(r)?1:.45}o(O,"inventoryPathWeight");function P(e){if(!e||Object.keys(e.extensions).length===0)return"File inventory: empty \u2014 run `prjct sync` to discover languages/extensions.";let n=Object.entries(e.extensions).sort((t,r)=>r[1]-t[1]).slice(0,12).map(([t,r])=>`${t}\xD7${r}`).join(" "),s=e.languages.length>0?e.languages.join(", "):"unknown";return`File inventory: ${e.fileCount} files \xB7 langs: ${s} \xB7 ${n}`}o(P,"formatInventorySummary");export{g as a,h as b,j as c,C as d,d as e,L as f,E as g,k as h,O as i,P as j};
|
|
@@ -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 D}from"./chunk-DYHYDHCW.mjs";import{a as x}from"./chunk-
|
|
8
|
+
import{a as D}from"./chunk-DYHYDHCW.mjs";import{a as x}from"./chunk-I26F7TLM.mjs";import{b as N}from"./chunk-QP5USCDX.mjs";import{e as u,g as M}from"./chunk-UHVYBU7F.mjs";import{b as m,h as C}from"./chunk-A6K4H3YT.mjs";import{a as d}from"./chunk-E66B27AL.mjs";import{z as r}from"zod";var R=["draft","reviewed","in_progress","shipped","archived"];var k=r.object({verdict:r.enum(["pass","fail"]),notes:r.string(),ts:r.string(),candidateHash:r.string().optional()}),P=r.object({risk:r.string().min(1),mitigation:r.string().min(1)}),b=r.object({name:r.string().min(1),given:r.array(r.string()).default([]),when:r.array(r.string()).default([]),then:r.array(r.string()).default([])}),q=r.object({slug:r.string().min(1),name:r.string().min(1),statement:r.string().min(1),scenarios:r.array(b).default([])}),$=r.object({added:r.array(q).default([]),modified:r.array(q).default([]),removed:r.array(r.string().min(1)).default([])}),H=r.object({id:r.string().min(1),ts:r.string(),ops:$}),h=r.object({goal:r.string().min(1),eli10:r.string().default(""),stakes:r.string().default(""),acceptance_criteria:r.array(r.string().min(1)).default([]),scope:r.array(r.string()).default([]),out_of_scope:r.array(r.string()).default([]),risks:r.array(P).default([]),test_plan:r.array(r.string()).default([]),reviews:r.record(r.string(),k).optional(),selected_reviewers:r.array(r.string()).default([]),linked_tasks:r.array(r.string()).default([]),notes:r.string().default(""),tasks_created_at:r.string().nullable().default(null),audit_candidate_hash:r.string().nullable().default(null),scenarios:r.record(r.string(),r.array(b)).default({}),delta_log:r.array(H).default([])});import{createHash as W}from"node:crypto";C();function F(l){return l.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}d(F,"slugifyRequirement");function z(l){return`delta-${W("sha256").update(l.trim()).digest("hex").slice(0,12)}`}d(z,"deltaIdFor");function v(l){return[...l].sort((t,e)=>t.ts===e.ts?t.id<e.id?-1:t.id>e.id?1:0:t.ts<e.ts?-1:1)}d(v,"sortDeltaLog");function L(l,t){let e=new Map;for(let n of[...l,...t])e.has(n.id)||e.set(n.id,n);return v([...e.values()])}d(L,"mergeDeltaLogs");function A(l){let t=new Set;for(let e of l)for(let n of[...e.ops.added,...e.ops.modified])t.add(n.statement);return t}d(A,"allDeltaStatements");function U(l){let t={order:[],statements:new Map,scenarios:new Map},e=d(n=>{t.statements.has(n.slug)||t.order.push(n.slug),t.statements.set(n.slug,n.statement),n.scenarios.length>0?t.scenarios.set(n.slug,n.scenarios):t.scenarios.delete(n.slug)},"upsert");for(let n of v(l)){for(let s of n.ops.added)e(s);for(let s of n.ops.modified)e(s);for(let s of n.ops.removed){t.statements.delete(s),t.scenarios.delete(s);let i=t.order.indexOf(s);i>=0&&t.order.splice(i,1)}}return t}d(U,"foldEntries");function O(l){let t=U(l),e={};for(let n of t.order){let s=t.scenarios.get(n);s&&(e[n]=s)}return{acceptance_criteria:t.order.map(n=>t.statements.get(n)??""),scenarios:e}}d(O,"materializeDeltas");function J(l){let t=[],e=[],n=[],s={section:null,req:null,scenario:null},i=d(()=>{s.scenario&&s.req&&s.req.scenarios.push({name:s.scenario.name,given:s.scenario.given,when:s.scenario.when,then:s.scenario.then}),s.scenario=null},"flushScenario"),c=d(()=>{i();let a=s.req;if(s.req=null,!a)return;let o=F(a.name);if(!o)throw new Error(`DELTA_PARSE: requirement name yields an empty slug: "${a.name}"`);if(s.section==="removed"){n.push(o);return}let g=a.statementLines.join(`
|
|
9
9
|
`).trim();if(!g)throw new Error(`DELTA_PARSE: requirement "${a.name}" has no SHALL statement`);(s.section==="modified"?e:t).push({slug:o,name:a.name,statement:g,scenarios:a.scenarios})},"flushReq");for(let a of l.split(`
|
|
10
10
|
`)){let o=a.trim(),g=o.match(/^##\s+(ADDED|MODIFIED|REMOVED)\s+Requirements\s*$/i);if(g){c(),s.section=g[1].toLowerCase();continue}if(/^#{1,2}\s/.test(o)){c(),s.section=null;continue}let f=o.match(/^###\s+Requirement:\s*(.+)$/i);if(f){if(c(),!s.section)throw new Error('DELTA_PARSE: "### Requirement:" outside an ADDED/MODIFIED/REMOVED Requirements section');s.req={name:f[1].trim(),statementLines:[],scenarios:[]};continue}let S=o.match(/^####\s+Scenario:\s*(.+)$/i);if(S){if(i(),!s.req)throw new Error('DELTA_PARSE: "#### Scenario:" outside a "### Requirement:" block');s.scenario={name:S[1].trim(),given:[],when:[],then:[],last:null};continue}if(s.scenario&&o.startsWith("-")){let p=o.replace(/^-\s+/,"").match(/^(?:\*\*)?(GIVEN|WHEN|THEN|AND)\b\s*:?\s*(?:\*\*)?\s*(.*)$/i);if(p){let _=p[1].toUpperCase(),y=_==="AND"?s.scenario.last??"when":_.toLowerCase();s.scenario[y].push(p[2].trim()),s.scenario.last=y}continue}s.req&&!s.scenario&&o!==""&&s.req.statementLines.push(o)}if(c(),t.length+e.length+n.length===0)throw new Error("DELTA_EMPTY: no ADDED/MODIFIED/REMOVED Requirements sections found");return{added:t,modified:e,removed:n}}d(J,"parseDelta");function X(l,t,e={}){let n=J(t),s=e.id??z(t);if(l.delta_log.some(p=>p.id===s))return l;let i=U(l.delta_log).statements,c=new Set(n.added.map(p=>p.slug));for(let p of n.modified)if(!i.has(p.slug)&&!c.has(p.slug))throw new Error(`DELTA_UNKNOWN_REQUIREMENT: MODIFIED target "${p.name}" (slug: ${p.slug}) does not exist`);for(let p of n.removed)if(!i.has(p)&&!c.has(p))throw new Error(`DELTA_UNKNOWN_REQUIREMENT: REMOVED target slug "${p}" does not exist`);let a={id:s,ts:e.ts??m(),ops:n},o=v([...l.delta_log,a]),g=A(o),f=l.acceptance_criteria.filter(p=>!g.has(p)),S=O(o);return h.parse({...l,acceptance_criteria:[...f,...S.acceptance_criteria],scenarios:S.scenarios,delta_log:o})}d(X,"applyDelta");C();M();var E=class extends Error{constructor(e,n){super(`spec relational projection failed for ${e} (content write rolled back): ${n instanceof Error?n.message:String(n)}`);this.specId=e;this.name="SpecProjectionError"}specId;static{d(this,"SpecProjectionError")}};function w(l,t,e){try{u.run(l,"DELETE FROM spec_review WHERE spec_id = ?",t),u.run(l,"DELETE FROM spec_selected_reviewer WHERE spec_id = ?",t);for(let[n,s]of Object.entries(e.reviews??{}))u.run(l,"INSERT INTO spec_review (id, spec_id, lens, verdict, notes, created_at) VALUES (?, ?, ?, ?, ?, ?)",`${t}-rev-${n}`,t,n,s.verdict,s.notes??null,Date.now());for(let n of e.selected_reviewers)u.run(l,"INSERT OR IGNORE INTO spec_selected_reviewer (spec_id, lens) VALUES (?, ?)",t,n)}catch(n){throw new E(t,n)}}d(w,"projectSpecRelational");var T=class{static{d(this,"SpecStorage")}nextUpdatedAt(t,e){let n=m(),i=u.get(t,"SELECT updated_at FROM specs WHERE id = ?",e)?.updated_at;return!i||n>i?n:new Date(new Date(i).getTime()+1).toISOString()}create(t,e){let n=x(),s=m(),i=h.parse(e.content);try{u.transaction(t,()=>{u.run(t,`INSERT INTO specs (id, title, status, content, tags, created_at, updated_at)
|
|
11
11
|
VALUES (?, ?, 'draft', ?, ?, ?, ?)`,n,e.title,JSON.stringify(i),e.tags?JSON.stringify(e.tags):null,s,s),w(t,n,i)})}catch(a){if(a instanceof E)D.warn(a.message);else throw a}let c={id:n,title:e.title,status:"draft",content:i,tags:e.tags??{},createdAt:s,updatedAt:s,shippedAt:null,shippedPr:null,shippedSha:null,archivedAt:null};return this.publishSync(t,c),c}get(t,e){let n=u.get(t,"SELECT * FROM specs WHERE id = ?",e);return n?this.rowToSpec(n):null}list(t,e={}){let n=[];e.status&&n.push(e.status);let i=`SELECT * FROM specs WHERE 1=1${e.status?" AND status = ?":e.includeArchived?"":" AND status != 'archived'"} ORDER BY created_at DESC`;return u.query(t,i,...n).map(a=>this.rowToSpec(a))}search(t,e){let n=`%${e}%`;return u.query(t,"SELECT * FROM specs WHERE title LIKE ? OR content LIKE ? ORDER BY created_at DESC",n,n).map(i=>this.rowToSpec(i))}updateContent(t,e,n){let s=h.parse(n),i=this.nextUpdatedAt(t,e);try{u.transaction(t,()=>{u.run(t,"UPDATE specs SET content = ?, updated_at = ? WHERE id = ?",JSON.stringify(s),i,e),w(t,e,s)})}catch(a){if(a instanceof E)D.warn(a.message);else throw a}let c=this.get(t,e);return c&&this.publishSync(t,c),c}casUpdate(t,e,n,s){let i=h.parse(n),c=this.nextUpdatedAt(t,e),a=(()=>{try{return u.transaction(t,()=>{let g=u.run(t,"UPDATE specs SET content = ?, updated_at = ? WHERE id = ? AND updated_at = ?",JSON.stringify(i),c,e,s).changes===1;return g&&w(t,e,i),g})}catch(o){if(o instanceof E)return D.warn(o.message),!1;throw o}})();if(a){let o=this.get(t,e);o&&this.publishSync(t,o)}return a}setStatus(t,e,n){if(!R.includes(n))throw new Error(`invalid spec status: ${n}`);let s=this.nextUpdatedAt(t,e),i=[],c=[n,s];n==="shipped"&&(i.push("shipped_at = ?"),c.push(s)),n==="archived"&&(i.push("archived_at = ?"),c.push(s));let a=["status = ?","updated_at = ?",...i].join(", ");c.push(e),u.run(t,`UPDATE specs SET ${a} WHERE id = ?`,...c);let o=this.get(t,e);return o&&this.publishSync(t,o),o}setShippedPr(t,e,n){u.run(t,"UPDATE specs SET shipped_pr = ?, updated_at = ? WHERE id = ?",n,this.nextUpdatedAt(t,e),e);let s=this.get(t,e);return s&&this.publishSync(t,s),s}setShippedSha(t,e,n){u.run(t,"UPDATE specs SET shipped_sha = ?, updated_at = ? WHERE id = ?",n,this.nextUpdatedAt(t,e),e);let s=this.get(t,e);return s&&this.publishSync(t,s),s}linkTask(t,e,n){let s=this.get(t,e);if(!s)return null;if(s.content.linked_tasks.includes(n))return s;let i={...s.content,linked_tasks:[...s.content.linked_tasks,n]};return this.updateContent(t,e,i)}delete(t,e){let n=this.get(t,e);return n?(u.run(t,"DELETE FROM specs WHERE id = ?",e),this.publishSync(t,n,"delete"),!0):!1}applyRemote(t,e){if(!e.id)return;let n=typeof e.content=="string"?e.content:JSON.stringify(e.content??{}),s=R.includes(e.status)?e.status:"draft",i=e.tags==null?null:typeof e.tags=="string"?e.tags:JSON.stringify(e.tags),c=m();if(u.run(t,`INSERT INTO specs (id, title, status, content, tags, created_at, updated_at)
|
|
@@ -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,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 f}from"./chunk-R4ILCXKE.mjs";import{c as _}from"./chunk-OUAS3LZ3.mjs";import{a as k}from"./chunk-5XA5RL5I.mjs";import{a as d,b as E,c as y}from"./chunk-I26F7TLM.mjs";import{d as r,g as R}from"./chunk-UHVYBU7F.mjs";import{b as a,c as T,h as A}from"./chunk-A6K4H3YT.mjs";import{a as c}from"./chunk-E66B27AL.mjs";A();R();function o(s){let e={id:s.id,description:s.description,priority:s.priority??"medium",type:s.type??"feature",section:s.section??"backlog",completed:s.completed===1,createdAt:s.created_at};return s.completed_at!=null&&(e.completedAt=s.completed_at),s.feature_id!=null&&(e.featureId=s.feature_id),s.feature_name!=null&&(e.originFeature=s.feature_name),s.body!=null&&(e.body=s.body),s.agent!=null&&(e.agent=s.agent),s.group_name!=null&&(e.groupName=s.group_name),s.group_id!=null&&(e.groupId=s.group_id),e}c(o,"rowToTask");var p=`INSERT INTO queue_tasks
|
|
9
|
+
(id, description, type, priority, section, created_at, completed, completed_at,
|
|
10
|
+
feature_id, feature_name, body, agent, group_name, group_id)
|
|
11
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;function m(s){return[s.id,s.description,s.type??null,s.priority??null,s.section??"backlog",s.createdAt,s.completed?1:0,s.completedAt??null,s.featureId??null,s.originFeature??null,s.body??null,s.agent??null,s.groupName??null,s.groupId??null]}c(m,"insertParams");var g=class extends k{static{c(this,"QueueStorage")}constructor(){super("queue.json",_)}getDefault(){return{tasks:[],lastUpdated:""}}getEventType(e){return`queue.${e}d`}async getTasks(e){return r.query(e,"SELECT * FROM queue_tasks ORDER BY created_at ASC").map(o)}async getActiveTasks(e){return r.query(e,"SELECT * FROM queue_tasks WHERE section = 'active' AND completed = 0 ORDER BY created_at ASC").map(o)}async getBacklog(e){return r.query(e,"SELECT * FROM queue_tasks WHERE section = 'backlog' AND completed = 0 ORDER BY created_at ASC").map(o)}async getNextTask(e){let t=await this.getActiveTasks(e);return f(t)[0]||null}async addTask(e,t){let i={...t,id:d(),createdAt:a(),completed:!1};return r.run(e,p,...m(i)),await this.publishEvent(e,"queue.task_added",{taskId:i.id,description:i.description,priority:i.priority,section:i.section,created_at:i.createdAt}),i}async addTasks(e,t){let i=a(),u=t.map(n=>({...n,id:d(),createdAt:i,completed:!1}));for(let n of u)r.run(e,p,...m(n));return await this.publishEvent(e,"queue.tasks_added",{count:u.length,tasks:u.map(n=>({id:n.id,description:n.description,created_at:n.createdAt}))}),u}async upsertTask(e,t){let i=await this.getTask(e,t.id);if(i){let n={...i};for(let l of["description","type","priority","section"])t[l]!==void 0&&(n[l]=t[l]);r.run(e,`UPDATE queue_tasks SET description = ?, type = ?, priority = ?, section = ?
|
|
12
|
+
WHERE id = ?`,n.description,n.type??null,n.priority??null,n.section??"backlog",t.id);return}let u={...t,id:t.id,description:t.description,priority:t.priority??"medium",type:t.type??"feature",section:t.section??"backlog",completed:t.completed??!1,createdAt:t.createdAt??a()};r.run(e,p,...m(u))}async removeTask(e,t){r.run(e,"DELETE FROM queue_tasks WHERE id = ?",t),await this.publishEvent(e,"queue.task_removed",{taskId:t})}async deleteByFeatureId(e,t){let u=r.run(e,"DELETE FROM queue_tasks WHERE feature_id = ?",t).changes;return u>0&&await this.publishEvent(e,"queue.tasks_removed_by_feature",{featureId:t,count:u}),u}async completeTask(e,t){let i=a();if(r.run(e,"UPDATE queue_tasks SET completed = 1, completed_at = ? WHERE id = ? AND completed = 0",i,t).changes===0)return null;let n=await this.getTask(e,t);return n&&await this.publishEvent(e,"queue.task_completed",{taskId:t,description:n.description,completedAt:n.completedAt}),n}async moveToSection(e,t,i){r.run(e,"UPDATE queue_tasks SET section = ? WHERE id = ?",i,t)}async setPriority(e,t,i){r.run(e,"UPDATE queue_tasks SET priority = ? WHERE id = ?",i,t)}async getTask(e,t){let i=r.get(e,"SELECT * FROM queue_tasks WHERE id = ?",t);return i?o(i):null}async updateTask(e,t,i){let u=await this.getTask(e,t);if(!u)return null;let n={...u,...i};return r.run(e,"UPDATE queue_tasks SET description = ?, body = ?, type = ?, priority = ?, section = ? WHERE id = ?",n.description,n.body??null,n.type??null,n.priority??null,n.section??"backlog",t),await this.publishEvent(e,"queue.task_updated",{taskId:t}),n}async clearCompleted(e){return r.run(e,"DELETE FROM queue_tasks WHERE completed = 1").changes}async removeStaleCompleted(e){let t=T(E.QUEUE_COMPLETED_DAYS).toISOString(),i=r.query(e,"SELECT * FROM queue_tasks WHERE completed = 1 AND completed_at IS NOT NULL AND completed_at < ?",t).map(o);return i.length===0?0:(y.archiveMany(e,i.map(u=>({entityType:"queue_task",entityId:u.id,entityData:u,summary:u.description,reason:"age"}))),r.run(e,"DELETE FROM queue_tasks WHERE completed = 1 AND completed_at IS NOT NULL AND completed_at < ?",t),await this.publishEvent(e,"queue.stale_removed",{count:i.length}),i.length)}},D=new g;export{D 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 _,d as j}from"./chunk-2UC4DTDO.mjs";import{b as C,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??_(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(j(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"&&C(),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-22AXWLI6.mjs";import"./chunk-UHVYBU7F.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 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-
|
|
8
|
+
import{a,b,c,d}from"./chunk-UYQC63MC.mjs";import"./chunk-DYHYDHCW.mjs";import"./chunk-M5E2YOZ4.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-FW4MEPTB.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-GCDLPKOH.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};
|
package/dist/bin/hook-chunks/{command-installer-LNK7WC5I.mjs → command-installer-UHSXC3UG.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}from"./chunk-
|
|
8
|
+
import{a,b,c,d}from"./chunk-4KXXDQYI.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-FW4MEPTB.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-GCDLPKOH.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-
|
|
8
|
+
import{b as a}from"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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-GCDLPKOH.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as default};
|
package/dist/bin/hook-chunks/{content-bound-stamp-72EQVZLP.mjs → content-bound-stamp-OG2KKN3L.mjs}
RENAMED
|
@@ -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,
|
|
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};
|
package/dist/bin/hook-chunks/{context7-service-4C6VNJUS.mjs → context7-service-GDJ3QICX.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{g as a,h as b,i as c}from"./chunk-
|
|
8
|
+
import{g as a,h as b,i as c}from"./chunk-6GAFRIUQ.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-3WQBTXUC.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-UHVYBU7F.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 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-GLPKMG5A.mjs";import"./chunk-QBYHZX33.mjs";import{a as n}from"./chunk-GPZP7NXL.mjs";import"./chunk-2UC4DTDO.mjs";import"./chunk-BOBFTVAY.mjs";import"./chunk-OGIFB3OE.mjs";import"./chunk-BU22R6JX.mjs";import"./chunk-JR542RI2.mjs";import"./chunk-IGHY4FGS.mjs";import"./chunk-22AXWLI6.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-4HAKTI36.mjs";import"./chunk-C4O243NG.mjs";import"./chunk-X5W2UYQK.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-V2FR2NPL.mjs";import"./chunk-S5ISOGDB.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-I26F7TLM.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-Z4X7JIAP.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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-GCDLPKOH.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-
|
|
8
|
+
import{c as a,d as b,e as c,g as d}from"./chunk-UHVYBU7F.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";d();export{a as PrjctDatabase,c as default,b as prjctDb};
|
package/dist/bin/hook-chunks/{delivery-geometry-VHCURJ7E.mjs → delivery-geometry-WYOEMKMO.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,f,g,h,i,j,k}from"./chunk-
|
|
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-
|
|
8
|
+
import{b as S}from"./chunk-IGHY4FGS.mjs";import{g as A,l as k,n as x,p as E}from"./chunk-22AXWLI6.mjs";import"./chunk-UHVYBU7F.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{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-
|
|
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-IWJG7CZX.mjs";import"./chunk-5XA5RL5I.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import{d as a,g as m}from"./chunk-UHVYBU7F.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 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-S5N2ZZDL.mjs";import"./chunk-C4O243NG.mjs";import"./chunk-X5W2UYQK.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-TXSLON7M.mjs";import"./chunk-V2FR2NPL.mjs";import"./chunk-S5ISOGDB.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-I26F7TLM.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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-GCDLPKOH.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{
|
|
8
|
+
import{v as l,w as d}from"./chunk-A6K4H3YT.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-4HAKTI36.mjs";import{c as T}from"./chunk-X5W2UYQK.mjs";import"./chunk-Y5NQV46G.mjs";import{a as g}from"./chunk-V2FR2NPL.mjs";import"./chunk-S5ISOGDB.mjs";import"./chunk-UUULLTQV.mjs";import{b as A}from"./chunk-XXRAQZNC.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-5XA5RL5I.mjs";import"./chunk-I26F7TLM.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import{b}from"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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{b as _,e as M}from"./chunk-GCKILEXJ.mjs";import"./chunk-GCDLPKOH.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-XKHUAB4H.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-C4O243NG.mjs";import"./chunk-X5W2UYQK.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-V2FR2NPL.mjs";import"./chunk-S5ISOGDB.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-I26F7TLM.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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-GCDLPKOH.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-
|
|
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-
|
|
8
|
+
import{a,b,c}from"./chunk-YDBZO6I3.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-UHVYBU7F.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 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-
|
|
8
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-J5UQVJUW.mjs";import"./chunk-YDBZO6I3.mjs";import"./chunk-YQ55MHKL.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KOGZCFBC.mjs";import"./chunk-UHVYBU7F.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 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-U4OON3S7.mjs";import"./chunk-HEDZA6KC.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-V2FR2NPL.mjs";import"./chunk-S5ISOGDB.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-I26F7TLM.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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-GCDLPKOH.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-U4OON3S7.mjs";import"./chunk-HEDZA6KC.mjs";import{a as p}from"./chunk-EWOK4VE7.mjs";import"./chunk-T6ELTQZM.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-V2FR2NPL.mjs";import"./chunk-S5ISOGDB.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-XXRAQZNC.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-5XA5RL5I.mjs";import"./chunk-I26F7TLM.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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-GCDLPKOH.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-XU35ZYNA.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-QL3NYJTW.mjs";import"./chunk-HEDZA6KC.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-V2FR2NPL.mjs";import"./chunk-S5ISOGDB.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-I26F7TLM.mjs";import"./chunk-QP5USCDX.mjs";import"./chunk-RTEEXGEA.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-PO3QDKTE.mjs";import"./chunk-ABJNOG2I.mjs";import"./chunk-UHVYBU7F.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-GCDLPKOH.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{b as buildLandHandoffContent,a as synthesizeLandHandoff};
|