@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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeManagedDirectoryName
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PEL2NLQE.js";
|
|
4
4
|
import {
|
|
5
5
|
EXIT_CODE,
|
|
6
6
|
PmCliError,
|
|
7
7
|
pathExists
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EYPINTFR.js";
|
|
9
9
|
|
|
10
10
|
// dist/cli/commands/extension/scaffold.js
|
|
11
11
|
import fs from "node:fs/promises";
|
|
@@ -13,7 +13,7 @@ import path from "node:path";
|
|
|
13
13
|
!(function() {
|
|
14
14
|
try {
|
|
15
15
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
16
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
16
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9eecdd82-fe71-5803-9186-a33244c4722d");
|
|
17
17
|
} catch (e2) {
|
|
18
18
|
}
|
|
19
19
|
})();
|
|
@@ -27,6 +27,26 @@ var SCAFFOLD_DECLARED_PERMISSIONS = {
|
|
|
27
27
|
env_write: false,
|
|
28
28
|
process_spawn: false
|
|
29
29
|
};
|
|
30
|
+
var SCAFFOLD_TYPESCRIPT_VERSION = "^6.0.0";
|
|
31
|
+
var SCAFFOLD_TYPES_NODE_VERSION = "^20.0.0";
|
|
32
|
+
var SCAFFOLD_TSCONFIG = {
|
|
33
|
+
compilerOptions: {
|
|
34
|
+
target: "ES2022",
|
|
35
|
+
module: "NodeNext",
|
|
36
|
+
moduleResolution: "NodeNext",
|
|
37
|
+
strict: true,
|
|
38
|
+
esModuleInterop: true,
|
|
39
|
+
skipLibCheck: true,
|
|
40
|
+
declaration: false,
|
|
41
|
+
// `node:test`/`node:assert` in the colocated test (and Node globals) resolve
|
|
42
|
+
// from `@types/node`; name it explicitly so it is loaded regardless of how the
|
|
43
|
+
// package manager lays out `node_modules/@types`.
|
|
44
|
+
types: ["node"]
|
|
45
|
+
},
|
|
46
|
+
// Recursive so a package that grows into subdirectory `*.ts` modules still
|
|
47
|
+
// type-checks and compiles them; tsc excludes `node_modules` by default.
|
|
48
|
+
include: ["**/*.ts"]
|
|
49
|
+
};
|
|
30
50
|
var SCAFFOLD_CAPABILITIES = ["commands", "hooks", "search", "importers"];
|
|
31
51
|
var SCAFFOLD_MANIFEST_CAPABILITIES = {
|
|
32
52
|
commands: ["commands"],
|
|
@@ -41,23 +61,24 @@ var SAMPLE_TEST_CAPABILITIES_LITERAL = {
|
|
|
41
61
|
importers: '["commands", "schema", "importers"]'
|
|
42
62
|
};
|
|
43
63
|
var ENTRYPOINT_BULLETS = {
|
|
44
|
-
commands: "- `index.
|
|
45
|
-
hooks: "- `index.
|
|
46
|
-
search: "- `index.
|
|
47
|
-
importers: "- `index.
|
|
64
|
+
commands: "- `index.ts`: starter command registration plus a `deactivate` teardown stub (compiled to `index.js`).",
|
|
65
|
+
hooks: "- `index.ts`: starter command registration, an `after_command` lifecycle hook, and a `deactivate` teardown stub (compiled to `index.js`).",
|
|
66
|
+
search: "- `index.ts`: starter command registration, a search provider, a vector-store adapter, and a `deactivate` teardown stub (compiled to `index.js`).",
|
|
67
|
+
importers: "- `index.ts`: starter command registration, importer/exporter command registrations, and a `deactivate` teardown stub (compiled to `index.js`)."
|
|
48
68
|
};
|
|
49
69
|
var SAMPLE_TEST_BULLETS = {
|
|
50
|
-
commands: "- `index.test.
|
|
51
|
-
hooks: "- `index.test.
|
|
52
|
-
search: "- `index.test.
|
|
53
|
-
importers: "- `index.test.
|
|
70
|
+
commands: "- `index.test.ts`: sample `node:test` suite covering activation, command invocation, and teardown via the SDK testing helpers.",
|
|
71
|
+
hooks: "- `index.test.ts`: sample `node:test` suite covering activation, command invocation, the after_command hook, and teardown via the SDK testing helpers.",
|
|
72
|
+
search: "- `index.test.ts`: sample `node:test` suite covering activation, command invocation, search provider/vector adapter invocation, and teardown via the SDK testing helpers.",
|
|
73
|
+
importers: "- `index.test.ts`: sample `node:test` suite covering activation, command invocation, importer/exporter invocation, and teardown via the SDK testing helpers."
|
|
54
74
|
};
|
|
75
|
+
var TSCONFIG_BULLET = "- `tsconfig.json`: strict TypeScript config that compiles `index.ts` to the `./index.js` entry.";
|
|
55
76
|
var PACKAGE_CAPABILITY_README_SECTIONS = {
|
|
56
77
|
commands: [],
|
|
57
78
|
hooks: [
|
|
58
79
|
"",
|
|
59
80
|
"## Lifecycle Hook",
|
|
60
|
-
"`index.
|
|
81
|
+
"`index.ts` registers an `after_command` hook via `api.hooks.afterCommand`.",
|
|
61
82
|
"pm fires it once a command finishes, passing the command outcome and the",
|
|
62
83
|
"items it mutated (`context.affected`). React there to keep external context",
|
|
63
84
|
"in sync - sync records, emit telemetry, or refresh derived state. The",
|
|
@@ -67,7 +88,7 @@ var PACKAGE_CAPABILITY_README_SECTIONS = {
|
|
|
67
88
|
search: [
|
|
68
89
|
"",
|
|
69
90
|
"## Search Provider",
|
|
70
|
-
"`index.
|
|
91
|
+
"`index.ts` registers a deterministic in-memory search provider and",
|
|
71
92
|
"vector-store adapter through `api.registerSearchProvider` and",
|
|
72
93
|
"`api.registerVectorStoreAdapter`. Replace the sample scoring,",
|
|
73
94
|
"embedding, and storage behavior with your project-specific retrieval",
|
|
@@ -77,7 +98,7 @@ var PACKAGE_CAPABILITY_README_SECTIONS = {
|
|
|
77
98
|
importers: [
|
|
78
99
|
"",
|
|
79
100
|
"## Importer and Exporter",
|
|
80
|
-
"`index.
|
|
101
|
+
"`index.ts` registers paired project-context import/export commands through",
|
|
81
102
|
"`api.registerImporter` and `api.registerExporter`. Replace the starter",
|
|
82
103
|
"payloads with your domain adapter: GitHub issues, CSV rows, documents,",
|
|
83
104
|
"tickets, or another project-management source of truth. The `importers`",
|
|
@@ -90,7 +111,7 @@ var EXTENSION_CAPABILITY_README_SECTIONS = {
|
|
|
90
111
|
hooks: [
|
|
91
112
|
"",
|
|
92
113
|
"## Lifecycle Hook",
|
|
93
|
-
"`index.
|
|
114
|
+
"`index.ts` registers an `after_command` hook via `api.hooks.afterCommand`.",
|
|
94
115
|
"pm fires it once a command finishes, passing the command outcome and the",
|
|
95
116
|
"items it mutated (`context.affected`). React there to keep external context",
|
|
96
117
|
"in sync. The `hooks` capability in `manifest.json` grants the registration;",
|
|
@@ -99,7 +120,7 @@ var EXTENSION_CAPABILITY_README_SECTIONS = {
|
|
|
99
120
|
search: [
|
|
100
121
|
"",
|
|
101
122
|
"## Search Provider",
|
|
102
|
-
"`index.
|
|
123
|
+
"`index.ts` registers a deterministic in-memory search provider and",
|
|
103
124
|
"vector-store adapter through `api.registerSearchProvider` and",
|
|
104
125
|
"`api.registerVectorStoreAdapter`. Replace the sample scoring, embedding,",
|
|
105
126
|
"and storage behavior with your project-specific retrieval logic. The",
|
|
@@ -108,7 +129,7 @@ var EXTENSION_CAPABILITY_README_SECTIONS = {
|
|
|
108
129
|
importers: [
|
|
109
130
|
"",
|
|
110
131
|
"## Importer and Exporter",
|
|
111
|
-
"`index.
|
|
132
|
+
"`index.ts` registers paired project-context import/export commands through",
|
|
112
133
|
"`api.registerImporter` and `api.registerExporter`. Replace the starter",
|
|
113
134
|
"payloads with your domain adapter. The `importers` capability grants both",
|
|
114
135
|
"registrations, and `schema` grants the example command flag metadata."
|
|
@@ -305,6 +326,8 @@ function buildSampleTestSource(extensionName, commandName, capability) {
|
|
|
305
326
|
` extensionName: ${JSON.stringify(extensionName)},`,
|
|
306
327
|
" });",
|
|
307
328
|
"",
|
|
329
|
+
" // The starter provider reads only document title/id, so `settings` is a",
|
|
330
|
+
" // minimal typed stub and `documents` carry just the fields it inspects.",
|
|
308
331
|
" const query = await runRegisteredSearchProviderForTest(activation.registrations, {",
|
|
309
332
|
` provider: ${JSON.stringify(searchProviderName)},`,
|
|
310
333
|
' operation: "query",',
|
|
@@ -313,11 +336,11 @@ function buildSampleTestSource(extensionName, commandName, capability) {
|
|
|
313
336
|
' mode: "semantic",',
|
|
314
337
|
' tokens: ["sync"],',
|
|
315
338
|
" options: {},",
|
|
316
|
-
" settings: {},",
|
|
339
|
+
" settings: {} as PmSettings,",
|
|
317
340
|
" documents: [",
|
|
318
341
|
' { metadata: { id: "pm-1", title: "Sync external context" }, body: "" },',
|
|
319
342
|
' { metadata: { id: "pm-2", title: "Unrelated task" }, body: "" },',
|
|
320
|
-
" ],",
|
|
343
|
+
" ] as ItemDocument[],",
|
|
321
344
|
" },",
|
|
322
345
|
" });",
|
|
323
346
|
' assert.deepEqual(query, { hits: [{ id: "pm-1", score: 1, matched_fields: ["title"] }] });',
|
|
@@ -325,14 +348,14 @@ function buildSampleTestSource(extensionName, commandName, capability) {
|
|
|
325
348
|
" const embedding = await runRegisteredSearchProviderForTest(activation.registrations, {",
|
|
326
349
|
` provider: ${JSON.stringify(searchProviderName)},`,
|
|
327
350
|
' operation: "embed",',
|
|
328
|
-
' context: { input: "abc", settings: {}, model: "starter-model" },',
|
|
351
|
+
' context: { input: "abc", settings: {} as PmSettings, model: "starter-model" },',
|
|
329
352
|
" });",
|
|
330
353
|
" assert.deepEqual(embedding, [3]);",
|
|
331
354
|
"",
|
|
332
355
|
" const vectorHits = await runRegisteredVectorStoreAdapterForTest(activation.registrations, {",
|
|
333
356
|
` adapter: ${JSON.stringify(vectorAdapterName)},`,
|
|
334
357
|
' operation: "query",',
|
|
335
|
-
" context: { vector: [0.1, 0.2], limit: 2, settings: {} },",
|
|
358
|
+
" context: { vector: [0.1, 0.2], limit: 2, settings: {} as PmSettings },",
|
|
336
359
|
" });",
|
|
337
360
|
' assert.deepEqual(vectorHits, [{ id: "starter-vector-hit", score: 2 }]);',
|
|
338
361
|
"});",
|
|
@@ -377,6 +400,9 @@ function buildSampleTestSource(extensionName, commandName, capability) {
|
|
|
377
400
|
"import {",
|
|
378
401
|
...importNames,
|
|
379
402
|
'} from "@unbrained/pm-cli/sdk/testing";',
|
|
403
|
+
// The search sample's synthetic query/vector contexts reference these SDK types
|
|
404
|
+
// for their typed-stub fixtures; other capabilities need no extra type imports.
|
|
405
|
+
...searchEnabled ? ['import type { ItemDocument, PmSettings } from "@unbrained/pm-cli/sdk";'] : [],
|
|
380
406
|
'import extension from "./index.js";',
|
|
381
407
|
"",
|
|
382
408
|
`test(${JSON.stringify(`${extensionName} registers its starter command`)}, async () => {`,
|
|
@@ -402,8 +428,14 @@ function buildSampleTestSource(extensionName, commandName, capability) {
|
|
|
402
428
|
` command: ${JSON.stringify(commandName)},`,
|
|
403
429
|
" });",
|
|
404
430
|
" assert.equal(invocation.handled, true);",
|
|
405
|
-
"
|
|
406
|
-
|
|
431
|
+
" // The handler result is typed `unknown`, so deep-equality on the whole",
|
|
432
|
+
" // structured payload keeps the assertion type-safe without a cast.",
|
|
433
|
+
" assert.deepEqual(invocation.result, {",
|
|
434
|
+
" ok: true,",
|
|
435
|
+
` source: ${JSON.stringify(extensionName)},`,
|
|
436
|
+
` command: ${JSON.stringify(commandName)},`,
|
|
437
|
+
' message: "Starter extension scaffold is active.",',
|
|
438
|
+
" });",
|
|
407
439
|
"});",
|
|
408
440
|
"",
|
|
409
441
|
...hookTestLines,
|
|
@@ -439,8 +471,9 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
439
471
|
}, null, 2)}
|
|
440
472
|
`;
|
|
441
473
|
const entrypoint = [
|
|
442
|
-
'
|
|
443
|
-
"
|
|
474
|
+
'import type { ExtensionApi } from "@unbrained/pm-cli/sdk";',
|
|
475
|
+
"",
|
|
476
|
+
"export function activate(api: ExtensionApi): void {",
|
|
444
477
|
...buildActivateBodyLines(extensionName, commandName, capability),
|
|
445
478
|
"}",
|
|
446
479
|
"",
|
|
@@ -448,7 +481,7 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
448
481
|
"// shutdown/reload (e.g. the MCP server between requests) to release anything",
|
|
449
482
|
"// `activate` opened - timers, connections, caches. This starter holds no such",
|
|
450
483
|
"// resources, so it stays a documented no-op; add cleanup here as you grow.",
|
|
451
|
-
"export function deactivate() {}",
|
|
484
|
+
"export function deactivate(): void {}",
|
|
452
485
|
"",
|
|
453
486
|
"export default {",
|
|
454
487
|
" activate,",
|
|
@@ -456,6 +489,8 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
456
489
|
"};",
|
|
457
490
|
""
|
|
458
491
|
].join("\n");
|
|
492
|
+
const tsconfig = `${JSON.stringify(SCAFFOLD_TSCONFIG, null, 2)}
|
|
493
|
+
`;
|
|
459
494
|
const entrypointBullet = ENTRYPOINT_BULLETS[capability];
|
|
460
495
|
if (vocabulary === "package") {
|
|
461
496
|
const packageJson = `${JSON.stringify({
|
|
@@ -464,14 +499,21 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
464
499
|
private: true,
|
|
465
500
|
type: "module",
|
|
466
501
|
keywords: ["pm-package"],
|
|
467
|
-
// `
|
|
468
|
-
//
|
|
502
|
+
// `build` compiles index.ts to the ./index.js the manifest loads; `test`
|
|
503
|
+
// compiles first (Node's `node --test` runs the emitted *.test.js, not the
|
|
504
|
+
// TypeScript source) then runs the colocated sample against the peer SDK
|
|
505
|
+
// testing helpers — no third-party test runner required.
|
|
469
506
|
scripts: {
|
|
470
|
-
|
|
507
|
+
build: "tsc",
|
|
508
|
+
test: "tsc && node --test"
|
|
471
509
|
},
|
|
472
510
|
peerDependencies: {
|
|
473
511
|
"@unbrained/pm-cli": "*"
|
|
474
512
|
},
|
|
513
|
+
devDependencies: {
|
|
514
|
+
"@types/node": SCAFFOLD_TYPES_NODE_VERSION,
|
|
515
|
+
typescript: SCAFFOLD_TYPESCRIPT_VERSION
|
|
516
|
+
},
|
|
475
517
|
pm: {
|
|
476
518
|
aliases: [extensionName],
|
|
477
519
|
extensions: ["."],
|
|
@@ -488,34 +530,101 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
488
530
|
`;
|
|
489
531
|
const sampleTest = buildSampleTestSource(extensionName, commandName, capability);
|
|
490
532
|
const sampleTestBullet = SAMPLE_TEST_BULLETS[capability];
|
|
491
|
-
const gitignore = [
|
|
533
|
+
const gitignore = [
|
|
534
|
+
"node_modules/",
|
|
535
|
+
"*.log",
|
|
536
|
+
"",
|
|
537
|
+
"# Compiled TypeScript output (npm run build)",
|
|
538
|
+
"*.js",
|
|
539
|
+
"*.test.js",
|
|
540
|
+
"*.js.map",
|
|
541
|
+
"*.d.ts",
|
|
542
|
+
"*.d.ts.map",
|
|
543
|
+
""
|
|
544
|
+
].join("\n");
|
|
545
|
+
const searchProviderName = `${extensionName}-search`;
|
|
546
|
+
const vectorAdapterName = `${extensionName}-vector`;
|
|
547
|
+
const adapterName = `${extensionName.replace(/-/g, " ")} items`;
|
|
548
|
+
const defineBuilderImports = [
|
|
549
|
+
"defineCommand",
|
|
550
|
+
...capability === "hooks" ? ["defineAfterCommandHook"] : [],
|
|
551
|
+
...capability === "search" ? ["defineSearchProvider", "defineVectorStoreAdapter"] : [],
|
|
552
|
+
...capability === "importers" ? ["defineImporter", "defineExporter"] : []
|
|
553
|
+
].join(", ");
|
|
554
|
+
const defineBuilderSnippet = [
|
|
555
|
+
"```ts",
|
|
556
|
+
`import { ${defineBuilderImports} } from "@unbrained/pm-cli/sdk";`,
|
|
557
|
+
'import type { ExtensionApi } from "@unbrained/pm-cli/sdk";',
|
|
558
|
+
"",
|
|
559
|
+
"export const pingCommand = defineCommand({",
|
|
560
|
+
` name: ${JSON.stringify(commandName)},`,
|
|
561
|
+
' description: "Starter scaffold command. Replace with your own behavior.",',
|
|
562
|
+
" run: (context) => ({ ok: true, command: context.command }),",
|
|
563
|
+
"});"
|
|
564
|
+
];
|
|
565
|
+
if (capability === "hooks") {
|
|
566
|
+
defineBuilderSnippet.push("", "export const afterCommandHook = defineAfterCommandHook((context) => {", " if (!context.ok) return;", " // React to context.affected here as your package grows.", "});");
|
|
567
|
+
}
|
|
568
|
+
if (capability === "search") {
|
|
569
|
+
defineBuilderSnippet.push("", "export const searchProvider = defineSearchProvider({", ` name: ${JSON.stringify(searchProviderName)},`, " query: async (context) => ({", " hits: context.documents", ' .filter((document) => String(document.metadata.title ?? "").toLowerCase().includes(context.query.toLowerCase()))', ' .map((document) => ({ id: document.metadata.id, score: 1, matched_fields: ["title"] })),', " }),", " embed: async (context) => [context.input.length],", "});", "", "export const vectorStoreAdapter = defineVectorStoreAdapter({", ` name: ${JSON.stringify(vectorAdapterName)},`, ' query: async (context) => [{ id: "starter-vector-hit", score: context.limit }],', " upsert: async (context) => ({ upserted: context.points.length }),", " delete: async (context) => ({ deleted: context.ids.length }),", "});");
|
|
570
|
+
}
|
|
571
|
+
if (capability === "importers") {
|
|
572
|
+
defineBuilderSnippet.push("", "export const importer = defineImporter(async (context) => ({", " imported: 1,", ' source: context.options.source ?? "starter",', " args: context.args,", "}));", "", "export const exporter = defineExporter(async (context) => ({", " exported: true,", ' destination: context.options.destination ?? "stdout",', " args: context.args,", "}));");
|
|
573
|
+
}
|
|
574
|
+
defineBuilderSnippet.push("", "export function activate(api: ExtensionApi): void {", " api.registerCommand(pingCommand);");
|
|
575
|
+
if (capability === "hooks") {
|
|
576
|
+
defineBuilderSnippet.push(" api.hooks.afterCommand(afterCommandHook);");
|
|
577
|
+
}
|
|
578
|
+
if (capability === "search") {
|
|
579
|
+
defineBuilderSnippet.push(" api.registerSearchProvider(searchProvider);", " api.registerVectorStoreAdapter(vectorStoreAdapter);");
|
|
580
|
+
}
|
|
581
|
+
if (capability === "importers") {
|
|
582
|
+
defineBuilderSnippet.push(` api.registerImporter(${JSON.stringify(adapterName)}, importer, {`, ` action: ${JSON.stringify(`${adapterName} import`)},`, ' description: "Import starter records into pm context.",', " flags: [", " {", ' long: "--source",', ' value_name: "name",', ' value_type: "string",', ' description: "Source name or path to import from.",', " },", " ],", " });", ` api.registerExporter(${JSON.stringify(adapterName)}, exporter, {`, ` action: ${JSON.stringify(`${adapterName} export`)},`, ' description: "Export pm context into starter records.",', " flags: [", " {", ' long: "--destination",', ' value_name: "name",', ' value_type: "string",', ' description: "Destination name or path to export to.",', " },", " ],", " });");
|
|
583
|
+
}
|
|
584
|
+
defineBuilderSnippet.push("}", "", "export function deactivate(): void {}", "", "export default { activate, deactivate };", "```");
|
|
492
585
|
const packageReadme = [
|
|
493
586
|
`# ${packageName}`,
|
|
494
587
|
"",
|
|
495
588
|
"Generated by `pm package init`.",
|
|
496
589
|
"",
|
|
497
590
|
"## Included Files",
|
|
498
|
-
"- `package.json`: package metadata, `test`
|
|
591
|
+
"- `package.json`: package metadata, `build`/`test` scripts, and `pm` resource manifest.",
|
|
499
592
|
"- `manifest.json`: extension metadata and capabilities.",
|
|
500
593
|
entrypointBullet,
|
|
501
594
|
sampleTestBullet,
|
|
502
|
-
|
|
595
|
+
TSCONFIG_BULLET,
|
|
596
|
+
"- `.gitignore`: ignores `node_modules/`, logs, and compiled JavaScript/declaration output.",
|
|
503
597
|
"",
|
|
504
598
|
"## Quick Start",
|
|
599
|
+
"This package is authored in TypeScript; build it once so the manifest's",
|
|
600
|
+
"`./index.js` entry exists, then install it:",
|
|
505
601
|
"```bash",
|
|
602
|
+
"npm install",
|
|
603
|
+
"npm run build",
|
|
506
604
|
"pm install --project <package-path>",
|
|
507
605
|
`pm ${commandName}`,
|
|
508
606
|
"pm package doctor --project --detail summary",
|
|
509
607
|
"```",
|
|
510
608
|
"",
|
|
511
609
|
"## Validate the Package",
|
|
512
|
-
"
|
|
610
|
+
"`npm install` pulls the peer SDK and TypeScript; `npm test` compiles and runs",
|
|
611
|
+
"the colocated sample test:",
|
|
513
612
|
"```bash",
|
|
514
613
|
"npm install",
|
|
515
614
|
"npm test",
|
|
516
615
|
"```",
|
|
517
|
-
"`npm test` runs `node --test
|
|
616
|
+
"`npm test` runs `tsc && node --test`: it compiles `index.ts`/`index.test.ts`",
|
|
617
|
+
"then executes the emitted `index.test.js` against the",
|
|
518
618
|
"`@unbrained/pm-cli/sdk/testing` helpers - no extra test runner required.",
|
|
619
|
+
"",
|
|
620
|
+
"## Authoring With define* Builders",
|
|
621
|
+
"`index.ts` is authored fully in TypeScript so every registration is checked",
|
|
622
|
+
"against the SDK contracts at author time. Use the public SDK authoring",
|
|
623
|
+
"builders for exported definitions you want literal-type preservation,",
|
|
624
|
+
"contextual handler inference, and direct unit tests for:",
|
|
625
|
+
...defineBuilderSnippet,
|
|
626
|
+
"The builders return their argument unchanged; runtime validation still lives",
|
|
627
|
+
"in `api.register*`, and behavior validation lives in `sdk/testing`.",
|
|
519
628
|
...PACKAGE_CAPABILITY_README_SECTIONS[capability],
|
|
520
629
|
"",
|
|
521
630
|
"## Compatibility Bounds",
|
|
@@ -528,8 +637,8 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
528
637
|
'The starter command is pure compute, so `manifest.json` declares `trusted: true`, `sandbox_profile: "strict"`, and all six permission keys as `false`. Keep that least-privilege shape for pure packages; relax only the specific permission your package actually needs and verify with `pm package doctor --project --detail deep --trace`.',
|
|
529
638
|
"",
|
|
530
639
|
"## Notes",
|
|
531
|
-
"-
|
|
532
|
-
"- Move larger runtimes into
|
|
640
|
+
"- Author in `index.ts`; `npm run build` (tsc) emits the `./index.js` the manifest loads, so rebuild after editing before installing or reloading.",
|
|
641
|
+
"- Move larger runtimes into sibling or subdirectory `*.ts` modules and import them; `tsconfig.json` compiles every `*.ts` in the package (recursively).",
|
|
533
642
|
"- Add capabilities to the extension manifest only when the entrypoint uses the matching SDK API.",
|
|
534
643
|
"- Use `@unbrained/pm-cli/sdk` as the public SDK import for richer package runtimes.",
|
|
535
644
|
""
|
|
@@ -537,8 +646,9 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
537
646
|
return {
|
|
538
647
|
"package.json": packageJson,
|
|
539
648
|
"manifest.json": manifest,
|
|
540
|
-
"index.
|
|
541
|
-
"index.test.
|
|
649
|
+
"index.ts": entrypoint,
|
|
650
|
+
"index.test.ts": sampleTest,
|
|
651
|
+
"tsconfig.json": tsconfig,
|
|
542
652
|
".gitignore": gitignore,
|
|
543
653
|
"README.md": packageReadme
|
|
544
654
|
};
|
|
@@ -551,9 +661,16 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
551
661
|
"## Included Files",
|
|
552
662
|
"- `manifest.json`: extension metadata and capabilities.",
|
|
553
663
|
entrypointBullet,
|
|
664
|
+
TSCONFIG_BULLET,
|
|
554
665
|
"",
|
|
555
666
|
"## Quick Start",
|
|
667
|
+
"This extension is authored in TypeScript; compile `index.ts` to the manifest's",
|
|
668
|
+
"`./index.js` entry, then install it. The SDK types resolve once",
|
|
669
|
+
"`@unbrained/pm-cli` is available to the compiler (install it, Node types, and TypeScript, or",
|
|
670
|
+
"build from a project that already depends on the CLI):",
|
|
556
671
|
"```bash",
|
|
672
|
+
"npm install -D typescript @types/node @unbrained/pm-cli",
|
|
673
|
+
"npx tsc",
|
|
557
674
|
"pm extension --install --project <scaffold-path>",
|
|
558
675
|
`pm ${commandName}`,
|
|
559
676
|
"pm extension --doctor --project --detail summary",
|
|
@@ -570,14 +687,15 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
570
687
|
'The starter command is pure compute, so `manifest.json` declares `trusted: true`, `sandbox_profile: "strict"`, and all six permission keys as `false`. Keep that least-privilege shape for pure extensions; relax only the specific permission your extension actually needs and verify with `pm extension --doctor --project --detail deep --trace`.',
|
|
571
688
|
"",
|
|
572
689
|
"## Notes",
|
|
573
|
-
"- This scaffold uses ESM
|
|
574
|
-
"-
|
|
690
|
+
"- This scaffold uses TypeScript ESM source compiled to ESM output, so it works in package scopes with `type: module`.",
|
|
691
|
+
"- Author in `index.ts` and recompile to `index.js` (the manifest entry) after editing capabilities or command behavior.",
|
|
575
692
|
"- Release any resources `activate` opens (timers, connections, caches) in the `deactivate` teardown hook.",
|
|
576
693
|
""
|
|
577
694
|
].join("\n");
|
|
578
695
|
return {
|
|
579
696
|
"manifest.json": manifest,
|
|
580
|
-
"index.
|
|
697
|
+
"index.ts": entrypoint,
|
|
698
|
+
"tsconfig.json": tsconfig,
|
|
581
699
|
"README.md": readme
|
|
582
700
|
};
|
|
583
701
|
}
|
|
@@ -643,4 +761,4 @@ export {
|
|
|
643
761
|
SCAFFOLD_CAPABILITIES,
|
|
644
762
|
scaffoldExtensionProject
|
|
645
763
|
};
|
|
646
|
-
//# sourceMappingURL=chunk-
|
|
764
|
+
//# sourceMappingURL=chunk-INPHFO33.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/extension/scaffold.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module cli/commands/extension/scaffold\n *\n * Implements extension package-management support for Scaffold.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists } from \"../../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../../core/shared/constants.js\";\nimport { PmCliError } from \"../../../core/shared/errors.js\";\nimport { normalizeManagedDirectoryName } from \"./shared.js\";\n\n// Safe compatibility floor emitted into scaffolded manifests. Mirrors the\n// first-party package manifests (pm-nf2q): every current 2026.5.x CLI\n// satisfies it, and it models the field for external authors. manifest_version\n// tracks the manifest schema generation (currently 1).\nconst SCAFFOLD_MANIFEST_VERSION = 1;\nconst SCAFFOLD_PM_MIN_VERSION = \"2026.5.0\";\nconst SCAFFOLD_DECLARED_PERMISSIONS = {\n fs_read: false,\n fs_write: false,\n network: false,\n env_read: false,\n env_write: false,\n process_spawn: false,\n};\n\n// TypeScript dev-dependency floor for scaffolded packages, matching the CLI's own\n// toolchain so generated packages compile against the same compiler generation.\nconst SCAFFOLD_TYPESCRIPT_VERSION = \"^6.0.0\";\n\n// `@types/node` floor for scaffolded packages: the colocated `index.test.ts`\n// imports `node:test`/`node:assert`, which need Node's ambient type definitions\n// to compile. Pinned to the engines floor (Node >=20), matching the CLI itself.\nconst SCAFFOLD_TYPES_NODE_VERSION = \"^20.0.0\";\n\n// Strict NodeNext tsconfig emitted into every scaffold (ADR pm-2c28: extensions\n// are authored fully in TypeScript). It compiles `index.ts` (and the colocated\n// `index.test.ts`) in place to the `./index.js` entry the manifest loads, so the\n// authored source is type-checked against the SDK contracts while the loader keeps\n// importing plain compiled JavaScript. NodeNext resolution matches the explicit\n// `.js` import specifiers the emitted ESM uses. No `outDir` is set on purpose:\n// tsc auto-excludes its `outDir`, and an in-package `outDir` would exclude the\n// whole package root, leaving the `*.ts` inputs unmatched (TS18003). Emitting\n// beside the source mirrors the first-party `packages/pm-*` layout.\nconst SCAFFOLD_TSCONFIG = {\n compilerOptions: {\n target: \"ES2022\",\n module: \"NodeNext\",\n moduleResolution: \"NodeNext\",\n strict: true,\n esModuleInterop: true,\n skipLibCheck: true,\n declaration: false,\n // `node:test`/`node:assert` in the colocated test (and Node globals) resolve\n // from `@types/node`; name it explicitly so it is loaded regardless of how the\n // package manager lays out `node_modules/@types`.\n types: [\"node\"],\n },\n // Recursive so a package that grows into subdirectory `*.ts` modules still\n // type-checks and compiles them; tsc excludes `node_modules` by default.\n include: [\"**/*.ts\"],\n};\n\n/**\n * Capability shapes the package/extension scaffolder can target via the\n * `--capability` selector. `commands` emits the default command-only starter;\n * `hooks` additionally wires an `after_command` lifecycle reactor, `search`\n * wires an in-memory provider/adapter pair, and `importers` wires importer and\n * exporter command primitives so authors can customize project context movement\n * without starting from a blank extension.\n */\nexport const SCAFFOLD_CAPABILITIES = [\"commands\", \"hooks\", \"search\", \"importers\"] as const;\n\n/**\n * Restricts the `--capability` selector to a {@link SCAFFOLD_CAPABILITIES} value.\n */\nexport type ExtensionScaffoldCapability = (typeof SCAFFOLD_CAPABILITIES)[number];\n\nconst SCAFFOLD_MANIFEST_CAPABILITIES: Record<ExtensionScaffoldCapability, readonly string[]> = {\n commands: [\"commands\"],\n hooks: [\"commands\", \"hooks\"],\n search: [\"commands\", \"search\"],\n importers: [\"commands\", \"schema\", \"importers\"],\n};\n\nconst SAMPLE_TEST_CAPABILITIES_LITERAL: Record<ExtensionScaffoldCapability, string> = {\n commands: '[\"commands\"]',\n hooks: '[\"commands\", \"hooks\"]',\n search: '[\"commands\", \"search\"]',\n importers: '[\"commands\", \"schema\", \"importers\"]',\n};\n\nconst ENTRYPOINT_BULLETS: Record<ExtensionScaffoldCapability, string> = {\n commands: \"- `index.ts`: starter command registration plus a `deactivate` teardown stub (compiled to `index.js`).\",\n hooks:\n \"- `index.ts`: starter command registration, an `after_command` lifecycle hook, and a `deactivate` teardown stub (compiled to `index.js`).\",\n search:\n \"- `index.ts`: starter command registration, a search provider, a vector-store adapter, and a `deactivate` teardown stub (compiled to `index.js`).\",\n importers:\n \"- `index.ts`: starter command registration, importer/exporter command registrations, and a `deactivate` teardown stub (compiled to `index.js`).\",\n};\n\nconst SAMPLE_TEST_BULLETS: Record<ExtensionScaffoldCapability, string> = {\n commands:\n \"- `index.test.ts`: sample `node:test` suite covering activation, command invocation, and teardown via the SDK testing helpers.\",\n hooks:\n \"- `index.test.ts`: sample `node:test` suite covering activation, command invocation, the after_command hook, and teardown via the SDK testing helpers.\",\n search:\n \"- `index.test.ts`: sample `node:test` suite covering activation, command invocation, search provider/vector adapter invocation, and teardown via the SDK testing helpers.\",\n importers:\n \"- `index.test.ts`: sample `node:test` suite covering activation, command invocation, importer/exporter invocation, and teardown via the SDK testing helpers.\",\n};\n\nconst TSCONFIG_BULLET = \"- `tsconfig.json`: strict TypeScript config that compiles `index.ts` to the `./index.js` entry.\";\n\nconst PACKAGE_CAPABILITY_README_SECTIONS: Record<ExtensionScaffoldCapability, readonly string[]> = {\n commands: [],\n hooks: [\n \"\",\n \"## Lifecycle Hook\",\n \"`index.ts` registers an `after_command` hook via `api.hooks.afterCommand`.\",\n \"pm fires it once a command finishes, passing the command outcome and the\",\n \"items it mutated (`context.affected`). React there to keep external context\",\n \"in sync - sync records, emit telemetry, or refresh derived state. The\",\n \"`hooks` capability in `manifest.json` is what grants the hook registration;\",\n \"remove it (and the hook) if your package only needs commands.\",\n ],\n search: [\n \"\",\n \"## Search Provider\",\n \"`index.ts` registers a deterministic in-memory search provider and\",\n \"vector-store adapter through `api.registerSearchProvider` and\",\n \"`api.registerVectorStoreAdapter`. Replace the sample scoring,\",\n \"embedding, and storage behavior with your project-specific retrieval\",\n \"logic. The `search` capability in `manifest.json` grants both\",\n \"registrations.\",\n ],\n importers: [\n \"\",\n \"## Importer and Exporter\",\n \"`index.ts` registers paired project-context import/export commands through\",\n \"`api.registerImporter` and `api.registerExporter`. Replace the starter\",\n \"payloads with your domain adapter: GitHub issues, CSV rows, documents,\",\n \"tickets, or another project-management source of truth. The `importers`\",\n \"capability grants both registrations, and `schema` grants the example\",\n \"command flag metadata.\",\n ],\n};\n\nconst EXTENSION_CAPABILITY_README_SECTIONS: Record<ExtensionScaffoldCapability, readonly string[]> = {\n commands: [],\n hooks: [\n \"\",\n \"## Lifecycle Hook\",\n \"`index.ts` registers an `after_command` hook via `api.hooks.afterCommand`.\",\n \"pm fires it once a command finishes, passing the command outcome and the\",\n \"items it mutated (`context.affected`). React there to keep external context\",\n \"in sync. The `hooks` capability in `manifest.json` grants the registration;\",\n \"remove it (and the hook) if your extension only needs commands.\",\n ],\n search: [\n \"\",\n \"## Search Provider\",\n \"`index.ts` registers a deterministic in-memory search provider and\",\n \"vector-store adapter through `api.registerSearchProvider` and\",\n \"`api.registerVectorStoreAdapter`. Replace the sample scoring, embedding,\",\n \"and storage behavior with your project-specific retrieval logic. The\",\n \"`search` capability in `manifest.json` grants both registrations.\",\n ],\n importers: [\n \"\",\n \"## Importer and Exporter\",\n \"`index.ts` registers paired project-context import/export commands through\",\n \"`api.registerImporter` and `api.registerExporter`. Replace the starter\",\n \"payloads with your domain adapter. The `importers` capability grants both\",\n \"registrations, and `schema` grants the example command flag metadata.\",\n ],\n};\n\ninterface ExtensionScaffoldFileResult {\n path: string;\n status: \"created\" | \"unchanged\";\n}\n\ninterface ExtensionScaffoldResult {\n extension_name: string;\n command_name: string;\n capability: ExtensionScaffoldCapability;\n target_path: string;\n created_directory: boolean;\n files: ExtensionScaffoldFileResult[];\n}\n\n/**\n * Build the `activate` body lines for the starter entrypoint. The base body\n * always registers the starter command; capability-specific variants append\n * the matching SDK surface so generated packages demonstrate one runnable\n * customization primitive end to end.\n */\nfunction buildActivateBodyLines(\n extensionName: string,\n commandName: string,\n capability: ExtensionScaffoldCapability,\n): string[] {\n const searchProviderName = `${extensionName}-search`;\n const vectorAdapterName = `${extensionName}-vector`;\n const adapterName = `${extensionName.replace(/-/g, \" \")} items`;\n const commandLines = [\n \" api.registerCommand({\",\n ` name: ${JSON.stringify(commandName)},`,\n ' description: \"Starter scaffold command. Replace with your own behavior.\",',\n \" run: async (context) => ({\",\n \" ok: true,\",\n ` source: ${JSON.stringify(extensionName)},`,\n \" command: context.command,\",\n ' message: \"Starter extension scaffold is active.\",',\n \" }),\",\n \" });\",\n ];\n if (capability === \"commands\") {\n return commandLines;\n }\n if (capability === \"search\") {\n return [\n ...commandLines,\n \"\",\n \" // Search providers let packages customize how pm ranks and retrieves\",\n \" // project context. This starter is deterministic and dependency-free:\",\n \" // replace the scoring with your domain retrieval, embedding, or rerank\",\n \" // logic as the package grows.\",\n \" api.registerSearchProvider({\",\n ` name: ${JSON.stringify(searchProviderName)},`,\n \" query: async (context) => {\",\n \" const needle = context.query.toLowerCase();\",\n \" const hits = context.documents\",\n \" .filter((document) => {\",\n \" const title = String(document.metadata.title ?? \\\"\\\").toLowerCase();\",\n \" return title.includes(needle);\",\n \" })\",\n \" .map((document) => ({\",\n \" id: document.metadata.id,\",\n \" score: 1,\",\n ' matched_fields: [\"title\"],',\n \" }));\",\n \" return { hits };\",\n \" },\",\n \" embed: async (context) => [context.input.length],\",\n \" });\",\n \"\",\n \" // Vector-store adapters let packages own semantic index storage. This\",\n \" // starter returns a stable in-memory hit so generated tests can exercise\",\n \" // the adapter without external services.\",\n \" api.registerVectorStoreAdapter({\",\n ` name: ${JSON.stringify(vectorAdapterName)},`,\n \" query: async (context) => [{ id: \\\"starter-vector-hit\\\", score: context.limit }],\",\n \" upsert: async (context) => ({ upserted: context.points.length }),\",\n \" delete: async (context) => ({ deleted: context.ids.length }),\",\n \" });\",\n ];\n }\n if (capability === \"importers\") {\n return [\n ...commandLines,\n \"\",\n \" // Importers/exporters are the bridge between pm's context graph and\",\n \" // another project-management system. Keep the starter deterministic so\",\n \" // package tests can run without touching the network or filesystem; replace\",\n \" // these payloads with your adapter's real mapping as the package grows.\",\n \" api.registerImporter(\",\n ` ${JSON.stringify(adapterName)},`,\n \" async (context) => ({\",\n \" imported: 1,\",\n \" source: context.options.source ?? \\\"starter\\\",\",\n \" args: context.args,\",\n \" }),\",\n \" {\",\n ` action: ${JSON.stringify(`${adapterName} import`)},`,\n ' description: \"Import starter records into pm context.\",',\n \" flags: [\",\n \" {\",\n ' long: \"--source\",',\n ' value_name: \"name\",',\n ' value_type: \"string\",',\n ' description: \"Source name or path to import from.\",',\n \" },\",\n \" ],\",\n \" },\",\n \" );\",\n \"\",\n \" api.registerExporter(\",\n ` ${JSON.stringify(adapterName)},`,\n \" async (context) => ({\",\n \" exported: true,\",\n \" destination: context.options.destination ?? \\\"stdout\\\",\",\n \" args: context.args,\",\n \" }),\",\n \" {\",\n ` action: ${JSON.stringify(`${adapterName} export`)},`,\n ' description: \"Export pm context into starter records.\",',\n \" flags: [\",\n \" {\",\n ' long: \"--destination\",',\n ' value_name: \"name\",',\n ' value_type: \"string\",',\n ' description: \"Destination name or path to export to.\",',\n \" },\",\n \" ],\",\n \" },\",\n \" );\",\n ];\n }\n return [\n ...commandLines,\n \"\",\n \" // after_command hooks fire once pm finishes a command, receiving the items\",\n \" // it mutated. This is the natural place to react to every change - sync to\",\n \" // an external system, emit telemetry, or refresh derived context\",\n ' // (\"project management = context management\"). This starter is a documented',\n \" // no-op on the success path; replace the body with your own reaction.\",\n \" api.hooks.afterCommand((context) => {\",\n \" if (!context.ok) {\",\n \" return;\",\n \" }\",\n \" // `context.affected` lists the items pm mutated (id, status,\",\n \" // changed_fields). React here, e.g.:\",\n \" // for (const item of context.affected ?? []) { /* ...item.id... */ }\",\n \" });\",\n ];\n}\n\n/**\n * Build the colocated `node:test` sample suite (`index.test.ts`) for the chosen\n * capability. Authored in TypeScript and run through `npm test` (`tsc && node\n * --test`), it imports the compiled `./index.js` entry under NodeNext resolution.\n * Every variant covers activation, command invocation, and teardown via the SDK\n * testing helpers; the `hooks` variant adds a test that asserts the\n * `after_command` hook is registered and fires cleanly through the public SDK\n * testing helper `runRegisteredHookForTest`.\n */\nfunction buildSampleTestSource(\n extensionName: string,\n commandName: string,\n capability: ExtensionScaffoldCapability,\n): string {\n const hooksEnabled = capability === \"hooks\";\n const searchEnabled = capability === \"search\";\n const importersEnabled = capability === \"importers\";\n const capabilitiesLiteral = SAMPLE_TEST_CAPABILITIES_LITERAL[capability];\n const searchProviderName = `${extensionName}-search`;\n const vectorAdapterName = `${extensionName}-vector`;\n const adapterName = `${extensionName.replace(/-/g, \" \")} items`;\n const importNames = [\n \" activateExtensionForTest,\",\n \" assertExtensionDeactivated,\",\n \" assertRegisteredCommandContract,\",\n ...(hooksEnabled ? [\" assertRegisteredHook,\"] : []),\n ...(searchEnabled ? [\" assertRegisteredSearchProvider,\", \" assertRegisteredVectorStoreAdapter,\"] : []),\n ...(importersEnabled ? [\" assertRegisteredImporter,\", \" assertRegisteredExporter,\"] : []),\n \" deactivateExtensionForTest,\",\n \" runRegisteredCommandForTest,\",\n ...(hooksEnabled ? [\" runRegisteredHookForTest,\"] : []),\n ...(searchEnabled ? [\" runRegisteredSearchProviderForTest,\", \" runRegisteredVectorStoreAdapterForTest,\"] : []),\n ...(importersEnabled ? [\" runRegisteredImporterForTest,\", \" runRegisteredExporterForTest,\"] : []),\n ];\n const hookTestLines = hooksEnabled\n ? [\n `test(${JSON.stringify(`${extensionName} reacts to commands via its after_command hook`)}, async () => {`,\n \" const activation = await activateExtensionForTest(extension, {\",\n ` name: ${JSON.stringify(extensionName)},`,\n ` capabilities: ${capabilitiesLiteral},`,\n \" });\",\n \" // assertRegisteredHook throws unless an after_command hook is registered,\",\n \" // so reaching the next line already proves the hook is wired.\",\n \" assertRegisteredHook(activation.hooks, {\",\n ' kind: \"after_command\",',\n ` extensionName: ${JSON.stringify(extensionName)},`,\n \" });\",\n \" // runRegisteredHookForTest fires the hook through pm's real runner with a\",\n \" // synthetic context and returns the warnings it produced; a clean hook\",\n \" // returns none. Replace the context/assertions as your hook grows.\",\n \" const warnings = await runRegisteredHookForTest(activation.hooks, {\",\n ' kind: \"after_command\",',\n \" context: {\",\n ` command: ${JSON.stringify(commandName)},`,\n \" args: [],\",\n ' pm_root: \"\",',\n \" ok: true,\",\n \" affected: [],\",\n \" },\",\n \" });\",\n \" assert.deepEqual(warnings, []);\",\n \"});\",\n \"\",\n ]\n : [];\n const searchTestLines = searchEnabled\n ? [\n `test(${JSON.stringify(`${extensionName} registers and invokes search primitives`)}, async () => {`,\n \" const activation = await activateExtensionForTest(extension, {\",\n ` name: ${JSON.stringify(extensionName)},`,\n ` capabilities: ${capabilitiesLiteral},`,\n \" });\",\n \" assertRegisteredSearchProvider(activation.registrations, {\",\n ` provider: ${JSON.stringify(searchProviderName)},`,\n ` extensionName: ${JSON.stringify(extensionName)},`,\n \" });\",\n \" assertRegisteredVectorStoreAdapter(activation.registrations, {\",\n ` adapter: ${JSON.stringify(vectorAdapterName)},`,\n ` extensionName: ${JSON.stringify(extensionName)},`,\n \" });\",\n \"\",\n \" // The starter provider reads only document title/id, so `settings` is a\",\n \" // minimal typed stub and `documents` carry just the fields it inspects.\",\n \" const query = await runRegisteredSearchProviderForTest(activation.registrations, {\",\n ` provider: ${JSON.stringify(searchProviderName)},`,\n ' operation: \"query\",',\n \" context: {\",\n ' query: \"sync\",',\n ' mode: \"semantic\",',\n ' tokens: [\"sync\"],',\n \" options: {},\",\n \" settings: {} as PmSettings,\",\n \" documents: [\",\n ' { metadata: { id: \"pm-1\", title: \"Sync external context\" }, body: \"\" },',\n ' { metadata: { id: \"pm-2\", title: \"Unrelated task\" }, body: \"\" },',\n \" ] as ItemDocument[],\",\n \" },\",\n \" });\",\n ' assert.deepEqual(query, { hits: [{ id: \"pm-1\", score: 1, matched_fields: [\"title\"] }] });',\n \"\",\n \" const embedding = await runRegisteredSearchProviderForTest(activation.registrations, {\",\n ` provider: ${JSON.stringify(searchProviderName)},`,\n ' operation: \"embed\",',\n ' context: { input: \"abc\", settings: {} as PmSettings, model: \"starter-model\" },',\n \" });\",\n \" assert.deepEqual(embedding, [3]);\",\n \"\",\n \" const vectorHits = await runRegisteredVectorStoreAdapterForTest(activation.registrations, {\",\n ` adapter: ${JSON.stringify(vectorAdapterName)},`,\n ' operation: \"query\",',\n \" context: { vector: [0.1, 0.2], limit: 2, settings: {} as PmSettings },\",\n \" });\",\n ' assert.deepEqual(vectorHits, [{ id: \"starter-vector-hit\", score: 2 }]);',\n \"});\",\n \"\",\n ]\n : [];\n const importerTestLines = importersEnabled\n ? [\n `test(${JSON.stringify(`${extensionName} registers and invokes import/export primitives`)}, async () => {`,\n \" const activation = await activateExtensionForTest(extension, {\",\n ` name: ${JSON.stringify(extensionName)},`,\n ` capabilities: ${capabilitiesLiteral},`,\n \" });\",\n \" assertRegisteredImporter(activation.registrations, {\",\n ` importer: ${JSON.stringify(adapterName)},`,\n ` extensionName: ${JSON.stringify(extensionName)},`,\n \" });\",\n \" assertRegisteredExporter(activation.registrations, {\",\n ` exporter: ${JSON.stringify(adapterName)},`,\n ` extensionName: ${JSON.stringify(extensionName)},`,\n \" });\",\n \"\",\n \" const imported = await runRegisteredImporterForTest(activation, {\",\n ` importer: ${JSON.stringify(adapterName)},`,\n ' options: { source: \"tickets\" },',\n ' args: [\"batch-1\"],',\n \" });\",\n \" assert.equal(imported.handled, true);\",\n ' assert.deepEqual(imported.result, { imported: 1, source: \"tickets\", args: [\"batch-1\"] });',\n \"\",\n \" const exported = await runRegisteredExporterForTest(activation, {\",\n ` exporter: ${JSON.stringify(adapterName)},`,\n ' options: { destination: \"archive\" },',\n ' args: [\"done\"],',\n \" });\",\n \" assert.equal(exported.handled, true);\",\n ' assert.deepEqual(exported.result, { exported: true, destination: \"archive\", args: [\"done\"] });',\n \"});\",\n \"\",\n ]\n : [];\n return [\n 'import assert from \"node:assert/strict\";',\n 'import { test } from \"node:test\";',\n \"import {\",\n ...importNames,\n '} from \"@unbrained/pm-cli/sdk/testing\";',\n // The search sample's synthetic query/vector contexts reference these SDK types\n // for their typed-stub fixtures; other capabilities need no extra type imports.\n ...(searchEnabled ? ['import type { ItemDocument, PmSettings } from \"@unbrained/pm-cli/sdk\";'] : []),\n 'import extension from \"./index.js\";',\n \"\",\n `test(${JSON.stringify(`${extensionName} registers its starter command`)}, async () => {`,\n \" // `capabilities` mirrors manifest.json so the in-memory activation grants\",\n \" // the capabilities the entrypoint relies on.\",\n \" const activation = await activateExtensionForTest(extension, {\",\n ` name: ${JSON.stringify(extensionName)},`,\n ` capabilities: ${capabilitiesLiteral},`,\n \" });\",\n \" // assertRegisteredCommandContract throws if the command is not\",\n \" // registered, so reaching here already proves the wiring; assert on the\",\n \" // returned definition to demonstrate inspecting registered metadata.\",\n \" const registered = assertRegisteredCommandContract(activation.registrations, {\",\n ` command: ${JSON.stringify(commandName)},`,\n ` extensionName: ${JSON.stringify(extensionName)},`,\n \" });\",\n ' assert.equal(typeof registered.command.description, \"string\");',\n \"\",\n \" // runRegisteredCommandForTest invokes the handler through pm's real\",\n \" // dispatch engine, so this asserts behavior - not just that the command\",\n \" // is wired. Replace these assertions as you flesh out your command.\",\n \" const invocation = await runRegisteredCommandForTest(activation.commands, {\",\n ` command: ${JSON.stringify(commandName)},`,\n \" });\",\n \" assert.equal(invocation.handled, true);\",\n \" // The handler result is typed `unknown`, so deep-equality on the whole\",\n \" // structured payload keeps the assertion type-safe without a cast.\",\n \" assert.deepEqual(invocation.result, {\",\n \" ok: true,\",\n ` source: ${JSON.stringify(extensionName)},`,\n ` command: ${JSON.stringify(commandName)},`,\n ' message: \"Starter extension scaffold is active.\",',\n \" });\",\n \"});\",\n \"\",\n ...hookTestLines,\n ...searchTestLines,\n ...importerTestLines,\n `test(${JSON.stringify(`${extensionName} tears down cleanly via deactivate`)}, async () => {`,\n \" // deactivateExtensionForTest runs pm's real teardown engine over the\",\n \" // module, so this proves your `deactivate` hook runs without throwing.\",\n \" const teardown = await deactivateExtensionForTest(extension, {\",\n ` name: ${JSON.stringify(extensionName)},`,\n \" });\",\n \" // assertExtensionDeactivated throws unless exactly one extension tore down\",\n \" // with no failures, so reaching the next line already proves teardown ran.\",\n \" assertExtensionDeactivated(teardown);\",\n \" assert.equal(teardown.deactivated, 1);\",\n \"});\",\n \"\",\n ].join(\"\\n\");\n}\n\n/**\n * Implements build starter extension scaffold files for the public runtime surface of this module.\n */\nexport function buildStarterExtensionScaffoldFiles(\n extensionName: string,\n commandName: string,\n vocabulary: \"extension\" | \"package\",\n capability: ExtensionScaffoldCapability = \"commands\",\n): Record<string, string> {\n const packageName = `pm-${extensionName}`;\n const capabilities = SCAFFOLD_MANIFEST_CAPABILITIES[capability];\n const manifest = `${JSON.stringify(\n {\n name: extensionName,\n version: \"0.1.0\",\n entry: \"./index.js\",\n manifest_version: SCAFFOLD_MANIFEST_VERSION,\n pm_min_version: SCAFFOLD_PM_MIN_VERSION,\n trusted: true,\n sandbox_profile: \"strict\",\n permissions: { ...SCAFFOLD_DECLARED_PERMISSIONS },\n capabilities,\n },\n null,\n 2,\n )}\\n`;\n // The entrypoint is authored fully in TypeScript (ADR pm-2c28): the `import\n // type` is erased at compile time, so the typed `ExtensionApi` parameter is\n // checked against the SDK contract at author time while the emitted ./index.js\n // stays import-light. `npm run build` (tsc) compiles this index.ts to the\n // ./index.js the manifest entry loads.\n const entrypoint = [\n 'import type { ExtensionApi } from \"@unbrained/pm-cli/sdk\";',\n \"\",\n \"export function activate(api: ExtensionApi): void {\",\n ...buildActivateBodyLines(extensionName, commandName, capability),\n \"}\",\n \"\",\n \"// `deactivate` is the teardown counterpart to `activate`: pm runs it on host\",\n \"// shutdown/reload (e.g. the MCP server between requests) to release anything\",\n \"// `activate` opened - timers, connections, caches. This starter holds no such\",\n \"// resources, so it stays a documented no-op; add cleanup here as you grow.\",\n \"export function deactivate(): void {}\",\n \"\",\n \"export default {\",\n \" activate,\",\n \" deactivate,\",\n \"};\",\n \"\",\n ].join(\"\\n\");\n const tsconfig = `${JSON.stringify(SCAFFOLD_TSCONFIG, null, 2)}\\n`;\n // README bullet describing what index.ts wires, kept in sync with the chosen\n // capability so the generated docs match the generated code.\n const entrypointBullet = ENTRYPOINT_BULLETS[capability];\n if (vocabulary === \"package\") {\n const packageJson = `${JSON.stringify(\n {\n name: packageName,\n version: \"0.1.0\",\n private: true,\n type: \"module\",\n keywords: [\"pm-package\"],\n // `build` compiles index.ts to the ./index.js the manifest loads; `test`\n // compiles first (Node's `node --test` runs the emitted *.test.js, not the\n // TypeScript source) then runs the colocated sample against the peer SDK\n // testing helpers — no third-party test runner required.\n scripts: {\n build: \"tsc\",\n test: \"tsc && node --test\",\n },\n peerDependencies: {\n \"@unbrained/pm-cli\": \"*\",\n },\n devDependencies: {\n \"@types/node\": SCAFFOLD_TYPES_NODE_VERSION,\n typescript: SCAFFOLD_TYPESCRIPT_VERSION,\n },\n pm: {\n aliases: [extensionName],\n extensions: [\".\"],\n docs: [\"README.md\"],\n examples: [\"README.md\"],\n catalog: {\n display_name: extensionName,\n category: \"workflow\",\n summary: \"Starter pm package scaffold.\",\n tags: [\"starter\"],\n },\n },\n },\n null,\n 2,\n )}\\n`;\n // node:test sample: demonstrates validating the package with the SDK testing\n // helpers without adding a third-party test runner. The suite covers the\n // capability the scaffold targets (command invocation, and for the hooks\n // capability, the after_command lifecycle hook).\n const sampleTest = buildSampleTestSource(extensionName, commandName, capability);\n const sampleTestBullet = SAMPLE_TEST_BULLETS[capability];\n // Ignore compiled TypeScript output wherever tsc emits it. Authors can add\n // sibling or subdirectory modules, and tsc writes each .js next to its source.\n const gitignore = [\n \"node_modules/\",\n \"*.log\",\n \"\",\n \"# Compiled TypeScript output (npm run build)\",\n \"*.js\",\n \"*.test.js\",\n \"*.js.map\",\n \"*.d.ts\",\n \"*.d.ts.map\",\n \"\",\n ].join(\"\\n\");\n const searchProviderName = `${extensionName}-search`;\n const vectorAdapterName = `${extensionName}-vector`;\n const adapterName = `${extensionName.replace(/-/g, \" \")} items`;\n const defineBuilderImports = [\n \"defineCommand\",\n ...(capability === \"hooks\" ? [\"defineAfterCommandHook\"] : []),\n ...(capability === \"search\" ? [\"defineSearchProvider\", \"defineVectorStoreAdapter\"] : []),\n ...(capability === \"importers\" ? [\"defineImporter\", \"defineExporter\"] : []),\n ].join(\", \");\n const defineBuilderSnippet = [\n \"```ts\",\n `import { ${defineBuilderImports} } from \"@unbrained/pm-cli/sdk\";`,\n 'import type { ExtensionApi } from \"@unbrained/pm-cli/sdk\";',\n \"\",\n \"export const pingCommand = defineCommand({\",\n ` name: ${JSON.stringify(commandName)},`,\n ' description: \"Starter scaffold command. Replace with your own behavior.\",',\n \" run: (context) => ({ ok: true, command: context.command }),\",\n \"});\",\n ];\n if (capability === \"hooks\") {\n defineBuilderSnippet.push(\n \"\",\n \"export const afterCommandHook = defineAfterCommandHook((context) => {\",\n \" if (!context.ok) return;\",\n \" // React to context.affected here as your package grows.\",\n \"});\",\n );\n }\n if (capability === \"search\") {\n defineBuilderSnippet.push(\n \"\",\n \"export const searchProvider = defineSearchProvider({\",\n ` name: ${JSON.stringify(searchProviderName)},`,\n \" query: async (context) => ({\",\n \" hits: context.documents\",\n \" .filter((document) => String(document.metadata.title ?? \\\"\\\").toLowerCase().includes(context.query.toLowerCase()))\",\n \" .map((document) => ({ id: document.metadata.id, score: 1, matched_fields: [\\\"title\\\"] })),\",\n \" }),\",\n \" embed: async (context) => [context.input.length],\",\n \"});\",\n \"\",\n \"export const vectorStoreAdapter = defineVectorStoreAdapter({\",\n ` name: ${JSON.stringify(vectorAdapterName)},`,\n \" query: async (context) => [{ id: \\\"starter-vector-hit\\\", score: context.limit }],\",\n \" upsert: async (context) => ({ upserted: context.points.length }),\",\n \" delete: async (context) => ({ deleted: context.ids.length }),\",\n \"});\",\n );\n }\n if (capability === \"importers\") {\n defineBuilderSnippet.push(\n \"\",\n \"export const importer = defineImporter(async (context) => ({\",\n \" imported: 1,\",\n \" source: context.options.source ?? \\\"starter\\\",\",\n \" args: context.args,\",\n \"}));\",\n \"\",\n \"export const exporter = defineExporter(async (context) => ({\",\n \" exported: true,\",\n \" destination: context.options.destination ?? \\\"stdout\\\",\",\n \" args: context.args,\",\n \"}));\",\n );\n }\n defineBuilderSnippet.push(\n \"\",\n \"export function activate(api: ExtensionApi): void {\",\n \" api.registerCommand(pingCommand);\",\n );\n if (capability === \"hooks\") {\n defineBuilderSnippet.push(\" api.hooks.afterCommand(afterCommandHook);\");\n }\n if (capability === \"search\") {\n defineBuilderSnippet.push(\" api.registerSearchProvider(searchProvider);\", \" api.registerVectorStoreAdapter(vectorStoreAdapter);\");\n }\n if (capability === \"importers\") {\n defineBuilderSnippet.push(\n ` api.registerImporter(${JSON.stringify(adapterName)}, importer, {`,\n ` action: ${JSON.stringify(`${adapterName} import`)},`,\n ' description: \"Import starter records into pm context.\",',\n \" flags: [\",\n \" {\",\n ' long: \"--source\",',\n ' value_name: \"name\",',\n ' value_type: \"string\",',\n ' description: \"Source name or path to import from.\",',\n \" },\",\n \" ],\",\n \" });\",\n ` api.registerExporter(${JSON.stringify(adapterName)}, exporter, {`,\n ` action: ${JSON.stringify(`${adapterName} export`)},`,\n ' description: \"Export pm context into starter records.\",',\n \" flags: [\",\n \" {\",\n ' long: \"--destination\",',\n ' value_name: \"name\",',\n ' value_type: \"string\",',\n ' description: \"Destination name or path to export to.\",',\n \" },\",\n \" ],\",\n \" });\",\n );\n }\n defineBuilderSnippet.push(\n \"}\",\n \"\",\n \"export function deactivate(): void {}\",\n \"\",\n \"export default { activate, deactivate };\",\n \"```\",\n );\n const packageReadme = [\n `# ${packageName}`,\n \"\",\n \"Generated by `pm package init`.\",\n \"\",\n \"## Included Files\",\n \"- `package.json`: package metadata, `build`/`test` scripts, and `pm` resource manifest.\",\n \"- `manifest.json`: extension metadata and capabilities.\",\n entrypointBullet,\n sampleTestBullet,\n TSCONFIG_BULLET,\n \"- `.gitignore`: ignores `node_modules/`, logs, and compiled JavaScript/declaration output.\",\n \"\",\n \"## Quick Start\",\n \"This package is authored in TypeScript; build it once so the manifest's\",\n \"`./index.js` entry exists, then install it:\",\n \"```bash\",\n \"npm install\",\n \"npm run build\",\n \"pm install --project <package-path>\",\n `pm ${commandName}`,\n \"pm package doctor --project --detail summary\",\n \"```\",\n \"\",\n \"## Validate the Package\",\n \"`npm install` pulls the peer SDK and TypeScript; `npm test` compiles and runs\",\n \"the colocated sample test:\",\n \"```bash\",\n \"npm install\",\n \"npm test\",\n \"```\",\n \"`npm test` runs `tsc && node --test`: it compiles `index.ts`/`index.test.ts`\",\n \"then executes the emitted `index.test.js` against the\",\n \"`@unbrained/pm-cli/sdk/testing` helpers - no extra test runner required.\",\n \"\",\n \"## Authoring With define* Builders\",\n \"`index.ts` is authored fully in TypeScript so every registration is checked\",\n \"against the SDK contracts at author time. Use the public SDK authoring\",\n \"builders for exported definitions you want literal-type preservation,\",\n \"contextual handler inference, and direct unit tests for:\",\n ...defineBuilderSnippet,\n \"The builders return their argument unchanged; runtime validation still lives\",\n \"in `api.register*`, and behavior validation lives in `sdk/testing`.\",\n ...PACKAGE_CAPABILITY_README_SECTIONS[capability],\n \"\",\n \"## Compatibility Bounds\",\n \"`manifest.json` cannot hold comments, so the version-compatibility fields are documented here:\",\n `- \\`manifest_version\\` (integer): manifest schema generation. Leave at \\`${SCAFFOLD_MANIFEST_VERSION}\\` unless you adopt a newer manifest schema.`,\n `- \\`pm_min_version\\` (string): lowest pm CLI version that may load this package. Scaffolded as \\`${SCAFFOLD_PM_MIN_VERSION}\\`. The loader blocks the package on older CLIs.`,\n \"- `pm_max_version` (string, optional): highest pm CLI version that may load this package. Add it to block CLIs that are newer than the version you have validated against. The loader blocks the package when the CLI exceeds this bound.\",\n \"\",\n \"## Policy Metadata\",\n \"The starter command is pure compute, so `manifest.json` declares `trusted: true`, `sandbox_profile: \\\"strict\\\"`, and all six permission keys as `false`. Keep that least-privilege shape for pure packages; relax only the specific permission your package actually needs and verify with `pm package doctor --project --detail deep --trace`.\",\n \"\",\n \"## Notes\",\n \"- Author in `index.ts`; `npm run build` (tsc) emits the `./index.js` the manifest loads, so rebuild after editing before installing or reloading.\",\n \"- Move larger runtimes into sibling or subdirectory `*.ts` modules and import them; `tsconfig.json` compiles every `*.ts` in the package (recursively).\",\n \"- Add capabilities to the extension manifest only when the entrypoint uses the matching SDK API.\",\n \"- Use `@unbrained/pm-cli/sdk` as the public SDK import for richer package runtimes.\",\n \"\",\n ].join(\"\\n\");\n return {\n \"package.json\": packageJson,\n \"manifest.json\": manifest,\n \"index.ts\": entrypoint,\n \"index.test.ts\": sampleTest,\n \"tsconfig.json\": tsconfig,\n \".gitignore\": gitignore,\n \"README.md\": packageReadme,\n };\n }\n const readme = [\n `# ${extensionName}`,\n \"\",\n \"Generated by `pm extension init`.\",\n \"\",\n \"## Included Files\",\n \"- `manifest.json`: extension metadata and capabilities.\",\n entrypointBullet,\n TSCONFIG_BULLET,\n \"\",\n \"## Quick Start\",\n \"This extension is authored in TypeScript; compile `index.ts` to the manifest's\",\n \"`./index.js` entry, then install it. The SDK types resolve once\",\n \"`@unbrained/pm-cli` is available to the compiler (install it, Node types, and TypeScript, or\",\n \"build from a project that already depends on the CLI):\",\n \"```bash\",\n \"npm install -D typescript @types/node @unbrained/pm-cli\",\n \"npx tsc\",\n \"pm extension --install --project <scaffold-path>\",\n `pm ${commandName}`,\n \"pm extension --doctor --project --detail summary\",\n \"```\",\n ...EXTENSION_CAPABILITY_README_SECTIONS[capability],\n \"\",\n \"## Compatibility Bounds\",\n \"`manifest.json` cannot hold comments, so the version-compatibility fields are documented here:\",\n `- \\`manifest_version\\` (integer): manifest schema generation. Leave at \\`${SCAFFOLD_MANIFEST_VERSION}\\` unless you adopt a newer manifest schema.`,\n `- \\`pm_min_version\\` (string): lowest pm CLI version that may load this extension. Scaffolded as \\`${SCAFFOLD_PM_MIN_VERSION}\\`. The loader blocks the extension on older CLIs.`,\n \"- `pm_max_version` (string, optional): highest pm CLI version that may load this extension. Add it to block CLIs that are newer than the version you have validated against. The loader blocks the extension when the CLI exceeds this bound.\",\n \"\",\n \"## Policy Metadata\",\n \"The starter command is pure compute, so `manifest.json` declares `trusted: true`, `sandbox_profile: \\\"strict\\\"`, and all six permission keys as `false`. Keep that least-privilege shape for pure extensions; relax only the specific permission your extension actually needs and verify with `pm extension --doctor --project --detail deep --trace`.\",\n \"\",\n \"## Notes\",\n \"- This scaffold uses TypeScript ESM source compiled to ESM output, so it works in package scopes with `type: module`.\",\n \"- Author in `index.ts` and recompile to `index.js` (the manifest entry) after editing capabilities or command behavior.\",\n \"- Release any resources `activate` opens (timers, connections, caches) in the `deactivate` teardown hook.\",\n \"\",\n ].join(\"\\n\");\n return {\n \"manifest.json\": manifest,\n \"index.ts\": entrypoint,\n \"tsconfig.json\": tsconfig,\n \"README.md\": readme,\n };\n}\n\n/**\n * Implements scaffold extension project for the public runtime surface of this module.\n */\nexport async function scaffoldExtensionProject(\n target: string,\n vocabulary: \"extension\" | \"package\" = \"extension\",\n capability: string = \"commands\",\n): Promise<ExtensionScaffoldResult> {\n const normalizedCapability = capability.trim().toLowerCase();\n if (!(SCAFFOLD_CAPABILITIES as readonly string[]).includes(normalizedCapability)) {\n throw new PmCliError(\n `Unknown scaffold capability \"${capability}\". Supported capabilities: ${SCAFFOLD_CAPABILITIES.join(\", \")}.`,\n EXIT_CODE.USAGE,\n );\n }\n const resolvedCapability = normalizedCapability as ExtensionScaffoldCapability;\n const normalizedTarget = target.trim();\n const targetPath = path.resolve(process.cwd(), normalizedTarget);\n const extensionName = normalizeManagedDirectoryName(path.basename(targetPath));\n // Hyphenated top-level command groups can surface in help but fail dispatch in\n // Commander, so generated starters use space-separated command words while the\n // manifest and package identity keep their normalized directory names.\n const commandName = `${extensionName.replace(/-/g, \" \")} ping`;\n const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary, resolvedCapability);\n\n let createdDirectory = false;\n if (await pathExists(targetPath)) {\n const existingTargetStats = await fs.stat(targetPath);\n if (!existingTargetStats.isDirectory()) {\n throw new PmCliError(\n `Scaffold target \"${targetPath}\" exists and is not a directory.`,\n EXIT_CODE.CONFLICT,\n );\n }\n } else {\n await fs.mkdir(targetPath, { recursive: true });\n createdDirectory = true;\n }\n\n for (const [relativePath, content] of Object.entries(scaffoldFiles)) {\n const absolutePath = path.join(targetPath, relativePath);\n if (!(await pathExists(absolutePath))) {\n continue;\n }\n const existingContent = await fs.readFile(absolutePath, \"utf8\");\n if (existingContent !== content) {\n throw new PmCliError(\n `Scaffold file \"${relativePath}\" already exists with different content in \"${targetPath}\". Choose a new target path or remove conflicting files.`,\n EXIT_CODE.CONFLICT,\n );\n }\n }\n\n const files: ExtensionScaffoldFileResult[] = [];\n for (const [relativePath, content] of Object.entries(scaffoldFiles)) {\n const absolutePath = path.join(targetPath, relativePath);\n if (await pathExists(absolutePath)) {\n files.push({\n path: relativePath,\n status: \"unchanged\",\n });\n continue;\n }\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n await fs.writeFile(absolutePath, content, \"utf8\");\n files.push({\n path: relativePath,\n status: \"created\",\n });\n }\n\n return {\n extension_name: extensionName,\n command_name: commandName,\n capability: resolvedCapability,\n target_path: targetPath,\n created_directory: createdDirectory,\n files,\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;;;;;;;;AAUjB,IAAM,4BAA4B;AAClC,IAAM,0BAA0B;AAChC,IAAM,gCAAgC;EACpC,SAAS;EACT,UAAU;EACV,SAAS;EACT,UAAU;EACV,WAAW;EACX,eAAe;;AAKjB,IAAM,8BAA8B;AAKpC,IAAM,8BAA8B;AAWpC,IAAM,oBAAoB;EACxB,iBAAiB;IACf,QAAQ;IACR,QAAQ;IACR,kBAAkB;IAClB,QAAQ;IACR,iBAAiB;IACjB,cAAc;IACd,aAAa;;;;IAIb,OAAO,CAAC,MAAM;;;;EAIhB,SAAS,CAAC,SAAS;;AAWd,IAAM,wBAAwB,CAAC,YAAY,SAAS,UAAU,WAAW;AAOhF,IAAM,iCAAyF;EAC7F,UAAU,CAAC,UAAU;EACrB,OAAO,CAAC,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A,WAAW,KAAK,UAAU,WAAW,CAAC;MACtC;MACA;MACA;;AAEF,QAAI,eAAe,SAAS;AAC1B,2BAAqB,KACnB,IACA,yEACA,8BACA,8DACA,KAAK;IAET;AACA,QAAI,eAAe,UAAU;AAC3B,2BAAqB,KACnB,IACA,wDACA,WAAW,KAAK,UAAU,kBAAkB,CAAC,KAC7C,kCACA,+BACA,0HACA,kGACA,SACA,uDACA,OACA,IACA,gEACA,WAAW,KAAK,UAAU,iBAAiB,CAAC,KAC5C,qFACA,uEACA,mEACA,KAAK;IAET;AACA,QAAI,eAAe,aAAa;AAC9B,2BAAqB,KACnB,IACA,gEACA,kBACA,kDACA,yBACA,QACA,IACA,gEACA,qBACA,2DACA,yBACA,MAAM;IAEV;AACA,yBAAqB,KACnB,IACA,uDACA,qCAAqC;AAEvC,QAAI,eAAe,SAAS;AAC1B,2BAAqB,KAAK,6CAA6C;IACzE;AACA,QAAI,eAAe,UAAU;AAC3B,2BAAqB,KAAK,iDAAiD,uDAAuD;IACpI;AACA,QAAI,eAAe,aAAa;AAC9B,2BAAqB,KACnB,0BAA0B,KAAK,UAAU,WAAW,CAAC,iBACrD,eAAe,KAAK,UAAU,GAAG,WAAW,SAAS,CAAC,KACtD,+DACA,gBACA,WACA,6BACA,+BACA,iCACA,+DACA,YACA,UACA,SACA,0BAA0B,KAAK,UAAU,WAAW,CAAC,iBACrD,eAAe,KAAK,UAAU,GAAG,WAAW,SAAS,CAAC,KACtD,+DACA,gBACA,WACA,kCACA,+BACA,iCACA,kEACA,YACA,UACA,OAAO;IAEX;AACA,yBAAqB,KACnB,KACA,IACA,yCACA,IACA,4CACA,KAAK;AAEP,UAAM,gBAAgB;MACpB,KAAK,WAAW;MAChB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA,MAAM,WAAW;MACjB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;M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
5
5
|
// dist/core/schema/type-presets.js
|
|
6
6
|
!(function() {
|
|
@@ -83,4 +83,4 @@ export {
|
|
|
83
83
|
normalizeTypePresetName,
|
|
84
84
|
resolveTypePresetDefinitions
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=chunk-
|
|
86
|
+
//# sourceMappingURL=chunk-IOT6WRL5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toNonEmptyStringOrUndefined
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EYPINTFR.js";
|
|
4
4
|
|
|
5
5
|
// dist/core/governance/metadata-coverage.js
|
|
6
6
|
!(function() {
|
|
@@ -270,4 +270,4 @@ export {
|
|
|
270
270
|
computeMetadataCoverage,
|
|
271
271
|
groupItemsByDimension
|
|
272
272
|
};
|
|
273
|
-
//# sourceMappingURL=chunk-
|
|
273
|
+
//# sourceMappingURL=chunk-IXAZI443.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
PmCliError,
|
|
6
6
|
isPathWithinDirectory,
|
|
7
7
|
pathExists
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VSAABFGQ.js";
|
|
9
9
|
|
|
10
10
|
// dist/cli/commands/extension/shared.js
|
|
11
11
|
import fs from "node:fs/promises";
|
|
@@ -110,6 +110,6 @@ export {
|
|
|
110
110
|
parseExtensionManifest,
|
|
111
111
|
validateExtensionDirectory
|
|
112
112
|
};
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
113
|
+
//# sourceMappingURL=chunk-J3NMWFIN.js.map
|
|
114
114
|
|
|
115
115
|
//# debugId=3bbd07d2-f7c0-5529-859c-5f4206b0a576
|