@unbrained/pm-cli 2026.7.3 → 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 (663) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/CONTRIBUTING.md +36 -7
  3. package/README.md +1 -9
  4. package/dist/cli/commands/calendar.d.ts +3 -2
  5. package/dist/cli/commands/calendar.js +5 -5
  6. package/dist/cli/commands/calendar.js.map +1 -1
  7. package/dist/cli/commands/claim.js +17 -3
  8. package/dist/cli/commands/claim.js.map +1 -1
  9. package/dist/cli/commands/close.js +34 -16
  10. package/dist/cli/commands/close.js.map +1 -1
  11. package/dist/cli/commands/completion.js +231 -345
  12. package/dist/cli/commands/completion.js.map +1 -1
  13. package/dist/cli/commands/copy.js +3 -3
  14. package/dist/cli/commands/copy.js.map +1 -1
  15. package/dist/cli/commands/create.d.ts +9 -59
  16. package/dist/cli/commands/create.js +162 -132
  17. package/dist/cli/commands/create.js.map +1 -1
  18. package/dist/cli/commands/extension/bundled-catalog.d.ts +6 -0
  19. package/dist/cli/commands/extension/bundled-catalog.js +15 -2
  20. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  21. package/dist/cli/commands/extension/describe.d.ts +6 -3
  22. package/dist/cli/commands/extension/describe.js +21 -9
  23. package/dist/cli/commands/extension/describe.js.map +1 -1
  24. package/dist/cli/commands/extension/doctor.d.ts +0 -4
  25. package/dist/cli/commands/extension/doctor.js +3 -3
  26. package/dist/cli/commands/extension/doctor.js.map +1 -1
  27. package/dist/cli/commands/extension/scaffold.js +59 -133
  28. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  29. package/dist/cli/commands/extension/shared.d.ts +2 -7
  30. package/dist/cli/commands/extension/shared.js +4 -10
  31. package/dist/cli/commands/extension/shared.js.map +1 -1
  32. package/dist/cli/commands/extension.js +33 -8
  33. package/dist/cli/commands/extension.js.map +1 -1
  34. package/dist/cli/commands/files.js +3 -3
  35. package/dist/cli/commands/files.js.map +1 -1
  36. package/dist/cli/commands/history-compact.js +9 -18
  37. package/dist/cli/commands/history-compact.js.map +1 -1
  38. package/dist/cli/commands/history-repair.js +9 -19
  39. package/dist/cli/commands/history-repair.js.map +1 -1
  40. package/dist/cli/commands/init-agent-guidance.js +133 -97
  41. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  42. package/dist/cli/commands/init.js +3 -3
  43. package/dist/cli/commands/init.js.map +1 -1
  44. package/dist/cli/commands/item-filter-options.d.ts +2 -0
  45. package/dist/cli/commands/item-filter-options.js +2 -2
  46. package/dist/cli/commands/item-filter-options.js.map +1 -1
  47. package/dist/cli/commands/mutation-command-options.d.ts +78 -0
  48. package/dist/cli/commands/mutation-command-options.js +10 -0
  49. package/dist/cli/commands/mutation-command-options.js.map +1 -0
  50. package/dist/cli/commands/profile.js +3 -3
  51. package/dist/cli/commands/profile.js.map +1 -1
  52. package/dist/cli/commands/reindex.js +4 -4
  53. package/dist/cli/commands/reindex.js.map +1 -1
  54. package/dist/cli/commands/restore.js +3 -3
  55. package/dist/cli/commands/restore.js.map +1 -1
  56. package/dist/cli/commands/schema.js +10 -10
  57. package/dist/cli/commands/schema.js.map +1 -1
  58. package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
  59. package/dist/cli/commands/shared-unset-fields.js +31 -2
  60. package/dist/cli/commands/shared-unset-fields.js.map +1 -1
  61. package/dist/cli/commands/update.d.ts +2 -59
  62. package/dist/cli/commands/update.js +29 -98
  63. package/dist/cli/commands/update.js.map +1 -1
  64. package/dist/cli/commands/validate.js +4 -4
  65. package/dist/cli/commands/validate.js.map +1 -1
  66. package/dist/cli/error-guidance.js +107 -7
  67. package/dist/cli/error-guidance.js.map +1 -1
  68. package/dist/cli/main.d.ts +6 -2
  69. package/dist/cli/main.js +33 -12
  70. package/dist/cli/main.js.map +1 -1
  71. package/dist/cli/register-list-query.js +4 -2
  72. package/dist/cli/register-list-query.js.map +1 -1
  73. package/dist/cli/registration-helpers.js +12 -6
  74. package/dist/cli/registration-helpers.js.map +1 -1
  75. package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +18 -0
  76. package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js → activity-YKAKZTZ4.js} +11 -9
  77. package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js → aggregate-EQX2RGB7.js} +16 -13
  78. package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js.map → aggregate-EQX2RGB7.js.map} +1 -1
  79. package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js → aggregate-PEGZGJXD.js} +18 -15
  80. package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js.map → aggregate-PEGZGJXD.js.map} +1 -1
  81. package/dist/cli-bundle/chunks/{append-EZESUVJT.js → append-CZGUZ45Q.js} +11 -8
  82. package/dist/cli-bundle/chunks/{append-EZESUVJT.js.map → append-CZGUZ45Q.js.map} +1 -1
  83. package/dist/cli-bundle/chunks/{append-JFG4WQMG.js → append-NSQBCXZJ.js} +13 -10
  84. package/dist/cli-bundle/chunks/{append-JFG4WQMG.js.map → append-NSQBCXZJ.js.map} +1 -1
  85. package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +1413 -0
  86. package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js.map +1 -0
  87. package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js → chunk-3PL6LEKP.js} +16 -14
  88. package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js.map → chunk-3PL6LEKP.js.map} +1 -1
  89. package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js → chunk-3U3VEWK6.js} +277 -119
  90. package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +7 -0
  91. package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js → chunk-3Y4OESPP.js} +14 -12
  92. package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js.map → chunk-3Y4OESPP.js.map} +1 -1
  93. package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js → chunk-4LRVSBO6.js} +21 -15
  94. package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js.map +7 -0
  95. package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js → chunk-4OFLJHX6.js} +7 -5
  96. package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js.map → chunk-4OFLJHX6.js.map} +1 -1
  97. package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js → chunk-4QQ6PM7M.js} +45 -557
  98. package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js.map +7 -0
  99. package/dist/cli-bundle/chunks/{chunk-6CDCWKSX.js → chunk-53BTLLAF.js} +68 -331
  100. package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +1 -0
  101. package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js → chunk-57C2RLW5.js} +277 -112
  102. package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +1 -0
  103. package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js → chunk-5B3X4Y22.js} +52 -63
  104. package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js.map → chunk-5B3X4Y22.js.map} +3 -3
  105. package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js → chunk-5J2XPTAD.js} +10 -8
  106. package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js.map → chunk-5J2XPTAD.js.map} +1 -1
  107. package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js → chunk-5JE6SMYS.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-MHRS5FUX.js → chunk-5JZ7APJU.js} +153 -108
  109. package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js.map +1 -0
  110. package/dist/cli-bundle/chunks/{chunk-KHVGM5CS.js → chunk-5VVUKE3U.js} +544 -2368
  111. package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-RJH5VQHW.js → chunk-75U6M5ZD.js} +22 -16
  113. package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js.map +1 -0
  114. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +23 -0
  115. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js → chunk-7EQNAZX2.js} +14 -12
  117. package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js.map → chunk-7EQNAZX2.js.map} +1 -1
  118. package/dist/cli-bundle/chunks/{chunk-Z4DGFQDH.js → chunk-7LQKVMPA.js} +14 -4
  119. package/dist/cli-bundle/chunks/chunk-7LQKVMPA.js.map +1 -0
  120. package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js → chunk-7MDXZAZS.js} +29 -7
  121. package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js → chunk-7QH7DHUB.js} +74 -8
  123. package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +1 -0
  124. package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js → chunk-7WYXBPYQ.js} +7 -5
  125. package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js.map → chunk-7WYXBPYQ.js.map} +1 -1
  126. package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +150 -0
  127. package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js.map +1 -0
  128. package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js → chunk-ABRA3BHY.js} +18 -16
  129. package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js.map → chunk-ABRA3BHY.js.map} +2 -2
  130. package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js +47 -0
  131. package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js.map +7 -0
  132. package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js → chunk-BFVHCAOO.js} +9 -7
  133. package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js.map → chunk-BFVHCAOO.js.map} +1 -1
  134. package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js → chunk-BVEUCSH2.js} +6 -4
  135. package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js.map → chunk-BVEUCSH2.js.map} +1 -1
  136. package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +160 -0
  137. package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js.map +7 -0
  138. package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js → chunk-D3UCE7RW.js} +7 -5
  139. package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js.map → chunk-D3UCE7RW.js.map} +1 -1
  140. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +275 -0
  141. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +7 -0
  142. package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +634 -0
  143. package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js.map +7 -0
  144. package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js → chunk-DRBV5UC2.js} +8 -23
  145. package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +7 -0
  146. package/dist/cli-bundle/chunks/{chunk-NZ7QIUP5.js → chunk-E2FUG6GD.js} +67 -351
  147. package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js → chunk-EEY54JMF.js} +5 -3
  149. package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js.map → chunk-EEY54JMF.js.map} +1 -1
  150. package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js → chunk-EZFKWSC7.js} +94 -16
  151. package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js.map → chunk-EZFKWSC7.js.map} +4 -4
  152. package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js → chunk-FDBARR33.js} +40 -19
  153. package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js.map → chunk-FDBARR33.js.map} +3 -3
  154. package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js → chunk-FGQKEDE4.js} +36 -12
  155. package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js.map +7 -0
  156. package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js → chunk-FJRKQREY.js} +10 -18
  157. package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +1 -0
  158. package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js → chunk-FUM6UMY4.js} +10 -11
  159. package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js.map → chunk-FUM6UMY4.js.map} +1 -1
  160. package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js → chunk-GIWXVMZ3.js} +140 -334
  161. package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +7 -0
  162. package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js → chunk-HBYZDSK5.js} +19 -17
  163. package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js.map → chunk-HBYZDSK5.js.map} +1 -1
  164. package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js → chunk-HJE4JTKQ.js} +6 -4
  165. package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js.map → chunk-HJE4JTKQ.js.map} +1 -1
  166. package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js → chunk-HK72NWAD.js} +89 -18
  167. package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +1 -0
  168. package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js → chunk-IJ6CO3JV.js} +41 -20
  169. package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js.map → chunk-IJ6CO3JV.js.map} +1 -1
  170. package/dist/cli-bundle/chunks/{chunk-YF746GTH.js → chunk-JFCVQXZX.js} +139 -326
  171. package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +1 -0
  172. package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js → chunk-JLA7EVYV.js} +12 -10
  173. package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js.map → chunk-JLA7EVYV.js.map} +1 -1
  174. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +76 -0
  175. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +1 -0
  176. package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js → chunk-K3AGVXSF.js} +37 -13
  177. package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js.map +1 -0
  178. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +79 -0
  179. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +7 -0
  180. package/dist/cli-bundle/chunks/chunk-KGHH652T.js +44 -0
  181. package/dist/cli-bundle/chunks/chunk-KGHH652T.js.map +1 -0
  182. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +915 -0
  183. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js → chunk-KLG4ZULO.js} +12 -10
  185. package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js.map → chunk-KLG4ZULO.js.map} +1 -1
  186. package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js → chunk-LEKT4K7I.js} +74 -8
  187. package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +7 -0
  188. package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js → chunk-MNZ7DRNC.js} +13 -10
  189. package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js.map → chunk-MNZ7DRNC.js.map} +1 -1
  190. package/dist/cli-bundle/chunks/{chunk-4EXFFP7T.js → chunk-MTTXDAK4.js} +206 -147
  191. package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +7 -0
  192. package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js → chunk-MZ7VNEVY.js} +8 -6
  193. package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js.map → chunk-MZ7VNEVY.js.map} +1 -1
  194. package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js → chunk-N6DNM2FA.js} +2 -2
  195. package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js → chunk-N7X4WP6L.js} +11 -8
  196. package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js.map → chunk-N7X4WP6L.js.map} +1 -1
  197. package/dist/cli-bundle/chunks/{chunk-U3S2B7TA.js → chunk-NBFCNJ7Q.js} +206 -147
  198. package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +1 -0
  199. package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js → chunk-NER3KUUS.js} +2 -2
  200. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +20 -0
  201. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +1 -0
  202. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +918 -0
  203. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +7 -0
  204. package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js → chunk-OESSOFJ4.js} +14 -12
  205. package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js.map → chunk-OESSOFJ4.js.map} +1 -1
  206. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +238 -0
  207. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +1 -0
  208. package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js → chunk-OWTIRHX4.js} +28 -6
  209. package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js.map +7 -0
  210. package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js → chunk-P3VRG72Q.js} +10 -8
  211. package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js.map → chunk-P3VRG72Q.js.map} +1 -1
  212. package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +1423 -0
  213. package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js.map +7 -0
  214. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +1977 -0
  215. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +7 -0
  216. package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js → chunk-PDXT6Q55.js} +2 -2
  217. package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js → chunk-PJ3A56YF.js} +46 -537
  218. package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js.map +1 -0
  219. package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js → chunk-PPAJG4GB.js} +13 -10
  220. package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js.map → chunk-PPAJG4GB.js.map} +1 -1
  221. package/dist/cli-bundle/chunks/{chunk-572FKBRL.js → chunk-PPE4YUQM.js} +1725 -1663
  222. package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +1 -0
  223. package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js → chunk-QHZO65XW.js} +8 -6
  224. package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js.map → chunk-QHZO65XW.js.map} +1 -1
  225. package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js → chunk-R3ZBLGTC.js} +9 -10
  226. package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js.map → chunk-R3ZBLGTC.js.map} +2 -2
  227. package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +624 -0
  228. package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js.map +1 -0
  229. package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js → chunk-RX3HQSYG.js} +2 -2
  230. package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js → chunk-S4APD35C.js} +4 -4
  231. package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js → chunk-S5AYOUT5.js} +8 -6
  232. package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js.map → chunk-S5AYOUT5.js.map} +1 -1
  233. package/dist/cli-bundle/chunks/{chunk-SYE6WMV6.js → chunk-STPSZ2XY.js} +19 -744
  234. package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +1 -0
  235. package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js → chunk-T35XLYZF.js} +2 -2
  236. package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js → chunk-T3ABIMGW.js} +5 -3
  237. package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js.map → chunk-T3ABIMGW.js.map} +1 -1
  238. package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js → chunk-T3F4DF23.js} +16 -14
  239. package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js.map → chunk-T3F4DF23.js.map} +1 -1
  240. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +272 -0
  241. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +1 -0
  242. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +5354 -0
  243. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{chunk-ECU6MMTQ.js → chunk-TSPKZRRW.js} +50 -116
  245. package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js.map +1 -0
  246. package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js → chunk-TT42JUMF.js} +4 -4
  247. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +165 -0
  248. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +1 -0
  249. package/dist/cli-bundle/chunks/{chunk-RAHINBVP.js → chunk-UI5BJ6DO.js} +1339 -1277
  250. package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +7 -0
  251. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +1932 -0
  252. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +1 -0
  253. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +175 -0
  254. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +7 -0
  255. package/dist/cli-bundle/chunks/{chunk-B4O5S7I3.js → chunk-VUHVWI4C.js} +13 -3
  256. package/dist/cli-bundle/chunks/chunk-VUHVWI4C.js.map +7 -0
  257. package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js → chunk-VZIYHZDX.js} +11 -8
  258. package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js.map → chunk-VZIYHZDX.js.map} +1 -1
  259. package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js → chunk-WISPVC2E.js} +9 -7
  260. package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js.map → chunk-WISPVC2E.js.map} +1 -1
  261. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +5434 -0
  262. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +7 -0
  263. package/dist/cli-bundle/chunks/{chunk-HQAF23Q2.js → chunk-XQCG2JGW.js} +17 -749
  264. package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +7 -0
  265. package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +550 -0
  266. package/dist/cli-bundle/chunks/chunk-Y76TWC45.js.map +7 -0
  267. package/dist/cli-bundle/chunks/{chunk-L4SLHV6G.js → chunk-YD5FML7K.js} +464 -2239
  268. package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +1 -0
  269. package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js → chunk-YFIE7YK6.js} +7 -5
  270. package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js.map → chunk-YFIE7YK6.js.map} +1 -1
  271. package/dist/cli-bundle/chunks/{chunk-WYOIIFSE.js → chunk-YMABYTNG.js} +49 -115
  272. package/dist/cli-bundle/chunks/chunk-YMABYTNG.js.map +7 -0
  273. package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js → chunk-YOF5VPKM.js} +2 -2
  274. package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js → chunk-YPPVU5GX.js} +11 -9
  275. package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js.map → chunk-YPPVU5GX.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js → chunk-YQMMMONE.js} +6 -4
  277. package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js.map → chunk-YQMMMONE.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js → chunk-YSAH5FY5.js} +16 -14
  279. package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js.map → chunk-YSAH5FY5.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/{chunk-KS6ATO47.js → chunk-YZIR4R3U.js} +153 -108
  281. package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js.map +7 -0
  282. package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js → chunk-Z2CRRZYF.js} +14 -12
  283. package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js.map → chunk-Z2CRRZYF.js.map} +1 -1
  284. package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +533 -0
  285. package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js.map +1 -0
  286. package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js → chunk-ZCJAA3JK.js} +8 -6
  287. package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js.map → chunk-ZCJAA3JK.js.map} +1 -1
  288. package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js → chunk-ZD34OFFQ.js} +5 -3
  289. package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js.map → chunk-ZD34OFFQ.js.map} +1 -1
  290. package/dist/cli-bundle/chunks/{chunk-67LARBDL.js → chunk-ZJB3UV5U.js} +54 -58
  291. package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +1 -0
  292. package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js → chunk-ZMD35NYG.js} +2 -2
  293. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +241 -0
  294. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +7 -0
  295. package/dist/cli-bundle/chunks/{claim-5GU7OE67.js → claim-4DROPSIS.js} +30 -13
  296. package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +1 -0
  297. package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js → claim-VX54TV5U.js} +29 -12
  298. package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +7 -0
  299. package/dist/cli-bundle/chunks/{close-AFVKPR57.js → close-3YRR3XY6.js} +9 -7
  300. package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +16 -0
  301. package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js → close-many-AP4MWU36.js} +21 -18
  302. package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js.map → close-many-AP4MWU36.js.map} +1 -1
  303. package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js → close-many-OMZIGZB4.js} +19 -16
  304. package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js.map → close-many-OMZIGZB4.js.map} +1 -1
  305. package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js → comments-MIW5MZOX.js} +12 -9
  306. package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js.map → comments-MIW5MZOX.js.map} +1 -1
  307. package/dist/cli-bundle/chunks/{comments-RW23R3VE.js → comments-SAG5LSKL.js} +14 -11
  308. package/dist/cli-bundle/chunks/{comments-RW23R3VE.js.map → comments-SAG5LSKL.js.map} +1 -1
  309. package/dist/cli-bundle/chunks/{config-AUM5WBYA.js → config-DJJKZB5R.js} +20 -17
  310. package/dist/cli-bundle/chunks/{config-AUM5WBYA.js.map → config-DJJKZB5R.js.map} +1 -1
  311. package/dist/cli-bundle/chunks/{config-OZWSA2NP.js → config-V57QD47V.js} +22 -19
  312. package/dist/cli-bundle/chunks/{config-OZWSA2NP.js.map → config-V57QD47V.js.map} +1 -1
  313. package/dist/cli-bundle/chunks/{context-PKCEHQY3.js → context-4OQGIPSO.js} +15 -12
  314. package/dist/cli-bundle/chunks/{context-OYXRGY7S.js → context-WLA6IAWE.js} +15 -12
  315. package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +12 -0
  316. package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +16 -0
  317. package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js → copy-LEE6P6EM.js} +17 -14
  318. package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js.map → copy-LEE6P6EM.js.map} +2 -2
  319. package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js → copy-OTJOWFL6.js} +18 -15
  320. package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js.map → copy-OTJOWFL6.js.map} +1 -1
  321. package/dist/cli-bundle/chunks/create-WKOZKPQR.js +30 -0
  322. package/dist/cli-bundle/chunks/{create-PM45M6PE.js → create-XWWQFQ6S.js} +14 -12
  323. package/dist/cli-bundle/chunks/{delete-7YXHYG67.js → delete-62JQTYT4.js} +10 -7
  324. package/dist/cli-bundle/chunks/{delete-7YXHYG67.js.map → delete-62JQTYT4.js.map} +1 -1
  325. package/dist/cli-bundle/chunks/{delete-LPISP43T.js → delete-HQKGRNRZ.js} +12 -9
  326. package/dist/cli-bundle/chunks/{delete-LPISP43T.js.map → delete-HQKGRNRZ.js.map} +1 -1
  327. package/dist/cli-bundle/chunks/{deps-WATKQDE3.js → deps-55FTG6Z5.js} +12 -9
  328. package/dist/cli-bundle/chunks/{deps-WATKQDE3.js.map → deps-55FTG6Z5.js.map} +1 -1
  329. package/dist/cli-bundle/chunks/{deps-N2T26FME.js → deps-L2FPIAD3.js} +10 -7
  330. package/dist/cli-bundle/chunks/{deps-N2T26FME.js.map → deps-L2FPIAD3.js.map} +1 -1
  331. package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js → docs-6CRCSVKK.js} +11 -9
  332. package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js.map → docs-6CRCSVKK.js.map} +1 -1
  333. package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js → docs-S6UTOTO5.js} +9 -7
  334. package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js.map → docs-S6UTOTO5.js.map} +1 -1
  335. package/dist/cli-bundle/chunks/{eval-6DCLG52D.js → eval-N6UHFWVO.js} +15 -11
  336. package/dist/cli-bundle/chunks/{eval-6DCLG52D.js.map → eval-N6UHFWVO.js.map} +1 -1
  337. package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js → eval-PHOTWYHI.js} +17 -13
  338. package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js.map → eval-PHOTWYHI.js.map} +1 -1
  339. package/dist/cli-bundle/chunks/{extension-BNINIMT7.js → extension-NBAH62ML.js} +17 -11
  340. package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js → extension-ZF6ZZPOU.js} +17 -11
  341. package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js → files-6P57MRKL.js} +14 -11
  342. package/dist/cli-bundle/chunks/files-6P57MRKL.js.map +7 -0
  343. package/dist/cli-bundle/chunks/{files-6SGKHS6O.js → files-JPU3FNJ7.js} +15 -12
  344. package/dist/cli-bundle/chunks/files-JPU3FNJ7.js.map +1 -0
  345. package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js → focus-LFZ6IDBR.js} +15 -11
  346. package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js.map → focus-LFZ6IDBR.js.map} +1 -1
  347. package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js → focus-WNMYCVYA.js} +13 -9
  348. package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js.map → focus-WNMYCVYA.js.map} +1 -1
  349. package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js → gc-AETFKZ44.js} +10 -7
  350. package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js.map → gc-AETFKZ44.js.map} +1 -1
  351. package/dist/cli-bundle/chunks/{gc-TDWSDR66.js → gc-RLBP4QVN.js} +12 -9
  352. package/dist/cli-bundle/chunks/{gc-TDWSDR66.js.map → gc-RLBP4QVN.js.map} +1 -1
  353. package/dist/cli-bundle/chunks/{get-LY6M2JIM.js → get-NH2MPBCI.js} +18 -15
  354. package/dist/cli-bundle/chunks/{get-LY6M2JIM.js.map → get-NH2MPBCI.js.map} +1 -1
  355. package/dist/cli-bundle/chunks/{get-2WGLX74N.js → get-P4ZQXCPZ.js} +16 -13
  356. package/dist/cli-bundle/chunks/{get-2WGLX74N.js.map → get-P4ZQXCPZ.js.map} +1 -1
  357. package/dist/cli-bundle/chunks/{health-4RKHYS3T.js → health-3GVPMQBL.js} +36 -29
  358. package/dist/cli-bundle/chunks/{health-4RKHYS3T.js.map → health-3GVPMQBL.js.map} +1 -1
  359. package/dist/cli-bundle/chunks/{health-TMFVNYRA.js → health-DNTM72GJ.js} +34 -27
  360. package/dist/cli-bundle/chunks/{health-TMFVNYRA.js.map → health-DNTM72GJ.js.map} +1 -1
  361. package/dist/cli-bundle/chunks/history-RYKLC72X.js +20 -0
  362. package/dist/cli-bundle/chunks/{history-SGRRS72R.js → history-SGPYRAFT.js} +10 -8
  363. package/dist/cli-bundle/chunks/{history-compact-LOED43R3.js → history-compact-3F6VELO7.js} +26 -30
  364. package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js.map +7 -0
  365. package/dist/cli-bundle/chunks/{history-compact-V5DNAQHH.js → history-compact-656Y2TN4.js} +27 -31
  366. package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js.map +1 -0
  367. package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +21 -0
  368. package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js → history-redact-54ICFKXM.js} +11 -9
  369. package/dist/cli-bundle/chunks/{history-repair-PGYQJMGD.js → history-repair-4N6SDVHK.js} +25 -30
  370. package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js.map +7 -0
  371. package/dist/cli-bundle/chunks/{history-repair-4WVBVHFR.js → history-repair-EVTO6LIH.js} +26 -31
  372. package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js.map +1 -0
  373. package/dist/cli-bundle/chunks/init-RPIPQUNV.js +32 -0
  374. package/dist/cli-bundle/chunks/init-SKQAESQS.js +28 -0
  375. package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js → learnings-2HTPZNGZ.js} +10 -8
  376. package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js.map → learnings-2HTPZNGZ.js.map} +1 -1
  377. package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js → learnings-YBIHY3D6.js} +12 -10
  378. package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js.map → learnings-YBIHY3D6.js.map} +1 -1
  379. package/dist/cli-bundle/chunks/{list-472TIOVK.js → list-64LHZ3HM.js} +10 -8
  380. package/dist/cli-bundle/chunks/{list-D7BF5CL2.js → list-7LXBTEKI.js} +10 -8
  381. package/dist/cli-bundle/chunks/{next-SFQZVX2B.js → next-7ODPAQ4U.js} +22 -18
  382. package/dist/cli-bundle/chunks/{next-SFQZVX2B.js.map → next-7ODPAQ4U.js.map} +1 -1
  383. package/dist/cli-bundle/chunks/{next-D5STGWI2.js → next-ODJUM4ZM.js} +24 -20
  384. package/dist/cli-bundle/chunks/{next-D5STGWI2.js.map → next-ODJUM4ZM.js.map} +1 -1
  385. package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js → notes-72YXN5JX.js} +10 -8
  386. package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js.map → notes-72YXN5JX.js.map} +1 -1
  387. package/dist/cli-bundle/chunks/{notes-W4UEICGF.js → notes-NJ7IQJX4.js} +12 -10
  388. package/dist/cli-bundle/chunks/{notes-W4UEICGF.js.map → notes-NJ7IQJX4.js.map} +1 -1
  389. package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js → plan-R4NDQ27E.js} +18 -15
  390. package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js.map → plan-R4NDQ27E.js.map} +1 -1
  391. package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js → plan-XWY5T67S.js} +20 -17
  392. package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js.map → plan-XWY5T67S.js.map} +1 -1
  393. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +397 -0
  394. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +1 -0
  395. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +400 -0
  396. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +7 -0
  397. package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js → register-list-query-5H66WFYF.js} +24 -21
  398. package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js.map +7 -0
  399. package/dist/cli-bundle/chunks/{register-list-query-GAPQ6DM3.js → register-list-query-FB3FNDLZ.js} +25 -22
  400. package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js.map → register-list-query-FB3FNDLZ.js.map} +1 -7
  401. package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js → register-mutation-UJO23C7R.js} +42 -39
  402. package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js.map → register-mutation-UJO23C7R.js.map} +1 -1
  403. package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js → register-mutation-Z2ETYHKS.js} +40 -37
  404. package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js.map → register-mutation-Z2ETYHKS.js.map} +1 -1
  405. package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js → register-operations-A3XAM5J7.js} +39 -36
  406. package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js.map → register-operations-A3XAM5J7.js.map} +1 -1
  407. package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js → register-operations-SG7HBSUP.js} +37 -34
  408. package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js.map → register-operations-SG7HBSUP.js.map} +1 -1
  409. package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js → register-setup-I45OGJUV.js} +25 -19
  410. package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js.map → register-setup-I45OGJUV.js.map} +1 -1
  411. package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js → register-setup-K6U3NVY5.js} +23 -17
  412. package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js.map → register-setup-K6U3NVY5.js.map} +1 -1
  413. package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +19 -0
  414. package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js → restore-YJ2ET6AT.js} +11 -9
  415. package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js → scheduling-shortcuts-SSC4MYWQ.js} +14 -12
  416. package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js.map → scheduling-shortcuts-SSC4MYWQ.js.map} +1 -1
  417. package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js → scheduling-shortcuts-ULRG7MNP.js} +16 -14
  418. package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js.map → scheduling-shortcuts-ULRG7MNP.js.map} +1 -1
  419. package/dist/cli-bundle/chunks/{schema-VBCELP5G.js → schema-2PUXCZ25.js} +10 -7
  420. package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js → schema-Y6DXXK2F.js} +10 -7
  421. package/dist/cli-bundle/chunks/{search-7UBETML4.js → search-3S72CTD6.js} +13 -10
  422. package/dist/cli-bundle/chunks/{search-R227JOL6.js → search-WNUNBQXO.js} +13 -10
  423. package/dist/cli-bundle/chunks/{stats-FAG7COEH.js → stats-IJYTRQGV.js} +13 -10
  424. package/dist/cli-bundle/chunks/{stats-FAG7COEH.js.map → stats-IJYTRQGV.js.map} +1 -1
  425. package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js → stats-L2D5Y2O5.js} +15 -12
  426. package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js.map → stats-L2D5Y2O5.js.map} +1 -1
  427. package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js → telemetry-L2CVOKVN.js} +11 -8
  428. package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js.map → telemetry-L2CVOKVN.js.map} +1 -1
  429. package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js → telemetry-QBYWQA76.js} +13 -10
  430. package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js.map → telemetry-QBYWQA76.js.map} +1 -1
  431. package/dist/cli-bundle/chunks/{test-QY44WAMR.js → test-DQ2QFJ7W.js} +21 -15
  432. package/dist/cli-bundle/chunks/test-W7QBLVJS.js +41 -0
  433. package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js → test-all-636NTRTT.js} +26 -19
  434. package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js.map → test-all-636NTRTT.js.map} +1 -1
  435. package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js → test-all-DWYK3RG6.js} +24 -17
  436. package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js.map → test-all-DWYK3RG6.js.map} +1 -1
  437. package/dist/cli-bundle/chunks/test-runs-245OINZR.js +28 -0
  438. package/dist/cli-bundle/chunks/test-runs-245OINZR.js.map +1 -0
  439. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +24 -0
  440. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js.map +7 -0
  441. package/dist/cli-bundle/chunks/update-SFLZPJXX.js +30 -0
  442. package/dist/cli-bundle/chunks/update-SFLZPJXX.js.map +1 -0
  443. package/dist/cli-bundle/chunks/update-SJZ6S77U.js +26 -0
  444. package/dist/cli-bundle/chunks/update-SJZ6S77U.js.map +7 -0
  445. package/dist/cli-bundle/chunks/{update-many-RATAARHU.js → update-many-DC7X3EWM.js} +32 -29
  446. package/dist/cli-bundle/chunks/{update-many-RATAARHU.js.map → update-many-DC7X3EWM.js.map} +1 -1
  447. package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js → update-many-SLLAMHT7.js} +34 -31
  448. package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js.map → update-many-SLLAMHT7.js.map} +1 -1
  449. package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js → upgrade-HFFXLZJA.js} +19 -12
  450. package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js.map → upgrade-HFFXLZJA.js.map} +1 -1
  451. package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js → upgrade-UYQKM7RF.js} +21 -14
  452. package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js.map → upgrade-UYQKM7RF.js.map} +1 -1
  453. package/dist/cli-bundle/chunks/{validate-NRY6MFXN.js → validate-PA4FDTOV.js} +35 -28
  454. package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +7 -0
  455. package/dist/cli-bundle/chunks/{validate-GAJ6FUSI.js → validate-Z7L75YEJ.js} +35 -28
  456. package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +1 -0
  457. package/dist/cli-bundle/main.js +173 -57
  458. package/dist/cli-bundle/main.js.map +2 -2
  459. package/dist/cli-bundle/sdk-runtime.js +247 -0
  460. package/dist/cli-bundle/sdk-runtime.js.map +7 -0
  461. package/dist/cli-bundle/sdk-testing.js +101 -0
  462. package/dist/cli-bundle/sdk-testing.js.map +7 -0
  463. package/dist/cli-bundle/sdk.js +787 -0
  464. package/dist/cli-bundle/sdk.js.map +7 -0
  465. package/dist/core/config/nested-settings.d.ts +4 -3
  466. package/dist/core/config/nested-settings.js +17 -6
  467. package/dist/core/config/nested-settings.js.map +1 -1
  468. package/dist/core/extensions/activation-summary.d.ts +6 -0
  469. package/dist/core/extensions/activation-summary.js +10 -4
  470. package/dist/core/extensions/activation-summary.js.map +1 -1
  471. package/dist/core/extensions/capability-usage.d.ts +6 -0
  472. package/dist/core/extensions/capability-usage.js +10 -4
  473. package/dist/core/extensions/capability-usage.js.map +1 -1
  474. package/dist/core/extensions/extension-types.d.ts +6 -2
  475. package/dist/core/extensions/extension-types.js +2 -2
  476. package/dist/core/extensions/extension-types.js.map +1 -1
  477. package/dist/core/extensions/loader.d.ts +3 -0
  478. package/dist/core/extensions/loader.js +11 -19
  479. package/dist/core/extensions/loader.js.map +1 -1
  480. package/dist/core/history/history-rewrite.d.ts +10 -0
  481. package/dist/core/history/history-rewrite.js +28 -4
  482. package/dist/core/history/history-rewrite.js.map +1 -1
  483. package/dist/core/item/parent-reference-policy.d.ts +9 -1
  484. package/dist/core/item/parent-reference-policy.js +28 -4
  485. package/dist/core/item/parent-reference-policy.js.map +1 -1
  486. package/dist/core/item/type-registry.d.ts +1 -0
  487. package/dist/core/item/type-registry.js +153 -177
  488. package/dist/core/item/type-registry.js.map +1 -1
  489. package/dist/core/lock/lock.d.ts +28 -1
  490. package/dist/core/lock/lock.js +254 -20
  491. package/dist/core/lock/lock.js.map +1 -1
  492. package/dist/core/search/background-refresh.js +7 -19
  493. package/dist/core/search/background-refresh.js.map +1 -1
  494. package/dist/core/search/http-client.d.ts +0 -1
  495. package/dist/core/search/http-client.js +3 -3
  496. package/dist/core/search/http-client.js.map +1 -1
  497. package/dist/core/shared/constants.js +3 -2
  498. package/dist/core/shared/constants.js.map +1 -1
  499. package/dist/core/shared/errors.d.ts +1 -0
  500. package/dist/core/shared/errors.js +2 -2
  501. package/dist/core/shared/errors.js.map +1 -1
  502. package/dist/core/shared/primitives.d.ts +12 -0
  503. package/dist/core/shared/primitives.js +29 -2
  504. package/dist/core/shared/primitives.js.map +1 -1
  505. package/dist/core/store/item-store.js +3 -3
  506. package/dist/core/store/item-store.js.map +1 -1
  507. package/dist/core/store/settings-validator.d.ts +1 -0
  508. package/dist/core/store/settings-validator.js +6 -3
  509. package/dist/core/store/settings-validator.js.map +1 -1
  510. package/dist/core/store/settings.js +3 -3
  511. package/dist/core/store/settings.js.map +1 -1
  512. package/dist/core/validate/fix-planning.d.ts +0 -2
  513. package/dist/core/validate/fix-planning.js +3 -3
  514. package/dist/core/validate/fix-planning.js.map +1 -1
  515. package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
  516. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  517. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  518. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  519. package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
  520. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  521. package/dist/sdk/cli-contracts/tool-schema.js +55 -94
  522. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  523. package/dist/sdk/errors.d.ts +21 -2
  524. package/dist/sdk/errors.js +8 -2
  525. package/dist/sdk/errors.js.map +1 -1
  526. package/dist/sdk/package-import-adapters.d.ts +90 -2
  527. package/dist/sdk/package-import-adapters.js +275 -3
  528. package/dist/sdk/package-import-adapters.js.map +1 -1
  529. package/dist/sdk/runtime.d.ts +1 -1
  530. package/dist/sdk/runtime.js +3 -3
  531. package/dist/sdk/runtime.js.map +1 -1
  532. package/dist/sdk/testing.js +41 -19
  533. package/dist/sdk/testing.js.map +1 -1
  534. package/dist/types.d.ts +6 -0
  535. package/dist/types.js +2 -2
  536. package/dist/types.js.map +1 -1
  537. package/docs/ARCHITECTURE.md +27 -0
  538. package/docs/CONFIGURATION.md +3 -0
  539. package/docs/README.md +1 -0
  540. package/docs/SDK_PRIMITIVE_INVENTORY.md +55 -0
  541. package/docs/TESTING.md +5 -1
  542. package/docs/examples/ci/github-actions-pm-extension-gate.yml +5 -5
  543. package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
  544. package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
  545. package/package.json +14 -26
  546. package/packages/pm-beads/extensions/beads/package.json +3 -0
  547. package/packages/pm-beads/extensions/beads/runtime-loader.ts +50 -41
  548. package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
  549. package/packages/pm-calendar/extensions/calendar/package.json +3 -0
  550. package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
  551. package/packages/pm-command-kit/extensions/command-kit/package.json +3 -0
  552. package/packages/pm-governance-audit/extensions/governance-audit/package.json +3 -0
  553. package/packages/pm-guide-shell/extensions/guide-shell/package.json +3 -0
  554. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
  555. package/packages/pm-kanban/extensions/kanban/package.json +3 -0
  556. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +3 -0
  557. package/packages/pm-search-advanced/extensions/search-advanced/package.json +3 -0
  558. package/packages/pm-templates/extensions/templates/package.json +3 -0
  559. package/packages/pm-todos/extensions/todos/package.json +3 -0
  560. package/packages/pm-todos/extensions/todos/runtime-loader.ts +62 -72
  561. package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
  562. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
  563. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
  564. package/scripts/bundle-cli.mjs +12 -2
  565. package/scripts/install.ps1 +7 -7
  566. package/dist/cli-bundle/chunks/activity-BIML7K2D.js +0 -16
  567. package/dist/cli-bundle/chunks/chunk-32IUNTG4.js.map +0 -1
  568. package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +0 -7
  569. package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +0 -1
  570. package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +0 -1
  571. package/dist/cli-bundle/chunks/chunk-67LARBDL.js.map +0 -1
  572. package/dist/cli-bundle/chunks/chunk-6CDCWKSX.js.map +0 -1
  573. package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +0 -7
  574. package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +0 -7
  575. package/dist/cli-bundle/chunks/chunk-B4O5S7I3.js.map +0 -7
  576. package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +0 -1
  577. package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +0 -1
  578. package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +0 -1
  579. package/dist/cli-bundle/chunks/chunk-ERG65A2L.js.map +0 -1
  580. package/dist/cli-bundle/chunks/chunk-FUFFPIYA.js.map +0 -7
  581. package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +0 -7
  582. package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +0 -7
  583. package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +0 -7
  584. package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +0 -7
  585. package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +0 -7
  586. package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +0 -1
  587. package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +0 -1
  588. package/dist/cli-bundle/chunks/chunk-NZ7QIUP5.js.map +0 -7
  589. package/dist/cli-bundle/chunks/chunk-OGLGI22K.js.map +0 -1
  590. package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +0 -7
  591. package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +0 -1
  592. package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +0 -1
  593. package/dist/cli-bundle/chunks/chunk-TQ6AX5SQ.js.map +0 -7
  594. package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +0 -1
  595. package/dist/cli-bundle/chunks/chunk-WRYERRZX.js.map +0 -7
  596. package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +0 -7
  597. package/dist/cli-bundle/chunks/chunk-XRYSCRZR.js.map +0 -7
  598. package/dist/cli-bundle/chunks/chunk-YF746GTH.js.map +0 -1
  599. package/dist/cli-bundle/chunks/chunk-YSDFIY7N.js.map +0 -1
  600. package/dist/cli-bundle/chunks/chunk-Z4DGFQDH.js.map +0 -1
  601. package/dist/cli-bundle/chunks/claim-2BGBGSVI.js.map +0 -7
  602. package/dist/cli-bundle/chunks/claim-5GU7OE67.js.map +0 -1
  603. package/dist/cli-bundle/chunks/close-6YODBUIV.js +0 -14
  604. package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +0 -28
  605. package/dist/cli-bundle/chunks/files-6SGKHS6O.js.map +0 -1
  606. package/dist/cli-bundle/chunks/files-FUYPSOFJ.js.map +0 -7
  607. package/dist/cli-bundle/chunks/history-CGNQJXFE.js +0 -18
  608. package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +0 -7
  609. package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +0 -1
  610. package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +0 -19
  611. package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +0 -1
  612. package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +0 -7
  613. package/dist/cli-bundle/chunks/init-4GESW7RM.js +0 -26
  614. package/dist/cli-bundle/chunks/init-XIDPABA4.js +0 -22
  615. package/dist/cli-bundle/chunks/profile-3TOTMUR4.js +0 -1243
  616. package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +0 -7
  617. package/dist/cli-bundle/chunks/profile-WIQY2KCV.js +0 -1205
  618. package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +0 -1
  619. package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +0 -1
  620. package/dist/cli-bundle/chunks/restore-EXHU34EU.js +0 -17
  621. package/dist/cli-bundle/chunks/test-SY76DZTO.js +0 -35
  622. package/dist/cli-bundle/chunks/update-A7EICML6.js +0 -24
  623. package/dist/cli-bundle/chunks/update-IKJZWLQC.js +0 -28
  624. package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +0 -1
  625. package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +0 -7
  626. /package/dist/cli-bundle/chunks/{activity-BIML7K2D.js.map → activity-4XQIDNM5.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js.map → activity-YKAKZTZ4.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js.map → chunk-5JE6SMYS.js.map} +0 -0
  629. /package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js.map → chunk-N6DNM2FA.js.map} +0 -0
  630. /package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js.map → chunk-NER3KUUS.js.map} +0 -0
  631. /package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js.map → chunk-PDXT6Q55.js.map} +0 -0
  632. /package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js.map → chunk-RX3HQSYG.js.map} +0 -0
  633. /package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js.map → chunk-S4APD35C.js.map} +0 -0
  634. /package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js.map → chunk-T35XLYZF.js.map} +0 -0
  635. /package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js.map → chunk-TT42JUMF.js.map} +0 -0
  636. /package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js.map → chunk-YOF5VPKM.js.map} +0 -0
  637. /package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js.map → chunk-ZMD35NYG.js.map} +0 -0
  638. /package/dist/cli-bundle/chunks/{close-AFVKPR57.js.map → close-3YRR3XY6.js.map} +0 -0
  639. /package/dist/cli-bundle/chunks/{close-6YODBUIV.js.map → close-OB2Y4QP5.js.map} +0 -0
  640. /package/dist/cli-bundle/chunks/{context-PKCEHQY3.js.map → context-4OQGIPSO.js.map} +0 -0
  641. /package/dist/cli-bundle/chunks/{context-OYXRGY7S.js.map → context-WLA6IAWE.js.map} +0 -0
  642. /package/dist/cli-bundle/chunks/{create-Z7YCH3BE.js.map → contracts-HXJLKCRI.js.map} +0 -0
  643. /package/dist/cli-bundle/chunks/{create-PM45M6PE.js.map → contracts-OJEXMKVW.js.map} +0 -0
  644. /package/dist/cli-bundle/chunks/{extension-BNINIMT7.js.map → create-WKOZKPQR.js.map} +0 -0
  645. /package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js.map → create-XWWQFQ6S.js.map} +0 -0
  646. /package/dist/cli-bundle/chunks/{history-CGNQJXFE.js.map → extension-NBAH62ML.js.map} +0 -0
  647. /package/dist/cli-bundle/chunks/{history-SGRRS72R.js.map → extension-ZF6ZZPOU.js.map} +0 -0
  648. /package/dist/cli-bundle/chunks/{history-redact-N3JK7VBW.js.map → history-RYKLC72X.js.map} +0 -0
  649. /package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js.map → history-SGPYRAFT.js.map} +0 -0
  650. /package/dist/cli-bundle/chunks/{init-XIDPABA4.js.map → history-redact-4H3FCKF3.js.map} +0 -0
  651. /package/dist/cli-bundle/chunks/{init-4GESW7RM.js.map → history-redact-54ICFKXM.js.map} +0 -0
  652. /package/dist/cli-bundle/chunks/{list-D7BF5CL2.js.map → init-RPIPQUNV.js.map} +0 -0
  653. /package/dist/cli-bundle/chunks/{list-472TIOVK.js.map → init-SKQAESQS.js.map} +0 -0
  654. /package/dist/cli-bundle/chunks/{restore-EXHU34EU.js.map → list-64LHZ3HM.js.map} +0 -0
  655. /package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js.map → list-7LXBTEKI.js.map} +0 -0
  656. /package/dist/cli-bundle/chunks/{schema-VBCELP5G.js.map → restore-PXOFL6AM.js.map} +0 -0
  657. /package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js.map → restore-YJ2ET6AT.js.map} +0 -0
  658. /package/dist/cli-bundle/chunks/{search-R227JOL6.js.map → schema-2PUXCZ25.js.map} +0 -0
  659. /package/dist/cli-bundle/chunks/{search-7UBETML4.js.map → schema-Y6DXXK2F.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{test-QY44WAMR.js.map → search-3S72CTD6.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{test-SY76DZTO.js.map → search-WNUNBQXO.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{update-IKJZWLQC.js.map → test-DQ2QFJ7W.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{update-A7EICML6.js.map → test-W7QBLVJS.js.map} +0 -0
@@ -4,7 +4,7 @@
4
4
  * Implements the pm copy command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="35ce2b1f-202f-57c1-a17d-95d1e7e06f19")}catch(e){}}();
7
+ !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]="9f18adf2-5e40-5104-b7fa-5b5d77ffe54b")}catch(e){}}();
8
8
  import { pathExists, removeFileIfExists, writeFileAtomic } from "../../core/fs/fs-utils.js";
9
9
  import { appendHistoryEntry, createHistoryEntry } from "../../core/history/history.js";
10
10
  import { generateItemId } from "../../core/item/id.js";
@@ -89,7 +89,7 @@ export async function runCopy(sourceId, options, global) {
89
89
  const changedFields = buildChangedFields(copiedDocument.metadata, copiedDocument.body);
90
90
  const itemPath = getItemPath(pmRoot, copiedDocument.metadata.type, newId, settings.item_format, typeRegistry.type_to_folder);
91
91
  const historyPath = getHistoryPath(pmRoot, newId);
92
- const lockRelease = await acquireLock(pmRoot, newId, settings.locks.ttl_seconds, author, false, settings.governance.force_required_for_stale_lock);
92
+ const lockRelease = await acquireLock(pmRoot, newId, settings.locks.ttl_seconds, author, false, settings.governance.force_required_for_stale_lock, settings.locks.wait_ms);
93
93
  const beforeDocument = {
94
94
  metadata: {},
95
95
  body: "",
@@ -158,4 +158,4 @@ export async function runCopy(sourceId, options, global) {
158
158
  };
159
159
  }
160
160
  //# sourceMappingURL=copy.js.map
161
- //# debugId=35ce2b1f-202f-57c1-a17d-95d1e7e06f19
161
+ //# debugId=9f18adf2-5e40-5104-b7fa-5b5d77ffe54b
@@ -1 +1 @@
1
- {"version":3,"file":"copy.js","sources":["cli/commands/copy.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/copy\n *\n * Implements the pm copy command surface and its agent-facing runtime behavior.\n */\nimport { pathExists, removeFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { appendHistoryEntry, createHistoryEntry } from \"../../core/history/history.js\";\nimport { generateItemId } from \"../../core/item/id.js\";\nimport { canonicalDocument, serializeItemDocument } from \"../../core/item/item-format.js\";\nimport { acquireLock } from \"../../core/lock/lock.js\";\nimport {\n getActiveExtensionRegistrations,\n projectAfterCommandItemSnapshot,\n recordAfterCommandAffectedItem,\n runActiveOnWriteHooks,\n} from \"../../core/extensions/index.js\";\nimport { collectRegisteredItemFieldNames } from \"../../core/extensions/item-fields.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { buildItemNotFoundError, locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemDocument, ItemMetadata } from \"../../types/index.js\";\n\n/**\n * Documents the copy options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CopyOptions {\n title?: string;\n author?: string;\n message?: string;\n}\n\n/**\n * Documents the copy result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CopyResult {\n source_id: string;\n item: ItemMetadata;\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction selectAuthor(explicitAuthor: string | undefined, settingsAuthor: string): string {\n const candidate = explicitAuthor ?? process.env.PM_AUTHOR ?? settingsAuthor;\n const trimmed = candidate.trim();\n return trimmed.length > 0 ? trimmed : \"unknown\";\n}\n\nfunction buildChangedFields(frontMatter: ItemMetadata, body: string): string[] {\n const changed = [\n ...new Set([\n ...FRONT_MATTER_KEY_ORDER.filter((key) => frontMatter[key] !== undefined),\n ...Object.keys(frontMatter).filter((key) => frontMatter[key] !== undefined),\n ...(body.length > 0 ? [\"body\"] : []),\n ]),\n ];\n return changed.sort((left, right) => left.localeCompare(right));\n}\n\nfunction buildCopyMessage(sourceId: string, message: string | undefined): string {\n const suffix = `copied_from=${sourceId}`;\n if (!message) {\n return suffix;\n }\n const trimmed = message.trim();\n return trimmed.length > 0 ? `${trimmed} | ${suffix}` : suffix;\n}\n\n/**\n * Implements run copy for the public runtime surface of this module.\n */\nexport async function runCopy(sourceId: string, options: CopyOptions, global: GlobalOptions): Promise<CopyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, sourceId, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, sourceId, settings.id_prefix, typeRegistry.type_to_folder);\n }\n const sourceLoaded = await readLocatedItem(located, { schema: settings.schema });\n const sourceMetadata = sourceLoaded.document.metadata;\n const copiedAt = nowIso();\n const author = selectAuthor(options.author, settings.author_default);\n const newId = await generateItemId(pmRoot, settings.id_prefix);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const titleOverride = options.title?.trim();\n if (titleOverride !== undefined && titleOverride.length === 0) {\n throw new PmCliError(\"Copy --title must not be empty\", EXIT_CODE.USAGE);\n }\n\n const copiedMetadata: ItemMetadata = {\n ...(sourceMetadata as Record<string, unknown>),\n id: newId,\n title: titleOverride ?? sourceMetadata.title,\n status: statusRegistry.open_status,\n created_at: copiedAt,\n updated_at: copiedAt,\n } as ItemMetadata;\n delete copiedMetadata.closed_at;\n delete copiedMetadata.close_reason;\n delete copiedMetadata.test_runs;\n\n const extensionFieldNames = collectRegisteredItemFieldNames(getActiveExtensionRegistrations());\n const copiedDocument = canonicalDocument(\n {\n metadata: copiedMetadata,\n body: sourceLoaded.document.body,\n },\n {\n schema: settings.schema,\n extensionFieldNames,\n },\n );\n const changedFields = buildChangedFields(copiedDocument.metadata, copiedDocument.body);\n const itemPath = getItemPath(pmRoot, copiedDocument.metadata.type, newId, settings.item_format, typeRegistry.type_to_folder);\n const historyPath = getHistoryPath(pmRoot, newId);\n const lockRelease = await acquireLock(\n pmRoot,\n newId,\n settings.locks.ttl_seconds,\n author,\n false,\n settings.governance.force_required_for_stale_lock,\n );\n const beforeDocument: ItemDocument = {\n metadata: {} as ItemMetadata,\n body: \"\",\n };\n\n let hookWarnings: string[] = [];\n try {\n await writeFileAtomic(\n itemPath,\n serializeItemDocument(copiedDocument, {\n format: settings.item_format,\n schema: settings.schema,\n extensionFieldNames,\n }),\n );\n try {\n const historyEntry = createHistoryEntry({\n nowIso: copiedAt,\n author,\n op: \"create\",\n before: beforeDocument,\n after: copiedDocument,\n message: buildCopyMessage(located.id, options.message),\n });\n await appendHistoryEntry(historyPath, historyEntry);\n } catch (error: unknown) {\n await removeFileIfExists(itemPath);\n throw error;\n }\n\n hookWarnings = [\n ...(await runActiveOnWriteHooks({\n path: itemPath,\n scope: \"project\",\n op: \"create\",\n item_id: copiedDocument.metadata.id,\n item_type: copiedDocument.metadata.type,\n before: beforeDocument,\n after: copiedDocument,\n changed_fields: changedFields,\n })),\n ...(await runActiveOnWriteHooks({\n path: historyPath,\n scope: \"project\",\n op: \"create:history\",\n item_id: copiedDocument.metadata.id,\n item_type: copiedDocument.metadata.type,\n before: beforeDocument,\n after: copiedDocument,\n changed_fields: changedFields,\n })),\n ];\n recordAfterCommandAffectedItem({\n id: copiedDocument.metadata.id,\n op: \"create\",\n item_type: copiedDocument.metadata.type,\n status: copiedDocument.metadata.status,\n current: projectAfterCommandItemSnapshot(copiedDocument.metadata, changedFields),\n changed_fields: changedFields,\n });\n } finally {\n await lockRelease();\n }\n\n return {\n source_id: located.id,\n item: structuredClone(copiedDocument.metadata),\n changed_fields: changedFields,\n warnings: hookWarnings,\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AI;gBACvC,MAAM,EAAE,cAAc;gBACtB,KAAK,EAAE,cAAc;gBACrB,cAAc,EAAE,aAAa;aAC9B,CAAC,CAAC;SACJ,CAAC;QACF,8BAA8B,CAAC;YAC7B,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,EAAE;YAC9B,EAAE,EAAE,QAAQ;YACZ,SAAS,EAAE,cAAc,CAAC,QAAQ,CAAC,IAAI;YACvC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,MAAM;YACtC,OAAO,EAAE,+BAA+B,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC;YAChF,cAAc,EAAE,aAAa;SAC9B,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,MAAM,WAAW,EAAE,CAAC;IACtB,CAAC;IAED,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,EAAE;QACrB,IAAI,EAAE,eAAe,CAAC,cAAc,CAAC,QAAQ,CAAC;QAC9C,cAAc,EAAE,aAAa;QAC7B,QAAQ,EAAE,YAAY;KACvB,CAAC;AACJ,CAAC","debugId":"35ce2b1f-202f-57c1-a17d-95d1e7e06f19"}
1
+ {"version":3,"file":"copy.js","sources":["cli/commands/copy.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/copy\n *\n * Implements the pm copy command surface and its agent-facing runtime behavior.\n */\nimport { pathExists, removeFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { appendHistoryEntry, createHistoryEntry } from \"../../core/history/history.js\";\nimport { generateItemId } from \"../../core/item/id.js\";\nimport { canonicalDocument, serializeItemDocument } from \"../../core/item/item-format.js\";\nimport { acquireLock } from \"../../core/lock/lock.js\";\nimport {\n getActiveExtensionRegistrations,\n projectAfterCommandItemSnapshot,\n recordAfterCommandAffectedItem,\n runActiveOnWriteHooks,\n} from \"../../core/extensions/index.js\";\nimport { collectRegisteredItemFieldNames } from \"../../core/extensions/item-fields.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { buildItemNotFoundError, locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemDocument, ItemMetadata } from \"../../types/index.js\";\n\n/**\n * Documents the copy options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CopyOptions {\n title?: string;\n author?: string;\n message?: string;\n}\n\n/**\n * Documents the copy result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CopyResult {\n source_id: string;\n item: ItemMetadata;\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction selectAuthor(explicitAuthor: string | undefined, settingsAuthor: string): string {\n const candidate = explicitAuthor ?? process.env.PM_AUTHOR ?? settingsAuthor;\n const trimmed = candidate.trim();\n return trimmed.length > 0 ? trimmed : \"unknown\";\n}\n\nfunction buildChangedFields(frontMatter: ItemMetadata, body: string): string[] {\n const changed = [\n ...new Set([\n ...FRONT_MATTER_KEY_ORDER.filter((key) => frontMatter[key] !== undefined),\n ...Object.keys(frontMatter).filter((key) => frontMatter[key] !== undefined),\n ...(body.length > 0 ? [\"body\"] : []),\n ]),\n ];\n return changed.sort((left, right) => left.localeCompare(right));\n}\n\nfunction buildCopyMessage(sourceId: string, message: string | undefined): string {\n const suffix = `copied_from=${sourceId}`;\n if (!message) {\n return suffix;\n }\n const trimmed = message.trim();\n return trimmed.length > 0 ? `${trimmed} | ${suffix}` : suffix;\n}\n\n/**\n * Implements run copy for the public runtime surface of this module.\n */\nexport async function runCopy(sourceId: string, options: CopyOptions, global: GlobalOptions): Promise<CopyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, sourceId, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, sourceId, settings.id_prefix, typeRegistry.type_to_folder);\n }\n const sourceLoaded = await readLocatedItem(located, { schema: settings.schema });\n const sourceMetadata = sourceLoaded.document.metadata;\n const copiedAt = nowIso();\n const author = selectAuthor(options.author, settings.author_default);\n const newId = await generateItemId(pmRoot, settings.id_prefix);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const titleOverride = options.title?.trim();\n if (titleOverride !== undefined && titleOverride.length === 0) {\n throw new PmCliError(\"Copy --title must not be empty\", EXIT_CODE.USAGE);\n }\n\n const copiedMetadata: ItemMetadata = {\n ...(sourceMetadata as Record<string, unknown>),\n id: newId,\n title: titleOverride ?? sourceMetadata.title,\n status: statusRegistry.open_status,\n created_at: copiedAt,\n updated_at: copiedAt,\n } as ItemMetadata;\n delete copiedMetadata.closed_at;\n delete copiedMetadata.close_reason;\n delete copiedMetadata.test_runs;\n\n const extensionFieldNames = collectRegisteredItemFieldNames(getActiveExtensionRegistrations());\n const copiedDocument = canonicalDocument(\n {\n metadata: copiedMetadata,\n body: sourceLoaded.document.body,\n },\n {\n schema: settings.schema,\n extensionFieldNames,\n },\n );\n const changedFields = buildChangedFields(copiedDocument.metadata, copiedDocument.body);\n const itemPath = getItemPath(pmRoot, copiedDocument.metadata.type, newId, settings.item_format, typeRegistry.type_to_folder);\n const historyPath = getHistoryPath(pmRoot, newId);\n const lockRelease = await acquireLock(\n pmRoot,\n newId,\n settings.locks.ttl_seconds,\n author,\n false,\n settings.governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n );\n const beforeDocument: ItemDocument = {\n metadata: {} as ItemMetadata,\n body: \"\",\n };\n\n let hookWarnings: string[] = [];\n try {\n await writeFileAtomic(\n itemPath,\n serializeItemDocument(copiedDocument, {\n format: settings.item_format,\n schema: settings.schema,\n extensionFieldNames,\n }),\n );\n try {\n const historyEntry = createHistoryEntry({\n nowIso: copiedAt,\n author,\n op: \"create\",\n before: beforeDocument,\n after: copiedDocument,\n message: buildCopyMessage(located.id, options.message),\n });\n await appendHistoryEntry(historyPath, historyEntry);\n } catch (error: unknown) {\n await removeFileIfExists(itemPath);\n throw error;\n }\n\n hookWarnings = [\n ...(await runActiveOnWriteHooks({\n path: itemPath,\n scope: \"project\",\n op: \"create\",\n item_id: copiedDocument.metadata.id,\n item_type: copiedDocument.metadata.type,\n before: beforeDocument,\n after: copiedDocument,\n changed_fields: changedFields,\n })),\n ...(await runActiveOnWriteHooks({\n path: historyPath,\n scope: \"project\",\n op: \"create:history\",\n item_id: copiedDocument.metadata.id,\n item_type: copiedDocument.metadata.type,\n before: beforeDocument,\n after: copiedDocument,\n changed_fields: changedFields,\n })),\n ];\n recordAfterCommandAffectedItem({\n id: copiedDocument.metadata.id,\n op: \"create\",\n item_type: copiedDocument.metadata.type,\n status: copiedDocument.metadata.status,\n current: projectAfterCommandItemSnapshot(copiedDocument.metadata, changedFields),\n changed_fields: changedFields,\n });\n } finally {\n await lockRelease();\n }\n\n return {\n source_id: located.id,\n item: structuredClone(copiedDocument.metadata),\n changed_fields: changedFields,\n warnings: hookWarnings,\n };\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,qBAAq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AAQ,CAAC,IAAI;YACvC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,MAAM;YACtC,OAAO,EAAE,+BAA+B,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC;YAChF,cAAc,EAAE,aAAa;SAC9B,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,MAAM,WAAW,EAAE,CAAC;IACtB,CAAC;IAED,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,EAAE;QACrB,IAAI,EAAE,eAAe,CAAC,cAAc,CAAC,QAAQ,CAAC;QAC9C,cAAc,EAAE,aAAa;QAC7B,QAAQ,EAAE,YAAY;KACvB,CAAC;AACJ,CAAC","debugId":"9f18adf2-5e40-5104-b7fa-5b5d77ffe54b"}
@@ -2,11 +2,12 @@ import { type ResolvedItemTypeDefinition } from "../../core/item/type-registry.j
2
2
  import { type RuntimeFieldRegistry } from "../../core/schema/runtime-schema.js";
3
3
  import type { GlobalOptions } from "../../core/shared/command-types.js";
4
4
  import { type LifecycleTransitionSuggestion } from "./lifecycle-transitions.js";
5
+ import type { MutationMetadataCommandOptions, SharedLinkedResourceClearOptions, SharedLinkedResourceOptions } from "./mutation-command-options.js";
5
6
  import type { Comment, ItemMetadata, LinkedDoc, LinkedFile, LinkedTest, LogNote } from "../../types/index.js";
6
7
  /**
7
8
  * Documents the create command options payload exchanged by command, SDK, and package integrations.
8
9
  */
9
- export interface CreateCommandOptions {
10
+ export interface CreateCommandOptions extends MutationMetadataCommandOptions, SharedLinkedResourceOptions, SharedLinkedResourceClearOptions {
10
11
  title?: string;
11
12
  description?: string;
12
13
  type?: string;
@@ -15,68 +16,10 @@ export interface CreateCommandOptions {
15
16
  tags?: string;
16
17
  addTags?: string[];
17
18
  body?: string;
18
- deadline?: string;
19
- estimatedMinutes?: string;
20
- acceptanceCriteria?: string;
21
- definitionOfReady?: string;
22
- order?: string;
23
- rank?: string;
24
- goal?: string;
25
- objective?: string;
26
- value?: string;
27
- impact?: string;
28
- outcome?: string;
29
- whyNow?: string;
30
- author?: string;
31
- message?: string;
32
- assignee?: string;
33
- parent?: string;
34
19
  allowMissingParent?: boolean;
35
- reviewer?: string;
36
- risk?: string;
37
- confidence?: string;
38
- sprint?: string;
39
- release?: string;
40
- blockedBy?: string;
41
- blockedReason?: string;
42
- unblockNote?: string;
43
- reporter?: string;
44
- severity?: string;
45
- environment?: string;
46
- reproSteps?: string;
47
- resolution?: string;
48
- expectedResult?: string;
49
- actualResult?: string;
50
- affectedVersion?: string;
51
- fixedVersion?: string;
52
- component?: string;
53
- regression?: string;
54
- customerImpact?: string;
55
- dep?: string[];
56
- comment?: string[];
57
- note?: string[];
58
- learning?: string[];
59
- file?: string[];
60
- test?: string[];
61
- doc?: string[];
62
- reminder?: string[];
63
- event?: string[];
64
- typeOption?: string[];
65
- field?: string[];
66
20
  template?: string;
67
21
  createMode?: string;
68
22
  schedulePreset?: string;
69
- unset?: string[];
70
- clearDeps?: boolean;
71
- clearComments?: boolean;
72
- clearNotes?: boolean;
73
- clearLearnings?: boolean;
74
- clearFiles?: boolean;
75
- clearTests?: boolean;
76
- clearDocs?: boolean;
77
- clearReminders?: boolean;
78
- clearEvents?: boolean;
79
- clearTypeOptions?: boolean;
80
23
  [key: string]: unknown;
81
24
  }
82
25
  /**
@@ -126,6 +69,12 @@ export declare function parseDocs(raw: string[] | undefined): {
126
69
  };
127
70
  declare function buildHistoryMessage(baseMessage: string | undefined, explicitUnsets: string[]): string | undefined;
128
71
  declare function normalizeCreatePolicyOptionKey(raw: string, typeName: string, sourceLabel: string): string;
72
+ interface CreateOptionValueLookup {
73
+ scalarValues: Record<string, unknown>;
74
+ repeatableValues: Record<string, unknown>;
75
+ addTags: string[] | undefined;
76
+ }
77
+ declare function hasCreateOptionValue(lookup: CreateOptionValueLookup, optionKey: string): boolean;
129
78
  declare function collectMissingRequiredTypeOptionKeys(errors: string[], typeName: string): string[];
130
79
  declare function filterNonMissingTypeOptionErrors(errors: string[], typeName: string): string[];
131
80
  declare function typeOptionExampleValue(typeDefinition: ResolvedItemTypeDefinition, key: string): string;
@@ -149,6 +98,7 @@ export declare const _testOnlyCreateCommand: {
149
98
  createExampleTokensForFlag: typeof createExampleTokensForFlag;
150
99
  filterNonMissingTypeOptionErrors: typeof filterNonMissingTypeOptionErrors;
151
100
  hasTemplatesShowHandler: typeof hasTemplatesShowHandler;
101
+ hasCreateOptionValue: typeof hasCreateOptionValue;
152
102
  loadCreateTemplateOptionsFromRuntime: typeof loadCreateTemplateOptionsFromRuntime;
153
103
  looksLikeStructuredEntry: typeof looksLikeStructuredEntry;
154
104
  mergeCreateOptionsWithTemplate: typeof mergeCreateOptionsWithTemplate;
@@ -4,12 +4,12 @@
4
4
  * Implements the pm create command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="08a62e80-5fdd-53f6-8253-4f6eb6f166e9")}catch(e){}}();
7
+ !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]="f7516a2a-f728-55b0-99a6-50501443acb4")}catch(e){}}();
8
8
  import { pathExists, removeFileIfExists, writeFileAtomic } from "../../core/fs/fs-utils.js";
9
9
  import { appendHistoryEntry, createHistoryEntry } from "../../core/history/history.js";
10
10
  import { generateItemId, normalizeItemId } from "../../core/item/id.js";
11
11
  import { canonicalDocument, normalizeFrontMatter, serializeItemDocument } from "../../core/item/item-format.js";
12
- import { normalizeParentReferenceValue, validateMissingParentReference, } from "../../core/item/parent-reference-policy.js";
12
+ import { assertParentReferenceIsNotSelf, isPlaceholderReferenceToken, normalizeParentReferenceValue, validateMissingParentReference, } from "../../core/item/parent-reference-policy.js";
13
13
  import { validateSprintOrReleaseValue } from "../../core/item/sprint-release-format.js";
14
14
  import { assertNoUnknownCsvKeys, createStdinTokenResolver, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNumber, parseTags, } from "../../core/item/parse.js";
15
15
  import { resolvePriority } from "../../core/item/priority.js";
@@ -36,7 +36,7 @@ import { applyLegacyNoneCollectionNormalizers, assertNoLegacyNoneToken, assertNo
36
36
  import { suggestNextLifecycleTransition, } from "./lifecycle-transitions.js";
37
37
  import { parseLinkedTestAssertionEqualsMap, parseLinkedTestAssertionGteMap, parseLinkedTestBoolean, parseLinkedTestContextMode, parseLinkedTestEnvClear, parseLinkedTestEnvSet, parseLinkedTestMinLines, parseLinkedTestRegexList, parseLinkedTestStringList, } from "./linked-test-parsers.js";
38
38
  import { looksLikeStructuredLinkedTestEntry, normalizeStructuredLinkedTestEntry } from "./linked-test-entry.js";
39
- import { COMMON_UNSET_FIELD_DEFINITIONS_AFTER_AUTHOR, COMMON_UNSET_FIELD_DEFINITIONS_BEFORE_AUTHOR, resolveRuntimeUnsetFieldDefinition, } from "./shared-unset-fields.js";
39
+ import { COMMON_UNSET_FIELD_DEFINITIONS_AFTER_AUTHOR, COMMON_UNSET_FIELD_DEFINITIONS_BEFORE_AUTHOR, parseCommandUnsetTargets, resolveRuntimeUnsetFieldDefinition, } from "./shared-unset-fields.js";
40
40
  import { ensureEnumValue } from "./recurrence-parsers.js";
41
41
  import { parseEventEntries, parseReminderEntries, parseTypeOptionEntries, } from "./repeatable-metadata-parsers.js";
42
42
  import { DEPENDENCY_KIND_VALUES, ISSUE_SEVERITY_VALUES, RISK_VALUES, SCOPE_VALUES, } from "../../types/index.js";
@@ -157,27 +157,11 @@ function parseOptionalString(value) {
157
157
  return value;
158
158
  }
159
159
  function parseCreateUnsetTargets(raw, runtimeFieldRegistry) {
160
- const frontMatterKeys = new Set();
161
- const optionKeys = new Set();
162
- if (!raw || raw.length === 0) {
163
- return { frontMatterKeys, optionKeys };
164
- }
165
- for (const entry of raw) {
166
- const trimmed = entry.trim().toLowerCase();
167
- if (!trimmed) {
168
- throw new PmCliError("--unset values must not be empty", EXIT_CODE.USAGE);
169
- }
170
- if (isLegacyNoneToken(trimmed)) {
171
- throw new PmCliError('--unset no longer accepts "none" or "null". Specify concrete field names such as --unset deadline', EXIT_CODE.USAGE);
172
- }
173
- const definition = CREATE_UNSET_ALIAS_MAP.get(trimmed) ?? resolveRuntimeUnsetFieldDefinition(trimmed, "create", runtimeFieldRegistry);
174
- if (!definition) {
175
- throw new PmCliError(`Unsupported --unset field "${entry}". Supported fields: ${CREATE_UNSET_SUPPORTED_CANONICAL_FIELDS}`, EXIT_CODE.USAGE);
176
- }
177
- frontMatterKeys.add(definition.frontMatterKey);
178
- optionKeys.add(definition.optionKey);
179
- }
180
- return { frontMatterKeys, optionKeys };
160
+ return parseCommandUnsetTargets({
161
+ raw,
162
+ supportedFields: CREATE_UNSET_SUPPORTED_CANONICAL_FIELDS,
163
+ resolveDefinition: (trimmed) => CREATE_UNSET_ALIAS_MAP.get(trimmed) ?? resolveRuntimeUnsetFieldDefinition(trimmed, "create", runtimeFieldRegistry),
164
+ });
181
165
  }
182
166
  /** Allowed CSV/markdown keys for the create `--dep` seed (GH-258). */
183
167
  const DEP_SEED_KEYS = ["id", "kind", "type", "author", "created_at"];
@@ -432,6 +416,122 @@ function normalizeCreatePolicyOptionKey(raw, typeName, sourceLabel) {
432
416
  }
433
417
  return canonical;
434
418
  }
419
+ function buildCreateOptionValueLookup(options) {
420
+ return {
421
+ scalarValues: {
422
+ title: options.title,
423
+ description: options.description,
424
+ type: options.type,
425
+ status: options.status,
426
+ priority: options.priority,
427
+ tags: options.tags,
428
+ body: options.body,
429
+ deadline: options.deadline,
430
+ estimatedMinutes: options.estimatedMinutes,
431
+ acceptanceCriteria: options.acceptanceCriteria,
432
+ definitionOfReady: options.definitionOfReady,
433
+ order: options.order ?? options.rank,
434
+ goal: options.goal,
435
+ objective: options.objective,
436
+ value: options.value,
437
+ impact: options.impact,
438
+ outcome: options.outcome,
439
+ whyNow: options.whyNow,
440
+ author: options.author,
441
+ message: options.message,
442
+ assignee: options.assignee,
443
+ parent: options.parent,
444
+ reviewer: options.reviewer,
445
+ risk: options.risk,
446
+ confidence: options.confidence,
447
+ sprint: options.sprint,
448
+ release: options.release,
449
+ blockedBy: options.blockedBy,
450
+ blockedReason: options.blockedReason,
451
+ unblockNote: options.unblockNote,
452
+ reporter: options.reporter,
453
+ severity: options.severity,
454
+ environment: options.environment,
455
+ reproSteps: options.reproSteps,
456
+ resolution: options.resolution,
457
+ expectedResult: options.expectedResult,
458
+ actualResult: options.actualResult,
459
+ affectedVersion: options.affectedVersion,
460
+ fixedVersion: options.fixedVersion,
461
+ component: options.component,
462
+ regression: options.regression,
463
+ customerImpact: options.customerImpact,
464
+ },
465
+ repeatableValues: {
466
+ dep: options.dep,
467
+ comment: options.comment,
468
+ note: options.note,
469
+ learning: options.learning,
470
+ file: options.file,
471
+ test: options.test,
472
+ doc: options.doc,
473
+ reminder: options.reminder,
474
+ event: options.event,
475
+ typeOption: options.typeOption,
476
+ field: options.field,
477
+ },
478
+ addTags: options.addTags,
479
+ };
480
+ }
481
+ function hasCreateOptionValue(lookup, optionKey) {
482
+ // `--add-tags` mutates the same `tags` field as `--tags`, so it must count
483
+ // toward the `tags` command_option_policy (both the disabled guard and the
484
+ // required check) — otherwise `--add-tags` would bypass a rule disabling
485
+ // tags, or fail to satisfy a rule requiring them even though the created
486
+ // item ends up tagged.
487
+ if (optionKey === "tags") {
488
+ return lookup.scalarValues.tags !== undefined || (Array.isArray(lookup.addTags) && lookup.addTags.length > 0);
489
+ }
490
+ if (Object.prototype.hasOwnProperty.call(lookup.scalarValues, optionKey)) {
491
+ return lookup.scalarValues[optionKey] !== undefined;
492
+ }
493
+ /* c8 ignore start -- policy probes only pass canonical CREATE_COMMAND_OPTION_KEYS, all of which exist in scalarValues/repeatableValues, so the in-repeatableValues false arm and trailing return are unreachable. */
494
+ if (Object.prototype.hasOwnProperty.call(lookup.repeatableValues, optionKey)) {
495
+ const value = lookup.repeatableValues[optionKey];
496
+ return Array.isArray(value) && value.length > 0;
497
+ }
498
+ return false;
499
+ /* c8 ignore stop */
500
+ }
501
+ function buildRequiredCreateOptions(typeDefinition, createMode) {
502
+ const requiredOptions = new Set(["title", "type"]);
503
+ if (createMode !== "strict") {
504
+ return requiredOptions;
505
+ }
506
+ for (const field of typeDefinition.required_create_fields) {
507
+ requiredOptions.add(normalizeCreatePolicyOptionKey(field, typeDefinition.name, "required_create_fields"));
508
+ }
509
+ for (const field of typeDefinition.required_create_repeatables) {
510
+ requiredOptions.add(normalizeCreatePolicyOptionKey(field, typeDefinition.name, "required_create_repeatables"));
511
+ }
512
+ return requiredOptions;
513
+ }
514
+ function assertNoDisabledCreateOptions(disabledOptions, lookup, clearOptionKeys, typeName) {
515
+ for (const option of disabledOptions) {
516
+ if (!hasCreateOptionValue(lookup, option) && !clearOptionKeys.has(option)) {
517
+ continue;
518
+ }
519
+ throw new PmCliError(`Option ${commandOptionFlagLabel("create", option)} is disabled for type "${typeName}" by command_option_policies`, EXIT_CODE.USAGE);
520
+ }
521
+ }
522
+ function assertNoStrictRequiredOptionClears(requiredOptions, createMode, clearOptionKeys) {
523
+ if (createMode !== "strict") {
524
+ return;
525
+ }
526
+ const strictRequiredClears = requiredOptions.filter((required) => clearOptionKeys.has(required));
527
+ if (strictRequiredClears.length === 0) {
528
+ return;
529
+ }
530
+ /* c8 ignore next -- deterministic ordering fallback only matters when required clear list contains locale ties. */
531
+ const requiredFlags = [...new Set(strictRequiredClears.map((required) => commandOptionFlagLabel("create", required)))].sort((left, right) => left.localeCompare(right));
532
+ /* c8 ignore next -- strict clear conflict envelope is covered by policy integration scenarios. */
533
+ throw new PmCliError(`Strict create mode requires concrete values for ${requiredFlags.join(", ")}; --unset/--clear-* directives cannot satisfy required options`, EXIT_CODE.USAGE);
534
+ }
435
535
  function parseTypeOptions(raw) {
436
536
  if (!raw || raw.length === 0) {
437
537
  return { values: undefined, explicitEmpty: false };
@@ -499,112 +599,14 @@ function resolveEffectiveCreateMode(createMode, schedulePreset, defaultMode) {
499
599
  }
500
600
  function requireCreateOptionByType(typeDefinition, options, createMode, clearOptionKeys) {
501
601
  const typeName = typeDefinition.name;
502
- const scalarValues = {
503
- title: options.title,
504
- description: options.description,
505
- type: options.type,
506
- status: options.status,
507
- priority: options.priority,
508
- tags: options.tags,
509
- body: options.body,
510
- deadline: options.deadline,
511
- estimatedMinutes: options.estimatedMinutes,
512
- acceptanceCriteria: options.acceptanceCriteria,
513
- definitionOfReady: options.definitionOfReady,
514
- order: options.order ?? options.rank,
515
- goal: options.goal,
516
- objective: options.objective,
517
- value: options.value,
518
- impact: options.impact,
519
- outcome: options.outcome,
520
- whyNow: options.whyNow,
521
- author: options.author,
522
- message: options.message,
523
- assignee: options.assignee,
524
- parent: options.parent,
525
- reviewer: options.reviewer,
526
- risk: options.risk,
527
- confidence: options.confidence,
528
- sprint: options.sprint,
529
- release: options.release,
530
- blockedBy: options.blockedBy,
531
- blockedReason: options.blockedReason,
532
- unblockNote: options.unblockNote,
533
- reporter: options.reporter,
534
- severity: options.severity,
535
- environment: options.environment,
536
- reproSteps: options.reproSteps,
537
- resolution: options.resolution,
538
- expectedResult: options.expectedResult,
539
- actualResult: options.actualResult,
540
- affectedVersion: options.affectedVersion,
541
- fixedVersion: options.fixedVersion,
542
- component: options.component,
543
- regression: options.regression,
544
- customerImpact: options.customerImpact,
545
- };
546
- const repeatableValues = {
547
- dep: options.dep,
548
- comment: options.comment,
549
- note: options.note,
550
- learning: options.learning,
551
- file: options.file,
552
- test: options.test,
553
- doc: options.doc,
554
- reminder: options.reminder,
555
- event: options.event,
556
- typeOption: options.typeOption,
557
- field: options.field,
558
- };
559
- const hasOptionValue = (optionKey) => {
560
- // `--add-tags` mutates the same `tags` field as `--tags`, so it must count
561
- // toward the `tags` command_option_policy (both the disabled guard and the
562
- // required check) — otherwise `--add-tags` would bypass a rule disabling
563
- // tags, or fail to satisfy a rule requiring them even though the created
564
- // item ends up tagged.
565
- if (optionKey === "tags") {
566
- return scalarValues.tags !== undefined || (Array.isArray(options.addTags) && options.addTags.length > 0);
567
- }
568
- if (optionKey in scalarValues) {
569
- return scalarValues[optionKey] !== undefined;
570
- }
571
- /* c8 ignore start -- policy probes only pass canonical CREATE_COMMAND_OPTION_KEYS, all of which exist in scalarValues/repeatableValues, so the in-repeatableValues false arm and trailing return are unreachable. */
572
- if (optionKey in repeatableValues) {
573
- const value = repeatableValues[optionKey];
574
- return Array.isArray(value) && value.length > 0;
575
- }
576
- return false;
577
- /* c8 ignore stop */
578
- };
579
- /* c8 ignore next -- policy probes only pass normalized option keys in command-level tests. */
580
- const hasOptionMutation = (optionKey) => hasOptionValue(optionKey) || clearOptionKeys.has(optionKey);
581
- const baseRequiredOptions = new Set(["title", "type"]);
582
- if (createMode === "strict") {
583
- for (const field of typeDefinition.required_create_fields) {
584
- baseRequiredOptions.add(normalizeCreatePolicyOptionKey(field, typeName, "required_create_fields"));
585
- }
586
- for (const field of typeDefinition.required_create_repeatables) {
587
- baseRequiredOptions.add(normalizeCreatePolicyOptionKey(field, typeName, "required_create_repeatables"));
588
- }
589
- }
602
+ const optionLookup = buildCreateOptionValueLookup(options);
603
+ const baseRequiredOptions = buildRequiredCreateOptions(typeDefinition, createMode);
590
604
  const policyState = resolveCommandOptionPolicyState(typeDefinition, "create", baseRequiredOptions);
591
605
  if (policyState.errors.length > 0) {
592
606
  throw new PmCliError(policyState.errors.join("; "), EXIT_CODE.CONFLICT);
593
607
  }
594
- for (const option of policyState.disabled) {
595
- if (hasOptionMutation(option)) {
596
- throw new PmCliError(`Option ${commandOptionFlagLabel("create", option)} is disabled for type "${typeName}" by command_option_policies`, EXIT_CODE.USAGE);
597
- }
598
- }
599
- if (createMode === "strict") {
600
- const strictRequiredClears = policyState.required.filter((required) => clearOptionKeys.has(required));
601
- if (strictRequiredClears.length > 0) {
602
- /* c8 ignore next -- deterministic ordering fallback only matters when required clear list contains locale ties. */
603
- const requiredFlags = [...new Set(strictRequiredClears.map((required) => commandOptionFlagLabel("create", required)))].sort((left, right) => left.localeCompare(right));
604
- /* c8 ignore next -- strict clear conflict envelope is covered by policy integration scenarios. */
605
- throw new PmCliError(`Strict create mode requires concrete values for ${requiredFlags.join(", ")}; --unset/--clear-* directives cannot satisfy required options`, EXIT_CODE.USAGE);
606
- }
607
- }
608
+ assertNoDisabledCreateOptions(policyState.disabled, optionLookup, clearOptionKeys, typeName);
609
+ assertNoStrictRequiredOptionClears(policyState.required, createMode, clearOptionKeys);
608
610
  // A configured per-type default_status satisfies a required `status` policy:
609
611
  // when --status is omitted, runCreate resolves to that default (or degrades to
610
612
  // the workflow open status), so blocking the agent for a "missing --status"
@@ -615,7 +617,7 @@ function requireCreateOptionByType(typeDefinition, options, createMode, clearOpt
615
617
  if (optionKey === "status" && typeDefinition.default_status !== undefined) {
616
618
  return true;
617
619
  }
618
- return hasOptionValue(optionKey);
620
+ return hasCreateOptionValue(optionLookup, optionKey);
619
621
  };
620
622
  const missingRequiredOptions = policyState.required.filter((required) => !satisfiesRequiredOption(required));
621
623
  return [...new Set(missingRequiredOptions.map((required) => commandOptionFlagLabel("create", required)))].sort((left, right) => left.localeCompare(right));
@@ -880,8 +882,9 @@ async function inheritFocusedParent(parent, resolvedOptions, unsetKeys, pmRoot)
880
882
  * value plus any never-blocking missing-parent warnings the configured
881
883
  * `parent_reference` policy produces when the target does not resolve.
882
884
  */
883
- async function validateCreateParentReference(pmRoot, settings, typeRegistry, parent, policy) {
885
+ async function validateCreateParentReference(pmRoot, settings, typeRegistry, itemId, parent, policy) {
884
886
  const normalized = normalizeParentReferenceValue(parent);
887
+ assertParentReferenceIsNotSelf(itemId, normalized, settings.id_prefix);
885
888
  const parentLocated = await locateItem(pmRoot, normalized, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
886
889
  if (parentLocated) {
887
890
  return { parent: normalized, warnings: [] };
@@ -893,9 +896,26 @@ async function resolveCreateParentWithWarnings(params) {
893
896
  if (params.parent === undefined) {
894
897
  return { parent: undefined, warnings: [] };
895
898
  }
896
- const parentValidation = await validateCreateParentReference(params.pmRoot, params.settings, params.typeRegistry, params.parent, params.policy);
899
+ const parentValidation = await validateCreateParentReference(params.pmRoot, params.settings, params.typeRegistry, params.itemId, params.parent, params.policy);
897
900
  return parentValidation;
898
901
  }
902
+ async function resolveCreateItemId(params) {
903
+ if (params.explicitId === undefined) {
904
+ return generateItemId(params.pmRoot, params.settings.id_prefix);
905
+ }
906
+ if (typeof params.explicitId !== "string") {
907
+ throw new PmCliError("--id must be a string", EXIT_CODE.USAGE);
908
+ }
909
+ const trimmedId = params.explicitId.trim();
910
+ if (trimmedId.length === 0 || isPlaceholderReferenceToken(trimmedId)) {
911
+ throw new PmCliError("--id must not be empty or use a placeholder token", EXIT_CODE.USAGE);
912
+ }
913
+ const normalizedId = normalizeItemId(trimmedId, params.settings.id_prefix);
914
+ if (!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/.test(normalizedId)) {
915
+ throw new PmCliError("--id must contain only letters, numbers, and dashes after normalization", EXIT_CODE.USAGE);
916
+ }
917
+ return normalizedId;
918
+ }
899
919
  /**
900
920
  * Resolve a sprint or release field: `undefined` when cleared/absent, otherwise
901
921
  * the format-validated value plus any never-blocking format warnings from the
@@ -1284,9 +1304,13 @@ async function writeCreatedItem(params) {
1284
1304
  const { pmRoot, type, id, settings, typeRegistry, author, extensionFieldNames, afterDocument, beforeDocument, historyMessage, changedFields, nowValue } = params;
1285
1305
  const itemPath = getItemPath(pmRoot, type, id, settings.item_format, typeRegistry.type_to_folder);
1286
1306
  const historyPath = getHistoryPath(pmRoot, id);
1287
- const lockRelease = await acquireLock(pmRoot, id, settings.locks.ttl_seconds, author, false, settings.governance.force_required_for_stale_lock);
1307
+ const lockRelease = await acquireLock(pmRoot, id, settings.locks.ttl_seconds, author, false, settings.governance.force_required_for_stale_lock, settings.locks.wait_ms);
1288
1308
  let hookWarnings = [];
1289
1309
  try {
1310
+ const existing = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
1311
+ if (existing) {
1312
+ throw new PmCliError(`Item "${id}" already exists`, EXIT_CODE.CONFLICT);
1313
+ }
1290
1314
  await writeFileAtomic(itemPath, serializeItemDocument(afterDocument, { format: settings.item_format, schema: settings.schema, extensionFieldNames }));
1291
1315
  try {
1292
1316
  const entry = createHistoryEntry({ nowIso: nowValue, author, op: "create", before: beforeDocument, after: afterDocument, message: historyMessage });
@@ -1389,7 +1413,11 @@ export async function runCreate(options, global) {
1389
1413
  createMode,
1390
1414
  });
1391
1415
  assertNoInvalidTypeOptions(validatedTypeOptions.errors, type, typeDefinition, statusRegistry);
1392
- const id = await generateItemId(pmRoot, settings.id_prefix);
1416
+ const id = await resolveCreateItemId({
1417
+ pmRoot,
1418
+ settings,
1419
+ explicitId: resolvedOptions.id,
1420
+ });
1393
1421
  let status = resolvedOptions.status !== undefined
1394
1422
  ? parseStatusValue(resolvedOptions.status, statusRegistry)
1395
1423
  : resolveCreateDefaultStatus(typeDefinition, statusRegistry);
@@ -1426,6 +1454,7 @@ export async function runCreate(options, global) {
1426
1454
  const sprintReleasePolicy = settings.validation.sprint_release_format;
1427
1455
  const validationWarnings = collectCreateScheduleWarnings(type, id, deadline, reminders.values, events.values);
1428
1456
  const parentValidation = await resolveCreateParentWithWarnings({
1457
+ itemId: id,
1429
1458
  parent,
1430
1459
  pmRoot,
1431
1460
  settings,
@@ -1603,6 +1632,7 @@ export const _testOnlyCreateCommand = {
1603
1632
  createExampleTokensForFlag,
1604
1633
  filterNonMissingTypeOptionErrors,
1605
1634
  hasTemplatesShowHandler,
1635
+ hasCreateOptionValue,
1606
1636
  loadCreateTemplateOptionsFromRuntime,
1607
1637
  looksLikeStructuredEntry,
1608
1638
  mergeCreateOptionsWithTemplate,
@@ -1616,4 +1646,4 @@ export const _testOnlyCreateCommand = {
1616
1646
  typeOptionExampleValue,
1617
1647
  };
1618
1648
  //# sourceMappingURL=create.js.map
1619
- //# debugId=08a62e80-5fdd-53f6-8253-4f6eb6f166e9
1649
+ //# debugId=f7516a2a-f728-55b0-99a6-50501443acb4