@unbrained/pm-cli 2026.6.9 → 2026.6.11

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 (529) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +59 -0
  3. package/README.md +1 -1
  4. package/dist/cli/bootstrap-args.d.ts +11 -0
  5. package/dist/cli/bootstrap-args.js +90 -4
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commands/aggregate.d.ts +7 -0
  8. package/dist/cli/commands/aggregate.js +53 -12
  9. package/dist/cli/commands/aggregate.js.map +1 -1
  10. package/dist/cli/commands/close.d.ts +1 -0
  11. package/dist/cli/commands/close.js +106 -3
  12. package/dist/cli/commands/close.js.map +1 -1
  13. package/dist/cli/commands/completion.js +20 -7
  14. package/dist/cli/commands/completion.js.map +1 -1
  15. package/dist/cli/commands/context.d.ts +9 -0
  16. package/dist/cli/commands/context.js +149 -20
  17. package/dist/cli/commands/context.js.map +1 -1
  18. package/dist/cli/commands/contracts.d.ts +2 -0
  19. package/dist/cli/commands/contracts.js +9 -2
  20. package/dist/cli/commands/contracts.js.map +1 -1
  21. package/dist/cli/commands/create.d.ts +1 -0
  22. package/dist/cli/commands/create.js +5 -3
  23. package/dist/cli/commands/create.js.map +1 -1
  24. package/dist/cli/commands/extension.js +4 -2
  25. package/dist/cli/commands/extension.js.map +1 -1
  26. package/dist/cli/commands/health.js +44 -6
  27. package/dist/cli/commands/health.js.map +1 -1
  28. package/dist/cli/commands/history.js +6 -5
  29. package/dist/cli/commands/history.js.map +1 -1
  30. package/dist/cli/commands/linked-test-parsers.d.ts +1 -0
  31. package/dist/cli/commands/linked-test-parsers.js +289 -2
  32. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  33. package/dist/cli/commands/reindex.d.ts +1 -0
  34. package/dist/cli/commands/reindex.js +33 -4
  35. package/dist/cli/commands/reindex.js.map +1 -1
  36. package/dist/cli/commands/test.d.ts +6 -0
  37. package/dist/cli/commands/test.js +46 -5
  38. package/dist/cli/commands/test.js.map +1 -1
  39. package/dist/cli/error-guidance.d.ts +8 -0
  40. package/dist/cli/error-guidance.js +102 -2
  41. package/dist/cli/error-guidance.js.map +1 -1
  42. package/dist/cli/extension-command-help.d.ts +1 -0
  43. package/dist/cli/extension-command-help.js +42 -2
  44. package/dist/cli/extension-command-help.js.map +1 -1
  45. package/dist/cli/extension-command-options.d.ts +2 -0
  46. package/dist/cli/extension-command-options.js +51 -2
  47. package/dist/cli/extension-command-options.js.map +1 -1
  48. package/dist/cli/main.js +26 -26
  49. package/dist/cli/main.js.map +1 -1
  50. package/dist/cli/register-list-query.js +3 -2
  51. package/dist/cli/register-list-query.js.map +1 -1
  52. package/dist/cli/register-mutation.js +4 -2
  53. package/dist/cli/register-mutation.js.map +1 -1
  54. package/dist/cli/register-operations.js +15 -6
  55. package/dist/cli/register-operations.js.map +1 -1
  56. package/dist/cli/registration-helpers.js +9 -2
  57. package/dist/cli/registration-helpers.js.map +1 -1
  58. package/dist/cli-bundle/chunks/{activity-RUJATACW.js → activity-XADJOG6G.js} +11 -11
  59. package/dist/cli-bundle/chunks/activity-XZIUPGZH.js +16 -0
  60. package/dist/cli-bundle/chunks/{aggregate-TT7OCHHT.js → aggregate-6OTS3AOO.js} +65 -24
  61. package/dist/cli-bundle/chunks/aggregate-6OTS3AOO.js.map +1 -0
  62. package/dist/cli-bundle/chunks/{aggregate-IQ27NFBI.js → aggregate-OD36DJU5.js} +64 -23
  63. package/dist/cli-bundle/chunks/aggregate-OD36DJU5.js.map +7 -0
  64. package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js → append-JYWO4P7W.js} +8 -8
  65. package/dist/cli-bundle/chunks/{append-CWQZBUWV.js → append-KG55G7S3.js} +8 -8
  66. package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js → chunk-3KLPFWZ4.js} +8 -8
  67. package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js.map → chunk-3KLPFWZ4.js.map} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js → chunk-3SLOMKCJ.js} +12 -12
  69. package/dist/cli-bundle/chunks/chunk-4HFU4UO2.js +518 -0
  70. package/dist/cli-bundle/chunks/chunk-4HFU4UO2.js.map +1 -0
  71. package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js → chunk-4JCSYR6F.js} +3 -3
  72. package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js → chunk-4YFAGDRH.js} +8 -8
  73. package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js → chunk-5SCT2JCT.js} +2 -2
  74. package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js → chunk-73ZPG2I3.js} +3 -3
  75. package/dist/cli-bundle/chunks/{chunk-D5D7VKIC.js → chunk-7IYFN5R7.js} +6 -5
  76. package/dist/cli-bundle/chunks/chunk-7IYFN5R7.js.map +1 -0
  77. package/dist/cli-bundle/chunks/{chunk-A5342JVL.js → chunk-7RIT3OCD.js} +12 -12
  78. package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js → chunk-7UGSRQCL.js} +76 -74
  79. package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js.map → chunk-7UGSRQCL.js.map} +3 -3
  80. package/dist/cli-bundle/chunks/{chunk-5JF76OJF.js → chunk-A6LXQFO7.js} +290 -25
  81. package/dist/cli-bundle/chunks/chunk-A6LXQFO7.js.map +1 -0
  82. package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js → chunk-ATEES5SX.js} +2 -2
  83. package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js → chunk-AVGHVVF7.js} +3 -3
  84. package/dist/cli-bundle/chunks/{chunk-T7B5VAKD.js → chunk-B65UUCGQ.js} +13 -6
  85. package/dist/cli-bundle/chunks/chunk-B65UUCGQ.js.map +7 -0
  86. package/dist/cli-bundle/chunks/{chunk-42IULX44.js → chunk-CCX4RSYZ.js} +2 -2
  87. package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js → chunk-CW6E4NAT.js} +8 -8
  88. package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js → chunk-DY6C42S6.js} +9 -9
  89. package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js → chunk-E5DUIJA4.js} +5 -5
  90. package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js → chunk-ESANVZF4.js} +3 -3
  91. package/dist/cli-bundle/chunks/{chunk-WQZCEEQN.js → chunk-EWFY7SLA.js} +157 -12
  92. package/dist/cli-bundle/chunks/chunk-EWFY7SLA.js.map +1 -0
  93. package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js → chunk-F75JSIOZ.js} +6 -6
  94. package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js → chunk-FDH2X65L.js} +2 -2
  95. package/dist/cli-bundle/chunks/{chunk-GPOSGWCN.js → chunk-FXRU333M.js} +68 -7
  96. package/dist/cli-bundle/chunks/chunk-FXRU333M.js.map +1 -0
  97. package/dist/cli-bundle/chunks/{chunk-C72IQIBT.js → chunk-FY4SPXSC.js} +302 -30
  98. package/dist/cli-bundle/chunks/chunk-FY4SPXSC.js.map +7 -0
  99. package/dist/cli-bundle/chunks/{chunk-TLD3UYGY.js → chunk-GKIZW7SM.js} +5 -4
  100. package/dist/cli-bundle/chunks/chunk-GKIZW7SM.js.map +7 -0
  101. package/dist/cli-bundle/chunks/{chunk-YSANBZAE.js → chunk-GWZSYR6X.js} +12 -5
  102. package/dist/cli-bundle/chunks/chunk-GWZSYR6X.js.map +7 -0
  103. package/dist/cli-bundle/chunks/{chunk-FJNJEWU4.js → chunk-HGLC63AU.js} +14 -12
  104. package/dist/cli-bundle/chunks/chunk-HGLC63AU.js.map +1 -0
  105. package/dist/cli-bundle/chunks/{chunk-RLVI7KDW.js → chunk-HHHJ2GI3.js} +163 -11
  106. package/dist/cli-bundle/chunks/chunk-HHHJ2GI3.js.map +7 -0
  107. package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js → chunk-HI7STVF2.js} +9 -9
  108. package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js.map → chunk-HI7STVF2.js.map} +1 -1
  109. package/dist/cli-bundle/chunks/{chunk-ANKG2JKL.js → chunk-I2IJY2NL.js} +12 -5
  110. package/dist/cli-bundle/chunks/chunk-I2IJY2NL.js.map +1 -0
  111. package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js → chunk-I53JBTJW.js} +6 -6
  112. package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js → chunk-I7NYDZDV.js} +2 -2
  113. package/dist/cli-bundle/chunks/{chunk-EQ6N6IDR.js → chunk-IGVJRZ6H.js} +13 -11
  114. package/dist/cli-bundle/chunks/chunk-IGVJRZ6H.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-JVMAOD54.js → chunk-IH4MBKK7.js} +14 -7
  116. package/dist/cli-bundle/chunks/chunk-IH4MBKK7.js.map +1 -0
  117. package/dist/cli-bundle/chunks/{chunk-BIRVSIM2.js → chunk-IKOH24GZ.js} +14 -14
  118. package/dist/cli-bundle/chunks/chunk-IKOH24GZ.js.map +7 -0
  119. package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js → chunk-IUKD4W6Z.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-3RHE76G6.js → chunk-J3GD64J2.js} +15 -15
  121. package/dist/cli-bundle/chunks/chunk-J3GD64J2.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js → chunk-KWAXVAXX.js} +7 -5
  123. package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js.map → chunk-KWAXVAXX.js.map} +2 -2
  124. package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js → chunk-LCSCXBGT.js} +15 -5
  125. package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js.map → chunk-LCSCXBGT.js.map} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js → chunk-OASDW5UI.js} +7 -7
  127. package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js → chunk-OLKBSY4N.js} +2 -2
  128. package/dist/cli-bundle/chunks/{chunk-4LRVXVJK.js → chunk-P2PSODAQ.js} +70 -9
  129. package/dist/cli-bundle/chunks/chunk-P2PSODAQ.js.map +7 -0
  130. package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js → chunk-P5BJOMBB.js} +9 -9
  131. package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js → chunk-P5U5EOMA.js} +3 -3
  132. package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js → chunk-PSD7F7DX.js} +5 -5
  133. package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js → chunk-QJMGRZO2.js} +3 -3
  134. package/dist/cli-bundle/chunks/{chunk-7YTWXGE3.js → chunk-QKW5D45B.js} +112 -7
  135. package/dist/cli-bundle/chunks/chunk-QKW5D45B.js.map +1 -0
  136. package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js → chunk-QNJSITCX.js} +7 -7
  137. package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js → chunk-RXAP6JL5.js} +9 -9
  138. package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js → chunk-S26FESD4.js} +3 -3
  139. package/dist/cli-bundle/chunks/{chunk-I26E6XA7.js → chunk-S2ZLDYGS.js} +8 -6
  140. package/dist/cli-bundle/chunks/chunk-S2ZLDYGS.js.map +1 -0
  141. package/dist/cli-bundle/chunks/chunk-SXKNJPQ7.js +528 -0
  142. package/dist/cli-bundle/chunks/chunk-SXKNJPQ7.js.map +7 -0
  143. package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js → chunk-TK5VZFHY.js} +7 -7
  144. package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js → chunk-TNAP7EJX.js} +2 -2
  145. package/dist/cli-bundle/chunks/{chunk-I4FGL3K2.js → chunk-UOO6BYIA.js} +16 -6
  146. package/dist/cli-bundle/chunks/chunk-UOO6BYIA.js.map +1 -0
  147. package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js → chunk-UUWGCWBU.js} +3 -3
  148. package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js → chunk-VAOUX6TK.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-RMTI5R76.js → chunk-VFUZV5EB.js} +111 -6
  150. package/dist/cli-bundle/chunks/chunk-VFUZV5EB.js.map +7 -0
  151. package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js → chunk-VPEAS7PS.js} +2 -2
  152. package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js → chunk-VSRZRLG3.js} +3 -3
  153. package/dist/cli-bundle/chunks/{chunk-PW7C262O.js → chunk-WUNFKP7M.js} +2 -2
  154. package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js → chunk-XJDGS74Y.js} +71 -69
  155. package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js.map → chunk-XJDGS74Y.js.map} +1 -1
  156. package/dist/cli-bundle/chunks/{chunk-H37YPWLM.js → chunk-XMBI6TNW.js} +13 -7
  157. package/dist/cli-bundle/chunks/chunk-XMBI6TNW.js.map +7 -0
  158. package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js → chunk-XTKJSVWH.js} +2 -2
  159. package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js → chunk-XUC4C4PT.js} +3 -3
  160. package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js → chunk-Y3YKK7CY.js} +2 -2
  161. package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js → chunk-YW6Q3RYZ.js} +7 -7
  162. package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js → chunk-ZLMIWZUG.js} +2 -2
  163. package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js → chunk-ZMW77VWV.js} +9 -9
  164. package/dist/cli-bundle/chunks/{chunk-NJRZIJ4N.js → chunk-ZYNJNPYD.js} +14 -8
  165. package/dist/cli-bundle/chunks/chunk-ZYNJNPYD.js.map +1 -0
  166. package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js → claim-2RDYMCTP.js} +10 -10
  167. package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js → claim-MJ7DZFC3.js} +10 -10
  168. package/dist/cli-bundle/chunks/close-4FMAPEMY.js +13 -0
  169. package/dist/cli-bundle/chunks/{close-O4JK2JKD.js → close-XLEKIQSW.js} +8 -8
  170. package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js → close-many-AOD4HSAZ.js} +15 -15
  171. package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js → close-many-XKAQY5CQ.js} +15 -15
  172. package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js → comments-B4RWWDJT.js} +10 -10
  173. package/dist/cli-bundle/chunks/{comments-OMB7YE27.js → comments-RN5TG4ZN.js} +10 -10
  174. package/dist/cli-bundle/chunks/{config-5VPR42A6.js → config-3JXJ3XZ7.js} +8 -8
  175. package/dist/cli-bundle/chunks/{config-NNLXVGVC.js → config-FZ4UDC4B.js} +8 -8
  176. package/dist/cli-bundle/chunks/{context-4QK6GRXO.js → context-L36PIN35.js} +146 -33
  177. package/dist/cli-bundle/chunks/{context-4QK6GRXO.js.map → context-L36PIN35.js.map} +2 -2
  178. package/dist/cli-bundle/chunks/{context-4N7GYTVQ.js → context-QBPO3BFM.js} +147 -34
  179. package/dist/cli-bundle/chunks/context-QBPO3BFM.js.map +1 -0
  180. package/dist/cli-bundle/chunks/{contracts-DXCWXOSP.js → contracts-3NKWYKKU.js} +309 -6
  181. package/dist/cli-bundle/chunks/contracts-3NKWYKKU.js.map +1 -0
  182. package/dist/cli-bundle/chunks/{contracts-AOBNEBVT.js → contracts-MIXBWJIB.js} +315 -5
  183. package/dist/cli-bundle/chunks/contracts-MIXBWJIB.js.map +7 -0
  184. package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js → copy-ALU5WMHA.js} +7 -7
  185. package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js → copy-FWIVTLBO.js} +7 -7
  186. package/dist/cli-bundle/chunks/{create-FCCAATQV.js → create-IFA26O2I.js} +13 -13
  187. package/dist/cli-bundle/chunks/create-JVXYHYH4.js +27 -0
  188. package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js → delete-IYTIYAJS.js} +7 -7
  189. package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js → delete-Y2SGJBGY.js} +7 -7
  190. package/dist/cli-bundle/chunks/{deps-S5322EOQ.js → deps-6TSPOSGU.js} +7 -7
  191. package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js → deps-CZ4PTVXU.js} +7 -7
  192. package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js → docs-5WMBVQT2.js} +9 -9
  193. package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js → docs-MB53UJAJ.js} +9 -9
  194. package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js → extension-Q34OEWO5.js} +5 -5
  195. package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js → extension-WH2FOIOZ.js} +5 -5
  196. package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js → files-DLB5LJEP.js} +9 -9
  197. package/dist/cli-bundle/chunks/{files-OBWYYPKM.js → files-GVMNVLCB.js} +9 -9
  198. package/dist/cli-bundle/chunks/{gc-FA2ONELT.js → gc-2WEPW6D6.js} +3 -3
  199. package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js → gc-4Z3IKHAZ.js} +3 -3
  200. package/dist/cli-bundle/chunks/{get-PNTSONGB.js → get-PCHS7RA6.js} +11 -11
  201. package/dist/cli-bundle/chunks/{get-FLHYTOBA.js → get-QARTE6BL.js} +11 -11
  202. package/dist/cli-bundle/chunks/{health-CS5RNTJX.js → health-4ZYB3IYQ.js} +47 -19
  203. package/dist/cli-bundle/chunks/health-4ZYB3IYQ.js.map +1 -0
  204. package/dist/cli-bundle/chunks/{health-KCRVYIYY.js → health-YO5LRWN4.js} +46 -18
  205. package/dist/cli-bundle/chunks/health-YO5LRWN4.js.map +7 -0
  206. package/dist/cli-bundle/chunks/{history-COQTPBEU.js → history-7WUAEWHW.js} +10 -10
  207. package/dist/cli-bundle/chunks/history-L2FQFRTU.js +20 -0
  208. package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js → history-compact-3EJ3L2O7.js} +11 -11
  209. package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js → history-compact-LW27IPFK.js} +11 -11
  210. package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js → history-redact-G72A4EJ4.js} +11 -11
  211. package/dist/cli-bundle/chunks/history-redact-QWQCX5DZ.js +19 -0
  212. package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js → history-repair-KVPFJKOS.js} +11 -11
  213. package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js → history-repair-RUGKD3YR.js} +11 -11
  214. package/dist/cli-bundle/chunks/init-4BKRHGWW.js +17 -0
  215. package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js → init-S5WEGUJY.js} +9 -9
  216. package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js → learnings-HQXSSKZ5.js} +10 -10
  217. package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js → learnings-XK3P4ZDR.js} +10 -10
  218. package/dist/cli-bundle/chunks/{list-NJV6WBT4.js → list-6CL3XFT6.js} +10 -10
  219. package/dist/cli-bundle/chunks/list-BYNN4ZEO.js +19 -0
  220. package/dist/cli-bundle/chunks/{notes-2KWHADK3.js → notes-5T6P7C5V.js} +10 -10
  221. package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js → notes-U5FZCSBT.js} +10 -10
  222. package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js → plan-FQLMJRLZ.js} +13 -13
  223. package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js → plan-VNUG3WZZ.js} +13 -13
  224. package/dist/cli-bundle/chunks/{register-list-query-6RA24SIZ.js → register-list-query-NPE3ECJQ.js} +21 -21
  225. package/dist/cli-bundle/chunks/register-list-query-NPE3ECJQ.js.map +1 -0
  226. package/dist/cli-bundle/chunks/{register-list-query-IO3RR5K6.js → register-list-query-VHDXWEPP.js} +20 -20
  227. package/dist/cli-bundle/chunks/register-list-query-VHDXWEPP.js.map +7 -0
  228. package/dist/cli-bundle/chunks/{register-mutation-VV2SC2KL.js → register-mutation-DG53FCBV.js} +36 -35
  229. package/dist/cli-bundle/chunks/register-mutation-DG53FCBV.js.map +1 -0
  230. package/dist/cli-bundle/chunks/{register-mutation-KVFUXCAZ.js → register-mutation-EAYNLGOS.js} +35 -34
  231. package/dist/cli-bundle/chunks/register-mutation-EAYNLGOS.js.map +7 -0
  232. package/dist/cli-bundle/chunks/{register-operations-DFNVRSJ5.js → register-operations-AM6KTWB6.js} +42 -37
  233. package/dist/cli-bundle/chunks/register-operations-AM6KTWB6.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{register-operations-TAUUTRJ4.js → register-operations-FWFE64JG.js} +41 -36
  235. package/dist/cli-bundle/chunks/register-operations-FWFE64JG.js.map +7 -0
  236. package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js → register-setup-G4QYI3RX.js} +15 -15
  237. package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js → register-setup-IKX5524L.js} +15 -15
  238. package/dist/cli-bundle/chunks/restore-CHIOQAQL.js +17 -0
  239. package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js → restore-M6AFHMV4.js} +11 -11
  240. package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js → schema-76HDZJCC.js} +8 -8
  241. package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js → schema-AINZ2IMM.js} +8 -8
  242. package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js → search-JMLFQEPJ.js} +10 -10
  243. package/dist/cli-bundle/chunks/{search-2T3NCCUR.js → search-NL3TSCYB.js} +10 -10
  244. package/dist/cli-bundle/chunks/{stats-6LVK4JER.js → stats-BKXCBIGT.js} +7 -7
  245. package/dist/cli-bundle/chunks/{stats-ULGQACF7.js → stats-UBD56TGK.js} +7 -7
  246. package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js → telemetry-N454RHG5.js} +4 -4
  247. package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js → telemetry-ZJXK3H7X.js} +4 -4
  248. package/dist/cli-bundle/chunks/{test-2PP4YBV6.js → test-BQAKIXAT.js} +14 -14
  249. package/dist/cli-bundle/chunks/test-O74JFUH5.js +32 -0
  250. package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js → test-all-7LV3I6S5.js} +14 -14
  251. package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js → test-all-TDYCCBA4.js} +14 -14
  252. package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js → test-runs-E64M6XS3.js} +5 -5
  253. package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js → test-runs-LXZLULCI.js} +5 -5
  254. package/dist/cli-bundle/chunks/update-2EVXOC7V.js +21 -0
  255. package/dist/cli-bundle/chunks/update-5A2B6QYB.js +25 -0
  256. package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js → update-many-TUGU5YXQ.js} +22 -22
  257. package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js → update-many-V4LA3C4H.js} +22 -22
  258. package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js → upgrade-37F7JKES.js} +5 -5
  259. package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js → upgrade-L32JA4TZ.js} +5 -5
  260. package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js → validate-EQTT6WVX.js} +16 -16
  261. package/dist/cli-bundle/chunks/{validate-J6Q444SD.js → validate-XN4I4DPL.js} +16 -16
  262. package/dist/cli-bundle/main.js +276 -47
  263. package/dist/cli-bundle/main.js.map +2 -2
  264. package/dist/core/diagnostics/remediation.js +12 -2
  265. package/dist/core/diagnostics/remediation.js.map +1 -1
  266. package/dist/core/extensions/extension-policy.d.ts +14 -1
  267. package/dist/core/extensions/extension-policy.js +38 -3
  268. package/dist/core/extensions/extension-policy.js.map +1 -1
  269. package/dist/core/extensions/extension-types.d.ts +40 -1
  270. package/dist/core/extensions/extension-types.js +28 -2
  271. package/dist/core/extensions/extension-types.js.map +1 -1
  272. package/dist/core/extensions/loader.d.ts +6 -4
  273. package/dist/core/extensions/loader.js +67 -14
  274. package/dist/core/extensions/loader.js.map +1 -1
  275. package/dist/core/history/replay.d.ts +1 -1
  276. package/dist/core/history/replay.js +13 -4
  277. package/dist/core/history/replay.js.map +1 -1
  278. package/dist/core/output/mutation-projection.d.ts +2 -0
  279. package/dist/core/output/mutation-projection.js +9 -2
  280. package/dist/core/output/mutation-projection.js.map +1 -1
  281. package/dist/core/output/output.d.ts +2 -0
  282. package/dist/core/output/output.js +7 -3
  283. package/dist/core/output/output.js.map +1 -1
  284. package/dist/core/output/query-summary.d.ts +31 -0
  285. package/dist/core/output/query-summary.js +62 -0
  286. package/dist/core/output/query-summary.js.map +1 -0
  287. package/dist/core/shared/command-types.d.ts +1 -0
  288. package/dist/core/shared/command-types.js +2 -2
  289. package/dist/core/shared/command-types.js.map +1 -1
  290. package/dist/core/shared/constants.js +8 -4
  291. package/dist/core/shared/constants.js.map +1 -1
  292. package/dist/core/store/item-store.d.ts +1 -1
  293. package/dist/core/store/item-store.js +3 -3
  294. package/dist/core/store/item-store.js.map +1 -1
  295. package/dist/core/store/settings-read-cache.d.ts +15 -0
  296. package/dist/core/store/settings-read-cache.js +72 -0
  297. package/dist/core/store/settings-read-cache.js.map +1 -0
  298. package/dist/core/store/settings-validator.d.ts +4 -1
  299. package/dist/core/store/settings-validator.js +14 -2
  300. package/dist/core/store/settings-validator.js.map +1 -1
  301. package/dist/core/store/settings.js +166 -16
  302. package/dist/core/store/settings.js.map +1 -1
  303. package/dist/core/telemetry/runtime.d.ts +1 -0
  304. package/dist/core/telemetry/runtime.js +3 -3
  305. package/dist/core/telemetry/runtime.js.map +1 -1
  306. package/dist/core/test/run-selectors.d.ts +27 -0
  307. package/dist/core/test/run-selectors.js +110 -0
  308. package/dist/core/test/run-selectors.js.map +1 -0
  309. package/dist/mcp/server.js +76 -262
  310. package/dist/mcp/server.js.map +1 -1
  311. package/dist/mcp/tool-definitions.d.ts +27 -0
  312. package/dist/mcp/tool-definitions.js +330 -0
  313. package/dist/mcp/tool-definitions.js.map +1 -0
  314. package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
  315. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  316. package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
  317. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  318. package/dist/sdk/cli-contracts/tool-parameter-tables.js +29 -2
  319. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  320. package/dist/sdk/cli-contracts.js +37 -5
  321. package/dist/sdk/cli-contracts.js.map +1 -1
  322. package/dist/sdk/index.d.ts +1 -1
  323. package/dist/sdk/index.js +2 -2
  324. package/dist/sdk/index.js.map +1 -1
  325. package/dist/sdk/runtime.d.ts +6 -0
  326. package/dist/sdk/runtime.js +51 -3
  327. package/dist/sdk/runtime.js.map +1 -1
  328. package/dist/types.d.ts +4 -1
  329. package/dist/types.js +4 -2
  330. package/dist/types.js.map +1 -1
  331. package/docs/AGENT_GUIDE.md +7 -1
  332. package/docs/ARCHITECTURE.md +7 -0
  333. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  334. package/docs/COMMANDS.md +38 -3
  335. package/docs/CONFIGURATION.md +1 -1
  336. package/docs/EXTENSIONS.md +55 -53
  337. package/docs/SDK.md +8 -2
  338. package/docs/TESTING.md +60 -0
  339. package/docs/schemas/extension-manifest.schema.json +120 -0
  340. package/marketplace.json +1 -1
  341. package/package.json +2 -2
  342. package/packages/pm-beads/extensions/beads/manifest.json +10 -0
  343. package/packages/pm-calendar/extensions/calendar/manifest.json +10 -0
  344. package/packages/pm-command-kit/README.md +72 -0
  345. package/packages/pm-command-kit/extensions/command-kit/index.js +181 -0
  346. package/packages/pm-command-kit/extensions/command-kit/index.ts +176 -0
  347. package/packages/pm-command-kit/extensions/command-kit/manifest.json +22 -0
  348. package/packages/pm-command-kit/package.json +53 -0
  349. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +10 -0
  350. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +10 -0
  351. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +10 -0
  352. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +10 -0
  353. package/packages/pm-search-advanced/extensions/search-advanced/index.js +6 -0
  354. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +6 -0
  355. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +10 -0
  356. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +1 -0
  357. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -0
  358. package/packages/pm-templates/extensions/templates/manifest.json +10 -0
  359. package/packages/pm-todos/extensions/todos/manifest.json +10 -0
  360. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  361. package/plugins/pm-claude/README.md +7 -3
  362. package/plugins/pm-claude/commands/pm-init.md +1 -1
  363. package/plugins/pm-codex/README.md +2 -2
  364. package/dist/cli-bundle/chunks/activity-HF3VJYKH.js +0 -16
  365. package/dist/cli-bundle/chunks/aggregate-IQ27NFBI.js.map +0 -7
  366. package/dist/cli-bundle/chunks/aggregate-TT7OCHHT.js.map +0 -1
  367. package/dist/cli-bundle/chunks/chunk-3RHE76G6.js.map +0 -1
  368. package/dist/cli-bundle/chunks/chunk-4LRVXVJK.js.map +0 -7
  369. package/dist/cli-bundle/chunks/chunk-5JF76OJF.js.map +0 -1
  370. package/dist/cli-bundle/chunks/chunk-7YTWXGE3.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-ANKG2JKL.js.map +0 -1
  372. package/dist/cli-bundle/chunks/chunk-BIRVSIM2.js.map +0 -7
  373. package/dist/cli-bundle/chunks/chunk-C72IQIBT.js.map +0 -7
  374. package/dist/cli-bundle/chunks/chunk-D5D7VKIC.js.map +0 -1
  375. package/dist/cli-bundle/chunks/chunk-EQ6N6IDR.js.map +0 -7
  376. package/dist/cli-bundle/chunks/chunk-FJNJEWU4.js.map +0 -1
  377. package/dist/cli-bundle/chunks/chunk-GPOSGWCN.js.map +0 -1
  378. package/dist/cli-bundle/chunks/chunk-H37YPWLM.js.map +0 -7
  379. package/dist/cli-bundle/chunks/chunk-I26E6XA7.js.map +0 -1
  380. package/dist/cli-bundle/chunks/chunk-I4FGL3K2.js.map +0 -1
  381. package/dist/cli-bundle/chunks/chunk-JVMAOD54.js.map +0 -1
  382. package/dist/cli-bundle/chunks/chunk-LU2HE272.js +0 -242
  383. package/dist/cli-bundle/chunks/chunk-LU2HE272.js.map +0 -1
  384. package/dist/cli-bundle/chunks/chunk-NJRZIJ4N.js.map +0 -1
  385. package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js +0 -252
  386. package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js.map +0 -7
  387. package/dist/cli-bundle/chunks/chunk-RLVI7KDW.js.map +0 -7
  388. package/dist/cli-bundle/chunks/chunk-RMTI5R76.js.map +0 -7
  389. package/dist/cli-bundle/chunks/chunk-T7B5VAKD.js.map +0 -7
  390. package/dist/cli-bundle/chunks/chunk-TLD3UYGY.js.map +0 -7
  391. package/dist/cli-bundle/chunks/chunk-WQZCEEQN.js.map +0 -1
  392. package/dist/cli-bundle/chunks/chunk-YSANBZAE.js.map +0 -7
  393. package/dist/cli-bundle/chunks/close-JTTGW7TS.js +0 -13
  394. package/dist/cli-bundle/chunks/context-4N7GYTVQ.js.map +0 -1
  395. package/dist/cli-bundle/chunks/contracts-AOBNEBVT.js.map +0 -7
  396. package/dist/cli-bundle/chunks/contracts-DXCWXOSP.js.map +0 -1
  397. package/dist/cli-bundle/chunks/create-JAPLFDGJ.js +0 -27
  398. package/dist/cli-bundle/chunks/health-CS5RNTJX.js.map +0 -1
  399. package/dist/cli-bundle/chunks/health-KCRVYIYY.js.map +0 -7
  400. package/dist/cli-bundle/chunks/history-6624XISO.js +0 -20
  401. package/dist/cli-bundle/chunks/history-redact-ZRQTI7NB.js +0 -19
  402. package/dist/cli-bundle/chunks/init-ZVE2HMKK.js +0 -17
  403. package/dist/cli-bundle/chunks/list-OO5P472O.js +0 -19
  404. package/dist/cli-bundle/chunks/register-list-query-6RA24SIZ.js.map +0 -1
  405. package/dist/cli-bundle/chunks/register-list-query-IO3RR5K6.js.map +0 -7
  406. package/dist/cli-bundle/chunks/register-mutation-KVFUXCAZ.js.map +0 -7
  407. package/dist/cli-bundle/chunks/register-mutation-VV2SC2KL.js.map +0 -1
  408. package/dist/cli-bundle/chunks/register-operations-DFNVRSJ5.js.map +0 -1
  409. package/dist/cli-bundle/chunks/register-operations-TAUUTRJ4.js.map +0 -7
  410. package/dist/cli-bundle/chunks/restore-F4ALFV4D.js +0 -17
  411. package/dist/cli-bundle/chunks/test-PPOLRIBA.js +0 -32
  412. package/dist/cli-bundle/chunks/update-MCPCPMHV.js +0 -25
  413. package/dist/cli-bundle/chunks/update-O7TBOUVQ.js +0 -21
  414. /package/dist/cli-bundle/chunks/{activity-RUJATACW.js.map → activity-XADJOG6G.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{activity-HF3VJYKH.js.map → activity-XZIUPGZH.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js.map → append-JYWO4P7W.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{append-CWQZBUWV.js.map → append-KG55G7S3.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js.map → chunk-3SLOMKCJ.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js.map → chunk-4JCSYR6F.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js.map → chunk-4YFAGDRH.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js.map → chunk-5SCT2JCT.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js.map → chunk-73ZPG2I3.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-A5342JVL.js.map → chunk-7RIT3OCD.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js.map → chunk-ATEES5SX.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js.map → chunk-AVGHVVF7.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-42IULX44.js.map → chunk-CCX4RSYZ.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js.map → chunk-CW6E4NAT.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js.map → chunk-DY6C42S6.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js.map → chunk-E5DUIJA4.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js.map → chunk-ESANVZF4.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js.map → chunk-F75JSIOZ.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js.map → chunk-FDH2X65L.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js.map → chunk-I53JBTJW.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js.map → chunk-I7NYDZDV.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js.map → chunk-IUKD4W6Z.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js.map → chunk-OASDW5UI.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js.map → chunk-OLKBSY4N.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js.map → chunk-P5BJOMBB.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js.map → chunk-P5U5EOMA.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js.map → chunk-PSD7F7DX.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js.map → chunk-QJMGRZO2.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js.map → chunk-QNJSITCX.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js.map → chunk-RXAP6JL5.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js.map → chunk-S26FESD4.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js.map → chunk-TK5VZFHY.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js.map → chunk-TNAP7EJX.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js.map → chunk-UUWGCWBU.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js.map → chunk-VAOUX6TK.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js.map → chunk-VPEAS7PS.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js.map → chunk-VSRZRLG3.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{chunk-PW7C262O.js.map → chunk-WUNFKP7M.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js.map → chunk-XTKJSVWH.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js.map → chunk-XUC4C4PT.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js.map → chunk-Y3YKK7CY.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js.map → chunk-YW6Q3RYZ.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js.map → chunk-ZLMIWZUG.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js.map → chunk-ZMW77VWV.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js.map → claim-2RDYMCTP.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js.map → claim-MJ7DZFC3.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{close-JTTGW7TS.js.map → close-4FMAPEMY.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{close-O4JK2JKD.js.map → close-XLEKIQSW.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js.map → close-many-AOD4HSAZ.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js.map → close-many-XKAQY5CQ.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js.map → comments-B4RWWDJT.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{comments-OMB7YE27.js.map → comments-RN5TG4ZN.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{config-5VPR42A6.js.map → config-3JXJ3XZ7.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{config-NNLXVGVC.js.map → config-FZ4UDC4B.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js.map → copy-ALU5WMHA.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js.map → copy-FWIVTLBO.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{create-FCCAATQV.js.map → create-IFA26O2I.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{create-JAPLFDGJ.js.map → create-JVXYHYH4.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js.map → delete-IYTIYAJS.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js.map → delete-Y2SGJBGY.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{deps-S5322EOQ.js.map → deps-6TSPOSGU.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js.map → deps-CZ4PTVXU.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js.map → docs-5WMBVQT2.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js.map → docs-MB53UJAJ.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js.map → extension-Q34OEWO5.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js.map → extension-WH2FOIOZ.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js.map → files-DLB5LJEP.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{files-OBWYYPKM.js.map → files-GVMNVLCB.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{gc-FA2ONELT.js.map → gc-2WEPW6D6.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js.map → gc-4Z3IKHAZ.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{get-PNTSONGB.js.map → get-PCHS7RA6.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{get-FLHYTOBA.js.map → get-QARTE6BL.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{history-COQTPBEU.js.map → history-7WUAEWHW.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{history-6624XISO.js.map → history-L2FQFRTU.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js.map → history-compact-3EJ3L2O7.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js.map → history-compact-LW27IPFK.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js.map → history-redact-G72A4EJ4.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{history-redact-ZRQTI7NB.js.map → history-redact-QWQCX5DZ.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js.map → history-repair-KVPFJKOS.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js.map → history-repair-RUGKD3YR.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{init-ZVE2HMKK.js.map → init-4BKRHGWW.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js.map → init-S5WEGUJY.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js.map → learnings-HQXSSKZ5.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js.map → learnings-XK3P4ZDR.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{list-NJV6WBT4.js.map → list-6CL3XFT6.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{list-OO5P472O.js.map → list-BYNN4ZEO.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{notes-2KWHADK3.js.map → notes-5T6P7C5V.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js.map → notes-U5FZCSBT.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js.map → plan-FQLMJRLZ.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js.map → plan-VNUG3WZZ.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js.map → register-setup-G4QYI3RX.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js.map → register-setup-IKX5524L.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{restore-F4ALFV4D.js.map → restore-CHIOQAQL.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js.map → restore-M6AFHMV4.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js.map → schema-76HDZJCC.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js.map → schema-AINZ2IMM.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js.map → search-JMLFQEPJ.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{search-2T3NCCUR.js.map → search-NL3TSCYB.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{stats-6LVK4JER.js.map → stats-BKXCBIGT.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{stats-ULGQACF7.js.map → stats-UBD56TGK.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js.map → telemetry-N454RHG5.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js.map → telemetry-ZJXK3H7X.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{test-2PP4YBV6.js.map → test-BQAKIXAT.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{test-PPOLRIBA.js.map → test-O74JFUH5.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js.map → test-all-7LV3I6S5.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js.map → test-all-TDYCCBA4.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js.map → test-runs-E64M6XS3.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js.map → test-runs-LXZLULCI.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{update-O7TBOUVQ.js.map → update-2EVXOC7V.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{update-MCPCPMHV.js.map → update-5A2B6QYB.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js.map → update-many-TUGU5YXQ.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js.map → update-many-V4LA3C4H.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js.map → upgrade-37F7JKES.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js.map → upgrade-L32JA4TZ.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js.map → validate-EQTT6WVX.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{validate-J6Q444SD.js.map → validate-XN4I4DPL.js.map} +0 -0
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  EXIT_CODE,
5
5
  PmCliError
6
- } from "./chunk-5JF76OJF.js";
6
+ } from "./chunk-A6LXQFO7.js";
7
7
 
8
8
  // dist/core/item/parse.js
9
9
  var STDIN_TOKEN = "-";
@@ -333,6 +333,6 @@ export {
333
333
  createStdinTokenResolver,
334
334
  parseOptionalNumber
335
335
  };
336
- //# sourceMappingURL=chunk-23WNCJBA.js.map
336
+ //# sourceMappingURL=chunk-I7NYDZDV.js.map
337
337
 
338
338
  //# debugId=782e6b42-6c10-51ac-b9b8-088e686821d0
@@ -1,27 +1,28 @@
1
1
  import {
2
2
  cloneEmptyReplayDocument,
3
+ normalizeReplayPatchOps,
3
4
  tryApplyReplayPatch,
4
5
  verifyHistoryChain
5
- } from "./chunk-H37YPWLM.js";
6
+ } from "./chunk-XMBI6TNW.js";
6
7
  import {
7
8
  parseLimit
8
- } from "./chunk-VDVVOLR6.js";
9
+ } from "./chunk-QJMGRZO2.js";
9
10
  import {
10
11
  enforceHistoryStreamPolicyForItem,
11
12
  hashDocument,
12
13
  hashEmptyDocument,
13
14
  locateItem,
14
15
  readLocatedItem
15
- } from "./chunk-LF2VNLEZ.js";
16
+ } from "./chunk-3KLPFWZ4.js";
16
17
  import {
17
18
  normalizeItemId
18
- } from "./chunk-WCWIDJII.js";
19
+ } from "./chunk-VPEAS7PS.js";
19
20
  import {
20
21
  findFirstMergeConflictMarker
21
- } from "./chunk-NHRZSYAA.js";
22
+ } from "./chunk-73ZPG2I3.js";
22
23
  import {
23
24
  resolveItemTypeRegistry
24
- } from "./chunk-U3Z4OCZC.js";
25
+ } from "./chunk-5SCT2JCT.js";
25
26
  import {
26
27
  EXIT_CODE,
27
28
  PmCliError,
@@ -33,7 +34,7 @@ import {
33
34
  readSettings,
34
35
  resolvePmRoot,
35
36
  runActiveOnReadHooks
36
- } from "./chunk-C72IQIBT.js";
37
+ } from "./chunk-FY4SPXSC.js";
37
38
 
38
39
  // dist/core/history/history-diff.js
39
40
  !(function() {
@@ -138,7 +139,7 @@ function computeHistoryDiff(fullEntries, options) {
138
139
  !(function() {
139
140
  try {
140
141
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
141
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "50bc01ba-8e6c-54aa-a0f7-81540f1eaddc");
142
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f01b26e1-3b57-5fac-bb10-e8c7798797e9");
142
143
  } catch (e2) {
143
144
  }
144
145
  })();
@@ -150,7 +151,8 @@ function limitEntries(values, limit) {
150
151
  function buildDiffEntries(entries, startIndex) {
151
152
  return entries.map((entry, index) => {
152
153
  const changedFields = /* @__PURE__ */ new Set();
153
- for (const op of entry.patch) {
154
+ const patch = normalizeReplayPatchOps(entry.patch);
155
+ for (const op of patch) {
154
156
  changedFields.add(patchPathToChangedField(op.path));
155
157
  if (op.from) {
156
158
  changedFields.add(patchPathToChangedField(op.from));
@@ -161,7 +163,7 @@ function buildDiffEntries(entries, startIndex) {
161
163
  ts: entry.ts,
162
164
  op: entry.op,
163
165
  author: entry.author,
164
- patch_ops: entry.patch.length,
166
+ patch_ops: patch.length,
165
167
  changed_fields: [...changedFields].sort((left, right) => left.localeCompare(right))
166
168
  };
167
169
  });
@@ -273,4 +275,4 @@ export {
273
275
  readHistoryEntries,
274
276
  runHistory
275
277
  };
276
- //# sourceMappingURL=chunk-EQ6N6IDR.js.map
278
+ //# sourceMappingURL=chunk-IGVJRZ6H.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../core/history/history-diff.ts", "../../../../../../../../cli/commands/history.ts"],
4
+ "sourcesContent": ["import { cloneEmptyReplayDocument, tryApplyReplayPatch, type ReplayDocument } from \"./replay.js\";\nimport type { HistoryEntry } from \"../../types/index.js\";\n\nexport interface HistoryFieldChange {\n field: string;\n // before and after are the raw field values captured by replaying the history chain.\n // `undefined` is intentional: it signals that the field was absent in the document at\n // that point (e.g. after a JSON-Patch `remove` op). JSON serialization will omit\n // undefined values, which correctly communicates \"field did not exist\".\n before: unknown;\n after: unknown;\n}\n\nexport interface HistoryDiffValueEntry {\n /** 1-based position in the FULL stream (fullEntries index + 1). */\n index: number;\n ts: string;\n op: string;\n author: string;\n /** Number of JSON-patch operations in this entry (entry.patch.length). */\n patch_ops: number;\n /** Unique field names touched by this entry, sorted by localeCompare. */\n changed_fields: string[];\n /** Per-field before/after values, sorted by field name (localeCompare). */\n changes: HistoryFieldChange[];\n}\n\n// ---------------------------------------------------------------------------\n// JSON-Pointer helpers (ported from src/cli/commands/history.ts so the\n// orchestrator can replace the private copy there with an import from here).\n// ---------------------------------------------------------------------------\n\nfunction decodeJsonPointerSegment(segment: string): string {\n return segment.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\");\n}\n\n/**\n * Map a JSON-Patch path string to a human-readable changed-field name.\n *\n * Rules (in priority order):\n * - \"/body\" or \"/body/…\" → \"body\"\n * - \"/metadata/…\" or \"/front_matter/…\"\n * with a first segment → that decoded segment (e.g. \"status\")\n * without a first segment (bare prefix) → \"metadata\"\n * - \"/\" (root pointer, empty segment after strip) → \"root\"\n * - anything else → decoded first path segment\n */\nexport function patchPathToChangedField(path: string): string {\n if (path === \"/body\" || path.startsWith(\"/body/\")) return \"body\";\n if (\n path === \"/metadata\" ||\n path.startsWith(\"/metadata/\") ||\n path === \"/front_matter\" ||\n path.startsWith(\"/front_matter/\")\n ) {\n const segment = path.replace(/^\\/(?:metadata|front_matter)\\/?/, \"\").split(\"/\")[0];\n if (!segment) return \"metadata\";\n return decodeJsonPointerSegment(segment);\n }\n const segment = path.replace(/^\\//, \"\").split(\"/\")[0];\n return segment ? decodeJsonPointerSegment(segment) : \"root\";\n}\n\n// ---------------------------------------------------------------------------\n// Field-value reader\n// ---------------------------------------------------------------------------\n\n/**\n * Extract the before/after value for a logical field from a replay document.\n *\n * - \"body\" → doc.body\n * - \"metadata\" → doc.metadata (the whole object, for a bare /metadata replace)\n * - \"root\" → the whole document (for a bare \"/\" patch op)\n * - other → doc.metadata[field] (may be undefined when the field was absent)\n */\nfunction readFieldValue(doc: ReplayDocument, field: string): unknown {\n if (field === \"body\") return doc.body;\n if (field === \"metadata\") return doc.metadata;\n if (field === \"root\") return doc;\n return doc.metadata[field];\n}\n\n// ---------------------------------------------------------------------------\n// Main export\n// ---------------------------------------------------------------------------\n\n/**\n * Replay a full history entry stream and produce enriched diff entries with\n * per-field before/after values.\n *\n * @param fullEntries The complete ordered history chain to replay.\n * @param options.windowStartIndex 0-based index into fullEntries at which the\n * DISPLAYED window begins. Entries before this index are still replayed (so\n * state is accurate) but are not emitted. Defaults to 0.\n * @param options.field When supplied, only entries that changed this field are\n * emitted, and each emitted entry's `changes` and `changed_fields` are\n * restricted to that single field.\n */\nexport function computeHistoryDiff(\n fullEntries: HistoryEntry[],\n options?: { windowStartIndex?: number; field?: string },\n): HistoryDiffValueEntry[] {\n const windowStartIndex = options?.windowStartIndex ?? 0;\n const fieldFilter = options?.field;\n\n if (fullEntries.length === 0 || windowStartIndex >= fullEntries.length) {\n return [];\n }\n\n let current = cloneEmptyReplayDocument();\n const result: HistoryDiffValueEntry[] = [];\n\n for (let p = 0; p < fullEntries.length; p += 1) {\n const entry = fullEntries[p];\n\n // Capture before state.\n const beforeDoc = current;\n\n // Attempt to apply patch.\n const applied = tryApplyReplayPatch(current, entry.patch);\n let afterDoc: ReplayDocument;\n if (applied.ok) {\n afterDoc = applied.document;\n current = afterDoc;\n } else {\n // Patch failed — use before state as after (cannot trust partial result).\n // Do NOT advance current; keep prior replay state.\n afterDoc = beforeDoc;\n }\n\n // Collect changed field names from patch paths (and from: paths for move/copy).\n const changedFieldSet = new Set<string>();\n for (const patchOp of entry.patch) {\n changedFieldSet.add(patchPathToChangedField(patchOp.path));\n if (patchOp.from !== undefined) {\n changedFieldSet.add(patchPathToChangedField(patchOp.from));\n }\n }\n const sortedFields = [...changedFieldSet].sort((a, b) => a.localeCompare(b));\n\n // Only emit entries in the display window.\n if (p >= windowStartIndex) {\n // Apply field filter: skip this entry entirely if it doesn't touch the\n // requested field; otherwise narrow down to only that field.\n if (fieldFilter !== undefined) {\n if (!changedFieldSet.has(fieldFilter)) {\n // This entry does not touch the requested field — skip it.\n continue;\n }\n // Emit only the filtered field.\n const change: HistoryFieldChange = {\n field: fieldFilter,\n before: readFieldValue(beforeDoc, fieldFilter),\n after: readFieldValue(afterDoc, fieldFilter),\n };\n result.push({\n index: p + 1,\n ts: entry.ts,\n op: entry.op,\n author: entry.author,\n patch_ops: entry.patch.length,\n changed_fields: [fieldFilter],\n changes: [change],\n });\n } else {\n // Emit all changed fields.\n const changes: HistoryFieldChange[] = sortedFields.map((field) => ({\n field,\n before: readFieldValue(beforeDoc, field),\n after: readFieldValue(afterDoc, field),\n }));\n result.push({\n index: p + 1,\n ts: entry.ts,\n op: entry.op,\n author: entry.author,\n patch_ops: entry.patch.length,\n changed_fields: sortedFields,\n changes,\n });\n }\n }\n }\n\n return result;\n}\n", "import { pathExists, readFileIfExists } from \"../../core/fs/fs-utils.js\";\nimport { computeHistoryDiff, patchPathToChangedField, type HistoryDiffValueEntry } from \"../../core/history/history-diff.js\";\nimport { hashDocument, hashEmptyDocument } from \"../../core/history/history.js\";\nimport { normalizeReplayPatchOps, verifyHistoryChain } from \"../../core/history/replay.js\";\nimport { enforceHistoryStreamPolicyForItem } from \"../../core/history/history-stream-policy.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { findFirstMergeConflictMarker } from \"../../core/shared/conflict-markers.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport { normalizeItemId } from \"../../core/item/id.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getHistoryPath, getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { parseLimit } from \"../shared-parsers.js\";\nimport type { HistoryEntry } from \"../../types/index.js\";\n\nexport { verifyHistoryChain } from \"../../core/history/replay.js\";\n\nexport interface HistoryCommandOptions {\n limit?: string;\n diff?: boolean;\n /** Restrict --diff to a single field's before/after transitions (implies --diff). */\n field?: string;\n verify?: boolean;\n compact?: boolean;\n}\n\nexport interface HistoryDiffEntry {\n index: number;\n ts: string;\n op: string;\n author: string;\n patch_ops: number;\n changed_fields: string[];\n}\n\nexport interface HistoryVerificationResult {\n ok: boolean;\n entries: number;\n errors: string[];\n latest_after_hash?: string;\n current_item_hash?: string;\n current_matches_latest?: boolean;\n}\n\nexport interface HistoryResult {\n id: string;\n history: HistoryEntry[];\n compact_history?: HistoryDiffEntry[];\n compact: boolean;\n count: number;\n limit: number | null;\n diff?: HistoryDiffValueEntry[];\n verification?: HistoryVerificationResult;\n}\n\nfunction limitEntries<T>(values: T[], limit: number | undefined): T[] {\n if (limit === undefined) return values;\n return values.slice(Math.max(0, values.length - limit));\n}\n\nfunction buildDiffEntries(entries: HistoryEntry[], startIndex: number): HistoryDiffEntry[] {\n return entries.map((entry, index) => {\n const changedFields = new Set<string>();\n const patch = normalizeReplayPatchOps(entry.patch);\n for (const op of patch) {\n changedFields.add(patchPathToChangedField(op.path));\n if (op.from) {\n changedFields.add(patchPathToChangedField(op.from));\n }\n }\n return {\n index: startIndex + index + 1,\n ts: entry.ts,\n op: entry.op,\n author: entry.author,\n patch_ops: patch.length,\n changed_fields: [...changedFields].sort((left, right) => left.localeCompare(right)),\n };\n });\n}\n\nexport async function readHistoryEntries(historyPath: string, itemId: string): Promise<HistoryEntry[]> {\n const raw = await readFileIfExists(historyPath);\n if (raw === null) {\n return [];\n }\n await runActiveOnReadHooks({\n path: historyPath,\n scope: \"project\",\n });\n if (raw.trim() === \"\") {\n return [];\n }\n const conflictMarker = findFirstMergeConflictMarker(raw);\n if (conflictMarker) {\n throw new PmCliError(\n `History for ${itemId} contains merge conflict markers at line ${conflictMarker.line} (${conflictMarker.marker}). Resolve <<<<<<< ======= >>>>>>> markers and retry.`,\n EXIT_CODE.GENERIC_FAILURE,\n {\n code: \"history_merge_conflict_markers_detected\",\n required: \"Repair the history stream by resolving merge-conflict markers.\",\n why: \"Conflict markers break JSONL parsing and invalidate deterministic audit history.\",\n examples: [`pm history ${itemId}`, `pm restore ${itemId} <timestamp-or-version>`],\n nextSteps: [\"Resolve or restore the history file, then rerun the command.\"],\n },\n );\n }\n\n const entries: HistoryEntry[] = [];\n const lines = raw.split(/\\r?\\n/);\n for (let index = 0; index < lines.length; index += 1) {\n const line = lines[index]?.trim();\n if (!line) continue;\n try {\n entries.push(JSON.parse(line) as HistoryEntry);\n } catch {\n throw new PmCliError(\n `History for ${itemId} contains invalid JSON at line ${index + 1}. Repair or restore the history stream and retry.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n }\n return entries;\n}\n\nexport async function runHistory(id: string, options: HistoryCommandOptions, global: GlobalOptions): Promise<HistoryResult> {\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 limit = parseLimit(options.limit);\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const normalizedId = normalizeItemId(id, settings.id_prefix);\n const located = await locateItem(\n pmRoot,\n normalizedId,\n settings.id_prefix,\n settings.item_format,\n typeRegistry.type_to_folder,\n );\n const resolvedId = located?.id ?? normalizedId;\n const historyPath = getHistoryPath(pmRoot, resolvedId);\n if (!located && !(await pathExists(historyPath))) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n if (located) {\n await enforceHistoryStreamPolicyForItem({\n pmRoot,\n settings,\n itemId: located.id,\n commandLabel: \"history\",\n });\n }\n\n const fullHistory = await readHistoryEntries(historyPath, resolvedId);\n const history = limitEntries(fullHistory, limit);\n const compact = options.compact === true;\n const compactHistory = compact ? buildDiffEntries(history, Math.max(0, fullHistory.length - history.length)) : undefined;\n const result: HistoryResult = {\n id: resolvedId,\n history: compact ? [] : history,\n compact_history: compactHistory,\n compact,\n count: history.length,\n limit: limit ?? null,\n };\n\n if (options.diff || options.field !== undefined) {\n // --diff replays the full chain to surface per-field before/after values for\n // the displayed window (the latest --limit entries). --field narrows to a\n // single field's transitions (\"when did status change?\"). Unlike the compact\n // projection above, the value diff is independent of the compact/full toggle.\n result.diff = computeHistoryDiff(fullHistory, {\n windowStartIndex: Math.max(0, fullHistory.length - history.length),\n field: options.field,\n });\n }\n\n if (options.verify) {\n const verification = verifyHistoryChain(fullHistory);\n const latestAfterHash = fullHistory.length > 0 ? fullHistory[fullHistory.length - 1].after_hash : hashEmptyDocument();\n let currentItemHash: string | undefined;\n let currentMatchesLatest: boolean | undefined;\n const errors = [...verification.errors];\n\n if (located) {\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n currentItemHash = hashDocument(loaded.document);\n currentMatchesLatest = currentItemHash === latestAfterHash;\n if (!currentMatchesLatest) {\n errors.push(\"verify_failed:current_item_hash_mismatch\");\n }\n }\n\n result.verification = {\n ok: errors.length === 0,\n entries: fullHistory.length,\n errors,\n latest_after_hash: fullHistory.length > 0 ? fullHistory[fullHistory.length - 1].after_hash : undefined,\n current_item_hash: currentItemHash,\n current_matches_latest: currentMatchesLatest,\n };\n }\n\n return result;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,yBAAyB,SAAe;AAC/C,SAAO,QAAQ,WAAW,MAAM,GAAG,EAAE,WAAW,MAAM,GAAG;AAC3D;AAaM,SAAU,wBAAwB,MAAY;AAClD,MAAI,SAAS,WAAW,KAAK,WAAW,QAAQ;AAAG,WAAO;AAC1D,MACE,SAAS,eACT,KAAK,WAAW,YAAY,KAC5B,SAAS,mBACT,KAAK,WAAW,gBAAgB,GAChC;AACA,UAAMA,WAAU,KAAK,QAAQ,mCAAmC,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AAChF,QAAI,CAACA;AAAS,aAAO;AACrB,WAAO,yBAAyBA,QAAO;EACzC;AACA,QAAM,UAAU,KAAK,QAAQ,OAAO,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACpD,SAAO,UAAU,yBAAyB,OAAO,IAAI;AACvD;AAcA,SAAS,eAAe,KAAqB,OAAa;AACxD,MAAI,UAAU;AAAQ,WAAO,IAAI;AACjC,MAAI,UAAU;AAAY,WAAO,IAAI;AACrC,MAAI,UAAU;AAAQ,WAAO;AAC7B,SAAO,IAAI,SAAS,KAAK;AAC3B;AAkBM,SAAU,mBACd,aACA,SAAuD;AAEvD,QAAM,mBAAmB,SAAS,oBAAoB;AACtD,QAAM,cAAc,SAAS;AAE7B,MAAI,YAAY,WAAW,KAAK,oBAAoB,YAAY,QAAQ;AACtE,WAAO,CAAA;EACT;AAEA,MAAI,UAAU,yBAAwB;AACtC,QAAM,SAAkC,CAAA;AAExC,WAAS,IAAI,GAAG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,SAAS,UAAU,CAAA,IAAK;IACxB,iBAAiB;IACjB;IACA,OAAO,QAAQ;IACf,OAAO,SAAS;;AAGlB,MAAI,QAAQ,QAAQ,QAAQ,UAAU,QAAW;AAK/C,WAAO,OAAO,mBAAmB,aAAa;MAC5C,kBAAkB,KAAK,IAAI,GAAG,YAAY,SAAS,QAAQ,MAAM;MACjE,OAAO,QAAQ;KAChB;EACH;AAEA,MAAI,QAAQ,QAAQ;AAClB,UAAM,eAAe,mBAAmB,WAAW;AACnD,UAAM,kBAAkB,YAAY,SAAS,IAAI,YAAY,YAAY,SAAS,CAAC,EAAE,aAAa,kBAAiB;AACnH,QAAI;AACJ,QAAI;AACJ,UAAM,SAAS,CAAC,GAAG,aAAa,MAAM;AAEtC,QAAI,SAAS;AACX,YAAM,SAAS,MAAM,gBAAgB,SAAS,EAAE,QAAQ,SAAS,OAAM,CAAE;AACzE,wBAAkB,aAAa,OAAO,QAAQ;AAC9C,6BAAuB,oBAAoB;AAC3C,UAAI,CAAC,sBAAsB;AACzB,eAAO,KAAK,0CAA0C;MACxD;IACF;AAEA,WAAO,eAAe;MACpB,IAAI,OAAO,WAAW;MACtB,SAAS,YAAY;MACrB;MACA,mBAAmB,YAAY,SAAS,IAAI,YAAY,YAAY,SAAS,CAAC,EAAE,aAAa;MAC7F,mBAAmB;MACnB,wBAAwB;;EAE5B;AAEA,SAAO;AACT;",
6
+ "names": ["segment", "global"]
7
+ }
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="61aa7e55-919b-5f8e-8f56-c90b9e815366")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="757afd85-8988-5517-aa0a-61a39e52c652")}catch(e){}}();
3
3
  import {
4
4
  ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
5
5
  CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,
@@ -12,15 +12,15 @@ import {
12
12
  readFirstStringFromCommanderOptions,
13
13
  readFirstValueFromCommanderOptions,
14
14
  readStringArrayFromCommanderOptions
15
- } from "./chunk-GPOSGWCN.js";
15
+ } from "./chunk-FXRU333M.js";
16
16
  import {
17
17
  refreshSearchArtifactsForMutation,
18
18
  shouldRunSearchRefreshInForeground
19
- } from "./chunk-BACSNVWE.js";
19
+ } from "./chunk-XJDGS74Y.js";
20
20
  import {
21
21
  printError,
22
22
  writeStdout
23
- } from "./chunk-ANKG2JKL.js";
23
+ } from "./chunk-I2IJY2NL.js";
24
24
  import {
25
25
  EXIT_CODE,
26
26
  PmCliError,
@@ -29,7 +29,7 @@ import {
29
29
  readSettings,
30
30
  resolvePmRoot,
31
31
  setActiveCommandResult
32
- } from "./chunk-5JF76OJF.js";
32
+ } from "./chunk-A6LXQFO7.js";
33
33
 
34
34
  // dist/cli/registration-helpers.js
35
35
  var RESOLVED_GLOBAL_OPTIONS = /* @__PURE__ */ Symbol("pm.resolvedGlobalOptions");
@@ -53,6 +53,7 @@ function getGlobalOptions(command) {
53
53
  json: opts.json === true ? true : void 0,
54
54
  quiet: Boolean(opts.quiet),
55
55
  noChangedFields: opts.changedFields === false,
56
+ idOnly: opts.idOnly === true,
56
57
  path: typeof opts.pmPath === "string" ? opts.pmPath : typeof opts.path === "string" ? opts.path : void 0,
57
58
  noExtensions: opts.extensions === false,
58
59
  noPager: Boolean(opts.noPager),
@@ -120,7 +121,11 @@ function pushRepeatableValueFlag(args, flag, values) {
120
121
  function buildBackgroundTestCommandArgs(id, options) {
121
122
  const args = ["test", id, "--run", "--json", "--progress"];
122
123
  pushRepeatableValueFlag(args, "--add", options.add);
124
+ pushRepeatableValueFlag(args, "--add-json", options.addJson);
123
125
  pushRepeatableValueFlag(args, "--remove", options.remove);
126
+ pushOptionalValueFlag(args, "--match", options.match);
127
+ pushOptionalValueFlag(args, "--only-index", options.onlyIndex);
128
+ pushOptionalBooleanFlag(args, "--only-last", options.onlyLast);
124
129
  pushOptionalValueFlag(args, "--timeout", options.timeout);
125
130
  pushRepeatableValueFlag(args, "--env-set", options.envSet);
126
131
  pushRepeatableValueFlag(args, "--env-clear", options.envClear);
@@ -201,6 +206,7 @@ function normalizeCreateOptions(commandOptions, options = {}) {
201
206
  message: readCreateString("message"),
202
207
  assignee: readCreateString("assignee"),
203
208
  parent: readCreateString("parent"),
209
+ allowMissingParent: commandOptions.allowMissingParent === true,
204
210
  reviewer: readCreateString("reviewer"),
205
211
  risk: readCreateString("risk"),
206
212
  confidence: readCreateString("confidence"),
@@ -441,6 +447,7 @@ function normalizeAggregateOptions(options) {
441
447
  return {
442
448
  groupBy: typeof options.groupBy === "string" ? options.groupBy : void 0,
443
449
  count: options.count === true ? true : void 0,
450
+ completion: options.completion === true ? true : void 0,
444
451
  sum: typeof options.sum === "string" ? options.sum : void 0,
445
452
  avg: typeof options.avg === "string" ? options.avg : void 0,
446
453
  includeUnparented: options.includeUnparented === true || options.include_unparented === true,
@@ -712,6 +719,6 @@ export {
712
719
  normalizeContextOptions,
713
720
  invalidateSearchCachesForMutation
714
721
  };
715
- //# sourceMappingURL=chunk-JVMAOD54.js.map
722
+ //# sourceMappingURL=chunk-IH4MBKK7.js.map
716
723
 
717
- //# debugId=61aa7e55-919b-5f8e-8f56-c90b9e815366
724
+ //# debugId=757afd85-8988-5517-aa0a-61a39e52c652
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../cli/registration-helpers.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { normalizeStatusInput } from \"../core/item/status.js\";\nimport { refreshSearchArtifactsForMutation } from \"../core/search/cache.js\";\nimport { shouldRunSearchRefreshInForeground } from \"../core/search/background-refresh.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { printError, printResult, writeStdout } from \"../core/output/output.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport {\n setActiveCommandResult,\n} from \"../core/extensions/index.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport type { ItemStatus } from \"../types/index.js\";\nimport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n readFirstValueFromCommanderOptions,\n readFirstStringFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n} from \"../sdk/cli-contracts.js\";\nimport type {\n ContextOptions,\n CreateCommandOptions,\n AggregateOptions,\n ListOptions,\n} from \"./commands/index.js\";\nimport type { runList, runActivity } from \"./commands/index.js\";\n\nexport {\n printError,\n printResult,\n writeStdout,\n};\n\nconst RESOLVED_GLOBAL_OPTIONS = Symbol(\"pm.resolvedGlobalOptions\");\n\ntype CommandWithResolvedGlobals = Command & {\n [RESOLVED_GLOBAL_OPTIONS]?: GlobalOptions;\n};\n\ninterface CommandOptionsReader {\n optsWithGlobals?: () => Record<string, unknown>;\n opts?: () => Record<string, unknown>;\n}\n\nfunction commandOptionsReader(command: unknown): CommandOptionsReader {\n return typeof command === \"object\" && command !== null ? command as CommandOptionsReader : {};\n}\n\nexport function setResolvedGlobalOptions(command: Command, globalOptions: GlobalOptions): void {\n (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS] = { ...globalOptions };\n}\n\nexport function clearResolvedGlobalOptions(command: Command): void {\n delete (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS];\n}\n\nexport function getGlobalOptions(command: Command): GlobalOptions {\n const resolved = (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS];\n if (resolved) {\n return { ...resolved };\n }\n const reader = commandOptionsReader(command);\n const opts = typeof reader.optsWithGlobals === \"function\"\n ? reader.optsWithGlobals()\n : typeof reader.opts === \"function\"\n ? reader.opts()\n : {};\n return {\n json: opts.json === true ? true : undefined,\n quiet: Boolean(opts.quiet),\n noChangedFields: opts.changedFields === false,\n idOnly: opts.idOnly === true,\n path: typeof opts.pmPath === \"string\"\n ? opts.pmPath\n : typeof opts.path === \"string\"\n ? opts.path\n : undefined,\n noExtensions: opts.extensions === false,\n noPager: Boolean(opts.noPager),\n profile: Boolean(opts.profile),\n };\n}\n\nexport function getCommandPath(command: Command): string {\n const parts: string[] = [];\n let current: Command | null = command;\n while (current?.parent) {\n parts.unshift(current.name());\n current = current.parent;\n }\n return parts.join(\" \");\n}\n\nexport async function applyDefaultOutputFormat(globalOptions: GlobalOptions): Promise<GlobalOptions> {\n if (globalOptions.json === true) {\n return globalOptions;\n }\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n return globalOptions;\n }\n const settings = await readSettings(pmRoot);\n return {\n ...globalOptions,\n defaultOutputFormat: settings.output.default_format,\n };\n}\n\nexport function collect(value: string, previous: string[] | undefined): string[] {\n const next = previous ?? [];\n next.push(value);\n return next;\n}\n\nfunction pushOptionalValueFlag(args: string[], flag: string, value: unknown): void {\n if (typeof value !== \"string\") {\n return;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n return;\n }\n args.push(flag, trimmed);\n}\n\nfunction pushOptionalBooleanFlag(args: string[], flag: string, value: unknown): void {\n if (value === true) {\n args.push(flag);\n }\n}\n\nfunction pushRepeatableValueFlag(args: string[], flag: string, values: unknown): void {\n if (!Array.isArray(values)) {\n return;\n }\n for (const value of values) {\n if (typeof value !== \"string\") {\n continue;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n continue;\n }\n args.push(flag, trimmed);\n }\n}\n\nexport function buildBackgroundTestCommandArgs(id: string, options: Record<string, unknown>): string[] {\n const args: string[] = [\"test\", id, \"--run\", \"--json\", \"--progress\"];\n pushRepeatableValueFlag(args, \"--add\", options.add);\n pushRepeatableValueFlag(args, \"--add-json\", options.addJson);\n pushRepeatableValueFlag(args, \"--remove\", options.remove);\n pushOptionalValueFlag(args, \"--match\", options.match);\n pushOptionalValueFlag(args, \"--only-index\", options.onlyIndex);\n pushOptionalBooleanFlag(args, \"--only-last\", options.onlyLast);\n pushOptionalValueFlag(args, \"--timeout\", options.timeout);\n pushRepeatableValueFlag(args, \"--env-set\", options.envSet);\n pushRepeatableValueFlag(args, \"--env-clear\", options.envClear);\n pushOptionalBooleanFlag(args, \"--shared-host-safe\", options.sharedHostSafe);\n pushOptionalValueFlag(args, \"--pm-context\", options.pmContext);\n pushOptionalBooleanFlag(args, \"--override-linked-pm-context\", options.overrideLinkedPmContext);\n pushOptionalBooleanFlag(args, \"--fail-on-context-mismatch\", options.failOnContextMismatch);\n pushOptionalBooleanFlag(args, \"--fail-on-skipped\", options.failOnSkipped);\n pushOptionalBooleanFlag(args, \"--fail-on-empty-test-run\", options.failOnEmptyTestRun);\n pushOptionalBooleanFlag(args, \"--require-assertions-for-pm\", options.requireAssertionsForPm);\n pushOptionalBooleanFlag(args, \"--check-context\", options.checkContext);\n pushOptionalBooleanFlag(args, \"--auto-pm-context\", options.autoPmContext);\n pushOptionalValueFlag(args, \"--author\", options.author);\n pushOptionalValueFlag(args, \"--message\", options.message);\n pushOptionalBooleanFlag(args, \"--force\", options.force);\n return args;\n}\n\nexport function buildBackgroundTestAllCommandArgs(options: Record<string, unknown>): string[] {\n const args: string[] = [\"test-all\", \"--json\", \"--progress\"];\n pushOptionalValueFlag(args, \"--status\", options.status);\n pushOptionalValueFlag(args, \"--limit\", options.limit);\n pushOptionalValueFlag(args, \"--offset\", options.offset);\n pushOptionalValueFlag(args, \"--timeout\", options.timeout);\n pushRepeatableValueFlag(args, \"--env-set\", options.envSet);\n pushRepeatableValueFlag(args, \"--env-clear\", options.envClear);\n pushOptionalBooleanFlag(args, \"--shared-host-safe\", options.sharedHostSafe);\n pushOptionalValueFlag(args, \"--pm-context\", options.pmContext);\n pushOptionalBooleanFlag(args, \"--override-linked-pm-context\", options.overrideLinkedPmContext);\n pushOptionalBooleanFlag(args, \"--fail-on-context-mismatch\", options.failOnContextMismatch);\n pushOptionalBooleanFlag(args, \"--fail-on-skipped\", options.failOnSkipped);\n pushOptionalBooleanFlag(args, \"--fail-on-empty-test-run\", options.failOnEmptyTestRun);\n pushOptionalBooleanFlag(args, \"--require-assertions-for-pm\", options.requireAssertionsForPm);\n pushOptionalBooleanFlag(args, \"--check-context\", options.checkContext);\n pushOptionalBooleanFlag(args, \"--auto-pm-context\", options.autoPmContext);\n return args;\n}\n\nexport function formatHookWarnings(warnings: string[]): string {\n return warnings.join(\",\");\n}\n\nexport function normalizeCreateOptions(\n commandOptions: Record<string, unknown>,\n options: { requireType?: boolean } = {},\n): CreateCommandOptions {\n const readCreateString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n commandOptions,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const readCreateList = (target: string): string[] | undefined =>\n readStringArrayFromCommanderOptions(\n commandOptions,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n\n const type = readCreateString(\"type\");\n if (options.requireType !== false && type === undefined) {\n throw new PmCliError(\n \"Missing required option --type <value>. Why required: create resolves runtime schema fields/workflow from item type. Retry: add --type <built-in or configured custom type> (example: --type Task).\",\n EXIT_CODE.USAGE,\n );\n }\n\n const normalized: Record<string, unknown> = {\n title: readCreateString(\"title\"),\n description: readCreateString(\"description\"),\n type,\n template: readCreateString(\"template\"),\n createMode: readCreateString(\"createMode\"),\n schedulePreset: readCreateString(\"schedulePreset\"),\n status: readCreateString(\"status\"),\n priority: readCreateString(\"priority\"),\n tags: readCreateString(\"tags\"),\n addTags: readCreateList(\"addTags\"),\n body: readCreateString(\"body\"),\n deadline: readCreateString(\"deadline\"),\n estimatedMinutes: readCreateString(\"estimatedMinutes\"),\n acceptanceCriteria: readCreateString(\"acceptanceCriteria\"),\n definitionOfReady: readCreateString(\"definitionOfReady\"),\n order: readCreateString(\"order\"),\n rank: readCreateString(\"rank\"),\n goal: readCreateString(\"goal\"),\n objective: readCreateString(\"objective\"),\n value: readCreateString(\"value\"),\n impact: readCreateString(\"impact\"),\n outcome: readCreateString(\"outcome\"),\n whyNow: readCreateString(\"whyNow\"),\n author: readCreateString(\"author\"),\n message: readCreateString(\"message\"),\n assignee: readCreateString(\"assignee\"),\n parent: readCreateString(\"parent\"),\n allowMissingParent: commandOptions.allowMissingParent === true,\n reviewer: readCreateString(\"reviewer\"),\n risk: readCreateString(\"risk\"),\n confidence: readCreateString(\"confidence\"),\n sprint: readCreateString(\"sprint\"),\n release: readCreateString(\"release\"),\n blockedBy: readCreateString(\"blockedBy\"),\n blockedReason: readCreateString(\"blockedReason\"),\n unblockNote: readCreateString(\"unblockNote\"),\n reporter: readCreateString(\"reporter\"),\n severity: readCreateString(\"severity\"),\n environment: readCreateString(\"environment\"),\n reproSteps: readCreateString(\"reproSteps\"),\n resolution: readCreateString(\"resolution\"),\n expectedResult: readCreateString(\"expectedResult\"),\n actualResult: readCreateString(\"actualResult\"),\n affectedVersion: readCreateString(\"affectedVersion\"),\n fixedVersion: readCreateString(\"fixedVersion\"),\n component: readCreateString(\"component\"),\n regression: readCreateString(\"regression\"),\n customerImpact: readCreateString(\"customerImpact\"),\n dep: readCreateList(\"dep\"),\n comment: readCreateList(\"comment\"),\n note: readCreateList(\"note\"),\n learning: readCreateList(\"learning\"),\n file: readCreateList(\"file\"),\n test: readCreateList(\"test\"),\n doc: readCreateList(\"doc\"),\n reminder: readCreateList(\"reminder\"),\n event: readCreateList(\"event\"),\n typeOption: readCreateList(\"typeOption\"),\n field: readCreateList(\"field\"),\n unset: readCreateList(\"unset\"),\n clearDeps: commandOptions.clearDeps === true ? true : undefined,\n clearComments: commandOptions.clearComments === true ? true : undefined,\n clearNotes: commandOptions.clearNotes === true ? true : undefined,\n clearLearnings: commandOptions.clearLearnings === true ? true : undefined,\n clearFiles: commandOptions.clearFiles === true ? true : undefined,\n clearTests: commandOptions.clearTests === true ? true : undefined,\n clearDocs: commandOptions.clearDocs === true ? true : undefined,\n clearReminders: commandOptions.clearReminders === true ? true : undefined,\n clearEvents: commandOptions.clearEvents === true ? true : undefined,\n clearTypeOptions: commandOptions.clearTypeOptions === true ? true : undefined,\n };\n for (const [key, value] of Object.entries(commandOptions)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as CreateCommandOptions;\n}\n\nexport function normalizeUpdateOptions(commandOptions: Record<string, unknown>): Record<string, unknown> {\n const readUpdateString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n commandOptions,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const readUpdateList = (target: string): string[] | undefined =>\n readStringArrayFromCommanderOptions(\n commandOptions,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n\n const normalized: Record<string, unknown> = {\n title: readUpdateString(\"title\"),\n description: readUpdateString(\"description\"),\n body: readUpdateString(\"body\"),\n status: readUpdateString(\"status\"),\n closeReason: readUpdateString(\"closeReason\"),\n priority: readUpdateString(\"priority\"),\n type: readUpdateString(\"type\"),\n tags: readUpdateString(\"tags\"),\n addTags: readUpdateList(\"addTags\"),\n removeTags: readUpdateList(\"removeTags\"),\n deadline: readUpdateString(\"deadline\"),\n estimatedMinutes: readUpdateString(\"estimatedMinutes\"),\n acceptanceCriteria: readUpdateString(\"acceptanceCriteria\"),\n definitionOfReady: readUpdateString(\"definitionOfReady\"),\n order: readUpdateString(\"order\"),\n rank: readUpdateString(\"rank\"),\n goal: readUpdateString(\"goal\"),\n objective: readUpdateString(\"objective\"),\n value: readUpdateString(\"value\"),\n impact: readUpdateString(\"impact\"),\n outcome: readUpdateString(\"outcome\"),\n whyNow: readUpdateString(\"whyNow\"),\n author: readUpdateString(\"author\"),\n message: readUpdateString(\"message\"),\n force: Boolean(commandOptions.force),\n allowAuditUpdate:\n commandOptions.allowAuditUpdate === true || commandOptions.allow_audit_update === true ? true : undefined,\n allowAuditDepUpdate:\n commandOptions.allowAuditDepUpdate === true || commandOptions.allow_audit_dep_update === true ? true : undefined,\n assignee: readUpdateString(\"assignee\"),\n parent: readUpdateString(\"parent\"),\n reviewer: readUpdateString(\"reviewer\"),\n risk: readUpdateString(\"risk\"),\n confidence: readUpdateString(\"confidence\"),\n sprint: readUpdateString(\"sprint\"),\n release: readUpdateString(\"release\"),\n blockedBy: readUpdateString(\"blockedBy\"),\n blockedReason: readUpdateString(\"blockedReason\"),\n unblockNote: readUpdateString(\"unblockNote\"),\n reporter: readUpdateString(\"reporter\"),\n severity: readUpdateString(\"severity\"),\n environment: readUpdateString(\"environment\"),\n reproSteps: readUpdateString(\"reproSteps\"),\n resolution: readUpdateString(\"resolution\"),\n expectedResult: readUpdateString(\"expectedResult\"),\n actualResult: readUpdateString(\"actualResult\"),\n affectedVersion: readUpdateString(\"affectedVersion\"),\n fixedVersion: readUpdateString(\"fixedVersion\"),\n component: readUpdateString(\"component\"),\n regression: readUpdateString(\"regression\"),\n customerImpact: readUpdateString(\"customerImpact\"),\n dep: readUpdateList(\"dep\"),\n depRemove: readUpdateList(\"depRemove\"),\n replaceDeps: commandOptions.replaceDeps === true ? true : undefined,\n replaceTests: commandOptions.replaceTests === true ? true : undefined,\n comment: readUpdateList(\"comment\"),\n note: readUpdateList(\"note\"),\n learning: readUpdateList(\"learning\"),\n file: readUpdateList(\"file\"),\n test: readUpdateList(\"test\"),\n doc: readUpdateList(\"doc\"),\n reminder: readUpdateList(\"reminder\"),\n event: readUpdateList(\"event\"),\n typeOption: readUpdateList(\"typeOption\"),\n field: readUpdateList(\"field\"),\n unset: readUpdateList(\"unset\"),\n clearDeps: commandOptions.clearDeps === true ? true : undefined,\n clearComments: commandOptions.clearComments === true ? true : undefined,\n clearNotes: commandOptions.clearNotes === true ? true : undefined,\n clearLearnings: commandOptions.clearLearnings === true ? true : undefined,\n clearFiles: commandOptions.clearFiles === true ? true : undefined,\n clearTests: commandOptions.clearTests === true ? true : undefined,\n clearDocs: commandOptions.clearDocs === true ? true : undefined,\n clearReminders: commandOptions.clearReminders === true ? true : undefined,\n clearEvents: commandOptions.clearEvents === true ? true : undefined,\n clearTypeOptions: commandOptions.clearTypeOptions === true ? true : undefined,\n };\n for (const [key, value] of Object.entries(commandOptions)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized;\n}\n\nconst UPDATE_MANY_CONTROL_OPTION_KEYS = new Set<string>([\n \"filterStatus\",\n \"filterType\",\n \"filterTag\",\n \"filterPriority\",\n \"filterDeadlineBefore\",\n \"filterDeadlineAfter\",\n \"filterUpdatedAfter\",\n \"filterUpdatedBefore\",\n \"filterCreatedAfter\",\n \"filterCreatedBefore\",\n \"filterAssignee\",\n \"filterAssigneeFilter\",\n \"filterAssignee_filter\",\n \"filterParent\",\n \"filterSprint\",\n \"filterRelease\",\n \"ids\",\n \"limit\",\n \"offset\",\n \"dryRun\",\n \"rollback\",\n \"checkpoint\",\n]);\n\nexport function extractUpdateManyMutationOptionSource(commandOptions: Record<string, unknown>): Record<string, unknown> {\n const mutationOptions: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(commandOptions)) {\n if (UPDATE_MANY_CONTROL_OPTION_KEYS.has(key)) {\n continue;\n }\n mutationOptions[key] = value;\n }\n return mutationOptions;\n}\n\nfunction readListOptionString(options: Record<string, unknown>, target: string): string | undefined {\n const contract = LIST_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n };\n const stringValue = readFirstStringFromCommanderOptions(options, contract);\n if (stringValue !== undefined) {\n return stringValue;\n }\n for (const key of contract.keys) {\n const value = options[key];\n if (target === \"ids\" && typeof value === \"string\") {\n return value;\n }\n if (typeof value === \"number\" && Number.isFinite(value)) {\n return String(value);\n }\n }\n return undefined;\n}\n\nexport function normalizeListOptions(options: Record<string, unknown>): ListOptions {\n const normalized: Record<string, unknown> = {\n status: readListOptionString(options, \"status\"),\n type: readListOptionString(options, \"type\"),\n tag: readListOptionString(options, \"tag\"),\n priority: readListOptionString(options, \"priority\"),\n deadlineBefore: readListOptionString(options, \"deadlineBefore\"),\n deadlineAfter: readListOptionString(options, \"deadlineAfter\"),\n updatedAfter: readListOptionString(options, \"updatedAfter\"),\n updatedBefore: readListOptionString(options, \"updatedBefore\"),\n createdAfter: readListOptionString(options, \"createdAfter\"),\n createdBefore: readListOptionString(options, \"createdBefore\"),\n ids: readListOptionString(options, \"ids\"),\n assignee: readListOptionString(options, \"assignee\"),\n assigneeFilter: readListOptionString(options, \"assigneeFilter\"),\n parent: readListOptionString(options, \"parent\"),\n sprint: readListOptionString(options, \"sprint\"),\n release: readListOptionString(options, \"release\"),\n limit: readListOptionString(options, \"limit\"),\n offset: readListOptionString(options, \"offset\"),\n includeBody: options.includeBody === true ? true : undefined,\n compact: options.compact === true ? true : undefined,\n brief: options.brief === true ? true : undefined,\n full: options.full === true ? true : undefined,\n fields: readListOptionString(options, \"fields\"),\n sort: readListOptionString(options, \"sort\"),\n order: readListOptionString(options, \"order\"),\n tree: options.tree === true ? true : undefined,\n treeDepth: readListOptionString(options, \"treeDepth\"),\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as ListOptions;\n}\n\nexport function normalizeAggregateOptions(options: Record<string, unknown>): AggregateOptions {\n return {\n groupBy: typeof options.groupBy === \"string\" ? options.groupBy : undefined,\n count: options.count === true ? true : undefined,\n completion: options.completion === true ? true : undefined,\n sum: typeof options.sum === \"string\" ? options.sum : undefined,\n avg: typeof options.avg === \"string\" ? options.avg : undefined,\n includeUnparented: options.includeUnparented === true || options.include_unparented === true,\n status: typeof options.status === \"string\" ? options.status : undefined,\n type: readListOptionString(options, \"type\"),\n tag: readListOptionString(options, \"tag\"),\n priority: readListOptionString(options, \"priority\"),\n deadlineBefore: readListOptionString(options, \"deadlineBefore\"),\n deadlineAfter: readListOptionString(options, \"deadlineAfter\"),\n assignee: readListOptionString(options, \"assignee\"),\n assigneeFilter: readListOptionString(options, \"assigneeFilter\"),\n parent: readListOptionString(options, \"parent\"),\n sprint: readListOptionString(options, \"sprint\"),\n release: readListOptionString(options, \"release\"),\n };\n}\n\ntype ListCommandResult = Awaited<ReturnType<typeof runList>>;\n\nexport function printListJsonStream(commandName: string, result: ListCommandResult, globalOptions: GlobalOptions): void {\n setActiveCommandResult(result);\n if (globalOptions.quiet) {\n return;\n }\n const warnings = Array.isArray(result.warnings) ? result.warnings : [];\n const metaPayload: Record<string, unknown> = {\n type: \"meta\",\n command: commandName,\n count: result.count,\n now: result.now,\n filters: result.filters,\n };\n if (warnings.length > 0) {\n metaPayload.warnings = warnings;\n }\n if (!writeStdout(`${JSON.stringify(metaPayload)}\\n`)) {\n return;\n }\n for (const item of result.items) {\n if (!writeStdout(`${JSON.stringify({ type: \"item\", command: commandName, item })}\\n`)) {\n return;\n }\n }\n writeStdout(`${JSON.stringify({ type: \"end\", command: commandName, count: result.count })}\\n`);\n}\n\ntype ActivityCommandResult = Awaited<ReturnType<typeof runActivity>>;\n\nexport function printActivityJsonStream(\n result: ActivityCommandResult,\n options: {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n },\n globalOptions: GlobalOptions,\n): void {\n setActiveCommandResult(result);\n if (globalOptions.quiet) {\n return;\n }\n const metaPayload = {\n type: \"meta\",\n command: \"activity\",\n count: result.count,\n filters: {\n id: options.id ?? null,\n op: options.op ?? null,\n author: options.author ?? null,\n from: options.from ?? null,\n to: options.to ?? null,\n limit: options.limit ?? null,\n },\n };\n if (!writeStdout(`${JSON.stringify(metaPayload)}\\n`)) {\n return;\n }\n const entries = result.compact && result.compact_activity ? result.compact_activity : result.activity;\n for (const entry of entries) {\n if (!writeStdout(`${JSON.stringify({ type: \"entry\", command: \"activity\", entry })}\\n`)) {\n return;\n }\n }\n writeStdout(`${JSON.stringify({ type: \"end\", command: \"activity\", count: result.count })}\\n`);\n}\n\nexport function normalizeSearchOptions(options: Record<string, unknown>): Record<string, unknown> {\n const readSearchString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const readSearchStringOrNumber = (target: string): string | number | undefined => {\n const candidate = readFirstValueFromCommanderOptions(\n options,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n if (typeof candidate === \"string\") {\n return candidate;\n }\n if (typeof candidate === \"number\" && Number.isFinite(candidate)) {\n return candidate;\n }\n return undefined;\n };\n const fields = readSearchString(\"fields\");\n const compactRequested = options.compact === true;\n const fullRequested = options.full === true;\n const defaultCompact = !compactRequested && !fullRequested && fields === undefined;\n const mode = options.semantic === true ? \"semantic\"\n : options.hybrid === true ? \"hybrid\"\n : readSearchString(\"mode\");\n const normalized: Record<string, unknown> = {\n mode,\n semanticWeight: readSearchStringOrNumber(\"semanticWeight\"),\n includeLinked: options.includeLinked === true ? true : undefined,\n titleExact: options.titleExact === true ? true : undefined,\n phraseExact: options.phraseExact === true ? true : undefined,\n status: readSearchString(\"status\"),\n type: readSearchString(\"type\"),\n tag: readSearchString(\"tag\"),\n priority: readSearchString(\"priority\"),\n deadlineBefore: readSearchString(\"deadlineBefore\"),\n deadlineAfter: readSearchString(\"deadlineAfter\"),\n limit: readSearchString(\"limit\"),\n fields,\n compact: compactRequested || defaultCompact ? true : undefined,\n full: fullRequested ? true : undefined,\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized;\n}\n\nexport function normalizeSearchKeywordsInput(keywords: string[]): string {\n const query = keywords\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0)\n .join(\" \");\n if (query.length === 0) {\n throw new PmCliError(\"Search query must not be empty\", EXIT_CODE.USAGE);\n }\n return query;\n}\n\n\nexport function normalizeActivityOptions(options: Record<string, unknown>): {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n compact?: boolean;\n} {\n const readActivityString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n return {\n id: readActivityString(\"id\"),\n op: readActivityString(\"op\"),\n author: readActivityString(\"author\"),\n from: readActivityString(\"from\"),\n to: readActivityString(\"to\"),\n limit: readActivityString(\"limit\"),\n compact: options.full === true ? false : options.compact === false ? false : true,\n };\n}\n\nexport function resolveActivityStreamMode(raw: unknown): boolean {\n if (raw === true) {\n return true;\n }\n if (raw === false || raw === undefined || raw === null) {\n return false;\n }\n if (typeof raw === \"string\") {\n const normalized = raw.trim().toLowerCase();\n if (\n normalized.length === 0 ||\n normalized === \"rows\" ||\n normalized === \"ndjson\" ||\n normalized === \"jsonl\" ||\n normalized === \"true\" ||\n normalized === \"1\" ||\n normalized === \"yes\" ||\n normalized === \"on\"\n ) {\n return true;\n }\n if (normalized === \"false\" || normalized === \"off\" || normalized === \"none\" || normalized === \"0\") {\n return false;\n }\n }\n throw new PmCliError(\"Activity --stream accepts rows|ndjson|jsonl (or no value)\", EXIT_CODE.USAGE);\n}\n\nexport function normalizeContextOptions(options: Record<string, unknown>): ContextOptions {\n const readContextString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const sectionRaw = options.section;\n const section: string[] | undefined = Array.isArray(sectionRaw)\n ? (sectionRaw as string[]).filter((v) => typeof v === \"string\" && v.trim().length > 0)\n : typeof sectionRaw === \"string\" && sectionRaw.trim().length > 0\n ? [sectionRaw]\n : undefined;\n const normalized: Record<string, unknown> = {\n date: readContextString(\"date\"),\n from: readContextString(\"from\"),\n to: readContextString(\"to\"),\n past: options.past === true ? true : undefined,\n type: readContextString(\"type\"),\n tag: readContextString(\"tag\"),\n priority: readContextString(\"priority\"),\n assignee: readContextString(\"assignee\"),\n assigneeFilter: readContextString(\"assigneeFilter\"),\n sprint: readContextString(\"sprint\"),\n release: readContextString(\"release\"),\n limit: readContextString(\"limit\"),\n format: readContextString(\"format\"),\n depth: readContextString(\"depth\"),\n section: section && section.length > 0 ? section : undefined,\n activityLimit: readContextString(\"activityLimit\"),\n staleThreshold: readContextString(\"staleThreshold\"),\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as ContextOptions;\n}\n\nfunction collectMutationItemIds(result: unknown): string[] {\n if (!result || typeof result !== \"object\") {\n return [];\n }\n const record = result as Record<string, unknown>;\n const ids = new Set<string>();\n const pushId = (value: unknown): void => {\n if (typeof value !== \"string\") {\n return;\n }\n const normalized = value.trim();\n if (normalized.length === 0) {\n return;\n }\n ids.add(normalized);\n };\n\n pushId(record.id);\n\n const item = record.item;\n if (item && typeof item === \"object\") {\n pushId((item as { id?: unknown }).id);\n }\n\n const explicitIds = record.ids;\n if (Array.isArray(explicitIds)) {\n for (const candidate of explicitIds) {\n pushId(candidate);\n }\n }\n\n const items = record.items;\n if (Array.isArray(items)) {\n for (const candidate of items) {\n if (!candidate || typeof candidate !== \"object\") {\n continue;\n }\n pushId((candidate as { id?: unknown }).id);\n }\n }\n\n return [...ids].sort((left, right) => left.localeCompare(right));\n}\n\nexport async function invalidateSearchCachesForMutation(globalOptions: GlobalOptions, result?: unknown): Promise<void> {\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n const refreshResult = await refreshSearchArtifactsForMutation(pmRoot, collectMutationItemIds(result), {\n background: !shouldRunSearchRefreshInForeground(),\n });\n if (globalOptions.profile && refreshResult.warnings.length > 0) {\n printError(`profile:search_refresh_warnings=${formatHookWarnings(refreshResult.warnings)}`);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAM,0BAA0B,uBAAO,0BAA0B;AAWjE,SAAS,qBAAqB,SAAgB;AAC5C,SAAO,OAAO,YAAY,YAAY,YAAY,OAAO,UAAkC,CAAA;AAC7F;AAEM,SAAU,yBAAyB,SAAkB,eAA4B;AACpF,UAAuC,uBAAuB,IAAI,EAAE,GAAG,cAAa;AACvF;AAEM,SAAU,2BAA2B,SAAgB;AACzD,SAAQ,QAAuC,uBAAuB;AACxE;AAEM,SAAU,iBAAiB,SAAgB;AAC/C,QAAM,WAAY,QAAuC,uBAAuB;AAChF,MAAI,UAAU;AACZ,WAAO,EAAE,GAAG,SAAQ;EACtB;AACA,QAAM,SAAS,qBAAqB,OAAO;AAC3C,QAAM,OAAO,OAAO,OAAO,oBAAoB,aAC3C,OAAO,gBAAe,IACtB,OAAO,OAAO,SAAS,aACrB,OAAO,KAAI,IACX,CAAA;AACN,SAAO;IACL,MAAM,KAAK,SAAS,OAAO,OAAO;IAClC,OAAO,QAAQ,KAAK,KAAK;IACzB,iBAAiB,KAAK,kBAAkB;IACxC,QAAQ,KAAK,W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AAG;AACnB,QAAM,SAAS,CAAC,UAAwB;AACtC,QAAI,OAAO,UAAU,UAAU;AAC7B;IACF;AACA,UAAM,aAAa,MAAM,KAAI;AAC7B,QAAI,WAAW,WAAW,GAAG;AAC3B;IACF;AACA,QAAI,IAAI,UAAU;EACpB;AAEA,SAAO,OAAO,EAAE;AAEhB,QAAM,OAAO,OAAO;AACpB,MAAI,QAAQ,OAAO,SAAS,UAAU;AACpC,WAAQ,KAA0B,EAAE;EACtC;AAEA,QAAM,cAAc,OAAO;AAC3B,MAAI,MAAM,QAAQ,WAAW,GAAG;AAC9B,eAAW,aAAa,aAAa;AACnC,aAAO,SAAS;IAClB;EACF;AAEA,QAAM,QAAQ,OAAO;AACrB,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,eAAW,aAAa,OAAO;AAC7B,UAAI,CAAC,aAAa,OAAO,cAAc,UAAU;AAC/C;MACF;AACA,aAAQ,UAA+B,EAAE;IAC3C;EACF;AAEA,SAAO,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,MAAM,UAAU,KAAK,cAAc,KAAK,CAAC;AACjE;AAEA,eAAsB,kCAAkC,eAA8B,QAAgB;AACpG,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,cAAc,IAAI;AAC9D,QAAM,gBAAgB,MAAM,kCAAkC,QAAQ,uBAAuB,MAAM,GAAG;IACpG,YAAY,CAAC,mCAAkC;GAChD;AACD,MAAI,cAAc,WAAW,cAAc,SAAS,SAAS,GAAG;AAC9D,eAAW,mCAAmC,mBAAmB,cAAc,QAAQ,CAAC,EAAE;EAC5F;AACF","debugId":"757afd85-8988-5517-aa0a-61a39e52c652"}
@@ -10,25 +10,25 @@ import {
10
10
  parseLinkedTestMinLines,
11
11
  parseLinkedTestRegexList,
12
12
  parseLinkedTestStringList
13
- } from "./chunk-O4L7Z6LB.js";
13
+ } from "./chunk-SXKNJPQ7.js";
14
14
  import {
15
15
  createStdinTokenResolver,
16
16
  mergeAdditiveTags,
17
17
  parseCsvKv,
18
18
  parseOptionalNumber,
19
19
  parseTags
20
- } from "./chunk-4TJWRPIH.js";
20
+ } from "./chunk-TNAP7EJX.js";
21
21
  import {
22
22
  normalizeParentReferenceValue,
23
23
  validateMissingParentReference,
24
24
  validateSprintOrReleaseValue
25
- } from "./chunk-NUGAWYEN.js";
25
+ } from "./chunk-XTKJSVWH.js";
26
26
  import {
27
27
  buildInvalidTypeError
28
- } from "./chunk-JEGFLKSI.js";
28
+ } from "./chunk-OLKBSY4N.js";
29
29
  import {
30
30
  printError
31
- } from "./chunk-YSANBZAE.js";
31
+ } from "./chunk-GWZSYR6X.js";
32
32
  import {
33
33
  acquireLock,
34
34
  appendHistoryEntry,
@@ -37,18 +37,18 @@ import {
37
37
  createHistoryEntry,
38
38
  locateItem,
39
39
  parseRegisteredItemFieldAssignments
40
- } from "./chunk-LF2VNLEZ.js";
40
+ } from "./chunk-3KLPFWZ4.js";
41
41
  import {
42
42
  generateItemId,
43
43
  normalizeItemId
44
- } from "./chunk-WCWIDJII.js";
44
+ } from "./chunk-VPEAS7PS.js";
45
45
  import {
46
46
  canonicalDocument,
47
47
  collectRuntimeCreateFieldValues,
48
48
  normalizeFrontMatter,
49
49
  normalizeStatusInput,
50
50
  serializeItemDocument
51
- } from "./chunk-NHRZSYAA.js";
51
+ } from "./chunk-73ZPG2I3.js";
52
52
  import {
53
53
  canonicalizeCommandOptionKey,
54
54
  commandOptionFlagLabel,
@@ -57,11 +57,11 @@ import {
57
57
  resolveTypeDefinition,
58
58
  resolveTypeName,
59
59
  validateTypeOptions
60
- } from "./chunk-U3Z4OCZC.js";
60
+ } from "./chunk-5SCT2JCT.js";
61
61
  import {
62
62
  nowIso,
63
63
  resolveIsoOrRelative
64
- } from "./chunk-SAUXUI6U.js";
64
+ } from "./chunk-IUKD4W6Z.js";
65
65
  import {
66
66
  CONFIDENCE_TEXT_VALUES,
67
67
  DEPENDENCY_KIND_VALUES,
@@ -89,7 +89,7 @@ import {
89
89
  runActiveOnWriteHooks,
90
90
  weekdayOrderIndex,
91
91
  writeFileAtomic
92
- } from "./chunk-C72IQIBT.js";
92
+ } from "./chunk-FY4SPXSC.js";
93
93
 
94
94
  // dist/core/item/priority.js
95
95
  !(function() {
@@ -473,7 +473,7 @@ function parseTypeOptionEntries(raw) {
473
473
  !(function() {
474
474
  try {
475
475
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
476
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6d06ae5b-933c-54ca-90c4-998090c1fcb3");
476
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "206be509-c3f1-5b38-936f-ae7c92c429fa");
477
477
  } catch (e2) {
478
478
  }
479
479
  })();
@@ -1620,7 +1620,7 @@ async function runCreate(options, global2) {
1620
1620
  const risk = riskRaw !== void 0 ? ensureEnumValue(normalizeRiskInput(riskRaw), RISK_VALUES, "risk") : void 0;
1621
1621
  const confidenceRaw = unsetTargets.frontMatterKeys.has("confidence") || resolvedOptions.confidence === void 0 ? void 0 : parseOptionalString(resolvedOptions.confidence);
1622
1622
  const confidence = confidenceRaw !== void 0 ? parseConfidenceInput(confidenceRaw) : void 0;
1623
- const parentReferencePolicy = settings.validation.parent_reference;
1623
+ const parentReferencePolicy = resolvedOptions.allowMissingParent === true && settings.validation.parent_reference === "strict_error" ? "warn" : settings.validation.parent_reference;
1624
1624
  const sprintReleasePolicy = settings.validation.sprint_release_format;
1625
1625
  const validationWarnings = [];
1626
1626
  if (type.toLowerCase() === "event" && (events.values === void 0 || events.values.length === 0)) {
@@ -1858,4 +1858,4 @@ export {
1858
1858
  parseDocs,
1859
1859
  runCreate
1860
1860
  };
1861
- //# sourceMappingURL=chunk-BIRVSIM2.js.map
1861
+ //# sourceMappingURL=chunk-IKOH24GZ.js.map