@unbrained/pm-cli 2026.6.13 → 2026.6.16

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 (770) hide show
  1. package/CHANGELOG.md +84 -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 +269 -8
  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 +49 -0
  42. package/dist/cli/commands/create.js +105 -7
  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 +1 -0
  88. package/dist/cli/commands/index.js +3 -2
  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 +36 -1
  94. package/dist/cli/commands/init.js +38 -5
  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/linked-test-parsers.d.ts +5 -0
  99. package/dist/cli/commands/linked-test-parsers.js +5 -2
  100. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  101. package/dist/cli/commands/list-filter-shared.d.ts +8 -0
  102. package/dist/cli/commands/list-filter-shared.js +70 -0
  103. package/dist/cli/commands/list-filter-shared.js.map +1 -0
  104. package/dist/cli/commands/list.d.ts +116 -0
  105. package/dist/cli/commands/list.js +194 -6
  106. package/dist/cli/commands/list.js.map +1 -1
  107. package/dist/cli/commands/normalize.js +16 -2
  108. package/dist/cli/commands/normalize.js.map +1 -1
  109. package/dist/cli/commands/notes.js +4 -3
  110. package/dist/cli/commands/notes.js.map +1 -1
  111. package/dist/cli/commands/plan.js +3 -2
  112. package/dist/cli/commands/plan.js.map +1 -1
  113. package/dist/cli/commands/reindex.d.ts +83 -0
  114. package/dist/cli/commands/reindex.js +45 -10
  115. package/dist/cli/commands/reindex.js.map +1 -1
  116. package/dist/cli/commands/restore.d.ts +40 -1
  117. package/dist/cli/commands/restore.js +27 -2
  118. package/dist/cli/commands/restore.js.map +1 -1
  119. package/dist/cli/commands/schema.d.ts +18 -0
  120. package/dist/cli/commands/schema.js +30 -3
  121. package/dist/cli/commands/schema.js.map +1 -1
  122. package/dist/cli/commands/search.d.ts +289 -1
  123. package/dist/cli/commands/search.js +367 -60
  124. package/dist/cli/commands/search.js.map +1 -1
  125. package/dist/cli/commands/stats.d.ts +38 -0
  126. package/dist/cli/commands/stats.js +38 -10
  127. package/dist/cli/commands/stats.js.map +1 -1
  128. package/dist/cli/commands/telemetry.js +5 -3
  129. package/dist/cli/commands/telemetry.js.map +1 -1
  130. package/dist/cli/commands/templates.d.ts +18 -0
  131. package/dist/cli/commands/templates.js +9 -2
  132. package/dist/cli/commands/templates.js.map +1 -1
  133. package/dist/cli/commands/test-all.d.ts +5 -0
  134. package/dist/cli/commands/test-all.js +9 -3
  135. package/dist/cli/commands/test-all.js.map +1 -1
  136. package/dist/cli/commands/test.d.ts +70 -1
  137. package/dist/cli/commands/test.js +84 -3
  138. package/dist/cli/commands/test.js.map +1 -1
  139. package/dist/cli/commands/update-many.d.ts +34 -1
  140. package/dist/cli/commands/update-many.js +60 -31
  141. package/dist/cli/commands/update-many.js.map +1 -1
  142. package/dist/cli/commands/update.d.ts +71 -0
  143. package/dist/cli/commands/update.js +74 -8
  144. package/dist/cli/commands/update.js.map +1 -1
  145. package/dist/cli/commands/upgrade.d.ts +28 -1
  146. package/dist/cli/commands/upgrade.js +17 -4
  147. package/dist/cli/commands/upgrade.js.map +1 -1
  148. package/dist/cli/commands/validate.d.ts +114 -0
  149. package/dist/cli/commands/validate.js +153 -8
  150. package/dist/cli/commands/validate.js.map +1 -1
  151. package/dist/cli/error-guidance.d.ts +30 -0
  152. package/dist/cli/error-guidance.js +41 -6
  153. package/dist/cli/error-guidance.js.map +1 -1
  154. package/dist/cli/extension-command-options.js +9 -7
  155. package/dist/cli/extension-command-options.js.map +1 -1
  156. package/dist/cli/help-content.d.ts +8 -0
  157. package/dist/cli/help-content.js +30 -6
  158. package/dist/cli/help-content.js.map +1 -1
  159. package/dist/cli/help-json-payload.d.ts +19 -1
  160. package/dist/cli/help-json-payload.js +16 -7
  161. package/dist/cli/help-json-payload.js.map +1 -1
  162. package/dist/cli/main.d.ts +223 -0
  163. package/dist/cli/main.js +203 -45
  164. package/dist/cli/main.js.map +1 -1
  165. package/dist/cli/register-list-query.js +62 -5
  166. package/dist/cli/register-list-query.js.map +1 -1
  167. package/dist/cli/register-mutation.d.ts +16 -0
  168. package/dist/cli/register-mutation.js +210 -40
  169. package/dist/cli/register-mutation.js.map +1 -1
  170. package/dist/cli/register-operations.d.ts +8 -0
  171. package/dist/cli/register-operations.js +33 -11
  172. package/dist/cli/register-operations.js.map +1 -1
  173. package/dist/cli/register-setup.js +9 -6
  174. package/dist/cli/register-setup.js.map +1 -1
  175. package/dist/cli/registration-helpers.d.ts +4 -0
  176. package/dist/cli/registration-helpers.js +124 -38
  177. package/dist/cli/registration-helpers.js.map +1 -1
  178. package/dist/cli-bundle/chunks/activity-5P2KQCTH.js +18 -0
  179. package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js → activity-MJGTX4LO.js} +13 -11
  180. package/dist/cli-bundle/chunks/{aggregate-XEBW22UQ.js → aggregate-MH3GROKB.js} +54 -25
  181. package/dist/cli-bundle/chunks/aggregate-MH3GROKB.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{aggregate-IRHJWEKG.js → aggregate-OUGCDFNC.js} +55 -26
  183. package/dist/cli-bundle/chunks/aggregate-OUGCDFNC.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{append-N2AWXKZC.js → append-2Q4BPUBW.js} +10 -10
  185. package/dist/cli-bundle/chunks/{append-N2AWXKZC.js.map → append-2Q4BPUBW.js.map} +2 -2
  186. package/dist/cli-bundle/chunks/{append-NL67JNJU.js → append-VCRUG2W6.js} +11 -11
  187. package/dist/cli-bundle/chunks/append-VCRUG2W6.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js → chunk-2IUJBMKS.js} +10 -9
  189. package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js.map → chunk-2IUJBMKS.js.map} +2 -2
  190. package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js → chunk-2JEGCDYT.js} +2 -2
  191. package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js → chunk-3WAULYOY.js} +3 -3
  192. package/dist/cli-bundle/chunks/{chunk-AGG32LKL.js → chunk-3XOXWOGA.js} +359 -19
  193. package/dist/cli-bundle/chunks/chunk-3XOXWOGA.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{chunk-XXLMJDUB.js → chunk-4KBK4BA3.js} +13 -15
  195. package/dist/cli-bundle/chunks/chunk-4KBK4BA3.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{chunk-UCVJP4JL.js → chunk-4VLB4JH2.js} +51 -8
  197. package/dist/cli-bundle/chunks/chunk-4VLB4JH2.js.map +7 -0
  198. package/dist/cli-bundle/chunks/{chunk-BVL5KGVA.js → chunk-656HPQPO.js} +27 -12
  199. package/dist/cli-bundle/chunks/chunk-656HPQPO.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{chunk-LYNQ3NGI.js → chunk-667XI4UJ.js} +309 -20
  201. package/dist/cli-bundle/chunks/chunk-667XI4UJ.js.map +1 -0
  202. package/dist/cli-bundle/chunks/{chunk-W6KNFAMZ.js → chunk-6BV7ENQL.js} +9 -8
  203. package/dist/cli-bundle/chunks/chunk-6BV7ENQL.js.map +7 -0
  204. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js +35 -0
  205. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js.map +7 -0
  206. package/dist/cli-bundle/chunks/{chunk-7SM7VA5I.js → chunk-6NQXMGYU.js} +19 -8
  207. package/dist/cli-bundle/chunks/chunk-6NQXMGYU.js.map +7 -0
  208. package/dist/cli-bundle/chunks/{chunk-AAUYXSFF.js → chunk-764O7EUA.js} +223 -50
  209. package/dist/cli-bundle/chunks/chunk-764O7EUA.js.map +7 -0
  210. package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js → chunk-7AGIXLNK.js} +3 -3
  211. package/dist/cli-bundle/chunks/chunk-7EILPFMA.js +404 -0
  212. package/dist/cli-bundle/chunks/chunk-7EILPFMA.js.map +7 -0
  213. package/dist/cli-bundle/chunks/{chunk-L6YQONLM.js → chunk-7K2MXFMX.js} +11 -13
  214. package/dist/cli-bundle/chunks/chunk-7K2MXFMX.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-HZOX5BYD.js → chunk-7L5VOUYP.js} +6 -17
  216. package/dist/cli-bundle/chunks/chunk-7L5VOUYP.js.map +7 -0
  217. package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js +61 -0
  218. package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{chunk-TOX7YQ7X.js → chunk-A576QZDL.js} +223 -50
  220. package/dist/cli-bundle/chunks/chunk-A576QZDL.js.map +1 -0
  221. package/dist/cli-bundle/chunks/{chunk-RFR2YQGO.js → chunk-AERT7KT3.js} +5 -5
  222. package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js +58 -0
  223. package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-SQDKAEKG.js → chunk-B5Q7XC4K.js} +117 -37
  225. package/dist/cli-bundle/chunks/chunk-B5Q7XC4K.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-RHYBR6G7.js → chunk-BJWTFOZM.js} +74 -14
  227. package/dist/cli-bundle/chunks/chunk-BJWTFOZM.js.map +1 -0
  228. package/dist/cli-bundle/chunks/{chunk-4ZKKZMLH.js → chunk-CBMETQ2U.js} +104 -30
  229. package/dist/cli-bundle/chunks/chunk-CBMETQ2U.js.map +1 -0
  230. package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js → chunk-E6J2PEK6.js} +3 -3
  231. package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js → chunk-F2GC6L3N.js} +3 -3
  232. package/dist/cli-bundle/chunks/{chunk-3VULHQNS.js → chunk-F7WSO5UX.js} +7 -18
  233. package/dist/cli-bundle/chunks/chunk-F7WSO5UX.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js → chunk-FTAZLAR7.js} +8 -5
  235. package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js.map → chunk-FTAZLAR7.js.map} +1 -1
  236. package/dist/cli-bundle/chunks/{chunk-AUDDXKNX.js → chunk-FXNT5LPX.js} +77 -9
  237. package/dist/cli-bundle/chunks/chunk-FXNT5LPX.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{chunk-IZHCCG4S.js → chunk-G2YVUY7I.js} +14 -9
  239. package/dist/cli-bundle/chunks/chunk-G2YVUY7I.js.map +1 -0
  240. package/dist/cli-bundle/chunks/{chunk-5HSAHRYA.js → chunk-G3CEIXTV.js} +68 -19
  241. package/dist/cli-bundle/chunks/chunk-G3CEIXTV.js.map +7 -0
  242. package/dist/cli-bundle/chunks/{chunk-QQG4HEX7.js → chunk-GAVE4MYM.js} +37 -63
  243. package/dist/cli-bundle/chunks/chunk-GAVE4MYM.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js → chunk-GQ4JKNMV.js} +4 -4
  245. package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js.map → chunk-GQ4JKNMV.js.map} +1 -1
  246. package/dist/cli-bundle/chunks/{chunk-MACCNKSZ.js → chunk-GYMG7AG6.js} +36 -62
  247. package/dist/cli-bundle/chunks/chunk-GYMG7AG6.js.map +7 -0
  248. package/dist/cli-bundle/chunks/{chunk-7CRFV6JR.js → chunk-H6EH6ENJ.js} +362 -22
  249. package/dist/cli-bundle/chunks/chunk-H6EH6ENJ.js.map +7 -0
  250. package/dist/cli-bundle/chunks/{chunk-2J2AH4V5.js → chunk-HDIDUME4.js} +45 -13
  251. package/dist/cli-bundle/chunks/chunk-HDIDUME4.js.map +1 -0
  252. package/dist/cli-bundle/chunks/{chunk-2ANTZBYF.js → chunk-HPELHUTG.js} +122 -45
  253. package/dist/cli-bundle/chunks/chunk-HPELHUTG.js.map +1 -0
  254. package/dist/cli-bundle/chunks/{chunk-VNC2HBL4.js → chunk-II7OGE3V.js} +20 -9
  255. package/dist/cli-bundle/chunks/chunk-II7OGE3V.js.map +1 -0
  256. package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js → chunk-ILHLIA47.js} +5 -5
  257. package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js.map → chunk-ILHLIA47.js.map} +1 -1
  258. package/dist/cli-bundle/chunks/{chunk-4TPFXE2R.js → chunk-IMQG4VR3.js} +118 -74
  259. package/dist/cli-bundle/chunks/chunk-IMQG4VR3.js.map +1 -0
  260. package/dist/cli-bundle/chunks/{chunk-MGAQ6KZG.js → chunk-IQVB3YDD.js} +82 -21
  261. package/dist/cli-bundle/chunks/chunk-IQVB3YDD.js.map +7 -0
  262. package/dist/cli-bundle/chunks/{chunk-WLH7X4RN.js → chunk-KQ3LAMDO.js} +45 -13
  263. package/dist/cli-bundle/chunks/chunk-KQ3LAMDO.js.map +7 -0
  264. package/dist/cli-bundle/chunks/{chunk-S2CDTRJ6.js → chunk-KTVETP66.js} +379 -271
  265. package/dist/cli-bundle/chunks/chunk-KTVETP66.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{chunk-36BCSMKP.js → chunk-KZYVTOG5.js} +26 -11
  267. package/dist/cli-bundle/chunks/chunk-KZYVTOG5.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js → chunk-L6FJPOT4.js} +11 -10
  269. package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js.map → chunk-L6FJPOT4.js.map} +1 -1
  270. package/dist/cli-bundle/chunks/{chunk-LFW5NQUP.js → chunk-LV5FFQ7M.js} +405 -290
  271. package/dist/cli-bundle/chunks/chunk-LV5FFQ7M.js.map +7 -0
  272. package/dist/cli-bundle/chunks/{chunk-PNYAAB4S.js → chunk-LWGMDLQ6.js} +8 -3
  273. package/dist/cli-bundle/chunks/chunk-LWGMDLQ6.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js → chunk-M23HXJL3.js} +2 -2
  275. package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js → chunk-MJZUZ2QE.js} +3 -3
  276. package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js → chunk-NCIBNERT.js} +4 -4
  277. package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js.map → chunk-NCIBNERT.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{chunk-6TBR5AZ2.js → chunk-NIQHNDBZ.js} +76 -8
  279. package/dist/cli-bundle/chunks/chunk-NIQHNDBZ.js.map +7 -0
  280. package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js → chunk-O46LTCXQ.js} +4 -4
  281. package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js → chunk-OCTQJP42.js} +19 -8
  282. package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js.map → chunk-OCTQJP42.js.map} +2 -2
  283. package/dist/cli-bundle/chunks/{chunk-HLEGAQXT.js → chunk-OLTYNVJR.js} +5 -5
  284. package/dist/cli-bundle/chunks/{chunk-IXVSSHGV.js → chunk-OY3P2I6B.js} +13 -8
  285. package/dist/cli-bundle/chunks/chunk-OY3P2I6B.js.map +7 -0
  286. package/dist/cli-bundle/chunks/{chunk-KHGTYCJ6.js → chunk-PZD7WPUC.js} +69 -20
  287. package/dist/cli-bundle/chunks/chunk-PZD7WPUC.js.map +1 -0
  288. package/dist/cli-bundle/chunks/{chunk-4FHLNNW7.js → chunk-Q5RLUCP3.js} +74 -14
  289. package/dist/cli-bundle/chunks/chunk-Q5RLUCP3.js.map +7 -0
  290. package/dist/cli-bundle/chunks/{chunk-SOHXUA2Q.js → chunk-RKKIH2ZQ.js} +116 -36
  291. package/dist/cli-bundle/chunks/chunk-RKKIH2ZQ.js.map +1 -0
  292. package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js → chunk-SPYPC5CB.js} +3 -3
  293. package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js.map → chunk-SPYPC5CB.js.map} +1 -1
  294. package/dist/cli-bundle/chunks/{chunk-SGMGMCIF.js → chunk-SY4GKIWT.js} +82 -21
  295. package/dist/cli-bundle/chunks/chunk-SY4GKIWT.js.map +1 -0
  296. package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js → chunk-SY4PZWIZ.js} +7 -4
  297. package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js.map → chunk-SY4PZWIZ.js.map} +2 -2
  298. package/dist/cli-bundle/chunks/{chunk-HWHONML5.js → chunk-T5VU7ROQ.js} +4 -4
  299. package/dist/cli-bundle/chunks/{chunk-JWXTOYBI.js → chunk-TIRZIQRP.js} +121 -44
  300. package/dist/cli-bundle/chunks/chunk-TIRZIQRP.js.map +7 -0
  301. package/dist/cli-bundle/chunks/{chunk-PEH7SZD2.js → chunk-TUB3DZAZ.js} +105 -31
  302. package/dist/cli-bundle/chunks/chunk-TUB3DZAZ.js.map +7 -0
  303. package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js +394 -0
  304. package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js.map +1 -0
  305. package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js → chunk-UBMCSJXX.js} +3 -3
  306. package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js → chunk-UUKORJSN.js} +4 -4
  307. package/dist/cli-bundle/chunks/{chunk-R4VWYWRN.js → chunk-W3HFLORZ.js} +7 -2
  308. package/dist/cli-bundle/chunks/chunk-W3HFLORZ.js.map +7 -0
  309. package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js → chunk-WZCQVABQ.js} +2 -2
  310. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js +32 -0
  311. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js.map +1 -0
  312. package/dist/cli-bundle/chunks/{chunk-M3SI2REU.js → chunk-XLNNCKTN.js} +322 -19
  313. package/dist/cli-bundle/chunks/chunk-XLNNCKTN.js.map +7 -0
  314. package/dist/cli-bundle/chunks/{chunk-4JHJ7YG2.js → chunk-XNOY7TCB.js} +118 -74
  315. package/dist/cli-bundle/chunks/chunk-XNOY7TCB.js.map +7 -0
  316. package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js → chunk-YGRPBFMA.js} +2 -2
  317. package/dist/cli-bundle/chunks/{chunk-JW7D6437.js → chunk-YXTLI4XP.js} +20 -9
  318. package/dist/cli-bundle/chunks/chunk-YXTLI4XP.js.map +1 -0
  319. package/dist/cli-bundle/chunks/{chunk-TSXWFN3L.js → chunk-Z3MUNQRV.js} +52 -9
  320. package/dist/cli-bundle/chunks/chunk-Z3MUNQRV.js.map +1 -0
  321. package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js → chunk-ZJRDVYZI.js} +4 -4
  322. package/dist/cli-bundle/chunks/{chunk-32XSW44C.js → chunk-ZONXMSVB.js} +10 -9
  323. package/dist/cli-bundle/chunks/chunk-ZONXMSVB.js.map +1 -0
  324. package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js → claim-4APLUXJW.js} +10 -10
  325. package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js → claim-NEO7AGWH.js} +10 -10
  326. package/dist/cli-bundle/chunks/{close-SPUFW5QR.js → close-3QABBNGU.js} +8 -8
  327. package/dist/cli-bundle/chunks/close-ILMZR3D7.js +13 -0
  328. package/dist/cli-bundle/chunks/{close-many-GKAJX54X.js → close-many-MIZLTYGL.js} +32 -20
  329. package/dist/cli-bundle/chunks/close-many-MIZLTYGL.js.map +1 -0
  330. package/dist/cli-bundle/chunks/{close-many-GL6NRUU5.js → close-many-Q7Y5AHQI.js} +31 -19
  331. package/dist/cli-bundle/chunks/close-many-Q7Y5AHQI.js.map +7 -0
  332. package/dist/cli-bundle/chunks/{comments-5FPT6L7N.js → comments-DAIQPOMU.js} +55 -31
  333. package/dist/cli-bundle/chunks/comments-DAIQPOMU.js.map +1 -0
  334. package/dist/cli-bundle/chunks/{comments-TOLOYWNI.js → comments-IWFSVM4P.js} +54 -30
  335. package/dist/cli-bundle/chunks/comments-IWFSVM4P.js.map +7 -0
  336. package/dist/cli-bundle/chunks/{config-4MN45TIH.js → config-IOJELD6O.js} +45 -19
  337. package/dist/cli-bundle/chunks/config-IOJELD6O.js.map +1 -0
  338. package/dist/cli-bundle/chunks/{config-7N6D7YJE.js → config-PXTMAYV3.js} +44 -18
  339. package/dist/cli-bundle/chunks/config-PXTMAYV3.js.map +7 -0
  340. package/dist/cli-bundle/chunks/{context-AQSLE7DZ.js → context-QHJSCJW4.js} +128 -39
  341. package/dist/cli-bundle/chunks/context-QHJSCJW4.js.map +1 -0
  342. package/dist/cli-bundle/chunks/{context-U3PUJMVN.js → context-XZS2VFKU.js} +127 -38
  343. package/dist/cli-bundle/chunks/context-XZS2VFKU.js.map +7 -0
  344. package/dist/cli-bundle/chunks/{contracts-ITSJXO3O.js → contracts-B7U4OJTV.js} +54 -10
  345. package/dist/cli-bundle/chunks/contracts-B7U4OJTV.js.map +1 -0
  346. package/dist/cli-bundle/chunks/{contracts-H7KCQXLY.js → contracts-NSBVLXQ3.js} +54 -10
  347. package/dist/cli-bundle/chunks/contracts-NSBVLXQ3.js.map +7 -0
  348. package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js → copy-Q64T5FD4.js} +7 -7
  349. package/dist/cli-bundle/chunks/{copy-C4W522JM.js → copy-SG34LCMU.js} +7 -7
  350. package/dist/cli-bundle/chunks/create-F5HZX2S4.js +30 -0
  351. package/dist/cli-bundle/chunks/{create-4EQNELMY.js → create-IPAX2SNL.js} +16 -13
  352. package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js → delete-TLXR7LJ2.js} +7 -7
  353. package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js → delete-VH3L7DZ6.js} +7 -7
  354. package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js → deps-J3HBBLDB.js} +9 -10
  355. package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js.map → deps-J3HBBLDB.js.map} +2 -2
  356. package/dist/cli-bundle/chunks/{deps-HV2C2L46.js → deps-XV6JJ6IN.js} +10 -11
  357. package/dist/cli-bundle/chunks/deps-XV6JJ6IN.js.map +1 -0
  358. package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js → docs-GWDEB7JH.js} +9 -9
  359. package/dist/cli-bundle/chunks/{docs-RJQPLROO.js → docs-RCLNSKID.js} +9 -9
  360. package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js → extension-5RN65LHT.js} +7 -5
  361. package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js → extension-7KO2NX2A.js} +7 -5
  362. package/dist/cli-bundle/chunks/{files-OIFN3DQX.js → files-3TCQHUHA.js} +25 -11
  363. package/dist/cli-bundle/chunks/files-3TCQHUHA.js.map +1 -0
  364. package/dist/cli-bundle/chunks/{files-LIFDKNCN.js → files-5FDUPSEA.js} +24 -10
  365. package/dist/cli-bundle/chunks/files-5FDUPSEA.js.map +7 -0
  366. package/dist/cli-bundle/chunks/focus-7AQMNRSU.js +109 -0
  367. package/dist/cli-bundle/chunks/focus-7AQMNRSU.js.map +7 -0
  368. package/dist/cli-bundle/chunks/focus-HQXBYPKM.js +106 -0
  369. package/dist/cli-bundle/chunks/focus-HQXBYPKM.js.map +1 -0
  370. package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js → gc-2FGKYRJ4.js} +3 -3
  371. package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js → gc-5B6ABL3Z.js} +3 -3
  372. package/dist/cli-bundle/chunks/{get-SAB7CRBG.js → get-FUMVOJQD.js} +43 -16
  373. package/dist/cli-bundle/chunks/get-FUMVOJQD.js.map +1 -0
  374. package/dist/cli-bundle/chunks/{get-K7UULTQF.js → get-H5BZTW4A.js} +42 -15
  375. package/dist/cli-bundle/chunks/get-H5BZTW4A.js.map +7 -0
  376. package/dist/cli-bundle/chunks/{health-NUVZYIEV.js → health-JSVOR6B4.js} +75 -49
  377. package/dist/cli-bundle/chunks/health-JSVOR6B4.js.map +1 -0
  378. package/dist/cli-bundle/chunks/{health-VJWH3ZFK.js → health-LE2ZQGSM.js} +74 -48
  379. package/dist/cli-bundle/chunks/health-LE2ZQGSM.js.map +7 -0
  380. package/dist/cli-bundle/chunks/{history-GYFD2DJW.js → history-QO4JVJJP.js} +10 -10
  381. package/dist/cli-bundle/chunks/history-SSXGGTVZ.js +20 -0
  382. package/dist/cli-bundle/chunks/{history-compact-WQZQ6KXM.js → history-compact-ID74DOUI.js} +37 -46
  383. package/dist/cli-bundle/chunks/history-compact-ID74DOUI.js.map +7 -0
  384. package/dist/cli-bundle/chunks/{history-compact-SLL6ESXH.js → history-compact-SDFRPZ4V.js} +38 -47
  385. package/dist/cli-bundle/chunks/history-compact-SDFRPZ4V.js.map +1 -0
  386. package/dist/cli-bundle/chunks/history-redact-VBH44Y7F.js +21 -0
  387. package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js → history-redact-Z4P5MM3G.js} +13 -11
  388. package/dist/cli-bundle/chunks/{history-repair-UCYS55ZX.js → history-repair-ANHEYWKF.js} +43 -48
  389. package/dist/cli-bundle/chunks/history-repair-ANHEYWKF.js.map +7 -0
  390. package/dist/cli-bundle/chunks/{history-repair-BJCGM6Q3.js → history-repair-CKE7GLZR.js} +44 -49
  391. package/dist/cli-bundle/chunks/history-repair-CKE7GLZR.js.map +1 -0
  392. package/dist/cli-bundle/chunks/init-7FBQO77A.js +19 -0
  393. package/dist/cli-bundle/chunks/{init-MXV57LKL.js → init-K6MSMB37.js} +11 -9
  394. package/dist/cli-bundle/chunks/{learnings-QKJOKEAO.js → learnings-VIS3NOQV.js} +13 -12
  395. package/dist/cli-bundle/chunks/learnings-VIS3NOQV.js.map +7 -0
  396. package/dist/cli-bundle/chunks/{learnings-L6KTZGOT.js → learnings-YYNB64GN.js} +14 -13
  397. package/dist/cli-bundle/chunks/learnings-YYNB64GN.js.map +1 -0
  398. package/dist/cli-bundle/chunks/list-7UE44A2R.js +29 -0
  399. package/dist/cli-bundle/chunks/list-UHMA3N2K.js +33 -0
  400. package/dist/cli-bundle/chunks/{notes-3NLK7WTZ.js → notes-2HRMV67I.js} +14 -13
  401. package/dist/cli-bundle/chunks/notes-2HRMV67I.js.map +1 -0
  402. package/dist/cli-bundle/chunks/{notes-HMCB7TK6.js → notes-IN3UMA7W.js} +13 -12
  403. package/dist/cli-bundle/chunks/notes-IN3UMA7W.js.map +7 -0
  404. package/dist/cli-bundle/chunks/{plan-DWBYI5C6.js → plan-I3SVH7FV.js} +16 -15
  405. package/dist/cli-bundle/chunks/plan-I3SVH7FV.js.map +1 -0
  406. package/dist/cli-bundle/chunks/{plan-NANUWH4T.js → plan-PAWCCAPW.js} +15 -14
  407. package/dist/cli-bundle/chunks/plan-PAWCCAPW.js.map +7 -0
  408. package/dist/cli-bundle/chunks/{register-list-query-PWQ5F2VI.js → register-list-query-N7Z7RTDM.js} +31 -22
  409. package/dist/cli-bundle/chunks/register-list-query-N7Z7RTDM.js.map +7 -0
  410. package/dist/cli-bundle/chunks/{register-list-query-SMMMLSWW.js → register-list-query-OTIK4DVA.js} +32 -23
  411. package/dist/cli-bundle/chunks/register-list-query-OTIK4DVA.js.map +1 -0
  412. package/dist/cli-bundle/chunks/{register-mutation-QKFPTIZG.js → register-mutation-UFZK6Q57.js} +216 -66
  413. package/dist/cli-bundle/chunks/register-mutation-UFZK6Q57.js.map +7 -0
  414. package/dist/cli-bundle/chunks/{register-mutation-ZYJQ4DVP.js → register-mutation-XFORLS6D.js} +210 -67
  415. package/dist/cli-bundle/chunks/register-mutation-XFORLS6D.js.map +1 -0
  416. package/dist/cli-bundle/chunks/{register-operations-2FMZ6WEF.js → register-operations-6ZCLKRBG.js} +53 -39
  417. package/dist/cli-bundle/chunks/register-operations-6ZCLKRBG.js.map +7 -0
  418. package/dist/cli-bundle/chunks/{register-operations-BAFQURZG.js → register-operations-ITE7JTH3.js} +54 -40
  419. package/dist/cli-bundle/chunks/register-operations-ITE7JTH3.js.map +1 -0
  420. package/dist/cli-bundle/chunks/{register-setup-QN2XV7UL.js → register-setup-7RKGE4BQ.js} +18 -21
  421. package/dist/cli-bundle/chunks/register-setup-7RKGE4BQ.js.map +1 -0
  422. package/dist/cli-bundle/chunks/{register-setup-DQEIKBIP.js → register-setup-7UKEFKT6.js} +17 -20
  423. package/dist/cli-bundle/chunks/register-setup-7UKEFKT6.js.map +7 -0
  424. package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js → restore-NNVPBBVJ.js} +13 -11
  425. package/dist/cli-bundle/chunks/restore-XXXLQ2XC.js +19 -0
  426. package/dist/cli-bundle/chunks/{schema-RNVJ55V2.js → schema-3HCLXCFX.js} +27 -9
  427. package/dist/cli-bundle/chunks/schema-3HCLXCFX.js.map +7 -0
  428. package/dist/cli-bundle/chunks/{schema-ZZ7ZDM2X.js → schema-3YKCQ3VO.js} +28 -10
  429. package/dist/cli-bundle/chunks/schema-3YKCQ3VO.js.map +1 -0
  430. package/dist/cli-bundle/chunks/{search-BJ457C2A.js → search-NQ42NC6A.js} +328 -71
  431. package/dist/cli-bundle/chunks/search-NQ42NC6A.js.map +7 -0
  432. package/dist/cli-bundle/chunks/{search-FQDZXX7P.js → search-V7PZ2ICH.js} +328 -71
  433. package/dist/cli-bundle/chunks/search-V7PZ2ICH.js.map +1 -0
  434. package/dist/cli-bundle/chunks/{stats-DUQWCVOS.js → stats-7KD4PJC5.js} +41 -16
  435. package/dist/cli-bundle/chunks/stats-7KD4PJC5.js.map +7 -0
  436. package/dist/cli-bundle/chunks/{stats-CUG3ZHOI.js → stats-GRHO6RFB.js} +42 -17
  437. package/dist/cli-bundle/chunks/stats-GRHO6RFB.js.map +1 -0
  438. package/dist/cli-bundle/chunks/{telemetry-33MRGX4Z.js → telemetry-H5GLXNG5.js} +6 -6
  439. package/dist/cli-bundle/chunks/telemetry-H5GLXNG5.js.map +7 -0
  440. package/dist/cli-bundle/chunks/{telemetry-RK2VX75A.js → telemetry-TRRYZXWT.js} +7 -7
  441. package/dist/cli-bundle/chunks/telemetry-TRRYZXWT.js.map +1 -0
  442. package/dist/cli-bundle/chunks/test-6CZNIIGA.js +34 -0
  443. package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js → test-7GVQ3VMN.js} +16 -14
  444. package/dist/cli-bundle/chunks/{test-all-ANYQ33O2.js → test-all-3LF2OZD2.js} +23 -16
  445. package/dist/cli-bundle/chunks/test-all-3LF2OZD2.js.map +7 -0
  446. package/dist/cli-bundle/chunks/{test-all-ARSMX33Q.js → test-all-ODVADHV6.js} +24 -17
  447. package/dist/cli-bundle/chunks/test-all-ODVADHV6.js.map +1 -0
  448. package/dist/cli-bundle/chunks/{test-runs-5URSD34O.js → test-runs-LYT6ZTNQ.js} +62 -65
  449. package/dist/cli-bundle/chunks/test-runs-LYT6ZTNQ.js.map +1 -0
  450. package/dist/cli-bundle/chunks/{test-runs-XNACGSNQ.js → test-runs-RVP6VWN7.js} +61 -64
  451. package/dist/cli-bundle/chunks/test-runs-RVP6VWN7.js.map +7 -0
  452. package/dist/cli-bundle/chunks/update-MPGM6SBE.js +28 -0
  453. package/dist/cli-bundle/chunks/update-UN75XW3C.js +24 -0
  454. package/dist/cli-bundle/chunks/{update-many-6B7PJ33I.js → update-many-FCU6RKTO.js} +80 -34
  455. package/dist/cli-bundle/chunks/update-many-FCU6RKTO.js.map +1 -0
  456. package/dist/cli-bundle/chunks/{update-many-724JCVDE.js → update-many-XSEQJ24X.js} +79 -33
  457. package/dist/cli-bundle/chunks/update-many-XSEQJ24X.js.map +7 -0
  458. package/dist/cli-bundle/chunks/{upgrade-ALBEZAI7.js → upgrade-A6TL3INC.js} +22 -8
  459. package/dist/cli-bundle/chunks/upgrade-A6TL3INC.js.map +7 -0
  460. package/dist/cli-bundle/chunks/{upgrade-QHRGDBSA.js → upgrade-FOB5LHO5.js} +23 -9
  461. package/dist/cli-bundle/chunks/upgrade-FOB5LHO5.js.map +1 -0
  462. package/dist/cli-bundle/chunks/{validate-IQRYFXIV.js → validate-7BLDG3AT.js} +221 -30
  463. package/dist/cli-bundle/chunks/validate-7BLDG3AT.js.map +1 -0
  464. package/dist/cli-bundle/chunks/{validate-UY6DRCG5.js → validate-EHL3MI2V.js} +235 -30
  465. package/dist/cli-bundle/chunks/validate-EHL3MI2V.js.map +7 -0
  466. package/dist/cli-bundle/main.js +270 -139
  467. package/dist/cli-bundle/main.js.map +3 -3
  468. package/dist/cli.d.ts +10 -0
  469. package/dist/cli.js +21 -8
  470. package/dist/cli.js.map +1 -1
  471. package/dist/core/diagnostics/remediation.js +7 -2
  472. package/dist/core/diagnostics/remediation.js.map +1 -1
  473. package/dist/core/extensions/extension-policy.js +14 -15
  474. package/dist/core/extensions/extension-policy.js.map +1 -1
  475. package/dist/core/extensions/item-fields.js +4 -5
  476. package/dist/core/extensions/item-fields.js.map +1 -1
  477. package/dist/core/extensions/loader.d.ts +75 -1
  478. package/dist/core/extensions/loader.js +56 -32
  479. package/dist/core/extensions/loader.js.map +1 -1
  480. package/dist/core/governance/content-fields.d.ts +84 -0
  481. package/dist/core/governance/content-fields.js +182 -0
  482. package/dist/core/governance/content-fields.js.map +1 -0
  483. package/dist/core/governance/issue-codes.d.ts +51 -0
  484. package/dist/core/governance/issue-codes.js +95 -0
  485. package/dist/core/governance/issue-codes.js.map +1 -0
  486. package/dist/core/governance/metadata-coverage.d.ts +168 -0
  487. package/dist/core/governance/metadata-coverage.js +362 -0
  488. package/dist/core/governance/metadata-coverage.js.map +1 -0
  489. package/dist/core/history/history-rewrite.d.ts +22 -0
  490. package/dist/core/history/history-rewrite.js +38 -2
  491. package/dist/core/history/history-rewrite.js.map +1 -1
  492. package/dist/core/history/history.d.ts +7 -0
  493. package/dist/core/history/history.js +6 -2
  494. package/dist/core/history/history.js.map +1 -1
  495. package/dist/core/io/body-file.d.ts +14 -0
  496. package/dist/core/io/body-file.js +47 -0
  497. package/dist/core/io/body-file.js.map +1 -0
  498. package/dist/core/item/item-format.d.ts +46 -1
  499. package/dist/core/item/item-format.js +51 -60
  500. package/dist/core/item/item-format.js.map +1 -1
  501. package/dist/core/item/parse.d.ts +9 -0
  502. package/dist/core/item/parse.js +10 -16
  503. package/dist/core/item/parse.js.map +1 -1
  504. package/dist/core/item/type-registry.d.ts +1 -0
  505. package/dist/core/item/type-registry.js +8 -10
  506. package/dist/core/item/type-registry.js.map +1 -1
  507. package/dist/core/lock/lock.d.ts +26 -0
  508. package/dist/core/lock/lock.js +10 -2
  509. package/dist/core/lock/lock.js.map +1 -1
  510. package/dist/core/output/output.d.ts +7 -0
  511. package/dist/core/output/output.js +6 -2
  512. package/dist/core/output/output.js.map +1 -1
  513. package/dist/core/schema/item-types-file.d.ts +25 -2
  514. package/dist/core/schema/item-types-file.js +78 -6
  515. package/dist/core/schema/item-types-file.js.map +1 -1
  516. package/dist/core/schema/runtime-schema.d.ts +7 -0
  517. package/dist/core/schema/runtime-schema.js +23 -16
  518. package/dist/core/schema/runtime-schema.js.map +1 -1
  519. package/dist/core/search/cache.d.ts +19 -1
  520. package/dist/core/search/cache.js +11 -3
  521. package/dist/core/search/cache.js.map +1 -1
  522. package/dist/core/search/corpus.d.ts +36 -2
  523. package/dist/core/search/corpus.js +120 -24
  524. package/dist/core/search/corpus.js.map +1 -1
  525. package/dist/core/search/providers.d.ts +19 -0
  526. package/dist/core/search/providers.js +19 -2
  527. package/dist/core/search/providers.js.map +1 -1
  528. package/dist/core/sentry/instrument.d.ts +1 -0
  529. package/dist/core/sentry/instrument.js +6 -2
  530. package/dist/core/sentry/instrument.js.map +1 -1
  531. package/dist/core/session/session-state.d.ts +16 -0
  532. package/dist/core/session/session-state.js +48 -0
  533. package/dist/core/session/session-state.js.map +1 -0
  534. package/dist/core/shared/constants.d.ts +8 -0
  535. package/dist/core/shared/constants.js +11 -2
  536. package/dist/core/shared/constants.js.map +1 -1
  537. package/dist/core/shared/text-normalization.js +4 -3
  538. package/dist/core/shared/text-normalization.js.map +1 -1
  539. package/dist/core/shared/time.d.ts +13 -0
  540. package/dist/core/shared/time.js +19 -7
  541. package/dist/core/shared/time.js.map +1 -1
  542. package/dist/core/store/item-store.d.ts +11 -0
  543. package/dist/core/store/item-store.js +12 -3
  544. package/dist/core/store/item-store.js.map +1 -1
  545. package/dist/core/store/settings-validator.d.ts +2 -0
  546. package/dist/core/store/settings-validator.js +25 -2
  547. package/dist/core/store/settings-validator.js.map +1 -1
  548. package/dist/core/store/settings.d.ts +60 -1
  549. package/dist/core/store/settings.js +100 -46
  550. package/dist/core/store/settings.js.map +1 -1
  551. package/dist/core/telemetry/observability.js +10 -8
  552. package/dist/core/telemetry/observability.js.map +1 -1
  553. package/dist/core/telemetry/runtime.d.ts +272 -1
  554. package/dist/core/telemetry/runtime.js +358 -37
  555. package/dist/core/telemetry/runtime.js.map +1 -1
  556. package/dist/core/test/background-runs.d.ts +35 -0
  557. package/dist/core/test/background-runs.js +72 -61
  558. package/dist/core/test/background-runs.js.map +1 -1
  559. package/dist/core/test/run-selectors.js +5 -4
  560. package/dist/core/test/run-selectors.js.map +1 -1
  561. package/dist/core/validate/estimate-defaults.d.ts +39 -0
  562. package/dist/core/validate/estimate-defaults.js +117 -0
  563. package/dist/core/validate/estimate-defaults.js.map +1 -0
  564. package/dist/core/validate/fix-planning.d.ts +21 -3
  565. package/dist/core/validate/fix-planning.js +31 -4
  566. package/dist/core/validate/fix-planning.js.map +1 -1
  567. package/dist/core/validate/missing-link-owners.d.ts +64 -0
  568. package/dist/core/validate/missing-link-owners.js +98 -0
  569. package/dist/core/validate/missing-link-owners.js.map +1 -0
  570. package/dist/mcp/server.d.ts +61 -0
  571. package/dist/mcp/server.js +50 -7
  572. package/dist/mcp/server.js.map +1 -1
  573. package/dist/mcp/tool-definitions.js +17 -4
  574. package/dist/mcp/tool-definitions.js.map +1 -1
  575. package/dist/sdk/cli-contracts/commander-types.js +13 -2
  576. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  577. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  578. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  579. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  580. package/dist/sdk/cli-contracts/tool-option-contracts.js +110 -2
  581. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  582. package/dist/sdk/cli-contracts/tool-parameter-tables.js +83 -8
  583. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  584. package/dist/sdk/cli-contracts.d.ts +28 -0
  585. package/dist/sdk/cli-contracts.js +164 -11
  586. package/dist/sdk/cli-contracts.js.map +1 -1
  587. package/dist/types.d.ts +17 -1
  588. package/dist/types.js +3 -3
  589. package/dist/types.js.map +1 -1
  590. package/docs/AGENT_GUIDE.md +15 -3
  591. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  592. package/docs/COMMANDS.md +136 -7
  593. package/docs/CONFIGURATION.md +52 -0
  594. package/docs/TESTING.md +6 -4
  595. package/package.json +6 -4
  596. package/packages/pm-calendar/extensions/calendar/runtime.js +6 -0
  597. package/packages/pm-calendar/extensions/calendar/runtime.ts +12 -0
  598. package/packages/pm-todos/extensions/todos/runtime.ts +5 -0
  599. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  600. package/plugins/pm-claude/README.md +3 -3
  601. package/plugins/pm-claude/commands/pm-init.md +1 -1
  602. package/plugins/pm-codex/README.md +1 -1
  603. package/scripts/bundle-cli.mjs +46 -37
  604. package/scripts/finalize-build.mjs +20 -9
  605. package/scripts/prepare-build-cache.mjs +27 -16
  606. package/dist/cli-bundle/chunks/activity-XIOTGZMU.js +0 -16
  607. package/dist/cli-bundle/chunks/aggregate-IRHJWEKG.js.map +0 -1
  608. package/dist/cli-bundle/chunks/aggregate-XEBW22UQ.js.map +0 -7
  609. package/dist/cli-bundle/chunks/append-NL67JNJU.js.map +0 -1
  610. package/dist/cli-bundle/chunks/chunk-2ANTZBYF.js.map +0 -1
  611. package/dist/cli-bundle/chunks/chunk-2J2AH4V5.js.map +0 -1
  612. package/dist/cli-bundle/chunks/chunk-32XSW44C.js.map +0 -1
  613. package/dist/cli-bundle/chunks/chunk-36BCSMKP.js.map +0 -7
  614. package/dist/cli-bundle/chunks/chunk-3VULHQNS.js.map +0 -1
  615. package/dist/cli-bundle/chunks/chunk-4FHLNNW7.js.map +0 -7
  616. package/dist/cli-bundle/chunks/chunk-4JHJ7YG2.js.map +0 -7
  617. package/dist/cli-bundle/chunks/chunk-4TPFXE2R.js.map +0 -1
  618. package/dist/cli-bundle/chunks/chunk-4ZKKZMLH.js.map +0 -1
  619. package/dist/cli-bundle/chunks/chunk-5HSAHRYA.js.map +0 -7
  620. package/dist/cli-bundle/chunks/chunk-6TBR5AZ2.js.map +0 -7
  621. package/dist/cli-bundle/chunks/chunk-7CRFV6JR.js.map +0 -7
  622. package/dist/cli-bundle/chunks/chunk-7SM7VA5I.js.map +0 -7
  623. package/dist/cli-bundle/chunks/chunk-AAUYXSFF.js.map +0 -7
  624. package/dist/cli-bundle/chunks/chunk-AGG32LKL.js.map +0 -1
  625. package/dist/cli-bundle/chunks/chunk-AUDDXKNX.js.map +0 -1
  626. package/dist/cli-bundle/chunks/chunk-BVL5KGVA.js.map +0 -1
  627. package/dist/cli-bundle/chunks/chunk-C24PWDFG.js +0 -138
  628. package/dist/cli-bundle/chunks/chunk-C24PWDFG.js.map +0 -7
  629. package/dist/cli-bundle/chunks/chunk-HZOX5BYD.js.map +0 -7
  630. package/dist/cli-bundle/chunks/chunk-IXVSSHGV.js.map +0 -7
  631. package/dist/cli-bundle/chunks/chunk-IZHCCG4S.js.map +0 -1
  632. package/dist/cli-bundle/chunks/chunk-JW7D6437.js.map +0 -1
  633. package/dist/cli-bundle/chunks/chunk-JWXTOYBI.js.map +0 -7
  634. package/dist/cli-bundle/chunks/chunk-KHGTYCJ6.js.map +0 -1
  635. package/dist/cli-bundle/chunks/chunk-L6YQONLM.js.map +0 -1
  636. package/dist/cli-bundle/chunks/chunk-LFW5NQUP.js.map +0 -7
  637. package/dist/cli-bundle/chunks/chunk-LYNQ3NGI.js.map +0 -1
  638. package/dist/cli-bundle/chunks/chunk-M3SI2REU.js.map +0 -7
  639. package/dist/cli-bundle/chunks/chunk-MACCNKSZ.js.map +0 -7
  640. package/dist/cli-bundle/chunks/chunk-MGAQ6KZG.js.map +0 -7
  641. package/dist/cli-bundle/chunks/chunk-PEH7SZD2.js.map +0 -7
  642. package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +0 -1
  643. package/dist/cli-bundle/chunks/chunk-QQG4HEX7.js.map +0 -1
  644. package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +0 -7
  645. package/dist/cli-bundle/chunks/chunk-RHYBR6G7.js.map +0 -1
  646. package/dist/cli-bundle/chunks/chunk-S2CDTRJ6.js.map +0 -1
  647. package/dist/cli-bundle/chunks/chunk-SGMGMCIF.js.map +0 -1
  648. package/dist/cli-bundle/chunks/chunk-SOHXUA2Q.js.map +0 -1
  649. package/dist/cli-bundle/chunks/chunk-SQDKAEKG.js.map +0 -7
  650. package/dist/cli-bundle/chunks/chunk-TOX7YQ7X.js.map +0 -1
  651. package/dist/cli-bundle/chunks/chunk-TSXWFN3L.js.map +0 -1
  652. package/dist/cli-bundle/chunks/chunk-UCVJP4JL.js.map +0 -7
  653. package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js +0 -128
  654. package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js.map +0 -1
  655. package/dist/cli-bundle/chunks/chunk-VNC2HBL4.js.map +0 -1
  656. package/dist/cli-bundle/chunks/chunk-W6KNFAMZ.js.map +0 -7
  657. package/dist/cli-bundle/chunks/chunk-WLH7X4RN.js.map +0 -7
  658. package/dist/cli-bundle/chunks/chunk-XXLMJDUB.js.map +0 -7
  659. package/dist/cli-bundle/chunks/close-WOG5WTMZ.js +0 -13
  660. package/dist/cli-bundle/chunks/close-many-GKAJX54X.js.map +0 -1
  661. package/dist/cli-bundle/chunks/close-many-GL6NRUU5.js.map +0 -7
  662. package/dist/cli-bundle/chunks/comments-5FPT6L7N.js.map +0 -1
  663. package/dist/cli-bundle/chunks/comments-TOLOYWNI.js.map +0 -7
  664. package/dist/cli-bundle/chunks/config-4MN45TIH.js.map +0 -1
  665. package/dist/cli-bundle/chunks/config-7N6D7YJE.js.map +0 -7
  666. package/dist/cli-bundle/chunks/context-AQSLE7DZ.js.map +0 -1
  667. package/dist/cli-bundle/chunks/context-U3PUJMVN.js.map +0 -7
  668. package/dist/cli-bundle/chunks/contracts-H7KCQXLY.js.map +0 -7
  669. package/dist/cli-bundle/chunks/contracts-ITSJXO3O.js.map +0 -1
  670. package/dist/cli-bundle/chunks/create-NW3K7LVG.js +0 -27
  671. package/dist/cli-bundle/chunks/deps-HV2C2L46.js.map +0 -1
  672. package/dist/cli-bundle/chunks/files-LIFDKNCN.js.map +0 -7
  673. package/dist/cli-bundle/chunks/files-OIFN3DQX.js.map +0 -1
  674. package/dist/cli-bundle/chunks/get-K7UULTQF.js.map +0 -7
  675. package/dist/cli-bundle/chunks/get-SAB7CRBG.js.map +0 -1
  676. package/dist/cli-bundle/chunks/health-NUVZYIEV.js.map +0 -1
  677. package/dist/cli-bundle/chunks/health-VJWH3ZFK.js.map +0 -7
  678. package/dist/cli-bundle/chunks/history-IUVN4NTN.js +0 -20
  679. package/dist/cli-bundle/chunks/history-compact-SLL6ESXH.js.map +0 -1
  680. package/dist/cli-bundle/chunks/history-compact-WQZQ6KXM.js.map +0 -7
  681. package/dist/cli-bundle/chunks/history-redact-75KIIJUJ.js +0 -19
  682. package/dist/cli-bundle/chunks/history-repair-BJCGM6Q3.js.map +0 -1
  683. package/dist/cli-bundle/chunks/history-repair-UCYS55ZX.js.map +0 -7
  684. package/dist/cli-bundle/chunks/init-JJFYRUKG.js +0 -17
  685. package/dist/cli-bundle/chunks/learnings-L6KTZGOT.js.map +0 -1
  686. package/dist/cli-bundle/chunks/learnings-QKJOKEAO.js.map +0 -7
  687. package/dist/cli-bundle/chunks/list-GGVPXEV6.js +0 -23
  688. package/dist/cli-bundle/chunks/list-VOQDQHA4.js +0 -19
  689. package/dist/cli-bundle/chunks/notes-3NLK7WTZ.js.map +0 -1
  690. package/dist/cli-bundle/chunks/notes-HMCB7TK6.js.map +0 -7
  691. package/dist/cli-bundle/chunks/plan-DWBYI5C6.js.map +0 -1
  692. package/dist/cli-bundle/chunks/plan-NANUWH4T.js.map +0 -7
  693. package/dist/cli-bundle/chunks/register-list-query-PWQ5F2VI.js.map +0 -7
  694. package/dist/cli-bundle/chunks/register-list-query-SMMMLSWW.js.map +0 -1
  695. package/dist/cli-bundle/chunks/register-mutation-QKFPTIZG.js.map +0 -7
  696. package/dist/cli-bundle/chunks/register-mutation-ZYJQ4DVP.js.map +0 -1
  697. package/dist/cli-bundle/chunks/register-operations-2FMZ6WEF.js.map +0 -7
  698. package/dist/cli-bundle/chunks/register-operations-BAFQURZG.js.map +0 -1
  699. package/dist/cli-bundle/chunks/register-setup-DQEIKBIP.js.map +0 -7
  700. package/dist/cli-bundle/chunks/register-setup-QN2XV7UL.js.map +0 -1
  701. package/dist/cli-bundle/chunks/restore-DRBNXJJH.js +0 -17
  702. package/dist/cli-bundle/chunks/schema-RNVJ55V2.js.map +0 -7
  703. package/dist/cli-bundle/chunks/schema-ZZ7ZDM2X.js.map +0 -1
  704. package/dist/cli-bundle/chunks/search-BJ457C2A.js.map +0 -7
  705. package/dist/cli-bundle/chunks/search-FQDZXX7P.js.map +0 -1
  706. package/dist/cli-bundle/chunks/stats-CUG3ZHOI.js.map +0 -1
  707. package/dist/cli-bundle/chunks/stats-DUQWCVOS.js.map +0 -7
  708. package/dist/cli-bundle/chunks/telemetry-33MRGX4Z.js.map +0 -7
  709. package/dist/cli-bundle/chunks/telemetry-RK2VX75A.js.map +0 -1
  710. package/dist/cli-bundle/chunks/test-SDMYEQHH.js +0 -32
  711. package/dist/cli-bundle/chunks/test-all-ANYQ33O2.js.map +0 -7
  712. package/dist/cli-bundle/chunks/test-all-ARSMX33Q.js.map +0 -1
  713. package/dist/cli-bundle/chunks/test-runs-5URSD34O.js.map +0 -1
  714. package/dist/cli-bundle/chunks/test-runs-XNACGSNQ.js.map +0 -7
  715. package/dist/cli-bundle/chunks/update-PD46VOXI.js +0 -21
  716. package/dist/cli-bundle/chunks/update-U235A7WP.js +0 -25
  717. package/dist/cli-bundle/chunks/update-many-6B7PJ33I.js.map +0 -1
  718. package/dist/cli-bundle/chunks/update-many-724JCVDE.js.map +0 -7
  719. package/dist/cli-bundle/chunks/upgrade-ALBEZAI7.js.map +0 -7
  720. package/dist/cli-bundle/chunks/upgrade-QHRGDBSA.js.map +0 -1
  721. package/dist/cli-bundle/chunks/validate-IQRYFXIV.js.map +0 -1
  722. package/dist/cli-bundle/chunks/validate-UY6DRCG5.js.map +0 -7
  723. /package/dist/cli-bundle/chunks/{activity-XIOTGZMU.js.map → activity-5P2KQCTH.js.map} +0 -0
  724. /package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js.map → activity-MJGTX4LO.js.map} +0 -0
  725. /package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js.map → chunk-2JEGCDYT.js.map} +0 -0
  726. /package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js.map → chunk-3WAULYOY.js.map} +0 -0
  727. /package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js.map → chunk-7AGIXLNK.js.map} +0 -0
  728. /package/dist/cli-bundle/chunks/{chunk-RFR2YQGO.js.map → chunk-AERT7KT3.js.map} +0 -0
  729. /package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js.map → chunk-E6J2PEK6.js.map} +0 -0
  730. /package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js.map → chunk-F2GC6L3N.js.map} +0 -0
  731. /package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js.map → chunk-M23HXJL3.js.map} +0 -0
  732. /package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js.map → chunk-MJZUZ2QE.js.map} +0 -0
  733. /package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js.map → chunk-O46LTCXQ.js.map} +0 -0
  734. /package/dist/cli-bundle/chunks/{chunk-HLEGAQXT.js.map → chunk-OLTYNVJR.js.map} +0 -0
  735. /package/dist/cli-bundle/chunks/{chunk-HWHONML5.js.map → chunk-T5VU7ROQ.js.map} +0 -0
  736. /package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js.map → chunk-UBMCSJXX.js.map} +0 -0
  737. /package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js.map → chunk-UUKORJSN.js.map} +0 -0
  738. /package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js.map → chunk-WZCQVABQ.js.map} +0 -0
  739. /package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js.map → chunk-YGRPBFMA.js.map} +0 -0
  740. /package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js.map → chunk-ZJRDVYZI.js.map} +0 -0
  741. /package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js.map → claim-4APLUXJW.js.map} +0 -0
  742. /package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js.map → claim-NEO7AGWH.js.map} +0 -0
  743. /package/dist/cli-bundle/chunks/{close-SPUFW5QR.js.map → close-3QABBNGU.js.map} +0 -0
  744. /package/dist/cli-bundle/chunks/{close-WOG5WTMZ.js.map → close-ILMZR3D7.js.map} +0 -0
  745. /package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js.map → copy-Q64T5FD4.js.map} +0 -0
  746. /package/dist/cli-bundle/chunks/{copy-C4W522JM.js.map → copy-SG34LCMU.js.map} +0 -0
  747. /package/dist/cli-bundle/chunks/{create-NW3K7LVG.js.map → create-F5HZX2S4.js.map} +0 -0
  748. /package/dist/cli-bundle/chunks/{create-4EQNELMY.js.map → create-IPAX2SNL.js.map} +0 -0
  749. /package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js.map → delete-TLXR7LJ2.js.map} +0 -0
  750. /package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js.map → delete-VH3L7DZ6.js.map} +0 -0
  751. /package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js.map → docs-GWDEB7JH.js.map} +0 -0
  752. /package/dist/cli-bundle/chunks/{docs-RJQPLROO.js.map → docs-RCLNSKID.js.map} +0 -0
  753. /package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js.map → extension-5RN65LHT.js.map} +0 -0
  754. /package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js.map → extension-7KO2NX2A.js.map} +0 -0
  755. /package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js.map → gc-2FGKYRJ4.js.map} +0 -0
  756. /package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js.map → gc-5B6ABL3Z.js.map} +0 -0
  757. /package/dist/cli-bundle/chunks/{history-GYFD2DJW.js.map → history-QO4JVJJP.js.map} +0 -0
  758. /package/dist/cli-bundle/chunks/{history-IUVN4NTN.js.map → history-SSXGGTVZ.js.map} +0 -0
  759. /package/dist/cli-bundle/chunks/{history-redact-75KIIJUJ.js.map → history-redact-VBH44Y7F.js.map} +0 -0
  760. /package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js.map → history-redact-Z4P5MM3G.js.map} +0 -0
  761. /package/dist/cli-bundle/chunks/{init-JJFYRUKG.js.map → init-7FBQO77A.js.map} +0 -0
  762. /package/dist/cli-bundle/chunks/{init-MXV57LKL.js.map → init-K6MSMB37.js.map} +0 -0
  763. /package/dist/cli-bundle/chunks/{list-VOQDQHA4.js.map → list-7UE44A2R.js.map} +0 -0
  764. /package/dist/cli-bundle/chunks/{list-GGVPXEV6.js.map → list-UHMA3N2K.js.map} +0 -0
  765. /package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js.map → restore-NNVPBBVJ.js.map} +0 -0
  766. /package/dist/cli-bundle/chunks/{restore-DRBNXJJH.js.map → restore-XXXLQ2XC.js.map} +0 -0
  767. /package/dist/cli-bundle/chunks/{test-SDMYEQHH.js.map → test-6CZNIIGA.js.map} +0 -0
  768. /package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js.map → test-7GVQ3VMN.js.map} +0 -0
  769. /package/dist/cli-bundle/chunks/{update-U235A7WP.js.map → update-MPGM6SBE.js.map} +0 -0
  770. /package/dist/cli-bundle/chunks/{update-PD46VOXI.js.map → update-UN75XW3C.js.map} +0 -0
@@ -0,0 +1,48 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="03cd6a4a-8104-5155-b1ad-edbd6dc7b8dc")}catch(e){}}();
3
+ import { promises as fs } from "node:fs";
4
+ import path from "node:path";
5
+ import { writeFileAtomic } from "../fs/fs-utils.js";
6
+ import { getRuntimePath } from "../store/paths.js";
7
+ const SESSION_FILENAME = "session.json";
8
+ export function getSessionStatePath(pmRoot) {
9
+ return path.join(getRuntimePath(pmRoot), SESSION_FILENAME);
10
+ }
11
+ export async function readSessionState(pmRoot) {
12
+ try {
13
+ const raw = await fs.readFile(getSessionStatePath(pmRoot), "utf8");
14
+ const parsed = JSON.parse(raw);
15
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
16
+ return {};
17
+ }
18
+ const focused = parsed.focused_item;
19
+ if (typeof focused === "string" && focused.trim().length > 0) {
20
+ return { focused_item: focused };
21
+ }
22
+ return {};
23
+ }
24
+ catch {
25
+ return {};
26
+ }
27
+ }
28
+ async function writeSessionState(pmRoot, state) {
29
+ const target = getSessionStatePath(pmRoot);
30
+ await fs.mkdir(path.dirname(target), { recursive: true });
31
+ await writeFileAtomic(target, JSON.stringify(state));
32
+ }
33
+ export async function getFocusedItem(pmRoot) {
34
+ const state = await readSessionState(pmRoot);
35
+ return state.focused_item;
36
+ }
37
+ export async function setFocusedItem(pmRoot, id) {
38
+ const state = await readSessionState(pmRoot);
39
+ await writeSessionState(pmRoot, { ...state, focused_item: id });
40
+ }
41
+ export async function clearFocusedItem(pmRoot) {
42
+ const state = await readSessionState(pmRoot);
43
+ const next = { ...state };
44
+ delete next.focused_item;
45
+ await writeSessionState(pmRoot, next);
46
+ }
47
+ //# sourceMappingURL=session-state.js.map
48
+ //# debugId=03cd6a4a-8104-5155-b1ad-edbd6dc7b8dc
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-state.js","sources":["core/session/session-state.ts"],"sourceRoot":"/","sourcesContent":["import { promises as fs } from \"node:fs\";\nimport path from \"node:path\";\n\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { getRuntimePath } from \"../store/paths.js\";\n\n/**\n * Session-local, gitignored state stored under `.agents/pm/runtime/session.json`.\n *\n * This is intentionally NOT the git-tracked settings.json: it holds ephemeral\n * per-checkout context (currently the \"focused\" parent item used as a default\n * --parent for `pm create`). Missing or corrupt state is treated as empty so a\n * stale or hand-edited file never blocks a command.\n */\nexport interface SessionState {\n focused_item?: string;\n}\n\nconst SESSION_FILENAME = \"session.json\";\n\nexport function getSessionStatePath(pmRoot: string): string {\n return path.join(getRuntimePath(pmRoot), SESSION_FILENAME);\n}\n\nexport async function readSessionState(pmRoot: string): Promise<SessionState> {\n try {\n const raw = await fs.readFile(getSessionStatePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n if (parsed === null || typeof parsed !== \"object\" || Array.isArray(parsed)) {\n return {};\n }\n const focused = (parsed as Record<string, unknown>).focused_item;\n if (typeof focused === \"string\" && focused.trim().length > 0) {\n return { focused_item: focused };\n }\n return {};\n } catch {\n return {};\n }\n}\n\nasync function writeSessionState(pmRoot: string, state: SessionState): Promise<void> {\n const target = getSessionStatePath(pmRoot);\n await fs.mkdir(path.dirname(target), { recursive: true });\n await writeFileAtomic(target, JSON.stringify(state));\n}\n\nexport async function getFocusedItem(pmRoot: string): Promise<string | undefined> {\n const state = await readSessionState(pmRoot);\n return state.focused_item;\n}\n\nexport async function setFocusedItem(pmRoot: string, id: string): Promise<void> {\n const state = await readSessionState(pmRoot);\n await writeSessionState(pmRoot, { ...state, focused_item: id });\n}\n\nexport async function clearFocusedItem(pmRoot: string): Promise<void> {\n const state = await readSessionState(pmRoot);\n const next: SessionState = { ...state };\n delete next.focused_item;\n await writeSessionState(pmRoot, next);\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAcnD,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAExC,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAc;IACnD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QACnE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC;QAC1C,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3E,OAAO,EAAE,CAAC;QACZ,CAAC;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AAC;IACzB,MAAM,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC","debugId":"03cd6a4a-8104-5155-b1ad-edbd6dc7b8dc"}
@@ -10,6 +10,14 @@ export declare const DEFAULT_STATUS_DEFINITIONS: ReadonlyArray<RuntimeStatusDefi
10
10
  export declare const DEFAULT_WORKFLOW_DEFINITION: RuntimeWorkflowDefinition;
11
11
  export declare const PM_DIRNAME = ".agents/pm";
12
12
  export declare const SETTINGS_FILENAME = "settings.json";
13
+ /**
14
+ * GH-249: placeholder close reason recorded when `pm create --status closed`
15
+ * lands an item directly in the close status under
16
+ * `governance.require_close_reason` and no --message/--resolution text is
17
+ * available. Mirrors `pm update --status closed`'s "Closed via pm update"
18
+ * default so all three closure paths record a reason.
19
+ */
20
+ export declare const CREATE_DIRECT_CLOSE_REASON_DEFAULT = "Closed at creation via pm create";
13
21
  export declare const PM_CORE_REQUIRED_SUBDIRS: readonly ["", "epics", "features", "tasks", "chores", "issues", "schema", "history", "search", "extensions", "locks"];
14
22
  export declare const PM_OPTIONAL_TYPE_SUBDIRS: readonly ["decisions", "events", "reminders", "milestones", "meetings", "plans"];
15
23
  export declare const PM_REQUIRED_SUBDIRS: readonly ["", "epics", "features", "tasks", "chores", "issues", "schema", "history", "search", "extensions", "locks", "decisions", "events", "reminders", "milestones", "meetings", "plans"];
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aaaabb17-ee0f-5c5d-8111-3406542035c3")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="de6d8b9a-3684-54cd-81b1-2b94e87908c9")}catch(e){}}();
3
3
  import { createDefaultExtensionGovernancePolicy } from "../extensions/extension-types.js";
4
4
  /**
5
5
  * Canonical default lifecycle status model and workflow role mapping.
@@ -46,6 +46,14 @@ export const DEFAULT_WORKFLOW_DEFINITION = Object.freeze({
46
46
  });
47
47
  export const PM_DIRNAME = ".agents/pm";
48
48
  export const SETTINGS_FILENAME = "settings.json";
49
+ /**
50
+ * GH-249: placeholder close reason recorded when `pm create --status closed`
51
+ * lands an item directly in the close status under
52
+ * `governance.require_close_reason` and no --message/--resolution text is
53
+ * available. Mirrors `pm update --status closed`'s "Closed via pm update"
54
+ * default so all three closure paths record a reason.
55
+ */
56
+ export const CREATE_DIRECT_CLOSE_REASON_DEFAULT = "Closed at creation via pm create";
49
57
  export const PM_CORE_REQUIRED_SUBDIRS = [
50
58
  "",
51
59
  "epics",
@@ -222,6 +230,7 @@ export const SETTINGS_DEFAULTS = {
222
230
  lifecycle_closure_like_actual_result_patterns: [
223
231
  ...DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.actual_result,
224
232
  ],
233
+ estimate_defaults_by_type: {},
225
234
  },
226
235
  governance: {
227
236
  preset: "minimal",
@@ -391,4 +400,4 @@ export function resolveTelemetryErrorCategory(errorCode) {
391
400
  return "unknown";
392
401
  }
393
402
  //# sourceMappingURL=constants.js.map
394
- //# debugId=aaaabb17-ee0f-5c5d-8111-3406542035c3
403
+ //# debugId=de6d8b9a-3684-54cd-81b1-2b94e87908c9
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["core/shared/constants.ts"],"sourceRoot":"/","sourcesContent":["import type {\n BuiltinItemType,\n GovernancePreset,\n GovernanceSettings,\n ItemFrontMatter,\n PmSettings,\n RuntimeStatusDefinition,\n RuntimeWorkflowDefinition,\n} from \"../../types/index.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../extensions/extension-types.js\";\n\n/**\n * Canonical default lifecycle status model and workflow role mapping.\n *\n * Single source of truth: `SETTINGS_DEFAULTS.schema` references these, and\n * `src/core/schema/runtime-schema.ts` re-exports them as\n * `DEFAULT_RUNTIME_STATUS_DEFINITIONS` / `DEFAULT_RUNTIME_WORKFLOW`.\n */\nexport const DEFAULT_STATUS_DEFINITIONS: ReadonlyArray<RuntimeStatusDefinition> = Object.freeze([\n {\n id: \"draft\",\n roles: [\"draft\"],\n },\n {\n id: \"open\",\n roles: [\"active\", \"default_open\"],\n },\n {\n id: \"in_progress\",\n aliases: [\"in-progress\"],\n roles: [\"active\"],\n },\n {\n id: \"blocked\",\n roles: [\"blocked\"],\n },\n {\n id: \"closed\",\n roles: [\"terminal\", \"terminal_done\", \"default_close\"],\n },\n {\n id: \"canceled\",\n aliases: [\"cancelled\"],\n roles: [\"terminal\", \"terminal_canceled\", \"default_cancel\"],\n },\n]);\n\nexport const DEFAULT_WORKFLOW_DEFINITION: RuntimeWorkflowDefinition = Object.freeze({\n draft_status: \"draft\",\n open_status: \"open\",\n in_progress_status: \"in_progress\",\n blocked_status: \"blocked\",\n close_status: \"closed\",\n canceled_status: \"canceled\",\n});\n\nexport const PM_DIRNAME = \".agents/pm\";\nexport const SETTINGS_FILENAME = \"settings.json\";\n\nexport const PM_CORE_REQUIRED_SUBDIRS = [\n \"\",\n \"epics\",\n \"features\",\n \"tasks\",\n \"chores\",\n \"issues\",\n \"schema\",\n \"history\",\n \"search\",\n \"extensions\",\n \"locks\",\n] as const;\n\nexport const PM_OPTIONAL_TYPE_SUBDIRS = [\n \"decisions\",\n \"events\",\n \"reminders\",\n \"milestones\",\n \"meetings\",\n \"plans\",\n] as const;\n\nexport const PM_REQUIRED_SUBDIRS = [...PM_CORE_REQUIRED_SUBDIRS, ...PM_OPTIONAL_TYPE_SUBDIRS] as const;\n\nexport const TYPE_TO_FOLDER: Record<BuiltinItemType, string> = {\n Epic: \"epics\",\n Feature: \"features\",\n Task: \"tasks\",\n Chore: \"chores\",\n Issue: \"issues\",\n Decision: \"decisions\",\n Event: \"events\",\n Reminder: \"reminders\",\n Milestone: \"milestones\",\n Meeting: \"meetings\",\n Plan: \"plans\",\n};\n\nexport const FRONT_MATTER_KEY_ORDER: ReadonlyArray<string> = [\n \"id\",\n \"title\",\n \"description\",\n \"type\",\n \"source_type\",\n \"type_options\",\n \"status\",\n \"priority\",\n \"tags\",\n \"created_at\",\n \"updated_at\",\n \"deadline\",\n \"reminders\",\n \"events\",\n \"closed_at\",\n \"assignee\",\n \"source_owner\",\n \"author\",\n \"estimated_minutes\",\n \"acceptance_criteria\",\n \"design\",\n \"external_ref\",\n \"definition_of_ready\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"why_now\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blocked_by\",\n \"blocked_reason\",\n \"unblock_note\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"repro_steps\",\n \"resolution\",\n \"expected_result\",\n \"actual_result\",\n \"affected_version\",\n \"fixed_version\",\n \"component\",\n \"regression\",\n \"customer_impact\",\n \"dependencies\",\n \"comments\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"tests\",\n \"test_runs\",\n \"docs\",\n \"close_reason\",\n \"duplicate_of\",\n \"plan_mode\",\n \"plan_scope\",\n \"plan_harness\",\n \"plan_resume_context\",\n \"plan_validation\",\n \"plan_decisions\",\n \"plan_discoveries\",\n \"plan_steps\",\n];\n\ntype BuiltinGovernancePreset = Exclude<GovernancePreset, \"custom\">;\n\nexport const GOVERNANCE_PRESET_DEFAULTS: Record<BuiltinGovernancePreset, Omit<GovernanceSettings, \"preset\">> = {\n minimal: {\n ownership_enforcement: \"none\",\n create_mode_default: \"progressive\",\n close_validation_default: \"off\",\n require_close_reason: true,\n parent_reference: \"strict_error\",\n metadata_profile: \"core\",\n force_required_for_stale_lock: false,\n },\n default: {\n ownership_enforcement: \"warn\",\n create_mode_default: \"progressive\",\n close_validation_default: \"warn\",\n require_close_reason: true,\n parent_reference: \"strict_error\",\n metadata_profile: \"core\",\n force_required_for_stale_lock: true,\n },\n strict: {\n ownership_enforcement: \"strict\",\n create_mode_default: \"strict\",\n close_validation_default: \"strict\",\n require_close_reason: true,\n parent_reference: \"strict_error\",\n metadata_profile: \"strict\",\n force_required_for_stale_lock: true,\n },\n};\n\nexport const DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS = [\n \"no active blocker\",\n \"ready for planned execution sequencing\",\n \"work completed\",\n \"work is closed\",\n] as const;\n\nexport const DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS = {\n blocked_reason: [\"no active blocker because work is closed\", \"work is closed\"],\n resolution: [\"closed with implementation evidence\", \"closed with verification evidence\", \"work completed and recorded\", \"work is closed\"],\n actual_result: [\"closed and recorded\", \"work completed\", \"work completed and recorded\"],\n} as const;\n\nfunction cloneOptionalArray<T>(values: readonly T[] | undefined): T[] | undefined {\n return values ? [...values] : undefined;\n}\n\nexport const SETTINGS_DEFAULTS: PmSettings = {\n version: 1,\n id_prefix: \"pm-\",\n author_default: \"\",\n item_format: \"toon\",\n locks: {\n ttl_seconds: 1800,\n },\n output: {\n default_format: \"toon\",\n },\n history: {\n missing_stream: \"auto_create\",\n },\n validation: {\n sprint_release_format: \"warn\",\n parent_reference: \"warn\",\n metadata_profile: \"core\",\n metadata_required_fields: [],\n lifecycle_stale_blocker_reason_patterns: [...DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS],\n lifecycle_closure_like_blocked_reason_patterns: [\n ...DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.blocked_reason,\n ],\n lifecycle_closure_like_resolution_patterns: [...DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.resolution],\n lifecycle_closure_like_actual_result_patterns: [\n ...DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.actual_result,\n ],\n },\n governance: {\n preset: \"minimal\",\n ...GOVERNANCE_PRESET_DEFAULTS.minimal,\n },\n workflow: {\n definition_of_done: [],\n },\n testing: {\n record_results_to_items: false,\n },\n telemetry: {\n enabled: true,\n first_run_prompt_completed: false,\n capture_level: \"redacted\",\n endpoint: \"https://pm-cli.unbrained.dev/v1/events\",\n installation_id: \"\",\n retention_days: 365,\n },\n agent_guidance: {\n prompt_completed: false,\n declined: false,\n declined_at: \"\",\n template_version: 1,\n last_checked_files: [],\n },\n item_types: {\n definitions: [],\n },\n schema: {\n version: 1,\n files: {\n types: \"schema/types.json\",\n statuses: \"schema/statuses.json\",\n fields: \"schema/fields.json\",\n workflows: \"schema/workflows.json\",\n },\n statuses: DEFAULT_STATUS_DEFINITIONS.map((definition) => ({\n ...definition,\n aliases: cloneOptionalArray(definition.aliases),\n roles: cloneOptionalArray(definition.roles),\n })),\n fields: [],\n workflow: { ...DEFAULT_WORKFLOW_DEFINITION },\n unknown_field_policy: \"allow\",\n },\n extensions: {\n enabled: [],\n disabled: [],\n policy: createDefaultExtensionGovernancePolicy(),\n },\n search: {\n score_threshold: 0,\n hybrid_semantic_weight: 0.7,\n max_results: 50,\n embedding_model: \"\",\n embedding_batch_size: 32,\n embedding_timeout_ms: 30_000,\n scanner_max_batch_retries: 3,\n provider: \"\",\n mutation_refresh_policy: \"semantic_configured\",\n query_expansion: {\n enabled: false,\n provider: \"\",\n },\n rerank: {\n enabled: false,\n model: \"\",\n top_k: 20,\n },\n },\n providers: {\n openai: {\n base_url: \"\",\n api_key: \"\",\n model: \"\",\n },\n ollama: {\n base_url: \"\",\n model: \"\",\n },\n },\n context: {\n default_depth: \"brief\",\n activity_limit: 10,\n stale_threshold_days: 7,\n sections: {\n hierarchy: true,\n activity: true,\n progress: true,\n recently_created: true,\n unparented: true,\n blockers: true,\n files: true,\n workload: true,\n staleness: true,\n tests: true,\n },\n },\n vector_store: {\n adapter: \"\",\n collection_name: \"pm_items\",\n qdrant: {\n url: \"\",\n api_key: \"\",\n },\n lancedb: {\n path: \"\",\n },\n },\n};\n\nexport const EMPTY_CANONICAL_DOCUMENT = {\n metadata: {},\n body: \"\",\n};\n\nexport const EXIT_CODE = {\n SUCCESS: 0,\n GENERIC_FAILURE: 1,\n USAGE: 2,\n NOT_FOUND: 3,\n CONFLICT: 4,\n DEPENDENCY_FAILED: 5,\n} as const;\n\nexport type TelemetryErrorCategory = \"usage\" | \"validation\" | \"conflict\" | \"runtime\" | \"unknown\";\n\nexport const TELEMETRY_ERROR_CATEGORY_BY_CODE: Readonly<Record<string, TelemetryErrorCategory>> = Object.freeze({\n unknown_command: \"usage\",\n unknown_option: \"usage\",\n missing_required_option: \"usage\",\n missing_required_argument: \"usage\",\n invalid_command_usage: \"usage\",\n linked_test_value_not_quoted: \"usage\",\n invalid_argument_value: \"validation\",\n health_findings: \"validation\",\n validation_findings: \"validation\",\n close_through_update: \"validation\",\n no_update_fields: \"validation\",\n unsupported_update_option: \"validation\",\n tracker_not_initialized: \"validation\",\n item_not_found: \"validation\",\n ownership_conflict: \"conflict\",\n lock_conflict: \"conflict\",\n terminal_state_conflict: \"conflict\",\n dependency_failed: \"runtime\",\n command_failed: \"runtime\",\n unknown_error: \"runtime\",\n});\n\nexport function resolveTelemetryErrorCategory(errorCode: string | undefined): TelemetryErrorCategory {\n const normalized = (errorCode ?? \"\").trim().toLowerCase();\n if (normalized.length === 0) {\n return \"unknown\";\n }\n const explicit = TELEMETRY_ERROR_CATEGORY_BY_CODE[normalized];\n if (typeof explicit === \"string\") {\n return explicit;\n }\n if (normalized.includes(\"conflict\") || normalized.includes(\"locked\")) {\n return \"conflict\";\n }\n if (normalized.startsWith(\"unknown_\") || normalized.startsWith(\"missing_required_\")) {\n return \"usage\";\n }\n if (normalized.startsWith(\"invalid_\") || normalized.endsWith(\"_not_found\") || normalized.includes(\"validation\")) {\n return \"validation\";\n }\n if (normalized.endsWith(\"_error\") || normalized.endsWith(\"_failed\")) {\n return \"runtime\";\n }\n return \"unknown\";\n}\n"],"names":[],"mappings":";;AASA,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"aaaabb17-ee0f-5c5d-8111-3406542035c3"}
1
+ {"version":3,"file":"constants.js","sources":["core/shared/constants.ts"],"sourceRoot":"/","sourcesContent":["import type {\n BuiltinItemType,\n GovernancePreset,\n GovernanceSettings,\n ItemFrontMatter,\n PmSettings,\n RuntimeStatusDefinition,\n RuntimeWorkflowDefinition,\n} from \"../../types/index.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../extensions/extension-types.js\";\n\n/**\n * Canonical default lifecycle status model and workflow role mapping.\n *\n * Single source of truth: `SETTINGS_DEFAULTS.schema` references these, and\n * `src/core/schema/runtime-schema.ts` re-exports them as\n * `DEFAULT_RUNTIME_STATUS_DEFINITIONS` / `DEFAULT_RUNTIME_WORKFLOW`.\n */\nexport const DEFAULT_STATUS_DEFINITIONS: ReadonlyArray<RuntimeStatusDefinition> = Object.freeze([\n {\n id: \"draft\",\n roles: [\"draft\"],\n },\n {\n id: \"open\",\n roles: [\"active\", \"default_open\"],\n },\n {\n id: \"in_progress\",\n aliases: [\"in-progress\"],\n roles: [\"active\"],\n },\n {\n id: \"blocked\",\n roles: [\"blocked\"],\n },\n {\n id: \"closed\",\n roles: [\"terminal\", \"terminal_done\", \"default_close\"],\n },\n {\n id: \"canceled\",\n aliases: [\"cancelled\"],\n roles: [\"terminal\", \"terminal_canceled\", \"default_cancel\"],\n },\n]);\n\nexport const DEFAULT_WORKFLOW_DEFINITION: RuntimeWorkflowDefinition = Object.freeze({\n draft_status: \"draft\",\n open_status: \"open\",\n in_progress_status: \"in_progress\",\n blocked_status: \"blocked\",\n close_status: \"closed\",\n canceled_status: \"canceled\",\n});\n\nexport const PM_DIRNAME = \".agents/pm\";\nexport const SETTINGS_FILENAME = \"settings.json\";\n\n/**\n * GH-249: placeholder close reason recorded when `pm create --status closed`\n * lands an item directly in the close status under\n * `governance.require_close_reason` and no --message/--resolution text is\n * available. Mirrors `pm update --status closed`'s \"Closed via pm update\"\n * default so all three closure paths record a reason.\n */\nexport const CREATE_DIRECT_CLOSE_REASON_DEFAULT = \"Closed at creation via pm create\";\n\nexport const PM_CORE_REQUIRED_SUBDIRS = [\n \"\",\n \"epics\",\n \"features\",\n \"tasks\",\n \"chores\",\n \"issues\",\n \"schema\",\n \"history\",\n \"search\",\n \"extensions\",\n \"locks\",\n] as const;\n\nexport const PM_OPTIONAL_TYPE_SUBDIRS = [\n \"decisions\",\n \"events\",\n \"reminders\",\n \"milestones\",\n \"meetings\",\n \"plans\",\n] as const;\n\nexport const PM_REQUIRED_SUBDIRS = [...PM_CORE_REQUIRED_SUBDIRS, ...PM_OPTIONAL_TYPE_SUBDIRS] as const;\n\nexport const TYPE_TO_FOLDER: Record<BuiltinItemType, string> = {\n Epic: \"epics\",\n Feature: \"features\",\n Task: \"tasks\",\n Chore: \"chores\",\n Issue: \"issues\",\n Decision: \"decisions\",\n Event: \"events\",\n Reminder: \"reminders\",\n Milestone: \"milestones\",\n Meeting: \"meetings\",\n Plan: \"plans\",\n};\n\nexport const FRONT_MATTER_KEY_ORDER: ReadonlyArray<string> = [\n \"id\",\n \"title\",\n \"description\",\n \"type\",\n \"source_type\",\n \"type_options\",\n \"status\",\n \"priority\",\n \"tags\",\n \"created_at\",\n \"updated_at\",\n \"deadline\",\n \"reminders\",\n \"events\",\n \"closed_at\",\n \"assignee\",\n \"source_owner\",\n \"author\",\n \"estimated_minutes\",\n \"acceptance_criteria\",\n \"design\",\n \"external_ref\",\n \"definition_of_ready\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"why_now\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blocked_by\",\n \"blocked_reason\",\n \"unblock_note\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"repro_steps\",\n \"resolution\",\n \"expected_result\",\n \"actual_result\",\n \"affected_version\",\n \"fixed_version\",\n \"component\",\n \"regression\",\n \"customer_impact\",\n \"dependencies\",\n \"comments\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"tests\",\n \"test_runs\",\n \"docs\",\n \"close_reason\",\n \"duplicate_of\",\n \"plan_mode\",\n \"plan_scope\",\n \"plan_harness\",\n \"plan_resume_context\",\n \"plan_validation\",\n \"plan_decisions\",\n \"plan_discoveries\",\n \"plan_steps\",\n];\n\ntype BuiltinGovernancePreset = Exclude<GovernancePreset, \"custom\">;\n\nexport const GOVERNANCE_PRESET_DEFAULTS: Record<BuiltinGovernancePreset, Omit<GovernanceSettings, \"preset\">> = {\n minimal: {\n ownership_enforcement: \"none\",\n create_mode_default: \"progressive\",\n close_validation_default: \"off\",\n require_close_reason: true,\n parent_reference: \"strict_error\",\n metadata_profile: \"core\",\n force_required_for_stale_lock: false,\n },\n default: {\n ownership_enforcement: \"warn\",\n create_mode_default: \"progressive\",\n close_validation_default: \"warn\",\n require_close_reason: true,\n parent_reference: \"strict_error\",\n metadata_profile: \"core\",\n force_required_for_stale_lock: true,\n },\n strict: {\n ownership_enforcement: \"strict\",\n create_mode_default: \"strict\",\n close_validation_default: \"strict\",\n require_close_reason: true,\n parent_reference: \"strict_error\",\n metadata_profile: \"strict\",\n force_required_for_stale_lock: true,\n },\n};\n\nexport const DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS = [\n \"no active blocker\",\n \"ready for planned execution sequencing\",\n \"work completed\",\n \"work is closed\",\n] as const;\n\nexport const DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS = {\n blocked_reason: [\"no active blocker because work is closed\", \"work is closed\"],\n resolution: [\"closed with implementation evidence\", \"closed with verification evidence\", \"work completed and recorded\", \"work is closed\"],\n actual_result: [\"closed and recorded\", \"work completed\", \"work completed and recorded\"],\n} as const;\n\nfunction cloneOptionalArray<T>(values: readonly T[] | undefined): T[] | undefined {\n return values ? [...values] : undefined;\n}\n\nexport const SETTINGS_DEFAULTS: PmSettings = {\n version: 1,\n id_prefix: \"pm-\",\n author_default: \"\",\n item_format: \"toon\",\n locks: {\n ttl_seconds: 1800,\n },\n output: {\n default_format: \"toon\",\n },\n history: {\n missing_stream: \"auto_create\",\n },\n validation: {\n sprint_release_format: \"warn\",\n parent_reference: \"warn\",\n metadata_profile: \"core\",\n metadata_required_fields: [],\n lifecycle_stale_blocker_reason_patterns: [...DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS],\n lifecycle_closure_like_blocked_reason_patterns: [\n ...DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.blocked_reason,\n ],\n lifecycle_closure_like_resolution_patterns: [...DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.resolution],\n lifecycle_closure_like_actual_result_patterns: [\n ...DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.actual_result,\n ],\n estimate_defaults_by_type: {},\n },\n governance: {\n preset: \"minimal\",\n ...GOVERNANCE_PRESET_DEFAULTS.minimal,\n },\n workflow: {\n definition_of_done: [],\n },\n testing: {\n record_results_to_items: false,\n },\n telemetry: {\n enabled: true,\n first_run_prompt_completed: false,\n capture_level: \"redacted\",\n endpoint: \"https://pm-cli.unbrained.dev/v1/events\",\n installation_id: \"\",\n retention_days: 365,\n },\n agent_guidance: {\n prompt_completed: false,\n declined: false,\n declined_at: \"\",\n template_version: 1,\n last_checked_files: [],\n },\n item_types: {\n definitions: [],\n },\n schema: {\n version: 1,\n files: {\n types: \"schema/types.json\",\n statuses: \"schema/statuses.json\",\n fields: \"schema/fields.json\",\n workflows: \"schema/workflows.json\",\n },\n statuses: DEFAULT_STATUS_DEFINITIONS.map((definition) => ({\n ...definition,\n aliases: cloneOptionalArray(definition.aliases),\n roles: cloneOptionalArray(definition.roles),\n })),\n fields: [],\n workflow: { ...DEFAULT_WORKFLOW_DEFINITION },\n unknown_field_policy: \"allow\",\n },\n extensions: {\n enabled: [],\n disabled: [],\n policy: createDefaultExtensionGovernancePolicy(),\n },\n search: {\n score_threshold: 0,\n hybrid_semantic_weight: 0.7,\n max_results: 50,\n embedding_model: \"\",\n embedding_batch_size: 32,\n embedding_timeout_ms: 30_000,\n scanner_max_batch_retries: 3,\n provider: \"\",\n mutation_refresh_policy: \"semantic_configured\",\n query_expansion: {\n enabled: false,\n provider: \"\",\n },\n rerank: {\n enabled: false,\n model: \"\",\n top_k: 20,\n },\n },\n providers: {\n openai: {\n base_url: \"\",\n api_key: \"\",\n model: \"\",\n },\n ollama: {\n base_url: \"\",\n model: \"\",\n },\n },\n context: {\n default_depth: \"brief\",\n activity_limit: 10,\n stale_threshold_days: 7,\n sections: {\n hierarchy: true,\n activity: true,\n progress: true,\n recently_created: true,\n unparented: true,\n blockers: true,\n files: true,\n workload: true,\n staleness: true,\n tests: true,\n },\n },\n vector_store: {\n adapter: \"\",\n collection_name: \"pm_items\",\n qdrant: {\n url: \"\",\n api_key: \"\",\n },\n lancedb: {\n path: \"\",\n },\n },\n};\n\nexport const EMPTY_CANONICAL_DOCUMENT = {\n metadata: {},\n body: \"\",\n};\n\nexport const EXIT_CODE = {\n SUCCESS: 0,\n GENERIC_FAILURE: 1,\n USAGE: 2,\n NOT_FOUND: 3,\n CONFLICT: 4,\n DEPENDENCY_FAILED: 5,\n} as const;\n\nexport type TelemetryErrorCategory = \"usage\" | \"validation\" | \"conflict\" | \"runtime\" | \"unknown\";\n\nexport const TELEMETRY_ERROR_CATEGORY_BY_CODE: Readonly<Record<string, TelemetryErrorCategory>> = Object.freeze({\n unknown_command: \"usage\",\n unknown_option: \"usage\",\n missing_required_option: \"usage\",\n missing_required_argument: \"usage\",\n invalid_command_usage: \"usage\",\n linked_test_value_not_quoted: \"usage\",\n invalid_argument_value: \"validation\",\n health_findings: \"validation\",\n validation_findings: \"validation\",\n close_through_update: \"validation\",\n no_update_fields: \"validation\",\n unsupported_update_option: \"validation\",\n tracker_not_initialized: \"validation\",\n item_not_found: \"validation\",\n ownership_conflict: \"conflict\",\n lock_conflict: \"conflict\",\n terminal_state_conflict: \"conflict\",\n dependency_failed: \"runtime\",\n command_failed: \"runtime\",\n unknown_error: \"runtime\",\n});\n\nexport function resolveTelemetryErrorCategory(errorCode: string | undefined): TelemetryErrorCategory {\n const normalized = (errorCode ?? \"\").trim().toLowerCase();\n if (normalized.length === 0) {\n return \"unknown\";\n }\n const explicit = TELEMETRY_ERROR_CATEGORY_BY_CODE[normalized];\n if (typeof explicit === \"string\") {\n return explicit;\n }\n if (normalized.includes(\"conflict\") || normalized.includes(\"locked\")) {\n return \"conflict\";\n }\n if (normalized.startsWith(\"unknown_\") || normalized.startsWith(\"missing_required_\")) {\n return \"usage\";\n }\n if (normalized.startsWith(\"invalid_\") || normalized.endsWith(\"_not_found\") || normalized.includes(\"validation\")) {\n return \"validation\";\n }\n if (normalized.endsWith(\"_error\") || normalized.endsWith(\"_failed\")) {\n return \"runtime\";\n }\n return \"unknown\";\n}\n"],"names":[],"mappings":";;AASA,OAAO,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAE1F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA2C,MAAM,CAAC,MAAM,CAAC;IAC9F;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,CAAC,OAAO,CAAC;KACjB;IACD;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC;KAClC;IACD;QACE,EAAE,EAAE,aAAa;QACjB,OAAO,EAAE,CAAC,aAAa,CAAC;QACxB,KAAK,EAAE,CAAC,QAAQ,CAAC;KAClB;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,CAAC,SAAS,CAAC;KACnB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,eAAe,CAAC;KACtD;IACD;QACE,EAAE,EAAE,UAAU;QACd,OAAO,EAAE,CAAC,WAAW,CAAC;QACtB,KAAK,EAAE,CAAC,UAAU,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;KAC3D;CACF,CAAC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,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrE,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACpF,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAChH,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACpE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","debugId":"de6d8b9a-3684-54cd-81b1-2b94e87908c9"}
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1109b938-c421-5517-9671-2cebd7e10309")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f232eaee-3735-55a2-a605-5ea434b4092b")}catch(e){}}();
3
3
  export function normalizeLowercaseWhitespace(value) {
4
4
  return value
5
5
  .trim()
@@ -26,8 +26,9 @@ export function jaccardSimilarity(leftTokens, rightTokens) {
26
26
  intersection += 1;
27
27
  }
28
28
  }
29
+ // Both token sets are non-empty here (guarded above), so union is always >= 1.
29
30
  const union = new Set([...leftSet, ...rightSet]).size;
30
- return union === 0 ? 0 : intersection / union;
31
+ return intersection / union;
31
32
  }
32
33
  //# sourceMappingURL=text-normalization.js.map
33
- //# debugId=1109b938-c421-5517-9671-2cebd7e10309
34
+ //# debugId=f232eaee-3735-55a2-a605-5ea434b4092b
@@ -1 +1 @@
1
- {"version":3,"file":"text-normalization.js","sources":["core/shared/text-normalization.ts"],"sourceRoot":"/","sourcesContent":["export function normalizeLowercaseWhitespace(value: string): string {\n return value\n .trim()\n .toLowerCase()\n .replace(/\\s+/g, \" \");\n}\n\nexport function tokenizeAlphaNumeric(value: string): string[] {\n return normalizeLowercaseWhitespace(value)\n .split(/[^a-z0-9]+/)\n .filter((token) => token.length > 0);\n}\n\nexport function jaccardSimilarity(leftTokens: string[], rightTokens: string[]): number {\n if (leftTokens.length === 0 && rightTokens.length === 0) {\n return 1;\n }\n if (leftTokens.length === 0 || rightTokens.length === 0) {\n return 0;\n }\n const leftSet = new Set(leftTokens);\n const rightSet = new Set(rightTokens);\n let intersection = 0;\n for (const token of leftSet) {\n if (rightSet.has(token)) {\n intersection += 1;\n }\n }\n const union = new Set([...leftSet, ...rightSet]).size;\n return union === 0 ? 0 : intersection / union;\n}\n"],"names":[],"mappings":";;AAAA,MAAM,UAAU,4BAA4B,CAAC,KAAa;IACxD,OAAO,KAAK;SACT,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,4BAA4B,CAAC,KAAK,CAAC;SACvC,KAAK,CAAC,YAAY,CAAC;SACnB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,UAAoB,EAAE,WAAqB;IAC3E,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;IACtC,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,YAAY,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,KAAK,CAAC;AAChD,CAAC","debugId":"1109b938-c421-5517-9671-2cebd7e10309"}
1
+ {"version":3,"file":"text-normalization.js","sources":["core/shared/text-normalization.ts"],"sourceRoot":"/","sourcesContent":["export function normalizeLowercaseWhitespace(value: string): string {\n return value\n .trim()\n .toLowerCase()\n .replace(/\\s+/g, \" \");\n}\n\nexport function tokenizeAlphaNumeric(value: string): string[] {\n return normalizeLowercaseWhitespace(value)\n .split(/[^a-z0-9]+/)\n .filter((token) => token.length > 0);\n}\n\nexport function jaccardSimilarity(leftTokens: string[], rightTokens: string[]): number {\n if (leftTokens.length === 0 && rightTokens.length === 0) {\n return 1;\n }\n if (leftTokens.length === 0 || rightTokens.length === 0) {\n return 0;\n }\n const leftSet = new Set(leftTokens);\n const rightSet = new Set(rightTokens);\n let intersection = 0;\n for (const token of leftSet) {\n if (rightSet.has(token)) {\n intersection += 1;\n }\n }\n // Both token sets are non-empty here (guarded above), so union is always >= 1.\n const union = new Set([...leftSet, ...rightSet]).size;\n return intersection / union;\n}\n"],"names":[],"mappings":";;AAAA,MAAM,UAAU,4BAA4B,CAAC,KAAa;IACxD,OAAO,KAAK;SACT,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,4BAA4B,CAAC,KAAK,CAAC;SACvC,KAAK,CAAC,YAAY,CAAC;SACnB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,UAAoB,EAAE,WAAqB;IAC3E,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;IACtC,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,YAAY,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IACD,+EAA+E;IAC/E,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,OAAO,YAAY,GAAG,KAAK,CAAC;AAC9B,CAAC","debugId":"f232eaee-3735-55a2-a605-5ea434b4092b"}
@@ -1,4 +1,17 @@
1
1
  export declare function nowIso(): string;
2
2
  export declare function isTimestampLiteral(input: string): boolean;
3
3
  export declare function compareTimestampStrings(left: string, right: string): number;
4
+ declare function normalizeOffset(raw: string | undefined): string;
5
+ declare function pushTimestampCandidate(candidates: string[], input: string, value: string | undefined): void;
6
+ declare function normalizeTimestampCandidates(input: string): string[];
7
+ declare function parseTimestampWithFallbacks(input: string): number;
8
+ declare function isWhitespaceCharacter(character: string | undefined): boolean;
4
9
  export declare function resolveIsoOrRelative(input: string, now?: Date, fieldLabel?: string): string;
10
+ export declare const _testOnly: {
11
+ normalizeOffset: typeof normalizeOffset;
12
+ pushTimestampCandidate: typeof pushTimestampCandidate;
13
+ normalizeTimestampCandidates: typeof normalizeTimestampCandidates;
14
+ parseTimestampWithFallbacks: typeof parseTimestampWithFallbacks;
15
+ isWhitespaceCharacter: typeof isWhitespaceCharacter;
16
+ };
17
+ export {};
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41114541-33aa-5c69-adea-0e0895c2a782")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cf06ca54-b89b-5f9c-a8bd-4bad095a7dc7")}catch(e){}}();
3
3
  import { PmCliError } from "./errors.js";
4
4
  import { EXIT_CODE } from "./constants.js";
5
5
  const RELATIVE_DEADLINE = /^([+-]?)(\d+)([hdwm])$/i;
@@ -38,13 +38,18 @@ function normalizeOffset(raw) {
38
38
  return `${compact[1]}:${compact[2]}`;
39
39
  return raw;
40
40
  }
41
+ function pushTimestampCandidate(candidates, input, value) {
42
+ if (!value)
43
+ return;
44
+ if (value === input)
45
+ return;
46
+ if (candidates.includes(value))
47
+ return;
48
+ candidates.push(value);
49
+ }
41
50
  function normalizeTimestampCandidates(input) {
42
51
  const candidates = [];
43
- const push = (value) => {
44
- if (!value || value === input || candidates.includes(value))
45
- return;
46
- candidates.push(value);
47
- };
52
+ const push = (value) => pushTimestampCandidate(candidates, input, value);
48
53
  const compactDate = COMPACT_DATE.exec(input);
49
54
  if (compactDate) {
50
55
  const [, year, month, day] = compactDate;
@@ -211,5 +216,12 @@ export function resolveIsoOrRelative(input, now = new Date(), fieldLabel = "dead
211
216
  }
212
217
  return new Date(timestamp).toISOString();
213
218
  }
219
+ export const _testOnly = {
220
+ normalizeOffset,
221
+ pushTimestampCandidate,
222
+ normalizeTimestampCandidates,
223
+ parseTimestampWithFallbacks,
224
+ isWhitespaceCharacter,
225
+ };
214
226
  //# sourceMappingURL=time.js.map
215
- //# debugId=41114541-33aa-5c69-adea-0e0895c2a782
227
+ //# debugId=cf06ca54-b89b-5f9c-a8bd-4bad095a7dc7
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","sources":["core/shared/time.ts"],"sourceRoot":"/","sourcesContent":["import { PmCliError } from \"./errors.js\";\nimport { EXIT_CODE } from \"./constants.js\";\n\nconst RELATIVE_DEADLINE = /^([+-]?)(\\d+)([hdwm])$/i;\nconst COMPOUND_RELATIVE_DEADLINE = /^[+-]?\\d+[hdwm](?:[+-]\\d+[hdwm])+$/i;\nconst COMPACT_DATE = /^(\\d{4})(\\d{2})(\\d{2})$/;\nconst COMPACT_DATETIME = /^(\\d{4})(\\d{2})(\\d{2})(?:[T\\s]?)(\\d{2})(\\d{2})(\\d{2})?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\nconst HYPHEN_TIME = /^(\\d{4}-\\d{2}-\\d{2})[T\\s](\\d{2})-(\\d{2})(?:-(\\d{2}))?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\nconst COMPACT_TIME = /^(\\d{4}-\\d{2}-\\d{2})[T\\s](\\d{2})(\\d{2})(\\d{2})?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\n\nexport function nowIso(): string {\n return new Date().toISOString();\n}\n\nexport function isTimestampLiteral(input: string): boolean {\n return Number.isFinite(Date.parse(input));\n}\n\nexport function compareTimestampStrings(left: string, right: string): number {\n const leftMs = Date.parse(left);\n const rightMs = Date.parse(right);\n if (Number.isFinite(leftMs) && Number.isFinite(rightMs) && leftMs !== rightMs) {\n return leftMs - rightMs;\n }\n return left.localeCompare(right);\n}\n\nfunction normalizeFraction(raw: string | undefined): string {\n if (!raw) return \"\";\n const digits = raw.slice(1);\n return `.${digits.padEnd(3, \"0\").slice(0, 3)}`;\n}\n\nfunction normalizeOffset(raw: string | undefined): string {\n if (!raw) return \"\";\n if (raw.toUpperCase() === \"Z\") return \"Z\";\n const compact = /^([+-]\\d{2})(\\d{2})$/.exec(raw);\n if (compact) return `${compact[1]}:${compact[2]}`;\n return raw;\n}\n\nfunction normalizeTimestampCandidates(input: string): string[] {\n const candidates: string[] = [];\n const push = (value: string | undefined): void => {\n if (!value || value === input || candidates.includes(value)) return;\n candidates.push(value);\n };\n\n const compactDate = COMPACT_DATE.exec(input);\n if (compactDate) {\n const [, year, month, day] = compactDate;\n push(`${year}-${month}-${day}`);\n }\n\n const compactDateTime = COMPACT_DATETIME.exec(input);\n if (compactDateTime) {\n const [, year, month, day, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactDateTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(\n `${year}-${month}-${day}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`,\n );\n }\n\n const hyphenTime = HYPHEN_TIME.exec(input);\n if (hyphenTime) {\n const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = hyphenTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);\n }\n\n const compactTime = COMPACT_TIME.exec(input);\n if (compactTime) {\n const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);\n }\n\n const datePrefixLength = 10;\n const datePrefix = input.slice(0, datePrefixLength);\n if (isHyphenDatePrefix(datePrefix)) {\n let index = datePrefixLength;\n while (index < input.length && isWhitespaceCharacter(input[index])) {\n index += 1;\n }\n if (index < input.length) {\n push(`${datePrefix}T${input.slice(index)}`);\n }\n }\n\n return candidates;\n}\n\nfunction parseTimestampWithFallbacks(input: string): number {\n const direct = Date.parse(input);\n if (Number.isFinite(direct)) return direct;\n for (const candidate of normalizeTimestampCandidates(input)) {\n const parsed = Date.parse(candidate);\n if (Number.isFinite(parsed)) return parsed;\n }\n return Number.NaN;\n}\n\nfunction isHyphenDatePrefix(value: string): boolean {\n if (value.length !== 10) {\n return false;\n }\n for (let index = 0; index < value.length; index += 1) {\n const character = value[index];\n if (index === 4 || index === 7) {\n if (character !== \"-\") {\n return false;\n }\n continue;\n }\n const code = character.charCodeAt(0);\n if (code < 48 || code > 57) {\n return false;\n }\n }\n return true;\n}\n\nfunction isWhitespaceCharacter(character: string | undefined): boolean {\n if (!character) {\n return false;\n }\n return (\n character === \" \" ||\n character === \"\\t\" ||\n character === \"\\n\" ||\n character === \"\\r\" ||\n character === \"\\f\" ||\n character === \"\\v\"\n );\n}\n\nfunction daysInUtcMonth(year: number, monthIndex: number): number {\n return new Date(Date.UTC(year, monthIndex + 1, 0)).getUTCDate();\n}\n\nconst MONTH_NAMES = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n] as const;\n\n// Leading literal calendar date in either hyphenated (`2026-02-30`) or compact\n// (`20260230`) form, optionally followed by any time/zone component. We validate\n// the digits the caller actually typed — not the parsed instant — so timezone\n// offsets never produce a false \"impossible date\" rejection. The hyphenated form\n// is unambiguous, so anything may follow (`T`/space time, `Z`, `+/-` offset). The\n// compact form must be followed by end-of-string or a time digit (with an optional\n// `T`/space separator) so a no-separator compact datetime like `20260230135900Z`\n// is still guarded and a 7-digit non-date is not misread as a date.\nconst LEADING_HYPHEN_DATE = /^(\\d{4})-(\\d{2})-(\\d{2})/;\nconst LEADING_COMPACT_DATE = /^(\\d{4})(\\d{2})(\\d{2})(?:[T ]?\\d{2}|$)/;\n\n/**\n * Reject literal calendar dates whose day cannot exist (e.g. `2026-02-30`, which JS\n * `Date` silently rolls forward to March 2). Without this, agents that pass an\n * impossible deadline get a silently-wrong stored date instead of an actionable\n * error. Only triggers on a leading literal date; relative tokens, \"now\", and pure\n * times are untouched. Month 00 / >12 is also rejected with a clear message rather\n * than falling through to the generic \"invalid value\" path.\n */\nfunction assertRealCalendarDate(originalInput: string, trimmed: string, fieldLabel: string): void {\n const match = LEADING_HYPHEN_DATE.exec(trimmed) ?? LEADING_COMPACT_DATE.exec(trimmed);\n if (!match) {\n return;\n }\n const year = Number.parseInt(match[1], 10);\n const month = Number.parseInt(match[2], 10);\n const day = Number.parseInt(match[3], 10);\n const label = fieldLabel?.trim() || \"deadline\";\n if (month < 1 || month > 12) {\n throw new PmCliError(\n `Invalid ${label} value \"${originalInput}\". Month \"${match[2]}\" is out of range — use a month between 01 and 12.`,\n EXIT_CODE.USAGE,\n );\n }\n const maxDay = daysInUtcMonth(year, month - 1);\n if (day < 1 || day > maxDay) {\n throw new PmCliError(\n `Invalid ${label} value \"${originalInput}\". ${MONTH_NAMES[month - 1]} ${year} has ${maxDay} days, so day \"${match[3]}\" does not exist. Use a real YYYY-MM-DD calendar date.`,\n EXIT_CODE.USAGE,\n );\n }\n}\n\nfunction addUtcMonths(now: Date, amount: number): Date {\n const result = new Date(now.getTime());\n const startDay = result.getUTCDate();\n const targetMonthIndex = result.getUTCMonth() + amount;\n const targetYear = result.getUTCFullYear() + Math.floor(targetMonthIndex / 12);\n const targetMonth = ((targetMonthIndex % 12) + 12) % 12;\n const day = Math.min(startDay, daysInUtcMonth(targetYear, targetMonth));\n result.setUTCFullYear(targetYear, targetMonth, day);\n return result;\n}\n\nexport function resolveIsoOrRelative(\n input: string,\n now: Date = new Date(),\n fieldLabel = \"deadline\",\n): string {\n const trimmed = input.trim();\n if (trimmed.toLowerCase() === \"now\") {\n return now.toISOString();\n }\n const relative = RELATIVE_DEADLINE.exec(trimmed);\n if (relative) {\n const sign = relative[1] === \"-\" ? -1 : 1;\n const amount = Number.parseInt(relative[2], 10) * sign;\n const unit = relative[3].toLowerCase();\n if (unit === \"m\") {\n return addUtcMonths(now, amount).toISOString();\n }\n const msPerUnit = unit === \"h\" ? 60 * 60 * 1000 : unit === \"d\" ? 24 * 60 * 60 * 1000 : 7 * 24 * 60 * 60 * 1000;\n return new Date(now.getTime() + amount * msPerUnit).toISOString();\n }\n\n assertRealCalendarDate(input, trimmed, fieldLabel);\n\n const timestamp = parseTimestampWithFallbacks(trimmed);\n if (!Number.isFinite(timestamp)) {\n const normalizedLabel = fieldLabel.trim().length > 0 ? fieldLabel.trim() : \"deadline\";\n const guidance = COMPOUND_RELATIVE_DEADLINE.test(trimmed)\n ? \"Compound relative expressions like +3d+1h are not supported; use a single relative token (for example +3d) or an ISO/date string.\"\n : 'Use ISO/date string input, \"now\", or relative +6h/-6h/+1d/-1d/+2w/-2w/+6m/-6m.';\n throw new PmCliError(\n `Invalid ${normalizedLabel} value \"${input}\". ${guidance}`,\n EXIT_CODE.USAGE,\n );\n }\n return new Date(timestamp).toISOString();\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EA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"file":"time.js","sources":["core/shared/time.ts"],"sourceRoot":"/","sourcesContent":["import { PmCliError } from \"./errors.js\";\nimport { EXIT_CODE } from \"./constants.js\";\n\nconst RELATIVE_DEADLINE = /^([+-]?)(\\d+)([hdwm])$/i;\nconst COMPOUND_RELATIVE_DEADLINE = /^[+-]?\\d+[hdwm](?:[+-]\\d+[hdwm])+$/i;\nconst COMPACT_DATE = /^(\\d{4})(\\d{2})(\\d{2})$/;\nconst COMPACT_DATETIME = /^(\\d{4})(\\d{2})(\\d{2})(?:[T\\s]?)(\\d{2})(\\d{2})(\\d{2})?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\nconst HYPHEN_TIME = /^(\\d{4}-\\d{2}-\\d{2})[T\\s](\\d{2})-(\\d{2})(?:-(\\d{2}))?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\nconst COMPACT_TIME = /^(\\d{4}-\\d{2}-\\d{2})[T\\s](\\d{2})(\\d{2})(\\d{2})?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\n\nexport function nowIso(): string {\n return new Date().toISOString();\n}\n\nexport function isTimestampLiteral(input: string): boolean {\n return Number.isFinite(Date.parse(input));\n}\n\nexport function compareTimestampStrings(left: string, right: string): number {\n const leftMs = Date.parse(left);\n const rightMs = Date.parse(right);\n if (Number.isFinite(leftMs) && Number.isFinite(rightMs) && leftMs !== rightMs) {\n return leftMs - rightMs;\n }\n return left.localeCompare(right);\n}\n\nfunction normalizeFraction(raw: string | undefined): string {\n if (!raw) return \"\";\n const digits = raw.slice(1);\n return `.${digits.padEnd(3, \"0\").slice(0, 3)}`;\n}\n\nfunction normalizeOffset(raw: string | undefined): string {\n if (!raw) return \"\";\n if (raw.toUpperCase() === \"Z\") return \"Z\";\n const compact = /^([+-]\\d{2})(\\d{2})$/.exec(raw);\n if (compact) return `${compact[1]}:${compact[2]}`;\n return raw;\n}\n\nfunction pushTimestampCandidate(candidates: string[], input: string, value: string | undefined): void {\n if (!value) return;\n if (value === input) return;\n if (candidates.includes(value)) return;\n candidates.push(value);\n}\n\nfunction normalizeTimestampCandidates(input: string): string[] {\n const candidates: string[] = [];\n const push = (value: string | undefined): void => pushTimestampCandidate(candidates, input, value);\n\n const compactDate = COMPACT_DATE.exec(input);\n if (compactDate) {\n const [, year, month, day] = compactDate;\n push(`${year}-${month}-${day}`);\n }\n\n const compactDateTime = COMPACT_DATETIME.exec(input);\n if (compactDateTime) {\n const [, year, month, day, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactDateTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(\n `${year}-${month}-${day}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`,\n );\n }\n\n const hyphenTime = HYPHEN_TIME.exec(input);\n if (hyphenTime) {\n const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = hyphenTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);\n }\n\n const compactTime = COMPACT_TIME.exec(input);\n if (compactTime) {\n const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);\n }\n\n const datePrefixLength = 10;\n const datePrefix = input.slice(0, datePrefixLength);\n if (isHyphenDatePrefix(datePrefix)) {\n let index = datePrefixLength;\n while (index < input.length && isWhitespaceCharacter(input[index])) {\n index += 1;\n }\n if (index < input.length) {\n push(`${datePrefix}T${input.slice(index)}`);\n }\n }\n\n return candidates;\n}\n\nfunction parseTimestampWithFallbacks(input: string): number {\n const direct = Date.parse(input);\n if (Number.isFinite(direct)) return direct;\n for (const candidate of normalizeTimestampCandidates(input)) {\n const parsed = Date.parse(candidate);\n if (Number.isFinite(parsed)) return parsed;\n }\n return Number.NaN;\n}\n\nfunction isHyphenDatePrefix(value: string): boolean {\n if (value.length !== 10) {\n return false;\n }\n for (let index = 0; index < value.length; index += 1) {\n const character = value[index];\n if (index === 4 || index === 7) {\n if (character !== \"-\") {\n return false;\n }\n continue;\n }\n const code = character.charCodeAt(0);\n if (code < 48 || code > 57) {\n return false;\n }\n }\n return true;\n}\n\nfunction isWhitespaceCharacter(character: string | undefined): boolean {\n if (!character) {\n return false;\n }\n return (\n character === \" \" ||\n character === \"\\t\" ||\n character === \"\\n\" ||\n character === \"\\r\" ||\n character === \"\\f\" ||\n character === \"\\v\"\n );\n}\n\nfunction daysInUtcMonth(year: number, monthIndex: number): number {\n return new Date(Date.UTC(year, monthIndex + 1, 0)).getUTCDate();\n}\n\nconst MONTH_NAMES = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n] as const;\n\n// Leading literal calendar date in either hyphenated (`2026-02-30`) or compact\n// (`20260230`) form, optionally followed by any time/zone component. We validate\n// the digits the caller actually typed — not the parsed instant — so timezone\n// offsets never produce a false \"impossible date\" rejection. The hyphenated form\n// is unambiguous, so anything may follow (`T`/space time, `Z`, `+/-` offset). The\n// compact form must be followed by end-of-string or a time digit (with an optional\n// `T`/space separator) so a no-separator compact datetime like `20260230135900Z`\n// is still guarded and a 7-digit non-date is not misread as a date.\nconst LEADING_HYPHEN_DATE = /^(\\d{4})-(\\d{2})-(\\d{2})/;\nconst LEADING_COMPACT_DATE = /^(\\d{4})(\\d{2})(\\d{2})(?:[T ]?\\d{2}|$)/;\n\n/**\n * Reject literal calendar dates whose day cannot exist (e.g. `2026-02-30`, which JS\n * `Date` silently rolls forward to March 2). Without this, agents that pass an\n * impossible deadline get a silently-wrong stored date instead of an actionable\n * error. Only triggers on a leading literal date; relative tokens, \"now\", and pure\n * times are untouched. Month 00 / >12 is also rejected with a clear message rather\n * than falling through to the generic \"invalid value\" path.\n */\nfunction assertRealCalendarDate(originalInput: string, trimmed: string, fieldLabel: string): void {\n const match = LEADING_HYPHEN_DATE.exec(trimmed) ?? LEADING_COMPACT_DATE.exec(trimmed);\n if (!match) {\n return;\n }\n const year = Number.parseInt(match[1], 10);\n const month = Number.parseInt(match[2], 10);\n const day = Number.parseInt(match[3], 10);\n const label = fieldLabel?.trim() || \"deadline\";\n if (month < 1 || month > 12) {\n throw new PmCliError(\n `Invalid ${label} value \"${originalInput}\". Month \"${match[2]}\" is out of range — use a month between 01 and 12.`,\n EXIT_CODE.USAGE,\n );\n }\n const maxDay = daysInUtcMonth(year, month - 1);\n if (day < 1 || day > maxDay) {\n throw new PmCliError(\n `Invalid ${label} value \"${originalInput}\". ${MONTH_NAMES[month - 1]} ${year} has ${maxDay} days, so day \"${match[3]}\" does not exist. Use a real YYYY-MM-DD calendar date.`,\n EXIT_CODE.USAGE,\n );\n }\n}\n\nfunction addUtcMonths(now: Date, amount: number): Date {\n const result = new Date(now.getTime());\n const startDay = result.getUTCDate();\n const targetMonthIndex = result.getUTCMonth() + amount;\n const targetYear = result.getUTCFullYear() + Math.floor(targetMonthIndex / 12);\n const targetMonth = ((targetMonthIndex % 12) + 12) % 12;\n const day = Math.min(startDay, daysInUtcMonth(targetYear, targetMonth));\n result.setUTCFullYear(targetYear, targetMonth, day);\n return result;\n}\n\nexport function resolveIsoOrRelative(\n input: string,\n now: Date = new Date(),\n fieldLabel = \"deadline\",\n): string {\n const trimmed = input.trim();\n if (trimmed.toLowerCase() === \"now\") {\n return now.toISOString();\n }\n const relative = RELATIVE_DEADLINE.exec(trimmed);\n if (relative) {\n const sign = relative[1] === \"-\" ? -1 : 1;\n const amount = Number.parseInt(relative[2], 10) * sign;\n const unit = relative[3].toLowerCase();\n if (unit === \"m\") {\n return addUtcMonths(now, amount).toISOString();\n }\n const msPerUnit = unit === \"h\" ? 60 * 60 * 1000 : unit === \"d\" ? 24 * 60 * 60 * 1000 : 7 * 24 * 60 * 60 * 1000;\n return new Date(now.getTime() + amount * msPerUnit).toISOString();\n }\n\n assertRealCalendarDate(input, trimmed, fieldLabel);\n\n const timestamp = parseTimestampWithFallbacks(trimmed);\n if (!Number.isFinite(timestamp)) {\n const normalizedLabel = fieldLabel.trim().length > 0 ? fieldLabel.trim() : \"deadline\";\n const guidance = COMPOUND_RELATIVE_DEADLINE.test(trimmed)\n ? \"Compound relative expressions like +3d+1h are not supported; use a single relative token (for example +3d) or an ISO/date string.\"\n : 'Use ISO/date string input, \"now\", or relative +6h/-6h/+1d/-1d/+2w/-2w/+6m/-6m.';\n throw new PmCliError(\n `Invalid ${normalizedLabel} value \"${input}\". ${guidance}`,\n EXIT_CODE.USAGE,\n );\n }\n return new Date(timestamp).toISOString();\n}\n\nexport const _testOnly = {\n normalizeOffset,\n pushTimestampCandidate,\n normalizeTimestampCandidates,\n parseTimestampWithFallbacks,\n isWhitespaceCharacter,\n};\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AACpD,MAAM,0BAA0B,GAAG,qCAAqC,CAAC;AACzE,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAC/C,MAAM,gBAAgB,GAAG,6FAA6F,CAAC;AACvH,MAAM,WAAW,GAAG,4FAA4F,CAAC;AACjH,MAAM,YAAY,GAAG,sFAAsF,CAAC;AAE5G,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,IAAY,EAAE,KAAa;IACjE,MAAM,MAAM,GAAG,IAAI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,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;IACpE,CAAC;IAED,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAEnD,MAAM,SAAS,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;QACtF,MAAM,QAAQ,GAAG,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC;YACvD,CAAC,CAAC,mIAAmI;YACrI,CAAC,CAAC,gFAAgF,CAAC;QACrF,MAAM,IAAI,UAAU,CAClB,WAAW,eAAe,WAAW,KAAK,MAAM,QAAQ,EAAE,EAC1D,SAAS,CAAC,KAAK,CAChB,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,eAAe;IACf,sBAAsB;IACtB,4BAA4B;IAC5B,2BAA2B;IAC3B,qBAAqB;CACtB,CAAC","debugId":"cf06ca54-b89b-5f9c-a8bd-4bad095a7dc7"}
@@ -6,6 +6,8 @@ export interface LocatedItem {
6
6
  itemPath: string;
7
7
  item_format: ItemFormat;
8
8
  }
9
+ declare function isErrno(error: unknown, code: string): boolean;
10
+ declare function appendWarning(warnings: string[] | undefined, warning: string): void;
9
11
  export declare function locateItem(pmRoot: string, rawId: string, idPrefix?: string, preferredFormat?: ItemFormat, typeToFolder?: Record<string, string>): Promise<LocatedItem | null>;
10
12
  export declare function readLocatedItem(item: LocatedItem, options?: {
11
13
  schema?: RuntimeSchemaSettings;
@@ -26,7 +28,9 @@ export declare function listAllFrontMatterLight(pmRoot: string, preferredFormat?
26
28
  export declare function listAllFrontMatterWithBody(pmRoot: string, preferredFormat?: ItemFormat, typeToFolder?: Record<string, string>, warnings?: string[], schema?: RuntimeSchemaSettings): Promise<Array<ItemFrontMatter & {
27
29
  body: string;
28
30
  }>>;
31
+ declare function buildDidYouMeanSuggestions(pmRoot: string, badId: string, idPrefix: string, typeToFolder: Record<string, string>): Promise<string[]>;
29
32
  export declare function buildItemNotFoundError(pmRoot: string, badId: string, idPrefix: string, typeToFolder: Record<string, string>): Promise<PmCliError>;
33
+ declare function bypassesAssigneeConflict(op: string, bypassAssigneeConflict?: boolean): boolean;
30
34
  export declare function mutateItem(params: {
31
35
  pmRoot: string;
32
36
  settings: PmSettings;
@@ -48,6 +52,12 @@ export declare function mutateItem(params: {
48
52
  changedFields: string[];
49
53
  warnings: string[];
50
54
  }>;
55
+ export declare const itemStoreTestOnly: {
56
+ appendWarning: typeof appendWarning;
57
+ bypassesAssigneeConflict: typeof bypassesAssigneeConflict;
58
+ buildDidYouMeanSuggestions: typeof buildDidYouMeanSuggestions;
59
+ isErrno: typeof isErrno;
60
+ };
51
61
  export declare function deleteItem(params: {
52
62
  pmRoot: string;
53
63
  settings: PmSettings;
@@ -62,3 +72,4 @@ export declare function deleteItem(params: {
62
72
  warnings: string[];
63
73
  targetPath?: string;
64
74
  }>;
75
+ export {};
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="19b07c25-5234-52e7-9418-630480f5e1b1")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d6538d11-5ec9-5c34-88ab-d477e36eaf06")}catch(e){}}();
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import { getActiveExtensionRegistrations, projectAfterCommandItemSnapshot, recordAfterCommandAffectedItem, runActiveOnReadHooks, runActiveOnWriteHooks, runActiveServiceOverride, } from "../extensions/index.js";
@@ -105,7 +105,8 @@ export async function listAllFrontMatterWithBody(pmRoot, preferredFormat, typeTo
105
105
  const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, { includeBody: true });
106
106
  return candidates.map((candidate) => ({
107
107
  ...candidate.metadata,
108
- body: candidate.body ?? "",
108
+ // includeBody:true guarantees candidate bodies are materialized.
109
+ body: candidate.body,
109
110
  }));
110
111
  }
111
112
  async function listKnownItemIds(pmRoot, typeToFolder) {
@@ -155,6 +156,8 @@ function bypassesAssigneeConflict(op, bypassAssigneeConflict) {
155
156
  return (op === "claim" ||
156
157
  (bypassAssigneeConflict === true &&
157
158
  (op === "comment_add" ||
159
+ op === "comment_edit" ||
160
+ op === "comment_delete" ||
158
161
  op === "note_add" ||
159
162
  op === "learning_add" ||
160
163
  op === "release" ||
@@ -352,6 +355,12 @@ export async function mutateItem(params) {
352
355
  await releaseLock();
353
356
  }
354
357
  }
358
+ export const itemStoreTestOnly = {
359
+ appendWarning,
360
+ bypassesAssigneeConflict,
361
+ buildDidYouMeanSuggestions,
362
+ isErrno,
363
+ };
355
364
  export async function deleteItem(params) {
356
365
  const prepared = await prepareLockedItem({
357
366
  pmRoot: params.pmRoot,
@@ -463,4 +472,4 @@ export async function deleteItem(params) {
463
472
  }
464
473
  }
465
474
  //# sourceMappingURL=item-store.js.map
466
- //# debugId=19b07c25-5234-52e7-9418-630480f5e1b1
475
+ //# debugId=d6538d11-5ec9-5c34-88ab-d477e36eaf06