@unbrained/pm-cli 2026.6.22 → 2026.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/cli/commands/completion.js +5 -4
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +70 -0
- package/dist/cli/commands/extension/describe.js +76 -0
- package/dist/cli/commands/extension/describe.js.map +1 -0
- package/dist/cli/commands/extension/scaffold.js +183 -47
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +2 -1
- package/dist/cli/commands/extension.js +36 -4
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/help-content.js +6 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-setup.js +10 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-54TXGJ2T.js +18 -0
- package/dist/cli-bundle/chunks/{activity-DXS2XMQU.js → activity-N7RVTLBQ.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-IHM4KMQ3.js → aggregate-63NWNIBR.js} +10 -10
- package/dist/cli-bundle/chunks/{aggregate-NMYDVQF7.js → aggregate-YHCYX2EV.js} +10 -10
- package/dist/cli-bundle/chunks/{append-3HY5G7ET.js → append-PUKREFV5.js} +8 -8
- package/dist/cli-bundle/chunks/{append-K54MDQYC.js → append-VLQQDHMJ.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-DU64SZUQ.js → chunk-2WCYE3IF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NKZOJPXK.js → chunk-3BKH2CL3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7MALIV5H.js → chunk-4XDGYFHL.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-VB54F347.js → chunk-5BBEWX6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DHBPJ7VG.js → chunk-5S4ZGDB2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UKK2VTTH.js → chunk-6EBNFQOR.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-5SESR24H.js → chunk-6EL7SW5C.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-JLSC5NPC.js → chunk-6W3Y65PL.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HYQV75IB.js → chunk-A66VYUOV.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-I367IDZP.js → chunk-ABYCA5VX.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-47HTJ6BU.js → chunk-AEACLRVH.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-MD7XKVWI.js → chunk-ALKFCIIB.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-B2KR24R4.js → chunk-ALQKV6U7.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-NIWY4V4Z.js → chunk-AYPQUFCX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AJXYOYJV.js → chunk-B74BP6IS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-THKDPOS5.js → chunk-BFFO3AIB.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-CR7KFPAQ.js → chunk-C4C3EJCJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-J2TSPY5L.js → chunk-CG3KP6I5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CWPBGUC7.js → chunk-CZIFFMZI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-75VEYQJS.js → chunk-DTABLLVE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TIKJAXQW.js → chunk-EOGBMLCE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YATDFWYK.js → chunk-EWRSXOIZ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-RZZMSY4P.js → chunk-EYPINTFR.js} +151 -98
- package/dist/cli-bundle/chunks/chunk-EYPINTFR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RPRFBXND.js → chunk-F32L4HR6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NVUATMTC.js → chunk-F4BNR2IN.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-Y4BZEND6.js → chunk-FBLT6WGK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PCH2JTEO.js → chunk-FMWW2JDU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQDX7DVG.js → chunk-GDUMGZK3.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-KBTREGVO.js → chunk-GQYJEEFX.js} +8 -5
- package/dist/cli-bundle/chunks/{chunk-KBTREGVO.js.map → chunk-GQYJEEFX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-FK6MV5F5.js → chunk-HBAEFWX3.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-6UPTNMVW.js → chunk-HC2S36NB.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-XKNF3VRJ.js → chunk-HZF5RLKX.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-4JXWVHMN.js → chunk-I6QMJ2XT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-44O4JIN6.js → chunk-IAP5KYBQ.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-4YJA4LGU.js → chunk-INPHFO33.js} +160 -42
- package/dist/cli-bundle/chunks/chunk-INPHFO33.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A7E4ZXG2.js → chunk-IOT6WRL5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KRJJPDUO.js → chunk-IXAZI443.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DMT4ODVN.js → chunk-J3NMWFIN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7PBGTIN3.js → chunk-J7I4C5ZB.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-7GCCDXXN.js → chunk-JKL6HRMV.js} +123 -8
- package/dist/cli-bundle/chunks/chunk-JKL6HRMV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CLLVBO3I.js → chunk-JPJDP4VU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PJS2J7Z4.js → chunk-JV27C7OZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-K25UDYJ4.js → chunk-KIEAK7YE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GGAXE22C.js → chunk-KJZOSF7J.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-GXBSFKSX.js → chunk-KKX4Z2SE.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-D35LTIFR.js → chunk-L7UXKP2I.js} +110 -9
- package/dist/cli-bundle/chunks/chunk-L7UXKP2I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-C5SWTISA.js → chunk-LNEDHJNQ.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-YRLLL5TY.js → chunk-LU36E6GU.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-I6XE47J2.js → chunk-M6TUBOGW.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-DBQUQ3AS.js → chunk-MEXZ5XUM.js} +7 -4
- package/dist/cli-bundle/chunks/{chunk-DBQUQ3AS.js.map → chunk-MEXZ5XUM.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YJICYNAV.js → chunk-MWMHZOZZ.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-SFKQAVZA.js → chunk-N5B6WZC5.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-3GL6LTUL.js → chunk-NJ73ALW2.js} +161 -43
- package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WBSYW3NT.js → chunk-NVXGVEFD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7MPTFYT3.js → chunk-OF7V47P3.js} +15 -4
- package/dist/cli-bundle/chunks/chunk-OF7V47P3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GNDHOR64.js → chunk-OHDQNKJB.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-2LEYMXI6.js → chunk-OQ2E64FH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-25XZN3JD.js → chunk-PEL2NLQE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H6FNDCDI.js → chunk-PRVTGX64.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-TZQKEBKF.js → chunk-QOUOMPHO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-77VKGH4L.js → chunk-RAWA3Y7O.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-Y335KFHD.js → chunk-RRP6D345.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-4SDKF5BG.js → chunk-SKC4UTRP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TRUFOER3.js → chunk-SMXSDY7J.js} +15 -4
- package/dist/cli-bundle/chunks/chunk-SMXSDY7J.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JY25IOEZ.js → chunk-SUREE24M.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-A25LOPRG.js → chunk-TIM4OD74.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KK4TQ3ZP.js → chunk-TKPP4GOO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6FQHNHQQ.js → chunk-TSI32UEL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TJABI6PR.js → chunk-UACWNBL2.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-EVPVCE4R.js → chunk-V4UYNSEM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QQWEROGS.js → chunk-VFJYVXHL.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-KL5ELX2X.js → chunk-VSAABFGQ.js} +144 -98
- package/dist/cli-bundle/chunks/chunk-VSAABFGQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YQSWTVZF.js → chunk-WB5BYQMF.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MNGAQB2E.js → chunk-XVYKWZNL.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-V4SM4UAL.js → chunk-XXKV4UWE.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-GU7YHKYP.js → chunk-YV2OSAMS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P7ZU73BO.js → chunk-ZLWRPBOW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3VLPDG3J.js → chunk-ZV7IQ23N.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-MPXNVBZQ.js → claim-FZZZCAY6.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-SKHJDLW6.js → claim-XK5QBZE3.js} +10 -10
- package/dist/cli-bundle/chunks/close-JEBZXONN.js +15 -0
- package/dist/cli-bundle/chunks/{close-4RKSL5L6.js → close-QHMVWM7M.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-SXODYBDP.js → close-many-OIXJE2JZ.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-AWTPXLHJ.js → close-many-SUU5BS2C.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-YYW5P7AG.js → comments-5YM62D75.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-OOH64LWW.js → comments-RH3IBIRH.js} +10 -10
- package/dist/cli-bundle/chunks/{config-3445MCQQ.js → config-NCNNWF6R.js} +8 -8
- package/dist/cli-bundle/chunks/{config-LCDMKRB2.js → config-SW3U7XP2.js} +8 -8
- package/dist/cli-bundle/chunks/{context-PJCURODY.js → context-55VEOYI3.js} +13 -13
- package/dist/cli-bundle/chunks/{context-DZMIBIVP.js → context-5LB7UGKE.js} +13 -13
- package/dist/cli-bundle/chunks/{contracts-MP2P3HL5.js → contracts-JXFGBOYT.js} +8 -6
- package/dist/cli-bundle/chunks/contracts-JXFGBOYT.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-7YDFEJB3.js → contracts-SY6PDFIK.js} +7 -5
- package/dist/cli-bundle/chunks/contracts-SY6PDFIK.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-63IQQRRS.js → copy-IEDBJOOX.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-TASIH2AZ.js → copy-N3GE6FYS.js} +7 -7
- package/dist/cli-bundle/chunks/create-CLSCHGJJ.js +30 -0
- package/dist/cli-bundle/chunks/{create-TGSB5GV4.js → create-O4VONGPG.js} +14 -14
- package/dist/cli-bundle/chunks/{delete-ARILQQLB.js → delete-724EQ6OS.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-ZQKBZYNK.js → delete-LPEIF7RU.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-MSHQR2GY.js → deps-RSBU4SIU.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-NJFJIMQ5.js → deps-T3Y6Y7RT.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-XK2UVUXX.js → docs-75ZLCO3G.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-SS4UKYYA.js → docs-IFS7HZPP.js} +9 -9
- package/dist/cli-bundle/chunks/{eval-JOTG2YHU.js → eval-L2KD7W3M.js} +12 -12
- package/dist/cli-bundle/chunks/{eval-FVZGX5IZ.js → eval-QGR7JCQO.js} +12 -12
- package/dist/cli-bundle/chunks/{extension-OQPS27B4.js → extension-3JYWJ5K2.js} +6 -6
- package/dist/cli-bundle/chunks/{extension-NLMS47I4.js → extension-YQF4CPIR.js} +6 -6
- package/dist/cli-bundle/chunks/{files-Y2P6LN5A.js → files-5BQWDRDT.js} +9 -9
- package/dist/cli-bundle/chunks/{files-3EVJQZ2N.js → files-EPEJMJHQ.js} +9 -9
- package/dist/cli-bundle/chunks/{focus-D5ZUPTII.js → focus-DQVJAPOE.js} +8 -8
- package/dist/cli-bundle/chunks/{focus-ZPIFTY4R.js → focus-RWGKD76E.js} +8 -8
- package/dist/cli-bundle/chunks/{gc-LXXDY456.js → gc-BEJMQT64.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-RNOEQHSX.js → gc-JEFQDJPA.js} +3 -3
- package/dist/cli-bundle/chunks/{get-W23G7MJX.js → get-LQG6PEVG.js} +11 -11
- package/dist/cli-bundle/chunks/{get-Q3SZGQHD.js → get-WVN75H42.js} +11 -11
- package/dist/cli-bundle/chunks/{health-UDDGJLPP.js → health-JJJOY7DJ.js} +14 -14
- package/dist/cli-bundle/chunks/{health-5LHSX365.js → health-P67NZ6TT.js} +14 -14
- package/dist/cli-bundle/chunks/history-ALTM2RRP.js +20 -0
- package/dist/cli-bundle/chunks/{history-6CZVFIUJ.js → history-RUKPKNY7.js} +10 -10
- package/dist/cli-bundle/chunks/{history-compact-VWUSQH6Z.js → history-compact-NQ7VPRVT.js} +12 -12
- package/dist/cli-bundle/chunks/{history-compact-M35PDQ4G.js → history-compact-ZAOWR7GD.js} +12 -12
- package/dist/cli-bundle/chunks/history-redact-5YGLWUDH.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-AJGARHT3.js → history-redact-YY4XYVEP.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-YUAHIPIN.js → history-repair-EHL4ODQY.js} +12 -12
- package/dist/cli-bundle/chunks/{history-repair-5RDMF7K4.js → history-repair-YSQH6SY6.js} +12 -12
- package/dist/cli-bundle/chunks/init-C4CRHW22.js +21 -0
- package/dist/cli-bundle/chunks/{init-HASX3YNJ.js → init-HBFGYS66.js} +11 -11
- package/dist/cli-bundle/chunks/{learnings-JNGUIJDK.js → learnings-J555ZFPD.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-M4KA6MQE.js → learnings-KFQO7GEZ.js} +10 -10
- package/dist/cli-bundle/chunks/{list-6FMKTIH3.js → list-C7R33MD5.js} +10 -10
- package/dist/cli-bundle/chunks/{list-5UU2W24O.js → list-DSN6UNFB.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-PYCPLA5Y.js → notes-V4VNIQL4.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-MODH5CBT.js → notes-VYJFN2A3.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-DXRIRYRU.js → plan-DHRSVSHR.js} +14 -14
- package/dist/cli-bundle/chunks/{plan-EHQALWSC.js → plan-RBHQ5PO7.js} +14 -14
- package/dist/cli-bundle/chunks/{register-list-query-QAASVP2J.js → register-list-query-CCMHGZTF.js} +19 -19
- package/dist/cli-bundle/chunks/{register-list-query-WE54YJMH.js → register-list-query-OM3E2KMY.js} +19 -19
- package/dist/cli-bundle/chunks/{register-mutation-B6DZJTY2.js → register-mutation-N3CDEGZU.js} +33 -33
- package/dist/cli-bundle/chunks/{register-mutation-CPV4C2KR.js → register-mutation-UXTTWL6N.js} +33 -33
- package/dist/cli-bundle/chunks/{register-operations-RC4C3423.js → register-operations-R2FLOCRI.js} +32 -32
- package/dist/cli-bundle/chunks/{register-operations-AT3BVVX2.js → register-operations-UDIFMQKD.js} +32 -32
- package/dist/cli-bundle/chunks/{register-setup-JSMJEFCJ.js → register-setup-G5LTSFYK.js} +24 -20
- package/dist/cli-bundle/chunks/register-setup-G5LTSFYK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-HXEHMDHE.js → register-setup-TWHKICM2.js} +23 -19
- package/dist/cli-bundle/chunks/register-setup-TWHKICM2.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-FNBV4GWE.js → restore-LL2WLEDG.js} +11 -11
- package/dist/cli-bundle/chunks/restore-LQHXBAY5.js +19 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-ECL6GBMZ.js → scheduling-shortcuts-255GI3BU.js} +14 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-JRIUREEU.js → scheduling-shortcuts-M4H2ZI64.js} +14 -14
- package/dist/cli-bundle/chunks/{schema-74YENAJL.js → schema-C6QA367T.js} +9 -9
- package/dist/cli-bundle/chunks/{schema-TCW3I7QR.js → schema-QO5I4FBL.js} +9 -9
- package/dist/cli-bundle/chunks/{search-7USZ6XZA.js → search-2EI6EAXH.js} +12 -12
- package/dist/cli-bundle/chunks/{search-GNAUE65M.js → search-QBFBLQRO.js} +12 -12
- package/dist/cli-bundle/chunks/{stats-CVHASAEU.js → stats-TCW2SZQG.js} +8 -8
- package/dist/cli-bundle/chunks/{stats-DQMKJMFT.js → stats-TKC6CAKB.js} +8 -8
- package/dist/cli-bundle/chunks/{telemetry-PQTL5YS2.js → telemetry-BT2VSWU2.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-7P5EUWCS.js → telemetry-LQ6FRTUT.js} +4 -4
- package/dist/cli-bundle/chunks/{test-FDQZQNZ4.js → test-NV2DRPUS.js} +16 -16
- package/dist/cli-bundle/chunks/test-WA6RZGM2.js +36 -0
- package/dist/cli-bundle/chunks/{test-all-PIPPS4S5.js → test-all-DZ76VTPQ.js} +16 -16
- package/dist/cli-bundle/chunks/{test-all-WQIAZVA6.js → test-all-REW67LXT.js} +16 -16
- package/dist/cli-bundle/chunks/{test-runs-JS6DNCCI.js → test-runs-FQ5WNQLP.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-NZD2QGL5.js → test-runs-PX73DMMI.js} +5 -5
- package/dist/cli-bundle/chunks/update-BSKMQOYH.js +28 -0
- package/dist/cli-bundle/chunks/update-FIGYNQ2I.js +24 -0
- package/dist/cli-bundle/chunks/{update-many-B3TH5TDS.js → update-many-2ILP6E4Y.js} +23 -23
- package/dist/cli-bundle/chunks/{update-many-6NTZ5J5D.js → update-many-Q5ZEI64S.js} +23 -23
- package/dist/cli-bundle/chunks/{upgrade-76IKZ6EZ.js → upgrade-DHL74PQH.js} +6 -6
- package/dist/cli-bundle/chunks/{upgrade-4C7VE7MS.js → upgrade-FOZKQTQF.js} +6 -6
- package/dist/cli-bundle/chunks/{validate-BPM6Z3OT.js → validate-54SYJ7QW.js} +21 -21
- package/dist/cli-bundle/chunks/{validate-AQU7OCL3.js → validate-HYZNIB6W.js} +21 -21
- package/dist/cli-bundle/main.js +22 -18
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/extensions/activation-summary.d.ts +109 -0
- package/dist/core/extensions/activation-summary.js +60 -0
- package/dist/core/extensions/activation-summary.js.map +1 -0
- package/dist/core/extensions/capability-usage.d.ts +10 -0
- package/dist/core/extensions/capability-usage.js +12 -3
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -2
- package/dist/core/extensions/loader.js +40 -103
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/version-compat.d.ts +107 -0
- package/dist/core/extensions/version-compat.js +130 -0
- package/dist/core/extensions/version-compat.js.map +1 -0
- package/dist/core/telemetry/runtime.js +5 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +10 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/compose.d.ts +636 -0
- package/dist/sdk/compose.js +841 -0
- package/dist/sdk/compose.js.map +1 -0
- package/dist/sdk/define.d.ts +195 -0
- package/dist/sdk/define.js +204 -0
- package/dist/sdk/define.js.map +1 -0
- package/dist/sdk/index.d.ts +4 -27
- package/dist/sdk/index.js +5 -12
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +221 -2
- package/dist/sdk/testing.js +276 -2
- package/dist/sdk/testing.js.map +1 -1
- package/docs/COMMANDS.md +1 -0
- package/docs/EXTENSIONS.md +18 -14
- package/docs/SDK.md +445 -16
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-NEOI45NX.js +0 -18
- package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7GCCDXXN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7MPTFYT3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-D35LTIFR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KL5ELX2X.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RZZMSY4P.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TRUFOER3.js.map +0 -7
- package/dist/cli-bundle/chunks/close-Z6AI736U.js +0 -15
- package/dist/cli-bundle/chunks/contracts-7YDFEJB3.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-MP2P3HL5.js.map +0 -1
- package/dist/cli-bundle/chunks/create-3BV2VA3Q.js +0 -30
- package/dist/cli-bundle/chunks/history-YRQUD4YM.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-27OEOZRZ.js +0 -21
- package/dist/cli-bundle/chunks/init-DWAKYRXI.js +0 -21
- package/dist/cli-bundle/chunks/register-setup-HXEHMDHE.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-JSMJEFCJ.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-XY4YE2OV.js +0 -19
- package/dist/cli-bundle/chunks/test-COWPCGBE.js +0 -36
- package/dist/cli-bundle/chunks/update-7IYQHX4Q.js +0 -24
- package/dist/cli-bundle/chunks/update-IJKDRBIX.js +0 -28
- /package/dist/cli-bundle/chunks/{activity-NEOI45NX.js.map → activity-54TXGJ2T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-DXS2XMQU.js.map → activity-N7RVTLBQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-IHM4KMQ3.js.map → aggregate-63NWNIBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-NMYDVQF7.js.map → aggregate-YHCYX2EV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-3HY5G7ET.js.map → append-PUKREFV5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-K54MDQYC.js.map → append-VLQQDHMJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DU64SZUQ.js.map → chunk-2WCYE3IF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKZOJPXK.js.map → chunk-3BKH2CL3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7MALIV5H.js.map → chunk-4XDGYFHL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VB54F347.js.map → chunk-5BBEWX6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DHBPJ7VG.js.map → chunk-5S4ZGDB2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UKK2VTTH.js.map → chunk-6EBNFQOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5SESR24H.js.map → chunk-6EL7SW5C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JLSC5NPC.js.map → chunk-6W3Y65PL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYQV75IB.js.map → chunk-A66VYUOV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I367IDZP.js.map → chunk-ABYCA5VX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-47HTJ6BU.js.map → chunk-AEACLRVH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MD7XKVWI.js.map → chunk-ALKFCIIB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B2KR24R4.js.map → chunk-ALQKV6U7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NIWY4V4Z.js.map → chunk-AYPQUFCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AJXYOYJV.js.map → chunk-B74BP6IS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-THKDPOS5.js.map → chunk-BFFO3AIB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CR7KFPAQ.js.map → chunk-C4C3EJCJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J2TSPY5L.js.map → chunk-CG3KP6I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CWPBGUC7.js.map → chunk-CZIFFMZI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-75VEYQJS.js.map → chunk-DTABLLVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TIKJAXQW.js.map → chunk-EOGBMLCE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YATDFWYK.js.map → chunk-EWRSXOIZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RPRFBXND.js.map → chunk-F32L4HR6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NVUATMTC.js.map → chunk-F4BNR2IN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4BZEND6.js.map → chunk-FBLT6WGK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PCH2JTEO.js.map → chunk-FMWW2JDU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQDX7DVG.js.map → chunk-GDUMGZK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FK6MV5F5.js.map → chunk-HBAEFWX3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6UPTNMVW.js.map → chunk-HC2S36NB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XKNF3VRJ.js.map → chunk-HZF5RLKX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4JXWVHMN.js.map → chunk-I6QMJ2XT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44O4JIN6.js.map → chunk-IAP5KYBQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7E4ZXG2.js.map → chunk-IOT6WRL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KRJJPDUO.js.map → chunk-IXAZI443.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DMT4ODVN.js.map → chunk-J3NMWFIN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7PBGTIN3.js.map → chunk-J7I4C5ZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CLLVBO3I.js.map → chunk-JPJDP4VU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PJS2J7Z4.js.map → chunk-JV27C7OZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K25UDYJ4.js.map → chunk-KIEAK7YE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GGAXE22C.js.map → chunk-KJZOSF7J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GXBSFKSX.js.map → chunk-KKX4Z2SE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C5SWTISA.js.map → chunk-LNEDHJNQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YRLLL5TY.js.map → chunk-LU36E6GU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I6XE47J2.js.map → chunk-M6TUBOGW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YJICYNAV.js.map → chunk-MWMHZOZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SFKQAVZA.js.map → chunk-N5B6WZC5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WBSYW3NT.js.map → chunk-NVXGVEFD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GNDHOR64.js.map → chunk-OHDQNKJB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2LEYMXI6.js.map → chunk-OQ2E64FH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-25XZN3JD.js.map → chunk-PEL2NLQE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H6FNDCDI.js.map → chunk-PRVTGX64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZQKEBKF.js.map → chunk-QOUOMPHO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-77VKGH4L.js.map → chunk-RAWA3Y7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y335KFHD.js.map → chunk-RRP6D345.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4SDKF5BG.js.map → chunk-SKC4UTRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JY25IOEZ.js.map → chunk-SUREE24M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A25LOPRG.js.map → chunk-TIM4OD74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KK4TQ3ZP.js.map → chunk-TKPP4GOO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6FQHNHQQ.js.map → chunk-TSI32UEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TJABI6PR.js.map → chunk-UACWNBL2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVPVCE4R.js.map → chunk-V4UYNSEM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QQWEROGS.js.map → chunk-VFJYVXHL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQSWTVZF.js.map → chunk-WB5BYQMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MNGAQB2E.js.map → chunk-XVYKWZNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-V4SM4UAL.js.map → chunk-XXKV4UWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GU7YHKYP.js.map → chunk-YV2OSAMS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P7ZU73BO.js.map → chunk-ZLWRPBOW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3VLPDG3J.js.map → chunk-ZV7IQ23N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-MPXNVBZQ.js.map → claim-FZZZCAY6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-SKHJDLW6.js.map → claim-XK5QBZE3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-Z6AI736U.js.map → close-JEBZXONN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-4RKSL5L6.js.map → close-QHMVWM7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-SXODYBDP.js.map → close-many-OIXJE2JZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-AWTPXLHJ.js.map → close-many-SUU5BS2C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-YYW5P7AG.js.map → comments-5YM62D75.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-OOH64LWW.js.map → comments-RH3IBIRH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-3445MCQQ.js.map → config-NCNNWF6R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-LCDMKRB2.js.map → config-SW3U7XP2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-PJCURODY.js.map → context-55VEOYI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-DZMIBIVP.js.map → context-5LB7UGKE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-63IQQRRS.js.map → copy-IEDBJOOX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-TASIH2AZ.js.map → copy-N3GE6FYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-3BV2VA3Q.js.map → create-CLSCHGJJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-TGSB5GV4.js.map → create-O4VONGPG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ARILQQLB.js.map → delete-724EQ6OS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ZQKBZYNK.js.map → delete-LPEIF7RU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-MSHQR2GY.js.map → deps-RSBU4SIU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-NJFJIMQ5.js.map → deps-T3Y6Y7RT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-XK2UVUXX.js.map → docs-75ZLCO3G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-SS4UKYYA.js.map → docs-IFS7HZPP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-JOTG2YHU.js.map → eval-L2KD7W3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-FVZGX5IZ.js.map → eval-QGR7JCQO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-OQPS27B4.js.map → extension-3JYWJ5K2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-NLMS47I4.js.map → extension-YQF4CPIR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-Y2P6LN5A.js.map → files-5BQWDRDT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-3EVJQZ2N.js.map → files-EPEJMJHQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-D5ZUPTII.js.map → focus-DQVJAPOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-ZPIFTY4R.js.map → focus-RWGKD76E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-LXXDY456.js.map → gc-BEJMQT64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-RNOEQHSX.js.map → gc-JEFQDJPA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-W23G7MJX.js.map → get-LQG6PEVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-Q3SZGQHD.js.map → get-WVN75H42.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-UDDGJLPP.js.map → health-JJJOY7DJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-5LHSX365.js.map → health-P67NZ6TT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-YRQUD4YM.js.map → history-ALTM2RRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-6CZVFIUJ.js.map → history-RUKPKNY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-VWUSQH6Z.js.map → history-compact-NQ7VPRVT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-M35PDQ4G.js.map → history-compact-ZAOWR7GD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-27OEOZRZ.js.map → history-redact-5YGLWUDH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-AJGARHT3.js.map → history-redact-YY4XYVEP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-YUAHIPIN.js.map → history-repair-EHL4ODQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-5RDMF7K4.js.map → history-repair-YSQH6SY6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-DWAKYRXI.js.map → init-C4CRHW22.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-HASX3YNJ.js.map → init-HBFGYS66.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-JNGUIJDK.js.map → learnings-J555ZFPD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-M4KA6MQE.js.map → learnings-KFQO7GEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-6FMKTIH3.js.map → list-C7R33MD5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-5UU2W24O.js.map → list-DSN6UNFB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-PYCPLA5Y.js.map → notes-V4VNIQL4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-MODH5CBT.js.map → notes-VYJFN2A3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-DXRIRYRU.js.map → plan-DHRSVSHR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-EHQALWSC.js.map → plan-RBHQ5PO7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-QAASVP2J.js.map → register-list-query-CCMHGZTF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-WE54YJMH.js.map → register-list-query-OM3E2KMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-B6DZJTY2.js.map → register-mutation-N3CDEGZU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-CPV4C2KR.js.map → register-mutation-UXTTWL6N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-RC4C3423.js.map → register-operations-R2FLOCRI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-AT3BVVX2.js.map → register-operations-UDIFMQKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-FNBV4GWE.js.map → restore-LL2WLEDG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-XY4YE2OV.js.map → restore-LQHXBAY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-ECL6GBMZ.js.map → scheduling-shortcuts-255GI3BU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-JRIUREEU.js.map → scheduling-shortcuts-M4H2ZI64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-74YENAJL.js.map → schema-C6QA367T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-TCW3I7QR.js.map → schema-QO5I4FBL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-7USZ6XZA.js.map → search-2EI6EAXH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-GNAUE65M.js.map → search-QBFBLQRO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-CVHASAEU.js.map → stats-TCW2SZQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-DQMKJMFT.js.map → stats-TKC6CAKB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-PQTL5YS2.js.map → telemetry-BT2VSWU2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-7P5EUWCS.js.map → telemetry-LQ6FRTUT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-FDQZQNZ4.js.map → test-NV2DRPUS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-COWPCGBE.js.map → test-WA6RZGM2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-PIPPS4S5.js.map → test-all-DZ76VTPQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-WQIAZVA6.js.map → test-all-REW67LXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-JS6DNCCI.js.map → test-runs-FQ5WNQLP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-NZD2QGL5.js.map → test-runs-PX73DMMI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-IJKDRBIX.js.map → update-BSKMQOYH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-7IYQHX4Q.js.map → update-FIGYNQ2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-B3TH5TDS.js.map → update-many-2ILP6E4Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-6NTZ5J5D.js.map → update-many-Q5ZEI64S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-76IKZ6EZ.js.map → upgrade-DHL74PQH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-4C7VE7MS.js.map → upgrade-FOZKQTQF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-BPM6Z3OT.js.map → validate-54SYJ7QW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-AQU7OCL3.js.map → validate-HYZNIB6W.js.map} +0 -0
|
@@ -0,0 +1,841 @@
|
|
|
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]="376f0804-a437-515f-a653-485531d98f13")}catch(e){}}();
|
|
3
|
+
import { normalizeKnownExtensionCapability, resolveLegacyExtensionCapabilityAlias, } from "../core/extensions/extension-capability-aliases.js";
|
|
4
|
+
import { normalizeCommandName } from "../core/extensions/extension-runtime-helpers.js";
|
|
5
|
+
import { evaluatePmMaxVersionBound, evaluatePmMinVersionBound, } from "../core/extensions/version-compat.js";
|
|
6
|
+
/**
|
|
7
|
+
* Typed identity helper for extension module exports.
|
|
8
|
+
*
|
|
9
|
+
* Use as:
|
|
10
|
+
* `export default defineExtension({ activate(api) { ... } })`
|
|
11
|
+
*
|
|
12
|
+
* Reach for {@link composeExtension} instead when you would rather declare the
|
|
13
|
+
* registrations as data than wire them imperatively in `activate`.
|
|
14
|
+
*/
|
|
15
|
+
export function defineExtension(module) {
|
|
16
|
+
return module;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Typed identity helper for a (partial) {@link ExtensionBlueprint} authored as its
|
|
20
|
+
* own module — the typed entry point of the modular declarative-authoring loop.
|
|
21
|
+
*
|
|
22
|
+
* It is the natural companion to {@link mergeExtensionBlueprints}: when an
|
|
23
|
+
* extension's surface is split across files — a commands module, a search module,
|
|
24
|
+
* a hooks module — wrap each fragment so it is contract-checked *at its definition
|
|
25
|
+
* site* (with editor completion), exactly as {@link defineExtension} types a whole
|
|
26
|
+
* module and {@link defineExtensionManifest} types a manifest. It returns its
|
|
27
|
+
* argument unchanged, preserving the literal type
|
|
28
|
+
* so the fragment composes into {@link mergeExtensionBlueprints},
|
|
29
|
+
* {@link composeExtension}, or {@link composeExtensionPackage} with no loss of
|
|
30
|
+
* inference.
|
|
31
|
+
*
|
|
32
|
+
* Use as:
|
|
33
|
+
* `export const commandsModule = defineExtensionBlueprint({ commands: [...] })`
|
|
34
|
+
*/
|
|
35
|
+
export function defineExtensionBlueprint(blueprint) {
|
|
36
|
+
return blueprint;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Assemble an {@link ExtensionModule} from a declarative {@link ExtensionBlueprint}.
|
|
40
|
+
*
|
|
41
|
+
* The returned module's `activate` registers every populated surface through the
|
|
42
|
+
* matching `api.register*` method in a deterministic order (commands → overrides
|
|
43
|
+
* → flags → parsers → renderers → services → preflights → item types → item
|
|
44
|
+
* fields → migrations → search providers → vector store adapters → importers →
|
|
45
|
+
* exporters → hooks), then awaits the blueprint's optional imperative `activate`
|
|
46
|
+
* so it can layer on anything the declarative form cannot express. `manifest`
|
|
47
|
+
* and `deactivate` are copied onto the module verbatim.
|
|
48
|
+
*
|
|
49
|
+
* This is a pure assembler: it does not validate the definitions. Per-surface
|
|
50
|
+
* contract enforcement stays in `api.register*` (and the loader), exactly as it
|
|
51
|
+
* does for hand-written `activate` bodies, so a malformed definition surfaces
|
|
52
|
+
* the same activation diagnostic either way.
|
|
53
|
+
*/
|
|
54
|
+
export function composeExtension(blueprint) {
|
|
55
|
+
const activate = async (api) => {
|
|
56
|
+
for (const command of blueprint.commands ?? []) {
|
|
57
|
+
api.registerCommand(command);
|
|
58
|
+
}
|
|
59
|
+
for (const [command, override] of Object.entries(blueprint.commandOverrides ?? {})) {
|
|
60
|
+
api.registerCommand(command, override);
|
|
61
|
+
}
|
|
62
|
+
for (const [targetCommand, flags] of Object.entries(blueprint.flags ?? {})) {
|
|
63
|
+
api.registerFlags(targetCommand, flags);
|
|
64
|
+
}
|
|
65
|
+
for (const [command, override] of Object.entries(blueprint.parsers ?? {})) {
|
|
66
|
+
api.registerParser(command, override);
|
|
67
|
+
}
|
|
68
|
+
for (const [format, renderer] of Object.entries(blueprint.renderers ?? {})) {
|
|
69
|
+
api.registerRenderer(format, renderer);
|
|
70
|
+
}
|
|
71
|
+
for (const [service, override] of Object.entries(blueprint.services ?? {})) {
|
|
72
|
+
api.registerService(service, override);
|
|
73
|
+
}
|
|
74
|
+
for (const override of blueprint.preflights ?? []) {
|
|
75
|
+
api.registerPreflight(override);
|
|
76
|
+
}
|
|
77
|
+
const itemTypes = blueprint.itemTypes ?? [];
|
|
78
|
+
if (itemTypes.length > 0) {
|
|
79
|
+
api.registerItemTypes(itemTypes);
|
|
80
|
+
}
|
|
81
|
+
const itemFields = blueprint.itemFields ?? [];
|
|
82
|
+
if (itemFields.length > 0) {
|
|
83
|
+
api.registerItemFields(itemFields);
|
|
84
|
+
}
|
|
85
|
+
for (const migration of blueprint.migrations ?? []) {
|
|
86
|
+
api.registerMigration(migration);
|
|
87
|
+
}
|
|
88
|
+
for (const provider of blueprint.searchProviders ?? []) {
|
|
89
|
+
api.registerSearchProvider(provider);
|
|
90
|
+
}
|
|
91
|
+
for (const adapter of blueprint.vectorStoreAdapters ?? []) {
|
|
92
|
+
api.registerVectorStoreAdapter(adapter);
|
|
93
|
+
}
|
|
94
|
+
for (const entry of blueprint.importers ?? []) {
|
|
95
|
+
api.registerImporter(entry.name, entry.importer, entry.options);
|
|
96
|
+
}
|
|
97
|
+
for (const entry of blueprint.exporters ?? []) {
|
|
98
|
+
api.registerExporter(entry.name, entry.exporter, entry.options);
|
|
99
|
+
}
|
|
100
|
+
// `?? {}` (rather than a `!== undefined` guard) so an explicit `hooks: null`
|
|
101
|
+
// crossing an untyped boundary (e.g. a blueprint hydrated from JSON) is
|
|
102
|
+
// treated the same as omitting it, instead of throwing on the first
|
|
103
|
+
// `hooks.beforeCommand` access.
|
|
104
|
+
const hooks = blueprint.hooks ?? {};
|
|
105
|
+
for (const hook of hooks.beforeCommand ?? []) {
|
|
106
|
+
api.hooks.beforeCommand(hook);
|
|
107
|
+
}
|
|
108
|
+
for (const hook of hooks.afterCommand ?? []) {
|
|
109
|
+
api.hooks.afterCommand(hook);
|
|
110
|
+
}
|
|
111
|
+
for (const hook of hooks.onWrite ?? []) {
|
|
112
|
+
api.hooks.onWrite(hook);
|
|
113
|
+
}
|
|
114
|
+
for (const hook of hooks.onRead ?? []) {
|
|
115
|
+
api.hooks.onRead(hook);
|
|
116
|
+
}
|
|
117
|
+
for (const hook of hooks.onIndex ?? []) {
|
|
118
|
+
api.hooks.onIndex(hook);
|
|
119
|
+
}
|
|
120
|
+
await blueprint.activate?.(api);
|
|
121
|
+
};
|
|
122
|
+
// Truthy checks (rather than `!== undefined`) so an explicit `null` mirror or
|
|
123
|
+
// teardown is treated as absent instead of copied onto the module.
|
|
124
|
+
const module = { activate };
|
|
125
|
+
if (blueprint.manifest) {
|
|
126
|
+
module.manifest = blueprint.manifest;
|
|
127
|
+
}
|
|
128
|
+
if (blueprint.deactivate) {
|
|
129
|
+
module.deactivate = blueprint.deactivate;
|
|
130
|
+
}
|
|
131
|
+
return module;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Concatenate the populated entries of an array surface across blueprints,
|
|
135
|
+
* preserving argument order. Returns `undefined` when no blueprint contributes
|
|
136
|
+
* any entry, so {@link mergeExtensionBlueprints} omits the field instead of
|
|
137
|
+
* emitting an empty array. `?? []` tolerates an explicit `null` field (e.g. from a
|
|
138
|
+
* blueprint hydrated across an untyped boundary) exactly as {@link composeExtension} does.
|
|
139
|
+
*/
|
|
140
|
+
function mergeArraySurface(surfaces) {
|
|
141
|
+
const merged = surfaces.flatMap((surface) => surface ?? []);
|
|
142
|
+
return merged.length > 0 ? merged : undefined;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Shallow-merge single-handler record surfaces (`commandOverrides`, `parsers`,
|
|
146
|
+
* `renderers`, `services`) with last-defined-wins precedence on a key collision,
|
|
147
|
+
* exactly like spreading the records in argument order. Returns `undefined` when
|
|
148
|
+
* no blueprint contributes any key.
|
|
149
|
+
*/
|
|
150
|
+
function mergeHandlerRecord(surfaces) {
|
|
151
|
+
const merged = Object.assign({}, ...surfaces.map((surface) => surface ?? {}));
|
|
152
|
+
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Merge `flags` records by concatenating every blueprint's flag array for a shared
|
|
156
|
+
* target command, mirroring the additive `api.registerFlags` semantics so each
|
|
157
|
+
* module's flags reach the command. Returns `undefined` when no blueprint declares
|
|
158
|
+
* any flags.
|
|
159
|
+
*/
|
|
160
|
+
function mergeFlagRecord(surfaces) {
|
|
161
|
+
const merged = {};
|
|
162
|
+
for (const surface of surfaces) {
|
|
163
|
+
for (const [command, flags] of Object.entries(surface ?? {})) {
|
|
164
|
+
// `flags` is the record's array value, never nullish in-type — `composeExtension`
|
|
165
|
+
// likewise passes it to `registerFlags` unguarded — so it is spread directly.
|
|
166
|
+
merged[command] = [...(merged[command] ?? []), ...flags];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
170
|
+
}
|
|
171
|
+
const EXTENSION_BLUEPRINT_HOOK_KEYS = [
|
|
172
|
+
"beforeCommand",
|
|
173
|
+
"afterCommand",
|
|
174
|
+
"onWrite",
|
|
175
|
+
"onRead",
|
|
176
|
+
"onIndex",
|
|
177
|
+
];
|
|
178
|
+
// Compile-time exhaustiveness guard: adding a hook field must update the canonical
|
|
179
|
+
// merge order above, and stale keys cannot remain in that list.
|
|
180
|
+
const EXTENSION_BLUEPRINT_HOOK_KEY_COVERAGE = {};
|
|
181
|
+
void EXTENSION_BLUEPRINT_HOOK_KEY_COVERAGE;
|
|
182
|
+
function assignMergedHookSurface(merged, surfaces, key) {
|
|
183
|
+
const hookArrays = surfaces.map((hooks) => hooks?.[key]);
|
|
184
|
+
const value = mergeArraySurface(hookArrays);
|
|
185
|
+
if (value !== undefined) {
|
|
186
|
+
const typedMerged = merged;
|
|
187
|
+
typedMerged[key] = value;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Merge the nested `hooks` surface by concatenating each lifecycle kind's array in
|
|
192
|
+
* canonical order. Returns `undefined` when no blueprint registers any hook.
|
|
193
|
+
*/
|
|
194
|
+
function mergeHookSurfaces(surfaces) {
|
|
195
|
+
const merged = {};
|
|
196
|
+
for (const key of EXTENSION_BLUEPRINT_HOOK_KEYS) {
|
|
197
|
+
assignMergedHookSurface(merged, surfaces, key);
|
|
198
|
+
}
|
|
199
|
+
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Merge several partial {@link ExtensionBlueprint}s into one, so an extension's
|
|
203
|
+
* surface can be authored *modularly* — a commands module, a search module, a
|
|
204
|
+
* hooks module — and combined into a single blueprint to feed
|
|
205
|
+
* {@link composeExtension}, {@link composeExtensionPackage},
|
|
206
|
+
* {@link synthesizeExtensionManifest}, {@link describeExtensionBlueprint}, or
|
|
207
|
+
* {@link preflightExtension}.
|
|
208
|
+
*
|
|
209
|
+
* The merge is pure and deterministic and never mutates an input. Each surface
|
|
210
|
+
* combines the way its underlying `api.register*` call composes:
|
|
211
|
+
*
|
|
212
|
+
* - **Array surfaces** — `commands`, `preflights`, `itemTypes`, `itemFields`,
|
|
213
|
+
* `migrations`, `searchProviders`, `vectorStoreAdapters`, `importers`,
|
|
214
|
+
* `exporters` — concatenate in argument order.
|
|
215
|
+
* - **`flags`** concatenates the flag arrays of any shared target command,
|
|
216
|
+
* mirroring additive `api.registerFlags`: every module's flags reach the command.
|
|
217
|
+
* - **Single-handler records** — `commandOverrides`, `parsers`, `renderers`,
|
|
218
|
+
* `services` — follow last-defined-wins precedence on a key collision, exactly
|
|
219
|
+
* like spreading the records in argument order; a later module deliberately
|
|
220
|
+
* overrides an earlier one's handler for that key.
|
|
221
|
+
* - **`hooks`** concatenates each lifecycle kind's array in canonical order.
|
|
222
|
+
* - The imperative **`activate`** escape hatches chain in argument order (each
|
|
223
|
+
* awaited), so every module's escape-hatch wiring still runs.
|
|
224
|
+
* - The **`deactivate`** teardown hooks chain in *reverse* argument order (LIFO),
|
|
225
|
+
* releasing resources in the inverse of acquisition. Teardown is best-effort:
|
|
226
|
+
* a throwing hook does not strand later modules' cleanup — every hook runs and
|
|
227
|
+
* teardown failures are re-thrown afterwards (as the original error for one
|
|
228
|
+
* failure, or an `AggregateError` for several).
|
|
229
|
+
* - The **`manifest`** mirror is last-defined-wins.
|
|
230
|
+
*
|
|
231
|
+
* Because `composeExtension` and the derive/lint/describe helpers are pure readers
|
|
232
|
+
* of this data, a merged blueprint behaves exactly as a hand-written one: a command
|
|
233
|
+
* two modules both define survives as a duplicate in the merged `commands` array
|
|
234
|
+
* and {@link lintExtensionBlueprint} flags it, just as it would in one file. An
|
|
235
|
+
* empty field is omitted rather than emitted empty, so merging zero blueprints
|
|
236
|
+
* returns an empty blueprint (`{}`).
|
|
237
|
+
*/
|
|
238
|
+
export function mergeExtensionBlueprints(...blueprints) {
|
|
239
|
+
const merged = {};
|
|
240
|
+
const assign = (key, value) => {
|
|
241
|
+
if (value !== undefined) {
|
|
242
|
+
merged[key] = value;
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
assign("commands", mergeArraySurface(blueprints.map((blueprint) => blueprint.commands)));
|
|
246
|
+
assign("commandOverrides", mergeHandlerRecord(blueprints.map((blueprint) => blueprint.commandOverrides)));
|
|
247
|
+
assign("flags", mergeFlagRecord(blueprints.map((blueprint) => blueprint.flags)));
|
|
248
|
+
assign("parsers", mergeHandlerRecord(blueprints.map((blueprint) => blueprint.parsers)));
|
|
249
|
+
assign("renderers", mergeHandlerRecord(blueprints.map((blueprint) => blueprint.renderers)));
|
|
250
|
+
assign("services", mergeHandlerRecord(blueprints.map((blueprint) => blueprint.services)));
|
|
251
|
+
assign("preflights", mergeArraySurface(blueprints.map((blueprint) => blueprint.preflights)));
|
|
252
|
+
assign("itemTypes", mergeArraySurface(blueprints.map((blueprint) => blueprint.itemTypes)));
|
|
253
|
+
assign("itemFields", mergeArraySurface(blueprints.map((blueprint) => blueprint.itemFields)));
|
|
254
|
+
assign("migrations", mergeArraySurface(blueprints.map((blueprint) => blueprint.migrations)));
|
|
255
|
+
assign("searchProviders", mergeArraySurface(blueprints.map((blueprint) => blueprint.searchProviders)));
|
|
256
|
+
assign("vectorStoreAdapters", mergeArraySurface(blueprints.map((blueprint) => blueprint.vectorStoreAdapters)));
|
|
257
|
+
assign("importers", mergeArraySurface(blueprints.map((blueprint) => blueprint.importers)));
|
|
258
|
+
assign("exporters", mergeArraySurface(blueprints.map((blueprint) => blueprint.exporters)));
|
|
259
|
+
assign("hooks", mergeHookSurfaces(blueprints.map((blueprint) => blueprint.hooks)));
|
|
260
|
+
// Last-defined-wins for the in-module manifest mirror: a later module's identity
|
|
261
|
+
// supersedes an earlier one's, matching the single-handler record precedence.
|
|
262
|
+
let manifest;
|
|
263
|
+
for (const blueprint of blueprints) {
|
|
264
|
+
if (blueprint.manifest) {
|
|
265
|
+
manifest = blueprint.manifest;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
assign("manifest", manifest);
|
|
269
|
+
// Imperative escape hatches chain forward (acquisition order); teardown chains
|
|
270
|
+
// in reverse (LIFO), so resources release in the inverse of acquisition.
|
|
271
|
+
const hasActivates = blueprints.some((blueprint) => blueprint.activate);
|
|
272
|
+
assign("activate", hasActivates
|
|
273
|
+
? async (api) => {
|
|
274
|
+
for (const blueprint of blueprints) {
|
|
275
|
+
if (blueprint.activate) {
|
|
276
|
+
await blueprint.activate(api);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
: undefined);
|
|
281
|
+
const hasDeactivates = blueprints.some((blueprint) => blueprint.deactivate);
|
|
282
|
+
assign("deactivate", hasDeactivates
|
|
283
|
+
? async () => {
|
|
284
|
+
// Teardown is best-effort across modules: a throwing `deactivate` must
|
|
285
|
+
// not strand a later module's cleanup, so every hook runs (in reverse,
|
|
286
|
+
// LIFO) and failures are surfaced after cleanup completes.
|
|
287
|
+
const errors = [];
|
|
288
|
+
for (const blueprint of [...blueprints].reverse()) {
|
|
289
|
+
if (!blueprint.deactivate) {
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
try {
|
|
293
|
+
await blueprint.deactivate();
|
|
294
|
+
}
|
|
295
|
+
catch (error) {
|
|
296
|
+
errors.push(error);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (errors.length > 0) {
|
|
300
|
+
if (errors.length > 1) {
|
|
301
|
+
throw new AggregateError(errors, "Multiple extension blueprint deactivate hooks failed.");
|
|
302
|
+
}
|
|
303
|
+
throw errors[0];
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
: undefined);
|
|
307
|
+
return merged;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Blueprint registration fields whose presence implies a capability, paired with
|
|
311
|
+
* the capability each grants. Mirrors `EXTENSION_CAPABILITY_REGISTRATION_SURFACES`
|
|
312
|
+
* so a blueprint's derived capabilities exactly match what the loader enforces
|
|
313
|
+
* when {@link composeExtension}'s generated `activate` calls `api.register*`.
|
|
314
|
+
*
|
|
315
|
+
* `hooks` is handled separately (it is a nested object, not an array/record of
|
|
316
|
+
* registrations) and so is intentionally absent from this table.
|
|
317
|
+
*/
|
|
318
|
+
const BLUEPRINT_FIELD_CAPABILITIES = [
|
|
319
|
+
["commands", "commands"],
|
|
320
|
+
["commandOverrides", "commands"],
|
|
321
|
+
["flags", "schema"],
|
|
322
|
+
["itemTypes", "schema"],
|
|
323
|
+
["itemFields", "schema"],
|
|
324
|
+
["migrations", "schema"],
|
|
325
|
+
["parsers", "parser"],
|
|
326
|
+
["renderers", "renderers"],
|
|
327
|
+
["services", "services"],
|
|
328
|
+
["preflights", "preflight"],
|
|
329
|
+
["searchProviders", "search"],
|
|
330
|
+
["vectorStoreAdapters", "search"],
|
|
331
|
+
["importers", "importers"],
|
|
332
|
+
["exporters", "importers"],
|
|
333
|
+
];
|
|
334
|
+
function hasEntries(value) {
|
|
335
|
+
// `!value` treats both `null` and `undefined` as "no entries", so an untyped
|
|
336
|
+
// JavaScript author cannot crash capability derivation with an explicit null
|
|
337
|
+
// field — `Object.keys(null)` would otherwise throw.
|
|
338
|
+
if (!value) {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
341
|
+
if (Array.isArray(value)) {
|
|
342
|
+
return value.length > 0;
|
|
343
|
+
}
|
|
344
|
+
return Object.keys(value).length > 0;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Compute the minimal least-privilege capability set a {@link ExtensionBlueprint}
|
|
348
|
+
* exercises, sorted and de-duplicated.
|
|
349
|
+
*
|
|
350
|
+
* Use it to author `manifest.json` `capabilities` exactly — declaring nothing the
|
|
351
|
+
* extension does not use and nothing it does. It is the author-time inverse of
|
|
352
|
+
* the runtime `reconcileExtensionCapabilityUsage` reconciliation: derive the set
|
|
353
|
+
* here before activation rather than detecting drift after it. A blueprint with
|
|
354
|
+
* no registration surfaces returns an empty array.
|
|
355
|
+
*/
|
|
356
|
+
export function deriveExtensionCapabilities(blueprint) {
|
|
357
|
+
const capabilities = new Set();
|
|
358
|
+
for (const [field, capability] of BLUEPRINT_FIELD_CAPABILITIES) {
|
|
359
|
+
if (hasEntries(blueprint[field])) {
|
|
360
|
+
capabilities.add(capability);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
// A command definition carrying its own inline `flags` registers them through
|
|
364
|
+
// `registerCommand`, which asserts the `schema` capability independently of the
|
|
365
|
+
// top-level `flags` record. Mirror that here so the derived set still matches
|
|
366
|
+
// what activation enforces when a command declares flags inline and the
|
|
367
|
+
// blueprint has no separate `flags` field. `!== undefined` (not a truthiness or
|
|
368
|
+
// length check) matches the loader's exact guard, including an empty inline array.
|
|
369
|
+
if ((blueprint.commands ?? []).some((command) => command.flags !== undefined)) {
|
|
370
|
+
capabilities.add("schema");
|
|
371
|
+
}
|
|
372
|
+
// `?? {}` keeps an explicit `hooks: null` from throwing, mirroring composeExtension.
|
|
373
|
+
const hooks = blueprint.hooks ?? {};
|
|
374
|
+
if ([hooks.beforeCommand, hooks.afterCommand, hooks.onWrite, hooks.onRead, hooks.onIndex].some(hasEntries)) {
|
|
375
|
+
capabilities.add("hooks");
|
|
376
|
+
}
|
|
377
|
+
return [...capabilities].sort((left, right) => left.localeCompare(right));
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Blueprint hook fields paired with the lifecycle kind each registers, ordered to
|
|
381
|
+
* match `ExtensionActivationResult.hook_counts` (and the runtime
|
|
382
|
+
* {@link ../core/extensions/activation-summary.js#describeExtensionActivation}'s
|
|
383
|
+
* `hooks` ordering) so a blueprint summary's `hooks` list reads in the same
|
|
384
|
+
* canonical order, not alphabetically.
|
|
385
|
+
*/
|
|
386
|
+
const BLUEPRINT_HOOK_FIELD_TO_KIND = [
|
|
387
|
+
["beforeCommand", "before_command"],
|
|
388
|
+
["afterCommand", "after_command"],
|
|
389
|
+
["onWrite", "on_write"],
|
|
390
|
+
["onRead", "on_read"],
|
|
391
|
+
["onIndex", "on_index"],
|
|
392
|
+
];
|
|
393
|
+
/** De-duplicate and locale-sort a list of identifiers, mirroring the runtime summary. */
|
|
394
|
+
function sortUnique(values) {
|
|
395
|
+
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Compute, without activating, the exact {@link ExtensionActivationSummary} that
|
|
399
|
+
* {@link composeExtension}'s generated `activate` would produce for a blueprint.
|
|
400
|
+
*
|
|
401
|
+
* This is the author-time inverse of the runtime
|
|
402
|
+
* {@link ../core/extensions/activation-summary.js#describeExtensionActivation}:
|
|
403
|
+
* the runtime verb walks an *activated* registry, while this one reads the
|
|
404
|
+
* declarative {@link ExtensionBlueprint} data directly, so an author or agent can
|
|
405
|
+
* preview the full named surface map (commands, overrides, handlers, hooks, item
|
|
406
|
+
* types/fields, importers/exporters, search/vector adapters, parser/service/
|
|
407
|
+
* renderer overrides, flag-target commands, and the preflight count) with no
|
|
408
|
+
* loading, activation, or side effects. It is to the named surfaces what
|
|
409
|
+
* {@link deriveExtensionCapabilities} is to the capability set.
|
|
410
|
+
*
|
|
411
|
+
* Fidelity is by construction: command paths are normalized with the same
|
|
412
|
+
* `normalizeCommandName` the loader applies, and importer/exporter handler paths
|
|
413
|
+
* are synthesized as `normalizeCommandName("<name> import|export")`, exactly as
|
|
414
|
+
* `registerImporter`/`registerExporter` do. A parity test pins this output equal
|
|
415
|
+
* to `describeExtensionActivation` over the same composed-and-activated blueprint.
|
|
416
|
+
*
|
|
417
|
+
* The one surface it cannot reflect is the blueprint's optional imperative
|
|
418
|
+
* `activate` escape hatch — arbitrary code a static reader cannot inspect. A
|
|
419
|
+
* blueprint that registers everything through that hatch summarizes as empty.
|
|
420
|
+
*/
|
|
421
|
+
export function describeExtensionBlueprint(blueprint) {
|
|
422
|
+
const commandPaths = (blueprint.commands ?? []).map((command) => normalizeCommandName(command.name));
|
|
423
|
+
const importerPaths = (blueprint.importers ?? []).map((entry) => normalizeCommandName(`${entry.name} import`));
|
|
424
|
+
const exporterPaths = (blueprint.exporters ?? []).map((entry) => normalizeCommandName(`${entry.name} export`));
|
|
425
|
+
// A command definition with inline `flags` registers a flag target under its own
|
|
426
|
+
// path in addition to any top-level `flags` record, so union both sources.
|
|
427
|
+
const flagCommands = [
|
|
428
|
+
...Object.keys(blueprint.flags ?? {}).map((command) => normalizeCommandName(command)),
|
|
429
|
+
...(blueprint.commands ?? [])
|
|
430
|
+
.filter((command) => command.flags !== undefined)
|
|
431
|
+
.map((command) => normalizeCommandName(command.name)),
|
|
432
|
+
];
|
|
433
|
+
const hooks = blueprint.hooks ?? {};
|
|
434
|
+
return {
|
|
435
|
+
capabilities: deriveExtensionCapabilities(blueprint),
|
|
436
|
+
commands: sortUnique(commandPaths),
|
|
437
|
+
command_overrides: sortUnique(Object.keys(blueprint.commandOverrides ?? {}).map((command) => normalizeCommandName(command))),
|
|
438
|
+
// command_handlers is a superset of commands that also carries the synthesized
|
|
439
|
+
// importer/exporter command paths, but never the override-only paths.
|
|
440
|
+
command_handlers: sortUnique([...commandPaths, ...importerPaths, ...exporterPaths]),
|
|
441
|
+
hooks: BLUEPRINT_HOOK_FIELD_TO_KIND.filter(([field]) => (hooks[field]?.length ?? 0) > 0).map(([, kind]) => kind),
|
|
442
|
+
flag_commands: sortUnique(flagCommands),
|
|
443
|
+
item_types: sortUnique((blueprint.itemTypes ?? []).map((type) => type.name)),
|
|
444
|
+
item_fields: sortUnique((blueprint.itemFields ?? []).map((field) => field.name)),
|
|
445
|
+
// id-less migrations register but carry no identifier, so they are omitted —
|
|
446
|
+
// exactly as describeExtensionActivation drops them from its `migrations` list.
|
|
447
|
+
migrations: sortUnique((blueprint.migrations ?? []).flatMap((migration) => (typeof migration.id === "string" ? [migration.id] : []))),
|
|
448
|
+
importers: sortUnique((blueprint.importers ?? []).map((entry) => normalizeCommandName(entry.name))),
|
|
449
|
+
exporters: sortUnique((blueprint.exporters ?? []).map((entry) => normalizeCommandName(entry.name))),
|
|
450
|
+
search_providers: sortUnique((blueprint.searchProviders ?? []).map((provider) => provider.name)),
|
|
451
|
+
vector_store_adapters: sortUnique((blueprint.vectorStoreAdapters ?? []).map((adapter) => adapter.name)),
|
|
452
|
+
parser_overrides: sortUnique(Object.keys(blueprint.parsers ?? {}).map((command) => normalizeCommandName(command))),
|
|
453
|
+
service_overrides: sortUnique(Object.keys(blueprint.services ?? {}).map((service) => String(service).trim().toLowerCase())),
|
|
454
|
+
renderer_overrides: sortUnique(Object.keys(blueprint.renderers ?? {}).map((format) => String(format).trim().toLowerCase())),
|
|
455
|
+
preflight_overrides: (blueprint.preflights ?? []).length,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* The blueprint registration fields a lint flags as a dead "empty surface" when
|
|
460
|
+
* present but empty. Mirrors {@link BlueprintRegistrationField} so adding a new
|
|
461
|
+
* registration surface forces a decision here too; `hooks` is handled separately
|
|
462
|
+
* because it is a nested object rather than an array/record of registrations.
|
|
463
|
+
*/
|
|
464
|
+
const BLUEPRINT_LINTABLE_SURFACE_FIELDS = [
|
|
465
|
+
"commands",
|
|
466
|
+
"commandOverrides",
|
|
467
|
+
"flags",
|
|
468
|
+
"parsers",
|
|
469
|
+
"renderers",
|
|
470
|
+
"services",
|
|
471
|
+
"preflights",
|
|
472
|
+
"itemTypes",
|
|
473
|
+
"itemFields",
|
|
474
|
+
"migrations",
|
|
475
|
+
"searchProviders",
|
|
476
|
+
"vectorStoreAdapters",
|
|
477
|
+
"importers",
|
|
478
|
+
"exporters",
|
|
479
|
+
];
|
|
480
|
+
/** Normalize a raw declared-capability list to known capabilities only (legacy-alias aware, sorted, de-duplicated). */
|
|
481
|
+
function normalizeDeclaredCapabilities(capabilities) {
|
|
482
|
+
const known = new Set();
|
|
483
|
+
for (const capability of capabilities) {
|
|
484
|
+
// Resolve a legacy alias (e.g. migration/validation → schema) exactly as the
|
|
485
|
+
// loader does before reconciliation — the author's raw manifest input has not
|
|
486
|
+
// been loader-normalized yet, so failing to resolve it here would misreport an
|
|
487
|
+
// alias-satisfied capability as undeclared. Fall back to a canonical known
|
|
488
|
+
// name; unknown capabilities are a separate diagnostic and are dropped so a
|
|
489
|
+
// typo is not misreported as "unused".
|
|
490
|
+
const normalized = resolveLegacyExtensionCapabilityAlias(capability) ?? normalizeKnownExtensionCapability(capability);
|
|
491
|
+
if (normalized !== null) {
|
|
492
|
+
known.add(normalized);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return [...known].sort((left, right) => left.localeCompare(right));
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Preflight a declarative {@link ExtensionBlueprint} at author time, returning the
|
|
499
|
+
* structured issues that would otherwise only surface at activation.
|
|
500
|
+
*
|
|
501
|
+
* It is the author-time inverse of the runtime extension guardrails — pure data
|
|
502
|
+
* analysis with no loading, activation, or side effects:
|
|
503
|
+
*
|
|
504
|
+
* - capability drift in both directions: a capability a surface exercises but the
|
|
505
|
+
* declared set omits is an `error` (the loader throws `extension_capability_missing`
|
|
506
|
+
* at activation); a declared capability no surface exercises is a `warning` (the
|
|
507
|
+
* author-time form of the `pm package doctor` `extension_capability_unused` note,
|
|
508
|
+
* making this the static inverse of `reconcileExtensionCapabilityUsage`).
|
|
509
|
+
* - structural footguns: a command path declared twice (`duplicate_command`), a
|
|
510
|
+
* path declared as both a command and an override (`command_override_conflict`),
|
|
511
|
+
* and a registration field present but empty (`empty_surface`).
|
|
512
|
+
*
|
|
513
|
+
* The declared set is taken from `options.declaredCapabilities` or, failing that,
|
|
514
|
+
* `blueprint.manifest.capabilities`; with neither, capability reconciliation is
|
|
515
|
+
* skipped and a single `manifest_capabilities_absent` warning suggests adopting
|
|
516
|
+
* {@link deriveExtensionCapabilities}. Like {@link describeExtensionBlueprint},
|
|
517
|
+
* the imperative `activate` escape hatch is invisible to this static check.
|
|
518
|
+
*/
|
|
519
|
+
export function lintExtensionBlueprint(blueprint, options = {}) {
|
|
520
|
+
const findings = [];
|
|
521
|
+
const used = deriveExtensionCapabilities(blueprint);
|
|
522
|
+
// A non-array declared source (an untyped `.js` author's malformed manifest, or
|
|
523
|
+
// a missing field) is treated as "no declared set" rather than "declares nothing".
|
|
524
|
+
const declaredSource = options.declaredCapabilities ?? blueprint.manifest?.capabilities;
|
|
525
|
+
const declared = Array.isArray(declaredSource) ? normalizeDeclaredCapabilities(declaredSource) : null;
|
|
526
|
+
if (declared === null) {
|
|
527
|
+
if (used.length > 0) {
|
|
528
|
+
findings.push({
|
|
529
|
+
code: "manifest_capabilities_absent",
|
|
530
|
+
severity: "warning",
|
|
531
|
+
message: `Blueprint exercises ${used.length === 1 ? "capability" : "capabilities"} [${used.join(", ")}] but declares none; set capabilities to deriveExtensionCapabilities(blueprint) so the manifest grant matches.`,
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
const declaredSet = new Set(declared);
|
|
537
|
+
const usedSet = new Set(used);
|
|
538
|
+
for (const capability of used) {
|
|
539
|
+
if (!declaredSet.has(capability)) {
|
|
540
|
+
findings.push({
|
|
541
|
+
code: "capability_undeclared",
|
|
542
|
+
severity: "error",
|
|
543
|
+
message: `Blueprint exercises capability "${capability}" but it is absent from the declared capabilities; activation throws extension_capability_missing — add "${capability}" to the manifest capabilities.`,
|
|
544
|
+
capability,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
for (const capability of declared) {
|
|
549
|
+
if (!usedSet.has(capability)) {
|
|
550
|
+
findings.push({
|
|
551
|
+
code: "capability_unused",
|
|
552
|
+
severity: "warning",
|
|
553
|
+
message: `Capability "${capability}" is declared but no blueprint surface exercises it; drop it to keep the manifest least-privilege (pm package doctor reports this as extension_capability_unused).`,
|
|
554
|
+
capability,
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
// Duplicate command paths within the declared command definitions.
|
|
560
|
+
const commandPathCounts = new Map();
|
|
561
|
+
for (const command of blueprint.commands ?? []) {
|
|
562
|
+
const path = normalizeCommandName(command.name);
|
|
563
|
+
commandPathCounts.set(path, (commandPathCounts.get(path) ?? 0) + 1);
|
|
564
|
+
}
|
|
565
|
+
for (const [path, count] of commandPathCounts) {
|
|
566
|
+
if (count > 1) {
|
|
567
|
+
findings.push({
|
|
568
|
+
code: "duplicate_command",
|
|
569
|
+
severity: "warning",
|
|
570
|
+
message: `Command "${path}" is declared ${count} times in commands; the later registration shadows the earlier one at dispatch.`,
|
|
571
|
+
command: path,
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
// A command path declared as both a fresh definition and an override.
|
|
576
|
+
const overridePaths = new Set(Object.keys(blueprint.commandOverrides ?? {}).map((command) => normalizeCommandName(command)));
|
|
577
|
+
for (const path of commandPathCounts.keys()) {
|
|
578
|
+
if (overridePaths.has(path)) {
|
|
579
|
+
findings.push({
|
|
580
|
+
code: "command_override_conflict",
|
|
581
|
+
severity: "warning",
|
|
582
|
+
message: `Command "${path}" is declared both as a new command definition and as a command override; register one or the other.`,
|
|
583
|
+
command: path,
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
// Registration fields present on the blueprint but contributing nothing.
|
|
588
|
+
for (const field of BLUEPRINT_LINTABLE_SURFACE_FIELDS) {
|
|
589
|
+
if (field in blueprint && !hasEntries(blueprint[field])) {
|
|
590
|
+
findings.push({
|
|
591
|
+
code: "empty_surface",
|
|
592
|
+
severity: "warning",
|
|
593
|
+
message: `Blueprint field "${field}" is present but empty; remove it or populate it.`,
|
|
594
|
+
field,
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
if ("hooks" in blueprint) {
|
|
599
|
+
const hooks = blueprint.hooks ?? {};
|
|
600
|
+
const registersHook = [hooks.beforeCommand, hooks.afterCommand, hooks.onWrite, hooks.onRead, hooks.onIndex].some(hasEntries);
|
|
601
|
+
if (!registersHook) {
|
|
602
|
+
findings.push({
|
|
603
|
+
code: "empty_surface",
|
|
604
|
+
severity: "warning",
|
|
605
|
+
message: `Blueprint field "hooks" is present but registers no lifecycle hooks; remove it or populate it.`,
|
|
606
|
+
field: "hooks",
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return {
|
|
611
|
+
ok: findings.every((finding) => finding.severity !== "error"),
|
|
612
|
+
findings,
|
|
613
|
+
used,
|
|
614
|
+
declared,
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Generate a complete, least-privilege {@link ExtensionManifest} from a
|
|
619
|
+
* declarative {@link ExtensionBlueprint} and the author's identity fields.
|
|
620
|
+
*
|
|
621
|
+
* This is the *generate* verb that completes the declarative authoring loop
|
|
622
|
+
* (`compose → derive → describe/lint → synthesize`). Where
|
|
623
|
+
* {@link defineExtensionManifest} only *types* a hand-written manifest and
|
|
624
|
+
* {@link deriveExtensionCapabilities} computes only the capability set, this
|
|
625
|
+
* function assembles the whole manifest: it copies every author-supplied identity
|
|
626
|
+
* field verbatim and fills `capabilities` with `deriveExtensionCapabilities`
|
|
627
|
+
* unioned with any {@link SynthesizeExtensionManifestIdentity.additionalCapabilities | additionalCapabilities},
|
|
628
|
+
* sorted and de-duplicated. The author writes the blueprint once and never
|
|
629
|
+
* hand-syncs `manifest.capabilities` — declaring nothing the extension does not
|
|
630
|
+
* use and nothing it does.
|
|
631
|
+
*
|
|
632
|
+
* It is a pure assembler: it neither validates the blueprint definitions (that
|
|
633
|
+
* stays in `api.register*` at activation) nor the identity fields (the loader
|
|
634
|
+
* validates the on-disk manifest). Pair it with
|
|
635
|
+
* {@link ../sdk/testing.js#assertExtensionManifestMatchesBlueprint} to guard a
|
|
636
|
+
* hand-maintained `manifest.json` against drift in CI.
|
|
637
|
+
*/
|
|
638
|
+
export function synthesizeExtensionManifest(blueprint, identity) {
|
|
639
|
+
const { additionalCapabilities, ...manifestIdentity } = identity;
|
|
640
|
+
// `Array.isArray` keeps a non-array value (or an omitted field) crossing an
|
|
641
|
+
// untyped boundary from crashing the spread, mirroring the rest of the SDK.
|
|
642
|
+
const extra = Array.isArray(additionalCapabilities) ? normalizeDeclaredCapabilities(additionalCapabilities) : [];
|
|
643
|
+
const capabilities = [...new Set([...deriveExtensionCapabilities(blueprint), ...extra])].sort((left, right) => left.localeCompare(right));
|
|
644
|
+
return { ...manifestIdentity, capabilities };
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Assemble both halves of a shippable extension package from one declarative
|
|
648
|
+
* {@link ExtensionBlueprint} and the author's identity fields — the author-once
|
|
649
|
+
* capstone of the declarative loop.
|
|
650
|
+
*
|
|
651
|
+
* Where {@link composeExtension} produces only the runtime module and
|
|
652
|
+
* {@link synthesizeExtensionManifest} produces only the manifest, this unifies
|
|
653
|
+
* them: it synthesizes the complete least-privilege manifest from the blueprint
|
|
654
|
+
* and identity, then composes the module with that synthesized manifest set as its
|
|
655
|
+
* authoritative in-module `manifest` mirror. Both halves are therefore generated
|
|
656
|
+
* from a single source and cannot drift — the module's `manifest` is the very
|
|
657
|
+
* object returned as `manifest`. Export `module` as the package entry's default
|
|
658
|
+
* export and write `manifest` as `manifest.json`.
|
|
659
|
+
*
|
|
660
|
+
* It is a pure assembler with no validation, loading, or filesystem access,
|
|
661
|
+
* exactly like the two functions it composes; pair it with
|
|
662
|
+
* {@link preflightExtension} (or {@link ../sdk/testing.js#assertExtensionPreflight})
|
|
663
|
+
* for the author-time verify step. Use {@link mergeExtensionBlueprints} first to
|
|
664
|
+
* assemble the blueprint modularly, then this to ship it.
|
|
665
|
+
*/
|
|
666
|
+
export function composeExtensionPackage(blueprint, identity) {
|
|
667
|
+
const manifest = synthesizeExtensionManifest(blueprint, identity);
|
|
668
|
+
const module = composeExtension({ ...blueprint, manifest });
|
|
669
|
+
return { module, manifest };
|
|
670
|
+
}
|
|
671
|
+
/** Map a non-trivial bound evaluation to a compatibility finding, or `null` when the bound is absent or satisfied. */
|
|
672
|
+
function toCompatibilityFinding(evaluation, pmVersion) {
|
|
673
|
+
if (evaluation.status === "absent" || evaluation.status === "ok") {
|
|
674
|
+
return null;
|
|
675
|
+
}
|
|
676
|
+
const code = `${evaluation.kind}_${evaluation.status}`;
|
|
677
|
+
let message;
|
|
678
|
+
switch (code) {
|
|
679
|
+
case "pm_min_version_invalid":
|
|
680
|
+
message = `pm_min_version "${evaluation.required}" is not a valid version; the extension is treated as incompatible and the loader skips it.`;
|
|
681
|
+
break;
|
|
682
|
+
case "pm_min_version_unchecked":
|
|
683
|
+
message = `pm_min_version "${evaluation.required}" could not be compared against pm ${pmVersion}; compatibility is unverified.`;
|
|
684
|
+
break;
|
|
685
|
+
case "pm_min_version_unmet":
|
|
686
|
+
message = `Requires pm >= ${evaluation.required} but the target is pm ${pmVersion}; the loader skips the extension.`;
|
|
687
|
+
break;
|
|
688
|
+
case "pm_max_version_invalid":
|
|
689
|
+
message = `pm_max_version "${evaluation.required}" is not a valid inclusive upper bound (version ranges are not allowed); the extension is treated as incompatible and the loader skips it.`;
|
|
690
|
+
break;
|
|
691
|
+
case "pm_max_version_unchecked":
|
|
692
|
+
message = `pm_max_version "${evaluation.required}" could not be compared against pm ${pmVersion}; compatibility is unverified.`;
|
|
693
|
+
break;
|
|
694
|
+
case "pm_max_version_exceeded":
|
|
695
|
+
message = `Allows pm <= ${evaluation.required} but the target is pm ${pmVersion}; the loader skips the extension.`;
|
|
696
|
+
break;
|
|
697
|
+
case "pm_max_version_exceeded_warn":
|
|
698
|
+
message = `Target pm ${pmVersion} is newer than pm_max_version ${evaluation.required}, but the "warn" exceeded mode lets it load with a warning.`;
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
return {
|
|
702
|
+
code,
|
|
703
|
+
severity: evaluation.allowed ? "warning" : "error",
|
|
704
|
+
constraint: evaluation.kind,
|
|
705
|
+
required: evaluation.required,
|
|
706
|
+
current: pmVersion,
|
|
707
|
+
message,
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Check, without loading anything, whether an extension manifest's declared
|
|
712
|
+
* version bounds permit it to load on a given pm CLI version.
|
|
713
|
+
*
|
|
714
|
+
* This is the author-time inverse of the loader's runtime version gate: where the
|
|
715
|
+
* loader resolves the *installed* CLI version (asynchronously, from `package.json`)
|
|
716
|
+
* and emits `extension_pm_*_version_*` warnings, this pure synchronous function
|
|
717
|
+
* takes the {@link ExtensionManifestCompatibilityTarget.pmVersion | target version}
|
|
718
|
+
* the author supplies and returns structured findings. Both share the
|
|
719
|
+
* {@link ../core/extensions/version-compat.js | version-compat core}, so the
|
|
720
|
+
* author-time verdict and the runtime decision agree by construction — a package
|
|
721
|
+
* author can pin a CI test to the pm version they support and catch a too-tight
|
|
722
|
+
* `pm_min_version`, a malformed `pm_max_version`, or an upper bound a newer CLI
|
|
723
|
+
* would exceed, long before publishing.
|
|
724
|
+
*
|
|
725
|
+
* `compatible` is `true` only when no bound blocks the load (`*_invalid`,
|
|
726
|
+
* `*_unmet`, and a `block`-mode `*_exceeded`); `*_unchecked` (an uninterpretable
|
|
727
|
+
* bound or target) and a `warn`-mode `*_exceeded_warn` are advisory `warning`
|
|
728
|
+
* findings that still load. Pair it with
|
|
729
|
+
* {@link ../sdk/testing.js#assertExtensionManifestCompatible} to fail CI on a
|
|
730
|
+
* blocking incompatibility.
|
|
731
|
+
*/
|
|
732
|
+
export function checkExtensionManifestCompatibility(manifest, target) {
|
|
733
|
+
const minEvaluation = evaluatePmMinVersionBound(manifest.pm_min_version, target.pmVersion);
|
|
734
|
+
const maxEvaluation = evaluatePmMaxVersionBound(manifest.pm_max_version, target.pmVersion, target.pmMaxVersionExceededMode ?? "block");
|
|
735
|
+
const findings = [];
|
|
736
|
+
const minFinding = toCompatibilityFinding(minEvaluation, target.pmVersion);
|
|
737
|
+
if (minFinding !== null) {
|
|
738
|
+
findings.push(minFinding);
|
|
739
|
+
}
|
|
740
|
+
const maxFinding = toCompatibilityFinding(maxEvaluation, target.pmVersion);
|
|
741
|
+
if (maxFinding !== null) {
|
|
742
|
+
findings.push(maxFinding);
|
|
743
|
+
}
|
|
744
|
+
return {
|
|
745
|
+
compatible: minEvaluation.allowed && maxEvaluation.allowed,
|
|
746
|
+
findings,
|
|
747
|
+
pmVersion: target.pmVersion,
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* The lint codes whose verdict depends on the *declared* capability set rather
|
|
752
|
+
* than the blueprint's structure. {@link preflightExtension} drops these from its
|
|
753
|
+
* consolidated view when it synthesizes the manifest from an `identity` without an
|
|
754
|
+
* explicit declared set, because the synthesized manifest — not the blueprint's
|
|
755
|
+
* stale in-module `manifest` mirror — is what the package ships, so a drift against
|
|
756
|
+
* the mirror is a false positive. Structural codes (`duplicate_command`,
|
|
757
|
+
* `command_override_conflict`, `empty_surface`) are never suppressed.
|
|
758
|
+
*/
|
|
759
|
+
const CAPABILITY_DRIFT_LINT_CODES = new Set([
|
|
760
|
+
"capability_undeclared",
|
|
761
|
+
"capability_unused",
|
|
762
|
+
"manifest_capabilities_absent",
|
|
763
|
+
]);
|
|
764
|
+
/**
|
|
765
|
+
* Preflight a declarative {@link ExtensionBlueprint} through every author-time
|
|
766
|
+
* check in one call, returning a single consolidated {@link ExtensionPreflightReport}.
|
|
767
|
+
*
|
|
768
|
+
* This is the author-time capstone — the static analog of
|
|
769
|
+
* {@link ../sdk/testing.js#createExtensionTestHarness}, which unified the
|
|
770
|
+
* runtime-test helpers. Instead of chaining {@link lintExtensionBlueprint},
|
|
771
|
+
* {@link synthesizeExtensionManifest}, and {@link checkExtensionManifestCompatibility}
|
|
772
|
+
* (and reconciling their separate results) before publishing a package, an author
|
|
773
|
+
* runs `preflightExtension(blueprint, { identity, target })` and reads one report:
|
|
774
|
+
*
|
|
775
|
+
* - the blueprint is always linted (structural footguns + capability drift);
|
|
776
|
+
* - when `options.identity` is given, the complete least-privilege manifest is
|
|
777
|
+
* synthesized and returned, so the author never hand-syncs `capabilities`;
|
|
778
|
+
* - when `options.target` is given, the synthesized manifest's version bounds
|
|
779
|
+
* (or, absent an identity, the blueprint's in-module `manifest` mirror) are
|
|
780
|
+
* checked against that pm version.
|
|
781
|
+
*
|
|
782
|
+
* It is pure and side-effect-free — no loading, activation, or filesystem access,
|
|
783
|
+
* exactly like the stages it composes — so it is safe in any author-time or CI
|
|
784
|
+
* context. The per-stage structured results are exposed unmodified
|
|
785
|
+
* (`report.blueprint`/`manifest`/`compatibility`) alongside the flattened,
|
|
786
|
+
* source-tagged `report.findings`; `report.ok` is `false` if any stage produced an
|
|
787
|
+
* `error`-severity finding. The flattened `findings` are curated for the author-once
|
|
788
|
+
* flow: once an `identity` synthesizes the manifest (and no explicit
|
|
789
|
+
* `declaredCapabilities` was pinned), the synthesized manifest — not the blueprint's
|
|
790
|
+
* in-module `manifest` mirror — is what ships, so capability-drift findings the lint
|
|
791
|
+
* raised against that mirror are false positives and are omitted from
|
|
792
|
+
* `report.findings` (the raw `report.blueprint` result still reports them). Pair it
|
|
793
|
+
* with {@link ../sdk/testing.js#assertExtensionPreflight} to fail CI in one line.
|
|
794
|
+
*/
|
|
795
|
+
export function preflightExtension(blueprint, options = {}) {
|
|
796
|
+
const blueprintResult = lintExtensionBlueprint(blueprint, { declaredCapabilities: options.declaredCapabilities });
|
|
797
|
+
const manifest = options.identity ? synthesizeExtensionManifest(blueprint, options.identity) : null;
|
|
798
|
+
// Compatibility evaluates the bounds the package will ship: the synthesized
|
|
799
|
+
// manifest when an identity drives generation, else the blueprint's in-module
|
|
800
|
+
// manifest mirror, else an empty manifest (no bounds → trivially compatible).
|
|
801
|
+
const compatibility = options.target
|
|
802
|
+
? checkExtensionManifestCompatibility(manifest ?? blueprint.manifest ?? {}, options.target)
|
|
803
|
+
: null;
|
|
804
|
+
// When preflight synthesizes the manifest from an identity (and the caller did not
|
|
805
|
+
// pin an explicit declaredCapabilities set), the blueprint lint reconciled against
|
|
806
|
+
// the blueprint's in-module `manifest` mirror — which the synthesized manifest
|
|
807
|
+
// supersedes. Capability-drift findings against that stale mirror are false
|
|
808
|
+
// positives in the consolidated view (a missing capability would even flip `ok` to
|
|
809
|
+
// false though the synthesized manifest declares it), so drop them; structural
|
|
810
|
+
// findings are unaffected and the raw lint result on `report.blueprint` keeps all of
|
|
811
|
+
// them. An explicit declaredCapabilities set is a deliberate "check exactly this"
|
|
812
|
+
// request, so it is never suppressed.
|
|
813
|
+
const suppressCapabilityDrift = manifest !== null && options.declaredCapabilities === undefined;
|
|
814
|
+
const blueprintFindings = suppressCapabilityDrift
|
|
815
|
+
? blueprintResult.findings.filter((finding) => !CAPABILITY_DRIFT_LINT_CODES.has(finding.code))
|
|
816
|
+
: blueprintResult.findings;
|
|
817
|
+
const findings = [
|
|
818
|
+
...blueprintFindings.map((finding) => ({
|
|
819
|
+
source: "blueprint",
|
|
820
|
+
severity: finding.severity,
|
|
821
|
+
code: finding.code,
|
|
822
|
+
message: finding.message,
|
|
823
|
+
})),
|
|
824
|
+
...(compatibility?.findings ?? []).map((finding) => ({
|
|
825
|
+
source: "compatibility",
|
|
826
|
+
severity: finding.severity,
|
|
827
|
+
code: finding.code,
|
|
828
|
+
message: finding.message,
|
|
829
|
+
})),
|
|
830
|
+
];
|
|
831
|
+
return {
|
|
832
|
+
ok: findings.every((finding) => finding.severity !== "error"),
|
|
833
|
+
capabilities: blueprintResult.used,
|
|
834
|
+
blueprint: blueprintResult,
|
|
835
|
+
manifest,
|
|
836
|
+
compatibility,
|
|
837
|
+
findings,
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
//# sourceMappingURL=compose.js.map
|
|
841
|
+
//# debugId=376f0804-a437-515f-a653-485531d98f13
|