@unbrained/pm-cli 2026.7.14 → 2026.7.16
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +54 -0
- package/README.md +14 -11
- package/dist/cli/argv-utils.d.ts +1 -4
- package/dist/cli/argv-utils.js +3 -13
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +6 -4
- package/dist/cli/bootstrap-args.js +51 -16
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/bundle-integrity.d.ts +49 -0
- package/dist/cli/bundle-integrity.js +111 -0
- package/dist/cli/bundle-integrity.js.map +1 -0
- package/dist/cli/commands/completion.js +7 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +6 -163
- package/dist/cli/commands/config.js +4 -1133
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +2 -4
- package/dist/cli/commands/context.js +10 -85
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +3 -2
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +2 -91
- package/dist/cli/commands/extension/describe.js +4 -142
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +2 -36
- package/dist/cli/commands/extension/scaffold.js +4 -2435
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -28
- package/dist/cli/commands/extension/shared.js +4 -130
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -400
- package/dist/cli/commands/extension.js +4 -2183
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +6 -56
- package/dist/cli/commands/gc.js +4 -270
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +18 -5
- package/dist/cli/commands/get.js +117 -58
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +6 -184
- package/dist/cli/commands/health.js +4 -1747
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +4 -139
- package/dist/cli/commands/history-compact.js +5 -510
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +8 -120
- package/dist/cli/commands/history-redact.js +6 -581
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +7 -89
- package/dist/cli/commands/history-repair.js +5 -257
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/history.d.ts +1 -2
- package/dist/cli/commands/history.js +6 -48
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +3 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +6 -113
- package/dist/cli/commands/init-agent-guidance.js +4 -431
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +6 -181
- package/dist/cli/commands/init.js +4 -690
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/next.js +3 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/profile.d.ts +4 -174
- package/dist/cli/commands/profile.js +4 -425
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +4 -19
- package/dist/cli/commands/restore.js +9 -158
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -507
- package/dist/cli/commands/schema.js +5 -1254
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/test.d.ts +2 -4
- package/dist/cli/commands/test.js +7 -97
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +9 -249
- package/dist/cli/commands/validate.js +9 -2150
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/extension-command-help.js +18 -4
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.js +3 -3
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +20 -30
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +11 -3
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +3 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +782 -0
- package/dist/cli-bundle/chunks/{append-PVZJDM6J.js → append-OJQFUQ4T.js} +5 -5
- package/dist/cli-bundle/chunks/append-UZVHUO74.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js → chunk-2IFFUZLC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js → chunk-2JKGO6QX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js → chunk-2NCIPMQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js → chunk-2VPAVL7O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js → chunk-2WSE6PO2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js → chunk-34L5OT3Y.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js → chunk-3AUGG2DP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js → chunk-3CLU2XZO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-N3CMP4NI.js → chunk-3S5QVM5H.js} +43 -7
- package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js +64 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js → chunk-3WM75PWC.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js +121 -0
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5URI7TPJ.js → chunk-4XQ3BDV4.js} +281 -164
- package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js → chunk-5JLUII3O.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-MKL4CP2I.js → chunk-5ZSLZLDN.js} +631 -246
- package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Q37E63AM.js → chunk-6CFNAVTF.js} +21 -141
- package/dist/cli-bundle/chunks/chunk-6CFNAVTF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js → chunk-6N2VXVTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js → chunk-6S3YSUYG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZUKSZVBW.js → chunk-7B67ZL4N.js} +8 -7
- package/dist/cli-bundle/chunks/chunk-7B67ZL4N.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IA3YFTXT.js → chunk-7PIWCHTW.js} +11 -13
- package/dist/cli-bundle/chunks/chunk-7PIWCHTW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BPD26E3P.js → chunk-7Z4LKRS4.js} +291 -81
- package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js → chunk-AHVTB5I5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js → chunk-APRVSW2O.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js → chunk-B7PE22W6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js → chunk-BCOFWYW4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js → chunk-BEP7WJA2.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js +1114 -0
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js → chunk-BSEQUTQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js.map → chunk-BSEQUTQP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js → chunk-CRVF2JDM.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js → chunk-DM4H7FP4.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-DUT67M43.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-44LNIULG.js → chunk-DYH63FX7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LWTIRS3Y.js → chunk-E2OJMKML.js} +306 -82
- package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js → chunk-EAB64KLB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js → chunk-EACOH7AU.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js → chunk-EH2OPHBI.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js.map → chunk-EH2OPHBI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js → chunk-EJEXHTY5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js → chunk-EYLCSJAI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-655STMGA.js → chunk-FMBNM2EN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js → chunk-FNSPG7MU.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-5CT5BW6E.js → chunk-GM5QHQU6.js} +46 -40
- package/dist/cli-bundle/chunks/chunk-GM5QHQU6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FTQLW4JD.js → chunk-GOSLKLFE.js} +418 -24
- package/dist/cli-bundle/chunks/chunk-GOSLKLFE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KB726FMH.js → chunk-H2Z3FYXQ.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js +162 -0
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2QIQGYPW.js → chunk-H5APFTHZ.js} +53 -10
- package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js +118 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZAYYDNB3.js → chunk-HO4KXD6I.js} +22 -142
- package/dist/cli-bundle/chunks/chunk-HO4KXD6I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js → chunk-HYB5AZ63.js} +203 -62
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js.map → chunk-HYB5AZ63.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js → chunk-IA5FKNII.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JL7WZ4O2.js → chunk-IG3SWA4A.js} +33 -9
- package/dist/cli-bundle/chunks/chunk-IG3SWA4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js → chunk-IJIICKVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IGED7NH2.js → chunk-ILX33QXL.js} +668 -251
- package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UGTVWL3E.js → chunk-INU6DKT5.js} +47 -41
- package/dist/cli-bundle/chunks/chunk-INU6DKT5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UB2QYSTO.js → chunk-J5AOEGDC.js} +26 -18
- package/dist/cli-bundle/chunks/chunk-J5AOEGDC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4DY4KPQI.js → chunk-J6364LFM.js} +1330 -937
- package/dist/cli-bundle/chunks/chunk-J6364LFM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DVOLZJ3C.js → chunk-J6EY5V4N.js} +1295 -939
- package/dist/cli-bundle/chunks/chunk-J6EY5V4N.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js +1097 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js → chunk-JOUQZENX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-J4NZOP3I.js → chunk-JXQUXVMI.js} +9 -8
- package/dist/cli-bundle/chunks/chunk-JXQUXVMI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js → chunk-JYFOV7FC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js → chunk-K2X6U4UA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6OTZMORS.js → chunk-K3WII2ME.js} +27 -27
- package/dist/cli-bundle/chunks/chunk-K3WII2ME.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js → chunk-KG44YSKD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js → chunk-KPMKHGEA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QASRVKUQ.js → chunk-LPYWLWDS.js} +257 -163
- package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RGXD5JJR.js → chunk-LSG2U345.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-LSG2U345.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MIQDDLB5.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js → chunk-NLDFBC6J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js → chunk-NP22ERDF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js → chunk-NU3IMIEA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js → chunk-NVPZIJVR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js → chunk-ODALILG3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CDJYP7OQ.js → chunk-ONG5V5CI.js} +190 -63
- package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js → chunk-ONREO4ST.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js +61 -0
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js → chunk-P74IZQ7A.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js +172 -0
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js → chunk-PGY23YTC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js → chunk-PMOSXADO.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-PNTULOGU.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js → chunk-Q7A43DS4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js → chunk-QEHQ2GVG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js → chunk-QIPLHNP7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js → chunk-QKECXBBG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js.map → chunk-QKECXBBG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js → chunk-QKJGPFAF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F7PSHRNO.js → chunk-QKXHFPYM.js} +27 -10
- package/dist/cli-bundle/chunks/chunk-QKXHFPYM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js → chunk-RLCHOOHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js → chunk-RMLWNPH2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js → chunk-RRM5JYJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js → chunk-S6MQESFR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js → chunk-SDQLJWBO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js → chunk-SELVXEZK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DYEX6NFH.js → chunk-TD3LVC7D.js} +438 -23
- package/dist/cli-bundle/chunks/chunk-TD3LVC7D.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js → chunk-TKOVBP6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js → chunk-TQSZFPIS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js → chunk-TSMHDIW4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js → chunk-UFXU44HV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js → chunk-ULTHRDBP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js → chunk-UMOPHQSU.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js.map → chunk-UMOPHQSU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js → chunk-UOHFKBUV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PHKP3AGR.js → chunk-UWQHLMEB.js} +35 -18
- package/dist/cli-bundle/chunks/chunk-UWQHLMEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6TTOHMTB.js → chunk-UXONS674.js} +45 -112
- package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js → chunk-UY2ACEMF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6PKA3SJQ.js → chunk-WQPUU7XD.js} +19 -28
- package/dist/cli-bundle/chunks/chunk-WQPUU7XD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7TQMR6LK.js → chunk-WT3ZEOGH.js} +70 -20
- package/dist/cli-bundle/chunks/chunk-WT3ZEOGH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js → chunk-WUJQK4YV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js → chunk-XSJUSQAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MHSBDGD.js → chunk-XXXF6PAQ.js} +50 -117
- package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js → chunk-YAQEBNY7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7QDSYUMF.js → chunk-YAROI3PD.js} +44 -21
- package/dist/cli-bundle/chunks/chunk-YAROI3PD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js → chunk-YBLZ2VE7.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js → chunk-YCQET3OT.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YUSOJDWM.js +9 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +58 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js → chunk-ZI6VQWQ7.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +68 -0
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-LZECOMHO.js → close-CWODTPKG.js} +5 -5
- package/dist/cli-bundle/chunks/close-W6LI2PKM.js +12 -0
- package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js → close-many-CQFUY7MR.js} +15 -13
- package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +23 -0
- package/dist/cli-bundle/chunks/comments-E3TNTK24.js +13 -0
- package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js → comments-WGLHR7LB.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js → copy-LXVDXH7B.js} +4 -4
- package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +9 -0
- package/dist/cli-bundle/chunks/{create-F53OBTOU.js → create-J5U6ND4K.js} +9 -9
- package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js → create-LBVCYMEG.js} +9 -9
- package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js → delete-PMJBNY5G.js} +4 -4
- package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +10 -0
- package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js → deps-JZ7TMVCB.js} +7 -4
- package/dist/cli-bundle/chunks/{deps-U57I7EAK.js → deps-OA26IS25.js} +7 -4
- package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js → docs-FEWB2DQB.js} +6 -6
- package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +14 -0
- package/dist/cli-bundle/chunks/{files-TBZD7V6H.js → files-6YFBJRBG.js} +6 -6
- package/dist/cli-bundle/chunks/{files-TTY6N2AV.js → files-EFIWKFTM.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js → focus-4QJR7FOQ.js} +5 -5
- package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js → history-compact-CKRPDTJN.js} +6 -10
- package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +16 -0
- package/dist/cli-bundle/chunks/history-redact-BB3TGDAE.js +15 -0
- package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js → history-redact-D225BHOZ.js} +5 -6
- package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js → history-repair-RQXKQHL4.js} +6 -8
- package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js → learnings-JLNLCOL5.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +13 -0
- package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +13 -0
- package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js → notes-GB47XXQQ.js} +7 -7
- package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +24 -0
- package/dist/cli-bundle/chunks/{plan-2NNEO46V.js → plan-VDCJ2PCN.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js → profile-FAU7NZML.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-U725ATWZ.js → profile-IVXQEL3D.js} +10 -10
- package/dist/cli-bundle/chunks/{register-list-query-BUWCYHBT.js → register-list-query-DKA3EH5D.js} +22 -19
- package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-KTZ6AGE7.js → register-list-query-UL4UKBBN.js} +23 -20
- package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js → register-mutation-ARFHRW55.js} +36 -32
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js.map → register-mutation-ARFHRW55.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-4FMGJJF7.js → register-mutation-RBBJ52DK.js} +37 -33
- package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js → register-operations-ZIBBRSED.js} +41 -39
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js.map → register-operations-ZIBBRSED.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js → register-operations-ZUJ5JWPE.js} +39 -37
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js.map → register-operations-ZUJ5JWPE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js → register-setup-BCVLFEYS.js} +29 -17
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js.map → register-setup-BCVLFEYS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js → register-setup-TDCGWIOS.js} +19 -18
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js.map → register-setup-TDCGWIOS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js → restore-25DLT2Q2.js} +6 -6
- package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +14 -0
- package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js → schema-FNU3WE4O.js} +7 -6
- package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js → schema-NBCM3RAD.js} +7 -6
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js +21 -0
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-Q3UCILNR.js → update-XHSIAIXE.js} +12 -12
- package/dist/cli-bundle/chunks/update-XHSIAIXE.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +32 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +36 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js.map +1 -0
- package/dist/cli-bundle/main.js +826 -43
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/cli-bundle/sdk-runtime.js +70 -57
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +876 -74
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/history/projection.d.ts +39 -0
- package/dist/core/history/projection.js +164 -0
- package/dist/core/history/projection.js.map +1 -0
- package/dist/core/history/read.d.ts +3 -0
- package/dist/core/history/read.js +55 -0
- package/dist/core/history/read.js.map +1 -0
- package/dist/core/output/output-control.d.ts +18 -0
- package/dist/core/output/output-control.js +26 -0
- package/dist/core/output/output-control.js.map +1 -0
- package/dist/core/output/output.js +20 -8
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/sentry/helpers.js +10 -2
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/errors.d.ts +11 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/tool-definitions.js +5 -5
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/author-attribution.d.ts +35 -0
- package/dist/sdk/author-attribution.js +118 -0
- package/dist/sdk/author-attribution.js.map +1 -0
- package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -0
- package/dist/sdk/cli-contracts/command-aliases.js +17 -0
- package/dist/sdk/cli-contracts/command-aliases.js.map +1 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +6 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +21 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +3 -3
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +3 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/cli-program.d.ts +8 -0
- package/dist/sdk/cli-program.js +39 -0
- package/dist/sdk/cli-program.js.map +1 -0
- package/dist/sdk/command-line.d.ts +11 -0
- package/dist/sdk/command-line.js +40 -0
- package/dist/sdk/command-line.js.map +1 -0
- package/dist/sdk/config.d.ts +163 -0
- package/dist/sdk/config.js +1087 -0
- package/dist/sdk/config.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +21 -0
- package/dist/sdk/context-relevance.js +70 -2
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/dependencies.d.ts +15 -2
- package/dist/sdk/dependencies.js +97 -8
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.d.ts +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.js +12 -12
- package/dist/sdk/extension/bundled-catalog.js.map +1 -0
- package/dist/sdk/extension/concurrency.d.ts +7 -0
- package/dist/sdk/extension/concurrency.js +26 -0
- package/dist/sdk/extension/concurrency.js.map +1 -0
- package/dist/sdk/extension/describe.d.ts +91 -0
- package/dist/sdk/extension/describe.js +144 -0
- package/dist/sdk/extension/describe.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/doctor.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/doctor.js +7 -7
- package/dist/sdk/extension/doctor.js.map +1 -0
- package/dist/sdk/extension/install-runtime.d.ts +26 -0
- package/dist/sdk/extension/install-runtime.js +269 -0
- package/dist/sdk/extension/install-runtime.js.map +1 -0
- package/dist/sdk/extension/install-snapshot.d.ts +23 -0
- package/dist/sdk/extension/install-snapshot.js +66 -0
- package/dist/sdk/extension/install-snapshot.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/install-sources.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/install-sources.js +15 -12
- package/dist/sdk/extension/install-sources.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/managed-state.js +6 -6
- package/dist/sdk/extension/managed-state.js.map +1 -0
- package/dist/sdk/extension/scaffold.d.ts +36 -0
- package/dist/sdk/extension/scaffold.js +2436 -0
- package/dist/sdk/extension/scaffold.js.map +1 -0
- package/dist/sdk/extension/shared.d.ts +28 -0
- package/dist/sdk/extension/shared.js +140 -0
- package/dist/sdk/extension/shared.js.map +1 -0
- package/dist/sdk/extension/update-check.d.ts +15 -0
- package/dist/sdk/extension/update-check.js +68 -0
- package/dist/sdk/extension/update-check.js.map +1 -0
- package/dist/sdk/extension.d.ts +367 -0
- package/dist/sdk/extension.js +2174 -0
- package/dist/sdk/extension.js.map +1 -0
- package/dist/sdk/governance/gc.d.ts +56 -0
- package/dist/sdk/governance/gc.js +276 -0
- package/dist/sdk/governance/gc.js.map +1 -0
- package/dist/sdk/governance/health.d.ts +187 -0
- package/dist/sdk/governance/health.js +1796 -0
- package/dist/sdk/governance/health.js.map +1 -0
- package/dist/sdk/governance/validate.d.ts +255 -0
- package/dist/sdk/governance/validate.js +2175 -0
- package/dist/sdk/governance/validate.js.map +1 -0
- package/dist/sdk/history-compact.d.ts +142 -0
- package/dist/sdk/history-compact.js +508 -0
- package/dist/sdk/history-compact.js.map +1 -0
- package/dist/sdk/history-mcp.d.ts +17 -0
- package/dist/sdk/history-mcp.js +68 -0
- package/dist/sdk/history-mcp.js.map +1 -0
- package/dist/sdk/history-read.d.ts +31 -0
- package/dist/sdk/history-read.js +58 -0
- package/dist/sdk/history-read.js.map +1 -0
- package/dist/sdk/history-redact.d.ts +120 -0
- package/dist/sdk/history-redact.js +577 -0
- package/dist/sdk/history-redact.js.map +1 -0
- package/dist/sdk/history-repair.d.ts +89 -0
- package/dist/sdk/history-repair.js +263 -0
- package/dist/sdk/history-repair.js.map +1 -0
- package/dist/sdk/index.d.ts +25 -1
- package/dist/sdk/index.js +27 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/init-agent-guidance.d.ts +113 -0
- package/dist/sdk/init-agent-guidance.js +437 -0
- package/dist/sdk/init-agent-guidance.js.map +1 -0
- package/dist/sdk/init.d.ts +186 -0
- package/dist/sdk/init.js +733 -0
- package/dist/sdk/init.js.map +1 -0
- package/dist/sdk/invocation-author.d.ts +2 -0
- package/dist/sdk/invocation-author.js +39 -0
- package/dist/sdk/invocation-author.js.map +1 -0
- package/dist/sdk/item-children.d.ts +45 -0
- package/dist/sdk/item-children.js +75 -0
- package/dist/sdk/item-children.js.map +1 -0
- package/dist/sdk/item-schedule.d.ts +26 -0
- package/dist/sdk/item-schedule.js +28 -0
- package/dist/sdk/item-schedule.js.map +1 -0
- package/dist/sdk/output.d.ts +7 -0
- package/dist/sdk/output.js +11 -0
- package/dist/sdk/output.js.map +1 -0
- package/dist/sdk/pagination.d.ts +4 -1
- package/dist/sdk/pagination.js +13 -5
- package/dist/sdk/pagination.js.map +1 -1
- package/dist/sdk/profile.d.ts +176 -0
- package/dist/sdk/profile.js +431 -0
- package/dist/sdk/profile.js.map +1 -0
- package/dist/sdk/relationship-analytics.d.ts +108 -0
- package/dist/sdk/relationship-analytics.js +292 -0
- package/dist/sdk/relationship-analytics.js.map +1 -0
- package/dist/sdk/relationship-context.d.ts +67 -0
- package/dist/sdk/relationship-context.js +207 -0
- package/dist/sdk/relationship-context.js.map +1 -0
- package/dist/sdk/relationship-history.d.ts +109 -0
- package/dist/sdk/relationship-history.js +401 -0
- package/dist/sdk/relationship-history.js.map +1 -0
- package/dist/sdk/relationships.d.ts +145 -0
- package/dist/sdk/relationships.js +551 -0
- package/dist/sdk/relationships.js.map +1 -0
- package/dist/sdk/runtime-input.d.ts +10 -0
- package/dist/sdk/runtime-input.js +60 -0
- package/dist/sdk/runtime-input.js.map +1 -0
- package/dist/sdk/runtime.d.ts +31 -8
- package/dist/sdk/runtime.js +61 -57
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/schema.d.ts +507 -0
- package/dist/sdk/schema.js +1269 -0
- package/dist/sdk/schema.js.map +1 -0
- package/dist/{cli/commands → sdk}/templates.d.ts +1 -1
- package/dist/{cli/commands → sdk}/templates.js +9 -9
- package/dist/sdk/templates.js.map +1 -0
- package/dist/{cli/commands → sdk}/test/linked-command-detection.d.ts +10 -2
- package/dist/sdk/test/linked-command-detection.js +525 -0
- package/dist/sdk/test/linked-command-detection.js.map +1 -0
- package/docs/COMMANDS.md +58 -40
- package/docs/EXTENSIONS.md +10 -1
- package/docs/RELATIONSHIP_GRAPH.md +113 -0
- package/docs/RELEASING.md +2 -0
- package/docs/SDK.md +156 -9
- package/docs/SDK_CUSTOMIZATION_PRIMITIVES.md +79 -0
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +76 -16
- package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +8 -0
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/bundle-cli.mjs +66 -23
- package/dist/cli/commands/extension/bundled-catalog.js.map +0 -1
- package/dist/cli/commands/extension/doctor.js.map +0 -1
- package/dist/cli/commands/extension/install-sources.js.map +0 -1
- package/dist/cli/commands/extension/managed-state.js.map +0 -1
- package/dist/cli/commands/templates.js.map +0 -1
- package/dist/cli/commands/test/linked-command-detection.js +0 -248
- package/dist/cli/commands/test/linked-command-detection.js.map +0 -1
- package/dist/cli-bundle/chunks/append-DYQWQK2J.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js +0 -530
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2QIQGYPW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4DY4KPQI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js +0 -554
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CT5BW6E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6MHSBDGD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6OTZMORS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6PKA3SJQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6TTOHMTB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7QDSYUMF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7TQMR6LK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js +0 -312
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js +0 -858
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DVOLZJ3C.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DYEX6NFH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F7PSHRNO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js +0 -875
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FTQLW4JD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IA3YFTXT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J4NZOP3I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JL7WZ4O2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js +0 -309
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N3CMP4NI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PHKP3AGR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q37E63AM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGXD5JJR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UB2QYSTO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UGTVWL3E.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZAYYDNB3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZUKSZVBW.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RI4JQQHU.js +0 -12
- package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +0 -21
- package/dist/cli-bundle/chunks/comments-35M273DN.js +0 -13
- package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +0 -9
- package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +0 -10
- package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +0 -14
- package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-M7GHYVFN.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +0 -18
- package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +0 -13
- package/dist/cli-bundle/chunks/notes-BSD53H2W.js +0 -13
- package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +0 -24
- package/dist/cli-bundle/chunks/register-list-query-BUWCYHBT.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-KTZ6AGE7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-4FMGJJF7.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-66GLMHIX.js +0 -14
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +0 -21
- package/dist/cli-bundle/chunks/update-many-75K57FS3.js +0 -34
- package/dist/cli-bundle/chunks/update-many-U42YA445.js +0 -30
- /package/dist/cli-bundle/chunks/{append-PVZJDM6J.js.map → append-OJQFUQ4T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-DYQWQK2J.js.map → append-UZVHUO74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js.map → chunk-2IFFUZLC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js.map → chunk-2JKGO6QX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js.map → chunk-2NCIPMQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js.map → chunk-2VPAVL7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js.map → chunk-2WSE6PO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js.map → chunk-34L5OT3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js.map → chunk-3AUGG2DP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js.map → chunk-3CLU2XZO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js.map → chunk-3WM75PWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js.map → chunk-5JLUII3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js.map → chunk-6N2VXVTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js.map → chunk-6S3YSUYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js.map → chunk-AHVTB5I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js.map → chunk-APRVSW2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js.map → chunk-B7PE22W6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js.map → chunk-BCOFWYW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js.map → chunk-BEP7WJA2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js.map → chunk-CRVF2JDM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js.map → chunk-DM4H7FP4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-LZECOMHO.js.map → chunk-DUT67M43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44LNIULG.js.map → chunk-DYH63FX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js.map → chunk-EAB64KLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js.map → chunk-EACOH7AU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js.map → chunk-EJEXHTY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js.map → chunk-EYLCSJAI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-655STMGA.js.map → chunk-FMBNM2EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js.map → chunk-FNSPG7MU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KB726FMH.js.map → chunk-H2Z3FYXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js.map → chunk-IA5FKNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js.map → chunk-IJIICKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js.map → chunk-JOUQZENX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js.map → chunk-JYFOV7FC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js.map → chunk-K2X6U4UA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js.map → chunk-KG44YSKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js.map → chunk-KPMKHGEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js.map → chunk-MIQDDLB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js.map → chunk-NLDFBC6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js.map → chunk-NP22ERDF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js.map → chunk-NU3IMIEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js.map → chunk-NVPZIJVR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js.map → chunk-ODALILG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js.map → chunk-ONREO4ST.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js.map → chunk-P74IZQ7A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js.map → chunk-PGY23YTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js.map → chunk-PMOSXADO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RI4JQQHU.js.map → chunk-PNTULOGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js.map → chunk-Q7A43DS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js.map → chunk-QEHQ2GVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js.map → chunk-QIPLHNP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js.map → chunk-QKJGPFAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js.map → chunk-RLCHOOHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js.map → chunk-RMLWNPH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js.map → chunk-RRM5JYJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js.map → chunk-S6MQESFR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js.map → chunk-SDQLJWBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js.map → chunk-SELVXEZK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js.map → chunk-TKOVBP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js.map → chunk-TQSZFPIS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js.map → chunk-TSMHDIW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js.map → chunk-UFXU44HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js.map → chunk-ULTHRDBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js.map → chunk-UOHFKBUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js.map → chunk-UY2ACEMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js.map → chunk-WUJQK4YV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js.map → chunk-XSJUSQAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js.map → chunk-YAQEBNY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js.map → chunk-YBLZ2VE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js.map → chunk-YCQET3OT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-LY2XJ52M.js.map → chunk-YUSOJDWM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js.map → chunk-ZI6VQWQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js.map → close-CWODTPKG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-35M273DN.js.map → close-W6LI2PKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js.map → close-many-CQFUY7MR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NPYM7M7U.js.map → close-many-DLDDVSH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-F53OBTOU.js.map → comments-E3TNTK24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js.map → comments-WGLHR7LB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js.map → copy-LXVDXH7B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ODRWJWAM.js.map → copy-Q5ZJPUKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-U57I7EAK.js.map → create-J5U6ND4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js.map → create-LBVCYMEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js.map → delete-PMJBNY5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-G7N4E2JO.js.map → delete-WNHB3LYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TTY6N2AV.js.map → deps-JZ7TMVCB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TBZD7V6H.js.map → deps-OA26IS25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js.map → docs-FEWB2DQB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-U5TRVCRS.js.map → docs-HA2AIDBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-M7GHYVFN.js.map → files-6YFBJRBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js.map → files-EFIWKFTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js.map → focus-4QJR7FOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JIHZLHDP.js.map → focus-POIW5LTJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js.map → history-compact-CKRPDTJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-NAFCHLH7.js.map → history-compact-FWG2C7FZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-SONGPSHI.js.map → history-redact-BB3TGDAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js.map → history-redact-D225BHOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-BSD53H2W.js.map → history-repair-6GEAM7HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js.map → history-repair-RQXKQHL4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-2NNEO46V.js.map → learnings-JLNLCOL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-AWLYGBNV.js.map → learnings-RSNLSWDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-U725ATWZ.js.map → notes-2WDH6DXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js.map → notes-GB47XXQQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-66GLMHIX.js.map → plan-DOVI2VMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js.map → plan-VDCJ2PCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js.map → profile-FAU7NZML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js.map → profile-IVXQEL3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-Q3UCILNR.js.map → restore-25DLT2Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2XGHIVQ2.js.map → restore-YPMVUUEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-75K57FS3.js.map → schema-FNU3WE4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-U42YA445.js.map → schema-NBCM3RAD.js.map} +0 -0
- /package/dist/{cli/commands → sdk}/extension/managed-state.d.ts +0 -0
package/docs/SDK.md
CHANGED
|
@@ -38,6 +38,13 @@ Source of truth:
|
|
|
38
38
|
- [`src/sdk/files.ts`](../src/sdk/files.ts)
|
|
39
39
|
- [`src/sdk/docs.ts`](../src/sdk/docs.ts)
|
|
40
40
|
- [`src/sdk/dependencies.ts`](../src/sdk/dependencies.ts)
|
|
41
|
+
- [`src/sdk/schema.ts`](../src/sdk/schema.ts)
|
|
42
|
+
- [`src/sdk/relationships.ts`](../src/sdk/relationships.ts)
|
|
43
|
+
- [`src/sdk/relationship-history.ts`](../src/sdk/relationship-history.ts)
|
|
44
|
+
- [`src/sdk/relationship-context.ts`](../src/sdk/relationship-context.ts)
|
|
45
|
+
- [`src/sdk/governance/validate.ts`](../src/sdk/governance/validate.ts)
|
|
46
|
+
- [`src/sdk/governance/health.ts`](../src/sdk/governance/health.ts)
|
|
47
|
+
- [`src/sdk/governance/gc.ts`](../src/sdk/governance/gc.ts)
|
|
41
48
|
- [`src/sdk/cli-contracts.ts`](../src/sdk/cli-contracts.ts)
|
|
42
49
|
- [`src/sdk/cli-contracts/commander-types.ts`](../src/sdk/cli-contracts/commander-types.ts)
|
|
43
50
|
- [`src/sdk/cli-contracts/commander-mutation-options.ts`](../src/sdk/cli-contracts/commander-mutation-options.ts)
|
|
@@ -65,6 +72,9 @@ Common authoring exports:
|
|
|
65
72
|
- `PM_CLI_EXPECTED_ERROR_NAME`
|
|
66
73
|
- `createPmCliExpectedError`
|
|
67
74
|
- `isPmCliExpectedError`
|
|
75
|
+
- `suppressHostOutput` / `isHostOutputSuppressed` / `SUPPRESS_HOST_OUTPUT_MARKER`
|
|
76
|
+
for extension commands that already wrote streaming, binary, or otherwise
|
|
77
|
+
pre-rendered output and must prevent a second host render
|
|
68
78
|
|
|
69
79
|
Registration builders (`define*`, zero-cost identity — see [Authoring Builders](#authoring-builders)):
|
|
70
80
|
|
|
@@ -110,9 +120,9 @@ Storage format-version exports (under `@unbrained/pm-cli/sdk/runtime`):
|
|
|
110
120
|
Command/action contract exports:
|
|
111
121
|
|
|
112
122
|
- `PmClient` / `runAction` (high-level in-process action execution for custom tools, bots, CI, and embedded runtimes)
|
|
113
|
-
- Typed read primitives on `PmClient`: `get
|
|
123
|
+
- Typed read primitives on `PmClient`: `get` (including `GetOptions.at` point-in-time reads), `list`, `search`, `context`, `next`, `aggregate`, and `stats`; direct `getItemAt` reconstructs a canonical historical document without mutation
|
|
114
124
|
- Read primitive option/result contracts: `GetOptions` / `GetResult`, `ListOptions` / `ListResult`, `SearchOptions` / `SearchResult`, `ContextOptions` / `ContextResult`, `NextOptions` / `NextResult`, `AggregateOptions` / `AggregateResult`, `StatsCommandOptions` / `StatsResult`
|
|
115
|
-
- Context relevance primitives: `defaultScoreContextCandidates`, `scoreContextCandidates`, `scoreContextCandidatesWithActiveExtensions`, `evaluateContextRanking`, `runContextEvaluationScenario`, `runContextEvaluationCorpus`, and `summarizeContextEvaluationReports`
|
|
125
|
+
- Context relevance primitives: `buildItemContextRelevanceCandidates`, `defaultScoreContextCandidates`, `scoreContextCandidates`, `scoreContextCandidatesWithActiveExtensions`, `evaluateContextRanking`, `runContextEvaluationScenario`, `runContextEvaluationCorpus`, and `summarizeContextEvaluationReports`
|
|
116
126
|
- Context relevance contracts: `ContextRelevanceCandidate`, `ContextRelevanceSignals`, `ContextRelevanceScorer`, `ContextRelevanceReport`, `ContextEvaluationReader`, `ContextEvaluationScenario`, `ContextEvaluationScenarioReport`, `ContextEvaluationThresholds`, and `ContextEvaluationCorpusReport`
|
|
117
127
|
- Context packing and feedback primitives: `packContextCandidates`, `recordContextUsageServing`, `recordContextUsageTouch`, `recordContextUsageTouches`, and `readContextUsageAffinity`
|
|
118
128
|
- Typed annotation and relationship primitives on `PmClient`: `comments`, `notes`, `learnings`, `files`, `filesDiscover`, `docs`, `deps`, and `append`
|
|
@@ -120,11 +130,13 @@ Command/action contract exports:
|
|
|
120
130
|
- Annotation kernel primitives: `resolveAnnotationInput`, `runAnnotationCommand`, `resolveAnnotationIndex`, `parseAnnotationTextInput`, `limitAnnotationEntries`, `readAnnotationEntries`, `wrapOwnershipConflict`, `isErrnoError`, and their typed input/config/result contracts
|
|
121
131
|
- Linked-resource kernel primitives: `runFiles`, `runFilesDiscover`, `runDocs`, `runDeps`, `runLinkedArtifacts`, parsing/normalization/path-validation helpers, and their typed contracts. The CLI files/docs/deps modules are presentation-only re-exports of these SDK implementations.
|
|
122
132
|
- Dependency-governance primitive: `collectDanglingDependencyReferences` partitions missing targets into actionable active holders, informational terminal-history holders, and the legacy `no-active-blocker` sentinel without mutating stored history.
|
|
133
|
+
- Relationship graph primitives: `RelationshipKindRegistry`, `createRelationshipKindRegistry`, `RelationshipGraph`, `RelationshipEventLog`, `RelationshipEventStore`, `buildRelationshipContext`, `buildDepsRelationshipContext`, `isOrderingRelationshipKind`, and `dependencyToRelationship` provide application-defined edge semantics, durable replay, and bounded adjacency, closure, reverse-impact, shortest-path, induced-subgraph, and explainable context queries. See [Relationship graph semantics](RELATIONSHIP_GRAPH.md).
|
|
123
134
|
- Typed customization primitives on `PmClient`: `init`, `config`, `schema`, `schemaList`, `schemaShow`, `schemaAddType`, `schemaRemoveType`, `schemaAddStatus`, `schemaRemoveStatus`, `schemaAddField`, `schemaRemoveField`, `schemaListFields`, `schemaShowField`, `schemaApplyPreset`, `schemaInferTypes`, `schemaShowStatus`, `profile`, `profileList`, `profileShow`, `profileApply`, and `profileLint`
|
|
124
135
|
- Workspace-scaffold primitives: `ensurePmGitignore` and `getPmGitignoreBlock` let custom tools apply the same idempotent runtime/search cache policy as `pm init` without importing CLI internals.
|
|
125
136
|
- Customization primitive option/result contracts: `InitCommandOptions` / `InitResult`, `ConfigCommandOptions` / `ConfigResult`, `SchemaSubcommand` / `SchemaResult` / `SchemaInspectResult`, `SchemaListResult`, `SchemaShowResult`, `SchemaAddTypeResult`, `SchemaRemoveTypeResult`, `SchemaAddStatusResult`, `SchemaRemoveStatusResult`, `SchemaAddFieldResult`, `SchemaRemoveFieldResult`, `SchemaListFieldsResult`, `SchemaShowFieldResult`, `SchemaApplyPresetResult`, `SchemaAddTypeInferResult`, `SchemaShowStatusResult`, `ProfileSubcommand` / `ProfileResult`, `ProfileListResult`, `ProfileShowResult`, `ProfileApplyResult`, `ProfileLintResult`
|
|
126
|
-
- Typed governance and maintenance primitives on `PmClient`: `validate`, `health`, and `
|
|
127
|
-
- Governance and maintenance option/result contracts: `ValidateCommandOptions` / `ValidateResult`, `RunHealthOptions` / `HealthResult`, `GcCommandOptions` / `GcResult`
|
|
137
|
+
- Typed governance and maintenance primitives on `PmClient`: `validate`, `health`, `gc`, `historyRedact`, `historyRepair`, `historyRepairAll`, `historyCompact`, and `historyCompactBulk`
|
|
138
|
+
- Governance and maintenance option/result contracts: `ValidateCommandOptions` / `ValidateResult`, `RunHealthOptions` / `HealthResult`, `GcCommandOptions` / `GcResult`, `HistoryRedactCommandOptions` / `HistoryRedactResult`, `HistoryRepairCommandOptions` / `HistoryRepairResult` / `HistoryRepairAllResult`, and `HistoryCompactCommandOptions` / `HistoryCompactResult` / `HistoryCompactBulkCommandOptions` / `HistoryCompactBulkResult`
|
|
139
|
+
- Direct governance engines: `runValidate`, `runHealth`, and `runGc` are public SDK exports used by the CLI compatibility adapters and by custom policy engines that already own `GlobalOptions`. Their structured results are identical to CLI JSON output; no shell process or private core import is required.
|
|
128
140
|
- Typed plan workflow primitives on `PmClient`: `plan`, `planCreate`, `planShow`, `planAddStep`, `planUpdateStep`, `planCompleteStep`, `planBlockStep`, `planReorderStep`, `planRemoveStep`, `planLink`, `planUnlink`, `planDecision`, `planDiscovery`, `planValidation`, `planResume`, `planApprove`, and `planMaterialize`
|
|
129
141
|
- Plan contracts: `PlanSubcommand`, `PlanCommandOptions`, `PlanCommandResult`, `PlanResultPlan`, `PlanStepSummary`, `PlanShowDepth`, and `PlanTemplateName`
|
|
130
142
|
- Typed package and extension lifecycle primitives on `PmClient`: `extension`, `extensionList`, `extensionActivate`, `extensionDeactivate`, `package`, `packageList`, `packageInstall`, `packageUninstall`, `packageDoctor`, `packageManage`, `packageDescribe`, `packageReload`, `packageCatalog`, `packageActivate`, `packageDeactivate`, and `upgrade`
|
|
@@ -164,6 +176,84 @@ const result = await pm.planMaterialize(created.plan.id, {
|
|
|
164
176
|
|
|
165
177
|
`field` is repeatable and forwards `name=value` pairs through normal schema-aware create validation for every materialized child. Required-on-create fields remain mandatory. Each `materialized` entry includes `id`, `title`, `type`, `parent`, `tags`, and `from_step`, so an agent can confirm the created work without extra `get` calls.
|
|
166
178
|
|
|
179
|
+
### Immutable history and rich item reads
|
|
180
|
+
|
|
181
|
+
Tracked: [pm-4a7m](../.agents/pm/features/pm-4a7m.toon),
|
|
182
|
+
[pm-hib1](../.agents/pm/features/pm-hib1.toon),
|
|
183
|
+
[pm-y4z5](../.agents/pm/issues/pm-y4z5.toon), and
|
|
184
|
+
[pm-x1g5](../.agents/pm/issues/pm-x1g5.toon).
|
|
185
|
+
|
|
186
|
+
History rewrite ownership lives in the SDK. The CLI `history-redact`,
|
|
187
|
+
`history-repair`, and `history-compact` modules are thin compatibility shims
|
|
188
|
+
over `runHistoryRedact`, `runHistoryRepair` / `runHistoryRepairAll`, and
|
|
189
|
+
`runHistoryCompact` / `runHistoryCompactBulk`. Applications normally use the
|
|
190
|
+
typed `PmClient` methods (or matching top-level `historyRedact`,
|
|
191
|
+
`historyRepair`, `historyRepairAll`, `historyCompact`, and
|
|
192
|
+
`historyCompactBulk` helpers), while package authors can call the `run*`
|
|
193
|
+
primitives when they already own `GlobalOptions`.
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
import { PmClient, getItemAt } from "@unbrained/pm-cli/sdk";
|
|
197
|
+
|
|
198
|
+
const pm = new PmClient({ pmRoot, author: "records-agent" });
|
|
199
|
+
|
|
200
|
+
// Normal get projection, reconstructed at a one-based version.
|
|
201
|
+
const historical = await pm.get(itemId, {
|
|
202
|
+
at: "7",
|
|
203
|
+
fields: "id,title,status,body",
|
|
204
|
+
});
|
|
205
|
+
// historical.reconstructed === true
|
|
206
|
+
// historical.as_of_version === 7
|
|
207
|
+
|
|
208
|
+
// Direct canonical document primitive for a custom provenance/VCS interface.
|
|
209
|
+
const snapshot = await getItemAt(itemId, "2026-07-01T12:00:00.000Z", {
|
|
210
|
+
pmRoot,
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
await pm.historyRedact(itemId, {
|
|
214
|
+
literal: ["private.example"],
|
|
215
|
+
replacement: "[redacted-host]",
|
|
216
|
+
dryRun: true,
|
|
217
|
+
});
|
|
218
|
+
await pm.historyRepairAll({ dryRun: true });
|
|
219
|
+
await pm.historyCompactBulk({
|
|
220
|
+
scope: "closed",
|
|
221
|
+
allOver: 500,
|
|
222
|
+
dryRun: true,
|
|
223
|
+
});
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
`getItemAt` and restore share `resolveHistoryTarget`, `applyHistoryPatch`, and
|
|
227
|
+
`replayHistoryToTarget`: every patch is normalized, applied strictly, and
|
|
228
|
+
checked against the recorded before/after hashes. The read primitive never
|
|
229
|
+
acquires a lock, rewrites an item, appends history, or mutates a derived index.
|
|
230
|
+
It returns the canonical `ItemDocument` plus `reconstructed`,
|
|
231
|
+
`as_of_version`, `as_of_timestamp`, normalized target metadata, and the current
|
|
232
|
+
stream length. Invalid and future targets throw `PmCliError` with a structured
|
|
233
|
+
`context.valid_range`.
|
|
234
|
+
|
|
235
|
+
The shared resolver accepts explicit caller policy: immutable reads reject
|
|
236
|
+
timestamps after the final recorded entry, while restore preserves
|
|
237
|
+
latest-entry-at-or-before semantics so a current wall-clock timestamp restores
|
|
238
|
+
the latest available state. Restore also retains command-specific diagnostics.
|
|
239
|
+
|
|
240
|
+
Generic reads also expose two composable SDK facets:
|
|
241
|
+
|
|
242
|
+
- `buildItemSchedule` normalizes deadlines, reminders, and events into a stable
|
|
243
|
+
schedule projection with convenient earliest-event `start_at`, `end_at`, and
|
|
244
|
+
`location` aliases. `pm get` includes it at standard/deep depth and supports
|
|
245
|
+
narrow fields such as `schedule.start_at`.
|
|
246
|
+
- `buildItemChildrenRollup` accepts metadata supplied by the persistent derived
|
|
247
|
+
index or a source scan and returns type-agnostic direct-child totals, active
|
|
248
|
+
counts, status groups, a deterministic id-sorted sample, and explicit
|
|
249
|
+
truncation/continuation metadata. The primitive caps input at
|
|
250
|
+
`MAX_CHILD_PROJECTION_ITEMS` (one million) and never guesses which schema
|
|
251
|
+
types are containers.
|
|
252
|
+
|
|
253
|
+
The CLI automatically computes that workspace projection for container-oriented
|
|
254
|
+
built-ins and custom types. Built-in leaf reads stay constant-cost unless the
|
|
255
|
+
caller explicitly projects `children`; SDK consumers remain fully type-agnostic.
|
|
256
|
+
|
|
167
257
|
### Linked resources and dependency governance
|
|
168
258
|
|
|
169
259
|
Tracked: [pm-jcvg](../.agents/pm/tasks/pm-jcvg.toon),
|
|
@@ -575,7 +665,13 @@ await pm.docs(created.item.id, {
|
|
|
575
665
|
add: ["docs/SDK.md"],
|
|
576
666
|
note: "authoring reference",
|
|
577
667
|
});
|
|
578
|
-
const graph = await pm.deps(created.item.id, {
|
|
668
|
+
const graph = await pm.deps(created.item.id, {
|
|
669
|
+
format: "context",
|
|
670
|
+
maxDepth: 3,
|
|
671
|
+
nodeLimit: 20,
|
|
672
|
+
edgeLimit: 40,
|
|
673
|
+
tokenBudget: 800,
|
|
674
|
+
});
|
|
579
675
|
const types = await pm.schemaList();
|
|
580
676
|
const profiles = await pm.profileList();
|
|
581
677
|
const validation = await pm.validate({ checkResolution: true });
|
|
@@ -664,6 +760,11 @@ tools. `pm.init` stages a tracker, `pm.config` reads/writes settings,
|
|
|
664
760
|
methods list, inspect, apply, and lint project archetypes. These helpers let a
|
|
665
761
|
package or app construct an opinionated project-management experience while
|
|
666
762
|
staying on the same schema/profile primitives the CLI and MCP use.
|
|
763
|
+
The schema mutation and inspection engine is owned by `src/sdk/schema.ts`; the
|
|
764
|
+
CLI schema module is a presentation-compatible re-export. Embedded runtimes can
|
|
765
|
+
therefore compose schema operations without importing CLI code, while CLI, MCP,
|
|
766
|
+
and `PmClient` continue to share the same validation, locking, persistence, and
|
|
767
|
+
result contracts.
|
|
667
768
|
`pm.init` accepts `workspace` to initialize `<workspace>/.agents/pm`; path-target
|
|
668
769
|
calls retain tracker-root semantics. `InitResult.target` exposes the resolved
|
|
669
770
|
mode, tracker root, and optional workspace root, while every explicit-target
|
|
@@ -687,12 +788,16 @@ runtimes.
|
|
|
687
788
|
### Context relevance and evaluation
|
|
688
789
|
|
|
689
790
|
Tracked by [pm-4k6b](../.agents/pm/features/pm-4k6b.toon),
|
|
690
|
-
[pm-h3no](../.agents/pm/tasks/pm-h3no.toon),
|
|
691
|
-
[pm-atfm](../.agents/pm/features/pm-atfm.toon)
|
|
791
|
+
[pm-h3no](../.agents/pm/tasks/pm-h3no.toon),
|
|
792
|
+
[pm-atfm](../.agents/pm/features/pm-atfm.toon), and
|
|
793
|
+
[pm-qyc6](../.agents/pm/issues/pm-qyc6.toon).
|
|
692
794
|
|
|
693
795
|
`pm context` and `pm next` share the public deterministic relevance model.
|
|
694
796
|
Candidate order is the structural baseline; normalized metadata signals add
|
|
695
797
|
explainable weighted contributions. Package authors can call
|
|
798
|
+
`buildItemContextRelevanceCandidates(items, { statusRegistry, now, author,
|
|
799
|
+
semanticSimilarity })`
|
|
800
|
+
to derive the exact built-in metadata signals, then call
|
|
696
801
|
`scoreContextCandidates` with a scorer callback, while installed extensions can
|
|
697
802
|
register the governed `context_relevance` service override. A malformed or
|
|
698
803
|
throwing override degrades to the deterministic default and emits an
|
|
@@ -1085,7 +1190,9 @@ same list/default semantics as core flags:
|
|
|
1085
1190
|
(`value_type ?? type`). An unrecognized value type is rejected at registration.
|
|
1086
1191
|
- `list: true` makes a repeated, comma-joined flag accumulate into an array —
|
|
1087
1192
|
parity with core list flags such as `--tags`. `--scope a,b --scope c` resolves
|
|
1088
|
-
to `["a", "b", "c"]`, with each element coerced by `value_type`.
|
|
1193
|
+
to `["a", "b", "c"]`, with each element coerced by `value_type`. Long and
|
|
1194
|
+
short aliases share one accumulator, so `-s a --scope b,c --scope=d` preserves
|
|
1195
|
+
command-line order as `["a", "b", "c", "d"]`.
|
|
1089
1196
|
- `default` (a scalar, or an array of scalars for a `list` flag) is applied when
|
|
1090
1197
|
the flag is omitted; for a `list` flag the default is flattened into the
|
|
1091
1198
|
accumulated array exactly like a provided value — comma-joined strings (e.g.
|
|
@@ -1095,11 +1202,48 @@ same list/default semantics as core flags:
|
|
|
1095
1202
|
|
|
1096
1203
|
```ts
|
|
1097
1204
|
api.registerFlags("report", [
|
|
1098
|
-
{
|
|
1205
|
+
{
|
|
1206
|
+
long: "--scope",
|
|
1207
|
+
short: "-s",
|
|
1208
|
+
value_type: "string",
|
|
1209
|
+
list: true,
|
|
1210
|
+
default: "all",
|
|
1211
|
+
},
|
|
1099
1212
|
{ long: "--limit", value_type: "number", default: 20 },
|
|
1100
1213
|
]);
|
|
1101
1214
|
```
|
|
1102
1215
|
|
|
1216
|
+
Dynamic extension commands follow the same end-of-options contract as core
|
|
1217
|
+
commands. Put `--` before variadic content that begins with a dash or resembles a
|
|
1218
|
+
pm flag: `pm query run -- RETURN -h --json`. Everything after the separator is
|
|
1219
|
+
delivered to the registered positional arguments unchanged.
|
|
1220
|
+
|
|
1221
|
+
## Output Ownership
|
|
1222
|
+
|
|
1223
|
+
Command handlers should normally return structured data and let the host select
|
|
1224
|
+
TOON, JSON, service, or registered renderer output. A renderer override returns a
|
|
1225
|
+
string when it owns the matching payload and `null` to fall back to native
|
|
1226
|
+
rendering. When a command must write directly — for example, a streaming export,
|
|
1227
|
+
binary response, or already-rendered protocol — return `suppressHostOutput()` so
|
|
1228
|
+
the CLI does not append a second payload:
|
|
1229
|
+
|
|
1230
|
+
```ts
|
|
1231
|
+
import { suppressHostOutput } from "@unbrained/pm-cli/sdk";
|
|
1232
|
+
|
|
1233
|
+
api.registerCommand({
|
|
1234
|
+
name: "archive stream",
|
|
1235
|
+
async run() {
|
|
1236
|
+
await writeArchiveToStdout();
|
|
1237
|
+
return suppressHostOutput({ records: 42 });
|
|
1238
|
+
},
|
|
1239
|
+
});
|
|
1240
|
+
```
|
|
1241
|
+
|
|
1242
|
+
The optional structured result remains available to command-result hooks,
|
|
1243
|
+
telemetry, and embedded hosts, while the CLI writes no host-rendered output. The
|
|
1244
|
+
marker is structural rather than identity-based, so separately installed
|
|
1245
|
+
packages and custom SDK-built hosts can exchange it safely.
|
|
1246
|
+
|
|
1103
1247
|
`registerItemFields` validates each declared field `type` against the canonical
|
|
1104
1248
|
coercion kinds (`string`, `number`, `boolean`, `array`, `object`) at activation.
|
|
1105
1249
|
A typo fails activation with a did-you-mean hint (e.g. `type: "strnig"` →
|
|
@@ -2104,6 +2248,9 @@ Treat `recovery.suggested_retry` as the first-choice deterministic replay comman
|
|
|
2104
2248
|
|
|
2105
2249
|
- Keep handlers deterministic and JSON-like.
|
|
2106
2250
|
- Return data, not pre-rendered terminal text, unless implementing a renderer or output service.
|
|
2251
|
+
- After directly writing streaming, binary, or pre-rendered output, return
|
|
2252
|
+
`suppressHostOutput()` to make output ownership explicit and prevent duplicate
|
|
2253
|
+
CLI rendering.
|
|
2107
2254
|
- Keep service, renderer, and preflight overrides narrow. For `output_format`, return `context.payload`, `null`, or `undefined` for unrelated commands; for renderers, return `null` when the payload should fall back to native rendering.
|
|
2108
2255
|
- Declare only capabilities in use.
|
|
2109
2256
|
- Set `pm_min_version` when the package requires SDK or runtime behavior added after older pm releases.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# SDK Customization Primitives
|
|
2
|
+
|
|
3
|
+
Tracked by [pm-3mna](../.agents/pm/features/pm-3mna.toon),
|
|
4
|
+
[pm-cpja](../.agents/pm/features/pm-cpja.toon), and
|
|
5
|
+
[pm-9x6e](../.agents/pm/tasks/pm-9x6e.toon).
|
|
6
|
+
|
|
7
|
+
The SDK owns the configuration, project-profile, initialization, and agent-guidance engines used by the CLI. Package authors and embedded hosts can therefore compose those command families without spawning `pm` or importing their presentation adapters. Initialization still delegates optional bundled-package installation to the extension subsystem, so `runInit({ withPackages: true })` preserves the CLI's package lifecycle rather than duplicating it.
|
|
8
|
+
|
|
9
|
+
## Public primitives
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import {
|
|
13
|
+
applyInvocationAuthorOverride,
|
|
14
|
+
createPmCliProgram,
|
|
15
|
+
runConfig,
|
|
16
|
+
runInit,
|
|
17
|
+
runInitAgentGuidance,
|
|
18
|
+
runProfileApply,
|
|
19
|
+
runProfileLint,
|
|
20
|
+
runProfileList,
|
|
21
|
+
runProfileShow,
|
|
22
|
+
scanHistoryAuthorAttribution,
|
|
23
|
+
} from "@unbrained/pm-cli/sdk";
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The barrel also exports the corresponding option and result contracts, including `ConfigCommandOptions`, `ConfigResult`, `InitCommandOptions`, `InitResult`, `InitAgentGuidanceSummary`, `ProfileApplyCommandOptions`, and each profile result variant. The legacy `src/cli/commands/*` paths are compatibility re-exports; new integrations should use the SDK entrypoint.
|
|
27
|
+
|
|
28
|
+
`createPmCliProgram(version)` creates a fresh Commander root with pm's universal global contract. It is suitable for embedded hosts that need the standard output, path, extension, profiling, and author flags before registering custom command families.
|
|
29
|
+
|
|
30
|
+
## Invocation-wide author attribution
|
|
31
|
+
|
|
32
|
+
Every command accepts a root-level author override:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pm --author release-agent create --title "Prepare release" --type Task
|
|
36
|
+
pm update <id> --author review-agent --message "Address review feedback"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The override applies to every mutation performed during that invocation, including nested SDK-backed operations and extension hooks. Embedded hosts can use `applyInvocationAuthorOverride(author)` and call the returned idempotent restore function in `finally`; this prevents one request's identity from leaking into the next request in a long-lived process.
|
|
40
|
+
|
|
41
|
+
Author precedence is:
|
|
42
|
+
|
|
43
|
+
1. explicit command or invocation `--author`;
|
|
44
|
+
2. `PM_AUTHOR`;
|
|
45
|
+
3. project `author_default`;
|
|
46
|
+
4. command-specific safe fallback.
|
|
47
|
+
|
|
48
|
+
New trackers persist a non-empty `author_default`. `pm init --author <id>` and `PM_AUTHOR` take precedence; otherwise init derives a stable local `username@hostname` identity. Existing projects can configure the value without editing storage:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pm config project set author_default stable-agent-id
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`scanHistoryAuthorAttribution(pmRoot)` reports missing or literal `unknown` authors in readable JSONL history streams with bounded samples. `pm health` and `pm validate` surface the same condition as an advisory warning. They never rewrite append-only history; remediation configures attribution for future mutations.
|
|
55
|
+
|
|
56
|
+
## Custom initialization and profiles
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { runInit, runProfileApply } from "@unbrained/pm-cli/sdk";
|
|
60
|
+
|
|
61
|
+
await runInit(
|
|
62
|
+
undefined,
|
|
63
|
+
{ path: pmRoot },
|
|
64
|
+
{
|
|
65
|
+
defaults: true,
|
|
66
|
+
author: "bootstrap-agent",
|
|
67
|
+
typePreset: "ops",
|
|
68
|
+
agentGuidance: "add",
|
|
69
|
+
},
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
await runProfileApply("ops", { author: "profile-agent" }, { path: pmRoot });
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
These calls use the same schema scaffolding, settings validation, locks, hooks, templates, workspace cache policy, and deterministic result envelopes as their CLI equivalents. `runConfig` likewise exposes typed project/global get, set, list, and export behavior, while the profile read primitives let custom tools inspect catalog composition and lint extension-contributed profiles before applying them.
|
|
76
|
+
|
|
77
|
+
## Import-boundary guarantee
|
|
78
|
+
|
|
79
|
+
The CLI modules for config, init, init-agent-guidance, and profile contain compatibility exports only. The static quality gate removes their former private-core import allowances from the committed boundary baseline, so future presentation-layer logic cannot silently grow back into those command paths.
|
package/marketplace.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "2026.7.
|
|
9
|
+
"version": "2026.7.16"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
15
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
-
"version": "2026.7.
|
|
16
|
+
"version": "2026.7.16",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-cli",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.16",
|
|
4
4
|
"description": "Git-native project management CLI for humans and agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.10.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"lint:complexity:baseline": "eslint . --suppress-rule complexity --suppress-rule sonarjs/cognitive-complexity",
|
|
81
81
|
"lint:duplicates": "jscpd --config .jscpd.json",
|
|
82
82
|
"lint:codefactor": "pnpm quality:static",
|
|
83
|
-
"quality:static": "pnpm build && node scripts/release/static-quality-gate.mjs --min-docstring-coverage
|
|
83
|
+
"quality:static": "pnpm build && node scripts/release/static-quality-gate.mjs --max-eslint-suppressions 158 --max-coverage-ignore-pragmas 477 --min-docstring-coverage 100 --min-exported-docstring-coverage 100 --min-member-docstring-coverage 100 && node scripts/release/audit-package-boundary.mjs && node scripts/release/token-budget-gate.mjs",
|
|
84
84
|
"quality:token-budget": "node scripts/release/token-budget-gate.mjs",
|
|
85
85
|
"quality:context-eval": "node scripts/release/context-eval-gate.mjs",
|
|
86
86
|
"quality:docs-skills": "node scripts/release/docs-skills-gate.mjs",
|
|
@@ -148,6 +148,7 @@
|
|
|
148
148
|
"fast-json-patch": "^3.1.1"
|
|
149
149
|
},
|
|
150
150
|
"devDependencies": {
|
|
151
|
+
"@codspeed/vitest-plugin": "^5.7.1",
|
|
151
152
|
"@eslint/js": "^10.0.1",
|
|
152
153
|
"@sentry/cli": "^3.6.0",
|
|
153
154
|
"@types/node": "^22.20.1",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module pm-governance-audit/runtime-utils
|
|
3
|
+
*
|
|
4
|
+
* Shared parsing, comparison, linked-artifact, and result-decoration helpers
|
|
5
|
+
* for the governance-audit extension runtime.
|
|
6
|
+
*/
|
|
1
7
|
import { EXIT_CODE, PmCliError, PmClient, type ListOptions } from "./sdk.ts";
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
blocked_reason: ["no active blocker because work is closed", "work is closed"],
|
|
5
|
-
resolution: ["closed with implementation evidence", "closed with verification evidence", "work completed and recorded", "work is closed"],
|
|
6
|
-
actual_result: ["closed and recorded", "work completed", "work completed and recorded"],
|
|
7
|
-
} as const;
|
|
8
|
-
|
|
9
|
+
/** Retain only list filters that the package-owned audit queries may forward. */
|
|
9
10
|
export function buildListQueryFilters(
|
|
10
11
|
filters: Pick<
|
|
11
12
|
ListOptions,
|
|
@@ -21,18 +22,46 @@ export function buildListQueryFilters(
|
|
|
21
22
|
| "release"
|
|
22
23
|
>,
|
|
23
24
|
): ListOptions {
|
|
24
|
-
const {
|
|
25
|
-
|
|
25
|
+
const {
|
|
26
|
+
type,
|
|
27
|
+
tag,
|
|
28
|
+
priority,
|
|
29
|
+
deadlineBefore,
|
|
30
|
+
deadlineAfter,
|
|
31
|
+
assignee,
|
|
32
|
+
assigneeFilter,
|
|
33
|
+
parent,
|
|
34
|
+
sprint,
|
|
35
|
+
release,
|
|
36
|
+
} = filters;
|
|
37
|
+
return {
|
|
38
|
+
type,
|
|
39
|
+
tag,
|
|
40
|
+
priority,
|
|
41
|
+
deadlineBefore,
|
|
42
|
+
deadlineAfter,
|
|
43
|
+
assignee,
|
|
44
|
+
assigneeFilter,
|
|
45
|
+
parent,
|
|
46
|
+
sprint,
|
|
47
|
+
release,
|
|
48
|
+
};
|
|
26
49
|
}
|
|
27
50
|
|
|
51
|
+
/** Order valid timestamps chronologically and malformed values lexicographically. */
|
|
28
52
|
export function compareTimestampStrings(left: string, right: string): number {
|
|
29
53
|
const leftMs = Date.parse(left);
|
|
30
54
|
const rightMs = Date.parse(right);
|
|
31
|
-
if (Number.isFinite(leftMs) && Number.isFinite(rightMs) && leftMs !== rightMs)
|
|
55
|
+
if (Number.isFinite(leftMs) && Number.isFinite(rightMs) && leftMs !== rightMs)
|
|
56
|
+
return leftMs - rightMs;
|
|
32
57
|
return left.localeCompare(right);
|
|
33
58
|
}
|
|
34
59
|
|
|
35
|
-
|
|
60
|
+
/** Measure set overlap between two token lists on the inclusive zero-to-one scale. */
|
|
61
|
+
export function jaccardSimilarity(
|
|
62
|
+
leftTokens: string[],
|
|
63
|
+
rightTokens: string[],
|
|
64
|
+
): number {
|
|
36
65
|
if (leftTokens.length === 0 && rightTokens.length === 0) return 1;
|
|
37
66
|
if (leftTokens.length === 0 || rightTokens.length === 0) return 0;
|
|
38
67
|
const left = new Set(leftTokens);
|
|
@@ -42,48 +71,76 @@ export function jaccardSimilarity(leftTokens: string[], rightTokens: string[]):
|
|
|
42
71
|
return intersection / new Set([...left, ...right]).size;
|
|
43
72
|
}
|
|
44
73
|
|
|
74
|
+
/** Trim, lowercase, and collapse internal whitespace for stable audit comparisons. */
|
|
45
75
|
export function normalizeLowercaseWhitespace(value: string): string {
|
|
46
76
|
return value.trim().toLowerCase().replace(/\s+/g, " ");
|
|
47
77
|
}
|
|
48
78
|
|
|
79
|
+
/** Split normalized text into non-empty lowercase ASCII alphanumeric tokens. */
|
|
49
80
|
export function tokenizeAlphaNumeric(value: string): string[] {
|
|
50
|
-
return normalizeLowercaseWhitespace(value)
|
|
81
|
+
return normalizeLowercaseWhitespace(value)
|
|
82
|
+
.split(/[^a-z0-9]+/)
|
|
83
|
+
.filter((token) => token.length > 0);
|
|
51
84
|
}
|
|
52
85
|
|
|
53
|
-
|
|
86
|
+
/** Parse an optional non-negative integer limit with package-specific error context. */
|
|
87
|
+
export function parseIntegerLimit(
|
|
88
|
+
raw: string | undefined,
|
|
89
|
+
label = "--limit",
|
|
90
|
+
): number | undefined {
|
|
54
91
|
if (raw === undefined) return undefined;
|
|
55
92
|
const parsed = Number(raw);
|
|
56
|
-
if (!Number.isInteger(parsed) || parsed < 0)
|
|
93
|
+
if (!Number.isInteger(parsed) || parsed < 0)
|
|
94
|
+
throw new PmCliError(
|
|
95
|
+
`${label} must be a non-negative integer`,
|
|
96
|
+
EXIT_CODE.USAGE,
|
|
97
|
+
);
|
|
57
98
|
return parsed;
|
|
58
99
|
}
|
|
59
100
|
|
|
101
|
+
/** Normalize an optional comma-separated value into trimmed non-empty entries. */
|
|
60
102
|
export function splitCommaList(raw: string | undefined | null): string[] {
|
|
61
103
|
if (raw == null) return [];
|
|
62
|
-
return raw
|
|
104
|
+
return raw
|
|
105
|
+
.split(",")
|
|
106
|
+
.map((entry) => entry.trim())
|
|
107
|
+
.filter(Boolean);
|
|
63
108
|
}
|
|
64
109
|
|
|
110
|
+
/** Convert thrown values to a concise message suitable for audit result envelopes. */
|
|
65
111
|
export function toErrorMessage(error: unknown): string {
|
|
66
112
|
if (error instanceof Error) return error.message.trim() || error.name;
|
|
67
113
|
return String(error);
|
|
68
114
|
}
|
|
69
115
|
|
|
70
|
-
|
|
116
|
+
/** Return trimmed non-empty text while rejecting non-string and blank values. */
|
|
117
|
+
export function toNonEmptyStringOrUndefined(
|
|
118
|
+
value: unknown,
|
|
119
|
+
): string | undefined {
|
|
71
120
|
if (typeof value !== "string") return undefined;
|
|
72
121
|
const normalized = value.trim();
|
|
73
122
|
return normalized.length > 0 ? normalized : undefined;
|
|
74
123
|
}
|
|
75
124
|
|
|
125
|
+
/** Inputs used to attribute linked paths to every item that references them. */
|
|
76
126
|
export interface LinkedArtifactAuditPayload {
|
|
127
|
+
/** Paths whose reverse-reference attribution should be reported. */
|
|
77
128
|
paths?: string[];
|
|
129
|
+
/** Item identities and linked artifacts used to build the reverse index. */
|
|
78
130
|
items?: Array<{ id: string; artifacts?: Array<{ path: string }> }>;
|
|
79
131
|
}
|
|
80
132
|
|
|
133
|
+
/** Deterministic reverse-reference summary for one linked artifact path. */
|
|
81
134
|
export interface LinkedArtifactAuditEntry {
|
|
135
|
+
/** Linked artifact path described by this summary. */
|
|
82
136
|
path: string;
|
|
137
|
+
/** Number of distinct items that reference the path. */
|
|
83
138
|
linked_by_count: number;
|
|
139
|
+
/** Sorted distinct item ids that reference the path. */
|
|
84
140
|
linked_item_ids: string[];
|
|
85
141
|
}
|
|
86
142
|
|
|
143
|
+
/** Build sorted, duplicate-free reverse attribution for requested artifact paths. */
|
|
87
144
|
export function buildLinkedArtifactAudit(
|
|
88
145
|
input: LinkedArtifactAuditPayload,
|
|
89
146
|
): LinkedArtifactAuditEntry[] {
|
|
@@ -175,7 +232,10 @@ export async function decorateGovernanceCommandResult(
|
|
|
175
232
|
const result = asRecord(payload?.result);
|
|
176
233
|
const options = payload?.options ?? {};
|
|
177
234
|
if (!payload || !result) return payload?.result;
|
|
178
|
-
const linkedArtifactResult = await decorateLinkedArtifactResult(
|
|
235
|
+
const linkedArtifactResult = await decorateLinkedArtifactResult(
|
|
236
|
+
payload,
|
|
237
|
+
result,
|
|
238
|
+
);
|
|
179
239
|
if (linkedArtifactResult) return linkedArtifactResult;
|
|
180
240
|
|
|
181
241
|
if (
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module pm-governance-audit/sdk
|
|
3
|
+
*
|
|
4
|
+
* Resolves the host pm SDK runtime and exposes the typed subset consumed by
|
|
5
|
+
* the governance-audit package without copying core command implementations.
|
|
6
|
+
*/
|
|
1
7
|
import path from "node:path";
|
|
2
8
|
import { pathToFileURL } from "node:url";
|
|
3
9
|
import type * as RuntimeSdk from "@unbrained/pm-cli/sdk/runtime";
|
|
@@ -23,6 +29,7 @@ try {
|
|
|
23
29
|
/* c8 ignore stop */
|
|
24
30
|
const runtime = loadedRuntime;
|
|
25
31
|
|
|
32
|
+
/** Host SDK values used by package-owned audit commands and runtime decorators. */
|
|
26
33
|
export const {
|
|
27
34
|
EXIT_CODE,
|
|
28
35
|
PmCliError,
|
|
@@ -47,6 +54,7 @@ export const {
|
|
|
47
54
|
runUpdate,
|
|
48
55
|
} = runtime;
|
|
49
56
|
|
|
57
|
+
/** Runtime status registry inferred from the host SDK's schema resolver. */
|
|
50
58
|
export type RuntimeStatusRegistry = ReturnType<
|
|
51
59
|
typeof resolveRuntimeStatusRegistry
|
|
52
60
|
>;
|