@unbrained/pm-cli 2026.7.18 → 2026.7.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +17 -0
- package/dist/cli/commands/claim.js +6 -4
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/comments.js +5 -2
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/context.d.ts +10 -1
- package/dist/cli/commands/context.js +44 -6
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.js +15 -4
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/next.js +13 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/update.js +14 -3
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/error-guidance.js +23 -4
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +11 -0
- package/dist/cli/extension-command-help.js +62 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/main.js +16 -11
- package/dist/cli/main.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +326 -350
- package/dist/cli-bundle/chunks/{append-5YF3TO7I.js → append-MBXHNWSX.js} +5 -5
- package/dist/cli-bundle/chunks/append-XUYF7NON.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-BIRYX32V.js → chunk-2UCG5H6B.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VE6ZSTQW.js → chunk-2XPDCXK5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-I3INI567.js → chunk-3EZZTFL2.js} +909 -124
- package/dist/cli-bundle/chunks/chunk-3EZZTFL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GLZKZON6.js → chunk-3HSRP6T2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XWBD6DSR.js → chunk-3KPNOZOH.js} +23 -23
- package/dist/cli-bundle/chunks/{chunk-MR4SHYR4.js → chunk-3QNUDDY2.js} +104 -23
- package/dist/cli-bundle/chunks/chunk-3QNUDDY2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SIPOACV5.js → chunk-46Z6FAVP.js} +888 -124
- package/dist/cli-bundle/chunks/chunk-46Z6FAVP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HO4DLBNK.js → chunk-4M6RZJXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RXPQ5Q23.js → chunk-4PSJVGRE.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-ADXDCAKP.js → chunk-5S6IZXK7.js} +146 -32
- package/dist/cli-bundle/chunks/{chunk-IL5SPRMH.js.map → chunk-5S6IZXK7.js.map} +7 -1
- package/dist/cli-bundle/chunks/chunk-66SRNEBK.js +143 -0
- package/dist/cli-bundle/chunks/chunk-66SRNEBK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YFE7JHX3.js → chunk-6BNV3G6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-43UMFKCK.js → chunk-6V4T4RD3.js} +23 -23
- package/dist/cli-bundle/chunks/chunk-77XFQRTD.js +140 -0
- package/dist/cli-bundle/chunks/chunk-77XFQRTD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EHJFUOXL.js → chunk-7B7IHMLH.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-I7DIDUSP.js → chunk-7CHWLT2J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L6FVNR7X.js → chunk-A3GAQLBH.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-B57RJHBZ.js → chunk-A4FVWFZY.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-D52ZN3BF.js → chunk-A5EQPNV7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZAE66GQ.js → chunk-AGEBQRBG.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-WU3KAN6A.js → chunk-AQUNTB7G.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OGVTB5VO.js → chunk-AR24KW26.js} +237 -36
- package/dist/cli-bundle/chunks/chunk-AR24KW26.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XWYQ2LT4.js → chunk-BBGR4FKQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HTXXXF45.js → chunk-BDC4TW4B.js} +98 -24
- package/dist/cli-bundle/chunks/chunk-BDC4TW4B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2FUOXSRN.js → chunk-BFJP4VYC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-633PKXLT.js → chunk-BZKE2O5V.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XPUTSGJU.js → chunk-CZA2DXCV.js} +230 -36
- package/dist/cli-bundle/chunks/chunk-CZA2DXCV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KX62NMZC.js → chunk-D35WYXWC.js} +626 -5
- package/dist/cli-bundle/chunks/chunk-D35WYXWC.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-DOASIOQR.js +289 -0
- package/dist/cli-bundle/chunks/chunk-DOASIOQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L337QKWJ.js → chunk-DUDLSQFG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-BVLOMU6O.js → chunk-E7KBMWEF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3QDR6ZLU.js → chunk-EAV3P54W.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-3QDR6ZLU.js.map → chunk-EAV3P54W.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQXRZMFN.js → chunk-EEECAV5M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-35FHWD4C.js → chunk-EI3UIMZM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RGMWJLXF.js → chunk-EVAN5VJA.js} +8 -5
- package/dist/cli-bundle/chunks/{chunk-RGMWJLXF.js.map → chunk-EVAN5VJA.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PT7MCCGD.js → chunk-FIUTBFC6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7H5NNCJ5.js → chunk-FQF6VVPH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6DYOZS6C.js → chunk-FQO5THHM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5HGZKQUL.js → chunk-FQODDTE7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-67RO3H4N.js → chunk-G33XIMRT.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-D53RTYVI.js → chunk-GFZB5CLP.js} +20 -10
- package/dist/cli-bundle/chunks/chunk-GFZB5CLP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QWBKN3QC.js → chunk-GKCEEXMA.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-DG2EQRIH.js → chunk-GRDK25BN.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-FXFCFL73.js → chunk-H3YKUVDR.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-IL5SPRMH.js → chunk-IEMXESIS.js} +123 -16
- package/dist/cli-bundle/chunks/chunk-IEMXESIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ARGDWQ4J.js → chunk-IGBBTPM5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QPGQNLPI.js → chunk-IR3GOO6E.js} +3842 -4109
- package/dist/cli-bundle/chunks/chunk-IR3GOO6E.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FY4RLHSC.js → chunk-IRJ6F23W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-66MKH7SZ.js → chunk-IXG5CMBR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-F3VC3GOV.js → chunk-JBW2S2C6.js} +2090 -253
- package/dist/cli-bundle/chunks/chunk-JBW2S2C6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7UCY6DR5.js → chunk-JPWUZOMR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FVNWHUME.js → chunk-K2L6FZBX.js} +8 -8
- package/dist/cli-bundle/chunks/chunk-KGPLSHJD.js +286 -0
- package/dist/cli-bundle/chunks/chunk-KGPLSHJD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YQEZWI3R.js → chunk-KZ5AC6B5.js} +5 -3
- package/dist/cli-bundle/chunks/chunk-KZ5AC6B5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X2MGQMZO.js → chunk-LT5UWU7H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KH6QAHME.js → chunk-M4B4RK4J.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QRZNCRNA.js → chunk-MI3346YW.js} +377 -240
- package/dist/cli-bundle/chunks/chunk-MI3346YW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2XOSFSTH.js → chunk-MQOSMBWV.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-YIIIAKCE.js → chunk-MRXAHR4B.js} +28 -22
- package/dist/cli-bundle/chunks/chunk-MRXAHR4B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7R6UIHYY.js → chunk-N2TEEOXJ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NTRQLE2R.js → chunk-N7FCFJ76.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-37DRDP2B.js → chunk-NPEYH6CE.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-GKPCTQYG.js → chunk-NTS2RKHN.js} +3942 -4216
- package/dist/cli-bundle/chunks/chunk-NTS2RKHN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6VHUGVNP.js → chunk-ODEIDKGW.js} +2062 -246
- package/dist/cli-bundle/chunks/chunk-ODEIDKGW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2CXL335K.js → chunk-OK7VSX3N.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NNANAWFH.js → chunk-OKPZDH43.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-G6MYGULG.js → chunk-OKWJUL6F.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HPAYDSR2.js → chunk-P24ZU5QV.js} +27 -21
- package/dist/cli-bundle/chunks/chunk-P24ZU5QV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TGBTLGPX.js → chunk-Q4PSG2GV.js} +13 -4
- package/dist/cli-bundle/chunks/{chunk-TGBTLGPX.js.map → chunk-Q4PSG2GV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5UKQLQM2.js → chunk-Q5NHJ6RO.js} +6 -4
- package/dist/cli-bundle/chunks/chunk-Q5NHJ6RO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D5XHO4Q7.js → chunk-Q6JPYR7I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P22HGFFI.js → chunk-QFG4MB7P.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-P22HGFFI.js.map → chunk-QFG4MB7P.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IE5KRAKN.js → chunk-QQ77W23U.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-M7MVOKVV.js → chunk-QYGK2XQ3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-646MQXFW.js → chunk-RLLOZAM2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-646MQXFW.js.map → chunk-RLLOZAM2.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X5YCTFKT.js → chunk-RWAIRGBC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-W5E2UUSH.js → chunk-RX53WHFI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-R5XTTZSJ.js → chunk-SBW7EQC4.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-TM5CIO3F.js → chunk-SGJB6PXA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DDFGYUCQ.js → chunk-STBCBDKF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-EX7OQT3Y.js → chunk-SUNZKVAH.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-EX7OQT3Y.js.map → chunk-SUNZKVAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-FHOBCGQO.js → chunk-SVAWG7EE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6O44IN44.js → chunk-T6MOTLOJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HSYV4ZYT.js → chunk-TELI67UP.js} +9 -6
- package/dist/cli-bundle/chunks/{chunk-HSYV4ZYT.js.map → chunk-TELI67UP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EWIT5WIC.js → chunk-U6RYD446.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-E4FXM2XB.js → chunk-UE7LK3RE.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-N33FD2UI.js → chunk-UNNCT5QY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2IPNL3DR.js → chunk-UOIFZ66L.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LSOWTLEM.js → chunk-UU6EP25G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HYTOJW2Q.js → chunk-UW6HCMP2.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-47HXN6RX.js → chunk-UWAQI3B7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YKFHF37B.js → chunk-V4QHAMI5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VAHZIPWS.js → chunk-VA3H7VVC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-XC2HEEOV.js → chunk-VFA5EIEN.js} +21 -11
- package/dist/cli-bundle/chunks/chunk-VFA5EIEN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TLWJP5BF.js → chunk-VQOG2ETB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-H5IOT54C.js → chunk-VSQE43NO.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-BDA35QG5.js → chunk-W6IEJXNC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WACRQ26A.js → chunk-WCBB6VI3.js} +637 -9
- package/dist/cli-bundle/chunks/chunk-WCBB6VI3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OWP6QFBV.js → chunk-XDWXPG2E.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CKX4WOPC.js → chunk-XKVHL3MB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WL3SS45P.js → chunk-XVB6BATY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NVZ6NVHJ.js → chunk-XXWDEQ6O.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ILVOOAT4.js → chunk-Y2VSGFT4.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-NCVT6XEL.js → chunk-YG56M3NE.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-AFGKSHAM.js → chunk-YGEA4CLH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-AXRT7K5V.js → chunk-YIC5NGXF.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-DHNG452T.js → chunk-ZF52NVRT.js} +396 -245
- package/dist/cli-bundle/chunks/chunk-ZF52NVRT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XXLXJL7V.js → chunk-ZUCBPXNA.js} +4 -4
- package/dist/cli-bundle/chunks/{close-X3CF6FQP.js → close-7NWA3GLA.js} +5 -5
- package/dist/cli-bundle/chunks/close-ZZCDDWJT.js +12 -0
- package/dist/cli-bundle/chunks/close-many-QCZHFCON.js +23 -0
- package/dist/cli-bundle/chunks/{close-many-J7A5EHOQ.js → close-many-YALQ7AXS.js} +14 -14
- package/dist/cli-bundle/chunks/comments-FMQNYPSZ.js +13 -0
- package/dist/cli-bundle/chunks/{comments-TMHMALA5.js → comments-SQIQ5WYR.js} +7 -7
- package/dist/cli-bundle/chunks/copy-GI3RCVZP.js +9 -0
- package/dist/cli-bundle/chunks/{copy-FWQA5OU4.js → copy-YDAMENCP.js} +4 -4
- package/dist/cli-bundle/chunks/{create-AQ5SIGZC.js → create-JSL6CXU3.js} +11 -9
- package/dist/cli-bundle/chunks/create-LXMLYJNM.js +29 -0
- package/dist/cli-bundle/chunks/delete-5DFAXJNI.js +10 -0
- package/dist/cli-bundle/chunks/{delete-YYYFOSEA.js → delete-IGVOZEU2.js} +4 -4
- package/dist/cli-bundle/chunks/{deps-NIIKXLPB.js → deps-BQAXUQAK.js} +6 -6
- package/dist/cli-bundle/chunks/{deps-MQ4ZIGZB.js → deps-CBPPSS6J.js} +6 -6
- package/dist/cli-bundle/chunks/docs-KCWPLQOV.js +14 -0
- package/dist/cli-bundle/chunks/{docs-53NUGMIQ.js → docs-NS2AZWCN.js} +7 -7
- package/dist/cli-bundle/chunks/{files-3PXGXYDB.js → files-PVWEPT5J.js} +7 -7
- package/dist/cli-bundle/chunks/{files-EGLKHD7O.js → files-XUUBQ76I.js} +7 -7
- package/dist/cli-bundle/chunks/focus-3EJVFI3D.js +10 -0
- package/dist/cli-bundle/chunks/{focus-SRPASFTN.js → focus-DHBHKK3E.js} +5 -5
- package/dist/cli-bundle/chunks/{history-compact-G4DULDCX.js → history-compact-3TNPYVFG.js} +6 -6
- package/dist/cli-bundle/chunks/history-compact-JHYVDYLW.js +16 -0
- package/dist/cli-bundle/chunks/{history-redact-IUSJ6X3E.js → history-redact-ELRL73XN.js} +4 -4
- package/dist/cli-bundle/chunks/{history-redact-THHGRQXV.js → history-redact-KKFDICCF.js} +4 -4
- package/dist/cli-bundle/chunks/{history-repair-LUQWRS7X.js → history-repair-J7WKZFAG.js} +6 -6
- package/dist/cli-bundle/chunks/history-repair-REMI7DDI.js +16 -0
- package/dist/cli-bundle/chunks/learnings-O6V5WDCV.js +13 -0
- package/dist/cli-bundle/chunks/{learnings-2MRNBFJF.js → learnings-X4D6JCCG.js} +7 -7
- package/dist/cli-bundle/chunks/{notes-73JWKWUD.js → notes-UQC6VS6N.js} +7 -7
- package/dist/cli-bundle/chunks/notes-ZSZREWZA.js +13 -0
- package/dist/cli-bundle/chunks/{plan-AZPMCG37.js → plan-5GKRBJJO.js} +12 -10
- package/dist/cli-bundle/chunks/plan-EZW2YDDY.js +26 -0
- package/dist/cli-bundle/chunks/{profile-AVCIIZID.js → profile-5PQAPCLF.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-LFYO3HHX.js → profile-CW4BD3FO.js} +10 -10
- package/dist/cli-bundle/chunks/{register-list-query-UKMF55FT.js → register-list-query-HTDQE6VI.js} +24 -24
- package/dist/cli-bundle/chunks/{register-list-query-MZUF2EEC.js → register-list-query-PHIPDFP2.js} +24 -24
- package/dist/cli-bundle/chunks/{register-mutation-T6RVNJC4.js → register-mutation-BLEWM5I6.js} +32 -32
- package/dist/cli-bundle/chunks/{register-mutation-2PBW2GEX.js → register-mutation-OTYHR7J6.js} +32 -32
- package/dist/cli-bundle/chunks/{register-operations-KHZYR6MG.js → register-operations-AMCUFYEW.js} +38 -40
- package/dist/cli-bundle/chunks/{register-operations-KHZYR6MG.js.map → register-operations-AMCUFYEW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-WPQ2LWZJ.js → register-operations-MRLHOZYR.js} +36 -38
- package/dist/cli-bundle/chunks/{register-operations-WPQ2LWZJ.js.map → register-operations-MRLHOZYR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-PGDNOXDQ.js → register-setup-N2FOSWAG.js} +15 -17
- package/dist/cli-bundle/chunks/{register-setup-PGDNOXDQ.js.map → register-setup-N2FOSWAG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-TDN7WAO6.js → register-setup-ZVKTDL4G.js} +17 -19
- package/dist/cli-bundle/chunks/{register-setup-TDN7WAO6.js.map → register-setup-ZVKTDL4G.js.map} +1 -1
- package/dist/cli-bundle/chunks/restore-A55MLFAI.js +14 -0
- package/dist/cli-bundle/chunks/{restore-E3PRGDN3.js → restore-HEQAG6EK.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-5JNFQFUW.js → schema-MAXAIHEC.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-TMIW4XZC.js → schema-Q5DAWJ2S.js} +6 -6
- package/dist/cli-bundle/chunks/update-5DTSCWVF.js +23 -0
- package/dist/cli-bundle/chunks/{update-SQYZA3ZW.js → update-DWFXXJKP.js} +15 -13
- package/dist/cli-bundle/chunks/update-many-6T4ZLZS7.js +34 -0
- package/dist/cli-bundle/chunks/update-many-MYRK6VBJ.js +38 -0
- package/dist/cli-bundle/main.js +152 -29
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/cli-bundle/sdk-runtime.js +72 -75
- package/dist/cli-bundle/sdk-testing.js +8 -8
- package/dist/cli-bundle/sdk.js +288 -642
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/core/extensions/activation-summary.d.ts +2 -0
- package/dist/core/extensions/activation-summary.js +7 -2
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +1 -1
- package/dist/core/extensions/capability-usage.js +5 -2
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-hook-runtime.js +3 -2
- package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
- package/dist/core/extensions/extension-registries.js +3 -2
- package/dist/core/extensions/extension-registries.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +38 -1
- package/dist/core/extensions/extension-types.js +3 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +36 -2
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/store/item-store.d.ts +4 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.d.ts +2 -0
- package/dist/core/store/paths.js +26 -3
- package/dist/core/store/paths.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/compose.d.ts +3 -0
- package/dist/sdk/compose.js +14 -2
- package/dist/sdk/compose.js.map +1 -1
- package/dist/sdk/dependencies.js +3 -3
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/sdk/extension-command-context.d.ts +10 -0
- package/dist/sdk/extension-command-context.js +30 -0
- package/dist/sdk/extension-command-context.js.map +1 -0
- package/dist/sdk/graph/assembly.js +14 -4
- package/dist/sdk/graph/assembly.js.map +1 -1
- package/dist/sdk/graph/index.d.ts +1 -0
- package/dist/sdk/graph/index.js +3 -2
- package/dist/sdk/graph/index.js.map +1 -1
- package/dist/sdk/graph/mutation-advisory.d.ts +20 -0
- package/dist/sdk/graph/mutation-advisory.js +80 -0
- package/dist/sdk/graph/mutation-advisory.js.map +1 -0
- package/dist/sdk/graph/run.d.ts +5 -1
- package/dist/sdk/graph/run.js +11 -3
- package/dist/sdk/graph/run.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -1
- package/dist/sdk/index.js +5 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/ownership-source.d.ts +2 -0
- package/dist/sdk/ownership-source.js +22 -0
- package/dist/sdk/ownership-source.js.map +1 -0
- package/dist/sdk/relationship-history.d.ts +38 -0
- package/dist/sdk/relationship-history.js +60 -2
- package/dist/sdk/relationship-history.js.map +1 -1
- package/dist/sdk/relationships.js +49 -8
- package/dist/sdk/relationships.js.map +1 -1
- package/dist/sdk/runtime-input.js +3 -2
- package/dist/sdk/runtime-input.js.map +1 -1
- package/dist/sdk/runtime.d.ts +2 -0
- package/dist/sdk/runtime.js +19 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/tracker-root-discovery.d.ts +6 -0
- package/dist/sdk/tracker-root-discovery.js +10 -0
- package/dist/sdk/tracker-root-discovery.js.map +1 -0
- package/dist/sdk/workspace-transaction.d.ts +83 -0
- package/dist/sdk/workspace-transaction.js +364 -0
- package/dist/sdk/workspace-transaction.js.map +1 -0
- package/docs/AGENT_UX_CONTRACTS.md +41 -0
- package/docs/EXTENSIONS.md +4 -4
- package/docs/README.md +1 -0
- package/docs/SDK.md +102 -1
- package/marketplace.json +2 -2
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/GAP_REPORT.md +31 -0
- package/packages/pm-vcs/README.md +62 -0
- package/packages/pm-vcs/extensions/vcs/index.ts +745 -0
- package/packages/pm-vcs/extensions/vcs/manifest.json +19 -0
- package/packages/pm-vcs/extensions/vcs/package.json +3 -0
- package/packages/pm-vcs/package.json +55 -0
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli-bundle/chunks/append-JHO5K6RP.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2BX74BAS.js +0 -125
- package/dist/cli-bundle/chunks/chunk-2BX74BAS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js +0 -672
- package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5UKQLQM2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6VHUGVNP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-74FKFFXO.js +0 -172
- package/dist/cli-bundle/chunks/chunk-74FKFFXO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ADXDCAKP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BAP7G3N2.js +0 -178
- package/dist/cli-bundle/chunks/chunk-BAP7G3N2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-D53RTYVI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DHNG452T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EY7ZE3TG.js +0 -1831
- package/dist/cli-bundle/chunks/chunk-EY7ZE3TG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-F3VC3GOV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FL4D53ND.js +0 -162
- package/dist/cli-bundle/chunks/chunk-FL4D53ND.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GKPCTQYG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HPAYDSR2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-I3INI567.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KX62NMZC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js +0 -662
- package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGVTB5VO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QPGQNLPI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QRZNCRNA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RC4UOUXA.js +0 -122
- package/dist/cli-bundle/chunks/chunk-RC4UOUXA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RTBX3C4C.js +0 -1841
- package/dist/cli-bundle/chunks/chunk-RTBX3C4C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SIPOACV5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WACRQ26A.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XC2HEEOV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XPUTSGJU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YIIIAKCE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YJSURTBB.js +0 -175
- package/dist/cli-bundle/chunks/chunk-YJSURTBB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YQEZWI3R.js.map +0 -7
- package/dist/cli-bundle/chunks/close-GPD7DTJV.js +0 -12
- package/dist/cli-bundle/chunks/close-many-NQLYGPYW.js +0 -23
- package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +0 -13
- package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +0 -9
- package/dist/cli-bundle/chunks/create-KOGQ3JKD.js +0 -27
- package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +0 -10
- package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +0 -14
- package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +0 -16
- package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +0 -13
- package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +0 -13
- package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +0 -24
- package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +0 -14
- package/dist/cli-bundle/chunks/update-XZJYS5X7.js +0 -21
- package/dist/cli-bundle/chunks/update-many-R24B3GBK.js +0 -36
- package/dist/cli-bundle/chunks/update-many-WQ3R3J6N.js +0 -32
- /package/dist/cli-bundle/chunks/{append-5YF3TO7I.js.map → append-MBXHNWSX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-JHO5K6RP.js.map → append-XUYF7NON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BIRYX32V.js.map → chunk-2UCG5H6B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VE6ZSTQW.js.map → chunk-2XPDCXK5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GLZKZON6.js.map → chunk-3HSRP6T2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XWBD6DSR.js.map → chunk-3KPNOZOH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HO4DLBNK.js.map → chunk-4M6RZJXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RXPQ5Q23.js.map → chunk-4PSJVGRE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFE7JHX3.js.map → chunk-6BNV3G6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-43UMFKCK.js.map → chunk-6V4T4RD3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EHJFUOXL.js.map → chunk-7B7IHMLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I7DIDUSP.js.map → chunk-7CHWLT2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L6FVNR7X.js.map → chunk-A3GAQLBH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B57RJHBZ.js.map → chunk-A4FVWFZY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D52ZN3BF.js.map → chunk-A5EQPNV7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZAE66GQ.js.map → chunk-AGEBQRBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WU3KAN6A.js.map → chunk-AQUNTB7G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XWYQ2LT4.js.map → chunk-BBGR4FKQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2FUOXSRN.js.map → chunk-BFJP4VYC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-633PKXLT.js.map → chunk-BZKE2O5V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L337QKWJ.js.map → chunk-DUDLSQFG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BVLOMU6O.js.map → chunk-E7KBMWEF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQXRZMFN.js.map → chunk-EEECAV5M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-35FHWD4C.js.map → chunk-EI3UIMZM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PT7MCCGD.js.map → chunk-FIUTBFC6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7H5NNCJ5.js.map → chunk-FQF6VVPH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6DYOZS6C.js.map → chunk-FQO5THHM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5HGZKQUL.js.map → chunk-FQODDTE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-67RO3H4N.js.map → chunk-G33XIMRT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QWBKN3QC.js.map → chunk-GKCEEXMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DG2EQRIH.js.map → chunk-GRDK25BN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FXFCFL73.js.map → chunk-H3YKUVDR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ARGDWQ4J.js.map → chunk-IGBBTPM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FY4RLHSC.js.map → chunk-IRJ6F23W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-66MKH7SZ.js.map → chunk-IXG5CMBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7UCY6DR5.js.map → chunk-JPWUZOMR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FVNWHUME.js.map → chunk-K2L6FZBX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X2MGQMZO.js.map → chunk-LT5UWU7H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KH6QAHME.js.map → chunk-M4B4RK4J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2XOSFSTH.js.map → chunk-MQOSMBWV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7R6UIHYY.js.map → chunk-N2TEEOXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NTRQLE2R.js.map → chunk-N7FCFJ76.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-37DRDP2B.js.map → chunk-NPEYH6CE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2CXL335K.js.map → chunk-OK7VSX3N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NNANAWFH.js.map → chunk-OKPZDH43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G6MYGULG.js.map → chunk-OKWJUL6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D5XHO4Q7.js.map → chunk-Q6JPYR7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IE5KRAKN.js.map → chunk-QQ77W23U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M7MVOKVV.js.map → chunk-QYGK2XQ3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X5YCTFKT.js.map → chunk-RWAIRGBC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W5E2UUSH.js.map → chunk-RX53WHFI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R5XTTZSJ.js.map → chunk-SBW7EQC4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TM5CIO3F.js.map → chunk-SGJB6PXA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDFGYUCQ.js.map → chunk-STBCBDKF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FHOBCGQO.js.map → chunk-SVAWG7EE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6O44IN44.js.map → chunk-T6MOTLOJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EWIT5WIC.js.map → chunk-U6RYD446.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E4FXM2XB.js.map → chunk-UE7LK3RE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N33FD2UI.js.map → chunk-UNNCT5QY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2IPNL3DR.js.map → chunk-UOIFZ66L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LSOWTLEM.js.map → chunk-UU6EP25G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYTOJW2Q.js.map → chunk-UW6HCMP2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-47HXN6RX.js.map → chunk-UWAQI3B7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YKFHF37B.js.map → chunk-V4QHAMI5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VAHZIPWS.js.map → chunk-VA3H7VVC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TLWJP5BF.js.map → chunk-VQOG2ETB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H5IOT54C.js.map → chunk-VSQE43NO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BDA35QG5.js.map → chunk-W6IEJXNC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OWP6QFBV.js.map → chunk-XDWXPG2E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CKX4WOPC.js.map → chunk-XKVHL3MB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WL3SS45P.js.map → chunk-XVB6BATY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NVZ6NVHJ.js.map → chunk-XXWDEQ6O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ILVOOAT4.js.map → chunk-Y2VSGFT4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NCVT6XEL.js.map → chunk-YG56M3NE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AFGKSHAM.js.map → chunk-YGEA4CLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXRT7K5V.js.map → chunk-YIC5NGXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XXLXJL7V.js.map → chunk-ZUCBPXNA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-X3CF6FQP.js.map → close-7NWA3GLA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-GPD7DTJV.js.map → close-ZZCDDWJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-NQLYGPYW.js.map → close-many-QCZHFCON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-J7A5EHOQ.js.map → close-many-YALQ7AXS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-2AOZQ5D2.js.map → comments-FMQNYPSZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-TMHMALA5.js.map → comments-SQIQ5WYR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-N3LCQBMC.js.map → copy-GI3RCVZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-FWQA5OU4.js.map → copy-YDAMENCP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-AQ5SIGZC.js.map → create-JSL6CXU3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-KOGQ3JKD.js.map → create-LXMLYJNM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-6G3MBZ6S.js.map → delete-5DFAXJNI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-YYYFOSEA.js.map → delete-IGVOZEU2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-NIIKXLPB.js.map → deps-BQAXUQAK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-MQ4ZIGZB.js.map → deps-CBPPSS6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-OWRGDMNY.js.map → docs-KCWPLQOV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-53NUGMIQ.js.map → docs-NS2AZWCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-3PXGXYDB.js.map → files-PVWEPT5J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EGLKHD7O.js.map → files-XUUBQ76I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-KZLIA6WS.js.map → focus-3EJVFI3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-SRPASFTN.js.map → focus-DHBHKK3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-G4DULDCX.js.map → history-compact-3TNPYVFG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-HHIUOMZ7.js.map → history-compact-JHYVDYLW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IUSJ6X3E.js.map → history-redact-ELRL73XN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-THHGRQXV.js.map → history-redact-KKFDICCF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-LUQWRS7X.js.map → history-repair-J7WKZFAG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-KG7SWXI6.js.map → history-repair-REMI7DDI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-ZVHSALJY.js.map → learnings-O6V5WDCV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-2MRNBFJF.js.map → learnings-X4D6JCCG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-73JWKWUD.js.map → notes-UQC6VS6N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-BAKUL5DJ.js.map → notes-ZSZREWZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-AZPMCG37.js.map → plan-5GKRBJJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-LEAGLPGP.js.map → plan-EZW2YDDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-AVCIIZID.js.map → profile-5PQAPCLF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-LFYO3HHX.js.map → profile-CW4BD3FO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-UKMF55FT.js.map → register-list-query-HTDQE6VI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-MZUF2EEC.js.map → register-list-query-PHIPDFP2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-T6RVNJC4.js.map → register-mutation-BLEWM5I6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-2PBW2GEX.js.map → register-mutation-OTYHR7J6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-KIUYTAEJ.js.map → restore-A55MLFAI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-E3PRGDN3.js.map → restore-HEQAG6EK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-5JNFQFUW.js.map → schema-MAXAIHEC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-TMIW4XZC.js.map → schema-Q5DAWJ2S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-XZJYS5X7.js.map → update-5DTSCWVF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SQYZA3ZW.js.map → update-DWFXXJKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-WQ3R3J6N.js.map → update-many-6T4ZLZS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-R24B3GBK.js.map → update-many-MYRK6VBJ.js.map} +0 -0
|
@@ -1,36 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EXECUTABLE_COMMAND_ALIASES,
|
|
3
|
+
PM_CORE_COMMAND_NAMES
|
|
4
|
+
} from "./chunk-EEECAV5M.js";
|
|
1
5
|
import {
|
|
2
6
|
ensureTypeFolderScaffold
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MQOSMBWV.js";
|
|
4
8
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
normalizeStringList,
|
|
8
|
-
parseExtensionManifest,
|
|
9
|
-
quoteCommandArg,
|
|
10
|
-
renderPmCommand,
|
|
11
|
-
validateExtensionDirectory
|
|
12
|
-
} from "./chunk-74FKFFXO.js";
|
|
9
|
+
splitCommaList
|
|
10
|
+
} from "./chunk-D6HZN36B.js";
|
|
13
11
|
import {
|
|
14
12
|
describeExtensionActivation,
|
|
15
13
|
renderExtensionSurfaceMarkdown
|
|
16
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KZ5AC6B5.js";
|
|
17
15
|
import {
|
|
18
16
|
TYPE_PRESET_NAMES,
|
|
19
17
|
normalizeTypePresetName,
|
|
20
18
|
resolveTypePresetDefinitions
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
EXECUTABLE_COMMAND_ALIASES,
|
|
24
|
-
PM_CORE_COMMAND_NAMES
|
|
25
|
-
} from "./chunk-WQXRZMFN.js";
|
|
19
|
+
} from "./chunk-OK7VSX3N.js";
|
|
26
20
|
import {
|
|
27
21
|
parseItemTypesFile,
|
|
28
22
|
serializeItemTypesFile,
|
|
29
23
|
upsertItemType
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
splitCommaList
|
|
33
|
-
} from "./chunk-D6HZN36B.js";
|
|
24
|
+
} from "./chunk-4M6RZJXF.js";
|
|
34
25
|
import {
|
|
35
26
|
createSerialQueue,
|
|
36
27
|
getActiveExtensionRegistrations,
|
|
@@ -39,8 +30,9 @@ import {
|
|
|
39
30
|
readSettings,
|
|
40
31
|
runActiveOnWriteHooks,
|
|
41
32
|
writeSettings
|
|
42
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RLLOZAM2.js";
|
|
43
34
|
import {
|
|
35
|
+
DEFAULT_EXTENSION_PRIORITY,
|
|
44
36
|
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
45
37
|
EXIT_CODE,
|
|
46
38
|
EXTENSION_CAPABILITY_CONTRACT,
|
|
@@ -53,6 +45,7 @@ import {
|
|
|
53
45
|
ensureRuntimeSchemaFileScaffold,
|
|
54
46
|
filePathForSchemaSection,
|
|
55
47
|
getSettingsPath,
|
|
48
|
+
isCanonicalPathWithinDirectory,
|
|
56
49
|
isPathWithinDirectory,
|
|
57
50
|
levenshteinDistanceWithinLimit,
|
|
58
51
|
loadExtensions,
|
|
@@ -69,11 +62,95 @@ import {
|
|
|
69
62
|
resolvePmPackageRootFromModule,
|
|
70
63
|
resolvePmRoot,
|
|
71
64
|
writeFileAtomic
|
|
72
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-WCBB6VI3.js";
|
|
66
|
+
|
|
67
|
+
// dist/sdk/workspace.js
|
|
68
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
69
|
+
import path from "node:path";
|
|
70
|
+
!(function() {
|
|
71
|
+
try {
|
|
72
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
73
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5b3e660c-f869-5a00-8082-1f0d240c74bf");
|
|
74
|
+
} catch (e2) {
|
|
75
|
+
}
|
|
76
|
+
})();
|
|
77
|
+
var PM_GITIGNORE_START = "# pm-cli:runtime-cache:start";
|
|
78
|
+
var PM_GITIGNORE_END = "# pm-cli:runtime-cache:end";
|
|
79
|
+
var PM_GITIGNORE_BLOCK = [
|
|
80
|
+
PM_GITIGNORE_START,
|
|
81
|
+
".agents/pm/runtime/",
|
|
82
|
+
".agents/pm/search/",
|
|
83
|
+
".agents/pm/locks/",
|
|
84
|
+
PM_GITIGNORE_END
|
|
85
|
+
].join("\n");
|
|
86
|
+
function getPmGitignoreBlock() {
|
|
87
|
+
return PM_GITIGNORE_BLOCK;
|
|
88
|
+
}
|
|
89
|
+
async function ensurePmGitignore(workspaceRoot) {
|
|
90
|
+
const gitignorePath = path.join(workspaceRoot, ".gitignore");
|
|
91
|
+
let current = "";
|
|
92
|
+
try {
|
|
93
|
+
current = await readFile(gitignorePath, "utf8");
|
|
94
|
+
} catch (error) {
|
|
95
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) {
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const start = current.indexOf(PM_GITIGNORE_START);
|
|
100
|
+
const end = current.indexOf(PM_GITIGNORE_END);
|
|
101
|
+
const withoutManagedBlock = start >= 0 && end >= start ? `${current.slice(0, start)}${current.slice(end + PM_GITIGNORE_END.length)}` : current;
|
|
102
|
+
const prefix = withoutManagedBlock.trimEnd();
|
|
103
|
+
const next = `${prefix.length > 0 ? `${prefix}
|
|
104
|
+
|
|
105
|
+
` : ""}${PM_GITIGNORE_BLOCK}
|
|
106
|
+
`;
|
|
107
|
+
if (next === current) {
|
|
108
|
+
return { path: gitignorePath, changed: false };
|
|
109
|
+
}
|
|
110
|
+
await writeFile(gitignorePath, next, "utf8");
|
|
111
|
+
return { path: gitignorePath, changed: true };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// dist/sdk/command-line.js
|
|
115
|
+
!(function() {
|
|
116
|
+
try {
|
|
117
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
118
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "82ea8f22-efe9-5310-9fc7-a373063b7f0b");
|
|
119
|
+
} catch (e2) {
|
|
120
|
+
}
|
|
121
|
+
})();
|
|
122
|
+
var quoteWindowsCommandArg = (arg) => {
|
|
123
|
+
let escaped = '"';
|
|
124
|
+
let pendingBackslashes = 0;
|
|
125
|
+
for (const character of arg) {
|
|
126
|
+
if (character === "\\") {
|
|
127
|
+
pendingBackslashes += 1;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
escaped += "\\".repeat(character === '"' ? pendingBackslashes * 2 + 1 : pendingBackslashes);
|
|
131
|
+
escaped += character;
|
|
132
|
+
pendingBackslashes = 0;
|
|
133
|
+
}
|
|
134
|
+
return `${escaped}${"\\".repeat(pendingBackslashes * 2)}"`;
|
|
135
|
+
};
|
|
136
|
+
var quoteCommandArg = (arg, platform = process.platform) => {
|
|
137
|
+
const safePattern = platform === "win32" ? /^[A-Za-z0-9._:/\\@=-]+$/ : /^[A-Za-z0-9._:/@=-]+$/;
|
|
138
|
+
if (safePattern.test(arg)) {
|
|
139
|
+
return arg;
|
|
140
|
+
}
|
|
141
|
+
if (platform === "win32") {
|
|
142
|
+
return quoteWindowsCommandArg(arg);
|
|
143
|
+
}
|
|
144
|
+
return `"${arg.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
145
|
+
};
|
|
146
|
+
var renderPmCommand = (argv, platform = process.platform) => {
|
|
147
|
+
const args = argv.map((token) => quoteCommandArg(token, platform)).join(" ");
|
|
148
|
+
return args.length > 0 ? `pm ${args}` : "pm";
|
|
149
|
+
};
|
|
73
150
|
|
|
74
151
|
// dist/core/packages/manifest.js
|
|
75
152
|
import fs from "node:fs/promises";
|
|
76
|
-
import
|
|
153
|
+
import path2 from "node:path";
|
|
77
154
|
!(function() {
|
|
78
155
|
try {
|
|
79
156
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -198,7 +275,7 @@ function normalizePackageCatalogMetadata(raw) {
|
|
|
198
275
|
return Object.values(catalog).some((value) => value !== void 0) ? catalog : void 0;
|
|
199
276
|
}
|
|
200
277
|
async function readPmPackageManifest(packageRoot) {
|
|
201
|
-
const packageJsonPath =
|
|
278
|
+
const packageJsonPath = path2.join(packageRoot, "package.json");
|
|
202
279
|
if (!await pathExists(packageJsonPath)) {
|
|
203
280
|
return {
|
|
204
281
|
source: "convention",
|
|
@@ -244,15 +321,15 @@ async function listExtensionManifestDirectories(parentDirectory) {
|
|
|
244
321
|
if (!entry.isDirectory()) {
|
|
245
322
|
continue;
|
|
246
323
|
}
|
|
247
|
-
const directory =
|
|
248
|
-
if (await pathExists(
|
|
324
|
+
const directory = path2.join(parentDirectory, entry.name);
|
|
325
|
+
if (await pathExists(path2.join(directory, "manifest.json"))) {
|
|
249
326
|
candidates.push(directory);
|
|
250
327
|
}
|
|
251
328
|
}
|
|
252
329
|
return candidates.sort((left, right) => left.localeCompare(right));
|
|
253
330
|
}
|
|
254
331
|
async function collectPackageExtensionDirectories(packageRoot) {
|
|
255
|
-
if (await pathExists(
|
|
332
|
+
if (await pathExists(path2.join(packageRoot, "manifest.json"))) {
|
|
256
333
|
return [packageRoot];
|
|
257
334
|
}
|
|
258
335
|
const manifest = await readPmPackageManifest(packageRoot);
|
|
@@ -262,11 +339,11 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
262
339
|
if (entry.includes("*") || entry.startsWith("!")) {
|
|
263
340
|
throw new PmCliError(`Package extension entry "${entry}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`, EXIT_CODE.USAGE);
|
|
264
341
|
}
|
|
265
|
-
const absolute =
|
|
342
|
+
const absolute = path2.resolve(packageRoot, entry);
|
|
266
343
|
if (!isPathWithinDirectory(packageRoot, absolute)) {
|
|
267
344
|
throw new PmCliError(`Package extension entry "${entry}" resolves outside package root.`, EXIT_CODE.USAGE);
|
|
268
345
|
}
|
|
269
|
-
if (await pathExists(
|
|
346
|
+
if (await pathExists(path2.join(absolute, "manifest.json"))) {
|
|
270
347
|
discovered.add(absolute);
|
|
271
348
|
continue;
|
|
272
349
|
}
|
|
@@ -276,7 +353,7 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
276
353
|
}
|
|
277
354
|
if (manifestEntries.length === 0) {
|
|
278
355
|
for (const root of PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS.extensions) {
|
|
279
|
-
for (const child of await listExtensionManifestDirectories(
|
|
356
|
+
for (const child of await listExtensionManifestDirectories(path2.join(packageRoot, root))) {
|
|
280
357
|
discovered.add(child);
|
|
281
358
|
}
|
|
282
359
|
}
|
|
@@ -285,8 +362,125 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
285
362
|
}
|
|
286
363
|
|
|
287
364
|
// dist/sdk/extension/scaffold.js
|
|
365
|
+
import fs3 from "node:fs/promises";
|
|
366
|
+
import path4 from "node:path";
|
|
367
|
+
|
|
368
|
+
// dist/sdk/extension/shared.js
|
|
288
369
|
import fs2 from "node:fs/promises";
|
|
289
|
-
import
|
|
370
|
+
import path3 from "node:path";
|
|
371
|
+
!(function() {
|
|
372
|
+
try {
|
|
373
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
374
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "79cbf5a9-d060-546d-aa23-79e4b16fa6dc");
|
|
375
|
+
} catch (e2) {
|
|
376
|
+
}
|
|
377
|
+
})();
|
|
378
|
+
function normalizeStringList(values) {
|
|
379
|
+
return [
|
|
380
|
+
...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))
|
|
381
|
+
].sort((left, right) => left.localeCompare(right));
|
|
382
|
+
}
|
|
383
|
+
function normalizeExtensionNameForMatch(value) {
|
|
384
|
+
return value.trim().toLowerCase();
|
|
385
|
+
}
|
|
386
|
+
function normalizeManagedDirectoryName(name) {
|
|
387
|
+
const normalized = name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-");
|
|
388
|
+
let start = 0;
|
|
389
|
+
while (normalized[start] === "-") {
|
|
390
|
+
start += 1;
|
|
391
|
+
}
|
|
392
|
+
let end = normalized.length;
|
|
393
|
+
while (end > start && normalized[end - 1] === "-") {
|
|
394
|
+
end -= 1;
|
|
395
|
+
}
|
|
396
|
+
const directoryName = normalized.slice(start, end);
|
|
397
|
+
if (directoryName.length === 0) {
|
|
398
|
+
throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.", EXIT_CODE.USAGE);
|
|
399
|
+
}
|
|
400
|
+
if (directoryName === "." || directoryName === "..") {
|
|
401
|
+
throw new PmCliError('Extension manifest name must not resolve to "." or "..".', EXIT_CODE.USAGE);
|
|
402
|
+
}
|
|
403
|
+
return directoryName;
|
|
404
|
+
}
|
|
405
|
+
function parseOptionalManifestPriority(value) {
|
|
406
|
+
if (value === void 0 || value === null) {
|
|
407
|
+
return DEFAULT_EXTENSION_PRIORITY;
|
|
408
|
+
}
|
|
409
|
+
return typeof value === "number" && Number.isInteger(value) ? value : null;
|
|
410
|
+
}
|
|
411
|
+
function parseOptionalManifestCapabilities(value) {
|
|
412
|
+
if (value === void 0 || value === null) {
|
|
413
|
+
return [];
|
|
414
|
+
}
|
|
415
|
+
if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) {
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
return normalizeStringList(value.map((entry) => String(entry).toLowerCase()));
|
|
419
|
+
}
|
|
420
|
+
function parseExtensionManifest(raw) {
|
|
421
|
+
if (typeof raw !== "object" || raw === null) {
|
|
422
|
+
return null;
|
|
423
|
+
}
|
|
424
|
+
const candidate = raw;
|
|
425
|
+
if (typeof candidate.name !== "string" || candidate.name.trim().length === 0) {
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
428
|
+
if (typeof candidate.version !== "string" || candidate.version.trim().length === 0) {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
if (typeof candidate.entry !== "string" || candidate.entry.trim().length === 0) {
|
|
432
|
+
return null;
|
|
433
|
+
}
|
|
434
|
+
const priority = parseOptionalManifestPriority(candidate.priority);
|
|
435
|
+
const capabilities = parseOptionalManifestCapabilities(candidate.capabilities);
|
|
436
|
+
if (priority === null || capabilities === null) {
|
|
437
|
+
return null;
|
|
438
|
+
}
|
|
439
|
+
return {
|
|
440
|
+
name: candidate.name.trim(),
|
|
441
|
+
version: candidate.version.trim(),
|
|
442
|
+
entry: candidate.entry.trim(),
|
|
443
|
+
priority,
|
|
444
|
+
capabilities
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
async function validateExtensionDirectory(directory) {
|
|
448
|
+
const manifestPath = path3.join(directory, "manifest.json");
|
|
449
|
+
if (!await pathExists(manifestPath)) {
|
|
450
|
+
throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`, EXIT_CODE.USAGE);
|
|
451
|
+
}
|
|
452
|
+
let parsedManifest;
|
|
453
|
+
try {
|
|
454
|
+
parsedManifest = JSON.parse(await fs2.readFile(manifestPath, "utf8"));
|
|
455
|
+
} catch (error) {
|
|
456
|
+
throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${formatManifestReadError(error)}`, EXIT_CODE.USAGE);
|
|
457
|
+
}
|
|
458
|
+
const manifest = parseExtensionManifest(parsedManifest);
|
|
459
|
+
if (!manifest) {
|
|
460
|
+
throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`, EXIT_CODE.USAGE);
|
|
461
|
+
}
|
|
462
|
+
const entryPath = path3.resolve(directory, manifest.entry);
|
|
463
|
+
if (!isPathWithinDirectory(directory, entryPath)) {
|
|
464
|
+
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`, EXIT_CODE.USAGE);
|
|
465
|
+
}
|
|
466
|
+
if (!await pathExists(entryPath)) {
|
|
467
|
+
throw new PmCliError(`Extension entry file is missing at "${entryPath}".`, EXIT_CODE.USAGE);
|
|
468
|
+
}
|
|
469
|
+
if (!await isCanonicalPathWithinDirectory(directory, entryPath)) {
|
|
470
|
+
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`, EXIT_CODE.USAGE);
|
|
471
|
+
}
|
|
472
|
+
return {
|
|
473
|
+
directory,
|
|
474
|
+
manifest_path: manifestPath,
|
|
475
|
+
entry_path: entryPath,
|
|
476
|
+
manifest
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
function formatManifestReadError(error) {
|
|
480
|
+
return error instanceof Error ? error.message : String(error);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// dist/sdk/extension/scaffold.js
|
|
290
484
|
!(function() {
|
|
291
485
|
try {
|
|
292
486
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -2397,33 +2591,33 @@ async function scaffoldExtensionProject(target, vocabulary = "extension", capabi
|
|
|
2397
2591
|
}
|
|
2398
2592
|
const style = declarative ? "declarative" : "imperative";
|
|
2399
2593
|
const normalizedTarget = target.trim();
|
|
2400
|
-
const targetPath =
|
|
2401
|
-
const extensionName = normalizeManagedDirectoryName(
|
|
2594
|
+
const targetPath = path4.resolve(process.cwd(), normalizedTarget);
|
|
2595
|
+
const extensionName = normalizeManagedDirectoryName(path4.basename(targetPath));
|
|
2402
2596
|
const commandName = buildScaffoldCommandName(extensionName);
|
|
2403
2597
|
const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary, resolvedCapability, declarative);
|
|
2404
2598
|
let createdDirectory = false;
|
|
2405
2599
|
if (await pathExists(targetPath)) {
|
|
2406
|
-
const existingTargetStats = await
|
|
2600
|
+
const existingTargetStats = await fs3.stat(targetPath);
|
|
2407
2601
|
if (!existingTargetStats.isDirectory()) {
|
|
2408
2602
|
throw new PmCliError(`Scaffold target "${targetPath}" exists and is not a directory.`, EXIT_CODE.CONFLICT);
|
|
2409
2603
|
}
|
|
2410
2604
|
} else {
|
|
2411
|
-
await
|
|
2605
|
+
await fs3.mkdir(targetPath, { recursive: true });
|
|
2412
2606
|
createdDirectory = true;
|
|
2413
2607
|
}
|
|
2414
2608
|
for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
|
|
2415
|
-
const absolutePath =
|
|
2609
|
+
const absolutePath = path4.join(targetPath, relativePath);
|
|
2416
2610
|
if (!await pathExists(absolutePath)) {
|
|
2417
2611
|
continue;
|
|
2418
2612
|
}
|
|
2419
|
-
const existingContent = await
|
|
2613
|
+
const existingContent = await fs3.readFile(absolutePath, "utf8");
|
|
2420
2614
|
if (existingContent !== content) {
|
|
2421
2615
|
throw new PmCliError(`Scaffold file "${relativePath}" already exists with different content in "${targetPath}". Choose a new target path or remove conflicting files.`, EXIT_CODE.CONFLICT);
|
|
2422
2616
|
}
|
|
2423
2617
|
}
|
|
2424
2618
|
const files = [];
|
|
2425
2619
|
for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
|
|
2426
|
-
const absolutePath =
|
|
2620
|
+
const absolutePath = path4.join(targetPath, relativePath);
|
|
2427
2621
|
if (await pathExists(absolutePath)) {
|
|
2428
2622
|
files.push({
|
|
2429
2623
|
path: relativePath,
|
|
@@ -2431,8 +2625,8 @@ async function scaffoldExtensionProject(target, vocabulary = "extension", capabi
|
|
|
2431
2625
|
});
|
|
2432
2626
|
continue;
|
|
2433
2627
|
}
|
|
2434
|
-
await
|
|
2435
|
-
await
|
|
2628
|
+
await fs3.mkdir(path4.dirname(absolutePath), { recursive: true });
|
|
2629
|
+
await fs3.writeFile(absolutePath, content, "utf8");
|
|
2436
2630
|
files.push({
|
|
2437
2631
|
path: relativePath,
|
|
2438
2632
|
status: "created"
|
|
@@ -2526,12 +2720,12 @@ function renderExtensionDescribeMarkdown(result, noun) {
|
|
|
2526
2720
|
}
|
|
2527
2721
|
|
|
2528
2722
|
// dist/sdk/extension.js
|
|
2529
|
-
import
|
|
2530
|
-
import
|
|
2723
|
+
import fs9 from "node:fs/promises";
|
|
2724
|
+
import path10 from "node:path";
|
|
2531
2725
|
|
|
2532
2726
|
// dist/sdk/extension/managed-state.js
|
|
2533
|
-
import
|
|
2534
|
-
import
|
|
2727
|
+
import fs4 from "node:fs/promises";
|
|
2728
|
+
import path5 from "node:path";
|
|
2535
2729
|
!(function() {
|
|
2536
2730
|
try {
|
|
2537
2731
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -2542,7 +2736,7 @@ import path3 from "node:path";
|
|
|
2542
2736
|
var MANAGED_EXTENSION_STATE_FILENAME = ".managed-extensions.json";
|
|
2543
2737
|
var MANAGED_EXTENSION_STATE_VERSION = 1;
|
|
2544
2738
|
function resolveManagedExtensionStatePath(extensionsRoot) {
|
|
2545
|
-
return
|
|
2739
|
+
return path5.join(extensionsRoot, MANAGED_EXTENSION_STATE_FILENAME);
|
|
2546
2740
|
}
|
|
2547
2741
|
function createEmptyManagedExtensionState() {
|
|
2548
2742
|
return {
|
|
@@ -2661,7 +2855,7 @@ async function readManagedExtensionState(extensionsRoot) {
|
|
|
2661
2855
|
const statePath = resolveManagedExtensionStatePath(extensionsRoot);
|
|
2662
2856
|
const fallback = createEmptyManagedExtensionState();
|
|
2663
2857
|
try {
|
|
2664
|
-
const raw = await
|
|
2858
|
+
const raw = await fs4.readFile(statePath, "utf8");
|
|
2665
2859
|
const parsed = JSON.parse(raw);
|
|
2666
2860
|
const normalized = normalizeManagedState(parsed);
|
|
2667
2861
|
if (!normalized) {
|
|
@@ -2693,8 +2887,8 @@ async function writeManagedExtensionState(extensionsRoot, state) {
|
|
|
2693
2887
|
updated_at: nowIso(),
|
|
2694
2888
|
entries: sortManagedEntries(state.entries)
|
|
2695
2889
|
};
|
|
2696
|
-
await
|
|
2697
|
-
await
|
|
2890
|
+
await fs4.mkdir(extensionsRoot, { recursive: true });
|
|
2891
|
+
await fs4.writeFile(statePath, `${JSON.stringify(normalized, null, 2)}
|
|
2698
2892
|
`, "utf8");
|
|
2699
2893
|
}
|
|
2700
2894
|
function upsertManagedEntry(state, entry) {
|
|
@@ -2709,15 +2903,15 @@ function upsertManagedEntry(state, entry) {
|
|
|
2709
2903
|
|
|
2710
2904
|
// dist/sdk/extension/install-sources.js
|
|
2711
2905
|
import { execFile } from "node:child_process";
|
|
2712
|
-
import
|
|
2906
|
+
import fs6 from "node:fs/promises";
|
|
2713
2907
|
import os from "node:os";
|
|
2714
|
-
import
|
|
2908
|
+
import path7 from "node:path";
|
|
2715
2909
|
import { fileURLToPath } from "node:url";
|
|
2716
2910
|
import { promisify } from "node:util";
|
|
2717
2911
|
|
|
2718
2912
|
// dist/sdk/extension/bundled-catalog.js
|
|
2719
|
-
import
|
|
2720
|
-
import
|
|
2913
|
+
import fs5 from "node:fs/promises";
|
|
2914
|
+
import path6 from "node:path";
|
|
2721
2915
|
!(function() {
|
|
2722
2916
|
try {
|
|
2723
2917
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -2741,7 +2935,7 @@ function resolvePackageRootCandidates() {
|
|
|
2741
2935
|
const candidates = [];
|
|
2742
2936
|
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
2743
2937
|
if (typeof envRoot === "string" && envRoot.trim().length > 0) {
|
|
2744
|
-
candidates.push(
|
|
2938
|
+
candidates.push(path6.resolve(envRoot.trim()));
|
|
2745
2939
|
}
|
|
2746
2940
|
candidates.push(resolvePmPackageRootFromModule(import.meta.url, ["../../.."]));
|
|
2747
2941
|
return [...new Set(candidates)];
|
|
@@ -2757,8 +2951,8 @@ async function resolveBundledExtensionAliasSource(input3) {
|
|
|
2757
2951
|
return null;
|
|
2758
2952
|
}
|
|
2759
2953
|
for (const packageRoot2 of resolvePackageRootCandidates()) {
|
|
2760
|
-
const legacyExtensionPath =
|
|
2761
|
-
if (await pathExists(
|
|
2954
|
+
const legacyExtensionPath = path6.join(packageRoot2, ".agents", "pm", "extensions", alias.legacy_extension_directory);
|
|
2955
|
+
if (await pathExists(path6.join(legacyExtensionPath, "manifest.json"))) {
|
|
2762
2956
|
return legacyExtensionPath;
|
|
2763
2957
|
}
|
|
2764
2958
|
}
|
|
@@ -2771,13 +2965,13 @@ function derivePackageAlias(packageDirectory) {
|
|
|
2771
2965
|
return packageDirectory.replace(/^pm-/i, "").trim().toLowerCase();
|
|
2772
2966
|
}
|
|
2773
2967
|
async function collectManifestPackageEntries(packagesRoot, entriesByAlias) {
|
|
2774
|
-
const entries = await
|
|
2968
|
+
const entries = await fs5.readdir(packagesRoot, { withFileTypes: true });
|
|
2775
2969
|
for (const entry of entries) {
|
|
2776
2970
|
if (!entry.isDirectory() || !entry.name.startsWith("pm-")) {
|
|
2777
2971
|
continue;
|
|
2778
2972
|
}
|
|
2779
|
-
const candidateRoot =
|
|
2780
|
-
if (!await pathExists(
|
|
2973
|
+
const candidateRoot = path6.join(packagesRoot, entry.name);
|
|
2974
|
+
if (!await pathExists(path6.join(candidateRoot, "package.json"))) {
|
|
2781
2975
|
continue;
|
|
2782
2976
|
}
|
|
2783
2977
|
const manifest = await readPmPackageManifest(candidateRoot);
|
|
@@ -2799,7 +2993,7 @@ async function collectManifestPackageEntries(packagesRoot, entriesByAlias) {
|
|
|
2799
2993
|
async function collectBundledPackageEntries() {
|
|
2800
2994
|
const entriesByAlias = /* @__PURE__ */ new Map();
|
|
2801
2995
|
for (const packageRoot of resolvePackageRootCandidates()) {
|
|
2802
|
-
const packagesRoot =
|
|
2996
|
+
const packagesRoot = path6.join(packageRoot, "packages");
|
|
2803
2997
|
if (!await pathExists(packagesRoot)) {
|
|
2804
2998
|
continue;
|
|
2805
2999
|
}
|
|
@@ -2810,8 +3004,8 @@ async function collectBundledPackageEntries() {
|
|
|
2810
3004
|
continue;
|
|
2811
3005
|
}
|
|
2812
3006
|
for (const packageRoot of resolvePackageRootCandidates()) {
|
|
2813
|
-
const packagePath =
|
|
2814
|
-
if (await pathExists(
|
|
3007
|
+
const packagePath = path6.join(packageRoot, "packages", legacy.package_directory);
|
|
3008
|
+
if (await pathExists(path6.join(packagePath, "package.json"))) {
|
|
2815
3009
|
entriesByAlias.set(alias, {
|
|
2816
3010
|
alias,
|
|
2817
3011
|
package_directory: legacy.package_directory,
|
|
@@ -2874,7 +3068,7 @@ function buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installe
|
|
|
2874
3068
|
alias: bundledEntry.alias,
|
|
2875
3069
|
bundled: true,
|
|
2876
3070
|
available: true,
|
|
2877
|
-
installed: installedBuiltinAliases.has(bundledEntry.alias) || installedLocations.has(
|
|
3071
|
+
installed: installedBuiltinAliases.has(bundledEntry.alias) || installedLocations.has(path6.resolve(bundledEntry.package_root)),
|
|
2878
3072
|
install_target: bundledEntry.alias,
|
|
2879
3073
|
install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,
|
|
2880
3074
|
package_name: manifest.package_name,
|
|
@@ -2899,7 +3093,7 @@ async function buildBundledPackageCatalog(scope, global2, options = {}) {
|
|
|
2899
3093
|
const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global2.path), process.cwd());
|
|
2900
3094
|
const selectedRoot = scope === "global" ? roots.global : roots.project;
|
|
2901
3095
|
const managedStateRead = await readManagedExtensionState(selectedRoot);
|
|
2902
|
-
const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) =>
|
|
3096
|
+
const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) => path6.resolve(entry.source.location)));
|
|
2903
3097
|
const installedBuiltinAliases = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope && entry.source.kind === "builtin").flatMap((entry) => [
|
|
2904
3098
|
entry.source.name,
|
|
2905
3099
|
entry.source.input,
|
|
@@ -3076,7 +3270,7 @@ function parseExtensionInstallSource(input3, options = {}) {
|
|
|
3076
3270
|
return {
|
|
3077
3271
|
kind: "local",
|
|
3078
3272
|
input: normalizedInput,
|
|
3079
|
-
absolute_path:
|
|
3273
|
+
absolute_path: path7.resolve(process.cwd(), normalizedInput)
|
|
3080
3274
|
};
|
|
3081
3275
|
}
|
|
3082
3276
|
async function runGitCommand(args, execRunner = execFileAsync, timeoutMs) {
|
|
@@ -3184,8 +3378,8 @@ function wrapNpmPackResolutionError(spec, error) {
|
|
|
3184
3378
|
return new PmCliError(recovery.message, EXIT_CODE.NOT_FOUND, recovery.context);
|
|
3185
3379
|
}
|
|
3186
3380
|
async function resolveLocalNpmPackagePath(spec) {
|
|
3187
|
-
if (
|
|
3188
|
-
const absolutePath =
|
|
3381
|
+
if (path7.isAbsolute(spec) || spec.startsWith(".") || spec.startsWith("..")) {
|
|
3382
|
+
const absolutePath = path7.resolve(process.cwd(), spec);
|
|
3189
3383
|
return await pathExists(absolutePath) ? absolutePath : null;
|
|
3190
3384
|
}
|
|
3191
3385
|
try {
|
|
@@ -3197,7 +3391,7 @@ async function resolveLocalNpmPackagePath(spec) {
|
|
|
3197
3391
|
} catch {
|
|
3198
3392
|
}
|
|
3199
3393
|
if (!/^[a-z][a-z0-9+.-]*:/i.test(spec)) {
|
|
3200
|
-
const absolutePath =
|
|
3394
|
+
const absolutePath = path7.resolve(process.cwd(), spec);
|
|
3201
3395
|
if (await pathExists(absolutePath)) {
|
|
3202
3396
|
return absolutePath;
|
|
3203
3397
|
}
|
|
@@ -3233,7 +3427,7 @@ function normalizeNpmLocalFileAliasSpec(spec, cwd = process.cwd()) {
|
|
|
3233
3427
|
return spec;
|
|
3234
3428
|
}
|
|
3235
3429
|
if (!target.startsWith("/")) {
|
|
3236
|
-
return `${packageName}@${
|
|
3430
|
+
return `${packageName}@${path7.resolve(cwd, target)}`;
|
|
3237
3431
|
}
|
|
3238
3432
|
let decodedPath;
|
|
3239
3433
|
try {
|
|
@@ -3250,7 +3444,7 @@ function parsePackedNpmPackage(stdout, packDirectory) {
|
|
|
3250
3444
|
const first = Array.isArray(parsed) ? parsed[0] : void 0;
|
|
3251
3445
|
if (first && typeof first.filename === "string" && first.filename.trim().length > 0) {
|
|
3252
3446
|
return {
|
|
3253
|
-
tarball:
|
|
3447
|
+
tarball: path7.resolve(packDirectory, first.filename),
|
|
3254
3448
|
package: typeof first.name === "string" ? first.name : void 0,
|
|
3255
3449
|
version: typeof first.version === "string" ? first.version : void 0
|
|
3256
3450
|
};
|
|
@@ -3262,7 +3456,7 @@ function parsePackedNpmPackage(stdout, packDirectory) {
|
|
|
3262
3456
|
throw new PmCliError("npm pack did not report a tarball filename.", EXIT_CODE.GENERIC_FAILURE);
|
|
3263
3457
|
}
|
|
3264
3458
|
return {
|
|
3265
|
-
tarball:
|
|
3459
|
+
tarball: path7.resolve(packDirectory, lastLine)
|
|
3266
3460
|
};
|
|
3267
3461
|
}
|
|
3268
3462
|
async function resolveNpmSourceDirectory(source) {
|
|
@@ -3271,8 +3465,8 @@ async function resolveNpmSourceDirectory(source) {
|
|
|
3271
3465
|
async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
|
|
3272
3466
|
const localPackageRoot = await resolveLocalNpmPackagePath(source.spec);
|
|
3273
3467
|
if (localPackageRoot) {
|
|
3274
|
-
const packageJsonPath =
|
|
3275
|
-
const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await
|
|
3468
|
+
const packageJsonPath = path7.join(localPackageRoot, "package.json");
|
|
3469
|
+
const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await fs6.readFile(packageJsonPath, "utf8")) : {};
|
|
3276
3470
|
return {
|
|
3277
3471
|
directory: await resolvePackageExtensionDirectory(localPackageRoot, source.input),
|
|
3278
3472
|
package: typeof packageJson.name === "string" ? packageJson.name : void 0,
|
|
@@ -3281,11 +3475,11 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
|
|
|
3281
3475
|
}
|
|
3282
3476
|
};
|
|
3283
3477
|
}
|
|
3284
|
-
const tempRoot = await
|
|
3285
|
-
const packDirectory =
|
|
3286
|
-
const extractDirectory =
|
|
3287
|
-
await
|
|
3288
|
-
await
|
|
3478
|
+
const tempRoot = await fs6.mkdtemp(path7.join(os.tmpdir(), "pm-npm-package-source-"));
|
|
3479
|
+
const packDirectory = path7.join(tempRoot, "pack");
|
|
3480
|
+
const extractDirectory = path7.join(tempRoot, "extract");
|
|
3481
|
+
await fs6.mkdir(packDirectory, { recursive: true });
|
|
3482
|
+
await fs6.mkdir(extractDirectory, { recursive: true });
|
|
3289
3483
|
try {
|
|
3290
3484
|
const packSpec = await resolveNpmPackSpec(source.spec);
|
|
3291
3485
|
const packStdout = await npmRunner([
|
|
@@ -3297,7 +3491,7 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
|
|
|
3297
3491
|
]);
|
|
3298
3492
|
const packed = parsePackedNpmPackage(packStdout, packDirectory);
|
|
3299
3493
|
await execFileAsync("tar", ["-xzf", packed.tarball, "-C", extractDirectory], { encoding: "utf8" });
|
|
3300
|
-
const packageRoot =
|
|
3494
|
+
const packageRoot = path7.join(extractDirectory, "package");
|
|
3301
3495
|
await installNpmPackageRuntimeDependencies(packageRoot);
|
|
3302
3496
|
const directory = await resolvePackageExtensionDirectory(packageRoot, source.input);
|
|
3303
3497
|
return {
|
|
@@ -3305,11 +3499,11 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
|
|
|
3305
3499
|
package: packed.package,
|
|
3306
3500
|
version: packed.version,
|
|
3307
3501
|
cleanup: async () => {
|
|
3308
|
-
await
|
|
3502
|
+
await fs6.rm(tempRoot, { recursive: true, force: true });
|
|
3309
3503
|
}
|
|
3310
3504
|
};
|
|
3311
3505
|
} catch (error) {
|
|
3312
|
-
await
|
|
3506
|
+
await fs6.rm(tempRoot, { recursive: true, force: true });
|
|
3313
3507
|
const wrappedError = wrapNpmPackResolutionError(source.spec, error);
|
|
3314
3508
|
if (wrappedError) {
|
|
3315
3509
|
throw wrappedError;
|
|
@@ -3318,13 +3512,13 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
|
|
|
3318
3512
|
}
|
|
3319
3513
|
}
|
|
3320
3514
|
async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
3321
|
-
const packageJsonPath =
|
|
3515
|
+
const packageJsonPath = path7.join(packageRoot, "package.json");
|
|
3322
3516
|
if (!await pathExists(packageJsonPath)) {
|
|
3323
3517
|
return;
|
|
3324
3518
|
}
|
|
3325
3519
|
let parsed;
|
|
3326
3520
|
try {
|
|
3327
|
-
parsed = JSON.parse(await
|
|
3521
|
+
parsed = JSON.parse(await fs6.readFile(packageJsonPath, "utf8"));
|
|
3328
3522
|
} catch {
|
|
3329
3523
|
return;
|
|
3330
3524
|
}
|
|
@@ -3341,12 +3535,12 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
|
3341
3535
|
delete runtimeOnlyManifest.devDependencies;
|
|
3342
3536
|
const installManifest = { ...runtimeOnlyManifest };
|
|
3343
3537
|
removeHostedPmCliDependency(installManifest);
|
|
3344
|
-
await
|
|
3538
|
+
await fs6.writeFile(packageJsonPath, `${JSON.stringify(installManifest, null, 2)}
|
|
3345
3539
|
`, "utf8");
|
|
3346
3540
|
try {
|
|
3347
3541
|
await Promise.all([
|
|
3348
|
-
|
|
3349
|
-
|
|
3542
|
+
fs6.rm(path7.join(packageRoot, "package-lock.json"), { force: true }),
|
|
3543
|
+
fs6.rm(path7.join(packageRoot, "npm-shrinkwrap.json"), { force: true })
|
|
3350
3544
|
]);
|
|
3351
3545
|
if (dependencySpecs.length > 0) {
|
|
3352
3546
|
await runNpmCommand([
|
|
@@ -3364,7 +3558,7 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
|
3364
3558
|
await linkHostedPmCliDependency(packageRoot);
|
|
3365
3559
|
}
|
|
3366
3560
|
} finally {
|
|
3367
|
-
await
|
|
3561
|
+
await fs6.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}
|
|
3368
3562
|
`, "utf8");
|
|
3369
3563
|
}
|
|
3370
3564
|
}
|
|
@@ -3404,11 +3598,11 @@ async function linkHostedPmCliDependency(packageRoot) {
|
|
|
3404
3598
|
"../../.."
|
|
3405
3599
|
]);
|
|
3406
3600
|
const [scope, packageName] = PM_CLI_PACKAGE_NAME.split("/");
|
|
3407
|
-
const scopedDirectory =
|
|
3408
|
-
const linkPath =
|
|
3409
|
-
await
|
|
3410
|
-
await
|
|
3411
|
-
await
|
|
3601
|
+
const scopedDirectory = path7.join(packageRoot, "node_modules", scope);
|
|
3602
|
+
const linkPath = path7.join(scopedDirectory, packageName);
|
|
3603
|
+
await fs6.mkdir(scopedDirectory, { recursive: true });
|
|
3604
|
+
await fs6.rm(linkPath, { recursive: true, force: true });
|
|
3605
|
+
await fs6.symlink(hostPackageRoot, linkPath, resolveDirectorySymlinkType(process.platform));
|
|
3412
3606
|
}
|
|
3413
3607
|
function resolveDirectorySymlinkType(platform) {
|
|
3414
3608
|
return platform === "win32" ? "junction" : "dir";
|
|
@@ -3438,7 +3632,7 @@ async function resolvePackageExtensionDirectory(packageRoot, sourceLabel) {
|
|
|
3438
3632
|
return discovered[0];
|
|
3439
3633
|
}
|
|
3440
3634
|
if (discovered.length > 1) {
|
|
3441
|
-
const choices = discovered.map((entry) =>
|
|
3635
|
+
const choices = discovered.map((entry) => path7.relative(packageRoot, entry).replaceAll(path7.sep, "/")).sort((left, right) => left.localeCompare(right));
|
|
3442
3636
|
throw new PmCliError(`Package source "${sourceLabel}" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${choices.join(", ")}`, EXIT_CODE.USAGE);
|
|
3443
3637
|
}
|
|
3444
3638
|
throw new PmCliError(`Unable to locate a pm extension manifest in package source "${sourceLabel}". Package installs currently activate only extension resources, so add package.json pm.extensions or an extensions/ directory. Metadata-only resources like pm.docs/pm.examples are catalog metadata and do not activate commands.`, EXIT_CODE.USAGE);
|
|
@@ -3447,26 +3641,26 @@ async function resolveGithubSourceDirectory(cloneDirectory, source) {
|
|
|
3447
3641
|
const candidatePaths = [];
|
|
3448
3642
|
if (source.subpath) {
|
|
3449
3643
|
candidatePaths.push(source.subpath);
|
|
3450
|
-
candidatePaths.push(
|
|
3451
|
-
candidatePaths.push(
|
|
3452
|
-
candidatePaths.push(
|
|
3644
|
+
candidatePaths.push(path7.posix.join(".agents/pm/extensions", source.subpath));
|
|
3645
|
+
candidatePaths.push(path7.posix.join(".custom/pm-extensions", source.subpath));
|
|
3646
|
+
candidatePaths.push(path7.posix.join(".custom/pm-extension", source.subpath));
|
|
3453
3647
|
}
|
|
3454
3648
|
for (const candidate of candidatePaths) {
|
|
3455
|
-
const absolute =
|
|
3649
|
+
const absolute = path7.resolve(cloneDirectory, candidate);
|
|
3456
3650
|
if (!isPathWithinDirectory(cloneDirectory, absolute)) {
|
|
3457
3651
|
continue;
|
|
3458
3652
|
}
|
|
3459
|
-
if (await pathExists(
|
|
3653
|
+
if (await pathExists(path7.join(absolute, "manifest.json"))) {
|
|
3460
3654
|
return { directory: absolute, resolved_subpath: candidate };
|
|
3461
3655
|
}
|
|
3462
3656
|
}
|
|
3463
|
-
if (await pathExists(
|
|
3657
|
+
if (await pathExists(path7.join(cloneDirectory, "manifest.json"))) {
|
|
3464
3658
|
return { directory: cloneDirectory, resolved_subpath: "." };
|
|
3465
3659
|
}
|
|
3466
3660
|
const discoveredDirectory = await resolvePackageExtensionDirectory(cloneDirectory, source.input);
|
|
3467
3661
|
return {
|
|
3468
3662
|
directory: discoveredDirectory,
|
|
3469
|
-
resolved_subpath:
|
|
3663
|
+
resolved_subpath: path7.relative(cloneDirectory, discoveredDirectory).replaceAll(path7.sep, "/")
|
|
3470
3664
|
};
|
|
3471
3665
|
}
|
|
3472
3666
|
function looksLikeBarePackageName(input3) {
|
|
@@ -3488,7 +3682,7 @@ async function buildLocalSourceNotFoundError(source) {
|
|
|
3488
3682
|
let bundledAliases = [];
|
|
3489
3683
|
try {
|
|
3490
3684
|
const envPackageRoot = process.env.PM_CLI_PACKAGE_ROOT;
|
|
3491
|
-
const cacheKey = typeof envPackageRoot === "string" && envPackageRoot.trim().length > 0 ?
|
|
3685
|
+
const cacheKey = typeof envPackageRoot === "string" && envPackageRoot.trim().length > 0 ? path7.resolve(envPackageRoot.trim()) : "";
|
|
3492
3686
|
if (bundledPackageAliasesCache?.key !== cacheKey) {
|
|
3493
3687
|
bundledPackageAliasesCache = {
|
|
3494
3688
|
key: cacheKey,
|
|
@@ -3522,7 +3716,7 @@ async function resolveInstallSource(source) {
|
|
|
3522
3716
|
if (source.kind === "local") {
|
|
3523
3717
|
let localStats;
|
|
3524
3718
|
try {
|
|
3525
|
-
localStats = await
|
|
3719
|
+
localStats = await fs6.stat(source.absolute_path);
|
|
3526
3720
|
} catch {
|
|
3527
3721
|
throw await buildLocalSourceNotFoundError(source);
|
|
3528
3722
|
}
|
|
@@ -3541,12 +3735,12 @@ async function resolveInstallSource(source) {
|
|
|
3541
3735
|
source,
|
|
3542
3736
|
directory: resolved.directory,
|
|
3543
3737
|
cleanup: resolved.cleanup,
|
|
3544
|
-
resolved_subpath:
|
|
3738
|
+
resolved_subpath: path7.relative(path7.dirname(resolved.directory), resolved.directory).replaceAll(path7.sep, "/"),
|
|
3545
3739
|
npm_package: resolved.package,
|
|
3546
3740
|
npm_version: resolved.version
|
|
3547
3741
|
};
|
|
3548
3742
|
}
|
|
3549
|
-
const cloneDirectory = await
|
|
3743
|
+
const cloneDirectory = await fs6.mkdtemp(path7.join(os.tmpdir(), "pm-extension-source-"));
|
|
3550
3744
|
const cloneArgs = ["clone", "--depth", "1"];
|
|
3551
3745
|
if (source.ref) {
|
|
3552
3746
|
cloneArgs.push("--branch", source.ref);
|
|
@@ -3567,11 +3761,11 @@ async function resolveInstallSource(source) {
|
|
|
3567
3761
|
resolved_subpath: resolved.resolved_subpath,
|
|
3568
3762
|
commit,
|
|
3569
3763
|
cleanup: async () => {
|
|
3570
|
-
await
|
|
3764
|
+
await fs6.rm(cloneDirectory, { recursive: true, force: true });
|
|
3571
3765
|
}
|
|
3572
3766
|
};
|
|
3573
3767
|
} catch (error) {
|
|
3574
|
-
await
|
|
3768
|
+
await fs6.rm(cloneDirectory, { recursive: true, force: true });
|
|
3575
3769
|
throw error;
|
|
3576
3770
|
}
|
|
3577
3771
|
}
|
|
@@ -3580,8 +3774,8 @@ async function areDirectoriesEquivalent(left, right) {
|
|
|
3580
3774
|
return false;
|
|
3581
3775
|
}
|
|
3582
3776
|
const [leftRealPath, rightRealPath] = await Promise.all([
|
|
3583
|
-
|
|
3584
|
-
|
|
3777
|
+
fs6.realpath(left),
|
|
3778
|
+
fs6.realpath(right)
|
|
3585
3779
|
]);
|
|
3586
3780
|
return leftRealPath === rightRealPath;
|
|
3587
3781
|
}
|
|
@@ -4105,9 +4299,9 @@ function buildDoctorConsistencySummary(scope, installedExtensions, loadedExtensi
|
|
|
4105
4299
|
|
|
4106
4300
|
// dist/sdk/extension/install-runtime.js
|
|
4107
4301
|
import { randomUUID } from "node:crypto";
|
|
4108
|
-
import
|
|
4302
|
+
import fs7 from "node:fs/promises";
|
|
4109
4303
|
import os2 from "node:os";
|
|
4110
|
-
import
|
|
4304
|
+
import path8 from "node:path";
|
|
4111
4305
|
!(function() {
|
|
4112
4306
|
try {
|
|
4113
4307
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -4131,34 +4325,34 @@ var sleep = (ms) => new Promise((resolve) => {
|
|
|
4131
4325
|
setTimeout(resolve, ms);
|
|
4132
4326
|
});
|
|
4133
4327
|
var ensureExtensionModuleTypeMarker = async (destinationDirectory) => {
|
|
4134
|
-
const markerPath =
|
|
4328
|
+
const markerPath = path8.join(destinationDirectory, "package.json");
|
|
4135
4329
|
if (await pathExists(markerPath)) {
|
|
4136
4330
|
return;
|
|
4137
4331
|
}
|
|
4138
|
-
await
|
|
4332
|
+
await fs7.writeFile(markerPath, `${JSON.stringify({ type: "module" }, null, 2)}
|
|
4139
4333
|
`, "utf8");
|
|
4140
4334
|
};
|
|
4141
4335
|
var resolveCanonicalExtensionInstallDestination = async (destinationDirectory) => {
|
|
4142
|
-
const resolvedDestination =
|
|
4143
|
-
const destinationParent =
|
|
4144
|
-
const destinationRoot =
|
|
4145
|
-
let canonicalDestinationParent = await
|
|
4146
|
-
const relativeDestinationParent =
|
|
4147
|
-
const destinationSegments = relativeDestinationParent === "" ? [] : relativeDestinationParent.split(
|
|
4336
|
+
const resolvedDestination = path8.resolve(destinationDirectory);
|
|
4337
|
+
const destinationParent = path8.dirname(resolvedDestination);
|
|
4338
|
+
const destinationRoot = path8.parse(destinationParent).root;
|
|
4339
|
+
let canonicalDestinationParent = await fs7.realpath(destinationRoot).catch(() => destinationRoot);
|
|
4340
|
+
const relativeDestinationParent = path8.relative(destinationRoot, destinationParent);
|
|
4341
|
+
const destinationSegments = relativeDestinationParent === "" ? [] : relativeDestinationParent.split(path8.sep);
|
|
4148
4342
|
for (const [index, segment] of destinationSegments.entries()) {
|
|
4149
|
-
const candidate =
|
|
4343
|
+
const candidate = path8.join(canonicalDestinationParent, segment);
|
|
4150
4344
|
try {
|
|
4151
|
-
canonicalDestinationParent = await
|
|
4345
|
+
canonicalDestinationParent = await fs7.realpath(candidate);
|
|
4152
4346
|
} catch {
|
|
4153
|
-
canonicalDestinationParent =
|
|
4347
|
+
canonicalDestinationParent = path8.join(canonicalDestinationParent, ...destinationSegments.slice(index));
|
|
4154
4348
|
break;
|
|
4155
4349
|
}
|
|
4156
4350
|
}
|
|
4157
|
-
return
|
|
4351
|
+
return path8.join(canonicalDestinationParent, path8.basename(resolvedDestination));
|
|
4158
4352
|
};
|
|
4159
4353
|
var copyExtensionDirectoryWithoutSelfNesting = async (sourceDirectory, destinationDirectory, copyDirectory, temporaryDirectory = os2.tmpdir()) => {
|
|
4160
|
-
const resolvedSource =
|
|
4161
|
-
const canonicalSource = await
|
|
4354
|
+
const resolvedSource = path8.resolve(sourceDirectory);
|
|
4355
|
+
const canonicalSource = await fs7.realpath(resolvedSource).catch(() => resolvedSource);
|
|
4162
4356
|
const canonicalDestination = await resolveCanonicalExtensionInstallDestination(destinationDirectory);
|
|
4163
4357
|
if (canonicalSource === canonicalDestination) {
|
|
4164
4358
|
return;
|
|
@@ -4170,13 +4364,13 @@ var copyExtensionDirectoryWithoutSelfNesting = async (sourceDirectory, destinati
|
|
|
4170
4364
|
});
|
|
4171
4365
|
return;
|
|
4172
4366
|
}
|
|
4173
|
-
const systemTempDirectory =
|
|
4174
|
-
const stagingBase = isPathWithinDirectory(canonicalSource, systemTempDirectory) ?
|
|
4367
|
+
const systemTempDirectory = path8.resolve(temporaryDirectory);
|
|
4368
|
+
const stagingBase = isPathWithinDirectory(canonicalSource, systemTempDirectory) ? path8.dirname(canonicalSource) : systemTempDirectory;
|
|
4175
4369
|
if (isPathWithinDirectory(canonicalSource, stagingBase)) {
|
|
4176
4370
|
throw new PmCliError(`Extension source "${sourceDirectory}" contains its install destination and no external staging directory is available. Install a narrower package directory instead.`, EXIT_CODE.USAGE, { code: "extension_install_source_contains_destination" });
|
|
4177
4371
|
}
|
|
4178
|
-
const stagingRoot = await
|
|
4179
|
-
const stagedDirectory =
|
|
4372
|
+
const stagingRoot = await fs7.mkdtemp(path8.join(stagingBase, "pm-extension-copy-"));
|
|
4373
|
+
const stagedDirectory = path8.join(stagingRoot, "extension");
|
|
4180
4374
|
try {
|
|
4181
4375
|
await copyDirectory(sourceDirectory, stagedDirectory, {
|
|
4182
4376
|
recursive: true,
|
|
@@ -4187,13 +4381,13 @@ var copyExtensionDirectoryWithoutSelfNesting = async (sourceDirectory, destinati
|
|
|
4187
4381
|
force: true
|
|
4188
4382
|
});
|
|
4189
4383
|
} finally {
|
|
4190
|
-
await
|
|
4384
|
+
await fs7.rm(stagingRoot, { recursive: true, force: true });
|
|
4191
4385
|
}
|
|
4192
4386
|
};
|
|
4193
|
-
var copyExtensionDirectoryForInstall = async (sourceDirectory, destinationDirectory, copyDirectory =
|
|
4387
|
+
var copyExtensionDirectoryForInstall = async (sourceDirectory, destinationDirectory, copyDirectory = fs7.cp) => {
|
|
4194
4388
|
for (let attempt = 1; attempt <= EXTENSION_INSTALL_COPY_ATTEMPTS; attempt += 1) {
|
|
4195
4389
|
try {
|
|
4196
|
-
await
|
|
4390
|
+
await fs7.rm(destinationDirectory, { recursive: true, force: true });
|
|
4197
4391
|
await copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory);
|
|
4198
4392
|
return;
|
|
4199
4393
|
} catch (error) {
|
|
@@ -4207,7 +4401,7 @@ var copyExtensionDirectoryForInstall = async (sourceDirectory, destinationDirect
|
|
|
4207
4401
|
var readExtensionInstallLockOwnerToken = async (lockPath) => {
|
|
4208
4402
|
let ownerContents;
|
|
4209
4403
|
try {
|
|
4210
|
-
ownerContents = await
|
|
4404
|
+
ownerContents = await fs7.readFile(path8.join(lockPath, "owner.json"), "utf8");
|
|
4211
4405
|
} catch (error) {
|
|
4212
4406
|
if (!isErrnoCode(error, "ENOENT"))
|
|
4213
4407
|
throw error;
|
|
@@ -4230,13 +4424,13 @@ var removeExtensionInstallLockIfOwned = async (lockPath, ownerToken) => {
|
|
|
4230
4424
|
if (currentOwnerToken !== ownerToken) {
|
|
4231
4425
|
return false;
|
|
4232
4426
|
}
|
|
4233
|
-
await
|
|
4427
|
+
await fs7.rm(lockPath, { recursive: true, force: true });
|
|
4234
4428
|
return true;
|
|
4235
4429
|
};
|
|
4236
4430
|
var reclaimStaleExtensionInstallLock = async (lockPath, staleMs) => {
|
|
4237
4431
|
let stat;
|
|
4238
4432
|
try {
|
|
4239
|
-
stat = await
|
|
4433
|
+
stat = await fs7.stat(lockPath);
|
|
4240
4434
|
} catch {
|
|
4241
4435
|
return false;
|
|
4242
4436
|
}
|
|
@@ -4245,7 +4439,7 @@ var reclaimStaleExtensionInstallLock = async (lockPath, staleMs) => {
|
|
|
4245
4439
|
}
|
|
4246
4440
|
const staleOwnerToken = await readExtensionInstallLockOwnerToken(lockPath);
|
|
4247
4441
|
if (staleOwnerToken === null) {
|
|
4248
|
-
await
|
|
4442
|
+
await fs7.rm(lockPath, { recursive: true, force: true });
|
|
4249
4443
|
return true;
|
|
4250
4444
|
}
|
|
4251
4445
|
return removeExtensionInstallLockIfOwned(lockPath, staleOwnerToken);
|
|
@@ -4258,7 +4452,7 @@ var startExtensionInstallLockHeartbeat = (lockPath, ownerToken, intervalMs) => {
|
|
|
4258
4452
|
return;
|
|
4259
4453
|
}
|
|
4260
4454
|
const heartbeatAt = /* @__PURE__ */ new Date();
|
|
4261
|
-
await
|
|
4455
|
+
await fs7.utimes(lockPath, heartbeatAt, heartbeatAt);
|
|
4262
4456
|
}).catch(() => void 0);
|
|
4263
4457
|
}, intervalMs);
|
|
4264
4458
|
timer.unref();
|
|
@@ -4268,12 +4462,12 @@ var startExtensionInstallLockHeartbeat = (lockPath, ownerToken, intervalMs) => {
|
|
|
4268
4462
|
};
|
|
4269
4463
|
};
|
|
4270
4464
|
var createExtensionInstallLock = async (lockPath, owner) => {
|
|
4271
|
-
await
|
|
4465
|
+
await fs7.mkdir(lockPath);
|
|
4272
4466
|
try {
|
|
4273
|
-
await
|
|
4467
|
+
await fs7.writeFile(path8.join(lockPath, "owner.json"), `${JSON.stringify(owner, null, 2)}
|
|
4274
4468
|
`, "utf8");
|
|
4275
4469
|
} catch (error) {
|
|
4276
|
-
await
|
|
4470
|
+
await fs7.rm(lockPath, { recursive: true, force: true }).catch(() => {
|
|
4277
4471
|
});
|
|
4278
4472
|
throw error;
|
|
4279
4473
|
}
|
|
@@ -4297,9 +4491,9 @@ var acquireExtensionInstallLock = async (lockPath, owner, attempts, delayMs, sta
|
|
|
4297
4491
|
return false;
|
|
4298
4492
|
};
|
|
4299
4493
|
var withExtensionInstallLock = async (settingsRoot, destinationDirectoryName, run, options) => {
|
|
4300
|
-
const lockRoot =
|
|
4301
|
-
const lockPath =
|
|
4302
|
-
await
|
|
4494
|
+
const lockRoot = path8.join(settingsRoot, "runtime", "extension-install-locks");
|
|
4495
|
+
const lockPath = path8.join(lockRoot, "scope.lock");
|
|
4496
|
+
await fs7.mkdir(lockRoot, { recursive: true });
|
|
4303
4497
|
const { attempts: rawAttempts = EXTENSION_INSTALL_LOCK_ATTEMPTS, delay_ms: rawDelayMs = EXTENSION_INSTALL_LOCK_DELAY_MS, stale_ms: rawStaleMs = EXTENSION_INSTALL_LOCK_STALE_MS, heartbeat_ms: rawHeartbeatMs } = options ?? {};
|
|
4304
4498
|
if (![rawAttempts, rawDelayMs, rawStaleMs, rawHeartbeatMs].filter((value) => value !== void 0).every(Number.isFinite)) {
|
|
4305
4499
|
throw new PmCliError("Extension install lock timings must be finite numbers.", EXIT_CODE.USAGE);
|
|
@@ -4412,8 +4606,8 @@ var checkGithubUpdate = async (source, gitCommandRunner = runGitCommand) => {
|
|
|
4412
4606
|
};
|
|
4413
4607
|
|
|
4414
4608
|
// dist/sdk/extension/install-snapshot.js
|
|
4415
|
-
import
|
|
4416
|
-
import
|
|
4609
|
+
import fs8 from "node:fs/promises";
|
|
4610
|
+
import path9 from "node:path";
|
|
4417
4611
|
!(function() {
|
|
4418
4612
|
try {
|
|
4419
4613
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -4421,7 +4615,7 @@ import path7 from "node:path";
|
|
|
4421
4615
|
} catch (e2) {
|
|
4422
4616
|
}
|
|
4423
4617
|
})();
|
|
4424
|
-
var readOptionalMetadataFile = async (filePath) =>
|
|
4618
|
+
var readOptionalMetadataFile = async (filePath) => fs8.readFile(filePath).catch((error) => {
|
|
4425
4619
|
if (isErrnoCode(error, "ENOENT"))
|
|
4426
4620
|
return null;
|
|
4427
4621
|
throw error;
|
|
@@ -4434,7 +4628,7 @@ var captureExtensionInstallSnapshot = async (selectedRoot, settingsRoot, destina
|
|
|
4434
4628
|
readOptionalMetadataFile(settingsPath)
|
|
4435
4629
|
]);
|
|
4436
4630
|
if (destinationExists) {
|
|
4437
|
-
await
|
|
4631
|
+
await fs8.cp(destinationDirectory, backupDirectory, {
|
|
4438
4632
|
recursive: true,
|
|
4439
4633
|
force: true
|
|
4440
4634
|
});
|
|
@@ -4450,9 +4644,9 @@ var captureExtensionInstallSnapshot = async (selectedRoot, settingsRoot, destina
|
|
|
4450
4644
|
};
|
|
4451
4645
|
};
|
|
4452
4646
|
var restoreExtensionInstallSnapshot = async (snapshot) => {
|
|
4453
|
-
await
|
|
4647
|
+
await fs8.rm(snapshot.destinationDirectory, { recursive: true, force: true });
|
|
4454
4648
|
if (snapshot.destinationExists) {
|
|
4455
|
-
await
|
|
4649
|
+
await fs8.cp(snapshot.backupDirectory, snapshot.destinationDirectory, {
|
|
4456
4650
|
recursive: true,
|
|
4457
4651
|
force: true
|
|
4458
4652
|
});
|
|
@@ -4462,10 +4656,10 @@ var restoreExtensionInstallSnapshot = async (snapshot) => {
|
|
|
4462
4656
|
[snapshot.settingsPath, snapshot.settingsContents]
|
|
4463
4657
|
]) {
|
|
4464
4658
|
if (contents === null) {
|
|
4465
|
-
await
|
|
4659
|
+
await fs8.rm(filePath, { force: true });
|
|
4466
4660
|
} else {
|
|
4467
|
-
await
|
|
4468
|
-
await
|
|
4661
|
+
await fs8.mkdir(path9.dirname(filePath), { recursive: true });
|
|
4662
|
+
await fs8.writeFile(filePath, contents);
|
|
4469
4663
|
}
|
|
4470
4664
|
}
|
|
4471
4665
|
};
|
|
@@ -4871,14 +5065,14 @@ var buildMissingManifestInspection = (directoryName, scope, settings, managedEnt
|
|
|
4871
5065
|
};
|
|
4872
5066
|
};
|
|
4873
5067
|
var inspectInstalledExtensionDirectory = async (extensionsRoot, directoryName, scope, settings, managedByName, managedByDirectory) => {
|
|
4874
|
-
const extensionDirectory =
|
|
4875
|
-
const manifestPath =
|
|
5068
|
+
const extensionDirectory = path10.join(extensionsRoot, directoryName);
|
|
5069
|
+
const manifestPath = path10.join(extensionDirectory, "manifest.json");
|
|
4876
5070
|
const managedDirectoryEntry = managedByDirectory.get(normalizeExtensionNameForMatch(directoryName));
|
|
4877
5071
|
if (!await pathExists(manifestPath)) {
|
|
4878
5072
|
return buildMissingManifestInspection(directoryName, scope, settings, managedDirectoryEntry);
|
|
4879
5073
|
}
|
|
4880
5074
|
const invalidJson = /* @__PURE__ */ Symbol("invalid-extension-manifest-json");
|
|
4881
|
-
const rawManifest = await
|
|
5075
|
+
const rawManifest = await fs9.readFile(manifestPath, "utf8").then((contents) => JSON.parse(contents)).catch(() => invalidJson);
|
|
4882
5076
|
if (rawManifest === invalidJson) {
|
|
4883
5077
|
return {
|
|
4884
5078
|
warning: `extension_manifest_invalid_json:${scope}:${directoryName}`
|
|
@@ -4906,7 +5100,7 @@ var listInstalledExtensions = async (extensionsRoot, scope, settings, state) =>
|
|
|
4906
5100
|
warnings: []
|
|
4907
5101
|
};
|
|
4908
5102
|
}
|
|
4909
|
-
const entries = await
|
|
5103
|
+
const entries = await fs9.readdir(extensionsRoot, { withFileTypes: true });
|
|
4910
5104
|
const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((left, right) => left.localeCompare(right));
|
|
4911
5105
|
const managedByName = new Map(state.entries.map((managedEntry) => [
|
|
4912
5106
|
normalizeExtensionNameForMatch(managedEntry.name),
|
|
@@ -5044,7 +5238,7 @@ var adoptUnmanagedExtensions = async (extensionsRoot, scope, installedExtensions
|
|
|
5044
5238
|
let nextState = state;
|
|
5045
5239
|
const adoptedEntries = [];
|
|
5046
5240
|
for (const candidate of sortedCandidates) {
|
|
5047
|
-
const extensionDirectory =
|
|
5241
|
+
const extensionDirectory = path10.join(extensionsRoot, candidate.directory);
|
|
5048
5242
|
const validated = await validateExtensionDirectory(extensionDirectory);
|
|
5049
5243
|
const now = nowIso();
|
|
5050
5244
|
const sourceRecord = {
|
|
@@ -5452,12 +5646,12 @@ var persistExtensionInstall = async (ctx, input3) => {
|
|
|
5452
5646
|
const settings = await readSettings(resolvedRoots.settings_root);
|
|
5453
5647
|
const managedStateRead = await readManagedExtensionState(resolvedRoots.selected_root);
|
|
5454
5648
|
warnings.push(...managedStateRead.warnings);
|
|
5455
|
-
const destinationDirectory =
|
|
5649
|
+
const destinationDirectory = path10.join(resolvedRoots.selected_root, destinationDirectoryName);
|
|
5456
5650
|
const destinationExists = await pathExists(destinationDirectory);
|
|
5457
5651
|
const installInPlace = await areDirectoriesEquivalent(validated.directory, destinationDirectory);
|
|
5458
|
-
await
|
|
5459
|
-
const backupRoot = await
|
|
5460
|
-
const backupDirectory =
|
|
5652
|
+
await fs9.mkdir(resolvedRoots.selected_root, { recursive: true });
|
|
5653
|
+
const backupRoot = await fs9.mkdtemp(path10.join(resolvedRoots.selected_root, ".pm-extension-install-backup-"));
|
|
5654
|
+
const backupDirectory = path10.join(backupRoot, "destination");
|
|
5461
5655
|
try {
|
|
5462
5656
|
const snapshot = await captureExtensionInstallSnapshot(resolvedRoots.selected_root, resolvedRoots.settings_root, destinationDirectory, destinationExists, backupDirectory);
|
|
5463
5657
|
const sourceRecord = buildInstallManagedSource(input3.bundledAliasName, input3.bundledPackageName, input3.installSource, input3.resolvedSource);
|
|
@@ -5501,7 +5695,7 @@ var persistExtensionInstall = async (ctx, input3) => {
|
|
|
5501
5695
|
activationChanged
|
|
5502
5696
|
};
|
|
5503
5697
|
} finally {
|
|
5504
|
-
await
|
|
5698
|
+
await fs9.rm(backupRoot, { recursive: true, force: true }).catch(() => void 0);
|
|
5505
5699
|
}
|
|
5506
5700
|
};
|
|
5507
5701
|
var scaffoldInstalledExtensionItemTypes = async (ctx, extensionName, registrations) => {
|
|
@@ -5758,7 +5952,7 @@ var runExtensionAdoptAction = async (ctx) => {
|
|
|
5758
5952
|
}
|
|
5759
5953
|
});
|
|
5760
5954
|
}
|
|
5761
|
-
const extensionDirectory =
|
|
5955
|
+
const extensionDirectory = path10.join(resolvedRoots.selected_root, candidate.directory);
|
|
5762
5956
|
const validated = await validateExtensionDirectory(extensionDirectory);
|
|
5763
5957
|
const now = nowIso();
|
|
5764
5958
|
const sourceRecord = buildAdoptedExtensionSource(githubOption, extensionTarget, extensionDirectory, options.ref);
|
|
@@ -5806,8 +6000,8 @@ var resolveRequiredInstalledExtension = async (ctx) => {
|
|
|
5806
6000
|
var runExtensionUninstallAction = async (ctx) => {
|
|
5807
6001
|
const { resolvedRoots, withResult } = ctx;
|
|
5808
6002
|
const { settings, managedStateRead, candidate } = await resolveRequiredInstalledExtension(ctx);
|
|
5809
|
-
const destinationDirectory =
|
|
5810
|
-
await
|
|
6003
|
+
const destinationDirectory = path10.join(resolvedRoots.selected_root, candidate.directory);
|
|
6004
|
+
await fs9.rm(destinationDirectory, { recursive: true, force: true });
|
|
5811
6005
|
const updatedState = {
|
|
5812
6006
|
...managedStateRead.state,
|
|
5813
6007
|
updated_at: nowIso(),
|
|
@@ -6296,56 +6490,9 @@ var requiresExtensionStateLock = (ctx) => [
|
|
|
6296
6490
|
].some(Boolean);
|
|
6297
6491
|
var dispatchExtensionAction = (ctx) => requiresExtensionStateLock(ctx) ? withExtensionInstallLock(ctx.resolvedRoots.settings_root, `${ctx.action}-state`, () => EXTENSION_ACTION_HANDLERS[ctx.action](ctx)) : EXTENSION_ACTION_HANDLERS[ctx.action](ctx);
|
|
6298
6492
|
|
|
6299
|
-
// dist/sdk/workspace.js
|
|
6300
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
6301
|
-
import path9 from "node:path";
|
|
6302
|
-
!(function() {
|
|
6303
|
-
try {
|
|
6304
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
6305
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5b3e660c-f869-5a00-8082-1f0d240c74bf");
|
|
6306
|
-
} catch (e2) {
|
|
6307
|
-
}
|
|
6308
|
-
})();
|
|
6309
|
-
var PM_GITIGNORE_START = "# pm-cli:runtime-cache:start";
|
|
6310
|
-
var PM_GITIGNORE_END = "# pm-cli:runtime-cache:end";
|
|
6311
|
-
var PM_GITIGNORE_BLOCK = [
|
|
6312
|
-
PM_GITIGNORE_START,
|
|
6313
|
-
".agents/pm/runtime/",
|
|
6314
|
-
".agents/pm/search/",
|
|
6315
|
-
".agents/pm/locks/",
|
|
6316
|
-
PM_GITIGNORE_END
|
|
6317
|
-
].join("\n");
|
|
6318
|
-
function getPmGitignoreBlock() {
|
|
6319
|
-
return PM_GITIGNORE_BLOCK;
|
|
6320
|
-
}
|
|
6321
|
-
async function ensurePmGitignore(workspaceRoot) {
|
|
6322
|
-
const gitignorePath = path9.join(workspaceRoot, ".gitignore");
|
|
6323
|
-
let current = "";
|
|
6324
|
-
try {
|
|
6325
|
-
current = await readFile(gitignorePath, "utf8");
|
|
6326
|
-
} catch (error) {
|
|
6327
|
-
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) {
|
|
6328
|
-
throw error;
|
|
6329
|
-
}
|
|
6330
|
-
}
|
|
6331
|
-
const start = current.indexOf(PM_GITIGNORE_START);
|
|
6332
|
-
const end = current.indexOf(PM_GITIGNORE_END);
|
|
6333
|
-
const withoutManagedBlock = start >= 0 && end >= start ? `${current.slice(0, start)}${current.slice(end + PM_GITIGNORE_END.length)}` : current;
|
|
6334
|
-
const prefix = withoutManagedBlock.trimEnd();
|
|
6335
|
-
const next = `${prefix.length > 0 ? `${prefix}
|
|
6336
|
-
|
|
6337
|
-
` : ""}${PM_GITIGNORE_BLOCK}
|
|
6338
|
-
`;
|
|
6339
|
-
if (next === current) {
|
|
6340
|
-
return { path: gitignorePath, changed: false };
|
|
6341
|
-
}
|
|
6342
|
-
await writeFile(gitignorePath, next, "utf8");
|
|
6343
|
-
return { path: gitignorePath, changed: true };
|
|
6344
|
-
}
|
|
6345
|
-
|
|
6346
6493
|
// dist/sdk/init-agent-guidance.js
|
|
6347
|
-
import
|
|
6348
|
-
import
|
|
6494
|
+
import fs10 from "node:fs/promises";
|
|
6495
|
+
import path11 from "node:path";
|
|
6349
6496
|
import readline from "node:readline/promises";
|
|
6350
6497
|
import { stdin as input, stdout as output } from "node:process";
|
|
6351
6498
|
!(function() {
|
|
@@ -6403,11 +6550,11 @@ function setAgentGuidanceReadlineFactoryForTests(factory) {
|
|
|
6403
6550
|
createAgentGuidanceReadlineInterface = factory ?? (() => readline.createInterface({ input, output }));
|
|
6404
6551
|
}
|
|
6405
6552
|
function toPortableRelativePath(projectRoot, targetPath) {
|
|
6406
|
-
const relative =
|
|
6553
|
+
const relative = path11.relative(projectRoot, targetPath);
|
|
6407
6554
|
if (relative.length === 0) {
|
|
6408
|
-
return
|
|
6555
|
+
return path11.basename(targetPath);
|
|
6409
6556
|
}
|
|
6410
|
-
return relative.split(
|
|
6557
|
+
return relative.split(path11.sep).join("/");
|
|
6411
6558
|
}
|
|
6412
6559
|
function ensureTrailingNewline(value) {
|
|
6413
6560
|
return value.endsWith("\n") ? value : `${value}
|
|
@@ -6470,14 +6617,14 @@ function upsertAgentGuidanceBlock(existingContent) {
|
|
|
6470
6617
|
};
|
|
6471
6618
|
}
|
|
6472
6619
|
function resolveProjectRoot(pmRoot, cwd) {
|
|
6473
|
-
const parent =
|
|
6474
|
-
if (
|
|
6475
|
-
return
|
|
6620
|
+
const parent = path11.dirname(pmRoot);
|
|
6621
|
+
if (path11.basename(pmRoot) === "pm" && path11.basename(parent) === ".agents") {
|
|
6622
|
+
return path11.dirname(parent);
|
|
6476
6623
|
}
|
|
6477
|
-
return
|
|
6624
|
+
return path11.resolve(cwd, pmRoot);
|
|
6478
6625
|
}
|
|
6479
6626
|
function resolveTargetGuidancePath(scans, projectRoot) {
|
|
6480
|
-
const existingAgents = scans.find((entry) =>
|
|
6627
|
+
const existingAgents = scans.find((entry) => path11.basename(entry.file_path) === "AGENTS.md" && entry.exists);
|
|
6481
6628
|
if (existingAgents) {
|
|
6482
6629
|
return existingAgents.file_path;
|
|
6483
6630
|
}
|
|
@@ -6485,7 +6632,7 @@ function resolveTargetGuidancePath(scans, projectRoot) {
|
|
|
6485
6632
|
if (existingAny) {
|
|
6486
6633
|
return existingAny.file_path;
|
|
6487
6634
|
}
|
|
6488
|
-
return
|
|
6635
|
+
return path11.join(projectRoot, "AGENTS.md");
|
|
6489
6636
|
}
|
|
6490
6637
|
function parsePromptChoice(answer, currentDefault) {
|
|
6491
6638
|
const normalized = answer.trim().toLowerCase();
|
|
@@ -6527,7 +6674,7 @@ function normalizeAgentGuidanceState(settings) {
|
|
|
6527
6674
|
async function scanGuidanceFiles(projectRoot) {
|
|
6528
6675
|
const scans = [];
|
|
6529
6676
|
for (const filename of AGENT_GUIDANCE_TARGET_FILENAMES) {
|
|
6530
|
-
const filePath =
|
|
6677
|
+
const filePath = path11.join(projectRoot, filename);
|
|
6531
6678
|
const exists = await pathExists(filePath);
|
|
6532
6679
|
if (!exists) {
|
|
6533
6680
|
scans.push({
|
|
@@ -6538,7 +6685,7 @@ async function scanGuidanceFiles(projectRoot) {
|
|
|
6538
6685
|
});
|
|
6539
6686
|
continue;
|
|
6540
6687
|
}
|
|
6541
|
-
const content = await
|
|
6688
|
+
const content = await fs10.readFile(filePath, "utf8");
|
|
6542
6689
|
const contentLower = content.toLowerCase();
|
|
6543
6690
|
const tokenHits = AGENT_GUIDANCE_REQUIRED_TOKENS.filter((token) => contentLower.includes(token));
|
|
6544
6691
|
const hasMarker = hasGuidanceMarker(content);
|
|
@@ -6566,7 +6713,7 @@ function applyAgentGuidanceState(settings, currentState) {
|
|
|
6566
6713
|
}
|
|
6567
6714
|
async function writeGuidanceFile(filePath) {
|
|
6568
6715
|
const exists = await pathExists(filePath);
|
|
6569
|
-
const currentContent = exists ? await
|
|
6716
|
+
const currentContent = exists ? await fs10.readFile(filePath, "utf8") : "";
|
|
6570
6717
|
const nextContent = upsertAgentGuidanceBlock(currentContent);
|
|
6571
6718
|
if (!nextContent.changed) {
|
|
6572
6719
|
return { changed: false, warnings: [] };
|
|
@@ -6754,8 +6901,8 @@ async function runInitAgentGuidance(options) {
|
|
|
6754
6901
|
}
|
|
6755
6902
|
|
|
6756
6903
|
// dist/sdk/init.js
|
|
6757
|
-
import
|
|
6758
|
-
import
|
|
6904
|
+
import fs11 from "node:fs/promises";
|
|
6905
|
+
import path12 from "node:path";
|
|
6759
6906
|
import readline2 from "node:readline/promises";
|
|
6760
6907
|
import { stdin as input2, stdout as output2 } from "node:process";
|
|
6761
6908
|
import { hostname, userInfo } from "node:os";
|
|
@@ -6866,7 +7013,7 @@ function isPathLikeInitTarget(rawValue) {
|
|
|
6866
7013
|
if (trimmed.length === 0) {
|
|
6867
7014
|
return false;
|
|
6868
7015
|
}
|
|
6869
|
-
return
|
|
7016
|
+
return path12.isAbsolute(trimmed) || /^[a-z]:/iu.test(trimmed) || trimmed.startsWith(".") || trimmed.includes("/") || trimmed.includes("\\");
|
|
6870
7017
|
}
|
|
6871
7018
|
function resolveInitInvocation(cwd, global2, prefixArg, workspaceArg) {
|
|
6872
7019
|
const normalizedWorkspace = workspaceArg?.trim();
|
|
@@ -6877,8 +7024,8 @@ function resolveInitInvocation(cwd, global2, prefixArg, workspaceArg) {
|
|
|
6877
7024
|
if (global2.path !== void 0 || isPathLikeInitTarget(prefixArg)) {
|
|
6878
7025
|
throw new PmCliError("--workspace cannot be combined with --pm-path/--path or a path-like positional target.", EXIT_CODE.USAGE);
|
|
6879
7026
|
}
|
|
6880
|
-
const workspaceRoot =
|
|
6881
|
-
const pmRoot2 =
|
|
7027
|
+
const workspaceRoot = path12.resolve(cwd, normalizedWorkspace);
|
|
7028
|
+
const pmRoot2 = path12.join(workspaceRoot, ".agents", "pm");
|
|
6882
7029
|
return {
|
|
6883
7030
|
pmRoot: pmRoot2,
|
|
6884
7031
|
prefixArg,
|
|
@@ -6890,7 +7037,7 @@ function resolveInitInvocation(cwd, global2, prefixArg, workspaceArg) {
|
|
|
6890
7037
|
};
|
|
6891
7038
|
}
|
|
6892
7039
|
if (global2.path === void 0 && isPathLikeInitTarget(prefixArg)) {
|
|
6893
|
-
const positionalTarget =
|
|
7040
|
+
const positionalTarget = path12.resolve(cwd, prefixArg.trim());
|
|
6894
7041
|
return {
|
|
6895
7042
|
pmRoot: positionalTarget,
|
|
6896
7043
|
prefixArg: void 0,
|
|
@@ -7012,10 +7159,10 @@ async function isLikelyWorkspaceRoot(candidate) {
|
|
|
7012
7159
|
"package.json",
|
|
7013
7160
|
"pnpm-workspace.yaml",
|
|
7014
7161
|
"AGENTS.md",
|
|
7015
|
-
|
|
7162
|
+
path12.join(".agents", "pm")
|
|
7016
7163
|
];
|
|
7017
7164
|
for (const indicator of indicators) {
|
|
7018
|
-
if (await pathExists(
|
|
7165
|
+
if (await pathExists(path12.join(candidate, indicator))) {
|
|
7019
7166
|
return true;
|
|
7020
7167
|
}
|
|
7021
7168
|
}
|
|
@@ -7025,13 +7172,13 @@ async function assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot, explicitTrack
|
|
|
7025
7172
|
if (!explicitTrackerTarget || force) {
|
|
7026
7173
|
return;
|
|
7027
7174
|
}
|
|
7028
|
-
if (await pathExists(
|
|
7175
|
+
if (await pathExists(path12.join(pmRoot, "settings.json"))) {
|
|
7029
7176
|
return;
|
|
7030
7177
|
}
|
|
7031
7178
|
if (!await isLikelyWorkspaceRoot(pmRoot)) {
|
|
7032
7179
|
return;
|
|
7033
7180
|
}
|
|
7034
|
-
const nestedTracker =
|
|
7181
|
+
const nestedTracker = path12.join(pmRoot, ".agents", "pm");
|
|
7035
7182
|
throw new PmCliError(`Refusing to initialize tracker files directly in workspace root "${pmRoot}".`, EXIT_CODE.USAGE, {
|
|
7036
7183
|
code: "workspace_root_pm_path",
|
|
7037
7184
|
type: "urn:pm-cli:error:workspace_root_pm_path",
|
|
@@ -7055,9 +7202,9 @@ async function ensureInitDirectories(pmRoot, subdirs) {
|
|
|
7055
7202
|
const createdDirs = [];
|
|
7056
7203
|
const warnings = [];
|
|
7057
7204
|
for (const subdir of subdirs) {
|
|
7058
|
-
const target = subdir ?
|
|
7205
|
+
const target = subdir ? path12.join(pmRoot, subdir) : pmRoot;
|
|
7059
7206
|
const existed = await pathExists(target);
|
|
7060
|
-
await
|
|
7207
|
+
await fs11.mkdir(target, { recursive: true });
|
|
7061
7208
|
if (existed) {
|
|
7062
7209
|
warnings.push(`already_exists:${target}`);
|
|
7063
7210
|
} else {
|
|
@@ -7290,10 +7437,10 @@ async function ensureInitTypeDirectories(params) {
|
|
|
7290
7437
|
params.warnings.push(...scaffold.warnings);
|
|
7291
7438
|
}
|
|
7292
7439
|
function resolveInitWorkspaceRoot(target) {
|
|
7293
|
-
const trackerRoot =
|
|
7294
|
-
const agentsRoot =
|
|
7295
|
-
if (
|
|
7296
|
-
return
|
|
7440
|
+
const trackerRoot = path12.resolve(target.tracker_root);
|
|
7441
|
+
const agentsRoot = path12.dirname(trackerRoot);
|
|
7442
|
+
if (path12.basename(trackerRoot) === "pm" && path12.basename(agentsRoot) === ".agents") {
|
|
7443
|
+
return path12.dirname(agentsRoot);
|
|
7297
7444
|
}
|
|
7298
7445
|
return target.workspace_root;
|
|
7299
7446
|
}
|
|
@@ -7350,7 +7497,7 @@ async function runInit(prefixArg, global2, options = {}) {
|
|
|
7350
7497
|
const baseDirs = await ensureInitDirectories(pmRoot, PM_REQUIRED_SUBDIRS);
|
|
7351
7498
|
createdDirs.push(...baseDirs.createdDirs);
|
|
7352
7499
|
warnings.push(...baseDirs.warnings);
|
|
7353
|
-
const settingsPath =
|
|
7500
|
+
const settingsPath = path12.join(pmRoot, "settings.json");
|
|
7354
7501
|
const settingsExists = await pathExists(settingsPath);
|
|
7355
7502
|
const settingsResolution = await resolveInitSettings({
|
|
7356
7503
|
pmRoot,
|
|
@@ -7414,6 +7561,14 @@ async function runInit(prefixArg, global2, options = {}) {
|
|
|
7414
7561
|
}
|
|
7415
7562
|
|
|
7416
7563
|
export {
|
|
7564
|
+
PM_GITIGNORE_START,
|
|
7565
|
+
PM_GITIGNORE_END,
|
|
7566
|
+
getPmGitignoreBlock,
|
|
7567
|
+
ensurePmGitignore,
|
|
7568
|
+
quoteWindowsCommandArg,
|
|
7569
|
+
quoteCommandArg,
|
|
7570
|
+
renderPmCommand,
|
|
7571
|
+
normalizeExtensionNameForMatch,
|
|
7417
7572
|
readManagedExtensionState,
|
|
7418
7573
|
PM_PACKAGE_RESOURCE_KINDS,
|
|
7419
7574
|
PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,
|
|
@@ -7425,10 +7580,6 @@ export {
|
|
|
7425
7580
|
collectUnknownCapabilityGuidance,
|
|
7426
7581
|
buildCapabilityContractMetadata,
|
|
7427
7582
|
runExtension,
|
|
7428
|
-
PM_GITIGNORE_START,
|
|
7429
|
-
PM_GITIGNORE_END,
|
|
7430
|
-
getPmGitignoreBlock,
|
|
7431
|
-
ensurePmGitignore,
|
|
7432
7583
|
INIT_AGENT_GUIDANCE_MODE_VALUES,
|
|
7433
7584
|
_testOnly,
|
|
7434
7585
|
runInitAgentGuidance,
|
|
@@ -7436,4 +7587,4 @@ export {
|
|
|
7436
7587
|
_testOnly2,
|
|
7437
7588
|
runInit
|
|
7438
7589
|
};
|
|
7439
|
-
//# sourceMappingURL=chunk-
|
|
7590
|
+
//# sourceMappingURL=chunk-ZF52NVRT.js.map
|