@unbrained/pm-cli 2026.6.19 → 2026.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +311 -258
- package/README.md +1 -1
- package/dist/cli/bootstrap-args.d.ts +12 -1
- package/dist/cli/bootstrap-args.js +20 -9
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +31 -25
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/completion.js +3 -3
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/eval.d.ts +62 -0
- package/dist/cli/commands/eval.js +158 -0
- package/dist/cli/commands/eval.js.map +1 -0
- package/dist/cli/commands/extension/install-sources.d.ts +12 -0
- package/dist/cli/commands/extension/install-sources.js +77 -10
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +12 -1
- package/dist/cli/commands/gc.js +53 -6
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/health.js +14 -8
- package/dist/cli/commands/health.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/linked-artifacts.js +13 -3
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/list.js +12 -9
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/plan.js +2 -2
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/restore.js +5 -11
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/search.d.ts +39 -1
- package/dist/cli/commands/search.js +89 -12
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/update.js +96 -58
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +9 -0
- package/dist/cli/extension-command-help.js +13 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.d.ts +8 -0
- package/dist/cli/extension-command-options.js +27 -2
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +15 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.d.ts +12 -0
- package/dist/cli/main.js +49 -9
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +34 -4
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-operations.js +3 -3
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-7G7NNNZQ.js +18 -0
- package/dist/cli-bundle/chunks/{activity-XJ7WRNWS.js → activity-KEEITOTB.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-OFT4YVB6.js → aggregate-5BTHOHW2.js} +10 -10
- package/dist/cli-bundle/chunks/{aggregate-LBCWF6UJ.js → aggregate-GB2LJNTZ.js} +10 -10
- package/dist/cli-bundle/chunks/{append-BP2ARHOK.js → append-BBM4MNVD.js} +8 -8
- package/dist/cli-bundle/chunks/{append-5U3XR5SD.js → append-BFV5UYWS.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-ZZEM2PH7.js → chunk-26OQTCGH.js} +19 -14
- package/dist/cli-bundle/chunks/chunk-26OQTCGH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RVG3WLY3.js → chunk-2LUNPA3U.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OURX4WVG.js → chunk-2QJLN4KM.js} +7 -7
- package/dist/cli-bundle/chunks/{search-2JX776KX.js → chunk-2ZY5SLNR.js} +184 -23
- package/dist/cli-bundle/chunks/chunk-2ZY5SLNR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AVMSP2HH.js → chunk-3KVCMB2M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FVZSUIN5.js → chunk-3WAKNI2W.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-H3DP6OUM.js → chunk-4KFL5OYK.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VG3B2CYD.js → chunk-4PW4C3ZB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SDUZTZ55.js → chunk-4S4INK3B.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-QCHNPN24.js → chunk-4YMX7XFI.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-QSH34DSQ.js → chunk-5MWA46UN.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UIMLAFOE.js → chunk-5XK2RYJR.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-B2NEFANY.js → chunk-6DZO5NN7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VP4Z36GO.js → chunk-6FSPWUBI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MPEWACTG.js → chunk-6KARQMC6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N7LDJRB4.js → chunk-6KSFULO6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XV6N3QND.js → chunk-6LTSLEHD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X26ODPU4.js → chunk-6Y7IQ6XN.js} +14 -18
- package/dist/cli-bundle/chunks/chunk-6Y7IQ6XN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-USKTNI7P.js → chunk-7MMXBIRZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UCNEPMPY.js → chunk-ACULWT7G.js} +105 -66
- package/dist/cli-bundle/chunks/chunk-ACULWT7G.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2K56AWDP.js → chunk-AOCYDQLT.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-ZBVYKWT2.js → chunk-ATRXPXAL.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-A5JPMD4Q.js → chunk-AW4PYYNF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I2VJM36R.js → chunk-AZ75OVK4.js} +20 -21
- package/dist/cli-bundle/chunks/chunk-AZ75OVK4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MTGMNUMJ.js → chunk-B3LROPTV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NPNNW5TU.js → chunk-BBSUVIIT.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-47BYN6CA.js → chunk-BYNJWB5F.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-PSWSQHM7.js → chunk-BZWIDTDE.js} +15 -19
- package/dist/cli-bundle/chunks/chunk-BZWIDTDE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-S673PVHD.js → chunk-CNPWCUDR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TYQBGXH2.js → chunk-DKWIPIJY.js} +2 -2
- package/dist/cli-bundle/chunks/{search-AZR2JITW.js → chunk-DYOJJTCG.js} +190 -22
- package/dist/cli-bundle/chunks/chunk-DYOJJTCG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Y4IBSEQ2.js → chunk-E4E7UQBT.js} +20 -8
- package/dist/cli-bundle/chunks/chunk-E4E7UQBT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HMQMRHQJ.js → chunk-EKMHDL6Z.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-LIVRA6VG.js → chunk-EOFROIC5.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-NNMBNN6Q.js → chunk-ETJKPURB.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-2E3KSWFG.js → chunk-F4EYOSNC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DJ3YYLHG.js → chunk-FA5O2DEG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-QTWWHFI3.js → chunk-FBBPCSJM.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-EMFDZ7N3.js → chunk-FSOJCFDS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-M35R7LFX.js → chunk-FXKPUMIR.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-YOGXK3ON.js → chunk-GF44HVZL.js} +18 -13
- package/dist/cli-bundle/chunks/chunk-GF44HVZL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UA4ANRJY.js → chunk-H3ZTSYPA.js} +71 -13
- package/dist/cli-bundle/chunks/chunk-H3ZTSYPA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-II3WDRCM.js → chunk-HWHZ7EY7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7R5YKVKO.js → chunk-ICEWMJYH.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UMTPQMEG.js → chunk-II4BRHKM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GDOTTY2S.js → chunk-IWKD7B33.js} +19 -2
- package/dist/cli-bundle/chunks/chunk-IWKD7B33.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QG6M6XQE.js → chunk-J7VSEFWB.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-22YA6GCA.js → chunk-K2LBDYDC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BQVESTOG.js → chunk-KCJZREBI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YWAYOWDQ.js → chunk-LTUB7ARL.js} +72 -14
- package/dist/cli-bundle/chunks/chunk-LTUB7ARL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DVUU3AHP.js → chunk-MFCFHL27.js} +17 -6
- package/dist/cli-bundle/chunks/chunk-MFCFHL27.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5P2LQV2F.js → chunk-MTQK5ZSB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LEC57E7K.js → chunk-NCGQ27PK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2RI3BDFK.js → chunk-NKTUBA2C.js} +10 -9
- package/dist/cli-bundle/chunks/chunk-NKTUBA2C.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5LZPDRFW.js → chunk-NMQNXH4U.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-COHNQLB2.js → chunk-OLEP5TJH.js} +20 -3
- package/dist/cli-bundle/chunks/chunk-OLEP5TJH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PRUB7RI4.js → chunk-OVSFW4KD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-4L7Q4OVT.js → chunk-PF5GLFPU.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-YVYJQR6S.js → chunk-QUTJOHGK.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-5QLHQK7V.js → chunk-QWAJPGEI.js} +25 -26
- package/dist/cli-bundle/chunks/chunk-QWAJPGEI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K5TD74VU.js → chunk-RADIHKJ3.js} +19 -7
- package/dist/cli-bundle/chunks/chunk-RADIHKJ3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CSRFOIHG.js → chunk-RICT5QYR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OUG4CL4H.js → chunk-RNKUCHUQ.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-X7RKOJXL.js → chunk-SL233DQD.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-USVOBLGB.js → chunk-U3WTMYBX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DYZKSIVX.js → chunk-VE3BUO3R.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FPQA4ZMA.js → chunk-VONJSFUW.js} +18 -7
- package/dist/cli-bundle/chunks/chunk-VONJSFUW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RNWE2HZR.js → chunk-W2ZESOQE.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-4BFNWAMQ.js → chunk-WFOITX4A.js} +29 -12
- package/dist/cli-bundle/chunks/chunk-WFOITX4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FP7YLQ52.js → chunk-WMQBNVZL.js} +11 -10
- package/dist/cli-bundle/chunks/chunk-WMQBNVZL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5SRID7DV.js → chunk-X3CD2VUI.js} +29 -12
- package/dist/cli-bundle/chunks/chunk-X3CD2VUI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GL3QKIET.js → chunk-XKJDCJEH.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-SO2IOH37.js → chunk-XNQ3YH6N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZGEWEO7B.js → chunk-XXGAWTH5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4EOS35RL.js → chunk-YBQF4CAW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MTDEEUGV.js → chunk-YT4Z2OVB.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5NS6TJ2F.js → chunk-ZHCSGIUX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MAKOMXVM.js → chunk-ZYG4TR32.js} +106 -67
- package/dist/cli-bundle/chunks/chunk-ZYG4TR32.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-2BSYPJTJ.js → claim-G57ZJLZ4.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-EZ6JKY5X.js → claim-TRSDQO6L.js} +10 -10
- package/dist/cli-bundle/chunks/{close-3TSX6BYF.js → close-4QMUQMON.js} +8 -8
- package/dist/cli-bundle/chunks/close-NNZZTZ5V.js +15 -0
- package/dist/cli-bundle/chunks/{close-many-B7DBVA46.js → close-many-3UWKJRQK.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-HB4UFCS3.js → close-many-A7U62CRI.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-M7PAINZT.js → comments-4EM7XR74.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-X7M7XM6I.js → comments-URWDZP2I.js} +10 -10
- package/dist/cli-bundle/chunks/{config-YICACPHA.js → config-GRJYZ2O3.js} +30 -10
- package/dist/cli-bundle/chunks/config-GRJYZ2O3.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-UWF3KRP5.js → config-PSZ5GWAK.js} +29 -9
- package/dist/cli-bundle/chunks/config-PSZ5GWAK.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-EGUGU4K7.js → context-A46YAV2F.js} +13 -13
- package/dist/cli-bundle/chunks/{context-V32ZAPL6.js → context-BCR34RKM.js} +13 -13
- package/dist/cli-bundle/chunks/{contracts-7G553BHP.js → contracts-HPT25X4D.js} +10 -8
- package/dist/cli-bundle/chunks/contracts-HPT25X4D.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-B2YWYUV5.js → contracts-JOPCQNDP.js} +10 -8
- package/dist/cli-bundle/chunks/contracts-JOPCQNDP.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-RMLXLZOL.js → copy-KBTIUW7L.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-NWFFRYWM.js → copy-X7V6AEDB.js} +7 -7
- package/dist/cli-bundle/chunks/create-4KOAQ6ME.js +30 -0
- package/dist/cli-bundle/chunks/{create-GK4MX2LJ.js → create-ZPZKJDFQ.js} +14 -14
- package/dist/cli-bundle/chunks/{delete-EFQLVEAS.js → delete-2ZI6CJZM.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-RMGNIL2S.js → delete-FGKVPUQZ.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-WKHUPVD3.js → deps-IUJOBF2H.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-K2I7QV4Y.js → deps-SJCEFU3C.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-2H2UGIT6.js → docs-2LXF5SVC.js} +12 -11
- package/dist/cli-bundle/chunks/{docs-2H2UGIT6.js.map → docs-2LXF5SVC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-3FXRDYA7.js → docs-UWJ75CKR.js} +10 -9
- package/dist/cli-bundle/chunks/{docs-3FXRDYA7.js.map → docs-UWJ75CKR.js.map} +1 -1
- package/dist/cli-bundle/chunks/eval-FRIDCTM2.js +276 -0
- package/dist/cli-bundle/chunks/eval-FRIDCTM2.js.map +1 -0
- package/dist/cli-bundle/chunks/eval-ZTT3F3SL.js +286 -0
- package/dist/cli-bundle/chunks/eval-ZTT3F3SL.js.map +7 -0
- package/dist/cli-bundle/chunks/{extension-4LPTFTV4.js → extension-VRYTNNSV.js} +5 -5
- package/dist/cli-bundle/chunks/{extension-ASUPTDCC.js → extension-XFQG3BXL.js} +5 -5
- package/dist/cli-bundle/chunks/{files-UAZFB3EA.js → files-AJOGTTAN.js} +10 -9
- package/dist/cli-bundle/chunks/{files-UAZFB3EA.js.map → files-AJOGTTAN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{files-TXEQOA7C.js → files-B2RUCA32.js} +12 -11
- package/dist/cli-bundle/chunks/{files-TXEQOA7C.js.map → files-B2RUCA32.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-UGROAMAX.js → focus-7N36RIMT.js} +8 -8
- package/dist/cli-bundle/chunks/{focus-ELOPN2SR.js → focus-CFE33IYC.js} +8 -8
- package/dist/cli-bundle/chunks/gc-OYJK4YBY.js +395 -0
- package/dist/cli-bundle/chunks/gc-OYJK4YBY.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-SBF2FGHK.js +385 -0
- package/dist/cli-bundle/chunks/gc-SBF2FGHK.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-OTXPLWYW.js → get-577VLZZ7.js} +11 -11
- package/dist/cli-bundle/chunks/{get-IWZ7IMPS.js → get-LLFWSPXW.js} +11 -11
- package/dist/cli-bundle/chunks/{health-PPTJ7XKW.js → health-C2PUT6JZ.js} +21 -22
- package/dist/cli-bundle/chunks/{health-PPTJ7XKW.js.map → health-C2PUT6JZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-JEBESKID.js → health-PBJS7W2T.js} +20 -21
- package/dist/cli-bundle/chunks/{health-JEBESKID.js.map → health-PBJS7W2T.js.map} +2 -2
- package/dist/cli-bundle/chunks/{history-HNWBUDMI.js → history-4FJK6Y3O.js} +10 -10
- package/dist/cli-bundle/chunks/history-ZXNWG6H4.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-EQXVPK3V.js → history-compact-AXR6R6GU.js} +12 -12
- package/dist/cli-bundle/chunks/{history-compact-MMQC7MCW.js → history-compact-HXF3OT7G.js} +12 -12
- package/dist/cli-bundle/chunks/history-redact-GV633Z4H.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-UBDHBEJE.js → history-redact-UMPD4G3K.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-GMMHFAGH.js → history-repair-WHOK2ICG.js} +12 -12
- package/dist/cli-bundle/chunks/{history-repair-7DSDRPMX.js → history-repair-X57HE5EA.js} +12 -12
- package/dist/cli-bundle/chunks/init-KQWZSNBX.js +20 -0
- package/dist/cli-bundle/chunks/{init-QGK4JFF6.js → init-N7MIIYCU.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-A6DGBMG3.js → learnings-FPG7WAVW.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-DR53TWRA.js → learnings-GZRBIEAN.js} +10 -10
- package/dist/cli-bundle/chunks/{list-LJ5DBXC3.js → list-MZBCSKLU.js} +10 -10
- package/dist/cli-bundle/chunks/{list-KOJN23UL.js → list-ZDQ2OBSO.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-K5I3TAYR.js → notes-LW53PFLH.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-7VLTHKPW.js → notes-WQAP67EC.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-X3STKLED.js → plan-AVJ4VJQO.js} +15 -15
- package/dist/cli-bundle/chunks/plan-AVJ4VJQO.js.map +7 -0
- package/dist/cli-bundle/chunks/{plan-BK3OMLGP.js → plan-VZKICKIJ.js} +16 -16
- package/dist/cli-bundle/chunks/plan-VZKICKIJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-FUMXPWZ4.js → register-list-query-7BD6ZHU5.js} +42 -21
- package/dist/cli-bundle/chunks/register-list-query-7BD6ZHU5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-XDLFESU7.js → register-list-query-CM4SVAQA.js} +43 -22
- package/dist/cli-bundle/chunks/register-list-query-CM4SVAQA.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-ZAGVKMBQ.js → register-mutation-ANZIWHUF.js} +33 -33
- package/dist/cli-bundle/chunks/{register-mutation-RXRX4P7D.js → register-mutation-PLFHAS4N.js} +33 -33
- package/dist/cli-bundle/chunks/{register-operations-DGSHCS75.js → register-operations-KQPQIFF2.js} +35 -35
- package/dist/cli-bundle/chunks/register-operations-KQPQIFF2.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-6UURPZN5.js → register-operations-VLGCAWIW.js} +34 -34
- package/dist/cli-bundle/chunks/{register-operations-6UURPZN5.js.map → register-operations-VLGCAWIW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-2FEGSFLM.js → register-setup-KPTZ36D4.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-LTJG52WP.js → register-setup-TMEF6V7O.js} +15 -15
- package/dist/cli-bundle/chunks/{restore-SJUWYOCK.js → restore-64JKQV7G.js} +11 -11
- package/dist/cli-bundle/chunks/restore-GKM26SAW.js +19 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-W4F2LKHW.js → scheduling-shortcuts-4ION7QAX.js} +14 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-VWAMP2S2.js → scheduling-shortcuts-X6D6VSZR.js} +14 -14
- package/dist/cli-bundle/chunks/{schema-N5ETYD4P.js → schema-OA4RSVMI.js} +9 -9
- package/dist/cli-bundle/chunks/{schema-DXQRIEFM.js → schema-TA3NF3RG.js} +9 -9
- package/dist/cli-bundle/chunks/search-INCM5I4J.js +33 -0
- package/dist/cli-bundle/chunks/search-UAIHEQZL.js +37 -0
- package/dist/cli-bundle/chunks/{stats-J563NJBY.js → stats-RHEMG4CE.js} +8 -8
- package/dist/cli-bundle/chunks/{stats-ZFESFVQC.js → stats-WQWTIA5Y.js} +8 -8
- package/dist/cli-bundle/chunks/{telemetry-BNGLIFEM.js → telemetry-G6UKGKJU.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-SC7HPRXX.js → telemetry-XA5D2QEO.js} +4 -4
- package/dist/cli-bundle/chunks/{test-55RJCGRU.js → test-XF7BYLMZ.js} +15 -15
- package/dist/cli-bundle/chunks/{test-47UQGEXE.js → test-ZMQF23P3.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-DN6KG4FX.js → test-all-WUBBJCPU.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-5SFTTRNL.js → test-all-ZNQBMUOI.js} +15 -15
- package/dist/cli-bundle/chunks/{test-runs-DZEDJ4GH.js → test-runs-N7LI7HLH.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-NHRBT7SN.js → test-runs-RFA42EEX.js} +5 -5
- package/dist/cli-bundle/chunks/update-CPNOG73P.js +24 -0
- package/dist/cli-bundle/chunks/update-CPNOG73P.js.map +7 -0
- package/dist/cli-bundle/chunks/update-T5AYT6ZN.js +28 -0
- package/dist/cli-bundle/chunks/update-T5AYT6ZN.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-OKYWFCBO.js → update-many-6XFR7TFG.js} +23 -23
- package/dist/cli-bundle/chunks/{update-many-IRNV3OTG.js → update-many-NMRUQZL2.js} +23 -23
- package/dist/cli-bundle/chunks/{upgrade-KP4I45V5.js → upgrade-EJTME2YQ.js} +5 -5
- package/dist/cli-bundle/chunks/{upgrade-3RIAFQIK.js → upgrade-QMCSONWR.js} +5 -5
- package/dist/cli-bundle/chunks/{validate-GVY4VE43.js → validate-3SUCHXXX.js} +21 -21
- package/dist/cli-bundle/chunks/{validate-ADKGN37M.js → validate-KIIJY5RC.js} +21 -21
- package/dist/cli-bundle/main.js +133 -55
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/checkpoint/checkpoint-gc.d.ts +69 -0
- package/dist/core/checkpoint/checkpoint-gc.js +175 -0
- package/dist/core/checkpoint/checkpoint-gc.js.map +1 -0
- package/dist/core/config/nested-settings.js +22 -2
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +19 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +0 -9
- package/dist/core/extensions/extension-types.js +2 -27
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/fs/fs-utils.d.ts +17 -1
- package/dist/core/fs/fs-utils.js +19 -3
- package/dist/core/fs/fs-utils.js.map +1 -1
- package/dist/core/history/drift-scan.d.ts +17 -5
- package/dist/core/history/drift-scan.js +22 -14
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/history/replay.d.ts +7 -0
- package/dist/core/history/replay.js +11 -6
- package/dist/core/history/replay.js.map +1 -1
- package/dist/core/item/status-filter.d.ts +7 -3
- package/dist/core/item/status-filter.js +26 -5
- package/dist/core/item/status-filter.js.map +1 -1
- package/dist/core/search/bm25.d.ts +113 -0
- package/dist/core/search/bm25.js +178 -0
- package/dist/core/search/bm25.js.map +1 -0
- package/dist/core/search/eval.d.ts +114 -0
- package/dist/core/search/eval.js +217 -0
- package/dist/core/search/eval.js.map +1 -0
- package/dist/core/sentry/instrument.d.ts +14 -0
- package/dist/core/sentry/instrument.js +43 -3
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/constants.js +5 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/paths.js +4 -3
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +7 -0
- package/dist/core/store/settings-validator.js +10 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +6 -2
- package/dist/core/store/settings.js.map +1 -1
- package/dist/mcp/tool-definitions.js +4 -3
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +3 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +4 -4
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +11 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/types.d.ts +19 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -0
- package/docs/ARCHITECTURE.md +124 -11
- package/docs/CLAUDE_CODE_PLUGIN.md +5 -13
- package/docs/COMMANDS.md +55 -5
- package/docs/CONFIGURATION.md +39 -0
- package/docs/EXTENSIONS.md +2 -2
- package/docs/MIGRATION_CLI_SIMPLIFICATION.md +9 -2
- package/docs/QUICKSTART.md +2 -0
- package/docs/README.md +2 -0
- package/docs/RELEASING.md +2 -1
- package/docs/SDK.md +9 -1
- package/docs/TESTING.md +18 -0
- package/package.json +4 -3
- package/packages/pm-todos/extensions/todos/index.js +2 -0
- package/packages/pm-todos/extensions/todos/index.ts +2 -0
- package/packages/pm-todos/extensions/todos/runtime.js +1 -1
- package/packages/pm-todos/extensions/todos/runtime.ts +4 -1
- package/dist/cli-bundle/chunks/activity-62I26XZB.js +0 -18
- package/dist/cli-bundle/chunks/chunk-2RI3BDFK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4BFNWAMQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5QLHQK7V.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5SRID7DV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-COHNQLB2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DVUU3AHP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FP7YLQ52.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FPQA4ZMA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GDOTTY2S.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-I2VJM36R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K5TD74VU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MAKOMXVM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PSWSQHM7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UA4ANRJY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UCNEPMPY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-X26ODPU4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y4IBSEQ2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YOGXK3ON.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YWAYOWDQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZZEM2PH7.js.map +0 -1
- package/dist/cli-bundle/chunks/close-TQZK43Z5.js +0 -15
- package/dist/cli-bundle/chunks/config-UWF3KRP5.js.map +0 -7
- package/dist/cli-bundle/chunks/config-YICACPHA.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-7G553BHP.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-B2YWYUV5.js.map +0 -7
- package/dist/cli-bundle/chunks/create-UZLJXHLA.js +0 -30
- package/dist/cli-bundle/chunks/gc-5RTYXLQU.js +0 -211
- package/dist/cli-bundle/chunks/gc-5RTYXLQU.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-FK5732EK.js +0 -208
- package/dist/cli-bundle/chunks/gc-FK5732EK.js.map +0 -1
- package/dist/cli-bundle/chunks/history-TKTULEVE.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-SPIFIXVY.js +0 -21
- package/dist/cli-bundle/chunks/init-A6FTZ5UC.js +0 -20
- package/dist/cli-bundle/chunks/plan-BK3OMLGP.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-X3STKLED.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-FUMXPWZ4.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-XDLFESU7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-DGSHCS75.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-PI3WM4GK.js +0 -19
- package/dist/cli-bundle/chunks/search-2JX776KX.js.map +0 -1
- package/dist/cli-bundle/chunks/search-AZR2JITW.js.map +0 -7
- package/dist/cli-bundle/chunks/update-2BZEAI7B.js +0 -24
- package/dist/cli-bundle/chunks/update-GCNLER2H.js +0 -28
- /package/dist/cli-bundle/chunks/{activity-62I26XZB.js.map → activity-7G7NNNZQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-XJ7WRNWS.js.map → activity-KEEITOTB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-OFT4YVB6.js.map → aggregate-5BTHOHW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-LBCWF6UJ.js.map → aggregate-GB2LJNTZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-BP2ARHOK.js.map → append-BBM4MNVD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-5U3XR5SD.js.map → append-BFV5UYWS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RVG3WLY3.js.map → chunk-2LUNPA3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OURX4WVG.js.map → chunk-2QJLN4KM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AVMSP2HH.js.map → chunk-3KVCMB2M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FVZSUIN5.js.map → chunk-3WAKNI2W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H3DP6OUM.js.map → chunk-4KFL5OYK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VG3B2CYD.js.map → chunk-4PW4C3ZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDUZTZ55.js.map → chunk-4S4INK3B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCHNPN24.js.map → chunk-4YMX7XFI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QSH34DSQ.js.map → chunk-5MWA46UN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UIMLAFOE.js.map → chunk-5XK2RYJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B2NEFANY.js.map → chunk-6DZO5NN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VP4Z36GO.js.map → chunk-6FSPWUBI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MPEWACTG.js.map → chunk-6KARQMC6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N7LDJRB4.js.map → chunk-6KSFULO6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XV6N3QND.js.map → chunk-6LTSLEHD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-USKTNI7P.js.map → chunk-7MMXBIRZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2K56AWDP.js.map → chunk-AOCYDQLT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZBVYKWT2.js.map → chunk-ATRXPXAL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A5JPMD4Q.js.map → chunk-AW4PYYNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTGMNUMJ.js.map → chunk-B3LROPTV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NPNNW5TU.js.map → chunk-BBSUVIIT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-47BYN6CA.js.map → chunk-BYNJWB5F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S673PVHD.js.map → chunk-CNPWCUDR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TYQBGXH2.js.map → chunk-DKWIPIJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HMQMRHQJ.js.map → chunk-EKMHDL6Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LIVRA6VG.js.map → chunk-EOFROIC5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NNMBNN6Q.js.map → chunk-ETJKPURB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2E3KSWFG.js.map → chunk-F4EYOSNC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DJ3YYLHG.js.map → chunk-FA5O2DEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QTWWHFI3.js.map → chunk-FBBPCSJM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EMFDZ7N3.js.map → chunk-FSOJCFDS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M35R7LFX.js.map → chunk-FXKPUMIR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-II3WDRCM.js.map → chunk-HWHZ7EY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7R5YKVKO.js.map → chunk-ICEWMJYH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UMTPQMEG.js.map → chunk-II4BRHKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QG6M6XQE.js.map → chunk-J7VSEFWB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22YA6GCA.js.map → chunk-K2LBDYDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BQVESTOG.js.map → chunk-KCJZREBI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5P2LQV2F.js.map → chunk-MTQK5ZSB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LEC57E7K.js.map → chunk-NCGQ27PK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5LZPDRFW.js.map → chunk-NMQNXH4U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PRUB7RI4.js.map → chunk-OVSFW4KD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4L7Q4OVT.js.map → chunk-PF5GLFPU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVYJQR6S.js.map → chunk-QUTJOHGK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CSRFOIHG.js.map → chunk-RICT5QYR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUG4CL4H.js.map → chunk-RNKUCHUQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X7RKOJXL.js.map → chunk-SL233DQD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-USVOBLGB.js.map → chunk-U3WTMYBX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DYZKSIVX.js.map → chunk-VE3BUO3R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RNWE2HZR.js.map → chunk-W2ZESOQE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GL3QKIET.js.map → chunk-XKJDCJEH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SO2IOH37.js.map → chunk-XNQ3YH6N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZGEWEO7B.js.map → chunk-XXGAWTH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4EOS35RL.js.map → chunk-YBQF4CAW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTDEEUGV.js.map → chunk-YT4Z2OVB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5NS6TJ2F.js.map → chunk-ZHCSGIUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-2BSYPJTJ.js.map → claim-G57ZJLZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-EZ6JKY5X.js.map → claim-TRSDQO6L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3TSX6BYF.js.map → close-4QMUQMON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TQZK43Z5.js.map → close-NNZZTZ5V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-B7DBVA46.js.map → close-many-3UWKJRQK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-HB4UFCS3.js.map → close-many-A7U62CRI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-M7PAINZT.js.map → comments-4EM7XR74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-X7M7XM6I.js.map → comments-URWDZP2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-EGUGU4K7.js.map → context-A46YAV2F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-V32ZAPL6.js.map → context-BCR34RKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-RMLXLZOL.js.map → copy-KBTIUW7L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NWFFRYWM.js.map → copy-X7V6AEDB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-UZLJXHLA.js.map → create-4KOAQ6ME.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-GK4MX2LJ.js.map → create-ZPZKJDFQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-EFQLVEAS.js.map → delete-2ZI6CJZM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RMGNIL2S.js.map → delete-FGKVPUQZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WKHUPVD3.js.map → deps-IUJOBF2H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-K2I7QV4Y.js.map → deps-SJCEFU3C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-4LPTFTV4.js.map → extension-VRYTNNSV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ASUPTDCC.js.map → extension-XFQG3BXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-UGROAMAX.js.map → focus-7N36RIMT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-ELOPN2SR.js.map → focus-CFE33IYC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-OTXPLWYW.js.map → get-577VLZZ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-IWZ7IMPS.js.map → get-LLFWSPXW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-HNWBUDMI.js.map → history-4FJK6Y3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-TKTULEVE.js.map → history-ZXNWG6H4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-EQXVPK3V.js.map → history-compact-AXR6R6GU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-MMQC7MCW.js.map → history-compact-HXF3OT7G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-SPIFIXVY.js.map → history-redact-GV633Z4H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-UBDHBEJE.js.map → history-redact-UMPD4G3K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-GMMHFAGH.js.map → history-repair-WHOK2ICG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-7DSDRPMX.js.map → history-repair-X57HE5EA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-A6FTZ5UC.js.map → init-KQWZSNBX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-QGK4JFF6.js.map → init-N7MIIYCU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-A6DGBMG3.js.map → learnings-FPG7WAVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-DR53TWRA.js.map → learnings-GZRBIEAN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-LJ5DBXC3.js.map → list-MZBCSKLU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-KOJN23UL.js.map → list-ZDQ2OBSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-K5I3TAYR.js.map → notes-LW53PFLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-7VLTHKPW.js.map → notes-WQAP67EC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-ZAGVKMBQ.js.map → register-mutation-ANZIWHUF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-RXRX4P7D.js.map → register-mutation-PLFHAS4N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-2FEGSFLM.js.map → register-setup-KPTZ36D4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-LTJG52WP.js.map → register-setup-TMEF6V7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-SJUWYOCK.js.map → restore-64JKQV7G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PI3WM4GK.js.map → restore-GKM26SAW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-W4F2LKHW.js.map → scheduling-shortcuts-4ION7QAX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-VWAMP2S2.js.map → scheduling-shortcuts-X6D6VSZR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-N5ETYD4P.js.map → schema-OA4RSVMI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-DXQRIEFM.js.map → schema-TA3NF3RG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-55RJCGRU.js.map → search-INCM5I4J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-47UQGEXE.js.map → search-UAIHEQZL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-J563NJBY.js.map → stats-RHEMG4CE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-ZFESFVQC.js.map → stats-WQWTIA5Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-BNGLIFEM.js.map → telemetry-G6UKGKJU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-SC7HPRXX.js.map → telemetry-XA5D2QEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2BZEAI7B.js.map → test-XF7BYLMZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-GCNLER2H.js.map → test-ZMQF23P3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-DN6KG4FX.js.map → test-all-WUBBJCPU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-5SFTTRNL.js.map → test-all-ZNQBMUOI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-DZEDJ4GH.js.map → test-runs-N7LI7HLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-NHRBT7SN.js.map → test-runs-RFA42EEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-OKYWFCBO.js.map → update-many-6XFR7TFG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-IRNV3OTG.js.map → update-many-NMRUQZL2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-KP4I45V5.js.map → upgrade-EJTME2YQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-3RIAFQIK.js.map → upgrade-QMCSONWR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-GVY4VE43.js.map → validate-3SUCHXXX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-ADKGN37M.js.map → validate-KIIJY5RC.js.map} +0 -0
|
@@ -12,10 +12,7 @@ import {
|
|
|
12
12
|
parseLinkedTestMinLines,
|
|
13
13
|
parseLinkedTestRegexList,
|
|
14
14
|
parseLinkedTestStringList
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
getFocusedItem
|
|
18
|
-
} from "./chunk-RVG3WLY3.js";
|
|
15
|
+
} from "./chunk-II4BRHKM.js";
|
|
19
16
|
import {
|
|
20
17
|
assertNoUnknownCsvKeys,
|
|
21
18
|
createStdinTokenResolver,
|
|
@@ -24,18 +21,21 @@ import {
|
|
|
24
21
|
parseCsvKv,
|
|
25
22
|
parseOptionalNumber,
|
|
26
23
|
parseTags
|
|
27
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NCGQ27PK.js";
|
|
25
|
+
import {
|
|
26
|
+
getFocusedItem
|
|
27
|
+
} from "./chunk-2LUNPA3U.js";
|
|
28
28
|
import {
|
|
29
29
|
normalizeParentReferenceValue,
|
|
30
30
|
validateMissingParentReference,
|
|
31
31
|
validateSprintOrReleaseValue
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XXGAWTH5.js";
|
|
33
33
|
import {
|
|
34
34
|
buildInvalidTypeError
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-RICT5QYR.js";
|
|
36
36
|
import {
|
|
37
37
|
printError
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-F4EYOSNC.js";
|
|
39
39
|
import {
|
|
40
40
|
acquireLock,
|
|
41
41
|
appendHistoryEntry,
|
|
@@ -44,18 +44,18 @@ import {
|
|
|
44
44
|
createHistoryEntry,
|
|
45
45
|
locateItem,
|
|
46
46
|
parseRegisteredItemFieldAssignments
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-XKJDCJEH.js";
|
|
48
48
|
import {
|
|
49
49
|
generateItemId,
|
|
50
50
|
normalizeItemId
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-K2LBDYDC.js";
|
|
52
52
|
import {
|
|
53
53
|
canonicalDocument,
|
|
54
54
|
collectRuntimeCreateFieldValues,
|
|
55
55
|
normalizeFrontMatter,
|
|
56
56
|
normalizeStatusInput,
|
|
57
57
|
serializeItemDocument
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-FSOJCFDS.js";
|
|
59
59
|
import {
|
|
60
60
|
canonicalizeCommandOptionKey,
|
|
61
61
|
commandOptionFlagLabel,
|
|
@@ -64,11 +64,11 @@ import {
|
|
|
64
64
|
resolveTypeDefinition,
|
|
65
65
|
resolveTypeName,
|
|
66
66
|
validateTypeOptions
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-KCJZREBI.js";
|
|
68
68
|
import {
|
|
69
69
|
nowIso,
|
|
70
70
|
resolveIsoOrRelative
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-MTQK5ZSB.js";
|
|
72
72
|
import {
|
|
73
73
|
CONFIDENCE_TEXT_VALUES,
|
|
74
74
|
CREATE_DIRECT_CLOSE_REASON_DEFAULT,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
runActiveOnWriteHooks,
|
|
100
100
|
weekdayOrderIndex,
|
|
101
101
|
writeFileAtomic
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-AZ75OVK4.js";
|
|
103
103
|
|
|
104
104
|
// dist/core/item/priority.js
|
|
105
105
|
var PRIORITY_NAME_TO_VALUE = {
|
|
@@ -1977,6 +1977,6 @@ export {
|
|
|
1977
1977
|
runCreate,
|
|
1978
1978
|
_testOnlyCreateCommand
|
|
1979
1979
|
};
|
|
1980
|
-
//# sourceMappingURL=chunk-
|
|
1980
|
+
//# sourceMappingURL=chunk-W2ZESOQE.js.map
|
|
1981
1981
|
|
|
1982
1982
|
//# debugId=dd613437-a3c2-555c-9100-92271fb1f1db
|
|
@@ -8,33 +8,33 @@ import {
|
|
|
8
8
|
hasMissingMetadataFilter,
|
|
9
9
|
itemMatchesMissingMetadata,
|
|
10
10
|
lifecycleClassifierFromStatusRegistry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7MMXBIRZ.js";
|
|
12
12
|
import {
|
|
13
13
|
parseIntegerLimit,
|
|
14
14
|
parsePriority,
|
|
15
15
|
parseType
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VE3BUO3R.js";
|
|
17
17
|
import {
|
|
18
18
|
HEAVY_METADATA_KEYS,
|
|
19
19
|
listAllFrontMatter,
|
|
20
20
|
listAllFrontMatterLight,
|
|
21
21
|
listAllFrontMatterWithBody,
|
|
22
22
|
toItemRecord
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SL233DQD.js";
|
|
24
24
|
import {
|
|
25
25
|
coerceRuntimeFieldValue,
|
|
26
26
|
isTerminalStatus,
|
|
27
27
|
normalizeStatusInput,
|
|
28
28
|
readRuntimeFieldOptionValue
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5MWA46UN.js";
|
|
30
30
|
import {
|
|
31
31
|
resolveItemTypeRegistry
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XNQ3YH6N.js";
|
|
33
33
|
import {
|
|
34
34
|
compareTimestampStrings,
|
|
35
35
|
nowIso,
|
|
36
36
|
resolveIsoOrRelative
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-B3LROPTV.js";
|
|
38
38
|
import {
|
|
39
39
|
EXIT_CODE,
|
|
40
40
|
FRONT_MATTER_KEY_ORDER,
|
|
@@ -48,13 +48,13 @@ import {
|
|
|
48
48
|
resolveRuntimeFieldRegistry,
|
|
49
49
|
resolveRuntimeStatusRegistry,
|
|
50
50
|
stableValueEquals
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QWAJPGEI.js";
|
|
52
52
|
|
|
53
53
|
// dist/core/item/status-filter.js
|
|
54
54
|
!(function() {
|
|
55
55
|
try {
|
|
56
56
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
57
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
57
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "68b0f67b-4043-5b34-a8ed-39f5d6baea42");
|
|
58
58
|
} catch (e2) {
|
|
59
59
|
}
|
|
60
60
|
})();
|
|
@@ -64,6 +64,14 @@ var STATUS_GROUP_ALIASES = {
|
|
|
64
64
|
canceled: "canceled_status",
|
|
65
65
|
cancelled: "canceled_status"
|
|
66
66
|
};
|
|
67
|
+
var STATUS_ALL_SENTINEL = "all";
|
|
68
|
+
function isStatusAllFilterInput(raw) {
|
|
69
|
+
if (typeof raw !== "string") {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
const tokens = raw.split(",").map((entry) => entry.trim().toLowerCase()).filter((entry) => entry.length > 0);
|
|
73
|
+
return tokens.length === 1 && tokens[0] === STATUS_ALL_SENTINEL;
|
|
74
|
+
}
|
|
67
75
|
function resolveStatusFilterToken(token, registry) {
|
|
68
76
|
const trimmed = token.trim().toLowerCase();
|
|
69
77
|
if (trimmed.length === 0) {
|
|
@@ -108,6 +116,13 @@ function parseStatusFilterCsv(raw, registry, options) {
|
|
|
108
116
|
if (tokens.length === 0) {
|
|
109
117
|
return void 0;
|
|
110
118
|
}
|
|
119
|
+
const allTokenCount = tokens.filter((token) => token.trim().toLowerCase() === STATUS_ALL_SENTINEL).length;
|
|
120
|
+
if (allTokenCount > 0) {
|
|
121
|
+
if (tokens.length === 1) {
|
|
122
|
+
return void 0;
|
|
123
|
+
}
|
|
124
|
+
throw new PmCliError(`Invalid ${flagLabel} value "all". Use it by itself, or omit ${flagLabel} to search every status.`, EXIT_CODE.USAGE);
|
|
125
|
+
}
|
|
111
126
|
const resolved = [];
|
|
112
127
|
for (const token of tokens) {
|
|
113
128
|
const status = resolveStatusFilterToken(token, registry);
|
|
@@ -174,7 +189,7 @@ function matchesRuntimeFilters(item, filters) {
|
|
|
174
189
|
!(function() {
|
|
175
190
|
try {
|
|
176
191
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
177
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
192
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0d0d9216-eb0d-5b1a-bc68-6731c7e9266e");
|
|
178
193
|
} catch (e2) {
|
|
179
194
|
}
|
|
180
195
|
})();
|
|
@@ -808,9 +823,10 @@ async function runList(status, options, global2) {
|
|
|
808
823
|
}
|
|
809
824
|
const explicitStatus = resolveStatusFilter(options.status, statusRegistry);
|
|
810
825
|
const resolvedStatus = explicitStatus ?? resolveStatusFilter(status, statusRegistry);
|
|
811
|
-
const
|
|
826
|
+
const explicitAllStatuses = isStatusAllFilterInput(options.status);
|
|
827
|
+
const effectiveOptions = explicitStatus || explicitAllStatuses ? { ...options, excludeTerminal: false } : options;
|
|
812
828
|
const filtered = applyFilters(items, resolvedStatus, effectiveOptions, typeRegistry, statusRegistry, runtimeFieldFilters);
|
|
813
|
-
const filtersStatus = resolvedStatus === void 0 ? null : resolvedStatus.length === 1 ? resolvedStatus[0] : resolvedStatus;
|
|
829
|
+
const filtersStatus = explicitAllStatuses ? "all" : resolvedStatus === void 0 ? null : resolvedStatus.length === 1 ? resolvedStatus[0] : resolvedStatus;
|
|
814
830
|
const sorted = sortItems(filtered, sortField, sortOrder, statusRegistry);
|
|
815
831
|
const ordered = treeEnabled ? orderItemsAsTree(sorted, parentRoot, treeDepth) : sorted;
|
|
816
832
|
const noTruncate = options.noTruncate === true;
|
|
@@ -921,6 +937,7 @@ var _testOnly = {
|
|
|
921
937
|
};
|
|
922
938
|
|
|
923
939
|
export {
|
|
940
|
+
isStatusAllFilterInput,
|
|
924
941
|
parseStatusFilterCsv,
|
|
925
942
|
collectRuntimeFilterValues,
|
|
926
943
|
matchesRuntimeFilters,
|
|
@@ -933,4 +950,4 @@ export {
|
|
|
933
950
|
runList,
|
|
934
951
|
_testOnly
|
|
935
952
|
};
|
|
936
|
-
//# sourceMappingURL=chunk-
|
|
953
|
+
//# sourceMappingURL=chunk-WFOITX4A.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../core/item/status-filter.ts", "../../../../../../../../core/schema/runtime-field-filters.ts", "../../../../../../../../cli/commands/list.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module core/item/status-filter\n *\n * Defines item parsing, formatting, and lifecycle helpers for Status Filter.\n */\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { levenshteinDistanceWithinLimit } from \"../shared/levenshtein.js\";\nimport type { RuntimeStatusRegistry } from \"../schema/runtime-schema.js\";\nimport type { ItemStatus } from \"../../types/index.js\";\nimport { normalizeStatusInput } from \"./status.js\";\n\n// Workflow-group aliases shared by every status-filter consumer so that the\n// agent-friendly `open`/`closed`/`canceled` shorthands resolve to whatever the\n// runtime workflow has configured as its open/close/cancel anchors, rather than\n// hardcoding the built-in status ids. `cancelled` is accepted as a spelling\n// variant of `canceled`.\nconst STATUS_GROUP_ALIASES: Readonly<Record<string, \"open_status\" | \"close_status\" | \"canceled_status\">> = {\n open: \"open_status\",\n closed: \"close_status\",\n canceled: \"canceled_status\",\n cancelled: \"canceled_status\",\n};\n\nconst STATUS_ALL_SENTINEL = \"all\";\n\n/** Return true when a status-filter input is the standalone all-status sentinel. */\nexport function isStatusAllFilterInput(raw: unknown): boolean {\n if (typeof raw !== \"string\") {\n return false;\n }\n const tokens = raw\n .split(\",\")\n .map((entry) => entry.trim().toLowerCase())\n .filter((entry) => entry.length > 0);\n return tokens.length === 1 && tokens[0] === STATUS_ALL_SENTINEL;\n}\n\n/**\n * Resolve a single status-filter token to a concrete runtime status id.\n *\n * Returns `undefined` when the token is not a recognized workflow-group alias\n * (open/closed/canceled) and does not normalize to a known registry status.\n * Callers decide whether an unrecognized token is an error (strict mode) or is\n * passed through verbatim (lenient mode) — see {@link parseStatusFilterCsv}.\n */\nexport function resolveStatusFilterToken(\n token: string,\n registry: RuntimeStatusRegistry,\n): ItemStatus | undefined {\n const trimmed = token.trim().toLowerCase();\n if (trimmed.length === 0) {\n return undefined;\n }\n const group = STATUS_GROUP_ALIASES[trimmed];\n if (group) {\n return registry[group] as ItemStatus;\n }\n return normalizeStatusInput(token, registry);\n}\n\nfunction collectStatusSuggestionCandidates(registry: RuntimeStatusRegistry): string[] {\n const candidates = new Set<string>(Object.keys(STATUS_GROUP_ALIASES));\n for (const definition of registry.definitions) {\n candidates.add(definition.id);\n for (const alias of definition.aliases) {\n candidates.add(alias);\n }\n }\n return [...candidates];\n}\n\nfunction suggestClosestStatus(value: string, registry: RuntimeStatusRegistry): string | undefined {\n // Only ever called for an unresolved, already-non-empty token (parseStatusFilterCsv\n // filters blanks first), so no empty-input guard is needed here.\n const normalized = value.trim().toLowerCase();\n let best: string | undefined;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const candidate of collectStatusSuggestionCandidates(registry)) {\n const distance = levenshteinDistanceWithinLimit(normalized, candidate.toLowerCase(), 2);\n if (distance !== null && distance < bestDistance) {\n best = candidate;\n bestDistance = distance;\n }\n }\n return best;\n}\n\n/**\n * Documents the parse status filter options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ParseStatusFilterOptions {\n /**\n * When true, an unrecognized token throws a USAGE error with a did-you-mean\n * hint. When false (default), an unrecognized token is passed through\n * verbatim so custom/unknown statuses still compare against item values by\n * their raw string — preserving the long-standing lenient `pm list` behavior.\n */\n strict?: boolean;\n /** Flag label used in error messages (default: \"--status\"). */\n flagLabel?: string;\n}\n\n/**\n * Parse a comma-separated status filter into a de-duplicated list of concrete\n * status ids. A standalone `all` sentinel intentionally resolves to no filter\n * so duplicate-discovery loops can search every lifecycle bucket with the same\n * `--status` flag shape. Shared by `pm list` (lenient) and `pm search`\n * (strict, with a did-you-mean hint on typos) so both surfaces resolve the\n * open/closed/canceled workflow-group aliases identically.\n */\nexport function parseStatusFilterCsv(\n raw: unknown,\n registry: RuntimeStatusRegistry,\n options?: ParseStatusFilterOptions,\n): ItemStatus[] | undefined {\n if (typeof raw !== \"string\") {\n return undefined;\n }\n const strict = options?.strict === true;\n const flagLabel = options?.flagLabel ?? \"--status\";\n const tokens = raw\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (tokens.length === 0) {\n return undefined;\n }\n const allTokenCount = tokens.filter((token) => token.trim().toLowerCase() === STATUS_ALL_SENTINEL).length;\n if (allTokenCount > 0) {\n if (tokens.length === 1) {\n return undefined;\n }\n throw new PmCliError(\n `Invalid ${flagLabel} value \"all\". Use it by itself, or omit ${flagLabel} to search every status.`,\n EXIT_CODE.USAGE,\n );\n }\n const resolved: ItemStatus[] = [];\n for (const token of tokens) {\n const status = resolveStatusFilterToken(token, registry);\n if (status === undefined) {\n if (strict) {\n const suggestion = suggestClosestStatus(token, registry);\n throw new PmCliError(\n `Invalid ${flagLabel} value \"${token}\". Use open|closed|canceled or a configured status id${\n suggestion ? `. Did you mean \"${suggestion}\"?` : \".\"\n }`,\n EXIT_CODE.USAGE,\n );\n }\n resolved.push(token as ItemStatus);\n continue;\n }\n resolved.push(status);\n }\n return [...new Set(resolved)];\n}\n", "/**\n * @module core/schema/runtime-field-filters\n *\n * Resolves configurable schema, fields, statuses, and workflows for Runtime Field Filters.\n */\nimport { coerceRuntimeFieldValue, readRuntimeFieldOptionValue } from \"./runtime-field-values.js\";\nimport type { RuntimeFieldCommand, RuntimeFieldRegistry } from \"./runtime-schema.js\";\nimport { stableValueEquals } from \"../shared/serialization.js\";\n\nfunction valuesEqual(left: unknown, right: unknown): boolean {\n return stableValueEquals(left, right);\n}\n\n/**\n * Implements collect runtime filter values for the public runtime surface of this module.\n */\nexport function collectRuntimeFilterValues(\n options: Record<string, unknown>,\n fieldRegistry: RuntimeFieldRegistry,\n command: RuntimeFieldCommand,\n): Record<string, unknown> {\n const filters: Record<string, unknown> = {};\n for (const definition of fieldRegistry.command_to_fields.get(command) ?? []) {\n const rawValue = readRuntimeFieldOptionValue(options, definition);\n if (rawValue === undefined) {\n continue;\n }\n filters[definition.metadata_key] = coerceRuntimeFieldValue(definition, rawValue);\n }\n return filters;\n}\n\n/**\n * Implements matches runtime filters for the public runtime surface of this module.\n */\nexport function matchesRuntimeFilters(item: Record<string, unknown>, filters: Record<string, unknown>): boolean {\n for (const [fieldKey, expectedValue] of Object.entries(filters)) {\n const actualValue = item[fieldKey];\n if (Array.isArray(expectedValue)) {\n if (Array.isArray(actualValue)) {\n const normalizedActual = actualValue.map((value) => String(value));\n const normalizedExpected = expectedValue.map((value) => String(value));\n if (!normalizedExpected.every((value) => normalizedActual.includes(value))) {\n return false;\n }\n continue;\n }\n if (!valuesEqual(actualValue, expectedValue[expectedValue.length - 1])) {\n return false;\n }\n continue;\n }\n if (!valuesEqual(actualValue, expectedValue)) {\n return false;\n }\n }\n return true;\n}\n", "/**\n * @module cli/commands/list\n *\n * Implements the pm list command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { isStatusAllFilterInput, parseStatusFilterCsv } from \"../../core/item/status-filter.js\";\nimport { resolveItemTypeRegistry, type ItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { parseIntegerLimit, parsePriority, parseType } from \"../shared-parsers.js\";\nimport { collectRuntimeFilterValues, matchesRuntimeFilters } from \"../../core/schema/runtime-field-filters.js\";\nimport {\n hasMissingMetadataFilter,\n itemMatchesMissingMetadata,\n lifecycleClassifierFromStatusRegistry,\n type MissingMetadataFilters,\n} from \"../../core/governance/metadata-coverage.js\";\nimport {\n contentFiltersNeedBody,\n contentFiltersNeedCollections,\n hasContentFieldFilter,\n itemMatchesContentFilters,\n type ContentField,\n type ContentFieldFilters,\n} from \"../../core/governance/content-fields.js\";\nimport {\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n type RuntimeStatusRegistry,\n} from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { compareTimestampStrings, nowIso, resolveIsoOrRelative } from \"../../core/shared/time.js\";\nimport { listAllFrontMatter, listAllFrontMatterLight, listAllFrontMatterWithBody } from \"../../core/store/item-store.js\";\nimport { HEAVY_METADATA_KEYS } from \"../../core/store/front-matter-cache.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter, ItemStatus, ItemType } from \"../../types/index.js\";\n\n/**\n * Documents the list options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListOptions {\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n updatedAfter?: string;\n updatedBefore?: string;\n createdAfter?: string;\n createdBefore?: string;\n ids?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n limit?: string;\n offset?: string;\n noTruncate?: boolean;\n includeBody?: boolean;\n compact?: boolean;\n brief?: boolean;\n full?: boolean;\n fields?: string;\n sort?: string;\n order?: string;\n tree?: boolean;\n treeDepth?: string;\n excludeTerminal?: boolean;\n filterAcMissing?: boolean;\n filterEstimatesMissing?: boolean;\n filterResolutionMissing?: boolean;\n filterMetadataMissing?: boolean;\n filterReviewerMissing?: boolean;\n filterRiskMissing?: boolean;\n filterConfidenceMissing?: boolean;\n filterSprintMissing?: boolean;\n filterReleaseMissing?: boolean;\n // Content-field presence filters (GH-242). The has*/no* companions mirror the\n // commander flag camelCase (e.g. --no-notes → noNotes, --empty-body → emptyBody)\n // so the MCP param names and ListOptions fields stay identical (the MCP path\n // forwards params verbatim, unlike the CLI which normalizes first). A field may\n // be requested present XOR absent — a both-set request is a usage error.\n hasNotes?: boolean;\n hasLearnings?: boolean;\n hasFiles?: boolean;\n hasDocs?: boolean;\n hasTests?: boolean;\n hasComments?: boolean;\n hasDeps?: boolean;\n hasBody?: boolean;\n hasLinkedCommand?: boolean;\n noNotes?: boolean;\n noLearnings?: boolean;\n noFiles?: boolean;\n noDocs?: boolean;\n noTests?: boolean;\n noComments?: boolean;\n noDeps?: boolean;\n emptyBody?: boolean;\n noLinkedCommand?: boolean;\n [key: string]: unknown;\n}\n\n/** Extract the missing-metadata selection filters from list/update-many options. */\nexport function resolveMissingMetadataFilters(options: {\n filterAcMissing?: boolean;\n filterEstimatesMissing?: boolean;\n filterResolutionMissing?: boolean;\n filterMetadataMissing?: boolean;\n filterReviewerMissing?: boolean;\n filterRiskMissing?: boolean;\n filterConfidenceMissing?: boolean;\n filterSprintMissing?: boolean;\n filterReleaseMissing?: boolean;\n}): MissingMetadataFilters {\n return {\n acMissing: options.filterAcMissing === true,\n estimatesMissing: options.filterEstimatesMissing === true,\n resolutionMissing: options.filterResolutionMissing === true,\n metadataMissing: options.filterMetadataMissing === true,\n reviewerMissing: options.filterReviewerMissing === true,\n riskMissing: options.filterRiskMissing === true,\n confidenceMissing: options.filterConfidenceMissing === true,\n sprintMissing: options.filterSprintMissing === true,\n releaseMissing: options.filterReleaseMissing === true,\n };\n}\n\n/** Per content field: the present flag and the absence flag on the options shape. */\ninterface ContentFieldFlagMapping {\n field: ContentField;\n presentKey: string;\n absentKey: string;\n /** Human flag names used in the conflict error message. */\n presentFlag: string;\n absentFlag: string;\n}\n\nconst CONTENT_FIELD_FLAG_MAPPINGS: readonly ContentFieldFlagMapping[] = [\n { field: \"notes\", presentKey: \"hasNotes\", absentKey: \"noNotes\", presentFlag: \"--has-notes\", absentFlag: \"--no-notes\" },\n { field: \"learnings\", presentKey: \"hasLearnings\", absentKey: \"noLearnings\", presentFlag: \"--has-learnings\", absentFlag: \"--no-learnings\" },\n { field: \"files\", presentKey: \"hasFiles\", absentKey: \"noFiles\", presentFlag: \"--has-files\", absentFlag: \"--no-files\" },\n { field: \"docs\", presentKey: \"hasDocs\", absentKey: \"noDocs\", presentFlag: \"--has-docs\", absentFlag: \"--no-docs\" },\n { field: \"tests\", presentKey: \"hasTests\", absentKey: \"noTests\", presentFlag: \"--has-tests\", absentFlag: \"--no-tests\" },\n { field: \"comments\", presentKey: \"hasComments\", absentKey: \"noComments\", presentFlag: \"--has-comments\", absentFlag: \"--no-comments\" },\n { field: \"deps\", presentKey: \"hasDeps\", absentKey: \"noDeps\", presentFlag: \"--has-deps\", absentFlag: \"--no-deps\" },\n { field: \"body\", presentKey: \"hasBody\", absentKey: \"emptyBody\", presentFlag: \"--has-body\", absentFlag: \"--empty-body\" },\n { field: \"linked_command\", presentKey: \"hasLinkedCommand\", absentKey: \"noLinkedCommand\", presentFlag: \"--has-linked-command\", absentFlag: \"--no-linked-command\" },\n] as const;\n\n/**\n * Resolve the content-field presence/absence selections from list/search\n * options. A field requested both present AND absent is a usage error (the two\n * selections are mutually exclusive). Returns an empty object when no\n * content-field filter is active.\n */\nexport function resolveContentFieldFilters(options: Record<string, unknown>): ContentFieldFilters {\n const filters: ContentFieldFilters = {};\n for (const mapping of CONTENT_FIELD_FLAG_MAPPINGS) {\n const present = options[mapping.presentKey] === true;\n const absent = options[mapping.absentKey] === true;\n if (present && absent) {\n throw new PmCliError(\n `Cannot combine ${mapping.presentFlag} with ${mapping.absentFlag} for the same field.`,\n EXIT_CODE.USAGE,\n );\n }\n if (present) {\n filters[mapping.field] = \"present\";\n } else if (absent) {\n filters[mapping.field] = \"absent\";\n }\n }\n return filters;\n}\n\n/**\n * Restricts listed item values accepted by command, SDK, and storage contracts.\n */\nexport type ListedItem = ItemFrontMatter | (ItemFrontMatter & { body: string });\n\ntype ListProjectionMode = \"full\" | \"compact\" | \"fields\";\n\ninterface ListProjectionConfig {\n mode: ListProjectionMode;\n fields: string[];\n}\n\nexport const LIST_SORT_FIELDS = [\"priority\", \"deadline\", \"updated_at\", \"created_at\", \"title\", \"parent\"] as const;\n/**\n * Restricts list sort field values accepted by command, SDK, and storage contracts.\n */\nexport type ListSortField = (typeof LIST_SORT_FIELDS)[number];\n\nexport const LIST_SORT_ORDER_VALUES = [\"asc\", \"desc\"] as const;\n/**\n * Restricts list sort order values accepted by command, SDK, and storage contracts.\n */\nexport type ListSortOrder = (typeof LIST_SORT_ORDER_VALUES)[number];\n\nconst DEFAULT_COMPACT_LIST_FIELDS = [\"id\", \"title\", \"status\", \"type\", \"priority\", \"parent\", \"updated_at\"] as const;\nconst BRIEF_LIST_FIELDS = [\"id\", \"status\", \"type\", \"title\"] as const;\nconst TREE_METADATA_FIELDS = [\"tree_depth\", \"tree_parent\", \"tree_children\", \"tree_title\"] as const;\n\n// A projection that selects any heavy collection field (or `--full`, which returns\n// items verbatim) must load the full metadata; everything else takes the light path.\n// Sourced from the single HEAVY_METADATA_KEYS definition in the cache layer so the\n// light/heavy split can never drift between the cache and the projection routing.\nconst HEAVY_PROJECTION_FIELDS: ReadonlySet<string> = new Set<string>(HEAVY_METADATA_KEYS);\n\ninterface ListResultBase {\n items: ListedItem[];\n count: number;\n // Total rows matched before pagination; only emitted when --limit/--offset\n // omitted rows, so agents know how many remain (GH-154).\n total?: number;\n warnings?: string[];\n}\n\n/**\n * Documents the list compact result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListCompactResult extends ListResultBase {\n filters: Record<string, unknown>;\n projection?: undefined;\n sorting?: undefined;\n now?: undefined;\n}\n\n/**\n * Documents the list verbose result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListVerboseResult extends ListResultBase {\n filters: Record<string, unknown>;\n projection: {\n mode: ListProjectionMode;\n fields: string[] | null;\n };\n sorting: {\n sort: ListSortField | \"default\";\n order: ListSortOrder;\n };\n now: string;\n}\n\n/**\n * Restricts list result values accepted by command, SDK, and storage contracts.\n */\nexport type ListResult = ListCompactResult | ListVerboseResult;\n\nfunction isNonEmptyRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value) && Object.keys(value).length > 0;\n}\n\n// Active content-field filter flags, keyed by the options dest and the snake_case\n// summary key emitted in the filters echo (GH-242). Presence and absence are\n// distinct echo keys (has_notes vs no_notes; has_body vs empty_body).\nconst CONTENT_FILTER_ECHO_ENTRIES: ReadonlyArray<{ key: string; summaryKey: string }> = [\n { key: \"hasNotes\", summaryKey: \"has_notes\" },\n { key: \"hasLearnings\", summaryKey: \"has_learnings\" },\n { key: \"hasFiles\", summaryKey: \"has_files\" },\n { key: \"hasDocs\", summaryKey: \"has_docs\" },\n { key: \"hasTests\", summaryKey: \"has_tests\" },\n { key: \"hasComments\", summaryKey: \"has_comments\" },\n { key: \"hasDeps\", summaryKey: \"has_deps\" },\n { key: \"hasBody\", summaryKey: \"has_body\" },\n { key: \"hasLinkedCommand\", summaryKey: \"has_linked_command\" },\n { key: \"noNotes\", summaryKey: \"no_notes\" },\n { key: \"noLearnings\", summaryKey: \"no_learnings\" },\n { key: \"noFiles\", summaryKey: \"no_files\" },\n { key: \"noDocs\", summaryKey: \"no_docs\" },\n { key: \"noTests\", summaryKey: \"no_tests\" },\n { key: \"noComments\", summaryKey: \"no_comments\" },\n { key: \"noDeps\", summaryKey: \"no_deps\" },\n { key: \"emptyBody\", summaryKey: \"empty_body\" },\n { key: \"noLinkedCommand\", summaryKey: \"no_linked_command\" },\n] as const;\n\n// Active governance-missing filter flags (GH-236), keyed by options dest and the\n// snake_case summary key emitted in the filters echo.\nconst GOVERNANCE_MISSING_ECHO_ENTRIES: ReadonlyArray<{ key: string; summaryKey: string }> = [\n { key: \"filterReviewerMissing\", summaryKey: \"filter_reviewer_missing\" },\n { key: \"filterRiskMissing\", summaryKey: \"filter_risk_missing\" },\n { key: \"filterConfidenceMissing\", summaryKey: \"filter_confidence_missing\" },\n { key: \"filterSprintMissing\", summaryKey: \"filter_sprint_missing\" },\n { key: \"filterReleaseMissing\", summaryKey: \"filter_release_missing\" },\n] as const;\n\nfunction applyContentFilterEcho(filters: Record<string, unknown>, options: Record<string, unknown>): void {\n for (const entry of CONTENT_FILTER_ECHO_ENTRIES) {\n if (options[entry.key] === true) {\n filters[entry.summaryKey] = true;\n }\n }\n}\n\nfunction applyGovernanceMissingFilterEcho(filters: Record<string, unknown>, options: Record<string, unknown>): void {\n for (const entry of GOVERNANCE_MISSING_ECHO_ENTRIES) {\n if (options[entry.key] === true) {\n filters[entry.summaryKey] = true;\n }\n }\n}\n\n/**\n * Implements build content filter echo for the public runtime surface of this module.\n */\nexport function buildContentFilterEcho(options: Record<string, unknown>): Record<string, true> {\n const echo: Record<string, true> = {};\n applyContentFilterEcho(echo, options);\n return echo;\n}\n\n/**\n * Implements build governance missing filter echo for the public runtime surface of this module.\n */\nexport function buildGovernanceMissingFilterEcho(options: Record<string, unknown>): Record<string, true> {\n const echo: Record<string, true> = {};\n applyGovernanceMissingFilterEcho(echo, options);\n return echo;\n}\n\nfunction buildCompactListFilterSummary(params: {\n filtersStatus: string | string[] | null;\n options: ListOptions;\n treeEnabled: boolean;\n treeDepth: number | undefined;\n sortField: ListSortField | undefined;\n sortOrder: ListSortOrder;\n runtimeFieldFilters: Record<string, unknown>;\n}): Record<string, unknown> {\n const {\n filtersStatus,\n options,\n treeEnabled,\n treeDepth,\n sortField,\n sortOrder,\n runtimeFieldFilters,\n } = params;\n const filters: Record<string, unknown> = {};\n if (filtersStatus !== null) {\n filters.status = filtersStatus;\n }\n if (options.type !== undefined) {\n filters.type = options.type;\n }\n if (options.tag !== undefined) {\n filters.tag = options.tag;\n }\n if (options.priority !== undefined) {\n filters.priority = options.priority;\n }\n if (options.deadlineBefore !== undefined) {\n filters.deadline_before = options.deadlineBefore;\n }\n if (options.deadlineAfter !== undefined) {\n filters.deadline_after = options.deadlineAfter;\n }\n if (options.updatedAfter !== undefined) {\n filters.updated_after = options.updatedAfter;\n }\n if (options.updatedBefore !== undefined) {\n filters.updated_before = options.updatedBefore;\n }\n if (options.createdAfter !== undefined) {\n filters.created_after = options.createdAfter;\n }\n if (options.createdBefore !== undefined) {\n filters.created_before = options.createdBefore;\n }\n if (options.ids !== undefined) {\n filters.ids = options.ids;\n }\n if (options.assignee !== undefined) {\n filters.assignee = options.assignee;\n }\n if (options.assigneeFilter !== undefined) {\n filters.assignee_filter = options.assigneeFilter;\n }\n if (options.parent !== undefined) {\n filters.parent = options.parent;\n }\n if (options.sprint !== undefined) {\n filters.sprint = options.sprint;\n }\n if (options.release !== undefined) {\n filters.release = options.release;\n }\n if (options.filterAcMissing === true) {\n filters.filter_ac_missing = true;\n }\n if (options.filterEstimatesMissing === true) {\n filters.filter_estimates_missing = true;\n }\n if (options.filterResolutionMissing === true) {\n filters.filter_resolution_missing = true;\n }\n if (options.filterMetadataMissing === true) {\n filters.filter_metadata_missing = true;\n }\n applyGovernanceMissingFilterEcho(filters, options);\n applyContentFilterEcho(filters, options);\n if (options.limit !== undefined) {\n filters.limit = options.limit;\n }\n if (options.offset !== undefined) {\n filters.offset = options.offset;\n }\n if (options.includeBody === true) {\n filters.include_body = true;\n }\n if (options.fields !== undefined) {\n filters.fields = options.fields;\n }\n if (treeEnabled) {\n filters.tree = true;\n if (treeDepth !== undefined) {\n filters.tree_depth = treeDepth;\n }\n }\n if (sortField !== undefined) {\n filters.sort = sortField;\n filters.order = sortOrder;\n }\n if (isNonEmptyRecord(runtimeFieldFilters)) {\n filters.runtime_filters = runtimeFieldFilters;\n }\n return filters;\n}\n\nfunction compareDefaultSort(left: ListedItem, right: ListedItem, statusRegistry: RuntimeStatusRegistry): number {\n const leftTerminal = isTerminalStatus(left.status, statusRegistry);\n const rightTerminal = isTerminalStatus(right.status, statusRegistry);\n if (leftTerminal !== rightTerminal) {\n return leftTerminal ? 1 : -1;\n }\n const byPriority = left.priority - right.priority;\n if (byPriority !== 0) {\n return byPriority;\n }\n const byUpdated = compareTimestampStrings(right.updated_at, left.updated_at);\n if (byUpdated !== 0) {\n return byUpdated;\n }\n return (left.id ?? \"\").localeCompare(right.id ?? \"\");\n}\n\nfunction sortItemsDefault(items: ListedItem[], statusRegistry: RuntimeStatusRegistry): ListedItem[] {\n return [...items].sort((left, right) => compareDefaultSort(left, right, statusRegistry));\n}\n\nfunction parseDeadline(raw: string | undefined, fieldLabel: string): string | undefined {\n if (raw === undefined) return undefined;\n return resolveIsoOrRelative(raw, new Date(), fieldLabel);\n}\n\n// updated/created date-window filters share the deadline ISO+relative resolver\n// so agents doing incremental \"what changed since my last context window\" syncs\n// can pass either an ISO timestamp (the common case — feed back the previous\n// run's `now`) or a SIGNED relative offset where \"-2h\"/\"-7d\" reach into the\n// past and \"+1d\" into the future (units h/d/w/m, m = months — there is no\n// minutes unit, matching the deadline resolver).\nfunction parseTimestampWindow(raw: unknown, fieldLabel: string): string | undefined {\n if (raw == null) return undefined;\n const value = String(raw).trim();\n if (value.length === 0) return undefined;\n return resolveIsoOrRelative(value, new Date(), fieldLabel);\n}\n\nfunction parseIdsFilter(raw: unknown): Set<string> | undefined {\n if (raw == null) return undefined;\n const value = String(raw).trim();\n if (value.length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n const ids = value\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (ids.length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n return new Set(ids);\n}\n\nfunction parseOffset(raw: string | undefined): number | undefined {\n if (raw === undefined) return undefined;\n const parsed = Number(raw);\n if (!Number.isInteger(parsed) || parsed < 0) {\n throw new PmCliError(\"Offset filter must be a non-negative integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseFieldSelectors(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const selectors = raw\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (selectors.length === 0) {\n throw new PmCliError(\"List --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n return [...new Set(selectors)];\n}\n\nfunction parseProjectionConfig(options: ListOptions): ListProjectionConfig {\n const compactRequested = options.compact === true;\n const briefRequested = options.brief === true;\n const fullRequested = options.full === true;\n const fieldSelectors = parseFieldSelectors(options.fields);\n const enabledModes =\n Number(compactRequested) + Number(briefRequested) + Number(fullRequested) + Number(fieldSelectors !== undefined);\n if (enabledModes > 1) {\n throw new PmCliError(\n \"List projection options are mutually exclusive. Use one of --compact, --brief, --full, or --fields.\",\n EXIT_CODE.USAGE,\n );\n }\n if (fullRequested) {\n return {\n mode: \"full\",\n fields: [],\n };\n }\n if (briefRequested) {\n return {\n mode: \"compact\",\n fields: [...BRIEF_LIST_FIELDS],\n };\n }\n if (compactRequested) {\n return {\n mode: \"compact\",\n fields: [...DEFAULT_COMPACT_LIST_FIELDS],\n };\n }\n if (fieldSelectors) {\n return {\n mode: \"fields\",\n fields: fieldSelectors,\n };\n }\n return {\n mode: \"full\",\n fields: [],\n };\n}\n\nfunction normalizeProjectionField(field: string): string {\n return field.startsWith(\"item.\") ? field.slice(\"item.\".length) : field;\n}\n\nfunction validateListProjectionFields(projection: ListProjectionConfig, runtimeMetadataKeys: Iterable<string>): void {\n if (projection.mode !== \"fields\") {\n return;\n }\n const allowed = new Set([...FRONT_MATTER_KEY_ORDER, \"body\", ...TREE_METADATA_FIELDS, ...runtimeMetadataKeys]);\n const unknown = projection.fields.filter((field) => !allowed.has(normalizeProjectionField(field)));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown list --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n code: \"unknown_field_projection\",\n examples: [\n \"pm list-open --fields id,title,status,type,updated_at\",\n \"pm list --fields id,title,parent,priority --limit 10\",\n \"pm list-all --fields id,title,body --limit 5\",\n ],\n });\n }\n}\n\n// Convenience aliases so agents/humans who reach for the bare verb form\n// (e.g. `--sort updated`) land on the canonical timestamp fields instead of an error.\n// A Map (not a plain object) avoids prototype-chain lookups for keys like \"__proto__\".\nconst LIST_SORT_FIELD_ALIASES: ReadonlyMap<string, ListSortField> = new Map<string, ListSortField>([\n [\"updated\", \"updated_at\"],\n [\"update\", \"updated_at\"],\n [\"modified\", \"updated_at\"],\n [\"created\", \"created_at\"],\n [\"create\", \"created_at\"],\n]);\n\nfunction parseSortField(raw: string | undefined): ListSortField | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n const aliased = LIST_SORT_FIELD_ALIASES.get(normalized);\n if (aliased) {\n return aliased;\n }\n if (!LIST_SORT_FIELDS.includes(normalized as ListSortField)) {\n throw new PmCliError(\n `Sort field must be one of ${LIST_SORT_FIELDS.join(\"|\")} (aliases: updated->updated_at, created->created_at)`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized as ListSortField;\n}\n\nfunction parseSortOrder(raw: string | undefined): ListSortOrder | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (!LIST_SORT_ORDER_VALUES.includes(normalized as ListSortOrder)) {\n throw new PmCliError(`Sort order must be one of ${LIST_SORT_ORDER_VALUES.join(\"|\")}`, EXIT_CODE.USAGE);\n }\n return normalized as ListSortOrder;\n}\n\nfunction parseTreeDepth(raw: string | undefined): number | undefined {\n return parseIntegerLimit(raw, \"--tree-depth\");\n}\n\nfunction parseAssigneeFilter(raw: string | undefined): \"assigned\" | \"unassigned\" | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (!normalized) {\n throw new PmCliError(\"Assignee filter must be one of assigned|unassigned\", EXIT_CODE.USAGE);\n }\n if (normalized !== \"assigned\" && normalized !== \"unassigned\") {\n throw new PmCliError(`Invalid assignee filter \"${raw}\". Allowed: assigned|unassigned`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\n// `pm list` keeps lenient status parsing (an unknown token is passed through\n// verbatim and simply matches nothing) so custom/unknown statuses never error;\n// the shared CSV parser resolves the open/closed/canceled workflow-group aliases.\nfunction resolveStatusFilter(\n status: ItemStatus | undefined,\n statusRegistry: RuntimeStatusRegistry,\n): ItemStatus[] | undefined {\n return parseStatusFilterCsv(status, statusRegistry, { strict: false });\n}\n\nfunction applyFilters(\n items: ListedItem[],\n status: ItemStatus[] | undefined,\n options: ListOptions,\n typeRegistry: ItemTypeRegistry,\n statusRegistry: RuntimeStatusRegistry,\n runtimeFieldFilters: Record<string, unknown>,\n): ListedItem[] {\n const statusSet = status && status.length > 0 ? new Set<ItemStatus>(status) : undefined;\n const typeFilter = parseType(options.type, typeRegistry);\n const tagFilter = options.tag?.trim().toLowerCase();\n const priorityFilter = parsePriority(options.priority);\n const deadlineBefore = parseDeadline(options.deadlineBefore, \"deadline-before\");\n const deadlineAfter = parseDeadline(options.deadlineAfter, \"deadline-after\");\n const updatedAfter = parseTimestampWindow(options.updatedAfter, \"updated-after\");\n const updatedBefore = parseTimestampWindow(options.updatedBefore, \"updated-before\");\n const createdAfter = parseTimestampWindow(options.createdAfter, \"created-after\");\n const createdBefore = parseTimestampWindow(options.createdBefore, \"created-before\");\n const idsFilter = parseIdsFilter(options.ids);\n const assigneeFilter = options.assignee?.trim();\n const assigneeModeFilter = parseAssigneeFilter(options.assigneeFilter);\n const parentFilter = options.parent?.trim();\n const sprintFilter = options.sprint?.trim();\n const releaseFilter = options.release?.trim();\n const missingMetadataFilters = resolveMissingMetadataFilters(options);\n const missingMetadataActive = hasMissingMetadataFilter(missingMetadataFilters);\n const lifecycleClassifier = lifecycleClassifierFromStatusRegistry(statusRegistry);\n const contentFieldFilters = resolveContentFieldFilters(options as Record<string, unknown>);\n const contentFiltersActive = hasContentFieldFilter(contentFieldFilters);\n\n if (assigneeFilter && (assigneeFilter.toLowerCase() === \"none\" || assigneeFilter.toLowerCase() === \"null\")) {\n throw new PmCliError(\n '--assignee no longer accepts \"none\" or \"null\". Use --assignee-filter unassigned.',\n EXIT_CODE.USAGE,\n );\n }\n if (assigneeFilter !== undefined && assigneeModeFilter === \"unassigned\") {\n throw new PmCliError(\"Cannot combine --assignee with --assignee-filter unassigned\", EXIT_CODE.USAGE);\n }\n\n return items.filter((item) => {\n if (idsFilter && !idsFilter.has(item.id)) return false;\n if (statusSet && !statusSet.has(item.status)) return false;\n if (options.excludeTerminal && isTerminalStatus(item.status, statusRegistry)) return false;\n if (typeFilter && item.type !== typeFilter) return false;\n if (tagFilter && !item.tags.includes(tagFilter)) return false;\n if (priorityFilter !== undefined && item.priority !== priorityFilter) return false;\n if (deadlineBefore && (!item.deadline || compareTimestampStrings(item.deadline, deadlineBefore) > 0)) return false;\n if (deadlineAfter && (!item.deadline || compareTimestampStrings(item.deadline, deadlineAfter) < 0)) return false;\n if (updatedAfter && compareTimestampStrings(item.updated_at, updatedAfter) < 0) return false;\n if (updatedBefore && compareTimestampStrings(item.updated_at, updatedBefore) > 0) return false;\n if (createdAfter && compareTimestampStrings(item.created_at, createdAfter) < 0) return false;\n if (createdBefore && compareTimestampStrings(item.created_at, createdBefore) > 0) return false;\n if (assigneeModeFilter === \"assigned\" && !item.assignee) return false;\n if (assigneeModeFilter === \"unassigned\" && item.assignee) return false;\n if (assigneeFilter !== undefined && item.assignee !== assigneeFilter) {\n return false;\n }\n if (parentFilter !== undefined && options.tree !== true && item.parent !== parentFilter) return false;\n if (sprintFilter !== undefined && item.sprint !== sprintFilter) return false;\n if (releaseFilter !== undefined && item.release !== releaseFilter) return false;\n if (missingMetadataActive && !itemMatchesMissingMetadata(item, missingMetadataFilters, lifecycleClassifier)) {\n return false;\n }\n if (contentFiltersActive && !itemMatchesContentFilters(item, contentFieldFilters)) {\n return false;\n }\n if (!matchesRuntimeFilters(item as Record<string, unknown>, runtimeFieldFilters)) {\n return false;\n }\n return true;\n });\n}\n\nfunction trimNonEmpty(value: string | undefined): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction withTreeMetadata(item: ListedItem, depth: number, childCount: number): ListedItem {\n const itemRecord = toItemRecord(item);\n const title = typeof itemRecord.title === \"string\" ? itemRecord.title : \"\";\n const parent = trimNonEmpty(typeof itemRecord.parent === \"string\" ? itemRecord.parent : undefined) ?? null;\n return {\n ...item,\n tree_depth: depth,\n tree_parent: parent,\n tree_children: childCount,\n tree_title: `${\" \".repeat(depth)}${title}`,\n } as ListedItem;\n}\n\nfunction orderItemsAsTree(\n sortedItems: ListedItem[],\n parentRoot: string | undefined,\n maxDepth: number | undefined,\n): ListedItem[] {\n const byId = new Map<string, ListedItem>();\n const childrenByParent = new Map<string, ListedItem[]>();\n for (const item of sortedItems) {\n byId.set(item.id, item);\n const parentId = trimNonEmpty(item.parent);\n if (!parentId) {\n continue;\n }\n const bucket = childrenByParent.get(parentId);\n if (bucket) {\n bucket.push(item);\n } else {\n childrenByParent.set(parentId, [item]);\n }\n }\n\n const roots = parentRoot\n ? [...(childrenByParent.get(parentRoot) ?? [])]\n : sortedItems.filter((item) => {\n const parentId = trimNonEmpty(item.parent);\n return !parentId || !byId.has(parentId);\n });\n const ordered: ListedItem[] = [];\n const visited = new Set<string>();\n const pushNode = (node: ListedItem, depth: number): void => {\n if (visited.has(node.id)) {\n return;\n }\n visited.add(node.id);\n const children = childrenByParent.get(node.id) ?? [];\n ordered.push(withTreeMetadata(node, depth, children.length));\n if (maxDepth !== undefined && depth >= maxDepth) {\n return;\n }\n for (const child of children) {\n pushNode(child, depth + 1);\n }\n };\n for (const root of roots) {\n pushNode(root, 0);\n }\n return ordered;\n}\n\nfunction compareNullableString(left: string | null, right: string | null): number {\n if (left === right) {\n return 0;\n }\n if (left === null) {\n return 1;\n }\n if (right === null) {\n return -1;\n }\n return left.localeCompare(right);\n}\n\nfunction compareNullableTimestamp(left: string | null, right: string | null): number {\n if (left === right) {\n return 0;\n }\n if (left === null) {\n return 1;\n }\n if (right === null) {\n return -1;\n }\n return compareTimestampStrings(left, right);\n}\n\nfunction compareBySortField(left: ListedItem, right: ListedItem, field: ListSortField): number {\n switch (field) {\n case \"priority\":\n return left.priority - right.priority;\n case \"deadline\":\n return compareNullableTimestamp(left.deadline ?? null, right.deadline ?? null);\n case \"updated_at\":\n return compareTimestampStrings(left.updated_at, right.updated_at);\n case \"created_at\":\n return compareTimestampStrings(left.created_at, right.created_at);\n case \"title\":\n return (left.title ?? \"\").localeCompare(right.title ?? \"\");\n case \"parent\":\n return compareNullableString(left.parent ?? null, right.parent ?? null);\n default:\n return 0;\n }\n}\n\nfunction sortItems(\n items: ListedItem[],\n sortField: ListSortField | undefined,\n sortOrder: ListSortOrder,\n statusRegistry: RuntimeStatusRegistry,\n): ListedItem[] {\n if (!sortField) {\n return sortItemsDefault(items, statusRegistry);\n }\n return [...items].sort((left, right) => {\n const byField = compareBySortField(left, right, sortField);\n if (byField !== 0) {\n return sortOrder === \"desc\" ? -byField : byField;\n }\n const fallback = compareDefaultSort(left, right, statusRegistry);\n return sortOrder === \"desc\" ? -fallback : fallback;\n });\n}\n\nfunction readListFieldValue(item: ListedItem, field: string, treeMode = false): unknown {\n const normalized = normalizeProjectionField(field.trim());\n if (normalized.length === 0) {\n return null;\n }\n const itemRecord = toItemRecord(item);\n if (treeMode && normalized === \"title\" && typeof itemRecord.tree_title === \"string\") {\n return itemRecord.tree_title;\n }\n if (Object.prototype.hasOwnProperty.call(itemRecord, normalized)) {\n return itemRecord[normalized] ?? null;\n }\n return null;\n}\n\nfunction projectListItems(items: ListedItem[], projection: ListProjectionConfig, treeMode = false): ListedItem[] {\n if (projection.mode === \"full\") {\n return items;\n }\n return items.map((item) => {\n const projected: Record<string, unknown> = {};\n for (const field of projection.fields) {\n projected[field] = readListFieldValue(item, field, treeMode);\n }\n return projected as unknown as ListedItem;\n });\n}\n\nfunction runtimeMetadataKeysForProjection(definitions: Array<{ metadata_key: string }>): string[] {\n const keys: string[] = [];\n for (const field of definitions) {\n keys.push(field.metadata_key);\n }\n return keys;\n}\n\n/**\n * Implements run list for the public runtime surface of this module.\n */\nexport async function runList(status: ItemStatus | undefined, options: ListOptions, global: GlobalOptions): Promise<ListResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);\n const runtimeFieldFilters = collectRuntimeFilterValues(options as Record<string, unknown>, runtimeFieldRegistry, \"list\");\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const projection = parseProjectionConfig(options);\n const runtimeMetadataKeys = runtimeMetadataKeysForProjection(runtimeFieldRegistry.definitions);\n validateListProjectionFields(projection, runtimeMetadataKeys);\n const listWarnings: string[] = [];\n const projectionNeedsBody = projection.fields.some((field) => normalizeProjectionField(field) === \"body\");\n // The heavy collection fields are only emitted by `--full` (verbatim items) or an\n // explicit `--fields <heavy>` selection. Every other projection (default brief,\n // `--compact`, light `--fields`) reads only light scalar fields, so it takes the\n // light path that skips the large collections cache (the hot-path JSON.parse win).\n const projectionNeedsCollections =\n projection.mode === \"full\" ||\n projection.fields.some((field) => HEAVY_PROJECTION_FIELDS.has(normalizeProjectionField(field)));\n // Content-field filters (GH-242) inspect the heavy collection arrays and/or the\n // body, so they force the matching load path even when the projection alone\n // would take the light path. notes/learnings/files/docs/tests/comments/deps/\n // linked_command live in the heavy collections; body needs the body load.\n const contentFieldFilters = resolveContentFieldFilters(options as Record<string, unknown>);\n const contentNeedsCollections = contentFiltersNeedCollections(contentFieldFilters);\n const contentNeedsBody = contentFiltersNeedBody(contentFieldFilters);\n let items: ListedItem[];\n if (options.includeBody || projectionNeedsBody || contentNeedsBody) {\n items = await listAllFrontMatterWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n } else if (projectionNeedsCollections || contentNeedsCollections) {\n items = await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n } else {\n items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n }\n const sortField = parseSortField(options.sort);\n const sortOrder = parseSortOrder(options.order) ?? \"asc\";\n const treeEnabled = options.tree === true;\n if (!treeEnabled && options.treeDepth !== undefined) {\n throw new PmCliError(\"List --tree-depth requires --tree\", EXIT_CODE.USAGE);\n }\n const treeDepth = treeEnabled ? parseTreeDepth(options.treeDepth) : undefined;\n const parentRoot = treeEnabled ? trimNonEmpty(options.parent) : undefined;\n if (!sortField && options.order !== undefined) {\n throw new PmCliError(\"List --order requires --sort\", EXIT_CODE.USAGE);\n }\n const explicitStatus = resolveStatusFilter(options.status as ItemStatus | undefined, statusRegistry);\n const resolvedStatus = explicitStatus ?? resolveStatusFilter(status, statusRegistry);\n const explicitAllStatuses = isStatusAllFilterInput(options.status);\n const effectiveOptions = explicitStatus || explicitAllStatuses ? { ...options, excludeTerminal: false } : options;\n const filtered = applyFilters(items, resolvedStatus, effectiveOptions, typeRegistry, statusRegistry, runtimeFieldFilters);\n const filtersStatus =\n explicitAllStatuses\n ? \"all\"\n : resolvedStatus === undefined\n ? null\n : resolvedStatus.length === 1\n ? resolvedStatus[0]\n : resolvedStatus;\n const sorted = sortItems(filtered, sortField, sortOrder, statusRegistry);\n const ordered = treeEnabled ? orderItemsAsTree(sorted, parentRoot, treeDepth) : sorted;\n // --no-truncate (alias --all) forces full results, overriding any --limit so an\n // agent can pull the entire matched set in one call (GH-154).\n const noTruncate = options.noTruncate === true;\n const limit = noTruncate ? undefined : parseIntegerLimit(options.limit);\n const offset = parseOffset(options.offset) ?? 0;\n const limited = limit === undefined ? ordered.slice(offset) : ordered.slice(offset, offset + limit);\n const projected = projectListItems(limited, projection, treeEnabled);\n const totalMatched = ordered.length;\n // Surface the pre-pagination total only when rows were actually omitted.\n const truncationExtras = projected.length < totalMatched ? { total: totalMatched } : {};\n const now = nowIso();\n const warnings = [...new Set(listWarnings)].sort((left, right) => left.localeCompare(right));\n const projectionFields = projection.mode === \"full\" ? null : [...projection.fields];\n // pm-vhx6: compact-mode list output is primarily consumed by agents. Keep the\n // metadata trailer token-light by returning only active/user-supplied filters\n // and omitting projection/sorting/now boilerplate in this path.\n const compactSummaryMode = projection.mode === \"compact\" && options.compact === true;\n if (compactSummaryMode) {\n const compactFilters = buildCompactListFilterSummary({\n filtersStatus,\n options,\n treeEnabled,\n treeDepth,\n sortField,\n sortOrder,\n runtimeFieldFilters,\n });\n return {\n items: projected,\n count: projected.length,\n ...truncationExtras,\n filters: compactFilters,\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n }\n return {\n items: projected,\n count: projected.length,\n ...truncationExtras,\n filters: {\n status: filtersStatus,\n type: options.type ?? null,\n tag: options.tag ?? null,\n priority: options.priority ?? null,\n deadline_before: options.deadlineBefore ?? null,\n deadline_after: options.deadlineAfter ?? null,\n updated_after: options.updatedAfter ?? null,\n updated_before: options.updatedBefore ?? null,\n created_after: options.createdAfter ?? null,\n created_before: options.createdBefore ?? null,\n ids: options.ids ?? null,\n assignee: options.assignee ?? null,\n assignee_filter: options.assigneeFilter ?? null,\n parent: options.parent ?? null,\n sprint: options.sprint ?? null,\n release: options.release ?? null,\n ...(options.filterAcMissing === true ? { filter_ac_missing: true } : {}),\n ...(options.filterEstimatesMissing === true ? { filter_estimates_missing: true } : {}),\n ...(options.filterResolutionMissing === true ? { filter_resolution_missing: true } : {}),\n ...(options.filterMetadataMissing === true ? { filter_metadata_missing: true } : {}),\n ...buildGovernanceMissingFilterEcho(options),\n ...buildContentFilterEcho(options),\n limit: options.limit ?? null,\n offset: options.offset ?? null,\n ...(noTruncate ? { no_truncate: true } : {}),\n include_body: options.includeBody ?? null,\n compact: options.compact ?? null,\n fields: options.fields ?? null,\n ...(treeEnabled ? { tree: true, tree_depth: treeDepth ?? null } : {}),\n sort: sortField ?? null,\n order: sortField ? sortOrder : null,\n runtime_filters: runtimeFieldFilters,\n },\n projection: {\n mode: projection.mode,\n fields: projectionFields,\n },\n sorting: {\n sort: sortField ?? \"default\",\n order: sortField ? sortOrder : \"asc\",\n },\n now,\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n}\n\nexport const _testOnly = {\n applyFilters,\n buildCompactListFilterSummary,\n buildContentFilterEcho,\n buildGovernanceMissingFilterEcho,\n resolveContentFieldFilters,\n resolveMissingMetadataFilters,\n compareBySortField,\n compareDefaultSort,\n compareNullableString,\n compareNullableTimestamp,\n normalizeProjectionField,\n parseAssigneeFilter,\n parseFieldSelectors,\n parseIdsFilter,\n parseOffset,\n parseProjectionConfig,\n parseSortField,\n parseSortOrder,\n orderItemsAsTree,\n projectListItems,\n readListFieldValue,\n runtimeMetadataKeysForProjection,\n sortItems,\n trimNonEmpty,\n withTreeMetadata,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAM,uBAAqG;EACzG,MAAM;EACN,QAAQ;EACR,UAAU;EACV,WAAW;;AAGb,IAAM,sBAAsB;AAGtB,SAAU,uBAAuB,KAAY;AACjD,MAAI,OAAO,QAAQ,UAAU;AAC3B,WAAO;EACT;AACA,QAAM,SAAS,IACZ,MAAM,GAAG,EACT,IAAI,CAAC,UAAU,MAAM,KAAI,EAAG,YAAW,CAAE,EACzC,OAAO,CAAC,UAAU,MAAM,SAAS,CAAC;AACrC,SAAO,OAAO,WAAW,KAAK,OAAO,CAAC,MAAM;AAC9C;AAUM,SAAU,yBACd,OACA,UAA+B;AAE/B,QAAM,UAAU,MAAM,KAAI,EAAG,YAAW;AACxC,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;EACT;AACA,QAAM,QAAQ,qBAAqB,OAAO;AAC1C,MAAI,OAAO;AACT,WAAO,SAAS,KAAK;EACvB;AACA,SAAO,qBAAqB,OAAO,QAAQ;AAC7C;AAEA,SAAS,kCAAkC,UAA+B;AACxE,QAAM,aAAa,IAAI,IAAY,OAAO,KAAK,oBAAoB,CAAC;AACpE,aAAW,cAAc,SAAS,aAAa;AAC7C,eAAW,IAAI,WAAW,EAAE;AAC5B,eAAW,SAAS,WAAW,SAAS;AACtC,iBAAW,IAAI,KAAK;IACtB;EACF;AACA,SAAO,CAAC,GAAG,UAAU;AACvB;AAEA,SAAS,qBAA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
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]="be42ed54-a5b3-5603-ac08-e05799a50836")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
hashDocument,
|
|
5
5
|
toItemRecord
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XKJDCJEH.js";
|
|
7
7
|
import {
|
|
8
8
|
canonicalDocument
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FSOJCFDS.js";
|
|
10
10
|
import {
|
|
11
11
|
FRONT_MATTER_KEY_ORDER,
|
|
12
12
|
orderObject,
|
|
13
13
|
sha256Hex,
|
|
14
14
|
stableStringify
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AZ75OVK4.js";
|
|
16
16
|
|
|
17
17
|
// dist/core/history/replay.js
|
|
18
18
|
import jsonPatch from "fast-json-patch";
|
|
@@ -25,10 +25,7 @@ function cloneEmptyReplayDocument() {
|
|
|
25
25
|
}
|
|
26
26
|
function replayHash(document) {
|
|
27
27
|
try {
|
|
28
|
-
return hashDocument(
|
|
29
|
-
metadata: document.metadata,
|
|
30
|
-
body: document.body
|
|
31
|
-
});
|
|
28
|
+
return hashDocument(replayToItemDocument(document));
|
|
32
29
|
} catch {
|
|
33
30
|
return sha256Hex(stableStringify({ replay_fallback: true, metadata: document.metadata, body: document.body }));
|
|
34
31
|
}
|
|
@@ -39,6 +36,9 @@ function replayToItemDocument(document) {
|
|
|
39
36
|
body: document.body
|
|
40
37
|
};
|
|
41
38
|
}
|
|
39
|
+
function replayToCanonicalItemDocument(document, options = {}) {
|
|
40
|
+
return canonicalDocument(replayToItemDocument(document), options);
|
|
41
|
+
}
|
|
42
42
|
function toReplayDocument(document) {
|
|
43
43
|
if (!document.metadata || Object.keys(document.metadata).length === 0) {
|
|
44
44
|
return {
|
|
@@ -225,6 +225,7 @@ export {
|
|
|
225
225
|
cloneEmptyReplayDocument,
|
|
226
226
|
replayHash,
|
|
227
227
|
replayToItemDocument,
|
|
228
|
+
replayToCanonicalItemDocument,
|
|
228
229
|
toReplayDocument,
|
|
229
230
|
normalizeReplayPatchOps,
|
|
230
231
|
tryApplyReplayPatch,
|
|
@@ -232,6 +233,6 @@ export {
|
|
|
232
233
|
reanchorHistoryEntries,
|
|
233
234
|
historyEntriesToRaw
|
|
234
235
|
};
|
|
235
|
-
//# sourceMappingURL=chunk-
|
|
236
|
+
//# sourceMappingURL=chunk-WMQBNVZL.js.map
|
|
236
237
|
|
|
237
|
-
//# debugId=
|
|
238
|
+
//# debugId=be42ed54-a5b3-5603-ac08-e05799a50836
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../core/history/replay.ts"],"sourcesContent":["/**\n * @module core/history/replay\n *\n * Implements append-only history and replay behavior for Replay.\n */\nimport jsonPatch from \"fast-json-patch\";\nimport { FRONT_MATTER_KEY_ORDER } from \"../shared/constants.js\";\nimport { canonicalDocument } from \"../item/item-format.js\";\nimport { toItemRecord } from \"../item/item-record.js\";\nimport { orderObject, sha256Hex, stableStringify } from \"../shared/serialization.js\";\nimport { hashDocument } from \"./history.js\";\nimport type { HistoryEntry, HistoryPatchOp, ItemDocument, ItemMetadata } from \"../../types/index.js\";\n\n/**\n * Shared history replay/patch mechanics single-sourced for the history, restore,\n * history-redact, and history-repair commands plus the health/validate drift checks.\n *\n * Each command keeps its own thin error-formatting wrapper so the exact CLI error\n * contracts (restore's rich patch-failure context, redact's op tag, history's\n * generic message) are preserved; only the underlying replay/patch logic is shared.\n */\n\nexport interface ReplayDocument {\n metadata: Record<string, unknown>;\n body: string;\n}\n\nexport const EMPTY_REPLAY_DOCUMENT: ReplayDocument = {\n metadata: {},\n body: \"\",\n};\n\n/**\n * Implements clone empty replay document for the public runtime surface of this module.\n */\nexport function cloneEmptyReplayDocument(): ReplayDocument {\n return structuredClone(EMPTY_REPLAY_DOCUMENT);\n}\n\n/**\n * Implements replay hash for the public runtime surface of this module.\n */\nexport function replayHash(document: ReplayDocument): string {\n try {\n return hashDocument(replayToItemDocument(document));\n } catch {\n // Legacy/malformed replay states (for example a stream whose first entry never\n // established a full `create` document, so the canonicalizer cannot normalize it)\n // cannot be canonically hashed. Fall back to a deterministic structural hash so\n // re-anchor and verification stay internally consistent for these streams. Fully\n // formed documents always take the canonical path above, so valid streams are\n // unaffected.\n return sha256Hex(stableStringify({ replay_fallback: true, metadata: document.metadata, body: document.body }));\n }\n}\n\n/**\n * Implements replay to item document for the public runtime surface of this module.\n */\nexport function replayToItemDocument(document: ReplayDocument): ItemDocument {\n return {\n metadata: document.metadata as ItemMetadata,\n body: document.body,\n };\n}\n\n/**\n * Converts a materialized replay document into a canonical item document. Use\n * this when callers have already rejected the empty/deleted replay state and\n * need restored metadata validated through the normal front-matter rules.\n */\nexport function replayToCanonicalItemDocument(\n document: ReplayDocument,\n options: Parameters<typeof canonicalDocument>[1] = {},\n): ItemDocument {\n return canonicalDocument(replayToItemDocument(document), options);\n}\n\n/**\n * Canonicalize an item document into the ordered replay form used when comparing\n * a replayed chain against the on-disk item (restore + history-repair reconciliation).\n */\nexport function toReplayDocument(document: ItemDocument): ReplayDocument {\n if (!document.metadata || Object.keys(document.metadata).length === 0) {\n return {\n metadata: {},\n body: document.body ?? \"\",\n };\n }\n const canonical = canonicalDocument(document);\n return {\n metadata: orderObject(toItemRecord(canonical.metadata), FRONT_MATTER_KEY_ORDER),\n body: canonical.body,\n };\n}\n\n/**\n * Implements normalize replay patch path for the public runtime surface of this module.\n */\nexport function normalizeReplayPatchPath(path: string): string {\n if (path === \"/front_matter\") {\n return \"/metadata\";\n }\n if (path.startsWith(\"/front_matter/\")) {\n return `/metadata/${path.slice(\"/front_matter/\".length)}`;\n }\n return path;\n}\n\nfunction isHistoryPatchOp(value: unknown): value is HistoryPatchOp {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as { op?: unknown }).op === \"string\" &&\n typeof (value as { path?: unknown }).path === \"string\"\n );\n}\n\n/**\n * Implements normalize replay patch ops for the public runtime surface of this module.\n */\nexport function normalizeReplayPatchOps(patch: HistoryPatchOp[] | unknown): HistoryPatchOp[] {\n if (!Array.isArray(patch)) {\n return [];\n }\n return patch.filter(isHistoryPatchOp).map((operation) => ({\n ...operation,\n path: normalizeReplayPatchPath(operation.path),\n from: typeof operation.from === \"string\" ? normalizeReplayPatchPath(operation.from) : undefined,\n }));\n}\n\nfunction isReplayDocumentShape(value: unknown): value is { metadata: Record<string, unknown>; body: string } {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"metadata\" in value &&\n \"body\" in value &&\n typeof (value as { body: unknown }).body === \"string\" &&\n typeof (value as { metadata: unknown }).metadata === \"object\" &&\n (value as { metadata: unknown }).metadata !== null\n );\n}\n\n/**\n * Restricts replay apply result values accepted by command, SDK, and storage contracts.\n */\nexport type ReplayApplyResult =\n | { ok: true; document: ReplayDocument }\n | { ok: false; error: unknown };\n\n/**\n * Strictly apply a history patch (front_matter->metadata normalized) to a replay\n * document. Returns a result envelope rather than throwing so each caller can\n * format its own error contract.\n */\nexport function tryApplyReplayPatch(current: ReplayDocument, patch: HistoryPatchOp[]): ReplayApplyResult {\n try {\n const normalizedPatch = normalizeReplayPatchOps(patch);\n const applied = jsonPatch.applyPatch(\n structuredClone(current),\n normalizedPatch as jsonPatch.Operation[],\n true,\n false,\n ).newDocument as unknown;\n if (!isReplayDocumentShape(applied)) {\n return { ok: false, error: new Error(\"history_replay_invalid_document_shape\") };\n }\n return { ok: true, document: { metadata: applied.metadata, body: applied.body } };\n } catch (error) {\n return { ok: false, error };\n }\n}\n\n/**\n * Deterministically verify a history chain: each entry's before_hash must equal\n * the prior replayed after_hash, the patch must strictly apply, and the recorded\n * after_hash must equal the replayed result.\n */\nexport function verifyHistoryChain(entries: HistoryEntry[]): { ok: boolean; errors: string[] } {\n let replay = cloneEmptyReplayDocument();\n for (let index = 0; index < entries.length; index += 1) {\n const entry = entries[index];\n if (replayHash(replay) !== entry.before_hash) {\n return {\n ok: false,\n errors: [`verify_failed:before_hash_mismatch:entry_${index + 1}`],\n };\n }\n const applied = tryApplyReplayPatch(replay, entry.patch);\n if (!applied.ok) {\n return {\n ok: false,\n errors: [`verify_failed:patch_apply_failed:entry_${index + 1}`],\n };\n }\n replay = applied.document;\n if (replayHash(replay) !== entry.after_hash) {\n return {\n ok: false,\n errors: [`verify_failed:after_hash_mismatch:entry_${index + 1}`],\n };\n }\n }\n return { ok: true, errors: [] };\n}\n\n/**\n * Documents the lenient apply result payload exchanged by command, SDK, and package integrations.\n */\nexport interface LenientApplyResult {\n document: ReplayDocument;\n convertedReplaceToAdd: number;\n skippedOps: number;\n}\n\nfunction tryApplySingleOp(document: unknown, op: HistoryPatchOp): { ok: true; document: unknown } | { ok: false } {\n try {\n const applied = jsonPatch.applyPatch(\n structuredClone(document),\n [op as jsonPatch.Operation],\n true,\n false,\n ).newDocument as unknown;\n return { ok: true, document: applied };\n } catch {\n return { ok: false };\n }\n}\n\n/**\n * Apply a legacy patch op-by-op, recovering from drift that strict replay rejects:\n * a `replace` whose path no longer exists is retried as `add`, and any op that\n * still cannot apply against the current replay state is skipped. The resulting\n * document is what the repaired entry's recomputed patch should target.\n */\nexport function lenientApplyReplayPatch(current: ReplayDocument, patch: HistoryPatchOp[]): LenientApplyResult {\n let working: unknown = structuredClone(current);\n let convertedReplaceToAdd = 0;\n let skippedOps = 0;\n\n for (const op of normalizeReplayPatchOps(patch)) {\n const direct = tryApplySingleOp(working, op);\n if (direct.ok) {\n working = direct.document;\n continue;\n }\n if (op.op === \"replace\") {\n const asAdd = tryApplySingleOp(working, { ...op, op: \"add\" });\n if (asAdd.ok) {\n working = asAdd.document;\n convertedReplaceToAdd += 1;\n continue;\n }\n }\n skippedOps += 1;\n }\n\n const candidate = working as { metadata?: unknown; body?: unknown };\n const document: ReplayDocument = {\n metadata:\n typeof candidate.metadata === \"object\" && candidate.metadata !== null\n ? (candidate.metadata as Record<string, unknown>)\n : {},\n body: typeof candidate.body === \"string\" ? candidate.body : current.body,\n };\n return { document, convertedReplaceToAdd, skippedOps };\n}\n\n/**\n * Documents the reanchor entry detail payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReanchorEntryDetail {\n index: number;\n rehashed: boolean;\n patch_repaired: boolean;\n converted_replace_to_add: number;\n skipped_ops: number;\n}\n\n/**\n * Documents the reanchor result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReanchorResult {\n entries: HistoryEntry[];\n finalDocument: ReplayDocument;\n entriesRehashed: number;\n entriesPatchRepaired: number;\n convertedReplaceToAdd: number;\n skippedOps: number;\n details: ReanchorEntryDetail[];\n}\n\n/**\n * Re-anchor a drifted history chain: replay every entry from empty, recompute the\n * before/after hashes, and only rewrite a patch when the original op set no longer\n * strictly applies (legacy drift). Clean entries keep their patch verbatim so the\n * on-disk diff stays minimal. The returned chain verifies via verifyHistoryChain.\n */\nexport function reanchorHistoryEntries(entries: HistoryEntry[]): ReanchorResult {\n let replay = cloneEmptyReplayDocument();\n const rewritten: HistoryEntry[] = [];\n const details: ReanchorEntryDetail[] = [];\n let entriesRehashed = 0;\n let entriesPatchRepaired = 0;\n let convertedReplaceToAdd = 0;\n let skippedOps = 0;\n\n for (let index = 0; index < entries.length; index += 1) {\n const entry = entries[index];\n const beforeHash = replayHash(replay);\n const strict = tryApplyReplayPatch(replay, entry.patch);\n\n let next: ReplayDocument;\n let outPatch: HistoryPatchOp[];\n let patchRepaired = false;\n let entryConverted = 0;\n let entrySkipped = 0;\n\n if (strict.ok) {\n next = strict.document;\n outPatch = entry.patch;\n } else {\n const lenient = lenientApplyReplayPatch(replay, entry.patch);\n next = lenient.document;\n outPatch = jsonPatch.compare(replay, next) as HistoryPatchOp[];\n patchRepaired = true;\n entryConverted = lenient.convertedReplaceToAdd;\n entrySkipped = lenient.skippedOps;\n convertedReplaceToAdd += entryConverted;\n skippedOps += entrySkipped;\n entriesPatchRepaired += 1;\n }\n\n const afterHash = replayHash(next);\n const rehashed = beforeHash !== entry.before_hash || afterHash !== entry.after_hash;\n if (rehashed) {\n entriesRehashed += 1;\n }\n\n rewritten.push({\n ...entry,\n patch: outPatch,\n before_hash: beforeHash,\n after_hash: afterHash,\n });\n details.push({\n index: index + 1,\n rehashed,\n patch_repaired: patchRepaired,\n converted_replace_to_add: entryConverted,\n skipped_ops: entrySkipped,\n });\n replay = next;\n }\n\n return {\n entries: rewritten,\n finalDocument: replay,\n entriesRehashed,\n entriesPatchRepaired,\n convertedReplaceToAdd,\n skippedOps,\n details,\n };\n}\n\n/**\n * Implements history entries to raw for the public runtime surface of this module.\n */\nexport function historyEntriesToRaw(entries: HistoryEntry[]): string {\n if (entries.length === 0) {\n return \"\";\n }\n return `${entries.map((entry) => JSON.stringify(entry)).join(\"\\n\")}\\n`;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAKA,OAAO,eAAe;AAsBf,IAAM,wBAAwC;EACnD,UAAU,CAAA;EACV,MAAM;;AAMF,SAAU,2BAAwB;AACtC,SAAO,gBAAgB,qBAAqB;AAC9C;AAKM,SAAU,WAAW,UAAwB;AACjD,MAAI;AACF,WAAO,aAAa,qBAAqB,QAAQ,CAAC;EACpD,QAAQ;AAON,WAAO,UAAU,gBAAgB,EAAE,iBAAiB,MAAM,UAAU,SAAS,UAAU,MAAM,SAAS,KAAI,CAAE,CAAC;EAC/G;AACF;AAKM,SAAU,qBAAqB,UAAwB;AAC3D,SAAO;IACL,UAAU,SAAS;IACnB,MAAM,SAAS;;AAEnB;AAOM,SAAU,8BACd,UACA,UAAmD,CAAA,GAAE;AAErD,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A,UAAM,YAAY,WAAW,IAAI;AACjC,UAAM,WAAW,eAAe,MAAM,eAAe,cAAc,MAAM;AACzE,QAAI,UAAU;AACZ,yBAAmB;IACrB;AAEA,cAAU,KAAK;MACb,GAAG;MACH,OAAO;MACP,aAAa;MACb,YAAY;KACb;AACD,YAAQ,KAAK;MACX,OAAO,QAAQ;MACf;MACA,gBAAgB;MAChB,0BAA0B;MAC1B,aAAa;KACd;AACD,aAAS;EACX;AAEA,SAAO;IACL,SAAS;IACT,eAAe;IACf;IACA;IACA;IACA;IACA;;AAEJ;AAKM,SAAU,oBAAoB,SAAuB;AACzD,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;EACT;AACA,SAAO,GAAG,QAAQ,IAAI,CAAC,UAAU,KAAK,UAAU,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;;AACpE","debugId":"be42ed54-a5b3-5603-ac08-e05799a50836"}
|
|
@@ -1,5 +1,5 @@
|
|
|
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]="abc604da-ab3e-5d0e-b958-a91614dfbbcd")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
contentFiltersNeedBody,
|
|
5
5
|
contentFiltersNeedCollections,
|
|
@@ -10,33 +10,33 @@ import {
|
|
|
10
10
|
hasMissingMetadataFilter,
|
|
11
11
|
itemMatchesMissingMetadata,
|
|
12
12
|
lifecycleClassifierFromStatusRegistry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6KARQMC6.js";
|
|
14
14
|
import {
|
|
15
15
|
parseIntegerLimit,
|
|
16
16
|
parsePriority,
|
|
17
17
|
parseType
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CNPWCUDR.js";
|
|
19
19
|
import {
|
|
20
20
|
HEAVY_METADATA_KEYS,
|
|
21
21
|
listAllFrontMatter,
|
|
22
22
|
listAllFrontMatterLight,
|
|
23
23
|
listAllFrontMatterWithBody,
|
|
24
24
|
toItemRecord
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XKJDCJEH.js";
|
|
26
26
|
import {
|
|
27
27
|
coerceRuntimeFieldValue,
|
|
28
28
|
isTerminalStatus,
|
|
29
29
|
normalizeStatusInput,
|
|
30
30
|
readRuntimeFieldOptionValue
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FSOJCFDS.js";
|
|
32
32
|
import {
|
|
33
33
|
resolveItemTypeRegistry
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-KCJZREBI.js";
|
|
35
35
|
import {
|
|
36
36
|
compareTimestampStrings,
|
|
37
37
|
nowIso,
|
|
38
38
|
resolveIsoOrRelative
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-MTQK5ZSB.js";
|
|
40
40
|
import {
|
|
41
41
|
EXIT_CODE,
|
|
42
42
|
FRONT_MATTER_KEY_ORDER,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
resolveRuntimeFieldRegistry,
|
|
51
51
|
resolveRuntimeStatusRegistry,
|
|
52
52
|
stableValueEquals
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-AZ75OVK4.js";
|
|
54
54
|
|
|
55
55
|
// dist/core/item/status-filter.js
|
|
56
56
|
var STATUS_GROUP_ALIASES = {
|
|
@@ -59,6 +59,14 @@ var STATUS_GROUP_ALIASES = {
|
|
|
59
59
|
canceled: "canceled_status",
|
|
60
60
|
cancelled: "canceled_status"
|
|
61
61
|
};
|
|
62
|
+
var STATUS_ALL_SENTINEL = "all";
|
|
63
|
+
function isStatusAllFilterInput(raw) {
|
|
64
|
+
if (typeof raw !== "string") {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
const tokens = raw.split(",").map((entry) => entry.trim().toLowerCase()).filter((entry) => entry.length > 0);
|
|
68
|
+
return tokens.length === 1 && tokens[0] === STATUS_ALL_SENTINEL;
|
|
69
|
+
}
|
|
62
70
|
function resolveStatusFilterToken(token, registry) {
|
|
63
71
|
const trimmed = token.trim().toLowerCase();
|
|
64
72
|
if (trimmed.length === 0) {
|
|
@@ -103,6 +111,13 @@ function parseStatusFilterCsv(raw, registry, options) {
|
|
|
103
111
|
if (tokens.length === 0) {
|
|
104
112
|
return void 0;
|
|
105
113
|
}
|
|
114
|
+
const allTokenCount = tokens.filter((token) => token.trim().toLowerCase() === STATUS_ALL_SENTINEL).length;
|
|
115
|
+
if (allTokenCount > 0) {
|
|
116
|
+
if (tokens.length === 1) {
|
|
117
|
+
return void 0;
|
|
118
|
+
}
|
|
119
|
+
throw new PmCliError(`Invalid ${flagLabel} value "all". Use it by itself, or omit ${flagLabel} to search every status.`, EXIT_CODE.USAGE);
|
|
120
|
+
}
|
|
106
121
|
const resolved = [];
|
|
107
122
|
for (const token of tokens) {
|
|
108
123
|
const status = resolveStatusFilterToken(token, registry);
|
|
@@ -789,9 +804,10 @@ async function runList(status, options, global) {
|
|
|
789
804
|
}
|
|
790
805
|
const explicitStatus = resolveStatusFilter(options.status, statusRegistry);
|
|
791
806
|
const resolvedStatus = explicitStatus ?? resolveStatusFilter(status, statusRegistry);
|
|
792
|
-
const
|
|
807
|
+
const explicitAllStatuses = isStatusAllFilterInput(options.status);
|
|
808
|
+
const effectiveOptions = explicitStatus || explicitAllStatuses ? { ...options, excludeTerminal: false } : options;
|
|
793
809
|
const filtered = applyFilters(items, resolvedStatus, effectiveOptions, typeRegistry, statusRegistry, runtimeFieldFilters);
|
|
794
|
-
const filtersStatus = resolvedStatus === void 0 ? null : resolvedStatus.length === 1 ? resolvedStatus[0] : resolvedStatus;
|
|
810
|
+
const filtersStatus = explicitAllStatuses ? "all" : resolvedStatus === void 0 ? null : resolvedStatus.length === 1 ? resolvedStatus[0] : resolvedStatus;
|
|
795
811
|
const sorted = sortItems(filtered, sortField, sortOrder, statusRegistry);
|
|
796
812
|
const ordered = treeEnabled ? orderItemsAsTree(sorted, parentRoot, treeDepth) : sorted;
|
|
797
813
|
const noTruncate = options.noTruncate === true;
|
|
@@ -902,6 +918,7 @@ var _testOnly = {
|
|
|
902
918
|
};
|
|
903
919
|
|
|
904
920
|
export {
|
|
921
|
+
isStatusAllFilterInput,
|
|
905
922
|
parseStatusFilterCsv,
|
|
906
923
|
collectRuntimeFilterValues,
|
|
907
924
|
matchesRuntimeFilters,
|
|
@@ -914,6 +931,6 @@ export {
|
|
|
914
931
|
runList,
|
|
915
932
|
_testOnly
|
|
916
933
|
};
|
|
917
|
-
//# sourceMappingURL=chunk-
|
|
934
|
+
//# sourceMappingURL=chunk-X3CD2VUI.js.map
|
|
918
935
|
|
|
919
|
-
//# debugId=
|
|
936
|
+
//# debugId=abc604da-ab3e-5d0e-b958-a91614dfbbcd
|