@unbrained/pm-cli 2026.7.6 → 2026.7.8

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 (688) hide show
  1. package/CHANGELOG.md +50 -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/completion.js +10 -2
  8. package/dist/cli/commands/completion.js.map +1 -1
  9. package/dist/cli/commands/context.d.ts +1 -0
  10. package/dist/cli/commands/context.js +4 -4
  11. package/dist/cli/commands/context.js.map +1 -1
  12. package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
  13. package/dist/cli/commands/extension/bundled-catalog.js +38 -28
  14. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  15. package/dist/cli/commands/extension/install-sources.js +81 -18
  16. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  17. package/dist/cli/commands/extension.d.ts +23 -19
  18. package/dist/cli/commands/extension.js +167 -57
  19. package/dist/cli/commands/extension.js.map +1 -1
  20. package/dist/cli/commands/health.js +9 -5
  21. package/dist/cli/commands/health.js.map +1 -1
  22. package/dist/cli/commands/learnings.js +5 -3
  23. package/dist/cli/commands/learnings.js.map +1 -1
  24. package/dist/cli/commands/notes.js +5 -3
  25. package/dist/cli/commands/notes.js.map +1 -1
  26. package/dist/cli/commands/reindex.js +4 -3
  27. package/dist/cli/commands/reindex.js.map +1 -1
  28. package/dist/cli/commands/search.js +4 -4
  29. package/dist/cli/commands/search.js.map +1 -1
  30. package/dist/cli/commands/test.d.ts +9 -0
  31. package/dist/cli/commands/test.js +144 -105
  32. package/dist/cli/commands/test.js.map +1 -1
  33. package/dist/cli/extension-command-help.js +10 -2
  34. package/dist/cli/extension-command-help.js.map +1 -1
  35. package/dist/cli/help-content.js +28 -2
  36. package/dist/cli/help-content.js.map +1 -1
  37. package/dist/cli/register-list-query.d.ts +1 -1
  38. package/dist/cli/register-list-query.js +19 -27
  39. package/dist/cli/register-list-query.js.map +1 -1
  40. package/dist/cli/register-operations.d.ts +0 -8
  41. package/dist/cli/register-operations.js +41 -46
  42. package/dist/cli/register-operations.js.map +1 -1
  43. package/dist/cli/register-setup.js +119 -13
  44. package/dist/cli/register-setup.js.map +1 -1
  45. package/dist/cli/registration-helpers.d.ts +5 -1
  46. package/dist/cli/registration-helpers.js +14 -2
  47. package/dist/cli/registration-helpers.js.map +1 -1
  48. package/dist/cli-bundle/chunks/append-CDPAYYSB.js +11 -0
  49. package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-RSPHC423.js} +8 -9
  50. package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-2BVD4ZD2.js} +288 -233
  51. package/dist/cli-bundle/chunks/chunk-2BVD4ZD2.js.map +7 -0
  52. package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-2RADY7IB.js} +517 -195
  53. package/dist/cli-bundle/chunks/chunk-2RADY7IB.js.map +1 -0
  54. package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-3FRNNVWY.js} +518 -196
  55. package/dist/cli-bundle/chunks/chunk-3FRNNVWY.js.map +7 -0
  56. package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-3FUXM574.js} +8 -8
  57. package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-3SHDAKMF.js} +3 -3
  58. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-3UXIMY62.js} +4 -6
  59. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-3UXIMY62.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-3V5C7PUH.js} +2 -2
  61. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-3YJDIJIE.js} +4 -6
  62. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-3YJDIJIE.js.map} +1 -1
  63. package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-4I7KS5ES.js} +2 -2
  64. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-4OCWJ2AP.js} +13 -17
  65. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-4OCWJ2AP.js.map} +1 -1
  66. package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-5STY7NVM.js} +8 -8
  67. package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-5VAZHYVQ.js} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-6FU5BVRB.js} +12 -14
  69. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-6FU5BVRB.js.map} +1 -1
  70. package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-6RR4XM5H.js} +3 -3
  71. package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-6TD5QGIB.js} +7 -7
  72. package/dist/cli-bundle/chunks/chunk-6TD5QGIB.js.map +1 -0
  73. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-6WCXSC5V.js} +12 -16
  74. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-6WCXSC5V.js.map} +1 -1
  75. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-6ZKDMEVT.js} +7 -9
  76. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-6ZKDMEVT.js.map} +1 -1
  77. package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-7QKSLAHB.js} +2 -2
  78. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-7TBUV7XS.js} +8 -12
  79. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-7TBUV7XS.js.map} +1 -1
  80. package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-7UCBLJDF.js} +2 -2
  81. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-AEOFBBWO.js} +6 -8
  82. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-AEOFBBWO.js.map} +1 -1
  83. package/dist/cli-bundle/chunks/chunk-ASMRSIDX.js +10498 -0
  84. package/dist/cli-bundle/chunks/chunk-ASMRSIDX.js.map +7 -0
  85. package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-BFNFTHWQ.js} +3 -3
  86. package/dist/cli-bundle/chunks/chunk-BPJ5NYSJ.js +5509 -0
  87. package/dist/cli-bundle/chunks/chunk-BPJ5NYSJ.js.map +7 -0
  88. package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-C3YU3TXX.js} +2 -2
  89. package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-C6XSTACC.js} +11 -7
  90. package/dist/cli-bundle/chunks/chunk-C6XSTACC.js.map +7 -0
  91. package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-CGDUIPJL.js} +3 -3
  92. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-CXH7EMSB.js} +5 -7
  93. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-CXH7EMSB.js.map} +1 -1
  94. package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-D63PEJTB.js} +256 -36
  95. package/dist/cli-bundle/chunks/chunk-D63PEJTB.js.map +1 -0
  96. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-D6J5673C.js} +7 -9
  97. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-D6J5673C.js.map} +1 -1
  98. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-DUBC6TI3.js} +28 -34
  99. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-DUBC6TI3.js.map} +1 -1
  100. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-EEJKHF7M.js} +7 -6
  101. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-EEJKHF7M.js.map} +2 -2
  102. package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EP2CKDS7.js} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-EYPIUFWJ.js} +24 -32
  104. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-EYPIUFWJ.js.map} +1 -1
  105. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-F5DDGY6R.js} +6 -6
  106. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-F5DDGY6R.js.map} +1 -1
  107. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-FFB3WITE.js} +10 -16
  108. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-FFB3WITE.js.map} +1 -1
  109. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-FJR2S7S4.js} +10 -14
  110. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-FJR2S7S4.js.map} +1 -1
  111. package/dist/cli-bundle/chunks/chunk-FL625JJM.js +6792 -0
  112. package/dist/cli-bundle/chunks/chunk-FL625JJM.js.map +7 -0
  113. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-FOJEBRDD.js} +16 -20
  114. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-FOJEBRDD.js.map} +1 -1
  115. package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-G4FKP4ID.js} +1220 -398
  116. package/dist/cli-bundle/chunks/chunk-G4FKP4ID.js.map +1 -0
  117. package/dist/cli-bundle/chunks/chunk-GE44TQMC.js +6726 -0
  118. package/dist/cli-bundle/chunks/chunk-GE44TQMC.js.map +1 -0
  119. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-GLMJLBLR.js} +6 -10
  120. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-GLMJLBLR.js.map} +1 -1
  121. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-GO2X6ZRB.js} +4 -6
  122. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-GO2X6ZRB.js.map} +1 -1
  123. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-GQOKFX2G.js} +22 -26
  124. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-GQOKFX2G.js.map} +1 -1
  125. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-GSQVQINP.js} +8 -10
  126. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-GSQVQINP.js.map} +1 -1
  127. package/dist/cli-bundle/chunks/chunk-HI27UADG.js +5434 -0
  128. package/dist/cli-bundle/chunks/chunk-HI27UADG.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-HZZ3AC27.js} +6 -6
  130. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-HZZ3AC27.js.map} +1 -1
  131. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-IINCZYM3.js} +8 -12
  132. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-IINCZYM3.js.map} +1 -1
  133. package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-INOWVPUD.js} +37 -16
  134. package/dist/cli-bundle/chunks/chunk-INOWVPUD.js.map +1 -0
  135. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-IYRG5AEC.js} +15 -23
  136. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-IYRG5AEC.js.map} +1 -1
  137. package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-J6AD3GWC.js} +2 -2
  138. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-JH5XDDYS.js} +14 -20
  139. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-JH5XDDYS.js.map} +1 -1
  140. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-JYVPLGOW.js} +9 -11
  141. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-JYVPLGOW.js.map} +1 -1
  142. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-K52C6YPA.js} +12 -18
  143. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-K52C6YPA.js.map} +1 -1
  144. package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-KFL3XHMA.js} +2 -2
  145. package/dist/cli-bundle/chunks/chunk-KMXVZ2P7.js +10320 -0
  146. package/dist/cli-bundle/chunks/chunk-KMXVZ2P7.js.map +1 -0
  147. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-LD2NBQ5T.js} +6 -8
  148. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-LD2NBQ5T.js.map} +1 -1
  149. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-LG4N6YOK.js} +8 -7
  150. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-LG4N6YOK.js.map} +1 -1
  151. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-LHDHS4Z6.js} +10 -14
  152. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-LHDHS4Z6.js.map} +1 -1
  153. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-MCH6IKK7.js} +4 -6
  154. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-MCH6IKK7.js.map} +1 -1
  155. package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-MFLLULHU.js} +281 -233
  156. package/dist/cli-bundle/chunks/chunk-MFLLULHU.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-ML27MHNM.js} +35 -17
  158. package/dist/cli-bundle/chunks/chunk-ML27MHNM.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-MYHFZNBO.js} +20 -24
  160. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-MYHFZNBO.js.map} +1 -1
  161. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-NGBWEYNY.js} +12 -18
  162. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-NGBWEYNY.js.map} +1 -1
  163. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-NRMDT4OV.js} +10 -14
  164. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-NRMDT4OV.js.map} +1 -1
  165. package/dist/cli-bundle/chunks/chunk-NTOOEVJ4.js +5359 -0
  166. package/dist/cli-bundle/chunks/chunk-NTOOEVJ4.js.map +1 -0
  167. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-P2WE5KCU.js} +261 -34
  168. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-P2WE5KCU.js.map} +4 -4
  169. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-PAWPLIWW.js} +14 -20
  170. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-PAWPLIWW.js.map} +1 -1
  171. package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-PCBZ2VJD.js} +7 -7
  172. package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-PJPZTE7P.js} +1216 -387
  173. package/dist/cli-bundle/chunks/chunk-PJPZTE7P.js.map +7 -0
  174. package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-Q3CFSOQZ.js} +7 -7
  175. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-QJZM5WO5.js} +5 -5
  176. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-QJZM5WO5.js.map} +2 -2
  177. package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-QLEH6FTQ.js} +6 -6
  178. package/dist/cli-bundle/chunks/chunk-QLEH6FTQ.js.map +7 -0
  179. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-QYZMZD4L.js} +10 -12
  180. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-QYZMZD4L.js.map} +1 -1
  181. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-RDJXIAJB.js} +7 -11
  182. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-RDJXIAJB.js.map} +1 -1
  183. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-RFHLRMLQ.js} +6 -8
  184. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-RFHLRMLQ.js.map} +1 -1
  185. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-RL24NAUX.js} +10 -12
  186. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-RL24NAUX.js.map} +1 -1
  187. package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-RLHQ3G4M.js} +99 -51
  188. package/dist/cli-bundle/chunks/chunk-RLHQ3G4M.js.map +7 -0
  189. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-SCJPFQQT.js} +12 -18
  190. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-SCJPFQQT.js.map} +1 -1
  191. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-SIQGG335.js} +12 -16
  192. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-SIQGG335.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-SN5X5GTU.js} +8 -12
  194. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-SN5X5GTU.js.map} +1 -1
  195. package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-TKWTJGD6.js} +36 -15
  196. package/dist/cli-bundle/chunks/chunk-TKWTJGD6.js.map +7 -0
  197. package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-TR2C6V5T.js} +37 -19
  198. package/dist/cli-bundle/chunks/chunk-TR2C6V5T.js.map +7 -0
  199. package/dist/cli-bundle/chunks/chunk-TTCJCKUJ.js +5514 -0
  200. package/dist/cli-bundle/chunks/chunk-TTCJCKUJ.js.map +7 -0
  201. package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-TU5P744I.js} +4 -4
  202. package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-TUDAYIO7.js} +529 -46
  203. package/dist/cli-bundle/chunks/chunk-TUDAYIO7.js.map +1 -0
  204. package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-U72GF3I2.js} +12 -8
  205. package/dist/cli-bundle/chunks/chunk-U72GF3I2.js.map +1 -0
  206. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-UCRYCT5M.js} +30 -36
  207. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-UCRYCT5M.js.map} +1 -1
  208. package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-UEATYUZW.js} +2 -2
  209. package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-UFNFHCAC.js} +2 -2
  210. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-UH6VFRV6.js} +5 -7
  211. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-UH6VFRV6.js.map} +1 -1
  212. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-UIHDZS6X.js} +11 -15
  213. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-UIHDZS6X.js.map} +1 -1
  214. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-UURYLDDC.js} +14 -18
  215. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-UURYLDDC.js.map} +1 -1
  216. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-UVFJSKTF.js} +9 -13
  217. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-UVFJSKTF.js.map} +1 -1
  218. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-W2VFNVSJ.js} +6 -8
  219. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-W2VFNVSJ.js.map} +1 -1
  220. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-WVEMZZCR.js} +5 -5
  221. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-WVEMZZCR.js.map} +2 -2
  222. package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-XN5BEN2B.js} +94 -53
  223. package/dist/cli-bundle/chunks/chunk-XN5BEN2B.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XPSGJ4IV.js} +541 -44
  225. package/dist/cli-bundle/chunks/chunk-XPSGJ4IV.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-YQEKE4FO.js} +13 -21
  227. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-YQEKE4FO.js.map} +1 -1
  228. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-YR5R4FMQ.js} +26 -34
  229. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-YR5R4FMQ.js.map} +1 -1
  230. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-YSRXFGNV.js} +7 -9
  231. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-YSRXFGNV.js.map} +1 -1
  232. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-YUCKM3MD.js} +10 -14
  233. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-YUCKM3MD.js.map} +1 -1
  234. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-YUMNZS3X.js} +6 -8
  235. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-YUMNZS3X.js.map} +1 -1
  236. package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-Z2JQH2MG.js} +2 -2
  237. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-Z6RLSNUX.js} +4 -6
  238. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-Z6RLSNUX.js.map} +1 -1
  239. package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-ZMOPZFVT.js} +4 -4
  240. package/dist/cli-bundle/chunks/close-E3RLZSP2.js +12 -0
  241. package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-K6BFI3OX.js} +5 -9
  242. package/dist/cli-bundle/chunks/close-many-6NBL3PM4.js +26 -0
  243. package/dist/cli-bundle/chunks/close-many-X4YKS3RO.js +22 -0
  244. package/dist/cli-bundle/chunks/comments-PLFK5ZKK.js +17 -0
  245. package/dist/cli-bundle/chunks/comments-ZNOD5PTV.js +13 -0
  246. package/dist/cli-bundle/chunks/copy-F7BUFY4J.js +9 -0
  247. package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-VH3L4MN2.js} +4 -8
  248. package/dist/cli-bundle/chunks/create-AMBMYP6F.js +25 -0
  249. package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-TRIBYORN.js} +9 -14
  250. package/dist/cli-bundle/chunks/delete-6KQHZYIP.js +10 -0
  251. package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-ZNXUNCZR.js} +4 -8
  252. package/dist/cli-bundle/chunks/deps-CVDY7FFK.js +13 -0
  253. package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-SZXQHV73.js} +4 -8
  254. package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-DR74ITCD.js} +6 -10
  255. package/dist/cli-bundle/chunks/docs-WCVYY6I7.js +14 -0
  256. package/dist/cli-bundle/chunks/files-H5YCA74Z.js +18 -0
  257. package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-QEFQ2M3H.js} +6 -10
  258. package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-55TRYSNA.js} +7 -9
  259. package/dist/cli-bundle/chunks/focus-N2QGNS5D.js +10 -0
  260. package/dist/cli-bundle/chunks/history-compact-GWQ4UOEI.js +21 -0
  261. package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-JJZ4EFL3.js} +9 -13
  262. package/dist/cli-bundle/chunks/history-redact-4GJOLXCM.js +17 -0
  263. package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-TPPUT3A5.js} +7 -11
  264. package/dist/cli-bundle/chunks/history-repair-HVCVCGUF.js +19 -0
  265. package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-J7PIZ6ZP.js} +9 -13
  266. package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-KB6BT4NR.js} +9 -11
  267. package/dist/cli-bundle/chunks/learnings-YYY3U2Y7.js +13 -0
  268. package/dist/cli-bundle/chunks/notes-BGG7VL72.js +13 -0
  269. package/dist/cli-bundle/chunks/notes-ZTHXVOKM.js +17 -0
  270. package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-CJPKFRBK.js} +10 -15
  271. package/dist/cli-bundle/chunks/plan-MK2QY3GA.js +24 -0
  272. package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-AQNHXOYA.js} +9 -13
  273. package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-HTBFINKQ.js} +9 -13
  274. package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-EEF33SUJ.js} +43 -34
  275. package/dist/cli-bundle/chunks/register-list-query-EEF33SUJ.js.map +1 -0
  276. package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-S4FBWIWN.js} +42 -33
  277. package/dist/cli-bundle/chunks/register-list-query-S4FBWIWN.js.map +7 -0
  278. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-L5Q7AUDN.js} +34 -39
  279. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-L5Q7AUDN.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-QFLRBCI7.js} +36 -41
  281. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-QFLRBCI7.js.map} +1 -1
  282. package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-HDE4FVW4.js} +79 -46
  283. package/dist/cli-bundle/chunks/register-operations-HDE4FVW4.js.map +1 -0
  284. package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-QDU43FCG.js} +78 -45
  285. package/dist/cli-bundle/chunks/register-operations-QDU43FCG.js.map +7 -0
  286. package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-EGMTAXDC.js} +134 -32
  287. package/dist/cli-bundle/chunks/register-setup-EGMTAXDC.js.map +1 -0
  288. package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-PNIO3L2P.js} +133 -31
  289. package/dist/cli-bundle/chunks/register-setup-PNIO3L2P.js.map +7 -0
  290. package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-BTBEZ5CK.js} +7 -11
  291. package/dist/cli-bundle/chunks/restore-EX4UUZL6.js +15 -0
  292. package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DGSTYYQB.js} +6 -10
  293. package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-HAIBEE24.js} +6 -10
  294. package/dist/cli-bundle/chunks/update-MP4XLU56.js +25 -0
  295. package/dist/cli-bundle/chunks/update-SDIRJGSY.js +21 -0
  296. package/dist/cli-bundle/chunks/update-many-34AIU6W7.js +31 -0
  297. package/dist/cli-bundle/chunks/update-many-JUPCNOKV.js +35 -0
  298. package/dist/cli-bundle/main.js +56 -32
  299. package/dist/cli-bundle/main.js.map +2 -2
  300. package/dist/cli-bundle/sdk-runtime.js +161 -107
  301. package/dist/cli-bundle/sdk-testing.js +7 -8
  302. package/dist/cli-bundle/sdk.js +154 -117
  303. package/dist/cli-bundle/sdk.js.map +2 -2
  304. package/dist/core/extensions/extension-types.d.ts +1 -0
  305. package/dist/core/extensions/extension-types.js +2 -2
  306. package/dist/core/extensions/extension-types.js.map +1 -1
  307. package/dist/core/extensions/loader.js +268 -231
  308. package/dist/core/extensions/loader.js.map +1 -1
  309. package/dist/core/history/drift-scan.js +3 -8
  310. package/dist/core/history/drift-scan.js.map +1 -1
  311. package/dist/core/output/mutation-projection.js +11 -5
  312. package/dist/core/output/mutation-projection.js.map +1 -1
  313. package/dist/core/search/cache.js +3 -3
  314. package/dist/core/search/cache.js.map +1 -1
  315. package/dist/core/search/semantic-defaults.d.ts +2 -0
  316. package/dist/core/search/semantic-defaults.js +11 -4
  317. package/dist/core/search/semantic-defaults.js.map +1 -1
  318. package/dist/core/search/vector-stores.d.ts +1 -1
  319. package/dist/core/search/vector-stores.js +33 -7
  320. package/dist/core/search/vector-stores.js.map +1 -1
  321. package/dist/mcp/server.d.ts +1 -1
  322. package/dist/sdk/cli-contracts/commander-types.js +3 -3
  323. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  324. package/dist/sdk/cli-contracts/flag-contracts.js +12 -8
  325. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  326. package/dist/sdk/cli-contracts/tool-parameter-tables.js +10 -2
  327. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  328. package/dist/sdk/cli-contracts/tool-schema.js +14 -8
  329. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  330. package/dist/sdk/index.d.ts +1 -1
  331. package/dist/sdk/index.js +3 -3
  332. package/dist/sdk/index.js.map +1 -1
  333. package/dist/sdk/runtime.d.ts +282 -8
  334. package/dist/sdk/runtime.js +453 -14
  335. package/dist/sdk/runtime.js.map +1 -1
  336. package/dist/sdk/start-task-status.d.ts +13 -0
  337. package/dist/sdk/start-task-status.js +19 -0
  338. package/dist/sdk/start-task-status.js.map +1 -0
  339. package/docs/COMMANDS.md +10 -1
  340. package/docs/EXTENSIONS.md +7 -20
  341. package/docs/RELEASING.md +6 -0
  342. package/docs/SDK.md +65 -0
  343. package/docs/TESTING.md +3 -0
  344. package/package.json +2 -1
  345. package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
  346. package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
  347. package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
  348. package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
  349. package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
  350. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
  351. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
  352. package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
  353. package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
  354. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +0 -228
  355. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
  356. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
  357. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
  358. package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
  359. package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
  360. package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
  361. package/dist/cli-bundle/chunks/chunk-46CUF5L6.js.map +0 -7
  362. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
  363. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
  364. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +0 -249
  365. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
  366. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
  367. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
  368. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
  369. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
  370. package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
  372. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
  373. package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
  374. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
  375. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
  376. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
  377. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
  378. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
  379. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js.map +0 -1
  380. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
  381. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
  382. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +0 -421
  383. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
  384. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
  385. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
  386. package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
  387. package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
  388. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
  389. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
  390. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
  391. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
  392. package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
  393. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
  394. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
  395. package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
  396. package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
  397. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
  398. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
  399. package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
  400. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
  401. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
  402. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
  403. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
  404. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
  405. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
  406. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
  407. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
  408. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
  409. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
  410. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
  411. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
  412. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
  413. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
  414. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
  415. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
  416. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
  417. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
  418. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +0 -2257
  419. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
  420. package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
  421. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
  422. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
  423. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
  424. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
  425. package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js.map +0 -7
  426. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
  427. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
  428. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
  429. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
  430. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
  431. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
  432. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
  433. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
  434. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
  435. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
  436. package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
  437. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
  438. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
  439. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
  440. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
  441. package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
  442. package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
  443. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
  444. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
  445. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
  446. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
  447. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +0 -143
  448. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
  449. package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
  450. package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
  451. package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
  452. package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
  453. package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
  454. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
  455. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
  456. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +0 -520
  457. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
  458. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
  459. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
  460. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
  461. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
  462. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
  463. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
  464. package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
  465. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
  466. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
  467. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
  468. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
  469. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
  470. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
  471. package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
  472. package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
  473. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
  474. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
  475. package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
  476. package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
  477. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
  478. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
  479. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
  480. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
  481. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +0 -3423
  482. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
  483. package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
  484. package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
  485. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
  486. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
  487. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
  488. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
  489. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
  490. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
  491. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
  492. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
  493. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
  494. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
  495. package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
  496. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
  497. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
  498. package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
  499. package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
  500. package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
  501. package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
  502. package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
  503. package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
  504. package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
  505. package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
  506. package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
  507. package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
  508. package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
  509. package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
  510. package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
  511. package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
  512. package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
  513. package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
  514. package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
  515. package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
  516. package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
  517. package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
  518. package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
  519. package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
  520. package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
  521. package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
  522. package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
  523. package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
  524. package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
  525. package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
  526. package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
  527. package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
  528. package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
  529. package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
  530. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
  531. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
  532. package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
  533. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
  534. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
  535. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
  536. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
  537. package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
  538. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
  539. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
  540. package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
  541. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
  542. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
  543. package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
  544. package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
  545. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
  546. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
  547. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
  548. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
  549. package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
  550. package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
  551. package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
  552. package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
  553. package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
  554. package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
  555. package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
  556. package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
  557. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
  558. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
  559. package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
  560. package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
  561. package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
  562. package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
  563. package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
  564. package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
  565. package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
  566. package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
  567. package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
  568. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
  569. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
  570. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
  571. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
  572. package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
  573. package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
  574. package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
  575. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
  576. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
  577. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
  578. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
  579. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
  580. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
  581. package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
  582. package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
  583. package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
  584. package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
  585. package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
  586. package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
  587. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
  588. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
  589. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
  590. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
  591. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
  592. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
  593. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
  594. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
  595. package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
  596. package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
  597. package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
  598. package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
  599. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
  600. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
  601. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
  602. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
  603. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
  604. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
  605. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
  606. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
  607. package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
  608. package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
  609. package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
  610. package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
  611. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
  612. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
  613. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
  614. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
  615. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
  616. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
  617. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
  618. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
  619. package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
  620. package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
  621. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
  622. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
  623. /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-CDPAYYSB.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-RSPHC423.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-3FUXM574.js.map} +0 -0
  626. /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-3SHDAKMF.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-3V5C7PUH.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-4I7KS5ES.js.map} +0 -0
  629. /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-5STY7NVM.js.map} +0 -0
  630. /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-5VAZHYVQ.js.map} +0 -0
  631. /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-6RR4XM5H.js.map} +0 -0
  632. /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-7QKSLAHB.js.map} +0 -0
  633. /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-7UCBLJDF.js.map} +0 -0
  634. /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-BFNFTHWQ.js.map} +0 -0
  635. /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-C3YU3TXX.js.map} +0 -0
  636. /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-CGDUIPJL.js.map} +0 -0
  637. /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EP2CKDS7.js.map} +0 -0
  638. /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-J6AD3GWC.js.map} +0 -0
  639. /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-KFL3XHMA.js.map} +0 -0
  640. /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-PCBZ2VJD.js.map} +0 -0
  641. /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-Q3CFSOQZ.js.map} +0 -0
  642. /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-TU5P744I.js.map} +0 -0
  643. /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-UEATYUZW.js.map} +0 -0
  644. /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-UFNFHCAC.js.map} +0 -0
  645. /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-Z2JQH2MG.js.map} +0 -0
  646. /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-ZMOPZFVT.js.map} +0 -0
  647. /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-E3RLZSP2.js.map} +0 -0
  648. /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-K6BFI3OX.js.map} +0 -0
  649. /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-6NBL3PM4.js.map} +0 -0
  650. /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-X4YKS3RO.js.map} +0 -0
  651. /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-PLFK5ZKK.js.map} +0 -0
  652. /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-ZNOD5PTV.js.map} +0 -0
  653. /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-F7BUFY4J.js.map} +0 -0
  654. /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-VH3L4MN2.js.map} +0 -0
  655. /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AMBMYP6F.js.map} +0 -0
  656. /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-TRIBYORN.js.map} +0 -0
  657. /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-6KQHZYIP.js.map} +0 -0
  658. /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-ZNXUNCZR.js.map} +0 -0
  659. /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-CVDY7FFK.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-SZXQHV73.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-DR74ITCD.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-WCVYY6I7.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-H5YCA74Z.js.map} +0 -0
  664. /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-QEFQ2M3H.js.map} +0 -0
  665. /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-55TRYSNA.js.map} +0 -0
  666. /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-N2QGNS5D.js.map} +0 -0
  667. /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-GWQ4UOEI.js.map} +0 -0
  668. /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-JJZ4EFL3.js.map} +0 -0
  669. /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-4GJOLXCM.js.map} +0 -0
  670. /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-TPPUT3A5.js.map} +0 -0
  671. /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-HVCVCGUF.js.map} +0 -0
  672. /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-J7PIZ6ZP.js.map} +0 -0
  673. /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-KB6BT4NR.js.map} +0 -0
  674. /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-YYY3U2Y7.js.map} +0 -0
  675. /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-BGG7VL72.js.map} +0 -0
  676. /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-ZTHXVOKM.js.map} +0 -0
  677. /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-CJPKFRBK.js.map} +0 -0
  678. /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-MK2QY3GA.js.map} +0 -0
  679. /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-AQNHXOYA.js.map} +0 -0
  680. /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-HTBFINKQ.js.map} +0 -0
  681. /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-BTBEZ5CK.js.map} +0 -0
  682. /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-EX4UUZL6.js.map} +0 -0
  683. /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DGSTYYQB.js.map} +0 -0
  684. /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-HAIBEE24.js.map} +0 -0
  685. /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-MP4XLU56.js.map} +0 -0
  686. /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-SDIRJGSY.js.map} +0 -0
  687. /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-34AIU6W7.js.map} +0 -0
  688. /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-JUPCNOKV.js.map} +0 -0
@@ -1,1985 +0,0 @@
1
- import {
2
- LINKED_TEST_PM_CONTEXT_MODE_VALUES,
3
- LINKED_TEST_PROTECTED_ENV_KEYS,
4
- looksLikeStructuredLinkedTestEntry,
5
- normalizeStructuredLinkedTestEntry,
6
- parseLinkedTestAssertionEqualsMap,
7
- parseLinkedTestAssertionGteMap,
8
- parseLinkedTestBoolean,
9
- parseLinkedTestContextMode,
10
- parseLinkedTestEnvClear,
11
- parseLinkedTestEnvSet,
12
- parseLinkedTestJsonEntries,
13
- parseLinkedTestMinLines,
14
- parseLinkedTestRegexList,
15
- parseLinkedTestStringList
16
- } from "./chunk-GPLPTGOV.js";
17
- import {
18
- createStdinTokenResolver,
19
- parseCsvKv,
20
- parseOptionalNumber
21
- } from "./chunk-AZYGZGGI.js";
22
- import {
23
- runInit
24
- } from "./chunk-GZRDYONU.js";
25
- import {
26
- locateItem,
27
- mutateItem,
28
- readLocatedItem
29
- } from "./chunk-5VAA4YHR.js";
30
- import {
31
- compareTimestampStrings,
32
- nowIso
33
- } from "./chunk-FLZSGSQR.js";
34
- import {
35
- PmCliError,
36
- getActiveExtensionRegistrations,
37
- readSettings,
38
- stableValueEquals
39
- } from "./chunk-SHQY2IDC.js";
40
- import {
41
- EXIT_CODE,
42
- ITEM_FILE_EXTENSIONS,
43
- SCOPE_VALUES,
44
- getSettingsPath,
45
- pathExists,
46
- resolveGlobalPmRoot,
47
- resolveItemTypeRegistry,
48
- resolvePmRoot
49
- } from "./chunk-LK6XLOGP.js";
50
-
51
- // dist/cli/commands/test.js
52
- import { spawn } from "node:child_process";
53
- import { cp, mkdir, mkdtemp, readdir, rm } from "node:fs/promises";
54
- import { tmpdir } from "node:os";
55
- import path from "node:path";
56
-
57
- // dist/core/test/item-test-run-tracking.js
58
- !(function() {
59
- try {
60
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
61
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7681f869-8f0d-5927-86ac-af1ef0dfd5fd");
62
- } catch (e2) {
63
- }
64
- })();
65
- var DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT = 20;
66
- function trackedTestRunHistoryLimit() {
67
- const raw = process.env.PM_TRACKED_TEST_RUN_HISTORY_LIMIT;
68
- if (!raw || raw.trim().length === 0) {
69
- return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
70
- }
71
- const parsed = Number.parseInt(raw, 10);
72
- if (!Number.isFinite(parsed) || parsed <= 0) {
73
- return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
74
- }
75
- return parsed;
76
- }
77
- function normalizeTrackedTestRunSummaries(entries) {
78
- return [...entries].filter((entry) => entry.run_id.trim().length > 0 && entry.started_at.trim().length > 0 && entry.finished_at.trim().length > 0 && entry.recorded_at.trim().length > 0).sort((left, right) => {
79
- const byRecorded = compareTimestampStrings(left.recorded_at, right.recorded_at);
80
- if (byRecorded !== 0)
81
- return byRecorded;
82
- const byRunId = left.run_id.localeCompare(right.run_id);
83
- if (byRunId !== 0)
84
- return byRunId;
85
- return left.kind.localeCompare(right.kind);
86
- });
87
- }
88
- async function appendTrackedTestRunSummary(options) {
89
- const historyLimit = trackedTestRunHistoryLimit();
90
- await mutateItem({
91
- pmRoot: options.pmRoot,
92
- settings: options.settings,
93
- id: options.itemId,
94
- op: "test_run_track",
95
- author: options.author,
96
- message: options.message,
97
- force: false,
98
- mutate(document) {
99
- const current = document.metadata.test_runs ?? [];
100
- const next = normalizeTrackedTestRunSummaries([...current, options.entry]);
101
- const bounded = next.length > historyLimit ? next.slice(next.length - historyLimit) : next;
102
- document.metadata.test_runs = bounded;
103
- return { changedFields: ["test_runs"] };
104
- }
105
- });
106
- }
107
-
108
- // dist/core/test/run-selectors.js
109
- !(function() {
110
- try {
111
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
112
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "bdcc9109-f60d-5068-b2c2-bcc9dc9d5e50");
113
- } catch (e2) {
114
- }
115
- })();
116
- var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
117
- function parseOnlyIndexValue(raw, optionName = "--only-index") {
118
- const value = typeof raw === "number" ? raw : Number(String(raw).trim());
119
- if (!Number.isInteger(value) || value < 1) {
120
- throw new PmCliError(`${optionName} requires a 1-based integer index into the linked-test list (got "${raw}"). Use pm test <id> --list to inspect positions.`, EXIT_CODE.USAGE);
121
- }
122
- return value;
123
- }
124
- function summarizeSelectorEntry(entry) {
125
- const label = entry.command ?? entry.path ?? "<no command>";
126
- const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
127
- if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
128
- return normalized;
129
- }
130
- return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
131
- }
132
- function describeLinkedTestEntries(tests) {
133
- return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
134
- }
135
- function activeSelectorKinds(selector) {
136
- const kinds = [];
137
- if (selector.match !== void 0) {
138
- kinds.push("match");
139
- }
140
- if (selector.onlyIndex !== void 0) {
141
- kinds.push("only-index");
142
- }
143
- if (selector.onlyLast === true) {
144
- kinds.push("only-last");
145
- }
146
- return kinds;
147
- }
148
- function entryMatchesSubstring(entry, needle) {
149
- const command = entry.command?.toLowerCase() ?? "";
150
- const entryPath = entry.path?.toLowerCase() ?? "";
151
- return command.includes(needle) || entryPath.includes(needle);
152
- }
153
- function resolveLinkedTestRunSelection(tests, selector) {
154
- const kinds = activeSelectorKinds(selector);
155
- if (kinds.length === 0) {
156
- return {
157
- selector: null,
158
- requested: null,
159
- selected: tests,
160
- selected_indexes: tests.map((_, index) => index + 1),
161
- selected_count: tests.length,
162
- skipped_count: 0
163
- };
164
- }
165
- if (kinds.length > 1) {
166
- throw new PmCliError(`Combine at most one linked-test selector per run: ${kinds.map((kind2) => `--${kind2}`).join(" and ")} were provided. Pick one of --match, --only-index, --only-last.`, EXIT_CODE.USAGE);
167
- }
168
- const kind = kinds[0];
169
- if (tests.length === 0) {
170
- throw new PmCliError(`--${kind} matched no linked tests because this item has none. Add one first with --add, --command, or --add-json.`, EXIT_CODE.USAGE);
171
- }
172
- if (kind === "match") {
173
- const needle = selector.match.trim().toLowerCase();
174
- if (needle.length === 0) {
175
- throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
176
- }
177
- const selectedIndexes = [];
178
- const selected = [];
179
- for (let index = 0; index < tests.length; index += 1) {
180
- if (entryMatchesSubstring(tests[index], needle)) {
181
- selected.push(tests[index]);
182
- selectedIndexes.push(index + 1);
183
- }
184
- }
185
- if (selected.length === 0) {
186
- throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
187
- }
188
- return {
189
- selector: "match",
190
- requested: selector.match,
191
- selected,
192
- selected_indexes: selectedIndexes,
193
- selected_count: selected.length,
194
- skipped_count: tests.length - selected.length
195
- };
196
- }
197
- if (kind === "only-index") {
198
- const index = parseOnlyIndexValue(selector.onlyIndex);
199
- if (index > tests.length) {
200
- throw new PmCliError(`--only-index ${index} is out of range: this item has ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
201
- }
202
- return {
203
- selector: "only-index",
204
- requested: String(index),
205
- selected: [tests[index - 1]],
206
- selected_indexes: [index],
207
- selected_count: 1,
208
- skipped_count: tests.length - 1
209
- };
210
- }
211
- return {
212
- selector: "only-last",
213
- requested: "last",
214
- selected: [tests[tests.length - 1]],
215
- selected_indexes: [tests.length],
216
- selected_count: 1,
217
- skipped_count: tests.length - 1
218
- };
219
- }
220
-
221
- // dist/cli/commands/test/linked-command-detection.js
222
- !(function() {
223
- try {
224
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
225
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5d95440c-7913-547a-ae78-d9fe282d8edb");
226
- } catch (e2) {
227
- }
228
- })();
229
- var PM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["--path"]);
230
- var NPX_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["-p", "--package", "-c", "--call"]);
231
- var PNPM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
232
- "-c",
233
- "-C",
234
- "--config",
235
- "--dir",
236
- "--filter",
237
- "--workspace-dir"
238
- ]);
239
- var NPM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["-C", "--prefix", "--userconfig", "--cache"]);
240
- var YARN_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["--cwd"]);
241
- var BUN_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["--cwd"]);
242
- var NPM_EXEC_SUBCOMMANDS = /* @__PURE__ */ new Set(["exec", "x"]);
243
- var SCRIPT_RUN_SUBCOMMANDS = /* @__PURE__ */ new Set(["run", "run-script"]);
244
- var SCRIPT_RUN_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["-C", "--dir", "--cwd", "-w", "--workspace", "--filter"]);
245
- function splitNormalizedCommandSegments(normalizedCommand) {
246
- return normalizedCommand.split(/&&|\|\||\||;/).map((segment) => segment.trim()).filter((segment) => segment.length > 0);
247
- }
248
- function stripLeadingEnvAssignments(tokens) {
249
- let start = 0;
250
- if (tokens[start] === "env") {
251
- start += 1;
252
- }
253
- while (start < tokens.length) {
254
- const token = tokens[start];
255
- if (/^(?:[a-z_][a-z0-9_]*|\$env:[a-z_][a-z0-9_]*)=.*/.test(token)) {
256
- start += 1;
257
- continue;
258
- }
259
- break;
260
- }
261
- return tokens.slice(start);
262
- }
263
- function firstPmSubcommand(args) {
264
- let index = 0;
265
- while (index < args.length) {
266
- const token = args[index];
267
- if (token === "--") {
268
- index += 1;
269
- continue;
270
- }
271
- if (token.startsWith("-")) {
272
- if (PM_GLOBAL_FLAGS_WITH_VALUE.has(token)) {
273
- index += 2;
274
- continue;
275
- }
276
- index += 1;
277
- continue;
278
- }
279
- return token;
280
- }
281
- return void 0;
282
- }
283
- function isPmExecutableToken(token) {
284
- return token === "pm" || token === "pm.cmd" || token === "pm.exe" || token.endsWith("/pm") || token.endsWith("/pm.cmd") || token.endsWith("/pm.exe");
285
- }
286
- function normalizePackageSpecifier(token) {
287
- const trimmed = token.trim();
288
- if (!trimmed.startsWith("@")) {
289
- const versionSeparator2 = trimmed.indexOf("@");
290
- return versionSeparator2 === -1 ? trimmed : trimmed.slice(0, versionSeparator2);
291
- }
292
- const scopeSeparator = trimmed.indexOf("/");
293
- if (scopeSeparator === -1) {
294
- return trimmed;
295
- }
296
- const versionSeparator = trimmed.indexOf("@", scopeSeparator + 1);
297
- return versionSeparator === -1 ? trimmed : trimmed.slice(0, versionSeparator);
298
- }
299
- function isPmCliPackageToken(token) {
300
- const normalizedSpecifier = normalizePackageSpecifier(token);
301
- return normalizedSpecifier === "pm-cli" || normalizedSpecifier.endsWith("/pm-cli") || token === "pm-cli" || token.endsWith("/pm-cli");
302
- }
303
- function isPmCliScriptToken(token) {
304
- return token === "dist/cli.js" || token === "./dist/cli.js" || token.endsWith("/dist/cli.js");
305
- }
306
- function parseNpxCommand(tokens) {
307
- let index = 0;
308
- while (index < tokens.length) {
309
- const token = tokens[index];
310
- if (token === "--") {
311
- index += 1;
312
- break;
313
- }
314
- if (!token.startsWith("-")) {
315
- break;
316
- }
317
- if (token.includes("=")) {
318
- index += 1;
319
- continue;
320
- }
321
- if (NPX_FLAGS_WITH_VALUE.has(token)) {
322
- index += 2;
323
- continue;
324
- }
325
- index += 1;
326
- }
327
- const command = tokens[index];
328
- if (!command) {
329
- return null;
330
- }
331
- return {
332
- command,
333
- args: tokens.slice(index + 1)
334
- };
335
- }
336
- function parseLauncherSubcommand(tokens, flagsWithValue) {
337
- let index = 0;
338
- while (index < tokens.length) {
339
- const token = tokens[index];
340
- if (token === "--") {
341
- index += 1;
342
- continue;
343
- }
344
- if (token.startsWith("-")) {
345
- if (token.includes("=")) {
346
- index += 1;
347
- continue;
348
- }
349
- if (flagsWithValue.has(token)) {
350
- index += 2;
351
- continue;
352
- }
353
- index += 1;
354
- continue;
355
- }
356
- return {
357
- subcommand: token,
358
- args: tokens.slice(index + 1)
359
- };
360
- }
361
- return null;
362
- }
363
- function parsePnpmDlxCommand(tokens) {
364
- const parsed = parseLauncherSubcommand(tokens, PNPM_GLOBAL_FLAGS_WITH_VALUE);
365
- if (parsed?.subcommand !== "dlx") {
366
- return null;
367
- }
368
- return parseNpxCommand(parsed.args);
369
- }
370
- function parseNpmExecCommand(tokens) {
371
- const parsed = parseLauncherSubcommand(tokens, NPM_GLOBAL_FLAGS_WITH_VALUE);
372
- if (!parsed || !NPM_EXEC_SUBCOMMANDS.has(parsed.subcommand)) {
373
- return null;
374
- }
375
- return parseNpxCommand(parsed.args);
376
- }
377
- function resolvePmSubcommandContext(args) {
378
- let index = 0;
379
- while (index < args.length) {
380
- const token = args[index];
381
- if (token === "--") {
382
- index += 1;
383
- continue;
384
- }
385
- if (token.startsWith("-")) {
386
- if (PM_GLOBAL_FLAGS_WITH_VALUE.has(token)) {
387
- index += 2;
388
- continue;
389
- }
390
- index += 1;
391
- continue;
392
- }
393
- return {
394
- subcommand: token,
395
- remaining: args.slice(index + 1)
396
- };
397
- }
398
- return null;
399
- }
400
- function firstPositionalToken(tokens) {
401
- for (const token of tokens) {
402
- if (!token.startsWith("-")) {
403
- return token;
404
- }
405
- }
406
- return void 0;
407
- }
408
-
409
- // dist/cli/commands/test.js
410
- !(function() {
411
- try {
412
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
413
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "caa941ed-c848-506c-9a3c-3d4959be0246");
414
- } catch (e2) {
415
- }
416
- })();
417
- var TEST_OUTPUT_MAX_BUFFER_BYTES = 20 * 1024 * 1024;
418
- var DEFAULT_LINKED_TEST_TIMEOUT_FORCE_KILL_DELAY_MS = 3e3;
419
- var DEFAULT_LINKED_TEST_HEARTBEAT_INTERVAL_MS = 1e4;
420
- var DEFAULT_LINKED_TEST_PIPE_CLOSE_GRACE_MS = 5e3;
421
- var MAX_LINKED_TEST_COMMAND_LABEL_LENGTH = 120;
422
- var LINKED_TEST_TRACKER_DIRS_TO_SKIP = /* @__PURE__ */ new Set(["locks", "extensions", "runtime"]);
423
- var LINKED_TEST_ITEM_COUNT_DIRS_TO_SKIP = /* @__PURE__ */ new Set(["history", "index", "search", "extensions", "locks", "runtime"]);
424
- var LINKED_TEST_INFRA_COLLISION_PATTERNS = [
425
- /eaddrinuse/i,
426
- /address already in use/i,
427
- /port\s+\d+\s+is already in use/i,
428
- /web server[^.\n]*already running/i,
429
- /failed to listen on/i
430
- ];
431
- var PM_SUBCOMMANDS_WITH_ITEM_REFERENCE = /* @__PURE__ */ new Set([
432
- "get",
433
- "history",
434
- "restore",
435
- "update",
436
- "close",
437
- "delete",
438
- "append",
439
- "claim",
440
- "release",
441
- "comments",
442
- "notes",
443
- "learnings",
444
- "files",
445
- "docs",
446
- "deps",
447
- "test"
448
- ]);
449
- var PM_TRACKER_READ_SUBCOMMANDS = /* @__PURE__ */ new Set([
450
- "activity",
451
- "calendar",
452
- "context",
453
- "ctx",
454
- "deps",
455
- "get",
456
- "health",
457
- "history",
458
- "list",
459
- "list-all",
460
- "list-blocked",
461
- "list-canceled",
462
- "list-closed",
463
- "list-draft",
464
- "list-in-progress",
465
- "list-open",
466
- "search",
467
- "stats",
468
- "test-all",
469
- "validate"
470
- ]);
471
- function readPositiveIntegerEnv(name, fallback) {
472
- const raw = process.env[name];
473
- if (typeof raw !== "string" || raw.trim().length === 0) {
474
- return fallback;
475
- }
476
- const parsed = Number.parseInt(raw, 10);
477
- if (!Number.isFinite(parsed) || parsed <= 0) {
478
- return fallback;
479
- }
480
- return parsed;
481
- }
482
- function linkedTestTimeoutForceKillDelayMs() {
483
- return readPositiveIntegerEnv("PM_LINKED_TEST_TIMEOUT_FORCE_KILL_DELAY_MS", DEFAULT_LINKED_TEST_TIMEOUT_FORCE_KILL_DELAY_MS);
484
- }
485
- function linkedTestHeartbeatIntervalMs() {
486
- return readPositiveIntegerEnv("PM_LINKED_TEST_HEARTBEAT_INTERVAL_MS", DEFAULT_LINKED_TEST_HEARTBEAT_INTERVAL_MS);
487
- }
488
- function linkedTestPipeCloseGraceMs() {
489
- return readPositiveIntegerEnv("PM_LINKED_TEST_PIPE_CLOSE_GRACE_MS", DEFAULT_LINKED_TEST_PIPE_CLOSE_GRACE_MS);
490
- }
491
- function resolveAuthor(candidate, fallback) {
492
- const resolved = candidate ?? process.env.PM_AUTHOR ?? fallback;
493
- const trimmed = resolved.trim();
494
- return trimmed || "unknown";
495
- }
496
- function resolveTrackedRunId(kind) {
497
- const fromEnv = process.env.PM_BACKGROUND_TEST_RUN_ID?.trim();
498
- if (fromEnv && fromEnv.length > 0) {
499
- return fromEnv;
500
- }
501
- return `${kind}-local-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
502
- }
503
- function summarizeRunResultStatuses(results) {
504
- let passed = 0;
505
- let failed = 0;
506
- let skipped = 0;
507
- for (const entry of results) {
508
- if (entry.status === "passed") {
509
- passed += 1;
510
- continue;
511
- }
512
- if (entry.status === "failed") {
513
- failed += 1;
514
- continue;
515
- }
516
- skipped += 1;
517
- }
518
- return { passed, failed, skipped };
519
- }
520
- function summarizeContextPreflight(runResults) {
521
- let checkedPmCommands = 0;
522
- let trackerReadCommands = 0;
523
- let mismatches = 0;
524
- let autoRemediated = 0;
525
- for (const result of runResults) {
526
- const context = result.execution_context;
527
- if (!context || context.is_pm_command !== true) {
528
- continue;
529
- }
530
- checkedPmCommands += 1;
531
- if (context.is_pm_tracker_read_command === true) {
532
- trackerReadCommands += 1;
533
- }
534
- if (context.mismatch_detected === true) {
535
- mismatches += 1;
536
- }
537
- if (context.auto_pm_context_applied === true) {
538
- autoRemediated += 1;
539
- }
540
- }
541
- return {
542
- checked_pm_commands: checkedPmCommands,
543
- tracker_read_commands: trackerReadCommands,
544
- mismatches,
545
- auto_remediated: autoRemediated
546
- };
547
- }
548
- function ensureScope(raw) {
549
- const value = raw ?? "project";
550
- if (!SCOPE_VALUES.includes(value)) {
551
- throw new PmCliError(`Invalid scope "${raw}"`, EXIT_CODE.USAGE);
552
- }
553
- return value;
554
- }
555
- function parsePmContextMode(raw) {
556
- if (!raw) {
557
- return "schema";
558
- }
559
- const normalized = raw.trim().toLowerCase();
560
- if (LINKED_TEST_PM_CONTEXT_MODE_VALUES.includes(normalized)) {
561
- return normalized;
562
- }
563
- throw new PmCliError(`Invalid --pm-context value "${raw}". Expected one of: ${LINKED_TEST_PM_CONTEXT_MODE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
564
- }
565
- function resolveLinkedTestRequestedContextMode(linkedTest, runLevelMode, overrideLinkedPmContext) {
566
- if (overrideLinkedPmContext) {
567
- return runLevelMode;
568
- }
569
- if (typeof linkedTest.pm_context_mode !== "string" || linkedTest.pm_context_mode.trim().length === 0) {
570
- return runLevelMode;
571
- }
572
- return parsePmContextMode(linkedTest.pm_context_mode);
573
- }
574
- function resolveLinkedTestEffectiveContextMode(requestedMode, isPmTrackerReadCommand) {
575
- if (requestedMode === "auto") {
576
- return isPmTrackerReadCommand ? "tracker" : "schema";
577
- }
578
- return requestedMode;
579
- }
580
- function hasLinkedTestAssertions(linkedTest) {
581
- return (linkedTest.assert_stdout_contains?.length ?? 0) > 0 || (linkedTest.assert_stdout_regex?.length ?? 0) > 0 || (linkedTest.assert_stderr_contains?.length ?? 0) > 0 || (linkedTest.assert_stderr_regex?.length ?? 0) > 0 || typeof linkedTest.assert_stdout_min_lines === "number" || Object.keys(linkedTest.assert_json_field_equals ?? {}).length > 0 || Object.keys(linkedTest.assert_json_field_gte ?? {}).length > 0;
582
- }
583
- function buildPmContextMismatchHint(params) {
584
- const { executionContext, runLevelPmContextMode, linkedOverridePmContextMode } = params;
585
- if (!executionContext.is_pm_tracker_read_command || !executionContext.mismatch_detected) {
586
- return "";
587
- }
588
- if (runLevelPmContextMode === "tracker" && linkedOverridePmContextMode === "schema") {
589
- return " Linked test metadata pm_context_mode=schema overrides run-level --pm-context tracker. Set pm_context_mode=tracker (or auto) on the linked test, or remove the override, to run against seeded tracker data.";
590
- }
591
- if (executionContext.pm_context_mode === "schema") {
592
- return " Use --pm-context tracker to run PM tracker-read commands against seeded tracker data.";
593
- }
594
- return "";
595
- }
596
- function mergeEnvSetDirectives(entries, optionName) {
597
- const merged = {};
598
- if (!entries) {
599
- return merged;
600
- }
601
- for (const entry of entries) {
602
- const parsed = parseLinkedTestEnvSet(entry, optionName);
603
- if (!parsed) {
604
- continue;
605
- }
606
- for (const [key, value] of Object.entries(parsed)) {
607
- merged[key] = value;
608
- }
609
- }
610
- return merged;
611
- }
612
- function mergeEnvClearDirectives(entries, optionName) {
613
- if (!entries) {
614
- return [];
615
- }
616
- const values = [];
617
- for (const entry of entries) {
618
- const parsed = parseLinkedTestEnvClear(entry, optionName);
619
- if (parsed) {
620
- values.push(...parsed);
621
- }
622
- }
623
- return [...new Set(values)];
624
- }
625
- function looksLikePrefixedItemId(token, idPrefix) {
626
- const normalizedPrefix = idPrefix.trim().toLowerCase().replace(/-+$/, "");
627
- if (normalizedPrefix.length === 0) {
628
- return false;
629
- }
630
- const normalized = token.trim().toLowerCase();
631
- if (!normalized.startsWith(`${normalizedPrefix}-`)) {
632
- return false;
633
- }
634
- return normalized.length > normalizedPrefix.length + 1;
635
- }
636
- function extractPmInvocationArgsFromSegment(segment) {
637
- const rawTokens = segment.split(" ").filter((token) => token.length > 0);
638
- const tokens = stripLeadingEnvAssignments(rawTokens);
639
- if (tokens.length === 0) {
640
- return null;
641
- }
642
- const [executable, ...args] = tokens;
643
- if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
644
- return args;
645
- }
646
- if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
647
- return args.slice(1);
648
- }
649
- return extractPackageManagerPmInvocationArgs(executable, args);
650
- }
651
- function extractPackageManagerPmInvocationArgs(executable, args) {
652
- const parsed = parsePackageManagerPmInvocation(executable, args);
653
- if (!parsed || !isPmExecutableToken(parsed.command) && !isPmCliPackageToken(parsed.command)) {
654
- return null;
655
- }
656
- return parsed.args;
657
- }
658
- function parsePackageManagerPmInvocation(executable, args) {
659
- if (executable === "npx" || executable === "bunx") {
660
- return parseNpxCommand(args);
661
- }
662
- if (executable === "pnpm") {
663
- return parsePnpmDlxCommand(args);
664
- }
665
- if (executable === "npm") {
666
- return parseNpmExecCommand(args);
667
- }
668
- return null;
669
- }
670
- function commandInvokesPmCli(command) {
671
- const normalizedCommand = normalizeCommandForValidation(command);
672
- return splitNormalizedCommandSegments(normalizedCommand).some((segment) => extractPmInvocationArgsFromSegment(segment) !== null);
673
- }
674
- function commandInvokesPmTrackerReadCommand(command) {
675
- const normalizedCommand = normalizeCommandForValidation(command);
676
- return splitNormalizedCommandSegments(normalizedCommand).some((segment) => {
677
- const invocationArgs = extractPmInvocationArgsFromSegment(segment);
678
- if (!invocationArgs) {
679
- return false;
680
- }
681
- const context = resolvePmSubcommandContext(invocationArgs);
682
- if (!context) {
683
- return false;
684
- }
685
- return PM_TRACKER_READ_SUBCOMMANDS.has(context.subcommand);
686
- });
687
- }
688
- function extractReferencedPmItemIdsFromCommand(command, idPrefix = "pm") {
689
- const normalizedCommand = normalizeCommandForValidation(command);
690
- const ids = /* @__PURE__ */ new Set();
691
- for (const segment of splitNormalizedCommandSegments(normalizedCommand)) {
692
- const invocationArgs = extractPmInvocationArgsFromSegment(segment);
693
- if (!invocationArgs) {
694
- continue;
695
- }
696
- const context = resolvePmSubcommandContext(invocationArgs);
697
- if (!context) {
698
- continue;
699
- }
700
- if (!PM_SUBCOMMANDS_WITH_ITEM_REFERENCE.has(context.subcommand)) {
701
- continue;
702
- }
703
- const candidate = firstPositionalToken(context.remaining);
704
- if (!candidate) {
705
- continue;
706
- }
707
- if (looksLikePrefixedItemId(candidate, idPrefix)) {
708
- ids.add(candidate);
709
- }
710
- }
711
- return [...ids].sort((left, right) => left.localeCompare(right));
712
- }
713
- function resolveDirectRunnerSubcommand(parsed) {
714
- if (!parsed) {
715
- return void 0;
716
- }
717
- if (!SCRIPT_RUN_SUBCOMMANDS.has(parsed.subcommand)) {
718
- return parsed.subcommand;
719
- }
720
- return parseLauncherSubcommand(parsed.args, SCRIPT_RUN_FLAGS_WITH_VALUE)?.subcommand;
721
- }
722
- function firstDirectTestRunnerSubcommand(executable, args) {
723
- if (executable === "npx" || executable === "bunx") {
724
- return parseNpxCommand(args)?.command;
725
- }
726
- if (executable === "pnpm") {
727
- return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, PNPM_GLOBAL_FLAGS_WITH_VALUE));
728
- }
729
- if (executable === "npm") {
730
- return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, NPM_GLOBAL_FLAGS_WITH_VALUE));
731
- }
732
- if (executable === "yarn") {
733
- return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, YARN_GLOBAL_FLAGS_WITH_VALUE));
734
- }
735
- if (executable === "bun") {
736
- return resolveDirectRunnerSubcommand(parseLauncherSubcommand(args, BUN_GLOBAL_FLAGS_WITH_VALUE));
737
- }
738
- return void 0;
739
- }
740
- function isDirectTestRunnerSubcommand(token) {
741
- if (!token) {
742
- return false;
743
- }
744
- return token === "vitest" || token === "test" || token.startsWith("test:");
745
- }
746
- function parsedLauncherInvokesRecursiveTestAll(parsed) {
747
- if (!parsed) {
748
- return false;
749
- }
750
- if (!isPmExecutableToken(parsed.command) && !isPmCliPackageToken(parsed.command)) {
751
- return false;
752
- }
753
- return firstPmSubcommand(parsed.args) === "test-all";
754
- }
755
- function segmentInvokesRecursiveTestAll(segment) {
756
- const rawTokens = segment.split(" ").filter((token) => token.length > 0);
757
- const tokens = stripLeadingEnvAssignments(rawTokens);
758
- if (tokens.length === 0) {
759
- return false;
760
- }
761
- const [executable, ...args] = tokens;
762
- if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
763
- return firstPmSubcommand(args) === "test-all";
764
- }
765
- if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
766
- return firstPmSubcommand(args.slice(1)) === "test-all";
767
- }
768
- if (executable === "npx" || executable === "bunx") {
769
- return parsedLauncherInvokesRecursiveTestAll(parseNpxCommand(args));
770
- }
771
- if (executable === "pnpm") {
772
- return parsedLauncherInvokesRecursiveTestAll(parsePnpmDlxCommand(args));
773
- }
774
- if (executable === "npm") {
775
- return parsedLauncherInvokesRecursiveTestAll(parseNpmExecCommand(args));
776
- }
777
- return false;
778
- }
779
- function invokesRecursiveTestAllCommand(command) {
780
- const normalized = normalizeCommandForValidation(command);
781
- return splitNormalizedCommandSegments(normalized).some((segment) => segmentInvokesRecursiveTestAll(segment));
782
- }
783
- function assertNoRecursiveTestAllCommand(command) {
784
- if (!invokesRecursiveTestAllCommand(command))
785
- return;
786
- throw new PmCliError('Linked test commands must not invoke "pm test-all"; this creates recursive orchestration.', EXIT_CODE.USAGE);
787
- }
788
- function normalizeCommandForValidation(command) {
789
- return command.trim().replaceAll("\\", "/").replaceAll('"', "").replaceAll("'", "").replaceAll(/\s+/g, " ").toLowerCase();
790
- }
791
- function commandUsesSandboxRunner(normalizedCommand) {
792
- return normalizedCommand.includes("node scripts/run-tests.mjs ") || normalizedCommand.endsWith("node scripts/run-tests.mjs") || normalizedCommand.includes("node ./scripts/run-tests.mjs ") || normalizedCommand.endsWith("node ./scripts/run-tests.mjs");
793
- }
794
- function segmentHasExplicitSandboxEnv(normalizedSegment) {
795
- const hasExplicitPmPath = /\bpm_path\s*=/.test(normalizedSegment) || /\$env:pm_path\s*=/.test(normalizedSegment);
796
- const hasExplicitPmGlobalPath = /\bpm_global_path\s*=/.test(normalizedSegment) || /\$env:pm_global_path\s*=/.test(normalizedSegment);
797
- return hasExplicitPmPath && hasExplicitPmGlobalPath;
798
- }
799
- function segmentInvokesUnsafeDirectTestRunner(normalizedSegment) {
800
- const rawTokens = normalizedSegment.split(" ").filter((token) => token.length > 0);
801
- const tokens = stripLeadingEnvAssignments(rawTokens);
802
- if (tokens.length === 0) {
803
- return false;
804
- }
805
- const [executable, ...args] = tokens;
806
- if (executable === "vitest" || executable.endsWith("/vitest") || executable.endsWith("/vitest.mjs")) {
807
- return true;
808
- }
809
- if (executable === "node") {
810
- return nodeArgsInvokeUnsafeDirectTestRunner(args);
811
- }
812
- return packageManagerInvokesUnsafeDirectTestRunner(executable, args);
813
- }
814
- function nodeArgsInvokeUnsafeDirectTestRunner(args) {
815
- return args.includes("--test") || args.some((arg) => arg === "vitest" || arg === "vitest.mjs" || arg.endsWith("/vitest") || arg.endsWith("/vitest.mjs"));
816
- }
817
- function packageManagerInvokesUnsafeDirectTestRunner(executable, args) {
818
- if (executable === "npx" || executable === "bunx") {
819
- return isDirectTestRunnerSubcommand(parseNpxCommand(args)?.command);
820
- }
821
- if (executable === "pnpm" || executable === "npm") {
822
- return isDirectTestRunnerSubcommand(parsePackageManagerPmInvocation(executable, args)?.command) || firstDirectTestRunnerSubcommand(executable, args) === "vitest";
823
- }
824
- return (executable === "yarn" || executable === "bun") && firstDirectTestRunnerSubcommand(executable, args) === "vitest";
825
- }
826
- function assertSandboxSafeTestRunnerCommand(command) {
827
- const normalized = normalizeCommandForValidation(command);
828
- const segments = splitNormalizedCommandSegments(normalized);
829
- const hasUnsafeDirectRunnerSegment = segments.some((segment) => !commandUsesSandboxRunner(segment) && segmentInvokesUnsafeDirectTestRunner(segment) && !segmentHasExplicitSandboxEnv(segment));
830
- if (!hasUnsafeDirectRunnerSegment) {
831
- return;
832
- }
833
- throw new PmCliError('Linked test runner commands must be sandbox-safe: use "node scripts/run-tests.mjs <test|coverage>", use a package-manager script such as "pnpm test", or include PM_PATH=... PM_GLOBAL_PATH=... INLINE in the command string (exporting them in your shell environment is not checked). Example: "PM_PATH=/tmp/pm-x PM_GLOBAL_PATH=/tmp/pm-x-g vitest run".', EXIT_CODE.USAGE);
834
- }
835
- function getRuntimeSafetySkipReason(command) {
836
- if (!invokesRecursiveTestAllCommand(command))
837
- return void 0;
838
- return 'Linked test command skipped: Linked test commands must not invoke "pm test-all"; this creates recursive orchestration.';
839
- }
840
- function parseAddEntries(raw) {
841
- if (!raw)
842
- return [];
843
- return raw.map(parseAddEntry);
844
- }
845
- function parseAddEntry(entry) {
846
- const trimmed = entry.trim();
847
- const kv = looksLikeStructuredLinkedTestEntry(trimmed) ? normalizeStructuredLinkedTestEntry(parseCsvKv(entry, "--add"), "--add") : { command: trimmed };
848
- const command = trimLinkedTestEntryField(kv.command);
849
- if (!command) {
850
- throw new PmCliError("--add requires command=<value> or a bare command (path=<value> is optional metadata)", EXIT_CODE.USAGE);
851
- }
852
- assertNoRecursiveTestAllCommand(command);
853
- assertSandboxSafeTestRunnerCommand(command);
854
- return {
855
- command,
856
- path: trimLinkedTestEntryField(kv.path),
857
- scope: ensureScope(kv.scope),
858
- timeout_seconds: parseLinkedTestTimeoutSeconds(trimLinkedTestEntryField(kv.timeout_seconds), trimLinkedTestEntryField(kv.timeout)),
859
- pm_context_mode: parseLinkedTestContextMode(trimLinkedTestEntryField(kv.pm_context_mode), "--add"),
860
- env_set: parseLinkedTestEnvSet(trimLinkedTestEntryField(kv.env_set), "--add"),
861
- env_clear: parseLinkedTestEnvClear(trimLinkedTestEntryField(kv.env_clear), "--add"),
862
- shared_host_safe: parseLinkedTestBoolean(trimLinkedTestEntryField(kv.shared_host_safe), "--add", "shared_host_safe"),
863
- assert_stdout_contains: parseLinkedTestStringList(trimLinkedTestEntryField(kv.assert_stdout_contains)),
864
- assert_stdout_regex: parseLinkedTestRegexList(trimLinkedTestEntryField(kv.assert_stdout_regex), "--add", "assert_stdout_regex"),
865
- assert_stderr_contains: parseLinkedTestStringList(trimLinkedTestEntryField(kv.assert_stderr_contains)),
866
- assert_stderr_regex: parseLinkedTestRegexList(trimLinkedTestEntryField(kv.assert_stderr_regex), "--add", "assert_stderr_regex"),
867
- assert_stdout_min_lines: parseLinkedTestMinLines(trimLinkedTestEntryField(kv.assert_stdout_min_lines), "--add"),
868
- assert_json_field_equals: parseLinkedTestAssertionEqualsMap(trimLinkedTestEntryField(kv.assert_json_field_equals), "--add"),
869
- assert_json_field_gte: parseLinkedTestAssertionGteMap(trimLinkedTestEntryField(kv.assert_json_field_gte), "--add"),
870
- note: trimLinkedTestEntryField(kv.note)
871
- };
872
- }
873
- function trimLinkedTestEntryField(value) {
874
- const trimmed = value?.trim();
875
- return trimmed && trimmed.length > 0 ? trimmed : void 0;
876
- }
877
- function parseLinkedTestTimeoutSeconds(timeoutSecondsRaw, timeoutAliasRaw) {
878
- if (timeoutSecondsRaw && timeoutAliasRaw && timeoutSecondsRaw !== timeoutAliasRaw) {
879
- throw new PmCliError("--add timeout and timeout_seconds must match when both are provided", EXIT_CODE.USAGE);
880
- }
881
- const timeoutRaw = timeoutSecondsRaw ?? timeoutAliasRaw;
882
- return timeoutRaw === void 0 ? void 0 : Math.floor(parseOptionalNumber(timeoutRaw, "timeout_seconds"));
883
- }
884
- function parseAddJsonEntries(raw) {
885
- if (!raw)
886
- return [];
887
- return raw.flatMap((entry) => {
888
- const parsed = parseLinkedTestJsonEntries(entry, "--add-json");
889
- for (const linkedTest of parsed) {
890
- const command = linkedTest.command;
891
- if (!command) {
892
- throw new PmCliError("--add-json requires a non-empty command string", EXIT_CODE.USAGE);
893
- }
894
- assertNoRecursiveTestAllCommand(command);
895
- assertSandboxSafeTestRunnerCommand(command);
896
- }
897
- return parsed;
898
- });
899
- }
900
- function parseRemoveEntries(raw) {
901
- if (!raw)
902
- return [];
903
- return raw.map((entry) => {
904
- const trimmed = entry.trim();
905
- if (!trimmed) {
906
- throw new PmCliError("--remove requires command or path value", EXIT_CODE.USAGE);
907
- }
908
- if (trimmed.includes("=") || /^(?:[-*+]\s+)?(?:path|command)\s*[:=]/i.test(trimmed) || trimmed.startsWith("```")) {
909
- const kv = parseCsvKv(trimmed, "--remove");
910
- const value = kv.path ?? kv.command;
911
- if (!value?.trim()) {
912
- throw new PmCliError("--remove requires command=<value> and/or path=<value>", EXIT_CODE.USAGE);
913
- }
914
- return value.trim();
915
- }
916
- return trimmed;
917
- });
918
- }
919
- function closeLinkedTestStdin(child) {
920
- try {
921
- child.stdin?.end();
922
- } catch {
923
- }
924
- }
925
- function summarizeLinkedTestCommand(command) {
926
- const normalized = command.trim().replaceAll(/\s+/g, " ");
927
- if (normalized.length <= MAX_LINKED_TEST_COMMAND_LABEL_LENGTH) {
928
- return normalized;
929
- }
930
- return `${normalized.slice(0, MAX_LINKED_TEST_COMMAND_LABEL_LENGTH - 3)}...`;
931
- }
932
- function shouldEmitLinkedTestProgress(mode) {
933
- if (mode === "off") {
934
- return false;
935
- }
936
- if (mode === "always") {
937
- return true;
938
- }
939
- return process.stderr.isTTY === true;
940
- }
941
- function emitLinkedTestProgress(message) {
942
- try {
943
- process.stderr.write(`${message}
944
- `);
945
- } catch {
946
- }
947
- }
948
- function beginLinkedTestProgress(context, mode) {
949
- if (!shouldEmitLinkedTestProgress(mode)) {
950
- return null;
951
- }
952
- const commandLabel = summarizeLinkedTestCommand(context.command);
953
- const startAt = Date.now();
954
- emitLinkedTestProgress(`[pm test] linked-test ${context.index}/${context.total} start timeout_ms=${context.timeoutMs} command="${commandLabel}"`);
955
- const heartbeat = setInterval(() => {
956
- const elapsedMs = Date.now() - startAt;
957
- emitLinkedTestProgress(`[pm test] linked-test ${context.index}/${context.total} running elapsed_ms=${elapsedMs} command="${commandLabel}"`);
958
- }, linkedTestHeartbeatIntervalMs());
959
- heartbeat.unref?.();
960
- return heartbeat;
961
- }
962
- function endLinkedTestProgress(context, executionResult, startedAt, mode) {
963
- if (!shouldEmitLinkedTestProgress(mode)) {
964
- return;
965
- }
966
- const commandLabel = summarizeLinkedTestCommand(context.command);
967
- const elapsedMs = Date.now() - startedAt;
968
- const failed = executionResult.timedOut || executionResult.maxBufferExceeded || executionResult.exitCode !== 0;
969
- const statusLabel = failed ? "failed" : "passed";
970
- const reasonTokens = [];
971
- if (executionResult.timedOut) {
972
- reasonTokens.push("reason=timeout");
973
- }
974
- if (executionResult.maxBufferExceeded) {
975
- reasonTokens.push("reason=max_buffer");
976
- }
977
- if (executionResult.signal) {
978
- reasonTokens.push(`signal=${executionResult.signal}`);
979
- }
980
- const exitLabel = executionResult.exitCode === null ? "null" : String(executionResult.exitCode);
981
- const reasonSuffix = reasonTokens.length > 0 ? ` ${reasonTokens.join(" ")}` : "";
982
- emitLinkedTestProgress(`[pm test] linked-test ${context.index}/${context.total} end status=${statusLabel} exit_code=${exitLabel} elapsed_ms=${elapsedMs}${reasonSuffix} command="${commandLabel}"`);
983
- }
984
- async function killProcessTree(pid) {
985
- if (!Number.isInteger(pid) || pid <= 0) {
986
- return;
987
- }
988
- if (process.platform === "win32") {
989
- await new Promise((resolve) => {
990
- const killer = spawn("taskkill", ["/pid", String(pid), "/T", "/F"], {
991
- stdio: "ignore",
992
- windowsHide: true
993
- });
994
- killer.on("error", () => resolve());
995
- killer.on("close", () => resolve());
996
- });
997
- return;
998
- }
999
- try {
1000
- process.kill(-pid, "SIGKILL");
1001
- return;
1002
- } catch {
1003
- }
1004
- try {
1005
- process.kill(pid, "SIGKILL");
1006
- } catch {
1007
- }
1008
- }
1009
- async function runLinkedTestCommand(command, timeoutMs, env, progressContext, progressMode) {
1010
- const startedAt = Date.now();
1011
- const heartbeat = beginLinkedTestProgress(progressContext, progressMode);
1012
- const child = spawn(command, {
1013
- cwd: process.cwd(),
1014
- env,
1015
- shell: true,
1016
- windowsHide: true,
1017
- detached: process.platform !== "win32",
1018
- stdio: ["pipe", "pipe", "pipe"]
1019
- });
1020
- closeLinkedTestStdin(child);
1021
- let stdout = "";
1022
- let stderr = "";
1023
- let stdoutBytes = 0;
1024
- let stderrBytes = 0;
1025
- let timedOut = false;
1026
- let maxBufferExceeded = false;
1027
- let spawnError;
1028
- let forceKillTimer = null;
1029
- let timedOutTimer = null;
1030
- let terminationRequested = false;
1031
- const clearTimers = () => {
1032
- if (heartbeat) {
1033
- clearInterval(heartbeat);
1034
- }
1035
- if (timedOutTimer) {
1036
- clearTimeout(timedOutTimer);
1037
- timedOutTimer = null;
1038
- }
1039
- if (forceKillTimer) {
1040
- clearTimeout(forceKillTimer);
1041
- forceKillTimer = null;
1042
- }
1043
- };
1044
- const requestTermination = async () => {
1045
- if (terminationRequested) {
1046
- return;
1047
- }
1048
- terminationRequested = true;
1049
- const pid = child.pid;
1050
- if (!pid || pid <= 0) {
1051
- try {
1052
- child.kill("SIGTERM");
1053
- } catch {
1054
- }
1055
- return;
1056
- }
1057
- if (process.platform === "win32") {
1058
- await killProcessTree(pid);
1059
- return;
1060
- }
1061
- try {
1062
- process.kill(-pid, "SIGTERM");
1063
- } catch {
1064
- try {
1065
- child.kill("SIGTERM");
1066
- } catch {
1067
- }
1068
- }
1069
- forceKillTimer = setTimeout(() => {
1070
- void killProcessTree(pid);
1071
- }, linkedTestTimeoutForceKillDelayMs());
1072
- forceKillTimer.unref?.();
1073
- };
1074
- const appendChunk = (chunk, target) => {
1075
- const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
1076
- const bytes = Buffer.byteLength(text);
1077
- if (target === "stdout") {
1078
- stdoutBytes += bytes;
1079
- if (stdoutBytes <= TEST_OUTPUT_MAX_BUFFER_BYTES) {
1080
- stdout += text;
1081
- }
1082
- } else {
1083
- stderrBytes += bytes;
1084
- if (stderrBytes <= TEST_OUTPUT_MAX_BUFFER_BYTES) {
1085
- stderr += text;
1086
- }
1087
- }
1088
- if (!maxBufferExceeded && (stdoutBytes > TEST_OUTPUT_MAX_BUFFER_BYTES || stderrBytes > TEST_OUTPUT_MAX_BUFFER_BYTES)) {
1089
- maxBufferExceeded = true;
1090
- void requestTermination();
1091
- }
1092
- };
1093
- child.stdout?.on("data", (chunk) => appendChunk(chunk, "stdout"));
1094
- child.stderr?.on("data", (chunk) => appendChunk(chunk, "stderr"));
1095
- child.on("error", (error) => {
1096
- spawnError = error.message;
1097
- });
1098
- timedOutTimer = setTimeout(() => {
1099
- timedOut = true;
1100
- void requestTermination();
1101
- }, timeoutMs);
1102
- timedOutTimer.unref?.();
1103
- const { code, signal } = await new Promise((resolve) => {
1104
- let settled = false;
1105
- let pipeCloseGraceTimer = null;
1106
- const settle = (value, destroyPipes = false) => {
1107
- if (settled) {
1108
- return;
1109
- }
1110
- settled = true;
1111
- if (pipeCloseGraceTimer) {
1112
- clearTimeout(pipeCloseGraceTimer);
1113
- pipeCloseGraceTimer = null;
1114
- }
1115
- if (destroyPipes) {
1116
- child.stdin?.destroy();
1117
- child.stdout?.destroy();
1118
- child.stderr?.destroy();
1119
- }
1120
- resolve(value);
1121
- };
1122
- child.on("exit", (exitCode, exitSignal) => {
1123
- if (settled) {
1124
- return;
1125
- }
1126
- pipeCloseGraceTimer = setTimeout(() => {
1127
- settle({
1128
- code: exitCode,
1129
- signal: exitSignal
1130
- }, true);
1131
- }, linkedTestPipeCloseGraceMs());
1132
- pipeCloseGraceTimer.unref?.();
1133
- });
1134
- child.on("close", (closeCode, closeSignal) => {
1135
- settle({
1136
- code: closeCode,
1137
- signal: closeSignal
1138
- });
1139
- });
1140
- });
1141
- clearTimers();
1142
- const executionResult = {
1143
- stdout,
1144
- stderr,
1145
- exitCode: code,
1146
- signal,
1147
- timedOut,
1148
- maxBufferExceeded,
1149
- spawnError
1150
- };
1151
- endLinkedTestProgress(progressContext, executionResult, startedAt, progressMode);
1152
- return executionResult;
1153
- }
1154
- function formatLinkedTestExecutionError(result, timeoutMs) {
1155
- const details = [];
1156
- if (result.maxBufferExceeded) {
1157
- details.push(`Linked test output exceeded maxBuffer=${TEST_OUTPUT_MAX_BUFFER_BYTES} bytes. Reduce output volume or split the command.`);
1158
- }
1159
- if (result.timedOut && timeoutMs > 0) {
1160
- details.push(`Linked test timed out after ${timeoutMs}ms.`);
1161
- }
1162
- const signalMessage = result.signal ? `Linked test command terminated by signal ${result.signal}.` : void 0;
1163
- const baseMessage = result.spawnError?.trim() || signalMessage || "Linked test command failed.";
1164
- if (details.length === 0) {
1165
- return baseMessage;
1166
- }
1167
- return `${baseMessage} ${details.join(" ")}`;
1168
- }
1169
- function hasInfraCollisionSignal(result) {
1170
- const combined = [result.spawnError ?? "", result.stderr, result.stdout].join("\n");
1171
- return LINKED_TEST_INFRA_COLLISION_PATTERNS.some((pattern) => pattern.test(combined));
1172
- }
1173
- function classifyLinkedTestFailure(result) {
1174
- if (hasInfraCollisionSignal(result)) {
1175
- return "infra_collision";
1176
- }
1177
- if (result.timedOut) {
1178
- return "timeout";
1179
- }
1180
- if (result.maxBufferExceeded) {
1181
- return "max_buffer";
1182
- }
1183
- if (result.spawnError) {
1184
- return "spawn_error";
1185
- }
1186
- if (result.signal) {
1187
- return "signal";
1188
- }
1189
- return "assertion_failure";
1190
- }
1191
- function createEmptyFailureCategoryCounts() {
1192
- return {
1193
- infra_collision: 0,
1194
- assertion_failure: 0,
1195
- empty_run: 0,
1196
- timeout: 0,
1197
- max_buffer: 0,
1198
- spawn_error: 0,
1199
- signal: 0
1200
- };
1201
- }
1202
- function countFailureCategories(runResults) {
1203
- const counts = createEmptyFailureCategoryCounts();
1204
- for (const result of runResults) {
1205
- if (result.status !== "failed" || !result.failure_category) {
1206
- continue;
1207
- }
1208
- counts[result.failure_category] += 1;
1209
- }
1210
- return counts;
1211
- }
1212
- function applyEnvDirectiveStage(env, directives) {
1213
- for (const [key, value] of Object.entries(directives.env_set)) {
1214
- if (LINKED_TEST_PROTECTED_ENV_KEYS.has(key.toUpperCase())) {
1215
- continue;
1216
- }
1217
- env[key] = value;
1218
- }
1219
- for (const key of directives.env_clear) {
1220
- if (LINKED_TEST_PROTECTED_ENV_KEYS.has(key.toUpperCase())) {
1221
- continue;
1222
- }
1223
- delete env[key];
1224
- }
1225
- }
1226
- function applySharedHostSafeDefaults(env) {
1227
- if (env.PORT === void 0) {
1228
- env.PORT = "0";
1229
- }
1230
- if (env.HOST === void 0) {
1231
- env.HOST = "127.0.0.1";
1232
- }
1233
- if (env.PM_SHARED_HOST_SAFE === void 0) {
1234
- env.PM_SHARED_HOST_SAFE = "1";
1235
- }
1236
- if (env.PLAYWRIGHT_HTML_OPEN === void 0) {
1237
- env.PLAYWRIGHT_HTML_OPEN = "never";
1238
- }
1239
- if (env.PW_TEST_HTML_REPORT_OPEN === void 0) {
1240
- env.PW_TEST_HTML_REPORT_OPEN = "never";
1241
- }
1242
- }
1243
- function resolveEffectiveLinkedTestDirectives(runtimeDirectives, linkedTest) {
1244
- const envSet = { ...runtimeDirectives.env_set, ...linkedTest.env_set };
1245
- const envClear = [.../* @__PURE__ */ new Set([...runtimeDirectives.env_clear, ...linkedTest.env_clear ?? []])];
1246
- const sharedHostSafe = linkedTest.shared_host_safe ?? runtimeDirectives.shared_host_safe;
1247
- return {
1248
- env_set: envSet,
1249
- env_clear: envClear,
1250
- shared_host_safe: sharedHostSafe
1251
- };
1252
- }
1253
- function resolveRuntimeDirectives(envSetEntries, envClearEntries, sharedHostSafe) {
1254
- return {
1255
- env_set: mergeEnvSetDirectives(envSetEntries, "--env-set"),
1256
- env_clear: mergeEnvClearDirectives(envClearEntries, "--env-clear"),
1257
- shared_host_safe: sharedHostSafe === true
1258
- };
1259
- }
1260
- async function copyIntoSandboxIfPresent(sourcePath, targetPath, recursive = false) {
1261
- if (!await pathExists(sourcePath)) {
1262
- return;
1263
- }
1264
- await mkdir(path.dirname(targetPath), { recursive: true });
1265
- try {
1266
- if (recursive) {
1267
- await cp(sourcePath, targetPath, { recursive: true, force: true });
1268
- return;
1269
- }
1270
- await cp(sourcePath, targetPath, { force: true });
1271
- } catch (error) {
1272
- if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
1273
- return;
1274
- }
1275
- throw error;
1276
- }
1277
- }
1278
- async function seedLinkedTestSandbox(sandboxPmPath, sandboxGlobalPath, sourceRoots) {
1279
- await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.projectPmRoot), getSettingsPath(sandboxPmPath));
1280
- await copyIntoSandboxIfPresent(path.join(sourceRoots.projectPmRoot, "extensions"), path.join(sandboxPmPath, "extensions"), true);
1281
- await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.globalPmRoot), getSettingsPath(sandboxGlobalPath));
1282
- await copyIntoSandboxIfPresent(path.join(sourceRoots.globalPmRoot, "extensions"), path.join(sandboxGlobalPath, "extensions"), true);
1283
- }
1284
- async function seedLinkedTestTrackerData(sourceRoot, sandboxRoot) {
1285
- if (!await pathExists(sourceRoot)) {
1286
- return;
1287
- }
1288
- const entries = await readdir(sourceRoot, { withFileTypes: true });
1289
- for (const entry of entries) {
1290
- if (LINKED_TEST_TRACKER_DIRS_TO_SKIP.has(entry.name)) {
1291
- continue;
1292
- }
1293
- const sourcePath = path.join(sourceRoot, entry.name);
1294
- const targetPath = path.join(sandboxRoot, entry.name);
1295
- if (entry.isDirectory()) {
1296
- await copyIntoSandboxIfPresent(sourcePath, targetPath, true);
1297
- continue;
1298
- }
1299
- if (entry.isFile()) {
1300
- await copyIntoSandboxIfPresent(sourcePath, targetPath);
1301
- }
1302
- }
1303
- }
1304
- async function countLinkedTestItemFiles(pmRoot) {
1305
- if (!await pathExists(pmRoot)) {
1306
- return 0;
1307
- }
1308
- let total = 0;
1309
- const entries = await readdir(pmRoot, { withFileTypes: true });
1310
- for (const entry of entries) {
1311
- if (!entry.isDirectory() || LINKED_TEST_ITEM_COUNT_DIRS_TO_SKIP.has(entry.name)) {
1312
- continue;
1313
- }
1314
- const folderPath = path.join(pmRoot, entry.name);
1315
- let files;
1316
- try {
1317
- files = await readdir(folderPath, { withFileTypes: true });
1318
- } catch {
1319
- continue;
1320
- }
1321
- for (const file of files) {
1322
- if (!file.isFile()) {
1323
- continue;
1324
- }
1325
- if (ITEM_FILE_EXTENSIONS.some((extension) => file.name.toLowerCase().endsWith(extension))) {
1326
- total += 1;
1327
- }
1328
- }
1329
- }
1330
- return total;
1331
- }
1332
- function resolveLinkedTestFailureExitCode(execution) {
1333
- const rawExitCode = typeof execution.exitCode === "number" ? execution.exitCode : 1;
1334
- if ((execution.timedOut || execution.maxBufferExceeded) && rawExitCode === 0) {
1335
- return 1;
1336
- }
1337
- return rawExitCode;
1338
- }
1339
- function splitJsonPathSegments(fieldPath) {
1340
- const segments = [];
1341
- const tokens = fieldPath.match(/[^.[\]]+|\[\d+\]/g) ?? [];
1342
- for (const token of tokens) {
1343
- if (token.startsWith("[") && token.endsWith("]")) {
1344
- const parsedIndex = Number.parseInt(token.slice(1, -1), 10);
1345
- if (!Number.isInteger(parsedIndex) || parsedIndex < 0) {
1346
- return [];
1347
- }
1348
- segments.push(parsedIndex);
1349
- continue;
1350
- }
1351
- segments.push(token);
1352
- }
1353
- return segments;
1354
- }
1355
- function readJsonPathValue(root, fieldPath) {
1356
- const normalizedPath = fieldPath.trim();
1357
- if (normalizedPath.length === 0) {
1358
- return { found: false, value: void 0 };
1359
- }
1360
- const segments = splitJsonPathSegments(normalizedPath);
1361
- if (segments.length === 0) {
1362
- return { found: false, value: void 0 };
1363
- }
1364
- let current = root;
1365
- for (const segment of segments) {
1366
- if (typeof segment === "number") {
1367
- if (!Array.isArray(current) || segment >= current.length) {
1368
- return { found: false, value: void 0 };
1369
- }
1370
- current = current[segment];
1371
- continue;
1372
- }
1373
- if (typeof current !== "object" || current === null || !(segment in current)) {
1374
- return { found: false, value: void 0 };
1375
- }
1376
- current = current[segment];
1377
- }
1378
- return { found: true, value: current };
1379
- }
1380
- function parseAssertionLiteral(raw) {
1381
- const trimmed = raw.trim();
1382
- if (trimmed === "true") {
1383
- return true;
1384
- }
1385
- if (trimmed === "false") {
1386
- return false;
1387
- }
1388
- if (trimmed === "null") {
1389
- return null;
1390
- }
1391
- const numeric = Number(trimmed);
1392
- if (trimmed.length > 0 && Number.isFinite(numeric)) {
1393
- return numeric;
1394
- }
1395
- if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) {
1396
- try {
1397
- return JSON.parse(trimmed);
1398
- } catch {
1399
- }
1400
- }
1401
- return trimmed;
1402
- }
1403
- function compareAssertionValues(actual, expected) {
1404
- if (typeof actual === "object" && actual !== null && typeof expected === "object" && expected !== null) {
1405
- return stableValueEquals(actual, expected);
1406
- }
1407
- return Object.is(actual, expected);
1408
- }
1409
- function evaluateLinkedTestAssertions(linkedTest, stdout, stderr) {
1410
- const failures = [];
1411
- failures.push(...evaluateContainsAssertions("stdout", stdout, linkedTest.assert_stdout_contains));
1412
- failures.push(...evaluateRegexAssertions("stdout", stdout, linkedTest.assert_stdout_regex));
1413
- failures.push(...evaluateContainsAssertions("stderr", stderr, linkedTest.assert_stderr_contains));
1414
- failures.push(...evaluateRegexAssertions("stderr", stderr, linkedTest.assert_stderr_regex));
1415
- failures.push(...evaluateStdoutLineCountAssertion(stdout, linkedTest.assert_stdout_min_lines));
1416
- const jsonEqualsAssertions = linkedTest.assert_json_field_equals ?? {};
1417
- const jsonGteAssertions = linkedTest.assert_json_field_gte ?? {};
1418
- const needsJsonAssertions = Object.keys(jsonEqualsAssertions).length > 0 || Object.keys(jsonGteAssertions).length > 0;
1419
- if (!needsJsonAssertions) {
1420
- return failures;
1421
- }
1422
- let parsedJson;
1423
- try {
1424
- parsedJson = JSON.parse(stdout);
1425
- } catch (error) {
1426
- failures.push(`stdout is not valid JSON for assert_json_field_* checks: ${error instanceof Error ? error.message : String(error)}`);
1427
- return failures;
1428
- }
1429
- for (const [fieldPath, expectedRaw] of Object.entries(jsonEqualsAssertions)) {
1430
- const resolved = readJsonPathValue(parsedJson, fieldPath);
1431
- if (!resolved.found) {
1432
- failures.push(`assert_json_field_equals missing path "${fieldPath}"`);
1433
- continue;
1434
- }
1435
- const expected = parseAssertionLiteral(expectedRaw);
1436
- if (!compareAssertionValues(resolved.value, expected)) {
1437
- failures.push(`assert_json_field_equals mismatch at "${fieldPath}" (expected=${JSON.stringify(expected)} actual=${JSON.stringify(resolved.value)})`);
1438
- }
1439
- }
1440
- for (const [fieldPath, expectedMinimum] of Object.entries(jsonGteAssertions)) {
1441
- const resolved = readJsonPathValue(parsedJson, fieldPath);
1442
- if (!resolved.found) {
1443
- failures.push(`assert_json_field_gte missing path "${fieldPath}"`);
1444
- continue;
1445
- }
1446
- if (typeof resolved.value !== "number" || !Number.isFinite(resolved.value)) {
1447
- failures.push(`assert_json_field_gte path "${fieldPath}" resolved to non-numeric value`);
1448
- continue;
1449
- }
1450
- if (resolved.value < expectedMinimum) {
1451
- failures.push(`assert_json_field_gte failed at "${fieldPath}" (expected >= ${expectedMinimum}, actual ${resolved.value})`);
1452
- }
1453
- }
1454
- return failures;
1455
- }
1456
- function evaluateContainsAssertions(streamName, output, expectedValues) {
1457
- const failures = [];
1458
- for (const expected of expectedValues ?? []) {
1459
- if (!output.includes(expected)) {
1460
- failures.push(`${streamName} missing required text: "${expected}"`);
1461
- }
1462
- }
1463
- return failures;
1464
- }
1465
- function evaluateRegexAssertions(streamName, output, patterns) {
1466
- const failures = [];
1467
- for (const pattern of patterns ?? []) {
1468
- try {
1469
- const regex = new RegExp(pattern, "m");
1470
- if (!regex.test(output)) {
1471
- failures.push(`${streamName} failed regex assertion: /${pattern}/m`);
1472
- }
1473
- } catch (error) {
1474
- failures.push(`${streamName} regex assertion is invalid: /${pattern}/ (${error instanceof Error ? error.message : String(error)})`);
1475
- }
1476
- }
1477
- return failures;
1478
- }
1479
- function evaluateStdoutLineCountAssertion(stdout, minimum) {
1480
- if (typeof minimum !== "number") {
1481
- return [];
1482
- }
1483
- const lineCount = stdout.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0).length;
1484
- return lineCount < minimum ? [`stdout line count ${lineCount} is below required minimum ${minimum}`] : [];
1485
- }
1486
- var EMPTY_LINKED_TEST_RUN_PATTERNS = [
1487
- { code: "no_projects_matched_filters", regex: /\bNo projects matched the filters\b/i },
1488
- { code: "no_test_files_found", regex: /\bNo test files found\b/i },
1489
- { code: "no_tests_found", regex: /\bNo tests found\b/i },
1490
- { code: "no_matching_tests", regex: /\bNo matching tests?\b/i },
1491
- { code: "collected_zero_items", regex: /\bcollected 0 items?\b/i }
1492
- ];
1493
- function detectEmptyLinkedTestRun(stdout, stderr) {
1494
- const combined = `${stdout}
1495
- ${stderr}`;
1496
- for (const pattern of EMPTY_LINKED_TEST_RUN_PATTERNS) {
1497
- if (pattern.regex.test(combined)) {
1498
- return pattern.code;
1499
- }
1500
- }
1501
- return null;
1502
- }
1503
- function createLinkedTestSandboxLayout(sandboxRoot) {
1504
- return {
1505
- root: sandboxRoot,
1506
- schemaProjectPmPath: path.join(sandboxRoot, "schema", "project", ".agents", "pm"),
1507
- schemaGlobalPmPath: path.join(sandboxRoot, "schema", "global"),
1508
- trackerProjectPmPath: path.join(sandboxRoot, "tracker", "project", ".agents", "pm"),
1509
- trackerGlobalPmPath: path.join(sandboxRoot, "tracker", "global")
1510
- };
1511
- }
1512
- async function initializeLinkedTestSandboxes(layout) {
1513
- await runInit(void 0, { path: layout.schemaProjectPmPath });
1514
- await runInit(void 0, { path: layout.schemaGlobalPmPath });
1515
- await runInit(void 0, { path: layout.trackerProjectPmPath });
1516
- await runInit(void 0, { path: layout.trackerGlobalPmPath });
1517
- }
1518
- async function seedLinkedTestSandboxesFromSource(layout, sourceRoots) {
1519
- if (!sourceRoots) {
1520
- return;
1521
- }
1522
- await seedLinkedTestSandbox(layout.schemaProjectPmPath, layout.schemaGlobalPmPath, sourceRoots);
1523
- await seedLinkedTestSandbox(layout.trackerProjectPmPath, layout.trackerGlobalPmPath, sourceRoots);
1524
- await seedLinkedTestTrackerData(sourceRoots.projectPmRoot, layout.trackerProjectPmPath);
1525
- await seedLinkedTestTrackerData(sourceRoots.globalPmRoot, layout.trackerGlobalPmPath);
1526
- }
1527
- async function countLinkedTestSandboxItems(layout, sourceRoots) {
1528
- return {
1529
- sourceProjectItemCount: sourceRoots ? await countLinkedTestItemFiles(sourceRoots.projectPmRoot) : 0,
1530
- sourceGlobalItemCount: sourceRoots ? await countLinkedTestItemFiles(sourceRoots.globalPmRoot) : 0,
1531
- schemaProjectItemCount: await countLinkedTestItemFiles(layout.schemaProjectPmPath),
1532
- schemaGlobalItemCount: await countLinkedTestItemFiles(layout.schemaGlobalPmPath),
1533
- trackerProjectItemCount: await countLinkedTestItemFiles(layout.trackerProjectPmPath),
1534
- trackerGlobalItemCount: await countLinkedTestItemFiles(layout.trackerGlobalPmPath)
1535
- };
1536
- }
1537
- function buildLinkedTestExecutionContext(params) {
1538
- const trackerMode = params.effectivePmContextMode === "tracker";
1539
- const selectedSandboxProjectPmPath = trackerMode ? params.layout.trackerProjectPmPath : params.layout.schemaProjectPmPath;
1540
- const selectedSandboxGlobalPmPath = trackerMode ? params.layout.trackerGlobalPmPath : params.layout.schemaGlobalPmPath;
1541
- const selectedSandboxProjectItemCount = trackerMode ? params.counts.trackerProjectItemCount : params.counts.schemaProjectItemCount;
1542
- const selectedSandboxGlobalItemCount = trackerMode ? params.counts.trackerGlobalItemCount : params.counts.schemaGlobalItemCount;
1543
- return {
1544
- requested_pm_context_mode: params.requestedPmContextMode,
1545
- pm_context_mode: params.effectivePmContextMode,
1546
- auto_pm_context_applied: params.autoPmContextApplied,
1547
- is_pm_command: params.isPmCommand,
1548
- is_pm_tracker_read_command: params.isPmTrackerReadCommand,
1549
- source_project_pm_path: params.sourceRoots?.projectPmRoot ?? "",
1550
- sandbox_project_pm_path: selectedSandboxProjectPmPath,
1551
- source_global_pm_path: params.sourceRoots?.globalPmRoot ?? "",
1552
- sandbox_global_pm_path: selectedSandboxGlobalPmPath,
1553
- source_project_item_count: params.counts.sourceProjectItemCount,
1554
- sandbox_project_item_count: selectedSandboxProjectItemCount,
1555
- source_global_item_count: params.counts.sourceGlobalItemCount,
1556
- sandbox_global_item_count: selectedSandboxGlobalItemCount,
1557
- mismatch_detected: params.isPmCommand && params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount,
1558
- project_extensions_seeded: Boolean(params.sourceRoots),
1559
- global_extensions_seeded: Boolean(params.sourceRoots)
1560
- };
1561
- }
1562
- function resolveLinkedTestCommandContext(params) {
1563
- const linkedOverridePmContextMode = typeof params.linkedTest.pm_context_mode === "string" && params.linkedTest.pm_context_mode.trim().length > 0 ? parsePmContextMode(params.linkedTest.pm_context_mode) : void 0;
1564
- const command = typeof params.linkedTest.command === "string" && params.linkedTest.command.length > 0 ? params.linkedTest.command : void 0;
1565
- const isPmCommand = command ? commandInvokesPmCli(command) : false;
1566
- const isPmTrackerReadCommand = isPmCommand && command ? commandInvokesPmTrackerReadCommand(command) : false;
1567
- const autoPmContextApplied = params.options?.autoPmContext === true && isPmTrackerReadCommand;
1568
- const requestedPmContextMode = autoPmContextApplied ? "auto" : resolveLinkedTestRequestedContextMode(params.linkedTest, params.runLevelPmContextMode, params.options?.overrideLinkedPmContext === true);
1569
- const effectivePmContextMode = resolveLinkedTestEffectiveContextMode(requestedPmContextMode, isPmTrackerReadCommand);
1570
- return {
1571
- linkedOverridePmContextMode,
1572
- executionContext: buildLinkedTestExecutionContext({
1573
- layout: params.layout,
1574
- counts: params.counts,
1575
- sourceRoots: params.sourceRoots,
1576
- isPmCommand,
1577
- isPmTrackerReadCommand,
1578
- requestedPmContextMode,
1579
- effectivePmContextMode,
1580
- autoPmContextApplied
1581
- })
1582
- };
1583
- }
1584
- function buildLinkedTestSkippedResult(linkedTest, executionContext, error) {
1585
- return {
1586
- command: linkedTest.command,
1587
- path: linkedTest.path,
1588
- status: "skipped",
1589
- execution_context: executionContext,
1590
- error
1591
- };
1592
- }
1593
- function buildLinkedTestAssertionFailureResult(linkedTest, executionContext, error, output) {
1594
- return {
1595
- command: linkedTest.command,
1596
- path: linkedTest.path,
1597
- status: "failed",
1598
- exit_code: 1,
1599
- failure_category: "assertion_failure",
1600
- execution_context: executionContext,
1601
- ...output ? { stdout: output.stdout, stderr: output.stderr } : {},
1602
- error
1603
- };
1604
- }
1605
- function resolveLinkedTestPreflightResult(params) {
1606
- if (!params.linkedTest.command) {
1607
- return buildLinkedTestSkippedResult(params.linkedTest, params.executionContext, "No command configured for this linked test.");
1608
- }
1609
- const runtimeSafetySkipReason = getRuntimeSafetySkipReason(params.linkedTest.command);
1610
- if (runtimeSafetySkipReason) {
1611
- return buildLinkedTestSkippedResult(params.linkedTest, params.executionContext, runtimeSafetySkipReason);
1612
- }
1613
- const failOnMismatchByDefault = params.executionContext.pm_context_mode === "schema" && params.executionContext.is_pm_tracker_read_command && params.executionContext.mismatch_detected;
1614
- const failOnMismatchByFlag = params.options?.failOnContextMismatch === true && params.executionContext.is_pm_command && params.executionContext.mismatch_detected;
1615
- if (failOnMismatchByDefault || failOnMismatchByFlag) {
1616
- const mismatchHint = buildPmContextMismatchHint({
1617
- executionContext: params.executionContext,
1618
- runLevelPmContextMode: params.runLevelPmContextMode,
1619
- linkedOverridePmContextMode: params.linkedOverridePmContextMode
1620
- });
1621
- const mismatchPrefix = params.options?.checkContext === true ? "Linked test preflight PM context mismatch detected" : "Linked test PM context mismatch detected";
1622
- return buildLinkedTestAssertionFailureResult(params.linkedTest, params.executionContext, `${mismatchPrefix} (source_project_items=${params.executionContext.source_project_item_count}, sandbox_project_items=${params.executionContext.sandbox_project_item_count}).${mismatchHint}`);
1623
- }
1624
- if (params.options?.requireAssertionsForPm === true && params.executionContext.is_pm_command && !hasLinkedTestAssertions(params.linkedTest)) {
1625
- return buildLinkedTestAssertionFailureResult(params.linkedTest, params.executionContext, "Linked PM command requires assertions when --require-assertions-for-pm is enabled.");
1626
- }
1627
- return null;
1628
- }
1629
- function buildLinkedTestExecutionEnv(params) {
1630
- const effectiveDirectives = resolveEffectiveLinkedTestDirectives(params.runtimeDirectives, params.linkedTest);
1631
- const executionEnv = { ...process.env };
1632
- applyEnvDirectiveStage(executionEnv, params.runtimeDirectives);
1633
- applyEnvDirectiveStage(executionEnv, {
1634
- env_set: params.linkedTest.env_set ?? {},
1635
- env_clear: params.linkedTest.env_clear ?? []
1636
- });
1637
- if (effectiveDirectives.shared_host_safe) {
1638
- applySharedHostSafeDefaults(executionEnv);
1639
- }
1640
- executionEnv.FORCE_COLOR = "0";
1641
- executionEnv.PM_PATH = params.executionContext.sandbox_project_pm_path;
1642
- executionEnv.PM_GLOBAL_PATH = params.executionContext.sandbox_global_pm_path;
1643
- return executionEnv;
1644
- }
1645
- function buildLinkedTestPassedResult(linkedTest, executionContext, execution) {
1646
- return {
1647
- command: linkedTest.command,
1648
- path: linkedTest.path,
1649
- status: "passed",
1650
- exit_code: 0,
1651
- execution_context: executionContext,
1652
- stdout: execution.stdout,
1653
- stderr: execution.stderr
1654
- };
1655
- }
1656
- function buildLinkedTestEmptyRunResult(params) {
1657
- return {
1658
- command: params.linkedTest.command,
1659
- path: params.linkedTest.path,
1660
- status: "failed",
1661
- exit_code: 1,
1662
- failure_category: "empty_run",
1663
- execution_context: params.executionContext,
1664
- stdout: params.execution.stdout,
1665
- stderr: params.execution.stderr,
1666
- error: `Linked test reported an empty test run (${params.emptyRunSignal}) while --fail-on-empty-test-run is enabled. Update test selection or disable --fail-on-empty-test-run for this run.`
1667
- };
1668
- }
1669
- function buildLinkedTestCommandFailureResult(params) {
1670
- return {
1671
- command: params.linkedTest.command,
1672
- path: params.linkedTest.path,
1673
- status: "failed",
1674
- exit_code: resolveLinkedTestFailureExitCode(params.execution),
1675
- failure_category: classifyLinkedTestFailure(params.execution),
1676
- execution_context: params.executionContext,
1677
- stdout: params.execution.stdout,
1678
- stderr: params.execution.stderr,
1679
- error: formatLinkedTestExecutionError(params.execution, params.timeoutMs)
1680
- };
1681
- }
1682
- function buildLinkedTestPassedExecutionResult(params) {
1683
- if (params.options?.failOnEmptyTestRun === true) {
1684
- const emptyRunSignal = detectEmptyLinkedTestRun(params.execution.stdout, params.execution.stderr);
1685
- if (emptyRunSignal) {
1686
- return buildLinkedTestEmptyRunResult({ ...params, emptyRunSignal });
1687
- }
1688
- }
1689
- const assertionFailures = evaluateLinkedTestAssertions(params.linkedTest, params.execution.stdout, params.execution.stderr);
1690
- if (assertionFailures.length > 0) {
1691
- return buildLinkedTestAssertionFailureResult(params.linkedTest, params.executionContext, `Linked test assertion(s) failed: ${assertionFailures.join("; ")}`, params.execution);
1692
- }
1693
- return buildLinkedTestPassedResult(params.linkedTest, params.executionContext, params.execution);
1694
- }
1695
- async function runSingleLinkedTest(params) {
1696
- const command = params.linkedTest.command ?? "";
1697
- const timeoutMs = (params.linkedTest.timeout_seconds ?? params.defaultTimeoutSeconds ?? 120) * 1e3;
1698
- const execution = await runLinkedTestCommand(command, timeoutMs, buildLinkedTestExecutionEnv(params), {
1699
- index: params.index + 1,
1700
- total: params.total,
1701
- timeoutMs,
1702
- command
1703
- }, params.progressMode);
1704
- const passed = execution.exitCode === 0 && !execution.timedOut && !execution.maxBufferExceeded;
1705
- return passed ? buildLinkedTestPassedExecutionResult({ ...params, execution }) : buildLinkedTestCommandFailureResult({ ...params, execution, timeoutMs });
1706
- }
1707
- async function runLinkedTests(tests, defaultTimeoutSeconds, options) {
1708
- const results = [];
1709
- const sandboxRoot = await mkdtemp(path.join(tmpdir(), "pm-linked-test-"));
1710
- const layout = createLinkedTestSandboxLayout(sandboxRoot);
1711
- const runLevelPmContextMode = parsePmContextMode(options?.pmContext);
1712
- const progressMode = options?.progress === true ? "always" : "auto";
1713
- const runtimeDirectives = resolveRuntimeDirectives(options?.envSet, options?.envClear, options?.sharedHostSafe);
1714
- const sourceRoots = options?.sourceRoots;
1715
- try {
1716
- await initializeLinkedTestSandboxes(layout);
1717
- await seedLinkedTestSandboxesFromSource(layout, sourceRoots);
1718
- const counts = await countLinkedTestSandboxItems(layout, sourceRoots);
1719
- for (let index = 0; index < tests.length; index += 1) {
1720
- const linkedTest = tests[index];
1721
- const commandContext = resolveLinkedTestCommandContext({
1722
- linkedTest,
1723
- layout,
1724
- counts,
1725
- sourceRoots,
1726
- runLevelPmContextMode,
1727
- options
1728
- });
1729
- const preflightResult = resolveLinkedTestPreflightResult({
1730
- linkedTest,
1731
- executionContext: commandContext.executionContext,
1732
- runLevelPmContextMode,
1733
- linkedOverridePmContextMode: commandContext.linkedOverridePmContextMode,
1734
- options
1735
- });
1736
- if (preflightResult) {
1737
- results.push(preflightResult);
1738
- continue;
1739
- }
1740
- results.push(await runSingleLinkedTest({
1741
- linkedTest,
1742
- index,
1743
- total: tests.length,
1744
- defaultTimeoutSeconds,
1745
- runtimeDirectives,
1746
- progressMode,
1747
- executionContext: commandContext.executionContext,
1748
- options
1749
- }));
1750
- }
1751
- } finally {
1752
- await rm(layout.root, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
1753
- }
1754
- return results;
1755
- }
1756
- function hasTestRuntimeDirectiveFlags(options) {
1757
- return (options.envSet?.length ?? 0) > 0 || (options.envClear?.length ?? 0) > 0 || options.sharedHostSafe === true || options.pmContext !== void 0 || options.overrideLinkedPmContext === true || options.failOnContextMismatch === true || options.failOnSkipped === true || options.failOnEmptyTestRun === true || options.requireAssertionsForPm === true || options.checkContext === true || options.autoPmContext === true;
1758
- }
1759
- function assertTestRunFlagUsage(options) {
1760
- if (hasTestRuntimeDirectiveFlags(options) && options.run !== true) {
1761
- throw new PmCliError("--env-set, --env-clear, --shared-host-safe, --pm-context, --override-linked-pm-context, --fail-on-context-mismatch, --fail-on-skipped, --fail-on-empty-test-run, --require-assertions-for-pm, --check-context, and --auto-pm-context require --run", EXIT_CODE.USAGE);
1762
- }
1763
- const hasSelectorFlags = options.match !== void 0 || options.onlyIndex !== void 0 || options.onlyLast === true;
1764
- if (hasSelectorFlags && options.run !== true) {
1765
- throw new PmCliError("--match, --only-index, and --only-last require --run", EXIT_CODE.USAGE);
1766
- }
1767
- }
1768
- async function resolveLinkedTestItem(params) {
1769
- const { id, options, pmRoot, settings, typeToFolder, adds, removes } = params;
1770
- if (adds.length === 0 && removes.length === 0) {
1771
- const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);
1772
- if (!located) {
1773
- throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);
1774
- }
1775
- const loaded = await readLocatedItem(located, { schema: settings.schema });
1776
- return { itemId: located.id, tests: loaded.document.metadata.tests ?? [], changed: false };
1777
- }
1778
- const result = await mutateItem({
1779
- pmRoot,
1780
- settings,
1781
- id,
1782
- op: "tests_add",
1783
- author: resolveAuthor(options.author, settings.author_default),
1784
- message: options.message,
1785
- force: options.force,
1786
- skipNoop: true,
1787
- mutate(document) {
1788
- const previous = document.metadata.tests ?? [];
1789
- const next = [...previous];
1790
- for (const add of adds) {
1791
- const exists = next.some((entry) => entry.command === add.command && entry.path === add.path && entry.scope === add.scope && entry.pm_context_mode === add.pm_context_mode);
1792
- if (!exists) {
1793
- next.push(add);
1794
- }
1795
- }
1796
- if (removes.length > 0) {
1797
- for (let i = next.length - 1; i >= 0; i -= 1) {
1798
- const entry = next[i];
1799
- if (removes.includes(entry.path ?? "") || removes.includes(entry.command ?? "")) {
1800
- next.splice(i, 1);
1801
- }
1802
- }
1803
- }
1804
- document.metadata.tests = next;
1805
- return { changedFields: stableValueEquals(previous, next) ? [] : ["tests"] };
1806
- }
1807
- });
1808
- return {
1809
- itemId: result.item.id,
1810
- tests: result.item.tests ?? [],
1811
- changed: result.changedFields.length > 0
1812
- };
1813
- }
1814
- function resolveTestRunOptions(options, tests) {
1815
- assertTestRunFlagUsage(options);
1816
- const selectorInput = {
1817
- match: options.match,
1818
- onlyIndex: options.onlyIndex === void 0 ? void 0 : parseOnlyIndexValue(options.onlyIndex),
1819
- onlyLast: options.onlyLast
1820
- };
1821
- const runSelection = options.run === true ? resolveLinkedTestRunSelection(tests, selectorInput) : void 0;
1822
- return {
1823
- defaultTimeoutSeconds: options.timeout === void 0 ? void 0 : parseOptionalNumber(options.timeout, "timeout"),
1824
- pmContextMode: parsePmContextMode(options.pmContext),
1825
- runSelection,
1826
- testsToRun: runSelection?.selected ?? tests
1827
- };
1828
- }
1829
- async function executeSelectedLinkedTests(params) {
1830
- const { options, runOptions, pmRoot } = params;
1831
- if (options.run !== true) {
1832
- return [];
1833
- }
1834
- return await runLinkedTests(runOptions.testsToRun, runOptions.defaultTimeoutSeconds, {
1835
- progress: options.progress,
1836
- envSet: options.envSet,
1837
- envClear: options.envClear,
1838
- sharedHostSafe: options.sharedHostSafe,
1839
- pmContext: runOptions.pmContextMode,
1840
- overrideLinkedPmContext: options.overrideLinkedPmContext,
1841
- failOnContextMismatch: options.failOnContextMismatch,
1842
- failOnEmptyTestRun: options.failOnEmptyTestRun,
1843
- requireAssertionsForPm: options.requireAssertionsForPm,
1844
- checkContext: options.checkContext,
1845
- autoPmContext: options.autoPmContext,
1846
- sourceRoots: {
1847
- projectPmRoot: pmRoot,
1848
- globalPmRoot: resolveGlobalPmRoot(process.cwd())
1849
- }
1850
- });
1851
- }
1852
- function buildTestWarnings(options, runSelection, runResults) {
1853
- const warnings = [];
1854
- if (runSelection && runSelection.selector !== null) {
1855
- warnings.push(`linked_test_selection:${runSelection.selector}=${runSelection.requested};selected=${runSelection.selected_count};skipped=${runSelection.skipped_count};indexes=${runSelection.selected_indexes.join(",")}`);
1856
- }
1857
- if (options.run === true && options.checkContext === true) {
1858
- const preflight = summarizeContextPreflight(runResults);
1859
- warnings.push(`context_preflight:checked_pm_commands=${preflight.checked_pm_commands};tracker_read_commands=${preflight.tracker_read_commands};mismatches=${preflight.mismatches};auto_remediated=${preflight.auto_remediated}`);
1860
- }
1861
- return warnings;
1862
- }
1863
- async function recordTestRunSummary(params) {
1864
- const { options, pmRoot, settings, itemId, runStartedAt, runResults, failOnSkippedTriggered, warnings } = params;
1865
- if (options.run !== true || !runStartedAt || settings.testing.record_results_to_items !== true) {
1866
- return;
1867
- }
1868
- const summary = summarizeRunResultStatuses(runResults);
1869
- const trackedRunId = resolveTrackedRunId("test");
1870
- const attemptRaw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();
1871
- const parsedAttempt = attemptRaw ? Number.parseInt(attemptRaw, 10) : Number.NaN;
1872
- const resumedFrom = process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM?.trim();
1873
- try {
1874
- await appendTrackedTestRunSummary({
1875
- pmRoot,
1876
- settings,
1877
- itemId,
1878
- author: resolveAuthor(options.author, settings.author_default),
1879
- message: `Track test run summary (${trackedRunId})`,
1880
- entry: {
1881
- run_id: trackedRunId,
1882
- kind: "test",
1883
- status: summary.failed > 0 || failOnSkippedTriggered === true ? "failed" : "passed",
1884
- started_at: runStartedAt,
1885
- finished_at: nowIso(),
1886
- recorded_at: nowIso(),
1887
- attempt: Number.isFinite(parsedAttempt) && parsedAttempt >= 1 ? parsedAttempt : void 0,
1888
- resumed_from: resumedFrom && resumedFrom.length > 0 ? resumedFrom : void 0,
1889
- passed: summary.passed,
1890
- failed: summary.failed,
1891
- skipped: summary.skipped,
1892
- fail_on_skipped_triggered: failOnSkippedTriggered ? true : void 0
1893
- }
1894
- });
1895
- } catch (error) {
1896
- warnings.push(`test_result_tracking_failed:${itemId}:${error instanceof Error ? error.message : String(error)}`);
1897
- }
1898
- }
1899
- async function runTest(id, options, global2) {
1900
- const stdinResolver = createStdinTokenResolver();
1901
- const pmRoot = resolvePmRoot(process.cwd(), global2.path);
1902
- if (!await pathExists(getSettingsPath(pmRoot))) {
1903
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
1904
- }
1905
- const settings = await readSettings(pmRoot);
1906
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
1907
- const resolvedAdds = await stdinResolver.resolveList(options.add, "--add");
1908
- const resolvedAddJsons = await stdinResolver.resolveList(options.addJson, "--add-json");
1909
- const resolvedRemoves = await stdinResolver.resolveList(options.remove, "--remove");
1910
- const adds = [...parseAddEntries(resolvedAdds), ...parseAddJsonEntries(resolvedAddJsons)];
1911
- const removes = parseRemoveEntries(resolvedRemoves);
1912
- const item = await resolveLinkedTestItem({
1913
- id,
1914
- options,
1915
- pmRoot,
1916
- settings,
1917
- typeToFolder: typeRegistry.type_to_folder,
1918
- adds,
1919
- removes
1920
- });
1921
- const runOptions = resolveTestRunOptions(options, item.tests);
1922
- const runStartedAt = options.run === true ? nowIso() : void 0;
1923
- const runResults = await executeSelectedLinkedTests({ options, runOptions, pmRoot });
1924
- const failureCategories = countFailureCategories(runResults);
1925
- const failOnSkippedTriggered = options.run === true && options.failOnSkipped === true && runResults.some((entry) => entry.status === "skipped");
1926
- const warnings = buildTestWarnings(options, runOptions.runSelection, runResults);
1927
- await recordTestRunSummary({ options, pmRoot, settings, itemId: item.itemId, runStartedAt, runResults, failOnSkippedTriggered, warnings });
1928
- return {
1929
- ok: runResults.every((entry) => entry.status !== "failed") && failOnSkippedTriggered !== true,
1930
- id: item.itemId,
1931
- tests: item.tests,
1932
- run_results: runResults,
1933
- failure_categories: failureCategories,
1934
- selection: runOptions.runSelection ? {
1935
- selector: runOptions.runSelection.selector,
1936
- requested: runOptions.runSelection.requested,
1937
- selected_indexes: runOptions.runSelection.selected_indexes,
1938
- selected_count: runOptions.runSelection.selected_count,
1939
- skipped_count: runOptions.runSelection.skipped_count
1940
- } : void 0,
1941
- fail_on_skipped_triggered: failOnSkippedTriggered ? true : void 0,
1942
- warnings: warnings.length > 0 ? warnings : void 0,
1943
- changed: item.changed,
1944
- count: item.tests.length
1945
- };
1946
- }
1947
- var _testOnlyTestCommand = {
1948
- buildPmContextMismatchHint,
1949
- commandInvokesPmCli,
1950
- commandInvokesPmTrackerReadCommand,
1951
- copyIntoSandboxIfPresent,
1952
- countLinkedTestItemFiles,
1953
- ensureScope,
1954
- evaluateLinkedTestAssertions,
1955
- extractPmInvocationArgsFromSegment,
1956
- firstDirectTestRunnerSubcommand,
1957
- hasLinkedTestAssertions,
1958
- parseAddJsonEntries,
1959
- parsePmContextMode,
1960
- readJsonPathValue,
1961
- resolveAuthor,
1962
- resolveDirectRunnerSubcommand,
1963
- resolveLinkedTestEffectiveContextMode,
1964
- resolveLinkedTestFailureExitCode,
1965
- resolveLinkedTestRequestedContextMode,
1966
- resolveTrackedRunId,
1967
- runLinkedTestCommand,
1968
- seedLinkedTestSandbox,
1969
- seedLinkedTestTrackerData,
1970
- splitJsonPathSegments,
1971
- summarizeRunResultStatuses
1972
- };
1973
-
1974
- export {
1975
- appendTrackedTestRunSummary,
1976
- summarizeContextPreflight,
1977
- extractReferencedPmItemIdsFromCommand,
1978
- classifyLinkedTestFailure,
1979
- countFailureCategories,
1980
- resolveLinkedTestFailureExitCode,
1981
- runLinkedTests,
1982
- runTest,
1983
- _testOnlyTestCommand
1984
- };
1985
- //# sourceMappingURL=chunk-C5JBZRPU.js.map