@qwen-code/qwen-code 0.19.12-preview.0 → 0.20.0-nightly.20260720.0c271659d

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 (277) hide show
  1. package/bundled/qc-helper/docs/features/channels/overview.md +4 -2
  2. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  3. package/bundled/qc-helper/docs/qwen-serve.md +42 -5
  4. package/bundled/review/DESIGN.md +2 -2
  5. package/bundled/review/SKILL.md +13 -9
  6. package/chunks/{MaxSizedBox-3KIWAU6Z.js → MaxSizedBox-ED3QND6V.js} +30 -27
  7. package/chunks/{StandaloneSessionPicker-TF626NO7.js → StandaloneSessionPicker-NQVAOTKS.js} +50 -45
  8. package/chunks/{acpAgent-JDVJXVBO.js → acpAgent-HOBFF5B6.js} +353 -130
  9. package/chunks/{agent-BONWC4VY.js → agent-J7EPFLA6.js} +22 -22
  10. package/chunks/{agent-headless-H7HKMGLZ.js → agent-headless-RRG3JU7Q.js} +22 -22
  11. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-HVKLXOOU.js} +6 -5
  12. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  13. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  14. package/chunks/{bridge-ATN2TLWJ.js → bridge-OW5FZ6BF.js} +25 -25
  15. package/chunks/build-SSCNEHZZ.js +62 -0
  16. package/chunks/{channel-worker-group-S3H5QHTI.js → channel-worker-group-53CMOPFT.js} +4 -4
  17. package/chunks/{channel-worker-manager-ZJ4HTMO2.js → channel-worker-manager-UTXILKC2.js} +4 -4
  18. package/chunks/{channel-worker-supervisor-JA6VZ5V5.js → channel-worker-supervisor-ZGO2W2MD.js} +3 -3
  19. package/chunks/chunk-27AJEU6G.js +442 -0
  20. package/chunks/{chunk-53UMEONK.js → chunk-2HOVDT7W.js} +1 -1
  21. package/chunks/{chunk-6WZZHJSZ.js → chunk-2JOLZA6L.js} +5 -5
  22. package/chunks/{chunk-NSZJQACR.js → chunk-2TDSM7I6.js} +3 -3
  23. package/chunks/{chunk-ILQ42UG6.js → chunk-2YJLFCYI.js} +7 -7
  24. package/chunks/{chunk-CMHJEUVB.js → chunk-37MGCVTS.js} +1 -1
  25. package/chunks/{chunk-F2YCCUXI.js → chunk-3ML52IFS.js} +4 -4
  26. package/chunks/{chunk-3PE7OY2G.js → chunk-3QR5MOHP.js} +2 -2
  27. package/chunks/{chunk-4AGBO6RB.js → chunk-3SNKL6L6.js} +29 -13
  28. package/chunks/{chunk-OZWJAFFE.js → chunk-3ZL6YMO2.js} +3 -3
  29. package/chunks/chunk-43T5WDQ7.js +127 -0
  30. package/chunks/{chunk-E655RDRL.js → chunk-4ODB7WIB.js} +1 -1
  31. package/chunks/{chunk-66F4IJ4L.js → chunk-4UH63YE5.js} +5 -5
  32. package/chunks/{chunk-QGONRHUS.js → chunk-53OPIXUE.js} +3 -3
  33. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  34. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  35. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  36. package/chunks/{chunk-4W55BHOC.js → chunk-6HQW55TM.js} +29 -2
  37. package/chunks/{chunk-LODZMRXC.js → chunk-6MN6XJTR.js} +2379 -1291
  38. package/chunks/{chunk-EWPLL4OT.js → chunk-6VGRTGOG.js} +1 -1
  39. package/chunks/{chunk-R32BTEZY.js → chunk-7JQK6FXK.js} +198 -120
  40. package/chunks/{chunk-SMASS3CY.js → chunk-A4TJMY65.js} +1 -1
  41. package/chunks/{chunk-JUNVFQVY.js → chunk-AMRWCMX4.js} +4 -4
  42. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  43. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  44. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  45. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  46. package/chunks/{chunk-ZPVGEMVC.js → chunk-CL7IRYTA.js} +1 -1
  47. package/chunks/{chunk-DULSE2SH.js → chunk-COWNNAWJ.js} +1 -1
  48. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  49. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  50. package/chunks/{chunk-PTXVHS2O.js → chunk-DCCW7CRR.js} +6 -6
  51. package/chunks/chunk-DIKIJS6Z.js +114 -0
  52. package/chunks/{chunk-NVUGS23Y.js → chunk-DR5AUNJ2.js} +4 -4
  53. package/chunks/{chunk-7KS72E2N.js → chunk-DSBCU6JY.js} +3 -3
  54. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  55. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  56. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  57. package/chunks/{chunk-WHQNBBWW.js → chunk-FLSVD6BS.js} +2 -2
  58. package/chunks/{chunk-XACBIZJB.js → chunk-FODJ5Q5K.js} +3 -3
  59. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  60. package/chunks/{chunk-K7P34F2J.js → chunk-FWT66O5E.js} +2 -2
  61. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  62. package/chunks/{chunk-R4RIMOJL.js → chunk-G6MDKXDP.js} +12 -12
  63. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  64. package/chunks/chunk-GMGDLUC7.js +37 -0
  65. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  66. package/chunks/{chunk-7OZGMFHC.js → chunk-I4HZ4GOD.js} +8 -8
  67. package/chunks/{chunk-YN2I5I42.js → chunk-I6JUVU7J.js} +34 -24
  68. package/chunks/{chunk-LLIGYAQU.js → chunk-IDGTC5AS.js} +3 -3
  69. package/chunks/{chunk-LHEQDKAR.js → chunk-INL2RSLA.js} +1 -1
  70. package/chunks/{chunk-CXWUXRD5.js → chunk-INQQM52C.js} +18 -16
  71. package/chunks/{chunk-2DZ7E27L.js → chunk-JBCFW3IL.js} +2 -2
  72. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  73. package/chunks/{chunk-6TDA4EVC.js → chunk-JDPCOUZ3.js} +2282 -662
  74. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  75. package/chunks/{chunk-IKLWU6YS.js → chunk-JRJ2LV6P.js} +6 -226
  76. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  77. package/chunks/{chunk-HZXU6YZW.js → chunk-LTQ5C5AB.js} +4 -4
  78. package/chunks/{chunk-V4PCIS25.js → chunk-MAQQGNQ5.js} +44 -1
  79. package/chunks/{chunk-BEFQGC6H.js → chunk-NBMIC7DR.js} +2 -2
  80. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  81. package/chunks/{chunk-MHEZV3OY.js → chunk-NIJEXGV6.js} +250 -75
  82. package/chunks/{chunk-NGTQA57Y.js → chunk-NQVA6O7F.js} +2 -2
  83. package/chunks/{chunk-54KPEDM2.js → chunk-NT324EJ6.js} +13 -8
  84. package/chunks/{chunk-WTHRMVKB.js → chunk-O2SPEQFA.js} +5 -5
  85. package/chunks/{chunk-MCYZTKBV.js → chunk-OLMETXLX.js} +2 -2
  86. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  87. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  88. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  89. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  90. package/chunks/chunk-QKYTTBYW.js +624 -0
  91. package/chunks/{chunk-4OVECYBM.js → chunk-QOSKUG5P.js} +77 -20
  92. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  93. package/chunks/{chunk-Y5UDBQYF.js → chunk-RB7NXUP5.js} +3 -3
  94. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  95. package/chunks/{chunk-XFJU7SVP.js → chunk-RS5JPH6Y.js} +3 -3
  96. package/chunks/chunk-RS7MT2QG.js +305 -0
  97. package/chunks/{chunk-WACI4VES.js → chunk-SG2PEESS.js} +1106 -592
  98. package/chunks/{chunk-FEZXQXW2.js → chunk-SLLG5XXE.js} +1 -1
  99. package/chunks/{chunk-W4DFAUAO.js → chunk-SQMTULHJ.js} +1 -1
  100. package/chunks/{chunk-Z4ZCVYJ5.js → chunk-STFP7PJR.js} +6 -6
  101. package/chunks/chunk-SV5PQVQE.js +71 -0
  102. package/chunks/{chunk-7LMAKIWE.js → chunk-TFNZCC4B.js} +1 -1
  103. package/chunks/{chunk-ZFHHBRRA.js → chunk-THNJYTA6.js} +2 -2
  104. package/chunks/{chunk-6QGZVKOO.js → chunk-TN2BYMNH.js} +69 -2216
  105. package/chunks/{chunk-TFV3XVAZ.js → chunk-TQBA6DVX.js} +1 -1
  106. package/chunks/{chunk-AWOU24F6.js → chunk-U24E4R5U.js} +3 -3
  107. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  108. package/chunks/{chunk-DYUPBU7H.js → chunk-UGRL5B5F.js} +1 -1
  109. package/chunks/chunk-V7RNNPGC.js +44 -0
  110. package/chunks/{chunk-LYFDJTXE.js → chunk-VGFFYNBD.js} +1 -1
  111. package/chunks/chunk-VIOFKPPN.js +125 -0
  112. package/chunks/{chunk-BEZPRKD3.js → chunk-VLDBVLC4.js} +156 -2
  113. package/chunks/{chunk-HQ7MDVBO.js → chunk-VWLLDHAY.js} +6 -6
  114. package/chunks/chunk-WCDH2CRI.js +1187 -0
  115. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  116. package/chunks/{chunk-HVWPSGDY.js → chunk-Y2ENGUD6.js} +1 -1
  117. package/chunks/{chunk-PSISZNIT.js → chunk-Y5534U4G.js} +346 -122
  118. package/chunks/{chunk-IQRQVPGN.js → chunk-YDZ6J2BY.js} +72 -159
  119. package/chunks/{chunk-7O7WZH7N.js → chunk-YNBP3YSU.js} +7 -6
  120. package/chunks/{chunk-NJQPQ4IO.js → chunk-YWEW33JY.js} +7 -7
  121. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  122. package/chunks/{chunk-SNONG66P.js → chunk-ZGJ4LDD2.js} +53 -28
  123. package/chunks/{computer-use-UY4A72X7.js → computer-use-ET5476VX.js} +22 -22
  124. package/chunks/{config-utils-KWTRFP7D.js → config-utils-AHQ6YZ66.js} +3 -3
  125. package/chunks/{contextCommand-3DZ2SVH6.js → contextCommand-QIULFDBF.js} +25 -26
  126. package/chunks/{create-sub-session-OT7WXLDO.js → create-sub-session-BVL2ZHTM.js} +22 -22
  127. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  128. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  129. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  130. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  131. package/chunks/{daemon-ZW6LHOXT.js → daemon-EE5T3KOW.js} +169 -84
  132. package/chunks/{daemon-status-provider-GTZOYSBO.js → daemon-status-provider-L5UW7TGV.js} +29 -29
  133. package/chunks/{dist-RZBJT5O2.js → dist-2BHAYBKP.js} +1 -1
  134. package/chunks/{dist-O2IP3G5D.js → dist-2MIU4UUH.js} +1 -1
  135. package/chunks/{dist-HCUUS6IH.js → dist-53PZYC5B.js} +2 -2
  136. package/chunks/{dist-ZJHKKWUD.js → dist-AU7NQQRP.js} +1 -1
  137. package/chunks/{dist-YTPTCUAD.js → dist-FUTEXY6A.js} +1 -1
  138. package/chunks/{dist-Y54RURGT.js → dist-WGTQO7F2.js} +1 -1
  139. package/chunks/{earlyInputCapture-GGWVGBZ7.js → earlyInputCapture-ZLAL5GTE.js} +23 -23
  140. package/chunks/{edit-JN467GIR.js → edit-4ZOPT6OC.js} +23 -23
  141. package/chunks/{enter-worktree-MMO4VBQE.js → enter-worktree-DFP5CZYS.js} +22 -22
  142. package/chunks/{enterPlanMode-BRZOG4DB.js → enterPlanMode-7VEJ7A2A.js} +22 -22
  143. package/chunks/{environment-LOCDCWMZ.js → environment-KHS35XJY.js} +24 -24
  144. package/chunks/{errors-XXSL5HGG.js → errors-574WBU5R.js} +24 -24
  145. package/chunks/{exit-worktree-UD7PI5H5.js → exit-worktree-5Q7V6D4C.js} +22 -22
  146. package/chunks/{exitPlanMode-EIUETQI6.js → exitPlanMode-SX2F6PDJ.js} +22 -22
  147. package/chunks/{fast-path-ULGAEUVK.js → fast-path-G7BLOZVF.js} +2 -2
  148. package/chunks/{gemini-KW3APZ4P.js → gemini-M4JWSTGU.js} +70 -68
  149. package/chunks/{geminiContentGenerator-4BQ5QHPR.js → geminiContentGenerator-MKXLUFUH.js} +4 -4
  150. package/chunks/{glob-FPKAMR6B.js → glob-FPKZY5W6.js} +22 -22
  151. package/chunks/{grep-MOGRCYB4.js → grep-RS22OMZG.js} +22 -22
  152. package/chunks/{handleAutoUpdate-QUMRZZOS.js → handleAutoUpdate-RFNQ36JC.js} +27 -28
  153. package/chunks/{i18n-F3W6YUYP.js → i18n-MAEWSKYF.js} +23 -23
  154. package/chunks/{initializer-KLU2KAIZ.js → initializer-T2BFZJBP.js} +28 -28
  155. package/chunks/{installationInfo-P3ZP2SIZ.js → installationInfo-3UETF773.js} +25 -23
  156. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  157. package/chunks/{list-4X6D5JD2.js → list-FWZUKWD2.js} +30 -30
  158. package/chunks/{loadedSettingsAdapter-446B6WKA.js → loadedSettingsAdapter-3DUNHAPX.js} +27 -27
  159. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  160. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  161. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  162. package/chunks/{mcp-JYVOJZOD.js → mcp-POXS7QWD.js} +27 -27
  163. package/chunks/{monitor-KY7YH7TL.js → monitor-2ZZC2NKH.js} +22 -22
  164. package/chunks/nonInteractiveCli-WSJVCB2W.js +126 -0
  165. package/chunks/{notebook-edit-IHGW42QK.js → notebook-edit-BMQLME3Q.js} +23 -23
  166. package/chunks/{openaiContentGenerator-FURUCKQJ.js → openaiContentGenerator-GOREG72R.js} +11 -11
  167. package/chunks/{pidfile-WKUVXDMR.js → pidfile-MVZDE5TC.js} +23 -23
  168. package/chunks/{processUtils-LHSRN76X.js → processUtils-RH5KNLDH.js} +2 -2
  169. package/chunks/{qwenContentGenerator-NRLM7R36.js → qwenContentGenerator-R55BCLRI.js} +24 -24
  170. package/chunks/{qwenOAuth2-5FNX3AWH.js → qwenOAuth2-QZBI2SOZ.js} +11 -11
  171. package/chunks/react-SG7JAQSZ.js +8 -0
  172. package/chunks/{read-file-VLEAEXFP.js → read-file-CPS2CYYG.js} +8 -8
  173. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  174. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  175. package/chunks/resumeHistoryUtils-YD6DSYHU.js +78 -0
  176. package/chunks/{ripGrep-MT23EIDD.js → ripGrep-UKGJ7RHZ.js} +22 -22
  177. package/chunks/{run-qwen-serve-5HWOQFLI.js → run-qwen-serve-GFKSKLF6.js} +1442 -148
  178. package/chunks/{runtime-6IVKJSLW.js → runtime-4KGNL3TP.js} +31 -31
  179. package/chunks/{scheduler-63GJG75U.js → scheduler-GJ3CELWI.js} +22 -22
  180. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  181. package/chunks/{serve-3LL7RRDP.js → serve-UU6Z4C7W.js} +27 -27
  182. package/chunks/{server-AA24QLPA.js → server-RTJUMN24.js} +393 -256
  183. package/chunks/{session-LRVCFQQQ.js → session-EYD3CEB5.js} +79 -163
  184. package/chunks/{settings-ZX3OKUT4.js → settings-H5O22TGQ.js} +26 -26
  185. package/chunks/{shell-KR3IMYH6.js → shell-KVNHDHMT.js} +22 -22
  186. package/chunks/{skill-QLM2LSF7.js → skill-32525KCE.js} +10 -10
  187. package/chunks/{spawnChannel-6WFOK3SA.js → spawnChannel-G7DUQKHL.js} +24 -24
  188. package/chunks/{src-ADLNIPHD.js → src-DUFUUEHE.js} +52 -22
  189. package/chunks/{standalone-update-C54OTJWJ.js → standalone-update-UC6CWBLH.js} +24 -24
  190. package/chunks/{startInteractiveUI-KFAOS6HC.js → startInteractiveUI-A5YYAWLF.js} +5455 -2041
  191. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  192. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  193. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  194. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  195. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  196. package/chunks/{team-create-Q5B5M7UD.js → team-create-LS2Q32Y4.js} +22 -22
  197. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  198. package/chunks/{team-plan-approval-J55PXNY2.js → team-plan-approval-DWCZABX6.js} +22 -22
  199. package/chunks/{theme-manager-QWTDRPHV.js → theme-manager-E22CNBIL.js} +23 -23
  200. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  201. package/chunks/{tool-search-LSSKWZKH.js → tool-search-MHXUDFD2.js} +9 -9
  202. package/chunks/{total-session-admission-S6ATY5HY.js → total-session-admission-KOPTGDJZ.js} +25 -25
  203. package/chunks/{trustedFolders-CY4TUPDJ.js → trustedFolders-ANQXYAQT.js} +23 -23
  204. package/chunks/{update-relaunch-IOKOUV3K.js → update-relaunch-HFGRB7PE.js} +9 -9
  205. package/chunks/{updateCheck-YNRFE4V7.js → updateCheck-EKIPND4B.js} +33 -26
  206. package/chunks/useAutoAcceptIndicator-EE22V2F5.js +80 -0
  207. package/chunks/{validateNonInterActiveAuth-OXTECS4B.js → validateNonInterActiveAuth-RUICXVPH.js} +61 -63
  208. package/chunks/{version-2CZQQDL5.js → version-QLT755OV.js} +1 -1
  209. package/chunks/{web-fetch-7QTEGJI5.js → web-fetch-DINW4Z65.js} +10 -10
  210. package/chunks/{workflow-G3CZU256.js → workflow-GPMXRWKK.js} +23 -23
  211. package/chunks/{workspace-providers-status-UHQOIPAZ.js → workspace-providers-status-XCQKBVSX.js} +30 -30
  212. package/chunks/{workspace-registration-store-5WPCMX4F.js → workspace-registration-store-4I4KL7TN.js} +1 -1
  213. package/chunks/{workspace-registry-LAQCRQTH.js → workspace-registry-N4J57SFQ.js} +25 -25
  214. package/chunks/{workspace-service-6ZEUJY2Z.js → workspace-service-JJNJWVH3.js} +32 -32
  215. package/chunks/{workspace-skills-status-YG6OITSM.js → workspace-skills-status-CEHLAQ2Y.js} +28 -28
  216. package/chunks/{write-file-E7T3PU3B.js → write-file-XRGEJRCC.js} +23 -23
  217. package/cli.js +11 -11
  218. package/package.json +3 -3
  219. package/web-shell/assets/{arc-_dVIKMdB.js → arc-DwJhljn9.js} +1 -1
  220. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-qdxSRav-.js} +1 -1
  221. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-2-dKM5aM.js} +1 -1
  222. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-Dt_Nu2HD.js} +1 -1
  223. package/web-shell/assets/channel-C6uyh95L.js +1 -0
  224. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-CBCeeNfD.js} +1 -1
  225. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-DPAzjqNs.js} +1 -1
  226. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-yrqyxvIK.js} +1 -1
  227. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-DguD_BBT.js} +1 -1
  228. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-KRUOG9v0.js} +1 -1
  229. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-C0lilT2U.js} +1 -1
  230. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-DG9epIWK.js} +1 -1
  231. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-PdJDkYHw.js} +1 -1
  232. package/web-shell/assets/classDiagram-4FO5ZUOK-Cv8Ulf-B.js +1 -0
  233. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cv8Ulf-B.js +1 -0
  234. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-BAOPPuJm.js} +1 -1
  235. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-CDHJv82_.js} +1 -1
  236. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-C_hkG5fN.js} +1 -1
  237. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-e9zo_eKt.js} +1 -1
  238. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-BFN41SCb.js} +1 -1
  239. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DG72N0W0.js} +1 -1
  240. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Dkmp-tdv.js} +1 -1
  241. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-CyS0GnQV.js} +1 -1
  242. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cg1SRmzV.js} +1 -1
  243. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-CoNkSLs3.js} +1 -1
  244. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-DEA6GWPa.js} +1 -1
  245. package/web-shell/assets/index-B49xd8_A.css +5 -0
  246. package/web-shell/assets/{index-CdC3pjP3.js → index-CMaZgs6B.js} +1 -1
  247. package/web-shell/assets/index-D-cDAZgO.js +1192 -0
  248. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-BZshyoGT.js} +1 -1
  249. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-CT2ssZqC.js} +1 -1
  250. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-BtMQ0rDG.js} +1 -1
  251. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-CoDbK5Db.js} +1 -1
  252. package/web-shell/assets/{linear-uIroDsmp.js → linear-CwhZ6u7u.js} +1 -1
  253. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-C9nn0nrr.js} +5 -5
  254. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-BXUbjTeL.js} +1 -1
  255. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-JddiYlWQ.js} +1 -1
  256. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-DK5HKzXO.js} +1 -1
  257. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-Y-uipa_6.js} +1 -1
  258. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-BbWeqo8H.js} +1 -1
  259. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-tX2gOoo5.js} +1 -1
  260. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-CACN457G.js} +1 -1
  261. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DaUeO2zt.js +1 -0
  262. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-DnHWKSOq.js} +1 -1
  263. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BO8Yl2FG.js} +1 -1
  264. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-1NMqqrBi.js} +1 -1
  265. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-C3eWgIvD.js} +1 -1
  266. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-D0h8FgFX.js} +1 -1
  267. package/web-shell/index.html +2 -2
  268. package/chunks/chunk-675SVDMD.js +0 -3288
  269. package/chunks/chunk-CHVH4DVN.js +0 -368
  270. package/chunks/chunk-JCYMQU5F.js +0 -709
  271. package/chunks/nonInteractiveCli-EK35TLVJ.js +0 -129
  272. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  273. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  274. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  275. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  276. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  277. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DrfFMYta.js +0 -1
@@ -2,14 +2,16 @@
2
2
  "use strict";
3
3
  import {
4
4
  listCommand
5
- } from "./chunk-NVUGS23Y.js";
5
+ } from "./chunk-DR5AUNJ2.js";
6
6
  import {
7
7
  ObservedChannelContactStore
8
- } from "./chunk-QSG4ZFG4.js";
8
+ } from "./chunk-KTUQMDEP.js";
9
+ import {
10
+ escapeAnsiCtrlCodes
11
+ } from "./chunk-RS7MT2QG.js";
9
12
  import {
10
- escapeAnsiCtrlCodes,
11
13
  stringWidth
12
- } from "./chunk-J6NT5YTN.js";
14
+ } from "./chunk-H2XVO6NE.js";
13
15
  import {
14
16
  require_undici
15
17
  } from "./chunk-L573Z2QZ.js";
@@ -18,18 +20,18 @@ import {
18
20
  } from "./chunk-RXFQM6FQ.js";
19
21
  import {
20
22
  serveCommand
21
- } from "./chunk-OZWJAFFE.js";
23
+ } from "./chunk-3ZL6YMO2.js";
22
24
  import {
23
25
  getErrorMessage as getErrorMessage2
24
- } from "./chunk-LLIGYAQU.js";
26
+ } from "./chunk-IDGTC5AS.js";
25
27
  import {
26
28
  collectProviderModelsForProtocol,
27
29
  getAuthTypeFromEnv,
28
30
  resolveCliGenerationConfig
29
- } from "./chunk-2DZ7E27L.js";
31
+ } from "./chunk-JBCFW3IL.js";
30
32
  import {
31
33
  resolvePath
32
- } from "./chunk-F2RR4HO2.js";
34
+ } from "./chunk-BVLROR2T.js";
33
35
  import {
34
36
  channelLoopPath,
35
37
  createChannel,
@@ -43,17 +45,17 @@ import {
43
45
  registerToolCallDispatch,
44
46
  selectFirstModel,
45
47
  sessionsPath
46
- } from "./chunk-HQ7MDVBO.js";
48
+ } from "./chunk-VWLLDHAY.js";
47
49
  import {
48
50
  getExtensionManager,
49
51
  requestChoicePluginNonInteractive,
50
52
  requestConsentNonInteractive,
51
53
  requestConsentOrFail,
52
54
  resolveExtensionCommandScope
53
- } from "./chunk-HZXU6YZW.js";
55
+ } from "./chunk-LTQ5C5AB.js";
54
56
  import {
55
57
  parseChannelConfig
56
- } from "./chunk-NJQPQ4IO.js";
58
+ } from "./chunk-YWEW33JY.js";
57
59
  import {
58
60
  findCliEntryPath
59
61
  } from "./chunk-V6WHFGST.js";
@@ -75,7 +77,7 @@ import {
75
77
  isChannelWebhookTaskMessage,
76
78
  normalizeWorkerDiagnostic,
77
79
  sanitizeWorkerDiagnostic
78
- } from "./chunk-HVWPSGDY.js";
80
+ } from "./chunk-Y2ENGUD6.js";
79
81
  import {
80
82
  normalizeServeChannelSelection
81
83
  } from "./chunk-TJTKSVIV.js";
@@ -88,14 +90,14 @@ import {
88
90
  signalService,
89
91
  waitForExit,
90
92
  writeServiceInfo
91
- } from "./chunk-HCCR43AY.js";
93
+ } from "./chunk-RFIAR4YL.js";
92
94
  import {
93
95
  DEFAULT_BASE_URL,
94
96
  buildHeaders,
95
97
  clearAccount,
96
98
  loadAccount,
97
99
  saveAccount
98
- } from "./chunk-53UMEONK.js";
100
+ } from "./chunk-2HOVDT7W.js";
99
101
  import {
100
102
  AcpBridge,
101
103
  ChannelLoopScheduler,
@@ -105,34 +107,34 @@ import {
105
107
  SessionRouter,
106
108
  sanitizeLogText,
107
109
  sanitizePromptText
108
- } from "./chunk-MHEZV3OY.js";
110
+ } from "./chunk-NIJEXGV6.js";
109
111
  import {
110
112
  assembleMcpServers,
111
113
  getPendingGatedMcpServers,
112
114
  mcpCommand
113
- } from "./chunk-PTXVHS2O.js";
115
+ } from "./chunk-DCCW7CRR.js";
114
116
  import {
115
117
  loadSettings
116
- } from "./chunk-ILQ42UG6.js";
118
+ } from "./chunk-2YJLFCYI.js";
117
119
  import {
118
120
  detectSystemLanguage,
119
121
  getCurrentLanguage,
120
122
  initializeI18n,
121
123
  resolveLanguageSetting,
122
124
  t
123
- } from "./chunk-3PE7OY2G.js";
125
+ } from "./chunk-3QR5MOHP.js";
124
126
  import {
125
127
  loadEnvironment
126
- } from "./chunk-NGTQA57Y.js";
128
+ } from "./chunk-NQVA6O7F.js";
127
129
  import {
128
130
  getCliVersion
129
- } from "./chunk-W4DFAUAO.js";
131
+ } from "./chunk-SQMTULHJ.js";
130
132
  import {
131
133
  getPackageJson
132
134
  } from "./chunk-VJNBRRZG.js";
133
135
  import {
134
136
  isWorkspaceTrusted
135
- } from "./chunk-XFJU7SVP.js";
137
+ } from "./chunk-RS5JPH6Y.js";
136
138
  import {
137
139
  require_strip_json_comments
138
140
  } from "./chunk-ALGGS7UH.js";
@@ -156,6 +158,7 @@ import {
156
158
  addChannelMemoryEntries,
157
159
  checkForExtensionUpdate,
158
160
  clearChannelMemory,
161
+ getChannelMemoryRevision,
159
162
  getScopedEnvContents,
160
163
  ideContextStore,
161
164
  isBareMode,
@@ -175,7 +178,7 @@ import {
175
178
  unquoteCStylePath,
176
179
  updateChannelMemoryEntry,
177
180
  updateSetting
178
- } from "./chunk-6TDA4EVC.js";
181
+ } from "./chunk-JDPCOUZ3.js";
179
182
  import {
180
183
  nextFireTime,
181
184
  parseCron
@@ -185,14 +188,14 @@ import {
185
188
  getAllGeminiMdFilenames,
186
189
  resolveTelemetrySettings,
187
190
  setGeminiMdFilename
188
- } from "./chunk-YN2I5I42.js";
191
+ } from "./chunk-I6JUVU7J.js";
189
192
  import {
190
193
  SchemaValidator,
191
194
  ToolNames
192
- } from "./chunk-ANRANWVE.js";
195
+ } from "./chunk-OP4MOGXF.js";
193
196
  import {
194
197
  isTlsVerificationDisabled
195
- } from "./chunk-4CHDYDG3.js";
198
+ } from "./chunk-6EFTQYW7.js";
196
199
  import {
197
200
  FatalConfigError,
198
201
  FatalSandboxError,
@@ -200,7 +203,7 @@ import {
200
203
  createDebugLogger,
201
204
  getErrorMessage,
202
205
  isNodeError
203
- } from "./chunk-UE5TZ55T.js";
206
+ } from "./chunk-C27BYUX6.js";
204
207
  import {
205
208
  init_esbuild_shims
206
209
  } from "./chunk-5O2XNYP6.js";
@@ -1920,6 +1923,7 @@ function channelMemoryOptions(getBridge, cwd) {
1920
1923
  return {
1921
1924
  channelMemory: {
1922
1925
  readChannelMemory,
1926
+ getChannelMemoryRevision,
1923
1927
  listChannelMemoryEntries,
1924
1928
  addChannelMemoryEntries,
1925
1929
  updateChannelMemoryEntry,
@@ -2364,7 +2368,7 @@ var stopCommand = {
2364
2368
  if (argv["daemon-url"]) {
2365
2369
  const token = argv.token ?? process.env[QWEN_SERVER_TOKEN_ENV] ?? process.env[QWEN_DAEMON_TOKEN_ENV];
2366
2370
  try {
2367
- const sdk = await import("./daemon-ZW6LHOXT.js");
2371
+ const sdk = await import("./daemon-EE5T3KOW.js");
2368
2372
  const client = new sdk.DaemonClient({
2369
2373
  baseUrl: argv["daemon-url"],
2370
2374
  ...token ? { token } : {}
@@ -2550,7 +2554,7 @@ var statusCommand = {
2550
2554
  if (argv["daemon-url"]) {
2551
2555
  const token = argv.token ?? process.env[QWEN_SERVER_TOKEN_ENV] ?? process.env[QWEN_DAEMON_TOKEN_ENV];
2552
2556
  try {
2553
- const sdk = await import("./daemon-ZW6LHOXT.js");
2557
+ const sdk = await import("./daemon-EE5T3KOW.js");
2554
2558
  const client = new sdk.DaemonClient({
2555
2559
  baseUrl: argv["daemon-url"],
2556
2560
  ...token ? { token } : {}
@@ -2661,7 +2665,7 @@ var reloadCommand = {
2661
2665
  const token = resolveToken(argv.token);
2662
2666
  let sdk;
2663
2667
  try {
2664
- sdk = await import("./daemon-ZW6LHOXT.js");
2668
+ sdk = await import("./daemon-EE5T3KOW.js");
2665
2669
  } catch (err) {
2666
2670
  writeStderrLine(
2667
2671
  `[Channel] Failed to load daemon SDK: ${safeChannelCommandErrorMessage(err)}`
@@ -2741,7 +2745,7 @@ var setCommand2 = {
2741
2745
  const selection = names[0] === "all" ? { mode: "all" } : { mode: "names", names };
2742
2746
  let sdk;
2743
2747
  try {
2744
- sdk = await import("./daemon-ZW6LHOXT.js");
2748
+ sdk = await import("./daemon-EE5T3KOW.js");
2745
2749
  } catch (error) {
2746
2750
  writeStderrLine(
2747
2751
  `[Channel] Failed to load daemon SDK: ${safeChannelCommandErrorMessage(error)}`
@@ -2864,7 +2868,7 @@ function createDaemonChannelBridgeFacade(bridge, opts) {
2864
2868
  }
2865
2869
  __name(createDaemonChannelBridgeFacade, "createDaemonChannelBridgeFacade");
2866
2870
  async function loadDaemonSdk() {
2867
- return await import("./daemon-ZW6LHOXT.js");
2871
+ return await import("./daemon-EE5T3KOW.js");
2868
2872
  }
2869
2873
  __name(loadDaemonSdk, "loadDaemonSdk");
2870
2874
  function selectedChannelNames(channelsConfig, selection) {
@@ -3086,6 +3090,7 @@ async function runChannelDaemonWorker(opts) {
3086
3090
  router: createdRouter,
3087
3091
  channelMemory: {
3088
3092
  readChannelMemory,
3093
+ getChannelMemoryRevision,
3089
3094
  listChannelMemoryEntries,
3090
3095
  addChannelMemoryEntries,
3091
3096
  updateChannelMemoryEntry,
@@ -3527,6 +3532,11 @@ __name(classifyWebhookTaskValidationError, "classifyWebhookTaskValidationError")
3527
3532
 
3528
3533
  // packages/cli/src/commands/channel/pairing.ts
3529
3534
  init_esbuild_shims();
3535
+ var cwdOption = {
3536
+ type: "string",
3537
+ describe: "Workspace directory the channel runs in (defaults to the current directory)",
3538
+ default: "."
3539
+ };
3530
3540
  var pairingListCommand = {
3531
3541
  command: "list <name>",
3532
3542
  describe: "List pending pairing requests for a channel",
@@ -3534,12 +3544,14 @@ var pairingListCommand = {
3534
3544
  type: "string",
3535
3545
  describe: "Channel name",
3536
3546
  demandOption: true
3537
- }), "builder"),
3547
+ }).option("cwd", cwdOption), "builder"),
3538
3548
  handler: /* @__PURE__ */ __name((argv) => {
3539
- const store = new PairingStore(argv.name);
3549
+ const store = new PairingStore(argv.name, argv.cwd);
3540
3550
  const pending = store.listPending();
3541
3551
  if (pending.length === 0) {
3542
- writeStdoutLine("No pending pairing requests.");
3552
+ writeStdoutLine(
3553
+ "No pending pairing requests in this workspace (pass --cwd <dir> if the channel runs elsewhere)."
3554
+ );
3543
3555
  return;
3544
3556
  }
3545
3557
  writeStdoutLine(`Pending pairing requests for "${argv.name}":
@@ -3563,15 +3575,16 @@ var pairingApproveCommand = {
3563
3575
  type: "string",
3564
3576
  describe: "Pairing code",
3565
3577
  demandOption: true
3566
- }), "builder"),
3578
+ }).option("cwd", cwdOption), "builder"),
3567
3579
  handler: /* @__PURE__ */ __name((argv) => {
3568
- const store = new PairingStore(argv.name);
3580
+ const store = new PairingStore(argv.name, argv.cwd);
3569
3581
  const request = store.approve(argv.code);
3570
3582
  if (!request) {
3571
3583
  writeStderrLine(
3572
- `No pending request found for code "${argv.code.toUpperCase()}". It may have expired.`
3584
+ `No pending request found for code "${argv.code.toUpperCase()}" in this workspace. It may have expired, or the channel may run in a different workspace (pass --cwd <dir>).`
3573
3585
  );
3574
3586
  process.exit(1);
3587
+ return;
3575
3588
  }
3576
3589
  writeStdoutLine(
3577
3590
  `Approved: ${request.senderName} (${request.senderId}) can now use channel "${argv.name}".`
@@ -5157,6 +5170,11 @@ function coverageFromTranscripts(planPath, env = process.env) {
5157
5170
  const idleAgents = [];
5158
5171
  const unopenedAgents = [];
5159
5172
  const rewrittenPrompts = [];
5173
+ const disclosures = [];
5174
+ const disclose = /* @__PURE__ */ __name((subject, reason) => {
5175
+ disclosures.push({ subject, reason });
5176
+ return `${subject} \u2014 ${reason}`;
5177
+ }, "disclose");
5160
5178
  const covered = /* @__PURE__ */ new Set();
5161
5179
  const uncoverable = /* @__PURE__ */ new Set();
5162
5180
  const rosterForRun = requiredAgents(plan);
@@ -5207,14 +5225,20 @@ function coverageFromTranscripts(planPath, env = process.env) {
5207
5225
  rewrittenThisRecord = true;
5208
5226
  if (!nothingBuiltAtAll && !superseded(rec, chunk)) {
5209
5227
  rewrittenPrompts.push(
5210
- `${name} \u2014 ran on a prompt the run wrote itself (none was built for this chunk), so the brief with its method and rules never reached it`
5228
+ disclose(
5229
+ name,
5230
+ "ran on a prompt the run wrote itself (none was built for this chunk), so the brief with its method and rules never reached it"
5231
+ )
5211
5232
  );
5212
5233
  }
5213
5234
  } else if (!wasDeliveredVerbatim(rec.launchPrompt, b)) {
5214
5235
  rewrittenThisRecord = true;
5215
5236
  if (!superseded(rec, chunk)) {
5216
5237
  rewrittenPrompts.push(
5217
- `${name} \u2014 launched with a prompt that is not the one the CLI built`
5238
+ disclose(
5239
+ name,
5240
+ "launched with a prompt that is not the one the CLI built"
5241
+ )
5218
5242
  );
5219
5243
  }
5220
5244
  }
@@ -5248,7 +5272,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5248
5272
  const nobodyBuiltAnything = roster.length > 1 && briefless.length === roster.length;
5249
5273
  if (nobodyBuiltAnything) {
5250
5274
  missingRoles.push(
5251
- `every dimension \u2014 none of the ${roster.length} required agents is on record as launched with a prompt this skill built, so this diff was reviewed, if at all, from prompts the run wrote for itself: no record shows the severity bar, the finding format or this project's own rules reaching an agent`
5275
+ disclose(
5276
+ "every dimension",
5277
+ `none of the ${roster.length} required agents is on record as launched with a prompt this skill built, so this diff was reviewed, if at all, from prompts the run wrote for itself: no record shows the severity bar, the finding format or this project's own rules reaching an agent`
5278
+ )
5252
5279
  );
5253
5280
  }
5254
5281
  const buildable = roster.filter((r) => builtOf(r.key) !== void 0);
@@ -5292,7 +5319,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5292
5319
  if (b === void 0) {
5293
5320
  if (!nobodyBuiltAnything) {
5294
5321
  missingRoles.push(
5295
- `${roleLabel(req)} \u2014 no record shows its brief reaching an agent, so this dimension was reviewed, if at all, from a prompt the run wrote for itself`
5322
+ disclose(
5323
+ roleLabel(req),
5324
+ "no record shows its brief reaching an agent, so this dimension was reviewed, if at all, from a prompt the run wrote for itself"
5325
+ )
5296
5326
  );
5297
5327
  }
5298
5328
  missingRoleSelectors.push(selectorOf(req));
@@ -5303,7 +5333,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5303
5333
  if (pick2 === void 0) {
5304
5334
  const anyMatch = candidatesOf[buildableIdx].length > 0;
5305
5335
  missingRoles.push(
5306
- anyMatch ? `${roleLabel(req)} \u2014 its prompt reached only an agent already credited with another block; one agent was given several blocks, and one transcript cannot certify two dimensions` : `${roleLabel(req)} \u2014 its prompt was built, but no agent on record was launched with it`
5336
+ disclose(
5337
+ roleLabel(req),
5338
+ anyMatch ? "its prompt reached only an agent already credited with another block; one agent was given several blocks, and one transcript cannot certify two dimensions" : "its prompt was built, but no agent on record was launched with it"
5339
+ )
5307
5340
  );
5308
5341
  missingRoleSelectors.push(selectorOf(req));
5309
5342
  continue;
@@ -5314,7 +5347,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5314
5347
  );
5315
5348
  if (!opened) {
5316
5349
  unreadBriefs.push(
5317
- `${roleLabel(req)} \u2014 never opened its brief (${brief}), so it reviewed without the instructions it was launched to follow`
5350
+ disclose(
5351
+ roleLabel(req),
5352
+ `never opened its brief (${brief}), so it reviewed without the instructions it was launched to follow`
5353
+ )
5318
5354
  );
5319
5355
  }
5320
5356
  }
@@ -5334,6 +5370,7 @@ function coverageFromTranscripts(planPath, env = process.env) {
5334
5370
  rewrittenPrompts,
5335
5371
  missingRoles,
5336
5372
  missingRoleSelectors,
5373
+ disclosures,
5337
5374
  unreadBriefs,
5338
5375
  missingChunks,
5339
5376
  uncoverableChunks: [...uncoverable].sort((a, b) => a - b),
@@ -5341,7 +5378,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5341
5378
  };
5342
5379
  }
5343
5380
  __name(coverageFromTranscripts, "coverageFromTranscripts");
5344
- var rebuildFix = /* @__PURE__ */ __name((role, noun) => `build the prompt with \`"\${QWEN_CODE_CLI:-qwen}" review agent-prompt --plan <plan> --role ${role} --findings <file> [--rules <rules file>]\` ` + (role === "reverse-audit" ? `(an early round with nothing confirmed passes an empty file; ` : `(pass the shard's findings, never an empty file \u2014 a verifier that sees no findings verifies nothing; `) + `pass --rules whenever the review loaded any, or the rebuilt brief silently drops the project rules) and launch an agent with EXACTLY what it prints \u2014 no ${noun} number, no summary of your own, no rewording`, "rebuildFix");
5381
+ var rebuildFix = /* @__PURE__ */ __name((role, noun) => `build the prompt with \`"\${QWEN_CODE_CLI:-qwen}" review agent-prompt --plan <plan> --role ${role} --findings <file> [--rules <rules file>] [--round <k>]\` ` + (role === "reverse-audit" ? `(an early round with nothing confirmed passes an empty file; ` : `(pass the shard's findings, never an empty file \u2014 a verifier that sees no findings verifies nothing; `) + `pass --rules whenever the review loaded any, or the rebuilt brief silently drops the project rules) and launch an agent with EXACTLY what it prints \u2014 no hand-added ${noun} number` + // --round bakes in a ROUND number. Verify's noun is "shard", and a
5382
+ // parenthetical claiming --round bakes it in would send the reader to the
5383
+ // wrong flag — shards are already told apart by their findings digest.
5384
+ (role === "reverse-audit" ? ` (--round bakes it in)` : ``) + `, no summary of your own, no rewording`, "rebuildFix");
5345
5385
  var REVERSE_AUDIT_GAP = {
5346
5386
  // Not "no auditor ran": a run that skipped the builder and hand-wrote the
5347
5387
  // launch leaves no brief file to open, so this shape is reached before the
@@ -5435,12 +5475,14 @@ function verificationGaps(planPath, opts, env = process.env) {
5435
5475
  )}`
5436
5476
  );
5437
5477
  }
5478
+ let unverifiedFindings = false;
5438
5479
  if (opts.postsFindings) {
5439
5480
  const verifyKeys = [...built.keys()].filter(
5440
5481
  (k) => k === "verify" || k.startsWith("verify--")
5441
5482
  );
5442
5483
  const verify = bestDelivery(verifyKeys);
5443
5484
  if (verify !== "ok") {
5485
+ unverifiedFindings = true;
5444
5486
  gaps.push(`verification \u2014 ${VERIFY_GAP[verify].gap}`);
5445
5487
  remediation.push(
5446
5488
  `verification: ${VERIFY_GAP[verify].fix.replace(
@@ -5452,14 +5494,44 @@ function verificationGaps(planPath, opts, env = process.env) {
5452
5494
  );
5453
5495
  }
5454
5496
  }
5455
- return { ok: gaps.length === 0, gaps, remediation };
5497
+ return { ok: gaps.length === 0, gaps, remediation, unverifiedFindings };
5456
5498
  }
5457
5499
  __name(verificationGaps, "verificationGaps");
5458
5500
 
5501
+ // packages/cli/src/commands/review/lib/inline-counts.ts
5502
+ init_esbuild_shims();
5503
+ var CRITICAL_PREFIX = "**[Critical]**";
5504
+ var SUGGESTION_PREFIX = "**[Suggestion]**";
5505
+ function severityOf(c) {
5506
+ const body = typeof c?.body === "string" ? c.body.trimStart() : "";
5507
+ if (body.startsWith(CRITICAL_PREFIX)) return "critical";
5508
+ if (body.startsWith(SUGGESTION_PREFIX)) return "suggestion";
5509
+ return null;
5510
+ }
5511
+ __name(severityOf, "severityOf");
5512
+ function countInlineFindings(comments) {
5513
+ let criticalsInline = 0;
5514
+ let suggestionsInline = 0;
5515
+ for (const c of comments) {
5516
+ const severity = severityOf(c);
5517
+ if (severity === "critical") criticalsInline++;
5518
+ else if (severity === "suggestion") suggestionsInline++;
5519
+ }
5520
+ return { criticalsInline, suggestionsInline };
5521
+ }
5522
+ __name(countInlineFindings, "countInlineFindings");
5523
+ function unmarkedComments(comments) {
5524
+ const out = [];
5525
+ comments.forEach((c, i) => {
5526
+ if (severityOf(c) === null) out.push(i);
5527
+ });
5528
+ return out;
5529
+ }
5530
+ __name(unmarkedComments, "unmarkedComments");
5531
+
5459
5532
  // packages/cli/src/commands/review/compose-review.ts
5460
- var CRITICAL_MARKER = "**[Critical]**";
5461
5533
  function withMarker(line) {
5462
- return line.startsWith(CRITICAL_MARKER) ? line : `${CRITICAL_MARKER} ${line}`;
5534
+ return line.startsWith(CRITICAL_PREFIX) ? line : `${CRITICAL_PREFIX} ${line}`;
5463
5535
  }
5464
5536
  __name(withMarker, "withMarker");
5465
5537
  function toCount(value, field) {
@@ -5515,13 +5587,21 @@ function composeReview(input) {
5515
5587
  input.unreviewedDimensions,
5516
5588
  "unreviewedDimensions"
5517
5589
  );
5590
+ const coverageEntries = [];
5518
5591
  const remediation = [];
5519
5592
  const planRef = input.planPath ? shellQuotePath(input.planPath) : "<plan>";
5520
5593
  const missingReceipts = [];
5594
+ const nonDeterministicBodyCriticals = bodyCriticals.filter(
5595
+ (x) => !/\[(?:build|test)\]/i.test(x)
5596
+ ).length;
5597
+ const criticalsNeedingVerify = criticalsInline + nonDeterministicBodyCriticals;
5598
+ let criticalsUnverified = false;
5521
5599
  if (!input.planPath) {
5522
- unreviewed.push(
5523
- "coverage \u2014 no plan was given, so this run cannot show that any of the diff was read"
5524
- );
5600
+ coverageEntries.push({
5601
+ subject: "coverage",
5602
+ reason: "no plan was given, so this run cannot show that any of the diff was read"
5603
+ });
5604
+ criticalsUnverified = criticalsNeedingVerify >= 1;
5525
5605
  } else {
5526
5606
  try {
5527
5607
  const cov = coverageFromTranscripts(input.planPath, input.env);
@@ -5534,9 +5614,10 @@ function composeReview(input) {
5534
5614
  if (!already) uncoverable.push(prefix);
5535
5615
  }
5536
5616
  for (const label2 of cov.idleAgents) {
5537
- unreviewed.push(
5538
- `${label2} \u2014 the agent made no tool call: it read nothing`
5539
- );
5617
+ coverageEntries.push({
5618
+ subject: label2,
5619
+ reason: "the agent made no tool call: it read nothing"
5620
+ });
5540
5621
  }
5541
5622
  if (cov.idleAgents.length > 0) {
5542
5623
  remediation.push(
@@ -5544,9 +5625,10 @@ function composeReview(input) {
5544
5625
  );
5545
5626
  }
5546
5627
  for (const label2 of cov.blindAgents) {
5547
- unreviewed.push(
5548
- `${label2} \u2014 launched with a prompt that never named the diff file, so it could not have read it`
5549
- );
5628
+ coverageEntries.push({
5629
+ subject: label2,
5630
+ reason: "launched with a prompt that never named the diff file, so it could not have read it"
5631
+ });
5550
5632
  }
5551
5633
  if (cov.blindAgents.length > 0) {
5552
5634
  remediation.push(
@@ -5554,34 +5636,27 @@ function composeReview(input) {
5554
5636
  );
5555
5637
  }
5556
5638
  for (const label2 of cov.unopenedAgents) {
5557
- unreviewed.push(
5558
- `${label2} \u2014 pointed at diff lines it never opened: it made tool calls, but none of them read the diff`
5559
- );
5639
+ coverageEntries.push({
5640
+ subject: label2,
5641
+ reason: "pointed at diff lines it never opened: it made tool calls, but none of them read the diff"
5642
+ });
5560
5643
  }
5561
5644
  if (cov.unopenedAgents.length > 0) {
5562
5645
  remediation.push(
5563
5646
  "agents that never opened the diff: relaunch each with the same printed prompt \u2014 the prompt already names the diff and its ranges; the read is what proves the review happened"
5564
5647
  );
5565
5648
  }
5566
- for (const label2 of cov.rewrittenPrompts) {
5567
- unreviewed.push(label2);
5568
- }
5649
+ coverageEntries.push(...cov.disclosures);
5569
5650
  if (cov.rewrittenPrompts.length > 0) {
5570
5651
  remediation.push(
5571
5652
  `rewritten launches: re-run \`"\${QWEN_CODE_CLI:-qwen}" review agent-prompt --plan ${planRef} --chunk <id>\` (or \`--role <r>\`, with \`--file <path>\` for an invariant agent) \`[--rules <rules file>]\` for each named agent and pass its output unedited \u2014 copy it, do not retype it. Pass --rules whenever the review loaded any, or the rebuilt brief silently drops the project rules`
5572
5653
  );
5573
5654
  }
5574
- for (const label2 of cov.missingRoles) {
5575
- unreviewed.push(label2);
5576
- }
5577
5655
  if (cov.missingRoles.length > 0) {
5578
5656
  remediation.push(
5579
5657
  `missing briefs: build every required prompt in one call \u2014 \`"\${QWEN_CODE_CLI:-qwen}" review agent-prompt --plan ${planRef} --roster [--rules <rules file>]\` \u2014 and launch one agent per block it prints, verbatim; \`--role <n>\` or \`--chunk <id>\` rebuilds a single one. Pass --rules whenever the review loaded any`
5580
5658
  );
5581
5659
  }
5582
- for (const label2 of cov.unreadBriefs) {
5583
- unreviewed.push(label2);
5584
- }
5585
5660
  if (cov.unreadBriefs.length > 0) {
5586
5661
  remediation.push(
5587
5662
  "unread briefs: relaunch each agent with the same printed prompt \u2014 the agent must OPEN the brief file the prompt names; that read is the receipt"
@@ -5589,23 +5664,35 @@ function composeReview(input) {
5589
5664
  }
5590
5665
  } catch (err) {
5591
5666
  const why = err instanceof TranscriptsUnavailableError ? `could not read the agents' transcripts (${err.message})` : `the plan could not be used (${err.message})`;
5592
- unreviewed.push(
5593
- `coverage \u2014 ${why}, so this run cannot show that any of the diff was read`
5594
- );
5667
+ coverageEntries.push({
5668
+ subject: "coverage",
5669
+ reason: `${why}, so this run cannot show that any of the diff was read`
5670
+ });
5595
5671
  }
5596
5672
  try {
5597
- const findingsToVerify = criticalsInline + suggestionsInline + bodyCriticals.filter((c2) => !/\[(?:build|test)\]/i.test(c2)).length;
5673
+ const findingsToVerify = criticalsInline + suggestionsInline + nonDeterministicBodyCriticals;
5598
5674
  const verification = verificationGaps(
5599
5675
  input.planPath,
5600
5676
  { postsFindings: findingsToVerify > 0 },
5601
5677
  input.env
5602
5678
  );
5603
- for (const gap of verification.gaps) unreviewed.push(gap);
5679
+ for (const gap of verification.gaps) {
5680
+ const cut = gap.indexOf(" \u2014 ");
5681
+ coverageEntries.push(
5682
+ cut === -1 ? { subject: gap, reason: "" } : {
5683
+ subject: gap.slice(0, cut),
5684
+ reason: gap.slice(cut + " \u2014 ".length)
5685
+ }
5686
+ );
5687
+ }
5604
5688
  remediation.push(...verification.remediation);
5689
+ criticalsUnverified = verification.unverifiedFindings && criticalsNeedingVerify >= 1;
5605
5690
  } catch (err) {
5606
- unreviewed.push(
5607
- `verification \u2014 could not check that Step 4 and Step 5 ran (${err.message})`
5608
- );
5691
+ coverageEntries.push({
5692
+ subject: "verification",
5693
+ reason: `could not check that Step 4 and Step 5 ran (${err.message})`
5694
+ });
5695
+ criticalsUnverified = criticalsNeedingVerify >= 1;
5609
5696
  }
5610
5697
  }
5611
5698
  const contextUnavailable = toBool(
@@ -5644,17 +5731,24 @@ function composeReview(input) {
5644
5731
  if (cannotTell.length > 0) cappedBy.push("cannot-tell-existing-critical");
5645
5732
  if (missingReceipts.length > 0) cappedBy.push("chunk-nobody-read");
5646
5733
  if (uncoverable.length > 0) cappedBy.push("uncoverable-chunk");
5647
- if (unreviewed.length > 0) cappedBy.push("unreviewed-dimension");
5734
+ if (unreviewed.length + coverageEntries.length > 0) {
5735
+ cappedBy.push("unreviewed-dimension");
5736
+ }
5648
5737
  if (contextUnavailable) cappedBy.push("context-unavailable");
5738
+ if (criticalsUnverified) cappedBy.push("criticals-unverified");
5649
5739
  let event = baseEvent;
5650
5740
  if (event === "APPROVE" && cappedBy.length > 0) event = "COMMENT";
5741
+ const deterministicBodyCriticals = bodyCriticals.length - nonDeterministicBodyCriticals;
5742
+ if (event === "REQUEST_CHANGES" && criticalsUnverified && deterministicBodyCriticals === 0) {
5743
+ event = "COMMENT";
5744
+ }
5651
5745
  let downgraded = false;
5652
5746
  let downgradedFrom = null;
5653
5747
  if (event === "APPROVE" && downgradeApprove) {
5654
5748
  event = "COMMENT";
5655
5749
  downgraded = true;
5656
5750
  downgradedFrom = "Approve";
5657
- } else if (event === "REQUEST_CHANGES" && downgradeRequestChanges) {
5751
+ } else if ((event === "REQUEST_CHANGES" || baseEvent === "REQUEST_CHANGES" && criticalsUnverified) && downgradeRequestChanges) {
5658
5752
  event = "COMMENT";
5659
5753
  downgraded = true;
5660
5754
  downgradedFrom = "Request changes";
@@ -5668,25 +5762,56 @@ ${footer}`, "finish");
5668
5762
  remediation.push(
5669
5763
  `chunks nobody read: build each with \`"\${QWEN_CODE_CLI:-qwen}" review agent-prompt --plan ${planRef} --chunk <id> [--rules <rules file>]\` \u2014 or the whole fan-out with \`--roster\` \u2014 and launch one agent per block, verbatim`
5670
5764
  );
5671
- notReviewedParts.push(
5672
- `Not reviewed: ${missingReceipts.map((id) => `chunk ${id}`).join(", ")} \u2014 no agent reported covering these; nobody read them.`
5765
+ const disclosedSubjects = new Set(coverageEntries.map((e) => e.subject));
5766
+ const unexplainedReceipts = missingReceipts.filter(
5767
+ (id) => !disclosedSubjects.has(`chunk ${id}`)
5673
5768
  );
5769
+ if (unexplainedReceipts.length > 0) {
5770
+ notReviewedParts.push(
5771
+ `Not reviewed: ${unexplainedReceipts.map((id) => `chunk ${id}`).join(", ")} \u2014 no agent reported covering these; nobody read them.`
5772
+ );
5773
+ }
5674
5774
  }
5675
5775
  if (uncoverable.length > 0) {
5676
5776
  notReviewedParts.push(
5677
5777
  `Not reviewed: ${uncoverable.join(", ")} \u2014 a line there exceeds the read limit.`
5678
5778
  );
5679
5779
  }
5680
- const whiffedDimensions = unreviewed.filter((d) => !d.includes(" \u2014 "));
5681
- const explainedDimensions = unreviewed.filter((d) => d.includes(" \u2014 "));
5780
+ const covEntries = coverageEntries;
5781
+ const callerLeft = [];
5782
+ const seenCaller = /* @__PURE__ */ new Set();
5783
+ for (const d of unreviewed) {
5784
+ if (seenCaller.has(d)) continue;
5785
+ seenCaller.add(d);
5786
+ const echoesCoverage = covEntries.some(
5787
+ (e) => d === e.subject || d.startsWith(`${e.subject} \u2014 `)
5788
+ );
5789
+ if (!echoesCoverage) callerLeft.push(d);
5790
+ }
5791
+ const whiffedDimensions = callerLeft.filter((d) => !d.includes(" \u2014 "));
5792
+ const explainedCaller = callerLeft.filter((d) => d.includes(" \u2014 "));
5682
5793
  if (whiffedDimensions.length > 0) {
5683
5794
  notReviewedParts.push(
5684
5795
  `Not reviewed: ${whiffedDimensions.join(", ")} \u2014 the agent returned no evidence of its walk twice.`
5685
5796
  );
5686
5797
  }
5687
- for (const d of explainedDimensions) {
5798
+ for (const d of explainedCaller) {
5688
5799
  notReviewedParts.push(`Not reviewed: ${d}.`);
5689
5800
  }
5801
+ const seenSubjects = /* @__PURE__ */ new Set();
5802
+ const byReason = /* @__PURE__ */ new Map();
5803
+ for (const { subject, reason } of covEntries) {
5804
+ if (seenSubjects.has(subject)) continue;
5805
+ seenSubjects.add(subject);
5806
+ const subjects = byReason.get(reason) ?? [];
5807
+ subjects.push(subject);
5808
+ byReason.set(reason, subjects);
5809
+ }
5810
+ for (const [reason, subjects] of byReason) {
5811
+ notReviewedParts.push(
5812
+ reason ? `Not reviewed: ${subjects.join(", ")} \u2014 ${reason}.` : `Not reviewed: ${subjects.join(", ")}.`
5813
+ );
5814
+ }
5690
5815
  const cannotTellBlock = cannotTell.length === 0 ? [] : [
5691
5816
  `Unresolved, please confirm: ${cannotTell.map((l) => withMarker(l)).join(" ")}`
5692
5817
  ];
@@ -5730,7 +5855,7 @@ ${footer}`, "finish");
5730
5855
  if (contextUnavailable) {
5731
5856
  clauses.push(contextUnavailableClause);
5732
5857
  } else {
5733
- const canCertify = !downgraded && !downgradeApprove && !downgradeRequestChanges && c === 0 && cannotTell.length === 0 && uncoverable.length === 0 && unreviewed.length === 0 && // A missing receipt caps the event but was left out of certification, so a
5858
+ const canCertify = !downgraded && !downgradeApprove && !downgradeRequestChanges && c === 0 && cannotTell.length === 0 && uncoverable.length === 0 && unreviewed.length + coverageEntries.length === 0 && // A missing receipt caps the event but was left out of certification, so a
5734
5859
  // body could open "Reviewed — no blockers." two lines above "nobody read
5735
5860
  // them." Nothing nobody read can be certified blocker-free.
5736
5861
  missingReceipts.length === 0;
@@ -5739,12 +5864,12 @@ ${footer}`, "finish");
5739
5864
  if (suggestionsInline > 0) clauses.push("Suggestions are inline.");
5740
5865
  if (suggestionsDiscarded > 0) {
5741
5866
  clauses.push(
5742
- `${suggestionsDiscarded} Suggestion-level finding(s) could not be anchored to the diff; see the terminal output.`
5867
+ `${suggestionsDiscarded} Suggestion-level finding(s) could not be anchored to a changed line and were dropped; nothing further to act on here.`
5743
5868
  );
5744
5869
  }
5745
5870
  clauses.push(...cannotTellBlock);
5746
5871
  clauses.push(...notReviewedParts);
5747
- if (downgradedFrom === "Request changes") {
5872
+ if (downgradedFrom === "Request changes" || criticalsUnverified) {
5748
5873
  clauses.push(...bodyCriticalBlock);
5749
5874
  }
5750
5875
  return {
@@ -5758,22 +5883,72 @@ ${footer}`, "finish");
5758
5883
  };
5759
5884
  }
5760
5885
  __name(composeReview, "composeReview");
5886
+ function readDraftedComments(path3) {
5887
+ let raw;
5888
+ try {
5889
+ raw = readFileSync6(path3, "utf8");
5890
+ } catch (err) {
5891
+ throw new Error(
5892
+ `compose-review: cannot read the comments file ${path3}: ${err.message}. Pass the drafted inline comments \u2014 the same array the review payload will carry \u2014 or a file containing [] when nothing anchors inline.`
5893
+ );
5894
+ }
5895
+ let parsed;
5896
+ try {
5897
+ parsed = JSON.parse(raw);
5898
+ } catch (err) {
5899
+ throw new Error(
5900
+ `compose-review: the comments file ${path3} is not JSON: ${err.message}`
5901
+ );
5902
+ }
5903
+ const comments = Array.isArray(parsed) ? parsed : parsed?.comments;
5904
+ if (!Array.isArray(comments)) {
5905
+ throw new Error(
5906
+ `compose-review: the comments file ${path3} must be a JSON array of comment objects, or a review payload with a \`comments\` array.`
5907
+ );
5908
+ }
5909
+ const unmarked = unmarkedComments(comments);
5910
+ if (unmarked.length > 0) {
5911
+ throw new Error(
5912
+ `compose-review: comments[${unmarked.join(", ")}] in ${path3} open with neither ${CRITICAL_PREFIX} nor ${SUGGESTION_PREFIX}. Every inline comment is a finding and carries its severity first \u2014 an unmarked body would be counted as neither, and a blocker that weighs nothing approves the review it should block. Fix the draft, not the counts.`
5913
+ );
5914
+ }
5915
+ return comments;
5916
+ }
5917
+ __name(readDraftedComments, "readDraftedComments");
5761
5918
  var composeReviewCommand = {
5762
5919
  command: "compose-review",
5763
- describe: "Compute the review event and body from the finding counts and run states (the Step 7 invariant, as code); reads the state JSON from --input or stdin",
5920
+ describe: "Compute the review event and body from the drafted comments and run states (the Step 7 invariant, as code); reads the state JSON from --input or stdin",
5764
5921
  builder: /* @__PURE__ */ __name((yargs) => yargs.option("input", {
5765
5922
  type: "string",
5766
5923
  describe: "Path to the state JSON (omit to read stdin)"
5924
+ }).option("comments", {
5925
+ type: "string",
5926
+ demandOption: true,
5927
+ describe: "Path to the drafted inline comments JSON (the review payload, or its bare comments array). The inline counts are counted from it, never typed \u2014 pass a file containing [] when nothing anchors inline."
5767
5928
  }).option("out", {
5768
5929
  type: "string",
5769
5930
  describe: "Also write the {event, body} JSON to this path"
5770
5931
  }), "builder"),
5771
5932
  handler: /* @__PURE__ */ __name((argv) => {
5772
- const { input, out } = argv;
5933
+ const { input, comments, out } = argv;
5934
+ if (!comments) {
5935
+ throw new Error(
5936
+ "compose-review: --comments is required \u2014 the inline counts are counted from the drafted comments file, never typed. Pass a file containing [] when nothing anchors inline."
5937
+ );
5938
+ }
5773
5939
  const raw = readFileSync6(input ?? 0, "utf8");
5774
5940
  const parsed = JSON.parse(raw);
5775
5941
  delete parsed.env;
5776
- const result = composeReview(parsed);
5942
+ if (parsed.criticalsInline !== void 0 || parsed.suggestionsInline !== void 0) {
5943
+ throw new Error(
5944
+ "compose-review: `criticalsInline` / `suggestionsInline` are counted from the --comments file, not taken from the state JSON. Remove them. (A dogfooded run moved its one Critical from `bodyCriticals` to an inline comment, dropped the count on the way, and the verdict line read Approve over a blocker.)"
5945
+ );
5946
+ }
5947
+ const drafted = readDraftedComments(comments);
5948
+ const result = composeReview({
5949
+ ...parsed,
5950
+ ...countInlineFindings(drafted)
5951
+ });
5777
5952
  const json = JSON.stringify(
5778
5953
  { ...result, verdictLine: verdictLine(result) },
5779
5954
  null,
@@ -5804,7 +5979,9 @@ function verdictLine(r) {
5804
5979
  "context-unavailable": "the PR's existing discussion could not be read"
5805
5980
  };
5806
5981
  let line = `Verdict: ${label2[r.event]}`;
5807
- if (r.baseEvent === "APPROVE" && r.event !== "APPROVE") {
5982
+ if (r.baseEvent === "REQUEST_CHANGES" && r.event === "COMMENT" && r.cappedBy.includes("criticals-unverified")) {
5983
+ line += " \u2014 a Request changes was NOT available: its blockers were never verified (they are posted, disclosed as unverified)";
5984
+ } else if (r.baseEvent === "APPROVE" && r.event !== "APPROVE") {
5808
5985
  const reasons = r.cappedBy.map((c) => why[c] ?? c);
5809
5986
  if (r.downgraded) reasons.push("a presubmit check failed");
5810
5987
  line += ` \u2014 an Approve was NOT available: ${reasons.join("; ")}`;
@@ -7318,6 +7495,10 @@ var loadRulesCommand = {
7318
7495
  // packages/cli/src/commands/review/presubmit.ts
7319
7496
  init_esbuild_shims();
7320
7497
  import { writeFileSync as writeFileSync9, readFileSync as readFileSync8 } from "node:fs";
7498
+ function verdictStamp(run2) {
7499
+ return run2.completed_at ?? run2.started_at ?? "";
7500
+ }
7501
+ __name(verdictStamp, "verdictStamp");
7321
7502
  var FAIL_CONCLUSIONS = /* @__PURE__ */ new Set([
7322
7503
  "failure",
7323
7504
  "cancelled",
@@ -7363,13 +7544,21 @@ function classifyCi(checkRuns, statuses) {
7363
7544
  }
7364
7545
  }
7365
7546
  const skippedCheckNames = [...notRunNames].filter((n) => !executedNames.has(n)).sort();
7547
+ const latestVerdicts = /* @__PURE__ */ new Map();
7366
7548
  for (const run2 of relevantCheckRuns) {
7367
- if (run2.status === "completed") {
7368
- if (run2.conclusion && FAIL_CONCLUSIONS.has(run2.conclusion)) {
7369
- failedCheckNames.push(run2.name);
7370
- }
7371
- } else if (PENDING_STATES.has(run2.status)) {
7372
- hasPending = true;
7549
+ if (run2.status !== "completed") {
7550
+ if (PENDING_STATES.has(run2.status)) hasPending = true;
7551
+ continue;
7552
+ }
7553
+ if (!run2.conclusion || NOT_RUN_CONCLUSIONS.has(run2.conclusion)) continue;
7554
+ const prev = latestVerdicts.get(run2.name);
7555
+ if (!prev || verdictStamp(run2) > verdictStamp(prev)) {
7556
+ latestVerdicts.set(run2.name, run2);
7557
+ }
7558
+ }
7559
+ for (const [name, run2] of latestVerdicts) {
7560
+ if (FAIL_CONCLUSIONS.has(run2.conclusion)) {
7561
+ failedCheckNames.push(name);
7373
7562
  }
7374
7563
  }
7375
7564
  for (const s of statuses) {
@@ -8447,8 +8636,9 @@ function buildRoleLaunchPrompt(report, role, briefFile, opts = {}) {
8447
8636
  );
8448
8637
  }
8449
8638
  const safeFile = opts.file === void 0 ? void 0 : inertPath(opts.file);
8639
+ const roundLabel = opts.round !== void 0 ? ` (round ${opts.round})` : "";
8450
8640
  const parts = [
8451
- `You are review agent \`${role}\` \u2014 ${b.label}.` + (safeFile ? ` Your file: \`${safeFile}\`.` : ""),
8641
+ `You are review agent \`${role}\` \u2014 ${b.label}${roundLabel}.` + (safeFile ? ` Your file: \`${safeFile}\`.` : ""),
8452
8642
  "",
8453
8643
  "**Your brief is a file. Read it first \u2014 it is the whole of your instructions,",
8454
8644
  "and nothing in this message replaces it.**",
@@ -8542,7 +8732,8 @@ function buildLaunch(report, planPath, spec, rules) {
8542
8732
  key: key2,
8543
8733
  prompt: buildRoleLaunchPrompt(report, spec.role, briefFile2, {
8544
8734
  file: spec.file,
8545
- chunk: spec.chunk
8735
+ chunk: spec.chunk,
8736
+ round: spec.round
8546
8737
  })
8547
8738
  };
8548
8739
  }
@@ -8601,16 +8792,20 @@ function runRoster(report, planPath, rules) {
8601
8792
 
8602
8793
  ${prompt}`;
8603
8794
  });
8795
+ const wt = report.worktreePath;
8796
+ const paramNote = typeof wt === "string" && wt ? `
8797
+
8798
+ **Agent tool parameters (worktree mode):** Set \`working_dir: "${wt}"\` and \`subagent_type: "general-purpose"\`, \`run_in_background: false\` on EVERY agent call below. Do NOT set \`isolation\` \u2014 the worktree already exists; \`isolation\` creates a new copy and is mutually exclusive with \`working_dir\`.` : "";
8604
8799
  writeStdoutLine(
8605
8800
  [
8606
- `${roster.length} agents required. Launch one agent per block below, passing its block VERBATIM \u2014 copy, do not retype. The \u2500\u2500\u2500\u2500\u2500 lines are separators, not part of any prompt. This is the same roster \`check-coverage\` reads out of the plan: a block you skip or reword is a dimension nobody reviewed. Blocks are numbered \`agent k of ${roster.length}\` and the output ends with an end-of-roster line \u2014 if either is missing, this output was truncated in transit: every prompt is also recorded on disk, so rebuild just the missing blocks with --chunk <id>, or --role <r> (--file <path> for an invariant agent), plus the same --rules this call was given.`,
8801
+ `${roster.length} agents required. Launch one agent per block below, passing its block VERBATIM \u2014 copy, do not retype. The \u2500\u2500\u2500\u2500\u2500 lines are separators, not part of any prompt. This is the same roster \`check-coverage\` reads out of the plan: a block you skip or reword is a dimension nobody reviewed. Blocks are numbered \`agent k of ${roster.length}\` and the output ends with an end-of-roster line \u2014 if either is missing, this output was truncated in transit: every prompt is also recorded on disk, so rebuild just the missing blocks with --chunk <id>, or --role <r> (--file <path> for an invariant agent), plus the same --rules this call was given.` + paramNote,
8607
8802
  ...blocks,
8608
8803
  `\u2500\u2500\u2500\u2500\u2500 end of roster \u2014 ${roster.length} agents \u2500\u2500\u2500\u2500\u2500`
8609
8804
  ].join("\n\n")
8610
8805
  );
8611
8806
  }
8612
8807
  __name(runRoster, "runRoster");
8613
- function runAllChunks(report, planPath, role, findingsContent, rules) {
8808
+ function runAllChunks(report, planPath, role, findingsContent, rules, round) {
8614
8809
  if (!Array.isArray(report.chunks) || report.chunks.length === 0) {
8615
8810
  throw new Error("agent-prompt: the plan has no `chunks[]`.");
8616
8811
  }
@@ -8622,12 +8817,13 @@ function runAllChunks(report, planPath, role, findingsContent, rules) {
8622
8817
  );
8623
8818
  }
8624
8819
  const digest = findingsDigest(findingsContent, rules);
8820
+ const roundPart = round !== void 0 ? `--round-${round}` : "";
8625
8821
  const blocks = chunks.map((c, i) => {
8626
- const key = `${role}--chunk-${c.id}--${digest}`;
8822
+ const key = `${role}--chunk-${c.id}${roundPart}--${digest}`;
8627
8823
  const { prompt } = buildLaunch(
8628
8824
  report,
8629
8825
  planPath,
8630
- { role, chunk: c.id, key },
8826
+ { role, chunk: c.id, key, round },
8631
8827
  rules
8632
8828
  );
8633
8829
  const printed = foldFindings(role, findingsContent, prompt);
@@ -8651,19 +8847,20 @@ function runAgentPrompt(args) {
8651
8847
  const hasFile = typeof args.file === "string" && args.file.length > 0;
8652
8848
  const hasFindings = typeof args.findings === "string" && args.findings.length > 0;
8653
8849
  const hasWhole = !!args.wholeDiff;
8850
+ const hasRound = args.round !== void 0;
8654
8851
  const bad = /* @__PURE__ */ __name((msg) => {
8655
8852
  throw new Error(`agent-prompt: ${msg}`);
8656
8853
  }, "bad");
8657
8854
  if (args.roster) {
8658
- if (hasChunk || hasRole || hasFile || hasFindings || hasWhole || args.allChunks) {
8855
+ if (hasChunk || hasRole || hasFile || hasFindings || hasWhole || args.allChunks || hasRound) {
8659
8856
  bad(
8660
- "--roster builds every prompt the plan requires; it takes no --chunk, --role, --file, --findings, --whole-diff or --all-chunks. (Step 4/5 verify and reverse-audit prompts are built per round, with --role and --findings.)"
8857
+ "--roster builds every prompt the plan requires; it takes no --chunk, --role, --file, --findings, --whole-diff, --all-chunks or --round. (Step 4/5 verify and reverse-audit prompts are built per round, with --role and --findings.)"
8661
8858
  );
8662
8859
  }
8663
8860
  } else if (hasWhole) {
8664
- if (hasChunk || hasRole || hasFile || hasFindings || args.allChunks) {
8861
+ if (hasChunk || hasRole || hasFile || hasFindings || args.allChunks || hasRound) {
8665
8862
  bad(
8666
- "--whole-diff builds the diff-reading block alone; it takes no --chunk, --role, --file, --findings or --all-chunks."
8863
+ "--whole-diff builds the diff-reading block alone; it takes no --chunk, --role, --file, --findings, --all-chunks or --round."
8667
8864
  );
8668
8865
  }
8669
8866
  } else if (hasRole) {
@@ -8709,6 +8906,21 @@ function runAgentPrompt(args) {
8709
8906
  `--findings folds a findings list into the prompt, only for a role that takes one (${findingRoles.join(", ")}); role "${role}" does not.`
8710
8907
  );
8711
8908
  }
8909
+ if (hasRound) {
8910
+ if (!BRIEFS[role]?.acceptsFindings) {
8911
+ const roundRoles = Object.keys(BRIEFS).filter(
8912
+ (r) => BRIEFS[r].acceptsFindings
8913
+ );
8914
+ bad(
8915
+ `--round labels one round of a findings role (${roundRoles.join(", ")}); role "${role}" runs once and does not take it.`
8916
+ );
8917
+ }
8918
+ if (!Number.isSafeInteger(args.round) || args.round < 1) {
8919
+ bad(
8920
+ `--round is a 1-based round number (--round 1, --round 2, \u2026); got "${args.round}".`
8921
+ );
8922
+ }
8923
+ }
8712
8924
  } else if (hasFindings) {
8713
8925
  const findingRoles = Object.keys(BRIEFS).filter(
8714
8926
  (r) => BRIEFS[r].acceptsFindings
@@ -8725,6 +8937,13 @@ function runAgentPrompt(args) {
8725
8937
  bad(
8726
8938
  "--all-chunks builds one auditor block per chunk for a per-chunk findings role; it needs --role <role> and --findings <file> (--role reverse-audit for a Step 5 round)."
8727
8939
  );
8940
+ } else if (hasRound) {
8941
+ const roundRoles = Object.keys(BRIEFS).filter(
8942
+ (r) => BRIEFS[r].acceptsFindings
8943
+ );
8944
+ bad(
8945
+ `--round labels one round of a findings role; it needs ${roundRoles.map((r) => `--role ${r}`).join(" / ")} and --findings <file>.`
8946
+ );
8728
8947
  } else if (!hasChunk) {
8729
8948
  bad(
8730
8949
  "pass exactly one of --roster (every prompt the plan requires, in one call), --chunk <id> (a Step 3B territory agent), --role <role> (a named agent), or --whole-diff (the diff-reading block on its own)."
@@ -8774,7 +8993,8 @@ function runAgentPrompt(args) {
8774
8993
  args.plan,
8775
8994
  args.role,
8776
8995
  findingsContent,
8777
- rules
8996
+ rules,
8997
+ args.round
8778
8998
  );
8779
8999
  return;
8780
9000
  }
@@ -8787,7 +9007,8 @@ function runAgentPrompt(args) {
8787
9007
  let keyOverride;
8788
9008
  if (findingsContent !== void 0 && args.role) {
8789
9009
  const base = typeof args.chunk === "number" ? `${args.role}--chunk-${args.chunk}` : args.role;
8790
- keyOverride = `${base}--${findingsDigest(findingsContent, rules)}`;
9010
+ const roundPart = args.round !== void 0 ? `--round-${args.round}` : "";
9011
+ keyOverride = `${base}${roundPart}--${findingsDigest(findingsContent, rules)}`;
8791
9012
  }
8792
9013
  ({ key, prompt } = buildLaunch(
8793
9014
  report,
@@ -8796,7 +9017,8 @@ function runAgentPrompt(args) {
8796
9017
  role: args.role,
8797
9018
  chunk: args.chunk,
8798
9019
  file: args.file,
8799
- key: keyOverride
9020
+ key: keyOverride,
9021
+ round: args.round
8800
9022
  } : { chunk: args.chunk },
8801
9023
  rules
8802
9024
  ));
@@ -8838,6 +9060,9 @@ var agentPromptCommand = {
8838
9060
  }).option("findings", {
8839
9061
  type: "string",
8840
9062
  describe: "Path to a file of findings to fold into a --role verify (the shard it rules on) / --role reverse-audit (the cumulative confirmed list) prompt, so you paste ONE block. The findings are part of the recorded prompt (keyed per findings digest), so a launch that drops them matches no record \u2014 paste the whole output verbatim, do not add a round number or reword it."
9063
+ }).option("round", {
9064
+ type: "number",
9065
+ describe: "Which round of a findings role this is (1-based). The CLI bakes it into the identity line and the record key, so pass it here instead of writing a round label into the prompt yourself \u2014 a hand-added label reads as a rewritten launch."
8841
9066
  }), "builder"),
8842
9067
  handler: /* @__PURE__ */ __name((argv) => {
8843
9068
  runAgentPrompt({
@@ -8849,7 +9074,8 @@ var agentPromptCommand = {
8849
9074
  roster: argv["roster"] === true,
8850
9075
  allChunks: argv["all-chunks"] === true,
8851
9076
  rules: argv["rules"],
8852
- findings: argv["findings"]
9077
+ findings: argv["findings"],
9078
+ round: argv["round"]
8853
9079
  });
8854
9080
  }, "handler")
8855
9081
  };
@@ -9447,8 +9673,6 @@ function isDiffLine(n) {
9447
9673
  return typeof n === "number" && Number.isSafeInteger(n) && n > 0;
9448
9674
  }
9449
9675
  __name(isDiffLine, "isDiffLine");
9450
- var CRITICAL_PREFIX = "**[Critical]**";
9451
- var SUGGESTION_PREFIX = "**[Suggestion]**";
9452
9676
  function authorization(args) {
9453
9677
  if (args.userAuthorized) {
9454
9678
  return { ok: true, why: "the user asked for this review to be published" };
@@ -9509,12 +9733,7 @@ __name(authorization, "authorization");
9509
9733
  function compose(payload) {
9510
9734
  const comments = payload.comments ?? [];
9511
9735
  const state = payload.state ?? {};
9512
- const criticalsInline = comments.filter(
9513
- (c) => (c.body ?? "").trimStart().startsWith(CRITICAL_PREFIX)
9514
- ).length;
9515
- const suggestionsInline = comments.filter(
9516
- (c) => (c.body ?? "").trimStart().startsWith(SUGGESTION_PREFIX)
9517
- ).length;
9736
+ const { criticalsInline, suggestionsInline } = countInlineFindings(comments);
9518
9737
  const { env: _dropped, ...rest } = state;
9519
9738
  void _dropped;
9520
9739
  const r = composeReview({
@@ -9558,6 +9777,11 @@ function inconsistencies(payload, event) {
9558
9777
  const at = `comments[${i}]`;
9559
9778
  if (!c.path) problems.push(`${at} has no \`path\``);
9560
9779
  if (!c.body) problems.push(`${at} has no \`body\` \u2014 an empty comment`);
9780
+ if (c.body && severityOf(c) === null) {
9781
+ problems.push(
9782
+ `${at} opens with neither ${CRITICAL_PREFIX} nor ${SUGGESTION_PREFIX} \u2014 the verdict counts comments by their severity marker, and an unmarked one weighs nothing in it`
9783
+ );
9784
+ }
9561
9785
  if (!isDiffLine(c.line)) {
9562
9786
  problems.push(
9563
9787
  `${at} has no usable \`line\` (${JSON.stringify(c.line)}) \u2014 a line is a positive whole number; resolve its anchor first`
@@ -10305,10 +10529,10 @@ var updateCommand3 = {
10305
10529
  stdioHelpers,
10306
10530
  { updateEventEmitter }
10307
10531
  ] = await Promise.all([
10308
- import("./settings-ZX3OKUT4.js"),
10309
- import("./updateCheck-YNRFE4V7.js"),
10310
- import("./installationInfo-P3ZP2SIZ.js"),
10311
- import("./standalone-update-C54OTJWJ.js"),
10532
+ import("./settings-H5O22TGQ.js"),
10533
+ import("./updateCheck-EKIPND4B.js"),
10534
+ import("./installationInfo-3UETF773.js"),
10535
+ import("./standalone-update-UC6CWBLH.js"),
10312
10536
  import("./stdioHelpers-HGIYTWAY.js"),
10313
10537
  import("./updateEventEmitter-5MKC7BLQ.js")
10314
10538
  ]);