@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.
Files changed (497) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +17 -0
  3. package/dist/cli/commands/claim.js +6 -4
  4. package/dist/cli/commands/claim.js.map +1 -1
  5. package/dist/cli/commands/comments.js +5 -2
  6. package/dist/cli/commands/comments.js.map +1 -1
  7. package/dist/cli/commands/context.d.ts +10 -1
  8. package/dist/cli/commands/context.js +44 -6
  9. package/dist/cli/commands/context.js.map +1 -1
  10. package/dist/cli/commands/create.js +15 -4
  11. package/dist/cli/commands/create.js.map +1 -1
  12. package/dist/cli/commands/next.js +13 -3
  13. package/dist/cli/commands/next.js.map +1 -1
  14. package/dist/cli/commands/update.js +14 -3
  15. package/dist/cli/commands/update.js.map +1 -1
  16. package/dist/cli/error-guidance.js +23 -4
  17. package/dist/cli/error-guidance.js.map +1 -1
  18. package/dist/cli/extension-command-help.d.ts +11 -0
  19. package/dist/cli/extension-command-help.js +62 -2
  20. package/dist/cli/extension-command-help.js.map +1 -1
  21. package/dist/cli/main.d.ts +1 -0
  22. package/dist/cli/main.js +16 -11
  23. package/dist/cli/main.js.map +1 -1
  24. package/dist/cli-bundle/bundle-manifest.json +326 -350
  25. package/dist/cli-bundle/chunks/{append-5YF3TO7I.js → append-MBXHNWSX.js} +5 -5
  26. package/dist/cli-bundle/chunks/append-XUYF7NON.js +11 -0
  27. package/dist/cli-bundle/chunks/{chunk-BIRYX32V.js → chunk-2UCG5H6B.js} +3 -3
  28. package/dist/cli-bundle/chunks/{chunk-VE6ZSTQW.js → chunk-2XPDCXK5.js} +4 -4
  29. package/dist/cli-bundle/chunks/{chunk-I3INI567.js → chunk-3EZZTFL2.js} +909 -124
  30. package/dist/cli-bundle/chunks/chunk-3EZZTFL2.js.map +7 -0
  31. package/dist/cli-bundle/chunks/{chunk-GLZKZON6.js → chunk-3HSRP6T2.js} +2 -2
  32. package/dist/cli-bundle/chunks/{chunk-XWBD6DSR.js → chunk-3KPNOZOH.js} +23 -23
  33. package/dist/cli-bundle/chunks/{chunk-MR4SHYR4.js → chunk-3QNUDDY2.js} +104 -23
  34. package/dist/cli-bundle/chunks/chunk-3QNUDDY2.js.map +7 -0
  35. package/dist/cli-bundle/chunks/{chunk-SIPOACV5.js → chunk-46Z6FAVP.js} +888 -124
  36. package/dist/cli-bundle/chunks/chunk-46Z6FAVP.js.map +1 -0
  37. package/dist/cli-bundle/chunks/{chunk-HO4DLBNK.js → chunk-4M6RZJXF.js} +2 -2
  38. package/dist/cli-bundle/chunks/{chunk-RXPQ5Q23.js → chunk-4PSJVGRE.js} +11 -11
  39. package/dist/cli-bundle/chunks/{chunk-ADXDCAKP.js → chunk-5S6IZXK7.js} +146 -32
  40. package/dist/cli-bundle/chunks/{chunk-IL5SPRMH.js.map → chunk-5S6IZXK7.js.map} +7 -1
  41. package/dist/cli-bundle/chunks/chunk-66SRNEBK.js +143 -0
  42. package/dist/cli-bundle/chunks/chunk-66SRNEBK.js.map +7 -0
  43. package/dist/cli-bundle/chunks/{chunk-YFE7JHX3.js → chunk-6BNV3G6C.js} +2 -2
  44. package/dist/cli-bundle/chunks/{chunk-43UMFKCK.js → chunk-6V4T4RD3.js} +23 -23
  45. package/dist/cli-bundle/chunks/chunk-77XFQRTD.js +140 -0
  46. package/dist/cli-bundle/chunks/chunk-77XFQRTD.js.map +1 -0
  47. package/dist/cli-bundle/chunks/{chunk-EHJFUOXL.js → chunk-7B7IHMLH.js} +3 -3
  48. package/dist/cli-bundle/chunks/{chunk-I7DIDUSP.js → chunk-7CHWLT2J.js} +2 -2
  49. package/dist/cli-bundle/chunks/{chunk-L6FVNR7X.js → chunk-A3GAQLBH.js} +5 -5
  50. package/dist/cli-bundle/chunks/{chunk-B57RJHBZ.js → chunk-A4FVWFZY.js} +4 -4
  51. package/dist/cli-bundle/chunks/{chunk-D52ZN3BF.js → chunk-A5EQPNV7.js} +2 -2
  52. package/dist/cli-bundle/chunks/{chunk-TZAE66GQ.js → chunk-AGEBQRBG.js} +15 -15
  53. package/dist/cli-bundle/chunks/{chunk-WU3KAN6A.js → chunk-AQUNTB7G.js} +3 -3
  54. package/dist/cli-bundle/chunks/{chunk-OGVTB5VO.js → chunk-AR24KW26.js} +237 -36
  55. package/dist/cli-bundle/chunks/chunk-AR24KW26.js.map +7 -0
  56. package/dist/cli-bundle/chunks/{chunk-XWYQ2LT4.js → chunk-BBGR4FKQ.js} +4 -4
  57. package/dist/cli-bundle/chunks/{chunk-HTXXXF45.js → chunk-BDC4TW4B.js} +98 -24
  58. package/dist/cli-bundle/chunks/chunk-BDC4TW4B.js.map +1 -0
  59. package/dist/cli-bundle/chunks/{chunk-2FUOXSRN.js → chunk-BFJP4VYC.js} +4 -4
  60. package/dist/cli-bundle/chunks/{chunk-633PKXLT.js → chunk-BZKE2O5V.js} +3 -3
  61. package/dist/cli-bundle/chunks/{chunk-XPUTSGJU.js → chunk-CZA2DXCV.js} +230 -36
  62. package/dist/cli-bundle/chunks/chunk-CZA2DXCV.js.map +1 -0
  63. package/dist/cli-bundle/chunks/{chunk-KX62NMZC.js → chunk-D35WYXWC.js} +626 -5
  64. package/dist/cli-bundle/chunks/chunk-D35WYXWC.js.map +1 -0
  65. package/dist/cli-bundle/chunks/chunk-DOASIOQR.js +289 -0
  66. package/dist/cli-bundle/chunks/chunk-DOASIOQR.js.map +7 -0
  67. package/dist/cli-bundle/chunks/{chunk-L337QKWJ.js → chunk-DUDLSQFG.js} +5 -5
  68. package/dist/cli-bundle/chunks/{chunk-BVLOMU6O.js → chunk-E7KBMWEF.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-3QDR6ZLU.js → chunk-EAV3P54W.js} +9 -9
  70. package/dist/cli-bundle/chunks/{chunk-3QDR6ZLU.js.map → chunk-EAV3P54W.js.map} +2 -2
  71. package/dist/cli-bundle/chunks/{chunk-WQXRZMFN.js → chunk-EEECAV5M.js} +2 -2
  72. package/dist/cli-bundle/chunks/{chunk-35FHWD4C.js → chunk-EI3UIMZM.js} +4 -4
  73. package/dist/cli-bundle/chunks/{chunk-RGMWJLXF.js → chunk-EVAN5VJA.js} +8 -5
  74. package/dist/cli-bundle/chunks/{chunk-RGMWJLXF.js.map → chunk-EVAN5VJA.js.map} +2 -2
  75. package/dist/cli-bundle/chunks/{chunk-PT7MCCGD.js → chunk-FIUTBFC6.js} +2 -2
  76. package/dist/cli-bundle/chunks/{chunk-7H5NNCJ5.js → chunk-FQF6VVPH.js} +4 -4
  77. package/dist/cli-bundle/chunks/{chunk-6DYOZS6C.js → chunk-FQO5THHM.js} +2 -2
  78. package/dist/cli-bundle/chunks/{chunk-5HGZKQUL.js → chunk-FQODDTE7.js} +4 -4
  79. package/dist/cli-bundle/chunks/{chunk-67RO3H4N.js → chunk-G33XIMRT.js} +6 -6
  80. package/dist/cli-bundle/chunks/{chunk-D53RTYVI.js → chunk-GFZB5CLP.js} +20 -10
  81. package/dist/cli-bundle/chunks/chunk-GFZB5CLP.js.map +7 -0
  82. package/dist/cli-bundle/chunks/{chunk-QWBKN3QC.js → chunk-GKCEEXMA.js} +8 -8
  83. package/dist/cli-bundle/chunks/{chunk-DG2EQRIH.js → chunk-GRDK25BN.js} +7 -7
  84. package/dist/cli-bundle/chunks/{chunk-FXFCFL73.js → chunk-H3YKUVDR.js} +5 -5
  85. package/dist/cli-bundle/chunks/{chunk-IL5SPRMH.js → chunk-IEMXESIS.js} +123 -16
  86. package/dist/cli-bundle/chunks/chunk-IEMXESIS.js.map +1 -0
  87. package/dist/cli-bundle/chunks/{chunk-ARGDWQ4J.js → chunk-IGBBTPM5.js} +2 -2
  88. package/dist/cli-bundle/chunks/{chunk-QPGQNLPI.js → chunk-IR3GOO6E.js} +3842 -4109
  89. package/dist/cli-bundle/chunks/chunk-IR3GOO6E.js.map +1 -0
  90. package/dist/cli-bundle/chunks/{chunk-FY4RLHSC.js → chunk-IRJ6F23W.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-66MKH7SZ.js → chunk-IXG5CMBR.js} +4 -4
  92. package/dist/cli-bundle/chunks/{chunk-F3VC3GOV.js → chunk-JBW2S2C6.js} +2090 -253
  93. package/dist/cli-bundle/chunks/chunk-JBW2S2C6.js.map +7 -0
  94. package/dist/cli-bundle/chunks/{chunk-7UCY6DR5.js → chunk-JPWUZOMR.js} +2 -2
  95. package/dist/cli-bundle/chunks/{chunk-FVNWHUME.js → chunk-K2L6FZBX.js} +8 -8
  96. package/dist/cli-bundle/chunks/chunk-KGPLSHJD.js +286 -0
  97. package/dist/cli-bundle/chunks/chunk-KGPLSHJD.js.map +1 -0
  98. package/dist/cli-bundle/chunks/{chunk-YQEZWI3R.js → chunk-KZ5AC6B5.js} +5 -3
  99. package/dist/cli-bundle/chunks/chunk-KZ5AC6B5.js.map +7 -0
  100. package/dist/cli-bundle/chunks/{chunk-X2MGQMZO.js → chunk-LT5UWU7H.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-KH6QAHME.js → chunk-M4B4RK4J.js} +3 -3
  102. package/dist/cli-bundle/chunks/{chunk-QRZNCRNA.js → chunk-MI3346YW.js} +377 -240
  103. package/dist/cli-bundle/chunks/chunk-MI3346YW.js.map +1 -0
  104. package/dist/cli-bundle/chunks/{chunk-2XOSFSTH.js → chunk-MQOSMBWV.js} +5 -5
  105. package/dist/cli-bundle/chunks/{chunk-YIIIAKCE.js → chunk-MRXAHR4B.js} +28 -22
  106. package/dist/cli-bundle/chunks/chunk-MRXAHR4B.js.map +1 -0
  107. package/dist/cli-bundle/chunks/{chunk-7R6UIHYY.js → chunk-N2TEEOXJ.js} +5 -5
  108. package/dist/cli-bundle/chunks/{chunk-NTRQLE2R.js → chunk-N7FCFJ76.js} +2 -2
  109. package/dist/cli-bundle/chunks/{chunk-37DRDP2B.js → chunk-NPEYH6CE.js} +5 -5
  110. package/dist/cli-bundle/chunks/{chunk-GKPCTQYG.js → chunk-NTS2RKHN.js} +3942 -4216
  111. package/dist/cli-bundle/chunks/chunk-NTS2RKHN.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-6VHUGVNP.js → chunk-ODEIDKGW.js} +2062 -246
  113. package/dist/cli-bundle/chunks/chunk-ODEIDKGW.js.map +1 -0
  114. package/dist/cli-bundle/chunks/{chunk-2CXL335K.js → chunk-OK7VSX3N.js} +3 -3
  115. package/dist/cli-bundle/chunks/{chunk-NNANAWFH.js → chunk-OKPZDH43.js} +3 -3
  116. package/dist/cli-bundle/chunks/{chunk-G6MYGULG.js → chunk-OKWJUL6F.js} +6 -6
  117. package/dist/cli-bundle/chunks/{chunk-HPAYDSR2.js → chunk-P24ZU5QV.js} +27 -21
  118. package/dist/cli-bundle/chunks/chunk-P24ZU5QV.js.map +7 -0
  119. package/dist/cli-bundle/chunks/{chunk-TGBTLGPX.js → chunk-Q4PSG2GV.js} +13 -4
  120. package/dist/cli-bundle/chunks/{chunk-TGBTLGPX.js.map → chunk-Q4PSG2GV.js.map} +1 -1
  121. package/dist/cli-bundle/chunks/{chunk-5UKQLQM2.js → chunk-Q5NHJ6RO.js} +6 -4
  122. package/dist/cli-bundle/chunks/chunk-Q5NHJ6RO.js.map +1 -0
  123. package/dist/cli-bundle/chunks/{chunk-D5XHO4Q7.js → chunk-Q6JPYR7I.js} +2 -2
  124. package/dist/cli-bundle/chunks/{chunk-P22HGFFI.js → chunk-QFG4MB7P.js} +5 -5
  125. package/dist/cli-bundle/chunks/{chunk-P22HGFFI.js.map → chunk-QFG4MB7P.js.map} +1 -1
  126. package/dist/cli-bundle/chunks/{chunk-IE5KRAKN.js → chunk-QQ77W23U.js} +4 -4
  127. package/dist/cli-bundle/chunks/{chunk-M7MVOKVV.js → chunk-QYGK2XQ3.js} +3 -3
  128. package/dist/cli-bundle/chunks/{chunk-646MQXFW.js → chunk-RLLOZAM2.js} +4 -4
  129. package/dist/cli-bundle/chunks/{chunk-646MQXFW.js.map → chunk-RLLOZAM2.js.map} +2 -2
  130. package/dist/cli-bundle/chunks/{chunk-X5YCTFKT.js → chunk-RWAIRGBC.js} +3 -3
  131. package/dist/cli-bundle/chunks/{chunk-W5E2UUSH.js → chunk-RX53WHFI.js} +3 -3
  132. package/dist/cli-bundle/chunks/{chunk-R5XTTZSJ.js → chunk-SBW7EQC4.js} +5 -5
  133. package/dist/cli-bundle/chunks/{chunk-TM5CIO3F.js → chunk-SGJB6PXA.js} +3 -3
  134. package/dist/cli-bundle/chunks/{chunk-DDFGYUCQ.js → chunk-STBCBDKF.js} +7 -7
  135. package/dist/cli-bundle/chunks/{chunk-EX7OQT3Y.js → chunk-SUNZKVAH.js} +10 -10
  136. package/dist/cli-bundle/chunks/{chunk-EX7OQT3Y.js.map → chunk-SUNZKVAH.js.map} +1 -1
  137. package/dist/cli-bundle/chunks/{chunk-FHOBCGQO.js → chunk-SVAWG7EE.js} +2 -2
  138. package/dist/cli-bundle/chunks/{chunk-6O44IN44.js → chunk-T6MOTLOJ.js} +2 -2
  139. package/dist/cli-bundle/chunks/{chunk-HSYV4ZYT.js → chunk-TELI67UP.js} +9 -6
  140. package/dist/cli-bundle/chunks/{chunk-HSYV4ZYT.js.map → chunk-TELI67UP.js.map} +1 -1
  141. package/dist/cli-bundle/chunks/{chunk-EWIT5WIC.js → chunk-U6RYD446.js} +11 -11
  142. package/dist/cli-bundle/chunks/{chunk-E4FXM2XB.js → chunk-UE7LK3RE.js} +5 -5
  143. package/dist/cli-bundle/chunks/{chunk-N33FD2UI.js → chunk-UNNCT5QY.js} +3 -3
  144. package/dist/cli-bundle/chunks/{chunk-2IPNL3DR.js → chunk-UOIFZ66L.js} +3 -3
  145. package/dist/cli-bundle/chunks/{chunk-LSOWTLEM.js → chunk-UU6EP25G.js} +2 -2
  146. package/dist/cli-bundle/chunks/{chunk-HYTOJW2Q.js → chunk-UW6HCMP2.js} +15 -15
  147. package/dist/cli-bundle/chunks/{chunk-47HXN6RX.js → chunk-UWAQI3B7.js} +3 -3
  148. package/dist/cli-bundle/chunks/{chunk-YKFHF37B.js → chunk-V4QHAMI5.js} +3 -3
  149. package/dist/cli-bundle/chunks/{chunk-VAHZIPWS.js → chunk-VA3H7VVC.js} +4 -4
  150. package/dist/cli-bundle/chunks/{chunk-XC2HEEOV.js → chunk-VFA5EIEN.js} +21 -11
  151. package/dist/cli-bundle/chunks/chunk-VFA5EIEN.js.map +1 -0
  152. package/dist/cli-bundle/chunks/{chunk-TLWJP5BF.js → chunk-VQOG2ETB.js} +4 -4
  153. package/dist/cli-bundle/chunks/{chunk-H5IOT54C.js → chunk-VSQE43NO.js} +8 -8
  154. package/dist/cli-bundle/chunks/{chunk-BDA35QG5.js → chunk-W6IEJXNC.js} +2 -2
  155. package/dist/cli-bundle/chunks/{chunk-WACRQ26A.js → chunk-WCBB6VI3.js} +637 -9
  156. package/dist/cli-bundle/chunks/chunk-WCBB6VI3.js.map +7 -0
  157. package/dist/cli-bundle/chunks/{chunk-OWP6QFBV.js → chunk-XDWXPG2E.js} +4 -4
  158. package/dist/cli-bundle/chunks/{chunk-CKX4WOPC.js → chunk-XKVHL3MB.js} +2 -2
  159. package/dist/cli-bundle/chunks/{chunk-WL3SS45P.js → chunk-XVB6BATY.js} +3 -3
  160. package/dist/cli-bundle/chunks/{chunk-NVZ6NVHJ.js → chunk-XXWDEQ6O.js} +4 -4
  161. package/dist/cli-bundle/chunks/{chunk-ILVOOAT4.js → chunk-Y2VSGFT4.js} +8 -8
  162. package/dist/cli-bundle/chunks/{chunk-NCVT6XEL.js → chunk-YG56M3NE.js} +11 -11
  163. package/dist/cli-bundle/chunks/{chunk-AFGKSHAM.js → chunk-YGEA4CLH.js} +4 -4
  164. package/dist/cli-bundle/chunks/{chunk-AXRT7K5V.js → chunk-YIC5NGXF.js} +11 -11
  165. package/dist/cli-bundle/chunks/{chunk-DHNG452T.js → chunk-ZF52NVRT.js} +396 -245
  166. package/dist/cli-bundle/chunks/chunk-ZF52NVRT.js.map +7 -0
  167. package/dist/cli-bundle/chunks/{chunk-XXLXJL7V.js → chunk-ZUCBPXNA.js} +4 -4
  168. package/dist/cli-bundle/chunks/{close-X3CF6FQP.js → close-7NWA3GLA.js} +5 -5
  169. package/dist/cli-bundle/chunks/close-ZZCDDWJT.js +12 -0
  170. package/dist/cli-bundle/chunks/close-many-QCZHFCON.js +23 -0
  171. package/dist/cli-bundle/chunks/{close-many-J7A5EHOQ.js → close-many-YALQ7AXS.js} +14 -14
  172. package/dist/cli-bundle/chunks/comments-FMQNYPSZ.js +13 -0
  173. package/dist/cli-bundle/chunks/{comments-TMHMALA5.js → comments-SQIQ5WYR.js} +7 -7
  174. package/dist/cli-bundle/chunks/copy-GI3RCVZP.js +9 -0
  175. package/dist/cli-bundle/chunks/{copy-FWQA5OU4.js → copy-YDAMENCP.js} +4 -4
  176. package/dist/cli-bundle/chunks/{create-AQ5SIGZC.js → create-JSL6CXU3.js} +11 -9
  177. package/dist/cli-bundle/chunks/create-LXMLYJNM.js +29 -0
  178. package/dist/cli-bundle/chunks/delete-5DFAXJNI.js +10 -0
  179. package/dist/cli-bundle/chunks/{delete-YYYFOSEA.js → delete-IGVOZEU2.js} +4 -4
  180. package/dist/cli-bundle/chunks/{deps-NIIKXLPB.js → deps-BQAXUQAK.js} +6 -6
  181. package/dist/cli-bundle/chunks/{deps-MQ4ZIGZB.js → deps-CBPPSS6J.js} +6 -6
  182. package/dist/cli-bundle/chunks/docs-KCWPLQOV.js +14 -0
  183. package/dist/cli-bundle/chunks/{docs-53NUGMIQ.js → docs-NS2AZWCN.js} +7 -7
  184. package/dist/cli-bundle/chunks/{files-3PXGXYDB.js → files-PVWEPT5J.js} +7 -7
  185. package/dist/cli-bundle/chunks/{files-EGLKHD7O.js → files-XUUBQ76I.js} +7 -7
  186. package/dist/cli-bundle/chunks/focus-3EJVFI3D.js +10 -0
  187. package/dist/cli-bundle/chunks/{focus-SRPASFTN.js → focus-DHBHKK3E.js} +5 -5
  188. package/dist/cli-bundle/chunks/{history-compact-G4DULDCX.js → history-compact-3TNPYVFG.js} +6 -6
  189. package/dist/cli-bundle/chunks/history-compact-JHYVDYLW.js +16 -0
  190. package/dist/cli-bundle/chunks/{history-redact-IUSJ6X3E.js → history-redact-ELRL73XN.js} +4 -4
  191. package/dist/cli-bundle/chunks/{history-redact-THHGRQXV.js → history-redact-KKFDICCF.js} +4 -4
  192. package/dist/cli-bundle/chunks/{history-repair-LUQWRS7X.js → history-repair-J7WKZFAG.js} +6 -6
  193. package/dist/cli-bundle/chunks/history-repair-REMI7DDI.js +16 -0
  194. package/dist/cli-bundle/chunks/learnings-O6V5WDCV.js +13 -0
  195. package/dist/cli-bundle/chunks/{learnings-2MRNBFJF.js → learnings-X4D6JCCG.js} +7 -7
  196. package/dist/cli-bundle/chunks/{notes-73JWKWUD.js → notes-UQC6VS6N.js} +7 -7
  197. package/dist/cli-bundle/chunks/notes-ZSZREWZA.js +13 -0
  198. package/dist/cli-bundle/chunks/{plan-AZPMCG37.js → plan-5GKRBJJO.js} +12 -10
  199. package/dist/cli-bundle/chunks/plan-EZW2YDDY.js +26 -0
  200. package/dist/cli-bundle/chunks/{profile-AVCIIZID.js → profile-5PQAPCLF.js} +10 -10
  201. package/dist/cli-bundle/chunks/{profile-LFYO3HHX.js → profile-CW4BD3FO.js} +10 -10
  202. package/dist/cli-bundle/chunks/{register-list-query-UKMF55FT.js → register-list-query-HTDQE6VI.js} +24 -24
  203. package/dist/cli-bundle/chunks/{register-list-query-MZUF2EEC.js → register-list-query-PHIPDFP2.js} +24 -24
  204. package/dist/cli-bundle/chunks/{register-mutation-T6RVNJC4.js → register-mutation-BLEWM5I6.js} +32 -32
  205. package/dist/cli-bundle/chunks/{register-mutation-2PBW2GEX.js → register-mutation-OTYHR7J6.js} +32 -32
  206. package/dist/cli-bundle/chunks/{register-operations-KHZYR6MG.js → register-operations-AMCUFYEW.js} +38 -40
  207. package/dist/cli-bundle/chunks/{register-operations-KHZYR6MG.js.map → register-operations-AMCUFYEW.js.map} +1 -1
  208. package/dist/cli-bundle/chunks/{register-operations-WPQ2LWZJ.js → register-operations-MRLHOZYR.js} +36 -38
  209. package/dist/cli-bundle/chunks/{register-operations-WPQ2LWZJ.js.map → register-operations-MRLHOZYR.js.map} +1 -1
  210. package/dist/cli-bundle/chunks/{register-setup-PGDNOXDQ.js → register-setup-N2FOSWAG.js} +15 -17
  211. package/dist/cli-bundle/chunks/{register-setup-PGDNOXDQ.js.map → register-setup-N2FOSWAG.js.map} +1 -1
  212. package/dist/cli-bundle/chunks/{register-setup-TDN7WAO6.js → register-setup-ZVKTDL4G.js} +17 -19
  213. package/dist/cli-bundle/chunks/{register-setup-TDN7WAO6.js.map → register-setup-ZVKTDL4G.js.map} +1 -1
  214. package/dist/cli-bundle/chunks/restore-A55MLFAI.js +14 -0
  215. package/dist/cli-bundle/chunks/{restore-E3PRGDN3.js → restore-HEQAG6EK.js} +6 -6
  216. package/dist/cli-bundle/chunks/{schema-5JNFQFUW.js → schema-MAXAIHEC.js} +6 -6
  217. package/dist/cli-bundle/chunks/{schema-TMIW4XZC.js → schema-Q5DAWJ2S.js} +6 -6
  218. package/dist/cli-bundle/chunks/update-5DTSCWVF.js +23 -0
  219. package/dist/cli-bundle/chunks/{update-SQYZA3ZW.js → update-DWFXXJKP.js} +15 -13
  220. package/dist/cli-bundle/chunks/update-many-6T4ZLZS7.js +34 -0
  221. package/dist/cli-bundle/chunks/update-many-MYRK6VBJ.js +38 -0
  222. package/dist/cli-bundle/main.js +152 -29
  223. package/dist/cli-bundle/main.js.map +3 -3
  224. package/dist/cli-bundle/sdk-runtime.js +72 -75
  225. package/dist/cli-bundle/sdk-testing.js +8 -8
  226. package/dist/cli-bundle/sdk.js +288 -642
  227. package/dist/cli-bundle/sdk.js.map +4 -4
  228. package/dist/core/extensions/activation-summary.d.ts +2 -0
  229. package/dist/core/extensions/activation-summary.js +7 -2
  230. package/dist/core/extensions/activation-summary.js.map +1 -1
  231. package/dist/core/extensions/capability-usage.d.ts +1 -1
  232. package/dist/core/extensions/capability-usage.js +5 -2
  233. package/dist/core/extensions/capability-usage.js.map +1 -1
  234. package/dist/core/extensions/extension-hook-runtime.js +3 -2
  235. package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
  236. package/dist/core/extensions/extension-registries.js +3 -2
  237. package/dist/core/extensions/extension-registries.js.map +1 -1
  238. package/dist/core/extensions/extension-types.d.ts +38 -1
  239. package/dist/core/extensions/extension-types.js +3 -2
  240. package/dist/core/extensions/extension-types.js.map +1 -1
  241. package/dist/core/extensions/loader.js +36 -2
  242. package/dist/core/extensions/loader.js.map +1 -1
  243. package/dist/core/store/item-store.d.ts +4 -1
  244. package/dist/core/store/item-store.js +3 -3
  245. package/dist/core/store/item-store.js.map +1 -1
  246. package/dist/core/store/paths.d.ts +2 -0
  247. package/dist/core/store/paths.js +26 -3
  248. package/dist/core/store/paths.js.map +1 -1
  249. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  250. package/dist/sdk/compose.d.ts +3 -0
  251. package/dist/sdk/compose.js +14 -2
  252. package/dist/sdk/compose.js.map +1 -1
  253. package/dist/sdk/dependencies.js +3 -3
  254. package/dist/sdk/dependencies.js.map +1 -1
  255. package/dist/sdk/extension-command-context.d.ts +10 -0
  256. package/dist/sdk/extension-command-context.js +30 -0
  257. package/dist/sdk/extension-command-context.js.map +1 -0
  258. package/dist/sdk/graph/assembly.js +14 -4
  259. package/dist/sdk/graph/assembly.js.map +1 -1
  260. package/dist/sdk/graph/index.d.ts +1 -0
  261. package/dist/sdk/graph/index.js +3 -2
  262. package/dist/sdk/graph/index.js.map +1 -1
  263. package/dist/sdk/graph/mutation-advisory.d.ts +20 -0
  264. package/dist/sdk/graph/mutation-advisory.js +80 -0
  265. package/dist/sdk/graph/mutation-advisory.js.map +1 -0
  266. package/dist/sdk/graph/run.d.ts +5 -1
  267. package/dist/sdk/graph/run.js +11 -3
  268. package/dist/sdk/graph/run.js.map +1 -1
  269. package/dist/sdk/index.d.ts +4 -1
  270. package/dist/sdk/index.js +5 -2
  271. package/dist/sdk/index.js.map +1 -1
  272. package/dist/sdk/ownership-source.d.ts +2 -0
  273. package/dist/sdk/ownership-source.js +22 -0
  274. package/dist/sdk/ownership-source.js.map +1 -0
  275. package/dist/sdk/relationship-history.d.ts +38 -0
  276. package/dist/sdk/relationship-history.js +60 -2
  277. package/dist/sdk/relationship-history.js.map +1 -1
  278. package/dist/sdk/relationships.js +49 -8
  279. package/dist/sdk/relationships.js.map +1 -1
  280. package/dist/sdk/runtime-input.js +3 -2
  281. package/dist/sdk/runtime-input.js.map +1 -1
  282. package/dist/sdk/runtime.d.ts +2 -0
  283. package/dist/sdk/runtime.js +19 -2
  284. package/dist/sdk/runtime.js.map +1 -1
  285. package/dist/sdk/tracker-root-discovery.d.ts +6 -0
  286. package/dist/sdk/tracker-root-discovery.js +10 -0
  287. package/dist/sdk/tracker-root-discovery.js.map +1 -0
  288. package/dist/sdk/workspace-transaction.d.ts +83 -0
  289. package/dist/sdk/workspace-transaction.js +364 -0
  290. package/dist/sdk/workspace-transaction.js.map +1 -0
  291. package/docs/AGENT_UX_CONTRACTS.md +41 -0
  292. package/docs/EXTENSIONS.md +4 -4
  293. package/docs/README.md +1 -0
  294. package/docs/SDK.md +102 -1
  295. package/marketplace.json +2 -2
  296. package/package.json +1 -1
  297. package/packages/pm-beads/package.json +1 -1
  298. package/packages/pm-calendar/package.json +1 -1
  299. package/packages/pm-command-kit/package.json +1 -1
  300. package/packages/pm-governance-audit/package.json +1 -1
  301. package/packages/pm-guide-shell/package.json +1 -1
  302. package/packages/pm-kanban/package.json +1 -1
  303. package/packages/pm-lifecycle-hooks/package.json +1 -1
  304. package/packages/pm-linked-test-adapters/package.json +1 -1
  305. package/packages/pm-search-advanced/package.json +1 -1
  306. package/packages/pm-templates/package.json +1 -1
  307. package/packages/pm-todos/package.json +1 -1
  308. package/packages/pm-vcs/GAP_REPORT.md +31 -0
  309. package/packages/pm-vcs/README.md +62 -0
  310. package/packages/pm-vcs/extensions/vcs/index.ts +745 -0
  311. package/packages/pm-vcs/extensions/vcs/manifest.json +19 -0
  312. package/packages/pm-vcs/extensions/vcs/package.json +3 -0
  313. package/packages/pm-vcs/package.json +55 -0
  314. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  315. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  316. package/dist/cli-bundle/chunks/append-JHO5K6RP.js +0 -11
  317. package/dist/cli-bundle/chunks/chunk-2BX74BAS.js +0 -125
  318. package/dist/cli-bundle/chunks/chunk-2BX74BAS.js.map +0 -7
  319. package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js +0 -672
  320. package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js.map +0 -7
  321. package/dist/cli-bundle/chunks/chunk-5UKQLQM2.js.map +0 -1
  322. package/dist/cli-bundle/chunks/chunk-6VHUGVNP.js.map +0 -1
  323. package/dist/cli-bundle/chunks/chunk-74FKFFXO.js +0 -172
  324. package/dist/cli-bundle/chunks/chunk-74FKFFXO.js.map +0 -7
  325. package/dist/cli-bundle/chunks/chunk-ADXDCAKP.js.map +0 -7
  326. package/dist/cli-bundle/chunks/chunk-BAP7G3N2.js +0 -178
  327. package/dist/cli-bundle/chunks/chunk-BAP7G3N2.js.map +0 -7
  328. package/dist/cli-bundle/chunks/chunk-D53RTYVI.js.map +0 -7
  329. package/dist/cli-bundle/chunks/chunk-DHNG452T.js.map +0 -7
  330. package/dist/cli-bundle/chunks/chunk-EY7ZE3TG.js +0 -1831
  331. package/dist/cli-bundle/chunks/chunk-EY7ZE3TG.js.map +0 -1
  332. package/dist/cli-bundle/chunks/chunk-F3VC3GOV.js.map +0 -7
  333. package/dist/cli-bundle/chunks/chunk-FL4D53ND.js +0 -162
  334. package/dist/cli-bundle/chunks/chunk-FL4D53ND.js.map +0 -1
  335. package/dist/cli-bundle/chunks/chunk-GKPCTQYG.js.map +0 -7
  336. package/dist/cli-bundle/chunks/chunk-HPAYDSR2.js.map +0 -7
  337. package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +0 -1
  338. package/dist/cli-bundle/chunks/chunk-I3INI567.js.map +0 -7
  339. package/dist/cli-bundle/chunks/chunk-KX62NMZC.js.map +0 -1
  340. package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js +0 -662
  341. package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js.map +0 -1
  342. package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +0 -7
  343. package/dist/cli-bundle/chunks/chunk-OGVTB5VO.js.map +0 -7
  344. package/dist/cli-bundle/chunks/chunk-QPGQNLPI.js.map +0 -1
  345. package/dist/cli-bundle/chunks/chunk-QRZNCRNA.js.map +0 -1
  346. package/dist/cli-bundle/chunks/chunk-RC4UOUXA.js +0 -122
  347. package/dist/cli-bundle/chunks/chunk-RC4UOUXA.js.map +0 -1
  348. package/dist/cli-bundle/chunks/chunk-RTBX3C4C.js +0 -1841
  349. package/dist/cli-bundle/chunks/chunk-RTBX3C4C.js.map +0 -7
  350. package/dist/cli-bundle/chunks/chunk-SIPOACV5.js.map +0 -1
  351. package/dist/cli-bundle/chunks/chunk-WACRQ26A.js.map +0 -7
  352. package/dist/cli-bundle/chunks/chunk-XC2HEEOV.js.map +0 -1
  353. package/dist/cli-bundle/chunks/chunk-XPUTSGJU.js.map +0 -1
  354. package/dist/cli-bundle/chunks/chunk-YIIIAKCE.js.map +0 -1
  355. package/dist/cli-bundle/chunks/chunk-YJSURTBB.js +0 -175
  356. package/dist/cli-bundle/chunks/chunk-YJSURTBB.js.map +0 -1
  357. package/dist/cli-bundle/chunks/chunk-YQEZWI3R.js.map +0 -7
  358. package/dist/cli-bundle/chunks/close-GPD7DTJV.js +0 -12
  359. package/dist/cli-bundle/chunks/close-many-NQLYGPYW.js +0 -23
  360. package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +0 -13
  361. package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +0 -9
  362. package/dist/cli-bundle/chunks/create-KOGQ3JKD.js +0 -27
  363. package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +0 -10
  364. package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +0 -14
  365. package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +0 -10
  366. package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +0 -16
  367. package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +0 -16
  368. package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +0 -13
  369. package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +0 -13
  370. package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +0 -24
  371. package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +0 -14
  372. package/dist/cli-bundle/chunks/update-XZJYS5X7.js +0 -21
  373. package/dist/cli-bundle/chunks/update-many-R24B3GBK.js +0 -36
  374. package/dist/cli-bundle/chunks/update-many-WQ3R3J6N.js +0 -32
  375. /package/dist/cli-bundle/chunks/{append-5YF3TO7I.js.map → append-MBXHNWSX.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{append-JHO5K6RP.js.map → append-XUYF7NON.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-BIRYX32V.js.map → chunk-2UCG5H6B.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-VE6ZSTQW.js.map → chunk-2XPDCXK5.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-GLZKZON6.js.map → chunk-3HSRP6T2.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-XWBD6DSR.js.map → chunk-3KPNOZOH.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-HO4DLBNK.js.map → chunk-4M6RZJXF.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-RXPQ5Q23.js.map → chunk-4PSJVGRE.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{chunk-YFE7JHX3.js.map → chunk-6BNV3G6C.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{chunk-43UMFKCK.js.map → chunk-6V4T4RD3.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-EHJFUOXL.js.map → chunk-7B7IHMLH.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-I7DIDUSP.js.map → chunk-7CHWLT2J.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-L6FVNR7X.js.map → chunk-A3GAQLBH.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-B57RJHBZ.js.map → chunk-A4FVWFZY.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{chunk-D52ZN3BF.js.map → chunk-A5EQPNV7.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-TZAE66GQ.js.map → chunk-AGEBQRBG.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-WU3KAN6A.js.map → chunk-AQUNTB7G.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-XWYQ2LT4.js.map → chunk-BBGR4FKQ.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-2FUOXSRN.js.map → chunk-BFJP4VYC.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-633PKXLT.js.map → chunk-BZKE2O5V.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-L337QKWJ.js.map → chunk-DUDLSQFG.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-BVLOMU6O.js.map → chunk-E7KBMWEF.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-WQXRZMFN.js.map → chunk-EEECAV5M.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-35FHWD4C.js.map → chunk-EI3UIMZM.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{chunk-PT7MCCGD.js.map → chunk-FIUTBFC6.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{chunk-7H5NNCJ5.js.map → chunk-FQF6VVPH.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{chunk-6DYOZS6C.js.map → chunk-FQO5THHM.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{chunk-5HGZKQUL.js.map → chunk-FQODDTE7.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{chunk-67RO3H4N.js.map → chunk-G33XIMRT.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{chunk-QWBKN3QC.js.map → chunk-GKCEEXMA.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{chunk-DG2EQRIH.js.map → chunk-GRDK25BN.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{chunk-FXFCFL73.js.map → chunk-H3YKUVDR.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{chunk-ARGDWQ4J.js.map → chunk-IGBBTPM5.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{chunk-FY4RLHSC.js.map → chunk-IRJ6F23W.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{chunk-66MKH7SZ.js.map → chunk-IXG5CMBR.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{chunk-7UCY6DR5.js.map → chunk-JPWUZOMR.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{chunk-FVNWHUME.js.map → chunk-K2L6FZBX.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{chunk-X2MGQMZO.js.map → chunk-LT5UWU7H.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{chunk-KH6QAHME.js.map → chunk-M4B4RK4J.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{chunk-2XOSFSTH.js.map → chunk-MQOSMBWV.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{chunk-7R6UIHYY.js.map → chunk-N2TEEOXJ.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{chunk-NTRQLE2R.js.map → chunk-N7FCFJ76.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{chunk-37DRDP2B.js.map → chunk-NPEYH6CE.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-2CXL335K.js.map → chunk-OK7VSX3N.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-NNANAWFH.js.map → chunk-OKPZDH43.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-G6MYGULG.js.map → chunk-OKWJUL6F.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-D5XHO4Q7.js.map → chunk-Q6JPYR7I.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-IE5KRAKN.js.map → chunk-QQ77W23U.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-M7MVOKVV.js.map → chunk-QYGK2XQ3.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-X5YCTFKT.js.map → chunk-RWAIRGBC.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-W5E2UUSH.js.map → chunk-RX53WHFI.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-R5XTTZSJ.js.map → chunk-SBW7EQC4.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-TM5CIO3F.js.map → chunk-SGJB6PXA.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-DDFGYUCQ.js.map → chunk-STBCBDKF.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-FHOBCGQO.js.map → chunk-SVAWG7EE.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-6O44IN44.js.map → chunk-T6MOTLOJ.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-EWIT5WIC.js.map → chunk-U6RYD446.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-E4FXM2XB.js.map → chunk-UE7LK3RE.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-N33FD2UI.js.map → chunk-UNNCT5QY.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-2IPNL3DR.js.map → chunk-UOIFZ66L.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-LSOWTLEM.js.map → chunk-UU6EP25G.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-HYTOJW2Q.js.map → chunk-UW6HCMP2.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-47HXN6RX.js.map → chunk-UWAQI3B7.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-YKFHF37B.js.map → chunk-V4QHAMI5.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-VAHZIPWS.js.map → chunk-VA3H7VVC.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-TLWJP5BF.js.map → chunk-VQOG2ETB.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-H5IOT54C.js.map → chunk-VSQE43NO.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-BDA35QG5.js.map → chunk-W6IEJXNC.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-OWP6QFBV.js.map → chunk-XDWXPG2E.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-CKX4WOPC.js.map → chunk-XKVHL3MB.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-WL3SS45P.js.map → chunk-XVB6BATY.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-NVZ6NVHJ.js.map → chunk-XXWDEQ6O.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-ILVOOAT4.js.map → chunk-Y2VSGFT4.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-NCVT6XEL.js.map → chunk-YG56M3NE.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-AFGKSHAM.js.map → chunk-YGEA4CLH.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{chunk-AXRT7K5V.js.map → chunk-YIC5NGXF.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{chunk-XXLXJL7V.js.map → chunk-ZUCBPXNA.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{close-X3CF6FQP.js.map → close-7NWA3GLA.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{close-GPD7DTJV.js.map → close-ZZCDDWJT.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{close-many-NQLYGPYW.js.map → close-many-QCZHFCON.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{close-many-J7A5EHOQ.js.map → close-many-YALQ7AXS.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{comments-2AOZQ5D2.js.map → comments-FMQNYPSZ.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{comments-TMHMALA5.js.map → comments-SQIQ5WYR.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{copy-N3LCQBMC.js.map → copy-GI3RCVZP.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{copy-FWQA5OU4.js.map → copy-YDAMENCP.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{create-AQ5SIGZC.js.map → create-JSL6CXU3.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{create-KOGQ3JKD.js.map → create-LXMLYJNM.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{delete-6G3MBZ6S.js.map → delete-5DFAXJNI.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{delete-YYYFOSEA.js.map → delete-IGVOZEU2.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{deps-NIIKXLPB.js.map → deps-BQAXUQAK.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{deps-MQ4ZIGZB.js.map → deps-CBPPSS6J.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{docs-OWRGDMNY.js.map → docs-KCWPLQOV.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{docs-53NUGMIQ.js.map → docs-NS2AZWCN.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{files-3PXGXYDB.js.map → files-PVWEPT5J.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{files-EGLKHD7O.js.map → files-XUUBQ76I.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{focus-KZLIA6WS.js.map → focus-3EJVFI3D.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{focus-SRPASFTN.js.map → focus-DHBHKK3E.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{history-compact-G4DULDCX.js.map → history-compact-3TNPYVFG.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{history-compact-HHIUOMZ7.js.map → history-compact-JHYVDYLW.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{history-redact-IUSJ6X3E.js.map → history-redact-ELRL73XN.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{history-redact-THHGRQXV.js.map → history-redact-KKFDICCF.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{history-repair-LUQWRS7X.js.map → history-repair-J7WKZFAG.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{history-repair-KG7SWXI6.js.map → history-repair-REMI7DDI.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{learnings-ZVHSALJY.js.map → learnings-O6V5WDCV.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{learnings-2MRNBFJF.js.map → learnings-X4D6JCCG.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{notes-73JWKWUD.js.map → notes-UQC6VS6N.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{notes-BAKUL5DJ.js.map → notes-ZSZREWZA.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{plan-AZPMCG37.js.map → plan-5GKRBJJO.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{plan-LEAGLPGP.js.map → plan-EZW2YDDY.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{profile-AVCIIZID.js.map → profile-5PQAPCLF.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{profile-LFYO3HHX.js.map → profile-CW4BD3FO.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{register-list-query-UKMF55FT.js.map → register-list-query-HTDQE6VI.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{register-list-query-MZUF2EEC.js.map → register-list-query-PHIPDFP2.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{register-mutation-T6RVNJC4.js.map → register-mutation-BLEWM5I6.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{register-mutation-2PBW2GEX.js.map → register-mutation-OTYHR7J6.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{restore-KIUYTAEJ.js.map → restore-A55MLFAI.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{restore-E3PRGDN3.js.map → restore-HEQAG6EK.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{schema-5JNFQFUW.js.map → schema-MAXAIHEC.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{schema-TMIW4XZC.js.map → schema-Q5DAWJ2S.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{update-XZJYS5X7.js.map → update-5DTSCWVF.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{update-SQYZA3ZW.js.map → update-DWFXXJKP.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{update-many-WQ3R3J6N.js.map → update-many-6T4ZLZS7.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{update-many-R24B3GBK.js.map → update-many-MYRK6VBJ.js.map} +0 -0
@@ -1,38 +1,29 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f34a834c-7c67-555c-a8b0-6c26e7d8c12a")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="36449c46-4651-5a6f-93c6-1065305d35d8")}catch(e){}}();
3
+ import {
4
+ EXECUTABLE_COMMAND_ALIASES,
5
+ PM_CORE_COMMAND_NAMES
6
+ } from "./chunk-JPWUZOMR.js";
3
7
  import {
4
8
  ensureTypeFolderScaffold
5
- } from "./chunk-FXFCFL73.js";
9
+ } from "./chunk-H3YKUVDR.js";
6
10
  import {
7
- normalizeExtensionNameForMatch,
8
- normalizeManagedDirectoryName,
9
- normalizeStringList,
10
- parseExtensionManifest,
11
- quoteCommandArg,
12
- renderPmCommand,
13
- validateExtensionDirectory
14
- } from "./chunk-FL4D53ND.js";
11
+ splitCommaList
12
+ } from "./chunk-NETP4DY4.js";
15
13
  import {
16
14
  describeExtensionActivation,
17
15
  renderExtensionSurfaceMarkdown
18
- } from "./chunk-5UKQLQM2.js";
16
+ } from "./chunk-Q5NHJ6RO.js";
19
17
  import {
20
18
  TYPE_PRESET_NAMES,
21
19
  normalizeTypePresetName,
22
20
  resolveTypePresetDefinitions
23
- } from "./chunk-N33FD2UI.js";
24
- import {
25
- EXECUTABLE_COMMAND_ALIASES,
26
- PM_CORE_COMMAND_NAMES
27
- } from "./chunk-7UCY6DR5.js";
21
+ } from "./chunk-UNNCT5QY.js";
28
22
  import {
29
23
  parseItemTypesFile,
30
24
  serializeItemTypesFile,
31
25
  upsertItemType
32
- } from "./chunk-ARGDWQ4J.js";
33
- import {
34
- splitCommaList
35
- } from "./chunk-NETP4DY4.js";
26
+ } from "./chunk-IGBBTPM5.js";
36
27
  import {
37
28
  createSerialQueue,
38
29
  getActiveExtensionRegistrations,
@@ -41,8 +32,9 @@ import {
41
32
  readSettings,
42
33
  runActiveOnWriteHooks,
43
34
  writeSettings
44
- } from "./chunk-P22HGFFI.js";
35
+ } from "./chunk-QFG4MB7P.js";
45
36
  import {
37
+ DEFAULT_EXTENSION_PRIORITY,
46
38
  DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
47
39
  EXIT_CODE,
48
40
  EXTENSION_CAPABILITY_CONTRACT,
@@ -55,6 +47,7 @@ import {
55
47
  ensureRuntimeSchemaFileScaffold,
56
48
  filePathForSchemaSection,
57
49
  getSettingsPath,
50
+ isCanonicalPathWithinDirectory,
58
51
  isPathWithinDirectory,
59
52
  levenshteinDistanceWithinLimit,
60
53
  loadExtensions,
@@ -71,11 +64,81 @@ import {
71
64
  resolvePmPackageRootFromModule,
72
65
  resolvePmRoot,
73
66
  writeFileAtomic
74
- } from "./chunk-KX62NMZC.js";
67
+ } from "./chunk-D35WYXWC.js";
68
+
69
+ // dist/sdk/workspace.js
70
+ import { readFile, writeFile } from "node:fs/promises";
71
+ import path from "node:path";
72
+ var PM_GITIGNORE_START = "# pm-cli:runtime-cache:start";
73
+ var PM_GITIGNORE_END = "# pm-cli:runtime-cache:end";
74
+ var PM_GITIGNORE_BLOCK = [
75
+ PM_GITIGNORE_START,
76
+ ".agents/pm/runtime/",
77
+ ".agents/pm/search/",
78
+ ".agents/pm/locks/",
79
+ PM_GITIGNORE_END
80
+ ].join("\n");
81
+ function getPmGitignoreBlock() {
82
+ return PM_GITIGNORE_BLOCK;
83
+ }
84
+ async function ensurePmGitignore(workspaceRoot) {
85
+ const gitignorePath = path.join(workspaceRoot, ".gitignore");
86
+ let current = "";
87
+ try {
88
+ current = await readFile(gitignorePath, "utf8");
89
+ } catch (error) {
90
+ if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) {
91
+ throw error;
92
+ }
93
+ }
94
+ const start = current.indexOf(PM_GITIGNORE_START);
95
+ const end = current.indexOf(PM_GITIGNORE_END);
96
+ const withoutManagedBlock = start >= 0 && end >= start ? `${current.slice(0, start)}${current.slice(end + PM_GITIGNORE_END.length)}` : current;
97
+ const prefix = withoutManagedBlock.trimEnd();
98
+ const next = `${prefix.length > 0 ? `${prefix}
99
+
100
+ ` : ""}${PM_GITIGNORE_BLOCK}
101
+ `;
102
+ if (next === current) {
103
+ return { path: gitignorePath, changed: false };
104
+ }
105
+ await writeFile(gitignorePath, next, "utf8");
106
+ return { path: gitignorePath, changed: true };
107
+ }
108
+
109
+ // dist/sdk/command-line.js
110
+ var quoteWindowsCommandArg = (arg) => {
111
+ let escaped = '"';
112
+ let pendingBackslashes = 0;
113
+ for (const character of arg) {
114
+ if (character === "\\") {
115
+ pendingBackslashes += 1;
116
+ continue;
117
+ }
118
+ escaped += "\\".repeat(character === '"' ? pendingBackslashes * 2 + 1 : pendingBackslashes);
119
+ escaped += character;
120
+ pendingBackslashes = 0;
121
+ }
122
+ return `${escaped}${"\\".repeat(pendingBackslashes * 2)}"`;
123
+ };
124
+ var quoteCommandArg = (arg, platform = process.platform) => {
125
+ const safePattern = platform === "win32" ? /^[A-Za-z0-9._:/\\@=-]+$/ : /^[A-Za-z0-9._:/@=-]+$/;
126
+ if (safePattern.test(arg)) {
127
+ return arg;
128
+ }
129
+ if (platform === "win32") {
130
+ return quoteWindowsCommandArg(arg);
131
+ }
132
+ return `"${arg.replace(/(["\\$`])/g, "\\$1")}"`;
133
+ };
134
+ var renderPmCommand = (argv, platform = process.platform) => {
135
+ const args = argv.map((token) => quoteCommandArg(token, platform)).join(" ");
136
+ return args.length > 0 ? `pm ${args}` : "pm";
137
+ };
75
138
 
76
139
  // dist/core/packages/manifest.js
77
140
  import fs from "node:fs/promises";
78
- import path from "node:path";
141
+ import path2 from "node:path";
79
142
  var PM_PACKAGE_RESOURCE_KINDS = [
80
143
  "extensions",
81
144
  "docs",
@@ -193,7 +256,7 @@ function normalizePackageCatalogMetadata(raw) {
193
256
  return Object.values(catalog).some((value) => value !== void 0) ? catalog : void 0;
194
257
  }
195
258
  async function readPmPackageManifest(packageRoot) {
196
- const packageJsonPath = path.join(packageRoot, "package.json");
259
+ const packageJsonPath = path2.join(packageRoot, "package.json");
197
260
  if (!await pathExists(packageJsonPath)) {
198
261
  return {
199
262
  source: "convention",
@@ -239,15 +302,15 @@ async function listExtensionManifestDirectories(parentDirectory) {
239
302
  if (!entry.isDirectory()) {
240
303
  continue;
241
304
  }
242
- const directory = path.join(parentDirectory, entry.name);
243
- if (await pathExists(path.join(directory, "manifest.json"))) {
305
+ const directory = path2.join(parentDirectory, entry.name);
306
+ if (await pathExists(path2.join(directory, "manifest.json"))) {
244
307
  candidates.push(directory);
245
308
  }
246
309
  }
247
310
  return candidates.sort((left, right) => left.localeCompare(right));
248
311
  }
249
312
  async function collectPackageExtensionDirectories(packageRoot) {
250
- if (await pathExists(path.join(packageRoot, "manifest.json"))) {
313
+ if (await pathExists(path2.join(packageRoot, "manifest.json"))) {
251
314
  return [packageRoot];
252
315
  }
253
316
  const manifest = await readPmPackageManifest(packageRoot);
@@ -257,11 +320,11 @@ async function collectPackageExtensionDirectories(packageRoot) {
257
320
  if (entry.includes("*") || entry.startsWith("!")) {
258
321
  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);
259
322
  }
260
- const absolute = path.resolve(packageRoot, entry);
323
+ const absolute = path2.resolve(packageRoot, entry);
261
324
  if (!isPathWithinDirectory(packageRoot, absolute)) {
262
325
  throw new PmCliError(`Package extension entry "${entry}" resolves outside package root.`, EXIT_CODE.USAGE);
263
326
  }
264
- if (await pathExists(path.join(absolute, "manifest.json"))) {
327
+ if (await pathExists(path2.join(absolute, "manifest.json"))) {
265
328
  discovered.add(absolute);
266
329
  continue;
267
330
  }
@@ -271,7 +334,7 @@ async function collectPackageExtensionDirectories(packageRoot) {
271
334
  }
272
335
  if (manifestEntries.length === 0) {
273
336
  for (const root of PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS.extensions) {
274
- for (const child of await listExtensionManifestDirectories(path.join(packageRoot, root))) {
337
+ for (const child of await listExtensionManifestDirectories(path2.join(packageRoot, root))) {
275
338
  discovered.add(child);
276
339
  }
277
340
  }
@@ -280,8 +343,118 @@ async function collectPackageExtensionDirectories(packageRoot) {
280
343
  }
281
344
 
282
345
  // dist/sdk/extension/scaffold.js
346
+ import fs3 from "node:fs/promises";
347
+ import path4 from "node:path";
348
+
349
+ // dist/sdk/extension/shared.js
283
350
  import fs2 from "node:fs/promises";
284
- import path2 from "node:path";
351
+ import path3 from "node:path";
352
+ function normalizeStringList(values) {
353
+ return [
354
+ ...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))
355
+ ].sort((left, right) => left.localeCompare(right));
356
+ }
357
+ function normalizeExtensionNameForMatch(value) {
358
+ return value.trim().toLowerCase();
359
+ }
360
+ function normalizeManagedDirectoryName(name) {
361
+ const normalized = name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-");
362
+ let start = 0;
363
+ while (normalized[start] === "-") {
364
+ start += 1;
365
+ }
366
+ let end = normalized.length;
367
+ while (end > start && normalized[end - 1] === "-") {
368
+ end -= 1;
369
+ }
370
+ const directoryName = normalized.slice(start, end);
371
+ if (directoryName.length === 0) {
372
+ throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.", EXIT_CODE.USAGE);
373
+ }
374
+ if (directoryName === "." || directoryName === "..") {
375
+ throw new PmCliError('Extension manifest name must not resolve to "." or "..".', EXIT_CODE.USAGE);
376
+ }
377
+ return directoryName;
378
+ }
379
+ function parseOptionalManifestPriority(value) {
380
+ if (value === void 0 || value === null) {
381
+ return DEFAULT_EXTENSION_PRIORITY;
382
+ }
383
+ return typeof value === "number" && Number.isInteger(value) ? value : null;
384
+ }
385
+ function parseOptionalManifestCapabilities(value) {
386
+ if (value === void 0 || value === null) {
387
+ return [];
388
+ }
389
+ if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) {
390
+ return null;
391
+ }
392
+ return normalizeStringList(value.map((entry) => String(entry).toLowerCase()));
393
+ }
394
+ function parseExtensionManifest(raw) {
395
+ if (typeof raw !== "object" || raw === null) {
396
+ return null;
397
+ }
398
+ const candidate = raw;
399
+ if (typeof candidate.name !== "string" || candidate.name.trim().length === 0) {
400
+ return null;
401
+ }
402
+ if (typeof candidate.version !== "string" || candidate.version.trim().length === 0) {
403
+ return null;
404
+ }
405
+ if (typeof candidate.entry !== "string" || candidate.entry.trim().length === 0) {
406
+ return null;
407
+ }
408
+ const priority = parseOptionalManifestPriority(candidate.priority);
409
+ const capabilities = parseOptionalManifestCapabilities(candidate.capabilities);
410
+ if (priority === null || capabilities === null) {
411
+ return null;
412
+ }
413
+ return {
414
+ name: candidate.name.trim(),
415
+ version: candidate.version.trim(),
416
+ entry: candidate.entry.trim(),
417
+ priority,
418
+ capabilities
419
+ };
420
+ }
421
+ async function validateExtensionDirectory(directory) {
422
+ const manifestPath = path3.join(directory, "manifest.json");
423
+ if (!await pathExists(manifestPath)) {
424
+ throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`, EXIT_CODE.USAGE);
425
+ }
426
+ let parsedManifest;
427
+ try {
428
+ parsedManifest = JSON.parse(await fs2.readFile(manifestPath, "utf8"));
429
+ } catch (error) {
430
+ throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${formatManifestReadError(error)}`, EXIT_CODE.USAGE);
431
+ }
432
+ const manifest = parseExtensionManifest(parsedManifest);
433
+ if (!manifest) {
434
+ throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`, EXIT_CODE.USAGE);
435
+ }
436
+ const entryPath = path3.resolve(directory, manifest.entry);
437
+ if (!isPathWithinDirectory(directory, entryPath)) {
438
+ throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`, EXIT_CODE.USAGE);
439
+ }
440
+ if (!await pathExists(entryPath)) {
441
+ throw new PmCliError(`Extension entry file is missing at "${entryPath}".`, EXIT_CODE.USAGE);
442
+ }
443
+ if (!await isCanonicalPathWithinDirectory(directory, entryPath)) {
444
+ throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`, EXIT_CODE.USAGE);
445
+ }
446
+ return {
447
+ directory,
448
+ manifest_path: manifestPath,
449
+ entry_path: entryPath,
450
+ manifest
451
+ };
452
+ }
453
+ function formatManifestReadError(error) {
454
+ return error instanceof Error ? error.message : String(error);
455
+ }
456
+
457
+ // dist/sdk/extension/scaffold.js
285
458
  var SCAFFOLD_MANIFEST_VERSION = 1;
286
459
  var SCAFFOLD_PM_MIN_VERSION = "2026.6.24";
287
460
  var SCAFFOLD_NODE_ENGINE = ">=22.18.0";
@@ -2385,33 +2558,33 @@ async function scaffoldExtensionProject(target, vocabulary = "extension", capabi
2385
2558
  }
2386
2559
  const style = declarative ? "declarative" : "imperative";
2387
2560
  const normalizedTarget = target.trim();
2388
- const targetPath = path2.resolve(process.cwd(), normalizedTarget);
2389
- const extensionName = normalizeManagedDirectoryName(path2.basename(targetPath));
2561
+ const targetPath = path4.resolve(process.cwd(), normalizedTarget);
2562
+ const extensionName = normalizeManagedDirectoryName(path4.basename(targetPath));
2390
2563
  const commandName = buildScaffoldCommandName(extensionName);
2391
2564
  const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary, resolvedCapability, declarative);
2392
2565
  let createdDirectory = false;
2393
2566
  if (await pathExists(targetPath)) {
2394
- const existingTargetStats = await fs2.stat(targetPath);
2567
+ const existingTargetStats = await fs3.stat(targetPath);
2395
2568
  if (!existingTargetStats.isDirectory()) {
2396
2569
  throw new PmCliError(`Scaffold target "${targetPath}" exists and is not a directory.`, EXIT_CODE.CONFLICT);
2397
2570
  }
2398
2571
  } else {
2399
- await fs2.mkdir(targetPath, { recursive: true });
2572
+ await fs3.mkdir(targetPath, { recursive: true });
2400
2573
  createdDirectory = true;
2401
2574
  }
2402
2575
  for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
2403
- const absolutePath = path2.join(targetPath, relativePath);
2576
+ const absolutePath = path4.join(targetPath, relativePath);
2404
2577
  if (!await pathExists(absolutePath)) {
2405
2578
  continue;
2406
2579
  }
2407
- const existingContent = await fs2.readFile(absolutePath, "utf8");
2580
+ const existingContent = await fs3.readFile(absolutePath, "utf8");
2408
2581
  if (existingContent !== content) {
2409
2582
  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);
2410
2583
  }
2411
2584
  }
2412
2585
  const files = [];
2413
2586
  for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
2414
- const absolutePath = path2.join(targetPath, relativePath);
2587
+ const absolutePath = path4.join(targetPath, relativePath);
2415
2588
  if (await pathExists(absolutePath)) {
2416
2589
  files.push({
2417
2590
  path: relativePath,
@@ -2419,8 +2592,8 @@ async function scaffoldExtensionProject(target, vocabulary = "extension", capabi
2419
2592
  });
2420
2593
  continue;
2421
2594
  }
2422
- await fs2.mkdir(path2.dirname(absolutePath), { recursive: true });
2423
- await fs2.writeFile(absolutePath, content, "utf8");
2595
+ await fs3.mkdir(path4.dirname(absolutePath), { recursive: true });
2596
+ await fs3.writeFile(absolutePath, content, "utf8");
2424
2597
  files.push({
2425
2598
  path: relativePath,
2426
2599
  status: "created"
@@ -2507,16 +2680,16 @@ function renderExtensionDescribeMarkdown(result, noun) {
2507
2680
  }
2508
2681
 
2509
2682
  // dist/sdk/extension.js
2510
- import fs8 from "node:fs/promises";
2511
- import path8 from "node:path";
2683
+ import fs9 from "node:fs/promises";
2684
+ import path10 from "node:path";
2512
2685
 
2513
2686
  // dist/sdk/extension/managed-state.js
2514
- import fs3 from "node:fs/promises";
2515
- import path3 from "node:path";
2687
+ import fs4 from "node:fs/promises";
2688
+ import path5 from "node:path";
2516
2689
  var MANAGED_EXTENSION_STATE_FILENAME = ".managed-extensions.json";
2517
2690
  var MANAGED_EXTENSION_STATE_VERSION = 1;
2518
2691
  function resolveManagedExtensionStatePath(extensionsRoot) {
2519
- return path3.join(extensionsRoot, MANAGED_EXTENSION_STATE_FILENAME);
2692
+ return path5.join(extensionsRoot, MANAGED_EXTENSION_STATE_FILENAME);
2520
2693
  }
2521
2694
  function createEmptyManagedExtensionState() {
2522
2695
  return {
@@ -2635,7 +2808,7 @@ async function readManagedExtensionState(extensionsRoot) {
2635
2808
  const statePath = resolveManagedExtensionStatePath(extensionsRoot);
2636
2809
  const fallback = createEmptyManagedExtensionState();
2637
2810
  try {
2638
- const raw = await fs3.readFile(statePath, "utf8");
2811
+ const raw = await fs4.readFile(statePath, "utf8");
2639
2812
  const parsed = JSON.parse(raw);
2640
2813
  const normalized = normalizeManagedState(parsed);
2641
2814
  if (!normalized) {
@@ -2667,8 +2840,8 @@ async function writeManagedExtensionState(extensionsRoot, state) {
2667
2840
  updated_at: nowIso(),
2668
2841
  entries: sortManagedEntries(state.entries)
2669
2842
  };
2670
- await fs3.mkdir(extensionsRoot, { recursive: true });
2671
- await fs3.writeFile(statePath, `${JSON.stringify(normalized, null, 2)}
2843
+ await fs4.mkdir(extensionsRoot, { recursive: true });
2844
+ await fs4.writeFile(statePath, `${JSON.stringify(normalized, null, 2)}
2672
2845
  `, "utf8");
2673
2846
  }
2674
2847
  function upsertManagedEntry(state, entry) {
@@ -2683,15 +2856,15 @@ function upsertManagedEntry(state, entry) {
2683
2856
 
2684
2857
  // dist/sdk/extension/install-sources.js
2685
2858
  import { execFile } from "node:child_process";
2686
- import fs5 from "node:fs/promises";
2859
+ import fs6 from "node:fs/promises";
2687
2860
  import os from "node:os";
2688
- import path5 from "node:path";
2861
+ import path7 from "node:path";
2689
2862
  import { fileURLToPath } from "node:url";
2690
2863
  import { promisify } from "node:util";
2691
2864
 
2692
2865
  // dist/sdk/extension/bundled-catalog.js
2693
- import fs4 from "node:fs/promises";
2694
- import path4 from "node:path";
2866
+ import fs5 from "node:fs/promises";
2867
+ import path6 from "node:path";
2695
2868
  var PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
2696
2869
  var LEGACY_BUNDLED_PACKAGE_ALIASES = {
2697
2870
  beads: {
@@ -2708,7 +2881,7 @@ function resolvePackageRootCandidates() {
2708
2881
  const candidates = [];
2709
2882
  const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
2710
2883
  if (typeof envRoot === "string" && envRoot.trim().length > 0) {
2711
- candidates.push(path4.resolve(envRoot.trim()));
2884
+ candidates.push(path6.resolve(envRoot.trim()));
2712
2885
  }
2713
2886
  candidates.push(resolvePmPackageRootFromModule(import.meta.url, ["../../.."]));
2714
2887
  return [...new Set(candidates)];
@@ -2724,8 +2897,8 @@ async function resolveBundledExtensionAliasSource(input3) {
2724
2897
  return null;
2725
2898
  }
2726
2899
  for (const packageRoot2 of resolvePackageRootCandidates()) {
2727
- const legacyExtensionPath = path4.join(packageRoot2, ".agents", "pm", "extensions", alias.legacy_extension_directory);
2728
- if (await pathExists(path4.join(legacyExtensionPath, "manifest.json"))) {
2900
+ const legacyExtensionPath = path6.join(packageRoot2, ".agents", "pm", "extensions", alias.legacy_extension_directory);
2901
+ if (await pathExists(path6.join(legacyExtensionPath, "manifest.json"))) {
2729
2902
  return legacyExtensionPath;
2730
2903
  }
2731
2904
  }
@@ -2738,13 +2911,13 @@ function derivePackageAlias(packageDirectory) {
2738
2911
  return packageDirectory.replace(/^pm-/i, "").trim().toLowerCase();
2739
2912
  }
2740
2913
  async function collectManifestPackageEntries(packagesRoot, entriesByAlias) {
2741
- const entries = await fs4.readdir(packagesRoot, { withFileTypes: true });
2914
+ const entries = await fs5.readdir(packagesRoot, { withFileTypes: true });
2742
2915
  for (const entry of entries) {
2743
2916
  if (!entry.isDirectory() || !entry.name.startsWith("pm-")) {
2744
2917
  continue;
2745
2918
  }
2746
- const candidateRoot = path4.join(packagesRoot, entry.name);
2747
- if (!await pathExists(path4.join(candidateRoot, "package.json"))) {
2919
+ const candidateRoot = path6.join(packagesRoot, entry.name);
2920
+ if (!await pathExists(path6.join(candidateRoot, "package.json"))) {
2748
2921
  continue;
2749
2922
  }
2750
2923
  const manifest = await readPmPackageManifest(candidateRoot);
@@ -2766,7 +2939,7 @@ async function collectManifestPackageEntries(packagesRoot, entriesByAlias) {
2766
2939
  async function collectBundledPackageEntries() {
2767
2940
  const entriesByAlias = /* @__PURE__ */ new Map();
2768
2941
  for (const packageRoot of resolvePackageRootCandidates()) {
2769
- const packagesRoot = path4.join(packageRoot, "packages");
2942
+ const packagesRoot = path6.join(packageRoot, "packages");
2770
2943
  if (!await pathExists(packagesRoot)) {
2771
2944
  continue;
2772
2945
  }
@@ -2777,8 +2950,8 @@ async function collectBundledPackageEntries() {
2777
2950
  continue;
2778
2951
  }
2779
2952
  for (const packageRoot of resolvePackageRootCandidates()) {
2780
- const packagePath = path4.join(packageRoot, "packages", legacy.package_directory);
2781
- if (await pathExists(path4.join(packagePath, "package.json"))) {
2953
+ const packagePath = path6.join(packageRoot, "packages", legacy.package_directory);
2954
+ if (await pathExists(path6.join(packagePath, "package.json"))) {
2782
2955
  entriesByAlias.set(alias, {
2783
2956
  alias,
2784
2957
  package_directory: legacy.package_directory,
@@ -2841,7 +3014,7 @@ function buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installe
2841
3014
  alias: bundledEntry.alias,
2842
3015
  bundled: true,
2843
3016
  available: true,
2844
- installed: installedBuiltinAliases.has(bundledEntry.alias) || installedLocations.has(path4.resolve(bundledEntry.package_root)),
3017
+ installed: installedBuiltinAliases.has(bundledEntry.alias) || installedLocations.has(path6.resolve(bundledEntry.package_root)),
2845
3018
  install_target: bundledEntry.alias,
2846
3019
  install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,
2847
3020
  package_name: manifest.package_name,
@@ -2866,7 +3039,7 @@ async function buildBundledPackageCatalog(scope, global, options = {}) {
2866
3039
  const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());
2867
3040
  const selectedRoot = scope === "global" ? roots.global : roots.project;
2868
3041
  const managedStateRead = await readManagedExtensionState(selectedRoot);
2869
- const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) => path4.resolve(entry.source.location)));
3042
+ 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)));
2870
3043
  const installedBuiltinAliases = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope && entry.source.kind === "builtin").flatMap((entry) => [
2871
3044
  entry.source.name,
2872
3045
  entry.source.input,
@@ -3036,7 +3209,7 @@ function parseExtensionInstallSource(input3, options = {}) {
3036
3209
  return {
3037
3210
  kind: "local",
3038
3211
  input: normalizedInput,
3039
- absolute_path: path5.resolve(process.cwd(), normalizedInput)
3212
+ absolute_path: path7.resolve(process.cwd(), normalizedInput)
3040
3213
  };
3041
3214
  }
3042
3215
  async function runGitCommand(args, execRunner = execFileAsync, timeoutMs) {
@@ -3144,8 +3317,8 @@ function wrapNpmPackResolutionError(spec, error) {
3144
3317
  return new PmCliError(recovery.message, EXIT_CODE.NOT_FOUND, recovery.context);
3145
3318
  }
3146
3319
  async function resolveLocalNpmPackagePath(spec) {
3147
- if (path5.isAbsolute(spec) || spec.startsWith(".") || spec.startsWith("..")) {
3148
- const absolutePath = path5.resolve(process.cwd(), spec);
3320
+ if (path7.isAbsolute(spec) || spec.startsWith(".") || spec.startsWith("..")) {
3321
+ const absolutePath = path7.resolve(process.cwd(), spec);
3149
3322
  return await pathExists(absolutePath) ? absolutePath : null;
3150
3323
  }
3151
3324
  try {
@@ -3157,7 +3330,7 @@ async function resolveLocalNpmPackagePath(spec) {
3157
3330
  } catch {
3158
3331
  }
3159
3332
  if (!/^[a-z][a-z0-9+.-]*:/i.test(spec)) {
3160
- const absolutePath = path5.resolve(process.cwd(), spec);
3333
+ const absolutePath = path7.resolve(process.cwd(), spec);
3161
3334
  if (await pathExists(absolutePath)) {
3162
3335
  return absolutePath;
3163
3336
  }
@@ -3193,7 +3366,7 @@ function normalizeNpmLocalFileAliasSpec(spec, cwd = process.cwd()) {
3193
3366
  return spec;
3194
3367
  }
3195
3368
  if (!target.startsWith("/")) {
3196
- return `${packageName}@${path5.resolve(cwd, target)}`;
3369
+ return `${packageName}@${path7.resolve(cwd, target)}`;
3197
3370
  }
3198
3371
  let decodedPath;
3199
3372
  try {
@@ -3210,7 +3383,7 @@ function parsePackedNpmPackage(stdout, packDirectory) {
3210
3383
  const first = Array.isArray(parsed) ? parsed[0] : void 0;
3211
3384
  if (first && typeof first.filename === "string" && first.filename.trim().length > 0) {
3212
3385
  return {
3213
- tarball: path5.resolve(packDirectory, first.filename),
3386
+ tarball: path7.resolve(packDirectory, first.filename),
3214
3387
  package: typeof first.name === "string" ? first.name : void 0,
3215
3388
  version: typeof first.version === "string" ? first.version : void 0
3216
3389
  };
@@ -3222,7 +3395,7 @@ function parsePackedNpmPackage(stdout, packDirectory) {
3222
3395
  throw new PmCliError("npm pack did not report a tarball filename.", EXIT_CODE.GENERIC_FAILURE);
3223
3396
  }
3224
3397
  return {
3225
- tarball: path5.resolve(packDirectory, lastLine)
3398
+ tarball: path7.resolve(packDirectory, lastLine)
3226
3399
  };
3227
3400
  }
3228
3401
  async function resolveNpmSourceDirectory(source) {
@@ -3231,8 +3404,8 @@ async function resolveNpmSourceDirectory(source) {
3231
3404
  async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
3232
3405
  const localPackageRoot = await resolveLocalNpmPackagePath(source.spec);
3233
3406
  if (localPackageRoot) {
3234
- const packageJsonPath = path5.join(localPackageRoot, "package.json");
3235
- const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await fs5.readFile(packageJsonPath, "utf8")) : {};
3407
+ const packageJsonPath = path7.join(localPackageRoot, "package.json");
3408
+ const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await fs6.readFile(packageJsonPath, "utf8")) : {};
3236
3409
  return {
3237
3410
  directory: await resolvePackageExtensionDirectory(localPackageRoot, source.input),
3238
3411
  package: typeof packageJson.name === "string" ? packageJson.name : void 0,
@@ -3241,11 +3414,11 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
3241
3414
  }
3242
3415
  };
3243
3416
  }
3244
- const tempRoot = await fs5.mkdtemp(path5.join(os.tmpdir(), "pm-npm-package-source-"));
3245
- const packDirectory = path5.join(tempRoot, "pack");
3246
- const extractDirectory = path5.join(tempRoot, "extract");
3247
- await fs5.mkdir(packDirectory, { recursive: true });
3248
- await fs5.mkdir(extractDirectory, { recursive: true });
3417
+ const tempRoot = await fs6.mkdtemp(path7.join(os.tmpdir(), "pm-npm-package-source-"));
3418
+ const packDirectory = path7.join(tempRoot, "pack");
3419
+ const extractDirectory = path7.join(tempRoot, "extract");
3420
+ await fs6.mkdir(packDirectory, { recursive: true });
3421
+ await fs6.mkdir(extractDirectory, { recursive: true });
3249
3422
  try {
3250
3423
  const packSpec = await resolveNpmPackSpec(source.spec);
3251
3424
  const packStdout = await npmRunner([
@@ -3257,7 +3430,7 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
3257
3430
  ]);
3258
3431
  const packed = parsePackedNpmPackage(packStdout, packDirectory);
3259
3432
  await execFileAsync("tar", ["-xzf", packed.tarball, "-C", extractDirectory], { encoding: "utf8" });
3260
- const packageRoot = path5.join(extractDirectory, "package");
3433
+ const packageRoot = path7.join(extractDirectory, "package");
3261
3434
  await installNpmPackageRuntimeDependencies(packageRoot);
3262
3435
  const directory = await resolvePackageExtensionDirectory(packageRoot, source.input);
3263
3436
  return {
@@ -3265,11 +3438,11 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
3265
3438
  package: packed.package,
3266
3439
  version: packed.version,
3267
3440
  cleanup: async () => {
3268
- await fs5.rm(tempRoot, { recursive: true, force: true });
3441
+ await fs6.rm(tempRoot, { recursive: true, force: true });
3269
3442
  }
3270
3443
  };
3271
3444
  } catch (error) {
3272
- await fs5.rm(tempRoot, { recursive: true, force: true });
3445
+ await fs6.rm(tempRoot, { recursive: true, force: true });
3273
3446
  const wrappedError = wrapNpmPackResolutionError(source.spec, error);
3274
3447
  if (wrappedError) {
3275
3448
  throw wrappedError;
@@ -3278,13 +3451,13 @@ async function resolveNpmSourceDirectoryWithRunner(source, npmRunner) {
3278
3451
  }
3279
3452
  }
3280
3453
  async function installNpmPackageRuntimeDependencies(packageRoot) {
3281
- const packageJsonPath = path5.join(packageRoot, "package.json");
3454
+ const packageJsonPath = path7.join(packageRoot, "package.json");
3282
3455
  if (!await pathExists(packageJsonPath)) {
3283
3456
  return;
3284
3457
  }
3285
3458
  let parsed;
3286
3459
  try {
3287
- parsed = JSON.parse(await fs5.readFile(packageJsonPath, "utf8"));
3460
+ parsed = JSON.parse(await fs6.readFile(packageJsonPath, "utf8"));
3288
3461
  } catch {
3289
3462
  return;
3290
3463
  }
@@ -3301,12 +3474,12 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
3301
3474
  delete runtimeOnlyManifest.devDependencies;
3302
3475
  const installManifest = { ...runtimeOnlyManifest };
3303
3476
  removeHostedPmCliDependency(installManifest);
3304
- await fs5.writeFile(packageJsonPath, `${JSON.stringify(installManifest, null, 2)}
3477
+ await fs6.writeFile(packageJsonPath, `${JSON.stringify(installManifest, null, 2)}
3305
3478
  `, "utf8");
3306
3479
  try {
3307
3480
  await Promise.all([
3308
- fs5.rm(path5.join(packageRoot, "package-lock.json"), { force: true }),
3309
- fs5.rm(path5.join(packageRoot, "npm-shrinkwrap.json"), { force: true })
3481
+ fs6.rm(path7.join(packageRoot, "package-lock.json"), { force: true }),
3482
+ fs6.rm(path7.join(packageRoot, "npm-shrinkwrap.json"), { force: true })
3310
3483
  ]);
3311
3484
  if (dependencySpecs.length > 0) {
3312
3485
  await runNpmCommand([
@@ -3324,7 +3497,7 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
3324
3497
  await linkHostedPmCliDependency(packageRoot);
3325
3498
  }
3326
3499
  } finally {
3327
- await fs5.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}
3500
+ await fs6.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}
3328
3501
  `, "utf8");
3329
3502
  }
3330
3503
  }
@@ -3364,11 +3537,11 @@ async function linkHostedPmCliDependency(packageRoot) {
3364
3537
  "../../.."
3365
3538
  ]);
3366
3539
  const [scope, packageName] = PM_CLI_PACKAGE_NAME.split("/");
3367
- const scopedDirectory = path5.join(packageRoot, "node_modules", scope);
3368
- const linkPath = path5.join(scopedDirectory, packageName);
3369
- await fs5.mkdir(scopedDirectory, { recursive: true });
3370
- await fs5.rm(linkPath, { recursive: true, force: true });
3371
- await fs5.symlink(hostPackageRoot, linkPath, resolveDirectorySymlinkType(process.platform));
3540
+ const scopedDirectory = path7.join(packageRoot, "node_modules", scope);
3541
+ const linkPath = path7.join(scopedDirectory, packageName);
3542
+ await fs6.mkdir(scopedDirectory, { recursive: true });
3543
+ await fs6.rm(linkPath, { recursive: true, force: true });
3544
+ await fs6.symlink(hostPackageRoot, linkPath, resolveDirectorySymlinkType(process.platform));
3372
3545
  }
3373
3546
  function resolveDirectorySymlinkType(platform) {
3374
3547
  return platform === "win32" ? "junction" : "dir";
@@ -3398,7 +3571,7 @@ async function resolvePackageExtensionDirectory(packageRoot, sourceLabel) {
3398
3571
  return discovered[0];
3399
3572
  }
3400
3573
  if (discovered.length > 1) {
3401
- const choices = discovered.map((entry) => path5.relative(packageRoot, entry).replaceAll(path5.sep, "/")).sort((left, right) => left.localeCompare(right));
3574
+ const choices = discovered.map((entry) => path7.relative(packageRoot, entry).replaceAll(path7.sep, "/")).sort((left, right) => left.localeCompare(right));
3402
3575
  throw new PmCliError(`Package source "${sourceLabel}" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${choices.join(", ")}`, EXIT_CODE.USAGE);
3403
3576
  }
3404
3577
  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);
@@ -3407,26 +3580,26 @@ async function resolveGithubSourceDirectory(cloneDirectory, source) {
3407
3580
  const candidatePaths = [];
3408
3581
  if (source.subpath) {
3409
3582
  candidatePaths.push(source.subpath);
3410
- candidatePaths.push(path5.posix.join(".agents/pm/extensions", source.subpath));
3411
- candidatePaths.push(path5.posix.join(".custom/pm-extensions", source.subpath));
3412
- candidatePaths.push(path5.posix.join(".custom/pm-extension", source.subpath));
3583
+ candidatePaths.push(path7.posix.join(".agents/pm/extensions", source.subpath));
3584
+ candidatePaths.push(path7.posix.join(".custom/pm-extensions", source.subpath));
3585
+ candidatePaths.push(path7.posix.join(".custom/pm-extension", source.subpath));
3413
3586
  }
3414
3587
  for (const candidate of candidatePaths) {
3415
- const absolute = path5.resolve(cloneDirectory, candidate);
3588
+ const absolute = path7.resolve(cloneDirectory, candidate);
3416
3589
  if (!isPathWithinDirectory(cloneDirectory, absolute)) {
3417
3590
  continue;
3418
3591
  }
3419
- if (await pathExists(path5.join(absolute, "manifest.json"))) {
3592
+ if (await pathExists(path7.join(absolute, "manifest.json"))) {
3420
3593
  return { directory: absolute, resolved_subpath: candidate };
3421
3594
  }
3422
3595
  }
3423
- if (await pathExists(path5.join(cloneDirectory, "manifest.json"))) {
3596
+ if (await pathExists(path7.join(cloneDirectory, "manifest.json"))) {
3424
3597
  return { directory: cloneDirectory, resolved_subpath: "." };
3425
3598
  }
3426
3599
  const discoveredDirectory = await resolvePackageExtensionDirectory(cloneDirectory, source.input);
3427
3600
  return {
3428
3601
  directory: discoveredDirectory,
3429
- resolved_subpath: path5.relative(cloneDirectory, discoveredDirectory).replaceAll(path5.sep, "/")
3602
+ resolved_subpath: path7.relative(cloneDirectory, discoveredDirectory).replaceAll(path7.sep, "/")
3430
3603
  };
3431
3604
  }
3432
3605
  function looksLikeBarePackageName(input3) {
@@ -3448,7 +3621,7 @@ async function buildLocalSourceNotFoundError(source) {
3448
3621
  let bundledAliases = [];
3449
3622
  try {
3450
3623
  const envPackageRoot = process.env.PM_CLI_PACKAGE_ROOT;
3451
- const cacheKey = typeof envPackageRoot === "string" && envPackageRoot.trim().length > 0 ? path5.resolve(envPackageRoot.trim()) : "";
3624
+ const cacheKey = typeof envPackageRoot === "string" && envPackageRoot.trim().length > 0 ? path7.resolve(envPackageRoot.trim()) : "";
3452
3625
  if (bundledPackageAliasesCache?.key !== cacheKey) {
3453
3626
  bundledPackageAliasesCache = {
3454
3627
  key: cacheKey,
@@ -3482,7 +3655,7 @@ async function resolveInstallSource(source) {
3482
3655
  if (source.kind === "local") {
3483
3656
  let localStats;
3484
3657
  try {
3485
- localStats = await fs5.stat(source.absolute_path);
3658
+ localStats = await fs6.stat(source.absolute_path);
3486
3659
  } catch {
3487
3660
  throw await buildLocalSourceNotFoundError(source);
3488
3661
  }
@@ -3501,12 +3674,12 @@ async function resolveInstallSource(source) {
3501
3674
  source,
3502
3675
  directory: resolved.directory,
3503
3676
  cleanup: resolved.cleanup,
3504
- resolved_subpath: path5.relative(path5.dirname(resolved.directory), resolved.directory).replaceAll(path5.sep, "/"),
3677
+ resolved_subpath: path7.relative(path7.dirname(resolved.directory), resolved.directory).replaceAll(path7.sep, "/"),
3505
3678
  npm_package: resolved.package,
3506
3679
  npm_version: resolved.version
3507
3680
  };
3508
3681
  }
3509
- const cloneDirectory = await fs5.mkdtemp(path5.join(os.tmpdir(), "pm-extension-source-"));
3682
+ const cloneDirectory = await fs6.mkdtemp(path7.join(os.tmpdir(), "pm-extension-source-"));
3510
3683
  const cloneArgs = ["clone", "--depth", "1"];
3511
3684
  if (source.ref) {
3512
3685
  cloneArgs.push("--branch", source.ref);
@@ -3527,11 +3700,11 @@ async function resolveInstallSource(source) {
3527
3700
  resolved_subpath: resolved.resolved_subpath,
3528
3701
  commit,
3529
3702
  cleanup: async () => {
3530
- await fs5.rm(cloneDirectory, { recursive: true, force: true });
3703
+ await fs6.rm(cloneDirectory, { recursive: true, force: true });
3531
3704
  }
3532
3705
  };
3533
3706
  } catch (error) {
3534
- await fs5.rm(cloneDirectory, { recursive: true, force: true });
3707
+ await fs6.rm(cloneDirectory, { recursive: true, force: true });
3535
3708
  throw error;
3536
3709
  }
3537
3710
  }
@@ -3540,8 +3713,8 @@ async function areDirectoriesEquivalent(left, right) {
3540
3713
  return false;
3541
3714
  }
3542
3715
  const [leftRealPath, rightRealPath] = await Promise.all([
3543
- fs5.realpath(left),
3544
- fs5.realpath(right)
3716
+ fs6.realpath(left),
3717
+ fs6.realpath(right)
3545
3718
  ]);
3546
3719
  return leftRealPath === rightRealPath;
3547
3720
  }
@@ -4058,9 +4231,9 @@ function buildDoctorConsistencySummary(scope, installedExtensions, loadedExtensi
4058
4231
 
4059
4232
  // dist/sdk/extension/install-runtime.js
4060
4233
  import { randomUUID } from "node:crypto";
4061
- import fs6 from "node:fs/promises";
4234
+ import fs7 from "node:fs/promises";
4062
4235
  import os2 from "node:os";
4063
- import path6 from "node:path";
4236
+ import path8 from "node:path";
4064
4237
  var EXTENSION_INSTALL_COPY_ATTEMPTS = 3;
4065
4238
  var EXTENSION_INSTALL_LOCK_ATTEMPTS = 120;
4066
4239
  var EXTENSION_INSTALL_LOCK_DELAY_MS = 250;
@@ -4077,34 +4250,34 @@ var sleep = (ms) => new Promise((resolve) => {
4077
4250
  setTimeout(resolve, ms);
4078
4251
  });
4079
4252
  var ensureExtensionModuleTypeMarker = async (destinationDirectory) => {
4080
- const markerPath = path6.join(destinationDirectory, "package.json");
4253
+ const markerPath = path8.join(destinationDirectory, "package.json");
4081
4254
  if (await pathExists(markerPath)) {
4082
4255
  return;
4083
4256
  }
4084
- await fs6.writeFile(markerPath, `${JSON.stringify({ type: "module" }, null, 2)}
4257
+ await fs7.writeFile(markerPath, `${JSON.stringify({ type: "module" }, null, 2)}
4085
4258
  `, "utf8");
4086
4259
  };
4087
4260
  var resolveCanonicalExtensionInstallDestination = async (destinationDirectory) => {
4088
- const resolvedDestination = path6.resolve(destinationDirectory);
4089
- const destinationParent = path6.dirname(resolvedDestination);
4090
- const destinationRoot = path6.parse(destinationParent).root;
4091
- let canonicalDestinationParent = await fs6.realpath(destinationRoot).catch(() => destinationRoot);
4092
- const relativeDestinationParent = path6.relative(destinationRoot, destinationParent);
4093
- const destinationSegments = relativeDestinationParent === "" ? [] : relativeDestinationParent.split(path6.sep);
4261
+ const resolvedDestination = path8.resolve(destinationDirectory);
4262
+ const destinationParent = path8.dirname(resolvedDestination);
4263
+ const destinationRoot = path8.parse(destinationParent).root;
4264
+ let canonicalDestinationParent = await fs7.realpath(destinationRoot).catch(() => destinationRoot);
4265
+ const relativeDestinationParent = path8.relative(destinationRoot, destinationParent);
4266
+ const destinationSegments = relativeDestinationParent === "" ? [] : relativeDestinationParent.split(path8.sep);
4094
4267
  for (const [index, segment] of destinationSegments.entries()) {
4095
- const candidate = path6.join(canonicalDestinationParent, segment);
4268
+ const candidate = path8.join(canonicalDestinationParent, segment);
4096
4269
  try {
4097
- canonicalDestinationParent = await fs6.realpath(candidate);
4270
+ canonicalDestinationParent = await fs7.realpath(candidate);
4098
4271
  } catch {
4099
- canonicalDestinationParent = path6.join(canonicalDestinationParent, ...destinationSegments.slice(index));
4272
+ canonicalDestinationParent = path8.join(canonicalDestinationParent, ...destinationSegments.slice(index));
4100
4273
  break;
4101
4274
  }
4102
4275
  }
4103
- return path6.join(canonicalDestinationParent, path6.basename(resolvedDestination));
4276
+ return path8.join(canonicalDestinationParent, path8.basename(resolvedDestination));
4104
4277
  };
4105
4278
  var copyExtensionDirectoryWithoutSelfNesting = async (sourceDirectory, destinationDirectory, copyDirectory, temporaryDirectory = os2.tmpdir()) => {
4106
- const resolvedSource = path6.resolve(sourceDirectory);
4107
- const canonicalSource = await fs6.realpath(resolvedSource).catch(() => resolvedSource);
4279
+ const resolvedSource = path8.resolve(sourceDirectory);
4280
+ const canonicalSource = await fs7.realpath(resolvedSource).catch(() => resolvedSource);
4108
4281
  const canonicalDestination = await resolveCanonicalExtensionInstallDestination(destinationDirectory);
4109
4282
  if (canonicalSource === canonicalDestination) {
4110
4283
  return;
@@ -4116,13 +4289,13 @@ var copyExtensionDirectoryWithoutSelfNesting = async (sourceDirectory, destinati
4116
4289
  });
4117
4290
  return;
4118
4291
  }
4119
- const systemTempDirectory = path6.resolve(temporaryDirectory);
4120
- const stagingBase = isPathWithinDirectory(canonicalSource, systemTempDirectory) ? path6.dirname(canonicalSource) : systemTempDirectory;
4292
+ const systemTempDirectory = path8.resolve(temporaryDirectory);
4293
+ const stagingBase = isPathWithinDirectory(canonicalSource, systemTempDirectory) ? path8.dirname(canonicalSource) : systemTempDirectory;
4121
4294
  if (isPathWithinDirectory(canonicalSource, stagingBase)) {
4122
4295
  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" });
4123
4296
  }
4124
- const stagingRoot = await fs6.mkdtemp(path6.join(stagingBase, "pm-extension-copy-"));
4125
- const stagedDirectory = path6.join(stagingRoot, "extension");
4297
+ const stagingRoot = await fs7.mkdtemp(path8.join(stagingBase, "pm-extension-copy-"));
4298
+ const stagedDirectory = path8.join(stagingRoot, "extension");
4126
4299
  try {
4127
4300
  await copyDirectory(sourceDirectory, stagedDirectory, {
4128
4301
  recursive: true,
@@ -4133,13 +4306,13 @@ var copyExtensionDirectoryWithoutSelfNesting = async (sourceDirectory, destinati
4133
4306
  force: true
4134
4307
  });
4135
4308
  } finally {
4136
- await fs6.rm(stagingRoot, { recursive: true, force: true });
4309
+ await fs7.rm(stagingRoot, { recursive: true, force: true });
4137
4310
  }
4138
4311
  };
4139
- var copyExtensionDirectoryForInstall = async (sourceDirectory, destinationDirectory, copyDirectory = fs6.cp) => {
4312
+ var copyExtensionDirectoryForInstall = async (sourceDirectory, destinationDirectory, copyDirectory = fs7.cp) => {
4140
4313
  for (let attempt = 1; attempt <= EXTENSION_INSTALL_COPY_ATTEMPTS; attempt += 1) {
4141
4314
  try {
4142
- await fs6.rm(destinationDirectory, { recursive: true, force: true });
4315
+ await fs7.rm(destinationDirectory, { recursive: true, force: true });
4143
4316
  await copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory);
4144
4317
  return;
4145
4318
  } catch (error) {
@@ -4153,7 +4326,7 @@ var copyExtensionDirectoryForInstall = async (sourceDirectory, destinationDirect
4153
4326
  var readExtensionInstallLockOwnerToken = async (lockPath) => {
4154
4327
  let ownerContents;
4155
4328
  try {
4156
- ownerContents = await fs6.readFile(path6.join(lockPath, "owner.json"), "utf8");
4329
+ ownerContents = await fs7.readFile(path8.join(lockPath, "owner.json"), "utf8");
4157
4330
  } catch (error) {
4158
4331
  if (!isErrnoCode(error, "ENOENT"))
4159
4332
  throw error;
@@ -4176,13 +4349,13 @@ var removeExtensionInstallLockIfOwned = async (lockPath, ownerToken) => {
4176
4349
  if (currentOwnerToken !== ownerToken) {
4177
4350
  return false;
4178
4351
  }
4179
- await fs6.rm(lockPath, { recursive: true, force: true });
4352
+ await fs7.rm(lockPath, { recursive: true, force: true });
4180
4353
  return true;
4181
4354
  };
4182
4355
  var reclaimStaleExtensionInstallLock = async (lockPath, staleMs) => {
4183
4356
  let stat;
4184
4357
  try {
4185
- stat = await fs6.stat(lockPath);
4358
+ stat = await fs7.stat(lockPath);
4186
4359
  } catch {
4187
4360
  return false;
4188
4361
  }
@@ -4191,7 +4364,7 @@ var reclaimStaleExtensionInstallLock = async (lockPath, staleMs) => {
4191
4364
  }
4192
4365
  const staleOwnerToken = await readExtensionInstallLockOwnerToken(lockPath);
4193
4366
  if (staleOwnerToken === null) {
4194
- await fs6.rm(lockPath, { recursive: true, force: true });
4367
+ await fs7.rm(lockPath, { recursive: true, force: true });
4195
4368
  return true;
4196
4369
  }
4197
4370
  return removeExtensionInstallLockIfOwned(lockPath, staleOwnerToken);
@@ -4204,7 +4377,7 @@ var startExtensionInstallLockHeartbeat = (lockPath, ownerToken, intervalMs) => {
4204
4377
  return;
4205
4378
  }
4206
4379
  const heartbeatAt = /* @__PURE__ */ new Date();
4207
- await fs6.utimes(lockPath, heartbeatAt, heartbeatAt);
4380
+ await fs7.utimes(lockPath, heartbeatAt, heartbeatAt);
4208
4381
  }).catch(() => void 0);
4209
4382
  }, intervalMs);
4210
4383
  timer.unref();
@@ -4214,12 +4387,12 @@ var startExtensionInstallLockHeartbeat = (lockPath, ownerToken, intervalMs) => {
4214
4387
  };
4215
4388
  };
4216
4389
  var createExtensionInstallLock = async (lockPath, owner) => {
4217
- await fs6.mkdir(lockPath);
4390
+ await fs7.mkdir(lockPath);
4218
4391
  try {
4219
- await fs6.writeFile(path6.join(lockPath, "owner.json"), `${JSON.stringify(owner, null, 2)}
4392
+ await fs7.writeFile(path8.join(lockPath, "owner.json"), `${JSON.stringify(owner, null, 2)}
4220
4393
  `, "utf8");
4221
4394
  } catch (error) {
4222
- await fs6.rm(lockPath, { recursive: true, force: true }).catch(() => {
4395
+ await fs7.rm(lockPath, { recursive: true, force: true }).catch(() => {
4223
4396
  });
4224
4397
  throw error;
4225
4398
  }
@@ -4243,9 +4416,9 @@ var acquireExtensionInstallLock = async (lockPath, owner, attempts, delayMs, sta
4243
4416
  return false;
4244
4417
  };
4245
4418
  var withExtensionInstallLock = async (settingsRoot, destinationDirectoryName, run, options) => {
4246
- const lockRoot = path6.join(settingsRoot, "runtime", "extension-install-locks");
4247
- const lockPath = path6.join(lockRoot, "scope.lock");
4248
- await fs6.mkdir(lockRoot, { recursive: true });
4419
+ const lockRoot = path8.join(settingsRoot, "runtime", "extension-install-locks");
4420
+ const lockPath = path8.join(lockRoot, "scope.lock");
4421
+ await fs7.mkdir(lockRoot, { recursive: true });
4249
4422
  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 ?? {};
4250
4423
  if (![rawAttempts, rawDelayMs, rawStaleMs, rawHeartbeatMs].filter((value) => value !== void 0).every(Number.isFinite)) {
4251
4424
  throw new PmCliError("Extension install lock timings must be finite numbers.", EXIT_CODE.USAGE);
@@ -4344,9 +4517,9 @@ var checkGithubUpdate = async (source, gitCommandRunner = runGitCommand) => {
4344
4517
  };
4345
4518
 
4346
4519
  // dist/sdk/extension/install-snapshot.js
4347
- import fs7 from "node:fs/promises";
4348
- import path7 from "node:path";
4349
- var readOptionalMetadataFile = async (filePath) => fs7.readFile(filePath).catch((error) => {
4520
+ import fs8 from "node:fs/promises";
4521
+ import path9 from "node:path";
4522
+ var readOptionalMetadataFile = async (filePath) => fs8.readFile(filePath).catch((error) => {
4350
4523
  if (isErrnoCode(error, "ENOENT"))
4351
4524
  return null;
4352
4525
  throw error;
@@ -4359,7 +4532,7 @@ var captureExtensionInstallSnapshot = async (selectedRoot, settingsRoot, destina
4359
4532
  readOptionalMetadataFile(settingsPath)
4360
4533
  ]);
4361
4534
  if (destinationExists) {
4362
- await fs7.cp(destinationDirectory, backupDirectory, {
4535
+ await fs8.cp(destinationDirectory, backupDirectory, {
4363
4536
  recursive: true,
4364
4537
  force: true
4365
4538
  });
@@ -4375,9 +4548,9 @@ var captureExtensionInstallSnapshot = async (selectedRoot, settingsRoot, destina
4375
4548
  };
4376
4549
  };
4377
4550
  var restoreExtensionInstallSnapshot = async (snapshot) => {
4378
- await fs7.rm(snapshot.destinationDirectory, { recursive: true, force: true });
4551
+ await fs8.rm(snapshot.destinationDirectory, { recursive: true, force: true });
4379
4552
  if (snapshot.destinationExists) {
4380
- await fs7.cp(snapshot.backupDirectory, snapshot.destinationDirectory, {
4553
+ await fs8.cp(snapshot.backupDirectory, snapshot.destinationDirectory, {
4381
4554
  recursive: true,
4382
4555
  force: true
4383
4556
  });
@@ -4387,10 +4560,10 @@ var restoreExtensionInstallSnapshot = async (snapshot) => {
4387
4560
  [snapshot.settingsPath, snapshot.settingsContents]
4388
4561
  ]) {
4389
4562
  if (contents === null) {
4390
- await fs7.rm(filePath, { force: true });
4563
+ await fs8.rm(filePath, { force: true });
4391
4564
  } else {
4392
- await fs7.mkdir(path7.dirname(filePath), { recursive: true });
4393
- await fs7.writeFile(filePath, contents);
4565
+ await fs8.mkdir(path9.dirname(filePath), { recursive: true });
4566
+ await fs8.writeFile(filePath, contents);
4394
4567
  }
4395
4568
  }
4396
4569
  };
@@ -4789,14 +4962,14 @@ var buildMissingManifestInspection = (directoryName, scope, settings, managedEnt
4789
4962
  };
4790
4963
  };
4791
4964
  var inspectInstalledExtensionDirectory = async (extensionsRoot, directoryName, scope, settings, managedByName, managedByDirectory) => {
4792
- const extensionDirectory = path8.join(extensionsRoot, directoryName);
4793
- const manifestPath = path8.join(extensionDirectory, "manifest.json");
4965
+ const extensionDirectory = path10.join(extensionsRoot, directoryName);
4966
+ const manifestPath = path10.join(extensionDirectory, "manifest.json");
4794
4967
  const managedDirectoryEntry = managedByDirectory.get(normalizeExtensionNameForMatch(directoryName));
4795
4968
  if (!await pathExists(manifestPath)) {
4796
4969
  return buildMissingManifestInspection(directoryName, scope, settings, managedDirectoryEntry);
4797
4970
  }
4798
4971
  const invalidJson = /* @__PURE__ */ Symbol("invalid-extension-manifest-json");
4799
- const rawManifest = await fs8.readFile(manifestPath, "utf8").then((contents) => JSON.parse(contents)).catch(() => invalidJson);
4972
+ const rawManifest = await fs9.readFile(manifestPath, "utf8").then((contents) => JSON.parse(contents)).catch(() => invalidJson);
4800
4973
  if (rawManifest === invalidJson) {
4801
4974
  return {
4802
4975
  warning: `extension_manifest_invalid_json:${scope}:${directoryName}`
@@ -4824,7 +4997,7 @@ var listInstalledExtensions = async (extensionsRoot, scope, settings, state) =>
4824
4997
  warnings: []
4825
4998
  };
4826
4999
  }
4827
- const entries = await fs8.readdir(extensionsRoot, { withFileTypes: true });
5000
+ const entries = await fs9.readdir(extensionsRoot, { withFileTypes: true });
4828
5001
  const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((left, right) => left.localeCompare(right));
4829
5002
  const managedByName = new Map(state.entries.map((managedEntry) => [
4830
5003
  normalizeExtensionNameForMatch(managedEntry.name),
@@ -4962,7 +5135,7 @@ var adoptUnmanagedExtensions = async (extensionsRoot, scope, installedExtensions
4962
5135
  let nextState = state;
4963
5136
  const adoptedEntries = [];
4964
5137
  for (const candidate of sortedCandidates) {
4965
- const extensionDirectory = path8.join(extensionsRoot, candidate.directory);
5138
+ const extensionDirectory = path10.join(extensionsRoot, candidate.directory);
4966
5139
  const validated = await validateExtensionDirectory(extensionDirectory);
4967
5140
  const now = nowIso();
4968
5141
  const sourceRecord = {
@@ -5370,12 +5543,12 @@ var persistExtensionInstall = async (ctx, input3) => {
5370
5543
  const settings = await readSettings(resolvedRoots.settings_root);
5371
5544
  const managedStateRead = await readManagedExtensionState(resolvedRoots.selected_root);
5372
5545
  warnings.push(...managedStateRead.warnings);
5373
- const destinationDirectory = path8.join(resolvedRoots.selected_root, destinationDirectoryName);
5546
+ const destinationDirectory = path10.join(resolvedRoots.selected_root, destinationDirectoryName);
5374
5547
  const destinationExists = await pathExists(destinationDirectory);
5375
5548
  const installInPlace = await areDirectoriesEquivalent(validated.directory, destinationDirectory);
5376
- await fs8.mkdir(resolvedRoots.selected_root, { recursive: true });
5377
- const backupRoot = await fs8.mkdtemp(path8.join(resolvedRoots.selected_root, ".pm-extension-install-backup-"));
5378
- const backupDirectory = path8.join(backupRoot, "destination");
5549
+ await fs9.mkdir(resolvedRoots.selected_root, { recursive: true });
5550
+ const backupRoot = await fs9.mkdtemp(path10.join(resolvedRoots.selected_root, ".pm-extension-install-backup-"));
5551
+ const backupDirectory = path10.join(backupRoot, "destination");
5379
5552
  try {
5380
5553
  const snapshot = await captureExtensionInstallSnapshot(resolvedRoots.selected_root, resolvedRoots.settings_root, destinationDirectory, destinationExists, backupDirectory);
5381
5554
  const sourceRecord = buildInstallManagedSource(input3.bundledAliasName, input3.bundledPackageName, input3.installSource, input3.resolvedSource);
@@ -5419,7 +5592,7 @@ var persistExtensionInstall = async (ctx, input3) => {
5419
5592
  activationChanged
5420
5593
  };
5421
5594
  } finally {
5422
- await fs8.rm(backupRoot, { recursive: true, force: true }).catch(() => void 0);
5595
+ await fs9.rm(backupRoot, { recursive: true, force: true }).catch(() => void 0);
5423
5596
  }
5424
5597
  };
5425
5598
  var scaffoldInstalledExtensionItemTypes = async (ctx, extensionName, registrations) => {
@@ -5676,7 +5849,7 @@ var runExtensionAdoptAction = async (ctx) => {
5676
5849
  }
5677
5850
  });
5678
5851
  }
5679
- const extensionDirectory = path8.join(resolvedRoots.selected_root, candidate.directory);
5852
+ const extensionDirectory = path10.join(resolvedRoots.selected_root, candidate.directory);
5680
5853
  const validated = await validateExtensionDirectory(extensionDirectory);
5681
5854
  const now = nowIso();
5682
5855
  const sourceRecord = buildAdoptedExtensionSource(githubOption, extensionTarget, extensionDirectory, options.ref);
@@ -5724,8 +5897,8 @@ var resolveRequiredInstalledExtension = async (ctx) => {
5724
5897
  var runExtensionUninstallAction = async (ctx) => {
5725
5898
  const { resolvedRoots, withResult } = ctx;
5726
5899
  const { settings, managedStateRead, candidate } = await resolveRequiredInstalledExtension(ctx);
5727
- const destinationDirectory = path8.join(resolvedRoots.selected_root, candidate.directory);
5728
- await fs8.rm(destinationDirectory, { recursive: true, force: true });
5900
+ const destinationDirectory = path10.join(resolvedRoots.selected_root, candidate.directory);
5901
+ await fs9.rm(destinationDirectory, { recursive: true, force: true });
5729
5902
  const updatedState = {
5730
5903
  ...managedStateRead.state,
5731
5904
  updated_at: nowIso(),
@@ -6214,49 +6387,9 @@ var requiresExtensionStateLock = (ctx) => [
6214
6387
  ].some(Boolean);
6215
6388
  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);
6216
6389
 
6217
- // dist/sdk/workspace.js
6218
- import { readFile, writeFile } from "node:fs/promises";
6219
- import path9 from "node:path";
6220
- var PM_GITIGNORE_START = "# pm-cli:runtime-cache:start";
6221
- var PM_GITIGNORE_END = "# pm-cli:runtime-cache:end";
6222
- var PM_GITIGNORE_BLOCK = [
6223
- PM_GITIGNORE_START,
6224
- ".agents/pm/runtime/",
6225
- ".agents/pm/search/",
6226
- ".agents/pm/locks/",
6227
- PM_GITIGNORE_END
6228
- ].join("\n");
6229
- function getPmGitignoreBlock() {
6230
- return PM_GITIGNORE_BLOCK;
6231
- }
6232
- async function ensurePmGitignore(workspaceRoot) {
6233
- const gitignorePath = path9.join(workspaceRoot, ".gitignore");
6234
- let current = "";
6235
- try {
6236
- current = await readFile(gitignorePath, "utf8");
6237
- } catch (error) {
6238
- if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) {
6239
- throw error;
6240
- }
6241
- }
6242
- const start = current.indexOf(PM_GITIGNORE_START);
6243
- const end = current.indexOf(PM_GITIGNORE_END);
6244
- const withoutManagedBlock = start >= 0 && end >= start ? `${current.slice(0, start)}${current.slice(end + PM_GITIGNORE_END.length)}` : current;
6245
- const prefix = withoutManagedBlock.trimEnd();
6246
- const next = `${prefix.length > 0 ? `${prefix}
6247
-
6248
- ` : ""}${PM_GITIGNORE_BLOCK}
6249
- `;
6250
- if (next === current) {
6251
- return { path: gitignorePath, changed: false };
6252
- }
6253
- await writeFile(gitignorePath, next, "utf8");
6254
- return { path: gitignorePath, changed: true };
6255
- }
6256
-
6257
6390
  // dist/sdk/init-agent-guidance.js
6258
- import fs9 from "node:fs/promises";
6259
- import path10 from "node:path";
6391
+ import fs10 from "node:fs/promises";
6392
+ import path11 from "node:path";
6260
6393
  import readline from "node:readline/promises";
6261
6394
  import { stdin as input, stdout as output } from "node:process";
6262
6395
  var INIT_AGENT_GUIDANCE_MODE_VALUES = [
@@ -6307,11 +6440,11 @@ function setAgentGuidanceReadlineFactoryForTests(factory) {
6307
6440
  createAgentGuidanceReadlineInterface = factory ?? (() => readline.createInterface({ input, output }));
6308
6441
  }
6309
6442
  function toPortableRelativePath(projectRoot, targetPath) {
6310
- const relative = path10.relative(projectRoot, targetPath);
6443
+ const relative = path11.relative(projectRoot, targetPath);
6311
6444
  if (relative.length === 0) {
6312
- return path10.basename(targetPath);
6445
+ return path11.basename(targetPath);
6313
6446
  }
6314
- return relative.split(path10.sep).join("/");
6447
+ return relative.split(path11.sep).join("/");
6315
6448
  }
6316
6449
  function ensureTrailingNewline(value) {
6317
6450
  return value.endsWith("\n") ? value : `${value}
@@ -6374,14 +6507,14 @@ function upsertAgentGuidanceBlock(existingContent) {
6374
6507
  };
6375
6508
  }
6376
6509
  function resolveProjectRoot(pmRoot, cwd) {
6377
- const parent = path10.dirname(pmRoot);
6378
- if (path10.basename(pmRoot) === "pm" && path10.basename(parent) === ".agents") {
6379
- return path10.dirname(parent);
6510
+ const parent = path11.dirname(pmRoot);
6511
+ if (path11.basename(pmRoot) === "pm" && path11.basename(parent) === ".agents") {
6512
+ return path11.dirname(parent);
6380
6513
  }
6381
- return path10.resolve(cwd, pmRoot);
6514
+ return path11.resolve(cwd, pmRoot);
6382
6515
  }
6383
6516
  function resolveTargetGuidancePath(scans, projectRoot) {
6384
- const existingAgents = scans.find((entry) => path10.basename(entry.file_path) === "AGENTS.md" && entry.exists);
6517
+ const existingAgents = scans.find((entry) => path11.basename(entry.file_path) === "AGENTS.md" && entry.exists);
6385
6518
  if (existingAgents) {
6386
6519
  return existingAgents.file_path;
6387
6520
  }
@@ -6389,7 +6522,7 @@ function resolveTargetGuidancePath(scans, projectRoot) {
6389
6522
  if (existingAny) {
6390
6523
  return existingAny.file_path;
6391
6524
  }
6392
- return path10.join(projectRoot, "AGENTS.md");
6525
+ return path11.join(projectRoot, "AGENTS.md");
6393
6526
  }
6394
6527
  function parsePromptChoice(answer, currentDefault) {
6395
6528
  const normalized = answer.trim().toLowerCase();
@@ -6431,7 +6564,7 @@ function normalizeAgentGuidanceState(settings) {
6431
6564
  async function scanGuidanceFiles(projectRoot) {
6432
6565
  const scans = [];
6433
6566
  for (const filename of AGENT_GUIDANCE_TARGET_FILENAMES) {
6434
- const filePath = path10.join(projectRoot, filename);
6567
+ const filePath = path11.join(projectRoot, filename);
6435
6568
  const exists = await pathExists(filePath);
6436
6569
  if (!exists) {
6437
6570
  scans.push({
@@ -6442,7 +6575,7 @@ async function scanGuidanceFiles(projectRoot) {
6442
6575
  });
6443
6576
  continue;
6444
6577
  }
6445
- const content = await fs9.readFile(filePath, "utf8");
6578
+ const content = await fs10.readFile(filePath, "utf8");
6446
6579
  const contentLower = content.toLowerCase();
6447
6580
  const tokenHits = AGENT_GUIDANCE_REQUIRED_TOKENS.filter((token) => contentLower.includes(token));
6448
6581
  const hasMarker = hasGuidanceMarker(content);
@@ -6470,7 +6603,7 @@ function applyAgentGuidanceState(settings, currentState) {
6470
6603
  }
6471
6604
  async function writeGuidanceFile(filePath) {
6472
6605
  const exists = await pathExists(filePath);
6473
- const currentContent = exists ? await fs9.readFile(filePath, "utf8") : "";
6606
+ const currentContent = exists ? await fs10.readFile(filePath, "utf8") : "";
6474
6607
  const nextContent = upsertAgentGuidanceBlock(currentContent);
6475
6608
  if (!nextContent.changed) {
6476
6609
  return { changed: false, warnings: [] };
@@ -6658,8 +6791,8 @@ async function runInitAgentGuidance(options) {
6658
6791
  }
6659
6792
 
6660
6793
  // dist/sdk/init.js
6661
- import fs10 from "node:fs/promises";
6662
- import path11 from "node:path";
6794
+ import fs11 from "node:fs/promises";
6795
+ import path12 from "node:path";
6663
6796
  import readline2 from "node:readline/promises";
6664
6797
  import { stdin as input2, stdout as output2 } from "node:process";
6665
6798
  import { hostname, userInfo } from "node:os";
@@ -6763,7 +6896,7 @@ function isPathLikeInitTarget(rawValue) {
6763
6896
  if (trimmed.length === 0) {
6764
6897
  return false;
6765
6898
  }
6766
- return path11.isAbsolute(trimmed) || /^[a-z]:/iu.test(trimmed) || trimmed.startsWith(".") || trimmed.includes("/") || trimmed.includes("\\");
6899
+ return path12.isAbsolute(trimmed) || /^[a-z]:/iu.test(trimmed) || trimmed.startsWith(".") || trimmed.includes("/") || trimmed.includes("\\");
6767
6900
  }
6768
6901
  function resolveInitInvocation(cwd, global, prefixArg, workspaceArg) {
6769
6902
  const normalizedWorkspace = workspaceArg?.trim();
@@ -6774,8 +6907,8 @@ function resolveInitInvocation(cwd, global, prefixArg, workspaceArg) {
6774
6907
  if (global.path !== void 0 || isPathLikeInitTarget(prefixArg)) {
6775
6908
  throw new PmCliError("--workspace cannot be combined with --pm-path/--path or a path-like positional target.", EXIT_CODE.USAGE);
6776
6909
  }
6777
- const workspaceRoot = path11.resolve(cwd, normalizedWorkspace);
6778
- const pmRoot2 = path11.join(workspaceRoot, ".agents", "pm");
6910
+ const workspaceRoot = path12.resolve(cwd, normalizedWorkspace);
6911
+ const pmRoot2 = path12.join(workspaceRoot, ".agents", "pm");
6779
6912
  return {
6780
6913
  pmRoot: pmRoot2,
6781
6914
  prefixArg,
@@ -6787,7 +6920,7 @@ function resolveInitInvocation(cwd, global, prefixArg, workspaceArg) {
6787
6920
  };
6788
6921
  }
6789
6922
  if (global.path === void 0 && isPathLikeInitTarget(prefixArg)) {
6790
- const positionalTarget = path11.resolve(cwd, prefixArg.trim());
6923
+ const positionalTarget = path12.resolve(cwd, prefixArg.trim());
6791
6924
  return {
6792
6925
  pmRoot: positionalTarget,
6793
6926
  prefixArg: void 0,
@@ -6909,10 +7042,10 @@ async function isLikelyWorkspaceRoot(candidate) {
6909
7042
  "package.json",
6910
7043
  "pnpm-workspace.yaml",
6911
7044
  "AGENTS.md",
6912
- path11.join(".agents", "pm")
7045
+ path12.join(".agents", "pm")
6913
7046
  ];
6914
7047
  for (const indicator of indicators) {
6915
- if (await pathExists(path11.join(candidate, indicator))) {
7048
+ if (await pathExists(path12.join(candidate, indicator))) {
6916
7049
  return true;
6917
7050
  }
6918
7051
  }
@@ -6922,13 +7055,13 @@ async function assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot, explicitTrack
6922
7055
  if (!explicitTrackerTarget || force) {
6923
7056
  return;
6924
7057
  }
6925
- if (await pathExists(path11.join(pmRoot, "settings.json"))) {
7058
+ if (await pathExists(path12.join(pmRoot, "settings.json"))) {
6926
7059
  return;
6927
7060
  }
6928
7061
  if (!await isLikelyWorkspaceRoot(pmRoot)) {
6929
7062
  return;
6930
7063
  }
6931
- const nestedTracker = path11.join(pmRoot, ".agents", "pm");
7064
+ const nestedTracker = path12.join(pmRoot, ".agents", "pm");
6932
7065
  throw new PmCliError(`Refusing to initialize tracker files directly in workspace root "${pmRoot}".`, EXIT_CODE.USAGE, {
6933
7066
  code: "workspace_root_pm_path",
6934
7067
  type: "urn:pm-cli:error:workspace_root_pm_path",
@@ -6952,9 +7085,9 @@ async function ensureInitDirectories(pmRoot, subdirs) {
6952
7085
  const createdDirs = [];
6953
7086
  const warnings = [];
6954
7087
  for (const subdir of subdirs) {
6955
- const target = subdir ? path11.join(pmRoot, subdir) : pmRoot;
7088
+ const target = subdir ? path12.join(pmRoot, subdir) : pmRoot;
6956
7089
  const existed = await pathExists(target);
6957
- await fs10.mkdir(target, { recursive: true });
7090
+ await fs11.mkdir(target, { recursive: true });
6958
7091
  if (existed) {
6959
7092
  warnings.push(`already_exists:${target}`);
6960
7093
  } else {
@@ -7187,10 +7320,10 @@ async function ensureInitTypeDirectories(params) {
7187
7320
  params.warnings.push(...scaffold.warnings);
7188
7321
  }
7189
7322
  function resolveInitWorkspaceRoot(target) {
7190
- const trackerRoot = path11.resolve(target.tracker_root);
7191
- const agentsRoot = path11.dirname(trackerRoot);
7192
- if (path11.basename(trackerRoot) === "pm" && path11.basename(agentsRoot) === ".agents") {
7193
- return path11.dirname(agentsRoot);
7323
+ const trackerRoot = path12.resolve(target.tracker_root);
7324
+ const agentsRoot = path12.dirname(trackerRoot);
7325
+ if (path12.basename(trackerRoot) === "pm" && path12.basename(agentsRoot) === ".agents") {
7326
+ return path12.dirname(agentsRoot);
7194
7327
  }
7195
7328
  return target.workspace_root;
7196
7329
  }
@@ -7247,7 +7380,7 @@ async function runInit(prefixArg, global, options = {}) {
7247
7380
  const baseDirs = await ensureInitDirectories(pmRoot, PM_REQUIRED_SUBDIRS);
7248
7381
  createdDirs.push(...baseDirs.createdDirs);
7249
7382
  warnings.push(...baseDirs.warnings);
7250
- const settingsPath = path11.join(pmRoot, "settings.json");
7383
+ const settingsPath = path12.join(pmRoot, "settings.json");
7251
7384
  const settingsExists = await pathExists(settingsPath);
7252
7385
  const settingsResolution = await resolveInitSettings({
7253
7386
  pmRoot,
@@ -7311,6 +7444,14 @@ async function runInit(prefixArg, global, options = {}) {
7311
7444
  }
7312
7445
 
7313
7446
  export {
7447
+ PM_GITIGNORE_START,
7448
+ PM_GITIGNORE_END,
7449
+ getPmGitignoreBlock,
7450
+ ensurePmGitignore,
7451
+ quoteWindowsCommandArg,
7452
+ quoteCommandArg,
7453
+ renderPmCommand,
7454
+ normalizeExtensionNameForMatch,
7314
7455
  readManagedExtensionState,
7315
7456
  PM_PACKAGE_RESOURCE_KINDS,
7316
7457
  PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,
@@ -7322,10 +7463,6 @@ export {
7322
7463
  collectUnknownCapabilityGuidance,
7323
7464
  buildCapabilityContractMetadata,
7324
7465
  runExtension,
7325
- PM_GITIGNORE_START,
7326
- PM_GITIGNORE_END,
7327
- getPmGitignoreBlock,
7328
- ensurePmGitignore,
7329
7466
  INIT_AGENT_GUIDANCE_MODE_VALUES,
7330
7467
  _testOnly,
7331
7468
  runInitAgentGuidance,
@@ -7333,6 +7470,6 @@ export {
7333
7470
  _testOnly2,
7334
7471
  runInit
7335
7472
  };
7336
- //# sourceMappingURL=chunk-QRZNCRNA.js.map
7473
+ //# sourceMappingURL=chunk-MI3346YW.js.map
7337
7474
 
7338
- //# debugId=f34a834c-7c67-555c-a8b0-6c26e7d8c12a
7475
+ //# debugId=36449c46-4651-5a6f-93c6-1065305d35d8