@unbrained/pm-cli 2026.7.21 → 2026.7.22

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 (506) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +25 -0
  3. package/dist/cli/bundle-integrity.js +3 -3
  4. package/dist/cli/bundle-integrity.js.map +1 -1
  5. package/dist/cli/commands/contracts.d.ts +5 -0
  6. package/dist/cli/commands/contracts.js +8 -6
  7. package/dist/cli/commands/contracts.js.map +1 -1
  8. package/dist/cli/commands/copy.js +36 -20
  9. package/dist/cli/commands/copy.js.map +1 -1
  10. package/dist/cli/commands/create.js +48 -24
  11. package/dist/cli/commands/create.js.map +1 -1
  12. package/dist/cli/commands/merge.d.ts +1 -1
  13. package/dist/cli/commands/merge.js +3 -3
  14. package/dist/cli/commands/merge.js.map +1 -1
  15. package/dist/cli/commands/restore.js +40 -22
  16. package/dist/cli/commands/restore.js.map +1 -1
  17. package/dist/cli/commands/update.js +12 -9
  18. package/dist/cli/commands/update.js.map +1 -1
  19. package/dist/cli/extension-command-help.js +3 -4
  20. package/dist/cli/extension-command-help.js.map +1 -1
  21. package/dist/cli/main.d.ts +3 -2
  22. package/dist/cli/main.js +6 -6
  23. package/dist/cli/main.js.map +1 -1
  24. package/dist/cli/register-list-query.js +33 -21
  25. package/dist/cli/register-list-query.js.map +1 -1
  26. package/dist/cli/register-mutation.js +63 -37
  27. package/dist/cli/register-mutation.js.map +1 -1
  28. package/dist/cli/registration-helpers.d.ts +2 -0
  29. package/dist/cli/registration-helpers.js +3 -2
  30. package/dist/cli/registration-helpers.js.map +1 -1
  31. package/dist/cli-bundle/bundle-manifest.json +349 -341
  32. package/dist/cli-bundle/chunks/{append-7OVFYR3C.js → append-CYMA7RJT.js} +5 -5
  33. package/dist/cli-bundle/chunks/append-H53CAPMP.js +11 -0
  34. package/dist/cli-bundle/chunks/{chunk-PFNHX655.js → chunk-2P7OK4WG.js} +3 -3
  35. package/dist/cli-bundle/chunks/{chunk-EJDGV4GR.js → chunk-3EBGHNNQ.js} +3 -3
  36. package/dist/cli-bundle/chunks/{chunk-DZRV2OPA.js → chunk-3EDFN3VV.js} +2 -2
  37. package/dist/cli-bundle/chunks/{chunk-ZOY5K4D3.js → chunk-3PWJWLLQ.js} +2 -2
  38. package/dist/cli-bundle/chunks/{chunk-VXOOB6YX.js → chunk-3SJAR3CY.js} +4 -4
  39. package/dist/cli-bundle/chunks/{chunk-GTLCVJOE.js → chunk-3WVKMF2A.js} +3 -3
  40. package/dist/cli-bundle/chunks/{chunk-LAV26CQG.js → chunk-42SYYKA4.js} +4 -4
  41. package/dist/cli-bundle/chunks/{chunk-NLR32VFS.js → chunk-4IXLNV7W.js} +2 -2
  42. package/dist/cli-bundle/chunks/{chunk-BKIAH72N.js → chunk-4LTPHDKA.js} +39 -23
  43. package/dist/cli-bundle/chunks/chunk-4LTPHDKA.js.map +1 -0
  44. package/dist/cli-bundle/chunks/{chunk-ABWCF646.js → chunk-4YTQVO3V.js} +5 -5
  45. package/dist/cli-bundle/chunks/{chunk-E5XMKOSB.js → chunk-5EBRMHI6.js} +4 -4
  46. package/dist/cli-bundle/chunks/{chunk-IY6VZ3IW.js → chunk-5FAG2JUC.js} +320 -62
  47. package/dist/cli-bundle/chunks/chunk-5FAG2JUC.js.map +7 -0
  48. package/dist/cli-bundle/chunks/{chunk-GKX4NJ7U.js → chunk-5K5LHZZX.js} +6 -6
  49. package/dist/cli-bundle/chunks/{chunk-T6PPNM7V.js → chunk-5K7BOAB6.js} +4 -4
  50. package/dist/cli-bundle/chunks/{chunk-4QOB7L7I.js → chunk-5MUZ54G2.js} +5 -5
  51. package/dist/cli-bundle/chunks/{chunk-SF3DT5HJ.js → chunk-5QME4KX2.js} +3 -3
  52. package/dist/cli-bundle/chunks/{chunk-RMF7LMBS.js → chunk-6PDGFY3P.js} +27 -17
  53. package/dist/cli-bundle/chunks/{chunk-RMF7LMBS.js.map → chunk-6PDGFY3P.js.map} +2 -2
  54. package/dist/cli-bundle/chunks/{chunk-TRSHFPRZ.js → chunk-6PM6CPPP.js} +5 -5
  55. package/dist/cli-bundle/chunks/{chunk-O4BCOJTZ.js → chunk-7AHRY3ZB.js} +21 -16
  56. package/dist/cli-bundle/chunks/chunk-7AHRY3ZB.js.map +7 -0
  57. package/dist/cli-bundle/chunks/{chunk-OR42SO64.js → chunk-7B36A3VT.js} +4 -4
  58. package/dist/cli-bundle/chunks/{chunk-QWRVBJ4D.js → chunk-7OR2YKKD.js} +2 -2
  59. package/dist/cli-bundle/chunks/{chunk-FPBMLYPI.js → chunk-7QUV54XX.js} +4 -4
  60. package/dist/cli-bundle/chunks/{chunk-WWNL6WMH.js → chunk-7WXW6JHG.js} +2 -2
  61. package/dist/cli-bundle/chunks/{chunk-BXNDKOR2.js → chunk-A2VL5SVG.js} +4 -4
  62. package/dist/cli-bundle/chunks/chunk-AXGDUXJW.js +5 -0
  63. package/dist/cli-bundle/chunks/{chunk-IAQE32BI.js → chunk-B2AVNGG3.js} +4 -4
  64. package/dist/cli-bundle/chunks/{chunk-K36WV5J6.js → chunk-B7O44UBR.js} +71 -8
  65. package/dist/cli-bundle/chunks/chunk-B7O44UBR.js.map +1 -0
  66. package/dist/cli-bundle/chunks/{chunk-HCEBZNC3.js → chunk-BRMPF2RM.js} +4 -4
  67. package/dist/cli-bundle/chunks/{chunk-Z7VWXXJM.js → chunk-BTNKMF2A.js} +4 -4
  68. package/dist/cli-bundle/chunks/{chunk-KH44WBAT.js → chunk-CD4643VW.js} +4 -4
  69. package/dist/cli-bundle/chunks/{chunk-OWXOPDHD.js → chunk-CJEEC5O4.js} +4 -4
  70. package/dist/cli-bundle/chunks/{chunk-PZC2FUOQ.js → chunk-CTPKCZCF.js} +2 -2
  71. package/dist/cli-bundle/chunks/{chunk-7W2UAXXT.js → chunk-D4OBQVL3.js} +10 -10
  72. package/dist/cli-bundle/chunks/{chunk-EWJWSNRU.js → chunk-DM4TYC2A.js} +4 -4
  73. package/dist/cli-bundle/chunks/{chunk-VJQG4BIM.js → chunk-DSFTAQ7T.js} +3 -3
  74. package/dist/cli-bundle/chunks/{chunk-AELMUANP.js → chunk-DVB6SQU7.js} +2 -2
  75. package/dist/cli-bundle/chunks/{chunk-KBLZ3AA5.js → chunk-E3ZWOFSO.js} +4 -4
  76. package/dist/cli-bundle/chunks/chunk-EP25DV6P.js +9 -0
  77. package/dist/cli-bundle/chunks/{chunk-GTK4DTEW.js → chunk-F4VCB4WY.js} +10 -10
  78. package/dist/cli-bundle/chunks/{chunk-V22ZPOKN.js → chunk-F4XAQUQA.js} +6 -6
  79. package/dist/cli-bundle/chunks/{chunk-QOOTOD3W.js → chunk-FGR6IBAF.js} +6 -6
  80. package/dist/cli-bundle/chunks/{chunk-JSLT7WVE.js → chunk-FKBMT2Q6.js} +2 -2
  81. package/dist/cli-bundle/chunks/{chunk-QIH77CAG.js → chunk-G5RLSSIX.js} +2 -2
  82. package/dist/cli-bundle/chunks/{chunk-P7MTHPJQ.js → chunk-GEKRVH3G.js} +2 -2
  83. package/dist/cli-bundle/chunks/{chunk-2L6ZP22J.js → chunk-GSP6IZFU.js} +3 -3
  84. package/dist/cli-bundle/chunks/{chunk-ATBCUC7Y.js → chunk-H3MDK2VU.js} +48 -30
  85. package/dist/cli-bundle/chunks/chunk-H3MDK2VU.js.map +1 -0
  86. package/dist/cli-bundle/chunks/{chunk-ZVZGXPQ5.js → chunk-HYZZM3Q2.js} +2 -2
  87. package/dist/cli-bundle/chunks/{chunk-XJTABV3X.js → chunk-IBWG3OSH.js} +22 -17
  88. package/dist/cli-bundle/chunks/chunk-IBWG3OSH.js.map +1 -0
  89. package/dist/cli-bundle/chunks/{chunk-4XGJLADW.js → chunk-IHY5SX7O.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-UCBDQI5E.js → chunk-IMU7JLUI.js} +7 -7
  91. package/dist/cli-bundle/chunks/{chunk-Z75ONV25.js → chunk-IPAQAJWB.js} +77 -7
  92. package/dist/cli-bundle/chunks/chunk-IPAQAJWB.js.map +7 -0
  93. package/dist/cli-bundle/chunks/{chunk-7RW4JCU2.js → chunk-IQCD6OO3.js} +25 -13
  94. package/dist/cli-bundle/chunks/chunk-IQCD6OO3.js.map +7 -0
  95. package/dist/cli-bundle/chunks/{chunk-YQWCZ5AC.js → chunk-J3ZKFEDM.js} +38 -22
  96. package/dist/cli-bundle/chunks/chunk-J3ZKFEDM.js.map +7 -0
  97. package/dist/cli-bundle/chunks/{chunk-PEQGTJ5Q.js → chunk-JCLXCGIL.js} +3 -3
  98. package/dist/cli-bundle/chunks/{chunk-GROYI4RB.js → chunk-JLTHOYR7.js} +3 -3
  99. package/dist/cli-bundle/chunks/{chunk-JHJSFOAM.js → chunk-JMPVHM44.js} +4 -4
  100. package/dist/cli-bundle/chunks/{chunk-MATHDCGG.js → chunk-JWYG36RV.js} +8 -8
  101. package/dist/cli-bundle/chunks/{chunk-ZTVA4KLN.js → chunk-KEGVMZNA.js} +28 -16
  102. package/dist/cli-bundle/chunks/chunk-KEGVMZNA.js.map +7 -0
  103. package/dist/cli-bundle/chunks/{chunk-VLRGDBLY.js → chunk-KEHOPUHH.js} +4 -4
  104. package/dist/cli-bundle/chunks/{chunk-K55VMLSS.js → chunk-KJ4ZF35M.js} +63 -13
  105. package/dist/cli-bundle/chunks/chunk-KJ4ZF35M.js.map +7 -0
  106. package/dist/cli-bundle/chunks/{chunk-CPX275C6.js → chunk-KPCZL2YK.js} +6 -6
  107. package/dist/cli-bundle/chunks/{chunk-POG76WWZ.js → chunk-L7DZV6EZ.js} +319 -61
  108. package/dist/cli-bundle/chunks/chunk-L7DZV6EZ.js.map +1 -0
  109. package/dist/cli-bundle/chunks/{chunk-FO6OSVEN.js → chunk-LANV45W2.js} +8 -8
  110. package/dist/cli-bundle/chunks/{chunk-LVC72YRD.js → chunk-LC5ZUXWE.js} +7 -7
  111. package/dist/cli-bundle/chunks/{chunk-SY4SFZSD.js → chunk-LE522OXA.js} +55 -30
  112. package/dist/cli-bundle/chunks/chunk-LE522OXA.js.map +7 -0
  113. package/dist/cli-bundle/chunks/{chunk-TVYYO5A7.js → chunk-MBHYQYCS.js} +2 -2
  114. package/dist/cli-bundle/chunks/{chunk-FJIFFBJX.js → chunk-MROP2RNT.js} +66 -74
  115. package/dist/cli-bundle/chunks/chunk-MROP2RNT.js.map +1 -0
  116. package/dist/cli-bundle/chunks/{chunk-7656MAUL.js → chunk-MUAJHL2R.js} +2 -2
  117. package/dist/cli-bundle/chunks/{chunk-R3P6FZJW.js → chunk-N6QCY2AX.js} +43 -25
  118. package/dist/cli-bundle/chunks/chunk-N6QCY2AX.js.map +1 -0
  119. package/dist/cli-bundle/chunks/{chunk-7WCE6Y64.js → chunk-NUQCSV4P.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-SZVB53Y3.js → chunk-O3GFE2PX.js} +3 -3
  121. package/dist/cli-bundle/chunks/{chunk-OY7DMU5P.js → chunk-O43LEUSD.js} +2 -2
  122. package/dist/cli-bundle/chunks/{chunk-AMJPSANK.js → chunk-O7RH6BWP.js} +103 -44
  123. package/dist/cli-bundle/chunks/chunk-O7RH6BWP.js.map +7 -0
  124. package/dist/cli-bundle/chunks/{chunk-NUF7ROFH.js → chunk-OODR5KYF.js} +26 -27
  125. package/dist/cli-bundle/chunks/chunk-OODR5KYF.js.map +1 -0
  126. package/dist/cli-bundle/chunks/{chunk-LZYP423P.js → chunk-OZ25YD4Q.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-VZIZB6QH.js → chunk-PKYKQCTJ.js} +4 -4
  128. package/dist/cli-bundle/chunks/{chunk-UZLJOEAC.js → chunk-PMRED6QZ.js} +3 -3
  129. package/dist/cli-bundle/chunks/{chunk-ADBTSVGK.js → chunk-PPATPPI6.js} +65 -73
  130. package/dist/cli-bundle/chunks/chunk-PPATPPI6.js.map +7 -0
  131. package/dist/cli-bundle/chunks/{chunk-K4CI6Y45.js → chunk-PWGJCP2V.js} +2 -2
  132. package/dist/cli-bundle/chunks/{chunk-UVN66B3M.js → chunk-Q3Z2Y5WJ.js} +2 -2
  133. package/dist/cli-bundle/chunks/{chunk-RNPZYNHS.js → chunk-Q6YZ3VCI.js} +104 -45
  134. package/dist/cli-bundle/chunks/chunk-Q6YZ3VCI.js.map +1 -0
  135. package/dist/cli-bundle/chunks/{chunk-7DOJC3HS.js → chunk-QE5EUHKN.js} +28 -18
  136. package/dist/cli-bundle/chunks/chunk-QE5EUHKN.js.map +1 -0
  137. package/dist/cli-bundle/chunks/{chunk-AS4SAZ5R.js → chunk-QKMMWESK.js} +25 -26
  138. package/dist/cli-bundle/chunks/chunk-QKMMWESK.js.map +7 -0
  139. package/dist/cli-bundle/chunks/{chunk-R7QV7ICM.js → chunk-QSXN2FAN.js} +4 -4
  140. package/dist/cli-bundle/chunks/{chunk-5NTE36LD.js → chunk-RBECHH5K.js} +4 -4
  141. package/dist/cli-bundle/chunks/{chunk-JXCW2TI2.js → chunk-RPNC7M63.js} +8 -8
  142. package/dist/cli-bundle/chunks/{chunk-ICDAQ4TD.js → chunk-S2QQNTA6.js} +26 -14
  143. package/dist/cli-bundle/chunks/chunk-S2QQNTA6.js.map +1 -0
  144. package/dist/cli-bundle/chunks/{chunk-JFD5LPMI.js → chunk-SP3BAXFF.js} +29 -17
  145. package/dist/cli-bundle/chunks/chunk-SP3BAXFF.js.map +1 -0
  146. package/dist/cli-bundle/chunks/{chunk-F2LBF7XJ.js → chunk-SUSFH6F7.js} +5 -5
  147. package/dist/cli-bundle/chunks/{chunk-VHXHVTUU.js → chunk-TDOPC7UY.js} +2 -2
  148. package/dist/cli-bundle/chunks/{chunk-HYW67VJ5.js → chunk-TLF52ZDP.js} +30 -25
  149. package/dist/cli-bundle/chunks/chunk-TLF52ZDP.js.map +1 -0
  150. package/dist/cli-bundle/chunks/{chunk-FSE2IKJQ.js → chunk-TWHG646K.js} +2 -2
  151. package/dist/cli-bundle/chunks/{chunk-OCUBRA6D.js → chunk-U7U7WGEC.js} +4 -4
  152. package/dist/cli-bundle/chunks/{chunk-PONKZPCJ.js → chunk-UFRVIIJ2.js} +4 -4
  153. package/dist/cli-bundle/chunks/{chunk-VNTCM3VW.js → chunk-VKX2VZZH.js} +8 -8
  154. package/dist/cli-bundle/chunks/{chunk-7AVEY74G.js → chunk-VTOCZ343.js} +29 -24
  155. package/dist/cli-bundle/chunks/chunk-VTOCZ343.js.map +7 -0
  156. package/dist/cli-bundle/chunks/{chunk-6JUTHVQS.js → chunk-W2JDNTN3.js} +2 -2
  157. package/dist/cli-bundle/chunks/{chunk-PQSEQD6E.js → chunk-W35PHE44.js} +62 -12
  158. package/dist/cli-bundle/chunks/chunk-W35PHE44.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{chunk-4QSQ6XDK.js → chunk-WT4KXBUD.js} +68 -31
  160. package/dist/cli-bundle/chunks/chunk-WT4KXBUD.js.map +1 -0
  161. package/dist/cli-bundle/chunks/{chunk-RPESLSO5.js → chunk-XC5RVKHH.js} +69 -32
  162. package/dist/cli-bundle/chunks/chunk-XC5RVKHH.js.map +7 -0
  163. package/dist/cli-bundle/chunks/{chunk-QG4GFLQ6.js → chunk-XD6UF2NB.js} +42 -24
  164. package/dist/cli-bundle/chunks/chunk-XD6UF2NB.js.map +7 -0
  165. package/dist/cli-bundle/chunks/{chunk-AF2CCM5U.js → chunk-XKRVX4B3.js} +4 -4
  166. package/dist/cli-bundle/chunks/{chunk-JGUKMMRS.js → chunk-XN4NQZJK.js} +3 -3
  167. package/dist/cli-bundle/chunks/{chunk-3P7UJQOX.js → chunk-YKFMLQNK.js} +2 -2
  168. package/dist/cli-bundle/chunks/{chunk-YCIUJJOD.js → chunk-YKWKMGL7.js} +2 -2
  169. package/dist/cli-bundle/chunks/{chunk-TOBGV45Y.js → chunk-YUKIFPWK.js} +2 -2
  170. package/dist/cli-bundle/chunks/{chunk-72LQ4TKV.js → chunk-YYEZEP3E.js} +3 -3
  171. package/dist/cli-bundle/chunks/{chunk-X3W65QK3.js → chunk-ZEY3XSZQ.js} +5 -5
  172. package/dist/cli-bundle/chunks/{chunk-MWQ2HC2A.js → chunk-ZKOQHLJP.js} +59 -34
  173. package/dist/cli-bundle/chunks/chunk-ZKOQHLJP.js.map +1 -0
  174. package/dist/cli-bundle/chunks/{chunk-QJIKE24M.js → chunk-ZQ3UMKWE.js} +2 -2
  175. package/dist/cli-bundle/chunks/{chunk-4PUUNQDV.js → chunk-ZVVEWHWK.js} +58 -33
  176. package/dist/cli-bundle/chunks/chunk-ZVVEWHWK.js.map +7 -0
  177. package/dist/cli-bundle/chunks/{chunk-OG5DVFMA.js → chunk-ZXE6SNKO.js} +5 -5
  178. package/dist/cli-bundle/chunks/close-GAUIGOQC.js +12 -0
  179. package/dist/cli-bundle/chunks/{close-QEMOYZN3.js → close-SJIEKNY4.js} +5 -5
  180. package/dist/cli-bundle/chunks/{close-many-RZVTUGBG.js → close-many-B6AIC5OQ.js} +15 -14
  181. package/dist/cli-bundle/chunks/close-many-QCINT6I2.js +24 -0
  182. package/dist/cli-bundle/chunks/comments-4SK5EUEJ.js +13 -0
  183. package/dist/cli-bundle/chunks/{comments-TPU7QRBL.js → comments-DM5KV2RS.js} +7 -7
  184. package/dist/cli-bundle/chunks/copy-4KCCLTYQ.js +10 -0
  185. package/dist/cli-bundle/chunks/{copy-DKTSSCK7.js → copy-HEP5SZHB.js} +5 -4
  186. package/dist/cli-bundle/chunks/create-BDKQFPRE.js +30 -0
  187. package/dist/cli-bundle/chunks/{create-EIFBIVNQ.js → create-VCGBCYL2.js} +11 -10
  188. package/dist/cli-bundle/chunks/delete-JWDXPR3H.js +10 -0
  189. package/dist/cli-bundle/chunks/{delete-LCS3VPDH.js → delete-ZSPBTVJD.js} +4 -4
  190. package/dist/cli-bundle/chunks/{deps-YG7UF3VR.js → deps-BZTWWOIE.js} +6 -6
  191. package/dist/cli-bundle/chunks/{deps-UH5EQQUY.js → deps-OVAJOQIE.js} +6 -6
  192. package/dist/cli-bundle/chunks/{docs-G32TK6XS.js → docs-3GFMSWLL.js} +6 -6
  193. package/dist/cli-bundle/chunks/docs-SY2NPT6Y.js +14 -0
  194. package/dist/cli-bundle/chunks/{files-4ALMCSKB.js → files-2SEL4QIU.js} +6 -6
  195. package/dist/cli-bundle/chunks/{files-3H32UQ4K.js → files-FYMMJGNN.js} +6 -6
  196. package/dist/cli-bundle/chunks/focus-4A27YJ2Z.js +10 -0
  197. package/dist/cli-bundle/chunks/{focus-7SOUT5PZ.js → focus-TEUJKTAT.js} +5 -5
  198. package/dist/cli-bundle/chunks/history-compact-7QOKL2NB.js +16 -0
  199. package/dist/cli-bundle/chunks/{history-compact-77BT2LUB.js → history-compact-U7A37VR6.js} +6 -6
  200. package/dist/cli-bundle/chunks/{history-redact-LJPZPNFA.js → history-redact-TNKUO4ZE.js} +4 -4
  201. package/dist/cli-bundle/chunks/{history-redact-PWTTJ3XS.js → history-redact-ZWRUWQY3.js} +4 -4
  202. package/dist/cli-bundle/chunks/{history-repair-I7CBNCV3.js → history-repair-6IU5VWHN.js} +7 -7
  203. package/dist/cli-bundle/chunks/history-repair-GWCGJUM2.js +17 -0
  204. package/dist/cli-bundle/chunks/learnings-DDFAUUX3.js +13 -0
  205. package/dist/cli-bundle/chunks/{learnings-KTYW3AL7.js → learnings-GOEZXMKL.js} +7 -7
  206. package/dist/cli-bundle/chunks/{notes-ZERD3KB2.js → notes-BZWODAEK.js} +7 -7
  207. package/dist/cli-bundle/chunks/notes-OBJ6FL36.js +13 -0
  208. package/dist/cli-bundle/chunks/{plan-OFJUBIM5.js → plan-V57VQTAG.js} +12 -11
  209. package/dist/cli-bundle/chunks/plan-ZMOBD6FX.js +27 -0
  210. package/dist/cli-bundle/chunks/{profile-3THJPIQY.js → profile-BG3N4ETA.js} +9 -9
  211. package/dist/cli-bundle/chunks/{profile-XEZAMMBW.js → profile-XLM45FKV.js} +9 -9
  212. package/dist/cli-bundle/chunks/{register-list-query-BR435Q2H.js → register-list-query-EYYNTGMF.js} +48 -38
  213. package/dist/cli-bundle/chunks/register-list-query-EYYNTGMF.js.map +1 -0
  214. package/dist/cli-bundle/chunks/{register-list-query-RWTWLOBE.js → register-list-query-WGXJPXXY.js} +47 -37
  215. package/dist/cli-bundle/chunks/register-list-query-WGXJPXXY.js.map +7 -0
  216. package/dist/cli-bundle/chunks/{register-mutation-HLWC2WNP.js → register-mutation-3YSDDVOL.js} +131 -105
  217. package/dist/cli-bundle/chunks/register-mutation-3YSDDVOL.js.map +1 -0
  218. package/dist/cli-bundle/chunks/{register-mutation-ZJX5AZM5.js → register-mutation-VDGUMMUY.js} +131 -105
  219. package/dist/cli-bundle/chunks/register-mutation-VDGUMMUY.js.map +7 -0
  220. package/dist/cli-bundle/chunks/{register-operations-744YBJMV.js → register-operations-H4URGAHX.js} +36 -35
  221. package/dist/cli-bundle/chunks/{register-operations-744YBJMV.js.map → register-operations-H4URGAHX.js.map} +1 -1
  222. package/dist/cli-bundle/chunks/{register-operations-UEBJH6AN.js → register-operations-HSO7X77D.js} +34 -33
  223. package/dist/cli-bundle/chunks/{register-operations-UEBJH6AN.js.map → register-operations-HSO7X77D.js.map} +1 -1
  224. package/dist/cli-bundle/chunks/{register-setup-5DA4UZXI.js → register-setup-HZ2KKXK4.js} +13 -13
  225. package/dist/cli-bundle/chunks/{register-setup-6H25M3BH.js → register-setup-WCBKJ3H3.js} +13 -13
  226. package/dist/cli-bundle/chunks/{restore-6TDVSATY.js → restore-3NGRFDPX.js} +7 -6
  227. package/dist/cli-bundle/chunks/restore-LNVNUWHE.js +15 -0
  228. package/dist/cli-bundle/chunks/{schema-TPVTIJPO.js → schema-LMFZ742C.js} +6 -6
  229. package/dist/cli-bundle/chunks/{schema-HFXFSGPG.js → schema-O34O33UW.js} +6 -6
  230. package/dist/cli-bundle/chunks/update-BN6VZSYX.js +24 -0
  231. package/dist/cli-bundle/chunks/{update-LJZCL5SI.js → update-FDLPLKOB.js} +14 -13
  232. package/dist/cli-bundle/chunks/update-many-WCKOPN3K.js +35 -0
  233. package/dist/cli-bundle/chunks/update-many-WCKOPN3K.js.map +7 -0
  234. package/dist/cli-bundle/chunks/update-many-X6DVGOMM.js +39 -0
  235. package/dist/cli-bundle/chunks/update-many-X6DVGOMM.js.map +1 -0
  236. package/dist/cli-bundle/main.js +65 -64
  237. package/dist/cli-bundle/main.js.map +2 -2
  238. package/dist/cli-bundle/sdk-runtime.js +53 -52
  239. package/dist/cli-bundle/sdk-testing.js +6 -6
  240. package/dist/cli-bundle/sdk.js +362 -56
  241. package/dist/cli-bundle/sdk.js.map +4 -4
  242. package/dist/cli.js +10 -4
  243. package/dist/cli.js.map +1 -1
  244. package/dist/core/diagnostics/remediation.js +7 -2
  245. package/dist/core/diagnostics/remediation.js.map +1 -1
  246. package/dist/core/search/background-refresh.d.ts +3 -1
  247. package/dist/core/search/background-refresh.js +34 -6
  248. package/dist/core/search/background-refresh.js.map +1 -1
  249. package/dist/core/search/cache.js +28 -5
  250. package/dist/core/search/cache.js.map +1 -1
  251. package/dist/core/shared/constants.d.ts +2 -0
  252. package/dist/core/shared/constants.js +29 -24
  253. package/dist/core/shared/constants.js.map +1 -1
  254. package/dist/core/store/item-metadata-cache.d.ts +32 -1
  255. package/dist/core/store/item-metadata-cache.js +289 -21
  256. package/dist/core/store/item-metadata-cache.js.map +1 -1
  257. package/dist/core/store/item-store.js +71 -34
  258. package/dist/core/store/item-store.js.map +1 -1
  259. package/dist/core/store/settings.js +9 -3
  260. package/dist/core/store/settings.js.map +1 -1
  261. package/dist/sdk/cli-bootstrap.js +68 -76
  262. package/dist/sdk/cli-bootstrap.js.map +1 -1
  263. package/dist/sdk/compile-cache.d.ts +16 -0
  264. package/dist/sdk/compile-cache.js +73 -0
  265. package/dist/sdk/compile-cache.js.map +1 -0
  266. package/dist/sdk/context-relevance.d.ts +16 -1
  267. package/dist/sdk/context-relevance.js +20 -8
  268. package/dist/sdk/context-relevance.js.map +1 -1
  269. package/dist/sdk/context-signal-store.d.ts +77 -0
  270. package/dist/sdk/context-signal-store.js +201 -0
  271. package/dist/sdk/context-signal-store.js.map +1 -0
  272. package/dist/sdk/dependency-provenance.d.ts +12 -0
  273. package/dist/sdk/dependency-provenance.js +38 -0
  274. package/dist/sdk/dependency-provenance.js.map +1 -0
  275. package/dist/sdk/governance/storage-integrity.d.ts +1 -1
  276. package/dist/sdk/governance/storage-integrity.js +47 -6
  277. package/dist/sdk/governance/storage-integrity.js.map +1 -1
  278. package/dist/sdk/graph/assembly.d.ts +2 -0
  279. package/dist/sdk/graph/assembly.js +51 -4
  280. package/dist/sdk/graph/assembly.js.map +1 -1
  281. package/dist/sdk/graph/run.js +12 -13
  282. package/dist/sdk/graph/run.js.map +1 -1
  283. package/dist/sdk/index.d.ts +5 -0
  284. package/dist/sdk/index.js +7 -2
  285. package/dist/sdk/index.js.map +1 -1
  286. package/dist/sdk/item-metadata-index.d.ts +11 -0
  287. package/dist/sdk/item-metadata-index.js +15 -0
  288. package/dist/sdk/item-metadata-index.js.map +1 -0
  289. package/dist/sdk/merge/index.d.ts +1 -0
  290. package/dist/sdk/merge/index.js +3 -2
  291. package/dist/sdk/merge/index.js.map +1 -1
  292. package/dist/sdk/merge/install.js +25 -9
  293. package/dist/sdk/merge/install.js.map +1 -1
  294. package/dist/sdk/merge/reconcile.d.ts +46 -0
  295. package/dist/sdk/merge/reconcile.js +46 -0
  296. package/dist/sdk/merge/reconcile.js.map +1 -0
  297. package/dist/sdk/query/list.d.ts +5 -4
  298. package/dist/sdk/query/list.js +22 -14
  299. package/dist/sdk/query/list.js.map +1 -1
  300. package/dist/sdk/relationship-history.d.ts +30 -0
  301. package/dist/sdk/relationship-history.js +75 -7
  302. package/dist/sdk/relationship-history.js.map +1 -1
  303. package/dist/sdk/relationship-migration.d.ts +42 -0
  304. package/dist/sdk/relationship-migration.js +78 -0
  305. package/dist/sdk/relationship-migration.js.map +1 -0
  306. package/dist/sdk/structured-mutations.js +4 -25
  307. package/dist/sdk/structured-mutations.js.map +1 -1
  308. package/docs/COMMANDS.md +26 -3
  309. package/docs/CONFIGURATION.md +1 -1
  310. package/docs/MERGE_SAFETY.md +14 -5
  311. package/docs/PERFORMANCE.md +28 -0
  312. package/docs/RELATIONSHIP_GRAPH.md +47 -1
  313. package/docs/SDK.md +78 -5
  314. package/marketplace.json +2 -2
  315. package/package.json +2 -2
  316. package/packages/pm-beads/package.json +1 -1
  317. package/packages/pm-calendar/package.json +1 -1
  318. package/packages/pm-command-kit/package.json +1 -1
  319. package/packages/pm-governance-audit/package.json +1 -1
  320. package/packages/pm-guide-shell/package.json +1 -1
  321. package/packages/pm-kanban/package.json +1 -1
  322. package/packages/pm-lifecycle-hooks/package.json +1 -1
  323. package/packages/pm-linked-test-adapters/package.json +1 -1
  324. package/packages/pm-search-advanced/package.json +1 -1
  325. package/packages/pm-templates/package.json +1 -1
  326. package/packages/pm-todos/package.json +1 -1
  327. package/packages/pm-vcs/package.json +1 -1
  328. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  329. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  330. package/dist/cli-bundle/chunks/append-DFETHAZL.js +0 -11
  331. package/dist/cli-bundle/chunks/chunk-4PUUNQDV.js.map +0 -7
  332. package/dist/cli-bundle/chunks/chunk-4QSQ6XDK.js.map +0 -1
  333. package/dist/cli-bundle/chunks/chunk-7AVEY74G.js.map +0 -7
  334. package/dist/cli-bundle/chunks/chunk-7DOJC3HS.js.map +0 -1
  335. package/dist/cli-bundle/chunks/chunk-7RW4JCU2.js.map +0 -7
  336. package/dist/cli-bundle/chunks/chunk-ADBTSVGK.js.map +0 -7
  337. package/dist/cli-bundle/chunks/chunk-AMJPSANK.js.map +0 -7
  338. package/dist/cli-bundle/chunks/chunk-AS4SAZ5R.js.map +0 -7
  339. package/dist/cli-bundle/chunks/chunk-ATBCUC7Y.js.map +0 -1
  340. package/dist/cli-bundle/chunks/chunk-BKIAH72N.js.map +0 -1
  341. package/dist/cli-bundle/chunks/chunk-FJIFFBJX.js.map +0 -1
  342. package/dist/cli-bundle/chunks/chunk-HYW67VJ5.js.map +0 -1
  343. package/dist/cli-bundle/chunks/chunk-ICDAQ4TD.js.map +0 -1
  344. package/dist/cli-bundle/chunks/chunk-IY6VZ3IW.js.map +0 -7
  345. package/dist/cli-bundle/chunks/chunk-JFD5LPMI.js.map +0 -1
  346. package/dist/cli-bundle/chunks/chunk-K36WV5J6.js.map +0 -1
  347. package/dist/cli-bundle/chunks/chunk-K55VMLSS.js.map +0 -7
  348. package/dist/cli-bundle/chunks/chunk-MWQ2HC2A.js.map +0 -1
  349. package/dist/cli-bundle/chunks/chunk-NUF7ROFH.js.map +0 -1
  350. package/dist/cli-bundle/chunks/chunk-O4BCOJTZ.js.map +0 -7
  351. package/dist/cli-bundle/chunks/chunk-POG76WWZ.js.map +0 -1
  352. package/dist/cli-bundle/chunks/chunk-PQSEQD6E.js.map +0 -1
  353. package/dist/cli-bundle/chunks/chunk-QG4GFLQ6.js.map +0 -7
  354. package/dist/cli-bundle/chunks/chunk-R3P6FZJW.js.map +0 -1
  355. package/dist/cli-bundle/chunks/chunk-RNPZYNHS.js.map +0 -1
  356. package/dist/cli-bundle/chunks/chunk-RPESLSO5.js.map +0 -7
  357. package/dist/cli-bundle/chunks/chunk-SY4SFZSD.js.map +0 -7
  358. package/dist/cli-bundle/chunks/chunk-XJTABV3X.js.map +0 -1
  359. package/dist/cli-bundle/chunks/chunk-YQWCZ5AC.js.map +0 -7
  360. package/dist/cli-bundle/chunks/chunk-Z75ONV25.js.map +0 -7
  361. package/dist/cli-bundle/chunks/chunk-ZTVA4KLN.js.map +0 -7
  362. package/dist/cli-bundle/chunks/close-O5QVZ6ET.js +0 -12
  363. package/dist/cli-bundle/chunks/close-many-5RZXVN4J.js +0 -23
  364. package/dist/cli-bundle/chunks/comments-Z4KV6FU3.js +0 -13
  365. package/dist/cli-bundle/chunks/copy-M7DDI6LS.js +0 -9
  366. package/dist/cli-bundle/chunks/create-RGSPN5GD.js +0 -29
  367. package/dist/cli-bundle/chunks/delete-MD7YXQLH.js +0 -10
  368. package/dist/cli-bundle/chunks/docs-JWWNRC27.js +0 -14
  369. package/dist/cli-bundle/chunks/focus-DRQ6FQH6.js +0 -10
  370. package/dist/cli-bundle/chunks/history-compact-VCKGTX64.js +0 -16
  371. package/dist/cli-bundle/chunks/history-repair-YTDZRK5E.js +0 -17
  372. package/dist/cli-bundle/chunks/learnings-CYNOICKR.js +0 -13
  373. package/dist/cli-bundle/chunks/notes-FGO63FXL.js +0 -13
  374. package/dist/cli-bundle/chunks/plan-SGCDDTYR.js +0 -26
  375. package/dist/cli-bundle/chunks/register-list-query-BR435Q2H.js.map +0 -1
  376. package/dist/cli-bundle/chunks/register-list-query-RWTWLOBE.js.map +0 -7
  377. package/dist/cli-bundle/chunks/register-mutation-HLWC2WNP.js.map +0 -1
  378. package/dist/cli-bundle/chunks/register-mutation-ZJX5AZM5.js.map +0 -7
  379. package/dist/cli-bundle/chunks/restore-RSL7C7LO.js +0 -14
  380. package/dist/cli-bundle/chunks/update-SIA7LH5Y.js +0 -23
  381. package/dist/cli-bundle/chunks/update-many-BDBZVGQL.js +0 -38
  382. package/dist/cli-bundle/chunks/update-many-MOY3A5B3.js +0 -34
  383. /package/dist/cli-bundle/chunks/{append-7OVFYR3C.js.map → append-CYMA7RJT.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{append-DFETHAZL.js.map → append-H53CAPMP.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-PFNHX655.js.map → chunk-2P7OK4WG.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-EJDGV4GR.js.map → chunk-3EBGHNNQ.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-DZRV2OPA.js.map → chunk-3EDFN3VV.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-ZOY5K4D3.js.map → chunk-3PWJWLLQ.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{chunk-VXOOB6YX.js.map → chunk-3SJAR3CY.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-GTLCVJOE.js.map → chunk-3WVKMF2A.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-LAV26CQG.js.map → chunk-42SYYKA4.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-NLR32VFS.js.map → chunk-4IXLNV7W.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-ABWCF646.js.map → chunk-4YTQVO3V.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-E5XMKOSB.js.map → chunk-5EBRMHI6.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-GKX4NJ7U.js.map → chunk-5K5LHZZX.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-T6PPNM7V.js.map → chunk-5K7BOAB6.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-4QOB7L7I.js.map → chunk-5MUZ54G2.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-SF3DT5HJ.js.map → chunk-5QME4KX2.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{chunk-TRSHFPRZ.js.map → chunk-6PM6CPPP.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{chunk-OR42SO64.js.map → chunk-7B36A3VT.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{chunk-QWRVBJ4D.js.map → chunk-7OR2YKKD.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{chunk-FPBMLYPI.js.map → chunk-7QUV54XX.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{chunk-WWNL6WMH.js.map → chunk-7WXW6JHG.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{chunk-BXNDKOR2.js.map → chunk-A2VL5SVG.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{close-QEMOYZN3.js.map → chunk-AXGDUXJW.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{chunk-IAQE32BI.js.map → chunk-B2AVNGG3.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{chunk-HCEBZNC3.js.map → chunk-BRMPF2RM.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{chunk-Z7VWXXJM.js.map → chunk-BTNKMF2A.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{chunk-KH44WBAT.js.map → chunk-CD4643VW.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{chunk-OWXOPDHD.js.map → chunk-CJEEC5O4.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{chunk-PZC2FUOQ.js.map → chunk-CTPKCZCF.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{chunk-7W2UAXXT.js.map → chunk-D4OBQVL3.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{chunk-EWJWSNRU.js.map → chunk-DM4TYC2A.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{chunk-VJQG4BIM.js.map → chunk-DSFTAQ7T.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{chunk-AELMUANP.js.map → chunk-DVB6SQU7.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{chunk-KBLZ3AA5.js.map → chunk-E3ZWOFSO.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{close-O5QVZ6ET.js.map → chunk-EP25DV6P.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-GTK4DTEW.js.map → chunk-F4VCB4WY.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-V22ZPOKN.js.map → chunk-F4XAQUQA.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-QOOTOD3W.js.map → chunk-FGR6IBAF.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-JSLT7WVE.js.map → chunk-FKBMT2Q6.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-QIH77CAG.js.map → chunk-G5RLSSIX.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-P7MTHPJQ.js.map → chunk-GEKRVH3G.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-2L6ZP22J.js.map → chunk-GSP6IZFU.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-ZVZGXPQ5.js.map → chunk-HYZZM3Q2.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-4XGJLADW.js.map → chunk-IHY5SX7O.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-UCBDQI5E.js.map → chunk-IMU7JLUI.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-PEQGTJ5Q.js.map → chunk-JCLXCGIL.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-GROYI4RB.js.map → chunk-JLTHOYR7.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-JHJSFOAM.js.map → chunk-JMPVHM44.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-MATHDCGG.js.map → chunk-JWYG36RV.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-VLRGDBLY.js.map → chunk-KEHOPUHH.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-CPX275C6.js.map → chunk-KPCZL2YK.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-FO6OSVEN.js.map → chunk-LANV45W2.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-LVC72YRD.js.map → chunk-LC5ZUXWE.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-TVYYO5A7.js.map → chunk-MBHYQYCS.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-7656MAUL.js.map → chunk-MUAJHL2R.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-7WCE6Y64.js.map → chunk-NUQCSV4P.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-SZVB53Y3.js.map → chunk-O3GFE2PX.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-OY7DMU5P.js.map → chunk-O43LEUSD.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-LZYP423P.js.map → chunk-OZ25YD4Q.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-VZIZB6QH.js.map → chunk-PKYKQCTJ.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-UZLJOEAC.js.map → chunk-PMRED6QZ.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-K4CI6Y45.js.map → chunk-PWGJCP2V.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-UVN66B3M.js.map → chunk-Q3Z2Y5WJ.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-R7QV7ICM.js.map → chunk-QSXN2FAN.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-5NTE36LD.js.map → chunk-RBECHH5K.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-JXCW2TI2.js.map → chunk-RPNC7M63.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-F2LBF7XJ.js.map → chunk-SUSFH6F7.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{chunk-VHXHVTUU.js.map → chunk-TDOPC7UY.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{chunk-FSE2IKJQ.js.map → chunk-TWHG646K.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{chunk-OCUBRA6D.js.map → chunk-U7U7WGEC.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-PONKZPCJ.js.map → chunk-UFRVIIJ2.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-VNTCM3VW.js.map → chunk-VKX2VZZH.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-6JUTHVQS.js.map → chunk-W2JDNTN3.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-AF2CCM5U.js.map → chunk-XKRVX4B3.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{chunk-JGUKMMRS.js.map → chunk-XN4NQZJK.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{chunk-3P7UJQOX.js.map → chunk-YKFMLQNK.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{chunk-YCIUJJOD.js.map → chunk-YKWKMGL7.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{chunk-TOBGV45Y.js.map → chunk-YUKIFPWK.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{chunk-72LQ4TKV.js.map → chunk-YYEZEP3E.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{chunk-X3W65QK3.js.map → chunk-ZEY3XSZQ.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{chunk-QJIKE24M.js.map → chunk-ZQ3UMKWE.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{chunk-OG5DVFMA.js.map → chunk-ZXE6SNKO.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{close-many-5RZXVN4J.js.map → close-GAUIGOQC.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{close-many-RZVTUGBG.js.map → close-SJIEKNY4.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{comments-TPU7QRBL.js.map → close-many-B6AIC5OQ.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{comments-Z4KV6FU3.js.map → close-many-QCINT6I2.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{copy-M7DDI6LS.js.map → comments-4SK5EUEJ.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{copy-DKTSSCK7.js.map → comments-DM5KV2RS.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{create-RGSPN5GD.js.map → copy-4KCCLTYQ.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{create-EIFBIVNQ.js.map → copy-HEP5SZHB.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{delete-MD7YXQLH.js.map → create-BDKQFPRE.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{delete-LCS3VPDH.js.map → create-VCGBCYL2.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{deps-YG7UF3VR.js.map → delete-JWDXPR3H.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{deps-UH5EQQUY.js.map → delete-ZSPBTVJD.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{docs-JWWNRC27.js.map → deps-BZTWWOIE.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{docs-G32TK6XS.js.map → deps-OVAJOQIE.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{files-3H32UQ4K.js.map → docs-3GFMSWLL.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{files-4ALMCSKB.js.map → docs-SY2NPT6Y.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{focus-DRQ6FQH6.js.map → files-2SEL4QIU.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{focus-7SOUT5PZ.js.map → files-FYMMJGNN.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{history-compact-VCKGTX64.js.map → focus-4A27YJ2Z.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{history-compact-77BT2LUB.js.map → focus-TEUJKTAT.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{history-redact-PWTTJ3XS.js.map → history-compact-7QOKL2NB.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{history-redact-LJPZPNFA.js.map → history-compact-U7A37VR6.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{history-repair-I7CBNCV3.js.map → history-redact-TNKUO4ZE.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{history-repair-YTDZRK5E.js.map → history-redact-ZWRUWQY3.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{learnings-KTYW3AL7.js.map → history-repair-6IU5VWHN.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{learnings-CYNOICKR.js.map → history-repair-GWCGJUM2.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{notes-FGO63FXL.js.map → learnings-DDFAUUX3.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{notes-ZERD3KB2.js.map → learnings-GOEZXMKL.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{plan-OFJUBIM5.js.map → notes-BZWODAEK.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{plan-SGCDDTYR.js.map → notes-OBJ6FL36.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{profile-3THJPIQY.js.map → plan-V57VQTAG.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{profile-XEZAMMBW.js.map → plan-ZMOBD6FX.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{restore-6TDVSATY.js.map → profile-BG3N4ETA.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{restore-RSL7C7LO.js.map → profile-XLM45FKV.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{register-setup-5DA4UZXI.js.map → register-setup-HZ2KKXK4.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{register-setup-6H25M3BH.js.map → register-setup-WCBKJ3H3.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{schema-TPVTIJPO.js.map → restore-3NGRFDPX.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{schema-HFXFSGPG.js.map → restore-LNVNUWHE.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{update-LJZCL5SI.js.map → schema-LMFZ742C.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{update-SIA7LH5Y.js.map → schema-O34O33UW.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{update-many-MOY3A5B3.js.map → update-BN6VZSYX.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{update-many-BDBZVGQL.js.map → update-FDLPLKOB.js.map} +0 -0
@@ -1,17 +1,17 @@
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]="39413a08-0b6f-5fb4-8e45-d039b2979e25")}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]="50e62ca5-fc65-568e-b9ef-4b45850e4d6f")}catch(e){}}();
3
3
  import {
4
4
  EXECUTABLE_COMMAND_ALIASES,
5
5
  resolveSubcommandFlagContractsForCommand
6
- } from "./chunk-FSE2IKJQ.js";
6
+ } from "./chunk-TWHG646K.js";
7
7
  import {
8
8
  writeStdout
9
- } from "./chunk-VJQG4BIM.js";
9
+ } from "./chunk-DSFTAQ7T.js";
10
10
  import {
11
11
  EXIT_CODE,
12
12
  PmCliError,
13
13
  levenshteinDistanceWithinLimit
14
- } from "./chunk-HYW67VJ5.js";
14
+ } from "./chunk-TLF52ZDP.js";
15
15
 
16
16
  // dist/sdk/error-runtime.js
17
17
  function describeUnknownError(error) {
@@ -100,59 +100,48 @@ var BOOTSTRAP_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
100
100
  "--quiet",
101
101
  "--lean"
102
102
  ]);
103
+ function consumeBootstrapGlobalToken(argv, index, state) {
104
+ const token = argv[index];
105
+ if (BOOTSTRAP_BOOLEAN_FLAGS.has(token)) {
106
+ state.booleanFlags.add(token);
107
+ return 1;
108
+ }
109
+ const parsedPath = parseBootstrapPathToken(token, argv[index + 1]);
110
+ if (parsedPath) {
111
+ if (parsedPath.pathValue !== void 0) {
112
+ if (parsedPath.preferred)
113
+ state.pmPathValue = parsedPath.pathValue;
114
+ else
115
+ state.legacyPathValue = parsedPath.pathValue;
116
+ }
117
+ return parsedPath.consumed;
118
+ }
119
+ if (token === "--author") {
120
+ const consumesValue = consumesBootstrapAuthorValue(argv[index + 1]);
121
+ state.author = consumesValue ? argv[index + 1] : "";
122
+ return consumesValue ? 2 : 1;
123
+ }
124
+ if (token.startsWith("--author=")) {
125
+ state.author = token.slice("--author=".length);
126
+ }
127
+ return 1;
128
+ }
103
129
  function parseBootstrapGlobalOptions(argv) {
104
- let legacyPathValue;
105
- let pmPathValue;
106
- const booleanFlags = /* @__PURE__ */ new Set();
107
- let author;
130
+ const state = { booleanFlags: /* @__PURE__ */ new Set() };
108
131
  let index = 0;
109
132
  while (index < argv.length) {
110
- const token = argv[index];
111
- if (token === "--") {
133
+ if (argv[index] === "--")
112
134
  break;
113
- }
114
- if (BOOTSTRAP_BOOLEAN_FLAGS.has(token)) {
115
- booleanFlags.add(token);
116
- index += 1;
117
- continue;
118
- }
119
- const parsedPath = parseBootstrapPathToken(token, argv[index + 1]);
120
- if (parsedPath) {
121
- if (parsedPath.pathValue !== void 0) {
122
- if (parsedPath.preferred) {
123
- pmPathValue = parsedPath.pathValue;
124
- } else {
125
- legacyPathValue = parsedPath.pathValue;
126
- }
127
- }
128
- index += parsedPath.consumed;
129
- continue;
130
- }
131
- if (token === "--author") {
132
- if (consumesBootstrapAuthorValue(argv[index + 1])) {
133
- author = argv[index + 1];
134
- index += 2;
135
- } else {
136
- author = "";
137
- index += 1;
138
- }
139
- continue;
140
- }
141
- if (token.startsWith("--author=")) {
142
- author = token.slice("--author=".length);
143
- index += 1;
144
- continue;
145
- }
146
- index += 1;
135
+ index += consumeBootstrapGlobalToken(argv, index, state);
147
136
  }
148
137
  return {
149
- path: pmPathValue ?? legacyPathValue,
150
- noExtensions: booleanFlags.has("--no-extensions"),
151
- noPager: booleanFlags.has("--no-pager"),
152
- json: booleanFlags.has("--json"),
153
- quiet: booleanFlags.has("--quiet"),
154
- lean: booleanFlags.has("--lean"),
155
- ...author === "" ? { authorMissingValue: true } : author !== void 0 ? { author } : {}
138
+ path: state.pmPathValue ?? state.legacyPathValue,
139
+ noExtensions: state.booleanFlags.has("--no-extensions"),
140
+ noPager: state.booleanFlags.has("--no-pager"),
141
+ json: state.booleanFlags.has("--json"),
142
+ quiet: state.booleanFlags.has("--quiet"),
143
+ lean: state.booleanFlags.has("--lean"),
144
+ ...state.author === "" ? { authorMissingValue: true } : state.author !== void 0 ? { author: state.author } : {}
156
145
  };
157
146
  }
158
147
  function stripGlobalBootstrapTokens(argv) {
@@ -706,27 +695,13 @@ function mergeLinkedTestTwoTokenEntries(argv, commandName, trace) {
706
695
  }
707
696
  return result;
708
697
  }
709
- function normalizeBootstrapInvocation(argv) {
710
- const trace = [];
711
- const legacyNormalized = normalizeLegacyExtensionActionSyntax(argv);
712
- if (legacyNormalized.length !== argv.length || legacyNormalized.some((token, index) => token !== argv[index])) {
713
- trace.push({
714
- from: argv.join(" "),
715
- to: [...legacyNormalized],
716
- reason: "legacy_extension_action",
717
- confidence: "high"
718
- });
719
- }
720
- const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);
721
- const commandName = parseBootstrapCommandName(aliasNormalized);
722
- const commandPathName = parseBootstrapCommandPathName(aliasNormalized);
723
- const lookup = buildFlagLookup(commandPathName ?? commandName);
698
+ function normalizeBootstrapTokens(argv, lookup, commandName, trace) {
724
699
  const normalizedArgv = [];
725
- const pathValueIndices = collectBootstrapPathValueIndices(aliasNormalized);
726
- for (let index = 0; index < aliasNormalized.length; index += 1) {
727
- const token = aliasNormalized[index];
700
+ const pathValueIndices = collectBootstrapPathValueIndices(argv);
701
+ for (let index = 0; index < argv.length; index += 1) {
702
+ const token = argv[index];
728
703
  if (token === "--") {
729
- normalizedArgv.push(...aliasNormalized.slice(index));
704
+ normalizedArgv.push(...argv.slice(index));
730
705
  break;
731
706
  }
732
707
  const preserveCurrentToken = pathValueIndices.has(index);
@@ -734,9 +709,8 @@ function normalizeBootstrapInvocation(argv) {
734
709
  if (token.startsWith("--")) {
735
710
  const normalizedToken = normalizeLongOptionToken(token, lookup, preserveCurrentToken);
736
711
  normalizedArgv.push(...normalizedToken.tokens);
737
- if (normalizedToken.event) {
712
+ if (normalizedToken.event)
738
713
  trace.push(normalizedToken.event);
739
- }
740
714
  continue;
741
715
  }
742
716
  const bareKeyValue = parseBareKeyValueToken(token, preserveCurrentToken);
@@ -756,6 +730,24 @@ function normalizeBootstrapInvocation(argv) {
756
730
  }
757
731
  normalizedArgv.push(token);
758
732
  }
733
+ return normalizedArgv;
734
+ }
735
+ function normalizeBootstrapInvocation(argv) {
736
+ const trace = [];
737
+ const legacyNormalized = normalizeLegacyExtensionActionSyntax(argv);
738
+ if (legacyNormalized.length !== argv.length || legacyNormalized.some((token, index) => token !== argv[index])) {
739
+ trace.push({
740
+ from: argv.join(" "),
741
+ to: [...legacyNormalized],
742
+ reason: "legacy_extension_action",
743
+ confidence: "high"
744
+ });
745
+ }
746
+ const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);
747
+ const commandName = parseBootstrapCommandName(aliasNormalized);
748
+ const commandPathName = parseBootstrapCommandPathName(aliasNormalized);
749
+ const lookup = buildFlagLookup(commandPathName ?? commandName);
750
+ const normalizedArgv = normalizeBootstrapTokens(aliasNormalized, lookup, commandName, trace);
759
751
  const linkedTestNormalized = mergeLinkedTestTwoTokenEntries(normalizedArgv, commandName, trace);
760
752
  const coalesced = coalesceRepeatedListFlags(linkedTestNormalized, lookup.listCanonicalFlags, GLOBAL_VALUE_CONSUMING_FLAGS, commandName === "create" ? /* @__PURE__ */ new Set(["--tags"]) : /* @__PURE__ */ new Set());
761
753
  for (const event of coalesced.events) {
@@ -860,6 +852,6 @@ export {
860
852
  applyInvocationAuthorOverride,
861
853
  createPmCliProgram
862
854
  };
863
- //# sourceMappingURL=chunk-FJIFFBJX.js.map
855
+ //# sourceMappingURL=chunk-MROP2RNT.js.map
864
856
 
865
- //# debugId=39413a08-0b6f-5fb4-8e45-d039b2979e25
857
+ //# debugId=50e62ca5-fc65-568e-b9ef-4b45850e4d6f
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../sdk/error-runtime.ts","../../../../../../../../sdk/cli-bootstrap.ts","../../../../../../../../sdk/invocation-author.ts","../../../../../../../../sdk/cli-program.ts"],"sourcesContent":["/**\n * @module sdk/error-runtime\n *\n * Provides presentation-independent normalization for values thrown through CLI and SDK runtimes.\n */\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\n\n/** Returns a stable message for errors and unknown thrown values. */\nexport function describeUnknownError(error: unknown): string {\n if (error instanceof PmCliError) {\n return error.message;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return \"Unknown failure\";\n}\n\n/** Reads a finite numeric exit code from an arbitrary thrown value. */\nexport function readThrownExitCode(error: unknown): number | undefined {\n if (typeof error !== \"object\" || error === null || !(\"exitCode\" in error)) {\n return undefined;\n }\n const exitCode = (error as { exitCode?: unknown }).exitCode;\n return typeof exitCode === \"number\" && Number.isFinite(exitCode)\n ? exitCode\n : undefined;\n}\n\n/** Normalizes thrown exit codes to a positive integer failure status. */\nexport function normalizeThrownExitCode(exitCode: number): number {\n const normalized = Math.trunc(exitCode);\n return normalized > EXIT_CODE.SUCCESS\n ? normalized\n : EXIT_CODE.GENERIC_FAILURE;\n}\n\n/** Identifies errors emitted by Commander without importing its private classes. */\nexport function isCommanderError(error: unknown): boolean {\n return (\n typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n typeof (error as { code?: unknown }).code === \"string\" &&\n (error as { code: string }).code.startsWith(\"commander.\")\n );\n}\n\n/** Converts non-Error thrown values into errors suitable for Sentry capture. */\nexport function wrapThrownErrorForSentry(\n error: unknown,\n message: string,\n): Error {\n if (error instanceof Error) {\n return error;\n }\n const wrapped = new Error(message) as Error & { exitCode?: number };\n const exitCode = readThrownExitCode(error);\n /* c8 ignore next */\n if (exitCode !== undefined) {\n wrapped.exitCode = normalizeThrownExitCode(exitCode);\n }\n return wrapped;\n}\n","/**\n * @module sdk/cli-bootstrap\n *\n * Provides public bootstrap argument normalization for embedded CLI hosts.\n */\nimport {\n EXECUTABLE_COMMAND_ALIASES,\n resolveSubcommandFlagContractsForCommand,\n type CliFlagContract,\n} from \"./cli-contracts.js\";\nexport { EXECUTABLE_COMMAND_ALIASES };\nimport { levenshteinDistanceWithinLimit } from \"../core/shared/levenshtein.js\";\n\nconst GLOBAL_VALUE_CONSUMING_FLAGS = new Set<string>([\n \"--pm-path\",\n \"--path\",\n \"--author\",\n]);\n\n/** Whether a global value-consuming flag uses its inline `--flag=value` form. */\nconst isInlineGlobalValueToken = (token: string): boolean => {\n const equalsIndex = token.indexOf(\"=\");\n return (\n equalsIndex > 0 &&\n GLOBAL_VALUE_CONSUMING_FLAGS.has(token.slice(0, equalsIndex))\n );\n};\n\n/** Whether optional bootstrap author syntax consumes the following token. */\nconst consumesBootstrapAuthorValue = (next: string | undefined): boolean => {\n return typeof next === \"string\" && !next.startsWith(\"-\");\n};\n\nfunction parseBootstrapPathToken(\n token: string,\n next: string | undefined,\n): { consumed: number; pathValue?: string; preferred: boolean } | null {\n if (token === \"--path\" || token === \"--pm-path\") {\n if (typeof next === \"string\" && next.length > 0) {\n return {\n consumed: 2,\n pathValue: next,\n preferred: token === \"--pm-path\",\n };\n }\n return {\n consumed: 1,\n preferred: token === \"--pm-path\",\n };\n }\n\n const inlinePrefix = token.startsWith(\"--path=\")\n ? \"--path=\"\n : token.startsWith(\"--pm-path=\")\n ? \"--pm-path=\"\n : undefined;\n if (!inlinePrefix) {\n return null;\n }\n\n const value = token.slice(inlinePrefix.length);\n if (value.length > 0) {\n return {\n consumed: 1,\n pathValue: value,\n preferred: inlinePrefix === \"--pm-path=\",\n };\n }\n return {\n consumed: 1,\n preferred: inlinePrefix === \"--pm-path=\",\n };\n}\n\n/** Documents the bootstrap global options payload exchanged by command, SDK, and package integrations. */\nexport interface BootstrapGlobalOptions {\n /** Filesystem path used for path resolution. */\n path?: string;\n /** Value that configures or reports no extensions for this contract. */\n noExtensions: boolean;\n /** Value that configures or reports no pager for this contract. */\n noPager: boolean;\n /** Value that configures or reports json for this contract. */\n json: boolean;\n /** Value that configures or reports quiet for this contract. */\n quiet: boolean;\n /** Whether compact JSON projection is requested. */\n lean: boolean;\n /** Invocation-wide mutation author override. */\n author?: string;\n /** Whether `--author` was present without its required value. */\n authorMissingValue?: true;\n}\n\nconst BOOTSTRAP_BOOLEAN_FLAGS = new Set([\n \"--no-extensions\",\n \"--no-pager\",\n \"--json\",\n \"--quiet\",\n \"--lean\",\n]);\n\ninterface BootstrapGlobalParseState {\n /** Last legacy `--path` value. */\n legacyPathValue?: string;\n /** Last preferred `--pm-path` value. */\n pmPathValue?: string;\n /** Boolean global flags observed before the command terminator. */\n booleanFlags: Set<string>;\n /** Author value, with an empty string marking a missing value. */\n author?: string;\n}\n\n/** Consume one bootstrap-global token and update the accumulated parse state. */\nfunction consumeBootstrapGlobalToken(\n argv: string[],\n index: number,\n state: BootstrapGlobalParseState,\n): number {\n const token = argv[index];\n if (BOOTSTRAP_BOOLEAN_FLAGS.has(token)) {\n state.booleanFlags.add(token);\n return 1;\n }\n const parsedPath = parseBootstrapPathToken(token, argv[index + 1]);\n if (parsedPath) {\n if (parsedPath.pathValue !== undefined) {\n if (parsedPath.preferred) state.pmPathValue = parsedPath.pathValue;\n else state.legacyPathValue = parsedPath.pathValue;\n }\n return parsedPath.consumed;\n }\n if (token === \"--author\") {\n const consumesValue = consumesBootstrapAuthorValue(argv[index + 1]);\n state.author = consumesValue ? argv[index + 1] : \"\";\n return consumesValue ? 2 : 1;\n }\n if (token.startsWith(\"--author=\")) {\n state.author = token.slice(\"--author=\".length);\n }\n return 1;\n}\n\n/** Implements parse bootstrap global options for the public runtime surface of this module. */\nexport function parseBootstrapGlobalOptions(\n argv: string[],\n): BootstrapGlobalOptions {\n const state: BootstrapGlobalParseState = { booleanFlags: new Set() };\n let index = 0;\n while (index < argv.length) {\n if (argv[index] === \"--\") break;\n index += consumeBootstrapGlobalToken(argv, index, state);\n }\n return {\n path: state.pmPathValue ?? state.legacyPathValue,\n noExtensions: state.booleanFlags.has(\"--no-extensions\"),\n noPager: state.booleanFlags.has(\"--no-pager\"),\n json: state.booleanFlags.has(\"--json\"),\n quiet: state.booleanFlags.has(\"--quiet\"),\n lean: state.booleanFlags.has(\"--lean\"),\n ...(state.author === \"\"\n ? { authorMissingValue: true }\n : state.author !== undefined\n ? { author: state.author }\n : {}),\n };\n}\n\n/** Implements strip global bootstrap tokens for the public runtime surface of this module. */\nexport function stripGlobalBootstrapTokens(argv: string[]): string[] {\n const remaining: string[] = [];\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n break;\n }\n if (\n token === \"--json\" ||\n token === \"--quiet\" ||\n token === \"--lean\" ||\n token === \"--no-extensions\" ||\n token === \"--no-pager\" ||\n token === \"--profile\" ||\n token === \"--id-only\" ||\n token === \"--full-changed-fields\" ||\n token === \"--explain\"\n ) {\n index += 1;\n continue;\n }\n if (token === \"--author\") {\n index += consumesBootstrapAuthorValue(argv[index + 1]) ? 2 : 1;\n continue;\n }\n if (GLOBAL_VALUE_CONSUMING_FLAGS.has(token)) {\n index += 2;\n continue;\n }\n if (isInlineGlobalValueToken(token)) {\n index += 1;\n continue;\n }\n remaining.push(token);\n index += 1;\n }\n return remaining;\n}\n\n/** Documents the bootstrap help request payload exchanged by command, SDK, and package integrations. */\nexport interface BootstrapHelpRequest {\n /** Value that configures or reports requested for this contract. */\n requested: boolean;\n /** Value that configures or reports command path tokens for this contract. */\n commandPathTokens: string[];\n}\n\n/** Implements parse bootstrap help request for the public runtime surface of this module. */\nexport function parseBootstrapHelpRequest(\n argv: string[],\n): BootstrapHelpRequest {\n const stripped = stripGlobalBootstrapTokens(argv);\n const first = stripped[0]?.trim().toLowerCase();\n if (first === \"help\") {\n const commandPathTokens: string[] = [];\n for (let index = 1; index < stripped.length; index += 1) {\n const token = stripped[index];\n if (token.startsWith(\"-\")) {\n break;\n }\n commandPathTokens.push(token.trim().toLowerCase());\n }\n return {\n requested: true,\n commandPathTokens,\n };\n }\n\n const helpFlagIndex = stripped.findIndex(\n (token) => token === \"--help\" || token === \"-h\",\n );\n if (helpFlagIndex < 0) {\n return {\n requested: false,\n commandPathTokens: [],\n };\n }\n\n const commandPathTokens: string[] = [];\n for (const token of stripped) {\n if (token.startsWith(\"-\")) {\n break;\n }\n commandPathTokens.push(token.trim().toLowerCase());\n }\n return {\n requested: true,\n commandPathTokens,\n };\n}\n\n/**\n * Index of the command token in argv — the first non-flag token, skipping the\n * value-consuming/global bootstrap flags. Returns undefined when there is none\n * (bare invocation, only global flags, or a leading `--`). Single source of truth\n * for command-position scanning shared by {@link parseBootstrapCommandName} and the\n * command-alias rewrite so their precedence rules can never drift apart.\n */\nfunction findCommandTokenIndex(argv: string[]): number | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (token === \"--\") {\n return undefined;\n }\n if (token === \"--author\") {\n index += consumesBootstrapAuthorValue(argv[index + 1]) ? 1 : 0;\n continue;\n }\n if (GLOBAL_VALUE_CONSUMING_FLAGS.has(token)) {\n index += 1;\n continue;\n }\n if (\n isInlineGlobalValueToken(token) ||\n token === \"--json\" ||\n token === \"--quiet\" ||\n token === \"--lean\" ||\n token === \"--no-extensions\" ||\n token === \"--no-pager\" ||\n token === \"--profile\" ||\n token === \"--id-only\" ||\n token === \"--explain\"\n ) {\n continue;\n }\n if (token.startsWith(\"-\")) {\n continue;\n }\n return index;\n }\n return undefined;\n}\n\n/** Implements parse bootstrap command name for the public runtime surface of this module. */\nexport function parseBootstrapCommandName(argv: string[]): string | undefined {\n const index = findCommandTokenIndex(argv);\n return index === undefined ? undefined : argv[index].trim().toLowerCase();\n}\n\nfunction shouldDisablePagerForInvocation(\n argv: string[],\n bootstrapGlobal: BootstrapGlobalOptions,\n): boolean {\n if (bootstrapGlobal.noPager) {\n return true;\n }\n if (process.stdout.isTTY === true) {\n return false;\n }\n const helpRequest = parseBootstrapHelpRequest(argv);\n return helpRequest.requested;\n}\n\n/** Implements apply bootstrap pager policy for the public runtime surface of this module. */\nexport function applyBootstrapPagerPolicy(argv: string[]): () => void {\n const pagerEnvironmentKeys = [\n \"PAGER\",\n \"MANPAGER\",\n \"GIT_PAGER\",\n \"LESS\",\n ] as const;\n const previousValues = pagerEnvironmentKeys.map((key) => process.env[key]);\n const restore = (): void => {\n for (const [index, key] of pagerEnvironmentKeys.entries()) {\n const value = previousValues[index];\n if (value === undefined) {\n delete process.env[key];\n } else {\n process.env[key] = value;\n }\n }\n };\n const bootstrapGlobal = parseBootstrapGlobalOptions(argv);\n if (!shouldDisablePagerForInvocation(argv, bootstrapGlobal)) {\n return restore;\n }\n process.env.PAGER = \"cat\";\n process.env.MANPAGER = \"cat\";\n process.env.GIT_PAGER = \"cat\";\n if (\n typeof process.env.LESS !== \"string\" ||\n process.env.LESS.trim().length === 0\n ) {\n process.env.LESS = \"FRX\";\n }\n return restore;\n}\n\ntype ExtensionSubcommandAction =\n | \"init\"\n | \"install\"\n | \"uninstall\"\n | \"explore\"\n | \"manage\"\n | \"doctor\"\n | \"adopt\"\n | \"adopt-all\"\n | \"activate\"\n | \"deactivate\";\n\nconst EXTENSION_ACTION_SYNTAX_TOKENS = new Set<ExtensionSubcommandAction>([\n \"install\",\n \"uninstall\",\n \"explore\",\n \"manage\",\n \"doctor\",\n \"adopt\",\n \"adopt-all\",\n \"activate\",\n \"deactivate\",\n]);\n\n/** Implements normalize legacy extension action syntax for the public runtime surface of this module. */\nexport function normalizeLegacyExtensionActionSyntax(argv: string[]): string[] {\n const extensionIndex = findCommandTokenIndex(argv);\n if (extensionIndex === undefined || argv[extensionIndex] !== \"extension\") {\n return [...argv];\n }\n const actionToken = argv[extensionIndex + 1];\n if (!actionToken || actionToken.startsWith(\"-\")) {\n return [...argv];\n }\n if (\n !EXTENSION_ACTION_SYNTAX_TOKENS.has(\n actionToken as ExtensionSubcommandAction,\n )\n ) {\n return [...argv];\n }\n if (argv.includes(\"--help\") || argv.includes(\"-h\")) {\n return [...argv];\n }\n const forcedActionFlag = `--${actionToken}`;\n if (argv.includes(forcedActionFlag)) {\n return [...argv];\n }\n return [\n ...argv.slice(0, extensionIndex + 1),\n forcedActionFlag,\n ...argv.slice(extensionIndex + 2),\n ];\n}\n\ntype BootstrapNormalizationReason =\n | \"legacy_extension_action\"\n | \"command_alias\"\n | \"flag_alias\"\n | \"flag_typo\"\n | \"bare_key_value\"\n | \"list_merge\";\ntype BootstrapNormalizationConfidence = \"high\" | \"medium\";\n\n/** Executable command aliases: a leading command token here is rewritten to its canonical command BEFORE commander parses, so the alias actually runs instead of merely being suggested. These are the highest-frequency aliases real agents type (telemetry: `pm show <id>` alone is the single most common unknown-command) and each target takes the same positional/flags as the alias (with `--comment`/ `--note`/`--learning` flag-aliased to `--add` on the target command). Keeping this in one place means the alias is consistent across registration, commander dispatch, telemetry, and error handling — all of which read the normalized argv. */\n/**\n * Rewrite a leading command-alias token (e.g. `show` -> `get`) in place. Only the\n * command position is considered — the same token appearing later as an argument\n * (`pm get show`) is left untouched — and only when it is not preceded by `--` or a\n * value-consuming global flag, mirroring {@link parseBootstrapCommandName}.\n */\nfunction rewriteCommandAlias(\n argv: string[],\n trace: BootstrapNormalizationEvent[],\n): string[] {\n const index = findCommandTokenIndex(argv);\n if (index === undefined) {\n return argv;\n }\n const token = argv[index];\n const canonical = EXECUTABLE_COMMAND_ALIASES[token.trim().toLowerCase()];\n if (!canonical) {\n return argv;\n }\n const rewritten = [...argv];\n rewritten[index] = canonical;\n trace.push({\n from: token,\n to: [canonical],\n reason: \"command_alias\",\n confidence: \"high\",\n });\n return rewritten;\n}\n\n/** Documents the bootstrap normalization event payload exchanged by command, SDK, and package integrations. */\nexport interface BootstrapNormalizationEvent {\n /** Value that configures or reports from for this contract. */\n from: string;\n /** Value that configures or reports to for this contract. */\n to: string[];\n /** Value that configures or reports reason for this contract. */\n reason: BootstrapNormalizationReason;\n /** Value that configures or reports confidence for this contract. */\n confidence: BootstrapNormalizationConfidence;\n}\n\n/** Documents the bootstrap invocation normalization result payload exchanged by command, SDK, and package integrations. */\nexport interface BootstrapInvocationNormalizationResult {\n /** Value that configures or reports argv for this contract. */\n argv: string[];\n /** Value that configures or reports command name for this contract. */\n commandName: string | undefined;\n /** Value that configures or reports trace for this contract. */\n trace: BootstrapNormalizationEvent[];\n}\n\ninterface FlagLookup {\n canonicalByNormalized: Map<string, string | null>;\n canonicalByCompact: Map<string, string | null>;\n canonicalComparables: Array<{ canonicalFlag: string; comparable: string }>;\n listCanonicalFlags: Set<string>;\n}\n\nfunction normalizeFlagKeyToken(raw: string): string {\n const withoutPrefix = raw.replace(/^--?/, \"\");\n return withoutPrefix\n .replace(/_/g, \"-\")\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .toLowerCase();\n}\n\nfunction toComparableFlagKey(raw: string): string {\n return normalizeFlagKeyToken(raw).replace(/-/g, \"\");\n}\n\nfunction markUnambiguousFlag(\n map: Map<string, string | null>,\n key: string,\n canonicalFlag: string,\n): void {\n const existing = map.get(key);\n if (existing === undefined) {\n map.set(key, canonicalFlag);\n return;\n }\n if (existing !== canonicalFlag) {\n map.set(key, null);\n }\n}\n\nfunction collectLongFlagCandidates(contract: CliFlagContract): string[] {\n const candidates: string[] = [];\n const pushLongFlag = (value: string | undefined): void => {\n if (typeof value !== \"string\") {\n return;\n }\n if (!value.startsWith(\"--\")) {\n return;\n }\n candidates.push(value);\n };\n pushLongFlag(contract.flag);\n for (const alias of contract.aliases ?? []) {\n pushLongFlag(alias);\n }\n return candidates;\n}\n\nfunction buildFlagLookup(\n commandName: string | undefined,\n contractsOverride?: CliFlagContract[],\n): FlagLookup {\n const contracts =\n contractsOverride ?? resolveSubcommandFlagContractsForCommand(commandName);\n const canonicalByNormalized = new Map<string, string | null>();\n const canonicalByCompact = new Map<string, string | null>();\n const canonicalComparablesMap = new Map<string, string>();\n const listCanonicalFlags = new Set<string>();\n for (const contract of contracts) {\n const longCandidates = collectLongFlagCandidates(contract);\n if (longCandidates.length === 0) {\n continue;\n }\n const canonicalFlag = `--${normalizeFlagKeyToken(longCandidates[0])}`;\n for (const candidate of longCandidates) {\n markUnambiguousFlag(\n canonicalByNormalized,\n normalizeFlagKeyToken(candidate),\n canonicalFlag,\n );\n markUnambiguousFlag(\n canonicalByCompact,\n toComparableFlagKey(candidate),\n canonicalFlag,\n );\n }\n const comparable = toComparableFlagKey(canonicalFlag);\n if (!canonicalComparablesMap.has(canonicalFlag)) {\n canonicalComparablesMap.set(canonicalFlag, comparable);\n }\n if (contract.list === true) {\n listCanonicalFlags.add(canonicalFlag);\n }\n }\n return {\n canonicalByNormalized,\n canonicalByCompact,\n canonicalComparables: [...canonicalComparablesMap.entries()].map(\n ([canonicalFlag, comparable]) => ({\n canonicalFlag,\n comparable,\n }),\n ),\n listCanonicalFlags,\n };\n}\n\nfunction resolveCanonicalFlag(\n rawKey: string,\n lookup: FlagLookup,\n): {\n flag: string;\n reason: \"flag_alias\" | \"flag_typo\";\n confidence: BootstrapNormalizationConfidence;\n} | null {\n const normalizedKey = normalizeFlagKeyToken(rawKey);\n const direct = lookup.canonicalByNormalized.get(normalizedKey);\n if (typeof direct === \"string\") {\n return {\n flag: direct,\n reason: \"flag_alias\",\n confidence: \"high\",\n };\n }\n const comparableKey = normalizedKey.replace(/-/g, \"\");\n const compactMatch = lookup.canonicalByCompact.get(comparableKey);\n if (typeof compactMatch === \"string\") {\n return {\n flag: compactMatch,\n reason: \"flag_alias\",\n confidence: \"high\",\n };\n }\n const maxDistance = comparableKey.length >= 8 ? 2 : 1;\n let bestDistance = Number.POSITIVE_INFINITY;\n let bestFlag: string | undefined;\n let tied = false;\n for (const candidate of lookup.canonicalComparables) {\n const distance = levenshteinDistanceWithinLimit(\n comparableKey,\n candidate.comparable,\n maxDistance,\n );\n if (distance === null) {\n continue;\n }\n if (distance < bestDistance) {\n bestDistance = distance;\n bestFlag = candidate.canonicalFlag;\n tied = false;\n continue;\n }\n if (distance === bestDistance && bestFlag !== candidate.canonicalFlag) {\n tied = true;\n }\n }\n if (\n !bestFlag ||\n tied ||\n !Number.isFinite(bestDistance) ||\n bestDistance <= 0\n ) {\n return null;\n }\n return {\n flag: bestFlag,\n reason: \"flag_typo\",\n confidence: bestDistance >= 2 ? \"medium\" : \"high\",\n };\n}\n\n/** Implements list alias plural keys for the public runtime surface of this module. */\nexport function listAliasPluralKeys(normalizedKey: string): string[] {\n const candidates = [`${normalizedKey}s`];\n if (normalizedKey.endsWith(\"y\") && normalizedKey.length > 1) {\n candidates.push(`${normalizedKey.slice(0, -1)}ies`);\n }\n return candidates;\n}\n\nfunction parseBareKeyValueToken(\n token: string,\n preserve = false,\n): { key: string; value: string } | null {\n if (preserve || token.includes(\"://\")) {\n return null;\n }\n const match = token.match(/^([A-Za-z][A-Za-z0-9_-]{1,63})([:=])(.*)$/);\n if (!match) {\n return null;\n }\n const key = match[1];\n const value = match[3];\n if (value.length === 0) {\n return null;\n }\n return {\n key,\n value,\n };\n}\n\nfunction normalizeLongOptionToken(\n token: string,\n lookup: FlagLookup,\n preserve = false,\n): { tokens: string[]; event?: BootstrapNormalizationEvent } {\n if (preserve || !token.startsWith(\"--\")) {\n return { tokens: [token] };\n }\n const equalsIndex = token.indexOf(\"=\");\n const key = equalsIndex >= 0 ? token.slice(0, equalsIndex) : token;\n const inlineValue =\n equalsIndex >= 0 ? token.slice(equalsIndex + 1) : undefined;\n const resolution = resolveCanonicalFlag(key, lookup);\n if (!resolution) {\n return { tokens: [token] };\n }\n const normalizedToken =\n inlineValue === undefined\n ? resolution.flag\n : `${resolution.flag}=${inlineValue}`;\n if (normalizedToken === token) {\n return { tokens: [token] };\n }\n return {\n tokens: [normalizedToken],\n event: {\n from: token,\n to: [normalizedToken],\n reason: resolution.reason,\n confidence: resolution.confidence,\n },\n };\n}\n\n/** Locate global path-value tokens that normalization must preserve literally. */\nfunction collectBootstrapPathValueIndices(argv: string[]): Set<number> {\n const indices = new Set<number>();\n let expectsValue = false;\n for (let index = 0; index < argv.length; index += 1) {\n if (expectsValue) {\n indices.add(index);\n expectsValue = false;\n continue;\n }\n const token = argv[index];\n expectsValue = token === \"--path\" || token === \"--pm-path\";\n }\n return indices;\n}\n\n// Global option flags whose value may legitimately begin with \"--\" (commander\n// accepts such values). Their value token must not be reinterpreted as a list\n// flag during coalescing. `--pm-path <dir>` and its legacy `--path <dir>`\n// alias are the documented cases; other globals\n// (--json/--quiet/--no-extensions/--no-pager/--profile) are boolean.\nfunction splitCanonicalListToken(\n token: string,\n): { flag: string; inlineValue?: string } | null {\n if (!token.startsWith(\"--\")) {\n return null;\n }\n const equalsIndex = token.indexOf(\"=\");\n if (equalsIndex < 0) {\n return { flag: token };\n }\n return {\n flag: token.slice(0, equalsIndex),\n inlineValue: token.slice(equalsIndex + 1),\n };\n}\n\ninterface ListFlagSlot {\n outputIndex: number;\n originalTokens: string[];\n values: string[];\n occurrences: number;\n}\n\ninterface ListFlagOccurrence {\n originalTokens: string[];\n value: string | undefined;\n consumed: number;\n}\n\ninterface ValuedListFlagOccurrence {\n originalTokens: string[];\n value: string;\n}\n\nfunction copyValueConsumingFlag(\n argv: string[],\n index: number,\n result: (string | null)[],\n): number {\n result.push(argv[index]);\n const next = argv[index + 1];\n if (typeof next === \"string\" && next !== \"--\") {\n result.push(next);\n return index + 2;\n }\n return index + 1;\n}\n\nfunction readListFlagOccurrence(\n argv: string[],\n index: number,\n parsed: { flag: string; inlineValue?: string },\n multiValueListFlags: Set<string>,\n): ListFlagOccurrence {\n if (parsed.inlineValue !== undefined) {\n return {\n originalTokens: [argv[index]],\n value: parsed.inlineValue,\n consumed: 1,\n };\n }\n\n const values: string[] = [];\n let valueIndex = index + 1;\n while (\n valueIndex < argv.length &&\n argv[valueIndex] !== \"--\" &&\n !argv[valueIndex].startsWith(\"-\") &&\n (values.length === 0 || multiValueListFlags.has(parsed.flag))\n ) {\n values.push(argv[valueIndex]);\n valueIndex += 1;\n }\n\n const consumed = values.length === 0 ? 1 : 1 + values.length;\n return {\n originalTokens: argv.slice(index, index + consumed),\n value: values.length === 0 ? undefined : values.join(\",\"),\n consumed,\n };\n}\n\nfunction recordListFlagOccurrence(\n slots: Map<string, ListFlagSlot>,\n result: (string | null)[],\n flag: string,\n occurrence: ValuedListFlagOccurrence,\n): void {\n const existing = slots.get(flag);\n if (existing) {\n existing.values.push(occurrence.value);\n existing.occurrences += 1;\n return;\n }\n\n slots.set(flag, {\n outputIndex: result.length,\n originalTokens: occurrence.originalTokens,\n values: [occurrence.value],\n occurrences: 1,\n });\n // Reserve the anchor position; finalized after the walk so we know the full\n // merged value or can restore the original token form for single uses.\n result.push(null);\n}\n\nfunction buildListFlagCoalescingSplices(\n slots: Map<string, ListFlagSlot>,\n multiValueListFlags: Set<string>,\n): {\n events: BootstrapNormalizationEvent[];\n splices: Array<{ outputIndex: number; tokens: string[] }>;\n} {\n const events: BootstrapNormalizationEvent[] = [];\n const splices: Array<{ outputIndex: number; tokens: string[] }> = [];\n for (const [flag, slot] of slots) {\n const shouldMerge =\n slot.occurrences >= 2 ||\n (multiValueListFlags.has(flag) && slot.originalTokens.length > 2);\n if (!shouldMerge) {\n splices.push({\n outputIndex: slot.outputIndex,\n tokens: slot.originalTokens,\n });\n continue;\n }\n const mergedToken = `${flag}=${slot.values.join(\",\")}`;\n splices.push({ outputIndex: slot.outputIndex, tokens: [mergedToken] });\n events.push({\n from: `${flag} (x${slot.occurrences})`,\n to: [mergedToken],\n reason: \"list_merge\",\n confidence: \"high\",\n });\n }\n return { events, splices };\n}\n\nfunction applyListFlagSplices(\n result: (string | null)[],\n splices: Array<{ outputIndex: number; tokens: string[] }>,\n): void {\n splices.sort((a, b) => b.outputIndex - a.outputIndex);\n for (const splice of splices) {\n result.splice(splice.outputIndex, 1, ...splice.tokens);\n }\n}\n\n/**\n * Coalesce repeated occurrences of comma-separated list flags into a single\n * `--flag=v1,v2,v3` token anchored at the FIRST occurrence. Without this,\n * Commander treats these flags as scalars and silently keeps only the last\n * value (data loss). Both `--flag value` and `--flag=value` forms are merged;\n * a value-less occurrence is preserved untouched, and a `--` terminator stops\n * coalescing (remainder is passed through verbatim).\n *\n * `valueConsumingFlags` lists option flags (e.g. global `--pm-path`) whose value\n * may itself begin with `--`. Their value token is emitted verbatim so a\n * list-flag-looking value (`--path --tags`) is never reinterpreted as a flag\n * nor allowed to swallow the following command/positional token.\n */\nexport function coalesceRepeatedListFlags(\n argv: string[],\n listFlags: Set<string>,\n valueConsumingFlags: Set<string> = new Set(),\n multiValueListFlags: Set<string> = new Set(),\n): { argv: string[]; events: BootstrapNormalizationEvent[] } {\n if (listFlags.size === 0) {\n return { argv: [...argv], events: [] };\n }\n\n const result: (string | null)[] = [];\n const slots = new Map<string, ListFlagSlot>();\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n result.push(...argv.slice(index));\n break;\n }\n // A value-consuming option in space form owns the next token as its value,\n // even when that value begins with \"--\". Emit both verbatim so the value is\n // never misread as a list-flag occurrence.\n if (valueConsumingFlags.has(token)) {\n index = copyValueConsumingFlag(argv, index, result);\n continue;\n }\n const parsed = splitCanonicalListToken(token);\n if (!parsed || !listFlags.has(parsed.flag)) {\n result.push(token);\n index += 1;\n continue;\n }\n\n const occurrence = readListFlagOccurrence(\n argv,\n index,\n parsed,\n multiValueListFlags,\n );\n if (occurrence.value === undefined) {\n // Value-less occurrence: leave untouched, do not coalesce.\n result.push(token);\n index += occurrence.consumed;\n continue;\n }\n\n recordListFlagOccurrence(slots, result, parsed.flag, {\n originalTokens: occurrence.originalTokens,\n value: occurrence.value,\n });\n index += occurrence.consumed;\n }\n\n // Apply anchor splices from the end so earlier indices stay valid when a\n // single-occurrence anchor expands back into two tokens.\n const { events, splices } = buildListFlagCoalescingSplices(\n slots,\n multiValueListFlags,\n );\n applyListFlagSplices(result, splices);\n\n return { argv: result as string[], events };\n}\n\n/** Linked-test entry keys accepted in the two-token form `pm test <id> --add command \"npm test -- parser\"` (GH-191). Only entry-identity keys are merged: `command`/`cmd` name the shell command and `path` names the test file, so a single key=value entry is meaningful for them. Other structured keys (scope, env_set, assertions, ...) cannot form a valid standalone entry and are left for the normal parser to reject. `--remove` matches existing entries by `command=`/`path=` only, so `cmd` is excluded there. Key names mirror STRUCTURED_LINKED_TEST_KEYS in src/cli/commands/linked-test-entry.ts. */\nconst LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG: ReadonlyMap<\n string,\n ReadonlySet<string>\n> = new Map([\n [\"--add\", new Set([\"command\", \"cmd\", \"path\"])],\n [\"--remove\", new Set([\"command\", \"path\"])],\n]);\n\n/** Sandbox-safe linked-test commands legitimately start with env assignments (`PM_PATH=... PM_GLOBAL_PATH=... vitest run -- parser`), which look like bare key=value settings tokens. When the two preceding tokens are a linked-test flag plus a bare two-token key (`--add command <value>`), the value must be left intact for mergeLinkedTestTwoTokenEntries instead of being rewritten into a canonical flag (e.g. PM_PATH= -> --pm-path), which would silently corrupt the command into `--add command --pm-path ...`. */\nfunction isLinkedTestTwoTokenValuePosition(\n commandName: string | undefined,\n emittedTokens: readonly string[],\n): boolean {\n if (commandName !== \"test\" || emittedTokens.length < 2) {\n return false;\n }\n const key = emittedTokens[emittedTokens.length - 1];\n const flag = emittedTokens[emittedTokens.length - 2];\n const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(flag);\n return keys !== undefined && keys.has(key);\n}\n\nfunction shouldPreserveBareKeyValueToken(\n commandName: string | undefined,\n emittedTokens: readonly string[],\n): boolean {\n return (\n commandName === \"search\" ||\n isLinkedTestTwoTokenValuePosition(commandName, emittedTokens)\n );\n}\n\n/** Accept the two-token linked-test form `pm test <id> --add command \"npm test -- parser\"` by merging the bare key token and its single quoted value into the documented `--add command=...` shape. Without this merge Commander binds the bare key as the option value and treats the quoted command as an excess positional, failing with \"too many arguments\" (GH-191). The merge only fires when EXACTLY ONE non-flag token follows the bare key, i.e. the value was quoted into one shell token — an unquoted multi-token value stays ambiguous (it may swallow the item id), still fails fast, and is routed to targeted quoting guidance by the commander error classifier instead. */\nexport function mergeLinkedTestTwoTokenEntries(\n argv: string[],\n commandName: string | undefined,\n trace: BootstrapNormalizationEvent[],\n): string[] {\n if (commandName !== \"test\") {\n return argv;\n }\n const result: string[] = [];\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n result.push(...argv.slice(index));\n return result;\n }\n const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(token);\n const key = keys ? argv[index + 1] : undefined;\n if (!keys || typeof key !== \"string\" || !keys.has(key)) {\n result.push(token);\n index += 1;\n continue;\n }\n let runEnd = index + 2;\n while (runEnd < argv.length && !argv[runEnd].startsWith(\"-\")) {\n runEnd += 1;\n }\n if (runEnd - (index + 2) !== 1) {\n result.push(token);\n index += 1;\n continue;\n }\n const value = argv[index + 2];\n const mergedValue = `${key}=${value}`;\n result.push(token, mergedValue);\n trace.push({\n from: `${token} ${key} ${value}`,\n to: [token, mergedValue],\n reason: \"bare_key_value\",\n confidence: \"high\",\n });\n index += 3;\n }\n return result;\n}\n\n/** Normalize option spellings and bare key-value tokens before list coalescing. */\nfunction normalizeBootstrapTokens(\n argv: string[],\n lookup: FlagLookup,\n commandName: string | undefined,\n trace: BootstrapNormalizationEvent[],\n): string[] {\n const normalizedArgv: string[] = [];\n const pathValueIndices = collectBootstrapPathValueIndices(argv);\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (token === \"--\") {\n normalizedArgv.push(...argv.slice(index));\n break;\n }\n const preserveCurrentToken = pathValueIndices.has(index);\n const previous = normalizedArgv[normalizedArgv.length - 1];\n if (token.startsWith(\"--\")) {\n const normalizedToken = normalizeLongOptionToken(\n token,\n lookup,\n preserveCurrentToken,\n );\n normalizedArgv.push(...normalizedToken.tokens);\n if (normalizedToken.event) trace.push(normalizedToken.event);\n continue;\n }\n const bareKeyValue = parseBareKeyValueToken(token, preserveCurrentToken);\n if (\n bareKeyValue &&\n !(typeof previous === \"string\" && previous.startsWith(\"-\")) &&\n !shouldPreserveBareKeyValueToken(commandName, normalizedArgv)\n ) {\n const resolution = resolveCanonicalFlag(bareKeyValue.key, lookup);\n if (resolution) {\n const replacement = [resolution.flag, bareKeyValue.value];\n normalizedArgv.push(...replacement);\n trace.push({\n from: token,\n to: replacement,\n reason: \"bare_key_value\",\n confidence: resolution.confidence,\n });\n continue;\n }\n }\n normalizedArgv.push(token);\n }\n return normalizedArgv;\n}\n\n/** Implements normalize bootstrap invocation for the public runtime surface of this module. */\nexport function normalizeBootstrapInvocation(\n argv: string[],\n): BootstrapInvocationNormalizationResult {\n const trace: BootstrapNormalizationEvent[] = [];\n const legacyNormalized = normalizeLegacyExtensionActionSyntax(argv);\n if (\n legacyNormalized.length !== argv.length ||\n legacyNormalized.some((token, index) => token !== argv[index])\n ) {\n trace.push({\n from: argv.join(\" \"),\n to: [...legacyNormalized],\n reason: \"legacy_extension_action\",\n confidence: \"high\",\n });\n }\n const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);\n const commandName = parseBootstrapCommandName(aliasNormalized);\n const commandPathName = parseBootstrapCommandPathName(aliasNormalized);\n const lookup = buildFlagLookup(commandPathName ?? commandName);\n const normalizedArgv = normalizeBootstrapTokens(\n aliasNormalized,\n lookup,\n commandName,\n trace,\n );\n const linkedTestNormalized = mergeLinkedTestTwoTokenEntries(\n normalizedArgv,\n commandName,\n trace,\n );\n const coalesced = coalesceRepeatedListFlags(\n linkedTestNormalized,\n lookup.listCanonicalFlags,\n GLOBAL_VALUE_CONSUMING_FLAGS,\n commandName === \"create\" ? new Set([\"--tags\"]) : new Set(),\n );\n for (const event of coalesced.events) {\n trace.push(event);\n }\n return {\n argv: coalesced.argv,\n commandName,\n trace,\n };\n}\n\nfunction parseBootstrapCommandPathName(argv: string[]): string | undefined {\n const stripped = stripGlobalBootstrapTokens(argv);\n const first = stripped[0]?.trim().toLowerCase();\n const second = stripped[1]?.trim().toLowerCase();\n if (\n (first === \"extension\" || first === \"package\" || first === \"packages\") &&\n typeof second === \"string\" &&\n second.length > 0 &&\n !second.startsWith(\"-\")\n ) {\n return `${first} ${second}`;\n }\n return first;\n}\n\n/** Implements parse bootstrap type value for the public runtime surface of this module. */\nexport function parseBootstrapTypeValue(argv: string[]): string | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (token === \"--\") {\n break;\n }\n if (token === \"--type\") {\n const candidate = argv[index + 1];\n if (typeof candidate === \"string\" && candidate.trim().length > 0) {\n return candidate.trim();\n }\n continue;\n }\n if (token.startsWith(\"--type=\")) {\n const candidate = token.slice(\"--type=\".length).trim();\n if (candidate.length > 0) {\n return candidate;\n }\n }\n }\n return undefined;\n}\n\n/** Public contract for test only, shared by SDK and presentation-layer consumers. */\nexport const _testOnly = {\n buildFlagLookup,\n collectBootstrapPathValueIndices,\n collectLongFlagCandidates,\n markUnambiguousFlag,\n normalizeLongOptionToken,\n resolveCanonicalFlag,\n};\n","/**\n * @module sdk/invocation-author\n *\n * Safely scopes invocation-wide mutation authors for one-shot and embedded CLI hosts.\n */\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\n\n/** Apply an optional author override and return an idempotent environment restorer. */\nexport function applyInvocationAuthorOverride(\n author: string | undefined,\n): () => void {\n if (author === undefined) {\n return () => {};\n }\n const normalizedAuthor = author.trim();\n if (normalizedAuthor.length === 0) {\n throw new PmCliError(\n \"--author requires a non-empty value.\",\n EXIT_CODE.USAGE,\n {\n code: \"missing_required_argument\",\n nextSteps: [\"Pass an explicit author identifier with --author <id>.\"],\n },\n );\n }\n const previousAuthor = process.env.PM_AUTHOR;\n process.env.PM_AUTHOR = normalizedAuthor;\n let restored = false;\n return () => {\n if (restored) {\n return;\n }\n restored = true;\n if (previousAuthor === undefined) {\n delete process.env.PM_AUTHOR;\n } else {\n process.env.PM_AUTHOR = previousAuthor;\n }\n };\n}\n","/**\n * @module sdk/cli-program\n *\n * Builds the reusable Commander root that embeds pm's universal global contracts.\n */\nimport { Command } from \"commander\";\nimport { writeStdout } from \"../core/output/output.js\";\n\n/** Create a fresh pm root program suitable for one-shot CLI or embedded hosts. */\nexport function createPmCliProgram(version: string): Command {\n return new Command()\n .name(\"pm\")\n .description(\n \"Universal, flexible, extensible, agent-optimized project management CLI for any project or programming language.\",\n )\n .version(version)\n .showHelpAfterError(false)\n .allowExcessArguments(false)\n .allowUnknownOption(false)\n .configureOutput({\n writeOut: (value) => {\n writeStdout(value);\n },\n writeErr: () => {},\n })\n .option(\"--json\", \"Output JSON instead of TOON\")\n .option(\"--lean\", \"Omit null and empty containers from JSON output\")\n .option(\"--quiet\", \"Suppress stdout output\")\n .option(\n \"--no-changed-fields\",\n \"Omit the changed_fields array from mutation output (keeps changed_field_count)\",\n )\n .option(\n \"--full-changed-fields\",\n \"Restore the legacy full mutation envelope and changed_fields array\",\n )\n .option(\n \"--id-only\",\n \"Print only id and status for single-item mutation output\",\n )\n .option(\n \"--pm-path <dir>\",\n \"Explicit tracker storage path for this command (preferred over --path)\",\n )\n .option(\n \"--path <dir>\",\n \"Backward-compatible alias for --pm-path; this is the tracker storage path, not a workspace cwd\",\n )\n .option(\"--no-extensions\", \"Disable extension loading\")\n .option(\"--no-pager\", \"Disable pager integration for help and long output\")\n .option(\n \"--explain\",\n \"Render extended rationale and examples in help output\",\n )\n .option(\"--profile\", \"Print deterministic timing diagnostics\")\n .option(\"--author <id>\", \"Override mutation author for this invocation\")\n .exitOverride();\n}\n"],"names":["commandPathTokens"],"mappings":";;;;;;;;;;;;;;;;AASM,SAAU,qBAAqB,OAAc;AACjD,MAAI,iBAAiB,YAAY;AAC/B,WAAO,MAAM;EACf;AACA,MAAI,iBAAiB,OAAO;AAC1B,WAAO,MAAM;EACf;AACA,SAAO;AACT;AAGM,SAAU,mBAAmB,OAAc;AAC/C,MAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,EAAE,cAAc,QAAQ;AACzE,WAAO;EACT;AACA,QAAM,WAAY,MAAiC;AACnD,SAAO,OAAO,aAAa,YAAY,OAAO,SAAS,QAAQ,IAC3D,WACA;AACN;AAGM,SAAU,wBAAwB,UAAgB;AACtD,QAAM,aAAa,KAAK,MAAM,Q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oE,EAErE,OACC,aACA,0DAA0D,EAE3D,OACC,mBACA,wEAAwE,EAEzE,OACC,gBACA,gGAAgG,EAEjG,OAAO,mBAAmB,2BAA2B,EACrD,OAAO,cAAc,oDAAoD,EACzE,OACC,aACA,uDAAuD,EAExD,OAAO,aAAa,wCAAwC,EAC5D,OAAO,iBAAiB,8CAA8C,EACtE,aAAY;AACjB","debugId":"50e62ca5-fc65-568e-b9ef-4b45850e4d6f"}
@@ -4,7 +4,7 @@ import {
4
4
  parseAnnotationTextInput,
5
5
  resolveAnnotationInput,
6
6
  runAnnotationCommand
7
- } from "./chunk-TRSHFPRZ.js";
7
+ } from "./chunk-6PM6CPPP.js";
8
8
 
9
9
  // dist/cli/commands/learnings.js
10
10
  async function runLearnings(id, options, global) {
@@ -30,6 +30,6 @@ async function runLearnings(id, options, global) {
30
30
  export {
31
31
  runLearnings
32
32
  };
33
- //# sourceMappingURL=chunk-7656MAUL.js.map
33
+ //# sourceMappingURL=chunk-MUAJHL2R.js.map
34
34
 
35
35
  //# debugId=1bec9be5-4967-5914-933d-cf3ebd310ca5
@@ -1,5 +1,5 @@
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]="4ab4b144-7e4f-57e1-a531-93400c905393")}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]="f2cb1ebe-3459-59b8-80b9-c3371923eb7d")}catch(e){}}();
3
3
  import {
4
4
  applyHistoryPatch,
5
5
  ensureMaterializedHistoryTarget,
@@ -10,11 +10,12 @@ import {
10
10
  replayToItemDocument,
11
11
  resolveHistoryTarget,
12
12
  toReplayDocument
13
- } from "./chunk-PFNHX655.js";
13
+ } from "./chunk-2P7OK4WG.js";
14
14
  import {
15
15
  resolveAuthor
16
16
  } from "./chunk-CUFW7ITY.js";
17
17
  import {
18
+ acquireItemMetadataDerivedIndexLock,
18
19
  acquireLock,
19
20
  appendHistoryEntry,
20
21
  canonicalDocument,
@@ -29,9 +30,10 @@ import {
29
30
  readLocatedItem,
30
31
  readSettings,
31
32
  recordAfterCommandAffectedItem,
33
+ refreshItemMetadataDerivedIndex,
32
34
  runActiveOnWriteHooks,
33
35
  serializeItemDocument
34
- } from "./chunk-POG76WWZ.js";
36
+ } from "./chunk-L7DZV6EZ.js";
35
37
  import {
36
38
  EXIT_CODE,
37
39
  PmCliError,
@@ -43,7 +45,7 @@ import {
43
45
  resolveItemTypeRegistry,
44
46
  resolvePmRoot,
45
47
  writeFileAtomic
46
- } from "./chunk-HYW67VJ5.js";
48
+ } from "./chunk-TLF52ZDP.js";
47
49
 
48
50
  // dist/cli/commands/restore.js
49
51
  import jsonPatch from "fast-json-patch";
@@ -235,27 +237,42 @@ async function runRestore(id, target, options, global) {
235
237
  schema: settings.schema
236
238
  });
237
239
  const restoredItemPath = getItemPath(pmRoot, restoredDocument.metadata.type, resolvedId, itemFormat, typeRegistry.type_to_folder);
238
- await writeFileAtomic(restoredItemPath, serializedRestore);
239
- if (existingItemPath && restoredItemPath !== existingItemPath) {
240
- await fs.rm(existingItemPath);
241
- }
242
- const historyEntry = createHistoryEntry({
243
- nowIso: nowIso(),
244
- author,
245
- op: "restore",
246
- before: currentState.document,
247
- after: restoredDocument,
248
- message: options.message
249
- });
240
+ const releaseDerivedIndexLock = await acquireItemMetadataDerivedIndexLock(pmRoot, author);
241
+ let derivedIndexWarnings = [];
250
242
  try {
251
- await appendHistoryEntry(subject.historyPath, historyEntry);
252
- } catch (error) {
253
- await restorePreviousItemAfterHistoryFailure({
254
- existingItemPath,
255
- resolvedOriginalRaw: currentState.originalRaw,
256
- restoredItemPath
243
+ await writeFileAtomic(restoredItemPath, serializedRestore);
244
+ if (existingItemPath && restoredItemPath !== existingItemPath) {
245
+ await fs.rm(existingItemPath);
246
+ }
247
+ const historyEntry = createHistoryEntry({
248
+ nowIso: nowIso(),
249
+ author,
250
+ op: "restore",
251
+ before: currentState.document,
252
+ after: restoredDocument,
253
+ message: options.message
254
+ });
255
+ try {
256
+ await appendHistoryEntry(subject.historyPath, historyEntry);
257
+ } catch (error) {
258
+ await restorePreviousItemAfterHistoryFailure({
259
+ existingItemPath,
260
+ resolvedOriginalRaw: currentState.originalRaw,
261
+ restoredItemPath
262
+ });
263
+ throw error;
264
+ }
265
+ derivedIndexWarnings = await refreshItemMetadataDerivedIndex({
266
+ pmRoot,
267
+ preferredFormat: settings.item_format,
268
+ typeToFolder: typeRegistry.type_to_folder,
269
+ schema: settings.schema,
270
+ itemPath: restoredItemPath,
271
+ previousItemPath: existingItemPath ?? void 0,
272
+ document: restoredDocument
257
273
  });
258
- throw error;
274
+ } finally {
275
+ await releaseDerivedIndexLock();
259
276
  }
260
277
  const restoreChangedFields = changedFields(currentState.document, restoredDocument);
261
278
  const hookWarnings = await runRestoreWriteHooks({
@@ -288,6 +305,7 @@ async function runRestore(id, target, options, global) {
288
305
  warnings: [
289
306
  ...subject.historyPolicyWarnings,
290
307
  ...ownershipWarnings,
308
+ ...derivedIndexWarnings,
291
309
  ...hookWarnings
292
310
  ]
293
311
  };
@@ -310,6 +328,6 @@ export {
310
328
  runRestore,
311
329
  _testOnlyRestoreCommand
312
330
  };
313
- //# sourceMappingURL=chunk-R3P6FZJW.js.map
331
+ //# sourceMappingURL=chunk-N6QCY2AX.js.map
314
332
 
315
- //# debugId=4ab4b144-7e4f-57e1-a531-93400c905393
333
+ //# debugId=f2cb1ebe-3459-59b8-80b9-c3371923eb7d
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../cli/commands/restore.ts"],"sourcesContent":["/**\n * @module cli/commands/restore\n *\n * Implements the pm restore command surface and its agent-facing runtime behavior.\n */\nimport jsonPatch from \"fast-json-patch\";\nimport fs from \"node:fs/promises\";\nimport {\n pathExists,\n readFileIfExists,\n writeFileAtomic,\n} from \"../../core/fs/fs-utils.js\";\nimport {\n appendHistoryEntry,\n createHistoryEntry,\n} from \"../../core/history/history.js\";\nimport {\n replayToCanonicalItemDocument,\n replayToItemDocument,\n toReplayDocument,\n} from \"../../core/history/replay.js\";\nimport {\n applyHistoryPatch,\n ensureMaterializedHistoryTarget as ensureMaterializedRestoreTarget,\n extractPatchFailureContext,\n readHistoryEntries,\n replayHistoryToTarget as replayToTarget,\n resolveHistoryTarget,\n} from \"../../sdk/history-read.js\";\nimport { enforceHistoryStreamPolicyForItem } from \"../../core/history/history-stream-policy.js\";\nimport { normalizeItemId, normalizeRawItemId } from \"../../core/item/id.js\";\nimport {\n canonicalDocument,\n serializeItemDocument,\n} from \"../../core/item/item-format.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { acquireLock } from \"../../core/lock/lock.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport {\n getActiveExtensionRegistrations,\n projectAfterCommandItemSnapshot,\n recordAfterCommandAffectedItem,\n runActiveOnWriteHooks,\n} from \"../../core/extensions/index.js\";\nimport { locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport {\n acquireItemMetadataDerivedIndexLock,\n refreshItemMetadataDerivedIndex,\n} from \"../../sdk/item-metadata-index.js\";\nimport {\n getHistoryPath,\n getItemPath,\n getSettingsPath,\n resolvePmRoot,\n} from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type {\n HistoryEntry,\n HistoryPatchOp,\n ItemDocument,\n ItemMetadata,\n} from \"../../types/index.js\";\n\ninterface ResolvedRestoreSubject {\n id: string;\n historyPath: string;\n located: Awaited<ReturnType<typeof locateItem>>;\n historyPolicyWarnings: string[];\n}\n\ninterface RestoreCurrentState {\n document: ItemDocument;\n originalRaw: string | null;\n}\n\n/** Documents the restore command options payload exchanged by command, SDK, and package integrations. */\nexport interface RestoreCommandOptions {\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Human-readable explanation suitable for logs and agent-facing output. */\n message?: string;\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Documents the restore result payload exchanged by command, SDK, and package integrations. */\nexport interface RestoreResult {\n /** Value that configures or reports item for this contract. */\n item: ItemMetadata;\n /** Value that configures or reports restored from for this contract. */\n restored_from: {\n kind: \"version\" | \"timestamp\";\n target: string;\n history_index: number;\n entry_ts: string;\n entry_op: string;\n };\n /** Value that configures or reports changed fields for this contract. */\n changed_fields: string[];\n /** Value that configures or reports warnings for this contract. */\n warnings: string[];\n}\n\n/** Resolve restore targets with the command's established wording and at-or-before timestamp semantics. */\nfunction ensureReplayTarget(target: string, history: readonly HistoryEntry[]) {\n return resolveHistoryTarget(target, history, {\n errorSubject: \"restore\",\n allowFutureTimestamp: true,\n });\n}\n\nfunction replayCurrentDocument(history: HistoryEntry[]): ItemDocument {\n const currentReplay = replayToTarget(history, history.length - 1);\n if (Object.keys(currentReplay.metadata).length === 0) {\n return {\n metadata: {} as ItemMetadata,\n body: currentReplay.body,\n };\n }\n return canonicalDocument(replayToItemDocument(currentReplay));\n}\n\nasync function resolveRestoreSubject(\n pmRoot: string,\n id: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n typeToFolder: Record<string, string>,\n): Promise<ResolvedRestoreSubject> {\n const located = await locateItem(\n pmRoot,\n id,\n settings.id_prefix,\n settings.item_format,\n typeToFolder,\n );\n if (located) {\n const historyPath = getHistoryPath(pmRoot, located.id);\n const historyPolicy = await enforceHistoryStreamPolicyForItem({\n pmRoot,\n settings,\n itemId: located.id,\n commandLabel: \"restore\",\n });\n return {\n id: located.id,\n historyPath,\n located,\n historyPolicyWarnings: historyPolicy.warnings,\n };\n }\n\n const normalizedId = normalizeItemId(id, settings.id_prefix);\n const rawNormalizedId = normalizeRawItemId(id);\n /* c8 ignore start -- raw-id fallback is covered by normalize-item-id utility tests. */\n const candidateIds =\n normalizedId === rawNormalizedId\n ? [normalizedId]\n : [normalizedId, rawNormalizedId];\n /* c8 ignore stop */\n for (const candidateId of candidateIds) {\n const historyPath = getHistoryPath(pmRoot, candidateId);\n if (await pathExists(historyPath)) {\n return {\n id: candidateId,\n historyPath,\n located: null,\n historyPolicyWarnings: [],\n };\n }\n }\n\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n}\n\nfunction changedFields(\n beforeDocument: ItemDocument,\n afterDocument: ItemDocument,\n): string[] {\n const beforeReplay = toReplayDocument(beforeDocument);\n const afterReplay = toReplayDocument(afterDocument);\n const patch = jsonPatch.compare(\n beforeReplay,\n afterReplay,\n ) as HistoryPatchOp[];\n const fields = new Set<string>();\n\n for (const op of patch) {\n if (op.path === \"/body\" || op.path.startsWith(\"/body/\")) {\n fields.add(\"body\");\n continue;\n }\n const segment = op.path\n .replace(/^\\/(?:metadata|front_matter)\\/?/, \"\")\n .split(\"/\")[0];\n fields.add(segment.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\"));\n }\n\n return Array.from(fields).sort((a, b) => a.localeCompare(b));\n}\n\nasync function loadRestoreStateUnderLock(params: {\n pmRoot: string;\n resolvedId: string;\n subject: ResolvedRestoreSubject;\n settings: Awaited<ReturnType<typeof readSettings>>;\n typeToFolder: Record<string, string>;\n historyRawBeforeLock: string | null;\n currentItemRawBeforeLock: string | null;\n}): Promise<{\n loadedItemUnderLock: Awaited<ReturnType<typeof readLocatedItem>> | null;\n existingItemPath: string | null;\n}> {\n const historyRawUnderLock = await readFileIfExists(\n params.subject.historyPath,\n );\n if (historyRawUnderLock !== params.historyRawBeforeLock) {\n throw new PmCliError(\n `History for ${params.resolvedId} changed while waiting for lock; retry restore.`,\n EXIT_CODE.CONFLICT,\n );\n }\n const locatedUnderLock = await locateItem(\n params.pmRoot,\n params.resolvedId,\n params.settings.id_prefix,\n params.settings.item_format,\n params.typeToFolder,\n );\n const loadedItemUnderLock = locatedUnderLock\n ? await readLocatedItem(locatedUnderLock, {\n schema: params.settings.schema,\n })\n : null;\n if ((loadedItemUnderLock?.raw ?? null) !== params.currentItemRawBeforeLock) {\n throw new PmCliError(\n `Item ${params.resolvedId} changed while waiting for lock; retry restore.`,\n EXIT_CODE.CONFLICT,\n );\n }\n return {\n loadedItemUnderLock,\n existingItemPath: locatedUnderLock?.itemPath ?? null,\n };\n}\n\nfunction resolveRestoreCurrentState(\n loadedItemUnderLock: Awaited<ReturnType<typeof readLocatedItem>> | null,\n history: HistoryEntry[],\n): RestoreCurrentState {\n if (loadedItemUnderLock) {\n return {\n document: loadedItemUnderLock.document,\n originalRaw: loadedItemUnderLock.raw,\n };\n }\n return { document: replayCurrentDocument(history), originalRaw: null };\n}\n\nfunction collectRestoreOwnershipWarnings(params: {\n document: ItemDocument;\n author: string;\n force: boolean | undefined;\n enforcement: \"strict\" | \"warn\" | \"none\";\n resolvedId: string;\n}): string[] {\n const assigned = params.document.metadata.assignee?.trim();\n const hasOwnershipConflict =\n assigned && assigned !== params.author && !params.force;\n if (!hasOwnershipConflict) {\n return [];\n }\n if (params.enforcement === \"strict\") {\n throw new PmCliError(\n `Item ${params.resolvedId} is assigned to ${assigned}. Use --force to override.`,\n EXIT_CODE.CONFLICT,\n );\n }\n return params.enforcement === \"warn\"\n ? [`ownership_warning:assignee_conflict:${params.resolvedId}:${assigned}`]\n : [];\n}\n\nasync function restorePreviousItemAfterHistoryFailure(params: {\n existingItemPath: string | null;\n resolvedOriginalRaw: string | null;\n restoredItemPath: string;\n}): Promise<void> {\n if (\n params.existingItemPath &&\n params.resolvedOriginalRaw !== null &&\n params.restoredItemPath !== params.existingItemPath\n ) {\n await writeFileAtomic(params.existingItemPath, params.resolvedOriginalRaw);\n await fs.rm(params.restoredItemPath, { force: true });\n return;\n }\n if (params.existingItemPath && params.resolvedOriginalRaw !== null) {\n await writeFileAtomic(params.existingItemPath, params.resolvedOriginalRaw);\n return;\n }\n await fs.rm(params.restoredItemPath, { force: true });\n}\n\nasync function runRestoreWriteHooks(params: {\n restoredItemPath: string;\n historyPath: string;\n before: ItemDocument;\n after: ItemDocument;\n}): Promise<string[]> {\n return [\n ...(await runActiveOnWriteHooks({\n path: params.restoredItemPath,\n scope: \"project\",\n op: \"restore\",\n item_id: params.after.metadata.id,\n item_type: params.after.metadata.type,\n before: params.before,\n after: params.after,\n changed_fields: [\"restored\"],\n })),\n ...(await runActiveOnWriteHooks({\n path: params.historyPath,\n scope: \"project\",\n op: \"restore:history\",\n item_id: params.after.metadata.id,\n item_type: params.after.metadata.type,\n before: params.before,\n after: params.after,\n changed_fields: [\"restored\"],\n })),\n ];\n}\n\n/** Implements run restore for the public runtime surface of this module. */\nexport async function runRestore(\n id: string,\n target: string,\n options: RestoreCommandOptions,\n global: GlobalOptions,\n): Promise<RestoreResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const subject = await resolveRestoreSubject(\n pmRoot,\n id,\n settings,\n typeRegistry.type_to_folder,\n );\n const resolvedId = subject.id;\n const historyRawBeforeLock = await readFileIfExists(subject.historyPath);\n const history = await readHistoryEntries(subject.historyPath, resolvedId);\n if (history.length === 0) {\n throw new PmCliError(\n `No history exists for ${resolvedId}; restore is unavailable.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n\n const resolvedTarget = ensureReplayTarget(target, history);\n const replayDocument = ensureMaterializedRestoreTarget(\n replayToTarget(history, resolvedTarget.historyIndex),\n resolvedTarget,\n );\n const restoredDocument = replayToCanonicalItemDocument(replayDocument, {\n schema: settings.schema,\n });\n\n if (restoredDocument.metadata.id !== resolvedId) {\n throw new PmCliError(\n `Restore target resolved to item ${restoredDocument.metadata.id}, expected ${resolvedId}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n const loadedItemBeforeLock = subject.located\n ? await readLocatedItem(subject.located, { schema: settings.schema })\n : null;\n const currentItemRawBeforeLock = loadedItemBeforeLock?.raw ?? null;\n\n const author = resolveAuthor(options.author, settings.author_default);\n const releaseLock = await acquireLock(\n pmRoot,\n resolvedId,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n settings.governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n\n try {\n const { loadedItemUnderLock, existingItemPath } =\n await loadRestoreStateUnderLock({\n pmRoot,\n resolvedId,\n subject,\n settings,\n typeToFolder: typeRegistry.type_to_folder,\n historyRawBeforeLock,\n currentItemRawBeforeLock,\n });\n const itemFormat = \"toon\";\n const currentState = resolveRestoreCurrentState(\n loadedItemUnderLock,\n history,\n );\n const ownershipWarnings = collectRestoreOwnershipWarnings({\n document: currentState.document,\n author,\n force: options.force,\n enforcement: settings.governance.ownership_enforcement,\n resolvedId,\n });\n\n const serializedRestore = serializeItemDocument(restoredDocument, {\n format: itemFormat,\n schema: settings.schema,\n });\n /* c8 ignore next -- restored item path typing is exercised in restore integration workflows. */\n const restoredItemPath = getItemPath(\n pmRoot,\n restoredDocument.metadata.type,\n resolvedId,\n itemFormat,\n typeRegistry.type_to_folder,\n );\n const releaseDerivedIndexLock = await acquireItemMetadataDerivedIndexLock(\n pmRoot,\n author,\n );\n let derivedIndexWarnings: string[] = [];\n try {\n await writeFileAtomic(restoredItemPath, serializedRestore);\n if (existingItemPath && restoredItemPath !== existingItemPath) {\n await fs.rm(existingItemPath);\n }\n\n const historyEntry = createHistoryEntry({\n nowIso: nowIso(),\n author,\n op: \"restore\",\n before: currentState.document,\n after: restoredDocument,\n message: options.message,\n });\n try {\n await appendHistoryEntry(subject.historyPath, historyEntry);\n } catch (error: unknown) {\n await restorePreviousItemAfterHistoryFailure({\n existingItemPath,\n resolvedOriginalRaw: currentState.originalRaw,\n restoredItemPath,\n });\n throw error;\n }\n derivedIndexWarnings = await refreshItemMetadataDerivedIndex({\n pmRoot,\n preferredFormat: settings.item_format,\n typeToFolder: typeRegistry.type_to_folder,\n schema: settings.schema,\n itemPath: restoredItemPath,\n previousItemPath: existingItemPath ?? undefined,\n document: restoredDocument,\n });\n } finally {\n await releaseDerivedIndexLock();\n }\n const restoreChangedFields = changedFields(\n currentState.document,\n restoredDocument,\n );\n const hookWarnings = await runRestoreWriteHooks({\n restoredItemPath,\n historyPath: subject.historyPath,\n before: currentState.document,\n after: restoredDocument,\n });\n recordAfterCommandAffectedItem({\n id: restoredDocument.metadata.id,\n op: \"restore\",\n item_type: restoredDocument.metadata.type,\n previous_status: currentState.document.metadata.status,\n status: restoredDocument.metadata.status,\n previous: projectAfterCommandItemSnapshot(\n currentState.document.metadata,\n restoreChangedFields,\n ),\n current: projectAfterCommandItemSnapshot(\n restoredDocument.metadata,\n restoreChangedFields,\n ),\n changed_fields: restoreChangedFields,\n });\n\n const targetEntry = history[resolvedTarget.historyIndex];\n return {\n item: restoredDocument.metadata,\n restored_from: {\n kind: resolvedTarget.kind,\n target: resolvedTarget.raw,\n history_index: resolvedTarget.historyIndex + 1,\n entry_ts: targetEntry.ts,\n entry_op: targetEntry.op,\n },\n changed_fields: restoreChangedFields,\n warnings: [\n ...subject.historyPolicyWarnings,\n ...ownershipWarnings,\n ...derivedIndexWarnings,\n ...hookWarnings,\n ],\n };\n } finally {\n await releaseLock();\n }\n}\n\n/** Public contract for test only restore command, shared by SDK and presentation-layer consumers. */\nexport const _testOnlyRestoreCommand = {\n applyHistoryPatch,\n changedFields,\n ensureMaterializedRestoreTarget,\n ensureReplayTarget,\n extractPatchFailureContext,\n replayCurrentDocument,\n replayToTarget,\n resolveRestoreSubject,\n};\n"],"names":[],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;MAClC,UAAU,gCACR,aAAa,SAAS,UACtB,oBAAoB;MAEtB,SAAS,gCACP,iBAAiB,UACjB,oBAAoB;MAEtB,gBAAgB;KACjB;AAED,UAAM,cAAc,QAAQ,eAAe,YAAY;AACvD,WAAO;MACL,MAAM,iBAAiB;MACvB,eAAe;QACb,MAAM,eAAe;QACrB,QAAQ,eAAe;QACvB,eAAe,eAAe,eAAe;QAC7C,UAAU,YAAY;QACtB,UAAU,YAAY;;MAExB,gBAAgB;MAChB,UAAU;QACR,GAAG,QAAQ;QACX,GAAG;QACH,GAAG;QACH,GAAG;;;EAGT;AACE,UAAM,YAAW;EACnB;AACF;AAGO,IAAM,0BAA0B;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA","debugId":"f2cb1ebe-3459-59b8-80b9-c3371923eb7d"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  collectUsedExtensionCapabilities,
3
3
  normalizeExtensionName
4
- } from "./chunk-7AVEY74G.js";
4
+ } from "./chunk-VTOCZ343.js";
5
5
 
6
6
  // dist/core/extensions/activation-summary.js
7
7
  !(function() {
@@ -159,4 +159,4 @@ export {
159
159
  describeExtensionActivation,
160
160
  renderExtensionSurfaceMarkdown
161
161
  };
162
- //# sourceMappingURL=chunk-7WCE6Y64.js.map
162
+ //# sourceMappingURL=chunk-NUQCSV4P.js.map
@@ -2,7 +2,7 @@
2
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]="bd66882b-1bef-52df-b18f-5cb50c8e2ac3")}catch(e){}}();
3
3
  import {
4
4
  normalizeAddTypeInput
5
- } from "./chunk-TOBGV45Y.js";
5
+ } from "./chunk-YUKIFPWK.js";
6
6
  import {
7
7
  DEFAULT_RUNTIME_STATUS_DEFINITIONS,
8
8
  ITEM_METADATA_KEY_ORDER,
@@ -10,7 +10,7 @@ import {
10
10
  RUNTIME_FIELD_TYPE_VALUES,
11
11
  RUNTIME_STATUS_ROLE_VALUES,
12
12
  evictOldestMemoEntries
13
- } from "./chunk-HYW67VJ5.js";
13
+ } from "./chunk-TLF52ZDP.js";
14
14
 
15
15
  // dist/core/schema/status-defs-file.js
16
16
  var RUNTIME_STATUS_ROLE_SET = new Set(RUNTIME_STATUS_ROLE_VALUES);
@@ -528,6 +528,6 @@ export {
528
528
  normalizeTypePresetName,
529
529
  resolveTypePresetDefinitions
530
530
  };
531
- //# sourceMappingURL=chunk-SZVB53Y3.js.map
531
+ //# sourceMappingURL=chunk-O3GFE2PX.js.map
532
532
 
533
533
  //# debugId=bd66882b-1bef-52df-b18f-5cb50c8e2ac3
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  renameArtifactsResultKey,
5
5
  runLinkedArtifacts
6
- } from "./chunk-LAV26CQG.js";
6
+ } from "./chunk-42SYYKA4.js";
7
7
 
8
8
  // dist/sdk/docs.js
9
9
  async function runDocs(id, options, global) {
@@ -19,6 +19,6 @@ async function runDocs(id, options, global) {
19
19
  export {
20
20
  runDocs
21
21
  };
22
- //# sourceMappingURL=chunk-OY7DMU5P.js.map
22
+ //# sourceMappingURL=chunk-O43LEUSD.js.map
23
23
 
24
24
  //# debugId=db3e4dc9-8bda-5f4e-bf43-3c1ce147c9a2