@unbrained/pm-cli 2026.6.12 → 2026.6.16

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 (777) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.md +2 -2
  3. package/dist/cli/bootstrap-args.d.ts +29 -0
  4. package/dist/cli/bootstrap-args.js +11 -4
  5. package/dist/cli/bootstrap-args.js.map +1 -1
  6. package/dist/cli/commander-usage.d.ts +12 -0
  7. package/dist/cli/commander-usage.js +18 -7
  8. package/dist/cli/commander-usage.js.map +1 -1
  9. package/dist/cli/commands/activity.d.ts +19 -0
  10. package/dist/cli/commands/activity.js +12 -2
  11. package/dist/cli/commands/activity.js.map +1 -1
  12. package/dist/cli/commands/aggregate.d.ts +58 -0
  13. package/dist/cli/commands/aggregate.js +48 -15
  14. package/dist/cli/commands/aggregate.js.map +1 -1
  15. package/dist/cli/commands/annotation-command.d.ts +6 -1
  16. package/dist/cli/commands/annotation-command.js +72 -2
  17. package/dist/cli/commands/annotation-command.js.map +1 -1
  18. package/dist/cli/commands/append.js +4 -3
  19. package/dist/cli/commands/append.js.map +1 -1
  20. package/dist/cli/commands/close-many.d.ts +20 -0
  21. package/dist/cli/commands/close-many.js +14 -23
  22. package/dist/cli/commands/close-many.js.map +1 -1
  23. package/dist/cli/commands/close.js +37 -4
  24. package/dist/cli/commands/close.js.map +1 -1
  25. package/dist/cli/commands/comments-audit.js +3 -2
  26. package/dist/cli/commands/comments-audit.js.map +1 -1
  27. package/dist/cli/commands/comments.d.ts +2 -0
  28. package/dist/cli/commands/comments.js +49 -23
  29. package/dist/cli/commands/comments.js.map +1 -1
  30. package/dist/cli/commands/completion.js +269 -8
  31. package/dist/cli/commands/completion.js.map +1 -1
  32. package/dist/cli/commands/config.d.ts +51 -1
  33. package/dist/cli/commands/config.js +50 -12
  34. package/dist/cli/commands/config.js.map +1 -1
  35. package/dist/cli/commands/context.d.ts +79 -1
  36. package/dist/cli/commands/context.js +151 -25
  37. package/dist/cli/commands/context.js.map +1 -1
  38. package/dist/cli/commands/contracts.d.ts +80 -1
  39. package/dist/cli/commands/contracts.js +54 -4
  40. package/dist/cli/commands/contracts.js.map +1 -1
  41. package/dist/cli/commands/create.d.ts +49 -0
  42. package/dist/cli/commands/create.js +112 -7
  43. package/dist/cli/commands/create.js.map +1 -1
  44. package/dist/cli/commands/dedupe-audit.d.ts +33 -0
  45. package/dist/cli/commands/dedupe-audit.js +18 -14
  46. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  47. package/dist/cli/commands/deps.js +7 -4
  48. package/dist/cli/commands/deps.js.map +1 -1
  49. package/dist/cli/commands/event-validation-messages.js +3 -3
  50. package/dist/cli/commands/event-validation-messages.js.map +1 -1
  51. package/dist/cli/commands/extension/bundled-catalog.d.ts +7 -0
  52. package/dist/cli/commands/extension/bundled-catalog.js +19 -15
  53. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  54. package/dist/cli/commands/extension/install-sources.d.ts +41 -1
  55. package/dist/cli/commands/extension/install-sources.js +26 -8
  56. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  57. package/dist/cli/commands/extension/shared.d.ts +5 -0
  58. package/dist/cli/commands/extension/shared.js +9 -3
  59. package/dist/cli/commands/extension/shared.js.map +1 -1
  60. package/dist/cli/commands/extension.d.ts +133 -1
  61. package/dist/cli/commands/extension.js +127 -9
  62. package/dist/cli/commands/extension.js.map +1 -1
  63. package/dist/cli/commands/files.d.ts +30 -1
  64. package/dist/cli/commands/files.js +21 -2
  65. package/dist/cli/commands/files.js.map +1 -1
  66. package/dist/cli/commands/focus.d.ts +11 -0
  67. package/dist/cli/commands/focus.js +86 -0
  68. package/dist/cli/commands/focus.js.map +1 -0
  69. package/dist/cli/commands/get.d.ts +9 -2
  70. package/dist/cli/commands/get.js +34 -6
  71. package/dist/cli/commands/get.js.map +1 -1
  72. package/dist/cli/commands/guide.d.ts +5 -0
  73. package/dist/cli/commands/guide.js +6 -3
  74. package/dist/cli/commands/guide.js.map +1 -1
  75. package/dist/cli/commands/health.d.ts +109 -0
  76. package/dist/cli/commands/health.js +87 -35
  77. package/dist/cli/commands/health.js.map +1 -1
  78. package/dist/cli/commands/history-compact.js +27 -36
  79. package/dist/cli/commands/history-compact.js.map +1 -1
  80. package/dist/cli/commands/history-redact.d.ts +46 -0
  81. package/dist/cli/commands/history-redact.js +99 -67
  82. package/dist/cli/commands/history-redact.js.map +1 -1
  83. package/dist/cli/commands/history-repair.js +34 -37
  84. package/dist/cli/commands/history-repair.js.map +1 -1
  85. package/dist/cli/commands/history.js +6 -2
  86. package/dist/cli/commands/history.js.map +1 -1
  87. package/dist/cli/commands/index.d.ts +1 -0
  88. package/dist/cli/commands/index.js +3 -2
  89. package/dist/cli/commands/index.js.map +1 -1
  90. package/dist/cli/commands/init-agent-guidance.d.ts +54 -0
  91. package/dist/cli/commands/init-agent-guidance.js +31 -4
  92. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  93. package/dist/cli/commands/init.d.ts +36 -1
  94. package/dist/cli/commands/init.js +38 -5
  95. package/dist/cli/commands/init.js.map +1 -1
  96. package/dist/cli/commands/learnings.js +4 -3
  97. package/dist/cli/commands/learnings.js.map +1 -1
  98. package/dist/cli/commands/linked-test-parsers.d.ts +5 -0
  99. package/dist/cli/commands/linked-test-parsers.js +5 -2
  100. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  101. package/dist/cli/commands/list-filter-shared.d.ts +8 -0
  102. package/dist/cli/commands/list-filter-shared.js +70 -0
  103. package/dist/cli/commands/list-filter-shared.js.map +1 -0
  104. package/dist/cli/commands/list.d.ts +116 -0
  105. package/dist/cli/commands/list.js +194 -6
  106. package/dist/cli/commands/list.js.map +1 -1
  107. package/dist/cli/commands/normalize.js +16 -2
  108. package/dist/cli/commands/normalize.js.map +1 -1
  109. package/dist/cli/commands/notes.js +4 -3
  110. package/dist/cli/commands/notes.js.map +1 -1
  111. package/dist/cli/commands/plan.js +3 -2
  112. package/dist/cli/commands/plan.js.map +1 -1
  113. package/dist/cli/commands/reindex.d.ts +83 -0
  114. package/dist/cli/commands/reindex.js +45 -10
  115. package/dist/cli/commands/reindex.js.map +1 -1
  116. package/dist/cli/commands/restore.d.ts +40 -1
  117. package/dist/cli/commands/restore.js +27 -2
  118. package/dist/cli/commands/restore.js.map +1 -1
  119. package/dist/cli/commands/schema.d.ts +18 -0
  120. package/dist/cli/commands/schema.js +30 -3
  121. package/dist/cli/commands/schema.js.map +1 -1
  122. package/dist/cli/commands/search.d.ts +289 -1
  123. package/dist/cli/commands/search.js +367 -60
  124. package/dist/cli/commands/search.js.map +1 -1
  125. package/dist/cli/commands/stats.d.ts +38 -0
  126. package/dist/cli/commands/stats.js +38 -10
  127. package/dist/cli/commands/stats.js.map +1 -1
  128. package/dist/cli/commands/telemetry.js +5 -3
  129. package/dist/cli/commands/telemetry.js.map +1 -1
  130. package/dist/cli/commands/templates.d.ts +18 -0
  131. package/dist/cli/commands/templates.js +9 -2
  132. package/dist/cli/commands/templates.js.map +1 -1
  133. package/dist/cli/commands/test-all.d.ts +5 -0
  134. package/dist/cli/commands/test-all.js +9 -3
  135. package/dist/cli/commands/test-all.js.map +1 -1
  136. package/dist/cli/commands/test.d.ts +70 -1
  137. package/dist/cli/commands/test.js +84 -3
  138. package/dist/cli/commands/test.js.map +1 -1
  139. package/dist/cli/commands/update-many.d.ts +34 -1
  140. package/dist/cli/commands/update-many.js +60 -31
  141. package/dist/cli/commands/update-many.js.map +1 -1
  142. package/dist/cli/commands/update.d.ts +71 -0
  143. package/dist/cli/commands/update.js +74 -8
  144. package/dist/cli/commands/update.js.map +1 -1
  145. package/dist/cli/commands/upgrade.d.ts +28 -1
  146. package/dist/cli/commands/upgrade.js +17 -4
  147. package/dist/cli/commands/upgrade.js.map +1 -1
  148. package/dist/cli/commands/validate.d.ts +114 -0
  149. package/dist/cli/commands/validate.js +154 -9
  150. package/dist/cli/commands/validate.js.map +1 -1
  151. package/dist/cli/error-guidance.d.ts +30 -0
  152. package/dist/cli/error-guidance.js +68 -6
  153. package/dist/cli/error-guidance.js.map +1 -1
  154. package/dist/cli/extension-command-options.js +9 -7
  155. package/dist/cli/extension-command-options.js.map +1 -1
  156. package/dist/cli/help-content.d.ts +8 -0
  157. package/dist/cli/help-content.js +30 -6
  158. package/dist/cli/help-content.js.map +1 -1
  159. package/dist/cli/help-json-payload.d.ts +19 -1
  160. package/dist/cli/help-json-payload.js +16 -7
  161. package/dist/cli/help-json-payload.js.map +1 -1
  162. package/dist/cli/main.d.ts +223 -0
  163. package/dist/cli/main.js +214 -46
  164. package/dist/cli/main.js.map +1 -1
  165. package/dist/cli/register-list-query.js +62 -5
  166. package/dist/cli/register-list-query.js.map +1 -1
  167. package/dist/cli/register-mutation.d.ts +16 -0
  168. package/dist/cli/register-mutation.js +210 -40
  169. package/dist/cli/register-mutation.js.map +1 -1
  170. package/dist/cli/register-operations.d.ts +8 -0
  171. package/dist/cli/register-operations.js +33 -11
  172. package/dist/cli/register-operations.js.map +1 -1
  173. package/dist/cli/register-setup.js +9 -6
  174. package/dist/cli/register-setup.js.map +1 -1
  175. package/dist/cli/registration-helpers.d.ts +4 -0
  176. package/dist/cli/registration-helpers.js +124 -38
  177. package/dist/cli/registration-helpers.js.map +1 -1
  178. package/dist/cli-bundle/chunks/activity-5P2KQCTH.js +18 -0
  179. package/dist/cli-bundle/chunks/{activity-XADJOG6G.js → activity-MJGTX4LO.js} +13 -11
  180. package/dist/cli-bundle/chunks/{aggregate-OD36DJU5.js → aggregate-MH3GROKB.js} +54 -25
  181. package/dist/cli-bundle/chunks/aggregate-MH3GROKB.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{aggregate-6OTS3AOO.js → aggregate-OUGCDFNC.js} +55 -26
  183. package/dist/cli-bundle/chunks/aggregate-OUGCDFNC.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{append-JYWO4P7W.js → append-2Q4BPUBW.js} +10 -10
  185. package/dist/cli-bundle/chunks/{append-JYWO4P7W.js.map → append-2Q4BPUBW.js.map} +2 -2
  186. package/dist/cli-bundle/chunks/{append-KG55G7S3.js → append-VCRUG2W6.js} +11 -11
  187. package/dist/cli-bundle/chunks/append-VCRUG2W6.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{chunk-IGVJRZ6H.js → chunk-2IUJBMKS.js} +10 -9
  189. package/dist/cli-bundle/chunks/{chunk-IGVJRZ6H.js.map → chunk-2IUJBMKS.js.map} +2 -2
  190. package/dist/cli-bundle/chunks/{chunk-ATEES5SX.js → chunk-2JEGCDYT.js} +2 -2
  191. package/dist/cli-bundle/chunks/{chunk-XUC4C4PT.js → chunk-3WAULYOY.js} +3 -3
  192. package/dist/cli-bundle/chunks/{chunk-UIG4TW2H.js → chunk-3XOXWOGA.js} +359 -19
  193. package/dist/cli-bundle/chunks/chunk-3XOXWOGA.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{chunk-3KLPFWZ4.js → chunk-4KBK4BA3.js} +16 -34
  195. package/dist/cli-bundle/chunks/chunk-4KBK4BA3.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{chunk-OLKBSY4N.js → chunk-4VLB4JH2.js} +51 -8
  197. package/dist/cli-bundle/chunks/chunk-4VLB4JH2.js.map +7 -0
  198. package/dist/cli-bundle/chunks/{chunk-ZMW77VWV.js → chunk-656HPQPO.js} +27 -12
  199. package/dist/cli-bundle/chunks/chunk-656HPQPO.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{chunk-CW6E4NAT.js → chunk-667XI4UJ.js} +309 -20
  201. package/dist/cli-bundle/chunks/chunk-667XI4UJ.js.map +1 -0
  202. package/dist/cli-bundle/chunks/{chunk-5SCT2JCT.js → chunk-6BV7ENQL.js} +9 -8
  203. package/dist/cli-bundle/chunks/chunk-6BV7ENQL.js.map +7 -0
  204. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js +35 -0
  205. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js.map +7 -0
  206. package/dist/cli-bundle/chunks/{chunk-VFUZV5EB.js → chunk-6NQXMGYU.js} +19 -8
  207. package/dist/cli-bundle/chunks/chunk-6NQXMGYU.js.map +7 -0
  208. package/dist/cli-bundle/chunks/{chunk-GKIZW7SM.js → chunk-764O7EUA.js} +223 -50
  209. package/dist/cli-bundle/chunks/chunk-764O7EUA.js.map +7 -0
  210. package/dist/cli-bundle/chunks/{chunk-QJMGRZO2.js → chunk-7AGIXLNK.js} +3 -3
  211. package/dist/cli-bundle/chunks/chunk-7EILPFMA.js +404 -0
  212. package/dist/cli-bundle/chunks/chunk-7EILPFMA.js.map +7 -0
  213. package/dist/cli-bundle/chunks/{chunk-HI7STVF2.js → chunk-7K2MXFMX.js} +14 -32
  214. package/dist/cli-bundle/chunks/chunk-7K2MXFMX.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-TNAP7EJX.js → chunk-7L5VOUYP.js} +6 -17
  216. package/dist/cli-bundle/chunks/chunk-7L5VOUYP.js.map +7 -0
  217. package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js +61 -0
  218. package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{chunk-7IYFN5R7.js → chunk-A576QZDL.js} +223 -50
  220. package/dist/cli-bundle/chunks/chunk-A576QZDL.js.map +1 -0
  221. package/dist/cli-bundle/chunks/{chunk-KBPQHXWG.js → chunk-AERT7KT3.js} +5 -5
  222. package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js +58 -0
  223. package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-KWAXVAXX.js → chunk-B5Q7XC4K.js} +117 -37
  225. package/dist/cli-bundle/chunks/chunk-B5Q7XC4K.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-EWFY7SLA.js → chunk-BJWTFOZM.js} +74 -14
  227. package/dist/cli-bundle/chunks/chunk-BJWTFOZM.js.map +1 -0
  228. package/dist/cli-bundle/chunks/{chunk-XJDGS74Y.js → chunk-CBMETQ2U.js} +105 -31
  229. package/dist/cli-bundle/chunks/chunk-CBMETQ2U.js.map +1 -0
  230. package/dist/cli-bundle/chunks/{chunk-ESANVZF4.js → chunk-E6J2PEK6.js} +3 -3
  231. package/dist/cli-bundle/chunks/{chunk-VSRZRLG3.js → chunk-F2GC6L3N.js} +3 -3
  232. package/dist/cli-bundle/chunks/{chunk-I7NYDZDV.js → chunk-F7WSO5UX.js} +7 -18
  233. package/dist/cli-bundle/chunks/chunk-F7WSO5UX.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{chunk-VAOUX6TK.js → chunk-FTAZLAR7.js} +8 -5
  235. package/dist/cli-bundle/chunks/{chunk-VAOUX6TK.js.map → chunk-FTAZLAR7.js.map} +1 -1
  236. package/dist/cli-bundle/chunks/{chunk-OASDW5UI.js → chunk-FXNT5LPX.js} +77 -9
  237. package/dist/cli-bundle/chunks/chunk-FXNT5LPX.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{chunk-WUNFKP7M.js → chunk-G2YVUY7I.js} +14 -9
  239. package/dist/cli-bundle/chunks/chunk-G2YVUY7I.js.map +1 -0
  240. package/dist/cli-bundle/chunks/{chunk-L5EPZQIC.js → chunk-G3CEIXTV.js} +68 -19
  241. package/dist/cli-bundle/chunks/chunk-G3CEIXTV.js.map +7 -0
  242. package/dist/cli-bundle/chunks/{chunk-UUWGCWBU.js → chunk-GAVE4MYM.js} +37 -63
  243. package/dist/cli-bundle/chunks/chunk-GAVE4MYM.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{chunk-SXKNJPQ7.js → chunk-GQ4JKNMV.js} +4 -4
  245. package/dist/cli-bundle/chunks/{chunk-SXKNJPQ7.js.map → chunk-GQ4JKNMV.js.map} +1 -1
  246. package/dist/cli-bundle/chunks/{chunk-73ZPG2I3.js → chunk-GYMG7AG6.js} +36 -62
  247. package/dist/cli-bundle/chunks/chunk-GYMG7AG6.js.map +7 -0
  248. package/dist/cli-bundle/chunks/{chunk-35P4GT6E.js → chunk-H6EH6ENJ.js} +362 -22
  249. package/dist/cli-bundle/chunks/chunk-H6EH6ENJ.js.map +7 -0
  250. package/dist/cli-bundle/chunks/{chunk-F75JSIOZ.js → chunk-HDIDUME4.js} +45 -13
  251. package/dist/cli-bundle/chunks/chunk-HDIDUME4.js.map +1 -0
  252. package/dist/cli-bundle/chunks/{chunk-XWMF3POR.js → chunk-HPELHUTG.js} +122 -45
  253. package/dist/cli-bundle/chunks/chunk-HPELHUTG.js.map +1 -0
  254. package/dist/cli-bundle/chunks/{chunk-QKW5D45B.js → chunk-II7OGE3V.js} +20 -9
  255. package/dist/cli-bundle/chunks/chunk-II7OGE3V.js.map +1 -0
  256. package/dist/cli-bundle/chunks/{chunk-4HFU4UO2.js → chunk-ILHLIA47.js} +5 -5
  257. package/dist/cli-bundle/chunks/{chunk-4HFU4UO2.js.map → chunk-ILHLIA47.js.map} +1 -1
  258. package/dist/cli-bundle/chunks/{chunk-P5BJOMBB.js → chunk-IMQG4VR3.js} +118 -74
  259. package/dist/cli-bundle/chunks/chunk-IMQG4VR3.js.map +1 -0
  260. package/dist/cli-bundle/chunks/{chunk-AX4GEVQC.js → chunk-IQVB3YDD.js} +88 -22
  261. package/dist/cli-bundle/chunks/chunk-IQVB3YDD.js.map +7 -0
  262. package/dist/cli-bundle/chunks/{chunk-I53JBTJW.js → chunk-KQ3LAMDO.js} +45 -13
  263. package/dist/cli-bundle/chunks/chunk-KQ3LAMDO.js.map +7 -0
  264. package/dist/cli-bundle/chunks/{chunk-A6LXQFO7.js → chunk-KTVETP66.js} +334 -253
  265. package/dist/cli-bundle/chunks/chunk-KTVETP66.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{chunk-DY6C42S6.js → chunk-KZYVTOG5.js} +26 -11
  267. package/dist/cli-bundle/chunks/chunk-KZYVTOG5.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{chunk-HGLC63AU.js → chunk-L6FJPOT4.js} +11 -10
  269. package/dist/cli-bundle/chunks/{chunk-HGLC63AU.js.map → chunk-L6FJPOT4.js.map} +1 -1
  270. package/dist/cli-bundle/chunks/{chunk-FY4SPXSC.js → chunk-LV5FFQ7M.js} +354 -266
  271. package/dist/cli-bundle/chunks/chunk-LV5FFQ7M.js.map +7 -0
  272. package/dist/cli-bundle/chunks/{chunk-PNYAAB4S.js → chunk-LWGMDLQ6.js} +8 -3
  273. package/dist/cli-bundle/chunks/chunk-LWGMDLQ6.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{chunk-XTKJSVWH.js → chunk-M23HXJL3.js} +2 -2
  275. package/dist/cli-bundle/chunks/{chunk-S26FESD4.js → chunk-MJZUZ2QE.js} +3 -3
  276. package/dist/cli-bundle/chunks/{chunk-I2IJY2NL.js → chunk-NCIBNERT.js} +4 -4
  277. package/dist/cli-bundle/chunks/{chunk-I2IJY2NL.js.map → chunk-NCIBNERT.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{chunk-TK5VZFHY.js → chunk-NIQHNDBZ.js} +76 -8
  279. package/dist/cli-bundle/chunks/chunk-NIQHNDBZ.js.map +7 -0
  280. package/dist/cli-bundle/chunks/{chunk-C6SAP27O.js → chunk-O46LTCXQ.js} +4 -4
  281. package/dist/cli-bundle/chunks/{chunk-YW6Q3RYZ.js → chunk-OCTQJP42.js} +19 -8
  282. package/dist/cli-bundle/chunks/{chunk-YW6Q3RYZ.js.map → chunk-OCTQJP42.js.map} +2 -2
  283. package/dist/cli-bundle/chunks/{chunk-WPDMBIX6.js → chunk-OLTYNVJR.js} +5 -5
  284. package/dist/cli-bundle/chunks/{chunk-IUKD4W6Z.js → chunk-OY3P2I6B.js} +13 -8
  285. package/dist/cli-bundle/chunks/chunk-OY3P2I6B.js.map +7 -0
  286. package/dist/cli-bundle/chunks/{chunk-SO55HRA5.js → chunk-PZD7WPUC.js} +69 -20
  287. package/dist/cli-bundle/chunks/chunk-PZD7WPUC.js.map +1 -0
  288. package/dist/cli-bundle/chunks/{chunk-HHHJ2GI3.js → chunk-Q5RLUCP3.js} +74 -14
  289. package/dist/cli-bundle/chunks/chunk-Q5RLUCP3.js.map +7 -0
  290. package/dist/cli-bundle/chunks/{chunk-S2ZLDYGS.js → chunk-RKKIH2ZQ.js} +116 -36
  291. package/dist/cli-bundle/chunks/chunk-RKKIH2ZQ.js.map +1 -0
  292. package/dist/cli-bundle/chunks/{chunk-GWZSYR6X.js → chunk-SPYPC5CB.js} +3 -3
  293. package/dist/cli-bundle/chunks/{chunk-GWZSYR6X.js.map → chunk-SPYPC5CB.js.map} +1 -1
  294. package/dist/cli-bundle/chunks/{chunk-7AMK6DOW.js → chunk-SY4GKIWT.js} +88 -22
  295. package/dist/cli-bundle/chunks/chunk-SY4GKIWT.js.map +1 -0
  296. package/dist/cli-bundle/chunks/{chunk-ZLMIWZUG.js → chunk-SY4PZWIZ.js} +7 -4
  297. package/dist/cli-bundle/chunks/{chunk-ZLMIWZUG.js.map → chunk-SY4PZWIZ.js.map} +2 -2
  298. package/dist/cli-bundle/chunks/{chunk-R2OUQVBK.js → chunk-T5VU7ROQ.js} +4 -4
  299. package/dist/cli-bundle/chunks/{chunk-37CYVF73.js → chunk-TIRZIQRP.js} +121 -44
  300. package/dist/cli-bundle/chunks/chunk-TIRZIQRP.js.map +7 -0
  301. package/dist/cli-bundle/chunks/{chunk-7UGSRQCL.js → chunk-TUB3DZAZ.js} +107 -33
  302. package/dist/cli-bundle/chunks/chunk-TUB3DZAZ.js.map +7 -0
  303. package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js +394 -0
  304. package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js.map +1 -0
  305. package/dist/cli-bundle/chunks/{chunk-P5U5EOMA.js → chunk-UBMCSJXX.js} +3 -3
  306. package/dist/cli-bundle/chunks/{chunk-ZYNJNPYD.js → chunk-UUKORJSN.js} +4 -4
  307. package/dist/cli-bundle/chunks/{chunk-R4VWYWRN.js → chunk-W3HFLORZ.js} +7 -2
  308. package/dist/cli-bundle/chunks/chunk-W3HFLORZ.js.map +7 -0
  309. package/dist/cli-bundle/chunks/{chunk-VPEAS7PS.js → chunk-WZCQVABQ.js} +2 -2
  310. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js +32 -0
  311. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js.map +1 -0
  312. package/dist/cli-bundle/chunks/{chunk-4YFAGDRH.js → chunk-XLNNCKTN.js} +322 -19
  313. package/dist/cli-bundle/chunks/chunk-XLNNCKTN.js.map +7 -0
  314. package/dist/cli-bundle/chunks/{chunk-RXAP6JL5.js → chunk-XNOY7TCB.js} +118 -74
  315. package/dist/cli-bundle/chunks/chunk-XNOY7TCB.js.map +7 -0
  316. package/dist/cli-bundle/chunks/{chunk-Y3YKK7CY.js → chunk-YGRPBFMA.js} +2 -2
  317. package/dist/cli-bundle/chunks/{chunk-QNJSITCX.js → chunk-YXTLI4XP.js} +20 -9
  318. package/dist/cli-bundle/chunks/chunk-YXTLI4XP.js.map +1 -0
  319. package/dist/cli-bundle/chunks/{chunk-FDH2X65L.js → chunk-Z3MUNQRV.js} +52 -9
  320. package/dist/cli-bundle/chunks/chunk-Z3MUNQRV.js.map +1 -0
  321. package/dist/cli-bundle/chunks/{chunk-XMBI6TNW.js → chunk-ZJRDVYZI.js} +4 -4
  322. package/dist/cli-bundle/chunks/{chunk-CCX4RSYZ.js → chunk-ZONXMSVB.js} +10 -9
  323. package/dist/cli-bundle/chunks/chunk-ZONXMSVB.js.map +1 -0
  324. package/dist/cli-bundle/chunks/{claim-2RDYMCTP.js → claim-4APLUXJW.js} +10 -10
  325. package/dist/cli-bundle/chunks/{claim-MJ7DZFC3.js → claim-NEO7AGWH.js} +10 -10
  326. package/dist/cli-bundle/chunks/{close-XLEKIQSW.js → close-3QABBNGU.js} +8 -8
  327. package/dist/cli-bundle/chunks/close-ILMZR3D7.js +13 -0
  328. package/dist/cli-bundle/chunks/{close-many-AOD4HSAZ.js → close-many-MIZLTYGL.js} +32 -20
  329. package/dist/cli-bundle/chunks/close-many-MIZLTYGL.js.map +1 -0
  330. package/dist/cli-bundle/chunks/{close-many-XKAQY5CQ.js → close-many-Q7Y5AHQI.js} +31 -19
  331. package/dist/cli-bundle/chunks/close-many-Q7Y5AHQI.js.map +7 -0
  332. package/dist/cli-bundle/chunks/{comments-RN5TG4ZN.js → comments-DAIQPOMU.js} +55 -31
  333. package/dist/cli-bundle/chunks/comments-DAIQPOMU.js.map +1 -0
  334. package/dist/cli-bundle/chunks/{comments-B4RWWDJT.js → comments-IWFSVM4P.js} +54 -30
  335. package/dist/cli-bundle/chunks/comments-IWFSVM4P.js.map +7 -0
  336. package/dist/cli-bundle/chunks/{config-3JXJ3XZ7.js → config-IOJELD6O.js} +45 -19
  337. package/dist/cli-bundle/chunks/config-IOJELD6O.js.map +1 -0
  338. package/dist/cli-bundle/chunks/{config-FZ4UDC4B.js → config-PXTMAYV3.js} +44 -18
  339. package/dist/cli-bundle/chunks/config-PXTMAYV3.js.map +7 -0
  340. package/dist/cli-bundle/chunks/{context-QBPO3BFM.js → context-QHJSCJW4.js} +128 -39
  341. package/dist/cli-bundle/chunks/context-QHJSCJW4.js.map +1 -0
  342. package/dist/cli-bundle/chunks/{context-L36PIN35.js → context-XZS2VFKU.js} +127 -38
  343. package/dist/cli-bundle/chunks/context-XZS2VFKU.js.map +7 -0
  344. package/dist/cli-bundle/chunks/{contracts-2G66IGIA.js → contracts-B7U4OJTV.js} +54 -10
  345. package/dist/cli-bundle/chunks/contracts-B7U4OJTV.js.map +1 -0
  346. package/dist/cli-bundle/chunks/{contracts-PJCHYSO5.js → contracts-NSBVLXQ3.js} +54 -10
  347. package/dist/cli-bundle/chunks/contracts-NSBVLXQ3.js.map +7 -0
  348. package/dist/cli-bundle/chunks/{copy-FWIVTLBO.js → copy-Q64T5FD4.js} +7 -7
  349. package/dist/cli-bundle/chunks/{copy-ALU5WMHA.js → copy-SG34LCMU.js} +7 -7
  350. package/dist/cli-bundle/chunks/create-F5HZX2S4.js +30 -0
  351. package/dist/cli-bundle/chunks/{create-5433DP3G.js → create-IPAX2SNL.js} +16 -13
  352. package/dist/cli-bundle/chunks/{delete-Y2SGJBGY.js → delete-TLXR7LJ2.js} +7 -7
  353. package/dist/cli-bundle/chunks/{delete-IYTIYAJS.js → delete-VH3L7DZ6.js} +7 -7
  354. package/dist/cli-bundle/chunks/{deps-CZ4PTVXU.js → deps-J3HBBLDB.js} +9 -10
  355. package/dist/cli-bundle/chunks/{deps-CZ4PTVXU.js.map → deps-J3HBBLDB.js.map} +2 -2
  356. package/dist/cli-bundle/chunks/{deps-6TSPOSGU.js → deps-XV6JJ6IN.js} +10 -11
  357. package/dist/cli-bundle/chunks/deps-XV6JJ6IN.js.map +1 -0
  358. package/dist/cli-bundle/chunks/{docs-MXLGZUIT.js → docs-GWDEB7JH.js} +9 -9
  359. package/dist/cli-bundle/chunks/{docs-I3BAF5WH.js → docs-RCLNSKID.js} +9 -9
  360. package/dist/cli-bundle/chunks/{extension-Q34OEWO5.js → extension-5RN65LHT.js} +7 -5
  361. package/dist/cli-bundle/chunks/{extension-WH2FOIOZ.js → extension-7KO2NX2A.js} +7 -5
  362. package/dist/cli-bundle/chunks/{files-GUXUM2MB.js → files-3TCQHUHA.js} +25 -11
  363. package/dist/cli-bundle/chunks/files-3TCQHUHA.js.map +1 -0
  364. package/dist/cli-bundle/chunks/{files-FYP3MDPX.js → files-5FDUPSEA.js} +24 -10
  365. package/dist/cli-bundle/chunks/files-5FDUPSEA.js.map +7 -0
  366. package/dist/cli-bundle/chunks/focus-7AQMNRSU.js +109 -0
  367. package/dist/cli-bundle/chunks/focus-7AQMNRSU.js.map +7 -0
  368. package/dist/cli-bundle/chunks/focus-HQXBYPKM.js +106 -0
  369. package/dist/cli-bundle/chunks/focus-HQXBYPKM.js.map +1 -0
  370. package/dist/cli-bundle/chunks/{gc-KGQG66SA.js → gc-2FGKYRJ4.js} +3 -3
  371. package/dist/cli-bundle/chunks/{gc-FENB2ESG.js → gc-5B6ABL3Z.js} +3 -3
  372. package/dist/cli-bundle/chunks/{get-PCHS7RA6.js → get-FUMVOJQD.js} +43 -16
  373. package/dist/cli-bundle/chunks/get-FUMVOJQD.js.map +1 -0
  374. package/dist/cli-bundle/chunks/{get-QARTE6BL.js → get-H5BZTW4A.js} +42 -15
  375. package/dist/cli-bundle/chunks/get-H5BZTW4A.js.map +7 -0
  376. package/dist/cli-bundle/chunks/{health-E4D7KGHD.js → health-JSVOR6B4.js} +75 -49
  377. package/dist/cli-bundle/chunks/health-JSVOR6B4.js.map +1 -0
  378. package/dist/cli-bundle/chunks/{health-7MTXAVR2.js → health-LE2ZQGSM.js} +74 -48
  379. package/dist/cli-bundle/chunks/health-LE2ZQGSM.js.map +7 -0
  380. package/dist/cli-bundle/chunks/{history-7WUAEWHW.js → history-QO4JVJJP.js} +10 -10
  381. package/dist/cli-bundle/chunks/history-SSXGGTVZ.js +20 -0
  382. package/dist/cli-bundle/chunks/{history-compact-LW27IPFK.js → history-compact-ID74DOUI.js} +37 -46
  383. package/dist/cli-bundle/chunks/history-compact-ID74DOUI.js.map +7 -0
  384. package/dist/cli-bundle/chunks/{history-compact-3EJ3L2O7.js → history-compact-SDFRPZ4V.js} +38 -47
  385. package/dist/cli-bundle/chunks/history-compact-SDFRPZ4V.js.map +1 -0
  386. package/dist/cli-bundle/chunks/history-redact-VBH44Y7F.js +21 -0
  387. package/dist/cli-bundle/chunks/{history-redact-G72A4EJ4.js → history-redact-Z4P5MM3G.js} +13 -11
  388. package/dist/cli-bundle/chunks/{history-repair-OSQOKJ3E.js → history-repair-ANHEYWKF.js} +43 -48
  389. package/dist/cli-bundle/chunks/history-repair-ANHEYWKF.js.map +7 -0
  390. package/dist/cli-bundle/chunks/{history-repair-SBK7P34V.js → history-repair-CKE7GLZR.js} +44 -49
  391. package/dist/cli-bundle/chunks/history-repair-CKE7GLZR.js.map +1 -0
  392. package/dist/cli-bundle/chunks/init-7FBQO77A.js +19 -0
  393. package/dist/cli-bundle/chunks/{init-S5WEGUJY.js → init-K6MSMB37.js} +11 -9
  394. package/dist/cli-bundle/chunks/{learnings-XK3P4ZDR.js → learnings-VIS3NOQV.js} +13 -12
  395. package/dist/cli-bundle/chunks/learnings-VIS3NOQV.js.map +7 -0
  396. package/dist/cli-bundle/chunks/{learnings-HQXSSKZ5.js → learnings-YYNB64GN.js} +14 -13
  397. package/dist/cli-bundle/chunks/learnings-YYNB64GN.js.map +1 -0
  398. package/dist/cli-bundle/chunks/list-7UE44A2R.js +29 -0
  399. package/dist/cli-bundle/chunks/list-UHMA3N2K.js +33 -0
  400. package/dist/cli-bundle/chunks/{notes-5T6P7C5V.js → notes-2HRMV67I.js} +14 -13
  401. package/dist/cli-bundle/chunks/notes-2HRMV67I.js.map +1 -0
  402. package/dist/cli-bundle/chunks/{notes-U5FZCSBT.js → notes-IN3UMA7W.js} +13 -12
  403. package/dist/cli-bundle/chunks/notes-IN3UMA7W.js.map +7 -0
  404. package/dist/cli-bundle/chunks/{plan-2YTQYWGM.js → plan-I3SVH7FV.js} +16 -15
  405. package/dist/cli-bundle/chunks/plan-I3SVH7FV.js.map +1 -0
  406. package/dist/cli-bundle/chunks/{plan-7IVSICR6.js → plan-PAWCCAPW.js} +15 -14
  407. package/dist/cli-bundle/chunks/plan-PAWCCAPW.js.map +7 -0
  408. package/dist/cli-bundle/chunks/{register-list-query-4UPMHONX.js → register-list-query-N7Z7RTDM.js} +31 -22
  409. package/dist/cli-bundle/chunks/register-list-query-N7Z7RTDM.js.map +7 -0
  410. package/dist/cli-bundle/chunks/{register-list-query-7VOW2C3W.js → register-list-query-OTIK4DVA.js} +32 -23
  411. package/dist/cli-bundle/chunks/register-list-query-OTIK4DVA.js.map +1 -0
  412. package/dist/cli-bundle/chunks/{register-mutation-FARSGYRD.js → register-mutation-UFZK6Q57.js} +216 -66
  413. package/dist/cli-bundle/chunks/register-mutation-UFZK6Q57.js.map +7 -0
  414. package/dist/cli-bundle/chunks/{register-mutation-LJDNVREU.js → register-mutation-XFORLS6D.js} +210 -67
  415. package/dist/cli-bundle/chunks/register-mutation-XFORLS6D.js.map +1 -0
  416. package/dist/cli-bundle/chunks/{register-operations-HCJKDUA6.js → register-operations-6ZCLKRBG.js} +53 -39
  417. package/dist/cli-bundle/chunks/register-operations-6ZCLKRBG.js.map +7 -0
  418. package/dist/cli-bundle/chunks/{register-operations-FFTYAL42.js → register-operations-ITE7JTH3.js} +54 -40
  419. package/dist/cli-bundle/chunks/register-operations-ITE7JTH3.js.map +1 -0
  420. package/dist/cli-bundle/chunks/{register-setup-6AVIUOCC.js → register-setup-7RKGE4BQ.js} +18 -21
  421. package/dist/cli-bundle/chunks/register-setup-7RKGE4BQ.js.map +1 -0
  422. package/dist/cli-bundle/chunks/{register-setup-KVNLO5OJ.js → register-setup-7UKEFKT6.js} +17 -20
  423. package/dist/cli-bundle/chunks/register-setup-7UKEFKT6.js.map +7 -0
  424. package/dist/cli-bundle/chunks/{restore-M6AFHMV4.js → restore-NNVPBBVJ.js} +13 -11
  425. package/dist/cli-bundle/chunks/restore-XXXLQ2XC.js +19 -0
  426. package/dist/cli-bundle/chunks/{schema-AINZ2IMM.js → schema-3HCLXCFX.js} +27 -9
  427. package/dist/cli-bundle/chunks/schema-3HCLXCFX.js.map +7 -0
  428. package/dist/cli-bundle/chunks/{schema-76HDZJCC.js → schema-3YKCQ3VO.js} +28 -10
  429. package/dist/cli-bundle/chunks/schema-3YKCQ3VO.js.map +1 -0
  430. package/dist/cli-bundle/chunks/{search-JMLFQEPJ.js → search-NQ42NC6A.js} +328 -71
  431. package/dist/cli-bundle/chunks/search-NQ42NC6A.js.map +7 -0
  432. package/dist/cli-bundle/chunks/{search-NL3TSCYB.js → search-V7PZ2ICH.js} +328 -71
  433. package/dist/cli-bundle/chunks/search-V7PZ2ICH.js.map +1 -0
  434. package/dist/cli-bundle/chunks/{stats-BKXCBIGT.js → stats-7KD4PJC5.js} +41 -16
  435. package/dist/cli-bundle/chunks/stats-7KD4PJC5.js.map +7 -0
  436. package/dist/cli-bundle/chunks/{stats-UBD56TGK.js → stats-GRHO6RFB.js} +42 -17
  437. package/dist/cli-bundle/chunks/stats-GRHO6RFB.js.map +1 -0
  438. package/dist/cli-bundle/chunks/{telemetry-ZJXK3H7X.js → telemetry-H5GLXNG5.js} +6 -6
  439. package/dist/cli-bundle/chunks/telemetry-H5GLXNG5.js.map +7 -0
  440. package/dist/cli-bundle/chunks/{telemetry-N454RHG5.js → telemetry-TRRYZXWT.js} +7 -7
  441. package/dist/cli-bundle/chunks/telemetry-TRRYZXWT.js.map +1 -0
  442. package/dist/cli-bundle/chunks/test-6CZNIIGA.js +34 -0
  443. package/dist/cli-bundle/chunks/{test-BQAKIXAT.js → test-7GVQ3VMN.js} +16 -14
  444. package/dist/cli-bundle/chunks/{test-all-7LV3I6S5.js → test-all-3LF2OZD2.js} +23 -16
  445. package/dist/cli-bundle/chunks/test-all-3LF2OZD2.js.map +7 -0
  446. package/dist/cli-bundle/chunks/{test-all-TDYCCBA4.js → test-all-ODVADHV6.js} +24 -17
  447. package/dist/cli-bundle/chunks/test-all-ODVADHV6.js.map +1 -0
  448. package/dist/cli-bundle/chunks/{test-runs-E64M6XS3.js → test-runs-LYT6ZTNQ.js} +62 -65
  449. package/dist/cli-bundle/chunks/test-runs-LYT6ZTNQ.js.map +1 -0
  450. package/dist/cli-bundle/chunks/{test-runs-LXZLULCI.js → test-runs-RVP6VWN7.js} +61 -64
  451. package/dist/cli-bundle/chunks/test-runs-RVP6VWN7.js.map +7 -0
  452. package/dist/cli-bundle/chunks/update-MPGM6SBE.js +28 -0
  453. package/dist/cli-bundle/chunks/update-UN75XW3C.js +24 -0
  454. package/dist/cli-bundle/chunks/{update-many-F4IKDWZB.js → update-many-FCU6RKTO.js} +80 -34
  455. package/dist/cli-bundle/chunks/update-many-FCU6RKTO.js.map +1 -0
  456. package/dist/cli-bundle/chunks/{update-many-NTWZ5YT3.js → update-many-XSEQJ24X.js} +79 -33
  457. package/dist/cli-bundle/chunks/update-many-XSEQJ24X.js.map +7 -0
  458. package/dist/cli-bundle/chunks/{upgrade-37F7JKES.js → upgrade-A6TL3INC.js} +22 -8
  459. package/dist/cli-bundle/chunks/upgrade-A6TL3INC.js.map +7 -0
  460. package/dist/cli-bundle/chunks/{upgrade-L32JA4TZ.js → upgrade-FOB5LHO5.js} +23 -9
  461. package/dist/cli-bundle/chunks/upgrade-FOB5LHO5.js.map +1 -0
  462. package/dist/cli-bundle/chunks/{validate-46KCRHL7.js → validate-7BLDG3AT.js} +222 -31
  463. package/dist/cli-bundle/chunks/validate-7BLDG3AT.js.map +1 -0
  464. package/dist/cli-bundle/chunks/{validate-CRFMPTYD.js → validate-EHL3MI2V.js} +236 -31
  465. package/dist/cli-bundle/chunks/validate-EHL3MI2V.js.map +7 -0
  466. package/dist/cli-bundle/main.js +305 -140
  467. package/dist/cli-bundle/main.js.map +3 -3
  468. package/dist/cli.d.ts +10 -0
  469. package/dist/cli.js +21 -8
  470. package/dist/cli.js.map +1 -1
  471. package/dist/core/diagnostics/remediation.js +7 -2
  472. package/dist/core/diagnostics/remediation.js.map +1 -1
  473. package/dist/core/extensions/extension-capability-aliases.js +7 -33
  474. package/dist/core/extensions/extension-capability-aliases.js.map +1 -1
  475. package/dist/core/extensions/extension-policy.js +14 -15
  476. package/dist/core/extensions/extension-policy.js.map +1 -1
  477. package/dist/core/extensions/item-fields.js +4 -5
  478. package/dist/core/extensions/item-fields.js.map +1 -1
  479. package/dist/core/extensions/loader.d.ts +75 -1
  480. package/dist/core/extensions/loader.js +56 -32
  481. package/dist/core/extensions/loader.js.map +1 -1
  482. package/dist/core/governance/content-fields.d.ts +84 -0
  483. package/dist/core/governance/content-fields.js +182 -0
  484. package/dist/core/governance/content-fields.js.map +1 -0
  485. package/dist/core/governance/issue-codes.d.ts +51 -0
  486. package/dist/core/governance/issue-codes.js +95 -0
  487. package/dist/core/governance/issue-codes.js.map +1 -0
  488. package/dist/core/governance/metadata-coverage.d.ts +168 -0
  489. package/dist/core/governance/metadata-coverage.js +362 -0
  490. package/dist/core/governance/metadata-coverage.js.map +1 -0
  491. package/dist/core/history/history-rewrite.d.ts +22 -0
  492. package/dist/core/history/history-rewrite.js +38 -2
  493. package/dist/core/history/history-rewrite.js.map +1 -1
  494. package/dist/core/history/history.d.ts +7 -0
  495. package/dist/core/history/history.js +6 -2
  496. package/dist/core/history/history.js.map +1 -1
  497. package/dist/core/io/body-file.d.ts +14 -0
  498. package/dist/core/io/body-file.js +47 -0
  499. package/dist/core/io/body-file.js.map +1 -0
  500. package/dist/core/item/item-format.d.ts +46 -1
  501. package/dist/core/item/item-format.js +51 -60
  502. package/dist/core/item/item-format.js.map +1 -1
  503. package/dist/core/item/parse.d.ts +9 -0
  504. package/dist/core/item/parse.js +10 -16
  505. package/dist/core/item/parse.js.map +1 -1
  506. package/dist/core/item/type-registry.d.ts +1 -0
  507. package/dist/core/item/type-registry.js +8 -10
  508. package/dist/core/item/type-registry.js.map +1 -1
  509. package/dist/core/lock/lock.d.ts +26 -0
  510. package/dist/core/lock/lock.js +10 -2
  511. package/dist/core/lock/lock.js.map +1 -1
  512. package/dist/core/output/output.d.ts +7 -0
  513. package/dist/core/output/output.js +6 -2
  514. package/dist/core/output/output.js.map +1 -1
  515. package/dist/core/schema/item-types-file.d.ts +25 -2
  516. package/dist/core/schema/item-types-file.js +78 -6
  517. package/dist/core/schema/item-types-file.js.map +1 -1
  518. package/dist/core/schema/runtime-schema.d.ts +7 -0
  519. package/dist/core/schema/runtime-schema.js +23 -16
  520. package/dist/core/schema/runtime-schema.js.map +1 -1
  521. package/dist/core/search/background-refresh.js +3 -3
  522. package/dist/core/search/background-refresh.js.map +1 -1
  523. package/dist/core/search/cache.d.ts +19 -1
  524. package/dist/core/search/cache.js +11 -3
  525. package/dist/core/search/cache.js.map +1 -1
  526. package/dist/core/search/corpus.d.ts +36 -2
  527. package/dist/core/search/corpus.js +120 -24
  528. package/dist/core/search/corpus.js.map +1 -1
  529. package/dist/core/search/providers.d.ts +19 -0
  530. package/dist/core/search/providers.js +19 -2
  531. package/dist/core/search/providers.js.map +1 -1
  532. package/dist/core/sentry/instrument.d.ts +1 -0
  533. package/dist/core/sentry/instrument.js +6 -2
  534. package/dist/core/sentry/instrument.js.map +1 -1
  535. package/dist/core/session/session-state.d.ts +16 -0
  536. package/dist/core/session/session-state.js +48 -0
  537. package/dist/core/session/session-state.js.map +1 -0
  538. package/dist/core/shared/constants.d.ts +8 -0
  539. package/dist/core/shared/constants.js +11 -2
  540. package/dist/core/shared/constants.js.map +1 -1
  541. package/dist/core/shared/errors.d.ts +3 -0
  542. package/dist/core/shared/errors.js +2 -2
  543. package/dist/core/shared/errors.js.map +1 -1
  544. package/dist/core/shared/text-normalization.js +4 -3
  545. package/dist/core/shared/text-normalization.js.map +1 -1
  546. package/dist/core/shared/time.d.ts +13 -0
  547. package/dist/core/shared/time.js +19 -7
  548. package/dist/core/shared/time.js.map +1 -1
  549. package/dist/core/store/item-store.d.ts +11 -0
  550. package/dist/core/store/item-store.js +16 -23
  551. package/dist/core/store/item-store.js.map +1 -1
  552. package/dist/core/store/settings-validator.d.ts +2 -0
  553. package/dist/core/store/settings-validator.js +25 -2
  554. package/dist/core/store/settings-validator.js.map +1 -1
  555. package/dist/core/store/settings.d.ts +60 -1
  556. package/dist/core/store/settings.js +100 -46
  557. package/dist/core/store/settings.js.map +1 -1
  558. package/dist/core/telemetry/observability.js +10 -8
  559. package/dist/core/telemetry/observability.js.map +1 -1
  560. package/dist/core/telemetry/runtime.d.ts +272 -1
  561. package/dist/core/telemetry/runtime.js +358 -37
  562. package/dist/core/telemetry/runtime.js.map +1 -1
  563. package/dist/core/test/background-runs.d.ts +35 -0
  564. package/dist/core/test/background-runs.js +72 -61
  565. package/dist/core/test/background-runs.js.map +1 -1
  566. package/dist/core/test/run-selectors.js +5 -4
  567. package/dist/core/test/run-selectors.js.map +1 -1
  568. package/dist/core/validate/estimate-defaults.d.ts +39 -0
  569. package/dist/core/validate/estimate-defaults.js +117 -0
  570. package/dist/core/validate/estimate-defaults.js.map +1 -0
  571. package/dist/core/validate/fix-planning.d.ts +21 -3
  572. package/dist/core/validate/fix-planning.js +31 -4
  573. package/dist/core/validate/fix-planning.js.map +1 -1
  574. package/dist/core/validate/missing-link-owners.d.ts +64 -0
  575. package/dist/core/validate/missing-link-owners.js +98 -0
  576. package/dist/core/validate/missing-link-owners.js.map +1 -0
  577. package/dist/mcp/server.d.ts +62 -0
  578. package/dist/mcp/server.js +71 -8
  579. package/dist/mcp/server.js.map +1 -1
  580. package/dist/mcp/tool-definitions.js +17 -4
  581. package/dist/mcp/tool-definitions.js.map +1 -1
  582. package/dist/sdk/cli-contracts/commander-types.js +13 -2
  583. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  584. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  585. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  586. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  587. package/dist/sdk/cli-contracts/tool-option-contracts.js +110 -2
  588. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  589. package/dist/sdk/cli-contracts/tool-parameter-tables.js +83 -8
  590. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  591. package/dist/sdk/cli-contracts.d.ts +28 -0
  592. package/dist/sdk/cli-contracts.js +164 -11
  593. package/dist/sdk/cli-contracts.js.map +1 -1
  594. package/dist/types.d.ts +17 -1
  595. package/dist/types.js +3 -3
  596. package/dist/types.js.map +1 -1
  597. package/docs/AGENT_GUIDE.md +15 -3
  598. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  599. package/docs/COMMANDS.md +136 -7
  600. package/docs/CONFIGURATION.md +52 -0
  601. package/docs/TESTING.md +6 -4
  602. package/package.json +6 -4
  603. package/packages/pm-calendar/extensions/calendar/runtime.js +6 -0
  604. package/packages/pm-calendar/extensions/calendar/runtime.ts +12 -0
  605. package/packages/pm-todos/extensions/todos/runtime.ts +5 -0
  606. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  607. package/plugins/pm-claude/README.md +6 -14
  608. package/plugins/pm-claude/commands/pm-init.md +1 -1
  609. package/plugins/pm-codex/README.md +1 -1
  610. package/scripts/bundle-cli.mjs +46 -37
  611. package/scripts/finalize-build.mjs +20 -9
  612. package/scripts/prepare-build-cache.mjs +27 -16
  613. package/dist/cli-bundle/chunks/activity-XZIUPGZH.js +0 -16
  614. package/dist/cli-bundle/chunks/aggregate-6OTS3AOO.js.map +0 -1
  615. package/dist/cli-bundle/chunks/aggregate-OD36DJU5.js.map +0 -7
  616. package/dist/cli-bundle/chunks/append-KG55G7S3.js.map +0 -1
  617. package/dist/cli-bundle/chunks/chunk-35P4GT6E.js.map +0 -7
  618. package/dist/cli-bundle/chunks/chunk-37CYVF73.js.map +0 -7
  619. package/dist/cli-bundle/chunks/chunk-3KLPFWZ4.js.map +0 -7
  620. package/dist/cli-bundle/chunks/chunk-4JCSYR6F.js +0 -138
  621. package/dist/cli-bundle/chunks/chunk-4JCSYR6F.js.map +0 -7
  622. package/dist/cli-bundle/chunks/chunk-4YFAGDRH.js.map +0 -7
  623. package/dist/cli-bundle/chunks/chunk-5SCT2JCT.js.map +0 -7
  624. package/dist/cli-bundle/chunks/chunk-73ZPG2I3.js.map +0 -7
  625. package/dist/cli-bundle/chunks/chunk-7AMK6DOW.js.map +0 -1
  626. package/dist/cli-bundle/chunks/chunk-7IYFN5R7.js.map +0 -1
  627. package/dist/cli-bundle/chunks/chunk-7UGSRQCL.js.map +0 -7
  628. package/dist/cli-bundle/chunks/chunk-A6LXQFO7.js.map +0 -1
  629. package/dist/cli-bundle/chunks/chunk-AVGHVVF7.js +0 -128
  630. package/dist/cli-bundle/chunks/chunk-AVGHVVF7.js.map +0 -1
  631. package/dist/cli-bundle/chunks/chunk-AX4GEVQC.js.map +0 -7
  632. package/dist/cli-bundle/chunks/chunk-CCX4RSYZ.js.map +0 -1
  633. package/dist/cli-bundle/chunks/chunk-CW6E4NAT.js.map +0 -1
  634. package/dist/cli-bundle/chunks/chunk-DY6C42S6.js.map +0 -7
  635. package/dist/cli-bundle/chunks/chunk-EWFY7SLA.js.map +0 -1
  636. package/dist/cli-bundle/chunks/chunk-F75JSIOZ.js.map +0 -1
  637. package/dist/cli-bundle/chunks/chunk-FDH2X65L.js.map +0 -1
  638. package/dist/cli-bundle/chunks/chunk-FY4SPXSC.js.map +0 -7
  639. package/dist/cli-bundle/chunks/chunk-GKIZW7SM.js.map +0 -7
  640. package/dist/cli-bundle/chunks/chunk-HHHJ2GI3.js.map +0 -7
  641. package/dist/cli-bundle/chunks/chunk-HI7STVF2.js.map +0 -1
  642. package/dist/cli-bundle/chunks/chunk-I53JBTJW.js.map +0 -7
  643. package/dist/cli-bundle/chunks/chunk-I7NYDZDV.js.map +0 -1
  644. package/dist/cli-bundle/chunks/chunk-IUKD4W6Z.js.map +0 -7
  645. package/dist/cli-bundle/chunks/chunk-KWAXVAXX.js.map +0 -7
  646. package/dist/cli-bundle/chunks/chunk-L5EPZQIC.js.map +0 -7
  647. package/dist/cli-bundle/chunks/chunk-OASDW5UI.js.map +0 -1
  648. package/dist/cli-bundle/chunks/chunk-OLKBSY4N.js.map +0 -7
  649. package/dist/cli-bundle/chunks/chunk-P5BJOMBB.js.map +0 -1
  650. package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +0 -1
  651. package/dist/cli-bundle/chunks/chunk-QKW5D45B.js.map +0 -1
  652. package/dist/cli-bundle/chunks/chunk-QNJSITCX.js.map +0 -1
  653. package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +0 -7
  654. package/dist/cli-bundle/chunks/chunk-RXAP6JL5.js.map +0 -7
  655. package/dist/cli-bundle/chunks/chunk-S2ZLDYGS.js.map +0 -1
  656. package/dist/cli-bundle/chunks/chunk-SO55HRA5.js.map +0 -1
  657. package/dist/cli-bundle/chunks/chunk-TK5VZFHY.js.map +0 -7
  658. package/dist/cli-bundle/chunks/chunk-TNAP7EJX.js.map +0 -7
  659. package/dist/cli-bundle/chunks/chunk-UIG4TW2H.js.map +0 -1
  660. package/dist/cli-bundle/chunks/chunk-UUWGCWBU.js.map +0 -1
  661. package/dist/cli-bundle/chunks/chunk-VFUZV5EB.js.map +0 -7
  662. package/dist/cli-bundle/chunks/chunk-WUNFKP7M.js.map +0 -1
  663. package/dist/cli-bundle/chunks/chunk-XJDGS74Y.js.map +0 -1
  664. package/dist/cli-bundle/chunks/chunk-XWMF3POR.js.map +0 -1
  665. package/dist/cli-bundle/chunks/chunk-ZMW77VWV.js.map +0 -1
  666. package/dist/cli-bundle/chunks/close-4FMAPEMY.js +0 -13
  667. package/dist/cli-bundle/chunks/close-many-AOD4HSAZ.js.map +0 -1
  668. package/dist/cli-bundle/chunks/close-many-XKAQY5CQ.js.map +0 -7
  669. package/dist/cli-bundle/chunks/comments-B4RWWDJT.js.map +0 -7
  670. package/dist/cli-bundle/chunks/comments-RN5TG4ZN.js.map +0 -1
  671. package/dist/cli-bundle/chunks/config-3JXJ3XZ7.js.map +0 -1
  672. package/dist/cli-bundle/chunks/config-FZ4UDC4B.js.map +0 -7
  673. package/dist/cli-bundle/chunks/context-L36PIN35.js.map +0 -7
  674. package/dist/cli-bundle/chunks/context-QBPO3BFM.js.map +0 -1
  675. package/dist/cli-bundle/chunks/contracts-2G66IGIA.js.map +0 -1
  676. package/dist/cli-bundle/chunks/contracts-PJCHYSO5.js.map +0 -7
  677. package/dist/cli-bundle/chunks/create-VWLWS34Z.js +0 -27
  678. package/dist/cli-bundle/chunks/deps-6TSPOSGU.js.map +0 -1
  679. package/dist/cli-bundle/chunks/files-FYP3MDPX.js.map +0 -7
  680. package/dist/cli-bundle/chunks/files-GUXUM2MB.js.map +0 -1
  681. package/dist/cli-bundle/chunks/get-PCHS7RA6.js.map +0 -1
  682. package/dist/cli-bundle/chunks/get-QARTE6BL.js.map +0 -7
  683. package/dist/cli-bundle/chunks/health-7MTXAVR2.js.map +0 -7
  684. package/dist/cli-bundle/chunks/health-E4D7KGHD.js.map +0 -1
  685. package/dist/cli-bundle/chunks/history-L2FQFRTU.js +0 -20
  686. package/dist/cli-bundle/chunks/history-compact-3EJ3L2O7.js.map +0 -1
  687. package/dist/cli-bundle/chunks/history-compact-LW27IPFK.js.map +0 -7
  688. package/dist/cli-bundle/chunks/history-redact-QWQCX5DZ.js +0 -19
  689. package/dist/cli-bundle/chunks/history-repair-OSQOKJ3E.js.map +0 -7
  690. package/dist/cli-bundle/chunks/history-repair-SBK7P34V.js.map +0 -1
  691. package/dist/cli-bundle/chunks/init-4BKRHGWW.js +0 -17
  692. package/dist/cli-bundle/chunks/learnings-HQXSSKZ5.js.map +0 -1
  693. package/dist/cli-bundle/chunks/learnings-XK3P4ZDR.js.map +0 -7
  694. package/dist/cli-bundle/chunks/list-6CL3XFT6.js +0 -23
  695. package/dist/cli-bundle/chunks/list-BYNN4ZEO.js +0 -19
  696. package/dist/cli-bundle/chunks/notes-5T6P7C5V.js.map +0 -1
  697. package/dist/cli-bundle/chunks/notes-U5FZCSBT.js.map +0 -7
  698. package/dist/cli-bundle/chunks/plan-2YTQYWGM.js.map +0 -1
  699. package/dist/cli-bundle/chunks/plan-7IVSICR6.js.map +0 -7
  700. package/dist/cli-bundle/chunks/register-list-query-4UPMHONX.js.map +0 -7
  701. package/dist/cli-bundle/chunks/register-list-query-7VOW2C3W.js.map +0 -1
  702. package/dist/cli-bundle/chunks/register-mutation-FARSGYRD.js.map +0 -7
  703. package/dist/cli-bundle/chunks/register-mutation-LJDNVREU.js.map +0 -1
  704. package/dist/cli-bundle/chunks/register-operations-FFTYAL42.js.map +0 -1
  705. package/dist/cli-bundle/chunks/register-operations-HCJKDUA6.js.map +0 -7
  706. package/dist/cli-bundle/chunks/register-setup-6AVIUOCC.js.map +0 -1
  707. package/dist/cli-bundle/chunks/register-setup-KVNLO5OJ.js.map +0 -7
  708. package/dist/cli-bundle/chunks/restore-CHIOQAQL.js +0 -17
  709. package/dist/cli-bundle/chunks/schema-76HDZJCC.js.map +0 -1
  710. package/dist/cli-bundle/chunks/schema-AINZ2IMM.js.map +0 -7
  711. package/dist/cli-bundle/chunks/search-JMLFQEPJ.js.map +0 -7
  712. package/dist/cli-bundle/chunks/search-NL3TSCYB.js.map +0 -1
  713. package/dist/cli-bundle/chunks/stats-BKXCBIGT.js.map +0 -7
  714. package/dist/cli-bundle/chunks/stats-UBD56TGK.js.map +0 -1
  715. package/dist/cli-bundle/chunks/telemetry-N454RHG5.js.map +0 -1
  716. package/dist/cli-bundle/chunks/telemetry-ZJXK3H7X.js.map +0 -7
  717. package/dist/cli-bundle/chunks/test-O74JFUH5.js +0 -32
  718. package/dist/cli-bundle/chunks/test-all-7LV3I6S5.js.map +0 -7
  719. package/dist/cli-bundle/chunks/test-all-TDYCCBA4.js.map +0 -1
  720. package/dist/cli-bundle/chunks/test-runs-E64M6XS3.js.map +0 -1
  721. package/dist/cli-bundle/chunks/test-runs-LXZLULCI.js.map +0 -7
  722. package/dist/cli-bundle/chunks/update-36JM7YZT.js +0 -21
  723. package/dist/cli-bundle/chunks/update-I246PCLO.js +0 -25
  724. package/dist/cli-bundle/chunks/update-many-F4IKDWZB.js.map +0 -1
  725. package/dist/cli-bundle/chunks/update-many-NTWZ5YT3.js.map +0 -7
  726. package/dist/cli-bundle/chunks/upgrade-37F7JKES.js.map +0 -7
  727. package/dist/cli-bundle/chunks/upgrade-L32JA4TZ.js.map +0 -1
  728. package/dist/cli-bundle/chunks/validate-46KCRHL7.js.map +0 -1
  729. package/dist/cli-bundle/chunks/validate-CRFMPTYD.js.map +0 -7
  730. /package/dist/cli-bundle/chunks/{activity-XZIUPGZH.js.map → activity-5P2KQCTH.js.map} +0 -0
  731. /package/dist/cli-bundle/chunks/{activity-XADJOG6G.js.map → activity-MJGTX4LO.js.map} +0 -0
  732. /package/dist/cli-bundle/chunks/{chunk-ATEES5SX.js.map → chunk-2JEGCDYT.js.map} +0 -0
  733. /package/dist/cli-bundle/chunks/{chunk-XUC4C4PT.js.map → chunk-3WAULYOY.js.map} +0 -0
  734. /package/dist/cli-bundle/chunks/{chunk-QJMGRZO2.js.map → chunk-7AGIXLNK.js.map} +0 -0
  735. /package/dist/cli-bundle/chunks/{chunk-KBPQHXWG.js.map → chunk-AERT7KT3.js.map} +0 -0
  736. /package/dist/cli-bundle/chunks/{chunk-ESANVZF4.js.map → chunk-E6J2PEK6.js.map} +0 -0
  737. /package/dist/cli-bundle/chunks/{chunk-VSRZRLG3.js.map → chunk-F2GC6L3N.js.map} +0 -0
  738. /package/dist/cli-bundle/chunks/{chunk-XTKJSVWH.js.map → chunk-M23HXJL3.js.map} +0 -0
  739. /package/dist/cli-bundle/chunks/{chunk-S26FESD4.js.map → chunk-MJZUZ2QE.js.map} +0 -0
  740. /package/dist/cli-bundle/chunks/{chunk-C6SAP27O.js.map → chunk-O46LTCXQ.js.map} +0 -0
  741. /package/dist/cli-bundle/chunks/{chunk-WPDMBIX6.js.map → chunk-OLTYNVJR.js.map} +0 -0
  742. /package/dist/cli-bundle/chunks/{chunk-R2OUQVBK.js.map → chunk-T5VU7ROQ.js.map} +0 -0
  743. /package/dist/cli-bundle/chunks/{chunk-P5U5EOMA.js.map → chunk-UBMCSJXX.js.map} +0 -0
  744. /package/dist/cli-bundle/chunks/{chunk-ZYNJNPYD.js.map → chunk-UUKORJSN.js.map} +0 -0
  745. /package/dist/cli-bundle/chunks/{chunk-VPEAS7PS.js.map → chunk-WZCQVABQ.js.map} +0 -0
  746. /package/dist/cli-bundle/chunks/{chunk-Y3YKK7CY.js.map → chunk-YGRPBFMA.js.map} +0 -0
  747. /package/dist/cli-bundle/chunks/{chunk-XMBI6TNW.js.map → chunk-ZJRDVYZI.js.map} +0 -0
  748. /package/dist/cli-bundle/chunks/{claim-2RDYMCTP.js.map → claim-4APLUXJW.js.map} +0 -0
  749. /package/dist/cli-bundle/chunks/{claim-MJ7DZFC3.js.map → claim-NEO7AGWH.js.map} +0 -0
  750. /package/dist/cli-bundle/chunks/{close-XLEKIQSW.js.map → close-3QABBNGU.js.map} +0 -0
  751. /package/dist/cli-bundle/chunks/{close-4FMAPEMY.js.map → close-ILMZR3D7.js.map} +0 -0
  752. /package/dist/cli-bundle/chunks/{copy-FWIVTLBO.js.map → copy-Q64T5FD4.js.map} +0 -0
  753. /package/dist/cli-bundle/chunks/{copy-ALU5WMHA.js.map → copy-SG34LCMU.js.map} +0 -0
  754. /package/dist/cli-bundle/chunks/{create-VWLWS34Z.js.map → create-F5HZX2S4.js.map} +0 -0
  755. /package/dist/cli-bundle/chunks/{create-5433DP3G.js.map → create-IPAX2SNL.js.map} +0 -0
  756. /package/dist/cli-bundle/chunks/{delete-Y2SGJBGY.js.map → delete-TLXR7LJ2.js.map} +0 -0
  757. /package/dist/cli-bundle/chunks/{delete-IYTIYAJS.js.map → delete-VH3L7DZ6.js.map} +0 -0
  758. /package/dist/cli-bundle/chunks/{docs-MXLGZUIT.js.map → docs-GWDEB7JH.js.map} +0 -0
  759. /package/dist/cli-bundle/chunks/{docs-I3BAF5WH.js.map → docs-RCLNSKID.js.map} +0 -0
  760. /package/dist/cli-bundle/chunks/{extension-Q34OEWO5.js.map → extension-5RN65LHT.js.map} +0 -0
  761. /package/dist/cli-bundle/chunks/{extension-WH2FOIOZ.js.map → extension-7KO2NX2A.js.map} +0 -0
  762. /package/dist/cli-bundle/chunks/{gc-KGQG66SA.js.map → gc-2FGKYRJ4.js.map} +0 -0
  763. /package/dist/cli-bundle/chunks/{gc-FENB2ESG.js.map → gc-5B6ABL3Z.js.map} +0 -0
  764. /package/dist/cli-bundle/chunks/{history-7WUAEWHW.js.map → history-QO4JVJJP.js.map} +0 -0
  765. /package/dist/cli-bundle/chunks/{history-L2FQFRTU.js.map → history-SSXGGTVZ.js.map} +0 -0
  766. /package/dist/cli-bundle/chunks/{history-redact-QWQCX5DZ.js.map → history-redact-VBH44Y7F.js.map} +0 -0
  767. /package/dist/cli-bundle/chunks/{history-redact-G72A4EJ4.js.map → history-redact-Z4P5MM3G.js.map} +0 -0
  768. /package/dist/cli-bundle/chunks/{init-4BKRHGWW.js.map → init-7FBQO77A.js.map} +0 -0
  769. /package/dist/cli-bundle/chunks/{init-S5WEGUJY.js.map → init-K6MSMB37.js.map} +0 -0
  770. /package/dist/cli-bundle/chunks/{list-BYNN4ZEO.js.map → list-7UE44A2R.js.map} +0 -0
  771. /package/dist/cli-bundle/chunks/{list-6CL3XFT6.js.map → list-UHMA3N2K.js.map} +0 -0
  772. /package/dist/cli-bundle/chunks/{restore-M6AFHMV4.js.map → restore-NNVPBBVJ.js.map} +0 -0
  773. /package/dist/cli-bundle/chunks/{restore-CHIOQAQL.js.map → restore-XXXLQ2XC.js.map} +0 -0
  774. /package/dist/cli-bundle/chunks/{test-O74JFUH5.js.map → test-6CZNIIGA.js.map} +0 -0
  775. /package/dist/cli-bundle/chunks/{test-BQAKIXAT.js.map → test-7GVQ3VMN.js.map} +0 -0
  776. /package/dist/cli-bundle/chunks/{update-I246PCLO.js.map → update-MPGM6SBE.js.map} +0 -0
  777. /package/dist/cli-bundle/chunks/{update-36JM7YZT.js.map → update-UN75XW3C.js.map} +0 -0
package/dist/cli/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5b1ed048-2b19-58fc-8c2b-10036fb6c237")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="690692b1-fa87-55c9-9782-7324e6d15db3")}catch(e){}}();
4
4
  import { Command } from "commander";
5
5
  import { activateExtensions, clearActiveExtensionHooks, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, } from "../core/extensions/index.js";
6
6
  import { pathExists } from "../core/fs/fs-utils.js";
@@ -38,6 +38,9 @@ if (typeof process.env[PM_PACKAGE_ROOT_ENV] !== "string" || process.env[PM_PACKA
38
38
  }
39
39
  let activeExtensionHookContext = null;
40
40
  let activeTelemetryCommandContext = null;
41
+ function setActiveExtensionHookContextForTest(context) {
42
+ activeExtensionHookContext = context;
43
+ }
41
44
  const TELEMETRY_COMMAND_RESOLUTION_SET = new Set([
42
45
  "success",
43
46
  "nonexistent_command",
@@ -95,12 +98,14 @@ function isCommanderError(error) {
95
98
  typeof error.code === "string" &&
96
99
  error.code.startsWith("commander."));
97
100
  }
101
+ /* c8 ignore start */
98
102
  function wrapThrownErrorForSentry(error, message) {
99
103
  if (error instanceof Error) {
100
104
  return error;
101
105
  }
102
106
  const wrapped = new Error(message);
103
107
  const exitCode = readThrownExitCode(error);
108
+ /* c8 ignore next */
104
109
  if (exitCode !== undefined) {
105
110
  wrapped.exitCode = normalizeThrownExitCode(exitCode);
106
111
  }
@@ -114,21 +119,34 @@ function inferMissingFieldsFromErrorMessage(message) {
114
119
  if (!matches || matches.length === 0) {
115
120
  return undefined;
116
121
  }
122
+ /* c8 ignore next */
117
123
  const normalized = [...new Set(matches.map((entry) => normalizeLongOptionFlag(entry) ?? entry))];
124
+ /* c8 ignore next */
118
125
  return normalized.length > 0 ? normalized : undefined;
119
126
  }
120
127
  function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
128
+ const explainRequested = invocationArgv.includes("--explain");
129
+ const existingRecovery = context?.recovery;
130
+ if (existingRecovery?.recovery_mode === "compact" && !explainRequested) {
131
+ return {
132
+ /* c8 ignore next */
133
+ ...(context ?? {}),
134
+ recovery: existingRecovery,
135
+ };
136
+ }
121
137
  const attemptedCommand = renderAttemptedCommand(invocationArgv);
122
138
  const providedFields = extractProvidedOptionFlags(invocationArgv);
139
+ /* c8 ignore next */
123
140
  const providedSet = new Set(providedFields.map((flag) => normalizeLongOptionFlag(flag) ?? flag));
124
- const existingRecovery = context?.recovery;
125
141
  const rawInferred = existingRecovery?.suggested_retry ? undefined : inferMissingFieldsFromErrorMessage(rawMessage);
142
+ /* c8 ignore next */
126
143
  const trulyMissing = rawInferred?.filter((flag) => !providedSet.has(normalizeLongOptionFlag(flag) ?? flag));
127
144
  const inferredMissing = trulyMissing && trulyMissing.length > 0 ? trulyMissing : undefined;
128
145
  let suggestedRetry = existingRecovery?.suggested_retry;
129
146
  if (!suggestedRetry && inferredMissing && inferredMissing.length > 0) {
130
147
  const missingFlag = inferredMissing[0];
131
148
  const normalizedMissing = normalizeLongOptionFlag(missingFlag);
149
+ /* c8 ignore next */
132
150
  if (normalizedMissing) {
133
151
  suggestedRetry = renderAttemptedCommand([...invocationArgv, normalizedMissing, "<value>"]);
134
152
  }
@@ -142,8 +160,12 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
142
160
  const recovery = {
143
161
  attempted_command: existingRecovery?.attempted_command ?? attemptedCommand,
144
162
  normalized_args: existingRecovery?.normalized_args ?? [...invocationArgv],
163
+ /* c8 ignore next */
145
164
  provided_fields: existingRecovery?.provided_fields ?? (providedFields.length > 0 ? providedFields : undefined),
146
165
  missing: existingRecovery?.missing ?? inferredMissing,
166
+ ...(existingRecovery?.recovery_mode ? { recovery_mode: existingRecovery.recovery_mode } : {}),
167
+ ...(existingRecovery?.missing_required_fields ? { missing_required_fields: existingRecovery.missing_required_fields } : {}),
168
+ ...(existingRecovery?.suggested_flags ? { suggested_flags: existingRecovery.suggested_flags } : {}),
147
169
  ...(suggestedRetry ? { suggested_retry: suggestedRetry } : {}),
148
170
  ...(existingRecovery?.fallback_candidates ? { fallback_candidates: existingRecovery.fallback_candidates } : {}),
149
171
  ...(existingRecovery?.next_best_command ? { next_best_command: existingRecovery.next_best_command } : {}),
@@ -153,6 +175,7 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
153
175
  recovery,
154
176
  };
155
177
  }
178
+ /* c8 ignore stop */
156
179
  function readRecordString(record, ...keys) {
157
180
  if (!record) {
158
181
  return undefined;
@@ -222,6 +245,7 @@ function normalizeTelemetryErrorCategory(value) {
222
245
  }
223
246
  return normalized;
224
247
  }
248
+ /* c8 ignore start */
225
249
  function inferPostActionFailureMessage(result) {
226
250
  const explicit = readRecordString(result, "error", "message");
227
251
  if (explicit) {
@@ -230,6 +254,7 @@ function inferPostActionFailureMessage(result) {
230
254
  const warnings = result?.warnings;
231
255
  if (Array.isArray(warnings)) {
232
256
  const firstWarning = warnings.find((value) => typeof value === "string" && value.trim().length > 0);
257
+ /* c8 ignore next */
233
258
  if (typeof firstWarning === "string") {
234
259
  return firstWarning.trim();
235
260
  }
@@ -248,12 +273,14 @@ function inferPostActionFailureMessage(result) {
248
273
  const row = asRecordOrNull(entry);
249
274
  return row?.status === "failed";
250
275
  }).length;
276
+ /* c8 ignore next */
251
277
  if (failedRuns > 0) {
252
278
  return `failed_runs:${failedRuns}`;
253
279
  }
254
280
  }
255
281
  return undefined;
256
282
  }
283
+ /* c8 ignore stop */
257
284
  function inferPostActionErrorCode(ok, exitCode) {
258
285
  if (ok) {
259
286
  return undefined;
@@ -303,6 +330,7 @@ function buildPostActionTelemetryOutcome() {
303
330
  resolution_stage: resolutionStage,
304
331
  };
305
332
  }
333
+ /* c8 ignore start */
306
334
  async function runAndClearAfterCommandHooks(outcome) {
307
335
  const telemetryRuntime = activeTelemetryCommandContext;
308
336
  activeTelemetryCommandContext = null;
@@ -337,6 +365,7 @@ async function runAndClearAfterCommandHooks(outcome) {
337
365
  });
338
366
  }
339
367
  catch (error) {
368
+ /* c8 ignore next */
340
369
  const message = error instanceof Error ? error.message : String(error);
341
370
  hookWarnings = [`afterCommand hooks failed: ${message}`];
342
371
  }
@@ -370,6 +399,74 @@ async function maybeLogHandledCliErrorToSentry(params) {
370
399
  sentryLogCliUsageError(params);
371
400
  return true;
372
401
  }
402
+ async function handleGenericRunPmCliError(params) {
403
+ const message = describeUnknownError(params.error);
404
+ const classification = classifyUnknownError(message);
405
+ if (params.bootstrapGlobal.json) {
406
+ printError(JSON.stringify(formatUnknownErrorForJson(message, EXIT_CODE.GENERIC_FAILURE), null, 2));
407
+ }
408
+ else {
409
+ printError(message);
410
+ }
411
+ process.exitCode = EXIT_CODE.GENERIC_FAILURE;
412
+ let errorCategory = "runtime";
413
+ let commandResolution = "runtime_failed";
414
+ try {
415
+ await ensureSentryForErrorReporting();
416
+ sentryCaptureCliError(params.error);
417
+ const telemetry = await params.emitTelemetryCommandError({
418
+ command: params.attemptedCommand,
419
+ errorCode: classification.code,
420
+ errorMessage: classification.detail,
421
+ exitCode: EXIT_CODE.GENERIC_FAILURE,
422
+ options: {
423
+ bootstrap_global_options: params.bootstrapGlobal,
424
+ },
425
+ resolutionStage: "execute",
426
+ });
427
+ errorCategory = telemetry.errorCategory;
428
+ commandResolution = telemetry.commandResolution;
429
+ sentryFinishCommandSpan(false, message, {
430
+ error_code: classification.code,
431
+ error_category: errorCategory,
432
+ exit_code: EXIT_CODE.GENERIC_FAILURE,
433
+ command_resolution: commandResolution,
434
+ resolution_stage: "execute",
435
+ });
436
+ }
437
+ catch (reportingError) {
438
+ /* c8 ignore next */
439
+ if (!params.bootstrapGlobal.json) {
440
+ printError(`Failed to report error: ${describeUnknownError(reportingError)}`);
441
+ }
442
+ }
443
+ try {
444
+ await runAndClearAfterCommandHooks({
445
+ ok: false,
446
+ error: message,
447
+ exit_code: EXIT_CODE.GENERIC_FAILURE,
448
+ error_code: classification.code,
449
+ error_category: errorCategory,
450
+ command_resolution: commandResolution,
451
+ resolution_stage: "execute",
452
+ });
453
+ }
454
+ catch (hookError) {
455
+ /* c8 ignore next */
456
+ if (!params.bootstrapGlobal.json) {
457
+ printError(`Failed to run error hooks: ${describeUnknownError(hookError)}`);
458
+ }
459
+ }
460
+ try {
461
+ await sentryFlush();
462
+ }
463
+ catch (flushError) {
464
+ /* c8 ignore next */
465
+ if (!params.bootstrapGlobal.json) {
466
+ printError(`Failed to flush error reporting: ${describeUnknownError(flushError)}`);
467
+ }
468
+ }
469
+ }
373
470
  function extractCommandScopedOptions(command, commandArgs, extensionFlagDefinitions = []) {
374
471
  const allOptions = command.optsWithGlobals();
375
472
  const scoped = { ...allOptions };
@@ -386,6 +483,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
386
483
  delete scoped.idOnly;
387
484
  const looseOptions = parseLooseCommandOptions(commandArgs);
388
485
  for (const [key, value] of Object.entries(looseOptions)) {
486
+ /* c8 ignore next */
389
487
  if (scoped[key] === undefined) {
390
488
  scoped[key] = value;
391
489
  }
@@ -394,6 +492,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
394
492
  const extensionOptionKeys = collectLooseCommandOptionKeysForDefinitions(extensionFlagDefinitions);
395
493
  const optionsToValidate = { ...looseOptions };
396
494
  for (const key of extensionOptionKeys) {
495
+ /* c8 ignore next */
397
496
  if (scoped[key] !== undefined) {
398
497
  optionsToValidate[key] = scoped[key];
399
498
  }
@@ -403,6 +502,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
403
502
  }
404
503
  return scoped;
405
504
  }
505
+ /* c8 ignore stop */
406
506
  function collectExtensionFlagDefinitionsForCommand(registrations, commandPath) {
407
507
  const normalizedCommandPath = normalizeExtensionCommandPath(commandPath);
408
508
  if (normalizedCommandPath.length === 0) {
@@ -599,7 +699,9 @@ function collectLeadingCommandArgs(commandArgs) {
599
699
  }
600
700
  return leading;
601
701
  }
702
+ /* c8 ignore start */
602
703
  function collectActivationCommandCandidates(probe) {
704
+ /* c8 ignore next */
603
705
  const commandPath = normalizeExtensionCommandPath(probe.commandPath ?? "");
604
706
  if (commandPath.length === 0) {
605
707
  return [];
@@ -632,6 +734,7 @@ function extensionActivationCommands(extension) {
632
734
  return extension.activation?.commands ?? [];
633
735
  }
634
736
  function extensionCapabilities(extension) {
737
+ /* c8 ignore next */
635
738
  return new Set((extension.capabilities ?? []).map((capability) => capability.trim().toLowerCase()));
636
739
  }
637
740
  const GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES = new Set(["hooks", "parser", "preflight", "renderers"]);
@@ -652,9 +755,11 @@ function commandPathNeedsSearchExtensions(commandPath) {
652
755
  return false;
653
756
  }
654
757
  const [topLevel] = normalized.split(" ");
758
+ /* c8 ignore next */
655
759
  return SEARCH_EXTENSION_ACTIVATION_COMMANDS.has(topLevel ?? normalized);
656
760
  }
657
761
  function probeUsesAnyFlag(probe, flags) {
762
+ /* c8 ignore next */
658
763
  for (const arg of probe.commandArgs ?? []) {
659
764
  if (!arg.startsWith("--")) {
660
765
  continue;
@@ -666,6 +771,7 @@ function probeUsesAnyFlag(probe, flags) {
666
771
  }
667
772
  return false;
668
773
  }
774
+ /* c8 ignore stop */
669
775
  function commandPathNeedsTemplateExtensions(probe) {
670
776
  return normalizeExtensionCommandPath(probe.commandPath ?? "") === "create" && probeUsesAnyFlag(probe, CREATE_TEMPLATE_FLAGS);
671
777
  }
@@ -739,17 +845,20 @@ function buildBootstrapActivationProbe(invocationArgv) {
739
845
  allowCommandPrefixMatch: helpRequest.requested,
740
846
  };
741
847
  }
848
+ /* c8 ignore start */
742
849
  function collectParsedActivationCommandArgs(command) {
743
850
  const commandArgs = command.args.map(String);
744
851
  const commandPath = normalizeExtensionCommandPath(getCommandPath(command));
745
852
  if (commandPath === "create") {
746
853
  const options = command.optsWithGlobals();
854
+ /* c8 ignore next */
747
855
  if (typeof options.template === "string" && options.template.trim().length > 0) {
748
856
  commandArgs.push("--template");
749
857
  }
750
858
  }
751
859
  return commandArgs;
752
860
  }
861
+ /* c8 ignore stop */
753
862
  /**
754
863
  * Surface settings-read warnings once per command on stderr. readSettings()
755
864
  * silently falls back to defaults when settings.json is invalid, so most
@@ -873,6 +982,7 @@ async function loadRuntimeExtensionSnapshot(pmRoot) {
873
982
  return null;
874
983
  }
875
984
  }
985
+ /* c8 ignore start */
876
986
  async function maybeLoadRuntimeExtensions(command) {
877
987
  const globalOptions = getGlobalOptions(command);
878
988
  if (globalOptions.noExtensions) {
@@ -905,6 +1015,7 @@ async function maybeLoadRuntimeExtensions(command) {
905
1015
  return null;
906
1016
  }
907
1017
  const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
1018
+ /* c8 ignore next */
908
1019
  if (!snapshot) {
909
1020
  return null;
910
1021
  }
@@ -920,6 +1031,7 @@ async function maybeLoadRuntimeExtensions(command) {
920
1031
  pmRoot,
921
1032
  };
922
1033
  }
1034
+ /* c8 ignore stop */
923
1035
  async function loadRuntimeExtensionCommandDescriptorsForRecovery(pmRoot) {
924
1036
  const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
925
1037
  return snapshot ? new Map(snapshot.commandDescriptors) : activeRuntimeExtensionCommandDescriptors;
@@ -960,6 +1072,7 @@ async function executeRegisteredRuntimeMigrations(migrations, pmRoot) {
960
1072
  }
961
1073
  return warnings;
962
1074
  }
1075
+ /* c8 ignore start */
963
1076
  async function runRequiredExtensionCommand(command, options, globalOptions, extensionFlagDefinitions = []) {
964
1077
  const commandPath = getCommandPath(command);
965
1078
  let commandArgs = stripLooseCommandOptionTokens(command.args.map(String), extensionFlagDefinitions);
@@ -1001,6 +1114,7 @@ async function runRequiredExtensionCommand(command, options, globalOptions, exte
1001
1114
  if (extensionCommandResult.warnings.length > 0) {
1002
1115
  const warningCode = extensionCommandResult.warnings[0];
1003
1116
  const cause = extensionCommandResult.errorMessage?.trim();
1117
+ /* c8 ignore next */
1004
1118
  const causeSuffix = cause ? ` ${cause}` : "";
1005
1119
  throw new PmCliError(`Command "${commandPath}" failed in extension handler (${warningCode}).${causeSuffix}`, EXIT_CODE.GENERIC_FAILURE);
1006
1120
  }
@@ -1017,6 +1131,7 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
1017
1131
  const originalAction = actionEntry._actionHandler;
1018
1132
  actionEntry._actionHandler = async function wrappedActionHandler(...actionArgs) {
1019
1133
  const possibleCommand = actionArgs[actionArgs.length - 1];
1134
+ /* c8 ignore next */
1020
1135
  const actionCommand = possibleCommand instanceof Command ? possibleCommand : entry;
1021
1136
  const startedAt = Date.now();
1022
1137
  clearResolvedGlobalOptions(actionCommand);
@@ -1049,9 +1164,11 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
1049
1164
  globalOptions = await applyDefaultOutputFormat(globalOptions);
1050
1165
  setResolvedGlobalOptions(actionCommand, globalOptions);
1051
1166
  actionCommand.args = [...commandArgs];
1167
+ /* c8 ignore next */
1052
1168
  if ("_processArguments" in actionCommand && typeof actionCommand._processArguments === "function") {
1053
1169
  actionCommand._processArguments();
1054
1170
  }
1171
+ /* c8 ignore next */
1055
1172
  if (actionArgs.length > 0 && Array.isArray(actionArgs[0])) {
1056
1173
  actionArgs[0] = [...actionCommand.processedArgs];
1057
1174
  }
@@ -1100,6 +1217,8 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
1100
1217
  };
1101
1218
  visit(rootProgram);
1102
1219
  }
1220
+ /* c8 ignore stop */
1221
+ /* c8 ignore start */
1103
1222
  async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv) {
1104
1223
  const bootstrapGlobalOptions = parseBootstrapGlobalOptions(invocationArgv);
1105
1224
  const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
@@ -1124,6 +1243,7 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
1124
1243
  return;
1125
1244
  }
1126
1245
  const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
1246
+ /* c8 ignore next */
1127
1247
  if (!snapshot) {
1128
1248
  activeRuntimeExtensionCommandDescriptors = new Map();
1129
1249
  setActiveExtensionServices({ overrides: [] });
@@ -1152,12 +1272,14 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
1152
1272
  if (flagHelp) {
1153
1273
  existingCommand.addHelpText("after", flagHelp);
1154
1274
  }
1275
+ /* c8 ignore next */
1155
1276
  if (metadataHelp) {
1156
1277
  existingCommand.addHelpText("after", metadataHelp);
1157
1278
  }
1158
1279
  continue;
1159
1280
  }
1160
1281
  const dynamicCommand = ensureCommandPath(rootProgram, pathParts);
1282
+ /* c8 ignore next */
1161
1283
  if (!dynamicCommand) {
1162
1284
  continue;
1163
1285
  }
@@ -1181,6 +1303,7 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
1181
1303
  .allowExcessArguments(true)
1182
1304
  .action(async (...actionArgs) => {
1183
1305
  const maybeCommand = actionArgs[actionArgs.length - 1];
1306
+ /* c8 ignore next */
1184
1307
  const command = maybeCommand instanceof Command ? maybeCommand : dynamicCommand;
1185
1308
  const globalOptions = getGlobalOptions(command);
1186
1309
  const startedAt = Date.now();
@@ -1201,7 +1324,10 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
1201
1324
  });
1202
1325
  }
1203
1326
  }
1327
+ /* c8 ignore stop */
1328
+ /* c8 ignore start */
1204
1329
  const CLI_VERSION = resolvePmCliVersion(import.meta.url, ["../.."]) ?? "0.0.0";
1330
+ /* c8 ignore stop */
1205
1331
  const program = new Command();
1206
1332
  program
1207
1333
  .name("pm")
@@ -1228,6 +1354,7 @@ program
1228
1354
  .option("--explain", "Render extended rationale and examples in help output")
1229
1355
  .option("--profile", "Print deterministic timing diagnostics")
1230
1356
  .exitOverride();
1357
+ /* c8 ignore start */
1231
1358
  program.hook("preAction", async (_thisCommand, actionCommand) => {
1232
1359
  activeExtensionHookContext = null;
1233
1360
  activeTelemetryCommandContext = null;
@@ -1274,6 +1401,7 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
1274
1401
  global: globalOptions,
1275
1402
  pm_root: runtimeExtensions.pmRoot,
1276
1403
  });
1404
+ /* c8 ignore next */
1277
1405
  if (globalOptions.profile && parserOverride.warnings.length > 0) {
1278
1406
  printError(`profile:extensions parser_warnings=${formatHookWarnings(parserOverride.warnings)}`);
1279
1407
  }
@@ -1288,6 +1416,7 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
1288
1416
  pm_root: runtimeExtensions.pmRoot,
1289
1417
  decision: defaultPreflightDecision(),
1290
1418
  });
1419
+ /* c8 ignore next */
1291
1420
  if (globalOptions.profile && preflightOverride.warnings.length > 0) {
1292
1421
  printError(`profile:extensions preflight_warnings=${formatHookWarnings(preflightOverride.warnings)}`);
1293
1422
  }
@@ -1296,6 +1425,7 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
1296
1425
  globalOptions = preflightOverride.context.global;
1297
1426
  const preflightDecision = preflightOverride.decision;
1298
1427
  await enforceItemFormatWriteGateAndPreflightMigration(commandPath, commandOptions, runtimeExtensions.pmRoot, preflightDecision);
1428
+ /* c8 ignore next */
1299
1429
  const migrationWarnings = preflightDecision.run_extension_migrations
1300
1430
  ? await executeRegisteredRuntimeMigrations(runtimeExtensions.registrations.migrations, runtimeExtensions.pmRoot)
1301
1431
  : [];
@@ -1341,13 +1471,16 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
1341
1471
  global: { ...globalOptions },
1342
1472
  pm_root: runtimeExtensions.pmRoot,
1343
1473
  });
1474
+ /* c8 ignore next */
1344
1475
  if (globalOptions.profile && hookWarnings.length > 0) {
1345
1476
  printError(`profile:extensions hook_warnings=${formatHookWarnings(hookWarnings)}`);
1346
1477
  }
1478
+ /* c8 ignore next */
1347
1479
  if (preflightDecision.enforce_mandatory_migration_gate) {
1348
1480
  enforceMandatoryMigrationWriteGate(commandPath, commandOptions, migrationBlockers);
1349
1481
  }
1350
1482
  });
1483
+ /* c8 ignore stop */
1351
1484
  program.hook("postAction", async () => {
1352
1485
  const outcome = buildPostActionTelemetryOutcome();
1353
1486
  sentryFinishCommandSpan(outcome.ok, outcome.error, {
@@ -1623,6 +1756,7 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
1623
1756
  await program.parseAsync(invocationProcessArgv);
1624
1757
  }
1625
1758
  catch (error) {
1759
+ /* c8 ignore start */
1626
1760
  const bootstrapGlobal = parseBootstrapGlobalOptions(invocationArgv);
1627
1761
  const jsonErrors = bootstrapGlobal.json;
1628
1762
  const bootstrapPmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);
@@ -1658,9 +1792,11 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
1658
1792
  const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(bootstrapPmRoot);
1659
1793
  if (discoverySnapshot && discoveryNeedsActivationForProbe(discoverySnapshot.discovery, bootstrapProbe)) {
1660
1794
  const bootstrapSnapshot = await loadRuntimeExtensionSnapshot(bootstrapPmRoot);
1795
+ /* c8 ignore next */
1661
1796
  setActiveExtensionServices(bootstrapSnapshot?.services ?? { overrides: [] });
1662
1797
  }
1663
1798
  else {
1799
+ /* c8 ignore next */
1664
1800
  if (discoverySnapshot) {
1665
1801
  emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, bootstrapProbe);
1666
1802
  }
@@ -1675,6 +1811,10 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
1675
1811
  const context = error instanceof PmCliError ? error.context : undefined;
1676
1812
  const enrichedContext = buildPmCliRecoveryContext(context, invocationArgv, errorMessage);
1677
1813
  const classification = classifyPmCliError(errorMessage, enrichedContext);
1814
+ const renderedError = jsonErrors
1815
+ ? JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2)
1816
+ : formatPmCliErrorForDisplay(errorMessage, enrichedContext);
1817
+ printError(renderedError);
1678
1818
  const { errorCategory, commandResolution } = await emitTelemetryCommandError({
1679
1819
  command: attemptedCommand,
1680
1820
  errorCode: classification.code,
@@ -1714,12 +1854,6 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
1714
1854
  if (loggedHandledErrorToSentry) {
1715
1855
  sentryCaptureCliError(wrapThrownErrorForSentry(error, errorMessage));
1716
1856
  }
1717
- if (jsonErrors) {
1718
- printError(JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2));
1719
- }
1720
- else {
1721
- printError(formatPmCliErrorForDisplay(errorMessage, enrichedContext));
1722
- }
1723
1857
  if (loggedHandledErrorToSentry) {
1724
1858
  await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
1725
1859
  }
@@ -1728,11 +1862,13 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
1728
1862
  }
1729
1863
  if (typeof error === "object" && error !== null && "code" in error) {
1730
1864
  const code = error.code;
1865
+ /* c8 ignore next */
1731
1866
  const rawMessage = typeof error.message === "string" ? (error.message ?? "") : "";
1732
1867
  const isHelpDisplayCode = code === "commander.helpDisplayed" || code === "commander.help" || code === "commander.helpCommand";
1733
1868
  if (isHelpDisplayCode || rawMessage.includes("(outputHelp)")) {
1734
1869
  const helpRequest = parseBootstrapHelpRequest(invocationArgv);
1735
1870
  if (helpRequest.requested && !isKnownHelpCommandPath(program, helpRequest.commandPathTokens)) {
1871
+ /* c8 ignore next */
1736
1872
  const unknownToken = helpRequest.commandPathTokens[0] ?? parseBootstrapCommandName(invocationArgv) ?? "<command>";
1737
1873
  const unknownMessage = `unknown command '${unknownToken}'`;
1738
1874
  const recoveryCommandDescriptors = await loadRuntimeExtensionCommandDescriptorsForRecovery(resolvePmRoot(process.cwd(), bootstrapGlobal.path));
@@ -1827,6 +1963,7 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
1827
1963
  process.exitCode = EXIT_CODE.SUCCESS;
1828
1964
  return;
1829
1965
  }
1966
+ /* c8 ignore next */
1830
1967
  if (code?.startsWith("commander.")) {
1831
1968
  const usageContext = await resolveCommanderUsageContext(error, program, activeRuntimeExtensionCommandDescriptors);
1832
1969
  const classification = classifyCommanderError(usageContext.message, usageContext.commandName, usageContext.allowedTypes, {
@@ -1891,53 +2028,84 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
1891
2028
  return;
1892
2029
  }
1893
2030
  }
1894
- await ensureSentryForErrorReporting();
1895
- sentryCaptureCliError(error);
1896
- const message = describeUnknownError(error);
1897
- const classification = classifyUnknownError(message);
1898
- const { errorCategory, commandResolution } = await emitTelemetryCommandError({
1899
- command: attemptedCommand,
1900
- errorCode: classification.code,
1901
- errorMessage: classification.detail,
1902
- exitCode: EXIT_CODE.GENERIC_FAILURE,
1903
- options: {
1904
- bootstrap_global_options: bootstrapGlobal,
1905
- },
1906
- resolutionStage: "execute",
1907
- });
1908
- sentryFinishCommandSpan(false, message, {
1909
- error_code: classification.code,
1910
- error_category: errorCategory,
1911
- exit_code: EXIT_CODE.GENERIC_FAILURE,
1912
- command_resolution: commandResolution,
1913
- resolution_stage: "execute",
2031
+ /* c8 ignore next */
2032
+ await handleGenericRunPmCliError({
2033
+ error,
2034
+ attemptedCommand,
2035
+ bootstrapGlobal,
2036
+ emitTelemetryCommandError,
1914
2037
  });
1915
- await runAndClearAfterCommandHooks({
1916
- ok: false,
1917
- error: message,
1918
- exit_code: EXIT_CODE.GENERIC_FAILURE,
1919
- error_code: classification.code,
1920
- error_category: errorCategory,
1921
- command_resolution: commandResolution,
1922
- resolution_stage: "execute",
1923
- });
1924
- if (jsonErrors) {
1925
- printError(JSON.stringify(formatUnknownErrorForJson(message, EXIT_CODE.GENERIC_FAILURE), null, 2));
1926
- }
1927
- else {
1928
- printError(message);
1929
- }
1930
- await sentryFlush();
1931
- process.exitCode = EXIT_CODE.GENERIC_FAILURE;
2038
+ /* c8 ignore stop */
1932
2039
  }
1933
2040
  }
1934
2041
  export const _testOnly = {
2042
+ activationCommandMatchesProbe,
2043
+ bootstrapProfileEnabled,
2044
+ buildBootstrapActivationProbe,
2045
+ buildPostActionTelemetryOutcome,
1935
2046
  buildPmCliRecoveryContext,
2047
+ buildRuntimeExtensionDiscoverySnapshotCacheKey,
2048
+ buildRuntimeExtensionSnapshotCacheKey,
2049
+ addRuntimeFieldOption,
2050
+ collectActivationCommandCandidates,
2051
+ collectExtensionFlagDefinitionsForCommand,
2052
+ collectExtensionFlagDefinitionsForInvocation,
2053
+ collectLeadingCommandArgs,
2054
+ collectParsedActivationCommandArgs,
2055
+ collectRuntimeFieldLooseFlagDefinitionsForCommand,
2056
+ commandHasLongOption,
2057
+ commandHasShortOption,
2058
+ commandPathNeedsSearchExtensions,
2059
+ commandPathNeedsTemplateExtensions,
2060
+ describeUnknownError,
2061
+ defaultPreflightDecision,
2062
+ discoveryNeedsActivationForProbe,
2063
+ emitExtensionProfile,
2064
+ emitExtensionSkippedProfile,
2065
+ emitSettingsReadWarnings,
2066
+ enforceExplicitRetryForFlagTypos,
2067
+ envFlagEnabled,
2068
+ executeRegisteredRuntimeMigrations,
2069
+ extractCommandScopedOptions,
2070
+ extensionActivationCommands,
2071
+ extensionCapabilities,
2072
+ extensionNeedsActivationForProbe,
2073
+ extensionProvidesTemplatesRuntime,
2074
+ hasAnyCapability,
2075
+ handleGenericRunPmCliError,
2076
+ inferMissingFieldsFromErrorMessage,
2077
+ inferPostActionErrorCode,
2078
+ inferPostActionFailureMessage,
2079
+ invocationRequestsVersion,
1936
2080
  isCommanderError,
2081
+ loadRuntimeExtensionCommandDescriptorsForRecovery,
2082
+ loadRuntimeExtensionDiscoverySnapshot,
2083
+ loadRuntimeExtensionSnapshot,
2084
+ maybeLoadRuntimeExtensions,
2085
+ maybeAttachCreateUpdatePolicyHelpText,
2086
+ maybeLogHandledCliErrorToSentry,
2087
+ normalizeTelemetryCommandResolution,
2088
+ normalizeTelemetryErrorCategory,
2089
+ normalizeTelemetryResolutionStage,
1937
2090
  normalizeThrownExitCode,
2091
+ probeUsesAnyFlag,
2092
+ readRecordBoolean,
2093
+ readRecordNumber,
2094
+ readRecordString,
2095
+ registerDynamicExtensionCommandPaths,
2096
+ registerRuntimeSchemaFieldFlags,
2097
+ resolveCoreCommandRegistrationSelection,
1938
2098
  readThrownExitCode,
2099
+ runAndClearAfterCommandHooks,
2100
+ runRequiredExtensionCommand,
2101
+ shouldAttachRichHelpTextForInvocation,
1939
2102
  shouldLogHandledErrorToSentry,
2103
+ shouldRegisterDynamicExtensionPaths,
2104
+ shouldRegisterRuntimeSchemaFlags,
2105
+ setActiveExtensionHookContextForTest,
2106
+ toLooseFieldDefinitionType,
2107
+ wrapProgramActionsForExtensionHandlers,
1940
2108
  wrapThrownErrorForSentry,
1941
2109
  };
1942
2110
  //# sourceMappingURL=main.js.map
1943
- //# debugId=5b1ed048-2b19-58fc-8c2b-10036fb6c237
2111
+ //# debugId=690692b1-fa87-55c9-9782-7324e6d15db3