@unbrained/pm-cli 2026.7.13 → 2026.7.14

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 (487) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +28 -0
  3. package/dist/cli/commands/aggregate.d.ts +1 -1
  4. package/dist/cli/commands/aggregate.js +18 -6
  5. package/dist/cli/commands/aggregate.js.map +1 -1
  6. package/dist/cli/commands/context.d.ts +16 -1
  7. package/dist/cli/commands/context.js +98 -16
  8. package/dist/cli/commands/context.js.map +1 -1
  9. package/dist/cli/commands/create.d.ts +1 -1
  10. package/dist/cli/commands/create.js +11 -7
  11. package/dist/cli/commands/create.js.map +1 -1
  12. package/dist/cli/commands/deps.d.ts +6 -96
  13. package/dist/cli/commands/deps.js +4 -214
  14. package/dist/cli/commands/deps.js.map +1 -1
  15. package/dist/cli/commands/docs.d.ts +2 -44
  16. package/dist/cli/commands/docs.js +8 -13
  17. package/dist/cli/commands/docs.js.map +1 -1
  18. package/dist/cli/commands/files.d.ts +6 -134
  19. package/dist/cli/commands/files.js +4 -294
  20. package/dist/cli/commands/files.js.map +1 -1
  21. package/dist/cli/commands/get.js +15 -2
  22. package/dist/cli/commands/get.js.map +1 -1
  23. package/dist/cli/commands/list.js +5 -6
  24. package/dist/cli/commands/list.js.map +1 -1
  25. package/dist/cli/commands/next.d.ts +3 -1
  26. package/dist/cli/commands/next.js +77 -20
  27. package/dist/cli/commands/next.js.map +1 -1
  28. package/dist/cli/commands/update-many.js +6 -3
  29. package/dist/cli/commands/update-many.js.map +1 -1
  30. package/dist/cli/commands/update.js +14 -7
  31. package/dist/cli/commands/update.js.map +1 -1
  32. package/dist/cli/commands/validate.d.ts +1 -1
  33. package/dist/cli/commands/validate.js +32 -35
  34. package/dist/cli/commands/validate.js.map +1 -1
  35. package/dist/cli/main.d.ts +2 -14
  36. package/dist/cli/main.js +27 -8
  37. package/dist/cli/main.js.map +1 -1
  38. package/dist/cli-bundle/chunks/append-DYQWQK2J.js +11 -0
  39. package/dist/cli-bundle/chunks/{append-2FS6MVG7.js → append-PVZJDM6J.js} +5 -5
  40. package/dist/cli-bundle/chunks/{chunk-J2WAWP4U.js → chunk-2FNWQXZ2.js} +4 -4
  41. package/dist/cli-bundle/chunks/{chunk-YFGYDZRP.js → chunk-2GA3NK35.js} +4 -4
  42. package/dist/cli-bundle/chunks/{chunk-XFEIASAC.js → chunk-2QIQGYPW.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-3WCGYH5Q.js → chunk-3CMRNVTO.js} +7 -7
  44. package/dist/cli-bundle/chunks/chunk-3HKUXVKV.js +9 -0
  45. package/dist/cli-bundle/chunks/{chunk-VDAZPPRU.js → chunk-3I3LRT2G.js} +2 -2
  46. package/dist/cli-bundle/chunks/{chunk-3P3RFJIQ.js → chunk-3TL7WOEF.js} +2 -2
  47. package/dist/cli-bundle/chunks/{chunk-4SHJ5JS3.js → chunk-44LNIULG.js} +4 -4
  48. package/dist/cli-bundle/chunks/{chunk-QFOAWBOB.js → chunk-4DY4KPQI.js} +11 -10
  49. package/dist/cli-bundle/chunks/{chunk-QFOAWBOB.js.map → chunk-4DY4KPQI.js.map} +2 -2
  50. package/dist/cli-bundle/chunks/{chunk-BVCF4ULV.js → chunk-4RXTMU57.js} +5 -5
  51. package/dist/cli-bundle/chunks/{chunk-XMI2TRY5.js → chunk-4WREH7RT.js} +4 -4
  52. package/dist/cli-bundle/chunks/{chunk-JYUGUXFW.js → chunk-5CT5BW6E.js} +5 -5
  53. package/dist/cli-bundle/chunks/{chunk-NA5SBIB4.js → chunk-5URI7TPJ.js} +44 -44
  54. package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +7 -0
  55. package/dist/cli-bundle/chunks/{chunk-QGH6WL6L.js → chunk-655STMGA.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-DGKBWCMA.js → chunk-6IIVBC56.js} +4 -4
  57. package/dist/cli-bundle/chunks/{chunk-SRQLQUO6.js → chunk-6MHSBDGD.js} +7 -7
  58. package/dist/cli-bundle/chunks/{chunk-SRQLQUO6.js.map → chunk-6MHSBDGD.js.map} +2 -2
  59. package/dist/cli-bundle/chunks/{chunk-D4GPNYYP.js → chunk-6OTZMORS.js} +6 -6
  60. package/dist/cli-bundle/chunks/{chunk-JVRVXO6M.js → chunk-6PKA3SJQ.js} +6 -6
  61. package/dist/cli-bundle/chunks/{chunk-2PR4ZTRO.js → chunk-6TTOHMTB.js} +8 -8
  62. package/dist/cli-bundle/chunks/{chunk-2PR4ZTRO.js.map → chunk-6TTOHMTB.js.map} +1 -1
  63. package/dist/cli-bundle/chunks/chunk-6X5MZ5R2.js +9 -0
  64. package/dist/cli-bundle/chunks/chunk-76UBY2EE.js +5 -0
  65. package/dist/cli-bundle/chunks/{chunk-ZS2KPCJN.js → chunk-7QDSYUMF.js} +7 -7
  66. package/dist/cli-bundle/chunks/{chunk-Z7TFPIJ6.js → chunk-7TQMR6LK.js} +7 -7
  67. package/dist/cli-bundle/chunks/{chunk-AHA4POA6.js → chunk-ABRCOSDC.js} +3 -3
  68. package/dist/cli-bundle/chunks/{chunk-XY3CC3EM.js → chunk-AFWZRL7M.js} +59 -53
  69. package/dist/cli-bundle/chunks/chunk-AFWZRL7M.js.map +7 -0
  70. package/dist/cli-bundle/chunks/{chunk-KQJVTQVK.js → chunk-ANSJHDOZ.js} +2 -2
  71. package/dist/cli-bundle/chunks/{chunk-OMT4NO7T.js → chunk-B5DZYTT3.js} +113 -24
  72. package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +7 -0
  73. package/dist/cli-bundle/chunks/chunk-B7SWOIP6.js +5 -0
  74. package/dist/cli-bundle/chunks/{chunk-D2LXG7WX.js → chunk-BN62TO2S.js} +5 -5
  75. package/dist/cli-bundle/chunks/chunk-BN62TO2S.js.map +1 -0
  76. package/dist/cli-bundle/chunks/{chunk-ZTSV7P2T.js → chunk-BPD26E3P.js} +357 -42
  77. package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{chunk-RKGFUC4O.js → chunk-CDJYP7OQ.js} +36 -14
  79. package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +1 -0
  80. package/dist/cli-bundle/chunks/{chunk-VLFLRFJP.js → chunk-CIOZ376P.js} +20 -13
  81. package/dist/cli-bundle/chunks/chunk-CIOZ376P.js.map +1 -0
  82. package/dist/cli-bundle/chunks/{chunk-HXTCZSAI.js → chunk-DBZVUJTK.js} +3 -3
  83. package/dist/cli-bundle/chunks/{chunk-2QNOWOIB.js → chunk-DO5RGJXT.js} +3 -3
  84. package/dist/cli-bundle/chunks/{chunk-MKONZ4UO.js → chunk-DRNJPEPQ.js} +4 -4
  85. package/dist/cli-bundle/chunks/{chunk-XDT2PSXA.js → chunk-DVOLZJ3C.js} +12 -11
  86. package/dist/cli-bundle/chunks/{chunk-XDT2PSXA.js.map → chunk-DVOLZJ3C.js.map} +1 -1
  87. package/dist/cli-bundle/chunks/{chunk-H36FXA7B.js → chunk-DYEX6NFH.js} +4 -4
  88. package/dist/cli-bundle/chunks/{chunk-G3IB5GTD.js → chunk-E2WC6S4P.js} +15 -11
  89. package/dist/cli-bundle/chunks/chunk-E2WC6S4P.js.map +7 -0
  90. package/dist/cli-bundle/chunks/{chunk-GAJ7U7B4.js → chunk-ERL2YFJ2.js} +3 -3
  91. package/dist/cli-bundle/chunks/{chunk-FPEYOFEF.js → chunk-F7PSHRNO.js} +3 -3
  92. package/dist/cli-bundle/chunks/{chunk-UH7OLT6F.js → chunk-FDSBDNYE.js} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-DGJF32JF.js → chunk-FIGXOCEQ.js} +66 -21
  94. package/dist/cli-bundle/chunks/chunk-FIGXOCEQ.js.map +7 -0
  95. package/dist/cli-bundle/chunks/{chunk-RQAY7C5T.js → chunk-FJZDA6MS.js} +3 -3
  96. package/dist/cli-bundle/chunks/{chunk-B4TVNGRX.js → chunk-FO7GMJKG.js} +3 -3
  97. package/dist/cli-bundle/chunks/chunk-FRQ63VPB.js +5 -0
  98. package/dist/cli-bundle/chunks/{chunk-UTYNQ2WH.js → chunk-FS6UM5WH.js} +48 -27
  99. package/dist/cli-bundle/chunks/chunk-FS6UM5WH.js.map +7 -0
  100. package/dist/cli-bundle/chunks/{chunk-U252II47.js → chunk-FTQLW4JD.js} +4 -4
  101. package/dist/cli-bundle/chunks/{chunk-TNGLCRKS.js → chunk-GSEADLRH.js} +1821 -1809
  102. package/dist/cli-bundle/chunks/chunk-GSEADLRH.js.map +1 -0
  103. package/dist/cli-bundle/chunks/{chunk-TGG7YGMC.js → chunk-GXXC7QSK.js} +53 -47
  104. package/dist/cli-bundle/chunks/chunk-GXXC7QSK.js.map +1 -0
  105. package/dist/cli-bundle/chunks/{chunk-AGD4VZXH.js → chunk-H2QBAKLQ.js} +3 -3
  106. package/dist/cli-bundle/chunks/{chunk-CJVQ4XIG.js → chunk-HAMLIWAF.js} +4 -4
  107. package/dist/cli-bundle/chunks/{chunk-56DX6QYG.js → chunk-HL7V2PHX.js} +19 -13
  108. package/dist/cli-bundle/chunks/chunk-HL7V2PHX.js.map +1 -0
  109. package/dist/cli-bundle/chunks/{chunk-7QOIQTPB.js → chunk-HLHSQ5CA.js} +4 -4
  110. package/dist/cli-bundle/chunks/{chunk-AHC7J6XD.js → chunk-IA3YFTXT.js} +6 -6
  111. package/dist/cli-bundle/chunks/{chunk-5ZCVF4WF.js → chunk-IAPHYPRL.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-OCSQWIOW.js → chunk-IFZA4VB5.js} +4 -4
  113. package/dist/cli-bundle/chunks/{chunk-6O2HJENY.js → chunk-IGED7NH2.js} +61 -48
  114. package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-RPCCQDG2.js → chunk-ILLUE5DI.js} +36 -14
  116. package/dist/cli-bundle/chunks/chunk-ILLUE5DI.js.map +7 -0
  117. package/dist/cli-bundle/chunks/{chunk-4WMFM77X.js → chunk-J4NZOP3I.js} +5 -5
  118. package/dist/cli-bundle/chunks/{chunk-57JVERX3.js → chunk-JAF4TUQ7.js} +4 -4
  119. package/dist/cli-bundle/chunks/chunk-JAF4TUQ7.js.map +7 -0
  120. package/dist/cli-bundle/chunks/{chunk-MTNKSSSO.js → chunk-JL7WZ4O2.js} +3 -3
  121. package/dist/cli-bundle/chunks/{chunk-AZ52LTCY.js → chunk-K7WNZ7KD.js} +3 -3
  122. package/dist/cli-bundle/chunks/{chunk-2OLSXXIV.js → chunk-KADLSPIU.js} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-RQKORMM4.js → chunk-KB726FMH.js} +4 -4
  124. package/dist/cli-bundle/chunks/{chunk-WKSFBBZT.js → chunk-L24HCJFC.js} +114 -25
  125. package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +1 -0
  126. package/dist/cli-bundle/chunks/{chunk-LDO24J5I.js → chunk-LWTIRS3Y.js} +365 -43
  127. package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-TZTQ4TVV.js → chunk-M6ASXYCU.js} +4 -4
  129. package/dist/cli-bundle/chunks/{chunk-WDDOAU7Z.js → chunk-M7EWN4TF.js} +3 -3
  130. package/dist/cli-bundle/chunks/{chunk-327DSGW2.js → chunk-MD6ULIPJ.js} +3 -3
  131. package/dist/cli-bundle/chunks/{chunk-OKDBHOON.js → chunk-MKL4CP2I.js} +61 -48
  132. package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +1 -0
  133. package/dist/cli-bundle/chunks/{chunk-M52DG2QJ.js → chunk-MQZ3PLCF.js} +2 -2
  134. package/dist/cli-bundle/chunks/{chunk-GQ2CQNGI.js → chunk-N3CMP4NI.js} +2 -2
  135. package/dist/cli-bundle/chunks/{chunk-J7SBFUZC.js → chunk-NAQYVWSQ.js} +4 -4
  136. package/dist/cli-bundle/chunks/{chunk-U2GMYP3L.js → chunk-NKW36AMT.js} +4 -4
  137. package/dist/cli-bundle/chunks/{chunk-5WEYOVZ7.js → chunk-OBDLEQG5.js} +19 -12
  138. package/dist/cli-bundle/chunks/chunk-OBDLEQG5.js.map +7 -0
  139. package/dist/cli-bundle/chunks/{chunk-VL4LYTJN.js → chunk-OI4S4KCI.js} +18 -12
  140. package/dist/cli-bundle/chunks/chunk-OI4S4KCI.js.map +7 -0
  141. package/dist/cli-bundle/chunks/{chunk-FCVVMAEX.js → chunk-P6MYFH6K.js} +60 -22
  142. package/dist/cli-bundle/chunks/chunk-P6MYFH6K.js.map +1 -0
  143. package/dist/cli-bundle/chunks/{chunk-FTQQAPRX.js → chunk-PHKP3AGR.js} +8 -8
  144. package/dist/cli-bundle/chunks/{chunk-WVUXNIYO.js → chunk-Q37E63AM.js} +4 -4
  145. package/dist/cli-bundle/chunks/{chunk-JVXV7ANV.js → chunk-Q7E6OYZK.js} +2 -2
  146. package/dist/cli-bundle/chunks/{chunk-WVUYATII.js → chunk-QABYZYLU.js} +4 -4
  147. package/dist/cli-bundle/chunks/{chunk-QRRUGIJN.js → chunk-QASRVKUQ.js} +45 -45
  148. package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +1 -0
  149. package/dist/cli-bundle/chunks/{chunk-L4262MFB.js → chunk-QK2ZN6UL.js} +14 -5
  150. package/dist/cli-bundle/chunks/{chunk-L4262MFB.js.map → chunk-QK2ZN6UL.js.map} +1 -1
  151. package/dist/cli-bundle/chunks/{chunk-7TQPV7HR.js → chunk-QSPARJWF.js} +2 -2
  152. package/dist/cli-bundle/chunks/{chunk-GTKILM6F.js → chunk-QZ7LT3XE.js} +3 -3
  153. package/dist/cli-bundle/chunks/{chunk-L3VKY6R6.js → chunk-RA5AIAMP.js} +3 -3
  154. package/dist/cli-bundle/chunks/{chunk-BJS27ALI.js → chunk-RGXD5JJR.js} +6 -6
  155. package/dist/cli-bundle/chunks/{chunk-TSEPW2P6.js → chunk-RMF3IOYQ.js} +7 -7
  156. package/dist/cli-bundle/chunks/{chunk-QXYKH56X.js → chunk-T4BRCB6Z.js} +1894 -1875
  157. package/dist/cli-bundle/chunks/chunk-T4BRCB6Z.js.map +7 -0
  158. package/dist/cli-bundle/chunks/{chunk-TGGTXC52.js → chunk-TH7U4KLY.js} +3 -3
  159. package/dist/cli-bundle/chunks/{chunk-LP4UATP6.js → chunk-TWLDBKQU.js} +3 -3
  160. package/dist/cli-bundle/chunks/{chunk-OTZ3C2NE.js → chunk-TZ2PSLLT.js} +49 -28
  161. package/dist/cli-bundle/chunks/chunk-TZ2PSLLT.js.map +1 -0
  162. package/dist/cli-bundle/chunks/{chunk-UK222BHQ.js → chunk-TZRTLMWM.js} +4 -4
  163. package/dist/cli-bundle/chunks/{chunk-6E6S2X6S.js → chunk-UB2QYSTO.js} +8 -8
  164. package/dist/cli-bundle/chunks/{chunk-S6CXUSYC.js → chunk-UGTVWL3E.js} +5 -5
  165. package/dist/cli-bundle/chunks/{chunk-BNS6QHTZ.js → chunk-UJ4HJYWL.js} +2 -2
  166. package/dist/cli-bundle/chunks/{chunk-BYVOEJPQ.js → chunk-UKUIIBDW.js} +4 -4
  167. package/dist/cli-bundle/chunks/{chunk-SGDBVR7X.js → chunk-UVBA6F5A.js} +2 -2
  168. package/dist/cli-bundle/chunks/{chunk-DZRZMBBF.js → chunk-VJTAEIPC.js} +5 -5
  169. package/dist/cli-bundle/chunks/{chunk-74PWVJON.js → chunk-W6HZ55JO.js} +2 -2
  170. package/dist/cli-bundle/chunks/{chunk-HR2MQAO5.js → chunk-WD6MSYMP.js} +13 -4
  171. package/dist/cli-bundle/chunks/{chunk-HR2MQAO5.js.map → chunk-WD6MSYMP.js.map} +2 -2
  172. package/dist/cli-bundle/chunks/{chunk-P7IFURWH.js → chunk-WPAWZW7S.js} +2 -2
  173. package/dist/cli-bundle/chunks/{chunk-36LEOWSX.js → chunk-WQUEHPZB.js} +2 -2
  174. package/dist/cli-bundle/chunks/{chunk-FCKJF7G2.js → chunk-WRKB56FC.js} +3 -3
  175. package/dist/cli-bundle/chunks/{chunk-KR5EHAN4.js → chunk-X3GYR4P2.js} +2 -2
  176. package/dist/cli-bundle/chunks/{chunk-J567OZJY.js → chunk-X6BVXQ52.js} +16 -12
  177. package/dist/cli-bundle/chunks/chunk-X6BVXQ52.js.map +1 -0
  178. package/dist/cli-bundle/chunks/chunk-Y72FV7RM.js +178 -0
  179. package/dist/cli-bundle/chunks/chunk-Y72FV7RM.js.map +7 -0
  180. package/dist/cli-bundle/chunks/{chunk-OWW2KXOV.js → chunk-YQYG2V23.js} +2 -2
  181. package/dist/cli-bundle/chunks/{chunk-G2SCT7BC.js → chunk-YVKE5ZDM.js} +4 -4
  182. package/dist/cli-bundle/chunks/{chunk-QHIN4UTF.js → chunk-ZAYYDNB3.js} +4 -4
  183. package/dist/cli-bundle/chunks/chunk-ZHBI2AP7.js +9 -0
  184. package/dist/cli-bundle/chunks/chunk-ZNP64HOW.js +175 -0
  185. package/dist/cli-bundle/chunks/chunk-ZNP64HOW.js.map +1 -0
  186. package/dist/cli-bundle/chunks/{chunk-GNVBUNJQ.js → chunk-ZTRBSABY.js} +3 -3
  187. package/dist/cli-bundle/chunks/{chunk-PY32KGQU.js → chunk-ZUKSZVBW.js} +5 -5
  188. package/dist/cli-bundle/chunks/{close-CU56F47E.js → close-LZECOMHO.js} +5 -5
  189. package/dist/cli-bundle/chunks/close-RI4JQQHU.js +12 -0
  190. package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +21 -0
  191. package/dist/cli-bundle/chunks/{close-many-ZQ2WP67J.js → close-many-ZHI6A5TN.js} +12 -12
  192. package/dist/cli-bundle/chunks/comments-35M273DN.js +13 -0
  193. package/dist/cli-bundle/chunks/{comments-UDUMKXL6.js → comments-AJWRTFZ5.js} +7 -7
  194. package/dist/cli-bundle/chunks/{copy-VFHECFBV.js → copy-GMXYKBXT.js} +4 -4
  195. package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +9 -0
  196. package/dist/cli-bundle/chunks/create-F53OBTOU.js +27 -0
  197. package/dist/cli-bundle/chunks/{create-CE2X3SGF.js → create-HU4Q7RJX.js} +11 -9
  198. package/dist/cli-bundle/chunks/{delete-2JXQCHHT.js → delete-GSDZLTRC.js} +4 -4
  199. package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +10 -0
  200. package/dist/cli-bundle/chunks/deps-U57I7EAK.js +16 -0
  201. package/dist/cli-bundle/chunks/{deps-FPXNLO6C.js → deps-WWB7P2GT.js} +7 -4
  202. package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +14 -0
  203. package/dist/cli-bundle/chunks/{docs-AMAR4OHU.js → docs-MQIY2ZQS.js} +7 -7
  204. package/dist/cli-bundle/chunks/files-TBZD7V6H.js +18 -0
  205. package/dist/cli-bundle/chunks/{files-JFHN7DYM.js → files-TTY6N2AV.js} +7 -7
  206. package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +10 -0
  207. package/dist/cli-bundle/chunks/{focus-QFN2RRZ7.js → focus-XT6YVFFX.js} +5 -5
  208. package/dist/cli-bundle/chunks/{history-compact-G34XMABV.js → history-compact-KKVUWB4V.js} +8 -8
  209. package/dist/cli-bundle/chunks/{history-compact-SAHT5D46.js → history-compact-M7GHYVFN.js} +8 -8
  210. package/dist/cli-bundle/chunks/{history-redact-IFJDNKLZ.js → history-redact-3DVZOILD.js} +6 -6
  211. package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +16 -0
  212. package/dist/cli-bundle/chunks/{history-repair-NXLQTCVN.js → history-repair-ITDUMK4N.js} +8 -8
  213. package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +18 -0
  214. package/dist/cli-bundle/chunks/{learnings-5CZKAMBS.js → learnings-FGO3NSFW.js} +7 -7
  215. package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +13 -0
  216. package/dist/cli-bundle/chunks/notes-BSD53H2W.js +13 -0
  217. package/dist/cli-bundle/chunks/{notes-POMK37UI.js → notes-NQ6RXVW6.js} +7 -7
  218. package/dist/cli-bundle/chunks/{plan-YBNYNT3A.js → plan-2NNEO46V.js} +10 -10
  219. package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +24 -0
  220. package/dist/cli-bundle/chunks/{profile-JNKSU6EQ.js → profile-AAQUU6T3.js} +9 -9
  221. package/dist/cli-bundle/chunks/{profile-A2WPVG6I.js → profile-U725ATWZ.js} +9 -9
  222. package/dist/cli-bundle/chunks/{register-list-query-UG4ZA5AU.js → register-list-query-BUWCYHBT.js} +14 -13
  223. package/dist/cli-bundle/chunks/{register-list-query-UG4ZA5AU.js.map → register-list-query-BUWCYHBT.js.map} +1 -1
  224. package/dist/cli-bundle/chunks/{register-list-query-KJULL4W3.js → register-list-query-KTZ6AGE7.js} +16 -15
  225. package/dist/cli-bundle/chunks/{register-list-query-KJULL4W3.js.map → register-list-query-KTZ6AGE7.js.map} +1 -1
  226. package/dist/cli-bundle/chunks/{register-mutation-3OXYXBKH.js → register-mutation-4FMGJJF7.js} +29 -29
  227. package/dist/cli-bundle/chunks/{register-mutation-WK265BM7.js → register-mutation-UELYYOR7.js} +29 -29
  228. package/dist/cli-bundle/chunks/{register-operations-C5SQH3FJ.js → register-operations-ISUX6LY5.js} +33 -29
  229. package/dist/cli-bundle/chunks/{register-operations-C5SQH3FJ.js.map → register-operations-ISUX6LY5.js.map} +1 -1
  230. package/dist/cli-bundle/chunks/{register-operations-FH3PBHYN.js → register-operations-JVW24J2Y.js} +35 -31
  231. package/dist/cli-bundle/chunks/{register-operations-FH3PBHYN.js.map → register-operations-JVW24J2Y.js.map} +1 -1
  232. package/dist/cli-bundle/chunks/{register-setup-CCK7CJVR.js → register-setup-5XNGKJ22.js} +15 -15
  233. package/dist/cli-bundle/chunks/{register-setup-CPZBGSOJ.js → register-setup-ZTNY6S7R.js} +15 -15
  234. package/dist/cli-bundle/chunks/restore-66GLMHIX.js +14 -0
  235. package/dist/cli-bundle/chunks/{restore-IVS5XGYR.js → restore-B3BAB6X2.js} +6 -6
  236. package/dist/cli-bundle/chunks/{schema-P2MF23JO.js → schema-LZNUYHDB.js} +6 -6
  237. package/dist/cli-bundle/chunks/schema-LZNUYHDB.js.map +7 -0
  238. package/dist/cli-bundle/chunks/{schema-R3U2REY4.js → schema-U7IM2DXV.js} +6 -6
  239. package/dist/cli-bundle/chunks/schema-U7IM2DXV.js.map +1 -0
  240. package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +21 -0
  241. package/dist/cli-bundle/chunks/update-2XGHIVQ2.js.map +7 -0
  242. package/dist/cli-bundle/chunks/{update-YBIQESMH.js → update-Q3UCILNR.js} +12 -12
  243. package/dist/cli-bundle/chunks/update-Q3UCILNR.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{update-many-F3CIV5SQ.js → update-many-75K57FS3.js} +19 -19
  245. package/dist/cli-bundle/chunks/update-many-75K57FS3.js.map +1 -0
  246. package/dist/cli-bundle/chunks/update-many-U42YA445.js +30 -0
  247. package/dist/cli-bundle/chunks/update-many-U42YA445.js.map +7 -0
  248. package/dist/cli-bundle/main.js +39 -16
  249. package/dist/cli-bundle/main.js.map +2 -2
  250. package/dist/cli-bundle/sdk-runtime.js +56 -53
  251. package/dist/cli-bundle/sdk-testing.js +6 -6
  252. package/dist/cli-bundle/sdk.js +115 -55
  253. package/dist/cli-bundle/sdk.js.map +2 -2
  254. package/dist/core/extensions/command-hook-context.d.ts +40 -0
  255. package/dist/core/extensions/command-hook-context.js +14 -0
  256. package/dist/core/extensions/command-hook-context.js.map +1 -0
  257. package/dist/core/extensions/index.d.ts +1 -0
  258. package/dist/core/extensions/index.js +4 -3
  259. package/dist/core/extensions/index.js.map +1 -1
  260. package/dist/core/item/parse.d.ts +2 -0
  261. package/dist/core/item/parse.js +11 -2
  262. package/dist/core/item/parse.js.map +1 -1
  263. package/dist/core/store/paths.d.ts +2 -0
  264. package/dist/core/store/paths.js +10 -2
  265. package/dist/core/store/paths.js.map +1 -1
  266. package/dist/mcp/tool-definitions.js +12 -2
  267. package/dist/mcp/tool-definitions.js.map +1 -1
  268. package/dist/sdk/context-packing.d.ts +114 -0
  269. package/dist/sdk/context-packing.js +219 -0
  270. package/dist/sdk/context-packing.js.map +1 -0
  271. package/dist/sdk/context-relevance.d.ts +1 -1
  272. package/dist/sdk/context-relevance.js +4 -2
  273. package/dist/sdk/context-relevance.js.map +1 -1
  274. package/dist/sdk/context-usage.d.ts +79 -0
  275. package/dist/sdk/context-usage.js +193 -0
  276. package/dist/sdk/context-usage.js.map +1 -0
  277. package/dist/sdk/dependencies.d.ts +145 -0
  278. package/dist/sdk/dependencies.js +327 -0
  279. package/dist/sdk/dependencies.js.map +1 -0
  280. package/dist/sdk/docs.d.ts +48 -0
  281. package/dist/sdk/docs.js +15 -0
  282. package/dist/sdk/docs.js.map +1 -0
  283. package/dist/sdk/files.d.ts +135 -0
  284. package/dist/sdk/files.js +320 -0
  285. package/dist/sdk/files.js.map +1 -0
  286. package/dist/sdk/index.d.ts +6 -0
  287. package/dist/sdk/index.js +8 -2
  288. package/dist/sdk/index.js.map +1 -1
  289. package/dist/{cli/commands → sdk}/linked-artifacts.d.ts +11 -5
  290. package/dist/{cli/commands → sdk}/linked-artifacts.js +49 -25
  291. package/dist/sdk/linked-artifacts.js.map +1 -0
  292. package/dist/sdk/runtime.d.ts +4 -4
  293. package/dist/sdk/runtime.js +7 -4
  294. package/dist/sdk/runtime.js.map +1 -1
  295. package/dist/sdk/workspace.js +3 -2
  296. package/dist/sdk/workspace.js.map +1 -1
  297. package/docs/AGENT_GUIDE.md +1 -1
  298. package/docs/CONFIGURATION.md +1 -0
  299. package/docs/PR_REVIEW_LOOP.md +21 -11
  300. package/docs/SDK.md +94 -0
  301. package/marketplace.json +2 -2
  302. package/package.json +1 -1
  303. package/packages/pm-beads/package.json +1 -1
  304. package/packages/pm-calendar/package.json +1 -1
  305. package/packages/pm-command-kit/package.json +1 -1
  306. package/packages/pm-governance-audit/package.json +1 -1
  307. package/packages/pm-guide-shell/package.json +1 -1
  308. package/packages/pm-kanban/package.json +1 -1
  309. package/packages/pm-lifecycle-hooks/package.json +1 -1
  310. package/packages/pm-linked-test-adapters/package.json +1 -1
  311. package/packages/pm-search-advanced/package.json +1 -1
  312. package/packages/pm-templates/package.json +1 -1
  313. package/packages/pm-todos/package.json +1 -1
  314. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  315. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  316. package/dist/cli/commands/linked-artifacts.js.map +0 -1
  317. package/dist/cli-bundle/chunks/append-CTKFDEAX.js +0 -11
  318. package/dist/cli-bundle/chunks/chunk-56DX6QYG.js.map +0 -1
  319. package/dist/cli-bundle/chunks/chunk-57JVERX3.js.map +0 -7
  320. package/dist/cli-bundle/chunks/chunk-5WEYOVZ7.js.map +0 -7
  321. package/dist/cli-bundle/chunks/chunk-6O2HJENY.js.map +0 -7
  322. package/dist/cli-bundle/chunks/chunk-CCAGZCZK.js +0 -17
  323. package/dist/cli-bundle/chunks/chunk-CCAGZCZK.js.map +0 -7
  324. package/dist/cli-bundle/chunks/chunk-D2LXG7WX.js.map +0 -1
  325. package/dist/cli-bundle/chunks/chunk-DGJF32JF.js.map +0 -7
  326. package/dist/cli-bundle/chunks/chunk-FCVVMAEX.js.map +0 -1
  327. package/dist/cli-bundle/chunks/chunk-FUOK7JZ6.js +0 -14
  328. package/dist/cli-bundle/chunks/chunk-FUOK7JZ6.js.map +0 -1
  329. package/dist/cli-bundle/chunks/chunk-G3IB5GTD.js.map +0 -7
  330. package/dist/cli-bundle/chunks/chunk-J567OZJY.js.map +0 -1
  331. package/dist/cli-bundle/chunks/chunk-LDO24J5I.js.map +0 -7
  332. package/dist/cli-bundle/chunks/chunk-NA5SBIB4.js.map +0 -7
  333. package/dist/cli-bundle/chunks/chunk-OKDBHOON.js.map +0 -1
  334. package/dist/cli-bundle/chunks/chunk-OMT4NO7T.js.map +0 -7
  335. package/dist/cli-bundle/chunks/chunk-OTZ3C2NE.js.map +0 -1
  336. package/dist/cli-bundle/chunks/chunk-QRRUGIJN.js.map +0 -1
  337. package/dist/cli-bundle/chunks/chunk-QXYKH56X.js.map +0 -7
  338. package/dist/cli-bundle/chunks/chunk-RKGFUC4O.js.map +0 -1
  339. package/dist/cli-bundle/chunks/chunk-RPCCQDG2.js.map +0 -7
  340. package/dist/cli-bundle/chunks/chunk-TGG7YGMC.js.map +0 -1
  341. package/dist/cli-bundle/chunks/chunk-TNGLCRKS.js.map +0 -1
  342. package/dist/cli-bundle/chunks/chunk-UTYNQ2WH.js.map +0 -7
  343. package/dist/cli-bundle/chunks/chunk-VL4LYTJN.js.map +0 -7
  344. package/dist/cli-bundle/chunks/chunk-VLFLRFJP.js.map +0 -1
  345. package/dist/cli-bundle/chunks/chunk-WKSFBBZT.js.map +0 -1
  346. package/dist/cli-bundle/chunks/chunk-XY3CC3EM.js.map +0 -7
  347. package/dist/cli-bundle/chunks/chunk-ZTSV7P2T.js.map +0 -1
  348. package/dist/cli-bundle/chunks/close-BWM7FTF4.js +0 -12
  349. package/dist/cli-bundle/chunks/close-many-AUHTVFUQ.js +0 -21
  350. package/dist/cli-bundle/chunks/comments-7D5VPBZI.js +0 -13
  351. package/dist/cli-bundle/chunks/copy-QJ6ZVWZV.js +0 -9
  352. package/dist/cli-bundle/chunks/create-FGMTTYOI.js +0 -25
  353. package/dist/cli-bundle/chunks/delete-L2GMMMPR.js +0 -10
  354. package/dist/cli-bundle/chunks/deps-KTFI4RWD.js +0 -13
  355. package/dist/cli-bundle/chunks/docs-VNURA275.js +0 -14
  356. package/dist/cli-bundle/chunks/files-UNFPZLTG.js +0 -18
  357. package/dist/cli-bundle/chunks/focus-MI2UHBP4.js +0 -10
  358. package/dist/cli-bundle/chunks/history-redact-VAHGBUHI.js +0 -16
  359. package/dist/cli-bundle/chunks/history-repair-DDYQXR43.js +0 -18
  360. package/dist/cli-bundle/chunks/learnings-VWJEKHEO.js +0 -13
  361. package/dist/cli-bundle/chunks/notes-NGVJJJQO.js +0 -13
  362. package/dist/cli-bundle/chunks/plan-U6SQJUFI.js +0 -24
  363. package/dist/cli-bundle/chunks/restore-AX6ZMGHZ.js +0 -14
  364. package/dist/cli-bundle/chunks/update-XYHF3YZF.js +0 -21
  365. package/dist/cli-bundle/chunks/update-many-5HKVHFUL.js +0 -30
  366. /package/dist/cli-bundle/chunks/{append-CTKFDEAX.js.map → append-DYQWQK2J.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{append-2FS6MVG7.js.map → append-PVZJDM6J.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-J2WAWP4U.js.map → chunk-2FNWQXZ2.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-YFGYDZRP.js.map → chunk-2GA3NK35.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-XFEIASAC.js.map → chunk-2QIQGYPW.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-3WCGYH5Q.js.map → chunk-3CMRNVTO.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{close-BWM7FTF4.js.map → chunk-3HKUXVKV.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-VDAZPPRU.js.map → chunk-3I3LRT2G.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-3P3RFJIQ.js.map → chunk-3TL7WOEF.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-4SHJ5JS3.js.map → chunk-44LNIULG.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-BVCF4ULV.js.map → chunk-4RXTMU57.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-XMI2TRY5.js.map → chunk-4WREH7RT.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-JYUGUXFW.js.map → chunk-5CT5BW6E.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-QGH6WL6L.js.map → chunk-655STMGA.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-DGKBWCMA.js.map → chunk-6IIVBC56.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-D4GPNYYP.js.map → chunk-6OTZMORS.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-JVRVXO6M.js.map → chunk-6PKA3SJQ.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{close-many-AUHTVFUQ.js.map → chunk-6X5MZ5R2.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{close-CU56F47E.js.map → chunk-76UBY2EE.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-ZS2KPCJN.js.map → chunk-7QDSYUMF.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-Z7TFPIJ6.js.map → chunk-7TQMR6LK.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-AHA4POA6.js.map → chunk-ABRCOSDC.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-KQJVTQVK.js.map → chunk-ANSJHDOZ.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{close-many-ZQ2WP67J.js.map → chunk-B7SWOIP6.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-HXTCZSAI.js.map → chunk-DBZVUJTK.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-2QNOWOIB.js.map → chunk-DO5RGJXT.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-MKONZ4UO.js.map → chunk-DRNJPEPQ.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-H36FXA7B.js.map → chunk-DYEX6NFH.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-GAJ7U7B4.js.map → chunk-ERL2YFJ2.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-FPEYOFEF.js.map → chunk-F7PSHRNO.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-UH7OLT6F.js.map → chunk-FDSBDNYE.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-RQAY7C5T.js.map → chunk-FJZDA6MS.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-B4TVNGRX.js.map → chunk-FO7GMJKG.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{comments-UDUMKXL6.js.map → chunk-FRQ63VPB.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{chunk-U252II47.js.map → chunk-FTQLW4JD.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{chunk-AGD4VZXH.js.map → chunk-H2QBAKLQ.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{chunk-CJVQ4XIG.js.map → chunk-HAMLIWAF.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{chunk-7QOIQTPB.js.map → chunk-HLHSQ5CA.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{chunk-AHC7J6XD.js.map → chunk-IA3YFTXT.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{chunk-5ZCVF4WF.js.map → chunk-IAPHYPRL.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{chunk-OCSQWIOW.js.map → chunk-IFZA4VB5.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{chunk-4WMFM77X.js.map → chunk-J4NZOP3I.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{chunk-MTNKSSSO.js.map → chunk-JL7WZ4O2.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{chunk-AZ52LTCY.js.map → chunk-K7WNZ7KD.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{chunk-2OLSXXIV.js.map → chunk-KADLSPIU.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{chunk-RQKORMM4.js.map → chunk-KB726FMH.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{chunk-TZTQ4TVV.js.map → chunk-M6ASXYCU.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{chunk-WDDOAU7Z.js.map → chunk-M7EWN4TF.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{chunk-327DSGW2.js.map → chunk-MD6ULIPJ.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{chunk-M52DG2QJ.js.map → chunk-MQZ3PLCF.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{chunk-GQ2CQNGI.js.map → chunk-N3CMP4NI.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{chunk-J7SBFUZC.js.map → chunk-NAQYVWSQ.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-U2GMYP3L.js.map → chunk-NKW36AMT.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-FTQQAPRX.js.map → chunk-PHKP3AGR.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-WVUXNIYO.js.map → chunk-Q37E63AM.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-JVXV7ANV.js.map → chunk-Q7E6OYZK.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-WVUYATII.js.map → chunk-QABYZYLU.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-7TQPV7HR.js.map → chunk-QSPARJWF.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-GTKILM6F.js.map → chunk-QZ7LT3XE.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-L3VKY6R6.js.map → chunk-RA5AIAMP.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-BJS27ALI.js.map → chunk-RGXD5JJR.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-TSEPW2P6.js.map → chunk-RMF3IOYQ.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-TGGTXC52.js.map → chunk-TH7U4KLY.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-LP4UATP6.js.map → chunk-TWLDBKQU.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-UK222BHQ.js.map → chunk-TZRTLMWM.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-6E6S2X6S.js.map → chunk-UB2QYSTO.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-S6CXUSYC.js.map → chunk-UGTVWL3E.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-BNS6QHTZ.js.map → chunk-UJ4HJYWL.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-BYVOEJPQ.js.map → chunk-UKUIIBDW.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-SGDBVR7X.js.map → chunk-UVBA6F5A.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-DZRZMBBF.js.map → chunk-VJTAEIPC.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-74PWVJON.js.map → chunk-W6HZ55JO.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-P7IFURWH.js.map → chunk-WPAWZW7S.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-36LEOWSX.js.map → chunk-WQUEHPZB.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-FCKJF7G2.js.map → chunk-WRKB56FC.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-KR5EHAN4.js.map → chunk-X3GYR4P2.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-OWW2KXOV.js.map → chunk-YQYG2V23.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-G2SCT7BC.js.map → chunk-YVKE5ZDM.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-QHIN4UTF.js.map → chunk-ZAYYDNB3.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{comments-7D5VPBZI.js.map → chunk-ZHBI2AP7.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-GNVBUNJQ.js.map → chunk-ZTRBSABY.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-PY32KGQU.js.map → chunk-ZUKSZVBW.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{copy-VFHECFBV.js.map → close-LZECOMHO.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{copy-QJ6ZVWZV.js.map → close-RI4JQQHU.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{create-FGMTTYOI.js.map → close-many-LY2XJ52M.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{create-CE2X3SGF.js.map → close-many-ZHI6A5TN.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{delete-L2GMMMPR.js.map → comments-35M273DN.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{delete-2JXQCHHT.js.map → comments-AJWRTFZ5.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{deps-FPXNLO6C.js.map → copy-GMXYKBXT.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{deps-KTFI4RWD.js.map → copy-NPYM7M7U.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{docs-VNURA275.js.map → create-F53OBTOU.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{docs-AMAR4OHU.js.map → create-HU4Q7RJX.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{files-JFHN7DYM.js.map → delete-GSDZLTRC.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{files-UNFPZLTG.js.map → delete-ODRWJWAM.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{focus-MI2UHBP4.js.map → deps-U57I7EAK.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{focus-QFN2RRZ7.js.map → deps-WWB7P2GT.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{history-compact-SAHT5D46.js.map → docs-G7N4E2JO.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{history-compact-G34XMABV.js.map → docs-MQIY2ZQS.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{history-redact-VAHGBUHI.js.map → files-TBZD7V6H.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{history-redact-IFJDNKLZ.js.map → files-TTY6N2AV.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{history-repair-DDYQXR43.js.map → focus-U5TRVCRS.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{history-repair-NXLQTCVN.js.map → focus-XT6YVFFX.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{learnings-5CZKAMBS.js.map → history-compact-KKVUWB4V.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{learnings-VWJEKHEO.js.map → history-compact-M7GHYVFN.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{notes-POMK37UI.js.map → history-redact-3DVZOILD.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{notes-NGVJJJQO.js.map → history-redact-JIHZLHDP.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{plan-YBNYNT3A.js.map → history-repair-ITDUMK4N.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{plan-U6SQJUFI.js.map → history-repair-NAFCHLH7.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{profile-JNKSU6EQ.js.map → learnings-FGO3NSFW.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{profile-A2WPVG6I.js.map → learnings-SONGPSHI.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{restore-AX6ZMGHZ.js.map → notes-BSD53H2W.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{restore-IVS5XGYR.js.map → notes-NQ6RXVW6.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{schema-R3U2REY4.js.map → plan-2NNEO46V.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{schema-P2MF23JO.js.map → plan-AWLYGBNV.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{update-YBIQESMH.js.map → profile-AAQUU6T3.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{update-XYHF3YZF.js.map → profile-U725ATWZ.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{register-mutation-3OXYXBKH.js.map → register-mutation-4FMGJJF7.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{register-mutation-WK265BM7.js.map → register-mutation-UELYYOR7.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{register-setup-CCK7CJVR.js.map → register-setup-5XNGKJ22.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{register-setup-CPZBGSOJ.js.map → register-setup-ZTNY6S7R.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{update-many-5HKVHFUL.js.map → restore-66GLMHIX.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{update-many-F3CIV5SQ.js.map → restore-B3BAB6X2.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="410e9d5d-955a-5e65-9b6b-f17dc7a2cf71")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ebd76eb4-36dd-5cd4-a772-a83b5dddeb05")}catch(e){}}();
3
3
  import {
4
4
  collectRuntimeFilterValues,
5
5
  createQueryFingerprint,
@@ -7,20 +7,24 @@ import {
7
7
  matchesRuntimeFilters,
8
8
  resolveQueryCursorStart,
9
9
  runList
10
- } from "./chunk-2PR4ZTRO.js";
10
+ } from "./chunk-6TTOHMTB.js";
11
11
  import {
12
12
  collectBlockedByIds,
13
13
  computeActionabilityReport
14
- } from "./chunk-KR5EHAN4.js";
14
+ } from "./chunk-X3GYR4P2.js";
15
15
  import {
16
16
  parseIntegerLimit,
17
17
  parsePriority,
18
18
  parseType,
19
19
  readHistoryEntries
20
- } from "./chunk-YFGYDZRP.js";
20
+ } from "./chunk-2GA3NK35.js";
21
21
  import {
22
22
  parseLimit
23
- } from "./chunk-VDAZPPRU.js";
23
+ } from "./chunk-3I3LRT2G.js";
24
+ import {
25
+ readContextUsageAffinity,
26
+ recordContextUsageServing
27
+ } from "./chunk-ZNP64HOW.js";
24
28
  import {
25
29
  compareTimestampStrings,
26
30
  enforceHistoryStreamPolicyForItems,
@@ -34,7 +38,7 @@ import {
34
38
  resolveIsoOrRelative,
35
39
  runActiveOnReadHooks,
36
40
  runActiveServiceOverride
37
- } from "./chunk-TNGLCRKS.js";
41
+ } from "./chunk-GSEADLRH.js";
38
42
  import {
39
43
  CONTEXT_DEPTH_VALUES,
40
44
  CONTEXT_SECTION_VALUES,
@@ -49,7 +53,7 @@ import {
49
53
  resolveRuntimeFieldRegistry,
50
54
  resolveRuntimeStatusRegistry,
51
55
  weekdayOrderIndex
52
- } from "./chunk-TGG7YGMC.js";
56
+ } from "./chunk-GXXC7QSK.js";
53
57
 
54
58
  // dist/cli/commands/activity.js
55
59
  import fs from "node:fs/promises";
@@ -1105,6 +1109,7 @@ var CONTEXT_RELEVANCE_SIGNAL_NAMES = [
1105
1109
  "deadline_pressure",
1106
1110
  "knowledge_density",
1107
1111
  "author_affinity",
1112
+ "usage_affinity",
1108
1113
  "semantic_similarity"
1109
1114
  ];
1110
1115
  var CONTEXT_RELEVANCE_SERVICE = "context_relevance";
@@ -1119,6 +1124,7 @@ var DEFAULT_CONTEXT_RELEVANCE_WEIGHTS = {
1119
1124
  deadline_pressure: 0.45,
1120
1125
  knowledge_density: 0.25,
1121
1126
  author_affinity: 0.2,
1127
+ usage_affinity: 0.3,
1122
1128
  semantic_similarity: 0.5
1123
1129
  };
1124
1130
  var JSON_TOKEN_ENCODER = new TextEncoder();
@@ -1379,6 +1385,181 @@ async function runContextEvaluationCorpus(scenarios, reader, thresholds) {
1379
1385
  return summarizeContextEvaluationReports(reports, thresholds);
1380
1386
  }
1381
1387
 
1388
+ // dist/sdk/context-packing.js
1389
+ var CONTEXT_PACKING_PROFILES = {
1390
+ balanced: { redundancyPenalty: 0.35, uncertaintyPenalty: 0.2 },
1391
+ context: { redundancyPenalty: 0.45, uncertaintyPenalty: 0.15 },
1392
+ next: { redundancyPenalty: 0.25, uncertaintyPenalty: 0.3 }
1393
+ };
1394
+ var PROJECTION_LEVELS = [
1395
+ "identity",
1396
+ "summary",
1397
+ "full"
1398
+ ];
1399
+ function assertPackingCandidate(candidate) {
1400
+ if (!candidate.id.trim() || !Number.isInteger(candidate.rank) || candidate.rank < 1) {
1401
+ throw new TypeError("Context packing candidates require a non-empty id and positive integer rank");
1402
+ }
1403
+ if (!Number.isFinite(candidate.score) || candidate.score < 0) {
1404
+ throw new TypeError("Context packing candidate scores must be finite and non-negative");
1405
+ }
1406
+ const costs = PROJECTION_LEVELS.map((level) => candidate.token_costs[level]);
1407
+ if (costs.some((cost) => !Number.isInteger(cost) || cost < 1) || costs[0] > costs[1] || costs[1] > costs[2]) {
1408
+ throw new TypeError("Context projection costs must be positive monotone integers");
1409
+ }
1410
+ if (candidate.uncertainty !== void 0 && (!Number.isFinite(candidate.uncertainty) || candidate.uncertainty < 0)) {
1411
+ throw new TypeError("Context packing uncertainty must be finite and non-negative");
1412
+ }
1413
+ }
1414
+ function resolvePackingPenalties(options) {
1415
+ if (!Number.isInteger(options.tokenBudget) || options.tokenBudget < 1) {
1416
+ throw new TypeError("Context packing tokenBudget must be a positive integer");
1417
+ }
1418
+ const profile = options.profile ?? "balanced";
1419
+ const policy = CONTEXT_PACKING_PROFILES[profile];
1420
+ if (!policy)
1421
+ throw new TypeError("Unknown context packing profile");
1422
+ const redundancy = options.redundancyPenalty ?? policy.redundancyPenalty;
1423
+ const uncertainty = options.uncertaintyPenalty ?? policy.uncertaintyPenalty;
1424
+ if (!Number.isFinite(redundancy) || redundancy < 0 || redundancy > 1 || !Number.isFinite(uncertainty) || uncertainty < 0) {
1425
+ throw new TypeError("Context packing penalties must be finite and within their supported ranges");
1426
+ }
1427
+ if (options.latencyBudgetMs !== void 0 && (!Number.isFinite(options.latencyBudgetMs) || options.latencyBudgetMs <= 0)) {
1428
+ throw new TypeError("Context packing latencyBudgetMs must be positive");
1429
+ }
1430
+ return { redundancy, uncertainty, profile };
1431
+ }
1432
+ function orderPackingCandidates(candidates) {
1433
+ const ids = /* @__PURE__ */ new Set();
1434
+ for (const candidate of candidates) {
1435
+ assertPackingCandidate(candidate);
1436
+ if (ids.has(candidate.id)) {
1437
+ throw new TypeError("Context packing candidates require unique ids");
1438
+ }
1439
+ ids.add(candidate.id);
1440
+ }
1441
+ return [...candidates].sort((left, right) => left.rank - right.rank || left.id.localeCompare(right.id));
1442
+ }
1443
+ function findBestAffordableCandidate(candidates, remaining, valueOf, deadline, readClock) {
1444
+ let bestIndex = -1;
1445
+ let evaluated = 0;
1446
+ for (let index = 0; index < candidates.length; index += 1) {
1447
+ if (index % 128 === 0 && readClock() >= deadline) {
1448
+ return { index: bestIndex, evaluated, timedOut: true };
1449
+ }
1450
+ const candidate = candidates[index];
1451
+ if (candidate.token_costs.identity > remaining)
1452
+ continue;
1453
+ evaluated += 1;
1454
+ const best = bestIndex < 0 ? void 0 : candidates[bestIndex];
1455
+ const density = valueOf(candidate) / candidate.token_costs.identity;
1456
+ const bestDensity = best === void 0 ? Number.NEGATIVE_INFINITY : valueOf(best) / best.token_costs.identity;
1457
+ if (density > bestDensity || density === bestDensity && best !== void 0 && (candidate.rank < best.rank || candidate.rank === best.rank && candidate.id.localeCompare(best.id) < 0)) {
1458
+ bestIndex = index;
1459
+ }
1460
+ }
1461
+ return { index: bestIndex, evaluated, timedOut: false };
1462
+ }
1463
+ function selectIdentityCandidates(params) {
1464
+ const represented = /* @__PURE__ */ new Set();
1465
+ const included = [];
1466
+ let remaining = params.tokenBudget;
1467
+ const valueOf = (candidate) => {
1468
+ const key = candidate.lineage ?? candidate.cluster;
1469
+ const redundancy = key && represented.has(key) ? 1 - params.redundancyPenalty : 1;
1470
+ return Math.max(0, (candidate.score - params.uncertaintyPenalty * (candidate.uncertainty ?? 0)) * redundancy);
1471
+ };
1472
+ const admit = (candidate) => {
1473
+ const tokens = candidate.token_costs.identity;
1474
+ included.push({
1475
+ ...candidate,
1476
+ projection: "identity",
1477
+ tokens,
1478
+ marginal_value: valueOf(candidate)
1479
+ });
1480
+ remaining -= tokens;
1481
+ const key = candidate.lineage ?? candidate.cluster;
1482
+ if (key)
1483
+ represented.add(key);
1484
+ };
1485
+ for (const candidate of params.ordered.filter((entry) => entry.required)) {
1486
+ if (candidate.token_costs.identity <= remaining)
1487
+ admit(candidate);
1488
+ }
1489
+ const optional = params.ordered.filter((entry) => !entry.required);
1490
+ let selectionComplete = true;
1491
+ let evaluatedCandidates = 0;
1492
+ while (optional.length > 0) {
1493
+ const selection = findBestAffordableCandidate(optional, remaining, valueOf, params.deadline, params.readClock);
1494
+ evaluatedCandidates += selection.evaluated;
1495
+ if (selection.timedOut)
1496
+ selectionComplete = false;
1497
+ if (selection.index < 0 || selection.timedOut)
1498
+ break;
1499
+ admit(optional.splice(selection.index, 1)[0]);
1500
+ }
1501
+ return {
1502
+ included,
1503
+ remaining,
1504
+ selectionComplete,
1505
+ evaluatedCandidates
1506
+ };
1507
+ }
1508
+ function upgradeSelectedProjections(included, initialRemaining) {
1509
+ let remaining = initialRemaining;
1510
+ for (const target of ["summary", "full"]) {
1511
+ const previous = target === "summary" ? "identity" : "summary";
1512
+ const upgrades = [...included].sort((left, right) => {
1513
+ const leftCost = left.token_costs[target] - left.token_costs[previous];
1514
+ const rightCost = right.token_costs[target] - right.token_costs[previous];
1515
+ return right.marginal_value / Math.max(rightCost, 1) - left.marginal_value / Math.max(leftCost, 1) || left.rank - right.rank || left.id.localeCompare(right.id);
1516
+ });
1517
+ for (const entry of upgrades) {
1518
+ if (entry.projection !== previous)
1519
+ continue;
1520
+ const extra = entry.token_costs[target] - entry.tokens;
1521
+ if (extra > remaining)
1522
+ continue;
1523
+ entry.projection = target;
1524
+ entry.tokens += extra;
1525
+ remaining -= extra;
1526
+ }
1527
+ }
1528
+ return remaining;
1529
+ }
1530
+ function packContextCandidates(candidates, options) {
1531
+ const penalties = resolvePackingPenalties(options);
1532
+ const ordered = orderPackingCandidates(candidates);
1533
+ const readClock = options.readClock ?? performance.now.bind(performance);
1534
+ const deadline = options.latencyBudgetMs === void 0 ? Number.POSITIVE_INFINITY : readClock() + options.latencyBudgetMs;
1535
+ const selection = selectIdentityCandidates({
1536
+ ordered,
1537
+ tokenBudget: options.tokenBudget,
1538
+ redundancyPenalty: penalties.redundancy,
1539
+ uncertaintyPenalty: penalties.uncertainty,
1540
+ deadline,
1541
+ readClock
1542
+ });
1543
+ const { included } = selection;
1544
+ const remaining = upgradeSelectedProjections(included, selection.remaining);
1545
+ included.sort((left, right) => left.rank - right.rank || left.id.localeCompare(right.id));
1546
+ const selected = new Set(included.map((entry) => entry.id));
1547
+ return {
1548
+ included,
1549
+ omitted_ids: ordered.filter((entry) => !selected.has(entry.id)).map((entry) => entry.id),
1550
+ token_budget: options.tokenBudget,
1551
+ used_tokens: options.tokenBudget - remaining,
1552
+ remaining_tokens: remaining,
1553
+ complete: selection.selectionComplete && included.length === candidates.length && included.every((entry) => entry.projection === "full"),
1554
+ selection_complete: selection.selectionComplete,
1555
+ termination_reason: selection.selectionComplete ? "exhausted" : "latency_budget",
1556
+ evaluated_candidates: selection.evaluatedCandidates,
1557
+ latency_budget_ms: options.latencyBudgetMs ?? null,
1558
+ profile: penalties.profile,
1559
+ degradation_ladder: ["full", "summary", "identity"]
1560
+ };
1561
+ }
1562
+
1382
1563
  // dist/cli/commands/context.js
1383
1564
  var CONTEXT_OUTPUT_VALUES = ["markdown", "toon", "json"];
1384
1565
  var HIGH_LEVEL_TYPES = /* @__PURE__ */ new Set(["Epic", "Feature"]);
@@ -1727,11 +1908,12 @@ function buildItemContextRelevanceCandidate(item, params) {
1727
1908
  risk_pressure: riskPressure,
1728
1909
  deadline_pressure: resolveDeadlinePressure(item.deadline, params.nowMs),
1729
1910
  knowledge_density: Math.min(knowledgeEntries / 5, 1),
1730
- author_affinity: assignedToAuthor ? 1 : 0
1911
+ author_affinity: assignedToAuthor ? 1 : 0,
1912
+ usage_affinity: params.usageAffinity?.[item.id]
1731
1913
  }
1732
1914
  };
1733
1915
  }
1734
- function buildItemContextRelevanceCandidates(items, statusRegistry, now, author) {
1916
+ function buildItemContextRelevanceCandidates(items, statusRegistry, now, author, usageAffinity) {
1735
1917
  const recencyOrder = [...items].sort((left, right) => compareTimestampStrings(sortableTimestamp(right.updated_at), sortableTimestamp(left.updated_at)) || left.id.localeCompare(right.id));
1736
1918
  const recencyRank = new Map(recencyOrder.map((item, index) => [item.id, index]));
1737
1919
  const recencyDenominator = Math.max(items.length - 1, 1);
@@ -1743,9 +1925,45 @@ function buildItemContextRelevanceCandidates(items, statusRegistry, now, author)
1743
1925
  normalizedAuthor,
1744
1926
  recencyRank,
1745
1927
  recencyDenominator,
1746
- itemCount: items.length
1928
+ itemCount: items.length,
1929
+ usageAffinity
1747
1930
  }));
1748
1931
  }
1932
+ function estimateJsonTokens2(value) {
1933
+ return Math.max(1, Math.ceil(Buffer.byteLength(JSON.stringify(value), "utf8") / 4));
1934
+ }
1935
+ function packRankedContextItems(report, tokenBudget, requiredIds = /* @__PURE__ */ new Set(), profile = "context") {
1936
+ return packContextCandidates(report.ranked.map((entry) => ({
1937
+ id: entry.id,
1938
+ item: entry.item,
1939
+ rank: entry.rank,
1940
+ score: entry.score,
1941
+ required: requiredIds.has(entry.id),
1942
+ cluster: entry.item.parent?.trim() || entry.item.type,
1943
+ token_costs: {
1944
+ identity: estimateJsonTokens2({ id: entry.id, title: entry.item.title }),
1945
+ summary: estimateJsonTokens2({
1946
+ id: entry.id,
1947
+ title: entry.item.title,
1948
+ type: entry.item.type,
1949
+ status: entry.item.status,
1950
+ priority: entry.item.priority,
1951
+ parent: entry.item.parent
1952
+ }),
1953
+ full: estimateJsonTokens2(entry.item)
1954
+ }
1955
+ })), { tokenBudget, profile, latencyBudgetMs: 25 });
1956
+ }
1957
+ function toContextPackingSummary(report) {
1958
+ return {
1959
+ ...report,
1960
+ included: report.included.map((entry) => ({
1961
+ id: entry.id,
1962
+ projection: entry.projection,
1963
+ tokens: entry.tokens
1964
+ }))
1965
+ };
1966
+ }
1749
1967
  function toContextRankingSummary(report) {
1750
1968
  return {
1751
1969
  model: report.model,
@@ -2354,22 +2572,35 @@ function resolveContextSubtreeIds(parentScope, fullCorpus) {
2354
2572
  }
2355
2573
  return subtree.ids;
2356
2574
  }
2357
- async function resolveContextFocusGroups(listedItemMetadata, allItems, statusRegistry, sectionsIncluded, limit, now, author, cursor, cursorFingerprint, useBoundedPage) {
2575
+ async function resolveContextFocusGroups(listedItemMetadata, allItems, statusRegistry, sectionsIncluded, limit, now, author, cursor, cursorFingerprint, useBoundedPage, pmRoot) {
2358
2576
  const structural = [...listedItemMetadata].sort((left, right) => compareCriticalItems(left, right, statusRegistry));
2359
- const ranking = await scoreContextCandidatesWithActiveExtensions("context", buildItemContextRelevanceCandidates(structural, statusRegistry, now, author));
2577
+ const usage = await readContextUsageAffinity({
2578
+ pmRoot,
2579
+ author,
2580
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
2581
+ });
2582
+ const ranking = await scoreContextCandidatesWithActiveExtensions("context", buildItemContextRelevanceCandidates(structural, statusRegistry, now, author, usage.affinity));
2360
2583
  const ranked = ranking.ranked.map((entry) => entry.item);
2361
2584
  const activeStatuses = statusRegistry.active_statuses;
2362
- const activeItems = ranked.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2363
- const pageStart = useBoundedPage ? resolveQueryCursorStart(activeItems, cursor, cursorFingerprint, (item) => item.id) : 0;
2364
- const focusPage = useBoundedPage ? activeItems.slice(pageStart, pageStart + limit) : activeItems;
2365
- const hasMore = useBoundedPage && focusPage.length > 0 && pageStart + focusPage.length < activeItems.length;
2585
+ const rankedActiveItems = ranked.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2586
+ const pageStart = useBoundedPage ? resolveQueryCursorStart(rankedActiveItems, cursor, cursorFingerprint, (item) => item.id) : 0;
2587
+ const focusPage = useBoundedPage ? rankedActiveItems.slice(pageStart, pageStart + limit) : rankedActiveItems;
2588
+ const hasMore = useBoundedPage && focusPage.length > 0 && pageStart + focusPage.length < rankedActiveItems.length;
2366
2589
  const nextCursor = hasMore && focusPage.length > 0 ? encodeQueryCursor(cursorFingerprint, focusPage[focusPage.length - 1].id, pageStart + focusPage.length - 1) : void 0;
2367
- const blockedItems = ranked.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2590
+ const rankedBlockedItems = ranked.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2591
+ const packingIds = /* @__PURE__ */ new Set([
2592
+ ...focusPage.map((item) => item.id),
2593
+ ...rankedBlockedItems.slice(0, limit).map((item) => item.id)
2594
+ ]);
2595
+ const packing = packRankedContextItems({ ...ranking, ranked: ranking.ranked.filter((entry) => packingIds.has(entry.id)) }, Math.max(256, limit * 160));
2596
+ const packedItems = packing.included.map((entry) => entry.item);
2597
+ const activeItems = packedItems.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2598
+ const blockedItems = packedItems.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2368
2599
  const childrenByParent = buildChildrenByParent(allItems);
2369
2600
  const focusChildrenByParent = contextNeedsAllItems(sectionsIncluded) ? childrenByParent : void 0;
2370
- const highLevel = focusPage.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2371
- const lowLevel = focusPage.filter((item) => !HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2372
- const blockedFallbackUsed = activeItems.length === 0;
2601
+ const highLevel = activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2602
+ const lowLevel = activeItems.filter((item) => !HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2603
+ const blockedFallbackUsed = rankedActiveItems.length === 0;
2373
2604
  return {
2374
2605
  activeItems,
2375
2606
  blockedItems,
@@ -2378,6 +2609,7 @@ async function resolveContextFocusGroups(listedItemMetadata, allItems, statusReg
2378
2609
  blockedFallback: blockedFallbackUsed ? blockedItems.slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent)) : [],
2379
2610
  blockedFallbackUsed,
2380
2611
  ranking,
2612
+ packing,
2381
2613
  pageExtras: {
2382
2614
  ...useBoundedPage ? { applied_limit: limit } : {},
2383
2615
  ...hasMore ? { has_more: true, truncated: true } : {},
@@ -2495,14 +2727,37 @@ function maybeAttachEmptyContextSuggestions(result, activeItems, blockedItems) {
2495
2727
  "pm aggregate for a full project status overview"
2496
2728
  ];
2497
2729
  }
2730
+ async function attachContextUsageFeedback(result, focusGroups, pmRoot, author) {
2731
+ try {
2732
+ const included = new Set(focusGroups.packing.included.map((entry) => entry.id));
2733
+ await recordContextUsageServing({
2734
+ pmRoot,
2735
+ author,
2736
+ surface: "context",
2737
+ profile: focusGroups.packing.profile,
2738
+ rows: focusGroups.ranking.ranked.map((entry) => ({
2739
+ id: entry.id,
2740
+ rank: entry.rank,
2741
+ included: included.has(entry.id)
2742
+ })),
2743
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
2744
+ });
2745
+ } catch {
2746
+ result.warnings = mergeSortedWarnings(result.warnings, [
2747
+ "context_usage_feedback_write_failed"
2748
+ ]);
2749
+ }
2750
+ }
2498
2751
  async function runContext(options, global) {
2752
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
2499
2753
  const resolvedRuntime = await resolveContextRuntime(options, global);
2500
2754
  const corpus = await loadContextCorpus(options, global, resolvedRuntime);
2501
2755
  const runtime = {
2502
2756
  ...resolvedRuntime,
2503
2757
  limit: resolveContextLimitAtScale(resolvedRuntime.limit, corpus.fullCorpus.length)
2504
2758
  };
2505
- const focusGroups = await resolveContextFocusGroups(corpus.listedItemMetadata, corpus.allItems, runtime.statusRegistry, runtime.sectionsIncluded, runtime.limit, nowIso(), process.env.PM_AUTHOR, options.after, buildContextCursorFingerprint(options), shouldPageContextFocus(options, corpus.fullCorpus.length));
2759
+ const author = process.env.PM_AUTHOR ?? runtime.settings.author_default;
2760
+ const focusGroups = await resolveContextFocusGroups(corpus.listedItemMetadata, corpus.allItems, runtime.statusRegistry, runtime.sectionsIncluded, runtime.limit, nowIso(), author, options.after, buildContextCursorFingerprint(options), shouldPageContextFocus(options, corpus.fullCorpus.length), pmRoot);
2506
2761
  const agendaContext = await buildContextAgenda(options, global, runtime, corpus.subtreeIds);
2507
2762
  const warnings = mergeSortedWarnings(corpus.listed.warnings, agendaContext.agenda.warnings, focusGroups.ranking.warnings);
2508
2763
  const inProgressCount = countContextStatus(focusGroups.activeItems, normalizeStatusInput("in_progress", runtime.statusRegistry), runtime.statusRegistry);
@@ -2563,12 +2818,15 @@ async function runContext(options, global) {
2563
2818
  ...focusGroups.pageExtras
2564
2819
  };
2565
2820
  attachOptionalContextSections(result, sections);
2566
- if (options.explainRanking === true)
2821
+ if (options.explainRanking === true) {
2567
2822
  result.ranking = toContextRankingSummary(focusGroups.ranking);
2823
+ result.packing = toContextPackingSummary(focusGroups.packing);
2824
+ }
2568
2825
  applyContextFocusProjection(result, runtime.focusFields);
2569
2826
  if (warnings.length > 0)
2570
2827
  result.warnings = warnings;
2571
2828
  maybeAttachEmptyContextSuggestions(result, focusGroups.activeItems, focusGroups.blockedItems);
2829
+ await attachContextUsageFeedback(result, focusGroups, pmRoot, author);
2572
2830
  return result;
2573
2831
  }
2574
2832
 
@@ -2737,6 +2995,54 @@ function buildNextTruncation(decisionCount, heldCount, limit) {
2737
2995
  }
2738
2996
  return Object.keys(truncation).length > 0 ? truncation : void 0;
2739
2997
  }
2998
+ async function attachNextUsageFeedback(params) {
2999
+ try {
3000
+ const included = new Set(params.packing.included.map((entry) => entry.id));
3001
+ await recordContextUsageServing({
3002
+ pmRoot: params.pmRoot,
3003
+ author: params.author,
3004
+ surface: "next",
3005
+ profile: params.packing.profile,
3006
+ rows: params.ranking.ranked.map((entry) => ({
3007
+ id: entry.id,
3008
+ rank: entry.rank,
3009
+ included: included.has(entry.id)
3010
+ })),
3011
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
3012
+ });
3013
+ } catch {
3014
+ params.result.warnings = [
3015
+ .../* @__PURE__ */ new Set([
3016
+ ...params.result.warnings ?? [],
3017
+ "context_usage_feedback_write_failed"
3018
+ ])
3019
+ ].sort((left, right) => left.localeCompare(right));
3020
+ }
3021
+ }
3022
+ async function finalizeNextResult(params) {
3023
+ const warnings = [
3024
+ .../* @__PURE__ */ new Set([
3025
+ ...params.candidatesWarnings ?? [],
3026
+ ...params.corpusWarnings ?? [],
3027
+ ...params.readyRanking.warnings ?? []
3028
+ ])
3029
+ ].sort((left, right) => left.localeCompare(right));
3030
+ if (warnings.length > 0)
3031
+ params.result.warnings = warnings;
3032
+ if (params.explainRanking) {
3033
+ params.result.ranking = toContextRankingSummary(params.readyRanking);
3034
+ params.result.packing = toContextPackingSummary(params.packing);
3035
+ }
3036
+ params.result.suggestions = buildNextSuggestions(params.recommended, params.blockedRows);
3037
+ await attachNextUsageFeedback({
3038
+ result: params.result,
3039
+ pmRoot: params.pmRoot,
3040
+ author: params.author,
3041
+ packing: params.packing,
3042
+ ranking: params.readyRanking
3043
+ });
3044
+ return params.result;
3045
+ }
2740
3046
  function filterCandidatesByParentScope(candidates, corpus, parentScope) {
2741
3047
  if (!parentScope) {
2742
3048
  return candidates;
@@ -2747,21 +3053,29 @@ function filterCandidatesByParentScope(candidates, corpus, parentScope) {
2747
3053
  }
2748
3054
  return candidates.filter((item) => subtree.ids.has(item.id.trim().toLowerCase()));
2749
3055
  }
2750
- async function rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, callerAuthor) {
3056
+ async function rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, callerAuthor, pmRoot, tokenBudget) {
2751
3057
  const concreteReady = rankedReady.filter((entry) => !hasCompletedDescendants(entry.item, childrenByParent));
2752
3058
  const structuralReady = concreteReady.length > 0 ? concreteReady : rankedReady;
2753
- const ranking = await scoreContextCandidatesWithActiveExtensions("next", buildItemContextRelevanceCandidates(structuralReady.map((entry) => entry.item), statusRegistry, now, callerAuthor ?? process.env.PM_AUTHOR));
3059
+ const usage = await readContextUsageAffinity({
3060
+ pmRoot,
3061
+ author: callerAuthor,
3062
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
3063
+ });
3064
+ const ranking = await scoreContextCandidatesWithActiveExtensions("next", buildItemContextRelevanceCandidates(structuralReady.map((entry) => entry.item), statusRegistry, now, callerAuthor, usage.affinity));
3065
+ const packing = packRankedContextItems(ranking, tokenBudget, /* @__PURE__ */ new Set(), "next");
2754
3066
  const readyById = new Map(structuralReady.map((entry) => [entry.item.id, entry]));
2755
3067
  const projectedReady = ranking.ranked.map((entry) => readyById.get(entry.id)).filter((entry) => entry !== void 0);
2756
3068
  return {
2757
3069
  projectedReady,
2758
3070
  ranking,
2759
- completedContainer: concreteReady.length === 0
3071
+ completedContainer: concreteReady.length === 0,
3072
+ packing
2760
3073
  };
2761
3074
  }
2762
3075
  async function runNext(options, global) {
2763
3076
  const pmRoot = resolvePmRoot(process.cwd(), global.path);
2764
3077
  const settings = await readSettings(pmRoot);
3078
+ const callerAuthor = options.callerAuthor ?? process.env.PM_AUTHOR ?? settings.author_default;
2765
3079
  const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
2766
3080
  const now = nowIso();
2767
3081
  const limit = parseNextLimit(options.limit, "--limit", DEFAULT_NEXT_LIMIT);
@@ -2775,10 +3089,10 @@ async function runNext(options, global) {
2775
3089
  const report = computeActionabilityReport(candidates, corpus, statusRegistry);
2776
3090
  const childrenByParent = buildChildrenByParent(corpus);
2777
3091
  const partitionedByDecision = partitionDecisionEntries(report.ready, options.includeDecisions === true);
2778
- const callerPartition = partitionCallerOwnedReady(partitionedByDecision.agent, settings.author_default, options.callerAuthor);
3092
+ const callerPartition = partitionCallerOwnedReady(partitionedByDecision.agent, settings.author_default, callerAuthor);
2779
3093
  const rankedReady = rankNextReadyEntries(callerPartition.available, childrenByParent, statusRegistry);
2780
3094
  const rankedBlocked = [...report.blocked].sort((left, right) => compareCriticalItems(left.item, right.item, statusRegistry));
2781
- const { projectedReady, ranking: readyRanking, completedContainer } = await rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, options.callerAuthor);
3095
+ const { projectedReady, ranking: readyRanking, completedContainer, packing: readyPacking } = await rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, callerAuthor, pmRoot, Math.max(192, limit * 128));
2782
3096
  const readyRows = projectedReady.map((entry, index) => toNextActionableItem(entry, statusRegistry, childrenByParent, index + 1));
2783
3097
  const blockedRows = rankedBlocked.map((entry, index) => toNextActionableItem(entry, statusRegistry, childrenByParent, index + 1));
2784
3098
  const decisionRows = rankNextReadyEntries(partitionedByDecision.decisions, childrenByParent, statusRegistry).map((entry, index) => toNextActionableItem(entry, statusRegistry, childrenByParent, index + 1));
@@ -2824,19 +3138,18 @@ async function runNext(options, global) {
2824
3138
  },
2825
3139
  truncation
2826
3140
  };
2827
- const warnings = [
2828
- .../* @__PURE__ */ new Set([
2829
- ...candidatesList.warnings ?? [],
2830
- ...corpusList.warnings ?? [],
2831
- ...readyRanking.warnings ?? []
2832
- ])
2833
- ].sort((a, b) => a.localeCompare(b));
2834
- if (warnings.length > 0)
2835
- result.warnings = warnings;
2836
- if (options.explainRanking === true)
2837
- result.ranking = toContextRankingSummary(readyRanking);
2838
- result.suggestions = buildNextSuggestions(recommended, blockedRows);
2839
- return result;
3141
+ return finalizeNextResult({
3142
+ result,
3143
+ recommended,
3144
+ blockedRows,
3145
+ candidatesWarnings: candidatesList.warnings,
3146
+ corpusWarnings: corpusList.warnings,
3147
+ readyRanking,
3148
+ explainRanking: options.explainRanking === true,
3149
+ pmRoot,
3150
+ author: callerAuthor,
3151
+ packing: readyPacking
3152
+ });
2840
3153
  }
2841
3154
  function renderNextMarkdown(result) {
2842
3155
  const lines = ["# pm next", "", ...renderNextSummaryLines(result)];
@@ -2917,6 +3230,8 @@ export {
2917
3230
  runContextEvaluationScenario,
2918
3231
  summarizeContextEvaluationReports,
2919
3232
  runContextEvaluationCorpus,
3233
+ CONTEXT_PACKING_PROFILES,
3234
+ packContextCandidates,
2920
3235
  CONTEXT_OUTPUT_VALUES,
2921
3236
  resolveContextOutputFormat,
2922
3237
  renderContextMarkdown,
@@ -2927,6 +3242,6 @@ export {
2927
3242
  runNext,
2928
3243
  renderNextMarkdown
2929
3244
  };
2930
- //# sourceMappingURL=chunk-ZTSV7P2T.js.map
3245
+ //# sourceMappingURL=chunk-BPD26E3P.js.map
2931
3246
 
2932
- //# debugId=410e9d5d-955a-5e65-9b6b-f17dc7a2cf71
3247
+ //# debugId=ebd76eb4-36dd-5cd4-a772-a83b5dddeb05