@qwen-code/qwen-code 0.19.12 → 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 (276) hide show
  1. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  2. package/bundled/qc-helper/docs/qwen-serve.md +42 -5
  3. package/bundled/review/DESIGN.md +2 -2
  4. package/bundled/review/SKILL.md +13 -9
  5. package/chunks/{MaxSizedBox-QOXLJGAF.js → MaxSizedBox-ED3QND6V.js} +30 -27
  6. package/chunks/{StandaloneSessionPicker-FLV6CGYJ.js → StandaloneSessionPicker-NQVAOTKS.js} +50 -45
  7. package/chunks/{acpAgent-OB2CTF3P.js → acpAgent-HOBFF5B6.js} +353 -130
  8. package/chunks/{agent-CKSI7BTR.js → agent-J7EPFLA6.js} +22 -22
  9. package/chunks/{agent-headless-U36LIYTU.js → agent-headless-RRG3JU7Q.js} +22 -22
  10. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-HVKLXOOU.js} +6 -5
  11. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  12. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  13. package/chunks/{bridge-AIKTINJG.js → bridge-OW5FZ6BF.js} +25 -25
  14. package/chunks/build-SSCNEHZZ.js +62 -0
  15. package/chunks/{channel-worker-group-NEUVTPB2.js → channel-worker-group-53CMOPFT.js} +4 -4
  16. package/chunks/{channel-worker-manager-7CQVOVWV.js → channel-worker-manager-UTXILKC2.js} +4 -4
  17. package/chunks/{channel-worker-supervisor-3BU2KNCZ.js → channel-worker-supervisor-ZGO2W2MD.js} +3 -3
  18. package/chunks/chunk-27AJEU6G.js +442 -0
  19. package/chunks/{chunk-BABX5XRO.js → chunk-2HOVDT7W.js} +1 -1
  20. package/chunks/{chunk-GW7BONBU.js → chunk-2JOLZA6L.js} +5 -5
  21. package/chunks/{chunk-ZSDFNE6Y.js → chunk-2TDSM7I6.js} +3 -3
  22. package/chunks/{chunk-6IITZE7O.js → chunk-2YJLFCYI.js} +7 -7
  23. package/chunks/{chunk-VEFR4XJQ.js → chunk-37MGCVTS.js} +1 -1
  24. package/chunks/{chunk-3B6PSWHE.js → chunk-3ML52IFS.js} +4 -4
  25. package/chunks/{chunk-TKASNYDS.js → chunk-3QR5MOHP.js} +2 -2
  26. package/chunks/{chunk-KRMARA3A.js → chunk-3SNKL6L6.js} +29 -13
  27. package/chunks/{chunk-DJ4VHAFJ.js → chunk-3ZL6YMO2.js} +3 -3
  28. package/chunks/chunk-43T5WDQ7.js +127 -0
  29. package/chunks/{chunk-W6CQPLWM.js → chunk-4ODB7WIB.js} +1 -1
  30. package/chunks/{chunk-CHPQFLW6.js → chunk-4UH63YE5.js} +5 -5
  31. package/chunks/{chunk-2CCDMJM7.js → chunk-53OPIXUE.js} +3 -3
  32. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  33. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  34. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  35. package/chunks/{chunk-OBSLEYCD.js → chunk-6HQW55TM.js} +29 -2
  36. package/chunks/{chunk-N47VAEAJ.js → chunk-6MN6XJTR.js} +2379 -1291
  37. package/chunks/{chunk-UCTCDLDS.js → chunk-6VGRTGOG.js} +1 -1
  38. package/chunks/{chunk-KNGZ5EYL.js → chunk-7JQK6FXK.js} +198 -120
  39. package/chunks/{chunk-2476XGOU.js → chunk-A4TJMY65.js} +1 -1
  40. package/chunks/{chunk-67Q33DQY.js → chunk-AMRWCMX4.js} +4 -4
  41. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  42. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  43. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  44. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  45. package/chunks/{chunk-PK7COE5O.js → chunk-CL7IRYTA.js} +1 -1
  46. package/chunks/{chunk-KMJOMWHE.js → chunk-COWNNAWJ.js} +1 -1
  47. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  48. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  49. package/chunks/{chunk-4MPYGENG.js → chunk-DCCW7CRR.js} +6 -6
  50. package/chunks/chunk-DIKIJS6Z.js +114 -0
  51. package/chunks/{chunk-ETN2G32U.js → chunk-DR5AUNJ2.js} +4 -4
  52. package/chunks/{chunk-6ETOSWAO.js → chunk-DSBCU6JY.js} +3 -3
  53. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  54. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  55. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  56. package/chunks/{chunk-WHQNBBWW.js → chunk-FLSVD6BS.js} +2 -2
  57. package/chunks/{chunk-3ESL7JXA.js → chunk-FODJ5Q5K.js} +3 -3
  58. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  59. package/chunks/{chunk-NE6HHLL3.js → chunk-FWT66O5E.js} +2 -2
  60. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  61. package/chunks/{chunk-ZGT623SG.js → chunk-G6MDKXDP.js} +12 -12
  62. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  63. package/chunks/chunk-GMGDLUC7.js +37 -0
  64. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  65. package/chunks/{chunk-XSEWNUMZ.js → chunk-I4HZ4GOD.js} +8 -8
  66. package/chunks/{chunk-CPU6I5YV.js → chunk-I6JUVU7J.js} +34 -24
  67. package/chunks/{chunk-UZC5VPOJ.js → chunk-IDGTC5AS.js} +3 -3
  68. package/chunks/{chunk-QIFTJDBY.js → chunk-INL2RSLA.js} +1 -1
  69. package/chunks/{chunk-GSPWDTYY.js → chunk-INQQM52C.js} +18 -16
  70. package/chunks/{chunk-HVGJWOR6.js → chunk-JBCFW3IL.js} +2 -2
  71. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  72. package/chunks/{chunk-GCY7QTCE.js → chunk-JDPCOUZ3.js} +1602 -398
  73. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  74. package/chunks/{chunk-KGWA7XYL.js → chunk-JRJ2LV6P.js} +6 -226
  75. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  76. package/chunks/{chunk-RKUMFUFM.js → chunk-LTQ5C5AB.js} +4 -4
  77. package/chunks/{chunk-V4PCIS25.js → chunk-MAQQGNQ5.js} +44 -1
  78. package/chunks/{chunk-EISVEV45.js → chunk-NBMIC7DR.js} +2 -2
  79. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  80. package/chunks/{chunk-BKNPMEN6.js → chunk-NIJEXGV6.js} +93 -17
  81. package/chunks/{chunk-PR5XQ73G.js → chunk-NQVA6O7F.js} +2 -2
  82. package/chunks/{chunk-FUSMC3SZ.js → chunk-NT324EJ6.js} +13 -8
  83. package/chunks/{chunk-5N7M4XYN.js → chunk-O2SPEQFA.js} +5 -5
  84. package/chunks/{chunk-OEHCAWUA.js → chunk-OLMETXLX.js} +2 -2
  85. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  86. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  87. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  88. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  89. package/chunks/chunk-QKYTTBYW.js +624 -0
  90. package/chunks/{chunk-W4UN42YP.js → chunk-QOSKUG5P.js} +77 -20
  91. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  92. package/chunks/{chunk-WIYV7CSF.js → chunk-RB7NXUP5.js} +3 -3
  93. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  94. package/chunks/{chunk-GMUPIMHF.js → chunk-RS5JPH6Y.js} +3 -3
  95. package/chunks/chunk-RS7MT2QG.js +305 -0
  96. package/chunks/{chunk-GXFYV7MP.js → chunk-SG2PEESS.js} +1106 -592
  97. package/chunks/{chunk-PUKUUASO.js → chunk-SLLG5XXE.js} +1 -1
  98. package/chunks/{chunk-GLH2NTPB.js → chunk-SQMTULHJ.js} +1 -1
  99. package/chunks/{chunk-NPMVLWYL.js → chunk-STFP7PJR.js} +6 -6
  100. package/chunks/chunk-SV5PQVQE.js +71 -0
  101. package/chunks/{chunk-HZ4M2UQD.js → chunk-TFNZCC4B.js} +1 -1
  102. package/chunks/{chunk-5QSVANRT.js → chunk-THNJYTA6.js} +2 -2
  103. package/chunks/{chunk-MRE77ST5.js → chunk-TN2BYMNH.js} +69 -2216
  104. package/chunks/{chunk-64GC5EMF.js → chunk-TQBA6DVX.js} +1 -1
  105. package/chunks/{chunk-VLHQMOZK.js → chunk-U24E4R5U.js} +3 -3
  106. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  107. package/chunks/{chunk-42VIHAYT.js → chunk-UGRL5B5F.js} +1 -1
  108. package/chunks/chunk-V7RNNPGC.js +44 -0
  109. package/chunks/{chunk-R3EDIMYZ.js → chunk-VGFFYNBD.js} +1 -1
  110. package/chunks/chunk-VIOFKPPN.js +125 -0
  111. package/chunks/{chunk-BEZPRKD3.js → chunk-VLDBVLC4.js} +156 -2
  112. package/chunks/{chunk-HD6EGS5K.js → chunk-VWLLDHAY.js} +6 -6
  113. package/chunks/chunk-WCDH2CRI.js +1187 -0
  114. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  115. package/chunks/{chunk-I7RRHHYG.js → chunk-Y2ENGUD6.js} +1 -1
  116. package/chunks/{chunk-NALRQ3SG.js → chunk-Y5534U4G.js} +332 -116
  117. package/chunks/{chunk-4SJJT466.js → chunk-YDZ6J2BY.js} +72 -159
  118. package/chunks/{chunk-APOFULHK.js → chunk-YNBP3YSU.js} +7 -6
  119. package/chunks/{chunk-EFAXBOQO.js → chunk-YWEW33JY.js} +7 -7
  120. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  121. package/chunks/{chunk-DUR7BZYK.js → chunk-ZGJ4LDD2.js} +53 -28
  122. package/chunks/{computer-use-4PUGCUQK.js → computer-use-ET5476VX.js} +22 -22
  123. package/chunks/{config-utils-6PJUXHLI.js → config-utils-AHQ6YZ66.js} +3 -3
  124. package/chunks/{contextCommand-C57KTWFV.js → contextCommand-QIULFDBF.js} +25 -26
  125. package/chunks/{create-sub-session-5Q42XR6I.js → create-sub-session-BVL2ZHTM.js} +22 -22
  126. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  127. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  128. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  129. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  130. package/chunks/{daemon-ZW6LHOXT.js → daemon-EE5T3KOW.js} +169 -84
  131. package/chunks/{daemon-status-provider-YPV3UXHT.js → daemon-status-provider-L5UW7TGV.js} +29 -29
  132. package/chunks/{dist-3DQNQJ6H.js → dist-2BHAYBKP.js} +1 -1
  133. package/chunks/{dist-J2H4KTLB.js → dist-2MIU4UUH.js} +1 -1
  134. package/chunks/{dist-IEQSDXS7.js → dist-53PZYC5B.js} +2 -2
  135. package/chunks/{dist-NUXRQHC5.js → dist-AU7NQQRP.js} +1 -1
  136. package/chunks/{dist-XLE6ODMB.js → dist-FUTEXY6A.js} +1 -1
  137. package/chunks/{dist-IGZMVS5R.js → dist-WGTQO7F2.js} +1 -1
  138. package/chunks/{earlyInputCapture-5VDWSYAM.js → earlyInputCapture-ZLAL5GTE.js} +23 -23
  139. package/chunks/{edit-GORZTX2U.js → edit-4ZOPT6OC.js} +23 -23
  140. package/chunks/{enter-worktree-LJB2AW4L.js → enter-worktree-DFP5CZYS.js} +22 -22
  141. package/chunks/{enterPlanMode-LIIPP37T.js → enterPlanMode-7VEJ7A2A.js} +22 -22
  142. package/chunks/{environment-HQ2UHJ35.js → environment-KHS35XJY.js} +24 -24
  143. package/chunks/{errors-6JD5VMVQ.js → errors-574WBU5R.js} +24 -24
  144. package/chunks/{exit-worktree-IEP2WHOV.js → exit-worktree-5Q7V6D4C.js} +22 -22
  145. package/chunks/{exitPlanMode-U5Z6XBLO.js → exitPlanMode-SX2F6PDJ.js} +22 -22
  146. package/chunks/{fast-path-HFKNMP23.js → fast-path-G7BLOZVF.js} +2 -2
  147. package/chunks/{gemini-C2SCJH3N.js → gemini-M4JWSTGU.js} +70 -68
  148. package/chunks/{geminiContentGenerator-ADZTXEKV.js → geminiContentGenerator-MKXLUFUH.js} +4 -4
  149. package/chunks/{glob-GOAPGD6G.js → glob-FPKZY5W6.js} +22 -22
  150. package/chunks/{grep-HZLSTX7D.js → grep-RS22OMZG.js} +22 -22
  151. package/chunks/{handleAutoUpdate-UF74WGFE.js → handleAutoUpdate-RFNQ36JC.js} +27 -28
  152. package/chunks/{i18n-FMXIYUOC.js → i18n-MAEWSKYF.js} +23 -23
  153. package/chunks/{initializer-ERDBM3DU.js → initializer-T2BFZJBP.js} +28 -28
  154. package/chunks/{installationInfo-LROMXYLX.js → installationInfo-3UETF773.js} +25 -23
  155. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  156. package/chunks/{list-6JPJROU5.js → list-FWZUKWD2.js} +30 -30
  157. package/chunks/{loadedSettingsAdapter-QCWYUBBF.js → loadedSettingsAdapter-3DUNHAPX.js} +27 -27
  158. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  159. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  160. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  161. package/chunks/{mcp-3P3KWYWO.js → mcp-POXS7QWD.js} +27 -27
  162. package/chunks/{monitor-LMYKCF6R.js → monitor-2ZZC2NKH.js} +22 -22
  163. package/chunks/nonInteractiveCli-WSJVCB2W.js +126 -0
  164. package/chunks/{notebook-edit-IBEOVZ6A.js → notebook-edit-BMQLME3Q.js} +23 -23
  165. package/chunks/{openaiContentGenerator-42PZKET5.js → openaiContentGenerator-GOREG72R.js} +11 -11
  166. package/chunks/{pidfile-VTBDIGOH.js → pidfile-MVZDE5TC.js} +23 -23
  167. package/chunks/{processUtils-L7ZKOGDG.js → processUtils-RH5KNLDH.js} +2 -2
  168. package/chunks/{qwenContentGenerator-VR2CNFGI.js → qwenContentGenerator-R55BCLRI.js} +24 -24
  169. package/chunks/{qwenOAuth2-6LS2T3Q6.js → qwenOAuth2-QZBI2SOZ.js} +11 -11
  170. package/chunks/react-SG7JAQSZ.js +8 -0
  171. package/chunks/{read-file-VSKOE22I.js → read-file-CPS2CYYG.js} +8 -8
  172. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  173. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  174. package/chunks/resumeHistoryUtils-YD6DSYHU.js +78 -0
  175. package/chunks/{ripGrep-5V5FLW2A.js → ripGrep-UKGJ7RHZ.js} +22 -22
  176. package/chunks/{run-qwen-serve-LSOPP4R2.js → run-qwen-serve-GFKSKLF6.js} +1442 -148
  177. package/chunks/{runtime-LT7R4CS5.js → runtime-4KGNL3TP.js} +31 -31
  178. package/chunks/{scheduler-YOWQ7KZP.js → scheduler-GJ3CELWI.js} +22 -22
  179. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  180. package/chunks/{serve-VWLBXKGK.js → serve-UU6Z4C7W.js} +27 -27
  181. package/chunks/{server-3RW3FYOH.js → server-RTJUMN24.js} +393 -256
  182. package/chunks/{session-ZONXFOBQ.js → session-EYD3CEB5.js} +79 -163
  183. package/chunks/{settings-JC3VC53L.js → settings-H5O22TGQ.js} +26 -26
  184. package/chunks/{shell-2NGEMAVM.js → shell-KVNHDHMT.js} +22 -22
  185. package/chunks/{skill-3U2T6H3E.js → skill-32525KCE.js} +10 -10
  186. package/chunks/{spawnChannel-QEAUPARQ.js → spawnChannel-G7DUQKHL.js} +24 -24
  187. package/chunks/{src-75ZPXO7B.js → src-DUFUUEHE.js} +52 -22
  188. package/chunks/{standalone-update-UUJWJWYY.js → standalone-update-UC6CWBLH.js} +24 -24
  189. package/chunks/{startInteractiveUI-V7XISPQ6.js → startInteractiveUI-A5YYAWLF.js} +5451 -2045
  190. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  191. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  192. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  193. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  194. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  195. package/chunks/{team-create-R6AXDYPG.js → team-create-LS2Q32Y4.js} +22 -22
  196. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  197. package/chunks/{team-plan-approval-O2ZPPT64.js → team-plan-approval-DWCZABX6.js} +22 -22
  198. package/chunks/{theme-manager-YIX2IC2D.js → theme-manager-E22CNBIL.js} +23 -23
  199. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  200. package/chunks/{tool-search-5IE2VO7X.js → tool-search-MHXUDFD2.js} +9 -9
  201. package/chunks/{total-session-admission-K6APQYEF.js → total-session-admission-KOPTGDJZ.js} +25 -25
  202. package/chunks/{trustedFolders-GPSSPVBF.js → trustedFolders-ANQXYAQT.js} +23 -23
  203. package/chunks/{update-relaunch-4BVAPX6Y.js → update-relaunch-HFGRB7PE.js} +9 -9
  204. package/chunks/{updateCheck-AHTHWLAM.js → updateCheck-EKIPND4B.js} +33 -26
  205. package/chunks/useAutoAcceptIndicator-EE22V2F5.js +80 -0
  206. package/chunks/{validateNonInterActiveAuth-UKAPCWDM.js → validateNonInterActiveAuth-RUICXVPH.js} +61 -63
  207. package/chunks/{version-EXGWKKQE.js → version-QLT755OV.js} +1 -1
  208. package/chunks/{web-fetch-ZDNE6FF2.js → web-fetch-DINW4Z65.js} +10 -10
  209. package/chunks/{workflow-G7U6OQWS.js → workflow-GPMXRWKK.js} +23 -23
  210. package/chunks/{workspace-providers-status-W6CEA6YM.js → workspace-providers-status-XCQKBVSX.js} +30 -30
  211. package/chunks/{workspace-registration-store-OGBMWCLC.js → workspace-registration-store-4I4KL7TN.js} +1 -1
  212. package/chunks/{workspace-registry-ZUWQM44P.js → workspace-registry-N4J57SFQ.js} +25 -25
  213. package/chunks/{workspace-service-UXX5P7GU.js → workspace-service-JJNJWVH3.js} +32 -32
  214. package/chunks/{workspace-skills-status-635B5R7N.js → workspace-skills-status-CEHLAQ2Y.js} +28 -28
  215. package/chunks/{write-file-DR3HN7IH.js → write-file-XRGEJRCC.js} +23 -23
  216. package/cli.js +11 -11
  217. package/package.json +3 -3
  218. package/web-shell/assets/{arc-_dVIKMdB.js → arc-DwJhljn9.js} +1 -1
  219. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-qdxSRav-.js} +1 -1
  220. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-2-dKM5aM.js} +1 -1
  221. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-Dt_Nu2HD.js} +1 -1
  222. package/web-shell/assets/channel-C6uyh95L.js +1 -0
  223. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-CBCeeNfD.js} +1 -1
  224. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-DPAzjqNs.js} +1 -1
  225. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-yrqyxvIK.js} +1 -1
  226. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-DguD_BBT.js} +1 -1
  227. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-KRUOG9v0.js} +1 -1
  228. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-C0lilT2U.js} +1 -1
  229. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-DG9epIWK.js} +1 -1
  230. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-PdJDkYHw.js} +1 -1
  231. package/web-shell/assets/classDiagram-4FO5ZUOK-Cv8Ulf-B.js +1 -0
  232. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cv8Ulf-B.js +1 -0
  233. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-BAOPPuJm.js} +1 -1
  234. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-CDHJv82_.js} +1 -1
  235. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-C_hkG5fN.js} +1 -1
  236. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-e9zo_eKt.js} +1 -1
  237. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-BFN41SCb.js} +1 -1
  238. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DG72N0W0.js} +1 -1
  239. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Dkmp-tdv.js} +1 -1
  240. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-CyS0GnQV.js} +1 -1
  241. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cg1SRmzV.js} +1 -1
  242. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-CoNkSLs3.js} +1 -1
  243. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-DEA6GWPa.js} +1 -1
  244. package/web-shell/assets/index-B49xd8_A.css +5 -0
  245. package/web-shell/assets/{index-CdC3pjP3.js → index-CMaZgs6B.js} +1 -1
  246. package/web-shell/assets/index-D-cDAZgO.js +1192 -0
  247. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-BZshyoGT.js} +1 -1
  248. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-CT2ssZqC.js} +1 -1
  249. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-BtMQ0rDG.js} +1 -1
  250. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-CoDbK5Db.js} +1 -1
  251. package/web-shell/assets/{linear-uIroDsmp.js → linear-CwhZ6u7u.js} +1 -1
  252. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-C9nn0nrr.js} +5 -5
  253. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-BXUbjTeL.js} +1 -1
  254. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-JddiYlWQ.js} +1 -1
  255. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-DK5HKzXO.js} +1 -1
  256. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-Y-uipa_6.js} +1 -1
  257. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-BbWeqo8H.js} +1 -1
  258. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-tX2gOoo5.js} +1 -1
  259. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-CACN457G.js} +1 -1
  260. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DaUeO2zt.js +1 -0
  261. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-DnHWKSOq.js} +1 -1
  262. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BO8Yl2FG.js} +1 -1
  263. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-1NMqqrBi.js} +1 -1
  264. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-C3eWgIvD.js} +1 -1
  265. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-D0h8FgFX.js} +1 -1
  266. package/web-shell/index.html +2 -2
  267. package/chunks/chunk-EDFD7VOX.js +0 -368
  268. package/chunks/chunk-GFYFLDEG.js +0 -709
  269. package/chunks/chunk-LUJQUNKY.js +0 -3288
  270. package/chunks/nonInteractiveCli-YURFHZV5.js +0 -129
  271. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  272. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  273. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  274. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  275. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  276. 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-ETN2G32U.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-DJ4VHAFJ.js";
23
+ } from "./chunk-3ZL6YMO2.js";
22
24
  import {
23
25
  getErrorMessage as getErrorMessage2
24
- } from "./chunk-UZC5VPOJ.js";
26
+ } from "./chunk-IDGTC5AS.js";
25
27
  import {
26
28
  collectProviderModelsForProtocol,
27
29
  getAuthTypeFromEnv,
28
30
  resolveCliGenerationConfig
29
- } from "./chunk-HVGJWOR6.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-HD6EGS5K.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-RKUMFUFM.js";
55
+ } from "./chunk-LTQ5C5AB.js";
54
56
  import {
55
57
  parseChannelConfig
56
- } from "./chunk-EFAXBOQO.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-I7RRHHYG.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-BABX5XRO.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-BKNPMEN6.js";
110
+ } from "./chunk-NIJEXGV6.js";
109
111
  import {
110
112
  assembleMcpServers,
111
113
  getPendingGatedMcpServers,
112
114
  mcpCommand
113
- } from "./chunk-4MPYGENG.js";
115
+ } from "./chunk-DCCW7CRR.js";
114
116
  import {
115
117
  loadSettings
116
- } from "./chunk-6IITZE7O.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-TKASNYDS.js";
125
+ } from "./chunk-3QR5MOHP.js";
124
126
  import {
125
127
  loadEnvironment
126
- } from "./chunk-PR5XQ73G.js";
128
+ } from "./chunk-NQVA6O7F.js";
127
129
  import {
128
130
  getCliVersion
129
- } from "./chunk-GLH2NTPB.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-GMUPIMHF.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-GCY7QTCE.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-CPU6I5YV.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,
@@ -5165,6 +5170,11 @@ function coverageFromTranscripts(planPath, env = process.env) {
5165
5170
  const idleAgents = [];
5166
5171
  const unopenedAgents = [];
5167
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");
5168
5178
  const covered = /* @__PURE__ */ new Set();
5169
5179
  const uncoverable = /* @__PURE__ */ new Set();
5170
5180
  const rosterForRun = requiredAgents(plan);
@@ -5215,14 +5225,20 @@ function coverageFromTranscripts(planPath, env = process.env) {
5215
5225
  rewrittenThisRecord = true;
5216
5226
  if (!nothingBuiltAtAll && !superseded(rec, chunk)) {
5217
5227
  rewrittenPrompts.push(
5218
- `${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
+ )
5219
5232
  );
5220
5233
  }
5221
5234
  } else if (!wasDeliveredVerbatim(rec.launchPrompt, b)) {
5222
5235
  rewrittenThisRecord = true;
5223
5236
  if (!superseded(rec, chunk)) {
5224
5237
  rewrittenPrompts.push(
5225
- `${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
+ )
5226
5242
  );
5227
5243
  }
5228
5244
  }
@@ -5256,7 +5272,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5256
5272
  const nobodyBuiltAnything = roster.length > 1 && briefless.length === roster.length;
5257
5273
  if (nobodyBuiltAnything) {
5258
5274
  missingRoles.push(
5259
- `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
+ )
5260
5279
  );
5261
5280
  }
5262
5281
  const buildable = roster.filter((r) => builtOf(r.key) !== void 0);
@@ -5300,7 +5319,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5300
5319
  if (b === void 0) {
5301
5320
  if (!nobodyBuiltAnything) {
5302
5321
  missingRoles.push(
5303
- `${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
+ )
5304
5326
  );
5305
5327
  }
5306
5328
  missingRoleSelectors.push(selectorOf(req));
@@ -5311,7 +5333,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5311
5333
  if (pick2 === void 0) {
5312
5334
  const anyMatch = candidatesOf[buildableIdx].length > 0;
5313
5335
  missingRoles.push(
5314
- 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
+ )
5315
5340
  );
5316
5341
  missingRoleSelectors.push(selectorOf(req));
5317
5342
  continue;
@@ -5322,7 +5347,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5322
5347
  );
5323
5348
  if (!opened) {
5324
5349
  unreadBriefs.push(
5325
- `${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
+ )
5326
5354
  );
5327
5355
  }
5328
5356
  }
@@ -5342,6 +5370,7 @@ function coverageFromTranscripts(planPath, env = process.env) {
5342
5370
  rewrittenPrompts,
5343
5371
  missingRoles,
5344
5372
  missingRoleSelectors,
5373
+ disclosures,
5345
5374
  unreadBriefs,
5346
5375
  missingChunks,
5347
5376
  uncoverableChunks: [...uncoverable].sort((a, b) => a - b),
@@ -5349,7 +5378,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5349
5378
  };
5350
5379
  }
5351
5380
  __name(coverageFromTranscripts, "coverageFromTranscripts");
5352
- 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");
5353
5385
  var REVERSE_AUDIT_GAP = {
5354
5386
  // Not "no auditor ran": a run that skipped the builder and hand-wrote the
5355
5387
  // launch leaves no brief file to open, so this shape is reached before the
@@ -5443,12 +5475,14 @@ function verificationGaps(planPath, opts, env = process.env) {
5443
5475
  )}`
5444
5476
  );
5445
5477
  }
5478
+ let unverifiedFindings = false;
5446
5479
  if (opts.postsFindings) {
5447
5480
  const verifyKeys = [...built.keys()].filter(
5448
5481
  (k) => k === "verify" || k.startsWith("verify--")
5449
5482
  );
5450
5483
  const verify = bestDelivery(verifyKeys);
5451
5484
  if (verify !== "ok") {
5485
+ unverifiedFindings = true;
5452
5486
  gaps.push(`verification \u2014 ${VERIFY_GAP[verify].gap}`);
5453
5487
  remediation.push(
5454
5488
  `verification: ${VERIFY_GAP[verify].fix.replace(
@@ -5460,14 +5494,44 @@ function verificationGaps(planPath, opts, env = process.env) {
5460
5494
  );
5461
5495
  }
5462
5496
  }
5463
- return { ok: gaps.length === 0, gaps, remediation };
5497
+ return { ok: gaps.length === 0, gaps, remediation, unverifiedFindings };
5464
5498
  }
5465
5499
  __name(verificationGaps, "verificationGaps");
5466
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
+
5467
5532
  // packages/cli/src/commands/review/compose-review.ts
5468
- var CRITICAL_MARKER = "**[Critical]**";
5469
5533
  function withMarker(line) {
5470
- return line.startsWith(CRITICAL_MARKER) ? line : `${CRITICAL_MARKER} ${line}`;
5534
+ return line.startsWith(CRITICAL_PREFIX) ? line : `${CRITICAL_PREFIX} ${line}`;
5471
5535
  }
5472
5536
  __name(withMarker, "withMarker");
5473
5537
  function toCount(value, field) {
@@ -5523,13 +5587,21 @@ function composeReview(input) {
5523
5587
  input.unreviewedDimensions,
5524
5588
  "unreviewedDimensions"
5525
5589
  );
5590
+ const coverageEntries = [];
5526
5591
  const remediation = [];
5527
5592
  const planRef = input.planPath ? shellQuotePath(input.planPath) : "<plan>";
5528
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;
5529
5599
  if (!input.planPath) {
5530
- unreviewed.push(
5531
- "coverage \u2014 no plan was given, so this run cannot show that any of the diff was read"
5532
- );
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;
5533
5605
  } else {
5534
5606
  try {
5535
5607
  const cov = coverageFromTranscripts(input.planPath, input.env);
@@ -5542,9 +5614,10 @@ function composeReview(input) {
5542
5614
  if (!already) uncoverable.push(prefix);
5543
5615
  }
5544
5616
  for (const label2 of cov.idleAgents) {
5545
- unreviewed.push(
5546
- `${label2} \u2014 the agent made no tool call: it read nothing`
5547
- );
5617
+ coverageEntries.push({
5618
+ subject: label2,
5619
+ reason: "the agent made no tool call: it read nothing"
5620
+ });
5548
5621
  }
5549
5622
  if (cov.idleAgents.length > 0) {
5550
5623
  remediation.push(
@@ -5552,9 +5625,10 @@ function composeReview(input) {
5552
5625
  );
5553
5626
  }
5554
5627
  for (const label2 of cov.blindAgents) {
5555
- unreviewed.push(
5556
- `${label2} \u2014 launched with a prompt that never named the diff file, so it could not have read it`
5557
- );
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
+ });
5558
5632
  }
5559
5633
  if (cov.blindAgents.length > 0) {
5560
5634
  remediation.push(
@@ -5562,34 +5636,27 @@ function composeReview(input) {
5562
5636
  );
5563
5637
  }
5564
5638
  for (const label2 of cov.unopenedAgents) {
5565
- unreviewed.push(
5566
- `${label2} \u2014 pointed at diff lines it never opened: it made tool calls, but none of them read the diff`
5567
- );
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
+ });
5568
5643
  }
5569
5644
  if (cov.unopenedAgents.length > 0) {
5570
5645
  remediation.push(
5571
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"
5572
5647
  );
5573
5648
  }
5574
- for (const label2 of cov.rewrittenPrompts) {
5575
- unreviewed.push(label2);
5576
- }
5649
+ coverageEntries.push(...cov.disclosures);
5577
5650
  if (cov.rewrittenPrompts.length > 0) {
5578
5651
  remediation.push(
5579
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`
5580
5653
  );
5581
5654
  }
5582
- for (const label2 of cov.missingRoles) {
5583
- unreviewed.push(label2);
5584
- }
5585
5655
  if (cov.missingRoles.length > 0) {
5586
5656
  remediation.push(
5587
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`
5588
5658
  );
5589
5659
  }
5590
- for (const label2 of cov.unreadBriefs) {
5591
- unreviewed.push(label2);
5592
- }
5593
5660
  if (cov.unreadBriefs.length > 0) {
5594
5661
  remediation.push(
5595
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"
@@ -5597,23 +5664,35 @@ function composeReview(input) {
5597
5664
  }
5598
5665
  } catch (err) {
5599
5666
  const why = err instanceof TranscriptsUnavailableError ? `could not read the agents' transcripts (${err.message})` : `the plan could not be used (${err.message})`;
5600
- unreviewed.push(
5601
- `coverage \u2014 ${why}, so this run cannot show that any of the diff was read`
5602
- );
5667
+ coverageEntries.push({
5668
+ subject: "coverage",
5669
+ reason: `${why}, so this run cannot show that any of the diff was read`
5670
+ });
5603
5671
  }
5604
5672
  try {
5605
- const findingsToVerify = criticalsInline + suggestionsInline + bodyCriticals.filter((c2) => !/\[(?:build|test)\]/i.test(c2)).length;
5673
+ const findingsToVerify = criticalsInline + suggestionsInline + nonDeterministicBodyCriticals;
5606
5674
  const verification = verificationGaps(
5607
5675
  input.planPath,
5608
5676
  { postsFindings: findingsToVerify > 0 },
5609
5677
  input.env
5610
5678
  );
5611
- 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
+ }
5612
5688
  remediation.push(...verification.remediation);
5689
+ criticalsUnverified = verification.unverifiedFindings && criticalsNeedingVerify >= 1;
5613
5690
  } catch (err) {
5614
- unreviewed.push(
5615
- `verification \u2014 could not check that Step 4 and Step 5 ran (${err.message})`
5616
- );
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;
5617
5696
  }
5618
5697
  }
5619
5698
  const contextUnavailable = toBool(
@@ -5652,17 +5731,24 @@ function composeReview(input) {
5652
5731
  if (cannotTell.length > 0) cappedBy.push("cannot-tell-existing-critical");
5653
5732
  if (missingReceipts.length > 0) cappedBy.push("chunk-nobody-read");
5654
5733
  if (uncoverable.length > 0) cappedBy.push("uncoverable-chunk");
5655
- if (unreviewed.length > 0) cappedBy.push("unreviewed-dimension");
5734
+ if (unreviewed.length + coverageEntries.length > 0) {
5735
+ cappedBy.push("unreviewed-dimension");
5736
+ }
5656
5737
  if (contextUnavailable) cappedBy.push("context-unavailable");
5738
+ if (criticalsUnverified) cappedBy.push("criticals-unverified");
5657
5739
  let event = baseEvent;
5658
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
+ }
5659
5745
  let downgraded = false;
5660
5746
  let downgradedFrom = null;
5661
5747
  if (event === "APPROVE" && downgradeApprove) {
5662
5748
  event = "COMMENT";
5663
5749
  downgraded = true;
5664
5750
  downgradedFrom = "Approve";
5665
- } else if (event === "REQUEST_CHANGES" && downgradeRequestChanges) {
5751
+ } else if ((event === "REQUEST_CHANGES" || baseEvent === "REQUEST_CHANGES" && criticalsUnverified) && downgradeRequestChanges) {
5666
5752
  event = "COMMENT";
5667
5753
  downgraded = true;
5668
5754
  downgradedFrom = "Request changes";
@@ -5676,25 +5762,56 @@ ${footer}`, "finish");
5676
5762
  remediation.push(
5677
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`
5678
5764
  );
5679
- notReviewedParts.push(
5680
- `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}`)
5681
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
+ }
5682
5774
  }
5683
5775
  if (uncoverable.length > 0) {
5684
5776
  notReviewedParts.push(
5685
5777
  `Not reviewed: ${uncoverable.join(", ")} \u2014 a line there exceeds the read limit.`
5686
5778
  );
5687
5779
  }
5688
- const whiffedDimensions = unreviewed.filter((d) => !d.includes(" \u2014 "));
5689
- 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 "));
5690
5793
  if (whiffedDimensions.length > 0) {
5691
5794
  notReviewedParts.push(
5692
5795
  `Not reviewed: ${whiffedDimensions.join(", ")} \u2014 the agent returned no evidence of its walk twice.`
5693
5796
  );
5694
5797
  }
5695
- for (const d of explainedDimensions) {
5798
+ for (const d of explainedCaller) {
5696
5799
  notReviewedParts.push(`Not reviewed: ${d}.`);
5697
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
+ }
5698
5815
  const cannotTellBlock = cannotTell.length === 0 ? [] : [
5699
5816
  `Unresolved, please confirm: ${cannotTell.map((l) => withMarker(l)).join(" ")}`
5700
5817
  ];
@@ -5738,7 +5855,7 @@ ${footer}`, "finish");
5738
5855
  if (contextUnavailable) {
5739
5856
  clauses.push(contextUnavailableClause);
5740
5857
  } else {
5741
- 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
5742
5859
  // body could open "Reviewed — no blockers." two lines above "nobody read
5743
5860
  // them." Nothing nobody read can be certified blocker-free.
5744
5861
  missingReceipts.length === 0;
@@ -5747,12 +5864,12 @@ ${footer}`, "finish");
5747
5864
  if (suggestionsInline > 0) clauses.push("Suggestions are inline.");
5748
5865
  if (suggestionsDiscarded > 0) {
5749
5866
  clauses.push(
5750
- `${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.`
5751
5868
  );
5752
5869
  }
5753
5870
  clauses.push(...cannotTellBlock);
5754
5871
  clauses.push(...notReviewedParts);
5755
- if (downgradedFrom === "Request changes") {
5872
+ if (downgradedFrom === "Request changes" || criticalsUnverified) {
5756
5873
  clauses.push(...bodyCriticalBlock);
5757
5874
  }
5758
5875
  return {
@@ -5766,22 +5883,72 @@ ${footer}`, "finish");
5766
5883
  };
5767
5884
  }
5768
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");
5769
5918
  var composeReviewCommand = {
5770
5919
  command: "compose-review",
5771
- 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",
5772
5921
  builder: /* @__PURE__ */ __name((yargs) => yargs.option("input", {
5773
5922
  type: "string",
5774
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."
5775
5928
  }).option("out", {
5776
5929
  type: "string",
5777
5930
  describe: "Also write the {event, body} JSON to this path"
5778
5931
  }), "builder"),
5779
5932
  handler: /* @__PURE__ */ __name((argv) => {
5780
- 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
+ }
5781
5939
  const raw = readFileSync6(input ?? 0, "utf8");
5782
5940
  const parsed = JSON.parse(raw);
5783
5941
  delete parsed.env;
5784
- 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
+ });
5785
5952
  const json = JSON.stringify(
5786
5953
  { ...result, verdictLine: verdictLine(result) },
5787
5954
  null,
@@ -5812,7 +5979,9 @@ function verdictLine(r) {
5812
5979
  "context-unavailable": "the PR's existing discussion could not be read"
5813
5980
  };
5814
5981
  let line = `Verdict: ${label2[r.event]}`;
5815
- 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") {
5816
5985
  const reasons = r.cappedBy.map((c) => why[c] ?? c);
5817
5986
  if (r.downgraded) reasons.push("a presubmit check failed");
5818
5987
  line += ` \u2014 an Approve was NOT available: ${reasons.join("; ")}`;
@@ -7326,6 +7495,10 @@ var loadRulesCommand = {
7326
7495
  // packages/cli/src/commands/review/presubmit.ts
7327
7496
  init_esbuild_shims();
7328
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");
7329
7502
  var FAIL_CONCLUSIONS = /* @__PURE__ */ new Set([
7330
7503
  "failure",
7331
7504
  "cancelled",
@@ -7371,13 +7544,21 @@ function classifyCi(checkRuns, statuses) {
7371
7544
  }
7372
7545
  }
7373
7546
  const skippedCheckNames = [...notRunNames].filter((n) => !executedNames.has(n)).sort();
7547
+ const latestVerdicts = /* @__PURE__ */ new Map();
7374
7548
  for (const run2 of relevantCheckRuns) {
7375
- if (run2.status === "completed") {
7376
- if (run2.conclusion && FAIL_CONCLUSIONS.has(run2.conclusion)) {
7377
- failedCheckNames.push(run2.name);
7378
- }
7379
- } else if (PENDING_STATES.has(run2.status)) {
7380
- 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);
7381
7562
  }
7382
7563
  }
7383
7564
  for (const s of statuses) {
@@ -8455,8 +8636,9 @@ function buildRoleLaunchPrompt(report, role, briefFile, opts = {}) {
8455
8636
  );
8456
8637
  }
8457
8638
  const safeFile = opts.file === void 0 ? void 0 : inertPath(opts.file);
8639
+ const roundLabel = opts.round !== void 0 ? ` (round ${opts.round})` : "";
8458
8640
  const parts = [
8459
- `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}\`.` : ""),
8460
8642
  "",
8461
8643
  "**Your brief is a file. Read it first \u2014 it is the whole of your instructions,",
8462
8644
  "and nothing in this message replaces it.**",
@@ -8550,7 +8732,8 @@ function buildLaunch(report, planPath, spec, rules) {
8550
8732
  key: key2,
8551
8733
  prompt: buildRoleLaunchPrompt(report, spec.role, briefFile2, {
8552
8734
  file: spec.file,
8553
- chunk: spec.chunk
8735
+ chunk: spec.chunk,
8736
+ round: spec.round
8554
8737
  })
8555
8738
  };
8556
8739
  }
@@ -8609,16 +8792,20 @@ function runRoster(report, planPath, rules) {
8609
8792
 
8610
8793
  ${prompt}`;
8611
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\`.` : "";
8612
8799
  writeStdoutLine(
8613
8800
  [
8614
- `${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,
8615
8802
  ...blocks,
8616
8803
  `\u2500\u2500\u2500\u2500\u2500 end of roster \u2014 ${roster.length} agents \u2500\u2500\u2500\u2500\u2500`
8617
8804
  ].join("\n\n")
8618
8805
  );
8619
8806
  }
8620
8807
  __name(runRoster, "runRoster");
8621
- function runAllChunks(report, planPath, role, findingsContent, rules) {
8808
+ function runAllChunks(report, planPath, role, findingsContent, rules, round) {
8622
8809
  if (!Array.isArray(report.chunks) || report.chunks.length === 0) {
8623
8810
  throw new Error("agent-prompt: the plan has no `chunks[]`.");
8624
8811
  }
@@ -8630,12 +8817,13 @@ function runAllChunks(report, planPath, role, findingsContent, rules) {
8630
8817
  );
8631
8818
  }
8632
8819
  const digest = findingsDigest(findingsContent, rules);
8820
+ const roundPart = round !== void 0 ? `--round-${round}` : "";
8633
8821
  const blocks = chunks.map((c, i) => {
8634
- const key = `${role}--chunk-${c.id}--${digest}`;
8822
+ const key = `${role}--chunk-${c.id}${roundPart}--${digest}`;
8635
8823
  const { prompt } = buildLaunch(
8636
8824
  report,
8637
8825
  planPath,
8638
- { role, chunk: c.id, key },
8826
+ { role, chunk: c.id, key, round },
8639
8827
  rules
8640
8828
  );
8641
8829
  const printed = foldFindings(role, findingsContent, prompt);
@@ -8659,19 +8847,20 @@ function runAgentPrompt(args) {
8659
8847
  const hasFile = typeof args.file === "string" && args.file.length > 0;
8660
8848
  const hasFindings = typeof args.findings === "string" && args.findings.length > 0;
8661
8849
  const hasWhole = !!args.wholeDiff;
8850
+ const hasRound = args.round !== void 0;
8662
8851
  const bad = /* @__PURE__ */ __name((msg) => {
8663
8852
  throw new Error(`agent-prompt: ${msg}`);
8664
8853
  }, "bad");
8665
8854
  if (args.roster) {
8666
- if (hasChunk || hasRole || hasFile || hasFindings || hasWhole || args.allChunks) {
8855
+ if (hasChunk || hasRole || hasFile || hasFindings || hasWhole || args.allChunks || hasRound) {
8667
8856
  bad(
8668
- "--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.)"
8669
8858
  );
8670
8859
  }
8671
8860
  } else if (hasWhole) {
8672
- if (hasChunk || hasRole || hasFile || hasFindings || args.allChunks) {
8861
+ if (hasChunk || hasRole || hasFile || hasFindings || args.allChunks || hasRound) {
8673
8862
  bad(
8674
- "--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."
8675
8864
  );
8676
8865
  }
8677
8866
  } else if (hasRole) {
@@ -8717,6 +8906,21 @@ function runAgentPrompt(args) {
8717
8906
  `--findings folds a findings list into the prompt, only for a role that takes one (${findingRoles.join(", ")}); role "${role}" does not.`
8718
8907
  );
8719
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
+ }
8720
8924
  } else if (hasFindings) {
8721
8925
  const findingRoles = Object.keys(BRIEFS).filter(
8722
8926
  (r) => BRIEFS[r].acceptsFindings
@@ -8733,6 +8937,13 @@ function runAgentPrompt(args) {
8733
8937
  bad(
8734
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)."
8735
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
+ );
8736
8947
  } else if (!hasChunk) {
8737
8948
  bad(
8738
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)."
@@ -8782,7 +8993,8 @@ function runAgentPrompt(args) {
8782
8993
  args.plan,
8783
8994
  args.role,
8784
8995
  findingsContent,
8785
- rules
8996
+ rules,
8997
+ args.round
8786
8998
  );
8787
8999
  return;
8788
9000
  }
@@ -8795,7 +9007,8 @@ function runAgentPrompt(args) {
8795
9007
  let keyOverride;
8796
9008
  if (findingsContent !== void 0 && args.role) {
8797
9009
  const base = typeof args.chunk === "number" ? `${args.role}--chunk-${args.chunk}` : args.role;
8798
- keyOverride = `${base}--${findingsDigest(findingsContent, rules)}`;
9010
+ const roundPart = args.round !== void 0 ? `--round-${args.round}` : "";
9011
+ keyOverride = `${base}${roundPart}--${findingsDigest(findingsContent, rules)}`;
8799
9012
  }
8800
9013
  ({ key, prompt } = buildLaunch(
8801
9014
  report,
@@ -8804,7 +9017,8 @@ function runAgentPrompt(args) {
8804
9017
  role: args.role,
8805
9018
  chunk: args.chunk,
8806
9019
  file: args.file,
8807
- key: keyOverride
9020
+ key: keyOverride,
9021
+ round: args.round
8808
9022
  } : { chunk: args.chunk },
8809
9023
  rules
8810
9024
  ));
@@ -8846,6 +9060,9 @@ var agentPromptCommand = {
8846
9060
  }).option("findings", {
8847
9061
  type: "string",
8848
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."
8849
9066
  }), "builder"),
8850
9067
  handler: /* @__PURE__ */ __name((argv) => {
8851
9068
  runAgentPrompt({
@@ -8857,7 +9074,8 @@ var agentPromptCommand = {
8857
9074
  roster: argv["roster"] === true,
8858
9075
  allChunks: argv["all-chunks"] === true,
8859
9076
  rules: argv["rules"],
8860
- findings: argv["findings"]
9077
+ findings: argv["findings"],
9078
+ round: argv["round"]
8861
9079
  });
8862
9080
  }, "handler")
8863
9081
  };
@@ -9455,8 +9673,6 @@ function isDiffLine(n) {
9455
9673
  return typeof n === "number" && Number.isSafeInteger(n) && n > 0;
9456
9674
  }
9457
9675
  __name(isDiffLine, "isDiffLine");
9458
- var CRITICAL_PREFIX = "**[Critical]**";
9459
- var SUGGESTION_PREFIX = "**[Suggestion]**";
9460
9676
  function authorization(args) {
9461
9677
  if (args.userAuthorized) {
9462
9678
  return { ok: true, why: "the user asked for this review to be published" };
@@ -9517,12 +9733,7 @@ __name(authorization, "authorization");
9517
9733
  function compose(payload) {
9518
9734
  const comments = payload.comments ?? [];
9519
9735
  const state = payload.state ?? {};
9520
- const criticalsInline = comments.filter(
9521
- (c) => (c.body ?? "").trimStart().startsWith(CRITICAL_PREFIX)
9522
- ).length;
9523
- const suggestionsInline = comments.filter(
9524
- (c) => (c.body ?? "").trimStart().startsWith(SUGGESTION_PREFIX)
9525
- ).length;
9736
+ const { criticalsInline, suggestionsInline } = countInlineFindings(comments);
9526
9737
  const { env: _dropped, ...rest } = state;
9527
9738
  void _dropped;
9528
9739
  const r = composeReview({
@@ -9566,6 +9777,11 @@ function inconsistencies(payload, event) {
9566
9777
  const at = `comments[${i}]`;
9567
9778
  if (!c.path) problems.push(`${at} has no \`path\``);
9568
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
+ }
9569
9785
  if (!isDiffLine(c.line)) {
9570
9786
  problems.push(
9571
9787
  `${at} has no usable \`line\` (${JSON.stringify(c.line)}) \u2014 a line is a positive whole number; resolve its anchor first`
@@ -10313,10 +10529,10 @@ var updateCommand3 = {
10313
10529
  stdioHelpers,
10314
10530
  { updateEventEmitter }
10315
10531
  ] = await Promise.all([
10316
- import("./settings-JC3VC53L.js"),
10317
- import("./updateCheck-AHTHWLAM.js"),
10318
- import("./installationInfo-LROMXYLX.js"),
10319
- import("./standalone-update-UUJWJWYY.js"),
10532
+ import("./settings-H5O22TGQ.js"),
10533
+ import("./updateCheck-EKIPND4B.js"),
10534
+ import("./installationInfo-3UETF773.js"),
10535
+ import("./standalone-update-UC6CWBLH.js"),
10320
10536
  import("./stdioHelpers-HGIYTWAY.js"),
10321
10537
  import("./updateEventEmitter-5MKC7BLQ.js")
10322
10538
  ]);