@unbrained/pm-cli 2026.7.16 → 2026.7.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +30 -2
- package/CONTRIBUTING.md +2 -2
- package/dist/cli/bootstrap-args.d.ts +2 -115
- package/dist/cli/bootstrap-args.js +4 -831
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -1
- package/dist/cli/commands/close.js +3 -3
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +47 -5
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/context.d.ts +2 -2
- package/dist/cli/commands/context.js +42 -28
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +5 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/eval.d.ts +4 -64
- package/dist/cli/commands/eval.js +4 -153
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/graph.d.ts +7 -0
- package/dist/cli/commands/graph.js +11 -0
- package/dist/cli/commands/graph.js.map +1 -0
- 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-test-entry.d.ts +6 -6
- package/dist/cli/commands/linked-test-entry.js +4 -65
- package/dist/cli/commands/linked-test-entry.js.map +1 -1
- package/dist/cli/commands/linked-test-parsers.d.ts +3 -45
- package/dist/cli/commands/linked-test-parsers.js +4 -516
- package/dist/cli/commands/linked-test-parsers.js.map +1 -1
- package/dist/cli/commands/list.d.ts +3 -210
- package/dist/cli/commands/list.js +4 -1068
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.d.ts +1 -1
- package/dist/cli/commands/next.js +3 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/search.d.ts +3 -464
- package/dist/cli/commands/search.js +4 -2236
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +6 -66
- package/dist/cli/commands/stats.js +4 -157
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +6 -14
- package/dist/cli/commands/telemetry.js +4 -349
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/test-all.d.ts +6 -95
- package/dist/cli/commands/test-all.js +4 -439
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test-runs.d.ts +6 -92
- package/dist/cli/commands/test-runs.js +4 -189
- package/dist/cli/commands/test-runs.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -244
- package/dist/cli/commands/test.js +4 -1780
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.d.ts +15 -29
- package/dist/cli/commands/update-many.js +355 -259
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/main.js +141 -133
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +49 -7
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +7 -3
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/search-refresh.js +4 -9
- package/dist/cli/search-refresh.js.map +1 -1
- package/dist/cli/shared-parsers.d.ts +6 -9
- package/dist/cli/shared-parsers.js +4 -37
- package/dist/cli/shared-parsers.js.map +1 -1
- package/dist/cli/telemetry-flush.js +4 -4
- package/dist/cli/telemetry-flush.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +334 -326
- package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js → append-5YF3TO7I.js} +5 -5
- package/dist/cli-bundle/chunks/append-JHO5K6RP.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js → chunk-2BX74BAS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js → chunk-2CXL335K.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js → chunk-2FUOXSRN.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js → chunk-2IPNL3DR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js → chunk-2XOSFSTH.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-UFXU44HV.js → chunk-35FHWD4C.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js.map → chunk-35FHWD4C.js.map} +1 -7
- package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js → chunk-37DRDP2B.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-BKVG6XOA.js → chunk-3CUQZNQ6.js} +67 -509
- package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js +800 -0
- package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5JLUII3O.js → chunk-43UMFKCK.js} +321 -240
- package/dist/cli-bundle/chunks/chunk-43UMFKCK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js → chunk-47HXN6RX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js → chunk-5HGZKQUL.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js → chunk-5UKQLQM2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js → chunk-633PKXLT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js → chunk-646MQXFW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js → chunk-66MKH7SZ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js → chunk-67RO3H4N.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js → chunk-6DYOZS6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js → chunk-6O44IN44.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5ZSLZLDN.js → chunk-6VHUGVNP.js} +608 -456
- package/dist/cli-bundle/chunks/chunk-6VHUGVNP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js → chunk-74FKFFXO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js → chunk-7H5NNCJ5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js → chunk-7R6UIHYY.js} +75 -5
- package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js.map → chunk-7R6UIHYY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3S5QVM5H.js → chunk-7UCY6DR5.js} +193 -22
- package/dist/cli-bundle/chunks/chunk-7UCY6DR5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js → chunk-ADXDCAKP.js} +16 -7
- package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js.map → chunk-ADXDCAKP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js → chunk-AFGKSHAM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js → chunk-ARGDWQ4J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XXXF6PAQ.js → chunk-AXRT7K5V.js} +83 -62
- package/dist/cli-bundle/chunks/chunk-AXRT7K5V.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js → chunk-B57RJHBZ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js → chunk-BAP7G3N2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NLDFBC6J.js → chunk-BDA35QG5.js} +35 -5
- package/dist/cli-bundle/chunks/chunk-BDA35QG5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js → chunk-BIRYX32V.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js → chunk-BVLOMU6O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js → chunk-CKX4WOPC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js → chunk-D52ZN3BF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js → chunk-D53RTYVI.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ODALILG3.js → chunk-D5XHO4Q7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js → chunk-DDFGYUCQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js → chunk-DG2EQRIH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-J6364LFM.js → chunk-DHNG452T.js} +9 -18
- package/dist/cli-bundle/chunks/{chunk-J6364LFM.js.map → chunk-DHNG452T.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js → chunk-E4FXM2XB.js} +77 -7
- package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js.map → chunk-E4FXM2XB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js → chunk-EHJFUOXL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js → chunk-EWIT5WIC.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js +783 -0
- package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js → chunk-EY7ZE3TG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ILX33QXL.js → chunk-F3VC3GOV.js} +669 -472
- package/dist/cli-bundle/chunks/chunk-F3VC3GOV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js → chunk-FHOBCGQO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js → chunk-FL4D53ND.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js → chunk-FVNWHUME.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js → chunk-FXFCFL73.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js → chunk-FY4RLHSC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js → chunk-G6MYGULG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HYB5AZ63.js → chunk-GKPCTQYG.js} +1822 -72
- package/dist/cli-bundle/chunks/chunk-GKPCTQYG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js → chunk-GLZKZON6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js → chunk-H5IOT54C.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js → chunk-HO4DLBNK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js → chunk-HPAYDSR2.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js → chunk-HSYV4ZYT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-EH2OPHBI.js → chunk-HTXXXF45.js} +23 -19
- package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js → chunk-HYTOJW2Q.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-4XQ3BDV4.js → chunk-I3INI567.js} +536 -449
- package/dist/cli-bundle/chunks/chunk-I3INI567.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js → chunk-I7DIDUSP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js → chunk-IE5KRAKN.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js → chunk-IL5SPRMH.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js → chunk-ILVOOAT4.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js → chunk-KH6QAHME.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js → chunk-KX62NMZC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js.map → chunk-KX62NMZC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js → chunk-L337QKWJ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-JFTKLTEF.js → chunk-L5BTTDU5.js} +68 -503
- package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LSG2U345.js → chunk-L6FVNR7X.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js → chunk-LSOWTLEM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4223PVZT.js → chunk-M7MVOKVV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UMOPHQSU.js → chunk-MR4SHYR4.js} +41 -19
- package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js → chunk-N33FD2UI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UXONS674.js → chunk-NCVT6XEL.js} +68 -56
- package/dist/cli-bundle/chunks/chunk-NCVT6XEL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js → chunk-NNANAWFH.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js → chunk-NTRQLE2R.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js → chunk-NVZ6NVHJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-E2OJMKML.js → chunk-OGVTB5VO.js} +47 -37
- package/dist/cli-bundle/chunks/chunk-OGVTB5VO.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js → chunk-OWP6QFBV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js → chunk-P22HGFFI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js → chunk-PT7MCCGD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ONG5V5CI.js → chunk-QPGQNLPI.js} +1751 -70
- package/dist/cli-bundle/chunks/chunk-QPGQNLPI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js → chunk-QRZNCRNA.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js → chunk-QWBKN3QC.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js → chunk-R5XTTZSJ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js → chunk-RC4UOUXA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js → chunk-RGMWJLXF.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js → chunk-RTBX3C4C.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js → chunk-RXPQ5Q23.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-LPYWLWDS.js → chunk-SIPOACV5.js} +534 -447
- package/dist/cli-bundle/chunks/chunk-SIPOACV5.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TGBTLGPX.js +851 -0
- package/dist/cli-bundle/chunks/chunk-TGBTLGPX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js → chunk-TLWJP5BF.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-TLWJP5BF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js → chunk-TM5CIO3F.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js → chunk-TZAE66GQ.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js → chunk-VAHZIPWS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js → chunk-VE6ZSTQW.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js → chunk-W5E2UUSH.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js → chunk-WACRQ26A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js.map → chunk-WACRQ26A.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js → chunk-WL3SS45P.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-H5APFTHZ.js → chunk-WQXRZMFN.js} +204 -33
- package/dist/cli-bundle/chunks/chunk-WQXRZMFN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js → chunk-WU3KAN6A.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js → chunk-X2MGQMZO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js → chunk-X5YCTFKT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js → chunk-XC2HEEOV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7Z4LKRS4.js → chunk-XPUTSGJU.js} +38 -37
- package/dist/cli-bundle/chunks/chunk-XPUTSGJU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YBLZ2VE7.js → chunk-XWBD6DSR.js} +320 -239
- package/dist/cli-bundle/chunks/chunk-XWBD6DSR.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XWYQ2LT4.js +834 -0
- package/dist/cli-bundle/chunks/chunk-XWYQ2LT4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js → chunk-XXLXJL7V.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2NCIPMQP.js → chunk-YFE7JHX3.js} +27 -6
- package/dist/cli-bundle/chunks/chunk-YFE7JHX3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js → chunk-YIIIAKCE.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js → chunk-YJSURTBB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js → chunk-YKFHF37B.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js → chunk-YQEZWI3R.js} +2 -2
- package/dist/cli-bundle/chunks/close-GPD7DTJV.js +12 -0
- package/dist/cli-bundle/chunks/{close-CWODTPKG.js → close-X3CF6FQP.js} +5 -5
- package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js → close-many-J7A5EHOQ.js} +14 -14
- package/dist/cli-bundle/chunks/close-many-NQLYGPYW.js +23 -0
- package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +13 -0
- package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js → comments-TMHMALA5.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js → copy-FWQA5OU4.js} +4 -4
- package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +9 -0
- package/dist/cli-bundle/chunks/{create-LBVCYMEG.js → create-AQ5SIGZC.js} +9 -9
- package/dist/cli-bundle/chunks/{create-J5U6ND4K.js → create-KOGQ3JKD.js} +9 -9
- package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +10 -0
- package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js → delete-YYYFOSEA.js} +4 -4
- package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js → deps-MQ4ZIGZB.js} +16 -7
- package/dist/cli-bundle/chunks/deps-NIIKXLPB.js +28 -0
- package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js → docs-53NUGMIQ.js} +6 -6
- package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +14 -0
- package/dist/cli-bundle/chunks/{files-EFIWKFTM.js → files-3PXGXYDB.js} +6 -6
- package/dist/cli-bundle/chunks/{files-6YFBJRBG.js → files-EGLKHD7O.js} +6 -6
- package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +10 -0
- package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js → focus-SRPASFTN.js} +5 -5
- package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js → history-compact-G4DULDCX.js} +6 -6
- package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +16 -0
- package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js → history-redact-IUSJ6X3E.js} +4 -4
- package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js → history-redact-THHGRQXV.js} +4 -4
- package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js → history-repair-LUQWRS7X.js} +6 -6
- package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js → learnings-2MRNBFJF.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +13 -0
- package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js → notes-73JWKWUD.js} +7 -7
- package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +13 -0
- package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js → plan-AZPMCG37.js} +10 -10
- package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +24 -0
- package/dist/cli-bundle/chunks/{profile-FAU7NZML.js → profile-AVCIIZID.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js → profile-LFYO3HHX.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-UL4UKBBN.js → register-list-query-MZUF2EEC.js} +50 -22
- package/dist/cli-bundle/chunks/register-list-query-MZUF2EEC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-DKA3EH5D.js → register-list-query-UKMF55FT.js} +49 -21
- package/dist/cli-bundle/chunks/register-list-query-UKMF55FT.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-RBBJ52DK.js → register-mutation-2PBW2GEX.js} +35 -33
- package/dist/cli-bundle/chunks/register-mutation-2PBW2GEX.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js → register-mutation-T6RVNJC4.js} +34 -32
- package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js.map → register-mutation-T6RVNJC4.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js → register-operations-KHZYR6MG.js} +35 -35
- package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js → register-operations-WPQ2LWZJ.js} +35 -35
- package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js → register-setup-PGDNOXDQ.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js → register-setup-TDN7WAO6.js} +15 -15
- package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js → restore-E3PRGDN3.js} +6 -6
- package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +14 -0
- package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js → schema-5JNFQFUW.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js → schema-TMIW4XZC.js} +6 -6
- package/dist/cli-bundle/chunks/{update-XHSIAIXE.js → update-SQYZA3ZW.js} +12 -12
- package/dist/cli-bundle/chunks/update-XZJYS5X7.js +21 -0
- package/dist/cli-bundle/chunks/update-many-R24B3GBK.js +36 -0
- package/dist/cli-bundle/chunks/update-many-WQ3R3J6N.js +32 -0
- package/dist/cli-bundle/main.js +170 -856
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/cli-bundle/sdk-runtime.js +57 -54
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +266 -340
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/core/extensions/item-fields.js +2 -2
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/item/actionability.d.ts +12 -0
- package/dist/core/item/actionability.js +39 -4
- package/dist/core/item/actionability.js.map +1 -1
- package/dist/core/sentry/instrument.d.ts +11 -0
- package/dist/core/sentry/instrument.js +21 -2
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/mcp/server.d.ts +16 -18
- package/dist/mcp/server.js +84 -31
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +17 -4
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/actionability.d.ts +10 -0
- package/dist/sdk/actionability.js +14 -0
- package/dist/sdk/actionability.js.map +1 -0
- package/dist/sdk/cli-bootstrap.d.ts +122 -0
- package/dist/sdk/cli-bootstrap.js +879 -0
- package/dist/sdk/cli-bootstrap.js.map +1 -0
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +19 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +21 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +16 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +80 -3
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +20 -0
- package/dist/sdk/cli-contracts/tool-schema.js +97 -9
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts.js +4 -4
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/dependencies.d.ts +42 -53
- package/dist/sdk/dependencies.js +177 -125
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/sdk/eval.d.ts +66 -0
- package/dist/sdk/eval.js +186 -0
- package/dist/sdk/eval.js.map +1 -0
- package/dist/sdk/governance/validate.js +3 -3
- package/dist/sdk/governance/validate.js.map +1 -1
- package/dist/sdk/graph/analytics.d.ts +124 -0
- package/dist/sdk/graph/analytics.js +464 -0
- package/dist/sdk/graph/analytics.js.map +1 -0
- package/dist/sdk/graph/assembly.d.ts +97 -0
- package/dist/sdk/graph/assembly.js +146 -0
- package/dist/sdk/graph/assembly.js.map +1 -0
- package/dist/sdk/graph/cache.d.ts +66 -0
- package/dist/sdk/graph/cache.js +148 -0
- package/dist/sdk/graph/cache.js.map +1 -0
- package/dist/sdk/graph/governance.d.ts +108 -0
- package/dist/sdk/graph/governance.js +360 -0
- package/dist/sdk/graph/governance.js.map +1 -0
- package/dist/sdk/graph/index.d.ts +16 -0
- package/dist/sdk/graph/index.js +20 -0
- package/dist/sdk/graph/index.js.map +1 -0
- package/dist/sdk/graph/remediation.d.ts +52 -0
- package/dist/sdk/graph/remediation.js +148 -0
- package/dist/sdk/graph/remediation.js.map +1 -0
- package/dist/sdk/graph/run.d.ts +295 -0
- package/dist/sdk/graph/run.js +468 -0
- package/dist/sdk/graph/run.js.map +1 -0
- package/dist/sdk/graph/traversal.d.ts +77 -0
- package/dist/sdk/graph/traversal.js +262 -0
- package/dist/sdk/graph/traversal.js.map +1 -0
- package/dist/sdk/index.d.ts +19 -5
- package/dist/sdk/index.js +21 -7
- package/dist/sdk/index.js.map +1 -1
- package/dist/{cli/commands → sdk/query}/item-filter-options.d.ts +1 -1
- package/dist/{cli/commands → sdk/query}/item-filter-options.js +3 -3
- package/dist/sdk/query/item-filter-options.js.map +1 -0
- package/dist/sdk/query/list.d.ts +262 -0
- package/dist/sdk/query/list.js +1089 -0
- package/dist/sdk/query/list.js.map +1 -0
- package/dist/sdk/query/parsers.d.ts +9 -0
- package/dist/sdk/query/parsers.js +45 -0
- package/dist/sdk/query/parsers.js.map +1 -0
- package/dist/{cli/commands → sdk/query}/search-pagination.js +4 -4
- package/dist/sdk/query/search-pagination.js.map +1 -0
- package/dist/{cli/commands → sdk/query}/search-rendering.js +3 -3
- package/dist/sdk/query/search-rendering.js.map +1 -0
- package/dist/sdk/query/search.d.ts +469 -0
- package/dist/sdk/query/search.js +2247 -0
- package/dist/sdk/query/search.js.map +1 -0
- package/dist/sdk/relationship-context.d.ts +42 -0
- package/dist/sdk/relationship-context.js +99 -20
- package/dist/sdk/relationship-context.js.map +1 -1
- package/dist/sdk/relationships.d.ts +13 -0
- package/dist/sdk/relationships.js +30 -2
- package/dist/sdk/relationships.js.map +1 -1
- package/dist/sdk/runtime-input.d.ts +41 -0
- package/dist/sdk/runtime-input.js +422 -2
- package/dist/sdk/runtime-input.js.map +1 -1
- package/dist/sdk/runtime.d.ts +19 -30
- package/dist/sdk/runtime.js +30 -376
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/search-refresh-worker.d.ts +2 -0
- package/dist/sdk/search-refresh-worker.js +19 -0
- package/dist/sdk/search-refresh-worker.js.map +1 -0
- package/dist/sdk/stats.d.ts +66 -0
- package/dist/sdk/stats.js +151 -0
- package/dist/sdk/stats.js.map +1 -0
- package/dist/sdk/telemetry-flush.d.ts +2 -0
- package/dist/sdk/telemetry-flush.js +14 -0
- package/dist/sdk/telemetry-flush.js.map +1 -0
- package/dist/sdk/telemetry.d.ts +14 -0
- package/dist/sdk/telemetry.js +398 -0
- package/dist/sdk/telemetry.js.map +1 -0
- package/dist/sdk/test/batch.d.ts +94 -0
- package/dist/sdk/test/batch.js +492 -0
- package/dist/sdk/test/batch.js.map +1 -0
- package/dist/sdk/test/entry.d.ts +6 -0
- package/dist/sdk/test/entry.js +74 -0
- package/dist/sdk/test/entry.js.map +1 -0
- package/dist/sdk/test/execution.d.ts +282 -0
- package/dist/sdk/test/execution.js +1817 -0
- package/dist/sdk/test/execution.js.map +1 -0
- package/dist/sdk/test/linked-command-detection.js +12 -3
- package/dist/sdk/test/linked-command-detection.js.map +1 -1
- package/dist/sdk/test/parsers.d.ts +48 -0
- package/dist/sdk/test/parsers.js +522 -0
- package/dist/sdk/test/parsers.js.map +1 -0
- package/dist/sdk/test/runs.d.ts +92 -0
- package/dist/sdk/test/runs.js +195 -0
- package/dist/sdk/test/runs.js.map +1 -0
- package/docs/AGENT_GUIDE.md +1 -0
- package/docs/COMMANDS.md +19 -1
- package/docs/RELATIONSHIP_GRAPH.md +99 -3
- package/docs/SDK.md +139 -3
- package/docs/SDK_PRIMITIVE_INVENTORY.md +5 -3
- package/docs/examples/sdk-custom-tool/README.md +27 -0
- package/docs/examples/sdk-custom-tool/package.json +13 -0
- package/docs/examples/sdk-custom-tool/src/cli.ts +36 -0
- package/docs/examples/sdk-custom-tool/src/entry.ts +15 -0
- package/docs/examples/sdk-custom-tool/src/index.ts +223 -0
- package/marketplace.json +2 -2
- package/package.json +4 -4
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/comments-audit.ts +77 -57
- package/packages/pm-governance-audit/extensions/governance-audit/dedupe-audit.ts +202 -194
- package/packages/pm-governance-audit/extensions/governance-audit/dedupe-merge.ts +227 -153
- package/packages/pm-governance-audit/extensions/governance-audit/normalize.ts +169 -125
- package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +130 -81
- package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +53 -4
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli/commands/item-filter-options.js.map +0 -1
- package/dist/cli/commands/search-pagination.js.map +0 -1
- package/dist/cli/commands/search-rendering.js.map +0 -1
- package/dist/cli-bundle/chunks/append-UZVHUO74.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2NCIPMQP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5JLUII3O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EH2OPHBI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HYB5AZ63.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NLDFBC6J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UFXU44HV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UMOPHQSU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YBLZ2VE7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +0 -58
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +0 -68
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +0 -7
- package/dist/cli-bundle/chunks/close-W6LI2PKM.js +0 -12
- package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +0 -23
- package/dist/cli-bundle/chunks/comments-E3TNTK24.js +0 -13
- package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +0 -9
- package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +0 -10
- package/dist/cli-bundle/chunks/deps-OA26IS25.js +0 -19
- package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +0 -14
- package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +0 -16
- package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +0 -13
- package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +0 -13
- package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +0 -24
- package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +0 -14
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js +0 -21
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +0 -32
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +0 -36
- /package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js.map → append-5YF3TO7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-UZVHUO74.js.map → append-JHO5K6RP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js.map → chunk-2BX74BAS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js.map → chunk-2CXL335K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js.map → chunk-2FUOXSRN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js.map → chunk-2IPNL3DR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js.map → chunk-2XOSFSTH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js.map → chunk-37DRDP2B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js.map → chunk-47HXN6RX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js.map → chunk-5HGZKQUL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js.map → chunk-5UKQLQM2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js.map → chunk-633PKXLT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js.map → chunk-646MQXFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js.map → chunk-66MKH7SZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js.map → chunk-67RO3H4N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js.map → chunk-6DYOZS6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js.map → chunk-6O44IN44.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js.map → chunk-74FKFFXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js.map → chunk-7H5NNCJ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js.map → chunk-AFGKSHAM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js.map → chunk-ARGDWQ4J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js.map → chunk-B57RJHBZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js.map → chunk-BAP7G3N2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js.map → chunk-BIRYX32V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js.map → chunk-BVLOMU6O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js.map → chunk-CKX4WOPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js.map → chunk-D52ZN3BF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js.map → chunk-D53RTYVI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ODALILG3.js.map → chunk-D5XHO4Q7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js.map → chunk-DDFGYUCQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js.map → chunk-DG2EQRIH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js.map → chunk-EHJFUOXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js.map → chunk-EWIT5WIC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js.map → chunk-EY7ZE3TG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js.map → chunk-FHOBCGQO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js.map → chunk-FL4D53ND.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js.map → chunk-FVNWHUME.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js.map → chunk-FXFCFL73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js.map → chunk-FY4RLHSC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js.map → chunk-G6MYGULG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js.map → chunk-GLZKZON6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js.map → chunk-H5IOT54C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js.map → chunk-HO4DLBNK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js.map → chunk-HPAYDSR2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js.map → chunk-HSYV4ZYT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js.map → chunk-HYTOJW2Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js.map → chunk-I7DIDUSP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js.map → chunk-IE5KRAKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js.map → chunk-IL5SPRMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js.map → chunk-ILVOOAT4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js.map → chunk-KH6QAHME.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js.map → chunk-L337QKWJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LSG2U345.js.map → chunk-L6FVNR7X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js.map → chunk-LSOWTLEM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4223PVZT.js.map → chunk-M7MVOKVV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js.map → chunk-N33FD2UI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js.map → chunk-NNANAWFH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js.map → chunk-NTRQLE2R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js.map → chunk-NVZ6NVHJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js.map → chunk-OWP6QFBV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js.map → chunk-P22HGFFI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js.map → chunk-PT7MCCGD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js.map → chunk-QRZNCRNA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js.map → chunk-QWBKN3QC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js.map → chunk-R5XTTZSJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js.map → chunk-RC4UOUXA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js.map → chunk-RGMWJLXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js.map → chunk-RTBX3C4C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js.map → chunk-RXPQ5Q23.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js.map → chunk-TM5CIO3F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js.map → chunk-TZAE66GQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js.map → chunk-VAHZIPWS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js.map → chunk-VE6ZSTQW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js.map → chunk-W5E2UUSH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js.map → chunk-WL3SS45P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js.map → chunk-WU3KAN6A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js.map → chunk-X2MGQMZO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js.map → chunk-X5YCTFKT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js.map → chunk-XC2HEEOV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js.map → chunk-XXLXJL7V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js.map → chunk-YIIIAKCE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js.map → chunk-YJSURTBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js.map → chunk-YKFHF37B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js.map → chunk-YQEZWI3R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-W6LI2PKM.js.map → close-GPD7DTJV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-CWODTPKG.js.map → close-X3CF6FQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js.map → close-many-J7A5EHOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-DLDDVSH5.js.map → close-many-NQLYGPYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-E3TNTK24.js.map → comments-2AOZQ5D2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js.map → comments-TMHMALA5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js.map → copy-FWQA5OU4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-Q5ZJPUKR.js.map → copy-N3LCQBMC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-LBVCYMEG.js.map → create-AQ5SIGZC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-J5U6ND4K.js.map → create-KOGQ3JKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-WNHB3LYW.js.map → delete-6G3MBZ6S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js.map → delete-YYYFOSEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js.map → deps-MQ4ZIGZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-OA26IS25.js.map → deps-NIIKXLPB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js.map → docs-53NUGMIQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-HA2AIDBB.js.map → docs-OWRGDMNY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EFIWKFTM.js.map → files-3PXGXYDB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-6YFBJRBG.js.map → files-EGLKHD7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-POIW5LTJ.js.map → focus-KZLIA6WS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js.map → focus-SRPASFTN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js.map → history-compact-G4DULDCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-FWG2C7FZ.js.map → history-compact-HHIUOMZ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js.map → history-redact-IUSJ6X3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js.map → history-redact-THHGRQXV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-6GEAM7HE.js.map → history-repair-KG7SWXI6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js.map → history-repair-LUQWRS7X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js.map → learnings-2MRNBFJF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-RSNLSWDC.js.map → learnings-ZVHSALJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js.map → notes-73JWKWUD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2WDH6DXU.js.map → notes-BAKUL5DJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js.map → plan-AZPMCG37.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-DOVI2VMW.js.map → plan-LEAGLPGP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-FAU7NZML.js.map → profile-AVCIIZID.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js.map → profile-LFYO3HHX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js.map → register-operations-KHZYR6MG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js.map → register-operations-WPQ2LWZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js.map → register-setup-PGDNOXDQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js.map → register-setup-TDN7WAO6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js.map → restore-E3PRGDN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YPMVUUEX.js.map → restore-KIUYTAEJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js.map → schema-5JNFQFUW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js.map → schema-TMIW4XZC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-XHSIAIXE.js.map → update-SQYZA3ZW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-WWBYOPXO.js.map → update-XZJYS5X7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-TA7NGQBO.js.map → update-many-R24B3GBK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-OUGIU5SF.js.map → update-many-WQ3R3J6N.js.map} +0 -0
- /package/dist/{cli/commands → sdk/query}/search-pagination.d.ts +0 -0
- /package/dist/{cli/commands → sdk/query}/search-rendering.d.ts +0 -0
|
@@ -1,55 +1,55 @@
|
|
|
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]="85084307-fe97-5ecd-bfa8-3c803663a33c")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runDocs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
collectDanglingDependencyReferences,
|
|
8
|
-
createRelationshipKindRegistry
|
|
9
|
-
} from "./chunk-JFTKLTEF.js";
|
|
5
|
+
} from "./chunk-X2MGQMZO.js";
|
|
10
6
|
import {
|
|
11
7
|
scanHistoryDrift
|
|
12
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NVZ6NVHJ.js";
|
|
13
9
|
import {
|
|
14
10
|
runFiles
|
|
15
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AFGKSHAM.js";
|
|
16
12
|
import {
|
|
17
13
|
isRemoteLinkedArtifactReference
|
|
18
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H5IOT54C.js";
|
|
19
15
|
import {
|
|
20
16
|
runUpdate
|
|
21
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YIIIAKCE.js";
|
|
22
18
|
import {
|
|
23
19
|
wrapOwnershipConflict
|
|
24
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ILVOOAT4.js";
|
|
25
21
|
import {
|
|
26
22
|
PM_TELEMETRY_SOURCE_CONTEXT_VALUES,
|
|
27
23
|
TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS,
|
|
28
24
|
TELEMETRY_SCHEMA_VERSION,
|
|
29
25
|
flushTelemetryQueueNow
|
|
30
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EY7ZE3TG.js";
|
|
31
27
|
import {
|
|
32
28
|
buildCapabilityContractMetadata,
|
|
33
29
|
buildRegistrationCollisionRemediation,
|
|
34
30
|
collectUnknownCapabilityGuidance,
|
|
35
31
|
readManagedExtensionState,
|
|
36
32
|
runInit
|
|
37
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QRZNCRNA.js";
|
|
38
34
|
import {
|
|
39
35
|
collectStaleVectorizationIds,
|
|
40
36
|
runNext
|
|
41
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XPUTSGJU.js";
|
|
38
|
+
import {
|
|
39
|
+
collectDanglingDependencyReferences,
|
|
40
|
+
createRelationshipKindRegistry
|
|
41
|
+
} from "./chunk-L5BTTDU5.js";
|
|
42
42
|
import {
|
|
43
43
|
computeContentFieldUtilization
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-NCVT6XEL.js";
|
|
45
45
|
import {
|
|
46
46
|
computeMetadataCoverage,
|
|
47
47
|
groupItemsByDimension,
|
|
48
48
|
lifecycleClassifierFromStatusRegistry
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CKX4WOPC.js";
|
|
50
50
|
import {
|
|
51
51
|
parseLimit
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-PT7MCCGD.js";
|
|
53
53
|
import {
|
|
54
54
|
resolveAuthor
|
|
55
55
|
} from "./chunk-CUFW7ITY.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
resolveProviderConfigSource,
|
|
63
63
|
resolveSettingsWithSemanticRuntimeDefaults,
|
|
64
64
|
resolveVectorStores
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-E4FXM2XB.js";
|
|
66
66
|
import {
|
|
67
67
|
ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
68
68
|
ACTIVITY_FLAG_CONTRACTS,
|
|
@@ -106,6 +106,8 @@ import {
|
|
|
106
106
|
GC_FLAG_CONTRACTS,
|
|
107
107
|
GET_FLAG_CONTRACTS,
|
|
108
108
|
GLOBAL_FLAG_CONTRACTS,
|
|
109
|
+
GRAPH_FLAG_CONTRACTS,
|
|
110
|
+
GRAPH_SUBCOMMAND_VALUES,
|
|
109
111
|
GUIDE_FLAG_CONTRACTS,
|
|
110
112
|
HEALTH_FLAG_CONTRACTS,
|
|
111
113
|
HISTORY_COMPACT_FLAG_CONTRACTS,
|
|
@@ -152,7 +154,7 @@ import {
|
|
|
152
154
|
UPGRADE_FLAG_CONTRACTS,
|
|
153
155
|
VALIDATE_FLAG_CONTRACTS,
|
|
154
156
|
compactFlagAliasContracts
|
|
155
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-7UCY6DR5.js";
|
|
156
158
|
import {
|
|
157
159
|
LINKED_TEST_PM_CONTEXT_MODE_VALUES,
|
|
158
160
|
LINKED_TEST_PROTECTED_ENV_KEYS,
|
|
@@ -169,12 +171,12 @@ import {
|
|
|
169
171
|
parseLinkedTestRegexList,
|
|
170
172
|
parseLinkedTestStringList,
|
|
171
173
|
runCreate
|
|
172
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-HTXXXF45.js";
|
|
173
175
|
import {
|
|
174
176
|
createStdinTokenResolver,
|
|
175
177
|
parseCsvKv,
|
|
176
178
|
parseOptionalNumber
|
|
177
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-FHOBCGQO.js";
|
|
178
180
|
import {
|
|
179
181
|
CURRENT_ITEM_FORMAT_VERSION,
|
|
180
182
|
compareTimestampStrings,
|
|
@@ -201,7 +203,7 @@ import {
|
|
|
201
203
|
stableValueEquals,
|
|
202
204
|
toItemRecord,
|
|
203
205
|
writeSettings
|
|
204
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-P22HGFFI.js";
|
|
205
207
|
import {
|
|
206
208
|
DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
|
|
207
209
|
DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
|
|
@@ -243,7 +245,7 @@ import {
|
|
|
243
245
|
statusIsTerminal,
|
|
244
246
|
toNonEmptyStringOrUndefined,
|
|
245
247
|
writeFileAtomic
|
|
246
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-KX62NMZC.js";
|
|
247
249
|
|
|
248
250
|
// dist/sdk/start-task-status.js
|
|
249
251
|
function resolveStartTaskInProgressStatus(statusRegistry) {
|
|
@@ -721,11 +723,24 @@ var TOOLS = [
|
|
|
721
723
|
},
|
|
722
724
|
{
|
|
723
725
|
name: "pm_deps",
|
|
724
|
-
description: "Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with depth, node, edge, token, and cursor bounds.",
|
|
726
|
+
description: "Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with direction, kind, depth, node, edge, token, and cursor bounds; context returns a counts-first summary, per-node roles/reasons, root evidence pointers, and enumerated missing references.",
|
|
725
727
|
inputSchema: objectSchema({ id: idSchema, options: { type: "object" } }, [
|
|
726
728
|
"id"
|
|
727
729
|
])
|
|
728
730
|
},
|
|
731
|
+
{
|
|
732
|
+
name: "pm_graph",
|
|
733
|
+
description: "Run bounded workspace relationship-graph queries: ancestors/descendants (hierarchy), predecessors/successors (ordering), paths, impact (blast radius), analyze (execution + knowledge analytics), audit (governance findings), communities (label-propagation clusters), redundancy (transitively implied edges), dominators (structural bottlenecks), and plan (dry-run remediation proposals derived from the audit). Traversals, paths, impact, and dominators require id; paths also requires target. Options support kind, maxDepth, limit, after, direction, maxPaths, sample, exemptIsolate, and counts-first summary.",
|
|
734
|
+
inputSchema: objectSchema({
|
|
735
|
+
subcommand: {
|
|
736
|
+
type: "string",
|
|
737
|
+
enum: [...GRAPH_SUBCOMMAND_VALUES]
|
|
738
|
+
},
|
|
739
|
+
id: idSchema,
|
|
740
|
+
target: idSchema,
|
|
741
|
+
options: { type: "object" }
|
|
742
|
+
}, ["subcommand"])
|
|
743
|
+
},
|
|
729
744
|
{
|
|
730
745
|
name: "pm_test",
|
|
731
746
|
description: "List, add, remove, or run linked tests for a pm item.",
|
|
@@ -1057,6 +1072,7 @@ var COMMAND_INTENTS = /* @__PURE__ */ new Map([
|
|
|
1057
1072
|
["focus", "Manage focus."],
|
|
1058
1073
|
["gc", "Clean caches."],
|
|
1059
1074
|
["get", "Read item."],
|
|
1075
|
+
["graph", "Query graph."],
|
|
1060
1076
|
["guide", "Show user guides."],
|
|
1061
1077
|
["health", "Check health."],
|
|
1062
1078
|
["help", "Show help."],
|
|
@@ -1125,6 +1141,7 @@ var CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
|
|
|
1125
1141
|
["next", NEXT_FLAG_CONTRACTS],
|
|
1126
1142
|
["aggregate", AGGREGATE_FLAG_CONTRACTS],
|
|
1127
1143
|
["deps", DEPS_FLAG_CONTRACTS],
|
|
1144
|
+
["graph", GRAPH_FLAG_CONTRACTS],
|
|
1128
1145
|
["guide", GUIDE_FLAG_CONTRACTS],
|
|
1129
1146
|
["reindex", REINDEX_FLAG_CONTRACTS],
|
|
1130
1147
|
["history", HISTORY_FLAG_CONTRACTS],
|
|
@@ -5082,7 +5099,7 @@ function runRemind(title, options, global) {
|
|
|
5082
5099
|
return runCreate(createOptions, global);
|
|
5083
5100
|
}
|
|
5084
5101
|
|
|
5085
|
-
// dist/
|
|
5102
|
+
// dist/sdk/stats.js
|
|
5086
5103
|
import fs6 from "node:fs/promises";
|
|
5087
5104
|
import path6 from "node:path";
|
|
5088
5105
|
|
|
@@ -5171,7 +5188,7 @@ function computeHistoryStorageStats(streams, options) {
|
|
|
5171
5188
|
};
|
|
5172
5189
|
}
|
|
5173
5190
|
|
|
5174
|
-
// dist/
|
|
5191
|
+
// dist/sdk/stats.js
|
|
5175
5192
|
function zeroByType(itemTypes) {
|
|
5176
5193
|
return itemTypes.reduce((acc, value) => {
|
|
5177
5194
|
acc[value] = 0;
|
|
@@ -5190,9 +5207,6 @@ function countNonEmptyLines(raw) {
|
|
|
5190
5207
|
}
|
|
5191
5208
|
return raw.split(/\r?\n/u).filter((line) => line.trim().length > 0).length;
|
|
5192
5209
|
}
|
|
5193
|
-
function isNotFoundError(error) {
|
|
5194
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
5195
|
-
}
|
|
5196
5210
|
async function readHistoryStreamContents(pmRoot) {
|
|
5197
5211
|
const historyDir = path6.join(pmRoot, "history");
|
|
5198
5212
|
if (!await pathExists(historyDir)) {
|
|
@@ -5206,14 +5220,9 @@ async function readHistoryStreamContents(pmRoot) {
|
|
|
5206
5220
|
const streams = [];
|
|
5207
5221
|
for (const file of historyFiles) {
|
|
5208
5222
|
const historyPath = path6.join(historyDir, file);
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
} catch (error) {
|
|
5213
|
-
if (isNotFoundError(error)) {
|
|
5214
|
-
continue;
|
|
5215
|
-
}
|
|
5216
|
-
throw error;
|
|
5223
|
+
const raw = await readFileIfExists(historyPath);
|
|
5224
|
+
if (raw === null) {
|
|
5225
|
+
continue;
|
|
5217
5226
|
}
|
|
5218
5227
|
await runActiveOnReadHooks({
|
|
5219
5228
|
path: historyPath,
|
|
@@ -5282,7 +5291,7 @@ async function runStats(global, options = {}) {
|
|
|
5282
5291
|
};
|
|
5283
5292
|
}
|
|
5284
5293
|
|
|
5285
|
-
// dist/
|
|
5294
|
+
// dist/sdk/telemetry.js
|
|
5286
5295
|
import fs7 from "node:fs/promises";
|
|
5287
5296
|
import path7 from "node:path";
|
|
5288
5297
|
var TELEMETRY_QUEUE_RELATIVE_PATH2 = path7.join("runtime", "telemetry", "events.jsonl");
|
|
@@ -5295,19 +5304,32 @@ var TELEMETRY_SUBCOMMANDS = [
|
|
|
5295
5304
|
"stats",
|
|
5296
5305
|
"clear"
|
|
5297
5306
|
];
|
|
5298
|
-
|
|
5307
|
+
var nearestRankPercentile = (sortedAscending, fraction) => {
|
|
5299
5308
|
const rank = Math.ceil(fraction * sortedAscending.length);
|
|
5300
5309
|
const index = Math.min(sortedAscending.length - 1, Math.max(0, rank - 1));
|
|
5301
5310
|
return sortedAscending[index];
|
|
5302
|
-
}
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
+
};
|
|
5312
|
+
var normalizeTelemetryText = (value, fallback) => {
|
|
5313
|
+
if (typeof value !== "string") {
|
|
5314
|
+
return fallback;
|
|
5315
|
+
}
|
|
5316
|
+
return value.trim().length > 0 ? value : fallback;
|
|
5317
|
+
};
|
|
5318
|
+
var normalizeFiniteInteger = (value) => {
|
|
5319
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
5320
|
+
return void 0;
|
|
5321
|
+
}
|
|
5322
|
+
return Math.trunc(value);
|
|
5323
|
+
};
|
|
5324
|
+
var normalizeTelemetryQueueEntry = (entry) => {
|
|
5325
|
+
return {
|
|
5326
|
+
command: normalizeTelemetryText(entry.event.command, "<unknown>"),
|
|
5327
|
+
eventType: normalizeTelemetryText(entry.event.event_type, "unknown"),
|
|
5328
|
+
eventSchemaVersion: normalizeFiniteInteger(entry.event.schema_version),
|
|
5329
|
+
clientSchemaVersion: normalizeFiniteInteger(entry.client_schema_version)
|
|
5330
|
+
};
|
|
5331
|
+
};
|
|
5332
|
+
var createTelemetryStatsAccumulator = () => {
|
|
5311
5333
|
return {
|
|
5312
5334
|
count: 0,
|
|
5313
5335
|
max_attempts: 0,
|
|
@@ -5319,9 +5341,20 @@ function createTelemetryStatsAccumulator() {
|
|
|
5319
5341
|
error_count: 0,
|
|
5320
5342
|
resolution_counts: {}
|
|
5321
5343
|
};
|
|
5322
|
-
}
|
|
5323
|
-
|
|
5324
|
-
const
|
|
5344
|
+
};
|
|
5345
|
+
var readTelemetryDuration = (payload) => {
|
|
5346
|
+
const value = payload?.duration_ms;
|
|
5347
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
5348
|
+
};
|
|
5349
|
+
var readTelemetryResolution = (payload) => {
|
|
5350
|
+
const value = payload?.command_resolution;
|
|
5351
|
+
return normalizeTelemetryText(value, "") || void 0;
|
|
5352
|
+
};
|
|
5353
|
+
var incrementTelemetryCount = (counts, key) => {
|
|
5354
|
+
counts[key] = (counts[key] ?? 0) + 1;
|
|
5355
|
+
};
|
|
5356
|
+
var recordTelemetryFinishPayload = (current, payload) => {
|
|
5357
|
+
const durationMs = readTelemetryDuration(payload);
|
|
5325
5358
|
if (durationMs !== void 0) {
|
|
5326
5359
|
current.finish_durations_ms.push(durationMs);
|
|
5327
5360
|
}
|
|
@@ -5330,30 +5363,31 @@ function recordTelemetryFinishPayload(current, payload) {
|
|
|
5330
5363
|
} else {
|
|
5331
5364
|
current.error_count += 1;
|
|
5332
5365
|
}
|
|
5333
|
-
const resolution =
|
|
5366
|
+
const resolution = readTelemetryResolution(payload);
|
|
5334
5367
|
if (resolution !== void 0) {
|
|
5335
|
-
current.resolution_counts
|
|
5368
|
+
incrementTelemetryCount(current.resolution_counts, resolution);
|
|
5336
5369
|
}
|
|
5337
|
-
}
|
|
5338
|
-
|
|
5370
|
+
};
|
|
5371
|
+
var normalizeTelemetryAttempts = (attempts) => Number.isFinite(attempts) ? Math.max(0, Math.trunc(attempts)) : 0;
|
|
5372
|
+
var addTelemetryDimension = (values, value) => {
|
|
5373
|
+
if (value !== void 0) {
|
|
5374
|
+
values.add(value);
|
|
5375
|
+
}
|
|
5376
|
+
};
|
|
5377
|
+
var recordTelemetryQueueEntry = (grouped, entry) => {
|
|
5339
5378
|
const normalized = normalizeTelemetryQueueEntry(entry);
|
|
5340
5379
|
const current = grouped.get(normalized.command) ?? createTelemetryStatsAccumulator();
|
|
5341
|
-
const attempts = Number.isFinite(entry.attempts) ? Math.max(0, Math.trunc(entry.attempts)) : 0;
|
|
5342
5380
|
current.count += 1;
|
|
5343
|
-
current.max_attempts = Math.max(current.max_attempts, attempts);
|
|
5344
|
-
current.event_type_counts
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
}
|
|
5348
|
-
if (normalized.clientSchemaVersion !== void 0) {
|
|
5349
|
-
current.client_schema_versions.add(normalized.clientSchemaVersion);
|
|
5350
|
-
}
|
|
5381
|
+
current.max_attempts = Math.max(current.max_attempts, normalizeTelemetryAttempts(entry.attempts));
|
|
5382
|
+
incrementTelemetryCount(current.event_type_counts, normalized.eventType);
|
|
5383
|
+
addTelemetryDimension(current.event_schema_versions, normalized.eventSchemaVersion);
|
|
5384
|
+
addTelemetryDimension(current.client_schema_versions, normalized.clientSchemaVersion);
|
|
5351
5385
|
if (normalized.eventType === "command_finish") {
|
|
5352
5386
|
recordTelemetryFinishPayload(current, entry.event.payload);
|
|
5353
5387
|
}
|
|
5354
5388
|
grouped.set(normalized.command, current);
|
|
5355
|
-
}
|
|
5356
|
-
|
|
5389
|
+
};
|
|
5390
|
+
var buildTelemetryStatsBucket = (command, value) => {
|
|
5357
5391
|
const finishCount = value.ok_count + value.error_count;
|
|
5358
5392
|
const sortedDurations = [...value.finish_durations_ms].sort((left, right) => left - right);
|
|
5359
5393
|
const resolutionEntries = Object.entries(value.resolution_counts).sort((left, right) => left[0].localeCompare(right[0]));
|
|
@@ -5376,8 +5410,8 @@ function buildTelemetryStatsBucket(command, value) {
|
|
|
5376
5410
|
} : {},
|
|
5377
5411
|
...resolutionEntries.length > 0 ? { command_resolution_counts: Object.fromEntries(resolutionEntries) } : {}
|
|
5378
5412
|
};
|
|
5379
|
-
}
|
|
5380
|
-
|
|
5413
|
+
};
|
|
5414
|
+
var normalizeTelemetrySubcommand = (value) => {
|
|
5381
5415
|
const normalized = (value ?? "status").trim().toLowerCase();
|
|
5382
5416
|
if (TELEMETRY_SUBCOMMANDS.includes(normalized)) {
|
|
5383
5417
|
return normalized;
|
|
@@ -5391,78 +5425,93 @@ function normalizeTelemetrySubcommand(value) {
|
|
|
5391
5425
|
"pm telemetry clear"
|
|
5392
5426
|
]
|
|
5393
5427
|
});
|
|
5394
|
-
}
|
|
5395
|
-
|
|
5428
|
+
};
|
|
5429
|
+
var throwInvalidTelemetryLimit = () => {
|
|
5430
|
+
throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
|
|
5431
|
+
};
|
|
5432
|
+
var requirePositiveTelemetryLimit = (value) => {
|
|
5433
|
+
if ([!Number.isFinite(value), !Number.isInteger(value), value <= 0].includes(true)) {
|
|
5434
|
+
return throwInvalidTelemetryLimit();
|
|
5435
|
+
}
|
|
5436
|
+
return value;
|
|
5437
|
+
};
|
|
5438
|
+
var parseTelemetryStringLimit = (raw) => {
|
|
5439
|
+
const trimmed = raw.trim();
|
|
5440
|
+
if ([trimmed.length === 0, !/^\d+$/.test(trimmed)].includes(true)) {
|
|
5441
|
+
return throwInvalidTelemetryLimit();
|
|
5442
|
+
}
|
|
5443
|
+
return requirePositiveTelemetryLimit(Number.parseInt(trimmed, 10));
|
|
5444
|
+
};
|
|
5445
|
+
var parseTelemetryStatsLimit = (raw) => {
|
|
5396
5446
|
if (raw === void 0) {
|
|
5397
5447
|
return DEFAULT_STATS_LIMIT;
|
|
5398
5448
|
}
|
|
5399
5449
|
if (typeof raw === "number") {
|
|
5400
|
-
|
|
5401
|
-
throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
|
|
5402
|
-
}
|
|
5403
|
-
return raw;
|
|
5450
|
+
return requirePositiveTelemetryLimit(raw);
|
|
5404
5451
|
}
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
|
|
5452
|
+
if (typeof raw === "string") {
|
|
5453
|
+
return parseTelemetryStringLimit(raw);
|
|
5408
5454
|
}
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5455
|
+
return throwInvalidTelemetryLimit();
|
|
5456
|
+
};
|
|
5457
|
+
var isTelemetryQueueEntry = (value) => {
|
|
5458
|
+
if (typeof value !== "object" || value === null) {
|
|
5459
|
+
return false;
|
|
5412
5460
|
}
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5461
|
+
const candidate = value;
|
|
5462
|
+
return typeof candidate.attempts === "number" && typeof candidate.event === "object" && candidate.event !== null;
|
|
5463
|
+
};
|
|
5464
|
+
var parseTelemetryQueueRow = (row) => {
|
|
5465
|
+
try {
|
|
5466
|
+
const parsed = JSON.parse(row);
|
|
5467
|
+
return isTelemetryQueueEntry(parsed) ? parsed : void 0;
|
|
5468
|
+
} catch {
|
|
5469
|
+
return void 0;
|
|
5470
|
+
}
|
|
5471
|
+
};
|
|
5472
|
+
var splitTelemetryQueueRows = (raw) => {
|
|
5473
|
+
if (raw === null) {
|
|
5474
|
+
return [];
|
|
5423
5475
|
}
|
|
5476
|
+
return raw.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
5477
|
+
};
|
|
5478
|
+
var parseTelemetryQueue2 = (raw) => {
|
|
5479
|
+
const rows = splitTelemetryQueueRows(raw);
|
|
5424
5480
|
const entries = [];
|
|
5425
|
-
let rowsTotal = 0;
|
|
5426
5481
|
let invalidRows = 0;
|
|
5427
|
-
for (const
|
|
5428
|
-
const
|
|
5429
|
-
if (
|
|
5430
|
-
continue;
|
|
5431
|
-
}
|
|
5432
|
-
rowsTotal += 1;
|
|
5433
|
-
try {
|
|
5434
|
-
const parsed = JSON.parse(trimmed);
|
|
5435
|
-
if (typeof parsed === "object" && parsed !== null && typeof parsed.attempts === "number" && typeof parsed.event === "object" && parsed.event !== null) {
|
|
5436
|
-
entries.push(parsed);
|
|
5437
|
-
} else {
|
|
5438
|
-
invalidRows += 1;
|
|
5439
|
-
}
|
|
5440
|
-
} catch {
|
|
5482
|
+
for (const row of rows) {
|
|
5483
|
+
const parsed = parseTelemetryQueueRow(row);
|
|
5484
|
+
if (parsed === void 0) {
|
|
5441
5485
|
invalidRows += 1;
|
|
5486
|
+
} else {
|
|
5487
|
+
entries.push(parsed);
|
|
5442
5488
|
}
|
|
5443
5489
|
}
|
|
5444
5490
|
return {
|
|
5445
|
-
rows_total:
|
|
5491
|
+
rows_total: rows.length,
|
|
5446
5492
|
valid_entries: entries.length,
|
|
5447
5493
|
invalid_rows: invalidRows,
|
|
5448
5494
|
entries
|
|
5449
5495
|
};
|
|
5450
|
-
}
|
|
5451
|
-
|
|
5496
|
+
};
|
|
5497
|
+
var isTelemetryRuntimeState = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5498
|
+
var parseTelemetryRuntimeState2 = (raw) => {
|
|
5499
|
+
try {
|
|
5500
|
+
const parsed = JSON.parse(raw);
|
|
5501
|
+
return isTelemetryRuntimeState(parsed) ? parsed : {};
|
|
5502
|
+
} catch {
|
|
5503
|
+
return {};
|
|
5504
|
+
}
|
|
5505
|
+
};
|
|
5506
|
+
var readTelemetryRuntimeState = async (statePath) => {
|
|
5452
5507
|
const stateRaw = await readFileIfExists(statePath);
|
|
5453
5508
|
if (stateRaw === null || stateRaw.trim().length === 0) {
|
|
5454
5509
|
return {};
|
|
5455
5510
|
}
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
}
|
|
5461
|
-
} catch {
|
|
5462
|
-
}
|
|
5463
|
-
return {};
|
|
5464
|
-
}
|
|
5465
|
-
async function buildTelemetryStatusSummary(globalPmRoot) {
|
|
5511
|
+
return parseTelemetryRuntimeState2(stateRaw);
|
|
5512
|
+
};
|
|
5513
|
+
var nullableTelemetryStateValue = (value) => value ?? null;
|
|
5514
|
+
var buildTelemetryStatusSummary = async (globalPmRoot) => {
|
|
5466
5515
|
const settings = await readSettings(globalPmRoot);
|
|
5467
5516
|
const queuePath = path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
|
|
5468
5517
|
const statePath = path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
|
|
@@ -5477,253 +5526,102 @@ async function buildTelemetryStatusSummary(globalPmRoot) {
|
|
|
5477
5526
|
queue_rows_total: queue.rows_total,
|
|
5478
5527
|
queue_entries: queue.valid_entries,
|
|
5479
5528
|
queue_invalid_rows: queue.invalid_rows,
|
|
5480
|
-
queue_size_bytes:
|
|
5481
|
-
last_attempted_flush_at: runtimeState.last_attempted_flush_at
|
|
5482
|
-
last_successful_flush_at: runtimeState.last_successful_flush_at
|
|
5483
|
-
last_failed_flush_at: runtimeState.last_failed_flush_at
|
|
5484
|
-
last_failed_flush_error: runtimeState.last_failed_flush_error
|
|
5529
|
+
queue_size_bytes: Buffer.byteLength(queueRaw ?? "", "utf8"),
|
|
5530
|
+
last_attempted_flush_at: nullableTelemetryStateValue(runtimeState.last_attempted_flush_at),
|
|
5531
|
+
last_successful_flush_at: nullableTelemetryStateValue(runtimeState.last_successful_flush_at),
|
|
5532
|
+
last_failed_flush_at: nullableTelemetryStateValue(runtimeState.last_failed_flush_at),
|
|
5533
|
+
last_failed_flush_error: nullableTelemetryStateValue(runtimeState.last_failed_flush_error)
|
|
5485
5534
|
};
|
|
5486
|
-
}
|
|
5487
|
-
|
|
5535
|
+
};
|
|
5536
|
+
var buildTelemetryStatsBuckets = (entries) => {
|
|
5488
5537
|
const grouped = /* @__PURE__ */ new Map();
|
|
5489
5538
|
for (const entry of entries) {
|
|
5490
5539
|
recordTelemetryQueueEntry(grouped, entry);
|
|
5491
5540
|
}
|
|
5492
5541
|
return [...grouped.entries()].map(([command, value]) => buildTelemetryStatsBucket(command, value)).sort((left, right) => right.count - left.count || left.command.localeCompare(right.command));
|
|
5493
|
-
}
|
|
5494
|
-
async
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
}
|
|
5541
|
-
const settings = await readSettings(globalPmRoot);
|
|
5542
|
-
const previousEnabled = settings.telemetry.enabled;
|
|
5543
|
-
const previousInstallationId = settings.telemetry.installation_id;
|
|
5544
|
-
const previousFirstRunPromptCompleted = settings.telemetry.first_run_prompt_completed;
|
|
5542
|
+
};
|
|
5543
|
+
var runTelemetryStatus = async (_options, context) => ({
|
|
5544
|
+
action: "telemetry",
|
|
5545
|
+
subcommand: "status",
|
|
5546
|
+
status: await buildTelemetryStatusSummary(context.globalPmRoot),
|
|
5547
|
+
generated_at: nowIso()
|
|
5548
|
+
});
|
|
5549
|
+
var runTelemetryFlush = async (_options, context) => {
|
|
5550
|
+
const before = await buildTelemetryStatusSummary(context.globalPmRoot);
|
|
5551
|
+
await flushTelemetryQueueNow(context.globalPmRoot);
|
|
5552
|
+
const after = await buildTelemetryStatusSummary(context.globalPmRoot);
|
|
5553
|
+
return {
|
|
5554
|
+
action: "telemetry",
|
|
5555
|
+
subcommand: "flush",
|
|
5556
|
+
queue_entries_before: before.queue_entries,
|
|
5557
|
+
queue_entries_after: after.queue_entries,
|
|
5558
|
+
queue_drained: after.queue_entries < before.queue_entries,
|
|
5559
|
+
status: after,
|
|
5560
|
+
generated_at: nowIso()
|
|
5561
|
+
};
|
|
5562
|
+
};
|
|
5563
|
+
var runTelemetryStats = async (options, context) => {
|
|
5564
|
+
const limit = parseTelemetryStatsLimit(options.limit);
|
|
5565
|
+
const queueRaw = await readFileIfExists(context.queuePath);
|
|
5566
|
+
const queue = parseTelemetryQueue2(queueRaw);
|
|
5567
|
+
const buckets = buildTelemetryStatsBuckets(queue.entries);
|
|
5568
|
+
const selected = buckets.slice(0, limit);
|
|
5569
|
+
return {
|
|
5570
|
+
action: "telemetry",
|
|
5571
|
+
subcommand: "stats",
|
|
5572
|
+
limit,
|
|
5573
|
+
total_commands: buckets.length,
|
|
5574
|
+
queue_entries: queue.valid_entries,
|
|
5575
|
+
queue_invalid_rows: queue.invalid_rows,
|
|
5576
|
+
queue_rows_total: queue.rows_total,
|
|
5577
|
+
truncated: buckets.length > selected.length,
|
|
5578
|
+
stats: selected,
|
|
5579
|
+
generated_at: nowIso()
|
|
5580
|
+
};
|
|
5581
|
+
};
|
|
5582
|
+
var runTelemetryClear = async (_options, context) => {
|
|
5583
|
+
const settings = await readSettings(context.globalPmRoot);
|
|
5584
|
+
const settingsChanged = [
|
|
5585
|
+
settings.telemetry.enabled !== false,
|
|
5586
|
+
settings.telemetry.installation_id !== "",
|
|
5587
|
+
settings.telemetry.first_run_prompt_completed !== true
|
|
5588
|
+
].includes(true);
|
|
5545
5589
|
settings.telemetry.enabled = false;
|
|
5546
5590
|
settings.telemetry.first_run_prompt_completed = true;
|
|
5547
5591
|
settings.telemetry.installation_id = "";
|
|
5548
|
-
const settingsChanged = previousEnabled !== settings.telemetry.enabled || previousInstallationId !== settings.telemetry.installation_id || previousFirstRunPromptCompleted !== settings.telemetry.first_run_prompt_completed;
|
|
5549
5592
|
if (settingsChanged) {
|
|
5550
|
-
await writeSettings(globalPmRoot, settings, "telemetry:clear");
|
|
5593
|
+
await writeSettings(context.globalPmRoot, settings, "telemetry:clear");
|
|
5551
5594
|
}
|
|
5552
|
-
const telemetryRuntimePath = path7.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
|
|
5595
|
+
const telemetryRuntimePath = path7.join(context.globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
|
|
5553
5596
|
const existed = await pathExists(telemetryRuntimePath);
|
|
5554
5597
|
await fs7.rm(telemetryRuntimePath, { recursive: true, force: true });
|
|
5555
|
-
const queueExistsAfter = await pathExists(queuePath);
|
|
5556
|
-
const stateExistsAfter = await pathExists(statePath);
|
|
5557
5598
|
return {
|
|
5558
5599
|
action: "telemetry",
|
|
5559
|
-
subcommand,
|
|
5600
|
+
subcommand: "clear",
|
|
5560
5601
|
settings_changed: settingsChanged,
|
|
5561
5602
|
runtime_dir_removed: existed && !await pathExists(telemetryRuntimePath),
|
|
5562
|
-
queue_exists_after:
|
|
5563
|
-
state_exists_after:
|
|
5564
|
-
status: await buildTelemetryStatusSummary(globalPmRoot),
|
|
5603
|
+
queue_exists_after: await pathExists(context.queuePath),
|
|
5604
|
+
state_exists_after: await pathExists(context.statePath),
|
|
5605
|
+
status: await buildTelemetryStatusSummary(context.globalPmRoot),
|
|
5565
5606
|
generated_at: nowIso()
|
|
5566
5607
|
};
|
|
5567
|
-
}
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
const parsed = Number.parseInt(raw, 10);
|
|
5583
|
-
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
5584
|
-
return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
|
|
5585
|
-
}
|
|
5586
|
-
return parsed;
|
|
5587
|
-
}
|
|
5588
|
-
function normalizeTrackedTestRunSummaries(entries) {
|
|
5589
|
-
return [...entries].filter((entry) => entry.run_id.trim().length > 0 && entry.started_at.trim().length > 0 && entry.finished_at.trim().length > 0 && entry.recorded_at.trim().length > 0).sort((left, right) => {
|
|
5590
|
-
const byRecorded = compareTimestampStrings(left.recorded_at, right.recorded_at);
|
|
5591
|
-
if (byRecorded !== 0)
|
|
5592
|
-
return byRecorded;
|
|
5593
|
-
const byRunId = left.run_id.localeCompare(right.run_id);
|
|
5594
|
-
if (byRunId !== 0)
|
|
5595
|
-
return byRunId;
|
|
5596
|
-
return left.kind.localeCompare(right.kind);
|
|
5597
|
-
});
|
|
5598
|
-
}
|
|
5599
|
-
async function appendTrackedTestRunSummary(options) {
|
|
5600
|
-
const historyLimit = trackedTestRunHistoryLimit();
|
|
5601
|
-
await mutateItem({
|
|
5602
|
-
pmRoot: options.pmRoot,
|
|
5603
|
-
settings: options.settings,
|
|
5604
|
-
id: options.itemId,
|
|
5605
|
-
op: "test_run_track",
|
|
5606
|
-
author: options.author,
|
|
5607
|
-
message: options.message,
|
|
5608
|
-
force: false,
|
|
5609
|
-
mutate(document) {
|
|
5610
|
-
const current = document.metadata.test_runs ?? [];
|
|
5611
|
-
const next = normalizeTrackedTestRunSummaries([
|
|
5612
|
-
...current,
|
|
5613
|
-
options.entry
|
|
5614
|
-
]);
|
|
5615
|
-
const bounded = next.length > historyLimit ? next.slice(next.length - historyLimit) : next;
|
|
5616
|
-
document.metadata.test_runs = bounded;
|
|
5617
|
-
return { changedFields: ["test_runs"] };
|
|
5618
|
-
}
|
|
5608
|
+
};
|
|
5609
|
+
var TELEMETRY_COMMAND_HANDLERS = {
|
|
5610
|
+
status: runTelemetryStatus,
|
|
5611
|
+
flush: runTelemetryFlush,
|
|
5612
|
+
stats: runTelemetryStats,
|
|
5613
|
+
clear: runTelemetryClear
|
|
5614
|
+
};
|
|
5615
|
+
var runTelemetry = async (options, _global) => {
|
|
5616
|
+
void _global;
|
|
5617
|
+
const subcommand = normalizeTelemetrySubcommand(options.subcommand);
|
|
5618
|
+
const globalPmRoot = resolveGlobalPmRoot(process.cwd());
|
|
5619
|
+
return TELEMETRY_COMMAND_HANDLERS[subcommand](options, {
|
|
5620
|
+
globalPmRoot,
|
|
5621
|
+
queuePath: path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2),
|
|
5622
|
+
statePath: path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2)
|
|
5619
5623
|
});
|
|
5620
|
-
}
|
|
5621
|
-
|
|
5622
|
-
// dist/core/test/run-selectors.js
|
|
5623
|
-
var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
|
|
5624
|
-
function parseOnlyIndexValue(raw, optionName = "--only-index") {
|
|
5625
|
-
const value = typeof raw === "number" ? raw : Number(String(raw).trim());
|
|
5626
|
-
if (!Number.isInteger(value) || value < 1) {
|
|
5627
|
-
throw new PmCliError(`${optionName} requires a 1-based integer index into the linked-test list (got "${raw}"). Use pm test <id> --list to inspect positions.`, EXIT_CODE.USAGE);
|
|
5628
|
-
}
|
|
5629
|
-
return value;
|
|
5630
|
-
}
|
|
5631
|
-
function summarizeSelectorEntry(entry) {
|
|
5632
|
-
const label = entry.command ?? entry.path ?? "<no command>";
|
|
5633
|
-
const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
|
|
5634
|
-
if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
|
|
5635
|
-
return normalized;
|
|
5636
|
-
}
|
|
5637
|
-
return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
|
|
5638
|
-
}
|
|
5639
|
-
function describeLinkedTestEntries(tests) {
|
|
5640
|
-
return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
|
|
5641
|
-
}
|
|
5642
|
-
function activeSelectorKinds(selector) {
|
|
5643
|
-
const kinds = [];
|
|
5644
|
-
if (selector.match !== void 0) {
|
|
5645
|
-
kinds.push("match");
|
|
5646
|
-
}
|
|
5647
|
-
if (selector.onlyIndex !== void 0) {
|
|
5648
|
-
kinds.push("only-index");
|
|
5649
|
-
}
|
|
5650
|
-
if (selector.onlyLast === true) {
|
|
5651
|
-
kinds.push("only-last");
|
|
5652
|
-
}
|
|
5653
|
-
return kinds;
|
|
5654
|
-
}
|
|
5655
|
-
function entryMatchesSubstring(entry, needle) {
|
|
5656
|
-
const command = entry.command?.toLowerCase() ?? "";
|
|
5657
|
-
const entryPath = entry.path?.toLowerCase() ?? "";
|
|
5658
|
-
return command.includes(needle) || entryPath.includes(needle);
|
|
5659
|
-
}
|
|
5660
|
-
function resolveLinkedTestRunSelection(tests, selector) {
|
|
5661
|
-
const kinds = activeSelectorKinds(selector);
|
|
5662
|
-
if (kinds.length === 0) {
|
|
5663
|
-
return {
|
|
5664
|
-
selector: null,
|
|
5665
|
-
requested: null,
|
|
5666
|
-
selected: tests,
|
|
5667
|
-
selected_indexes: tests.map((_, index) => index + 1),
|
|
5668
|
-
selected_count: tests.length,
|
|
5669
|
-
skipped_count: 0
|
|
5670
|
-
};
|
|
5671
|
-
}
|
|
5672
|
-
if (kinds.length > 1) {
|
|
5673
|
-
throw new PmCliError(`Combine at most one linked-test selector per run: ${kinds.map((kind2) => `--${kind2}`).join(" and ")} were provided. Pick one of --match, --only-index, --only-last.`, EXIT_CODE.USAGE);
|
|
5674
|
-
}
|
|
5675
|
-
const kind = kinds[0];
|
|
5676
|
-
if (tests.length === 0) {
|
|
5677
|
-
throw new PmCliError(`--${kind} matched no linked tests because this item has none. Add one first with --add, --command, or --add-json.`, EXIT_CODE.USAGE);
|
|
5678
|
-
}
|
|
5679
|
-
if (kind === "match") {
|
|
5680
|
-
const needle = selector.match.trim().toLowerCase();
|
|
5681
|
-
if (needle.length === 0) {
|
|
5682
|
-
throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
|
|
5683
|
-
}
|
|
5684
|
-
const selectedIndexes = [];
|
|
5685
|
-
const selected = [];
|
|
5686
|
-
for (let index = 0; index < tests.length; index += 1) {
|
|
5687
|
-
if (entryMatchesSubstring(tests[index], needle)) {
|
|
5688
|
-
selected.push(tests[index]);
|
|
5689
|
-
selectedIndexes.push(index + 1);
|
|
5690
|
-
}
|
|
5691
|
-
}
|
|
5692
|
-
if (selected.length === 0) {
|
|
5693
|
-
throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
|
|
5694
|
-
}
|
|
5695
|
-
return {
|
|
5696
|
-
selector: "match",
|
|
5697
|
-
requested: selector.match,
|
|
5698
|
-
selected,
|
|
5699
|
-
selected_indexes: selectedIndexes,
|
|
5700
|
-
selected_count: selected.length,
|
|
5701
|
-
skipped_count: tests.length - selected.length
|
|
5702
|
-
};
|
|
5703
|
-
}
|
|
5704
|
-
if (kind === "only-index") {
|
|
5705
|
-
const index = parseOnlyIndexValue(selector.onlyIndex);
|
|
5706
|
-
if (index > tests.length) {
|
|
5707
|
-
throw new PmCliError(`--only-index ${index} is out of range: this item has ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
|
|
5708
|
-
}
|
|
5709
|
-
return {
|
|
5710
|
-
selector: "only-index",
|
|
5711
|
-
requested: String(index),
|
|
5712
|
-
selected: [tests[index - 1]],
|
|
5713
|
-
selected_indexes: [index],
|
|
5714
|
-
selected_count: 1,
|
|
5715
|
-
skipped_count: tests.length - 1
|
|
5716
|
-
};
|
|
5717
|
-
}
|
|
5718
|
-
return {
|
|
5719
|
-
selector: "only-last",
|
|
5720
|
-
requested: "last",
|
|
5721
|
-
selected: [tests[tests.length - 1]],
|
|
5722
|
-
selected_indexes: [tests.length],
|
|
5723
|
-
selected_count: 1,
|
|
5724
|
-
skipped_count: tests.length - 1
|
|
5725
|
-
};
|
|
5726
|
-
}
|
|
5624
|
+
};
|
|
5727
5625
|
|
|
5728
5626
|
// dist/sdk/test/linked-command-detection.js
|
|
5729
5627
|
var PM_SUBCOMMANDS_WITH_ITEM_REFERENCE = /* @__PURE__ */ new Set([
|
|
@@ -5929,7 +5827,9 @@ var PM_ITEM_REFERENCE_FLAGS_WITH_VALUE = {
|
|
|
5929
5827
|
"--node-limit",
|
|
5930
5828
|
"--edge-limit",
|
|
5931
5829
|
"--token-budget",
|
|
5932
|
-
"--cursor"
|
|
5830
|
+
"--cursor",
|
|
5831
|
+
"--direction",
|
|
5832
|
+
"--kind"
|
|
5933
5833
|
]),
|
|
5934
5834
|
test: /* @__PURE__ */ new Set([
|
|
5935
5835
|
"--add",
|
|
@@ -5990,7 +5890,11 @@ function extractPmInvocationArgsFromSegment(segment) {
|
|
|
5990
5890
|
return invocation && (isPmExecutableToken(invocation.command) || isPmCliPackageToken(invocation.command)) ? invocation.args : null;
|
|
5991
5891
|
}
|
|
5992
5892
|
var extractReferencedPmItemIdsFromCommand = (command, idPrefix = "pm") => {
|
|
5993
|
-
const
|
|
5893
|
+
const lowered = idPrefix.trim().toLowerCase();
|
|
5894
|
+
let prefixEnd = lowered.length;
|
|
5895
|
+
while (prefixEnd > 0 && lowered[prefixEnd - 1] === "-")
|
|
5896
|
+
prefixEnd -= 1;
|
|
5897
|
+
const normalizedPrefix = lowered.slice(0, prefixEnd);
|
|
5994
5898
|
if (normalizedPrefix.length === 0)
|
|
5995
5899
|
return [];
|
|
5996
5900
|
const normalizedCommand = command.trim().replaceAll("\\", "/").replaceAll('"', "").replaceAll("'", "").replaceAll(/\s+/g, " ").toLowerCase();
|
|
@@ -6175,7 +6079,166 @@ function firstPositionalToken(tokens, flagsWithValue = /* @__PURE__ */ new Set()
|
|
|
6175
6079
|
return void 0;
|
|
6176
6080
|
}
|
|
6177
6081
|
|
|
6178
|
-
// dist/
|
|
6082
|
+
// dist/sdk/test/execution.js
|
|
6083
|
+
import { spawn } from "node:child_process";
|
|
6084
|
+
import { cp, mkdir, mkdtemp, readdir, rm } from "node:fs/promises";
|
|
6085
|
+
import { tmpdir } from "node:os";
|
|
6086
|
+
import path8 from "node:path";
|
|
6087
|
+
|
|
6088
|
+
// dist/core/test/item-test-run-tracking.js
|
|
6089
|
+
var DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT = 20;
|
|
6090
|
+
function trackedTestRunHistoryLimit() {
|
|
6091
|
+
const raw = process.env.PM_TRACKED_TEST_RUN_HISTORY_LIMIT;
|
|
6092
|
+
if (!raw || raw.trim().length === 0) {
|
|
6093
|
+
return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
|
|
6094
|
+
}
|
|
6095
|
+
const parsed = Number.parseInt(raw, 10);
|
|
6096
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
6097
|
+
return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
|
|
6098
|
+
}
|
|
6099
|
+
return parsed;
|
|
6100
|
+
}
|
|
6101
|
+
function normalizeTrackedTestRunSummaries(entries) {
|
|
6102
|
+
return [...entries].filter((entry) => entry.run_id.trim().length > 0 && entry.started_at.trim().length > 0 && entry.finished_at.trim().length > 0 && entry.recorded_at.trim().length > 0).sort((left, right) => {
|
|
6103
|
+
const byRecorded = compareTimestampStrings(left.recorded_at, right.recorded_at);
|
|
6104
|
+
if (byRecorded !== 0)
|
|
6105
|
+
return byRecorded;
|
|
6106
|
+
const byRunId = left.run_id.localeCompare(right.run_id);
|
|
6107
|
+
if (byRunId !== 0)
|
|
6108
|
+
return byRunId;
|
|
6109
|
+
return left.kind.localeCompare(right.kind);
|
|
6110
|
+
});
|
|
6111
|
+
}
|
|
6112
|
+
async function appendTrackedTestRunSummary(options) {
|
|
6113
|
+
const historyLimit = trackedTestRunHistoryLimit();
|
|
6114
|
+
await mutateItem({
|
|
6115
|
+
pmRoot: options.pmRoot,
|
|
6116
|
+
settings: options.settings,
|
|
6117
|
+
id: options.itemId,
|
|
6118
|
+
op: "test_run_track",
|
|
6119
|
+
author: options.author,
|
|
6120
|
+
message: options.message,
|
|
6121
|
+
force: false,
|
|
6122
|
+
mutate(document) {
|
|
6123
|
+
const current = document.metadata.test_runs ?? [];
|
|
6124
|
+
const next = normalizeTrackedTestRunSummaries([
|
|
6125
|
+
...current,
|
|
6126
|
+
options.entry
|
|
6127
|
+
]);
|
|
6128
|
+
const bounded = next.length > historyLimit ? next.slice(next.length - historyLimit) : next;
|
|
6129
|
+
document.metadata.test_runs = bounded;
|
|
6130
|
+
return { changedFields: ["test_runs"] };
|
|
6131
|
+
}
|
|
6132
|
+
});
|
|
6133
|
+
}
|
|
6134
|
+
|
|
6135
|
+
// dist/core/test/run-selectors.js
|
|
6136
|
+
var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
|
|
6137
|
+
function parseOnlyIndexValue(raw, optionName = "--only-index") {
|
|
6138
|
+
const value = typeof raw === "number" ? raw : Number(String(raw).trim());
|
|
6139
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
6140
|
+
throw new PmCliError(`${optionName} requires a 1-based integer index into the linked-test list (got "${raw}"). Use pm test <id> --list to inspect positions.`, EXIT_CODE.USAGE);
|
|
6141
|
+
}
|
|
6142
|
+
return value;
|
|
6143
|
+
}
|
|
6144
|
+
function summarizeSelectorEntry(entry) {
|
|
6145
|
+
const label = entry.command ?? entry.path ?? "<no command>";
|
|
6146
|
+
const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
|
|
6147
|
+
if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
|
|
6148
|
+
return normalized;
|
|
6149
|
+
}
|
|
6150
|
+
return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
|
|
6151
|
+
}
|
|
6152
|
+
function describeLinkedTestEntries(tests) {
|
|
6153
|
+
return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
|
|
6154
|
+
}
|
|
6155
|
+
function activeSelectorKinds(selector) {
|
|
6156
|
+
const kinds = [];
|
|
6157
|
+
if (selector.match !== void 0) {
|
|
6158
|
+
kinds.push("match");
|
|
6159
|
+
}
|
|
6160
|
+
if (selector.onlyIndex !== void 0) {
|
|
6161
|
+
kinds.push("only-index");
|
|
6162
|
+
}
|
|
6163
|
+
if (selector.onlyLast === true) {
|
|
6164
|
+
kinds.push("only-last");
|
|
6165
|
+
}
|
|
6166
|
+
return kinds;
|
|
6167
|
+
}
|
|
6168
|
+
function entryMatchesSubstring(entry, needle) {
|
|
6169
|
+
const command = entry.command?.toLowerCase() ?? "";
|
|
6170
|
+
const entryPath = entry.path?.toLowerCase() ?? "";
|
|
6171
|
+
return command.includes(needle) || entryPath.includes(needle);
|
|
6172
|
+
}
|
|
6173
|
+
function resolveLinkedTestRunSelection(tests, selector) {
|
|
6174
|
+
const kinds = activeSelectorKinds(selector);
|
|
6175
|
+
if (kinds.length === 0) {
|
|
6176
|
+
return {
|
|
6177
|
+
selector: null,
|
|
6178
|
+
requested: null,
|
|
6179
|
+
selected: tests,
|
|
6180
|
+
selected_indexes: tests.map((_, index) => index + 1),
|
|
6181
|
+
selected_count: tests.length,
|
|
6182
|
+
skipped_count: 0
|
|
6183
|
+
};
|
|
6184
|
+
}
|
|
6185
|
+
if (kinds.length > 1) {
|
|
6186
|
+
throw new PmCliError(`Combine at most one linked-test selector per run: ${kinds.map((kind2) => `--${kind2}`).join(" and ")} were provided. Pick one of --match, --only-index, --only-last.`, EXIT_CODE.USAGE);
|
|
6187
|
+
}
|
|
6188
|
+
const kind = kinds[0];
|
|
6189
|
+
if (tests.length === 0) {
|
|
6190
|
+
throw new PmCliError(`--${kind} matched no linked tests because this item has none. Add one first with --add, --command, or --add-json.`, EXIT_CODE.USAGE);
|
|
6191
|
+
}
|
|
6192
|
+
if (kind === "match") {
|
|
6193
|
+
const needle = selector.match.trim().toLowerCase();
|
|
6194
|
+
if (needle.length === 0) {
|
|
6195
|
+
throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
|
|
6196
|
+
}
|
|
6197
|
+
const selectedIndexes = [];
|
|
6198
|
+
const selected = [];
|
|
6199
|
+
for (let index = 0; index < tests.length; index += 1) {
|
|
6200
|
+
if (entryMatchesSubstring(tests[index], needle)) {
|
|
6201
|
+
selected.push(tests[index]);
|
|
6202
|
+
selectedIndexes.push(index + 1);
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
if (selected.length === 0) {
|
|
6206
|
+
throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
|
|
6207
|
+
}
|
|
6208
|
+
return {
|
|
6209
|
+
selector: "match",
|
|
6210
|
+
requested: selector.match,
|
|
6211
|
+
selected,
|
|
6212
|
+
selected_indexes: selectedIndexes,
|
|
6213
|
+
selected_count: selected.length,
|
|
6214
|
+
skipped_count: tests.length - selected.length
|
|
6215
|
+
};
|
|
6216
|
+
}
|
|
6217
|
+
if (kind === "only-index") {
|
|
6218
|
+
const index = parseOnlyIndexValue(selector.onlyIndex);
|
|
6219
|
+
if (index > tests.length) {
|
|
6220
|
+
throw new PmCliError(`--only-index ${index} is out of range: this item has ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
|
|
6221
|
+
}
|
|
6222
|
+
return {
|
|
6223
|
+
selector: "only-index",
|
|
6224
|
+
requested: String(index),
|
|
6225
|
+
selected: [tests[index - 1]],
|
|
6226
|
+
selected_indexes: [index],
|
|
6227
|
+
selected_count: 1,
|
|
6228
|
+
skipped_count: tests.length - 1
|
|
6229
|
+
};
|
|
6230
|
+
}
|
|
6231
|
+
return {
|
|
6232
|
+
selector: "only-last",
|
|
6233
|
+
requested: "last",
|
|
6234
|
+
selected: [tests[tests.length - 1]],
|
|
6235
|
+
selected_indexes: [tests.length],
|
|
6236
|
+
selected_count: 1,
|
|
6237
|
+
skipped_count: tests.length - 1
|
|
6238
|
+
};
|
|
6239
|
+
}
|
|
6240
|
+
|
|
6241
|
+
// dist/sdk/test/execution.js
|
|
6179
6242
|
var TEST_OUTPUT_MAX_BUFFER_BYTES = 20 * 1024 * 1024;
|
|
6180
6243
|
var DEFAULT_LINKED_TEST_TIMEOUT_FORCE_KILL_DELAY_MS = 3e3;
|
|
6181
6244
|
var DEFAULT_LINKED_TEST_HEARTBEAT_INTERVAL_MS = 1e4;
|
|
@@ -6333,7 +6396,17 @@ function resolveLinkedTestEffectiveContextMode(requestedMode, isPmTrackerReadCom
|
|
|
6333
6396
|
return requestedMode;
|
|
6334
6397
|
}
|
|
6335
6398
|
function hasLinkedTestAssertions(linkedTest) {
|
|
6336
|
-
return
|
|
6399
|
+
return Object.entries(linkedTest).filter(([key]) => key.startsWith("assert_")).some(([, value]) => {
|
|
6400
|
+
if (value === void 0 || value === null)
|
|
6401
|
+
return false;
|
|
6402
|
+
if (Array.isArray(value))
|
|
6403
|
+
return value.length > 0;
|
|
6404
|
+
if (typeof value === "object")
|
|
6405
|
+
return Object.keys(value).length > 0;
|
|
6406
|
+
if (typeof value === "string")
|
|
6407
|
+
return value.trim().length > 0;
|
|
6408
|
+
return true;
|
|
6409
|
+
});
|
|
6337
6410
|
}
|
|
6338
6411
|
function buildPmContextMismatchHint(params) {
|
|
6339
6412
|
const { executionContext, runLevelPmContextMode, linkedOverridePmContextMode } = params;
|
|
@@ -6437,6 +6510,12 @@ function parsedLauncherInvokesRecursiveTestAll(parsed) {
|
|
|
6437
6510
|
}
|
|
6438
6511
|
return firstPmSubcommand(parsed.args) === "test-all";
|
|
6439
6512
|
}
|
|
6513
|
+
var SHELL_COMMAND_FLAG_PATTERNS = new Map([
|
|
6514
|
+
...["sh", "bash", "dash", "zsh"].map((executable) => [executable, /^(?:-c|-[a-z]*c[a-z]*)$/u]),
|
|
6515
|
+
...["cmd", "cmd.exe"].map((executable) => [executable, /^\/[ck]$/u]),
|
|
6516
|
+
...["powershell", "powershell.exe", "pwsh", "pwsh.exe"].map((executable) => [executable, /^-(?:c|command)$/u])
|
|
6517
|
+
]);
|
|
6518
|
+
var PACKAGE_EXEC_EXECUTABLES = /* @__PURE__ */ new Set(["npx", "bunx"]);
|
|
6440
6519
|
function segmentInvokesRecursiveTestAll(segment) {
|
|
6441
6520
|
const rawTokens = segment.split(" ").filter((token) => token.length > 0);
|
|
6442
6521
|
const tokens = stripLeadingEnvAssignments(rawTokens);
|
|
@@ -6444,13 +6523,18 @@ function segmentInvokesRecursiveTestAll(segment) {
|
|
|
6444
6523
|
return false;
|
|
6445
6524
|
}
|
|
6446
6525
|
const [executable, ...args] = tokens;
|
|
6526
|
+
const shellCommandFlagPattern = SHELL_COMMAND_FLAG_PATTERNS.get(executable);
|
|
6527
|
+
if (shellCommandFlagPattern) {
|
|
6528
|
+
const commandFlagIndex = args.findIndex((arg) => shellCommandFlagPattern.test(arg));
|
|
6529
|
+
return commandFlagIndex >= 0 ? segmentInvokesRecursiveTestAll(args.slice(commandFlagIndex + 1).join(" ")) : false;
|
|
6530
|
+
}
|
|
6447
6531
|
if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
|
|
6448
6532
|
return firstPmSubcommand(args) === "test-all";
|
|
6449
6533
|
}
|
|
6450
6534
|
if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
|
|
6451
6535
|
return firstPmSubcommand(args.slice(1)) === "test-all";
|
|
6452
6536
|
}
|
|
6453
|
-
if (executable
|
|
6537
|
+
if (PACKAGE_EXEC_EXECUTABLES.has(executable)) {
|
|
6454
6538
|
return parsedLauncherInvokesRecursiveTestAll(parseNpxCommand(args));
|
|
6455
6539
|
}
|
|
6456
6540
|
if (executable === "pnpm") {
|
|
@@ -6564,7 +6648,13 @@ function parseLinkedTestTimeoutSeconds(timeoutSecondsRaw, timeoutAliasRaw) {
|
|
|
6564
6648
|
throw new PmCliError("--add timeout and timeout_seconds must match when both are provided", EXIT_CODE.USAGE);
|
|
6565
6649
|
}
|
|
6566
6650
|
const timeoutRaw = timeoutSecondsRaw ?? timeoutAliasRaw;
|
|
6567
|
-
|
|
6651
|
+
if (timeoutRaw === void 0)
|
|
6652
|
+
return void 0;
|
|
6653
|
+
const timeout = Math.floor(parseOptionalNumber(timeoutRaw, "timeout_seconds"));
|
|
6654
|
+
if (timeout <= 0) {
|
|
6655
|
+
throw new PmCliError("--add timeout_seconds must be a positive integer", EXIT_CODE.USAGE);
|
|
6656
|
+
}
|
|
6657
|
+
return timeout;
|
|
6568
6658
|
}
|
|
6569
6659
|
function parseAddJsonEntries(raw) {
|
|
6570
6660
|
if (!raw)
|
|
@@ -6762,7 +6852,7 @@ function appendLinkedTestOutputChunk(state, chunk, target) {
|
|
|
6762
6852
|
state.stderrBytes += bytes;
|
|
6763
6853
|
}
|
|
6764
6854
|
const bufferExceeded = state.stdoutBytes > TEST_OUTPUT_MAX_BUFFER_BYTES || state.stderrBytes > TEST_OUTPUT_MAX_BUFFER_BYTES;
|
|
6765
|
-
if (
|
|
6855
|
+
if (bufferExceeded) {
|
|
6766
6856
|
state.maxBufferExceeded = true;
|
|
6767
6857
|
return true;
|
|
6768
6858
|
}
|
|
@@ -7090,7 +7180,7 @@ function readJsonPathValue(root, fieldPath) {
|
|
|
7090
7180
|
current = current[segment];
|
|
7091
7181
|
continue;
|
|
7092
7182
|
}
|
|
7093
|
-
if (typeof current !== "object" || current === null || !(segment
|
|
7183
|
+
if (typeof current !== "object" || current === null || !Object.prototype.hasOwnProperty.call(current, segment)) {
|
|
7094
7184
|
return { found: false, value: void 0 };
|
|
7095
7185
|
}
|
|
7096
7186
|
current = current[segment];
|
|
@@ -7277,7 +7367,7 @@ function buildLinkedTestExecutionContext(params) {
|
|
|
7277
7367
|
sandbox_project_item_count: selectedSandboxProjectItemCount,
|
|
7278
7368
|
source_global_item_count: params.counts.sourceGlobalItemCount,
|
|
7279
7369
|
sandbox_global_item_count: selectedSandboxGlobalItemCount,
|
|
7280
|
-
mismatch_detected: params.isPmCommand && params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount,
|
|
7370
|
+
mismatch_detected: params.isPmCommand && (params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount || params.counts.sourceGlobalItemCount !== selectedSandboxGlobalItemCount),
|
|
7281
7371
|
project_extensions_seeded: Boolean(params.sourceRoots),
|
|
7282
7372
|
global_extensions_seeded: Boolean(params.sourceRoots)
|
|
7283
7373
|
};
|
|
@@ -7564,8 +7654,12 @@ function resolveTestRunOptions(options, tests) {
|
|
|
7564
7654
|
onlyLast: options.onlyLast
|
|
7565
7655
|
};
|
|
7566
7656
|
const runSelection = options.run === true ? resolveLinkedTestRunSelection(tests, selectorInput) : void 0;
|
|
7657
|
+
const defaultTimeoutSeconds = options.timeout === void 0 ? void 0 : parseOptionalNumber(options.timeout, "timeout");
|
|
7658
|
+
if (defaultTimeoutSeconds !== void 0 && defaultTimeoutSeconds <= 0) {
|
|
7659
|
+
throw new PmCliError("Test timeout must be a positive number", EXIT_CODE.USAGE);
|
|
7660
|
+
}
|
|
7567
7661
|
return {
|
|
7568
|
-
defaultTimeoutSeconds
|
|
7662
|
+
defaultTimeoutSeconds,
|
|
7569
7663
|
pmContextMode: parsePmContextMode(options.pmContext),
|
|
7570
7664
|
runSelection,
|
|
7571
7665
|
testsToRun: runSelection?.selected ?? tests
|
|
@@ -7706,8 +7800,8 @@ async function runTest(id, options, global) {
|
|
|
7706
7800
|
};
|
|
7707
7801
|
}
|
|
7708
7802
|
|
|
7709
|
-
// dist/
|
|
7710
|
-
|
|
7803
|
+
// dist/sdk/test/batch.js
|
|
7804
|
+
var parseStatus = (raw, statusRegistry) => {
|
|
7711
7805
|
if (raw === void 0) {
|
|
7712
7806
|
return void 0;
|
|
7713
7807
|
}
|
|
@@ -7717,14 +7811,18 @@ function parseStatus(raw, statusRegistry) {
|
|
|
7717
7811
|
throw new PmCliError(`Invalid --status value "${raw}". Allowed: ${allowedStatuses.join(", ")}`, EXIT_CODE.USAGE);
|
|
7718
7812
|
}
|
|
7719
7813
|
return normalized;
|
|
7720
|
-
}
|
|
7721
|
-
|
|
7814
|
+
};
|
|
7815
|
+
var parseTimeout = (raw) => {
|
|
7722
7816
|
if (raw === void 0) {
|
|
7723
7817
|
return void 0;
|
|
7724
7818
|
}
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7819
|
+
const parsed = parseOptionalNumber(raw, "timeout");
|
|
7820
|
+
if (parsed <= 0) {
|
|
7821
|
+
throw new PmCliError("timeout must be a positive number", EXIT_CODE.USAGE);
|
|
7822
|
+
}
|
|
7823
|
+
return parsed;
|
|
7824
|
+
};
|
|
7825
|
+
var parseNonNegativeInteger = (raw, flag) => {
|
|
7728
7826
|
if (raw === void 0) {
|
|
7729
7827
|
return void 0;
|
|
7730
7828
|
}
|
|
@@ -7733,66 +7831,67 @@ function parseNonNegativeInteger(raw, flag) {
|
|
|
7733
7831
|
throw new PmCliError(`${flag} must be a non-negative integer`, EXIT_CODE.USAGE);
|
|
7734
7832
|
}
|
|
7735
7833
|
return parsed;
|
|
7736
|
-
}
|
|
7737
|
-
|
|
7834
|
+
};
|
|
7835
|
+
var formatTrackingError = (error) => {
|
|
7738
7836
|
return error instanceof Error ? error.message : String(error);
|
|
7739
|
-
}
|
|
7740
|
-
|
|
7837
|
+
};
|
|
7838
|
+
var resolveTrackedRunId2 = () => {
|
|
7741
7839
|
const fromEnv = process.env.PM_BACKGROUND_TEST_RUN_ID?.trim();
|
|
7742
7840
|
if (fromEnv && fromEnv.length > 0) {
|
|
7743
7841
|
return fromEnv;
|
|
7744
7842
|
}
|
|
7745
7843
|
return `test-all-local-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
7746
|
-
}
|
|
7747
|
-
|
|
7844
|
+
};
|
|
7845
|
+
var normalizeCommand = (command) => {
|
|
7748
7846
|
return command.trim().replaceAll(/\s+/g, " ");
|
|
7749
|
-
}
|
|
7750
|
-
|
|
7847
|
+
};
|
|
7848
|
+
var normalizeEnvSetSignature = (value) => {
|
|
7751
7849
|
if (!value || Object.keys(value).length === 0) {
|
|
7752
7850
|
return "{}";
|
|
7753
7851
|
}
|
|
7754
7852
|
return JSON.stringify(Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right))));
|
|
7755
|
-
}
|
|
7756
|
-
|
|
7853
|
+
};
|
|
7854
|
+
var normalizeEnvClearSignature = (value) => {
|
|
7757
7855
|
if (!value || value.length === 0) {
|
|
7758
7856
|
return "[]";
|
|
7759
7857
|
}
|
|
7760
7858
|
return JSON.stringify([...value].sort((left, right) => left.localeCompare(right)));
|
|
7761
|
-
}
|
|
7762
|
-
|
|
7859
|
+
};
|
|
7860
|
+
var normalizePmContextModeSignature = (value) => {
|
|
7763
7861
|
const normalized = value?.trim().toLowerCase();
|
|
7764
7862
|
return normalized && normalized.length > 0 ? normalized : "none";
|
|
7765
|
-
}
|
|
7766
|
-
|
|
7863
|
+
};
|
|
7864
|
+
var normalizeAssertionStrings = (values) => [...new Set(values ?? [])].sort((left, right) => left.localeCompare(right));
|
|
7865
|
+
var normalizeAssertionMap = (value) => Object.fromEntries(Object.entries(value ?? {}).sort(([left], [right]) => left.localeCompare(right)));
|
|
7866
|
+
var normalizeAssertionLineCount = (value) => typeof value === "number" ? value : void 0;
|
|
7867
|
+
var normalizeAssertionSignature = (test) => {
|
|
7767
7868
|
const normalized = {
|
|
7768
|
-
assert_stdout_contains:
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
assert_stderr_regex: [...new Set(test.assert_stderr_regex ?? [])].sort((left, right) => left.localeCompare(right)),
|
|
7776
|
-
assert_stdout_min_lines: typeof test.assert_stdout_min_lines === "number" ? test.assert_stdout_min_lines : void 0,
|
|
7777
|
-
assert_json_field_equals: Object.fromEntries(Object.entries(test.assert_json_field_equals ?? {}).sort(([left], [right]) => left.localeCompare(right))),
|
|
7778
|
-
assert_json_field_gte: Object.fromEntries(Object.entries(test.assert_json_field_gte ?? {}).sort(([left], [right]) => left.localeCompare(right)))
|
|
7869
|
+
assert_stdout_contains: normalizeAssertionStrings(test.assert_stdout_contains),
|
|
7870
|
+
assert_stdout_regex: normalizeAssertionStrings(test.assert_stdout_regex),
|
|
7871
|
+
assert_stderr_contains: normalizeAssertionStrings(test.assert_stderr_contains),
|
|
7872
|
+
assert_stderr_regex: normalizeAssertionStrings(test.assert_stderr_regex),
|
|
7873
|
+
assert_stdout_min_lines: normalizeAssertionLineCount(test.assert_stdout_min_lines),
|
|
7874
|
+
assert_json_field_equals: normalizeAssertionMap(test.assert_json_field_equals),
|
|
7875
|
+
assert_json_field_gte: normalizeAssertionMap(test.assert_json_field_gte)
|
|
7779
7876
|
};
|
|
7780
7877
|
return JSON.stringify(normalized);
|
|
7781
|
-
}
|
|
7782
|
-
|
|
7783
|
-
const command = test.command
|
|
7784
|
-
if (command
|
|
7785
|
-
|
|
7786
|
-
const envClear = normalizeEnvClearSignature(test.env_clear);
|
|
7787
|
-
const pmContextMode = normalizePmContextModeSignature(test.pm_context_mode);
|
|
7788
|
-
const sharedHostSafe = test.shared_host_safe === true ? "true" : "false";
|
|
7789
|
-
const assertions = normalizeAssertionSignature(test);
|
|
7790
|
-
return `command:${test.scope}:${normalizeCommand(command)}:${envSet}:${envClear}:${pmContextMode}:${sharedHostSafe}:${assertions}`;
|
|
7878
|
+
};
|
|
7879
|
+
var resolveLinkedTestTargetSignature = (test) => {
|
|
7880
|
+
const command = resolveOptionalEnvironmentValue(test.command);
|
|
7881
|
+
if (command !== void 0) {
|
|
7882
|
+
return `command:${test.scope}:${normalizeCommand(command)}`;
|
|
7791
7883
|
}
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7884
|
+
return `path:${test.scope}:${resolveOptionalEnvironmentValue(test.path) ?? ""}`;
|
|
7885
|
+
};
|
|
7886
|
+
var buildLinkedTestKey = (test) => {
|
|
7887
|
+
const envSet = normalizeEnvSetSignature(test.env_set);
|
|
7888
|
+
const envClear = normalizeEnvClearSignature(test.env_clear);
|
|
7889
|
+
const pmContextMode = normalizePmContextModeSignature(test.pm_context_mode);
|
|
7890
|
+
const sharedHostSafe = test.shared_host_safe === true ? "true" : "false";
|
|
7891
|
+
const assertions = normalizeAssertionSignature(test);
|
|
7892
|
+
return `${resolveLinkedTestTargetSignature(test)}:${envSet}:${envClear}:${pmContextMode}:${sharedHostSafe}:${assertions}`;
|
|
7893
|
+
};
|
|
7894
|
+
var maxTimeoutSeconds = (current, candidate) => {
|
|
7796
7895
|
if (candidate === void 0) {
|
|
7797
7896
|
return current;
|
|
7798
7897
|
}
|
|
@@ -7800,8 +7899,8 @@ function maxTimeoutSeconds(current, candidate) {
|
|
|
7800
7899
|
return candidate;
|
|
7801
7900
|
}
|
|
7802
7901
|
return current;
|
|
7803
|
-
}
|
|
7804
|
-
|
|
7902
|
+
};
|
|
7903
|
+
var countStatuses = (runResults) => {
|
|
7805
7904
|
let passed = 0;
|
|
7806
7905
|
let failed = 0;
|
|
7807
7906
|
let skipped = 0;
|
|
@@ -7817,13 +7916,13 @@ function countStatuses(runResults) {
|
|
|
7817
7916
|
skipped += 1;
|
|
7818
7917
|
}
|
|
7819
7918
|
return { passed, failed, skipped };
|
|
7820
|
-
}
|
|
7821
|
-
|
|
7919
|
+
};
|
|
7920
|
+
var mergeFailureCategoryCounts = (target, source) => {
|
|
7822
7921
|
for (const [key, value] of Object.entries(source)) {
|
|
7823
7922
|
target[key] += value;
|
|
7824
7923
|
}
|
|
7825
|
-
}
|
|
7826
|
-
|
|
7924
|
+
};
|
|
7925
|
+
var emitTestAllProgress = (options, message) => {
|
|
7827
7926
|
if (options.progress !== true) {
|
|
7828
7927
|
return;
|
|
7829
7928
|
}
|
|
@@ -7832,8 +7931,8 @@ function emitTestAllProgress(options, message) {
|
|
|
7832
7931
|
`);
|
|
7833
7932
|
} catch {
|
|
7834
7933
|
}
|
|
7835
|
-
}
|
|
7836
|
-
async
|
|
7934
|
+
};
|
|
7935
|
+
var collectTestAllItemTests = async (filteredItems, global, pmRoot) => {
|
|
7837
7936
|
const itemTests = [];
|
|
7838
7937
|
let linkedTests = 0;
|
|
7839
7938
|
for (const item of filteredItems) {
|
|
@@ -7845,8 +7944,8 @@ async function collectTestAllItemTests(filteredItems, global, pmRoot) {
|
|
|
7845
7944
|
itemTests.push({ item, tests: readResult.tests });
|
|
7846
7945
|
}
|
|
7847
7946
|
return { itemTests, linkedTests };
|
|
7848
|
-
}
|
|
7849
|
-
async
|
|
7947
|
+
};
|
|
7948
|
+
var selectTestAllItems = async (params) => {
|
|
7850
7949
|
const statusRegistry = resolveRuntimeStatusRegistry(params.settings.schema);
|
|
7851
7950
|
const typeRegistry = resolveItemTypeRegistry(params.settings, getActiveExtensionRegistrations());
|
|
7852
7951
|
const statusFilter = parseStatus(params.options.status, statusRegistry);
|
|
@@ -7856,8 +7955,8 @@ async function selectTestAllItems(params) {
|
|
|
7856
7955
|
const statusFilteredItems = allItems.filter((item) => statusFilter ? item.status === statusFilter : true).sort((a, b) => a.id.localeCompare(b.id));
|
|
7857
7956
|
const filteredItems = limitFilter === void 0 ? statusFilteredItems.slice(offsetFilter) : statusFilteredItems.slice(offsetFilter, offsetFilter + limitFilter);
|
|
7858
7957
|
return { filteredItems, statusFilter, limitFilter, offsetFilter };
|
|
7859
|
-
}
|
|
7860
|
-
|
|
7958
|
+
};
|
|
7959
|
+
var buildEffectiveTimeoutByKey = (itemTests) => {
|
|
7861
7960
|
const effectiveTimeoutByKey = /* @__PURE__ */ new Map();
|
|
7862
7961
|
for (const { tests } of itemTests) {
|
|
7863
7962
|
for (const test of tests) {
|
|
@@ -7870,8 +7969,8 @@ function buildEffectiveTimeoutByKey(itemTests) {
|
|
|
7870
7969
|
}
|
|
7871
7970
|
}
|
|
7872
7971
|
return effectiveTimeoutByKey;
|
|
7873
|
-
}
|
|
7874
|
-
async
|
|
7972
|
+
};
|
|
7973
|
+
var runTestAllItem = async (entry, context) => {
|
|
7875
7974
|
const testsToRun = [];
|
|
7876
7975
|
const keyedTests = entry.tests.map((test) => {
|
|
7877
7976
|
const key = buildLinkedTestKey(test);
|
|
@@ -7932,12 +8031,18 @@ async function runTestAllItem(entry, context) {
|
|
|
7932
8031
|
failure_categories: failureCategories
|
|
7933
8032
|
}
|
|
7934
8033
|
};
|
|
7935
|
-
}
|
|
7936
|
-
|
|
8034
|
+
};
|
|
8035
|
+
var trackedRunFailed = (summary, options) => [
|
|
8036
|
+
summary.failed > 0,
|
|
8037
|
+
options.failOnSkipped === true && summary.skipped > 0
|
|
8038
|
+
].includes(true);
|
|
8039
|
+
var optionalTrue = (value) => value ? true : void 0;
|
|
8040
|
+
var appendTestAllItemTracking = async (entry, summary, context) => {
|
|
7937
8041
|
if (!context.trackingEnabled) {
|
|
7938
8042
|
return [];
|
|
7939
8043
|
}
|
|
7940
8044
|
try {
|
|
8045
|
+
const failed = trackedRunFailed(summary, context.options);
|
|
7941
8046
|
await appendTrackedTestRunSummary({
|
|
7942
8047
|
pmRoot: context.pmRoot,
|
|
7943
8048
|
settings: context.settings,
|
|
@@ -7947,7 +8052,7 @@ async function appendTestAllItemTracking(entry, summary, context) {
|
|
|
7947
8052
|
entry: {
|
|
7948
8053
|
run_id: context.trackingRunId,
|
|
7949
8054
|
kind: "test-all",
|
|
7950
|
-
status:
|
|
8055
|
+
status: failed ? "failed" : "passed",
|
|
7951
8056
|
started_at: context.runStartedAt,
|
|
7952
8057
|
finished_at: nowIso(),
|
|
7953
8058
|
recorded_at: nowIso(),
|
|
@@ -7958,7 +8063,7 @@ async function appendTestAllItemTracking(entry, summary, context) {
|
|
|
7958
8063
|
skipped: summary.skipped,
|
|
7959
8064
|
items: 1,
|
|
7960
8065
|
linked_tests: entry.tests.length,
|
|
7961
|
-
fail_on_skipped_triggered: context.options.failOnSkipped === true && summary.skipped > 0
|
|
8066
|
+
fail_on_skipped_triggered: optionalTrue(context.options.failOnSkipped === true && summary.skipped > 0)
|
|
7962
8067
|
}
|
|
7963
8068
|
});
|
|
7964
8069
|
} catch (error) {
|
|
@@ -7967,11 +8072,17 @@ async function appendTestAllItemTracking(entry, summary, context) {
|
|
|
7967
8072
|
];
|
|
7968
8073
|
}
|
|
7969
8074
|
return [];
|
|
7970
|
-
}
|
|
7971
|
-
|
|
7972
|
-
const
|
|
7973
|
-
const
|
|
7974
|
-
|
|
8075
|
+
};
|
|
8076
|
+
var resolveTrackingAttempt = () => {
|
|
8077
|
+
const raw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();
|
|
8078
|
+
const parsed = raw ? Number.parseInt(raw, 10) : Number.NaN;
|
|
8079
|
+
return Number.isFinite(parsed) && parsed >= 1 ? parsed : void 0;
|
|
8080
|
+
};
|
|
8081
|
+
var resolveOptionalEnvironmentValue = (value) => {
|
|
8082
|
+
const trimmed = value?.trim();
|
|
8083
|
+
return trimmed && trimmed.length > 0 ? trimmed : void 0;
|
|
8084
|
+
};
|
|
8085
|
+
var buildTestAllItemRunContext = (params) => {
|
|
7975
8086
|
return {
|
|
7976
8087
|
pmRoot: params.pmRoot,
|
|
7977
8088
|
settings: params.settings,
|
|
@@ -7986,12 +8097,12 @@ function buildTestAllItemRunContext(params) {
|
|
|
7986
8097
|
trackingEnabled: params.settings.testing.record_results_to_items === true,
|
|
7987
8098
|
trackingAuthor: resolveAuthor(void 0, params.settings.author_default),
|
|
7988
8099
|
trackingRunId: resolveTrackedRunId2(),
|
|
7989
|
-
trackingAttempt:
|
|
7990
|
-
trackingResumedFrom:
|
|
8100
|
+
trackingAttempt: resolveTrackingAttempt(),
|
|
8101
|
+
trackingResumedFrom: resolveOptionalEnvironmentValue(process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM),
|
|
7991
8102
|
runStartedAt: params.runStartedAt
|
|
7992
8103
|
};
|
|
7993
|
-
}
|
|
7994
|
-
|
|
8104
|
+
};
|
|
8105
|
+
var initializeTestAllAccumulation = (options, linkedTests, filteredItems) => {
|
|
7995
8106
|
const accumulation = {
|
|
7996
8107
|
results: [],
|
|
7997
8108
|
passed: 0,
|
|
@@ -8007,8 +8118,8 @@ function initializeTestAllAccumulation(options, linkedTests, filteredItems) {
|
|
|
8007
8118
|
accumulation.trackingWarnings.push(`empty_linked_test_selection:items=${filteredItems.length};linked_tests=0;fail_on_empty_test_run=true`);
|
|
8008
8119
|
}
|
|
8009
8120
|
return { accumulation, failOnEmptyTestRunTriggered };
|
|
8010
|
-
}
|
|
8011
|
-
async
|
|
8121
|
+
};
|
|
8122
|
+
var runTestAllItems = async (itemTests, context, accumulation) => {
|
|
8012
8123
|
for (const [itemIndex, entry] of itemTests.entries()) {
|
|
8013
8124
|
emitTestAllProgress(context.options, `item ${itemIndex + 1}/${itemTests.length} start id=${entry.item.id} linked_tests=${entry.tests.length}`);
|
|
8014
8125
|
const execution = await runTestAllItem(entry, context);
|
|
@@ -8020,16 +8131,16 @@ async function runTestAllItems(itemTests, context, accumulation) {
|
|
|
8020
8131
|
accumulation.results.push(execution.result);
|
|
8021
8132
|
emitTestAllProgress(context.options, `item ${itemIndex + 1}/${itemTests.length} end id=${entry.item.id} status=${execution.failed === 0 ? "passed" : "failed"} passed=${execution.passed} failed=${execution.failed} skipped=${execution.skipped}`);
|
|
8022
8133
|
}
|
|
8023
|
-
}
|
|
8024
|
-
|
|
8134
|
+
};
|
|
8135
|
+
var appendContextPreflightWarning = (options, accumulation) => {
|
|
8025
8136
|
if (options.checkContext !== true) {
|
|
8026
8137
|
return;
|
|
8027
8138
|
}
|
|
8028
8139
|
const allRunResults = accumulation.results.flatMap((entry) => entry.run_results);
|
|
8029
8140
|
const preflight = summarizeContextPreflight(allRunResults);
|
|
8030
8141
|
accumulation.trackingWarnings.push(`context_preflight:checked_pm_commands=${preflight.checked_pm_commands};tracker_read_commands=${preflight.tracker_read_commands};mismatches=${preflight.mismatches};auto_remediated=${preflight.auto_remediated}`);
|
|
8031
|
-
}
|
|
8032
|
-
|
|
8142
|
+
};
|
|
8143
|
+
var buildTestAllResult = (params) => {
|
|
8033
8144
|
return {
|
|
8034
8145
|
ok: params.ok,
|
|
8035
8146
|
totals: {
|
|
@@ -8048,43 +8159,77 @@ function buildTestAllResult(params) {
|
|
|
8048
8159
|
warnings: params.accumulation.trackingWarnings.length > 0 ? params.accumulation.trackingWarnings : void 0,
|
|
8049
8160
|
results: params.accumulation.results
|
|
8050
8161
|
};
|
|
8051
|
-
}
|
|
8052
|
-
|
|
8162
|
+
};
|
|
8163
|
+
var buildTestAllSelectionProgress = (params) => [
|
|
8164
|
+
`selection items=${params.filteredItems.length}`,
|
|
8165
|
+
`linked_tests=${params.linkedTests}`,
|
|
8166
|
+
params.statusFilter === void 0 ? "" : `status=${params.statusFilter}`,
|
|
8167
|
+
params.limitFilter === void 0 ? "" : `limit=${params.limitFilter}`,
|
|
8168
|
+
params.offsetFilter > 0 ? `offset=${params.offsetFilter}` : ""
|
|
8169
|
+
].filter((entry) => entry.length > 0).join(" ");
|
|
8170
|
+
var prepareTestAllRun = async (options, global) => {
|
|
8053
8171
|
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
8054
8172
|
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
8055
8173
|
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
8056
8174
|
}
|
|
8057
8175
|
const settings = await readSettings(pmRoot);
|
|
8058
|
-
const
|
|
8176
|
+
const selection = await selectTestAllItems({ pmRoot, settings, options });
|
|
8059
8177
|
const defaultTimeoutSeconds = parseTimeout(options.timeout);
|
|
8060
8178
|
const runStartedAt = nowIso();
|
|
8061
|
-
const
|
|
8062
|
-
emitTestAllProgress(options,
|
|
8063
|
-
|
|
8064
|
-
|
|
8179
|
+
const collected = await collectTestAllItemTests(selection.filteredItems, global, pmRoot);
|
|
8180
|
+
emitTestAllProgress(options, buildTestAllSelectionProgress({
|
|
8181
|
+
...selection,
|
|
8182
|
+
linkedTests: collected.linkedTests
|
|
8183
|
+
}));
|
|
8184
|
+
return {
|
|
8065
8185
|
pmRoot,
|
|
8066
8186
|
settings,
|
|
8067
|
-
|
|
8068
|
-
itemTests,
|
|
8187
|
+
filteredItems: selection.filteredItems,
|
|
8188
|
+
itemTests: collected.itemTests,
|
|
8189
|
+
linkedTests: collected.linkedTests,
|
|
8069
8190
|
defaultTimeoutSeconds,
|
|
8070
8191
|
runStartedAt
|
|
8192
|
+
};
|
|
8193
|
+
};
|
|
8194
|
+
var resolveTestAllOutcome = (params) => {
|
|
8195
|
+
const failOnSkippedTriggered = params.options.failOnSkipped === true && params.accumulation.skipped > 0;
|
|
8196
|
+
const ok = ![
|
|
8197
|
+
params.accumulation.failed > 0,
|
|
8198
|
+
failOnSkippedTriggered,
|
|
8199
|
+
params.failOnEmptyTestRunTriggered
|
|
8200
|
+
].includes(true);
|
|
8201
|
+
return { failOnSkippedTriggered, ok };
|
|
8202
|
+
};
|
|
8203
|
+
var runTestAll = async (options, global) => {
|
|
8204
|
+
const prepared = await prepareTestAllRun(options, global);
|
|
8205
|
+
const { accumulation, failOnEmptyTestRunTriggered } = initializeTestAllAccumulation(options, prepared.linkedTests, prepared.filteredItems);
|
|
8206
|
+
const itemRunContext = buildTestAllItemRunContext({
|
|
8207
|
+
pmRoot: prepared.pmRoot,
|
|
8208
|
+
settings: prepared.settings,
|
|
8209
|
+
options,
|
|
8210
|
+
itemTests: prepared.itemTests,
|
|
8211
|
+
defaultTimeoutSeconds: prepared.defaultTimeoutSeconds,
|
|
8212
|
+
runStartedAt: prepared.runStartedAt
|
|
8071
8213
|
});
|
|
8072
|
-
await runTestAllItems(itemTests, itemRunContext, accumulation);
|
|
8073
|
-
const failOnSkippedTriggered = options.failOnSkipped === true && accumulation.skipped > 0;
|
|
8214
|
+
await runTestAllItems(prepared.itemTests, itemRunContext, accumulation);
|
|
8074
8215
|
appendContextPreflightWarning(options, accumulation);
|
|
8075
|
-
const
|
|
8076
|
-
|
|
8216
|
+
const outcome = resolveTestAllOutcome({
|
|
8217
|
+
options,
|
|
8218
|
+
accumulation,
|
|
8219
|
+
failOnEmptyTestRunTriggered
|
|
8220
|
+
});
|
|
8221
|
+
emitTestAllProgress(options, `end status=${outcome.ok ? "passed" : "failed"} items=${prepared.filteredItems.length} linked_tests=${prepared.linkedTests} passed=${accumulation.passed} failed=${accumulation.failed} skipped=${accumulation.skipped}`);
|
|
8077
8222
|
return buildTestAllResult({
|
|
8078
|
-
ok,
|
|
8079
|
-
filteredItems,
|
|
8080
|
-
linkedTests,
|
|
8223
|
+
ok: outcome.ok,
|
|
8224
|
+
filteredItems: prepared.filteredItems,
|
|
8225
|
+
linkedTests: prepared.linkedTests,
|
|
8081
8226
|
accumulation,
|
|
8082
|
-
failOnSkippedTriggered,
|
|
8227
|
+
failOnSkippedTriggered: outcome.failOnSkippedTriggered,
|
|
8083
8228
|
failOnEmptyTestRunTriggered
|
|
8084
8229
|
});
|
|
8085
|
-
}
|
|
8230
|
+
};
|
|
8086
8231
|
|
|
8087
|
-
// dist/
|
|
8232
|
+
// dist/sdk/test/runs.js
|
|
8088
8233
|
import os from "node:os";
|
|
8089
8234
|
|
|
8090
8235
|
// dist/core/test/background-runs.js
|
|
@@ -8919,7 +9064,7 @@ async function readBackgroundTestRunLogs(pmRoot, runId, stream, tail) {
|
|
|
8919
9064
|
};
|
|
8920
9065
|
}
|
|
8921
9066
|
|
|
8922
|
-
// dist/
|
|
9067
|
+
// dist/sdk/test/runs.js
|
|
8923
9068
|
var BACKGROUND_STATUS_VALUES = [
|
|
8924
9069
|
"queued",
|
|
8925
9070
|
"running",
|
|
@@ -11269,7 +11414,14 @@ export {
|
|
|
11269
11414
|
runEvent,
|
|
11270
11415
|
runRemind,
|
|
11271
11416
|
runStats,
|
|
11417
|
+
TELEMETRY_SUBCOMMANDS,
|
|
11272
11418
|
runTelemetry,
|
|
11419
|
+
extractReferencedPmItemIdsFromCommand,
|
|
11420
|
+
summarizeContextPreflight,
|
|
11421
|
+
classifyLinkedTestFailure,
|
|
11422
|
+
countFailureCategories,
|
|
11423
|
+
resolveLinkedTestFailureExitCode,
|
|
11424
|
+
runLinkedTests,
|
|
11273
11425
|
runTest,
|
|
11274
11426
|
runTestAll,
|
|
11275
11427
|
runStartBackgroundRun,
|
|
@@ -11283,6 +11435,6 @@ export {
|
|
|
11283
11435
|
runValidate,
|
|
11284
11436
|
runValidate2
|
|
11285
11437
|
};
|
|
11286
|
-
//# sourceMappingURL=chunk-
|
|
11438
|
+
//# sourceMappingURL=chunk-6VHUGVNP.js.map
|
|
11287
11439
|
|
|
11288
|
-
//# debugId=
|
|
11440
|
+
//# debugId=85084307-fe97-5ecd-bfa8-3c803663a33c
|