@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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/registration-helpers.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module cli/registration-helpers\n *\n * Provides CLI runtime support for Registration Helpers.\n */\nimport type { Command } from \"commander\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { normalizeStatusInput } from \"../core/item/status.js\";\nimport { refreshSearchArtifactsForMutation } from \"../core/search/cache.js\";\nimport { shouldRunSearchRefreshInForeground } from \"../core/search/background-refresh.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { printError, printResult, writeStdout } from \"../core/output/output.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport {\n setActiveCommandResult,\n} from \"../core/extensions/index.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport type { ItemStatus } from \"../types/index.js\";\nimport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n NEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n readFirstValueFromCommanderOptions,\n readFirstStringFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n} from \"../sdk/cli-contracts.js\";\nimport type { CommanderOptionAliasContract } from \"../sdk/cli-contracts.js\";\nimport type {\n ContextOptions,\n CreateCommandOptions,\n AggregateOptions,\n ListOptions,\n NextOptions,\n} from \"./commands/index.js\";\nimport type { runList, runActivity } from \"./commands/index.js\";\n\nexport {\n printError,\n printResult,\n writeStdout,\n};\n\nconst RESOLVED_GLOBAL_OPTIONS = Symbol(\"pm.resolvedGlobalOptions\");\n\ntype CommandWithResolvedGlobals = Command & {\n [RESOLVED_GLOBAL_OPTIONS]?: GlobalOptions;\n};\n\ninterface CommandOptionsReader {\n optsWithGlobals?: () => Record<string, unknown>;\n opts?: () => Record<string, unknown>;\n}\n\nfunction commandOptionsReader(command: unknown): CommandOptionsReader {\n return typeof command === \"object\" && command !== null ? command as CommandOptionsReader : {};\n}\n\n// Resolves the alias contract for a normalize target, falling back to a\n// single-key contract if the target is somehow absent from the contract table.\nfunction resolveCommanderContract(\n contracts: CommanderOptionAliasContract[],\n target: string,\n): CommanderOptionAliasContract {\n const contract = contracts.find((entry) => entry.target === target);\n /* c8 ignore start -- every normalize target is present in its contract table (verified by contract drift tests); the fallback is a defensive guard against future drift */\n return contract ?? { target, keys: [target] };\n /* c8 ignore stop */\n}\n\n/**\n * Implements set resolved global options for the public runtime surface of this module.\n */\nexport function setResolvedGlobalOptions(command: Command, globalOptions: GlobalOptions): void {\n (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS] = { ...globalOptions };\n}\n\n/**\n * Implements clear resolved global options for the public runtime surface of this module.\n */\nexport function clearResolvedGlobalOptions(command: Command): void {\n delete (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS];\n}\n\n/**\n * Implements get global options for the public runtime surface of this module.\n */\nexport function getGlobalOptions(command: Command): GlobalOptions {\n const resolved = (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS];\n if (resolved) {\n return { ...resolved };\n }\n const reader = commandOptionsReader(command);\n const opts = typeof reader.optsWithGlobals === \"function\"\n ? reader.optsWithGlobals()\n : typeof reader.opts === \"function\"\n ? reader.opts()\n : {};\n return {\n json: opts.json === true ? true : undefined,\n quiet: Boolean(opts.quiet),\n noChangedFields: opts.changedFields === false,\n idOnly: opts.idOnly === true,\n path: typeof opts.pmPath === \"string\"\n ? opts.pmPath\n : typeof opts.path === \"string\"\n ? opts.path\n : undefined,\n noExtensions: opts.extensions === false,\n noPager: Boolean(opts.noPager),\n profile: Boolean(opts.profile),\n };\n}\n\n/**\n * Implements get command path for the public runtime surface of this module.\n */\nexport function getCommandPath(command: Command): string {\n const parts: string[] = [];\n let current: Command | null = command;\n while (current?.parent) {\n parts.unshift(current.name());\n current = current.parent;\n }\n return parts.join(\" \");\n}\n\n/**\n * Implements apply default output format for the public runtime surface of this module.\n */\nexport async function applyDefaultOutputFormat(globalOptions: GlobalOptions): Promise<GlobalOptions> {\n if (globalOptions.json === true) {\n return globalOptions;\n }\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n return globalOptions;\n }\n const settings = await readSettings(pmRoot);\n return {\n ...globalOptions,\n defaultOutputFormat: settings.output.default_format,\n };\n}\n\n/**\n * Implements collect for the public runtime surface of this module.\n */\nexport function collect(value: string, previous: string[] | undefined): string[] {\n const next = previous ?? [];\n next.push(value);\n return next;\n}\n\nfunction pushOptionalValueFlag(args: string[], flag: string, value: unknown): void {\n if (typeof value !== \"string\") {\n return;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n return;\n }\n args.push(flag, trimmed);\n}\n\nfunction pushOptionalBooleanFlag(args: string[], flag: string, value: unknown): void {\n if (value === true) {\n args.push(flag);\n }\n}\n\nfunction pushRepeatableValueFlag(args: string[], flag: string, values: unknown): void {\n if (!Array.isArray(values)) {\n return;\n }\n for (const value of values) {\n if (typeof value !== \"string\") {\n continue;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n continue;\n }\n args.push(flag, trimmed);\n }\n}\n\n/**\n * Implements build background test command args for the public runtime surface of this module.\n */\nexport function buildBackgroundTestCommandArgs(id: string, options: Record<string, unknown>): string[] {\n const args: string[] = [\"test\", id, \"--run\", \"--json\", \"--progress\"];\n pushRepeatableValueFlag(args, \"--add\", options.add);\n pushRepeatableValueFlag(args, \"--add-json\", options.addJson);\n pushRepeatableValueFlag(args, \"--remove\", options.remove);\n pushOptionalValueFlag(args, \"--match\", options.match);\n pushOptionalValueFlag(args, \"--only-index\", options.onlyIndex);\n pushOptionalBooleanFlag(args, \"--only-last\", options.onlyLast);\n pushOptionalValueFlag(args, \"--timeout\", options.timeout);\n pushRepeatableValueFlag(args, \"--env-set\", options.envSet);\n pushRepeatableValueFlag(args, \"--env-clear\", options.envClear);\n pushOptionalBooleanFlag(args, \"--shared-host-safe\", options.sharedHostSafe);\n pushOptionalValueFlag(args, \"--pm-context\", options.pmContext);\n pushOptionalBooleanFlag(args, \"--override-linked-pm-context\", options.overrideLinkedPmContext);\n pushOptionalBooleanFlag(args, \"--fail-on-context-mismatch\", options.failOnContextMismatch);\n pushOptionalBooleanFlag(args, \"--fail-on-skipped\", options.failOnSkipped);\n pushOptionalBooleanFlag(args, \"--fail-on-empty-test-run\", options.failOnEmptyTestRun);\n pushOptionalBooleanFlag(args, \"--require-assertions-for-pm\", options.requireAssertionsForPm);\n pushOptionalBooleanFlag(args, \"--check-context\", options.checkContext);\n pushOptionalBooleanFlag(args, \"--auto-pm-context\", options.autoPmContext);\n pushOptionalValueFlag(args, \"--author\", options.author);\n pushOptionalValueFlag(args, \"--message\", options.message);\n pushOptionalBooleanFlag(args, \"--force\", options.force);\n return args;\n}\n\n/**\n * Implements build background test all command args for the public runtime surface of this module.\n */\nexport function buildBackgroundTestAllCommandArgs(options: Record<string, unknown>): string[] {\n const args: string[] = [\"test-all\", \"--json\", \"--progress\"];\n pushOptionalValueFlag(args, \"--status\", options.status);\n pushOptionalValueFlag(args, \"--limit\", options.limit);\n pushOptionalValueFlag(args, \"--offset\", options.offset);\n pushOptionalValueFlag(args, \"--timeout\", options.timeout);\n pushRepeatableValueFlag(args, \"--env-set\", options.envSet);\n pushRepeatableValueFlag(args, \"--env-clear\", options.envClear);\n pushOptionalBooleanFlag(args, \"--shared-host-safe\", options.sharedHostSafe);\n pushOptionalValueFlag(args, \"--pm-context\", options.pmContext);\n pushOptionalBooleanFlag(args, \"--override-linked-pm-context\", options.overrideLinkedPmContext);\n pushOptionalBooleanFlag(args, \"--fail-on-context-mismatch\", options.failOnContextMismatch);\n pushOptionalBooleanFlag(args, \"--fail-on-skipped\", options.failOnSkipped);\n pushOptionalBooleanFlag(args, \"--fail-on-empty-test-run\", options.failOnEmptyTestRun);\n pushOptionalBooleanFlag(args, \"--require-assertions-for-pm\", options.requireAssertionsForPm);\n pushOptionalBooleanFlag(args, \"--check-context\", options.checkContext);\n pushOptionalBooleanFlag(args, \"--auto-pm-context\", options.autoPmContext);\n return args;\n}\n\n/**\n * Implements format hook warnings for the public runtime surface of this module.\n */\nexport function formatHookWarnings(warnings: string[]): string {\n return warnings.join(\",\");\n}\n\n/**\n * Implements normalize create options for the public runtime surface of this module.\n */\nexport function normalizeCreateOptions(\n commandOptions: Record<string, unknown>,\n options: { requireType?: boolean } = {},\n): CreateCommandOptions {\n const readCreateString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n commandOptions,\n resolveCommanderContract(CREATE_COMMANDER_STRING_OPTION_CONTRACTS, target),\n );\n const readCreateList = (target: string): string[] | undefined =>\n readStringArrayFromCommanderOptions(\n commandOptions,\n resolveCommanderContract(CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, target),\n );\n\n const type = readCreateString(\"type\");\n if (options.requireType !== false && type === undefined) {\n throw new PmCliError(\n \"Missing required option --type <value>. Why required: create resolves runtime schema fields/workflow from item type. Retry: add --type <built-in or configured custom type> (example: --type Task).\",\n EXIT_CODE.USAGE,\n );\n }\n\n const normalized: Record<string, unknown> = {\n title: readCreateString(\"title\"),\n description: readCreateString(\"description\"),\n type,\n template: readCreateString(\"template\"),\n createMode: readCreateString(\"createMode\"),\n schedulePreset: readCreateString(\"schedulePreset\"),\n status: readCreateString(\"status\"),\n priority: readCreateString(\"priority\"),\n tags: readCreateString(\"tags\"),\n addTags: readCreateList(\"addTags\"),\n body: readCreateString(\"body\"),\n deadline: readCreateString(\"deadline\"),\n estimatedMinutes: readCreateString(\"estimatedMinutes\"),\n acceptanceCriteria: readCreateString(\"acceptanceCriteria\"),\n definitionOfReady: readCreateString(\"definitionOfReady\"),\n order: readCreateString(\"order\"),\n rank: readCreateString(\"rank\"),\n goal: readCreateString(\"goal\"),\n objective: readCreateString(\"objective\"),\n value: readCreateString(\"value\"),\n impact: readCreateString(\"impact\"),\n outcome: readCreateString(\"outcome\"),\n whyNow: readCreateString(\"whyNow\"),\n author: readCreateString(\"author\"),\n message: readCreateString(\"message\"),\n assignee: readCreateString(\"assignee\"),\n parent: readCreateString(\"parent\"),\n allowMissingParent: commandOptions.allowMissingParent === true,\n reviewer: readCreateString(\"reviewer\"),\n risk: readCreateString(\"risk\"),\n confidence: readCreateString(\"confidence\"),\n sprint: readCreateString(\"sprint\"),\n release: readCreateString(\"release\"),\n blockedBy: readCreateString(\"blockedBy\"),\n blockedReason: readCreateString(\"blockedReason\"),\n unblockNote: readCreateString(\"unblockNote\"),\n reporter: readCreateString(\"reporter\"),\n severity: readCreateString(\"severity\"),\n environment: readCreateString(\"environment\"),\n reproSteps: readCreateString(\"reproSteps\"),\n resolution: readCreateString(\"resolution\"),\n expectedResult: readCreateString(\"expectedResult\"),\n actualResult: readCreateString(\"actualResult\"),\n affectedVersion: readCreateString(\"affectedVersion\"),\n fixedVersion: readCreateString(\"fixedVersion\"),\n component: readCreateString(\"component\"),\n regression: readCreateString(\"regression\"),\n customerImpact: readCreateString(\"customerImpact\"),\n dep: readCreateList(\"dep\"),\n comment: readCreateList(\"comment\"),\n note: readCreateList(\"note\"),\n learning: readCreateList(\"learning\"),\n file: readCreateList(\"file\"),\n test: readCreateList(\"test\"),\n doc: readCreateList(\"doc\"),\n reminder: readCreateList(\"reminder\"),\n event: readCreateList(\"event\"),\n typeOption: readCreateList(\"typeOption\"),\n field: readCreateList(\"field\"),\n unset: readCreateList(\"unset\"),\n clearDeps: commandOptions.clearDeps === true ? true : undefined,\n clearComments: commandOptions.clearComments === true ? true : undefined,\n clearNotes: commandOptions.clearNotes === true ? true : undefined,\n clearLearnings: commandOptions.clearLearnings === true ? true : undefined,\n clearFiles: commandOptions.clearFiles === true ? true : undefined,\n clearTests: commandOptions.clearTests === true ? true : undefined,\n clearDocs: commandOptions.clearDocs === true ? true : undefined,\n clearReminders: commandOptions.clearReminders === true ? true : undefined,\n clearEvents: commandOptions.clearEvents === true ? true : undefined,\n clearTypeOptions: commandOptions.clearTypeOptions === true ? true : undefined,\n };\n for (const [key, value] of Object.entries(commandOptions)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as CreateCommandOptions;\n}\n\n/**\n * Implements normalize update options for the public runtime surface of this module.\n */\nexport function normalizeUpdateOptions(commandOptions: Record<string, unknown>): Record<string, unknown> {\n const readUpdateString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n commandOptions,\n resolveCommanderContract(UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, target),\n );\n const readUpdateList = (target: string): string[] | undefined =>\n readStringArrayFromCommanderOptions(\n commandOptions,\n resolveCommanderContract(UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, target),\n );\n\n const normalized: Record<string, unknown> = {\n title: readUpdateString(\"title\"),\n description: readUpdateString(\"description\"),\n body: readUpdateString(\"body\"),\n status: readUpdateString(\"status\"),\n closeReason: readUpdateString(\"closeReason\"),\n priority: readUpdateString(\"priority\"),\n type: readUpdateString(\"type\"),\n tags: readUpdateString(\"tags\"),\n addTags: readUpdateList(\"addTags\"),\n removeTags: readUpdateList(\"removeTags\"),\n deadline: readUpdateString(\"deadline\"),\n estimatedMinutes: readUpdateString(\"estimatedMinutes\"),\n acceptanceCriteria: readUpdateString(\"acceptanceCriteria\"),\n definitionOfReady: readUpdateString(\"definitionOfReady\"),\n order: readUpdateString(\"order\"),\n rank: readUpdateString(\"rank\"),\n goal: readUpdateString(\"goal\"),\n objective: readUpdateString(\"objective\"),\n value: readUpdateString(\"value\"),\n impact: readUpdateString(\"impact\"),\n outcome: readUpdateString(\"outcome\"),\n whyNow: readUpdateString(\"whyNow\"),\n author: readUpdateString(\"author\"),\n message: readUpdateString(\"message\"),\n force: Boolean(commandOptions.force),\n allowAuditUpdate:\n commandOptions.allowAuditUpdate === true || commandOptions.allow_audit_update === true ? true : undefined,\n allowAuditDepUpdate:\n commandOptions.allowAuditDepUpdate === true || commandOptions.allow_audit_dep_update === true ? true : undefined,\n assignee: readUpdateString(\"assignee\"),\n parent: readUpdateString(\"parent\"),\n reviewer: readUpdateString(\"reviewer\"),\n risk: readUpdateString(\"risk\"),\n confidence: readUpdateString(\"confidence\"),\n sprint: readUpdateString(\"sprint\"),\n release: readUpdateString(\"release\"),\n blockedBy: readUpdateString(\"blockedBy\"),\n blockedReason: readUpdateString(\"blockedReason\"),\n unblockNote: readUpdateString(\"unblockNote\"),\n reporter: readUpdateString(\"reporter\"),\n severity: readUpdateString(\"severity\"),\n environment: readUpdateString(\"environment\"),\n reproSteps: readUpdateString(\"reproSteps\"),\n resolution: readUpdateString(\"resolution\"),\n expectedResult: readUpdateString(\"expectedResult\"),\n actualResult: readUpdateString(\"actualResult\"),\n affectedVersion: readUpdateString(\"affectedVersion\"),\n fixedVersion: readUpdateString(\"fixedVersion\"),\n component: readUpdateString(\"component\"),\n regression: readUpdateString(\"regression\"),\n customerImpact: readUpdateString(\"customerImpact\"),\n dep: readUpdateList(\"dep\"),\n depRemove: readUpdateList(\"depRemove\"),\n replaceDeps: commandOptions.replaceDeps === true ? true : undefined,\n replaceTests: commandOptions.replaceTests === true ? true : undefined,\n comment: readUpdateList(\"comment\"),\n note: readUpdateList(\"note\"),\n learning: readUpdateList(\"learning\"),\n file: readUpdateList(\"file\"),\n test: readUpdateList(\"test\"),\n doc: readUpdateList(\"doc\"),\n reminder: readUpdateList(\"reminder\"),\n event: readUpdateList(\"event\"),\n typeOption: readUpdateList(\"typeOption\"),\n field: readUpdateList(\"field\"),\n unset: readUpdateList(\"unset\"),\n clearDeps: commandOptions.clearDeps === true ? true : undefined,\n clearComments: commandOptions.clearComments === true ? true : undefined,\n clearNotes: commandOptions.clearNotes === true ? true : undefined,\n clearLearnings: commandOptions.clearLearnings === true ? true : undefined,\n clearFiles: commandOptions.clearFiles === true ? true : undefined,\n clearTests: commandOptions.clearTests === true ? true : undefined,\n clearDocs: commandOptions.clearDocs === true ? true : undefined,\n clearReminders: commandOptions.clearReminders === true ? true : undefined,\n clearEvents: commandOptions.clearEvents === true ? true : undefined,\n clearTypeOptions: commandOptions.clearTypeOptions === true ? true : undefined,\n };\n for (const [key, value] of Object.entries(commandOptions)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized;\n}\n\nconst UPDATE_MANY_CONTROL_OPTION_KEYS = new Set<string>([\n \"filterStatus\",\n \"filterType\",\n \"filterTag\",\n \"filterPriority\",\n \"filterDeadlineBefore\",\n \"filterDeadlineAfter\",\n \"filterUpdatedAfter\",\n \"filterUpdatedBefore\",\n \"filterCreatedAfter\",\n \"filterCreatedBefore\",\n \"filterAssignee\",\n \"filterAssigneeFilter\",\n \"filterAssignee_filter\",\n \"filterParent\",\n \"filterSprint\",\n \"filterRelease\",\n \"filterAcMissing\",\n \"filterEstimatesMissing\",\n \"filterEstimateMissing\",\n \"filterResolutionMissing\",\n \"filterMetadataMissing\",\n \"filterReviewerMissing\",\n \"filterRiskMissing\",\n \"filterConfidenceMissing\",\n \"filterSprintMissing\",\n \"filterReleaseMissing\",\n \"filterHasNotes\",\n \"filterNoNotes\",\n \"filterHasLearnings\",\n \"filterNoLearnings\",\n \"filterHasFiles\",\n \"filterNoFiles\",\n \"filterHasDocs\",\n \"filterNoDocs\",\n \"filterHasTests\",\n \"filterNoTests\",\n \"filterHasComments\",\n \"filterNoComments\",\n \"filterHasDeps\",\n \"filterNoDeps\",\n \"filterHasBody\",\n \"filterEmptyBody\",\n \"filterHasLinkedCommand\",\n \"filterNoLinkedCommand\",\n \"ids\",\n \"limit\",\n \"offset\",\n \"dryRun\",\n \"rollback\",\n \"checkpoint\",\n]);\n\n/**\n * Implements extract update many mutation option source for the public runtime surface of this module.\n */\nexport function extractUpdateManyMutationOptionSource(commandOptions: Record<string, unknown>): Record<string, unknown> {\n const mutationOptions: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(commandOptions)) {\n if (UPDATE_MANY_CONTROL_OPTION_KEYS.has(key)) {\n continue;\n }\n mutationOptions[key] = value;\n }\n return mutationOptions;\n}\n\nfunction readListOptionString(options: Record<string, unknown>, target: string): string | undefined {\n const contract = resolveCommanderContract(LIST_COMMANDER_STRING_OPTION_CONTRACTS, target);\n const stringValue = readFirstStringFromCommanderOptions(options, contract);\n if (stringValue !== undefined) {\n return stringValue;\n }\n for (const key of contract.keys) {\n const value = options[key];\n /* c8 ignore start -- unreachable: readFirstStringFromCommanderOptions already returns above for any string value under contract.keys, so a string here cannot occur */\n if (target === \"ids\" && typeof value === \"string\") {\n return value;\n }\n /* c8 ignore stop */\n if (typeof value === \"number\" && Number.isFinite(value)) {\n return String(value);\n }\n }\n return undefined;\n}\n\n/**\n * Implements normalize list options for the public runtime surface of this module.\n */\nexport function normalizeListOptions(options: Record<string, unknown>): ListOptions {\n const normalized: Record<string, unknown> = {\n status: readListOptionString(options, \"status\"),\n type: readListOptionString(options, \"type\"),\n tag: readListOptionString(options, \"tag\"),\n priority: readListOptionString(options, \"priority\"),\n deadlineBefore: readListOptionString(options, \"deadlineBefore\"),\n deadlineAfter: readListOptionString(options, \"deadlineAfter\"),\n updatedAfter: readListOptionString(options, \"updatedAfter\"),\n updatedBefore: readListOptionString(options, \"updatedBefore\"),\n createdAfter: readListOptionString(options, \"createdAfter\"),\n createdBefore: readListOptionString(options, \"createdBefore\"),\n ids: readListOptionString(options, \"ids\"),\n assignee: readListOptionString(options, \"assignee\"),\n assigneeFilter: readListOptionString(options, \"assigneeFilter\"),\n parent: readListOptionString(options, \"parent\"),\n sprint: readListOptionString(options, \"sprint\"),\n release: readListOptionString(options, \"release\"),\n limit: readListOptionString(options, \"limit\"),\n offset: readListOptionString(options, \"offset\"),\n // Commander stores --no-truncate as truncate=false; --all is the positive alias.\n noTruncate: options.truncate === false || options.all === true ? true : undefined,\n includeBody: options.includeBody === true ? true : undefined,\n compact: options.compact === true ? true : undefined,\n brief: options.brief === true ? true : undefined,\n full: options.full === true ? true : undefined,\n fields: readListOptionString(options, \"fields\"),\n sort: readListOptionString(options, \"sort\"),\n order: readListOptionString(options, \"order\"),\n tree: options.tree === true ? true : undefined,\n treeDepth: readListOptionString(options, \"treeDepth\"),\n filterAcMissing: options.filterAcMissing === true ? true : undefined,\n filterEstimatesMissing:\n options.filterEstimatesMissing === true || options.filterEstimateMissing === true ? true : undefined,\n filterResolutionMissing: options.filterResolutionMissing === true ? true : undefined,\n filterMetadataMissing: options.filterMetadataMissing === true ? true : undefined,\n // Governance-missing selection filters (GH-236).\n filterReviewerMissing: options.filterReviewerMissing === true ? true : undefined,\n filterRiskMissing: options.filterRiskMissing === true ? true : undefined,\n filterConfidenceMissing: options.filterConfidenceMissing === true ? true : undefined,\n filterSprintMissing: options.filterSprintMissing === true ? true : undefined,\n filterReleaseMissing: options.filterReleaseMissing === true ? true : undefined,\n // Content-field presence/absence selection filters (GH-242). Presence flags\n // are plain booleans; absence uses commander negation (`--no-notes` stores\n // notes=false) except --empty-body which is its own dest.\n hasNotes: options.hasNotes === true ? true : undefined,\n hasLearnings: options.hasLearnings === true ? true : undefined,\n hasFiles: options.hasFiles === true ? true : undefined,\n hasDocs: options.hasDocs === true ? true : undefined,\n hasTests: options.hasTests === true ? true : undefined,\n hasComments: options.hasComments === true ? true : undefined,\n hasDeps: options.hasDeps === true ? true : undefined,\n hasBody: options.hasBody === true ? true : undefined,\n hasLinkedCommand: options.hasLinkedCommand === true ? true : undefined,\n noNotes: options.notes === false ? true : undefined,\n noLearnings: options.learnings === false ? true : undefined,\n noFiles: options.files === false ? true : undefined,\n noDocs: options.docs === false ? true : undefined,\n noTests: options.tests === false ? true : undefined,\n noComments: options.comments === false ? true : undefined,\n noDeps: options.deps === false ? true : undefined,\n emptyBody: options.emptyBody === true ? true : undefined,\n noLinkedCommand: options.linkedCommand === false ? true : undefined,\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as ListOptions;\n}\n\n/**\n * Implements normalize aggregate options for the public runtime surface of this module.\n */\nexport function normalizeAggregateOptions(options: Record<string, unknown>): AggregateOptions {\n return {\n groupBy: typeof options.groupBy === \"string\" ? options.groupBy : undefined,\n count: options.count === true ? true : undefined,\n completion: options.completion === true ? true : undefined,\n sum: typeof options.sum === \"string\" ? options.sum : undefined,\n avg: typeof options.avg === \"string\" ? options.avg : undefined,\n includeUnparented: options.includeUnparented === true || options.include_unparented === true,\n status: typeof options.status === \"string\" ? options.status : undefined,\n type: readListOptionString(options, \"type\"),\n tag: readListOptionString(options, \"tag\"),\n priority: readListOptionString(options, \"priority\"),\n deadlineBefore: readListOptionString(options, \"deadlineBefore\"),\n deadlineAfter: readListOptionString(options, \"deadlineAfter\"),\n assignee: readListOptionString(options, \"assignee\"),\n assigneeFilter: readListOptionString(options, \"assigneeFilter\"),\n parent: readListOptionString(options, \"parent\"),\n sprint: readListOptionString(options, \"sprint\"),\n release: readListOptionString(options, \"release\"),\n };\n}\n\ntype ListCommandResult = Awaited<ReturnType<typeof runList>>;\n\n/**\n * Implements print list json stream for the public runtime surface of this module.\n */\nexport function printListJsonStream(commandName: string, result: ListCommandResult, globalOptions: GlobalOptions): void {\n setActiveCommandResult(result);\n if (globalOptions.quiet) {\n return;\n }\n const warnings = Array.isArray(result.warnings) ? result.warnings : [];\n const metaPayload: Record<string, unknown> = {\n type: \"meta\",\n command: commandName,\n count: result.count,\n now: result.now,\n filters: result.filters,\n };\n if (warnings.length > 0) {\n metaPayload.warnings = warnings;\n }\n if (!writeStdout(`${JSON.stringify(metaPayload)}\\n`)) {\n return;\n }\n for (const item of result.items) {\n if (!writeStdout(`${JSON.stringify({ type: \"item\", command: commandName, item })}\\n`)) {\n return;\n }\n }\n writeStdout(`${JSON.stringify({ type: \"end\", command: commandName, count: result.count })}\\n`);\n}\n\ntype ActivityCommandResult = Awaited<ReturnType<typeof runActivity>>;\n\n/**\n * Implements print activity json stream for the public runtime surface of this module.\n */\nexport function printActivityJsonStream(\n result: ActivityCommandResult,\n options: {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n },\n globalOptions: GlobalOptions,\n): void {\n setActiveCommandResult(result);\n if (globalOptions.quiet) {\n return;\n }\n const metaPayload = {\n type: \"meta\",\n command: \"activity\",\n count: result.count,\n filters: {\n id: options.id ?? null,\n op: options.op ?? null,\n author: options.author ?? null,\n from: options.from ?? null,\n to: options.to ?? null,\n limit: options.limit ?? null,\n },\n };\n if (!writeStdout(`${JSON.stringify(metaPayload)}\\n`)) {\n return;\n }\n const entries = result.compact && result.compact_activity ? result.compact_activity : result.activity;\n for (const entry of entries) {\n if (!writeStdout(`${JSON.stringify({ type: \"entry\", command: \"activity\", entry })}\\n`)) {\n return;\n }\n }\n writeStdout(`${JSON.stringify({ type: \"end\", command: \"activity\", count: result.count })}\\n`);\n}\n\n/**\n * Implements normalize search options for the public runtime surface of this module.\n */\nexport function normalizeSearchOptions(options: Record<string, unknown>): Record<string, unknown> {\n const readSearchString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n resolveCommanderContract(SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, target),\n );\n const readSearchStringOrNumber = (target: string): string | number | undefined => {\n const candidate = readFirstValueFromCommanderOptions(\n options,\n resolveCommanderContract(SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, target),\n );\n if (typeof candidate === \"string\") {\n return candidate;\n }\n if (typeof candidate === \"number\" && Number.isFinite(candidate)) {\n return candidate;\n }\n return undefined;\n };\n const fields = readSearchString(\"fields\");\n const compactRequested = options.compact === true;\n const fullRequested = options.full === true;\n const defaultCompact = !compactRequested && !fullRequested && fields === undefined;\n const mode = options.semantic === true ? \"semantic\"\n : options.hybrid === true ? \"hybrid\"\n : readSearchString(\"mode\");\n const normalized: Record<string, unknown> = {\n mode,\n matchMode: readSearchString(\"matchMode\"),\n minScore: readSearchStringOrNumber(\"minScore\"),\n count: options.count === true ? true : undefined,\n semanticWeight: readSearchStringOrNumber(\"semanticWeight\"),\n includeLinked: options.includeLinked === true ? true : undefined,\n titleExact: options.titleExact === true ? true : undefined,\n phraseExact: options.phraseExact === true ? true : undefined,\n highlight: options.highlight === true ? true : undefined,\n status: readSearchString(\"status\"),\n type: readSearchString(\"type\"),\n tag: readSearchString(\"tag\"),\n priority: readSearchString(\"priority\"),\n deadlineBefore: readSearchString(\"deadlineBefore\"),\n deadlineAfter: readSearchString(\"deadlineAfter\"),\n updatedAfter: readSearchString(\"updatedAfter\"),\n updatedBefore: readSearchString(\"updatedBefore\"),\n createdAfter: readSearchString(\"createdAfter\"),\n createdBefore: readSearchString(\"createdBefore\"),\n assignee: readSearchString(\"assignee\"),\n sprint: readSearchString(\"sprint\"),\n release: readSearchString(\"release\"),\n parent: readSearchString(\"parent\"),\n limit: readSearchString(\"limit\"),\n fields,\n compact: compactRequested || defaultCompact ? true : undefined,\n full: fullRequested ? true : undefined,\n // Governance-missing selection filters (GH-236).\n filterReviewerMissing: options.filterReviewerMissing === true ? true : undefined,\n filterRiskMissing: options.filterRiskMissing === true ? true : undefined,\n filterConfidenceMissing: options.filterConfidenceMissing === true ? true : undefined,\n filterSprintMissing: options.filterSprintMissing === true ? true : undefined,\n filterReleaseMissing: options.filterReleaseMissing === true ? true : undefined,\n // Content-field presence/absence selection filters (GH-242). Mirror\n // normalizeListOptions: presence flags are booleans; absence uses commander\n // negation (notes=false) except --empty-body which is its own dest.\n hasNotes: options.hasNotes === true ? true : undefined,\n hasLearnings: options.hasLearnings === true ? true : undefined,\n hasFiles: options.hasFiles === true ? true : undefined,\n hasDocs: options.hasDocs === true ? true : undefined,\n hasTests: options.hasTests === true ? true : undefined,\n hasComments: options.hasComments === true ? true : undefined,\n hasDeps: options.hasDeps === true ? true : undefined,\n hasBody: options.hasBody === true ? true : undefined,\n hasLinkedCommand: options.hasLinkedCommand === true ? true : undefined,\n noNotes: options.notes === false ? true : undefined,\n noLearnings: options.learnings === false ? true : undefined,\n noFiles: options.files === false ? true : undefined,\n noDocs: options.docs === false ? true : undefined,\n noTests: options.tests === false ? true : undefined,\n noComments: options.comments === false ? true : undefined,\n noDeps: options.deps === false ? true : undefined,\n emptyBody: options.emptyBody === true ? true : undefined,\n noLinkedCommand: options.linkedCommand === false ? true : undefined,\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized;\n}\n\n/**\n * Implements normalize search keywords input for the public runtime surface of this module.\n */\nexport function normalizeSearchKeywordsInput(keywords: string[]): string {\n const query = keywords\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0)\n .join(\" \");\n if (query.length === 0) {\n throw new PmCliError(\"Search query must not be empty\", EXIT_CODE.USAGE);\n }\n return query;\n}\n\n\n/**\n * Implements normalize activity options for the public runtime surface of this module.\n */\nexport function normalizeActivityOptions(options: Record<string, unknown>): {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n compact?: boolean;\n} {\n const readActivityString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n resolveCommanderContract(ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, target),\n );\n return {\n id: readActivityString(\"id\"),\n op: readActivityString(\"op\"),\n author: readActivityString(\"author\"),\n from: readActivityString(\"from\"),\n to: readActivityString(\"to\"),\n limit: readActivityString(\"limit\"),\n compact: options.full === true ? false : options.compact === false ? false : true,\n };\n}\n\n/**\n * Implements resolve activity stream mode for the public runtime surface of this module.\n */\nexport function resolveActivityStreamMode(raw: unknown): boolean {\n if (raw === true) {\n return true;\n }\n if (raw === false || raw === undefined || raw === null) {\n return false;\n }\n if (typeof raw === \"string\") {\n const normalized = raw.trim().toLowerCase();\n if (\n normalized.length === 0 ||\n normalized === \"rows\" ||\n normalized === \"ndjson\" ||\n normalized === \"jsonl\" ||\n normalized === \"true\" ||\n normalized === \"1\" ||\n normalized === \"yes\" ||\n normalized === \"on\"\n ) {\n return true;\n }\n if (normalized === \"false\" || normalized === \"off\" || normalized === \"none\" || normalized === \"0\") {\n return false;\n }\n }\n throw new PmCliError(\"Activity --stream accepts rows|ndjson|jsonl (or no value)\", EXIT_CODE.USAGE);\n}\n\n/**\n * Implements normalize context options for the public runtime surface of this module.\n */\nexport function normalizeContextOptions(options: Record<string, unknown>): ContextOptions {\n const readContextString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n resolveCommanderContract(CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, target),\n );\n const sectionRaw = options.section;\n const section: string[] | undefined = Array.isArray(sectionRaw)\n ? (sectionRaw as string[]).filter((v) => typeof v === \"string\" && v.trim().length > 0)\n : typeof sectionRaw === \"string\" && sectionRaw.trim().length > 0\n ? [sectionRaw]\n : undefined;\n const normalized: Record<string, unknown> = {\n date: readContextString(\"date\"),\n from: readContextString(\"from\"),\n to: readContextString(\"to\"),\n past: options.past === true ? true : undefined,\n type: readContextString(\"type\"),\n tag: readContextString(\"tag\"),\n priority: readContextString(\"priority\"),\n assignee: readContextString(\"assignee\"),\n assigneeFilter: readContextString(\"assigneeFilter\"),\n sprint: readContextString(\"sprint\"),\n release: readContextString(\"release\"),\n parent: readContextString(\"parent\"),\n limit: readContextString(\"limit\"),\n format: readContextString(\"format\"),\n depth: readContextString(\"depth\"),\n fields: readContextString(\"fields\"),\n section: section && section.length > 0 ? section : undefined,\n activityLimit: readContextString(\"activityLimit\"),\n staleThreshold: readContextString(\"staleThreshold\"),\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as ContextOptions;\n}\n\n/**\n * Normalizes raw commander options for `pm next` into a typed {@link NextOptions}\n * payload, resolving snake_case flag aliases (e.g. `--assignee_filter`,\n * `--blocked_limit`, `--ready_only`) to their canonical camelCase keys and folding\n * the boolean `--ready-only` switch. Unknown keys are passed through untouched so\n * downstream filtering still sees them.\n */\nexport function normalizeNextOptions(options: Record<string, unknown>): NextOptions {\n const readNextString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n resolveCommanderContract(NEXT_COMMANDER_STRING_OPTION_CONTRACTS, target),\n );\n const normalized: Record<string, unknown> = {\n type: readNextString(\"type\"),\n tag: readNextString(\"tag\"),\n priority: readNextString(\"priority\"),\n assignee: readNextString(\"assignee\"),\n assigneeFilter: readNextString(\"assigneeFilter\"),\n sprint: readNextString(\"sprint\"),\n release: readNextString(\"release\"),\n parent: readNextString(\"parent\"),\n limit: readNextString(\"limit\"),\n blockedLimit: readNextString(\"blockedLimit\"),\n readyOnly: options.readyOnly === true || options.ready_only === true ? true : undefined,\n format: readNextString(\"format\"),\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as NextOptions;\n}\n\nfunction collectMutationItemIds(result: unknown): string[] {\n if (!result || typeof result !== \"object\") {\n return [];\n }\n const record = result as Record<string, unknown>;\n const ids = new Set<string>();\n const pushId = (value: unknown): void => {\n if (typeof value !== \"string\") {\n return;\n }\n const normalized = value.trim();\n if (normalized.length === 0) {\n return;\n }\n ids.add(normalized);\n };\n\n pushId(record.id);\n\n const item = record.item;\n if (item && typeof item === \"object\") {\n pushId((item as { id?: unknown }).id);\n }\n\n const explicitIds = record.ids;\n if (Array.isArray(explicitIds)) {\n for (const candidate of explicitIds) {\n pushId(candidate);\n }\n }\n\n const items = record.items;\n if (Array.isArray(items)) {\n for (const candidate of items) {\n if (!candidate || typeof candidate !== \"object\") {\n continue;\n }\n pushId((candidate as { id?: unknown }).id);\n }\n }\n\n return [...ids].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Implements invalidate search caches for mutation for the public runtime surface of this module.\n */\nexport async function invalidateSearchCachesForMutation(globalOptions: GlobalOptions, result?: unknown): Promise<void> {\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n const refreshResult = await refreshSearchArtifactsForMutation(pmRoot, collectMutationItemIds(result), {\n background: !shouldRunSearchRefreshInForeground(),\n });\n if (globalOptions.profile && refreshResult.warnings.length > 0) {\n printError(`profile:search_refresh_warnings=${formatHookWarnings(refreshResult.warnings)}`);\n }\n}\n\nexport const _testOnly = {\n collectMutationItemIds,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAM,0BAA0B,uBAAO,0BAA0B;AAWjE,SAAS,qBAAqB,SAAgB;AAC5C,SAAO,OAAO,YAAY,YAAY,YAAY,OAAO,UAAkC,CAAA;AAC7F;AAIA,SAAS,yBACP,WACA,QAAc;AAEd,QAAM,WAAW,UAAU,KAAK,CAAC,UAAU,MAAM,WAAW,MAAM;AAElE,SAAO,YAAY,EAAE,QAAQ,MAAM,CAAC,MAAM,EAAC;AAE7C;AAKM,SAAU,yBAAyB,SAAkB,eAA4B;AACpF,UAAuC,uBAAuB,IAAI,EAAE,GAAG,cAAa;AACvF;AAKM,SAAU,2BAA2B,SAAgB;AACzD,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AAW,aAAa,OAAO;AAC7B,UAAI,CAAC,aAAa,OAAO,cAAc,UAAU;AAC/C;MACF;AACA,aAAQ,UAA+B,EAAE;IAC3C;EACF;AAEA,SAAO,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,MAAM,UAAU,KAAK,cAAc,KAAK,CAAC;AACjE;AAKA,eAAsB,kCAAkC,eAA8B,QAAgB;AACpG,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,cAAc,IAAI;AAC9D,QAAM,gBAAgB,MAAM,kCAAkC,QAAQ,uBAAuB,MAAM,GAAG;IACpG,YAAY,CAAC,mCAAkC;GAChD;AACD,MAAI,cAAc,WAAW,cAAc,SAAS,SAAS,GAAG;AAC9D,eAAW,mCAAmC,mBAAmB,cAAc,QAAQ,CAAC,EAAE;EAC5F;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BUILTIN_ITEM_TYPE_VALUES,
|
|
2
3
|
toDefaultFolder
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
BUILTIN_ITEM_TYPE_VALUES
|
|
6
|
-
} from "./chunk-MJTSZKK5.js";
|
|
4
|
+
} from "./chunk-SNUK7H5J.js";
|
|
7
5
|
|
|
8
6
|
// dist/core/schema/item-types-file.js
|
|
9
7
|
!(function() {
|
|
10
8
|
try {
|
|
11
9
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
12
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
10
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "602e57ae-7f46-5ac5-9da2-e0b740201deb");
|
|
13
11
|
} catch (e2) {
|
|
14
12
|
}
|
|
15
13
|
})();
|
|
@@ -186,7 +184,7 @@ function upsertItemType(file, input) {
|
|
|
186
184
|
const existing = existingIndex >= 0 ? definitions[existingIndex] : void 0;
|
|
187
185
|
const mergedAliases = dedupeAliases([...coerceAliasArray(existing?.aliases), ...input.aliases]);
|
|
188
186
|
const next = {
|
|
189
|
-
...existing
|
|
187
|
+
...existing,
|
|
190
188
|
name: input.name
|
|
191
189
|
};
|
|
192
190
|
if (input.folder !== void 0) {
|
|
@@ -262,4 +260,4 @@ export {
|
|
|
262
260
|
buildInvalidTypeHint,
|
|
263
261
|
buildInvalidTypeError
|
|
264
262
|
};
|
|
265
|
-
//# sourceMappingURL=chunk-
|
|
263
|
+
//# sourceMappingURL=chunk-DRPF274X.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../core/schema/item-types-file.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module core/schema/item-types-file\n *\n * Resolves configurable schema, fields, statuses, and workflows for Item Types File.\n */\nimport { BUILTIN_ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport type { ItemTypeDefinition } from \"../../types/index.js\";\nimport { toDefaultFolder } from \"../item/type-registry.js\";\n\nexport type { ItemTypeDefinition } from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-type` command and the create/update\n * invalid-type discoverability hint. The CLI command file (schema.ts) handles\n * IO/governance; everything testable and side-effect-free lives here so it can\n * be coverage-gated to 100%.\n */\n\nconst BUILTIN_NAME_LOOKUP = new Map<string, string>(\n BUILTIN_ITEM_TYPE_VALUES.map((name) => [name.toLowerCase(), name]),\n);\n\n/**\n * The shape persisted at `.agents/pm/schema/types.json`.\n */\nexport interface ItemTypesFile {\n definitions: ItemTypeDefinition[];\n}\n\n/**\n * Documents the normalized add type input payload exchanged by command, SDK, and package integrations.\n */\nexport interface NormalizedAddTypeInput {\n name: string;\n description?: string;\n defaultStatus?: string;\n folder?: string;\n aliases: string[];\n}\n\n/**\n * Documents the raw add type input payload exchanged by command, SDK, and package integrations.\n */\nexport interface RawAddTypeInput {\n name: string | undefined;\n description?: string;\n defaultStatus?: string;\n folder?: string;\n aliases?: string[];\n}\n\n/**\n * Documents the upsert item type result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpsertItemTypeResult {\n file: ItemTypesFile;\n /** The definition as stored after the upsert (existing fields preserved). */\n definition: ItemTypeDefinition;\n /** True when an existing definition with the same (case-insensitive) name was replaced. */\n replaced: boolean;\n /**\n * The canonical name of the replaced definition (only present when `replaced`).\n * Lets the caller detect a silent recase (e.g. \"Spike\" -> \"spike\") and warn.\n */\n previousName?: string;\n}\n\n/**\n * Custom item type names (and aliases) must be a single letter-led identifier\n * token: letters, digits, hyphen, or underscore — no whitespace or other\n * punctuation. This keeps names copy-pasteable as shell arguments and folder\n * slugs deterministic, matching the single-token PascalCase shape of every\n * built-in type. Folder/slug overlap between two distinct valid tokens (e.g.\n * \"Spike\"/\"Spikes\", \"code-review\"/\"code_review\") is rejected separately by\n * assertTypeFolderAvailable.\n */\nconst TYPE_NAME_TOKEN_PATTERN = /^[A-Za-z][A-Za-z0-9_-]*$/;\n\nfunction assertValidTypeToken(value: string, label: string): void {\n if (!TYPE_NAME_TOKEN_PATTERN.test(value)) {\n throw new Error(\n `${label} \"${value}\" is not a valid identifier. Use a single letter-led token of letters, digits, hyphen, or underscore with no spaces or punctuation (e.g. \"Spike\" or \"code-review\").`,\n );\n }\n}\n\n/**\n * Documents the remove item type result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RemoveItemTypeResult {\n file: ItemTypesFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched (case-insensitively) the requested name. */\n definition?: ItemTypeDefinition;\n}\n\n/**\n * Returns the canonical built-in name when `name` collides (case-insensitively)\n * with a reserved built-in item type, otherwise undefined.\n */\nexport function matchBuiltinTypeName(name: string): string | undefined {\n return BUILTIN_NAME_LOOKUP.get(name.trim().toLowerCase());\n}\n\n/**\n * Coerces a persisted `aliases` value into a string array, tolerating malformed\n * data (a non-array, or an array containing non-string entries) without throwing\n * or exploding a stray string into character aliases.\n */\nfunction coerceAliasArray(value: unknown): string[] {\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === \"string\") : [];\n}\n\n/**\n * Escapes a value for safe interpolation inside a double-quoted shell string so\n * suggested copy-pasteable commands stay well-formed for names containing\n * `\"`, `` ` ``, `$`, or `\\`.\n */\nexport function escapeForDoubleQuotes(value: string): string {\n return value.replace(/[\\\\\"`$]/g, (char) => `\\\\${char}`);\n}\n\nfunction dedupeAliases(values: Iterable<string>): string[] {\n const seen = new Map<string, string>();\n for (const value of values) {\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const key = trimmed.toLowerCase();\n if (!seen.has(key)) {\n seen.set(key, trimmed);\n }\n }\n return [...seen.values()].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Validates and normalizes raw add-type CLI input. Throws a plain Error with a\n * stable message when the name is missing/empty or collides with a built-in;\n * the CLI layer maps these to PmCliError exit codes.\n */\nexport function normalizeAddTypeInput(raw: RawAddTypeInput): NormalizedAddTypeInput {\n const name = (raw.name ?? \"\").trim();\n if (name.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n assertValidTypeToken(name, \"Type name\");\n const builtinMatch = matchBuiltinTypeName(name);\n if (builtinMatch) {\n throw new Error(\n `Cannot redefine built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const description = raw.description?.trim();\n const defaultStatus = raw.defaultStatus?.trim();\n const folder = raw.folder?.trim();\n const aliases = dedupeAliases(raw.aliases ?? []);\n for (const alias of aliases) {\n assertValidTypeToken(alias, \"Alias\");\n const aliasBuiltin = matchBuiltinTypeName(alias);\n if (aliasBuiltin) {\n throw new Error(\n `Alias \"${alias}\" collides with built-in item type \"${aliasBuiltin}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n }\n return {\n name,\n description: description && description.length > 0 ? description : undefined,\n defaultStatus: defaultStatus && defaultStatus.length > 0 ? defaultStatus : undefined,\n folder: folder && folder.length > 0 ? folder : undefined,\n aliases,\n };\n}\n\n/**\n * Throws when the requested name or any alias collides (case-insensitively)\n * with the canonical name or an alias of a DIFFERENT existing definition.\n * Such collisions would make `pm create`/`pm update --type` resolve\n * ambiguously (the runtime registry keys a single lowercase alias map), so\n * they are rejected. Tokens belonging to the same-named definition being\n * upserted are ignored, keeping re-runs idempotent.\n */\nexport function assertAliasesAvailable(input: NormalizedAddTypeInput, existing: ItemTypesFile): void {\n const selfLower = input.name.toLowerCase();\n const taken = new Map<string, string>();\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (definitionName.length === 0 || definitionName.toLowerCase() === selfLower) {\n continue;\n }\n taken.set(definitionName.toLowerCase(), definitionName);\n for (const alias of coerceAliasArray(definition.aliases)) {\n if (alias.trim().length > 0) {\n taken.set(alias.trim().toLowerCase(), definitionName);\n }\n }\n }\n const nameOwner = taken.get(selfLower);\n if (nameOwner) {\n throw new Error(`Type name \"${input.name}\" collides with an alias of existing item type \"${nameOwner}\".`);\n }\n for (const alias of input.aliases) {\n const owner = taken.get(alias.toLowerCase());\n if (owner) {\n throw new Error(`Alias \"${alias}\" already maps to existing item type \"${owner}\".`);\n }\n }\n}\n\n/**\n * Resolves the storage folder a definition would use: an explicit non-empty\n * `folder` wins, otherwise the deterministic slug derived from the name (the\n * same derivation the runtime registry applies, single-sourced from\n * type-registry.toDefaultFolder).\n */\nfunction resolveDefinitionFolder(name: string, folder: unknown): string {\n if (typeof folder === \"string\" && folder.trim().length > 0) {\n return folder.trim().toLowerCase();\n }\n return toDefaultFolder(name).toLowerCase();\n}\n\n/**\n * Throws when the requested type's storage folder would collide with a\n * DIFFERENT existing definition's folder. Two distinct type names can slug to\n * one folder (\"Spike\"/\"Spikes\", \"code-review\"/\"code_review\"), which would make\n * their item files share a directory and silently corrupt the taxonomy. The\n * same-named definition being upserted is ignored (folder reuse on re-run is\n * expected). Resolving the collision is a matter of passing a distinct\n * `--folder`, so the error says so.\n *\n * `reservedFolders` carries the folders already owned by built-in and extension\n * types (folder-slug → owner name); a custom type whose slug matches one of\n * those (e.g. \"Tasks\" → \"tasks\", owned by the built-in Task) is just as\n * corrupting as a custom-vs-custom collision, so both are checked.\n */\nexport function assertTypeFolderAvailable(\n input: NormalizedAddTypeInput,\n existing: ItemTypesFile,\n reservedFolders?: ReadonlyMap<string, string>,\n): void {\n const selfLower = input.name.toLowerCase();\n const inputFolder = resolveDefinitionFolder(input.name, input.folder);\n const fail = (ownerName: string): never => {\n throw new Error(\n `Item type \"${input.name}\" would store items in folder \"${inputFolder}\", which already belongs to existing item type \"${ownerName}\". Pass a distinct --folder to keep their storage separate.`,\n );\n };\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (definitionName.length === 0 || definitionName.toLowerCase() === selfLower) {\n continue;\n }\n if (resolveDefinitionFolder(definitionName, definition.folder) === inputFolder) {\n fail(definitionName);\n }\n }\n const reservedOwner = reservedFolders?.get(inputFolder);\n if (reservedOwner !== undefined && reservedOwner.toLowerCase() !== selfLower) {\n fail(reservedOwner);\n }\n}\n\n/**\n * Coerces an arbitrary parsed value from types.json into an ItemTypesFile.\n * Accepts the canonical `{ definitions: [...] }` shape, a bare array of\n * definitions, or a nested `{ item_types: { definitions: [...] } }` form, and\n * tolerates a missing/invalid file by returning an empty definitions list.\n */\nexport function parseItemTypesFile(raw: string | null | undefined): ItemTypesFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { definitions: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/types.json contains invalid JSON.\");\n }\n return { definitions: extractDefinitions(parsed) };\n}\n\nfunction extractDefinitions(parsed: unknown): ItemTypeDefinition[] {\n const candidate = selectDefinitionsArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.name !== \"string\" || record.name.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as ItemTypeDefinition);\n }\n return definitions;\n}\n\nfunction selectDefinitionsArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n if (typeof record.item_types === \"object\" && record.item_types !== null) {\n const nested = record.item_types as Record<string, unknown>;\n if (Array.isArray(nested.definitions)) {\n return nested.definitions;\n }\n }\n return undefined;\n}\n\n/**\n * Idempotent UPSERT of a custom item type into the parsed file. Matching is\n * case-insensitive by name. When a definition already exists, fields supplied\n * in `input` override the previous values; aliases are merged (deduped); other\n * fields not addressed by add-type flags are preserved untouched.\n */\nexport function upsertItemType(file: ItemTypesFile, input: NormalizedAddTypeInput): UpsertItemTypeResult {\n const lowerName = input.name.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) => typeof definition.name === \"string\" && definition.name.trim().toLowerCase() === lowerName,\n );\n const existing = existingIndex >= 0 ? definitions[existingIndex] : undefined;\n\n const mergedAliases = dedupeAliases([...coerceAliasArray(existing?.aliases), ...input.aliases]);\n\n const next: ItemTypeDefinition = {\n ...(existing ?? {}),\n name: input.name,\n };\n if (input.folder !== undefined) {\n next.folder = input.folder;\n }\n if (mergedAliases.length > 0) {\n next.aliases = mergedAliases;\n } else if (next.aliases !== undefined) {\n delete next.aliases;\n }\n applyAttribute(next, \"description\", input.description);\n applyAttribute(next, \"default_status\", input.defaultStatus);\n\n if (existingIndex >= 0) {\n definitions[existingIndex] = next;\n } else {\n definitions.push(next);\n }\n definitions.sort((left, right) => left.name.localeCompare(right.name));\n\n return {\n file: { definitions },\n definition: next,\n replaced: existingIndex >= 0,\n ...(existing && typeof existing.name === \"string\" ? { previousName: existing.name } : {}),\n };\n}\n\n/**\n * Removes a custom item type definition from the parsed file by name\n * (case-insensitive). Throws a plain Error when `name` is empty or collides\n * with a reserved built-in type (built-ins are not stored in the file and must\n * never be deletable). Returns `removed: false` when no matching custom\n * definition exists so the CLI layer can treat the call as an idempotent no-op.\n */\nexport function removeItemType(file: ItemTypesFile, name: string | undefined): RemoveItemTypeResult {\n const trimmed = (name ?? \"\").trim();\n if (trimmed.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n const builtinMatch = matchBuiltinTypeName(trimmed);\n if (builtinMatch) {\n throw new Error(\n `Cannot remove built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const lowerName = trimmed.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) => typeof definition.name === \"string\" && definition.name.trim().toLowerCase() === lowerName,\n );\n if (existingIndex < 0) {\n return { file: { definitions }, removed: false };\n }\n const [definition] = definitions.splice(existingIndex, 1);\n return { file: { definitions }, removed: true, definition };\n}\n\nfunction applyAttribute(definition: ItemTypeDefinition, key: string, value: string | undefined): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value !== undefined) {\n record[key] = value;\n }\n}\n\n/**\n * Serializes the item types file with a trailing newline (matches the rest of\n * the schema scaffold files written by pm).\n */\nexport function serializeItemTypesFile(file: ItemTypesFile): string {\n return `${JSON.stringify({ definitions: file.definitions }, null, 2)}\\n`;\n}\n\n/**\n * Appends a discoverable hint to the \"Invalid type\" error so agents learn that\n * custom types exist and how to register one. Quotes are chosen so the printed\n * line is copy-pasteable as a shell command.\n */\nexport function buildInvalidTypeHint(name: string, typesFilePath?: string): string {\n const safeName = name.trim().length > 0 ? name.trim() : name;\n const target = typesFilePath?.trim() || \".agents/pm/schema/types.json\";\n return `To register a custom type, run: pm schema add-type \"${escapeForDoubleQuotes(safeName)}\" (writes ${target}).`;\n}\n\n/**\n * Builds the full invalid-type error message used by create/update: the\n * existing \"Invalid type ... Allowed: ...\" line plus the discoverable hint.\n * `typesFilePath` should be the resolved schema/types.json path for the active\n * tracker (see {@link resolveItemTypesFilePath}) so the hint reflects a custom\n * `--pm-path` instead of the hardcoded `.agents/pm` default.\n */\nexport function buildInvalidTypeError(name: string, allowedTypes: readonly string[], typesFilePath?: string): string {\n return `Invalid type value \"${name}\". Allowed: ${allowedTypes.join(\", \")}. ${buildInvalidTypeHint(name, typesFilePath)}`;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/**\n * @module core/schema/item-types-file\n *\n * Resolves configurable schema, fields, statuses, and workflows for Item Types File.\n */\nimport { BUILTIN_ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport type { ItemTypeDefinition } from \"../../types/index.js\";\nimport { toDefaultFolder } from \"../item/type-registry.js\";\n\nexport type { ItemTypeDefinition } from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-type` command and the create/update\n * invalid-type discoverability hint. The CLI command file (schema.ts) handles\n * IO/governance; everything testable and side-effect-free lives here so it can\n * be coverage-gated to 100%.\n */\n\nconst BUILTIN_NAME_LOOKUP = new Map<string, string>(\n BUILTIN_ITEM_TYPE_VALUES.map((name) => [name.toLowerCase(), name]),\n);\n\n/**\n * The shape persisted at `.agents/pm/schema/types.json`.\n */\nexport interface ItemTypesFile {\n definitions: ItemTypeDefinition[];\n}\n\n/**\n * Documents the normalized add type input payload exchanged by command, SDK, and package integrations.\n */\nexport interface NormalizedAddTypeInput {\n name: string;\n description?: string;\n defaultStatus?: string;\n folder?: string;\n aliases: string[];\n}\n\n/**\n * Documents the raw add type input payload exchanged by command, SDK, and package integrations.\n */\nexport interface RawAddTypeInput {\n name: string | undefined;\n description?: string;\n defaultStatus?: string;\n folder?: string;\n aliases?: string[];\n}\n\n/**\n * Documents the upsert item type result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpsertItemTypeResult {\n file: ItemTypesFile;\n /** The definition as stored after the upsert (existing fields preserved). */\n definition: ItemTypeDefinition;\n /** True when an existing definition with the same (case-insensitive) name was replaced. */\n replaced: boolean;\n /**\n * The canonical name of the replaced definition (only present when `replaced`).\n * Lets the caller detect a silent recase (e.g. \"Spike\" -> \"spike\") and warn.\n */\n previousName?: string;\n}\n\n/**\n * Custom item type names (and aliases) must be a single letter-led identifier\n * token: letters, digits, hyphen, or underscore — no whitespace or other\n * punctuation. This keeps names copy-pasteable as shell arguments and folder\n * slugs deterministic, matching the single-token PascalCase shape of every\n * built-in type. Folder/slug overlap between two distinct valid tokens (e.g.\n * \"Spike\"/\"Spikes\", \"code-review\"/\"code_review\") is rejected separately by\n * assertTypeFolderAvailable.\n */\nconst TYPE_NAME_TOKEN_PATTERN = /^[A-Za-z][A-Za-z0-9_-]*$/;\n\nfunction assertValidTypeToken(value: string, label: string): void {\n if (!TYPE_NAME_TOKEN_PATTERN.test(value)) {\n throw new Error(\n `${label} \"${value}\" is not a valid identifier. Use a single letter-led token of letters, digits, hyphen, or underscore with no spaces or punctuation (e.g. \"Spike\" or \"code-review\").`,\n );\n }\n}\n\n/**\n * Documents the remove item type result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RemoveItemTypeResult {\n file: ItemTypesFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched (case-insensitively) the requested name. */\n definition?: ItemTypeDefinition;\n}\n\n/**\n * Returns the canonical built-in name when `name` collides (case-insensitively)\n * with a reserved built-in item type, otherwise undefined.\n */\nexport function matchBuiltinTypeName(name: string): string | undefined {\n return BUILTIN_NAME_LOOKUP.get(name.trim().toLowerCase());\n}\n\n/**\n * Coerces a persisted `aliases` value into a string array, tolerating malformed\n * data (a non-array, or an array containing non-string entries) without throwing\n * or exploding a stray string into character aliases.\n */\nfunction coerceAliasArray(value: unknown): string[] {\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === \"string\") : [];\n}\n\n/**\n * Escapes a value for safe interpolation inside a double-quoted shell string so\n * suggested copy-pasteable commands stay well-formed for names containing\n * `\"`, `` ` ``, `$`, or `\\`.\n */\nexport function escapeForDoubleQuotes(value: string): string {\n return value.replace(/[\\\\\"`$]/g, (char) => `\\\\${char}`);\n}\n\nfunction dedupeAliases(values: Iterable<string>): string[] {\n const seen = new Map<string, string>();\n for (const value of values) {\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const key = trimmed.toLowerCase();\n if (!seen.has(key)) {\n seen.set(key, trimmed);\n }\n }\n return [...seen.values()].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Validates and normalizes raw add-type CLI input. Throws a plain Error with a\n * stable message when the name is missing/empty or collides with a built-in;\n * the CLI layer maps these to PmCliError exit codes.\n */\nexport function normalizeAddTypeInput(raw: RawAddTypeInput): NormalizedAddTypeInput {\n const name = (raw.name ?? \"\").trim();\n if (name.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n assertValidTypeToken(name, \"Type name\");\n const builtinMatch = matchBuiltinTypeName(name);\n if (builtinMatch) {\n throw new Error(\n `Cannot redefine built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const description = raw.description?.trim();\n const defaultStatus = raw.defaultStatus?.trim();\n const folder = raw.folder?.trim();\n const aliases = dedupeAliases(raw.aliases ?? []);\n for (const alias of aliases) {\n assertValidTypeToken(alias, \"Alias\");\n const aliasBuiltin = matchBuiltinTypeName(alias);\n if (aliasBuiltin) {\n throw new Error(\n `Alias \"${alias}\" collides with built-in item type \"${aliasBuiltin}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n }\n return {\n name,\n description: description && description.length > 0 ? description : undefined,\n defaultStatus: defaultStatus && defaultStatus.length > 0 ? defaultStatus : undefined,\n folder: folder && folder.length > 0 ? folder : undefined,\n aliases,\n };\n}\n\n/**\n * Throws when the requested name or any alias collides (case-insensitively)\n * with the canonical name or an alias of a DIFFERENT existing definition.\n * Such collisions would make `pm create`/`pm update --type` resolve\n * ambiguously (the runtime registry keys a single lowercase alias map), so\n * they are rejected. Tokens belonging to the same-named definition being\n * upserted are ignored, keeping re-runs idempotent.\n */\nexport function assertAliasesAvailable(input: NormalizedAddTypeInput, existing: ItemTypesFile): void {\n const selfLower = input.name.toLowerCase();\n const taken = new Map<string, string>();\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (definitionName.length === 0 || definitionName.toLowerCase() === selfLower) {\n continue;\n }\n taken.set(definitionName.toLowerCase(), definitionName);\n for (const alias of coerceAliasArray(definition.aliases)) {\n if (alias.trim().length > 0) {\n taken.set(alias.trim().toLowerCase(), definitionName);\n }\n }\n }\n const nameOwner = taken.get(selfLower);\n if (nameOwner) {\n throw new Error(`Type name \"${input.name}\" collides with an alias of existing item type \"${nameOwner}\".`);\n }\n for (const alias of input.aliases) {\n const owner = taken.get(alias.toLowerCase());\n if (owner) {\n throw new Error(`Alias \"${alias}\" already maps to existing item type \"${owner}\".`);\n }\n }\n}\n\n/**\n * Resolves the storage folder a definition would use: an explicit non-empty\n * `folder` wins, otherwise the deterministic slug derived from the name (the\n * same derivation the runtime registry applies, single-sourced from\n * type-registry.toDefaultFolder).\n */\nfunction resolveDefinitionFolder(name: string, folder: unknown): string {\n if (typeof folder === \"string\" && folder.trim().length > 0) {\n return folder.trim().toLowerCase();\n }\n return toDefaultFolder(name).toLowerCase();\n}\n\n/**\n * Throws when the requested type's storage folder would collide with a\n * DIFFERENT existing definition's folder. Two distinct type names can slug to\n * one folder (\"Spike\"/\"Spikes\", \"code-review\"/\"code_review\"), which would make\n * their item files share a directory and silently corrupt the taxonomy. The\n * same-named definition being upserted is ignored (folder reuse on re-run is\n * expected). Resolving the collision is a matter of passing a distinct\n * `--folder`, so the error says so.\n *\n * `reservedFolders` carries the folders already owned by built-in and extension\n * types (folder-slug → owner name); a custom type whose slug matches one of\n * those (e.g. \"Tasks\" → \"tasks\", owned by the built-in Task) is just as\n * corrupting as a custom-vs-custom collision, so both are checked.\n */\nexport function assertTypeFolderAvailable(\n input: NormalizedAddTypeInput,\n existing: ItemTypesFile,\n reservedFolders?: ReadonlyMap<string, string>,\n): void {\n const selfLower = input.name.toLowerCase();\n const inputFolder = resolveDefinitionFolder(input.name, input.folder);\n const fail = (ownerName: string): never => {\n throw new Error(\n `Item type \"${input.name}\" would store items in folder \"${inputFolder}\", which already belongs to existing item type \"${ownerName}\". Pass a distinct --folder to keep their storage separate.`,\n );\n };\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (definitionName.length === 0 || definitionName.toLowerCase() === selfLower) {\n continue;\n }\n if (resolveDefinitionFolder(definitionName, definition.folder) === inputFolder) {\n fail(definitionName);\n }\n }\n const reservedOwner = reservedFolders?.get(inputFolder);\n if (reservedOwner !== undefined && reservedOwner.toLowerCase() !== selfLower) {\n fail(reservedOwner);\n }\n}\n\n/**\n * Coerces an arbitrary parsed value from types.json into an ItemTypesFile.\n * Accepts the canonical `{ definitions: [...] }` shape, a bare array of\n * definitions, or a nested `{ item_types: { definitions: [...] } }` form, and\n * tolerates a missing/invalid file by returning an empty definitions list.\n */\nexport function parseItemTypesFile(raw: string | null | undefined): ItemTypesFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { definitions: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/types.json contains invalid JSON.\");\n }\n return { definitions: extractDefinitions(parsed) };\n}\n\nfunction extractDefinitions(parsed: unknown): ItemTypeDefinition[] {\n const candidate = selectDefinitionsArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.name !== \"string\" || record.name.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as ItemTypeDefinition);\n }\n return definitions;\n}\n\nfunction selectDefinitionsArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n if (typeof record.item_types === \"object\" && record.item_types !== null) {\n const nested = record.item_types as Record<string, unknown>;\n if (Array.isArray(nested.definitions)) {\n return nested.definitions;\n }\n }\n return undefined;\n}\n\n/**\n * Idempotent UPSERT of a custom item type into the parsed file. Matching is\n * case-insensitive by name. When a definition already exists, fields supplied\n * in `input` override the previous values; aliases are merged (deduped); other\n * fields not addressed by add-type flags are preserved untouched.\n */\nexport function upsertItemType(file: ItemTypesFile, input: NormalizedAddTypeInput): UpsertItemTypeResult {\n const lowerName = input.name.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) => typeof definition.name === \"string\" && definition.name.trim().toLowerCase() === lowerName,\n );\n const existing = existingIndex >= 0 ? definitions[existingIndex] : undefined;\n\n const mergedAliases = dedupeAliases([...coerceAliasArray(existing?.aliases), ...input.aliases]);\n\n const next: ItemTypeDefinition = {\n ...existing,\n name: input.name,\n };\n if (input.folder !== undefined) {\n next.folder = input.folder;\n }\n if (mergedAliases.length > 0) {\n next.aliases = mergedAliases;\n } else if (next.aliases !== undefined) {\n delete next.aliases;\n }\n applyAttribute(next, \"description\", input.description);\n applyAttribute(next, \"default_status\", input.defaultStatus);\n\n if (existingIndex >= 0) {\n definitions[existingIndex] = next;\n } else {\n definitions.push(next);\n }\n definitions.sort((left, right) => left.name.localeCompare(right.name));\n\n return {\n file: { definitions },\n definition: next,\n replaced: existingIndex >= 0,\n ...(existing && typeof existing.name === \"string\" ? { previousName: existing.name } : {}),\n };\n}\n\n/**\n * Removes a custom item type definition from the parsed file by name\n * (case-insensitive). Throws a plain Error when `name` is empty or collides\n * with a reserved built-in type (built-ins are not stored in the file and must\n * never be deletable). Returns `removed: false` when no matching custom\n * definition exists so the CLI layer can treat the call as an idempotent no-op.\n */\nexport function removeItemType(file: ItemTypesFile, name: string | undefined): RemoveItemTypeResult {\n const trimmed = (name ?? \"\").trim();\n if (trimmed.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n const builtinMatch = matchBuiltinTypeName(trimmed);\n if (builtinMatch) {\n throw new Error(\n `Cannot remove built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const lowerName = trimmed.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) => typeof definition.name === \"string\" && definition.name.trim().toLowerCase() === lowerName,\n );\n if (existingIndex < 0) {\n return { file: { definitions }, removed: false };\n }\n const [definition] = definitions.splice(existingIndex, 1);\n return { file: { definitions }, removed: true, definition };\n}\n\nfunction applyAttribute(definition: ItemTypeDefinition, key: string, value: string | undefined): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value !== undefined) {\n record[key] = value;\n }\n}\n\n/**\n * Serializes the item types file with a trailing newline (matches the rest of\n * the schema scaffold files written by pm).\n */\nexport function serializeItemTypesFile(file: ItemTypesFile): string {\n return `${JSON.stringify({ definitions: file.definitions }, null, 2)}\\n`;\n}\n\n/**\n * Appends a discoverable hint to the \"Invalid type\" error so agents learn that\n * custom types exist and how to register one. Quotes are chosen so the printed\n * line is copy-pasteable as a shell command.\n */\nexport function buildInvalidTypeHint(name: string, typesFilePath?: string): string {\n const safeName = name.trim().length > 0 ? name.trim() : name;\n const target = typesFilePath?.trim() || \".agents/pm/schema/types.json\";\n return `To register a custom type, run: pm schema add-type \"${escapeForDoubleQuotes(safeName)}\" (writes ${target}).`;\n}\n\n/**\n * Builds the full invalid-type error message used by create/update: the\n * existing \"Invalid type ... Allowed: ...\" line plus the discoverable hint.\n * `typesFilePath` should be the resolved schema/types.json path for the active\n * tracker (see {@link resolveItemTypesFilePath}) so the hint reflects a custom\n * `--pm-path` instead of the hardcoded `.agents/pm` default.\n */\nexport function buildInvalidTypeError(name: string, allowedTypes: readonly string[], typesFilePath?: string): string {\n return `Invalid type value \"${name}\". Allowed: ${allowedTypes.join(\", \")}. ${buildInvalidTypeHint(name, typesFilePath)}`;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAkBA,IAAM,sBAAsB,IAAI,IAC9B,yBAAyB,IAAI,CAAC,SAAS,CAAC,KAAK,YAAW,GAAI,IAAI,CAAC,CAAC;AAyDpE,IAAM,0BAA0B;AAEhC,SAAS,qBAAqB,OAAe,OAAa;AACxD,MAAI,CAAC,wBAAwB,KAAK,KAAK,GAAG;AACxC,UAAM,IAAI,MACR,GAAG,KAAK,KAAK,KAAK,qKAAqK;EAE3L;AACF;AAiBM,SAAU,qBAAqB,MAAY;AAC/C,SAAO,oBAAoB,IAAI,KAAK,KAAI,EAAG,YAAW,CAAE;AAC1D;AAOA,SAAS,iBAAiB,OAAc;AACtC,SAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,OAAO,CAAC,UAA2B,OAAO,UAAU,QAAQ,IAAI,CAAA;AACtG;AAOM,SAAU,sBAAsB,OAAa;AACjD,SAAO,MAAM,QAAQ,YAAY,CAAC,SAAS,KAAK,IAAI,EAAE;AACxD;AAEA,SAAS,cAAc,QAAwB;AAC7C,QAAM,OAAO,oBAAI,IAAG;AACpB,aAAW,SAAS,QAAQ;AAC1B,UAAM,UAAU,MAAM,KAAI;AAC1B,QAAI,QAAQ,WAAW,GAAG;AACxB;IACF;AACA,UAAM,MAAM,QAAQ,YAAW;AAC/B,QAAI,CAAC,KAAK,IAAI,GAAG,GAAG;AAClB,WAAK,IAAI,KAAK,OAAO;IACvB;EACF;AACA,SAAO,CAAC,GAAG,K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AAW,SAAS,YAAYA,YAAW,KAAK,KAAI,EAAG,YAAW,MAAO,SAAS;AAE3G,MAAI,gBAAgB,GAAG;AACrB,WAAO,EAAE,MAAM,EAAE,YAAW,GAAI,SAAS,MAAK;EAChD;AACA,QAAM,CAAC,UAAU,IAAI,YAAY,OAAO,eAAe,CAAC;AACxD,SAAO,EAAE,MAAM,EAAE,YAAW,GAAI,SAAS,MAAM,WAAU;AAC3D;AAEA,SAAS,eAAe,YAAgC,KAAa,OAAyB;AAC5F,QAAM,SAAS;AACf,MAAI,UAAU,QAAW;AACvB,WAAO,GAAG,IAAI;EAChB;AACF;AAMM,SAAU,uBAAuB,MAAmB;AACxD,SAAO,GAAG,KAAK,UAAU,EAAE,aAAa,KAAK,YAAW,GAAI,MAAM,CAAC,CAAC;;AACtE;AAOM,SAAU,qBAAqB,MAAc,eAAsB;AACvE,QAAM,WAAW,KAAK,KAAI,EAAG,SAAS,IAAI,KAAK,KAAI,IAAK;AACxD,QAAM,SAAS,eAAe,KAAI,KAAM;AACxC,SAAO,uDAAuD,sBAAsB,QAAQ,CAAC,aAAa,MAAM;AAClH;AASM,SAAU,sBAAsB,MAAc,cAAiC,eAAsB;AACzG,SAAO,uBAAuB,IAAI,eAAe,aAAa,KAAK,IAAI,CAAC,KAAK,qBAAqB,MAAM,aAAa,CAAC;AACxH;",
|
|
6
6
|
"names": ["definition"]
|
|
7
7
|
}
|
|
@@ -13,27 +13,24 @@ import {
|
|
|
13
13
|
parseLinkedTestMinLines,
|
|
14
14
|
parseLinkedTestRegexList,
|
|
15
15
|
parseLinkedTestStringList
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JIP67N2K.js";
|
|
17
17
|
import {
|
|
18
18
|
createStdinTokenResolver,
|
|
19
19
|
parseCsvKv,
|
|
20
20
|
parseOptionalNumber
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BN3CWK6G.js";
|
|
22
22
|
import {
|
|
23
23
|
runInit
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-53ARXF2O.js";
|
|
25
25
|
import {
|
|
26
26
|
locateItem,
|
|
27
27
|
mutateItem,
|
|
28
28
|
readLocatedItem
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import {
|
|
31
|
-
resolveItemTypeRegistry
|
|
32
|
-
} from "./chunk-YJ3SUEPD.js";
|
|
29
|
+
} from "./chunk-LBH7UYKY.js";
|
|
33
30
|
import {
|
|
34
31
|
compareTimestampStrings,
|
|
35
32
|
nowIso
|
|
36
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-MLHX6DN5.js";
|
|
37
34
|
import {
|
|
38
35
|
EXIT_CODE,
|
|
39
36
|
ITEM_FILE_EXTENSIONS,
|
|
@@ -44,9 +41,10 @@ import {
|
|
|
44
41
|
pathExists,
|
|
45
42
|
readSettings,
|
|
46
43
|
resolveGlobalPmRoot,
|
|
44
|
+
resolveItemTypeRegistry,
|
|
47
45
|
resolvePmRoot,
|
|
48
46
|
stableValueEquals
|
|
49
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-SNUK7H5J.js";
|
|
50
48
|
|
|
51
49
|
// dist/cli/commands/test.js
|
|
52
50
|
import { spawn } from "node:child_process";
|
|
@@ -410,7 +408,7 @@ function firstPositionalToken(tokens) {
|
|
|
410
408
|
!(function() {
|
|
411
409
|
try {
|
|
412
410
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
413
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
411
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "588f0e3a-3f1c-56d9-8908-c8003ae549cd");
|
|
414
412
|
} catch (e2) {
|
|
415
413
|
}
|
|
416
414
|
})();
|
|
@@ -1250,7 +1248,7 @@ function applySharedHostSafeDefaults(env) {
|
|
|
1250
1248
|
}
|
|
1251
1249
|
}
|
|
1252
1250
|
function resolveEffectiveLinkedTestDirectives(runtimeDirectives, linkedTest) {
|
|
1253
|
-
const envSet = { ...runtimeDirectives.env_set, ...linkedTest.env_set
|
|
1251
|
+
const envSet = { ...runtimeDirectives.env_set, ...linkedTest.env_set };
|
|
1254
1252
|
const envClear = [.../* @__PURE__ */ new Set([...runtimeDirectives.env_clear, ...linkedTest.env_clear ?? []])];
|
|
1255
1253
|
const sharedHostSafe = linkedTest.shared_host_safe ?? runtimeDirectives.shared_host_safe;
|
|
1256
1254
|
return {
|
|
@@ -1732,6 +1730,7 @@ async function runTest(id, options, global2) {
|
|
|
1732
1730
|
const shouldMutate = adds.length > 0 || removes.length > 0;
|
|
1733
1731
|
let tests = [];
|
|
1734
1732
|
let itemId;
|
|
1733
|
+
let changed = false;
|
|
1735
1734
|
if (shouldMutate) {
|
|
1736
1735
|
const author = resolveAuthor(options.author, settings.author_default);
|
|
1737
1736
|
const result = await mutateItem({
|
|
@@ -1742,7 +1741,9 @@ async function runTest(id, options, global2) {
|
|
|
1742
1741
|
author,
|
|
1743
1742
|
message: options.message,
|
|
1744
1743
|
force: options.force,
|
|
1744
|
+
skipNoop: true,
|
|
1745
1745
|
mutate(document) {
|
|
1746
|
+
const previous = document.metadata.tests ?? [];
|
|
1746
1747
|
const next = [...document.metadata.tests ?? []];
|
|
1747
1748
|
for (const add of adds) {
|
|
1748
1749
|
const exists = next.some((entry) => entry.command === add.command && entry.path === add.path && entry.scope === add.scope && entry.pm_context_mode === add.pm_context_mode);
|
|
@@ -1759,11 +1760,12 @@ async function runTest(id, options, global2) {
|
|
|
1759
1760
|
}
|
|
1760
1761
|
}
|
|
1761
1762
|
document.metadata.tests = next;
|
|
1762
|
-
return { changedFields: ["tests"] };
|
|
1763
|
+
return { changedFields: stableValueEquals(previous, next) ? [] : ["tests"] };
|
|
1763
1764
|
}
|
|
1764
1765
|
});
|
|
1765
1766
|
tests = result.item.tests ?? [];
|
|
1766
1767
|
itemId = result.item.id;
|
|
1768
|
+
changed = result.changedFields.length > 0;
|
|
1767
1769
|
} else {
|
|
1768
1770
|
const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
|
|
1769
1771
|
if (!located) {
|
|
@@ -1868,7 +1870,7 @@ async function runTest(id, options, global2) {
|
|
|
1868
1870
|
} : void 0,
|
|
1869
1871
|
fail_on_skipped_triggered: failOnSkippedTriggered ? true : void 0,
|
|
1870
1872
|
warnings: warnings.length > 0 ? warnings : void 0,
|
|
1871
|
-
changed
|
|
1873
|
+
changed,
|
|
1872
1874
|
count: tests.length
|
|
1873
1875
|
};
|
|
1874
1876
|
}
|
|
@@ -1910,4 +1912,4 @@ export {
|
|
|
1910
1912
|
runTest,
|
|
1911
1913
|
_testOnlyTestCommand
|
|
1912
1914
|
};
|
|
1913
|
-
//# sourceMappingURL=chunk-
|
|
1915
|
+
//# sourceMappingURL=chunk-DU66JUGT.js.map
|