@unbrained/pm-cli 2026.6.13 → 2026.6.17

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 (808) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +1 -1
  3. package/dist/cli/bootstrap-args.d.ts +29 -0
  4. package/dist/cli/bootstrap-args.js +11 -4
  5. package/dist/cli/bootstrap-args.js.map +1 -1
  6. package/dist/cli/commander-usage.d.ts +12 -0
  7. package/dist/cli/commander-usage.js +18 -7
  8. package/dist/cli/commander-usage.js.map +1 -1
  9. package/dist/cli/commands/activity.d.ts +19 -0
  10. package/dist/cli/commands/activity.js +12 -2
  11. package/dist/cli/commands/activity.js.map +1 -1
  12. package/dist/cli/commands/aggregate.d.ts +58 -0
  13. package/dist/cli/commands/aggregate.js +48 -15
  14. package/dist/cli/commands/aggregate.js.map +1 -1
  15. package/dist/cli/commands/annotation-command.d.ts +6 -1
  16. package/dist/cli/commands/annotation-command.js +72 -2
  17. package/dist/cli/commands/annotation-command.js.map +1 -1
  18. package/dist/cli/commands/append.js +4 -3
  19. package/dist/cli/commands/append.js.map +1 -1
  20. package/dist/cli/commands/close-many.d.ts +20 -0
  21. package/dist/cli/commands/close-many.js +14 -23
  22. package/dist/cli/commands/close-many.js.map +1 -1
  23. package/dist/cli/commands/close.js +37 -4
  24. package/dist/cli/commands/close.js.map +1 -1
  25. package/dist/cli/commands/comments-audit.js +3 -2
  26. package/dist/cli/commands/comments-audit.js.map +1 -1
  27. package/dist/cli/commands/comments.d.ts +2 -0
  28. package/dist/cli/commands/comments.js +49 -23
  29. package/dist/cli/commands/comments.js.map +1 -1
  30. package/dist/cli/commands/completion.js +362 -15
  31. package/dist/cli/commands/completion.js.map +1 -1
  32. package/dist/cli/commands/config.d.ts +51 -1
  33. package/dist/cli/commands/config.js +50 -12
  34. package/dist/cli/commands/config.js.map +1 -1
  35. package/dist/cli/commands/context.d.ts +79 -1
  36. package/dist/cli/commands/context.js +151 -25
  37. package/dist/cli/commands/context.js.map +1 -1
  38. package/dist/cli/commands/contracts.d.ts +80 -1
  39. package/dist/cli/commands/contracts.js +54 -4
  40. package/dist/cli/commands/contracts.js.map +1 -1
  41. package/dist/cli/commands/create.d.ts +51 -0
  42. package/dist/cli/commands/create.js +137 -18
  43. package/dist/cli/commands/create.js.map +1 -1
  44. package/dist/cli/commands/dedupe-audit.d.ts +33 -0
  45. package/dist/cli/commands/dedupe-audit.js +18 -14
  46. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  47. package/dist/cli/commands/deps.js +7 -4
  48. package/dist/cli/commands/deps.js.map +1 -1
  49. package/dist/cli/commands/event-validation-messages.js +3 -3
  50. package/dist/cli/commands/event-validation-messages.js.map +1 -1
  51. package/dist/cli/commands/extension/bundled-catalog.d.ts +7 -0
  52. package/dist/cli/commands/extension/bundled-catalog.js +19 -15
  53. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  54. package/dist/cli/commands/extension/install-sources.d.ts +41 -1
  55. package/dist/cli/commands/extension/install-sources.js +26 -8
  56. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  57. package/dist/cli/commands/extension/shared.d.ts +5 -0
  58. package/dist/cli/commands/extension/shared.js +9 -3
  59. package/dist/cli/commands/extension/shared.js.map +1 -1
  60. package/dist/cli/commands/extension.d.ts +133 -1
  61. package/dist/cli/commands/extension.js +127 -9
  62. package/dist/cli/commands/extension.js.map +1 -1
  63. package/dist/cli/commands/files.d.ts +30 -1
  64. package/dist/cli/commands/files.js +21 -2
  65. package/dist/cli/commands/files.js.map +1 -1
  66. package/dist/cli/commands/focus.d.ts +11 -0
  67. package/dist/cli/commands/focus.js +86 -0
  68. package/dist/cli/commands/focus.js.map +1 -0
  69. package/dist/cli/commands/get.d.ts +9 -2
  70. package/dist/cli/commands/get.js +34 -6
  71. package/dist/cli/commands/get.js.map +1 -1
  72. package/dist/cli/commands/guide.d.ts +5 -0
  73. package/dist/cli/commands/guide.js +6 -3
  74. package/dist/cli/commands/guide.js.map +1 -1
  75. package/dist/cli/commands/health.d.ts +109 -0
  76. package/dist/cli/commands/health.js +87 -35
  77. package/dist/cli/commands/health.js.map +1 -1
  78. package/dist/cli/commands/history-compact.js +27 -36
  79. package/dist/cli/commands/history-compact.js.map +1 -1
  80. package/dist/cli/commands/history-redact.d.ts +46 -0
  81. package/dist/cli/commands/history-redact.js +99 -67
  82. package/dist/cli/commands/history-redact.js.map +1 -1
  83. package/dist/cli/commands/history-repair.js +34 -37
  84. package/dist/cli/commands/history-repair.js.map +1 -1
  85. package/dist/cli/commands/history.js +6 -2
  86. package/dist/cli/commands/history.js.map +1 -1
  87. package/dist/cli/commands/index.d.ts +4 -1
  88. package/dist/cli/commands/index.js +6 -3
  89. package/dist/cli/commands/index.js.map +1 -1
  90. package/dist/cli/commands/init-agent-guidance.d.ts +54 -0
  91. package/dist/cli/commands/init-agent-guidance.js +31 -4
  92. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  93. package/dist/cli/commands/init.d.ts +38 -2
  94. package/dist/cli/commands/init.js +50 -64
  95. package/dist/cli/commands/init.js.map +1 -1
  96. package/dist/cli/commands/learnings.js +4 -3
  97. package/dist/cli/commands/learnings.js.map +1 -1
  98. package/dist/cli/commands/lifecycle-transitions.d.ts +23 -0
  99. package/dist/cli/commands/lifecycle-transitions.js +41 -0
  100. package/dist/cli/commands/lifecycle-transitions.js.map +1 -0
  101. package/dist/cli/commands/linked-artifacts.d.ts +5 -0
  102. package/dist/cli/commands/linked-artifacts.js +18 -4
  103. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  104. package/dist/cli/commands/linked-test-parsers.d.ts +5 -0
  105. package/dist/cli/commands/linked-test-parsers.js +5 -2
  106. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  107. package/dist/cli/commands/list-filter-shared.d.ts +8 -0
  108. package/dist/cli/commands/list-filter-shared.js +70 -0
  109. package/dist/cli/commands/list-filter-shared.js.map +1 -0
  110. package/dist/cli/commands/list.d.ts +116 -0
  111. package/dist/cli/commands/list.js +194 -6
  112. package/dist/cli/commands/list.js.map +1 -1
  113. package/dist/cli/commands/normalize.js +16 -2
  114. package/dist/cli/commands/normalize.js.map +1 -1
  115. package/dist/cli/commands/notes.js +4 -3
  116. package/dist/cli/commands/notes.js.map +1 -1
  117. package/dist/cli/commands/plan.js +3 -2
  118. package/dist/cli/commands/plan.js.map +1 -1
  119. package/dist/cli/commands/recurrence-parsers.d.ts +9 -0
  120. package/dist/cli/commands/recurrence-parsers.js +19 -2
  121. package/dist/cli/commands/recurrence-parsers.js.map +1 -1
  122. package/dist/cli/commands/reindex.d.ts +83 -0
  123. package/dist/cli/commands/reindex.js +45 -10
  124. package/dist/cli/commands/reindex.js.map +1 -1
  125. package/dist/cli/commands/repeatable-metadata-parsers.js +28 -4
  126. package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
  127. package/dist/cli/commands/restore.d.ts +40 -1
  128. package/dist/cli/commands/restore.js +27 -2
  129. package/dist/cli/commands/restore.js.map +1 -1
  130. package/dist/cli/commands/scheduling-shortcuts.d.ts +43 -0
  131. package/dist/cli/commands/scheduling-shortcuts.js +87 -0
  132. package/dist/cli/commands/scheduling-shortcuts.js.map +1 -0
  133. package/dist/cli/commands/schema.d.ts +152 -2
  134. package/dist/cli/commands/schema.js +510 -4
  135. package/dist/cli/commands/schema.js.map +1 -1
  136. package/dist/cli/commands/search.d.ts +289 -1
  137. package/dist/cli/commands/search.js +367 -60
  138. package/dist/cli/commands/search.js.map +1 -1
  139. package/dist/cli/commands/stats.d.ts +38 -0
  140. package/dist/cli/commands/stats.js +38 -10
  141. package/dist/cli/commands/stats.js.map +1 -1
  142. package/dist/cli/commands/telemetry.js +5 -3
  143. package/dist/cli/commands/telemetry.js.map +1 -1
  144. package/dist/cli/commands/templates.d.ts +18 -0
  145. package/dist/cli/commands/templates.js +9 -2
  146. package/dist/cli/commands/templates.js.map +1 -1
  147. package/dist/cli/commands/test-all.d.ts +5 -0
  148. package/dist/cli/commands/test-all.js +9 -3
  149. package/dist/cli/commands/test-all.js.map +1 -1
  150. package/dist/cli/commands/test.d.ts +70 -1
  151. package/dist/cli/commands/test.js +84 -3
  152. package/dist/cli/commands/test.js.map +1 -1
  153. package/dist/cli/commands/update-many.d.ts +34 -1
  154. package/dist/cli/commands/update-many.js +60 -31
  155. package/dist/cli/commands/update-many.js.map +1 -1
  156. package/dist/cli/commands/update.d.ts +71 -0
  157. package/dist/cli/commands/update.js +91 -11
  158. package/dist/cli/commands/update.js.map +1 -1
  159. package/dist/cli/commands/upgrade.d.ts +28 -1
  160. package/dist/cli/commands/upgrade.js +17 -4
  161. package/dist/cli/commands/upgrade.js.map +1 -1
  162. package/dist/cli/commands/validate.d.ts +114 -0
  163. package/dist/cli/commands/validate.js +153 -8
  164. package/dist/cli/commands/validate.js.map +1 -1
  165. package/dist/cli/error-guidance.d.ts +30 -0
  166. package/dist/cli/error-guidance.js +41 -6
  167. package/dist/cli/error-guidance.js.map +1 -1
  168. package/dist/cli/extension-command-options.js +9 -7
  169. package/dist/cli/extension-command-options.js.map +1 -1
  170. package/dist/cli/help-content.d.ts +8 -0
  171. package/dist/cli/help-content.js +54 -6
  172. package/dist/cli/help-content.js.map +1 -1
  173. package/dist/cli/help-json-payload.d.ts +19 -1
  174. package/dist/cli/help-json-payload.js +16 -7
  175. package/dist/cli/help-json-payload.js.map +1 -1
  176. package/dist/cli/main.d.ts +242 -0
  177. package/dist/cli/main.js +241 -45
  178. package/dist/cli/main.js.map +1 -1
  179. package/dist/cli/register-list-query.js +62 -5
  180. package/dist/cli/register-list-query.js.map +1 -1
  181. package/dist/cli/register-mutation.d.ts +16 -0
  182. package/dist/cli/register-mutation.js +376 -100
  183. package/dist/cli/register-mutation.js.map +1 -1
  184. package/dist/cli/register-operations.d.ts +8 -0
  185. package/dist/cli/register-operations.js +134 -11
  186. package/dist/cli/register-operations.js.map +1 -1
  187. package/dist/cli/register-setup.js +9 -6
  188. package/dist/cli/register-setup.js.map +1 -1
  189. package/dist/cli/registration-helpers.d.ts +4 -0
  190. package/dist/cli/registration-helpers.js +124 -38
  191. package/dist/cli/registration-helpers.js.map +1 -1
  192. package/dist/cli-bundle/chunks/activity-PZYSZA26.js +18 -0
  193. package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js → activity-SFM4THAU.js} +13 -11
  194. package/dist/cli-bundle/chunks/{aggregate-IRHJWEKG.js → aggregate-Y5ADDKBM.js} +55 -26
  195. package/dist/cli-bundle/chunks/aggregate-Y5ADDKBM.js.map +1 -0
  196. package/dist/cli-bundle/chunks/{aggregate-XEBW22UQ.js → aggregate-YTAUQLRW.js} +54 -25
  197. package/dist/cli-bundle/chunks/aggregate-YTAUQLRW.js.map +7 -0
  198. package/dist/cli-bundle/chunks/{append-NL67JNJU.js → append-4M7OVV7M.js} +11 -11
  199. package/dist/cli-bundle/chunks/append-4M7OVV7M.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{append-N2AWXKZC.js → append-HSPK4L4V.js} +10 -10
  201. package/dist/cli-bundle/chunks/{append-N2AWXKZC.js.map → append-HSPK4L4V.js.map} +2 -2
  202. package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js → chunk-26BM6YLO.js} +3 -3
  203. package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js → chunk-2C6FU3D3.js} +5 -5
  204. package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js.map → chunk-2C6FU3D3.js.map} +1 -1
  205. package/dist/cli-bundle/chunks/{chunk-SQDKAEKG.js → chunk-2OPYLXDO.js} +117 -37
  206. package/dist/cli-bundle/chunks/chunk-2OPYLXDO.js.map +7 -0
  207. package/dist/cli-bundle/chunks/{chunk-4ZKKZMLH.js → chunk-2S46FKLB.js} +104 -30
  208. package/dist/cli-bundle/chunks/chunk-2S46FKLB.js.map +1 -0
  209. package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js → chunk-2TMKMTEI.js} +3 -3
  210. package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js → chunk-2VH7DFSJ.js} +2 -2
  211. package/dist/cli-bundle/chunks/{chunk-RHYBR6G7.js → chunk-3ENF4NO4.js} +74 -14
  212. package/dist/cli-bundle/chunks/chunk-3ENF4NO4.js.map +1 -0
  213. package/dist/cli-bundle/chunks/chunk-3GR2HTYY.js +404 -0
  214. package/dist/cli-bundle/chunks/chunk-3GR2HTYY.js.map +7 -0
  215. package/dist/cli-bundle/chunks/{chunk-AAUYXSFF.js → chunk-3R3FYCBV.js} +223 -50
  216. package/dist/cli-bundle/chunks/chunk-3R3FYCBV.js.map +7 -0
  217. package/dist/cli-bundle/chunks/{chunk-5HSAHRYA.js → chunk-3UKJX3RP.js} +82 -21
  218. package/dist/cli-bundle/chunks/chunk-3UKJX3RP.js.map +7 -0
  219. package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js +83 -0
  220. package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js.map +1 -0
  221. package/dist/cli-bundle/chunks/{chunk-UCVJP4JL.js → chunk-5FDYWOJT.js} +52 -8
  222. package/dist/cli-bundle/chunks/chunk-5FDYWOJT.js.map +7 -0
  223. package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js → chunk-5XGWFUW2.js} +2 -2
  224. package/dist/cli-bundle/chunks/{chunk-LYNQ3NGI.js → chunk-6BD77FGL.js} +309 -20
  225. package/dist/cli-bundle/chunks/chunk-6BD77FGL.js.map +1 -0
  226. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js +35 -0
  227. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js.map +7 -0
  228. package/dist/cli-bundle/chunks/{chunk-36BCSMKP.js → chunk-6HF6CIY2.js} +26 -11
  229. package/dist/cli-bundle/chunks/chunk-6HF6CIY2.js.map +7 -0
  230. package/dist/cli-bundle/chunks/{chunk-M3SI2REU.js → chunk-6PBPD4MN.js} +322 -19
  231. package/dist/cli-bundle/chunks/chunk-6PBPD4MN.js.map +7 -0
  232. package/dist/cli-bundle/chunks/{chunk-TSXWFN3L.js → chunk-6VFUEGOA.js} +53 -9
  233. package/dist/cli-bundle/chunks/chunk-6VFUEGOA.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{chunk-2J2AH4V5.js → chunk-AAOXSPAE.js} +56 -72
  235. package/dist/cli-bundle/chunks/chunk-AAOXSPAE.js.map +1 -0
  236. package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js → chunk-AJCQ5GT6.js} +4 -4
  237. package/dist/cli-bundle/chunks/chunk-ALTGYHN3.js +61 -0
  238. package/dist/cli-bundle/chunks/chunk-ALTGYHN3.js.map +7 -0
  239. package/dist/cli-bundle/chunks/{chunk-KHGTYCJ6.js → chunk-AOJQL33L.js} +83 -22
  240. package/dist/cli-bundle/chunks/chunk-AOJQL33L.js.map +1 -0
  241. package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js → chunk-AXLDUGXA.js} +7 -4
  242. package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js.map → chunk-AXLDUGXA.js.map} +2 -2
  243. package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js → chunk-BITCVGHT.js} +2 -2
  244. package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js → chunk-CGQTFWYI.js} +4 -4
  245. package/dist/cli-bundle/chunks/{chunk-LFW5NQUP.js → chunk-CHM2VFVL.js} +407 -290
  246. package/dist/cli-bundle/chunks/chunk-CHM2VFVL.js.map +7 -0
  247. package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js → chunk-COVLE33A.js} +3 -3
  248. package/dist/cli-bundle/chunks/{chunk-SGMGMCIF.js → chunk-DDNBWH4W.js} +157 -25
  249. package/dist/cli-bundle/chunks/chunk-DDNBWH4W.js.map +1 -0
  250. package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js → chunk-F5MSD5HE.js} +2 -2
  251. package/dist/cli-bundle/chunks/{chunk-6TBR5AZ2.js → chunk-FAXB6F6R.js} +76 -8
  252. package/dist/cli-bundle/chunks/chunk-FAXB6F6R.js.map +7 -0
  253. package/dist/cli-bundle/chunks/{chunk-L6YQONLM.js → chunk-FPDK5BZQ.js} +18 -19
  254. package/dist/cli-bundle/chunks/chunk-FPDK5BZQ.js.map +1 -0
  255. package/dist/cli-bundle/chunks/{chunk-AGG32LKL.js → chunk-FPY2TOFI.js} +480 -24
  256. package/dist/cli-bundle/chunks/chunk-FPY2TOFI.js.map +1 -0
  257. package/dist/cli-bundle/chunks/{chunk-JWXTOYBI.js → chunk-G2MOUCTU.js} +121 -44
  258. package/dist/cli-bundle/chunks/chunk-G2MOUCTU.js.map +7 -0
  259. package/dist/cli-bundle/chunks/{chunk-3VULHQNS.js → chunk-G57RHEGP.js} +36 -18
  260. package/dist/cli-bundle/chunks/chunk-G57RHEGP.js.map +1 -0
  261. package/dist/cli-bundle/chunks/{chunk-QQG4HEX7.js → chunk-IROHIK2T.js} +37 -63
  262. package/dist/cli-bundle/chunks/chunk-IROHIK2T.js.map +1 -0
  263. package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js → chunk-JZHL4E3Q.js} +4 -4
  264. package/dist/cli-bundle/chunks/{chunk-XXLMJDUB.js → chunk-KA22USXD.js} +21 -22
  265. package/dist/cli-bundle/chunks/chunk-KA22USXD.js.map +7 -0
  266. package/dist/cli-bundle/chunks/{chunk-WLH7X4RN.js → chunk-KBC4O7SY.js} +56 -72
  267. package/dist/cli-bundle/chunks/chunk-KBC4O7SY.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js → chunk-KCAGIH6K.js} +3 -3
  269. package/dist/cli-bundle/chunks/{chunk-BVL5KGVA.js → chunk-KO3VM5GS.js} +27 -12
  270. package/dist/cli-bundle/chunks/chunk-KO3VM5GS.js.map +1 -0
  271. package/dist/cli-bundle/chunks/{chunk-IXVSSHGV.js → chunk-LNH5Q32E.js} +13 -8
  272. package/dist/cli-bundle/chunks/chunk-LNH5Q32E.js.map +7 -0
  273. package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js → chunk-LORM3M2I.js} +4 -4
  274. package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js.map → chunk-LORM3M2I.js.map} +1 -1
  275. package/dist/cli-bundle/chunks/{chunk-PNYAAB4S.js → chunk-LWGMDLQ6.js} +8 -3
  276. package/dist/cli-bundle/chunks/chunk-LWGMDLQ6.js.map +1 -0
  277. package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js → chunk-M4AVU7VC.js} +19 -8
  278. package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js.map → chunk-M4AVU7VC.js.map} +2 -2
  279. package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js → chunk-MIBX6ZRN.js} +3 -3
  280. package/dist/cli-bundle/chunks/{chunk-AUDDXKNX.js → chunk-MMF2E3FM.js} +77 -9
  281. package/dist/cli-bundle/chunks/chunk-MMF2E3FM.js.map +1 -0
  282. package/dist/cli-bundle/chunks/{chunk-RFR2YQGO.js → chunk-MORZOR7W.js} +21 -8
  283. package/dist/cli-bundle/chunks/chunk-MORZOR7W.js.map +1 -0
  284. package/dist/cli-bundle/chunks/{chunk-4TPFXE2R.js → chunk-MUTUZ2HD.js} +118 -74
  285. package/dist/cli-bundle/chunks/chunk-MUTUZ2HD.js.map +1 -0
  286. package/dist/cli-bundle/chunks/{chunk-HZOX5BYD.js → chunk-OGXEBTX3.js} +35 -17
  287. package/dist/cli-bundle/chunks/chunk-OGXEBTX3.js.map +7 -0
  288. package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js → chunk-OOIH6J5T.js} +4 -4
  289. package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js.map → chunk-OOIH6J5T.js.map} +1 -1
  290. package/dist/cli-bundle/chunks/{chunk-VNC2HBL4.js → chunk-OSBJPPX3.js} +20 -9
  291. package/dist/cli-bundle/chunks/chunk-OSBJPPX3.js.map +1 -0
  292. package/dist/cli-bundle/chunks/{chunk-2ANTZBYF.js → chunk-PJS3WDO2.js} +122 -45
  293. package/dist/cli-bundle/chunks/chunk-PJS3WDO2.js.map +1 -0
  294. package/dist/cli-bundle/chunks/{chunk-7SM7VA5I.js → chunk-QGPE2H6Z.js} +19 -8
  295. package/dist/cli-bundle/chunks/chunk-QGPE2H6Z.js.map +7 -0
  296. package/dist/cli-bundle/chunks/chunk-QVTFFLR2.js +58 -0
  297. package/dist/cli-bundle/chunks/chunk-QVTFFLR2.js.map +1 -0
  298. package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js → chunk-QW2F6ARZ.js} +8 -5
  299. package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js.map → chunk-QW2F6ARZ.js.map} +1 -1
  300. package/dist/cli-bundle/chunks/{chunk-TOX7YQ7X.js → chunk-QXC3LWB7.js} +223 -50
  301. package/dist/cli-bundle/chunks/chunk-QXC3LWB7.js.map +1 -0
  302. package/dist/cli-bundle/chunks/{chunk-W6KNFAMZ.js → chunk-QXMXRPX5.js} +9 -8
  303. package/dist/cli-bundle/chunks/chunk-QXMXRPX5.js.map +7 -0
  304. package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js → chunk-R4AKUPKI.js} +3 -3
  305. package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js.map → chunk-R4AKUPKI.js.map} +1 -1
  306. package/dist/cli-bundle/chunks/chunk-RASR23HV.js +394 -0
  307. package/dist/cli-bundle/chunks/chunk-RASR23HV.js.map +1 -0
  308. package/dist/cli-bundle/chunks/{chunk-JW7D6437.js → chunk-SCDCNGCV.js} +20 -9
  309. package/dist/cli-bundle/chunks/chunk-SCDCNGCV.js.map +1 -0
  310. package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js → chunk-SCS5PVAA.js} +10 -9
  311. package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js.map → chunk-SCS5PVAA.js.map} +2 -2
  312. package/dist/cli-bundle/chunks/{chunk-S2CDTRJ6.js → chunk-SJCMTOEU.js} +381 -271
  313. package/dist/cli-bundle/chunks/chunk-SJCMTOEU.js.map +1 -0
  314. package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js → chunk-SO2ES46D.js} +11 -10
  315. package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js.map → chunk-SO2ES46D.js.map} +1 -1
  316. package/dist/cli-bundle/chunks/{chunk-MACCNKSZ.js → chunk-TBV33CB4.js} +36 -62
  317. package/dist/cli-bundle/chunks/chunk-TBV33CB4.js.map +7 -0
  318. package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js +86 -0
  319. package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js.map +7 -0
  320. package/dist/cli-bundle/chunks/{chunk-HLEGAQXT.js → chunk-TWBDDVIF.js} +20 -7
  321. package/dist/cli-bundle/chunks/chunk-TWBDDVIF.js.map +7 -0
  322. package/dist/cli-bundle/chunks/{chunk-4JHJ7YG2.js → chunk-UGUJ2UOR.js} +118 -74
  323. package/dist/cli-bundle/chunks/chunk-UGUJ2UOR.js.map +7 -0
  324. package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js → chunk-UN6P3IJ4.js} +3 -3
  325. package/dist/cli-bundle/chunks/{chunk-32XSW44C.js → chunk-V2GYOMEX.js} +10 -9
  326. package/dist/cli-bundle/chunks/chunk-V2GYOMEX.js.map +1 -0
  327. package/dist/cli-bundle/chunks/{chunk-HWHONML5.js → chunk-VF3KQGNY.js} +4 -4
  328. package/dist/cli-bundle/chunks/{chunk-SOHXUA2Q.js → chunk-VHG6LUKR.js} +116 -36
  329. package/dist/cli-bundle/chunks/chunk-VHG6LUKR.js.map +1 -0
  330. package/dist/cli-bundle/chunks/{chunk-7CRFV6JR.js → chunk-VXHMQDXA.js} +483 -27
  331. package/dist/cli-bundle/chunks/chunk-VXHMQDXA.js.map +7 -0
  332. package/dist/cli-bundle/chunks/{chunk-IZHCCG4S.js → chunk-VXRFAE7W.js} +14 -9
  333. package/dist/cli-bundle/chunks/chunk-VXRFAE7W.js.map +1 -0
  334. package/dist/cli-bundle/chunks/{chunk-R4VWYWRN.js → chunk-W3HFLORZ.js} +7 -2
  335. package/dist/cli-bundle/chunks/chunk-W3HFLORZ.js.map +7 -0
  336. package/dist/cli-bundle/chunks/{chunk-4FHLNNW7.js → chunk-WQRL4COW.js} +74 -14
  337. package/dist/cli-bundle/chunks/chunk-WQRL4COW.js.map +7 -0
  338. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js +32 -0
  339. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js.map +1 -0
  340. package/dist/cli-bundle/chunks/{chunk-MGAQ6KZG.js → chunk-XESAPVZ4.js} +166 -27
  341. package/dist/cli-bundle/chunks/chunk-XESAPVZ4.js.map +7 -0
  342. package/dist/cli-bundle/chunks/{chunk-PEH7SZD2.js → chunk-YLAW3FZN.js} +105 -31
  343. package/dist/cli-bundle/chunks/chunk-YLAW3FZN.js.map +7 -0
  344. package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js → claim-WGAWJCPY.js} +10 -10
  345. package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js → claim-ZI6P4LMU.js} +10 -10
  346. package/dist/cli-bundle/chunks/close-I7PRQ5G7.js +13 -0
  347. package/dist/cli-bundle/chunks/{close-SPUFW5QR.js → close-JMVVSIQE.js} +8 -8
  348. package/dist/cli-bundle/chunks/{close-many-GKAJX54X.js → close-many-IKPJXVOZ.js} +32 -20
  349. package/dist/cli-bundle/chunks/close-many-IKPJXVOZ.js.map +1 -0
  350. package/dist/cli-bundle/chunks/{close-many-GL6NRUU5.js → close-many-TXABDCSJ.js} +31 -19
  351. package/dist/cli-bundle/chunks/close-many-TXABDCSJ.js.map +7 -0
  352. package/dist/cli-bundle/chunks/{comments-5FPT6L7N.js → comments-RLWR2S7W.js} +55 -31
  353. package/dist/cli-bundle/chunks/comments-RLWR2S7W.js.map +1 -0
  354. package/dist/cli-bundle/chunks/{comments-TOLOYWNI.js → comments-YAMXKHUX.js} +54 -30
  355. package/dist/cli-bundle/chunks/comments-YAMXKHUX.js.map +7 -0
  356. package/dist/cli-bundle/chunks/{config-7N6D7YJE.js → config-7ICYC2WU.js} +83 -19
  357. package/dist/cli-bundle/chunks/config-7ICYC2WU.js.map +7 -0
  358. package/dist/cli-bundle/chunks/{config-4MN45TIH.js → config-NGWN3EXC.js} +83 -19
  359. package/dist/cli-bundle/chunks/config-NGWN3EXC.js.map +1 -0
  360. package/dist/cli-bundle/chunks/{context-AQSLE7DZ.js → context-K6QAHN5H.js} +128 -39
  361. package/dist/cli-bundle/chunks/context-K6QAHN5H.js.map +1 -0
  362. package/dist/cli-bundle/chunks/{context-U3PUJMVN.js → context-VGXOOAH2.js} +127 -38
  363. package/dist/cli-bundle/chunks/context-VGXOOAH2.js.map +7 -0
  364. package/dist/cli-bundle/chunks/{contracts-ITSJXO3O.js → contracts-KJGY2AQA.js} +99 -15
  365. package/dist/cli-bundle/chunks/contracts-KJGY2AQA.js.map +1 -0
  366. package/dist/cli-bundle/chunks/{contracts-H7KCQXLY.js → contracts-KMA6OJY7.js} +99 -15
  367. package/dist/cli-bundle/chunks/contracts-KMA6OJY7.js.map +7 -0
  368. package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js → copy-Q2PPU4AY.js} +7 -7
  369. package/dist/cli-bundle/chunks/{copy-C4W522JM.js → copy-SC6UF3PI.js} +7 -7
  370. package/dist/cli-bundle/chunks/{create-4EQNELMY.js → create-76FE7JVF.js} +16 -13
  371. package/dist/cli-bundle/chunks/create-RTRFW6RE.js +30 -0
  372. package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js → delete-T6DJSUJI.js} +7 -7
  373. package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js → delete-XFUX533E.js} +7 -7
  374. package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js → deps-5GWMMS6D.js} +9 -10
  375. package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js.map → deps-5GWMMS6D.js.map} +2 -2
  376. package/dist/cli-bundle/chunks/{deps-HV2C2L46.js → deps-MCCU633S.js} +10 -11
  377. package/dist/cli-bundle/chunks/deps-MCCU633S.js.map +1 -0
  378. package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js → docs-HE3HCQ4S.js} +9 -9
  379. package/dist/cli-bundle/chunks/{docs-RJQPLROO.js → docs-SXMOABHR.js} +9 -9
  380. package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js → extension-E23K4QRR.js} +7 -5
  381. package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js → extension-PMD3XMLN.js} +7 -5
  382. package/dist/cli-bundle/chunks/{files-OIFN3DQX.js → files-2RSWGPEU.js} +25 -11
  383. package/dist/cli-bundle/chunks/files-2RSWGPEU.js.map +1 -0
  384. package/dist/cli-bundle/chunks/{files-LIFDKNCN.js → files-ZWFJFWBK.js} +24 -10
  385. package/dist/cli-bundle/chunks/files-ZWFJFWBK.js.map +7 -0
  386. package/dist/cli-bundle/chunks/focus-KTTB3P3F.js +106 -0
  387. package/dist/cli-bundle/chunks/focus-KTTB3P3F.js.map +1 -0
  388. package/dist/cli-bundle/chunks/focus-ZMDP4FEL.js +109 -0
  389. package/dist/cli-bundle/chunks/focus-ZMDP4FEL.js.map +7 -0
  390. package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js → gc-BXIAKLAH.js} +3 -3
  391. package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js → gc-C7K6JNUO.js} +3 -3
  392. package/dist/cli-bundle/chunks/{get-SAB7CRBG.js → get-AZQLC4NO.js} +43 -16
  393. package/dist/cli-bundle/chunks/get-AZQLC4NO.js.map +1 -0
  394. package/dist/cli-bundle/chunks/{get-K7UULTQF.js → get-I65HTAWO.js} +42 -15
  395. package/dist/cli-bundle/chunks/get-I65HTAWO.js.map +7 -0
  396. package/dist/cli-bundle/chunks/{health-NUVZYIEV.js → health-3MFFPQVZ.js} +75 -49
  397. package/dist/cli-bundle/chunks/health-3MFFPQVZ.js.map +1 -0
  398. package/dist/cli-bundle/chunks/{health-VJWH3ZFK.js → health-MYZEOCLI.js} +74 -48
  399. package/dist/cli-bundle/chunks/health-MYZEOCLI.js.map +7 -0
  400. package/dist/cli-bundle/chunks/{history-GYFD2DJW.js → history-73Z6OBFZ.js} +10 -10
  401. package/dist/cli-bundle/chunks/history-BIPHVUMF.js +20 -0
  402. package/dist/cli-bundle/chunks/{history-compact-WQZQ6KXM.js → history-compact-24VQ63A3.js} +37 -46
  403. package/dist/cli-bundle/chunks/history-compact-24VQ63A3.js.map +7 -0
  404. package/dist/cli-bundle/chunks/{history-compact-SLL6ESXH.js → history-compact-UIAR2OI4.js} +38 -47
  405. package/dist/cli-bundle/chunks/history-compact-UIAR2OI4.js.map +1 -0
  406. package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js → history-redact-7YCXEWJD.js} +13 -11
  407. package/dist/cli-bundle/chunks/history-redact-WZZ6GZ2Z.js +21 -0
  408. package/dist/cli-bundle/chunks/{history-repair-BJCGM6Q3.js → history-repair-4NOFFG2W.js} +44 -49
  409. package/dist/cli-bundle/chunks/history-repair-4NOFFG2W.js.map +1 -0
  410. package/dist/cli-bundle/chunks/{history-repair-UCYS55ZX.js → history-repair-GQN2X4TR.js} +43 -48
  411. package/dist/cli-bundle/chunks/history-repair-GQN2X4TR.js.map +7 -0
  412. package/dist/cli-bundle/chunks/init-K34V4PZR.js +20 -0
  413. package/dist/cli-bundle/chunks/{init-MXV57LKL.js → init-TDEDNVMM.js} +12 -9
  414. package/dist/cli-bundle/chunks/{learnings-QKJOKEAO.js → learnings-TV2CTGJ3.js} +13 -12
  415. package/dist/cli-bundle/chunks/learnings-TV2CTGJ3.js.map +7 -0
  416. package/dist/cli-bundle/chunks/{learnings-L6KTZGOT.js → learnings-U67FTXPB.js} +14 -13
  417. package/dist/cli-bundle/chunks/learnings-U67FTXPB.js.map +1 -0
  418. package/dist/cli-bundle/chunks/list-MSHYOCFU.js +33 -0
  419. package/dist/cli-bundle/chunks/list-VV57WGUD.js +29 -0
  420. package/dist/cli-bundle/chunks/{notes-HMCB7TK6.js → notes-EUANWWKD.js} +13 -12
  421. package/dist/cli-bundle/chunks/notes-EUANWWKD.js.map +7 -0
  422. package/dist/cli-bundle/chunks/{notes-3NLK7WTZ.js → notes-GYVNDAL4.js} +14 -13
  423. package/dist/cli-bundle/chunks/notes-GYVNDAL4.js.map +1 -0
  424. package/dist/cli-bundle/chunks/{plan-NANUWH4T.js → plan-4LF4AV63.js} +15 -14
  425. package/dist/cli-bundle/chunks/plan-4LF4AV63.js.map +7 -0
  426. package/dist/cli-bundle/chunks/{plan-DWBYI5C6.js → plan-W27O6DBS.js} +16 -15
  427. package/dist/cli-bundle/chunks/plan-W27O6DBS.js.map +1 -0
  428. package/dist/cli-bundle/chunks/{register-list-query-SMMMLSWW.js → register-list-query-BXLEHJ7L.js} +32 -23
  429. package/dist/cli-bundle/chunks/register-list-query-BXLEHJ7L.js.map +1 -0
  430. package/dist/cli-bundle/chunks/{register-list-query-PWQ5F2VI.js → register-list-query-C2MS3BVQ.js} +31 -22
  431. package/dist/cli-bundle/chunks/register-list-query-C2MS3BVQ.js.map +7 -0
  432. package/dist/cli-bundle/chunks/{register-mutation-QKFPTIZG.js → register-mutation-6UCOEQ6L.js} +361 -106
  433. package/dist/cli-bundle/chunks/register-mutation-6UCOEQ6L.js.map +7 -0
  434. package/dist/cli-bundle/chunks/{register-mutation-ZYJQ4DVP.js → register-mutation-HE73PREP.js} +355 -107
  435. package/dist/cli-bundle/chunks/register-mutation-HE73PREP.js.map +1 -0
  436. package/dist/cli-bundle/chunks/{register-operations-2FMZ6WEF.js → register-operations-L6C32FDA.js} +111 -39
  437. package/dist/cli-bundle/chunks/register-operations-L6C32FDA.js.map +7 -0
  438. package/dist/cli-bundle/chunks/{register-operations-BAFQURZG.js → register-operations-QQEHEX4P.js} +112 -40
  439. package/dist/cli-bundle/chunks/register-operations-QQEHEX4P.js.map +1 -0
  440. package/dist/cli-bundle/chunks/{register-setup-QN2XV7UL.js → register-setup-A7N4PNT3.js} +18 -21
  441. package/dist/cli-bundle/chunks/register-setup-A7N4PNT3.js.map +1 -0
  442. package/dist/cli-bundle/chunks/{register-setup-DQEIKBIP.js → register-setup-WHG3NBP6.js} +17 -20
  443. package/dist/cli-bundle/chunks/register-setup-WHG3NBP6.js.map +7 -0
  444. package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js → restore-TSWSULYY.js} +13 -11
  445. package/dist/cli-bundle/chunks/restore-XQXICL3V.js +19 -0
  446. package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js +91 -0
  447. package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js.map +7 -0
  448. package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js +88 -0
  449. package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js.map +1 -0
  450. package/dist/cli-bundle/chunks/{schema-ZZ7ZDM2X.js → schema-7U7JUYGK.js} +797 -10
  451. package/dist/cli-bundle/chunks/schema-7U7JUYGK.js.map +1 -0
  452. package/dist/cli-bundle/chunks/{schema-RNVJ55V2.js → schema-TSBYSEMW.js} +810 -9
  453. package/dist/cli-bundle/chunks/schema-TSBYSEMW.js.map +7 -0
  454. package/dist/cli-bundle/chunks/{search-BJ457C2A.js → search-OXLSQKHP.js} +328 -71
  455. package/dist/cli-bundle/chunks/search-OXLSQKHP.js.map +7 -0
  456. package/dist/cli-bundle/chunks/{search-FQDZXX7P.js → search-T3TOFLOQ.js} +328 -71
  457. package/dist/cli-bundle/chunks/search-T3TOFLOQ.js.map +1 -0
  458. package/dist/cli-bundle/chunks/{stats-DUQWCVOS.js → stats-5CLG22YZ.js} +41 -16
  459. package/dist/cli-bundle/chunks/stats-5CLG22YZ.js.map +7 -0
  460. package/dist/cli-bundle/chunks/{stats-CUG3ZHOI.js → stats-XEMUXS42.js} +42 -17
  461. package/dist/cli-bundle/chunks/stats-XEMUXS42.js.map +1 -0
  462. package/dist/cli-bundle/chunks/{telemetry-RK2VX75A.js → telemetry-23OPBBZT.js} +7 -7
  463. package/dist/cli-bundle/chunks/telemetry-23OPBBZT.js.map +1 -0
  464. package/dist/cli-bundle/chunks/{telemetry-33MRGX4Z.js → telemetry-I3D7XZ55.js} +6 -6
  465. package/dist/cli-bundle/chunks/telemetry-I3D7XZ55.js.map +7 -0
  466. package/dist/cli-bundle/chunks/test-AROS3LIV.js +35 -0
  467. package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js → test-CECIMKOA.js} +17 -14
  468. package/dist/cli-bundle/chunks/{test-all-ARSMX33Q.js → test-all-4DEQPIXH.js} +25 -17
  469. package/dist/cli-bundle/chunks/test-all-4DEQPIXH.js.map +1 -0
  470. package/dist/cli-bundle/chunks/{test-all-ANYQ33O2.js → test-all-6RO6X3SM.js} +24 -16
  471. package/dist/cli-bundle/chunks/test-all-6RO6X3SM.js.map +7 -0
  472. package/dist/cli-bundle/chunks/{test-runs-5URSD34O.js → test-runs-AAXVFWKH.js} +62 -65
  473. package/dist/cli-bundle/chunks/test-runs-AAXVFWKH.js.map +1 -0
  474. package/dist/cli-bundle/chunks/{test-runs-XNACGSNQ.js → test-runs-LYBQSYRC.js} +61 -64
  475. package/dist/cli-bundle/chunks/test-runs-LYBQSYRC.js.map +7 -0
  476. package/dist/cli-bundle/chunks/update-MIWEJC76.js +24 -0
  477. package/dist/cli-bundle/chunks/update-P7I5YSRB.js +28 -0
  478. package/dist/cli-bundle/chunks/{update-many-724JCVDE.js → update-many-5B4HLVBK.js} +79 -33
  479. package/dist/cli-bundle/chunks/update-many-5B4HLVBK.js.map +7 -0
  480. package/dist/cli-bundle/chunks/{update-many-6B7PJ33I.js → update-many-G2QOVZSB.js} +80 -34
  481. package/dist/cli-bundle/chunks/update-many-G2QOVZSB.js.map +1 -0
  482. package/dist/cli-bundle/chunks/{upgrade-QHRGDBSA.js → upgrade-GFIDL62L.js} +23 -9
  483. package/dist/cli-bundle/chunks/upgrade-GFIDL62L.js.map +1 -0
  484. package/dist/cli-bundle/chunks/{upgrade-ALBEZAI7.js → upgrade-QUQYL7D3.js} +22 -8
  485. package/dist/cli-bundle/chunks/upgrade-QUQYL7D3.js.map +7 -0
  486. package/dist/cli-bundle/chunks/{validate-UY6DRCG5.js → validate-ADDZBMM3.js} +236 -30
  487. package/dist/cli-bundle/chunks/validate-ADDZBMM3.js.map +7 -0
  488. package/dist/cli-bundle/chunks/{validate-IQRYFXIV.js → validate-MAS3H6ZP.js} +222 -30
  489. package/dist/cli-bundle/chunks/validate-MAS3H6ZP.js.map +1 -0
  490. package/dist/cli-bundle/main.js +312 -139
  491. package/dist/cli-bundle/main.js.map +3 -3
  492. package/dist/cli.d.ts +10 -0
  493. package/dist/cli.js +21 -8
  494. package/dist/cli.js.map +1 -1
  495. package/dist/core/config/nested-settings.js +40 -2
  496. package/dist/core/config/nested-settings.js.map +1 -1
  497. package/dist/core/diagnostics/remediation.js +7 -2
  498. package/dist/core/diagnostics/remediation.js.map +1 -1
  499. package/dist/core/extensions/extension-policy.js +14 -15
  500. package/dist/core/extensions/extension-policy.js.map +1 -1
  501. package/dist/core/extensions/item-fields.js +4 -5
  502. package/dist/core/extensions/item-fields.js.map +1 -1
  503. package/dist/core/extensions/loader.d.ts +75 -1
  504. package/dist/core/extensions/loader.js +56 -32
  505. package/dist/core/extensions/loader.js.map +1 -1
  506. package/dist/core/governance/content-fields.d.ts +84 -0
  507. package/dist/core/governance/content-fields.js +182 -0
  508. package/dist/core/governance/content-fields.js.map +1 -0
  509. package/dist/core/governance/issue-codes.d.ts +51 -0
  510. package/dist/core/governance/issue-codes.js +95 -0
  511. package/dist/core/governance/issue-codes.js.map +1 -0
  512. package/dist/core/governance/metadata-coverage.d.ts +168 -0
  513. package/dist/core/governance/metadata-coverage.js +362 -0
  514. package/dist/core/governance/metadata-coverage.js.map +1 -0
  515. package/dist/core/history/history-rewrite.d.ts +22 -0
  516. package/dist/core/history/history-rewrite.js +38 -2
  517. package/dist/core/history/history-rewrite.js.map +1 -1
  518. package/dist/core/history/history.d.ts +7 -0
  519. package/dist/core/history/history.js +6 -2
  520. package/dist/core/history/history.js.map +1 -1
  521. package/dist/core/io/body-file.d.ts +14 -0
  522. package/dist/core/io/body-file.js +47 -0
  523. package/dist/core/io/body-file.js.map +1 -0
  524. package/dist/core/item/item-format.d.ts +46 -1
  525. package/dist/core/item/item-format.js +51 -60
  526. package/dist/core/item/item-format.js.map +1 -1
  527. package/dist/core/item/parse.d.ts +41 -0
  528. package/dist/core/item/parse.js +69 -16
  529. package/dist/core/item/parse.js.map +1 -1
  530. package/dist/core/item/type-registry.d.ts +1 -0
  531. package/dist/core/item/type-registry.js +8 -10
  532. package/dist/core/item/type-registry.js.map +1 -1
  533. package/dist/core/lock/lock.d.ts +26 -0
  534. package/dist/core/lock/lock.js +10 -2
  535. package/dist/core/lock/lock.js.map +1 -1
  536. package/dist/core/output/output.d.ts +7 -0
  537. package/dist/core/output/output.js +6 -2
  538. package/dist/core/output/output.js.map +1 -1
  539. package/dist/core/schema/fields-file.d.ts +94 -0
  540. package/dist/core/schema/fields-file.js +317 -0
  541. package/dist/core/schema/fields-file.js.map +1 -0
  542. package/dist/core/schema/item-types-file.d.ts +25 -2
  543. package/dist/core/schema/item-types-file.js +78 -6
  544. package/dist/core/schema/item-types-file.js.map +1 -1
  545. package/dist/core/schema/runtime-schema.d.ts +7 -0
  546. package/dist/core/schema/runtime-schema.js +23 -16
  547. package/dist/core/schema/runtime-schema.js.map +1 -1
  548. package/dist/core/schema/type-inference.d.ts +34 -0
  549. package/dist/core/schema/type-inference.js +97 -0
  550. package/dist/core/schema/type-inference.js.map +1 -0
  551. package/dist/core/schema/type-presets.d.ts +30 -0
  552. package/dist/core/schema/type-presets.js +96 -0
  553. package/dist/core/schema/type-presets.js.map +1 -0
  554. package/dist/core/search/cache.d.ts +19 -1
  555. package/dist/core/search/cache.js +11 -3
  556. package/dist/core/search/cache.js.map +1 -1
  557. package/dist/core/search/corpus.d.ts +36 -2
  558. package/dist/core/search/corpus.js +120 -24
  559. package/dist/core/search/corpus.js.map +1 -1
  560. package/dist/core/search/providers.d.ts +19 -0
  561. package/dist/core/search/providers.js +19 -2
  562. package/dist/core/search/providers.js.map +1 -1
  563. package/dist/core/sentry/instrument.d.ts +1 -0
  564. package/dist/core/sentry/instrument.js +6 -2
  565. package/dist/core/sentry/instrument.js.map +1 -1
  566. package/dist/core/session/session-state.d.ts +16 -0
  567. package/dist/core/session/session-state.js +48 -0
  568. package/dist/core/session/session-state.js.map +1 -0
  569. package/dist/core/shared/constants.d.ts +8 -0
  570. package/dist/core/shared/constants.js +11 -2
  571. package/dist/core/shared/constants.js.map +1 -1
  572. package/dist/core/shared/text-normalization.js +4 -3
  573. package/dist/core/shared/text-normalization.js.map +1 -1
  574. package/dist/core/shared/time.d.ts +13 -0
  575. package/dist/core/shared/time.js +19 -7
  576. package/dist/core/shared/time.js.map +1 -1
  577. package/dist/core/store/front-matter-cache.d.ts +13 -0
  578. package/dist/core/store/front-matter-cache.js +21 -11
  579. package/dist/core/store/front-matter-cache.js.map +1 -1
  580. package/dist/core/store/item-store.d.ts +11 -0
  581. package/dist/core/store/item-store.js +12 -3
  582. package/dist/core/store/item-store.js.map +1 -1
  583. package/dist/core/store/settings-validator.d.ts +2 -0
  584. package/dist/core/store/settings-validator.js +25 -2
  585. package/dist/core/store/settings-validator.js.map +1 -1
  586. package/dist/core/store/settings.d.ts +60 -1
  587. package/dist/core/store/settings.js +100 -46
  588. package/dist/core/store/settings.js.map +1 -1
  589. package/dist/core/telemetry/observability.js +10 -8
  590. package/dist/core/telemetry/observability.js.map +1 -1
  591. package/dist/core/telemetry/runtime.d.ts +272 -1
  592. package/dist/core/telemetry/runtime.js +358 -37
  593. package/dist/core/telemetry/runtime.js.map +1 -1
  594. package/dist/core/test/background-runs.d.ts +35 -0
  595. package/dist/core/test/background-runs.js +72 -61
  596. package/dist/core/test/background-runs.js.map +1 -1
  597. package/dist/core/test/run-selectors.js +5 -4
  598. package/dist/core/test/run-selectors.js.map +1 -1
  599. package/dist/core/validate/estimate-defaults.d.ts +39 -0
  600. package/dist/core/validate/estimate-defaults.js +117 -0
  601. package/dist/core/validate/estimate-defaults.js.map +1 -0
  602. package/dist/core/validate/fix-planning.d.ts +21 -3
  603. package/dist/core/validate/fix-planning.js +31 -4
  604. package/dist/core/validate/fix-planning.js.map +1 -1
  605. package/dist/core/validate/missing-link-owners.d.ts +64 -0
  606. package/dist/core/validate/missing-link-owners.js +98 -0
  607. package/dist/core/validate/missing-link-owners.js.map +1 -0
  608. package/dist/mcp/server.d.ts +61 -0
  609. package/dist/mcp/server.js +98 -8
  610. package/dist/mcp/server.js.map +1 -1
  611. package/dist/mcp/tool-definitions.js +64 -10
  612. package/dist/mcp/tool-definitions.js.map +1 -1
  613. package/dist/sdk/cli-contracts/commander-types.js +13 -2
  614. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  615. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  616. package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
  617. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  618. package/dist/sdk/cli-contracts/tool-option-contracts.js +110 -2
  619. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  620. package/dist/sdk/cli-contracts/tool-parameter-tables.js +127 -11
  621. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  622. package/dist/sdk/cli-contracts.d.ts +31 -0
  623. package/dist/sdk/cli-contracts.js +238 -12
  624. package/dist/sdk/cli-contracts.js.map +1 -1
  625. package/dist/types.d.ts +17 -1
  626. package/dist/types.js +3 -3
  627. package/dist/types.js.map +1 -1
  628. package/docs/AGENT_GUIDE.md +15 -3
  629. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  630. package/docs/COMMANDS.md +171 -10
  631. package/docs/CONFIGURATION.md +135 -0
  632. package/docs/TESTING.md +6 -4
  633. package/package.json +6 -4
  634. package/packages/pm-calendar/extensions/calendar/runtime.js +6 -0
  635. package/packages/pm-calendar/extensions/calendar/runtime.ts +12 -0
  636. package/packages/pm-todos/extensions/todos/runtime.ts +5 -0
  637. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  638. package/plugins/pm-claude/README.md +3 -3
  639. package/plugins/pm-claude/commands/pm-init.md +1 -1
  640. package/plugins/pm-codex/README.md +1 -1
  641. package/scripts/bundle-cli.mjs +46 -37
  642. package/scripts/finalize-build.mjs +20 -9
  643. package/scripts/prepare-build-cache.mjs +27 -16
  644. package/dist/cli-bundle/chunks/activity-XIOTGZMU.js +0 -16
  645. package/dist/cli-bundle/chunks/aggregate-IRHJWEKG.js.map +0 -1
  646. package/dist/cli-bundle/chunks/aggregate-XEBW22UQ.js.map +0 -7
  647. package/dist/cli-bundle/chunks/append-NL67JNJU.js.map +0 -1
  648. package/dist/cli-bundle/chunks/chunk-2ANTZBYF.js.map +0 -1
  649. package/dist/cli-bundle/chunks/chunk-2J2AH4V5.js.map +0 -1
  650. package/dist/cli-bundle/chunks/chunk-32XSW44C.js.map +0 -1
  651. package/dist/cli-bundle/chunks/chunk-36BCSMKP.js.map +0 -7
  652. package/dist/cli-bundle/chunks/chunk-3VULHQNS.js.map +0 -1
  653. package/dist/cli-bundle/chunks/chunk-4FHLNNW7.js.map +0 -7
  654. package/dist/cli-bundle/chunks/chunk-4JHJ7YG2.js.map +0 -7
  655. package/dist/cli-bundle/chunks/chunk-4TPFXE2R.js.map +0 -1
  656. package/dist/cli-bundle/chunks/chunk-4ZKKZMLH.js.map +0 -1
  657. package/dist/cli-bundle/chunks/chunk-5HSAHRYA.js.map +0 -7
  658. package/dist/cli-bundle/chunks/chunk-6TBR5AZ2.js.map +0 -7
  659. package/dist/cli-bundle/chunks/chunk-7CRFV6JR.js.map +0 -7
  660. package/dist/cli-bundle/chunks/chunk-7SM7VA5I.js.map +0 -7
  661. package/dist/cli-bundle/chunks/chunk-AAUYXSFF.js.map +0 -7
  662. package/dist/cli-bundle/chunks/chunk-AGG32LKL.js.map +0 -1
  663. package/dist/cli-bundle/chunks/chunk-AUDDXKNX.js.map +0 -1
  664. package/dist/cli-bundle/chunks/chunk-BVL5KGVA.js.map +0 -1
  665. package/dist/cli-bundle/chunks/chunk-C24PWDFG.js +0 -138
  666. package/dist/cli-bundle/chunks/chunk-C24PWDFG.js.map +0 -7
  667. package/dist/cli-bundle/chunks/chunk-HLEGAQXT.js.map +0 -7
  668. package/dist/cli-bundle/chunks/chunk-HZOX5BYD.js.map +0 -7
  669. package/dist/cli-bundle/chunks/chunk-IXVSSHGV.js.map +0 -7
  670. package/dist/cli-bundle/chunks/chunk-IZHCCG4S.js.map +0 -1
  671. package/dist/cli-bundle/chunks/chunk-JW7D6437.js.map +0 -1
  672. package/dist/cli-bundle/chunks/chunk-JWXTOYBI.js.map +0 -7
  673. package/dist/cli-bundle/chunks/chunk-KHGTYCJ6.js.map +0 -1
  674. package/dist/cli-bundle/chunks/chunk-L6YQONLM.js.map +0 -1
  675. package/dist/cli-bundle/chunks/chunk-LFW5NQUP.js.map +0 -7
  676. package/dist/cli-bundle/chunks/chunk-LYNQ3NGI.js.map +0 -1
  677. package/dist/cli-bundle/chunks/chunk-M3SI2REU.js.map +0 -7
  678. package/dist/cli-bundle/chunks/chunk-MACCNKSZ.js.map +0 -7
  679. package/dist/cli-bundle/chunks/chunk-MGAQ6KZG.js.map +0 -7
  680. package/dist/cli-bundle/chunks/chunk-PEH7SZD2.js.map +0 -7
  681. package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +0 -1
  682. package/dist/cli-bundle/chunks/chunk-QQG4HEX7.js.map +0 -1
  683. package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +0 -7
  684. package/dist/cli-bundle/chunks/chunk-RFR2YQGO.js.map +0 -1
  685. package/dist/cli-bundle/chunks/chunk-RHYBR6G7.js.map +0 -1
  686. package/dist/cli-bundle/chunks/chunk-S2CDTRJ6.js.map +0 -1
  687. package/dist/cli-bundle/chunks/chunk-SGMGMCIF.js.map +0 -1
  688. package/dist/cli-bundle/chunks/chunk-SOHXUA2Q.js.map +0 -1
  689. package/dist/cli-bundle/chunks/chunk-SQDKAEKG.js.map +0 -7
  690. package/dist/cli-bundle/chunks/chunk-TOX7YQ7X.js.map +0 -1
  691. package/dist/cli-bundle/chunks/chunk-TSXWFN3L.js.map +0 -1
  692. package/dist/cli-bundle/chunks/chunk-UCVJP4JL.js.map +0 -7
  693. package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js +0 -128
  694. package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js.map +0 -1
  695. package/dist/cli-bundle/chunks/chunk-VNC2HBL4.js.map +0 -1
  696. package/dist/cli-bundle/chunks/chunk-W6KNFAMZ.js.map +0 -7
  697. package/dist/cli-bundle/chunks/chunk-WLH7X4RN.js.map +0 -7
  698. package/dist/cli-bundle/chunks/chunk-XXLMJDUB.js.map +0 -7
  699. package/dist/cli-bundle/chunks/close-WOG5WTMZ.js +0 -13
  700. package/dist/cli-bundle/chunks/close-many-GKAJX54X.js.map +0 -1
  701. package/dist/cli-bundle/chunks/close-many-GL6NRUU5.js.map +0 -7
  702. package/dist/cli-bundle/chunks/comments-5FPT6L7N.js.map +0 -1
  703. package/dist/cli-bundle/chunks/comments-TOLOYWNI.js.map +0 -7
  704. package/dist/cli-bundle/chunks/config-4MN45TIH.js.map +0 -1
  705. package/dist/cli-bundle/chunks/config-7N6D7YJE.js.map +0 -7
  706. package/dist/cli-bundle/chunks/context-AQSLE7DZ.js.map +0 -1
  707. package/dist/cli-bundle/chunks/context-U3PUJMVN.js.map +0 -7
  708. package/dist/cli-bundle/chunks/contracts-H7KCQXLY.js.map +0 -7
  709. package/dist/cli-bundle/chunks/contracts-ITSJXO3O.js.map +0 -1
  710. package/dist/cli-bundle/chunks/create-NW3K7LVG.js +0 -27
  711. package/dist/cli-bundle/chunks/deps-HV2C2L46.js.map +0 -1
  712. package/dist/cli-bundle/chunks/files-LIFDKNCN.js.map +0 -7
  713. package/dist/cli-bundle/chunks/files-OIFN3DQX.js.map +0 -1
  714. package/dist/cli-bundle/chunks/get-K7UULTQF.js.map +0 -7
  715. package/dist/cli-bundle/chunks/get-SAB7CRBG.js.map +0 -1
  716. package/dist/cli-bundle/chunks/health-NUVZYIEV.js.map +0 -1
  717. package/dist/cli-bundle/chunks/health-VJWH3ZFK.js.map +0 -7
  718. package/dist/cli-bundle/chunks/history-IUVN4NTN.js +0 -20
  719. package/dist/cli-bundle/chunks/history-compact-SLL6ESXH.js.map +0 -1
  720. package/dist/cli-bundle/chunks/history-compact-WQZQ6KXM.js.map +0 -7
  721. package/dist/cli-bundle/chunks/history-redact-75KIIJUJ.js +0 -19
  722. package/dist/cli-bundle/chunks/history-repair-BJCGM6Q3.js.map +0 -1
  723. package/dist/cli-bundle/chunks/history-repair-UCYS55ZX.js.map +0 -7
  724. package/dist/cli-bundle/chunks/init-JJFYRUKG.js +0 -17
  725. package/dist/cli-bundle/chunks/learnings-L6KTZGOT.js.map +0 -1
  726. package/dist/cli-bundle/chunks/learnings-QKJOKEAO.js.map +0 -7
  727. package/dist/cli-bundle/chunks/list-GGVPXEV6.js +0 -23
  728. package/dist/cli-bundle/chunks/list-VOQDQHA4.js +0 -19
  729. package/dist/cli-bundle/chunks/notes-3NLK7WTZ.js.map +0 -1
  730. package/dist/cli-bundle/chunks/notes-HMCB7TK6.js.map +0 -7
  731. package/dist/cli-bundle/chunks/plan-DWBYI5C6.js.map +0 -1
  732. package/dist/cli-bundle/chunks/plan-NANUWH4T.js.map +0 -7
  733. package/dist/cli-bundle/chunks/register-list-query-PWQ5F2VI.js.map +0 -7
  734. package/dist/cli-bundle/chunks/register-list-query-SMMMLSWW.js.map +0 -1
  735. package/dist/cli-bundle/chunks/register-mutation-QKFPTIZG.js.map +0 -7
  736. package/dist/cli-bundle/chunks/register-mutation-ZYJQ4DVP.js.map +0 -1
  737. package/dist/cli-bundle/chunks/register-operations-2FMZ6WEF.js.map +0 -7
  738. package/dist/cli-bundle/chunks/register-operations-BAFQURZG.js.map +0 -1
  739. package/dist/cli-bundle/chunks/register-setup-DQEIKBIP.js.map +0 -7
  740. package/dist/cli-bundle/chunks/register-setup-QN2XV7UL.js.map +0 -1
  741. package/dist/cli-bundle/chunks/restore-DRBNXJJH.js +0 -17
  742. package/dist/cli-bundle/chunks/schema-RNVJ55V2.js.map +0 -7
  743. package/dist/cli-bundle/chunks/schema-ZZ7ZDM2X.js.map +0 -1
  744. package/dist/cli-bundle/chunks/search-BJ457C2A.js.map +0 -7
  745. package/dist/cli-bundle/chunks/search-FQDZXX7P.js.map +0 -1
  746. package/dist/cli-bundle/chunks/stats-CUG3ZHOI.js.map +0 -1
  747. package/dist/cli-bundle/chunks/stats-DUQWCVOS.js.map +0 -7
  748. package/dist/cli-bundle/chunks/telemetry-33MRGX4Z.js.map +0 -7
  749. package/dist/cli-bundle/chunks/telemetry-RK2VX75A.js.map +0 -1
  750. package/dist/cli-bundle/chunks/test-SDMYEQHH.js +0 -32
  751. package/dist/cli-bundle/chunks/test-all-ANYQ33O2.js.map +0 -7
  752. package/dist/cli-bundle/chunks/test-all-ARSMX33Q.js.map +0 -1
  753. package/dist/cli-bundle/chunks/test-runs-5URSD34O.js.map +0 -1
  754. package/dist/cli-bundle/chunks/test-runs-XNACGSNQ.js.map +0 -7
  755. package/dist/cli-bundle/chunks/update-PD46VOXI.js +0 -21
  756. package/dist/cli-bundle/chunks/update-U235A7WP.js +0 -25
  757. package/dist/cli-bundle/chunks/update-many-6B7PJ33I.js.map +0 -1
  758. package/dist/cli-bundle/chunks/update-many-724JCVDE.js.map +0 -7
  759. package/dist/cli-bundle/chunks/upgrade-ALBEZAI7.js.map +0 -7
  760. package/dist/cli-bundle/chunks/upgrade-QHRGDBSA.js.map +0 -1
  761. package/dist/cli-bundle/chunks/validate-IQRYFXIV.js.map +0 -1
  762. package/dist/cli-bundle/chunks/validate-UY6DRCG5.js.map +0 -7
  763. /package/dist/cli-bundle/chunks/{activity-XIOTGZMU.js.map → activity-PZYSZA26.js.map} +0 -0
  764. /package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js.map → activity-SFM4THAU.js.map} +0 -0
  765. /package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js.map → chunk-26BM6YLO.js.map} +0 -0
  766. /package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js.map → chunk-2TMKMTEI.js.map} +0 -0
  767. /package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js.map → chunk-2VH7DFSJ.js.map} +0 -0
  768. /package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js.map → chunk-5XGWFUW2.js.map} +0 -0
  769. /package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js.map → chunk-AJCQ5GT6.js.map} +0 -0
  770. /package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js.map → chunk-BITCVGHT.js.map} +0 -0
  771. /package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js.map → chunk-CGQTFWYI.js.map} +0 -0
  772. /package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js.map → chunk-COVLE33A.js.map} +0 -0
  773. /package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js.map → chunk-F5MSD5HE.js.map} +0 -0
  774. /package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js.map → chunk-JZHL4E3Q.js.map} +0 -0
  775. /package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js.map → chunk-KCAGIH6K.js.map} +0 -0
  776. /package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js.map → chunk-MIBX6ZRN.js.map} +0 -0
  777. /package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js.map → chunk-UN6P3IJ4.js.map} +0 -0
  778. /package/dist/cli-bundle/chunks/{chunk-HWHONML5.js.map → chunk-VF3KQGNY.js.map} +0 -0
  779. /package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js.map → claim-WGAWJCPY.js.map} +0 -0
  780. /package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js.map → claim-ZI6P4LMU.js.map} +0 -0
  781. /package/dist/cli-bundle/chunks/{close-WOG5WTMZ.js.map → close-I7PRQ5G7.js.map} +0 -0
  782. /package/dist/cli-bundle/chunks/{close-SPUFW5QR.js.map → close-JMVVSIQE.js.map} +0 -0
  783. /package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js.map → copy-Q2PPU4AY.js.map} +0 -0
  784. /package/dist/cli-bundle/chunks/{copy-C4W522JM.js.map → copy-SC6UF3PI.js.map} +0 -0
  785. /package/dist/cli-bundle/chunks/{create-4EQNELMY.js.map → create-76FE7JVF.js.map} +0 -0
  786. /package/dist/cli-bundle/chunks/{create-NW3K7LVG.js.map → create-RTRFW6RE.js.map} +0 -0
  787. /package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js.map → delete-T6DJSUJI.js.map} +0 -0
  788. /package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js.map → delete-XFUX533E.js.map} +0 -0
  789. /package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js.map → docs-HE3HCQ4S.js.map} +0 -0
  790. /package/dist/cli-bundle/chunks/{docs-RJQPLROO.js.map → docs-SXMOABHR.js.map} +0 -0
  791. /package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js.map → extension-E23K4QRR.js.map} +0 -0
  792. /package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js.map → extension-PMD3XMLN.js.map} +0 -0
  793. /package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js.map → gc-BXIAKLAH.js.map} +0 -0
  794. /package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js.map → gc-C7K6JNUO.js.map} +0 -0
  795. /package/dist/cli-bundle/chunks/{history-GYFD2DJW.js.map → history-73Z6OBFZ.js.map} +0 -0
  796. /package/dist/cli-bundle/chunks/{history-IUVN4NTN.js.map → history-BIPHVUMF.js.map} +0 -0
  797. /package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js.map → history-redact-7YCXEWJD.js.map} +0 -0
  798. /package/dist/cli-bundle/chunks/{history-redact-75KIIJUJ.js.map → history-redact-WZZ6GZ2Z.js.map} +0 -0
  799. /package/dist/cli-bundle/chunks/{init-JJFYRUKG.js.map → init-K34V4PZR.js.map} +0 -0
  800. /package/dist/cli-bundle/chunks/{init-MXV57LKL.js.map → init-TDEDNVMM.js.map} +0 -0
  801. /package/dist/cli-bundle/chunks/{list-GGVPXEV6.js.map → list-MSHYOCFU.js.map} +0 -0
  802. /package/dist/cli-bundle/chunks/{list-VOQDQHA4.js.map → list-VV57WGUD.js.map} +0 -0
  803. /package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js.map → restore-TSWSULYY.js.map} +0 -0
  804. /package/dist/cli-bundle/chunks/{restore-DRBNXJJH.js.map → restore-XQXICL3V.js.map} +0 -0
  805. /package/dist/cli-bundle/chunks/{test-SDMYEQHH.js.map → test-AROS3LIV.js.map} +0 -0
  806. /package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js.map → test-CECIMKOA.js.map} +0 -0
  807. /package/dist/cli-bundle/chunks/{update-PD46VOXI.js.map → update-MIWEJC76.js.map} +0 -0
  808. /package/dist/cli-bundle/chunks/{update-U235A7WP.js.map → update-P7I5YSRB.js.map} +0 -0
@@ -0,0 +1,86 @@
1
+ import {
2
+ normalizeAddTypeInput
3
+ } from "./chunk-5FDYWOJT.js";
4
+
5
+ // dist/core/schema/type-presets.js
6
+ !(function() {
7
+ try {
8
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
9
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "435e9450-a234-54ff-b34e-a992acb16c4e");
10
+ } catch (e2) {
11
+ }
12
+ })();
13
+ var TYPE_PRESET_NAMES = ["agile", "ops", "research"];
14
+ var TYPE_PRESET_DEFINITIONS = {
15
+ agile: [
16
+ {
17
+ name: "Story",
18
+ description: "User-facing outcome or capability slice expressed from a stakeholder perspective.",
19
+ defaultStatus: "open",
20
+ folder: "stories",
21
+ aliases: ["user-story"]
22
+ },
23
+ {
24
+ name: "Spike",
25
+ description: "Time-boxed investigation used to reduce uncertainty before implementation.",
26
+ defaultStatus: "open",
27
+ folder: "spikes",
28
+ aliases: ["research-spike"]
29
+ }
30
+ ],
31
+ ops: [
32
+ {
33
+ name: "Incident",
34
+ description: "Operational disruption, degradation, or support escalation with recovery tracking.",
35
+ defaultStatus: "open",
36
+ folder: "incidents",
37
+ aliases: ["outage"]
38
+ },
39
+ {
40
+ name: "Runbook",
41
+ description: "Repeatable operational procedure, diagnostic path, or response playbook.",
42
+ defaultStatus: "open",
43
+ folder: "runbooks",
44
+ aliases: ["playbook"]
45
+ }
46
+ ],
47
+ research: [
48
+ {
49
+ name: "Experiment",
50
+ description: "Validated-learning activity with hypothesis, method, and outcome tracking.",
51
+ defaultStatus: "open",
52
+ folder: "experiments",
53
+ aliases: ["study"]
54
+ },
55
+ {
56
+ name: "Hypothesis",
57
+ description: "Testable claim or assumption that should be supported, rejected, or refined.",
58
+ defaultStatus: "open",
59
+ folder: "hypotheses",
60
+ aliases: ["assumption"]
61
+ }
62
+ ]
63
+ };
64
+ function normalizeTypePresetName(rawValue) {
65
+ if (rawValue === void 0) {
66
+ return void 0;
67
+ }
68
+ const normalized = rawValue.trim().toLowerCase().replaceAll("-", "_");
69
+ if (normalized.length === 0) {
70
+ throw new Error("Type preset name must not be empty.");
71
+ }
72
+ if (normalized === "agile" || normalized === "ops" || normalized === "research") {
73
+ return normalized;
74
+ }
75
+ throw new Error(`Invalid type preset "${rawValue}". Allowed: ${TYPE_PRESET_NAMES.join(", ")}.`);
76
+ }
77
+ function resolveTypePresetDefinitions(preset) {
78
+ return TYPE_PRESET_DEFINITIONS[preset].map((rawDefinition) => normalizeAddTypeInput(rawDefinition));
79
+ }
80
+
81
+ export {
82
+ TYPE_PRESET_NAMES,
83
+ normalizeTypePresetName,
84
+ resolveTypePresetDefinitions
85
+ };
86
+ //# sourceMappingURL=chunk-TEFEXQWI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../core/schema/type-presets.ts"],
4
+ "sourcesContent": ["import { normalizeAddTypeInput, type NormalizedAddTypeInput, type RawAddTypeInput } from \"./item-types-file.js\";\n\n/**\n * Shared domain item-type presets. These power both `pm init --type-preset`\n * (registered during initialization) and the standalone `pm schema apply-preset`\n * subcommand (adopting a preset into an already-initialized project). Keeping the\n * raw definitions and the preset-name normalizer in one place guarantees init and\n * schema register byte-identical types.\n */\n\nexport const TYPE_PRESET_NAMES = [\"agile\", \"ops\", \"research\"] as const;\nexport type TypePresetName = (typeof TYPE_PRESET_NAMES)[number];\n\n/**\n * Raw (pre-normalization) preset definitions keyed by preset name. Each entry is\n * fed through {@link normalizeAddTypeInput} before being upserted so the same\n * validation/normalization the `pm schema add-type` CLI applies governs preset\n * registration too.\n */\nexport const TYPE_PRESET_DEFINITIONS: Record<TypePresetName, RawAddTypeInput[]> = {\n agile: [\n {\n name: \"Story\",\n description: \"User-facing outcome or capability slice expressed from a stakeholder perspective.\",\n defaultStatus: \"open\",\n folder: \"stories\",\n aliases: [\"user-story\"],\n },\n {\n name: \"Spike\",\n description: \"Time-boxed investigation used to reduce uncertainty before implementation.\",\n defaultStatus: \"open\",\n folder: \"spikes\",\n aliases: [\"research-spike\"],\n },\n ],\n ops: [\n {\n name: \"Incident\",\n description: \"Operational disruption, degradation, or support escalation with recovery tracking.\",\n defaultStatus: \"open\",\n folder: \"incidents\",\n aliases: [\"outage\"],\n },\n {\n name: \"Runbook\",\n description: \"Repeatable operational procedure, diagnostic path, or response playbook.\",\n defaultStatus: \"open\",\n folder: \"runbooks\",\n aliases: [\"playbook\"],\n },\n ],\n research: [\n {\n name: \"Experiment\",\n description: \"Validated-learning activity with hypothesis, method, and outcome tracking.\",\n defaultStatus: \"open\",\n folder: \"experiments\",\n aliases: [\"study\"],\n },\n {\n name: \"Hypothesis\",\n description: \"Testable claim or assumption that should be supported, rejected, or refined.\",\n defaultStatus: \"open\",\n folder: \"hypotheses\",\n aliases: [\"assumption\"],\n },\n ],\n};\n\n/**\n * Validates and normalizes a raw preset-name CLI value. Returns `undefined` when\n * the value is omitted (no preset requested). Throws a plain Error with a stable\n * message for an empty or unknown preset; CLI layers map it to a USAGE exit code.\n * Accepts hyphen/underscore-insensitive casing for ergonomics.\n */\nexport function normalizeTypePresetName(rawValue: string | undefined): TypePresetName | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n const normalized = rawValue.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n throw new Error(\"Type preset name must not be empty.\");\n }\n if (normalized === \"agile\" || normalized === \"ops\" || normalized === \"research\") {\n return normalized;\n }\n throw new Error(`Invalid type preset \"${rawValue}\". Allowed: ${TYPE_PRESET_NAMES.join(\", \")}.`);\n}\n\n/**\n * Returns the normalized add-type inputs for a preset, in the order they should\n * be upserted. Each raw definition is run through normalizeAddTypeInput so callers\n * get the same validated shape as an individual `add-type` invocation.\n */\nexport function resolveTypePresetDefinitions(preset: TypePresetName): NormalizedAddTypeInput[] {\n return TYPE_PRESET_DEFINITIONS[preset].map((rawDefinition) => normalizeAddTypeInput(rawDefinition));\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;AAUO,IAAM,oBAAoB,CAAC,SAAS,OAAO,UAAU;AASrD,IAAM,0BAAqE;EAChF,OAAO;IACL;MACE,MAAM;MACN,aAAa;MACb,eAAe;MACf,QAAQ;MACR,SAAS,CAAC,YAAY;;IAExB;MACE,MAAM;MACN,aAAa;MACb,eAAe;MACf,QAAQ;MACR,SAAS,CAAC,gBAAgB;;;EAG9B,KAAK;IACH;MACE,MAAM;MACN,aAAa;MACb,eAAe;MACf,QAAQ;MACR,SAAS,CAAC,QAAQ;;IAEpB;MACE,MAAM;MACN,aAAa;MACb,eAAe;MACf,QAAQ;MACR,SAAS,CAAC,UAAU;;;EAGxB,UAAU;IACR;MACE,MAAM;MACN,aAAa;MACb,eAAe;MACf,QAAQ;MACR,SAAS,CAAC,OAAO;;IAEnB;MACE,MAAM;MACN,aAAa;MACb,eAAe;MACf,QAAQ;MACR,SAAS,CAAC,YAAY;;;;AAWtB,SAAU,wBAAwB,UAA4B;AAClE,MAAI,aAAa,QAAW;AAC1B,WAAO;EACT;AACA,QAAM,aAAa,SAAS,KAAI,EAAG,YAAW,EAAG,WAAW,KAAK,GAAG;AACpE,MAAI,WAAW,WAAW,GAAG;AAC3B,UAAM,IAAI,MAAM,qCAAqC;EACvD;AACA,MAAI,eAAe,WAAW,eAAe,SAAS,eAAe,YAAY;AAC/E,WAAO;EACT;AACA,QAAM,IAAI,MAAM,wBAAwB,QAAQ,eAAe,kBAAkB,KAAK,IAAI,CAAC,GAAG;AAChG;AAOM,SAAU,6BAA6B,QAAsB;AACjE,SAAO,wBAAwB,MAAM,EAAE,IAAI,CAAC,kBAAkB,sBAAsB,aAAa,CAAC;AACpG;",
6
+ "names": []
7
+ }
@@ -2,18 +2,20 @@ import {
2
2
  resolveAuthor
3
3
  } from "./chunk-O7IWB35H.js";
4
4
  import {
5
+ assertNoUnknownCsvKeys,
5
6
  createStdinTokenResolver,
7
+ looksLikeGenericKeyValueEntry,
6
8
  parseCsvKv
7
- } from "./chunk-HZOX5BYD.js";
9
+ } from "./chunk-OGXEBTX3.js";
8
10
  import {
9
11
  listAllFrontMatter,
10
12
  locateItem,
11
13
  mutateItem,
12
14
  readLocatedItem
13
- } from "./chunk-XXLMJDUB.js";
15
+ } from "./chunk-KA22USXD.js";
14
16
  import {
15
17
  resolveItemTypeRegistry
16
- } from "./chunk-W6KNFAMZ.js";
18
+ } from "./chunk-QXMXRPX5.js";
17
19
  import {
18
20
  EXIT_CODE,
19
21
  PmCliError,
@@ -23,7 +25,7 @@ import {
23
25
  pathExists,
24
26
  readSettings,
25
27
  resolvePmRoot
26
- } from "./chunk-LFW5NQUP.js";
28
+ } from "./chunk-CHM2VFVL.js";
27
29
 
28
30
  // dist/cli/commands/linked-artifacts.js
29
31
  import fs from "node:fs/promises";
@@ -32,10 +34,14 @@ import fg from "fast-glob";
32
34
  !(function() {
33
35
  try {
34
36
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
35
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5daf731a-1742-5bff-81a8-b1868a81a9f4");
37
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "663c39f9-cf06-520c-b0a2-52aaa4bfbf8f");
36
38
  } catch (e2) {
37
39
  }
38
40
  })();
41
+ var LINKED_ARTIFACT_ADD_KEYS = ["path", "scope", "note"];
42
+ var LINKED_ARTIFACT_ADD_GLOB_KEYS = ["pattern", "glob", "path", "scope", "note"];
43
+ var LINKED_ARTIFACT_REMOVE_KEYS = ["path"];
44
+ var LINKED_ARTIFACT_MIGRATE_KEYS = ["from", "to"];
39
45
  function ensureScope(raw) {
40
46
  const value = raw ?? "project";
41
47
  if (!SCOPE_VALUES.includes(value)) {
@@ -47,7 +53,10 @@ function looksLikeStructuredPathEntry(raw) {
47
53
  if (raw.startsWith("```") || raw.includes("\n")) {
48
54
  return true;
49
55
  }
50
- return /^(?:[-*+]\s+)?(?:path|scope|note)\s*[:=]/i.test(raw);
56
+ if (/^(?:[-*+]\s+)?(?:path|scope|note)\s*[:=]/i.test(raw)) {
57
+ return true;
58
+ }
59
+ return looksLikeGenericKeyValueEntry(raw);
51
60
  }
52
61
  function parseAddEntries(raw, bareNoun) {
53
62
  if (!raw)
@@ -55,6 +64,7 @@ function parseAddEntries(raw, bareNoun) {
55
64
  return raw.map((entry) => {
56
65
  const trimmed = entry.trim();
57
66
  const kv = looksLikeStructuredPathEntry(trimmed) ? parseCsvKv(entry, "--add") : { path: trimmed };
67
+ assertNoUnknownCsvKeys(kv, "--add", LINKED_ARTIFACT_ADD_KEYS);
58
68
  if (!kv.path) {
59
69
  throw new PmCliError(`--add requires path=<value> or a bare ${bareNoun} path`, EXIT_CODE.USAGE);
60
70
  }
@@ -75,6 +85,7 @@ function parseAddGlobEntries(raw) {
75
85
  }
76
86
  if (trimmed.includes("=") || /^(?:[-*+]\s+)?(?:pattern|glob|path)\s*[:=]/i.test(trimmed) || trimmed.startsWith("```")) {
77
87
  const kv = parseCsvKv(trimmed, "--add-glob");
88
+ assertNoUnknownCsvKeys(kv, "--add-glob", LINKED_ARTIFACT_ADD_GLOB_KEYS);
78
89
  const pattern = kv.pattern?.trim() || kv.glob?.trim() || kv.path?.trim();
79
90
  if (!pattern) {
80
91
  throw new PmCliError("--add-glob key/value form requires pattern=<glob>", EXIT_CODE.USAGE);
@@ -101,6 +112,7 @@ function parseRemoveEntries(raw) {
101
112
  }
102
113
  if (trimmed.includes("=") || /^(?:[-*+]\s+)?path\s*[:=]/i.test(trimmed) || trimmed.startsWith("```")) {
103
114
  const kv = parseCsvKv(trimmed, "--remove");
115
+ assertNoUnknownCsvKeys(kv, "--remove", LINKED_ARTIFACT_REMOVE_KEYS);
104
116
  if (!kv.path) {
105
117
  throw new PmCliError("--remove key/value form requires path=<value>", EXIT_CODE.USAGE);
106
118
  }
@@ -114,6 +126,7 @@ function parseMigrateEntries(raw) {
114
126
  return [];
115
127
  return raw.map((entry) => {
116
128
  const kv = parseCsvKv(entry, "--migrate");
129
+ assertNoUnknownCsvKeys(kv, "--migrate", LINKED_ARTIFACT_MIGRATE_KEYS);
117
130
  const from = kv.from?.trim();
118
131
  const to = kv.to?.trim();
119
132
  if (!from || !to) {
@@ -359,4 +372,4 @@ export {
359
372
  runLinkedArtifacts,
360
373
  renameArtifactsResultKey
361
374
  };
362
- //# sourceMappingURL=chunk-HLEGAQXT.js.map
375
+ //# sourceMappingURL=chunk-TWBDDVIF.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../cli/commands/linked-artifacts.ts"],
4
+ "sourcesContent": ["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport fg from \"fast-glob\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport {\n assertNoUnknownCsvKeys,\n createStdinTokenResolver,\n looksLikeGenericKeyValueEntry,\n parseCsvKv,\n} from \"../../core/item/parse.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { listAllFrontMatter, locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { SCOPE_VALUES } from \"../../types/index.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { LinkScope } from \"../../types/index.js\";\n\nexport type LinkedArtifact = {\n path: string;\n scope: LinkScope;\n note?: string;\n};\n\n/** Allowed CSV/markdown keys for each structured linked-artifact option (GH-258). */\nexport const LINKED_ARTIFACT_ADD_KEYS = [\"path\", \"scope\", \"note\"] as const;\nexport const LINKED_ARTIFACT_ADD_GLOB_KEYS = [\"pattern\", \"glob\", \"path\", \"scope\", \"note\"] as const;\nexport const LINKED_ARTIFACT_REMOVE_KEYS = [\"path\"] as const;\nexport const LINKED_ARTIFACT_MIGRATE_KEYS = [\"from\", \"to\"] as const;\n\nexport interface LinkedArtifactCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /**\n * GH-170 (pm-pfnx): standalone note applied to every link added by --add /\n * --add-glob in the same invocation. A per-entry embedded note (the\n * `path=...,note=...` pair syntax) takes precedence over this flag.\n * Requires at least one --add/--add-glob; rejected otherwise.\n */\n note?: string;\n list?: boolean;\n appendStable?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface PathMigration {\n from: string;\n to: string;\n}\n\nexport interface AddGlobEntry {\n pattern: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedPathValidation {\n checked: number;\n existing_files: string[];\n missing_paths: string[];\n non_file_paths: string[];\n}\n\nexport interface LinkedPathAuditEntry {\n path: string;\n linked_by_count: number;\n linked_item_ids: string[];\n}\n\nexport interface LinkedArtifactResult {\n id: string;\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n artifacts: LinkedArtifact[];\n}\n\n/**\n * Configuration that adapts the shared linked-artifact command core to a\n * specific resource kind (files or docs) while preserving every behavioral\n * detail of the original twin implementations.\n */\nexport interface LinkedArtifactKindConfig {\n /** Metadata key under which the artifacts are stored (e.g. \"files\" | \"docs\"). */\n metadataKey: \"files\" | \"docs\";\n /** Mutation op recorded in history (e.g. \"files_add\" | \"docs_add\"). */\n op: \"files_add\" | \"docs_add\";\n /** Noun used in the \"bare <noun> path\" --add usage error (e.g. \"file\" | \"doc\"). */\n bareNoun: \"file\" | \"doc\";\n /**\n * Whether this kind honors the append-stable option. files supports it;\n * docs always sorts and must never expose append-stable behavior.\n */\n supportsAppendStable: boolean;\n}\n\nexport function ensureScope(raw: string | undefined): LinkScope {\n const value = (raw ?? \"project\") as LinkScope;\n if (!SCOPE_VALUES.includes(value)) {\n throw new PmCliError(\n `Invalid scope \"${raw}\". Valid scopes: ${SCOPE_VALUES.join(\", \")} (default: project).`,\n EXIT_CODE.USAGE,\n );\n }\n return value;\n}\n\nexport function looksLikeStructuredPathEntry(raw: string): boolean {\n if (raw.startsWith(\"```\") || raw.includes(\"\\n\")) {\n return true;\n }\n if (/^(?:[-*+]\\s+)?(?:path|scope|note)\\s*[:=]/i.test(raw)) {\n return true;\n }\n // A first-key typo (e.g. `lable=main,path=…`) must still be parsed so the\n // unknown key is rejected rather than swallowed as a bare path (GH-258).\n return looksLikeGenericKeyValueEntry(raw);\n}\n\nexport function parseAddEntries(raw: string[] | undefined, bareNoun: \"file\" | \"doc\"): LinkedArtifact[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n const kv = looksLikeStructuredPathEntry(trimmed) ? parseCsvKv(entry, \"--add\") : { path: trimmed };\n assertNoUnknownCsvKeys(kv, \"--add\", LINKED_ARTIFACT_ADD_KEYS);\n if (!kv.path) {\n throw new PmCliError(`--add requires path=<value> or a bare ${bareNoun} path`, EXIT_CODE.USAGE);\n }\n return {\n path: kv.path,\n scope: ensureScope(kv.scope),\n note: kv.note?.trim() || undefined,\n };\n });\n}\n\nexport function parseAddGlobEntries(raw: string[] | undefined): AddGlobEntry[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n throw new PmCliError(\"--add-glob requires a glob pattern value\", EXIT_CODE.USAGE);\n }\n if (trimmed.includes(\"=\") || /^(?:[-*+]\\s+)?(?:pattern|glob|path)\\s*[:=]/i.test(trimmed) || trimmed.startsWith(\"```\")) {\n const kv = parseCsvKv(trimmed, \"--add-glob\");\n assertNoUnknownCsvKeys(kv, \"--add-glob\", LINKED_ARTIFACT_ADD_GLOB_KEYS);\n const pattern = kv.pattern?.trim() || kv.glob?.trim() || kv.path?.trim();\n if (!pattern) {\n throw new PmCliError(\"--add-glob key/value form requires pattern=<glob>\", EXIT_CODE.USAGE);\n }\n return {\n pattern,\n scope: ensureScope(kv.scope),\n note: kv.note?.trim() || undefined,\n };\n }\n return {\n pattern: trimmed,\n scope: \"project\",\n };\n });\n}\n\nexport function parseRemoveEntries(raw: string[] | undefined): string[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n throw new PmCliError(\"--remove requires a path value\", EXIT_CODE.USAGE);\n }\n if (trimmed.includes(\"=\") || /^(?:[-*+]\\s+)?path\\s*[:=]/i.test(trimmed) || trimmed.startsWith(\"```\")) {\n const kv = parseCsvKv(trimmed, \"--remove\");\n assertNoUnknownCsvKeys(kv, \"--remove\", LINKED_ARTIFACT_REMOVE_KEYS);\n if (!kv.path) {\n throw new PmCliError(\"--remove key/value form requires path=<value>\", EXIT_CODE.USAGE);\n }\n return kv.path;\n }\n return trimmed;\n });\n}\n\nexport function parseMigrateEntries(raw: string[] | undefined): PathMigration[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const kv = parseCsvKv(entry, \"--migrate\");\n assertNoUnknownCsvKeys(kv, \"--migrate\", LINKED_ARTIFACT_MIGRATE_KEYS);\n const from = kv.from?.trim();\n const to = kv.to?.trim();\n if (!from || !to) {\n throw new PmCliError(\"--migrate requires from=<value> and to=<value>\", EXIT_CODE.USAGE);\n }\n return { from, to };\n });\n}\n\nexport function applyPathMigrations(artifactPath: string, migrations: PathMigration[]): string {\n let next = artifactPath;\n for (const migration of migrations) {\n if (next.startsWith(migration.from)) {\n next = `${migration.to}${next.slice(migration.from.length)}`;\n }\n }\n return next;\n}\n\nexport function normalizeLinkedPath(value: string): string {\n return value.split(path.sep).join(\"/\");\n}\n\nexport async function expandAddGlobEntries(entries: AddGlobEntry[]): Promise<LinkedArtifact[]> {\n const expanded: LinkedArtifact[] = [];\n for (const entry of entries) {\n const absolutePattern = path.isAbsolute(entry.pattern);\n const matches = await fg(entry.pattern, {\n cwd: process.cwd(),\n absolute: absolutePattern,\n onlyFiles: true,\n dot: true,\n unique: true,\n followSymbolicLinks: true,\n });\n const sortedMatches = [...new Set(matches.map((match) => normalizeLinkedPath(path.normalize(match))))].sort((left, right) =>\n left.localeCompare(right),\n );\n for (const matchedPath of sortedMatches) {\n expanded.push({\n path: matchedPath,\n scope: entry.scope,\n note: entry.note,\n });\n }\n }\n return expanded;\n}\n\n/**\n * GH-170 (pm-pfnx): apply a standalone --note to the links added in this\n * invocation. Semantics (documented on pm-pfnx): the note is attached to EVERY\n * entry added via --add/--add-glob so a single flag annotates the whole batch\n * predictably; a per-entry embedded `note=` wins over the standalone flag; and\n * --note without any --add/--add-glob flag is a usage error because there is\n * nothing to annotate (it never retro-edits existing links). `hasAddFlags`\n * reflects flag presence, not match count, so a glob that legitimately matches\n * zero files is not an error.\n */\nexport function applyStandaloneNote(\n adds: LinkedArtifact[],\n note: string | undefined,\n hasAddFlags: boolean,\n): LinkedArtifact[] {\n if (note === undefined) {\n return adds;\n }\n if (!hasAddFlags) {\n throw new PmCliError(\n \"--note requires --add or --add-glob in the same invocation (the note annotates the links being added)\",\n EXIT_CODE.USAGE,\n );\n }\n const trimmed = note.trim();\n if (trimmed.length === 0) {\n return adds;\n }\n return adds.map((entry) => (entry.note === undefined ? { ...entry, note: trimmed } : entry));\n}\n\nexport function artifactKey(value: Pick<LinkedArtifact, \"path\" | \"scope\">): string {\n return `${value.path}::${value.scope}`;\n}\n\nexport function sortLinkedArtifacts(artifacts: LinkedArtifact[]): LinkedArtifact[] {\n return [...artifacts].sort((left, right) => {\n const byPath = left.path.localeCompare(right.path);\n if (byPath !== 0) return byPath;\n return left.scope.localeCompare(right.scope);\n });\n}\n\nexport function dedupeLinkedArtifacts(artifacts: LinkedArtifact[]): LinkedArtifact[] {\n return [...new Map(artifacts.map((entry) => [artifactKey(entry), entry])).values()].map((entry) => ({\n ...entry,\n note: entry.note?.trim() || undefined,\n }));\n}\n\nexport async function validateLinkedPaths(paths: string[]): Promise<LinkedPathValidation> {\n const uniquePaths = [...new Set(paths)].sort((left, right) => left.localeCompare(right));\n const existingFiles: string[] = [];\n const missingPaths: string[] = [];\n const nonFilePaths: string[] = [];\n for (const relativePath of uniquePaths) {\n const resolvedPath = path.isAbsolute(relativePath) ? relativePath : path.resolve(process.cwd(), relativePath);\n try {\n const stats = await fs.stat(resolvedPath);\n if (stats.isFile()) {\n existingFiles.push(relativePath);\n } else {\n nonFilePaths.push(relativePath);\n }\n } catch (error: unknown) {\n if (typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === \"ENOENT\") {\n missingPaths.push(relativePath);\n continue;\n }\n nonFilePaths.push(relativePath);\n }\n }\n return {\n checked: uniquePaths.length,\n existing_files: existingFiles,\n missing_paths: missingPaths,\n non_file_paths: nonFilePaths,\n };\n}\n\nexport function buildLinkedPathAudit(\n paths: string[],\n allItems: Array<{ id: string; artifacts?: LinkedArtifact[] }>,\n): LinkedPathAuditEntry[] {\n const index = new Map<string, Set<string>>();\n for (const item of allItems) {\n for (const linkedArtifact of item.artifacts ?? []) {\n const seen = index.get(linkedArtifact.path) ?? new Set<string>();\n seen.add(item.id);\n index.set(linkedArtifact.path, seen);\n }\n }\n return [...new Set(paths)]\n .sort((left, right) => left.localeCompare(right))\n .map((linkedPath) => {\n const linkedIds = [...(index.get(linkedPath) ?? new Set<string>())].sort((left, right) => left.localeCompare(right));\n return {\n path: linkedPath,\n linked_by_count: linkedIds.length,\n linked_item_ids: linkedIds,\n };\n });\n}\n\n/**\n * Shared linked-artifact list/mutate command core used by runFiles and runDocs.\n * The kind config selects metadata key, op, bare-path noun, and whether\n * append-stable ordering is honored, preserving each twin's exact semantics.\n */\nexport async function runLinkedArtifacts(\n id: string,\n options: LinkedArtifactCommandOptions,\n global: GlobalOptions,\n config: LinkedArtifactKindConfig,\n): Promise<LinkedArtifactResult> {\n const { metadataKey } = config;\n const stdinResolver = createStdinTokenResolver();\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 const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const resolvedAdds = await stdinResolver.resolveList(options.add, \"--add\");\n const resolvedAddGlobs = await stdinResolver.resolveList(options.addGlob, \"--add-glob\");\n const resolvedRemoves = await stdinResolver.resolveList(options.remove, \"--remove\");\n const resolvedMigrations = await stdinResolver.resolveList(options.migrate, \"--migrate\");\n const parsedAdds = parseAddEntries(resolvedAdds, config.bareNoun);\n const addGlobs = parseAddGlobEntries(resolvedAddGlobs);\n const expandedGlobAdds = await expandAddGlobEntries(addGlobs);\n const adds = applyStandaloneNote(\n [...parsedAdds, ...expandedGlobAdds],\n options.note,\n parsedAdds.length > 0 || addGlobs.length > 0,\n );\n const removes = parseRemoveEntries(resolvedRemoves);\n const migrations = parseMigrateEntries(resolvedMigrations);\n const shouldMutate = adds.length > 0 || removes.length > 0 || migrations.length > 0;\n\n const collectAuditItems = async (): Promise<Array<{ id: string; artifacts?: LinkedArtifact[] }>> =>\n (await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema)).map((entry) => ({\n id: entry.id,\n artifacts: (entry as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined,\n }));\n\n if (!shouldMutate) {\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const artifacts = ((loaded.document.metadata as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined) ?? [];\n return {\n id: located.id,\n artifacts,\n changed: false,\n count: artifacts.length,\n validation: options.validatePaths ? await validateLinkedPaths(artifacts.map((entry) => entry.path)) : undefined,\n audit: options.audit ? buildLinkedPathAudit(artifacts.map((entry) => entry.path), await collectAuditItems()) : undefined,\n };\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: config.op,\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n const metadata = document.metadata as Record<string, unknown>;\n const next = [...((metadata[metadataKey] as LinkedArtifact[] | undefined) ?? [])];\n let migrationCount = 0;\n if (migrations.length > 0) {\n for (let index = 0; index < next.length; index += 1) {\n const migratedPath = applyPathMigrations(next[index].path, migrations);\n if (migratedPath !== next[index].path) {\n next[index] = { ...next[index], path: migratedPath };\n migrationCount += 1;\n }\n }\n }\n const migratedAdds = adds.map((entry) => {\n const migratedPath = applyPathMigrations(entry.path, migrations);\n if (migratedPath !== entry.path) {\n migrationCount += 1;\n }\n return {\n ...entry,\n path: migratedPath,\n };\n });\n const migratedRemoves = removes.map((entry) => applyPathMigrations(entry, migrations));\n for (const add of migratedAdds) {\n const exists = next.some((entry) => entry.path === add.path && entry.scope === add.scope);\n if (!exists) {\n next.push(add);\n }\n }\n if (migratedRemoves.length > 0) {\n for (let i = next.length - 1; i >= 0; i -= 1) {\n if (migratedRemoves.includes(next[i].path)) {\n next.splice(i, 1);\n }\n }\n }\n const deduped = dedupeLinkedArtifacts(next);\n const normalized = config.supportsAppendStable && options.appendStable ? deduped : sortLinkedArtifacts(deduped);\n if (normalized.length > 0) {\n metadata[metadataKey] = normalized;\n } else {\n delete metadata[metadataKey];\n }\n return { changedFields: [metadataKey], warnings: migrationCount > 0 ? [`path_migrations_applied:${migrationCount}`] : [] };\n },\n });\n\n const artifacts = ((result.item as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined) ?? [];\n const migrationWarning = result.warnings.find((warning) => warning.startsWith(\"path_migrations_applied:\"));\n const migrationCount = migrationWarning ? Number(migrationWarning.slice(\"path_migrations_applied:\".length)) : 0;\n const allItems = options.audit ? await collectAuditItems() : [];\n return {\n id: result.item.id,\n artifacts,\n changed: true,\n count: artifacts.length,\n migrations_applied: migrationCount > 0 ? migrationCount : undefined,\n validation: options.validatePaths ? await validateLinkedPaths(artifacts.map((entry) => entry.path)) : undefined,\n audit: options.audit ? buildLinkedPathAudit(artifacts.map((entry) => entry.path), allItems) : undefined,\n };\n}\n\n/**\n * Re-key the generic `artifacts` field to the resource-specific name (files/docs)\n * while preserving the original key order and presence so kind-specific result\n * shapes (and their deterministic JSON key ordering) stay byte-identical.\n */\nexport function renameArtifactsResultKey(result: LinkedArtifactResult, key: \"files\" | \"docs\"): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [field, value] of Object.entries(result)) {\n out[field === \"artifacts\" ? key : field] = value;\n }\n return out;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,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
7
  import {
8
8
  EMPTY_REPLAY_DOCUMENT,
9
9
  historyEntriesToRaw,
@@ -11,27 +11,27 @@ import {
11
11
  replayToItemDocument,
12
12
  tryApplyReplayPatch,
13
13
  verifyHistoryChain
14
- } from "./chunk-GOO4UXBI.js";
14
+ } from "./chunk-JZHL4E3Q.js";
15
15
  import {
16
16
  acquireLock,
17
17
  createHistoryEntry,
18
18
  locateItem,
19
19
  readLocatedItem
20
- } from "./chunk-XXLMJDUB.js";
20
+ } from "./chunk-KA22USXD.js";
21
21
  import {
22
22
  normalizeItemId,
23
23
  normalizeRawItemId
24
- } from "./chunk-LGOXXQUW.js";
24
+ } from "./chunk-5XGWFUW2.js";
25
25
  import {
26
26
  canonicalDocument,
27
27
  serializeItemDocument
28
- } from "./chunk-MACCNKSZ.js";
28
+ } from "./chunk-TBV33CB4.js";
29
29
  import {
30
30
  resolveItemTypeRegistry
31
- } from "./chunk-W6KNFAMZ.js";
31
+ } from "./chunk-QXMXRPX5.js";
32
32
  import {
33
33
  nowIso
34
- } from "./chunk-IXVSSHGV.js";
34
+ } from "./chunk-LNH5Q32E.js";
35
35
  import {
36
36
  EXIT_CODE,
37
37
  PmCliError,
@@ -46,7 +46,7 @@ import {
46
46
  resolvePmRoot,
47
47
  runActiveOnWriteHooks,
48
48
  writeFileAtomic
49
- } from "./chunk-LFW5NQUP.js";
49
+ } from "./chunk-CHM2VFVL.js";
50
50
 
51
51
  // dist/cli/commands/history-redact.js
52
52
  import fs from "node:fs/promises";
@@ -55,7 +55,7 @@ import fs from "node:fs/promises";
55
55
  !(function() {
56
56
  try {
57
57
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
58
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6929fbcd-89b7-580d-93fc-f647b086b95f");
58
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5c9d33cb-2601-55e4-9134-acae94c017c0");
59
59
  } catch (e2) {
60
60
  }
61
61
  })();
@@ -86,12 +86,40 @@ async function verifyHistoryRewriteNoDrift(params) {
86
86
  }
87
87
  return { historyRawUnderLock, locatedUnderLock, loadedItemUnderLock };
88
88
  }
89
+ async function executeHistoryRewrite(params) {
90
+ const warnings = [...checkHistoryRewriteOwnership({
91
+ itemDocument: params.itemDocument,
92
+ subjectId: params.subject.id,
93
+ author: params.author,
94
+ force: params.force,
95
+ settings: params.settings
96
+ })];
97
+ const releaseLock = await acquireLock(params.pmRoot, params.subject.id, params.settings.locks.ttl_seconds, params.author, Boolean(params.force), params.settings.governance.force_required_for_stale_lock);
98
+ try {
99
+ const verified = await verifyHistoryRewriteNoDrift({
100
+ pmRoot: params.pmRoot,
101
+ subject: params.subject,
102
+ settings: params.settings,
103
+ typeRegistry: params.typeRegistry,
104
+ historyRawBeforeLock: params.historyRawBeforeLock,
105
+ currentItemRawBeforeLock: params.currentItemRawBeforeLock,
106
+ operation: params.operation
107
+ });
108
+ await params.applyRewrite(verified);
109
+ if (params.applyPostRewrite) {
110
+ warnings.push(...await params.applyPostRewrite(verified));
111
+ }
112
+ return warnings;
113
+ } finally {
114
+ await releaseLock();
115
+ }
116
+ }
89
117
 
90
118
  // dist/cli/commands/history-redact.js
91
119
  !(function() {
92
120
  try {
93
121
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
94
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f92d5c88-f7f6-522f-a15b-fb109875fdac");
122
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "68fdd670-f760-5545-a7bd-4ac5b9e135d2");
95
123
  } catch (e2) {
96
124
  }
97
125
  })();
@@ -416,9 +444,16 @@ async function runHistoryRedact(id, options, global2) {
416
444
  schema: settings.schema
417
445
  });
418
446
  }
419
- const itemChanged = (currentItemPath ?? null) !== (nextItemPath ?? null) || (currentItemRaw ?? null) !== (nextItemRaw ?? null);
447
+ const itemChanged = (
448
+ /* c8 ignore next -- null-coalescing item-path comparison branch is exercised in broader command integration coverage. */
449
+ (currentItemPath ?? null) !== (nextItemPath ?? null) || /* c8 ignore next -- null-coalescing item-content comparison branch is exercised in broader command integration coverage. */
450
+ (currentItemRaw ?? null) !== (nextItemRaw ?? null)
451
+ );
420
452
  const author = resolveAuthor(options.author, settings.author_default);
421
- const redactionMessage = typeof options.message === "string" && options.message.trim().length > 0 ? options.message : `history-redact replaced ${rewritten.replacements} match(es) across ${rewritten.entriesChanged} entr${rewritten.entriesChanged === 1 ? "y" : "ies"}.`;
453
+ const redactionMessage = (
454
+ /* c8 ignore next -- custom-message branch is validated by command wrapper tests. */
455
+ typeof options.message === "string" && options.message.trim().length > 0 ? options.message : `history-redact replaced ${rewritten.replacements} match(es) across ${rewritten.entriesChanged} entr${rewritten.entriesChanged === 1 ? "y" : "ies"}.`
456
+ );
422
457
  const rewrittenEntries = [...rewritten.entries];
423
458
  let auditEntryAdded = false;
424
459
  if (!dryRun && changed) {
@@ -438,75 +473,72 @@ async function runHistoryRedact(id, options, global2) {
438
473
  throw new PmCliError(`history-redact produced an invalid rewritten chain (${historyVerify.errors.join(", ")}).`, EXIT_CODE.GENERIC_FAILURE);
439
474
  }
440
475
  if (!dryRun && changed) {
441
- warnings.push(...checkHistoryRewriteOwnership({
442
- itemDocument: currentItemDocument,
443
- subjectId: subject.id,
476
+ warnings.push(...await executeHistoryRewrite({
477
+ pmRoot,
478
+ subject,
479
+ settings,
480
+ typeRegistry,
481
+ historyRawBeforeLock,
482
+ currentItemRawBeforeLock: currentItemRaw,
483
+ operation: "history-redact",
444
484
  author,
445
485
  force: options.force,
446
- settings
447
- }));
448
- const releaseLock = await acquireLock(pmRoot, subject.id, settings.locks.ttl_seconds, author, Boolean(options.force), settings.governance.force_required_for_stale_lock);
449
- try {
450
- const { historyRawUnderLock } = await verifyHistoryRewriteNoDrift({
451
- pmRoot,
452
- subject,
453
- settings,
454
- typeRegistry,
455
- historyRawBeforeLock,
456
- currentItemRawBeforeLock: currentItemRaw,
457
- operation: "history-redact"
458
- });
459
- const affectedItemPaths = /* @__PURE__ */ new Set();
460
- if (currentItemPath) {
461
- affectedItemPaths.add(currentItemPath);
462
- }
463
- if (nextItemPath) {
464
- affectedItemPaths.add(nextItemPath);
465
- }
466
- const itemSnapshots = /* @__PURE__ */ new Map();
467
- if (currentItemPath && currentItemRaw !== null) {
468
- itemSnapshots.set(currentItemPath, currentItemRaw);
469
- }
470
- try {
471
- if (nextItemPath && nextItemRaw !== null && nextItemRaw !== currentItemRaw) {
472
- await writeFileAtomic(nextItemPath, nextItemRaw);
486
+ itemDocument: currentItemDocument,
487
+ applyRewrite: async ({ historyRawUnderLock }) => {
488
+ const affectedItemPaths = /* @__PURE__ */ new Set();
489
+ if (currentItemPath) {
490
+ affectedItemPaths.add(currentItemPath);
473
491
  }
474
- if (currentItemPath && (!nextItemPath || nextItemPath !== currentItemPath)) {
475
- await fs.rm(currentItemPath, { force: true });
492
+ if (nextItemPath) {
493
+ affectedItemPaths.add(nextItemPath);
476
494
  }
477
- await writeFileAtomic(subject.historyPath, historyEntriesToRaw(rewrittenEntries));
478
- } catch (error) {
479
- if (historyRawUnderLock === null) {
480
- await fs.rm(subject.historyPath, { force: true });
481
- } else {
482
- await writeFileAtomic(subject.historyPath, historyRawUnderLock);
495
+ const itemSnapshots = /* @__PURE__ */ new Map();
496
+ if (currentItemPath && currentItemRaw !== null) {
497
+ itemSnapshots.set(currentItemPath, currentItemRaw);
483
498
  }
484
- for (const itemPath of affectedItemPaths) {
485
- const snapshot = itemSnapshots.get(itemPath);
486
- if (snapshot === void 0) {
487
- await fs.rm(itemPath, { force: true });
499
+ try {
500
+ if (nextItemPath && nextItemRaw !== null && nextItemRaw !== currentItemRaw) {
501
+ await writeFileAtomic(nextItemPath, nextItemRaw);
502
+ }
503
+ if (currentItemPath && (!nextItemPath || nextItemPath !== currentItemPath)) {
504
+ await fs.rm(currentItemPath, { force: true });
505
+ }
506
+ await writeFileAtomic(subject.historyPath, historyEntriesToRaw(rewrittenEntries));
507
+ } catch (error) {
508
+ if (historyRawUnderLock === null) {
509
+ await fs.rm(subject.historyPath, { force: true });
488
510
  } else {
489
- await writeFileAtomic(itemPath, snapshot);
511
+ await writeFileAtomic(subject.historyPath, historyRawUnderLock);
490
512
  }
513
+ for (const itemPath of affectedItemPaths) {
514
+ const snapshot = itemSnapshots.get(itemPath);
515
+ if (snapshot === void 0) {
516
+ await fs.rm(itemPath, { force: true });
517
+ } else {
518
+ await writeFileAtomic(itemPath, snapshot);
519
+ }
520
+ }
521
+ throw error;
491
522
  }
492
- throw error;
493
- }
494
- const itemHookPath = nextItemPath ?? currentItemPath;
495
- if (itemHookPath) {
496
- warnings.push(...await runActiveOnWriteHooks({
497
- path: itemHookPath,
523
+ },
524
+ applyPostRewrite: async () => {
525
+ const hookWarnings = [];
526
+ const itemHookPath = nextItemPath ?? currentItemPath;
527
+ if (itemHookPath) {
528
+ hookWarnings.push(...await runActiveOnWriteHooks({
529
+ path: itemHookPath,
530
+ scope: "project",
531
+ op: "history_redact"
532
+ }));
533
+ }
534
+ hookWarnings.push(...await runActiveOnWriteHooks({
535
+ path: subject.historyPath,
498
536
  scope: "project",
499
- op: "history_redact"
537
+ op: "history_redact:history"
500
538
  }));
539
+ return hookWarnings;
501
540
  }
502
- warnings.push(...await runActiveOnWriteHooks({
503
- path: subject.historyPath,
504
- scope: "project",
505
- op: "history_redact:history"
506
- }));
507
- } finally {
508
- await releaseLock();
509
- }
541
+ }));
510
542
  }
511
543
  return {
512
544
  id: subject.id,
@@ -536,15 +568,27 @@ async function runHistoryRedact(id, options, global2) {
536
568
  path_after: nextItemPath,
537
569
  changed: itemChanged
538
570
  },
571
+ /* c8 ignore next -- warning dedupe ordering is covered indirectly by command-level smoke tests. */
539
572
  warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
540
573
  generated_at: nowIso()
541
574
  };
542
575
  }
576
+ var _testOnly = {
577
+ applyLiteralRule,
578
+ applyRegexRule,
579
+ buildRedactionRules,
580
+ hasItemMetadata,
581
+ normalizeRegexFlags,
582
+ normalizeStringArrayInput,
583
+ parseRegexRule,
584
+ redactStringValue,
585
+ redactUnknownValue
586
+ };
543
587
 
544
588
  export {
545
- checkHistoryRewriteOwnership,
546
- verifyHistoryRewriteNoDrift,
589
+ executeHistoryRewrite,
547
590
  resolveHistorySubject,
548
- runHistoryRedact
591
+ runHistoryRedact,
592
+ _testOnly
549
593
  };
550
- //# sourceMappingURL=chunk-4JHJ7YG2.js.map
594
+ //# sourceMappingURL=chunk-UGUJ2UOR.js.map