@unbrained/pm-cli 2026.6.19 → 2026.6.21
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 +328 -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/extension/scaffold.js +49 -3
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.js +9 -2
- package/dist/cli/commands/extension.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 +27 -9
- 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/commands/validate.d.ts +1 -1
- package/dist/cli/commands/validate.js +44 -2
- package/dist/cli/commands/validate.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-CIHV64UC.js +18 -0
- package/dist/cli-bundle/chunks/{activity-XJ7WRNWS.js → activity-KW3IRP44.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-LBCWF6UJ.js → aggregate-3ZKQG5SW.js} +10 -10
- package/dist/cli-bundle/chunks/{aggregate-OFT4YVB6.js → aggregate-FIGQEIL3.js} +10 -10
- package/dist/cli-bundle/chunks/{append-BP2ARHOK.js → append-EWJYJ7CH.js} +8 -8
- package/dist/cli-bundle/chunks/{append-5U3XR5SD.js → append-QEOLX3XB.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-CSRFOIHG.js → chunk-2EIMPCE4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MAKOMXVM.js → chunk-2GCDRRIF.js} +106 -67
- package/dist/cli-bundle/chunks/chunk-2GCDRRIF.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-AZR2JITW.js → chunk-2PKHRP6G.js} +190 -22
- package/dist/cli-bundle/chunks/chunk-2PKHRP6G.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YWAYOWDQ.js → chunk-32R4PIC6.js} +118 -15
- package/dist/cli-bundle/chunks/chunk-32R4PIC6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-II3WDRCM.js → chunk-37QXHBIB.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UCNEPMPY.js → chunk-3EWSGA7N.js} +105 -66
- package/dist/cli-bundle/chunks/chunk-3EWSGA7N.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UMTPQMEG.js → chunk-3MDHREEV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-I2VJM36R.js → chunk-434HM6Z5.js} +21 -21
- package/dist/cli-bundle/chunks/chunk-434HM6Z5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y4IBSEQ2.js → chunk-52OCIDPG.js} +20 -8
- package/dist/cli-bundle/chunks/chunk-52OCIDPG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DJ3YYLHG.js → chunk-5FIEHKEX.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-OURX4WVG.js → chunk-5IDI42VV.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UA4ANRJY.js → chunk-5PCI3UBT.js} +119 -16
- package/dist/cli-bundle/chunks/chunk-5PCI3UBT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RVG3WLY3.js → chunk-5QICDWMV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LIVRA6VG.js → chunk-6CJWZAN7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-AVMSP2HH.js → chunk-6H4LF7AO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-B2NEFANY.js → chunk-6M4RJS4M.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-4BFNWAMQ.js → chunk-6ZXM2XNF.js} +29 -12
- package/dist/cli-bundle/chunks/chunk-6ZXM2XNF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A5JPMD4Q.js → chunk-76Z3YSHV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5NS6TJ2F.js → chunk-7D3SAQXM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DVUU3AHP.js → chunk-A4Z7ZOL5.js} +17 -6
- package/dist/cli-bundle/chunks/chunk-A4Z7ZOL5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2E3KSWFG.js → chunk-AIS5PGI3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-47BYN6CA.js → chunk-AZMOLBN3.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-DYZKSIVX.js → chunk-B473GZWW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RNWE2HZR.js → chunk-C3AZ5ZML.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-S673PVHD.js → chunk-C4N5I7ZW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TYQBGXH2.js → chunk-CF55WVVS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4EOS35RL.js → chunk-CZPXY7UW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MPEWACTG.js → chunk-CZUB4XWO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-22YA6GCA.js → chunk-D7FYS6PG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5SRID7DV.js → chunk-EBH56IXK.js} +29 -12
- package/dist/cli-bundle/chunks/chunk-EBH56IXK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UIMLAFOE.js → chunk-F5NZWFSW.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-PSWSQHM7.js → chunk-F7K5GWP3.js} +15 -19
- package/dist/cli-bundle/chunks/chunk-F7K5GWP3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-H3DP6OUM.js → chunk-FKBDKV7Y.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SO2IOH37.js → chunk-FRUFKWNK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7R5YKVKO.js → chunk-FWPDUYEY.js} +7 -7
- package/dist/cli-bundle/chunks/{search-2JX776KX.js → chunk-GMHPNNYG.js} +184 -23
- package/dist/cli-bundle/chunks/chunk-GMHPNNYG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-USVOBLGB.js → chunk-GOZUHWFD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZBVYKWT2.js → chunk-H7NJZWG2.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-FPQA4ZMA.js → chunk-HC4AWIKT.js} +18 -7
- package/dist/cli-bundle/chunks/chunk-HC4AWIKT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4L7Q4OVT.js → chunk-HCU6WUSY.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-2RI3BDFK.js → chunk-HIP7WVTL.js} +10 -9
- package/dist/cli-bundle/chunks/chunk-HIP7WVTL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5QLHQK7V.js → chunk-HMOADQVT.js} +26 -26
- package/dist/cli-bundle/chunks/chunk-HMOADQVT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K5TD74VU.js → chunk-J4MYYSOL.js} +19 -7
- package/dist/cli-bundle/chunks/chunk-J4MYYSOL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GDOTTY2S.js → chunk-JINYH2DB.js} +40 -2
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EMFDZ7N3.js → chunk-LEU5GHRC.js} +55 -5
- package/dist/cli-bundle/chunks/chunk-LEU5GHRC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PRUB7RI4.js → chunk-LUWW7L4B.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-N7LDJRB4.js → chunk-M5XALUSL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NPNNW5TU.js → chunk-N5ZJACJ6.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-NNMBNN6Q.js → chunk-NB3PYLQ6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-USKTNI7P.js → chunk-NIGXMNNI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GL3QKIET.js → chunk-NIUEXCFS.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-OUG4CL4H.js → chunk-NJHMAJ6N.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-2K56AWDP.js → chunk-NJN7LL7U.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-5P2LQV2F.js → chunk-NSBZ2CKF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZZEM2PH7.js → chunk-NXS7ZKAK.js} +19 -14
- package/dist/cli-bundle/chunks/chunk-NXS7ZKAK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XV6N3QND.js → chunk-O47BPOPC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X26ODPU4.js → chunk-OFYMIDF2.js} +14 -18
- package/dist/cli-bundle/chunks/chunk-OFYMIDF2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QCHNPN24.js → chunk-OTHIWLMB.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-YVYJQR6S.js → chunk-PFSRUHDH.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-M35R7LFX.js → chunk-PP2U4NMT.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-ZGEWEO7B.js → chunk-PUH4D67U.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LEC57E7K.js → chunk-Q2J2HJUN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QSH34DSQ.js → chunk-QGG32QHW.js} +61 -4
- package/dist/cli-bundle/chunks/chunk-QGG32QHW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QG6M6XQE.js → chunk-QQHISQBJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BQVESTOG.js → chunk-QZTWBFXJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-COHNQLB2.js → chunk-R2EMWY7Q.js} +41 -3
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5LZPDRFW.js → chunk-RLK7P77C.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-QTWWHFI3.js → chunk-RVHYI7SL.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-FVZSUIN5.js → chunk-SBGXDO7A.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VP4Z36GO.js → chunk-SRYYRVPB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X7RKOJXL.js → chunk-SX75ADBK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-MTDEEUGV.js → chunk-TKBHZPKD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-HMQMRHQJ.js → chunk-UEMNL33O.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-SDUZTZ55.js → chunk-UPE3CDD7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-VG3B2CYD.js → chunk-UV6IYE5U.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YOGXK3ON.js → chunk-WQ7NIVDK.js} +18 -13
- package/dist/cli-bundle/chunks/chunk-WQ7NIVDK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MTGMNUMJ.js → chunk-YCJX76PW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FP7YLQ52.js → chunk-Z6T4PQI2.js} +11 -10
- package/dist/cli-bundle/chunks/chunk-Z6T4PQI2.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-2BSYPJTJ.js → claim-RC56YUWG.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-EZ6JKY5X.js → claim-THOJ6CMV.js} +10 -10
- package/dist/cli-bundle/chunks/close-DNMHGOCX.js +15 -0
- package/dist/cli-bundle/chunks/{close-3TSX6BYF.js → close-SG5MNCVQ.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-HB4UFCS3.js → close-many-3L3AQZBU.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-B7DBVA46.js → close-many-DKQLBGLV.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-M7PAINZT.js → comments-M7ZOZNBX.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-X7M7XM6I.js → comments-SKWMDWCW.js} +10 -10
- package/dist/cli-bundle/chunks/{config-YICACPHA.js → config-7CK62S7T.js} +30 -10
- package/dist/cli-bundle/chunks/config-7CK62S7T.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-UWF3KRP5.js → config-OZCUABPB.js} +29 -9
- package/dist/cli-bundle/chunks/config-OZCUABPB.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-EGUGU4K7.js → context-OEC366TO.js} +13 -13
- package/dist/cli-bundle/chunks/{context-V32ZAPL6.js → context-PUG2A7RC.js} +13 -13
- package/dist/cli-bundle/chunks/{contracts-B2YWYUV5.js → contracts-3THOLA7L.js} +10 -8
- package/dist/cli-bundle/chunks/contracts-3THOLA7L.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-7G553BHP.js → contracts-N65FXEOL.js} +10 -8
- package/dist/cli-bundle/chunks/contracts-N65FXEOL.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-NWFFRYWM.js → copy-6QLHILAC.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-RMLXLZOL.js → copy-JPX7VZCH.js} +7 -7
- package/dist/cli-bundle/chunks/create-NNP6TSFO.js +30 -0
- package/dist/cli-bundle/chunks/{create-GK4MX2LJ.js → create-Y54ZVVZH.js} +14 -14
- package/dist/cli-bundle/chunks/{delete-RMGNIL2S.js → delete-63PCMQAJ.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-EFQLVEAS.js → delete-GDSMGAGJ.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-WKHUPVD3.js → deps-T4ZF5G54.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-K2I7QV4Y.js → deps-XYQ73XRH.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-3FXRDYA7.js → docs-C75YIXHC.js} +10 -9
- package/dist/cli-bundle/chunks/{docs-3FXRDYA7.js.map → docs-C75YIXHC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-2H2UGIT6.js → docs-EHNPDWUL.js} +12 -11
- package/dist/cli-bundle/chunks/{docs-2H2UGIT6.js.map → docs-EHNPDWUL.js.map} +1 -1
- package/dist/cli-bundle/chunks/eval-3WKDTRMH.js +276 -0
- package/dist/cli-bundle/chunks/eval-3WKDTRMH.js.map +1 -0
- package/dist/cli-bundle/chunks/eval-GTENKE24.js +286 -0
- package/dist/cli-bundle/chunks/eval-GTENKE24.js.map +7 -0
- package/dist/cli-bundle/chunks/{extension-4LPTFTV4.js → extension-46NWACO3.js} +5 -5
- package/dist/cli-bundle/chunks/{extension-ASUPTDCC.js → extension-D5FDZ2CO.js} +5 -5
- package/dist/cli-bundle/chunks/{files-TXEQOA7C.js → files-DSZBOSSN.js} +12 -11
- package/dist/cli-bundle/chunks/{files-TXEQOA7C.js.map → files-DSZBOSSN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{files-UAZFB3EA.js → files-X3H7CCBQ.js} +10 -9
- package/dist/cli-bundle/chunks/{files-UAZFB3EA.js.map → files-X3H7CCBQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-UGROAMAX.js → focus-5STQXDPU.js} +8 -8
- package/dist/cli-bundle/chunks/{focus-ELOPN2SR.js → focus-MDVPOWB5.js} +8 -8
- package/dist/cli-bundle/chunks/gc-ZC7JHBG7.js +395 -0
- package/dist/cli-bundle/chunks/gc-ZC7JHBG7.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-ZMST3WQP.js +385 -0
- package/dist/cli-bundle/chunks/gc-ZMST3WQP.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-OTXPLWYW.js → get-J2IPJRZW.js} +11 -11
- package/dist/cli-bundle/chunks/{get-IWZ7IMPS.js → get-NT7L2HUZ.js} +11 -11
- package/dist/cli-bundle/chunks/{health-PPTJ7XKW.js → health-IVMA3XQC.js} +38 -26
- package/dist/cli-bundle/chunks/health-IVMA3XQC.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-JEBESKID.js → health-WOYBR3KU.js} +37 -25
- package/dist/cli-bundle/chunks/health-WOYBR3KU.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-HNWBUDMI.js → history-RLH2QCRO.js} +10 -10
- package/dist/cli-bundle/chunks/history-WX3MGFS2.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-MMQC7MCW.js → history-compact-UXDIFC33.js} +12 -12
- package/dist/cli-bundle/chunks/{history-compact-EQXVPK3V.js → history-compact-ZBEBGJM7.js} +12 -12
- package/dist/cli-bundle/chunks/{history-redact-UBDHBEJE.js → history-redact-P7I7AWMB.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-YQGU3XRA.js +21 -0
- package/dist/cli-bundle/chunks/{history-repair-GMMHFAGH.js → history-repair-52KINVIK.js} +12 -12
- package/dist/cli-bundle/chunks/{history-repair-7DSDRPMX.js → history-repair-RM5ITLU5.js} +12 -12
- package/dist/cli-bundle/chunks/{init-QGK4JFF6.js → init-2BNZOO6F.js} +10 -10
- package/dist/cli-bundle/chunks/init-SC2P6CHP.js +20 -0
- package/dist/cli-bundle/chunks/{learnings-DR53TWRA.js → learnings-W6F3FIPL.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-A6DGBMG3.js → learnings-YGYVHWJK.js} +10 -10
- package/dist/cli-bundle/chunks/{list-LJ5DBXC3.js → list-K6FPV4J4.js} +10 -10
- package/dist/cli-bundle/chunks/{list-KOJN23UL.js → list-KPAYU5KZ.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-7VLTHKPW.js → notes-PU74EPKV.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-K5I3TAYR.js → notes-YTD6ZILW.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-X3STKLED.js → plan-FNXHXRCI.js} +15 -15
- package/dist/cli-bundle/chunks/plan-FNXHXRCI.js.map +7 -0
- package/dist/cli-bundle/chunks/{plan-BK3OMLGP.js → plan-GEQYUCBW.js} +16 -16
- package/dist/cli-bundle/chunks/plan-GEQYUCBW.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-XDLFESU7.js → register-list-query-PHWYHENI.js} +43 -22
- package/dist/cli-bundle/chunks/register-list-query-PHWYHENI.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-FUMXPWZ4.js → register-list-query-QI45RMKN.js} +42 -21
- package/dist/cli-bundle/chunks/register-list-query-QI45RMKN.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-RXRX4P7D.js → register-mutation-X3BUOQEL.js} +33 -33
- package/dist/cli-bundle/chunks/{register-mutation-ZAGVKMBQ.js → register-mutation-YINRTS7L.js} +33 -33
- package/dist/cli-bundle/chunks/{register-operations-DGSHCS75.js → register-operations-E5JEASRK.js} +35 -35
- package/dist/cli-bundle/chunks/register-operations-E5JEASRK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-6UURPZN5.js → register-operations-MIDTRW7S.js} +34 -34
- package/dist/cli-bundle/chunks/{register-operations-6UURPZN5.js.map → register-operations-MIDTRW7S.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-LTJG52WP.js → register-setup-DYBFLEZX.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-2FEGSFLM.js → register-setup-EG2U6CEU.js} +15 -15
- package/dist/cli-bundle/chunks/restore-5KHR2YYQ.js +19 -0
- package/dist/cli-bundle/chunks/{restore-SJUWYOCK.js → restore-XQYSWBV7.js} +11 -11
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-VWAMP2S2.js → scheduling-shortcuts-HJMTEXKE.js} +14 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-W4F2LKHW.js → scheduling-shortcuts-NNT5ASZR.js} +14 -14
- package/dist/cli-bundle/chunks/{schema-N5ETYD4P.js → schema-263RI4WW.js} +9 -9
- package/dist/cli-bundle/chunks/{schema-DXQRIEFM.js → schema-TZXW6XWD.js} +9 -9
- package/dist/cli-bundle/chunks/search-LECJYSXE.js +33 -0
- package/dist/cli-bundle/chunks/search-SFRJOVDG.js +37 -0
- package/dist/cli-bundle/chunks/{stats-ZFESFVQC.js → stats-N7ER2PNK.js} +8 -8
- package/dist/cli-bundle/chunks/{stats-J563NJBY.js → stats-VPBGSRQH.js} +8 -8
- package/dist/cli-bundle/chunks/{telemetry-BNGLIFEM.js → telemetry-L6K3BUIQ.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-SC7HPRXX.js → telemetry-PP3FUNBU.js} +4 -4
- package/dist/cli-bundle/chunks/{test-47UQGEXE.js → test-3EGNS3T5.js} +15 -15
- package/dist/cli-bundle/chunks/{test-55RJCGRU.js → test-RQCTSWUK.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-DN6KG4FX.js → test-all-NJ5V2QFS.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-5SFTTRNL.js → test-all-ZHFAWNC3.js} +15 -15
- package/dist/cli-bundle/chunks/{test-runs-NHRBT7SN.js → test-runs-AJHR6IQF.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-DZEDJ4GH.js → test-runs-GN3C6GOI.js} +5 -5
- package/dist/cli-bundle/chunks/update-6YXOGHRT.js +24 -0
- package/dist/cli-bundle/chunks/update-6YXOGHRT.js.map +7 -0
- package/dist/cli-bundle/chunks/update-V33YUBRP.js +28 -0
- package/dist/cli-bundle/chunks/update-V33YUBRP.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-IRNV3OTG.js → update-many-N2AN6ZDH.js} +23 -23
- package/dist/cli-bundle/chunks/{update-many-OKYWFCBO.js → update-many-RYQ64CFW.js} +23 -23
- package/dist/cli-bundle/chunks/{upgrade-KP4I45V5.js → upgrade-TJXFLZIX.js} +5 -5
- package/dist/cli-bundle/chunks/{upgrade-3RIAFQIK.js → upgrade-VPCIYAVW.js} +5 -5
- package/dist/cli-bundle/chunks/{validate-GVY4VE43.js → validate-JMNWEUYF.js} +62 -24
- package/dist/cli-bundle/chunks/validate-JMNWEUYF.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-ADKGN37M.js → validate-PHKIYGSY.js} +61 -23
- package/dist/cli-bundle/chunks/validate-PHKIYGSY.js.map +7 -0
- 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 +40 -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/item-format-version.d.ts +87 -0
- package/dist/core/item/item-format-version.js +85 -0
- package/dist/core/item/item-format-version.js.map +1 -0
- package/dist/core/item/item-format.js +8 -2
- package/dist/core/item/item-format.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 +6 -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/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -0
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.d.ts +48 -1
- package/dist/sdk/testing.js +98 -2
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +26 -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 +126 -11
- package/docs/CLAUDE_CODE_PLUGIN.md +5 -13
- package/docs/COMMANDS.md +57 -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 +80 -1
- package/docs/TESTING.md +18 -0
- package/package.json +4 -3
- package/packages/pm-command-kit/README.md +4 -0
- 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 +192 -9
- package/packages/pm-todos/extensions/todos/runtime.ts +211 -8
- 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-EMFDZ7N3.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-QSH34DSQ.js.map +0 -7
- 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/health-JEBESKID.js.map +0 -7
- package/dist/cli-bundle/chunks/health-PPTJ7XKW.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/validate-ADKGN37M.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-GVY4VE43.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-62I26XZB.js.map → activity-CIHV64UC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-XJ7WRNWS.js.map → activity-KW3IRP44.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-LBCWF6UJ.js.map → aggregate-3ZKQG5SW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-OFT4YVB6.js.map → aggregate-FIGQEIL3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-BP2ARHOK.js.map → append-EWJYJ7CH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-5U3XR5SD.js.map → append-QEOLX3XB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CSRFOIHG.js.map → chunk-2EIMPCE4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-II3WDRCM.js.map → chunk-37QXHBIB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UMTPQMEG.js.map → chunk-3MDHREEV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DJ3YYLHG.js.map → chunk-5FIEHKEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OURX4WVG.js.map → chunk-5IDI42VV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RVG3WLY3.js.map → chunk-5QICDWMV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LIVRA6VG.js.map → chunk-6CJWZAN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AVMSP2HH.js.map → chunk-6H4LF7AO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B2NEFANY.js.map → chunk-6M4RJS4M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A5JPMD4Q.js.map → chunk-76Z3YSHV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5NS6TJ2F.js.map → chunk-7D3SAQXM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2E3KSWFG.js.map → chunk-AIS5PGI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-47BYN6CA.js.map → chunk-AZMOLBN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DYZKSIVX.js.map → chunk-B473GZWW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RNWE2HZR.js.map → chunk-C3AZ5ZML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S673PVHD.js.map → chunk-C4N5I7ZW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TYQBGXH2.js.map → chunk-CF55WVVS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4EOS35RL.js.map → chunk-CZPXY7UW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MPEWACTG.js.map → chunk-CZUB4XWO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22YA6GCA.js.map → chunk-D7FYS6PG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UIMLAFOE.js.map → chunk-F5NZWFSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H3DP6OUM.js.map → chunk-FKBDKV7Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SO2IOH37.js.map → chunk-FRUFKWNK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7R5YKVKO.js.map → chunk-FWPDUYEY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-USVOBLGB.js.map → chunk-GOZUHWFD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZBVYKWT2.js.map → chunk-H7NJZWG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4L7Q4OVT.js.map → chunk-HCU6WUSY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PRUB7RI4.js.map → chunk-LUWW7L4B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N7LDJRB4.js.map → chunk-M5XALUSL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NPNNW5TU.js.map → chunk-N5ZJACJ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NNMBNN6Q.js.map → chunk-NB3PYLQ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-USKTNI7P.js.map → chunk-NIGXMNNI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GL3QKIET.js.map → chunk-NIUEXCFS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUG4CL4H.js.map → chunk-NJHMAJ6N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2K56AWDP.js.map → chunk-NJN7LL7U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5P2LQV2F.js.map → chunk-NSBZ2CKF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XV6N3QND.js.map → chunk-O47BPOPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCHNPN24.js.map → chunk-OTHIWLMB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVYJQR6S.js.map → chunk-PFSRUHDH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M35R7LFX.js.map → chunk-PP2U4NMT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZGEWEO7B.js.map → chunk-PUH4D67U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LEC57E7K.js.map → chunk-Q2J2HJUN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QG6M6XQE.js.map → chunk-QQHISQBJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BQVESTOG.js.map → chunk-QZTWBFXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5LZPDRFW.js.map → chunk-RLK7P77C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QTWWHFI3.js.map → chunk-RVHYI7SL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FVZSUIN5.js.map → chunk-SBGXDO7A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VP4Z36GO.js.map → chunk-SRYYRVPB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X7RKOJXL.js.map → chunk-SX75ADBK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTDEEUGV.js.map → chunk-TKBHZPKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HMQMRHQJ.js.map → chunk-UEMNL33O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDUZTZ55.js.map → chunk-UPE3CDD7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VG3B2CYD.js.map → chunk-UV6IYE5U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTGMNUMJ.js.map → chunk-YCJX76PW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-2BSYPJTJ.js.map → claim-RC56YUWG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-EZ6JKY5X.js.map → claim-THOJ6CMV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TQZK43Z5.js.map → close-DNMHGOCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3TSX6BYF.js.map → close-SG5MNCVQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-HB4UFCS3.js.map → close-many-3L3AQZBU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-B7DBVA46.js.map → close-many-DKQLBGLV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-M7PAINZT.js.map → comments-M7ZOZNBX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-X7M7XM6I.js.map → comments-SKWMDWCW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-EGUGU4K7.js.map → context-OEC366TO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-V32ZAPL6.js.map → context-PUG2A7RC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NWFFRYWM.js.map → copy-6QLHILAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-RMLXLZOL.js.map → copy-JPX7VZCH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-UZLJXHLA.js.map → create-NNP6TSFO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-GK4MX2LJ.js.map → create-Y54ZVVZH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RMGNIL2S.js.map → delete-63PCMQAJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-EFQLVEAS.js.map → delete-GDSMGAGJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WKHUPVD3.js.map → deps-T4ZF5G54.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-K2I7QV4Y.js.map → deps-XYQ73XRH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-4LPTFTV4.js.map → extension-46NWACO3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ASUPTDCC.js.map → extension-D5FDZ2CO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-UGROAMAX.js.map → focus-5STQXDPU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-ELOPN2SR.js.map → focus-MDVPOWB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-OTXPLWYW.js.map → get-J2IPJRZW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-IWZ7IMPS.js.map → get-NT7L2HUZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-HNWBUDMI.js.map → history-RLH2QCRO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-TKTULEVE.js.map → history-WX3MGFS2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-MMQC7MCW.js.map → history-compact-UXDIFC33.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-EQXVPK3V.js.map → history-compact-ZBEBGJM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-UBDHBEJE.js.map → history-redact-P7I7AWMB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-SPIFIXVY.js.map → history-redact-YQGU3XRA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-GMMHFAGH.js.map → history-repair-52KINVIK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-7DSDRPMX.js.map → history-repair-RM5ITLU5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-QGK4JFF6.js.map → init-2BNZOO6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-A6FTZ5UC.js.map → init-SC2P6CHP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-DR53TWRA.js.map → learnings-W6F3FIPL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-A6DGBMG3.js.map → learnings-YGYVHWJK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-LJ5DBXC3.js.map → list-K6FPV4J4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-KOJN23UL.js.map → list-KPAYU5KZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-7VLTHKPW.js.map → notes-PU74EPKV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-K5I3TAYR.js.map → notes-YTD6ZILW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-RXRX4P7D.js.map → register-mutation-X3BUOQEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-ZAGVKMBQ.js.map → register-mutation-YINRTS7L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-LTJG52WP.js.map → register-setup-DYBFLEZX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-2FEGSFLM.js.map → register-setup-EG2U6CEU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PI3WM4GK.js.map → restore-5KHR2YYQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-SJUWYOCK.js.map → restore-XQYSWBV7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-VWAMP2S2.js.map → scheduling-shortcuts-HJMTEXKE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-W4F2LKHW.js.map → scheduling-shortcuts-NNT5ASZR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-N5ETYD4P.js.map → schema-263RI4WW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-DXQRIEFM.js.map → schema-TZXW6XWD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-55RJCGRU.js.map → search-LECJYSXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-47UQGEXE.js.map → search-SFRJOVDG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-ZFESFVQC.js.map → stats-N7ER2PNK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-J563NJBY.js.map → stats-VPBGSRQH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-BNGLIFEM.js.map → telemetry-L6K3BUIQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-SC7HPRXX.js.map → telemetry-PP3FUNBU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-GCNLER2H.js.map → test-3EGNS3T5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2BZEAI7B.js.map → test-RQCTSWUK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-DN6KG4FX.js.map → test-all-NJ5V2QFS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-5SFTTRNL.js.map → test-all-ZHFAWNC3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-NHRBT7SN.js.map → test-runs-AJHR6IQF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-DZEDJ4GH.js.map → test-runs-GN3C6GOI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-IRNV3OTG.js.map → update-many-N2AN6ZDH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-OKYWFCBO.js.map → update-many-RYQ64CFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-KP4I45V5.js.map → upgrade-TJXFLZIX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-3RIAFQIK.js.map → upgrade-VPCIYAVW.js.map} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type EvalSearchMode } from "../../core/search/eval.js";
|
|
2
|
+
import type { GlobalOptions } from "../../core/shared/command-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Relative location (under the pm root) of the default golden-query set. A
|
|
5
|
+
* git-tracked, human-curated file so relevance ground truth lives alongside the
|
|
6
|
+
* tracker it evaluates.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_EVAL_QUERIES_RELATIVE_PATH: string;
|
|
9
|
+
/**
|
|
10
|
+
* Documents the eval command options payload exchanged by command, SDK, and package integrations.
|
|
11
|
+
*/
|
|
12
|
+
export interface EvalOptions {
|
|
13
|
+
/** Default retrieval mode for queries that do not set their own (keyword|semantic|hybrid). */
|
|
14
|
+
mode?: string;
|
|
15
|
+
/** Metric cutoff (`@k`); positive integer, defaults to {@link DEFAULT_EVAL_K}. */
|
|
16
|
+
k?: string | number;
|
|
17
|
+
/** Gate threshold: exit non-zero when the aggregate nDCG@k falls below this `[0,1]` value. */
|
|
18
|
+
failUnder?: string | number;
|
|
19
|
+
/** Override path to the golden-query JSON file (defaults to `<pmRoot>/search/eval-queries.json`). */
|
|
20
|
+
queries?: string;
|
|
21
|
+
/** Output format override: json|toon. */
|
|
22
|
+
format?: string;
|
|
23
|
+
}
|
|
24
|
+
/** Per-query relevance report row emitted by {@link runEval}. */
|
|
25
|
+
export interface EvalQueryReport {
|
|
26
|
+
query: string;
|
|
27
|
+
mode: EvalSearchMode;
|
|
28
|
+
relevant_total: number;
|
|
29
|
+
retrieved_relevant: number;
|
|
30
|
+
ndcg: number;
|
|
31
|
+
mrr: number;
|
|
32
|
+
precision: number;
|
|
33
|
+
recall: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Documents the eval result payload exchanged by command, SDK, and package integrations.
|
|
37
|
+
*/
|
|
38
|
+
export interface EvalResult {
|
|
39
|
+
k: number;
|
|
40
|
+
query_count: number;
|
|
41
|
+
aggregate: {
|
|
42
|
+
ndcg: number;
|
|
43
|
+
mrr: number;
|
|
44
|
+
precision: number;
|
|
45
|
+
recall: number;
|
|
46
|
+
};
|
|
47
|
+
queries: EvalQueryReport[];
|
|
48
|
+
/** Present only when `--fail-under` was supplied. */
|
|
49
|
+
fail_under?: number;
|
|
50
|
+
/** Whether the aggregate nDCG met the gate (always true when no gate is set). */
|
|
51
|
+
passed: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Run the search-relevance evaluation (pm-u8n5). Loads the golden-query set
|
|
55
|
+
* (default `<pmRoot>/search/eval-queries.json`, overridable via `--queries`),
|
|
56
|
+
* runs each query through {@link runSearch} at the resolved mode, scores the
|
|
57
|
+
* returned ranking with the nDCG/MRR/precision/recall metrics, and macro-averages
|
|
58
|
+
* across queries. When `--fail-under` is supplied, `passed` reflects whether the
|
|
59
|
+
* aggregate nDCG@k cleared the threshold; the CLI layer maps a failed gate to a
|
|
60
|
+
* non-zero exit code.
|
|
61
|
+
*/
|
|
62
|
+
export declare function runEval(options: EvalOptions, global: GlobalOptions): Promise<EvalResult>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module cli/commands/eval
|
|
3
|
+
*
|
|
4
|
+
* Implements the `pm eval` command surface (pm-u8n5): a search-relevance
|
|
5
|
+
* evaluation runner that scores a human-curated golden-query set against the
|
|
6
|
+
* live retrieval path and reports nDCG@k, MRR@k, precision@k, and recall@k per
|
|
7
|
+
* query plus the macro average. With `--fail-under` it doubles as a CI gate so
|
|
8
|
+
* relevance regressions — from corpus changes, hybrid-weight changes, or
|
|
9
|
+
* provider swaps (including the offline BM25 provider, pm-75k9) — fail the build
|
|
10
|
+
* instead of silently degrading retrieval quality.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
!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]="fa1fece2-ddfb-537d-af39-fcd4ab8b5972")}catch(e){}}();
|
|
14
|
+
import fs from "node:fs/promises";
|
|
15
|
+
import path from "node:path";
|
|
16
|
+
import { aggregateEvalMetrics, DEFAULT_EVAL_K, evaluateRanking, parseEvalQuerySet, } from "../../core/search/eval.js";
|
|
17
|
+
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
18
|
+
import { PmCliError } from "../../core/shared/errors.js";
|
|
19
|
+
import { coercePositiveInteger } from "../../core/shared/primitives.js";
|
|
20
|
+
import { pathExists } from "../../core/fs/fs-utils.js";
|
|
21
|
+
import { getSettingsPath, resolvePmRoot } from "../../core/store/paths.js";
|
|
22
|
+
import { runSearch } from "./search.js";
|
|
23
|
+
/**
|
|
24
|
+
* Relative location (under the pm root) of the default golden-query set. A
|
|
25
|
+
* git-tracked, human-curated file so relevance ground truth lives alongside the
|
|
26
|
+
* tracker it evaluates.
|
|
27
|
+
*/
|
|
28
|
+
export const DEFAULT_EVAL_QUERIES_RELATIVE_PATH = path.join("search", "eval-queries.json");
|
|
29
|
+
const VALID_EVAL_MODES = new Set(["keyword", "semantic", "hybrid"]);
|
|
30
|
+
function parseEvalMode(raw) {
|
|
31
|
+
if (raw === undefined) {
|
|
32
|
+
return "keyword";
|
|
33
|
+
}
|
|
34
|
+
const normalized = raw.trim().toLowerCase();
|
|
35
|
+
if (!VALID_EVAL_MODES.has(normalized)) {
|
|
36
|
+
throw new PmCliError("Eval --mode must be one of keyword|semantic|hybrid", EXIT_CODE.USAGE);
|
|
37
|
+
}
|
|
38
|
+
return normalized;
|
|
39
|
+
}
|
|
40
|
+
function parseEvalK(raw) {
|
|
41
|
+
if (raw === undefined || raw === "") {
|
|
42
|
+
return DEFAULT_EVAL_K;
|
|
43
|
+
}
|
|
44
|
+
const parsed = coercePositiveInteger(raw);
|
|
45
|
+
if (parsed === null) {
|
|
46
|
+
throw new PmCliError("Eval --k must be a positive integer", EXIT_CODE.USAGE);
|
|
47
|
+
}
|
|
48
|
+
return parsed;
|
|
49
|
+
}
|
|
50
|
+
function parseFailUnder(raw) {
|
|
51
|
+
if (raw === undefined || raw === "") {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
const parsed = typeof raw === "number" ? raw : Number(String(raw).trim());
|
|
55
|
+
if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
|
|
56
|
+
throw new PmCliError("Eval --fail-under must be a number in the range [0, 1]", EXIT_CODE.USAGE);
|
|
57
|
+
}
|
|
58
|
+
return parsed;
|
|
59
|
+
}
|
|
60
|
+
/** Round a metric to four decimals to keep the JSON output compact and stable. */
|
|
61
|
+
function roundMetric(value) {
|
|
62
|
+
return Math.round(value * 10_000) / 10_000;
|
|
63
|
+
}
|
|
64
|
+
async function loadEvalQuerySet(queriesPath) {
|
|
65
|
+
let raw;
|
|
66
|
+
try {
|
|
67
|
+
raw = await fs.readFile(queriesPath, "utf8");
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
throw new PmCliError(`Eval query set not found at ${queriesPath}`, EXIT_CODE.NOT_FOUND, {
|
|
71
|
+
examples: [
|
|
72
|
+
'echo \'[{"query":"offline search","relevant_ids":["pm-75k9"]}]\' > ' + queriesPath,
|
|
73
|
+
"pm eval --queries ./my-eval.json",
|
|
74
|
+
],
|
|
75
|
+
nextSteps: [
|
|
76
|
+
"Create a git-tracked golden-query JSON file (an array of {query, relevant_ids, mode?} objects), then re-run pm eval.",
|
|
77
|
+
],
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
let parsed;
|
|
81
|
+
try {
|
|
82
|
+
parsed = JSON.parse(raw);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
// JSON.parse only ever throws a SyntaxError (an Error subclass).
|
|
86
|
+
throw new PmCliError(`Eval query set at ${queriesPath} is not valid JSON: ${error.message}`, EXIT_CODE.USAGE);
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
return parseEvalQuerySet(parsed);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
// parseEvalQuerySet only ever throws EvalQuerySetError (an Error subclass
|
|
93
|
+
// with a precise, author-actionable message) — surface it as a usage error.
|
|
94
|
+
throw new PmCliError(error.message, EXIT_CODE.USAGE);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Run the search-relevance evaluation (pm-u8n5). Loads the golden-query set
|
|
99
|
+
* (default `<pmRoot>/search/eval-queries.json`, overridable via `--queries`),
|
|
100
|
+
* runs each query through {@link runSearch} at the resolved mode, scores the
|
|
101
|
+
* returned ranking with the nDCG/MRR/precision/recall metrics, and macro-averages
|
|
102
|
+
* across queries. When `--fail-under` is supplied, `passed` reflects whether the
|
|
103
|
+
* aggregate nDCG@k cleared the threshold; the CLI layer maps a failed gate to a
|
|
104
|
+
* non-zero exit code.
|
|
105
|
+
*/
|
|
106
|
+
export async function runEval(options, global) {
|
|
107
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
108
|
+
if (!(await pathExists(getSettingsPath(pmRoot)))) {
|
|
109
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
110
|
+
}
|
|
111
|
+
const k = parseEvalK(options.k);
|
|
112
|
+
const defaultMode = parseEvalMode(options.mode);
|
|
113
|
+
const failUnder = parseFailUnder(options.failUnder);
|
|
114
|
+
const queriesPath = options.queries
|
|
115
|
+
? path.resolve(process.cwd(), options.queries)
|
|
116
|
+
: path.join(pmRoot, DEFAULT_EVAL_QUERIES_RELATIVE_PATH);
|
|
117
|
+
const querySet = await loadEvalQuerySet(queriesPath);
|
|
118
|
+
const reports = [];
|
|
119
|
+
// Aggregate and gate on the UNROUNDED metrics; rounding is applied only to the
|
|
120
|
+
// emitted report values so display precision never flips a --fail-under decision.
|
|
121
|
+
const rawMetrics = [];
|
|
122
|
+
for (const evalQuery of querySet.queries) {
|
|
123
|
+
const mode = evalQuery.mode ?? defaultMode;
|
|
124
|
+
const searchResult = await runSearch(evalQuery.query, { mode, limit: String(k), fields: "id" }, global);
|
|
125
|
+
const rankedIds = searchResult.items
|
|
126
|
+
.map((item) => item.id)
|
|
127
|
+
.filter((id) => typeof id === "string");
|
|
128
|
+
const metrics = evaluateRanking(rankedIds, new Set(evalQuery.relevant_ids), k);
|
|
129
|
+
rawMetrics.push(metrics);
|
|
130
|
+
reports.push({
|
|
131
|
+
query: evalQuery.query,
|
|
132
|
+
mode,
|
|
133
|
+
relevant_total: metrics.relevant_total,
|
|
134
|
+
retrieved_relevant: metrics.retrieved_relevant,
|
|
135
|
+
ndcg: roundMetric(metrics.ndcg),
|
|
136
|
+
mrr: roundMetric(metrics.mrr),
|
|
137
|
+
precision: roundMetric(metrics.precision),
|
|
138
|
+
recall: roundMetric(metrics.recall),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const aggregate = aggregateEvalMetrics(rawMetrics);
|
|
142
|
+
const passed = failUnder === undefined || aggregate.ndcg >= failUnder;
|
|
143
|
+
return {
|
|
144
|
+
k,
|
|
145
|
+
query_count: querySet.queries.length,
|
|
146
|
+
aggregate: {
|
|
147
|
+
ndcg: roundMetric(aggregate.ndcg),
|
|
148
|
+
mrr: roundMetric(aggregate.mrr),
|
|
149
|
+
precision: roundMetric(aggregate.precision),
|
|
150
|
+
recall: roundMetric(aggregate.recall),
|
|
151
|
+
},
|
|
152
|
+
queries: reports,
|
|
153
|
+
...(failUnder !== undefined ? { fail_under: failUnder } : {}),
|
|
154
|
+
passed,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=eval.js.map
|
|
158
|
+
//# debugId=fa1fece2-ddfb-537d-af39-fcd4ab8b5972
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval.js","sources":["cli/commands/eval.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/eval\n *\n * Implements the `pm eval` command surface (pm-u8n5): a search-relevance\n * evaluation runner that scores a human-curated golden-query set against the\n * live retrieval path and reports nDCG@k, MRR@k, precision@k, and recall@k per\n * query plus the macro average. With `--fail-under` it doubles as a CI gate so\n * relevance regressions — from corpus changes, hybrid-weight changes, or\n * provider swaps (including the offline BM25 provider, pm-75k9) — fail the build\n * instead of silently degrading retrieval quality.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n aggregateEvalMetrics,\n DEFAULT_EVAL_K,\n evaluateRanking,\n parseEvalQuerySet,\n type EvalSearchMode,\n type QueryEvalMetrics,\n} from \"../../core/search/eval.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { coercePositiveInteger } from \"../../core/shared/primitives.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { runSearch } from \"./search.js\";\n\n/**\n * Relative location (under the pm root) of the default golden-query set. A\n * git-tracked, human-curated file so relevance ground truth lives alongside the\n * tracker it evaluates.\n */\nexport const DEFAULT_EVAL_QUERIES_RELATIVE_PATH = path.join(\"search\", \"eval-queries.json\");\n\n/**\n * Documents the eval command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalOptions {\n /** Default retrieval mode for queries that do not set their own (keyword|semantic|hybrid). */\n mode?: string;\n /** Metric cutoff (`@k`); positive integer, defaults to {@link DEFAULT_EVAL_K}. */\n k?: string | number;\n /** Gate threshold: exit non-zero when the aggregate nDCG@k falls below this `[0,1]` value. */\n failUnder?: string | number;\n /** Override path to the golden-query JSON file (defaults to `<pmRoot>/search/eval-queries.json`). */\n queries?: string;\n /** Output format override: json|toon. */\n format?: string;\n}\n\n/** Per-query relevance report row emitted by {@link runEval}. */\nexport interface EvalQueryReport {\n query: string;\n mode: EvalSearchMode;\n relevant_total: number;\n retrieved_relevant: number;\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n}\n\n/**\n * Documents the eval result payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalResult {\n k: number;\n query_count: number;\n aggregate: {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n };\n queries: EvalQueryReport[];\n /** Present only when `--fail-under` was supplied. */\n fail_under?: number;\n /** Whether the aggregate nDCG met the gate (always true when no gate is set). */\n passed: boolean;\n}\n\nconst VALID_EVAL_MODES: ReadonlySet<string> = new Set<EvalSearchMode>([\"keyword\", \"semantic\", \"hybrid\"]);\n\nfunction parseEvalMode(raw: string | undefined): EvalSearchMode {\n if (raw === undefined) {\n return \"keyword\";\n }\n const normalized = raw.trim().toLowerCase();\n if (!VALID_EVAL_MODES.has(normalized)) {\n throw new PmCliError(\"Eval --mode must be one of keyword|semantic|hybrid\", EXIT_CODE.USAGE);\n }\n return normalized as EvalSearchMode;\n}\n\nfunction parseEvalK(raw: string | number | undefined): number {\n if (raw === undefined || raw === \"\") {\n return DEFAULT_EVAL_K;\n }\n const parsed = coercePositiveInteger(raw);\n if (parsed === null) {\n throw new PmCliError(\"Eval --k must be a positive integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseFailUnder(raw: string | number | undefined): number | undefined {\n if (raw === undefined || raw === \"\") {\n return undefined;\n }\n const parsed = typeof raw === \"number\" ? raw : Number(String(raw).trim());\n if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {\n throw new PmCliError(\"Eval --fail-under must be a number in the range [0, 1]\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\n/** Round a metric to four decimals to keep the JSON output compact and stable. */\nfunction roundMetric(value: number): number {\n return Math.round(value * 10_000) / 10_000;\n}\n\nasync function loadEvalQuerySet(queriesPath: string): Promise<ReturnType<typeof parseEvalQuerySet>> {\n let raw: string;\n try {\n raw = await fs.readFile(queriesPath, \"utf8\");\n } catch {\n throw new PmCliError(`Eval query set not found at ${queriesPath}`, EXIT_CODE.NOT_FOUND, {\n examples: [\n 'echo \\'[{\"query\":\"offline search\",\"relevant_ids\":[\"pm-75k9\"]}]\\' > ' + queriesPath,\n \"pm eval --queries ./my-eval.json\",\n ],\n nextSteps: [\n \"Create a git-tracked golden-query JSON file (an array of {query, relevant_ids, mode?} objects), then re-run pm eval.\",\n ],\n });\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error: unknown) {\n // JSON.parse only ever throws a SyntaxError (an Error subclass).\n throw new PmCliError(\n `Eval query set at ${queriesPath} is not valid JSON: ${(error as Error).message}`,\n EXIT_CODE.USAGE,\n );\n }\n try {\n return parseEvalQuerySet(parsed);\n } catch (error: unknown) {\n // parseEvalQuerySet only ever throws EvalQuerySetError (an Error subclass\n // with a precise, author-actionable message) — surface it as a usage error.\n throw new PmCliError((error as Error).message, EXIT_CODE.USAGE);\n }\n}\n\n/**\n * Run the search-relevance evaluation (pm-u8n5). Loads the golden-query set\n * (default `<pmRoot>/search/eval-queries.json`, overridable via `--queries`),\n * runs each query through {@link runSearch} at the resolved mode, scores the\n * returned ranking with the nDCG/MRR/precision/recall metrics, and macro-averages\n * across queries. When `--fail-under` is supplied, `passed` reflects whether the\n * aggregate nDCG@k cleared the threshold; the CLI layer maps a failed gate to a\n * non-zero exit code.\n */\nexport async function runEval(options: EvalOptions, global: GlobalOptions): Promise<EvalResult> {\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 k = parseEvalK(options.k);\n const defaultMode = parseEvalMode(options.mode);\n const failUnder = parseFailUnder(options.failUnder);\n const queriesPath = options.queries\n ? path.resolve(process.cwd(), options.queries)\n : path.join(pmRoot, DEFAULT_EVAL_QUERIES_RELATIVE_PATH);\n const querySet = await loadEvalQuerySet(queriesPath);\n\n const reports: EvalQueryReport[] = [];\n // Aggregate and gate on the UNROUNDED metrics; rounding is applied only to the\n // emitted report values so display precision never flips a --fail-under decision.\n const rawMetrics: QueryEvalMetrics[] = [];\n for (const evalQuery of querySet.queries) {\n const mode = evalQuery.mode ?? defaultMode;\n const searchResult = await runSearch(\n evalQuery.query,\n { mode, limit: String(k), fields: \"id\" },\n global,\n );\n const rankedIds = searchResult.items\n .map((item) => (item as { id?: unknown }).id)\n .filter((id): id is string => typeof id === \"string\");\n const metrics = evaluateRanking(rankedIds, new Set(evalQuery.relevant_ids), k);\n rawMetrics.push(metrics);\n reports.push({\n query: evalQuery.query,\n mode,\n relevant_total: metrics.relevant_total,\n retrieved_relevant: metrics.retrieved_relevant,\n ndcg: roundMetric(metrics.ndcg),\n mrr: roundMetric(metrics.mrr),\n precision: roundMetric(metrics.precision),\n recall: roundMetric(metrics.recall),\n });\n }\n\n const aggregate = aggregateEvalMetrics(rawMetrics);\n const passed = failUnder === undefined || aggregate.ndcg >= failUnder;\n return {\n k,\n query_count: querySet.queries.length,\n aggregate: {\n ndcg: roundMetric(aggregate.ndcg),\n mrr: roundMetric(aggregate.mrr),\n precision: roundMetric(aggregate.precision),\n recall: roundMetric(aggregate.recall),\n },\n queries: reports,\n ...(failUnder !== undefined ? { fail_under: failUnder } : {}),\n passed,\n };\n}\n"],"names":[],"mappings":"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","debugId":"fa1fece2-ddfb-537d-af39-fcd4ab8b5972"}
|
|
@@ -98,6 +98,14 @@ declare function resolveNpmSourceDirectoryWithRunner(source: NpmInstallSource, n
|
|
|
98
98
|
cleanup: () => Promise<void>;
|
|
99
99
|
}>;
|
|
100
100
|
declare function installNpmPackageRuntimeDependencies(packageRoot: string): Promise<void>;
|
|
101
|
+
declare function hasHostedPmCliDependency(manifest: {
|
|
102
|
+
dependencies?: unknown;
|
|
103
|
+
optionalDependencies?: unknown;
|
|
104
|
+
peerDependencies?: unknown;
|
|
105
|
+
}): boolean;
|
|
106
|
+
declare function removeHostedPmCliDependency(manifest: Record<string, unknown>): void;
|
|
107
|
+
declare function linkHostedPmCliDependency(packageRoot: string): Promise<void>;
|
|
108
|
+
declare function resolveDirectorySymlinkType(platform: NodeJS.Platform): "dir" | "junction";
|
|
101
109
|
declare function runtimeDependencyInstallSpecs(manifest: {
|
|
102
110
|
dependencies?: unknown;
|
|
103
111
|
optionalDependencies?: unknown;
|
|
@@ -121,6 +129,10 @@ export declare const _testOnlyInstallSources: {
|
|
|
121
129
|
resolveNpmPackSpec: typeof resolveNpmPackSpec;
|
|
122
130
|
resolvePackageExtensionDirectory: typeof resolvePackageExtensionDirectory;
|
|
123
131
|
runtimeDependencyInstallSpecs: typeof runtimeDependencyInstallSpecs;
|
|
132
|
+
hasHostedPmCliDependency: typeof hasHostedPmCliDependency;
|
|
133
|
+
removeHostedPmCliDependency: typeof removeHostedPmCliDependency;
|
|
134
|
+
linkHostedPmCliDependency: typeof linkHostedPmCliDependency;
|
|
135
|
+
resolveDirectorySymlinkType: typeof resolveDirectorySymlinkType;
|
|
124
136
|
runNpmCommand: typeof runNpmCommand;
|
|
125
137
|
};
|
|
126
138
|
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements extension package-management support for Install Sources.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="76ef9a1c-698d-5324-a677-794b015787d5")}catch(e){}}();
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
10
10
|
import os from "node:os";
|
|
@@ -12,11 +12,13 @@ import path from "node:path";
|
|
|
12
12
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
13
13
|
import { promisify } from "node:util";
|
|
14
14
|
import { collectPackageExtensionDirectories } from "../../../core/packages/manifest.js";
|
|
15
|
+
import { resolvePmPackageRootFromModule } from "../../../core/packages/root.js";
|
|
15
16
|
import { pathExists } from "../../../core/fs/fs-utils.js";
|
|
16
17
|
import { isPathWithinDirectory } from "../../../core/fs/path-utils.js";
|
|
17
18
|
import { EXIT_CODE } from "../../../core/shared/constants.js";
|
|
18
19
|
import { PmCliError } from "../../../core/shared/errors.js";
|
|
19
20
|
const execFileAsync = promisify(execFile);
|
|
21
|
+
const PM_CLI_PACKAGE_NAME = "@unbrained/pm-cli";
|
|
20
22
|
function parseGithubPathSpec(pathSpec, input, refOverride) {
|
|
21
23
|
const segments = pathSpec
|
|
22
24
|
.split("/")
|
|
@@ -393,17 +395,75 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
|
393
395
|
}
|
|
394
396
|
const manifest = parsed;
|
|
395
397
|
const dependencySpecs = runtimeDependencyInstallSpecs(manifest);
|
|
396
|
-
|
|
398
|
+
const shouldLinkHostedPmCli = hasHostedPmCliDependency(manifest);
|
|
399
|
+
if (dependencySpecs.length === 0 && !shouldLinkHostedPmCli) {
|
|
397
400
|
return;
|
|
398
401
|
}
|
|
399
402
|
const runtimeOnlyManifest = { ...parsed };
|
|
400
403
|
delete runtimeOnlyManifest.devDependencies;
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
404
|
+
const installManifest = { ...runtimeOnlyManifest };
|
|
405
|
+
removeHostedPmCliDependency(installManifest);
|
|
406
|
+
await fs.writeFile(packageJsonPath, `${JSON.stringify(installManifest, null, 2)}\n`, "utf8");
|
|
407
|
+
try {
|
|
408
|
+
await Promise.all([
|
|
409
|
+
fs.rm(path.join(packageRoot, "package-lock.json"), { force: true }),
|
|
410
|
+
fs.rm(path.join(packageRoot, "npm-shrinkwrap.json"), { force: true }),
|
|
411
|
+
]);
|
|
412
|
+
if (dependencySpecs.length > 0) {
|
|
413
|
+
await runNpmCommand([
|
|
414
|
+
"install",
|
|
415
|
+
"--ignore-scripts",
|
|
416
|
+
"--no-audit",
|
|
417
|
+
"--fund=false",
|
|
418
|
+
"--package-lock=false",
|
|
419
|
+
"--no-save",
|
|
420
|
+
"--omit=peer",
|
|
421
|
+
...dependencySpecs,
|
|
422
|
+
], packageRoot);
|
|
423
|
+
}
|
|
424
|
+
if (shouldLinkHostedPmCli) {
|
|
425
|
+
await linkHostedPmCliDependency(packageRoot);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
finally {
|
|
429
|
+
await fs.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}\n`, "utf8");
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
function hasHostedPmCliDependency(manifest) {
|
|
433
|
+
for (const dependencyMap of [manifest.dependencies, manifest.optionalDependencies, manifest.peerDependencies]) {
|
|
434
|
+
if (typeof dependencyMap === "object" && dependencyMap !== null && PM_CLI_PACKAGE_NAME in dependencyMap) {
|
|
435
|
+
return true;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
function removeHostedPmCliDependency(manifest) {
|
|
441
|
+
for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
|
|
442
|
+
const dependencyMap = manifest[field];
|
|
443
|
+
if (typeof dependencyMap !== "object" || dependencyMap === null) {
|
|
444
|
+
continue;
|
|
445
|
+
}
|
|
446
|
+
const nextMap = { ...dependencyMap };
|
|
447
|
+
delete nextMap[PM_CLI_PACKAGE_NAME];
|
|
448
|
+
if (Object.keys(nextMap).length === 0) {
|
|
449
|
+
delete manifest[field];
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
manifest[field] = nextMap;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
async function linkHostedPmCliDependency(packageRoot) {
|
|
457
|
+
const hostPackageRoot = resolvePmPackageRootFromModule(import.meta.url, ["../../../.."]);
|
|
458
|
+
const [scope, packageName] = PM_CLI_PACKAGE_NAME.split("/");
|
|
459
|
+
const scopedDirectory = path.join(packageRoot, "node_modules", scope);
|
|
460
|
+
const linkPath = path.join(scopedDirectory, packageName);
|
|
461
|
+
await fs.mkdir(scopedDirectory, { recursive: true });
|
|
462
|
+
await fs.rm(linkPath, { recursive: true, force: true });
|
|
463
|
+
await fs.symlink(hostPackageRoot, linkPath, resolveDirectorySymlinkType(process.platform));
|
|
464
|
+
}
|
|
465
|
+
function resolveDirectorySymlinkType(platform) {
|
|
466
|
+
return platform === "win32" ? "junction" : "dir";
|
|
407
467
|
}
|
|
408
468
|
function runtimeDependencyInstallSpecs(manifest) {
|
|
409
469
|
const specs = new Map();
|
|
@@ -412,7 +472,10 @@ function runtimeDependencyInstallSpecs(manifest) {
|
|
|
412
472
|
continue;
|
|
413
473
|
}
|
|
414
474
|
for (const [name, version] of Object.entries(dependencyMap)) {
|
|
415
|
-
if (
|
|
475
|
+
if (name === PM_CLI_PACKAGE_NAME ||
|
|
476
|
+
typeof version !== "string" ||
|
|
477
|
+
version.trim().length === 0 ||
|
|
478
|
+
specs.has(name)) {
|
|
416
479
|
continue;
|
|
417
480
|
}
|
|
418
481
|
specs.set(name, `${name}@${version.trim()}`);
|
|
@@ -539,7 +602,11 @@ export const _testOnlyInstallSources = {
|
|
|
539
602
|
resolveNpmPackSpec,
|
|
540
603
|
resolvePackageExtensionDirectory,
|
|
541
604
|
runtimeDependencyInstallSpecs,
|
|
605
|
+
hasHostedPmCliDependency,
|
|
606
|
+
removeHostedPmCliDependency,
|
|
607
|
+
linkHostedPmCliDependency,
|
|
608
|
+
resolveDirectorySymlinkType,
|
|
542
609
|
runNpmCommand,
|
|
543
610
|
};
|
|
544
611
|
//# sourceMappingURL=install-sources.js.map
|
|
545
|
-
//# debugId=
|
|
612
|
+
//# debugId=76ef9a1c-698d-5324-a677-794b015787d5
|