@qwen-code/qwen-code 0.21.2 → 0.21.3

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 (351) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +41 -38
  2. package/bundled/qc-helper/docs/features/channels/github.md +7 -0
  3. package/bundled/qc-helper/docs/features/channels/gitlab.md +6 -0
  4. package/bundled/qc-helper/docs/features/code-review.md +78 -23
  5. package/bundled/qc-helper/docs/features/commands.md +2 -0
  6. package/bundled/qc-helper/docs/features/hooks.md +115 -18
  7. package/bundled/qc-helper/docs/features/memory.md +27 -0
  8. package/bundled/qc-helper/docs/features/skills.md +46 -1
  9. package/bundled/qc-helper/docs/features/sub-agents.md +42 -9
  10. package/bundled/qc-helper/docs/features/tool-use-summaries.md +7 -7
  11. package/bundled/qc-helper/docs/qwen-serve.md +21 -1
  12. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +13 -13
  13. package/bundled/qc-helper/docs/support/troubleshooting.md +6 -1
  14. package/bundled/review/DESIGN.md +167 -32
  15. package/bundled/review/SKILL.md +156 -32
  16. package/chunks/{MaxSizedBox-TQBQ247P.js → MaxSizedBox-OJR636GP.js} +40 -38
  17. package/chunks/{StandaloneSessionPicker-2HPTKCLX.js → StandaloneSessionPicker-AMMBF5UY.js} +62 -59
  18. package/chunks/{acp-startup-profiler-2C4A5ZTJ.js → acp-startup-profiler-3RICG2YW.js} +2 -2
  19. package/chunks/{acpAgent-PS6EDGH3.js → acpAgent-M57LVIQA.js} +662 -560
  20. package/chunks/{agent-VDOUB35F.js → agent-PE37ARLM.js} +36 -34
  21. package/chunks/{agent-headless-EO53EFS2.js → agent-headless-45ASME4R.js} +36 -34
  22. package/chunks/{anthropicContentGenerator-OFHSZJBF.js → anthropicContentGenerator-WCBYB6JG.js} +337 -27
  23. package/chunks/{artifact-tool-RDN2W7ND.js → artifact-tool-TBOYEKTY.js} +2 -2
  24. package/chunks/{askUserQuestion-OZERWH5R.js → askUserQuestion-23Y5WZFJ.js} +2 -2
  25. package/chunks/{bridge-W7AZSRZQ.js → bridge-K3ZRPO4D.js} +42 -40
  26. package/chunks/{ca-6W3SK7OQ.js → ca-4OJN75WT.js} +46 -5
  27. package/chunks/{channel-management-service-5S7YCWX5.js → channel-management-service-IXJ2MZTS.js} +7 -7
  28. package/chunks/{channel-settings-store-JFVRSNER.js → channel-settings-store-PEAR3IME.js} +43 -41
  29. package/chunks/{channel-worker-group-OVWGYMZS.js → channel-worker-group-NDG4WOOZ.js} +8 -8
  30. package/chunks/{channel-worker-manager-H55GKOQA.js → channel-worker-manager-ZCW6UW34.js} +8 -8
  31. package/chunks/{channel-worker-supervisor-CABBXYHK.js → channel-worker-supervisor-ATGFTZRN.js} +4 -4
  32. package/chunks/{chunk-W3UKBMSI.js → chunk-22YFMJBW.js} +84 -8
  33. package/chunks/{chunk-6MPDY6ZG.js → chunk-24ER7UV4.js} +1 -1
  34. package/chunks/{chunk-QDK4F2N5.js → chunk-2DNKEBXY.js} +1 -1
  35. package/chunks/{chunk-D6MDRSZ6.js → chunk-2LZCLQIS.js} +22 -11
  36. package/chunks/{chunk-JYBU6YUE.js → chunk-2M5N3DHY.js} +1 -1
  37. package/chunks/{chunk-KR32NIAN.js → chunk-2MI7ZTRT.js} +10 -10
  38. package/chunks/{chunk-LHKCY7DY.js → chunk-2UISUFHQ.js} +3 -3
  39. package/chunks/{chunk-JXVC2PL3.js → chunk-33FNCQSY.js} +2 -2
  40. package/chunks/{chunk-NBD76HUW.js → chunk-3LGZEYOF.js} +2 -2
  41. package/chunks/{chunk-CO2U743O.js → chunk-3MWNROHB.js} +4 -4
  42. package/chunks/{chunk-E2BHWIDT.js → chunk-3RXUYQJI.js} +6 -2
  43. package/chunks/{chunk-E5Z2AVNV.js → chunk-3SH53ANB.js} +0 -11
  44. package/chunks/{chunk-LYI2PZDK.js → chunk-3XF4WT3B.js} +2 -2
  45. package/chunks/{chunk-N4ACHWNH.js → chunk-432XCUHF.js} +1 -1
  46. package/chunks/{chunk-FNDXMN7I.js → chunk-4AGGSHCH.js} +774 -205
  47. package/chunks/{chunk-DUNI4EBW.js → chunk-4K3RV3OA.js} +80 -50
  48. package/chunks/{chunk-L2E5GFAG.js → chunk-4LKVQFHM.js} +2 -2
  49. package/chunks/{chunk-YDLJGZHL.js → chunk-4NFY2S7N.js} +0 -33
  50. package/chunks/{chunk-JLZ3RBQG.js → chunk-5JPVOYWA.js} +144 -11
  51. package/chunks/{chunk-6TAASXWL.js → chunk-5VYFXHY2.js} +3 -3
  52. package/chunks/{chunk-EU5TBFJI.js → chunk-6NE5NTHJ.js} +2 -2
  53. package/chunks/{chunk-XQK4XXTN.js → chunk-6O5DVH27.js} +1 -1
  54. package/chunks/{chunk-2RFKHEXL.js → chunk-6PLDPT2C.js} +1 -1
  55. package/chunks/{chunk-3APUUXRF.js → chunk-A5YZ3FA2.js} +2 -1
  56. package/chunks/{chunk-SHN4KHDK.js → chunk-A6SX5TAH.js} +3 -3
  57. package/chunks/{chunk-SZ3KHTDR.js → chunk-AKA24BGO.js} +1 -1
  58. package/chunks/{chunk-Q3T5KA2V.js → chunk-BFHXDAR7.js} +1 -1
  59. package/chunks/{chunk-L55JWS76.js → chunk-BGXZBI5B.js} +1 -1
  60. package/chunks/{chunk-P5VC5USY.js → chunk-BKGA75MU.js} +1 -1
  61. package/chunks/{chunk-2KKCCLPT.js → chunk-BKXTHMOZ.js} +1 -1
  62. package/chunks/{chunk-V4XNUDPE.js → chunk-BSKUTHLO.js} +15 -7
  63. package/chunks/{chunk-MM7TH7ZM.js → chunk-CFDR3GNL.js} +18 -3
  64. package/chunks/{chunk-E2FN6SM7.js → chunk-CIUUYB23.js} +5 -5
  65. package/chunks/{chunk-A7Y5H4TX.js → chunk-D2GPKXCQ.js} +7 -7
  66. package/chunks/{chunk-JCJ7LKNA.js → chunk-DIEFUBV6.js} +1644 -1570
  67. package/chunks/{chunk-GL4JOZXU.js → chunk-DSGJLHM3.js} +4 -4
  68. package/chunks/{chunk-675H6PLP.js → chunk-DYA25Y7U.js} +1 -1
  69. package/chunks/{chunk-3I6DUGQD.js → chunk-E4WHKETF.js} +32 -4
  70. package/chunks/{chunk-CU47KXB5.js → chunk-EGYJRIDF.js} +6 -6
  71. package/chunks/{chunk-6CQWRWUC.js → chunk-EIMKVOSF.js} +3 -3
  72. package/chunks/{chunk-QTERJVPZ.js → chunk-EKTCKZV5.js} +1 -0
  73. package/chunks/{chunk-NHFEMWAZ.js → chunk-FF75UUB2.js} +1 -1
  74. package/chunks/{chunk-L32VV3ZJ.js → chunk-FG63DZQA.js} +12 -12
  75. package/chunks/{chunk-FCYYAB4S.js → chunk-FHPKHXHT.js} +3 -3
  76. package/chunks/{chunk-GJ2GBPBD.js → chunk-FXVHVCNA.js} +5 -5
  77. package/chunks/{chunk-56Z7QEAQ.js → chunk-GMSBXEH4.js} +16 -16
  78. package/chunks/chunk-GOFAQQZA.js +132 -0
  79. package/chunks/{chunk-YUFIEIWC.js → chunk-GTM6IHBB.js} +2 -2
  80. package/chunks/{chunk-HIVKI6O6.js → chunk-H35Q5CEG.js} +9 -7
  81. package/chunks/{chunk-FJ5WUMUQ.js → chunk-H36SETQS.js} +1 -1
  82. package/chunks/{chunk-AUOULH6Q.js → chunk-H6FIBBXK.js} +1610 -2196
  83. package/chunks/{chunk-VEMNQMHA.js → chunk-H6ZYP74A.js} +5 -13
  84. package/chunks/{chunk-TTJZAIFP.js → chunk-HEBW74ZW.js} +3 -3
  85. package/chunks/{chunk-6FMJLI5M.js → chunk-HFVW54NL.js} +41 -6
  86. package/chunks/{chunk-44F4LBWZ.js → chunk-HIXVWF7I.js} +56 -18
  87. package/chunks/{chunk-EQNUDTL6.js → chunk-HUIQ4FYC.js} +2 -2
  88. package/chunks/{chunk-5NNHICSA.js → chunk-I7JDGNG6.js} +3 -3
  89. package/chunks/{chunk-PVNQRENX.js → chunk-IF6K42YJ.js} +1 -1
  90. package/chunks/{chunk-PJOHNFIY.js → chunk-IWGTGH4G.js} +5 -5
  91. package/chunks/{chunk-B4AJNNOL.js → chunk-J26HHFI5.js} +1 -1
  92. package/chunks/{chunk-CNTR4GR6.js → chunk-JELIWHXD.js} +1 -1
  93. package/chunks/{chunk-V25K5ID7.js → chunk-K2J5JZ6B.js} +1 -1
  94. package/chunks/{chunk-IGTHU3T4.js → chunk-KKN2IE7Q.js} +1 -1
  95. package/chunks/{chunk-TZTAV5RH.js → chunk-KVUBYJDM.js} +2 -2
  96. package/chunks/{chunk-3F2WDAV6.js → chunk-KXWERR6P.js} +14 -14
  97. package/chunks/{chunk-JJPKFJBT.js → chunk-L7FTDKCD.js} +3 -3
  98. package/chunks/chunk-LBOVL47Y.js +29 -0
  99. package/chunks/{chunk-FS674JW4.js → chunk-LBWNSLJK.js} +3 -3
  100. package/chunks/{chunk-I5BT7ADR.js → chunk-LGT3YMLN.js} +4 -4
  101. package/chunks/{chunk-UV6KF7T3.js → chunk-LZV2BZPL.js} +3 -3
  102. package/chunks/{chunk-P755N4CS.js → chunk-M5LIY7Y6.js} +6 -6
  103. package/chunks/{chunk-YGE3IXJP.js → chunk-M744OFVE.js} +1 -1
  104. package/chunks/{chunk-NTDH4IML.js → chunk-MCXMWLFT.js} +7 -7
  105. package/chunks/chunk-MISUEWB4.js +8749 -0
  106. package/chunks/{chunk-TEGJSJDF.js → chunk-MOHAWIAW.js} +2 -2
  107. package/chunks/{chunk-KXDONCPU.js → chunk-MTR4JWQJ.js} +4 -4
  108. package/chunks/{chunk-RSVPYAGK.js → chunk-MUEJ4R3E.js} +5 -5
  109. package/chunks/{chunk-PCK4B6LR.js → chunk-N42C2FU3.js} +1 -1
  110. package/chunks/{chunk-WWCMSZII.js → chunk-NW57GHNL.js} +71 -7
  111. package/chunks/{chunk-PQNHRFJC.js → chunk-NYX53SV4.js} +0 -2
  112. package/chunks/{chunk-QARJNL2V.js → chunk-O2ZYHG33.js} +5 -4
  113. package/chunks/{chunk-V7RNNPGC.js → chunk-P5Y23G2L.js} +18 -1
  114. package/chunks/{chunk-GURGAJTX.js → chunk-PDDYAXL2.js} +4 -1
  115. package/chunks/chunk-PWCQRLM5.js +1170 -0
  116. package/chunks/{chunk-VMX5RZQH.js → chunk-Q3G5L5KF.js} +18 -9
  117. package/chunks/{chunk-DQ2O5QOJ.js → chunk-QDWLUXKP.js} +1 -1
  118. package/chunks/chunk-QL4TN4HS.js +59 -0
  119. package/chunks/{chunk-E6CJ2SMM.js → chunk-QMBEW7EW.js} +2 -2
  120. package/chunks/{chunk-U4VTUMMK.js → chunk-QONSRAEV.js} +1 -1
  121. package/chunks/{chunk-DEEABGH2.js → chunk-QPSYIV2O.js} +3320 -536
  122. package/chunks/{chunk-Q5WZTTWE.js → chunk-QWDVZH24.js} +6 -8
  123. package/chunks/{chunk-2LEOZTBT.js → chunk-QWW6I2UO.js} +111 -26
  124. package/chunks/{chunk-LOY7RWQG.js → chunk-QYPT3QUD.js} +3 -3
  125. package/chunks/{chunk-6PQPKTXP.js → chunk-R7XNRHYD.js} +1 -1
  126. package/chunks/{chunk-7SJN2IWT.js → chunk-RCXCGZG6.js} +5 -5
  127. package/chunks/{chunk-HX6RLYUO.js → chunk-RL6J3BPE.js} +4 -4
  128. package/chunks/{chunk-Z3S5EMOW.js → chunk-RPYYTL7E.js} +60 -12
  129. package/chunks/{chunk-MB32MS4U.js → chunk-RR224BUP.js} +215 -174
  130. package/chunks/{chunk-H6I4PGRV.js → chunk-SKSF3LGQ.js} +4 -4
  131. package/chunks/{chunk-77V3VIKL.js → chunk-SQ3YD5MI.js} +9 -9
  132. package/chunks/{chunk-CBBP4BMC.js → chunk-SRY26X4H.js} +72 -206
  133. package/chunks/{chunk-RDJOB6S3.js → chunk-TXABHVZD.js} +1 -1
  134. package/chunks/{chunk-R2XWGR75.js → chunk-TYERNYH4.js} +2 -2
  135. package/chunks/chunk-TZTBZ25J.js +222 -0
  136. package/chunks/{chunk-45IOTAUS.js → chunk-U25CMJYY.js} +1 -1
  137. package/chunks/{chunk-7ULQIS27.js → chunk-UEJESCS7.js} +1 -1
  138. package/chunks/{chunk-HC45LTEN.js → chunk-UH7Z7Y45.js} +1 -1
  139. package/chunks/{chunk-CPZAH673.js → chunk-UKZEXS6K.js} +2 -0
  140. package/chunks/{chunk-54YCNSK5.js → chunk-UQDFEU47.js} +4113 -10152
  141. package/chunks/{chunk-XP4L6KS3.js → chunk-URN76TKR.js} +2 -2
  142. package/chunks/{chunk-XUGZYLDH.js → chunk-UWSXFI6E.js} +1 -1
  143. package/chunks/{chunk-AOHY3QJ3.js → chunk-VA5NLVPT.js} +3 -3
  144. package/chunks/{chunk-PZEXDV3H.js → chunk-VUNRNRN6.js} +71 -43
  145. package/chunks/{chunk-FANRZEAJ.js → chunk-VWOVHOTT.js} +1 -1
  146. package/chunks/{chunk-QTHQ6Z5X.js → chunk-WK4TJUEA.js} +1 -1
  147. package/chunks/{chunk-ZPZ7ZJEE.js → chunk-WUC6ZFXO.js} +1 -1
  148. package/chunks/{chunk-7KAXXBER.js → chunk-WY2ENRDN.js} +3 -3
  149. package/chunks/{chunk-TIRRPCFS.js → chunk-X6QNZOTC.js} +1 -1
  150. package/chunks/{chunk-KWHKHSIS.js → chunk-X6WUYMOV.js} +8 -8
  151. package/chunks/{chunk-IIUGIWWY.js → chunk-XC2VAFVZ.js} +1 -1
  152. package/chunks/{chunk-D4HTUMGX.js → chunk-XC656O42.js} +3 -3
  153. package/chunks/{chunk-RG64CDT2.js → chunk-XMJO6C44.js} +131 -48
  154. package/chunks/{chunk-ZMOJ7ISP.js → chunk-XUMAD5IT.js} +1 -1
  155. package/chunks/{chunk-THVU3RNH.js → chunk-YAVY33G4.js} +1 -1
  156. package/chunks/{chunk-YANIWTRZ.js → chunk-YPUHMQXV.js} +1 -1
  157. package/chunks/{chunk-QCXGC7QB.js → chunk-YU6TBRTA.js} +3 -3
  158. package/chunks/{chunk-OFZKFPYG.js → chunk-YWMDTMAU.js} +3 -3
  159. package/chunks/{chunk-DSFHVTWD.js → chunk-YXEVDA66.js} +2 -2
  160. package/chunks/{chunk-JE2CEOBO.js → chunk-ZGSUFIL5.js} +4 -4
  161. package/chunks/{chunk-BBIQAX4V.js → chunk-ZJES4C3I.js} +30 -18
  162. package/chunks/{computer-use-5QWCFNKD.js → computer-use-UJMK6JQU.js} +36 -34
  163. package/chunks/{config-utils-WADIDWGG.js → config-utils-7COTJMWK.js} +4 -4
  164. package/chunks/{contextCommand-4Z7T7TUM.js → contextCommand-4YABGF4S.js} +40 -38
  165. package/chunks/{core-runtime-6N4EFC2Q.js → core-runtime-7M4VM3DA.js} +36 -34
  166. package/chunks/{create-sub-session-AEREHZBQ.js → create-sub-session-HOFDW4N7.js} +39 -37
  167. package/chunks/{create-sub-session-62YZWVAY.js → create-sub-session-J32WC64U.js} +2 -2
  168. package/chunks/{cron-create-6E7GIQTG.js → cron-create-HMFSHIAR.js} +4 -4
  169. package/chunks/{cron-delete-JD26XY3W.js → cron-delete-ZJFHOX57.js} +4 -4
  170. package/chunks/{cron-list-CUWFB44G.js → cron-list-ZEX2NBMN.js} +4 -4
  171. package/chunks/{daemon-PCNCI5YU.js → daemon-CCIX4BMG.js} +47 -6
  172. package/chunks/{daemon-status-provider-DDF7C5M7.js → daemon-status-provider-W2U5Q3J5.js} +47 -45
  173. package/chunks/{daemon-trust-policy-Q4KSOJTR.js → daemon-trust-policy-IFICWPXP.js} +42 -40
  174. package/chunks/{daemon-trust-policy-monitor-V6FTE3IY.js → daemon-trust-policy-monitor-GX7EO6FW.js} +42 -40
  175. package/chunks/{de-SY6O76BF.js → de-A6TI4LBB.js} +46 -5
  176. package/chunks/{deferred-core-runtime-GHJ5GQHK.js → deferred-core-runtime-U36OOOKE.js} +36 -34
  177. package/chunks/display-image-VS3TXYQH.js +184 -0
  178. package/chunks/{dist-ZHXOBXDN.js → dist-3BMEUGTG.js} +1 -1
  179. package/chunks/{dist-26BIMQT6.js → dist-4KAX7CCL.js} +289 -27
  180. package/chunks/{dist-OAOC5OV4.js → dist-7JGAAQSC.js} +2 -2
  181. package/chunks/{dist-SL2LUMML.js → dist-A7H2KKUC.js} +1 -1
  182. package/chunks/{dist-2PERFI23.js → dist-DPPHJAVL.js} +3 -3
  183. package/chunks/{dist-PVEAFLHY.js → dist-HVBMEYWK.js} +1 -1
  184. package/chunks/{dist-ULIG4M5H.js → dist-NEBRI7WO.js} +67 -15
  185. package/chunks/{dist-WGMNT3JQ.js → dist-SFQ34F4M.js} +24 -6
  186. package/chunks/{earlyInputCapture-TQXLLISD.js → earlyInputCapture-5ZWDH3SB.js} +37 -35
  187. package/chunks/{edit-FJEUV6KZ.js → edit-J7SW6UP6.js} +36 -34
  188. package/chunks/{en-NBK3JKCE.js → en-L4UQDLWW.js} +57 -6
  189. package/chunks/{enter-worktree-7GE3TZ4P.js → enter-worktree-NRLOHRB6.js} +36 -34
  190. package/chunks/{enterPlanMode-KR5TMPCJ.js → enterPlanMode-GDSTEFSM.js} +36 -34
  191. package/chunks/{environment-SWL3CMB3.js → environment-KHYEKG5W.js} +39 -37
  192. package/chunks/{errors-XQE7BGZV.js → errors-VNLAJV3O.js} +39 -37
  193. package/chunks/{exit-worktree-CHKTYNCV.js → exit-worktree-ARVID7DF.js} +36 -34
  194. package/chunks/{exitPlanMode-QYAG6LWX.js → exitPlanMode-4ZFY7KUH.js} +36 -34
  195. package/chunks/{fast-path-Z2K7W6DC.js → fast-path-KA65VREJ.js} +9 -5
  196. package/chunks/{fr-4KG5V7UT.js → fr-QF7RI5ZE.js} +46 -5
  197. package/chunks/{gemini-YU4XKEDG.js → gemini-5PMCNPF7.js} +149 -90
  198. package/chunks/{geminiContentGenerator-ZZX6NBO4.js → geminiContentGenerator-NFSYJ4HA.js} +6 -6
  199. package/chunks/{glob-VYF5CXSX.js → glob-F3EAUDAX.js} +36 -34
  200. package/chunks/{goal-tools-HGO6VXPB.js → goal-tools-SPQ5M6D3.js} +3 -3
  201. package/chunks/{grep-5DP5ZUTW.js → grep-UJMPVZER.js} +36 -34
  202. package/chunks/{handleAutoUpdate-UVBJ56DL.js → handleAutoUpdate-MG4FRZPN.js} +42 -40
  203. package/chunks/{i18n-UQNYHEUD.js → i18n-EVHV4ZF3.js} +38 -36
  204. package/chunks/{image-gen-WHPIZNWF.js → image-gen-UC7XVHI7.js} +9 -9
  205. package/chunks/{initializer-GMIICF4W.js → initializer-O5B6HUBI.js} +43 -41
  206. package/chunks/{installationInfo-4MGG4WVI.js → installationInfo-2LIKCNVX.js} +37 -35
  207. package/chunks/{ja-F3GSQXMF.js → ja-URQESVGW.js} +46 -5
  208. package/chunks/{keychain-token-storage-IKO4G53C.js → keychain-token-storage-7BT4TQ2A.js} +2 -2
  209. package/chunks/{kittyProtocolDetector-MBRTDRBK.js → kittyProtocolDetector-BFLAKYXH.js} +1 -1
  210. package/chunks/{list-CPN2W334.js → list-BPKIE3Z4.js} +45 -43
  211. package/chunks/{list-agents-PXJ7ZUFB.js → list-agents-TWEGRJWO.js} +2 -2
  212. package/chunks/{loadedSettingsAdapter-ZQAV5NDO.js → loadedSettingsAdapter-NGLFF4V4.js} +42 -40
  213. package/chunks/{loggingContentGenerator-5E7W4IEP.js → loggingContentGenerator-7TFESRG5.js} +52 -37
  214. package/chunks/{loop-wakeup-Y26NQZ5I.js → loop-wakeup-6LLEOQYV.js} +5 -5
  215. package/chunks/{ls-ONQTTMQR.js → ls-H5WX22VK.js} +4 -4
  216. package/chunks/{lsp-YGHHRGMD.js → lsp-G6FXYEIS.js} +2 -2
  217. package/chunks/{managed-npm-update-MKKAXYXA.js → managed-npm-update-CLZGGV7F.js} +39 -37
  218. package/chunks/{mcp-V5NTJF6X.js → mcp-X5OZOOXX.js} +42 -40
  219. package/chunks/{monitor-CO3ASY6E.js → monitor-TGSVSAZZ.js} +36 -34
  220. package/chunks/nonInteractiveCli-GUMJ5JLG.js +150 -0
  221. package/chunks/{notebook-edit-Z7AEE6FM.js → notebook-edit-EZISE7IC.js} +36 -34
  222. package/chunks/{openaiContentGenerator-CA3MQOP3.js → openaiContentGenerator-ZAKS5A6P.js} +18 -18
  223. package/chunks/{pidfile-NL7MKDRU.js → pidfile-PCMBX4LR.js} +37 -35
  224. package/chunks/{processUtils-PB5K2DYH.js → processUtils-2CSVE5BW.js} +2 -2
  225. package/chunks/{pt-EQ33KWEN.js → pt-EEEQXRUI.js} +46 -5
  226. package/chunks/{qwenContentGenerator-JYFNDCOS.js → qwenContentGenerator-S3H6PIC4.js} +42 -40
  227. package/chunks/{qwenOAuth2-W2ALKQDD.js → qwenOAuth2-MNU425VE.js} +8 -8
  228. package/chunks/{read-file-IEOR5H5W.js → read-file-HXJXHBI6.js} +10 -10
  229. package/chunks/{read-mcp-resource-U2IJN5HM.js → read-mcp-resource-DRZSI3HE.js} +2 -2
  230. package/chunks/{record-artifact-MGPJ7EG4.js → record-artifact-IPIRWMFY.js} +3 -3
  231. package/chunks/{resumeHistoryUtils-BNBTP5AS.js → resumeHistoryUtils-4QAMC2S6.js} +44 -42
  232. package/chunks/{ripGrep-UMQODKEB.js → ripGrep-MCETPF2E.js} +36 -34
  233. package/chunks/{ru-7OZAUKGG.js → ru-WGZDYQAB.js} +46 -5
  234. package/chunks/{run-qwen-serve-RN2R6QQW.js → run-qwen-serve-3NMODTXV.js} +219 -55
  235. package/chunks/{runtime-QFJ2MJF5.js → runtime-AQOV7DVP.js} +49 -45
  236. package/chunks/{scheduler-AMYUFOZI.js → scheduler-DN7SZ6ZE.js} +36 -34
  237. package/chunks/{sdk-exporters-http-4BQANSJ6.js → sdk-exporters-http-IKNWQJNV.js} +2 -2
  238. package/chunks/{sdk-impl-Z4VXWVFX.js → sdk-impl-7CUUMQDB.js} +2 -2
  239. package/chunks/{send-message-PMP4ATVM.js → send-message-HGCVVDTZ.js} +5 -4
  240. package/chunks/{serve-EIIYJVX3.js → serve-WZB45HVT.js} +42 -40
  241. package/chunks/{server-EP2LLAPD.js → server-GOTZFEEZ.js} +616 -387
  242. package/chunks/{session-GMPZBLOW.js → session-23LOFLWN.js} +149 -87
  243. package/chunks/{settings-LN7RNKBS.js → settings-LI2ORVXC.js} +41 -39
  244. package/chunks/{shell-EM2OWU5X.js → shell-GLC6OP3C.js} +36 -34
  245. package/chunks/{skill-T5VPSK73.js → skill-C7W6M4GO.js} +27 -14
  246. package/chunks/{skill-settings-GMR3GMNY.js → skill-settings-W25NCK5I.js} +41 -39
  247. package/chunks/{spawnChannel-YPCU62DI.js → spawnChannel-OHJLEBLD.js} +38 -36
  248. package/chunks/{standalone-update-JAKIM2NF.js → standalone-update-E4V5V7WT.js} +39 -37
  249. package/chunks/{startInteractiveUI-YETQWGYF.js → startInteractiveUI-FKILLW7Q.js} +1815 -1034
  250. package/chunks/{syntheticOutput-D7E6ZFKR.js → syntheticOutput-EYL7DWO7.js} +3 -3
  251. package/chunks/{task-create-NFCYD43L.js → task-create-CSCEG4SM.js} +10 -9
  252. package/chunks/{task-list-TAVMGEVD.js → task-list-6CVQPORX.js} +6 -6
  253. package/chunks/{task-stop-ZDF2UJRM.js → task-stop-Y5ZTFVRX.js} +2 -2
  254. package/chunks/{task-update-6L7LHGEX.js → task-update-C52LNFU5.js} +10 -9
  255. package/chunks/{team-create-LFJ6HGNY.js → team-create-HBIJ7NHT.js} +36 -34
  256. package/chunks/{team-delete-DPGGRQBU.js → team-delete-CE7DC53R.js} +6 -6
  257. package/chunks/{team-plan-approval-C2KLSDGO.js → team-plan-approval-IBJOKS4J.js} +36 -34
  258. package/chunks/terminal-image-renderer-BOQJPVLB.js +89 -0
  259. package/chunks/{theme-manager-JQ3ZGBP5.js → theme-manager-NSS7VLUD.js} +37 -35
  260. package/chunks/{todoWrite-2UO5G6G6.js → todoWrite-YKAA57W2.js} +107 -36
  261. package/chunks/{tool-search-FAZBFRJZ.js → tool-search-DEAS54VG.js} +13 -12
  262. package/chunks/{total-session-admission-5CALIVYO.js → total-session-admission-4LWTX3WD.js} +43 -41
  263. package/chunks/{trustedFolders-KOPSP44S.js → trustedFolders-NF3J2TA7.js} +38 -36
  264. package/chunks/{update-relaunch-6QL2TICS.js → update-relaunch-WUHRH5V3.js} +5 -5
  265. package/chunks/{updateCheck-4Q6RIKFW.js → updateCheck-7EG4BLBH.js} +41 -39
  266. package/chunks/{useAutoAcceptIndicator-Q5BMKZV3.js → useAutoAcceptIndicator-ZRV56GVP.js} +46 -44
  267. package/chunks/{validateNonInterActiveAuth-GKOC5F6Z.js → validateNonInterActiveAuth-WC2FPE3I.js} +86 -84
  268. package/chunks/{version-VSATY2LD.js → version-6SS7KCUP.js} +1 -1
  269. package/chunks/{web-fetch-JCLKL6NL.js → web-fetch-Y5QQMPKA.js} +13 -13
  270. package/chunks/{web-search-DSQTFUBX.js → web-search-QKKEU723.js} +8 -8
  271. package/chunks/{workflow-M6QAVKVJ.js → workflow-PWIU6Q2M.js} +418 -304
  272. package/chunks/{workspace-providers-status-YKLTLMJA.js → workspace-providers-status-B2DM6FNK.js} +45 -43
  273. package/chunks/{workspace-registration-store-5DMGKU64.js → workspace-registration-store-7Y33TTHJ.js} +2 -2
  274. package/chunks/{workspace-registry-PTYUSYXX.js → workspace-registry-TSNJKLPC.js} +43 -41
  275. package/chunks/{workspace-service-25ML3T47.js → workspace-service-4I2QHDX4.js} +50 -48
  276. package/chunks/{workspace-skills-status-YKZWOYRX.js → workspace-skills-status-HVXNWVGR.js} +44 -42
  277. package/chunks/{workspace-trust-reconciler-5FI2S3OS.js → workspace-trust-reconciler-RDBBGMWP.js} +49 -47
  278. package/chunks/{write-file-AY7VLP5X.js → write-file-RQ4DG5RY.js} +36 -34
  279. package/chunks/{zh-H3YDK5QW.js → zh-72XPUG5P.js} +54 -6
  280. package/chunks/{zh-TW-JYCP7XUA.js → zh-TW-LTB4SRH3.js} +54 -6
  281. package/chunks/{zoom-image-S4LJZMD5.js → zoom-image-O5YCB7WN.js} +10 -10
  282. package/cli.js +32 -48
  283. package/locales/ca.js +60 -4
  284. package/locales/de.js +62 -4
  285. package/locales/en.js +76 -6
  286. package/locales/fr.js +64 -4
  287. package/locales/ja.js +61 -4
  288. package/locales/pt.js +60 -4
  289. package/locales/ru.js +63 -4
  290. package/locales/zh-TW.js +67 -6
  291. package/locales/zh.js +67 -6
  292. package/package.json +3 -3
  293. package/web-shell/assets/{arc-xjArKHU2.js → arc-Bd7d781i.js} +1 -1
  294. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BgrQDNYG.js → architectureDiagram-3BPJPVTR-CpnOJqNE.js} +1 -1
  295. package/web-shell/assets/{blockDiagram-GPEHLZMM-CXxWC-1_.js → blockDiagram-GPEHLZMM-NxVTiWnk.js} +1 -1
  296. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dx1tLm3v.js → c4Diagram-AAUBKEIU-BWT75l82.js} +1 -1
  297. package/web-shell/assets/channel-A434sWK5.js +1 -0
  298. package/web-shell/assets/{chunk-2J33WTMH-CBxjogVR.js → chunk-2J33WTMH-Dzz03hk6.js} +1 -1
  299. package/web-shell/assets/{chunk-4BX2VUAB-izb-rY5W.js → chunk-4BX2VUAB-DRF-egfm.js} +1 -1
  300. package/web-shell/assets/{chunk-55IACEB6-NzLyvSb8.js → chunk-55IACEB6-Co15vq5x.js} +1 -1
  301. package/web-shell/assets/{chunk-727SXJPM-DVyKb0dl.js → chunk-727SXJPM-DHSUk1J7.js} +1 -1
  302. package/web-shell/assets/{chunk-AQP2D5EJ-BtqL7NzB.js → chunk-AQP2D5EJ-Br8u_E2R.js} +1 -1
  303. package/web-shell/assets/{chunk-FMBD7UC4-iNpdKIO0.js → chunk-FMBD7UC4-DXbPTnqF.js} +1 -1
  304. package/web-shell/assets/{chunk-ND2GUHAM-DI7cbFmX.js → chunk-ND2GUHAM-BleQdi4d.js} +1 -1
  305. package/web-shell/assets/{chunk-QZHKN3VN-3Y_-xFYs.js → chunk-QZHKN3VN-CqgBf-95.js} +1 -1
  306. package/web-shell/assets/classDiagram-4FO5ZUOK-CwPuhldB.js +1 -0
  307. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwPuhldB.js +1 -0
  308. package/web-shell/assets/{cose-bilkent-S5V4N54A--raRatZn.js → cose-bilkent-S5V4N54A-WS7b13Yg.js} +1 -1
  309. package/web-shell/assets/{dagre-BM42HDAG-B8SU70mO.js → dagre-BM42HDAG-v_55ki8o.js} +1 -1
  310. package/web-shell/assets/{diagram-2AECGRRQ-ewgoakXo.js → diagram-2AECGRRQ-DaYAjbdK.js} +1 -1
  311. package/web-shell/assets/{diagram-5GNKFQAL-Bm_JLTnS.js → diagram-5GNKFQAL-D_Hy-L64.js} +1 -1
  312. package/web-shell/assets/{diagram-KO2AKTUF-DEIUjUy9.js → diagram-KO2AKTUF-dB06cZyD.js} +1 -1
  313. package/web-shell/assets/{diagram-LMA3HP47-C2Wmrpj-.js → diagram-LMA3HP47-DzSluD4F.js} +1 -1
  314. package/web-shell/assets/{diagram-OG6HWLK6-CtYe6bFx.js → diagram-OG6HWLK6-Cvb6CeXQ.js} +1 -1
  315. package/web-shell/assets/{erDiagram-TEJ5UH35-DfpHcWLV.js → erDiagram-TEJ5UH35-7eB2Hmov.js} +1 -1
  316. package/web-shell/assets/{flowDiagram-I6XJVG4X-CAiUhio5.js → flowDiagram-I6XJVG4X-B08iGCw_.js} +1 -1
  317. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CYc7ezr4.js → ganttDiagram-6RSMTGT7-BgsrCHq-.js} +1 -1
  318. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-70lbkcRS.js → gitGraphDiagram-PVQCEYII-DQLurQ2i.js} +1 -1
  319. package/web-shell/assets/{index-Ww86nT9f.js → index-B_1Z0Mgr.js} +1 -1
  320. package/web-shell/assets/index-Bi1dP2mU.css +5 -0
  321. package/web-shell/assets/index-DJ-z1Oba.js +1756 -0
  322. package/web-shell/assets/{infoDiagram-5YYISTIA-C7e8DWPa.js → infoDiagram-5YYISTIA-DXZGO8qB.js} +1 -1
  323. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BYLr2op-.js → ishikawaDiagram-YF4QCWOH-g7gbuH2w.js} +1 -1
  324. package/web-shell/assets/{journeyDiagram-JHISSGLW-hEibAHKX.js → journeyDiagram-JHISSGLW-euefICGn.js} +1 -1
  325. package/web-shell/assets/{kanban-definition-UN3LZRKU-F2rt8Uhp.js → kanban-definition-UN3LZRKU-Dws8-mjG.js} +1 -1
  326. package/web-shell/assets/{linear-DPhyNezd.js → linear-C63F0tyh.js} +1 -1
  327. package/web-shell/assets/{mermaid.core-ZUtnug0n.js → mermaid.core-fLrhp_4-.js} +5 -5
  328. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DDWcMoi8.js → mindmap-definition-RKZ34NQL-qRkydfT-.js} +1 -1
  329. package/web-shell/assets/{pieDiagram-4H26LBE5-CTRKzw1_.js → pieDiagram-4H26LBE5-BZ0wQaKN.js} +1 -1
  330. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CAEwYG_z.js → quadrantDiagram-W4KKPZXB-Fjq6GbSZ.js} +1 -1
  331. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CRjnH9D9.js → requirementDiagram-4Y6WPE33-CqWvjLHU.js} +1 -1
  332. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-LPQT_sOd.js → sankeyDiagram-5OEKKPKP-VcXX6PVZ.js} +1 -1
  333. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Ht2Iqvb0.js → sequenceDiagram-3UESZ5HK-BJSRtxFr.js} +1 -1
  334. package/web-shell/assets/{stateDiagram-AJRCARHV-CIUdqOXu.js → stateDiagram-AJRCARHV-Dt9zUwmZ.js} +1 -1
  335. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CCxQt56w.js +1 -0
  336. package/web-shell/assets/{timeline-definition-PNZ67QCA-BcilneZF.js → timeline-definition-PNZ67QCA-DQwlNRws.js} +1 -1
  337. package/web-shell/assets/{vennDiagram-CIIHVFJN-BljwiiH1.js → vennDiagram-CIIHVFJN-DwxjUEtQ.js} +1 -1
  338. package/web-shell/assets/{wardley-L42UT6IY-DeKjkYjq.js → wardley-L42UT6IY-D3QdMSpJ.js} +1 -1
  339. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-L3U1H7KG.js → wardleyDiagram-YWT4CUSO-BddN8oK8.js} +1 -1
  340. package/web-shell/assets/{xychartDiagram-2RQKCTM6-IJnWsgMT.js → xychartDiagram-2RQKCTM6-BUNuBrRJ.js} +1 -1
  341. package/web-shell/index.html +2 -2
  342. package/chunks/chunk-4KP2F2TE.js +0 -82
  343. package/chunks/chunk-HGT6JR3U.js +0 -177
  344. package/chunks/nonInteractiveCli-ZJYEOO7U.js +0 -148
  345. package/web-shell/assets/channel-B1cyk94G.js +0 -1
  346. package/web-shell/assets/classDiagram-4FO5ZUOK-BpBYZoRE.js +0 -1
  347. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BpBYZoRE.js +0 -1
  348. package/web-shell/assets/index-C1k3PDuU.css +0 -5
  349. package/web-shell/assets/index-DZLIXILO.js +0 -1750
  350. package/web-shell/assets/insert-DmRbh9Rv.svg +0 -1
  351. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BmqqQZ6w.js +0 -1
@@ -3,8 +3,9 @@
3
3
  import {
4
4
  PollingChannelBase,
5
5
  getGlobalQwenDir,
6
+ getWorkspaceScopeDirName,
6
7
  sanitizeLogText
7
- } from "./chunk-JCJ7LKNA.js";
8
+ } from "./chunk-DIEFUBV6.js";
8
9
  import "./chunk-UDXSXLER.js";
9
10
  import "./chunk-H6XPXXMH.js";
10
11
  import {
@@ -125,9 +126,9 @@ init_esbuild_shims();
125
126
 
126
127
  // packages/channels/github/dist/GithubAdapter.js
127
128
  init_esbuild_shims();
128
- import { createHash } from "node:crypto";
129
- import { appendFileSync, chmodSync, mkdirSync } from "node:fs";
130
- import { join } from "node:path";
129
+ import { createHash, randomUUID } from "node:crypto";
130
+ import { appendFileSync, chmodSync, existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
131
+ import { dirname, join } from "node:path";
131
132
  import process2 from "node:process";
132
133
 
133
134
  // node_modules/@octokit/rest/dist-src/index.js
@@ -3863,8 +3864,7 @@ function isNoReplySentinel(text) {
3863
3864
  __name(isNoReplySentinel, "isNoReplySentinel");
3864
3865
  function isDefiniteNoWriteGithubError(err) {
3865
3866
  const e = err;
3866
- const remaining = Number(e.response?.headers?.["x-ratelimit-remaining"]);
3867
- return e.status === 429 || e.status === 403 && remaining === 0;
3867
+ return (e.status === 403 || e.status === 429) && Number(e.response?.headers?.["x-ratelimit-remaining"]) === 0;
3868
3868
  }
3869
3869
  __name(isDefiniteNoWriteGithubError, "isDefiniteNoWriteGithubError");
3870
3870
  function parseTriggerKind(metadata) {
@@ -3881,6 +3881,11 @@ function buildTriggerGuidance(reason) {
3881
3881
  return `For ${reason}, output exactly ${NO_REPLY_SENTINEL} when a public reply is unnecessary.`;
3882
3882
  }
3883
3883
  __name(buildTriggerGuidance, "buildTriggerGuidance");
3884
+ function isPendingFinalDelivery(value) {
3885
+ const item = value;
3886
+ return item !== null && typeof item === "object" && typeof item.id === "string" && typeof item.createdAt === "string" && typeof item.chatId === "string" && typeof item.threadId === "string" && typeof item.fullText === "string" && typeof item.sessionId === "string";
3887
+ }
3888
+ __name(isPendingFinalDelivery, "isPendingFinalDelivery");
3884
3889
  var GithubChannel = class extends PollingChannelBase {
3885
3890
  static {
3886
3891
  __name(this, "GithubChannel");
@@ -3890,6 +3895,10 @@ var GithubChannel = class extends PollingChannelBase {
3890
3895
  webOrigin = "https://github.com";
3891
3896
  activeReactions = /* @__PURE__ */ new Map();
3892
3897
  reactionsPendingRemoval = /* @__PURE__ */ new Set();
3898
+ pendingFinalDeliveryRetry;
3899
+ pendingFinalDeliveryRetryAbort;
3900
+ pendingFinalDeliveryRequestsActive = 0;
3901
+ pendingFinalDeliveryRetryStopRequested = false;
3893
3902
  reasonFilter = null;
3894
3903
  constructor(name, config, bridge, options) {
3895
3904
  config.blockStreaming = "off";
@@ -3949,10 +3958,33 @@ var GithubChannel = class extends PollingChannelBase {
3949
3958
  `);
3950
3959
  }
3951
3960
  this.gate.replaceAllowedUsers(allowed);
3961
+ this.migrateLegacyPublicationState();
3962
+ this.pendingFinalDeliveryRetryStopRequested = false;
3952
3963
  this.startPollLoop();
3964
+ if (this.pendingFinalDeliveryRetry) {
3965
+ return;
3966
+ }
3967
+ const retryAbort = new AbortController();
3968
+ const retry = this.retryPendingFinalDeliveries(retryAbort.signal).catch((err) => {
3969
+ if (!retryAbort.signal.aborted) {
3970
+ process2.stderr.write(`[Channel:${this.name}] pending GitHub delivery retry failed: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
3971
+ `);
3972
+ }
3973
+ }).finally(() => {
3974
+ if (this.pendingFinalDeliveryRetry === retry) {
3975
+ this.pendingFinalDeliveryRetry = void 0;
3976
+ this.pendingFinalDeliveryRetryAbort = void 0;
3977
+ }
3978
+ });
3979
+ this.pendingFinalDeliveryRetryAbort = retryAbort;
3980
+ this.pendingFinalDeliveryRetry = retry;
3953
3981
  }
3954
3982
  disconnect() {
3955
3983
  this.stopPollLoop();
3984
+ this.pendingFinalDeliveryRetryStopRequested = true;
3985
+ if (this.pendingFinalDeliveryRequestsActive === 0) {
3986
+ this.pendingFinalDeliveryRetryAbort?.abort();
3987
+ }
3956
3988
  }
3957
3989
  async sendMessage(_chatId, _text) {
3958
3990
  throw new Error(`[Channel:${this.name}] sendMessage requires a threadId; use sendThreadMessage`);
@@ -3966,18 +3998,15 @@ var GithubChannel = class extends PollingChannelBase {
3966
3998
  async publishFinalResponse(chatId, threadId, fullText, sessionId) {
3967
3999
  const threadMatch = threadId?.match(/^(issue|pr):(\d+)$/);
3968
4000
  const metadata = this.getResponseMetadata(sessionId);
3969
- const auditBase = {
3970
- channel: this.name,
3971
- triggerKind: parseTriggerKind(metadata),
3972
- repository: chatId,
3973
- number: threadMatch ? Number(threadMatch[2]) : void 0,
4001
+ const auditBase = this.buildPublicationAuditBase({
4002
+ chatId,
4003
+ threadId,
4004
+ fullText,
3974
4005
  sessionId,
3975
4006
  sourceMessageId: this.getResponseMessageId(sessionId),
3976
4007
  actor: this.getResponseSenderId(sessionId),
3977
- threadId,
3978
- bodySha256: createHash("sha256").update(fullText).digest("hex"),
3979
- bodyChars: Array.from(fullText).length
3980
- };
4008
+ metadata
4009
+ });
3981
4010
  if (isNoReplySentinel(fullText)) {
3982
4011
  this.recordPublicationAudit({
3983
4012
  ...auditBase,
@@ -4012,10 +4041,181 @@ var GithubChannel = class extends PollingChannelBase {
4012
4041
  failurePhase: "delivery",
4013
4042
  failureError: sanitizeLogText(err instanceof Error ? err.message : String(err), 200)
4014
4043
  });
4044
+ if (threadId && isDefiniteNoWriteGithubError(err)) {
4045
+ this.enqueuePendingFinalDelivery({
4046
+ ...auditBase,
4047
+ chatId,
4048
+ threadId,
4049
+ fullText
4050
+ });
4051
+ }
4015
4052
  throw new FinalPublicationError(err instanceof Error ? err.message : String(err), { cause: err });
4016
4053
  }
4017
4054
  }
4018
- async createIssueComment(chatId, threadId, text, retries = 3, shouldRetry = () => true) {
4055
+ buildPublicationAuditBase(input) {
4056
+ const threadMatch = input.threadId?.match(/^(issue|pr):(\d+)$/);
4057
+ return {
4058
+ channel: this.name,
4059
+ triggerKind: parseTriggerKind(input.metadata),
4060
+ repository: input.chatId,
4061
+ number: threadMatch ? Number(threadMatch[2]) : void 0,
4062
+ sessionId: input.sessionId,
4063
+ sourceMessageId: input.sourceMessageId,
4064
+ actor: input.actor,
4065
+ threadId: input.threadId,
4066
+ bodySha256: createHash("sha256").update(input.fullText).digest("hex"),
4067
+ bodyChars: Array.from(input.fullText).length
4068
+ };
4069
+ }
4070
+ enqueuePendingFinalDelivery(input) {
4071
+ const record = {
4072
+ id: createHash("sha256").update(JSON.stringify([
4073
+ input.chatId,
4074
+ input.threadId,
4075
+ input.sessionId,
4076
+ input.sourceMessageId ?? randomUUID(),
4077
+ input.bodySha256
4078
+ ])).digest("hex"),
4079
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
4080
+ chatId: input.chatId,
4081
+ threadId: input.threadId,
4082
+ fullText: input.fullText,
4083
+ sessionId: input.sessionId,
4084
+ sourceMessageId: input.sourceMessageId,
4085
+ actor: input.actor,
4086
+ triggerKind: input.triggerKind
4087
+ };
4088
+ try {
4089
+ const pending = this.readPendingFinalDeliveries().filter((item) => item.id !== record.id);
4090
+ this.writePendingFinalDeliveries([...pending, record]);
4091
+ } catch (err) {
4092
+ process2.stderr.write(`[Channel:${this.name}] failed to persist pending GitHub delivery: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
4093
+ `);
4094
+ }
4095
+ }
4096
+ async retryPendingFinalDeliveries(signal) {
4097
+ const pending = this.readPendingFinalDeliveries();
4098
+ for (const record of pending) {
4099
+ if (signal?.aborted)
4100
+ return;
4101
+ const auditBase = this.buildPublicationAuditBase({
4102
+ chatId: record.chatId,
4103
+ threadId: record.threadId,
4104
+ fullText: record.fullText,
4105
+ sessionId: record.sessionId,
4106
+ sourceMessageId: record.sourceMessageId,
4107
+ actor: record.actor,
4108
+ metadata: record.triggerKind ? `Trigger: ${record.triggerKind}.` : void 0
4109
+ });
4110
+ if (this.hasPostedPublicationAudit(record.id)) {
4111
+ process2.stderr.write(`[Channel:${this.name}] dropping pending GitHub delivery already recorded as posted: ${sanitizeLogText(record.id, 80)}
4112
+ `);
4113
+ this.updatePendingFinalDeliveries((current) => current.filter((item) => item.id !== record.id));
4114
+ continue;
4115
+ }
4116
+ try {
4117
+ const comment = await this.createIssueComment(record.chatId, record.threadId, record.fullText, 3, isDefiniteNoWriteGithubError, signal);
4118
+ this.recordPublicationAudit({
4119
+ ...auditBase,
4120
+ at: (/* @__PURE__ */ new Date()).toISOString(),
4121
+ type: "github_publication",
4122
+ outcome: "posted",
4123
+ pendingId: record.id,
4124
+ commentId: comment.id,
4125
+ commentUrl: comment.html_url
4126
+ });
4127
+ if (!this.updatePendingFinalDeliveries((current) => current.filter((item) => item.id !== record.id))) {
4128
+ continue;
4129
+ }
4130
+ } catch (err) {
4131
+ if (signal?.aborted)
4132
+ return;
4133
+ if (isDefiniteNoWriteGithubError(err)) {
4134
+ continue;
4135
+ }
4136
+ this.recordPublicationAudit({
4137
+ ...auditBase,
4138
+ at: (/* @__PURE__ */ new Date()).toISOString(),
4139
+ type: "github_publication",
4140
+ outcome: "failed",
4141
+ failurePhase: "delivery",
4142
+ failureError: sanitizeLogText(err instanceof Error ? err.message : String(err), 200)
4143
+ });
4144
+ if (!this.updatePendingFinalDeliveries((current) => current.filter((item) => item.id !== record.id))) {
4145
+ continue;
4146
+ }
4147
+ }
4148
+ }
4149
+ }
4150
+ hasPostedPublicationAudit(pendingId) {
4151
+ try {
4152
+ return readFileSync(this.channelFilePath("github-audit.jsonl"), "utf-8").split("\n").some((line) => {
4153
+ if (!line)
4154
+ return false;
4155
+ let record;
4156
+ try {
4157
+ record = JSON.parse(line);
4158
+ } catch {
4159
+ return false;
4160
+ }
4161
+ return record.outcome === "posted" && record.pendingId === pendingId;
4162
+ });
4163
+ } catch {
4164
+ return false;
4165
+ }
4166
+ }
4167
+ updatePendingFinalDeliveries(update) {
4168
+ try {
4169
+ this.writePendingFinalDeliveries(update(this.readPendingFinalDeliveries(true)));
4170
+ return true;
4171
+ } catch (err) {
4172
+ process2.stderr.write(`[Channel:${this.name}] failed to update pending GitHub deliveries: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
4173
+ `);
4174
+ return false;
4175
+ }
4176
+ }
4177
+ pendingFinalDeliveriesPath() {
4178
+ return this.channelFilePath("github-pending-deliveries.json");
4179
+ }
4180
+ readPendingFinalDeliveries(strict = false) {
4181
+ try {
4182
+ const parsed = JSON.parse(readFileSync(this.pendingFinalDeliveriesPath(), "utf-8"));
4183
+ return Array.isArray(parsed) ? parsed.filter(isPendingFinalDelivery) : [];
4184
+ } catch (err) {
4185
+ if (err.code !== "ENOENT") {
4186
+ process2.stderr.write(`[Channel:${this.name}] failed to read pending GitHub deliveries: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
4187
+ `);
4188
+ if (strict)
4189
+ throw err;
4190
+ }
4191
+ return [];
4192
+ }
4193
+ }
4194
+ writePendingFinalDeliveries(records) {
4195
+ const path = this.pendingFinalDeliveriesPath();
4196
+ if (records.length === 0) {
4197
+ try {
4198
+ unlinkSync(path);
4199
+ } catch (err) {
4200
+ if (err.code !== "ENOENT")
4201
+ throw err;
4202
+ }
4203
+ return;
4204
+ }
4205
+ const dir = join(getGlobalQwenDir(), "channels", getWorkspaceScopeDirName(this.config.cwd));
4206
+ mkdirSync(dir, { recursive: true, mode: 448 });
4207
+ chmodSync(dir, 448);
4208
+ const tmpPath = `${path}.${process2.pid}.tmp`;
4209
+ writeFileSync(tmpPath, `${JSON.stringify(records)}
4210
+ `, {
4211
+ encoding: "utf-8",
4212
+ mode: 384
4213
+ });
4214
+ chmodSync(tmpPath, 384);
4215
+ renameSync(tmpPath, path);
4216
+ chmodSync(path, 384);
4217
+ }
4218
+ async createIssueComment(chatId, threadId, text, retries = 3, shouldRetry = () => true, signal) {
4019
4219
  if (!threadId) {
4020
4220
  throw new Error(`[Channel:${this.name}] createIssueComment requires a threadId`);
4021
4221
  }
@@ -4025,12 +4225,23 @@ var GithubChannel = class extends PollingChannelBase {
4025
4225
  }
4026
4226
  const issueNumber = Number(match[1]);
4027
4227
  const [owner, repo] = chatId.split("/");
4028
- const response = await this.githubApi(() => this.octokit.rest.issues.createComment({
4029
- owner,
4030
- repo,
4031
- issue_number: issueNumber,
4032
- body: text
4033
- }), `createComment(${threadId})`, retries, shouldRetry);
4228
+ const response = await this.githubApi(async () => {
4229
+ this.pendingFinalDeliveryRequestsActive += 1;
4230
+ try {
4231
+ return await this.octokit.rest.issues.createComment({
4232
+ owner,
4233
+ repo,
4234
+ issue_number: issueNumber,
4235
+ body: text,
4236
+ ...signal ? { request: { signal } } : {}
4237
+ });
4238
+ } finally {
4239
+ this.pendingFinalDeliveryRequestsActive -= 1;
4240
+ if (this.pendingFinalDeliveryRequestsActive === 0 && this.pendingFinalDeliveryRetryStopRequested) {
4241
+ this.pendingFinalDeliveryRetryAbort?.abort();
4242
+ }
4243
+ }
4244
+ }, `createComment(${threadId})`, retries, shouldRetry, signal);
4034
4245
  return response.data;
4035
4246
  }
4036
4247
  /**
@@ -4389,9 +4600,8 @@ ${summary}`,
4389
4600
  }
4390
4601
  recordPublicationAudit(record) {
4391
4602
  try {
4392
- const encodedName = this.name.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 200);
4393
- const dir = join(getGlobalQwenDir(), "channels");
4394
- const path = join(dir, `${encodedName}-github-audit.jsonl`);
4603
+ const dir = join(getGlobalQwenDir(), "channels", getWorkspaceScopeDirName(this.config.cwd));
4604
+ const path = this.channelFilePath("github-audit.jsonl");
4395
4605
  mkdirSync(dir, { recursive: true, mode: 448 });
4396
4606
  chmodSync(dir, 448);
4397
4607
  appendFileSync(path, `${JSON.stringify(record)}
@@ -4405,6 +4615,35 @@ ${summary}`,
4405
4615
  `);
4406
4616
  }
4407
4617
  }
4618
+ migrateLegacyPublicationState() {
4619
+ try {
4620
+ const channelsRoot = join(getGlobalQwenDir(), "channels");
4621
+ const encodedName = this.name.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 200);
4622
+ const sentinel = this.channelFilePath("github-state-migrated");
4623
+ if (existsSync(sentinel))
4624
+ return;
4625
+ mkdirSync(dirname(sentinel), { recursive: true, mode: 448 });
4626
+ for (const suffix of [
4627
+ "github-pending-deliveries.json",
4628
+ "github-audit.jsonl"
4629
+ ]) {
4630
+ const legacyPath = join(channelsRoot, `${encodedName}-${suffix}`);
4631
+ const scopedPath = this.channelFilePath(suffix);
4632
+ if (!existsSync(scopedPath) && existsSync(legacyPath)) {
4633
+ renameSync(legacyPath, scopedPath);
4634
+ }
4635
+ }
4636
+ writeFileSync(sentinel, "", { mode: 384 });
4637
+ } catch (err) {
4638
+ process2.stderr.write(`[Channel:${this.name}] legacy GitHub state migration failed: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
4639
+ `);
4640
+ }
4641
+ }
4642
+ channelFilePath(suffix) {
4643
+ const encodedName = this.name.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 200);
4644
+ const nameHash = createHash("sha256").update(this.name).digest("hex").slice(0, 16);
4645
+ return join(getGlobalQwenDir(), "channels", getWorkspaceScopeDirName(this.config.cwd), `${encodedName}-${nameHash}-${suffix}`);
4646
+ }
4408
4647
  extractFromSubjectUrl(url) {
4409
4648
  const match = url.match(/\/repos\/([^/]+\/[^/]+)\/(issues|pulls)\/(\d+)/);
4410
4649
  if (!match)
@@ -4426,11 +4665,15 @@ ${GITHUB_PUBLICATION_INSTRUCTIONS}
4426
4665
  Trigger: ${ctx.reason}.
4427
4666
  ${buildTriggerGuidance(ctx.reason)}`;
4428
4667
  }
4429
- async githubApi(fn, label, retries = 3, shouldRetry = () => true) {
4668
+ async githubApi(fn, label, retries = 3, shouldRetry = () => true, signal) {
4430
4669
  for (let attempt = 1; attempt <= retries; attempt++) {
4670
+ if (signal?.aborted)
4671
+ throw new Error(`${label} aborted`);
4431
4672
  try {
4432
4673
  return await fn();
4433
4674
  } catch (err) {
4675
+ if (signal?.aborted)
4676
+ throw err;
4434
4677
  if (attempt === retries || !shouldRetry(err))
4435
4678
  throw err;
4436
4679
  const e = err;
@@ -4446,11 +4689,30 @@ ${buildTriggerGuidance(ctx.reason)}`;
4446
4689
  }
4447
4690
  process2.stderr.write(`[Channel:${this.name}] ${label} failed (attempt ${attempt}/${retries}, status=${e.status}), retrying in ${cooldown}ms: ${e.message}
4448
4691
  `);
4449
- await this.abortableSleep(cooldown);
4692
+ await this.sleepForRetry(cooldown, signal);
4450
4693
  }
4451
4694
  }
4452
4695
  throw new Error("unreachable");
4453
4696
  }
4697
+ sleepForRetry(ms, signal) {
4698
+ if (!signal)
4699
+ return this.abortableSleep(ms);
4700
+ return new Promise((resolve) => {
4701
+ if (signal.aborted) {
4702
+ resolve();
4703
+ return;
4704
+ }
4705
+ const timer = setTimeout(() => {
4706
+ signal.removeEventListener("abort", onAbort);
4707
+ resolve();
4708
+ }, ms);
4709
+ const onAbort = /* @__PURE__ */ __name(() => {
4710
+ clearTimeout(timer);
4711
+ resolve();
4712
+ }, "onAbort");
4713
+ signal.addEventListener("abort", onAbort, { once: true });
4714
+ });
4715
+ }
4454
4716
  async markNotificationsAsRead(lastReadAt) {
4455
4717
  await this.githubApi(() => this.octokit.rest.activity.markNotificationsAsRead({
4456
4718
  last_read_at: lastReadAt,
@@ -11,11 +11,11 @@ import {
11
11
  sendMessage,
12
12
  sendTyping,
13
13
  uploadToCdn
14
- } from "./chunk-ZPZ7ZJEE.js";
14
+ } from "./chunk-WUC6ZFXO.js";
15
15
  import {
16
16
  ChannelBase,
17
17
  isTerminalTaskLifecycleType
18
- } from "./chunk-JCJ7LKNA.js";
18
+ } from "./chunk-DIEFUBV6.js";
19
19
  import "./chunk-UDXSXLER.js";
20
20
  import "./chunk-H6XPXXMH.js";
21
21
  import {
@@ -12,7 +12,7 @@ import {
12
12
  isTerminalTaskLifecycleType,
13
13
  sanitizeLogText,
14
14
  sanitizeSenderName
15
- } from "./chunk-JCJ7LKNA.js";
15
+ } from "./chunk-DIEFUBV6.js";
16
16
  import "./chunk-UDXSXLER.js";
17
17
  import "./chunk-H6XPXXMH.js";
18
18
  import "./chunk-CR3C7WXL.js";
@@ -4,18 +4,18 @@ import {
4
4
  require_axios,
5
5
  require_ws
6
6
  } from "./chunk-I3G5JWBV.js";
7
+ import "./chunk-JE7KQ2UP.js";
8
+ import "./chunk-K6KS3LTN.js";
7
9
  import {
8
10
  require_lib
9
11
  } from "./chunk-FC4KQFCS.js";
10
- import "./chunk-JE7KQ2UP.js";
11
- import "./chunk-K6KS3LTN.js";
12
12
  import "./chunk-T3CHYWJZ.js";
13
13
  import {
14
14
  ChannelBase,
15
15
  ChannelProactiveDeliveryError,
16
16
  isChannelProactiveDeliveryError,
17
17
  isTerminalTaskLifecycleType
18
- } from "./chunk-JCJ7LKNA.js";
18
+ } from "./chunk-DIEFUBV6.js";
19
19
  import "./chunk-UDXSXLER.js";
20
20
  import "./chunk-H6XPXXMH.js";
21
21
  import {
@@ -10,7 +10,7 @@ import "./chunk-T3CHYWJZ.js";
10
10
  import {
11
11
  ChannelBase,
12
12
  sanitizeLogText
13
- } from "./chunk-JCJ7LKNA.js";
13
+ } from "./chunk-DIEFUBV6.js";
14
14
  import "./chunk-UDXSXLER.js";
15
15
  import "./chunk-H6XPXXMH.js";
16
16
  import "./chunk-CR3C7WXL.js";
@@ -6,7 +6,7 @@ import {
6
6
  import "./chunk-T3CHYWJZ.js";
7
7
  import {
8
8
  PollingChannelBase
9
- } from "./chunk-JCJ7LKNA.js";
9
+ } from "./chunk-DIEFUBV6.js";
10
10
  import "./chunk-UDXSXLER.js";
11
11
  import {
12
12
  external_exports
@@ -13197,6 +13197,7 @@ var GitlabChannel = class extends PollingChannelBase {
13197
13197
  apiHost = "https://gitlab.com";
13198
13198
  botUsername = "";
13199
13199
  descriptionCache = /* @__PURE__ */ new Map();
13200
+ reactions = /* @__PURE__ */ new Map();
13200
13201
  constructor(name, config, bridge, options) {
13201
13202
  super(name, config, bridge, options);
13202
13203
  }
@@ -13246,6 +13247,35 @@ var GitlabChannel = class extends PollingChannelBase {
13246
13247
  const targetType = threadId.startsWith("mr:") ? "mr" : "issue";
13247
13248
  await this.createNote(chatId, targetType, Number(match[1]), text);
13248
13249
  }
13250
+ onPromptStart(chatId, _sessionId, messageId) {
13251
+ if (!messageId)
13252
+ return;
13253
+ const entry = this.reactions.get(messageId);
13254
+ if (!entry || entry.award)
13255
+ return;
13256
+ const api = entry.target.isMr ? this.api.MergeRequestNoteAwardEmojis : this.api.IssueNoteAwardEmojis;
13257
+ entry.award = api.award(chatId, entry.target.iid, entry.noteId, "eyes").then((r) => ({ awardId: r.id }));
13258
+ void entry.award.catch((err) => {
13259
+ entry.award = void 0;
13260
+ process2.stderr.write(`[Channel:${this.name}] failed to acknowledge note ${entry.noteId}: ${err}
13261
+ `);
13262
+ });
13263
+ }
13264
+ onPromptEnd(chatId, _sessionId, messageId) {
13265
+ if (!messageId)
13266
+ return;
13267
+ const entry = this.reactions.get(messageId);
13268
+ if (!entry)
13269
+ return;
13270
+ this.reactions.delete(messageId);
13271
+ if (!entry.award)
13272
+ return;
13273
+ const api = entry.target.isMr ? this.api.MergeRequestNoteAwardEmojis : this.api.IssueNoteAwardEmojis;
13274
+ void entry.award.then(({ awardId }) => api.remove(chatId, entry.target.iid, entry.noteId, awardId)).catch((err) => {
13275
+ process2.stderr.write(`[Channel:${this.name}] failed to remove acknowledgement from note ${entry.noteId}: ${err}
13276
+ `);
13277
+ });
13278
+ }
13249
13279
  async pollOnce() {
13250
13280
  const templates = this.config.action_prompt_template;
13251
13281
  if (!templates || Object.keys(templates).length === 0)
@@ -13275,25 +13305,33 @@ var GitlabChannel = class extends PollingChannelBase {
13275
13305
  }
13276
13306
  }
13277
13307
  for (const todo of todos) {
13278
- if (!todo.project || !todo.target || !todo.target.iid || todo.target_type !== "Issue" && todo.target_type !== "MergeRequest") {
13308
+ if (!todo.project || todo.target_type !== "Issue" && todo.target_type !== "MergeRequest") {
13279
13309
  await this.skipTodo(todo);
13280
13310
  continue;
13281
13311
  }
13312
+ const raw = todo.target || {};
13313
+ if (!raw.iid) {
13314
+ await this.skipTodo(todo);
13315
+ continue;
13316
+ }
13317
+ const target = {
13318
+ iid: raw.iid,
13319
+ title: raw.title ?? "",
13320
+ isMr: todo.target_type === "MergeRequest"
13321
+ };
13282
13322
  const template = this.resolveTemplate(templates, todo.action_name);
13283
13323
  if (!template) {
13284
13324
  await this.skipTodo(todo);
13285
13325
  continue;
13286
13326
  }
13287
13327
  const chatId = todo.project.path_with_namespace;
13288
- const targetType = todo.target_type === "MergeRequest" ? "mr" : "issue";
13289
- const threadId = `${targetType}:${todo.target.iid}`;
13290
13328
  try {
13291
- await this.processTodo(todo, template, chatId, targetType, threadId);
13329
+ await this.processTodo(todo, target, template, chatId);
13292
13330
  } catch (err) {
13293
13331
  process2.stderr.write(`[Channel:${this.name}] error processing todo ${todo.id}: ${err}
13294
13332
  `);
13295
13333
  try {
13296
- await this.createNote(chatId, targetType, todo.target.iid, "\u26A0\uFE0F Failed to process this request. Please re-mention the bot to retry.");
13334
+ await this.createNote(chatId, target.isMr ? "mr" : "issue", target.iid, "\u26A0\uFE0F Failed to process this request. Please re-mention the bot to retry.");
13297
13335
  } catch {
13298
13336
  }
13299
13337
  }
@@ -13318,29 +13356,43 @@ var GitlabChannel = class extends PollingChannelBase {
13318
13356
  return templates["mentioned"];
13319
13357
  return void 0;
13320
13358
  }
13321
- async processTodo(todo, template, chatId, targetType, threadId) {
13359
+ async processTodo(todo, target, template, chatId) {
13322
13360
  if (todo.author.username === this.botUsername)
13323
13361
  return;
13324
- const isNoteMention = /#note_\d+$/.test(todo.target_url);
13362
+ const targetType = target.isMr ? "mr" : "issue";
13363
+ const threadId = `${targetType}:${target.iid}`;
13364
+ const noteMatch = todo.target_url.match(/#note_(\d+)$/);
13365
+ const isNoteMention = noteMatch !== null;
13366
+ const messageId = String(todo.id);
13325
13367
  const needsDescription = !isNoteMention || template.includes("%description%");
13326
13368
  let description = "";
13327
13369
  if (needsDescription) {
13328
13370
  if (isNoteMention) {
13329
13371
  try {
13330
- description = await this.fetchDescription(chatId, targetType, todo.target.iid);
13372
+ description = await this.fetchDescription(chatId, targetType, target.iid);
13331
13373
  } catch (err) {
13332
13374
  process2.stderr.write(`[Channel:${this.name}] fetchDescription failed (metadata only): ${err}
13333
13375
  `);
13334
13376
  }
13335
13377
  } else {
13336
- description = await this.fetchDescription(chatId, targetType, todo.target.iid);
13378
+ description = await this.fetchDescription(chatId, targetType, target.iid);
13337
13379
  }
13338
13380
  }
13339
13381
  const text = isNoteMention ? todo.body || "" : description || todo.body || "";
13340
13382
  if (!text)
13341
13383
  return;
13342
- const envelope = this.buildEnvelope(text, todo.author.username, chatId, threadId, String(todo.id), this.buildMetadata(template, todo, chatId, todo.author.username, String(todo.id), description), true);
13343
- await this.handleInbound(envelope);
13384
+ const envelope = this.buildEnvelope(text, todo.author.username, chatId, threadId, messageId, this.buildMetadata(template, todo, target, chatId, todo.author.username, String(todo.id), description), true);
13385
+ if (isNoteMention) {
13386
+ this.reactions.set(messageId, {
13387
+ target,
13388
+ noteId: Number(noteMatch[1])
13389
+ });
13390
+ }
13391
+ try {
13392
+ await this.handleInbound(envelope);
13393
+ } finally {
13394
+ this.reactions.delete(messageId);
13395
+ }
13344
13396
  }
13345
13397
  async fetchDescription(chatId, targetType, iid) {
13346
13398
  const cacheKey = `${chatId}/${targetType}/${iid}`;
@@ -13374,14 +13426,14 @@ var GitlabChannel = class extends PollingChannelBase {
13374
13426
  metadata
13375
13427
  };
13376
13428
  }
13377
- buildMetadata(template, todo, chatId, author, commentId, description) {
13429
+ buildMetadata(template, todo, target, chatId, author, commentId, description) {
13378
13430
  const vars = {
13379
13431
  project: chatId,
13380
13432
  project_url: `${this.apiHost}/${chatId}`,
13381
13433
  author,
13382
13434
  target_type: todo.target_type,
13383
- iid: String(todo.target.iid),
13384
- title: todo.target.title,
13435
+ iid: String(target.iid),
13436
+ title: target.title,
13385
13437
  description,
13386
13438
  todo_id: commentId
13387
13439
  };