prjct-cli 3.96.0 → 3.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/bin/prjct.cjs +14 -0
- package/dist/bin/core-chunks/agent-3N2MSSGT.mjs +31 -0
- package/dist/bin/core-chunks/agent-codenames-7N4DU62I.mjs +7 -0
- package/dist/bin/core-chunks/agent-identity-4KFRR5OU.mjs +7 -0
- package/dist/bin/core-chunks/agent-runtime-registry-3RMVBEV2.mjs +7 -0
- package/dist/bin/core-chunks/agent-switch-4SE6GF7R.mjs +7 -0
- package/dist/bin/core-chunks/agents-ZPNNCOH7.mjs +10 -0
- package/dist/bin/core-chunks/ai-provider-RVXK7D7R.mjs +7 -0
- package/dist/bin/core-chunks/analysis-OARMM4AH.mjs +41 -0
- package/dist/bin/core-chunks/auth-config-KWLVKHCY.mjs +7 -0
- package/dist/bin/core-chunks/auto-flush-XA3V7BJ6.mjs +7 -0
- package/dist/bin/core-chunks/auto-updater-PKYQRBGQ.mjs +8 -0
- package/dist/bin/core-chunks/bin-commands-FYID6EYI.mjs +21 -0
- package/dist/bin/core-chunks/capture-3JJPWIF3.mjs +7 -0
- package/dist/bin/core-chunks/capture-gate-G5LGVDME.mjs +7 -0
- package/dist/bin/core-chunks/ceremonies-B565WDCA.mjs +19 -0
- package/dist/bin/core-chunks/changelog-LPJ4GKB6.mjs +10 -0
- package/dist/bin/core-chunks/chunk-225DWS4D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-24EN5Y62.mjs +48 -0
- package/dist/bin/core-chunks/chunk-2EEMQV7N.mjs +9 -0
- package/dist/bin/core-chunks/chunk-2FRLIQKX.mjs +10 -0
- package/dist/bin/core-chunks/chunk-2I5PUQWY.mjs +7 -0
- package/dist/bin/core-chunks/chunk-2JJM3YMW.mjs +44 -0
- package/dist/bin/core-chunks/chunk-2NI4EEK2.mjs +8 -0
- package/dist/bin/core-chunks/chunk-2TJRTFIS.mjs +9 -0
- package/dist/bin/core-chunks/chunk-2VRS5CUH.mjs +9 -0
- package/dist/bin/core-chunks/chunk-2VXPFULA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-3OWKIRK6.mjs +7 -0
- package/dist/bin/core-chunks/chunk-3TRXQAU4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-45LKWJ5D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-4IE7LRH3.mjs +7 -0
- package/dist/bin/core-chunks/chunk-4MR5XSLO.mjs +8 -0
- package/dist/bin/core-chunks/chunk-4PPIE6GA.mjs +102 -0
- package/dist/bin/core-chunks/chunk-4PRD4EU2.mjs +7 -0
- package/dist/bin/core-chunks/chunk-4T7NGLNQ.mjs +16 -0
- package/dist/bin/core-chunks/chunk-5DZ2LTII.mjs +52 -0
- package/dist/bin/core-chunks/chunk-5EF5EOCL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-5OWPZWEU.mjs +13 -0
- package/dist/bin/core-chunks/chunk-5TGZSK4C.mjs +10 -0
- package/dist/bin/core-chunks/chunk-5YLI5V3Q.mjs +8 -0
- package/dist/bin/core-chunks/chunk-5ZBACKED.mjs +14 -0
- package/dist/bin/core-chunks/chunk-623SNKDH.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6FUCOGOW.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6KNMT46X.mjs +18 -0
- package/dist/bin/core-chunks/chunk-6OYLZ4NM.mjs +10 -0
- package/dist/bin/core-chunks/chunk-6POAOY5C.mjs +19 -0
- package/dist/bin/core-chunks/chunk-6RT2P22O.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6U3CYLY5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6U3MV7KZ.mjs +15 -0
- package/dist/bin/core-chunks/chunk-6XTLPAPZ.mjs +15 -0
- package/dist/bin/core-chunks/chunk-76YMLNLF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-7BU6SJBC.mjs +17 -0
- package/dist/bin/core-chunks/chunk-7QTE6X4J.mjs +7 -0
- package/dist/bin/core-chunks/chunk-7ZHWJSW5.mjs +8 -0
- package/dist/bin/core-chunks/chunk-ACIOJQSI.mjs +14 -0
- package/dist/bin/core-chunks/chunk-AJXELVNH.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ALTQ3KL4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ANBDOI53.mjs +8 -0
- package/dist/bin/core-chunks/chunk-ANVCA6LF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-AS3LWTQ4.mjs +16 -0
- package/dist/bin/core-chunks/chunk-B2HY22OD.mjs +50 -0
- package/dist/bin/core-chunks/chunk-B7AQHL7B.mjs +7 -0
- package/dist/bin/core-chunks/chunk-BSR3XUBD.mjs +24 -0
- package/dist/bin/core-chunks/chunk-BTSHD3XJ.mjs +9 -0
- package/dist/bin/core-chunks/chunk-BUD3R6LF.mjs +9 -0
- package/dist/bin/core-chunks/chunk-C35JQUWD.mjs +8 -0
- package/dist/bin/core-chunks/chunk-C7YBUD4K.mjs +10 -0
- package/dist/bin/core-chunks/chunk-CA2VFWFP.mjs +21 -0
- package/dist/bin/core-chunks/chunk-CB3CNJTL.mjs +10 -0
- package/dist/bin/core-chunks/chunk-CFD6CW7T.mjs +46 -0
- package/dist/bin/core-chunks/chunk-CKYBGRCF.mjs +8 -0
- package/dist/bin/core-chunks/chunk-CUIB6CTG.mjs +20 -0
- package/dist/bin/core-chunks/chunk-CVKMV22J.mjs +17 -0
- package/dist/bin/core-chunks/chunk-CWLGRKA7.mjs +6 -0
- package/dist/bin/core-chunks/chunk-CXKDKMYE.mjs +9 -0
- package/dist/bin/core-chunks/chunk-CXNVDJNN.mjs +7 -0
- package/dist/bin/core-chunks/chunk-D62TAZG6.mjs +9 -0
- package/dist/bin/core-chunks/chunk-DEYAQEF5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DIEPWXJJ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DMO3ZFUG.mjs +1259 -0
- package/dist/bin/core-chunks/chunk-DOJPSIMG.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DTMZBK4E.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DW4QMD6J.mjs +10 -0
- package/dist/bin/core-chunks/chunk-DZDEBDAB.mjs +10 -0
- package/dist/bin/core-chunks/chunk-DZVOFEM5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-E5QQDYBR.mjs +7 -0
- package/dist/bin/core-chunks/chunk-E73HSXCX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-EFSPBB4S.mjs +8 -0
- package/dist/bin/core-chunks/chunk-EHVU2SMR.mjs +34 -0
- package/dist/bin/core-chunks/chunk-ESB4ALH2.mjs +7 -0
- package/dist/bin/core-chunks/chunk-EZRNQXCC.mjs +7 -0
- package/dist/bin/core-chunks/chunk-F2FKQUYE.mjs +19 -0
- package/dist/bin/core-chunks/chunk-F7OOBAJO.mjs +30 -0
- package/dist/bin/core-chunks/chunk-FATYLG3L.mjs +14 -0
- package/dist/bin/core-chunks/chunk-FOUBHU4X.mjs +7 -0
- package/dist/bin/core-chunks/chunk-FOWTB762.mjs +7 -0
- package/dist/bin/core-chunks/chunk-GGGDYL4P.mjs +7 -0
- package/dist/bin/core-chunks/chunk-GHSRH4GL.mjs +8 -0
- package/dist/bin/core-chunks/chunk-GSNQKBHZ.mjs +11 -0
- package/dist/bin/core-chunks/chunk-GTG67Z45.mjs +11 -0
- package/dist/bin/core-chunks/chunk-H2KNJUPN.mjs +23 -0
- package/dist/bin/core-chunks/chunk-HA7Y76GF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HCPQZRR3.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HPCSSJXH.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HU5ERAAV.mjs +8 -0
- package/dist/bin/core-chunks/chunk-HVXWQ2XZ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HYIT7MF5.mjs +8 -0
- package/dist/bin/core-chunks/chunk-HYMJVHAX.mjs +13 -0
- package/dist/bin/core-chunks/chunk-ID2C2S33.mjs +18 -0
- package/dist/bin/core-chunks/chunk-ID5KE74L.mjs +7 -0
- package/dist/bin/core-chunks/chunk-IJNKHQIS.mjs +10 -0
- package/dist/bin/core-chunks/chunk-INJ5WT2D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-IOFCSTGM.mjs +7 -0
- package/dist/bin/core-chunks/chunk-J6Y7IVFQ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-JCWA7NLM.mjs +7 -0
- package/dist/bin/core-chunks/chunk-JGGQSMZC.mjs +8 -0
- package/dist/bin/core-chunks/chunk-JPMUJY42.mjs +7 -0
- package/dist/bin/core-chunks/chunk-JT4RNQ67.mjs +15 -0
- package/dist/bin/core-chunks/chunk-KI4OY3UQ.mjs +18 -0
- package/dist/bin/core-chunks/chunk-KPR5TWSN.mjs +7 -0
- package/dist/bin/core-chunks/chunk-KUQLXY2P.mjs +11 -0
- package/dist/bin/core-chunks/chunk-L3DJN3XD.mjs +12 -0
- package/dist/bin/core-chunks/chunk-L4TUXFCL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-L5LFLI4R.mjs +7 -0
- package/dist/bin/core-chunks/chunk-LFOQ7FCR.mjs +10 -0
- package/dist/bin/core-chunks/chunk-LGX2GM45.mjs +7 -0
- package/dist/bin/core-chunks/chunk-LTKUTRRL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-LZILSE5H.mjs +8 -0
- package/dist/bin/core-chunks/chunk-MCY7OXED.mjs +10 -0
- package/dist/bin/core-chunks/chunk-MG3YN3AI.mjs +7 -0
- package/dist/bin/core-chunks/chunk-MPU3VM6Z.mjs +7 -0
- package/dist/bin/core-chunks/chunk-MR5XXHRK.mjs +8 -0
- package/dist/bin/core-chunks/chunk-MXJF3FA7.mjs +7 -0
- package/dist/bin/core-chunks/chunk-MXJKULJY.mjs +9 -0
- package/dist/bin/core-chunks/chunk-NINFE7GS.mjs +9 -0
- package/dist/bin/core-chunks/chunk-NNILF7R3.mjs +7 -0
- package/dist/bin/core-chunks/chunk-NNOX3UU4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-NOHSLOLL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-NXUIMC22.mjs +13 -0
- package/dist/bin/core-chunks/chunk-NZKUCQZK.mjs +8 -0
- package/dist/bin/core-chunks/chunk-O5N6XYPU.mjs +8 -0
- package/dist/bin/core-chunks/chunk-O5VCBMEK.mjs +25 -0
- package/dist/bin/core-chunks/chunk-OE27RFLJ.mjs +8 -0
- package/dist/bin/core-chunks/chunk-OGM34Z6W.mjs +8 -0
- package/dist/bin/core-chunks/chunk-OIE3AKKO.mjs +7 -0
- package/dist/bin/core-chunks/chunk-OXKGN3HG.mjs +7 -0
- package/dist/bin/core-chunks/chunk-P2KU4FFA.mjs +11 -0
- package/dist/bin/core-chunks/chunk-PIA26GWG.mjs +7 -0
- package/dist/bin/core-chunks/chunk-PPSVWUXC.mjs +15 -0
- package/dist/bin/core-chunks/chunk-PQTR6XVW.mjs +7 -0
- package/dist/bin/core-chunks/chunk-PWL3KS7Y.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Q3LUL6LL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Q6C27OL7.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Q7GJIU6D.mjs +8 -0
- package/dist/bin/core-chunks/chunk-QAIEAOJF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-QWRPJARA.mjs +14 -0
- package/dist/bin/core-chunks/chunk-QZ7T2EYR.mjs +25 -0
- package/dist/bin/core-chunks/chunk-RACISWUV.mjs +10 -0
- package/dist/bin/core-chunks/chunk-RCIWCKL7.mjs +9 -0
- package/dist/bin/core-chunks/chunk-ROOCBUKH.mjs +8 -0
- package/dist/bin/core-chunks/chunk-RP7F67ZT.mjs +7 -0
- package/dist/bin/core-chunks/chunk-RXZJB43D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-S6FBPXQL.mjs +9 -0
- package/dist/bin/core-chunks/chunk-SLYLGDX7.mjs +8 -0
- package/dist/bin/core-chunks/chunk-SO3ZPNWT.mjs +7 -0
- package/dist/bin/core-chunks/chunk-SRJEX6XF.mjs +12 -0
- package/dist/bin/core-chunks/chunk-SROBBOJB.mjs +11 -0
- package/dist/bin/core-chunks/chunk-STFUT7R7.mjs +28 -0
- package/dist/bin/core-chunks/chunk-SUXIKMTS.mjs +30 -0
- package/dist/bin/core-chunks/chunk-TDTPDVUM.mjs +8 -0
- package/dist/bin/core-chunks/chunk-TIBYHZFA.mjs +8 -0
- package/dist/bin/core-chunks/chunk-TILUQF6L.mjs +8 -0
- package/dist/bin/core-chunks/chunk-TOORPP6K.mjs +7 -0
- package/dist/bin/core-chunks/chunk-U24YKPYX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-U55OPVYR.mjs +9 -0
- package/dist/bin/core-chunks/chunk-UAYTDSYG.mjs +64 -0
- package/dist/bin/core-chunks/chunk-UHXV7MDW.mjs +12 -0
- package/dist/bin/core-chunks/chunk-UNIBFM6J.mjs +13 -0
- package/dist/bin/core-chunks/chunk-UNNY2IWZ.mjs +9 -0
- package/dist/bin/core-chunks/chunk-UX2ORID4.mjs +9 -0
- package/dist/bin/core-chunks/chunk-UYMZ3NAF.mjs +8 -0
- package/dist/bin/core-chunks/chunk-V6L5PLD7.mjs +18 -0
- package/dist/bin/core-chunks/chunk-V7R3L54M.mjs +7 -0
- package/dist/bin/core-chunks/chunk-V7VA4EQX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-VCSESVZ4.mjs +9 -0
- package/dist/bin/core-chunks/chunk-VCYVYFWE.mjs +9 -0
- package/dist/bin/core-chunks/chunk-VJCTTFKP.mjs +8 -0
- package/dist/bin/core-chunks/chunk-VRFYDYQY.mjs +7 -0
- package/dist/bin/core-chunks/chunk-VWFVSNQT.mjs +7 -0
- package/dist/bin/core-chunks/chunk-W23JLJJZ.mjs +109 -0
- package/dist/bin/core-chunks/chunk-WCTVZQBG.mjs +8 -0
- package/dist/bin/core-chunks/chunk-WTDUJB4I.mjs +8 -0
- package/dist/bin/core-chunks/chunk-WZ6W5ZQ5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-X433BB6F.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XBR63NJA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XC6YAP36.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XJTEPHLC.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XLAGA5B7.mjs +10 -0
- package/dist/bin/core-chunks/chunk-XLFEWZRA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XSZOHNL4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XWLTEAGN.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Y7XOKG4O.mjs +7 -0
- package/dist/bin/core-chunks/chunk-YEALP3WX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-YJOC2JJK.mjs +12 -0
- package/dist/bin/core-chunks/chunk-YLYAYRSJ.mjs +8 -0
- package/dist/bin/core-chunks/chunk-YOGI4WE6.mjs +8 -0
- package/dist/bin/core-chunks/chunk-YOWW4LHK.mjs +8 -0
- package/dist/bin/core-chunks/chunk-YPLFWN62.mjs +7 -0
- package/dist/bin/core-chunks/chunk-YQ6HM3YO.mjs +10 -0
- package/dist/bin/core-chunks/chunk-YZEO5DZA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ZAUJWUUN.mjs +20 -0
- package/dist/bin/core-chunks/chunk-ZBBNCCGV.mjs +12 -0
- package/dist/bin/core-chunks/chunk-ZQ2XH76U.mjs +12 -0
- package/dist/bin/core-chunks/chunk-ZSANMA7K.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ZXTJLMVZ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ZZR3LXCK.mjs +9 -0
- package/dist/bin/core-chunks/cleanup-installs-LD43GI4K.mjs +7 -0
- package/dist/bin/core-chunks/client-D43KKUYH.mjs +8 -0
- package/dist/bin/core-chunks/closest-command-YYNABM7V.mjs +7 -0
- package/dist/bin/core-chunks/cloud-RXHFZ7MX.mjs +14 -0
- package/dist/bin/core-chunks/code-IYK65A62.mjs +12 -0
- package/dist/bin/core-chunks/code-graph-cloud-G3WQBICY.mjs +7 -0
- package/dist/bin/core-chunks/codex-hooks-N5UHKK5B.mjs +7 -0
- package/dist/bin/core-chunks/codex-mcp-G7WNAT6T.mjs +7 -0
- package/dist/bin/core-chunks/codex-skill-IZNP76BJ.mjs +7 -0
- package/dist/bin/core-chunks/command-installer-4ENM4GZR.mjs +7 -0
- package/dist/bin/core-chunks/config-UVF7YOR6.mjs +8 -0
- package/dist/bin/core-chunks/config-manager-QY73WM5U.mjs +7 -0
- package/dist/bin/core-chunks/content-bound-stamp-2PJNI4JC.mjs +7 -0
- package/dist/bin/core-chunks/context-4GB6ICXK.mjs +38 -0
- package/dist/bin/core-chunks/context-MPHOQPXF.mjs +10 -0
- package/dist/bin/core-chunks/context-checkpoint-NBI5HKPV.mjs +27 -0
- package/dist/bin/core-chunks/context-pressure-5URQVNBC.mjs +7 -0
- package/dist/bin/core-chunks/context-tiers-NOKJ75QP.mjs +7 -0
- package/dist/bin/core-chunks/context7-service-2MYRUNKY.mjs +7 -0
- package/dist/bin/core-chunks/core-WMEHDCOK.mjs +70 -0
- package/dist/bin/core-chunks/crew-EYVSIX4L.mjs +24 -0
- package/dist/bin/core-chunks/cursor-hooks-DGDJVAI6.mjs +7 -0
- package/dist/bin/core-chunks/custom-workflow-storage-EBEIG54R.mjs +7 -0
- package/dist/bin/core-chunks/cwd-changed-EUJZOBIC.mjs +7 -0
- package/dist/bin/core-chunks/cycle-budget-card-H37XRAIX.mjs +7 -0
- package/dist/bin/core-chunks/daemon-QARP3RVX.mjs +13 -0
- package/dist/bin/core-chunks/database-UU2ZXSD4.mjs +7 -0
- package/dist/bin/core-chunks/delivery-geometry-GSJ6LXUC.mjs +7 -0
- package/dist/bin/core-chunks/detect-changes-2YIEX7AY.mjs +7 -0
- package/dist/bin/core-chunks/detection-KKDZYWVD.mjs +7 -0
- package/dist/bin/core-chunks/developer-evolution-AVAXGDKQ.mjs +11 -0
- package/dist/bin/core-chunks/developer-profile-2VSFJGCU.mjs +7 -0
- package/dist/bin/core-chunks/discuss-lock-CWXKBBYJ.mjs +7 -0
- package/dist/bin/core-chunks/distill-ZF7WHGCZ.mjs +7 -0
- package/dist/bin/core-chunks/doctor-heal-XFSVPSEY.mjs +7 -0
- package/dist/bin/core-chunks/doctor-service-6ZJBWIXR.mjs +8 -0
- package/dist/bin/core-chunks/drift-refresh-XPJAO2B3.mjs +7 -0
- package/dist/bin/core-chunks/dynasty-outcomes-KDWIEA4Y.mjs +11 -0
- package/dist/bin/core-chunks/editors-config-ELAQA6RV.mjs +7 -0
- package/dist/bin/core-chunks/embeddings-354ZYFKX.mjs +7 -0
- package/dist/bin/core-chunks/enriched-recall-MKBOXB7M.mjs +7 -0
- package/dist/bin/core-chunks/eval-O4YD6YOV.mjs +76 -0
- package/dist/bin/core-chunks/exec-34V6SJYO.mjs +7 -0
- package/dist/bin/core-chunks/file-helper-LLQKU6YF.mjs +7 -0
- package/dist/bin/core-chunks/format-SYVL4CV5.mjs +7 -0
- package/dist/bin/core-chunks/gemini-settings-RGD7JLSP.mjs +7 -0
- package/dist/bin/core-chunks/git-context-ZSWE3KWM.mjs +8 -0
- package/dist/bin/core-chunks/git-helpers-UC53D4FT.mjs +7 -0
- package/dist/bin/core-chunks/grok-mcp-IE2RRRRW.mjs +7 -0
- package/dist/bin/core-chunks/grok-plugin-SSANHBS7.mjs +7 -0
- package/dist/bin/core-chunks/grok-skill-7ZP7R7KO.mjs +7 -0
- package/dist/bin/core-chunks/guard-RT7U3LJX.mjs +13 -0
- package/dist/bin/core-chunks/guards-AXH6V2IJ.mjs +7 -0
- package/dist/bin/core-chunks/handoff-storage-NGUA4Y2L.mjs +7 -0
- package/dist/bin/core-chunks/harness-V7J7WIT2.mjs +43 -0
- package/dist/bin/core-chunks/health-TNB5OC37.mjs +11 -0
- package/dist/bin/core-chunks/help-P7EYELVK.mjs +14 -0
- package/dist/bin/core-chunks/hooks-service-REI56DDC.mjs +91 -0
- package/dist/bin/core-chunks/infer-memory-file-ATP7PSAQ.mjs +7 -0
- package/dist/bin/core-chunks/install-FZQJJWT5.mjs +9 -0
- package/dist/bin/core-chunks/judgment-G5KH6QFC.mjs +21 -0
- package/dist/bin/core-chunks/judgment-ledger-storage-ZTYXPMM4.mjs +7 -0
- package/dist/bin/core-chunks/judgment-orchestrator-E3SO3NVE.mjs +7 -0
- package/dist/bin/core-chunks/judgment-receipt-GO6QEZQC.mjs +7 -0
- package/dist/bin/core-chunks/kimi-hooks-TR6J3OVG.mjs +7 -0
- package/dist/bin/core-chunks/kimi-mcp-ETG7O6O5.mjs +7 -0
- package/dist/bin/core-chunks/land-cue-3BUD3KJJ.mjs +8 -0
- package/dist/bin/core-chunks/land-rho-MCTQDPRH.mjs +8 -0
- package/dist/bin/core-chunks/land-synthesis-MU4EZEYL.mjs +7 -0
- package/dist/bin/core-chunks/lean-26BWCUOR.mjs +34 -0
- package/dist/bin/core-chunks/legacy-crew-sweep-G5UJT2PM.mjs +23 -0
- package/dist/bin/core-chunks/living-context-contract-HZIVBMXX.mjs +7 -0
- package/dist/bin/core-chunks/llm-KMVXVBHG.mjs +18 -0
- package/dist/bin/core-chunks/mcp-BD5TOTCK.mjs +17 -0
- package/dist/bin/core-chunks/memory-dream-6GFV2GXN.mjs +14 -0
- package/dist/bin/core-chunks/memory-export-WJ4H7CFV.mjs +13 -0
- package/dist/bin/core-chunks/memory-index-7NIU34EI.mjs +7 -0
- package/dist/bin/core-chunks/notification-G654IX3O.mjs +7 -0
- package/dist/bin/core-chunks/notify-EWYUBKGO.mjs +9 -0
- package/dist/bin/core-chunks/nyquist-lite-A23B7G4B.mjs +9 -0
- package/dist/bin/core-chunks/one-breath-install-LVNIVN6S.mjs +7 -0
- package/dist/bin/core-chunks/opencode-mcp-L7NC77JF.mjs +7 -0
- package/dist/bin/core-chunks/output-D27IOQXR.mjs +7 -0
- package/dist/bin/core-chunks/pack-integrity-X277OVRB.mjs +9 -0
- package/dist/bin/core-chunks/pack-manager-VN7F6R47.mjs +7 -0
- package/dist/bin/core-chunks/package-R4FUTGOE.mjs +7 -0
- package/dist/bin/core-chunks/package-legitimacy-VHHGI4P7.mjs +7 -0
- package/dist/bin/core-chunks/path-manager-E5DCU5LP.mjs +7 -0
- package/dist/bin/core-chunks/performance-tracker-BFBNR3LY.mjs +7 -0
- package/dist/bin/core-chunks/pi-skill-IZQEUILZ.mjs +7 -0
- package/dist/bin/core-chunks/planning-NOWLKZDS.mjs +8 -0
- package/dist/bin/core-chunks/post-edit-GTBY32JU.mjs +7 -0
- package/dist/bin/core-chunks/pr-convention-37YHTUKM.mjs +7 -0
- package/dist/bin/core-chunks/pre-bash-32ZOGNSP.mjs +10 -0
- package/dist/bin/core-chunks/pre-commit-7TU2A7H4.mjs +7 -0
- package/dist/bin/core-chunks/pre-edit-ASEWA5TS.mjs +8 -0
- package/dist/bin/core-chunks/pre-package-ZTZACEBB.mjs +7 -0
- package/dist/bin/core-chunks/pre-search-MKDRFJSE.mjs +8 -0
- package/dist/bin/core-chunks/pre-secrets-RJELPDFY.mjs +7 -0
- package/dist/bin/core-chunks/precision-classifier-AV75OEVA.mjs +7 -0
- package/dist/bin/core-chunks/precision-judgment-MCX4MIIG.mjs +7 -0
- package/dist/bin/core-chunks/preferences-KO5U2ELK.mjs +31 -0
- package/dist/bin/core-chunks/primitives-GNUMBYOK.mjs +13 -0
- package/dist/bin/core-chunks/prjct-md-BSFV7OQQ.mjs +7 -0
- package/dist/bin/core-chunks/product-GUHSUNIH.mjs +68 -0
- package/dist/bin/core-chunks/project-agent-surfaces-BXCJJXB7.mjs +7 -0
- package/dist/bin/core-chunks/project-alignment-ADKW3ZWQ.mjs +17 -0
- package/dist/bin/core-chunks/project-file-inventory-XIHHJZUP.mjs +7 -0
- package/dist/bin/core-chunks/project-memory-L5MDZYST.mjs +7 -0
- package/dist/bin/core-chunks/project-style-evolution-HIMSJQQB.mjs +7 -0
- package/dist/bin/core-chunks/prompt-47YP5JIR.mjs +25 -0
- package/dist/bin/core-chunks/protocol-4AJ4J5SI.mjs +7 -0
- package/dist/bin/core-chunks/provider-cache-IWVTFLGT.mjs +7 -0
- package/dist/bin/core-chunks/provider-status-HQUBKMH5.mjs +7 -0
- package/dist/bin/core-chunks/publish-helper-2T2EHM3V.mjs +7 -0
- package/dist/bin/core-chunks/purge-6SJKHKIY.mjs +7 -0
- package/dist/bin/core-chunks/queue-storage-BKH5XX2E.mjs +7 -0
- package/dist/bin/core-chunks/registry-YM2EYUXY.mjs +7 -0
- package/dist/bin/core-chunks/reliability-repair-JMPZWDD4.mjs +20 -0
- package/dist/bin/core-chunks/removed-verbs-EU3WPRNK.mjs +7 -0
- package/dist/bin/core-chunks/retention-QSXWKE4H.mjs +7 -0
- package/dist/bin/core-chunks/retro-B2EBN4TA.mjs +13 -0
- package/dist/bin/core-chunks/review-risk-LBPY5M3K.mjs +12 -0
- package/dist/bin/core-chunks/run-recorder-EZQ32M55.mjs +7 -0
- package/dist/bin/core-chunks/safe-artifacts-PE2TMEZQ.mjs +9 -0
- package/dist/bin/core-chunks/sdd-3WNZJ6FU.mjs +9 -0
- package/dist/bin/core-chunks/seed-MMDJE2UO.mjs +10 -0
- package/dist/bin/core-chunks/self-heal-R5FBXEVQ.mjs +7 -0
- package/dist/bin/core-chunks/session-continuity-OQDB5UYI.mjs +10 -0
- package/dist/bin/core-chunks/session-start-FM6UL7MT.mjs +7 -0
- package/dist/bin/core-chunks/session-tracker-RG2FBWMS.mjs +7 -0
- package/dist/bin/core-chunks/settings-installer-4XHM3HAZ.mjs +7 -0
- package/dist/bin/core-chunks/setup-BL36ZWPW.mjs +140 -0
- package/dist/bin/core-chunks/setup-V75BWRHU.mjs +38 -0
- package/dist/bin/core-chunks/shipping-NZVM57JJ.mjs +12 -0
- package/dist/bin/core-chunks/signals-digest-P5BG6MZF.mjs +7 -0
- package/dist/bin/core-chunks/skill-adherence-JE3N3Y67.mjs +13 -0
- package/dist/bin/core-chunks/skill-generator-LKS5BNMY.mjs +7 -0
- package/dist/bin/core-chunks/skill-index-L4UWQCQE.mjs +11 -0
- package/dist/bin/core-chunks/spec-VC3VTUI3.mjs +27 -0
- package/dist/bin/core-chunks/spec-context-inference-KOINWBC7.mjs +9 -0
- package/dist/bin/core-chunks/spec-inventory-2TT7BTFZ.mjs +9 -0
- package/dist/bin/core-chunks/spec-service-UZ53XL6X.mjs +7 -0
- package/dist/bin/core-chunks/spec-task-breakdown-3Y7YXCIQ.mjs +7 -0
- package/dist/bin/core-chunks/state-storage-6CGFWW5D.mjs +7 -0
- package/dist/bin/core-chunks/stdin-spill-Y2A6WOOW.mjs +7 -0
- package/dist/bin/core-chunks/stop-6SH36ULT.mjs +15 -0
- package/dist/bin/core-chunks/subagent-start-TVGBV2V2.mjs +7 -0
- package/dist/bin/core-chunks/subagent-stop-APWY6KMX.mjs +7 -0
- package/dist/bin/core-chunks/surface-attribution-CQVM2SWY.mjs +7 -0
- package/dist/bin/core-chunks/symbol-graph-PCS43SHZ.mjs +7 -0
- package/dist/bin/core-chunks/sync-analyzer-M37Q4LE4.mjs +7 -0
- package/dist/bin/core-chunks/sync-client-6TAOTJWR.mjs +7 -0
- package/dist/bin/core-chunks/sync-cursor-storage-GKO4X2QN.mjs +18 -0
- package/dist/bin/core-chunks/task-orchestration-GS4J4KGS.mjs +7 -0
- package/dist/bin/core-chunks/task-overview-XSMK7YEN.mjs +7 -0
- package/dist/bin/core-chunks/task-service-KFYL5NT4.mjs +7 -0
- package/dist/bin/core-chunks/tdd-P2PP4RR4.mjs +9 -0
- package/dist/bin/core-chunks/team-WKAAOEFE.mjs +42 -0
- package/dist/bin/core-chunks/template-loader-H4FE37HV.mjs +7 -0
- package/dist/bin/core-chunks/token-backfill-WPXXD5MP.mjs +12 -0
- package/dist/bin/core-chunks/token-economics-JZAQJUET.mjs +7 -0
- package/dist/bin/core-chunks/transcript-jsonl-OC7TH4Q3.mjs +7 -0
- package/dist/bin/core-chunks/trust-boundary-24F662RM.mjs +7 -0
- package/dist/bin/core-chunks/uninstall-W6EAUS7N.mjs +13 -0
- package/dist/bin/core-chunks/update-PSHEJJI5.mjs +11 -0
- package/dist/bin/core-chunks/update-checker-LZCUPWQB.mjs +7 -0
- package/dist/bin/core-chunks/usefulness-A3GRKFL3.mjs +7 -0
- package/dist/bin/core-chunks/user-home-BODIAXR4.mjs +7 -0
- package/dist/bin/core-chunks/vault-retire-notice-FDRT7BJG.mjs +8 -0
- package/dist/bin/core-chunks/velocity-storage-5T7RYOWH.mjs +7 -0
- package/dist/bin/core-chunks/verb-names-QWGYABFH.mjs +7 -0
- package/dist/bin/core-chunks/version-B5DBRVGQ.mjs +7 -0
- package/dist/bin/core-chunks/watch-service-7V3O52TW.mjs +9 -0
- package/dist/bin/core-chunks/weak-frontier-demo-ZCDTMYRO.mjs +7 -0
- package/dist/bin/core-chunks/weak-model-mode-LOAPFJPQ.mjs +7 -0
- package/dist/bin/core-chunks/work-graph-WHMCFN6U.mjs +7 -0
- package/dist/bin/core-chunks/work-graph-ZNV7S6EU.mjs +16 -0
- package/dist/bin/core-chunks/work-scope-XXPUH6TU.mjs +7 -0
- package/dist/bin/core-chunks/workflow-XM77QYRF.mjs +61 -0
- package/dist/bin/core-chunks/workflows-reference-T7RH7IGJ.mjs +7 -0
- package/dist/bin/core-chunks/workspace-occupancy-JUXKZBUZ.mjs +7 -0
- package/dist/bin/core-chunks/worktree-service-YRRPFU57.mjs +11 -0
- package/dist/bin/core-chunks/world-model-impact-FAGGNUGN.mjs +7 -0
- package/dist/bin/hook-chunks/{agent-switch-I4MTVE56.mjs → agent-switch-TAJWH2ZD.mjs} +1 -1
- package/dist/bin/hook-chunks/{analysis-VN7APBHR.mjs → analysis-34WDLUXK.mjs} +2 -2
- package/dist/bin/hook-chunks/{auto-flush-DX3FVSQE.mjs → auto-flush-7TIEBPPQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{capture-gate-MEIQD7ZS.mjs → capture-gate-JFVGG7RB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-UVATSTRF.mjs → chunk-22CBVTZ3.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-MW54MTLB.mjs → chunk-3JOZN7YJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-E7NA34VQ.mjs → chunk-4X3KUIXK.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-3AHW4XQH.mjs → chunk-5ALQBNIZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-H2DGDAQP.mjs → chunk-5VPZI2ZF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-XYKVWO23.mjs → chunk-6EHYPQ5U.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-6NMHVPAI.mjs +35 -0
- package/dist/bin/hook-chunks/chunk-7H5UVM6X.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-LR24AIEW.mjs → chunk-A3R47SP6.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-AFGXKRRP.mjs +12 -0
- package/dist/bin/hook-chunks/{chunk-64ZEBHDX.mjs → chunk-CGAKJDKT.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EI6VQZOX.mjs → chunk-CJY4Y5SO.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-FSFURDAE.mjs +16 -0
- package/dist/bin/hook-chunks/{chunk-ZZBNFNMG.mjs → chunk-FTBBQHI4.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-G4VJKPG7.mjs +69 -0
- package/dist/bin/hook-chunks/{chunk-7PBWIO4K.mjs → chunk-GAJOSSB4.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-DB226JIV.mjs → chunk-GER6HFWV.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-LQLCYBFF.mjs → chunk-H3GIYI4Q.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-KDNUQPAK.mjs → chunk-HRU2KNEB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-33BHU4OM.mjs → chunk-LCGWETJ6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-WL6PKX3U.mjs → chunk-MG2DNP4Z.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-XV2LJVYB.mjs → chunk-MIJZT4ZR.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-NGB6JNSB.mjs +18 -0
- package/dist/bin/hook-chunks/{chunk-IJ523YO2.mjs → chunk-OALZUWC6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EGCYDLSO.mjs → chunk-PZMBZ6GE.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-RT2DFIWF.mjs → chunk-QIB6Y6AH.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-ZQI4TJ5C.mjs → chunk-QMNZPNVY.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-YLOK4WRR.mjs → chunk-R4YDE3GU.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-WJV24WE6.mjs → chunk-RFKRKUHB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-SWJ7TLBD.mjs → chunk-RGOTJCZU.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-FZS3XGEA.mjs → chunk-RLKYEL3F.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-LF3S3MYE.mjs → chunk-T2KVL6PZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-NLL5AV2G.mjs → chunk-T7DRHVK3.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-KV4NXLPT.mjs → chunk-TWFLW6OJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ADYTBOCZ.mjs → chunk-UJIOGFNP.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-Y3RHBU2R.mjs → chunk-UK24P7PV.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-OLQAMCYV.mjs → chunk-ULNGKZB6.mjs} +5 -5
- package/dist/bin/hook-chunks/{chunk-UMJ5D5I6.mjs → chunk-UWHVPO6X.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-YHOZTAZH.mjs → chunk-V6GGH6H5.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EXVL2OFE.mjs → chunk-XC2BSGWF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-JZDZH6IV.mjs → chunk-YATXTHDL.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-DCHIPMOG.mjs → chunk-ZF2EVMY7.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-PVCEWFHS.mjs → chunk-ZPAY2NSF.mjs} +2 -2
- package/dist/bin/hook-chunks/{codex-skill-6CRFUF3A.mjs → codex-skill-BFRU5FTP.mjs} +1 -1
- package/dist/bin/hook-chunks/{command-installer-MUHZWDZA.mjs → command-installer-3XOZGKOQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{config-manager-2JJPCLKC.mjs → config-manager-UPB7NEXF.mjs} +1 -1
- package/dist/bin/hook-chunks/{context7-service-NH4BMGSJ.mjs → context7-service-7VFXEQVN.mjs} +1 -1
- package/dist/bin/hook-chunks/{cwd-changed-UTD6Y4MS.mjs → cwd-changed-USNJYUH7.mjs} +1 -1
- package/dist/bin/hook-chunks/{distill-5TNAM3LY.mjs → distill-47YVL7IH.mjs} +1 -1
- package/dist/bin/hook-chunks/{enriched-recall-6VOIUNLN.mjs → enriched-recall-CVYI52NO.mjs} +1 -1
- package/dist/bin/hook-chunks/{format-IIOFTSBF.mjs → format-DPIN45EG.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-receipt-QLV3MYFT.mjs → judgment-receipt-G2DKQR7U.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-cue-57B23PEL.mjs → land-cue-3JD2TXFP.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-synthesis-ZVPFJERV.mjs → land-synthesis-5C4KGCTB.mjs} +1 -1
- package/dist/bin/hook-chunks/{legacy-crew-sweep-GR6HRSHX.mjs → legacy-crew-sweep-XQNXNZES.mjs} +2 -2
- package/dist/bin/hook-chunks/{memory-index-XE2MWKQS.mjs → memory-index-LL6SQJ2N.mjs} +1 -1
- package/dist/bin/hook-chunks/{notification-GU2ZJP5K.mjs → notification-ACQBRJG3.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-integrity-WV5U3AFF.mjs → pack-integrity-DCXVRRJZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-manager-QLFQKP24.mjs → pack-manager-KYWKNYUY.mjs} +1 -1
- package/dist/bin/hook-chunks/{planning-VPAX5DZL.mjs → planning-KOU3XKWS.mjs} +2 -2
- package/dist/bin/hook-chunks/{post-edit-UXCFSR3Y.mjs → post-edit-CK2MYQEN.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-bash-MB4JNNYG.mjs → pre-bash-W5A5CTR3.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-commit-U7TRFKWX.mjs → pre-commit-5Q24RM4S.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-edit-MDCQXI5F.mjs → pre-edit-YIJ4BCYL.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-package-A6ZI5R64.mjs → pre-package-O4RMVA4T.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-search-ZZO3LGXJ.mjs → pre-search-WYOWC3D6.mjs} +1 -1
- package/dist/bin/hook-chunks/{prjct-md-MS52YLI2.mjs → prjct-md-2UVHFYTJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-agent-surfaces-6AIW7KL6.mjs → project-agent-surfaces-BKFYUMRV.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-memory-UDH56VFP.mjs → project-memory-OC5GTJPY.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-style-evolution-IJXT2MCP.mjs → project-style-evolution-2IFJCACQ.mjs} +1 -1
- package/dist/bin/hook-chunks/prompt-JIWMP563.mjs +26 -0
- package/dist/bin/hook-chunks/{purge-N2WN6NDB.mjs → purge-FQK3Z4QS.mjs} +1 -1
- package/dist/bin/hook-chunks/{retention-RET4P2RO.mjs → retention-2FETBJFG.mjs} +1 -1
- package/dist/bin/hook-chunks/{sdd-PB6WKSLE.mjs → sdd-V43TSJ2P.mjs} +1 -1
- package/dist/bin/hook-chunks/{session-continuity-BIJXMN44.mjs → session-continuity-RO2ACICF.mjs} +1 -1
- package/dist/bin/hook-chunks/{session-start-R2VMKW2L.mjs → session-start-FKKFMKQ5.mjs} +1 -1
- package/dist/bin/hook-chunks/{setup-PPIZHVXS.mjs → setup-YV2DKG5L.mjs} +2 -2
- package/dist/bin/hook-chunks/{shipping-C637PCOF.mjs → shipping-SCNFEXBY.mjs} +4 -4
- package/dist/bin/hook-chunks/{spec-context-inference-RTTDOZZO.mjs → spec-context-inference-BD3ANTXA.mjs} +1 -1
- package/dist/bin/hook-chunks/{spec-service-ENLAAMVL.mjs → spec-service-OWYOAGXS.mjs} +2 -2
- package/dist/bin/hook-chunks/{spec-task-breakdown-RUDEP3AY.mjs → spec-task-breakdown-HOTLUFDM.mjs} +1 -1
- package/dist/bin/hook-chunks/{state-storage-AJUPG7J5.mjs → state-storage-EMWLIFQJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{stop-DPXAWJFN.mjs → stop-MIXT7WXA.mjs} +3 -3
- package/dist/bin/hook-chunks/{subagent-start-AFHPXL2S.mjs → subagent-start-NO3TN65K.mjs} +1 -1
- package/dist/bin/hook-chunks/{subagent-stop-5BMV63ML.mjs → subagent-stop-CKWIXX7W.mjs} +1 -1
- package/dist/bin/hook-chunks/{surface-attribution-EGIKCVMF.mjs → surface-attribution-BYESPLXM.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-overview-F3GB77OA.mjs → task-overview-P3VRH2FD.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-service-FZABHPFV.mjs → task-service-5ONSBKKP.mjs} +1 -1
- package/dist/bin/hook-chunks/{tdd-TAMBOPN3.mjs → tdd-SESB4IG3.mjs} +1 -1
- package/dist/bin/hook-chunks/{template-loader-MXOMU4XH.mjs → template-loader-KO67FVHO.mjs} +1 -1
- package/dist/bin/hook-chunks/{weak-model-mode-BMSPGEQY.mjs → weak-model-mode-HPXBKXJT.mjs} +1 -1
- package/dist/bin/hook-chunks/{work-scope-YCS4GTXW.mjs → work-scope-RNPGACPA.mjs} +1 -1
- package/dist/bin/hook-chunks/{workspace-occupancy-JOBYNNXV.mjs → workspace-occupancy-3NEAXILW.mjs} +1 -1
- package/dist/bin/prjct-core.mjs +9 -3323
- package/dist/bin/prjct-hooks.mjs +1 -1
- package/dist/bin/prjct.mjs +7 -1
- package/dist/daemon/entry.mjs +591 -582
- package/dist/mcp/server.mjs +320 -313
- package/package.json +4 -2
- package/dist/bin/hook-chunks/chunk-3UB6SFRA.mjs +0 -11
- package/dist/bin/hook-chunks/chunk-D7DQABWO.mjs +0 -35
- package/dist/bin/hook-chunks/chunk-IWUF2LGO.mjs +0 -18
- package/dist/bin/hook-chunks/chunk-M4YM7Z3F.mjs +0 -69
- package/dist/bin/hook-chunks/chunk-TB57OYGW.mjs +0 -16
- package/dist/bin/hook-chunks/chunk-ZYCNW75E.mjs +0 -9
- package/dist/bin/hook-chunks/prompt-7VZLYONO.mjs +0 -24
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as H}from"./chunk-F7OOBAJO.mjs";import{a as J}from"./chunk-ANBDOI53.mjs";import"./chunk-JT4RNQ67.mjs";import"./chunk-VCSESVZ4.mjs";import"./chunk-YJOC2JJK.mjs";import{a as G}from"./chunk-5DZ2LTII.mjs";import{f as z}from"./chunk-FOWTB762.mjs";import"./chunk-6U3CYLY5.mjs";import"./chunk-LTKUTRRL.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-KUQLXY2P.mjs";import"./chunk-HCPQZRR3.mjs";import"./chunk-EHVU2SMR.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import{h as i}from"./chunk-ID2C2S33.mjs";import{b as E}from"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import{d as B}from"./chunk-7QTE6X4J.mjs";import{a as K,b as F,c as u}from"./chunk-4PPIE6GA.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DZVOFEM5.mjs";import"./chunk-5EF5EOCL.mjs";import"./chunk-DTMZBK4E.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import{d as v}from"./chunk-IJNKHQIS.mjs";import{D as O,E as N,F as A,G as ie}from"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import{a as D,p as oe}from"./chunk-D62TAZG6.mjs";import"./chunk-OE27RFLJ.mjs";import"./chunk-FATYLG3L.mjs";import"./chunk-2EEMQV7N.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import{d as x,g as se}from"./chunk-XWLTEAGN.mjs";import"./chunk-5ZBACKED.mjs";import"./chunk-DW4QMD6J.mjs";import"./chunk-DOJPSIMG.mjs";import{f as _,g as U,l as T,p as ae}from"./chunk-HYIT7MF5.mjs";import{e as P,g as ne}from"./chunk-225DWS4D.mjs";import{a as m,e as M}from"./chunk-3TRXQAU4.mjs";import j from"node:fs/promises";import ce from"node:http";import I from"node:path";import s from"chalk";ie();import{createHash as re,randomBytes as V}from"node:crypto";var q="pkce-v1",W=32;function L(r){return r.toString("base64url")}m(L,"base64Url");function Y(){let r=L(V(W)),e=L(V(W)),t=L(re("sha256").update(r,"ascii").digest());return{state:e,codeVerifier:r,codeChallenge:t,codeChallengeMethod:"S256"}}m(Y,"generatePkceMaterial");function Q(r){return new URLSearchParams({flow:q,port:String(r.port),device_id:r.deviceId,hostname:r.hostname,state:r.state,code_challenge:r.codeChallenge,code_challenge_method:"S256"})}m(Q,"buildCliLoginSearchParams");function X(r,e){if(r.get("key"))return{ok:!1,reason:"legacy-bearer",message:"This CLI requires PKCE login. Update the web app or set flow=pkce-v1; bearer tokens in the callback URL are no longer accepted."};let o=r.get("code"),n=r.get("state");return!o||!n?{ok:!1,reason:"missing",message:"Missing authorization code or state in callback"}:n!==e?{ok:!1,reason:"mismatch",message:"Login state mismatch \u2014 try `prjct login` again"}:{ok:!0,code:o,state:n}}m(X,"parsePkceCallback");function Z(r){return{flow:q,code:r.code,state:r.state,code_verifier:r.codeVerifier,device_id:r.deviceId,redirect_uri:`http://127.0.0.1:${r.port}/callback`}}m(Z,"buildExchangeBody");function ee(r){if(!r||typeof r!="object")return null;let e=r,t=e.apiKey??e.api_key,o=e.userId??e.user_id,n=e.email,a=e.deviceId??e.device_id;return!t||!o||!n||!a?null:{apiKey:t,userId:o,email:n,deviceId:a}}m(ee,"parseMintedKeyResponse");ne();oe();ae();se();var te=class extends G{static{m(this,"SetupCommands")}async auth(e=null,t={}){switch(e?.split(" ")[0]||"status"){case"login":return t.md||i.fail("Manual token login is not supported. Run prjct login."),{success:!1,message:t.md?"## Error\nManual token login is not supported. Run `prjct login`.":""};case"logout":return await u.clearAuth(),await this.refreshDaemonAuth(),t.md||i.done("Logged out. Auth credentials cleared"),{success:!0,message:t.md?`## Auth
|
|
8
|
+
- **Status**: Logged out`:""};default:{let n=await u.getStatus();return t.md?{success:!0,message:n.authenticated?`## Auth Status
|
|
9
|
+
- **Authenticated**: Yes
|
|
10
|
+
- **Email**: ${n.email||"N/A"}
|
|
11
|
+
- **Token**: stored securely
|
|
12
|
+
- **Last auth**: ${n.lastAuth||"N/A"}`:"## Auth Status\n- **Authenticated**: No\n- Run `prjct login` to connect"}:(n.authenticated?i.box("Auth Status",`Email: ${n.email||"N/A"}
|
|
13
|
+
Token: stored securely
|
|
14
|
+
Since: ${n.lastAuth||"N/A"}`):(i.info("Not authenticated"),i.info(`Run ${s.cyan("prjct login")} to connect`)),{success:!0,message:""})}}}async login(e={}){let t=await u.getStatus();if(t.authenticated)return e.md||(i.box("Already Authenticated",`Email: ${t.email}
|
|
15
|
+
Token: stored securely`),i.info(`Run ${s.cyan("prjct logout")} first to re-authenticate`)),{success:!0,message:e.md?`## Already Authenticated
|
|
16
|
+
- **Email**: ${t.email}
|
|
17
|
+
- **Token**: stored securely
|
|
18
|
+
|
|
19
|
+
Run \`prjct logout\` first to re-authenticate.`:""};let o=process.env.PRJCT_WEB_URL||F,n=process.env.PRJCT_API_URL||K,a=Y(),c={settled:!1,listenPort:0};return new Promise(h=>{let l=m(g=>{c.settled||(c.settled=!0,h(g))},"finish"),d=ce.createServer(async(g,p)=>{let k=new URL(g.url||"/","http://127.0.0.1"),w={"Content-Type":"text/html","Cache-Control":"no-store","Referrer-Policy":"no-referrer"};if(k.pathname==="/callback"){let f=X(k.searchParams,a.state);if(!f.ok){let C=(f.reason==="legacy-bearer",400);p.writeHead(C,w),p.end(this.buildErrorPage(f.message)),f.reason==="legacy-bearer"&&(e.md||(i.warn(f.message),i.info("Update prjct-cli-app or open the login URL with flow=pkce-v1")));return}let{verified:y,failureMessage:b,email:$}=await(async()=>{try{let C=Z({code:f.code,state:f.state,codeVerifier:a.codeVerifier,deviceId:await u.getDeviceId(),port:c.listenPort}),R=await fetch(`${n}/auth/cli/exchange`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(C)});if(!R.ok)return{verified:!1,failureMessage:`Exchange failed (${R.status})`,email:""};let S=ee(await R.json());return S?(await u.saveAuth(S.apiKey,S.userId,S.email),await u.write({apiUrl:n}),await B.testConnection()?{verified:!0,failureMessage:"",email:S.email}:(await u.clearAuth(),{verified:!1,failureMessage:"Could not verify credentials with prjct Cloud",email:S.email})):{verified:!1,failureMessage:"Malformed exchange response",email:""}}catch(C){return await u.clearAuth(),{verified:!1,failureMessage:C instanceof Error?C.message:"Could not store credentials securely",email:""}}})();y?(p.writeHead(200,w),p.end(this.buildSuccessPage($))):(p.writeHead(401,w),p.end(this.buildErrorPage(b))),d.close(),y?(e.md||(i.step(3,3,"Connected"),i.stop(),i.box("Authentication Complete",`Email: ${$}
|
|
20
|
+
Token: stored securely
|
|
21
|
+
Status: Connected`)),await this.refreshDaemonAuth(),await this.autoSync(),l({success:!0,message:e.md?`## Authenticated
|
|
22
|
+
- **Email**: ${$}
|
|
23
|
+
- **Token**: stored securely`:""})):(e.md||i.fail(`Authentication failed: ${b}`),l({success:!1,message:e.md?`## Error
|
|
24
|
+
Authentication failed: ${b}`:""}));return}p.writeHead(404,w),p.end("Not found")});d.listen(0,"127.0.0.1",async()=>{let g=d.address();if(!g||typeof g=="string"){d.close(),e.md||i.fail("Failed to start callback server"),l({success:!1,message:e.md?`## Error
|
|
25
|
+
Failed to start callback server`:""});return}c.listenPort=g.port;let p=await u.getDeviceId(),k=await u.getHostname(),w=Q({port:c.listenPort,deviceId:p,hostname:k,state:a.state,codeChallenge:a.codeChallenge}),f=`${o}/auth/cli?flow=pkce-v1&port=${c.listenPort}`,y=`${o}/auth/cli?${w.toString()}`;i.step(1,3,"Opening browser..."),i.stop(),i.info(s.dim(f));let b=process.platform,$=b==="darwin"?`open "${y}"`:b==="win32"?`start "" "${y}"`:`xdg-open "${y}"`;try{await D($)}catch{i.warn("Could not open browser automatically"),i.info("Visit the URL printed by your terminal session (full URL not echoed for safety)"),i.info(y)}i.step(2,3,"Waiting for authentication...")}),setTimeout(()=>{c.settled||(d.close(),i.stop(),e.md||(i.fail("Authentication timed out"),i.info(`Run ${s.cyan("prjct login")} to try again`)),l({success:!1,message:e.md?"## Error\nAuthentication timed out. Run `prjct login` to try again.":""}))},300*1e3)})}async logout(){return await u.clearAuth(),i.done("Logged out"),{success:!0,message:""}}async refreshDaemonAuth(){try{let{restartDaemon:e}=await import("./client-D43KKUYH.mjs");await e()}catch{}}async autoSync(){try{let e=await E.readConfig(process.cwd()).catch(()=>null),t=e?.projectId;if(!t||!e.cloud?.enabled||e.cloud.paused)return;i.spin("Syncing project...");let o=await H.sync(t,{include:e.cloud.include??{}});if(i.stop(),o.success&&!o.skipped){let n=o.pushed?.count||0,a=o.pulled?.count||0;n>0||a>0?i.done(`Synced (${n} pushed, ${a} pulled)`):i.done("Synced \u2014 everything up to date")}}catch{i.stop()}}buildSuccessPage(e){return`<!DOCTYPE html>
|
|
26
|
+
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
27
|
+
<title>prjct CLI Connected</title>
|
|
28
|
+
<style>
|
|
29
|
+
*{margin:0;padding:0;box-sizing:border-box}
|
|
30
|
+
body{font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',sans-serif;
|
|
31
|
+
background:#0a0a0a;color:#e5e5e5;display:flex;justify-content:center;align-items:center;min-height:100vh}
|
|
32
|
+
.card{text-align:center;max-width:420px;padding:2.5rem}
|
|
33
|
+
.logo{font-size:.875rem;letter-spacing:.05em;color:#a3a3a3;margin-bottom:2rem;font-family:ui-monospace,monospace}
|
|
34
|
+
.logo span{color:#e5e5e5}
|
|
35
|
+
.icon{width:64px;height:64px;border-radius:50%;background:rgba(34,211,238,.12);
|
|
36
|
+
display:flex;align-items:center;justify-content:center;margin:0 auto 1.5rem}
|
|
37
|
+
.icon svg{width:32px;height:32px;color:#22d3ee}
|
|
38
|
+
h1{font-size:1.5rem;font-weight:600;margin-bottom:.75rem}
|
|
39
|
+
.details{background:#141414;border:1px solid #262626;border-radius:8px;padding:1rem 1.25rem;
|
|
40
|
+
margin:1.25rem 0;text-align:left;font-size:.875rem;line-height:1.75}
|
|
41
|
+
.details .label{color:#888}
|
|
42
|
+
.details .value{color:#e5e5e5}
|
|
43
|
+
.hint{color:#666;font-size:.8125rem;margin-top:1rem}
|
|
44
|
+
</style></head>
|
|
45
|
+
<body><div class="card">
|
|
46
|
+
<div class="logo"><span>prjct</span>/cli</div>
|
|
47
|
+
<div class="icon"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
|
48
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></div>
|
|
49
|
+
<h1>CLI Connected</h1>
|
|
50
|
+
<div class="details">
|
|
51
|
+
<span class="label">Account:</span> <span class="value">${e}</span><br>
|
|
52
|
+
<span class="label">Token:</span> <span class="value">stored securely</span>
|
|
53
|
+
</div>
|
|
54
|
+
<p class="hint">Return to your terminal to continue.</p>
|
|
55
|
+
</div></body></html>`}buildErrorPage(e){return`<!DOCTYPE html>
|
|
56
|
+
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
57
|
+
<title>prjct CLI \u2014 Error</title>
|
|
58
|
+
<style>
|
|
59
|
+
*{margin:0;padding:0;box-sizing:border-box}
|
|
60
|
+
body{font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',sans-serif;
|
|
61
|
+
background:#0a0a0a;color:#e5e5e5;display:flex;justify-content:center;align-items:center;min-height:100vh}
|
|
62
|
+
.card{text-align:center;max-width:420px;padding:2.5rem}
|
|
63
|
+
.logo{font-size:.875rem;letter-spacing:.05em;color:#a3a3a3;margin-bottom:2rem;font-family:ui-monospace,monospace}
|
|
64
|
+
.logo span{color:#e5e5e5}
|
|
65
|
+
.icon{width:64px;height:64px;border-radius:50%;background:rgba(239,68,68,.12);
|
|
66
|
+
display:flex;align-items:center;justify-content:center;margin:0 auto 1.5rem}
|
|
67
|
+
.icon svg{width:32px;height:32px;color:#ef4444}
|
|
68
|
+
h1{font-size:1.5rem;font-weight:600;margin-bottom:.75rem}
|
|
69
|
+
.msg{background:#141414;border:1px solid #262626;border-radius:8px;padding:1rem 1.25rem;
|
|
70
|
+
margin:1.25rem 0;font-size:.875rem;color:#f87171}
|
|
71
|
+
.hint{color:#666;font-size:.8125rem;margin-top:1rem}
|
|
72
|
+
</style></head>
|
|
73
|
+
<body><div class="card">
|
|
74
|
+
<div class="logo"><span>prjct</span>/cli</div>
|
|
75
|
+
<div class="icon"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
|
76
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg></div>
|
|
77
|
+
<h1>Authentication Failed</h1>
|
|
78
|
+
<div class="msg">${e}</div>
|
|
79
|
+
<p class="hint">Return to your terminal and try again.</p>
|
|
80
|
+
</div></body></html>`}async start(){let e=await v.checkInstallation(),t=(N(),M(O)),o=await t.detectCodex(),n=await t.detectAntigravity(),a=e.providerDetected,c=a?await t.getActiveProvider():null,h=a?c.displayName:o.installed?"OpenAI Codex":"AI agents";if(console.log(`\u{1F680} Setting up prjct for ${h}...
|
|
81
|
+
`),!a&&!o.installed&&!n.installed&&(console.log("\u2139\uFE0F No local CLI runtime detected."),console.log(" prjct will still use AGENTS.md + MCP-compatible surfaces after init.")),a){console.log("\u{1F4E6} Installing p. command router...");let l=await v.installCommands();if(!l.success)return{success:!1,message:`\u274C Installation failed: ${l.error}`};console.log(`
|
|
82
|
+
\u2705 Installed ${l.installed?.length??0} commands to:
|
|
83
|
+
${A.getDisplayPath(l.path||"")}`),this.printInstallErrors(l.errors)}return await this.finishProviderInstall(o,n,c,"Installed Codex skill"),console.log(`
|
|
84
|
+
\u{1F389} Setup complete!`),console.log(`
|
|
85
|
+
Next steps:`),console.log(` 1. Open ${h}`),console.log(" 2. Navigate to your project"),console.log(" 3. Run: prjct init"),{success:!0,message:""}}async setup(e={}){console.log(`\u{1F527} Reconfiguring prjct...
|
|
86
|
+
`);let t=(N(),M(O)),o=await t.detectCodex(),n=await t.detectAntigravity(),c=(await v.checkInstallation()).providerDetected;if(e.force&&(console.log("\u{1F5D1}\uFE0F Removing existing installation..."),await v.uninstallCommands()),!c&&!o.installed&&!n.installed&&(console.log("\u2139\uFE0F No local CLI runtime detected."),console.log(" Continuing with universal AGENTS.md/MCP-compatible setup.")),c){console.log("\u{1F4E6} Installing p. command router...");let l=await v.installCommands();if(!l.success)return{success:!1,message:`\u274C Setup failed: ${l.error}`};console.log(`
|
|
87
|
+
\u2705 Installed ${l.installed?.length??0} commands`),this.printInstallErrors(l.errors),console.log(`
|
|
88
|
+
\u{1F4DD} Installing global configuration...`);let d=await v.installGlobalConfig(),g=d.path?A.getDisplayPath(d.path):"global config";d.success?d.action==="created"?console.log(`\u2705 Created ${g}`):d.action==="updated"?console.log(`\u2705 Updated ${g}`):d.action==="appended"&&console.log(`\u2705 Added prjct config to ${g}`):console.log(`\u26A0\uFE0F ${d.error}`)}else console.log("\u2139\uFE0F No Claude/Gemini global command surface detected; skipping CLI router cleanup.");let h=c?await t.getActiveProvider():null;if(h?.name==="claude"){console.log(`
|
|
89
|
+
\u26A1 Installing status line...`);let l=await this.installStatusLine();l.success?console.log("\u2705 Status line configured"):console.log(`\u26A0\uFE0F ${l.error}`)}return await this.finishProviderInstall(o,n,h,"Codex skill installed"),console.log(`
|
|
90
|
+
\u{1F389} Setup complete!
|
|
91
|
+
`),this.showAsciiArt(),{success:!0,message:""}}async setupMcpServers(){await J()}printInstallErrors(e){if((e?.length??0)>0){console.log(`
|
|
92
|
+
\u26A0\uFE0F ${e?.length??0} errors:`);for(let t of e??[])console.log(` - ${t.file}: ${t.error}`)}}async finishProviderInstall(e,t,o,n){await this.installCodexSurface(e.installed,n),await this.installAntigravitySurface(t.installed),await this.setupMcpServers(),await this.installProjectAgentSurfacesIfConfigured(),await this.saveSetupStamp(o?.name??(e.installed?"codex":t.installed?"antigravity":"claude"))}async saveSetupStamp(e){try{let t=(await import("./editors-config-ELAQA6RV.mjs")).default,o=I.join(A.globalConfigDir,"runtime-surfaces");await t.saveConfig(x,o,e)}catch(t){console.log(`\u26A0\uFE0F Setup stamp failed (non-blocking): ${P(t)}`)}}async installProjectAgentSurfacesIfConfigured(){try{let e=process.cwd();if(!await E.isConfigured(e))return;let{writeProjectAgentSurfaces:o}=await import("./project-agent-surfaces-BXCJJXB7.mjs"),{detectInstalledAgents:n}=await import("./detection-KKDZYWVD.mjs"),a=await o(e,{agents:await n(e),explicit:!0});a.prjctMd.action!=="unchanged"&&console.log("\u2705 Project PRJCT.md ready"),a.agentsMd.action!=="unchanged"&&console.log("\u2705 Project AGENTS.md ready"),a.claudeMd&&a.claudeMd.action!=="unchanged"&&console.log("\u2705 Project CLAUDE.md ready"),a.ideRules.length>0&&console.log(`\u2705 Project IDE rules ready: ${a.ideRules.join(", ")}`)}catch(e){console.log(`\u26A0\uFE0F Project agent surface setup failed (non-blocking): ${P(e)}`)}}async installCodexSurface(e,t){if(e)try{let{installCodexSkill:o,verifyCodexPRouterReady:n}=await import("./codex-skill-IZNP76BJ.mjs");await o();let a=await n({autoRepair:!0});a.verified?(console.log(`\u2705 ${t}`),console.log("\u2705 Codex p. router ready")):(console.log(`\u26A0\uFE0F Codex skill setup incomplete: ${a.message||"router verification failed"}`),console.log(" Run `prjct setup` to retry Codex configuration."))}catch(o){console.log(`\u26A0\uFE0F Codex skill setup failed (non-blocking): ${P(o)}`)}}async installAntigravitySurface(e){if(e)try{let t=await import("node:os"),{getTemplateContent:o}=await import("./template-loader-H4FE37HV.mjs"),n=I.join(t.homedir(),".gemini","antigravity","skills","prjct"),a=I.join(n,"SKILL.md"),c=o("antigravity/SKILL.md");if(!c)throw new Error("Antigravity SKILL.md template not found");await j.mkdir(n,{recursive:!0}),await j.writeFile(a,c,"utf-8"),console.log("\u2705 Antigravity skill installed")}catch(t){console.log(`\u26A0\uFE0F Antigravity skill setup failed (non-blocking): ${P(t)}`)}}async installStatusLine(){try{let e=A.getClaudeDir(),t=A.getClaudeSettingsPath(),o=I.join(e,"prjct-statusline.sh");if(await T(o)&&(await j.readFile(o,"utf-8")).includes("build_statusline"))return{success:!0};let n=`#!/bin/bash
|
|
93
|
+
# prjct Status Line for Claude Code
|
|
94
|
+
# Shows version update notifications and current task
|
|
95
|
+
|
|
96
|
+
# Current CLI version (embedded at install time)
|
|
97
|
+
CLI_VERSION="${x}"
|
|
98
|
+
|
|
99
|
+
# Read JSON context from stdin (provided by Claude Code)
|
|
100
|
+
read -r json
|
|
101
|
+
|
|
102
|
+
# Extract cwd from JSON
|
|
103
|
+
CWD=$(echo "$json" | grep -o '"cwd"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*"cwd"[[:space:]]*:[[:space:]]*"\\([^"]*\\)".*/\\1/')
|
|
104
|
+
|
|
105
|
+
# Check if this is a prjct project
|
|
106
|
+
CONFIG="$CWD/.prjct/prjct.config.json"
|
|
107
|
+
if [[ -f "$CONFIG" ]]; then
|
|
108
|
+
# Extract projectId
|
|
109
|
+
PROJECT_ID=$(grep -o '"projectId"[[:space:]]*:[[:space:]]*"[^"]*"' "$CONFIG" | sed 's/.*"projectId"[[:space:]]*:[[:space:]]*"\\([^"]*\\)".*/\\1/')
|
|
110
|
+
|
|
111
|
+
if [[ -n "$PROJECT_ID" ]]; then
|
|
112
|
+
# Upgrade notice \u2014 the daemon checks npm and writes this GLOBAL flag.
|
|
113
|
+
# The statusline only READS it; it does no version comparison itself.
|
|
114
|
+
UPDATE_STATUS="$HOME/.prjct-cli/state/update-status.json"
|
|
115
|
+
if [[ -f "$UPDATE_STATUS" ]] && grep -q '"updateAvailable"[[:space:]]*:[[:space:]]*true' "$UPDATE_STATUS"; then
|
|
116
|
+
LATEST=$(grep -o '"latest"[[:space:]]*:[[:space:]]*"[^"]*"' "$UPDATE_STATUS" | sed 's/.*"latest"[[:space:]]*:[[:space:]]*"\\([^"]*\\)".*/\\1/')
|
|
117
|
+
echo "\u26A0\uFE0F prjct v$LATEST available! Run p. upgrade"
|
|
118
|
+
exit 0
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
# Show current task if exists
|
|
122
|
+
STATE="$HOME/.prjct-cli/projects/$PROJECT_ID/storage/state.json"
|
|
123
|
+
if [[ -f "$STATE" ]]; then
|
|
124
|
+
TASK=$(grep -o '"description"[[:space:]]*:[[:space:]]*"[^"]*"' "$STATE" | head -1 | sed 's/.*"description"[[:space:]]*:[[:space:]]*"\\([^"]*\\)".*/\\1/')
|
|
125
|
+
STATUS=$(grep -o '"status"[[:space:]]*:[[:space:]]*"[^"]*"' "$STATE" | head -1 | sed 's/.*"status"[[:space:]]*:[[:space:]]*"\\([^"]*\\)".*/\\1/')
|
|
126
|
+
|
|
127
|
+
if [[ -n "$TASK" ]] && [[ "$STATUS" == "active" ]]; then
|
|
128
|
+
# Truncate task to 40 chars
|
|
129
|
+
TASK_SHORT="\${TASK:0:40}"
|
|
130
|
+
[[ \${#TASK} -gt 40 ]] && TASK_SHORT="$TASK_SHORT..."
|
|
131
|
+
echo "\u{1F3AF} $TASK_SHORT"
|
|
132
|
+
exit 0
|
|
133
|
+
fi
|
|
134
|
+
fi
|
|
135
|
+
fi
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
# Default: show prjct branding
|
|
139
|
+
echo "\u26A1 prjct"
|
|
140
|
+
`;await j.writeFile(o,n,{mode:493});let a=await T(t)?await _(t).catch(()=>null).then(c=>c??{}):{};return a.statusLine={type:"command",command:o},await U(t,a),{success:!0}}catch(e){return z(e)}}showAsciiArt(){console.log(s.cyan("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501")),console.log(""),console.log(s.bold.cyan(" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557")),console.log(s.bold.cyan(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D")),console.log(s.bold.cyan(" \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551")),console.log(s.bold.cyan(" \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551")),console.log(s.bold.cyan(" \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551")),console.log(s.bold.cyan(" \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D")),console.log(""),console.log(` ${s.bold.cyan("prjct")}${s.magenta("/")}${s.green("cli")} ${s.dim.white(`v${x} installed`)}`),console.log(""),console.log(` ${s.yellow("\u26A1")} Improve developer + agent performance`),console.log(` ${s.green("\u{1F9E0}")} Rich project context without context bloat`),console.log(` ${s.cyan("\u{1F916}")} Human-in-the-loop work cycles`),console.log(""),console.log(s.cyan("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501")),console.log(""),console.log(s.bold.cyan("\u{1F680} Quick Start")),console.log(s.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log(""),console.log(` ${s.bold("1.")} Initialize your project:`),console.log(` ${s.green("cd your-project && prjct init")}`),console.log(""),console.log(` ${s.bold("2.")} Start your first work cycle:`),console.log(` ${s.green('prjct work "build auth"')}`),console.log(""),console.log(` ${s.bold("3.")} Ship & celebrate:`),console.log(` ${s.green('prjct ship "user login"')}`),console.log(""),console.log(s.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log(""),console.log(` ${s.dim("Documentation:")} ${s.cyan("https://prjct.app")}`),console.log(` ${s.dim("Report issues:")} ${s.cyan("https://github.com/prjct-app/cli/issues")}`),console.log(""),console.log(s.bold.magenta("Ship with better context.")),console.log("")}};export{te as SetupCommands};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b}from"./chunk-DZVOFEM5.mjs";import{a as ie}from"./chunk-5EF5EOCL.mjs";import{a as re}from"./chunk-GGGDYL4P.mjs";import{d as ce}from"./chunk-5TGZSK4C.mjs";import{c as B}from"./chunk-DTMZBK4E.mjs";import{c as te,d as Te,f as N,i as Se}from"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import{b as oe}from"./chunk-HVXWQ2XZ.mjs";import{c as se,d as ae}from"./chunk-2FRLIQKX.mjs";import"./chunk-PIA26GWG.mjs";import{a as w,b as ne}from"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import{d as k}from"./chunk-IJNKHQIS.mjs";import{A as X,C as Y,E as $e,F as x,G as ee,a as z,c as ye,t as M,w as Z,z as Q}from"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import{b as O,f as ve}from"./chunk-OE27RFLJ.mjs";import"./chunk-FATYLG3L.mjs";import{a as G,b as we}from"./chunk-2EEMQV7N.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import{d as h,e as H,g as V}from"./chunk-XWLTEAGN.mjs";import"./chunk-5ZBACKED.mjs";import"./chunk-DW4QMD6J.mjs";import"./chunk-DOJPSIMG.mjs";import{f as q,g as K,i as J,l,p as W}from"./chunk-HYIT7MF5.mjs";import{a as A,e as T,g as U}from"./chunk-225DWS4D.mjs";import{a as u}from"./chunk-3TRXQAU4.mjs";ve();import{execFileSync as Ce}from"node:child_process";import v from"node:fs/promises";import F from"node:os";import y from"node:path";import s from"chalk";ye();import{execFileSync as le,execSync as Ie}from"node:child_process";var D={git:{name:"git",command:"git --version",versionRegex:/git version ([\d.]+)/,required:!0,installHint:"Install Git: https://git-scm.com/downloads",docs:"https://git-scm.com/doc"},node:{name:"node",command:"node --version",versionRegex:/v([\d.]+)/,required:!0,installHint:"Install Node.js: https://nodejs.org",docs:"https://nodejs.org/docs"},bun:{name:"bun",command:"bun --version",versionRegex:/([\d.]+)/,required:!1,installHint:"Install Bun: curl -fsSL https://bun.sh/install | bash",docs:"https://bun.sh/docs"},gh:{name:"gh",command:"gh --version",versionRegex:/gh version ([\d.]+)/,required:!1,installHint:"Install GitHub CLI: https://cli.github.com",docs:"https://cli.github.com/manual"},npm:{name:"npm",command:"npm --version",versionRegex:/([\d.]+)/,required:!1,installHint:"npm comes with Node.js: https://nodejs.org"},claude:{name:"claude",command:"claude --version",versionRegex:/claude ([\d.]+)/,required:!1,installHint:"Install Claude Code: npm install -g @anthropic-ai/claude-code",docs:"https://docs.anthropic.com/claude-code"},gemini:{name:"gemini",command:"gemini --version",versionRegex:/gemini ([\d.]+)/,required:!1,installHint:"Install Gemini CLI: npm install -g @google/gemini-cli",docs:"https://ai.google.dev/gemini-api/docs"}},_=class{static{u(this,"DependencyValidator")}cache=new Map;cacheTimeout=6e4;cacheTimestamps=new Map;checkTool(e){let i=this.getCached(e);if(i)return i;let o=D[e];if(!o)return this.checkUnknownTool(e);let n=this.executeCheck(o);return this.setCache(e,n),n}ensureTool(e){let i=this.checkTool(e);if(!i.available){let o=D[e],n=i.error||{message:`${e} is not available`,hint:o?.installHint||`Install ${e} and try again`,docs:o?.docs};throw new P(n)}}ensureTools(e){let i=[];for(let o of e)this.checkTool(o).available||i.push(o);if(i.length>0){let o=i.map(n=>{let f=D[n];return f?` ${n}: ${f.installHint}`:` ${n}: Install and try again`}).join(`
|
|
8
|
+
`);throw new P({message:`Missing required tools: ${i.join(", ")}`,hint:`Install the following:
|
|
9
|
+
${o}`})}}isAvailable(e){return this.checkTool(e).available}getVersion(e){return this.checkTool(e).version}checkAll(e){let i=e||Object.keys(D),o=new Map;for(let n of i)o.set(n,this.checkTool(n));return o}clearCache(){this.cache.clear(),this.cacheTimestamps.clear()}executeCheck(e){try{let i=Ie(e.command,{encoding:"utf-8",stdio:["pipe","pipe","pipe"],timeout:5e3});return{available:!0,version:e.versionRegex?.exec(i)?.[1]}}catch{return{available:!1,error:b(`${e.name} is not installed or not in PATH`,e.installHint,{docs:e.docs})}}}checkUnknownTool(e){if(!/^[a-zA-Z0-9_-]+$/.test(e))return{available:!1,error:b(`Invalid tool name: ${e}`,"Tool names must only contain alphanumeric characters, hyphens, and underscores")};try{return le(e,["--version"],{encoding:"utf-8",stdio:["pipe","pipe","pipe"],timeout:5e3}),{available:!0}}catch{try{return le(e,["-v"],{encoding:"utf-8",stdio:["pipe","pipe","pipe"],timeout:5e3}),{available:!0}}catch{return{available:!1,error:b(`${e} is not installed or not in PATH`,`Install ${e} and try again`)}}}}getCached(e){let i=this.cacheTimestamps.get(e);return i?z(i,this.cacheTimeout)?(this.cache.delete(e),this.cacheTimestamps.delete(e),null):this.cache.get(e)||null:null}setCache(e,i){this.cache.set(e,i),this.cacheTimestamps.set(e,Date.now())}},P=class extends Error{static{u(this,"DependencyError")}hint;docs;constructor(e){super(e.message),this.name="DependencyError",this.hint=e.hint,this.docs=e.docs}},de=new _;Se();Te();U();W();ne();V();$e();we();ee();U();W();ne();V();ee();import c from"node:fs/promises";import je from"node:os";import d from"node:path";async function me(t,e){let i=await l(t)?await q(t).catch(o=>{if(!(o instanceof SyntaxError))throw o;return null})??{}:{};i.statusLine={type:"command",command:e},await K(t,i)}u(me,"ensureStatusLineSettings");async function pe(){try{let t=d.join(je.homedir(),".claude"),e=d.join(t,"settings.json"),i=d.join(t,"prjct-statusline.sh"),o=x.getStatusLinePath(),n=d.join(o,"statusline.sh"),f=d.join(o,"themes"),r=d.join(o,"lib"),p=d.join(o,"components"),I=d.join(o,"config.json"),g=d.join(H,"assets","statusline"),S=d.join(g,"statusline.sh"),a=d.join(g,"themes"),m=d.join(g,"lib"),j=d.join(g,"components"),C=d.join(g,"default-config.json");if(await l(t)||await c.mkdir(t,{recursive:!0}),await l(o)||await c.mkdir(o,{recursive:!0}),await l(f)||await c.mkdir(f,{recursive:!0}),await l(r)||await c.mkdir(r,{recursive:!0}),await l(p)||await c.mkdir(p,{recursive:!0}),await l(n)){let $=await c.readFile(n,"utf8");if($.includes("CLI_VERSION=")){let E=$.match(/CLI_VERSION="([^"]*)"/);if(E&&E[1]!==h){let R=$.replace(/CLI_VERSION="[^"]*"/,`CLI_VERSION="${h}"`);await c.writeFile(n,R,{mode:493})}await L(m,r),await L(j,p),await ue(i,n),await me(e,i);return}}if(await l(S)){let $=(await c.readFile(S,"utf8")).replace(/CLI_VERSION="[^"]*"/,`CLI_VERSION="${h}"`);if(await c.writeFile(n,$,{mode:493}),await L(m,r),await L(j,p),await l(a)){let E=await c.readdir(a);for(let R of E){let fe=d.join(a,R),he=d.join(f,R);await c.copyFile(fe,he)}}!await l(I)&&await l(C)&&await c.copyFile(C,I)}else{let $=`#!/bin/bash
|
|
10
|
+
# prjct Status Line for Claude Code
|
|
11
|
+
CLI_VERSION="${h}"
|
|
12
|
+
input=$(cat)
|
|
13
|
+
CWD=$(echo "$input" | jq -r '.workspace.current_dir // "~"' 2>/dev/null)
|
|
14
|
+
CONFIG="$CWD/.prjct/prjct.config.json"
|
|
15
|
+
if [ -f "$CONFIG" ]; then
|
|
16
|
+
PROJECT_ID=$(jq -r '.projectId // ""' "$CONFIG" 2>/dev/null)
|
|
17
|
+
if [ -n "$PROJECT_ID" ]; then
|
|
18
|
+
# Upgrade notice \u2014 the daemon checks npm and writes this GLOBAL flag.
|
|
19
|
+
# The statusline only READS it; it does no version comparison itself.
|
|
20
|
+
UPDATE_STATUS="$HOME/.prjct-cli/state/update-status.json"
|
|
21
|
+
if [ -f "$UPDATE_STATUS" ] && [ "$(jq -r '.updateAvailable // false' "$UPDATE_STATUS" 2>/dev/null)" = "true" ]; then
|
|
22
|
+
LATEST=$(jq -r '.latest // ""' "$UPDATE_STATUS" 2>/dev/null)
|
|
23
|
+
echo "prjct v$LATEST - run p. upgrade"
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
STATE="$HOME/.prjct-cli/projects/$PROJECT_ID/storage/state.json"
|
|
27
|
+
if [ -f "$STATE" ]; then
|
|
28
|
+
TASK=$(jq -r '.currentTask.description // ""' "$STATE" 2>/dev/null)
|
|
29
|
+
if [ -n "$TASK" ]; then
|
|
30
|
+
echo "$TASK"
|
|
31
|
+
exit 0
|
|
32
|
+
fi
|
|
33
|
+
fi
|
|
34
|
+
fi
|
|
35
|
+
fi
|
|
36
|
+
echo "prjct"
|
|
37
|
+
`;await c.writeFile(n,$,{mode:493})}await ue(i,n),await me(e,i)}catch(t){A(t)||w.warn(`Status line warning: ${T(t)}`)}}u(pe,"installStatusLine");async function L(t,e){if(!await l(t))return;let i=await c.readdir(t);for(let o of i)if(o.endsWith(".sh")){let n=d.join(t,o),f=d.join(e,o);await c.copyFile(n,f),await c.chmod(f,493)}}u(L,"installStatusLineModules");async function ue(t,e){try{if(await l(t)){if((await c.lstat(t)).isSymbolicLink()&&await c.readlink(t)===e)return;await c.unlink(t)}await c.symlink(e,t)}catch{try{await l(e)&&(await c.copyFile(e,t),await c.chmod(t,493))}catch(o){A(o)||w.warn(`Symlink fallback warning: ${o.message}`)}}}u(ue,"ensureStatusLineSymlink");async function Ae(t){let e=t.name==="claude"?"@anthropic-ai/claude-code":"@google/gemini-cli";if(!de.isAvailable("npm"))return console.log(`${s.yellow("\u26A0\uFE0F npm is not available")}`),console.log(""),console.log(`${s.dim(`Install ${t.displayName} using one of:`)}`),console.log(s.dim(" \u2022 Install Node.js: https://nodejs.org")),console.log(s.dim(` \u2022 Use Homebrew: brew install ${t.name==="claude"?"claude":"gemini"}`)),console.log(s.dim(` \u2022 Use npx directly: npx ${e}`)),console.log(""),!1;try{return console.log(s.yellow(`\u{1F4E6} ${t.displayName} not found. Installing...`)),console.log(""),Ce("npm",["install","-g",e],{stdio:"inherit",timeout:ie("NPM_INSTALL")}),console.log(""),console.log(`${s.green("\u2713")} ${t.displayName} installed successfully`),console.log(""),!0}catch(i){let o=i;return o.killed&&o.signal==="SIGTERM"?(console.log(s.yellow(`\u26A0\uFE0F Installation timed out for ${t.displayName}`)),console.log(""),console.log(s.dim("The npm install took too long. Try:")),console.log(s.dim(" \u2022 Set PRJCT_TIMEOUT_NPM_INSTALL=300000 for 5 minutes")),console.log(s.dim(` \u2022 Run manually: npm install -g ${e}`))):console.log(s.yellow(`\u26A0\uFE0F Failed to install ${t.displayName}: ${o.message}`)),console.log(""),console.log(s.dim("Alternative installation methods:")),console.log(s.dim(` \u2022 npm: npm install -g ${e}`)),console.log(s.dim(` \u2022 yarn: yarn global add ${e}`)),console.log(s.dim(` \u2022 pnpm: pnpm add -g ${e}`)),console.log(s.dim(` \u2022 brew: brew install ${t.name==="claude"?"claude":"gemini"}`)),console.log(""),!1}}u(Ae,"installAICLI");async function ke(){let t=await Z(),e=await Y(),i={provider:e.provider,providers:[],cliInstalled:!1,commandsAdded:0,commandsUpdated:0,configAction:null},o=["claude","gemini"];for(let r of o){let p=M[r],I=t[r],g={provider:r,cliInstalled:!1,commandsAdded:0,commandsUpdated:0,configAction:null};if(!I.installed)if(r===e.provider)if(await Ae(p))g.cliInstalled=!0,i.cliInstalled=!0;else throw new Error(`${p.displayName} installation failed`);else continue;if(r==="claude"){if(await k.detectActiveProvider()){let a=await k.syncCommands();a.success&&(g.commandsAdded=a.added,g.commandsUpdated=a.updated,i.commandsAdded+=a.added,i.commandsUpdated+=a.updated);let m=await k.installGlobalConfig();m.success&&(g.configAction=m.action,i.configAction||(i.configAction=m.action)),await pe(),await B.ensureReady()}}else if(r==="gemini"){await Ee()&&(g.commandsAdded=1,i.commandsAdded+=1);let a=await Re();a.success&&(g.configAction=a.action)}i.providers.push(g)}if((await Q()).installed&&(await be()).success&&console.log(` ${s.green("\u2713")} Antigravity skill installed`),(await X()).installed){if(!(await se()).success)throw new Error("Codex skill installation failed");let p=await ae({autoRepair:!0});if(!p.verified)throw new Error(p.message||"Codex p. router verification failed");console.log(` ${s.green("\u2713")} Codex skill installed`),console.log(` ${s.green("\u2713")} Codex p. router ready`)}try{let{detectAgentRuntimes:r}=await import("./agent-runtime-registry-3RMVBEV2.mjs"),p=await r(process.cwd());if(p.some(a=>a.runtime.id==="grok"&&a.detected)){let{installGrokPlugin:a}=await import("./grok-plugin-SSANHBS7.mjs"),m=await oe(),j=await ce(),C=await a();(j.success||C.success)&&console.log(` ${s.green("\u2713")} Grok skill/plugin ${j.action??"ready"}${m.changed?" + MCP":""}${C.changed?" + plugin":""}`)}if(p.some(a=>a.runtime.id==="opencode"&&a.detected)){let{ensureOpenCodeMcpServer:a}=await import("./opencode-mcp-L7NC77JF.mjs"),m=await a();console.log(` ${s.green("\u2713")} OpenCode MCP ${m.changed?"installed":"ready"} \u2192 ${m.path}`)}if(p.some(a=>a.runtime.id==="pi"&&a.detected)){let{installPiSkill:a}=await import("./pi-skill-IZQEUILZ.mjs"),m=await a();m.success&&console.log(` ${s.green("\u2713")} Pi skill ${m.action??"ready"}${m.path?` \u2192 ${m.path}`:""}`)}}catch{}await re.saveConfig(h,await k.getInstallPath(),e.provider),await De();for(let r of i.providers)Pe(r,M[r.provider]);return i}u(ke,"run");async function Ee(){try{let t=y.join(F.homedir(),".gemini","commands"),e=y.join(t,"p.toml");try{return await v.unlink(e),!0}catch(i){if(i.code==="ENOENT")return!1;throw i}}catch(t){return w.warn(`Gemini router cleanup warning: ${T(t)}`),!1}}u(Ee,"installGeminiRouter");async function Re(){try{let t=y.join(F.homedir(),".gemini"),e=y.join(t,"GEMINI.md");await v.mkdir(t,{recursive:!0});let i=O("global/GEMINI.md");if(!i)return w.warn("Gemini global config template not found"),{success:!1,action:null};let o=await J(e),r=G(o.exists?o.content:"",i,"<!-- prjct:start - DO NOT REMOVE THIS MARKER -->","<!-- prjct:end - DO NOT REMOVE THIS MARKER -->");return await v.writeFile(e,r.content,"utf-8"),{success:!0,action:r.action}}catch(t){return w.warn(`Gemini config warning: ${T(t)}`),{success:!1,action:null}}}u(Re,"installGeminiGlobalConfig");async function be(){try{let t=y.join(F.homedir(),".gemini","antigravity","skills"),e=y.join(t,"prjct"),i=y.join(e,"SKILL.md");await v.mkdir(e,{recursive:!0});let o=await l(i),n=O("antigravity/SKILL.md");return n?(await v.writeFile(i,n,"utf-8"),{success:!0,action:o?"updated":"created"}):(w.warn("Antigravity SKILL.md template not found"),{success:!1,action:null})}catch(t){return w.warn(`Antigravity skill warning: ${T(t)}`),{success:!1,action:null}}}u(be,"installAntigravitySkill");var xe=".cli-version",ge=`${h}
|
|
38
|
+
schema=${te}`;async function De(){try{let t=x.globalProjectsDir;if(!await l(t))return;let e=(await v.readdir(t,{withFileTypes:!0})).filter(o=>o.isDirectory()).map(o=>o.name),i=[];for(let o of e)try{let n=y.join(t,o,xe);if((await v.readFile(n,"utf-8").catch(()=>"")).trim()===ge)continue;let r=N.getDoc(o,"project");r&&r.cliVersion!==h&&(r.cliVersion=h,N.setDoc(o,"project",r),i.push(o)),await v.writeFile(n,ge,"utf-8").catch(()=>{})}catch{}i.length>0&&console.log(` ${s.green("\u2713")} Updated ${i.length} project(s) to v${h}`)}catch(t){A(t)||w.warn(`Migration warning: ${T(t)}`)}}u(De,"migrateProjectsCliVersion");function Pe(t,e){if(console.log(""),t.cliInstalled?console.log(` ${s.green("\u2713")} ${e.displayName} CLI installed`):console.log(` ${s.green("\u2713")} ${e.displayName} CLI found`),t.commandsAdded+t.commandsUpdated>0){let o=[];t.commandsAdded>0&&o.push(`${t.commandsAdded} new`),t.commandsUpdated>0&&o.push(`${t.commandsUpdated} updated`),console.log(` ${s.green("\u2713")} Commands synced (${o.join(", ")})`)}else console.log(` ${s.green("\u2713")} Commands up to date`);t.configAction==="created"?console.log(` ${s.green("\u2713")} Global config created (${e.contextFile})`):t.configAction==="updated"?console.log(` ${s.green("\u2713")} Global config updated (${e.contextFile})`):t.configAction==="appended"&&console.log(` ${s.green("\u2713")} Global config merged (${e.contextFile})`),console.log("")}u(Pe,"showResults");var Le=process.argv[1]?.includes("setup.ts")||process.argv[1]?.includes("setup.js");Le&&ke().catch(t=>{console.error("Setup error:",t.message),process.exit(1)});export{ke as run};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{f as ie}from"./chunk-STFUT7R7.mjs";import"./chunk-Y7XOKG4O.mjs";import"./chunk-JCWA7NLM.mjs";import{a as le,b as ue}from"./chunk-TDTPDVUM.mjs";import"./chunk-CFD6CW7T.mjs";import"./chunk-ANBDOI53.mjs";import{a as fe,b as ge}from"./chunk-ID5KE74L.mjs";import"./chunk-JT4RNQ67.mjs";import{a as B}from"./chunk-VCSESVZ4.mjs";import{b as me}from"./chunk-J6Y7IVFQ.mjs";import{a as U,i as Y,j as de}from"./chunk-UAYTDSYG.mjs";import"./chunk-NNILF7R3.mjs";import{a as y}from"./chunk-NZKUCQZK.mjs";import"./chunk-H2KNJUPN.mjs";import{a as Q,d as $,e as A,g as ae,i as ce}from"./chunk-6POAOY5C.mjs";import{a as he}from"./chunk-5DZ2LTII.mjs";import{f as re}from"./chunk-FOWTB762.mjs";import{a as K}from"./chunk-6FUCOGOW.mjs";import"./chunk-6U3CYLY5.mjs";import"./chunk-Q3LUL6LL.mjs";import"./chunk-C7YBUD4K.mjs";import"./chunk-IOFCSTGM.mjs";import"./chunk-S6FBPXQL.mjs";import"./chunk-NOHSLOLL.mjs";import"./chunk-RCIWCKL7.mjs";import"./chunk-E73HSXCX.mjs";import"./chunk-76YMLNLF.mjs";import{a as pe}from"./chunk-O5N6XYPU.mjs";import"./chunk-SROBBOJB.mjs";import"./chunk-CB3CNJTL.mjs";import"./chunk-LZILSE5H.mjs";import"./chunk-6OYLZ4NM.mjs";import"./chunk-SO3ZPNWT.mjs";import"./chunk-HYMJVHAX.mjs";import"./chunk-4T7NGLNQ.mjs";import"./chunk-P2KU4FFA.mjs";import"./chunk-V7R3L54M.mjs";import"./chunk-MG3YN3AI.mjs";import"./chunk-YEALP3WX.mjs";import"./chunk-QZ7T2EYR.mjs";import"./chunk-QWRPJARA.mjs";import"./chunk-ACIOJQSI.mjs";import"./chunk-YOGI4WE6.mjs";import{a as x}from"./chunk-UYMZ3NAF.mjs";import"./chunk-LTKUTRRL.mjs";import"./chunk-HA7Y76GF.mjs";import"./chunk-AJXELVNH.mjs";import"./chunk-CWLGRKA7.mjs";import"./chunk-2NI4EEK2.mjs";import"./chunk-2VRS5CUH.mjs";import"./chunk-5YLI5V3Q.mjs";import"./chunk-BUD3R6LF.mjs";import"./chunk-ZQ2XH76U.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-KUQLXY2P.mjs";import"./chunk-HCPQZRR3.mjs";import"./chunk-EHVU2SMR.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import{h as V}from"./chunk-ID2C2S33.mjs";import"./chunk-RACISWUV.mjs";import"./chunk-DIEPWXJJ.mjs";import"./chunk-NINFE7GS.mjs";import"./chunk-UNNY2IWZ.mjs";import{b as W}from"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-JPMUJY42.mjs";import"./chunk-DZVOFEM5.mjs";import"./chunk-5EF5EOCL.mjs";import"./chunk-DTMZBK4E.mjs";import{f as R,i as Ae}from"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-2FRLIQKX.mjs";import"./chunk-PIA26GWG.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-IJNKHQIS.mjs";import{e as I,l as Me}from"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-TIBYHZFA.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import{i as M,p as De}from"./chunk-D62TAZG6.mjs";import"./chunk-OE27RFLJ.mjs";import"./chunk-FATYLG3L.mjs";import"./chunk-2EEMQV7N.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-5ZBACKED.mjs";import"./chunk-DW4QMD6J.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import{e as z,g as Te}from"./chunk-225DWS4D.mjs";import{a as g}from"./chunk-3TRXQAU4.mjs";import{existsSync as ve}from"node:fs";import Se from"node:path";Ae();Te();Me();De();var L="ship:in_progress",we=class extends he{static{g(this,"ShippingCommands")}async ship(i,e=process.cwd(),n={}){try{let l=await me(e);if(!l.ok)return l.result;let o=l.value;try{if((await W.readConfig(e))?.delivery?.killSwitch==="on")return{success:!1,error:"Delivery kill-switch ON \u2014 mutation path removed. Lift only by setting `delivery.killSwitch` to `off` in `.prjct/prjct.config.json` (not via --no-judgment-gate / --no-spec-gate)."}}catch{}try{let t=R.getDoc(o,L);t?.version&&(await B.getByVersion(o,t.version)||(await B.addShipped(o,{name:t.feature,version:t.version}),console.log(`\u2139\uFE0F Reconciled an interrupted ship: ${t.feature} (v${t.version})`)),R.deleteDoc(o,L))}catch{}let a=await Y(o,e),d=a?.linkedSpecId,b=ye(i)??ye(a?.description??null),m=await W.readConfig(e).catch(()=>null);if(!n.noSpecGate&&!d)try{let{effectiveSddMode:t}=await import("./sdd-3WNZJ6FU.mjs");if(t(m)==="strict")return{success:!1,error:"Strict SDD: this work has no linked intent/spec. Start it via `prjct intent` \u2192 `audit-spec` \u2192 `prjct work --spec <id>`, or override with `prjct ship --no-spec-gate`."}}catch{}try{let{checkPackageLegitimacy:t}=await import("./package-legitimacy-VHHGI4P7.mjs"),c=await t(e);if(c.risky&&c.message){if((m?.sdd?.mode==="strict"||m?.tdd?.mode==="strict"||m?.deliveryGeometry?.mode==="strict")&&!n.allowNewDeps)return{success:!1,error:`${c.message}
|
|
8
|
+
Override only with explicit consent: verify packages, then \`prjct ship --allow-new-deps\`.`};console.log(`\u26A0\uFE0F ${c.message}`)}}catch{}try{let{contextPressureBlocksExpansion:t,contextPressureVerdict:c}=await import("./context-pressure-5URQVNBC.mjs"),r=c(m,{turnCount:a?.turnCount,tokensIn:a?.tokensIn,tokensOut:a?.tokensOut,description:a?.description});if(t(r,m)&&!n.forcePressure)return{success:!1,error:r.cue??"Context density hard-block is enabled (contextPressure.hardBlockShip). Soften injection or pass --force-pressure with consent."};(r.level==="warn"||r.level==="critical")&&r.cue&&console.log(r.cue)}catch{}let u=m?.deliveryGeometry?.mode??"off";try{let{computeCommittedChangeset:t,shipGeometryVerdict:c}=await import("./delivery-geometry-GSJ6LXUC.mjs"),r=await t(e),p=c({changeset:r,mode:u,explicitGeometry:n.geometry??null,locThreshold:m?.deliveryGeometry?.locThreshold});if(p.blocked)return{success:!1,error:p.message??"Delivery geometry gate blocked ship."};p.message&&console.log(p.message)}catch(t){if(u==="strict"&&t instanceof M)return{success:!1,error:`Delivery geometry gate unevaluable: ${t.message}. Re-run when git is healthy, or ship with explicit \`--geometry\`.`}}try{let{hasSymbolIndex:t}=await import("./symbol-graph-PCS43SHZ.mjs");if(t(o)){let{detectChanges:c,shipStructuralRiskCue:r}=await import("./detect-changes-2YIEX7AY.mjs"),p=await c(e,o,{source:"auto"}),h=r(p);if(h&&console.log(h),(m?.deliveryGeometry?.mode??"off")==="strict"&&p.summary.critical>0&&!n.geometry&&!n.allowNewDeps)return{success:!1,error:`Strict delivery geometry + structural CRITICAL risk (${p.summary.critical} file(s), blast ${p.affectedFiles.length}). Review \`prjct code impact --md\`, then re-ship with explicit \`--geometry single|split|direct\`.`}}}catch(t){t instanceof M&&console.log(`\u26A0\uFE0F Structural risk cue unavailable: ${t.message}`)}let J=(m?.persona?.packs??[]).includes("code-strict");try{let{intensityFromChangeset:t,judgmentShipVerdict:c}=await import("./precision-judgment-MCX4MIIG.mjs"),{shipRequiresQuality:r}=await import("./judgment-orchestrator-E3SO3NVE.mjs"),{computeCommittedChangeset:p}=await import("./delivery-geometry-GSJ6LXUC.mjs"),{judgmentLedgerStorage:h}=await import("./judgment-ledger-storage-ZTYXPMM4.mjs"),f=await p(e),$e={harnessLevel:a?.harness?.level,harnessKind:a?.harness?.kind},Oe=t({files:f?.files??0,loc:f?.loc??0},$e).intensity,oe=J?"full":Oe,se=J||r(oe),O=h.get(o),D=c({codeStrict:se,intensity:oe,ledger:O,override:!!n.noJudgmentGate});if(D.blocked)return{success:!1,error:D.message};if(D.message&&console.log(D.message),se&&!n.noJudgmentGate&&D.reason==="approved")try{let{contentBoundDriftVerdict:C,currentTreeHashForStamp:P}=await import("./content-bound-stamp-2PJNI4JC.mjs"),T=O?.contentBound,N=T?.treeHash?await P(e,T):null,H=C({stamp:T??null,currentTreeHash:N,hard:!0,override:!1});if(H.blocked)return{success:!1,error:H.message};H.message&&console.log(H.message)}catch(C){if(C instanceof M)return{success:!1,error:`Content-bound stamp unevaluable: ${C.message}. Re-run when git is healthy, or override with \`--no-judgment-gate\`.`}}else if(O?.contentBound?.treeHash&&!n.noJudgmentGate)try{let{contentBoundDriftVerdict:C,currentTreeHashForStamp:P}=await import("./content-bound-stamp-2PJNI4JC.mjs"),T=await P(e,O.contentBound),N=C({stamp:O.contentBound,currentTreeHash:T,hard:!1,override:!1});N.message&&console.log(N.message)}catch{}}catch(t){if(J&&t instanceof M)return{success:!1,error:`Judgment ship gate unevaluable: ${t.message}. Re-run when git is healthy, or override with \`--no-judgment-gate\`.`}}if(a&&await de(o,e),d&&!n.noSpecGate)try{let{specService:t}=await import("./spec-service-UZ53XL6X.mjs"),c=await t.get(e,d);if(c&&c.content.acceptance_criteria.length>0){let r=[];r.push(""),r.push(`## Spec acceptance gate \u2014 \`${c.title}\` (${c.id.slice(0,8)})`),r.push(""),r.push("Walk each criterion. STOP if any is unmet."),r.push("");for(let p of c.content.acceptance_criteria)r.push(`- [ ] ${p}`);r.push(""),r.push("Override (only with explicit user consent): `prjct ship --no-spec-gate`."),r.push(""),console.log(r.join(`
|
|
9
|
+
`))}}catch{}if(!n.noTestGate)try{let{effectiveTddMode:t}=await import("./tdd-P2PP4RR4.mjs"),c=await W.readConfig(e).catch(()=>null),r=t(c);if(r!=="off"){let h=(await K(e).catch(()=>null))?.test?.command,f=[""];r==="strict"?(f.push("## TDD gate (strict) \u2014 tests must be green before ship"),f.push(""),f.push(h?`Run \`prjct tdd check\` (\`${h}\`). STOP and fix if RED.`:"No test command detected \u2014 add tests (strict TDD expects them)."),f.push("Override (only with explicit user consent): `prjct ship --no-test-gate`.")):(f.push("## TDD reminder (assist)"),f.push(""),f.push(h?`Did the change ship with tests? Verify green: \`prjct tdd check\` (\`${h}\`).`:"Consider adding a test for this change.")),f.push(""),console.log(f.join(`
|
|
10
|
+
`))}}catch{}let Ce=y.getRulesForCommand(o,"ship"),X=n.intent==="seed-code-workflow"?await ke(o,e):null;if(X===!1)return{success:!1,error:"seed-code-workflow requested but this project does not look like code (no package.json / Cargo.toml / pyproject.toml / VERSION). Add rules manually with `prjct workflow add`."};let Z=X===!0?y.getRulesForCommand(o,"ship"):Ce,ee=!Z.some(t=>t.type==="step"&&t.position==="before")&&n.intent!=="register-only"?await ke(o,e):!1;ee&&console.log("\u2139\uFE0F Auto-seeded code ship workflow (one-time migration)");let te=ee?y.getRulesForCommand(o,"ship"):Z,_=n.intent==="pr-convention-auto"?"auto":n.intent==="pr-convention-manual"?"manual":null;_&&Ee(o,_,te);let Re=_?y.getRulesForCommand(o,"ship"):te,q=await Ne(o,e,Re,n);if(q)return He(q,n.md===!0),{success:!1,clarification:q};let w=b??await Fe(e);if(!w)return{success:!1,error:'Ship needs a release description. Pass one explicitly, e.g. `prjct ship "add universal agent compatibility"`, or ship from a named feature branch.'};let F={feature:w},v=await U(o,"ship","before",{projectPath:e,skipRules:n.skipHooks,runContext:F});if(!v.success)return{success:!1,error:`Ship blocked: ${v.gatesFailed.length>0?v.gatesFailed.join(", "):"unknown step"}`};let S=typeof F.version=="string"?F.version:"unversioned";try{R.setDoc(o,L,{feature:w,version:S,startedAt:I()})}catch{}await B.addShipped(o,{name:w,version:S});try{R.deleteDoc(o,L)}catch{}if(a)try{R.run(o,"UPDATE tasks SET shipped_at = ? WHERE id = ?",I(),a.id)}catch{}await this.logToMemory(e,"feature_shipped",{feature:w,version:S,timestamp:I()});let G=await U(o,"ship","after",{projectPath:e,skipRules:n.skipHooks,runContext:F}),ne=[...v.instructions,...G.instructions];try{await ie.sync(e)}catch(t){console.warn("\u26A0\uFE0F Failed to sync AI context after shipping:",z(t))}let xe=v.stepsRun.length+G.stepsRun.length;if(a?.id)try{let{usefulnessService:t}=await import("./usefulness-A3GRKFL3.mjs");t.creditShippedTask(o,a.id)}catch{}let E=await(async()=>{try{let{synthesizeJudgmentReceipt:t}=await import("./judgment-receipt-GO6QEZQC.mjs"),c=await t({projectId:o,projectPath:e,cycleDescription:a?.description??w,cycleId:a?.id??null});return c.wrote?c.summary??"Judgment receipt written":null}catch{return null}})();if(n.md){let t=ue("ship",!0),c=Q(ce(`Shipped: ${w}`,`Version: ${S}`),$("Results",A([`Version: ${S}`,`Workflow steps run: ${xe>0?[...v.stepsRun,...G.stepsRun].join(", "):"none"}`,`Hooks failed (non-blocking): ${v.hooksFailed.length+G.hooksFailed.length}`,E?`Compound judgment: ${E}`:null].filter(r=>r!==null))),ne.length>0?$("Agent Instructions",A(ne)):null,ae([...t.map(r=>({label:r.desc,command:r.cmd})),{label:"Capture non-obvious learning (compounds next session)",command:'prjct remember learning "\u2026"'}]));console.log(c)}else V.done(`v${S} shipped`),E&&V.info(`Compound: ${E}`),le("ship");return(async()=>{try{let{flushIfLinked:t}=await import("./auto-flush-XA3V7BJ6.mjs");await t(e)}catch{}})(),{success:!0,feature:w,version:S}}catch(l){return V.fail(z(l)),re(l)}}};function ye(s){let i=s?.trim();return i||null}g(ye,"normalizeShipFeature");async function Fe(s){let i=await pe(s);if(!i)return null;let e=i.replace(/^refs\/heads\//,"").trim();if(!e||/^(main|master|develop|development|dev|trunk)$/i.test(e))return null;let n=e.split("/").filter(Boolean).at(-1)??e;if(!n||/^\d+(?:\.\d+)*$/.test(n))return null;let l=n.replace(/^[a-z]+-\d+[-_]/i,"").replace(/[_-]+/g," ").replace(/[^\p{L}\p{N} ]+/gu," ").replace(/\s+/g," ").trim();return l.length>=3?l:null}g(Fe,"inferShipFeatureFromBranch");function be(s){return["package.json","Cargo.toml","pyproject.toml","go.mod","Gemfile","pom.xml","build.gradle","VERSION"].some(e=>ve(Se.join(s,e)))}g(be,"isCodeProject");function j(s){return ve(Se.join(s,".git"))}g(j,"isGitRepo");async function ke(s,i){if(!be(i))return!1;let e=new Date().toISOString(),n=y.getRulesForCommand(s,"ship"),l=new Set(n.map(u=>u.action)),o=n.reduce((u,k)=>Math.max(u,k.sortOrder??0),0),a=[];j(i)&&a.push({action:'git branch --show-current | grep -vE "^(main|master)$"',description:"Prevent shipping from main branch",timeoutMs:5e3});let d=await K(i).catch(()=>null);d?.test?.command&&a.push({action:`verify:${d.test.command}`,description:"Verify before shipping (Stop-Slop)",timeoutMs:3e5});let b=[{action:"version:bump",description:"Bump version (stack-aware)",timeoutMs:1e4},{action:"changelog:add",description:"Append CHANGELOG entry",timeoutMs:1e4}];j(i)&&(b.push({action:"git:commit",description:"Commit ship",timeoutMs:15e3}),b.push({action:"git:push",description:"Push to origin",timeoutMs:3e4}),await Ge(s,i)==="auto"&&b.push({action:"pr:ensure",description:"Open or confirm the PR",timeoutMs:3e4}));let m=[...a.map(u=>({...u,type:"gate"})),...b.map(u=>({...u,type:"step"}))].filter(u=>!l.has(u.action));for(let[u,k]of m.entries())y.addRule(s,{type:k.type,command:"ship",position:"before",action:k.action,description:k.description,enabled:!0,timeoutMs:k.timeoutMs,sortOrder:o+u+1,createdAt:e});return m.length>0}g(ke,"seedCodeShipRules");async function Ge(s,i){let e=x.getWorkflow(s,"ship"),n=e?.metadata?.prConvention;if(n==="auto"||n==="manual")return n;let l=await fe(i),o=ge(l);return x.updateWorkflow(s,"ship",{metadata:{...e?.metadata??{},prConvention:o}}),o}g(Ge,"resolvePrConvention");function Ee(s,i,e){let n=x.getWorkflow(s,"ship");if(x.updateWorkflow(s,"ship",{metadata:{...n?.metadata??{},prConvention:i}}),i==="auto"&&!e.some(l=>l.action==="pr:ensure")){let l=e.reduce((o,a)=>Math.max(o,a.sortOrder??0),0);y.addRule(s,{type:"step",command:"ship",position:"before",action:"pr:ensure",description:"Open or confirm the PR",enabled:!0,timeoutMs:3e4,sortOrder:l+1,createdAt:new Date().toISOString()})}}g(Ee,"applyPrConventionDecision");async function Ne(s,i,e,n){if(n.intent==="proceed"||n.intent==="register-only")return null;if(!e.some(d=>d.type==="step"&&d.position==="before"))return{question:"No `ship` workflow steps are configured for this project. What should ship do?",options:["register-only","seed-code-workflow","abort"],state:{rulesCount:e.length,looksLikeCode:be(i)}};if(await Y(s,i))return null;let a=await Ie(i);return a?{question:`No active work cycle, and PR #${a.number} ("${a.title}") is OPEN for this branch. Continue ship anyway?`,options:["proceed","abort"],state:{openPr:a.number,branch:a.branch}}:j(i)&&e.some(d=>d.action==="git:push")&&!e.some(d=>d.action==="pr:ensure")&&!x.getWorkflow(s,"ship")?.metadata?.prConvention?{question:"This project ships without opening/updating a PR. Want ship to handle that automatically (`gh pr create`), or do you manage PRs yourself?",options:["pr-convention-auto","pr-convention-manual"]}:null}g(Ne,"buildClarification");function He(s,i){if(i){let e=Q($("Clarification needed",s.question),$("Options",A(s.options.map(n=>`\`prjct ship --intent=${n}\``))),s.state?$("State",A(Object.entries(s.state).map(([n,l])=>`${n}: ${JSON.stringify(l)}`))):null);console.log(e);return}console.log(`
|
|
11
|
+
\u26A0\uFE0F ${s.question}`),console.log(`
|
|
12
|
+
Options:`);for(let e of s.options)console.log(` prjct ship --intent=${e}`)}g(He,"renderClarification");async function Ie(s){if(!j(s))return null;try{let{execFileAsync:i}=await import("./exec-34V6SJYO.mjs"),{stdout:e}=await i("git",["branch","--show-current"],{cwd:s,timeout:3e3}),n=e.toString().trim();if(!n)return null;let{stdout:l}=await i("gh",["pr","list","--head",n,"--state","open","--json","number,title","--limit","1"],{cwd:s,timeout:5e3}),o=JSON.parse(l.toString());return o.length===0?null:{number:o[0].number,title:o[0].title,branch:n}}catch{return null}}g(Ie,"findOpenPrForBranch");export{we as ShippingCommands,ke as seedCodeShipRules};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a,b,c}from"./chunk-2VRS5CUH.mjs";import"./chunk-5YLI5V3Q.mjs";import"./chunk-BUD3R6LF.mjs";import"./chunk-ZQ2XH76U.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-DIEPWXJJ.mjs";import"./chunk-UNNY2IWZ.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-TIBYHZFA.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import"./chunk-3TRXQAU4.mjs";export{a as MACHINE_SOURCES,c as buildSignalsFile,b as isSignalEntry};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as M}from"./chunk-5DZ2LTII.mjs";import{e as k}from"./chunk-FOWTB762.mjs";import"./chunk-6U3CYLY5.mjs";import{b as $}from"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import{h as w}from"./chunk-ID2C2S33.mjs";import{b as y}from"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DZVOFEM5.mjs";import"./chunk-5EF5EOCL.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import{k as v,l as I}from"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import{e as b,g as x}from"./chunk-225DWS4D.mjs";import{a as c}from"./chunk-3TRXQAU4.mjs";x();I();var j=class extends M{static{c(this,"SkillAdherenceCommands")}async skillAdherence(r=null,i=process.cwd(),a={}){try{let l=await this.ensureProjectInit(i);if(!l.success)return l;let t=R(r);if(!t)return w.fail(`Invalid window "${r}". Use: 7d, 24h, 14d, 30d (units: h or d).`),{success:!1,error:"Invalid window"};let e=await y.readConfig(i);if(!e?.projectId)return w.fail("No prjct project here \u2014 run `prjct start` first."),{success:!1,error:"No project"};let o=Date.now()-t.hours*60*60*1e3,d=$.recall(e.projectId,{types:["improvement-signal"],tags:{source:"skill-miss-detector"},limit:300,dedupeByKey:!1}).filter(s=>Date.parse(s.rememberedAt)>=o),u=$.recall(e.projectId,{types:["decision"],tags:{resolves:"skill-miss"},limit:300,dedupeByKey:!1}).filter(s=>Date.parse(s.rememberedAt)>=o),g=new Set(u.map(s=>s.tags.relates).filter(s=>!!s)),p=d.map(s=>({memId:s.tags.relates??"\u2014",excerpt:S(s.content),file:s.tags.file??"",rememberedAt:s.rememberedAt,resolved:s.tags.relates?g.has(s.tags.relates):!1})),m=p.length,f=p.filter(s=>s.resolved).length,h=m===0?1:f/m;return a.md?console.log(B(t.label,p,m,f,h,u.length)):console.log(A(t.label,p,m,f,h)),{success:!0,window:t.label,misses:m,resolved:f,adherence:Number(h.toFixed(2))}}catch(l){return k(b(l))}}};function R(n){let r=v(n);return r?r.unit==="h"?{label:`${r.n}h`,hours:r.n}:{label:`${r.n}d`,hours:r.n*24}:null}c(R,"parseWindow");function S(n){return(n.split(`
|
|
8
|
+
`)[0]??"").replace(/^\[skill-miss\]\s*/,"").trim()}c(S,"firstLine");function A(n,r,i,a,l){if(i===0)return`Skill adherence \u2014 last ${n}: no skill-misses captured. Clean.`;let t=[];t.push(`Skill adherence \u2014 last ${n} \xB7 ${i} miss${i===1?"":"es"} \xB7 ${a} resolved \xB7 ${(l*100).toFixed(0)}% addressed`),t.push("");for(let e of r.slice(0,20)){let o=e.resolved?"\u2713":"\xB7",d=e.file?` (${e.file})`:"";t.push(` ${o} ${e.memId}${d} ${e.excerpt.slice(0,100)}`)}return t.join(`
|
|
9
|
+
`)}c(A,"formatText");function B(n,r,i,a,l,t){if(i===0)return`## Skill adherence \u2014 last ${n}
|
|
10
|
+
|
|
11
|
+
_No skill-misses captured in the window._
|
|
12
|
+
`;let e=[];e.push(`## Skill adherence \u2014 last ${n}`),e.push(""),e.push(`- **Skill-misses**: ${i}`),e.push(`- **Resolved**: ${a} (${(l*100).toFixed(0)}% addressed)`),e.push(`- **Resolution decisions logged**: ${t}`),e.push(""),e.push("| State | Memory | File | Signal |"),e.push("|---|---|---|---|");for(let o of r.slice(0,30)){let d=o.resolved?"\u2713 resolved":"\xB7 open",u=o.file||"\u2014",g=o.excerpt.slice(0,110).replace(/\|/g,"\\|");e.push(`| ${d} | ${o.memId} | ${u} | ${g} |`)}return e.join(`
|
|
13
|
+
`)}c(B,"formatMarkdown");export{j as SkillAdherenceCommands};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a,b,c,d,f as e}from"./chunk-HYMJVHAX.mjs";import"./chunk-4T7NGLNQ.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-FATYLG3L.mjs";import"./chunk-2EEMQV7N.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-225DWS4D.mjs";import"./chunk-3TRXQAU4.mjs";e();export{a as SKILL_DEFINITIONS,c as SkillGenerator,b as skillBodyHasProjectStamp,d as skillGenerator};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{f as m,i as S}from"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as o}from"./chunk-3TRXQAU4.mjs";S();import k from"node:fs/promises";import E from"node:os";import g from"node:path";function I(t){return[{dir:g.join(t,".claude","skills"),scope:"project"},{dir:g.join(t,"skills"),scope:"project"},{dir:g.join(E.homedir(),".claude","skills"),scope:"global"}]}o(I,"skillRoots");function y(t){let s=t.replace(/^\uFEFF/,"").replace(/\r\n/g,`
|
|
8
|
+
`).match(/^---\n([\s\S]*?)\n---/);if(!s)return{};let i={},n=s[1].split(`
|
|
9
|
+
`),p=o(e=>{if(e>=n.length)return;let c=n[e].match(/^(name|description):\s*(.*)$/);if(!c){p(e+1);return}let u=c[1],l=c[2].trim(),d=/^[>|][+-]?$/.test(l)?n.slice(e+1).findIndex(f=>!/^\s+\S/.test(f)):0,a=d===-1?n.length-e-1:d,h=/^[>|][+-]?$/.test(l)?n.slice(e+1,e+1+a).map(f=>f.trim()).join(" "):l;h&&(i[u]=h.replace(/^["']|["']$/g,"")),p(e+1+a)},"parseLine");return p(0),i}o(y,"parseFrontmatter");async function F(t,r){let s=new Map;for(let{dir:n,scope:p}of I(r)){let e=await k.readdir(n).catch(()=>null);if(e)for(let c of e){let u=g.join(n,c,"SKILL.md"),l=await k.readFile(u,"utf-8").catch(()=>null);if(l===null)continue;let d=y(l),a=d.name||c;s.has(a)||s.set(a,{name:a,description:d.description??"",path:u,scope:p})}}let i=[...s.values()];try{m.run(t,"DELETE FROM skill_registry");for(let n of i)m.run(t,"INSERT OR REPLACE INTO skill_registry (name, description, path, scope, indexed_at) VALUES (?, ?, ?, ?, ?)",n.name,n.description,n.path,n.scope,Date.now())}catch{}return i}o(F,"refreshSkillIndex");function L(t){try{return m.query(t,"SELECT name, description, path, scope FROM skill_registry ORDER BY scope ASC, name ASC").map(r=>({...r,scope:r.scope}))}catch{return[]}}o(L,"getSkillIndex");function b(t){let r=L(t);if(r.length===0)return null;let s=["## Skill index \u2014 pass EXACT paths to subagents (they read the original SKILL.md; never summarize a skill for them)",""];for(let i of r)s.push(`- **${i.name}** (${i.scope}) \u2014 ${i.description||"no description"}
|
|
10
|
+
\`${i.path}\``);return s.join(`
|
|
11
|
+
`)}o(b,"renderSkillIndex");export{L as getSkillIndex,F as refreshSkillIndex,b as renderSkillIndex};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as O,b as P}from"./chunk-EFSPBB4S.mjs";import{a as b}from"./chunk-DEYAQEF5.mjs";import{a as R,b as j,c as f}from"./chunk-ZAUJWUUN.mjs";import{c as y,d as v}from"./chunk-V7VA4EQX.mjs";import{a as S}from"./chunk-YJOC2JJK.mjs";import{a as _}from"./chunk-5DZ2LTII.mjs";import{d as a,e as p}from"./chunk-FOWTB762.mjs";import"./chunk-6U3CYLY5.mjs";import"./chunk-MXJKULJY.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import{a as C}from"./chunk-KUQLXY2P.mjs";import"./chunk-HCPQZRR3.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import{h as u}from"./chunk-ID2C2S33.mjs";import{b as k}from"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DZVOFEM5.mjs";import"./chunk-5EF5EOCL.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import{e as m,g as U}from"./chunk-225DWS4D.mjs";import{a as I}from"./chunk-3TRXQAU4.mjs";import M from"node:fs/promises";import A from"node:path";U();var x=class extends _{static{I(this,"SpecCommands")}async draft(s=null,o=process.cwd(),c={}){try{if(!s||!s.trim())return u.info('Usage: prjct spec "<title>" [--goal "..."] [--tags k:v,...]'),{success:!1,error:"Title required"};let t=await this.ensureProjectInit(o);if(!t.success)return t;let e=c.goal?.trim()||s.trim(),r=b(c.tags),n=await f.create(o,{title:s.trim(),content:{goal:e},tags:r,autoContext:!c.skipContext});return c.md?console.log(`\u2713 spec drafted: ${n.title}
|
|
8
|
+
|
|
9
|
+
spec_id: ${n.id}
|
|
10
|
+
status: ${n.status}
|
|
11
|
+
goal: ${n.content.goal}
|
|
12
|
+
|
|
13
|
+
Next: fill acceptance_criteria, scope, out_of_scope, risks, test_plan via \`prjct spec update ${n.id} --json '{...}'\` then run \`prjct spec audit ${n.id}\`.`):(u.done(`spec drafted: ${n.title}`),u.info(` id: ${n.id}`),u.info(` goal: ${n.content.goal}`),u.info(` next: prjct spec audit ${n.id}`)),{success:!0,specId:n.id,title:n.title,status:n.status}}catch(t){return p(m(t))}}async list(s=null,o=process.cwd(),c={}){try{let t=await this.ensureProjectInit(o);if(!t.success)return t;let e=c.status;if(e&&!S.includes(e))return a(`unknown status: ${e} (valid: ${S.join(", ")})`);let r=await f.list(o,{status:e});if(c.md)if(r.length===0)console.log('# Specs\n\n_No specs yet. Start one with `prjct spec "<title>"`._');else{console.log("# Specs");for(let n of r){let i=n.content.acceptance_criteria.length,l=n.content.linked_tasks.length;console.log(`
|
|
14
|
+
## ${n.title}
|
|
15
|
+
- id: \`${n.id}\`
|
|
16
|
+
- status: ${n.status}
|
|
17
|
+
- acceptance criteria: ${i}
|
|
18
|
+
- linked tasks: ${l}
|
|
19
|
+
- created: ${n.createdAt}`)}}else if(r.length===0)u.info('no specs yet \u2014 `prjct spec "<title>"` to start one');else for(let n of r){let i=n.content.acceptance_criteria.length;console.log(` ${n.status.padEnd(12)} ${n.id.slice(0,8)} ${n.title} (${i} AC)`)}return{success:!0,count:r.length}}catch(t){return p(m(t))}}async show(s=null,o=process.cwd(),c={}){try{if(!s)return a("Usage: prjct spec show <id>");let t=await this.ensureProjectInit(o);if(!t.success)return t;let e=await f.get(o,s);if(!e)return a(`spec not found: ${s}`);if(c.md){let r=await k.getProjectId(o).catch(()=>null),n=new Map;if(r)for(let i of await C.getTasks(r))i.featureId===e.id&&i.body!=null&&n.set(i.body,{id:i.id,completed:i.completed});console.log(O(e,n))}else{if(console.log(`# ${e.title}`),console.log(`status: ${e.status}`),console.log(`goal: ${e.content.goal}`),e.content.eli10&&console.log(`eli10: ${e.content.eli10}`),e.content.acceptance_criteria.length>0){console.log(`
|
|
20
|
+
acceptance criteria:`);for(let r of e.content.acceptance_criteria)console.log(` - ${r}`)}if(e.content.scope.length>0){console.log(`
|
|
21
|
+
scope:`);for(let r of e.content.scope)console.log(` - ${r}`)}if(e.content.out_of_scope.length>0){console.log(`
|
|
22
|
+
out of scope:`);for(let r of e.content.out_of_scope)console.log(` - ${r}`)}if(e.content.risks.length>0){console.log(`
|
|
23
|
+
risks:`);for(let r of e.content.risks)console.log(` - ${r.risk} \u2192 ${r.mitigation}`)}if(e.content.test_plan.length>0){console.log(`
|
|
24
|
+
test plan:`);for(let r of e.content.test_plan)console.log(` - ${r}`)}}return{success:!0,spec:e}}catch(t){return p(m(t))}}async update(s=null,o=process.cwd(),c={}){try{if(!s)return a(`Usage: prjct spec update <id> --json '{"goal": "...", ...}'`);let t=typeof c.json=="string"?c.json:"";if(!t)return a("--json is required");let e=await this.ensureProjectInit(o);if(!e.success)return e;let r=(()=>{try{return JSON.parse(t)}catch{return}})();if(r===void 0)return a("--json is not valid JSON");if(r===null||typeof r!="object"||Array.isArray(r))return a("--json must decode to an object");if(!await f.get(o,s))return a(`spec not found: ${s}`);let i=await f.patch(o,s,r);return i?(c.md?console.log(`\u2713 spec updated: ${i.title}`):u.done(`spec updated: ${i.title}`),{success:!0,specId:i.id}):a(`spec not found: ${s}`)}catch(t){return p(m(t))}}async applyDelta(s=null,o=process.cwd(),c={}){try{if(!s)return a("Usage: prjct spec apply-delta <id> (--file <path> | --md '<delta markdown>')");let t=typeof c.md=="string"?c.md.trim():"",e=c.file?.trim()??"";if(!t&&!e)return a("provide --file <path> or --md '<delta markdown>'");if(t&&e)return a("pass either --file or --md, not both");let r=await this.ensureProjectInit(o);if(!r.success)return r;let n=e?await M.readFile(A.resolve(o,e),"utf8"):t,i=await f.applyDelta(o,s,n);if(!i)return a(`spec not found: ${s}`);let l=`\u2713 delta applied: ${i.title} (${i.content.delta_log.length} delta(s) logged)`;return c.md===!0?console.log(l):u.done(l),{success:!0,specId:i.id}}catch(t){return p(m(t))}}async validate(s=null,o=process.cwd(),c={}){try{if(!s)return a("Usage: prjct spec validate <id> [--strict]");let t=await this.ensureProjectInit(o);if(!t.success)return t;let e=await f.get(o,s);if(!e)return a(`spec not found: ${s}`);let r=c.strict===!0,n=y(e,{projectPath:o}),i=n.errors.length>0||r&&n.warnings.length>0;if(c.md){if(console.log(`# spec validate \u2014 ${e.title}`),console.log(""),console.log(`spec id: \`${e.id}\` \xB7 mode: ${r?"strict":"advisory"}`),console.log(""),n.errors.length===0&&n.warnings.length===0)console.log("_No findings \u2014 structure OK._");else{console.log("## Findings");for(let l of v(n))console.log(l)}console.log(""),console.log(i?"**verdict: FAIL**":"**verdict: PASS**")}else{for(let l of n.errors)u.fail(l);for(let l of n.warnings)u.warn(l);n.errors.length===0&&n.warnings.length===0&&u.done("spec structure OK")}return i?{success:!1,error:`spec validation failed: ${n.errors.length} error(s), ${n.warnings.length} warning(s)${r?" (strict: warnings count as failures)":""}`,specId:s}:{success:!0,specId:s,errors:n.errors.length,warnings:n.warnings.length}}catch(t){return p(m(t))}}async setStatus(s=null,o=process.cwd(),c={}){try{if(!s)return a("Usage: prjct spec set-status <id> <status>");let t=c.status;if(!t||!S.includes(t))return a(`status must be one of: ${S.join(", ")}`);let e=await this.ensureProjectInit(o);return e.success?await f.setStatus(o,s,t)?(c.md?console.log(`\u2713 spec ${s} \u2192 ${t}`):u.done(`spec status: ${t}`),{success:!0,specId:s,status:t}):a(`spec not found: ${s}`):e}catch(t){return p(m(t))}}async recordReview(s=null,o=process.cwd(),c={}){try{if(!s)return a('Usage: prjct spec record-review <id> --reviewer <lens> --verdict <pass|fail> --notes "..."');let t=c.reviewer?.trim().toLowerCase(),e=c.verdict;if(!t)return a("--reviewer is required (the lens name, e.g. architecture, security)");if(e!=="pass"&&e!=="fail")return a("--verdict must be `pass` or `fail`");let r=await this.ensureProjectInit(o);if(!r.success)return r;let n=await f.recordReview(o,s,t,{verdict:e,notes:c.notes??""});if(!n)return a(`spec not found: ${s}`);let i=n.content.selected_reviewers;i.length>0&&!i.includes(t)&&u.warn(`lens "${t}" is not in this spec's selected set (${i.join(", ")})`);let l=`${t} \u2192 ${e}${n.status==="reviewed"?" (all selected lenses passed \u2192 status: reviewed)":""}`;return c.md?console.log(`\u2713 ${l}`):u.done(l),{success:!0,specId:s,status:n.status}}catch(t){return p(m(t))}}async linkTask(s=null,o=process.cwd(),c={}){try{if(!s||!c.taskId)return a("Usage: prjct spec link-task <spec-id> --task-id <id>");let t=await this.ensureProjectInit(o);return t.success?await f.linkTask(o,s,c.taskId)?(c.md?console.log(`\u2713 linked task ${c.taskId} to spec ${s}`):u.done("linked task \u2192 spec"),{success:!0,specId:s,taskId:c.taskId}):a(`spec not found: ${s}`):t}catch(t){return p(m(t))}}async ship(s=null,o=process.cwd(),c={}){try{if(!s)return a("Usage: prjct spec ship <id> [--pr <number>]");let t=await this.ensureProjectInit(o);if(!t.success)return t;let e=c.pr!==void 0?Number(c.pr):void 0,r=await f.ship(o,s,e!==void 0&&Number.isFinite(e)?e:void 0);return r?(c.md?console.log(`\u2713 spec shipped: ${r.title}${e?` (PR #${e})`:""}`):u.done(`spec shipped${e?` (PR #${e})`:""}`),{success:!0,specId:s,status:"shipped"}):a(`spec not found: ${s}`)}catch(t){return p(m(t))}}async audit(s=null,o=process.cwd(),c={}){try{if(!s)return a("Usage: prjct spec audit <id> [--lenses a,b,c] [--strict]");let t=await this.ensureProjectInit(o);if(!t.success)return t;let e=await f.get(o,s);if(!e)return a(`spec not found: ${s}`);let r=y(e,{projectPath:o});if(r.errors.length>0||r.warnings.length>0){let{effectiveSddMode:g}=await import("./sdd-3WNZJ6FU.mjs"),w=await k.readConfig(o).catch(()=>null),h=(c.strict===!0||g(w)==="strict")&&r.errors.length>0;console.log(h?`## spec validation \u2014 dispatch BLOCKED (strict)
|
|
25
|
+
`:`## spec validation (advisory)
|
|
26
|
+
`);for(let T of v(r))console.log(T);if(console.log(""),h)return a(`spec validation: ${r.errors.length} error(s) block the audit dispatch in strict mode \u2014 fix the spec (see \`prjct spec validate ${s}\`) or drop strict gating`)}let n=await k.getProjectId(o).catch(()=>null),i=n?P.readDomainsSync(n)?.domains??[]:[],l=typeof c.lenses=="string"&&c.lenses.trim()!==""?c.lenses.split(",").map(g=>g.trim().toLowerCase()).filter(Boolean):R(e.content,i);await f.setSelectedReviewers(o,s,l);let d=await j(e.id,e.title,e.content,l,void 0,i);return console.log(d),{success:!0,specId:s,dispatch:"emitted"}}catch(t){return p(m(t))}}async breakdown(s=null,o=process.cwd(),c={}){try{if(!s)return a("Usage: prjct spec breakdown <id> [--force]");let t=await this.ensureProjectInit(o);if(!t.success)return t;let e=await f.get(o,s);if(!e)return a(`spec not found: ${s}`);let r=new Set(["reviewed","shipped","archived"]);if(!r.has(e.status)&&c.force!==!0)return process.stderr.write(`error: spec status is '${e.status}'; breakdown requires 'reviewed' or later. Re-run with --force if intentional.
|
|
27
|
+
`),process.exitCode=2,{success:!1,error:`spec status '${e.status}' is below the breakdown gate`};let n=c.force===!0&&!r.has(e.status),i=await k.getProjectId(o);if(!i)return p("No prjct project. Run `prjct init` first.");let{breakdownSpecToTasks:l}=await import("./spec-task-breakdown-3Y7YXCIQ.mjs"),d=await l(i,o,e),g=await(async()=>{if(!n)return null;let{projectMemory:$}=await import("./project-memory-L5MDZYST.mjs"),h=await $.remember(o,{type:"spec",content:`prjct spec breakdown --force on '${e.title}' (status was '${e.status}')`,tags:{spec_id:e.id,event:"spec.breakdown.forced",from_status:e.status},source:e.id});return typeof h=="string"?h:null})(),w=[];if(g&&w.push(`forced-breakdown event=${g}`),d.skippedReason==="already_broken_down")w.push(`skipped: already_broken_down (spec ${s})`);else if(d.skippedReason==="no_acceptance_criteria")w.push(`skipped: no_acceptance_criteria (spec ${s})`);else{let $=d.recoveredFromPartial?" (recovered from partial)":"";w.push(`\u2713 breakdown: ${d.taskIds.length} task(s) linked${$}`)}for(let $ of w)console.log($);return{success:!0,specId:s,forced:n,forcedEventMemId:g,taskIds:d.taskIds,recoveredFromPartial:d.recoveredFromPartial===!0,skippedReason:d.skippedReason}}catch(t){return p(m(t))}}async inventory(s=null,o=process.cwd(),c={}){try{let t=await this.ensureProjectInit(o);if(!t.success)return t;let{default:e}=await import("./config-manager-QY73WM5U.mjs"),n=(await e.readConfig(o))?.projectId;if(!n)return a("not a prjct project");let{buildInventory:i,renderInventoryMd:l}=await import("./spec-inventory-2TT7BTFZ.mjs"),d=await i(o,n);if(c.json)console.log(JSON.stringify(d,null,2));else if(c.md)console.log(l(d));else{u.info(`${d.totalSpecs} specs across ${d.modules.length} modules`);for(let g of d.modules){let w=g.coveredPct===null?"n/a":`${g.coveredPct}%`,$=g.drift===!0?" DRIFT":g.drift==="unknown"?" ?":"";console.log(` ${g.module.padEnd(20)} ${String(g.specCount).padStart(3)} specs \xB7 ${w.padStart(6)} covered${$}`)}d.uncoveredModules.length>0&&u.info(`${d.uncoveredModules.length} module(s) without specs`)}return{success:!0,totalSpecs:d.totalSpecs}}catch(t){return p(m(t))}}};export{x as SpecCommands,j as renderAuditDispatch};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as u}from"./chunk-ZBBNCCGV.mjs";import{b as l}from"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as i}from"./chunk-3TRXQAU4.mjs";var m=5,g=8,f=.15;async function $(n,o,s){let[t,e]=await Promise.all([u(n,s,{maxFiles:m*4,minScore:f}).catch(()=>({files:[]})),Promise.resolve(l.recall(o,{topic:n,limit:g})).catch(()=>[])]),r=h(t.files.map(a=>a.path),m);return r.length===0&&e.length===0?{notesBlock:"",paths:[],memoryHits:0,empty:!0}:{notesBlock:y(n,r,e),paths:r,memoryHits:e.length,empty:!1}}i($,"inferSpecContext");function h(n,o){let s=new Set,t=[];for(let e of n){let r=e.split("/").slice(0,2).join("/");if(!s.has(r)&&(s.add(r),t.push(e),t.length>=o))break}return t}i(h,"dedupeTopDirs");function y(n,o,s){let t=[];if(t.push("<!-- auto-context:tentative -->"),t.push("## Existing context (auto-inferred)"),t.push(""),t.push(`_Inferred from title "${n}". Validate before audit \u2014 entries tagged tentative._`),t.push(""),o.length>0){t.push("### Likely paths");for(let e of o)t.push(`- \`${e}\``);t.push("")}if(s.length>0){t.push("### Relevant prior memory");for(let e of s){let r=e.content.length>140?`${e.content.slice(0,137)}\u2026`:e.content,c=Object.entries(e.tags).map(([p,a])=>`${p}:${a}`).join(" ");t.push(`- **${e.type}**${c?` _(${c})_`:""} \u2014 ${r}`)}t.push("")}return t.push("<!-- /auto-context -->"),t.join(`
|
|
8
|
+
`)}i(y,"buildNotesBlock");function b(n,o){let s={level:"warn",code:"no_context_match",message:`No codebase or memory context matched "${n}"`,suggestion:o??"Fill spec.notes manually or run with `--skip-context` next time."};process.stderr.write(`${JSON.stringify(s)}
|
|
9
|
+
`)}i(b,"warnNoContextMatch");export{$ as inferSpecContext,b as warnNoContextMatch};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as b}from"./chunk-V7VA4EQX.mjs";import{g as v}from"./chunk-YJOC2JJK.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import{b as y,p as O}from"./chunk-D62TAZG6.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as u}from"./chunk-3TRXQAU4.mjs";import $ from"node:fs/promises";import h from"node:path";O();var A=5,I=/^(chore|style|format|fmt|docs|typo)(\(|:|!)/i,k=[/(^|\/)types\.ts$/,/(^|\/)types\//,/\/__tests__\//,/\.d\.ts$/,/(^|\/)index\.ts$/,/\.test\.ts$/,/\.spec\.ts$/];async function W(e,t){let n=v.list(t,{includeArchived:!0}),s={};for(let i of n)s[i.status]=(s[i.status]??0)+1;let r=new Map,o=new Set;for(let i of n){let d=R(i);if(!d)continue;o.add(d);let m=r.get(d)??[];m.push(i),r.set(d,m)}let a=await x(e);for(let i of a)o.add(i);let c=[],l=[];for(let i of[...o].sort()){let d=r.get(i)??[],m=await E(e,i),w=await P(e,i,d),_=d.length>0?d.reduce((p,f)=>f.updatedAt>p?f.updatedAt:p,""):null,g=[];for(let p of d.filter(f=>f.status==="shipped")){let f=await T(e,p);g.push(f.drift),l.push({specId:p.id,title:p.title,status:p.status,drift:f.drift,locChanged:f.locChanged,cosmeticOnly:f.cosmeticOnly})}let F=g.includes(!0)?!0:g.includes("unknown")?"unknown":!1;c.push({module:i,specCount:d.length,coveredFiles:w,totalFiles:m,coveredPct:m===0?null:Math.round(w/m*1e4)/100,lastUpdated:_||null,drift:F})}let C=c.filter(i=>i.specCount===0).map(i=>i.module);return{generatedAt:new Date().toISOString(),projectPath:e,totalSpecs:n.length,byStatus:s,modules:c,driftDetail:l,uncoveredModules:C}}u(W,"buildInventory");function R(e){let t=e.content.scope[0];if(!t)return null;let n=b(t);if(!n)return null;let s=n.split("/").filter(Boolean).slice(0,2);return s.length===2?s.join("/"):null}u(R,"inferModule");async function x(e){let t=h.join(e,"core");try{return(await $.readdir(t,{withFileTypes:!0})).filter(s=>s.isDirectory()&&!s.name.startsWith(".")&&!s.name.startsWith("__")).map(s=>`core/${s.name}`)}catch{return[]}}u(x,"listTopLevelModules");async function E(e,t){let n=h.join(e,t),s=[];try{await S(n,async r=>{let o=h.relative(e,r);D(o)||M(o)&&s.push(o)})}catch{}return s.length}u(E,"countModuleFiles");async function P(e,t,n){let s=h.join(e,t),r=new Set;for(let a of n)for(let c of a.content.scope){let l=c.match(/[a-zA-Z0-9_./-]+\.[a-z]+/);l&&r.add(l[0])}let o=new Set;try{await S(s,async a=>{let c=h.relative(e,a);if(!D(c)&&M(c)){for(let l of r)if(c===l||c.startsWith(l.endsWith("/")?l:`${l}/`)){o.add(c);break}}})}catch{}return o.size}u(P,"countCoveredFiles");async function S(e,t){let n=await $.readdir(e,{withFileTypes:!0}).catch(()=>[]);for(let s of n){if(s.name.startsWith(".")||s.name==="node_modules"||s.name==="dist")continue;let r=h.join(e,s.name);s.isDirectory()?await S(r,t):s.isFile()&&await t(r)}}u(S,"walk");function D(e){return k.some(t=>t.test(e))}u(D,"excluded");function M(e){return/\.(ts|tsx|js|jsx|mjs|cjs)$/.test(e)}u(M,"isCodeFile");async function T(e,t){if(!t.shippedSha)return{drift:"unknown"};let n=t.content.scope.map(o=>o.match(/[a-zA-Z0-9_./-]+\.[a-z]+/)?.[0]??o.match(/[a-zA-Z0-9_./-]+\//)?.[0]).filter(o=>!!o);if(n.length===0)return{drift:"unknown"};let s=await y("git",["diff","--shortstat",`${t.shippedSha}..HEAD`,"--",...n],{cwd:e}).then(({stdout:o})=>{let a=o.match(/(\d+) insertions?/),c=o.match(/(\d+) deletions?/);return(a?Number.parseInt(a[1],10):0)+(c?Number.parseInt(c[1],10):0)}).catch(()=>null);if(s===null)return{drift:"unknown"};if(s<=A)return{drift:!1,locChanged:s,cosmeticOnly:!1};let r=await y("git",["log","--format=%s",`${t.shippedSha}..HEAD`,"--",...n],{cwd:e}).then(({stdout:o})=>o.split(`
|
|
8
|
+
`).filter(Boolean).every(a=>I.test(a))).catch(()=>!1);return{drift:!r,locChanged:s,cosmeticOnly:r}}u(T,"driftForSpec");function H(e){let t=[];if(t.push("# Spec inventory"),t.push(""),t.push(`_${e.totalSpecs} specs across ${e.modules.length} modules \xB7 generated ${e.generatedAt}_`),t.push(""),Object.keys(e.byStatus).length>0){t.push("## By status");for(let[n,s]of Object.entries(e.byStatus))t.push(`- ${n}: ${s}`);t.push("")}t.push("## Coverage by module"),t.push(""),t.push("| Module | Specs | Files | Covered | % | Drift | Last updated |"),t.push("|---|---|---|---|---|---|---|");for(let n of e.modules){let s=n.coveredPct===null?"n/a":`${n.coveredPct}%`,r=n.drift===!0?"\u26A0\uFE0F yes":n.drift==="unknown"?"\u2754":"\u2713",o=n.lastUpdated?n.lastUpdated.slice(0,10):"\u2014";t.push(`| \`${n.module}\` | ${n.specCount} | ${n.totalFiles} | ${n.coveredFiles} | ${s} | ${r} | ${o} |`)}if(e.uncoveredModules.length>0){t.push(""),t.push("## Modules with NO specs");for(let n of e.uncoveredModules)t.push(`- \`${n}\``)}return t.join(`
|
|
9
|
+
`)}u(H,"renderInventoryMd");export{W as buildInventory,H as renderInventoryMd};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{c as a}from"./chunk-ZAUJWUUN.mjs";import"./chunk-V7VA4EQX.mjs";import"./chunk-YJOC2JJK.mjs";import"./chunk-MXJKULJY.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import"./chunk-3TRXQAU4.mjs";export{a as specService};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{g as s}from"./chunk-YJOC2JJK.mjs";import{b as w}from"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import{a as m}from"./chunk-KUQLXY2P.mjs";import"./chunk-HCPQZRR3.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-RP7F67ZT.mjs";import"./chunk-INJ5WT2D.mjs";import{e as h,l as S}from"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as p}from"./chunk-3TRXQAU4.mjs";S();async function x(r,a,e){let o=e.content.acceptance_criteria;if(o.length===0)return{taskIds:[],skippedReason:"no_acceptance_criteria"};if(e.content.tasks_created_at!==null)return{taskIds:[],skippedReason:"already_broken_down"};let d=e.content.linked_tasks.length>0,y=(await m.getTasks(r)).filter(t=>t.featureId===e.id),g=new Set,u=o.map(t=>{let n=y.find(_=>_.body===t&&!g.has(_.id));return n&&g.add(n.id),n??null}),c=o.map((t,n)=>({ac:t,i:n})).filter(({i:t})=>u[t]===null),l=c.length>0?await m.addTasks(r,c.map(({ac:t})=>({description:I(t),body:t,priority:"medium",type:"feature",section:"backlog",featureId:e.id,groupId:e.id,groupName:e.title}))):[],b=new Map(c.map(({i:t},n)=>[t,l[n].id])),i=o.map((t,n)=>u[n]?.id??b.get(n));for(let t of i)s.linkTask(r,e.id,t);let k=s.get(r,e.id);if(k){let t={...k.content,tasks_created_at:h()};s.updateContent(r,e.id,t)}let f=i.length-l.length;return await w.remember(a,{type:"spec",content:`Auto-breakdown: ${l.length} tasks created${f>0?`, ${f} adopted`:""} from ${e.title}${d?" (recovered from partial)":""}`,tags:{spec_id:e.id,event:"auto_breakdown",task_count:String(i.length),...d?{recovered:"partial"}:{}},source:e.id}),{taskIds:i,...d?{recoveredFromPartial:!0}:{}}}p(x,"breakdownSpecToTasks");function I(r){let a=r.replace(/\s+/g," ").trim();return a.length<=140?a:`${a.slice(0,137)}\u2026`}p(I,"truncateForDescription");export{x as breakdownSpecToTasks};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as a}from"./chunk-EHVU2SMR.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import"./chunk-3TRXQAU4.mjs";export{a as stateStorage};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as s}from"./chunk-WTDUJB4I.mjs";import"./chunk-U24YKPYX.mjs";import{a as o}from"./chunk-3TRXQAU4.mjs";import e from"node:fs";import u from"node:path";var a=3e4;function f(n){return Buffer.from(n,"utf-8").reduce((t,r)=>Math.imul(t^r,16777619)>>>0,2166136261).toString(16).padStart(8,"0")}o(f,"fnv1a32hex");function S(n){return n.toLowerCase().replace(/[^a-z0-9-]/g,"")}o(S,"sanitizeSubcommand");function l(n,i){let t=S(i);return t?u.join(s(),`hook-stdin-${f(n)}-${t}.json`):null}o(l,"hookStdinSpillPath");function h(n,i){let t=l(n,i);if(!t)return null;try{let r=e.statSync(t);if(Date.now()-r.mtimeMs>a)return e.unlinkSync(t),null;let c=e.readFileSync(t,"utf-8");return e.unlinkSync(t),c}catch{return null}}o(h,"consumeHookStdinSpill");function d(n,i,t){let r=l(n,i);if(r)try{e.mkdirSync(u.dirname(r),{recursive:!0}),e.writeFileSync(r,t,"utf-8")}catch{}}o(d,"writeHookStdinSpill");export{a as HOOK_STDIN_SPILL_MAX_AGE_MS,h as consumeHookStdinSpill,l as hookStdinSpillPath,d as writeHookStdinSpill};
|