@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/commands/linked-artifacts.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module cli/commands/linked-artifacts\n *\n * Implements the pm linked artifacts command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport fg from \"fast-glob\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport {\n assertNoUnknownCsvKeys,\n createStdinTokenResolver,\n looksLikeGenericKeyValueEntry,\n parseCsvKv,\n} from \"../../core/item/parse.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { isRemoteLinkedArtifactReference } from \"../../core/validate/linked-artifact-reference.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { listAllFrontMatter, locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { SCOPE_VALUES } from \"../../types/index.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { LinkScope } from \"../../types/index.js\";\n\n/**\n * Restricts linked artifact values accepted by command, SDK, and storage contracts.\n */\nexport type LinkedArtifact = {\n path: string;\n scope: LinkScope;\n note?: string;\n};\n\n/** Allowed CSV/markdown keys for each structured linked-artifact option (GH-258). */\nexport const LINKED_ARTIFACT_ADD_KEYS = [\"path\", \"scope\", \"note\"] as const;\nexport const LINKED_ARTIFACT_ADD_GLOB_KEYS = [\"pattern\", \"glob\", \"path\", \"scope\", \"note\"] as const;\nexport const LINKED_ARTIFACT_REMOVE_KEYS = [\"path\"] as const;\nexport const LINKED_ARTIFACT_MIGRATE_KEYS = [\"from\", \"to\"] as const;\n/**\n * Keys that are valid on --add but meaningless on --remove (GH-277). Rejected\n * with audit-trail guidance (--message) rather than the generic unknown-key\n * error so agents are not left believing a removal note was recorded.\n */\nconst LINKED_ARTIFACT_REMOVE_UNSUPPORTED_KEYS: ReadonlySet<string> = new Set([\"note\", \"scope\"]);\n\n/**\n * Documents the linked artifact command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedArtifactCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /**\n * GH-170 (pm-pfnx): standalone note applied to every link added by --add /\n * --add-glob in the same invocation. A per-entry embedded note (the\n * `path=...,note=...` pair syntax) takes precedence over this flag.\n * Requires at least one --add/--add-glob; rejected otherwise.\n */\n note?: string;\n list?: boolean;\n appendStable?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the path migration payload exchanged by command, SDK, and package integrations.\n */\nexport interface PathMigration {\n from: string;\n to: string;\n}\n\n/**\n * Documents the add glob entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface AddGlobEntry {\n pattern: string;\n scope: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the linked path validation payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedPathValidation {\n checked: number;\n existing_files: string[];\n missing_paths: string[];\n non_file_paths: string[];\n /**\n * Remote references (https:// URLs and other `scheme://` paths) recorded as\n * links — most often a PR/issue/design-doc URL added via `pm docs --add`.\n * These are not local files, so they bypass the existence probe and are\n * reported here rather than counted as missing.\n */\n remote_references: string[];\n}\n\n/**\n * Documents the linked path audit entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedPathAuditEntry {\n path: string;\n linked_by_count: number;\n linked_item_ids: string[];\n}\n\n/**\n * Documents the linked artifact result payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedArtifactResult {\n id: string;\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n artifacts: LinkedArtifact[];\n}\n\n/**\n * Configuration that adapts the shared linked-artifact command core to a\n * specific resource kind (files or docs) while preserving every behavioral\n * detail of the original twin implementations.\n */\nexport interface LinkedArtifactKindConfig {\n /** Metadata key under which the artifacts are stored (e.g. \"files\" | \"docs\"). */\n metadataKey: \"files\" | \"docs\";\n /** Mutation op recorded in history (e.g. \"files_add\" | \"docs_add\"). */\n op: \"files_add\" | \"docs_add\";\n /** Noun used in the \"bare <noun> path\" --add usage error (e.g. \"file\" | \"doc\"). */\n bareNoun: \"file\" | \"doc\";\n /**\n * Whether this kind honors the append-stable option. files supports it;\n * docs always sorts and must never expose append-stable behavior.\n */\n supportsAppendStable: boolean;\n}\n\n/**\n * Implements ensure scope for the public runtime surface of this module.\n */\nexport function ensureScope(raw: string | undefined): LinkScope {\n const value = (raw ?? \"project\") as LinkScope;\n if (!SCOPE_VALUES.includes(value)) {\n throw new PmCliError(\n `Invalid scope \"${raw}\". Valid scopes: ${SCOPE_VALUES.join(\", \")} (default: project).`,\n EXIT_CODE.USAGE,\n );\n }\n return value;\n}\n\n/**\n * Implements looks like structured path entry for the public runtime surface of this module.\n */\nexport function looksLikeStructuredPathEntry(raw: string): boolean {\n if (raw.startsWith(\"```\") || raw.includes(\"\\n\")) {\n return true;\n }\n if (/^(?:[-*+]\\s+)?(?:path|scope|note)\\s*[:=]/i.test(raw)) {\n return true;\n }\n // A first-key typo (e.g. `lable=main,path=…`) must still be parsed so the\n // unknown key is rejected rather than swallowed as a bare path (GH-258).\n return looksLikeGenericKeyValueEntry(raw);\n}\n\nfunction expandBareCommaSeparatedAddEntries(raw: string[]): string[] {\n return raw.flatMap((entry) => {\n const trimmed = entry.trim();\n if (trimmed.length === 0 || looksLikeStructuredPathEntry(trimmed) || !trimmed.includes(\",\")) {\n return [entry];\n }\n return splitCommaList(trimmed);\n });\n}\n\n/**\n * Implements parse add entries for the public runtime surface of this module.\n */\nexport function parseAddEntries(raw: string[] | undefined, bareNoun: \"file\" | \"doc\"): LinkedArtifact[] {\n if (!raw) return [];\n return expandBareCommaSeparatedAddEntries(raw).map((entry) => {\n const trimmed = entry.trim();\n const kv = looksLikeStructuredPathEntry(trimmed) ? parseCsvKv(entry, \"--add\") : { path: trimmed };\n assertNoUnknownCsvKeys(kv, \"--add\", LINKED_ARTIFACT_ADD_KEYS);\n if (!kv.path) {\n throw new PmCliError(`--add requires path=<value> or a bare ${bareNoun} path`, EXIT_CODE.USAGE);\n }\n return {\n path: kv.path,\n scope: ensureScope(kv.scope),\n note: kv.note?.trim() || undefined,\n };\n });\n}\n\n/**\n * Implements parse add glob entries for the public runtime surface of this module.\n */\nexport function parseAddGlobEntries(raw: string[] | undefined): AddGlobEntry[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n throw new PmCliError(\"--add-glob requires a glob pattern value\", EXIT_CODE.USAGE);\n }\n if (trimmed.includes(\"=\") || /^(?:[-*+]\\s+)?(?:pattern|glob|path)\\s*[:=]/i.test(trimmed) || trimmed.startsWith(\"```\")) {\n const kv = parseCsvKv(trimmed, \"--add-glob\");\n assertNoUnknownCsvKeys(kv, \"--add-glob\", LINKED_ARTIFACT_ADD_GLOB_KEYS);\n const pattern = kv.pattern?.trim() || kv.glob?.trim() || kv.path?.trim();\n if (!pattern) {\n throw new PmCliError(\"--add-glob key/value form requires pattern=<glob>\", EXIT_CODE.USAGE);\n }\n return {\n pattern,\n scope: ensureScope(kv.scope),\n note: kv.note?.trim() || undefined,\n };\n }\n return {\n pattern: trimmed,\n scope: \"project\",\n };\n });\n}\n\n/**\n * Implements parse remove entries for the public runtime surface of this module.\n */\nexport function parseRemoveEntries(raw: string[] | undefined): string[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n throw new PmCliError(\"--remove requires a path value\", EXIT_CODE.USAGE);\n }\n if (trimmed.includes(\"=\") || /^(?:[-*+]\\s+)?path\\s*[:=]/i.test(trimmed) || trimmed.startsWith(\"```\")) {\n const kv = parseCsvKv(trimmed, \"--remove\");\n // GH-277: --remove identifies an existing link by path only; it does not\n // attach per-link metadata. Reject the --add-only keys with guidance toward\n // the audit-trail path (--message) rather than the generic \"unrecognized\n // key\" error, which left agents believing they had recorded a removal note.\n const unsupportedRemoveKeys = Object.keys(kv).filter((key) =>\n LINKED_ARTIFACT_REMOVE_UNSUPPORTED_KEYS.has(key.toLowerCase()),\n );\n if (unsupportedRemoveKeys.length > 0) {\n throw new PmCliError(\n `--remove identifies a linked artifact by path only and does not accept ${unsupportedRemoveKeys\n .map((key) => `\"${key}\"`)\n .join(\", \")}. Pass just the path (path=<value>, path:<value>, or a bare path); record removal context with --message \"<why removed>\".`,\n EXIT_CODE.USAGE,\n );\n }\n assertNoUnknownCsvKeys(kv, \"--remove\", LINKED_ARTIFACT_REMOVE_KEYS);\n if (!kv.path) {\n throw new PmCliError(\"--remove key/value form requires path=<value>\", EXIT_CODE.USAGE);\n }\n return kv.path;\n }\n return trimmed;\n });\n}\n\n/**\n * Implements parse migrate entries for the public runtime surface of this module.\n */\nexport function parseMigrateEntries(raw: string[] | undefined): PathMigration[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const kv = parseCsvKv(entry, \"--migrate\");\n assertNoUnknownCsvKeys(kv, \"--migrate\", LINKED_ARTIFACT_MIGRATE_KEYS);\n const from = kv.from?.trim();\n const to = kv.to?.trim();\n if (!from || !to) {\n throw new PmCliError(\"--migrate requires from=<value> and to=<value>\", EXIT_CODE.USAGE);\n }\n return { from, to };\n });\n}\n\n/**\n * Implements apply path migrations for the public runtime surface of this module.\n */\nexport function applyPathMigrations(artifactPath: string, migrations: PathMigration[]): string {\n let next = artifactPath;\n for (const migration of migrations) {\n if (next.startsWith(migration.from)) {\n next = `${migration.to}${next.slice(migration.from.length)}`;\n }\n }\n return next;\n}\n\n/**\n * Implements normalize linked path for the public runtime surface of this module.\n */\nexport function normalizeLinkedPath(value: string): string {\n return value.split(path.sep).join(\"/\");\n}\n\n/**\n * Implements expand add glob entries for the public runtime surface of this module.\n */\nexport async function expandAddGlobEntries(entries: AddGlobEntry[]): Promise<LinkedArtifact[]> {\n const expanded: LinkedArtifact[] = [];\n for (const entry of entries) {\n const absolutePattern = path.isAbsolute(entry.pattern);\n const matches = await fg(entry.pattern, {\n cwd: process.cwd(),\n absolute: absolutePattern,\n onlyFiles: true,\n dot: true,\n unique: true,\n followSymbolicLinks: true,\n });\n const sortedMatches = [...new Set(matches.map((match) => normalizeLinkedPath(path.normalize(match))))].sort((left, right) =>\n left.localeCompare(right),\n );\n for (const matchedPath of sortedMatches) {\n expanded.push({\n path: matchedPath,\n scope: entry.scope,\n note: entry.note,\n });\n }\n }\n return expanded;\n}\n\n/**\n * GH-170 (pm-pfnx): apply a standalone --note to the links added in this\n * invocation. Semantics (documented on pm-pfnx): the note is attached to EVERY\n * entry added via --add/--add-glob so a single flag annotates the whole batch\n * predictably; a per-entry embedded `note=` wins over the standalone flag; and\n * --note without any --add/--add-glob flag is a usage error because there is\n * nothing to annotate (it never retro-edits existing links). `hasAddFlags`\n * reflects flag presence, not match count, so a glob that legitimately matches\n * zero files is not an error.\n */\nexport function applyStandaloneNote(\n adds: LinkedArtifact[],\n note: string | undefined,\n hasAddFlags: boolean,\n): LinkedArtifact[] {\n if (note === undefined) {\n return adds;\n }\n if (!hasAddFlags) {\n throw new PmCliError(\n \"--note requires --add or --add-glob in the same invocation (the note annotates the links being added)\",\n EXIT_CODE.USAGE,\n );\n }\n const trimmed = note.trim();\n if (trimmed.length === 0) {\n return adds;\n }\n return adds.map((entry) => (entry.note === undefined ? { ...entry, note: trimmed } : entry));\n}\n\n/**\n * Implements artifact key for the public runtime surface of this module.\n */\nexport function artifactKey(value: Pick<LinkedArtifact, \"path\" | \"scope\">): string {\n return `${value.path}::${value.scope}`;\n}\n\n/**\n * Implements sort linked artifacts for the public runtime surface of this module.\n */\nexport function sortLinkedArtifacts(artifacts: LinkedArtifact[]): LinkedArtifact[] {\n return [...artifacts].sort((left, right) => {\n const byPath = left.path.localeCompare(right.path);\n if (byPath !== 0) return byPath;\n return left.scope.localeCompare(right.scope);\n });\n}\n\n/**\n * Implements dedupe linked artifacts for the public runtime surface of this module.\n */\nexport function dedupeLinkedArtifacts(artifacts: LinkedArtifact[]): LinkedArtifact[] {\n return [...new Map(artifacts.map((entry) => [artifactKey(entry), entry])).values()].map((entry) => ({\n ...entry,\n note: entry.note?.trim() || undefined,\n }));\n}\n\n/**\n * Implements validate linked paths for the public runtime surface of this module.\n */\nexport async function validateLinkedPaths(paths: string[]): Promise<LinkedPathValidation> {\n const uniquePaths = [...new Set(paths)].sort((left, right) => left.localeCompare(right));\n const existingFiles: string[] = [];\n const missingPaths: string[] = [];\n const nonFilePaths: string[] = [];\n const remoteReferences: string[] = [];\n for (const relativePath of uniquePaths) {\n // Remote references (https:// PR/issue/design-doc URLs) are not local\n // files; report them separately (trimmed, to match buildFilesCheck's\n // output shape) instead of probing a meaningless path.\n if (isRemoteLinkedArtifactReference(relativePath)) {\n remoteReferences.push(relativePath.trim());\n continue;\n }\n const resolvedPath = path.isAbsolute(relativePath) ? relativePath : path.resolve(process.cwd(), relativePath);\n try {\n const stats = await fs.stat(resolvedPath);\n if (stats.isFile()) {\n existingFiles.push(relativePath);\n } else {\n nonFilePaths.push(relativePath);\n }\n } catch (error: unknown) {\n if (typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === \"ENOENT\") {\n missingPaths.push(relativePath);\n continue;\n }\n nonFilePaths.push(relativePath);\n }\n }\n return {\n checked: uniquePaths.length,\n existing_files: existingFiles,\n missing_paths: missingPaths,\n non_file_paths: nonFilePaths,\n remote_references: remoteReferences,\n };\n}\n\n/**\n * Implements build linked path audit for the public runtime surface of this module.\n */\nexport function buildLinkedPathAudit(\n paths: string[],\n allItems: Array<{ id: string; artifacts?: LinkedArtifact[] }>,\n): LinkedPathAuditEntry[] {\n const index = new Map<string, Set<string>>();\n for (const item of allItems) {\n for (const linkedArtifact of item.artifacts ?? []) {\n const seen = index.get(linkedArtifact.path) ?? new Set<string>();\n seen.add(item.id);\n index.set(linkedArtifact.path, seen);\n }\n }\n return [...new Set(paths)]\n .sort((left, right) => left.localeCompare(right))\n .map((linkedPath) => {\n const linkedIds = [...(index.get(linkedPath) ?? new Set<string>())].sort((left, right) => left.localeCompare(right));\n return {\n path: linkedPath,\n linked_by_count: linkedIds.length,\n linked_item_ids: linkedIds,\n };\n });\n}\n\n/**\n * Shared linked-artifact list/mutate command core used by runFiles and runDocs.\n * The kind config selects metadata key, op, bare-path noun, and whether\n * append-stable ordering is honored, preserving each twin's exact semantics.\n */\nexport async function runLinkedArtifacts(\n id: string,\n options: LinkedArtifactCommandOptions,\n global: GlobalOptions,\n config: LinkedArtifactKindConfig,\n): Promise<LinkedArtifactResult> {\n const { metadataKey } = config;\n const stdinResolver = createStdinTokenResolver();\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const resolvedAdds = await stdinResolver.resolveList(options.add, \"--add\");\n const resolvedAddGlobs = await stdinResolver.resolveList(options.addGlob, \"--add-glob\");\n const resolvedRemoves = await stdinResolver.resolveList(options.remove, \"--remove\");\n const resolvedMigrations = await stdinResolver.resolveList(options.migrate, \"--migrate\");\n const parsedAdds = parseAddEntries(resolvedAdds, config.bareNoun);\n const addGlobs = parseAddGlobEntries(resolvedAddGlobs);\n const expandedGlobAdds = await expandAddGlobEntries(addGlobs);\n const adds = applyStandaloneNote(\n [...parsedAdds, ...expandedGlobAdds],\n options.note,\n parsedAdds.length > 0 || addGlobs.length > 0,\n );\n const removes = parseRemoveEntries(resolvedRemoves);\n const migrations = parseMigrateEntries(resolvedMigrations);\n const shouldMutate = adds.length > 0 || removes.length > 0 || migrations.length > 0;\n\n const collectAuditItems = async (): Promise<Array<{ id: string; artifacts?: LinkedArtifact[] }>> =>\n (await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema)).map((entry) => ({\n id: entry.id,\n artifacts: (entry as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined,\n }));\n\n if (!shouldMutate) {\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const artifacts = ((loaded.document.metadata as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined) ?? [];\n return {\n id: located.id,\n artifacts,\n changed: false,\n count: artifacts.length,\n validation: options.validatePaths ? await validateLinkedPaths(artifacts.map((entry) => entry.path)) : undefined,\n audit: options.audit ? buildLinkedPathAudit(artifacts.map((entry) => entry.path), await collectAuditItems()) : undefined,\n };\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: config.op,\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n const metadata = document.metadata as Record<string, unknown>;\n const next = [...((metadata[metadataKey] as LinkedArtifact[] | undefined) ?? [])];\n let migrationCount = 0;\n if (migrations.length > 0) {\n for (let index = 0; index < next.length; index += 1) {\n const migratedPath = applyPathMigrations(next[index].path, migrations);\n if (migratedPath !== next[index].path) {\n next[index] = { ...next[index], path: migratedPath };\n migrationCount += 1;\n }\n }\n }\n const migratedAdds = adds.map((entry) => {\n const migratedPath = applyPathMigrations(entry.path, migrations);\n if (migratedPath !== entry.path) {\n migrationCount += 1;\n }\n return {\n ...entry,\n path: migratedPath,\n };\n });\n const migratedRemoves = removes.map((entry) => applyPathMigrations(entry, migrations));\n for (const add of migratedAdds) {\n const exists = next.some((entry) => entry.path === add.path && entry.scope === add.scope);\n if (!exists) {\n next.push(add);\n }\n }\n if (migratedRemoves.length > 0) {\n for (let i = next.length - 1; i >= 0; i -= 1) {\n if (migratedRemoves.includes(next[i].path)) {\n next.splice(i, 1);\n }\n }\n }\n const deduped = dedupeLinkedArtifacts(next);\n const normalized = config.supportsAppendStable && options.appendStable ? deduped : sortLinkedArtifacts(deduped);\n if (normalized.length > 0) {\n metadata[metadataKey] = normalized;\n } else {\n delete metadata[metadataKey];\n }\n return { changedFields: [metadataKey], warnings: migrationCount > 0 ? [`path_migrations_applied:${migrationCount}`] : [] };\n },\n });\n\n const artifacts = ((result.item as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined) ?? [];\n const migrationWarning = result.warnings.find((warning) => warning.startsWith(\"path_migrations_applied:\"));\n const migrationCount = migrationWarning ? Number(migrationWarning.slice(\"path_migrations_applied:\".length)) : 0;\n const allItems = options.audit ? await collectAuditItems() : [];\n return {\n id: result.item.id,\n artifacts,\n changed: true,\n count: artifacts.length,\n migrations_applied: migrationCount > 0 ? migrationCount : undefined,\n validation: options.validatePaths ? await validateLinkedPaths(artifacts.map((entry) => entry.path)) : undefined,\n audit: options.audit ? buildLinkedPathAudit(artifacts.map((entry) => entry.path), allItems) : undefined,\n };\n}\n\n/**\n * Re-key the generic `artifacts` field to the resource-specific name (files/docs)\n * while preserving the original key order and presence so kind-specific result\n * shapes (and their deterministic JSON key ordering) stay byte-identical.\n */\nexport function renameArtifactsResultKey(result: LinkedArtifactResult, key: \"files\" | \"docs\"): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [field, value] of Object.entries(result)) {\n out[field === \"artifacts\" ? key : field] = value;\n }\n return out;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,QAAQ;;;;;;;;AAgCR,IAAM,2BAA2B,CAAC,QAAQ,SAAS,MAAM;AACzD,IAAM,gCAAgC,CAAC,WAAW,QAAQ,QAAQ,SAAS,MAAM;AACjF,IAAM,8BAA8B,CAAC,MAAM;AAC3C,IAAM,+BAA+B,CAAC,QAAQ,IAAI;AAMzD,IAAM,0CAA+D,oBAAI,IAAI,CAAC,QAAQ,OAAO,CAAC;AAwGxF,SAAU,YAAY,KAAuB;AACjD,QAAM,QAAS,OAAO;AACtB,MAAI,CAAC,aAAa,SAAS,KAAK,GAAG;AACjC,UAAM,IAAI,WACR,kBAAkB,GAAG,oBAAoB,aAAa,KAAK,IAAI,CAAC,wBAChE,UAAU,KAAK;EAEnB;AACA,SAAO;AACT;AAKM,SAAU,6BAA6B,KAAW;AACtD,MAAI,IAAI,WAAW,KAAK,KAAK,IAAI,SAAS,IAAI,GAAG;AAC/C,WAAO;EACT;AACA,MAAI,4CAA4C,KAAK,GAAG,GAAG;AACzD,WAAO;EACT;AAGA,SAAO,8BAA8B,GAAG;AAC1C;AAEA,SAAS,mCAAmC,KAAa;AACvD,SAAO,IAAI,QAAQ,CAAC,UAAS;AAC3B,UAAM,UAAU,MAAM,KAAI;AAC1B,QAAI,QAAQ,WAAW,KAAK,6BAA6B,OAAO,KAAK,CAAC,QAAQ,SAAS,GAAG,GAAG;AAC3F,aAAO,CAAC,KAAK;IACf;AACA,WAAO,eAAe,OAAO;EAC/B,CAAC;AACH;AAKM,SAAU,gBAAgB,KAA2B,UAAwB;AACjF,MA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,eAAc,EAAE,IAAI,CAAA,EAAE;IAC1H;GACD;AAED,QAAM,YAAc,OAAO,KAAiC,WAAW,KAAsC,CAAA;AAC7G,QAAM,mBAAmB,OAAO,SAAS,KAAK,CAAC,YAAY,QAAQ,WAAW,0BAA0B,CAAC;AACzG,QAAM,iBAAiB,mBAAmB,OAAO,iBAAiB,MAAM,2BAA2B,MAAM,CAAC,IAAI;AAC9G,QAAM,WAAW,QAAQ,QAAQ,MAAM,kBAAiB,IAAK,CAAA;AAC7D,SAAO;IACL,IAAI,OAAO,KAAK;IAChB;IACA,SAAS;IACT,OAAO,UAAU;IACjB,oBAAoB,iBAAiB,IAAI,iBAAiB;IAC1D,YAAY,QAAQ,gBAAgB,MAAM,oBAAoB,UAAU,IAAI,CAAC,UAAU,MAAM,IAAI,CAAC,IAAI;IACtG,OAAO,QAAQ,QAAQ,qBAAqB,UAAU,IAAI,CAAC,UAAU,MAAM,IAAI,GAAG,QAAQ,IAAI;;AAElG;AAOM,SAAU,yBAAyB,QAA8B,KAAqB;AAC1F,QAAM,MAA+B,CAAA;AACrC,aAAW,CAAC,OAAO,KAAK,KAAK,OAAO,QAAQ,MAAM,GAAG;AACnD,QAAI,UAAU,cAAc,MAAM,KAAK,IAAI;EAC7C;AACA,SAAO;AACT;",
|
|
6
|
+
"names": ["global", "artifacts", "migrationCount"]
|
|
7
|
+
}
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="97751191-5385-5273-bab1-76cf3bd7e444")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
readHistoryEntries
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VMY7MZEM.js";
|
|
6
6
|
import {
|
|
7
7
|
parseLimit
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JVQ7UOYC.js";
|
|
9
9
|
import {
|
|
10
10
|
enforceHistoryStreamPolicyForItems,
|
|
11
11
|
listAllFrontMatterLight
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
resolveItemTypeRegistry
|
|
15
|
-
} from "./chunk-YDEXO24S.js";
|
|
12
|
+
} from "./chunk-KGQ3W65B.js";
|
|
16
13
|
import {
|
|
17
14
|
compareTimestampStrings,
|
|
18
15
|
nowIso,
|
|
19
16
|
resolveIsoOrRelative
|
|
20
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KRASIL6M.js";
|
|
21
18
|
import {
|
|
22
19
|
EXIT_CODE,
|
|
23
20
|
PmCliError,
|
|
@@ -25,9 +22,10 @@ import {
|
|
|
25
22
|
getSettingsPath,
|
|
26
23
|
pathExists,
|
|
27
24
|
readSettings,
|
|
25
|
+
resolveItemTypeRegistry,
|
|
28
26
|
resolvePmRoot,
|
|
29
27
|
runActiveOnReadHooks
|
|
30
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-CY5IJMUM.js";
|
|
31
29
|
|
|
32
30
|
// dist/cli/commands/activity.js
|
|
33
31
|
import fs from "node:fs/promises";
|
|
@@ -188,6 +186,6 @@ export {
|
|
|
188
186
|
_testOnly,
|
|
189
187
|
runActivity
|
|
190
188
|
};
|
|
191
|
-
//# sourceMappingURL=chunk-
|
|
189
|
+
//# sourceMappingURL=chunk-FBZ5XAAF.js.map
|
|
192
190
|
|
|
193
|
-
//# debugId=
|
|
191
|
+
//# debugId=97751191-5385-5273-bab1-76cf3bd7e444
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/activity.ts"],"sourcesContent":["/**\n * @module cli/commands/activity\n *\n * Implements the pm activity command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { enforceHistoryStreamPolicyForItems } from \"../../core/history/history-stream-policy.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { compareTimestampStrings, nowIso, resolveIsoOrRelative } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { readHistoryEntries } from \"./history.js\";\nimport { parseLimit } from \"../shared-parsers.js\";\nimport type { HistoryEntry } from \"../../types/index.js\";\n\n/**\n * Documents the activity command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivityCommandOptions {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n compact?: boolean;\n}\n\n/**\n * Documents the activity entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivityEntry extends HistoryEntry {\n id: string;\n}\n\n/**\n * Documents the compact activity entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface CompactActivityEntry {\n id: string;\n op: string;\n ts: string;\n author: string;\n msg?: string;\n}\n\n/**\n * Documents the activity result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivityResult {\n activity: ActivityEntry[];\n compact_activity?: CompactActivityEntry[];\n compact: boolean;\n count: number;\n limit: number | null;\n}\n\nfunction parseNonEmptyFilter(raw: string | undefined, flagLabel: string): string | undefined {\n if (raw === undefined) return undefined;\n const normalized = raw.trim();\n if (normalized.length === 0) {\n throw new PmCliError(`${flagLabel} must not be empty`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction parseRangeBound(raw: string | undefined, nowValue: string, fieldLabel: string): string | undefined {\n if (raw === undefined) return undefined;\n const normalized = raw.trim();\n if (normalized.length === 0) {\n throw new PmCliError(\"Activity time bounds must not be empty\", EXIT_CODE.USAGE);\n }\n return resolveIsoOrRelative(normalized, new Date(nowValue), fieldLabel);\n}\n\nfunction includeByTimeWindow(entry: ActivityEntry, from: string | undefined, to: string | undefined): boolean {\n if (entry.ts.length === 0 && (from || to)) {\n return false;\n }\n if (from && compareTimestampStrings(entry.ts, from) < 0) {\n return false;\n }\n if (to && compareTimestampStrings(entry.ts, to) >= 0) {\n return false;\n }\n return true;\n}\n\nfunction limitEntries<T>(values: T[], limit: number | undefined): T[] {\n if (limit === undefined) return values;\n return values.slice(0, limit);\n}\n\nfunction readActivityString(value: unknown, fallback = \"\"): string {\n return typeof value === \"string\" ? value : fallback;\n}\n\nfunction normalizeActivityEntry(id: string, entry: HistoryEntry): ActivityEntry {\n return {\n ...entry,\n id,\n ts: readActivityString(entry.ts),\n author: readActivityString(entry.author, \"unknown\"),\n op: readActivityString(entry.op, \"unknown\"),\n patch: Array.isArray(entry.patch) ? entry.patch : [],\n before_hash: readActivityString(entry.before_hash),\n after_hash: readActivityString(entry.after_hash),\n };\n}\n\nfunction sortActivity(entries: ActivityEntry[]): ActivityEntry[] {\n return [...entries].sort((a, b) => {\n const byTimestamp = b.ts.localeCompare(a.ts);\n if (byTimestamp !== 0) return byTimestamp;\n const byId = a.id.localeCompare(b.id);\n if (byId !== 0) return byId;\n return a.op.localeCompare(b.op);\n });\n}\n\nasync function listHistoryFiles(historyDir: string): Promise<string[]> {\n try {\n return (await fs.readdir(historyDir))\n .filter((entry) => entry.endsWith(\".jsonl\"))\n .sort((a, b) => a.localeCompare(b));\n } catch (error: unknown) {\n // Activity should degrade gracefully when optional history storage is absent.\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n return [];\n }\n throw error;\n }\n}\n\nexport const _testOnly = {\n parseNonEmptyFilter,\n parseRangeBound,\n includeByTimeWindow,\n limitEntries,\n readActivityString,\n normalizeActivityEntry,\n sortActivity,\n listHistoryFiles,\n};\n\n/**\n * Implements run activity for the public runtime surface of this module.\n */\nexport async function runActivity(options: ActivityCommandOptions, global: GlobalOptions): Promise<ActivityResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const nowValue = nowIso();\n const idFilter = parseNonEmptyFilter(options.id, \"Activity --id\");\n const opFilter = parseNonEmptyFilter(options.op, \"Activity --op\");\n const authorFilter = parseNonEmptyFilter(options.author, \"Activity --author\");\n const fromBound = parseRangeBound(options.from, nowValue, \"--from\");\n const toBound = parseRangeBound(options.to, nowValue, \"--to\");\n if (fromBound && toBound && compareTimestampStrings(fromBound, toBound) >= 0) {\n throw new PmCliError(\"Activity --from must be before --to\", EXIT_CODE.USAGE);\n }\n const limit = parseLimit(options.limit);\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n await enforceHistoryStreamPolicyForItems({\n pmRoot,\n settings,\n itemIds: items.map((item) => item.id),\n commandLabel: \"activity\",\n });\n const historyDir = path.join(pmRoot, \"history\");\n await runActiveOnReadHooks({\n path: historyDir,\n scope: \"project\",\n });\n const historyFiles = await listHistoryFiles(historyDir);\n\n const combined: ActivityEntry[] = [];\n for (const file of historyFiles) {\n const id = file.slice(0, -\".jsonl\".length);\n if (idFilter && id !== idFilter) {\n continue;\n }\n const entries = await readHistoryEntries(path.join(historyDir, file), id);\n for (const entry of entries) {\n if (opFilter && entry.op !== opFilter) {\n continue;\n }\n if (authorFilter && entry.author !== authorFilter) {\n continue;\n }\n const candidate = normalizeActivityEntry(id, entry);\n if (!includeByTimeWindow(candidate, fromBound, toBound)) {\n continue;\n }\n combined.push({\n ...candidate,\n });\n }\n }\n\n const activity = limitEntries(sortActivity(combined), limit);\n const compact = options.compact === true;\n const compactActivity = compact\n ? activity.map((entry): CompactActivityEntry => ({\n id: entry.id,\n op: entry.op,\n ts: entry.ts,\n author: entry.author,\n ...(entry.message ? { msg: entry.message } : {}),\n }))\n : undefined;\n return {\n activity: compact ? [] : activity,\n compact_activity: compactActivity,\n compact,\n count: activity.length,\n limit: limit ?? null,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;AA0DjB,SAAS,oBAAoB,KAAyB,WAAiB;AACrE,MAAI,QAAQ;AAAW,WAAO;AAC9B,QAAM,aAAa,IAAI,KAAI;AAC3B,MAAI,WAAW,WAAW,GAAG;AAC3B,UAAM,IAAI,WAAW,GAAG,SAAS,sBAAsB,UAAU,KAAK;EACxE;AACA,SAAO;AACT;AAEA,SAAS,gBAAgB,KAAyB,UAAkB,YAAkB;AACpF,MAAI,QAAQ;AAAW,WAAO;AAC9B,QAAM,aAAa,IAAI,KAAI;AAC3B,MAAI,WAAW,WAAW,GAAG;AAC3B,UAAM,IAAI,WAAW,0CAA0C,UAAU,KAAK;EAChF;AACA,SAAO,qBAAqB,YAAY,IAAI,KAAK,QAAQ,GAAG,UAAU;AACxE;AAEA,SAAS,oBAAoB,OAAsB,MAA0B,IAAsB;AACjG,MAAI,MAAM,GAAG,WAAW,MAAM,QAAQ,KAAK;AACzC,WAAO;EACT;AACA,MAAI,QAAQ,wBAAwB,MAAM,IAAI,IAAI,IAAI,GAAG;AACvD,WAAO;EACT;AACA,MAAI,MAAM,wBAAwB,MAAM,IAAI,EAAE,KAAK,GAAG;AACpD,WAAO;EACT;AACA,SAAO;AACT;AAEA,SAAS,aAAg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,WAAW,cAAc;AACjD;MACF;AACA,YAAM,YAAY,uBAAuB,IAAI,KAAK;AAClD,UAAI,CAAC,oBAAoB,WAAW,WAAW,OAAO,GAAG;AACvD;MACF;AACA,eAAS,KAAK;QACZ,GAAG;OACJ;IACH;EACF;AAEA,QAAM,WAAW,aAAa,aAAa,QAAQ,GAAG,KAAK;AAC3D,QAAM,UAAU,QAAQ,YAAY;AACpC,QAAM,kBAAkB,UACpB,SAAS,IAAI,CAAC,WAAiC;IAC7C,IAAI,MAAM;IACV,IAAI,MAAM;IACV,IAAI,MAAM;IACV,QAAQ,MAAM;IACd,GAAI,MAAM,UAAU,EAAE,KAAK,MAAM,QAAO,IAAK,CAAA;IAC7C,IACF;AACJ,SAAO;IACL,UAAU,UAAU,CAAA,IAAK;IACzB,kBAAkB;IAClB;IACA,OAAO,SAAS;IAChB,OAAO,SAAS;;AAEpB","debugId":"bb235450-d8d2-5a01-9df7-00e5bafc6307"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/activity.ts"],"sourcesContent":["/**\n * @module cli/commands/activity\n *\n * Implements the pm activity command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { enforceHistoryStreamPolicyForItems } from \"../../core/history/history-stream-policy.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { compareTimestampStrings, nowIso, resolveIsoOrRelative } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { readHistoryEntries } from \"./history.js\";\nimport { parseLimit } from \"../shared-parsers.js\";\nimport type { HistoryEntry } from \"../../types/index.js\";\n\n/**\n * Documents the activity command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivityCommandOptions {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n compact?: boolean;\n}\n\n/**\n * Documents the activity entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivityEntry extends HistoryEntry {\n id: string;\n}\n\n/**\n * Documents the compact activity entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface CompactActivityEntry {\n id: string;\n op: string;\n ts: string;\n author: string;\n msg?: string;\n}\n\n/**\n * Documents the activity result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivityResult {\n activity: ActivityEntry[];\n compact_activity?: CompactActivityEntry[];\n compact: boolean;\n count: number;\n limit: number | null;\n}\n\nfunction parseNonEmptyFilter(raw: string | undefined, flagLabel: string): string | undefined {\n if (raw === undefined) return undefined;\n const normalized = raw.trim();\n if (normalized.length === 0) {\n throw new PmCliError(`${flagLabel} must not be empty`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction parseRangeBound(raw: string | undefined, nowValue: string, fieldLabel: string): string | undefined {\n if (raw === undefined) return undefined;\n const normalized = raw.trim();\n if (normalized.length === 0) {\n throw new PmCliError(\"Activity time bounds must not be empty\", EXIT_CODE.USAGE);\n }\n return resolveIsoOrRelative(normalized, new Date(nowValue), fieldLabel);\n}\n\nfunction includeByTimeWindow(entry: ActivityEntry, from: string | undefined, to: string | undefined): boolean {\n if (entry.ts.length === 0 && (from || to)) {\n return false;\n }\n if (from && compareTimestampStrings(entry.ts, from) < 0) {\n return false;\n }\n if (to && compareTimestampStrings(entry.ts, to) >= 0) {\n return false;\n }\n return true;\n}\n\nfunction limitEntries<T>(values: T[], limit: number | undefined): T[] {\n if (limit === undefined) return values;\n return values.slice(0, limit);\n}\n\nfunction readActivityString(value: unknown, fallback = \"\"): string {\n return typeof value === \"string\" ? value : fallback;\n}\n\nfunction normalizeActivityEntry(id: string, entry: HistoryEntry): ActivityEntry {\n return {\n ...entry,\n id,\n ts: readActivityString(entry.ts),\n author: readActivityString(entry.author, \"unknown\"),\n op: readActivityString(entry.op, \"unknown\"),\n patch: Array.isArray(entry.patch) ? entry.patch : [],\n before_hash: readActivityString(entry.before_hash),\n after_hash: readActivityString(entry.after_hash),\n };\n}\n\nfunction sortActivity(entries: ActivityEntry[]): ActivityEntry[] {\n return [...entries].sort((a, b) => {\n const byTimestamp = b.ts.localeCompare(a.ts);\n if (byTimestamp !== 0) return byTimestamp;\n const byId = a.id.localeCompare(b.id);\n if (byId !== 0) return byId;\n return a.op.localeCompare(b.op);\n });\n}\n\nasync function listHistoryFiles(historyDir: string): Promise<string[]> {\n try {\n return (await fs.readdir(historyDir))\n .filter((entry) => entry.endsWith(\".jsonl\"))\n .sort((a, b) => a.localeCompare(b));\n } catch (error: unknown) {\n // Activity should degrade gracefully when optional history storage is absent.\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n return [];\n }\n throw error;\n }\n}\n\nexport const _testOnly = {\n parseNonEmptyFilter,\n parseRangeBound,\n includeByTimeWindow,\n limitEntries,\n readActivityString,\n normalizeActivityEntry,\n sortActivity,\n listHistoryFiles,\n};\n\n/**\n * Implements run activity for the public runtime surface of this module.\n */\nexport async function runActivity(options: ActivityCommandOptions, global: GlobalOptions): Promise<ActivityResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const nowValue = nowIso();\n const idFilter = parseNonEmptyFilter(options.id, \"Activity --id\");\n const opFilter = parseNonEmptyFilter(options.op, \"Activity --op\");\n const authorFilter = parseNonEmptyFilter(options.author, \"Activity --author\");\n const fromBound = parseRangeBound(options.from, nowValue, \"--from\");\n const toBound = parseRangeBound(options.to, nowValue, \"--to\");\n if (fromBound && toBound && compareTimestampStrings(fromBound, toBound) >= 0) {\n throw new PmCliError(\"Activity --from must be before --to\", EXIT_CODE.USAGE);\n }\n const limit = parseLimit(options.limit);\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n await enforceHistoryStreamPolicyForItems({\n pmRoot,\n settings,\n itemIds: items.map((item) => item.id),\n commandLabel: \"activity\",\n });\n const historyDir = path.join(pmRoot, \"history\");\n await runActiveOnReadHooks({\n path: historyDir,\n scope: \"project\",\n });\n const historyFiles = await listHistoryFiles(historyDir);\n\n const combined: ActivityEntry[] = [];\n for (const file of historyFiles) {\n const id = file.slice(0, -\".jsonl\".length);\n if (idFilter && id !== idFilter) {\n continue;\n }\n const entries = await readHistoryEntries(path.join(historyDir, file), id);\n for (const entry of entries) {\n if (opFilter && entry.op !== opFilter) {\n continue;\n }\n if (authorFilter && entry.author !== authorFilter) {\n continue;\n }\n const candidate = normalizeActivityEntry(id, entry);\n if (!includeByTimeWindow(candidate, fromBound, toBound)) {\n continue;\n }\n combined.push({\n ...candidate,\n });\n }\n }\n\n const activity = limitEntries(sortActivity(combined), limit);\n const compact = options.compact === true;\n const compactActivity = compact\n ? activity.map((entry): CompactActivityEntry => ({\n id: entry.id,\n op: entry.op,\n ts: entry.ts,\n author: entry.author,\n ...(entry.message ? { msg: entry.message } : {}),\n }))\n : undefined;\n return {\n activity: compact ? [] : activity,\n compact_activity: compactActivity,\n compact,\n count: activity.length,\n limit: limit ?? null,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;AA0DjB,SAAS,oBAAoB,KAAyB,WAAiB;AACrE,MAAI,QAAQ;AAAW,WAAO;AAC9B,QAAM,aAAa,IAAI,KAAI;AAC3B,MAAI,WAAW,WAAW,GA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
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b4e4ec6f-75b8-5083-b9b2-aab7e7028e85")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
toNonEmptyStringOrUndefined
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CY5IJMUM.js";
|
|
6
6
|
|
|
7
7
|
// dist/core/governance/metadata-coverage.js
|
|
8
8
|
function normalizeStatus(status, registry) {
|
|
@@ -265,6 +265,6 @@ export {
|
|
|
265
265
|
computeMetadataCoverage,
|
|
266
266
|
groupItemsByDimension
|
|
267
267
|
};
|
|
268
|
-
//# sourceMappingURL=chunk-
|
|
268
|
+
//# sourceMappingURL=chunk-FDEVKXC4.js.map
|
|
269
269
|
|
|
270
270
|
//# debugId=b4e4ec6f-75b8-5083-b9b2-aab7e7028e85
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-WW4E2DC3.js";
|
|
4
4
|
import {
|
|
5
5
|
readHistoryEntries
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IBU2LLWM.js";
|
|
7
7
|
import {
|
|
8
8
|
EMPTY_REPLAY_DOCUMENT,
|
|
9
9
|
normalizeReplayPatchOps,
|
|
@@ -11,29 +11,24 @@ import {
|
|
|
11
11
|
replayToCanonicalItemDocument,
|
|
12
12
|
replayToItemDocument,
|
|
13
13
|
toReplayDocument
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E2Q2ULMR.js";
|
|
15
15
|
import {
|
|
16
16
|
acquireLock,
|
|
17
17
|
appendHistoryEntry,
|
|
18
18
|
createHistoryEntry,
|
|
19
19
|
enforceHistoryStreamPolicyForItem,
|
|
20
20
|
locateItem,
|
|
21
|
-
readLocatedItem
|
|
22
|
-
} from "./chunk-IPKJ6B36.js";
|
|
23
|
-
import {
|
|
24
21
|
normalizeItemId,
|
|
25
|
-
normalizeRawItemId
|
|
26
|
-
|
|
22
|
+
normalizeRawItemId,
|
|
23
|
+
readLocatedItem
|
|
24
|
+
} from "./chunk-LBH7UYKY.js";
|
|
27
25
|
import {
|
|
28
26
|
canonicalDocument,
|
|
29
27
|
serializeItemDocument
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
resolveItemTypeRegistry
|
|
33
|
-
} from "./chunk-YJ3SUEPD.js";
|
|
28
|
+
} from "./chunk-ZFIEEDTJ.js";
|
|
34
29
|
import {
|
|
35
30
|
nowIso
|
|
36
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MLHX6DN5.js";
|
|
37
32
|
import {
|
|
38
33
|
EXIT_CODE,
|
|
39
34
|
PmCliError,
|
|
@@ -46,10 +41,11 @@ import {
|
|
|
46
41
|
readFileIfExists,
|
|
47
42
|
readSettings,
|
|
48
43
|
recordAfterCommandAffectedItem,
|
|
44
|
+
resolveItemTypeRegistry,
|
|
49
45
|
resolvePmRoot,
|
|
50
46
|
runActiveOnWriteHooks,
|
|
51
47
|
writeFileAtomic
|
|
52
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-SNUK7H5J.js";
|
|
53
49
|
|
|
54
50
|
// dist/cli/commands/restore.js
|
|
55
51
|
import jsonPatch from "fast-json-patch";
|
|
@@ -391,4 +387,4 @@ export {
|
|
|
391
387
|
runRestore,
|
|
392
388
|
_testOnlyRestoreCommand
|
|
393
389
|
};
|
|
394
|
-
//# sourceMappingURL=chunk-
|
|
390
|
+
//# sourceMappingURL=chunk-GF7EAR22.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/restore.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/restore\n *\n * Implements the pm restore command surface and its agent-facing runtime behavior.\n */\nimport jsonPatch from \"fast-json-patch\";\nimport fs from \"node:fs/promises\";\nimport { pathExists, readFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { appendHistoryEntry, createHistoryEntry } from \"../../core/history/history.js\";\nimport {\n EMPTY_REPLAY_DOCUMENT,\n normalizeReplayPatchOps,\n replayHash,\n replayToCanonicalItemDocument,\n replayToItemDocument,\n toReplayDocument,\n type ReplayDocument as CanonicalReplayDocument,\n} from \"../../core/history/replay.js\";\nimport { enforceHistoryStreamPolicyForItem } from \"../../core/history/history-stream-policy.js\";\nimport { normalizeItemId, normalizeRawItemId } from \"../../core/item/id.js\";\nimport { canonicalDocument, serializeItemDocument } from \"../../core/item/item-format.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { acquireLock } from \"../../core/lock/lock.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport {\n getActiveExtensionRegistrations,\n projectAfterCommandItemSnapshot,\n recordAfterCommandAffectedItem,\n runActiveOnWriteHooks,\n} from \"../../core/extensions/index.js\";\nimport { locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { HistoryEntry, HistoryPatchOp, ItemDocument, ItemMetadata } from \"../../types/index.js\";\nimport { readHistoryEntries } from \"./history.js\";\n\ninterface ResolvedRestoreTarget {\n kind: \"version\" | \"timestamp\";\n raw: string;\n historyIndex: number;\n}\n\ninterface ResolvedRestoreSubject {\n id: string;\n historyPath: string;\n located: Awaited<ReturnType<typeof locateItem>>;\n historyPolicyWarnings: string[];\n}\n\n/**\n * Documents the restore command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface RestoreCommandOptions {\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the restore result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RestoreResult {\n item: ItemMetadata;\n restored_from: {\n kind: \"version\" | \"timestamp\";\n target: string;\n history_index: number;\n entry_ts: string;\n entry_op: string;\n };\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction ensureReplayTarget(target: string, history: HistoryEntry[]): ResolvedRestoreTarget {\n const trimmed = target.trim();\n if (!trimmed) {\n throw new PmCliError(\"Missing restore target. Use a timestamp or version number.\", EXIT_CODE.USAGE);\n }\n\n if (/^\\d+$/.test(trimmed)) {\n const version = Number(trimmed);\n if (!Number.isSafeInteger(version) || version < 1 || version > history.length) {\n throw new PmCliError(\n `Restore version must be between 1 and ${history.length} for this item.`,\n EXIT_CODE.USAGE,\n );\n }\n return {\n kind: \"version\",\n raw: trimmed,\n historyIndex: version - 1,\n };\n }\n\n const parsedTarget = Date.parse(trimmed);\n if (!Number.isFinite(parsedTarget)) {\n throw new PmCliError(\n `Invalid restore target \"${target}\". Use a positive version number or ISO timestamp.`,\n EXIT_CODE.USAGE,\n );\n }\n\n let index = -1;\n for (let i = 0; i < history.length; i += 1) {\n const entryTimestamp = Date.parse(history[i].ts);\n if (!Number.isFinite(entryTimestamp)) {\n throw new PmCliError(\n `History for this item contains invalid timestamp at entry ${i + 1}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n if (entryTimestamp <= parsedTarget) {\n index = i;\n }\n }\n\n if (index < 0) {\n throw new PmCliError(`No history entries exist at or before timestamp ${trimmed}.`, EXIT_CODE.USAGE);\n }\n\n return {\n kind: \"timestamp\",\n raw: trimmed,\n historyIndex: index,\n };\n}\n\nfunction extractPatchFailureContext(\n patch: HistoryPatchOp[],\n error: unknown,\n): { patchIndex?: number; op?: string; path?: string; from?: string; reason?: string } {\n const context: { patchIndex?: number; op?: string; path?: string; from?: string; reason?: string } = {};\n if (error instanceof Error && error.message.trim().length > 0) {\n context.reason = error.message.trim();\n }\n if (typeof error !== \"object\" || error === null) {\n return context;\n }\n const candidate = error as {\n index?: unknown;\n operation?: unknown;\n };\n /* c8 ignore start -- parser-generated patch errors may omit index metadata in current fixtures. */\n if (typeof candidate.index === \"number\" && Number.isInteger(candidate.index) && candidate.index >= 0) {\n context.patchIndex = candidate.index;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- operation payload metadata is optional in upstream json-patch failures. */\n const operationRecord =\n typeof candidate.operation === \"object\" && candidate.operation !== null\n ? (candidate.operation as { op?: unknown; path?: unknown; from?: unknown })\n : null;\n /* c8 ignore stop */\n if (operationRecord && typeof operationRecord.op === \"string\") {\n context.op = operationRecord.op;\n }\n if (operationRecord && typeof operationRecord.path === \"string\") {\n context.path = operationRecord.path;\n }\n if (operationRecord && typeof operationRecord.from === \"string\") {\n context.from = operationRecord.from;\n }\n if ((context.op === undefined || context.path === undefined) && context.patchIndex !== undefined) {\n const fallback = patch[context.patchIndex];\n /* c8 ignore start -- fallback enrichment paths are only exercised by malformed patch telemetry payloads. */\n if (fallback) {\n context.op = context.op ?? fallback.op;\n context.path = context.path ?? fallback.path;\n context.from = context.from ?? fallback.from;\n }\n /* c8 ignore stop */\n }\n return context;\n}\n\nfunction applyHistoryPatch(\n current: CanonicalReplayDocument,\n patch: HistoryPatchOp[],\n entryNumber: number,\n entryOp: string,\n): CanonicalReplayDocument {\n try {\n const normalizedPatch = normalizeReplayPatchOps(patch);\n const applied = jsonPatch.applyPatch(\n structuredClone(current),\n normalizedPatch as jsonPatch.Operation[],\n true,\n false,\n ).newDocument as unknown;\n if (\n typeof applied !== \"object\" ||\n applied === null ||\n !(\"metadata\" in applied) ||\n !(\"body\" in applied) ||\n typeof (applied as { body: unknown }).body !== \"string\" ||\n typeof (applied as { metadata: unknown }).metadata !== \"object\" ||\n (applied as { metadata: unknown }).metadata === null\n ) {\n throw new PmCliError(\n `History replay produced an invalid document shape at entry ${entryNumber}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n const replay = applied as { metadata: Record<string, unknown>; body: string };\n return {\n metadata: replay.metadata,\n body: replay.body,\n };\n } catch (error: unknown) {\n if (error instanceof PmCliError) {\n throw error;\n }\n const failureContext = extractPatchFailureContext(patch, error);\n const contextTokens = [\n `history_op=${entryOp}`,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.patchIndex !== undefined ? `patch_index=${failureContext.patchIndex}` : null,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.op ? `op=${failureContext.op}` : null,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.path ? `path=${failureContext.path}` : null,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.from ? `from=${failureContext.from}` : null,\n ].filter((token): token is string => token !== null);\n /* c8 ignore start -- jsonPatch/structuredClone/normalizeReplayPatchOps always throw Error instances with non-empty messages here, so extractPatchFailureContext always sets reason; the empty-suffix fallback is unreachable through applyHistoryPatch. */\n const reasonSuffix = failureContext.reason ? ` ${failureContext.reason}` : \"\";\n /* c8 ignore stop */\n throw new PmCliError(\n `Failed to apply history patch at entry ${entryNumber} (${contextTokens.join(\", \")}).${reasonSuffix}`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n}\n\nfunction replayToTarget(history: HistoryEntry[], targetIndex: number): CanonicalReplayDocument {\n let document: CanonicalReplayDocument = structuredClone(EMPTY_REPLAY_DOCUMENT);\n\n for (let i = 0; i <= targetIndex; i += 1) {\n const entry = history[i];\n const beforeHash = replayHash(document);\n if (beforeHash !== entry.before_hash) {\n throw new PmCliError(\n `History hash mismatch before replay at entry ${i + 1}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n\n document = applyHistoryPatch(document, entry.patch, i + 1, entry.op);\n\n const afterHash = replayHash(document);\n if (afterHash !== entry.after_hash) {\n throw new PmCliError(\n `History hash mismatch after replay at entry ${i + 1}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n }\n\n return document;\n}\n\nfunction ensureMaterializedRestoreTarget(\n replayDocument: CanonicalReplayDocument,\n target: ResolvedRestoreTarget,\n): CanonicalReplayDocument {\n if (Object.keys(replayDocument.metadata).length > 0) {\n return replayDocument;\n }\n throw new PmCliError(\n `Restore target ${target.raw} resolves to a deleted state; choose a version or timestamp where the item exists.`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction replayCurrentDocument(history: HistoryEntry[]): ItemDocument {\n const currentReplay = replayToTarget(history, history.length - 1);\n if (Object.keys(currentReplay.metadata).length === 0) {\n return {\n metadata: {} as ItemMetadata,\n body: currentReplay.body,\n };\n }\n return canonicalDocument(replayToItemDocument(currentReplay));\n}\n\nasync function resolveRestoreSubject(\n pmRoot: string,\n id: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n typeToFolder: Record<string, string>,\n): Promise<ResolvedRestoreSubject> {\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);\n if (located) {\n const historyPath = getHistoryPath(pmRoot, located.id);\n const historyPolicy = await enforceHistoryStreamPolicyForItem({\n pmRoot,\n settings,\n itemId: located.id,\n commandLabel: \"restore\",\n });\n return {\n id: located.id,\n historyPath,\n located,\n historyPolicyWarnings: historyPolicy.warnings,\n };\n }\n\n const normalizedId = normalizeItemId(id, settings.id_prefix);\n const rawNormalizedId = normalizeRawItemId(id);\n /* c8 ignore start -- raw-id fallback is covered by normalize-item-id utility tests. */\n const candidateIds = normalizedId === rawNormalizedId ? [normalizedId] : [normalizedId, rawNormalizedId];\n /* c8 ignore stop */\n for (const candidateId of candidateIds) {\n const historyPath = getHistoryPath(pmRoot, candidateId);\n if (await pathExists(historyPath)) {\n return {\n id: candidateId,\n historyPath,\n located: null,\n historyPolicyWarnings: [],\n };\n }\n }\n\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n}\n\nfunction changedFields(beforeDocument: ItemDocument, afterDocument: ItemDocument): string[] {\n const beforeReplay = toReplayDocument(beforeDocument);\n const afterReplay = toReplayDocument(afterDocument);\n const patch = jsonPatch.compare(beforeReplay, afterReplay) as HistoryPatchOp[];\n const fields = new Set<string>();\n\n for (const op of patch) {\n if (op.path === \"/body\" || op.path.startsWith(\"/body/\")) {\n fields.add(\"body\");\n continue;\n }\n const segment = op.path.replace(/^\\/(?:metadata|front_matter)\\/?/, \"\").split(\"/\")[0];\n fields.add(segment.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\"));\n }\n\n return Array.from(fields).sort((a, b) => a.localeCompare(b));\n}\n\n/**\n * Implements run restore for the public runtime surface of this module.\n */\nexport async function runRestore(\n id: string,\n target: string,\n options: RestoreCommandOptions,\n global: GlobalOptions,\n): Promise<RestoreResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const subject = await resolveRestoreSubject(pmRoot, id, settings, typeRegistry.type_to_folder);\n const resolvedId = subject.id;\n const historyRawBeforeLock = await readFileIfExists(subject.historyPath);\n const history = await readHistoryEntries(subject.historyPath, resolvedId);\n if (history.length === 0) {\n throw new PmCliError(`No history exists for ${resolvedId}; restore is unavailable.`, EXIT_CODE.NOT_FOUND);\n }\n\n const resolvedTarget = ensureReplayTarget(target, history);\n const replayDocument = ensureMaterializedRestoreTarget(replayToTarget(history, resolvedTarget.historyIndex), resolvedTarget);\n const restoredDocument = replayToCanonicalItemDocument(replayDocument, { schema: settings.schema });\n\n if (restoredDocument.metadata.id !== resolvedId) {\n throw new PmCliError(\n `Restore target resolved to item ${restoredDocument.metadata.id}, expected ${resolvedId}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n const loadedItemBeforeLock = subject.located ? await readLocatedItem(subject.located, { schema: settings.schema }) : null;\n const currentItemRawBeforeLock = loadedItemBeforeLock?.raw ?? null;\n\n const author = resolveAuthor(options.author, settings.author_default);\n const releaseLock = await acquireLock(\n pmRoot,\n resolvedId,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n settings.governance.force_required_for_stale_lock,\n );\n\n try {\n const historyRawUnderLock = await readFileIfExists(subject.historyPath);\n if (historyRawUnderLock !== historyRawBeforeLock) {\n throw new PmCliError(\n `History for ${resolvedId} changed while waiting for lock; retry restore.`,\n EXIT_CODE.CONFLICT,\n );\n }\n const locatedUnderLock = await locateItem(\n pmRoot,\n resolvedId,\n settings.id_prefix,\n settings.item_format,\n typeRegistry.type_to_folder,\n );\n const loadedItemUnderLock = locatedUnderLock ? await readLocatedItem(locatedUnderLock, { schema: settings.schema }) : null;\n if ((loadedItemUnderLock?.raw ?? null) !== currentItemRawBeforeLock) {\n throw new PmCliError(`Item ${resolvedId} changed while waiting for lock; retry restore.`, EXIT_CODE.CONFLICT);\n }\n\n const existingItemPath = locatedUnderLock?.itemPath ?? null;\n const itemFormat = \"toon\";\n let resolvedCurrentDocument: ItemDocument;\n let resolvedOriginalRaw: string | null = null;\n if (loadedItemUnderLock) {\n resolvedCurrentDocument = loadedItemUnderLock.document;\n resolvedOriginalRaw = loadedItemUnderLock.raw;\n } else {\n resolvedCurrentDocument = replayCurrentDocument(history);\n }\n const assigned = resolvedCurrentDocument.metadata.assignee?.trim();\n const ownershipWarnings: string[] = [];\n const hasOwnershipConflict = assigned && assigned !== author && !options.force;\n if (hasOwnershipConflict) {\n if (settings.governance.ownership_enforcement === \"strict\") {\n throw new PmCliError(\n `Item ${resolvedId} is assigned to ${assigned}. Use --force to override.`,\n EXIT_CODE.CONFLICT,\n );\n }\n if (settings.governance.ownership_enforcement === \"warn\") {\n ownershipWarnings.push(`ownership_warning:assignee_conflict:${resolvedId}:${assigned}`);\n }\n }\n\n const serializedRestore = serializeItemDocument(restoredDocument, { format: itemFormat, schema: settings.schema });\n /* c8 ignore next -- restored item path typing is exercised in restore integration workflows. */\n const restoredItemPath = getItemPath(\n pmRoot,\n restoredDocument.metadata.type,\n resolvedId,\n itemFormat,\n typeRegistry.type_to_folder,\n );\n await writeFileAtomic(restoredItemPath, serializedRestore);\n if (existingItemPath && restoredItemPath !== existingItemPath) {\n await fs.rm(existingItemPath);\n }\n\n const historyEntry = createHistoryEntry({\n nowIso: nowIso(),\n author,\n op: \"restore\",\n before: resolvedCurrentDocument,\n after: restoredDocument,\n message: options.message,\n });\n\n try {\n await appendHistoryEntry(subject.historyPath, historyEntry);\n } catch (error: unknown) {\n if (existingItemPath && resolvedOriginalRaw !== null && restoredItemPath !== existingItemPath) {\n await writeFileAtomic(existingItemPath, resolvedOriginalRaw);\n await fs.rm(restoredItemPath, { force: true });\n } else if (existingItemPath && resolvedOriginalRaw !== null) {\n await writeFileAtomic(existingItemPath, resolvedOriginalRaw);\n } else {\n await fs.rm(restoredItemPath, { force: true });\n }\n throw error;\n }\n const restoreChangedFields = changedFields(resolvedCurrentDocument, restoredDocument);\n const hookWarnings = [\n ...(await runActiveOnWriteHooks({\n path: restoredItemPath,\n scope: \"project\",\n op: \"restore\",\n item_id: restoredDocument.metadata.id,\n item_type: restoredDocument.metadata.type,\n before: resolvedCurrentDocument,\n after: restoredDocument,\n changed_fields: [\"restored\"],\n })),\n ...(await runActiveOnWriteHooks({\n path: subject.historyPath,\n scope: \"project\",\n op: \"restore:history\",\n item_id: restoredDocument.metadata.id,\n item_type: restoredDocument.metadata.type,\n before: resolvedCurrentDocument,\n after: restoredDocument,\n changed_fields: [\"restored\"],\n })),\n ];\n recordAfterCommandAffectedItem({\n id: restoredDocument.metadata.id,\n op: \"restore\",\n item_type: restoredDocument.metadata.type,\n previous_status: resolvedCurrentDocument.metadata.status,\n status: restoredDocument.metadata.status,\n previous: projectAfterCommandItemSnapshot(resolvedCurrentDocument.metadata, restoreChangedFields),\n current: projectAfterCommandItemSnapshot(restoredDocument.metadata, restoreChangedFields),\n changed_fields: restoreChangedFields,\n });\n\n const targetEntry = history[resolvedTarget.historyIndex];\n return {\n item: restoredDocument.metadata,\n restored_from: {\n kind: resolvedTarget.kind,\n target: resolvedTarget.raw,\n history_index: resolvedTarget.historyIndex + 1,\n entry_ts: targetEntry.ts,\n entry_op: targetEntry.op,\n },\n changed_fields: restoreChangedFields,\n warnings: [...subject.historyPolicyWarnings, ...ownershipWarnings, ...hookWarnings],\n };\n } finally {\n await releaseLock();\n }\n}\n\nexport const _testOnlyRestoreCommand = {\n applyHistoryPatch,\n changedFields,\n ensureMaterializedRestoreTarget,\n ensureReplayTarget,\n extractPatchFailureContext,\n replayCurrentDocument,\n replayToTarget,\n resolveRestoreSubject,\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,eAAe;AACtB,OAAO,QAAQ;;;;;;;;AAwEf,SAAS,mBAAmB,QAAgB,SAAuB;AACjE,QAAM,UAAU,OAAO,KAAI;AAC3B,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,WAAW,8DAA8D,UAAU,KAAK;EACpG;AAEA,MAAI,QAAQ,KAAK,OAAO,GAAG;AACzB,UAAM,UAAU,OAAO,OAAO;AAC9B,QAAI,CAAC,OAAO,cAAc,OAAO,KAAK,UAAU,KAAK,UAAU,QAAQ,QAAQ;AAC7E,YAAM,IAAI,WACR,yCAAyC,QAAQ,MAAM,mBACvD,UAAU,KAAK;IAEnB;AACA,WAAO;MACL,MAAM;MACN,KAAK;MACL,cAAc,UAAU;;EAE5B;AAEA,QAAM,eAAe,KAAK,MAAM,OAAO;AACvC,MAAI,CAAC,OAAO,SAAS,YAAY,GAAG;AAClC,UAAM,IAAI,WACR,2BAA2B,MAAM,sDACjC,UAAU,KAAK;EAEnB;AAEA,MAAI,QAAQ;AACZ,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK,GAAG;AAC1C,UAAM,iBAAiB,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,gBAAgB;AACpF,UAAM,eAAe;MACnB,GAAI,MAAM,sBAAsB;QAC9B,MAAM;QACN,OAAO;QACP,IAAI;QACJ,SAAS,iBAAiB,SAAS;QACnC,WAAW,iBAAiB,SAAS;QACrC,QAAQ;QACR,OAAO;QACP,gBAAgB,CAAC,UAAU;OAC5B;MACD,GAAI,MAAM,sBAAsB;QAC9B,MAAM,QAAQ;QACd,OAAO;QACP,IAAI;QACJ,SAAS,iBAAiB,SAAS;QACnC,WAAW,iBAAiB,SAAS;QACrC,QAAQ;QACR,OAAO;QACP,gBAAgB,CAAC,UAAU;OAC5B;;AAEH,mCAA+B;MAC7B,IAAI,iBAAiB,SAAS;MAC9B,IAAI;MACJ,WAAW,iBAAiB,SAAS;MACrC,iBAAiB,wBAAwB,SAAS;MAClD,QAAQ,iBAAiB,SAAS;MAClC,UAAU,gCAAgC,wBAAwB,UAAU,oBAAoB;MAChG,SAAS,gCAAgC,iBAAiB,UAAU,oBAAoB;MACxF,gBAAgB;KACjB;AAED,UAAM,cAAc,QAAQ,eAAe,YAAY;AACvD,WAAO;MACL,MAAM,iBAAiB;MACvB,eAAe;QACb,MAAM,eAAe;QACrB,QAAQ,eAAe;QACvB,eAAe,eAAe,eAAe;QAC7C,UAAU,YAAY;QACtB,UAAU,YAAY;;MAExB,gBAAgB;MAChB,UAAU,CAAC,GAAG,QAAQ,uBAAuB,GAAG,mBAAmB,GAAG,YAAY;;EAEtF;AACE,UAAM,YAAW;EACnB;AACF;AAEO,IAAM,0BAA0B;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;",
|
|
6
6
|
"names": ["global"]
|
|
7
7
|
}
|
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a060da65-925f-55ab-b13e-d07fceedaeaf")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runActivity
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-AD3A7ZD6.js";
|
|
7
|
-
import "./chunk-WM5ZVBPE.js";
|
|
5
|
+
} from "./chunk-FBZ5XAAF.js";
|
|
8
6
|
import {
|
|
9
7
|
collectRuntimeFilterValues,
|
|
10
8
|
matchesRuntimeFilters,
|
|
11
9
|
runList
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-QB7XMHJW.js";
|
|
14
|
-
import "./chunk-H4IIJDE4.js";
|
|
10
|
+
} from "./chunk-ZIE6WXJ2.js";
|
|
15
11
|
import {
|
|
16
12
|
parseIntegerLimit,
|
|
17
13
|
parsePriority,
|
|
18
14
|
parseType
|
|
19
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JVQ7UOYC.js";
|
|
20
16
|
import {
|
|
21
17
|
listAllFrontMatterLight
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-S2RUQSX2.js";
|
|
18
|
+
} from "./chunk-KGQ3W65B.js";
|
|
24
19
|
import {
|
|
25
20
|
isTerminalStatus,
|
|
26
21
|
normalizeStatusForRegistry,
|
|
27
22
|
normalizeStatusInput
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
resolveItemTypeRegistry
|
|
31
|
-
} from "./chunk-YDEXO24S.js";
|
|
23
|
+
} from "./chunk-V3KLX7U7.js";
|
|
32
24
|
import {
|
|
33
25
|
compareTimestampStrings,
|
|
34
26
|
nowIso,
|
|
35
27
|
resolveIsoOrRelative
|
|
36
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KRASIL6M.js";
|
|
37
29
|
import {
|
|
38
30
|
CONTEXT_DEPTH_VALUES,
|
|
39
31
|
CONTEXT_SECTION_VALUES,
|
|
@@ -45,11 +37,12 @@ import {
|
|
|
45
37
|
levenshteinDistanceWithinLimit,
|
|
46
38
|
pathExists,
|
|
47
39
|
readSettings,
|
|
40
|
+
resolveItemTypeRegistry,
|
|
48
41
|
resolvePmRoot,
|
|
49
42
|
resolveRuntimeFieldRegistry,
|
|
50
43
|
resolveRuntimeStatusRegistry,
|
|
51
44
|
weekdayOrderIndex
|
|
52
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-CY5IJMUM.js";
|
|
53
46
|
|
|
54
47
|
// dist/cli/commands/calendar.js
|
|
55
48
|
import { encode as encodeToon } from "@toon-format/toon";
|
|
@@ -1719,17 +1712,22 @@ async function runContext(options, global) {
|
|
|
1719
1712
|
}
|
|
1720
1713
|
return result;
|
|
1721
1714
|
}
|
|
1715
|
+
|
|
1722
1716
|
export {
|
|
1723
1717
|
CONTEXT_OUTPUT_VALUES,
|
|
1724
|
-
_testOnly,
|
|
1725
|
-
parseContextDepth,
|
|
1726
1718
|
parseContextFocusFields,
|
|
1727
|
-
parseContextSections,
|
|
1728
1719
|
projectContextFocusRows,
|
|
1729
|
-
renderContextMarkdown,
|
|
1730
1720
|
resolveContextOutputFormat,
|
|
1721
|
+
parseContextDepth,
|
|
1722
|
+
parseContextSections,
|
|
1723
|
+
collectSubtreeIds,
|
|
1724
|
+
compareCriticalItems,
|
|
1725
|
+
buildChildrenByParent,
|
|
1726
|
+
toContextFocusItem,
|
|
1727
|
+
_testOnly,
|
|
1728
|
+
renderContextMarkdown,
|
|
1731
1729
|
runContext
|
|
1732
1730
|
};
|
|
1733
|
-
//# sourceMappingURL=
|
|
1731
|
+
//# sourceMappingURL=chunk-HIBK6H4S.js.map
|
|
1734
1732
|
|
|
1735
|
-
//# debugId=
|
|
1733
|
+
//# debugId=a060da65-925f-55ab-b13e-d07fceedaeaf
|