@unbrained/pm-cli 2026.7.13 → 2026.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +28 -0
- package/dist/cli/commands/aggregate.d.ts +1 -1
- package/dist/cli/commands/aggregate.js +18 -6
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/context.d.ts +16 -1
- package/dist/cli/commands/context.js +98 -16
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -1
- package/dist/cli/commands/create.js +11 -7
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/deps.d.ts +6 -96
- package/dist/cli/commands/deps.js +4 -214
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/docs.d.ts +2 -44
- package/dist/cli/commands/docs.js +8 -13
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/files.d.ts +6 -134
- package/dist/cli/commands/files.js +4 -294
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/get.js +15 -2
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/list.js +5 -6
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.d.ts +3 -1
- package/dist/cli/commands/next.js +77 -20
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/update-many.js +6 -3
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.js +14 -7
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +1 -1
- package/dist/cli/commands/validate.js +32 -35
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/main.d.ts +2 -14
- package/dist/cli/main.js +27 -8
- package/dist/cli/main.js.map +1 -1
- package/dist/cli-bundle/chunks/append-DYQWQK2J.js +11 -0
- package/dist/cli-bundle/chunks/{append-2FS6MVG7.js → append-PVZJDM6J.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-J2WAWP4U.js → chunk-2FNWQXZ2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YFGYDZRP.js → chunk-2GA3NK35.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-XFEIASAC.js → chunk-2QIQGYPW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3WCGYH5Q.js → chunk-3CMRNVTO.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-3HKUXVKV.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-VDAZPPRU.js → chunk-3I3LRT2G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3P3RFJIQ.js → chunk-3TL7WOEF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4SHJ5JS3.js → chunk-44LNIULG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QFOAWBOB.js → chunk-4DY4KPQI.js} +11 -10
- package/dist/cli-bundle/chunks/{chunk-QFOAWBOB.js.map → chunk-4DY4KPQI.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BVCF4ULV.js → chunk-4RXTMU57.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-XMI2TRY5.js → chunk-4WREH7RT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JYUGUXFW.js → chunk-5CT5BW6E.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NA5SBIB4.js → chunk-5URI7TPJ.js} +44 -44
- package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QGH6WL6L.js → chunk-655STMGA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DGKBWCMA.js → chunk-6IIVBC56.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SRQLQUO6.js → chunk-6MHSBDGD.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-SRQLQUO6.js.map → chunk-6MHSBDGD.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D4GPNYYP.js → chunk-6OTZMORS.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JVRVXO6M.js → chunk-6PKA3SJQ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-2PR4ZTRO.js → chunk-6TTOHMTB.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-2PR4ZTRO.js.map → chunk-6TTOHMTB.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-6X5MZ5R2.js +9 -0
- package/dist/cli-bundle/chunks/chunk-76UBY2EE.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-ZS2KPCJN.js → chunk-7QDSYUMF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-Z7TFPIJ6.js → chunk-7TQMR6LK.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-AHA4POA6.js → chunk-ABRCOSDC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XY3CC3EM.js → chunk-AFWZRL7M.js} +59 -53
- package/dist/cli-bundle/chunks/chunk-AFWZRL7M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KQJVTQVK.js → chunk-ANSJHDOZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OMT4NO7T.js → chunk-B5DZYTT3.js} +113 -24
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-B7SWOIP6.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-D2LXG7WX.js → chunk-BN62TO2S.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-BN62TO2S.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZTSV7P2T.js → chunk-BPD26E3P.js} +357 -42
- package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RKGFUC4O.js → chunk-CDJYP7OQ.js} +36 -14
- package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-VLFLRFJP.js → chunk-CIOZ376P.js} +20 -13
- package/dist/cli-bundle/chunks/chunk-CIOZ376P.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HXTCZSAI.js → chunk-DBZVUJTK.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2QNOWOIB.js → chunk-DO5RGJXT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MKONZ4UO.js → chunk-DRNJPEPQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-XDT2PSXA.js → chunk-DVOLZJ3C.js} +12 -11
- package/dist/cli-bundle/chunks/{chunk-XDT2PSXA.js.map → chunk-DVOLZJ3C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-H36FXA7B.js → chunk-DYEX6NFH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-G3IB5GTD.js → chunk-E2WC6S4P.js} +15 -11
- package/dist/cli-bundle/chunks/chunk-E2WC6S4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GAJ7U7B4.js → chunk-ERL2YFJ2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FPEYOFEF.js → chunk-F7PSHRNO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UH7OLT6F.js → chunk-FDSBDNYE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DGJF32JF.js → chunk-FIGXOCEQ.js} +66 -21
- package/dist/cli-bundle/chunks/chunk-FIGXOCEQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RQAY7C5T.js → chunk-FJZDA6MS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-B4TVNGRX.js → chunk-FO7GMJKG.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-FRQ63VPB.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-UTYNQ2WH.js → chunk-FS6UM5WH.js} +48 -27
- package/dist/cli-bundle/chunks/chunk-FS6UM5WH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-U252II47.js → chunk-FTQLW4JD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TNGLCRKS.js → chunk-GSEADLRH.js} +1821 -1809
- package/dist/cli-bundle/chunks/chunk-GSEADLRH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TGG7YGMC.js → chunk-GXXC7QSK.js} +53 -47
- package/dist/cli-bundle/chunks/chunk-GXXC7QSK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGD4VZXH.js → chunk-H2QBAKLQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CJVQ4XIG.js → chunk-HAMLIWAF.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-56DX6QYG.js → chunk-HL7V2PHX.js} +19 -13
- package/dist/cli-bundle/chunks/chunk-HL7V2PHX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7QOIQTPB.js → chunk-HLHSQ5CA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-AHC7J6XD.js → chunk-IA3YFTXT.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-5ZCVF4WF.js → chunk-IAPHYPRL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OCSQWIOW.js → chunk-IFZA4VB5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6O2HJENY.js → chunk-IGED7NH2.js} +61 -48
- package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RPCCQDG2.js → chunk-ILLUE5DI.js} +36 -14
- package/dist/cli-bundle/chunks/chunk-ILLUE5DI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4WMFM77X.js → chunk-J4NZOP3I.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-57JVERX3.js → chunk-JAF4TUQ7.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-JAF4TUQ7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MTNKSSSO.js → chunk-JL7WZ4O2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AZ52LTCY.js → chunk-K7WNZ7KD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2OLSXXIV.js → chunk-KADLSPIU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RQKORMM4.js → chunk-KB726FMH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WKSFBBZT.js → chunk-L24HCJFC.js} +114 -25
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LDO24J5I.js → chunk-LWTIRS3Y.js} +365 -43
- package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TZTQ4TVV.js → chunk-M6ASXYCU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WDDOAU7Z.js → chunk-M7EWN4TF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-327DSGW2.js → chunk-MD6ULIPJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OKDBHOON.js → chunk-MKL4CP2I.js} +61 -48
- package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M52DG2QJ.js → chunk-MQZ3PLCF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GQ2CQNGI.js → chunk-N3CMP4NI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J7SBFUZC.js → chunk-NAQYVWSQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-U2GMYP3L.js → chunk-NKW36AMT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5WEYOVZ7.js → chunk-OBDLEQG5.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-OBDLEQG5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VL4LYTJN.js → chunk-OI4S4KCI.js} +18 -12
- package/dist/cli-bundle/chunks/chunk-OI4S4KCI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FCVVMAEX.js → chunk-P6MYFH6K.js} +60 -22
- package/dist/cli-bundle/chunks/chunk-P6MYFH6K.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FTQQAPRX.js → chunk-PHKP3AGR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-WVUXNIYO.js → chunk-Q37E63AM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JVXV7ANV.js → chunk-Q7E6OYZK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WVUYATII.js → chunk-QABYZYLU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QRRUGIJN.js → chunk-QASRVKUQ.js} +45 -45
- package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-L4262MFB.js → chunk-QK2ZN6UL.js} +14 -5
- package/dist/cli-bundle/chunks/{chunk-L4262MFB.js.map → chunk-QK2ZN6UL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7TQPV7HR.js → chunk-QSPARJWF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GTKILM6F.js → chunk-QZ7LT3XE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-L3VKY6R6.js → chunk-RA5AIAMP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BJS27ALI.js → chunk-RGXD5JJR.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-TSEPW2P6.js → chunk-RMF3IOYQ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-QXYKH56X.js → chunk-T4BRCB6Z.js} +1894 -1875
- package/dist/cli-bundle/chunks/chunk-T4BRCB6Z.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TGGTXC52.js → chunk-TH7U4KLY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LP4UATP6.js → chunk-TWLDBKQU.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OTZ3C2NE.js → chunk-TZ2PSLLT.js} +49 -28
- package/dist/cli-bundle/chunks/chunk-TZ2PSLLT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UK222BHQ.js → chunk-TZRTLMWM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6E6S2X6S.js → chunk-UB2QYSTO.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-S6CXUSYC.js → chunk-UGTVWL3E.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-BNS6QHTZ.js → chunk-UJ4HJYWL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BYVOEJPQ.js → chunk-UKUIIBDW.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SGDBVR7X.js → chunk-UVBA6F5A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DZRZMBBF.js → chunk-VJTAEIPC.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-74PWVJON.js → chunk-W6HZ55JO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HR2MQAO5.js → chunk-WD6MSYMP.js} +13 -4
- package/dist/cli-bundle/chunks/{chunk-HR2MQAO5.js.map → chunk-WD6MSYMP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P7IFURWH.js → chunk-WPAWZW7S.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-36LEOWSX.js → chunk-WQUEHPZB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FCKJF7G2.js → chunk-WRKB56FC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KR5EHAN4.js → chunk-X3GYR4P2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J567OZJY.js → chunk-X6BVXQ52.js} +16 -12
- package/dist/cli-bundle/chunks/chunk-X6BVXQ52.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-Y72FV7RM.js +178 -0
- package/dist/cli-bundle/chunks/chunk-Y72FV7RM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OWW2KXOV.js → chunk-YQYG2V23.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G2SCT7BC.js → chunk-YVKE5ZDM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QHIN4UTF.js → chunk-ZAYYDNB3.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZHBI2AP7.js +9 -0
- package/dist/cli-bundle/chunks/chunk-ZNP64HOW.js +175 -0
- package/dist/cli-bundle/chunks/chunk-ZNP64HOW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GNVBUNJQ.js → chunk-ZTRBSABY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PY32KGQU.js → chunk-ZUKSZVBW.js} +5 -5
- package/dist/cli-bundle/chunks/{close-CU56F47E.js → close-LZECOMHO.js} +5 -5
- package/dist/cli-bundle/chunks/close-RI4JQQHU.js +12 -0
- package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +21 -0
- package/dist/cli-bundle/chunks/{close-many-ZQ2WP67J.js → close-many-ZHI6A5TN.js} +12 -12
- package/dist/cli-bundle/chunks/comments-35M273DN.js +13 -0
- package/dist/cli-bundle/chunks/{comments-UDUMKXL6.js → comments-AJWRTFZ5.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-VFHECFBV.js → copy-GMXYKBXT.js} +4 -4
- package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +9 -0
- package/dist/cli-bundle/chunks/create-F53OBTOU.js +27 -0
- package/dist/cli-bundle/chunks/{create-CE2X3SGF.js → create-HU4Q7RJX.js} +11 -9
- package/dist/cli-bundle/chunks/{delete-2JXQCHHT.js → delete-GSDZLTRC.js} +4 -4
- package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +10 -0
- package/dist/cli-bundle/chunks/deps-U57I7EAK.js +16 -0
- package/dist/cli-bundle/chunks/{deps-FPXNLO6C.js → deps-WWB7P2GT.js} +7 -4
- package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +14 -0
- package/dist/cli-bundle/chunks/{docs-AMAR4OHU.js → docs-MQIY2ZQS.js} +7 -7
- package/dist/cli-bundle/chunks/files-TBZD7V6H.js +18 -0
- package/dist/cli-bundle/chunks/{files-JFHN7DYM.js → files-TTY6N2AV.js} +7 -7
- package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +10 -0
- package/dist/cli-bundle/chunks/{focus-QFN2RRZ7.js → focus-XT6YVFFX.js} +5 -5
- package/dist/cli-bundle/chunks/{history-compact-G34XMABV.js → history-compact-KKVUWB4V.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-SAHT5D46.js → history-compact-M7GHYVFN.js} +8 -8
- package/dist/cli-bundle/chunks/{history-redact-IFJDNKLZ.js → history-redact-3DVZOILD.js} +6 -6
- package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-NXLQTCVN.js → history-repair-ITDUMK4N.js} +8 -8
- package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +18 -0
- package/dist/cli-bundle/chunks/{learnings-5CZKAMBS.js → learnings-FGO3NSFW.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +13 -0
- package/dist/cli-bundle/chunks/notes-BSD53H2W.js +13 -0
- package/dist/cli-bundle/chunks/{notes-POMK37UI.js → notes-NQ6RXVW6.js} +7 -7
- package/dist/cli-bundle/chunks/{plan-YBNYNT3A.js → plan-2NNEO46V.js} +10 -10
- package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +24 -0
- package/dist/cli-bundle/chunks/{profile-JNKSU6EQ.js → profile-AAQUU6T3.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-A2WPVG6I.js → profile-U725ATWZ.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-UG4ZA5AU.js → register-list-query-BUWCYHBT.js} +14 -13
- package/dist/cli-bundle/chunks/{register-list-query-UG4ZA5AU.js.map → register-list-query-BUWCYHBT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-list-query-KJULL4W3.js → register-list-query-KTZ6AGE7.js} +16 -15
- package/dist/cli-bundle/chunks/{register-list-query-KJULL4W3.js.map → register-list-query-KTZ6AGE7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-3OXYXBKH.js → register-mutation-4FMGJJF7.js} +29 -29
- package/dist/cli-bundle/chunks/{register-mutation-WK265BM7.js → register-mutation-UELYYOR7.js} +29 -29
- package/dist/cli-bundle/chunks/{register-operations-C5SQH3FJ.js → register-operations-ISUX6LY5.js} +33 -29
- package/dist/cli-bundle/chunks/{register-operations-C5SQH3FJ.js.map → register-operations-ISUX6LY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-FH3PBHYN.js → register-operations-JVW24J2Y.js} +35 -31
- package/dist/cli-bundle/chunks/{register-operations-FH3PBHYN.js.map → register-operations-JVW24J2Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-CCK7CJVR.js → register-setup-5XNGKJ22.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-CPZBGSOJ.js → register-setup-ZTNY6S7R.js} +15 -15
- package/dist/cli-bundle/chunks/restore-66GLMHIX.js +14 -0
- package/dist/cli-bundle/chunks/{restore-IVS5XGYR.js → restore-B3BAB6X2.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-P2MF23JO.js → schema-LZNUYHDB.js} +6 -6
- package/dist/cli-bundle/chunks/schema-LZNUYHDB.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-R3U2REY4.js → schema-U7IM2DXV.js} +6 -6
- package/dist/cli-bundle/chunks/schema-U7IM2DXV.js.map +1 -0
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +21 -0
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-YBIQESMH.js → update-Q3UCILNR.js} +12 -12
- package/dist/cli-bundle/chunks/update-Q3UCILNR.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-F3CIV5SQ.js → update-many-75K57FS3.js} +19 -19
- package/dist/cli-bundle/chunks/update-many-75K57FS3.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-U42YA445.js +30 -0
- package/dist/cli-bundle/chunks/update-many-U42YA445.js.map +7 -0
- package/dist/cli-bundle/main.js +39 -16
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +56 -53
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +115 -55
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/extensions/command-hook-context.d.ts +40 -0
- package/dist/core/extensions/command-hook-context.js +14 -0
- package/dist/core/extensions/command-hook-context.js.map +1 -0
- package/dist/core/extensions/index.d.ts +1 -0
- package/dist/core/extensions/index.js +4 -3
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/item/parse.d.ts +2 -0
- package/dist/core/item/parse.js +11 -2
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/store/paths.d.ts +2 -0
- package/dist/core/store/paths.js +10 -2
- package/dist/core/store/paths.js.map +1 -1
- package/dist/mcp/tool-definitions.js +12 -2
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/context-packing.d.ts +114 -0
- package/dist/sdk/context-packing.js +219 -0
- package/dist/sdk/context-packing.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +1 -1
- package/dist/sdk/context-relevance.js +4 -2
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/context-usage.d.ts +79 -0
- package/dist/sdk/context-usage.js +193 -0
- package/dist/sdk/context-usage.js.map +1 -0
- package/dist/sdk/dependencies.d.ts +145 -0
- package/dist/sdk/dependencies.js +327 -0
- package/dist/sdk/dependencies.js.map +1 -0
- package/dist/sdk/docs.d.ts +48 -0
- package/dist/sdk/docs.js +15 -0
- package/dist/sdk/docs.js.map +1 -0
- package/dist/sdk/files.d.ts +135 -0
- package/dist/sdk/files.js +320 -0
- package/dist/sdk/files.js.map +1 -0
- package/dist/sdk/index.d.ts +6 -0
- package/dist/sdk/index.js +8 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/{cli/commands → sdk}/linked-artifacts.d.ts +11 -5
- package/dist/{cli/commands → sdk}/linked-artifacts.js +49 -25
- package/dist/sdk/linked-artifacts.js.map +1 -0
- package/dist/sdk/runtime.d.ts +4 -4
- package/dist/sdk/runtime.js +7 -4
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/workspace.js +3 -2
- package/dist/sdk/workspace.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/CONFIGURATION.md +1 -0
- package/docs/PR_REVIEW_LOOP.md +21 -11
- package/docs/SDK.md +94 -0
- package/marketplace.json +2 -2
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli/commands/linked-artifacts.js.map +0 -1
- package/dist/cli-bundle/chunks/append-CTKFDEAX.js +0 -11
- package/dist/cli-bundle/chunks/chunk-56DX6QYG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57JVERX3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5WEYOVZ7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6O2HJENY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CCAGZCZK.js +0 -17
- package/dist/cli-bundle/chunks/chunk-CCAGZCZK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-D2LXG7WX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DGJF32JF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FCVVMAEX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FUOK7JZ6.js +0 -14
- package/dist/cli-bundle/chunks/chunk-FUOK7JZ6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G3IB5GTD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J567OZJY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LDO24J5I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NA5SBIB4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OKDBHOON.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OMT4NO7T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OTZ3C2NE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QRRUGIJN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QXYKH56X.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RKGFUC4O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RPCCQDG2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TGG7YGMC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TNGLCRKS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UTYNQ2WH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VL4LYTJN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VLFLRFJP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WKSFBBZT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XY3CC3EM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZTSV7P2T.js.map +0 -1
- package/dist/cli-bundle/chunks/close-BWM7FTF4.js +0 -12
- package/dist/cli-bundle/chunks/close-many-AUHTVFUQ.js +0 -21
- package/dist/cli-bundle/chunks/comments-7D5VPBZI.js +0 -13
- package/dist/cli-bundle/chunks/copy-QJ6ZVWZV.js +0 -9
- package/dist/cli-bundle/chunks/create-FGMTTYOI.js +0 -25
- package/dist/cli-bundle/chunks/delete-L2GMMMPR.js +0 -10
- package/dist/cli-bundle/chunks/deps-KTFI4RWD.js +0 -13
- package/dist/cli-bundle/chunks/docs-VNURA275.js +0 -14
- package/dist/cli-bundle/chunks/files-UNFPZLTG.js +0 -18
- package/dist/cli-bundle/chunks/focus-MI2UHBP4.js +0 -10
- package/dist/cli-bundle/chunks/history-redact-VAHGBUHI.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-DDYQXR43.js +0 -18
- package/dist/cli-bundle/chunks/learnings-VWJEKHEO.js +0 -13
- package/dist/cli-bundle/chunks/notes-NGVJJJQO.js +0 -13
- package/dist/cli-bundle/chunks/plan-U6SQJUFI.js +0 -24
- package/dist/cli-bundle/chunks/restore-AX6ZMGHZ.js +0 -14
- package/dist/cli-bundle/chunks/update-XYHF3YZF.js +0 -21
- package/dist/cli-bundle/chunks/update-many-5HKVHFUL.js +0 -30
- /package/dist/cli-bundle/chunks/{append-CTKFDEAX.js.map → append-DYQWQK2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-2FS6MVG7.js.map → append-PVZJDM6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J2WAWP4U.js.map → chunk-2FNWQXZ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFGYDZRP.js.map → chunk-2GA3NK35.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XFEIASAC.js.map → chunk-2QIQGYPW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3WCGYH5Q.js.map → chunk-3CMRNVTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-BWM7FTF4.js.map → chunk-3HKUXVKV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VDAZPPRU.js.map → chunk-3I3LRT2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3P3RFJIQ.js.map → chunk-3TL7WOEF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4SHJ5JS3.js.map → chunk-44LNIULG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BVCF4ULV.js.map → chunk-4RXTMU57.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XMI2TRY5.js.map → chunk-4WREH7RT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JYUGUXFW.js.map → chunk-5CT5BW6E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QGH6WL6L.js.map → chunk-655STMGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DGKBWCMA.js.map → chunk-6IIVBC56.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D4GPNYYP.js.map → chunk-6OTZMORS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVRVXO6M.js.map → chunk-6PKA3SJQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-AUHTVFUQ.js.map → chunk-6X5MZ5R2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-CU56F47E.js.map → chunk-76UBY2EE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZS2KPCJN.js.map → chunk-7QDSYUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z7TFPIJ6.js.map → chunk-7TQMR6LK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AHA4POA6.js.map → chunk-ABRCOSDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KQJVTQVK.js.map → chunk-ANSJHDOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZQ2WP67J.js.map → chunk-B7SWOIP6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HXTCZSAI.js.map → chunk-DBZVUJTK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2QNOWOIB.js.map → chunk-DO5RGJXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MKONZ4UO.js.map → chunk-DRNJPEPQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H36FXA7B.js.map → chunk-DYEX6NFH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GAJ7U7B4.js.map → chunk-ERL2YFJ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FPEYOFEF.js.map → chunk-F7PSHRNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UH7OLT6F.js.map → chunk-FDSBDNYE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RQAY7C5T.js.map → chunk-FJZDA6MS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B4TVNGRX.js.map → chunk-FO7GMJKG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-UDUMKXL6.js.map → chunk-FRQ63VPB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U252II47.js.map → chunk-FTQLW4JD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGD4VZXH.js.map → chunk-H2QBAKLQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CJVQ4XIG.js.map → chunk-HAMLIWAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7QOIQTPB.js.map → chunk-HLHSQ5CA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AHC7J6XD.js.map → chunk-IA3YFTXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5ZCVF4WF.js.map → chunk-IAPHYPRL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OCSQWIOW.js.map → chunk-IFZA4VB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4WMFM77X.js.map → chunk-J4NZOP3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTNKSSSO.js.map → chunk-JL7WZ4O2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZ52LTCY.js.map → chunk-K7WNZ7KD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2OLSXXIV.js.map → chunk-KADLSPIU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RQKORMM4.js.map → chunk-KB726FMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZTQ4TVV.js.map → chunk-M6ASXYCU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WDDOAU7Z.js.map → chunk-M7EWN4TF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-327DSGW2.js.map → chunk-MD6ULIPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M52DG2QJ.js.map → chunk-MQZ3PLCF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GQ2CQNGI.js.map → chunk-N3CMP4NI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J7SBFUZC.js.map → chunk-NAQYVWSQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U2GMYP3L.js.map → chunk-NKW36AMT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FTQQAPRX.js.map → chunk-PHKP3AGR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WVUXNIYO.js.map → chunk-Q37E63AM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVXV7ANV.js.map → chunk-Q7E6OYZK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WVUYATII.js.map → chunk-QABYZYLU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7TQPV7HR.js.map → chunk-QSPARJWF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GTKILM6F.js.map → chunk-QZ7LT3XE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L3VKY6R6.js.map → chunk-RA5AIAMP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BJS27ALI.js.map → chunk-RGXD5JJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TSEPW2P6.js.map → chunk-RMF3IOYQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TGGTXC52.js.map → chunk-TH7U4KLY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LP4UATP6.js.map → chunk-TWLDBKQU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UK222BHQ.js.map → chunk-TZRTLMWM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6E6S2X6S.js.map → chunk-UB2QYSTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S6CXUSYC.js.map → chunk-UGTVWL3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BNS6QHTZ.js.map → chunk-UJ4HJYWL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BYVOEJPQ.js.map → chunk-UKUIIBDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SGDBVR7X.js.map → chunk-UVBA6F5A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DZRZMBBF.js.map → chunk-VJTAEIPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-74PWVJON.js.map → chunk-W6HZ55JO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P7IFURWH.js.map → chunk-WPAWZW7S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-36LEOWSX.js.map → chunk-WQUEHPZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FCKJF7G2.js.map → chunk-WRKB56FC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KR5EHAN4.js.map → chunk-X3GYR4P2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OWW2KXOV.js.map → chunk-YQYG2V23.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G2SCT7BC.js.map → chunk-YVKE5ZDM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QHIN4UTF.js.map → chunk-ZAYYDNB3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-7D5VPBZI.js.map → chunk-ZHBI2AP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GNVBUNJQ.js.map → chunk-ZTRBSABY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PY32KGQU.js.map → chunk-ZUKSZVBW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-VFHECFBV.js.map → close-LZECOMHO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-QJ6ZVWZV.js.map → close-RI4JQQHU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-FGMTTYOI.js.map → close-many-LY2XJ52M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-CE2X3SGF.js.map → close-many-ZHI6A5TN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-L2GMMMPR.js.map → comments-35M273DN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-2JXQCHHT.js.map → comments-AJWRTFZ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-FPXNLO6C.js.map → copy-GMXYKBXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-KTFI4RWD.js.map → copy-NPYM7M7U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-VNURA275.js.map → create-F53OBTOU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-AMAR4OHU.js.map → create-HU4Q7RJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-JFHN7DYM.js.map → delete-GSDZLTRC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-UNFPZLTG.js.map → delete-ODRWJWAM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-MI2UHBP4.js.map → deps-U57I7EAK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-QFN2RRZ7.js.map → deps-WWB7P2GT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-SAHT5D46.js.map → docs-G7N4E2JO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-G34XMABV.js.map → docs-MQIY2ZQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-VAHGBUHI.js.map → files-TBZD7V6H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IFJDNKLZ.js.map → files-TTY6N2AV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-DDYQXR43.js.map → focus-U5TRVCRS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-NXLQTCVN.js.map → focus-XT6YVFFX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-5CZKAMBS.js.map → history-compact-KKVUWB4V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-VWJEKHEO.js.map → history-compact-M7GHYVFN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-POMK37UI.js.map → history-redact-3DVZOILD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-NGVJJJQO.js.map → history-redact-JIHZLHDP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-YBNYNT3A.js.map → history-repair-ITDUMK4N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-U6SQJUFI.js.map → history-repair-NAFCHLH7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-JNKSU6EQ.js.map → learnings-FGO3NSFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-A2WPVG6I.js.map → learnings-SONGPSHI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-AX6ZMGHZ.js.map → notes-BSD53H2W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-IVS5XGYR.js.map → notes-NQ6RXVW6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-R3U2REY4.js.map → plan-2NNEO46V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-P2MF23JO.js.map → plan-AWLYGBNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-YBIQESMH.js.map → profile-AAQUU6T3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-XYHF3YZF.js.map → profile-U725ATWZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-3OXYXBKH.js.map → register-mutation-4FMGJJF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-WK265BM7.js.map → register-mutation-UELYYOR7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-CCK7CJVR.js.map → register-setup-5XNGKJ22.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-CPZBGSOJ.js.map → register-setup-ZTNY6S7R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-5HKVHFUL.js.map → restore-66GLMHIX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-F3CIV5SQ.js.map → restore-B3BAB6X2.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../sdk/define.ts", "../../../../../../../sdk/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module sdk/define\n *\n * Authoring-time typed builders for every extension registration surface.\n *\n * These `define*` helpers are the third leg of the SDK ergonomics tripod:\n * {@link ../core/extensions/loader.js#ExtensionApi | `api.register*`} registers\n * a definition at activation, the `assert*`/`run*` testing helpers verify and\n * invoke it, and these builders let authors *write* the definition with full\n * type-checking and editor inference before it ever reaches `activate`.\n *\n * Every builder is a zero-cost identity function that returns its argument\n * unchanged — exactly like the SDK's {@link ./index.js#defineExtension} and the\n * wider `defineConfig`/`defineComponent` ecosystem convention. Extensions are\n * authored fully in TypeScript (ADR pm-2c28); these builders are where that type\n * safety is anchored at the definition site. Their value is entirely at the type\n * level:\n *\n * - A bare `const cmd = { ... }` satisfies the registration type only\n * structurally and widens its literals; `const cmd = defineCommand({ ... })`\n * checks the object against the contract *and* preserves the narrow literal\n * type, while inferring the nested handler's `context` parameter from the\n * builder signature.\n * - Definitions can be colocated, exported, reused, and unit-tested apart from\n * the `activate` call instead of being trapped as inline literals.\n *\n * Object-definition builders use a generic constraint (`<T extends Def>`) so the\n * narrow literal type survives the round-trip, mirroring `defineExtension`.\n * Function-definition builders are intentionally non-generic: a generic\n * constrained to a whole function type suppresses contextual typing of a bare\n * arrow's parameter (it would fall back to implicit `any`), whereas the\n * non-generic signature lets TypeScript type the handler parameter from the\n * declared function type.\n */\nimport type {\n AfterCommandHook,\n BeforeCommandHook,\n CommandDefinition,\n CommandOverride,\n Exporter,\n ExtensionManifest,\n FlagDefinition,\n Importer,\n OnIndexHook,\n OnReadHook,\n OnWriteHook,\n ParserOverride,\n PreflightOverride,\n RendererOverride,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SearchProviderDefinition,\n ServiceOverride,\n VectorStoreAdapterDefinition,\n} from \"../core/extensions/loader.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\n\n/**\n * Type an extension's in-module manifest mirror (the `manifest` export / field).\n *\n * Completes the `define*` family: the manifest is the one authoring surface that\n * otherwise had no builder. Contract-checks the object against\n * {@link ExtensionManifest} where it is authored, catching a missing required\n * field or a mistyped key at edit time instead of at load time. Pair with\n * {@link ./compose.js#deriveExtensionCapabilities | `deriveExtensionCapabilities`}\n * to keep `capabilities` matched to the surfaces the extension actually registers.\n */\nexport function defineExtensionManifest<TManifest extends ExtensionManifest>(\n manifest: TManifest,\n): TManifest {\n return manifest;\n}\n\n/**\n * Type a project-profile definition for the profile registry.\n *\n * A profile bundles item types, statuses, fields, per-type workflows, config\n * knobs, create templates, and package recommendations into one declarative\n * archetype that `pm profile apply` stages idempotently. This builder checks the\n * object against {@link ProjectProfileDefinition} where it is authored — catching\n * an invalid field type or a malformed workflow at edit time — while preserving\n * the literal `name`/`types`/`statuses` so a package's archetype stays strongly\n * typed at the definition site, mirroring {@link defineItemType}. It is the\n * authoring anchor a first-party or third-party profile package builds on.\n */\nexport function defineProjectProfile<TProfile extends ProjectProfileDefinition>(\n profile: TProfile,\n): TProfile {\n return profile;\n}\n\n/**\n * Type a command definition for `api.registerCommand(definition)`.\n *\n * Checks the object against {@link CommandDefinition} and infers the `run`\n * handler's `context` parameter while preserving the literal `name`/`action`\n * types. Pass the result straight to `registerCommand`, or export it so the\n * command can be invoked in tests via `runRegisteredCommandForTest`.\n */\nexport function defineCommand<TDefinition extends CommandDefinition>(\n definition: TDefinition,\n): TDefinition {\n return definition;\n}\n\n/**\n * Type a single flag definition for a `api.registerFlags(command, flags)` array.\n *\n * Authors compose builders into the array\n * (`api.registerFlags(\"list\", [defineFlag({ long: \"--mine\" })])`) to get\n * per-flag contract checking — `value_type`, `list`, and `default` included —\n * instead of validating a loosely-typed literal array all at once.\n */\nexport function defineFlag<TFlag extends FlagDefinition>(flag: TFlag): TFlag {\n return flag;\n}\n\n/**\n * Type a custom item-type definition for `api.registerItemTypes([...])`.\n *\n * Preserves the literal `name`/`folder`/`aliases` so a project archetype's\n * domain types stay strongly typed where the definition is declared and reused.\n */\nexport function defineItemType<TType extends SchemaItemTypeDefinition>(\n type: TType,\n): TType {\n return type;\n}\n\n/**\n * Type a custom item-metadata field definition for `api.registerItemFields([...])`.\n *\n * Checks `name`/`type`/`optional` against {@link SchemaFieldDefinition} while\n * keeping the field's extra metadata (the contract carries an index signature)\n * intact.\n */\nexport function defineItemField<TField extends SchemaFieldDefinition>(\n field: TField,\n): TField {\n return field;\n}\n\n/**\n * Type a schema migration definition for `api.registerMigration(definition)`.\n *\n * Preserves the literal `id` and, when `run` is provided, infers the migration\n * runner's context, so the same definition can be registered and later exercised\n * through `runRegisteredMigrationForTest`.\n */\nexport function defineMigration<TMigration extends SchemaMigrationDefinition>(\n migration: TMigration,\n): TMigration {\n return migration;\n}\n\n/**\n * Type a search-provider definition for `api.registerSearchProvider(provider)`.\n *\n * Infers the `query`/`embed`/`embedBatch` operation contexts and result shapes\n * so a custom retrieval backend is type-checked at the definition site and\n * reusable in `runRegisteredSearchProviderForTest`.\n */\nexport function defineSearchProvider<\n TProvider extends SearchProviderDefinition,\n>(provider: TProvider): TProvider {\n return provider;\n}\n\n/**\n * Type a vector-store adapter definition for `api.registerVectorStoreAdapter(adapter)`.\n *\n * Infers the `query`/`upsert`/`delete` operation contexts so a package that owns\n * its own semantic index storage gets contract checking before activation and a\n * definition it can drive through `runRegisteredVectorStoreAdapterForTest`.\n */\nexport function defineVectorStoreAdapter<\n TAdapter extends VectorStoreAdapterDefinition,\n>(adapter: TAdapter): TAdapter {\n return adapter;\n}\n\n/**\n * Type a command-override handler for `api.registerCommand(command, override)`.\n *\n * The non-generic signature lets TypeScript contextually type the override's\n * `context` parameter from {@link CommandOverride}, so a bare arrow authored in\n * a `.js` package still gets a fully-typed argument.\n */\nexport function defineCommandOverride(\n override: CommandOverride,\n): CommandOverride {\n return override;\n}\n\n/**\n * Type a parser-override handler for `api.registerParser(command, override)`.\n *\n * Contextually types the `context` parameter and the returned\n * {@link ParserOverride} delta so an argument-rewriting override is checked\n * where it is written.\n */\nexport function defineParserOverride(override: ParserOverride): ParserOverride {\n return override;\n}\n\n/**\n * Type a preflight-override handler for `api.registerPreflight(override)`.\n *\n * Contextually types the `context` parameter and the returned gate decision so a\n * package's pre-run validation override is checked at the definition site.\n */\nexport function definePreflightOverride(\n override: PreflightOverride,\n): PreflightOverride {\n return override;\n}\n\n/**\n * Type a service-override handler for `api.registerService(service, override)`.\n *\n * Contextually types the `context` parameter from {@link ServiceOverride} so a\n * package overriding a built-in service (output formatting, embeddings, and the\n * like) keeps its handler argument typed without an explicit annotation.\n */\nexport function defineServiceOverride(\n override: ServiceOverride,\n): ServiceOverride {\n return override;\n}\n\n/**\n * Type a renderer-override handler for `api.registerRenderer(format, renderer)`.\n *\n * Contextually types the `context` parameter and the `string | null | undefined`\n * return contract so a custom output renderer is checked where it is authored.\n */\nexport function defineRendererOverride(\n renderer: RendererOverride,\n): RendererOverride {\n return renderer;\n}\n\n/**\n * Type an importer handler for `api.registerImporter(name, importer, options)`.\n *\n * Contextually types the {@link Importer} `context` (registration, args,\n * options, pm root) so the bridge from an external system into the pm context\n * graph is type-checked and reusable in `runRegisteredImporterForTest`.\n */\nexport function defineImporter(importer: Importer): Importer {\n return importer;\n}\n\n/**\n * Type an exporter handler for `api.registerExporter(name, exporter, options)`.\n *\n * Contextually types the {@link Exporter} `context` so the bridge from the pm\n * context graph out to an external system is checked at the definition site and\n * reusable in `runRegisteredExporterForTest`.\n */\nexport function defineExporter(exporter: Exporter): Exporter {\n return exporter;\n}\n\n/**\n * Type a `before_command` hook for `api.hooks.beforeCommand(hook)`.\n *\n * Contextually types the {@link BeforeCommandHook} `context` so a hook that\n * inspects or annotates a command before it runs keeps its argument typed when\n * authored as a standalone, exportable, testable value.\n */\nexport function defineBeforeCommandHook(\n hook: BeforeCommandHook,\n): BeforeCommandHook {\n return hook;\n}\n\n/**\n * Type an `after_command` hook for `api.hooks.afterCommand(hook)`.\n *\n * Contextually types the {@link AfterCommandHook} `context` — including the\n * `affected` items pm mutated — so the natural place to react to every change\n * (\"project management = context management\") is checked where it is written.\n */\nexport function defineAfterCommandHook(\n hook: AfterCommandHook,\n): AfterCommandHook {\n return hook;\n}\n\n/**\n * Type an `on_write` hook for `api.hooks.onWrite(hook)`.\n *\n * Contextually types the {@link OnWriteHook} `context` so a hook reacting to\n * item persistence keeps its argument typed without an explicit annotation.\n */\nexport function defineOnWriteHook(hook: OnWriteHook): OnWriteHook {\n return hook;\n}\n\n/**\n * Type an `on_read` hook for `api.hooks.onRead(hook)`.\n *\n * Contextually types the {@link OnReadHook} `context` so a hook augmenting items\n * as they are read is type-checked at the definition site.\n */\nexport function defineOnReadHook(hook: OnReadHook): OnReadHook {\n return hook;\n}\n\n/**\n * Type an `on_index` hook for `api.hooks.onIndex(hook)`.\n *\n * Contextually types the {@link OnIndexHook} `context` so a hook participating\n * in index/search refresh keeps its argument typed even without TypeScript\n * annotations.\n */\nexport function defineOnIndexHook(hook: OnIndexHook): OnIndexHook {\n return hook;\n}\n", "/**\n * @module sdk/index\n *\n * Defines public SDK APIs and package-author helpers for Index.\n */\nexport {\n isErrnoError,\n limitAnnotationEntries,\n parseAnnotationTextInput,\n readAnnotationEntries,\n resolveAnnotationInput,\n resolveAnnotationIndex,\n runAnnotationCommand,\n wrapOwnershipConflict,\n type AnnotationCommandConfig,\n type AnnotationCommandOptions,\n type AnnotationCommandResult,\n type AnnotationEntry,\n type AnnotationInput,\n type AnnotationSourceOptions,\n type OwnershipConflictGuidance,\n} from \"./annotations.js\";\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../core/extensions/loader.js\";\nexport { RESERVED_ITEM_FIELD_NAMES } from \"../core/extensions/item-fields.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport type {\n CommanderOptionAliasContract,\n CommanderOptionRegistrationContract,\n} from \"./cli-contracts.js\";\nexport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n CLAIM_FLAG_CONTRACTS,\n CLOSE_FLAG_CONTRACTS,\n CLOSE_MANY_FLAG_CONTRACTS,\n CLOSE_TASK_FLAG_CONTRACTS,\n COMMENTS_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONFIG_FLAG_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n COPY_FLAG_CONTRACTS,\n CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DELETE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n DOCS_FLAG_CONTRACTS,\n EVAL_FLAG_CONTRACTS,\n EXTENSION_ACTIVATE_FLAG_CONTRACTS,\n EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,\n EXTENSION_ADOPT_FLAG_CONTRACTS,\n EXTENSION_CATALOG_FLAG_CONTRACTS,\n EXTENSION_DEACTIVATE_FLAG_CONTRACTS,\n EXTENSION_DESCRIBE_FLAG_CONTRACTS,\n EXTENSION_DOCTOR_FLAG_CONTRACTS,\n EXTENSION_EXPLORE_FLAG_CONTRACTS,\n EXTENSION_FLAG_CONTRACTS,\n EXTENSION_INIT_FLAG_CONTRACTS,\n EXTENSION_INSTALL_FLAG_CONTRACTS,\n EXTENSION_MANAGE_FLAG_CONTRACTS,\n EXTENSION_RELOAD_FLAG_CONTRACTS,\n EXTENSION_SCOPE_FLAG_CONTRACTS,\n EXTENSION_UNINSTALL_FLAG_CONTRACTS,\n FILES_FLAG_CONTRACTS,\n FOCUS_FLAG_CONTRACTS,\n GC_FLAG_CONTRACTS,\n GET_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n HISTORY_COMPACT_FLAG_CONTRACTS,\n HISTORY_FLAG_CONTRACTS,\n HISTORY_REDACT_FLAG_CONTRACTS,\n HISTORY_REPAIR_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n INSTALL_FLAG_CONTRACTS,\n LEARNINGS_FLAG_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n MEET_FLAG_CONTRACTS,\n NEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n NEXT_FLAG_CONTRACTS,\n NOTES_FLAG_CONTRACTS,\n PACKAGE_FLAG_CONTRACTS,\n PACKAGE_INIT_FLAG_CONTRACTS,\n PAUSE_TASK_FLAG_CONTRACTS,\n PLAN_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n PM_EXTENSION_CAPABILITY_CONTRACTS,\n PM_EXTENSION_POLICY_MODE_CONTRACTS,\n PM_EXTENSION_POLICY_SURFACE_CONTRACTS,\n PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,\n PM_EXTENSION_SERVICE_NAME_CONTRACTS,\n PM_EXTENSION_TRUST_MODE_CONTRACTS,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,\n PM_TOOL_ACTIONS,\n PM_TOOL_ACTION_PARAMETER_CONTRACTS,\n PM_TOOL_PARAMETERS_SCHEMA,\n PM_TOOL_PARAMETERS_SCHEMA_MAJOR,\n PM_TOOL_PARAMETERS_SCHEMA_VERSION,\n PROFILE_FLAG_CONTRACTS,\n REINDEX_FLAG_CONTRACTS,\n RELEASE_FLAG_CONTRACTS,\n REMIND_FLAG_CONTRACTS,\n RESTORE_FLAG_CONTRACTS,\n SCHEMA_FLAG_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_FLAG_CONTRACTS,\n START_TASK_FLAG_CONTRACTS,\n STATS_FLAG_CONTRACTS,\n SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,\n TELEMETRY_FLAG_CONTRACTS,\n TEST_ALL_FLAG_CONTRACTS,\n TEST_FLAG_CONTRACTS,\n TEST_RUNS_FLAG_CONTRACTS,\n TOOL_ACTIVITY_OPTION_CONTRACTS,\n TOOL_AGGREGATE_OPTION_CONTRACTS,\n TOOL_CALENDAR_OPTION_CONTRACTS,\n TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_CONTEXT_OPTION_CONTRACTS,\n TOOL_CREATE_OPTION_CONTRACTS,\n TOOL_DEPS_OPTION_CONTRACTS,\n TOOL_LIST_FILTER_OPTION_CONTRACTS,\n TOOL_SEARCH_FILTER_OPTION_CONTRACTS,\n TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,\n TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_UPDATE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n UPGRADE_FLAG_CONTRACTS,\n compactFlagAliasContracts,\n isPmExtensionCapabilityContract,\n isPmExtensionPolicyModeContract,\n isPmExtensionPolicySurfaceContract,\n isPmExtensionServiceNameContract,\n isPmToolAction,\n readFirstStringFromCommanderOptions,\n readFirstValueFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n resolveSubcommandFlagContractsForCommand,\n toCompletionFlagString,\n withFlagAliasMetadata,\n} from \"./cli-contracts.js\";\nexport type {\n CliFlagContract,\n PmActionSchemaContract,\n PmExtensionCapabilityContract,\n PmExtensionPolicyModeContract,\n PmExtensionPolicySurfaceContract,\n PmExtensionSandboxProfileContract,\n PmExtensionServiceNameContract,\n PmExtensionTrustModeContract,\n PmToolAction,\n ToolOptionFlagContract,\n} from \"./cli-contracts.js\";\nexport * from \"./compose.js\";\nexport * from \"./context-relevance.js\";\nexport * from \"./pagination.js\";\nexport type {\n PlanCommandOptions,\n PlanCommandResult,\n PlanDispatchInput,\n PlanResultPlan,\n PlanShowDepth,\n PlanStepSummary,\n PlanSubcommand,\n PlanTemplateName,\n} from \"../cli/commands/plan.js\";\nexport {\n PLAN_SHOW_DEPTH_VALUES,\n PLAN_SUBCOMMANDS,\n PLAN_TEMPLATE_NAMES,\n} from \"../cli/commands/plan.js\";\nexport * from \"./define.js\";\nexport {\n BASELINE_ITEM_FORMAT_VERSION,\n BUILTIN_ITEM_TYPE_VALUES,\n CONFIDENCE_TEXT_VALUES,\n CURRENT_ITEM_FORMAT_VERSION,\n DEPENDENCY_KIND_VALUES,\n EXIT_CODE,\n ISSUE_SEVERITY_VALUES,\n ITEM_TYPE_VALUES,\n PM_CLI_EXPECTED_ERROR_NAME,\n PmCliError,\n PmClient,\n RISK_VALUES,\n STATUS_VALUES,\n acquireLock,\n appendHistoryEntry,\n canonicalDocument,\n classifyItemFormatVersion,\n clearWorkspaceContractsCache,\n commitImportedItem,\n createHistoryEntry,\n createPmCliExpectedError,\n effectiveItemFormatVersion,\n emptyImportedDocument,\n ensureTrackerInitialized,\n generateItemId,\n getActiveExtensionRegistrations,\n getContracts,\n getHistoryPath,\n getItemPath,\n getSettingsPath,\n getWorkspaceContracts,\n isPmCliExpectedError,\n isTimestampLiteral,\n listAllItemMetadata,\n loadCreateTemplateOptions,\n locateItem,\n normalizeItemMetadata,\n normalizeItemFormatVersion,\n normalizeItemId,\n normalizeRawItemId,\n normalizeStatusInput,\n nowIso,\n parseTags,\n pathExists,\n readBooleanOption,\n readCsvListOption,\n readFileIfExists,\n readLocatedItem,\n readRequiredString,\n readSettings,\n readStringOption,\n removeFileIfExists,\n renderCalendarMarkdown,\n renderCalendarToon,\n renderGuideMarkdown,\n resolveCalendarOutputFormat,\n resolveGuideOutputFormat,\n resolveItemTypeRegistry,\n resolvePmRoot,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n runAction,\n runActiveOnReadHooks,\n runActiveOnWriteHooks,\n runCalendar,\n runCompletion,\n runGuide,\n runReindex,\n runSearch,\n runTemplatesList,\n runTemplatesSave,\n runTemplatesShow,\n runTestRunsList,\n runTestRunsLogs,\n runTestRunsResume,\n runTestRunsStatus,\n runTestRunsStop,\n scanItemFormatVersions,\n selectImportAuthor,\n serializeItemDocument,\n splitFrontMatter,\n toEstimatedMinutesValue,\n toImportBoolean,\n toImportConfidence,\n toImportInteger,\n toImportLinkedDocs,\n toImportLinkedFiles,\n toImportLinkedTests,\n toImportLogEntries,\n toImportNormalizedEnum,\n toImportNumberMap,\n toImportPriority,\n toImportStatus,\n toImportStringList,\n toImportStringMap,\n toImportTags,\n toNonEmptyImportString,\n writeFileAtomic,\n aggregate,\n append,\n claim,\n claimNext,\n close,\n closeTask,\n comments,\n config,\n context,\n copy,\n create,\n deleteItem,\n deps,\n docs,\n extension,\n extensionActivate,\n extensionDeactivate,\n extensionList,\n files,\n filesDiscover,\n focus,\n gc,\n get,\n health,\n init,\n learnings,\n list,\n next,\n notes,\n packageActivate,\n packageCatalog,\n packageDeactivate,\n packageDescribe,\n packageDoctor,\n packageInstall,\n packageLifecycle,\n packageList,\n packageManage,\n packageReload,\n packageUninstall,\n pauseTask,\n profile,\n profileApply,\n profileLint,\n profileList,\n profileShow,\n release,\n restore,\n schema,\n schemaAddField,\n schemaAddStatus,\n schemaAddType,\n schemaApplyPreset,\n schemaInferTypes,\n schemaList,\n schemaListFields,\n schemaRemoveField,\n schemaRemoveStatus,\n schemaRemoveType,\n schemaShow,\n schemaShowField,\n schemaShowStatus,\n search,\n startTask,\n stats,\n update,\n upgrade,\n validate,\n type AggregateOptions,\n type AggregateResult,\n type AggregateRow,\n type AppendCommandOptions,\n type AppendResult,\n type BlockerEntry,\n type CalendarOptions,\n type CalendarResult,\n type ClaimResult,\n type CloseResult,\n type CloseTaskResult,\n type CommitImportedItemParams,\n type CommitImportedItemResult,\n type CommentsCommandOptions,\n type CommentsResult,\n type ConfigCommandOptions,\n type ConfigResult,\n type CompletionResult,\n type CompletionShell,\n type ContractsCommandOptions,\n type ContractsResult,\n type ContextFocusItem,\n type ContextOptions,\n type ContextOutputFormat,\n type ContextResult,\n type CopyResult,\n type CreatePmCliExpectedErrorOptions,\n type CreateResult,\n type CreateTemplateOptions,\n type Dependency,\n type DeleteResult,\n type DepsCommandOptions,\n type DepsResult,\n type DocsCommandOptions,\n type DocsResult,\n type ExtensionCommandOptions,\n type ExtensionCommandResult,\n type FilesCommandOptions,\n type FilesDiscoverOptions,\n type FilesDiscoverResult,\n type FilesResult,\n type FocusResult,\n type GcCommandOptions,\n type GcResult,\n type GetContractsOptions,\n type GetOptions,\n type GetResult,\n type GuideDepth,\n type GuideOptions,\n type GuideOutputFormat,\n type GuideResult,\n type HealthResult,\n type ImportLinkedScope,\n type InitCommandOptions,\n type InitResult,\n type ItemFormatVersionScanEntry,\n type ItemFormatVersionScanResult,\n type ItemFormatVersionStatus,\n type LearningsCommandOptions,\n type LearningsResult,\n type LinkedDoc,\n type LinkedFile,\n type LinkedTest,\n type ListedItem,\n type ListCompactResult,\n type ListOptions,\n type ListResult,\n type ListSortField,\n type ListSortOrder,\n type ListVerboseResult,\n type LogNote,\n type NextActionableItem,\n type NextBlockerRef,\n type NextOptions,\n type NextOutputFormat,\n type NextRecommendation,\n type NextResult,\n type NotesCommandOptions,\n type NotesResult,\n type PackageCommandOptions,\n type PackageCommandResult,\n type PauseTaskResult,\n type PmActionInput,\n type PmActionName,\n type PmActionOptions,\n type PmClientFullMutationOptions,\n type PmClientMutationOptions,\n type PmClientOptions,\n type PmClientRunArgs,\n type PmCliExpectedError,\n type ProfileApplyCommandOptions,\n type ProfileApplyResult,\n type ProfileLintResult,\n type ProfileListResult,\n type ProfileResult,\n type ProfileShowResult,\n type ProfileSubcommand,\n type ReindexOptions,\n type ReindexResult,\n type ReleaseResult,\n type RestoreResult,\n type RunHealthOptions,\n type SchemaAddFieldCommandOptions,\n type SchemaAddFieldResult,\n type SchemaAddStatusCommandOptions,\n type SchemaAddStatusResult,\n type SchemaAddTypeCommandOptions,\n type SchemaAddTypeInferCommandOptions,\n type SchemaAddTypeInferResult,\n type SchemaAddTypeResult,\n type SchemaApplyPresetCommandOptions,\n type SchemaApplyPresetResult,\n type SchemaInspectResult,\n type SchemaListFieldsResult,\n type SchemaListResult,\n type SchemaRemoveFieldCommandOptions,\n type SchemaRemoveFieldResult,\n type SchemaRemoveStatusCommandOptions,\n type SchemaRemoveStatusResult,\n type SchemaRemoveTypeCommandOptions,\n type SchemaRemoveTypeResult,\n type SchemaShowFieldResult,\n type SchemaShowResult,\n type SchemaShowStatusResult,\n type SchemaResult,\n type SchemaSubcommand,\n type SearchCompactResult,\n type SearchHit,\n type SearchHitHighlight,\n type SearchMatchMode,\n type SearchOptions,\n type ClaimNextOptions,\n type SearchResult,\n type SearchResultItem,\n type SearchVerboseResult,\n type StartTaskResult,\n type StatsCommandOptions,\n type StatsResult,\n type TemplatesListResult,\n type TemplatesSaveResult,\n type TemplatesShowResult,\n type TestRunsListCommandOptions,\n type TestRunsLogsCommandOptions,\n type TestRunsResumeCommandOptions,\n type TestRunsStopCommandOptions,\n type ToImportLinkedArtifactsOptions,\n type ToImportLinkedTestsOptions,\n type ToImportLogEntriesOptions,\n type UpdateResult,\n type UpgradeCommandOptions,\n type UpgradeResult,\n type ValidateCommandOptions,\n type ValidateResult,\n type WorkspaceContracts,\n type WorkspaceContractsOptions,\n} from \"./runtime.js\";\nexport {\n BUILTIN_PROFILES,\n listProfiles,\n normalizeProfileName,\n PROFILE_NAMES,\n resolveProfile,\n type ProfileConfigEntry,\n type ProfileName,\n type ProfilePackageRecommendation,\n type ProfileTemplateEntry,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ProjectProfileRegistrationInput,\n} from \"../core/profile/profile-presets.js\";\nexport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileComponentChange,\n type ProfileConfigChange,\n type ProfileConfigPlan,\n type ProfileCurrentState,\n type ProfilePackagePlan,\n type ProfileSchemaPlan,\n type ProfileTemplateChange,\n type ProfileTemplatePlan,\n type ProfileWorkflowChange,\n type ProfileWorkflowPlan,\n} from \"../core/profile/profile-plan.js\";\nexport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n type ProjectProfileDescription,\n type ProjectProfilePackageSummary,\n} from \"../core/profile/profile-describe.js\";\nexport {\n lintProjectProfile,\n PROFILE_LINT_CODES,\n PROFILE_LINT_DIMENSIONS,\n type ProfileLintCode,\n type ProfileLintDimension,\n type ProfileLintSeverity,\n type ProjectProfileLintFinding,\n type ProjectProfileLintReport,\n} from \"../core/profile/profile-lint.js\";\nexport {\n assertExtensionBlueprint,\n assertExtensionCapabilityUsage,\n assertExtensionDeactivated,\n assertExtensionManifestCompatible,\n assertExtensionManifestMatchesBlueprint,\n assertExtensionPreflight,\n assertPackageManifest,\n assertProjectProfile,\n assertRegisteredCommandContract,\n assertRegisteredCommandOverride,\n assertRegisteredExporter,\n assertRegisteredFlags,\n assertRegisteredHook,\n assertRegisteredImporter,\n assertRegisteredItemField,\n assertRegisteredItemType,\n assertRegisteredMigration,\n assertRegisteredParserOverride,\n assertRegisteredPreflightOverride,\n assertRegisteredProfile,\n assertRegisteredRendererOverride,\n assertRegisteredSearchProvider,\n assertRegisteredServiceOverride,\n assertRegisteredVectorStoreAdapter,\n activateExtensionForTest,\n createExtensionTestHarness,\n deactivateExtensionForTest,\n describeExtensionActivation,\n runRegisteredCommandForTest,\n runRegisteredCommandOverrideForTest,\n runRegisteredExporterForTest,\n runRegisteredHookForTest,\n runRegisteredImporterForTest,\n runRegisteredMigrationForTest,\n runRegisteredParserOverrideForTest,\n runRegisteredPreflightOverrideForTest,\n runRegisteredRendererOverrideForTest,\n runRegisteredSearchProviderForTest,\n runRegisteredServiceOverrideForTest,\n runRegisteredVectorStoreAdapterForTest,\n type ActivateExtensionForTestOptions,\n type AssertProjectProfileOptions,\n type DeactivateExtensionForTestOptions,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n type RenderExtensionHarnessMarkdownOptions,\n type RunRegisteredCommandForTestOptions,\n type RunRegisteredExporterForTestOptions,\n type RunRegisteredHookForTestOptions,\n type RunRegisteredImporterForTestOptions,\n type RunRegisteredMigrationForTestOptions,\n type RunRegisteredSearchProviderForTestOptions,\n type RunRegisteredVectorStoreAdapterForTestOptions,\n type SearchProviderOperationContexts,\n type SearchProviderOperationResults,\n type VectorStoreAdapterOperationContexts,\n type VectorStoreAdapterOperationResults,\n type ExtensionCapabilityUsageAssertion,\n type ExtensionCapabilityUsageExpectation,\n type ExtensionDeactivationExpectation,\n type ExtensionManifestBlueprintMatch,\n type ExtensionTestHarness,\n type PackageManifestExpectation,\n type PackageManifestResourceExpectation,\n type RegisteredCommandContractAssertion,\n type RegisteredCommandContractExpectation,\n type RegisteredCommandOverrideExpectation,\n type RegisteredExporterExpectation,\n type RegisteredFlagsExpectation,\n type RegisteredHookExpectation,\n type RegisteredHookKind,\n type RegisteredImporterExpectation,\n type RegisteredItemFieldAssertion,\n type RegisteredItemFieldExpectation,\n type RegisteredItemTypeAssertion,\n type RegisteredItemTypeExpectation,\n type RegisteredMigrationExpectation,\n type RegisteredParserOverrideExpectation,\n type RegisteredPreflightOverrideExpectation,\n type RegisteredProfileAssertion,\n type RegisteredProfileExpectation,\n type RegisteredRendererOverrideExpectation,\n type RegisteredSearchProviderExpectation,\n type RegisteredServiceOverrideExpectation,\n type RegisteredVectorStoreAdapterExpectation,\n} from \"./testing.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\n/** Restricts extension capability values accepted by command, SDK, and storage contracts. */\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/** Canonical extension governance policy modes and registration surfaces. */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\n/** Public contract for extension policy surfaces, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\n/** Public contract for extension trust modes, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\n/** Public contract for extension sandbox profiles, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\n/** Restricts extension policy mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\n/** Restricts extension policy surface values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\n/** Restricts extension trust mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\n/** Restricts extension sandbox profile values accepted by command, SDK, and storage contracts. */\nexport type ExtensionSandboxProfile =\n (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/** Versioned capability contract metadata emitted by runtime diagnostics. */\nexport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n};\n\n/** Least-privilege capability reconciliation helpers: map declared capabilities against the registration surfaces a package actually exercises at activation. */\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"../core/extensions/capability-usage.js\";\n\n/**\n * Render an extension/package activation summary\n * ({@link describeExtensionActivation} / {@link describeExtensionBlueprint}) to a\n * deterministic Markdown reference document — the author-facing *render* leg of\n * the describe verb, for drift-free package READMEs.\n */\nexport {\n renderExtensionSurfaceMarkdown,\n type ExtensionSurfaceMarkdownOptions,\n} from \"../core/extensions/activation-summary-markdown.js\";\n\nexport type {\n AfterCommandAffectedItem,\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandHandlerResult,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDeactivationFailure,\n ExtensionDeactivationOptions,\n ExtensionDeactivationResult,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionHookRegistry,\n ExtensionSelfIdentity,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionManifestEngines,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n ImportExportRegistrationOptions,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type {\n ItemDocument,\n ItemMetadata,\n ItemStatus,\n ItemType,\n PmSettings,\n} from \"../types/index.js\";\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/**\n * @module sdk/define\n *\n * Authoring-time typed builders for every extension registration surface.\n *\n * These `define*` helpers are the third leg of the SDK ergonomics tripod:\n * {@link ../core/extensions/loader.js#ExtensionApi | `api.register*`} registers\n * a definition at activation, the `assert*`/`run*` testing helpers verify and\n * invoke it, and these builders let authors *write* the definition with full\n * type-checking and editor inference before it ever reaches `activate`.\n *\n * Every builder is a zero-cost identity function that returns its argument\n * unchanged — exactly like the SDK's {@link ./index.js#defineExtension} and the\n * wider `defineConfig`/`defineComponent` ecosystem convention. Extensions are\n * authored fully in TypeScript (ADR pm-2c28); these builders are where that type\n * safety is anchored at the definition site. Their value is entirely at the type\n * level:\n *\n * - A bare `const cmd = { ... }` satisfies the registration type only\n * structurally and widens its literals; `const cmd = defineCommand({ ... })`\n * checks the object against the contract *and* preserves the narrow literal\n * type, while inferring the nested handler's `context` parameter from the\n * builder signature.\n * - Definitions can be colocated, exported, reused, and unit-tested apart from\n * the `activate` call instead of being trapped as inline literals.\n *\n * Object-definition builders use a generic constraint (`<T extends Def>`) so the\n * narrow literal type survives the round-trip, mirroring `defineExtension`.\n * Function-definition builders are intentionally non-generic: a generic\n * constrained to a whole function type suppresses contextual typing of a bare\n * arrow's parameter (it would fall back to implicit `any`), whereas the\n * non-generic signature lets TypeScript type the handler parameter from the\n * declared function type.\n */\nimport type {\n AfterCommandHook,\n BeforeCommandHook,\n CommandDefinition,\n CommandOverride,\n Exporter,\n ExtensionManifest,\n FlagDefinition,\n Importer,\n OnIndexHook,\n OnReadHook,\n OnWriteHook,\n ParserOverride,\n PreflightOverride,\n RendererOverride,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SearchProviderDefinition,\n ServiceOverride,\n VectorStoreAdapterDefinition,\n} from \"../core/extensions/loader.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\n\n/**\n * Type an extension's in-module manifest mirror (the `manifest` export / field).\n *\n * Completes the `define*` family: the manifest is the one authoring surface that\n * otherwise had no builder. Contract-checks the object against\n * {@link ExtensionManifest} where it is authored, catching a missing required\n * field or a mistyped key at edit time instead of at load time. Pair with\n * {@link ./compose.js#deriveExtensionCapabilities | `deriveExtensionCapabilities`}\n * to keep `capabilities` matched to the surfaces the extension actually registers.\n */\nexport function defineExtensionManifest<TManifest extends ExtensionManifest>(\n manifest: TManifest,\n): TManifest {\n return manifest;\n}\n\n/**\n * Type a project-profile definition for the profile registry.\n *\n * A profile bundles item types, statuses, fields, per-type workflows, config\n * knobs, create templates, and package recommendations into one declarative\n * archetype that `pm profile apply` stages idempotently. This builder checks the\n * object against {@link ProjectProfileDefinition} where it is authored — catching\n * an invalid field type or a malformed workflow at edit time — while preserving\n * the literal `name`/`types`/`statuses` so a package's archetype stays strongly\n * typed at the definition site, mirroring {@link defineItemType}. It is the\n * authoring anchor a first-party or third-party profile package builds on.\n */\nexport function defineProjectProfile<TProfile extends ProjectProfileDefinition>(\n profile: TProfile,\n): TProfile {\n return profile;\n}\n\n/**\n * Type a command definition for `api.registerCommand(definition)`.\n *\n * Checks the object against {@link CommandDefinition} and infers the `run`\n * handler's `context` parameter while preserving the literal `name`/`action`\n * types. Pass the result straight to `registerCommand`, or export it so the\n * command can be invoked in tests via `runRegisteredCommandForTest`.\n */\nexport function defineCommand<TDefinition extends CommandDefinition>(\n definition: TDefinition,\n): TDefinition {\n return definition;\n}\n\n/**\n * Type a single flag definition for a `api.registerFlags(command, flags)` array.\n *\n * Authors compose builders into the array\n * (`api.registerFlags(\"list\", [defineFlag({ long: \"--mine\" })])`) to get\n * per-flag contract checking — `value_type`, `list`, and `default` included —\n * instead of validating a loosely-typed literal array all at once.\n */\nexport function defineFlag<TFlag extends FlagDefinition>(flag: TFlag): TFlag {\n return flag;\n}\n\n/**\n * Type a custom item-type definition for `api.registerItemTypes([...])`.\n *\n * Preserves the literal `name`/`folder`/`aliases` so a project archetype's\n * domain types stay strongly typed where the definition is declared and reused.\n */\nexport function defineItemType<TType extends SchemaItemTypeDefinition>(\n type: TType,\n): TType {\n return type;\n}\n\n/**\n * Type a custom item-metadata field definition for `api.registerItemFields([...])`.\n *\n * Checks `name`/`type`/`optional` against {@link SchemaFieldDefinition} while\n * keeping the field's extra metadata (the contract carries an index signature)\n * intact.\n */\nexport function defineItemField<TField extends SchemaFieldDefinition>(\n field: TField,\n): TField {\n return field;\n}\n\n/**\n * Type a schema migration definition for `api.registerMigration(definition)`.\n *\n * Preserves the literal `id` and, when `run` is provided, infers the migration\n * runner's context, so the same definition can be registered and later exercised\n * through `runRegisteredMigrationForTest`.\n */\nexport function defineMigration<TMigration extends SchemaMigrationDefinition>(\n migration: TMigration,\n): TMigration {\n return migration;\n}\n\n/**\n * Type a search-provider definition for `api.registerSearchProvider(provider)`.\n *\n * Infers the `query`/`embed`/`embedBatch` operation contexts and result shapes\n * so a custom retrieval backend is type-checked at the definition site and\n * reusable in `runRegisteredSearchProviderForTest`.\n */\nexport function defineSearchProvider<\n TProvider extends SearchProviderDefinition,\n>(provider: TProvider): TProvider {\n return provider;\n}\n\n/**\n * Type a vector-store adapter definition for `api.registerVectorStoreAdapter(adapter)`.\n *\n * Infers the `query`/`upsert`/`delete` operation contexts so a package that owns\n * its own semantic index storage gets contract checking before activation and a\n * definition it can drive through `runRegisteredVectorStoreAdapterForTest`.\n */\nexport function defineVectorStoreAdapter<\n TAdapter extends VectorStoreAdapterDefinition,\n>(adapter: TAdapter): TAdapter {\n return adapter;\n}\n\n/**\n * Type a command-override handler for `api.registerCommand(command, override)`.\n *\n * The non-generic signature lets TypeScript contextually type the override's\n * `context` parameter from {@link CommandOverride}, so a bare arrow authored in\n * a `.js` package still gets a fully-typed argument.\n */\nexport function defineCommandOverride(\n override: CommandOverride,\n): CommandOverride {\n return override;\n}\n\n/**\n * Type a parser-override handler for `api.registerParser(command, override)`.\n *\n * Contextually types the `context` parameter and the returned\n * {@link ParserOverride} delta so an argument-rewriting override is checked\n * where it is written.\n */\nexport function defineParserOverride(override: ParserOverride): ParserOverride {\n return override;\n}\n\n/**\n * Type a preflight-override handler for `api.registerPreflight(override)`.\n *\n * Contextually types the `context` parameter and the returned gate decision so a\n * package's pre-run validation override is checked at the definition site.\n */\nexport function definePreflightOverride(\n override: PreflightOverride,\n): PreflightOverride {\n return override;\n}\n\n/**\n * Type a service-override handler for `api.registerService(service, override)`.\n *\n * Contextually types the `context` parameter from {@link ServiceOverride} so a\n * package overriding a built-in service (output formatting, embeddings, and the\n * like) keeps its handler argument typed without an explicit annotation.\n */\nexport function defineServiceOverride(\n override: ServiceOverride,\n): ServiceOverride {\n return override;\n}\n\n/**\n * Type a renderer-override handler for `api.registerRenderer(format, renderer)`.\n *\n * Contextually types the `context` parameter and the `string | null | undefined`\n * return contract so a custom output renderer is checked where it is authored.\n */\nexport function defineRendererOverride(\n renderer: RendererOverride,\n): RendererOverride {\n return renderer;\n}\n\n/**\n * Type an importer handler for `api.registerImporter(name, importer, options)`.\n *\n * Contextually types the {@link Importer} `context` (registration, args,\n * options, pm root) so the bridge from an external system into the pm context\n * graph is type-checked and reusable in `runRegisteredImporterForTest`.\n */\nexport function defineImporter(importer: Importer): Importer {\n return importer;\n}\n\n/**\n * Type an exporter handler for `api.registerExporter(name, exporter, options)`.\n *\n * Contextually types the {@link Exporter} `context` so the bridge from the pm\n * context graph out to an external system is checked at the definition site and\n * reusable in `runRegisteredExporterForTest`.\n */\nexport function defineExporter(exporter: Exporter): Exporter {\n return exporter;\n}\n\n/**\n * Type a `before_command` hook for `api.hooks.beforeCommand(hook)`.\n *\n * Contextually types the {@link BeforeCommandHook} `context` so a hook that\n * inspects or annotates a command before it runs keeps its argument typed when\n * authored as a standalone, exportable, testable value.\n */\nexport function defineBeforeCommandHook(\n hook: BeforeCommandHook,\n): BeforeCommandHook {\n return hook;\n}\n\n/**\n * Type an `after_command` hook for `api.hooks.afterCommand(hook)`.\n *\n * Contextually types the {@link AfterCommandHook} `context` — including the\n * `affected` items pm mutated — so the natural place to react to every change\n * (\"project management = context management\") is checked where it is written.\n */\nexport function defineAfterCommandHook(\n hook: AfterCommandHook,\n): AfterCommandHook {\n return hook;\n}\n\n/**\n * Type an `on_write` hook for `api.hooks.onWrite(hook)`.\n *\n * Contextually types the {@link OnWriteHook} `context` so a hook reacting to\n * item persistence keeps its argument typed without an explicit annotation.\n */\nexport function defineOnWriteHook(hook: OnWriteHook): OnWriteHook {\n return hook;\n}\n\n/**\n * Type an `on_read` hook for `api.hooks.onRead(hook)`.\n *\n * Contextually types the {@link OnReadHook} `context` so a hook augmenting items\n * as they are read is type-checked at the definition site.\n */\nexport function defineOnReadHook(hook: OnReadHook): OnReadHook {\n return hook;\n}\n\n/**\n * Type an `on_index` hook for `api.hooks.onIndex(hook)`.\n *\n * Contextually types the {@link OnIndexHook} `context` so a hook participating\n * in index/search refresh keeps its argument typed even without TypeScript\n * annotations.\n */\nexport function defineOnIndexHook(hook: OnIndexHook): OnIndexHook {\n return hook;\n}\n", "/**\n * @module sdk/index\n *\n * Defines public SDK APIs and package-author helpers for Index.\n */\nexport {\n isErrnoError,\n limitAnnotationEntries,\n parseAnnotationTextInput,\n readAnnotationEntries,\n resolveAnnotationInput,\n resolveAnnotationIndex,\n runAnnotationCommand,\n wrapOwnershipConflict,\n type AnnotationCommandConfig,\n type AnnotationCommandOptions,\n type AnnotationCommandResult,\n type AnnotationEntry,\n type AnnotationInput,\n type AnnotationSourceOptions,\n type OwnershipConflictGuidance,\n} from \"./annotations.js\";\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../core/extensions/loader.js\";\nexport { RESERVED_ITEM_FIELD_NAMES } from \"../core/extensions/item-fields.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport type {\n CommanderOptionAliasContract,\n CommanderOptionRegistrationContract,\n} from \"./cli-contracts.js\";\nexport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n CLAIM_FLAG_CONTRACTS,\n CLOSE_FLAG_CONTRACTS,\n CLOSE_MANY_FLAG_CONTRACTS,\n CLOSE_TASK_FLAG_CONTRACTS,\n COMMENTS_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONFIG_FLAG_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n COPY_FLAG_CONTRACTS,\n CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DELETE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n DOCS_FLAG_CONTRACTS,\n EVAL_FLAG_CONTRACTS,\n EXTENSION_ACTIVATE_FLAG_CONTRACTS,\n EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,\n EXTENSION_ADOPT_FLAG_CONTRACTS,\n EXTENSION_CATALOG_FLAG_CONTRACTS,\n EXTENSION_DEACTIVATE_FLAG_CONTRACTS,\n EXTENSION_DESCRIBE_FLAG_CONTRACTS,\n EXTENSION_DOCTOR_FLAG_CONTRACTS,\n EXTENSION_EXPLORE_FLAG_CONTRACTS,\n EXTENSION_FLAG_CONTRACTS,\n EXTENSION_INIT_FLAG_CONTRACTS,\n EXTENSION_INSTALL_FLAG_CONTRACTS,\n EXTENSION_MANAGE_FLAG_CONTRACTS,\n EXTENSION_RELOAD_FLAG_CONTRACTS,\n EXTENSION_SCOPE_FLAG_CONTRACTS,\n EXTENSION_UNINSTALL_FLAG_CONTRACTS,\n FILES_FLAG_CONTRACTS,\n FOCUS_FLAG_CONTRACTS,\n GC_FLAG_CONTRACTS,\n GET_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n HISTORY_COMPACT_FLAG_CONTRACTS,\n HISTORY_FLAG_CONTRACTS,\n HISTORY_REDACT_FLAG_CONTRACTS,\n HISTORY_REPAIR_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n INSTALL_FLAG_CONTRACTS,\n LEARNINGS_FLAG_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n MEET_FLAG_CONTRACTS,\n NEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n NEXT_FLAG_CONTRACTS,\n NOTES_FLAG_CONTRACTS,\n PACKAGE_FLAG_CONTRACTS,\n PACKAGE_INIT_FLAG_CONTRACTS,\n PAUSE_TASK_FLAG_CONTRACTS,\n PLAN_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n PM_EXTENSION_CAPABILITY_CONTRACTS,\n PM_EXTENSION_POLICY_MODE_CONTRACTS,\n PM_EXTENSION_POLICY_SURFACE_CONTRACTS,\n PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,\n PM_EXTENSION_SERVICE_NAME_CONTRACTS,\n PM_EXTENSION_TRUST_MODE_CONTRACTS,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,\n PM_TOOL_ACTIONS,\n PM_TOOL_ACTION_PARAMETER_CONTRACTS,\n PM_TOOL_PARAMETERS_SCHEMA,\n PM_TOOL_PARAMETERS_SCHEMA_MAJOR,\n PM_TOOL_PARAMETERS_SCHEMA_VERSION,\n PROFILE_FLAG_CONTRACTS,\n REINDEX_FLAG_CONTRACTS,\n RELEASE_FLAG_CONTRACTS,\n REMIND_FLAG_CONTRACTS,\n RESTORE_FLAG_CONTRACTS,\n SCHEMA_FLAG_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_FLAG_CONTRACTS,\n START_TASK_FLAG_CONTRACTS,\n STATS_FLAG_CONTRACTS,\n SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,\n TELEMETRY_FLAG_CONTRACTS,\n TEST_ALL_FLAG_CONTRACTS,\n TEST_FLAG_CONTRACTS,\n TEST_RUNS_FLAG_CONTRACTS,\n TOOL_ACTIVITY_OPTION_CONTRACTS,\n TOOL_AGGREGATE_OPTION_CONTRACTS,\n TOOL_CALENDAR_OPTION_CONTRACTS,\n TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_CONTEXT_OPTION_CONTRACTS,\n TOOL_CREATE_OPTION_CONTRACTS,\n TOOL_DEPS_OPTION_CONTRACTS,\n TOOL_LIST_FILTER_OPTION_CONTRACTS,\n TOOL_SEARCH_FILTER_OPTION_CONTRACTS,\n TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,\n TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_UPDATE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n UPGRADE_FLAG_CONTRACTS,\n compactFlagAliasContracts,\n isPmExtensionCapabilityContract,\n isPmExtensionPolicyModeContract,\n isPmExtensionPolicySurfaceContract,\n isPmExtensionServiceNameContract,\n isPmToolAction,\n readFirstStringFromCommanderOptions,\n readFirstValueFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n resolveSubcommandFlagContractsForCommand,\n toCompletionFlagString,\n withFlagAliasMetadata,\n} from \"./cli-contracts.js\";\nexport type {\n CliFlagContract,\n PmActionSchemaContract,\n PmExtensionCapabilityContract,\n PmExtensionPolicyModeContract,\n PmExtensionPolicySurfaceContract,\n PmExtensionSandboxProfileContract,\n PmExtensionServiceNameContract,\n PmExtensionTrustModeContract,\n PmToolAction,\n ToolOptionFlagContract,\n} from \"./cli-contracts.js\";\nexport * from \"./compose.js\";\nexport * from \"./context-relevance.js\";\nexport * from \"./context-packing.js\";\nexport * from \"./context-usage.js\";\nexport {\n collectDanglingDependencyReferences,\n runDeps,\n type DanglingDependencyReference,\n type DanglingDependencyReferenceSummary,\n type DependencyReferenceHolder,\n type DepsCollapseMode,\n type DepsFormat,\n type DepsGraphEdge,\n type DepsGraphNode,\n type DepsGraphResult,\n type DepsTreeNode,\n} from \"./dependencies.js\";\nexport { runDocs } from \"./docs.js\";\nexport {\n runFiles,\n runFilesDiscover,\n type FilesDiscoveryCandidate,\n} from \"./files.js\";\nexport {\n applyPathMigrations,\n applyStandaloneNote,\n artifactKey,\n dedupeLinkedArtifacts,\n ensureScope,\n expandAddGlobEntries,\n normalizeLinkedPath,\n parseAddEntries,\n parseAddGlobEntries,\n parseMigrateEntries,\n parseRemoveEntries,\n renameArtifactsResultKey,\n runLinkedArtifacts,\n sortLinkedArtifacts,\n validateLinkedPaths,\n type AddGlobEntry,\n type LinkedArtifact,\n type LinkedArtifactCommandOptions,\n type LinkedArtifactKindConfig,\n type LinkedArtifactResult,\n type LinkedPathValidation,\n type PathMigration,\n} from \"./linked-artifacts.js\";\nexport * from \"./pagination.js\";\nexport type {\n PlanCommandOptions,\n PlanCommandResult,\n PlanDispatchInput,\n PlanResultPlan,\n PlanShowDepth,\n PlanStepSummary,\n PlanSubcommand,\n PlanTemplateName,\n} from \"../cli/commands/plan.js\";\nexport {\n PLAN_SHOW_DEPTH_VALUES,\n PLAN_SUBCOMMANDS,\n PLAN_TEMPLATE_NAMES,\n} from \"../cli/commands/plan.js\";\nexport * from \"./define.js\";\nexport {\n BASELINE_ITEM_FORMAT_VERSION,\n BUILTIN_ITEM_TYPE_VALUES,\n CONFIDENCE_TEXT_VALUES,\n CURRENT_ITEM_FORMAT_VERSION,\n DEPENDENCY_KIND_VALUES,\n EXIT_CODE,\n ISSUE_SEVERITY_VALUES,\n ITEM_TYPE_VALUES,\n PM_CLI_EXPECTED_ERROR_NAME,\n PmCliError,\n PmClient,\n RISK_VALUES,\n STATUS_VALUES,\n acquireLock,\n appendHistoryEntry,\n canonicalDocument,\n classifyItemFormatVersion,\n clearWorkspaceContractsCache,\n commitImportedItem,\n createHistoryEntry,\n createPmCliExpectedError,\n effectiveItemFormatVersion,\n emptyImportedDocument,\n ensureTrackerInitialized,\n generateItemId,\n getActiveExtensionRegistrations,\n getContracts,\n getHistoryPath,\n getItemPath,\n getSettingsPath,\n getWorkspaceContracts,\n isPmCliExpectedError,\n isTimestampLiteral,\n listAllItemMetadata,\n loadCreateTemplateOptions,\n locateItem,\n normalizeItemMetadata,\n normalizeItemFormatVersion,\n normalizeItemId,\n normalizeRawItemId,\n normalizeStatusInput,\n nowIso,\n parseTags,\n pathExists,\n readBooleanOption,\n readCsvListOption,\n readFileIfExists,\n readLocatedItem,\n readRequiredString,\n readSettings,\n readStringOption,\n removeFileIfExists,\n renderCalendarMarkdown,\n renderCalendarToon,\n renderGuideMarkdown,\n resolveCalendarOutputFormat,\n resolveGuideOutputFormat,\n resolveItemTypeRegistry,\n resolvePmRoot,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n runAction,\n runActiveOnReadHooks,\n runActiveOnWriteHooks,\n runCalendar,\n runCompletion,\n runGuide,\n runReindex,\n runSearch,\n runTemplatesList,\n runTemplatesSave,\n runTemplatesShow,\n runTestRunsList,\n runTestRunsLogs,\n runTestRunsResume,\n runTestRunsStatus,\n runTestRunsStop,\n scanItemFormatVersions,\n selectImportAuthor,\n serializeItemDocument,\n splitFrontMatter,\n toEstimatedMinutesValue,\n toImportBoolean,\n toImportConfidence,\n toImportInteger,\n toImportLinkedDocs,\n toImportLinkedFiles,\n toImportLinkedTests,\n toImportLogEntries,\n toImportNormalizedEnum,\n toImportNumberMap,\n toImportPriority,\n toImportStatus,\n toImportStringList,\n toImportStringMap,\n toImportTags,\n toNonEmptyImportString,\n writeFileAtomic,\n aggregate,\n append,\n claim,\n claimNext,\n close,\n closeTask,\n comments,\n config,\n context,\n copy,\n create,\n deleteItem,\n deps,\n docs,\n extension,\n extensionActivate,\n extensionDeactivate,\n extensionList,\n files,\n filesDiscover,\n focus,\n gc,\n get,\n health,\n init,\n learnings,\n list,\n next,\n notes,\n packageActivate,\n packageCatalog,\n packageDeactivate,\n packageDescribe,\n packageDoctor,\n packageInstall,\n packageLifecycle,\n packageList,\n packageManage,\n packageReload,\n packageUninstall,\n pauseTask,\n profile,\n profileApply,\n profileLint,\n profileList,\n profileShow,\n release,\n restore,\n schema,\n schemaAddField,\n schemaAddStatus,\n schemaAddType,\n schemaApplyPreset,\n schemaInferTypes,\n schemaList,\n schemaListFields,\n schemaRemoveField,\n schemaRemoveStatus,\n schemaRemoveType,\n schemaShow,\n schemaShowField,\n schemaShowStatus,\n search,\n startTask,\n stats,\n update,\n upgrade,\n validate,\n type AggregateOptions,\n type AggregateResult,\n type AggregateRow,\n type AppendCommandOptions,\n type AppendResult,\n type BlockerEntry,\n type CalendarOptions,\n type CalendarResult,\n type ClaimResult,\n type CloseResult,\n type CloseTaskResult,\n type CommitImportedItemParams,\n type CommitImportedItemResult,\n type CommentsCommandOptions,\n type CommentsResult,\n type ConfigCommandOptions,\n type ConfigResult,\n type CompletionResult,\n type CompletionShell,\n type ContractsCommandOptions,\n type ContractsResult,\n type ContextFocusItem,\n type ContextOptions,\n type ContextOutputFormat,\n type ContextResult,\n type CopyResult,\n type CreatePmCliExpectedErrorOptions,\n type CreateResult,\n type CreateTemplateOptions,\n type Dependency,\n type DeleteResult,\n type DepsCommandOptions,\n type DepsResult,\n type DocsCommandOptions,\n type DocsResult,\n type ExtensionCommandOptions,\n type ExtensionCommandResult,\n type FilesCommandOptions,\n type FilesDiscoverOptions,\n type FilesDiscoverResult,\n type FilesResult,\n type FocusResult,\n type GcCommandOptions,\n type GcResult,\n type GetContractsOptions,\n type GetOptions,\n type GetResult,\n type GuideDepth,\n type GuideOptions,\n type GuideOutputFormat,\n type GuideResult,\n type HealthResult,\n type ImportLinkedScope,\n type InitCommandOptions,\n type InitResult,\n type ItemFormatVersionScanEntry,\n type ItemFormatVersionScanResult,\n type ItemFormatVersionStatus,\n type LearningsCommandOptions,\n type LearningsResult,\n type LinkedDoc,\n type LinkedFile,\n type LinkedTest,\n type ListedItem,\n type ListCompactResult,\n type ListOptions,\n type ListResult,\n type ListSortField,\n type ListSortOrder,\n type ListVerboseResult,\n type LogNote,\n type NextActionableItem,\n type NextBlockerRef,\n type NextOptions,\n type NextOutputFormat,\n type NextRecommendation,\n type NextResult,\n type NotesCommandOptions,\n type NotesResult,\n type PackageCommandOptions,\n type PackageCommandResult,\n type PauseTaskResult,\n type PmActionInput,\n type PmActionName,\n type PmActionOptions,\n type PmClientFullMutationOptions,\n type PmClientMutationOptions,\n type PmClientOptions,\n type PmClientRunArgs,\n type PmCliExpectedError,\n type ProfileApplyCommandOptions,\n type ProfileApplyResult,\n type ProfileLintResult,\n type ProfileListResult,\n type ProfileResult,\n type ProfileShowResult,\n type ProfileSubcommand,\n type ReindexOptions,\n type ReindexResult,\n type ReleaseResult,\n type RestoreResult,\n type RunHealthOptions,\n type SchemaAddFieldCommandOptions,\n type SchemaAddFieldResult,\n type SchemaAddStatusCommandOptions,\n type SchemaAddStatusResult,\n type SchemaAddTypeCommandOptions,\n type SchemaAddTypeInferCommandOptions,\n type SchemaAddTypeInferResult,\n type SchemaAddTypeResult,\n type SchemaApplyPresetCommandOptions,\n type SchemaApplyPresetResult,\n type SchemaInspectResult,\n type SchemaListFieldsResult,\n type SchemaListResult,\n type SchemaRemoveFieldCommandOptions,\n type SchemaRemoveFieldResult,\n type SchemaRemoveStatusCommandOptions,\n type SchemaRemoveStatusResult,\n type SchemaRemoveTypeCommandOptions,\n type SchemaRemoveTypeResult,\n type SchemaShowFieldResult,\n type SchemaShowResult,\n type SchemaShowStatusResult,\n type SchemaResult,\n type SchemaSubcommand,\n type SearchCompactResult,\n type SearchHit,\n type SearchHitHighlight,\n type SearchMatchMode,\n type SearchOptions,\n type ClaimNextOptions,\n type SearchResult,\n type SearchResultItem,\n type SearchVerboseResult,\n type StartTaskResult,\n type StatsCommandOptions,\n type StatsResult,\n type TemplatesListResult,\n type TemplatesSaveResult,\n type TemplatesShowResult,\n type TestRunsListCommandOptions,\n type TestRunsLogsCommandOptions,\n type TestRunsResumeCommandOptions,\n type TestRunsStopCommandOptions,\n type ToImportLinkedArtifactsOptions,\n type ToImportLinkedTestsOptions,\n type ToImportLogEntriesOptions,\n type UpdateResult,\n type UpgradeCommandOptions,\n type UpgradeResult,\n type ValidateCommandOptions,\n type ValidateResult,\n type WorkspaceContracts,\n type WorkspaceContractsOptions,\n} from \"./runtime.js\";\nexport {\n BUILTIN_PROFILES,\n listProfiles,\n normalizeProfileName,\n PROFILE_NAMES,\n resolveProfile,\n type ProfileConfigEntry,\n type ProfileName,\n type ProfilePackageRecommendation,\n type ProfileTemplateEntry,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ProjectProfileRegistrationInput,\n} from \"../core/profile/profile-presets.js\";\nexport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileComponentChange,\n type ProfileConfigChange,\n type ProfileConfigPlan,\n type ProfileCurrentState,\n type ProfilePackagePlan,\n type ProfileSchemaPlan,\n type ProfileTemplateChange,\n type ProfileTemplatePlan,\n type ProfileWorkflowChange,\n type ProfileWorkflowPlan,\n} from \"../core/profile/profile-plan.js\";\nexport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n type ProjectProfileDescription,\n type ProjectProfilePackageSummary,\n} from \"../core/profile/profile-describe.js\";\nexport {\n lintProjectProfile,\n PROFILE_LINT_CODES,\n PROFILE_LINT_DIMENSIONS,\n type ProfileLintCode,\n type ProfileLintDimension,\n type ProfileLintSeverity,\n type ProjectProfileLintFinding,\n type ProjectProfileLintReport,\n} from \"../core/profile/profile-lint.js\";\nexport {\n assertExtensionBlueprint,\n assertExtensionCapabilityUsage,\n assertExtensionDeactivated,\n assertExtensionManifestCompatible,\n assertExtensionManifestMatchesBlueprint,\n assertExtensionPreflight,\n assertPackageManifest,\n assertProjectProfile,\n assertRegisteredCommandContract,\n assertRegisteredCommandOverride,\n assertRegisteredExporter,\n assertRegisteredFlags,\n assertRegisteredHook,\n assertRegisteredImporter,\n assertRegisteredItemField,\n assertRegisteredItemType,\n assertRegisteredMigration,\n assertRegisteredParserOverride,\n assertRegisteredPreflightOverride,\n assertRegisteredProfile,\n assertRegisteredRendererOverride,\n assertRegisteredSearchProvider,\n assertRegisteredServiceOverride,\n assertRegisteredVectorStoreAdapter,\n activateExtensionForTest,\n createExtensionTestHarness,\n deactivateExtensionForTest,\n describeExtensionActivation,\n runRegisteredCommandForTest,\n runRegisteredCommandOverrideForTest,\n runRegisteredExporterForTest,\n runRegisteredHookForTest,\n runRegisteredImporterForTest,\n runRegisteredMigrationForTest,\n runRegisteredParserOverrideForTest,\n runRegisteredPreflightOverrideForTest,\n runRegisteredRendererOverrideForTest,\n runRegisteredSearchProviderForTest,\n runRegisteredServiceOverrideForTest,\n runRegisteredVectorStoreAdapterForTest,\n type ActivateExtensionForTestOptions,\n type AssertProjectProfileOptions,\n type DeactivateExtensionForTestOptions,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n type RenderExtensionHarnessMarkdownOptions,\n type RunRegisteredCommandForTestOptions,\n type RunRegisteredExporterForTestOptions,\n type RunRegisteredHookForTestOptions,\n type RunRegisteredImporterForTestOptions,\n type RunRegisteredMigrationForTestOptions,\n type RunRegisteredSearchProviderForTestOptions,\n type RunRegisteredVectorStoreAdapterForTestOptions,\n type SearchProviderOperationContexts,\n type SearchProviderOperationResults,\n type VectorStoreAdapterOperationContexts,\n type VectorStoreAdapterOperationResults,\n type ExtensionCapabilityUsageAssertion,\n type ExtensionCapabilityUsageExpectation,\n type ExtensionDeactivationExpectation,\n type ExtensionManifestBlueprintMatch,\n type ExtensionTestHarness,\n type PackageManifestExpectation,\n type PackageManifestResourceExpectation,\n type RegisteredCommandContractAssertion,\n type RegisteredCommandContractExpectation,\n type RegisteredCommandOverrideExpectation,\n type RegisteredExporterExpectation,\n type RegisteredFlagsExpectation,\n type RegisteredHookExpectation,\n type RegisteredHookKind,\n type RegisteredImporterExpectation,\n type RegisteredItemFieldAssertion,\n type RegisteredItemFieldExpectation,\n type RegisteredItemTypeAssertion,\n type RegisteredItemTypeExpectation,\n type RegisteredMigrationExpectation,\n type RegisteredParserOverrideExpectation,\n type RegisteredPreflightOverrideExpectation,\n type RegisteredProfileAssertion,\n type RegisteredProfileExpectation,\n type RegisteredRendererOverrideExpectation,\n type RegisteredSearchProviderExpectation,\n type RegisteredServiceOverrideExpectation,\n type RegisteredVectorStoreAdapterExpectation,\n} from \"./testing.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\n/** Restricts extension capability values accepted by command, SDK, and storage contracts. */\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/** Canonical extension governance policy modes and registration surfaces. */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\n/** Public contract for extension policy surfaces, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\n/** Public contract for extension trust modes, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\n/** Public contract for extension sandbox profiles, shared by SDK and presentation-layer consumers. */\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\n/** Restricts extension policy mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\n/** Restricts extension policy surface values accepted by command, SDK, and storage contracts. */\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\n/** Restricts extension trust mode values accepted by command, SDK, and storage contracts. */\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\n/** Restricts extension sandbox profile values accepted by command, SDK, and storage contracts. */\nexport type ExtensionSandboxProfile =\n (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/** Versioned capability contract metadata emitted by runtime diagnostics. */\nexport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n};\n\n/** Least-privilege capability reconciliation helpers: map declared capabilities against the registration surfaces a package actually exercises at activation. */\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"../core/extensions/capability-usage.js\";\n\n/**\n * Render an extension/package activation summary\n * ({@link describeExtensionActivation} / {@link describeExtensionBlueprint}) to a\n * deterministic Markdown reference document — the author-facing *render* leg of\n * the describe verb, for drift-free package READMEs.\n */\nexport {\n renderExtensionSurfaceMarkdown,\n type ExtensionSurfaceMarkdownOptions,\n} from \"../core/extensions/activation-summary-markdown.js\";\n\nexport type {\n AfterCommandAffectedItem,\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandHandlerResult,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDeactivationFailure,\n ExtensionDeactivationOptions,\n ExtensionDeactivationResult,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionHookRegistry,\n ExtensionSelfIdentity,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionManifestEngines,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n ImportExportRegistrationOptions,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type {\n ItemDocument,\n ItemMetadata,\n ItemStatus,\n ItemType,\n PmSettings,\n} from \"../types/index.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
+
*
|
|
4
|
+
* Builds invocation context shared by extension hooks and derived command
|
|
5
|
+
* feedback, including core-only runs where no extensions are installed.
|
|
6
|
+
*/
|
|
7
|
+
import type { GlobalOptions } from "../shared/command-types.js";
|
|
8
|
+
import type { ExtensionHookRegistry } from "./loader.js";
|
|
9
|
+
/** Runtime state consumed after a command finishes. */
|
|
10
|
+
export interface ActiveExtensionHookContext<TMigrationBlocker> {
|
|
11
|
+
/** Active extension hooks, empty for a core-only invocation. */
|
|
12
|
+
hooks: ExtensionHookRegistry;
|
|
13
|
+
/** Canonical dotted command path. */
|
|
14
|
+
commandName: string;
|
|
15
|
+
/** Positional command arguments after parser overrides. */
|
|
16
|
+
commandArgs: string[];
|
|
17
|
+
/** Command-scoped options after parser overrides. */
|
|
18
|
+
commandOptions: Record<string, unknown>;
|
|
19
|
+
/** Global options after parser overrides. */
|
|
20
|
+
globalOptions: GlobalOptions;
|
|
21
|
+
/** Tracker root for hooks and derived feedback. */
|
|
22
|
+
pmRoot: string;
|
|
23
|
+
/** Whether profile diagnostics should be rendered. */
|
|
24
|
+
profileEnabled: boolean;
|
|
25
|
+
/** Mandatory extension migrations that remain unresolved. */
|
|
26
|
+
migrationBlockers: TMigrationBlocker[];
|
|
27
|
+
}
|
|
28
|
+
/** Creates post-command runtime state for an invocation without extensions. */
|
|
29
|
+
export declare function createCoreCommandHookContext(options: {
|
|
30
|
+
/** Canonical dotted command path. */
|
|
31
|
+
commandName: string;
|
|
32
|
+
/** Positional command arguments. */
|
|
33
|
+
commandArgs: string[];
|
|
34
|
+
/** Command-scoped options. */
|
|
35
|
+
commandOptions: Record<string, unknown>;
|
|
36
|
+
/** Parsed global options. */
|
|
37
|
+
globalOptions: GlobalOptions;
|
|
38
|
+
/** Resolved tracker root. */
|
|
39
|
+
pmRoot: string;
|
|
40
|
+
}): ActiveExtensionHookContext<never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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]="3efead0c-2ad9-5fa1-af60-57b781a534fc")}catch(e){}}();
|
|
3
|
+
import { createEmptyExtensionHookRegistry } from "./extension-registries.js";
|
|
4
|
+
/** Creates post-command runtime state for an invocation without extensions. */
|
|
5
|
+
export function createCoreCommandHookContext(options) {
|
|
6
|
+
return {
|
|
7
|
+
...options,
|
|
8
|
+
hooks: createEmptyExtensionHookRegistry(),
|
|
9
|
+
profileEnabled: Boolean(options.globalOptions.profile),
|
|
10
|
+
migrationBlockers: [],
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=command-hook-context.js.map
|
|
14
|
+
//# debugId=3efead0c-2ad9-5fa1-af60-57b781a534fc
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-hook-context.js","sources":["core/extensions/command-hook-context.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/command-hook-context\n *\n * Builds invocation context shared by extension hooks and derived command\n * feedback, including core-only runs where no extensions are installed.\n */\nimport type { GlobalOptions } from \"../shared/command-types.js\";\nimport { createEmptyExtensionHookRegistry } from \"./extension-registries.js\";\nimport type { ExtensionHookRegistry } from \"./loader.js\";\n\n/** Runtime state consumed after a command finishes. */\nexport interface ActiveExtensionHookContext<TMigrationBlocker> {\n /** Active extension hooks, empty for a core-only invocation. */\n hooks: ExtensionHookRegistry;\n /** Canonical dotted command path. */\n commandName: string;\n /** Positional command arguments after parser overrides. */\n commandArgs: string[];\n /** Command-scoped options after parser overrides. */\n commandOptions: Record<string, unknown>;\n /** Global options after parser overrides. */\n globalOptions: GlobalOptions;\n /** Tracker root for hooks and derived feedback. */\n pmRoot: string;\n /** Whether profile diagnostics should be rendered. */\n profileEnabled: boolean;\n /** Mandatory extension migrations that remain unresolved. */\n migrationBlockers: TMigrationBlocker[];\n}\n\n/** Creates post-command runtime state for an invocation without extensions. */\nexport function createCoreCommandHookContext(options: {\n /** Canonical dotted command path. */\n commandName: string;\n /** Positional command arguments. */\n commandArgs: string[];\n /** Command-scoped options. */\n commandOptions: Record<string, unknown>;\n /** Parsed global options. */\n globalOptions: GlobalOptions;\n /** Resolved tracker root. */\n pmRoot: string;\n}): ActiveExtensionHookContext<never> {\n return {\n ...options,\n hooks: createEmptyExtensionHookRegistry(),\n profileEnabled: Boolean(options.globalOptions.profile),\n migrationBlockers: [],\n };\n}\n"],"names":[],"mappings":";;AAOA,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAuB7E,+EAA+E;AAC/E,MAAM,UAAU,4BAA4B,CAAC,OAW5C;IACC,OAAO;QACL,GAAG,OAAO;QACV,KAAK,EAAE,gCAAgC,EAAE;QACzC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC;QACtD,iBAAiB,EAAE,EAAE;KACtB,CAAC;AACJ,CAAC","debugId":"3efead0c-2ad9-5fa1-af60-57b781a534fc"}
|
|
@@ -68,5 +68,6 @@ export declare function runActiveServiceOverride(service: ExtensionServiceName,
|
|
|
68
68
|
/** Implements run active service override sync for the public runtime surface of this module. */
|
|
69
69
|
export declare function runActiveServiceOverrideSync(service: ExtensionServiceName, payload: unknown): ServiceOverrideResult;
|
|
70
70
|
export * from "./loader.js";
|
|
71
|
+
export * from "./command-hook-context.js";
|
|
71
72
|
export { createSerialQueue } from "../shared/serial-queue.js";
|
|
72
73
|
export { EXTENSION_CAPABILITY_REGISTRATION_SURFACES, collectUsedExtensionCapabilities, reconcileExtensionCapabilityUsage, type CollectUsedExtensionCapabilitiesOptions, type ExtensionCapabilityUsageReconciliation, } from "./capability-usage.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements extension runtime contracts and governance for Index.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="27bb9504-233c-5768-8932-d1cae84313be")}catch(e){}}();
|
|
8
8
|
import { runCommandHandler, runCommandOverride, runOnIndexHooks, runParserOverride, runPreflightOverride, runOnReadHooks, runRendererOverride, runServiceOverride, runServiceOverrideSync, runOnWriteHooks, } from "./loader.js";
|
|
9
9
|
let activeExtensionHooks = null;
|
|
10
10
|
let activeExtensionCommands = null;
|
|
@@ -95,7 +95,7 @@ export function getActiveCommandResult() {
|
|
|
95
95
|
}
|
|
96
96
|
/** Implements record after command affected item for the public runtime surface of this module. */
|
|
97
97
|
export function recordAfterCommandAffectedItem(item) {
|
|
98
|
-
if (!item
|
|
98
|
+
if (!item) {
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
activeAfterCommandAffectedItems.push(item);
|
|
@@ -310,7 +310,8 @@ export function runActiveServiceOverrideSync(service, payload) {
|
|
|
310
310
|
return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
|
|
311
311
|
}
|
|
312
312
|
export * from "./loader.js";
|
|
313
|
+
export * from "./command-hook-context.js";
|
|
313
314
|
export { createSerialQueue } from "../shared/serial-queue.js";
|
|
314
315
|
export { EXTENSION_CAPABILITY_REGISTRATION_SURFACES, collectUsedExtensionCapabilities, reconcileExtensionCapabilityUsage, } from "./capability-usage.js";
|
|
315
316
|
//# sourceMappingURL=index.js.map
|
|
316
|
-
//# debugId=
|
|
317
|
+
//# debugId=27bb9504-233c-5768-8932-d1cae84313be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["core/extensions/index.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/index\n *\n * Implements extension runtime contracts and governance for Index.\n */\nimport {\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runParserOverride,\n runPreflightOverride,\n runOnReadHooks,\n runRendererOverride,\n runServiceOverride,\n runServiceOverrideSync,\n runOnWriteHooks,\n type CommandHandlerContext,\n type CommandHandlerResult,\n type CommandOverrideContext,\n type CommandOverrideResult,\n type ExtensionCommandRegistry,\n type ExtensionHookRegistry,\n type ExtensionParserRegistry,\n type ExtensionPreflightRegistry,\n type ExtensionRegistrationRegistry,\n type ExtensionRendererRegistry,\n type ExtensionServiceName,\n type ExtensionServiceRegistry,\n type AfterCommandAffectedItem,\n type OnIndexHookContext,\n type OnReadHookContext,\n type OnWriteHookContext,\n type OutputRendererFormat,\n type ParserOverrideContext,\n type ParserOverrideResult,\n type PreflightOverrideContext,\n type PreflightOverrideResult,\n type RendererOverrideResult,\n type ServiceOverrideResult,\n} from \"./loader.js\";\nimport type { ItemMetadata } from \"../../types/index.js\";\n\nlet activeExtensionHooks: ExtensionHookRegistry | null = null;\nlet activeExtensionCommands: ExtensionCommandRegistry | null = null;\nlet activeExtensionParsers: ExtensionParserRegistry | null = null;\nlet activeExtensionPreflight: ExtensionPreflightRegistry | null = null;\nlet activeExtensionServices: ExtensionServiceRegistry | null = null;\nlet activeExtensionRenderers: ExtensionRendererRegistry | null = null;\nlet activeExtensionRegistrations: ExtensionRegistrationRegistry | null = null;\nlet activeCommandContext: Omit<CommandOverrideContext, \"result\"> | null = null;\nlet activeCommandResult: unknown = undefined;\nlet activeAfterCommandAffectedItems: AfterCommandAffectedItem[] = [];\nconst AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = new Set([\n \"body\",\n \"comments\",\n \"dependencies\",\n \"docs\",\n \"events\",\n \"files\",\n \"learnings\",\n \"notes\",\n \"reminders\",\n \"test_runs\",\n \"tests\",\n]);\n\n/** Implements set active extension hooks for the public runtime surface of this module. */\nexport function setActiveExtensionHooks(\n hooks: ExtensionHookRegistry | null,\n): void {\n activeExtensionHooks = hooks;\n}\n\n/** Implements set active extension commands for the public runtime surface of this module. */\nexport function setActiveExtensionCommands(\n commands: ExtensionCommandRegistry | null,\n): void {\n activeExtensionCommands = commands;\n}\n\n/** Implements set active extension parsers for the public runtime surface of this module. */\nexport function setActiveExtensionParsers(\n parsers: ExtensionParserRegistry | null,\n): void {\n activeExtensionParsers = parsers;\n}\n\n/** Implements set active extension preflight for the public runtime surface of this module. */\nexport function setActiveExtensionPreflight(\n preflight: ExtensionPreflightRegistry | null,\n): void {\n activeExtensionPreflight = preflight;\n}\n\n/** Implements set active extension services for the public runtime surface of this module. */\nexport function setActiveExtensionServices(\n services: ExtensionServiceRegistry | null,\n): void {\n activeExtensionServices = services;\n}\n\n/** Implements set active extension renderers for the public runtime surface of this module. */\nexport function setActiveExtensionRenderers(\n renderers: ExtensionRendererRegistry | null,\n): void {\n activeExtensionRenderers = renderers;\n}\n\n/** Implements set active extension registrations for the public runtime surface of this module. */\nexport function setActiveExtensionRegistrations(\n registrations: ExtensionRegistrationRegistry | null,\n): void {\n activeExtensionRegistrations = registrations;\n}\n\n/** Implements get active extension registrations for the public runtime surface of this module. */\nexport function getActiveExtensionRegistrations(): ExtensionRegistrationRegistry | null {\n return activeExtensionRegistrations;\n}\n\n/**\n * Clear every module-level active-extension registry in one step.\n *\n * The actives describe the CURRENT invocation only. One-shot `pm` processes\n * reset them for free by exiting; long-lived embeddings (in-process test\n * runners, future SDK hosts) must call this at invocation entry, otherwise an\n * extension activated by a previous invocation leaks into workspaces where it\n * is not installed (e.g. a stale command registration rejecting core flags).\n */\nexport function resetActiveExtensionRuntimeState(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = null;\n}\n\n/** Implements set active command context for the public runtime surface of this module. */\nexport function setActiveCommandContext(\n context: Omit<CommandOverrideContext, \"result\"> | null,\n): void {\n activeCommandContext = context;\n}\n\n/** Implements set active command result for the public runtime surface of this module. */\nexport function setActiveCommandResult(result: unknown): void {\n activeCommandResult = result;\n}\n\n/** Implements get active command result for the public runtime surface of this module. */\nexport function getActiveCommandResult(): unknown {\n return activeCommandResult;\n}\n\n/** Implements record after command affected item for the public runtime surface of this module. */\nexport function recordAfterCommandAffectedItem(\n item: AfterCommandAffectedItem,\n): void {\n if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {\n return;\n }\n activeAfterCommandAffectedItems.push(item);\n}\n\n/** Implements project after command item snapshot for the public runtime surface of this module. */\nexport function projectAfterCommandItemSnapshot(\n metadata: ItemMetadata,\n changedFields: readonly string[],\n): Partial<ItemMetadata> {\n if (!metadata || !metadata.id) {\n return {};\n }\n const snapshot: Record<string, unknown> = {\n id: metadata.id,\n type: metadata.type,\n status: metadata.status,\n };\n if (!Array.isArray(changedFields)) {\n return snapshot as Partial<ItemMetadata>;\n }\n const source = metadata as unknown as Record<string, unknown>;\n for (const field of changedFields) {\n if (typeof field !== \"string\") {\n continue;\n }\n const actualField = field.startsWith(\"unset:\")\n ? field.slice(\"unset:\".length)\n : field;\n if (\n actualField === \"id\" ||\n actualField === \"type\" ||\n actualField === \"status\" ||\n AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)\n ) {\n continue;\n }\n if (\n Object.hasOwn(source, actualField) &&\n source[actualField] !== undefined\n ) {\n snapshot[actualField] = source[actualField];\n }\n }\n return snapshot as Partial<ItemMetadata>;\n}\n\n/** Implements consume after command affected items for the public runtime surface of this module. */\nexport function consumeAfterCommandAffectedItems():\n | AfterCommandAffectedItem[]\n | undefined {\n if (activeAfterCommandAffectedItems.length === 0) {\n return undefined;\n }\n const affected = activeAfterCommandAffectedItems;\n activeAfterCommandAffectedItems = [];\n return affected;\n}\n\n/** Implements clear active extension hooks for the public runtime surface of this module. */\nexport function clearActiveExtensionHooks(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = undefined;\n activeAfterCommandAffectedItems = [];\n}\n\n/** Implements run active on write hooks for the public runtime surface of this module. */\nexport async function runActiveOnWriteHooks(\n context: OnWriteHookContext,\n): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnWriteHooks(activeExtensionHooks, context);\n}\n\n/** Implements run active on read hooks for the public runtime surface of this module. */\nexport async function runActiveOnReadHooks(\n context: OnReadHookContext,\n): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnReadHooks(activeExtensionHooks, context);\n}\n\n/** Synchronous fast-path predicate: true only when at least one onRead hook is registered. Bulk readers (e.g. the metadata cache scanning hundreds of files) use this to skip per-file `await runActiveOnReadHooks(...)` calls entirely when no extension observes reads, avoiding hundreds of needless microtasks. */\nexport function hasActiveOnReadHooks(): boolean {\n return (activeExtensionHooks?.onRead?.length ?? 0) > 0;\n}\n\n/** Implements run active on index hooks for the public runtime surface of this module. */\nexport async function runActiveOnIndexHooks(\n context: OnIndexHookContext,\n): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnIndexHooks(activeExtensionHooks, context);\n}\n\n/** Implements run active command override for the public runtime surface of this module. */\nexport function runActiveCommandOverride(\n result: unknown,\n): CommandOverrideResult {\n if (!activeExtensionCommands || !activeCommandContext) {\n return {\n overridden: false,\n result,\n warnings: [],\n };\n }\n return runCommandOverride(activeExtensionCommands, {\n command: activeCommandContext.command,\n args: [...activeCommandContext.args],\n options: activeCommandContext.options\n ? { ...activeCommandContext.options }\n : {},\n global: activeCommandContext.global\n ? { ...activeCommandContext.global }\n : undefined,\n pm_root: activeCommandContext.pm_root,\n result,\n });\n}\n\n/** Implements run active command handler for the public runtime surface of this module. */\nexport async function runActiveCommandHandler(\n context: CommandHandlerContext,\n): Promise<CommandHandlerResult> {\n if (!activeExtensionCommands) {\n return {\n handled: false,\n result: null,\n warnings: [],\n };\n }\n return runCommandHandler(activeExtensionCommands, context);\n}\n\n/** Implements run active parser override for the public runtime surface of this module. */\nexport async function runActiveParserOverride(\n context: ParserOverrideContext,\n): Promise<ParserOverrideResult> {\n if (!activeExtensionParsers) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n warnings: [],\n };\n }\n return runParserOverride(activeExtensionParsers, context);\n}\n\n/** Implements run active preflight override for the public runtime surface of this module. */\nexport async function runActivePreflightOverride(\n context: PreflightOverrideContext,\n): Promise<PreflightOverrideResult> {\n if (!activeExtensionPreflight) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n decision: { ...context.decision },\n warnings: [],\n };\n }\n return runPreflightOverride(activeExtensionPreflight, context);\n}\n\n/** Implements run active renderer override for the public runtime surface of this module. */\nexport function runActiveRendererOverride(\n format: OutputRendererFormat,\n result: unknown,\n): RendererOverrideResult {\n if (!activeExtensionRenderers) {\n return {\n overridden: false,\n rendered: null,\n warnings: [],\n };\n }\n return runRendererOverride(activeExtensionRenderers, {\n format,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options\n ? { ...activeCommandContext.options }\n : {},\n global: activeCommandContext?.global\n ? { ...activeCommandContext.global }\n : undefined,\n pm_root: activeCommandContext?.pm_root,\n result,\n });\n}\n\nfunction buildServiceContext(service: ExtensionServiceName, payload: unknown) {\n return {\n service,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options\n ? { ...activeCommandContext.options }\n : {},\n global: activeCommandContext?.global\n ? { ...activeCommandContext.global }\n : undefined,\n pm_root: activeCommandContext?.pm_root,\n payload,\n };\n}\n\n/** Implements run active service override for the public runtime surface of this module. */\nexport async function runActiveServiceOverride(\n service: ExtensionServiceName,\n payload: unknown,\n): Promise<ServiceOverrideResult> {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverride(\n activeExtensionServices,\n buildServiceContext(service, payload),\n );\n}\n\n/** Implements run active service override sync for the public runtime surface of this module. */\nexport function runActiveServiceOverrideSync(\n service: ExtensionServiceName,\n payload: unknown,\n): ServiceOverrideResult {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverrideSync(\n activeExtensionServices,\n buildServiceContext(service, payload),\n );\n}\n\nexport * from \"./loader.js\";\nexport { createSerialQueue } from \"../shared/serial-queue.js\";\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"./capability-usage.js\";\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,GAwBhB,MAAM,aAAa,CAAC;AAGrB,IAAI,oBAAoB,GAAiC,IAAI,CAAC;AAC9D,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,sBAAsB,GAAmC,IAAI,CAAC;AAClE,IAAI,wBAAwB,GAAsC,IAAI,CAAC;AACvE,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,wBAAwB,GAAqC,IAAI,CAAC;AACtE,IAAI,4BAA4B,GAAyC,IAAI,CAAC;AAC9E,IAAI,oBAAoB,GAAkD,IAAI,CAAC;AAC/E,IAAI,mBAAmB,G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","sources":["core/extensions/index.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/index\n *\n * Implements extension runtime contracts and governance for Index.\n */\nimport {\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runParserOverride,\n runPreflightOverride,\n runOnReadHooks,\n runRendererOverride,\n runServiceOverride,\n runServiceOverrideSync,\n runOnWriteHooks,\n type CommandHandlerContext,\n type CommandHandlerResult,\n type CommandOverrideContext,\n type CommandOverrideResult,\n type ExtensionCommandRegistry,\n type ExtensionHookRegistry,\n type ExtensionParserRegistry,\n type ExtensionPreflightRegistry,\n type ExtensionRegistrationRegistry,\n type ExtensionRendererRegistry,\n type ExtensionServiceName,\n type ExtensionServiceRegistry,\n type AfterCommandAffectedItem,\n type OnIndexHookContext,\n type OnReadHookContext,\n type OnWriteHookContext,\n type OutputRendererFormat,\n type ParserOverrideContext,\n type ParserOverrideResult,\n type PreflightOverrideContext,\n type PreflightOverrideResult,\n type RendererOverrideResult,\n type ServiceOverrideResult,\n} from \"./loader.js\";\nimport type { ItemMetadata } from \"../../types/index.js\";\n\nlet activeExtensionHooks: ExtensionHookRegistry | null = null;\nlet activeExtensionCommands: ExtensionCommandRegistry | null = null;\nlet activeExtensionParsers: ExtensionParserRegistry | null = null;\nlet activeExtensionPreflight: ExtensionPreflightRegistry | null = null;\nlet activeExtensionServices: ExtensionServiceRegistry | null = null;\nlet activeExtensionRenderers: ExtensionRendererRegistry | null = null;\nlet activeExtensionRegistrations: ExtensionRegistrationRegistry | null = null;\nlet activeCommandContext: Omit<CommandOverrideContext, \"result\"> | null = null;\nlet activeCommandResult: unknown = undefined;\nlet activeAfterCommandAffectedItems: AfterCommandAffectedItem[] = [];\nconst AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = new Set([\n \"body\",\n \"comments\",\n \"dependencies\",\n \"docs\",\n \"events\",\n \"files\",\n \"learnings\",\n \"notes\",\n \"reminders\",\n \"test_runs\",\n \"tests\",\n]);\n\n/** Implements set active extension hooks for the public runtime surface of this module. */\nexport function setActiveExtensionHooks(\n hooks: ExtensionHookRegistry | null,\n): void {\n activeExtensionHooks = hooks;\n}\n\n/** Implements set active extension commands for the public runtime surface of this module. */\nexport function setActiveExtensionCommands(\n commands: ExtensionCommandRegistry | null,\n): void {\n activeExtensionCommands = commands;\n}\n\n/** Implements set active extension parsers for the public runtime surface of this module. */\nexport function setActiveExtensionParsers(\n parsers: ExtensionParserRegistry | null,\n): void {\n activeExtensionParsers = parsers;\n}\n\n/** Implements set active extension preflight for the public runtime surface of this module. */\nexport function setActiveExtensionPreflight(\n preflight: ExtensionPreflightRegistry | null,\n): void {\n activeExtensionPreflight = preflight;\n}\n\n/** Implements set active extension services for the public runtime surface of this module. */\nexport function setActiveExtensionServices(\n services: ExtensionServiceRegistry | null,\n): void {\n activeExtensionServices = services;\n}\n\n/** Implements set active extension renderers for the public runtime surface of this module. */\nexport function setActiveExtensionRenderers(\n renderers: ExtensionRendererRegistry | null,\n): void {\n activeExtensionRenderers = renderers;\n}\n\n/** Implements set active extension registrations for the public runtime surface of this module. */\nexport function setActiveExtensionRegistrations(\n registrations: ExtensionRegistrationRegistry | null,\n): void {\n activeExtensionRegistrations = registrations;\n}\n\n/** Implements get active extension registrations for the public runtime surface of this module. */\nexport function getActiveExtensionRegistrations(): ExtensionRegistrationRegistry | null {\n return activeExtensionRegistrations;\n}\n\n/**\n * Clear every module-level active-extension registry in one step.\n *\n * The actives describe the CURRENT invocation only. One-shot `pm` processes\n * reset them for free by exiting; long-lived embeddings (in-process test\n * runners, future SDK hosts) must call this at invocation entry, otherwise an\n * extension activated by a previous invocation leaks into workspaces where it\n * is not installed (e.g. a stale command registration rejecting core flags).\n */\nexport function resetActiveExtensionRuntimeState(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = null;\n}\n\n/** Implements set active command context for the public runtime surface of this module. */\nexport function setActiveCommandContext(\n context: Omit<CommandOverrideContext, \"result\"> | null,\n): void {\n activeCommandContext = context;\n}\n\n/** Implements set active command result for the public runtime surface of this module. */\nexport function setActiveCommandResult(result: unknown): void {\n activeCommandResult = result;\n}\n\n/** Implements get active command result for the public runtime surface of this module. */\nexport function getActiveCommandResult(): unknown {\n return activeCommandResult;\n}\n\n/** Implements record after command affected item for the public runtime surface of this module. */\nexport function recordAfterCommandAffectedItem(\n item: AfterCommandAffectedItem,\n): void {\n if (!item) {\n return;\n }\n activeAfterCommandAffectedItems.push(item);\n}\n\n/** Implements project after command item snapshot for the public runtime surface of this module. */\nexport function projectAfterCommandItemSnapshot(\n metadata: ItemMetadata,\n changedFields: readonly string[],\n): Partial<ItemMetadata> {\n if (!metadata || !metadata.id) {\n return {};\n }\n const snapshot: Record<string, unknown> = {\n id: metadata.id,\n type: metadata.type,\n status: metadata.status,\n };\n if (!Array.isArray(changedFields)) {\n return snapshot as Partial<ItemMetadata>;\n }\n const source = metadata as unknown as Record<string, unknown>;\n for (const field of changedFields) {\n if (typeof field !== \"string\") {\n continue;\n }\n const actualField = field.startsWith(\"unset:\")\n ? field.slice(\"unset:\".length)\n : field;\n if (\n actualField === \"id\" ||\n actualField === \"type\" ||\n actualField === \"status\" ||\n AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)\n ) {\n continue;\n }\n if (\n Object.hasOwn(source, actualField) &&\n source[actualField] !== undefined\n ) {\n snapshot[actualField] = source[actualField];\n }\n }\n return snapshot as Partial<ItemMetadata>;\n}\n\n/** Implements consume after command affected items for the public runtime surface of this module. */\nexport function consumeAfterCommandAffectedItems():\n | AfterCommandAffectedItem[]\n | undefined {\n if (activeAfterCommandAffectedItems.length === 0) {\n return undefined;\n }\n const affected = activeAfterCommandAffectedItems;\n activeAfterCommandAffectedItems = [];\n return affected;\n}\n\n/** Implements clear active extension hooks for the public runtime surface of this module. */\nexport function clearActiveExtensionHooks(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = undefined;\n activeAfterCommandAffectedItems = [];\n}\n\n/** Implements run active on write hooks for the public runtime surface of this module. */\nexport async function runActiveOnWriteHooks(\n context: OnWriteHookContext,\n): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnWriteHooks(activeExtensionHooks, context);\n}\n\n/** Implements run active on read hooks for the public runtime surface of this module. */\nexport async function runActiveOnReadHooks(\n context: OnReadHookContext,\n): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnReadHooks(activeExtensionHooks, context);\n}\n\n/** Synchronous fast-path predicate: true only when at least one onRead hook is registered. Bulk readers (e.g. the metadata cache scanning hundreds of files) use this to skip per-file `await runActiveOnReadHooks(...)` calls entirely when no extension observes reads, avoiding hundreds of needless microtasks. */\nexport function hasActiveOnReadHooks(): boolean {\n return (activeExtensionHooks?.onRead?.length ?? 0) > 0;\n}\n\n/** Implements run active on index hooks for the public runtime surface of this module. */\nexport async function runActiveOnIndexHooks(\n context: OnIndexHookContext,\n): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnIndexHooks(activeExtensionHooks, context);\n}\n\n/** Implements run active command override for the public runtime surface of this module. */\nexport function runActiveCommandOverride(\n result: unknown,\n): CommandOverrideResult {\n if (!activeExtensionCommands || !activeCommandContext) {\n return {\n overridden: false,\n result,\n warnings: [],\n };\n }\n return runCommandOverride(activeExtensionCommands, {\n command: activeCommandContext.command,\n args: [...activeCommandContext.args],\n options: activeCommandContext.options\n ? { ...activeCommandContext.options }\n : {},\n global: activeCommandContext.global\n ? { ...activeCommandContext.global }\n : undefined,\n pm_root: activeCommandContext.pm_root,\n result,\n });\n}\n\n/** Implements run active command handler for the public runtime surface of this module. */\nexport async function runActiveCommandHandler(\n context: CommandHandlerContext,\n): Promise<CommandHandlerResult> {\n if (!activeExtensionCommands) {\n return {\n handled: false,\n result: null,\n warnings: [],\n };\n }\n return runCommandHandler(activeExtensionCommands, context);\n}\n\n/** Implements run active parser override for the public runtime surface of this module. */\nexport async function runActiveParserOverride(\n context: ParserOverrideContext,\n): Promise<ParserOverrideResult> {\n if (!activeExtensionParsers) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n warnings: [],\n };\n }\n return runParserOverride(activeExtensionParsers, context);\n}\n\n/** Implements run active preflight override for the public runtime surface of this module. */\nexport async function runActivePreflightOverride(\n context: PreflightOverrideContext,\n): Promise<PreflightOverrideResult> {\n if (!activeExtensionPreflight) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n decision: { ...context.decision },\n warnings: [],\n };\n }\n return runPreflightOverride(activeExtensionPreflight, context);\n}\n\n/** Implements run active renderer override for the public runtime surface of this module. */\nexport function runActiveRendererOverride(\n format: OutputRendererFormat,\n result: unknown,\n): RendererOverrideResult {\n if (!activeExtensionRenderers) {\n return {\n overridden: false,\n rendered: null,\n warnings: [],\n };\n }\n return runRendererOverride(activeExtensionRenderers, {\n format,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options\n ? { ...activeCommandContext.options }\n : {},\n global: activeCommandContext?.global\n ? { ...activeCommandContext.global }\n : undefined,\n pm_root: activeCommandContext?.pm_root,\n result,\n });\n}\n\nfunction buildServiceContext(service: ExtensionServiceName, payload: unknown) {\n return {\n service,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options\n ? { ...activeCommandContext.options }\n : {},\n global: activeCommandContext?.global\n ? { ...activeCommandContext.global }\n : undefined,\n pm_root: activeCommandContext?.pm_root,\n payload,\n };\n}\n\n/** Implements run active service override for the public runtime surface of this module. */\nexport async function runActiveServiceOverride(\n service: ExtensionServiceName,\n payload: unknown,\n): Promise<ServiceOverrideResult> {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverride(\n activeExtensionServices,\n buildServiceContext(service, payload),\n );\n}\n\n/** Implements run active service override sync for the public runtime surface of this module. */\nexport function runActiveServiceOverrideSync(\n service: ExtensionServiceName,\n payload: unknown,\n): ServiceOverrideResult {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverrideSync(\n activeExtensionServices,\n buildServiceContext(service, payload),\n );\n}\n\nexport * from \"./loader.js\";\nexport * from \"./command-hook-context.js\";\nexport { createSerialQueue } from \"../shared/serial-queue.js\";\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"./capability-usage.js\";\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,GAwBhB,MAAM,aAAa,CAAC;AAGrB,IAAI,oBAAoB,GAAiC,IAAI,CAAC;AAC9D,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,sBAAsB,GAAmC,IAAI,CAAC;AAClE,IAAI,wBAAwB,GAAsC,IAAI,CAAC;AACvE,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,wBAAwB,GAAqC,IAAI,CAAC;AACtE,IAAI,4BAA4B,GAAyC,IAAI,CAAC;AAC9E,IAAI,oBAAoB,GAAkD,IAAI,CAAC;AAC/E,IAAI,mBAAmB,GAAY,SAAS,CAAC;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CAAC,EAAE,GAAG,oBAAoB,CAAC,OAAO,EAAE;YACrC,CAAC,CAAC,EAAE;QACN,MAAM,EAAE,oBAAoB,EAAE,MAAM;YAClC,CAAC,CAAC,EAAE,GAAG,oBAAoB,CAAC,MAAM,EAAE;YACpC,CAAC,CAAC,SAAS;QACb,OAAO,EAAE,oBAAoB,EAAE,OAAO;QACtC,OAAO;KACR,CAAC;AACJ,CAAC;AAED,4FAA4F;AAC5F,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,OAA6B,EAC7B,OAAgB;IAEhB,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IACD,OAAO,kBAAkB,CACvB,uBAAuB,EACvB,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CACtC,CAAC;AACJ,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,4BAA4B,CAC1C,OAA6B,EAC7B,OAAgB;IAEhB,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IACD,OAAO,sBAAsB,CAC3B,uBAAuB,EACvB,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CACtC,CAAC;AACJ,CAAC;AAED,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,0CAA0C,EAC1C,gCAAgC,EAChC,iCAAiC,GAGlC,MAAM,uBAAuB,CAAC","debugId":"27bb9504-233c-5768-8932-d1cae84313be"}
|
|
@@ -54,6 +54,8 @@ export interface StdinTokenResolver {
|
|
|
54
54
|
export declare function createStdinTokenResolver(): StdinTokenResolver;
|
|
55
55
|
/** Implements parse optional number for the public runtime surface of this module. */
|
|
56
56
|
export declare function parseOptionalNumber(raw: string, optionName: string): number;
|
|
57
|
+
/** Parse a non-negative integer option such as an item duration estimate. */
|
|
58
|
+
export declare function parseOptionalNonNegativeInteger(raw: string, optionName: string): number;
|
|
57
59
|
/** Public contract for test only, shared by SDK and presentation-layer consumers. */
|
|
58
60
|
export declare const _testOnly: {
|
|
59
61
|
coerceJsonTagArray: typeof coerceJsonTagArray;
|
package/dist/core/item/parse.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines item parsing, formatting, and lifecycle helpers for Parse.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="fb39edac-1965-5a52-9c0c-c4330fe3a8c7")}catch(e){}}();
|
|
8
8
|
import { PmCliError } from "../shared/errors.js";
|
|
9
9
|
import { EXIT_CODE } from "../shared/constants.js";
|
|
10
10
|
const STDIN_TOKEN = "-";
|
|
@@ -418,6 +418,15 @@ export function parseOptionalNumber(raw, optionName) {
|
|
|
418
418
|
}
|
|
419
419
|
return value;
|
|
420
420
|
}
|
|
421
|
+
/** Parse a non-negative integer option such as an item duration estimate. */
|
|
422
|
+
export function parseOptionalNonNegativeInteger(raw, optionName) {
|
|
423
|
+
const trimmed = raw.trim();
|
|
424
|
+
const value = Number(trimmed);
|
|
425
|
+
if (trimmed === "" || !Number.isInteger(value) || value < 0) {
|
|
426
|
+
throw new PmCliError(`Invalid ${optionName} value "${raw}". Expected a non-negative integer.`, EXIT_CODE.USAGE);
|
|
427
|
+
}
|
|
428
|
+
return value;
|
|
429
|
+
}
|
|
421
430
|
/** Public contract for test only, shared by SDK and presentation-layer consumers. */
|
|
422
431
|
export const _testOnly = {
|
|
423
432
|
coerceJsonTagArray,
|
|
@@ -425,4 +434,4 @@ export const _testOnly = {
|
|
|
425
434
|
parseMarkdownKeyValueLines,
|
|
426
435
|
};
|
|
427
436
|
//# sourceMappingURL=parse.js.map
|
|
428
|
-
//# debugId=
|
|
437
|
+
//# debugId=fb39edac-1965-5a52-9c0c-c4330fe3a8c7
|