@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,1704 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c9a5ce7b-7b83-549d-bddc-c6f8ce8564b8")}catch(e){}}();
3
- import {
4
- canonicalDocument,
5
- normalizeItemId,
6
- normalizeRawItemId,
7
- parseItemDocument,
8
- serializeItemDocument
9
- } from "./chunk-G24G7ZAV.js";
10
- import {
11
- nowIso
12
- } from "./chunk-3GCS5SKL.js";
13
- import {
14
- PmCliError,
15
- getActiveExtensionRegistrations,
16
- hasActiveOnReadHooks,
17
- orderObject,
18
- projectAfterCommandItemSnapshot,
19
- recordAfterCommandAffectedItem,
20
- resolveGovernanceKnobs,
21
- runActiveOnReadHooks,
22
- runActiveOnWriteHooks,
23
- runActiveServiceOverride,
24
- sha256Hex,
25
- stableStringify
26
- } from "./chunk-E3SZTQ4K.js";
27
- import {
28
- evictOldestMemoEntries
29
- } from "./chunk-NNHHXJB2.js";
30
- import {
31
- EMPTY_CANONICAL_DOCUMENT,
32
- EXIT_CODE,
33
- FRONT_MATTER_KEY_ORDER,
34
- ITEM_FILE_EXTENSIONS,
35
- TYPE_TO_FOLDER,
36
- appendLineAtomic,
37
- ensureDir,
38
- getHistoryPath,
39
- getItemFormatFromPath,
40
- getItemPath,
41
- getLockPath,
42
- levenshteinDistanceWithinLimit,
43
- normalizeItemFieldType,
44
- pathExists,
45
- resolveItemTypeRegistry,
46
- toErrorMessage,
47
- writeFileAtomic
48
- } from "./chunk-57NWPFF2.js";
49
-
50
- // dist/core/extensions/item-fields.js
51
- var RESERVED_ITEM_FIELD_NAMES = new Set(FRONT_MATTER_KEY_ORDER);
52
- function normalizeFieldName(value) {
53
- if (typeof value !== "string") {
54
- return null;
55
- }
56
- const normalized = value.trim();
57
- return normalized.length > 0 ? normalized : null;
58
- }
59
- function normalizeFieldType(value) {
60
- if (typeof value !== "string") {
61
- return null;
62
- }
63
- return normalizeItemFieldType(value);
64
- }
65
- function cloneFieldValue(value) {
66
- try {
67
- return structuredClone(value);
68
- } catch {
69
- return value;
70
- }
71
- }
72
- function parseFieldAssignment(raw) {
73
- const trimmed = raw.trim();
74
- const separatorIndex = trimmed.indexOf("=");
75
- if (separatorIndex <= 0) {
76
- throw new PmCliError(`--field entries must use name=value syntax, received: ${raw}`, EXIT_CODE.USAGE);
77
- }
78
- const key = trimmed.slice(0, separatorIndex).trim();
79
- const value = trimmed.slice(separatorIndex + 1);
80
- return { key, value };
81
- }
82
- function parseJsonFieldValue(raw, fieldName, expectedType) {
83
- try {
84
- const parsed = JSON.parse(raw);
85
- if (expectedType === "array" && Array.isArray(parsed)) {
86
- return parsed;
87
- }
88
- if (expectedType === "object" && typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
89
- return parsed;
90
- }
91
- } catch {
92
- }
93
- throw new PmCliError(`--field ${fieldName}=... must be valid JSON ${expectedType}`, EXIT_CODE.USAGE);
94
- }
95
- function coerceRegisteredFieldValue(fieldName, fieldType, raw) {
96
- if (fieldType === "string") {
97
- return raw;
98
- }
99
- if (fieldType === "number") {
100
- const trimmed = raw.trim();
101
- if (trimmed.length === 0) {
102
- throw new PmCliError(`--field ${fieldName}=... must be a number`, EXIT_CODE.USAGE);
103
- }
104
- const parsed = Number(trimmed);
105
- if (!Number.isFinite(parsed)) {
106
- throw new PmCliError(`--field ${fieldName}=... must be a number`, EXIT_CODE.USAGE);
107
- }
108
- return parsed;
109
- }
110
- if (fieldType === "boolean") {
111
- const normalized = raw.trim().toLowerCase();
112
- if (normalized === "true" || normalized === "1" || normalized === "yes") {
113
- return true;
114
- }
115
- if (normalized === "false" || normalized === "0" || normalized === "no") {
116
- return false;
117
- }
118
- throw new PmCliError(`--field ${fieldName}=... must be one of true|false|1|0|yes|no`, EXIT_CODE.USAGE);
119
- }
120
- return parseJsonFieldValue(raw, fieldName, fieldType);
121
- }
122
- function collectRegisteredFieldDefinitions(registrations) {
123
- const definitions = /* @__PURE__ */ new Map();
124
- if (!registrations) {
125
- return definitions;
126
- }
127
- for (const registration of registrations.item_fields) {
128
- for (const definition of registration.fields) {
129
- const fieldName = normalizeFieldName(definition.name);
130
- const fieldType = normalizeFieldType(definition.type);
131
- if (!fieldName || !fieldType) {
132
- continue;
133
- }
134
- const existing = definitions.get(fieldName);
135
- if (existing && existing.type !== fieldType) {
136
- throw new PmCliError(`Extension item field "${fieldName}" is declared with conflicting types: ${existing.type}, ${fieldType}`, EXIT_CODE.USAGE, {
137
- code: "extension_item_field_type_conflict",
138
- nextSteps: ["Make every active extension declaration for this field use the same type."]
139
- });
140
- }
141
- definitions.set(fieldName, { name: fieldName, type: fieldType });
142
- }
143
- }
144
- return definitions;
145
- }
146
- function assertNotReservedItemFieldName(fieldName) {
147
- if (!RESERVED_ITEM_FIELD_NAMES.has(fieldName)) {
148
- return;
149
- }
150
- throw new PmCliError(`Extension item field "${fieldName}" collides with reserved item metadata`, EXIT_CODE.USAGE, {
151
- code: "extension_item_field_reserved",
152
- nextSteps: ["Rename the extension item field, preferably with an extension-specific prefix."]
153
- });
154
- }
155
- function collectRegisteredItemFieldNames(registrations) {
156
- return [...collectRegisteredFieldDefinitions(registrations).keys()].sort((left, right) => left.localeCompare(right));
157
- }
158
- function parseRegisteredItemFieldAssignments(rawFields, registrations) {
159
- if (!rawFields || rawFields.length === 0) {
160
- return {};
161
- }
162
- const definitions = collectRegisteredFieldDefinitions(registrations);
163
- const values = {};
164
- for (const raw of rawFields) {
165
- const { key, value } = parseFieldAssignment(raw);
166
- const definition = definitions.get(key);
167
- if (!definition) {
168
- const known = [...definitions.keys()].sort((left, right) => left.localeCompare(right));
169
- throw new PmCliError(`--field ${key} is not declared by an active extension item-field registration`, EXIT_CODE.USAGE, {
170
- code: "extension_item_field_unknown",
171
- recovery: { provided_fields: known },
172
- nextSteps: known.length > 0 ? [`Use one of the declared fields: ${known.join(", ")}`] : ["Activate an extension that calls registerItemFields before setting extension fields."]
173
- });
174
- }
175
- assertNotReservedItemFieldName(definition.name);
176
- values[definition.name] = coerceRegisteredFieldValue(definition.name, definition.type, value);
177
- }
178
- return values;
179
- }
180
- function isValidFieldType(value, expectedType) {
181
- if (expectedType === "string") {
182
- return typeof value === "string";
183
- }
184
- if (expectedType === "number") {
185
- return typeof value === "number" && Number.isFinite(value);
186
- }
187
- if (expectedType === "boolean") {
188
- return typeof value === "boolean";
189
- }
190
- if (expectedType === "array") {
191
- return Array.isArray(value);
192
- }
193
- return typeof value === "object" && value !== null && !Array.isArray(value);
194
- }
195
- function isAllowedFieldValue(value, allowed) {
196
- if (!allowed || allowed.length === 0) {
197
- return true;
198
- }
199
- return allowed.some((candidate) => Object.is(candidate, value));
200
- }
201
- function applyRegisteredItemFieldDefaultsAndValidation(frontMatter, registrations, options = {}) {
202
- if (!registrations) {
203
- return;
204
- }
205
- collectRegisteredFieldDefinitions(registrations);
206
- for (const registration of registrations.item_fields) {
207
- for (const definition of registration.fields) {
208
- const fieldName = normalizeFieldName(definition.name);
209
- if (!fieldName) {
210
- continue;
211
- }
212
- assertNotReservedItemFieldName(fieldName);
213
- if (!(fieldName in frontMatter) && !options.skipDefaultFields?.has(fieldName) && Object.prototype.hasOwnProperty.call(definition, "default")) {
214
- frontMatter[fieldName] = cloneFieldValue(definition.default);
215
- }
216
- const currentValue = frontMatter[fieldName];
217
- if (currentValue === void 0) {
218
- continue;
219
- }
220
- const expectedType = normalizeFieldType(definition.type);
221
- if (expectedType && !isValidFieldType(currentValue, expectedType)) {
222
- throw new TypeError(`Item field "${fieldName}" must be of type ${expectedType}`);
223
- }
224
- const allowedValues = Array.isArray(definition.values) ? definition.values : void 0;
225
- if (!isAllowedFieldValue(currentValue, allowedValues)) {
226
- throw new TypeError(`Item field "${fieldName}" must match one of the configured allowed values`);
227
- }
228
- }
229
- }
230
- }
231
-
232
- // dist/core/item/item-record.js
233
- function toItemRecord(item) {
234
- return item;
235
- }
236
-
237
- // dist/core/history/history.js
238
- import jsonPatch from "fast-json-patch";
239
- var EMPTY_LEGACY_HASH_DOCUMENT = {
240
- front_matter: {},
241
- body: ""
242
- };
243
- function decodeJsonPointer(path5) {
244
- if (!path5 || path5 === "/") {
245
- return [];
246
- }
247
- if (!path5.startsWith("/")) {
248
- return [];
249
- }
250
- return path5.slice(1).split("/").map((segment) => segment.replaceAll("~1", "/").replaceAll("~0", "~"));
251
- }
252
- function isDefinedPointerPath(document, path5) {
253
- const segments = decodeJsonPointer(path5);
254
- if (segments.length === 0) {
255
- return true;
256
- }
257
- let cursor = document;
258
- for (const segment of segments) {
259
- if (Array.isArray(cursor)) {
260
- if (segment === "-" || !/^(0|[1-9]\d*)$/.test(segment)) {
261
- return false;
262
- }
263
- const index = Number(segment);
264
- if (!Number.isInteger(index) || index < 0 || index >= cursor.length) {
265
- return false;
266
- }
267
- const next2 = cursor[index];
268
- if (next2 === void 0) {
269
- return false;
270
- }
271
- cursor = next2;
272
- continue;
273
- }
274
- if (typeof cursor !== "object" || cursor === null) {
275
- return false;
276
- }
277
- if (!Object.prototype.hasOwnProperty.call(cursor, segment)) {
278
- return false;
279
- }
280
- const next = cursor[segment];
281
- if (next === void 0) {
282
- return false;
283
- }
284
- cursor = next;
285
- }
286
- return true;
287
- }
288
- function normalizeHistoryPatchOps(beforeDocument, patch) {
289
- const normalized = [];
290
- let replayCursor = structuredClone(beforeDocument);
291
- for (const operation of patch) {
292
- const normalizedOperation = operation.op === "replace" && !isDefinedPointerPath(replayCursor, operation.path) ? { ...operation, op: "add" } : operation;
293
- normalized.push(normalizedOperation);
294
- replayCursor = jsonPatch.applyPatch(replayCursor, [normalizedOperation], true, true).newDocument;
295
- }
296
- return normalized;
297
- }
298
- function canonicalHashDocument(document) {
299
- const hasMetadata = document.metadata && Object.keys(document.metadata).length > 0;
300
- if (!hasMetadata) {
301
- return {
302
- front_matter: {},
303
- body: document.body ?? ""
304
- };
305
- }
306
- const canonical = canonicalDocument(document);
307
- const orderedFrontMatter = orderObject(toItemRecord(canonical.metadata), FRONT_MATTER_KEY_ORDER);
308
- return {
309
- front_matter: orderedFrontMatter,
310
- body: canonical.body
311
- };
312
- }
313
- function canonicalPatchDocument(document) {
314
- const hasMetadata = document.metadata && Object.keys(document.metadata).length > 0;
315
- if (!hasMetadata) {
316
- return {
317
- metadata: {},
318
- body: document.body ?? ""
319
- };
320
- }
321
- const canonical = canonicalDocument(document);
322
- const orderedMetadata = orderObject(toItemRecord(canonical.metadata), FRONT_MATTER_KEY_ORDER);
323
- return {
324
- metadata: orderedMetadata,
325
- body: canonical.body
326
- };
327
- }
328
- function hashDocument(document) {
329
- return sha256Hex(stableStringify(canonicalHashDocument(document)));
330
- }
331
- function hashEmptyDocument() {
332
- return sha256Hex(stableStringify(EMPTY_LEGACY_HASH_DOCUMENT));
333
- }
334
- function createHistoryEntry(params) {
335
- const beforeHashCanonical = canonicalHashDocument(params.before);
336
- const afterHashCanonical = canonicalHashDocument(params.after);
337
- const beforePatchCanonical = canonicalPatchDocument(params.before);
338
- const afterPatchCanonical = canonicalPatchDocument(params.after);
339
- const rawPatch = jsonPatch.compare(beforePatchCanonical, afterPatchCanonical);
340
- const patch = normalizeHistoryPatchOps(beforePatchCanonical, rawPatch);
341
- return {
342
- ts: params.nowIso,
343
- author: params.author,
344
- op: params.op,
345
- patch,
346
- before_hash: sha256Hex(stableStringify(beforeHashCanonical)),
347
- after_hash: sha256Hex(stableStringify(afterHashCanonical)),
348
- message: params.message === void 0 ? void 0 : params.message
349
- };
350
- }
351
- function isRecord(value) {
352
- return typeof value === "object" && value !== null && !Array.isArray(value);
353
- }
354
- function fallbackHistoryTimestamp(entry) {
355
- const ts = entry.ts.trim();
356
- return ts.length > 0 ? ts : nowIso();
357
- }
358
- function withHistoryTimestamp(value, fallbackTs) {
359
- const ts = value.ts;
360
- if (typeof ts === "string" && ts.trim().length > 0) {
361
- return value;
362
- }
363
- return { ...value, ts: fallbackTs };
364
- }
365
- function serializeHistoryLine(value, fallbackEntry) {
366
- const fallbackTs = fallbackHistoryTimestamp(fallbackEntry);
367
- if (typeof value === "string") {
368
- try {
369
- const parsed = JSON.parse(value);
370
- if (isRecord(parsed)) {
371
- return JSON.stringify(withHistoryTimestamp(parsed, fallbackTs));
372
- }
373
- } catch {
374
- }
375
- return value;
376
- }
377
- if (isRecord(value)) {
378
- return JSON.stringify(withHistoryTimestamp(value, fallbackTs));
379
- }
380
- return JSON.stringify(value);
381
- }
382
- async function appendHistoryEntry(historyPath, entry) {
383
- const override = await runActiveServiceOverride("history_append", {
384
- history_path: historyPath,
385
- entry
386
- });
387
- if (override.handled) {
388
- if (override.result === false) {
389
- return;
390
- }
391
- if (typeof override.result === "string") {
392
- await appendLineAtomic(historyPath, serializeHistoryLine(override.result, entry));
393
- return;
394
- }
395
- if (typeof override.result === "object" && override.result !== null) {
396
- const record = override.result;
397
- if (record.skip === true) {
398
- return;
399
- }
400
- const nextHistoryPath = typeof record.history_path === "string" ? record.history_path : historyPath;
401
- if (typeof record.line === "string") {
402
- await appendLineAtomic(nextHistoryPath, serializeHistoryLine(record.line, entry));
403
- return;
404
- }
405
- await appendLineAtomic(nextHistoryPath, serializeHistoryLine(record.entry ?? entry, entry));
406
- return;
407
- }
408
- }
409
- await appendLineAtomic(historyPath, serializeHistoryLine(entry, entry));
410
- }
411
-
412
- // dist/core/history/history-stream-policy.js
413
- import fs from "node:fs/promises";
414
- import path from "node:path";
415
- function toSortedUniqueItemIds(itemIds) {
416
- return [...new Set(itemIds.filter((value) => value.trim().length > 0))].sort((left, right) => left.localeCompare(right));
417
- }
418
- function strictMissingStreamError(itemId, commandLabel) {
419
- return new PmCliError(`Missing history stream for ${itemId}. ${commandLabel} requires history streams when settings.history.missing_stream is strict_error.`, EXIT_CODE.NOT_FOUND);
420
- }
421
- async function createStream(historyPath, commandLabel) {
422
- await ensureDir(path.dirname(historyPath));
423
- const handle = await fs.open(historyPath, "a");
424
- await handle.close();
425
- return runActiveOnWriteHooks({
426
- path: historyPath,
427
- scope: "project",
428
- op: `${commandLabel}:history:auto_create`
429
- });
430
- }
431
- async function enforceHistoryStreamPolicyForItem(params) {
432
- return enforceHistoryStreamPolicyForItems({
433
- pmRoot: params.pmRoot,
434
- settings: params.settings,
435
- itemIds: [params.itemId],
436
- commandLabel: params.commandLabel
437
- });
438
- }
439
- async function enforceHistoryStreamPolicyForItems(params) {
440
- const ids = toSortedUniqueItemIds(params.itemIds);
441
- const autoCreated = [];
442
- const warnings = [];
443
- for (const itemId of ids) {
444
- const historyPath = getHistoryPath(params.pmRoot, itemId);
445
- if (await pathExists(historyPath)) {
446
- continue;
447
- }
448
- if (params.settings.history.missing_stream === "strict_error") {
449
- throw strictMissingStreamError(itemId, params.commandLabel);
450
- }
451
- warnings.push(...await createStream(historyPath, params.commandLabel));
452
- warnings.push(`history_stream_auto_created:${itemId}`);
453
- autoCreated.push(itemId);
454
- }
455
- return {
456
- auto_created_ids: autoCreated,
457
- warnings
458
- };
459
- }
460
-
461
- // dist/core/lock/lock.js
462
- import fs2 from "node:fs/promises";
463
- import path2 from "node:path";
464
- import { randomUUID } from "node:crypto";
465
- function parseLockInfo(raw) {
466
- let parsed;
467
- try {
468
- parsed = JSON.parse(raw);
469
- } catch {
470
- return {
471
- info: null,
472
- warnings: ["lock_info_invalid_json"]
473
- };
474
- }
475
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
476
- return {
477
- info: null,
478
- warnings: ["lock_info_invalid_shape"]
479
- };
480
- }
481
- const candidate = parsed;
482
- const id = candidate.id;
483
- const pid = candidate.pid;
484
- const owner = candidate.owner;
485
- const createdAt = candidate.created_at;
486
- const ttlSeconds = candidate.ttl_seconds;
487
- if (typeof id !== "string" || typeof pid !== "number" || !Number.isFinite(pid) || typeof owner !== "string" || typeof createdAt !== "string" || typeof ttlSeconds !== "number" || !Number.isFinite(ttlSeconds)) {
488
- return {
489
- info: null,
490
- warnings: ["lock_info_invalid_shape"]
491
- };
492
- }
493
- return {
494
- info: {
495
- id,
496
- pid,
497
- owner,
498
- created_at: createdAt,
499
- ttl_seconds: ttlSeconds
500
- },
501
- warnings: []
502
- };
503
- }
504
- async function readLockInfo(lockPath) {
505
- try {
506
- const raw = await fs2.readFile(lockPath, "utf8");
507
- await runActiveOnReadHooks({
508
- path: lockPath,
509
- scope: "project"
510
- });
511
- return parseLockInfo(raw);
512
- } catch (error) {
513
- if (isErrno(error, "ENOENT")) {
514
- return {
515
- info: null,
516
- warnings: []
517
- };
518
- }
519
- return {
520
- info: null,
521
- warnings: ["lock_info_read_failed"]
522
- };
523
- }
524
- }
525
- function isErrno(error, code) {
526
- return typeof error === "object" && error !== null && "code" in error && error.code === code;
527
- }
528
- async function emitLockWriteHook(lockPath, op) {
529
- await runActiveOnWriteHooks({
530
- path: lockPath,
531
- scope: "project",
532
- op
533
- });
534
- }
535
- function buildLockPayload(id, owner, ttlSeconds) {
536
- return {
537
- id,
538
- pid: process.pid,
539
- owner,
540
- created_at: nowIso(),
541
- ttl_seconds: ttlSeconds
542
- };
543
- }
544
- async function createLockFile(lockPath, id, owner, ttlSeconds) {
545
- await fs2.mkdir(path2.dirname(lockPath), { recursive: true });
546
- const handle = await fs2.open(lockPath, "wx");
547
- try {
548
- await handle.writeFile(`${JSON.stringify(buildLockPayload(id, owner, ttlSeconds), null, 2)}
549
- `, "utf8");
550
- } finally {
551
- await handle.close();
552
- }
553
- await emitLockWriteHook(lockPath, "lock:create");
554
- }
555
- async function unlinkLockWithHook(lockPath, op) {
556
- try {
557
- await fs2.unlink(lockPath);
558
- await emitLockWriteHook(lockPath, op);
559
- return true;
560
- } catch {
561
- return false;
562
- }
563
- }
564
- function isStaleLock(info, ttlSeconds) {
565
- const createdAtMs = info?.created_at ? Date.parse(info.created_at) : Number.NaN;
566
- const ageMs = Number.isFinite(createdAtMs) ? Date.now() - createdAtMs : Number.POSITIVE_INFINITY;
567
- return ageMs > ttlSeconds * 1e3;
568
- }
569
- function lockOwnerSuffix(info) {
570
- return info?.owner ? ` (owner ${info.owner})` : "";
571
- }
572
- var LOCK_WAIT_INITIAL_DELAY_MS = 25;
573
- var LOCK_WAIT_MAX_DELAY_MS = 200;
574
- var LOCK_CONFLICT_RETRY_HINT_MS = 250;
575
- var MAX_STALE_LOCK_REMOVALS = 3;
576
- var STALE_CLEANUP_GATE_SUFFIX = ".stale-cleanup";
577
- var STALE_CLEANUP_GATE_OWNER_FILE = "owner.json";
578
- var STALE_CLEANUP_GATE_STALE_MS = 1e4;
579
- var STALE_CLEANUP_GATE_MAX_ACTIVE_MS = 5 * 6e4;
580
- function parseNonNegativeIntegerWaitMs(value) {
581
- if (typeof value === "string") {
582
- const trimmed = value.trim();
583
- if (!/^\d+$/.test(trimmed)) {
584
- return void 0;
585
- }
586
- const parsed = Number(trimmed);
587
- return Number.isSafeInteger(parsed) ? parsed : void 0;
588
- }
589
- if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
590
- return Math.trunc(value);
591
- }
592
- return void 0;
593
- }
594
- function resolveLockWaitMs(waitMs) {
595
- const envRaw = process.env.PM_LOCK_WAIT_MS;
596
- const envParsed = parseNonNegativeIntegerWaitMs(envRaw);
597
- if (envParsed !== void 0) {
598
- return envParsed;
599
- }
600
- const callerParsed = parseNonNegativeIntegerWaitMs(waitMs);
601
- if (callerParsed !== void 0) {
602
- return callerParsed;
603
- }
604
- return 0;
605
- }
606
- function sleepWithJitter(baseDelayMs) {
607
- const jitteredMs = Math.max(1, Math.round(baseDelayMs * (0.5 + Math.random())));
608
- return new Promise((resolve) => setTimeout(resolve, jitteredMs));
609
- }
610
- function buildLockConflictError(id, info, waitedMs) {
611
- const waitedSuffix = waitedMs > 0 ? ` after waiting ${waitedMs}ms` : "";
612
- return new PmCliError(`Item ${id} is locked${lockOwnerSuffix(info)}${waitedSuffix}`, EXIT_CODE.CONFLICT, {
613
- code: "lock_conflict",
614
- recovery: {
615
- retry_after_ms: LOCK_CONFLICT_RETRY_HINT_MS
616
- }
617
- });
618
- }
619
- function resolveLockOverrideRelease(result) {
620
- if (typeof result === "function") {
621
- return result;
622
- }
623
- if (typeof result === "object" && result !== null && "release" in result) {
624
- const release = result.release;
625
- return typeof release === "function" ? release : null;
626
- }
627
- return null;
628
- }
629
- function throwIfStaleLockNeedsForce(id, lockInfo, force, forceRequired) {
630
- if (!force && forceRequired) {
631
- const warningSuffix = lockInfo.warnings.length > 0 ? ` (${lockInfo.warnings.join(",")})` : "";
632
- throw new PmCliError(`Item ${id} lock is stale${warningSuffix}; rerun with --force when supported for this command`, EXIT_CODE.CONFLICT);
633
- }
634
- }
635
- function parseStaleCleanupGateOwner(raw) {
636
- let parsed;
637
- try {
638
- parsed = JSON.parse(raw);
639
- } catch {
640
- return null;
641
- }
642
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
643
- return null;
644
- }
645
- const candidate = parsed;
646
- const pid = candidate.pid;
647
- const token = candidate.token;
648
- if (typeof pid !== "number" || !Number.isInteger(pid) || pid <= 0 || typeof token !== "string" || token.length === 0) {
649
- return null;
650
- }
651
- return { pid, token };
652
- }
653
- async function readStaleCleanupGateOwner(gatePath) {
654
- try {
655
- return parseStaleCleanupGateOwner(await fs2.readFile(path2.join(gatePath, STALE_CLEANUP_GATE_OWNER_FILE), "utf8"));
656
- } catch {
657
- return null;
658
- }
659
- }
660
- function isProcessAlive(pid) {
661
- try {
662
- process.kill(pid, 0);
663
- return true;
664
- } catch (error) {
665
- if (isErrno(error, "ESRCH")) {
666
- return false;
667
- }
668
- return true;
669
- }
670
- }
671
- async function removeStaleCleanupGateDirectory(gatePath) {
672
- try {
673
- await fs2.rm(gatePath, { recursive: true, force: true });
674
- return true;
675
- } catch {
676
- return false;
677
- }
678
- }
679
- async function releaseStaleCleanupGate(gatePath, token) {
680
- const owner = await readStaleCleanupGateOwner(gatePath);
681
- if (owner === null || owner.token !== token) {
682
- return;
683
- }
684
- await removeStaleCleanupGateDirectory(gatePath);
685
- }
686
- async function tryCreateStaleCleanupGate(gatePath) {
687
- try {
688
- await fs2.mkdir(gatePath);
689
- } catch (error) {
690
- if (isErrno(error, "EEXIST")) {
691
- return null;
692
- }
693
- return null;
694
- }
695
- const owner = { pid: process.pid, token: randomUUID() };
696
- try {
697
- await fs2.writeFile(path2.join(gatePath, STALE_CLEANUP_GATE_OWNER_FILE), `${JSON.stringify(owner)}
698
- `, "utf8");
699
- } catch {
700
- await removeStaleCleanupGateDirectory(gatePath);
701
- return null;
702
- }
703
- return owner;
704
- }
705
- async function removeExpiredStaleCleanupGate(gatePath) {
706
- let gateAgeMs;
707
- try {
708
- const stats = await fs2.stat(gatePath);
709
- gateAgeMs = Date.now() - stats.mtimeMs;
710
- if (gateAgeMs <= STALE_CLEANUP_GATE_STALE_MS) {
711
- return false;
712
- }
713
- } catch (error) {
714
- return isErrno(error, "ENOENT");
715
- }
716
- const owner = await readStaleCleanupGateOwner(gatePath);
717
- if (owner !== null && isProcessAlive(owner.pid) && gateAgeMs <= STALE_CLEANUP_GATE_MAX_ACTIVE_MS) {
718
- return false;
719
- }
720
- return removeStaleCleanupGateDirectory(gatePath);
721
- }
722
- async function acquireStaleCleanupGate(lockPath, _id) {
723
- const gatePath = `${lockPath}${STALE_CLEANUP_GATE_SUFFIX}`;
724
- const owner = await tryCreateStaleCleanupGate(gatePath);
725
- if (owner !== null) {
726
- return async () => releaseStaleCleanupGate(gatePath, owner.token);
727
- }
728
- if (!await removeExpiredStaleCleanupGate(gatePath)) {
729
- return null;
730
- }
731
- const recoveredOwner = await tryCreateStaleCleanupGate(gatePath);
732
- if (recoveredOwner === null) {
733
- return null;
734
- }
735
- return async () => releaseStaleCleanupGate(gatePath, recoveredOwner.token);
736
- }
737
- async function removeConfirmedStaleLock(params) {
738
- const releaseCleanupGate = await acquireStaleCleanupGate(params.lockPath, params.id);
739
- if (releaseCleanupGate === null) {
740
- return {
741
- lockInfo: params.fallbackLockInfo,
742
- shouldRetryCreate: false,
743
- staleRemovalCounted: false
744
- };
745
- }
746
- try {
747
- const currentLockInfo = await readLockInfo(params.lockPath);
748
- if (currentLockInfo.info === null && currentLockInfo.warnings.length === 0) {
749
- return {
750
- lockInfo: currentLockInfo,
751
- shouldRetryCreate: true,
752
- staleRemovalCounted: false
753
- };
754
- }
755
- if (!isStaleLock(currentLockInfo.info, params.ttlSeconds)) {
756
- return {
757
- lockInfo: currentLockInfo,
758
- shouldRetryCreate: false,
759
- staleRemovalCounted: false
760
- };
761
- }
762
- throwIfStaleLockNeedsForce(params.id, currentLockInfo, params.force, params.forceRequiredForStaleLock);
763
- if (params.staleRemovals >= MAX_STALE_LOCK_REMOVALS) {
764
- throw buildLockConflictError(params.id, currentLockInfo.info, Date.now() - params.startedAtMs);
765
- }
766
- return {
767
- lockInfo: currentLockInfo,
768
- shouldRetryCreate: await unlinkLockWithHook(params.lockPath, "lock:stale_remove"),
769
- staleRemovalCounted: true
770
- };
771
- } finally {
772
- await releaseCleanupGate();
773
- }
774
- }
775
- async function acquireLock(pmRoot, id, ttlSeconds, owner, force = false, forceRequiredForStaleLock = true, waitMs) {
776
- const lockOverride = await runActiveServiceOverride("lock_acquire", {
777
- pm_root: pmRoot,
778
- id,
779
- ttl_seconds: ttlSeconds,
780
- owner,
781
- force,
782
- force_required_for_stale_lock: forceRequiredForStaleLock
783
- });
784
- if (lockOverride.handled) {
785
- const release = resolveLockOverrideRelease(lockOverride.result);
786
- if (release) {
787
- return async () => {
788
- await Promise.resolve(release());
789
- await runActiveServiceOverride("lock_release", {
790
- pm_root: pmRoot,
791
- id,
792
- owner
793
- });
794
- };
795
- }
796
- }
797
- const lockPath = getLockPath(pmRoot, id);
798
- const waitBudgetMs = resolveLockWaitMs(waitMs);
799
- const startedAtMs = Date.now();
800
- let staleRemovals = 0;
801
- let backoffMs = LOCK_WAIT_INITIAL_DELAY_MS;
802
- for (; ; ) {
803
- try {
804
- await createLockFile(lockPath, id, owner, ttlSeconds);
805
- return async () => {
806
- await unlinkLockWithHook(lockPath, "lock:release");
807
- await runActiveServiceOverride("lock_release", {
808
- pm_root: pmRoot,
809
- id,
810
- owner
811
- });
812
- };
813
- } catch (error) {
814
- if (!isErrno(error, "EEXIST")) {
815
- throw new PmCliError(`Failed to acquire lock for ${id}: ${toErrorMessage(error)}`, EXIT_CODE.GENERIC_FAILURE);
816
- }
817
- let lockInfo = await readLockInfo(lockPath);
818
- if (isStaleLock(lockInfo.info, ttlSeconds)) {
819
- const staleRemoval = await removeConfirmedStaleLock({
820
- lockPath,
821
- id,
822
- ttlSeconds,
823
- force,
824
- forceRequiredForStaleLock,
825
- staleRemovals,
826
- waitBudgetMs,
827
- startedAtMs,
828
- fallbackLockInfo: lockInfo
829
- });
830
- lockInfo = staleRemoval.lockInfo;
831
- if (staleRemoval.staleRemovalCounted) {
832
- staleRemovals += 1;
833
- }
834
- if (staleRemoval.shouldRetryCreate) {
835
- continue;
836
- }
837
- }
838
- const elapsedMs = Date.now() - startedAtMs;
839
- if (waitBudgetMs === 0 || elapsedMs >= waitBudgetMs) {
840
- throw buildLockConflictError(id, lockInfo.info, waitBudgetMs === 0 ? 0 : elapsedMs);
841
- }
842
- await sleepWithJitter(Math.min(backoffMs, waitBudgetMs - elapsedMs));
843
- backoffMs = Math.min(backoffMs * 2, LOCK_WAIT_MAX_DELAY_MS);
844
- }
845
- }
846
- }
847
-
848
- // dist/core/store/front-matter-cache.js
849
- import fs3 from "node:fs/promises";
850
- import path3 from "node:path";
851
- import { createHash } from "node:crypto";
852
- var CACHE_VERSION = 6;
853
- var CACHE_FILENAME = "metadata-cache.json";
854
- var BODY_CACHE_FILENAME = "metadata-cache-bodies.json";
855
- var COLLECTIONS_CACHE_FILENAME = "metadata-cache-collections.json";
856
- var HEAVY_METADATA_KEYS = [
857
- "comments",
858
- "notes",
859
- "learnings",
860
- "files",
861
- "tests",
862
- "test_runs",
863
- "docs"
864
- ];
865
- function resolveActiveExtensionFieldNames() {
866
- return collectRegisteredItemFieldNames(getActiveExtensionRegistrations());
867
- }
868
- function splitHeavyMetadata(metadata) {
869
- const light = { ...metadata };
870
- const heavy = {};
871
- for (const key of HEAVY_METADATA_KEYS) {
872
- if (key in light) {
873
- heavy[key] = light[key];
874
- delete light[key];
875
- }
876
- }
877
- return { light, heavy };
878
- }
879
- function mergeHeavyMetadata(light, heavy) {
880
- if (!heavy || Object.keys(heavy).length === 0) {
881
- return light;
882
- }
883
- return { ...light, ...heavy };
884
- }
885
- function computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames) {
886
- const hash = createHash("sha256");
887
- hash.update(`format:${preferredFormat ?? "default"}`);
888
- const sortedTypes = Object.entries(typeToFolder).sort(([a], [b]) => a.localeCompare(b)).map(([type, folder]) => `${type}=${folder}`).join(",");
889
- hash.update(`|types:${sortedTypes}`);
890
- if (schema) {
891
- hash.update(`|schema:${JSON.stringify(schema)}`);
892
- }
893
- if (extensionFieldNames.length > 0) {
894
- hash.update(`|extension_fields:${extensionFieldNames.join(",")}`);
895
- }
896
- return hash.digest("hex").slice(0, 16);
897
- }
898
- function getCachePath(pmRoot) {
899
- return path3.join(pmRoot, "runtime", CACHE_FILENAME);
900
- }
901
- function getBodyCachePath(pmRoot) {
902
- return path3.join(pmRoot, "runtime", BODY_CACHE_FILENAME);
903
- }
904
- function getCollectionsCachePath(pmRoot) {
905
- return path3.join(pmRoot, "runtime", COLLECTIONS_CACHE_FILENAME);
906
- }
907
- var ENVELOPE_MEMO_MAX_ENTRIES = 24;
908
- var envelopeMemo = /* @__PURE__ */ new Map();
909
- function memoizeEnvelope(cachePath, entry) {
910
- if (envelopeMemo.size >= ENVELOPE_MEMO_MAX_ENTRIES && !envelopeMemo.has(cachePath)) {
911
- evictOldestMemoEntries(envelopeMemo);
912
- }
913
- envelopeMemo.set(cachePath, entry);
914
- }
915
- async function loadEnvelopeMemoized(cachePath, parse) {
916
- let stat;
917
- try {
918
- stat = await fs3.stat(cachePath);
919
- } catch {
920
- envelopeMemo.delete(cachePath);
921
- return null;
922
- }
923
- const memoized = envelopeMemo.get(cachePath);
924
- if (memoized && statMatches(memoized.signature, stat.mtimeMs, stat.ctimeMs, stat.size)) {
925
- envelopeMemo.delete(cachePath);
926
- envelopeMemo.set(cachePath, memoized);
927
- return memoized.envelope;
928
- }
929
- let envelope;
930
- try {
931
- envelope = parse(await fs3.readFile(cachePath, "utf8"));
932
- } catch {
933
- envelope = null;
934
- }
935
- memoizeEnvelope(cachePath, {
936
- signature: { mtime_ms: stat.mtimeMs, ctime_ms: stat.ctimeMs, size: stat.size },
937
- envelope
938
- });
939
- return envelope;
940
- }
941
- async function loadCache(pmRoot) {
942
- return await loadEnvelopeMemoized(getCachePath(pmRoot), (raw) => {
943
- const parsed = JSON.parse(raw);
944
- if (parsed.version !== CACHE_VERSION || typeof parsed.entries !== "object" || parsed.entries === null) {
945
- return null;
946
- }
947
- return parsed;
948
- });
949
- }
950
- async function loadBodyCache(pmRoot) {
951
- return await loadEnvelopeMemoized(getBodyCachePath(pmRoot), (raw) => {
952
- const parsed = JSON.parse(raw);
953
- if (parsed.version !== CACHE_VERSION || typeof parsed.bodies !== "object" || parsed.bodies === null) {
954
- return null;
955
- }
956
- return parsed;
957
- });
958
- }
959
- async function loadCollectionsCache(pmRoot) {
960
- return await loadEnvelopeMemoized(getCollectionsCachePath(pmRoot), (raw) => {
961
- const parsed = JSON.parse(raw);
962
- if (parsed.version !== CACHE_VERSION || typeof parsed.collections !== "object" || parsed.collections === null) {
963
- return null;
964
- }
965
- return parsed;
966
- });
967
- }
968
- async function persistCache(cachePath, envelope) {
969
- await fs3.mkdir(path3.dirname(cachePath), { recursive: true });
970
- await writeFileAtomic(cachePath, JSON.stringify(envelope));
971
- try {
972
- const stat = await fs3.stat(cachePath);
973
- memoizeEnvelope(cachePath, {
974
- signature: { mtime_ms: stat.mtimeMs, ctime_ms: stat.ctimeMs, size: stat.size },
975
- envelope
976
- });
977
- } catch {
978
- envelopeMemo.delete(cachePath);
979
- }
980
- }
981
- function shouldReplaceCachedDocumentCandidate(existingFormat, candidateFormat, preferredFormat) {
982
- if (preferredFormat) {
983
- return candidateFormat === preferredFormat && existingFormat !== preferredFormat;
984
- }
985
- return candidateFormat === "toon" && existingFormat !== "toon";
986
- }
987
- function appendWarning(warnings, warning) {
988
- if (warnings && !warnings.includes(warning)) {
989
- warnings.push(warning);
990
- }
991
- }
992
- function statMatches(signature, mtimeMs, ctimeMs, size) {
993
- return signature.mtime_ms === mtimeMs && signature.ctime_ms === ctimeMs && signature.size === size;
994
- }
995
- async function readItemDirectoryFiles(pmRoot, folder, warnings) {
996
- const dirPath = path3.join(pmRoot, folder);
997
- try {
998
- const files = await fs3.readdir(dirPath);
999
- return { folder, dirPath, files };
1000
- } catch (error) {
1001
- if (typeof error === "object" && error !== null && "code" in error && error.code !== "ENOENT") {
1002
- appendWarning(warnings, `item_list_directory_read_failed:${folder}`);
1003
- }
1004
- return { folder, dirPath, files: [] };
1005
- }
1006
- }
1007
- function isItemDocumentFile(file) {
1008
- return ITEM_FILE_EXTENSIONS.some((ext) => file.toLowerCase().endsWith(ext));
1009
- }
1010
- function markDocumentCacheMisses(misses, includeBody, includeCollections, metadataCached, bodyCached, collectionsCached) {
1011
- if (!metadataCached) {
1012
- misses.metadata = true;
1013
- }
1014
- if (includeBody && !bodyCached) {
1015
- misses.body = true;
1016
- }
1017
- if (includeCollections && !collectionsCached) {
1018
- misses.collections = true;
1019
- }
1020
- }
1021
- async function dispatchCachedDocumentReadHooks(filePath, warnings, dispatchReadHooks) {
1022
- if (!dispatchReadHooks) {
1023
- return;
1024
- }
1025
- for (const warning of await runActiveOnReadHooks({ path: filePath, scope: "project" })) {
1026
- appendWarning(warnings, warning);
1027
- }
1028
- }
1029
- async function readCachedDocumentParts(filePath, relativePath, context) {
1030
- const stat = await fs3.stat(filePath);
1031
- const mtimeMs = stat.mtimeMs;
1032
- const ctimeMs = stat.ctimeMs;
1033
- const { size } = stat;
1034
- const itemFormat = getItemFormatFromPath(filePath);
1035
- await dispatchCachedDocumentReadHooks(filePath, context.warnings, context.dispatchReadHooks);
1036
- const cachedEntry = context.previousEntries[relativePath];
1037
- const metadataCached = cachedEntry !== void 0 && statMatches(cachedEntry, mtimeMs, ctimeMs, size);
1038
- const cachedBody = context.previousBodies[relativePath];
1039
- const bodyCached = cachedBody !== void 0 && statMatches(cachedBody, mtimeMs, ctimeMs, size);
1040
- const cachedCollections = context.previousCollections[relativePath];
1041
- const collectionsCached = cachedCollections !== void 0 && statMatches(cachedCollections, mtimeMs, ctimeMs, size);
1042
- const needRead = !metadataCached || context.includeBody && !bodyCached || context.includeCollections && !collectionsCached;
1043
- if (!needRead) {
1044
- return {
1045
- mtimeMs,
1046
- ctimeMs,
1047
- size,
1048
- itemFormat,
1049
- lightMetadata: cachedEntry.metadata,
1050
- heavyMetadata: context.includeCollections && cachedCollections ? cachedCollections.collections : void 0,
1051
- bodyLength: cachedEntry.body_length,
1052
- body: context.includeBody ? cachedBody.body : void 0
1053
- };
1054
- }
1055
- const raw = await fs3.readFile(filePath, "utf8");
1056
- const parsed = parseItemDocument(raw, {
1057
- format: itemFormat,
1058
- schema: context.schema,
1059
- extensionFieldNames: context.extensionFieldNames,
1060
- onWarning: (warning) => appendWarning(context.warnings, warning)
1061
- });
1062
- const split = splitHeavyMetadata(parsed.metadata);
1063
- markDocumentCacheMisses(context.state.misses, context.includeBody, context.includeCollections, metadataCached, bodyCached, collectionsCached);
1064
- return {
1065
- mtimeMs,
1066
- ctimeMs,
1067
- size,
1068
- itemFormat,
1069
- lightMetadata: metadataCached ? cachedEntry.metadata : split.light,
1070
- heavyMetadata: context.includeCollections ? collectionsCached ? cachedCollections.collections : split.heavy : void 0,
1071
- bodyLength: metadataCached ? cachedEntry.body_length : parsed.body.length,
1072
- body: context.includeBody ? parsed.body : void 0
1073
- };
1074
- }
1075
- function recordCachedDocumentCandidate(filePath, relativePath, context, parts) {
1076
- context.state.newEntries[relativePath] = {
1077
- mtime_ms: parts.mtimeMs,
1078
- ctime_ms: parts.ctimeMs,
1079
- size: parts.size,
1080
- metadata: parts.lightMetadata,
1081
- body_length: parts.bodyLength
1082
- };
1083
- if (context.includeBody && parts.body !== void 0) {
1084
- context.state.newBodies[relativePath] = {
1085
- mtime_ms: parts.mtimeMs,
1086
- ctime_ms: parts.ctimeMs,
1087
- size: parts.size,
1088
- body: parts.body
1089
- };
1090
- }
1091
- if (context.includeCollections && parts.heavyMetadata !== void 0) {
1092
- context.state.newCollections[relativePath] = {
1093
- mtime_ms: parts.mtimeMs,
1094
- ctime_ms: parts.ctimeMs,
1095
- size: parts.size,
1096
- collections: parts.heavyMetadata
1097
- };
1098
- }
1099
- const metadata = context.includeCollections ? mergeHeavyMetadata(parts.lightMetadata, parts.heavyMetadata) : parts.lightMetadata;
1100
- const existing = context.state.documentsById.get(metadata.id);
1101
- const candidate = {
1102
- metadata,
1103
- body: parts.body,
1104
- item_format: parts.itemFormat,
1105
- item_path: filePath
1106
- };
1107
- if (!existing || shouldReplaceCachedDocumentCandidate(existing.itemFormat, parts.itemFormat, context.preferredFormat)) {
1108
- context.state.documentsById.set(metadata.id, { candidate, itemFormat: parts.itemFormat });
1109
- }
1110
- }
1111
- async function processCachedDocumentFile(folder, filePath, relativePath, context) {
1112
- try {
1113
- const parts = await readCachedDocumentParts(filePath, relativePath, context);
1114
- recordCachedDocumentCandidate(filePath, relativePath, context, parts);
1115
- } catch {
1116
- appendWarning(context.warnings, `item_list_item_read_failed:${folder}/${path3.basename(filePath)}`);
1117
- }
1118
- }
1119
- function selectPreviousMetadataEntries(existingCache, contextFingerprint) {
1120
- return existingCache && existingCache.context_fingerprint === contextFingerprint ? existingCache.entries : {};
1121
- }
1122
- function selectPreviousBodyEntries(existingBodyCache, contextFingerprint) {
1123
- return existingBodyCache && existingBodyCache.context_fingerprint === contextFingerprint ? existingBodyCache.bodies : {};
1124
- }
1125
- function selectPreviousCollectionEntries(existingCollectionsCache, contextFingerprint) {
1126
- return existingCollectionsCache && existingCollectionsCache.context_fingerprint === contextFingerprint ? existingCollectionsCache.collections : {};
1127
- }
1128
- function createDocumentCacheMutableState() {
1129
- return {
1130
- newEntries: {},
1131
- newBodies: {},
1132
- newCollections: {},
1133
- documentsById: /* @__PURE__ */ new Map(),
1134
- misses: {
1135
- metadata: false,
1136
- body: false,
1137
- collections: false
1138
- }
1139
- };
1140
- }
1141
- function collectCachedDocumentParseTasks(dirResults, context) {
1142
- const parseTasks = [];
1143
- for (const { folder, dirPath, files } of dirResults) {
1144
- for (const file of files) {
1145
- if (!isItemDocumentFile(file)) {
1146
- continue;
1147
- }
1148
- const filePath = path3.join(dirPath, file);
1149
- const relativePath = path3.relative(context.pmRoot, filePath);
1150
- parseTasks.push(processCachedDocumentFile(folder, filePath, relativePath, context));
1151
- }
1152
- }
1153
- return parseTasks;
1154
- }
1155
- async function persistMetadataCacheIfNeeded(params) {
1156
- const metadataDirty = params.state.misses.metadata || Object.keys(params.previousEntries).length !== Object.keys(params.state.newEntries).length;
1157
- if (!metadataDirty && params.existingCache !== null && params.existingCache.context_fingerprint === params.contextFingerprint) {
1158
- return;
1159
- }
1160
- await persistCache(getCachePath(params.pmRoot), {
1161
- version: CACHE_VERSION,
1162
- context_fingerprint: params.contextFingerprint,
1163
- entries: params.state.newEntries
1164
- }).catch(() => {
1165
- });
1166
- }
1167
- async function persistBodyCacheIfNeeded(params) {
1168
- const bodyDirty = params.state.misses.body || Object.keys(params.previousBodies).length !== Object.keys(params.state.newBodies).length;
1169
- if (!bodyDirty && params.existingBodyCache !== null && params.existingBodyCache.context_fingerprint === params.contextFingerprint) {
1170
- return;
1171
- }
1172
- await persistCache(getBodyCachePath(params.pmRoot), {
1173
- version: CACHE_VERSION,
1174
- context_fingerprint: params.contextFingerprint,
1175
- bodies: params.state.newBodies
1176
- }).catch(() => {
1177
- });
1178
- }
1179
- async function persistCollectionsCacheIfNeeded(params) {
1180
- const collectionsDirty = params.state.misses.collections || Object.keys(params.previousCollections).length !== Object.keys(params.state.newCollections).length;
1181
- if (!collectionsDirty && params.existingCollectionsCache !== null && params.existingCollectionsCache.context_fingerprint === params.contextFingerprint) {
1182
- return;
1183
- }
1184
- await persistCache(getCollectionsCachePath(params.pmRoot), {
1185
- version: CACHE_VERSION,
1186
- context_fingerprint: params.contextFingerprint,
1187
- collections: params.state.newCollections
1188
- }).catch(() => {
1189
- });
1190
- }
1191
- function sortedCachedDocumentCandidates(state) {
1192
- return [...state.documentsById.values()].sort((left, right) => left.candidate.metadata.id.localeCompare(right.candidate.metadata.id)).map((entry) => entry.candidate);
1193
- }
1194
- async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, options = {}) {
1195
- const includeBody = options.includeBody !== false;
1196
- const includeCollections = options.includeCollections !== false;
1197
- const extensionFieldNames = resolveActiveExtensionFieldNames();
1198
- const contextFingerprint = computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames);
1199
- const existingCache = await loadCache(pmRoot);
1200
- const previousEntries = selectPreviousMetadataEntries(existingCache, contextFingerprint);
1201
- const existingBodyCache = includeBody ? await loadBodyCache(pmRoot) : null;
1202
- const previousBodies = selectPreviousBodyEntries(existingBodyCache, contextFingerprint);
1203
- const existingCollectionsCache = includeCollections ? await loadCollectionsCache(pmRoot) : null;
1204
- const previousCollections = selectPreviousCollectionEntries(existingCollectionsCache, contextFingerprint);
1205
- const entries = Object.entries(typeToFolder);
1206
- const dirResults = await Promise.all(entries.map(([, folder]) => readItemDirectoryFiles(pmRoot, folder, warnings)));
1207
- const dispatchReadHooks = hasActiveOnReadHooks();
1208
- const state = createDocumentCacheMutableState();
1209
- const context = {
1210
- pmRoot,
1211
- preferredFormat,
1212
- warnings,
1213
- schema,
1214
- extensionFieldNames,
1215
- includeBody,
1216
- includeCollections,
1217
- dispatchReadHooks,
1218
- previousEntries,
1219
- previousBodies,
1220
- previousCollections,
1221
- state
1222
- };
1223
- await Promise.all(collectCachedDocumentParseTasks(dirResults, context));
1224
- await persistMetadataCacheIfNeeded({ pmRoot, contextFingerprint, existingCache, previousEntries, state });
1225
- if (includeBody) {
1226
- await persistBodyCacheIfNeeded({ pmRoot, contextFingerprint, existingBodyCache, previousBodies, state });
1227
- }
1228
- if (includeCollections) {
1229
- await persistCollectionsCacheIfNeeded({ pmRoot, contextFingerprint, existingCollectionsCache, previousCollections, state });
1230
- }
1231
- return sortedCachedDocumentCandidates(state);
1232
- }
1233
- async function listAllDocumentsCached(pmRoot, preferredFormat, typeToFolder, warnings, schema) {
1234
- const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, {
1235
- includeBody: false
1236
- });
1237
- return candidates.map((candidate) => ({
1238
- metadata: candidate.metadata,
1239
- body: candidate.body ?? ""
1240
- }));
1241
- }
1242
- async function listAllDocumentsCachedLight(pmRoot, preferredFormat, typeToFolder, warnings, schema) {
1243
- const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, {
1244
- includeBody: false,
1245
- includeCollections: false
1246
- });
1247
- return candidates.map((candidate) => ({
1248
- metadata: candidate.metadata,
1249
- body: candidate.body ?? ""
1250
- }));
1251
- }
1252
-
1253
- // dist/core/store/item-store.js
1254
- import fs4 from "node:fs/promises";
1255
- import path4 from "node:path";
1256
- async function fileExists(targetPath) {
1257
- try {
1258
- await fs4.access(targetPath);
1259
- return true;
1260
- } catch {
1261
- return false;
1262
- }
1263
- }
1264
- function appendWarning2(warnings, warning) {
1265
- if (!warnings) {
1266
- return;
1267
- }
1268
- if (!warnings.includes(warning)) {
1269
- warnings.push(warning);
1270
- }
1271
- }
1272
- function resolveActiveExtensionFieldNames2(explicit) {
1273
- return explicit ?? collectRegisteredItemFieldNames(getActiveExtensionRegistrations());
1274
- }
1275
- function resolveItemFormatSearchOrder(preferredFormat) {
1276
- if (preferredFormat === "toon") {
1277
- return ["toon", "json_markdown"];
1278
- }
1279
- if (preferredFormat === "json_markdown") {
1280
- return ["json_markdown", "toon"];
1281
- }
1282
- return ["toon", "json_markdown"];
1283
- }
1284
- async function locateItem(pmRoot, rawId, idPrefix = "pm-", preferredFormat, typeToFolder = TYPE_TO_FOLDER) {
1285
- const normalizedId = normalizeItemId(rawId, idPrefix);
1286
- const rawNormalizedId = normalizeRawItemId(rawId);
1287
- const candidateIds = normalizedId === rawNormalizedId ? [normalizedId] : [normalizedId, rawNormalizedId];
1288
- const entries = Object.entries(typeToFolder);
1289
- const searchOrder = resolveItemFormatSearchOrder(preferredFormat);
1290
- for (const candidateId of candidateIds) {
1291
- for (const [type] of entries) {
1292
- for (const itemFormat of searchOrder) {
1293
- const itemPath = getItemPath(pmRoot, type, candidateId, itemFormat, typeToFolder);
1294
- if (await fileExists(itemPath)) {
1295
- return {
1296
- id: candidateId,
1297
- type,
1298
- itemPath,
1299
- item_format: itemFormat
1300
- };
1301
- }
1302
- }
1303
- }
1304
- }
1305
- return null;
1306
- }
1307
- async function readLocatedItem(item, options = {}) {
1308
- const raw = await fs4.readFile(item.itemPath, "utf8");
1309
- await runActiveOnReadHooks({
1310
- path: item.itemPath,
1311
- scope: "project"
1312
- });
1313
- const document = parseItemDocument(raw, {
1314
- format: item.item_format,
1315
- schema: options.schema,
1316
- extensionFieldNames: resolveActiveExtensionFieldNames2(options.extensionFieldNames),
1317
- onWarning: (warning) => appendWarning2(options.warnings, warning)
1318
- });
1319
- return { raw, document };
1320
- }
1321
- async function listAllFrontMatter(pmRoot, preferredFormat, typeToFolder = TYPE_TO_FOLDER, warnings, schema) {
1322
- const documents = await listAllDocumentsCached(pmRoot, preferredFormat, typeToFolder, warnings, schema);
1323
- return documents.map((document) => document.metadata);
1324
- }
1325
- async function listAllFrontMatterLight(pmRoot, preferredFormat, typeToFolder = TYPE_TO_FOLDER, warnings, schema) {
1326
- const documents = await listAllDocumentsCachedLight(pmRoot, preferredFormat, typeToFolder, warnings, schema);
1327
- return documents.map((document) => document.metadata);
1328
- }
1329
- async function listAllFrontMatterWithBody(pmRoot, preferredFormat, typeToFolder = TYPE_TO_FOLDER, warnings, schema) {
1330
- const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, { includeBody: true });
1331
- return candidates.map((candidate) => ({
1332
- ...candidate.metadata,
1333
- // includeBody:true guarantees candidate bodies are materialized.
1334
- body: candidate.body
1335
- }));
1336
- }
1337
- async function listKnownItemIds(pmRoot, typeToFolder) {
1338
- const folders = new Set(Object.values(typeToFolder));
1339
- const allIds = [];
1340
- await Promise.all([...folders].map(async (folder) => {
1341
- try {
1342
- const entries = await fs4.readdir(path4.join(pmRoot, folder));
1343
- for (const entry of entries) {
1344
- for (const ext of ITEM_FILE_EXTENSIONS) {
1345
- if (entry.toLowerCase().endsWith(ext)) {
1346
- allIds.push(entry.slice(0, -ext.length));
1347
- break;
1348
- }
1349
- }
1350
- }
1351
- } catch {
1352
- }
1353
- }));
1354
- return allIds;
1355
- }
1356
- async function buildDidYouMeanSuggestions(pmRoot, badId, idPrefix, typeToFolder) {
1357
- const normalized = normalizeItemId(badId, idPrefix);
1358
- const ids = await listKnownItemIds(pmRoot, typeToFolder);
1359
- if (ids.length === 0)
1360
- return [];
1361
- const limit = Math.max(3, Math.floor(normalized.length / 2));
1362
- const scored = ids.map((id) => ({ id, distance: levenshteinDistanceWithinLimit(id, normalized, limit) })).filter((entry) => entry.distance !== null).sort((left, right) => left.distance - right.distance).slice(0, 3).map((entry) => entry.id);
1363
- return scored;
1364
- }
1365
- async function buildItemNotFoundError(pmRoot, badId, idPrefix, typeToFolder) {
1366
- const suggestions = await buildDidYouMeanSuggestions(pmRoot, badId, idPrefix, typeToFolder);
1367
- const nextSteps = ["Confirm the active --path/PM_PATH scope, then retry with a valid id."];
1368
- if (suggestions.length > 0) {
1369
- nextSteps.unshift(`Did you mean one of: ${suggestions.join(", ")}?`);
1370
- }
1371
- return new PmCliError(`Item ${badId} not found`, EXIT_CODE.NOT_FOUND, { nextSteps });
1372
- }
1373
- function bypassesAssigneeConflict(op, bypassAssigneeConflict) {
1374
- return op === "claim" || bypassAssigneeConflict === true && (op === "comment_add" || op === "comment_edit" || op === "comment_delete" || op === "note_add" || op === "learning_add" || op === "release" || op === "update" || op === "update_audit");
1375
- }
1376
- async function prepareLockedItem(params) {
1377
- const typeToFolder = params.typeToFolder ?? resolveItemTypeRegistry(params.settings, getActiveExtensionRegistrations()).type_to_folder;
1378
- const located = await locateItem(params.pmRoot, params.id, params.settings.id_prefix, params.settings.item_format, typeToFolder);
1379
- if (!located) {
1380
- throw await buildItemNotFoundError(params.pmRoot, params.id, params.settings.id_prefix, typeToFolder);
1381
- }
1382
- const releaseLock = await acquireLock(params.pmRoot, located.id, params.settings.locks.ttl_seconds, params.author, Boolean(params.force), params.settings.governance.force_required_for_stale_lock, params.settings.locks.wait_ms);
1383
- try {
1384
- const warnings = [];
1385
- const { raw: originalRaw, document } = await readLocatedItem(located, {
1386
- schema: params.settings.schema,
1387
- extensionFieldNames: params.extensionFieldNames,
1388
- warnings
1389
- });
1390
- const assigned = document.metadata.assignee?.trim();
1391
- const governance = resolveGovernanceKnobs(params.settings);
1392
- const hasOwnershipConflict = assigned && assigned !== params.author && !params.force && !bypassesAssigneeConflict(params.op, params.bypassAssigneeConflict);
1393
- if (hasOwnershipConflict) {
1394
- if (governance.ownership_enforcement === "strict") {
1395
- throw new PmCliError(`Item ${located.id} is assigned to ${assigned}. Use --force to override.`, EXIT_CODE.CONFLICT);
1396
- }
1397
- if (governance.ownership_enforcement === "warn") {
1398
- warnings.push(`ownership_warning:assignee_conflict:${located.id}:${assigned}`);
1399
- }
1400
- }
1401
- return {
1402
- typeToFolder,
1403
- located,
1404
- originalRaw,
1405
- document,
1406
- warnings,
1407
- releaseLock
1408
- };
1409
- } catch (error) {
1410
- await releaseLock();
1411
- throw error;
1412
- }
1413
- }
1414
- function resolveItemStoreWriteOverride(serviceWriteOverride, targetItemPath, serializedAfter) {
1415
- if (!serviceWriteOverride.handled || typeof serviceWriteOverride.result !== "object" || serviceWriteOverride.result === null) {
1416
- return { effectiveTargetItemPath: targetItemPath, effectiveSerializedAfter: serializedAfter, skipItemWrite: false };
1417
- }
1418
- const overrideRecord = serviceWriteOverride.result;
1419
- return {
1420
- effectiveTargetItemPath: typeof overrideRecord.target_item_path === "string" && overrideRecord.target_item_path.trim().length > 0 ? overrideRecord.target_item_path : targetItemPath,
1421
- effectiveSerializedAfter: typeof overrideRecord.contents === "string" ? overrideRecord.contents : serializedAfter,
1422
- skipItemWrite: overrideRecord.skip_write === true
1423
- };
1424
- }
1425
- async function rollbackMutatedItemWrite(params) {
1426
- if (params.skipItemWrite) {
1427
- return;
1428
- }
1429
- if (params.effectiveTargetItemPath !== params.originalItemPath) {
1430
- await writeFileAtomic(params.originalItemPath, params.originalRaw);
1431
- await fs4.rm(params.effectiveTargetItemPath, { force: true });
1432
- return;
1433
- }
1434
- await writeFileAtomic(params.originalItemPath, params.originalRaw);
1435
- }
1436
- async function mutateItem(params) {
1437
- const prepared = await prepareLockedItem({
1438
- pmRoot: params.pmRoot,
1439
- settings: params.settings,
1440
- id: params.id,
1441
- op: params.op,
1442
- author: params.author,
1443
- force: params.force,
1444
- bypassAssigneeConflict: params.bypassAssigneeConflict,
1445
- extensionFieldNames: params.extensionFieldNames,
1446
- typeToFolder: params.typeToFolder
1447
- });
1448
- const { typeToFolder, located, originalRaw, document, warnings: parseWarnings, releaseLock } = prepared;
1449
- try {
1450
- const beforeDocument = canonicalDocument(document, {
1451
- schema: params.settings.schema,
1452
- extensionFieldNames: params.extensionFieldNames
1453
- });
1454
- const mutableDocument = canonicalDocument(structuredClone(document), {
1455
- schema: params.settings.schema,
1456
- extensionFieldNames: params.extensionFieldNames
1457
- });
1458
- const mutation = params.mutate(mutableDocument);
1459
- if (params.skipNoop === true && mutation.changedFields.length === 0) {
1460
- return {
1461
- item: beforeDocument.metadata,
1462
- body: beforeDocument.body,
1463
- changedFields: [],
1464
- warnings: [...parseWarnings, ...mutation.warnings ?? []]
1465
- };
1466
- }
1467
- const historyPolicy = await enforceHistoryStreamPolicyForItem({
1468
- pmRoot: params.pmRoot,
1469
- settings: params.settings,
1470
- itemId: located.id,
1471
- commandLabel: params.op
1472
- });
1473
- mutableDocument.metadata.updated_at = nowIso();
1474
- const afterDocument = canonicalDocument(mutableDocument, {
1475
- schema: params.settings.schema,
1476
- extensionFieldNames: params.extensionFieldNames
1477
- });
1478
- const targetItemFormat = "toon";
1479
- const serializedAfter = serializeItemDocument(afterDocument, {
1480
- format: targetItemFormat,
1481
- schema: params.settings.schema,
1482
- extensionFieldNames: params.extensionFieldNames
1483
- });
1484
- const targetItemPath = getItemPath(params.pmRoot, afterDocument.metadata.type, located.id, targetItemFormat, typeToFolder);
1485
- const historyPath = getHistoryPath(params.pmRoot, located.id);
1486
- const serviceWriteOverride = await runActiveServiceOverride("item_store_write", {
1487
- op: params.op,
1488
- pm_root: params.pmRoot,
1489
- item_id: located.id,
1490
- source_item_path: located.itemPath,
1491
- target_item_path: targetItemPath,
1492
- history_path: historyPath,
1493
- item_format: targetItemFormat,
1494
- before: beforeDocument,
1495
- after: afterDocument,
1496
- contents: serializedAfter
1497
- });
1498
- const { effectiveTargetItemPath, effectiveSerializedAfter, skipItemWrite } = resolveItemStoreWriteOverride(serviceWriteOverride, targetItemPath, serializedAfter);
1499
- if (!skipItemWrite) {
1500
- await writeFileAtomic(effectiveTargetItemPath, effectiveSerializedAfter);
1501
- }
1502
- if (!skipItemWrite && effectiveTargetItemPath !== located.itemPath) {
1503
- await fs4.rm(located.itemPath);
1504
- }
1505
- const entry = createHistoryEntry({
1506
- nowIso: afterDocument.metadata.updated_at,
1507
- author: params.author,
1508
- op: params.op,
1509
- before: beforeDocument,
1510
- after: afterDocument,
1511
- message: params.message
1512
- });
1513
- try {
1514
- await appendHistoryEntry(historyPath, entry);
1515
- } catch (error) {
1516
- await rollbackMutatedItemWrite({
1517
- skipItemWrite,
1518
- effectiveTargetItemPath,
1519
- originalItemPath: located.itemPath,
1520
- originalRaw
1521
- });
1522
- throw error;
1523
- }
1524
- const hookWarnings = [
1525
- ...await runActiveOnWriteHooks({
1526
- path: effectiveTargetItemPath,
1527
- scope: "project",
1528
- op: params.op,
1529
- item_id: afterDocument.metadata.id,
1530
- item_type: afterDocument.metadata.type,
1531
- before: beforeDocument,
1532
- after: afterDocument,
1533
- changed_fields: mutation.changedFields
1534
- }),
1535
- ...await runActiveOnWriteHooks({
1536
- path: historyPath,
1537
- scope: "project",
1538
- op: `${params.op}:history`,
1539
- item_id: afterDocument.metadata.id,
1540
- item_type: afterDocument.metadata.type,
1541
- before: beforeDocument,
1542
- after: afterDocument,
1543
- changed_fields: mutation.changedFields
1544
- })
1545
- ];
1546
- recordAfterCommandAffectedItem({
1547
- id: afterDocument.metadata.id,
1548
- op: params.op,
1549
- item_type: afterDocument.metadata.type,
1550
- previous_status: beforeDocument.metadata.status,
1551
- status: afterDocument.metadata.status,
1552
- previous: projectAfterCommandItemSnapshot(beforeDocument.metadata, mutation.changedFields),
1553
- current: projectAfterCommandItemSnapshot(afterDocument.metadata, mutation.changedFields),
1554
- changed_fields: mutation.changedFields
1555
- });
1556
- return {
1557
- item: afterDocument.metadata,
1558
- body: afterDocument.body,
1559
- changedFields: mutation.changedFields,
1560
- warnings: [
1561
- ...parseWarnings,
1562
- ...mutation.warnings ?? [],
1563
- ...historyPolicy.warnings,
1564
- ...serviceWriteOverride.warnings,
1565
- ...hookWarnings
1566
- ]
1567
- };
1568
- } finally {
1569
- await releaseLock();
1570
- }
1571
- }
1572
- async function deleteItem(params) {
1573
- const prepared = await prepareLockedItem({
1574
- pmRoot: params.pmRoot,
1575
- settings: params.settings,
1576
- id: params.id,
1577
- op: "delete",
1578
- author: params.author,
1579
- force: params.force
1580
- });
1581
- const { located, originalRaw, document, warnings: parseWarnings, releaseLock } = prepared;
1582
- try {
1583
- const historyPolicy = await enforceHistoryStreamPolicyForItem({
1584
- pmRoot: params.pmRoot,
1585
- settings: params.settings,
1586
- itemId: located.id,
1587
- commandLabel: "delete"
1588
- });
1589
- const beforeDocument = canonicalDocument(document, { schema: params.settings.schema });
1590
- const deletionTimestamp = nowIso();
1591
- const tombstoneDocument = EMPTY_CANONICAL_DOCUMENT;
1592
- const historyEntry = createHistoryEntry({
1593
- nowIso: deletionTimestamp,
1594
- author: params.author,
1595
- op: "delete",
1596
- before: beforeDocument,
1597
- after: tombstoneDocument,
1598
- message: params.message
1599
- });
1600
- const historyPath = getHistoryPath(params.pmRoot, located.id);
1601
- const serviceDeleteOverride = await runActiveServiceOverride("item_store_delete", {
1602
- op: "delete",
1603
- pm_root: params.pmRoot,
1604
- item_id: located.id,
1605
- item_path: located.itemPath,
1606
- history_path: historyPath,
1607
- before: beforeDocument
1608
- });
1609
- let effectiveItemPath = located.itemPath;
1610
- let skipDelete = false;
1611
- if (serviceDeleteOverride.handled && typeof serviceDeleteOverride.result === "object" && serviceDeleteOverride.result !== null) {
1612
- const overrideRecord = serviceDeleteOverride.result;
1613
- if (typeof overrideRecord.item_path === "string" && overrideRecord.item_path.trim().length > 0) {
1614
- effectiveItemPath = overrideRecord.item_path;
1615
- }
1616
- if (overrideRecord.skip_delete === true) {
1617
- skipDelete = true;
1618
- }
1619
- }
1620
- if (params.dryRun === true) {
1621
- return {
1622
- item: beforeDocument.metadata,
1623
- changedFields: ["deleted"],
1624
- targetPath: effectiveItemPath,
1625
- warnings: [...parseWarnings, ...historyPolicy.warnings, ...serviceDeleteOverride.warnings]
1626
- };
1627
- }
1628
- if (!skipDelete) {
1629
- await fs4.rm(effectiveItemPath);
1630
- }
1631
- try {
1632
- await appendHistoryEntry(historyPath, historyEntry);
1633
- } catch (error) {
1634
- if (!skipDelete) {
1635
- await writeFileAtomic(effectiveItemPath, originalRaw);
1636
- }
1637
- throw error;
1638
- }
1639
- const hookWarnings = [
1640
- ...await runActiveOnWriteHooks({
1641
- path: effectiveItemPath,
1642
- scope: "project",
1643
- op: "delete",
1644
- item_id: beforeDocument.metadata.id,
1645
- item_type: beforeDocument.metadata.type,
1646
- before: beforeDocument,
1647
- after: tombstoneDocument,
1648
- changed_fields: ["deleted"]
1649
- }),
1650
- ...await runActiveOnWriteHooks({
1651
- path: historyPath,
1652
- scope: "project",
1653
- op: "delete:history",
1654
- item_id: beforeDocument.metadata.id,
1655
- item_type: beforeDocument.metadata.type,
1656
- before: beforeDocument,
1657
- after: tombstoneDocument,
1658
- changed_fields: ["deleted"]
1659
- })
1660
- ];
1661
- recordAfterCommandAffectedItem({
1662
- id: beforeDocument.metadata.id,
1663
- op: "delete",
1664
- item_type: beforeDocument.metadata.type,
1665
- previous_status: beforeDocument.metadata.status,
1666
- previous: projectAfterCommandItemSnapshot(beforeDocument.metadata, Object.keys(beforeDocument.metadata)),
1667
- changed_fields: ["deleted"]
1668
- });
1669
- return {
1670
- item: beforeDocument.metadata,
1671
- changedFields: ["deleted"],
1672
- warnings: [...parseWarnings, ...historyPolicy.warnings, ...serviceDeleteOverride.warnings, ...hookWarnings]
1673
- };
1674
- } finally {
1675
- await releaseLock();
1676
- }
1677
- }
1678
-
1679
- export {
1680
- collectRegisteredItemFieldNames,
1681
- parseRegisteredItemFieldAssignments,
1682
- applyRegisteredItemFieldDefaultsAndValidation,
1683
- toItemRecord,
1684
- hashDocument,
1685
- hashEmptyDocument,
1686
- createHistoryEntry,
1687
- appendHistoryEntry,
1688
- enforceHistoryStreamPolicyForItem,
1689
- enforceHistoryStreamPolicyForItems,
1690
- acquireLock,
1691
- HEAVY_METADATA_KEYS,
1692
- listAllDocumentCandidatesCached,
1693
- locateItem,
1694
- readLocatedItem,
1695
- listAllFrontMatter,
1696
- listAllFrontMatterLight,
1697
- listAllFrontMatterWithBody,
1698
- buildItemNotFoundError,
1699
- mutateItem,
1700
- deleteItem
1701
- };
1702
- //# sourceMappingURL=chunk-ENGQOEUY.js.map
1703
-
1704
- //# debugId=c9a5ce7b-7b83-549d-bddc-c6f8ce8564b8