@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,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../cli/commands/close.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module cli/commands/close\n *\n * Implements the pm close command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 {\n buildItemNotFoundError,\n listAllFrontMatterLight,\n locateItem,\n mutateItem,\n readLocatedItem,\n} from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\n/**\n * Documents the close command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseCommandOptions {\n author?: string;\n message?: string;\n validateClose?: string;\n force?: boolean;\n // pm-fl0c #11 (2026-05-28): allow setting the three closure validation\n // fields inline on `pm close` so agents do not have to issue a prior\n // `pm update` just to satisfy --validate-close warn|strict. These map 1:1\n // to ItemFrontMatter.{resolution,expected_result,actual_result}.\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n duplicateOf?: string;\n}\n\n/**\n * Documents the close result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseResult {\n item: Record<string, unknown>;\n changed_fields: string[];\n warnings: string[];\n}\n\ninterface AutoUnblockCandidate {\n id: string;\n blocker_ids: string[];\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed || \"unknown\";\n}\n\nfunction normalizeCloseReason(reasonText: string | undefined, required: boolean): string | undefined {\n const reason = (reasonText ?? \"\").trim();\n if (reason.length > 0) {\n return reason;\n }\n if (required) {\n throw new PmCliError(\n \"Close reason text is required because governance.require_close_reason is enabled\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a one-line closing summary as the positional text or via --reason.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the item is done.\",\n examples: [\n 'pm close <id> \"Done: <what changed and why>\"',\n 'pm close <id> --reason \"<closing summary>\"',\n \"pm close <id> --duplicate-of <canonical-id>\",\n ],\n nextSteps: [\n \"Re-run the close with a closing summary.\",\n 'When closing as a duplicate, --duplicate-of <id> auto-fills the close reason as \"Duplicate of <id>\".',\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\ntype ValidateCloseMode = \"off\" | \"warn\" | \"strict\";\n\nconst CLOSE_VALIDATION_FIELDS: Array<{ key: keyof Pick<ItemFrontMatter, \"resolution\" | \"expected_result\" | \"actual_result\">; label: string }> = [\n { key: \"resolution\", label: \"resolution\" },\n { key: \"expected_result\", label: \"expected_result\" },\n { key: \"actual_result\", label: \"actual_result\" },\n];\n\nfunction parseValidateCloseMode(raw: string | undefined): ValidateCloseMode | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized.length === 0 || normalized === \"warn\") {\n return \"warn\";\n }\n if (normalized === \"off\" || normalized === \"none\" || normalized === \"disabled\") {\n return \"off\";\n }\n if (normalized === \"strict\") {\n return \"strict\";\n }\n throw new PmCliError(`Invalid --validate-close mode \"${raw}\" (expected \"off\", \"warn\", or \"strict\")`, EXIT_CODE.USAGE);\n}\n\nfunction findMissingCloseValidationFields(frontMatter: ItemFrontMatter): string[] {\n const missing: string[] = [];\n for (const field of CLOSE_VALIDATION_FIELDS) {\n const rawValue = frontMatter[field.key];\n if (typeof rawValue !== \"string\" || rawValue.trim().length === 0) {\n missing.push(field.label);\n }\n }\n return missing;\n}\n\nasync function duplicateChainReferencesClosingItem(\n loadItemById: (id: string) => Promise<ItemFrontMatter | null>,\n initialDuplicateOf: unknown,\n closingId: string,\n): Promise<boolean> {\n const visited = new Set<string>();\n let current = initialDuplicateOf;\n while (typeof current === \"string\" && current.trim().length > 0) {\n const currentId = current.trim();\n if (currentId === closingId) {\n return true;\n }\n if (visited.has(currentId)) {\n return false;\n }\n visited.add(currentId);\n current = (await loadItemById(currentId))?.duplicate_of;\n }\n return false;\n}\n\nfunction shouldApplyDuplicateFallback(value: unknown): boolean {\n return typeof value !== \"string\" || value.trim().length === 0;\n}\n\nasync function assertDuplicateTargetExists(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n duplicateOf: string | undefined,\n closingId: string,\n): Promise<string | undefined> {\n const rawTarget = duplicateOf?.trim();\n if (!rawTarget) {\n return undefined;\n }\n if (rawTarget === closingId) {\n throw new PmCliError(\"An item cannot be closed as a duplicate of itself.\", EXIT_CODE.USAGE, {\n code: \"duplicate_target_self\",\n why: \"--duplicate-of must identify the canonical item that should remain open or already represent the work.\",\n });\n }\n const typeRegistry = resolveItemTypeRegistry(settings);\n const itemCache = new Map<string, ItemFrontMatter | null>();\n const loadItemById = async (id: string): Promise<ItemFrontMatter | null> => {\n if (itemCache.has(id)) {\n return itemCache.get(id) ?? null;\n }\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n itemCache.set(id, null);\n return null;\n }\n const { document } = await readLocatedItem(located, { schema: settings.schema });\n itemCache.set(id, document.metadata);\n return document.metadata;\n };\n const target = await loadItemById(rawTarget);\n if (!target) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" was not found. Create or locate the canonical item first.`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_missing\",\n why: \"Duplicate closure should point at a real canonical pm item so future dedupe and changelog tooling can trace the relationship.\",\n examples: [`pm close ${closingId} \"Duplicate of ${rawTarget}\" --duplicate-of ${rawTarget}`],\n nextSteps: [\"Run pm search/list to find the canonical item, then retry with --duplicate-of <id>.\"],\n });\n }\n if (await duplicateChainReferencesClosingItem(loadItemById, target.duplicate_of, closingId)) {\n throw new PmCliError(`Circular duplicate reference detected. Target \"${rawTarget}\" points back to \"${closingId}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_circular\",\n why: \"Circular duplicate relationships create loops for dedupe and status propagation tooling.\",\n nextSteps: [\"Choose the existing canonical item, or clear the target duplicate_of metadata before closing this item as a duplicate.\"],\n });\n }\n if (typeof target.duplicate_of === \"string\" && target.duplicate_of.trim().length > 0) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" is already marked as a duplicate of \"${target.duplicate_of.trim()}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_is_duplicate\",\n why: \"Duplicate closure should point directly at the canonical item, not another duplicate.\",\n examples: [`pm close ${closingId} \"Duplicate of ${target.duplicate_of.trim()}\" --duplicate-of ${target.duplicate_of.trim()}`],\n nextSteps: [\"Use the canonical item referenced by duplicate_of as the --duplicate-of target.\"],\n });\n }\n return target.id;\n}\n\nasync function findActiveChildIds(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n parentId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n return items\n .filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id)\n .sort((left, right) => left.localeCompare(right));\n}\n\nfunction blockedByIds(item: Pick<ItemFrontMatter, \"blocked_by\" | \"dependencies\">): string[] {\n const ids = new Set<string>();\n const scalar = typeof item.blocked_by === \"string\" ? item.blocked_by.trim() : \"\";\n if (scalar.length > 0) {\n ids.add(scalar);\n }\n for (const dependency of item.dependencies ?? []) {\n if (dependency.kind === \"blocked_by\" && typeof dependency.id === \"string\" && dependency.id.trim().length > 0) {\n ids.add(dependency.id.trim());\n }\n }\n return [...ids].sort((left, right) => left.localeCompare(right));\n}\n\nasync function findAutoUnblockCandidates(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n closedId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<AutoUnblockCandidate[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const itemsById = new Map(items.map((item) => [item.id, item]));\n const blockedStatuses = statusRegistry.blocked_statuses;\n return items\n .filter((item) => blockedStatuses.has(item.status))\n .map((item) => ({ item, blockerIds: blockedByIds(item) }))\n .filter(({ blockerIds }) => blockerIds.includes(closedId))\n .filter(({ blockerIds }) =>\n blockerIds.every((blockerId) => {\n const blocker = itemsById.get(blockerId);\n return blocker !== undefined && isTerminalStatus(blocker.status, statusRegistry);\n }),\n )\n .map(({ item, blockerIds }) => ({ id: item.id, blocker_ids: blockerIds }))\n .sort((left, right) => left.id.localeCompare(right.id));\n}\n\nasync function autoUnblockResolvedDependents(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n closedId: string,\n author: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const candidates = await findAutoUnblockCandidates(pmRoot, settings, closedId, statusRegistry);\n const warnings: string[] = [];\n for (const candidate of candidates) {\n try {\n const unblocked = await mutateItem({\n pmRoot,\n settings,\n id: candidate.id,\n op: \"update\",\n author,\n message: `Auto-unblocked after blocker ${closedId} closed`,\n mutate(document) {\n /* c8 ignore start -- normal auto-unblock candidates carry dependency metadata; fallback preserves hand-edited scalar-only blockers. */\n const dependencies = document.metadata.dependencies ?? [];\n /* c8 ignore stop */\n const remainingDependencies = dependencies.filter((dependency) => {\n const dependencyId = dependency.id.trim();\n return dependency.kind !== \"blocked_by\" || !candidate.blocker_ids.includes(dependencyId);\n });\n document.metadata.status = statusRegistry.open_status;\n delete document.metadata.blocked_by;\n delete document.metadata.blocked_reason;\n document.metadata.unblock_note = `Auto-unblocked after blocker ${closedId} closed; all blockers resolved (${candidate.blocker_ids.join(\", \")}).`;\n if (remainingDependencies.length > 0) {\n document.metadata.dependencies = remainingDependencies;\n } else {\n delete document.metadata.dependencies;\n }\n const changedFields = [\"status\", \"blocked_by\", \"blocked_reason\", \"unblock_note\"];\n if (remainingDependencies.length !== dependencies.length) {\n changedFields.push(\"dependencies\");\n }\n return {\n changedFields,\n };\n },\n });\n warnings.push(`auto_unblocked:${unblocked.item.id}:resolved_blockers=${candidate.blocker_ids.join(\",\")}`);\n /* c8 ignore start -- defensive fan-out failure path; normal lock/claim state is auditable and still unblocks. */\n } catch (error) {\n const reason = error instanceof Error ? error.message.replace(/\\s+/g, \" \").trim() : \"unknown\";\n warnings.push(`auto_unblock_failed:${candidate.id}:${reason}`);\n }\n /* c8 ignore stop */\n }\n return warnings;\n}\n\nexport const _testOnlyCloseCommand = {\n blockedByIds,\n};\n\n/**\n * Implements run close for the public runtime surface of this module.\n */\nexport async function runClose(\n id: string,\n closeReasonText: string | undefined,\n options: CloseCommandOptions,\n global: GlobalOptions,\n): Promise<CloseResult> {\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 author = toAuthor(options.author, settings.author_default);\n // GH-250: verify the target item EXISTS before the governance close-reason\n // gate fires. Otherwise closing a typo'd id with no reason reports\n // \"Close reason text is required\" and hides the real cause (bad id) until a\n // reason is supplied. Existence is the more fundamental precondition, so it\n // is validated first regardless of whether a reason was provided.\n const typeToFolder = resolveItemTypeRegistry(settings).type_to_folder;\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeToFolder);\n }\n // GH-204: resolve the duplicate target BEFORE reason validation so\n // `pm close <id> --duplicate-of <canonical>` succeeds under\n // governance.require_close_reason without a manual reason — when no\n // positional/--reason text is provided the reason defaults to\n // \"Duplicate of <id>\" (mirroring the auto-filled closure metadata).\n // Explicit reason text still wins.\n const duplicateOf = await assertDuplicateTargetExists(pmRoot, settings, options.duplicateOf, id);\n // pm-7x8d / GH-204: when no explicit positional/--reason text is given, derive\n // the close reason from the next-best closure signal instead of hard-blocking\n // under governance.require_close_reason. Precedence: explicit reason text >\n // --duplicate-of (\"Duplicate of <id>\") > --resolution summary. The resolution\n // is still written to metadata.resolution below; reusing it as the close\n // reason just lets a single `pm close <id> --resolution \"...\"` succeed.\n const hasExplicitReason = (closeReasonText ?? \"\").trim().length > 0;\n const trimmedResolution = typeof options.resolution === \"string\" ? options.resolution.trim() : \"\";\n const effectiveCloseReasonText = hasExplicitReason\n ? closeReasonText\n : duplicateOf !== undefined\n ? `Duplicate of ${duplicateOf}`\n : trimmedResolution.length > 0\n ? trimmedResolution\n : closeReasonText;\n const closeReason = normalizeCloseReason(effectiveCloseReasonText, settings.governance.require_close_reason);\n const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;\n // C3 (pm-fu5d): scan for active children even under minimal governance so\n // closing a parent is never silently orphaning — off mode emits an\n // informational note instead of the warn/strict validation warning.\n const activeChildIds = await findActiveChildIds(pmRoot, settings, id, statusRegistry);\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"close\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (isTerminalStatus(document.metadata.status, statusRegistry) && !options.force) {\n throw new PmCliError(`Item ${document.metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);\n }\n const mutationWarnings: string[] = [];\n // pm-fl0c #11: apply inline closure fields BEFORE the validation pass so\n // a single `pm close <id> \"reason\" --resolution \"...\"` call satisfies\n // strict validation without a prior pm update. Only meaningful trimmed\n // text writes; an empty/whitespace value is a no-op rather than a clear.\n const inlineCloseFields: Array<{ option: string | undefined; key: \"resolution\" | \"expected_result\" | \"actual_result\" }> = [\n { option: options.resolution, key: \"resolution\" },\n { option: options.expectedResult, key: \"expected_result\" },\n { option: options.actualResult, key: \"actual_result\" },\n ];\n const duplicateFallbackFields: Array<\"resolution\" | \"expected_result\" | \"actual_result\"> = [];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option !== \"string\") continue;\n const trimmed = option.trim();\n if (trimmed.length === 0) continue;\n document.metadata[key] = trimmed;\n }\n if (duplicateOf !== undefined) {\n document.metadata.duplicate_of = duplicateOf;\n const duplicateResolution = `Duplicate of ${duplicateOf}`;\n const duplicateExpectedResult = `Canonical item ${duplicateOf} tracks the work.`;\n const duplicateActualResult = `Closed as duplicate of ${duplicateOf}.`;\n if (shouldApplyDuplicateFallback(document.metadata.resolution)) {\n document.metadata.resolution = duplicateResolution;\n duplicateFallbackFields.push(\"resolution\");\n }\n if (shouldApplyDuplicateFallback(document.metadata.expected_result)) {\n document.metadata.expected_result = duplicateExpectedResult;\n duplicateFallbackFields.push(\"expected_result\");\n }\n if (shouldApplyDuplicateFallback(document.metadata.actual_result)) {\n document.metadata.actual_result = duplicateActualResult;\n duplicateFallbackFields.push(\"actual_result\");\n }\n }\n if (validateCloseMode !== \"off\") {\n const missingFields = findMissingCloseValidationFields(document.metadata);\n if (missingFields.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: missing ${missingFields.join(\", \")}. Populate fields or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_missing_fields:${document.metadata.id}:${missingFields.join(\",\")}`);\n }\n if (activeChildIds.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: active child items remain open (${activeChildIds.join(\", \")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n } else if (activeChildIds.length > 0) {\n // C3: minimal governance (validate-close off) should still tell the\n // agent it just closed a parent with open children, without blocking.\n mutationWarnings.push(`closed_with_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n\n document.metadata.status = statusRegistry.close_status;\n const changedFields = [\"status\"];\n if (closeReason !== undefined) {\n document.metadata.close_reason = closeReason;\n changedFields.push(\"close_reason\");\n } else if (document.metadata.close_reason !== undefined) {\n delete document.metadata.close_reason;\n changedFields.push(\"close_reason\");\n }\n for (const { option, key } of inlineCloseFields) {\n if (typeof option === \"string\" && option.trim().length > 0) {\n changedFields.push(key);\n }\n }\n if (duplicateOf !== undefined) {\n changedFields.push(\"duplicate_of\");\n if (duplicateFallbackFields.includes(\"resolution\") && !changedFields.includes(\"resolution\")) {\n changedFields.push(\"resolution\");\n }\n if (duplicateFallbackFields.includes(\"expected_result\") && !changedFields.includes(\"expected_result\")) {\n changedFields.push(\"expected_result\");\n }\n if (duplicateFallbackFields.includes(\"actual_result\") && !changedFields.includes(\"actual_result\")) {\n changedFields.push(\"actual_result\");\n }\n }\n if (document.metadata.assignee !== undefined) {\n delete document.metadata.assignee;\n changedFields.push(\"assignee\");\n }\n\n // C4 (pm-fu5d): a terminal item is no longer blocked. Clear every active\n // blocker signal independently — scalar blocked_by, blocked_reason, and the\n // blocked_by dependency edges (kept consistent with the kyd6 invariant) —\n // even if only some are present (e.g. an orphaned edge or a stale\n // blocked_reason left by manual edits), so closed work stops surfacing in\n // blockers views, and annotate the cleanup.\n const previousBlockedBy =\n typeof document.metadata.blocked_by === \"string\" ? document.metadata.blocked_by.trim() : \"\";\n const existingDeps = document.metadata.dependencies ?? [];\n const blockedByEdge = existingDeps.find((dep) => dep.kind === \"blocked_by\");\n const hadBlockedReason = document.metadata.blocked_reason !== undefined;\n if (previousBlockedBy.length > 0 || blockedByEdge !== undefined || hadBlockedReason) {\n if (previousBlockedBy.length > 0) {\n delete document.metadata.blocked_by;\n changedFields.push(\"blocked_by\");\n }\n if (hadBlockedReason) {\n delete document.metadata.blocked_reason;\n changedFields.push(\"blocked_reason\");\n }\n if (blockedByEdge !== undefined) {\n const remainingDeps = existingDeps.filter((dep) => dep.kind !== \"blocked_by\");\n if (remainingDeps.length > 0) {\n document.metadata.dependencies = remainingDeps;\n } else {\n delete document.metadata.dependencies;\n }\n changedFields.push(\"dependencies\");\n }\n const reportedBlocker = previousBlockedBy || blockedByEdge?.id || \"unknown\";\n mutationWarnings.push(`closed_cleared_blocked_by:${document.metadata.id}:${reportedBlocker}`);\n }\n\n return {\n changedFields,\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n changed_fields: result.changedFields,\n warnings: [\n ...result.warnings,\n ...(await autoUnblockResolvedDependents(pmRoot, settings, located.id, author, statusRegistry)),\n ],\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAS,SAAS,WAA+B,eAAqB;AACpE,QAAM,WAAW,aAAa,QAAQ,IAAI,aAAa;AACvD,QAAM,UAAU,SAAS,KAAI;AAC7B,SAAO,WAAW;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SAAS;AACzB,wBAAc,KAAK,gBAAgB;QACrC;AACA,YAAI,kBAAkB,QAAW;AAC/B,gBAAM,gBAAgB,aAAa,OAAO,CAAC,QAAQ,IAAI,SAAS,YAAY;AAC5E,cAAI,cAAc,SAAS,GAAG;AAC5B,qBAAS,SAAS,eAAe;UACnC,OAAO;AACL,mBAAO,SAAS,SAAS;UAC3B;AACA,wBAAc,KAAK,cAAc;QACnC;AACA,cAAM,kBAAkB,qBAAqB,eAAe,MAAM;AAClE,yBAAiB,KAAK,6BAA6B,SAAS,SAAS,EAAE,IAAI,eAAe,EAAE;MAC9F;AAEA,aAAO;QACL;QACA,GAAI,iBAAiB,SAAS,IAAI,EAAE,UAAU,iBAAgB,IAAK,CAAA;;IAEvE;GACD;AAED,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,gBAAgB,OAAO;IACvB,UAAU;MACR,GAAG,OAAO;MACV,GAAI,MAAM,8BAA8B,QAAQ,UAAU,QAAQ,IAAI,QAAQ,cAAc;;;AAGlG;",
|
|
6
|
-
"names": ["global"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../core/item/status-filter.ts", "../../../../../../../../core/schema/runtime-field-filters.ts", "../../../../../../../../cli/commands/list.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module core/item/status-filter\n *\n * Defines item parsing, formatting, and lifecycle helpers for Status Filter.\n */\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { levenshteinDistanceWithinLimit } from \"../shared/levenshtein.js\";\nimport type { RuntimeStatusRegistry } from \"../schema/runtime-schema.js\";\nimport type { ItemStatus } from \"../../types/index.js\";\nimport { normalizeStatusInput } from \"./status.js\";\n\n// Workflow-group aliases shared by every status-filter consumer so that the\n// agent-friendly `open`/`closed`/`canceled` shorthands resolve to whatever the\n// runtime workflow has configured as its open/close/cancel anchors, rather than\n// hardcoding the built-in status ids. `cancelled` is accepted as a spelling\n// variant of `canceled`.\nconst STATUS_GROUP_ALIASES: Readonly<Record<string, \"open_status\" | \"close_status\" | \"canceled_status\">> = {\n open: \"open_status\",\n closed: \"close_status\",\n canceled: \"canceled_status\",\n cancelled: \"canceled_status\",\n};\n\nconst STATUS_ALL_SENTINEL = \"all\";\n\n/** Return true when a status-filter input is the standalone all-status sentinel. */\nexport function isStatusAllFilterInput(raw: unknown): boolean {\n if (typeof raw !== \"string\") {\n return false;\n }\n const tokens = raw\n .split(\",\")\n .map((entry) => entry.trim().toLowerCase())\n .filter((entry) => entry.length > 0);\n return tokens.length === 1 && tokens[0] === STATUS_ALL_SENTINEL;\n}\n\n/**\n * Resolve a single status-filter token to a concrete runtime status id.\n *\n * Returns `undefined` when the token is not a recognized workflow-group alias\n * (open/closed/canceled) and does not normalize to a known registry status.\n * Callers decide whether an unrecognized token is an error (strict mode) or is\n * passed through verbatim (lenient mode) — see {@link parseStatusFilterCsv}.\n */\nexport function resolveStatusFilterToken(\n token: string,\n registry: RuntimeStatusRegistry,\n): ItemStatus | undefined {\n const trimmed = token.trim().toLowerCase();\n if (trimmed.length === 0) {\n return undefined;\n }\n const group = STATUS_GROUP_ALIASES[trimmed];\n if (group) {\n return registry[group] as ItemStatus;\n }\n return normalizeStatusInput(token, registry);\n}\n\nfunction collectStatusSuggestionCandidates(registry: RuntimeStatusRegistry): string[] {\n const candidates = new Set<string>(Object.keys(STATUS_GROUP_ALIASES));\n for (const definition of registry.definitions) {\n candidates.add(definition.id);\n for (const alias of definition.aliases) {\n candidates.add(alias);\n }\n }\n return [...candidates];\n}\n\nfunction suggestClosestStatus(value: string, registry: RuntimeStatusRegistry): string | undefined {\n // Only ever called for an unresolved, already-non-empty token (parseStatusFilterCsv\n // filters blanks first), so no empty-input guard is needed here.\n const normalized = value.trim().toLowerCase();\n let best: string | undefined;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const candidate of collectStatusSuggestionCandidates(registry)) {\n const distance = levenshteinDistanceWithinLimit(normalized, candidate.toLowerCase(), 2);\n if (distance !== null && distance < bestDistance) {\n best = candidate;\n bestDistance = distance;\n }\n }\n return best;\n}\n\n/**\n * Documents the parse status filter options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ParseStatusFilterOptions {\n /**\n * When true, an unrecognized token throws a USAGE error with a did-you-mean\n * hint. When false (default), an unrecognized token is passed through\n * verbatim so custom/unknown statuses still compare against item values by\n * their raw string — preserving the long-standing lenient `pm list` behavior.\n */\n strict?: boolean;\n /** Flag label used in error messages (default: \"--status\"). */\n flagLabel?: string;\n}\n\n/**\n * Parse a comma-separated status filter into a de-duplicated list of concrete\n * status ids. A standalone `all` sentinel intentionally resolves to no filter\n * so duplicate-discovery loops can search every lifecycle bucket with the same\n * `--status` flag shape. Shared by `pm list` (lenient) and `pm search`\n * (strict, with a did-you-mean hint on typos) so both surfaces resolve the\n * open/closed/canceled workflow-group aliases identically.\n */\nexport function parseStatusFilterCsv(\n raw: unknown,\n registry: RuntimeStatusRegistry,\n options?: ParseStatusFilterOptions,\n): ItemStatus[] | undefined {\n if (typeof raw !== \"string\") {\n return undefined;\n }\n const strict = options?.strict === true;\n const flagLabel = options?.flagLabel ?? \"--status\";\n const tokens = raw\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (tokens.length === 0) {\n return undefined;\n }\n const allTokenCount = tokens.filter((token) => token.trim().toLowerCase() === STATUS_ALL_SENTINEL).length;\n if (allTokenCount > 0) {\n if (tokens.length === 1) {\n return undefined;\n }\n throw new PmCliError(\n `Invalid ${flagLabel} value \"all\". Use it by itself, or omit ${flagLabel} to search every status.`,\n EXIT_CODE.USAGE,\n );\n }\n const resolved: ItemStatus[] = [];\n for (const token of tokens) {\n const status = resolveStatusFilterToken(token, registry);\n if (status === undefined) {\n if (strict) {\n const suggestion = suggestClosestStatus(token, registry);\n throw new PmCliError(\n `Invalid ${flagLabel} value \"${token}\". Use open|closed|canceled or a configured status id${\n suggestion ? `. Did you mean \"${suggestion}\"?` : \".\"\n }`,\n EXIT_CODE.USAGE,\n );\n }\n resolved.push(token as ItemStatus);\n continue;\n }\n resolved.push(status);\n }\n return [...new Set(resolved)];\n}\n", "/**\n * @module core/schema/runtime-field-filters\n *\n * Resolves configurable schema, fields, statuses, and workflows for Runtime Field Filters.\n */\nimport { coerceRuntimeFieldValue, readRuntimeFieldOptionValue } from \"./runtime-field-values.js\";\nimport type { RuntimeFieldCommand, RuntimeFieldRegistry } from \"./runtime-schema.js\";\nimport { stableValueEquals } from \"../shared/serialization.js\";\n\nfunction valuesEqual(left: unknown, right: unknown): boolean {\n return stableValueEquals(left, right);\n}\n\n/**\n * Implements collect runtime filter values for the public runtime surface of this module.\n */\nexport function collectRuntimeFilterValues(\n options: Record<string, unknown>,\n fieldRegistry: RuntimeFieldRegistry,\n command: RuntimeFieldCommand,\n): Record<string, unknown> {\n const filters: Record<string, unknown> = {};\n for (const definition of fieldRegistry.command_to_fields.get(command) ?? []) {\n const rawValue = readRuntimeFieldOptionValue(options, definition);\n if (rawValue === undefined) {\n continue;\n }\n filters[definition.metadata_key] = coerceRuntimeFieldValue(definition, rawValue);\n }\n return filters;\n}\n\n/**\n * Implements matches runtime filters for the public runtime surface of this module.\n */\nexport function matchesRuntimeFilters(item: Record<string, unknown>, filters: Record<string, unknown>): boolean {\n for (const [fieldKey, expectedValue] of Object.entries(filters)) {\n const actualValue = item[fieldKey];\n if (Array.isArray(expectedValue)) {\n if (Array.isArray(actualValue)) {\n const normalizedActual = actualValue.map((value) => String(value));\n const normalizedExpected = expectedValue.map((value) => String(value));\n if (!normalizedExpected.every((value) => normalizedActual.includes(value))) {\n return false;\n }\n continue;\n }\n if (!valuesEqual(actualValue, expectedValue[expectedValue.length - 1])) {\n return false;\n }\n continue;\n }\n if (!valuesEqual(actualValue, expectedValue)) {\n return false;\n }\n }\n return true;\n}\n", "/**\n * @module cli/commands/list\n *\n * Implements the pm list command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { isStatusAllFilterInput, parseStatusFilterCsv } from \"../../core/item/status-filter.js\";\nimport { resolveItemTypeRegistry, type ItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { parseIntegerLimit, parsePriority, parseType } from \"../shared-parsers.js\";\nimport { collectRuntimeFilterValues, matchesRuntimeFilters } from \"../../core/schema/runtime-field-filters.js\";\nimport {\n hasMissingMetadataFilter,\n itemMatchesMissingMetadata,\n lifecycleClassifierFromStatusRegistry,\n type MissingMetadataFilters,\n} from \"../../core/governance/metadata-coverage.js\";\nimport {\n contentFiltersNeedBody,\n contentFiltersNeedCollections,\n hasContentFieldFilter,\n itemMatchesContentFilters,\n type ContentField,\n type ContentFieldFilters,\n} from \"../../core/governance/content-fields.js\";\nimport {\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n type RuntimeStatusRegistry,\n} from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { compareTimestampStrings, nowIso, resolveIsoOrRelative } from \"../../core/shared/time.js\";\nimport { listAllFrontMatter, listAllFrontMatterLight, listAllFrontMatterWithBody } from \"../../core/store/item-store.js\";\nimport { HEAVY_METADATA_KEYS } from \"../../core/store/front-matter-cache.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter, ItemStatus, ItemType } from \"../../types/index.js\";\n\n/**\n * Documents the list options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListOptions {\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n updatedAfter?: string;\n updatedBefore?: string;\n createdAfter?: string;\n createdBefore?: string;\n ids?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n limit?: string;\n offset?: string;\n noTruncate?: boolean;\n includeBody?: boolean;\n compact?: boolean;\n brief?: boolean;\n full?: boolean;\n fields?: string;\n sort?: string;\n order?: string;\n tree?: boolean;\n treeDepth?: string;\n excludeTerminal?: boolean;\n filterAcMissing?: boolean;\n filterEstimatesMissing?: boolean;\n filterResolutionMissing?: boolean;\n filterMetadataMissing?: boolean;\n filterReviewerMissing?: boolean;\n filterRiskMissing?: boolean;\n filterConfidenceMissing?: boolean;\n filterSprintMissing?: boolean;\n filterReleaseMissing?: boolean;\n // Content-field presence filters (GH-242). The has*/no* companions mirror the\n // commander flag camelCase (e.g. --no-notes → noNotes, --empty-body → emptyBody)\n // so the MCP param names and ListOptions fields stay identical (the MCP path\n // forwards params verbatim, unlike the CLI which normalizes first). A field may\n // be requested present XOR absent — a both-set request is a usage error.\n hasNotes?: boolean;\n hasLearnings?: boolean;\n hasFiles?: boolean;\n hasDocs?: boolean;\n hasTests?: boolean;\n hasComments?: boolean;\n hasDeps?: boolean;\n hasBody?: boolean;\n hasLinkedCommand?: boolean;\n noNotes?: boolean;\n noLearnings?: boolean;\n noFiles?: boolean;\n noDocs?: boolean;\n noTests?: boolean;\n noComments?: boolean;\n noDeps?: boolean;\n emptyBody?: boolean;\n noLinkedCommand?: boolean;\n [key: string]: unknown;\n}\n\n/** Extract the missing-metadata selection filters from list/update-many options. */\nexport function resolveMissingMetadataFilters(options: {\n filterAcMissing?: boolean;\n filterEstimatesMissing?: boolean;\n filterResolutionMissing?: boolean;\n filterMetadataMissing?: boolean;\n filterReviewerMissing?: boolean;\n filterRiskMissing?: boolean;\n filterConfidenceMissing?: boolean;\n filterSprintMissing?: boolean;\n filterReleaseMissing?: boolean;\n}): MissingMetadataFilters {\n return {\n acMissing: options.filterAcMissing === true,\n estimatesMissing: options.filterEstimatesMissing === true,\n resolutionMissing: options.filterResolutionMissing === true,\n metadataMissing: options.filterMetadataMissing === true,\n reviewerMissing: options.filterReviewerMissing === true,\n riskMissing: options.filterRiskMissing === true,\n confidenceMissing: options.filterConfidenceMissing === true,\n sprintMissing: options.filterSprintMissing === true,\n releaseMissing: options.filterReleaseMissing === true,\n };\n}\n\n/** Per content field: the present flag and the absence flag on the options shape. */\ninterface ContentFieldFlagMapping {\n field: ContentField;\n presentKey: string;\n absentKey: string;\n /** Human flag names used in the conflict error message. */\n presentFlag: string;\n absentFlag: string;\n}\n\nconst CONTENT_FIELD_FLAG_MAPPINGS: readonly ContentFieldFlagMapping[] = [\n { field: \"notes\", presentKey: \"hasNotes\", absentKey: \"noNotes\", presentFlag: \"--has-notes\", absentFlag: \"--no-notes\" },\n { field: \"learnings\", presentKey: \"hasLearnings\", absentKey: \"noLearnings\", presentFlag: \"--has-learnings\", absentFlag: \"--no-learnings\" },\n { field: \"files\", presentKey: \"hasFiles\", absentKey: \"noFiles\", presentFlag: \"--has-files\", absentFlag: \"--no-files\" },\n { field: \"docs\", presentKey: \"hasDocs\", absentKey: \"noDocs\", presentFlag: \"--has-docs\", absentFlag: \"--no-docs\" },\n { field: \"tests\", presentKey: \"hasTests\", absentKey: \"noTests\", presentFlag: \"--has-tests\", absentFlag: \"--no-tests\" },\n { field: \"comments\", presentKey: \"hasComments\", absentKey: \"noComments\", presentFlag: \"--has-comments\", absentFlag: \"--no-comments\" },\n { field: \"deps\", presentKey: \"hasDeps\", absentKey: \"noDeps\", presentFlag: \"--has-deps\", absentFlag: \"--no-deps\" },\n { field: \"body\", presentKey: \"hasBody\", absentKey: \"emptyBody\", presentFlag: \"--has-body\", absentFlag: \"--empty-body\" },\n { field: \"linked_command\", presentKey: \"hasLinkedCommand\", absentKey: \"noLinkedCommand\", presentFlag: \"--has-linked-command\", absentFlag: \"--no-linked-command\" },\n] as const;\n\n/**\n * Resolve the content-field presence/absence selections from list/search\n * options. A field requested both present AND absent is a usage error (the two\n * selections are mutually exclusive). Returns an empty object when no\n * content-field filter is active.\n */\nexport function resolveContentFieldFilters(options: Record<string, unknown>): ContentFieldFilters {\n const filters: ContentFieldFilters = {};\n for (const mapping of CONTENT_FIELD_FLAG_MAPPINGS) {\n const present = options[mapping.presentKey] === true;\n const absent = options[mapping.absentKey] === true;\n if (present && absent) {\n throw new PmCliError(\n `Cannot combine ${mapping.presentFlag} with ${mapping.absentFlag} for the same field.`,\n EXIT_CODE.USAGE,\n );\n }\n if (present) {\n filters[mapping.field] = \"present\";\n } else if (absent) {\n filters[mapping.field] = \"absent\";\n }\n }\n return filters;\n}\n\n/**\n * Restricts listed item values accepted by command, SDK, and storage contracts.\n */\nexport type ListedItem = ItemFrontMatter | (ItemFrontMatter & { body: string });\n\ntype ListProjectionMode = \"full\" | \"compact\" | \"fields\";\n\ninterface ListProjectionConfig {\n mode: ListProjectionMode;\n fields: string[];\n}\n\nexport const LIST_SORT_FIELDS = [\"priority\", \"deadline\", \"updated_at\", \"created_at\", \"title\", \"parent\"] as const;\n/**\n * Restricts list sort field values accepted by command, SDK, and storage contracts.\n */\nexport type ListSortField = (typeof LIST_SORT_FIELDS)[number];\n\nexport const LIST_SORT_ORDER_VALUES = [\"asc\", \"desc\"] as const;\n/**\n * Restricts list sort order values accepted by command, SDK, and storage contracts.\n */\nexport type ListSortOrder = (typeof LIST_SORT_ORDER_VALUES)[number];\n\nconst DEFAULT_COMPACT_LIST_FIELDS = [\"id\", \"title\", \"status\", \"type\", \"priority\", \"parent\", \"updated_at\"] as const;\nconst BRIEF_LIST_FIELDS = [\"id\", \"status\", \"type\", \"title\"] as const;\nconst TREE_METADATA_FIELDS = [\"tree_depth\", \"tree_parent\", \"tree_children\", \"tree_title\"] as const;\n\n// A projection that selects any heavy collection field (or `--full`, which returns\n// items verbatim) must load the full metadata; everything else takes the light path.\n// Sourced from the single HEAVY_METADATA_KEYS definition in the cache layer so the\n// light/heavy split can never drift between the cache and the projection routing.\nconst HEAVY_PROJECTION_FIELDS: ReadonlySet<string> = new Set<string>(HEAVY_METADATA_KEYS);\n\ninterface ListResultBase {\n items: ListedItem[];\n count: number;\n // Total rows matched before pagination; only emitted when --limit/--offset\n // omitted rows, so agents know how many remain (GH-154).\n total?: number;\n warnings?: string[];\n}\n\n/**\n * Documents the list compact result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListCompactResult extends ListResultBase {\n filters: Record<string, unknown>;\n projection?: undefined;\n sorting?: undefined;\n now?: undefined;\n}\n\n/**\n * Documents the list verbose result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListVerboseResult extends ListResultBase {\n filters: Record<string, unknown>;\n projection: {\n mode: ListProjectionMode;\n fields: string[] | null;\n };\n sorting: {\n sort: ListSortField | \"default\";\n order: ListSortOrder;\n };\n now: string;\n}\n\n/**\n * Restricts list result values accepted by command, SDK, and storage contracts.\n */\nexport type ListResult = ListCompactResult | ListVerboseResult;\n\nfunction isNonEmptyRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value) && Object.keys(value).length > 0;\n}\n\n// Active content-field filter flags, keyed by the options dest and the snake_case\n// summary key emitted in the filters echo (GH-242). Presence and absence are\n// distinct echo keys (has_notes vs no_notes; has_body vs empty_body).\nconst CONTENT_FILTER_ECHO_ENTRIES: ReadonlyArray<{ key: string; summaryKey: string }> = [\n { key: \"hasNotes\", summaryKey: \"has_notes\" },\n { key: \"hasLearnings\", summaryKey: \"has_learnings\" },\n { key: \"hasFiles\", summaryKey: \"has_files\" },\n { key: \"hasDocs\", summaryKey: \"has_docs\" },\n { key: \"hasTests\", summaryKey: \"has_tests\" },\n { key: \"hasComments\", summaryKey: \"has_comments\" },\n { key: \"hasDeps\", summaryKey: \"has_deps\" },\n { key: \"hasBody\", summaryKey: \"has_body\" },\n { key: \"hasLinkedCommand\", summaryKey: \"has_linked_command\" },\n { key: \"noNotes\", summaryKey: \"no_notes\" },\n { key: \"noLearnings\", summaryKey: \"no_learnings\" },\n { key: \"noFiles\", summaryKey: \"no_files\" },\n { key: \"noDocs\", summaryKey: \"no_docs\" },\n { key: \"noTests\", summaryKey: \"no_tests\" },\n { key: \"noComments\", summaryKey: \"no_comments\" },\n { key: \"noDeps\", summaryKey: \"no_deps\" },\n { key: \"emptyBody\", summaryKey: \"empty_body\" },\n { key: \"noLinkedCommand\", summaryKey: \"no_linked_command\" },\n] as const;\n\n// Active governance-missing filter flags (GH-236), keyed by options dest and the\n// snake_case summary key emitted in the filters echo.\nconst GOVERNANCE_MISSING_ECHO_ENTRIES: ReadonlyArray<{ key: string; summaryKey: string }> = [\n { key: \"filterReviewerMissing\", summaryKey: \"filter_reviewer_missing\" },\n { key: \"filterRiskMissing\", summaryKey: \"filter_risk_missing\" },\n { key: \"filterConfidenceMissing\", summaryKey: \"filter_confidence_missing\" },\n { key: \"filterSprintMissing\", summaryKey: \"filter_sprint_missing\" },\n { key: \"filterReleaseMissing\", summaryKey: \"filter_release_missing\" },\n] as const;\n\nfunction applyContentFilterEcho(filters: Record<string, unknown>, options: Record<string, unknown>): void {\n for (const entry of CONTENT_FILTER_ECHO_ENTRIES) {\n if (options[entry.key] === true) {\n filters[entry.summaryKey] = true;\n }\n }\n}\n\nfunction applyGovernanceMissingFilterEcho(filters: Record<string, unknown>, options: Record<string, unknown>): void {\n for (const entry of GOVERNANCE_MISSING_ECHO_ENTRIES) {\n if (options[entry.key] === true) {\n filters[entry.summaryKey] = true;\n }\n }\n}\n\n/**\n * Implements build content filter echo for the public runtime surface of this module.\n */\nexport function buildContentFilterEcho(options: Record<string, unknown>): Record<string, true> {\n const echo: Record<string, true> = {};\n applyContentFilterEcho(echo, options);\n return echo;\n}\n\n/**\n * Implements build governance missing filter echo for the public runtime surface of this module.\n */\nexport function buildGovernanceMissingFilterEcho(options: Record<string, unknown>): Record<string, true> {\n const echo: Record<string, true> = {};\n applyGovernanceMissingFilterEcho(echo, options);\n return echo;\n}\n\nfunction buildCompactListFilterSummary(params: {\n filtersStatus: string | string[] | null;\n options: ListOptions;\n treeEnabled: boolean;\n treeDepth: number | undefined;\n sortField: ListSortField | undefined;\n sortOrder: ListSortOrder;\n runtimeFieldFilters: Record<string, unknown>;\n}): Record<string, unknown> {\n const {\n filtersStatus,\n options,\n treeEnabled,\n treeDepth,\n sortField,\n sortOrder,\n runtimeFieldFilters,\n } = params;\n const filters: Record<string, unknown> = {};\n if (filtersStatus !== null) {\n filters.status = filtersStatus;\n }\n if (options.type !== undefined) {\n filters.type = options.type;\n }\n if (options.tag !== undefined) {\n filters.tag = options.tag;\n }\n if (options.priority !== undefined) {\n filters.priority = options.priority;\n }\n if (options.deadlineBefore !== undefined) {\n filters.deadline_before = options.deadlineBefore;\n }\n if (options.deadlineAfter !== undefined) {\n filters.deadline_after = options.deadlineAfter;\n }\n if (options.updatedAfter !== undefined) {\n filters.updated_after = options.updatedAfter;\n }\n if (options.updatedBefore !== undefined) {\n filters.updated_before = options.updatedBefore;\n }\n if (options.createdAfter !== undefined) {\n filters.created_after = options.createdAfter;\n }\n if (options.createdBefore !== undefined) {\n filters.created_before = options.createdBefore;\n }\n if (options.ids !== undefined) {\n filters.ids = options.ids;\n }\n if (options.assignee !== undefined) {\n filters.assignee = options.assignee;\n }\n if (options.assigneeFilter !== undefined) {\n filters.assignee_filter = options.assigneeFilter;\n }\n if (options.parent !== undefined) {\n filters.parent = options.parent;\n }\n if (options.sprint !== undefined) {\n filters.sprint = options.sprint;\n }\n if (options.release !== undefined) {\n filters.release = options.release;\n }\n if (options.filterAcMissing === true) {\n filters.filter_ac_missing = true;\n }\n if (options.filterEstimatesMissing === true) {\n filters.filter_estimates_missing = true;\n }\n if (options.filterResolutionMissing === true) {\n filters.filter_resolution_missing = true;\n }\n if (options.filterMetadataMissing === true) {\n filters.filter_metadata_missing = true;\n }\n applyGovernanceMissingFilterEcho(filters, options);\n applyContentFilterEcho(filters, options);\n if (options.limit !== undefined) {\n filters.limit = options.limit;\n }\n if (options.offset !== undefined) {\n filters.offset = options.offset;\n }\n if (options.includeBody === true) {\n filters.include_body = true;\n }\n if (options.fields !== undefined) {\n filters.fields = options.fields;\n }\n if (treeEnabled) {\n filters.tree = true;\n if (treeDepth !== undefined) {\n filters.tree_depth = treeDepth;\n }\n }\n if (sortField !== undefined) {\n filters.sort = sortField;\n filters.order = sortOrder;\n }\n if (isNonEmptyRecord(runtimeFieldFilters)) {\n filters.runtime_filters = runtimeFieldFilters;\n }\n return filters;\n}\n\nfunction compareDefaultSort(left: ListedItem, right: ListedItem, statusRegistry: RuntimeStatusRegistry): number {\n const leftTerminal = isTerminalStatus(left.status, statusRegistry);\n const rightTerminal = isTerminalStatus(right.status, statusRegistry);\n if (leftTerminal !== rightTerminal) {\n return leftTerminal ? 1 : -1;\n }\n const byPriority = left.priority - right.priority;\n if (byPriority !== 0) {\n return byPriority;\n }\n const byUpdated = compareTimestampStrings(right.updated_at, left.updated_at);\n if (byUpdated !== 0) {\n return byUpdated;\n }\n return (left.id ?? \"\").localeCompare(right.id ?? \"\");\n}\n\nfunction sortItemsDefault(items: ListedItem[], statusRegistry: RuntimeStatusRegistry): ListedItem[] {\n return [...items].sort((left, right) => compareDefaultSort(left, right, statusRegistry));\n}\n\nfunction parseDeadline(raw: string | undefined, fieldLabel: string): string | undefined {\n if (raw === undefined) return undefined;\n return resolveIsoOrRelative(raw, new Date(), fieldLabel);\n}\n\n// updated/created date-window filters share the deadline ISO+relative resolver\n// so agents doing incremental \"what changed since my last context window\" syncs\n// can pass either an ISO timestamp (the common case — feed back the previous\n// run's `now`) or a SIGNED relative offset where \"-2h\"/\"-7d\" reach into the\n// past and \"+1d\" into the future (units h/d/w/m, m = months — there is no\n// minutes unit, matching the deadline resolver).\nfunction parseTimestampWindow(raw: unknown, fieldLabel: string): string | undefined {\n if (raw == null) return undefined;\n const value = String(raw).trim();\n if (value.length === 0) return undefined;\n return resolveIsoOrRelative(value, new Date(), fieldLabel);\n}\n\nfunction parseIdsFilter(raw: unknown): Set<string> | undefined {\n if (raw == null) return undefined;\n const value = String(raw).trim();\n if (value.length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n const ids = value\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (ids.length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n return new Set(ids);\n}\n\nfunction parseOffset(raw: string | undefined): number | undefined {\n if (raw === undefined) return undefined;\n const parsed = Number(raw);\n if (!Number.isInteger(parsed) || parsed < 0) {\n throw new PmCliError(\"Offset filter must be a non-negative integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseFieldSelectors(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const selectors = raw\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (selectors.length === 0) {\n throw new PmCliError(\"List --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n return [...new Set(selectors)];\n}\n\nfunction parseProjectionConfig(options: ListOptions): ListProjectionConfig {\n const compactRequested = options.compact === true;\n const briefRequested = options.brief === true;\n const fullRequested = options.full === true;\n const fieldSelectors = parseFieldSelectors(options.fields);\n const enabledModes =\n Number(compactRequested) + Number(briefRequested) + Number(fullRequested) + Number(fieldSelectors !== undefined);\n if (enabledModes > 1) {\n throw new PmCliError(\n \"List projection options are mutually exclusive. Use one of --compact, --brief, --full, or --fields.\",\n EXIT_CODE.USAGE,\n );\n }\n if (fullRequested) {\n return {\n mode: \"full\",\n fields: [],\n };\n }\n if (briefRequested) {\n return {\n mode: \"compact\",\n fields: [...BRIEF_LIST_FIELDS],\n };\n }\n if (compactRequested) {\n return {\n mode: \"compact\",\n fields: [...DEFAULT_COMPACT_LIST_FIELDS],\n };\n }\n if (fieldSelectors) {\n return {\n mode: \"fields\",\n fields: fieldSelectors,\n };\n }\n return {\n mode: \"full\",\n fields: [],\n };\n}\n\nfunction normalizeProjectionField(field: string): string {\n return field.startsWith(\"item.\") ? field.slice(\"item.\".length) : field;\n}\n\nfunction validateListProjectionFields(projection: ListProjectionConfig, runtimeMetadataKeys: Iterable<string>): void {\n if (projection.mode !== \"fields\") {\n return;\n }\n const allowed = new Set([...FRONT_MATTER_KEY_ORDER, \"body\", ...TREE_METADATA_FIELDS, ...runtimeMetadataKeys]);\n const unknown = projection.fields.filter((field) => !allowed.has(normalizeProjectionField(field)));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown list --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n code: \"unknown_field_projection\",\n examples: [\n \"pm list-open --fields id,title,status,type,updated_at\",\n \"pm list --fields id,title,parent,priority --limit 10\",\n \"pm list-all --fields id,title,body --limit 5\",\n ],\n });\n }\n}\n\n// Convenience aliases so agents/humans who reach for the bare verb form\n// (e.g. `--sort updated`) land on the canonical timestamp fields instead of an error.\n// A Map (not a plain object) avoids prototype-chain lookups for keys like \"__proto__\".\nconst LIST_SORT_FIELD_ALIASES: ReadonlyMap<string, ListSortField> = new Map<string, ListSortField>([\n [\"updated\", \"updated_at\"],\n [\"update\", \"updated_at\"],\n [\"modified\", \"updated_at\"],\n [\"created\", \"created_at\"],\n [\"create\", \"created_at\"],\n]);\n\nfunction parseSortField(raw: string | undefined): ListSortField | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n const aliased = LIST_SORT_FIELD_ALIASES.get(normalized);\n if (aliased) {\n return aliased;\n }\n if (!LIST_SORT_FIELDS.includes(normalized as ListSortField)) {\n throw new PmCliError(\n `Sort field must be one of ${LIST_SORT_FIELDS.join(\"|\")} (aliases: updated->updated_at, created->created_at)`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized as ListSortField;\n}\n\nfunction parseSortOrder(raw: string | undefined): ListSortOrder | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (!LIST_SORT_ORDER_VALUES.includes(normalized as ListSortOrder)) {\n throw new PmCliError(`Sort order must be one of ${LIST_SORT_ORDER_VALUES.join(\"|\")}`, EXIT_CODE.USAGE);\n }\n return normalized as ListSortOrder;\n}\n\nfunction parseTreeDepth(raw: string | undefined): number | undefined {\n return parseIntegerLimit(raw, \"--tree-depth\");\n}\n\nfunction parseAssigneeFilter(raw: string | undefined): \"assigned\" | \"unassigned\" | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (!normalized) {\n throw new PmCliError(\"Assignee filter must be one of assigned|unassigned\", EXIT_CODE.USAGE);\n }\n if (normalized !== \"assigned\" && normalized !== \"unassigned\") {\n throw new PmCliError(`Invalid assignee filter \"${raw}\". Allowed: assigned|unassigned`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\n// `pm list` keeps lenient status parsing (an unknown token is passed through\n// verbatim and simply matches nothing) so custom/unknown statuses never error;\n// the shared CSV parser resolves the open/closed/canceled workflow-group aliases.\nfunction resolveStatusFilter(\n status: ItemStatus | undefined,\n statusRegistry: RuntimeStatusRegistry,\n): ItemStatus[] | undefined {\n return parseStatusFilterCsv(status, statusRegistry, { strict: false });\n}\n\nfunction applyFilters(\n items: ListedItem[],\n status: ItemStatus[] | undefined,\n options: ListOptions,\n typeRegistry: ItemTypeRegistry,\n statusRegistry: RuntimeStatusRegistry,\n runtimeFieldFilters: Record<string, unknown>,\n): ListedItem[] {\n const statusSet = status && status.length > 0 ? new Set<ItemStatus>(status) : undefined;\n const typeFilter = parseType(options.type, typeRegistry);\n const tagFilter = options.tag?.trim().toLowerCase();\n const priorityFilter = parsePriority(options.priority);\n const deadlineBefore = parseDeadline(options.deadlineBefore, \"deadline-before\");\n const deadlineAfter = parseDeadline(options.deadlineAfter, \"deadline-after\");\n const updatedAfter = parseTimestampWindow(options.updatedAfter, \"updated-after\");\n const updatedBefore = parseTimestampWindow(options.updatedBefore, \"updated-before\");\n const createdAfter = parseTimestampWindow(options.createdAfter, \"created-after\");\n const createdBefore = parseTimestampWindow(options.createdBefore, \"created-before\");\n const idsFilter = parseIdsFilter(options.ids);\n const assigneeFilter = options.assignee?.trim();\n const assigneeModeFilter = parseAssigneeFilter(options.assigneeFilter);\n const parentFilter = options.parent?.trim();\n const sprintFilter = options.sprint?.trim();\n const releaseFilter = options.release?.trim();\n const missingMetadataFilters = resolveMissingMetadataFilters(options);\n const missingMetadataActive = hasMissingMetadataFilter(missingMetadataFilters);\n const lifecycleClassifier = lifecycleClassifierFromStatusRegistry(statusRegistry);\n const contentFieldFilters = resolveContentFieldFilters(options as Record<string, unknown>);\n const contentFiltersActive = hasContentFieldFilter(contentFieldFilters);\n\n if (assigneeFilter && (assigneeFilter.toLowerCase() === \"none\" || assigneeFilter.toLowerCase() === \"null\")) {\n throw new PmCliError(\n '--assignee no longer accepts \"none\" or \"null\". Use --assignee-filter unassigned.',\n EXIT_CODE.USAGE,\n );\n }\n if (assigneeFilter !== undefined && assigneeModeFilter === \"unassigned\") {\n throw new PmCliError(\"Cannot combine --assignee with --assignee-filter unassigned\", EXIT_CODE.USAGE);\n }\n\n return items.filter((item) => {\n if (idsFilter && !idsFilter.has(item.id)) return false;\n if (statusSet && !statusSet.has(item.status)) return false;\n if (options.excludeTerminal && isTerminalStatus(item.status, statusRegistry)) return false;\n if (typeFilter && item.type !== typeFilter) return false;\n if (tagFilter && !item.tags.includes(tagFilter)) return false;\n if (priorityFilter !== undefined && item.priority !== priorityFilter) return false;\n if (deadlineBefore && (!item.deadline || compareTimestampStrings(item.deadline, deadlineBefore) > 0)) return false;\n if (deadlineAfter && (!item.deadline || compareTimestampStrings(item.deadline, deadlineAfter) < 0)) return false;\n if (updatedAfter && compareTimestampStrings(item.updated_at, updatedAfter) < 0) return false;\n if (updatedBefore && compareTimestampStrings(item.updated_at, updatedBefore) > 0) return false;\n if (createdAfter && compareTimestampStrings(item.created_at, createdAfter) < 0) return false;\n if (createdBefore && compareTimestampStrings(item.created_at, createdBefore) > 0) return false;\n if (assigneeModeFilter === \"assigned\" && !item.assignee) return false;\n if (assigneeModeFilter === \"unassigned\" && item.assignee) return false;\n if (assigneeFilter !== undefined && item.assignee !== assigneeFilter) {\n return false;\n }\n if (parentFilter !== undefined && options.tree !== true && item.parent !== parentFilter) return false;\n if (sprintFilter !== undefined && item.sprint !== sprintFilter) return false;\n if (releaseFilter !== undefined && item.release !== releaseFilter) return false;\n if (missingMetadataActive && !itemMatchesMissingMetadata(item, missingMetadataFilters, lifecycleClassifier)) {\n return false;\n }\n if (contentFiltersActive && !itemMatchesContentFilters(item, contentFieldFilters)) {\n return false;\n }\n if (!matchesRuntimeFilters(item as Record<string, unknown>, runtimeFieldFilters)) {\n return false;\n }\n return true;\n });\n}\n\nfunction trimNonEmpty(value: string | undefined): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction withTreeMetadata(item: ListedItem, depth: number, childCount: number): ListedItem {\n const itemRecord = toItemRecord(item);\n const title = typeof itemRecord.title === \"string\" ? itemRecord.title : \"\";\n const parent = trimNonEmpty(typeof itemRecord.parent === \"string\" ? itemRecord.parent : undefined) ?? null;\n return {\n ...item,\n tree_depth: depth,\n tree_parent: parent,\n tree_children: childCount,\n tree_title: `${\" \".repeat(depth)}${title}`,\n } as ListedItem;\n}\n\nfunction orderItemsAsTree(\n sortedItems: ListedItem[],\n parentRoot: string | undefined,\n maxDepth: number | undefined,\n): ListedItem[] {\n const byId = new Map<string, ListedItem>();\n const childrenByParent = new Map<string, ListedItem[]>();\n for (const item of sortedItems) {\n byId.set(item.id, item);\n const parentId = trimNonEmpty(item.parent);\n if (!parentId) {\n continue;\n }\n const bucket = childrenByParent.get(parentId);\n if (bucket) {\n bucket.push(item);\n } else {\n childrenByParent.set(parentId, [item]);\n }\n }\n\n const roots = parentRoot\n ? [...(childrenByParent.get(parentRoot) ?? [])]\n : sortedItems.filter((item) => {\n const parentId = trimNonEmpty(item.parent);\n return !parentId || !byId.has(parentId);\n });\n const ordered: ListedItem[] = [];\n const visited = new Set<string>();\n const pushNode = (node: ListedItem, depth: number): void => {\n if (visited.has(node.id)) {\n return;\n }\n visited.add(node.id);\n const children = childrenByParent.get(node.id) ?? [];\n ordered.push(withTreeMetadata(node, depth, children.length));\n if (maxDepth !== undefined && depth >= maxDepth) {\n return;\n }\n for (const child of children) {\n pushNode(child, depth + 1);\n }\n };\n for (const root of roots) {\n pushNode(root, 0);\n }\n return ordered;\n}\n\nfunction compareNullableString(left: string | null, right: string | null): number {\n if (left === right) {\n return 0;\n }\n if (left === null) {\n return 1;\n }\n if (right === null) {\n return -1;\n }\n return left.localeCompare(right);\n}\n\nfunction compareNullableTimestamp(left: string | null, right: string | null): number {\n if (left === right) {\n return 0;\n }\n if (left === null) {\n return 1;\n }\n if (right === null) {\n return -1;\n }\n return compareTimestampStrings(left, right);\n}\n\nfunction compareBySortField(left: ListedItem, right: ListedItem, field: ListSortField): number {\n switch (field) {\n case \"priority\":\n return left.priority - right.priority;\n case \"deadline\":\n return compareNullableTimestamp(left.deadline ?? null, right.deadline ?? null);\n case \"updated_at\":\n return compareTimestampStrings(left.updated_at, right.updated_at);\n case \"created_at\":\n return compareTimestampStrings(left.created_at, right.created_at);\n case \"title\":\n return (left.title ?? \"\").localeCompare(right.title ?? \"\");\n case \"parent\":\n return compareNullableString(left.parent ?? null, right.parent ?? null);\n default:\n return 0;\n }\n}\n\nfunction sortItems(\n items: ListedItem[],\n sortField: ListSortField | undefined,\n sortOrder: ListSortOrder,\n statusRegistry: RuntimeStatusRegistry,\n): ListedItem[] {\n if (!sortField) {\n return sortItemsDefault(items, statusRegistry);\n }\n return [...items].sort((left, right) => {\n const byField = compareBySortField(left, right, sortField);\n if (byField !== 0) {\n return sortOrder === \"desc\" ? -byField : byField;\n }\n const fallback = compareDefaultSort(left, right, statusRegistry);\n return sortOrder === \"desc\" ? -fallback : fallback;\n });\n}\n\nfunction readListFieldValue(item: ListedItem, field: string, treeMode = false): unknown {\n const normalized = normalizeProjectionField(field.trim());\n if (normalized.length === 0) {\n return null;\n }\n const itemRecord = toItemRecord(item);\n if (treeMode && normalized === \"title\" && typeof itemRecord.tree_title === \"string\") {\n return itemRecord.tree_title;\n }\n if (Object.prototype.hasOwnProperty.call(itemRecord, normalized)) {\n return itemRecord[normalized] ?? null;\n }\n return null;\n}\n\nfunction projectListItems(items: ListedItem[], projection: ListProjectionConfig, treeMode = false): ListedItem[] {\n if (projection.mode === \"full\") {\n return items;\n }\n return items.map((item) => {\n const projected: Record<string, unknown> = {};\n for (const field of projection.fields) {\n projected[field] = readListFieldValue(item, field, treeMode);\n }\n return projected as unknown as ListedItem;\n });\n}\n\nfunction runtimeMetadataKeysForProjection(definitions: Array<{ metadata_key: string }>): string[] {\n const keys: string[] = [];\n for (const field of definitions) {\n keys.push(field.metadata_key);\n }\n return keys;\n}\n\n/**\n * Implements run list for the public runtime surface of this module.\n */\nexport async function runList(status: ItemStatus | undefined, options: ListOptions, global: GlobalOptions): Promise<ListResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);\n const runtimeFieldFilters = collectRuntimeFilterValues(options as Record<string, unknown>, runtimeFieldRegistry, \"list\");\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const projection = parseProjectionConfig(options);\n const runtimeMetadataKeys = runtimeMetadataKeysForProjection(runtimeFieldRegistry.definitions);\n validateListProjectionFields(projection, runtimeMetadataKeys);\n const listWarnings: string[] = [];\n const projectionNeedsBody = projection.fields.some((field) => normalizeProjectionField(field) === \"body\");\n // The heavy collection fields are only emitted by `--full` (verbatim items) or an\n // explicit `--fields <heavy>` selection. Every other projection (default brief,\n // `--compact`, light `--fields`) reads only light scalar fields, so it takes the\n // light path that skips the large collections cache (the hot-path JSON.parse win).\n const projectionNeedsCollections =\n projection.mode === \"full\" ||\n projection.fields.some((field) => HEAVY_PROJECTION_FIELDS.has(normalizeProjectionField(field)));\n // Content-field filters (GH-242) inspect the heavy collection arrays and/or the\n // body, so they force the matching load path even when the projection alone\n // would take the light path. notes/learnings/files/docs/tests/comments/deps/\n // linked_command live in the heavy collections; body needs the body load.\n const contentFieldFilters = resolveContentFieldFilters(options as Record<string, unknown>);\n const contentNeedsCollections = contentFiltersNeedCollections(contentFieldFilters);\n const contentNeedsBody = contentFiltersNeedBody(contentFieldFilters);\n let items: ListedItem[];\n if (options.includeBody || projectionNeedsBody || contentNeedsBody) {\n items = await listAllFrontMatterWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n } else if (projectionNeedsCollections || contentNeedsCollections) {\n items = await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n } else {\n items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n }\n const sortField = parseSortField(options.sort);\n const sortOrder = parseSortOrder(options.order) ?? \"asc\";\n const treeEnabled = options.tree === true;\n if (!treeEnabled && options.treeDepth !== undefined) {\n throw new PmCliError(\"List --tree-depth requires --tree\", EXIT_CODE.USAGE);\n }\n const treeDepth = treeEnabled ? parseTreeDepth(options.treeDepth) : undefined;\n const parentRoot = treeEnabled ? trimNonEmpty(options.parent) : undefined;\n if (!sortField && options.order !== undefined) {\n throw new PmCliError(\"List --order requires --sort\", EXIT_CODE.USAGE);\n }\n const explicitStatus = resolveStatusFilter(options.status as ItemStatus | undefined, statusRegistry);\n const resolvedStatus = explicitStatus ?? resolveStatusFilter(status, statusRegistry);\n const explicitAllStatuses = isStatusAllFilterInput(options.status);\n const effectiveOptions = explicitStatus || explicitAllStatuses ? { ...options, excludeTerminal: false } : options;\n const filtered = applyFilters(items, resolvedStatus, effectiveOptions, typeRegistry, statusRegistry, runtimeFieldFilters);\n const filtersStatus =\n explicitAllStatuses\n ? \"all\"\n : resolvedStatus === undefined\n ? null\n : resolvedStatus.length === 1\n ? resolvedStatus[0]\n : resolvedStatus;\n const sorted = sortItems(filtered, sortField, sortOrder, statusRegistry);\n const ordered = treeEnabled ? orderItemsAsTree(sorted, parentRoot, treeDepth) : sorted;\n // --no-truncate (alias --all) forces full results, overriding any --limit so an\n // agent can pull the entire matched set in one call (GH-154).\n const noTruncate = options.noTruncate === true;\n const limit = noTruncate ? undefined : parseIntegerLimit(options.limit);\n const offset = parseOffset(options.offset) ?? 0;\n const limited = limit === undefined ? ordered.slice(offset) : ordered.slice(offset, offset + limit);\n const projected = projectListItems(limited, projection, treeEnabled);\n const totalMatched = ordered.length;\n // Surface the pre-pagination total only when rows were actually omitted.\n const truncationExtras = projected.length < totalMatched ? { total: totalMatched } : {};\n const now = nowIso();\n const warnings = [...new Set(listWarnings)].sort((left, right) => left.localeCompare(right));\n const projectionFields = projection.mode === \"full\" ? null : [...projection.fields];\n // pm-vhx6: compact-mode list output is primarily consumed by agents. Keep the\n // metadata trailer token-light by returning only active/user-supplied filters\n // and omitting projection/sorting/now boilerplate in this path.\n const compactSummaryMode = projection.mode === \"compact\" && options.compact === true;\n if (compactSummaryMode) {\n const compactFilters = buildCompactListFilterSummary({\n filtersStatus,\n options,\n treeEnabled,\n treeDepth,\n sortField,\n sortOrder,\n runtimeFieldFilters,\n });\n return {\n items: projected,\n count: projected.length,\n ...truncationExtras,\n filters: compactFilters,\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n }\n return {\n items: projected,\n count: projected.length,\n ...truncationExtras,\n filters: {\n status: filtersStatus,\n type: options.type ?? null,\n tag: options.tag ?? null,\n priority: options.priority ?? null,\n deadline_before: options.deadlineBefore ?? null,\n deadline_after: options.deadlineAfter ?? null,\n updated_after: options.updatedAfter ?? null,\n updated_before: options.updatedBefore ?? null,\n created_after: options.createdAfter ?? null,\n created_before: options.createdBefore ?? null,\n ids: options.ids ?? null,\n assignee: options.assignee ?? null,\n assignee_filter: options.assigneeFilter ?? null,\n parent: options.parent ?? null,\n sprint: options.sprint ?? null,\n release: options.release ?? null,\n ...(options.filterAcMissing === true ? { filter_ac_missing: true } : {}),\n ...(options.filterEstimatesMissing === true ? { filter_estimates_missing: true } : {}),\n ...(options.filterResolutionMissing === true ? { filter_resolution_missing: true } : {}),\n ...(options.filterMetadataMissing === true ? { filter_metadata_missing: true } : {}),\n ...buildGovernanceMissingFilterEcho(options),\n ...buildContentFilterEcho(options),\n limit: options.limit ?? null,\n offset: options.offset ?? null,\n ...(noTruncate ? { no_truncate: true } : {}),\n include_body: options.includeBody ?? null,\n compact: options.compact ?? null,\n fields: options.fields ?? null,\n ...(treeEnabled ? { tree: true, tree_depth: treeDepth ?? null } : {}),\n sort: sortField ?? null,\n order: sortField ? sortOrder : null,\n runtime_filters: runtimeFieldFilters,\n },\n projection: {\n mode: projection.mode,\n fields: projectionFields,\n },\n sorting: {\n sort: sortField ?? \"default\",\n order: sortField ? sortOrder : \"asc\",\n },\n now,\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n}\n\nexport const _testOnly = {\n applyFilters,\n buildCompactListFilterSummary,\n buildContentFilterEcho,\n buildGovernanceMissingFilterEcho,\n resolveContentFieldFilters,\n resolveMissingMetadataFilters,\n compareBySortField,\n compareDefaultSort,\n compareNullableString,\n compareNullableTimestamp,\n normalizeProjectionField,\n parseAssigneeFilter,\n parseFieldSelectors,\n parseIdsFilter,\n parseOffset,\n parseProjectionConfig,\n parseSortField,\n parseSortOrder,\n orderItemsAsTree,\n projectListItems,\n readListFieldValue,\n runtimeMetadataKeysForProjection,\n sortItems,\n trimNonEmpty,\n withTreeMetadata,\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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