@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,29 +1,131 @@
1
1
  import {
2
- runContracts
3
- } from "./chunk-VZIYHZDX.js";
2
+ runFiles,
3
+ runFilesDiscover
4
+ } from "./chunk-W5HXHC7C.js";
4
5
  import {
5
- runUpdate
6
- } from "./chunk-YMABYTNG.js";
6
+ runDocs
7
+ } from "./chunk-2LEJGRQ7.js";
7
8
  import {
8
- jaccardSimilarity,
9
- normalizeLowercaseWhitespace,
10
- tokenizeAlphaNumeric
11
- } from "./chunk-5B3X4Y22.js";
9
+ runDeps
10
+ } from "./chunk-F6MT7KKE.js";
12
11
  import {
13
- parseTags
14
- } from "./chunk-T3ABIMGW.js";
12
+ assertHistoryRepairTarget,
13
+ runHistoryRepair,
14
+ runHistoryRepairAll
15
+ } from "./chunk-43UQN754.js";
16
+ import {
17
+ resolveStartTaskInProgressStatus,
18
+ runClaim,
19
+ runContracts,
20
+ runGc,
21
+ runHealth,
22
+ runRelease,
23
+ runStats,
24
+ runTelemetry,
25
+ runTest,
26
+ runTestAll,
27
+ runValidate
28
+ } from "./chunk-TZLYO4PP.js";
29
+ import {
30
+ runComments
31
+ } from "./chunk-YPD7SQ5P.js";
32
+ import {
33
+ runCopy
34
+ } from "./chunk-I74FMIWA.js";
35
+ import {
36
+ runFocus
37
+ } from "./chunk-S6VC2A2K.js";
38
+ import {
39
+ runDelete
40
+ } from "./chunk-XBX5CBRQ.js";
41
+ import {
42
+ runAppend
43
+ } from "./chunk-DDDWVPID.js";
44
+ import {
45
+ runProfileApply,
46
+ runProfileLint,
47
+ runProfileList,
48
+ runProfileShow
49
+ } from "./chunk-IDIBF4E2.js";
50
+ import {
51
+ runNotes
52
+ } from "./chunk-4BKDAEDF.js";
53
+ import {
54
+ runLearnings
55
+ } from "./chunk-DG6BSXZ7.js";
56
+ import {
57
+ runCloseMany
58
+ } from "./chunk-ARKHKYYS.js";
59
+ import {
60
+ runUpdateMany
61
+ } from "./chunk-S5BNGFN5.js";
62
+ import {
63
+ runRestore
64
+ } from "./chunk-Y7KYVCZM.js";
65
+ import {
66
+ runUpdate
67
+ } from "./chunk-LZQU6XJG.js";
15
68
  import {
16
69
  runClose
17
- } from "./chunk-FGQKEDE4.js";
70
+ } from "./chunk-F6YC2A6X.js";
71
+ import {
72
+ runPlan
73
+ } from "./chunk-TNC6MZUD.js";
74
+ import {
75
+ runHistoryCompact
76
+ } from "./chunk-GTM5HQL4.js";
77
+ import {
78
+ runHistoryRedact
79
+ } from "./chunk-EIUBK2LT.js";
18
80
  import {
19
- buildListQueryFilters
20
- } from "./chunk-4BU75MF4.js";
81
+ runConfig,
82
+ runUpgrade
83
+ } from "./chunk-ZNEG2UDO.js";
21
84
  import {
85
+ SCAFFOLD_CAPABILITIES,
86
+ runExtension,
87
+ runInit
88
+ } from "./chunk-X47MKQXU.js";
89
+ import {
90
+ runSchemaAddField,
91
+ runSchemaAddStatus,
92
+ runSchemaAddType,
93
+ runSchemaApplyPreset,
94
+ runSchemaInferTypes,
95
+ runSchemaList,
96
+ runSchemaListFields,
97
+ runSchemaRemoveField,
98
+ runSchemaRemoveStatus,
99
+ runSchemaRemoveType,
100
+ runSchemaShow,
101
+ runSchemaShowField,
102
+ runSchemaShowStatus
103
+ } from "./chunk-TGUK6XN6.js";
104
+ import {
105
+ jaccardSimilarity,
106
+ normalizeLowercaseWhitespace,
107
+ runActivity,
108
+ runAggregate,
109
+ runContext,
110
+ runGet,
111
+ runNext,
112
+ runSearch,
113
+ tokenizeAlphaNumeric
114
+ } from "./chunk-FILL6BB2.js";
115
+ import {
116
+ buildListQueryFilters,
22
117
  runList
23
- } from "./chunk-7EQNAZX2.js";
118
+ } from "./chunk-C5ACVMOI.js";
119
+ import {
120
+ runHistory
121
+ } from "./chunk-M62RO3XK.js";
24
122
  import {
25
123
  parseIntegerLimit
26
- } from "./chunk-EEY54JMF.js";
124
+ } from "./chunk-ZO7CLOY2.js";
125
+ import {
126
+ resolveRegisteredSearchProvider,
127
+ resolveRegisteredVectorStoreAdapter
128
+ } from "./chunk-B5KXLBSJ.js";
27
129
  import {
28
130
  REINDEX_LOCK_ID,
29
131
  buildSearchCorpus,
@@ -37,6 +139,8 @@ import {
37
139
  hasVectorizationEmbeddingIdentityChanged,
38
140
  hasVectorizationVectorDimensionChanged,
39
141
  inferConsistentVectorDimension,
142
+ normalizeListOptions,
143
+ normalizeUpdateOptions,
40
144
  readVectorizationStatusLedger,
41
145
  resolveEmbeddingProviders,
42
146
  resolveSearchCorpusFields,
@@ -44,17 +148,7 @@ import {
44
148
  resolveSettingsWithSemanticRuntimeDefaults,
45
149
  resolveVectorStores,
46
150
  writeVectorizationStatusLedger
47
- } from "./chunk-LEKT4K7I.js";
48
- import {
49
- resolveRegisteredSearchProvider,
50
- resolveRegisteredVectorStoreAdapter
51
- } from "./chunk-B5KXLBSJ.js";
52
- import {
53
- SCAFFOLD_CAPABILITIES
54
- } from "./chunk-E2FUG6GD.js";
55
- import {
56
- splitCommaList
57
- } from "./chunk-5HIZDR5A.js";
151
+ } from "./chunk-6XTSYPPO.js";
58
152
  import {
59
153
  ACTIVITY_FLAG_CONTRACTS,
60
154
  AGGREGATE_FLAG_CONTRACTS,
@@ -83,42 +177,66 @@ import {
83
177
  PM_CORE_COMMAND_NAMES,
84
178
  REMIND_FLAG_CONTRACTS,
85
179
  SEARCH_FLAG_CONTRACTS,
180
+ UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,
86
181
  UPDATE_FLAG_CONTRACTS,
87
182
  UPDATE_MANY_FLAG_CONTRACTS,
88
183
  toCompletionFlagString
89
- } from "./chunk-UI5BJ6DO.js";
184
+ } from "./chunk-YCVWWIKY.js";
185
+ import {
186
+ runCreate
187
+ } from "./chunk-XC3X7BQR.js";
188
+ import {
189
+ parseTags
190
+ } from "./chunk-2TILG6F2.js";
90
191
  import {
192
+ splitCommaList
193
+ } from "./chunk-5HIZDR5A.js";
194
+ import {
195
+ projectMutationResult
196
+ } from "./chunk-SY75LYXR.js";
197
+ import {
198
+ PmCliError,
91
199
  acquireLock,
92
200
  appendHistoryEntry,
93
201
  collectRegisteredItemFieldNames,
202
+ compareTimestampStrings,
94
203
  createHistoryEntry,
204
+ getActiveExtensionRegistrations,
205
+ isTerminalStatus,
95
206
  listAllDocumentCandidatesCached,
96
207
  locateItem,
97
- readLocatedItem,
98
- toItemRecord
99
- } from "./chunk-3U3VEWK6.js";
100
- import {
101
- isTerminalStatus,
102
208
  normalizeStatusInput,
209
+ nowIso,
103
210
  parseItemDocument,
104
- serializeItemDocument
105
- } from "./chunk-EZFKWSC7.js";
106
- import {
107
- compareTimestampStrings,
108
- nowIso
109
- } from "./chunk-DRBV5UC2.js";
110
- import {
111
- PmCliError,
112
- getActiveExtensionRegistrations,
211
+ readLocatedItem,
113
212
  readSettings,
213
+ runActiveCommandHandler,
114
214
  runActiveOnIndexHooks,
115
- runActiveOnWriteHooks
116
- } from "./chunk-P5YORJRH.js";
215
+ runActiveOnWriteHooks,
216
+ serializeItemDocument,
217
+ setActiveExtensionCommands,
218
+ setActiveExtensionHooks,
219
+ setActiveExtensionParsers,
220
+ setActiveExtensionPreflight,
221
+ setActiveExtensionRegistrations,
222
+ setActiveExtensionRenderers,
223
+ setActiveExtensionServices,
224
+ toItemRecord
225
+ } from "./chunk-YNCFP5AR.js";
117
226
  import {
118
227
  BUILTIN_ITEM_TYPE_VALUES,
119
228
  EXIT_CODE,
120
229
  STATUS_VALUES,
121
230
  activateExtensions,
231
+ asRecordClone,
232
+ createEmptyExtensionCommandRegistry,
233
+ createEmptyExtensionHookRegistry,
234
+ createEmptyExtensionParserRegistry,
235
+ createEmptyExtensionPreflightRegistry,
236
+ createEmptyExtensionRegistrationRegistry,
237
+ createEmptyExtensionRendererRegistry,
238
+ createEmptyExtensionServiceRegistry,
239
+ deactivateExtensions,
122
240
  getHistoryPath,
123
241
  getSettingsPath,
124
242
  loadExtensions,
@@ -131,11 +249,127 @@ import {
131
249
  toErrorMessage,
132
250
  toNonEmptyStringOrUndefined,
133
251
  writeFileAtomic
134
- } from "./chunk-5VVUKE3U.js";
252
+ } from "./chunk-LCFJ7XAM.js";
135
253
 
136
254
  // dist/sdk/runtime.js
137
255
  import path3 from "node:path";
138
256
 
257
+ // dist/core/output/query-summary.js
258
+ !(function() {
259
+ try {
260
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
261
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8d8abef6-ea10-5cd2-aa25-d3c506351924");
262
+ } catch (e2) {
263
+ }
264
+ })();
265
+ function isRecord(value) {
266
+ return value !== null && typeof value === "object" && !Array.isArray(value);
267
+ }
268
+ function resolveQueryProjectionLabel(options) {
269
+ if (options.brief === true) {
270
+ return "brief";
271
+ }
272
+ if (typeof options.fields === "string" && options.fields.trim().length > 0) {
273
+ return "fields";
274
+ }
275
+ if (Array.isArray(options.fields) && options.fields.length > 0) {
276
+ return "fields";
277
+ }
278
+ if (options.compact === true) {
279
+ return "compact";
280
+ }
281
+ return "full";
282
+ }
283
+ function withQuerySummary(result, options) {
284
+ const requestedLabel = resolveQueryProjectionLabel(options);
285
+ const projection = requestedLabel === "brief" ? requestedLabel : isRecord(result.projection) && typeof result.projection.mode === "string" ? result.projection.mode : requestedLabel;
286
+ return {
287
+ ...result,
288
+ query_summary: {
289
+ filters: isRecord(result.filters) ? result.filters : {},
290
+ projection
291
+ }
292
+ };
293
+ }
294
+
295
+ // dist/core/shared/serial-queue.js
296
+ !(function() {
297
+ try {
298
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
299
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "76b8d242-9348-5daf-9085-901aa5f84197");
300
+ } catch (e2) {
301
+ }
302
+ })();
303
+ function createSerialQueue() {
304
+ let tail = Promise.resolve();
305
+ let pending = 0;
306
+ const idleWaiters = [];
307
+ const notifyIdle = () => {
308
+ if (pending !== 0) {
309
+ return;
310
+ }
311
+ const waiters = idleWaiters.splice(0);
312
+ for (const resolve of waiters) {
313
+ resolve();
314
+ }
315
+ };
316
+ return {
317
+ enqueue(task) {
318
+ pending++;
319
+ const run = tail.then(() => task());
320
+ tail = run.then(() => void 0, () => void 0).finally(() => {
321
+ pending--;
322
+ notifyIdle();
323
+ });
324
+ return run;
325
+ },
326
+ idle() {
327
+ return pending === 0 ? Promise.resolve() : new Promise((resolve) => idleWaiters.push(resolve));
328
+ }
329
+ };
330
+ }
331
+
332
+ // dist/sdk/workspace-contracts-cache.js
333
+ !(function() {
334
+ try {
335
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
336
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "be7bf5e4-3625-5ac2-985e-5a7762373ee4");
337
+ } catch (e2) {
338
+ }
339
+ })();
340
+ var WORKSPACE_CONTRACTS_CACHE_LIMIT = 50;
341
+ var workspaceExtensionRegistrationsCache = /* @__PURE__ */ new Map();
342
+ function clearWorkspaceContractsCache() {
343
+ workspaceExtensionRegistrationsCache.clear();
344
+ }
345
+ function memoizeWorkspaceExtensionRegistrations(cacheKey, loadRegistrations) {
346
+ const cached = workspaceExtensionRegistrationsCache.get(cacheKey);
347
+ if (cached !== void 0) {
348
+ return cached;
349
+ }
350
+ if (workspaceExtensionRegistrationsCache.size >= WORKSPACE_CONTRACTS_CACHE_LIMIT) {
351
+ const oldestKey = workspaceExtensionRegistrationsCache.keys().next().value;
352
+ workspaceExtensionRegistrationsCache.delete(oldestKey);
353
+ }
354
+ const registrations = loadRegistrations().catch((error) => {
355
+ if (workspaceExtensionRegistrationsCache.get(cacheKey) === registrations) {
356
+ workspaceExtensionRegistrationsCache.delete(cacheKey);
357
+ }
358
+ throw error;
359
+ });
360
+ workspaceExtensionRegistrationsCache.set(cacheKey, registrations);
361
+ return registrations;
362
+ }
363
+
364
+ // dist/cli/commands/index.js
365
+ !(function() {
366
+ try {
367
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
368
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "671e9de0-d9e2-5c2e-85de-b4ad226aca4d");
369
+ } catch (e2) {
370
+ }
371
+ })();
372
+
139
373
  // dist/sdk/package-runtime-options.js
140
374
  !(function() {
141
375
  try {
@@ -3736,16 +3970,16 @@ function buildCommentsAuditSummary(items) {
3736
3970
  entry.comments_exported += item.comments.length;
3737
3971
  byTypeAccumulator.set(item.type, entry);
3738
3972
  }
3739
- const byType = [...byTypeAccumulator.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([type, stats]) => {
3740
- const zeroCount = stats.items_scanned - stats.items_with_comments;
3741
- const coverage = ratioPercent(stats.items_with_comments, stats.items_scanned);
3973
+ const byType = [...byTypeAccumulator.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([type, stats2]) => {
3974
+ const zeroCount = stats2.items_scanned - stats2.items_with_comments;
3975
+ const coverage = ratioPercent(stats2.items_with_comments, stats2.items_scanned);
3742
3976
  return {
3743
3977
  type,
3744
- items_scanned: stats.items_scanned,
3745
- items_with_comments: stats.items_with_comments,
3978
+ items_scanned: stats2.items_scanned,
3979
+ items_with_comments: stats2.items_with_comments,
3746
3980
  zero_comment_items: zeroCount,
3747
- comments_total: stats.comments_total,
3748
- comments_exported: stats.comments_exported,
3981
+ comments_total: stats2.comments_total,
3982
+ comments_exported: stats2.comments_exported,
3749
3983
  items_with_comments_ratio: coverage.ratio,
3750
3984
  items_with_comments_percent: coverage.percent
3751
3985
  };
@@ -4265,17 +4499,17 @@ async function applyDedupeMergeReparents(params) {
4265
4499
  }
4266
4500
  async function applyDedupeMergeClose(params) {
4267
4501
  const reason = `Duplicate of ${params.keep}`;
4268
- const close = { duplicate_of: params.keep, reason, applied: false };
4502
+ const close2 = { duplicate_of: params.keep, reason, applied: false };
4269
4503
  if (isTerminalStatus(params.duplicate.metadata.status, params.statusRegistry)) {
4270
- close.skipped_reason = "already_terminal";
4504
+ close2.skipped_reason = "already_terminal";
4271
4505
  if (params.duplicate.metadata.duplicate_of?.trim() !== params.keep) {
4272
4506
  params.warnings.push(`close_skipped_terminal:${params.duplicate.id}:already_closed`);
4273
4507
  }
4274
- return close;
4508
+ return close2;
4275
4509
  }
4276
4510
  if (!params.apply) {
4277
- close.skipped_reason = "dry_run";
4278
- return close;
4511
+ close2.skipped_reason = "dry_run";
4512
+ return close2;
4279
4513
  }
4280
4514
  try {
4281
4515
  await runClose(params.duplicate.id, void 0, {
@@ -4283,12 +4517,12 @@ async function applyDedupeMergeClose(params) {
4283
4517
  author: params.options.author,
4284
4518
  message: params.options.message ?? `dedupe-merge: close ${params.duplicate.id} as duplicate of ${params.keep}`
4285
4519
  }, params.global);
4286
- close.applied = true;
4520
+ close2.applied = true;
4287
4521
  } catch (error) {
4288
- close.skipped_reason = "failed";
4522
+ close2.skipped_reason = "failed";
4289
4523
  params.warnings.push(`close_failed:${params.duplicate.id}:${error instanceof Error ? error.message : String(error)}`);
4290
4524
  }
4291
- return close;
4525
+ return close2;
4292
4526
  }
4293
4527
  async function runDedupeMerge(options, global2) {
4294
4528
  const pmRoot = resolvePmRoot(process.cwd(), global2.path);
@@ -4335,14 +4569,14 @@ async function runDedupeMerge(options, global2) {
4335
4569
  global: global2,
4336
4570
  warnings
4337
4571
  });
4338
- const close = await applyDedupeMergeClose({ duplicate, keep, apply, options, global: global2, statusRegistry, warnings });
4572
+ const close2 = await applyDedupeMergeClose({ duplicate, keep, apply, options, global: global2, statusRegistry, warnings });
4339
4573
  outcomes.push({
4340
4574
  duplicate_id: duplicate.id,
4341
4575
  duplicate_title: duplicate.title,
4342
4576
  canonical_id: keep,
4343
4577
  reparented_children: reparented,
4344
4578
  skipped_children: skippedChildren,
4345
- close
4579
+ close: close2
4346
4580
  });
4347
4581
  }
4348
4582
  const childrenReparented = outcomes.reduce((total, outcome) => total + outcome.reparented_children.filter((child) => child.applied).length, 0);
@@ -4653,7 +4887,7 @@ import path2 from "node:path";
4653
4887
  !(function() {
4654
4888
  try {
4655
4889
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
4656
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0b364753-7767-5ef6-9ce6-18c79d6c47c7");
4890
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7fc8eb46-f035-5bfa-bacd-90d176ad4e2b");
4657
4891
  } catch (e2) {
4658
4892
  }
4659
4893
  })();
@@ -4789,9 +5023,9 @@ function resolveExtensionVectorAdapter(settings) {
4789
5023
  ...typeof deleteHandler === "function" ? { delete: deleteHandler } : {}
4790
5024
  };
4791
5025
  }
4792
- function assertVector(value, context) {
5026
+ function assertVector(value, context2) {
4793
5027
  if (!Array.isArray(value) || value.some((entry) => typeof entry !== "number" || !Number.isFinite(entry))) {
4794
- throw new PmCliError(`Invalid vector returned by ${context}`, EXIT_CODE.GENERIC_FAILURE);
5028
+ throw new PmCliError(`Invalid vector returned by ${context2}`, EXIT_CODE.GENERIC_FAILURE);
4795
5029
  }
4796
5030
  return value;
4797
5031
  }
@@ -4960,7 +5194,7 @@ function assertSemanticRuntimeAvailable(params) {
4960
5194
  if (!providerResolution.active && !params.extensionEmbedding) {
4961
5195
  throw new PmCliError(`Reindex mode '${params.requestedMode}' requires a configured embedding provider in settings.providers.openai/settings.providers.ollama or an extension provider selected by settings.search.provider`, EXIT_CODE.USAGE);
4962
5196
  }
4963
- const vectorResolution = resolveVectorStores(params.settings);
5197
+ const vectorResolution = resolveVectorStores(params.settings, params.pmRoot);
4964
5198
  if (!vectorResolution.active && !params.extensionVectorAdapter) {
4965
5199
  throw new PmCliError(`Reindex mode '${params.requestedMode}' requires a configured vector store in settings.vector_store.qdrant/settings.vector_store.lancedb or an extension adapter selected by settings.vector_store.adapter`, EXIT_CODE.USAGE);
4966
5200
  }
@@ -5231,6 +5465,7 @@ async function runReindex(options, global2) {
5231
5465
  const extensionVectorAdapter = resolveExtensionVectorAdapter(settings);
5232
5466
  const semanticRuntime = assertSemanticRuntimeAvailable({
5233
5467
  requestedMode,
5468
+ pmRoot,
5234
5469
  settings,
5235
5470
  extensionEmbedding,
5236
5471
  extensionVectorAdapter
@@ -5323,12 +5558,218 @@ async function runReindex(options, global2) {
5323
5558
  !(function() {
5324
5559
  try {
5325
5560
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5326
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9ed0f12b-4f84-58a2-86c7-aff1a8b86f0a");
5561
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "89db1e15-b152-57e2-910d-64ed77eb540b");
5327
5562
  } catch (e2) {
5328
5563
  }
5329
5564
  })();
5330
- var WORKSPACE_CONTRACTS_CACHE_LIMIT = 50;
5331
- var workspaceExtensionRegistrationsCache = /* @__PURE__ */ new Map();
5565
+ function splitClientMutationOptions(options) {
5566
+ const { fullChangedFields, idOnly, ...runnerOptions } = options;
5567
+ return {
5568
+ ...fullChangedFields === void 0 ? {} : { fullChangedFields },
5569
+ ...idOnly === void 0 ? {} : { idOnly },
5570
+ options: runnerOptions
5571
+ };
5572
+ }
5573
+ var PmClient = class {
5574
+ defaults;
5575
+ /**
5576
+ * Create a client with workspace, author, and extension-loading defaults.
5577
+ */
5578
+ constructor(options = {}) {
5579
+ this.defaults = {
5580
+ ...options.pmRoot === void 0 ? {} : { path: options.pmRoot },
5581
+ ...options.cwd === void 0 ? {} : { cwd: options.cwd },
5582
+ ...options.author === void 0 ? {} : { author: options.author },
5583
+ ...options.noExtensions === void 0 ? {} : { noExtensions: options.noExtensions }
5584
+ };
5585
+ }
5586
+ /**
5587
+ * Run any native or extension-contributed action through the SDK dispatcher.
5588
+ */
5589
+ run(action, args = {}) {
5590
+ return runAction({ ...this.defaults, ...args, action });
5591
+ }
5592
+ runTyped(action, args = {}) {
5593
+ return this.run(action, args);
5594
+ }
5595
+ /**
5596
+ * Return the same context snapshot produced by `pm context`.
5597
+ */
5598
+ context(options = {}) {
5599
+ return this.runTyped("context", { options });
5600
+ }
5601
+ /**
5602
+ * List items with the MCP/agent compact defaults.
5603
+ */
5604
+ list(options = {}) {
5605
+ return this.runTyped("list", { options });
5606
+ }
5607
+ /**
5608
+ * Search items with the MCP/agent compact defaults.
5609
+ */
5610
+ search(query, options = {}) {
5611
+ return this.runTyped("search", { query, options });
5612
+ }
5613
+ /**
5614
+ * Read one item by id.
5615
+ */
5616
+ get(id, options = {}) {
5617
+ return this.runTyped("get", { id, options });
5618
+ }
5619
+ /**
5620
+ * Return the ranked next-work recommendation produced by `pm next`.
5621
+ */
5622
+ next(options = {}) {
5623
+ return this.runTyped("next", { options });
5624
+ }
5625
+ /**
5626
+ * Group matching items with the same semantics as `pm aggregate`.
5627
+ */
5628
+ aggregate(options = {}) {
5629
+ return this.runTyped("aggregate", { options });
5630
+ }
5631
+ /**
5632
+ * Return project tracker statistics with the same sections as `pm stats`.
5633
+ */
5634
+ stats(options = {}) {
5635
+ return this.runTyped("stats", { options });
5636
+ }
5637
+ /**
5638
+ * Create an item using the same mutation path as `pm create`.
5639
+ */
5640
+ create(options = {}) {
5641
+ return this.run("create", splitClientMutationOptions(options));
5642
+ }
5643
+ /**
5644
+ * Update an item using the same mutation path as `pm update`.
5645
+ */
5646
+ update(id, options = {}) {
5647
+ return this.run("update", { id, ...splitClientMutationOptions(options) });
5648
+ }
5649
+ /**
5650
+ * Close an item using the same mutation path as `pm close`.
5651
+ */
5652
+ close(id, reason, options = {}) {
5653
+ return this.run("close", { id, reason, ...splitClientMutationOptions(options) });
5654
+ }
5655
+ /**
5656
+ * Claim an item using the same mutation path as `pm claim`.
5657
+ */
5658
+ claim(id, options = {}) {
5659
+ return this.run("claim", { id, ...splitClientMutationOptions(options) });
5660
+ }
5661
+ /**
5662
+ * Release an item's active claim using the same mutation path as `pm release`.
5663
+ */
5664
+ release(id, options = {}) {
5665
+ return this.run("release", { id, ...splitClientMutationOptions(options) });
5666
+ }
5667
+ /**
5668
+ * Copy an item using the same mutation path as `pm copy`.
5669
+ */
5670
+ copy(id, options = {}) {
5671
+ return this.run("copy", { id, ...splitClientMutationOptions(options) });
5672
+ }
5673
+ /**
5674
+ * Delete an item using the same mutation path as `pm delete`.
5675
+ */
5676
+ delete(id, options = {}) {
5677
+ return this.run("delete", { id, ...splitClientMutationOptions(options) });
5678
+ }
5679
+ /**
5680
+ * Restore an item to a history version or timestamp using `pm restore`.
5681
+ */
5682
+ restore(id, target, options = {}) {
5683
+ const { fullChangedFields, idOnly, ...runnerOptions } = options;
5684
+ return this.run("restore", {
5685
+ ...fullChangedFields === void 0 ? {} : { fullChangedFields },
5686
+ ...idOnly === void 0 ? {} : { idOnly },
5687
+ id,
5688
+ options: { ...runnerOptions, target }
5689
+ });
5690
+ }
5691
+ /**
5692
+ * Set, clear, or read workspace focus using the same path as `pm focus`.
5693
+ */
5694
+ focus(id, options = {}) {
5695
+ return this.run("focus", { ...id === void 0 ? {} : { id }, ...splitClientMutationOptions(options) });
5696
+ }
5697
+ /**
5698
+ * Claim an item and transition it to the workspace in-progress status.
5699
+ */
5700
+ startTask(id, options = {}) {
5701
+ return this.run("start-task", { id, ...splitClientMutationOptions(options) });
5702
+ }
5703
+ /**
5704
+ * Move an item back to the workspace open status and release the claim.
5705
+ */
5706
+ pauseTask(id, options = {}) {
5707
+ return this.run("pause-task", { id, ...splitClientMutationOptions(options) });
5708
+ }
5709
+ /**
5710
+ * Close an item and release its active assignment.
5711
+ */
5712
+ closeTask(id, reason, options = {}) {
5713
+ return this.run("close-task", { id, reason, ...splitClientMutationOptions(options) });
5714
+ }
5715
+ };
5716
+ function context(options = {}, clientOptions = {}) {
5717
+ return new PmClient(clientOptions).context(options);
5718
+ }
5719
+ function list(options = {}, clientOptions = {}) {
5720
+ return new PmClient(clientOptions).list(options);
5721
+ }
5722
+ function search(query, options = {}, clientOptions = {}) {
5723
+ return new PmClient(clientOptions).search(query, options);
5724
+ }
5725
+ function get(id, options = {}, clientOptions = {}) {
5726
+ return new PmClient(clientOptions).get(id, options);
5727
+ }
5728
+ function next(options = {}, clientOptions = {}) {
5729
+ return new PmClient(clientOptions).next(options);
5730
+ }
5731
+ function aggregate(options = {}, clientOptions = {}) {
5732
+ return new PmClient(clientOptions).aggregate(options);
5733
+ }
5734
+ function stats(options = {}, clientOptions = {}) {
5735
+ return new PmClient(clientOptions).stats(options);
5736
+ }
5737
+ function create(options = {}, clientOptions = {}) {
5738
+ return new PmClient(clientOptions).create(options);
5739
+ }
5740
+ function update(id, options = {}, clientOptions = {}) {
5741
+ return new PmClient(clientOptions).update(id, options);
5742
+ }
5743
+ function close(id, reason, options = {}, clientOptions = {}) {
5744
+ return new PmClient(clientOptions).close(id, reason, options);
5745
+ }
5746
+ function claim(id, options = {}, clientOptions = {}) {
5747
+ return new PmClient(clientOptions).claim(id, options);
5748
+ }
5749
+ function release(id, options = {}, clientOptions = {}) {
5750
+ return new PmClient(clientOptions).release(id, options);
5751
+ }
5752
+ function copy(id, options = {}, clientOptions = {}) {
5753
+ return new PmClient(clientOptions).copy(id, options);
5754
+ }
5755
+ function deleteItem(id, options = {}, clientOptions = {}) {
5756
+ return new PmClient(clientOptions).delete(id, options);
5757
+ }
5758
+ function restore(id, target, options = {}, clientOptions = {}) {
5759
+ return new PmClient(clientOptions).restore(id, target, options);
5760
+ }
5761
+ function focus(id, options = {}, clientOptions = {}) {
5762
+ return new PmClient(clientOptions).focus(id, options);
5763
+ }
5764
+ function startTask(id, options = {}, clientOptions = {}) {
5765
+ return new PmClient(clientOptions).startTask(id, options);
5766
+ }
5767
+ function pauseTask(id, options = {}, clientOptions = {}) {
5768
+ return new PmClient(clientOptions).pauseTask(id, options);
5769
+ }
5770
+ function closeTask(id, reason, options = {}, clientOptions = {}) {
5771
+ return new PmClient(clientOptions).closeTask(id, reason, options);
5772
+ }
5332
5773
  function buildWorkspaceExtensionRegistrationsCacheKey(pmRoot, settings, cwd) {
5333
5774
  return JSON.stringify([
5334
5775
  path3.resolve(pmRoot),
@@ -5338,22 +5779,9 @@ function buildWorkspaceExtensionRegistrationsCacheKey(pmRoot, settings, cwd) {
5338
5779
  settings.extensions.policy
5339
5780
  ]);
5340
5781
  }
5341
- function clearWorkspaceContractsCache() {
5342
- workspaceExtensionRegistrationsCache.clear();
5343
- }
5344
5782
  async function resolveWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
5345
5783
  const cacheKey = buildWorkspaceExtensionRegistrationsCacheKey(pmRoot, settings, cwd);
5346
- const cached = workspaceExtensionRegistrationsCache.get(cacheKey);
5347
- if (cached !== void 0) {
5348
- return cached;
5349
- }
5350
- if (workspaceExtensionRegistrationsCache.size >= WORKSPACE_CONTRACTS_CACHE_LIMIT) {
5351
- const oldestKey = workspaceExtensionRegistrationsCache.keys().next().value;
5352
- workspaceExtensionRegistrationsCache.delete(oldestKey);
5353
- }
5354
- const registrations = loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd);
5355
- workspaceExtensionRegistrationsCache.set(cacheKey, registrations);
5356
- return registrations;
5784
+ return memoizeWorkspaceExtensionRegistrations(cacheKey, () => loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd));
5357
5785
  }
5358
5786
  async function getWorkspaceContracts(pmRoot, options = {}) {
5359
5787
  const settings = await readSettings(pmRoot);
@@ -5380,6 +5808,940 @@ async function getContracts(pmRootOrOptions, options = {}) {
5380
5808
  };
5381
5809
  return runContracts(resolvedOptions, global2);
5382
5810
  }
5811
+ function readString(args, key) {
5812
+ const value = args[key];
5813
+ return typeof value === "string" && value.trim().length > 0 ? value : void 0;
5814
+ }
5815
+ function readScalarString(args, key) {
5816
+ const value = args[key];
5817
+ if (typeof value === "string") {
5818
+ return value.trim().length > 0 ? value : void 0;
5819
+ }
5820
+ return typeof value === "number" && Number.isFinite(value) ? String(value) : void 0;
5821
+ }
5822
+ function readScalarStringAllowBlank(args, key) {
5823
+ const value = args[key];
5824
+ if (typeof value === "string") {
5825
+ return value;
5826
+ }
5827
+ return typeof value === "number" && Number.isFinite(value) ? String(value) : void 0;
5828
+ }
5829
+ function isRecord2(value) {
5830
+ return value !== null && typeof value === "object" && !Array.isArray(value);
5831
+ }
5832
+ function readRequiredString(args, key) {
5833
+ const value = readString(args, key);
5834
+ if (!value) {
5835
+ throw new PmCliError(`Missing required argument: ${key}`, 64);
5836
+ }
5837
+ return value;
5838
+ }
5839
+ function globalOptions(args) {
5840
+ return {
5841
+ json: true,
5842
+ quiet: true,
5843
+ path: readString(args, "path"),
5844
+ noExtensions: args.noExtensions === true || args.no_extensions === true,
5845
+ noPager: true
5846
+ };
5847
+ }
5848
+ var ARRAY_TO_CSV_FIELDS = /* @__PURE__ */ new Set(["tags", "blockedBy", "blocked_by", "skills", "fields"]);
5849
+ var SCALAR_TO_ARRAY_FIELDS = /* @__PURE__ */ new Set([
5850
+ "comment",
5851
+ "note",
5852
+ "learning",
5853
+ "reminder",
5854
+ "event",
5855
+ "dep",
5856
+ "depRemove",
5857
+ "dep_remove",
5858
+ "file",
5859
+ "doc",
5860
+ "test",
5861
+ "unset",
5862
+ "addGlob",
5863
+ "add_glob",
5864
+ "migrate",
5865
+ "envSet",
5866
+ "env_set",
5867
+ "envClear",
5868
+ "env_clear"
5869
+ ]);
5870
+ var ARRAY_ADD_REMOVE_ACTIONS = /* @__PURE__ */ new Set([
5871
+ "files",
5872
+ "files-discover",
5873
+ "docs",
5874
+ "test",
5875
+ "test-all"
5876
+ ]);
5877
+ var LIFECYCLE_AUTHOR_ALIAS_ACTIONS = /* @__PURE__ */ new Set([
5878
+ "claim",
5879
+ "release",
5880
+ "start-task",
5881
+ "pause-task",
5882
+ "close-task"
5883
+ ]);
5884
+ function normalizeMcpOptionsArrays(options, action) {
5885
+ const result = {};
5886
+ const promoteAddRemove = action !== void 0 && ARRAY_ADD_REMOVE_ACTIONS.has(action);
5887
+ for (const [key, value] of Object.entries(options)) {
5888
+ if (Array.isArray(value) && ARRAY_TO_CSV_FIELDS.has(key)) {
5889
+ result[key] = value.join(",");
5890
+ continue;
5891
+ }
5892
+ if (typeof value === "string" && SCALAR_TO_ARRAY_FIELDS.has(key)) {
5893
+ result[key] = [value];
5894
+ continue;
5895
+ }
5896
+ if (typeof value === "string" && promoteAddRemove && (key === "add" || key === "remove")) {
5897
+ result[key] = [value];
5898
+ continue;
5899
+ }
5900
+ result[key] = value;
5901
+ }
5902
+ return result;
5903
+ }
5904
+ function optionsWithAuthor(args, action) {
5905
+ const baseOptions = asRecordClone(args.options);
5906
+ const hoistedTopLevel = {};
5907
+ const hoistKey = (key) => {
5908
+ if (baseOptions[key] !== void 0 || args[key] === void 0) {
5909
+ return;
5910
+ }
5911
+ hoistedTopLevel[key] = args[key];
5912
+ };
5913
+ if (action === "list") {
5914
+ hoistKey("status");
5915
+ hoistKey("type");
5916
+ hoistKey("tag");
5917
+ hoistKey("priority");
5918
+ hoistKey("limit");
5919
+ hoistKey("offset");
5920
+ } else if (action === "search") {
5921
+ hoistKey("mode");
5922
+ hoistKey("status");
5923
+ hoistKey("type");
5924
+ hoistKey("tag");
5925
+ hoistKey("priority");
5926
+ hoistKey("limit");
5927
+ } else if (action === "create") {
5928
+ hoistKey("title");
5929
+ hoistKey("type");
5930
+ hoistKey("status");
5931
+ hoistKey("description");
5932
+ hoistKey("body");
5933
+ hoistKey("priority");
5934
+ hoistKey("tags");
5935
+ hoistKey("parent");
5936
+ hoistKey("createMode");
5937
+ hoistKey("create_mode");
5938
+ hoistKey("allowMissingParent");
5939
+ } else if (action === "close") {
5940
+ hoistKey("duplicateOf");
5941
+ } else if (action === "append") {
5942
+ hoistKey("body");
5943
+ }
5944
+ const options = normalizeMcpOptionsArrays({ ...hoistedTopLevel, ...baseOptions }, action);
5945
+ const author = readString(args, "author");
5946
+ const authorFromAssignee = action !== void 0 && LIFECYCLE_AUTHOR_ALIAS_ACTIONS.has(action) ? readString(args, "assignee") ?? readString(options, "assignee") : void 0;
5947
+ if (author && options.author === void 0) {
5948
+ return { ...options, author };
5949
+ }
5950
+ if (authorFromAssignee && options.author === void 0) {
5951
+ return { ...options, author: authorFromAssignee };
5952
+ }
5953
+ return options;
5954
+ }
5955
+ function withAddNoteOption(options) {
5956
+ if (options.addNote === void 0) {
5957
+ return options;
5958
+ }
5959
+ const next2 = { ...options };
5960
+ if (next2.note === void 0 && typeof next2.addNote === "string") {
5961
+ next2.note = next2.addNote;
5962
+ }
5963
+ delete next2.addNote;
5964
+ return next2;
5965
+ }
5966
+ function withFilesDiscoveryOptions(options) {
5967
+ const next2 = { ...options };
5968
+ if (next2.discoveryNote !== void 0 && next2.note === void 0 && typeof next2.discoveryNote === "string") {
5969
+ next2.note = next2.discoveryNote;
5970
+ }
5971
+ delete next2.discover;
5972
+ delete next2.discoveryNote;
5973
+ return next2;
5974
+ }
5975
+ function normalizeActionName(value) {
5976
+ const chunks = [];
5977
+ let lastWasSeparator = true;
5978
+ for (const character of value.trim().toLowerCase()) {
5979
+ const isAlphaNumeric = character >= "a" && character <= "z" || character >= "0" && character <= "9";
5980
+ if (isAlphaNumeric) {
5981
+ chunks.push(character);
5982
+ lastWasSeparator = false;
5983
+ continue;
5984
+ }
5985
+ if (!lastWasSeparator) {
5986
+ chunks.push("-");
5987
+ lastWasSeparator = true;
5988
+ }
5989
+ }
5990
+ if (chunks.at(-1) === "-") {
5991
+ chunks.pop();
5992
+ }
5993
+ return chunks.join("");
5994
+ }
5995
+ function normalizeCommandPath(value) {
5996
+ return value.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ");
5997
+ }
5998
+ function readStringArray(value) {
5999
+ if (!Array.isArray(value)) {
6000
+ return [];
6001
+ }
6002
+ return value.map((entry) => String(entry)).filter((entry) => entry.length > 0);
6003
+ }
6004
+ function extensionOptionsFromArgs(args, options) {
6005
+ const reserved = /* @__PURE__ */ new Set([
6006
+ "action",
6007
+ "args",
6008
+ "author",
6009
+ "cwd",
6010
+ "fullChangedFields",
6011
+ "id",
6012
+ "options",
6013
+ "path",
6014
+ "query",
6015
+ "reason",
6016
+ "target"
6017
+ ]);
6018
+ const passthrough = {};
6019
+ for (const [key, value] of Object.entries(args)) {
6020
+ if (!reserved.has(key)) {
6021
+ passthrough[key] = value;
6022
+ }
6023
+ }
6024
+ const normalizedOptions = { ...passthrough, ...options };
6025
+ delete normalizedOptions.args;
6026
+ return normalizedOptions;
6027
+ }
6028
+ var extensionActivationQueue = createSerialQueue();
6029
+ function resetActiveExtensionRegistries() {
6030
+ setActiveExtensionHooks(createEmptyExtensionHookRegistry());
6031
+ setActiveExtensionCommands(createEmptyExtensionCommandRegistry());
6032
+ setActiveExtensionParsers(createEmptyExtensionParserRegistry());
6033
+ setActiveExtensionPreflight(createEmptyExtensionPreflightRegistry());
6034
+ setActiveExtensionServices(createEmptyExtensionServiceRegistry());
6035
+ setActiveExtensionRenderers(createEmptyExtensionRendererRegistry());
6036
+ setActiveExtensionRegistrations(createEmptyExtensionRegistrationRegistry());
6037
+ }
6038
+ async function withActiveExtensions(global2, explicitCwd, resolutionCwd, run) {
6039
+ return extensionActivationQueue.enqueue(async () => explicitCwd === void 0 ? await withActiveExtensionsExclusively(global2, resolutionCwd, run) : await withCwd(explicitCwd, () => withActiveExtensionsExclusively(global2, resolutionCwd, run)));
6040
+ }
6041
+ async function withActiveExtensionsExclusively(global2, cwd, run) {
6042
+ if (global2.noExtensions) {
6043
+ resetActiveExtensionRegistries();
6044
+ return run(null);
6045
+ }
6046
+ const pmRoot = resolvePmRoot(cwd, global2.path);
6047
+ if (!await pathExists(getSettingsPath(pmRoot))) {
6048
+ resetActiveExtensionRegistries();
6049
+ return run(null);
6050
+ }
6051
+ let active = null;
6052
+ let activated;
6053
+ try {
6054
+ const settings = await readSettings(pmRoot);
6055
+ const loadResult = await loadExtensions({ pmRoot, settings, cwd, noExtensions: false });
6056
+ const activationResult = await activateExtensions({ ...loadResult, loaded: loadResult.loaded });
6057
+ activated = { loadResult, activationResult };
6058
+ setActiveExtensionHooks(activationResult.hooks);
6059
+ setActiveExtensionCommands(activationResult.commands);
6060
+ setActiveExtensionParsers(activationResult.parsers);
6061
+ setActiveExtensionPreflight(activationResult.preflight);
6062
+ setActiveExtensionServices(activationResult.services);
6063
+ setActiveExtensionRenderers(activationResult.renderers);
6064
+ setActiveExtensionRegistrations(activationResult.registrations);
6065
+ active = { registrations: activationResult.registrations, commands: activationResult.commands, pmRoot };
6066
+ } catch (error) {
6067
+ resetActiveExtensionRegistries();
6068
+ console.error("[pm-sdk] extension activation failed; continuing without active extensions:", error);
6069
+ }
6070
+ try {
6071
+ return await run(active);
6072
+ } finally {
6073
+ resetActiveExtensionRegistries();
6074
+ if (activated) {
6075
+ await deactivateExtensions(activated.loadResult, activated.activationResult).catch(() => void 0);
6076
+ }
6077
+ }
6078
+ }
6079
+ async function dispatchActiveExtensionAction(action, args, options, global2, active) {
6080
+ if (!active) {
6081
+ throw new PmCliError(`Unsupported native pm action: ${action}`, 64);
6082
+ }
6083
+ const normalizedAction = normalizeActionName(action);
6084
+ const definition = active.registrations.commands.find((entry) => normalizeActionName(entry.action) === normalizedAction);
6085
+ const command = definition?.command ?? active.commands.handlers.find((entry) => normalizeActionName(entry.command) === normalizedAction)?.command;
6086
+ if (!command) {
6087
+ throw new PmCliError(`Unsupported native pm action: ${action}`, 64);
6088
+ }
6089
+ const handlerResult = await runActiveCommandHandler({
6090
+ command: normalizeCommandPath(command),
6091
+ args: readStringArray(options.args ?? args.args),
6092
+ options: extensionOptionsFromArgs(args, options),
6093
+ global: global2,
6094
+ pm_root: active.pmRoot
6095
+ });
6096
+ if (!handlerResult.handled) {
6097
+ const suffix = handlerResult.warnings.length > 0 ? ` (${handlerResult.warnings.join(", ")})` : "";
6098
+ throw new PmCliError(`Unsupported native pm action: ${action}${suffix}`, 64);
6099
+ }
6100
+ return handlerResult.result;
6101
+ }
6102
+ async function withCwd(cwd, run) {
6103
+ const previous = process.cwd();
6104
+ process.chdir(cwd);
6105
+ try {
6106
+ return await run();
6107
+ } finally {
6108
+ process.chdir(previous);
6109
+ }
6110
+ }
6111
+ function withMutationCompaction(args, options) {
6112
+ return { changedFields: args.fullChangedFields === true ? "full" : "compact", idOnly: args.idOnly === true, runnerOptions: { ...options } };
6113
+ }
6114
+ function mutationListOptions(options) {
6115
+ return {
6116
+ type: readScalarString(options, "filterType"),
6117
+ tag: readScalarString(options, "filterTag"),
6118
+ priority: readScalarString(options, "filterPriority"),
6119
+ deadlineBefore: readScalarString(options, "filterDeadlineBefore"),
6120
+ deadlineAfter: readScalarString(options, "filterDeadlineAfter"),
6121
+ updatedAfter: readScalarString(options, "filterUpdatedAfter"),
6122
+ updatedBefore: readScalarString(options, "filterUpdatedBefore"),
6123
+ createdAfter: readScalarString(options, "filterCreatedAfter"),
6124
+ createdBefore: readScalarString(options, "filterCreatedBefore"),
6125
+ ids: readScalarStringAllowBlank(options, "ids"),
6126
+ assignee: readScalarString(options, "filterAssignee"),
6127
+ assigneeFilter: readScalarString(options, "filterAssigneeFilter") ?? readScalarString(options, "filterAssignee_filter"),
6128
+ parent: readScalarString(options, "filterParent"),
6129
+ sprint: readScalarString(options, "filterSprint"),
6130
+ release: readScalarString(options, "filterRelease"),
6131
+ limit: readScalarString(options, "limit"),
6132
+ offset: readScalarString(options, "offset")
6133
+ };
6134
+ }
6135
+ function closeManyOptionsFromFlat(options) {
6136
+ return {
6137
+ status: readString(options, "filterStatus"),
6138
+ list: isRecord2(options.list) ? normalizeListOptions(options.list) : mutationListOptions(options),
6139
+ reason: readString(options, "reason"),
6140
+ resolution: readString(options, "resolution"),
6141
+ expectedResult: readString(options, "expectedResult") ?? readString(options, "expected_result") ?? readString(options, "expected"),
6142
+ actualResult: readString(options, "actualResult") ?? readString(options, "actual_result") ?? readString(options, "actual"),
6143
+ validateClose: readString(options, "validateClose") ?? readString(options, "validate_close"),
6144
+ author: readString(options, "author"),
6145
+ message: readString(options, "message"),
6146
+ force: options.force === true ? true : void 0,
6147
+ dryRun: options.dryRun === true || options.dry_run === true ? true : void 0,
6148
+ rollback: readString(options, "rollback"),
6149
+ checkpoint: options.checkpoint === false || options.noCheckpoint === true || options.no_checkpoint === true ? false : void 0
6150
+ };
6151
+ }
6152
+ var UPDATE_MANY_FLAT_CONTROL_KEYS = /* @__PURE__ */ new Set([
6153
+ "filterStatus",
6154
+ "filterType",
6155
+ "filterTag",
6156
+ "filterPriority",
6157
+ "filterDeadlineBefore",
6158
+ "filterDeadlineAfter",
6159
+ "filterUpdatedAfter",
6160
+ "filterUpdatedBefore",
6161
+ "filterCreatedAfter",
6162
+ "filterCreatedBefore",
6163
+ "filterAssignee",
6164
+ "filterAssigneeFilter",
6165
+ "filterAssignee_filter",
6166
+ "filterParent",
6167
+ "filterSprint",
6168
+ "filterRelease",
6169
+ "ids",
6170
+ "list",
6171
+ "update",
6172
+ "limit",
6173
+ "offset",
6174
+ "dryRun",
6175
+ "dry_run",
6176
+ "rollback",
6177
+ "checkpoint",
6178
+ "noCheckpoint",
6179
+ "no_checkpoint"
6180
+ ]);
6181
+ function updateManyUpdateOptionsFromFlat(options) {
6182
+ const update2 = {};
6183
+ for (const [key, value] of Object.entries(options)) {
6184
+ if (UPDATE_MANY_FLAT_CONTROL_KEYS.has(key)) {
6185
+ continue;
6186
+ }
6187
+ update2[key] = value;
6188
+ }
6189
+ return normalizeMcpUpdateOptions(update2);
6190
+ }
6191
+ function normalizeMcpUpdateOptions(options) {
6192
+ const normalizedInput = normalizeMcpOptionsArrays(options, "update-many");
6193
+ for (const contract of UPDATE_COMMANDER_STRING_OPTION_CONTRACTS) {
6194
+ for (const key of contract.keys) {
6195
+ const value = normalizedInput[key];
6196
+ if (typeof value === "number" && Number.isFinite(value)) {
6197
+ normalizedInput[key] = String(value);
6198
+ }
6199
+ }
6200
+ }
6201
+ return normalizeUpdateOptions(normalizedInput);
6202
+ }
6203
+ function updateManyOptionsFromFlat(options) {
6204
+ if (isRecord2(options.list) || isRecord2(options.update)) {
6205
+ const updateSource = isRecord2(options.update) ? options.update : updateManyUpdateOptionsFromFlat(options);
6206
+ return {
6207
+ status: readScalarString(options, "filterStatus"),
6208
+ list: isRecord2(options.list) ? normalizeListOptions(options.list) : mutationListOptions(options),
6209
+ update: normalizeMcpUpdateOptions(updateSource),
6210
+ dryRun: options.dryRun === true || options.dry_run === true ? true : void 0,
6211
+ rollback: readString(options, "rollback"),
6212
+ checkpoint: options.checkpoint === false || options.noCheckpoint === true || options.no_checkpoint === true ? false : void 0
6213
+ };
6214
+ }
6215
+ return {
6216
+ status: readScalarString(options, "filterStatus"),
6217
+ list: mutationListOptions(options),
6218
+ update: updateManyUpdateOptionsFromFlat(options),
6219
+ dryRun: options.dryRun === true || options.dry_run === true ? true : void 0,
6220
+ rollback: readString(options, "rollback"),
6221
+ checkpoint: options.checkpoint === false || options.noCheckpoint === true || options.no_checkpoint === true ? false : void 0
6222
+ };
6223
+ }
6224
+ var WORKSPACE_CONTRACTS_CACHE_PRESERVING_ACTIONS = /* @__PURE__ */ new Set([
6225
+ "activity",
6226
+ "aggregate",
6227
+ "context",
6228
+ "contracts",
6229
+ "deps",
6230
+ "files-discover",
6231
+ "get",
6232
+ "health",
6233
+ "history",
6234
+ "list",
6235
+ "next",
6236
+ "search",
6237
+ "stats",
6238
+ "telemetry",
6239
+ "validate"
6240
+ ]);
6241
+ var LIST_ACTION_ALIASES = {
6242
+ "list-all": { action: "list", options: { excludeTerminal: false } },
6243
+ "list-draft": { action: "list", options: { status: "draft", excludeTerminal: false } },
6244
+ "list-open": { action: "list", options: { status: "open", excludeTerminal: false } },
6245
+ "list-in-progress": { action: "list", options: { status: "in_progress", excludeTerminal: false } },
6246
+ "list-blocked": { action: "list", options: { status: "blocked", excludeTerminal: false } },
6247
+ "list-closed": { action: "list", options: { status: "closed", excludeTerminal: false } },
6248
+ "list-canceled": { action: "list", options: { status: "canceled", excludeTerminal: false } }
6249
+ };
6250
+ var EXTENSION_ACTION_ALIASES = {
6251
+ "extension-init": { action: "extension", options: { init: true } },
6252
+ "extension-install": { action: "extension", options: { install: true } },
6253
+ "extension-uninstall": { action: "extension", options: { uninstall: true } },
6254
+ "extension-explore": { action: "extension", options: { explore: true } },
6255
+ "extension-manage": { action: "extension", options: { manage: true } },
6256
+ "extension-describe": { action: "extension", options: { describe: true } },
6257
+ "extension-reload": { action: "extension", options: { reload: true } },
6258
+ "extension-doctor": { action: "extension", options: { doctor: true } },
6259
+ "extension-catalog": { action: "extension", options: { catalog: true } },
6260
+ "extension-adopt": { action: "extension", options: { adopt: true } },
6261
+ "extension-adopt-all": { action: "extension", options: { adoptAll: true } },
6262
+ "extension-activate": { action: "extension", options: { activate: true } },
6263
+ "extension-deactivate": { action: "extension", options: { deactivate: true } }
6264
+ };
6265
+ var PACKAGE_ACTION_ALIASES = {
6266
+ "package-init": { action: "package", options: { init: true, vocabulary: "package" } },
6267
+ "package-install": { action: "package", options: { install: true, vocabulary: "package" } },
6268
+ "package-uninstall": { action: "package", options: { uninstall: true, vocabulary: "package" } },
6269
+ "package-explore": { action: "package", options: { explore: true, vocabulary: "package" } },
6270
+ "package-manage": { action: "package", options: { manage: true, vocabulary: "package" } },
6271
+ "package-describe": { action: "package", options: { describe: true, vocabulary: "package" } },
6272
+ "package-reload": { action: "package", options: { reload: true, vocabulary: "package" } },
6273
+ "package-doctor": { action: "package", options: { doctor: true, vocabulary: "package" } },
6274
+ "package-catalog": { action: "package", options: { catalog: true, vocabulary: "package" } },
6275
+ "package-adopt": { action: "package", options: { adopt: true, vocabulary: "package" } },
6276
+ "package-adopt-all": { action: "package", options: { adoptAll: true, vocabulary: "package" } },
6277
+ "package-activate": { action: "package", options: { activate: true, vocabulary: "package" } },
6278
+ "package-deactivate": { action: "package", options: { deactivate: true, vocabulary: "package" } }
6279
+ };
6280
+ var SDK_ACTION_ALIASES = {
6281
+ ctx: { action: "context" },
6282
+ ...LIST_ACTION_ALIASES,
6283
+ ...EXTENSION_ACTION_ALIASES,
6284
+ ...PACKAGE_ACTION_ALIASES
6285
+ };
6286
+ function resolveSdkActionInput(args) {
6287
+ const rawAction = readRequiredString(args, "action");
6288
+ const normalizedAction = normalizeActionName(rawAction);
6289
+ const alias = getOwnHandler(SDK_ACTION_ALIASES, normalizedAction);
6290
+ const action = alias?.action ?? normalizedAction;
6291
+ const resolvedArgs = { ...args, action };
6292
+ if (alias?.options !== void 0) {
6293
+ resolvedArgs.options = { ...alias.options, ...asRecordClone(args.options) };
6294
+ }
6295
+ return { action, args: resolvedArgs };
6296
+ }
6297
+ function shouldInvalidateWorkspaceContractsCacheAfterAction(action) {
6298
+ return !WORKSPACE_CONTRACTS_CACHE_PRESERVING_ACTIONS.has(normalizeActionName(action));
6299
+ }
6300
+ async function runAction(args) {
6301
+ const resolved = resolveSdkActionInput(args);
6302
+ const global2 = globalOptions(resolved.args);
6303
+ const invalidateWorkspaceContractsCache = shouldInvalidateWorkspaceContractsCacheAfterAction(resolved.action);
6304
+ const explicitCwd = readString(resolved.args, "cwd");
6305
+ const resolutionCwd = explicitCwd ?? process.cwd();
6306
+ try {
6307
+ return await withActiveExtensions(global2, explicitCwd, resolutionCwd, (activeExtensions) => dispatchAction(resolved.action, resolved.args, global2, activeExtensions));
6308
+ } finally {
6309
+ if (invalidateWorkspaceContractsCache) {
6310
+ clearWorkspaceContractsCache();
6311
+ }
6312
+ }
6313
+ }
6314
+ function getOwnHandler(handlers, key) {
6315
+ return Object.prototype.hasOwnProperty.call(handlers, key) ? handlers[key] : void 0;
6316
+ }
6317
+ function readMcpTarget(ctx) {
6318
+ return readString(ctx.args, "target") ?? readString(ctx.options, "target");
6319
+ }
6320
+ function requireMcpItemId(ctx, source = ctx.options) {
6321
+ return ctx.id ?? readRequiredString(source, "id");
6322
+ }
6323
+ async function runMcpListAction(ctx) {
6324
+ const listOptions = { ...ctx.options };
6325
+ if (listOptions.compact === void 0 && listOptions.brief === void 0 && listOptions.fields === void 0 && listOptions.includeBody === void 0) {
6326
+ listOptions.compact = true;
6327
+ }
6328
+ return withQuerySummary(await runList(readString(ctx.args, "status") ?? readString(listOptions, "status"), listOptions, ctx.global), listOptions);
6329
+ }
6330
+ async function runMcpSearchAction(ctx) {
6331
+ const searchOptions = { ...ctx.options };
6332
+ if (searchOptions.compact === void 0 && searchOptions.full === void 0 && searchOptions.fields === void 0) {
6333
+ searchOptions.compact = true;
6334
+ }
6335
+ return withQuerySummary(await runSearch(readRequiredString(ctx.args, "query"), searchOptions, ctx.global), searchOptions);
6336
+ }
6337
+ async function runMcpCreateAction(ctx) {
6338
+ const { changedFields, idOnly, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6339
+ return projectMutationResult(await runCreate(runnerOptions, ctx.global), { changedFields, idOnly });
6340
+ }
6341
+ async function runMcpCopyAction(ctx) {
6342
+ const { changedFields, idOnly, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6343
+ const copyOptions = {
6344
+ ...runnerOptions,
6345
+ ...runnerOptions.title === void 0 && typeof ctx.args.title === "string" ? { title: ctx.args.title } : {},
6346
+ ...runnerOptions.message === void 0 && typeof ctx.args.message === "string" ? { message: ctx.args.message } : {}
6347
+ };
6348
+ return projectMutationResult(await runCopy(requireMcpItemId(ctx, copyOptions), copyOptions, ctx.global), {
6349
+ changedFields,
6350
+ idOnly
6351
+ });
6352
+ }
6353
+ async function runMcpUpdateAction(ctx) {
6354
+ const { changedFields, idOnly, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6355
+ return projectMutationResult(await runUpdate(requireMcpItemId(ctx, runnerOptions), runnerOptions, ctx.global), {
6356
+ changedFields,
6357
+ idOnly
6358
+ });
6359
+ }
6360
+ async function runMcpCloseAction(ctx) {
6361
+ const { changedFields, idOnly, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6362
+ const closeReason = readString(ctx.args, "reason") ?? readString(ctx.args, "text") ?? readString(runnerOptions, "reason") ?? readString(runnerOptions, "text");
6363
+ return projectMutationResult(await runClose(requireMcpItemId(ctx, runnerOptions), closeReason, runnerOptions, ctx.global), { changedFields, idOnly });
6364
+ }
6365
+ function runMcpCommentsAction(ctx) {
6366
+ const commentOptions = { ...ctx.options };
6367
+ const isListing = commentOptions.add === void 0 && commentOptions.stdin === void 0 && commentOptions.file === void 0 && commentOptions.edit === void 0 && commentOptions.delete === void 0;
6368
+ if (isListing) {
6369
+ commentOptions.includeMeta = true;
6370
+ if (commentOptions.limit === void 0 && commentOptions.full !== true) {
6371
+ commentOptions.limit = "20";
6372
+ }
6373
+ }
6374
+ delete commentOptions.full;
6375
+ return runComments(requireMcpItemId(ctx), commentOptions, ctx.global);
6376
+ }
6377
+ function runMcpFilesAction(ctx) {
6378
+ const fileId = requireMcpItemId(ctx);
6379
+ return ctx.options.discover === true ? runFilesDiscover(fileId, withFilesDiscoveryOptions(ctx.options), ctx.global) : runFiles(fileId, withAddNoteOption(ctx.options), ctx.global);
6380
+ }
6381
+ function runMcpTelemetryAction(ctx) {
6382
+ return runTelemetry({
6383
+ subcommand: readString(ctx.args, "subcommand") ?? readString(ctx.options, "subcommand"),
6384
+ limit: resolveMcpTelemetryLimit(ctx.args, ctx.options)
6385
+ }, ctx.global);
6386
+ }
6387
+ function resolveMcpTelemetryLimit(args, options) {
6388
+ if (typeof args.limit === "number" && Number.isFinite(args.limit)) {
6389
+ return args.limit;
6390
+ }
6391
+ if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
6392
+ return options.limit;
6393
+ }
6394
+ return readString(args, "limit") ?? readString(options, "limit");
6395
+ }
6396
+ function runMcpHealthAction(ctx) {
6397
+ const healthOptions = { ...ctx.options };
6398
+ if (healthOptions.brief === void 0 && healthOptions.summary === void 0 && healthOptions.full === void 0) {
6399
+ healthOptions.summary = true;
6400
+ }
6401
+ return runHealth(ctx.global, healthOptions);
6402
+ }
6403
+ function runMcpConfigAction(ctx) {
6404
+ const configAction = readString(ctx.args, "configAction") ?? readString(ctx.options, "configAction") ?? readString(ctx.options, "action");
6405
+ if (configAction === void 0) {
6406
+ throw new PmCliError("Missing required argument: configAction", 64);
6407
+ }
6408
+ return runConfig(readString(ctx.args, "scope") ?? readString(ctx.options, "scope") ?? "project", configAction, readString(ctx.args, "key") ?? readString(ctx.options, "key"), ctx.options, ctx.global, readString(ctx.args, "value") ?? readString(ctx.options, "value"));
6409
+ }
6410
+ function runMcpActivityAction(ctx) {
6411
+ const activityOptions = { ...ctx.options };
6412
+ if (activityOptions.compact === void 0) {
6413
+ activityOptions.compact = activityOptions.full === true ? false : true;
6414
+ }
6415
+ delete activityOptions.full;
6416
+ return runActivity(activityOptions, ctx.global);
6417
+ }
6418
+ function runMcpHistoryRepairAction(ctx) {
6419
+ const repairAll = ctx.options.all === true;
6420
+ const repairId = ctx.id ?? readString(ctx.options, "id");
6421
+ assertHistoryRepairTarget(repairId, repairAll);
6422
+ return repairAll ? runHistoryRepairAll(ctx.options, ctx.global) : runHistoryRepair(repairId, ctx.options, ctx.global);
6423
+ }
6424
+ function parseMcpInteger(value, label) {
6425
+ if (typeof value === "number") {
6426
+ if (!Number.isInteger(value)) {
6427
+ throw new PmCliError(`${label} must be a finite integer.`, 64);
6428
+ }
6429
+ return value;
6430
+ }
6431
+ if (typeof value === "string" && value.trim().length > 0) {
6432
+ const parsed = Number(value);
6433
+ if (!Number.isInteger(parsed)) {
6434
+ throw new PmCliError(`${label} must be a finite integer.`, 64);
6435
+ }
6436
+ return parsed;
6437
+ }
6438
+ return void 0;
6439
+ }
6440
+ function parseMcpIntegerPrefix(value, label) {
6441
+ if (typeof value === "number") {
6442
+ if (!Number.isFinite(value) || !Number.isInteger(value)) {
6443
+ throw new PmCliError(`${label} must be a finite integer.`, 64);
6444
+ }
6445
+ return value;
6446
+ }
6447
+ if (typeof value === "string" && value.trim().length > 0) {
6448
+ const trimmed = value.trim();
6449
+ if (!/^[+-]?\d+(?:st|nd|rd|th)?$/i.test(trimmed)) {
6450
+ throw new PmCliError(`${label} must be a finite integer.`, 64);
6451
+ }
6452
+ const parsed = Number.parseInt(trimmed, 10);
6453
+ if (!Number.isInteger(parsed)) {
6454
+ throw new PmCliError(`${label} must be a finite integer.`, 64);
6455
+ }
6456
+ return parsed;
6457
+ }
6458
+ return void 0;
6459
+ }
6460
+ function runMcpPlanAction(ctx) {
6461
+ const subcommand = readString(ctx.args, "subcommand") ?? readRequiredString(ctx.options, "subcommand");
6462
+ const planRecord = ctx.options;
6463
+ return runPlan({
6464
+ subcommand,
6465
+ id: typeof ctx.id === "string" ? ctx.id : typeof planRecord.id === "string" ? planRecord.id : void 0,
6466
+ stepRef: readMcpPlanStepRef(ctx),
6467
+ reorderTo: parseMcpIntegerPrefix(planRecord.reorderTo ?? ctx.args.reorderTo, "plan reorderTo"),
6468
+ options: ctx.options,
6469
+ global: ctx.global
6470
+ });
6471
+ }
6472
+ function readMcpPlanStepRef(ctx) {
6473
+ return typeof ctx.options.stepRef === "string" ? ctx.options.stepRef : typeof ctx.args.stepRef === "string" ? ctx.args.stepRef : void 0;
6474
+ }
6475
+ function createMcpSchemaContext(ctx) {
6476
+ const subcommand = readString(ctx.args, "subcommand") ?? readRequiredString(ctx.options, "subcommand");
6477
+ const aliasSource = ctx.args.alias ?? ctx.options.alias;
6478
+ return {
6479
+ ctx,
6480
+ subcommand: subcommand.trim().toLowerCase(),
6481
+ name: readString(ctx.args, "name") ?? readString(ctx.options, "name"),
6482
+ author: readString(ctx.args, "author") ?? readString(ctx.options, "author"),
6483
+ force: ctx.args.force === true || ctx.options.force === true,
6484
+ aliases: aliasSource === void 0 ? void 0 : readStringArray(aliasSource)
6485
+ };
6486
+ }
6487
+ function runMcpSchemaReadOrRemoveAction(schema) {
6488
+ const { ctx, subcommand, name, author, force } = schema;
6489
+ const simpleHandlers = {
6490
+ list: () => runSchemaList(ctx.global),
6491
+ show: () => runSchemaShow(name, ctx.global),
6492
+ "show-status": () => runSchemaShowStatus(name, ctx.global),
6493
+ "list-fields": () => runSchemaListFields(ctx.global),
6494
+ "show-field": () => runSchemaShowField(name, ctx.global),
6495
+ "remove-type": () => runSchemaRemoveType(name, { author, force }, ctx.global),
6496
+ "remove-field": () => runSchemaRemoveField(name, { author, force }, ctx.global),
6497
+ "remove-status": () => runSchemaRemoveStatus(name, { author, force }, ctx.global),
6498
+ "apply-preset": () => runSchemaApplyPreset(readString(ctx.args, "typePreset") ?? readString(ctx.options, "typePreset"), { author, force }, ctx.global)
6499
+ };
6500
+ const handler = getOwnHandler(simpleHandlers, subcommand);
6501
+ return handler ? handler() : null;
6502
+ }
6503
+ function runMcpSchemaAddFieldAction(schema) {
6504
+ const { ctx, name, author, force, aliases } = schema;
6505
+ const commandsSource = ctx.args.commands ?? ctx.options.commands;
6506
+ const requiredTypesSource = ctx.args.requiredTypes ?? ctx.options.requiredTypes;
6507
+ return runSchemaAddField(name, {
6508
+ type: readString(ctx.args, "fieldType") ?? readString(ctx.options, "fieldType"),
6509
+ commands: commandsSource === void 0 ? void 0 : readStringArray(commandsSource),
6510
+ description: readString(ctx.args, "description") ?? readString(ctx.options, "description"),
6511
+ cliFlag: readString(ctx.args, "cliFlag") ?? readString(ctx.options, "cliFlag"),
6512
+ alias: aliases,
6513
+ required: ctx.args.required === true || ctx.options.required === true,
6514
+ requiredOnCreate: ctx.args.requiredOnCreate === true || ctx.options.requiredOnCreate === true,
6515
+ allowUnset: !(ctx.args.allowUnset === false || ctx.options.allowUnset === false),
6516
+ requiredTypes: requiredTypesSource === void 0 ? void 0 : readStringArray(requiredTypesSource),
6517
+ author,
6518
+ force
6519
+ }, ctx.global);
6520
+ }
6521
+ function runMcpSchemaAddStatusAction(schema) {
6522
+ const { ctx, name, author, force, aliases } = schema;
6523
+ const roleSource = ctx.args.role ?? ctx.options.role;
6524
+ return runSchemaAddStatus(name, {
6525
+ role: roleSource === void 0 ? void 0 : readStringArray(roleSource),
6526
+ alias: aliases,
6527
+ description: readString(ctx.args, "description") ?? readString(ctx.options, "description"),
6528
+ order: parseMcpInteger(ctx.args.order ?? ctx.options.order, "schema add-status order"),
6529
+ author,
6530
+ force
6531
+ }, ctx.global);
6532
+ }
6533
+ function runMcpSchemaAddTypeAction(schema) {
6534
+ const { ctx, name, author, force, aliases } = schema;
6535
+ return runSchemaAddType(name, {
6536
+ description: readString(ctx.args, "description") ?? readString(ctx.options, "description"),
6537
+ defaultStatus: readString(ctx.args, "defaultStatus") ?? readString(ctx.args, "default_status") ?? readString(ctx.options, "defaultStatus") ?? readString(ctx.options, "default_status"),
6538
+ folder: readString(ctx.args, "folder") ?? readString(ctx.options, "folder"),
6539
+ alias: aliases,
6540
+ author,
6541
+ force
6542
+ }, ctx.global);
6543
+ }
6544
+ function runMcpSchemaAction(ctx) {
6545
+ const schema = createMcpSchemaContext(ctx);
6546
+ const simpleResult = runMcpSchemaReadOrRemoveAction(schema);
6547
+ if (simpleResult !== null) {
6548
+ return simpleResult;
6549
+ }
6550
+ if (schema.subcommand === "add-field") {
6551
+ return runMcpSchemaAddFieldAction(schema);
6552
+ }
6553
+ if (schema.subcommand === "add-status") {
6554
+ return runMcpSchemaAddStatusAction(schema);
6555
+ }
6556
+ if (schema.subcommand === "add-type") {
6557
+ if (ctx.args.infer === true || ctx.options.infer === true) {
6558
+ return runSchemaInferTypes({
6559
+ minCount: parseMcpInteger(ctx.args.minCount ?? ctx.options.minCount, "schema infer minCount"),
6560
+ apply: ctx.args.apply === true || ctx.options.apply === true,
6561
+ author: schema.author,
6562
+ force: schema.force
6563
+ }, ctx.global);
6564
+ }
6565
+ return runMcpSchemaAddTypeAction(schema);
6566
+ }
6567
+ throw new PmCliError(`Unknown pm schema subcommand "${schema.subcommand}". Allowed: add-type, remove-type, add-status, remove-status, add-field, remove-field, list-fields, show-field, apply-preset, list, show, show-status`, 64);
6568
+ }
6569
+ function runMcpProfileAction(ctx) {
6570
+ const subcommand = readString(ctx.args, "subcommand") ?? readRequiredString(ctx.options, "subcommand");
6571
+ const normalizedSubcommand = subcommand.trim().toLowerCase();
6572
+ const profileName = readString(ctx.args, "name") ?? readString(ctx.options, "name");
6573
+ const handlers = {
6574
+ list: () => runProfileList(),
6575
+ show: () => runProfileShow(profileName),
6576
+ lint: () => runProfileLint(profileName),
6577
+ apply: () => runProfileApply(profileName, {
6578
+ dryRun: ctx.args.dryRun === true || ctx.options.dryRun === true,
6579
+ author: readString(ctx.args, "author") ?? readString(ctx.options, "author"),
6580
+ force: ctx.args.force === true || ctx.options.force === true
6581
+ }, ctx.global)
6582
+ };
6583
+ const handler = getOwnHandler(handlers, normalizedSubcommand);
6584
+ if (!handler) {
6585
+ throw new PmCliError(`Unknown pm profile subcommand "${subcommand}". Allowed: list, show, apply, lint`, 64);
6586
+ }
6587
+ return handler();
6588
+ }
6589
+ function runMcpStatsAction(ctx) {
6590
+ return runStats(ctx.global, {
6591
+ storage: ctx.options.storage === true,
6592
+ metadataCoverage: ctx.options.metadataCoverage === true,
6593
+ fieldUtilization: ctx.options.fieldUtilization === true,
6594
+ byAssignee: ctx.options.byAssignee === true,
6595
+ byTag: ctx.options.byTag === true,
6596
+ byPriority: ctx.options.byPriority === true,
6597
+ tagPrefix: typeof ctx.options.tagPrefix === "string" ? ctx.options.tagPrefix : void 0
6598
+ });
6599
+ }
6600
+ async function runMcpAppendAction(ctx) {
6601
+ const { changedFields, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6602
+ return projectMutationResult(await runAppend(requireMcpItemId(ctx, runnerOptions), runnerOptions, ctx.global), {
6603
+ changedFields
6604
+ });
6605
+ }
6606
+ async function runMcpUpdateManyAction(ctx) {
6607
+ const { changedFields, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6608
+ return projectMutationResult(await runUpdateMany(updateManyOptionsFromFlat(runnerOptions), ctx.global), { changedFields });
6609
+ }
6610
+ async function runMcpCloseManyAction(ctx) {
6611
+ const { changedFields, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6612
+ const topLevelReason = readString(ctx.args, "reason");
6613
+ const closeManyRunnerOptions = topLevelReason !== void 0 && runnerOptions.reason === void 0 ? { ...runnerOptions, reason: topLevelReason } : { ...runnerOptions };
6614
+ if (ctx.force && closeManyRunnerOptions.force === void 0) {
6615
+ closeManyRunnerOptions.force = true;
6616
+ }
6617
+ return projectMutationResult(await runCloseMany(closeManyOptionsFromFlat(closeManyRunnerOptions), ctx.global), { changedFields });
6618
+ }
6619
+ async function runMcpRestoreAction(ctx) {
6620
+ const { changedFields, idOnly, runnerOptions } = withMutationCompaction(ctx.args, ctx.options);
6621
+ const target = readString(runnerOptions, "target") ?? readRequiredString(ctx.args, "target");
6622
+ return projectMutationResult(await runRestore(requireMcpItemId(ctx, runnerOptions), target, runnerOptions, ctx.global), {
6623
+ changedFields,
6624
+ idOnly
6625
+ });
6626
+ }
6627
+ function withoutLifecycleAssigneeAlias(options) {
6628
+ const updateOptions = { ...options };
6629
+ delete updateOptions.assignee;
6630
+ return updateOptions;
6631
+ }
6632
+ async function runMcpStartTaskAction(ctx) {
6633
+ const pmRoot = resolvePmRoot(process.cwd(), ctx.global.path);
6634
+ const settings = await readSettings(pmRoot);
6635
+ const inProgressStatus = resolveStartTaskInProgressStatus(resolveRuntimeStatusRegistry(settings.schema));
6636
+ const id = requireMcpItemId(ctx);
6637
+ const claimResult = await runClaim(id, ctx.force, ctx.global, ctx.options);
6638
+ const updateResult = await runUpdate(id, { ...withoutLifecycleAssigneeAlias(ctx.options), status: inProgressStatus, force: ctx.force }, ctx.global);
6639
+ return { id, action: "start_task", claim: claimResult, update: updateResult };
6640
+ }
6641
+ async function runMcpPauseTaskAction(ctx) {
6642
+ const pmRoot = resolvePmRoot(process.cwd(), ctx.global.path);
6643
+ const settings = await readSettings(pmRoot);
6644
+ const id = requireMcpItemId(ctx);
6645
+ const openStatus = resolveRuntimeStatusRegistry(settings.schema).open_status;
6646
+ const updateResult = await runUpdate(id, { ...withoutLifecycleAssigneeAlias(ctx.options), status: openStatus, force: ctx.force }, ctx.global);
6647
+ const releaseResult = await runRelease(id, ctx.force, ctx.global, ctx.options);
6648
+ return { id, action: "pause_task", update: updateResult, release: releaseResult };
6649
+ }
6650
+ async function runMcpCloseTaskAction(ctx) {
6651
+ const id = requireMcpItemId(ctx);
6652
+ const closeReason = readString(ctx.args, "reason") ?? readString(ctx.args, "text") ?? readString(ctx.options, "reason") ?? readString(ctx.options, "text");
6653
+ const closeResult = await runClose(id, closeReason, { ...ctx.options, force: ctx.force }, ctx.global);
6654
+ const releaseResult = await runRelease(id, ctx.force, ctx.global, ctx.options);
6655
+ return { id, action: "close_task", close: closeResult, release: releaseResult };
6656
+ }
6657
+ var SDK_ACTION_HANDLERS = {
6658
+ init: (ctx) => runInit(readString(ctx.args, "prefix"), ctx.global, ctx.options),
6659
+ context: (ctx) => runContext(ctx.options, ctx.global),
6660
+ next: (ctx) => runNext(ctx.options, ctx.global),
6661
+ list: runMcpListAction,
6662
+ get: (ctx) => runGet(requireMcpItemId(ctx), ctx.global, ctx.options),
6663
+ search: runMcpSearchAction,
6664
+ create: runMcpCreateAction,
6665
+ copy: runMcpCopyAction,
6666
+ focus: (ctx) => runFocus(ctx.id, { clear: ctx.options.clear === true || ctx.args.clear === true }, ctx.global),
6667
+ update: runMcpUpdateAction,
6668
+ restore: runMcpRestoreAction,
6669
+ claim: (ctx) => runClaim(requireMcpItemId(ctx), ctx.force, ctx.global, ctx.options),
6670
+ release: (ctx) => runRelease(requireMcpItemId(ctx), ctx.force, ctx.global, ctx.options),
6671
+ "start-task": runMcpStartTaskAction,
6672
+ "pause-task": runMcpPauseTaskAction,
6673
+ "close-task": runMcpCloseTaskAction,
6674
+ close: runMcpCloseAction,
6675
+ comments: runMcpCommentsAction,
6676
+ notes: (ctx) => runNotes(requireMcpItemId(ctx), ctx.options, ctx.global),
6677
+ learnings: (ctx) => runLearnings(requireMcpItemId(ctx), ctx.options, ctx.global),
6678
+ files: runMcpFilesAction,
6679
+ docs: (ctx) => runDocs(requireMcpItemId(ctx), withAddNoteOption(ctx.options), ctx.global),
6680
+ test: (ctx) => runTest(requireMcpItemId(ctx), ctx.options, ctx.global),
6681
+ "test-all": (ctx) => runTestAll(ctx.options, ctx.global),
6682
+ telemetry: runMcpTelemetryAction,
6683
+ validate: (ctx) => runValidate(ctx.options, ctx.global),
6684
+ health: runMcpHealthAction,
6685
+ contracts: (ctx) => runContracts(ctx.options, ctx.global),
6686
+ config: runMcpConfigAction,
6687
+ activity: runMcpActivityAction,
6688
+ aggregate: (ctx) => runAggregate(ctx.options, ctx.global),
6689
+ extension: (ctx) => runExtension(readMcpTarget(ctx), ctx.options, ctx.global),
6690
+ package: (ctx) => runExtension(readMcpTarget(ctx), ctx.options, ctx.global),
6691
+ install: (ctx) => runExtension(readMcpTarget(ctx), { ...ctx.options, install: true }, ctx.global),
6692
+ upgrade: (ctx) => runUpgrade(readMcpTarget(ctx), ctx.options, ctx.global),
6693
+ delete: (ctx) => runDelete(requireMcpItemId(ctx), ctx.options, ctx.global),
6694
+ deps: (ctx) => runDeps(requireMcpItemId(ctx), ctx.options, ctx.global),
6695
+ "files-discover": (ctx) => runFilesDiscover(requireMcpItemId(ctx), ctx.options, ctx.global),
6696
+ history: (ctx) => runHistory(requireMcpItemId(ctx), ctx.options, ctx.global),
6697
+ "history-redact": (ctx) => runHistoryRedact(requireMcpItemId(ctx), ctx.options, ctx.global),
6698
+ "history-repair": runMcpHistoryRepairAction,
6699
+ "history-compact": (ctx) => runHistoryCompact(requireMcpItemId(ctx), ctx.options, ctx.global),
6700
+ plan: runMcpPlanAction,
6701
+ schema: runMcpSchemaAction,
6702
+ profile: runMcpProfileAction,
6703
+ stats: runMcpStatsAction,
6704
+ append: runMcpAppendAction,
6705
+ "update-many": runMcpUpdateManyAction,
6706
+ "close-many": runMcpCloseManyAction,
6707
+ gc: (ctx) => runGc(ctx.global, ctx.options)
6708
+ };
6709
+ async function dispatchAction(action, args, global2, activeExtensions) {
6710
+ const options = optionsWithAuthor(args, action);
6711
+ const ctx = {
6712
+ action,
6713
+ args,
6714
+ options,
6715
+ id: readString(args, "id"),
6716
+ force: args.force === true || options.force === true,
6717
+ global: global2,
6718
+ activeExtensions
6719
+ };
6720
+ const handler = getOwnHandler(SDK_ACTION_HANDLERS, action);
6721
+ return handler ? handler(ctx) : dispatchActiveExtensionAction(action, args, options, global2, activeExtensions);
6722
+ }
6723
+ var actionRunnerTestHooks = {
6724
+ closeManyOptionsFromFlat,
6725
+ extensionOptionsFromArgs,
6726
+ globalOptions,
6727
+ mutationListOptions,
6728
+ normalizeActionName,
6729
+ normalizeCommandPath,
6730
+ normalizeMcpUpdateOptions,
6731
+ normalizeMcpOptionsArrays,
6732
+ optionsWithAuthor,
6733
+ readRequiredString,
6734
+ readScalarString,
6735
+ readScalarStringAllowBlank,
6736
+ readStringArray,
6737
+ updateManyOptionsFromFlat,
6738
+ withAddNoteOption,
6739
+ withFilesDiscoveryOptions,
6740
+ withMutationCompaction
6741
+ };
6742
+ if (process.env.NODE_ENV === "test" || process.env.VITEST !== void 0 || process.env.VITEST_WORKER_ID !== void 0) {
6743
+ globalThis.__pmCliActionRunnerTestHooks = actionRunnerTestHooks;
6744
+ }
5383
6745
  async function loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
5384
6746
  const loadResult = await loadExtensions({
5385
6747
  pmRoot,
@@ -5388,10 +6750,18 @@ async function loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
5388
6750
  noExtensions: false
5389
6751
  });
5390
6752
  const activationResult = await activateExtensions(loadResult);
5391
- return activationResult.registrations;
6753
+ try {
6754
+ return activationResult.registrations;
6755
+ } finally {
6756
+ try {
6757
+ await deactivateExtensions(loadResult, activationResult);
6758
+ } catch {
6759
+ }
6760
+ }
5392
6761
  }
5393
6762
 
5394
6763
  export {
6764
+ clearWorkspaceContractsCache,
5395
6765
  readStringOption,
5396
6766
  readBooleanOption,
5397
6767
  readCsvListOption,
@@ -5427,8 +6797,29 @@ export {
5427
6797
  runDedupeMerge,
5428
6798
  runNormalize,
5429
6799
  runReindex,
5430
- clearWorkspaceContractsCache,
6800
+ PmClient,
6801
+ context,
6802
+ list,
6803
+ search,
6804
+ get,
6805
+ next,
6806
+ aggregate,
6807
+ stats,
6808
+ create,
6809
+ update,
6810
+ close,
6811
+ claim,
6812
+ release,
6813
+ copy,
6814
+ deleteItem,
6815
+ restore,
6816
+ focus,
6817
+ startTask,
6818
+ pauseTask,
6819
+ closeTask,
5431
6820
  getWorkspaceContracts,
5432
- getContracts
6821
+ getContracts,
6822
+ readRequiredString,
6823
+ runAction
5433
6824
  };
5434
- //# sourceMappingURL=chunk-WVSGSZ6J.js.map
6825
+ //# sourceMappingURL=chunk-S547WBYG.js.map