@unbrained/pm-cli 2026.7.14 → 2026.7.15

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 (708) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +48 -0
  3. package/README.md +14 -11
  4. package/dist/cli/argv-utils.d.ts +1 -4
  5. package/dist/cli/argv-utils.js +3 -13
  6. package/dist/cli/argv-utils.js.map +1 -1
  7. package/dist/cli/bootstrap-args.d.ts +6 -4
  8. package/dist/cli/bootstrap-args.js +51 -16
  9. package/dist/cli/bootstrap-args.js.map +1 -1
  10. package/dist/cli/bundle-integrity.d.ts +49 -0
  11. package/dist/cli/bundle-integrity.js +111 -0
  12. package/dist/cli/bundle-integrity.js.map +1 -0
  13. package/dist/cli/commands/completion.js +7 -2
  14. package/dist/cli/commands/completion.js.map +1 -1
  15. package/dist/cli/commands/config.d.ts +6 -163
  16. package/dist/cli/commands/config.js +4 -1133
  17. package/dist/cli/commands/config.js.map +1 -1
  18. package/dist/cli/commands/context.d.ts +2 -4
  19. package/dist/cli/commands/context.js +10 -85
  20. package/dist/cli/commands/context.js.map +1 -1
  21. package/dist/cli/commands/create.d.ts +1 -0
  22. package/dist/cli/commands/create.js +3 -2
  23. package/dist/cli/commands/create.js.map +1 -1
  24. package/dist/cli/commands/extension/describe.d.ts +2 -91
  25. package/dist/cli/commands/extension/describe.js +4 -142
  26. package/dist/cli/commands/extension/describe.js.map +1 -1
  27. package/dist/cli/commands/extension/scaffold.d.ts +2 -36
  28. package/dist/cli/commands/extension/scaffold.js +4 -2435
  29. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  30. package/dist/cli/commands/extension/shared.d.ts +2 -28
  31. package/dist/cli/commands/extension/shared.js +4 -130
  32. package/dist/cli/commands/extension/shared.js.map +1 -1
  33. package/dist/cli/commands/extension.d.ts +3 -400
  34. package/dist/cli/commands/extension.js +4 -2183
  35. package/dist/cli/commands/extension.js.map +1 -1
  36. package/dist/cli/commands/gc.d.ts +6 -56
  37. package/dist/cli/commands/gc.js +4 -270
  38. package/dist/cli/commands/gc.js.map +1 -1
  39. package/dist/cli/commands/get.d.ts +18 -5
  40. package/dist/cli/commands/get.js +117 -58
  41. package/dist/cli/commands/get.js.map +1 -1
  42. package/dist/cli/commands/health.d.ts +6 -184
  43. package/dist/cli/commands/health.js +4 -1747
  44. package/dist/cli/commands/health.js.map +1 -1
  45. package/dist/cli/commands/history-compact.d.ts +4 -139
  46. package/dist/cli/commands/history-compact.js +5 -510
  47. package/dist/cli/commands/history-compact.js.map +1 -1
  48. package/dist/cli/commands/history-redact.d.ts +8 -120
  49. package/dist/cli/commands/history-redact.js +6 -581
  50. package/dist/cli/commands/history-redact.js.map +1 -1
  51. package/dist/cli/commands/history-repair.d.ts +7 -89
  52. package/dist/cli/commands/history-repair.js +5 -257
  53. package/dist/cli/commands/history-repair.js.map +1 -1
  54. package/dist/cli/commands/history.d.ts +1 -2
  55. package/dist/cli/commands/history.js +6 -48
  56. package/dist/cli/commands/history.js.map +1 -1
  57. package/dist/cli/commands/index.d.ts +1 -0
  58. package/dist/cli/commands/index.js +3 -2
  59. package/dist/cli/commands/index.js.map +1 -1
  60. package/dist/cli/commands/init-agent-guidance.d.ts +6 -113
  61. package/dist/cli/commands/init-agent-guidance.js +4 -431
  62. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  63. package/dist/cli/commands/init.d.ts +6 -181
  64. package/dist/cli/commands/init.js +4 -690
  65. package/dist/cli/commands/init.js.map +1 -1
  66. package/dist/cli/commands/next.js +3 -3
  67. package/dist/cli/commands/next.js.map +1 -1
  68. package/dist/cli/commands/profile.d.ts +4 -174
  69. package/dist/cli/commands/profile.js +4 -425
  70. package/dist/cli/commands/profile.js.map +1 -1
  71. package/dist/cli/commands/restore.d.ts +4 -19
  72. package/dist/cli/commands/restore.js +9 -158
  73. package/dist/cli/commands/restore.js.map +1 -1
  74. package/dist/cli/commands/schema.d.ts +7 -507
  75. package/dist/cli/commands/schema.js +5 -1254
  76. package/dist/cli/commands/schema.js.map +1 -1
  77. package/dist/cli/commands/test.d.ts +2 -4
  78. package/dist/cli/commands/test.js +7 -97
  79. package/dist/cli/commands/test.js.map +1 -1
  80. package/dist/cli/commands/validate.d.ts +9 -249
  81. package/dist/cli/commands/validate.js +9 -2150
  82. package/dist/cli/commands/validate.js.map +1 -1
  83. package/dist/cli/extension-command-help.js +18 -4
  84. package/dist/cli/extension-command-help.js.map +1 -1
  85. package/dist/cli/extension-command-options.js +3 -3
  86. package/dist/cli/extension-command-options.js.map +1 -1
  87. package/dist/cli/help-content.js +7 -3
  88. package/dist/cli/help-content.js.map +1 -1
  89. package/dist/cli/main.js +20 -30
  90. package/dist/cli/main.js.map +1 -1
  91. package/dist/cli/register-list-query.js +4 -2
  92. package/dist/cli/register-list-query.js.map +1 -1
  93. package/dist/cli/register-mutation.js +11 -3
  94. package/dist/cli/register-mutation.js.map +1 -1
  95. package/dist/cli/register-setup.js +4 -2
  96. package/dist/cli/register-setup.js.map +1 -1
  97. package/dist/cli/registration-helpers.js +3 -2
  98. package/dist/cli/registration-helpers.js.map +1 -1
  99. package/dist/cli-bundle/bundle-manifest.json +782 -0
  100. package/dist/cli-bundle/chunks/{append-PVZJDM6J.js → append-OJQFUQ4T.js} +5 -5
  101. package/dist/cli-bundle/chunks/append-UZVHUO74.js +11 -0
  102. package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js → chunk-2IFFUZLC.js} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js → chunk-2JKGO6QX.js} +4 -4
  104. package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js → chunk-2NCIPMQP.js} +2 -2
  105. package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js → chunk-2VPAVL7O.js} +2 -2
  106. package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js → chunk-2WSE6PO2.js} +4 -4
  107. package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js → chunk-34L5OT3Y.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js → chunk-3AUGG2DP.js} +3 -3
  109. package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js → chunk-3CLU2XZO.js} +4 -4
  110. package/dist/cli-bundle/chunks/{chunk-N3CMP4NI.js → chunk-3S5QVM5H.js} +43 -7
  111. package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +1 -0
  112. package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js +64 -0
  113. package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js.map +7 -0
  114. package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js → chunk-3WM75PWC.js} +3 -3
  115. package/dist/cli-bundle/chunks/chunk-4223PVZT.js +121 -0
  116. package/dist/cli-bundle/chunks/chunk-4223PVZT.js.map +7 -0
  117. package/dist/cli-bundle/chunks/{chunk-5URI7TPJ.js → chunk-4XQ3BDV4.js} +281 -164
  118. package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +7 -0
  119. package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js → chunk-5JLUII3O.js} +13 -13
  120. package/dist/cli-bundle/chunks/{chunk-MKL4CP2I.js → chunk-5ZSLZLDN.js} +631 -246
  121. package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-Q37E63AM.js → chunk-6CFNAVTF.js} +21 -141
  123. package/dist/cli-bundle/chunks/chunk-6CFNAVTF.js.map +7 -0
  124. package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js → chunk-6N2VXVTQ.js} +2 -2
  125. package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js → chunk-6S3YSUYG.js} +3 -3
  126. package/dist/cli-bundle/chunks/{chunk-ZUKSZVBW.js → chunk-7B67ZL4N.js} +8 -7
  127. package/dist/cli-bundle/chunks/chunk-7B67ZL4N.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-IA3YFTXT.js → chunk-7PIWCHTW.js} +11 -13
  129. package/dist/cli-bundle/chunks/chunk-7PIWCHTW.js.map +1 -0
  130. package/dist/cli-bundle/chunks/{chunk-BPD26E3P.js → chunk-7Z4LKRS4.js} +291 -81
  131. package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +1 -0
  132. package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js → chunk-AHVTB5I5.js} +4 -4
  133. package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js → chunk-APRVSW2O.js} +3 -3
  134. package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js → chunk-B7PE22W6.js} +4 -4
  135. package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js → chunk-BCOFWYW4.js} +3 -3
  136. package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js → chunk-BEP7WJA2.js} +4 -4
  137. package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js +1114 -0
  138. package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +7 -0
  139. package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js → chunk-BSEQUTQP.js} +2 -2
  140. package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js.map → chunk-BSEQUTQP.js.map} +2 -2
  141. package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js → chunk-CRVF2JDM.js} +10 -10
  142. package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js → chunk-DM4H7FP4.js} +3 -3
  143. package/dist/cli-bundle/chunks/chunk-DUT67M43.js +5 -0
  144. package/dist/cli-bundle/chunks/{chunk-44LNIULG.js → chunk-DYH63FX7.js} +4 -4
  145. package/dist/cli-bundle/chunks/{chunk-LWTIRS3Y.js → chunk-E2OJMKML.js} +306 -82
  146. package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +7 -0
  147. package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js → chunk-EAB64KLB.js} +4 -4
  148. package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js → chunk-EACOH7AU.js} +10 -10
  149. package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js → chunk-EH2OPHBI.js} +10 -10
  150. package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js.map → chunk-EH2OPHBI.js.map} +1 -1
  151. package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js → chunk-EJEXHTY5.js} +2 -2
  152. package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js → chunk-EYLCSJAI.js} +2 -2
  153. package/dist/cli-bundle/chunks/{chunk-655STMGA.js → chunk-FMBNM2EN.js} +2 -2
  154. package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js → chunk-FNSPG7MU.js} +12 -12
  155. package/dist/cli-bundle/chunks/{chunk-5CT5BW6E.js → chunk-GM5QHQU6.js} +46 -40
  156. package/dist/cli-bundle/chunks/chunk-GM5QHQU6.js.map +7 -0
  157. package/dist/cli-bundle/chunks/{chunk-FTQLW4JD.js → chunk-GOSLKLFE.js} +418 -24
  158. package/dist/cli-bundle/chunks/chunk-GOSLKLFE.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{chunk-KB726FMH.js → chunk-H2Z3FYXQ.js} +4 -4
  160. package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js +162 -0
  161. package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js.map +1 -0
  162. package/dist/cli-bundle/chunks/{chunk-2QIQGYPW.js → chunk-H5APFTHZ.js} +53 -10
  163. package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +7 -0
  164. package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js +118 -0
  165. package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js.map +1 -0
  166. package/dist/cli-bundle/chunks/{chunk-ZAYYDNB3.js → chunk-HO4KXD6I.js} +22 -142
  167. package/dist/cli-bundle/chunks/chunk-HO4KXD6I.js.map +1 -0
  168. package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js → chunk-HYB5AZ63.js} +203 -62
  169. package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js.map → chunk-HYB5AZ63.js.map} +3 -3
  170. package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js → chunk-IA5FKNII.js} +2 -2
  171. package/dist/cli-bundle/chunks/{chunk-JL7WZ4O2.js → chunk-IG3SWA4A.js} +33 -9
  172. package/dist/cli-bundle/chunks/chunk-IG3SWA4A.js.map +7 -0
  173. package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js → chunk-IJIICKVW.js} +2 -2
  174. package/dist/cli-bundle/chunks/{chunk-IGED7NH2.js → chunk-ILX33QXL.js} +668 -251
  175. package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +7 -0
  176. package/dist/cli-bundle/chunks/{chunk-UGTVWL3E.js → chunk-INU6DKT5.js} +47 -41
  177. package/dist/cli-bundle/chunks/chunk-INU6DKT5.js.map +1 -0
  178. package/dist/cli-bundle/chunks/{chunk-UB2QYSTO.js → chunk-J5AOEGDC.js} +26 -18
  179. package/dist/cli-bundle/chunks/chunk-J5AOEGDC.js.map +1 -0
  180. package/dist/cli-bundle/chunks/{chunk-4DY4KPQI.js → chunk-J6364LFM.js} +1330 -937
  181. package/dist/cli-bundle/chunks/chunk-J6364LFM.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{chunk-DVOLZJ3C.js → chunk-J6EY5V4N.js} +1295 -939
  183. package/dist/cli-bundle/chunks/chunk-J6EY5V4N.js.map +1 -0
  184. package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js +1097 -0
  185. package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +1 -0
  186. package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js → chunk-JOUQZENX.js} +3 -3
  187. package/dist/cli-bundle/chunks/{chunk-J4NZOP3I.js → chunk-JXQUXVMI.js} +9 -8
  188. package/dist/cli-bundle/chunks/chunk-JXQUXVMI.js.map +1 -0
  189. package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js → chunk-JYFOV7FC.js} +4 -4
  190. package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js → chunk-K2X6U4UA.js} +4 -4
  191. package/dist/cli-bundle/chunks/{chunk-6OTZMORS.js → chunk-K3WII2ME.js} +27 -27
  192. package/dist/cli-bundle/chunks/chunk-K3WII2ME.js.map +7 -0
  193. package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js → chunk-KG44YSKD.js} +4 -4
  194. package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js → chunk-KPMKHGEA.js} +4 -4
  195. package/dist/cli-bundle/chunks/{chunk-QASRVKUQ.js → chunk-LPYWLWDS.js} +257 -163
  196. package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +1 -0
  197. package/dist/cli-bundle/chunks/{chunk-RGXD5JJR.js → chunk-LSG2U345.js} +19 -12
  198. package/dist/cli-bundle/chunks/chunk-LSG2U345.js.map +7 -0
  199. package/dist/cli-bundle/chunks/chunk-MIQDDLB5.js +5 -0
  200. package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js → chunk-NLDFBC6J.js} +2 -2
  201. package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js → chunk-NP22ERDF.js} +3 -3
  202. package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js → chunk-NU3IMIEA.js} +2 -2
  203. package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js → chunk-NVPZIJVR.js} +2 -2
  204. package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js → chunk-ODALILG3.js} +2 -2
  205. package/dist/cli-bundle/chunks/{chunk-CDJYP7OQ.js → chunk-ONG5V5CI.js} +190 -63
  206. package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +1 -0
  207. package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js → chunk-ONREO4ST.js} +3 -3
  208. package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js +61 -0
  209. package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js.map +1 -0
  210. package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js → chunk-P74IZQ7A.js} +12 -12
  211. package/dist/cli-bundle/chunks/chunk-PENXZX3U.js +172 -0
  212. package/dist/cli-bundle/chunks/chunk-PENXZX3U.js.map +7 -0
  213. package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js → chunk-PGY23YTC.js} +3 -3
  214. package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js → chunk-PMOSXADO.js} +3 -3
  215. package/dist/cli-bundle/chunks/chunk-PNTULOGU.js +9 -0
  216. package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js → chunk-Q7A43DS4.js} +2 -2
  217. package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js → chunk-QEHQ2GVG.js} +2 -2
  218. package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js → chunk-QIPLHNP7.js} +7 -7
  219. package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js → chunk-QKECXBBG.js} +3 -3
  220. package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js.map → chunk-QKECXBBG.js.map} +1 -1
  221. package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js → chunk-QKJGPFAF.js} +3 -3
  222. package/dist/cli-bundle/chunks/{chunk-F7PSHRNO.js → chunk-QKXHFPYM.js} +27 -10
  223. package/dist/cli-bundle/chunks/chunk-QKXHFPYM.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js → chunk-RLCHOOHC.js} +2 -2
  225. package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js → chunk-RMLWNPH2.js} +2 -2
  226. package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js → chunk-RRM5JYJC.js} +2 -2
  227. package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js → chunk-S6MQESFR.js} +4 -4
  228. package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js → chunk-SDQLJWBO.js} +4 -4
  229. package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js → chunk-SELVXEZK.js} +2 -2
  230. package/dist/cli-bundle/chunks/{chunk-DYEX6NFH.js → chunk-TD3LVC7D.js} +438 -23
  231. package/dist/cli-bundle/chunks/chunk-TD3LVC7D.js.map +7 -0
  232. package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js → chunk-TKOVBP6C.js} +2 -2
  233. package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js → chunk-TQSZFPIS.js} +4 -4
  234. package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js → chunk-TSMHDIW4.js} +2 -2
  235. package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js → chunk-UFXU44HV.js} +4 -4
  236. package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js → chunk-ULTHRDBP.js} +3 -3
  237. package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js → chunk-UMOPHQSU.js} +9 -9
  238. package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js.map → chunk-UMOPHQSU.js.map} +2 -2
  239. package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js → chunk-UOHFKBUV.js} +3 -3
  240. package/dist/cli-bundle/chunks/{chunk-PHKP3AGR.js → chunk-UWQHLMEB.js} +35 -18
  241. package/dist/cli-bundle/chunks/chunk-UWQHLMEB.js.map +7 -0
  242. package/dist/cli-bundle/chunks/{chunk-6TTOHMTB.js → chunk-UXONS674.js} +45 -112
  243. package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js → chunk-UY2ACEMF.js} +7 -7
  245. package/dist/cli-bundle/chunks/{chunk-6PKA3SJQ.js → chunk-WQPUU7XD.js} +19 -28
  246. package/dist/cli-bundle/chunks/chunk-WQPUU7XD.js.map +1 -0
  247. package/dist/cli-bundle/chunks/{chunk-7TQMR6LK.js → chunk-WT3ZEOGH.js} +70 -20
  248. package/dist/cli-bundle/chunks/chunk-WT3ZEOGH.js.map +7 -0
  249. package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js → chunk-WUJQK4YV.js} +4 -4
  250. package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js → chunk-XSJUSQAE.js} +2 -2
  251. package/dist/cli-bundle/chunks/{chunk-6MHSBDGD.js → chunk-XXXF6PAQ.js} +50 -117
  252. package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +7 -0
  253. package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js → chunk-YAQEBNY7.js} +4 -4
  254. package/dist/cli-bundle/chunks/{chunk-7QDSYUMF.js → chunk-YAROI3PD.js} +44 -21
  255. package/dist/cli-bundle/chunks/chunk-YAROI3PD.js.map +1 -0
  256. package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js → chunk-YBLZ2VE7.js} +13 -13
  257. package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js → chunk-YCQET3OT.js} +2 -2
  258. package/dist/cli-bundle/chunks/chunk-YUSOJDWM.js +9 -0
  259. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +58 -0
  260. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +1 -0
  261. package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js → chunk-ZI6VQWQ7.js} +4 -4
  262. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +68 -0
  263. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +7 -0
  264. package/dist/cli-bundle/chunks/{close-LZECOMHO.js → close-CWODTPKG.js} +5 -5
  265. package/dist/cli-bundle/chunks/close-W6LI2PKM.js +12 -0
  266. package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js → close-many-CQFUY7MR.js} +15 -13
  267. package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +23 -0
  268. package/dist/cli-bundle/chunks/comments-E3TNTK24.js +13 -0
  269. package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js → comments-WGLHR7LB.js} +7 -7
  270. package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js → copy-LXVDXH7B.js} +4 -4
  271. package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +9 -0
  272. package/dist/cli-bundle/chunks/{create-F53OBTOU.js → create-J5U6ND4K.js} +9 -9
  273. package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js → create-LBVCYMEG.js} +9 -9
  274. package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js → delete-PMJBNY5G.js} +4 -4
  275. package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +10 -0
  276. package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js → deps-JZ7TMVCB.js} +7 -4
  277. package/dist/cli-bundle/chunks/{deps-U57I7EAK.js → deps-OA26IS25.js} +7 -4
  278. package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js → docs-FEWB2DQB.js} +6 -6
  279. package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +14 -0
  280. package/dist/cli-bundle/chunks/{files-TBZD7V6H.js → files-6YFBJRBG.js} +6 -6
  281. package/dist/cli-bundle/chunks/{files-TTY6N2AV.js → files-EFIWKFTM.js} +6 -6
  282. package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js → focus-4QJR7FOQ.js} +5 -5
  283. package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +10 -0
  284. package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js → history-compact-CKRPDTJN.js} +6 -10
  285. package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +16 -0
  286. package/dist/cli-bundle/chunks/history-redact-BB3TGDAE.js +15 -0
  287. package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js → history-redact-D225BHOZ.js} +5 -6
  288. package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +16 -0
  289. package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js → history-repair-RQXKQHL4.js} +6 -8
  290. package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js → learnings-JLNLCOL5.js} +7 -7
  291. package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +13 -0
  292. package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +13 -0
  293. package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js → notes-GB47XXQQ.js} +7 -7
  294. package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +24 -0
  295. package/dist/cli-bundle/chunks/{plan-2NNEO46V.js → plan-VDCJ2PCN.js} +10 -10
  296. package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js → profile-FAU7NZML.js} +10 -10
  297. package/dist/cli-bundle/chunks/{profile-U725ATWZ.js → profile-IVXQEL3D.js} +10 -10
  298. package/dist/cli-bundle/chunks/{register-list-query-BUWCYHBT.js → register-list-query-DKA3EH5D.js} +22 -19
  299. package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +7 -0
  300. package/dist/cli-bundle/chunks/{register-list-query-KTZ6AGE7.js → register-list-query-UL4UKBBN.js} +23 -20
  301. package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +1 -0
  302. package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js → register-mutation-ARFHRW55.js} +36 -32
  303. package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js.map → register-mutation-ARFHRW55.js.map} +2 -2
  304. package/dist/cli-bundle/chunks/{register-mutation-4FMGJJF7.js → register-mutation-RBBJ52DK.js} +37 -33
  305. package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +1 -0
  306. package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js → register-operations-ZIBBRSED.js} +41 -39
  307. package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js.map → register-operations-ZIBBRSED.js.map} +1 -1
  308. package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js → register-operations-ZUJ5JWPE.js} +39 -37
  309. package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js.map → register-operations-ZUJ5JWPE.js.map} +1 -1
  310. package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js → register-setup-BCVLFEYS.js} +29 -17
  311. package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js.map → register-setup-BCVLFEYS.js.map} +2 -2
  312. package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js → register-setup-TDCGWIOS.js} +19 -18
  313. package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js.map → register-setup-TDCGWIOS.js.map} +1 -1
  314. package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js → restore-25DLT2Q2.js} +6 -6
  315. package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +14 -0
  316. package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js → schema-FNU3WE4O.js} +7 -6
  317. package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js → schema-NBCM3RAD.js} +7 -6
  318. package/dist/cli-bundle/chunks/update-WWBYOPXO.js +21 -0
  319. package/dist/cli-bundle/chunks/update-WWBYOPXO.js.map +7 -0
  320. package/dist/cli-bundle/chunks/{update-Q3UCILNR.js → update-XHSIAIXE.js} +12 -12
  321. package/dist/cli-bundle/chunks/update-XHSIAIXE.js.map +1 -0
  322. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +32 -0
  323. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js.map +7 -0
  324. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +36 -0
  325. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js.map +1 -0
  326. package/dist/cli-bundle/main.js +826 -43
  327. package/dist/cli-bundle/main.js.map +4 -4
  328. package/dist/cli-bundle/sdk-runtime.js +70 -57
  329. package/dist/cli-bundle/sdk-testing.js +6 -6
  330. package/dist/cli-bundle/sdk.js +876 -74
  331. package/dist/cli-bundle/sdk.js.map +4 -4
  332. package/dist/cli.js +5 -4
  333. package/dist/cli.js.map +1 -1
  334. package/dist/core/diagnostics/remediation.js +12 -2
  335. package/dist/core/diagnostics/remediation.js.map +1 -1
  336. package/dist/core/history/projection.d.ts +39 -0
  337. package/dist/core/history/projection.js +164 -0
  338. package/dist/core/history/projection.js.map +1 -0
  339. package/dist/core/history/read.d.ts +3 -0
  340. package/dist/core/history/read.js +55 -0
  341. package/dist/core/history/read.js.map +1 -0
  342. package/dist/core/output/output-control.d.ts +18 -0
  343. package/dist/core/output/output-control.js +26 -0
  344. package/dist/core/output/output-control.js.map +1 -0
  345. package/dist/core/output/output.js +20 -8
  346. package/dist/core/output/output.js.map +1 -1
  347. package/dist/core/sentry/helpers.js +10 -2
  348. package/dist/core/sentry/helpers.js.map +1 -1
  349. package/dist/core/shared/command-types.d.ts +2 -0
  350. package/dist/core/shared/command-types.js +2 -2
  351. package/dist/core/shared/command-types.js.map +1 -1
  352. package/dist/core/shared/errors.d.ts +11 -0
  353. package/dist/core/shared/errors.js +2 -2
  354. package/dist/core/shared/errors.js.map +1 -1
  355. package/dist/mcp/server.d.ts +2 -2
  356. package/dist/mcp/tool-definitions.js +5 -5
  357. package/dist/mcp/tool-definitions.js.map +1 -1
  358. package/dist/sdk/author-attribution.d.ts +35 -0
  359. package/dist/sdk/author-attribution.js +118 -0
  360. package/dist/sdk/author-attribution.js.map +1 -0
  361. package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -0
  362. package/dist/sdk/cli-contracts/command-aliases.js +17 -0
  363. package/dist/sdk/cli-contracts/command-aliases.js.map +1 -0
  364. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  365. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  366. package/dist/sdk/cli-contracts/tool-option-contracts.js +6 -2
  367. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  368. package/dist/sdk/cli-contracts/tool-parameter-tables.js +21 -2
  369. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  370. package/dist/sdk/cli-contracts/tool-schema.js +3 -3
  371. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  372. package/dist/sdk/cli-contracts.d.ts +1 -0
  373. package/dist/sdk/cli-contracts.js +3 -2
  374. package/dist/sdk/cli-contracts.js.map +1 -1
  375. package/dist/sdk/cli-program.d.ts +8 -0
  376. package/dist/sdk/cli-program.js +39 -0
  377. package/dist/sdk/cli-program.js.map +1 -0
  378. package/dist/sdk/command-line.d.ts +11 -0
  379. package/dist/sdk/command-line.js +40 -0
  380. package/dist/sdk/command-line.js.map +1 -0
  381. package/dist/sdk/config.d.ts +163 -0
  382. package/dist/sdk/config.js +1087 -0
  383. package/dist/sdk/config.js.map +1 -0
  384. package/dist/sdk/context-relevance.d.ts +21 -0
  385. package/dist/sdk/context-relevance.js +70 -2
  386. package/dist/sdk/context-relevance.js.map +1 -1
  387. package/dist/sdk/dependencies.d.ts +15 -2
  388. package/dist/sdk/dependencies.js +97 -8
  389. package/dist/sdk/dependencies.js.map +1 -1
  390. package/dist/{cli/commands → sdk}/extension/bundled-catalog.d.ts +1 -1
  391. package/dist/{cli/commands → sdk}/extension/bundled-catalog.js +12 -12
  392. package/dist/sdk/extension/bundled-catalog.js.map +1 -0
  393. package/dist/sdk/extension/concurrency.d.ts +7 -0
  394. package/dist/sdk/extension/concurrency.js +26 -0
  395. package/dist/sdk/extension/concurrency.js.map +1 -0
  396. package/dist/sdk/extension/describe.d.ts +91 -0
  397. package/dist/sdk/extension/describe.js +144 -0
  398. package/dist/sdk/extension/describe.js.map +1 -0
  399. package/dist/{cli/commands → sdk}/extension/doctor.d.ts +3 -3
  400. package/dist/{cli/commands → sdk}/extension/doctor.js +7 -7
  401. package/dist/sdk/extension/doctor.js.map +1 -0
  402. package/dist/sdk/extension/install-runtime.d.ts +26 -0
  403. package/dist/sdk/extension/install-runtime.js +269 -0
  404. package/dist/sdk/extension/install-runtime.js.map +1 -0
  405. package/dist/sdk/extension/install-snapshot.d.ts +23 -0
  406. package/dist/sdk/extension/install-snapshot.js +66 -0
  407. package/dist/sdk/extension/install-snapshot.js.map +1 -0
  408. package/dist/{cli/commands → sdk}/extension/install-sources.d.ts +3 -3
  409. package/dist/{cli/commands → sdk}/extension/install-sources.js +15 -12
  410. package/dist/sdk/extension/install-sources.js.map +1 -0
  411. package/dist/{cli/commands → sdk}/extension/managed-state.js +6 -6
  412. package/dist/sdk/extension/managed-state.js.map +1 -0
  413. package/dist/sdk/extension/scaffold.d.ts +36 -0
  414. package/dist/sdk/extension/scaffold.js +2436 -0
  415. package/dist/sdk/extension/scaffold.js.map +1 -0
  416. package/dist/sdk/extension/shared.d.ts +28 -0
  417. package/dist/sdk/extension/shared.js +140 -0
  418. package/dist/sdk/extension/shared.js.map +1 -0
  419. package/dist/sdk/extension/update-check.d.ts +15 -0
  420. package/dist/sdk/extension/update-check.js +68 -0
  421. package/dist/sdk/extension/update-check.js.map +1 -0
  422. package/dist/sdk/extension.d.ts +367 -0
  423. package/dist/sdk/extension.js +2174 -0
  424. package/dist/sdk/extension.js.map +1 -0
  425. package/dist/sdk/governance/gc.d.ts +56 -0
  426. package/dist/sdk/governance/gc.js +276 -0
  427. package/dist/sdk/governance/gc.js.map +1 -0
  428. package/dist/sdk/governance/health.d.ts +187 -0
  429. package/dist/sdk/governance/health.js +1796 -0
  430. package/dist/sdk/governance/health.js.map +1 -0
  431. package/dist/sdk/governance/validate.d.ts +255 -0
  432. package/dist/sdk/governance/validate.js +2175 -0
  433. package/dist/sdk/governance/validate.js.map +1 -0
  434. package/dist/sdk/history-compact.d.ts +142 -0
  435. package/dist/sdk/history-compact.js +508 -0
  436. package/dist/sdk/history-compact.js.map +1 -0
  437. package/dist/sdk/history-mcp.d.ts +17 -0
  438. package/dist/sdk/history-mcp.js +68 -0
  439. package/dist/sdk/history-mcp.js.map +1 -0
  440. package/dist/sdk/history-read.d.ts +31 -0
  441. package/dist/sdk/history-read.js +58 -0
  442. package/dist/sdk/history-read.js.map +1 -0
  443. package/dist/sdk/history-redact.d.ts +120 -0
  444. package/dist/sdk/history-redact.js +577 -0
  445. package/dist/sdk/history-redact.js.map +1 -0
  446. package/dist/sdk/history-repair.d.ts +89 -0
  447. package/dist/sdk/history-repair.js +263 -0
  448. package/dist/sdk/history-repair.js.map +1 -0
  449. package/dist/sdk/index.d.ts +25 -1
  450. package/dist/sdk/index.js +27 -3
  451. package/dist/sdk/index.js.map +1 -1
  452. package/dist/sdk/init-agent-guidance.d.ts +113 -0
  453. package/dist/sdk/init-agent-guidance.js +437 -0
  454. package/dist/sdk/init-agent-guidance.js.map +1 -0
  455. package/dist/sdk/init.d.ts +186 -0
  456. package/dist/sdk/init.js +733 -0
  457. package/dist/sdk/init.js.map +1 -0
  458. package/dist/sdk/invocation-author.d.ts +2 -0
  459. package/dist/sdk/invocation-author.js +39 -0
  460. package/dist/sdk/invocation-author.js.map +1 -0
  461. package/dist/sdk/item-children.d.ts +45 -0
  462. package/dist/sdk/item-children.js +75 -0
  463. package/dist/sdk/item-children.js.map +1 -0
  464. package/dist/sdk/item-schedule.d.ts +26 -0
  465. package/dist/sdk/item-schedule.js +28 -0
  466. package/dist/sdk/item-schedule.js.map +1 -0
  467. package/dist/sdk/output.d.ts +7 -0
  468. package/dist/sdk/output.js +11 -0
  469. package/dist/sdk/output.js.map +1 -0
  470. package/dist/sdk/pagination.d.ts +4 -1
  471. package/dist/sdk/pagination.js +13 -5
  472. package/dist/sdk/pagination.js.map +1 -1
  473. package/dist/sdk/profile.d.ts +176 -0
  474. package/dist/sdk/profile.js +431 -0
  475. package/dist/sdk/profile.js.map +1 -0
  476. package/dist/sdk/relationship-analytics.d.ts +108 -0
  477. package/dist/sdk/relationship-analytics.js +292 -0
  478. package/dist/sdk/relationship-analytics.js.map +1 -0
  479. package/dist/sdk/relationship-context.d.ts +67 -0
  480. package/dist/sdk/relationship-context.js +207 -0
  481. package/dist/sdk/relationship-context.js.map +1 -0
  482. package/dist/sdk/relationship-history.d.ts +109 -0
  483. package/dist/sdk/relationship-history.js +401 -0
  484. package/dist/sdk/relationship-history.js.map +1 -0
  485. package/dist/sdk/relationships.d.ts +145 -0
  486. package/dist/sdk/relationships.js +551 -0
  487. package/dist/sdk/relationships.js.map +1 -0
  488. package/dist/sdk/runtime-input.d.ts +10 -0
  489. package/dist/sdk/runtime-input.js +60 -0
  490. package/dist/sdk/runtime-input.js.map +1 -0
  491. package/dist/sdk/runtime.d.ts +31 -8
  492. package/dist/sdk/runtime.js +61 -57
  493. package/dist/sdk/runtime.js.map +1 -1
  494. package/dist/sdk/schema.d.ts +507 -0
  495. package/dist/sdk/schema.js +1269 -0
  496. package/dist/sdk/schema.js.map +1 -0
  497. package/dist/{cli/commands → sdk}/templates.d.ts +1 -1
  498. package/dist/{cli/commands → sdk}/templates.js +9 -9
  499. package/dist/sdk/templates.js.map +1 -0
  500. package/dist/{cli/commands → sdk}/test/linked-command-detection.d.ts +10 -2
  501. package/dist/sdk/test/linked-command-detection.js +525 -0
  502. package/dist/sdk/test/linked-command-detection.js.map +1 -0
  503. package/docs/COMMANDS.md +58 -40
  504. package/docs/EXTENSIONS.md +10 -1
  505. package/docs/RELATIONSHIP_GRAPH.md +113 -0
  506. package/docs/RELEASING.md +2 -0
  507. package/docs/SDK.md +156 -9
  508. package/docs/SDK_CUSTOMIZATION_PRIMITIVES.md +79 -0
  509. package/marketplace.json +2 -2
  510. package/package.json +3 -2
  511. package/packages/pm-beads/package.json +1 -1
  512. package/packages/pm-calendar/package.json +1 -1
  513. package/packages/pm-command-kit/package.json +1 -1
  514. package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +76 -16
  515. package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +8 -0
  516. package/packages/pm-governance-audit/package.json +1 -1
  517. package/packages/pm-guide-shell/package.json +1 -1
  518. package/packages/pm-kanban/package.json +1 -1
  519. package/packages/pm-lifecycle-hooks/package.json +1 -1
  520. package/packages/pm-linked-test-adapters/package.json +1 -1
  521. package/packages/pm-search-advanced/package.json +1 -1
  522. package/packages/pm-templates/package.json +1 -1
  523. package/packages/pm-todos/package.json +1 -1
  524. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  525. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  526. package/scripts/bundle-cli.mjs +66 -23
  527. package/dist/cli/commands/extension/bundled-catalog.js.map +0 -1
  528. package/dist/cli/commands/extension/doctor.js.map +0 -1
  529. package/dist/cli/commands/extension/install-sources.js.map +0 -1
  530. package/dist/cli/commands/extension/managed-state.js.map +0 -1
  531. package/dist/cli/commands/templates.js.map +0 -1
  532. package/dist/cli/commands/test/linked-command-detection.js +0 -248
  533. package/dist/cli/commands/test/linked-command-detection.js.map +0 -1
  534. package/dist/cli-bundle/chunks/append-DYQWQK2J.js +0 -11
  535. package/dist/cli-bundle/chunks/chunk-2GA3NK35.js +0 -530
  536. package/dist/cli-bundle/chunks/chunk-2GA3NK35.js.map +0 -1
  537. package/dist/cli-bundle/chunks/chunk-2QIQGYPW.js.map +0 -7
  538. package/dist/cli-bundle/chunks/chunk-4DY4KPQI.js.map +0 -7
  539. package/dist/cli-bundle/chunks/chunk-4WREH7RT.js +0 -554
  540. package/dist/cli-bundle/chunks/chunk-4WREH7RT.js.map +0 -7
  541. package/dist/cli-bundle/chunks/chunk-5CT5BW6E.js.map +0 -7
  542. package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +0 -7
  543. package/dist/cli-bundle/chunks/chunk-6MHSBDGD.js.map +0 -7
  544. package/dist/cli-bundle/chunks/chunk-6OTZMORS.js.map +0 -7
  545. package/dist/cli-bundle/chunks/chunk-6PKA3SJQ.js.map +0 -1
  546. package/dist/cli-bundle/chunks/chunk-6TTOHMTB.js.map +0 -1
  547. package/dist/cli-bundle/chunks/chunk-7QDSYUMF.js.map +0 -1
  548. package/dist/cli-bundle/chunks/chunk-7TQMR6LK.js.map +0 -7
  549. package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js +0 -312
  550. package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +0 -7
  551. package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +0 -1
  552. package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +0 -1
  553. package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js +0 -858
  554. package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js.map +0 -1
  555. package/dist/cli-bundle/chunks/chunk-DVOLZJ3C.js.map +0 -1
  556. package/dist/cli-bundle/chunks/chunk-DYEX6NFH.js.map +0 -7
  557. package/dist/cli-bundle/chunks/chunk-F7PSHRNO.js.map +0 -1
  558. package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js +0 -875
  559. package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js.map +0 -7
  560. package/dist/cli-bundle/chunks/chunk-FTQLW4JD.js.map +0 -1
  561. package/dist/cli-bundle/chunks/chunk-IA3YFTXT.js.map +0 -1
  562. package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +0 -7
  563. package/dist/cli-bundle/chunks/chunk-J4NZOP3I.js.map +0 -1
  564. package/dist/cli-bundle/chunks/chunk-JL7WZ4O2.js.map +0 -7
  565. package/dist/cli-bundle/chunks/chunk-L24HCJFC.js +0 -309
  566. package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +0 -1
  567. package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +0 -7
  568. package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +0 -1
  569. package/dist/cli-bundle/chunks/chunk-N3CMP4NI.js.map +0 -1
  570. package/dist/cli-bundle/chunks/chunk-PHKP3AGR.js.map +0 -7
  571. package/dist/cli-bundle/chunks/chunk-Q37E63AM.js.map +0 -7
  572. package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +0 -1
  573. package/dist/cli-bundle/chunks/chunk-RGXD5JJR.js.map +0 -7
  574. package/dist/cli-bundle/chunks/chunk-UB2QYSTO.js.map +0 -1
  575. package/dist/cli-bundle/chunks/chunk-UGTVWL3E.js.map +0 -1
  576. package/dist/cli-bundle/chunks/chunk-ZAYYDNB3.js.map +0 -1
  577. package/dist/cli-bundle/chunks/chunk-ZUKSZVBW.js.map +0 -7
  578. package/dist/cli-bundle/chunks/close-RI4JQQHU.js +0 -12
  579. package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +0 -21
  580. package/dist/cli-bundle/chunks/comments-35M273DN.js +0 -13
  581. package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +0 -9
  582. package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +0 -10
  583. package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +0 -14
  584. package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +0 -10
  585. package/dist/cli-bundle/chunks/history-compact-M7GHYVFN.js +0 -20
  586. package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +0 -16
  587. package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +0 -18
  588. package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +0 -13
  589. package/dist/cli-bundle/chunks/notes-BSD53H2W.js +0 -13
  590. package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +0 -24
  591. package/dist/cli-bundle/chunks/register-list-query-BUWCYHBT.js.map +0 -7
  592. package/dist/cli-bundle/chunks/register-list-query-KTZ6AGE7.js.map +0 -1
  593. package/dist/cli-bundle/chunks/register-mutation-4FMGJJF7.js.map +0 -1
  594. package/dist/cli-bundle/chunks/restore-66GLMHIX.js +0 -14
  595. package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +0 -21
  596. package/dist/cli-bundle/chunks/update-many-75K57FS3.js +0 -34
  597. package/dist/cli-bundle/chunks/update-many-U42YA445.js +0 -30
  598. /package/dist/cli-bundle/chunks/{append-PVZJDM6J.js.map → append-OJQFUQ4T.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{append-DYQWQK2J.js.map → append-UZVHUO74.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js.map → chunk-2IFFUZLC.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js.map → chunk-2JKGO6QX.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js.map → chunk-2NCIPMQP.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js.map → chunk-2VPAVL7O.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js.map → chunk-2WSE6PO2.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js.map → chunk-34L5OT3Y.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js.map → chunk-3AUGG2DP.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js.map → chunk-3CLU2XZO.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js.map → chunk-3WM75PWC.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js.map → chunk-5JLUII3O.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js.map → chunk-6N2VXVTQ.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js.map → chunk-6S3YSUYG.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js.map → chunk-AHVTB5I5.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js.map → chunk-APRVSW2O.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js.map → chunk-B7PE22W6.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js.map → chunk-BCOFWYW4.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js.map → chunk-BEP7WJA2.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js.map → chunk-CRVF2JDM.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js.map → chunk-DM4H7FP4.js.map} +0 -0
  619. /package/dist/cli-bundle/chunks/{close-LZECOMHO.js.map → chunk-DUT67M43.js.map} +0 -0
  620. /package/dist/cli-bundle/chunks/{chunk-44LNIULG.js.map → chunk-DYH63FX7.js.map} +0 -0
  621. /package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js.map → chunk-EAB64KLB.js.map} +0 -0
  622. /package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js.map → chunk-EACOH7AU.js.map} +0 -0
  623. /package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js.map → chunk-EJEXHTY5.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js.map → chunk-EYLCSJAI.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{chunk-655STMGA.js.map → chunk-FMBNM2EN.js.map} +0 -0
  626. /package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js.map → chunk-FNSPG7MU.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{chunk-KB726FMH.js.map → chunk-H2Z3FYXQ.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js.map → chunk-IA5FKNII.js.map} +0 -0
  629. /package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js.map → chunk-IJIICKVW.js.map} +0 -0
  630. /package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js.map → chunk-JOUQZENX.js.map} +0 -0
  631. /package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js.map → chunk-JYFOV7FC.js.map} +0 -0
  632. /package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js.map → chunk-K2X6U4UA.js.map} +0 -0
  633. /package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js.map → chunk-KG44YSKD.js.map} +0 -0
  634. /package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js.map → chunk-KPMKHGEA.js.map} +0 -0
  635. /package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js.map → chunk-MIQDDLB5.js.map} +0 -0
  636. /package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js.map → chunk-NLDFBC6J.js.map} +0 -0
  637. /package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js.map → chunk-NP22ERDF.js.map} +0 -0
  638. /package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js.map → chunk-NU3IMIEA.js.map} +0 -0
  639. /package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js.map → chunk-NVPZIJVR.js.map} +0 -0
  640. /package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js.map → chunk-ODALILG3.js.map} +0 -0
  641. /package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js.map → chunk-ONREO4ST.js.map} +0 -0
  642. /package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js.map → chunk-P74IZQ7A.js.map} +0 -0
  643. /package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js.map → chunk-PGY23YTC.js.map} +0 -0
  644. /package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js.map → chunk-PMOSXADO.js.map} +0 -0
  645. /package/dist/cli-bundle/chunks/{close-RI4JQQHU.js.map → chunk-PNTULOGU.js.map} +0 -0
  646. /package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js.map → chunk-Q7A43DS4.js.map} +0 -0
  647. /package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js.map → chunk-QEHQ2GVG.js.map} +0 -0
  648. /package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js.map → chunk-QIPLHNP7.js.map} +0 -0
  649. /package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js.map → chunk-QKJGPFAF.js.map} +0 -0
  650. /package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js.map → chunk-RLCHOOHC.js.map} +0 -0
  651. /package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js.map → chunk-RMLWNPH2.js.map} +0 -0
  652. /package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js.map → chunk-RRM5JYJC.js.map} +0 -0
  653. /package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js.map → chunk-S6MQESFR.js.map} +0 -0
  654. /package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js.map → chunk-SDQLJWBO.js.map} +0 -0
  655. /package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js.map → chunk-SELVXEZK.js.map} +0 -0
  656. /package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js.map → chunk-TKOVBP6C.js.map} +0 -0
  657. /package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js.map → chunk-TQSZFPIS.js.map} +0 -0
  658. /package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js.map → chunk-TSMHDIW4.js.map} +0 -0
  659. /package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js.map → chunk-UFXU44HV.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js.map → chunk-ULTHRDBP.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js.map → chunk-UOHFKBUV.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js.map → chunk-UY2ACEMF.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js.map → chunk-WUJQK4YV.js.map} +0 -0
  664. /package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js.map → chunk-XSJUSQAE.js.map} +0 -0
  665. /package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js.map → chunk-YAQEBNY7.js.map} +0 -0
  666. /package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js.map → chunk-YBLZ2VE7.js.map} +0 -0
  667. /package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js.map → chunk-YCQET3OT.js.map} +0 -0
  668. /package/dist/cli-bundle/chunks/{close-many-LY2XJ52M.js.map → chunk-YUSOJDWM.js.map} +0 -0
  669. /package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js.map → chunk-ZI6VQWQ7.js.map} +0 -0
  670. /package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js.map → close-CWODTPKG.js.map} +0 -0
  671. /package/dist/cli-bundle/chunks/{comments-35M273DN.js.map → close-W6LI2PKM.js.map} +0 -0
  672. /package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js.map → close-many-CQFUY7MR.js.map} +0 -0
  673. /package/dist/cli-bundle/chunks/{copy-NPYM7M7U.js.map → close-many-DLDDVSH5.js.map} +0 -0
  674. /package/dist/cli-bundle/chunks/{create-F53OBTOU.js.map → comments-E3TNTK24.js.map} +0 -0
  675. /package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js.map → comments-WGLHR7LB.js.map} +0 -0
  676. /package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js.map → copy-LXVDXH7B.js.map} +0 -0
  677. /package/dist/cli-bundle/chunks/{delete-ODRWJWAM.js.map → copy-Q5ZJPUKR.js.map} +0 -0
  678. /package/dist/cli-bundle/chunks/{deps-U57I7EAK.js.map → create-J5U6ND4K.js.map} +0 -0
  679. /package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js.map → create-LBVCYMEG.js.map} +0 -0
  680. /package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js.map → delete-PMJBNY5G.js.map} +0 -0
  681. /package/dist/cli-bundle/chunks/{docs-G7N4E2JO.js.map → delete-WNHB3LYW.js.map} +0 -0
  682. /package/dist/cli-bundle/chunks/{files-TTY6N2AV.js.map → deps-JZ7TMVCB.js.map} +0 -0
  683. /package/dist/cli-bundle/chunks/{files-TBZD7V6H.js.map → deps-OA26IS25.js.map} +0 -0
  684. /package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js.map → docs-FEWB2DQB.js.map} +0 -0
  685. /package/dist/cli-bundle/chunks/{focus-U5TRVCRS.js.map → docs-HA2AIDBB.js.map} +0 -0
  686. /package/dist/cli-bundle/chunks/{history-compact-M7GHYVFN.js.map → files-6YFBJRBG.js.map} +0 -0
  687. /package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js.map → files-EFIWKFTM.js.map} +0 -0
  688. /package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js.map → focus-4QJR7FOQ.js.map} +0 -0
  689. /package/dist/cli-bundle/chunks/{history-redact-JIHZLHDP.js.map → focus-POIW5LTJ.js.map} +0 -0
  690. /package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js.map → history-compact-CKRPDTJN.js.map} +0 -0
  691. /package/dist/cli-bundle/chunks/{history-repair-NAFCHLH7.js.map → history-compact-FWG2C7FZ.js.map} +0 -0
  692. /package/dist/cli-bundle/chunks/{learnings-SONGPSHI.js.map → history-redact-BB3TGDAE.js.map} +0 -0
  693. /package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js.map → history-redact-D225BHOZ.js.map} +0 -0
  694. /package/dist/cli-bundle/chunks/{notes-BSD53H2W.js.map → history-repair-6GEAM7HE.js.map} +0 -0
  695. /package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js.map → history-repair-RQXKQHL4.js.map} +0 -0
  696. /package/dist/cli-bundle/chunks/{plan-2NNEO46V.js.map → learnings-JLNLCOL5.js.map} +0 -0
  697. /package/dist/cli-bundle/chunks/{plan-AWLYGBNV.js.map → learnings-RSNLSWDC.js.map} +0 -0
  698. /package/dist/cli-bundle/chunks/{profile-U725ATWZ.js.map → notes-2WDH6DXU.js.map} +0 -0
  699. /package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js.map → notes-GB47XXQQ.js.map} +0 -0
  700. /package/dist/cli-bundle/chunks/{restore-66GLMHIX.js.map → plan-DOVI2VMW.js.map} +0 -0
  701. /package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js.map → plan-VDCJ2PCN.js.map} +0 -0
  702. /package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js.map → profile-FAU7NZML.js.map} +0 -0
  703. /package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js.map → profile-IVXQEL3D.js.map} +0 -0
  704. /package/dist/cli-bundle/chunks/{update-Q3UCILNR.js.map → restore-25DLT2Q2.js.map} +0 -0
  705. /package/dist/cli-bundle/chunks/{update-2XGHIVQ2.js.map → restore-YPMVUUEX.js.map} +0 -0
  706. /package/dist/cli-bundle/chunks/{update-many-75K57FS3.js.map → schema-FNU3WE4O.js.map} +0 -0
  707. /package/dist/cli-bundle/chunks/{update-many-U42YA445.js.map → schema-NBCM3RAD.js.map} +0 -0
  708. /package/dist/{cli/commands → sdk}/extension/managed-state.d.ts +0 -0
@@ -1,431 +1,10 @@
1
1
  /**
2
2
  * @module cli/commands/profile
3
3
  *
4
- * Implements the `pm profile` command surface: listing the built-in project
5
- * archetypes, showing a profile's full composition, and applying a profile to an
6
- * initialized tracker. Apply stages item types, custom statuses, custom fields,
7
- * per-type workflows, config knobs, and create templates idempotently, and
8
- * surfaces advisory package recommendations. The pure diff lives in
9
- * {@link module:core/profile/profile-plan}; this module is the I/O orchestration
10
- * and human formatting around it.
4
+ * Preserves the CLI compatibility import path for SDK-owned project profile primitives.
11
5
  */
12
6
 
13
- !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]="475c64a1-b819-5538-bddd-512f1c43fdde")}catch(e){}}();
14
- import path from "node:path";
15
- import { pathExists, readFileIfExists, writeFileAtomic, } from "../../core/fs/fs-utils.js";
16
- import { acquireLock } from "../../core/lock/lock.js";
17
- import { EXIT_CODE } from "../../core/shared/constants.js";
18
- import { PmCliError } from "../../core/shared/errors.js";
19
- import { resolveAuthor } from "../../core/shared/author.js";
20
- import { nowIso } from "../../core/shared/time.js";
21
- import { getSettingsPath, resolvePmRoot } from "../../core/store/paths.js";
22
- import { readSettings, resolveGovernanceKnobs, writeSettings, } from "../../core/store/settings.js";
23
- import { DEFAULT_RUNTIME_SCHEMA_FILE_PATHS, filePathForSchemaSection, normalizeRuntimeSchemaSettings, } from "../../core/schema/runtime-schema.js";
24
- import { normalizeAddTypeInput, serializeItemTypesFile, } from "../../core/schema/item-types-file.js";
25
- import { serializeStatusDefsFile } from "../../core/schema/status-defs-file.js";
26
- import { serializeFieldsFile } from "../../core/schema/fields-file.js";
27
- import { resolveNestedSettingDescriptor, writeNestedSettingValue, } from "../../core/config/nested-settings.js";
28
- import { getActiveExtensionRegistrations, runActiveOnWriteHooks, } from "../../core/extensions/index.js";
29
- import { resolveProfileCatalog, resolveProfileEntry, } from "../../core/profile/profile-presets.js";
30
- import { describeProfileComposition, describeProjectProfile, } from "../../core/profile/profile-describe.js";
31
- import { lintProjectProfile, } from "../../core/profile/profile-lint.js";
32
- import { planProfileApplication, } from "../../core/profile/profile-plan.js";
33
- import { ensureTypeFolderScaffold } from "./schema.js";
34
- import { runTemplatesSave } from "./templates.js";
35
- /** Ordered `pm profile` subcommands. */
36
- export const PROFILE_SUBCOMMANDS = ["list", "show", "apply", "lint"];
37
- const PROFILE_TYPES_LOCK_ID = "schema-types";
38
- const PROFILE_STATUSES_LOCK_ID = "schema-statuses";
39
- const PROFILE_FIELDS_LOCK_ID = "schema-fields";
40
- /* c8 ignore start -- profile command I/O orchestration and formatting is covered by profile integration workflows; the idempotent diff is unit-tested in core/profile/profile-plan. */
41
- /** Collects the profiles contributed by active extensions, mapping the live registration registry onto the resolver's contribution shape. Returns an empty list when extensions are disabled or none registered a profile. */
42
- function collectExtensionProfileContributions() {
43
- const registrations = getActiveExtensionRegistrations();
44
- if (registrations === null) {
45
- return [];
46
- }
47
- return registrations.profiles.map((entry) => ({
48
- name: entry.name,
49
- profile: entry.profile,
50
- }));
51
- }
52
- /** Lists every available profile — the built-in archetypes followed by profiles contributed by active extensions — with per-dimension composition counts and the source each came from. Surfaces any non-fatal merge collisions as warnings. */
53
- export function runProfileList() {
54
- const { profiles, warnings } = resolveProfileCatalog(collectExtensionProfileContributions());
55
- return {
56
- action: "list",
57
- profiles: profiles.map((resolved) => ({
58
- name: resolved.definition.name,
59
- title: resolved.definition.title,
60
- summary: resolved.definition.summary,
61
- source: resolved.source,
62
- ...(resolved.package !== undefined ? { package: resolved.package } : {}),
63
- composition: describeProfileComposition(resolved.definition),
64
- })),
65
- warnings,
66
- generated_at: nowIso(),
67
- };
68
- }
69
- /** Shows the full composition of a single profile, resolved across built-in and extension-contributed archetypes. Throws a USAGE error for a missing or unknown profile name. */
70
- export function runProfileShow(name) {
71
- let entry;
72
- try {
73
- entry = resolveProfileEntry(name, collectExtensionProfileContributions());
74
- }
75
- catch (error) {
76
- throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
77
- }
78
- const { resolved } = entry;
79
- return {
80
- action: "show",
81
- ...describeProjectProfile(resolved.definition),
82
- source: resolved.source,
83
- ...(resolved.package !== undefined ? { package: resolved.package } : {}),
84
- warnings: entry.warnings,
85
- generated_at: nowIso(),
86
- };
87
- }
88
- /** Lints a single profile, resolved across built-in and extension-contributed archetypes, returning every graded consistency finding plus any catalog merge warnings. Throws a USAGE error for a missing or unknown profile name. This is the read-only author-time validation surface; it never writes to the tracker. */
89
- export function runProfileLint(name) {
90
- let entry;
91
- try {
92
- entry = resolveProfileEntry(name, collectExtensionProfileContributions());
93
- }
94
- catch (error) {
95
- throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
96
- }
97
- const { resolved } = entry;
98
- const report = lintProjectProfile(resolved.definition);
99
- return {
100
- action: "lint",
101
- name: resolved.definition.name,
102
- title: resolved.definition.title,
103
- source: resolved.source,
104
- ...(resolved.package !== undefined ? { package: resolved.package } : {}),
105
- ok: report.ok,
106
- error_count: report.errorCount,
107
- warning_count: report.warningCount,
108
- findings: report.findings,
109
- warnings: entry.warnings,
110
- generated_at: nowIso(),
111
- };
112
- }
113
- function templateFilePath(pmRoot, name) {
114
- return path.join(pmRoot, "templates", `${name}.json`);
115
- }
116
- async function readStoredTemplateOptions(pmRoot, name) {
117
- const raw = await readFileIfExists(templateFilePath(pmRoot, name));
118
- if (raw === null) {
119
- return undefined;
120
- }
121
- try {
122
- const parsed = JSON.parse(raw);
123
- if (parsed !== null &&
124
- typeof parsed === "object" &&
125
- !Array.isArray(parsed)) {
126
- const options = parsed.options;
127
- if (options !== null &&
128
- typeof options === "object" &&
129
- !Array.isArray(options)) {
130
- return options;
131
- }
132
- }
133
- }
134
- catch {
135
- // A malformed template file is treated as absent so apply re-stages it.
136
- }
137
- return undefined;
138
- }
139
- async function loadProfileCurrentState(pmRoot, schema, settings, profile) {
140
- const templates = new Map();
141
- for (const template of profile.templates) {
142
- const stored = await readStoredTemplateOptions(pmRoot, template.name);
143
- if (stored !== undefined) {
144
- templates.set(template.name, stored);
145
- }
146
- }
147
- return {
148
- typesRaw: await readFileIfExists(filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types)),
149
- statusesRaw: await readFileIfExists(filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses)),
150
- fieldsRaw: await readFileIfExists(filePathForSchemaSection(pmRoot, schema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields)),
151
- workflows: settings.schema.type_workflows ?? [],
152
- settings,
153
- templates,
154
- // Package recommendations are advisory: apply never installs and never
155
- // inspects install state, so every recommendation surfaces as "recommended".
156
- // The planner still supports an install-state set for SDK consumers that want
157
- // richer reporting.
158
- installedPackages: new Set(),
159
- };
160
- }
161
- function dimensionFrom(changes) {
162
- const added = [];
163
- const updated = [];
164
- const unchanged = [];
165
- for (const change of changes) {
166
- (change.status === "add"
167
- ? added
168
- : change.status === "update"
169
- ? updated
170
- : unchanged).push(change.key);
171
- }
172
- return { added, updated, unchanged };
173
- }
174
- function buildApplyResult(profile, plan, applied, dryRun, warnings) {
175
- return {
176
- action: "apply",
177
- name: profile.name,
178
- title: profile.title,
179
- applied,
180
- dry_run: dryRun,
181
- changed: plan.changed,
182
- types: dimensionFrom(plan.types.changes),
183
- statuses: dimensionFrom(plan.statuses.changes),
184
- fields: dimensionFrom(plan.fields.changes),
185
- workflows: dimensionFrom(plan.workflows.changes.map((change) => ({
186
- key: change.type,
187
- status: change.status,
188
- }))),
189
- config: dimensionFrom(plan.config.changes),
190
- templates: dimensionFrom(plan.templates.changes.map((change) => ({
191
- key: change.name,
192
- status: change.status,
193
- }))),
194
- packages: plan.packages,
195
- warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
196
- generated_at: nowIso(),
197
- };
198
- }
199
- async function assertProfileTrackerInitialized(pmRoot) {
200
- if (!(await pathExists(getSettingsPath(pmRoot)))) {
201
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
202
- }
203
- }
204
- function resolveProfileForCommand(name) {
205
- try {
206
- const entry = resolveProfileEntry(name, collectExtensionProfileContributions());
207
- return {
208
- profile: entry.resolved.definition,
209
- warnings: entry.warnings,
210
- };
211
- }
212
- catch (error) {
213
- throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
214
- }
215
- }
216
- /** Applies a profile to the initialized tracker, or previews the idempotent diff when `dryRun` is set. Schema files are written under their respective locks; config and workflows are persisted to settings; templates are staged via the shared template writer. Re-applying an already-applied profile performs zero writes. Throws a USAGE error for an unknown profile or an invalid config knob, and a NOT_FOUND error when the tracker is not initialized. */
217
- export async function runProfileApply(name, options, global) {
218
- const pmRoot = resolvePmRoot(process.cwd(), global.path);
219
- await assertProfileTrackerInitialized(pmRoot);
220
- // Catalog-level merge warnings (e.g. an extension profile shadowed by a
221
- // built-in) seed the result so `apply` surfaces them the same way `list`
222
- // does, rather than silently swallowing them.
223
- const resolvedProfile = resolveProfileForCommand(name);
224
- const profile = resolvedProfile.profile;
225
- const mergeWarnings = resolvedProfile.warnings;
226
- const dryRun = options.dryRun === true;
227
- const settings = await readSettings(pmRoot);
228
- const schema = normalizeRuntimeSchemaSettings(settings.schema);
229
- if (dryRun) {
230
- const state = await loadProfileCurrentState(pmRoot, schema, settings, profile);
231
- const plan = planProfile(profile, state);
232
- return buildApplyResult(profile, plan, false, true, [...mergeWarnings]);
233
- }
234
- const author = resolveAuthor(options.author, settings.author_default);
235
- const governance = resolveGovernanceKnobs(settings);
236
- const force = Boolean(options.force);
237
- const warnings = [...mergeWarnings];
238
- // Acquire all three schema locks inside the try so a later acquisition that
239
- // throws (held/stale lock without --force) still releases the earlier ones in
240
- // finally rather than stranding them until TTL expiry.
241
- const releasers = [];
242
- const acquire = async (lockId) => {
243
- releasers.push(await acquireLock(pmRoot, lockId, settings.locks.ttl_seconds, author, force, governance.force_required_for_stale_lock, settings.locks.wait_ms));
244
- };
245
- let plan;
246
- try {
247
- await acquire(PROFILE_TYPES_LOCK_ID);
248
- await acquire(PROFILE_STATUSES_LOCK_ID);
249
- await acquire(PROFILE_FIELDS_LOCK_ID);
250
- const state = await loadProfileCurrentState(pmRoot, schema, settings, profile);
251
- plan = planProfile(profile, state);
252
- if (plan.types.changed) {
253
- const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
254
- await writeFileAtomic(typesPath, serializeItemTypesFile(plan.types.file));
255
- const stagedNames = new Set(profile.types.map((type) => normalizeAddTypeInput(type).name));
256
- const stagedDefinitions = plan.types.file.definitions.filter((definition) => stagedNames.has(definition.name));
257
- await ensureTypeFolderScaffold(pmRoot, stagedDefinitions, warnings, "profile:apply-type-folder");
258
- warnings.push(...(await runActiveOnWriteHooks({
259
- path: typesPath,
260
- scope: "project",
261
- op: "profile:apply-types",
262
- })));
263
- }
264
- if (plan.statuses.changed) {
265
- const statusesPath = filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses);
266
- await writeFileAtomic(statusesPath, serializeStatusDefsFile(plan.statuses.file));
267
- warnings.push(...(await runActiveOnWriteHooks({
268
- path: statusesPath,
269
- scope: "project",
270
- op: "profile:apply-statuses",
271
- })));
272
- }
273
- if (plan.fields.changed) {
274
- const fieldsPath = filePathForSchemaSection(pmRoot, schema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields);
275
- await writeFileAtomic(fieldsPath, serializeFieldsFile(plan.fields.file));
276
- warnings.push(...(await runActiveOnWriteHooks({
277
- path: fieldsPath,
278
- scope: "project",
279
- op: "profile:apply-fields",
280
- })));
281
- }
282
- if (plan.config.changed || plan.workflows.changed) {
283
- for (const change of plan.config.changes) {
284
- if (change.status === "unchanged") {
285
- continue;
286
- }
287
- const descriptor = resolveNestedSettingDescriptor(change.key);
288
- if (descriptor !== undefined) {
289
- writeNestedSettingValue(settings, descriptor, change.value);
290
- }
291
- }
292
- settings.schema.type_workflows = plan.workflows.result;
293
- await writeSettings(pmRoot, settings, "profile:apply-config");
294
- }
295
- for (const change of plan.templates.changes) {
296
- if (change.status === "unchanged") {
297
- continue;
298
- }
299
- await runTemplatesSave(change.name, { ...change.options }, global);
300
- }
301
- }
302
- finally {
303
- // Release in reverse acquisition order; only locks actually acquired are
304
- // present. Each release is best-effort so one rejecting release never strands
305
- // the remaining locks (a failed release falls back to TTL expiry).
306
- for (const release of releasers.reverse()) {
307
- try {
308
- await release();
309
- }
310
- catch {
311
- // Ignore: a failed lock release is non-fatal and self-heals at TTL.
312
- }
313
- }
314
- }
315
- return buildApplyResult(profile, plan, plan.changed, false, warnings);
316
- }
317
- // planProfileApplication can throw a plain Error for an invalid config knob; map
318
- // it to a USAGE exit code consistently across the dry-run and apply paths.
319
- function planProfile(profile, state) {
320
- try {
321
- return planProfileApplication(profile, state);
322
- }
323
- catch (error) {
324
- throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
325
- }
326
- }
327
- function formatDimensionLine(label, dimension) {
328
- const segments = [];
329
- if (dimension.added.length > 0) {
330
- segments.push(`+${dimension.added.join(", ")}`);
331
- }
332
- if (dimension.updated.length > 0) {
333
- segments.push(`~${dimension.updated.join(", ")}`);
334
- }
335
- if (segments.length === 0) {
336
- return undefined;
337
- }
338
- return ` ${label}: ${segments.join(" ")}`;
339
- }
340
- /** Renders the `pm profile list` result as human-readable text. */
341
- export function formatProfileListHuman(result) {
342
- const lines = ["Project profiles:"];
343
- for (const profile of result.profiles) {
344
- const origin = profile.source === "extension"
345
- ? ` [${profile.package ?? "extension"}]`
346
- : "";
347
- lines.push(` ${profile.name} — ${profile.title}: ${profile.summary}${origin}`);
348
- }
349
- for (const warning of result.warnings) {
350
- lines.push(` warning: ${warning}`);
351
- }
352
- return lines.join("\n");
353
- }
354
- /** Renders the `pm profile show` result as human-readable text. */
355
- export function formatProfileShowHuman(result) {
356
- const origin = result.source === "extension" ? ` [${result.package ?? "extension"}]` : "";
357
- const lines = [
358
- `${result.name} — ${result.title}${origin}`,
359
- result.summary,
360
- "",
361
- ];
362
- lines.push(`types: ${result.types.join(", ") || "(none)"}`);
363
- lines.push(`statuses: ${result.statuses.join(", ") || "(none)"}`);
364
- lines.push(`fields: ${result.fields.join(", ") || "(none)"}`);
365
- lines.push(`workflows: ${result.workflows.join(", ") || "(none)"}`);
366
- lines.push(`config: ${result.config.join(", ") || "(none)"}`);
367
- lines.push(`templates: ${result.templates.join(", ") || "(none)"}`);
368
- lines.push(`packages: ${result.packages.map((pkg) => pkg.spec).join(", ") || "(none)"}`);
369
- for (const warning of result.warnings) {
370
- lines.push(`warning: ${warning}`);
371
- }
372
- return lines.join("\n");
373
- }
374
- /** Renders the `pm profile lint` result as human-readable text: a one-line verdict followed by each finding prefixed with its severity, code, and dimension. */
375
- export function formatProfileLintHuman(result) {
376
- const origin = result.source === "extension" ? ` [${result.package ?? "extension"}]` : "";
377
- // Catalog merge warnings are rendered below alongside lint-finding warnings, so
378
- // fold them into the headline count to avoid an "ok (0 warnings)" verdict that
379
- // is immediately followed by `warning:` lines.
380
- const totalWarningCount = result.warning_count + result.warnings.length;
381
- const verdict = result.ok
382
- ? `Profile ${result.name}${origin}: ok (${totalWarningCount} warning${totalWarningCount === 1 ? "" : "s"})`
383
- : `Profile ${result.name}${origin}: ${result.error_count} error${result.error_count === 1 ? "" : "s"}, ${totalWarningCount} warning${totalWarningCount === 1 ? "" : "s"}`;
384
- const lines = [verdict];
385
- for (const finding of result.findings) {
386
- const target = finding.target !== undefined ? ` (${finding.target})` : "";
387
- lines.push(` ${finding.severity} [${finding.code}] ${finding.dimension}${target}: ${finding.message}`);
388
- }
389
- for (const warning of result.warnings) {
390
- lines.push(` warning: ${warning}`);
391
- }
392
- return lines.join("\n");
393
- }
394
- /** Renders the `pm profile apply` result as human-readable text, including the staged diff and any package recommendations. */
395
- export function formatProfileApplyHuman(result) {
396
- const mode = result.dry_run
397
- ? "dry-run"
398
- : result.applied
399
- ? "applied"
400
- : "no changes";
401
- const lines = [`Profile ${result.name} (${mode})`];
402
- if (!result.changed) {
403
- lines.push(" already up to date");
404
- }
405
- else {
406
- for (const [label, dimension] of [
407
- ["types", result.types],
408
- ["statuses", result.statuses],
409
- ["fields", result.fields],
410
- ["workflows", result.workflows],
411
- ["config", result.config],
412
- ["templates", result.templates],
413
- ]) {
414
- const line = formatDimensionLine(label, dimension);
415
- if (line !== undefined) {
416
- lines.push(line);
417
- }
418
- }
419
- }
420
- const recommended = result.packages.filter((pkg) => pkg.status === "recommended");
421
- if (recommended.length > 0) {
422
- lines.push(` recommended packages: ${recommended.map((pkg) => pkg.spec).join(", ")}`);
423
- }
424
- for (const warning of result.warnings) {
425
- lines.push(` warning: ${warning}`);
426
- }
427
- return lines.join("\n");
428
- }
429
- /* c8 ignore stop */
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="93676982-06c1-54a9-85e9-452df3aebe93")}catch(e){}}();
8
+ export * from "../../sdk/profile.js";
430
9
  //# sourceMappingURL=profile.js.map
431
- //# debugId=475c64a1-b819-5538-bddd-512f1c43fdde
10
+ //# debugId=93676982-06c1-54a9-85e9-452df3aebe93
@@ -1 +1 @@
1
- {"version":3,"file":"profile.js","sources":["cli/commands/profile.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/profile\n *\n * Implements the `pm profile` command surface: listing the built-in project\n * archetypes, showing a profile's full composition, and applying a profile to an\n * initialized tracker. Apply stages item types, custom statuses, custom fields,\n * per-type workflows, config knobs, and create templates idempotently, and\n * surfaces advisory package recommendations. The pure diff lives in\n * {@link module:core/profile/profile-plan}; this module is the I/O orchestration\n * and human formatting around it.\n */\nimport path from \"node:path\";\nimport {\n pathExists,\n readFileIfExists,\n writeFileAtomic,\n} from \"../../core/fs/fs-utils.js\";\nimport { acquireLock } from \"../../core/lock/lock.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport {\n readSettings,\n resolveGovernanceKnobs,\n writeSettings,\n} from \"../../core/store/settings.js\";\nimport {\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,\n filePathForSchemaSection,\n normalizeRuntimeSchemaSettings,\n} from \"../../core/schema/runtime-schema.js\";\nimport {\n normalizeAddTypeInput,\n serializeItemTypesFile,\n} from \"../../core/schema/item-types-file.js\";\nimport { serializeStatusDefsFile } from \"../../core/schema/status-defs-file.js\";\nimport { serializeFieldsFile } from \"../../core/schema/fields-file.js\";\nimport {\n resolveNestedSettingDescriptor,\n writeNestedSettingValue,\n} from \"../../core/config/nested-settings.js\";\nimport {\n getActiveExtensionRegistrations,\n runActiveOnWriteHooks,\n} from \"../../core/extensions/index.js\";\nimport {\n resolveProfileCatalog,\n resolveProfileEntry,\n type ExtensionProfileContribution,\n type ProfileSourceKind,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ResolveProfileEntryResult,\n} from \"../../core/profile/profile-presets.js\";\nimport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n} from \"../../core/profile/profile-describe.js\";\nimport {\n lintProjectProfile,\n type ProjectProfileLintFinding,\n} from \"../../core/profile/profile-lint.js\";\nimport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileCurrentState,\n} from \"../../core/profile/profile-plan.js\";\nimport { ensureTypeFolderScaffold } from \"./schema.js\";\nimport { runTemplatesSave } from \"./templates.js\";\n\n/** Ordered `pm profile` subcommands. */\nexport const PROFILE_SUBCOMMANDS = [\"list\", \"show\", \"apply\", \"lint\"] as const;\n/** Restricts profile subcommand values accepted by command, SDK, and storage contracts. */\nexport type ProfileSubcommand = (typeof PROFILE_SUBCOMMANDS)[number];\n\nconst PROFILE_TYPES_LOCK_ID = \"schema-types\";\nconst PROFILE_STATUSES_LOCK_ID = \"schema-statuses\";\nconst PROFILE_FIELDS_LOCK_ID = \"schema-fields\";\n\n/**\n * Per-dimension counts summarizing how much a profile stages. Aliases the shared\n * {@link ProjectProfileComposition} so the CLI result shape and the core describe\n * primitive never drift.\n */\nexport type ProfileComposition = ProjectProfileComposition;\n\n/** A single profile entry in the `pm profile list` payload. */\nexport interface ProfileListEntry {\n /** Profile name. */\n name: string;\n /** Display title. */\n title: string;\n /** One-line archetype summary. */\n summary: string;\n /** Whether the profile is core-baked or contributed by an active extension. */\n source: ProfileSourceKind;\n /** Owning package/extension name for an extension profile; omitted for builtins. */\n package?: string;\n /** Per-dimension counts. */\n composition: ProfileComposition;\n}\n\n/** Result of `pm profile list`. */\nexport interface ProfileListResult {\n /** Discriminant for the profile result union. */\n action: \"list\";\n /** Built-in profiles in canonical order followed by active extension profiles. */\n profiles: ProfileListEntry[];\n /** Non-fatal merge warnings (built-in shadowing attempts, duplicate names). */\n warnings: string[];\n /** ISO timestamp the result was produced. */\n generated_at: string;\n}\n\n/** Result of `pm profile show <name>`. */\nexport interface ProfileShowResult {\n /** Discriminant for the profile result union. */\n action: \"show\";\n /** Profile name. */\n name: string;\n /** Display title. */\n title: string;\n /** One-line archetype summary. */\n summary: string;\n /** Whether the profile is core-baked or contributed by an active extension. */\n source: ProfileSourceKind;\n /** Owning package/extension name for an extension profile; omitted for builtins. */\n package?: string;\n /** Per-dimension counts. */\n composition: ProfileComposition;\n /** Item type names the profile registers. */\n types: string[];\n /** Custom status ids. */\n statuses: string[];\n /** Custom field keys. */\n fields: string[];\n /** Item types governed by a staged workflow. */\n workflows: string[];\n /** Config knobs as `key=value` pairs. */\n config: string[];\n /** Template names the profile stages. */\n templates: string[];\n /** Recommended package specs with rationale. */\n packages: Array<{ spec: string; reason: string }>;\n /** Non-fatal merge warnings (built-in shadowing attempts, duplicate names). */\n warnings: string[];\n /** ISO timestamp the result was produced. */\n generated_at: string;\n}\n\n/** Per-dimension change summary in an apply result. */\nexport interface ProfileApplyDimension {\n /** Entry keys that were newly created. */\n added: string[];\n /** Entry keys whose stored value was overwritten. */\n updated: string[];\n /** Entry keys already current (no write). */\n unchanged: string[];\n}\n\n/** Result of `pm profile apply <name>`. */\nexport interface ProfileApplyResult {\n /** Discriminant for the profile result union. */\n action: \"apply\";\n /** Applied profile name. */\n name: string;\n /** Display title. */\n title: string;\n /** True when changes were persisted; false for `--dry-run` or a no-op. */\n applied: boolean;\n /** True when `--dry-run` previewed without writing. */\n dry_run: boolean;\n /** True when at least one dimension stages an add/update. */\n changed: boolean;\n /** Item-type change summary. */\n types: ProfileApplyDimension;\n /** Status change summary. */\n statuses: ProfileApplyDimension;\n /** Field change summary. */\n fields: ProfileApplyDimension;\n /** Workflow change summary. */\n workflows: ProfileApplyDimension;\n /** Config-knob change summary. */\n config: ProfileApplyDimension;\n /** Template change summary. */\n templates: ProfileApplyDimension;\n /** Advisory package recommendations with install status. */\n packages: Array<{\n spec: string;\n reason: string;\n status: \"installed\" | \"recommended\";\n }>;\n /** Deduped on-write hook + advisory warnings. */\n warnings: string[];\n /** ISO timestamp the result was produced. */\n generated_at: string;\n}\n\n/** Result of `pm profile lint [name]`. */\nexport interface ProfileLintResult {\n /** Discriminant for the profile result union. */\n action: \"lint\";\n /** Linted profile name. */\n name: string;\n /** Display title. */\n title: string;\n /** Whether the profile is core-baked or contributed by an active extension. */\n source: ProfileSourceKind;\n /** Owning package/extension name for an extension profile; omitted for builtins. */\n package?: string;\n /** True when the profile produced no error-severity findings. */\n ok: boolean;\n /** Count of error-severity findings. */\n error_count: number;\n /** Count of warning-severity findings. */\n warning_count: number;\n /** Every graded consistency finding in dimension order. */\n findings: ProjectProfileLintFinding[];\n /** Non-fatal catalog merge warnings (built-in shadowing attempts, duplicate names). */\n warnings: string[];\n /** ISO timestamp the result was produced. */\n generated_at: string;\n}\n\n/** Discriminated union of every `pm profile` result shape. */\nexport type ProfileResult =\n | ProfileListResult\n | ProfileShowResult\n | ProfileApplyResult\n | ProfileLintResult;\n\n/* c8 ignore start -- profile command I/O orchestration and formatting is covered by profile integration workflows; the idempotent diff is unit-tested in core/profile/profile-plan. */\n\n/** Collects the profiles contributed by active extensions, mapping the live registration registry onto the resolver's contribution shape. Returns an empty list when extensions are disabled or none registered a profile. */\nfunction collectExtensionProfileContributions(): ExtensionProfileContribution[] {\n const registrations = getActiveExtensionRegistrations();\n if (registrations === null) {\n return [];\n }\n return registrations.profiles.map((entry) => ({\n name: entry.name,\n profile: entry.profile,\n }));\n}\n\n/** Lists every available profile — the built-in archetypes followed by profiles contributed by active extensions — with per-dimension composition counts and the source each came from. Surfaces any non-fatal merge collisions as warnings. */\nexport function runProfileList(): ProfileListResult {\n const { profiles, warnings } = resolveProfileCatalog(\n collectExtensionProfileContributions(),\n );\n return {\n action: \"list\",\n profiles: profiles.map((resolved) => ({\n name: resolved.definition.name,\n title: resolved.definition.title,\n summary: resolved.definition.summary,\n source: resolved.source,\n ...(resolved.package !== undefined ? { package: resolved.package } : {}),\n composition: describeProfileComposition(resolved.definition),\n })),\n warnings,\n generated_at: nowIso(),\n };\n}\n\n/** Shows the full composition of a single profile, resolved across built-in and extension-contributed archetypes. Throws a USAGE error for a missing or unknown profile name. */\nexport function runProfileShow(name: string | undefined): ProfileShowResult {\n let entry: ResolveProfileEntryResult;\n try {\n entry = resolveProfileEntry(name, collectExtensionProfileContributions());\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n const { resolved } = entry;\n return {\n action: \"show\",\n ...describeProjectProfile(resolved.definition),\n source: resolved.source,\n ...(resolved.package !== undefined ? { package: resolved.package } : {}),\n warnings: entry.warnings,\n generated_at: nowIso(),\n };\n}\n\n/** Lints a single profile, resolved across built-in and extension-contributed archetypes, returning every graded consistency finding plus any catalog merge warnings. Throws a USAGE error for a missing or unknown profile name. This is the read-only author-time validation surface; it never writes to the tracker. */\nexport function runProfileLint(name: string | undefined): ProfileLintResult {\n let entry: ResolveProfileEntryResult;\n try {\n entry = resolveProfileEntry(name, collectExtensionProfileContributions());\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n const { resolved } = entry;\n const report = lintProjectProfile(resolved.definition);\n return {\n action: \"lint\",\n name: resolved.definition.name,\n title: resolved.definition.title,\n source: resolved.source,\n ...(resolved.package !== undefined ? { package: resolved.package } : {}),\n ok: report.ok,\n error_count: report.errorCount,\n warning_count: report.warningCount,\n findings: report.findings,\n warnings: entry.warnings,\n generated_at: nowIso(),\n };\n}\n\n/** Options accepted by {@link runProfileApply}. */\nexport interface ProfileApplyCommandOptions {\n /** Preview the diff without writing any files. */\n dryRun?: boolean;\n /** Mutation author override. */\n author?: string;\n /** Force ownership/lock override. */\n force?: boolean;\n}\n\nfunction templateFilePath(pmRoot: string, name: string): string {\n return path.join(pmRoot, \"templates\", `${name}.json`);\n}\n\nasync function readStoredTemplateOptions(\n pmRoot: string,\n name: string,\n): Promise<ProfileTemplateOptions | undefined> {\n const raw = await readFileIfExists(templateFilePath(pmRoot, name));\n if (raw === null) {\n return undefined;\n }\n try {\n const parsed = JSON.parse(raw) as unknown;\n if (\n parsed !== null &&\n typeof parsed === \"object\" &&\n !Array.isArray(parsed)\n ) {\n const options = (parsed as { options?: unknown }).options;\n if (\n options !== null &&\n typeof options === \"object\" &&\n !Array.isArray(options)\n ) {\n return options as ProfileTemplateOptions;\n }\n }\n } catch {\n // A malformed template file is treated as absent so apply re-stages it.\n }\n return undefined;\n}\n\nasync function loadProfileCurrentState(\n pmRoot: string,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n settings: Awaited<ReturnType<typeof readSettings>>,\n profile: ProjectProfileDefinition,\n): Promise<ProfileCurrentState> {\n const templates = new Map<string, ProfileTemplateOptions>();\n for (const template of profile.templates) {\n const stored = await readStoredTemplateOptions(pmRoot, template.name);\n if (stored !== undefined) {\n templates.set(template.name, stored);\n }\n }\n return {\n typesRaw: await readFileIfExists(\n filePathForSchemaSection(\n pmRoot,\n schema.files.types,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types,\n ),\n ),\n statusesRaw: await readFileIfExists(\n filePathForSchemaSection(\n pmRoot,\n schema.files.statuses,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses,\n ),\n ),\n fieldsRaw: await readFileIfExists(\n filePathForSchemaSection(\n pmRoot,\n schema.files.fields,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields,\n ),\n ),\n workflows: settings.schema.type_workflows ?? [],\n settings,\n templates,\n // Package recommendations are advisory: apply never installs and never\n // inspects install state, so every recommendation surfaces as \"recommended\".\n // The planner still supports an install-state set for SDK consumers that want\n // richer reporting.\n installedPackages: new Set<string>(),\n };\n}\n\nfunction dimensionFrom(\n changes: ReadonlyArray<{ key: string; status: ProfileChangeStatus }>,\n): ProfileApplyDimension {\n const added: string[] = [];\n const updated: string[] = [];\n const unchanged: string[] = [];\n for (const change of changes) {\n (change.status === \"add\"\n ? added\n : change.status === \"update\"\n ? updated\n : unchanged\n ).push(change.key);\n }\n return { added, updated, unchanged };\n}\n\nfunction buildApplyResult(\n profile: ProjectProfileDefinition,\n plan: ProfileApplicationPlan,\n applied: boolean,\n dryRun: boolean,\n warnings: string[],\n): ProfileApplyResult {\n return {\n action: \"apply\",\n name: profile.name,\n title: profile.title,\n applied,\n dry_run: dryRun,\n changed: plan.changed,\n types: dimensionFrom(plan.types.changes),\n statuses: dimensionFrom(plan.statuses.changes),\n fields: dimensionFrom(plan.fields.changes),\n workflows: dimensionFrom(\n plan.workflows.changes.map((change) => ({\n key: change.type,\n status: change.status,\n })),\n ),\n config: dimensionFrom(plan.config.changes),\n templates: dimensionFrom(\n plan.templates.changes.map((change) => ({\n key: change.name,\n status: change.status,\n })),\n ),\n packages: plan.packages,\n warnings: [...new Set(warnings)].sort((left, right) =>\n left.localeCompare(right),\n ),\n generated_at: nowIso(),\n };\n}\n\nasync function assertProfileTrackerInitialized(pmRoot: string): Promise<void> {\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n}\n\nfunction resolveProfileForCommand(name: string | undefined): {\n profile: ProjectProfileDefinition;\n warnings: string[];\n} {\n try {\n const entry = resolveProfileEntry(\n name,\n collectExtensionProfileContributions(),\n );\n return {\n profile: entry.resolved.definition,\n warnings: entry.warnings,\n };\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n}\n\n/** Applies a profile to the initialized tracker, or previews the idempotent diff when `dryRun` is set. Schema files are written under their respective locks; config and workflows are persisted to settings; templates are staged via the shared template writer. Re-applying an already-applied profile performs zero writes. Throws a USAGE error for an unknown profile or an invalid config knob, and a NOT_FOUND error when the tracker is not initialized. */\nexport async function runProfileApply(\n name: string | undefined,\n options: ProfileApplyCommandOptions,\n global: GlobalOptions,\n): Promise<ProfileApplyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await assertProfileTrackerInitialized(pmRoot);\n\n // Catalog-level merge warnings (e.g. an extension profile shadowed by a\n // built-in) seed the result so `apply` surfaces them the same way `list`\n // does, rather than silently swallowing them.\n const resolvedProfile = resolveProfileForCommand(name);\n const profile = resolvedProfile.profile;\n const mergeWarnings = resolvedProfile.warnings;\n\n const dryRun = options.dryRun === true;\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n\n if (dryRun) {\n const state = await loadProfileCurrentState(\n pmRoot,\n schema,\n settings,\n profile,\n );\n const plan = planProfile(profile, state);\n return buildApplyResult(profile, plan, false, true, [...mergeWarnings]);\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n const force = Boolean(options.force);\n const warnings: string[] = [...mergeWarnings];\n\n // Acquire all three schema locks inside the try so a later acquisition that\n // throws (held/stale lock without --force) still releases the earlier ones in\n // finally rather than stranding them until TTL expiry.\n const releasers: Array<() => Promise<void>> = [];\n const acquire = async (lockId: string): Promise<void> => {\n releasers.push(\n await acquireLock(\n pmRoot,\n lockId,\n settings.locks.ttl_seconds,\n author,\n force,\n governance.force_required_for_stale_lock,\n settings.locks.wait_ms,\n ),\n );\n };\n let plan: ProfileApplicationPlan;\n try {\n await acquire(PROFILE_TYPES_LOCK_ID);\n await acquire(PROFILE_STATUSES_LOCK_ID);\n await acquire(PROFILE_FIELDS_LOCK_ID);\n const state = await loadProfileCurrentState(\n pmRoot,\n schema,\n settings,\n profile,\n );\n plan = planProfile(profile, state);\n\n if (plan.types.changed) {\n const typesPath = filePathForSchemaSection(\n pmRoot,\n schema.files.types,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types,\n );\n await writeFileAtomic(typesPath, serializeItemTypesFile(plan.types.file));\n const stagedNames = new Set(\n profile.types.map((type) => normalizeAddTypeInput(type).name),\n );\n const stagedDefinitions = plan.types.file.definitions.filter(\n (definition) => stagedNames.has(definition.name),\n );\n await ensureTypeFolderScaffold(\n pmRoot,\n stagedDefinitions,\n warnings,\n \"profile:apply-type-folder\",\n );\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"profile:apply-types\",\n })),\n );\n }\n if (plan.statuses.changed) {\n const statusesPath = filePathForSchemaSection(\n pmRoot,\n schema.files.statuses,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses,\n );\n await writeFileAtomic(\n statusesPath,\n serializeStatusDefsFile(plan.statuses.file),\n );\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: statusesPath,\n scope: \"project\",\n op: \"profile:apply-statuses\",\n })),\n );\n }\n if (plan.fields.changed) {\n const fieldsPath = filePathForSchemaSection(\n pmRoot,\n schema.files.fields,\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields,\n );\n await writeFileAtomic(fieldsPath, serializeFieldsFile(plan.fields.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: fieldsPath,\n scope: \"project\",\n op: \"profile:apply-fields\",\n })),\n );\n }\n if (plan.config.changed || plan.workflows.changed) {\n for (const change of plan.config.changes) {\n if (change.status === \"unchanged\") {\n continue;\n }\n const descriptor = resolveNestedSettingDescriptor(change.key);\n if (descriptor !== undefined) {\n writeNestedSettingValue(\n settings as unknown as Record<string, unknown>,\n descriptor,\n change.value,\n );\n }\n }\n settings.schema.type_workflows = plan.workflows.result;\n await writeSettings(pmRoot, settings, \"profile:apply-config\");\n }\n for (const change of plan.templates.changes) {\n if (change.status === \"unchanged\") {\n continue;\n }\n await runTemplatesSave(change.name, { ...change.options }, global);\n }\n } finally {\n // Release in reverse acquisition order; only locks actually acquired are\n // present. Each release is best-effort so one rejecting release never strands\n // the remaining locks (a failed release falls back to TTL expiry).\n for (const release of releasers.reverse()) {\n try {\n await release();\n } catch {\n // Ignore: a failed lock release is non-fatal and self-heals at TTL.\n }\n }\n }\n\n return buildApplyResult(profile, plan, plan.changed, false, warnings);\n}\n\n// planProfileApplication can throw a plain Error for an invalid config knob; map\n// it to a USAGE exit code consistently across the dry-run and apply paths.\nfunction planProfile(\n profile: ProjectProfileDefinition,\n state: ProfileCurrentState,\n): ProfileApplicationPlan {\n try {\n return planProfileApplication(profile, state);\n } catch (error) {\n throw new PmCliError(\n error instanceof Error ? error.message : String(error),\n EXIT_CODE.USAGE,\n );\n }\n}\n\nfunction formatDimensionLine(\n label: string,\n dimension: ProfileApplyDimension,\n): string | undefined {\n const segments: string[] = [];\n if (dimension.added.length > 0) {\n segments.push(`+${dimension.added.join(\", \")}`);\n }\n if (dimension.updated.length > 0) {\n segments.push(`~${dimension.updated.join(\", \")}`);\n }\n if (segments.length === 0) {\n return undefined;\n }\n return ` ${label}: ${segments.join(\" \")}`;\n}\n\n/** Renders the `pm profile list` result as human-readable text. */\nexport function formatProfileListHuman(result: ProfileListResult): string {\n const lines = [\"Project profiles:\"];\n for (const profile of result.profiles) {\n const origin =\n profile.source === \"extension\"\n ? ` [${profile.package ?? \"extension\"}]`\n : \"\";\n lines.push(\n ` ${profile.name} — ${profile.title}: ${profile.summary}${origin}`,\n );\n }\n for (const warning of result.warnings) {\n lines.push(` warning: ${warning}`);\n }\n return lines.join(\"\\n\");\n}\n\n/** Renders the `pm profile show` result as human-readable text. */\nexport function formatProfileShowHuman(result: ProfileShowResult): string {\n const origin =\n result.source === \"extension\" ? ` [${result.package ?? \"extension\"}]` : \"\";\n const lines = [\n `${result.name} — ${result.title}${origin}`,\n result.summary,\n \"\",\n ];\n lines.push(`types: ${result.types.join(\", \") || \"(none)\"}`);\n lines.push(`statuses: ${result.statuses.join(\", \") || \"(none)\"}`);\n lines.push(`fields: ${result.fields.join(\", \") || \"(none)\"}`);\n lines.push(`workflows: ${result.workflows.join(\", \") || \"(none)\"}`);\n lines.push(`config: ${result.config.join(\", \") || \"(none)\"}`);\n lines.push(`templates: ${result.templates.join(\", \") || \"(none)\"}`);\n lines.push(\n `packages: ${result.packages.map((pkg) => pkg.spec).join(\", \") || \"(none)\"}`,\n );\n for (const warning of result.warnings) {\n lines.push(`warning: ${warning}`);\n }\n return lines.join(\"\\n\");\n}\n\n/** Renders the `pm profile lint` result as human-readable text: a one-line verdict followed by each finding prefixed with its severity, code, and dimension. */\nexport function formatProfileLintHuman(result: ProfileLintResult): string {\n const origin =\n result.source === \"extension\" ? ` [${result.package ?? \"extension\"}]` : \"\";\n // Catalog merge warnings are rendered below alongside lint-finding warnings, so\n // fold them into the headline count to avoid an \"ok (0 warnings)\" verdict that\n // is immediately followed by `warning:` lines.\n const totalWarningCount = result.warning_count + result.warnings.length;\n const verdict = result.ok\n ? `Profile ${result.name}${origin}: ok (${totalWarningCount} warning${totalWarningCount === 1 ? \"\" : \"s\"})`\n : `Profile ${result.name}${origin}: ${result.error_count} error${result.error_count === 1 ? \"\" : \"s\"}, ${totalWarningCount} warning${totalWarningCount === 1 ? \"\" : \"s\"}`;\n const lines = [verdict];\n for (const finding of result.findings) {\n const target = finding.target !== undefined ? ` (${finding.target})` : \"\";\n lines.push(\n ` ${finding.severity} [${finding.code}] ${finding.dimension}${target}: ${finding.message}`,\n );\n }\n for (const warning of result.warnings) {\n lines.push(` warning: ${warning}`);\n }\n return lines.join(\"\\n\");\n}\n\n/** Renders the `pm profile apply` result as human-readable text, including the staged diff and any package recommendations. */\nexport function formatProfileApplyHuman(result: ProfileApplyResult): string {\n const mode = result.dry_run\n ? \"dry-run\"\n : result.applied\n ? \"applied\"\n : \"no changes\";\n const lines = [`Profile ${result.name} (${mode})`];\n if (!result.changed) {\n lines.push(\" already up to date\");\n } else {\n for (const [label, dimension] of [\n [\"types\", result.types],\n [\"statuses\", result.statuses],\n [\"fields\", result.fields],\n [\"workflows\", result.workflows],\n [\"config\", result.config],\n [\"templates\", result.templates],\n ] as const) {\n const line = formatDimensionLine(label, dimension);\n if (line !== undefined) {\n lines.push(line);\n }\n }\n }\n const recommended = result.packages.filter(\n (pkg) => pkg.status === \"recommended\",\n );\n if (recommended.length > 0) {\n lines.push(\n ` recommended packages: ${recommended.map((pkg) => pkg.spec).join(\", \")}`,\n );\n }\n for (const warning of result.warnings) {\n lines.push(` warning: ${warning}`);\n }\n return lines.join(\"\\n\");\n}\n\n/* c8 ignore stop */\n"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,aAAa,GACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,iCAAiC,EACjC,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,+BAA+B,EAC/B,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GAMpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,GAEvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,E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AO,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,oBAAoB","debugId":"475c64a1-b819-5538-bddd-512f1c43fdde"}
1
+ {"version":3,"file":"profile.js","sources":["cli/commands/profile.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/profile\n *\n * Preserves the CLI compatibility import path for SDK-owned project profile primitives.\n */\nexport * from \"../../sdk/profile.js\";\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,cAAc,sBAAsB,CAAC","debugId":"93676982-06c1-54a9-85e9-452df3aebe93"}
@@ -1,26 +1,14 @@
1
- import { type ReplayDocument as CanonicalReplayDocument } from "../../core/history/replay.js";
1
+ import { applyHistoryPatch, ensureMaterializedHistoryTarget as ensureMaterializedRestoreTarget, extractPatchFailureContext, replayHistoryToTarget as replayToTarget } from "../../sdk/history-read.js";
2
2
  import type { GlobalOptions } from "../../core/shared/command-types.js";
3
3
  import { locateItem } from "../../core/store/item-store.js";
4
4
  import { readSettings } from "../../core/store/settings.js";
5
- import type { HistoryEntry, HistoryPatchOp, ItemDocument, ItemMetadata } from "../../types/index.js";
6
- interface ResolvedRestoreTarget {
7
- kind: "version" | "timestamp";
8
- raw: string;
9
- historyIndex: number;
10
- }
5
+ import type { HistoryEntry, ItemDocument, ItemMetadata } from "../../types/index.js";
11
6
  interface ResolvedRestoreSubject {
12
7
  id: string;
13
8
  historyPath: string;
14
9
  located: Awaited<ReturnType<typeof locateItem>>;
15
10
  historyPolicyWarnings: string[];
16
11
  }
17
- interface PatchFailureContext {
18
- patchIndex?: number;
19
- op?: string;
20
- path?: string;
21
- from?: string;
22
- reason?: string;
23
- }
24
12
  /** Documents the restore command options payload exchanged by command, SDK, and package integrations. */
25
13
  export interface RestoreCommandOptions {
26
14
  /** Value that configures or reports author for this contract. */
@@ -47,11 +35,8 @@ export interface RestoreResult {
47
35
  /** Value that configures or reports warnings for this contract. */
48
36
  warnings: string[];
49
37
  }
50
- declare function ensureReplayTarget(target: string, history: HistoryEntry[]): ResolvedRestoreTarget;
51
- declare function extractPatchFailureContext(patch: HistoryPatchOp[], error: unknown): PatchFailureContext;
52
- declare function applyHistoryPatch(current: CanonicalReplayDocument, patch: HistoryPatchOp[], entryNumber: number, entryOp: string): CanonicalReplayDocument;
53
- declare function replayToTarget(history: HistoryEntry[], targetIndex: number): CanonicalReplayDocument;
54
- declare function ensureMaterializedRestoreTarget(replayDocument: CanonicalReplayDocument, target: ResolvedRestoreTarget): CanonicalReplayDocument;
38
+ /** Resolve restore targets with the command's established wording and at-or-before timestamp semantics. */
39
+ declare function ensureReplayTarget(target: string, history: readonly HistoryEntry[]): import("../../core/history/projection.js").ResolvedHistoryTarget;
55
40
  declare function replayCurrentDocument(history: HistoryEntry[]): ItemDocument;
56
41
  declare function resolveRestoreSubject(pmRoot: string, id: string, settings: Awaited<ReturnType<typeof readSettings>>, typeToFolder: Record<string, string>): Promise<ResolvedRestoreSubject>;
57
42
  declare function changedFields(beforeDocument: ItemDocument, afterDocument: ItemDocument): string[];