prjct-cli 3.97.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 +5 -0
- package/dist/bin/core-chunks/{agent-HCP5FF77.mjs → agent-3N2MSSGT.mjs} +1 -1
- package/dist/bin/core-chunks/{agent-switch-AVSX6SLY.mjs → agent-switch-4SE6GF7R.mjs} +1 -1
- package/dist/bin/core-chunks/{agents-OAQXBGH3.mjs → agents-ZPNNCOH7.mjs} +1 -1
- package/dist/bin/core-chunks/{analysis-3A7ODSSI.mjs → analysis-OARMM4AH.mjs} +2 -2
- package/dist/bin/core-chunks/{auto-flush-EWSVMKQN.mjs → auto-flush-XA3V7BJ6.mjs} +1 -1
- package/dist/bin/core-chunks/{bin-commands-LLHG2NSY.mjs → bin-commands-FYID6EYI.mjs} +5 -5
- package/dist/bin/core-chunks/{capture-7LQ52T6L.mjs → capture-3JJPWIF3.mjs} +1 -1
- package/dist/bin/core-chunks/{capture-gate-M4HM7WAI.mjs → capture-gate-G5LGVDME.mjs} +1 -1
- package/dist/bin/core-chunks/{ceremonies-4OZ3FKRE.mjs → ceremonies-B565WDCA.mjs} +4 -4
- package/dist/bin/core-chunks/{changelog-CUNVCEL5.mjs → changelog-LPJ4GKB6.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-DN46DLU3.mjs → chunk-2FRLIQKX.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-X4FR5S7E.mjs → chunk-2VRS5CUH.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-ZK7BMUMR.mjs → chunk-2VXPFULA.mjs} +1 -1
- package/dist/bin/core-chunks/chunk-3OWKIRK6.mjs +7 -0
- package/dist/bin/core-chunks/{chunk-V5VCXMKO.mjs → chunk-5DZ2LTII.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-5ONMON5L.mjs → chunk-5OWPZWEU.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-KWC2PCPC.mjs → chunk-5TGZSK4C.mjs} +1 -1
- package/dist/bin/core-chunks/chunk-5ZBACKED.mjs +14 -0
- package/dist/bin/core-chunks/{chunk-X35YYOFE.mjs → chunk-6KNMT46X.mjs} +2 -2
- package/dist/bin/core-chunks/{chunk-5MN22JFI.mjs → chunk-6POAOY5C.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-7CI4AMVO.mjs → chunk-6U3CYLY5.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-J7T5IEFJ.mjs → chunk-6U3MV7KZ.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-2ZPM4Z6W.mjs → chunk-7BU6SJBC.mjs} +4 -4
- package/dist/bin/core-chunks/{chunk-ZKJZDOPT.mjs → chunk-ACIOJQSI.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-UE3XKXWM.mjs → chunk-ALTQ3KL4.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-IVGWOY3U.mjs → chunk-ANBDOI53.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-LZC6NGB6.mjs → chunk-B2HY22OD.mjs} +2 -2
- package/dist/bin/core-chunks/{chunk-6AFXUX2M.mjs → chunk-BUD3R6LF.mjs} +2 -2
- package/dist/bin/core-chunks/{chunk-MDONTD7O.mjs → chunk-CA2VFWFP.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-56FW4P6U.mjs → chunk-CB3CNJTL.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-6FFOWWH2.mjs → chunk-CVKMV22J.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-5UUITMRX.mjs → chunk-CXKDKMYE.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-XSZG3CBO.mjs → chunk-DTMZBK4E.mjs} +1 -1
- package/dist/bin/core-chunks/chunk-DW4QMD6J.mjs +10 -0
- package/dist/bin/core-chunks/{chunk-CDLZLTRY.mjs → chunk-DZDEBDAB.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-WGDE3L33.mjs → chunk-FOUBHU4X.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-CNWEQUB7.mjs → chunk-HA7Y76GF.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-MTDCRYLP.mjs → chunk-HVXWQ2XZ.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-OYXQRBVM.mjs → chunk-IJNKHQIS.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-KIRU4QFX.mjs → chunk-J6Y7IVFQ.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-3FXNIJCS.mjs → chunk-JGGQSMZC.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-6P4GMVUZ.mjs → chunk-KI4OY3UQ.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-BTCCUMKI.mjs → chunk-L3DJN3XD.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-CEOTHJIY.mjs → chunk-LFOQ7FCR.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-XU3BQPBU.mjs → chunk-LGX2GM45.mjs} +1 -1
- package/dist/bin/core-chunks/chunk-LTKUTRRL.mjs +7 -0
- package/dist/bin/core-chunks/{chunk-BQKDJ3U6.mjs → chunk-LZILSE5H.mjs} +1 -1
- package/dist/bin/core-chunks/chunk-MPU3VM6Z.mjs +7 -0
- package/dist/bin/core-chunks/{chunk-INM5COWM.mjs → chunk-MXJF3FA7.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-VDXTMAMO.mjs → chunk-NNILF7R3.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-WZXUFSVT.mjs → chunk-O5VCBMEK.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-XYDLXF5A.mjs → chunk-OE27RFLJ.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-HEXSVBUP.mjs → chunk-OGM34Z6W.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-KKIJAEYU.mjs → chunk-OXKGN3HG.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-QLMZW4K7.mjs → chunk-PQTR6XVW.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-53ZPEZLU.mjs → chunk-Q7GJIU6D.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-IFLBZKKK.mjs → chunk-QWRPJARA.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-TGNZI4KF.mjs → chunk-STFUT7R7.mjs} +2 -2
- package/dist/bin/core-chunks/{chunk-IMQCXC3R.mjs → chunk-SUXIKMTS.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-WP5IU4W4.mjs → chunk-TOORPP6K.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-7QMBIMEX.mjs → chunk-UAYTDSYG.mjs} +3 -3
- package/dist/bin/core-chunks/{chunk-PPERWRFS.mjs → chunk-UNIBFM6J.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-5YSPND5J.mjs → chunk-UX2ORID4.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-3JD6KRNJ.mjs → chunk-VJCTTFKP.mjs} +1 -1
- package/dist/bin/core-chunks/chunk-W23JLJJZ.mjs +109 -0
- package/dist/bin/core-chunks/{chunk-DCVPNFS4.mjs → chunk-WCTVZQBG.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-GOIBJ7PV.mjs → chunk-WZ6W5ZQ5.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-XPRLQIVQ.mjs → chunk-X433BB6F.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-ZHTYSYZC.mjs → chunk-XBR63NJA.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-ZS7XJUPE.mjs → chunk-XJTEPHLC.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-K25HGTC3.mjs → chunk-XLAGA5B7.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-3USVY66O.mjs → chunk-XSZOHNL4.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-TTN2CFZC.mjs → chunk-XWLTEAGN.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-V3Y3G2DE.mjs → chunk-YOWW4LHK.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-P53YMOKR.mjs → chunk-YPLFWN62.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-ZQHSJ6FF.mjs → chunk-ZAUJWUUN.mjs} +3 -3
- package/dist/bin/core-chunks/{chunk-WSVMQYYU.mjs → chunk-ZQ2XH76U.mjs} +2 -2
- package/dist/bin/core-chunks/{chunk-RXXXA7Z6.mjs → chunk-ZSANMA7K.mjs} +1 -1
- package/dist/bin/core-chunks/{chunk-AJTBFIH2.mjs → chunk-ZZR3LXCK.mjs} +1 -1
- package/dist/bin/core-chunks/{cleanup-installs-WHXUGAHM.mjs → cleanup-installs-LD43GI4K.mjs} +1 -1
- package/dist/bin/core-chunks/{cloud-FFUJZLDV.mjs → cloud-RXHFZ7MX.mjs} +1 -1
- package/dist/bin/core-chunks/{code-SU7GCPH6.mjs → code-IYK65A62.mjs} +1 -1
- package/dist/bin/core-chunks/{codex-hooks-GOLMCL2Q.mjs → codex-hooks-N5UHKK5B.mjs} +1 -1
- package/dist/bin/core-chunks/{codex-mcp-K4X2UIQF.mjs → codex-mcp-G7WNAT6T.mjs} +1 -1
- package/dist/bin/core-chunks/{codex-skill-3HNVU4T4.mjs → codex-skill-IZNP76BJ.mjs} +1 -1
- package/dist/bin/core-chunks/{command-installer-XIQK2G6W.mjs → command-installer-4ENM4GZR.mjs} +1 -1
- package/dist/bin/core-chunks/{config-W3RHV3GK.mjs → config-UVF7YOR6.mjs} +1 -1
- package/dist/bin/core-chunks/{config-manager-QVFHXIKI.mjs → config-manager-QY73WM5U.mjs} +1 -1
- package/dist/bin/core-chunks/{context-4KGTUAC4.mjs → context-4GB6ICXK.mjs} +1 -1
- package/dist/bin/core-chunks/{context-DDHC7VIC.mjs → context-MPHOQPXF.mjs} +2 -2
- package/dist/bin/core-chunks/{context-checkpoint-4CEUPEVG.mjs → context-checkpoint-NBI5HKPV.mjs} +1 -1
- package/dist/bin/core-chunks/{context-tiers-4S6H22NP.mjs → context-tiers-NOKJ75QP.mjs} +1 -1
- package/dist/bin/core-chunks/{context7-service-AZWDYK5Z.mjs → context7-service-2MYRUNKY.mjs} +1 -1
- package/dist/bin/core-chunks/{core-PR5WEQCS.mjs → core-WMEHDCOK.mjs} +1 -1
- package/dist/bin/core-chunks/{crew-JQCG6NS3.mjs → crew-EYVSIX4L.mjs} +1 -1
- package/dist/bin/core-chunks/{cwd-changed-ODKZVSPB.mjs → cwd-changed-EUJZOBIC.mjs} +1 -1
- package/dist/bin/core-chunks/{daemon-2NQTBFVR.mjs → daemon-QARP3RVX.mjs} +1 -1
- package/dist/bin/core-chunks/{developer-profile-MRPBWL2K.mjs → developer-profile-2VSFJGCU.mjs} +1 -1
- package/dist/bin/core-chunks/{distill-MLDZG5RA.mjs → distill-ZF7WHGCZ.mjs} +1 -1
- package/dist/bin/core-chunks/doctor-heal-XFSVPSEY.mjs +7 -0
- package/dist/bin/core-chunks/{doctor-service-WXLB2FEE.mjs → doctor-service-6ZJBWIXR.mjs} +1 -1
- package/dist/bin/core-chunks/{dynasty-outcomes-H2O546OL.mjs → dynasty-outcomes-KDWIEA4Y.mjs} +1 -1
- package/dist/bin/core-chunks/{embeddings-7A5Z5I67.mjs → embeddings-354ZYFKX.mjs} +1 -1
- package/dist/bin/core-chunks/{enriched-recall-YXK7EIKH.mjs → enriched-recall-MKBOXB7M.mjs} +1 -1
- package/dist/bin/core-chunks/{eval-4YFUBFLV.mjs → eval-O4YD6YOV.mjs} +2 -2
- package/dist/bin/core-chunks/{format-5V6GF6JJ.mjs → format-SYVL4CV5.mjs} +1 -1
- package/dist/bin/core-chunks/{gemini-settings-ZTU3VQU3.mjs → gemini-settings-RGD7JLSP.mjs} +1 -1
- package/dist/bin/core-chunks/{grok-mcp-F3SRFMCW.mjs → grok-mcp-IE2RRRRW.mjs} +1 -1
- package/dist/bin/core-chunks/{grok-plugin-4CE2WUYI.mjs → grok-plugin-SSANHBS7.mjs} +1 -1
- package/dist/bin/core-chunks/{grok-skill-GLSBOOKW.mjs → grok-skill-7ZP7R7KO.mjs} +1 -1
- package/dist/bin/core-chunks/{guard-FJBJ6IAE.mjs → guard-RT7U3LJX.mjs} +1 -1
- package/dist/bin/core-chunks/{guards-LFUFKVVH.mjs → guards-AXH6V2IJ.mjs} +1 -1
- package/dist/bin/core-chunks/{harness-FN3HASSA.mjs → harness-V7J7WIT2.mjs} +2 -2
- package/dist/bin/core-chunks/{health-W2VWME7Z.mjs → health-TNB5OC37.mjs} +1 -1
- package/dist/bin/core-chunks/{help-I37I3V2R.mjs → help-P7EYELVK.mjs} +1 -1
- package/dist/bin/core-chunks/{hooks-service-C2P5DRCH.mjs → hooks-service-REI56DDC.mjs} +1 -1
- package/dist/bin/core-chunks/{install-XP4S6HWQ.mjs → install-FZQJJWT5.mjs} +2 -2
- package/dist/bin/core-chunks/{judgment-GJE332LF.mjs → judgment-G5KH6QFC.mjs} +2 -2
- package/dist/bin/core-chunks/{judgment-receipt-WT4EMCAV.mjs → judgment-receipt-GO6QEZQC.mjs} +1 -1
- package/dist/bin/core-chunks/{kimi-hooks-2UEUIKXV.mjs → kimi-hooks-TR6J3OVG.mjs} +1 -1
- package/dist/bin/core-chunks/{kimi-mcp-DJCXZ2JY.mjs → kimi-mcp-ETG7O6O5.mjs} +1 -1
- package/dist/bin/core-chunks/{land-cue-5USQ64MS.mjs → land-cue-3BUD3KJJ.mjs} +1 -1
- package/dist/bin/core-chunks/{land-rho-ISNVEPVC.mjs → land-rho-MCTQDPRH.mjs} +1 -1
- package/dist/bin/core-chunks/{land-synthesis-CHARJMUP.mjs → land-synthesis-MU4EZEYL.mjs} +1 -1
- package/dist/bin/core-chunks/{lean-L53CKZNH.mjs → lean-26BWCUOR.mjs} +1 -1
- package/dist/bin/core-chunks/{legacy-crew-sweep-2TLKJTHI.mjs → legacy-crew-sweep-G5UJT2PM.mjs} +2 -2
- package/dist/bin/core-chunks/{llm-XMH7WTHV.mjs → llm-KMVXVBHG.mjs} +1 -1
- package/dist/bin/core-chunks/{mcp-FLVIZBV2.mjs → mcp-BD5TOTCK.mjs} +1 -1
- package/dist/bin/core-chunks/{memory-dream-EJWI4FJO.mjs → memory-dream-6GFV2GXN.mjs} +1 -1
- package/dist/bin/core-chunks/{memory-export-27HTNNFI.mjs → memory-export-WJ4H7CFV.mjs} +1 -1
- package/dist/bin/core-chunks/{memory-index-BRZDZ2BY.mjs → memory-index-7NIU34EI.mjs} +1 -1
- package/dist/bin/core-chunks/{notification-KJ4FQJAW.mjs → notification-G654IX3O.mjs} +1 -1
- package/dist/bin/core-chunks/{notify-76B7AICZ.mjs → notify-EWYUBKGO.mjs} +1 -1
- package/dist/bin/core-chunks/{opencode-mcp-5YSIYDI3.mjs → opencode-mcp-L7NC77JF.mjs} +1 -1
- package/dist/bin/core-chunks/{pack-integrity-GXN67LJB.mjs → pack-integrity-X277OVRB.mjs} +1 -1
- package/dist/bin/core-chunks/{pack-manager-46SPIPPD.mjs → pack-manager-VN7F6R47.mjs} +1 -1
- package/dist/bin/core-chunks/package-R4FUTGOE.mjs +7 -0
- package/dist/bin/core-chunks/{pi-skill-SDHTUK3V.mjs → pi-skill-IZQEUILZ.mjs} +1 -1
- package/dist/bin/core-chunks/{planning-S3MYVWH6.mjs → planning-NOWLKZDS.mjs} +2 -2
- package/dist/bin/core-chunks/{post-edit-5YSNEMK7.mjs → post-edit-GTBY32JU.mjs} +1 -1
- package/dist/bin/core-chunks/{pre-bash-GLDILCRF.mjs → pre-bash-32ZOGNSP.mjs} +1 -1
- package/dist/bin/core-chunks/{pre-commit-U6HPPNIC.mjs → pre-commit-7TU2A7H4.mjs} +1 -1
- package/dist/bin/core-chunks/{pre-edit-PEYQA6P6.mjs → pre-edit-ASEWA5TS.mjs} +1 -1
- package/dist/bin/core-chunks/{pre-package-76JR5GLO.mjs → pre-package-ZTZACEBB.mjs} +1 -1
- package/dist/bin/core-chunks/{pre-search-5EHNUOP3.mjs → pre-search-MKDRFJSE.mjs} +1 -1
- package/dist/bin/core-chunks/{preferences-BTSYWYUM.mjs → preferences-KO5U2ELK.mjs} +1 -1
- package/dist/bin/core-chunks/{primitives-IXAYLX7U.mjs → primitives-GNUMBYOK.mjs} +1 -1
- package/dist/bin/core-chunks/{prjct-md-SUDFWDCS.mjs → prjct-md-BSFV7OQQ.mjs} +1 -1
- package/dist/bin/core-chunks/{product-KKGJ6MMF.mjs → product-GUHSUNIH.mjs} +1 -1
- package/dist/bin/core-chunks/{project-agent-surfaces-I2CUZUIN.mjs → project-agent-surfaces-BXCJJXB7.mjs} +1 -1
- package/dist/bin/core-chunks/{project-memory-GYLYIJQD.mjs → project-memory-L5MDZYST.mjs} +1 -1
- package/dist/bin/core-chunks/{project-style-evolution-5W25UPPN.mjs → project-style-evolution-HIMSJQQB.mjs} +1 -1
- package/dist/bin/core-chunks/prompt-47YP5JIR.mjs +25 -0
- package/dist/bin/core-chunks/{purge-5EPJV25P.mjs → purge-6SJKHKIY.mjs} +1 -1
- package/dist/bin/core-chunks/{registry-LK6IQ5UX.mjs → registry-YM2EYUXY.mjs} +1 -1
- package/dist/bin/core-chunks/{retention-S22T3SPT.mjs → retention-QSXWKE4H.mjs} +1 -1
- package/dist/bin/core-chunks/{retro-CLKOHAN6.mjs → retro-B2EBN4TA.mjs} +1 -1
- package/dist/bin/core-chunks/{review-risk-LLLBKUXT.mjs → review-risk-LBPY5M3K.mjs} +1 -1
- package/dist/bin/core-chunks/{safe-artifacts-RW5WQUUJ.mjs → safe-artifacts-PE2TMEZQ.mjs} +1 -1
- package/dist/bin/core-chunks/{sdd-HE7O6N5S.mjs → sdd-3WNZJ6FU.mjs} +1 -1
- package/dist/bin/core-chunks/{seed-JX7W53E5.mjs → seed-MMDJE2UO.mjs} +2 -2
- package/dist/bin/core-chunks/{self-heal-DFUEKNF3.mjs → self-heal-R5FBXEVQ.mjs} +1 -1
- package/dist/bin/core-chunks/{session-continuity-BFSW4OL6.mjs → session-continuity-OQDB5UYI.mjs} +1 -1
- package/dist/bin/core-chunks/{session-start-HVYUKJL2.mjs → session-start-FM6UL7MT.mjs} +1 -1
- package/dist/bin/core-chunks/{setup-GHS24ER5.mjs → setup-BL36ZWPW.mjs} +2 -2
- package/dist/bin/core-chunks/{setup-J4JFYT63.mjs → setup-V75BWRHU.mjs} +2 -2
- package/dist/bin/core-chunks/{shipping-I4D4AVTE.mjs → shipping-NZVM57JJ.mjs} +4 -4
- package/dist/bin/core-chunks/{signals-digest-V44KYN6Z.mjs → signals-digest-P5BG6MZF.mjs} +1 -1
- package/dist/bin/core-chunks/{skill-adherence-MHY4BZL4.mjs → skill-adherence-JE3N3Y67.mjs} +1 -1
- package/dist/bin/core-chunks/{spec-2XXPLHUZ.mjs → spec-VC3VTUI3.mjs} +3 -3
- package/dist/bin/core-chunks/{spec-context-inference-THFMXC7S.mjs → spec-context-inference-KOINWBC7.mjs} +1 -1
- package/dist/bin/core-chunks/{spec-service-I23KJKKP.mjs → spec-service-UZ53XL6X.mjs} +1 -1
- package/dist/bin/core-chunks/{spec-task-breakdown-HTG6ME6G.mjs → spec-task-breakdown-3Y7YXCIQ.mjs} +1 -1
- package/dist/bin/core-chunks/{stop-2H57XCGZ.mjs → stop-6SH36ULT.mjs} +3 -3
- package/dist/bin/core-chunks/{subagent-start-5LPASXOS.mjs → subagent-start-TVGBV2V2.mjs} +1 -1
- package/dist/bin/core-chunks/{subagent-stop-ANLSG3KN.mjs → subagent-stop-APWY6KMX.mjs} +1 -1
- package/dist/bin/core-chunks/{surface-attribution-WL7S53XX.mjs → surface-attribution-CQVM2SWY.mjs} +1 -1
- package/dist/bin/core-chunks/{task-service-FK7FC3PE.mjs → task-service-KFYL5NT4.mjs} +1 -1
- package/dist/bin/core-chunks/{tdd-NQDHU62B.mjs → tdd-P2PP4RR4.mjs} +1 -1
- package/dist/bin/core-chunks/{team-XZ4Q6UBV.mjs → team-WKAAOEFE.mjs} +1 -1
- package/dist/bin/core-chunks/{template-loader-33OVJ4G5.mjs → template-loader-H4FE37HV.mjs} +1 -1
- package/dist/bin/core-chunks/{uninstall-6NFON7FO.mjs → uninstall-W6EAUS7N.mjs} +1 -1
- package/dist/bin/core-chunks/{update-4IE6SA6M.mjs → update-PSHEJJI5.mjs} +2 -2
- package/dist/bin/core-chunks/{update-checker-FK7MWNWN.mjs → update-checker-LZCUPWQB.mjs} +1 -1
- package/dist/bin/core-chunks/{version-252QLBN2.mjs → version-B5DBRVGQ.mjs} +1 -1
- package/dist/bin/core-chunks/{watch-service-7ZERG7RC.mjs → watch-service-7V3O52TW.mjs} +1 -1
- package/dist/bin/core-chunks/weak-frontier-demo-ZCDTMYRO.mjs +7 -0
- package/dist/bin/core-chunks/{weak-model-mode-DH66XMD2.mjs → weak-model-mode-LOAPFJPQ.mjs} +1 -1
- package/dist/bin/core-chunks/{work-graph-JGJWE3AV.mjs → work-graph-ZNV7S6EU.mjs} +1 -1
- package/dist/bin/core-chunks/{work-scope-3LXOEIUX.mjs → work-scope-XXPUH6TU.mjs} +1 -1
- package/dist/bin/core-chunks/{workflow-FGJVLRQ3.mjs → workflow-XM77QYRF.mjs} +2 -2
- package/dist/bin/core-chunks/{workflows-reference-UWKRZ6BJ.mjs → workflows-reference-T7RH7IGJ.mjs} +1 -1
- package/dist/bin/core-chunks/{world-model-impact-RH5WH2B3.mjs → world-model-impact-FAGGNUGN.mjs} +1 -1
- package/dist/bin/hook-chunks/{agent-switch-7GOGG4KG.mjs → agent-switch-TAJWH2ZD.mjs} +1 -1
- package/dist/bin/hook-chunks/{analysis-UI2JRLJO.mjs → analysis-34WDLUXK.mjs} +2 -2
- package/dist/bin/hook-chunks/{auto-flush-JKIXTI2I.mjs → auto-flush-7TIEBPPQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{capture-gate-DIPHPNIC.mjs → capture-gate-JFVGG7RB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-XXVHUYL7.mjs → chunk-22CBVTZ3.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ZH2MF7H7.mjs → chunk-3JOZN7YJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-Y7RDBMNC.mjs → chunk-4X3KUIXK.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-6RS7PNAN.mjs → chunk-5ALQBNIZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-IL36ER4U.mjs → chunk-5VPZI2ZF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-FBEDUKMG.mjs → chunk-6EHYPQ5U.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-7H5UVM6X.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-IDPBMN3Q.mjs → chunk-A3R47SP6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-UI25YRTY.mjs → chunk-CGAKJDKT.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-6LU777GI.mjs → chunk-CJY4Y5SO.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-WIA6ORIY.mjs → chunk-FSFURDAE.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-6WDRJ7J7.mjs → chunk-FTBBQHI4.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-25OGCQTR.mjs → chunk-G4VJKPG7.mjs} +3 -3
- package/dist/bin/hook-chunks/{chunk-PFORBQBF.mjs → chunk-GAJOSSB4.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-KOLXYWOA.mjs → chunk-H3GIYI4Q.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-B7MHIUFA.mjs → chunk-HRU2KNEB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-JF6DFOQK.mjs → chunk-LCGWETJ6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-PQJ64L6U.mjs → chunk-MG2DNP4Z.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-NGB6JNSB.mjs +18 -0
- package/dist/bin/hook-chunks/{chunk-AEDB75AK.mjs → chunk-OALZUWC6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-IFIENAZU.mjs → chunk-PZMBZ6GE.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-F3PNT2DQ.mjs → chunk-QIB6Y6AH.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-ZXON2U5F.mjs → chunk-QMNZPNVY.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-B2ZA5ZAO.mjs → chunk-R4YDE3GU.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-UBWUQ64A.mjs → chunk-RFKRKUHB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-NMB6YSAH.mjs → chunk-RGOTJCZU.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ANSRNEEI.mjs → chunk-T2KVL6PZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-HNZ24HIK.mjs → chunk-T7DRHVK3.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-IHEOOJJT.mjs → chunk-TWFLW6OJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ONGVBXBD.mjs → chunk-UJIOGFNP.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-NSTXHVTH.mjs → chunk-UK24P7PV.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-63P5VOR6.mjs → chunk-ULNGKZB6.mjs} +4 -4
- package/dist/bin/hook-chunks/{chunk-UMJ5D5I6.mjs → chunk-UWHVPO6X.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-A6LRNS6R.mjs → chunk-XC2BSGWF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-7PA4KPSR.mjs → chunk-ZPAY2NSF.mjs} +2 -2
- package/dist/bin/hook-chunks/{codex-skill-UZZCACMB.mjs → codex-skill-BFRU5FTP.mjs} +1 -1
- package/dist/bin/hook-chunks/{command-installer-FJ73C2ZW.mjs → command-installer-3XOZGKOQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{config-manager-XDKOTIJM.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-STP3LH6Y.mjs → cwd-changed-USNJYUH7.mjs} +1 -1
- package/dist/bin/hook-chunks/{distill-63BHUJAC.mjs → distill-47YVL7IH.mjs} +1 -1
- package/dist/bin/hook-chunks/{enriched-recall-6F6LBYAB.mjs → enriched-recall-CVYI52NO.mjs} +1 -1
- package/dist/bin/hook-chunks/{format-VJ2YQ4XQ.mjs → format-DPIN45EG.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-receipt-LSJCAYBT.mjs → judgment-receipt-G2DKQR7U.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-cue-DEO2AZW4.mjs → land-cue-3JD2TXFP.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-synthesis-GTMFIGDM.mjs → land-synthesis-5C4KGCTB.mjs} +1 -1
- package/dist/bin/hook-chunks/{legacy-crew-sweep-QPKU7ITU.mjs → legacy-crew-sweep-XQNXNZES.mjs} +2 -2
- package/dist/bin/hook-chunks/{memory-index-KCMXQGKX.mjs → memory-index-LL6SQJ2N.mjs} +1 -1
- package/dist/bin/hook-chunks/{notification-DX6ZHOUC.mjs → notification-ACQBRJG3.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-integrity-UMLIB5RQ.mjs → pack-integrity-DCXVRRJZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-manager-YXRK2TJ4.mjs → pack-manager-KYWKNYUY.mjs} +1 -1
- package/dist/bin/hook-chunks/{planning-JR7O5MYW.mjs → planning-KOU3XKWS.mjs} +2 -2
- package/dist/bin/hook-chunks/{post-edit-IPTVSRVG.mjs → post-edit-CK2MYQEN.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-bash-5WWTH36N.mjs → pre-bash-W5A5CTR3.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-commit-KZ5TNTPW.mjs → pre-commit-5Q24RM4S.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-edit-XHPYBXRU.mjs → pre-edit-YIJ4BCYL.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-package-U3HDW3SX.mjs → pre-package-O4RMVA4T.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-search-R5CRK66E.mjs → pre-search-WYOWC3D6.mjs} +1 -1
- package/dist/bin/hook-chunks/{prjct-md-IBQTJBK7.mjs → prjct-md-2UVHFYTJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-agent-surfaces-TPZO73ZV.mjs → project-agent-surfaces-BKFYUMRV.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-memory-YQLZX5RG.mjs → project-memory-OC5GTJPY.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-style-evolution-NOFCIIZZ.mjs → project-style-evolution-2IFJCACQ.mjs} +1 -1
- package/dist/bin/hook-chunks/prompt-JIWMP563.mjs +26 -0
- package/dist/bin/hook-chunks/{purge-5W3K2MZL.mjs → purge-FQK3Z4QS.mjs} +1 -1
- package/dist/bin/hook-chunks/{retention-GWJ4AX7I.mjs → retention-2FETBJFG.mjs} +1 -1
- package/dist/bin/hook-chunks/{sdd-GWBRD4KI.mjs → sdd-V43TSJ2P.mjs} +1 -1
- package/dist/bin/hook-chunks/{session-continuity-VH645RGR.mjs → session-continuity-RO2ACICF.mjs} +1 -1
- package/dist/bin/hook-chunks/{session-start-4TYTI27B.mjs → session-start-FKKFMKQ5.mjs} +1 -1
- package/dist/bin/hook-chunks/{setup-VF4UHUBX.mjs → setup-YV2DKG5L.mjs} +2 -2
- package/dist/bin/hook-chunks/{shipping-2ULWBGRX.mjs → shipping-SCNFEXBY.mjs} +4 -4
- package/dist/bin/hook-chunks/{spec-context-inference-HVENYOIO.mjs → spec-context-inference-BD3ANTXA.mjs} +1 -1
- package/dist/bin/hook-chunks/{spec-service-4XGQQPGP.mjs → spec-service-OWYOAGXS.mjs} +2 -2
- package/dist/bin/hook-chunks/{spec-task-breakdown-JXF556UH.mjs → spec-task-breakdown-HOTLUFDM.mjs} +1 -1
- package/dist/bin/hook-chunks/{stop-NJDYIIXR.mjs → stop-MIXT7WXA.mjs} +3 -3
- package/dist/bin/hook-chunks/{subagent-start-2YMGD4SY.mjs → subagent-start-NO3TN65K.mjs} +1 -1
- package/dist/bin/hook-chunks/{subagent-stop-4TZJ2NSJ.mjs → subagent-stop-CKWIXX7W.mjs} +1 -1
- package/dist/bin/hook-chunks/{surface-attribution-UNK4J5W2.mjs → surface-attribution-BYESPLXM.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-service-SPUES5DO.mjs → task-service-5ONSBKKP.mjs} +1 -1
- package/dist/bin/hook-chunks/{tdd-MYF7I5FS.mjs → tdd-SESB4IG3.mjs} +1 -1
- package/dist/bin/hook-chunks/{template-loader-4SYVR2UB.mjs → template-loader-KO67FVHO.mjs} +1 -1
- package/dist/bin/hook-chunks/{weak-model-mode-TYJJT6JJ.mjs → weak-model-mode-HPXBKXJT.mjs} +1 -1
- package/dist/bin/hook-chunks/{work-scope-A6XPENFE.mjs → work-scope-RNPGACPA.mjs} +1 -1
- package/dist/bin/prjct-core.mjs +3 -3
- package/dist/bin/prjct-hooks.mjs +1 -1
- package/dist/daemon/entry.mjs +591 -583
- package/dist/mcp/server.mjs +318 -312
- package/package.json +2 -1
- package/dist/bin/core-chunks/chunk-GDLAQV3Q.mjs +0 -14
- package/dist/bin/core-chunks/chunk-R7LLMJDP.mjs +0 -7
- package/dist/bin/core-chunks/chunk-UT425KVX.mjs +0 -10
- package/dist/bin/core-chunks/chunk-VILH3VYH.mjs +0 -103
- package/dist/bin/core-chunks/chunk-Y5SEUYET.mjs +0 -7
- package/dist/bin/core-chunks/doctor-heal-ZUZ2RHGY.mjs +0 -7
- package/dist/bin/core-chunks/package-DCGCOAGQ.mjs +0 -7
- package/dist/bin/core-chunks/prompt-SW5XDRMX.mjs +0 -23
- package/dist/bin/core-chunks/weak-frontier-demo-5C4FR3OA.mjs +0 -7
- package/dist/bin/hook-chunks/chunk-IWUF2LGO.mjs +0 -18
- package/dist/bin/hook-chunks/chunk-ZYCNW75E.mjs +0 -9
- package/dist/bin/hook-chunks/prompt-DJWONMTZ.mjs +0 -24
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as h}from"./chunk-
|
|
7
|
+
import{a as h}from"./chunk-5DZ2LTII.mjs";import{e as u}from"./chunk-FOWTB762.mjs";import"./chunk-6U3CYLY5.mjs";import{a as y,c as k,d as w,e as j}from"./chunk-XJTEPHLC.mjs";import{a as $,b as f}from"./chunk-RXZJB43D.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import{h as i}from"./chunk-ID2C2S33.mjs";import{b as p}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"./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-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import{e as l,g as R}from"./chunk-225DWS4D.mjs";import{a as g}from"./chunk-3TRXQAU4.mjs";R();var P=class extends h{static{g(this,"SeedCommands")}async seed(c=null,n=process.cwd(),o={}){let s=(c??"").trim().split(/\s+/).filter(Boolean),e=s[0]??"list",t=s.slice(1).join(",");switch(e){case"add":return this.add(t||null,n,o);case"remove":return this.remove(t||null,n,o);case"list":return this.list(null,n,o);case"suggest":return this.suggest(null,n,o);case"catalog":return this.catalog(null,n,o);case"verify":return this.verify(null,n,o);default:return i.fail(`Unknown seed subcommand: ${e}. Use: add, remove, list, suggest, catalog, verify.`),{success:!1,error:"Unknown seed subcommand"}}}async add(c=null,n=process.cwd(),o={}){try{if(!c)return i.info(`Usage: prjct seed add <pack>[,<pack>...]
|
|
8
8
|
Available: ${f.join(", ")}`),{success:!1,error:"No pack given"};let s=c.split(",").map(r=>r.trim()).filter(Boolean),e=await k(n,s,{suggestPersona:o.suggestPersona??!1}),t=`activated: ${e.activated.join(", ")||"none"}${e.skipped.length?` \u2022 unknown: ${e.skipped.join(", ")}`:""}`;return C(t,e,o)}catch(s){let e=l(s);return u(e)}}async remove(c=null,n=process.cwd(),o={}){try{if(!c)return i.info("Usage: prjct seed remove <pack>[,<pack>...]"),{success:!1,error:"No pack given"};let s=c.split(",").map(r=>r.trim()).filter(Boolean),e=await w(n,s),t=`deactivated: ${e.deactivated.join(", ")||"none"}${e.notActive.length?` \u2022 not active: ${e.notActive.join(", ")}`:""}`;return C(t,e,o)}catch(s){let e=l(s);return u(e)}}async list(c=null,n=process.cwd(),o={}){try{let s=await j(n);if(s.length===0){let e=`no packs active. Run \`prjct seed add <name>\` \u2014 available: ${f.join(", ")}`;return o.md?console.log(`> ${e}`):i.info(e),{success:!0,active:[]}}if(o.md){let e=["# Active packs",""];for(let t of s)e.push(`## ${t.name}${t.version?` \xB7 v${t.version}`:""}`),e.push(t.description),e.push(`- memory types: ${t.memoryTypes.join(", ")||"\u2014"}`),e.push(`- workflow slots: ${t.slots.join(", ")||"\u2014"}`),t.integrity&&e.push(`- integrity: \`${t.integrity}\` \xB7 status: ${t.status??"active"}`),e.push("");e.push("_Full catalog: `prjct seed catalog --md` \xB7 verify: `prjct seed verify --md`_"),console.log(e.join(`
|
|
9
9
|
`))}else for(let e of s)i.info(`${e.name}${e.version?`@${e.version}`:""}: ${e.description}${e.integrity?` [${e.integrity}]`:""}`),i.info(` memory: ${e.memoryTypes.join(", ")||"\u2014"}`),i.info(` slots: ${e.slots.join(", ")||"\u2014"}`);return{success:!0,active:s}}catch(s){let e=l(s);return u(e)}}async suggest(c=null,n=process.cwd(),o={}){try{let s=await y(n),e=s.map(t=>{let r=$[t];return{name:t,description:r?.description??"",version:r?.version}});if(o.md){let t=["# Suggested packs for this project",""];for(let r of e)t.push(`- **${r.name}**${r.version?` v${r.version}`:""} \u2014 ${r.description}`);t.push(""),t.push(`Activate with: \`prjct seed add ${s.join(",")}\``),console.log(t.join(`
|
|
10
|
-
`))}else i.info(`Suggested: ${s.join(", ")}`),i.info(`Activate: prjct seed add ${s.join(",")}`);return{success:!0,suggested:s}}catch(s){let e=l(s);return u(e)}}async catalog(c=null,n=process.cwd(),o={}){try{let{buildPackCatalog:s,formatPackCatalogMd:e}=await import("./pack-integrity-
|
|
10
|
+
`))}else i.info(`Suggested: ${s.join(", ")}`),i.info(`Activate: prjct seed add ${s.join(",")}`);return{success:!0,suggested:s}}catch(s){let e=l(s);return u(e)}}async catalog(c=null,n=process.cwd(),o={}){try{let{buildPackCatalog:s,formatPackCatalogMd:e}=await import("./pack-integrity-X277OVRB.mjs"),t=await s(n);if(o.md)console.log(e(t));else{for(let r of t)i.info(`${r.active?"\u25CF":"\u25CB"} ${r.name}@${r.version} [${r.status}] ${r.integrity} \u2014 ${r.description}`);i.info("Activate: prjct seed add <name> \xB7 verify: prjct seed verify")}return{success:!0,count:t.length,packs:t}}catch(s){let e=l(s);return u(e)}}async verify(c=null,n=process.cwd(),o={}){try{let{verifyActivePacks:s,formatPackVerifyMd:e,loadPackInstalls:t,stampPackInstalls:r}=await import("./pack-integrity-X277OVRB.mjs"),d=await p.getProjectId(n);if(d){let M=(await p.readConfig(n))?.persona?.packs??[],A=t(d),v=M.filter(b=>!A[b]);v.length&&r(d,v)}let a=await s(n);return o.md?console.log(e(a)):a.ok?i.done(`packs ok (${a.active} active)`):i.fail(`stale: ${a.stale.join(", ")||"\u2014"} \xB7 unknown: ${a.unknown.join(", ")||"\u2014"}`),{success:a.ok,...a}}catch(s){let e=l(s);return u(e)}}};function C(m,c,n){return n.md?console.log(`\u2713 ${m}`):i.done(m),{success:!0,...c}}g(C,"reportPackChange");export{P as SeedCommands};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b}from"./chunk-
|
|
7
|
+
import{a,b}from"./chunk-2VXPFULA.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 isSyncCurrent,b as runSelfHeal};
|
package/dist/bin/core-chunks/{session-continuity-BFSW4OL6.mjs → session-continuity-OQDB5UYI.mjs}
RENAMED
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{l as u}from"./chunk-
|
|
7
|
+
import{l as u}from"./chunk-UX2ORID4.mjs";import{a as p}from"./chunk-AS3LWTQ4.mjs";import"./chunk-4T7NGLNQ.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{f as c,i as g}from"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import{e as f,l as y}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-2EEMQV7N.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 r}from"./chunk-3TRXQAU4.mjs";g();y();var a="session:continuity",d="session-close",C=10080*60*1e3;function w(n){let e=p(n.config??null,{turnCount:n.turns??void 0,tokensIn:n.tokensIn??void 0,tokensOut:n.tokensOut??void 0,description:n.cycleDescription??void 0}),t=[];n.cycleId||n.cycleDescription?(t.push("Resume open cycle with `prjct prime` then continue work (or `prjct status done` if finished)."),t.push('Journal progress: `prjct log "what you tried"`.')):t.push('No open cycle \u2014 `prjct work "<intent>"` or `prjct next --md` for frontier.'),t.push("Pull L2 on demand: `prjct search` / `prjct guard` / MCP \u2014 never stuff into L0."),t.push("Audit gates: `prjct context artifacts --md`.");let o=n.handoffContent?.trim()?n.handoffContent.trim().slice(0,280):null,s={version:1,landedAt:f(),projectId:n.projectId,cycleId:n.cycleId??null,cycleDescription:n.cycleDescription??null,turns:n.turns??null,tokensIn:n.tokensIn??null,tokensOut:n.tokensOut??null,pressureLevel:e.level==="ok"?n.turns?"ok":null:e.level,handoffWrote:!!n.handoffWrote,receiptWrote:!!n.receiptWrote,nextActions:t,handoffPreview:o};return c.setDoc(n.projectId,a,s),s}r(w,"stampSessionContinuity");function $(n){try{let e=c.getDoc(n,a);return!e||e.version!==1||!e.landedAt?null:e}catch{return null}}r($,"loadSessionContinuity");function h(n,e=Date.now()){if(!n?.landedAt)return!1;let t=Date.parse(n.landedAt);return Number.isFinite(t)?e-t<=C:!1}r(h,"isContinuityFresh");function v(n){try{let e=l.searchFts(n,["session","close","land-auto"],12);for(let o of e){if(o.type!=="context")continue;let s=o.tags??{};if(s.topic===d||s.source==="land-auto"||o.content.startsWith("Session close:"))return o.content}let t=l.recall(n,{types:["context"],limit:8});for(let o of t){let s=o.tags??{};if(s.topic===d||s.source==="land-auto"||o.content.startsWith("Session close:"))return o.content}}catch{}return null}r(v,"loadLastSessionCloseContent");function D(n){let e=["# Managed session resume","","_Local continuity (Claude Managed Agents pattern without hosting the model). Land stamps SoT; prime restores it._",""],t=n.stamp;if(t&&h(t)){let i=m(t.landedAt);e.push(`**Last land:** ${t.landedAt.slice(0,19)} (${i})`),e.push(`- Hand-off: ${t.handoffWrote?"written":"none"} \xB7 Receipt: ${t.receiptWrote?"written":"none"}`),t.turns!=null&&e.push(`- Last cycle budget signal: turns=${t.turns}`+(t.tokensIn!=null||t.tokensOut!=null?` \xB7 tokens in=${t.tokensIn??0} out=${t.tokensOut??0}`:"")+(t.pressureLevel?` \xB7 pressure=${t.pressureLevel}`:"")),e.push("")}else t?(e.push(`**Last land:** ${t.landedAt.slice(0,19)} (stale >7d) \u2014 treat as historical; re-land after work.`),e.push("")):(e.push("**No land stamp yet.** After meaningful work run `prjct land` so the next window resumes cleanly."),e.push(""));let o=n.liveCycleDescription??t?.cycleDescription;if(o){if(e.push(`**Active / last cycle:** ${o}`),n.liveCycleId&&e.push(`- id: \`${n.liveCycleId.slice(0,8)}\``),n.journal&&n.journal.length>0){e.push("**Journal (recent):**");for(let i of n.journal)e.push(`- ${i.slice(0,120)}`)}e.push("")}else e.push("**No open cycle** on this workspace."),e.push("");let s=n.sessionCloseContent??t?.handoffPreview;if(s){e.push("## Last session hand-off"),e.push("");let i=s.length>900?`${s.slice(0,897)}\u2026`:s;e.push(i),e.push(""),e.push("_Full entry: `prjct context memory session-close` / topic `session-close`._"),e.push("")}if(n.pendingHandoffCue&&(e.push("## Multi-agent handoff"),e.push(""),e.push(n.pendingHandoffCue),e.push("")),t?.nextActions?.length){e.push("## Next actions"),e.push("");for(let i of t.nextActions)e.push(`- ${i}`);e.push("")}return e.push("## Context diet"),e.push(""),e.push(u()),e.push(""),e.push("Default surface: `work` + `ship` (user text confirm). Deeper: `prjct brief` \xB7 `prjct search` \xB7 `prjct guard` \xB7 `prjct context artifacts --md`."),e.join(`
|
|
8
8
|
`)}r(D,"formatSessionResumeCard");function L(n){if(!n||!h(n))return null;let e=m(n.landedAt),t=n.cycleDescription?` \xB7 cycle "${n.cycleDescription.slice(0,50)}${n.cycleDescription.length>50?"\u2026":""}"`:"";return["# prjct: managed session continuity",`Last land ${e}${t}. Restore full state: \`prjct prime --md\` (work graph + hand-off + next actions).`,n.handoffWrote?"Hand-off is in SQLite (`topic:session-close`) \u2014 do not re-discover from chat history.":"No hand-off body last land \u2014 prime still restores cycle/frontier if open."].join(`
|
|
9
9
|
`)}r(L,"formatContinuitySessionCue");function b(n){return["","## Managed session continuity","",`- Stamped at \`${n.landedAt.slice(0,19)}\` (SoT key \`${a}\`).`,"- **Next window / machine:** `prjct prime --md` restores cycle + last hand-off + next actions.","- Cross-device: same project DB / cloud sync of memory \u2014 no hosted model session required.",`- Context diet: ${u()}`].join(`
|
|
10
10
|
`)}r(b,"formatLandContinuityFooter");function m(n){let e=Date.parse(n);if(!Number.isFinite(e))return n;let t=Math.max(0,Math.floor((Date.now()-e)/1e3));return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}r(m,"formatRelativeIso");export{C as CONTINUITY_FRESH_MS,d as SESSION_CLOSE_TOPIC,a as SESSION_CONTINUITY_KEY,L as formatContinuitySessionCue,b as formatLandContinuityFooter,D as formatSessionResumeCard,h as isContinuityFresh,v as loadLastSessionCloseContent,$ as loadSessionContinuity,w as stampSessionContinuity};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b,c,d,e}from"./chunk-
|
|
7
|
+
import{a,b,c,d,e}from"./chunk-7BU6SJBC.mjs";import"./chunk-BSR3XUBD.mjs";import"./chunk-MCY7OXED.mjs";import"./chunk-YQ6HM3YO.mjs";import"./chunk-2VXPFULA.mjs";import"./chunk-CXKDKMYE.mjs";import"./chunk-XLAGA5B7.mjs";import"./chunk-45LKWJ5D.mjs";import"./chunk-KI4OY3UQ.mjs";import"./chunk-UHXV7MDW.mjs";import"./chunk-TILUQF6L.mjs";import"./chunk-MPU3VM6Z.mjs";import"./chunk-MG3YN3AI.mjs";import"./chunk-YEALP3WX.mjs";import"./chunk-QZ7T2EYR.mjs";import"./chunk-5YLI5V3Q.mjs";import"./chunk-F2FKQUYE.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-WTDUJB4I.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{c as buildProjectIdentityLine,a as buildSessionContext,b as buildSubagentDigest,d as consumeKimiSessionInjection,e as runSessionStartHook};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as H}from"./chunk-F7OOBAJO.mjs";import{a as J}from"./chunk-
|
|
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
8
|
- **Status**: Logged out`:""};default:{let n=await u.getStatus();return t.md?{success:!0,message:n.authenticated?`## Auth Status
|
|
9
9
|
- **Authenticated**: Yes
|
|
10
10
|
- **Email**: ${n.email||"N/A"}
|
|
@@ -89,7 +89,7 @@ Next steps:`),console.log(` 1. Open ${h}`),console.log(" 2. Navigate to your p
|
|
|
89
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
90
|
\u{1F389} Setup complete!
|
|
91
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-
|
|
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
93
|
# prjct Status Line for Claude Code
|
|
94
94
|
# Shows version update notifications and current task
|
|
95
95
|
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
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-
|
|
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
8
|
`);throw new P({message:`Missing required tools: ${i.join(", ")}`,hint:`Install the following:
|
|
9
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
10
|
# prjct Status Line for Claude Code
|
|
@@ -34,5 +34,5 @@ if [ -f "$CONFIG" ]; then
|
|
|
34
34
|
fi
|
|
35
35
|
fi
|
|
36
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-
|
|
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
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};
|
|
@@ -4,9 +4,9 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{f as ie}from"./chunk-
|
|
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-
|
|
9
|
-
`))}}catch{}if(!n.noTestGate)try{let{effectiveTddMode:t}=await import("./tdd-
|
|
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-
|
|
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
11
|
\u26A0\uFE0F ${s.question}`),console.log(`
|
|
12
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};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b,c}from"./chunk-
|
|
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};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as M}from"./chunk-
|
|
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
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
9
|
`)}c(A,"formatText");function B(n,r,i,a,l,t){if(i===0)return`## Skill adherence \u2014 last ${n}
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
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-
|
|
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
8
|
|
|
9
9
|
spec_id: ${n.id}
|
|
10
10
|
status: ${n.status}
|
|
@@ -21,7 +21,7 @@ acceptance criteria:`);for(let r of e.content.acceptance_criteria)console.log(`
|
|
|
21
21
|
scope:`);for(let r of e.content.scope)console.log(` - ${r}`)}if(e.content.out_of_scope.length>0){console.log(`
|
|
22
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
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-
|
|
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
25
|
`:`## spec validation (advisory)
|
|
26
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-
|
|
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};
|
|
@@ -4,6 +4,6 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as u}from"./chunk-ZBBNCCGV.mjs";import{b as l}from"./chunk-
|
|
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
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
9
|
`)}i(b,"warnNoContextMatch");export{$ as inferSpecContext,b as warnNoContextMatch};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{c as a}from"./chunk-
|
|
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};
|
package/dist/bin/core-chunks/{spec-task-breakdown-HTG6ME6G.mjs → spec-task-breakdown-3Y7YXCIQ.mjs}
RENAMED
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{g as s}from"./chunk-YJOC2JJK.mjs";import{b as w}from"./chunk-
|
|
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};
|