@unbrained/pm-cli 2026.6.11 → 2026.6.13

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 (447) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +1 -1
  3. package/dist/cli/commands/completion.js +20 -8
  4. package/dist/cli/commands/completion.js.map +1 -1
  5. package/dist/cli/commands/create.js +13 -3
  6. package/dist/cli/commands/create.js.map +1 -1
  7. package/dist/cli/commands/docs.d.ts +2 -0
  8. package/dist/cli/commands/docs.js +2 -2
  9. package/dist/cli/commands/docs.js.map +1 -1
  10. package/dist/cli/commands/files.d.ts +2 -0
  11. package/dist/cli/commands/files.js +2 -2
  12. package/dist/cli/commands/files.js.map +1 -1
  13. package/dist/cli/commands/health.d.ts +1 -1
  14. package/dist/cli/commands/health.js +77 -2
  15. package/dist/cli/commands/health.js.map +1 -1
  16. package/dist/cli/commands/history-repair.d.ts +36 -0
  17. package/dist/cli/commands/history-repair.js +68 -3
  18. package/dist/cli/commands/history-repair.js.map +1 -1
  19. package/dist/cli/commands/index.d.ts +1 -1
  20. package/dist/cli/commands/index.js +3 -3
  21. package/dist/cli/commands/index.js.map +1 -1
  22. package/dist/cli/commands/linked-artifacts.d.ts +18 -0
  23. package/dist/cli/commands/linked-artifacts.js +26 -3
  24. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  25. package/dist/cli/commands/plan.d.ts +6 -0
  26. package/dist/cli/commands/plan.js +93 -32
  27. package/dist/cli/commands/plan.js.map +1 -1
  28. package/dist/cli/commands/validate.d.ts +20 -0
  29. package/dist/cli/commands/validate.js +292 -28
  30. package/dist/cli/commands/validate.js.map +1 -1
  31. package/dist/cli/error-guidance.js +29 -2
  32. package/dist/cli/error-guidance.js.map +1 -1
  33. package/dist/cli/help-content.js +7 -3
  34. package/dist/cli/help-content.js.map +1 -1
  35. package/dist/cli/main.js +13 -3
  36. package/dist/cli/main.js.map +1 -1
  37. package/dist/cli/register-mutation.js +47 -16
  38. package/dist/cli/register-mutation.js.map +1 -1
  39. package/dist/cli/register-operations.js +10 -2
  40. package/dist/cli/register-operations.js.map +1 -1
  41. package/dist/cli/register-setup.js +16 -16
  42. package/dist/cli/register-setup.js.map +1 -1
  43. package/dist/cli-bundle/chunks/{activity-XADJOG6G.js → activity-PPO7QWJF.js} +11 -11
  44. package/dist/cli-bundle/chunks/activity-XIOTGZMU.js +16 -0
  45. package/dist/cli-bundle/chunks/{aggregate-6OTS3AOO.js → aggregate-IRHJWEKG.js} +10 -10
  46. package/dist/cli-bundle/chunks/{aggregate-OD36DJU5.js → aggregate-XEBW22UQ.js} +10 -10
  47. package/dist/cli-bundle/chunks/{append-JYWO4P7W.js → append-N2AWXKZC.js} +8 -8
  48. package/dist/cli-bundle/chunks/{append-KG55G7S3.js → append-NL67JNJU.js} +8 -8
  49. package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js → chunk-2ANTZBYF.js} +5 -5
  50. package/dist/cli-bundle/chunks/{chunk-F75JSIOZ.js → chunk-2J2AH4V5.js} +6 -6
  51. package/dist/cli-bundle/chunks/{chunk-CCX4RSYZ.js → chunk-32XSW44C.js} +2 -2
  52. package/dist/cli-bundle/chunks/{chunk-DY6C42S6.js → chunk-36BCSMKP.js} +9 -9
  53. package/dist/cli-bundle/chunks/{chunk-XUC4C4PT.js → chunk-3CQPVBK3.js} +3 -3
  54. package/dist/cli-bundle/chunks/{chunk-SXKNJPQ7.js → chunk-3FMQMHAG.js} +3 -3
  55. package/dist/cli-bundle/chunks/{chunk-I7NYDZDV.js → chunk-3VULHQNS.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-HHHJ2GI3.js → chunk-4FHLNNW7.js} +8 -8
  57. package/dist/cli-bundle/chunks/{chunk-RXAP6JL5.js → chunk-4JHJ7YG2.js} +9 -9
  58. package/dist/cli-bundle/chunks/{chunk-P5BJOMBB.js → chunk-4TPFXE2R.js} +9 -9
  59. package/dist/cli-bundle/chunks/{chunk-XJDGS74Y.js → chunk-4ZKKZMLH.js} +8 -8
  60. package/dist/cli-bundle/chunks/{chunk-XJDGS74Y.js.map → chunk-4ZKKZMLH.js.map} +1 -1
  61. package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js → chunk-5HSAHRYA.js} +12 -12
  62. package/dist/cli-bundle/chunks/{chunk-ZLMIWZUG.js → chunk-5LMF75Q7.js} +2 -2
  63. package/dist/cli-bundle/chunks/{chunk-TK5VZFHY.js → chunk-6TBR5AZ2.js} +7 -7
  64. package/dist/cli-bundle/chunks/{chunk-ATEES5SX.js → chunk-6ZFTM65G.js} +2 -2
  65. package/dist/cli-bundle/chunks/{chunk-P2PSODAQ.js → chunk-7CRFV6JR.js} +111 -10
  66. package/dist/cli-bundle/chunks/chunk-7CRFV6JR.js.map +7 -0
  67. package/dist/cli-bundle/chunks/{chunk-VFUZV5EB.js → chunk-7SM7VA5I.js} +5 -5
  68. package/dist/cli-bundle/chunks/{chunk-GKIZW7SM.js → chunk-AAUYXSFF.js} +3 -3
  69. package/dist/cli-bundle/chunks/{chunk-FXRU333M.js → chunk-AGG32LKL.js} +111 -10
  70. package/dist/cli-bundle/chunks/chunk-AGG32LKL.js.map +1 -0
  71. package/dist/cli-bundle/chunks/{chunk-OASDW5UI.js → chunk-AUDDXKNX.js} +7 -7
  72. package/dist/cli-bundle/chunks/{chunk-ZMW77VWV.js → chunk-BVL5KGVA.js} +9 -9
  73. package/dist/cli-bundle/chunks/{chunk-4JCSYR6F.js → chunk-C24PWDFG.js} +3 -3
  74. package/dist/cli-bundle/chunks/{chunk-4HFU4UO2.js → chunk-CEGUH2E5.js} +3 -3
  75. package/dist/cli-bundle/chunks/{chunk-Y3YKK7CY.js → chunk-DWG4FHPY.js} +2 -2
  76. package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js +217 -0
  77. package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{chunk-YW6Q3RYZ.js → chunk-GFBEXDCQ.js} +7 -7
  79. package/dist/cli-bundle/chunks/{chunk-XMBI6TNW.js → chunk-GOO4UXBI.js} +4 -4
  80. package/dist/cli-bundle/chunks/{chunk-IGVJRZ6H.js → chunk-GRZGHGRG.js} +8 -8
  81. package/dist/cli-bundle/chunks/{chunk-E5DUIJA4.js → chunk-HLEGAQXT.js} +20 -7
  82. package/dist/cli-bundle/chunks/chunk-HLEGAQXT.js.map +7 -0
  83. package/dist/cli-bundle/chunks/chunk-HWHONML5.js +190 -0
  84. package/dist/cli-bundle/chunks/chunk-HWHONML5.js.map +7 -0
  85. package/dist/cli-bundle/chunks/{chunk-TNAP7EJX.js → chunk-HZOX5BYD.js} +2 -2
  86. package/dist/cli-bundle/chunks/{chunk-VSRZRLG3.js → chunk-IIOIBAQW.js} +3 -3
  87. package/dist/cli-bundle/chunks/{chunk-IUKD4W6Z.js → chunk-IXVSSHGV.js} +2 -2
  88. package/dist/cli-bundle/chunks/{chunk-WUNFKP7M.js → chunk-IZHCCG4S.js} +2 -2
  89. package/dist/cli-bundle/chunks/{chunk-VAOUX6TK.js → chunk-JCTZV7TO.js} +2 -2
  90. package/dist/cli-bundle/chunks/{chunk-ZYNJNPYD.js → chunk-JE5IZXDS.js} +4 -4
  91. package/dist/cli-bundle/chunks/{chunk-QNJSITCX.js → chunk-JW7D6437.js} +7 -7
  92. package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js → chunk-JWXTOYBI.js} +5 -5
  93. package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js → chunk-KHGTYCJ6.js} +12 -12
  94. package/dist/cli-bundle/chunks/{chunk-HI7STVF2.js → chunk-L6YQONLM.js} +11 -27
  95. package/dist/cli-bundle/chunks/chunk-L6YQONLM.js.map +1 -0
  96. package/dist/cli-bundle/chunks/{chunk-FY4SPXSC.js → chunk-LFW5NQUP.js} +59 -86
  97. package/dist/cli-bundle/chunks/chunk-LFW5NQUP.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-VPEAS7PS.js → chunk-LGOXXQUW.js} +2 -2
  99. package/dist/cli-bundle/chunks/{chunk-I2IJY2NL.js → chunk-LOAR5TKX.js} +2 -2
  100. package/dist/cli-bundle/chunks/{chunk-S26FESD4.js → chunk-LSSTKL3Y.js} +3 -3
  101. package/dist/cli-bundle/chunks/{chunk-CW6E4NAT.js → chunk-LYNQ3NGI.js} +8 -8
  102. package/dist/cli-bundle/chunks/{chunk-4YFAGDRH.js → chunk-M3SI2REU.js} +8 -8
  103. package/dist/cli-bundle/chunks/{chunk-73ZPG2I3.js → chunk-MACCNKSZ.js} +3 -3
  104. package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js → chunk-MGAQ6KZG.js} +20 -15
  105. package/dist/cli-bundle/chunks/{chunk-IKOH24GZ.js.map → chunk-MGAQ6KZG.js.map} +2 -2
  106. package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js +220 -0
  107. package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js.map +7 -0
  108. package/dist/cli-bundle/chunks/{chunk-P5U5EOMA.js → chunk-NN6RKGFW.js} +3 -3
  109. package/dist/cli-bundle/chunks/{chunk-GWZSYR6X.js → chunk-O3YCJOVX.js} +2 -2
  110. package/dist/cli-bundle/chunks/{chunk-7UGSRQCL.js → chunk-PEH7SZD2.js} +7 -7
  111. package/dist/cli-bundle/chunks/{chunk-7UGSRQCL.js.map → chunk-PEH7SZD2.js.map} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-UOO6BYIA.js → chunk-PNYAAB4S.js} +21 -188
  113. package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +1 -0
  114. package/dist/cli-bundle/chunks/{chunk-UUWGCWBU.js → chunk-QQG4HEX7.js} +3 -3
  115. package/dist/cli-bundle/chunks/{chunk-XTKJSVWH.js → chunk-QU3OPNVV.js} +2 -2
  116. package/dist/cli-bundle/chunks/{chunk-LCSCXBGT.js → chunk-R4VWYWRN.js} +19 -193
  117. package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +7 -0
  118. package/dist/cli-bundle/chunks/{chunk-PSD7F7DX.js → chunk-RFR2YQGO.js} +21 -8
  119. package/dist/cli-bundle/chunks/chunk-RFR2YQGO.js.map +1 -0
  120. package/dist/cli-bundle/chunks/{chunk-EWFY7SLA.js → chunk-RHYBR6G7.js} +8 -8
  121. package/dist/cli-bundle/chunks/{chunk-A6LXQFO7.js → chunk-S2CDTRJ6.js} +52 -79
  122. package/dist/cli-bundle/chunks/chunk-S2CDTRJ6.js.map +1 -0
  123. package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js → chunk-SGMGMCIF.js} +21 -16
  124. package/dist/cli-bundle/chunks/{chunk-J3GD64J2.js.map → chunk-SGMGMCIF.js.map} +1 -1
  125. package/dist/cli-bundle/chunks/{chunk-S2ZLDYGS.js → chunk-SOHXUA2Q.js} +4 -4
  126. package/dist/cli-bundle/chunks/{chunk-KWAXVAXX.js → chunk-SQDKAEKG.js} +4 -4
  127. package/dist/cli-bundle/chunks/{chunk-7IYFN5R7.js → chunk-TOX7YQ7X.js} +3 -3
  128. package/dist/cli-bundle/chunks/{chunk-FDH2X65L.js → chunk-TSXWFN3L.js} +2 -2
  129. package/dist/cli-bundle/chunks/{chunk-OLKBSY4N.js → chunk-UCVJP4JL.js} +2 -2
  130. package/dist/cli-bundle/chunks/{chunk-AVGHVVF7.js → chunk-V4KP3TCN.js} +3 -3
  131. package/dist/cli-bundle/chunks/{chunk-QKW5D45B.js → chunk-VNC2HBL4.js} +5 -5
  132. package/dist/cli-bundle/chunks/{chunk-QJMGRZO2.js → chunk-VYZNX4C5.js} +3 -3
  133. package/dist/cli-bundle/chunks/{chunk-5SCT2JCT.js → chunk-W6KNFAMZ.js} +2 -2
  134. package/dist/cli-bundle/chunks/{chunk-I53JBTJW.js → chunk-WLH7X4RN.js} +6 -6
  135. package/dist/cli-bundle/chunks/{chunk-ESANVZF4.js → chunk-XOYHMHFF.js} +3 -3
  136. package/dist/cli-bundle/chunks/{chunk-HGLC63AU.js → chunk-XWDZVCBJ.js} +8 -8
  137. package/dist/cli-bundle/chunks/{chunk-3KLPFWZ4.js → chunk-XXLMJDUB.js} +10 -26
  138. package/dist/cli-bundle/chunks/chunk-XXLMJDUB.js.map +7 -0
  139. package/dist/cli-bundle/chunks/chunk-Z647PYLD.js +187 -0
  140. package/dist/cli-bundle/chunks/chunk-Z647PYLD.js.map +1 -0
  141. package/dist/cli-bundle/chunks/{claim-MJ7DZFC3.js → claim-HE6KEGJW.js} +10 -10
  142. package/dist/cli-bundle/chunks/{claim-2RDYMCTP.js → claim-QJOQBH7J.js} +10 -10
  143. package/dist/cli-bundle/chunks/{close-XLEKIQSW.js → close-SPUFW5QR.js} +8 -8
  144. package/dist/cli-bundle/chunks/close-WOG5WTMZ.js +13 -0
  145. package/dist/cli-bundle/chunks/{close-many-AOD4HSAZ.js → close-many-GKAJX54X.js} +15 -15
  146. package/dist/cli-bundle/chunks/{close-many-XKAQY5CQ.js → close-many-GL6NRUU5.js} +15 -15
  147. package/dist/cli-bundle/chunks/{comments-RN5TG4ZN.js → comments-5FPT6L7N.js} +10 -10
  148. package/dist/cli-bundle/chunks/{comments-B4RWWDJT.js → comments-TOLOYWNI.js} +10 -10
  149. package/dist/cli-bundle/chunks/{config-3JXJ3XZ7.js → config-4MN45TIH.js} +8 -8
  150. package/dist/cli-bundle/chunks/{config-FZ4UDC4B.js → config-7N6D7YJE.js} +8 -8
  151. package/dist/cli-bundle/chunks/{context-QBPO3BFM.js → context-AQSLE7DZ.js} +13 -13
  152. package/dist/cli-bundle/chunks/{context-L36PIN35.js → context-U3PUJMVN.js} +13 -13
  153. package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js → contracts-H7KCQXLY.js} +4 -4
  154. package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js → contracts-ITSJXO3O.js} +4 -4
  155. package/dist/cli-bundle/chunks/{copy-ALU5WMHA.js → copy-C4W522JM.js} +7 -7
  156. package/dist/cli-bundle/chunks/{copy-FWIVTLBO.js → copy-EB3MUCSW.js} +7 -7
  157. package/dist/cli-bundle/chunks/{create-IFA26O2I.js → create-4EQNELMY.js} +13 -13
  158. package/dist/cli-bundle/chunks/create-NW3K7LVG.js +27 -0
  159. package/dist/cli-bundle/chunks/{delete-IYTIYAJS.js → delete-X5QLXIQX.js} +7 -7
  160. package/dist/cli-bundle/chunks/{delete-Y2SGJBGY.js → delete-ZLGUYIXU.js} +7 -7
  161. package/dist/cli-bundle/chunks/{deps-CZ4PTVXU.js → deps-GPB3LGWN.js} +7 -7
  162. package/dist/cli-bundle/chunks/{deps-6TSPOSGU.js → deps-HV2C2L46.js} +7 -7
  163. package/dist/cli-bundle/chunks/{docs-5WMBVQT2.js → docs-RJQPLROO.js} +11 -11
  164. package/dist/cli-bundle/chunks/docs-RJQPLROO.js.map +1 -0
  165. package/dist/cli-bundle/chunks/{docs-MB53UJAJ.js → docs-SRTLCQOL.js} +10 -10
  166. package/dist/cli-bundle/chunks/docs-SRTLCQOL.js.map +7 -0
  167. package/dist/cli-bundle/chunks/{extension-Q34OEWO5.js → extension-MM3TVWOO.js} +5 -5
  168. package/dist/cli-bundle/chunks/{extension-WH2FOIOZ.js → extension-WKPVPNCC.js} +5 -5
  169. package/dist/cli-bundle/chunks/{files-GVMNVLCB.js → files-LIFDKNCN.js} +10 -10
  170. package/dist/cli-bundle/chunks/files-LIFDKNCN.js.map +7 -0
  171. package/dist/cli-bundle/chunks/{files-DLB5LJEP.js → files-OIFN3DQX.js} +11 -11
  172. package/dist/cli-bundle/chunks/files-OIFN3DQX.js.map +1 -0
  173. package/dist/cli-bundle/chunks/{gc-4Z3IKHAZ.js → gc-DL6AVOX5.js} +12 -181
  174. package/dist/cli-bundle/chunks/gc-DL6AVOX5.js.map +7 -0
  175. package/dist/cli-bundle/chunks/{gc-2WEPW6D6.js → gc-NRFHLVFT.js} +14 -176
  176. package/dist/cli-bundle/chunks/gc-NRFHLVFT.js.map +1 -0
  177. package/dist/cli-bundle/chunks/{get-QARTE6BL.js → get-K7UULTQF.js} +11 -11
  178. package/dist/cli-bundle/chunks/{get-PCHS7RA6.js → get-SAB7CRBG.js} +11 -11
  179. package/dist/cli-bundle/chunks/{health-4ZYB3IYQ.js → health-NUVZYIEV.js} +83 -16
  180. package/dist/cli-bundle/chunks/health-NUVZYIEV.js.map +1 -0
  181. package/dist/cli-bundle/chunks/{health-YO5LRWN4.js → health-VJWH3ZFK.js} +82 -15
  182. package/dist/cli-bundle/chunks/health-VJWH3ZFK.js.map +7 -0
  183. package/dist/cli-bundle/chunks/{history-7WUAEWHW.js → history-GYFD2DJW.js} +10 -10
  184. package/dist/cli-bundle/chunks/history-IUVN4NTN.js +20 -0
  185. package/dist/cli-bundle/chunks/{history-compact-3EJ3L2O7.js → history-compact-SLL6ESXH.js} +11 -11
  186. package/dist/cli-bundle/chunks/{history-compact-LW27IPFK.js → history-compact-WQZQ6KXM.js} +11 -11
  187. package/dist/cli-bundle/chunks/history-redact-75KIIJUJ.js +19 -0
  188. package/dist/cli-bundle/chunks/{history-redact-G72A4EJ4.js → history-redact-SDTDR6WM.js} +11 -11
  189. package/dist/cli-bundle/chunks/{history-repair-RUGKD3YR.js → history-repair-BJCGM6Q3.js} +72 -14
  190. package/dist/cli-bundle/chunks/history-repair-BJCGM6Q3.js.map +1 -0
  191. package/dist/cli-bundle/chunks/{history-repair-KVPFJKOS.js → history-repair-UCYS55ZX.js} +71 -13
  192. package/dist/cli-bundle/chunks/history-repair-UCYS55ZX.js.map +7 -0
  193. package/dist/cli-bundle/chunks/init-JJFYRUKG.js +17 -0
  194. package/dist/cli-bundle/chunks/{init-S5WEGUJY.js → init-MXV57LKL.js} +9 -9
  195. package/dist/cli-bundle/chunks/{learnings-HQXSSKZ5.js → learnings-L6KTZGOT.js} +10 -10
  196. package/dist/cli-bundle/chunks/{learnings-XK3P4ZDR.js → learnings-QKJOKEAO.js} +10 -10
  197. package/dist/cli-bundle/chunks/{list-6CL3XFT6.js → list-GGVPXEV6.js} +10 -10
  198. package/dist/cli-bundle/chunks/list-VOQDQHA4.js +19 -0
  199. package/dist/cli-bundle/chunks/{notes-5T6P7C5V.js → notes-3NLK7WTZ.js} +10 -10
  200. package/dist/cli-bundle/chunks/{notes-U5FZCSBT.js → notes-HMCB7TK6.js} +10 -10
  201. package/dist/cli-bundle/chunks/{plan-VNUG3WZZ.js → plan-DWBYI5C6.js} +63 -23
  202. package/dist/cli-bundle/chunks/plan-DWBYI5C6.js.map +1 -0
  203. package/dist/cli-bundle/chunks/{plan-FQLMJRLZ.js → plan-NANUWH4T.js} +62 -22
  204. package/dist/cli-bundle/chunks/plan-NANUWH4T.js.map +7 -0
  205. package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js → register-list-query-PWQ5F2VI.js} +18 -18
  206. package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js → register-list-query-SMMMLSWW.js} +18 -18
  207. package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js → register-mutation-QKFPTIZG.js} +64 -47
  208. package/dist/cli-bundle/chunks/{register-mutation-EAYNLGOS.js.map → register-mutation-QKFPTIZG.js.map} +2 -2
  209. package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js → register-mutation-ZYJQ4DVP.js} +65 -48
  210. package/dist/cli-bundle/chunks/{register-mutation-DG53FCBV.js.map → register-mutation-ZYJQ4DVP.js.map} +1 -1
  211. package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js → register-operations-2FMZ6WEF.js} +37 -33
  212. package/dist/cli-bundle/chunks/{register-operations-FWFE64JG.js.map → register-operations-2FMZ6WEF.js.map} +2 -2
  213. package/dist/cli-bundle/chunks/{register-operations-AM6KTWB6.js → register-operations-BAFQURZG.js} +38 -34
  214. package/dist/cli-bundle/chunks/register-operations-BAFQURZG.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{register-setup-G4QYI3RX.js → register-setup-DQEIKBIP.js} +30 -30
  216. package/dist/cli-bundle/chunks/register-setup-DQEIKBIP.js.map +7 -0
  217. package/dist/cli-bundle/chunks/{register-setup-IKX5524L.js → register-setup-QN2XV7UL.js} +31 -31
  218. package/dist/cli-bundle/chunks/register-setup-QN2XV7UL.js.map +1 -0
  219. package/dist/cli-bundle/chunks/restore-DRBNXJJH.js +17 -0
  220. package/dist/cli-bundle/chunks/{restore-M6AFHMV4.js → restore-FJQWXMPY.js} +11 -11
  221. package/dist/cli-bundle/chunks/{schema-AINZ2IMM.js → schema-RNVJ55V2.js} +8 -8
  222. package/dist/cli-bundle/chunks/{schema-76HDZJCC.js → schema-ZZ7ZDM2X.js} +8 -8
  223. package/dist/cli-bundle/chunks/{search-JMLFQEPJ.js → search-BJ457C2A.js} +10 -10
  224. package/dist/cli-bundle/chunks/{search-NL3TSCYB.js → search-FQDZXX7P.js} +10 -10
  225. package/dist/cli-bundle/chunks/{stats-UBD56TGK.js → stats-CUG3ZHOI.js} +7 -7
  226. package/dist/cli-bundle/chunks/{stats-BKXCBIGT.js → stats-DUQWCVOS.js} +7 -7
  227. package/dist/cli-bundle/chunks/{telemetry-ZJXK3H7X.js → telemetry-33MRGX4Z.js} +4 -4
  228. package/dist/cli-bundle/chunks/{telemetry-N454RHG5.js → telemetry-RK2VX75A.js} +4 -4
  229. package/dist/cli-bundle/chunks/test-SDMYEQHH.js +32 -0
  230. package/dist/cli-bundle/chunks/{test-BQAKIXAT.js → test-Y3CTFMEC.js} +14 -14
  231. package/dist/cli-bundle/chunks/{test-all-7LV3I6S5.js → test-all-ANYQ33O2.js} +14 -14
  232. package/dist/cli-bundle/chunks/{test-all-TDYCCBA4.js → test-all-ARSMX33Q.js} +14 -14
  233. package/dist/cli-bundle/chunks/{test-runs-E64M6XS3.js → test-runs-5URSD34O.js} +5 -5
  234. package/dist/cli-bundle/chunks/{test-runs-LXZLULCI.js → test-runs-XNACGSNQ.js} +5 -5
  235. package/dist/cli-bundle/chunks/update-PD46VOXI.js +21 -0
  236. package/dist/cli-bundle/chunks/update-U235A7WP.js +25 -0
  237. package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js → update-many-6B7PJ33I.js} +22 -22
  238. package/dist/cli-bundle/chunks/{update-many-TUGU5YXQ.js → update-many-724JCVDE.js} +22 -22
  239. package/dist/cli-bundle/chunks/{upgrade-37F7JKES.js → upgrade-ALBEZAI7.js} +5 -5
  240. package/dist/cli-bundle/chunks/{upgrade-L32JA4TZ.js → upgrade-QHRGDBSA.js} +5 -5
  241. package/dist/cli-bundle/chunks/{validate-EQTT6WVX.js → validate-IQRYFXIV.js} +462 -50
  242. package/dist/cli-bundle/chunks/validate-IQRYFXIV.js.map +1 -0
  243. package/dist/cli-bundle/chunks/{validate-XN4I4DPL.js → validate-UY6DRCG5.js} +482 -49
  244. package/dist/cli-bundle/chunks/validate-UY6DRCG5.js.map +7 -0
  245. package/dist/cli-bundle/main.js +72 -24
  246. package/dist/cli-bundle/main.js.map +3 -3
  247. package/dist/core/diagnostics/remediation.js +19 -6
  248. package/dist/core/diagnostics/remediation.js.map +1 -1
  249. package/dist/core/extensions/extension-capability-aliases.js +7 -33
  250. package/dist/core/extensions/extension-capability-aliases.js.map +1 -1
  251. package/dist/core/lock/lock-gc.d.ts +31 -0
  252. package/dist/core/lock/lock-gc.js +120 -62
  253. package/dist/core/lock/lock-gc.js.map +1 -1
  254. package/dist/core/search/background-refresh.js +3 -3
  255. package/dist/core/search/background-refresh.js.map +1 -1
  256. package/dist/core/shared/errors.d.ts +3 -0
  257. package/dist/core/shared/errors.js +2 -2
  258. package/dist/core/shared/errors.js.map +1 -1
  259. package/dist/core/store/item-store.js +6 -22
  260. package/dist/core/store/item-store.js.map +1 -1
  261. package/dist/core/telemetry/consent.js +18 -3
  262. package/dist/core/telemetry/consent.js.map +1 -1
  263. package/dist/core/validate/fix-planning.d.ts +130 -0
  264. package/dist/core/validate/fix-planning.js +202 -0
  265. package/dist/core/validate/fix-planning.js.map +1 -0
  266. package/dist/core/validate/missing-by-type.d.ts +21 -0
  267. package/dist/core/validate/missing-by-type.js +39 -0
  268. package/dist/core/validate/missing-by-type.js.map +1 -0
  269. package/dist/core/validate/stale-file-classification.d.ts +41 -0
  270. package/dist/core/validate/stale-file-classification.js +73 -0
  271. package/dist/core/validate/stale-file-classification.js.map +1 -0
  272. package/dist/mcp/server.d.ts +1 -0
  273. package/dist/mcp/server.js +62 -9
  274. package/dist/mcp/server.js.map +1 -1
  275. package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
  276. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  277. package/dist/sdk/cli-contracts.d.ts +6 -1
  278. package/dist/sdk/cli-contracts.js +74 -7
  279. package/dist/sdk/cli-contracts.js.map +1 -1
  280. package/docs/AGENT_GUIDE.md +6 -1
  281. package/docs/COMMANDS.md +23 -1
  282. package/package.json +1 -1
  283. package/plugins/pm-claude/README.md +4 -12
  284. package/dist/cli-bundle/chunks/activity-XZIUPGZH.js +0 -16
  285. package/dist/cli-bundle/chunks/chunk-3KLPFWZ4.js.map +0 -7
  286. package/dist/cli-bundle/chunks/chunk-A6LXQFO7.js.map +0 -1
  287. package/dist/cli-bundle/chunks/chunk-E5DUIJA4.js.map +0 -7
  288. package/dist/cli-bundle/chunks/chunk-FXRU333M.js.map +0 -1
  289. package/dist/cli-bundle/chunks/chunk-FY4SPXSC.js.map +0 -7
  290. package/dist/cli-bundle/chunks/chunk-HI7STVF2.js.map +0 -1
  291. package/dist/cli-bundle/chunks/chunk-LCSCXBGT.js.map +0 -7
  292. package/dist/cli-bundle/chunks/chunk-P2PSODAQ.js.map +0 -7
  293. package/dist/cli-bundle/chunks/chunk-PSD7F7DX.js.map +0 -1
  294. package/dist/cli-bundle/chunks/chunk-UOO6BYIA.js.map +0 -1
  295. package/dist/cli-bundle/chunks/close-4FMAPEMY.js +0 -13
  296. package/dist/cli-bundle/chunks/create-JVXYHYH4.js +0 -27
  297. package/dist/cli-bundle/chunks/docs-5WMBVQT2.js.map +0 -1
  298. package/dist/cli-bundle/chunks/docs-MB53UJAJ.js.map +0 -7
  299. package/dist/cli-bundle/chunks/files-DLB5LJEP.js.map +0 -1
  300. package/dist/cli-bundle/chunks/files-GVMNVLCB.js.map +0 -7
  301. package/dist/cli-bundle/chunks/gc-2WEPW6D6.js.map +0 -1
  302. package/dist/cli-bundle/chunks/gc-4Z3IKHAZ.js.map +0 -7
  303. package/dist/cli-bundle/chunks/health-4ZYB3IYQ.js.map +0 -1
  304. package/dist/cli-bundle/chunks/health-YO5LRWN4.js.map +0 -7
  305. package/dist/cli-bundle/chunks/history-L2FQFRTU.js +0 -20
  306. package/dist/cli-bundle/chunks/history-redact-QWQCX5DZ.js +0 -19
  307. package/dist/cli-bundle/chunks/history-repair-KVPFJKOS.js.map +0 -7
  308. package/dist/cli-bundle/chunks/history-repair-RUGKD3YR.js.map +0 -1
  309. package/dist/cli-bundle/chunks/init-4BKRHGWW.js +0 -17
  310. package/dist/cli-bundle/chunks/list-BYNN4ZEO.js +0 -19
  311. package/dist/cli-bundle/chunks/plan-FQLMJRLZ.js.map +0 -7
  312. package/dist/cli-bundle/chunks/plan-VNUG3WZZ.js.map +0 -1
  313. package/dist/cli-bundle/chunks/register-operations-AM6KTWB6.js.map +0 -1
  314. package/dist/cli-bundle/chunks/register-setup-G4QYI3RX.js.map +0 -7
  315. package/dist/cli-bundle/chunks/register-setup-IKX5524L.js.map +0 -1
  316. package/dist/cli-bundle/chunks/restore-CHIOQAQL.js +0 -17
  317. package/dist/cli-bundle/chunks/test-O74JFUH5.js +0 -32
  318. package/dist/cli-bundle/chunks/update-2EVXOC7V.js +0 -21
  319. package/dist/cli-bundle/chunks/update-5A2B6QYB.js +0 -25
  320. package/dist/cli-bundle/chunks/validate-EQTT6WVX.js.map +0 -1
  321. package/dist/cli-bundle/chunks/validate-XN4I4DPL.js.map +0 -7
  322. /package/dist/cli-bundle/chunks/{activity-XADJOG6G.js.map → activity-PPO7QWJF.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{activity-XZIUPGZH.js.map → activity-XIOTGZMU.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{aggregate-6OTS3AOO.js.map → aggregate-IRHJWEKG.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{aggregate-OD36DJU5.js.map → aggregate-XEBW22UQ.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{append-JYWO4P7W.js.map → append-N2AWXKZC.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{append-KG55G7S3.js.map → append-NL67JNJU.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-IH4MBKK7.js.map → chunk-2ANTZBYF.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-F75JSIOZ.js.map → chunk-2J2AH4V5.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-CCX4RSYZ.js.map → chunk-32XSW44C.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-DY6C42S6.js.map → chunk-36BCSMKP.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-XUC4C4PT.js.map → chunk-3CQPVBK3.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-SXKNJPQ7.js.map → chunk-3FMQMHAG.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-I7NYDZDV.js.map → chunk-3VULHQNS.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-HHHJ2GI3.js.map → chunk-4FHLNNW7.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-RXAP6JL5.js.map → chunk-4JHJ7YG2.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-P5BJOMBB.js.map → chunk-4TPFXE2R.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-3SLOMKCJ.js.map → chunk-5HSAHRYA.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-ZLMIWZUG.js.map → chunk-5LMF75Q7.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{chunk-TK5VZFHY.js.map → chunk-6TBR5AZ2.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{chunk-ATEES5SX.js.map → chunk-6ZFTM65G.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{chunk-VFUZV5EB.js.map → chunk-7SM7VA5I.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{chunk-GKIZW7SM.js.map → chunk-AAUYXSFF.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{chunk-OASDW5UI.js.map → chunk-AUDDXKNX.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-ZMW77VWV.js.map → chunk-BVL5KGVA.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-4JCSYR6F.js.map → chunk-C24PWDFG.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-4HFU4UO2.js.map → chunk-CEGUH2E5.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-Y3YKK7CY.js.map → chunk-DWG4FHPY.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-YW6Q3RYZ.js.map → chunk-GFBEXDCQ.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-XMBI6TNW.js.map → chunk-GOO4UXBI.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-IGVJRZ6H.js.map → chunk-GRZGHGRG.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{chunk-TNAP7EJX.js.map → chunk-HZOX5BYD.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{chunk-VSRZRLG3.js.map → chunk-IIOIBAQW.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{chunk-IUKD4W6Z.js.map → chunk-IXVSSHGV.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{chunk-WUNFKP7M.js.map → chunk-IZHCCG4S.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{chunk-VAOUX6TK.js.map → chunk-JCTZV7TO.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{chunk-ZYNJNPYD.js.map → chunk-JE5IZXDS.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{chunk-QNJSITCX.js.map → chunk-JW7D6437.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{chunk-B65UUCGQ.js.map → chunk-JWXTOYBI.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{chunk-7RIT3OCD.js.map → chunk-KHGTYCJ6.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{chunk-VPEAS7PS.js.map → chunk-LGOXXQUW.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{chunk-I2IJY2NL.js.map → chunk-LOAR5TKX.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{chunk-S26FESD4.js.map → chunk-LSSTKL3Y.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{chunk-CW6E4NAT.js.map → chunk-LYNQ3NGI.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{chunk-4YFAGDRH.js.map → chunk-M3SI2REU.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{chunk-73ZPG2I3.js.map → chunk-MACCNKSZ.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{chunk-P5U5EOMA.js.map → chunk-NN6RKGFW.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-GWZSYR6X.js.map → chunk-O3YCJOVX.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-UUWGCWBU.js.map → chunk-QQG4HEX7.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-XTKJSVWH.js.map → chunk-QU3OPNVV.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-EWFY7SLA.js.map → chunk-RHYBR6G7.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{chunk-S2ZLDYGS.js.map → chunk-SOHXUA2Q.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-KWAXVAXX.js.map → chunk-SQDKAEKG.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-7IYFN5R7.js.map → chunk-TOX7YQ7X.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-FDH2X65L.js.map → chunk-TSXWFN3L.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-OLKBSY4N.js.map → chunk-UCVJP4JL.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-AVGHVVF7.js.map → chunk-V4KP3TCN.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-QKW5D45B.js.map → chunk-VNC2HBL4.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-QJMGRZO2.js.map → chunk-VYZNX4C5.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-5SCT2JCT.js.map → chunk-W6KNFAMZ.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-I53JBTJW.js.map → chunk-WLH7X4RN.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-ESANVZF4.js.map → chunk-XOYHMHFF.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{chunk-HGLC63AU.js.map → chunk-XWDZVCBJ.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{claim-MJ7DZFC3.js.map → claim-HE6KEGJW.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{claim-2RDYMCTP.js.map → claim-QJOQBH7J.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{close-XLEKIQSW.js.map → close-SPUFW5QR.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{close-4FMAPEMY.js.map → close-WOG5WTMZ.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{close-many-AOD4HSAZ.js.map → close-many-GKAJX54X.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{close-many-XKAQY5CQ.js.map → close-many-GL6NRUU5.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{comments-RN5TG4ZN.js.map → comments-5FPT6L7N.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{comments-B4RWWDJT.js.map → comments-TOLOYWNI.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{config-3JXJ3XZ7.js.map → config-4MN45TIH.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{config-FZ4UDC4B.js.map → config-7N6D7YJE.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{context-QBPO3BFM.js.map → context-AQSLE7DZ.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{context-L36PIN35.js.map → context-U3PUJMVN.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{contracts-MIXBWJIB.js.map → contracts-H7KCQXLY.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{contracts-3NKWYKKU.js.map → contracts-ITSJXO3O.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{copy-ALU5WMHA.js.map → copy-C4W522JM.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{copy-FWIVTLBO.js.map → copy-EB3MUCSW.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{create-IFA26O2I.js.map → create-4EQNELMY.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{create-JVXYHYH4.js.map → create-NW3K7LVG.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{delete-IYTIYAJS.js.map → delete-X5QLXIQX.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{delete-Y2SGJBGY.js.map → delete-ZLGUYIXU.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{deps-CZ4PTVXU.js.map → deps-GPB3LGWN.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{deps-6TSPOSGU.js.map → deps-HV2C2L46.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{extension-Q34OEWO5.js.map → extension-MM3TVWOO.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{extension-WH2FOIOZ.js.map → extension-WKPVPNCC.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{get-QARTE6BL.js.map → get-K7UULTQF.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{get-PCHS7RA6.js.map → get-SAB7CRBG.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{history-7WUAEWHW.js.map → history-GYFD2DJW.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{history-L2FQFRTU.js.map → history-IUVN4NTN.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{history-compact-3EJ3L2O7.js.map → history-compact-SLL6ESXH.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{history-compact-LW27IPFK.js.map → history-compact-WQZQ6KXM.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{history-redact-QWQCX5DZ.js.map → history-redact-75KIIJUJ.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{history-redact-G72A4EJ4.js.map → history-redact-SDTDR6WM.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{init-4BKRHGWW.js.map → init-JJFYRUKG.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{init-S5WEGUJY.js.map → init-MXV57LKL.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{learnings-HQXSSKZ5.js.map → learnings-L6KTZGOT.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{learnings-XK3P4ZDR.js.map → learnings-QKJOKEAO.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{list-6CL3XFT6.js.map → list-GGVPXEV6.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{list-BYNN4ZEO.js.map → list-VOQDQHA4.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{notes-5T6P7C5V.js.map → notes-3NLK7WTZ.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{notes-U5FZCSBT.js.map → notes-HMCB7TK6.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{register-list-query-VHDXWEPP.js.map → register-list-query-PWQ5F2VI.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{register-list-query-NPE3ECJQ.js.map → register-list-query-SMMMLSWW.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{restore-CHIOQAQL.js.map → restore-DRBNXJJH.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{restore-M6AFHMV4.js.map → restore-FJQWXMPY.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{schema-AINZ2IMM.js.map → schema-RNVJ55V2.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{schema-76HDZJCC.js.map → schema-ZZ7ZDM2X.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{search-JMLFQEPJ.js.map → search-BJ457C2A.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{search-NL3TSCYB.js.map → search-FQDZXX7P.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{stats-UBD56TGK.js.map → stats-CUG3ZHOI.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{stats-BKXCBIGT.js.map → stats-DUQWCVOS.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{telemetry-ZJXK3H7X.js.map → telemetry-33MRGX4Z.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{telemetry-N454RHG5.js.map → telemetry-RK2VX75A.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{test-O74JFUH5.js.map → test-SDMYEQHH.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{test-BQAKIXAT.js.map → test-Y3CTFMEC.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{test-all-7LV3I6S5.js.map → test-all-ANYQ33O2.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{test-all-TDYCCBA4.js.map → test-all-ARSMX33Q.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{test-runs-E64M6XS3.js.map → test-runs-5URSD34O.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{test-runs-LXZLULCI.js.map → test-runs-XNACGSNQ.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{update-2EVXOC7V.js.map → update-PD46VOXI.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{update-5A2B6QYB.js.map → update-U235A7WP.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{update-many-V4LA3C4H.js.map → update-many-6B7PJ33I.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{update-many-TUGU5YXQ.js.map → update-many-724JCVDE.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{upgrade-37F7JKES.js.map → upgrade-ALBEZAI7.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{upgrade-L32JA4TZ.js.map → upgrade-QHRGDBSA.js.map} +0 -0
@@ -6,6 +6,8 @@ export interface DocsCommandOptions {
6
6
  addGlob?: string[];
7
7
  remove?: string[];
8
8
  migrate?: string[];
9
+ /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */
10
+ note?: string;
9
11
  list?: boolean;
10
12
  validatePaths?: boolean;
11
13
  audit?: boolean;
@@ -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]="c472c425-e416-5ea3-b562-6a5aa7642b1d")}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]="4a210017-20fc-5725-9b04-750255ff66ef")}catch(e){}}();
3
3
  import { renameArtifactsResultKey, runLinkedArtifacts, } from "./linked-artifacts.js";
4
4
  export async function runDocs(id, options, global) {
5
5
  const result = await runLinkedArtifacts(id, options, global, {
@@ -11,4 +11,4 @@ export async function runDocs(id, options, global) {
11
11
  return renameArtifactsResultKey(result, "docs");
12
12
  }
13
13
  //# sourceMappingURL=docs.js.map
14
- //# debugId=c472c425-e416-5ea3-b562-6a5aa7642b1d
14
+ //# debugId=4a210017-20fc-5725-9b04-750255ff66ef
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sources":["cli/commands/docs.ts"],"sourceRoot":"/","sourcesContent":["import type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { LinkedDoc } from \"../../types/index.js\";\nimport {\n renameArtifactsResultKey,\n runLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\nexport interface DocsCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n list?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface DocsResult {\n id: string;\n docs: LinkedDoc[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\nexport async function runDocs(id: string, options: DocsCommandOptions, global: GlobalOptions): Promise<DocsResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"docs\",\n op: \"docs_add\",\n bareNoun: \"doc\",\n supportsAppendStable: false,\n });\n return renameArtifactsResultKey(result, \"docs\") as unknown as DocsResult;\n}\n"],"names":[],"mappings":";;AAEA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,GAInB,MAAM,uBAAuB,CAAC;AAyB/B,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAAU,EAAE,OAA2B,EAAE,MAAqB;IAC1F,MAAM,MAAM,GAAyB,MAAM,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACjF,WAAW,EAAE,MAAM;QACnB,EAAE,EAAE,UAAU;QACd,QAAQ,EAAE,KAAK;QACf,oBAAoB,EAAE,KAAK;KAC5B,CAAC,CAAC;IACH,OAAO,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAA0B,CAAC;AAC3E,CAAC","debugId":"c472c425-e416-5ea3-b562-6a5aa7642b1d"}
1
+ {"version":3,"file":"docs.js","sources":["cli/commands/docs.ts"],"sourceRoot":"/","sourcesContent":["import type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { LinkedDoc } from \"../../types/index.js\";\nimport {\n renameArtifactsResultKey,\n runLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\nexport interface DocsCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */\n note?: string;\n list?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface DocsResult {\n id: string;\n docs: LinkedDoc[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\nexport async function runDocs(id: string, options: DocsCommandOptions, global: GlobalOptions): Promise<DocsResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"docs\",\n op: \"docs_add\",\n bareNoun: \"doc\",\n supportsAppendStable: false,\n });\n return renameArtifactsResultKey(result, \"docs\") as unknown as DocsResult;\n}\n"],"names":[],"mappings":";;AAEA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,GAInB,MAAM,uBAAuB,CAAC;AA2B/B,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAAU,EAAE,OAA2B,EAAE,MAAqB;IAC1F,MAAM,MAAM,GAAyB,MAAM,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACjF,WAAW,EAAE,MAAM;QACnB,EAAE,EAAE,UAAU;QACd,QAAQ,EAAE,KAAK;QACf,oBAAoB,EAAE,KAAK;KAC5B,CAAC,CAAC;IACH,OAAO,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAA0B,CAAC;AAC3E,CAAC","debugId":"4a210017-20fc-5725-9b04-750255ff66ef"}
@@ -6,6 +6,8 @@ export interface FilesCommandOptions {
6
6
  addGlob?: string[];
7
7
  remove?: string[];
8
8
  migrate?: string[];
9
+ /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */
10
+ note?: string;
9
11
  list?: boolean;
10
12
  appendStable?: boolean;
11
13
  validatePaths?: boolean;
@@ -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]="883ae96b-499a-523b-8bd9-33d06f168517")}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]="b10d1d4c-80ae-5c19-b212-1f7203d3c0f4")}catch(e){}}();
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import { pathExists } from "../../core/fs/fs-utils.js";
@@ -258,4 +258,4 @@ export async function runFilesDiscover(id, options, global) {
258
258
  };
259
259
  }
260
260
  //# sourceMappingURL=files.js.map
261
- //# debugId=883ae96b-499a-523b-8bd9-33d06f168517
261
+ //# debugId=b10d1d4c-80ae-5c19-b212-1f7203d3c0f4
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sources":["cli/commands/files.ts"],"sourceRoot":"/","sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { isPathWithinDirectory } from \"../../core/fs/path-utils.js\";\nimport type { ItemDocument, LinkedFile, LinkScope } from \"../../types/index.js\";\nimport {\n dedupeLinkedArtifacts,\n normalizeLinkedPath,\n renameArtifactsResultKey,\n runLinkedArtifacts,\n sortLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\nexport interface FilesCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n list?: boolean;\n appendStable?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface FilesDiscoverOptions {\n apply?: boolean;\n appendStable?: boolean;\n note?: string;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface FilesDiscoveryCandidate {\n path: string;\n scope: LinkScope;\n status: \"addable\" | \"already_linked\";\n source_count: number;\n source_fields: string[];\n original_paths: string[];\n}\n\nexport interface FilesResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\nexport interface FilesDiscoverResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n apply: boolean;\n count: number;\n candidate_count: number;\n addable_count: number;\n added_count: number;\n skipped_existing_count: number;\n candidates: FilesDiscoveryCandidate[];\n added: LinkedFile[];\n skipped_existing: FilesDiscoveryCandidate[];\n}\n\ninterface TextReference {\n field: string;\n value: string;\n}\n\ninterface RawPathReference {\n field: string;\n value: string;\n}\n\nfunction normalizeCandidatePathForOutput(value: string): string {\n return normalizeLinkedPath(path.normalize(value));\n}\n\nasync function realpathForContainment(inputPath: string): Promise<string> {\n try {\n return await fs.realpath(inputPath);\n } catch {\n return path.resolve(inputPath);\n }\n}\n\nfunction linkedFileResolvedKey(linkedFile: Pick<LinkedFile, \"path\" | \"scope\">, projectRoot: string): string {\n const resolvedPath = path.isAbsolute(linkedFile.path)\n ? path.resolve(linkedFile.path)\n : path.resolve(projectRoot, linkedFile.path);\n return `${normalizeCandidatePathForOutput(resolvedPath)}::${linkedFile.scope}`;\n}\n\nfunction collectTextReferences(value: unknown, fieldPath: string, references: TextReference[]): void {\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (trimmed.length > 0) {\n references.push({ field: fieldPath, value: trimmed });\n }\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((entry, index) => collectTextReferences(entry, `${fieldPath}[${index}]`, references));\n return;\n }\n if (typeof value === \"object\" && value !== null) {\n for (const [key, nested] of Object.entries(value)) {\n collectTextReferences(nested, fieldPath ? `${fieldPath}.${key}` : key, references);\n }\n }\n}\n\nfunction collectItemTextReferences(document: ItemDocument): TextReference[] {\n const references: TextReference[] = [];\n collectTextReferences(document.metadata, \"metadata\", references);\n collectTextReferences(document.body, \"body\", references);\n return references;\n}\n\nfunction cleanupPathToken(value: string): string {\n let next = value.trim();\n next = next.replace(/^[`\"'<([{]+/u, \"\");\n next = next.replace(/[`\"'>)\\]},;!?]+$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n next = next.replace(/:(?:\\d+)(?::\\d+)?$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n return next;\n}\n\nfunction extractRawPathReferences(references: TextReference[]): RawPathReference[] {\n const rawReferences: RawPathReference[] = [];\n const absolutePattern = /(?:[A-Za-z]:[\\\\/]|\\/)[^\\s\"'`<>()\\[\\]{},;]+/gu;\n const relativePattern =\n /(?:\\.{1,2}[\\\\/])?(?:(?:[A-Za-z0-9_.@-]+[\\\\/])+[A-Za-z0-9_.@-]+|[A-Za-z0-9_.@-]+\\.[A-Za-z0-9][A-Za-z0-9._-]*)/gu;\n for (const reference of references) {\n const seenInField = new Set<string>();\n for (const pattern of [absolutePattern, relativePattern]) {\n pattern.lastIndex = 0;\n for (const match of reference.value.matchAll(pattern)) {\n const token = cleanupPathToken(match[0] ?? \"\");\n if (!token || seenInField.has(token)) {\n continue;\n }\n seenInField.add(token);\n rawReferences.push({ field: reference.field, value: token });\n }\n }\n }\n return rawReferences;\n}\n\nasync function resolveDiscoveredFile(\n rawPath: string,\n projectRoot: string,\n): Promise<Pick<LinkedFile, \"path\" | \"scope\"> | undefined> {\n const absolutePath = path.isAbsolute(rawPath) ? path.resolve(rawPath) : path.resolve(projectRoot, rawPath);\n let stats;\n try {\n stats = await fs.stat(absolutePath);\n } catch {\n return undefined;\n }\n if (!stats.isFile()) {\n return undefined;\n }\n const [canonicalProjectRoot, canonicalAbsolutePath] = await Promise.all([\n realpathForContainment(projectRoot),\n realpathForContainment(absolutePath),\n ]);\n if (isPathWithinDirectory(canonicalProjectRoot, canonicalAbsolutePath)) {\n const relativePath = path.relative(canonicalProjectRoot, canonicalAbsolutePath);\n if (!relativePath || relativePath.startsWith(\"..\") || path.isAbsolute(relativePath)) {\n return undefined;\n }\n return {\n path: normalizeCandidatePathForOutput(relativePath),\n scope: \"project\",\n };\n }\n return {\n path: normalizeCandidatePathForOutput(absolutePath),\n scope: \"global\",\n };\n}\n\nasync function discoverReferencedFiles(document: ItemDocument, projectRoot: string): Promise<FilesDiscoveryCandidate[]> {\n const existingResolvedKeys = new Set((document.metadata.files ?? []).map((entry) => linkedFileResolvedKey(entry, projectRoot)));\n const grouped = new Map<\n string,\n {\n path: string;\n scope: LinkScope;\n sourceFields: Set<string>;\n originalPaths: Set<string>;\n sourceCount: number;\n }\n >();\n const rawReferences = extractRawPathReferences(collectItemTextReferences(document));\n for (const reference of rawReferences) {\n const resolved = await resolveDiscoveredFile(reference.value, projectRoot);\n if (!resolved) {\n continue;\n }\n const key = linkedFileResolvedKey(resolved, projectRoot);\n const existing = grouped.get(key) ?? {\n path: resolved.path,\n scope: resolved.scope,\n sourceFields: new Set<string>(),\n originalPaths: new Set<string>(),\n sourceCount: 0,\n };\n existing.sourceFields.add(reference.field);\n existing.originalPaths.add(reference.value);\n existing.sourceCount += 1;\n grouped.set(key, existing);\n }\n return [...grouped.entries()]\n .map(([key, entry]) => ({\n path: entry.path,\n scope: entry.scope,\n status: existingResolvedKeys.has(key) ? (\"already_linked\" as const) : (\"addable\" as const),\n source_count: entry.sourceCount,\n source_fields: [...entry.sourceFields].sort((left, right) => left.localeCompare(right)),\n original_paths: [...entry.originalPaths].sort((left, right) => left.localeCompare(right)),\n }))\n .sort((left, right) => {\n const byStatus = left.status.localeCompare(right.status);\n if (byStatus !== 0) return byStatus;\n const byPath = left.path.localeCompare(right.path);\n if (byPath !== 0) return byPath;\n return left.scope.localeCompare(right.scope);\n });\n}\n\nexport async function runFiles(id: string, options: FilesCommandOptions, global: GlobalOptions): Promise<FilesResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"files\",\n op: \"files_add\",\n bareNoun: \"file\",\n supportsAppendStable: true,\n });\n return renameArtifactsResultKey(result, \"files\") as unknown as FilesResult;\n}\n\nexport async function runFilesDiscover(\n id: string,\n options: FilesDiscoverOptions,\n global: GlobalOptions,\n): Promise<FilesDiscoverResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const candidates = await discoverReferencedFiles(loaded.document, process.cwd());\n const addableCandidates = candidates.filter((candidate) => candidate.status === \"addable\");\n const skippedExisting = candidates.filter((candidate) => candidate.status === \"already_linked\");\n const requestedApply = options.apply === true;\n const note = options.note?.trim() || \"discovered from item text\";\n\n if (!requestedApply || addableCandidates.length === 0) {\n const files = loaded.document.metadata.files ?? [];\n return {\n id: located.id,\n files,\n changed: false,\n apply: requestedApply,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: 0,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added: [],\n skipped_existing: skippedExisting,\n };\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const discoveredAdds: LinkedFile[] = addableCandidates.map((candidate) => ({\n path: candidate.path,\n scope: candidate.scope,\n note,\n }));\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"files_discover\",\n author,\n message: options.message ?? \"Discover referenced file links\",\n force: options.force,\n mutate(document) {\n const next = [...(document.metadata.files ?? [])];\n const existingResolvedKeys = new Set(next.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const appliedAdds: LinkedFile[] = [];\n for (const add of discoveredAdds) {\n const resolvedKey = linkedFileResolvedKey(add, process.cwd());\n if (existingResolvedKeys.has(resolvedKey)) {\n continue;\n }\n next.push(add);\n existingResolvedKeys.add(resolvedKey);\n appliedAdds.push(add);\n }\n const deduped = dedupeLinkedArtifacts(next);\n const normalized = options.appendStable ? deduped : sortLinkedArtifacts(deduped);\n if (normalized.length > 0) {\n document.metadata.files = normalized;\n } else {\n delete document.metadata.files;\n }\n return {\n changedFields: appliedAdds.length > 0 ? [\"files\"] : [],\n warnings: appliedAdds.length !== discoveredAdds.length ? [`files_discover_skipped_existing:${discoveredAdds.length - appliedAdds.length}`] : [],\n };\n },\n });\n\n const files = result.item.files ?? [];\n const addedResolvedKeys = new Set(discoveredAdds.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const added = files.filter((entry) => addedResolvedKeys.has(linkedFileResolvedKey(entry, process.cwd())));\n return {\n id: result.item.id,\n files,\n changed: added.length > 0,\n apply: true,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: added.length,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added,\n skipped_existing: skippedExisting,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,GAIpB,MAAM,uBAAuB,CAAC;AAqE/B,SAAS,+BAA+B,CAAC,KAAa;IACpD,OAAO,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,KAAK,UAAU,sBAAsB,CAAC,SAAiB;IACrD,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;AAC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QACL,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC;QACzB,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,eAAe,EAAE,UAAU,CAAC,MAAM;QAClC,aAAa,EAAE,iBAAiB,CAAC,MAAM;QACvC,WAAW,EAAE,KAAK,CAAC,MAAM;QACzB,sBAAsB,EAAE,eAAe,CAAC,MAAM;QAC9C,UAAU;QACV,KAAK;QACL,gBAAgB,EAAE,eAAe;KAClC,CAAC;AACJ,CAAC","debugId":"883ae96b-499a-523b-8bd9-33d06f168517"}
1
+ {"version":3,"file":"files.js","sources":["cli/commands/files.ts"],"sourceRoot":"/","sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { isPathWithinDirectory } from \"../../core/fs/path-utils.js\";\nimport type { ItemDocument, LinkedFile, LinkScope } from \"../../types/index.js\";\nimport {\n dedupeLinkedArtifacts,\n normalizeLinkedPath,\n renameArtifactsResultKey,\n runLinkedArtifacts,\n sortLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\nexport interface FilesCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */\n note?: string;\n list?: boolean;\n appendStable?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface FilesDiscoverOptions {\n apply?: boolean;\n appendStable?: boolean;\n note?: string;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface FilesDiscoveryCandidate {\n path: string;\n scope: LinkScope;\n status: \"addable\" | \"already_linked\";\n source_count: number;\n source_fields: string[];\n original_paths: string[];\n}\n\nexport interface FilesResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\nexport interface FilesDiscoverResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n apply: boolean;\n count: number;\n candidate_count: number;\n addable_count: number;\n added_count: number;\n skipped_existing_count: number;\n candidates: FilesDiscoveryCandidate[];\n added: LinkedFile[];\n skipped_existing: FilesDiscoveryCandidate[];\n}\n\ninterface TextReference {\n field: string;\n value: string;\n}\n\ninterface RawPathReference {\n field: string;\n value: string;\n}\n\nfunction normalizeCandidatePathForOutput(value: string): string {\n return normalizeLinkedPath(path.normalize(value));\n}\n\nasync function realpathForContainment(inputPath: string): Promise<string> {\n try {\n return await fs.realpath(inputPath);\n } catch {\n return path.resolve(inputPath);\n }\n}\n\nfunction linkedFileResolvedKey(linkedFile: Pick<LinkedFile, \"path\" | \"scope\">, projectRoot: string): string {\n const resolvedPath = path.isAbsolute(linkedFile.path)\n ? path.resolve(linkedFile.path)\n : path.resolve(projectRoot, linkedFile.path);\n return `${normalizeCandidatePathForOutput(resolvedPath)}::${linkedFile.scope}`;\n}\n\nfunction collectTextReferences(value: unknown, fieldPath: string, references: TextReference[]): void {\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (trimmed.length > 0) {\n references.push({ field: fieldPath, value: trimmed });\n }\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((entry, index) => collectTextReferences(entry, `${fieldPath}[${index}]`, references));\n return;\n }\n if (typeof value === \"object\" && value !== null) {\n for (const [key, nested] of Object.entries(value)) {\n collectTextReferences(nested, fieldPath ? `${fieldPath}.${key}` : key, references);\n }\n }\n}\n\nfunction collectItemTextReferences(document: ItemDocument): TextReference[] {\n const references: TextReference[] = [];\n collectTextReferences(document.metadata, \"metadata\", references);\n collectTextReferences(document.body, \"body\", references);\n return references;\n}\n\nfunction cleanupPathToken(value: string): string {\n let next = value.trim();\n next = next.replace(/^[`\"'<([{]+/u, \"\");\n next = next.replace(/[`\"'>)\\]},;!?]+$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n next = next.replace(/:(?:\\d+)(?::\\d+)?$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n return next;\n}\n\nfunction extractRawPathReferences(references: TextReference[]): RawPathReference[] {\n const rawReferences: RawPathReference[] = [];\n const absolutePattern = /(?:[A-Za-z]:[\\\\/]|\\/)[^\\s\"'`<>()\\[\\]{},;]+/gu;\n const relativePattern =\n /(?:\\.{1,2}[\\\\/])?(?:(?:[A-Za-z0-9_.@-]+[\\\\/])+[A-Za-z0-9_.@-]+|[A-Za-z0-9_.@-]+\\.[A-Za-z0-9][A-Za-z0-9._-]*)/gu;\n for (const reference of references) {\n const seenInField = new Set<string>();\n for (const pattern of [absolutePattern, relativePattern]) {\n pattern.lastIndex = 0;\n for (const match of reference.value.matchAll(pattern)) {\n const token = cleanupPathToken(match[0] ?? \"\");\n if (!token || seenInField.has(token)) {\n continue;\n }\n seenInField.add(token);\n rawReferences.push({ field: reference.field, value: token });\n }\n }\n }\n return rawReferences;\n}\n\nasync function resolveDiscoveredFile(\n rawPath: string,\n projectRoot: string,\n): Promise<Pick<LinkedFile, \"path\" | \"scope\"> | undefined> {\n const absolutePath = path.isAbsolute(rawPath) ? path.resolve(rawPath) : path.resolve(projectRoot, rawPath);\n let stats;\n try {\n stats = await fs.stat(absolutePath);\n } catch {\n return undefined;\n }\n if (!stats.isFile()) {\n return undefined;\n }\n const [canonicalProjectRoot, canonicalAbsolutePath] = await Promise.all([\n realpathForContainment(projectRoot),\n realpathForContainment(absolutePath),\n ]);\n if (isPathWithinDirectory(canonicalProjectRoot, canonicalAbsolutePath)) {\n const relativePath = path.relative(canonicalProjectRoot, canonicalAbsolutePath);\n if (!relativePath || relativePath.startsWith(\"..\") || path.isAbsolute(relativePath)) {\n return undefined;\n }\n return {\n path: normalizeCandidatePathForOutput(relativePath),\n scope: \"project\",\n };\n }\n return {\n path: normalizeCandidatePathForOutput(absolutePath),\n scope: \"global\",\n };\n}\n\nasync function discoverReferencedFiles(document: ItemDocument, projectRoot: string): Promise<FilesDiscoveryCandidate[]> {\n const existingResolvedKeys = new Set((document.metadata.files ?? []).map((entry) => linkedFileResolvedKey(entry, projectRoot)));\n const grouped = new Map<\n string,\n {\n path: string;\n scope: LinkScope;\n sourceFields: Set<string>;\n originalPaths: Set<string>;\n sourceCount: number;\n }\n >();\n const rawReferences = extractRawPathReferences(collectItemTextReferences(document));\n for (const reference of rawReferences) {\n const resolved = await resolveDiscoveredFile(reference.value, projectRoot);\n if (!resolved) {\n continue;\n }\n const key = linkedFileResolvedKey(resolved, projectRoot);\n const existing = grouped.get(key) ?? {\n path: resolved.path,\n scope: resolved.scope,\n sourceFields: new Set<string>(),\n originalPaths: new Set<string>(),\n sourceCount: 0,\n };\n existing.sourceFields.add(reference.field);\n existing.originalPaths.add(reference.value);\n existing.sourceCount += 1;\n grouped.set(key, existing);\n }\n return [...grouped.entries()]\n .map(([key, entry]) => ({\n path: entry.path,\n scope: entry.scope,\n status: existingResolvedKeys.has(key) ? (\"already_linked\" as const) : (\"addable\" as const),\n source_count: entry.sourceCount,\n source_fields: [...entry.sourceFields].sort((left, right) => left.localeCompare(right)),\n original_paths: [...entry.originalPaths].sort((left, right) => left.localeCompare(right)),\n }))\n .sort((left, right) => {\n const byStatus = left.status.localeCompare(right.status);\n if (byStatus !== 0) return byStatus;\n const byPath = left.path.localeCompare(right.path);\n if (byPath !== 0) return byPath;\n return left.scope.localeCompare(right.scope);\n });\n}\n\nexport async function runFiles(id: string, options: FilesCommandOptions, global: GlobalOptions): Promise<FilesResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"files\",\n op: \"files_add\",\n bareNoun: \"file\",\n supportsAppendStable: true,\n });\n return renameArtifactsResultKey(result, \"files\") as unknown as FilesResult;\n}\n\nexport async function runFilesDiscover(\n id: string,\n options: FilesDiscoverOptions,\n global: GlobalOptions,\n): Promise<FilesDiscoverResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const candidates = await discoverReferencedFiles(loaded.document, process.cwd());\n const addableCandidates = candidates.filter((candidate) => candidate.status === \"addable\");\n const skippedExisting = candidates.filter((candidate) => candidate.status === \"already_linked\");\n const requestedApply = options.apply === true;\n const note = options.note?.trim() || \"discovered from item text\";\n\n if (!requestedApply || addableCandidates.length === 0) {\n const files = loaded.document.metadata.files ?? [];\n return {\n id: located.id,\n files,\n changed: false,\n apply: requestedApply,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: 0,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added: [],\n skipped_existing: skippedExisting,\n };\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const discoveredAdds: LinkedFile[] = addableCandidates.map((candidate) => ({\n path: candidate.path,\n scope: candidate.scope,\n note,\n }));\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"files_discover\",\n author,\n message: options.message ?? \"Discover referenced file links\",\n force: options.force,\n mutate(document) {\n const next = [...(document.metadata.files ?? [])];\n const existingResolvedKeys = new Set(next.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const appliedAdds: LinkedFile[] = [];\n for (const add of discoveredAdds) {\n const resolvedKey = linkedFileResolvedKey(add, process.cwd());\n if (existingResolvedKeys.has(resolvedKey)) {\n continue;\n }\n next.push(add);\n existingResolvedKeys.add(resolvedKey);\n appliedAdds.push(add);\n }\n const deduped = dedupeLinkedArtifacts(next);\n const normalized = options.appendStable ? deduped : sortLinkedArtifacts(deduped);\n if (normalized.length > 0) {\n document.metadata.files = normalized;\n } else {\n delete document.metadata.files;\n }\n return {\n changedFields: appliedAdds.length > 0 ? [\"files\"] : [],\n warnings: appliedAdds.length !== discoveredAdds.length ? [`files_discover_skipped_existing:${discoveredAdds.length - appliedAdds.length}`] : [],\n };\n },\n });\n\n const files = result.item.files ?? [];\n const addedResolvedKeys = new Set(discoveredAdds.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const added = files.filter((entry) => addedResolvedKeys.has(linkedFileResolvedKey(entry, process.cwd())));\n return {\n id: result.item.id,\n files,\n changed: added.length > 0,\n apply: true,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: added.length,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added,\n skipped_existing: skippedExisting,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EA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C,CAAC,EAAE;gBACtD,QAAQ,EAAE,WAAW,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,mCAAmC,cAAc,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;aAChJ,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IACtC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9G,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1G,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE;QAClB,KAAK;QACL,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC;QACzB,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,eAAe,EAAE,UAAU,CAAC,MAAM;QAClC,aAAa,EAAE,iBAAiB,CAAC,MAAM;QACvC,WAAW,EAAE,KAAK,CAAC,MAAM;QACzB,sBAAsB,EAAE,eAAe,CAAC,MAAM;QAC9C,UAAU;QACV,KAAK;QACL,gBAAgB,EAAE,eAAe;KAClC,CAAC;AACJ,CAAC","debugId":"b10d1d4c-80ae-5c19-b212-1f7203d3c0f4"}
@@ -1,7 +1,7 @@
1
1
  import type { GlobalOptions } from "../../core/shared/command-types.js";
2
2
  type HealthStatus = "ok" | "warn";
3
3
  export interface HealthCheck {
4
- name: "settings" | "directories" | "settings_values" | "telemetry" | "extensions" | "storage" | "integrity" | "history_drift" | "vectorization";
4
+ name: "settings" | "directories" | "settings_values" | "telemetry" | "extensions" | "storage" | "locks" | "integrity" | "history_drift" | "vectorization";
5
5
  status: HealthStatus;
6
6
  details: Record<string, unknown>;
7
7
  }
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aa444802-31ea-5656-a3d6-8ed0ea39244f")}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]="aea76476-f15d-5223-8832-76e396aceb72")}catch(e){}}();
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
@@ -9,6 +9,7 @@ import { collectRegisteredItemFieldNames } from "../../core/extensions/item-fiel
9
9
  import { EXTENSION_CAPABILITY_CONTRACT, KNOWN_EXTENSION_CAPABILITIES, parseLegacyExtensionCapabilityAliasWarning, parseUnknownExtensionCapabilityWarning, } from "../../core/extensions/loader.js";
10
10
  import { enforceHistoryStreamPolicyForItems } from "../../core/history/history-stream-policy.js";
11
11
  import { scanHistoryDrift } from "../../core/history/drift-scan.js";
12
+ import { scanLockHealth } from "../../core/lock/lock-gc.js";
12
13
  import { readVectorizationStatusLedger, refreshSemanticEmbeddingsForMutatedItems, } from "../../core/search/cache.js";
13
14
  import { resolveEmbeddingProviders } from "../../core/search/providers.js";
14
15
  import { resolveSettingsWithSemanticRuntimeDefaults } from "../../core/search/semantic-defaults.js";
@@ -695,6 +696,15 @@ function summarizeHealthCheckDetails(check, limit) {
695
696
  if (check.name === "storage") {
696
697
  return details;
697
698
  }
699
+ if (check.name === "locks") {
700
+ // Counts only: drops remediation_map, which is full-output-only by contract.
701
+ return {
702
+ active_lock_count: details.active_lock_count,
703
+ stale_lock_count: details.stale_lock_count,
704
+ unreadable_lock_count: details.unreadable_lock_count,
705
+ unparseable_lock_count: details.unparseable_lock_count,
706
+ };
707
+ }
698
708
  if (check.name === "integrity") {
699
709
  return {
700
710
  checked_item_files: details.checked_item_files,
@@ -1019,6 +1029,56 @@ async function buildTelemetryCheck(settings, options) {
1019
1029
  warnings,
1020
1030
  };
1021
1031
  }
1032
+ /**
1033
+ * Read-only locks check (pm-xo1n): surfaces active/stale/unreadable/unparseable
1034
+ * lock counts using the exact classification `pm gc --scope locks` acts on, so
1035
+ * agents can gate on stale item-claim locks before running gc speculatively.
1036
+ */
1037
+ async function buildLocksCheck(pmRoot) {
1038
+ let scan;
1039
+ try {
1040
+ scan = await scanLockHealth(pmRoot);
1041
+ }
1042
+ catch (error) {
1043
+ const message = error instanceof Error ? error.message : String(error);
1044
+ return {
1045
+ check: {
1046
+ name: "locks",
1047
+ status: "warn",
1048
+ details: {
1049
+ active_lock_count: 0,
1050
+ stale_lock_count: 0,
1051
+ unreadable_lock_count: 0,
1052
+ unparseable_lock_count: 0,
1053
+ scan_failed: true,
1054
+ error: message,
1055
+ pm_root: pmRoot,
1056
+ },
1057
+ },
1058
+ warnings: [`locks_scan_failed:${message}`],
1059
+ };
1060
+ }
1061
+ const warnings = [];
1062
+ if (scan.stale_lock_count > 0) {
1063
+ warnings.push(`locks_stale_count:${scan.stale_lock_count}`);
1064
+ }
1065
+ if (scan.unreadable_lock_count > 0) {
1066
+ warnings.push(`locks_unreadable:${scan.unreadable_lock_count}`);
1067
+ }
1068
+ return {
1069
+ check: {
1070
+ name: "locks",
1071
+ status: warnings.length === 0 ? "ok" : "warn",
1072
+ details: {
1073
+ active_lock_count: scan.active_lock_count,
1074
+ stale_lock_count: scan.stale_lock_count,
1075
+ unreadable_lock_count: scan.unreadable_lock_count,
1076
+ unparseable_lock_count: scan.unparseable_lock_count,
1077
+ },
1078
+ },
1079
+ warnings,
1080
+ };
1081
+ }
1022
1082
  async function buildHistoryDriftCheck(pmRoot, items) {
1023
1083
  const { missingStreams, unreadableStreams, hashMismatches, chainMismatches, driftedItems } = await scanHistoryDrift(pmRoot, items);
1024
1084
  const warnings = [
@@ -1232,6 +1292,7 @@ export async function runHealth(global, options = {}) {
1232
1292
  commandLabel: "health",
1233
1293
  });
1234
1294
  const historySummary = await countHistoryStreams(pmRoot);
1295
+ const locksCheck = await buildLocksCheck(pmRoot);
1235
1296
  const integrityCheck = skipIntegrity
1236
1297
  ? { check: { name: "integrity", status: "ok", details: { skipped: true } }, warnings: [] }
1237
1298
  : await buildIntegrityCheck(pmRoot, typeRegistry.type_to_folder, settings.schema);
@@ -1282,6 +1343,7 @@ export async function runHealth(global, options = {}) {
1282
1343
  history_streams: historySummary.count,
1283
1344
  },
1284
1345
  },
1346
+ locksCheck.check,
1285
1347
  integrityCheck.check,
1286
1348
  historyDriftCheck.check,
1287
1349
  vectorizationCheck.check,
@@ -1295,6 +1357,7 @@ export async function runHealth(global, options = {}) {
1295
1357
  ...extensionCheck.warnings,
1296
1358
  ...historyPolicy.warnings,
1297
1359
  ...historySummary.warnings,
1360
+ ...locksCheck.warnings,
1298
1361
  ...integrityCheck.warnings,
1299
1362
  ...historyDriftCheck.warnings,
1300
1363
  ...vectorizationCheck.warnings,
@@ -1311,16 +1374,28 @@ export async function runHealth(global, options = {}) {
1311
1374
  directories: missingDirs.map((dir) => `missing_directory:${dir}`),
1312
1375
  settings_values: settingWarnings,
1313
1376
  telemetry: telemetryCheck.warnings,
1377
+ locks: locksCheck.warnings,
1314
1378
  integrity: integrityCheck.warnings,
1315
1379
  history_drift: historyDriftCheck.warnings,
1316
1380
  vectorization: vectorizationCheck.warnings,
1317
1381
  };
1382
+ const historyDriftedCount = typeof historyDriftCheck.check.details.counts?.drifted === "number"
1383
+ ? (historyDriftCheck.check.details.counts.drifted)
1384
+ : 0;
1318
1385
  for (const check of checks) {
1319
1386
  const sources = checkRemediationSources[check.name];
1320
1387
  if (sources === undefined) {
1321
1388
  continue;
1322
1389
  }
1323
1390
  const remediationMap = buildRemediationMap(sources);
1391
+ // With multiple drifted streams the per-item `pm history-repair <id>`
1392
+ // template would have to be run once per stream; suggest the bulk audited
1393
+ // pass instead so agents repair everything in one command.
1394
+ if (check.name === "history_drift" && historyDriftedCount > 1) {
1395
+ for (const code of Object.keys(remediationMap)) {
1396
+ remediationMap[code] = "pm history-repair --all";
1397
+ }
1398
+ }
1324
1399
  if (Object.keys(remediationMap).length > 0) {
1325
1400
  check.details = { ...check.details, remediation_map: remediationMap };
1326
1401
  }
@@ -1342,4 +1417,4 @@ export async function runHealth(global, options = {}) {
1342
1417
  return options.brief === true ? applyBriefHealthProjection(result) : result;
1343
1418
  }
1344
1419
  //# sourceMappingURL=health.js.map
1345
- //# debugId=aa444802-31ea-5656-a3d6-8ed0ea39244f
1420
+ //# debugId=aea76476-f15d-5223-8832-76e396aceb72