@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
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
scanHistoryDrift
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KG44YSKD.js";
|
|
4
4
|
import {
|
|
5
5
|
executeHistoryRewrite,
|
|
6
|
-
resolveHistorySubject,
|
|
7
|
-
writeHistoryRawWithRollback
|
|
8
|
-
} from "./chunk-DYEX6NFH.js";
|
|
9
|
-
import {
|
|
10
6
|
historyEntriesToRaw,
|
|
11
7
|
readHistoryEntries,
|
|
12
8
|
reanchorHistoryEntries,
|
|
13
9
|
replayHash,
|
|
10
|
+
resolveHistorySubject,
|
|
14
11
|
toReplayDocument,
|
|
15
|
-
verifyHistoryChain
|
|
16
|
-
|
|
12
|
+
verifyHistoryChain,
|
|
13
|
+
writeHistoryRawWithRollback
|
|
14
|
+
} from "./chunk-TD3LVC7D.js";
|
|
17
15
|
import {
|
|
18
16
|
getActiveExtensionRegistrations,
|
|
19
17
|
listAllItemMetadataWithBody,
|
|
@@ -21,7 +19,7 @@ import {
|
|
|
21
19
|
readLocatedItem,
|
|
22
20
|
readSettings,
|
|
23
21
|
runActiveOnWriteHooks
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XSJUSQAE.js";
|
|
25
23
|
import {
|
|
26
24
|
EXIT_CODE,
|
|
27
25
|
PmCliError,
|
|
@@ -30,14 +28,14 @@ import {
|
|
|
30
28
|
readFileIfExists,
|
|
31
29
|
resolveItemTypeRegistry,
|
|
32
30
|
resolvePmRoot
|
|
33
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BSEQUTQP.js";
|
|
34
32
|
|
|
35
|
-
// dist/
|
|
33
|
+
// dist/sdk/history-repair.js
|
|
36
34
|
import jsonPatch from "fast-json-patch";
|
|
37
35
|
!(function() {
|
|
38
36
|
try {
|
|
39
37
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
40
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
38
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "681e79d9-140b-5a78-9e24-6714efd974dc");
|
|
41
39
|
} catch (e2) {
|
|
42
40
|
}
|
|
43
41
|
})();
|
|
@@ -264,9 +262,18 @@ async function runHistoryRepairAll(options, global2) {
|
|
|
264
262
|
};
|
|
265
263
|
}
|
|
266
264
|
|
|
265
|
+
// dist/cli/commands/history-repair.js
|
|
266
|
+
!(function() {
|
|
267
|
+
try {
|
|
268
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
269
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0c797b34-1f8d-5218-b7ee-127688fab2a1");
|
|
270
|
+
} catch (e2) {
|
|
271
|
+
}
|
|
272
|
+
})();
|
|
273
|
+
|
|
267
274
|
export {
|
|
268
275
|
runHistoryRepair,
|
|
269
276
|
assertHistoryRepairTarget,
|
|
270
277
|
runHistoryRepairAll
|
|
271
278
|
};
|
|
272
|
-
//# sourceMappingURL=chunk-
|
|
279
|
+
//# sourceMappingURL=chunk-LSG2U345.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../sdk/history-repair.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module sdk/history-repair\n *\n * Implements the pm history repair command surface and its agent-facing runtime behavior.\n */\nimport jsonPatch from \"fast-json-patch\";\nimport { pathExists, readFileIfExists } from \"../core/fs/fs-utils.js\";\nimport {\n executeHistoryRewrite,\n writeHistoryRawWithRollback,\n} from \"../core/history/history-rewrite.js\";\nimport {\n historyEntriesToRaw,\n reanchorHistoryEntries,\n replayHash,\n toReplayDocument,\n verifyHistoryChain,\n type ReplayDocument,\n} from \"../core/history/replay.js\";\nimport { scanHistoryDrift } from \"../core/history/drift-scan.js\";\nimport { readHistoryEntries } from \"../core/history/read.js\";\nimport { resolveItemTypeRegistry } from \"../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { nowIso } from \"../core/shared/time.js\";\nimport {\n getActiveExtensionRegistrations,\n runActiveOnWriteHooks,\n} from \"../core/extensions/index.js\";\nimport {\n listAllItemMetadataWithBody,\n readLocatedItem,\n} from \"../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport type {\n HistoryEntry,\n HistoryPatchOp,\n ItemMetadata,\n} from \"../types/index.js\";\nimport { resolveHistorySubject } from \"./history-redact.js\";\n\n/** Documents the history repair command options payload exchanged by command, SDK, and package integrations. */\nexport interface HistoryRepairCommandOptions {\n /** Value that configures or reports dry run for this contract. */\n dryRun?: boolean;\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Human-readable explanation suitable for logs and agent-facing output. */\n message?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the history repair result payload exchanged by command, SDK, and package integrations. */\nexport interface HistoryRepairResult {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Value that configures or reports dry run for this contract. */\n dry_run: boolean;\n /** Value that configures or reports changed for this contract. */\n changed: boolean;\n /** Value that configures or reports history for this contract. */\n history: {\n path: string;\n entries_scanned: number;\n chain_drift_before: boolean;\n entries_rehashed: number;\n entries_patch_repaired: number;\n converted_replace_to_add: number;\n skipped_ops: number;\n reconciled_with_item: boolean;\n audit_entry_added: boolean;\n verify_ok: boolean;\n verify_errors: string[];\n };\n /** Value that configures or reports item for this contract. */\n item: {\n exists: boolean;\n path: string | null;\n matched_chain_before: boolean | null;\n };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\ninterface HistoryRepairItemReplayContext {\n currentItemReplay: ReplayDocument | null;\n currentItemPath: string | null;\n matchedChainBefore: boolean | null;\n currentItemRawBeforeLock: string | null;\n loadedItem: Awaited<ReturnType<typeof readLocatedItem>> | null;\n}\n\nfunction toAuthor(\n candidate: string | undefined,\n defaultAuthor: string,\n): string {\n /* c8 ignore next -- PM_AUTHOR fallback branch is environment-dependent in CI. */\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed.length > 0 ? trimmed : \"unknown\";\n}\n\nasync function loadHistoryRepairItemReplay(\n subject: Awaited<ReturnType<typeof resolveHistorySubject>>,\n settings: Awaited<ReturnType<typeof readSettings>>,\n historyEntries: HistoryEntry[],\n): Promise<HistoryRepairItemReplayContext> {\n const currentItemPath = subject.located?.itemPath ?? null;\n const loadedItem = subject.located\n ? await readLocatedItem(subject.located, { schema: settings.schema })\n : null;\n if (!loadedItem) {\n return {\n currentItemReplay: null,\n currentItemPath,\n matchedChainBefore: null,\n currentItemRawBeforeLock: null,\n loadedItem: null,\n };\n }\n const currentItemReplay = toReplayDocument(loadedItem.document);\n const lastOriginalAfterHash =\n historyEntries[historyEntries.length - 1]?.after_hash;\n return {\n currentItemReplay,\n currentItemPath,\n matchedChainBefore: replayHash(currentItemReplay) === lastOriginalAfterHash,\n currentItemRawBeforeLock: loadedItem.raw,\n loadedItem,\n };\n}\n\nfunction buildHistoryRepairMessage(params: {\n message: string | undefined;\n entriesRehashed: number;\n entriesPatchRepaired: number;\n reconcileNeeded: boolean;\n}): string {\n if (typeof params.message === \"string\" && params.message.trim().length > 0) {\n return params.message;\n }\n /* v8 ignore start -- message suffix/plural variants are deterministic formatting fallbacks around the covered repair outcomes */\n return `history-repair re-anchored ${params.entriesRehashed} entr${\n params.entriesRehashed === 1 ? \"y\" : \"ies\"\n }${params.entriesPatchRepaired > 0 ? `, repaired ${params.entriesPatchRepaired} patch(es)` : \"\"}${\n params.reconcileNeeded ? \", reconciled chain with on-disk item\" : \"\"\n }.`;\n /* v8 ignore stop */\n}\n\nfunction buildHistoryRepairEntries(params: {\n reanchorEntries: HistoryEntry[];\n changed: boolean;\n reconcileNeeded: boolean;\n currentItemReplay: ReplayDocument | null;\n finalReplay: ReplayDocument;\n author: string;\n message: string;\n}): { rewrittenEntries: HistoryEntry[]; auditEntryAdded: boolean } {\n const rewrittenEntries: HistoryEntry[] = [...params.reanchorEntries];\n if (!params.changed) {\n return { rewrittenEntries, auditEntryAdded: false };\n }\n const afterReplay =\n params.reconcileNeeded && params.currentItemReplay\n ? params.currentItemReplay\n : params.finalReplay;\n rewrittenEntries.push({\n ts: nowIso(),\n author: params.author,\n op: \"history_repair\",\n patch:\n params.reconcileNeeded && params.currentItemReplay\n ? (jsonPatch.compare(\n params.finalReplay,\n params.currentItemReplay,\n ) as HistoryPatchOp[])\n : [],\n before_hash: replayHash(params.finalReplay),\n after_hash: replayHash(afterReplay),\n message: params.message,\n });\n return { rewrittenEntries, auditEntryAdded: true };\n}\n\nfunction collectHistoryRepairWarnings(\n changed: boolean,\n skippedOps: number,\n): string[] {\n const warnings: string[] = [];\n if (!changed) {\n warnings.push(\"history_repair_no_changes\");\n }\n if (skippedOps > 0) {\n warnings.push(`history_repair_skipped_unresolvable_ops:${skippedOps}`);\n }\n return warnings;\n}\n\nasync function applyHistoryRepairRewrite(params: {\n pmRoot: string;\n subject: Awaited<ReturnType<typeof resolveHistorySubject>>;\n settings: Awaited<ReturnType<typeof readSettings>>;\n typeRegistry: ReturnType<typeof resolveItemTypeRegistry>;\n historyRawBeforeLock: string | null;\n currentItemRawBeforeLock: string | null;\n author: string;\n force: boolean | undefined;\n loadedItem: Awaited<ReturnType<typeof readLocatedItem>> | null;\n historyPath: string;\n rewrittenEntries: HistoryEntry[];\n}): Promise<string[]> {\n return executeHistoryRewrite({\n pmRoot: params.pmRoot,\n subject: params.subject,\n settings: params.settings,\n typeRegistry: params.typeRegistry,\n historyRawBeforeLock: params.historyRawBeforeLock,\n currentItemRawBeforeLock: params.currentItemRawBeforeLock,\n operation: \"history-repair\",\n author: params.author,\n force: params.force,\n itemDocument: params.loadedItem?.document ?? null,\n applyRewrite: async ({ historyRawUnderLock }) =>\n writeHistoryRawWithRollback({\n historyPath: params.historyPath,\n nextHistoryRaw: historyEntriesToRaw(params.rewrittenEntries),\n historyRawUnderLock,\n }),\n applyPostRewrite: async () =>\n runActiveOnWriteHooks({\n path: params.historyPath,\n scope: \"project\",\n op: \"history_repair:history\",\n }),\n });\n}\n\n/** Implements run history repair for the public runtime surface of this module. */\nexport async function runHistoryRepair(\n id: string,\n options: HistoryRepairCommandOptions,\n global: GlobalOptions,\n): Promise<HistoryRepairResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const subject = await resolveHistorySubject(\n pmRoot,\n id,\n settings,\n typeRegistry.type_to_folder,\n );\n\n if (!(await pathExists(subject.historyPath))) {\n throw new PmCliError(\n `No history stream exists for ${subject.id}.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n const historyRawBeforeLock = await readFileIfExists(subject.historyPath);\n const historyEntries = await readHistoryEntries(\n subject.historyPath,\n subject.id,\n );\n if (historyEntries.length === 0) {\n throw new PmCliError(\n `No history entries exist for ${subject.id}; nothing to repair.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const chainBefore = verifyHistoryChain(historyEntries);\n const reanchor = reanchorHistoryEntries(historyEntries);\n\n const itemReplayContext = await loadHistoryRepairItemReplay(\n subject,\n settings,\n historyEntries,\n );\n\n const finalReplay = reanchor.finalDocument;\n const reconcileNeeded =\n itemReplayContext.currentItemReplay !== null &&\n replayHash(finalReplay) !== replayHash(itemReplayContext.currentItemReplay);\n\n const changed =\n reanchor.entriesRehashed > 0 ||\n reanchor.entriesPatchRepaired > 0 ||\n reconcileNeeded;\n const author = toAuthor(options.author, settings.author_default);\n const dryRun = Boolean(options.dryRun);\n\n const repairMessage = buildHistoryRepairMessage({\n message: options.message,\n entriesRehashed: reanchor.entriesRehashed,\n entriesPatchRepaired: reanchor.entriesPatchRepaired,\n reconcileNeeded,\n });\n const { rewrittenEntries, auditEntryAdded } = buildHistoryRepairEntries({\n reanchorEntries: reanchor.entries,\n changed,\n reconcileNeeded,\n currentItemReplay: itemReplayContext.currentItemReplay,\n finalReplay,\n author,\n message: repairMessage,\n });\n\n const historyVerify = verifyHistoryChain(rewrittenEntries);\n if (!historyVerify.ok) {\n throw new PmCliError(\n `history-repair produced an invalid rewritten chain (${historyVerify.errors.join(\", \")}).`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n\n const warnings = collectHistoryRepairWarnings(changed, reanchor.skippedOps);\n\n if (changed && !dryRun) {\n warnings.push(\n ...(await applyHistoryRepairRewrite({\n pmRoot,\n subject,\n settings,\n typeRegistry,\n historyRawBeforeLock,\n currentItemRawBeforeLock: itemReplayContext.currentItemRawBeforeLock,\n author,\n force: options.force,\n loadedItem: itemReplayContext.loadedItem,\n historyPath: subject.historyPath,\n rewrittenEntries,\n })),\n );\n }\n\n return {\n id: subject.id,\n dry_run: dryRun,\n changed,\n history: {\n path: subject.historyPath,\n entries_scanned: historyEntries.length,\n chain_drift_before: !chainBefore.ok,\n entries_rehashed: reanchor.entriesRehashed,\n entries_patch_repaired: reanchor.entriesPatchRepaired,\n converted_replace_to_add: reanchor.convertedReplaceToAdd,\n skipped_ops: reanchor.skippedOps,\n reconciled_with_item: reconcileNeeded,\n audit_entry_added: auditEntryAdded,\n verify_ok: historyVerify.ok,\n verify_errors: historyVerify.errors,\n },\n item: {\n exists: itemReplayContext.currentItemPath !== null,\n path: itemReplayContext.currentItemPath,\n matched_chain_before: itemReplayContext.matchedChainBefore,\n },\n warnings: [...new Set(warnings)].sort((left, right) =>\n left.localeCompare(right),\n ),\n generated_at: nowIso(),\n };\n}\n\n/** Documents the history repair all stream result payload exchanged by command, SDK, and package integrations. */\nexport interface HistoryRepairAllStreamResult {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Value that configures or reports outcome for this contract. */\n outcome: \"repaired\" | \"skipped_clean\" | \"failed\";\n /** Value that configures or reports entries rehashed for this contract. */\n entries_rehashed?: number;\n /** Value that configures or reports entries patch repaired for this contract. */\n entries_patch_repaired?: number;\n /** Value that configures or reports reconciled with item for this contract. */\n reconciled_with_item?: boolean;\n /** Value that configures or reports error for this contract. */\n error?: string;\n}\n\n/** Documents the history repair all result payload exchanged by command, SDK, and package integrations. */\nexport interface HistoryRepairAllResult {\n /** Value that configures or reports all for this contract. */\n all: true;\n /** Value that configures or reports dry run for this contract. */\n dry_run: boolean;\n /** Value that configures or reports scanned streams for this contract. */\n scanned_streams: number;\n /** Value that configures or reports drifted streams for this contract. */\n drifted_streams: number;\n /** One compact row per drifted stream (clean streams are summarized by the counts only). */\n streams: HistoryRepairAllStreamResult[];\n /** Value that configures or reports totals for this contract. */\n totals: { repaired: number; skipped_clean: number; failed: number };\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n /** ISO 8601 timestamp recording when generated occurred. */\n generated_at: string;\n}\n\n/** Enforce the `pm history-repair` target contract shared by the CLI and MCP surfaces: exactly one of an item `<id>` or `--all` must be provided. */\nexport function assertHistoryRepairTarget(\n id: string | undefined,\n all: boolean,\n): void {\n if (all && id !== undefined) {\n throw new PmCliError(\n \"history-repair: <id> and --all are mutually exclusive; pass an item id to repair one stream or --all to repair every drifted stream.\",\n EXIT_CODE.USAGE,\n );\n }\n if (!all && id === undefined) {\n throw new PmCliError(\n \"history-repair: provide an item <id> or pass --all to repair every drifted stream.\",\n EXIT_CODE.USAGE,\n );\n }\n}\n\n/** Bulk drift repair: scan every item's history stream with the same drift scan `pm health` uses, then run the audited single-stream repair (ownership check, lock, no-drift verification, audit marker) for each drifted stream. One failing stream never aborts the rest; failures are collected per row and the caller decides the exit code from `totals.failed`. */\nexport async function runHistoryRepairAll(\n options: HistoryRepairCommandOptions,\n global: GlobalOptions,\n): Promise<HistoryRepairAllResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const itemReadWarnings: string[] = [];\n const items = await listAllItemMetadataWithBody(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n itemReadWarnings,\n settings.schema,\n );\n const drift = await scanHistoryDrift(\n pmRoot,\n items as Array<ItemMetadata & { body: string }>,\n );\n\n const streams: HistoryRepairAllStreamResult[] = [];\n const totals = { repaired: 0, skipped_clean: 0, failed: 0 };\n for (const driftedId of drift.driftedItems) {\n try {\n const result = await runHistoryRepair(driftedId, options, global);\n /* c8 ignore next -- mixed repaired/clean outcomes depend on live drift composition. */\n const outcome = result.changed ? \"repaired\" : \"skipped_clean\";\n totals[outcome] += 1;\n streams.push({\n id: driftedId,\n outcome,\n entries_rehashed: result.history.entries_rehashed,\n entries_patch_repaired: result.history.entries_patch_repaired,\n reconciled_with_item: result.history.reconciled_with_item,\n });\n } catch (error) {\n totals.failed += 1;\n streams.push({\n id: driftedId,\n outcome: \"failed\",\n /* c8 ignore next -- non-Error throws are normalized in defensive fallback. */\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n\n return {\n all: true,\n dry_run: Boolean(options.dryRun),\n scanned_streams: items.length,\n drifted_streams: drift.driftedItems.length,\n streams,\n totals,\n warnings: [...new Set(itemReadWarnings)].sort((left, right) =>\n left.localeCompare(right),\n ),\n generated_at: nowIso(),\n };\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["global"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="45eac7fa-f181-5cca-93b7-cfb58909dbb3")}catch(e){}}();
|
|
3
|
+
//# sourceMappingURL=chunk-MIQDDLB5.js.map
|
|
4
|
+
|
|
5
|
+
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isTerminalStatus,
|
|
3
3
|
normalizeStatusForRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XSJUSQAE.js";
|
|
5
5
|
|
|
6
6
|
// dist/core/item/actionability.js
|
|
7
7
|
!(function() {
|
|
@@ -129,4 +129,4 @@ export {
|
|
|
129
129
|
collectBlockedByIds,
|
|
130
130
|
computeActionabilityReport
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-NLDFBC6J.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
nowIso,
|
|
3
3
|
readSettings,
|
|
4
4
|
writeSettings
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XSJUSQAE.js";
|
|
6
6
|
import {
|
|
7
7
|
EXIT_CODE,
|
|
8
8
|
appendLineAtomic,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolvePmPackageRootFromModule,
|
|
12
12
|
resolveTelemetryErrorCategory,
|
|
13
13
|
writeFileAtomic
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BSEQUTQP.js";
|
|
15
15
|
|
|
16
16
|
// dist/core/telemetry/observability.js
|
|
17
17
|
!(function() {
|
|
@@ -1838,4 +1838,4 @@ export {
|
|
|
1838
1838
|
finishTelemetryCommand,
|
|
1839
1839
|
emitTelemetryErrorEvent
|
|
1840
1840
|
};
|
|
1841
|
-
//# sourceMappingURL=chunk-
|
|
1841
|
+
//# sourceMappingURL=chunk-NP22ERDF.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EXIT_CODE,
|
|
3
3
|
PmCliError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BSEQUTQP.js";
|
|
5
5
|
|
|
6
6
|
// dist/core/shared/numeric-parsers.js
|
|
7
7
|
!(function() {
|
|
@@ -24,4 +24,4 @@ function parseLimit(raw, label = "--limit") {
|
|
|
24
24
|
export {
|
|
25
25
|
parseLimit
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-NU3IMIEA.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
EXIT_CODE,
|
|
5
5
|
PmCliError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QKECXBBG.js";
|
|
7
7
|
|
|
8
8
|
// dist/core/shared/numeric-parsers.js
|
|
9
9
|
function parseLimit(raw, label = "--limit") {
|
|
@@ -19,6 +19,6 @@ function parseLimit(raw, label = "--limit") {
|
|
|
19
19
|
export {
|
|
20
20
|
parseLimit
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-NVPZIJVR.js.map
|
|
23
23
|
|
|
24
24
|
//# debugId=627d7fc9-9482-5889-9c96-735ac260cf05
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renameArtifactsResultKey,
|
|
3
3
|
runLinkedArtifacts
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WUJQK4YV.js";
|
|
5
5
|
|
|
6
6
|
// dist/sdk/docs.js
|
|
7
7
|
!(function() {
|
|
@@ -24,4 +24,4 @@ async function runDocs(id, options, global2) {
|
|
|
24
24
|
export {
|
|
25
25
|
runDocs
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-ODALILG3.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9a21d12c-d2fd-5325-930c-dfc8bbfe8247")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
collectStaleVectorizationIds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7Z4LKRS4.js";
|
|
6
6
|
import {
|
|
7
7
|
buildListQueryFilters
|
|
8
8
|
} from "./chunk-N7V7TI6J.js";
|
|
@@ -11,33 +11,38 @@ import {
|
|
|
11
11
|
buildContentFilterEcho,
|
|
12
12
|
buildGovernanceMissingFilterEcho,
|
|
13
13
|
collectRuntimeFilterValues,
|
|
14
|
-
createQueryFingerprint,
|
|
15
14
|
hasContentFieldFilter,
|
|
16
15
|
itemMatchesContentFilters,
|
|
17
16
|
matchesRuntimeFilters,
|
|
18
|
-
|
|
17
|
+
parseIntegerLimit,
|
|
18
|
+
parsePriority,
|
|
19
19
|
parseStatusFilterCsv,
|
|
20
|
+
parseType,
|
|
20
21
|
resolveContentFieldFilters,
|
|
21
22
|
resolveMissingMetadataFilters,
|
|
22
23
|
runList
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UXONS674.js";
|
|
25
|
+
import {
|
|
26
|
+
createQueryFingerprint,
|
|
27
|
+
paginateQueryRows
|
|
28
|
+
} from "./chunk-HDH3JUGG.js";
|
|
29
|
+
import {
|
|
30
|
+
getItemAt
|
|
31
|
+
} from "./chunk-OW4JWD5M.js";
|
|
24
32
|
import {
|
|
25
33
|
hasMissingMetadataFilter,
|
|
26
34
|
itemMatchesMissingMetadata,
|
|
27
35
|
lifecycleClassifierFromStatusRegistry
|
|
28
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-2VPAVL7O.js";
|
|
29
37
|
import {
|
|
30
|
-
parseIntegerLimit,
|
|
31
|
-
parsePriority,
|
|
32
|
-
parseType,
|
|
33
38
|
readHistoryEntries
|
|
34
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-GOSLKLFE.js";
|
|
35
40
|
import {
|
|
36
41
|
parseLimit
|
|
37
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-NVPZIJVR.js";
|
|
38
43
|
import {
|
|
39
44
|
recordContextUsageTouches
|
|
40
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-RLCHOOHC.js";
|
|
41
46
|
import {
|
|
42
47
|
resolveRegisteredSearchProvider,
|
|
43
48
|
resolveRegisteredVectorStoreAdapter
|
|
@@ -54,7 +59,7 @@ import {
|
|
|
54
59
|
resolveSearchCorpusFields,
|
|
55
60
|
resolveSettingsWithSemanticRuntimeDefaults,
|
|
56
61
|
resolveVectorStores
|
|
57
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-JXQUXVMI.js";
|
|
58
63
|
import {
|
|
59
64
|
splitCommaList
|
|
60
65
|
} from "./chunk-NETP4DY4.js";
|
|
@@ -76,11 +81,12 @@ import {
|
|
|
76
81
|
resolveIsoOrRelative,
|
|
77
82
|
runActiveOnReadHooks,
|
|
78
83
|
toItemRecord
|
|
79
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-Q7A43DS4.js";
|
|
80
85
|
import {
|
|
81
86
|
EXIT_CODE,
|
|
82
87
|
ITEM_METADATA_KEY_ORDER,
|
|
83
88
|
PmCliError,
|
|
89
|
+
TYPE_TO_FOLDER,
|
|
84
90
|
coerceNumberInRange,
|
|
85
91
|
coercePositiveInteger,
|
|
86
92
|
collectRegisteredItemFieldNames,
|
|
@@ -96,7 +102,7 @@ import {
|
|
|
96
102
|
resolveRuntimeStatusRegistry,
|
|
97
103
|
toNonEmptyString,
|
|
98
104
|
toNonEmptyStringOrUndefined
|
|
99
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-QKECXBBG.js";
|
|
100
106
|
|
|
101
107
|
// dist/cli/commands/aggregate.js
|
|
102
108
|
var AGGREGATE_GROUP_FIELDS = [
|
|
@@ -2949,9 +2955,94 @@ async function runEval(options, global) {
|
|
|
2949
2955
|
};
|
|
2950
2956
|
}
|
|
2951
2957
|
|
|
2958
|
+
// dist/sdk/item-children.js
|
|
2959
|
+
var MAX_CHILD_PROJECTION_ITEMS = 1e6;
|
|
2960
|
+
var DEFAULT_CHILD_SAMPLE_LIMIT = 20;
|
|
2961
|
+
function buildItemChildrenRollup(parentId, corpus, statusRegistry, sampleLimit = DEFAULT_CHILD_SAMPLE_LIMIT) {
|
|
2962
|
+
if (!Number.isSafeInteger(sampleLimit) || sampleLimit < 0) {
|
|
2963
|
+
throw new PmCliError("Child projection sample limit must be a non-negative integer.", EXIT_CODE.USAGE);
|
|
2964
|
+
}
|
|
2965
|
+
const normalizedParentId = parentId.trim().toLowerCase();
|
|
2966
|
+
const byStatus = {};
|
|
2967
|
+
const children = [];
|
|
2968
|
+
let active = 0;
|
|
2969
|
+
let scanned = 0;
|
|
2970
|
+
for (const candidate of corpus) {
|
|
2971
|
+
scanned += 1;
|
|
2972
|
+
if (scanned > MAX_CHILD_PROJECTION_ITEMS) {
|
|
2973
|
+
throw new PmCliError(`Child projection exceeded the ${MAX_CHILD_PROJECTION_ITEMS.toLocaleString("en-US")} item safety bound.`, EXIT_CODE.GENERIC_FAILURE, {
|
|
2974
|
+
code: "child_projection_item_bound_exceeded",
|
|
2975
|
+
required: "Use an indexed or parent-filtered metadata source.",
|
|
2976
|
+
why: "Unbounded graph scans can exhaust memory in universal project stores.",
|
|
2977
|
+
nextSteps: ["Build the derived item index, then retry the parent read."]
|
|
2978
|
+
});
|
|
2979
|
+
}
|
|
2980
|
+
if (candidate.parent?.trim().toLowerCase() !== normalizedParentId) {
|
|
2981
|
+
continue;
|
|
2982
|
+
}
|
|
2983
|
+
children.push(candidate);
|
|
2984
|
+
const status = candidate.status.trim().toLowerCase();
|
|
2985
|
+
byStatus[status] = (byStatus[status] ?? 0) + 1;
|
|
2986
|
+
if (!isTerminalStatus(status, statusRegistry)) {
|
|
2987
|
+
active += 1;
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
children.sort((left, right) => left.id.localeCompare(right.id));
|
|
2991
|
+
const sample = children.slice(0, sampleLimit).map((child) => ({
|
|
2992
|
+
id: child.id,
|
|
2993
|
+
title: child.title,
|
|
2994
|
+
type: child.type,
|
|
2995
|
+
status: child.status,
|
|
2996
|
+
priority: child.priority
|
|
2997
|
+
}));
|
|
2998
|
+
const truncated = children.length > sample.length;
|
|
2999
|
+
return {
|
|
3000
|
+
count: children.length,
|
|
3001
|
+
active,
|
|
3002
|
+
by_status: Object.fromEntries(Object.entries(byStatus).sort(([left], [right]) => left.localeCompare(right))),
|
|
3003
|
+
sample,
|
|
3004
|
+
sample_limit: sampleLimit,
|
|
3005
|
+
truncated,
|
|
3006
|
+
next_offset: truncated ? sample.length : null,
|
|
3007
|
+
continuation: truncated ? `pm list --status all --parent ${parentId} --offset ${sample.length} --limit ${sampleLimit}` : null,
|
|
3008
|
+
scanned
|
|
3009
|
+
};
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
// dist/sdk/item-schedule.js
|
|
3013
|
+
var BUILTIN_SCHEDULE_TYPES = /* @__PURE__ */ new Set(["event", "meeting", "reminder"]);
|
|
3014
|
+
function itemHasSchedule(item) {
|
|
3015
|
+
return BUILTIN_SCHEDULE_TYPES.has(item.type.trim().toLowerCase()) || item.deadline !== void 0 || (item.reminders?.length ?? 0) > 0 || (item.events?.length ?? 0) > 0;
|
|
3016
|
+
}
|
|
3017
|
+
function buildItemSchedule(item) {
|
|
3018
|
+
if (!itemHasSchedule(item)) {
|
|
3019
|
+
return void 0;
|
|
3020
|
+
}
|
|
3021
|
+
const events = [...item.events ?? []].sort((left, right) => left.start_at.localeCompare(right.start_at));
|
|
3022
|
+
const primary = events[0];
|
|
3023
|
+
return {
|
|
3024
|
+
deadline: item.deadline ?? null,
|
|
3025
|
+
start_at: primary?.start_at ?? null,
|
|
3026
|
+
end_at: primary?.end_at ?? null,
|
|
3027
|
+
location: primary?.location ?? null,
|
|
3028
|
+
reminders: [...item.reminders ?? []],
|
|
3029
|
+
events
|
|
3030
|
+
};
|
|
3031
|
+
}
|
|
3032
|
+
|
|
2952
3033
|
// dist/cli/commands/get.js
|
|
2953
|
-
var CHILD_ROLLUP_TYPES = /* @__PURE__ */ new Set(["milestone", "epic"]);
|
|
2954
3034
|
var GET_DEPTH_VALUES = ["brief", "standard", "deep"];
|
|
3035
|
+
var AUTOMATIC_CHILD_ROLLUP_TYPES = /* @__PURE__ */ new Set([
|
|
3036
|
+
"epic",
|
|
3037
|
+
"feature",
|
|
3038
|
+
"milestone",
|
|
3039
|
+
"plan"
|
|
3040
|
+
]);
|
|
3041
|
+
var BUILTIN_ITEM_TYPES = new Set(Object.keys(TYPE_TO_FOLDER).map((type) => type.toLowerCase()));
|
|
3042
|
+
function shouldAutoIncludeGetChildren(itemType) {
|
|
3043
|
+
const normalizedType = itemType.trim().toLowerCase();
|
|
3044
|
+
return normalizedType.length > 0 && (AUTOMATIC_CHILD_ROLLUP_TYPES.has(normalizedType) || !BUILTIN_ITEM_TYPES.has(normalizedType));
|
|
3045
|
+
}
|
|
2955
3046
|
function toClaimHistoryContext(entry) {
|
|
2956
3047
|
return {
|
|
2957
3048
|
ts: entry.ts,
|
|
@@ -3016,7 +3107,8 @@ function validateGetFields(fields, runtimeMetadataKeys) {
|
|
|
3016
3107
|
"body",
|
|
3017
3108
|
"linked",
|
|
3018
3109
|
"claim_state",
|
|
3019
|
-
"children"
|
|
3110
|
+
"children",
|
|
3111
|
+
"schedule"
|
|
3020
3112
|
]);
|
|
3021
3113
|
const allowedLinkedFields = /* @__PURE__ */ new Set([
|
|
3022
3114
|
"linked.files",
|
|
@@ -3029,9 +3121,17 @@ function validateGetFields(fields, runtimeMetadataKeys) {
|
|
|
3029
3121
|
"claim_state.last_claim",
|
|
3030
3122
|
"claim_state.last_release"
|
|
3031
3123
|
]);
|
|
3124
|
+
const allowedScheduleFields = /* @__PURE__ */ new Set([
|
|
3125
|
+
"schedule.deadline",
|
|
3126
|
+
"schedule.start_at",
|
|
3127
|
+
"schedule.end_at",
|
|
3128
|
+
"schedule.location",
|
|
3129
|
+
"schedule.reminders",
|
|
3130
|
+
"schedule.events"
|
|
3131
|
+
]);
|
|
3032
3132
|
const unknown = fields.filter((field) => {
|
|
3033
3133
|
const normalized = normalizeGetField(field);
|
|
3034
|
-
return !itemFields.has(normalized) && !allowedRootFields.has(normalized) && !allowedLinkedFields.has(normalized) && !allowedClaimStateFields.has(normalized);
|
|
3134
|
+
return !itemFields.has(normalized) && !allowedRootFields.has(normalized) && !allowedLinkedFields.has(normalized) && !allowedClaimStateFields.has(normalized) && !allowedScheduleFields.has(normalized);
|
|
3035
3135
|
});
|
|
3036
3136
|
if (unknown.length > 0) {
|
|
3037
3137
|
throw new PmCliError(`Unknown get --fields value(s): ${unknown.join(", ")}`, EXIT_CODE.USAGE, {
|
|
@@ -3048,8 +3148,8 @@ function projectItemForFields(item, fields) {
|
|
|
3048
3148
|
const source = toItemRecord(item);
|
|
3049
3149
|
const projected = {};
|
|
3050
3150
|
for (const field of fields) {
|
|
3051
|
-
const normalized =
|
|
3052
|
-
if (normalized === "body" || normalized === "linked" || normalized.startsWith("linked.")) {
|
|
3151
|
+
const normalized = normalizeGetField(field);
|
|
3152
|
+
if (normalized === "body" || normalized === "linked" || normalized.startsWith("linked.") || normalized === "claim_state" || normalized.startsWith("claim_state.") || normalized === "children" || normalized.startsWith("children.") || normalized === "schedule" || normalized.startsWith("schedule.")) {
|
|
3053
3153
|
continue;
|
|
3054
3154
|
}
|
|
3055
3155
|
projected[normalized] = source[normalized];
|
|
@@ -3060,7 +3160,10 @@ function fieldsInclude(fields, name) {
|
|
|
3060
3160
|
return fields?.some((field) => field === name || field === `item.${name}`) ?? false;
|
|
3061
3161
|
}
|
|
3062
3162
|
function fieldsIncludeRoot(fields, name) {
|
|
3063
|
-
return fields.some((field) =>
|
|
3163
|
+
return fields.some((field) => {
|
|
3164
|
+
const normalized = normalizeGetField(field);
|
|
3165
|
+
return normalized === name || normalized.startsWith(`${name}.`);
|
|
3166
|
+
});
|
|
3064
3167
|
}
|
|
3065
3168
|
function resolveGetProjection(options) {
|
|
3066
3169
|
if (options.full && (options.fields !== void 0 || options.depth !== void 0)) {
|
|
@@ -3069,6 +3172,9 @@ function resolveGetProjection(options) {
|
|
|
3069
3172
|
if (options.tree !== true && options.treeDepth !== void 0) {
|
|
3070
3173
|
throw new PmCliError("Get --tree-depth requires --tree", EXIT_CODE.USAGE);
|
|
3071
3174
|
}
|
|
3175
|
+
if (options.at !== void 0 && options.tree === true) {
|
|
3176
|
+
throw new PmCliError("Get --at cannot be combined with --tree because workspace-level historical projections are not yet indexed.", EXIT_CODE.USAGE);
|
|
3177
|
+
}
|
|
3072
3178
|
return {
|
|
3073
3179
|
depth: options.full ? "deep" : parseGetDepth(options.depth),
|
|
3074
3180
|
treeDepth: options.tree === true ? parseIntegerLimit(options.treeDepth, "--tree-depth") : void 0,
|
|
@@ -3076,13 +3182,25 @@ function resolveGetProjection(options) {
|
|
|
3076
3182
|
fieldProjection: options.fields !== void 0
|
|
3077
3183
|
};
|
|
3078
3184
|
}
|
|
3079
|
-
async function loadGetItemContext(id, global) {
|
|
3185
|
+
async function loadGetItemContext(id, global, at) {
|
|
3080
3186
|
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
3081
3187
|
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
3082
3188
|
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
3083
3189
|
}
|
|
3084
3190
|
const settings = await readSettings(pmRoot);
|
|
3085
3191
|
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
3192
|
+
if (at !== void 0) {
|
|
3193
|
+
const historical = await getItemAt(id, at, { pmRoot: global.path });
|
|
3194
|
+
return {
|
|
3195
|
+
pmRoot,
|
|
3196
|
+
settings,
|
|
3197
|
+
typeToFolder: typeRegistry.type_to_folder,
|
|
3198
|
+
locatedId: historical.document.metadata.id,
|
|
3199
|
+
metadata: historical.document.metadata,
|
|
3200
|
+
body: historical.document.body,
|
|
3201
|
+
historical
|
|
3202
|
+
};
|
|
3203
|
+
}
|
|
3086
3204
|
const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
|
|
3087
3205
|
if (!located) {
|
|
3088
3206
|
throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);
|
|
@@ -3097,21 +3215,21 @@ async function loadGetItemContext(id, global) {
|
|
|
3097
3215
|
body: loaded.document.body
|
|
3098
3216
|
};
|
|
3099
3217
|
}
|
|
3100
|
-
function validateGetProjectionFields(fields, settings) {
|
|
3218
|
+
function validateGetProjectionFields(fields, settings, historical) {
|
|
3101
3219
|
const runtimeMetadataKeys = resolveRuntimeFieldRegistry(settings.schema).definitions.map((field) => field.metadata_key);
|
|
3102
3220
|
validateGetFields(fields, runtimeMetadataKeys);
|
|
3221
|
+
if (historical && fieldsIncludeRoot(fields ?? [], "children")) {
|
|
3222
|
+
throw new PmCliError("Get --at cannot project children because workspace-level historical relationships are not yet indexed.", EXIT_CODE.USAGE);
|
|
3223
|
+
}
|
|
3103
3224
|
}
|
|
3104
3225
|
function shouldIncludeGetField(params) {
|
|
3105
|
-
const { fieldProjection, depth, fields, field
|
|
3226
|
+
const { fieldProjection, depth, fields, field } = params;
|
|
3106
3227
|
if (fieldProjection) {
|
|
3107
3228
|
if (field === "body" || field === "linked") {
|
|
3108
3229
|
return fieldsInclude(fields, field);
|
|
3109
3230
|
}
|
|
3110
3231
|
return fieldsIncludeRoot(fields, field);
|
|
3111
3232
|
}
|
|
3112
|
-
if (field === "children") {
|
|
3113
|
-
return depth !== "brief" && CHILD_ROLLUP_TYPES.has(itemType);
|
|
3114
|
-
}
|
|
3115
3233
|
return depth !== "brief";
|
|
3116
3234
|
}
|
|
3117
3235
|
async function resolveGetClaimState(context, includeClaimState) {
|
|
@@ -3120,7 +3238,7 @@ async function resolveGetClaimState(context, includeClaimState) {
|
|
|
3120
3238
|
}
|
|
3121
3239
|
const historyPath = getHistoryPath(context.pmRoot, context.locatedId);
|
|
3122
3240
|
const history = await readHistoryEntries(historyPath, context.locatedId);
|
|
3123
|
-
return resolveClaimStateContext(context.metadata.assignee, history);
|
|
3241
|
+
return resolveClaimStateContext(context.metadata.assignee, context.historical ? history.slice(0, context.historical.as_of_version) : history);
|
|
3124
3242
|
}
|
|
3125
3243
|
function attachGetLinked(result, context, fields, includeLinked) {
|
|
3126
3244
|
const includeLinkedFiles = includeLinked || fieldsInclude(fields, "linked.files");
|
|
@@ -3135,28 +3253,28 @@ function attachGetLinked(result, context, fields, includeLinked) {
|
|
|
3135
3253
|
docs: includeLinkedDocs ? context.metadata.docs ?? [] : []
|
|
3136
3254
|
};
|
|
3137
3255
|
}
|
|
3138
|
-
async function buildGetChildrenRollup(context, includeChildren) {
|
|
3256
|
+
async function buildGetChildrenRollup(context, includeChildren, includeEmpty) {
|
|
3139
3257
|
if (!includeChildren) {
|
|
3140
3258
|
return void 0;
|
|
3141
3259
|
}
|
|
3142
3260
|
const statusRegistry = resolveRuntimeStatusRegistry(context.settings.schema);
|
|
3143
3261
|
const corpus = await listAllItemMetadataLight(context.pmRoot, context.settings.item_format, context.typeToFolder, void 0, context.settings.schema);
|
|
3144
|
-
const
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
byStatus[candidateStatus] = (byStatus[candidateStatus] ?? 0) + 1;
|
|
3155
|
-
if (!isTerminalStatus(candidateStatus, statusRegistry)) {
|
|
3156
|
-
active += 1;
|
|
3157
|
-
}
|
|
3262
|
+
const rollup = buildItemChildrenRollup(context.locatedId, corpus, statusRegistry);
|
|
3263
|
+
return rollup.count > 0 || includeEmpty ? rollup : void 0;
|
|
3264
|
+
}
|
|
3265
|
+
function attachGetSchedule(result, context, fields, includeSchedule) {
|
|
3266
|
+
if (!includeSchedule) {
|
|
3267
|
+
return;
|
|
3268
|
+
}
|
|
3269
|
+
const schedule = buildItemSchedule(context.metadata);
|
|
3270
|
+
if (!schedule) {
|
|
3271
|
+
return;
|
|
3158
3272
|
}
|
|
3159
|
-
|
|
3273
|
+
if (fields === null || fieldsInclude(fields, "schedule")) {
|
|
3274
|
+
result.schedule = schedule;
|
|
3275
|
+
return;
|
|
3276
|
+
}
|
|
3277
|
+
result.schedule = Object.fromEntries(Object.entries(schedule).filter(([key]) => fields.some((field) => normalizeGetField(field) === `schedule.${key}`)));
|
|
3160
3278
|
}
|
|
3161
3279
|
async function buildGetTree(context, options, treeDepth, global) {
|
|
3162
3280
|
if (options.tree !== true) {
|
|
@@ -3178,8 +3296,8 @@ async function buildGetTree(context, options, treeDepth, global) {
|
|
|
3178
3296
|
}
|
|
3179
3297
|
async function runGet(id, global, options = {}) {
|
|
3180
3298
|
const projection = resolveGetProjection(options);
|
|
3181
|
-
const context = await loadGetItemContext(id, global);
|
|
3182
|
-
validateGetProjectionFields(projection.fields, context.settings);
|
|
3299
|
+
const context = await loadGetItemContext(id, global, options.at);
|
|
3300
|
+
validateGetProjectionFields(projection.fields, context.settings, context.historical !== void 0);
|
|
3183
3301
|
const includeBody = shouldIncludeGetField({ ...projection, field: "body" });
|
|
3184
3302
|
const includeLinked = shouldIncludeGetField({
|
|
3185
3303
|
...projection,
|
|
@@ -3189,12 +3307,8 @@ async function runGet(id, global, options = {}) {
|
|
|
3189
3307
|
...projection,
|
|
3190
3308
|
field: "claim_state"
|
|
3191
3309
|
});
|
|
3192
|
-
const
|
|
3193
|
-
const
|
|
3194
|
-
...projection,
|
|
3195
|
-
field: "children",
|
|
3196
|
-
itemType
|
|
3197
|
-
});
|
|
3310
|
+
const includeChildren = context.historical === void 0 && (projection.fieldProjection ? fieldsIncludeRoot(projection.fields, "children") : projection.depth !== "brief" && shouldAutoIncludeGetChildren(context.metadata.type));
|
|
3311
|
+
const includeSchedule = projection.fieldProjection ? fieldsIncludeRoot(projection.fields, "schedule") : projection.depth !== "brief";
|
|
3198
3312
|
const claimState = await resolveGetClaimState(context, includeClaimState);
|
|
3199
3313
|
const result = {
|
|
3200
3314
|
item: projection.fieldProjection ? projectItemForFields(context.metadata, projection.fields) : projectItemForDepth(context.metadata, projection.depth)
|
|
@@ -3206,16 +3320,24 @@ async function runGet(id, global, options = {}) {
|
|
|
3206
3320
|
if (claimState) {
|
|
3207
3321
|
result.claim_state = claimState;
|
|
3208
3322
|
}
|
|
3209
|
-
result
|
|
3323
|
+
attachGetSchedule(result, context, projection.fields, includeSchedule);
|
|
3324
|
+
result.children = await buildGetChildrenRollup(context, includeChildren, projection.fieldProjection);
|
|
3210
3325
|
result.tree = await buildGetTree(context, options, projection.treeDepth, global);
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3326
|
+
if (context.historical) {
|
|
3327
|
+
result.reconstructed = true;
|
|
3328
|
+
result.as_of_version = context.historical.as_of_version;
|
|
3329
|
+
result.as_of_timestamp = context.historical.as_of_timestamp;
|
|
3330
|
+
}
|
|
3331
|
+
if (context.historical === void 0) {
|
|
3332
|
+
try {
|
|
3333
|
+
await recordContextUsageTouches({
|
|
3334
|
+
pmRoot: context.pmRoot,
|
|
3335
|
+
author: (process.env.PM_AUTHOR ?? context.settings.author_default).trim() || "unknown",
|
|
3336
|
+
itemIds: [context.locatedId],
|
|
3337
|
+
intent: "get"
|
|
3338
|
+
});
|
|
3339
|
+
} catch {
|
|
3340
|
+
}
|
|
3219
3341
|
}
|
|
3220
3342
|
return result;
|
|
3221
3343
|
}
|
|
@@ -3224,8 +3346,13 @@ export {
|
|
|
3224
3346
|
runAggregate,
|
|
3225
3347
|
runSearch,
|
|
3226
3348
|
runEval,
|
|
3349
|
+
MAX_CHILD_PROJECTION_ITEMS,
|
|
3350
|
+
DEFAULT_CHILD_SAMPLE_LIMIT,
|
|
3351
|
+
buildItemChildrenRollup,
|
|
3352
|
+
itemHasSchedule,
|
|
3353
|
+
buildItemSchedule,
|
|
3227
3354
|
runGet
|
|
3228
3355
|
};
|
|
3229
|
-
//# sourceMappingURL=chunk-
|
|
3356
|
+
//# sourceMappingURL=chunk-ONG5V5CI.js.map
|
|
3230
3357
|
|
|
3231
|
-
//# debugId=
|
|
3358
|
+
//# debugId=9a21d12c-d2fd-5325-930c-dfc8bbfe8247
|