@unbrained/pm-cli 2026.6.23 → 2026.6.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +120 -0
- package/CONTRIBUTING.md +30 -0
- package/README.md +16 -3
- package/dist/cli/commander-usage.js +3 -3
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.js +8 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/close.d.ts +2 -4
- package/dist/cli/commands/close.js +5 -17
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +158 -9
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +1 -1
- package/dist/cli/commands/config.js +2 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +31 -4
- package/dist/cli/commands/context.js +33 -10
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +48 -8
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -6
- package/dist/cli/commands/create.js +10 -155
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +15 -0
- package/dist/cli/commands/extension/describe.js +48 -2
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +5 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +37 -7
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +31 -8
- package/dist/cli/commands/extension/scaffold.js +1956 -182
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +22 -2
- package/dist/cli/commands/extension.js +189 -13
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/item-filter-options.d.ts +63 -0
- package/dist/cli/commands/item-filter-options.js +10 -0
- package/dist/cli/commands/item-filter-options.js.map +1 -0
- package/dist/cli/commands/legacy-none-tokens.d.ts +14 -0
- package/dist/cli/commands/legacy-none-tokens.js +31 -2
- package/dist/cli/commands/legacy-none-tokens.js.map +1 -1
- package/dist/cli/commands/linked-artifacts.d.ts +7 -0
- package/dist/cli/commands/linked-artifacts.js +12 -2
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/list.d.ts +16 -39
- package/dist/cli/commands/list.js +127 -118
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.d.ts +98 -0
- package/dist/cli/commands/next.js +304 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/profile.d.ts +208 -0
- package/dist/cli/commands/profile.js +418 -0
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +12 -13
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -0
- package/dist/cli/commands/schema.js +9 -3
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +2 -39
- package/dist/cli/commands/search.js +104 -106
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/shared-unset-fields.d.ts +30 -0
- package/dist/cli/commands/shared-unset-fields.js +161 -0
- package/dist/cli/commands/shared-unset-fields.js.map +1 -0
- package/dist/cli/commands/stats.js +15 -3
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/test.js +9 -5
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -6
- package/dist/cli/commands/update.js +12 -157
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +20 -5
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/help-content.js +26 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.js +3 -3
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +27 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +42 -3
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +86 -2
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +67 -6
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +9 -1
- package/dist/cli/registration-helpers.js +34 -3
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-EJBMXUBH.js +16 -0
- package/dist/cli-bundle/chunks/{activity-H2LMOSSW.js → activity-MVSEND6D.js} +9 -11
- package/dist/cli-bundle/chunks/{aggregate-R725FC3S.js → aggregate-MOC4TR2G.js} +16 -17
- package/dist/cli-bundle/chunks/aggregate-MOC4TR2G.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-EGJLZQBI.js → aggregate-XJHLZQ5X.js} +15 -16
- package/dist/cli-bundle/chunks/aggregate-XJHLZQ5X.js.map +7 -0
- package/dist/cli-bundle/chunks/{append-5J345QGU.js → append-KDHT4GHI.js} +10 -12
- package/dist/cli-bundle/chunks/{append-5J345QGU.js.map → append-KDHT4GHI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-O5HPBMRN.js → append-LEDBAM3K.js} +8 -10
- package/dist/cli-bundle/chunks/{append-O5HPBMRN.js.map → append-LEDBAM3K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IB3GYLQE.js → chunk-3JWQCLR5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2A34E3BA.js → chunk-4TXTVZL3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G6N5VEOK.js → chunk-4YIMPANT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7AUB5HNA.js → chunk-53ARXF2O.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-7AUB5HNA.js.map → chunk-53ARXF2O.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-5ABGFWR4.js +116 -0
- package/dist/cli-bundle/chunks/chunk-5ABGFWR4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2BFPAUAF.js → chunk-5IRVSKPS.js} +2990 -2890
- package/dist/cli-bundle/chunks/chunk-5IRVSKPS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JR2LV3M4.js → chunk-5T6WPLRO.js} +233 -190
- package/dist/cli-bundle/chunks/chunk-5T6WPLRO.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CKGNPJAG.js → chunk-6T5ZIWBS.js} +3011 -2888
- package/dist/cli-bundle/chunks/chunk-6T5ZIWBS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QH3PJYON.js → chunk-6YRAMXRS.js} +111 -114
- package/dist/cli-bundle/chunks/chunk-6YRAMXRS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7XGQXHFB.js → chunk-73PTKMAE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-Y4SUQQYH.js → chunk-74PUWBGN.js} +53 -54
- package/dist/cli-bundle/chunks/chunk-74PUWBGN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-T5472OMV.js → chunk-7L6TXOOC.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-T5472OMV.js.map → chunk-7L6TXOOC.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js +17 -0
- package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3VY3YQO6.js → chunk-7RIJGN4R.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G6PYHBBR.js → chunk-7WDETKGP.js} +192 -113
- package/dist/cli-bundle/chunks/chunk-7WDETKGP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AONIHR2C.js → chunk-A3UNLXNJ.js} +40 -260
- package/dist/cli-bundle/chunks/chunk-A3UNLXNJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4KD54S3Z.js → chunk-AWN4PPH5.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-4KD54S3Z.js.map → chunk-AWN4PPH5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-FXR67XVQ.js → chunk-BN3CWK6G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KFWBJPSG.js → chunk-BOWQWXLI.js} +12 -24
- package/dist/cli-bundle/chunks/chunk-BOWQWXLI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4BHT5VDC.js → chunk-C2KCIZKZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O6LLO73I.js → chunk-CHRNYKNI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UELRKQQU.js → chunk-CY5IJMUM.js} +1239 -495
- package/dist/cli-bundle/chunks/chunk-CY5IJMUM.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CZVISY5A.js +87 -0
- package/dist/cli-bundle/chunks/chunk-CZVISY5A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7K2XXO4I.js → chunk-D5LYZVGB.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-7K2XXO4I.js.map → chunk-D5LYZVGB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZQ3ZVXX2.js → chunk-D6USKAMA.js} +2 -2
- package/dist/cli-bundle/chunks/{context-BLBD3PUB.js → chunk-DJDXAU74.js} +19 -21
- package/dist/cli-bundle/chunks/chunk-DJDXAU74.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WZQWHN4R.js → chunk-DLDCPF5X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-HFFUQR73.js → chunk-DORJSBGJ.js} +35 -9
- package/dist/cli-bundle/chunks/chunk-DORJSBGJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XVF4YARA.js → chunk-DRPF274X.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-XVF4YARA.js.map → chunk-DRPF274X.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QL5RVYOA.js → chunk-DU66JUGT.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-DU66JUGT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UVC5LOR7.js → chunk-E2Q2ULMR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-U2Z5YUSO.js → chunk-EVWYAG46.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-U2Z5YUSO.js.map → chunk-EVWYAG46.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5VOINNKT.js → chunk-F6VH3LFC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VFAQ4LMN.js → chunk-F7G53BOA.js} +18 -11
- package/dist/cli-bundle/chunks/chunk-F7G53BOA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Q2KNGP7C.js → chunk-FBZ5XAAF.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-Q2KNGP7C.js.map → chunk-FBZ5XAAF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-H4IIJDE4.js → chunk-FDEVKXC4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7UGEAPRY.js → chunk-GF7EAR22.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-7UGEAPRY.js.map → chunk-GF7EAR22.js.map} +1 -1
- package/dist/cli-bundle/chunks/{context-DHLVPXN3.js → chunk-HIBK6H4S.js} +20 -22
- package/dist/cli-bundle/chunks/chunk-HIBK6H4S.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-34EONI5F.js → chunk-HUYYMTGW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js +14 -0
- package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BB6MDVNQ.js → chunk-IBU2LLWM.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-BB6MDVNQ.js.map → chunk-IBU2LLWM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-55ISXAQH.js → chunk-IDYCAK35.js} +53 -54
- package/dist/cli-bundle/chunks/chunk-IDYCAK35.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M4T5DXD5.js → chunk-IF4ERU6A.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-M4T5DXD5.js.map → chunk-IF4ERU6A.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CIIK67GW.js → chunk-IHXXUIXS.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js +2459 -0
- package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SBQTAVJZ.js → chunk-JIP67N2K.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-JJ4SG243.js +119 -0
- package/dist/cli-bundle/chunks/chunk-JJ4SG243.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TQZH6OD6.js → chunk-JTRKME24.js} +11 -13
- package/dist/cli-bundle/chunks/{chunk-TQZH6OD6.js.map → chunk-JTRKME24.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WBRKK5QR.js → chunk-JVQ7UOYC.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-WBRKK5QR.js.map → chunk-JVQ7UOYC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KQMUV6LX.js → chunk-JZG5ADVE.js} +191 -98
- package/dist/cli-bundle/chunks/chunk-JZG5ADVE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-46G6RSB6.js → chunk-K46GQ265.js} +17 -15
- package/dist/cli-bundle/chunks/chunk-K46GQ265.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5UVVASSA.js → chunk-KGQ3W65B.js} +100 -35
- package/dist/cli-bundle/chunks/chunk-KGQ3W65B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2T3JG6V4.js → chunk-KRASIL6M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SR3EKWZG.js → chunk-KTMMTOIP.js} +127 -127
- package/dist/cli-bundle/chunks/chunk-KTMMTOIP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DT5LPYOD.js → chunk-KYDYQMNW.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-DT5LPYOD.js.map → chunk-KYDYQMNW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IPKJ6B36.js → chunk-LBH7UYKY.js} +106 -34
- package/dist/cli-bundle/chunks/chunk-LBH7UYKY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-P77P2ILI.js → chunk-MLHX6DN5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YUDJD3XO.js → chunk-NIBP3I7A.js} +36 -10
- package/dist/cli-bundle/chunks/chunk-NIBP3I7A.js.map +1 -0
- package/dist/cli-bundle/chunks/{schema-RBTJ2YXW.js → chunk-NO6Y6FB2.js} +144 -67
- package/dist/cli-bundle/chunks/chunk-NO6Y6FB2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2CKH2LMV.js → chunk-OB3RJV5F.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js +379 -0
- package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FIGAZ4Y7.js → chunk-OUQ5JEFM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NK3UPBVG.js → chunk-QE5UFCCO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MJTINN54.js → chunk-RM6MHL6A.js} +110 -113
- package/dist/cli-bundle/chunks/chunk-RM6MHL6A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LRKKONT2.js → chunk-RPRW26NG.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-LRKKONT2.js.map → chunk-RPRW26NG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WM5ZVBPE.js → chunk-SJZTPVFT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MJTSZKK5.js → chunk-SNUK7H5J.js} +1363 -605
- package/dist/cli-bundle/chunks/chunk-SNUK7H5J.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js +2435 -0
- package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-W72GHSJE.js → chunk-TQ6E76BE.js} +11 -13
- package/dist/cli-bundle/chunks/{chunk-W72GHSJE.js.map → chunk-TQ6E76BE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZRK4O56R.js → chunk-UB3V5WUI.js} +225 -189
- package/dist/cli-bundle/chunks/chunk-UB3V5WUI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SKN7LC5W.js → chunk-UFKNF23C.js} +11 -23
- package/dist/cli-bundle/chunks/chunk-UFKNF23C.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VAYA4XFX.js → chunk-V3KLX7U7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GAJVRGGA.js → chunk-VD3LKZFX.js} +41 -254
- package/dist/cli-bundle/chunks/chunk-VD3LKZFX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AD3A7ZD6.js → chunk-VMY7MZEM.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-AD3A7ZD6.js.map → chunk-VMY7MZEM.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js +382 -0
- package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CE5P2NQR.js → chunk-WFJZDUM7.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-WFJZDUM7.js.map +1 -0
- package/dist/cli-bundle/chunks/{schema-MNTAVQCY.js → chunk-WTRUDJ3R.js} +136 -66
- package/dist/cli-bundle/chunks/chunk-WTRUDJ3R.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-T72AZDBA.js → chunk-YEDFE4DC.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-T72AZDBA.js.map → chunk-YEDFE4DC.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js +84 -0
- package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-H2IP4QLJ.js → chunk-Z55WX4IQ.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-H2IP4QLJ.js.map → chunk-Z55WX4IQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-2RDVQEWV.js → chunk-Z5BM2FKQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-66MEDTUD.js → chunk-ZEATCVAC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NCVCO3NZ.js → chunk-ZFIEEDTJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7SV63ZHD.js → chunk-ZIE6WXJ2.js} +128 -128
- package/dist/cli-bundle/chunks/chunk-ZIE6WXJ2.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-4KHAA2RN.js → claim-6NINZYB3.js} +10 -12
- package/dist/cli-bundle/chunks/{claim-4KHAA2RN.js.map → claim-6NINZYB3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{claim-CSPJFLNH.js → claim-HMCLSLUE.js} +8 -10
- package/dist/cli-bundle/chunks/{claim-CSPJFLNH.js.map → claim-HMCLSLUE.js.map} +1 -1
- package/dist/cli-bundle/chunks/close-37KEHLYM.js +14 -0
- package/dist/cli-bundle/chunks/{close-W56IOGYG.js → close-OP3LK7Z2.js} +7 -8
- package/dist/cli-bundle/chunks/{close-many-BX5DCSVV.js → close-many-BFMP6HHK.js} +15 -17
- package/dist/cli-bundle/chunks/{close-many-BX5DCSVV.js.map → close-many-BFMP6HHK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{close-many-TQU5F4E4.js → close-many-CXJBOWWY.js} +17 -19
- package/dist/cli-bundle/chunks/{close-many-TQU5F4E4.js.map → close-many-CXJBOWWY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-VRECH75R.js → comments-ETHABIY6.js} +9 -11
- package/dist/cli-bundle/chunks/{comments-VRECH75R.js.map → comments-ETHABIY6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-U5KUC4EU.js → comments-MU2WMBUY.js} +11 -13
- package/dist/cli-bundle/chunks/{comments-U5KUC4EU.js.map → comments-MU2WMBUY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-D3OKQO52.js → config-FIXJZEQK.js} +18 -387
- package/dist/cli-bundle/chunks/config-FIXJZEQK.js.map +7 -0
- package/dist/cli-bundle/chunks/{config-MMJA4LLK.js → config-X3ZVCUUG.js} +18 -380
- package/dist/cli-bundle/chunks/config-X3ZVCUUG.js.map +1 -0
- package/dist/cli-bundle/chunks/context-7ZEZV3BV.js +42 -0
- package/dist/cli-bundle/chunks/context-XDI4DKKT.js +46 -0
- package/dist/cli-bundle/chunks/{contracts-XGVMMPC5.js → contracts-KP4QAGVW.js} +72 -15
- package/dist/cli-bundle/chunks/contracts-KP4QAGVW.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-C3SZCXXG.js → contracts-SMOAN5NF.js} +72 -15
- package/dist/cli-bundle/chunks/contracts-SMOAN5NF.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-HHL3K4QP.js → copy-CWM6SBY6.js} +7 -11
- package/dist/cli-bundle/chunks/{copy-HHL3K4QP.js.map → copy-CWM6SBY6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{copy-5D5DX3VK.js → copy-JJ3KOQW2.js} +9 -13
- package/dist/cli-bundle/chunks/{copy-5D5DX3VK.js.map → copy-JJ3KOQW2.js.map} +1 -1
- package/dist/cli-bundle/chunks/create-DFMNBKBS.js +28 -0
- package/dist/cli-bundle/chunks/{create-IXY43O4H.js → create-J5Q2ELZT.js} +12 -14
- package/dist/cli-bundle/chunks/{delete-IBUR3M42.js → delete-2GZLQEUQ.js} +7 -9
- package/dist/cli-bundle/chunks/{delete-IBUR3M42.js.map → delete-2GZLQEUQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-QQC2FGUH.js → delete-OOQS4KVD.js} +5 -7
- package/dist/cli-bundle/chunks/{delete-QQC2FGUH.js.map → delete-OOQS4KVD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-KWKRHXIN.js → deps-IF4IGL4R.js} +6 -9
- package/dist/cli-bundle/chunks/{deps-KWKRHXIN.js.map → deps-IF4IGL4R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-VTPO4BSE.js → deps-ZVGGCRR6.js} +8 -11
- package/dist/cli-bundle/chunks/{deps-VTPO4BSE.js.map → deps-ZVGGCRR6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-IIO3FEUO.js → docs-2TIFR62T.js} +8 -9
- package/dist/cli-bundle/chunks/{docs-IIO3FEUO.js.map → docs-2TIFR62T.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-7CHFHXLN.js → docs-NFTBCQQC.js} +10 -11
- package/dist/cli-bundle/chunks/{docs-7CHFHXLN.js.map → docs-NFTBCQQC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-IO7LREOL.js → eval-2F6EH4XN.js} +12 -14
- package/dist/cli-bundle/chunks/{eval-IO7LREOL.js.map → eval-2F6EH4XN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-CEYYEPSX.js → eval-PFKXQR3B.js} +10 -12
- package/dist/cli-bundle/chunks/{eval-CEYYEPSX.js.map → eval-PFKXQR3B.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-KCPUWSY2.js → extension-3LRYX7SW.js} +11 -7
- package/dist/cli-bundle/chunks/{extension-UTTQDUYI.js → extension-GMVOIP4O.js} +11 -7
- package/dist/cli-bundle/chunks/{files-Z2HHEFGP.js → files-DF3HO6XK.js} +11 -13
- package/dist/cli-bundle/chunks/{files-Z2HHEFGP.js.map → files-DF3HO6XK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{files-TPUL6KWB.js → files-T5ODMETM.js} +9 -11
- package/dist/cli-bundle/chunks/{files-TPUL6KWB.js.map → files-T5ODMETM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-YRNNH7IP.js → focus-DLXKK4AH.js} +10 -14
- package/dist/cli-bundle/chunks/{focus-YRNNH7IP.js.map → focus-DLXKK4AH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-JVJCGC2D.js → focus-MY5ARIEK.js} +8 -12
- package/dist/cli-bundle/chunks/{focus-JVJCGC2D.js.map → focus-MY5ARIEK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-O5GUO3SU.js → gc-FULIVYR4.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-PYVVEELM.js → gc-MDGRR2SU.js} +3 -3
- package/dist/cli-bundle/chunks/{get-X4O3HBEY.js → get-AWK324RS.js} +10 -13
- package/dist/cli-bundle/chunks/{get-X4O3HBEY.js.map → get-AWK324RS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-ENLTEGTX.js → get-VYPIICPC.js} +12 -15
- package/dist/cli-bundle/chunks/{get-ENLTEGTX.js.map → get-VYPIICPC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-5EXTY44Q.js → health-FBCVZGSX.js} +16 -17
- package/dist/cli-bundle/chunks/{health-5EXTY44Q.js.map → health-FBCVZGSX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-BOTB7YSU.js → health-Q66C43GN.js} +18 -19
- package/dist/cli-bundle/chunks/{health-BOTB7YSU.js.map → health-Q66C43GN.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-5XUSLAJA.js +18 -0
- package/dist/cli-bundle/chunks/{history-AJTXLT6S.js → history-X4OSES6K.js} +8 -10
- package/dist/cli-bundle/chunks/{history-compact-46MRHW3I.js → history-compact-2GHT32UX.js} +13 -16
- package/dist/cli-bundle/chunks/{history-compact-46MRHW3I.js.map → history-compact-2GHT32UX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-compact-43OOUAWD.js → history-compact-WLCQEKXS.js} +11 -14
- package/dist/cli-bundle/chunks/{history-compact-43OOUAWD.js.map → history-compact-WLCQEKXS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-redact-KUUUVUFM.js → history-redact-45YW65BK.js} +9 -11
- package/dist/cli-bundle/chunks/history-redact-BVHWDXPR.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-B5PZBOPU.js → history-repair-FY75IC26.js} +13 -16
- package/dist/cli-bundle/chunks/{history-repair-B5PZBOPU.js.map → history-repair-FY75IC26.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-repair-VQTYOSRS.js → history-repair-GABSDSVD.js} +11 -14
- package/dist/cli-bundle/chunks/{history-repair-VQTYOSRS.js.map → history-repair-GABSDSVD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{init-BNLVFPRG.js → init-KO7CGIRQ.js} +11 -11
- package/dist/cli-bundle/chunks/init-TRYJELH4.js +21 -0
- package/dist/cli-bundle/chunks/{learnings-MUUU5KMC.js → learnings-3F7YLI45.js} +9 -11
- package/dist/cli-bundle/chunks/{learnings-MUUU5KMC.js.map → learnings-3F7YLI45.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-XSGX52S7.js → learnings-LHZT5BHW.js} +11 -13
- package/dist/cli-bundle/chunks/{learnings-XSGX52S7.js.map → learnings-LHZT5BHW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{list-32U7BSKE.js → list-ROT7JF62.js} +10 -10
- package/dist/cli-bundle/chunks/{list-ZEEOHLTQ.js → list-Y6AU5BJS.js} +10 -10
- package/dist/cli-bundle/chunks/next-66BJB4N2.js +277 -0
- package/dist/cli-bundle/chunks/next-66BJB4N2.js.map +7 -0
- package/dist/cli-bundle/chunks/next-N5MWJTBY.js +274 -0
- package/dist/cli-bundle/chunks/next-N5MWJTBY.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-OHU25L3M.js → notes-EVJZ3VAB.js} +11 -13
- package/dist/cli-bundle/chunks/{notes-OHU25L3M.js.map → notes-EVJZ3VAB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-NJ45OZGF.js → notes-FW6YFLND.js} +9 -11
- package/dist/cli-bundle/chunks/{notes-NJ45OZGF.js.map → notes-FW6YFLND.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-LWWAEV5Y.js → plan-DQ7G4EDC.js} +15 -18
- package/dist/cli-bundle/chunks/{plan-LWWAEV5Y.js.map → plan-DQ7G4EDC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-KQA7CAKI.js → plan-ZHKZ7JVF.js} +17 -20
- package/dist/cli-bundle/chunks/{plan-KQA7CAKI.js.map → plan-ZHKZ7JVF.js.map} +1 -1
- package/dist/cli-bundle/chunks/profile-CHAW6SEA.js +1197 -0
- package/dist/cli-bundle/chunks/profile-CHAW6SEA.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-UPZGCDOG.js +1235 -0
- package/dist/cli-bundle/chunks/profile-UPZGCDOG.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-DDCHPONM.js → register-list-query-KY6Z6WV7.js} +44 -20
- package/dist/cli-bundle/chunks/register-list-query-KY6Z6WV7.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-YNPBVIKM.js → register-list-query-Y2VRHPCL.js} +45 -21
- package/dist/cli-bundle/chunks/register-list-query-Y2VRHPCL.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-LAVKYY63.js → register-mutation-N6AYSKPM.js} +103 -37
- package/dist/cli-bundle/chunks/register-mutation-N6AYSKPM.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-7ALWDDAX.js → register-mutation-PCARIGZS.js} +104 -38
- package/dist/cli-bundle/chunks/register-mutation-PCARIGZS.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-U5JAW3WE.js → register-operations-L6CYTOIH.js} +30 -32
- package/dist/cli-bundle/chunks/{register-operations-U5JAW3WE.js.map → register-operations-L6CYTOIH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-R4VOQ6EF.js → register-operations-YAT6FUUB.js} +32 -34
- package/dist/cli-bundle/chunks/{register-operations-R4VOQ6EF.js.map → register-operations-YAT6FUUB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-KBXQDCXE.js → register-setup-MPANILQF.js} +67 -24
- package/dist/cli-bundle/chunks/register-setup-MPANILQF.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-RCRUHMSZ.js → register-setup-N7UGXYJC.js} +68 -25
- package/dist/cli-bundle/chunks/register-setup-N7UGXYJC.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-6K53WOWO.js → restore-DKMCLPI5.js} +9 -11
- package/dist/cli-bundle/chunks/restore-IRAKSWIW.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-NJ5UVJFB.js → scheduling-shortcuts-3F4QUEDH.js} +14 -16
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-NJ5UVJFB.js.map → scheduling-shortcuts-3F4QUEDH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OQVJXG3M.js → scheduling-shortcuts-BNZLQK36.js} +12 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OQVJXG3M.js.map → scheduling-shortcuts-BNZLQK36.js.map} +1 -1
- package/dist/cli-bundle/chunks/schema-OLT6LVKH.js +75 -0
- package/dist/cli-bundle/chunks/schema-XJXKJQF5.js +71 -0
- package/dist/cli-bundle/chunks/{search-6HOIVZDU.js → search-CX5UMV4H.js} +10 -12
- package/dist/cli-bundle/chunks/{search-ZWYEMASC.js → search-KP6H7COV.js} +10 -12
- package/dist/cli-bundle/chunks/{stats-R5OAJVZK.js → stats-7XW4OEMK.js} +20 -12
- package/dist/cli-bundle/chunks/stats-7XW4OEMK.js.map +7 -0
- package/dist/cli-bundle/chunks/{stats-FS742AMA.js → stats-QZUG6MX5.js} +21 -13
- package/dist/cli-bundle/chunks/stats-QZUG6MX5.js.map +1 -0
- package/dist/cli-bundle/chunks/{telemetry-7DIGDQUO.js → telemetry-DIFPXCAT.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-FWEXSJLQ.js → telemetry-WTYFUPRL.js} +4 -4
- package/dist/cli-bundle/chunks/{test-NZF7OT2F.js → test-HU2BS7EY.js} +14 -16
- package/dist/cli-bundle/chunks/test-HU2BS7EY.js.map +1 -0
- package/dist/cli-bundle/chunks/test-QNDXZQCW.js +34 -0
- package/dist/cli-bundle/chunks/test-QNDXZQCW.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-all-DPN62TX7.js → test-all-PZTBLLQ6.js} +17 -20
- package/dist/cli-bundle/chunks/{test-all-DPN62TX7.js.map → test-all-PZTBLLQ6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-KL7TLMJF.js → test-all-XLPI4USF.js} +19 -22
- package/dist/cli-bundle/chunks/{test-all-KL7TLMJF.js.map → test-all-XLPI4USF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-C6CFIVOS.js → test-runs-CA6K32RD.js} +6 -7
- package/dist/cli-bundle/chunks/test-runs-CA6K32RD.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-IAJDL6CA.js → test-runs-LANLLPVO.js} +5 -6
- package/dist/cli-bundle/chunks/test-runs-LANLLPVO.js.map +7 -0
- package/dist/cli-bundle/chunks/update-DJKWLBWJ.js +28 -0
- package/dist/cli-bundle/chunks/update-DJKWLBWJ.js.map +1 -0
- package/dist/cli-bundle/chunks/update-UXDLTEOZ.js +24 -0
- package/dist/cli-bundle/chunks/update-UXDLTEOZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-YEH2DQL6.js → update-many-LU3SCNK5.js} +32 -33
- package/dist/cli-bundle/chunks/{update-many-YEH2DQL6.js.map → update-many-LU3SCNK5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-MUTIOAP3.js → update-many-VW5DGF3S.js} +34 -35
- package/dist/cli-bundle/chunks/{update-many-MUTIOAP3.js.map → update-many-VW5DGF3S.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-HYJ3SWWU.js → upgrade-77FRUAXN.js} +12 -8
- package/dist/cli-bundle/chunks/{upgrade-HYJ3SWWU.js.map → upgrade-77FRUAXN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-UBNLBZNR.js → upgrade-ICXY244R.js} +10 -6
- package/dist/cli-bundle/chunks/{upgrade-UBNLBZNR.js.map → upgrade-ICXY244R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-6QWQVCX2.js → validate-2G566PKQ.js} +37 -28
- package/dist/cli-bundle/chunks/validate-2G566PKQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-W5V5ZGQX.js → validate-BDPVXHHH.js} +38 -29
- package/dist/cli-bundle/chunks/validate-BDPVXHHH.js.map +1 -0
- package/dist/cli-bundle/main.js +56 -38
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/config/positional-value.d.ts +2 -0
- package/dist/core/config/positional-value.js +2 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/extensions/activation-summary-markdown.d.ts +71 -0
- package/dist/core/extensions/activation-summary-markdown.js +140 -0
- package/dist/core/extensions/activation-summary-markdown.js.map +1 -0
- package/dist/core/extensions/activation-summary.d.ts +2 -0
- package/dist/core/extensions/activation-summary.js +3 -2
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +1 -1
- package/dist/core/extensions/capability-usage.js +4 -3
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-registries.js +3 -2
- package/dist/core/extensions/extension-registries.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +21 -1
- package/dist/core/extensions/extension-types.js +3 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -2
- package/dist/core/extensions/loader.js +169 -103
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/version-compat.d.ts +107 -0
- package/dist/core/extensions/version-compat.js +130 -0
- package/dist/core/extensions/version-compat.js.map +1 -0
- package/dist/core/fs/fs-utils.js +27 -2
- package/dist/core/fs/fs-utils.js.map +1 -1
- package/dist/core/item/actionability.d.ts +57 -0
- package/dist/core/item/actionability.js +178 -0
- package/dist/core/item/actionability.js.map +1 -0
- package/dist/core/item/type-registry.js +18 -45
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/profile/profile-describe.d.ts +64 -0
- package/dist/core/profile/profile-describe.js +83 -0
- package/dist/core/profile/profile-describe.js.map +1 -0
- package/dist/core/profile/profile-lint.d.ts +53 -0
- package/dist/core/profile/profile-lint.js +422 -0
- package/dist/core/profile/profile-lint.js.map +1 -0
- package/dist/core/profile/profile-plan.d.ts +145 -0
- package/dist/core/profile/profile-plan.js +0 -0
- package/dist/core/profile/profile-plan.js.map +1 -0
- package/dist/core/profile/profile-presets.d.ts +218 -0
- package/dist/core/profile/profile-presets.js +325 -0
- package/dist/core/profile/profile-presets.js.map +1 -0
- package/dist/core/schema/fields-file.js +25 -25
- package/dist/core/schema/fields-file.js.map +1 -1
- package/dist/core/schema/item-types-file.js +3 -3
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +4 -4
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.js +3 -3
- package/dist/core/schema/status-defs-file.js.map +1 -1
- package/dist/core/shared/serialization.js +83 -62
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/item-store.d.ts +1 -0
- package/dist/core/store/item-store.js +16 -8
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +4 -32
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +14 -14
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +50 -54
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +11 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/background-runs.js +3 -2
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/core/validate/linked-artifact-reference.d.ts +24 -0
- package/dist/core/validate/linked-artifact-reference.js +41 -0
- package/dist/core/validate/linked-artifact-reference.js.map +1 -0
- package/dist/mcp/server.js +183 -83
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +33 -2
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +15 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +3 -3
- package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +149 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +1583 -0
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -0
- package/dist/sdk/cli-contracts/string-lists.d.ts +14 -0
- package/dist/sdk/cli-contracts/string-lists.js +20 -0
- package/dist/sdk/cli-contracts/string-lists.js.map +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +51 -109
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +17 -0
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +54 -5
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +74 -0
- package/dist/sdk/cli-contracts/tool-schema.js +840 -0
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +13 -193
- package/dist/sdk/cli-contracts.js +5 -2277
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/compose.d.ts +346 -4
- package/dist/sdk/compose.js +486 -15
- package/dist/sdk/compose.js.map +1 -1
- package/dist/sdk/define.d.ts +29 -14
- package/dist/sdk/define.js +21 -7
- package/dist/sdk/define.js.map +1 -1
- package/dist/sdk/index.d.ts +14 -3
- package/dist/sdk/index.js +14 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +156 -3
- package/dist/sdk/testing.js +172 -4
- package/dist/sdk/testing.js.map +1 -1
- package/docs/AGENT_GUIDE.md +2 -0
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +37 -0
- package/docs/EXTENSIONS.md +20 -20
- package/docs/RELEASING.md +6 -1
- package/docs/SDK.md +387 -20
- package/docs/TESTING.md +12 -0
- package/docs/examples/policy-restricted-extension/README.md +6 -0
- package/docs/examples/policy-restricted-extension/index.ts +40 -0
- package/docs/examples/policy-restricted-extension/manifest.json +2 -2
- package/docs/examples/starter-extension/README.md +14 -2
- package/docs/examples/starter-extension/{index.js → index.ts} +51 -6
- package/docs/examples/starter-extension/manifest.json +2 -2
- package/package.json +20 -7
- package/packages/pm-beads/extensions/beads/index.ts +3 -3
- package/packages/pm-beads/extensions/beads/manifest.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +19 -7
- package/packages/pm-beads/extensions/beads/runtime.ts +155 -37
- package/packages/pm-calendar/extensions/calendar/index.ts +3 -3
- package/packages/pm-calendar/extensions/calendar/manifest.json +2 -2
- package/packages/pm-calendar/extensions/calendar/runtime.ts +2 -2
- package/packages/pm-command-kit/extensions/command-kit/index.ts +1 -1
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +2 -2
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +2 -2
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +1 -1
- package/packages/pm-kanban/README.md +97 -0
- package/packages/pm-kanban/extensions/kanban/index.ts +191 -0
- package/packages/pm-kanban/extensions/kanban/manifest.json +19 -0
- package/packages/pm-kanban/package.json +57 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +1 -1
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +1 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +2 -2
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -1
- package/packages/pm-templates/extensions/templates/index.ts +2 -2
- package/packages/pm-templates/extensions/templates/manifest.json +2 -2
- package/packages/pm-templates/extensions/templates/runtime.ts +1 -1
- package/packages/pm-todos/extensions/todos/index.ts +3 -3
- package/packages/pm-todos/extensions/todos/manifest.json +2 -2
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +19 -7
- package/packages/pm-todos/extensions/todos/runtime.ts +177 -43
- package/plugins/pm-claude/scripts/pm-mcp-server.mjs +2 -2
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +2 -2
- package/scripts/bundle-cli.mjs +1 -1
- package/dist/cli-bundle/chunks/activity-XUZ2AHCW.js +0 -18
- package/dist/cli-bundle/chunks/aggregate-EGJLZQBI.js.map +0 -7
- package/dist/cli-bundle/chunks/aggregate-R725FC3S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2BFPAUAF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-46G6RSB6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-55ISXAQH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5UVVASSA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7MRQ4HMK.js +0 -78
- package/dist/cli-bundle/chunks/chunk-7MRQ4HMK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7SV63ZHD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AONIHR2C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-C5AOG6D2.js +0 -691
- package/dist/cli-bundle/chunks/chunk-C5AOG6D2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CE5P2NQR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CKGNPJAG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-G6PYHBBR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GAJVRGGA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HFFUQR73.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IPKJ6B36.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JR2LV3M4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KFWBJPSG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KQMUV6LX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MJTINN54.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MJTSZKK5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MVKFOLLM.js +0 -694
- package/dist/cli-bundle/chunks/chunk-MVKFOLLM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QH3PJYON.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QL5RVYOA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-S26C36QC.js +0 -83
- package/dist/cli-bundle/chunks/chunk-S26C36QC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-S2RUQSX2.js +0 -75
- package/dist/cli-bundle/chunks/chunk-S2RUQSX2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SKH7OGE5.js +0 -86
- package/dist/cli-bundle/chunks/chunk-SKH7OGE5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SKN7LC5W.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SR3EKWZG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UELRKQQU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VFAQ4LMN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y4SUQQYH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YDEXO24S.js +0 -654
- package/dist/cli-bundle/chunks/chunk-YDEXO24S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YJ3SUEPD.js +0 -657
- package/dist/cli-bundle/chunks/chunk-YJ3SUEPD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YUDJD3XO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZRK4O56R.js.map +0 -1
- package/dist/cli-bundle/chunks/close-A3EMKBBY.js +0 -15
- package/dist/cli-bundle/chunks/config-D3OKQO52.js.map +0 -7
- package/dist/cli-bundle/chunks/config-MMJA4LLK.js.map +0 -1
- package/dist/cli-bundle/chunks/context-BLBD3PUB.js.map +0 -7
- package/dist/cli-bundle/chunks/context-DHLVPXN3.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-C3SZCXXG.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-XGVMMPC5.js.map +0 -1
- package/dist/cli-bundle/chunks/create-QVGFYA2X.js +0 -30
- package/dist/cli-bundle/chunks/history-AK3E5Z3C.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-TWIYQV5J.js +0 -21
- package/dist/cli-bundle/chunks/init-RCRKW5PL.js +0 -21
- package/dist/cli-bundle/chunks/register-list-query-DDCHPONM.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-YNPBVIKM.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-7ALWDDAX.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-LAVKYY63.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-KBXQDCXE.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-RCRUHMSZ.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-2ZKT6UDC.js +0 -19
- package/dist/cli-bundle/chunks/schema-MNTAVQCY.js.map +0 -1
- package/dist/cli-bundle/chunks/schema-RBTJ2YXW.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-FS742AMA.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-R5OAJVZK.js.map +0 -7
- package/dist/cli-bundle/chunks/test-QJXLKV26.js +0 -36
- package/dist/cli-bundle/chunks/test-runs-C6CFIVOS.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-IAJDL6CA.js.map +0 -7
- package/dist/cli-bundle/chunks/update-2XCQNOD6.js +0 -28
- package/dist/cli-bundle/chunks/update-IWUCXVH2.js +0 -24
- package/dist/cli-bundle/chunks/validate-6QWQVCX2.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-W5V5ZGQX.js.map +0 -1
- package/docs/examples/policy-restricted-extension/index.js +0 -21
- package/packages/pm-beads/extensions/beads/index.js +0 -64
- package/packages/pm-beads/extensions/beads/runtime-loader.js +0 -86
- package/packages/pm-beads/extensions/beads/runtime.js +0 -482
- package/packages/pm-calendar/extensions/calendar/index.js +0 -150
- package/packages/pm-calendar/extensions/calendar/runtime.js +0 -126
- package/packages/pm-command-kit/extensions/command-kit/index.js +0 -181
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +0 -177
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +0 -153
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +0 -98
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +0 -294
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +0 -18
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +0 -124
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +0 -110
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +0 -258
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +0 -361
- package/packages/pm-templates/extensions/templates/index.js +0 -132
- package/packages/pm-templates/extensions/templates/runtime.js +0 -35
- package/packages/pm-todos/extensions/todos/index.js +0 -81
- package/packages/pm-todos/extensions/todos/runtime-loader.js +0 -86
- package/packages/pm-todos/extensions/todos/runtime.js +0 -545
- /package/dist/cli-bundle/chunks/{activity-XUZ2AHCW.js.map → activity-EJBMXUBH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-H2LMOSSW.js.map → activity-MVSEND6D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IB3GYLQE.js.map → chunk-3JWQCLR5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2A34E3BA.js.map → chunk-4TXTVZL3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G6N5VEOK.js.map → chunk-4YIMPANT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7XGQXHFB.js.map → chunk-73PTKMAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3VY3YQO6.js.map → chunk-7RIJGN4R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FXR67XVQ.js.map → chunk-BN3CWK6G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4BHT5VDC.js.map → chunk-C2KCIZKZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O6LLO73I.js.map → chunk-CHRNYKNI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZQ3ZVXX2.js.map → chunk-D6USKAMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WZQWHN4R.js.map → chunk-DLDCPF5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UVC5LOR7.js.map → chunk-E2Q2ULMR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5VOINNKT.js.map → chunk-F6VH3LFC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H4IIJDE4.js.map → chunk-FDEVKXC4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-34EONI5F.js.map → chunk-HUYYMTGW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CIIK67GW.js.map → chunk-IHXXUIXS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SBQTAVJZ.js.map → chunk-JIP67N2K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2T3JG6V4.js.map → chunk-KRASIL6M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P77P2ILI.js.map → chunk-MLHX6DN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2CKH2LMV.js.map → chunk-OB3RJV5F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FIGAZ4Y7.js.map → chunk-OUQ5JEFM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NK3UPBVG.js.map → chunk-QE5UFCCO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WM5ZVBPE.js.map → chunk-SJZTPVFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VAYA4XFX.js.map → chunk-V3KLX7U7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2RDVQEWV.js.map → chunk-Z5BM2FKQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-66MEDTUD.js.map → chunk-ZEATCVAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NCVCO3NZ.js.map → chunk-ZFIEEDTJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-A3EMKBBY.js.map → close-37KEHLYM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-W56IOGYG.js.map → close-OP3LK7Z2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-QVGFYA2X.js.map → context-7ZEZV3BV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-IXY43O4H.js.map → context-XDI4DKKT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-UTTQDUYI.js.map → create-DFMNBKBS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-KCPUWSY2.js.map → create-J5Q2ELZT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-AJTXLT6S.js.map → extension-3LRYX7SW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-AK3E5Z3C.js.map → extension-GMVOIP4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-O5GUO3SU.js.map → gc-FULIVYR4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-PYVVEELM.js.map → gc-MDGRR2SU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-TWIYQV5J.js.map → history-5XUSLAJA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-KUUUVUFM.js.map → history-X4OSES6K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-BNLVFPRG.js.map → history-redact-45YW65BK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-RCRKW5PL.js.map → history-redact-BVHWDXPR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-32U7BSKE.js.map → init-KO7CGIRQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-ZEEOHLTQ.js.map → init-TRYJELH4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-6K53WOWO.js.map → list-ROT7JF62.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-2ZKT6UDC.js.map → list-Y6AU5BJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-6HOIVZDU.js.map → restore-DKMCLPI5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-ZWYEMASC.js.map → restore-IRAKSWIW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-NZF7OT2F.js.map → schema-OLT6LVKH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QJXLKV26.js.map → schema-XJXKJQF5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2XCQNOD6.js.map → search-CX5UMV4H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-IWUCXVH2.js.map → search-KP6H7COV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-7DIGDQUO.js.map → telemetry-DIFPXCAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-FWEXSJLQ.js.map → telemetry-WTYFUPRL.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/test-all.ts"],"sourcesContent":["/**\n * @module cli/commands/test-all\n *\n * Implements the pm test all command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { parseOptionalNumber } from \"../../core/item/parse.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolveGlobalPmRoot, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { appendTrackedTestRunSummary } from \"../../core/test/item-test-run-tracking.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { ItemStatus, LinkedTest } from \"../../types/index.js\";\nimport {\n countFailureCategories,\n runLinkedTests,\n runTest,\n summarizeContextPreflight,\n type LinkedTestFailureCategory,\n type TestRunResult,\n} from \"./test.js\";\n\n/**\n * Documents the test all command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestAllCommandOptions {\n status?: string;\n limit?: string;\n offset?: string;\n timeout?: string;\n progress?: boolean;\n envSet?: string[];\n envClear?: string[];\n sharedHostSafe?: boolean;\n pmContext?: string;\n overrideLinkedPmContext?: boolean;\n failOnContextMismatch?: boolean;\n failOnSkipped?: boolean;\n failOnEmptyTestRun?: boolean;\n requireAssertionsForPm?: boolean;\n checkContext?: boolean;\n autoPmContext?: boolean;\n}\n\n/**\n * Documents the test all item result payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestAllItemResult {\n ok: boolean;\n id: string;\n status: ItemStatus;\n test_count: number;\n passed: number;\n failed: number;\n skipped: number;\n run_results: TestRunResult[];\n failure_categories: Record<LinkedTestFailureCategory, number>;\n}\n\n/**\n * Documents the test all result payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestAllResult {\n ok: boolean;\n totals: {\n items: number;\n linked_tests: number;\n passed: number;\n failed: number;\n skipped: number;\n failure_categories: Record<LinkedTestFailureCategory, number>;\n };\n failed: number;\n passed: number;\n skipped: number;\n fail_on_skipped_triggered?: boolean;\n fail_on_empty_test_run_triggered?: boolean;\n warnings?: string[];\n results: TestAllItemResult[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = normalizeStatusInput(raw, statusRegistry);\n if (!normalized) {\n const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);\n throw new PmCliError(`Invalid --status value \"${raw}\". Allowed: ${allowedStatuses.join(\", \")}`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction parseTimeout(raw: string | undefined): number | undefined {\n if (raw === undefined) {\n return undefined;\n }\n return parseOptionalNumber(raw, \"timeout\");\n}\n\nfunction parseNonNegativeInteger(raw: string | undefined, flag: string): number | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const parsed = Number(raw);\n if (!Number.isInteger(parsed) || parsed < 0) {\n throw new PmCliError(`${flag} must be a non-negative integer`, EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction formatTrackingError(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nfunction resolveTrackedRunId(): string {\n const fromEnv = process.env.PM_BACKGROUND_TEST_RUN_ID?.trim();\n if (fromEnv && fromEnv.length > 0) {\n return fromEnv;\n }\n return `test-all-local-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;\n}\n\nfunction normalizeCommand(command: string): string {\n return command.trim().replaceAll(/\\s+/g, \" \");\n}\n\nfunction normalizeEnvSetSignature(value: LinkedTest[\"env_set\"]): string {\n if (!value || Object.keys(value).length === 0) {\n return \"{}\";\n }\n return JSON.stringify(\n Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right))),\n );\n}\n\nfunction normalizeEnvClearSignature(value: LinkedTest[\"env_clear\"]): string {\n if (!value || value.length === 0) {\n return \"[]\";\n }\n return JSON.stringify([...value].sort((left, right) => left.localeCompare(right)));\n}\n\nfunction normalizePmContextModeSignature(value: LinkedTest[\"pm_context_mode\"]): string {\n const normalized = value?.trim().toLowerCase();\n return normalized && normalized.length > 0 ? normalized : \"none\";\n}\n\nfunction normalizeAssertionSignature(test: LinkedTest): string {\n const normalized = {\n assert_stdout_contains: [...new Set(test.assert_stdout_contains ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stdout_regex: [...new Set(test.assert_stdout_regex ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stderr_contains: [...new Set(test.assert_stderr_contains ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stderr_regex: [...new Set(test.assert_stderr_regex ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stdout_min_lines: typeof test.assert_stdout_min_lines === \"number\" ? test.assert_stdout_min_lines : undefined,\n assert_json_field_equals: Object.fromEntries(\n Object.entries(test.assert_json_field_equals ?? {}).sort(([left], [right]) => left.localeCompare(right)),\n ),\n assert_json_field_gte: Object.fromEntries(\n Object.entries(test.assert_json_field_gte ?? {}).sort(([left], [right]) => left.localeCompare(right)),\n ),\n };\n return JSON.stringify(normalized);\n}\n\nfunction buildLinkedTestKey(test: LinkedTest): string {\n const command = test.command?.trim();\n if (command && command.length > 0) {\n const envSet = normalizeEnvSetSignature(test.env_set);\n const envClear = normalizeEnvClearSignature(test.env_clear);\n const pmContextMode = normalizePmContextModeSignature(test.pm_context_mode);\n const sharedHostSafe = test.shared_host_safe === true ? \"true\" : \"false\";\n const assertions = normalizeAssertionSignature(test);\n return `command:${test.scope}:${normalizeCommand(command)}:${envSet}:${envClear}:${pmContextMode}:${sharedHostSafe}:${assertions}`;\n }\n const linkedPath = test.path?.trim() ?? \"\";\n return `path:${test.scope}:${linkedPath}`;\n}\n\nfunction maxTimeoutSeconds(current: number | undefined, candidate: number | undefined): number | undefined {\n if (candidate === undefined) {\n /* c8 ignore next - exercised implicitly by duplicate timeout normalization */\n return current;\n }\n if (current === undefined || candidate > current) {\n return candidate;\n }\n return current;\n}\n\nfunction countStatuses(runResults: TestRunResult[]): { passed: number; failed: number; skipped: number } {\n let passed = 0;\n let failed = 0;\n let skipped = 0;\n for (const result of runResults) {\n if (result.status === \"passed\") {\n passed += 1;\n continue;\n }\n if (result.status === \"failed\") {\n failed += 1;\n continue;\n }\n skipped += 1;\n }\n return { passed, failed, skipped };\n}\n\nfunction mergeFailureCategoryCounts(\n target: Record<LinkedTestFailureCategory, number>,\n source: Record<LinkedTestFailureCategory, number>,\n): void {\n for (const [key, value] of Object.entries(source)) {\n target[key as LinkedTestFailureCategory] += value;\n }\n}\n\nfunction emitTestAllProgress(options: TestAllCommandOptions, message: string): void {\n if (options.progress !== true) {\n return;\n }\n try {\n process.stderr.write(`[pm test-all] ${message}\\n`);\n } catch {\n // Ignore transient stderr write failures.\n }\n}\n\n/**\n * Implements run test all for the public runtime surface of this module.\n */\nexport async function runTestAll(options: TestAllCommandOptions, global: GlobalOptions): Promise<TestAllResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusFilter = parseStatus(options.status, statusRegistry);\n const limitFilter = parseNonNegativeInteger(options.limit, \"--limit\");\n const offsetFilter = parseNonNegativeInteger(options.offset, \"--offset\") ?? 0;\n const allItems = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n const statusFilteredItems = allItems\n .filter((item) => (statusFilter ? item.status === statusFilter : true))\n .sort((a, b) => a.id.localeCompare(b.id));\n const filteredItems =\n limitFilter === undefined\n ? statusFilteredItems.slice(offsetFilter)\n : statusFilteredItems.slice(offsetFilter, offsetFilter + limitFilter);\n const defaultTimeoutSeconds = parseTimeout(options.timeout);\n const sourceRoots = {\n projectPmRoot: pmRoot,\n globalPmRoot: resolveGlobalPmRoot(process.cwd()),\n };\n const runStartedAt = nowIso();\n const trackingEnabled = settings.testing.record_results_to_items === true;\n const trackingRunId = resolveTrackedRunId();\n const trackingAuthor = resolveAuthor(undefined, settings.author_default);\n const trackingAttemptRaw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();\n const trackingParsedAttempt = trackingAttemptRaw ? Number.parseInt(trackingAttemptRaw, 10) : Number.NaN;\n const trackingResumedFrom = process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM?.trim();\n const trackingWarnings: string[] = [];\n\n const results: TestAllItemResult[] = [];\n const seenTestKeys = new Set<string>();\n let passed = 0;\n let failed = 0;\n let skipped = 0;\n let linkedTests = 0;\n const failureCategories = countFailureCategories([]);\n const itemTests: Array<{ item: (typeof filteredItems)[number]; tests: LinkedTest[] }> = [];\n\n for (const item of filteredItems) {\n const readResult = await runTest(\n item.id,\n {\n run: false,\n },\n {\n ...global,\n path: pmRoot,\n },\n );\n\n linkedTests += readResult.tests.length;\n itemTests.push({ item, tests: readResult.tests });\n }\n emitTestAllProgress(\n options,\n `selection items=${filteredItems.length} linked_tests=${linkedTests}` +\n `${statusFilter ? ` status=${statusFilter}` : \"\"}` +\n `${limitFilter === undefined ? \"\" : ` limit=${limitFilter}`}` +\n `${offsetFilter > 0 ? ` offset=${offsetFilter}` : \"\"}`,\n );\n\n const failOnEmptyTestRunTriggered = options.failOnEmptyTestRun === true && linkedTests === 0;\n if (failOnEmptyTestRunTriggered) {\n failed += 1;\n failureCategories.empty_run += 1;\n trackingWarnings.push(\n `empty_linked_test_selection:items=${filteredItems.length};linked_tests=0;fail_on_empty_test_run=true`,\n );\n }\n\n const effectiveTimeoutByKey = new Map<string, number | undefined>();\n for (const { tests } of itemTests) {\n for (const test of tests) {\n const key = buildLinkedTestKey(test);\n if (!effectiveTimeoutByKey.has(key)) {\n effectiveTimeoutByKey.set(key, test.timeout_seconds);\n continue;\n }\n effectiveTimeoutByKey.set(key, maxTimeoutSeconds(effectiveTimeoutByKey.get(key), test.timeout_seconds));\n }\n }\n\n for (const [itemIndex, { item, tests }] of itemTests.entries()) {\n emitTestAllProgress(options, `item ${itemIndex + 1}/${itemTests.length} start id=${item.id} linked_tests=${tests.length}`);\n const testsToRun: LinkedTest[] = [];\n const keyedTests = tests.map((test) => {\n const key = buildLinkedTestKey(test);\n const duplicate = seenTestKeys.has(key);\n if (!duplicate) {\n seenTestKeys.add(key);\n const effectiveTimeoutSeconds = effectiveTimeoutByKey.get(key);\n testsToRun.push(\n effectiveTimeoutSeconds === undefined ? test : { ...test, timeout_seconds: effectiveTimeoutSeconds },\n );\n }\n return { test, key, duplicate };\n });\n\n const executedResults =\n testsToRun.length > 0\n ? await runLinkedTests(testsToRun, defaultTimeoutSeconds, {\n progress: options.progress,\n sourceRoots,\n envSet: options.envSet,\n envClear: options.envClear,\n sharedHostSafe: options.sharedHostSafe,\n pmContext: options.pmContext,\n overrideLinkedPmContext: options.overrideLinkedPmContext,\n failOnContextMismatch: options.failOnContextMismatch,\n failOnEmptyTestRun: options.failOnEmptyTestRun,\n requireAssertionsForPm: options.requireAssertionsForPm,\n checkContext: options.checkContext,\n autoPmContext: options.autoPmContext,\n })\n : [];\n let executedIndex = 0;\n const runResults = keyedTests.map(({ test, key, duplicate }) => {\n if (!duplicate) {\n const executed = executedResults[executedIndex];\n executedIndex += 1;\n return executed;\n }\n return {\n command: test.command,\n path: test.path,\n status: \"skipped\" as const,\n error: `Duplicate linked test skipped (key=${key}).`,\n };\n });\n\n const summary = countStatuses(runResults);\n const itemFailureCategories = countFailureCategories(runResults);\n mergeFailureCategoryCounts(failureCategories, itemFailureCategories);\n passed += summary.passed;\n failed += summary.failed;\n skipped += summary.skipped;\n if (trackingEnabled) {\n try {\n await appendTrackedTestRunSummary({\n pmRoot,\n settings,\n itemId: item.id,\n author: trackingAuthor,\n message: `Track test-all run summary (${trackingRunId})`,\n entry: {\n run_id: trackingRunId,\n kind: \"test-all\",\n status: summary.failed > 0 || (options.failOnSkipped === true && summary.skipped > 0) ? \"failed\" : \"passed\",\n started_at: runStartedAt,\n finished_at: nowIso(),\n recorded_at: nowIso(),\n attempt: Number.isFinite(trackingParsedAttempt) && trackingParsedAttempt >= 1 ? trackingParsedAttempt : undefined,\n resumed_from: trackingResumedFrom && trackingResumedFrom.length > 0 ? trackingResumedFrom : undefined,\n passed: summary.passed,\n failed: summary.failed,\n skipped: summary.skipped,\n items: 1,\n linked_tests: tests.length,\n fail_on_skipped_triggered: options.failOnSkipped === true && summary.skipped > 0 ? true : undefined,\n },\n });\n } catch (error: unknown) {\n trackingWarnings.push(`test_result_tracking_failed:${item.id}:${formatTrackingError(error)}`);\n }\n }\n results.push({\n ok: summary.failed === 0 && !(options.failOnSkipped === true && summary.skipped > 0),\n id: item.id,\n status: item.status,\n test_count: tests.length,\n passed: summary.passed,\n failed: summary.failed,\n skipped: summary.skipped,\n run_results: runResults,\n failure_categories: itemFailureCategories,\n });\n emitTestAllProgress(\n options,\n `item ${itemIndex + 1}/${itemTests.length} end id=${item.id}` +\n ` status=${summary.failed === 0 ? \"passed\" : \"failed\"}` +\n ` passed=${summary.passed} failed=${summary.failed} skipped=${summary.skipped}`,\n );\n }\n\n const failOnSkippedTriggered = options.failOnSkipped === true && skipped > 0;\n if (options.checkContext === true) {\n const allRunResults = results.flatMap((entry) => entry.run_results);\n const preflight = summarizeContextPreflight(allRunResults);\n trackingWarnings.push(\n `context_preflight:checked_pm_commands=${preflight.checked_pm_commands};` +\n `tracker_read_commands=${preflight.tracker_read_commands};` +\n `mismatches=${preflight.mismatches};` +\n `auto_remediated=${preflight.auto_remediated}`,\n );\n }\n\n const ok = failed === 0 && failOnSkippedTriggered !== true && failOnEmptyTestRunTriggered !== true;\n emitTestAllProgress(\n options,\n `end status=${ok ? \"passed\" : \"failed\"} items=${filteredItems.length} linked_tests=${linkedTests}` +\n ` passed=${passed} failed=${failed} skipped=${skipped}`,\n );\n\n return {\n ok,\n totals: {\n items: filteredItems.length,\n linked_tests: linkedTests,\n passed,\n failed,\n skipped,\n failure_categories: failureCategories,\n },\n failed,\n passed,\n skipped,\n fail_on_skipped_triggered: failOnSkippedTriggered ? true : undefined,\n fail_on_empty_test_run_triggered: failOnEmptyTestRunTriggered ? true : undefined,\n warnings: trackingWarnings.length > 0 ? trackingWarnings : undefined,\n results,\n };\n}\n\nexport const _testOnlyTestAll = {\n formatTrackingError,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,SAAS,YAAY,KAAyB,gBAAqC;AACjF,MAAI,QAAQ,QAAW;AACrB,WAAO;EACT;AACA,QAAM,aAAa,qBAAqB,KAAK,cAAc;AAC3D,MAAI,CAAC,YAAY;AACf,UAAM,kBAAkB,eAAe,YAAY,IAAI,CAAC,eAAe,WAAW,EAAE;AACpF,UAAM,IAAI,WAAW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,iBAAiB,WAAW,WACnF,MAAM,WAAW,MAAM,YAAY,OAAO,EAAE;AAG3D,SAAO;IACL;IACA,QAAQ;MACN,OAAO,cAAc;MACrB,cAAc;MACd;MACA;MACA;MACA,oBAAoB;;IAEtB;IACA;IACA;IACA,2BAA2B,yBAAyB,OAAO;IAC3D,kCAAkC,8BAA8B,OAAO;IACvE,UAAU,iBAAiB,SAAS,IAAI,mBAAmB;IAC3D;;AAEJ;AAEO,IAAM,mBAAmB;EAC9B","debugId":"1af842d9-f0a2-5a69-92a4-08b67ef6ac69"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/test-all.ts"],"sourcesContent":["/**\n * @module cli/commands/test-all\n *\n * Implements the pm test all command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { parseOptionalNumber } from \"../../core/item/parse.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolveGlobalPmRoot, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { appendTrackedTestRunSummary } from \"../../core/test/item-test-run-tracking.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { ItemStatus, LinkedTest } from \"../../types/index.js\";\nimport {\n countFailureCategories,\n runLinkedTests,\n runTest,\n summarizeContextPreflight,\n type LinkedTestFailureCategory,\n type TestRunResult,\n} from \"./test.js\";\n\n/**\n * Documents the test all command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestAllCommandOptions {\n status?: string;\n limit?: string;\n offset?: string;\n timeout?: string;\n progress?: boolean;\n envSet?: string[];\n envClear?: string[];\n sharedHostSafe?: boolean;\n pmContext?: string;\n overrideLinkedPmContext?: boolean;\n failOnContextMismatch?: boolean;\n failOnSkipped?: boolean;\n failOnEmptyTestRun?: boolean;\n requireAssertionsForPm?: boolean;\n checkContext?: boolean;\n autoPmContext?: boolean;\n}\n\n/**\n * Documents the test all item result payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestAllItemResult {\n ok: boolean;\n id: string;\n status: ItemStatus;\n test_count: number;\n passed: number;\n failed: number;\n skipped: number;\n run_results: TestRunResult[];\n failure_categories: Record<LinkedTestFailureCategory, number>;\n}\n\n/**\n * Documents the test all result payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestAllResult {\n ok: boolean;\n totals: {\n items: number;\n linked_tests: number;\n passed: number;\n failed: number;\n skipped: number;\n failure_categories: Record<LinkedTestFailureCategory, number>;\n };\n failed: number;\n passed: number;\n skipped: number;\n fail_on_skipped_triggered?: boolean;\n fail_on_empty_test_run_triggered?: boolean;\n warnings?: string[];\n results: TestAllItemResult[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = normalizeStatusInput(raw, statusRegistry);\n if (!normalized) {\n const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);\n throw new PmCliError(`Invalid --status value \"${raw}\". Allowed: ${allowedStatuses.join(\", \")}`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction parseTimeout(raw: string | undefined): number | undefined {\n if (raw === undefined) {\n return undefined;\n }\n return parseOptionalNumber(raw, \"timeout\");\n}\n\nfunction parseNonNegativeInteger(raw: string | undefined, flag: string): number | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const parsed = Number(raw);\n if (!Number.isInteger(parsed) || parsed < 0) {\n throw new PmCliError(`${flag} must be a non-negative integer`, EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction formatTrackingError(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nfunction resolveTrackedRunId(): string {\n const fromEnv = process.env.PM_BACKGROUND_TEST_RUN_ID?.trim();\n if (fromEnv && fromEnv.length > 0) {\n return fromEnv;\n }\n return `test-all-local-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;\n}\n\nfunction normalizeCommand(command: string): string {\n return command.trim().replaceAll(/\\s+/g, \" \");\n}\n\nfunction normalizeEnvSetSignature(value: LinkedTest[\"env_set\"]): string {\n if (!value || Object.keys(value).length === 0) {\n return \"{}\";\n }\n return JSON.stringify(\n Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right))),\n );\n}\n\nfunction normalizeEnvClearSignature(value: LinkedTest[\"env_clear\"]): string {\n if (!value || value.length === 0) {\n return \"[]\";\n }\n return JSON.stringify([...value].sort((left, right) => left.localeCompare(right)));\n}\n\nfunction normalizePmContextModeSignature(value: LinkedTest[\"pm_context_mode\"]): string {\n const normalized = value?.trim().toLowerCase();\n return normalized && normalized.length > 0 ? normalized : \"none\";\n}\n\nfunction normalizeAssertionSignature(test: LinkedTest): string {\n const normalized = {\n assert_stdout_contains: [...new Set(test.assert_stdout_contains ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stdout_regex: [...new Set(test.assert_stdout_regex ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stderr_contains: [...new Set(test.assert_stderr_contains ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stderr_regex: [...new Set(test.assert_stderr_regex ?? [])].sort((left, right) => left.localeCompare(right)),\n assert_stdout_min_lines: typeof test.assert_stdout_min_lines === \"number\" ? test.assert_stdout_min_lines : undefined,\n assert_json_field_equals: Object.fromEntries(\n Object.entries(test.assert_json_field_equals ?? {}).sort(([left], [right]) => left.localeCompare(right)),\n ),\n assert_json_field_gte: Object.fromEntries(\n Object.entries(test.assert_json_field_gte ?? {}).sort(([left], [right]) => left.localeCompare(right)),\n ),\n };\n return JSON.stringify(normalized);\n}\n\nfunction buildLinkedTestKey(test: LinkedTest): string {\n const command = test.command?.trim();\n if (command && command.length > 0) {\n const envSet = normalizeEnvSetSignature(test.env_set);\n const envClear = normalizeEnvClearSignature(test.env_clear);\n const pmContextMode = normalizePmContextModeSignature(test.pm_context_mode);\n const sharedHostSafe = test.shared_host_safe === true ? \"true\" : \"false\";\n const assertions = normalizeAssertionSignature(test);\n return `command:${test.scope}:${normalizeCommand(command)}:${envSet}:${envClear}:${pmContextMode}:${sharedHostSafe}:${assertions}`;\n }\n const linkedPath = test.path?.trim() ?? \"\";\n return `path:${test.scope}:${linkedPath}`;\n}\n\nfunction maxTimeoutSeconds(current: number | undefined, candidate: number | undefined): number | undefined {\n if (candidate === undefined) {\n /* c8 ignore next - exercised implicitly by duplicate timeout normalization */\n return current;\n }\n if (current === undefined || candidate > current) {\n return candidate;\n }\n return current;\n}\n\nfunction countStatuses(runResults: TestRunResult[]): { passed: number; failed: number; skipped: number } {\n let passed = 0;\n let failed = 0;\n let skipped = 0;\n for (const result of runResults) {\n if (result.status === \"passed\") {\n passed += 1;\n continue;\n }\n if (result.status === \"failed\") {\n failed += 1;\n continue;\n }\n skipped += 1;\n }\n return { passed, failed, skipped };\n}\n\nfunction mergeFailureCategoryCounts(\n target: Record<LinkedTestFailureCategory, number>,\n source: Record<LinkedTestFailureCategory, number>,\n): void {\n for (const [key, value] of Object.entries(source)) {\n target[key as LinkedTestFailureCategory] += value;\n }\n}\n\nfunction emitTestAllProgress(options: TestAllCommandOptions, message: string): void {\n if (options.progress !== true) {\n return;\n }\n try {\n process.stderr.write(`[pm test-all] ${message}\\n`);\n } catch {\n // Ignore transient stderr write failures.\n }\n}\n\n/**\n * Implements run test all for the public runtime surface of this module.\n */\nexport async function runTestAll(options: TestAllCommandOptions, global: GlobalOptions): Promise<TestAllResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusFilter = parseStatus(options.status, statusRegistry);\n const limitFilter = parseNonNegativeInteger(options.limit, \"--limit\");\n const offsetFilter = parseNonNegativeInteger(options.offset, \"--offset\") ?? 0;\n const allItems = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n const statusFilteredItems = allItems\n .filter((item) => (statusFilter ? item.status === statusFilter : true))\n .sort((a, b) => a.id.localeCompare(b.id));\n const filteredItems =\n limitFilter === undefined\n ? statusFilteredItems.slice(offsetFilter)\n : statusFilteredItems.slice(offsetFilter, offsetFilter + limitFilter);\n const defaultTimeoutSeconds = parseTimeout(options.timeout);\n const sourceRoots = {\n projectPmRoot: pmRoot,\n globalPmRoot: resolveGlobalPmRoot(process.cwd()),\n };\n const runStartedAt = nowIso();\n const trackingEnabled = settings.testing.record_results_to_items === true;\n const trackingRunId = resolveTrackedRunId();\n const trackingAuthor = resolveAuthor(undefined, settings.author_default);\n const trackingAttemptRaw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();\n const trackingParsedAttempt = trackingAttemptRaw ? Number.parseInt(trackingAttemptRaw, 10) : Number.NaN;\n const trackingResumedFrom = process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM?.trim();\n const trackingWarnings: string[] = [];\n\n const results: TestAllItemResult[] = [];\n const seenTestKeys = new Set<string>();\n let passed = 0;\n let failed = 0;\n let skipped = 0;\n let linkedTests = 0;\n const failureCategories = countFailureCategories([]);\n const itemTests: Array<{ item: (typeof filteredItems)[number]; tests: LinkedTest[] }> = [];\n\n for (const item of filteredItems) {\n const readResult = await runTest(\n item.id,\n {\n run: false,\n },\n {\n ...global,\n path: pmRoot,\n },\n );\n\n linkedTests += readResult.tests.length;\n itemTests.push({ item, tests: readResult.tests });\n }\n emitTestAllProgress(\n options,\n `selection items=${filteredItems.length} linked_tests=${linkedTests}` +\n `${statusFilter ? ` status=${statusFilter}` : \"\"}` +\n `${limitFilter === undefined ? \"\" : ` limit=${limitFilter}`}` +\n `${offsetFilter > 0 ? ` offset=${offsetFilter}` : \"\"}`,\n );\n\n const failOnEmptyTestRunTriggered = options.failOnEmptyTestRun === true && linkedTests === 0;\n if (failOnEmptyTestRunTriggered) {\n failed += 1;\n failureCategories.empty_run += 1;\n trackingWarnings.push(\n `empty_linked_test_selection:items=${filteredItems.length};linked_tests=0;fail_on_empty_test_run=true`,\n );\n }\n\n const effectiveTimeoutByKey = new Map<string, number | undefined>();\n for (const { tests } of itemTests) {\n for (const test of tests) {\n const key = buildLinkedTestKey(test);\n if (!effectiveTimeoutByKey.has(key)) {\n effectiveTimeoutByKey.set(key, test.timeout_seconds);\n continue;\n }\n effectiveTimeoutByKey.set(key, maxTimeoutSeconds(effectiveTimeoutByKey.get(key), test.timeout_seconds));\n }\n }\n\n for (const [itemIndex, { item, tests }] of itemTests.entries()) {\n emitTestAllProgress(options, `item ${itemIndex + 1}/${itemTests.length} start id=${item.id} linked_tests=${tests.length}`);\n const testsToRun: LinkedTest[] = [];\n const keyedTests = tests.map((test) => {\n const key = buildLinkedTestKey(test);\n const duplicate = seenTestKeys.has(key);\n if (!duplicate) {\n seenTestKeys.add(key);\n const effectiveTimeoutSeconds = effectiveTimeoutByKey.get(key);\n testsToRun.push(\n effectiveTimeoutSeconds === undefined ? test : { ...test, timeout_seconds: effectiveTimeoutSeconds },\n );\n }\n return { test, key, duplicate };\n });\n\n const executedResults =\n testsToRun.length > 0\n ? await runLinkedTests(testsToRun, defaultTimeoutSeconds, {\n progress: options.progress,\n sourceRoots,\n envSet: options.envSet,\n envClear: options.envClear,\n sharedHostSafe: options.sharedHostSafe,\n pmContext: options.pmContext,\n overrideLinkedPmContext: options.overrideLinkedPmContext,\n failOnContextMismatch: options.failOnContextMismatch,\n failOnEmptyTestRun: options.failOnEmptyTestRun,\n requireAssertionsForPm: options.requireAssertionsForPm,\n checkContext: options.checkContext,\n autoPmContext: options.autoPmContext,\n })\n : [];\n let executedIndex = 0;\n const runResults = keyedTests.map(({ test, key, duplicate }) => {\n if (!duplicate) {\n const executed = executedResults[executedIndex];\n executedIndex += 1;\n return executed;\n }\n return {\n command: test.command,\n path: test.path,\n status: \"skipped\" as const,\n error: `Duplicate linked test skipped (key=${key}).`,\n };\n });\n\n const summary = countStatuses(runResults);\n const itemFailureCategories = countFailureCategories(runResults);\n mergeFailureCategoryCounts(failureCategories, itemFailureCategories);\n passed += summary.passed;\n failed += summary.failed;\n skipped += summary.skipped;\n if (trackingEnabled) {\n try {\n await appendTrackedTestRunSummary({\n pmRoot,\n settings,\n itemId: item.id,\n author: trackingAuthor,\n message: `Track test-all run summary (${trackingRunId})`,\n entry: {\n run_id: trackingRunId,\n kind: \"test-all\",\n status: summary.failed > 0 || (options.failOnSkipped === true && summary.skipped > 0) ? \"failed\" : \"passed\",\n started_at: runStartedAt,\n finished_at: nowIso(),\n recorded_at: nowIso(),\n attempt: Number.isFinite(trackingParsedAttempt) && trackingParsedAttempt >= 1 ? trackingParsedAttempt : undefined,\n resumed_from: trackingResumedFrom && trackingResumedFrom.length > 0 ? trackingResumedFrom : undefined,\n passed: summary.passed,\n failed: summary.failed,\n skipped: summary.skipped,\n items: 1,\n linked_tests: tests.length,\n fail_on_skipped_triggered: options.failOnSkipped === true && summary.skipped > 0 ? true : undefined,\n },\n });\n } catch (error: unknown) {\n trackingWarnings.push(`test_result_tracking_failed:${item.id}:${formatTrackingError(error)}`);\n }\n }\n results.push({\n ok: summary.failed === 0 && !(options.failOnSkipped === true && summary.skipped > 0),\n id: item.id,\n status: item.status,\n test_count: tests.length,\n passed: summary.passed,\n failed: summary.failed,\n skipped: summary.skipped,\n run_results: runResults,\n failure_categories: itemFailureCategories,\n });\n emitTestAllProgress(\n options,\n `item ${itemIndex + 1}/${itemTests.length} end id=${item.id}` +\n ` status=${summary.failed === 0 ? \"passed\" : \"failed\"}` +\n ` passed=${summary.passed} failed=${summary.failed} skipped=${summary.skipped}`,\n );\n }\n\n const failOnSkippedTriggered = options.failOnSkipped === true && skipped > 0;\n if (options.checkContext === true) {\n const allRunResults = results.flatMap((entry) => entry.run_results);\n const preflight = summarizeContextPreflight(allRunResults);\n trackingWarnings.push(\n `context_preflight:checked_pm_commands=${preflight.checked_pm_commands};` +\n `tracker_read_commands=${preflight.tracker_read_commands};` +\n `mismatches=${preflight.mismatches};` +\n `auto_remediated=${preflight.auto_remediated}`,\n );\n }\n\n const ok = failed === 0 && failOnSkippedTriggered !== true && failOnEmptyTestRunTriggered !== true;\n emitTestAllProgress(\n options,\n `end status=${ok ? \"passed\" : \"failed\"} items=${filteredItems.length} linked_tests=${linkedTests}` +\n ` passed=${passed} failed=${failed} skipped=${skipped}`,\n );\n\n return {\n ok,\n totals: {\n items: filteredItems.length,\n linked_tests: linkedTests,\n passed,\n failed,\n skipped,\n failure_categories: failureCategories,\n },\n failed,\n passed,\n skipped,\n fail_on_skipped_triggered: failOnSkippedTriggered ? true : undefined,\n fail_on_empty_test_run_triggered: failOnEmptyTestRunTriggered ? true : undefined,\n warnings: trackingWarnings.length > 0 ? trackingWarnings : undefined,\n results,\n };\n}\n\nexport const _testOnlyTestAll = {\n formatTrackingError,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,SAAS,YAAY,KAAyB,gBAAqC;AACjF,MAAI,QAAQ,QAAW;AACrB,WAAO;EACT;AACA,QAAM,aAAa,qBAAqB,KAAK,cAAc;AAC3D,MAAI,CAAC,YAAY;AACf,UAAM,kBAAkB,eAAe,YAAY,IAAI,CAAC,eAAe,WAAW,EAAE;AACpF,UAAM,IAAI,WAAW,2BAA2B,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WAAW,WACnF,MAAM,WAAW,MAAM,YAAY,OAAO,EAAE;AAG3D,SAAO;IACL;IACA,QAAQ;MACN,OAAO,cAAc;MACrB,cAAc;MACd;MACA;MACA;MACA,oBAAoB;;IAEtB;IACA;IACA;IACA,2BAA2B,yBAAyB,OAAO;IAC3D,kCAAkC,8BAA8B,OAAO;IACvE,UAAU,iBAAiB,SAAS,IAAI,mBAAmB;IAC3D;;AAEJ;AAEO,IAAM,mBAAmB;EAC9B","debugId":"8fae7ddf-9ec3-5e03-b0ca-7b5bc14a2871"}
|
|
@@ -1,12 +1,11 @@
|
|
|
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]="883aa05b-84b3-5651-8b99-ea04681d4f70")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
parseLimit
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-YDEXO24S.js";
|
|
5
|
+
} from "./chunk-JVQ7UOYC.js";
|
|
7
6
|
import {
|
|
8
7
|
nowIso
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KRASIL6M.js";
|
|
10
9
|
import {
|
|
11
10
|
EXIT_CODE,
|
|
12
11
|
PmCliError,
|
|
@@ -27,7 +26,7 @@ import {
|
|
|
27
26
|
resolveGlobalPmRoot,
|
|
28
27
|
resolvePmRoot,
|
|
29
28
|
writeFileAtomic
|
|
30
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CY5IJMUM.js";
|
|
31
30
|
|
|
32
31
|
// dist/cli/commands/test-runs.js
|
|
33
32
|
import os from "node:os";
|
|
@@ -986,6 +985,6 @@ export {
|
|
|
986
985
|
runTestRunsStop,
|
|
987
986
|
runTestRunsWorker
|
|
988
987
|
};
|
|
989
|
-
//# sourceMappingURL=test-runs-
|
|
988
|
+
//# sourceMappingURL=test-runs-CA6K32RD.js.map
|
|
990
989
|
|
|
991
|
-
//# debugId=
|
|
990
|
+
//# debugId=883aa05b-84b3-5651-8b99-ea04681d4f70
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/test-runs.ts","../../../../../../../../core/test/background-runs.ts"],"sourcesContent":["/**\n * @module cli/commands/test-runs\n *\n * Implements the pm test runs command surface and its agent-facing runtime behavior.\n */\nimport os from \"node:os\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport {\n type BackgroundLogStream,\n type BackgroundTestRunKind,\n type BackgroundTestRunStatus,\n getBackgroundTestRunStatus,\n listBackgroundTestRuns,\n readBackgroundTestRunLogs,\n resumeBackgroundTestRun,\n runBackgroundTestRunWorker,\n spawnBackgroundTestRunWorker,\n startBackgroundTestRun,\n stopBackgroundTestRun,\n} from \"../../core/test/background-runs.js\";\nimport { getSettingsPath, resolveGlobalPmRoot, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { parseLimit } from \"../shared-parsers.js\";\n\nconst BACKGROUND_STATUS_VALUES: readonly BackgroundTestRunStatus[] = [\"queued\", \"running\", \"passed\", \"failed\", \"stopped\", \"canceled\"];\nconst BACKGROUND_STREAM_VALUES: readonly BackgroundLogStream[] = [\"stdout\", \"stderr\", \"both\"];\n\nfunction normalizeStatus(value: string | undefined): BackgroundTestRunStatus | undefined {\n if (value === undefined) {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if ((BACKGROUND_STATUS_VALUES as readonly string[]).includes(normalized)) {\n return normalized as BackgroundTestRunStatus;\n }\n throw new PmCliError(`Invalid --status value \"${value}\"`, EXIT_CODE.USAGE);\n}\n\nfunction normalizeStream(value: string | undefined): BackgroundLogStream {\n if (value === undefined || value.trim().length === 0) {\n return \"stderr\";\n }\n const normalized = value.trim().toLowerCase();\n if ((BACKGROUND_STREAM_VALUES as readonly string[]).includes(normalized)) {\n return normalized as BackgroundLogStream;\n }\n throw new PmCliError(`Invalid --stream value \"${value}\"`, EXIT_CODE.USAGE);\n}\n\nfunction resolveWhoamiFallback(): string | undefined {\n try {\n const username = os.userInfo().username.trim();\n if (username.length > 0) {\n return username;\n }\n } catch {\n // Fall back to environment-derived attribution.\n }\n return undefined;\n}\n\nfunction resolveRequestedBy(author: string | undefined, fallback: string): string {\n const candidates = [\n author,\n process.env.PM_AUTHOR,\n fallback,\n process.env.USER,\n process.env.LOGNAME,\n process.env.USERNAME,\n resolveWhoamiFallback(),\n ];\n for (const candidate of candidates) {\n if (typeof candidate !== \"string\") {\n continue;\n }\n const trimmed = candidate.trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n }\n return \"unknown\";\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n}\n\n/**\n * Documents the start background run command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundRunCommandOptions {\n kind: BackgroundTestRunKind;\n commandArgs: string[];\n targetId?: string;\n statusFilter?: string;\n author?: string;\n noExtensions?: boolean;\n}\n\n/**\n * Documents the start background run result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundRunResult {\n started: boolean;\n duplicate_of?: string;\n run: unknown;\n}\n\n/**\n * Implements run start background run for the public runtime surface of this module.\n */\nexport async function runStartBackgroundRun(\n options: StartBackgroundRunCommandOptions,\n global: GlobalOptions,\n): Promise<StartBackgroundRunResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const globalPmRoot = resolveGlobalPmRoot(process.cwd());\n await ensureInitialized(pmRoot);\n const settings = await readSettings(pmRoot);\n const requestedBy = resolveRequestedBy(options.author, settings.author_default);\n const started = await startBackgroundTestRun({\n pmRoot,\n globalPmRoot,\n kind: options.kind,\n commandArgs: options.commandArgs,\n requestedBy,\n targetId: options.targetId,\n statusFilter: options.statusFilter,\n });\n if (!started.started) {\n return {\n started: false,\n duplicate_of: started.duplicate_of,\n run: started.run,\n };\n }\n const spawned = await spawnBackgroundTestRunWorker({\n pmRoot,\n runId: started.run.id,\n noExtensions: options.noExtensions === true,\n });\n return {\n started: true,\n run: spawned,\n };\n}\n\n/**\n * Documents the test runs list command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsListCommandOptions {\n status?: string;\n limit?: string;\n}\n\n/**\n * Implements run test runs list for the public runtime surface of this module.\n */\nexport async function runTestRunsList(options: TestRunsListCommandOptions, global: GlobalOptions): Promise<{\n runs: unknown[];\n count: number;\n filters: {\n status?: BackgroundTestRunStatus;\n limit?: number;\n };\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const status = normalizeStatus(options.status);\n const limit = parseLimit(options.limit, \"limit\");\n const runs = await listBackgroundTestRuns(pmRoot, { status, limit });\n return {\n runs,\n count: runs.length,\n filters: {\n status,\n limit,\n },\n };\n}\n\n/**\n * Implements run test runs status for the public runtime surface of this module.\n */\nexport async function runTestRunsStatus(runId: string, global: GlobalOptions): Promise<{\n run: unknown;\n health: unknown;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const status = await getBackgroundTestRunStatus(pmRoot, runId);\n return {\n run: status.run,\n health: status.health,\n };\n}\n\n/**\n * Documents the test runs logs command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsLogsCommandOptions {\n stream?: string;\n tail?: string;\n}\n\n/**\n * Implements run test runs logs for the public runtime surface of this module.\n */\nexport async function runTestRunsLogs(\n runId: string,\n options: TestRunsLogsCommandOptions,\n global: GlobalOptions,\n): Promise<{\n run: unknown;\n stream: BackgroundLogStream;\n tail: number;\n stdout: string[];\n stderr: string[];\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const stream = normalizeStream(options.stream);\n const tail = parseLimit(options.tail, \"tail\");\n const logs = await readBackgroundTestRunLogs(pmRoot, runId, stream, tail);\n return {\n run: logs.run,\n stream: logs.stream,\n tail: logs.tail,\n stdout: logs.stdout,\n stderr: logs.stderr,\n };\n}\n\n/**\n * Documents the test runs stop command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsStopCommandOptions {\n force?: boolean;\n}\n\n/**\n * Implements run test runs stop for the public runtime surface of this module.\n */\nexport async function runTestRunsStop(\n runId: string,\n options: TestRunsStopCommandOptions,\n global: GlobalOptions,\n): Promise<{\n run: unknown;\n signal_sent: \"SIGTERM\" | \"SIGKILL\" | \"none\";\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const stopped = await stopBackgroundTestRun(pmRoot, runId, options.force === true);\n return {\n run: stopped.run,\n signal_sent: stopped.signal_sent,\n };\n}\n\n/**\n * Documents the test runs resume command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsResumeCommandOptions {\n author?: string;\n noExtensions?: boolean;\n}\n\n/**\n * Implements run test runs resume for the public runtime surface of this module.\n */\nexport async function runTestRunsResume(\n runId: string,\n options: TestRunsResumeCommandOptions,\n global: GlobalOptions,\n): Promise<{\n resumed_from: string;\n run: unknown;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const settings = await readSettings(pmRoot);\n const requestedBy = resolveRequestedBy(options.author, settings.author_default);\n const resumed = await resumeBackgroundTestRun(pmRoot, runId, requestedBy, options.noExtensions === true);\n return {\n resumed_from: runId,\n run: resumed,\n };\n}\n\n/**\n * Implements run test runs worker for the public runtime surface of this module.\n */\nexport async function runTestRunsWorker(runId: string, global: GlobalOptions): Promise<{\n id: string;\n status: BackgroundTestRunStatus;\n exit_code?: number;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const finished = await runBackgroundTestRunWorker(pmRoot, runId, global.noExtensions === true);\n return {\n id: finished.id,\n status: finished.status,\n exit_code: finished.exit_code,\n };\n}\n","/**\n * @module core/test/background-runs\n *\n * Runs and records linked-test orchestration for Background Runs.\n */\nimport fs from \"node:fs/promises\";\nimport { spawn } from \"node:child_process\";\nimport { createHash, randomBytes } from \"node:crypto\";\nimport path from \"node:path\";\nimport { ensureDir, pathExists, readFileIfExists, writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { nowIso } from \"../shared/time.js\";\nimport {\n getTestRunRecordPath,\n getTestRunResultPath,\n getTestRunStderrPath,\n getTestRunStdoutPath,\n getTestRunsPath,\n getTestRunsRecordsPath,\n getTestRunsResultsPath,\n getTestRunsStderrPath,\n getTestRunsStdoutPath,\n} from \"../store/paths.js\";\n\nconst BACKGROUND_RUN_ACTIVE_STATUSES = new Set<BackgroundTestRunStatus>([\"queued\", \"running\"]);\nconst BACKGROUND_RUN_TERMINAL_STATUSES = new Set<BackgroundTestRunStatus>([\"passed\", \"failed\", \"stopped\", \"canceled\"]);\nconst DEFAULT_BACKGROUND_RUN_RESOURCE_SNAPSHOT_INTERVAL_MS = 3000;\nconst DEFAULT_BACKGROUND_RUN_FORCE_KILL_DELAY_MS = 3000;\nconst DEFAULT_BACKGROUND_RUN_HEARTBEAT_STALE_MS = 30000;\nconst DEFAULT_BACKGROUND_RUN_LOG_TAIL_LINES = 100;\nconst PROC_STAT_TICKS_PER_SECOND = 100;\n\n/**\n * Restricts background test run kind values accepted by command, SDK, and storage contracts.\n */\nexport type BackgroundTestRunKind = \"test\" | \"test-all\";\n\n/**\n * Restricts background test run status values accepted by command, SDK, and storage contracts.\n */\nexport type BackgroundTestRunStatus = \"queued\" | \"running\" | \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n\n/**\n * Restricts background log stream values accepted by command, SDK, and storage contracts.\n */\nexport type BackgroundLogStream = \"stdout\" | \"stderr\" | \"both\";\n\n/**\n * Documents the background run progress payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunProgress {\n phase: \"queued\" | \"running\" | \"stopping\" | \"finished\";\n message?: string;\n item_index?: number;\n item_total?: number;\n item_id?: string;\n linked_test_index?: number;\n linked_test_total?: number;\n current_command?: string;\n elapsed_ms?: number;\n heartbeat_at?: string;\n}\n\n/**\n * Documents the background run resource snapshot payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunResourceSnapshot {\n recorded_at: string;\n rss_bytes?: number;\n cpu_user_seconds?: number;\n cpu_system_seconds?: number;\n uptime_seconds?: number;\n}\n\n/**\n * Documents the background run summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunSummary {\n items?: number;\n linked_tests?: number;\n passed: number;\n failed: number;\n skipped: number;\n fail_on_skipped_triggered?: boolean;\n}\n\n/**\n * Documents the background test run record payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundTestRunRecord {\n id: string;\n kind: BackgroundTestRunKind;\n status: BackgroundTestRunStatus;\n created_at: string;\n started_at?: string;\n finished_at?: string;\n updated_at: string;\n requested_by: string;\n fingerprint: string;\n command_args: string[];\n command_label: string;\n pm_root: string;\n global_pm_root: string;\n target_id?: string;\n status_filter?: string;\n attempt: number;\n resumed_from?: string;\n resumed_by?: string;\n worker_pid?: number;\n child_pid?: number;\n exit_code?: number;\n signal?: string;\n stdout_path: string;\n stderr_path: string;\n result_path: string;\n progress?: BackgroundRunProgress;\n resource?: BackgroundRunResourceSnapshot;\n summary?: BackgroundRunSummary;\n stop_requested_at?: string;\n duplicate_of?: string;\n error?: string;\n}\n\n/**\n * Documents the start background test run options payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundTestRunOptions {\n pmRoot: string;\n globalPmRoot: string;\n kind: BackgroundTestRunKind;\n commandArgs: string[];\n requestedBy: string;\n targetId?: string;\n statusFilter?: string;\n resumedFrom?: string;\n resumedBy?: string;\n attempt?: number;\n}\n\n/**\n * Documents the start background test run result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundTestRunResult {\n started: boolean;\n run: BackgroundTestRunRecord;\n duplicate_of?: string;\n}\n\n/**\n * Documents the spawn background test run worker options payload exchanged by command, SDK, and package integrations.\n */\nexport interface SpawnBackgroundTestRunWorkerOptions {\n pmRoot: string;\n runId: string;\n noExtensions?: boolean;\n}\n\n/**\n * Documents the stop background test run result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StopBackgroundTestRunResult {\n run: BackgroundTestRunRecord;\n signal_sent: \"SIGTERM\" | \"SIGKILL\" | \"none\";\n}\n\n/**\n * Documents the list background test run options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListBackgroundTestRunOptions {\n status?: BackgroundTestRunStatus;\n limit?: number;\n}\n\n/**\n * Documents the background run health payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunHealth {\n state: \"healthy\" | \"stale\" | \"inactive\";\n last_heartbeat_at?: string;\n heartbeat_lag_ms?: number;\n worker_alive: boolean;\n child_alive: boolean;\n}\n\n/**\n * Documents the background run status view payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunStatusView {\n run: BackgroundTestRunRecord;\n health: BackgroundRunHealth;\n}\n\n/**\n * Documents the background run logs result payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunLogsResult {\n run: BackgroundTestRunRecord;\n stream: BackgroundLogStream;\n tail: number;\n stdout: string[];\n stderr: string[];\n}\n\ninterface WorkerEvaluationResult {\n summary: BackgroundRunSummary;\n parsedResult: unknown | null;\n}\n\nfunction nowMs(): number {\n return Date.now();\n}\n\nfunction normalizeCommandArgs(args: string[]): string[] {\n return args.map((entry) => entry.trim()).filter((entry) => entry.length > 0);\n}\n\nfunction summarizeCommandLabel(args: string[]): string {\n const joined = args.join(\" \").replaceAll(/\\s+/g, \" \").trim();\n if (joined.length <= 180) {\n return joined;\n }\n return `${joined.slice(0, 177)}...`;\n}\n\nfunction buildRunId(): string {\n const timePart = Date.now().toString(36);\n const randomPart = randomBytes(3).toString(\"hex\");\n return `tr-${timePart}-${randomPart}`;\n}\n\n/**\n * Implements build background test run fingerprint for the public runtime surface of this module.\n */\nexport function buildBackgroundTestRunFingerprint(kind: BackgroundTestRunKind, commandArgs: string[], pmRoot: string): string {\n const payload = {\n kind,\n command: normalizeCommandArgs(commandArgs),\n pm_root: path.resolve(pmRoot),\n };\n return createHash(\"sha256\").update(JSON.stringify(payload)).digest(\"hex\");\n}\n\nfunction isPidRunning(pid: number | undefined): boolean {\n if (!Number.isInteger(pid) || !pid || pid <= 0) {\n return false;\n }\n try {\n process.kill(pid, 0);\n return true;\n } catch (error: unknown) {\n const code = typeof error === \"object\" && error !== null && \"code\" in error ? (error as { code?: string }).code : undefined;\n return code === \"EPERM\";\n }\n}\n\nasync function ensureBackgroundRunStorage(pmRoot: string): Promise<void> {\n await ensureDir(getTestRunsPath(pmRoot));\n await ensureDir(getTestRunsRecordsPath(pmRoot));\n await ensureDir(getTestRunsStdoutPath(pmRoot));\n await ensureDir(getTestRunsStderrPath(pmRoot));\n await ensureDir(getTestRunsResultsPath(pmRoot));\n}\n\nasync function parseBackgroundRunRecord(raw: string, recordPath: string): Promise<BackgroundTestRunRecord> {\n try {\n const parsed = JSON.parse(raw) as BackgroundTestRunRecord;\n if (!parsed || typeof parsed !== \"object\" || typeof parsed.id !== \"string\") {\n throw new Error(\"invalid run record payload\");\n }\n return parsed;\n } catch (error: unknown) {\n throw new PmCliError(\n `Failed to parse background test run record at ${recordPath}: ${error instanceof Error ? error.message : String(error)}`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n}\n\nasync function writeBackgroundRunRecord(pmRoot: string, record: BackgroundTestRunRecord): Promise<void> {\n const next: BackgroundTestRunRecord = {\n ...record,\n updated_at: nowIso(),\n };\n await writeFileAtomic(getTestRunRecordPath(pmRoot, record.id), `${JSON.stringify(next, null, 2)}\\n`);\n}\n\n/**\n * Implements read background test run record for the public runtime surface of this module.\n */\nexport async function readBackgroundTestRunRecord(pmRoot: string, runId: string): Promise<BackgroundTestRunRecord | null> {\n const recordPath = getTestRunRecordPath(pmRoot, runId);\n const raw = await readFileIfExists(recordPath);\n if (!raw) {\n return null;\n }\n return parseBackgroundRunRecord(raw, recordPath);\n}\n\nasync function listBackgroundRunRecordPaths(pmRoot: string): Promise<string[]> {\n const recordsRoot = getTestRunsRecordsPath(pmRoot);\n if (!(await pathExists(recordsRoot))) {\n return [];\n }\n const entries = await fs.readdir(recordsRoot, { withFileTypes: true });\n return entries\n .filter((entry) => entry.isFile() && entry.name.endsWith(\".json\"))\n .map((entry) => path.join(recordsRoot, entry.name))\n .sort((left, right) => right.localeCompare(left));\n}\n\nfunction parseLinuxRssStatus(raw: string): number | undefined {\n const match = raw.match(/^VmRSS:\\s+(\\d+)\\s+kB$/m);\n if (!match) {\n return undefined;\n }\n return Number.parseInt(match[1], 10) * 1024;\n}\n\nasync function readLinuxRssBytes(pid: number): Promise<number | undefined> {\n if (process.platform !== \"linux\") {\n return undefined;\n }\n try {\n const raw = await fs.readFile(`/proc/${pid}/status`, \"utf8\");\n return parseLinuxRssStatus(raw);\n } catch {\n return undefined;\n }\n}\n\nfunction parseLinuxCpuStat(raw: string): { cpu_user_seconds?: number; cpu_system_seconds?: number } {\n const closeParenIndex = raw.lastIndexOf(\")\");\n if (closeParenIndex < 0) {\n return {};\n }\n const remainder = raw.slice(closeParenIndex + 2).trim();\n const parts = remainder.split(/\\s+/);\n const utimeTicks = Number.parseInt(parts[11], 10);\n const stimeTicks = Number.parseInt(parts[12], 10);\n if (!Number.isFinite(utimeTicks) || !Number.isFinite(stimeTicks)) {\n return {};\n }\n return {\n cpu_user_seconds: utimeTicks / PROC_STAT_TICKS_PER_SECOND,\n cpu_system_seconds: stimeTicks / PROC_STAT_TICKS_PER_SECOND,\n };\n}\n\nasync function readLinuxCpuSeconds(\n pid: number,\n): Promise<{ cpu_user_seconds?: number; cpu_system_seconds?: number }> {\n if (process.platform !== \"linux\") {\n return {};\n }\n try {\n const raw = await fs.readFile(`/proc/${pid}/stat`, \"utf8\");\n return parseLinuxCpuStat(raw);\n } catch {\n /* c8 ignore next -- /proc entries can disappear between liveness and stat reads. */\n return {};\n }\n}\n\nasync function buildResourceSnapshot(record: BackgroundTestRunRecord): Promise<BackgroundRunResourceSnapshot | undefined> {\n const pid = record.child_pid ?? record.worker_pid;\n if (!isPidRunning(pid)) {\n return undefined;\n }\n const rssBytes = await readLinuxRssBytes(pid as number);\n const cpu = await readLinuxCpuSeconds(pid as number);\n const startedAtMs = record.started_at ? Date.parse(record.started_at) : Number.NaN;\n const uptimeSeconds = Number.isFinite(startedAtMs) ? Math.max(0, (nowMs() - startedAtMs) / 1000) : undefined;\n return {\n recorded_at: nowIso(),\n rss_bytes: rssBytes,\n cpu_user_seconds: cpu.cpu_user_seconds,\n cpu_system_seconds: cpu.cpu_system_seconds,\n uptime_seconds: uptimeSeconds,\n };\n}\n\nfunction readCount(value: unknown): number {\n return typeof value === \"number\" && Number.isFinite(value) ? value : 0;\n}\n\nfunction evaluateWorkerResult(kind: BackgroundTestRunKind, payload: unknown): WorkerEvaluationResult {\n if (!payload || typeof payload !== \"object\") {\n return {\n summary: {\n passed: 0,\n failed: 1,\n skipped: 0,\n },\n parsedResult: null,\n };\n }\n const record = payload as Record<string, unknown>;\n if (kind === \"test-all\") {\n const totals = (record.totals ?? {}) as Record<string, unknown>;\n return {\n summary: {\n items: typeof totals.items === \"number\" ? totals.items : undefined,\n linked_tests: typeof totals.linked_tests === \"number\" ? totals.linked_tests : undefined,\n passed: readCount(totals.passed),\n failed: readCount(totals.failed),\n skipped: readCount(totals.skipped),\n fail_on_skipped_triggered: record.fail_on_skipped_triggered === true ? true : undefined,\n },\n parsedResult: payload,\n };\n }\n const runResults = Array.isArray(record.run_results) ? record.run_results : [];\n let passed = 0;\n let failed = 0;\n let skipped = 0;\n for (const entry of runResults) {\n if (!entry || typeof entry !== \"object\") {\n continue;\n }\n const status = (entry as { status?: unknown }).status;\n if (status === \"passed\") {\n passed += 1;\n continue;\n }\n if (status === \"failed\") {\n failed += 1;\n continue;\n }\n skipped += 1;\n }\n return {\n summary: {\n passed,\n failed,\n skipped,\n fail_on_skipped_triggered: record.fail_on_skipped_triggered === true ? true : undefined,\n },\n parsedResult: payload,\n };\n}\n\nfunction parseProgressLine(stderrLine: string): Partial<BackgroundRunProgress> | null {\n const line = stderrLine.trim();\n if (line.length === 0) {\n return null;\n }\n const testAllMatch = line.match(/\\[pm test-all\\]\\s+item\\s+(\\d+)\\/(\\d+)\\s+(start|end)\\s+id=([^\\s]+)/i);\n if (testAllMatch) {\n const itemIndex = Number.parseInt(testAllMatch[1], 10);\n const itemTotal = Number.parseInt(testAllMatch[2], 10);\n return {\n item_index: itemIndex,\n item_total: itemTotal,\n item_id: testAllMatch[4],\n linked_test_index: undefined,\n linked_test_total: undefined,\n current_command: undefined,\n elapsed_ms: undefined,\n heartbeat_at: nowIso(),\n phase: testAllMatch[3]?.toLowerCase() === \"end\" ? \"finished\" : \"running\",\n };\n }\n const linkedTestMatch = line.match(/\\[pm test\\]\\s+linked-test\\s+(\\d+)\\/(\\d+)\\s+(start|running|end)(?:.*elapsed_ms=(\\d+))?/i);\n if (!linkedTestMatch) {\n return null;\n }\n const index = Number.parseInt(linkedTestMatch[1], 10);\n const total = Number.parseInt(linkedTestMatch[2], 10);\n const elapsed = linkedTestMatch[4] ? Number.parseInt(linkedTestMatch[4], 10) : undefined;\n const commandMatch = line.match(/\\scommand=\"((?:\\\\.|[^\"\\\\])*)\"/);\n const currentCommand = commandMatch\n ? commandMatch[1].replaceAll('\\\\\"', '\"').replaceAll(\"\\\\\\\\\", \"\\\\\")\n : undefined;\n return {\n linked_test_index: index,\n linked_test_total: total,\n current_command: currentCommand,\n elapsed_ms: Number.isFinite(elapsed) ? elapsed : undefined,\n heartbeat_at: nowIso(),\n phase: linkedTestMatch[3]?.toLowerCase() === \"end\" ? \"finished\" : \"running\",\n };\n}\n\nfunction splitLines(value: string): string[] {\n return value\n .split(/\\r?\\n/)\n .map((entry) => entry.trimEnd())\n .filter((entry) => entry.length > 0);\n}\n\nfunction tailLines(value: string, limit: number): string[] {\n if (limit <= 0) {\n return [];\n }\n const lines = splitLines(value);\n if (lines.length <= limit) {\n return lines;\n }\n return lines.slice(lines.length - limit);\n}\n\nasync function resolveBackgroundCliEntry(cwd: string): Promise<string> {\n const configured = process.env.PM_BACKGROUND_CLI_ENTRY?.trim();\n if (configured && configured.length > 0) {\n const resolvedConfigured = path.resolve(cwd, configured);\n if (await pathExists(resolvedConfigured)) {\n return resolvedConfigured;\n }\n }\n const distEntry = path.resolve(cwd, \"dist\", \"cli.js\");\n if (await pathExists(distEntry)) {\n return distEntry;\n }\n const argvEntry = process.argv[1]?.trim();\n if (argvEntry && argvEntry.length > 0) {\n const resolvedArgvEntry = path.resolve(cwd, argvEntry);\n if (await pathExists(resolvedArgvEntry)) {\n return resolvedArgvEntry;\n }\n }\n throw new PmCliError(\n \"Unable to resolve a CLI entrypoint for background test runs. Build the project or set PM_BACKGROUND_CLI_ENTRY.\",\n EXIT_CODE.GENERIC_FAILURE,\n );\n}\n\nasync function refreshRunIfStale(pmRoot: string, record: BackgroundTestRunRecord): Promise<BackgroundTestRunRecord> {\n if (!BACKGROUND_RUN_ACTIVE_STATUSES.has(record.status)) {\n return record;\n }\n const workerAlive = isPidRunning(record.worker_pid);\n if (workerAlive) {\n return record;\n }\n if (record.finished_at) {\n return record;\n }\n const next: BackgroundTestRunRecord = {\n ...record,\n status: \"failed\",\n finished_at: nowIso(),\n error: record.error ?? \"Background test run worker exited before writing terminal status.\",\n };\n await writeBackgroundRunRecord(pmRoot, next);\n return next;\n}\n\n/**\n * Implements start background test run for the public runtime surface of this module.\n */\nexport async function startBackgroundTestRun(options: StartBackgroundTestRunOptions): Promise<StartBackgroundTestRunResult> {\n await ensureBackgroundRunStorage(options.pmRoot);\n const normalizedArgs = normalizeCommandArgs(options.commandArgs);\n if (normalizedArgs.length === 0) {\n throw new PmCliError(\"Background test run requires command arguments.\", EXIT_CODE.USAGE);\n }\n const fingerprint = buildBackgroundTestRunFingerprint(options.kind, normalizedArgs, options.pmRoot);\n const existingRuns = await listBackgroundTestRuns(options.pmRoot, {});\n for (const existing of existingRuns) {\n const refreshed = await refreshRunIfStale(options.pmRoot, existing);\n if (refreshed.fingerprint !== fingerprint) {\n continue;\n }\n if (!BACKGROUND_RUN_ACTIVE_STATUSES.has(refreshed.status) || !isPidRunning(refreshed.worker_pid)) {\n continue;\n }\n return {\n started: false,\n run: {\n ...refreshed,\n duplicate_of: refreshed.id,\n },\n duplicate_of: refreshed.id,\n };\n }\n\n const runId = buildRunId();\n const createdAt = nowIso();\n const stdoutPath = getTestRunStdoutPath(options.pmRoot, runId);\n const stderrPath = getTestRunStderrPath(options.pmRoot, runId);\n const resultPath = getTestRunResultPath(options.pmRoot, runId);\n await fs.writeFile(stdoutPath, \"\", \"utf8\");\n await fs.writeFile(stderrPath, \"\", \"utf8\");\n const record: BackgroundTestRunRecord = {\n id: runId,\n kind: options.kind,\n status: \"queued\",\n created_at: createdAt,\n updated_at: createdAt,\n requested_by: options.requestedBy,\n fingerprint,\n command_args: normalizedArgs,\n command_label: summarizeCommandLabel(normalizedArgs),\n pm_root: options.pmRoot,\n global_pm_root: options.globalPmRoot,\n target_id: options.targetId,\n status_filter: options.statusFilter,\n attempt: typeof options.attempt === \"number\" && Number.isFinite(options.attempt) && options.attempt >= 1\n ? Math.floor(options.attempt)\n : 1,\n resumed_from: options.resumedFrom,\n resumed_by: options.resumedBy,\n stdout_path: stdoutPath,\n stderr_path: stderrPath,\n result_path: resultPath,\n progress: {\n phase: \"queued\",\n message: \"Queued for background execution.\",\n heartbeat_at: createdAt,\n },\n };\n await writeBackgroundRunRecord(options.pmRoot, record);\n return {\n started: true,\n run: record,\n };\n}\n\n/**\n * Implements spawn background test run worker for the public runtime surface of this module.\n */\nexport async function spawnBackgroundTestRunWorker(options: SpawnBackgroundTestRunWorkerOptions): Promise<BackgroundTestRunRecord> {\n const record = await readBackgroundTestRunRecord(options.pmRoot, options.runId);\n if (!record) {\n throw new PmCliError(`Background test run ${options.runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n if (BACKGROUND_RUN_TERMINAL_STATUSES.has(record.status)) {\n throw new PmCliError(`Background test run ${record.id} is already terminal (${record.status}).`, EXIT_CODE.CONFLICT);\n }\n const cliEntry = await resolveBackgroundCliEntry(process.cwd());\n const args: string[] = [];\n if (options.noExtensions === true) {\n args.push(\"--no-extensions\");\n }\n args.push(\"--path\", record.pm_root, \"test-runs-worker\", record.id);\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n PM_PATH: record.pm_root,\n PM_GLOBAL_PATH: record.global_pm_root,\n PM_BACKGROUND_TEST_RUN_ID: record.id,\n PM_BACKGROUND_TEST_RUN_ATTEMPT: String(record.attempt),\n PM_BACKGROUND_TEST_RUN_RESUMED_FROM: record.resumed_from ?? \"\",\n FORCE_COLOR: \"0\",\n };\n const child = spawn(process.execPath, [cliEntry, ...args], {\n cwd: process.cwd(),\n env,\n detached: true,\n stdio: \"ignore\",\n windowsHide: true,\n });\n child.unref();\n const next: BackgroundTestRunRecord = {\n ...record,\n status: \"queued\",\n worker_pid: child.pid as number | undefined,\n progress: {\n phase: \"queued\",\n message: \"Worker process started.\",\n heartbeat_at: nowIso(),\n },\n };\n await writeBackgroundRunRecord(options.pmRoot, next);\n return next;\n}\n\nasync function appendFileOrdered(queue: Promise<void>, filePath: string, text: string): Promise<void> {\n await queue;\n await fs.appendFile(filePath, text, \"utf8\");\n}\n\n/**\n * Implements run background test run worker for the public runtime surface of this module.\n */\nexport async function runBackgroundTestRunWorker(pmRoot: string, runId: string, noExtensions = false): Promise<BackgroundTestRunRecord> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const record: BackgroundTestRunRecord = {\n ...loaded,\n status: \"running\",\n started_at: loaded.started_at ?? nowIso(),\n worker_pid: process.pid,\n progress: {\n phase: \"running\",\n message: \"Worker started.\",\n heartbeat_at: nowIso(),\n },\n };\n const cliEntry = await resolveBackgroundCliEntry(process.cwd());\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n PM_PATH: record.pm_root,\n PM_GLOBAL_PATH: record.global_pm_root,\n FORCE_COLOR: \"0\",\n };\n await writeBackgroundRunRecord(pmRoot, record);\n\n const childArgs = noExtensions ? [\"--no-extensions\", ...record.command_args] : [...record.command_args];\n const child = spawn(process.execPath, [cliEntry, ...childArgs], {\n cwd: process.cwd(),\n env,\n detached: false,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n windowsHide: true,\n });\n record.child_pid = child.pid as number | undefined;\n\n let writeQueue: Promise<void> = Promise.resolve();\n const scheduleRecordWrite = (): void => {\n writeQueue = writeQueue.then(async () => {\n try {\n await writeBackgroundRunRecord(pmRoot, record);\n } catch {\n // Keep worker alive even if a single metadata write fails.\n }\n });\n };\n\n let stdoutWriteQueue: Promise<void> = Promise.resolve();\n let stderrWriteQueue: Promise<void> = Promise.resolve();\n let stdoutBuffer = \"\";\n let stderrBuffer = \"\";\n let stopRequested = false;\n\n const requestStop = async (): Promise<void> => {\n if (stopRequested) {\n return;\n }\n stopRequested = true;\n record.stop_requested_at = nowIso();\n record.progress = {\n ...record.progress,\n phase: \"stopping\",\n message: \"Stop requested for background run.\",\n heartbeat_at: nowIso(),\n };\n scheduleRecordWrite();\n try {\n child.kill(\"SIGTERM\");\n } catch {\n // Child may already be gone.\n }\n const forceKillDelayMs = Number.parseInt(process.env.PM_BACKGROUND_RUN_FORCE_KILL_DELAY_MS ?? \"\", 10);\n const delay = Number.isFinite(forceKillDelayMs) && forceKillDelayMs > 0\n ? forceKillDelayMs\n : DEFAULT_BACKGROUND_RUN_FORCE_KILL_DELAY_MS;\n const forceTimer = setTimeout(() => {\n try {\n child.kill(\"SIGKILL\");\n } catch {\n // Child may already be gone.\n }\n }, delay);\n forceTimer.unref?.();\n };\n\n const onSignal = (): void => {\n void requestStop();\n };\n process.on(\"SIGTERM\", onSignal);\n process.on(\"SIGINT\", onSignal);\n\n const resourceIntervalMs = Number.parseInt(process.env.PM_BACKGROUND_RUN_RESOURCE_INTERVAL_MS ?? \"\", 10);\n const resourceInterval = Number.isFinite(resourceIntervalMs) && resourceIntervalMs > 0\n ? resourceIntervalMs\n : DEFAULT_BACKGROUND_RUN_RESOURCE_SNAPSHOT_INTERVAL_MS;\n const resourceTimer = setInterval(() => {\n void (async () => {\n record.resource = await buildResourceSnapshot(record);\n (record.progress as BackgroundRunProgress).heartbeat_at = nowIso();\n scheduleRecordWrite();\n })();\n }, resourceInterval);\n resourceTimer.unref?.();\n\n child.stdout?.on(\"data\", (chunk) => {\n const text = chunk.toString(\"utf8\");\n stdoutBuffer += text;\n stdoutWriteQueue = appendFileOrdered(stdoutWriteQueue, record.stdout_path, text);\n });\n\n const applyProgressLine = (line: string): boolean => {\n const progressPatch = parseProgressLine(line);\n if (!progressPatch) {\n return false;\n }\n if (progressPatch.item_id) {\n record.progress = {\n phase: (record.progress as BackgroundRunProgress).phase === \"stopping\" ? \"stopping\" : \"running\",\n message: line,\n heartbeat_at: nowIso(),\n item_index: progressPatch.item_index,\n item_total: progressPatch.item_total,\n item_id: progressPatch.item_id,\n linked_test_index: undefined,\n linked_test_total: undefined,\n current_command: undefined,\n elapsed_ms: undefined,\n };\n return true;\n }\n record.progress = {\n phase: (record.progress as BackgroundRunProgress).phase === \"stopping\" ? \"stopping\" : \"running\",\n message: line,\n heartbeat_at: nowIso(),\n item_index: progressPatch.item_index ?? record.progress?.item_index,\n item_total: progressPatch.item_total ?? record.progress?.item_total,\n item_id: progressPatch.item_id ?? record.progress?.item_id,\n linked_test_index: progressPatch.linked_test_index,\n linked_test_total: progressPatch.linked_test_total,\n current_command: progressPatch.current_command,\n elapsed_ms: progressPatch.elapsed_ms,\n };\n if (progressPatch.phase === \"finished\" && !stopRequested) {\n record.progress.phase = \"running\";\n }\n return true;\n };\n\n child.stderr?.on(\"data\", (chunk) => {\n const text = chunk.toString(\"utf8\");\n stderrWriteQueue = appendFileOrdered(stderrWriteQueue, record.stderr_path, text);\n stderrBuffer += text;\n const parts = stderrBuffer.split(/\\r?\\n/);\n stderrBuffer = parts.pop()!;\n let progressChanged = false;\n for (const part of parts) {\n const line = part.trimEnd();\n if (line.length > 0 && applyProgressLine(line)) {\n progressChanged = true;\n }\n }\n if (progressChanged) {\n scheduleRecordWrite();\n }\n });\n\n let exitCode: number | null = null;\n let signal: NodeJS.Signals | null = null;\n try {\n ({ code: exitCode, signal } = await new Promise<{ code: number | null; signal: NodeJS.Signals | null }>((resolve) => {\n child.on(\"close\", (code, closeSignal) => {\n resolve({ code, signal: closeSignal });\n });\n }));\n } finally {\n clearInterval(resourceTimer);\n process.off(\"SIGTERM\", onSignal);\n process.off(\"SIGINT\", onSignal);\n }\n\n await stdoutWriteQueue;\n await stderrWriteQueue;\n const trailingStderrLine = stderrBuffer.trimEnd();\n if (trailingStderrLine.length > 0 && applyProgressLine(trailingStderrLine)) {\n scheduleRecordWrite();\n }\n stderrBuffer = \"\";\n\n let parsedResult: unknown | null = null;\n if (stdoutBuffer.trim().length > 0) {\n try {\n parsedResult = JSON.parse(stdoutBuffer);\n } catch {\n parsedResult = null;\n }\n }\n const evaluated = evaluateWorkerResult(record.kind, parsedResult);\n record.summary = evaluated.summary;\n record.exit_code = typeof exitCode === \"number\" ? exitCode : undefined;\n record.signal = signal ?? undefined;\n record.finished_at = nowIso();\n record.status = stopRequested\n ? \"stopped\"\n : (record.exit_code === 0 &&\n (record.summary.failed ?? 0) === 0 &&\n record.summary.fail_on_skipped_triggered !== true)\n ? \"passed\"\n : \"failed\";\n record.progress = {\n phase: \"finished\",\n message: stopRequested ? \"Background run stopped.\" : `Background run finished with status=${record.status}.`,\n heartbeat_at: nowIso(),\n item_index: record.progress?.item_index,\n item_total: record.progress?.item_total,\n item_id: record.progress?.item_id,\n linked_test_index: record.progress?.linked_test_index,\n linked_test_total: record.progress?.linked_test_total,\n current_command: record.progress?.current_command,\n elapsed_ms: record.progress?.elapsed_ms,\n };\n record.resource = await buildResourceSnapshot(record);\n if (parsedResult !== null) {\n await writeFileAtomic(record.result_path, `${JSON.stringify(parsedResult, null, 2)}\\n`);\n } else {\n await writeFileAtomic(\n record.result_path,\n `${JSON.stringify(\n {\n parse_error: \"Background run output was not valid JSON.\",\n stdout_excerpt: tailLines(stdoutBuffer, DEFAULT_BACKGROUND_RUN_LOG_TAIL_LINES),\n },\n null,\n 2,\n )}\\n`,\n );\n }\n await writeBackgroundRunRecord(pmRoot, record);\n await writeQueue;\n return record;\n}\n\n/**\n * Implements list background test runs for the public runtime surface of this module.\n */\nexport async function listBackgroundTestRuns(\n pmRoot: string,\n options: ListBackgroundTestRunOptions,\n): Promise<BackgroundTestRunRecord[]> {\n const recordPaths = await listBackgroundRunRecordPaths(pmRoot);\n const runs: BackgroundTestRunRecord[] = [];\n for (const recordPath of recordPaths) {\n const raw = await readFileIfExists(recordPath);\n if (!raw) {\n continue;\n }\n const parsed = await parseBackgroundRunRecord(raw, recordPath);\n runs.push(parsed);\n }\n const refreshed: BackgroundTestRunRecord[] = [];\n for (const run of runs) {\n refreshed.push(await refreshRunIfStale(pmRoot, run));\n }\n const filtered = options.status ? refreshed.filter((entry) => entry.status === options.status) : refreshed;\n const sorted = filtered.sort((left, right) => {\n const byUpdated = Date.parse(right.updated_at) - Date.parse(left.updated_at);\n if (Number.isFinite(byUpdated) && byUpdated !== 0) {\n return byUpdated;\n }\n return right.id.localeCompare(left.id);\n });\n const limit = typeof options.limit === \"number\" && options.limit >= 0 ? options.limit : undefined;\n return limit === undefined ? sorted : sorted.slice(0, limit);\n}\n\n/**\n * Implements get background test run status for the public runtime surface of this module.\n */\nexport async function getBackgroundTestRunStatus(pmRoot: string, runId: string): Promise<BackgroundRunStatusView> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const refreshed = await refreshRunIfStale(pmRoot, loaded);\n const workerAlive = isPidRunning(refreshed.worker_pid);\n const childAlive = isPidRunning(refreshed.child_pid);\n if (refreshed.status === \"running\" && !childAlive && !refreshed.finished_at && !workerAlive) {\n refreshed.status = \"failed\";\n refreshed.finished_at = nowIso();\n refreshed.error = refreshed.error ?? \"Background run process exited unexpectedly.\";\n await writeBackgroundRunRecord(pmRoot, refreshed);\n }\n if (refreshed.status === \"running\") {\n refreshed.resource = await buildResourceSnapshot(refreshed);\n await writeBackgroundRunRecord(pmRoot, refreshed);\n }\n const heartbeatAt = refreshed.progress?.heartbeat_at;\n const heartbeatAtMs = heartbeatAt ? Date.parse(heartbeatAt) : Number.NaN;\n const lagMs = Number.isFinite(heartbeatAtMs) ? Math.max(0, nowMs() - heartbeatAtMs) : undefined;\n const staleMs = Number.parseInt(process.env.PM_BACKGROUND_RUN_HEARTBEAT_STALE_MS ?? \"\", 10);\n const staleThresholdMs = Number.isFinite(staleMs) && staleMs > 0 ? staleMs : DEFAULT_BACKGROUND_RUN_HEARTBEAT_STALE_MS;\n const healthState = refreshed.status === \"running\"\n ? lagMs !== undefined && lagMs > staleThresholdMs\n ? \"stale\"\n : \"healthy\"\n : \"inactive\";\n return {\n run: refreshed,\n health: {\n state: healthState,\n last_heartbeat_at: heartbeatAt,\n heartbeat_lag_ms: lagMs,\n worker_alive: workerAlive,\n child_alive: childAlive,\n },\n };\n}\n\n/**\n * Implements stop background test run for the public runtime surface of this module.\n */\nexport async function stopBackgroundTestRun(pmRoot: string, runId: string, force = false): Promise<StopBackgroundTestRunResult> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const refreshed = await refreshRunIfStale(pmRoot, loaded);\n if (BACKGROUND_RUN_TERMINAL_STATUSES.has(refreshed.status)) {\n return {\n run: refreshed,\n signal_sent: \"none\",\n };\n }\n let signalSent: \"SIGTERM\" | \"SIGKILL\" | \"none\" = \"none\";\n const signal: NodeJS.Signals = force ? \"SIGKILL\" : \"SIGTERM\";\n if (isPidRunning(refreshed.worker_pid) && refreshed.worker_pid) {\n try {\n process.kill(refreshed.worker_pid, signal);\n signalSent = signal;\n } catch {\n signalSent = \"none\";\n }\n }\n if (signalSent === \"none\") {\n refreshed.status = \"stopped\";\n refreshed.finished_at = refreshed.finished_at ?? nowIso();\n }\n refreshed.stop_requested_at = nowIso();\n refreshed.progress = {\n phase: \"stopping\",\n message: signalSent === \"none\" ? \"Run marked stopped.\" : `Stop requested via ${signalSent}.`,\n heartbeat_at: nowIso(),\n item_index: refreshed.progress?.item_index,\n item_total: refreshed.progress?.item_total,\n item_id: refreshed.progress?.item_id,\n linked_test_index: refreshed.progress?.linked_test_index,\n linked_test_total: refreshed.progress?.linked_test_total,\n current_command: refreshed.progress?.current_command,\n elapsed_ms: refreshed.progress?.elapsed_ms,\n };\n await writeBackgroundRunRecord(pmRoot, refreshed);\n return {\n run: refreshed,\n signal_sent: signalSent,\n };\n}\n\n/**\n * Implements resume background test run for the public runtime surface of this module.\n */\nexport async function resumeBackgroundTestRun(\n pmRoot: string,\n runId: string,\n requestedBy: string,\n noExtensions = false,\n): Promise<BackgroundTestRunRecord> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const refreshed = await refreshRunIfStale(pmRoot, loaded);\n if (!BACKGROUND_RUN_TERMINAL_STATUSES.has(refreshed.status)) {\n throw new PmCliError(`Background test run ${runId} is not terminal and cannot be resumed.`, EXIT_CODE.CONFLICT);\n }\n const started = await startBackgroundTestRun({\n pmRoot: refreshed.pm_root,\n globalPmRoot: refreshed.global_pm_root,\n kind: refreshed.kind,\n commandArgs: refreshed.command_args,\n requestedBy,\n targetId: refreshed.target_id,\n statusFilter: refreshed.status_filter,\n resumedFrom: refreshed.id,\n resumedBy: requestedBy,\n attempt: refreshed.attempt + 1,\n });\n if (!started.started) {\n return started.run;\n }\n const spawned = await spawnBackgroundTestRunWorker({\n pmRoot,\n runId: started.run.id,\n noExtensions,\n });\n const prior: BackgroundTestRunRecord = {\n ...refreshed,\n resumed_by: spawned.id,\n };\n await writeBackgroundRunRecord(pmRoot, prior);\n return spawned;\n}\n\n/**\n * Implements read background test run logs for the public runtime surface of this module.\n */\nexport async function readBackgroundTestRunLogs(\n pmRoot: string,\n runId: string,\n stream: BackgroundLogStream,\n tail: number | undefined,\n): Promise<BackgroundRunLogsResult> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const resolvedTail = typeof tail === \"number\" && Number.isFinite(tail) && tail >= 0 ? Math.floor(tail) : DEFAULT_BACKGROUND_RUN_LOG_TAIL_LINES;\n const stdoutRaw = stream === \"stdout\" || stream === \"both\" ? (await readFileIfExists(loaded.stdout_path)) ?? \"\" : \"\";\n const stderrRaw = stream === \"stderr\" || stream === \"both\" ? (await readFileIfExists(loaded.stderr_path)) ?? \"\" : \"\";\n return {\n run: loaded,\n stream,\n tail: resolvedTail,\n stdout: stream === \"stdout\" || stream === \"both\" ? tailLines(stdoutRaw, resolvedTail) : [],\n stderr: stream === \"stderr\" || stream === \"both\" ? tailLines(stderrRaw, resolvedTail) : [],\n };\n}\n\nexport const _testOnly = {\n buildResourceSnapshot,\n evaluateWorkerResult,\n isPidRunning,\n par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pB,OACA,SACA,QAAqB;AAKrB,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,QAAM,kBAAkB,MAAM;AAC9B,QAAM,UAAU,MAAM,sBAAsB,QAAQ,OAAO,QAAQ,UAAU,IAAI;AACjF,SAAO;IACL,KAAK,QAAQ;IACb,aAAa,QAAQ;;AAEzB;AAaA,eAAsB,kBACpB,OACA,SACA,QAAqB;AAKrB,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,QAAM,kBAAkB,MAAM;AAC9B,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,cAAc,mBAAmB,QAAQ,QAAQ,SAAS,cAAc;AAC9E,QAAM,UAAU,MAAM,wBAAwB,QAAQ,OAAO,aAAa,QAAQ,iBAAiB,IAAI;AACvG,SAAO;IACL,cAAc;IACd,KAAK;;AAET;AAKA,eAAsB,kBAAkB,OAAe,QAAqB;AAK1E,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,QAAM,kBAAkB,MAAM;AAC9B,QAAM,WAAW,MAAM,2BAA2B,QAAQ,OAAO,OAAO,iBAAiB,IAAI;AAC7F,SAAO;IACL,IAAI,SAAS;IACb,QAAQ,SAAS;IACjB,WAAW,SAAS;;AAExB","debugId":"883aa05b-84b3-5651-8b99-ea04681d4f70"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseLimit
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-YJ3SUEPD.js";
|
|
3
|
+
} from "./chunk-7L6TXOOC.js";
|
|
5
4
|
import {
|
|
6
5
|
nowIso
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MLHX6DN5.js";
|
|
8
7
|
import {
|
|
9
8
|
EXIT_CODE,
|
|
10
9
|
PmCliError,
|
|
@@ -25,7 +24,7 @@ import {
|
|
|
25
24
|
resolveGlobalPmRoot,
|
|
26
25
|
resolvePmRoot,
|
|
27
26
|
writeFileAtomic
|
|
28
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-SNUK7H5J.js";
|
|
29
28
|
|
|
30
29
|
// dist/cli/commands/test-runs.js
|
|
31
30
|
import os from "node:os";
|
|
@@ -38,7 +37,7 @@ import path from "node:path";
|
|
|
38
37
|
!(function() {
|
|
39
38
|
try {
|
|
40
39
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
41
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
40
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "831e5e73-7cc7-5703-981e-784a2fef0e81");
|
|
42
41
|
} catch (e2) {
|
|
43
42
|
}
|
|
44
43
|
})();
|
|
@@ -998,4 +997,4 @@ export {
|
|
|
998
997
|
runTestRunsStop,
|
|
999
998
|
runTestRunsWorker
|
|
1000
999
|
};
|
|
1001
|
-
//# sourceMappingURL=test-runs-
|
|
1000
|
+
//# sourceMappingURL=test-runs-LANLLPVO.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/test-runs.ts", "../../../../../../../../core/test/background-runs.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module cli/commands/test-runs\n *\n * Implements the pm test runs command surface and its agent-facing runtime behavior.\n */\nimport os from \"node:os\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport {\n type BackgroundLogStream,\n type BackgroundTestRunKind,\n type BackgroundTestRunStatus,\n getBackgroundTestRunStatus,\n listBackgroundTestRuns,\n readBackgroundTestRunLogs,\n resumeBackgroundTestRun,\n runBackgroundTestRunWorker,\n spawnBackgroundTestRunWorker,\n startBackgroundTestRun,\n stopBackgroundTestRun,\n} from \"../../core/test/background-runs.js\";\nimport { getSettingsPath, resolveGlobalPmRoot, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { parseLimit } from \"../shared-parsers.js\";\n\nconst BACKGROUND_STATUS_VALUES: readonly BackgroundTestRunStatus[] = [\"queued\", \"running\", \"passed\", \"failed\", \"stopped\", \"canceled\"];\nconst BACKGROUND_STREAM_VALUES: readonly BackgroundLogStream[] = [\"stdout\", \"stderr\", \"both\"];\n\nfunction normalizeStatus(value: string | undefined): BackgroundTestRunStatus | undefined {\n if (value === undefined) {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if ((BACKGROUND_STATUS_VALUES as readonly string[]).includes(normalized)) {\n return normalized as BackgroundTestRunStatus;\n }\n throw new PmCliError(`Invalid --status value \"${value}\"`, EXIT_CODE.USAGE);\n}\n\nfunction normalizeStream(value: string | undefined): BackgroundLogStream {\n if (value === undefined || value.trim().length === 0) {\n return \"stderr\";\n }\n const normalized = value.trim().toLowerCase();\n if ((BACKGROUND_STREAM_VALUES as readonly string[]).includes(normalized)) {\n return normalized as BackgroundLogStream;\n }\n throw new PmCliError(`Invalid --stream value \"${value}\"`, EXIT_CODE.USAGE);\n}\n\nfunction resolveWhoamiFallback(): string | undefined {\n try {\n const username = os.userInfo().username.trim();\n if (username.length > 0) {\n return username;\n }\n } catch {\n // Fall back to environment-derived attribution.\n }\n return undefined;\n}\n\nfunction resolveRequestedBy(author: string | undefined, fallback: string): string {\n const candidates = [\n author,\n process.env.PM_AUTHOR,\n fallback,\n process.env.USER,\n process.env.LOGNAME,\n process.env.USERNAME,\n resolveWhoamiFallback(),\n ];\n for (const candidate of candidates) {\n if (typeof candidate !== \"string\") {\n continue;\n }\n const trimmed = candidate.trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n }\n return \"unknown\";\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n}\n\n/**\n * Documents the start background run command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundRunCommandOptions {\n kind: BackgroundTestRunKind;\n commandArgs: string[];\n targetId?: string;\n statusFilter?: string;\n author?: string;\n noExtensions?: boolean;\n}\n\n/**\n * Documents the start background run result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundRunResult {\n started: boolean;\n duplicate_of?: string;\n run: unknown;\n}\n\n/**\n * Implements run start background run for the public runtime surface of this module.\n */\nexport async function runStartBackgroundRun(\n options: StartBackgroundRunCommandOptions,\n global: GlobalOptions,\n): Promise<StartBackgroundRunResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const globalPmRoot = resolveGlobalPmRoot(process.cwd());\n await ensureInitialized(pmRoot);\n const settings = await readSettings(pmRoot);\n const requestedBy = resolveRequestedBy(options.author, settings.author_default);\n const started = await startBackgroundTestRun({\n pmRoot,\n globalPmRoot,\n kind: options.kind,\n commandArgs: options.commandArgs,\n requestedBy,\n targetId: options.targetId,\n statusFilter: options.statusFilter,\n });\n if (!started.started) {\n return {\n started: false,\n duplicate_of: started.duplicate_of,\n run: started.run,\n };\n }\n const spawned = await spawnBackgroundTestRunWorker({\n pmRoot,\n runId: started.run.id,\n noExtensions: options.noExtensions === true,\n });\n return {\n started: true,\n run: spawned,\n };\n}\n\n/**\n * Documents the test runs list command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsListCommandOptions {\n status?: string;\n limit?: string;\n}\n\n/**\n * Implements run test runs list for the public runtime surface of this module.\n */\nexport async function runTestRunsList(options: TestRunsListCommandOptions, global: GlobalOptions): Promise<{\n runs: unknown[];\n count: number;\n filters: {\n status?: BackgroundTestRunStatus;\n limit?: number;\n };\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const status = normalizeStatus(options.status);\n const limit = parseLimit(options.limit, \"limit\");\n const runs = await listBackgroundTestRuns(pmRoot, { status, limit });\n return {\n runs,\n count: runs.length,\n filters: {\n status,\n limit,\n },\n };\n}\n\n/**\n * Implements run test runs status for the public runtime surface of this module.\n */\nexport async function runTestRunsStatus(runId: string, global: GlobalOptions): Promise<{\n run: unknown;\n health: unknown;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const status = await getBackgroundTestRunStatus(pmRoot, runId);\n return {\n run: status.run,\n health: status.health,\n };\n}\n\n/**\n * Documents the test runs logs command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsLogsCommandOptions {\n stream?: string;\n tail?: string;\n}\n\n/**\n * Implements run test runs logs for the public runtime surface of this module.\n */\nexport async function runTestRunsLogs(\n runId: string,\n options: TestRunsLogsCommandOptions,\n global: GlobalOptions,\n): Promise<{\n run: unknown;\n stream: BackgroundLogStream;\n tail: number;\n stdout: string[];\n stderr: string[];\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const stream = normalizeStream(options.stream);\n const tail = parseLimit(options.tail, \"tail\");\n const logs = await readBackgroundTestRunLogs(pmRoot, runId, stream, tail);\n return {\n run: logs.run,\n stream: logs.stream,\n tail: logs.tail,\n stdout: logs.stdout,\n stderr: logs.stderr,\n };\n}\n\n/**\n * Documents the test runs stop command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsStopCommandOptions {\n force?: boolean;\n}\n\n/**\n * Implements run test runs stop for the public runtime surface of this module.\n */\nexport async function runTestRunsStop(\n runId: string,\n options: TestRunsStopCommandOptions,\n global: GlobalOptions,\n): Promise<{\n run: unknown;\n signal_sent: \"SIGTERM\" | \"SIGKILL\" | \"none\";\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const stopped = await stopBackgroundTestRun(pmRoot, runId, options.force === true);\n return {\n run: stopped.run,\n signal_sent: stopped.signal_sent,\n };\n}\n\n/**\n * Documents the test runs resume command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TestRunsResumeCommandOptions {\n author?: string;\n noExtensions?: boolean;\n}\n\n/**\n * Implements run test runs resume for the public runtime surface of this module.\n */\nexport async function runTestRunsResume(\n runId: string,\n options: TestRunsResumeCommandOptions,\n global: GlobalOptions,\n): Promise<{\n resumed_from: string;\n run: unknown;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const settings = await readSettings(pmRoot);\n const requestedBy = resolveRequestedBy(options.author, settings.author_default);\n const resumed = await resumeBackgroundTestRun(pmRoot, runId, requestedBy, options.noExtensions === true);\n return {\n resumed_from: runId,\n run: resumed,\n };\n}\n\n/**\n * Implements run test runs worker for the public runtime surface of this module.\n */\nexport async function runTestRunsWorker(runId: string, global: GlobalOptions): Promise<{\n id: string;\n status: BackgroundTestRunStatus;\n exit_code?: number;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const finished = await runBackgroundTestRunWorker(pmRoot, runId, global.noExtensions === true);\n return {\n id: finished.id,\n status: finished.status,\n exit_code: finished.exit_code,\n };\n}\n", "/**\n * @module core/test/background-runs\n *\n * Runs and records linked-test orchestration for Background Runs.\n */\nimport fs from \"node:fs/promises\";\nimport { spawn } from \"node:child_process\";\nimport { createHash, randomBytes } from \"node:crypto\";\nimport path from \"node:path\";\nimport { ensureDir, pathExists, readFileIfExists, writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { nowIso } from \"../shared/time.js\";\nimport {\n getTestRunRecordPath,\n getTestRunResultPath,\n getTestRunStderrPath,\n getTestRunStdoutPath,\n getTestRunsPath,\n getTestRunsRecordsPath,\n getTestRunsResultsPath,\n getTestRunsStderrPath,\n getTestRunsStdoutPath,\n} from \"../store/paths.js\";\n\nconst BACKGROUND_RUN_ACTIVE_STATUSES = new Set<BackgroundTestRunStatus>([\"queued\", \"running\"]);\nconst BACKGROUND_RUN_TERMINAL_STATUSES = new Set<BackgroundTestRunStatus>([\"passed\", \"failed\", \"stopped\", \"canceled\"]);\nconst DEFAULT_BACKGROUND_RUN_RESOURCE_SNAPSHOT_INTERVAL_MS = 3000;\nconst DEFAULT_BACKGROUND_RUN_FORCE_KILL_DELAY_MS = 3000;\nconst DEFAULT_BACKGROUND_RUN_HEARTBEAT_STALE_MS = 30000;\nconst DEFAULT_BACKGROUND_RUN_LOG_TAIL_LINES = 100;\nconst PROC_STAT_TICKS_PER_SECOND = 100;\n\n/**\n * Restricts background test run kind values accepted by command, SDK, and storage contracts.\n */\nexport type BackgroundTestRunKind = \"test\" | \"test-all\";\n\n/**\n * Restricts background test run status values accepted by command, SDK, and storage contracts.\n */\nexport type BackgroundTestRunStatus = \"queued\" | \"running\" | \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n\n/**\n * Restricts background log stream values accepted by command, SDK, and storage contracts.\n */\nexport type BackgroundLogStream = \"stdout\" | \"stderr\" | \"both\";\n\n/**\n * Documents the background run progress payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunProgress {\n phase: \"queued\" | \"running\" | \"stopping\" | \"finished\";\n message?: string;\n item_index?: number;\n item_total?: number;\n item_id?: string;\n linked_test_index?: number;\n linked_test_total?: number;\n current_command?: string;\n elapsed_ms?: number;\n heartbeat_at?: string;\n}\n\n/**\n * Documents the background run resource snapshot payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunResourceSnapshot {\n recorded_at: string;\n rss_bytes?: number;\n cpu_user_seconds?: number;\n cpu_system_seconds?: number;\n uptime_seconds?: number;\n}\n\n/**\n * Documents the background run summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunSummary {\n items?: number;\n linked_tests?: number;\n passed: number;\n failed: number;\n skipped: number;\n fail_on_skipped_triggered?: boolean;\n}\n\n/**\n * Documents the background test run record payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundTestRunRecord {\n id: string;\n kind: BackgroundTestRunKind;\n status: BackgroundTestRunStatus;\n created_at: string;\n started_at?: string;\n finished_at?: string;\n updated_at: string;\n requested_by: string;\n fingerprint: string;\n command_args: string[];\n command_label: string;\n pm_root: string;\n global_pm_root: string;\n target_id?: string;\n status_filter?: string;\n attempt: number;\n resumed_from?: string;\n resumed_by?: string;\n worker_pid?: number;\n child_pid?: number;\n exit_code?: number;\n signal?: string;\n stdout_path: string;\n stderr_path: string;\n result_path: string;\n progress?: BackgroundRunProgress;\n resource?: BackgroundRunResourceSnapshot;\n summary?: BackgroundRunSummary;\n stop_requested_at?: string;\n duplicate_of?: string;\n error?: string;\n}\n\n/**\n * Documents the start background test run options payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundTestRunOptions {\n pmRoot: string;\n globalPmRoot: string;\n kind: BackgroundTestRunKind;\n commandArgs: string[];\n requestedBy: string;\n targetId?: string;\n statusFilter?: string;\n resumedFrom?: string;\n resumedBy?: string;\n attempt?: number;\n}\n\n/**\n * Documents the start background test run result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StartBackgroundTestRunResult {\n started: boolean;\n run: BackgroundTestRunRecord;\n duplicate_of?: string;\n}\n\n/**\n * Documents the spawn background test run worker options payload exchanged by command, SDK, and package integrations.\n */\nexport interface SpawnBackgroundTestRunWorkerOptions {\n pmRoot: string;\n runId: string;\n noExtensions?: boolean;\n}\n\n/**\n * Documents the stop background test run result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StopBackgroundTestRunResult {\n run: BackgroundTestRunRecord;\n signal_sent: \"SIGTERM\" | \"SIGKILL\" | \"none\";\n}\n\n/**\n * Documents the list background test run options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListBackgroundTestRunOptions {\n status?: BackgroundTestRunStatus;\n limit?: number;\n}\n\n/**\n * Documents the background run health payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunHealth {\n state: \"healthy\" | \"stale\" | \"inactive\";\n last_heartbeat_at?: string;\n heartbeat_lag_ms?: number;\n worker_alive: boolean;\n child_alive: boolean;\n}\n\n/**\n * Documents the background run status view payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunStatusView {\n run: BackgroundTestRunRecord;\n health: BackgroundRunHealth;\n}\n\n/**\n * Documents the background run logs result payload exchanged by command, SDK, and package integrations.\n */\nexport interface BackgroundRunLogsResult {\n run: BackgroundTestRunRecord;\n stream: BackgroundLogStream;\n tail: number;\n stdout: string[];\n stderr: string[];\n}\n\ninterface WorkerEvaluationResult {\n summary: BackgroundRunSummary;\n parsedResult: unknown | null;\n}\n\nfunction nowMs(): number {\n return Date.now();\n}\n\nfunction normalizeCommandArgs(args: string[]): string[] {\n return args.map((entry) => entry.trim()).filter((entry) => entry.length > 0);\n}\n\nfunction summarizeCommandLabel(args: string[]): string {\n const joined = args.join(\" \").replaceAll(/\\s+/g, \" \").trim();\n if (joined.length <= 180) {\n return joined;\n }\n return `${joined.slice(0, 177)}...`;\n}\n\nfunction buildRunId(): string {\n const timePart = Date.now().toString(36);\n const randomPart = randomBytes(3).toString(\"hex\");\n return `tr-${timePart}-${randomPart}`;\n}\n\n/**\n * Implements build background test run fingerprint for the public runtime surface of this module.\n */\nexport function buildBackgroundTestRunFingerprint(kind: BackgroundTestRunKind, commandArgs: string[], pmRoot: string): string {\n const payload = {\n kind,\n command: normalizeCommandArgs(commandArgs),\n pm_root: path.resolve(pmRoot),\n };\n return createHash(\"sha256\").update(JSON.stringify(payload)).digest(\"hex\");\n}\n\nfunction isPidRunning(pid: number | undefined): boolean {\n if (!Number.isInteger(pid) || !pid || pid <= 0) {\n return false;\n }\n try {\n process.kill(pid, 0);\n return true;\n } catch (error: unknown) {\n const code = typeof error === \"object\" && error !== null && \"code\" in error ? (error as { code?: string }).code : undefined;\n return code === \"EPERM\";\n }\n}\n\nasync function ensureBackgroundRunStorage(pmRoot: string): Promise<void> {\n await ensureDir(getTestRunsPath(pmRoot));\n await ensureDir(getTestRunsRecordsPath(pmRoot));\n await ensureDir(getTestRunsStdoutPath(pmRoot));\n await ensureDir(getTestRunsStderrPath(pmRoot));\n await ensureDir(getTestRunsResultsPath(pmRoot));\n}\n\nasync function parseBackgroundRunRecord(raw: string, recordPath: string): Promise<BackgroundTestRunRecord> {\n try {\n const parsed = JSON.parse(raw) as BackgroundTestRunRecord;\n if (!parsed || typeof parsed !== \"object\" || typeof parsed.id !== \"string\") {\n throw new Error(\"invalid run record payload\");\n }\n return parsed;\n } catch (error: unknown) {\n throw new PmCliError(\n `Failed to parse background test run record at ${recordPath}: ${error instanceof Error ? error.message : String(error)}`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n}\n\nasync function writeBackgroundRunRecord(pmRoot: string, record: BackgroundTestRunRecord): Promise<void> {\n const next: BackgroundTestRunRecord = {\n ...record,\n updated_at: nowIso(),\n };\n await writeFileAtomic(getTestRunRecordPath(pmRoot, record.id), `${JSON.stringify(next, null, 2)}\\n`);\n}\n\n/**\n * Implements read background test run record for the public runtime surface of this module.\n */\nexport async function readBackgroundTestRunRecord(pmRoot: string, runId: string): Promise<BackgroundTestRunRecord | null> {\n const recordPath = getTestRunRecordPath(pmRoot, runId);\n const raw = await readFileIfExists(recordPath);\n if (!raw) {\n return null;\n }\n return parseBackgroundRunRecord(raw, recordPath);\n}\n\nasync function listBackgroundRunRecordPaths(pmRoot: string): Promise<string[]> {\n const recordsRoot = getTestRunsRecordsPath(pmRoot);\n if (!(await pathExists(recordsRoot))) {\n return [];\n }\n const entries = await fs.readdir(recordsRoot, { withFileTypes: true });\n return entries\n .filter((entry) => entry.isFile() && entry.name.endsWith(\".json\"))\n .map((entry) => path.join(recordsRoot, entry.name))\n .sort((left, right) => right.localeCompare(left));\n}\n\nfunction parseLinuxRssStatus(raw: string): number | undefined {\n const match = raw.match(/^VmRSS:\\s+(\\d+)\\s+kB$/m);\n if (!match) {\n return undefined;\n }\n return Number.parseInt(match[1], 10) * 1024;\n}\n\nasync function readLinuxRssBytes(pid: number): Promise<number | undefined> {\n if (process.platform !== \"linux\") {\n return undefined;\n }\n try {\n const raw = await fs.readFile(`/proc/${pid}/status`, \"utf8\");\n return parseLinuxRssStatus(raw);\n } catch {\n return undefined;\n }\n}\n\nfunction parseLinuxCpuStat(raw: string): { cpu_user_seconds?: number; cpu_system_seconds?: number } {\n const closeParenIndex = raw.lastIndexOf(\")\");\n if (closeParenIndex < 0) {\n return {};\n }\n const remainder = raw.slice(closeParenIndex + 2).trim();\n const parts = remainder.split(/\\s+/);\n const utimeTicks = Number.parseInt(parts[11], 10);\n const stimeTicks = Number.parseInt(parts[12], 10);\n if (!Number.isFinite(utimeTicks) || !Number.isFinite(stimeTicks)) {\n return {};\n }\n return {\n cpu_user_seconds: utimeTicks / PROC_STAT_TICKS_PER_SECOND,\n cpu_system_seconds: stimeTicks / PROC_STAT_TICKS_PER_SECOND,\n };\n}\n\nasync function readLinuxCpuSeconds(\n pid: number,\n): Promise<{ cpu_user_seconds?: number; cpu_system_seconds?: number }> {\n if (process.platform !== \"linux\") {\n return {};\n }\n try {\n const raw = await fs.readFile(`/proc/${pid}/stat`, \"utf8\");\n return parseLinuxCpuStat(raw);\n } catch {\n /* c8 ignore next -- /proc entries can disappear between liveness and stat reads. */\n return {};\n }\n}\n\nasync function buildResourceSnapshot(record: BackgroundTestRunRecord): Promise<BackgroundRunResourceSnapshot | undefined> {\n const pid = record.child_pid ?? record.worker_pid;\n if (!isPidRunning(pid)) {\n return undefined;\n }\n const rssBytes = await readLinuxRssBytes(pid as number);\n const cpu = await readLinuxCpuSeconds(pid as number);\n const startedAtMs = record.started_at ? Date.parse(record.started_at) : Number.NaN;\n const uptimeSeconds = Number.isFinite(startedAtMs) ? Math.max(0, (nowMs() - startedAtMs) / 1000) : undefined;\n return {\n recorded_at: nowIso(),\n rss_bytes: rssBytes,\n cpu_user_seconds: cpu.cpu_user_seconds,\n cpu_system_seconds: cpu.cpu_system_seconds,\n uptime_seconds: uptimeSeconds,\n };\n}\n\nfunction readCount(value: unknown): number {\n return typeof value === \"number\" && Number.isFinite(value) ? value : 0;\n}\n\nfunction evaluateWorkerResult(kind: BackgroundTestRunKind, payload: unknown): WorkerEvaluationResult {\n if (!payload || typeof payload !== \"object\") {\n return {\n summary: {\n passed: 0,\n failed: 1,\n skipped: 0,\n },\n parsedResult: null,\n };\n }\n const record = payload as Record<string, unknown>;\n if (kind === \"test-all\") {\n const totals = (record.totals ?? {}) as Record<string, unknown>;\n return {\n summary: {\n items: typeof totals.items === \"number\" ? totals.items : undefined,\n linked_tests: typeof totals.linked_tests === \"number\" ? totals.linked_tests : undefined,\n passed: readCount(totals.passed),\n failed: readCount(totals.failed),\n skipped: readCount(totals.skipped),\n fail_on_skipped_triggered: record.fail_on_skipped_triggered === true ? true : undefined,\n },\n parsedResult: payload,\n };\n }\n const runResults = Array.isArray(record.run_results) ? record.run_results : [];\n let passed = 0;\n let failed = 0;\n let skipped = 0;\n for (const entry of runResults) {\n if (!entry || typeof entry !== \"object\") {\n continue;\n }\n const status = (entry as { status?: unknown }).status;\n if (status === \"passed\") {\n passed += 1;\n continue;\n }\n if (status === \"failed\") {\n failed += 1;\n continue;\n }\n skipped += 1;\n }\n return {\n summary: {\n passed,\n failed,\n skipped,\n fail_on_skipped_triggered: record.fail_on_skipped_triggered === true ? true : undefined,\n },\n parsedResult: payload,\n };\n}\n\nfunction parseProgressLine(stderrLine: string): Partial<BackgroundRunProgress> | null {\n const line = stderrLine.trim();\n if (line.length === 0) {\n return null;\n }\n const testAllMatch = line.match(/\\[pm test-all\\]\\s+item\\s+(\\d+)\\/(\\d+)\\s+(start|end)\\s+id=([^\\s]+)/i);\n if (testAllMatch) {\n const itemIndex = Number.parseInt(testAllMatch[1], 10);\n const itemTotal = Number.parseInt(testAllMatch[2], 10);\n return {\n item_index: itemIndex,\n item_total: itemTotal,\n item_id: testAllMatch[4],\n linked_test_index: undefined,\n linked_test_total: undefined,\n current_command: undefined,\n elapsed_ms: undefined,\n heartbeat_at: nowIso(),\n phase: testAllMatch[3]?.toLowerCase() === \"end\" ? \"finished\" : \"running\",\n };\n }\n const linkedTestMatch = line.match(/\\[pm test\\]\\s+linked-test\\s+(\\d+)\\/(\\d+)\\s+(start|running|end)(?:.*elapsed_ms=(\\d+))?/i);\n if (!linkedTestMatch) {\n return null;\n }\n const index = Number.parseInt(linkedTestMatch[1], 10);\n const total = Number.parseInt(linkedTestMatch[2], 10);\n const elapsed = linkedTestMatch[4] ? Number.parseInt(linkedTestMatch[4], 10) : undefined;\n const commandMatch = line.match(/\\scommand=\"((?:\\\\.|[^\"\\\\])*)\"/);\n const currentCommand = commandMatch\n ? commandMatch[1].replaceAll('\\\\\"', '\"').replaceAll(\"\\\\\\\\\", \"\\\\\")\n : undefined;\n return {\n linked_test_index: index,\n linked_test_total: total,\n current_command: currentCommand,\n elapsed_ms: Number.isFinite(elapsed) ? elapsed : undefined,\n heartbeat_at: nowIso(),\n phase: linkedTestMatch[3]?.toLowerCase() === \"end\" ? \"finished\" : \"running\",\n };\n}\n\nfunction splitLines(value: string): string[] {\n return value\n .split(/\\r?\\n/)\n .map((entry) => entry.trimEnd())\n .filter((entry) => entry.length > 0);\n}\n\nfunction tailLines(value: string, limit: number): string[] {\n if (limit <= 0) {\n return [];\n }\n const lines = splitLines(value);\n if (lines.length <= limit) {\n return lines;\n }\n return lines.slice(lines.length - limit);\n}\n\nasync function resolveBackgroundCliEntry(cwd: string): Promise<string> {\n const configured = process.env.PM_BACKGROUND_CLI_ENTRY?.trim();\n if (configured && configured.length > 0) {\n const resolvedConfigured = path.resolve(cwd, configured);\n if (await pathExists(resolvedConfigured)) {\n return resolvedConfigured;\n }\n }\n const distEntry = path.resolve(cwd, \"dist\", \"cli.js\");\n if (await pathExists(distEntry)) {\n return distEntry;\n }\n const argvEntry = process.argv[1]?.trim();\n if (argvEntry && argvEntry.length > 0) {\n const resolvedArgvEntry = path.resolve(cwd, argvEntry);\n if (await pathExists(resolvedArgvEntry)) {\n return resolvedArgvEntry;\n }\n }\n throw new PmCliError(\n \"Unable to resolve a CLI entrypoint for background test runs. Build the project or set PM_BACKGROUND_CLI_ENTRY.\",\n EXIT_CODE.GENERIC_FAILURE,\n );\n}\n\nasync function refreshRunIfStale(pmRoot: string, record: BackgroundTestRunRecord): Promise<BackgroundTestRunRecord> {\n if (!BACKGROUND_RUN_ACTIVE_STATUSES.has(record.status)) {\n return record;\n }\n const workerAlive = isPidRunning(record.worker_pid);\n if (workerAlive) {\n return record;\n }\n if (record.finished_at) {\n return record;\n }\n const next: BackgroundTestRunRecord = {\n ...record,\n status: \"failed\",\n finished_at: nowIso(),\n error: record.error ?? \"Background test run worker exited before writing terminal status.\",\n };\n await writeBackgroundRunRecord(pmRoot, next);\n return next;\n}\n\n/**\n * Implements start background test run for the public runtime surface of this module.\n */\nexport async function startBackgroundTestRun(options: StartBackgroundTestRunOptions): Promise<StartBackgroundTestRunResult> {\n await ensureBackgroundRunStorage(options.pmRoot);\n const normalizedArgs = normalizeCommandArgs(options.commandArgs);\n if (normalizedArgs.length === 0) {\n throw new PmCliError(\"Background test run requires command arguments.\", EXIT_CODE.USAGE);\n }\n const fingerprint = buildBackgroundTestRunFingerprint(options.kind, normalizedArgs, options.pmRoot);\n const existingRuns = await listBackgroundTestRuns(options.pmRoot, {});\n for (const existing of existingRuns) {\n const refreshed = await refreshRunIfStale(options.pmRoot, existing);\n if (refreshed.fingerprint !== fingerprint) {\n continue;\n }\n if (!BACKGROUND_RUN_ACTIVE_STATUSES.has(refreshed.status) || !isPidRunning(refreshed.worker_pid)) {\n continue;\n }\n return {\n started: false,\n run: {\n ...refreshed,\n duplicate_of: refreshed.id,\n },\n duplicate_of: refreshed.id,\n };\n }\n\n const runId = buildRunId();\n const createdAt = nowIso();\n const stdoutPath = getTestRunStdoutPath(options.pmRoot, runId);\n const stderrPath = getTestRunStderrPath(options.pmRoot, runId);\n const resultPath = getTestRunResultPath(options.pmRoot, runId);\n await fs.writeFile(stdoutPath, \"\", \"utf8\");\n await fs.writeFile(stderrPath, \"\", \"utf8\");\n const record: BackgroundTestRunRecord = {\n id: runId,\n kind: options.kind,\n status: \"queued\",\n created_at: createdAt,\n updated_at: createdAt,\n requested_by: options.requestedBy,\n fingerprint,\n command_args: normalizedArgs,\n command_label: summarizeCommandLabel(normalizedArgs),\n pm_root: options.pmRoot,\n global_pm_root: options.globalPmRoot,\n target_id: options.targetId,\n status_filter: options.statusFilter,\n attempt: typeof options.attempt === \"number\" && Number.isFinite(options.attempt) && options.attempt >= 1\n ? Math.floor(options.attempt)\n : 1,\n resumed_from: options.resumedFrom,\n resumed_by: options.resumedBy,\n stdout_path: stdoutPath,\n stderr_path: stderrPath,\n result_path: resultPath,\n progress: {\n phase: \"queued\",\n message: \"Queued for background execution.\",\n heartbeat_at: createdAt,\n },\n };\n await writeBackgroundRunRecord(options.pmRoot, record);\n return {\n started: true,\n run: record,\n };\n}\n\n/**\n * Implements spawn background test run worker for the public runtime surface of this module.\n */\nexport async function spawnBackgroundTestRunWorker(options: SpawnBackgroundTestRunWorkerOptions): Promise<BackgroundTestRunRecord> {\n const record = await readBackgroundTestRunRecord(options.pmRoot, options.runId);\n if (!record) {\n throw new PmCliError(`Background test run ${options.runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n if (BACKGROUND_RUN_TERMINAL_STATUSES.has(record.status)) {\n throw new PmCliError(`Background test run ${record.id} is already terminal (${record.status}).`, EXIT_CODE.CONFLICT);\n }\n const cliEntry = await resolveBackgroundCliEntry(process.cwd());\n const args: string[] = [];\n if (options.noExtensions === true) {\n args.push(\"--no-extensions\");\n }\n args.push(\"--path\", record.pm_root, \"test-runs-worker\", record.id);\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n PM_PATH: record.pm_root,\n PM_GLOBAL_PATH: record.global_pm_root,\n PM_BACKGROUND_TEST_RUN_ID: record.id,\n PM_BACKGROUND_TEST_RUN_ATTEMPT: String(record.attempt),\n PM_BACKGROUND_TEST_RUN_RESUMED_FROM: record.resumed_from ?? \"\",\n FORCE_COLOR: \"0\",\n };\n const child = spawn(process.execPath, [cliEntry, ...args], {\n cwd: process.cwd(),\n env,\n detached: true,\n stdio: \"ignore\",\n windowsHide: true,\n });\n child.unref();\n const next: BackgroundTestRunRecord = {\n ...record,\n status: \"queued\",\n worker_pid: child.pid as number | undefined,\n progress: {\n phase: \"queued\",\n message: \"Worker process started.\",\n heartbeat_at: nowIso(),\n },\n };\n await writeBackgroundRunRecord(options.pmRoot, next);\n return next;\n}\n\nasync function appendFileOrdered(queue: Promise<void>, filePath: string, text: string): Promise<void> {\n await queue;\n await fs.appendFile(filePath, text, \"utf8\");\n}\n\n/**\n * Implements run background test run worker for the public runtime surface of this module.\n */\nexport async function runBackgroundTestRunWorker(pmRoot: string, runId: string, noExtensions = false): Promise<BackgroundTestRunRecord> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const record: BackgroundTestRunRecord = {\n ...loaded,\n status: \"running\",\n started_at: loaded.started_at ?? nowIso(),\n worker_pid: process.pid,\n progress: {\n phase: \"running\",\n message: \"Worker started.\",\n heartbeat_at: nowIso(),\n },\n };\n const cliEntry = await resolveBackgroundCliEntry(process.cwd());\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n PM_PATH: record.pm_root,\n PM_GLOBAL_PATH: record.global_pm_root,\n FORCE_COLOR: \"0\",\n };\n await writeBackgroundRunRecord(pmRoot, record);\n\n const childArgs = noExtensions ? [\"--no-extensions\", ...record.command_args] : [...record.command_args];\n const child = spawn(process.execPath, [cliEntry, ...childArgs], {\n cwd: process.cwd(),\n env,\n detached: false,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n windowsHide: true,\n });\n record.child_pid = child.pid as number | undefined;\n\n let writeQueue: Promise<void> = Promise.resolve();\n const scheduleRecordWrite = (): void => {\n writeQueue = writeQueue.then(async () => {\n try {\n await writeBackgroundRunRecord(pmRoot, record);\n } catch {\n // Keep worker alive even if a single metadata write fails.\n }\n });\n };\n\n let stdoutWriteQueue: Promise<void> = Promise.resolve();\n let stderrWriteQueue: Promise<void> = Promise.resolve();\n let stdoutBuffer = \"\";\n let stderrBuffer = \"\";\n let stopRequested = false;\n\n const requestStop = async (): Promise<void> => {\n if (stopRequested) {\n return;\n }\n stopRequested = true;\n record.stop_requested_at = nowIso();\n record.progress = {\n ...record.progress,\n phase: \"stopping\",\n message: \"Stop requested for background run.\",\n heartbeat_at: nowIso(),\n };\n scheduleRecordWrite();\n try {\n child.kill(\"SIGTERM\");\n } catch {\n // Child may already be gone.\n }\n const forceKillDelayMs = Number.parseInt(process.env.PM_BACKGROUND_RUN_FORCE_KILL_DELAY_MS ?? \"\", 10);\n const delay = Number.isFinite(forceKillDelayMs) && forceKillDelayMs > 0\n ? forceKillDelayMs\n : DEFAULT_BACKGROUND_RUN_FORCE_KILL_DELAY_MS;\n const forceTimer = setTimeout(() => {\n try {\n child.kill(\"SIGKILL\");\n } catch {\n // Child may already be gone.\n }\n }, delay);\n forceTimer.unref?.();\n };\n\n const onSignal = (): void => {\n void requestStop();\n };\n process.on(\"SIGTERM\", onSignal);\n process.on(\"SIGINT\", onSignal);\n\n const resourceIntervalMs = Number.parseInt(process.env.PM_BACKGROUND_RUN_RESOURCE_INTERVAL_MS ?? \"\", 10);\n const resourceInterval = Number.isFinite(resourceIntervalMs) && resourceIntervalMs > 0\n ? resourceIntervalMs\n : DEFAULT_BACKGROUND_RUN_RESOURCE_SNAPSHOT_INTERVAL_MS;\n const resourceTimer = setInterval(() => {\n void (async () => {\n record.resource = await buildResourceSnapshot(record);\n (record.progress as BackgroundRunProgress).heartbeat_at = nowIso();\n scheduleRecordWrite();\n })();\n }, resourceInterval);\n resourceTimer.unref?.();\n\n child.stdout?.on(\"data\", (chunk) => {\n const text = chunk.toString(\"utf8\");\n stdoutBuffer += text;\n stdoutWriteQueue = appendFileOrdered(stdoutWriteQueue, record.stdout_path, text);\n });\n\n const applyProgressLine = (line: string): boolean => {\n const progressPatch = parseProgressLine(line);\n if (!progressPatch) {\n return false;\n }\n if (progressPatch.item_id) {\n record.progress = {\n phase: (record.progress as BackgroundRunProgress).phase === \"stopping\" ? \"stopping\" : \"running\",\n message: line,\n heartbeat_at: nowIso(),\n item_index: progressPatch.item_index,\n item_total: progressPatch.item_total,\n item_id: progressPatch.item_id,\n linked_test_index: undefined,\n linked_test_total: undefined,\n current_command: undefined,\n elapsed_ms: undefined,\n };\n return true;\n }\n record.progress = {\n phase: (record.progress as BackgroundRunProgress).phase === \"stopping\" ? \"stopping\" : \"running\",\n message: line,\n heartbeat_at: nowIso(),\n item_index: progressPatch.item_index ?? record.progress?.item_index,\n item_total: progressPatch.item_total ?? record.progress?.item_total,\n item_id: progressPatch.item_id ?? record.progress?.item_id,\n linked_test_index: progressPatch.linked_test_index,\n linked_test_total: progressPatch.linked_test_total,\n current_command: progressPatch.current_command,\n elapsed_ms: progressPatch.elapsed_ms,\n };\n if (progressPatch.phase === \"finished\" && !stopRequested) {\n record.progress.phase = \"running\";\n }\n return true;\n };\n\n child.stderr?.on(\"data\", (chunk) => {\n const text = chunk.toString(\"utf8\");\n stderrWriteQueue = appendFileOrdered(stderrWriteQueue, record.stderr_path, text);\n stderrBuffer += text;\n const parts = stderrBuffer.split(/\\r?\\n/);\n stderrBuffer = parts.pop()!;\n let progressChanged = false;\n for (const part of parts) {\n const line = part.trimEnd();\n if (line.length > 0 && applyProgressLine(line)) {\n progressChanged = true;\n }\n }\n if (progressChanged) {\n scheduleRecordWrite();\n }\n });\n\n let exitCode: number | null = null;\n let signal: NodeJS.Signals | null = null;\n try {\n ({ code: exitCode, signal } = await new Promise<{ code: number | null; signal: NodeJS.Signals | null }>((resolve) => {\n child.on(\"close\", (code, closeSignal) => {\n resolve({ code, signal: closeSignal });\n });\n }));\n } finally {\n clearInterval(resourceTimer);\n process.off(\"SIGTERM\", onSignal);\n process.off(\"SIGINT\", onSignal);\n }\n\n await stdoutWriteQueue;\n await stderrWriteQueue;\n const trailingStderrLine = stderrBuffer.trimEnd();\n if (trailingStderrLine.length > 0 && applyProgressLine(trailingStderrLine)) {\n scheduleRecordWrite();\n }\n stderrBuffer = \"\";\n\n let parsedResult: unknown | null = null;\n if (stdoutBuffer.trim().length > 0) {\n try {\n parsedResult = JSON.parse(stdoutBuffer);\n } catch {\n parsedResult = null;\n }\n }\n const evaluated = evaluateWorkerResult(record.kind, parsedResult);\n record.summary = evaluated.summary;\n record.exit_code = typeof exitCode === \"number\" ? exitCode : undefined;\n record.signal = signal ?? undefined;\n record.finished_at = nowIso();\n record.status = stopRequested\n ? \"stopped\"\n : (record.exit_code === 0 &&\n (record.summary.failed ?? 0) === 0 &&\n record.summary.fail_on_skipped_triggered !== true)\n ? \"passed\"\n : \"failed\";\n record.progress = {\n phase: \"finished\",\n message: stopRequested ? \"Background run stopped.\" : `Background run finished with status=${record.status}.`,\n heartbeat_at: nowIso(),\n item_index: record.progress?.item_index,\n item_total: record.progress?.item_total,\n item_id: record.progress?.item_id,\n linked_test_index: record.progress?.linked_test_index,\n linked_test_total: record.progress?.linked_test_total,\n current_command: record.progress?.current_command,\n elapsed_ms: record.progress?.elapsed_ms,\n };\n record.resource = await buildResourceSnapshot(record);\n if (parsedResult !== null) {\n await writeFileAtomic(record.result_path, `${JSON.stringify(parsedResult, null, 2)}\\n`);\n } else {\n await writeFileAtomic(\n record.result_path,\n `${JSON.stringify(\n {\n parse_error: \"Background run output was not valid JSON.\",\n stdout_excerpt: tailLines(stdoutBuffer, DEFAULT_BACKGROUND_RUN_LOG_TAIL_LINES),\n },\n null,\n 2,\n )}\\n`,\n );\n }\n await writeBackgroundRunRecord(pmRoot, record);\n await writeQueue;\n return record;\n}\n\n/**\n * Implements list background test runs for the public runtime surface of this module.\n */\nexport async function listBackgroundTestRuns(\n pmRoot: string,\n options: ListBackgroundTestRunOptions,\n): Promise<BackgroundTestRunRecord[]> {\n const recordPaths = await listBackgroundRunRecordPaths(pmRoot);\n const runs: BackgroundTestRunRecord[] = [];\n for (const recordPath of recordPaths) {\n const raw = await readFileIfExists(recordPath);\n if (!raw) {\n continue;\n }\n const parsed = await parseBackgroundRunRecord(raw, recordPath);\n runs.push(parsed);\n }\n const refreshed: BackgroundTestRunRecord[] = [];\n for (const run of runs) {\n refreshed.push(await refreshRunIfStale(pmRoot, run));\n }\n const filtered = options.status ? refreshed.filter((entry) => entry.status === options.status) : refreshed;\n const sorted = filtered.sort((left, right) => {\n const byUpdated = Date.parse(right.updated_at) - Date.parse(left.updated_at);\n if (Number.isFinite(byUpdated) && byUpdated !== 0) {\n return byUpdated;\n }\n return right.id.localeCompare(left.id);\n });\n const limit = typeof options.limit === \"number\" && options.limit >= 0 ? options.limit : undefined;\n return limit === undefined ? sorted : sorted.slice(0, limit);\n}\n\n/**\n * Implements get background test run status for the public runtime surface of this module.\n */\nexport async function getBackgroundTestRunStatus(pmRoot: string, runId: string): Promise<BackgroundRunStatusView> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const refreshed = await refreshRunIfStale(pmRoot, loaded);\n const workerAlive = isPidRunning(refreshed.worker_pid);\n const childAlive = isPidRunning(refreshed.child_pid);\n if (refreshed.status === \"running\" && !childAlive && !refreshed.finished_at && !workerAlive) {\n refreshed.status = \"failed\";\n refreshed.finished_at = nowIso();\n refreshed.error = refreshed.error ?? \"Background run process exited unexpectedly.\";\n await writeBackgroundRunRecord(pmRoot, refreshed);\n }\n if (refreshed.status === \"running\") {\n refreshed.resource = await buildResourceSnapshot(refreshed);\n await writeBackgroundRunRecord(pmRoot, refreshed);\n }\n const heartbeatAt = refreshed.progress?.heartbeat_at;\n const heartbeatAtMs = heartbeatAt ? Date.parse(heartbeatAt) : Number.NaN;\n const lagMs = Number.isFinite(heartbeatAtMs) ? Math.max(0, nowMs() - heartbeatAtMs) : undefined;\n const staleMs = Number.parseInt(process.env.PM_BACKGROUND_RUN_HEARTBEAT_STALE_MS ?? \"\", 10);\n const staleThresholdMs = Number.isFinite(staleMs) && staleMs > 0 ? staleMs : DEFAULT_BACKGROUND_RUN_HEARTBEAT_STALE_MS;\n const healthState = refreshed.status === \"running\"\n ? lagMs !== undefined && lagMs > staleThresholdMs\n ? \"stale\"\n : \"healthy\"\n : \"inactive\";\n return {\n run: refreshed,\n health: {\n state: healthState,\n last_heartbeat_at: heartbeatAt,\n heartbeat_lag_ms: lagMs,\n worker_alive: workerAlive,\n child_alive: childAlive,\n },\n };\n}\n\n/**\n * Implements stop background test run for the public runtime surface of this module.\n */\nexport async function stopBackgroundTestRun(pmRoot: string, runId: string, force = false): Promise<StopBackgroundTestRunResult> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const refreshed = await refreshRunIfStale(pmRoot, loaded);\n if (BACKGROUND_RUN_TERMINAL_STATUSES.has(refreshed.status)) {\n return {\n run: refreshed,\n signal_sent: \"none\",\n };\n }\n let signalSent: \"SIGTERM\" | \"SIGKILL\" | \"none\" = \"none\";\n const signal: NodeJS.Signals = force ? \"SIGKILL\" : \"SIGTERM\";\n if (isPidRunning(refreshed.worker_pid) && refreshed.worker_pid) {\n try {\n process.kill(refreshed.worker_pid, signal);\n signalSent = signal;\n } catch {\n signalSent = \"none\";\n }\n }\n if (signalSent === \"none\") {\n refreshed.status = \"stopped\";\n refreshed.finished_at = refreshed.finished_at ?? nowIso();\n }\n refreshed.stop_requested_at = nowIso();\n refreshed.progress = {\n phase: \"stopping\",\n message: signalSent === \"none\" ? \"Run marked stopped.\" : `Stop requested via ${signalSent}.`,\n heartbeat_at: nowIso(),\n item_index: refreshed.progress?.item_index,\n item_total: refreshed.progress?.item_total,\n item_id: refreshed.progress?.item_id,\n linked_test_index: refreshed.progress?.linked_test_index,\n linked_test_total: refreshed.progress?.linked_test_total,\n current_command: refreshed.progress?.current_command,\n elapsed_ms: refreshed.progress?.elapsed_ms,\n };\n await writeBackgroundRunRecord(pmRoot, refreshed);\n return {\n run: refreshed,\n signal_sent: signalSent,\n };\n}\n\n/**\n * Implements resume background test run for the public runtime surface of this module.\n */\nexport async function resumeBackgroundTestRun(\n pmRoot: string,\n runId: string,\n requestedBy: string,\n noExtensions = false,\n): Promise<BackgroundTestRunRecord> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const refreshed = await refreshRunIfStale(pmRoot, loaded);\n if (!BACKGROUND_RUN_TERMINAL_STATUSES.has(refreshed.status)) {\n throw new PmCliError(`Background test run ${runId} is not terminal and cannot be resumed.`, EXIT_CODE.CONFLICT);\n }\n const started = await startBackgroundTestRun({\n pmRoot: refreshed.pm_root,\n globalPmRoot: refreshed.global_pm_root,\n kind: refreshed.kind,\n commandArgs: refreshed.command_args,\n requestedBy,\n targetId: refreshed.target_id,\n statusFilter: refreshed.status_filter,\n resumedFrom: refreshed.id,\n resumedBy: requestedBy,\n attempt: refreshed.attempt + 1,\n });\n if (!started.started) {\n return started.run;\n }\n const spawned = await spawnBackgroundTestRunWorker({\n pmRoot,\n runId: started.run.id,\n noExtensions,\n });\n const prior: BackgroundTestRunRecord = {\n ...refreshed,\n resumed_by: spawned.id,\n };\n await writeBackgroundRunRecord(pmRoot, prior);\n return spawned;\n}\n\n/**\n * Implements read background test run logs for the public runtime surface of this module.\n */\nexport async function readBackgroundTestRunLogs(\n pmRoot: string,\n runId: string,\n stream: BackgroundLogStream,\n tail: number | undefined,\n): Promise<BackgroundRunLogsResult> {\n const loaded = await readBackgroundTestRunRecord(pmRoot, runId);\n if (!loaded) {\n throw new PmCliError(`Background test run ${runId} not found`, EXIT_CODE.NOT_FOUND);\n }\n const resolvedTail = typeof tail === \"number\" && Number.isFinite(tail) && tail >= 0 ? Math.floor(tail) : DEFAULT_BACKGROUND_RUN_LOG_TAIL_LINES;\n const stdoutRaw = stream === \"stdout\" || stream === \"both\" ? (await readFileIfExists(loaded.stdout_path)) ?? \"\" : \"\";\n const stderrRaw = stream === \"stderr\" || stream === \"both\" ? (await readFileIfExists(loaded.stderr_path)) ?? \"\" : \"\";\n return {\n run: loaded,\n stream,\n tail: resolvedTail,\n stdout: stream === \"stdout\" || stream === \"both\" ? tailLines(stdoutRaw, resolvedTail) : [],\n stderr: stream === \"stderr\" || stream === \"both\" ? tailLines(stderrRaw, resolvedTail) : [],\n };\n}\n\nexport const _testOnly = {\n buildResourceSnapshot,\n evaluateWorkerResult,\n isPidRunning,\n parseLinuxCpuStat,\n parseLinuxRssStatus,\n parseProgressLine,\n readLinuxCpuSeconds,\n readLinuxRssBytes,\n refreshRunIfStale,\n splitLines,\n tailLines,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;;;ACAf,OAAO,QAAQ;AACf,SAAS,aAAa;AACtB,SAAS,YAAY,mBAAmB;AACxC,OAAO,UAAU;;;;;;;;AAiBjB,IAAM,iCAAiC,oBAAI,IAA6B,CAAC,UAAU,SAAS,CAAC;AAC7F,IAAM,mCAAmC,oBAAI,IAA6B,CAAC,UAAU,UAAU,WAAW,UAAU,CAAC;AACrH,IAAM,uDAAuD;AAC7D,IAAM,6CAA6C;AACnD,IAAM,4CAA4C;AAClD,IAAM,wCAAwC;AAC9C,IAAM,6BAA6B;AAkLnC,SAAS,QAAK;AACZ,SAAO,KAAK,IAAG;AACjB;AAEA,SAAS,qBAAqB,MAAc;AAC1C,SAAO,KAAK,IAAI,CAAC,UAAU,MAAM,KAAI,CAAE,EAAE,OAAO,CAAC,UAAU,MAAM,SAAS,CAAC;AAC7E;AAEA,SAAS,sBAAsB,MAAc;AAC3C,QAAM,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B,QAAQ,OAAOA,QAAO,iBAAiB,IAAI;AAC7F,SAAO;IACL,IAAI,SAAS;IACb,QAAQ,SAAS;IACjB,WAAW,SAAS;;AAExB;",
|
|
6
|
+
"names": ["global"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="45eac7fa-f181-5cca-93b7-cfb58909dbb3")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
_testOnlyUpdateCommand,
|
|
5
|
+
runUpdate
|
|
6
|
+
} from "./chunk-VD3LKZFX.js";
|
|
7
|
+
import "./chunk-YJIEJRZB.js";
|
|
8
|
+
import "./chunk-UB3V5WUI.js";
|
|
9
|
+
import "./chunk-4YIMPANT.js";
|
|
10
|
+
import "./chunk-D6USKAMA.js";
|
|
11
|
+
import "./chunk-OB3RJV5F.js";
|
|
12
|
+
import "./chunk-BOWQWXLI.js";
|
|
13
|
+
import "./chunk-5ABGFWR4.js";
|
|
14
|
+
import "./chunk-7RIJGN4R.js";
|
|
15
|
+
import "./chunk-P4SESZGT.js";
|
|
16
|
+
import "./chunk-YEDFE4DC.js";
|
|
17
|
+
import "./chunk-QE5UFCCO.js";
|
|
18
|
+
import "./chunk-KGQ3W65B.js";
|
|
19
|
+
import "./chunk-V3KLX7U7.js";
|
|
20
|
+
import "./chunk-KRASIL6M.js";
|
|
21
|
+
import "./chunk-CY5IJMUM.js";
|
|
22
|
+
export {
|
|
23
|
+
_testOnlyUpdateCommand,
|
|
24
|
+
runUpdate
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=update-DJKWLBWJ.js.map
|
|
27
|
+
|
|
28
|
+
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","debugId":"45eac7fa-f181-5cca-93b7-cfb58909dbb3"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
_testOnlyUpdateCommand,
|
|
3
|
+
runUpdate
|
|
4
|
+
} from "./chunk-A3UNLXNJ.js";
|
|
5
|
+
import "./chunk-CZVISY5A.js";
|
|
6
|
+
import "./chunk-5T6WPLRO.js";
|
|
7
|
+
import "./chunk-JIP67N2K.js";
|
|
8
|
+
import "./chunk-BN3CWK6G.js";
|
|
9
|
+
import "./chunk-4TXTVZL3.js";
|
|
10
|
+
import "./chunk-UFKNF23C.js";
|
|
11
|
+
import "./chunk-JJ4SG243.js";
|
|
12
|
+
import "./chunk-HUYYMTGW.js";
|
|
13
|
+
import "./chunk-5HIZDR5A.js";
|
|
14
|
+
import "./chunk-DRPF274X.js";
|
|
15
|
+
import "./chunk-CHRNYKNI.js";
|
|
16
|
+
import "./chunk-LBH7UYKY.js";
|
|
17
|
+
import "./chunk-ZFIEEDTJ.js";
|
|
18
|
+
import "./chunk-MLHX6DN5.js";
|
|
19
|
+
import "./chunk-SNUK7H5J.js";
|
|
20
|
+
export {
|
|
21
|
+
_testOnlyUpdateCommand,
|
|
22
|
+
runUpdate
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=update-UXDLTEOZ.js.map
|