@unbrained/pm-cli 2026.7.4 → 2026.7.5

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 (601) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -5
  3. package/dist/cli/commands/calendar.d.ts +3 -2
  4. package/dist/cli/commands/calendar.js +4 -4
  5. package/dist/cli/commands/calendar.js.map +1 -1
  6. package/dist/cli/commands/claim.js +17 -3
  7. package/dist/cli/commands/claim.js.map +1 -1
  8. package/dist/cli/commands/close.js +34 -16
  9. package/dist/cli/commands/close.js.map +1 -1
  10. package/dist/cli/commands/copy.js +3 -3
  11. package/dist/cli/commands/copy.js.map +1 -1
  12. package/dist/cli/commands/create.d.ts +7 -0
  13. package/dist/cli/commands/create.js +156 -110
  14. package/dist/cli/commands/create.js.map +1 -1
  15. package/dist/cli/commands/extension/bundled-catalog.d.ts +6 -0
  16. package/dist/cli/commands/extension/bundled-catalog.js +15 -2
  17. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  18. package/dist/cli/commands/extension/describe.d.ts +6 -3
  19. package/dist/cli/commands/extension/describe.js +21 -9
  20. package/dist/cli/commands/extension/describe.js.map +1 -1
  21. package/dist/cli/commands/extension/doctor.d.ts +0 -4
  22. package/dist/cli/commands/extension/doctor.js +3 -3
  23. package/dist/cli/commands/extension/doctor.js.map +1 -1
  24. package/dist/cli/commands/extension/scaffold.js +7 -2
  25. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  26. package/dist/cli/commands/extension/shared.d.ts +2 -7
  27. package/dist/cli/commands/extension/shared.js +4 -10
  28. package/dist/cli/commands/extension/shared.js.map +1 -1
  29. package/dist/cli/commands/extension.js +33 -8
  30. package/dist/cli/commands/extension.js.map +1 -1
  31. package/dist/cli/commands/profile.js +3 -3
  32. package/dist/cli/commands/profile.js.map +1 -1
  33. package/dist/cli/commands/reindex.js +3 -3
  34. package/dist/cli/commands/reindex.js.map +1 -1
  35. package/dist/cli/commands/restore.js +3 -3
  36. package/dist/cli/commands/restore.js.map +1 -1
  37. package/dist/cli/commands/schema.js +10 -10
  38. package/dist/cli/commands/schema.js.map +1 -1
  39. package/dist/cli/commands/update.js +5 -3
  40. package/dist/cli/commands/update.js.map +1 -1
  41. package/dist/cli/error-guidance.js +107 -7
  42. package/dist/cli/error-guidance.js.map +1 -1
  43. package/dist/cli/main.d.ts +6 -2
  44. package/dist/cli/main.js +33 -12
  45. package/dist/cli/main.js.map +1 -1
  46. package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +18 -0
  47. package/dist/cli-bundle/chunks/{activity-OENQCYZD.js → activity-YKAKZTZ4.js} +11 -9
  48. package/dist/cli-bundle/chunks/{aggregate-EC4LWS3U.js → aggregate-EQX2RGB7.js} +16 -13
  49. package/dist/cli-bundle/chunks/{aggregate-EC4LWS3U.js.map → aggregate-EQX2RGB7.js.map} +1 -1
  50. package/dist/cli-bundle/chunks/{aggregate-RCB3QJJE.js → aggregate-PEGZGJXD.js} +18 -15
  51. package/dist/cli-bundle/chunks/{aggregate-RCB3QJJE.js.map → aggregate-PEGZGJXD.js.map} +1 -1
  52. package/dist/cli-bundle/chunks/{append-XLEKVVWB.js → append-CZGUZ45Q.js} +11 -8
  53. package/dist/cli-bundle/chunks/{append-XLEKVVWB.js.map → append-CZGUZ45Q.js.map} +1 -1
  54. package/dist/cli-bundle/chunks/{append-ADBOI3A6.js → append-NSQBCXZJ.js} +13 -10
  55. package/dist/cli-bundle/chunks/{append-ADBOI3A6.js.map → append-NSQBCXZJ.js.map} +1 -1
  56. package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +1413 -0
  57. package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js.map +1 -0
  58. package/dist/cli-bundle/chunks/{chunk-2LRMWMZ6.js → chunk-3PL6LEKP.js} +16 -14
  59. package/dist/cli-bundle/chunks/{chunk-2LRMWMZ6.js.map → chunk-3PL6LEKP.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-CN4OAA2G.js → chunk-3U3VEWK6.js} +277 -119
  61. package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +7 -0
  62. package/dist/cli-bundle/chunks/{chunk-EB4BBEZD.js → chunk-3Y4OESPP.js} +14 -12
  63. package/dist/cli-bundle/chunks/{chunk-EB4BBEZD.js.map → chunk-3Y4OESPP.js.map} +1 -1
  64. package/dist/cli-bundle/chunks/{chunk-NHDR3UCW.js → chunk-4LRVSBO6.js} +14 -12
  65. package/dist/cli-bundle/chunks/{chunk-NHDR3UCW.js.map → chunk-4LRVSBO6.js.map} +1 -1
  66. package/dist/cli-bundle/chunks/{chunk-6YB7HG2J.js → chunk-4OFLJHX6.js} +7 -5
  67. package/dist/cli-bundle/chunks/{chunk-6YB7HG2J.js.map → chunk-4OFLJHX6.js.map} +1 -1
  68. package/dist/cli-bundle/chunks/{chunk-SBNT6SLO.js → chunk-4QQ6PM7M.js} +45 -557
  69. package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js.map +7 -0
  70. package/dist/cli-bundle/chunks/{chunk-M34MVAOP.js → chunk-53BTLLAF.js} +16 -200
  71. package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +1 -0
  72. package/dist/cli-bundle/chunks/{chunk-UYLA5ROU.js → chunk-57C2RLW5.js} +277 -112
  73. package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +1 -0
  74. package/dist/cli-bundle/chunks/{chunk-R7EMP4JG.js → chunk-5B3X4Y22.js} +52 -63
  75. package/dist/cli-bundle/chunks/{chunk-R7EMP4JG.js.map → chunk-5B3X4Y22.js.map} +3 -3
  76. package/dist/cli-bundle/chunks/{chunk-XBIYI23P.js → chunk-5J2XPTAD.js} +10 -8
  77. package/dist/cli-bundle/chunks/{chunk-XBIYI23P.js.map → chunk-5J2XPTAD.js.map} +1 -1
  78. package/dist/cli-bundle/chunks/{chunk-4SHME4VR.js → chunk-5JE6SMYS.js} +2 -2
  79. package/dist/cli-bundle/chunks/{chunk-4KPQQ42D.js → chunk-5JZ7APJU.js} +18 -16
  80. package/dist/cli-bundle/chunks/{chunk-4KPQQ42D.js.map → chunk-5JZ7APJU.js.map} +1 -1
  81. package/dist/cli-bundle/chunks/{chunk-BDDYM4LH.js → chunk-5VVUKE3U.js} +424 -2228
  82. package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +7 -0
  83. package/dist/cli-bundle/chunks/{chunk-QFXFKYNQ.js → chunk-75U6M5ZD.js} +16 -14
  84. package/dist/cli-bundle/chunks/{chunk-QFXFKYNQ.js.map → chunk-75U6M5ZD.js.map} +1 -1
  85. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +23 -0
  86. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +7 -0
  87. package/dist/cli-bundle/chunks/{chunk-A222YWOQ.js → chunk-7EQNAZX2.js} +14 -12
  88. package/dist/cli-bundle/chunks/{chunk-A222YWOQ.js.map → chunk-7EQNAZX2.js.map} +1 -1
  89. package/dist/cli-bundle/chunks/{chunk-Z4DGFQDH.js → chunk-7LQKVMPA.js} +14 -4
  90. package/dist/cli-bundle/chunks/chunk-7LQKVMPA.js.map +1 -0
  91. package/dist/cli-bundle/chunks/{chunk-EH23N5FX.js → chunk-7MDXZAZS.js} +29 -7
  92. package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js.map +1 -0
  93. package/dist/cli-bundle/chunks/{chunk-XQCWTSLO.js → chunk-7QH7DHUB.js} +74 -8
  94. package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +1 -0
  95. package/dist/cli-bundle/chunks/{chunk-3C5T3ZEO.js → chunk-7WYXBPYQ.js} +7 -5
  96. package/dist/cli-bundle/chunks/{chunk-3C5T3ZEO.js.map → chunk-7WYXBPYQ.js.map} +1 -1
  97. package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +150 -0
  98. package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js.map +1 -0
  99. package/dist/cli-bundle/chunks/{chunk-CQISNF3Z.js → chunk-ABRA3BHY.js} +18 -16
  100. package/dist/cli-bundle/chunks/{chunk-CQISNF3Z.js.map → chunk-ABRA3BHY.js.map} +2 -2
  101. package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js +47 -0
  102. package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js.map +7 -0
  103. package/dist/cli-bundle/chunks/{chunk-Y2VSCQ77.js → chunk-BFVHCAOO.js} +9 -7
  104. package/dist/cli-bundle/chunks/{chunk-Y2VSCQ77.js.map → chunk-BFVHCAOO.js.map} +1 -1
  105. package/dist/cli-bundle/chunks/{chunk-7ITQSEBL.js → chunk-BVEUCSH2.js} +6 -4
  106. package/dist/cli-bundle/chunks/{chunk-7ITQSEBL.js.map → chunk-BVEUCSH2.js.map} +1 -1
  107. package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +160 -0
  108. package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js.map +7 -0
  109. package/dist/cli-bundle/chunks/{chunk-HL742IBM.js → chunk-D3UCE7RW.js} +7 -5
  110. package/dist/cli-bundle/chunks/{chunk-HL742IBM.js.map → chunk-D3UCE7RW.js.map} +1 -1
  111. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +275 -0
  112. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +7 -0
  113. package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +634 -0
  114. package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-MZG6I2Q2.js → chunk-DRBV5UC2.js} +8 -23
  116. package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +7 -0
  117. package/dist/cli-bundle/chunks/{chunk-DEIDJQZK.js → chunk-E2FUG6GD.js} +15 -220
  118. package/dist/cli-bundle/chunks/{chunk-DEIDJQZK.js.map → chunk-E2FUG6GD.js.map} +3 -3
  119. package/dist/cli-bundle/chunks/{chunk-3MLQZI3H.js → chunk-EEY54JMF.js} +5 -3
  120. package/dist/cli-bundle/chunks/{chunk-3MLQZI3H.js.map → chunk-EEY54JMF.js.map} +1 -1
  121. package/dist/cli-bundle/chunks/{chunk-CQFZRLXQ.js → chunk-EZFKWSC7.js} +94 -16
  122. package/dist/cli-bundle/chunks/{chunk-CQFZRLXQ.js.map → chunk-EZFKWSC7.js.map} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-4PJYRA3V.js → chunk-FDBARR33.js} +17 -15
  124. package/dist/cli-bundle/chunks/{chunk-4PJYRA3V.js.map → chunk-FDBARR33.js.map} +2 -2
  125. package/dist/cli-bundle/chunks/{chunk-NGDK3KEZ.js → chunk-FGQKEDE4.js} +36 -12
  126. package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js.map +7 -0
  127. package/dist/cli-bundle/chunks/{chunk-FMWQRMHS.js → chunk-FJRKQREY.js} +10 -18
  128. package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-6QY2NA2M.js → chunk-FUM6UMY4.js} +10 -11
  130. package/dist/cli-bundle/chunks/{chunk-6QY2NA2M.js.map → chunk-FUM6UMY4.js.map} +1 -1
  131. package/dist/cli-bundle/chunks/{chunk-UGDONITK.js → chunk-GIWXVMZ3.js} +140 -334
  132. package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +7 -0
  133. package/dist/cli-bundle/chunks/{chunk-OTSP6UEX.js → chunk-HBYZDSK5.js} +19 -17
  134. package/dist/cli-bundle/chunks/{chunk-OTSP6UEX.js.map → chunk-HBYZDSK5.js.map} +1 -1
  135. package/dist/cli-bundle/chunks/{chunk-D2LDM35X.js → chunk-HJE4JTKQ.js} +6 -4
  136. package/dist/cli-bundle/chunks/{chunk-D2LDM35X.js.map → chunk-HJE4JTKQ.js.map} +1 -1
  137. package/dist/cli-bundle/chunks/{chunk-AOP2EMK3.js → chunk-HK72NWAD.js} +89 -18
  138. package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +1 -0
  139. package/dist/cli-bundle/chunks/{chunk-2ONH3WG6.js → chunk-IJ6CO3JV.js} +18 -16
  140. package/dist/cli-bundle/chunks/{chunk-2ONH3WG6.js.map → chunk-IJ6CO3JV.js.map} +1 -1
  141. package/dist/cli-bundle/chunks/{chunk-J4KNRDI3.js → chunk-JFCVQXZX.js} +139 -326
  142. package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +1 -0
  143. package/dist/cli-bundle/chunks/{chunk-V655JQ5J.js → chunk-JLA7EVYV.js} +12 -10
  144. package/dist/cli-bundle/chunks/{chunk-V655JQ5J.js.map → chunk-JLA7EVYV.js.map} +1 -1
  145. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +76 -0
  146. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +1 -0
  147. package/dist/cli-bundle/chunks/{chunk-WBWRQS32.js → chunk-K3AGVXSF.js} +37 -13
  148. package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js.map +1 -0
  149. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +79 -0
  150. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +7 -0
  151. package/dist/cli-bundle/chunks/chunk-KGHH652T.js +44 -0
  152. package/dist/cli-bundle/chunks/chunk-KGHH652T.js.map +1 -0
  153. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +915 -0
  154. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +1 -0
  155. package/dist/cli-bundle/chunks/{chunk-JZJJEJBR.js → chunk-KLG4ZULO.js} +12 -10
  156. package/dist/cli-bundle/chunks/{chunk-JZJJEJBR.js.map → chunk-KLG4ZULO.js.map} +1 -1
  157. package/dist/cli-bundle/chunks/{chunk-KKHIQOTN.js → chunk-LEKT4K7I.js} +74 -8
  158. package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +7 -0
  159. package/dist/cli-bundle/chunks/{contracts-CVBINC7C.js → chunk-MNZ7DRNC.js} +13 -10
  160. package/dist/cli-bundle/chunks/{contracts-CVBINC7C.js.map → chunk-MNZ7DRNC.js.map} +1 -1
  161. package/dist/cli-bundle/chunks/{chunk-2VK677OA.js → chunk-MTTXDAK4.js} +176 -125
  162. package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +7 -0
  163. package/dist/cli-bundle/chunks/{chunk-Q2266G4S.js → chunk-MZ7VNEVY.js} +8 -6
  164. package/dist/cli-bundle/chunks/{chunk-Q2266G4S.js.map → chunk-MZ7VNEVY.js.map} +1 -1
  165. package/dist/cli-bundle/chunks/{chunk-4EVY7CQN.js → chunk-N6DNM2FA.js} +2 -2
  166. package/dist/cli-bundle/chunks/{test-runs-5SLLV3XU.js → chunk-N7X4WP6L.js} +11 -8
  167. package/dist/cli-bundle/chunks/{test-runs-5SLLV3XU.js.map → chunk-N7X4WP6L.js.map} +1 -1
  168. package/dist/cli-bundle/chunks/{chunk-AZMPKLIA.js → chunk-NBFCNJ7Q.js} +177 -126
  169. package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-YZR7UMZ6.js → chunk-NER3KUUS.js} +2 -2
  171. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +20 -0
  172. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +1 -0
  173. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +918 -0
  174. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +7 -0
  175. package/dist/cli-bundle/chunks/{chunk-DJ5S2LDY.js → chunk-OESSOFJ4.js} +14 -12
  176. package/dist/cli-bundle/chunks/{chunk-DJ5S2LDY.js.map → chunk-OESSOFJ4.js.map} +1 -1
  177. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +238 -0
  178. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +1 -0
  179. package/dist/cli-bundle/chunks/{chunk-TUV7SIWZ.js → chunk-OWTIRHX4.js} +28 -6
  180. package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js.map +7 -0
  181. package/dist/cli-bundle/chunks/{chunk-PV5JS7MP.js → chunk-P3VRG72Q.js} +10 -8
  182. package/dist/cli-bundle/chunks/{chunk-PV5JS7MP.js.map → chunk-P3VRG72Q.js.map} +1 -1
  183. package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +1423 -0
  184. package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js.map +7 -0
  185. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +1977 -0
  186. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +7 -0
  187. package/dist/cli-bundle/chunks/{chunk-WTXDLBSZ.js → chunk-PDXT6Q55.js} +2 -2
  188. package/dist/cli-bundle/chunks/{chunk-YZWXMDNH.js → chunk-PJ3A56YF.js} +46 -537
  189. package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js.map +1 -0
  190. package/dist/cli-bundle/chunks/{test-runs-L3WKLO67.js → chunk-PPAJG4GB.js} +13 -10
  191. package/dist/cli-bundle/chunks/{test-runs-L3WKLO67.js.map → chunk-PPAJG4GB.js.map} +1 -1
  192. package/dist/cli-bundle/chunks/{chunk-LLQLLAKU.js → chunk-PPE4YUQM.js} +1670 -1573
  193. package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{chunk-TO4KCIOT.js → chunk-QHZO65XW.js} +8 -6
  195. package/dist/cli-bundle/chunks/{chunk-TO4KCIOT.js.map → chunk-QHZO65XW.js.map} +1 -1
  196. package/dist/cli-bundle/chunks/{chunk-4OXNQHKQ.js → chunk-R3ZBLGTC.js} +9 -10
  197. package/dist/cli-bundle/chunks/{chunk-4OXNQHKQ.js.map → chunk-R3ZBLGTC.js.map} +2 -2
  198. package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +624 -0
  199. package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{chunk-724VLYDJ.js → chunk-RX3HQSYG.js} +2 -2
  201. package/dist/cli-bundle/chunks/{chunk-PUVPC5DL.js → chunk-S4APD35C.js} +4 -4
  202. package/dist/cli-bundle/chunks/{chunk-T5RTYLZJ.js → chunk-S5AYOUT5.js} +8 -6
  203. package/dist/cli-bundle/chunks/{chunk-T5RTYLZJ.js.map → chunk-S5AYOUT5.js.map} +1 -1
  204. package/dist/cli-bundle/chunks/{chunk-75VMARGO.js → chunk-STPSZ2XY.js} +19 -744
  205. package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +1 -0
  206. package/dist/cli-bundle/chunks/{chunk-A2W3XKAD.js → chunk-T35XLYZF.js} +2 -2
  207. package/dist/cli-bundle/chunks/{chunk-N2LOJUBB.js → chunk-T3ABIMGW.js} +5 -3
  208. package/dist/cli-bundle/chunks/{chunk-N2LOJUBB.js.map → chunk-T3ABIMGW.js.map} +1 -1
  209. package/dist/cli-bundle/chunks/{chunk-FDNJMYZB.js → chunk-T3F4DF23.js} +16 -14
  210. package/dist/cli-bundle/chunks/{chunk-FDNJMYZB.js.map → chunk-T3F4DF23.js.map} +1 -1
  211. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +272 -0
  212. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +1 -0
  213. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +5354 -0
  214. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-XFO2NJY6.js → chunk-TSPKZRRW.js} +33 -28
  216. package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-ZZWMJVW2.js → chunk-TT42JUMF.js} +4 -4
  218. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +165 -0
  219. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +1 -0
  220. package/dist/cli-bundle/chunks/{chunk-7745CXNI.js → chunk-UI5BJ6DO.js} +1231 -1134
  221. package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +7 -0
  222. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +1932 -0
  223. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +1 -0
  224. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +175 -0
  225. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-B4O5S7I3.js → chunk-VUHVWI4C.js} +13 -3
  227. package/dist/cli-bundle/chunks/chunk-VUHVWI4C.js.map +7 -0
  228. package/dist/cli-bundle/chunks/{contracts-NLCDIZAT.js → chunk-VZIYHZDX.js} +11 -8
  229. package/dist/cli-bundle/chunks/{contracts-NLCDIZAT.js.map → chunk-VZIYHZDX.js.map} +1 -1
  230. package/dist/cli-bundle/chunks/{chunk-TGYDJEJH.js → chunk-WISPVC2E.js} +9 -7
  231. package/dist/cli-bundle/chunks/{chunk-TGYDJEJH.js.map → chunk-WISPVC2E.js.map} +1 -1
  232. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +5434 -0
  233. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +7 -0
  234. package/dist/cli-bundle/chunks/{chunk-MTB4PRA3.js → chunk-XQCG2JGW.js} +17 -749
  235. package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +7 -0
  236. package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +550 -0
  237. package/dist/cli-bundle/chunks/chunk-Y76TWC45.js.map +7 -0
  238. package/dist/cli-bundle/chunks/{chunk-SL2ANJSV.js → chunk-YD5FML7K.js} +418 -2173
  239. package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +1 -0
  240. package/dist/cli-bundle/chunks/{chunk-NHKXOMZ5.js → chunk-YFIE7YK6.js} +7 -5
  241. package/dist/cli-bundle/chunks/{chunk-NHKXOMZ5.js.map → chunk-YFIE7YK6.js.map} +1 -1
  242. package/dist/cli-bundle/chunks/{chunk-5FYY76HR.js → chunk-YMABYTNG.js} +32 -27
  243. package/dist/cli-bundle/chunks/chunk-YMABYTNG.js.map +7 -0
  244. package/dist/cli-bundle/chunks/{chunk-W5X3AHJN.js → chunk-YOF5VPKM.js} +2 -2
  245. package/dist/cli-bundle/chunks/{chunk-M6PR5BC6.js → chunk-YPPVU5GX.js} +11 -9
  246. package/dist/cli-bundle/chunks/{chunk-M6PR5BC6.js.map → chunk-YPPVU5GX.js.map} +1 -1
  247. package/dist/cli-bundle/chunks/{chunk-ZIEGTQCY.js → chunk-YQMMMONE.js} +6 -4
  248. package/dist/cli-bundle/chunks/{chunk-ZIEGTQCY.js.map → chunk-YQMMMONE.js.map} +1 -1
  249. package/dist/cli-bundle/chunks/{chunk-4IW7STMB.js → chunk-YSAH5FY5.js} +16 -14
  250. package/dist/cli-bundle/chunks/{chunk-4IW7STMB.js.map → chunk-YSAH5FY5.js.map} +1 -1
  251. package/dist/cli-bundle/chunks/{chunk-JYLFF7GJ.js → chunk-YZIR4R3U.js} +16 -14
  252. package/dist/cli-bundle/chunks/{chunk-JYLFF7GJ.js.map → chunk-YZIR4R3U.js.map} +1 -1
  253. package/dist/cli-bundle/chunks/{chunk-7G5SUU6F.js → chunk-Z2CRRZYF.js} +14 -12
  254. package/dist/cli-bundle/chunks/{chunk-7G5SUU6F.js.map → chunk-Z2CRRZYF.js.map} +1 -1
  255. package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +533 -0
  256. package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js.map +1 -0
  257. package/dist/cli-bundle/chunks/{chunk-WOOB7PV7.js → chunk-ZCJAA3JK.js} +8 -6
  258. package/dist/cli-bundle/chunks/{chunk-WOOB7PV7.js.map → chunk-ZCJAA3JK.js.map} +1 -1
  259. package/dist/cli-bundle/chunks/{chunk-WSDIALO4.js → chunk-ZD34OFFQ.js} +5 -3
  260. package/dist/cli-bundle/chunks/{chunk-WSDIALO4.js.map → chunk-ZD34OFFQ.js.map} +1 -1
  261. package/dist/cli-bundle/chunks/{chunk-Q3XVLRCJ.js → chunk-ZJB3UV5U.js} +54 -58
  262. package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +1 -0
  263. package/dist/cli-bundle/chunks/{chunk-MZ4NH46V.js → chunk-ZMD35NYG.js} +2 -2
  264. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +241 -0
  265. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +7 -0
  266. package/dist/cli-bundle/chunks/{claim-D6L33A5Y.js → claim-4DROPSIS.js} +30 -13
  267. package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +1 -0
  268. package/dist/cli-bundle/chunks/{claim-YAFUTPVK.js → claim-VX54TV5U.js} +29 -12
  269. package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +7 -0
  270. package/dist/cli-bundle/chunks/{close-TGYXG7TV.js → close-3YRR3XY6.js} +9 -7
  271. package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +16 -0
  272. package/dist/cli-bundle/chunks/{close-many-SNA6LNZH.js → close-many-AP4MWU36.js} +21 -18
  273. package/dist/cli-bundle/chunks/{close-many-SNA6LNZH.js.map → close-many-AP4MWU36.js.map} +1 -1
  274. package/dist/cli-bundle/chunks/{close-many-4QSWKCRU.js → close-many-OMZIGZB4.js} +19 -16
  275. package/dist/cli-bundle/chunks/{close-many-4QSWKCRU.js.map → close-many-OMZIGZB4.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{comments-QC6ARR5X.js → comments-MIW5MZOX.js} +12 -9
  277. package/dist/cli-bundle/chunks/{comments-QC6ARR5X.js.map → comments-MIW5MZOX.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{comments-ZHVYGUVC.js → comments-SAG5LSKL.js} +14 -11
  279. package/dist/cli-bundle/chunks/{comments-ZHVYGUVC.js.map → comments-SAG5LSKL.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/{config-O6W2EU2G.js → config-DJJKZB5R.js} +20 -17
  281. package/dist/cli-bundle/chunks/{config-O6W2EU2G.js.map → config-DJJKZB5R.js.map} +1 -1
  282. package/dist/cli-bundle/chunks/{config-XQRFJXJP.js → config-V57QD47V.js} +22 -19
  283. package/dist/cli-bundle/chunks/{config-XQRFJXJP.js.map → config-V57QD47V.js.map} +1 -1
  284. package/dist/cli-bundle/chunks/{context-IHE3IXN5.js → context-4OQGIPSO.js} +15 -12
  285. package/dist/cli-bundle/chunks/{context-WSYWBEUL.js → context-WLA6IAWE.js} +15 -12
  286. package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +12 -0
  287. package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +16 -0
  288. package/dist/cli-bundle/chunks/{copy-7MUQC44A.js → copy-LEE6P6EM.js} +17 -14
  289. package/dist/cli-bundle/chunks/{copy-7MUQC44A.js.map → copy-LEE6P6EM.js.map} +2 -2
  290. package/dist/cli-bundle/chunks/{copy-ANWXDJVC.js → copy-OTJOWFL6.js} +18 -15
  291. package/dist/cli-bundle/chunks/{copy-ANWXDJVC.js.map → copy-OTJOWFL6.js.map} +1 -1
  292. package/dist/cli-bundle/chunks/create-WKOZKPQR.js +30 -0
  293. package/dist/cli-bundle/chunks/{create-JIA2IFCO.js → create-XWWQFQ6S.js} +14 -12
  294. package/dist/cli-bundle/chunks/{delete-5OLYWQIC.js → delete-62JQTYT4.js} +10 -7
  295. package/dist/cli-bundle/chunks/{delete-5OLYWQIC.js.map → delete-62JQTYT4.js.map} +1 -1
  296. package/dist/cli-bundle/chunks/{delete-INHKCIRN.js → delete-HQKGRNRZ.js} +12 -9
  297. package/dist/cli-bundle/chunks/{delete-INHKCIRN.js.map → delete-HQKGRNRZ.js.map} +1 -1
  298. package/dist/cli-bundle/chunks/{deps-IYEID3QX.js → deps-55FTG6Z5.js} +12 -9
  299. package/dist/cli-bundle/chunks/{deps-IYEID3QX.js.map → deps-55FTG6Z5.js.map} +1 -1
  300. package/dist/cli-bundle/chunks/{deps-CCSWGZW7.js → deps-L2FPIAD3.js} +10 -7
  301. package/dist/cli-bundle/chunks/{deps-CCSWGZW7.js.map → deps-L2FPIAD3.js.map} +1 -1
  302. package/dist/cli-bundle/chunks/{docs-PKO7OEIM.js → docs-6CRCSVKK.js} +11 -9
  303. package/dist/cli-bundle/chunks/{docs-PKO7OEIM.js.map → docs-6CRCSVKK.js.map} +1 -1
  304. package/dist/cli-bundle/chunks/{docs-3XZK22WF.js → docs-S6UTOTO5.js} +9 -7
  305. package/dist/cli-bundle/chunks/{docs-3XZK22WF.js.map → docs-S6UTOTO5.js.map} +1 -1
  306. package/dist/cli-bundle/chunks/{eval-5XYP6NMY.js → eval-N6UHFWVO.js} +15 -11
  307. package/dist/cli-bundle/chunks/{eval-5XYP6NMY.js.map → eval-N6UHFWVO.js.map} +1 -1
  308. package/dist/cli-bundle/chunks/{eval-O4WGQYDI.js → eval-PHOTWYHI.js} +17 -13
  309. package/dist/cli-bundle/chunks/{eval-O4WGQYDI.js.map → eval-PHOTWYHI.js.map} +1 -1
  310. package/dist/cli-bundle/chunks/{extension-T7JNTAAA.js → extension-NBAH62ML.js} +17 -11
  311. package/dist/cli-bundle/chunks/{extension-PVGRRZZG.js → extension-ZF6ZZPOU.js} +17 -11
  312. package/dist/cli-bundle/chunks/{files-W7HH5EOD.js → files-6P57MRKL.js} +12 -9
  313. package/dist/cli-bundle/chunks/{files-W7HH5EOD.js.map → files-6P57MRKL.js.map} +1 -1
  314. package/dist/cli-bundle/chunks/{files-7IU56S6R.js → files-JPU3FNJ7.js} +14 -11
  315. package/dist/cli-bundle/chunks/{files-7IU56S6R.js.map → files-JPU3FNJ7.js.map} +1 -1
  316. package/dist/cli-bundle/chunks/{focus-6FA5KYRY.js → focus-LFZ6IDBR.js} +15 -11
  317. package/dist/cli-bundle/chunks/{focus-6FA5KYRY.js.map → focus-LFZ6IDBR.js.map} +1 -1
  318. package/dist/cli-bundle/chunks/{focus-CQ63JFDG.js → focus-WNMYCVYA.js} +13 -9
  319. package/dist/cli-bundle/chunks/{focus-CQ63JFDG.js.map → focus-WNMYCVYA.js.map} +1 -1
  320. package/dist/cli-bundle/chunks/{gc-3BG67KTO.js → gc-AETFKZ44.js} +10 -7
  321. package/dist/cli-bundle/chunks/{gc-3BG67KTO.js.map → gc-AETFKZ44.js.map} +1 -1
  322. package/dist/cli-bundle/chunks/{gc-PEZYGNVB.js → gc-RLBP4QVN.js} +12 -9
  323. package/dist/cli-bundle/chunks/{gc-PEZYGNVB.js.map → gc-RLBP4QVN.js.map} +1 -1
  324. package/dist/cli-bundle/chunks/{get-J6CSJ4SX.js → get-NH2MPBCI.js} +18 -15
  325. package/dist/cli-bundle/chunks/{get-J6CSJ4SX.js.map → get-NH2MPBCI.js.map} +1 -1
  326. package/dist/cli-bundle/chunks/{get-KJTKGNEQ.js → get-P4ZQXCPZ.js} +16 -13
  327. package/dist/cli-bundle/chunks/{get-KJTKGNEQ.js.map → get-P4ZQXCPZ.js.map} +1 -1
  328. package/dist/cli-bundle/chunks/{health-32UQICEL.js → health-3GVPMQBL.js} +36 -29
  329. package/dist/cli-bundle/chunks/{health-32UQICEL.js.map → health-3GVPMQBL.js.map} +1 -1
  330. package/dist/cli-bundle/chunks/{health-ZUZG5ULV.js → health-DNTM72GJ.js} +34 -27
  331. package/dist/cli-bundle/chunks/{health-ZUZG5ULV.js.map → health-DNTM72GJ.js.map} +1 -1
  332. package/dist/cli-bundle/chunks/history-RYKLC72X.js +20 -0
  333. package/dist/cli-bundle/chunks/{history-W6QVR6FA.js → history-SGPYRAFT.js} +10 -8
  334. package/dist/cli-bundle/chunks/{history-compact-JQ6ZGYSJ.js → history-compact-3F6VELO7.js} +18 -15
  335. package/dist/cli-bundle/chunks/{history-compact-JQ6ZGYSJ.js.map → history-compact-3F6VELO7.js.map} +1 -1
  336. package/dist/cli-bundle/chunks/{history-compact-F355EGL4.js → history-compact-656Y2TN4.js} +20 -17
  337. package/dist/cli-bundle/chunks/{history-compact-F355EGL4.js.map → history-compact-656Y2TN4.js.map} +1 -1
  338. package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +21 -0
  339. package/dist/cli-bundle/chunks/{history-redact-TUWOUYX5.js → history-redact-54ICFKXM.js} +11 -9
  340. package/dist/cli-bundle/chunks/{history-repair-ZKS3LKPV.js → history-repair-4N6SDVHK.js} +17 -14
  341. package/dist/cli-bundle/chunks/{history-repair-ZKS3LKPV.js.map → history-repair-4N6SDVHK.js.map} +1 -1
  342. package/dist/cli-bundle/chunks/{history-repair-MPCAIKYE.js → history-repair-EVTO6LIH.js} +19 -16
  343. package/dist/cli-bundle/chunks/{history-repair-MPCAIKYE.js.map → history-repair-EVTO6LIH.js.map} +1 -1
  344. package/dist/cli-bundle/chunks/init-RPIPQUNV.js +32 -0
  345. package/dist/cli-bundle/chunks/init-SKQAESQS.js +28 -0
  346. package/dist/cli-bundle/chunks/{learnings-EYC3OKS2.js → learnings-2HTPZNGZ.js} +10 -8
  347. package/dist/cli-bundle/chunks/{learnings-EYC3OKS2.js.map → learnings-2HTPZNGZ.js.map} +1 -1
  348. package/dist/cli-bundle/chunks/{learnings-HKJJUVTA.js → learnings-YBIHY3D6.js} +12 -10
  349. package/dist/cli-bundle/chunks/{learnings-HKJJUVTA.js.map → learnings-YBIHY3D6.js.map} +1 -1
  350. package/dist/cli-bundle/chunks/{list-KN3TL5Y5.js → list-64LHZ3HM.js} +10 -8
  351. package/dist/cli-bundle/chunks/{list-HFD5737R.js → list-7LXBTEKI.js} +10 -8
  352. package/dist/cli-bundle/chunks/{next-DQUMFAHG.js → next-7ODPAQ4U.js} +22 -18
  353. package/dist/cli-bundle/chunks/{next-DQUMFAHG.js.map → next-7ODPAQ4U.js.map} +1 -1
  354. package/dist/cli-bundle/chunks/{next-JUEYC5HE.js → next-ODJUM4ZM.js} +24 -20
  355. package/dist/cli-bundle/chunks/{next-JUEYC5HE.js.map → next-ODJUM4ZM.js.map} +1 -1
  356. package/dist/cli-bundle/chunks/{notes-ZG6RLZXB.js → notes-72YXN5JX.js} +10 -8
  357. package/dist/cli-bundle/chunks/{notes-ZG6RLZXB.js.map → notes-72YXN5JX.js.map} +1 -1
  358. package/dist/cli-bundle/chunks/{notes-XATYT43P.js → notes-NJ7IQJX4.js} +12 -10
  359. package/dist/cli-bundle/chunks/{notes-XATYT43P.js.map → notes-NJ7IQJX4.js.map} +1 -1
  360. package/dist/cli-bundle/chunks/{plan-DVVLX7LK.js → plan-R4NDQ27E.js} +18 -15
  361. package/dist/cli-bundle/chunks/{plan-DVVLX7LK.js.map → plan-R4NDQ27E.js.map} +1 -1
  362. package/dist/cli-bundle/chunks/{plan-5NWQL2DH.js → plan-XWY5T67S.js} +20 -17
  363. package/dist/cli-bundle/chunks/{plan-5NWQL2DH.js.map → plan-XWY5T67S.js.map} +1 -1
  364. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +397 -0
  365. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +1 -0
  366. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +400 -0
  367. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +7 -0
  368. package/dist/cli-bundle/chunks/{register-list-query-WRS6ACUW.js → register-list-query-5H66WFYF.js} +22 -19
  369. package/dist/cli-bundle/chunks/{register-list-query-WRS6ACUW.js.map → register-list-query-5H66WFYF.js.map} +1 -1
  370. package/dist/cli-bundle/chunks/{register-list-query-PNRAHNIQ.js → register-list-query-FB3FNDLZ.js} +24 -21
  371. package/dist/cli-bundle/chunks/{register-list-query-PNRAHNIQ.js.map → register-list-query-FB3FNDLZ.js.map} +1 -1
  372. package/dist/cli-bundle/chunks/{register-mutation-K2MNRWGI.js → register-mutation-UJO23C7R.js} +42 -39
  373. package/dist/cli-bundle/chunks/{register-mutation-K2MNRWGI.js.map → register-mutation-UJO23C7R.js.map} +1 -1
  374. package/dist/cli-bundle/chunks/{register-mutation-ET6E4VLE.js → register-mutation-Z2ETYHKS.js} +40 -37
  375. package/dist/cli-bundle/chunks/{register-mutation-ET6E4VLE.js.map → register-mutation-Z2ETYHKS.js.map} +1 -1
  376. package/dist/cli-bundle/chunks/{register-operations-6DQRUTIX.js → register-operations-A3XAM5J7.js} +39 -36
  377. package/dist/cli-bundle/chunks/{register-operations-6DQRUTIX.js.map → register-operations-A3XAM5J7.js.map} +1 -1
  378. package/dist/cli-bundle/chunks/{register-operations-73UDWMVB.js → register-operations-SG7HBSUP.js} +37 -34
  379. package/dist/cli-bundle/chunks/{register-operations-73UDWMVB.js.map → register-operations-SG7HBSUP.js.map} +1 -1
  380. package/dist/cli-bundle/chunks/{register-setup-LYYCMQFV.js → register-setup-I45OGJUV.js} +25 -19
  381. package/dist/cli-bundle/chunks/{register-setup-LYYCMQFV.js.map → register-setup-I45OGJUV.js.map} +1 -1
  382. package/dist/cli-bundle/chunks/{register-setup-FXZJ2CEJ.js → register-setup-K6U3NVY5.js} +23 -17
  383. package/dist/cli-bundle/chunks/{register-setup-FXZJ2CEJ.js.map → register-setup-K6U3NVY5.js.map} +1 -1
  384. package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +19 -0
  385. package/dist/cli-bundle/chunks/{restore-R6YJHQK3.js → restore-YJ2ET6AT.js} +11 -9
  386. package/dist/cli-bundle/chunks/{scheduling-shortcuts-OGODPUBL.js → scheduling-shortcuts-SSC4MYWQ.js} +14 -12
  387. package/dist/cli-bundle/chunks/{scheduling-shortcuts-OGODPUBL.js.map → scheduling-shortcuts-SSC4MYWQ.js.map} +1 -1
  388. package/dist/cli-bundle/chunks/{scheduling-shortcuts-LE4S7OI7.js → scheduling-shortcuts-ULRG7MNP.js} +16 -14
  389. package/dist/cli-bundle/chunks/{scheduling-shortcuts-LE4S7OI7.js.map → scheduling-shortcuts-ULRG7MNP.js.map} +1 -1
  390. package/dist/cli-bundle/chunks/{schema-ICCD3HOP.js → schema-2PUXCZ25.js} +10 -7
  391. package/dist/cli-bundle/chunks/{schema-RHH23PQX.js → schema-Y6DXXK2F.js} +10 -7
  392. package/dist/cli-bundle/chunks/{search-Z2VGP2Q5.js → search-3S72CTD6.js} +13 -10
  393. package/dist/cli-bundle/chunks/{search-HDDKOPFE.js → search-WNUNBQXO.js} +13 -10
  394. package/dist/cli-bundle/chunks/{stats-ETFP37MB.js → stats-IJYTRQGV.js} +13 -10
  395. package/dist/cli-bundle/chunks/{stats-ETFP37MB.js.map → stats-IJYTRQGV.js.map} +1 -1
  396. package/dist/cli-bundle/chunks/{stats-DHMRXHOB.js → stats-L2D5Y2O5.js} +15 -12
  397. package/dist/cli-bundle/chunks/{stats-DHMRXHOB.js.map → stats-L2D5Y2O5.js.map} +1 -1
  398. package/dist/cli-bundle/chunks/{telemetry-ZRBM22QD.js → telemetry-L2CVOKVN.js} +11 -8
  399. package/dist/cli-bundle/chunks/{telemetry-ZRBM22QD.js.map → telemetry-L2CVOKVN.js.map} +1 -1
  400. package/dist/cli-bundle/chunks/{telemetry-NUZNKDCP.js → telemetry-QBYWQA76.js} +13 -10
  401. package/dist/cli-bundle/chunks/{telemetry-NUZNKDCP.js.map → telemetry-QBYWQA76.js.map} +1 -1
  402. package/dist/cli-bundle/chunks/{test-XNKTIP4Y.js → test-DQ2QFJ7W.js} +21 -15
  403. package/dist/cli-bundle/chunks/test-W7QBLVJS.js +41 -0
  404. package/dist/cli-bundle/chunks/{test-all-APCBSXQI.js → test-all-636NTRTT.js} +26 -19
  405. package/dist/cli-bundle/chunks/{test-all-APCBSXQI.js.map → test-all-636NTRTT.js.map} +1 -1
  406. package/dist/cli-bundle/chunks/{test-all-KIK3OYBY.js → test-all-DWYK3RG6.js} +24 -17
  407. package/dist/cli-bundle/chunks/{test-all-KIK3OYBY.js.map → test-all-DWYK3RG6.js.map} +1 -1
  408. package/dist/cli-bundle/chunks/test-runs-245OINZR.js +28 -0
  409. package/dist/cli-bundle/chunks/test-runs-245OINZR.js.map +1 -0
  410. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +24 -0
  411. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js.map +7 -0
  412. package/dist/cli-bundle/chunks/update-SFLZPJXX.js +30 -0
  413. package/dist/cli-bundle/chunks/update-SFLZPJXX.js.map +1 -0
  414. package/dist/cli-bundle/chunks/update-SJZ6S77U.js +26 -0
  415. package/dist/cli-bundle/chunks/update-SJZ6S77U.js.map +7 -0
  416. package/dist/cli-bundle/chunks/{update-many-XGTJ7QIU.js → update-many-DC7X3EWM.js} +32 -29
  417. package/dist/cli-bundle/chunks/{update-many-XGTJ7QIU.js.map → update-many-DC7X3EWM.js.map} +1 -1
  418. package/dist/cli-bundle/chunks/{update-many-GFCQG6ZQ.js → update-many-SLLAMHT7.js} +34 -31
  419. package/dist/cli-bundle/chunks/{update-many-GFCQG6ZQ.js.map → update-many-SLLAMHT7.js.map} +1 -1
  420. package/dist/cli-bundle/chunks/{upgrade-KJ3JGELR.js → upgrade-HFFXLZJA.js} +19 -12
  421. package/dist/cli-bundle/chunks/{upgrade-KJ3JGELR.js.map → upgrade-HFFXLZJA.js.map} +1 -1
  422. package/dist/cli-bundle/chunks/{upgrade-RBRQ7PQU.js → upgrade-UYQKM7RF.js} +21 -14
  423. package/dist/cli-bundle/chunks/{upgrade-RBRQ7PQU.js.map → upgrade-UYQKM7RF.js.map} +1 -1
  424. package/dist/cli-bundle/chunks/{validate-EW6TGC7R.js → validate-PA4FDTOV.js} +34 -27
  425. package/dist/cli-bundle/chunks/{validate-EW6TGC7R.js.map → validate-PA4FDTOV.js.map} +2 -2
  426. package/dist/cli-bundle/chunks/{validate-T6PR5WAL.js → validate-Z7L75YEJ.js} +35 -28
  427. package/dist/cli-bundle/chunks/{validate-T6PR5WAL.js.map → validate-Z7L75YEJ.js.map} +1 -1
  428. package/dist/cli-bundle/main.js +173 -57
  429. package/dist/cli-bundle/main.js.map +2 -2
  430. package/dist/cli-bundle/sdk-runtime.js +247 -0
  431. package/dist/cli-bundle/sdk-runtime.js.map +7 -0
  432. package/dist/cli-bundle/sdk-testing.js +101 -0
  433. package/dist/cli-bundle/sdk-testing.js.map +7 -0
  434. package/dist/cli-bundle/sdk.js +787 -0
  435. package/dist/cli-bundle/sdk.js.map +7 -0
  436. package/dist/core/config/nested-settings.d.ts +4 -3
  437. package/dist/core/config/nested-settings.js +17 -6
  438. package/dist/core/config/nested-settings.js.map +1 -1
  439. package/dist/core/extensions/activation-summary.d.ts +6 -0
  440. package/dist/core/extensions/activation-summary.js +10 -4
  441. package/dist/core/extensions/activation-summary.js.map +1 -1
  442. package/dist/core/extensions/capability-usage.d.ts +6 -0
  443. package/dist/core/extensions/capability-usage.js +10 -4
  444. package/dist/core/extensions/capability-usage.js.map +1 -1
  445. package/dist/core/extensions/extension-types.d.ts +5 -0
  446. package/dist/core/extensions/extension-types.js +2 -2
  447. package/dist/core/extensions/extension-types.js.map +1 -1
  448. package/dist/core/extensions/loader.d.ts +3 -0
  449. package/dist/core/extensions/loader.js +11 -19
  450. package/dist/core/extensions/loader.js.map +1 -1
  451. package/dist/core/history/history-rewrite.js +3 -3
  452. package/dist/core/history/history-rewrite.js.map +1 -1
  453. package/dist/core/item/parent-reference-policy.d.ts +9 -1
  454. package/dist/core/item/parent-reference-policy.js +28 -4
  455. package/dist/core/item/parent-reference-policy.js.map +1 -1
  456. package/dist/core/lock/lock.d.ts +28 -1
  457. package/dist/core/lock/lock.js +254 -20
  458. package/dist/core/lock/lock.js.map +1 -1
  459. package/dist/core/search/background-refresh.js +7 -19
  460. package/dist/core/search/background-refresh.js.map +1 -1
  461. package/dist/core/search/http-client.d.ts +0 -1
  462. package/dist/core/search/http-client.js +3 -3
  463. package/dist/core/search/http-client.js.map +1 -1
  464. package/dist/core/shared/constants.js +3 -2
  465. package/dist/core/shared/constants.js.map +1 -1
  466. package/dist/core/shared/errors.d.ts +1 -0
  467. package/dist/core/shared/errors.js +2 -2
  468. package/dist/core/shared/errors.js.map +1 -1
  469. package/dist/core/shared/primitives.d.ts +12 -0
  470. package/dist/core/shared/primitives.js +29 -2
  471. package/dist/core/shared/primitives.js.map +1 -1
  472. package/dist/core/store/item-store.js +3 -3
  473. package/dist/core/store/item-store.js.map +1 -1
  474. package/dist/core/store/settings-validator.d.ts +1 -0
  475. package/dist/core/store/settings-validator.js +6 -3
  476. package/dist/core/store/settings-validator.js.map +1 -1
  477. package/dist/core/store/settings.js +3 -3
  478. package/dist/core/store/settings.js.map +1 -1
  479. package/dist/core/validate/fix-planning.d.ts +0 -2
  480. package/dist/core/validate/fix-planning.js +3 -3
  481. package/dist/core/validate/fix-planning.js.map +1 -1
  482. package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
  483. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  484. package/dist/sdk/cli-contracts/flag-contracts.js +3 -2
  485. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  486. package/dist/sdk/errors.d.ts +21 -2
  487. package/dist/sdk/errors.js +8 -2
  488. package/dist/sdk/errors.js.map +1 -1
  489. package/dist/sdk/package-import-adapters.js +3 -3
  490. package/dist/sdk/package-import-adapters.js.map +1 -1
  491. package/dist/sdk/testing.js +41 -19
  492. package/dist/sdk/testing.js.map +1 -1
  493. package/dist/types.d.ts +6 -0
  494. package/dist/types.js +2 -2
  495. package/dist/types.js.map +1 -1
  496. package/docs/ARCHITECTURE.md +27 -0
  497. package/docs/CONFIGURATION.md +3 -0
  498. package/docs/README.md +1 -0
  499. package/docs/SDK_PRIMITIVE_INVENTORY.md +55 -0
  500. package/docs/TESTING.md +5 -1
  501. package/docs/examples/ci/github-actions-pm-extension-gate.yml +5 -5
  502. package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
  503. package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
  504. package/package.json +11 -24
  505. package/packages/pm-beads/extensions/beads/package.json +3 -0
  506. package/packages/pm-beads/extensions/beads/runtime-loader.ts +24 -2
  507. package/packages/pm-calendar/extensions/calendar/package.json +3 -0
  508. package/packages/pm-command-kit/extensions/command-kit/package.json +3 -0
  509. package/packages/pm-governance-audit/extensions/governance-audit/package.json +3 -0
  510. package/packages/pm-guide-shell/extensions/guide-shell/package.json +3 -0
  511. package/packages/pm-kanban/extensions/kanban/package.json +3 -0
  512. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +3 -0
  513. package/packages/pm-search-advanced/extensions/search-advanced/package.json +3 -0
  514. package/packages/pm-templates/extensions/templates/package.json +3 -0
  515. package/packages/pm-todos/extensions/todos/package.json +3 -0
  516. package/packages/pm-todos/extensions/todos/runtime-loader.ts +21 -3
  517. package/scripts/bundle-cli.mjs +12 -2
  518. package/dist/cli-bundle/chunks/activity-IDS5GSYG.js +0 -16
  519. package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +0 -7
  520. package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +0 -7
  521. package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +0 -1
  522. package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +0 -7
  523. package/dist/cli-bundle/chunks/chunk-AOP2EMK3.js.map +0 -1
  524. package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +0 -1
  525. package/dist/cli-bundle/chunks/chunk-B4O5S7I3.js.map +0 -7
  526. package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +0 -7
  527. package/dist/cli-bundle/chunks/chunk-CN4OAA2G.js.map +0 -7
  528. package/dist/cli-bundle/chunks/chunk-EH23N5FX.js.map +0 -1
  529. package/dist/cli-bundle/chunks/chunk-FMWQRMHS.js.map +0 -1
  530. package/dist/cli-bundle/chunks/chunk-J4KNRDI3.js.map +0 -1
  531. package/dist/cli-bundle/chunks/chunk-KKHIQOTN.js.map +0 -7
  532. package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +0 -1
  533. package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +0 -1
  534. package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +0 -7
  535. package/dist/cli-bundle/chunks/chunk-MZG6I2Q2.js.map +0 -7
  536. package/dist/cli-bundle/chunks/chunk-NGDK3KEZ.js.map +0 -7
  537. package/dist/cli-bundle/chunks/chunk-Q3XVLRCJ.js.map +0 -1
  538. package/dist/cli-bundle/chunks/chunk-SBNT6SLO.js.map +0 -7
  539. package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +0 -1
  540. package/dist/cli-bundle/chunks/chunk-TUV7SIWZ.js.map +0 -7
  541. package/dist/cli-bundle/chunks/chunk-UGDONITK.js.map +0 -7
  542. package/dist/cli-bundle/chunks/chunk-UYLA5ROU.js.map +0 -1
  543. package/dist/cli-bundle/chunks/chunk-WBWRQS32.js.map +0 -1
  544. package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +0 -1
  545. package/dist/cli-bundle/chunks/chunk-XQCWTSLO.js.map +0 -1
  546. package/dist/cli-bundle/chunks/chunk-YZWXMDNH.js.map +0 -1
  547. package/dist/cli-bundle/chunks/chunk-Z4DGFQDH.js.map +0 -1
  548. package/dist/cli-bundle/chunks/claim-D6L33A5Y.js.map +0 -1
  549. package/dist/cli-bundle/chunks/claim-YAFUTPVK.js.map +0 -7
  550. package/dist/cli-bundle/chunks/close-KLDLHAOP.js +0 -14
  551. package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +0 -28
  552. package/dist/cli-bundle/chunks/history-IOH6FKG7.js +0 -18
  553. package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +0 -19
  554. package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +0 -22
  555. package/dist/cli-bundle/chunks/init-MAA6UMNQ.js +0 -26
  556. package/dist/cli-bundle/chunks/profile-54DZ4CLB.js +0 -1205
  557. package/dist/cli-bundle/chunks/profile-54DZ4CLB.js.map +0 -1
  558. package/dist/cli-bundle/chunks/profile-PLIQVEOY.js +0 -1243
  559. package/dist/cli-bundle/chunks/profile-PLIQVEOY.js.map +0 -7
  560. package/dist/cli-bundle/chunks/restore-L27TMMCF.js +0 -17
  561. package/dist/cli-bundle/chunks/test-H36PM746.js +0 -35
  562. package/dist/cli-bundle/chunks/update-RQKI3AMW.js +0 -24
  563. package/dist/cli-bundle/chunks/update-ZM7NJWHY.js +0 -28
  564. /package/dist/cli-bundle/chunks/{activity-IDS5GSYG.js.map → activity-4XQIDNM5.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{activity-OENQCYZD.js.map → activity-YKAKZTZ4.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-4SHME4VR.js.map → chunk-5JE6SMYS.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-4EVY7CQN.js.map → chunk-N6DNM2FA.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-YZR7UMZ6.js.map → chunk-NER3KUUS.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-WTXDLBSZ.js.map → chunk-PDXT6Q55.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{chunk-724VLYDJ.js.map → chunk-RX3HQSYG.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{chunk-PUVPC5DL.js.map → chunk-S4APD35C.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{chunk-A2W3XKAD.js.map → chunk-T35XLYZF.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{chunk-ZZWMJVW2.js.map → chunk-TT42JUMF.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{chunk-W5X3AHJN.js.map → chunk-YOF5VPKM.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{chunk-MZ4NH46V.js.map → chunk-ZMD35NYG.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{close-TGYXG7TV.js.map → close-3YRR3XY6.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{close-KLDLHAOP.js.map → close-OB2Y4QP5.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{context-IHE3IXN5.js.map → context-4OQGIPSO.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{context-WSYWBEUL.js.map → context-WLA6IAWE.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{create-AJ6HUR5W.js.map → contracts-HXJLKCRI.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{create-JIA2IFCO.js.map → contracts-OJEXMKVW.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{extension-T7JNTAAA.js.map → create-WKOZKPQR.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{extension-PVGRRZZG.js.map → create-XWWQFQ6S.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{history-IOH6FKG7.js.map → extension-NBAH62ML.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{history-W6QVR6FA.js.map → extension-ZF6ZZPOU.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{history-redact-VVDOARNO.js.map → history-RYKLC72X.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{history-redact-TUWOUYX5.js.map → history-SGPYRAFT.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{init-CZLEEE6Q.js.map → history-redact-4H3FCKF3.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{init-MAA6UMNQ.js.map → history-redact-54ICFKXM.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{list-HFD5737R.js.map → init-RPIPQUNV.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{list-KN3TL5Y5.js.map → init-SKQAESQS.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{restore-L27TMMCF.js.map → list-64LHZ3HM.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{restore-R6YJHQK3.js.map → list-7LXBTEKI.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{schema-ICCD3HOP.js.map → restore-PXOFL6AM.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{schema-RHH23PQX.js.map → restore-YJ2ET6AT.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{search-HDDKOPFE.js.map → schema-2PUXCZ25.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{search-Z2VGP2Q5.js.map → schema-Y6DXXK2F.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{test-XNKTIP4Y.js.map → search-3S72CTD6.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{test-H36PM746.js.map → search-WNUNBQXO.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{update-ZM7NJWHY.js.map → test-DQ2QFJ7W.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{update-RQKI3AMW.js.map → test-W7QBLVJS.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sources":["sdk/errors.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/errors\n *\n * Defines public SDK APIs and package-author helpers for Errors.\n */\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError, type PmCliErrorContext } from \"../core/shared/errors.js\";\n\nexport const PM_CLI_EXPECTED_ERROR_NAME = \"PmCliError\";\n\n/**\n * Documents the pm cli expected error payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmCliExpectedError extends Error {\n name: typeof PM_CLI_EXPECTED_ERROR_NAME;\n exitCode: number;\n context: PmCliErrorContext;\n cause?: unknown;\n}\n\n/**\n * Documents the create pm cli expected error options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CreatePmCliExpectedErrorOptions {\n exitCode?: number;\n context?: PmCliErrorContext;\n cause?: unknown;\n}\n\nfunction normalizeExpectedErrorExitCode(value: number): number {\n if (!Number.isFinite(value)) {\n throw new TypeError(\"createPmCliExpectedError options.exitCode must be a finite number\");\n }\n const normalized = Math.trunc(value);\n if (normalized <= EXIT_CODE.SUCCESS) {\n throw new TypeError(\"createPmCliExpectedError options.exitCode must be a positive exit code\");\n }\n return normalized;\n}\n\n/**\n * Create a package-safe expected CLI error.\n *\n * The CLI and Sentry filtering rely on the public error shape rather than a\n * shared class identity, so package authors can throw this from bundled,\n * linked, or separately installed extension code.\n */\nexport function createPmCliExpectedError(\n message: string,\n options: CreatePmCliExpectedErrorOptions = {},\n): PmCliExpectedError {\n if (typeof message !== \"string\" || message.trim().length === 0) {\n throw new TypeError(\"createPmCliExpectedError message must be a non-empty string\");\n }\n const error = new PmCliError(\n message,\n normalizeExpectedErrorExitCode(options.exitCode ?? EXIT_CODE.USAGE),\n options.context ?? {},\n ) as PmCliExpectedError;\n if (\"cause\" in options) {\n Object.defineProperty(error, \"cause\", {\n value: options.cause,\n enumerable: false,\n configurable: true,\n writable: true,\n });\n }\n return error;\n}\n\n/**\n * Implements check whether pm cli expected error for the public runtime surface of this module.\n */\nexport function isPmCliExpectedError(error: unknown): error is PmCliExpectedError {\n if (!(error instanceof Error) || error.name !== PM_CLI_EXPECTED_ERROR_NAME) {\n return false;\n }\n const candidate = error as Partial<PmCliExpectedError>;\n return typeof candidate.exitCode === \"number\" && Number.isFinite(candidate.exitCode);\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAA0B,MAAM,0BAA0B,CAAC;AAE9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAqBvD,SAAS,8BAA8B,CAAC,KAAa;IACnD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,SAAS,CAAC,mEAAmE,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,UAAU,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,wEAAwE,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAe,EACf,UAA2C,EAAE;IAE7C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/D,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC,CAAC;IACrF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAC1B,OAAO,EACP,8BAA8B,CAAC,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,EACnE,OAAO,CAAC,OAAO,IAAI,EAAE,CACA,CAAC;IACxB,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;QACvB,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE;YACpC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAc;IACjD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,0BAA0B,EAAE,CAAC;QAC3E,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,SAAS,GAAG,KAAoC,CAAC;IACvD,OAAO,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACvF,CAAC","debugId":"5a788187-d6b2-59f2-a60d-d328db8bf9dc"}
1
+ {"version":3,"file":"errors.js","sources":["sdk/errors.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/errors\n *\n * Defines public SDK APIs and package-author helpers for Errors.\n */\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError, type PmCliErrorContext } from \"../core/shared/errors.js\";\n\n/**\n * The `Error.name` value carried by every {@link PmCliExpectedError}. The CLI's\n * top-level handler and the Sentry crash filter recognise expected errors by\n * matching this exact string rather than by `instanceof`, so an error thrown\n * from a separately bundled or linked extension is still treated as expected.\n */\nexport const PM_CLI_EXPECTED_ERROR_NAME = \"PmCliError\";\n\n/**\n * The public, class-free shape of an \"expected\" pm CLI error: a user- or\n * environment-caused failure that should exit with a specific code and be\n * excluded from crash reporting. Package authors detect it structurally with\n * {@link isPmCliExpectedError} instead of importing the internal `PmCliError`\n * class, which keeps the contract stable across bundling boundaries.\n */\nexport interface PmCliExpectedError extends Error {\n /** Discriminant tag; always {@link PM_CLI_EXPECTED_ERROR_NAME}. */\n name: typeof PM_CLI_EXPECTED_ERROR_NAME;\n /** Positive process exit code the CLI should terminate with for this failure. */\n exitCode: number;\n /** Structured, secret-free metadata attached for diagnostics and error guidance. */\n context: PmCliErrorContext;\n /** Optional underlying error that triggered this one, preserved for cause chaining. */\n cause?: unknown;\n}\n\n/**\n * Options accepted by {@link createPmCliExpectedError}. Every field is optional;\n * omitted values default to the CLI usage exit code, an empty context, and no\n * `cause`.\n */\nexport interface CreatePmCliExpectedErrorOptions {\n /** Positive exit code to assign; defaults to the usage-error code. Non-finite or non-positive values throw. */\n exitCode?: number;\n /** Structured, secret-free diagnostic metadata to attach to the error. */\n context?: PmCliErrorContext;\n /** Underlying error to retain as a non-enumerable `cause` when provided. */\n cause?: unknown;\n}\n\nfunction normalizeExpectedErrorExitCode(value: number): number {\n if (!Number.isFinite(value)) {\n throw new TypeError(\"createPmCliExpectedError options.exitCode must be a finite number\");\n }\n const normalized = Math.trunc(value);\n if (normalized <= EXIT_CODE.SUCCESS) {\n throw new TypeError(\"createPmCliExpectedError options.exitCode must be a positive exit code\");\n }\n return normalized;\n}\n\n/**\n * Create a package-safe expected CLI error.\n *\n * The CLI and Sentry filtering rely on the public error shape rather than a\n * shared class identity, so package authors can throw this from bundled,\n * linked, or separately installed extension code.\n */\nexport function createPmCliExpectedError(\n message: string,\n options: CreatePmCliExpectedErrorOptions = {},\n): PmCliExpectedError {\n if (typeof message !== \"string\" || message.trim().length === 0) {\n throw new TypeError(\"createPmCliExpectedError message must be a non-empty string\");\n }\n const error = new PmCliError(\n message,\n normalizeExpectedErrorExitCode(options.exitCode ?? EXIT_CODE.USAGE),\n options.context ?? {},\n ) as PmCliExpectedError;\n if (\"cause\" in options) {\n Object.defineProperty(error, \"cause\", {\n value: options.cause,\n enumerable: false,\n configurable: true,\n writable: true,\n });\n }\n return error;\n}\n\n/**\n * Implements check whether pm cli expected error for the public runtime surface of this module.\n */\nexport function isPmCliExpectedError(error: unknown): error is PmCliExpectedError {\n if (!(error instanceof Error) || error.name !== PM_CLI_EXPECTED_ERROR_NAME) {\n return false;\n }\n const candidate = error as Partial<PmCliExpectedError>;\n return typeof candidate.exitCode === \"number\" && Number.isFinite(candidate.exitCode);\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAA0B,MAAM,0BAA0B,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAkCvD,SAAS,8BAA8B,CAAC,KAAa;IACnD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,SAAS,CAAC,mEAAmE,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,UAAU,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,wEAAwE,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAe,EACf,UAA2C,EAAE;IAE7C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/D,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC,CAAC;IACrF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAC1B,OAAO,EACP,8BAA8B,CAAC,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,EACnE,OAAO,CAAC,OAAO,IAAI,EAAE,CACA,CAAC;IACxB,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;QACvB,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE;YACpC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAc;IACjD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,0BAA0B,EAAE,CAAC;QAC3E,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,SAAS,GAAG,KAAoC,CAAC;IACvD,OAAO,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACvF,CAAC","debugId":"a6ee83a1-a42a-5673-9cf1-c993bb149c7d"}
@@ -13,7 +13,7 @@
13
13
  * helper bodies while keeping each package's explicit field mapping in the package.
14
14
  */
15
15
 
16
- !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]="75dc8e31-81cb-5c87-93a6-b4fa03327a18")}catch(e){}}();
16
+ !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]="81e27ccf-c9bd-5eba-b4b6-bce6e95c1ce2")}catch(e){}}();
17
17
  import { appendHistoryEntry, createHistoryEntry } from "../core/history/history.js";
18
18
  import { acquireLock } from "../core/lock/lock.js";
19
19
  import { parseTags } from "../core/item/parse.js";
@@ -412,7 +412,7 @@ export async function commitImportedItem(params) {
412
412
  const historyPath = getHistoryPath(pmRoot, id);
413
413
  const beforeDocument = emptyImportedDocument();
414
414
  try {
415
- const releaseLock = await acquireLock(pmRoot, id, settings.locks.ttl_seconds, author);
415
+ const releaseLock = await acquireLock(pmRoot, id, settings.locks.ttl_seconds, author, false, settings.governance.force_required_for_stale_lock, settings.locks.wait_ms);
416
416
  try {
417
417
  await writeFileAtomic(itemPath, serializeItemDocument(document, { format: "toon" }));
418
418
  try {
@@ -466,4 +466,4 @@ export async function commitImportedItem(params) {
466
466
  }
467
467
  }
468
468
  //# sourceMappingURL=package-import-adapters.js.map
469
- //# debugId=75dc8e31-81cb-5c87-93a6-b4fa03327a18
469
+ //# debugId=81e27ccf-c9bd-5eba-b4b6-bce6e95c1ce2
@@ -1 +1 @@
1
- {"version":3,"file":"package-import-adapters.js","sources":["sdk/package-import-adapters.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared external-source import adapter primitives for bundled pm packages.\n *\n * The Beads (pm-beads) and Todos (pm-todos) importers map records from an\n * external format into pm items. The field-by-field mapping is intentionally\n * package-specific (different source schemas, type vocabularies, and timestamp\n * rules), but a number of value-coercion helpers and the item write/commit\n * sequence are behavior-identical across both adapters.\n *\n * These primitives are re-exported from the SDK runtime surface (`src/sdk/runtime.ts`),\n * which is the only module bundled packages are permitted to import (they load it\n * at runtime via `PM_CLI_PACKAGE_ROOT`). Centralizing them here removes copy-pasted\n * helper bodies while keeping each package's explicit field mapping in the package.\n */\n\nimport { appendHistoryEntry, createHistoryEntry } from \"../core/history/history.js\";\nimport { acquireLock } from \"../core/lock/lock.js\";\nimport { parseTags } from \"../core/item/parse.js\";\nimport { normalizeStatusInput } from \"../core/item/status.js\";\nimport { serializeItemDocument } from \"../core/item/item-format.js\";\nimport { getHistoryPath, getSettingsPath } from \"../core/store/paths.js\";\nimport { pathExists, removeFileIfExists, writeFileAtomic } from \"../core/fs/fs-utils.js\";\nimport { runActiveOnWriteHooks } from \"../core/extensions/index.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { nowIso } from \"../core/shared/time.js\";\nimport type {\n Dependency,\n ConfidenceTextLevel,\n ItemDocument,\n ItemMetadata,\n ItemStatus,\n LinkedDoc,\n LinkedFile,\n LinkedTest,\n LogNote,\n PmSettings,\n} from \"../types/index.js\";\n\n/**\n * Restricts shared import priority values accepted by import adapters.\n */\nexport type ImportPriorityValue = 0 | 1 | 2 | 3 | 4;\n\n/**\n * Restricts import linked-artifact scopes accepted by bundled package adapters.\n */\nexport type ImportLinkedScope = \"project\" | \"global\";\n\n/**\n * Configures conversion of loosely shaped source comments into pm log entries.\n */\nexport interface ToImportLogEntriesOptions {\n fallbackCreatedAt: string;\n fallbackAuthor: string;\n allowScalar?: boolean;\n textKeys?: readonly string[];\n createdAtKey?: string;\n authorKey?: string;\n toIsoString?: (value: unknown) => string | undefined;\n}\n\n/**\n * Configures conversion of loosely shaped source file/doc arrays into pm linked artifacts.\n */\nexport interface ToImportLinkedArtifactsOptions {\n allowScalar?: boolean;\n pathKeys?: readonly string[];\n}\n\n/**\n * Configures conversion of loosely shaped source test arrays into pm linked tests.\n */\nexport interface ToImportLinkedTestsOptions {\n allowScalar?: boolean;\n commandKeys?: readonly string[];\n pathKeys?: readonly string[];\n requireCommand?: boolean;\n includeExtendedAssertions?: boolean;\n integerTimeout?: boolean;\n timeoutMinimum?: number;\n timeoutExclusiveMinimum?: boolean;\n}\n\n/**\n * Returns the trimmed string when `value` is a non-empty string, else undefined.\n */\nexport function toNonEmptyImportString(value: unknown): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\n/**\n * Coerces a non-negative finite numeric estimate (number or numeric string).\n */\nexport function toEstimatedMinutesValue(value: unknown): number | undefined {\n if (typeof value === \"number\" && Number.isFinite(value) && value >= 0) {\n return value;\n }\n if (typeof value === \"string\" && value.trim().length > 0) {\n const parsed = Number(value);\n if (Number.isFinite(parsed) && parsed >= 0) {\n return parsed;\n }\n }\n return undefined;\n}\n\n/**\n * Coerces a priority into the 0..4 range, defaulting to 2.\n */\nexport function toImportPriority(value: unknown): ImportPriorityValue {\n if (typeof value === \"number\" && Number.isInteger(value) && value >= 0 && value <= 4) {\n return value as ImportPriorityValue;\n }\n if (typeof value === \"string\" && value.trim().length > 0) {\n const parsed = Number(value);\n if (Number.isInteger(parsed) && parsed >= 0 && parsed <= 4) {\n return parsed as ImportPriorityValue;\n }\n }\n return 2;\n}\n\n/**\n * Normalizes tags from an array of strings or a comma-separated string.\n */\nexport function toImportTags(value: unknown): string[] {\n if (Array.isArray(value)) {\n const tags = value\n .filter((entry): entry is string => typeof entry === \"string\")\n .map((entry) => entry.trim().toLowerCase())\n .filter((entry) => entry.length > 0);\n return Array.from(new Set(tags)).sort((left, right) => left.localeCompare(right));\n }\n if (typeof value === \"string\") {\n return parseTags(value);\n }\n return [];\n}\n\n/**\n * Maps a raw status value to a canonical pm status, defaulting to \"open\".\n */\nexport function toImportStatus(value: unknown): ItemStatus {\n const normalized = toNonEmptyImportString(value);\n if (normalized) {\n const canonical = normalizeStatusInput(normalized);\n if (canonical) {\n return canonical;\n }\n }\n return \"open\";\n}\n\n/**\n * Coerces a finite integer from a number or non-empty numeric string.\n */\nexport function toImportInteger(value: unknown): number | undefined {\n if (typeof value === \"number\" && Number.isInteger(value)) {\n return value;\n }\n if (typeof value !== \"string\" || value.trim().length === 0) {\n return undefined;\n }\n const parsed = Number(value);\n return Number.isInteger(parsed) ? parsed : undefined;\n}\n\n/**\n * Coerces common boolean representations used by external package formats.\n */\nexport function toImportBoolean(value: unknown): boolean | undefined {\n if (typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"number\") {\n return value === 1 ? true : value === 0 ? false : undefined;\n }\n if (typeof value !== \"string\") {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if (normalized === \"true\" || normalized === \"1\") {\n return true;\n }\n return normalized === \"false\" || normalized === \"0\" ? false : undefined;\n}\n\n/**\n * Coerces an array of non-empty strings.\n */\nexport function toImportStringList(value: unknown): string[] | undefined {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const entries = value\n .map((entry) => toNonEmptyImportString(entry))\n .filter((entry): entry is string => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * Coerces a record of non-empty string values.\n */\nexport function toImportStringMap(value: unknown): Record<string, string> | undefined {\n return toImportValueMap(value, toNonEmptyImportString);\n}\n\n/**\n * Coerces a record of finite numeric values.\n */\nexport function toImportNumberMap(value: unknown): Record<string, number> | undefined {\n return toImportValueMap(value, toImportFiniteNumber);\n}\n\n/**\n * Maps a loose source confidence value onto pm's confidence field.\n */\nexport function toImportConfidence(\n value: unknown,\n allowedTextValues: readonly ConfidenceTextLevel[],\n): ItemMetadata[\"confidence\"] | undefined {\n if (typeof value === \"number\" && Number.isInteger(value) && value >= 0 && value <= 100) {\n return value;\n }\n const normalized = toNonEmptyImportString(value)?.toLowerCase();\n if (!normalized) {\n return undefined;\n }\n const candidate = normalized === \"med\" ? \"medium\" : normalized;\n if (allowedTextValues.some((entry) => entry === candidate)) {\n return candidate as ConfidenceTextLevel;\n }\n const parsed = Number(candidate);\n return Number.isInteger(parsed) && parsed >= 0 && parsed <= 100 ? parsed : undefined;\n}\n\n/**\n * Maps a string onto an allowed enum value, including the common \"med\" alias.\n */\nexport function toImportNormalizedEnum<T extends readonly string[]>(\n value: unknown,\n allowed: T,\n): T[number] | undefined {\n const normalized = toNonEmptyImportString(value)?.toLowerCase();\n if (!normalized) {\n return undefined;\n }\n const candidate = normalized === \"med\" ? \"medium\" : normalized;\n return allowed.includes(candidate as T[number]) ? (candidate as T[number]) : undefined;\n}\n\n/**\n * Resolves pm linked-artifact scope values, defaulting to project scope.\n */\nexport function toImportLinkScope(value: unknown): ImportLinkedScope {\n return toNonEmptyImportString(value)?.toLowerCase() === \"global\" ? \"global\" : \"project\";\n}\n\n/**\n * Converts source comments, notes, or learnings into pm log notes.\n */\nexport function toImportLogEntries(value: unknown, options: ToImportLogEntriesOptions): LogNote[] | undefined {\n const values = normalizeImportCollection(value, options.allowScalar === true);\n if (!values) {\n return undefined;\n }\n const entries = values\n .map((entry) => toImportLogEntry(entry, options))\n .filter((entry): entry is LogNote => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * Converts source file artifacts into pm linked files.\n */\nexport function toImportLinkedFiles(value: unknown, options: ToImportLinkedArtifactsOptions = {}): LinkedFile[] | undefined {\n return toImportLinkedArtifacts(value, options, (pathValue, record) => ({\n path: pathValue,\n scope: toImportLinkScope(record?.scope),\n note: toNonEmptyImportString(record?.note),\n }));\n}\n\n/**\n * Converts source doc artifacts into pm linked docs.\n */\nexport function toImportLinkedDocs(value: unknown, options: ToImportLinkedArtifactsOptions = {}): LinkedDoc[] | undefined {\n return toImportLinkedArtifacts(value, options, (pathValue, record) => ({\n path: pathValue,\n scope: toImportLinkScope(record?.scope),\n note: toNonEmptyImportString(record?.note),\n }));\n}\n\n/**\n * Converts source test artifacts into pm linked tests.\n */\nexport function toImportLinkedTests(value: unknown, options: ToImportLinkedTestsOptions = {}): LinkedTest[] | undefined {\n const values = normalizeImportCollection(value, options.allowScalar === true);\n if (!values) {\n return undefined;\n }\n const entries = values\n .map((entry) => toImportLinkedTest(entry, options))\n .filter((entry): entry is LinkedTest => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * Resolves the effective import author: explicit flag, PM_AUTHOR, then settings,\n * falling back to \"unknown\".\n */\nexport function selectImportAuthor(explicitAuthor: string | undefined, settingsAuthor: string): string {\n const explicit = explicitAuthor?.trim();\n if (explicit && explicit.length > 0) {\n return explicit;\n }\n const envAuthor = process.env.PM_AUTHOR?.trim();\n if (envAuthor && envAuthor.length > 0) {\n return envAuthor;\n }\n const settings = settingsAuthor.trim();\n return settings.length > 0 ? settings : \"unknown\";\n}\n\nfunction isImportRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction normalizeImportCollection(value: unknown, allowScalar: boolean): unknown[] | undefined {\n if (Array.isArray(value)) {\n return value;\n }\n return allowScalar ? [value] : undefined;\n}\n\nfunction firstNonEmptyImportString(record: Record<string, unknown>, keys: readonly string[]): string | undefined {\n for (const key of keys) {\n const value = toNonEmptyImportString(record[key]);\n if (value) {\n return value;\n }\n }\n return undefined;\n}\n\nfunction toImportValueMap<T>(\n value: unknown,\n coerce: (entryValue: unknown) => T | undefined,\n): Record<string, T> | undefined {\n if (!isImportRecord(value)) {\n return undefined;\n }\n const entries = Object.entries(value)\n .map(([key, entryValue]) => [key.trim(), coerce(entryValue)] as const)\n .filter((entry): entry is readonly [string, T] => entry[0].length > 0 && entry[1] !== undefined);\n return entries.length > 0 ? Object.fromEntries(entries) : undefined;\n}\n\nfunction toImportLogEntry(entry: unknown, options: ToImportLogEntriesOptions): LogNote | undefined {\n if (typeof entry === \"string\") {\n return toImportLogEntryFromText(entry, options);\n }\n if (!isImportRecord(entry)) {\n return undefined;\n }\n const text = firstNonEmptyImportString(entry, options.textKeys ?? [\"text\"]);\n if (!text) {\n return undefined;\n }\n const createdAtKey = options.createdAtKey ?? \"created_at\";\n const authorKey = options.authorKey ?? \"author\";\n const createdAt =\n (options.toIsoString ? options.toIsoString(entry[createdAtKey]) : toNonEmptyImportString(entry[createdAtKey])) ??\n options.fallbackCreatedAt;\n return {\n created_at: createdAt,\n author: toNonEmptyImportString(entry[authorKey]) ?? options.fallbackAuthor,\n text,\n };\n}\n\nfunction toImportLogEntryFromText(entry: string, options: ToImportLogEntriesOptions): LogNote | undefined {\n const text = toNonEmptyImportString(entry);\n return text\n ? {\n created_at: options.fallbackCreatedAt,\n author: options.fallbackAuthor,\n text,\n }\n : undefined;\n}\n\nfunction toImportLinkedArtifacts<T>(\n value: unknown,\n options: ToImportLinkedArtifactsOptions,\n build: (pathValue: string, record?: Record<string, unknown>) => T,\n): T[] | undefined {\n const values = normalizeImportCollection(value, options.allowScalar === true);\n if (!values) {\n return undefined;\n }\n const pathKeys = options.pathKeys ?? [\"path\"];\n const entries = values\n .map((entry) => toImportLinkedArtifact(entry, pathKeys, build))\n .filter((entry): entry is T => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\nfunction toImportLinkedArtifact<T>(\n entry: unknown,\n pathKeys: readonly string[],\n build: (pathValue: string, record?: Record<string, unknown>) => T,\n): T | undefined {\n if (typeof entry === \"string\") {\n const pathValue = toNonEmptyImportString(entry);\n return pathValue ? build(pathValue) : undefined;\n }\n if (!isImportRecord(entry)) {\n return undefined;\n }\n const pathValue = firstNonEmptyImportString(entry, pathKeys);\n return pathValue ? build(pathValue, entry) : undefined;\n}\n\nfunction toImportLinkedTest(entry: unknown, options: ToImportLinkedTestsOptions): LinkedTest | undefined {\n if (typeof entry === \"string\") {\n const command = toNonEmptyImportString(entry);\n return command ? { command, scope: \"project\" } : undefined;\n }\n if (!isImportRecord(entry)) {\n return undefined;\n }\n const command = firstNonEmptyImportString(entry, options.commandKeys ?? [\"command\"]);\n const testPath = firstNonEmptyImportString(entry, options.pathKeys ?? [\"path\"]);\n if (!command && (options.requireCommand === true || !testPath)) {\n return undefined;\n }\n return {\n ...(command ? { command } : {}),\n ...(testPath ? { path: testPath } : {}),\n scope: toImportLinkScope(entry.scope),\n timeout_seconds: toImportLinkedTestTimeout(entry.timeout_seconds, options),\n note: toNonEmptyImportString(entry.note),\n ...(options.includeExtendedAssertions === true ? toImportLinkedTestAssertions(entry) : {}),\n };\n}\n\nfunction toImportLinkedTestTimeout(value: unknown, options: ToImportLinkedTestsOptions): number | undefined {\n const parsed = options.integerTimeout === true ? toImportInteger(value) : toImportFiniteNumber(value);\n if (parsed === undefined) {\n return undefined;\n }\n const minimum = options.timeoutMinimum ?? 0;\n return options.timeoutExclusiveMinimum === true ? (parsed > minimum ? parsed : undefined) : parsed >= minimum ? parsed : undefined;\n}\n\nfunction toImportFiniteNumber(value: unknown): number | undefined {\n if (typeof value === \"number\" && Number.isFinite(value)) {\n return value;\n }\n if (typeof value !== \"string\" || value.trim().length === 0) {\n return undefined;\n }\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction toImportLinkedTestAssertions(entry: Record<string, unknown>): Partial<LinkedTest> {\n return {\n pm_context_mode: toImportNormalizedEnum(entry.pm_context_mode, [\"schema\", \"tracker\", \"auto\"] as const),\n env_set: toImportStringMap(entry.env_set),\n env_clear: toImportStringList(entry.env_clear),\n shared_host_safe: toImportBoolean(entry.shared_host_safe),\n assert_stdout_contains: toImportStringList(entry.assert_stdout_contains),\n assert_stdout_regex: toImportStringList(entry.assert_stdout_regex),\n assert_stderr_contains: toImportStringList(entry.assert_stderr_contains),\n assert_stderr_regex: toImportStringList(entry.assert_stderr_regex),\n assert_stdout_min_lines: toImportInteger(entry.assert_stdout_min_lines),\n assert_json_field_equals: toImportStringMap(entry.assert_json_field_equals),\n assert_json_field_gte: toImportNumberMap(entry.assert_json_field_gte),\n };\n}\n\n/**\n * Throws a NOT_FOUND PmCliError when the tracker has not been initialized.\n */\nexport async function ensureTrackerInitialized(pmRoot: string): Promise<void> {\n const exists = await pathExists(getSettingsPath(pmRoot));\n if (!exists) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n}\n\n/**\n * Returns an empty item document used as the `before` state on import.\n */\nexport function emptyImportedDocument(): ItemDocument {\n return {\n metadata: {} as ItemMetadata,\n body: \"\",\n };\n}\n\n/**\n * Documents the commit imported item params payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommitImportedItemParams {\n pmRoot: string;\n id: string;\n itemPath: string;\n document: ItemDocument;\n author: string;\n message: string;\n settings: PmSettings;\n /** Warning prefix emitted on a lock conflict, e.g. \"beads_import_lock_conflict\". */\n conflictWarningPrefix: string;\n}\n\n/**\n * Restricts commit imported item result values accepted by command, SDK, and storage contracts.\n */\nexport type CommitImportedItemResult =\n | { committed: true; writeWarnings: string[] }\n | { committed: false; conflictWarning: string };\n\n/**\n * Performs the shared item write/commit sequence: acquire the per-item lock,\n * atomically write the TOON document, append the import history entry, and run\n * on-write hooks. On a lock CONFLICT it returns a `conflictWarning` (using the\n * caller-supplied prefix) instead of throwing; any other error removes the\n * partially written file and rethrows.\n */\nexport async function commitImportedItem(\n params: CommitImportedItemParams,\n): Promise<CommitImportedItemResult> {\n const { pmRoot, id, itemPath, document, author, message, settings, conflictWarningPrefix } = params;\n const historyPath = getHistoryPath(pmRoot, id);\n const beforeDocument = emptyImportedDocument();\n try {\n const releaseLock = await acquireLock(pmRoot, id, settings.locks.ttl_seconds, author);\n try {\n await writeFileAtomic(itemPath, serializeItemDocument(document, { format: \"toon\" }));\n try {\n const entry = createHistoryEntry({\n nowIso: nowIso(),\n author,\n op: \"import\",\n before: beforeDocument,\n after: document,\n message,\n });\n await appendHistoryEntry(historyPath, entry);\n const writeWarnings = [\n ...(await runActiveOnWriteHooks({\n path: itemPath,\n scope: \"project\",\n op: \"import\",\n item_id: document.metadata.id,\n item_type: document.metadata.type,\n before: beforeDocument,\n after: document,\n changed_fields: [\"imported\"],\n })),\n ...(await runActiveOnWriteHooks({\n path: historyPath,\n scope: \"project\",\n op: \"import:history\",\n item_id: document.metadata.id,\n item_type: document.metadata.type,\n before: beforeDocument,\n after: document,\n changed_fields: [\"imported\"],\n })),\n ];\n return { committed: true, writeWarnings };\n } catch (error: unknown) {\n await removeFileIfExists(itemPath);\n throw error;\n }\n } finally {\n await releaseLock();\n }\n } catch (error: unknown) {\n if (error instanceof PmCliError && error.exitCode === EXIT_CODE.CONFLICT) {\n return { committed: false, conflictWarning: `${conflictW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IAAI,EAAE,WAAW;wBACjB,KAAK,EAAE,SAAS;wBAChB,EAAE,EAAE,gBAAgB;wBACpB,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;wBAC7B,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI;wBACjC,MAAM,EAAE,cAAc;wBACtB,KAAK,EAAE,QAAQ;wBACf,cAAc,EAAE,CAAC,UAAU,CAAC;qBAC7B,CAAC,CAAC;iBACJ,CAAC;gBACF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;YAC5C,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACxB,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC;gBACnC,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,MAAM,WAAW,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,IAAI,KAAK,YAAY,UAAU,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE,CAAC;YACzE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,qBAAqB,IAAI,EAAE,EAAE,EAAE,CAAC;QACjF,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","debugId":"75dc8e31-81cb-5c87-93a6-b4fa03327a18"}
1
+ {"version":3,"file":"package-import-adapters.js","sources":["sdk/package-import-adapters.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared external-source import adapter primitives for bundled pm packages.\n *\n * The Beads (pm-beads) and Todos (pm-todos) importers map records from an\n * external format into pm items. The field-by-field mapping is intentionally\n * package-specific (different source schemas, type vocabularies, and timestamp\n * rules), but a number of value-coercion helpers and the item write/commit\n * sequence are behavior-identical across both adapters.\n *\n * These primitives are re-exported from the SDK runtime surface (`src/sdk/runtime.ts`),\n * which is the only module bundled packages are permitted to import (they load it\n * at runtime via `PM_CLI_PACKAGE_ROOT`). Centralizing them here removes copy-pasted\n * helper bodies while keeping each package's explicit field mapping in the package.\n */\n\nimport { appendHistoryEntry, createHistoryEntry } from \"../core/history/history.js\";\nimport { acquireLock } from \"../core/lock/lock.js\";\nimport { parseTags } from \"../core/item/parse.js\";\nimport { normalizeStatusInput } from \"../core/item/status.js\";\nimport { serializeItemDocument } from \"../core/item/item-format.js\";\nimport { getHistoryPath, getSettingsPath } from \"../core/store/paths.js\";\nimport { pathExists, removeFileIfExists, writeFileAtomic } from \"../core/fs/fs-utils.js\";\nimport { runActiveOnWriteHooks } from \"../core/extensions/index.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { nowIso } from \"../core/shared/time.js\";\nimport type {\n Dependency,\n ConfidenceTextLevel,\n ItemDocument,\n ItemMetadata,\n ItemStatus,\n LinkedDoc,\n LinkedFile,\n LinkedTest,\n LogNote,\n PmSettings,\n} from \"../types/index.js\";\n\n/**\n * Restricts shared import priority values accepted by import adapters.\n */\nexport type ImportPriorityValue = 0 | 1 | 2 | 3 | 4;\n\n/**\n * Restricts import linked-artifact scopes accepted by bundled package adapters.\n */\nexport type ImportLinkedScope = \"project\" | \"global\";\n\n/**\n * Configures conversion of loosely shaped source comments into pm log entries.\n */\nexport interface ToImportLogEntriesOptions {\n fallbackCreatedAt: string;\n fallbackAuthor: string;\n allowScalar?: boolean;\n textKeys?: readonly string[];\n createdAtKey?: string;\n authorKey?: string;\n toIsoString?: (value: unknown) => string | undefined;\n}\n\n/**\n * Configures conversion of loosely shaped source file/doc arrays into pm linked artifacts.\n */\nexport interface ToImportLinkedArtifactsOptions {\n allowScalar?: boolean;\n pathKeys?: readonly string[];\n}\n\n/**\n * Configures conversion of loosely shaped source test arrays into pm linked tests.\n */\nexport interface ToImportLinkedTestsOptions {\n allowScalar?: boolean;\n commandKeys?: readonly string[];\n pathKeys?: readonly string[];\n requireCommand?: boolean;\n includeExtendedAssertions?: boolean;\n integerTimeout?: boolean;\n timeoutMinimum?: number;\n timeoutExclusiveMinimum?: boolean;\n}\n\n/**\n * Returns the trimmed string when `value` is a non-empty string, else undefined.\n */\nexport function toNonEmptyImportString(value: unknown): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\n/**\n * Coerces a non-negative finite numeric estimate (number or numeric string).\n */\nexport function toEstimatedMinutesValue(value: unknown): number | undefined {\n if (typeof value === \"number\" && Number.isFinite(value) && value >= 0) {\n return value;\n }\n if (typeof value === \"string\" && value.trim().length > 0) {\n const parsed = Number(value);\n if (Number.isFinite(parsed) && parsed >= 0) {\n return parsed;\n }\n }\n return undefined;\n}\n\n/**\n * Coerces a priority into the 0..4 range, defaulting to 2.\n */\nexport function toImportPriority(value: unknown): ImportPriorityValue {\n if (typeof value === \"number\" && Number.isInteger(value) && value >= 0 && value <= 4) {\n return value as ImportPriorityValue;\n }\n if (typeof value === \"string\" && value.trim().length > 0) {\n const parsed = Number(value);\n if (Number.isInteger(parsed) && parsed >= 0 && parsed <= 4) {\n return parsed as ImportPriorityValue;\n }\n }\n return 2;\n}\n\n/**\n * Normalizes tags from an array of strings or a comma-separated string.\n */\nexport function toImportTags(value: unknown): string[] {\n if (Array.isArray(value)) {\n const tags = value\n .filter((entry): entry is string => typeof entry === \"string\")\n .map((entry) => entry.trim().toLowerCase())\n .filter((entry) => entry.length > 0);\n return Array.from(new Set(tags)).sort((left, right) => left.localeCompare(right));\n }\n if (typeof value === \"string\") {\n return parseTags(value);\n }\n return [];\n}\n\n/**\n * Maps a raw status value to a canonical pm status, defaulting to \"open\".\n */\nexport function toImportStatus(value: unknown): ItemStatus {\n const normalized = toNonEmptyImportString(value);\n if (normalized) {\n const canonical = normalizeStatusInput(normalized);\n if (canonical) {\n return canonical;\n }\n }\n return \"open\";\n}\n\n/**\n * Coerces a finite integer from a number or non-empty numeric string.\n */\nexport function toImportInteger(value: unknown): number | undefined {\n if (typeof value === \"number\" && Number.isInteger(value)) {\n return value;\n }\n if (typeof value !== \"string\" || value.trim().length === 0) {\n return undefined;\n }\n const parsed = Number(value);\n return Number.isInteger(parsed) ? parsed : undefined;\n}\n\n/**\n * Coerces common boolean representations used by external package formats.\n */\nexport function toImportBoolean(value: unknown): boolean | undefined {\n if (typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"number\") {\n return value === 1 ? true : value === 0 ? false : undefined;\n }\n if (typeof value !== \"string\") {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if (normalized === \"true\" || normalized === \"1\") {\n return true;\n }\n return normalized === \"false\" || normalized === \"0\" ? false : undefined;\n}\n\n/**\n * Coerces an array of non-empty strings.\n */\nexport function toImportStringList(value: unknown): string[] | undefined {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const entries = value\n .map((entry) => toNonEmptyImportString(entry))\n .filter((entry): entry is string => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * Coerces a record of non-empty string values.\n */\nexport function toImportStringMap(value: unknown): Record<string, string> | undefined {\n return toImportValueMap(value, toNonEmptyImportString);\n}\n\n/**\n * Coerces a record of finite numeric values.\n */\nexport function toImportNumberMap(value: unknown): Record<string, number> | undefined {\n return toImportValueMap(value, toImportFiniteNumber);\n}\n\n/**\n * Maps a loose source confidence value onto pm's confidence field.\n */\nexport function toImportConfidence(\n value: unknown,\n allowedTextValues: readonly ConfidenceTextLevel[],\n): ItemMetadata[\"confidence\"] | undefined {\n if (typeof value === \"number\" && Number.isInteger(value) && value >= 0 && value <= 100) {\n return value;\n }\n const normalized = toNonEmptyImportString(value)?.toLowerCase();\n if (!normalized) {\n return undefined;\n }\n const candidate = normalized === \"med\" ? \"medium\" : normalized;\n if (allowedTextValues.some((entry) => entry === candidate)) {\n return candidate as ConfidenceTextLevel;\n }\n const parsed = Number(candidate);\n return Number.isInteger(parsed) && parsed >= 0 && parsed <= 100 ? parsed : undefined;\n}\n\n/**\n * Maps a string onto an allowed enum value, including the common \"med\" alias.\n */\nexport function toImportNormalizedEnum<T extends readonly string[]>(\n value: unknown,\n allowed: T,\n): T[number] | undefined {\n const normalized = toNonEmptyImportString(value)?.toLowerCase();\n if (!normalized) {\n return undefined;\n }\n const candidate = normalized === \"med\" ? \"medium\" : normalized;\n return allowed.includes(candidate as T[number]) ? (candidate as T[number]) : undefined;\n}\n\n/**\n * Resolves pm linked-artifact scope values, defaulting to project scope.\n */\nexport function toImportLinkScope(value: unknown): ImportLinkedScope {\n return toNonEmptyImportString(value)?.toLowerCase() === \"global\" ? \"global\" : \"project\";\n}\n\n/**\n * Converts source comments, notes, or learnings into pm log notes.\n */\nexport function toImportLogEntries(value: unknown, options: ToImportLogEntriesOptions): LogNote[] | undefined {\n const values = normalizeImportCollection(value, options.allowScalar === true);\n if (!values) {\n return undefined;\n }\n const entries = values\n .map((entry) => toImportLogEntry(entry, options))\n .filter((entry): entry is LogNote => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * Converts source file artifacts into pm linked files.\n */\nexport function toImportLinkedFiles(value: unknown, options: ToImportLinkedArtifactsOptions = {}): LinkedFile[] | undefined {\n return toImportLinkedArtifacts(value, options, (pathValue, record) => ({\n path: pathValue,\n scope: toImportLinkScope(record?.scope),\n note: toNonEmptyImportString(record?.note),\n }));\n}\n\n/**\n * Converts source doc artifacts into pm linked docs.\n */\nexport function toImportLinkedDocs(value: unknown, options: ToImportLinkedArtifactsOptions = {}): LinkedDoc[] | undefined {\n return toImportLinkedArtifacts(value, options, (pathValue, record) => ({\n path: pathValue,\n scope: toImportLinkScope(record?.scope),\n note: toNonEmptyImportString(record?.note),\n }));\n}\n\n/**\n * Converts source test artifacts into pm linked tests.\n */\nexport function toImportLinkedTests(value: unknown, options: ToImportLinkedTestsOptions = {}): LinkedTest[] | undefined {\n const values = normalizeImportCollection(value, options.allowScalar === true);\n if (!values) {\n return undefined;\n }\n const entries = values\n .map((entry) => toImportLinkedTest(entry, options))\n .filter((entry): entry is LinkedTest => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * Resolves the effective import author: explicit flag, PM_AUTHOR, then settings,\n * falling back to \"unknown\".\n */\nexport function selectImportAuthor(explicitAuthor: string | undefined, settingsAuthor: string): string {\n const explicit = explicitAuthor?.trim();\n if (explicit && explicit.length > 0) {\n return explicit;\n }\n const envAuthor = process.env.PM_AUTHOR?.trim();\n if (envAuthor && envAuthor.length > 0) {\n return envAuthor;\n }\n const settings = settingsAuthor.trim();\n return settings.length > 0 ? settings : \"unknown\";\n}\n\nfunction isImportRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction normalizeImportCollection(value: unknown, allowScalar: boolean): unknown[] | undefined {\n if (Array.isArray(value)) {\n return value;\n }\n return allowScalar ? [value] : undefined;\n}\n\nfunction firstNonEmptyImportString(record: Record<string, unknown>, keys: readonly string[]): string | undefined {\n for (const key of keys) {\n const value = toNonEmptyImportString(record[key]);\n if (value) {\n return value;\n }\n }\n return undefined;\n}\n\nfunction toImportValueMap<T>(\n value: unknown,\n coerce: (entryValue: unknown) => T | undefined,\n): Record<string, T> | undefined {\n if (!isImportRecord(value)) {\n return undefined;\n }\n const entries = Object.entries(value)\n .map(([key, entryValue]) => [key.trim(), coerce(entryValue)] as const)\n .filter((entry): entry is readonly [string, T] => entry[0].length > 0 && entry[1] !== undefined);\n return entries.length > 0 ? Object.fromEntries(entries) : undefined;\n}\n\nfunction toImportLogEntry(entry: unknown, options: ToImportLogEntriesOptions): LogNote | undefined {\n if (typeof entry === \"string\") {\n return toImportLogEntryFromText(entry, options);\n }\n if (!isImportRecord(entry)) {\n return undefined;\n }\n const text = firstNonEmptyImportString(entry, options.textKeys ?? [\"text\"]);\n if (!text) {\n return undefined;\n }\n const createdAtKey = options.createdAtKey ?? \"created_at\";\n const authorKey = options.authorKey ?? \"author\";\n const createdAt =\n (options.toIsoString ? options.toIsoString(entry[createdAtKey]) : toNonEmptyImportString(entry[createdAtKey])) ??\n options.fallbackCreatedAt;\n return {\n created_at: createdAt,\n author: toNonEmptyImportString(entry[authorKey]) ?? options.fallbackAuthor,\n text,\n };\n}\n\nfunction toImportLogEntryFromText(entry: string, options: ToImportLogEntriesOptions): LogNote | undefined {\n const text = toNonEmptyImportString(entry);\n return text\n ? {\n created_at: options.fallbackCreatedAt,\n author: options.fallbackAuthor,\n text,\n }\n : undefined;\n}\n\nfunction toImportLinkedArtifacts<T>(\n value: unknown,\n options: ToImportLinkedArtifactsOptions,\n build: (pathValue: string, record?: Record<string, unknown>) => T,\n): T[] | undefined {\n const values = normalizeImportCollection(value, options.allowScalar === true);\n if (!values) {\n return undefined;\n }\n const pathKeys = options.pathKeys ?? [\"path\"];\n const entries = values\n .map((entry) => toImportLinkedArtifact(entry, pathKeys, build))\n .filter((entry): entry is T => entry !== undefined);\n return entries.length > 0 ? entries : undefined;\n}\n\nfunction toImportLinkedArtifact<T>(\n entry: unknown,\n pathKeys: readonly string[],\n build: (pathValue: string, record?: Record<string, unknown>) => T,\n): T | undefined {\n if (typeof entry === \"string\") {\n const pathValue = toNonEmptyImportString(entry);\n return pathValue ? build(pathValue) : undefined;\n }\n if (!isImportRecord(entry)) {\n return undefined;\n }\n const pathValue = firstNonEmptyImportString(entry, pathKeys);\n return pathValue ? build(pathValue, entry) : undefined;\n}\n\nfunction toImportLinkedTest(entry: unknown, options: ToImportLinkedTestsOptions): LinkedTest | undefined {\n if (typeof entry === \"string\") {\n const command = toNonEmptyImportString(entry);\n return command ? { command, scope: \"project\" } : undefined;\n }\n if (!isImportRecord(entry)) {\n return undefined;\n }\n const command = firstNonEmptyImportString(entry, options.commandKeys ?? [\"command\"]);\n const testPath = firstNonEmptyImportString(entry, options.pathKeys ?? [\"path\"]);\n if (!command && (options.requireCommand === true || !testPath)) {\n return undefined;\n }\n return {\n ...(command ? { command } : {}),\n ...(testPath ? { path: testPath } : {}),\n scope: toImportLinkScope(entry.scope),\n timeout_seconds: toImportLinkedTestTimeout(entry.timeout_seconds, options),\n note: toNonEmptyImportString(entry.note),\n ...(options.includeExtendedAssertions === true ? toImportLinkedTestAssertions(entry) : {}),\n };\n}\n\nfunction toImportLinkedTestTimeout(value: unknown, options: ToImportLinkedTestsOptions): number | undefined {\n const parsed = options.integerTimeout === true ? toImportInteger(value) : toImportFiniteNumber(value);\n if (parsed === undefined) {\n return undefined;\n }\n const minimum = options.timeoutMinimum ?? 0;\n return options.timeoutExclusiveMinimum === true ? (parsed > minimum ? parsed : undefined) : parsed >= minimum ? parsed : undefined;\n}\n\nfunction toImportFiniteNumber(value: unknown): number | undefined {\n if (typeof value === \"number\" && Number.isFinite(value)) {\n return value;\n }\n if (typeof value !== \"string\" || value.trim().length === 0) {\n return undefined;\n }\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction toImportLinkedTestAssertions(entry: Record<string, unknown>): Partial<LinkedTest> {\n return {\n pm_context_mode: toImportNormalizedEnum(entry.pm_context_mode, [\"schema\", \"tracker\", \"auto\"] as const),\n env_set: toImportStringMap(entry.env_set),\n env_clear: toImportStringList(entry.env_clear),\n shared_host_safe: toImportBoolean(entry.shared_host_safe),\n assert_stdout_contains: toImportStringList(entry.assert_stdout_contains),\n assert_stdout_regex: toImportStringList(entry.assert_stdout_regex),\n assert_stderr_contains: toImportStringList(entry.assert_stderr_contains),\n assert_stderr_regex: toImportStringList(entry.assert_stderr_regex),\n assert_stdout_min_lines: toImportInteger(entry.assert_stdout_min_lines),\n assert_json_field_equals: toImportStringMap(entry.assert_json_field_equals),\n assert_json_field_gte: toImportNumberMap(entry.assert_json_field_gte),\n };\n}\n\n/**\n * Throws a NOT_FOUND PmCliError when the tracker has not been initialized.\n */\nexport async function ensureTrackerInitialized(pmRoot: string): Promise<void> {\n const exists = await pathExists(getSettingsPath(pmRoot));\n if (!exists) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n}\n\n/**\n * Returns an empty item document used as the `before` state on import.\n */\nexport function emptyImportedDocument(): ItemDocument {\n return {\n metadata: {} as ItemMetadata,\n body: \"\",\n };\n}\n\n/**\n * Documents the commit imported item params payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommitImportedItemParams {\n pmRoot: string;\n id: string;\n itemPath: string;\n document: ItemDocument;\n author: string;\n message: string;\n settings: PmSettings;\n /** Warning prefix emitted on a lock conflict, e.g. \"beads_import_lock_conflict\". */\n conflictWarningPrefix: string;\n}\n\n/**\n * Restricts commit imported item result values accepted by command, SDK, and storage contracts.\n */\nexport type CommitImportedItemResult =\n | { committed: true; writeWarnings: string[] }\n | { committed: false; conflictWarning: string };\n\n/**\n * Performs the shared item write/commit sequence: acquire the per-item lock,\n * atomically write the TOON document, append the import history entry, and run\n * on-write hooks. On a lock CONFLICT it returns a `conflictWarning` (using the\n * caller-supplied prefix) instead of throwing; any other error removes the\n * partially written file and rethrows.\n */\nexport async function commitImportedItem(\n params: CommitImportedItemParams,\n): Promise<CommitImportedItemResult> {\n const { pmRoot, id, itemPath, document, author, message, settings, conflictWarningPrefix } = params;\n const historyPath = getHistoryPath(pmRoot, id);\n const beforeDocument = emptyImportedDocument();\n try {\n const releaseLock = await acquireLock(\n pmRoot,\n id,\n settings.locks.ttl_seconds,\n author,\n false,\n settings.governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n try {\n await writeFileAtomic(itemPath, serializeItemDocument(document, { format: \"toon\" }));\n try {\n const entry = createHistoryEntry({\n nowIso: nowIso(),\n author,\n op: \"import\",\n before: beforeDocument,\n after: document,\n message,\n });\n await appendHistoryEntry(historyPath, entry);\n const writeWarnings = [\n ...(await runActiveOnWriteHooks({\n path: itemPath,\n scope: \"project\",\n op: \"import\",\n item_id: document.metadata.id,\n item_type: document.metadata.type,\n before: beforeDocument,\n after: document,\n changed_fields: [\"imported\"],\n })),\n ...(await runActiveOnWriteHooks({\n path: historyPath,\n scope: \"project\",\n op: \"import:history\",\n item_id: document.metadata.id,\n item_type: document.metadata.type,\n before: beforeDocument,\n after: document,\n changed_fields: [\"imported\"],\n })),\n ];\n return { committed: true, writeWarnings };\n } catch (error: unknown) {\n await removeFileIfExists(itemPath);\n throw error;\n }\n } finally {\n await releaseLock();\n }\n } catch (error: unknown) {\n if (error instanceof PmCliError && error.exitCode === EXIT_CODE.CONFLICT) {\n return { committed: false, conflictWarning: `${conflictWarningPrefix}:${id}` };\n }\n throw error;\n }\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;;;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AA2DhD;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACnD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAA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2"}
@@ -1,5 +1,5 @@
1
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]="ed6d712c-3892-5ee3-893c-fcbb88508ede")}catch(e){}}();
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]="fd785549-a72d-5b9c-8e0a-26513960d8dc")}catch(e){}}();
3
3
  import { activateExtensions, deactivateExtensions, runAfterCommandHooks, runBeforeCommandHooks, runCommandHandler, runCommandOverride, runOnIndexHooks, runOnReadHooks, runOnWriteHooks, runParserOverride, runPreflightOverride, runRendererOverride, runServiceOverride, } from "../core/extensions/loader.js";
4
4
  import { createDefaultExtensionGovernancePolicy } from "../core/extensions/extension-types.js";
5
5
  import { getMigrationRuntimeDefinition, resolveRegisteredSearchProvider, resolveRegisteredVectorStoreAdapter, } from "../core/extensions/runtime-registrations.js";
@@ -9,6 +9,7 @@ import { checkExtensionManifestCompatibility, describeExtensionBlueprint, lintEx
9
9
  import { describeExtensionActivation } from "../core/extensions/activation-summary.js";
10
10
  import { lintProjectProfile } from "../core/profile/profile-lint.js";
11
11
  import { renderExtensionSurfaceMarkdown } from "../core/extensions/activation-summary-markdown.js";
12
+ import { asPropertyRecord, resolveActivatablePropertyRecord } from "../core/shared/primitives.js";
12
13
  // `describeExtensionActivation` is the `describe` (enumerate-all) verb that
13
14
  // pairs with the `assert*` (verify-one) and `run*` (invoke-one) helpers below.
14
15
  // It lives in core (it walks the same registries the loader populates) and is
@@ -51,6 +52,11 @@ function sortedUnique(values) {
51
52
  return [...new Set(values)].sort((left, right) => left.localeCompare(right));
52
53
  }
53
54
  function normalizeSdkCommandName(command) {
55
+ if (typeof command !== "string") {
56
+ // Positional misuse like runRegisteredCommandForTest(activation, "name", opts)
57
+ // reaches here with `undefined` at runtime; guide instead of crashing on .trim().
58
+ throw new Error('A command name string is required. Pass it via the options object, e.g. runRegisteredCommandForTest(activation, { command: "my command" }) — positional command arguments are not supported.');
59
+ }
54
60
  return command
55
61
  .trim()
56
62
  .toLowerCase()
@@ -81,23 +87,26 @@ function collectFlagLabels(flags) {
81
87
  return labels;
82
88
  }
83
89
  function readTestExtensionManifest(module) {
84
- if (module && typeof module === "object") {
85
- const testModule = module;
86
- const manifest = testModule.manifest;
87
- if (manifest && typeof manifest === "object") {
88
- return manifest;
89
- }
90
- const defaultExport = testModule.default;
91
- const defaultManifest = defaultExport?.manifest;
92
- if (defaultManifest && typeof defaultManifest === "object") {
93
- return defaultManifest;
94
- }
95
- if (defaultExport && typeof defaultExport === "object" && ("name" in defaultExport || "capabilities" in defaultExport)) {
96
- return defaultExport;
97
- }
98
- if ("name" in testModule || "capabilities" in testModule) {
99
- return testModule;
100
- }
90
+ const moduleRecord = asPropertyRecord(module);
91
+ if (!moduleRecord) {
92
+ return {};
93
+ }
94
+ const manifest = asPropertyRecord(moduleRecord.manifest);
95
+ if (manifest) {
96
+ return manifest;
97
+ }
98
+ const defaultExport = asPropertyRecord(moduleRecord.default);
99
+ const defaultManifest = asPropertyRecord(defaultExport?.manifest);
100
+ if (defaultManifest) {
101
+ return defaultManifest;
102
+ }
103
+ if (defaultExport &&
104
+ typeof moduleRecord.default !== "function" &&
105
+ ("name" in defaultExport || "capabilities" in defaultExport)) {
106
+ return defaultExport;
107
+ }
108
+ if (typeof module !== "function" && ("name" in moduleRecord || "capabilities" in moduleRecord)) {
109
+ return moduleRecord;
101
110
  }
102
111
  return {};
103
112
  }
@@ -1164,6 +1173,18 @@ export function assertExtensionPreflight(blueprint, options = {}) {
1164
1173
  }
1165
1174
  return report;
1166
1175
  }
1176
+ /**
1177
+ * Reject obviously wrong harness input (e.g. an options object passed as the
1178
+ * module) instead of silently producing an empty activation. Mirrors the
1179
+ * loader's activatable-extension shapes: an `activate` function on the module
1180
+ * or on its default export.
1181
+ */
1182
+ function assertTestModuleHasActivateExport(module) {
1183
+ if (resolveActivatablePropertyRecord(module)) {
1184
+ return;
1185
+ }
1186
+ throw new Error("createExtensionTestHarness received a module with no activate export. Pass the extension module (with an activate(api) function on the module or its default export) as the first argument, and options second.");
1187
+ }
1167
1188
  /**
1168
1189
  * Activate one in-memory extension module and return a fluent
1169
1190
  * {@link ExtensionTestHarness} that binds every SDK testing helper to the right
@@ -1191,6 +1212,7 @@ export function assertExtensionPreflight(blueprint, options = {}) {
1191
1212
  * {@link activateExtensionForTest} directly and inspect `activation.failed`.
1192
1213
  */
1193
1214
  export async function createExtensionTestHarness(module, options = {}) {
1215
+ assertTestModuleHasActivateExport(module);
1194
1216
  const manifest = readTestExtensionManifest(module);
1195
1217
  const name = resolveTestExtensionName(manifest, options.name);
1196
1218
  const layer = options.layer ?? "project";
@@ -1317,4 +1339,4 @@ export async function createExtensionTestHarness(module, options = {}) {
1317
1339
  };
1318
1340
  }
1319
1341
  //# sourceMappingURL=testing.js.map
1320
- //# debugId=ed6d712c-3892-5ee3-893c-fcbb88508ede
1342
+ //# debugId=fd785549-a72d-5b9c-8e0a-26513960d8dc