@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
@@ -5,20 +5,24 @@ import {
5
5
  matchesRuntimeFilters,
6
6
  resolveQueryCursorStart,
7
7
  runList
8
- } from "./chunk-SRQLQUO6.js";
8
+ } from "./chunk-6MHSBDGD.js";
9
9
  import {
10
10
  collectBlockedByIds,
11
11
  computeActionabilityReport
12
- } from "./chunk-BNS6QHTZ.js";
12
+ } from "./chunk-UJ4HJYWL.js";
13
13
  import {
14
14
  parseIntegerLimit,
15
15
  parsePriority,
16
16
  parseType,
17
17
  readHistoryEntries
18
- } from "./chunk-XMI2TRY5.js";
18
+ } from "./chunk-4WREH7RT.js";
19
19
  import {
20
20
  parseLimit
21
- } from "./chunk-OWW2KXOV.js";
21
+ } from "./chunk-YQYG2V23.js";
22
+ import {
23
+ readContextUsageAffinity,
24
+ recordContextUsageServing
25
+ } from "./chunk-Y72FV7RM.js";
22
26
  import {
23
27
  compareTimestampStrings,
24
28
  enforceHistoryStreamPolicyForItems,
@@ -32,7 +36,7 @@ import {
32
36
  resolveIsoOrRelative,
33
37
  runActiveOnReadHooks,
34
38
  runActiveServiceOverride
35
- } from "./chunk-QXYKH56X.js";
39
+ } from "./chunk-T4BRCB6Z.js";
36
40
  import {
37
41
  CONTEXT_DEPTH_VALUES,
38
42
  CONTEXT_SECTION_VALUES,
@@ -47,7 +51,7 @@ import {
47
51
  resolveRuntimeFieldRegistry,
48
52
  resolveRuntimeStatusRegistry,
49
53
  weekdayOrderIndex
50
- } from "./chunk-XY3CC3EM.js";
54
+ } from "./chunk-AFWZRL7M.js";
51
55
 
52
56
  // dist/cli/commands/activity.js
53
57
  import fs from "node:fs/promises";
@@ -1109,7 +1113,7 @@ async function runCalendar(options, global2) {
1109
1113
  !(function() {
1110
1114
  try {
1111
1115
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
1112
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "380bb6a4-3d56-5a72-8bc9-236b044012b3");
1116
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "305d815a-a180-56bf-9a09-b7830e0c3970");
1113
1117
  } catch (e2) {
1114
1118
  }
1115
1119
  })();
@@ -1124,6 +1128,7 @@ var CONTEXT_RELEVANCE_SIGNAL_NAMES = [
1124
1128
  "deadline_pressure",
1125
1129
  "knowledge_density",
1126
1130
  "author_affinity",
1131
+ "usage_affinity",
1127
1132
  "semantic_similarity"
1128
1133
  ];
1129
1134
  var CONTEXT_RELEVANCE_SERVICE = "context_relevance";
@@ -1138,6 +1143,7 @@ var DEFAULT_CONTEXT_RELEVANCE_WEIGHTS = {
1138
1143
  deadline_pressure: 0.45,
1139
1144
  knowledge_density: 0.25,
1140
1145
  author_affinity: 0.2,
1146
+ usage_affinity: 0.3,
1141
1147
  semantic_similarity: 0.5
1142
1148
  };
1143
1149
  var JSON_TOKEN_ENCODER = new TextEncoder();
@@ -1398,11 +1404,193 @@ async function runContextEvaluationCorpus(scenarios, reader, thresholds) {
1398
1404
  return summarizeContextEvaluationReports(reports, thresholds);
1399
1405
  }
1400
1406
 
1407
+ // dist/sdk/context-packing.js
1408
+ !(function() {
1409
+ try {
1410
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
1411
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f2b38b30-c8d0-51a2-9444-b2e0db9fa353");
1412
+ } catch (e2) {
1413
+ }
1414
+ })();
1415
+ var CONTEXT_PACKING_PROFILES = {
1416
+ balanced: { redundancyPenalty: 0.35, uncertaintyPenalty: 0.2 },
1417
+ context: { redundancyPenalty: 0.45, uncertaintyPenalty: 0.15 },
1418
+ next: { redundancyPenalty: 0.25, uncertaintyPenalty: 0.3 }
1419
+ };
1420
+ var PROJECTION_LEVELS = [
1421
+ "identity",
1422
+ "summary",
1423
+ "full"
1424
+ ];
1425
+ function assertPackingCandidate(candidate) {
1426
+ if (!candidate.id.trim() || !Number.isInteger(candidate.rank) || candidate.rank < 1) {
1427
+ throw new TypeError("Context packing candidates require a non-empty id and positive integer rank");
1428
+ }
1429
+ if (!Number.isFinite(candidate.score) || candidate.score < 0) {
1430
+ throw new TypeError("Context packing candidate scores must be finite and non-negative");
1431
+ }
1432
+ const costs = PROJECTION_LEVELS.map((level) => candidate.token_costs[level]);
1433
+ if (costs.some((cost) => !Number.isInteger(cost) || cost < 1) || costs[0] > costs[1] || costs[1] > costs[2]) {
1434
+ throw new TypeError("Context projection costs must be positive monotone integers");
1435
+ }
1436
+ if (candidate.uncertainty !== void 0 && (!Number.isFinite(candidate.uncertainty) || candidate.uncertainty < 0)) {
1437
+ throw new TypeError("Context packing uncertainty must be finite and non-negative");
1438
+ }
1439
+ }
1440
+ function resolvePackingPenalties(options) {
1441
+ if (!Number.isInteger(options.tokenBudget) || options.tokenBudget < 1) {
1442
+ throw new TypeError("Context packing tokenBudget must be a positive integer");
1443
+ }
1444
+ const profile = options.profile ?? "balanced";
1445
+ const policy = CONTEXT_PACKING_PROFILES[profile];
1446
+ if (!policy)
1447
+ throw new TypeError("Unknown context packing profile");
1448
+ const redundancy = options.redundancyPenalty ?? policy.redundancyPenalty;
1449
+ const uncertainty = options.uncertaintyPenalty ?? policy.uncertaintyPenalty;
1450
+ if (!Number.isFinite(redundancy) || redundancy < 0 || redundancy > 1 || !Number.isFinite(uncertainty) || uncertainty < 0) {
1451
+ throw new TypeError("Context packing penalties must be finite and within their supported ranges");
1452
+ }
1453
+ if (options.latencyBudgetMs !== void 0 && (!Number.isFinite(options.latencyBudgetMs) || options.latencyBudgetMs <= 0)) {
1454
+ throw new TypeError("Context packing latencyBudgetMs must be positive");
1455
+ }
1456
+ return { redundancy, uncertainty, profile };
1457
+ }
1458
+ function orderPackingCandidates(candidates) {
1459
+ const ids = /* @__PURE__ */ new Set();
1460
+ for (const candidate of candidates) {
1461
+ assertPackingCandidate(candidate);
1462
+ if (ids.has(candidate.id)) {
1463
+ throw new TypeError("Context packing candidates require unique ids");
1464
+ }
1465
+ ids.add(candidate.id);
1466
+ }
1467
+ return [...candidates].sort((left, right) => left.rank - right.rank || left.id.localeCompare(right.id));
1468
+ }
1469
+ function findBestAffordableCandidate(candidates, remaining, valueOf, deadline, readClock) {
1470
+ let bestIndex = -1;
1471
+ let evaluated = 0;
1472
+ for (let index = 0; index < candidates.length; index += 1) {
1473
+ if (index % 128 === 0 && readClock() >= deadline) {
1474
+ return { index: bestIndex, evaluated, timedOut: true };
1475
+ }
1476
+ const candidate = candidates[index];
1477
+ if (candidate.token_costs.identity > remaining)
1478
+ continue;
1479
+ evaluated += 1;
1480
+ const best = bestIndex < 0 ? void 0 : candidates[bestIndex];
1481
+ const density = valueOf(candidate) / candidate.token_costs.identity;
1482
+ const bestDensity = best === void 0 ? Number.NEGATIVE_INFINITY : valueOf(best) / best.token_costs.identity;
1483
+ if (density > bestDensity || density === bestDensity && best !== void 0 && (candidate.rank < best.rank || candidate.rank === best.rank && candidate.id.localeCompare(best.id) < 0)) {
1484
+ bestIndex = index;
1485
+ }
1486
+ }
1487
+ return { index: bestIndex, evaluated, timedOut: false };
1488
+ }
1489
+ function selectIdentityCandidates(params) {
1490
+ const represented = /* @__PURE__ */ new Set();
1491
+ const included = [];
1492
+ let remaining = params.tokenBudget;
1493
+ const valueOf = (candidate) => {
1494
+ const key = candidate.lineage ?? candidate.cluster;
1495
+ const redundancy = key && represented.has(key) ? 1 - params.redundancyPenalty : 1;
1496
+ return Math.max(0, (candidate.score - params.uncertaintyPenalty * (candidate.uncertainty ?? 0)) * redundancy);
1497
+ };
1498
+ const admit = (candidate) => {
1499
+ const tokens = candidate.token_costs.identity;
1500
+ included.push({
1501
+ ...candidate,
1502
+ projection: "identity",
1503
+ tokens,
1504
+ marginal_value: valueOf(candidate)
1505
+ });
1506
+ remaining -= tokens;
1507
+ const key = candidate.lineage ?? candidate.cluster;
1508
+ if (key)
1509
+ represented.add(key);
1510
+ };
1511
+ for (const candidate of params.ordered.filter((entry) => entry.required)) {
1512
+ if (candidate.token_costs.identity <= remaining)
1513
+ admit(candidate);
1514
+ }
1515
+ const optional = params.ordered.filter((entry) => !entry.required);
1516
+ let selectionComplete = true;
1517
+ let evaluatedCandidates = 0;
1518
+ while (optional.length > 0) {
1519
+ const selection = findBestAffordableCandidate(optional, remaining, valueOf, params.deadline, params.readClock);
1520
+ evaluatedCandidates += selection.evaluated;
1521
+ if (selection.timedOut)
1522
+ selectionComplete = false;
1523
+ if (selection.index < 0 || selection.timedOut)
1524
+ break;
1525
+ admit(optional.splice(selection.index, 1)[0]);
1526
+ }
1527
+ return {
1528
+ included,
1529
+ remaining,
1530
+ selectionComplete,
1531
+ evaluatedCandidates
1532
+ };
1533
+ }
1534
+ function upgradeSelectedProjections(included, initialRemaining) {
1535
+ let remaining = initialRemaining;
1536
+ for (const target of ["summary", "full"]) {
1537
+ const previous = target === "summary" ? "identity" : "summary";
1538
+ const upgrades = [...included].sort((left, right) => {
1539
+ const leftCost = left.token_costs[target] - left.token_costs[previous];
1540
+ const rightCost = right.token_costs[target] - right.token_costs[previous];
1541
+ return right.marginal_value / Math.max(rightCost, 1) - left.marginal_value / Math.max(leftCost, 1) || left.rank - right.rank || left.id.localeCompare(right.id);
1542
+ });
1543
+ for (const entry of upgrades) {
1544
+ if (entry.projection !== previous)
1545
+ continue;
1546
+ const extra = entry.token_costs[target] - entry.tokens;
1547
+ if (extra > remaining)
1548
+ continue;
1549
+ entry.projection = target;
1550
+ entry.tokens += extra;
1551
+ remaining -= extra;
1552
+ }
1553
+ }
1554
+ return remaining;
1555
+ }
1556
+ function packContextCandidates(candidates, options) {
1557
+ const penalties = resolvePackingPenalties(options);
1558
+ const ordered = orderPackingCandidates(candidates);
1559
+ const readClock = options.readClock ?? performance.now.bind(performance);
1560
+ const deadline = options.latencyBudgetMs === void 0 ? Number.POSITIVE_INFINITY : readClock() + options.latencyBudgetMs;
1561
+ const selection = selectIdentityCandidates({
1562
+ ordered,
1563
+ tokenBudget: options.tokenBudget,
1564
+ redundancyPenalty: penalties.redundancy,
1565
+ uncertaintyPenalty: penalties.uncertainty,
1566
+ deadline,
1567
+ readClock
1568
+ });
1569
+ const { included } = selection;
1570
+ const remaining = upgradeSelectedProjections(included, selection.remaining);
1571
+ included.sort((left, right) => left.rank - right.rank || left.id.localeCompare(right.id));
1572
+ const selected = new Set(included.map((entry) => entry.id));
1573
+ return {
1574
+ included,
1575
+ omitted_ids: ordered.filter((entry) => !selected.has(entry.id)).map((entry) => entry.id),
1576
+ token_budget: options.tokenBudget,
1577
+ used_tokens: options.tokenBudget - remaining,
1578
+ remaining_tokens: remaining,
1579
+ complete: selection.selectionComplete && included.length === candidates.length && included.every((entry) => entry.projection === "full"),
1580
+ selection_complete: selection.selectionComplete,
1581
+ termination_reason: selection.selectionComplete ? "exhausted" : "latency_budget",
1582
+ evaluated_candidates: selection.evaluatedCandidates,
1583
+ latency_budget_ms: options.latencyBudgetMs ?? null,
1584
+ profile: penalties.profile,
1585
+ degradation_ladder: ["full", "summary", "identity"]
1586
+ };
1587
+ }
1588
+
1401
1589
  // dist/cli/commands/context.js
1402
1590
  !(function() {
1403
1591
  try {
1404
1592
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
1405
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a1564ad2-3e32-5b66-9327-7ff92b7aee37");
1593
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7563a6df-9229-5af9-9849-85a058c01a46");
1406
1594
  } catch (e2) {
1407
1595
  }
1408
1596
  })();
@@ -1753,11 +1941,12 @@ function buildItemContextRelevanceCandidate(item, params) {
1753
1941
  risk_pressure: riskPressure,
1754
1942
  deadline_pressure: resolveDeadlinePressure(item.deadline, params.nowMs),
1755
1943
  knowledge_density: Math.min(knowledgeEntries / 5, 1),
1756
- author_affinity: assignedToAuthor ? 1 : 0
1944
+ author_affinity: assignedToAuthor ? 1 : 0,
1945
+ usage_affinity: params.usageAffinity?.[item.id]
1757
1946
  }
1758
1947
  };
1759
1948
  }
1760
- function buildItemContextRelevanceCandidates(items, statusRegistry, now, author) {
1949
+ function buildItemContextRelevanceCandidates(items, statusRegistry, now, author, usageAffinity) {
1761
1950
  const recencyOrder = [...items].sort((left, right) => compareTimestampStrings(sortableTimestamp(right.updated_at), sortableTimestamp(left.updated_at)) || left.id.localeCompare(right.id));
1762
1951
  const recencyRank = new Map(recencyOrder.map((item, index) => [item.id, index]));
1763
1952
  const recencyDenominator = Math.max(items.length - 1, 1);
@@ -1769,9 +1958,45 @@ function buildItemContextRelevanceCandidates(items, statusRegistry, now, author)
1769
1958
  normalizedAuthor,
1770
1959
  recencyRank,
1771
1960
  recencyDenominator,
1772
- itemCount: items.length
1961
+ itemCount: items.length,
1962
+ usageAffinity
1773
1963
  }));
1774
1964
  }
1965
+ function estimateJsonTokens2(value) {
1966
+ return Math.max(1, Math.ceil(Buffer.byteLength(JSON.stringify(value), "utf8") / 4));
1967
+ }
1968
+ function packRankedContextItems(report, tokenBudget, requiredIds = /* @__PURE__ */ new Set(), profile = "context") {
1969
+ return packContextCandidates(report.ranked.map((entry) => ({
1970
+ id: entry.id,
1971
+ item: entry.item,
1972
+ rank: entry.rank,
1973
+ score: entry.score,
1974
+ required: requiredIds.has(entry.id),
1975
+ cluster: entry.item.parent?.trim() || entry.item.type,
1976
+ token_costs: {
1977
+ identity: estimateJsonTokens2({ id: entry.id, title: entry.item.title }),
1978
+ summary: estimateJsonTokens2({
1979
+ id: entry.id,
1980
+ title: entry.item.title,
1981
+ type: entry.item.type,
1982
+ status: entry.item.status,
1983
+ priority: entry.item.priority,
1984
+ parent: entry.item.parent
1985
+ }),
1986
+ full: estimateJsonTokens2(entry.item)
1987
+ }
1988
+ })), { tokenBudget, profile, latencyBudgetMs: 25 });
1989
+ }
1990
+ function toContextPackingSummary(report) {
1991
+ return {
1992
+ ...report,
1993
+ included: report.included.map((entry) => ({
1994
+ id: entry.id,
1995
+ projection: entry.projection,
1996
+ tokens: entry.tokens
1997
+ }))
1998
+ };
1999
+ }
1775
2000
  function toContextRankingSummary(report) {
1776
2001
  return {
1777
2002
  model: report.model,
@@ -2380,22 +2605,35 @@ function resolveContextSubtreeIds(parentScope, fullCorpus) {
2380
2605
  }
2381
2606
  return subtree.ids;
2382
2607
  }
2383
- async function resolveContextFocusGroups(listedItemMetadata, allItems, statusRegistry, sectionsIncluded, limit, now, author, cursor, cursorFingerprint, useBoundedPage) {
2608
+ async function resolveContextFocusGroups(listedItemMetadata, allItems, statusRegistry, sectionsIncluded, limit, now, author, cursor, cursorFingerprint, useBoundedPage, pmRoot) {
2384
2609
  const structural = [...listedItemMetadata].sort((left, right) => compareCriticalItems(left, right, statusRegistry));
2385
- const ranking = await scoreContextCandidatesWithActiveExtensions("context", buildItemContextRelevanceCandidates(structural, statusRegistry, now, author));
2610
+ const usage = await readContextUsageAffinity({
2611
+ pmRoot,
2612
+ author,
2613
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
2614
+ });
2615
+ const ranking = await scoreContextCandidatesWithActiveExtensions("context", buildItemContextRelevanceCandidates(structural, statusRegistry, now, author, usage.affinity));
2386
2616
  const ranked = ranking.ranked.map((entry) => entry.item);
2387
2617
  const activeStatuses = statusRegistry.active_statuses;
2388
- const activeItems = ranked.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2389
- const pageStart = useBoundedPage ? resolveQueryCursorStart(activeItems, cursor, cursorFingerprint, (item) => item.id) : 0;
2390
- const focusPage = useBoundedPage ? activeItems.slice(pageStart, pageStart + limit) : activeItems;
2391
- const hasMore = useBoundedPage && focusPage.length > 0 && pageStart + focusPage.length < activeItems.length;
2618
+ const rankedActiveItems = ranked.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2619
+ const pageStart = useBoundedPage ? resolveQueryCursorStart(rankedActiveItems, cursor, cursorFingerprint, (item) => item.id) : 0;
2620
+ const focusPage = useBoundedPage ? rankedActiveItems.slice(pageStart, pageStart + limit) : rankedActiveItems;
2621
+ const hasMore = useBoundedPage && focusPage.length > 0 && pageStart + focusPage.length < rankedActiveItems.length;
2392
2622
  const nextCursor = hasMore && focusPage.length > 0 ? encodeQueryCursor(cursorFingerprint, focusPage[focusPage.length - 1].id, pageStart + focusPage.length - 1) : void 0;
2393
- const blockedItems = ranked.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2623
+ const rankedBlockedItems = ranked.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2624
+ const packingIds = /* @__PURE__ */ new Set([
2625
+ ...focusPage.map((item) => item.id),
2626
+ ...rankedBlockedItems.slice(0, limit).map((item) => item.id)
2627
+ ]);
2628
+ const packing = packRankedContextItems({ ...ranking, ranked: ranking.ranked.filter((entry) => packingIds.has(entry.id)) }, Math.max(256, limit * 160));
2629
+ const packedItems = packing.included.map((entry) => entry.item);
2630
+ const activeItems = packedItems.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2631
+ const blockedItems = packedItems.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
2394
2632
  const childrenByParent = buildChildrenByParent(allItems);
2395
2633
  const focusChildrenByParent = contextNeedsAllItems(sectionsIncluded) ? childrenByParent : void 0;
2396
- const highLevel = focusPage.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2397
- const lowLevel = focusPage.filter((item) => !HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2398
- const blockedFallbackUsed = activeItems.length === 0;
2634
+ const highLevel = activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2635
+ const lowLevel = activeItems.filter((item) => !HIGH_LEVEL_TYPES.has(item.type)).slice(0, useBoundedPage ? focusPage.length : limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
2636
+ const blockedFallbackUsed = rankedActiveItems.length === 0;
2399
2637
  return {
2400
2638
  activeItems,
2401
2639
  blockedItems,
@@ -2404,6 +2642,7 @@ async function resolveContextFocusGroups(listedItemMetadata, allItems, statusReg
2404
2642
  blockedFallback: blockedFallbackUsed ? blockedItems.slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent)) : [],
2405
2643
  blockedFallbackUsed,
2406
2644
  ranking,
2645
+ packing,
2407
2646
  pageExtras: {
2408
2647
  ...useBoundedPage ? { applied_limit: limit } : {},
2409
2648
  ...hasMore ? { has_more: true, truncated: true } : {},
@@ -2521,14 +2760,37 @@ function maybeAttachEmptyContextSuggestions(result, activeItems, blockedItems) {
2521
2760
  "pm aggregate for a full project status overview"
2522
2761
  ];
2523
2762
  }
2763
+ async function attachContextUsageFeedback(result, focusGroups, pmRoot, author) {
2764
+ try {
2765
+ const included = new Set(focusGroups.packing.included.map((entry) => entry.id));
2766
+ await recordContextUsageServing({
2767
+ pmRoot,
2768
+ author,
2769
+ surface: "context",
2770
+ profile: focusGroups.packing.profile,
2771
+ rows: focusGroups.ranking.ranked.map((entry) => ({
2772
+ id: entry.id,
2773
+ rank: entry.rank,
2774
+ included: included.has(entry.id)
2775
+ })),
2776
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
2777
+ });
2778
+ } catch {
2779
+ result.warnings = mergeSortedWarnings(result.warnings, [
2780
+ "context_usage_feedback_write_failed"
2781
+ ]);
2782
+ }
2783
+ }
2524
2784
  async function runContext(options, global2) {
2785
+ const pmRoot = resolvePmRoot(process.cwd(), global2.path);
2525
2786
  const resolvedRuntime = await resolveContextRuntime(options, global2);
2526
2787
  const corpus = await loadContextCorpus(options, global2, resolvedRuntime);
2527
2788
  const runtime = {
2528
2789
  ...resolvedRuntime,
2529
2790
  limit: resolveContextLimitAtScale(resolvedRuntime.limit, corpus.fullCorpus.length)
2530
2791
  };
2531
- 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));
2792
+ const author = process.env.PM_AUTHOR ?? runtime.settings.author_default;
2793
+ 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);
2532
2794
  const agendaContext = await buildContextAgenda(options, global2, runtime, corpus.subtreeIds);
2533
2795
  const warnings = mergeSortedWarnings(corpus.listed.warnings, agendaContext.agenda.warnings, focusGroups.ranking.warnings);
2534
2796
  const inProgressCount = countContextStatus(focusGroups.activeItems, normalizeStatusInput("in_progress", runtime.statusRegistry), runtime.statusRegistry);
@@ -2589,12 +2851,15 @@ async function runContext(options, global2) {
2589
2851
  ...focusGroups.pageExtras
2590
2852
  };
2591
2853
  attachOptionalContextSections(result, sections);
2592
- if (options.explainRanking === true)
2854
+ if (options.explainRanking === true) {
2593
2855
  result.ranking = toContextRankingSummary(focusGroups.ranking);
2856
+ result.packing = toContextPackingSummary(focusGroups.packing);
2857
+ }
2594
2858
  applyContextFocusProjection(result, runtime.focusFields);
2595
2859
  if (warnings.length > 0)
2596
2860
  result.warnings = warnings;
2597
2861
  maybeAttachEmptyContextSuggestions(result, focusGroups.activeItems, focusGroups.blockedItems);
2862
+ await attachContextUsageFeedback(result, focusGroups, pmRoot, author);
2598
2863
  return result;
2599
2864
  }
2600
2865
 
@@ -2602,7 +2867,7 @@ async function runContext(options, global2) {
2602
2867
  !(function() {
2603
2868
  try {
2604
2869
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
2605
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6f51d218-2e3d-5794-b264-be91d2e7e30e");
2870
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "09714dbd-c38d-58f3-bb28-ce6144e44f75");
2606
2871
  } catch (e2) {
2607
2872
  }
2608
2873
  })();
@@ -2770,6 +3035,54 @@ function buildNextTruncation(decisionCount, heldCount, limit) {
2770
3035
  }
2771
3036
  return Object.keys(truncation).length > 0 ? truncation : void 0;
2772
3037
  }
3038
+ async function attachNextUsageFeedback(params) {
3039
+ try {
3040
+ const included = new Set(params.packing.included.map((entry) => entry.id));
3041
+ await recordContextUsageServing({
3042
+ pmRoot: params.pmRoot,
3043
+ author: params.author,
3044
+ surface: "next",
3045
+ profile: params.packing.profile,
3046
+ rows: params.ranking.ranked.map((entry) => ({
3047
+ id: entry.id,
3048
+ rank: entry.rank,
3049
+ included: included.has(entry.id)
3050
+ })),
3051
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
3052
+ });
3053
+ } catch {
3054
+ params.result.warnings = [
3055
+ .../* @__PURE__ */ new Set([
3056
+ ...params.result.warnings ?? [],
3057
+ "context_usage_feedback_write_failed"
3058
+ ])
3059
+ ].sort((left, right) => left.localeCompare(right));
3060
+ }
3061
+ }
3062
+ async function finalizeNextResult(params) {
3063
+ const warnings = [
3064
+ .../* @__PURE__ */ new Set([
3065
+ ...params.candidatesWarnings ?? [],
3066
+ ...params.corpusWarnings ?? [],
3067
+ ...params.readyRanking.warnings ?? []
3068
+ ])
3069
+ ].sort((left, right) => left.localeCompare(right));
3070
+ if (warnings.length > 0)
3071
+ params.result.warnings = warnings;
3072
+ if (params.explainRanking) {
3073
+ params.result.ranking = toContextRankingSummary(params.readyRanking);
3074
+ params.result.packing = toContextPackingSummary(params.packing);
3075
+ }
3076
+ params.result.suggestions = buildNextSuggestions(params.recommended, params.blockedRows);
3077
+ await attachNextUsageFeedback({
3078
+ result: params.result,
3079
+ pmRoot: params.pmRoot,
3080
+ author: params.author,
3081
+ packing: params.packing,
3082
+ ranking: params.readyRanking
3083
+ });
3084
+ return params.result;
3085
+ }
2773
3086
  function filterCandidatesByParentScope(candidates, corpus, parentScope) {
2774
3087
  if (!parentScope) {
2775
3088
  return candidates;
@@ -2780,21 +3093,29 @@ function filterCandidatesByParentScope(candidates, corpus, parentScope) {
2780
3093
  }
2781
3094
  return candidates.filter((item) => subtree.ids.has(item.id.trim().toLowerCase()));
2782
3095
  }
2783
- async function rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, callerAuthor) {
3096
+ async function rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, callerAuthor, pmRoot, tokenBudget) {
2784
3097
  const concreteReady = rankedReady.filter((entry) => !hasCompletedDescendants(entry.item, childrenByParent));
2785
3098
  const structuralReady = concreteReady.length > 0 ? concreteReady : rankedReady;
2786
- const ranking = await scoreContextCandidatesWithActiveExtensions("next", buildItemContextRelevanceCandidates(structuralReady.map((entry) => entry.item), statusRegistry, now, callerAuthor ?? process.env.PM_AUTHOR));
3099
+ const usage = await readContextUsageAffinity({
3100
+ pmRoot,
3101
+ author: callerAuthor,
3102
+ enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1"
3103
+ });
3104
+ const ranking = await scoreContextCandidatesWithActiveExtensions("next", buildItemContextRelevanceCandidates(structuralReady.map((entry) => entry.item), statusRegistry, now, callerAuthor, usage.affinity));
3105
+ const packing = packRankedContextItems(ranking, tokenBudget, /* @__PURE__ */ new Set(), "next");
2787
3106
  const readyById = new Map(structuralReady.map((entry) => [entry.item.id, entry]));
2788
3107
  const projectedReady = ranking.ranked.map((entry) => readyById.get(entry.id)).filter((entry) => entry !== void 0);
2789
3108
  return {
2790
3109
  projectedReady,
2791
3110
  ranking,
2792
- completedContainer: concreteReady.length === 0
3111
+ completedContainer: concreteReady.length === 0,
3112
+ packing
2793
3113
  };
2794
3114
  }
2795
3115
  async function runNext(options, global2) {
2796
3116
  const pmRoot = resolvePmRoot(process.cwd(), global2.path);
2797
3117
  const settings = await readSettings(pmRoot);
3118
+ const callerAuthor = options.callerAuthor ?? process.env.PM_AUTHOR ?? settings.author_default;
2798
3119
  const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
2799
3120
  const now = nowIso();
2800
3121
  const limit = parseNextLimit(options.limit, "--limit", DEFAULT_NEXT_LIMIT);
@@ -2808,10 +3129,10 @@ async function runNext(options, global2) {
2808
3129
  const report = computeActionabilityReport(candidates, corpus, statusRegistry);
2809
3130
  const childrenByParent = buildChildrenByParent(corpus);
2810
3131
  const partitionedByDecision = partitionDecisionEntries(report.ready, options.includeDecisions === true);
2811
- const callerPartition = partitionCallerOwnedReady(partitionedByDecision.agent, settings.author_default, options.callerAuthor);
3132
+ const callerPartition = partitionCallerOwnedReady(partitionedByDecision.agent, settings.author_default, callerAuthor);
2812
3133
  const rankedReady = rankNextReadyEntries(callerPartition.available, childrenByParent, statusRegistry);
2813
3134
  const rankedBlocked = [...report.blocked].sort((left, right) => compareCriticalItems(left.item, right.item, statusRegistry));
2814
- const { projectedReady, ranking: readyRanking, completedContainer } = await rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, options.callerAuthor);
3135
+ const { projectedReady, ranking: readyRanking, completedContainer, packing: readyPacking } = await rankReadyEntriesWithRelevance(rankedReady, childrenByParent, statusRegistry, now, callerAuthor, pmRoot, Math.max(192, limit * 128));
2815
3136
  const readyRows = projectedReady.map((entry, index) => toNextActionableItem(entry, statusRegistry, childrenByParent, index + 1));
2816
3137
  const blockedRows = rankedBlocked.map((entry, index) => toNextActionableItem(entry, statusRegistry, childrenByParent, index + 1));
2817
3138
  const decisionRows = rankNextReadyEntries(partitionedByDecision.decisions, childrenByParent, statusRegistry).map((entry, index) => toNextActionableItem(entry, statusRegistry, childrenByParent, index + 1));
@@ -2857,19 +3178,18 @@ async function runNext(options, global2) {
2857
3178
  },
2858
3179
  truncation
2859
3180
  };
2860
- const warnings = [
2861
- .../* @__PURE__ */ new Set([
2862
- ...candidatesList.warnings ?? [],
2863
- ...corpusList.warnings ?? [],
2864
- ...readyRanking.warnings ?? []
2865
- ])
2866
- ].sort((a, b) => a.localeCompare(b));
2867
- if (warnings.length > 0)
2868
- result.warnings = warnings;
2869
- if (options.explainRanking === true)
2870
- result.ranking = toContextRankingSummary(readyRanking);
2871
- result.suggestions = buildNextSuggestions(recommended, blockedRows);
2872
- return result;
3181
+ return finalizeNextResult({
3182
+ result,
3183
+ recommended,
3184
+ blockedRows,
3185
+ candidatesWarnings: candidatesList.warnings,
3186
+ corpusWarnings: corpusList.warnings,
3187
+ readyRanking,
3188
+ explainRanking: options.explainRanking === true,
3189
+ pmRoot,
3190
+ author: callerAuthor,
3191
+ packing: readyPacking
3192
+ });
2873
3193
  }
2874
3194
  function renderNextMarkdown(result) {
2875
3195
  const lines = ["# pm next", "", ...renderNextSummaryLines(result)];
@@ -2957,6 +3277,8 @@ export {
2957
3277
  runContextEvaluationScenario,
2958
3278
  summarizeContextEvaluationReports,
2959
3279
  runContextEvaluationCorpus,
3280
+ CONTEXT_PACKING_PROFILES,
3281
+ packContextCandidates,
2960
3282
  CONTEXT_OUTPUT_VALUES,
2961
3283
  resolveContextOutputFormat,
2962
3284
  renderContextMarkdown,
@@ -2967,4 +3289,4 @@ export {
2967
3289
  runNext,
2968
3290
  renderNextMarkdown
2969
3291
  };
2970
- //# sourceMappingURL=chunk-LDO24J5I.js.map
3292
+ //# sourceMappingURL=chunk-LWTIRS3Y.js.map