@unbrained/pm-cli 2026.7.5 → 2026.7.7

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 (597) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/cli/commands/annotation-command.d.ts +1 -0
  3. package/dist/cli/commands/annotation-command.js +29 -2
  4. package/dist/cli/commands/annotation-command.js.map +1 -1
  5. package/dist/cli/commands/comments.js +3 -4
  6. package/dist/cli/commands/comments.js.map +1 -1
  7. package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
  8. package/dist/cli/commands/extension/bundled-catalog.js +38 -28
  9. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  10. package/dist/cli/commands/extension/install-sources.js +81 -18
  11. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  12. package/dist/cli/commands/health.js +9 -5
  13. package/dist/cli/commands/health.js.map +1 -1
  14. package/dist/cli/commands/learnings.js +5 -3
  15. package/dist/cli/commands/learnings.js.map +1 -1
  16. package/dist/cli/commands/notes.js +5 -3
  17. package/dist/cli/commands/notes.js.map +1 -1
  18. package/dist/cli/commands/reindex.js +4 -3
  19. package/dist/cli/commands/reindex.js.map +1 -1
  20. package/dist/cli/commands/search.js +3 -3
  21. package/dist/cli/commands/search.js.map +1 -1
  22. package/dist/cli/commands/test.d.ts +9 -0
  23. package/dist/cli/commands/test.js +144 -105
  24. package/dist/cli/commands/test.js.map +1 -1
  25. package/dist/cli/extension-command-help.js +10 -2
  26. package/dist/cli/extension-command-help.js.map +1 -1
  27. package/dist/cli/register-list-query.d.ts +1 -1
  28. package/dist/cli/register-list-query.js +18 -27
  29. package/dist/cli/register-list-query.js.map +1 -1
  30. package/dist/cli/register-operations.d.ts +0 -8
  31. package/dist/cli/register-operations.js +41 -46
  32. package/dist/cli/register-operations.js.map +1 -1
  33. package/dist/cli/register-setup.js +113 -13
  34. package/dist/cli/register-setup.js.map +1 -1
  35. package/dist/cli/registration-helpers.d.ts +5 -1
  36. package/dist/cli/registration-helpers.js +14 -2
  37. package/dist/cli/registration-helpers.js.map +1 -1
  38. package/dist/cli-bundle/chunks/append-F7WPGIQL.js +11 -0
  39. package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js → append-PVCTBVJG.js} +8 -9
  40. package/dist/cli-bundle/chunks/{chunk-PPE4YUQM.js → chunk-2APXX4TZ.js} +17 -28
  41. package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
  42. package/dist/cli-bundle/chunks/{docs-S6UTOTO5.js → chunk-2LEJGRQ7.js} +3 -12
  43. package/dist/cli-bundle/chunks/{docs-S6UTOTO5.js.map → chunk-2LEJGRQ7.js.map} +1 -1
  44. package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js → chunk-2TILG6F2.js} +3 -3
  45. package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js → chunk-3G6UMXT3.js} +6 -8
  46. package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js.map → chunk-3G6UMXT3.js.map} +1 -1
  47. package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js → chunk-3TYOW6RR.js} +8 -8
  48. package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js → chunk-3X542TEY.js} +7 -7
  49. package/dist/cli-bundle/chunks/{history-repair-EVTO6LIH.js → chunk-42LXP4VO.js} +14 -21
  50. package/dist/cli-bundle/chunks/{history-repair-EVTO6LIH.js.map → chunk-42LXP4VO.js.map} +1 -1
  51. package/dist/cli-bundle/chunks/{chunk-5J2XPTAD.js → chunk-43SIHQND.js} +36 -15
  52. package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
  53. package/dist/cli-bundle/chunks/{history-repair-4N6SDVHK.js → chunk-43UQN754.js} +12 -19
  54. package/dist/cli-bundle/chunks/{history-repair-4N6SDVHK.js.map → chunk-43UQN754.js.map} +1 -1
  55. package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js → chunk-43YSKY75.js} +4 -6
  56. package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js.map → chunk-43YSKY75.js.map} +1 -1
  57. package/dist/cli-bundle/chunks/{notes-72YXN5JX.js → chunk-4BKDAEDF.js} +6 -13
  58. package/dist/cli-bundle/chunks/{notes-72YXN5JX.js.map → chunk-4BKDAEDF.js.map} +2 -2
  59. package/dist/cli-bundle/chunks/{close-many-AP4MWU36.js → chunk-4IQKDKGE.js} +18 -32
  60. package/dist/cli-bundle/chunks/{close-many-AP4MWU36.js.map → chunk-4IQKDKGE.js.map} +1 -1
  61. package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js → chunk-4MZOKTI2.js} +6 -8
  62. package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js.map → chunk-4MZOKTI2.js.map} +1 -1
  63. package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js → chunk-52NS7JDP.js} +14 -20
  64. package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js.map → chunk-52NS7JDP.js.map} +1 -1
  65. package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js → chunk-565WYS5W.js} +12 -16
  66. package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js.map → chunk-565WYS5W.js.map} +1 -1
  67. package/dist/cli-bundle/chunks/{copy-OTJOWFL6.js → chunk-5FIQ4EX3.js} +13 -19
  68. package/dist/cli-bundle/chunks/{copy-OTJOWFL6.js.map → chunk-5FIQ4EX3.js.map} +1 -1
  69. package/dist/cli-bundle/chunks/{config-V57QD47V.js → chunk-6G6O3OPQ.js} +259 -41
  70. package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
  71. package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js → chunk-6LCJRGPD.js} +9 -13
  72. package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js.map → chunk-6LCJRGPD.js.map} +1 -1
  73. package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js → chunk-6UQCNWFV.js} +6 -8
  74. package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js.map → chunk-6UQCNWFV.js.map} +1 -1
  75. package/dist/cli-bundle/chunks/{chunk-LEKT4K7I.js → chunk-6XTSYPPO.js} +1216 -387
  76. package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
  77. package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
  78. package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
  79. package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js → chunk-7PNQA24K.js} +30 -36
  80. package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js.map → chunk-7PNQA24K.js.map} +1 -1
  81. package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js → chunk-7VQ3JJN5.js} +2 -2
  82. package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js → chunk-7Y5N34HX.js} +8 -12
  83. package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js.map → chunk-7Y5N34HX.js.map} +1 -1
  84. package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js → chunk-AGAVEDIE.js} +7 -7
  85. package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js → chunk-AJUON7E6.js} +3 -3
  86. package/dist/cli-bundle/chunks/{close-many-OMZIGZB4.js → chunk-ARKHKYYS.js} +16 -30
  87. package/dist/cli-bundle/chunks/{close-many-OMZIGZB4.js.map → chunk-ARKHKYYS.js.map} +1 -1
  88. package/dist/cli-bundle/chunks/{chunk-7EQNAZX2.js → chunk-C5ACVMOI.js} +99 -51
  89. package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
  90. package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js → chunk-CJQM7O7R.js} +16 -20
  91. package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js.map → chunk-CJQM7O7R.js.map} +1 -1
  92. package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js → chunk-D2DCTFTL.js} +7 -9
  93. package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js.map → chunk-D2DCTFTL.js.map} +1 -1
  94. package/dist/cli-bundle/chunks/{append-CZGUZ45Q.js → chunk-DDDWVPID.js} +7 -11
  95. package/dist/cli-bundle/chunks/{append-CZGUZ45Q.js.map → chunk-DDDWVPID.js.map} +1 -1
  96. package/dist/cli-bundle/chunks/{learnings-2HTPZNGZ.js → chunk-DG6BSXZ7.js} +6 -13
  97. package/dist/cli-bundle/chunks/{learnings-2HTPZNGZ.js.map → chunk-DG6BSXZ7.js.map} +2 -2
  98. package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js → chunk-DR2V5OIV.js} +3 -3
  99. package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js → chunk-E3LWJUGF.js} +4 -6
  100. package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js.map → chunk-E3LWJUGF.js.map} +1 -1
  101. package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js → chunk-E3YQFSFE.js} +6 -10
  102. package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js.map → chunk-E3YQFSFE.js.map} +1 -1
  103. package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js → chunk-EDO7VXSO.js} +2 -2
  104. package/dist/cli-bundle/chunks/{chunk-FDBARR33.js → chunk-EIUBK2LT.js} +12 -18
  105. package/dist/cli-bundle/chunks/{chunk-FDBARR33.js.map → chunk-EIUBK2LT.js.map} +1 -1
  106. package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js → chunk-EMXPI36L.js} +14 -20
  107. package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js.map → chunk-EMXPI36L.js.map} +1 -1
  108. package/dist/cli-bundle/chunks/{chunk-4OFLJHX6.js → chunk-EOUVR7JN.js} +13 -8
  109. package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
  110. package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js → chunk-EVEPHNXJ.js} +4 -4
  111. package/dist/cli-bundle/chunks/{deps-L2FPIAD3.js → chunk-F6MT7KKE.js} +6 -10
  112. package/dist/cli-bundle/chunks/{deps-L2FPIAD3.js.map → chunk-F6MT7KKE.js.map} +1 -1
  113. package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js → chunk-F6YC2A6X.js} +7 -11
  114. package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js.map → chunk-F6YC2A6X.js.map} +1 -1
  115. package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
  116. package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
  117. package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js → chunk-FN6SB4HU.js} +2 -2
  118. package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
  119. package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
  120. package/dist/cli-bundle/chunks/{chunk-JLA7EVYV.js → chunk-GLS6VMWI.js} +37 -16
  121. package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{files-JPU3FNJ7.js → chunk-GPIDUMMN.js} +10 -17
  123. package/dist/cli-bundle/chunks/{files-JPU3FNJ7.js.map → chunk-GPIDUMMN.js.map} +1 -1
  124. package/dist/cli-bundle/chunks/{history-compact-3F6VELO7.js → chunk-GTM5HQL4.js} +15 -21
  125. package/dist/cli-bundle/chunks/{history-compact-3F6VELO7.js.map → chunk-GTM5HQL4.js.map} +1 -1
  126. package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js → chunk-H2SMKL2N.js} +8 -8
  127. package/dist/cli-bundle/chunks/{chunk-S4APD35C.js → chunk-HHEWQXPD.js} +6 -6
  128. package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
  129. package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js → chunk-HX6QXV5P.js} +2 -2
  130. package/dist/cli-bundle/chunks/{copy-LEE6P6EM.js → chunk-I74FMIWA.js} +11 -17
  131. package/dist/cli-bundle/chunks/{copy-LEE6P6EM.js.map → chunk-I74FMIWA.js.map} +1 -1
  132. package/dist/cli-bundle/chunks/chunk-IDIBF4E2.js +804 -0
  133. package/dist/cli-bundle/chunks/chunk-IDIBF4E2.js.map +7 -0
  134. package/dist/cli-bundle/chunks/{comments-SAG5LSKL.js → chunk-II7R6KD4.js} +9 -13
  135. package/dist/cli-bundle/chunks/{comments-SAG5LSKL.js.map → chunk-II7R6KD4.js.map} +1 -1
  136. package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
  137. package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
  138. package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js → chunk-J7BOLHAV.js} +5 -7
  139. package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js.map → chunk-J7BOLHAV.js.map} +1 -1
  140. package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js → chunk-KTGJ2CBU.js} +4 -6
  141. package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js.map → chunk-KTGJ2CBU.js.map} +1 -1
  142. package/dist/cli-bundle/chunks/{chunk-5VVUKE3U.js → chunk-LCFJ7XAM.js} +32 -2
  143. package/dist/cli-bundle/chunks/{chunk-5VVUKE3U.js.map → chunk-LCFJ7XAM.js.map} +3 -3
  144. package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js → chunk-LZQU6XJG.js} +28 -34
  145. package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js.map → chunk-LZQU6XJG.js.map} +1 -1
  146. package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js → chunk-M62RO3XK.js} +10 -14
  147. package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js.map → chunk-M62RO3XK.js.map} +1 -1
  148. package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js → chunk-MCEUKJKW.js} +9 -11
  149. package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js.map → chunk-MCEUKJKW.js.map} +1 -1
  150. package/dist/cli-bundle/chunks/{chunk-T5Y3QSNF.js → chunk-MHNMCDWR.js} +1447 -86
  151. package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
  152. package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js → chunk-MRFWUSVA.js} +4 -6
  153. package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
  154. package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js → chunk-N6ZHDLUY.js} +6 -8
  155. package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js.map → chunk-N6ZHDLUY.js.map} +1 -1
  156. package/dist/cli-bundle/chunks/{delete-HQKGRNRZ.js → chunk-NWWL22C7.js} +8 -12
  157. package/dist/cli-bundle/chunks/{delete-HQKGRNRZ.js.map → chunk-NWWL22C7.js.map} +1 -1
  158. package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js → chunk-P3MJJW7P.js} +2 -2
  159. package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js → chunk-PDXJXEZJ.js} +2 -2
  160. package/dist/cli-bundle/chunks/{append-NSQBCXZJ.js → chunk-Q64AYQYW.js} +9 -13
  161. package/dist/cli-bundle/chunks/{append-NSQBCXZJ.js.map → chunk-Q64AYQYW.js.map} +1 -1
  162. package/dist/cli-bundle/chunks/{update-many-SLLAMHT7.js → chunk-QDABF2RB.js} +26 -47
  163. package/dist/cli-bundle/chunks/{update-many-SLLAMHT7.js.map → chunk-QDABF2RB.js.map} +1 -1
  164. package/dist/cli-bundle/chunks/{chunk-NBFCNJ7Q.js → chunk-QFBSP3NI.js} +529 -46
  165. package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
  166. package/dist/cli-bundle/chunks/{focus-LFZ6IDBR.js → chunk-RB3KLPAH.js} +11 -16
  167. package/dist/cli-bundle/chunks/{focus-LFZ6IDBR.js.map → chunk-RB3KLPAH.js.map} +1 -1
  168. package/dist/cli-bundle/chunks/{chunk-YSAH5FY5.js → chunk-RY7PTTUB.js} +94 -53
  169. package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-WVSGSZ6J.js → chunk-S547WBYG.js} +1477 -86
  171. package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
  172. package/dist/cli-bundle/chunks/{update-many-DC7X3EWM.js → chunk-S5BNGFN5.js} +24 -45
  173. package/dist/cli-bundle/chunks/{update-many-DC7X3EWM.js.map → chunk-S5BNGFN5.js.map} +1 -1
  174. package/dist/cli-bundle/chunks/{focus-WNMYCVYA.js → chunk-S6VC2A2K.js} +9 -14
  175. package/dist/cli-bundle/chunks/{focus-WNMYCVYA.js.map → chunk-S6VC2A2K.js.map} +1 -1
  176. package/dist/cli-bundle/chunks/{learnings-YBIHY3D6.js → chunk-SIM5JDON.js} +7 -14
  177. package/dist/cli-bundle/chunks/{learnings-YBIHY3D6.js.map → chunk-SIM5JDON.js.map} +1 -1
  178. package/dist/cli-bundle/chunks/{chunk-ZD34OFFQ.js → chunk-SY75LYXR.js} +12 -7
  179. package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
  180. package/dist/cli-bundle/chunks/{chunk-TT42JUMF.js → chunk-TEISGNSH.js} +7 -7
  181. package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
  182. package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js → chunk-TEKZOS7M.js} +2 -2
  183. package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js → chunk-TGUK6XN6.js} +14 -18
  184. package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js.map → chunk-TGUK6XN6.js.map} +1 -1
  185. package/dist/cli-bundle/chunks/{plan-R4NDQ27E.js → chunk-TNC6MZUD.js} +10 -21
  186. package/dist/cli-bundle/chunks/{plan-R4NDQ27E.js.map → chunk-TNC6MZUD.js.map} +1 -1
  187. package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
  188. package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
  189. package/dist/cli-bundle/chunks/{chunk-YD5FML7K.js → chunk-UO7XAZK6.js} +27 -4
  190. package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
  191. package/dist/cli-bundle/chunks/{docs-6CRCSVKK.js → chunk-V5ZWKJNY.js} +5 -14
  192. package/dist/cli-bundle/chunks/{docs-6CRCSVKK.js.map → chunk-V5ZWKJNY.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{notes-NJ7IQJX4.js → chunk-VGO73OCK.js} +7 -14
  194. package/dist/cli-bundle/chunks/{notes-NJ7IQJX4.js.map → chunk-VGO73OCK.js.map} +1 -1
  195. package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js → chunk-VLEA2UTQ.js} +2 -2
  196. package/dist/cli-bundle/chunks/{files-6P57MRKL.js → chunk-W5HXHC7C.js} +8 -15
  197. package/dist/cli-bundle/chunks/{files-6P57MRKL.js.map → chunk-W5HXHC7C.js.map} +1 -1
  198. package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js → chunk-WCWVEXGA.js} +2 -2
  199. package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
  200. package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
  201. package/dist/cli-bundle/chunks/{delete-62JQTYT4.js → chunk-XBX5CBRQ.js} +6 -10
  202. package/dist/cli-bundle/chunks/{delete-62JQTYT4.js.map → chunk-XBX5CBRQ.js.map} +1 -1
  203. package/dist/cli-bundle/chunks/{chunk-MTTXDAK4.js → chunk-XC3X7BQR.js} +541 -44
  204. package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
  205. package/dist/cli-bundle/chunks/{history-compact-656Y2TN4.js → chunk-XHCVAZGM.js} +17 -23
  206. package/dist/cli-bundle/chunks/{history-compact-656Y2TN4.js.map → chunk-XHCVAZGM.js.map} +1 -1
  207. package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js → chunk-XPMXPR7K.js} +7 -9
  208. package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js.map → chunk-XPMXPR7K.js.map} +1 -1
  209. package/dist/cli-bundle/chunks/{deps-55FTG6Z5.js → chunk-XS2TMNXR.js} +8 -12
  210. package/dist/cli-bundle/chunks/{deps-55FTG6Z5.js.map → chunk-XS2TMNXR.js.map} +1 -1
  211. package/dist/cli-bundle/chunks/{plan-XWY5T67S.js → chunk-XXIYUTLK.js} +12 -23
  212. package/dist/cli-bundle/chunks/{plan-XWY5T67S.js.map → chunk-XXIYUTLK.js.map} +1 -1
  213. package/dist/cli-bundle/chunks/{chunk-7QH7DHUB.js → chunk-XZWL7VNE.js} +1220 -398
  214. package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
  215. package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
  216. package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js → chunk-Y7KYVCZM.js} +12 -18
  218. package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js.map → chunk-Y7KYVCZM.js.map} +1 -1
  219. package/dist/cli-bundle/chunks/{chunk-UI5BJ6DO.js → chunk-YCVWWIKY.js} +17 -28
  220. package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
  221. package/dist/cli-bundle/chunks/chunk-YH5NBDFA.js +780 -0
  222. package/dist/cli-bundle/chunks/chunk-YH5NBDFA.js.map +1 -0
  223. package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
  224. package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
  225. package/dist/cli-bundle/chunks/{comments-MIW5MZOX.js → chunk-YPD7SQ5P.js} +8 -12
  226. package/dist/cli-bundle/chunks/{comments-MIW5MZOX.js.map → chunk-YPD7SQ5P.js.map} +2 -2
  227. package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js → chunk-YPMZMKN7.js} +2 -2
  228. package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js → chunk-YTD5GICJ.js} +4 -4
  229. package/dist/cli-bundle/chunks/{config-DJJKZB5R.js → chunk-ZNEG2UDO.js} +264 -39
  230. package/dist/cli-bundle/chunks/{config-DJJKZB5R.js.map → chunk-ZNEG2UDO.js.map} +4 -4
  231. package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js → chunk-ZO7CLOY2.js} +3 -3
  232. package/dist/cli-bundle/chunks/{close-3YRR3XY6.js → close-3YYQ5OG2.js} +5 -9
  233. package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
  234. package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
  235. package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
  236. package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
  237. package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
  238. package/dist/cli-bundle/chunks/copy-44RT5GDW.js +13 -0
  239. package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
  240. package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js → create-4GWJWPXG.js} +9 -14
  241. package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
  242. package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
  243. package/dist/cli-bundle/chunks/delete-YQ2VPXNF.js +14 -0
  244. package/dist/cli-bundle/chunks/deps-BU5EBJDU.js +17 -0
  245. package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
  246. package/dist/cli-bundle/chunks/docs-OQBSJNIA.js +18 -0
  247. package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
  248. package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
  249. package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js → files-HTSB2KJG.js} +13 -13
  250. package/dist/cli-bundle/chunks/focus-FOG4ALC2.js +14 -0
  251. package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
  252. package/dist/cli-bundle/chunks/history-compact-M6IFAMBP.js +25 -0
  253. package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
  254. package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js → history-redact-NQX3OGZP.js} +7 -11
  255. package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
  256. package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
  257. package/dist/cli-bundle/chunks/history-repair-NHOJG7WO.js +23 -0
  258. package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
  259. package/dist/cli-bundle/chunks/learnings-T63JGKKN.js +17 -0
  260. package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
  261. package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
  262. package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
  263. package/dist/cli-bundle/chunks/plan-OSCNYFGC.js.map +7 -0
  264. package/dist/cli-bundle/chunks/plan-TN537L24.js +28 -0
  265. package/dist/cli-bundle/chunks/plan-TN537L24.js.map +1 -0
  266. package/dist/cli-bundle/chunks/profile-MHAMXMHQ.js +37 -0
  267. package/dist/cli-bundle/chunks/profile-MHAMXMHQ.js.map +1 -0
  268. package/dist/cli-bundle/chunks/profile-TIGLAKJ7.js +33 -0
  269. package/dist/cli-bundle/chunks/profile-TIGLAKJ7.js.map +7 -0
  270. package/dist/cli-bundle/chunks/{register-list-query-5H66WFYF.js → register-list-query-OHXD7G5N.js} +41 -33
  271. package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
  272. package/dist/cli-bundle/chunks/{register-list-query-FB3FNDLZ.js → register-list-query-ZCRABAPN.js} +42 -34
  273. package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js → register-mutation-P3G4XP6Q.js} +36 -41
  275. package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js → register-mutation-XX4H56PE.js} +34 -39
  277. package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js.map → register-mutation-XX4H56PE.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{register-operations-A3XAM5J7.js → register-operations-V6PIYEDU.js} +80 -52
  279. package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
  280. package/dist/cli-bundle/chunks/{register-operations-SG7HBSUP.js → register-operations-V6VKTG54.js} +79 -51
  281. package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
  282. package/dist/cli-bundle/chunks/{register-setup-K6U3NVY5.js → register-setup-6RVAWT6W.js} +129 -31
  283. package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
  284. package/dist/cli-bundle/chunks/{register-setup-I45OGJUV.js → register-setup-6YVUSQYD.js} +130 -32
  285. package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
  286. package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js → restore-HC3YSWF7.js} +7 -11
  287. package/dist/cli-bundle/chunks/restore-HC3YSWF7.js.map +1 -0
  288. package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
  289. package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js.map +7 -0
  290. package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js → schema-DAGSYO6E.js} +6 -10
  291. package/dist/cli-bundle/chunks/schema-DAGSYO6E.js.map +7 -0
  292. package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js → schema-UBXJCQAC.js} +6 -10
  293. package/dist/cli-bundle/chunks/schema-UBXJCQAC.js.map +1 -0
  294. package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
  295. package/dist/cli-bundle/chunks/update-CJGG5WMV.js.map +7 -0
  296. package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
  297. package/dist/cli-bundle/chunks/update-LKD64AFP.js.map +1 -0
  298. package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
  299. package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js.map +7 -0
  300. package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
  301. package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js.map +1 -0
  302. package/dist/cli-bundle/main.js +29 -31
  303. package/dist/cli-bundle/main.js.map +2 -2
  304. package/dist/cli-bundle/sdk-runtime.js +136 -54
  305. package/dist/cli-bundle/sdk-testing.js +7 -8
  306. package/dist/cli-bundle/sdk.js +132 -84
  307. package/dist/cli-bundle/sdk.js.map +2 -2
  308. package/dist/core/history/drift-scan.js +3 -8
  309. package/dist/core/history/drift-scan.js.map +1 -1
  310. package/dist/core/output/mutation-projection.js +11 -5
  311. package/dist/core/output/mutation-projection.js.map +1 -1
  312. package/dist/core/search/cache.js +3 -3
  313. package/dist/core/search/cache.js.map +1 -1
  314. package/dist/core/search/semantic-defaults.d.ts +2 -0
  315. package/dist/core/search/semantic-defaults.js +11 -4
  316. package/dist/core/search/semantic-defaults.js.map +1 -1
  317. package/dist/core/search/vector-stores.d.ts +1 -1
  318. package/dist/core/search/vector-stores.js +33 -7
  319. package/dist/core/search/vector-stores.js.map +1 -1
  320. package/dist/mcp/server.d.ts +22 -50
  321. package/dist/mcp/server.js +62 -916
  322. package/dist/mcp/server.js.map +1 -1
  323. package/dist/sdk/cli-contracts/flag-contracts.js +7 -7
  324. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  325. package/dist/sdk/cli-contracts/tool-schema.js +9 -7
  326. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  327. package/dist/sdk/index.d.ts +4 -2
  328. package/dist/sdk/index.js +4 -4
  329. package/dist/sdk/index.js.map +1 -1
  330. package/dist/sdk/runtime.d.ts +312 -5
  331. package/dist/sdk/runtime.js +1391 -26
  332. package/dist/sdk/runtime.js.map +1 -1
  333. package/dist/sdk/start-task-status.d.ts +13 -0
  334. package/dist/sdk/start-task-status.js +19 -0
  335. package/dist/sdk/start-task-status.js.map +1 -0
  336. package/dist/sdk/workspace-contracts-cache.d.ts +17 -0
  337. package/dist/sdk/workspace-contracts-cache.js +36 -0
  338. package/dist/sdk/workspace-contracts-cache.js.map +1 -0
  339. package/docs/COMMANDS.md +10 -1
  340. package/docs/RELEASING.md +3 -1
  341. package/docs/SDK.md +81 -0
  342. package/docs/TESTING.md +3 -0
  343. package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +16 -2
  344. package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +16 -1
  345. package/package.json +1 -1
  346. package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +0 -18
  347. package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js +0 -375
  348. package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js.map +0 -7
  349. package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js +0 -372
  350. package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js.map +0 -1
  351. package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
  352. package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
  353. package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js +0 -1961
  354. package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js.map +0 -1
  355. package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js +0 -1749
  356. package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +0 -7
  357. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
  358. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
  359. package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js +0 -822
  360. package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js.map +0 -7
  361. package/dist/cli-bundle/chunks/chunk-4OFLJHX6.js.map +0 -1
  362. package/dist/cli-bundle/chunks/chunk-53BTLLAF.js +0 -2181
  363. package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +0 -1
  364. package/dist/cli-bundle/chunks/chunk-57C2RLW5.js +0 -1704
  365. package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +0 -1
  366. package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js +0 -2330
  367. package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js.map +0 -7
  368. package/dist/cli-bundle/chunks/chunk-5J2XPTAD.js.map +0 -7
  369. package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js +0 -995
  370. package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js +0 -819
  372. package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js.map +0 -1
  373. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
  374. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
  375. package/dist/cli-bundle/chunks/chunk-7EQNAZX2.js.map +0 -7
  376. package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +0 -1
  377. package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js +0 -530
  378. package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js.map +0 -7
  379. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +0 -275
  380. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +0 -7
  381. package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js +0 -231
  382. package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +0 -7
  383. package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js +0 -2184
  384. package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +0 -7
  385. package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js +0 -1615
  386. package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js.map +0 -7
  387. package/dist/cli-bundle/chunks/chunk-FJRKQREY.js +0 -228
  388. package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +0 -1
  389. package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js +0 -3237
  390. package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +0 -7
  391. package/dist/cli-bundle/chunks/chunk-HK72NWAD.js +0 -1570
  392. package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +0 -1
  393. package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js +0 -3206
  394. package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +0 -1
  395. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
  396. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
  397. package/dist/cli-bundle/chunks/chunk-JLA7EVYV.js.map +0 -1
  398. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +0 -76
  399. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +0 -1
  400. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +0 -79
  401. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +0 -7
  402. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +0 -915
  403. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +0 -1
  404. package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js +0 -218
  405. package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js.map +0 -7
  406. package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +0 -7
  407. package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js +0 -1858
  408. package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js.map +0 -1
  409. package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +0 -7
  410. package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js +0 -520
  411. package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js.map +0 -1
  412. package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js +0 -1041
  413. package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js.map +0 -7
  414. package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +0 -1
  415. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
  416. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
  417. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +0 -918
  418. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +0 -7
  419. package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js +0 -1985
  420. package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js.map +0 -7
  421. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +0 -238
  422. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +0 -1
  423. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +0 -1977
  424. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +0 -7
  425. package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js +0 -1031
  426. package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js.map +0 -1
  427. package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +0 -1
  428. package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
  429. package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
  430. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
  431. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
  432. package/dist/cli-bundle/chunks/chunk-S4APD35C.js.map +0 -7
  433. package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js +0 -1149
  434. package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +0 -1
  435. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +0 -272
  436. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +0 -1
  437. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +0 -1
  438. package/dist/cli-bundle/chunks/chunk-TT42JUMF.js.map +0 -1
  439. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +0 -165
  440. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +0 -1
  441. package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +0 -7
  442. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +0 -1932
  443. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +0 -1
  444. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +0 -175
  445. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +0 -7
  446. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
  447. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
  448. package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js +0 -1868
  449. package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js.map +0 -7
  450. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +0 -7
  451. package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js +0 -1152
  452. package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +0 -7
  453. package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +0 -1
  454. package/dist/cli-bundle/chunks/chunk-YSAH5FY5.js.map +0 -1
  455. package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js +0 -1005
  456. package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js.map +0 -7
  457. package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js +0 -215
  458. package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js.map +0 -1
  459. package/dist/cli-bundle/chunks/chunk-ZD34OFFQ.js.map +0 -7
  460. package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js +0 -2306
  461. package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +0 -1
  462. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +0 -241
  463. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +0 -7
  464. package/dist/cli-bundle/chunks/claim-4DROPSIS.js +0 -144
  465. package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +0 -1
  466. package/dist/cli-bundle/chunks/claim-VX54TV5U.js +0 -147
  467. package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +0 -7
  468. package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +0 -16
  469. package/dist/cli-bundle/chunks/config-V57QD47V.js.map +0 -1
  470. package/dist/cli-bundle/chunks/context-4OQGIPSO.js +0 -45
  471. package/dist/cli-bundle/chunks/context-WLA6IAWE.js +0 -49
  472. package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +0 -12
  473. package/dist/cli-bundle/chunks/create-WKOZKPQR.js +0 -30
  474. package/dist/cli-bundle/chunks/eval-N6UHFWVO.js +0 -288
  475. package/dist/cli-bundle/chunks/eval-N6UHFWVO.js.map +0 -7
  476. package/dist/cli-bundle/chunks/eval-PHOTWYHI.js +0 -278
  477. package/dist/cli-bundle/chunks/eval-PHOTWYHI.js.map +0 -1
  478. package/dist/cli-bundle/chunks/extension-NBAH62ML.js +0 -40
  479. package/dist/cli-bundle/chunks/extension-ZF6ZZPOU.js +0 -44
  480. package/dist/cli-bundle/chunks/gc-AETFKZ44.js +0 -398
  481. package/dist/cli-bundle/chunks/gc-AETFKZ44.js.map +0 -7
  482. package/dist/cli-bundle/chunks/gc-RLBP4QVN.js +0 -388
  483. package/dist/cli-bundle/chunks/gc-RLBP4QVN.js.map +0 -1
  484. package/dist/cli-bundle/chunks/get-NH2MPBCI.js +0 -283
  485. package/dist/cli-bundle/chunks/get-NH2MPBCI.js.map +0 -1
  486. package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js +0 -286
  487. package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js.map +0 -7
  488. package/dist/cli-bundle/chunks/health-3GVPMQBL.js +0 -1612
  489. package/dist/cli-bundle/chunks/health-3GVPMQBL.js.map +0 -1
  490. package/dist/cli-bundle/chunks/health-DNTM72GJ.js +0 -1615
  491. package/dist/cli-bundle/chunks/health-DNTM72GJ.js.map +0 -7
  492. package/dist/cli-bundle/chunks/history-RYKLC72X.js +0 -20
  493. package/dist/cli-bundle/chunks/history-SGPYRAFT.js +0 -24
  494. package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +0 -21
  495. package/dist/cli-bundle/chunks/init-RPIPQUNV.js +0 -32
  496. package/dist/cli-bundle/chunks/init-SKQAESQS.js +0 -28
  497. package/dist/cli-bundle/chunks/list-64LHZ3HM.js +0 -32
  498. package/dist/cli-bundle/chunks/list-7LXBTEKI.js +0 -36
  499. package/dist/cli-bundle/chunks/next-7ODPAQ4U.js +0 -306
  500. package/dist/cli-bundle/chunks/next-7ODPAQ4U.js.map +0 -7
  501. package/dist/cli-bundle/chunks/next-ODJUM4ZM.js +0 -303
  502. package/dist/cli-bundle/chunks/next-ODJUM4ZM.js.map +0 -1
  503. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +0 -397
  504. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +0 -1
  505. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +0 -400
  506. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +0 -7
  507. package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js.map +0 -7
  508. package/dist/cli-bundle/chunks/register-list-query-FB3FNDLZ.js.map +0 -1
  509. package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js.map +0 -1
  510. package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js.map +0 -7
  511. package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js.map +0 -1
  512. package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js.map +0 -7
  513. package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +0 -19
  514. package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js +0 -91
  515. package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js.map +0 -7
  516. package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js +0 -88
  517. package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js.map +0 -1
  518. package/dist/cli-bundle/chunks/search-3S72CTD6.js +0 -38
  519. package/dist/cli-bundle/chunks/search-WNUNBQXO.js +0 -34
  520. package/dist/cli-bundle/chunks/stats-IJYTRQGV.js +0 -250
  521. package/dist/cli-bundle/chunks/stats-IJYTRQGV.js.map +0 -7
  522. package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js +0 -240
  523. package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js.map +0 -1
  524. package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js +0 -309
  525. package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js.map +0 -7
  526. package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js +0 -306
  527. package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js.map +0 -1
  528. package/dist/cli-bundle/chunks/test-DQ2QFJ7W.js +0 -45
  529. package/dist/cli-bundle/chunks/test-W7QBLVJS.js +0 -41
  530. package/dist/cli-bundle/chunks/test-all-636NTRTT.js +0 -434
  531. package/dist/cli-bundle/chunks/test-all-636NTRTT.js.map +0 -1
  532. package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js +0 -437
  533. package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js.map +0 -7
  534. package/dist/cli-bundle/chunks/test-runs-245OINZR.js +0 -28
  535. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +0 -24
  536. package/dist/cli-bundle/chunks/update-SFLZPJXX.js +0 -30
  537. package/dist/cli-bundle/chunks/update-SJZ6S77U.js +0 -26
  538. package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js +0 -290
  539. package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js.map +0 -7
  540. package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js +0 -287
  541. package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js.map +0 -1
  542. package/dist/cli-bundle/chunks/validate-PA4FDTOV.js +0 -2143
  543. package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +0 -7
  544. package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js +0 -2105
  545. package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +0 -1
  546. /package/dist/cli-bundle/chunks/{activity-4XQIDNM5.js.map → append-F7WPGIQL.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js.map → append-PVCTBVJG.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js.map → chunk-2TILG6F2.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js.map → chunk-3TYOW6RR.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js.map → chunk-3X542TEY.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js.map → chunk-7VQ3JJN5.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js.map → chunk-AGAVEDIE.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js.map → chunk-AJUON7E6.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js.map → chunk-DR2V5OIV.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js.map → chunk-EDO7VXSO.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js.map → chunk-EVEPHNXJ.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js.map → chunk-FN6SB4HU.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js.map → chunk-H2SMKL2N.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js.map → chunk-HX6QXV5P.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js.map → chunk-P3MJJW7P.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js.map → chunk-PDXJXEZJ.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js.map → chunk-TEKZOS7M.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js.map → chunk-VLEA2UTQ.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js.map → chunk-WCWVEXGA.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js.map → chunk-YPMZMKN7.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js.map → chunk-YTD5GICJ.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js.map → chunk-ZO7CLOY2.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{close-3YRR3XY6.js.map → close-3YYQ5OG2.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{close-OB2Y4QP5.js.map → close-Z3Q4U7TS.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{context-4OQGIPSO.js.map → close-many-3L2RXH3M.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{context-WLA6IAWE.js.map → close-many-D366FTIG.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js.map → comments-54XDJNFE.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{contracts-HXJLKCRI.js.map → comments-HGHC2PN6.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js.map → copy-44RT5GDW.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{create-WKOZKPQR.js.map → copy-UGMUGHZA.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{extension-ZF6ZZPOU.js.map → create-4GWJWPXG.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{extension-NBAH62ML.js.map → create-AZXCUYKP.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{history-RYKLC72X.js.map → delete-Y6SXIQ4X.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{history-SGPYRAFT.js.map → delete-YQ2VPXNF.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js.map → deps-BU5EBJDU.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{history-redact-4H3FCKF3.js.map → deps-FMANWFRP.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{init-RPIPQUNV.js.map → docs-OQBSJNIA.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{init-SKQAESQS.js.map → docs-VNPBZXEL.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{list-64LHZ3HM.js.map → files-72HZEBOE.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{list-7LXBTEKI.js.map → files-HTSB2KJG.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js.map → focus-FOG4ALC2.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{restore-PXOFL6AM.js.map → focus-SUTMKXGX.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js.map → history-compact-M6IFAMBP.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js.map → history-compact-NEXRPP2O.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{search-3S72CTD6.js.map → history-redact-NQX3OGZP.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{search-WNUNBQXO.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{test-W7QBLVJS.js.map → history-repair-CBHMHAJO.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{test-DQ2QFJ7W.js.map → history-repair-NHOJG7WO.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{test-runs-ZRD4GCTT.js.map → learnings-M64NTSOR.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{test-runs-245OINZR.js.map → learnings-T63JGKKN.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{update-SJZ6S77U.js.map → notes-73WE2UV2.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{update-SFLZPJXX.js.map → notes-U7L6HQQ2.js.map} +0 -0
@@ -1,241 +0,0 @@
1
- import {
2
- PmCliError
3
- } from "./chunk-P5YORJRH.js";
4
- import {
5
- EXIT_CODE,
6
- isPathWithinDirectory,
7
- pathExists
8
- } from "./chunk-5VVUKE3U.js";
9
-
10
- // dist/core/packages/manifest.js
11
- import fs from "node:fs/promises";
12
- import path from "node:path";
13
- !(function() {
14
- try {
15
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
16
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7abddddb-c56b-5fe9-9516-908b8fbc75db");
17
- } catch (e2) {
18
- }
19
- })();
20
- var PM_PACKAGE_RESOURCE_KINDS = [
21
- "extensions",
22
- "docs",
23
- "examples",
24
- "assets",
25
- "prompts"
26
- ];
27
- var PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS = Object.freeze({
28
- extensions: Object.freeze([
29
- ".agents/pm/extensions",
30
- "extensions",
31
- ".custom/pm-extensions",
32
- ".custom/pm-extension"
33
- ]),
34
- docs: Object.freeze([
35
- "docs",
36
- "documentation"
37
- ]),
38
- examples: Object.freeze([
39
- "examples",
40
- "docs/examples"
41
- ]),
42
- assets: Object.freeze([
43
- "assets",
44
- ".agents/pm/assets"
45
- ]),
46
- prompts: Object.freeze([
47
- "prompts",
48
- ".agents/pm/prompts"
49
- ])
50
- });
51
- function isKnownPackageResourceKind(value) {
52
- return PM_PACKAGE_RESOURCE_KINDS.includes(value);
53
- }
54
- function normalizePackageResourceEntries(kind, raw) {
55
- if (raw === void 0 || raw === null) {
56
- return [];
57
- }
58
- const entries = Array.isArray(raw) ? raw : [raw];
59
- const normalized = [];
60
- for (const entry of entries) {
61
- if (typeof entry !== "string" || entry.trim().length === 0) {
62
- throw new PmCliError(`Package manifest field pm.${kind} must contain string paths.`, EXIT_CODE.USAGE);
63
- }
64
- normalized.push(entry.trim());
65
- }
66
- return [...new Set(normalized)].sort((left, right) => left.localeCompare(right));
67
- }
68
- function normalizePackageResourceMap(raw) {
69
- if (raw === void 0 || raw === null) {
70
- return {};
71
- }
72
- if (typeof raw !== "object" || Array.isArray(raw)) {
73
- throw new PmCliError("Package manifest field pm must be an object.", EXIT_CODE.USAGE);
74
- }
75
- const resources = {};
76
- const candidate = raw;
77
- for (const [key, value] of Object.entries(candidate)) {
78
- if (!isKnownPackageResourceKind(key)) {
79
- continue;
80
- }
81
- const entries = normalizePackageResourceEntries(key, value);
82
- if (entries.length > 0) {
83
- resources[key] = entries;
84
- }
85
- }
86
- return resources;
87
- }
88
- function readStringField(source, key) {
89
- const value = source[key];
90
- return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
91
- }
92
- function normalizeStringArray(raw) {
93
- if (!Array.isArray(raw)) {
94
- return void 0;
95
- }
96
- const values = raw.map((value) => typeof value === "string" ? value.trim() : "").filter((value) => value.length > 0);
97
- return values.length > 0 ? [...new Set(values)].sort((left, right) => left.localeCompare(right)) : void 0;
98
- }
99
- function readUrlLikeField(raw) {
100
- if (typeof raw === "string" && raw.trim().length > 0) {
101
- return raw.trim();
102
- }
103
- if (typeof raw === "object" && raw !== null && !Array.isArray(raw)) {
104
- const value = raw.url;
105
- return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
106
- }
107
- return void 0;
108
- }
109
- function normalizeCatalogLinks(raw) {
110
- if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
111
- return void 0;
112
- }
113
- const source = raw;
114
- const links = {
115
- docs: readStringField(source, "docs"),
116
- npm: readStringField(source, "npm"),
117
- repository: readStringField(source, "repository"),
118
- report: readStringField(source, "report")
119
- };
120
- return Object.values(links).some((value) => typeof value === "string") ? links : void 0;
121
- }
122
- function normalizeCatalogMedia(raw) {
123
- if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
124
- return void 0;
125
- }
126
- const source = raw;
127
- const media = {
128
- image: readStringField(source, "image"),
129
- video: readStringField(source, "video")
130
- };
131
- return Object.values(media).some((value) => typeof value === "string") ? media : void 0;
132
- }
133
- function normalizePackageCatalogMetadata(raw) {
134
- if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
135
- return void 0;
136
- }
137
- const source = raw;
138
- const catalog = {
139
- display_name: readStringField(source, "display_name") ?? readStringField(source, "displayName"),
140
- category: readStringField(source, "category"),
141
- summary: readStringField(source, "summary"),
142
- links: normalizeCatalogLinks(source.links),
143
- media: normalizeCatalogMedia(source.media),
144
- tags: normalizeStringArray(source.tags)
145
- };
146
- return Object.values(catalog).some((value) => value !== void 0) ? catalog : void 0;
147
- }
148
- async function readPmPackageManifest(packageRoot) {
149
- const packageJsonPath = path.join(packageRoot, "package.json");
150
- if (!await pathExists(packageJsonPath)) {
151
- return {
152
- source: "convention",
153
- resources: {}
154
- };
155
- }
156
- let parsed;
157
- try {
158
- parsed = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
159
- } catch (error) {
160
- throw new PmCliError(`Failed to parse package manifest at "${packageJsonPath}": ${String(error)}`, EXIT_CODE.USAGE);
161
- }
162
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
163
- throw new PmCliError(`Package manifest at "${packageJsonPath}" must be a JSON object.`, EXIT_CODE.USAGE);
164
- }
165
- const packageJson = parsed;
166
- const pmManifest = packageJson.pm;
167
- const hasPmManifest = pmManifest !== void 0 && pmManifest !== null;
168
- const pmManifestRecord = typeof pmManifest === "object" && pmManifest !== null && !Array.isArray(pmManifest) ? pmManifest : {};
169
- return {
170
- source: hasPmManifest ? "pm" : "convention",
171
- package_json_path: packageJsonPath,
172
- package_name: typeof packageJson.name === "string" ? packageJson.name : void 0,
173
- package_version: typeof packageJson.version === "string" ? packageJson.version : void 0,
174
- package_private: packageJson.private === true,
175
- package_description: typeof packageJson.description === "string" ? packageJson.description : void 0,
176
- package_keywords: normalizeStringArray(packageJson.keywords),
177
- package_homepage: typeof packageJson.homepage === "string" ? packageJson.homepage : void 0,
178
- package_repository_url: readUrlLikeField(packageJson.repository),
179
- package_bugs_url: readUrlLikeField(packageJson.bugs),
180
- aliases: normalizeStringArray(pmManifestRecord.aliases),
181
- resources: normalizePackageResourceMap(pmManifest),
182
- catalog: normalizePackageCatalogMetadata(pmManifestRecord.catalog)
183
- };
184
- }
185
- async function listExtensionManifestDirectories(parentDirectory) {
186
- if (!await pathExists(parentDirectory)) {
187
- return [];
188
- }
189
- const entries = await fs.readdir(parentDirectory, { withFileTypes: true });
190
- const candidates = [];
191
- for (const entry of entries) {
192
- if (!entry.isDirectory()) {
193
- continue;
194
- }
195
- const directory = path.join(parentDirectory, entry.name);
196
- if (await pathExists(path.join(directory, "manifest.json"))) {
197
- candidates.push(directory);
198
- }
199
- }
200
- return candidates.sort((left, right) => left.localeCompare(right));
201
- }
202
- async function collectPackageExtensionDirectories(packageRoot) {
203
- if (await pathExists(path.join(packageRoot, "manifest.json"))) {
204
- return [packageRoot];
205
- }
206
- const manifest = await readPmPackageManifest(packageRoot);
207
- const manifestEntries = manifest.resources.extensions ?? [];
208
- const discovered = /* @__PURE__ */ new Set();
209
- for (const entry of manifestEntries) {
210
- if (entry.includes("*") || entry.startsWith("!")) {
211
- throw new PmCliError(`Package extension entry "${entry}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`, EXIT_CODE.USAGE);
212
- }
213
- const absolute = path.resolve(packageRoot, entry);
214
- if (!isPathWithinDirectory(packageRoot, absolute)) {
215
- throw new PmCliError(`Package extension entry "${entry}" resolves outside package root.`, EXIT_CODE.USAGE);
216
- }
217
- if (await pathExists(path.join(absolute, "manifest.json"))) {
218
- discovered.add(absolute);
219
- continue;
220
- }
221
- for (const child of await listExtensionManifestDirectories(absolute)) {
222
- discovered.add(child);
223
- }
224
- }
225
- if (manifestEntries.length === 0) {
226
- for (const root of PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS.extensions) {
227
- for (const child of await listExtensionManifestDirectories(path.join(packageRoot, root))) {
228
- discovered.add(child);
229
- }
230
- }
231
- }
232
- return [...discovered].sort((left, right) => left.localeCompare(right));
233
- }
234
-
235
- export {
236
- PM_PACKAGE_RESOURCE_KINDS,
237
- PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,
238
- readPmPackageManifest,
239
- collectPackageExtensionDirectories
240
- };
241
- //# sourceMappingURL=chunk-ZVDL32GJ.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../core/packages/manifest.ts"],
4
- "sourcesContent": ["/**\n * @module core/packages/manifest\n *\n * Discovers and validates pm package manifests for Manifest.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists } from \"../fs/fs-utils.js\";\nimport { isPathWithinDirectory } from \"../fs/path-utils.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\n\nexport const PM_PACKAGE_RESOURCE_KINDS = [\n \"extensions\",\n \"docs\",\n \"examples\",\n \"assets\",\n \"prompts\",\n] as const;\n\n/**\n * Restricts pm package resource kind values accepted by command, SDK, and storage contracts.\n */\nexport type PmPackageResourceKind = (typeof PM_PACKAGE_RESOURCE_KINDS)[number];\n\n/**\n * Restricts pm package resource map values accepted by command, SDK, and storage contracts.\n */\nexport type PmPackageResourceMap = Partial<Record<PmPackageResourceKind, string[]>>;\n\n/**\n * Documents the pm package catalog link map payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmPackageCatalogLinkMap {\n docs?: string;\n npm?: string;\n repository?: string;\n report?: string;\n}\n\n/**\n * Documents the pm package catalog media map payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmPackageCatalogMediaMap {\n image?: string;\n video?: string;\n}\n\n/**\n * Documents the pm package catalog metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmPackageCatalogMetadata {\n display_name?: string;\n category?: string;\n summary?: string;\n links?: PmPackageCatalogLinkMap;\n media?: PmPackageCatalogMediaMap;\n tags?: string[];\n}\n\n/**\n * Documents the pm package manifest payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmPackageManifest {\n source: \"pm\" | \"convention\";\n package_json_path?: string;\n package_name?: string;\n package_version?: string;\n package_private?: boolean;\n package_description?: string;\n package_keywords?: string[];\n package_homepage?: string;\n package_repository_url?: string;\n package_bugs_url?: string;\n aliases?: string[];\n resources: PmPackageResourceMap;\n catalog?: PmPackageCatalogMetadata;\n}\n\nexport const PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS: Readonly<Record<PmPackageResourceKind, readonly string[]>> =\n Object.freeze({\n extensions: Object.freeze([\n \".agents/pm/extensions\",\n \"extensions\",\n \".custom/pm-extensions\",\n \".custom/pm-extension\",\n ]),\n docs: Object.freeze([\n \"docs\",\n \"documentation\",\n ]),\n examples: Object.freeze([\n \"examples\",\n \"docs/examples\",\n ]),\n assets: Object.freeze([\n \"assets\",\n \".agents/pm/assets\",\n ]),\n prompts: Object.freeze([\n \"prompts\",\n \".agents/pm/prompts\",\n ]),\n });\n\nfunction isKnownPackageResourceKind(value: string): value is PmPackageResourceKind {\n return (PM_PACKAGE_RESOURCE_KINDS as readonly string[]).includes(value);\n}\n\nfunction normalizePackageResourceEntries(kind: PmPackageResourceKind, raw: unknown): string[] {\n if (raw === undefined || raw === null) {\n return [];\n }\n const entries = Array.isArray(raw) ? raw : [raw];\n const normalized: string[] = [];\n for (const entry of entries) {\n if (typeof entry !== \"string\" || entry.trim().length === 0) {\n throw new PmCliError(`Package manifest field pm.${kind} must contain string paths.`, EXIT_CODE.USAGE);\n }\n normalized.push(entry.trim());\n }\n return [...new Set(normalized)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction normalizePackageResourceMap(raw: unknown): PmPackageResourceMap {\n if (raw === undefined || raw === null) {\n return {};\n }\n if (typeof raw !== \"object\" || Array.isArray(raw)) {\n throw new PmCliError(\"Package manifest field pm must be an object.\", EXIT_CODE.USAGE);\n }\n const resources: PmPackageResourceMap = {};\n const candidate = raw as Record<string, unknown>;\n for (const [key, value] of Object.entries(candidate)) {\n if (!isKnownPackageResourceKind(key)) {\n continue;\n }\n const entries = normalizePackageResourceEntries(key, value);\n if (entries.length > 0) {\n resources[key] = entries;\n }\n }\n return resources;\n}\n\nfunction readStringField(source: Record<string, unknown>, key: string): string | undefined {\n const value = source[key];\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\n}\n\nfunction normalizeStringArray(raw: unknown): string[] | undefined {\n if (!Array.isArray(raw)) {\n return undefined;\n }\n const values = raw\n .map((value) => typeof value === \"string\" ? value.trim() : \"\")\n .filter((value) => value.length > 0);\n return values.length > 0 ? [...new Set(values)].sort((left, right) => left.localeCompare(right)) : undefined;\n}\n\nfunction readUrlLikeField(raw: unknown): string | undefined {\n if (typeof raw === \"string\" && raw.trim().length > 0) {\n return raw.trim();\n }\n if (typeof raw === \"object\" && raw !== null && !Array.isArray(raw)) {\n const value = (raw as Record<string, unknown>).url;\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\n }\n return undefined;\n}\n\nfunction normalizeCatalogLinks(raw: unknown): PmPackageCatalogLinkMap | undefined {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return undefined;\n }\n const source = raw as Record<string, unknown>;\n const links: PmPackageCatalogLinkMap = {\n docs: readStringField(source, \"docs\"),\n npm: readStringField(source, \"npm\"),\n repository: readStringField(source, \"repository\"),\n report: readStringField(source, \"report\"),\n };\n return Object.values(links).some((value) => typeof value === \"string\") ? links : undefined;\n}\n\nfunction normalizeCatalogMedia(raw: unknown): PmPackageCatalogMediaMap | undefined {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return undefined;\n }\n const source = raw as Record<string, unknown>;\n const media: PmPackageCatalogMediaMap = {\n image: readStringField(source, \"image\"),\n video: readStringField(source, \"video\"),\n };\n return Object.values(media).some((value) => typeof value === \"string\") ? media : undefined;\n}\n\nfunction normalizePackageCatalogMetadata(raw: unknown): PmPackageCatalogMetadata | undefined {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return undefined;\n }\n const source = raw as Record<string, unknown>;\n const catalog: PmPackageCatalogMetadata = {\n display_name: readStringField(source, \"display_name\") ?? readStringField(source, \"displayName\"),\n category: readStringField(source, \"category\"),\n summary: readStringField(source, \"summary\"),\n links: normalizeCatalogLinks(source.links),\n media: normalizeCatalogMedia(source.media),\n tags: normalizeStringArray(source.tags),\n };\n return Object.values(catalog).some((value) => value !== undefined) ? catalog : undefined;\n}\n\n/**\n * Implements read pm package manifest for the public runtime surface of this module.\n */\nexport async function readPmPackageManifest(packageRoot: string): Promise<PmPackageManifest> {\n const packageJsonPath = path.join(packageRoot, \"package.json\");\n if (!(await pathExists(packageJsonPath))) {\n return {\n source: \"convention\",\n resources: {},\n };\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(await fs.readFile(packageJsonPath, \"utf8\")) as unknown;\n } catch (error: unknown) {\n throw new PmCliError(\n `Failed to parse package manifest at \"${packageJsonPath}\": ${String(error)}`,\n EXIT_CODE.USAGE,\n );\n }\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n throw new PmCliError(`Package manifest at \"${packageJsonPath}\" must be a JSON object.`, EXIT_CODE.USAGE);\n }\n\n const packageJson = parsed as Record<string, unknown>;\n const pmManifest = packageJson.pm;\n const hasPmManifest = pmManifest !== undefined && pmManifest !== null;\n const pmManifestRecord = typeof pmManifest === \"object\" && pmManifest !== null && !Array.isArray(pmManifest)\n ? pmManifest as Record<string, unknown>\n : {};\n return {\n source: hasPmManifest ? \"pm\" : \"convention\",\n package_json_path: packageJsonPath,\n package_name: typeof packageJson.name === \"string\" ? packageJson.name : undefined,\n package_version: typeof packageJson.version === \"string\" ? packageJson.version : undefined,\n package_private: packageJson.private === true,\n package_description: typeof packageJson.description === \"string\" ? packageJson.description : undefined,\n package_keywords: normalizeStringArray(packageJson.keywords),\n package_homepage: typeof packageJson.homepage === \"string\" ? packageJson.homepage : undefined,\n package_repository_url: readUrlLikeField(packageJson.repository),\n package_bugs_url: readUrlLikeField(packageJson.bugs),\n aliases: normalizeStringArray(pmManifestRecord.aliases),\n resources: normalizePackageResourceMap(pmManifest),\n catalog: normalizePackageCatalogMetadata(pmManifestRecord.catalog),\n };\n}\n\nasync function listExtensionManifestDirectories(parentDirectory: string): Promise<string[]> {\n if (!(await pathExists(parentDirectory))) {\n return [];\n }\n const entries = await fs.readdir(parentDirectory, { withFileTypes: true });\n const candidates: string[] = [];\n for (const entry of entries) {\n if (!entry.isDirectory()) {\n continue;\n }\n const directory = path.join(parentDirectory, entry.name);\n if (await pathExists(path.join(directory, \"manifest.json\"))) {\n candidates.push(directory);\n }\n }\n return candidates.sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Implements collect package extension directories for the public runtime surface of this module.\n */\nexport async function collectPackageExtensionDirectories(packageRoot: string): Promise<string[]> {\n if (await pathExists(path.join(packageRoot, \"manifest.json\"))) {\n return [packageRoot];\n }\n\n const manifest = await readPmPackageManifest(packageRoot);\n const manifestEntries = manifest.resources.extensions ?? [];\n const discovered = new Set<string>();\n\n for (const entry of manifestEntries) {\n if (entry.includes(\"*\") || entry.startsWith(\"!\")) {\n throw new PmCliError(\n `Package extension entry \"${entry}\" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`,\n EXIT_CODE.USAGE,\n );\n }\n const absolute = path.resolve(packageRoot, entry);\n if (!isPathWithinDirectory(packageRoot, absolute)) {\n throw new PmCliError(`Package extension entry \"${entry}\" resolves outside package root.`, EXIT_CODE.USAGE);\n }\n if (await pathExists(path.join(absolute, \"manifest.json\"))) {\n discovered.add(absolute);\n continue;\n }\n for (const child of await listExtensionManifestDirectories(absolute)) {\n discovered.add(child);\n }\n }\n\n if (manifestEntries.length === 0) {\n for (const root of PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS.extensions) {\n for (const child of await listExtensionManifestDirectories(path.join(packageRoot, root))) {\n discovered.add(child);\n }\n }\n }\n\n return [...discovered].sort((left, right) => left.localeCompare(right));\n}\n"],
5
- "mappings": ";;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;;;;;;;;AAMV,IAAM,4BAA4B;EACvC;EACA;EACA;EACA;EACA;;AA8DK,IAAM,yCACX,OAAO,OAAO;EACZ,YAAY,OAAO,OAAO;IACxB;IACA;IACA;IACA;GACD;EACD,MAAM,OAAO,OAAO;IAClB;IACA;GACD;EACD,UAAU,OAAO,OAAO;IACtB;IACA;GACD;EACD,QAAQ,OAAO,OAAO;IACpB;IACA;GACD;EACD,SAAS,OAAO,OAAO;IACrB;IACA;GACD;CACF;AAEH,SAAS,2BAA2B,OAAa;AAC/C,SAAQ,0BAAgD,SAAS,KAAK;AACxE;AAEA,SAAS,gCAAgC,MAA6B,KAAY;AAChF,MAAI,QAAQ,UAAa,QAAQ,MAAM;AACrC,WAAO,CAAA;EACT;AACA,QAAM,UAAU,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,GAAG;AAC/C,QAAM,aAAuB,CAAA;AAC7B,aAAW,SAAS,SAAS;AAC3B,QAAI,OAAO,UAAU,YAAY,MAAM,KAAI,EAAG,WAAW,GAAG;AAC1D,YAAM,IAAI,WAAW,6BAA6B,IAAI,+BAA+B,UAAU,KAAK;IACtG;AACA,eAAW,KAAK,MAAM,KAAI,CAAE;EAC9B;AACA,SAAO,CAAC,GAAG,IAAI,IAAI,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,UAAU,KAAK,cAAc,KAAK,CAAC;AACjF;AAEA,SAAS,4BAA4B,KAAY;AAC/C,MAAI,QAAQ,UAAa,QAAQ,MAAM;AACrC,WAAO,CAAA;EACT;AACA,MAAI,OAAO,QAAQ,YAAY,MAAM,QAAQ,G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AAC;AACxE;",
6
- "names": []
7
- }
@@ -1,144 +0,0 @@
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]="17de491f-f579-5c44-8876-71e6393cb1da")}catch(e){}}();
3
- import {
4
- wrapOwnershipConflict
5
- } from "./chunk-JLA7EVYV.js";
6
- import {
7
- resolveAuthor
8
- } from "./chunk-T5RRNDA7.js";
9
- import "./chunk-7WYXBPYQ.js";
10
- import "./chunk-YFIE7YK6.js";
11
- import {
12
- mutateItem,
13
- toItemRecord
14
- } from "./chunk-57C2RLW5.js";
15
- import "./chunk-HK72NWAD.js";
16
- import "./chunk-FJRKQREY.js";
17
- import {
18
- PmCliError,
19
- readSettings
20
- } from "./chunk-US3T3W5J.js";
21
- import "./chunk-NNHHXJB2.js";
22
- import {
23
- EXIT_CODE,
24
- getSettingsPath,
25
- pathExists,
26
- resolvePmRoot,
27
- resolveRuntimeStatusRegistry,
28
- statusIsTerminal
29
- } from "./chunk-YD5FML7K.js";
30
-
31
- // dist/cli/commands/claim.js
32
- async function runClaim(id, force, global, options = {}) {
33
- const pmRoot = resolvePmRoot(process.cwd(), global.path);
34
- if (!await pathExists(getSettingsPath(pmRoot))) {
35
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
36
- }
37
- const settings = await readSettings(pmRoot);
38
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
39
- const author = resolveAuthor(options.author, settings.author_default);
40
- let previousAssignee = null;
41
- let skipped = false;
42
- const mutationWarnings = [];
43
- const result = await mutateItem({
44
- pmRoot,
45
- settings,
46
- id,
47
- op: "claim",
48
- author,
49
- message: options.message,
50
- force,
51
- skipNoop: true,
52
- mutate(document) {
53
- const currentAssignee = document.metadata.assignee;
54
- const currentAssigneeText = typeof currentAssignee === "string" ? currentAssignee : "";
55
- previousAssignee = currentAssigneeText.trim().length > 0 ? currentAssigneeText : null;
56
- if (statusIsTerminal(document.metadata.status, statusRegistry) && !force) {
57
- throw new PmCliError(`Cannot claim terminal item ${document.metadata.id} without --force`, EXIT_CODE.CONFLICT);
58
- }
59
- const heldByOther = previousAssignee !== null && previousAssignee !== author;
60
- if (heldByOther && options.ifAvailable === true) {
61
- skipped = true;
62
- mutationWarnings.push(`claim_skipped_held_by:${previousAssignee}`);
63
- return { changedFields: [] };
64
- }
65
- if (heldByOther && !force) {
66
- throw new PmCliError(`Item ${document.metadata.id} is already claimed by ${previousAssignee}. Use --force to take over, or --if-available to skip without failing.`, EXIT_CODE.CONFLICT, {
67
- code: "already_claimed_by",
68
- why: "Claim is an atomic test-and-set so parallel agents never proceed believing they own the same item.",
69
- nextSteps: [
70
- "Run pm next to pick a different unclaimed item.",
71
- "Re-run with --if-available to treat a held item as a no-op skip.",
72
- "Re-run with --force only when taking over the item is coordinated."
73
- ]
74
- });
75
- }
76
- if (heldByOther) {
77
- mutationWarnings.push(`claim_takeover:${previousAssignee}->${author}`);
78
- }
79
- document.metadata.assignee = author;
80
- return { changedFields: ["assignee"], warnings: mutationWarnings };
81
- }
82
- });
83
- return {
84
- item: toItemRecord(result.item),
85
- claimed_by: skipped && previousAssignee !== null ? previousAssignee : author,
86
- previous_assignee: previousAssignee,
87
- forced: force,
88
- ...skipped ? { skipped: true } : {},
89
- ...mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}
90
- };
91
- }
92
- async function runRelease(id, force, global, options = {}) {
93
- const pmRoot = resolvePmRoot(process.cwd(), global.path);
94
- if (!await pathExists(getSettingsPath(pmRoot))) {
95
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
96
- }
97
- const settings = await readSettings(pmRoot);
98
- const author = resolveAuthor(options.author, settings.author_default);
99
- let previousAssignee = null;
100
- let result;
101
- try {
102
- result = await mutateItem({
103
- pmRoot,
104
- settings,
105
- id,
106
- op: "release",
107
- author,
108
- message: options.message,
109
- force,
110
- bypassAssigneeConflict: Boolean(options.allowAuditRelease),
111
- mutate(document) {
112
- previousAssignee = document.metadata.assignee ?? null;
113
- if (!previousAssignee) {
114
- return { changedFields: [] };
115
- }
116
- delete document.metadata.assignee;
117
- return { changedFields: ["assignee"] };
118
- }
119
- });
120
- } catch (error) {
121
- wrapOwnershipConflict(error, {
122
- required: "For audited non-owner handoffs, prefer --allow-audit-release before considering --force.",
123
- examples: ['pm release pm-a1b2 --author "reviewer" --allow-audit-release'],
124
- nextSteps: [
125
- "Use --allow-audit-release for append-only release handoffs that only clear assignee metadata.",
126
- "Use --force only when an explicit override is approved for broader ownership conflicts."
127
- ]
128
- });
129
- }
130
- return {
131
- item: toItemRecord(result.item),
132
- released_by: author,
133
- previous_assignee: previousAssignee,
134
- audit_release: options.allowAuditRelease === true,
135
- forced: force
136
- };
137
- }
138
- export {
139
- runClaim,
140
- runRelease
141
- };
142
- //# sourceMappingURL=claim-4DROPSIS.js.map
143
-
144
- //# debugId=17de491f-f579-5c44-8876-71e6393cb1da
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../cli/commands/claim.ts"],"sourcesContent":["/**\n * @module cli/commands/claim\n *\n * Implements the pm claim command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { resolveRuntimeStatusRegistry, statusIsTerminal } from \"../../core/schema/runtime-schema.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 { toItemRecord } from \"../../core/item/item-record.js\";\nimport { mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { wrapOwnershipConflict } from \"./annotation-command.js\";\n\n/**\n * Documents the claim result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ClaimResult {\n item: Record<string, unknown>;\n claimed_by: string;\n previous_assignee: string | null;\n forced: boolean;\n skipped?: boolean;\n warnings?: string[];\n}\n\n/**\n * Documents the release result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReleaseResult {\n item: Record<string, unknown>;\n released_by: string;\n previous_assignee: string | null;\n audit_release: boolean;\n forced: boolean;\n}\n\n/**\n * Documents the claim mutation options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ClaimMutationOptions {\n author?: string;\n message?: string;\n ifAvailable?: boolean;\n}\n\n/**\n * Documents the release mutation options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReleaseMutationOptions extends ClaimMutationOptions {\n allowAuditRelease?: boolean;\n}\n\n/**\n * Implements run claim for the public runtime surface of this module.\n */\nexport async function runClaim(\n id: string,\n force: boolean,\n global: GlobalOptions,\n options: ClaimMutationOptions = {},\n): Promise<ClaimResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = resolveAuthor(options.author, settings.author_default);\n let previousAssignee: string | null = null;\n let skipped = false;\n const mutationWarnings: string[] = [];\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"claim\",\n author,\n message: options.message,\n force,\n skipNoop: true,\n mutate(document) {\n const currentAssignee = document.metadata.assignee;\n const currentAssigneeText = typeof currentAssignee === \"string\" ? currentAssignee : \"\";\n previousAssignee = currentAssigneeText.trim().length > 0 ? currentAssigneeText : null;\n if (statusIsTerminal(document.metadata.status, statusRegistry) && !force) {\n throw new PmCliError(`Cannot claim terminal item ${document.metadata.id} without --force`, EXIT_CODE.CONFLICT);\n }\n const heldByOther = previousAssignee !== null && previousAssignee !== author;\n if (heldByOther && options.ifAvailable === true) {\n skipped = true;\n mutationWarnings.push(`claim_skipped_held_by:${previousAssignee}`);\n return { changedFields: [] };\n }\n if (heldByOther && !force) {\n throw new PmCliError(\n `Item ${document.metadata.id} is already claimed by ${previousAssignee}. Use --force to take over, or --if-available to skip without failing.`,\n EXIT_CODE.CONFLICT,\n {\n code: \"already_claimed_by\",\n why: \"Claim is an atomic test-and-set so parallel agents never proceed believing they own the same item.\",\n nextSteps: [\n \"Run pm next to pick a different unclaimed item.\",\n \"Re-run with --if-available to treat a held item as a no-op skip.\",\n \"Re-run with --force only when taking over the item is coordinated.\",\n ],\n },\n );\n }\n if (heldByOther) {\n mutationWarnings.push(`claim_takeover:${previousAssignee}->${author}`);\n }\n document.metadata.assignee = author;\n return { changedFields: [\"assignee\"], warnings: mutationWarnings };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n claimed_by: skipped && previousAssignee !== null ? previousAssignee : author,\n previous_assignee: previousAssignee,\n forced: force,\n ...(skipped ? { skipped: true } : {}),\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n}\n\n/**\n * Implements run release for the public runtime surface of this module.\n */\nexport async function runRelease(\n id: string,\n force: boolean,\n global: GlobalOptions,\n options: ReleaseMutationOptions = {},\n): Promise<ReleaseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const author = resolveAuthor(options.author, settings.author_default);\n let previousAssignee: string | null = null;\n\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"release\",\n author,\n message: options.message,\n force,\n bypassAssigneeConflict: Boolean(options.allowAuditRelease),\n mutate(document) {\n previousAssignee = document.metadata.assignee ?? null;\n if (!previousAssignee) {\n return { changedFields: [] };\n }\n delete document.metadata.assignee;\n return { changedFields: [\"assignee\"] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, {\n required: \"For audited non-owner handoffs, prefer --allow-audit-release before considering --force.\",\n examples: ['pm release pm-a1b2 --author \"reviewer\" --allow-audit-release'],\n nextSteps: [\n \"Use --allow-audit-release for append-only release handoffs that only clear assignee metadata.\",\n \"Use --force only when an explicit override is approved for broader ownership conflicts.\",\n ],\n });\n }\n\n return {\n item: toItemRecord(result.item),\n released_by: author,\n previous_assignee: previousAssignee,\n audit_release: options.allowAuditRelease === true,\n forced: force,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,eAAsB,SACpB,IACA,OACA,QACA,UAAgC,CAAA,GAAE;AAElC,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AACA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,iBAAiB,6BAA6B,SAAS,MAAM;AACnE,QAAM,SAAS,cAAc,QAAQ,QAAQ,SAAS,cAAc;AACpE,MAAI,mBAAkC;AACtC,MAAI,UAAU;AACd,QAAM,mBAA6B,CAAA;AAEnC,QAAM,SAAS,MAAM,WAAW;IAC9B;IACA;IACA;IACA,IAAI;IACJ;IACA,SAAS,QAAQ;IACjB;IACA,UAAU;IACV,OAAO,UAAQ;AACb,YAAM,kBAAkB,SAAS,SAAS;AAC1C,YAAM,sBAAsB,OAAO,oBAAoB,WAAW,kBAAkB;AACpF,yBAAmB,oBAAoB,KAAI,EAAG,SAAS,IAAI,sBAAsB;AACjF,UAAI,iBAAiB,SAAS,SAAS,QAAQ,cAAc,KAAK,CAAC,OAAO;AACxE,cAAM,IAAI,WAAW,8BAA8B,SAAS,SA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MACA,wBAAwB,QAAQ,QAAQ,iBAAiB;MACzD,OAAO,UAAQ;AACb,2BAAmB,SAAS,SAAS,YAAY;AACjD,YAAI,CAAC,kBAAkB;AACrB,iBAAO,EAAE,eAAe,CAAA,EAAE;QAC5B;AACA,eAAO,SAAS,SAAS;AACzB,eAAO,EAAE,eAAe,CAAC,UAAU,EAAC;MACtC;KACD;EACH,SAAS,OAAgB;AACvB,0BAAsB,OAAO;MAC3B,UAAU;MACV,UAAU,CAAC,8DAA8D;MACzE,WAAW;QACT;QACA;;KAEH;EACH;AAEA,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,aAAa;IACb,mBAAmB;IACnB,eAAe,QAAQ,sBAAsB;IAC7C,QAAQ;;AAEZ","debugId":"17de491f-f579-5c44-8876-71e6393cb1da"}
@@ -1,147 +0,0 @@
1
- import {
2
- wrapOwnershipConflict
3
- } from "./chunk-5J2XPTAD.js";
4
- import {
5
- resolveAuthor
6
- } from "./chunk-WW4E2DC3.js";
7
- import "./chunk-T3ABIMGW.js";
8
- import "./chunk-EEY54JMF.js";
9
- import {
10
- mutateItem,
11
- toItemRecord
12
- } from "./chunk-3U3VEWK6.js";
13
- import "./chunk-EZFKWSC7.js";
14
- import "./chunk-DRBV5UC2.js";
15
- import {
16
- PmCliError,
17
- readSettings
18
- } from "./chunk-P5YORJRH.js";
19
- import "./chunk-7C2O74AE.js";
20
- import {
21
- EXIT_CODE,
22
- getSettingsPath,
23
- pathExists,
24
- resolvePmRoot,
25
- resolveRuntimeStatusRegistry,
26
- statusIsTerminal
27
- } from "./chunk-5VVUKE3U.js";
28
-
29
- // dist/cli/commands/claim.js
30
- !(function() {
31
- try {
32
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
33
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a652eb69-9925-57a5-9c26-602cfb588a03");
34
- } catch (e2) {
35
- }
36
- })();
37
- async function runClaim(id, force, global2, options = {}) {
38
- const pmRoot = resolvePmRoot(process.cwd(), global2.path);
39
- if (!await pathExists(getSettingsPath(pmRoot))) {
40
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
41
- }
42
- const settings = await readSettings(pmRoot);
43
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
44
- const author = resolveAuthor(options.author, settings.author_default);
45
- let previousAssignee = null;
46
- let skipped = false;
47
- const mutationWarnings = [];
48
- const result = await mutateItem({
49
- pmRoot,
50
- settings,
51
- id,
52
- op: "claim",
53
- author,
54
- message: options.message,
55
- force,
56
- skipNoop: true,
57
- mutate(document) {
58
- const currentAssignee = document.metadata.assignee;
59
- const currentAssigneeText = typeof currentAssignee === "string" ? currentAssignee : "";
60
- previousAssignee = currentAssigneeText.trim().length > 0 ? currentAssigneeText : null;
61
- if (statusIsTerminal(document.metadata.status, statusRegistry) && !force) {
62
- throw new PmCliError(`Cannot claim terminal item ${document.metadata.id} without --force`, EXIT_CODE.CONFLICT);
63
- }
64
- const heldByOther = previousAssignee !== null && previousAssignee !== author;
65
- if (heldByOther && options.ifAvailable === true) {
66
- skipped = true;
67
- mutationWarnings.push(`claim_skipped_held_by:${previousAssignee}`);
68
- return { changedFields: [] };
69
- }
70
- if (heldByOther && !force) {
71
- throw new PmCliError(`Item ${document.metadata.id} is already claimed by ${previousAssignee}. Use --force to take over, or --if-available to skip without failing.`, EXIT_CODE.CONFLICT, {
72
- code: "already_claimed_by",
73
- why: "Claim is an atomic test-and-set so parallel agents never proceed believing they own the same item.",
74
- nextSteps: [
75
- "Run pm next to pick a different unclaimed item.",
76
- "Re-run with --if-available to treat a held item as a no-op skip.",
77
- "Re-run with --force only when taking over the item is coordinated."
78
- ]
79
- });
80
- }
81
- if (heldByOther) {
82
- mutationWarnings.push(`claim_takeover:${previousAssignee}->${author}`);
83
- }
84
- document.metadata.assignee = author;
85
- return { changedFields: ["assignee"], warnings: mutationWarnings };
86
- }
87
- });
88
- return {
89
- item: toItemRecord(result.item),
90
- claimed_by: skipped && previousAssignee !== null ? previousAssignee : author,
91
- previous_assignee: previousAssignee,
92
- forced: force,
93
- ...skipped ? { skipped: true } : {},
94
- ...mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}
95
- };
96
- }
97
- async function runRelease(id, force, global2, options = {}) {
98
- const pmRoot = resolvePmRoot(process.cwd(), global2.path);
99
- if (!await pathExists(getSettingsPath(pmRoot))) {
100
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
101
- }
102
- const settings = await readSettings(pmRoot);
103
- const author = resolveAuthor(options.author, settings.author_default);
104
- let previousAssignee = null;
105
- let result;
106
- try {
107
- result = await mutateItem({
108
- pmRoot,
109
- settings,
110
- id,
111
- op: "release",
112
- author,
113
- message: options.message,
114
- force,
115
- bypassAssigneeConflict: Boolean(options.allowAuditRelease),
116
- mutate(document) {
117
- previousAssignee = document.metadata.assignee ?? null;
118
- if (!previousAssignee) {
119
- return { changedFields: [] };
120
- }
121
- delete document.metadata.assignee;
122
- return { changedFields: ["assignee"] };
123
- }
124
- });
125
- } catch (error) {
126
- wrapOwnershipConflict(error, {
127
- required: "For audited non-owner handoffs, prefer --allow-audit-release before considering --force.",
128
- examples: ['pm release pm-a1b2 --author "reviewer" --allow-audit-release'],
129
- nextSteps: [
130
- "Use --allow-audit-release for append-only release handoffs that only clear assignee metadata.",
131
- "Use --force only when an explicit override is approved for broader ownership conflicts."
132
- ]
133
- });
134
- }
135
- return {
136
- item: toItemRecord(result.item),
137
- released_by: author,
138
- previous_assignee: previousAssignee,
139
- audit_release: options.allowAuditRelease === true,
140
- forced: force
141
- };
142
- }
143
- export {
144
- runClaim,
145
- runRelease
146
- };
147
- //# sourceMappingURL=claim-VX54TV5U.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../cli/commands/claim.ts"],
4
- "sourcesContent": ["/**\n * @module cli/commands/claim\n *\n * Implements the pm claim command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { resolveRuntimeStatusRegistry, statusIsTerminal } from \"../../core/schema/runtime-schema.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 { toItemRecord } from \"../../core/item/item-record.js\";\nimport { mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { wrapOwnershipConflict } from \"./annotation-command.js\";\n\n/**\n * Documents the claim result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ClaimResult {\n item: Record<string, unknown>;\n claimed_by: string;\n previous_assignee: string | null;\n forced: boolean;\n skipped?: boolean;\n warnings?: string[];\n}\n\n/**\n * Documents the release result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReleaseResult {\n item: Record<string, unknown>;\n released_by: string;\n previous_assignee: string | null;\n audit_release: boolean;\n forced: boolean;\n}\n\n/**\n * Documents the claim mutation options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ClaimMutationOptions {\n author?: string;\n message?: string;\n ifAvailable?: boolean;\n}\n\n/**\n * Documents the release mutation options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReleaseMutationOptions extends ClaimMutationOptions {\n allowAuditRelease?: boolean;\n}\n\n/**\n * Implements run claim for the public runtime surface of this module.\n */\nexport async function runClaim(\n id: string,\n force: boolean,\n global: GlobalOptions,\n options: ClaimMutationOptions = {},\n): Promise<ClaimResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = resolveAuthor(options.author, settings.author_default);\n let previousAssignee: string | null = null;\n let skipped = false;\n const mutationWarnings: string[] = [];\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"claim\",\n author,\n message: options.message,\n force,\n skipNoop: true,\n mutate(document) {\n const currentAssignee = document.metadata.assignee;\n const currentAssigneeText = typeof currentAssignee === \"string\" ? currentAssignee : \"\";\n previousAssignee = currentAssigneeText.trim().length > 0 ? currentAssigneeText : null;\n if (statusIsTerminal(document.metadata.status, statusRegistry) && !force) {\n throw new PmCliError(`Cannot claim terminal item ${document.metadata.id} without --force`, EXIT_CODE.CONFLICT);\n }\n const heldByOther = previousAssignee !== null && previousAssignee !== author;\n if (heldByOther && options.ifAvailable === true) {\n skipped = true;\n mutationWarnings.push(`claim_skipped_held_by:${previousAssignee}`);\n return { changedFields: [] };\n }\n if (heldByOther && !force) {\n throw new PmCliError(\n `Item ${document.metadata.id} is already claimed by ${previousAssignee}. Use --force to take over, or --if-available to skip without failing.`,\n EXIT_CODE.CONFLICT,\n {\n code: \"already_claimed_by\",\n why: \"Claim is an atomic test-and-set so parallel agents never proceed believing they own the same item.\",\n nextSteps: [\n \"Run pm next to pick a different unclaimed item.\",\n \"Re-run with --if-available to treat a held item as a no-op skip.\",\n \"Re-run with --force only when taking over the item is coordinated.\",\n ],\n },\n );\n }\n if (heldByOther) {\n mutationWarnings.push(`claim_takeover:${previousAssignee}->${author}`);\n }\n document.metadata.assignee = author;\n return { changedFields: [\"assignee\"], warnings: mutationWarnings };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n claimed_by: skipped && previousAssignee !== null ? previousAssignee : author,\n previous_assignee: previousAssignee,\n forced: force,\n ...(skipped ? { skipped: true } : {}),\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n}\n\n/**\n * Implements run release for the public runtime surface of this module.\n */\nexport async function runRelease(\n id: string,\n force: boolean,\n global: GlobalOptions,\n options: ReleaseMutationOptions = {},\n): Promise<ReleaseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const author = resolveAuthor(options.author, settings.author_default);\n let previousAssignee: string | null = null;\n\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"release\",\n author,\n message: options.message,\n force,\n bypassAssigneeConflict: Boolean(options.allowAuditRelease),\n mutate(document) {\n previousAssignee = document.metadata.assignee ?? null;\n if (!previousAssignee) {\n return { changedFields: [] };\n }\n delete document.metadata.assignee;\n return { changedFields: [\"assignee\"] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, {\n required: \"For audited non-owner handoffs, prefer --allow-audit-release before considering --force.\",\n examples: ['pm release pm-a1b2 --author \"reviewer\" --allow-audit-release'],\n nextSteps: [\n \"Use --allow-audit-release for append-only release handoffs that only clear assignee metadata.\",\n \"Use --force only when an explicit override is approved for broader ownership conflicts.\",\n ],\n });\n }\n\n return {\n item: toItemRecord(result.item),\n released_by: author,\n previous_assignee: previousAssignee,\n audit_release: options.allowAuditRelease === true,\n forced: force,\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,eAAsB,SACpB,IACA,OACAA,SACA,UAAgC,CAAA,GAAE;AAElC,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAIA,QAAO,IAAI;AACvD,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AACA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,iBAAiB,6B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S,IAAI,EAAE,UAAU,iBAAgB,IAAK,CAAA;;AAEvE;AAKA,eAAsB,WACpB,IACA,OACAA,SACA,UAAkC,CAAA,GAAE;AAEpC,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAIA,QAAO,IAAI;AACvD,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AACA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,SAAS,cAAc,QAAQ,QAAQ,SAAS,cAAc;AACpE,MAAI,mBAAkC;AAEtC,MAAI;AACJ,MAAI;AACF,aAAS,MAAM,WAAW;MACxB;MACA;MACA;MACA,IAAI;MACJ;MACA,SAAS,QAAQ;MACjB;MACA,wBAAwB,QAAQ,QAAQ,iBAAiB;MACzD,OAAO,UAAQ;AACb,2BAAmB,SAAS,SAAS,YAAY;AACjD,YAAI,CAAC,kBAAkB;AACrB,iBAAO,EAAE,eAAe,CAAA,EAAE;QAC5B;AACA,eAAO,SAAS,SAAS;AACzB,eAAO,EAAE,eAAe,CAAC,UAAU,EAAC;MACtC;KACD;EACH,SAAS,OAAgB;AACvB,0BAAsB,OAAO;MAC3B,UAAU;MACV,UAAU,CAAC,8DAA8D;MACzE,WAAW;QACT;QACA;;KAEH;EACH;AAEA,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,aAAa;IACb,mBAAmB;IACnB,eAAe,QAAQ,sBAAsB;IAC7C,QAAQ;;AAEZ;",
6
- "names": ["global"]
7
- }
@@ -1,16 +0,0 @@
1
- import {
2
- _testOnlyCloseCommand,
3
- runClose
4
- } from "./chunk-FGQKEDE4.js";
5
- import "./chunk-YOF5VPKM.js";
6
- import "./chunk-3U3VEWK6.js";
7
- import "./chunk-EZFKWSC7.js";
8
- import "./chunk-DRBV5UC2.js";
9
- import "./chunk-P5YORJRH.js";
10
- import "./chunk-7C2O74AE.js";
11
- import "./chunk-5VVUKE3U.js";
12
- export {
13
- _testOnlyCloseCommand,
14
- runClose
15
- };
16
- //# sourceMappingURL=close-OB2Y4QP5.js.map