@qwen-code/qwen-code 0.19.12 → 0.20.0-nightly.20260721.cda0e0348

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 (280) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +1 -1
  2. package/bundled/qc-helper/docs/features/commands.md +54 -0
  3. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  4. package/bundled/qc-helper/docs/qwen-serve.md +44 -6
  5. package/bundled/review/DESIGN.md +2 -2
  6. package/bundled/review/SKILL.md +13 -9
  7. package/chunks/{MaxSizedBox-QOXLJGAF.js → MaxSizedBox-EE76OHAP.js} +30 -27
  8. package/chunks/{StandaloneSessionPicker-FLV6CGYJ.js → StandaloneSessionPicker-WZH4PC3K.js} +50 -45
  9. package/chunks/{acpAgent-OB2CTF3P.js → acpAgent-2ATF4LMP.js} +437 -156
  10. package/chunks/{agent-CKSI7BTR.js → agent-KTOOFWMV.js} +22 -22
  11. package/chunks/{agent-headless-U36LIYTU.js → agent-headless-WVJCQ27D.js} +22 -22
  12. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-W4JLNYWQ.js} +6 -5
  13. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  14. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  15. package/chunks/{bridge-AIKTINJG.js → bridge-T4TLAZSJ.js} +25 -25
  16. package/chunks/build-SSCNEHZZ.js +62 -0
  17. package/chunks/{ca-2SL2BXTK.js → ca-ISKASTR5.js} +606 -200
  18. package/chunks/{channel-worker-group-NEUVTPB2.js → channel-worker-group-QZV2SP5U.js} +4 -4
  19. package/chunks/{channel-worker-manager-7CQVOVWV.js → channel-worker-manager-3GMAU45H.js} +4 -4
  20. package/chunks/{channel-worker-supervisor-3BU2KNCZ.js → channel-worker-supervisor-QCXSXCRY.js} +3 -3
  21. package/chunks/{chunk-6ETOSWAO.js → chunk-246TW4IX.js} +3 -3
  22. package/chunks/{chunk-2CCDMJM7.js → chunk-25Y6JSH2.js} +3 -3
  23. package/chunks/{chunk-XSEWNUMZ.js → chunk-2CWOJ2FA.js} +8 -8
  24. package/chunks/{chunk-UZC5VPOJ.js → chunk-2GFRA3MN.js} +3 -3
  25. package/chunks/chunk-2GOPPEHK.js +442 -0
  26. package/chunks/{chunk-MRE77ST5.js → chunk-2ITGJJE2.js} +69 -2216
  27. package/chunks/{chunk-BABX5XRO.js → chunk-2LI23QA6.js} +1 -1
  28. package/chunks/{chunk-EFAXBOQO.js → chunk-32F7BZSK.js} +7 -7
  29. package/chunks/chunk-43T5WDQ7.js +127 -0
  30. package/chunks/{chunk-DJ4VHAFJ.js → chunk-4CWPMWCD.js} +7 -3
  31. package/chunks/{chunk-GMUPIMHF.js → chunk-4RA7PWIY.js} +3 -3
  32. package/chunks/{chunk-6IITZE7O.js → chunk-5JX5EWR5.js} +7 -7
  33. package/chunks/{chunk-OBSLEYCD.js → chunk-5PZ6R37W.js} +29 -2
  34. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  35. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  36. package/chunks/{chunk-GSPWDTYY.js → chunk-5WG2K5RH.js} +53 -16
  37. package/chunks/{chunk-NPMVLWYL.js → chunk-5YVZ2XLV.js} +6 -6
  38. package/chunks/{chunk-TKASNYDS.js → chunk-6DHWO5ZF.js} +3 -3
  39. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  40. package/chunks/{chunk-RKUMFUFM.js → chunk-6MC5ASQK.js} +4 -4
  41. package/chunks/{chunk-HZ4M2UQD.js → chunk-6RVJRVQR.js} +1 -1
  42. package/chunks/{chunk-W6CQPLWM.js → chunk-6ZBPS62S.js} +1 -1
  43. package/chunks/chunk-7KGXAXF7.js +114 -0
  44. package/chunks/{chunk-PK7COE5O.js → chunk-ABIL4ZQU.js} +1 -1
  45. package/chunks/{chunk-OEHCAWUA.js → chunk-ACW3VNUE.js} +2 -2
  46. package/chunks/{chunk-APOFULHK.js → chunk-AWVS63WA.js} +7 -6
  47. package/chunks/{chunk-KGWA7XYL.js → chunk-AY3CSB6F.js} +6 -226
  48. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  49. package/chunks/{chunk-42VIHAYT.js → chunk-B452RETY.js} +1 -1
  50. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  51. package/chunks/{chunk-5N7M4XYN.js → chunk-BUKOHGBE.js} +5 -5
  52. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  53. package/chunks/{chunk-WIYV7CSF.js → chunk-BWK3FX3K.js} +3 -3
  54. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  55. package/chunks/{chunk-KRMARA3A.js → chunk-CG2HPAVD.js} +29 -13
  56. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  57. package/chunks/{chunk-HD6EGS5K.js → chunk-CUJX3F4X.js} +31 -6
  58. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  59. package/chunks/{chunk-PUKUUASO.js → chunk-DMRO4GU2.js} +1 -1
  60. package/chunks/{chunk-64GC5EMF.js → chunk-DZZIOIVF.js} +1 -1
  61. package/chunks/{chunk-FUSMC3SZ.js → chunk-E5QFCC4X.js} +13 -8
  62. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  63. package/chunks/{chunk-NE6HHLL3.js → chunk-EDMGFJ3E.js} +2 -2
  64. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  65. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  66. package/chunks/{chunk-NALRQ3SG.js → chunk-FCUUJKZF.js} +394 -128
  67. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  68. package/chunks/{chunk-CHPQFLW6.js → chunk-FYA3Y5JR.js} +5 -5
  69. package/chunks/{chunk-V4PCIS25.js → chunk-FZVSFBNW.js} +69 -7
  70. package/chunks/{chunk-4MPYGENG.js → chunk-G45NOBV7.js} +6 -6
  71. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  72. package/chunks/{chunk-3B6PSWHE.js → chunk-GH7OEOYU.js} +4 -4
  73. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  74. package/chunks/chunk-GMGDLUC7.js +37 -0
  75. package/chunks/{chunk-2476XGOU.js → chunk-GPILFVPY.js} +1 -1
  76. package/chunks/{chunk-EISVEV45.js → chunk-H24SOJIQ.js} +2 -2
  77. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  78. package/chunks/{chunk-QIFTJDBY.js → chunk-IM2A6YO3.js} +1 -1
  79. package/chunks/{chunk-R3EDIMYZ.js → chunk-IYZENXFW.js} +1 -1
  80. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  81. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  82. package/chunks/{chunk-ETN2G32U.js → chunk-JPRLCXAO.js} +4 -4
  83. package/chunks/{chunk-WHQNBBWW.js → chunk-JQMBPGOU.js} +2 -2
  84. package/chunks/{chunk-5QSVANRT.js → chunk-JR6UJ24K.js} +2 -2
  85. package/chunks/{chunk-VLHQMOZK.js → chunk-JRW46GQX.js} +3 -3
  86. package/chunks/{chunk-DUR7BZYK.js → chunk-KRI4VCHX.js} +53 -28
  87. package/chunks/{chunk-PR5XQ73G.js → chunk-KTNIZG2C.js} +2 -2
  88. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  89. package/chunks/{chunk-HVGJWOR6.js → chunk-L4YSPHR4.js} +2 -2
  90. package/chunks/{chunk-BEZPRKD3.js → chunk-LC5CAVMS.js} +160 -2
  91. package/chunks/{chunk-67Q33DQY.js → chunk-LLDGOZMJ.js} +4 -4
  92. package/chunks/{chunk-UCTCDLDS.js → chunk-LWQ4IAOJ.js} +136 -4
  93. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  94. package/chunks/{chunk-GCY7QTCE.js → chunk-NO6XTCYT.js} +1822 -424
  95. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  96. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  97. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  98. package/chunks/{chunk-GW7BONBU.js → chunk-OV2KB55J.js} +5 -5
  99. package/chunks/{chunk-CPU6I5YV.js → chunk-P64HXIC5.js} +115 -32
  100. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  101. package/chunks/{chunk-GXFYV7MP.js → chunk-PFKNXN67.js} +1106 -592
  102. package/chunks/{chunk-KNGZ5EYL.js → chunk-PYNCSQSI.js} +198 -120
  103. package/chunks/{chunk-I7RRHHYG.js → chunk-QKTHJXCS.js} +1 -1
  104. package/chunks/chunk-QKYTTBYW.js +624 -0
  105. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  106. package/chunks/{chunk-W4UN42YP.js → chunk-R3VZNHRX.js} +85 -21
  107. package/chunks/chunk-R5N7NF5D.js +1187 -0
  108. package/chunks/{chunk-ZSDFNE6Y.js → chunk-RF34V75B.js} +3 -3
  109. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  110. package/chunks/chunk-RS7MT2QG.js +305 -0
  111. package/chunks/{chunk-BKNPMEN6.js → chunk-RVLZCXEE.js} +162 -17
  112. package/chunks/chunk-SV5PQVQE.js +71 -0
  113. package/chunks/{chunk-3ESL7JXA.js → chunk-U4VGYZN7.js} +3 -3
  114. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  115. package/chunks/{chunk-ZGT623SG.js → chunk-USTF7LPI.js} +12 -12
  116. package/chunks/chunk-V7RNNPGC.js +44 -0
  117. package/chunks/{chunk-VEFR4XJQ.js → chunk-W3BKN3LO.js} +1 -1
  118. package/chunks/{chunk-4SJJT466.js → chunk-WQQDJE2P.js} +94 -177
  119. package/chunks/{chunk-KMJOMWHE.js → chunk-WRRF6TEQ.js} +1 -1
  120. package/chunks/{chunk-GLH2NTPB.js → chunk-XCHUDLER.js} +1 -1
  121. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  122. package/chunks/{chunk-N47VAEAJ.js → chunk-XZOBDSDG.js} +2379 -1291
  123. package/chunks/chunk-YGIUIIIF.js +125 -0
  124. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  125. package/chunks/{computer-use-4PUGCUQK.js → computer-use-M6MGRJF2.js} +22 -22
  126. package/chunks/{config-utils-6PJUXHLI.js → config-utils-MOGE4EVB.js} +3 -3
  127. package/chunks/{contextCommand-C57KTWFV.js → contextCommand-HTRJJYNE.js} +25 -26
  128. package/chunks/{create-sub-session-5Q42XR6I.js → create-sub-session-MB35IHCR.js} +22 -22
  129. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  130. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  131. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  132. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  133. package/chunks/{daemon-ZW6LHOXT.js → daemon-KLPTQIE4.js} +287 -143
  134. package/chunks/{daemon-status-provider-YPV3UXHT.js → daemon-status-provider-67EKK6S3.js} +29 -29
  135. package/chunks/{dist-NUXRQHC5.js → dist-OAV7LJGJ.js} +1 -1
  136. package/chunks/{dist-XLE6ODMB.js → dist-OMW6WDEO.js} +1 -1
  137. package/chunks/{dist-J2H4KTLB.js → dist-PJLG2XYX.js} +1 -1
  138. package/chunks/{dist-IEQSDXS7.js → dist-UIFWIFRO.js} +2 -2
  139. package/chunks/{dist-IGZMVS5R.js → dist-VGJTZL4E.js} +33 -22
  140. package/chunks/{dist-3DQNQJ6H.js → dist-XBJVSWS2.js} +1 -1
  141. package/chunks/{earlyInputCapture-5VDWSYAM.js → earlyInputCapture-7QJX25AC.js} +23 -23
  142. package/chunks/{edit-GORZTX2U.js → edit-BTPQWGAA.js} +23 -23
  143. package/chunks/{enter-worktree-LJB2AW4L.js → enter-worktree-N3SEYKOO.js} +22 -22
  144. package/chunks/{enterPlanMode-LIIPP37T.js → enterPlanMode-TN2JV5MY.js} +28 -23
  145. package/chunks/{environment-HQ2UHJ35.js → environment-HP6RK262.js} +24 -24
  146. package/chunks/{errors-6JD5VMVQ.js → errors-VHGRDDOQ.js} +24 -24
  147. package/chunks/{exit-worktree-IEP2WHOV.js → exit-worktree-FI3SQY3U.js} +22 -22
  148. package/chunks/{exitPlanMode-U5Z6XBLO.js → exitPlanMode-NZWRVIIY.js} +22 -22
  149. package/chunks/{fast-path-HFKNMP23.js → fast-path-EGP7AXNR.js} +3 -2
  150. package/chunks/{gemini-C2SCJH3N.js → gemini-AN5YMD5O.js} +70 -68
  151. package/chunks/{geminiContentGenerator-ADZTXEKV.js → geminiContentGenerator-ABTMU4FE.js} +4 -4
  152. package/chunks/{glob-GOAPGD6G.js → glob-5YABOPJB.js} +22 -22
  153. package/chunks/{grep-HZLSTX7D.js → grep-U67FKUJT.js} +22 -22
  154. package/chunks/{handleAutoUpdate-UF74WGFE.js → handleAutoUpdate-OOKBP5VD.js} +27 -28
  155. package/chunks/{i18n-FMXIYUOC.js → i18n-GMQV324P.js} +23 -23
  156. package/chunks/{initializer-ERDBM3DU.js → initializer-NWALZGQ5.js} +28 -28
  157. package/chunks/{installationInfo-LROMXYLX.js → installationInfo-Y3M433E7.js} +25 -23
  158. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  159. package/chunks/{list-6JPJROU5.js → list-CQDDWHTS.js} +30 -30
  160. package/chunks/{loadedSettingsAdapter-QCWYUBBF.js → loadedSettingsAdapter-I5KG37EI.js} +27 -27
  161. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  162. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  163. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  164. package/chunks/{mcp-3P3KWYWO.js → mcp-24HHCBSP.js} +27 -27
  165. package/chunks/{monitor-LMYKCF6R.js → monitor-Z7NZNNRC.js} +22 -22
  166. package/chunks/nonInteractiveCli-GVF2XDJT.js +126 -0
  167. package/chunks/{notebook-edit-IBEOVZ6A.js → notebook-edit-GFOYAQAZ.js} +23 -23
  168. package/chunks/{openaiContentGenerator-42PZKET5.js → openaiContentGenerator-XAAYV6WR.js} +11 -11
  169. package/chunks/{pidfile-VTBDIGOH.js → pidfile-ILI37KRQ.js} +23 -23
  170. package/chunks/{processUtils-L7ZKOGDG.js → processUtils-LIPJMLVZ.js} +2 -2
  171. package/chunks/{qwenContentGenerator-VR2CNFGI.js → qwenContentGenerator-DLJ3KKGZ.js} +24 -24
  172. package/chunks/{qwenOAuth2-6LS2T3Q6.js → qwenOAuth2-J47FU5PW.js} +11 -11
  173. package/chunks/react-SG7JAQSZ.js +8 -0
  174. package/chunks/{read-file-VSKOE22I.js → read-file-LCQ2KNNP.js} +8 -8
  175. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  176. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  177. package/chunks/resumeHistoryUtils-PSCSAKA6.js +78 -0
  178. package/chunks/{ripGrep-5V5FLW2A.js → ripGrep-Y2XW4EFC.js} +22 -22
  179. package/chunks/{run-qwen-serve-LSOPP4R2.js → run-qwen-serve-DQ5ZIR36.js} +1459 -148
  180. package/chunks/{runtime-LT7R4CS5.js → runtime-6MQFF2A6.js} +33 -31
  181. package/chunks/{scheduler-YOWQ7KZP.js → scheduler-K4S7NY3G.js} +22 -22
  182. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  183. package/chunks/{serve-VWLBXKGK.js → serve-JFAAPC5J.js} +27 -27
  184. package/chunks/{server-3RW3FYOH.js → server-QB6CHRZN.js} +866 -271
  185. package/chunks/{session-ZONXFOBQ.js → session-FKPVXAAB.js} +79 -163
  186. package/chunks/{settings-JC3VC53L.js → settings-CADELKSU.js} +26 -26
  187. package/chunks/{shell-2NGEMAVM.js → shell-EON6WVVH.js} +22 -22
  188. package/chunks/{skill-3U2T6H3E.js → skill-FKSYXJ5U.js} +10 -10
  189. package/chunks/{spawnChannel-QEAUPARQ.js → spawnChannel-VM5IHLJO.js} +24 -24
  190. package/chunks/{src-75ZPXO7B.js → src-Q4XB6SVD.js} +66 -22
  191. package/chunks/{standalone-update-UUJWJWYY.js → standalone-update-KGZHPBMA.js} +24 -24
  192. package/chunks/{startInteractiveUI-V7XISPQ6.js → startInteractiveUI-EYDJIIIZ.js} +5484 -2045
  193. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  194. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  195. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  196. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  197. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  198. package/chunks/{team-create-R6AXDYPG.js → team-create-CYP3YKYT.js} +22 -22
  199. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  200. package/chunks/{team-plan-approval-O2ZPPT64.js → team-plan-approval-5LXIFKNV.js} +22 -22
  201. package/chunks/{theme-manager-YIX2IC2D.js → theme-manager-QOUMDWMP.js} +23 -23
  202. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  203. package/chunks/{tool-search-5IE2VO7X.js → tool-search-Q27QHQU3.js} +9 -9
  204. package/chunks/{total-session-admission-K6APQYEF.js → total-session-admission-HWVCZ2WR.js} +25 -25
  205. package/chunks/{trustedFolders-GPSSPVBF.js → trustedFolders-C6664IQC.js} +23 -23
  206. package/chunks/{update-relaunch-4BVAPX6Y.js → update-relaunch-QC3E4FZW.js} +9 -9
  207. package/chunks/{updateCheck-AHTHWLAM.js → updateCheck-MVUKJMBX.js} +33 -26
  208. package/chunks/useAutoAcceptIndicator-J234IFIS.js +80 -0
  209. package/chunks/{validateNonInterActiveAuth-UKAPCWDM.js → validateNonInterActiveAuth-YPPEKX4N.js} +61 -63
  210. package/chunks/{version-EXGWKKQE.js → version-5IXFQ4PT.js} +1 -1
  211. package/chunks/{web-fetch-ZDNE6FF2.js → web-fetch-L62NQVKN.js} +10 -10
  212. package/chunks/{workflow-G7U6OQWS.js → workflow-6MHBBFQU.js} +23 -23
  213. package/chunks/{workspace-providers-status-W6CEA6YM.js → workspace-providers-status-ZTW2B5QU.js} +30 -30
  214. package/chunks/{workspace-registration-store-OGBMWCLC.js → workspace-registration-store-P6QHCSMU.js} +7 -1
  215. package/chunks/{workspace-registry-ZUWQM44P.js → workspace-registry-R54M5O3W.js} +25 -25
  216. package/chunks/{workspace-service-UXX5P7GU.js → workspace-service-WYLRGM4A.js} +32 -32
  217. package/chunks/{workspace-skills-status-635B5R7N.js → workspace-skills-status-NN5QFU3A.js} +28 -28
  218. package/chunks/{write-file-DR3HN7IH.js → write-file-EAT3CHUK.js} +23 -23
  219. package/cli.js +11 -11
  220. package/locales/ca.js +763 -201
  221. package/package.json +3 -3
  222. package/web-shell/assets/{arc-_dVIKMdB.js → arc-B0iTWRo2.js} +1 -1
  223. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-DSQP4-9D.js} +1 -1
  224. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-BNPVXVT3.js} +1 -1
  225. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-DEHfJFiD.js} +1 -1
  226. package/web-shell/assets/channel-tVz-qNSq.js +1 -0
  227. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-VZ0uL1p9.js} +1 -1
  228. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-D5TKmvwG.js} +1 -1
  229. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-BDW1Lcq-.js} +1 -1
  230. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-Cj4h85iM.js} +1 -1
  231. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-5LeqiOhZ.js} +1 -1
  232. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-BaTgsco7.js} +1 -1
  233. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-t3uGlIUk.js} +1 -1
  234. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-rOnNXL2Q.js} +1 -1
  235. package/web-shell/assets/classDiagram-4FO5ZUOK-CWuaBxYV.js +1 -0
  236. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CWuaBxYV.js +1 -0
  237. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-CcqXykgA.js} +1 -1
  238. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-Dkjrchoy.js} +1 -1
  239. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-B6lcra9M.js} +1 -1
  240. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-bAIzq3PT.js} +1 -1
  241. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-G9MAZDNW.js} +1 -1
  242. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DVLF1uWZ.js} +1 -1
  243. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Cf7y20Tc.js} +1 -1
  244. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-C7ETZB3o.js} +1 -1
  245. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cl2xgL6J.js} +1 -1
  246. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-BgjbMs3q.js} +1 -1
  247. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-JVX34Omm.js} +1 -1
  248. package/web-shell/assets/index-48bIcdqF.js +1197 -0
  249. package/web-shell/assets/{index-CdC3pjP3.js → index-BG7Zc4f_.js} +1 -1
  250. package/web-shell/assets/index-BI-JAO07.css +5 -0
  251. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-3NYyMeZU.js} +1 -1
  252. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-C03VCu-U.js} +1 -1
  253. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-C9PuBRZW.js} +1 -1
  254. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-C3LvioWR.js} +1 -1
  255. package/web-shell/assets/{linear-uIroDsmp.js → linear-Du6Yw8N_.js} +1 -1
  256. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-BXY5D2-X.js} +5 -5
  257. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-2UrHLaDp.js} +1 -1
  258. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-dC03ml45.js} +1 -1
  259. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-CD6jARrp.js} +1 -1
  260. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-BrK8aXfv.js} +1 -1
  261. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-B5Vitki_.js} +1 -1
  262. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-CBy2t6Bo.js} +1 -1
  263. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-Enrka6T2.js} +1 -1
  264. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DUtYfXpW.js +1 -0
  265. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-CwFq78ss.js} +1 -1
  266. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BkOidM0g.js} +1 -1
  267. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-D_j13hQW.js} +1 -1
  268. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-7EveB1w6.js} +1 -1
  269. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-DRkBhMXr.js} +1 -1
  270. package/web-shell/index.html +2 -2
  271. package/chunks/chunk-EDFD7VOX.js +0 -368
  272. package/chunks/chunk-GFYFLDEG.js +0 -709
  273. package/chunks/chunk-LUJQUNKY.js +0 -3288
  274. package/chunks/nonInteractiveCli-YURFHZV5.js +0 -129
  275. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  276. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  277. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  278. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  279. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  280. 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-JPRLCXAO.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-4CWPMWCD.js";
22
24
  import {
23
25
  getErrorMessage as getErrorMessage2
24
- } from "./chunk-UZC5VPOJ.js";
26
+ } from "./chunk-2GFRA3MN.js";
25
27
  import {
26
28
  collectProviderModelsForProtocol,
27
29
  getAuthTypeFromEnv,
28
30
  resolveCliGenerationConfig
29
- } from "./chunk-HVGJWOR6.js";
31
+ } from "./chunk-L4YSPHR4.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,
@@ -38,22 +40,23 @@ import {
38
40
  loadChannelsConfig,
39
41
  loadChannelsFromExtensions,
40
42
  parseConfiguredChannels,
43
+ registerBackgroundResponseRelay,
41
44
  registerPermissionRelay,
42
45
  registerSessionCleanup,
43
46
  registerToolCallDispatch,
44
47
  selectFirstModel,
45
48
  sessionsPath
46
- } from "./chunk-HD6EGS5K.js";
49
+ } from "./chunk-CUJX3F4X.js";
47
50
  import {
48
51
  getExtensionManager,
49
52
  requestChoicePluginNonInteractive,
50
53
  requestConsentNonInteractive,
51
54
  requestConsentOrFail,
52
55
  resolveExtensionCommandScope
53
- } from "./chunk-RKUMFUFM.js";
56
+ } from "./chunk-6MC5ASQK.js";
54
57
  import {
55
58
  parseChannelConfig
56
- } from "./chunk-EFAXBOQO.js";
59
+ } from "./chunk-32F7BZSK.js";
57
60
  import {
58
61
  findCliEntryPath
59
62
  } from "./chunk-V6WHFGST.js";
@@ -75,7 +78,7 @@ import {
75
78
  isChannelWebhookTaskMessage,
76
79
  normalizeWorkerDiagnostic,
77
80
  sanitizeWorkerDiagnostic
78
- } from "./chunk-I7RRHHYG.js";
81
+ } from "./chunk-QKTHJXCS.js";
79
82
  import {
80
83
  normalizeServeChannelSelection
81
84
  } from "./chunk-TJTKSVIV.js";
@@ -88,14 +91,14 @@ import {
88
91
  signalService,
89
92
  waitForExit,
90
93
  writeServiceInfo
91
- } from "./chunk-HCCR43AY.js";
94
+ } from "./chunk-RFIAR4YL.js";
92
95
  import {
93
96
  DEFAULT_BASE_URL,
94
97
  buildHeaders,
95
98
  clearAccount,
96
99
  loadAccount,
97
100
  saveAccount
98
- } from "./chunk-BABX5XRO.js";
101
+ } from "./chunk-2LI23QA6.js";
99
102
  import {
100
103
  AcpBridge,
101
104
  ChannelLoopScheduler,
@@ -105,34 +108,34 @@ import {
105
108
  SessionRouter,
106
109
  sanitizeLogText,
107
110
  sanitizePromptText
108
- } from "./chunk-BKNPMEN6.js";
111
+ } from "./chunk-RVLZCXEE.js";
109
112
  import {
110
113
  assembleMcpServers,
111
114
  getPendingGatedMcpServers,
112
115
  mcpCommand
113
- } from "./chunk-4MPYGENG.js";
116
+ } from "./chunk-G45NOBV7.js";
114
117
  import {
115
118
  loadSettings
116
- } from "./chunk-6IITZE7O.js";
119
+ } from "./chunk-5JX5EWR5.js";
117
120
  import {
118
121
  detectSystemLanguage,
119
122
  getCurrentLanguage,
120
123
  initializeI18n,
121
124
  resolveLanguageSetting,
122
125
  t
123
- } from "./chunk-TKASNYDS.js";
126
+ } from "./chunk-6DHWO5ZF.js";
124
127
  import {
125
128
  loadEnvironment
126
- } from "./chunk-PR5XQ73G.js";
129
+ } from "./chunk-KTNIZG2C.js";
127
130
  import {
128
131
  getCliVersion
129
- } from "./chunk-GLH2NTPB.js";
132
+ } from "./chunk-XCHUDLER.js";
130
133
  import {
131
134
  getPackageJson
132
135
  } from "./chunk-VJNBRRZG.js";
133
136
  import {
134
137
  isWorkspaceTrusted
135
- } from "./chunk-GMUPIMHF.js";
138
+ } from "./chunk-4RA7PWIY.js";
136
139
  import {
137
140
  require_strip_json_comments
138
141
  } from "./chunk-ALGGS7UH.js";
@@ -156,6 +159,7 @@ import {
156
159
  addChannelMemoryEntries,
157
160
  checkForExtensionUpdate,
158
161
  clearChannelMemory,
162
+ getChannelMemoryRevision,
159
163
  getScopedEnvContents,
160
164
  ideContextStore,
161
165
  isBareMode,
@@ -175,7 +179,7 @@ import {
175
179
  unquoteCStylePath,
176
180
  updateChannelMemoryEntry,
177
181
  updateSetting
178
- } from "./chunk-GCY7QTCE.js";
182
+ } from "./chunk-NO6XTCYT.js";
179
183
  import {
180
184
  nextFireTime,
181
185
  parseCron
@@ -183,16 +187,17 @@ import {
183
187
  import {
184
188
  DEFAULT_QWEN_EMBEDDING_MODEL,
185
189
  getAllGeminiMdFilenames,
190
+ recordChannelMemoryRecallMetrics,
186
191
  resolveTelemetrySettings,
187
192
  setGeminiMdFilename
188
- } from "./chunk-CPU6I5YV.js";
193
+ } from "./chunk-P64HXIC5.js";
189
194
  import {
190
195
  SchemaValidator,
191
196
  ToolNames
192
- } from "./chunk-ANRANWVE.js";
197
+ } from "./chunk-OP4MOGXF.js";
193
198
  import {
194
199
  isTlsVerificationDisabled
195
- } from "./chunk-4CHDYDG3.js";
200
+ } from "./chunk-6EFTQYW7.js";
196
201
  import {
197
202
  FatalConfigError,
198
203
  FatalSandboxError,
@@ -200,7 +205,7 @@ import {
200
205
  createDebugLogger,
201
206
  getErrorMessage,
202
207
  isNodeError
203
- } from "./chunk-UE5TZ55T.js";
208
+ } from "./chunk-C27BYUX6.js";
204
209
  import {
205
210
  init_esbuild_shims
206
211
  } from "./chunk-5O2XNYP6.js";
@@ -1920,6 +1925,7 @@ function channelMemoryOptions(getBridge, cwd) {
1920
1925
  return {
1921
1926
  channelMemory: {
1922
1927
  readChannelMemory,
1928
+ getChannelMemoryRevision,
1923
1929
  listChannelMemoryEntries,
1924
1930
  addChannelMemoryEntries,
1925
1931
  updateChannelMemoryEntry,
@@ -1929,7 +1935,8 @@ function channelMemoryOptions(getBridge, cwd) {
1929
1935
  memoryIntentClassifier: new BridgeChannelMemoryIntentClassifier(
1930
1936
  getBridge,
1931
1937
  cwd
1932
- )
1938
+ ),
1939
+ channelMemoryRecallObserver: recordChannelMemoryRecallMetrics
1933
1940
  };
1934
1941
  }
1935
1942
  __name(channelMemoryOptions, "channelMemoryOptions");
@@ -2054,6 +2061,7 @@ async function startSingle(name, proxy, cronEnabled) {
2054
2061
  nextFireTime
2055
2062
  }) : void 0;
2056
2063
  registerToolCallDispatch(bridge, router, channels);
2064
+ registerBackgroundResponseRelay(bridge, router, channels);
2057
2065
  registerPermissionRelay(bridge, router, channels);
2058
2066
  registerSessionCleanup(bridge, router, channels);
2059
2067
  try {
@@ -2102,6 +2110,7 @@ async function startSingle(name, proxy, cronEnabled) {
2102
2110
  channel.disconnect();
2103
2111
  await channel.connect();
2104
2112
  registerToolCallDispatch(bridge, router, channels);
2113
+ registerBackgroundResponseRelay(bridge, router, channels);
2105
2114
  registerPermissionRelay(bridge, router, channels);
2106
2115
  registerSessionCleanup(bridge, router, channels);
2107
2116
  attachDisconnectHandler(bridge);
@@ -2191,6 +2200,7 @@ async function startAll(proxy, cronEnabled) {
2191
2200
  );
2192
2201
  }
2193
2202
  registerToolCallDispatch(bridge, router, channels);
2203
+ registerBackgroundResponseRelay(bridge, router, channels);
2194
2204
  registerPermissionRelay(bridge, router, channels);
2195
2205
  registerSessionCleanup(bridge, router, channels);
2196
2206
  let connectedCount = 0;
@@ -2279,6 +2289,7 @@ async function startAll(proxy, cronEnabled) {
2279
2289
  process.exit(1);
2280
2290
  }
2281
2291
  registerToolCallDispatch(bridge, router, channels);
2292
+ registerBackgroundResponseRelay(bridge, router, channels);
2282
2293
  registerPermissionRelay(bridge, router, channels);
2283
2294
  registerSessionCleanup(bridge, router, channels);
2284
2295
  attachDisconnectHandler(bridge);
@@ -2364,7 +2375,7 @@ var stopCommand = {
2364
2375
  if (argv["daemon-url"]) {
2365
2376
  const token = argv.token ?? process.env[QWEN_SERVER_TOKEN_ENV] ?? process.env[QWEN_DAEMON_TOKEN_ENV];
2366
2377
  try {
2367
- const sdk = await import("./daemon-ZW6LHOXT.js");
2378
+ const sdk = await import("./daemon-KLPTQIE4.js");
2368
2379
  const client = new sdk.DaemonClient({
2369
2380
  baseUrl: argv["daemon-url"],
2370
2381
  ...token ? { token } : {}
@@ -2550,7 +2561,7 @@ var statusCommand = {
2550
2561
  if (argv["daemon-url"]) {
2551
2562
  const token = argv.token ?? process.env[QWEN_SERVER_TOKEN_ENV] ?? process.env[QWEN_DAEMON_TOKEN_ENV];
2552
2563
  try {
2553
- const sdk = await import("./daemon-ZW6LHOXT.js");
2564
+ const sdk = await import("./daemon-KLPTQIE4.js");
2554
2565
  const client = new sdk.DaemonClient({
2555
2566
  baseUrl: argv["daemon-url"],
2556
2567
  ...token ? { token } : {}
@@ -2661,7 +2672,7 @@ var reloadCommand = {
2661
2672
  const token = resolveToken(argv.token);
2662
2673
  let sdk;
2663
2674
  try {
2664
- sdk = await import("./daemon-ZW6LHOXT.js");
2675
+ sdk = await import("./daemon-KLPTQIE4.js");
2665
2676
  } catch (err) {
2666
2677
  writeStderrLine(
2667
2678
  `[Channel] Failed to load daemon SDK: ${safeChannelCommandErrorMessage(err)}`
@@ -2741,7 +2752,7 @@ var setCommand2 = {
2741
2752
  const selection = names[0] === "all" ? { mode: "all" } : { mode: "names", names };
2742
2753
  let sdk;
2743
2754
  try {
2744
- sdk = await import("./daemon-ZW6LHOXT.js");
2755
+ sdk = await import("./daemon-KLPTQIE4.js");
2745
2756
  } catch (error) {
2746
2757
  writeStderrLine(
2747
2758
  `[Channel] Failed to load daemon SDK: ${safeChannelCommandErrorMessage(error)}`
@@ -2864,7 +2875,7 @@ function createDaemonChannelBridgeFacade(bridge, opts) {
2864
2875
  }
2865
2876
  __name(createDaemonChannelBridgeFacade, "createDaemonChannelBridgeFacade");
2866
2877
  async function loadDaemonSdk() {
2867
- return await import("./daemon-ZW6LHOXT.js");
2878
+ return await import("./daemon-KLPTQIE4.js");
2868
2879
  }
2869
2880
  __name(loadDaemonSdk, "loadDaemonSdk");
2870
2881
  function selectedChannelNames(channelsConfig, selection) {
@@ -3086,6 +3097,7 @@ async function runChannelDaemonWorker(opts) {
3086
3097
  router: createdRouter,
3087
3098
  channelMemory: {
3088
3099
  readChannelMemory,
3100
+ getChannelMemoryRevision,
3089
3101
  listChannelMemoryEntries,
3090
3102
  addChannelMemoryEntries,
3091
3103
  updateChannelMemoryEntry,
@@ -3096,6 +3108,7 @@ async function runChannelDaemonWorker(opts) {
3096
3108
  bridgeFacade,
3097
3109
  config.cwd
3098
3110
  ),
3111
+ channelMemoryRecallObserver: recordChannelMemoryRecallMetrics,
3099
3112
  observedContacts: {
3100
3113
  observe: /* @__PURE__ */ __name((channelName, observation) => {
3101
3114
  observedContacts.observe(channelName, observation);
@@ -3107,6 +3120,7 @@ async function runChannelDaemonWorker(opts) {
3107
3120
  );
3108
3121
  }
3109
3122
  registerToolCallDispatch(bridgeFacade, createdRouter, channels);
3123
+ registerBackgroundResponseRelay(bridgeFacade, createdRouter, channels);
3110
3124
  registerPermissionRelay(bridgeFacade, createdRouter, channels);
3111
3125
  registerSessionCleanup(bridgeFacade, createdRouter, channels);
3112
3126
  for (const [name, channel] of channels) {
@@ -5165,6 +5179,11 @@ function coverageFromTranscripts(planPath, env = process.env) {
5165
5179
  const idleAgents = [];
5166
5180
  const unopenedAgents = [];
5167
5181
  const rewrittenPrompts = [];
5182
+ const disclosures = [];
5183
+ const disclose = /* @__PURE__ */ __name((subject, reason) => {
5184
+ disclosures.push({ subject, reason });
5185
+ return `${subject} \u2014 ${reason}`;
5186
+ }, "disclose");
5168
5187
  const covered = /* @__PURE__ */ new Set();
5169
5188
  const uncoverable = /* @__PURE__ */ new Set();
5170
5189
  const rosterForRun = requiredAgents(plan);
@@ -5215,14 +5234,20 @@ function coverageFromTranscripts(planPath, env = process.env) {
5215
5234
  rewrittenThisRecord = true;
5216
5235
  if (!nothingBuiltAtAll && !superseded(rec, chunk)) {
5217
5236
  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`
5237
+ disclose(
5238
+ name,
5239
+ "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"
5240
+ )
5219
5241
  );
5220
5242
  }
5221
5243
  } else if (!wasDeliveredVerbatim(rec.launchPrompt, b)) {
5222
5244
  rewrittenThisRecord = true;
5223
5245
  if (!superseded(rec, chunk)) {
5224
5246
  rewrittenPrompts.push(
5225
- `${name} \u2014 launched with a prompt that is not the one the CLI built`
5247
+ disclose(
5248
+ name,
5249
+ "launched with a prompt that is not the one the CLI built"
5250
+ )
5226
5251
  );
5227
5252
  }
5228
5253
  }
@@ -5256,7 +5281,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5256
5281
  const nobodyBuiltAnything = roster.length > 1 && briefless.length === roster.length;
5257
5282
  if (nobodyBuiltAnything) {
5258
5283
  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`
5284
+ disclose(
5285
+ "every dimension",
5286
+ `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`
5287
+ )
5260
5288
  );
5261
5289
  }
5262
5290
  const buildable = roster.filter((r) => builtOf(r.key) !== void 0);
@@ -5300,7 +5328,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5300
5328
  if (b === void 0) {
5301
5329
  if (!nobodyBuiltAnything) {
5302
5330
  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`
5331
+ disclose(
5332
+ roleLabel(req),
5333
+ "no record shows its brief reaching an agent, so this dimension was reviewed, if at all, from a prompt the run wrote for itself"
5334
+ )
5304
5335
  );
5305
5336
  }
5306
5337
  missingRoleSelectors.push(selectorOf(req));
@@ -5311,7 +5342,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5311
5342
  if (pick2 === void 0) {
5312
5343
  const anyMatch = candidatesOf[buildableIdx].length > 0;
5313
5344
  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`
5345
+ disclose(
5346
+ roleLabel(req),
5347
+ 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"
5348
+ )
5315
5349
  );
5316
5350
  missingRoleSelectors.push(selectorOf(req));
5317
5351
  continue;
@@ -5322,7 +5356,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5322
5356
  );
5323
5357
  if (!opened) {
5324
5358
  unreadBriefs.push(
5325
- `${roleLabel(req)} \u2014 never opened its brief (${brief}), so it reviewed without the instructions it was launched to follow`
5359
+ disclose(
5360
+ roleLabel(req),
5361
+ `never opened its brief (${brief}), so it reviewed without the instructions it was launched to follow`
5362
+ )
5326
5363
  );
5327
5364
  }
5328
5365
  }
@@ -5342,6 +5379,7 @@ function coverageFromTranscripts(planPath, env = process.env) {
5342
5379
  rewrittenPrompts,
5343
5380
  missingRoles,
5344
5381
  missingRoleSelectors,
5382
+ disclosures,
5345
5383
  unreadBriefs,
5346
5384
  missingChunks,
5347
5385
  uncoverableChunks: [...uncoverable].sort((a, b) => a - b),
@@ -5349,7 +5387,10 @@ function coverageFromTranscripts(planPath, env = process.env) {
5349
5387
  };
5350
5388
  }
5351
5389
  __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");
5390
+ 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
5391
+ // parenthetical claiming --round bakes it in would send the reader to the
5392
+ // wrong flag — shards are already told apart by their findings digest.
5393
+ (role === "reverse-audit" ? ` (--round bakes it in)` : ``) + `, no summary of your own, no rewording`, "rebuildFix");
5353
5394
  var REVERSE_AUDIT_GAP = {
5354
5395
  // Not "no auditor ran": a run that skipped the builder and hand-wrote the
5355
5396
  // launch leaves no brief file to open, so this shape is reached before the
@@ -5443,12 +5484,14 @@ function verificationGaps(planPath, opts, env = process.env) {
5443
5484
  )}`
5444
5485
  );
5445
5486
  }
5487
+ let unverifiedFindings = false;
5446
5488
  if (opts.postsFindings) {
5447
5489
  const verifyKeys = [...built.keys()].filter(
5448
5490
  (k) => k === "verify" || k.startsWith("verify--")
5449
5491
  );
5450
5492
  const verify = bestDelivery(verifyKeys);
5451
5493
  if (verify !== "ok") {
5494
+ unverifiedFindings = true;
5452
5495
  gaps.push(`verification \u2014 ${VERIFY_GAP[verify].gap}`);
5453
5496
  remediation.push(
5454
5497
  `verification: ${VERIFY_GAP[verify].fix.replace(
@@ -5460,14 +5503,44 @@ function verificationGaps(planPath, opts, env = process.env) {
5460
5503
  );
5461
5504
  }
5462
5505
  }
5463
- return { ok: gaps.length === 0, gaps, remediation };
5506
+ return { ok: gaps.length === 0, gaps, remediation, unverifiedFindings };
5464
5507
  }
5465
5508
  __name(verificationGaps, "verificationGaps");
5466
5509
 
5510
+ // packages/cli/src/commands/review/lib/inline-counts.ts
5511
+ init_esbuild_shims();
5512
+ var CRITICAL_PREFIX = "**[Critical]**";
5513
+ var SUGGESTION_PREFIX = "**[Suggestion]**";
5514
+ function severityOf(c) {
5515
+ const body = typeof c?.body === "string" ? c.body.trimStart() : "";
5516
+ if (body.startsWith(CRITICAL_PREFIX)) return "critical";
5517
+ if (body.startsWith(SUGGESTION_PREFIX)) return "suggestion";
5518
+ return null;
5519
+ }
5520
+ __name(severityOf, "severityOf");
5521
+ function countInlineFindings(comments) {
5522
+ let criticalsInline = 0;
5523
+ let suggestionsInline = 0;
5524
+ for (const c of comments) {
5525
+ const severity = severityOf(c);
5526
+ if (severity === "critical") criticalsInline++;
5527
+ else if (severity === "suggestion") suggestionsInline++;
5528
+ }
5529
+ return { criticalsInline, suggestionsInline };
5530
+ }
5531
+ __name(countInlineFindings, "countInlineFindings");
5532
+ function unmarkedComments(comments) {
5533
+ const out = [];
5534
+ comments.forEach((c, i) => {
5535
+ if (severityOf(c) === null) out.push(i);
5536
+ });
5537
+ return out;
5538
+ }
5539
+ __name(unmarkedComments, "unmarkedComments");
5540
+
5467
5541
  // packages/cli/src/commands/review/compose-review.ts
5468
- var CRITICAL_MARKER = "**[Critical]**";
5469
5542
  function withMarker(line) {
5470
- return line.startsWith(CRITICAL_MARKER) ? line : `${CRITICAL_MARKER} ${line}`;
5543
+ return line.startsWith(CRITICAL_PREFIX) ? line : `${CRITICAL_PREFIX} ${line}`;
5471
5544
  }
5472
5545
  __name(withMarker, "withMarker");
5473
5546
  function toCount(value, field) {
@@ -5523,13 +5596,21 @@ function composeReview(input) {
5523
5596
  input.unreviewedDimensions,
5524
5597
  "unreviewedDimensions"
5525
5598
  );
5599
+ const coverageEntries = [];
5526
5600
  const remediation = [];
5527
5601
  const planRef = input.planPath ? shellQuotePath(input.planPath) : "<plan>";
5528
5602
  const missingReceipts = [];
5603
+ const nonDeterministicBodyCriticals = bodyCriticals.filter(
5604
+ (x) => !/\[(?:build|test)\]/i.test(x)
5605
+ ).length;
5606
+ const criticalsNeedingVerify = criticalsInline + nonDeterministicBodyCriticals;
5607
+ let criticalsUnverified = false;
5529
5608
  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
- );
5609
+ coverageEntries.push({
5610
+ subject: "coverage",
5611
+ reason: "no plan was given, so this run cannot show that any of the diff was read"
5612
+ });
5613
+ criticalsUnverified = criticalsNeedingVerify >= 1;
5533
5614
  } else {
5534
5615
  try {
5535
5616
  const cov = coverageFromTranscripts(input.planPath, input.env);
@@ -5542,9 +5623,10 @@ function composeReview(input) {
5542
5623
  if (!already) uncoverable.push(prefix);
5543
5624
  }
5544
5625
  for (const label2 of cov.idleAgents) {
5545
- unreviewed.push(
5546
- `${label2} \u2014 the agent made no tool call: it read nothing`
5547
- );
5626
+ coverageEntries.push({
5627
+ subject: label2,
5628
+ reason: "the agent made no tool call: it read nothing"
5629
+ });
5548
5630
  }
5549
5631
  if (cov.idleAgents.length > 0) {
5550
5632
  remediation.push(
@@ -5552,9 +5634,10 @@ function composeReview(input) {
5552
5634
  );
5553
5635
  }
5554
5636
  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
- );
5637
+ coverageEntries.push({
5638
+ subject: label2,
5639
+ reason: "launched with a prompt that never named the diff file, so it could not have read it"
5640
+ });
5558
5641
  }
5559
5642
  if (cov.blindAgents.length > 0) {
5560
5643
  remediation.push(
@@ -5562,34 +5645,27 @@ function composeReview(input) {
5562
5645
  );
5563
5646
  }
5564
5647
  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
- );
5648
+ coverageEntries.push({
5649
+ subject: label2,
5650
+ reason: "pointed at diff lines it never opened: it made tool calls, but none of them read the diff"
5651
+ });
5568
5652
  }
5569
5653
  if (cov.unopenedAgents.length > 0) {
5570
5654
  remediation.push(
5571
5655
  "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
5656
  );
5573
5657
  }
5574
- for (const label2 of cov.rewrittenPrompts) {
5575
- unreviewed.push(label2);
5576
- }
5658
+ coverageEntries.push(...cov.disclosures);
5577
5659
  if (cov.rewrittenPrompts.length > 0) {
5578
5660
  remediation.push(
5579
5661
  `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
5662
  );
5581
5663
  }
5582
- for (const label2 of cov.missingRoles) {
5583
- unreviewed.push(label2);
5584
- }
5585
5664
  if (cov.missingRoles.length > 0) {
5586
5665
  remediation.push(
5587
5666
  `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
5667
  );
5589
5668
  }
5590
- for (const label2 of cov.unreadBriefs) {
5591
- unreviewed.push(label2);
5592
- }
5593
5669
  if (cov.unreadBriefs.length > 0) {
5594
5670
  remediation.push(
5595
5671
  "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 +5673,35 @@ function composeReview(input) {
5597
5673
  }
5598
5674
  } catch (err) {
5599
5675
  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
- );
5676
+ coverageEntries.push({
5677
+ subject: "coverage",
5678
+ reason: `${why}, so this run cannot show that any of the diff was read`
5679
+ });
5603
5680
  }
5604
5681
  try {
5605
- const findingsToVerify = criticalsInline + suggestionsInline + bodyCriticals.filter((c2) => !/\[(?:build|test)\]/i.test(c2)).length;
5682
+ const findingsToVerify = criticalsInline + suggestionsInline + nonDeterministicBodyCriticals;
5606
5683
  const verification = verificationGaps(
5607
5684
  input.planPath,
5608
5685
  { postsFindings: findingsToVerify > 0 },
5609
5686
  input.env
5610
5687
  );
5611
- for (const gap of verification.gaps) unreviewed.push(gap);
5688
+ for (const gap of verification.gaps) {
5689
+ const cut = gap.indexOf(" \u2014 ");
5690
+ coverageEntries.push(
5691
+ cut === -1 ? { subject: gap, reason: "" } : {
5692
+ subject: gap.slice(0, cut),
5693
+ reason: gap.slice(cut + " \u2014 ".length)
5694
+ }
5695
+ );
5696
+ }
5612
5697
  remediation.push(...verification.remediation);
5698
+ criticalsUnverified = verification.unverifiedFindings && criticalsNeedingVerify >= 1;
5613
5699
  } catch (err) {
5614
- unreviewed.push(
5615
- `verification \u2014 could not check that Step 4 and Step 5 ran (${err.message})`
5616
- );
5700
+ coverageEntries.push({
5701
+ subject: "verification",
5702
+ reason: `could not check that Step 4 and Step 5 ran (${err.message})`
5703
+ });
5704
+ criticalsUnverified = criticalsNeedingVerify >= 1;
5617
5705
  }
5618
5706
  }
5619
5707
  const contextUnavailable = toBool(
@@ -5652,17 +5740,24 @@ function composeReview(input) {
5652
5740
  if (cannotTell.length > 0) cappedBy.push("cannot-tell-existing-critical");
5653
5741
  if (missingReceipts.length > 0) cappedBy.push("chunk-nobody-read");
5654
5742
  if (uncoverable.length > 0) cappedBy.push("uncoverable-chunk");
5655
- if (unreviewed.length > 0) cappedBy.push("unreviewed-dimension");
5743
+ if (unreviewed.length + coverageEntries.length > 0) {
5744
+ cappedBy.push("unreviewed-dimension");
5745
+ }
5656
5746
  if (contextUnavailable) cappedBy.push("context-unavailable");
5747
+ if (criticalsUnverified) cappedBy.push("criticals-unverified");
5657
5748
  let event = baseEvent;
5658
5749
  if (event === "APPROVE" && cappedBy.length > 0) event = "COMMENT";
5750
+ const deterministicBodyCriticals = bodyCriticals.length - nonDeterministicBodyCriticals;
5751
+ if (event === "REQUEST_CHANGES" && criticalsUnverified && deterministicBodyCriticals === 0) {
5752
+ event = "COMMENT";
5753
+ }
5659
5754
  let downgraded = false;
5660
5755
  let downgradedFrom = null;
5661
5756
  if (event === "APPROVE" && downgradeApprove) {
5662
5757
  event = "COMMENT";
5663
5758
  downgraded = true;
5664
5759
  downgradedFrom = "Approve";
5665
- } else if (event === "REQUEST_CHANGES" && downgradeRequestChanges) {
5760
+ } else if ((event === "REQUEST_CHANGES" || baseEvent === "REQUEST_CHANGES" && criticalsUnverified) && downgradeRequestChanges) {
5666
5761
  event = "COMMENT";
5667
5762
  downgraded = true;
5668
5763
  downgradedFrom = "Request changes";
@@ -5676,25 +5771,56 @@ ${footer}`, "finish");
5676
5771
  remediation.push(
5677
5772
  `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
5773
  );
5679
- notReviewedParts.push(
5680
- `Not reviewed: ${missingReceipts.map((id) => `chunk ${id}`).join(", ")} \u2014 no agent reported covering these; nobody read them.`
5774
+ const disclosedSubjects = new Set(coverageEntries.map((e) => e.subject));
5775
+ const unexplainedReceipts = missingReceipts.filter(
5776
+ (id) => !disclosedSubjects.has(`chunk ${id}`)
5681
5777
  );
5778
+ if (unexplainedReceipts.length > 0) {
5779
+ notReviewedParts.push(
5780
+ `Not reviewed: ${unexplainedReceipts.map((id) => `chunk ${id}`).join(", ")} \u2014 no agent reported covering these; nobody read them.`
5781
+ );
5782
+ }
5682
5783
  }
5683
5784
  if (uncoverable.length > 0) {
5684
5785
  notReviewedParts.push(
5685
5786
  `Not reviewed: ${uncoverable.join(", ")} \u2014 a line there exceeds the read limit.`
5686
5787
  );
5687
5788
  }
5688
- const whiffedDimensions = unreviewed.filter((d) => !d.includes(" \u2014 "));
5689
- const explainedDimensions = unreviewed.filter((d) => d.includes(" \u2014 "));
5789
+ const covEntries = coverageEntries;
5790
+ const callerLeft = [];
5791
+ const seenCaller = /* @__PURE__ */ new Set();
5792
+ for (const d of unreviewed) {
5793
+ if (seenCaller.has(d)) continue;
5794
+ seenCaller.add(d);
5795
+ const echoesCoverage = covEntries.some(
5796
+ (e) => d === e.subject || d.startsWith(`${e.subject} \u2014 `)
5797
+ );
5798
+ if (!echoesCoverage) callerLeft.push(d);
5799
+ }
5800
+ const whiffedDimensions = callerLeft.filter((d) => !d.includes(" \u2014 "));
5801
+ const explainedCaller = callerLeft.filter((d) => d.includes(" \u2014 "));
5690
5802
  if (whiffedDimensions.length > 0) {
5691
5803
  notReviewedParts.push(
5692
5804
  `Not reviewed: ${whiffedDimensions.join(", ")} \u2014 the agent returned no evidence of its walk twice.`
5693
5805
  );
5694
5806
  }
5695
- for (const d of explainedDimensions) {
5807
+ for (const d of explainedCaller) {
5696
5808
  notReviewedParts.push(`Not reviewed: ${d}.`);
5697
5809
  }
5810
+ const seenSubjects = /* @__PURE__ */ new Set();
5811
+ const byReason = /* @__PURE__ */ new Map();
5812
+ for (const { subject, reason } of covEntries) {
5813
+ if (seenSubjects.has(subject)) continue;
5814
+ seenSubjects.add(subject);
5815
+ const subjects = byReason.get(reason) ?? [];
5816
+ subjects.push(subject);
5817
+ byReason.set(reason, subjects);
5818
+ }
5819
+ for (const [reason, subjects] of byReason) {
5820
+ notReviewedParts.push(
5821
+ reason ? `Not reviewed: ${subjects.join(", ")} \u2014 ${reason}.` : `Not reviewed: ${subjects.join(", ")}.`
5822
+ );
5823
+ }
5698
5824
  const cannotTellBlock = cannotTell.length === 0 ? [] : [
5699
5825
  `Unresolved, please confirm: ${cannotTell.map((l) => withMarker(l)).join(" ")}`
5700
5826
  ];
@@ -5738,7 +5864,7 @@ ${footer}`, "finish");
5738
5864
  if (contextUnavailable) {
5739
5865
  clauses.push(contextUnavailableClause);
5740
5866
  } 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
5867
+ 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
5868
  // body could open "Reviewed — no blockers." two lines above "nobody read
5743
5869
  // them." Nothing nobody read can be certified blocker-free.
5744
5870
  missingReceipts.length === 0;
@@ -5747,12 +5873,12 @@ ${footer}`, "finish");
5747
5873
  if (suggestionsInline > 0) clauses.push("Suggestions are inline.");
5748
5874
  if (suggestionsDiscarded > 0) {
5749
5875
  clauses.push(
5750
- `${suggestionsDiscarded} Suggestion-level finding(s) could not be anchored to the diff; see the terminal output.`
5876
+ `${suggestionsDiscarded} Suggestion-level finding(s) could not be anchored to a changed line and were dropped; nothing further to act on here.`
5751
5877
  );
5752
5878
  }
5753
5879
  clauses.push(...cannotTellBlock);
5754
5880
  clauses.push(...notReviewedParts);
5755
- if (downgradedFrom === "Request changes") {
5881
+ if (downgradedFrom === "Request changes" || criticalsUnverified) {
5756
5882
  clauses.push(...bodyCriticalBlock);
5757
5883
  }
5758
5884
  return {
@@ -5766,22 +5892,72 @@ ${footer}`, "finish");
5766
5892
  };
5767
5893
  }
5768
5894
  __name(composeReview, "composeReview");
5895
+ function readDraftedComments(path3) {
5896
+ let raw;
5897
+ try {
5898
+ raw = readFileSync6(path3, "utf8");
5899
+ } catch (err) {
5900
+ throw new Error(
5901
+ `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.`
5902
+ );
5903
+ }
5904
+ let parsed;
5905
+ try {
5906
+ parsed = JSON.parse(raw);
5907
+ } catch (err) {
5908
+ throw new Error(
5909
+ `compose-review: the comments file ${path3} is not JSON: ${err.message}`
5910
+ );
5911
+ }
5912
+ const comments = Array.isArray(parsed) ? parsed : parsed?.comments;
5913
+ if (!Array.isArray(comments)) {
5914
+ throw new Error(
5915
+ `compose-review: the comments file ${path3} must be a JSON array of comment objects, or a review payload with a \`comments\` array.`
5916
+ );
5917
+ }
5918
+ const unmarked = unmarkedComments(comments);
5919
+ if (unmarked.length > 0) {
5920
+ throw new Error(
5921
+ `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.`
5922
+ );
5923
+ }
5924
+ return comments;
5925
+ }
5926
+ __name(readDraftedComments, "readDraftedComments");
5769
5927
  var composeReviewCommand = {
5770
5928
  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",
5929
+ 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
5930
  builder: /* @__PURE__ */ __name((yargs) => yargs.option("input", {
5773
5931
  type: "string",
5774
5932
  describe: "Path to the state JSON (omit to read stdin)"
5933
+ }).option("comments", {
5934
+ type: "string",
5935
+ demandOption: true,
5936
+ 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
5937
  }).option("out", {
5776
5938
  type: "string",
5777
5939
  describe: "Also write the {event, body} JSON to this path"
5778
5940
  }), "builder"),
5779
5941
  handler: /* @__PURE__ */ __name((argv) => {
5780
- const { input, out } = argv;
5942
+ const { input, comments, out } = argv;
5943
+ if (!comments) {
5944
+ throw new Error(
5945
+ "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."
5946
+ );
5947
+ }
5781
5948
  const raw = readFileSync6(input ?? 0, "utf8");
5782
5949
  const parsed = JSON.parse(raw);
5783
5950
  delete parsed.env;
5784
- const result = composeReview(parsed);
5951
+ if (parsed.criticalsInline !== void 0 || parsed.suggestionsInline !== void 0) {
5952
+ throw new Error(
5953
+ "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.)"
5954
+ );
5955
+ }
5956
+ const drafted = readDraftedComments(comments);
5957
+ const result = composeReview({
5958
+ ...parsed,
5959
+ ...countInlineFindings(drafted)
5960
+ });
5785
5961
  const json = JSON.stringify(
5786
5962
  { ...result, verdictLine: verdictLine(result) },
5787
5963
  null,
@@ -5812,7 +5988,9 @@ function verdictLine(r) {
5812
5988
  "context-unavailable": "the PR's existing discussion could not be read"
5813
5989
  };
5814
5990
  let line = `Verdict: ${label2[r.event]}`;
5815
- if (r.baseEvent === "APPROVE" && r.event !== "APPROVE") {
5991
+ if (r.baseEvent === "REQUEST_CHANGES" && r.event === "COMMENT" && r.cappedBy.includes("criticals-unverified")) {
5992
+ line += " \u2014 a Request changes was NOT available: its blockers were never verified (they are posted, disclosed as unverified)";
5993
+ } else if (r.baseEvent === "APPROVE" && r.event !== "APPROVE") {
5816
5994
  const reasons = r.cappedBy.map((c) => why[c] ?? c);
5817
5995
  if (r.downgraded) reasons.push("a presubmit check failed");
5818
5996
  line += ` \u2014 an Approve was NOT available: ${reasons.join("; ")}`;
@@ -5834,6 +6012,44 @@ import { dirname as dirname4, resolve as resolve3 } from "node:path";
5834
6012
  // packages/cli/src/commands/review/lib/gh.ts
5835
6013
  init_esbuild_shims();
5836
6014
  import { execFileSync } from "node:child_process";
6015
+ var MAX_RETRIES = 2;
6016
+ var BASE_DELAY_MS = 3e3;
6017
+ function sleepSync(ms) {
6018
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
6019
+ }
6020
+ __name(sleepSync, "sleepSync");
6021
+ var TRANSIENT_RE = /HTTP 5\d{2}|server is currently unavailable|service unavailable|bad gateway|internal server error/i;
6022
+ function isTransientGhError(err) {
6023
+ const stderr = typeof err.stderr === "string" ? err.stderr : "";
6024
+ const msg = err instanceof Error ? err.message : "";
6025
+ return TRANSIENT_RE.test(stderr) || TRANSIENT_RE.test(msg);
6026
+ }
6027
+ __name(isTransientGhError, "isTransientGhError");
6028
+ function execGhWithRetry(args, options) {
6029
+ const execOptions = {
6030
+ encoding: "utf8",
6031
+ maxBuffer: 64 * 1024 * 1024,
6032
+ env: ghEnv(),
6033
+ ...options.input !== void 0 ? { input: options.input } : {}
6034
+ };
6035
+ for (let attempt = 0; ; attempt++) {
6036
+ try {
6037
+ return execFileSync("gh", args, execOptions).replace(/\r\n/g, "\n").trim();
6038
+ } catch (err) {
6039
+ if (attempt < MAX_RETRIES && isTransientGhError(err)) {
6040
+ const delay = BASE_DELAY_MS * (attempt + 1);
6041
+ process.stderr.write(
6042
+ `gh transient error (attempt ${attempt + 1}/${MAX_RETRIES}), retrying in ${delay}ms\u2026
6043
+ `
6044
+ );
6045
+ sleepSync(delay);
6046
+ continue;
6047
+ }
6048
+ throw err;
6049
+ }
6050
+ }
6051
+ }
6052
+ __name(execGhWithRetry, "execGhWithRetry");
5837
6053
  var ghHost;
5838
6054
  var HOSTNAME_RE = /^[A-Za-z0-9.-]+(?::\d+)?$/;
5839
6055
  function setGhHost(host) {
@@ -5854,11 +6070,7 @@ function ghEnv() {
5854
6070
  }
5855
6071
  __name(ghEnv, "ghEnv");
5856
6072
  function gh(...args) {
5857
- return execFileSync("gh", args, {
5858
- encoding: "utf8",
5859
- maxBuffer: 64 * 1024 * 1024,
5860
- env: ghEnv()
5861
- }).replace(/\r\n/g, "\n").trim();
6073
+ return execGhWithRetry(args, {});
5862
6074
  }
5863
6075
  __name(gh, "gh");
5864
6076
  function ghWithInput(input, ...args) {
@@ -5906,12 +6118,19 @@ function currentUser() {
5906
6118
  }
5907
6119
  __name(currentUser, "currentUser");
5908
6120
  function ensureAuthenticated() {
5909
- try {
5910
- execFileSync("gh", ["auth", "status"], { stdio: "pipe", env: ghEnv() });
5911
- } catch {
5912
- throw new Error(
5913
- "gh CLI is not authenticated. Run `gh auth login` and retry."
5914
- );
6121
+ for (let attempt = 0; ; attempt++) {
6122
+ try {
6123
+ execFileSync("gh", ["auth", "status"], { stdio: "pipe", env: ghEnv() });
6124
+ return;
6125
+ } catch (err) {
6126
+ if (attempt === 0 && err.code !== "ENOENT") {
6127
+ sleepSync(2e3);
6128
+ continue;
6129
+ }
6130
+ throw new Error(
6131
+ "gh CLI is not authenticated. Run `gh auth login` and retry."
6132
+ );
6133
+ }
5915
6134
  }
5916
6135
  }
5917
6136
  __name(ensureAuthenticated, "ensureAuthenticated");
@@ -7326,6 +7545,10 @@ var loadRulesCommand = {
7326
7545
  // packages/cli/src/commands/review/presubmit.ts
7327
7546
  init_esbuild_shims();
7328
7547
  import { writeFileSync as writeFileSync9, readFileSync as readFileSync8 } from "node:fs";
7548
+ function verdictStamp(run2) {
7549
+ return run2.completed_at ?? run2.started_at ?? "";
7550
+ }
7551
+ __name(verdictStamp, "verdictStamp");
7329
7552
  var FAIL_CONCLUSIONS = /* @__PURE__ */ new Set([
7330
7553
  "failure",
7331
7554
  "cancelled",
@@ -7371,13 +7594,21 @@ function classifyCi(checkRuns, statuses) {
7371
7594
  }
7372
7595
  }
7373
7596
  const skippedCheckNames = [...notRunNames].filter((n) => !executedNames.has(n)).sort();
7597
+ const latestVerdicts = /* @__PURE__ */ new Map();
7374
7598
  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;
7599
+ if (run2.status !== "completed") {
7600
+ if (PENDING_STATES.has(run2.status)) hasPending = true;
7601
+ continue;
7602
+ }
7603
+ if (!run2.conclusion || NOT_RUN_CONCLUSIONS.has(run2.conclusion)) continue;
7604
+ const prev = latestVerdicts.get(run2.name);
7605
+ if (!prev || verdictStamp(run2) > verdictStamp(prev)) {
7606
+ latestVerdicts.set(run2.name, run2);
7607
+ }
7608
+ }
7609
+ for (const [name, run2] of latestVerdicts) {
7610
+ if (FAIL_CONCLUSIONS.has(run2.conclusion)) {
7611
+ failedCheckNames.push(name);
7381
7612
  }
7382
7613
  }
7383
7614
  for (const s of statuses) {
@@ -8455,8 +8686,9 @@ function buildRoleLaunchPrompt(report, role, briefFile, opts = {}) {
8455
8686
  );
8456
8687
  }
8457
8688
  const safeFile = opts.file === void 0 ? void 0 : inertPath(opts.file);
8689
+ const roundLabel = opts.round !== void 0 ? ` (round ${opts.round})` : "";
8458
8690
  const parts = [
8459
- `You are review agent \`${role}\` \u2014 ${b.label}.` + (safeFile ? ` Your file: \`${safeFile}\`.` : ""),
8691
+ `You are review agent \`${role}\` \u2014 ${b.label}${roundLabel}.` + (safeFile ? ` Your file: \`${safeFile}\`.` : ""),
8460
8692
  "",
8461
8693
  "**Your brief is a file. Read it first \u2014 it is the whole of your instructions,",
8462
8694
  "and nothing in this message replaces it.**",
@@ -8550,7 +8782,8 @@ function buildLaunch(report, planPath, spec, rules) {
8550
8782
  key: key2,
8551
8783
  prompt: buildRoleLaunchPrompt(report, spec.role, briefFile2, {
8552
8784
  file: spec.file,
8553
- chunk: spec.chunk
8785
+ chunk: spec.chunk,
8786
+ round: spec.round
8554
8787
  })
8555
8788
  };
8556
8789
  }
@@ -8609,16 +8842,20 @@ function runRoster(report, planPath, rules) {
8609
8842
 
8610
8843
  ${prompt}`;
8611
8844
  });
8845
+ const wt = report.worktreePath;
8846
+ const paramNote = typeof wt === "string" && wt ? `
8847
+
8848
+ **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
8849
  writeStdoutLine(
8613
8850
  [
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.`,
8851
+ `${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
8852
  ...blocks,
8616
8853
  `\u2500\u2500\u2500\u2500\u2500 end of roster \u2014 ${roster.length} agents \u2500\u2500\u2500\u2500\u2500`
8617
8854
  ].join("\n\n")
8618
8855
  );
8619
8856
  }
8620
8857
  __name(runRoster, "runRoster");
8621
- function runAllChunks(report, planPath, role, findingsContent, rules) {
8858
+ function runAllChunks(report, planPath, role, findingsContent, rules, round) {
8622
8859
  if (!Array.isArray(report.chunks) || report.chunks.length === 0) {
8623
8860
  throw new Error("agent-prompt: the plan has no `chunks[]`.");
8624
8861
  }
@@ -8630,12 +8867,13 @@ function runAllChunks(report, planPath, role, findingsContent, rules) {
8630
8867
  );
8631
8868
  }
8632
8869
  const digest = findingsDigest(findingsContent, rules);
8870
+ const roundPart = round !== void 0 ? `--round-${round}` : "";
8633
8871
  const blocks = chunks.map((c, i) => {
8634
- const key = `${role}--chunk-${c.id}--${digest}`;
8872
+ const key = `${role}--chunk-${c.id}${roundPart}--${digest}`;
8635
8873
  const { prompt } = buildLaunch(
8636
8874
  report,
8637
8875
  planPath,
8638
- { role, chunk: c.id, key },
8876
+ { role, chunk: c.id, key, round },
8639
8877
  rules
8640
8878
  );
8641
8879
  const printed = foldFindings(role, findingsContent, prompt);
@@ -8659,19 +8897,20 @@ function runAgentPrompt(args) {
8659
8897
  const hasFile = typeof args.file === "string" && args.file.length > 0;
8660
8898
  const hasFindings = typeof args.findings === "string" && args.findings.length > 0;
8661
8899
  const hasWhole = !!args.wholeDiff;
8900
+ const hasRound = args.round !== void 0;
8662
8901
  const bad = /* @__PURE__ */ __name((msg) => {
8663
8902
  throw new Error(`agent-prompt: ${msg}`);
8664
8903
  }, "bad");
8665
8904
  if (args.roster) {
8666
- if (hasChunk || hasRole || hasFile || hasFindings || hasWhole || args.allChunks) {
8905
+ if (hasChunk || hasRole || hasFile || hasFindings || hasWhole || args.allChunks || hasRound) {
8667
8906
  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.)"
8907
+ "--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
8908
  );
8670
8909
  }
8671
8910
  } else if (hasWhole) {
8672
- if (hasChunk || hasRole || hasFile || hasFindings || args.allChunks) {
8911
+ if (hasChunk || hasRole || hasFile || hasFindings || args.allChunks || hasRound) {
8673
8912
  bad(
8674
- "--whole-diff builds the diff-reading block alone; it takes no --chunk, --role, --file, --findings or --all-chunks."
8913
+ "--whole-diff builds the diff-reading block alone; it takes no --chunk, --role, --file, --findings, --all-chunks or --round."
8675
8914
  );
8676
8915
  }
8677
8916
  } else if (hasRole) {
@@ -8717,6 +8956,21 @@ function runAgentPrompt(args) {
8717
8956
  `--findings folds a findings list into the prompt, only for a role that takes one (${findingRoles.join(", ")}); role "${role}" does not.`
8718
8957
  );
8719
8958
  }
8959
+ if (hasRound) {
8960
+ if (!BRIEFS[role]?.acceptsFindings) {
8961
+ const roundRoles = Object.keys(BRIEFS).filter(
8962
+ (r) => BRIEFS[r].acceptsFindings
8963
+ );
8964
+ bad(
8965
+ `--round labels one round of a findings role (${roundRoles.join(", ")}); role "${role}" runs once and does not take it.`
8966
+ );
8967
+ }
8968
+ if (!Number.isSafeInteger(args.round) || args.round < 1) {
8969
+ bad(
8970
+ `--round is a 1-based round number (--round 1, --round 2, \u2026); got "${args.round}".`
8971
+ );
8972
+ }
8973
+ }
8720
8974
  } else if (hasFindings) {
8721
8975
  const findingRoles = Object.keys(BRIEFS).filter(
8722
8976
  (r) => BRIEFS[r].acceptsFindings
@@ -8733,6 +8987,13 @@ function runAgentPrompt(args) {
8733
8987
  bad(
8734
8988
  "--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
8989
  );
8990
+ } else if (hasRound) {
8991
+ const roundRoles = Object.keys(BRIEFS).filter(
8992
+ (r) => BRIEFS[r].acceptsFindings
8993
+ );
8994
+ bad(
8995
+ `--round labels one round of a findings role; it needs ${roundRoles.map((r) => `--role ${r}`).join(" / ")} and --findings <file>.`
8996
+ );
8736
8997
  } else if (!hasChunk) {
8737
8998
  bad(
8738
8999
  "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 +9043,8 @@ function runAgentPrompt(args) {
8782
9043
  args.plan,
8783
9044
  args.role,
8784
9045
  findingsContent,
8785
- rules
9046
+ rules,
9047
+ args.round
8786
9048
  );
8787
9049
  return;
8788
9050
  }
@@ -8795,7 +9057,8 @@ function runAgentPrompt(args) {
8795
9057
  let keyOverride;
8796
9058
  if (findingsContent !== void 0 && args.role) {
8797
9059
  const base = typeof args.chunk === "number" ? `${args.role}--chunk-${args.chunk}` : args.role;
8798
- keyOverride = `${base}--${findingsDigest(findingsContent, rules)}`;
9060
+ const roundPart = args.round !== void 0 ? `--round-${args.round}` : "";
9061
+ keyOverride = `${base}${roundPart}--${findingsDigest(findingsContent, rules)}`;
8799
9062
  }
8800
9063
  ({ key, prompt } = buildLaunch(
8801
9064
  report,
@@ -8804,7 +9067,8 @@ function runAgentPrompt(args) {
8804
9067
  role: args.role,
8805
9068
  chunk: args.chunk,
8806
9069
  file: args.file,
8807
- key: keyOverride
9070
+ key: keyOverride,
9071
+ round: args.round
8808
9072
  } : { chunk: args.chunk },
8809
9073
  rules
8810
9074
  ));
@@ -8846,6 +9110,9 @@ var agentPromptCommand = {
8846
9110
  }).option("findings", {
8847
9111
  type: "string",
8848
9112
  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."
9113
+ }).option("round", {
9114
+ type: "number",
9115
+ 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
9116
  }), "builder"),
8850
9117
  handler: /* @__PURE__ */ __name((argv) => {
8851
9118
  runAgentPrompt({
@@ -8857,7 +9124,8 @@ var agentPromptCommand = {
8857
9124
  roster: argv["roster"] === true,
8858
9125
  allChunks: argv["all-chunks"] === true,
8859
9126
  rules: argv["rules"],
8860
- findings: argv["findings"]
9127
+ findings: argv["findings"],
9128
+ round: argv["round"]
8861
9129
  });
8862
9130
  }, "handler")
8863
9131
  };
@@ -9455,8 +9723,6 @@ function isDiffLine(n) {
9455
9723
  return typeof n === "number" && Number.isSafeInteger(n) && n > 0;
9456
9724
  }
9457
9725
  __name(isDiffLine, "isDiffLine");
9458
- var CRITICAL_PREFIX = "**[Critical]**";
9459
- var SUGGESTION_PREFIX = "**[Suggestion]**";
9460
9726
  function authorization(args) {
9461
9727
  if (args.userAuthorized) {
9462
9728
  return { ok: true, why: "the user asked for this review to be published" };
@@ -9517,12 +9783,7 @@ __name(authorization, "authorization");
9517
9783
  function compose(payload) {
9518
9784
  const comments = payload.comments ?? [];
9519
9785
  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;
9786
+ const { criticalsInline, suggestionsInline } = countInlineFindings(comments);
9526
9787
  const { env: _dropped, ...rest } = state;
9527
9788
  void _dropped;
9528
9789
  const r = composeReview({
@@ -9566,6 +9827,11 @@ function inconsistencies(payload, event) {
9566
9827
  const at = `comments[${i}]`;
9567
9828
  if (!c.path) problems.push(`${at} has no \`path\``);
9568
9829
  if (!c.body) problems.push(`${at} has no \`body\` \u2014 an empty comment`);
9830
+ if (c.body && severityOf(c) === null) {
9831
+ problems.push(
9832
+ `${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`
9833
+ );
9834
+ }
9569
9835
  if (!isDiffLine(c.line)) {
9570
9836
  problems.push(
9571
9837
  `${at} has no usable \`line\` (${JSON.stringify(c.line)}) \u2014 a line is a positive whole number; resolve its anchor first`
@@ -10313,10 +10579,10 @@ var updateCommand3 = {
10313
10579
  stdioHelpers,
10314
10580
  { updateEventEmitter }
10315
10581
  ] = await Promise.all([
10316
- import("./settings-JC3VC53L.js"),
10317
- import("./updateCheck-AHTHWLAM.js"),
10318
- import("./installationInfo-LROMXYLX.js"),
10319
- import("./standalone-update-UUJWJWYY.js"),
10582
+ import("./settings-CADELKSU.js"),
10583
+ import("./updateCheck-MVUKJMBX.js"),
10584
+ import("./installationInfo-Y3M433E7.js"),
10585
+ import("./standalone-update-KGZHPBMA.js"),
10320
10586
  import("./stdioHelpers-HGIYTWAY.js"),
10321
10587
  import("./updateEventEmitter-5MKC7BLQ.js")
10322
10588
  ]);