@qwen-code/qwen-code 0.21.14 → 0.21.15

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 (318) hide show
  1. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
  2. package/bundled/qc-helper/docs/features/code-review.md +20 -2
  3. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  4. package/bundled/review/SKILL.md +66 -36
  5. package/chunks/{MaxSizedBox-67IDQILY.js → MaxSizedBox-E7CUU3UN.js} +43 -43
  6. package/chunks/{StandaloneSessionPicker-G4QJIRMH.js → StandaloneSessionPicker-XYUB75AQ.js} +63 -63
  7. package/chunks/{acp-startup-profiler-HUYGO57H.js → acp-startup-profiler-DDVSJKJK.js} +2 -2
  8. package/chunks/{acpAgent-BS3YYO33.js → acpAgent-5QZS4VMN.js} +507 -176
  9. package/chunks/{agent-EHHEXKWN.js → agent-242BTA6Q.js} +40 -40
  10. package/chunks/{agent-headless-UT2ZF76T.js → agent-headless-4BF7W4TJ.js} +40 -40
  11. package/chunks/{anthropicContentGenerator-M7XRJMSK.js → anthropicContentGenerator-CU3G53RX.js} +7 -7
  12. package/chunks/{artifact-tool-GEXTOPVO.js → artifact-tool-LIUSI4XK.js} +3 -3
  13. package/chunks/{askUserQuestion-B33XRSB7.js → askUserQuestion-454X3UIV.js} +3 -3
  14. package/chunks/{bridge-WQ4IL2RF.js → bridge-MG4F5NOH.js} +46 -45
  15. package/chunks/{channel-management-service-X6LCQUAD.js → channel-management-service-KHPAWCX7.js} +1 -1
  16. package/chunks/{channel-settings-store-ZDFXY7VY.js → channel-settings-store-GQUCL2YM.js} +47 -47
  17. package/chunks/{channel-worker-group-TJ35JDPE.js → channel-worker-group-IN2UPYHP.js} +6 -5
  18. package/chunks/{channel-worker-manager-G5LKWGOG.js → channel-worker-manager-4CQPHVD4.js} +6 -5
  19. package/chunks/{channel-worker-supervisor-OEVWBHGT.js → channel-worker-supervisor-CPPSL7ZH.js} +4 -3
  20. package/chunks/{chunk-3EZLLVDF.js → chunk-263JC66E.js} +3 -3
  21. package/chunks/{chunk-OO4FKHLO.js → chunk-2GM44E7D.js} +10 -298
  22. package/chunks/{chunk-LSO6EL4Y.js → chunk-2MDUS4XE.js} +2 -2
  23. package/chunks/{chunk-WGHHA7ZH.js → chunk-3C55EUJX.js} +1 -1
  24. package/chunks/{chunk-47L5MLB5.js → chunk-3EAGKRLN.js} +5 -5
  25. package/chunks/{chunk-WPVUOVYX.js → chunk-3EQHT3IC.js} +2 -2
  26. package/chunks/{chunk-OEZCXK7Y.js → chunk-3JZ2AZC6.js} +4 -4
  27. package/chunks/{chunk-PCETXVVV.js → chunk-3X6KVX37.js} +1 -1
  28. package/chunks/{chunk-J63PKMYA.js → chunk-435GZDTF.js} +2 -2
  29. package/chunks/{chunk-I3N2Z25H.js → chunk-47VTGCYK.js} +3 -3
  30. package/chunks/{chunk-3PWNVF6N.js → chunk-4APB4SP2.js} +1 -1
  31. package/chunks/{chunk-MA2HEDVP.js → chunk-4CKU5K2R.js} +1 -1
  32. package/chunks/{chunk-OJB5FYVK.js → chunk-4IOBHNV2.js} +1 -1
  33. package/chunks/{chunk-MIPFDQAF.js → chunk-4W4BROUS.js} +1 -1
  34. package/chunks/{chunk-ZIGC3MUS.js → chunk-55P2ESI6.js} +1 -1
  35. package/chunks/{chunk-CHHABXPE.js → chunk-5AAW6E3C.js} +1 -1
  36. package/chunks/{chunk-J6YS7Z25.js → chunk-5I2U4PDY.js} +12 -12
  37. package/chunks/{chunk-NWNEANAT.js → chunk-5M7YKTYX.js} +6 -6
  38. package/chunks/{chunk-RXHBTKMG.js → chunk-5MA4E4EG.js} +3 -3
  39. package/chunks/{chunk-CEXU72GE.js → chunk-5NAJDTVP.js} +3 -3
  40. package/chunks/{chunk-U657UZJN.js → chunk-5WEMSDPR.js} +5 -5
  41. package/chunks/{chunk-73JUK3ZW.js → chunk-63AIQ2IZ.js} +96 -15
  42. package/chunks/{chunk-E5WQMF3K.js → chunk-67L6PVD6.js} +2 -2
  43. package/chunks/{chunk-CZK622ZK.js → chunk-6IFWBM24.js} +3 -3
  44. package/chunks/{chunk-CPHEPGAO.js → chunk-722JBVVW.js} +1 -1
  45. package/chunks/chunk-7NLDU6J2.js +367 -0
  46. package/chunks/{chunk-AKBOLMUF.js → chunk-7S22SX2L.js} +2 -2
  47. package/chunks/{chunk-SCZU65AI.js → chunk-7VRNXKKK.js} +8 -8
  48. package/chunks/{chunk-XUJNK7Y6.js → chunk-7WVB4FMG.js} +1 -1
  49. package/chunks/{chunk-55VKMB7X.js → chunk-A7MIUCUQ.js} +6 -6
  50. package/chunks/{chunk-NVRMCWTP.js → chunk-A7NBZBGQ.js} +3 -3
  51. package/chunks/{chunk-N6RSOOWJ.js → chunk-AAG7I5CR.js} +7 -7
  52. package/chunks/{chunk-EOPBFLA5.js → chunk-AKN26LMT.js} +3 -3
  53. package/chunks/{chunk-UC67T4SF.js → chunk-AQFWV4YF.js} +2 -1
  54. package/chunks/{chunk-DVR7XKO5.js → chunk-B5LEKTE7.js} +2 -2
  55. package/chunks/{chunk-V6WEMZPD.js → chunk-B72KNVKO.js} +3 -3
  56. package/chunks/{chunk-544KT7X4.js → chunk-BBMVUTXO.js} +1 -1
  57. package/chunks/{chunk-DHUPMYMC.js → chunk-BORX4PBQ.js} +12 -12
  58. package/chunks/{chunk-5IJSFWQO.js → chunk-BUZESYJT.js} +4 -4
  59. package/chunks/{chunk-Y4RVDOXV.js → chunk-DF7KFKCL.js} +4 -4
  60. package/chunks/{chunk-K2Y45XXS.js → chunk-DFOKBPH5.js} +108 -26
  61. package/chunks/{chunk-3SL2P3WX.js → chunk-DIHJXVT4.js} +1 -1
  62. package/chunks/{chunk-WAO53ZQF.js → chunk-DITDNF3D.js} +22 -2
  63. package/chunks/{chunk-2A6VQJYK.js → chunk-DK4HL3IB.js} +7 -7
  64. package/chunks/{chunk-6BJSYAML.js → chunk-DPXZUGDQ.js} +46 -21
  65. package/chunks/{chunk-MVHJZ3FZ.js → chunk-DZNQHKZZ.js} +2 -2
  66. package/chunks/{chunk-SNQZZ765.js → chunk-EB27VF5Z.js} +2 -2
  67. package/chunks/{chunk-KC4WMLZO.js → chunk-EXY6APEA.js} +81 -50
  68. package/chunks/{chunk-7VNHO4MN.js → chunk-F3FRTY4Q.js} +16 -7
  69. package/chunks/{chunk-FS5NGKWC.js → chunk-F5JZDC4O.js} +3 -3
  70. package/chunks/{chunk-6QFDQMQX.js → chunk-F7ZK5VMA.js} +1 -1
  71. package/chunks/{chunk-2B2BF7P7.js → chunk-FAIJ5UIU.js} +3 -3
  72. package/chunks/{chunk-G6KI5UOJ.js → chunk-FQ6G527Y.js} +3 -3
  73. package/chunks/{chunk-WSSH2BNO.js → chunk-FQZBD3PY.js} +1 -1
  74. package/chunks/{chunk-OVY67CYC.js → chunk-G32ESUUC.js} +1 -1
  75. package/chunks/{chunk-OBJYN4MX.js → chunk-G64PEZZ5.js} +2 -2
  76. package/chunks/{chunk-QRVHGEVY.js → chunk-GCWILQKA.js} +3 -3
  77. package/chunks/{chunk-QUGAUQGJ.js → chunk-GX2THELY.js} +1 -0
  78. package/chunks/{chunk-L3T4V5GZ.js → chunk-GYVB4P5B.js} +721 -331
  79. package/chunks/{chunk-FAAUPSY2.js → chunk-HEMFCAHG.js} +1 -1
  80. package/chunks/{chunk-AZQ3DT76.js → chunk-HGGMEDDY.js} +2 -2
  81. package/chunks/{chunk-SG7ZP5PG.js → chunk-HHNSO2Y4.js} +4 -4
  82. package/chunks/{chunk-YHXQK4SR.js → chunk-HSCPOEBL.js} +3 -3
  83. package/chunks/{chunk-H3SHU2XU.js → chunk-I3AB5DOZ.js} +3 -3
  84. package/chunks/{chunk-SFJMFZT5.js → chunk-IBUXQJHH.js} +1 -1
  85. package/chunks/{chunk-FN6M5WUL.js → chunk-IFOR6I5C.js} +4 -4
  86. package/chunks/{chunk-PHN4R2ZV.js → chunk-IU2XWUSI.js} +1 -1
  87. package/chunks/{chunk-OJOP26ET.js → chunk-J2LZ5OCH.js} +3 -3
  88. package/chunks/{chunk-4ZMS3JCR.js → chunk-JBSW7JA6.js} +83 -4
  89. package/chunks/{chunk-QAVTWAHL.js → chunk-JIR6JDGE.js} +3 -3
  90. package/chunks/{chunk-UGK4K2N2.js → chunk-JS73NNWF.js} +8 -0
  91. package/chunks/{chunk-2M55OBEB.js → chunk-JV443R5X.js} +1 -1
  92. package/chunks/{chunk-QEHH23OM.js → chunk-K6GQS2WN.js} +1 -1
  93. package/chunks/{chunk-6LAPGPVA.js → chunk-KCUGOZPL.js} +2 -2
  94. package/chunks/{chunk-KV27IEHM.js → chunk-L5JHSPET.js} +1 -1
  95. package/chunks/{chunk-OFTPCOGR.js → chunk-L7RG5PVT.js} +2902 -1393
  96. package/chunks/{chunk-TSMPNGBC.js → chunk-LBQBFRFN.js} +2 -2
  97. package/chunks/chunk-LJZSMWOH.js +18 -0
  98. package/chunks/{chunk-IA2K2HJE.js → chunk-M53UJS6H.js} +2 -2
  99. package/chunks/{chunk-KBXKR5R2.js → chunk-M5AIO24H.js} +1 -1
  100. package/chunks/{chunk-ROIYNTHJ.js → chunk-MD7XDTW7.js} +3 -3
  101. package/chunks/{chunk-3PWCMXIR.js → chunk-MGEWDLRO.js} +1 -1
  102. package/chunks/{chunk-4ZS3BLER.js → chunk-NAGJPIPW.js} +22 -7
  103. package/chunks/{chunk-3YRVPHT3.js → chunk-NCTHX2Z3.js} +14 -14
  104. package/chunks/{chunk-YP5KH5Y7.js → chunk-ND7NOI4P.js} +1 -1
  105. package/chunks/{chunk-4W5U2TUT.js → chunk-NGY7B7VF.js} +1 -1
  106. package/chunks/{chunk-S7N3HUIB.js → chunk-NMSSH43P.js} +6 -6
  107. package/chunks/{chunk-UYDGFWIJ.js → chunk-NYN4RD3K.js} +66 -7
  108. package/chunks/{chunk-DGJ7O55J.js → chunk-O327G3QW.js} +3 -3
  109. package/chunks/{chunk-2C6HJMG3.js → chunk-O75QDGQF.js} +3 -3
  110. package/chunks/{chunk-SFTKAX4O.js → chunk-OFJ6OFIT.js} +1 -1
  111. package/chunks/{chunk-6HY6IF3Z.js → chunk-OUYRA764.js} +1 -1
  112. package/chunks/{chunk-OEYAK5O6.js → chunk-OVS33JJM.js} +5 -5
  113. package/chunks/{chunk-VFP5YOHJ.js → chunk-PRIX4D6T.js} +6 -6
  114. package/chunks/{chunk-H4A72DE5.js → chunk-PTMVPFCZ.js} +1 -1
  115. package/chunks/{chunk-W7EYJGN7.js → chunk-PWQPWISR.js} +8 -8
  116. package/chunks/{chunk-QFJ5JHQR.js → chunk-PXOIRYE5.js} +1 -1
  117. package/chunks/{chunk-4SR45OM4.js → chunk-Q5QDZXKL.js} +1 -1
  118. package/chunks/{chunk-YECDICIO.js → chunk-Q6ETBOWF.js} +1 -1
  119. package/chunks/{chunk-WP4WIUOJ.js → chunk-QQUVPMMZ.js} +2 -2
  120. package/chunks/{chunk-C3T6M24E.js → chunk-RLYXWNS3.js} +3 -3
  121. package/chunks/{chunk-XT4RKHVE.js → chunk-RZ4PE3ER.js} +512 -24
  122. package/chunks/{chunk-6RDZLBSJ.js → chunk-SGKUVDBX.js} +80 -44
  123. package/chunks/{chunk-YZHRN3CF.js → chunk-SWOKDPS5.js} +2 -2
  124. package/chunks/{chunk-SLILKYV2.js → chunk-T2LUUKRI.js} +3 -3
  125. package/chunks/{chunk-5CVO7YES.js → chunk-U4GL4WDY.js} +1 -1
  126. package/chunks/{chunk-QEJZUXSK.js → chunk-U53XZHAE.js} +1 -1
  127. package/chunks/{chunk-XYRBK56E.js → chunk-U7U3CX4K.js} +3353 -1306
  128. package/chunks/{chunk-HIBNSEJE.js → chunk-UDG5EZJI.js} +0 -2
  129. package/chunks/{chunk-BQWNIPTE.js → chunk-V4UBYT3Y.js} +1 -1
  130. package/chunks/{chunk-XITLNXLX.js → chunk-VWS7DWY6.js} +3 -3
  131. package/chunks/{chunk-PT4I7NBA.js → chunk-VX7TFATF.js} +1 -1
  132. package/chunks/{chunk-VTOLYFWM.js → chunk-W3M6P3UR.js} +2 -2
  133. package/chunks/{chunk-CH5OFRV7.js → chunk-W4MLKRZD.js} +3 -3
  134. package/chunks/chunk-W5YD3QRT.js +367 -0
  135. package/chunks/{chunk-5IYS4WWR.js → chunk-WAPL2PHU.js} +1 -1
  136. package/chunks/{chunk-NRPXRNN4.js → chunk-WXFFCRKG.js} +1 -1
  137. package/chunks/{chunk-E3DYKPYZ.js → chunk-X7EQHW5L.js} +3 -3
  138. package/chunks/{chunk-BUQDLC2G.js → chunk-XFRYCCVC.js} +3 -3
  139. package/chunks/{chunk-DRAONPUW.js → chunk-XZ3J6E5Z.js} +2 -2
  140. package/chunks/{chunk-P3AA6S7O.js → chunk-Y7JGWFTK.js} +1 -1
  141. package/chunks/{chunk-SXCOEJO4.js → chunk-YLFFVY3G.js} +1 -1
  142. package/chunks/{chunk-YZOSNW4R.js → chunk-YO7PNVBJ.js} +1 -1
  143. package/chunks/{chunk-MDIGJH5X.js → chunk-ZL3HKVEQ.js} +4 -4
  144. package/chunks/{chunk-Y7QY6DKW.js → chunk-ZTLSYXFY.js} +4 -4
  145. package/chunks/{chunk-RWDNJBWN.js → chunk-ZUISK67X.js} +2 -2
  146. package/chunks/{chunk-PJSD2FOR.js → chunk-ZVJ5R5LM.js} +33 -33
  147. package/chunks/{chunk-XLLKYULU.js → chunk-ZWWU6KNS.js} +2 -2
  148. package/chunks/{computer-use-YORZJQE5.js → computer-use-34X5XJMV.js} +40 -40
  149. package/chunks/{config-utils-NJQA5YLJ.js → config-utils-XJTGZVY3.js} +2 -2
  150. package/chunks/{contextCommand-PACHGIF4.js → contextCommand-Q54VMGPA.js} +42 -42
  151. package/chunks/{core-runtime-6HD5DSPX.js → core-runtime-TIWTFHOR.js} +45 -44
  152. package/chunks/{create-sub-session-IQFIPUQA.js → create-sub-session-DPEBT657.js} +40 -40
  153. package/chunks/{create-sub-session-KRQULJE6.js → create-sub-session-TCKWBXEM.js} +6 -4
  154. package/chunks/{cron-create-NFRZEOQX.js → cron-create-PUCRMWQ6.js} +5 -5
  155. package/chunks/{cron-delete-GFVSVO7C.js → cron-delete-EOQR5CXU.js} +5 -5
  156. package/chunks/{cron-list-NRW34CLU.js → cron-list-7O22SQBF.js} +5 -5
  157. package/chunks/{daemon-XH76IXOC.js → daemon-JE2UIWSY.js} +304 -160
  158. package/chunks/{daemon-git-worktree-guard-6P27GKSU.js → daemon-git-worktree-guard-XSZ3362V.js} +40 -40
  159. package/chunks/daemon-status-provider-JBEST4SF.js +104 -0
  160. package/chunks/{daemon-trust-policy-5QJHAS3N.js → daemon-trust-policy-S6LBG4WN.js} +46 -46
  161. package/chunks/{daemon-trust-policy-monitor-JA2WZRZ3.js → daemon-trust-policy-monitor-NFO3OIBN.js} +46 -46
  162. package/chunks/{deferred-core-runtime-R2VWOVG3.js → deferred-core-runtime-Z2TLD2L7.js} +40 -40
  163. package/chunks/{display-image-ON3EYFRD.js → display-image-6FCICTXS.js} +5 -5
  164. package/chunks/{dist-IYYN3RUT.js → dist-IELOWDOT.js} +81 -17
  165. package/chunks/{earlyInputCapture-PQEEOFKJ.js → earlyInputCapture-KCZDAQWY.js} +41 -41
  166. package/chunks/{edit-RASZHTU2.js → edit-3UADXGNC.js} +41 -41
  167. package/chunks/{enter-worktree-CH5OMHJE.js → enter-worktree-J66YDAJE.js} +40 -40
  168. package/chunks/{enterPlanMode-AQKR3CAH.js → enterPlanMode-YUZUKY5F.js} +40 -40
  169. package/chunks/{environment-7QRYIEBA.js → environment-6IEK2353.js} +42 -42
  170. package/chunks/{errors-P2LL5452.js → errors-RVLRX7XI.js} +42 -42
  171. package/chunks/{exit-worktree-WUDL26CY.js → exit-worktree-SNMPATZE.js} +40 -40
  172. package/chunks/{exitPlanMode-JM75SAUI.js → exitPlanMode-DP4TURUC.js} +40 -40
  173. package/chunks/{fast-path-KVNSOHVA.js → fast-path-5CC6RKES.js} +2 -2
  174. package/chunks/{gemini-ADMD2EOS.js → gemini-F64ZP4SG.js} +83 -82
  175. package/chunks/{geminiContentGenerator-CS3M7SOS.js → geminiContentGenerator-KAFSMFA6.js} +7 -7
  176. package/chunks/{getMachineId-bsd-FG7IUY6U.js → getMachineId-bsd-LSY4WMOF.js} +1 -1
  177. package/chunks/{getMachineId-darwin-GLCJI2RA.js → getMachineId-darwin-JOFR4UIT.js} +1 -1
  178. package/chunks/{getMachineId-linux-O6OPPAKO.js → getMachineId-linux-QEDBS6GI.js} +1 -1
  179. package/chunks/{getMachineId-unsupported-S6CKYVGC.js → getMachineId-unsupported-IPZ3YRKP.js} +1 -1
  180. package/chunks/{getMachineId-win-X5SRNEH7.js → getMachineId-win-TJ2OZ7AA.js} +1 -1
  181. package/chunks/{glob-WIJOGYVV.js → glob-OE27ZGK4.js} +40 -40
  182. package/chunks/{goal-tools-K5OHOJ6B.js → goal-tools-YIADM4RZ.js} +5 -5
  183. package/chunks/{grep-CIFRQBR7.js → grep-VBV6BWSP.js} +40 -40
  184. package/chunks/{handleAutoUpdate-KJ4SN7DM.js → handleAutoUpdate-YDMS57ZN.js} +46 -44
  185. package/chunks/{i18n-36SZUO4C.js → i18n-JIW77MSO.js} +41 -41
  186. package/chunks/{image-gen-R4B5VUYB.js → image-gen-L4A2ISEH.js} +11 -11
  187. package/chunks/{initializer-CW5YCAOL.js → initializer-F7I7QDHK.js} +47 -47
  188. package/chunks/{installationInfo-NMQIOUGY.js → installationInfo-KOUBU7MH.js} +43 -41
  189. package/chunks/{keychain-token-storage-3XFJ5ZB2.js → keychain-token-storage-7SL4ZWQQ.js} +3 -3
  190. package/chunks/{list-HHGT3S4P.js → list-AJ5BRB7C.js} +49 -49
  191. package/chunks/{list-agents-OSVDFI6S.js → list-agents-XO4EONWC.js} +6 -6
  192. package/chunks/{loadedSettingsAdapter-SJ2MJF35.js → loadedSettingsAdapter-X7FC5332.js} +46 -46
  193. package/chunks/{loggingContentGenerator-GR2QQ2C5.js → loggingContentGenerator-5G4ZR5D5.js} +22 -22
  194. package/chunks/{loop-wakeup-HWVUU5CF.js → loop-wakeup-HWSTFUTQ.js} +6 -6
  195. package/chunks/{ls-D3HUFHDP.js → ls-52HUW4B6.js} +5 -5
  196. package/chunks/{lsp-3QDDJTCS.js → lsp-VJESYEC6.js} +3 -3
  197. package/chunks/{managed-npm-update-ADQJHKTO.js → managed-npm-update-ZR2T2ST3.js} +41 -41
  198. package/chunks/{mcp-QW3OTL5W.js → mcp-TZNHG7CF.js} +46 -46
  199. package/chunks/{monitor-RJKPVERH.js → monitor-TN6Z4SXF.js} +40 -40
  200. package/chunks/{nonInteractiveCli-MROMHSTL.js → nonInteractiveCli-I7K6KH5U.js} +81 -80
  201. package/chunks/{notebook-edit-2ENWDBZO.js → notebook-edit-77V2IP3Y.js} +40 -40
  202. package/chunks/{openaiContentGenerator-Z3GPWJU4.js → openaiContentGenerator-2S2UT4RR.js} +25 -26
  203. package/chunks/{pidfile-5G42YSTP.js → pidfile-WDSDXBY3.js} +41 -41
  204. package/chunks/{processUtils-ZDMXYKQY.js → processUtils-JOJNZOW4.js} +2 -2
  205. package/chunks/prompt-terminal-ledger-RW62JIPP.js +93 -0
  206. package/chunks/{qwenContentGenerator-NLEMBZVU.js → qwenContentGenerator-G3H2TCXF.js} +45 -45
  207. package/chunks/{qwenOAuth2-EBV52DWJ.js → qwenOAuth2-UI2OC2RN.js} +10 -10
  208. package/chunks/{read-file-5BYIF53O.js → read-file-DI64TNOE.js} +13 -14
  209. package/chunks/{read-mcp-resource-XD54ZQMC.js → read-mcp-resource-6VFF47Z3.js} +3 -3
  210. package/chunks/{record-artifact-GLU3UWBV.js → record-artifact-TJTN2GBV.js} +5 -5
  211. package/chunks/{resumeHistoryUtils-AFTBRS3G.js → resumeHistoryUtils-3FIDQ6YQ.js} +46 -46
  212. package/chunks/{ripGrep-NN7AOLQY.js → ripGrep-EUTGRCN3.js} +40 -40
  213. package/chunks/{run-qwen-serve-UR3DYDAF.js → run-qwen-serve-SQBF7QZM.js} +505 -161
  214. package/chunks/{runtime-PR5RKGNH.js → runtime-7QGB6SY4.js} +49 -49
  215. package/chunks/{scheduler-GPMLVKJM.js → scheduler-V6AZCQVU.js} +42 -42
  216. package/chunks/{sdk-exporters-grpc-54L4LS5L.js → sdk-exporters-grpc-P3LA24AV.js} +3 -3
  217. package/chunks/{sdk-exporters-http-NC746HLT.js → sdk-exporters-http-K3LH2SD7.js} +9 -11
  218. package/chunks/{sdk-impl-YVL7BP6Y.js → sdk-impl-WCUNMLVX.js} +11 -6
  219. package/chunks/{send-message-TNBG5EVA.js → send-message-NUK5DTTI.js} +7 -7
  220. package/chunks/{serve-E7V2JVA2.js → serve-WVNAO2NA.js} +46 -46
  221. package/chunks/{server-YXB3DBN7.js → server-ZMZPHJEC.js} +992 -271
  222. package/chunks/{session-DZEAUT7S.js → session-JV74G6EZ.js} +82 -81
  223. package/chunks/{settings-ESZ3NWAP.js → settings-GBBVKBQ2.js} +45 -45
  224. package/chunks/{shell-JMSK5WIL.js → shell-JNNRUZPA.js} +40 -40
  225. package/chunks/{skill-5K5CSUJV.js → skill-JRGRCWD5.js} +18 -18
  226. package/chunks/{skill-settings-V64NIOTI.js → skill-settings-VEC7C44Z.js} +45 -45
  227. package/chunks/{spawnChannel-S63APBZZ.js → spawnChannel-TVKIFXXA.js} +42 -42
  228. package/chunks/{standalone-update-P42HDFXX.js → standalone-update-OSHF2CX3.js} +42 -42
  229. package/chunks/{startInteractiveUI-LFBLFHJ4.js → startInteractiveUI-2HTUHVQO.js} +310 -156
  230. package/chunks/{syntheticOutput-7GWFIDXT.js → syntheticOutput-GZV6O6UL.js} +4 -4
  231. package/chunks/{task-create-EILHJJB7.js → task-create-BXGKNND4.js} +11 -11
  232. package/chunks/{task-list-WGJR6YL5.js → task-list-4ZMIDYGD.js} +6 -6
  233. package/chunks/{task-stop-X37KYTKB.js → task-stop-WBO7LWTS.js} +3 -3
  234. package/chunks/{task-update-XZAHVXJ5.js → task-update-UFO3BI7O.js} +11 -11
  235. package/chunks/{team-create-EDNOUM2U.js → team-create-DTPGJ6RH.js} +40 -40
  236. package/chunks/{team-delete-UEP4QOOT.js → team-delete-OCFJS444.js} +6 -6
  237. package/chunks/{team-plan-approval-QRSNK2DX.js → team-plan-approval-4433RWHB.js} +40 -40
  238. package/chunks/{terminal-image-renderer-6J2NPL32.js → terminal-image-renderer-QZLIKIVA.js} +42 -42
  239. package/chunks/{theme-manager-WJMLRBXS.js → theme-manager-RM7C7Q3L.js} +41 -41
  240. package/chunks/{todoWrite-ATS62CAP.js → todoWrite-BGM5MCPY.js} +5 -5
  241. package/chunks/{tool-search-MZ6WU7DM.js → tool-search-4NQJASFC.js} +17 -18
  242. package/chunks/{total-session-admission-DQVW2LIP.js → total-session-admission-NZNCU5NU.js} +46 -45
  243. package/chunks/{trustedFolders-QMH25GOX.js → trustedFolders-FDJ2Q4ZK.js} +41 -41
  244. package/chunks/{update-relaunch-EG75LLW5.js → update-relaunch-HZMDPRTF.js} +5 -5
  245. package/chunks/{updateCheck-MTZIVGT5.js → updateCheck-ZB2CRVVG.js} +43 -43
  246. package/chunks/{useAutoAcceptIndicator-IGCW5EPO.js → useAutoAcceptIndicator-O3JI4KTR.js} +48 -48
  247. package/chunks/{validateNonInterActiveAuth-D5FPAB2C.js → validateNonInterActiveAuth-7Z4KG4N5.js} +78 -77
  248. package/chunks/{version-UOLDLLRB.js → version-RFVS6QDY.js} +1 -1
  249. package/chunks/{web-fetch-QKKW6CWH.js → web-fetch-RAN377BH.js} +17 -18
  250. package/chunks/{web-search-JYRBZMCW.js → web-search-XKS6ZPY7.js} +10 -10
  251. package/chunks/{workflow-SR7SEAU7.js → workflow-HF6G5XNX.js} +232 -73
  252. package/chunks/{workspace-providers-status-OXGV4EFF.js → workspace-providers-status-LNMP7NED.js} +49 -49
  253. package/chunks/{workspace-registration-store-V5EGKLBH.js → workspace-registration-store-QZ3P3ILN.js} +1 -1
  254. package/chunks/{workspace-registry-KJVIYTF5.js → workspace-registry-KWPGC2LG.js} +46 -45
  255. package/chunks/{workspace-service-6RLSGUB5.js → workspace-service-RWB4KMY3.js} +51 -51
  256. package/chunks/{workspace-skills-status-BHFEPDGH.js → workspace-skills-status-P3XXZY7C.js} +47 -47
  257. package/chunks/{workspace-trust-reconciler-DB5ERSUN.js → workspace-trust-reconciler-XU6WB2MF.js} +52 -51
  258. package/chunks/{write-file-IUP4GTZ4.js → write-file-V7Y6KUPR.js} +40 -40
  259. package/chunks/{zoom-image-SRBDTIVA.js → zoom-image-N4RSASH7.js} +13 -14
  260. package/cli.js +13 -13
  261. package/package.json +3 -3
  262. package/web-shell/assets/{arc-DItbX0DI.js → arc-CN-xeqBM.js} +1 -1
  263. package/web-shell/assets/{architectureDiagram-3BPJPVTR-CmnIlH8y.js → architectureDiagram-3BPJPVTR-XQJ6hBnv.js} +1 -1
  264. package/web-shell/assets/{blockDiagram-GPEHLZMM-pObnB9kw.js → blockDiagram-GPEHLZMM-n35AKogw.js} +1 -1
  265. package/web-shell/assets/{c4Diagram-AAUBKEIU-BNBmMS0Y.js → c4Diagram-AAUBKEIU-DXeDVokb.js} +1 -1
  266. package/web-shell/assets/channel-BdTBh3qf.js +1 -0
  267. package/web-shell/assets/{chunk-2J33WTMH-Dz4JBOO6.js → chunk-2J33WTMH-BYcmYjz_.js} +1 -1
  268. package/web-shell/assets/{chunk-4BX2VUAB-Cz2GnvAR.js → chunk-4BX2VUAB-w3UyeGtt.js} +1 -1
  269. package/web-shell/assets/{chunk-55IACEB6-CC6kOQYx.js → chunk-55IACEB6-Td3JbOH_.js} +1 -1
  270. package/web-shell/assets/{chunk-727SXJPM-Z4lY4gbh.js → chunk-727SXJPM-gC_NR7u6.js} +1 -1
  271. package/web-shell/assets/{chunk-AQP2D5EJ-Yz0hZr3D.js → chunk-AQP2D5EJ-aD7bI3c3.js} +1 -1
  272. package/web-shell/assets/{chunk-FMBD7UC4-nKmTWTv9.js → chunk-FMBD7UC4-sHMhD16X.js} +1 -1
  273. package/web-shell/assets/{chunk-ND2GUHAM-CjZz0f6Y.js → chunk-ND2GUHAM-DiV49BLl.js} +1 -1
  274. package/web-shell/assets/{chunk-QZHKN3VN-Bab3FpuS.js → chunk-QZHKN3VN-Dnoagqin.js} +1 -1
  275. package/web-shell/assets/classDiagram-4FO5ZUOK-qVxLMMuK.js +1 -0
  276. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-qVxLMMuK.js +1 -0
  277. package/web-shell/assets/{cose-bilkent-S5V4N54A-BuSAGFox.js → cose-bilkent-S5V4N54A-K6l_zsrZ.js} +1 -1
  278. package/web-shell/assets/{dagre-BM42HDAG-CRZXTg3g.js → dagre-BM42HDAG-Chh9hQ0a.js} +1 -1
  279. package/web-shell/assets/{diagram-2AECGRRQ-BFx1Ayrz.js → diagram-2AECGRRQ-Clrbd8SB.js} +1 -1
  280. package/web-shell/assets/{diagram-5GNKFQAL-B2hMZ3gS.js → diagram-5GNKFQAL-BkNExywD.js} +1 -1
  281. package/web-shell/assets/{diagram-KO2AKTUF-DKxAQLmc.js → diagram-KO2AKTUF-kTX14ngI.js} +1 -1
  282. package/web-shell/assets/{diagram-LMA3HP47-Bo1xGqVY.js → diagram-LMA3HP47-Ba1QOCJy.js} +1 -1
  283. package/web-shell/assets/{diagram-OG6HWLK6-B9NG78d-.js → diagram-OG6HWLK6-CtH5BVYm.js} +1 -1
  284. package/web-shell/assets/{erDiagram-TEJ5UH35-DltQKiqQ.js → erDiagram-TEJ5UH35-DCxSIC83.js} +1 -1
  285. package/web-shell/assets/{flowDiagram-I6XJVG4X-5xXGmS4I.js → flowDiagram-I6XJVG4X-C4rNAypQ.js} +1 -1
  286. package/web-shell/assets/{ganttDiagram-6RSMTGT7-bhGL5n0l.js → ganttDiagram-6RSMTGT7-s3P5tBwL.js} +1 -1
  287. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-ZYnz9hgh.js → gitGraphDiagram-PVQCEYII-C7Eg-1ok.js} +1 -1
  288. package/web-shell/assets/index-BXoIYIJg.css +5 -0
  289. package/web-shell/assets/{index-CBBeUArD.js → index-CszoC8cN.js} +1 -1
  290. package/web-shell/assets/index-Dxj7Naa0.js +1788 -0
  291. package/web-shell/assets/{infoDiagram-5YYISTIA-Cg-jamQf.js → infoDiagram-5YYISTIA-BDKsgMt6.js} +1 -1
  292. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CcmvKlyq.js → ishikawaDiagram-YF4QCWOH-CkcSHbvL.js} +1 -1
  293. package/web-shell/assets/{journeyDiagram-JHISSGLW-BRsOQZp1.js → journeyDiagram-JHISSGLW-CDWt-t81.js} +1 -1
  294. package/web-shell/assets/{kanban-definition-UN3LZRKU-xW-dmEHK.js → kanban-definition-UN3LZRKU-FI2owcEa.js} +1 -1
  295. package/web-shell/assets/{linear-ClBfEZH2.js → linear-BQzLqkJi.js} +1 -1
  296. package/web-shell/assets/{mermaid.core-D65NDkzc.js → mermaid.core-CvV91DP1.js} +5 -5
  297. package/web-shell/assets/{mindmap-definition-RKZ34NQL-CyvFslYa.js → mindmap-definition-RKZ34NQL-Dx2kLUpN.js} +1 -1
  298. package/web-shell/assets/{pieDiagram-4H26LBE5-BwSefMyG.js → pieDiagram-4H26LBE5-CMXOmBrj.js} +1 -1
  299. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-GqBJspFS.js → quadrantDiagram-W4KKPZXB-Bziww7Co.js} +1 -1
  300. package/web-shell/assets/{requirementDiagram-4Y6WPE33-B137PlTJ.js → requirementDiagram-4Y6WPE33-DMOXAxzp.js} +1 -1
  301. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-maHkkt8i.js → sankeyDiagram-5OEKKPKP-B3y1cfVV.js} +1 -1
  302. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DJ1mRaG3.js → sequenceDiagram-3UESZ5HK-ChrV1jiM.js} +1 -1
  303. package/web-shell/assets/{stateDiagram-AJRCARHV-aRmP7Q4i.js → stateDiagram-AJRCARHV-CWuLzLFE.js} +1 -1
  304. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DEDPMLgq.js +1 -0
  305. package/web-shell/assets/{timeline-definition-PNZ67QCA-CIQ3BRPA.js → timeline-definition-PNZ67QCA-Cl6am_to.js} +1 -1
  306. package/web-shell/assets/{vennDiagram-CIIHVFJN-DR9VPd5h.js → vennDiagram-CIIHVFJN-OuocxGAu.js} +1 -1
  307. package/web-shell/assets/{wardley-L42UT6IY-ZcfIbT4D.js → wardley-L42UT6IY-DLYdvSJW.js} +1 -1
  308. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D0jgPi4T.js → wardleyDiagram-YWT4CUSO-7a3DreXX.js} +1 -1
  309. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BGWU4s5o.js → xychartDiagram-2RQKCTM6-CgfjUxW_.js} +1 -1
  310. package/web-shell/index.html +2 -2
  311. package/chunks/chunk-D34RDOLP.js +0 -529
  312. package/chunks/daemon-status-provider-SXS66ZIR.js +0 -103
  313. package/web-shell/assets/channel-hZnMfWA9.js +0 -1
  314. package/web-shell/assets/classDiagram-4FO5ZUOK-BRnxm8DX.js +0 -1
  315. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BRnxm8DX.js +0 -1
  316. package/web-shell/assets/index-CbgU-jUo.css +0 -5
  317. package/web-shell/assets/index-_nhzXqab.js +0 -1750
  318. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Db39gvZ_.js +0 -1
@@ -1418,6 +1418,18 @@ var DaemonClient = class {
1418
1418
  { method: "PUT", body: { state }, clientId, mode: "rest" }
1419
1419
  );
1420
1420
  }
1421
+ async setExtensionDefaultActivations(extensionNames, state, clientId) {
1422
+ return await this.jsonRequest(
1423
+ "/extensions/activation",
1424
+ "PUT /extensions/activation",
1425
+ {
1426
+ method: "PUT",
1427
+ body: { extensionNames: [...extensionNames], state },
1428
+ clientId,
1429
+ mode: "rest"
1430
+ }
1431
+ );
1432
+ }
1421
1433
  async extensionOperation(operationId, signal) {
1422
1434
  return await this.jsonRequest(
1423
1435
  `/extensions/operations/${urlEncode(operationId)}`,
@@ -2441,20 +2453,25 @@ var DaemonClient = class {
2441
2453
  }
2442
2454
  );
2443
2455
  }
2444
- async sessionGoalClear(sessionId, clientId) {
2445
- return await this.fetchWithTimeout(
2446
- `${this.baseUrl}/session/${urlEncode(sessionId)}/goal/clear`,
2447
- {
2448
- method: "POST",
2449
- headers: this.headers({ "Content-Type": "application/json" }, clientId),
2450
- body: JSON.stringify({})
2451
- },
2452
- async (res) => {
2453
- if (!res.ok) {
2454
- throw await this.failOnError(res, "POST /session/:id/goal/clear");
2455
- }
2456
- return await res.json();
2457
- }
2456
+ sessionGoalClear(sessionId, clientId) {
2457
+ return this.jsonRequest(
2458
+ `/session/${urlEncode(sessionId)}/goal/clear`,
2459
+ "POST /session/:id/goal/clear",
2460
+ { method: "POST", body: {}, clientId }
2461
+ );
2462
+ }
2463
+ sessionGoal(sessionId, clientId) {
2464
+ return this.jsonRequest(
2465
+ `/session/${urlEncode(sessionId)}/goal`,
2466
+ "GET /session/:id/goal",
2467
+ { clientId }
2468
+ );
2469
+ }
2470
+ sessionGoalControl(sessionId, request, clientId) {
2471
+ return this.jsonRequest(
2472
+ `/session/${urlEncode(sessionId)}/goal`,
2473
+ "POST /session/:id/goal",
2474
+ { method: "POST", body: request, clientId }
2458
2475
  );
2459
2476
  }
2460
2477
  async sessionStats(sessionId, clientId) {
@@ -2660,9 +2677,9 @@ var DaemonClient = class {
2660
2677
  if (!res.ok) throw await this.failOnError(res, "POST /session/:id/btw");
2661
2678
  return await res.json();
2662
2679
  }
2663
- async uploadSessionMedia(sessionId, data, mimeType, opts) {
2680
+ async uploadSessionAttachment(sessionId, data, name, mimeType, opts) {
2664
2681
  return await this.fetchWithTimeout(
2665
- `${this.baseUrl}/session/${urlEncode(sessionId)}/media`,
2682
+ `${this.baseUrl}/session/${urlEncode(sessionId)}/attachments?name=${urlEncode(name)}`,
2666
2683
  {
2667
2684
  method: "POST",
2668
2685
  headers: this.headers({ "Content-Type": mimeType }, opts?.clientId),
@@ -2671,15 +2688,15 @@ var DaemonClient = class {
2671
2688
  },
2672
2689
  async (res) => {
2673
2690
  if (!res.ok) {
2674
- throw await this.failOnError(res, "POST /session/:id/media");
2691
+ throw await this.failOnError(res, "POST /session/:id/attachments");
2675
2692
  }
2676
2693
  return await res.json();
2677
2694
  }
2678
2695
  );
2679
2696
  }
2680
- async readSessionMedia(sessionId, mediaId, opts) {
2697
+ async readSessionAttachment(sessionId, attachmentId, opts) {
2681
2698
  return await this.fetchWithTimeout(
2682
- `${this.baseUrl}/session/${urlEncode(sessionId)}/media/${urlEncode(mediaId)}`,
2699
+ `${this.baseUrl}/session/${urlEncode(sessionId)}/attachments/${urlEncode(attachmentId)}`,
2683
2700
  {
2684
2701
  method: "GET",
2685
2702
  headers: this.headers({}, opts?.clientId),
@@ -2687,7 +2704,10 @@ var DaemonClient = class {
2687
2704
  },
2688
2705
  async (res) => {
2689
2706
  if (!res.ok) {
2690
- throw await this.failOnError(res, "GET /session/:id/media/:mediaId");
2707
+ throw await this.failOnError(
2708
+ res,
2709
+ "GET /session/:id/attachments/:attachmentId"
2710
+ );
2691
2711
  }
2692
2712
  const bytes = new Uint8Array(await res.arrayBuffer());
2693
2713
  let binary = "";
@@ -2703,9 +2723,9 @@ var DaemonClient = class {
2703
2723
  }
2704
2724
  );
2705
2725
  }
2706
- async removeSessionMedia(sessionId, mediaId, opts) {
2726
+ async removeSessionAttachment(sessionId, attachmentId, opts) {
2707
2727
  return await this.fetchWithTimeout(
2708
- `${this.baseUrl}/session/${urlEncode(sessionId)}/media/${urlEncode(mediaId)}`,
2728
+ `${this.baseUrl}/session/${urlEncode(sessionId)}/attachments/${urlEncode(attachmentId)}`,
2709
2729
  {
2710
2730
  method: "DELETE",
2711
2731
  headers: this.headers({}, opts?.clientId),
@@ -2715,7 +2735,7 @@ var DaemonClient = class {
2715
2735
  if (!res.ok) {
2716
2736
  throw await this.failOnError(
2717
2737
  res,
2718
- "DELETE /session/:id/media/:mediaId"
2738
+ "DELETE /session/:id/attachments/:attachmentId"
2719
2739
  );
2720
2740
  }
2721
2741
  return (await res.json()).removed === true;
@@ -2728,7 +2748,7 @@ var DaemonClient = class {
2728
2748
  * turn ends. Every accepted request is daemon-owned; a caller-supplied id
2729
2749
  * makes ambiguous retries idempotent. `opts.content` carries media content
2730
2750
  * image blocks alongside the text — pre-flight the
2731
- * `session_media` capability; older daemons ignore the
2751
+ * `session_attachments` capability; older daemons ignore the
2732
2752
  * field and drop the media.
2733
2753
  */
2734
2754
  async enqueueMidTurnMessage(sessionId, message, opts) {
@@ -4992,6 +5012,19 @@ var WorkspaceDaemonClient = class {
4992
5012
  { method: "PUT", body: { state }, clientId, mode: "rest" }
4993
5013
  );
4994
5014
  }
5015
+ setExtensionActivations(extensionNames, state, clientId) {
5016
+ return this.client.workspaceJsonRequest(
5017
+ this.workspaceSelector,
5018
+ "/extensions/activation",
5019
+ "PUT /workspaces/:workspace/extensions/activation",
5020
+ {
5021
+ method: "PUT",
5022
+ body: { extensionNames: [...extensionNames], state },
5023
+ clientId,
5024
+ mode: "rest"
5025
+ }
5026
+ );
5027
+ }
4995
5028
  clearExtensionActivation(extensionId, clientId) {
4996
5029
  return this.client.workspaceJsonRequest(
4997
5030
  this.workspaceSelector,
@@ -5096,14 +5129,14 @@ __name(isNonBlockingAccepted, "isNonBlockingAccepted");
5096
5129
 
5097
5130
  // packages/sdk-typescript/src/daemon/DaemonSessionClient.ts
5098
5131
  init_esbuild_shims();
5099
- function isSessionMediaReference(value) {
5132
+ function isSessionAttachmentReference(value) {
5100
5133
  if (!value || typeof value !== "object" || Array.isArray(value)) return false;
5101
5134
  const record = value;
5102
- return record["type"] === "image" && typeof record["mediaId"] === "string" && record["mediaId"].length > 0 && typeof record["mimeType"] === "string" && record["mimeType"].startsWith(`${record["type"]}/`) && typeof record["size"] === "number" && Number.isSafeInteger(record["size"]) && record["size"] > 0;
5135
+ return (record["type"] === "image" || record["type"] === "resource") && typeof record["attachmentId"] === "string" && record["attachmentId"].length > 0 && typeof record["mimeType"] === "string" && record["mimeType"].length > 0 && (record["type"] !== "image" || record["mimeType"].startsWith("image/")) && typeof record["size"] === "number" && Number.isSafeInteger(record["size"]) && record["size"] >= 0 && (record["type"] !== "image" || record["size"] > 0);
5103
5136
  }
5104
- __name(isSessionMediaReference, "isSessionMediaReference");
5105
- var MAX_MEDIA_CACHE_BYTES = 32 * 1024 * 1024;
5106
- var MAX_MEDIA_CACHE_ENTRIES = 128;
5137
+ __name(isSessionAttachmentReference, "isSessionAttachmentReference");
5138
+ var MAX_ATTACHMENT_CACHE_BYTES = 32 * 1024 * 1024;
5139
+ var MAX_ATTACHMENT_CACHE_ENTRIES = 128;
5107
5140
  var DaemonSessionClient = class _DaemonSessionClient {
5108
5141
  static {
5109
5142
  __name(this, "DaemonSessionClient");
@@ -5145,8 +5178,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
5145
5178
  reattaching;
5146
5179
  cancelling;
5147
5180
  promptLimit;
5148
- mediaCache = /* @__PURE__ */ new Map();
5149
- mediaCacheBytes = 0;
5181
+ attachmentCache = /* @__PURE__ */ new Map();
5182
+ attachmentCacheBytes = 0;
5150
5183
  _pendingPrompts = /* @__PURE__ */ new Map();
5151
5184
  constructor(opts) {
5152
5185
  this.client = opts.client;
@@ -5358,26 +5391,39 @@ var DaemonSessionClient = class _DaemonSessionClient {
5358
5391
  }
5359
5392
  return accepted;
5360
5393
  }
5361
- async uploadMedia(data, mimeType, signal) {
5394
+ async uploadAttachment(data, name, mimeType, signal) {
5395
+ return await this.withClientIdSelfHeal(
5396
+ () => this.client.uploadSessionAttachment(
5397
+ this.sessionId,
5398
+ data,
5399
+ name,
5400
+ mimeType,
5401
+ {
5402
+ ...signal ? { signal } : {},
5403
+ ...this.clientId ? { clientId: this.clientId } : {}
5404
+ }
5405
+ )
5406
+ );
5407
+ }
5408
+ async readAttachment(attachmentId, signal) {
5362
5409
  return await this.withClientIdSelfHeal(
5363
- () => this.client.uploadSessionMedia(this.sessionId, data, mimeType, {
5410
+ () => this.client.readSessionAttachment(this.sessionId, attachmentId, {
5364
5411
  ...signal ? { signal } : {},
5365
5412
  ...this.clientId ? { clientId: this.clientId } : {}
5366
5413
  })
5367
5414
  );
5368
5415
  }
5369
- async removeMedia(mediaId) {
5416
+ async removeAttachment(attachmentId, signal) {
5370
5417
  const removed = await this.withClientIdSelfHeal(
5371
- () => this.client.removeSessionMedia(
5372
- this.sessionId,
5373
- mediaId,
5374
- this.clientId ? { clientId: this.clientId } : void 0
5375
- )
5418
+ () => this.client.removeSessionAttachment(this.sessionId, attachmentId, {
5419
+ ...signal ? { signal } : {},
5420
+ ...this.clientId ? { clientId: this.clientId } : {}
5421
+ })
5376
5422
  );
5377
5423
  if (removed) {
5378
- const cached = this.mediaCache.get(mediaId);
5379
- this.mediaCache.delete(mediaId);
5380
- this.mediaCacheBytes -= cached?.size ?? 0;
5424
+ const cached = this.attachmentCache.get(attachmentId);
5425
+ this.attachmentCache.delete(attachmentId);
5426
+ this.attachmentCacheBytes -= cached?.size ?? 0;
5381
5427
  }
5382
5428
  return removed;
5383
5429
  }
@@ -5435,55 +5481,48 @@ var DaemonSessionClient = class _DaemonSessionClient {
5435
5481
  * policy. Forwards the bound `clientId` so identified clients update
5436
5482
  * their per-client timestamp instead of just the session-wide one.
5437
5483
  */
5438
- async heartbeat() {
5439
- return await this.client.heartbeat(this.sessionId, this.clientId);
5484
+ heartbeat() {
5485
+ return this.client.heartbeat(this.sessionId, this.clientId);
5440
5486
  }
5441
- async artifacts() {
5442
- return await this.client.listSessionArtifacts(
5443
- this.sessionId,
5444
- this.clientId
5445
- );
5487
+ artifacts() {
5488
+ return this.client.listSessionArtifacts(this.sessionId, this.clientId);
5446
5489
  }
5447
- async addArtifact(artifact) {
5448
- return await this.client.addSessionArtifact(
5490
+ addArtifact(artifact) {
5491
+ return this.client.addSessionArtifact(
5449
5492
  this.sessionId,
5450
5493
  artifact,
5451
5494
  this.clientId
5452
5495
  );
5453
5496
  }
5454
- async removeArtifact(artifactId) {
5455
- return await this.client.removeSessionArtifact(
5497
+ removeArtifact(artifactId) {
5498
+ return this.client.removeSessionArtifact(
5456
5499
  this.sessionId,
5457
5500
  artifactId,
5458
5501
  this.clientId
5459
5502
  );
5460
5503
  }
5461
- async setModel(modelId) {
5462
- return await this.client.setSessionModel(
5463
- this.sessionId,
5464
- modelId,
5465
- this.clientId
5466
- );
5504
+ setModel(modelId) {
5505
+ return this.client.setSessionModel(this.sessionId, modelId, this.clientId);
5467
5506
  }
5468
- async setConfigOption(configId, value) {
5469
- return await this.client.setSessionConfigOption(
5507
+ setConfigOption(configId, value) {
5508
+ return this.client.setSessionConfigOption(
5470
5509
  this.sessionId,
5471
5510
  configId,
5472
5511
  value,
5473
5512
  this.clientId
5474
5513
  );
5475
5514
  }
5476
- async getRewindSnapshots() {
5477
- return await this.client.getRewindSnapshots(this.sessionId);
5515
+ getRewindSnapshots() {
5516
+ return this.client.getRewindSnapshots(this.sessionId);
5478
5517
  }
5479
- async rewind(promptId, opts) {
5480
- return await this.client.rewindSession(this.sessionId, promptId, {
5518
+ rewind(promptId, opts) {
5519
+ return this.client.rewindSession(this.sessionId, promptId, {
5481
5520
  clientId: this.clientId,
5482
5521
  ...opts?.rewindFiles !== void 0 ? { rewindFiles: opts.rewindFiles } : {}
5483
5522
  });
5484
5523
  }
5485
- async fork(directive) {
5486
- return await this.client.forkSession(
5524
+ fork(directive) {
5525
+ return this.client.forkSession(
5487
5526
  this.sessionId,
5488
5527
  { directive },
5489
5528
  this.clientId
@@ -5497,8 +5536,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
5497
5536
  * child both run to completion regardless (no cross-process abort
5498
5537
  * plumbing in v1).
5499
5538
  */
5500
- async recap(opts) {
5501
- return await this.client.recapSession(this.sessionId, {
5539
+ recap(opts) {
5540
+ return this.client.recapSession(this.sessionId, {
5502
5541
  ...opts?.signal ? { signal: opts.signal } : {},
5503
5542
  ...this.clientId ? { clientId: this.clientId } : {}
5504
5543
  });
@@ -5509,8 +5548,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
5509
5548
  ...this.clientId ? { clientId: this.clientId } : {}
5510
5549
  });
5511
5550
  }
5512
- async btw(question, opts) {
5513
- return await this.client.btwSession(this.sessionId, question, {
5551
+ btw(question, opts) {
5552
+ return this.client.btwSession(this.sessionId, question, {
5514
5553
  ...opts?.signal ? { signal: opts.signal } : {},
5515
5554
  ...this.clientId ? { clientId: this.clientId } : {}
5516
5555
  });
@@ -5521,16 +5560,16 @@ var DaemonSessionClient = class _DaemonSessionClient {
5521
5560
  * create/attach. Accepted requests become daemon-owned even when the active
5522
5561
  * turn settles while the request is in flight.
5523
5562
  */
5524
- async enqueueMidTurnMessage(message, opts) {
5525
- return await this.client.enqueueMidTurnMessage(this.sessionId, message, {
5563
+ enqueueMidTurnMessage(message, opts) {
5564
+ return this.client.enqueueMidTurnMessage(this.sessionId, message, {
5526
5565
  ...opts?.signal ? { signal: opts.signal } : {},
5527
5566
  ...opts?.messageId ? { messageId: opts.messageId } : {},
5528
5567
  ...opts?.content && opts.content.length > 0 ? { content: opts.content } : {},
5529
5568
  ...this.clientId ? { clientId: this.clientId } : {}
5530
5569
  });
5531
5570
  }
5532
- async removeMidTurnMessage(messageId) {
5533
- return await this.client.removeMidTurnMessage(this.sessionId, messageId, {
5571
+ removeMidTurnMessage(messageId) {
5572
+ return this.client.removeMidTurnMessage(this.sessionId, messageId, {
5534
5573
  ...this.clientId ? { clientId: this.clientId } : {}
5535
5574
  });
5536
5575
  }
@@ -5581,8 +5620,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
5581
5620
  )
5582
5621
  };
5583
5622
  }
5584
- async removePendingPrompt(promptId) {
5585
- return await this.client.removePendingPrompt(this.sessionId, promptId, {
5623
+ removePendingPrompt(promptId) {
5624
+ return this.client.removePendingPrompt(this.sessionId, promptId, {
5586
5625
  ...this.clientId ? { clientId: this.clientId } : {}
5587
5626
  });
5588
5627
  }
@@ -5592,50 +5631,53 @@ var DaemonSessionClient = class _DaemonSessionClient {
5592
5631
  * automatically forwards the client id bound when the session was created
5593
5632
  * or attached.
5594
5633
  */
5595
- async shellCommand(command, signal) {
5596
- return await this.client.shellCommand(this.sessionId, command, {
5634
+ shellCommand(command, signal) {
5635
+ return this.client.shellCommand(this.sessionId, command, {
5597
5636
  ...signal ? { signal } : {},
5598
5637
  ...this.clientId ? { clientId: this.clientId } : {}
5599
5638
  });
5600
5639
  }
5601
- async context() {
5602
- return await this.client.sessionContext(this.sessionId, this.clientId);
5640
+ context() {
5641
+ return this.client.sessionContext(this.sessionId, this.clientId);
5603
5642
  }
5604
- async status() {
5605
- return await this.client.sessionStatus(this.sessionId, this.clientId);
5643
+ status() {
5644
+ return this.client.sessionStatus(this.sessionId, this.clientId);
5606
5645
  }
5607
- async contextUsage(opts = {}) {
5608
- return await this.client.sessionContextUsage(
5609
- this.sessionId,
5610
- opts,
5611
- this.clientId
5612
- );
5646
+ contextUsage(opts = {}) {
5647
+ return this.client.sessionContextUsage(this.sessionId, opts, this.clientId);
5613
5648
  }
5614
- async supportedCommands() {
5615
- return await this.client.sessionSupportedCommands(
5616
- this.sessionId,
5617
- this.clientId
5618
- );
5649
+ supportedCommands() {
5650
+ return this.client.sessionSupportedCommands(this.sessionId, this.clientId);
5619
5651
  }
5620
- async tasks() {
5621
- return await this.client.sessionTasks(this.sessionId, this.clientId);
5652
+ tasks() {
5653
+ return this.client.sessionTasks(this.sessionId, this.clientId);
5622
5654
  }
5623
- async lspStatus() {
5624
- return await this.client.sessionLspStatus(this.sessionId, this.clientId);
5655
+ lspStatus() {
5656
+ return this.client.sessionLspStatus(this.sessionId, this.clientId);
5625
5657
  }
5626
- async cancelTask(taskId, kind) {
5627
- return await this.client.sessionTaskCancel(
5658
+ cancelTask(taskId, kind) {
5659
+ return this.client.sessionTaskCancel(
5628
5660
  this.sessionId,
5629
5661
  taskId,
5630
5662
  kind,
5631
5663
  this.clientId
5632
5664
  );
5633
5665
  }
5634
- async clearGoal() {
5635
- return await this.client.sessionGoalClear(this.sessionId, this.clientId);
5666
+ clearGoal() {
5667
+ return this.client.sessionGoalClear(this.sessionId, this.clientId);
5668
+ }
5669
+ goal() {
5670
+ return this.client.sessionGoal(this.sessionId, this.clientId);
5671
+ }
5672
+ controlGoal(request) {
5673
+ return this.client.sessionGoalControl(
5674
+ this.sessionId,
5675
+ request,
5676
+ this.clientId
5677
+ );
5636
5678
  }
5637
- async stats() {
5638
- return await this.client.sessionStats(this.sessionId, this.clientId);
5679
+ stats() {
5680
+ return this.client.sessionStats(this.sessionId, this.clientId);
5639
5681
  }
5640
5682
  async respondToPermission(requestId, response) {
5641
5683
  return await this.client.respondToPermission(
@@ -5833,43 +5875,49 @@ var DaemonSessionClient = class _DaemonSessionClient {
5833
5875
  );
5834
5876
  }
5835
5877
  async hydrateBlock(block) {
5836
- if (!isSessionMediaReference(block)) {
5878
+ if (!isSessionAttachmentReference(block)) {
5837
5879
  return block;
5838
5880
  }
5839
- let cached = this.mediaCache.get(block.mediaId);
5881
+ if (block.type === "resource") return block;
5882
+ let cached = this.attachmentCache.get(block.attachmentId);
5840
5883
  if (cached) {
5841
- this.mediaCache.delete(block.mediaId);
5842
- this.mediaCache.set(block.mediaId, cached);
5884
+ this.attachmentCache.delete(block.attachmentId);
5885
+ this.attachmentCache.set(block.attachmentId, cached);
5843
5886
  } else {
5844
5887
  const pending = this.withClientIdSelfHeal(
5845
- () => this.client.readSessionMedia(this.sessionId, block.mediaId, {
5888
+ () => this.client.readSessionAttachment(this.sessionId, block.attachmentId, {
5846
5889
  ...this.clientId ? { clientId: this.clientId } : {}
5847
5890
  })
5848
5891
  );
5849
5892
  cached = { pending, size: block.size };
5850
- this.mediaCache.set(block.mediaId, cached);
5851
- this.mediaCacheBytes += block.size;
5852
- while (this.mediaCache.size > MAX_MEDIA_CACHE_ENTRIES || this.mediaCacheBytes > MAX_MEDIA_CACHE_BYTES) {
5853
- const oldestId = this.mediaCache.keys().next().value;
5893
+ this.attachmentCache.set(block.attachmentId, cached);
5894
+ this.attachmentCacheBytes += block.size;
5895
+ while (this.attachmentCache.size > MAX_ATTACHMENT_CACHE_ENTRIES || this.attachmentCacheBytes > MAX_ATTACHMENT_CACHE_BYTES) {
5896
+ const oldestId = this.attachmentCache.keys().next().value;
5854
5897
  if (oldestId === void 0) break;
5855
- const evicted = this.mediaCache.get(oldestId);
5856
- this.mediaCache.delete(oldestId);
5857
- this.mediaCacheBytes -= evicted?.size ?? 0;
5898
+ const evicted = this.attachmentCache.get(oldestId);
5899
+ this.attachmentCache.delete(oldestId);
5900
+ this.attachmentCacheBytes -= evicted?.size ?? 0;
5858
5901
  }
5859
5902
  void pending.catch(() => {
5860
- if (this.mediaCache.get(block.mediaId)?.pending !== pending) return;
5861
- this.mediaCache.delete(block.mediaId);
5862
- this.mediaCacheBytes -= block.size;
5903
+ if (this.attachmentCache.get(block.attachmentId)?.pending !== pending)
5904
+ return;
5905
+ this.attachmentCache.delete(block.attachmentId);
5906
+ this.attachmentCacheBytes -= block.size;
5863
5907
  });
5864
5908
  }
5865
5909
  try {
5866
- const media = await cached.pending;
5867
- return { type: block.type, data: media.data, mimeType: media.mimeType };
5910
+ const attachment = await cached.pending;
5911
+ return {
5912
+ type: "image",
5913
+ data: attachment.data,
5914
+ mimeType: attachment.mimeType
5915
+ };
5868
5916
  } catch (err) {
5869
5917
  if (err instanceof DaemonHttpError && (err.status === 404 || err.status === 410)) {
5870
5918
  return {
5871
5919
  type: "text",
5872
- text: "[Attached media is no longer available]"
5920
+ text: "[Attachment is no longer available]"
5873
5921
  };
5874
5922
  }
5875
5923
  return block;
@@ -7173,6 +7221,16 @@ var DAEMON_UI_DEBUG_REASONS = [
7173
7221
  "unrecognized_session_update",
7174
7222
  "malformed_payload"
7175
7223
  ];
7224
+ var DAEMON_UI_UNRECOGNIZED_DIAGNOSTIC_REASONS = [
7225
+ "unrecognized_event",
7226
+ "unrecognized_session_update"
7227
+ ];
7228
+ function isUnrecognizedDiagnosticReason(reason) {
7229
+ return reason !== void 0 && DAEMON_UI_UNRECOGNIZED_DIAGNOSTIC_REASONS.includes(
7230
+ reason
7231
+ );
7232
+ }
7233
+ __name(isUnrecognizedDiagnosticReason, "isUnrecognizedDiagnosticReason");
7176
7234
 
7177
7235
  // packages/sdk-typescript/src/daemon/ui/utils.ts
7178
7236
  init_esbuild_shims();
@@ -7370,7 +7428,7 @@ var MCP_RESTART_REFUSED_REASONS2 = /* @__PURE__ */ new Set([
7370
7428
  var MALFORMED_MEMORY_CHANGED = "malformed memory_changed payload";
7371
7429
  var MAX_DETAILS_LENGTH = 4096;
7372
7430
  var SESSION_RECORDING_DEGRADED_MESSAGE = "Session recording stopped after a write failure. New messages for the affected session will not be saved. Check disk space and permissions, then start a new session to resume recording.";
7373
- var MEDIA_UNAVAILABLE_TEXT = "[Attached media is no longer available]";
7431
+ var ATTACHMENT_UNAVAILABLE_TEXT = "[Attachment is no longer available]";
7374
7432
  function normalizeDaemonEvent(event, opts = {}) {
7375
7433
  const base = createBase(event, opts);
7376
7434
  switch (event.type) {
@@ -7755,7 +7813,7 @@ function normalizeMidTurnMessageInjected(event, base) {
7755
7813
  const items = data["items"];
7756
7814
  const hasRenderableItemContent = Array.isArray(items) && items.some(
7757
7815
  (item) => isRecord2(item) && Array.isArray(item["content"]) && item["content"].some(
7758
- (block) => isRecord2(block) && (block["type"] === "image" || block["type"] === "text" && typeof block["text"] === "string" && block["text"].length > 0)
7816
+ (block) => isRecord2(block) && (block["type"] === "image" || block["type"] === "resource" || block["type"] === "text" && typeof block["text"] === "string" && block["text"].length > 0)
7759
7817
  )
7760
7818
  );
7761
7819
  if (messages.length === 0 || !messages.some(Boolean) && !hasRenderableItemContent) {
@@ -7850,10 +7908,10 @@ function parseTimestamp(value) {
7850
7908
  return Number.isFinite(parsed) ? parsed : void 0;
7851
7909
  }
7852
7910
  __name(parseTimestamp, "parseTimestamp");
7853
- function isMediaReferenceContent(value) {
7854
- return isRecord2(value) && value["type"] === "image" && typeof value["mediaId"] === "string" && value["mediaId"].length > 0 && value["data"] === void 0 && value["url"] === void 0 && value["source"] === void 0;
7911
+ function isAttachmentReferenceContent(value) {
7912
+ return isRecord2(value) && (value["type"] === "image" || value["type"] === "resource") && typeof value["attachmentId"] === "string" && value["attachmentId"].length > 0 && value["data"] === void 0 && value["url"] === void 0 && value["source"] === void 0;
7855
7913
  }
7856
- __name(isMediaReferenceContent, "isMediaReferenceContent");
7914
+ __name(isAttachmentReferenceContent, "isAttachmentReferenceContent");
7857
7915
  function normalizeSessionUpdate(event, base, opts) {
7858
7916
  const update = getSessionUpdatePayload(event.data);
7859
7917
  if (!update) {
@@ -7912,12 +7970,26 @@ function normalizeSessionUpdate(event, base, opts) {
7912
7970
  }
7913
7971
  return [];
7914
7972
  }
7915
- if (isMediaReferenceContent(content)) {
7973
+ if (isAttachmentReferenceContent(content)) {
7974
+ if (content["type"] === "resource") {
7975
+ const attachmentId = content["attachmentId"];
7976
+ const mimeType = content["mimeType"];
7977
+ return [
7978
+ {
7979
+ ...base,
7980
+ type: "user.file.delta",
7981
+ name: attachmentId,
7982
+ attachmentId,
7983
+ mimeType: typeof mimeType === "string" ? mimeType : "",
7984
+ ...meta ? { meta } : {}
7985
+ }
7986
+ ];
7987
+ }
7916
7988
  return [
7917
7989
  {
7918
7990
  ...base,
7919
7991
  type: "user.text.delta",
7920
- text: MEDIA_UNAVAILABLE_TEXT,
7992
+ text: ATTACHMENT_UNAVAILABLE_TEXT,
7921
7993
  ...meta ? { meta } : {}
7922
7994
  }
7923
7995
  ];
@@ -9196,6 +9268,7 @@ __name(detectTabular, "detectTabular");
9196
9268
  // packages/sdk-typescript/src/daemon/ui/transcript.ts
9197
9269
  init_esbuild_shims();
9198
9270
  var DEFAULT_MAX_BLOCKS = 1e3;
9271
+ var UNRECOGNIZED_DIAGNOSTICS_LIMIT = 50;
9199
9272
  var TRIMMED_TOOL_BLOCK_ID = "__trimmed_tool_block__";
9200
9273
  var TRIMMED_PERMISSION_BLOCK_ID = "__trimmed_permission_block__";
9201
9274
  var MAX_TEXT_BLOCK_LENGTH = 1e5;
@@ -9214,6 +9287,7 @@ function createDaemonTranscriptState(opts = {}) {
9214
9287
  activeThoughtBlockByParent: createIndex(),
9215
9288
  // PR-E sidechannel: track current tool / approval mode / progress
9216
9289
  toolProgress: createIndex(),
9290
+ unrecognizedDiagnostics: [],
9217
9291
  awaitingResync: false,
9218
9292
  resyncRequiredCount: 0,
9219
9293
  nextOrdinal: 1,
@@ -9268,14 +9342,15 @@ function appendLocalUserTranscriptMessage(state, text, opts = {}) {
9268
9342
  return trimTranscriptState(next);
9269
9343
  }
9270
9344
  __name(appendLocalUserTranscriptMessage, "appendLocalUserTranscriptMessage");
9271
- var FREEZE_TRANSCRIPT_BLOCKS = typeof process !== "undefined" && false;
9345
+ var FREEZE_TRANSCRIPT_COLLECTIONS = typeof process !== "undefined" && false;
9272
9346
  function reduceDaemonTranscriptEvents(state, events, opts = {}) {
9273
9347
  if (events.length === 0) return state;
9274
9348
  const next = cloneTranscriptState(state, opts);
9275
9349
  for (const event of events) applyDaemonTranscriptEvent(next, event);
9276
9350
  const result = trimTranscriptState(next);
9277
- if (FREEZE_TRANSCRIPT_BLOCKS) {
9351
+ if (FREEZE_TRANSCRIPT_COLLECTIONS) {
9278
9352
  Object.freeze(result.blocks);
9353
+ Object.freeze(result.blockIndexById);
9279
9354
  }
9280
9355
  return result;
9281
9356
  }
@@ -9288,6 +9363,28 @@ function rebuildDaemonTranscriptBlockIndex(blocks) {
9288
9363
  return blockIndexById;
9289
9364
  }
9290
9365
  __name(rebuildDaemonTranscriptBlockIndex, "rebuildDaemonTranscriptBlockIndex");
9366
+ function userBlockForAttachment(next, event) {
9367
+ const activeUserIndex = next.activeUserBlockId ? next.blockIndexById[next.activeUserBlockId] : void 0;
9368
+ const activeUser = activeUserIndex !== void 0 ? next.blocks[activeUserIndex] : void 0;
9369
+ if (activeUser?.kind === "user" && stringArraysEqual(activeUser.sourceRecordIds, event.sourceRecordIds)) {
9370
+ const block2 = getWritableBlockById(next, activeUser.id);
9371
+ if (block2?.kind === "user") return block2;
9372
+ }
9373
+ const block = createTextBlock(
9374
+ next,
9375
+ "user",
9376
+ "",
9377
+ event.eventId,
9378
+ event.serverTimestamp,
9379
+ event.meta,
9380
+ event.sourceRecordIds,
9381
+ event.promptId
9382
+ );
9383
+ appendBlock(next, block);
9384
+ next.activeUserBlockId = block.id;
9385
+ return block;
9386
+ }
9387
+ __name(userBlockForAttachment, "userBlockForAttachment");
9291
9388
  function applyDaemonTranscriptEvent(next, event) {
9292
9389
  if (event.eventId !== void 0) {
9293
9390
  next.lastEventId = Math.max(next.lastEventId ?? 0, event.eventId);
@@ -9314,32 +9411,25 @@ function applyDaemonTranscriptEvent(next, event) {
9314
9411
  appendTextDelta(next, "user", "activeUserBlockId", event.text, event);
9315
9412
  break;
9316
9413
  case "user.image.delta": {
9317
- const activeUserIndex = next.activeUserBlockId ? next.blockIndexById[next.activeUserBlockId] : void 0;
9318
- const activeUser = activeUserIndex !== void 0 ? next.blocks[activeUserIndex] : void 0;
9319
- if (activeUser?.kind !== "user" || !stringArraysEqual(activeUser.sourceRecordIds, event.sourceRecordIds)) {
9320
- const block = createTextBlock(
9321
- next,
9322
- "user",
9323
- "",
9324
- event.eventId,
9325
- event.serverTimestamp,
9326
- event.meta,
9327
- event.sourceRecordIds,
9328
- event.promptId
9329
- );
9330
- block.images = [{ data: event.data, mimeType: event.mimeType }];
9331
- appendBlock(next, block);
9332
- next.activeUserBlockId = block.id;
9333
- } else {
9334
- const block = getWritableBlockById(next, next.activeUserBlockId);
9335
- if (block && block.kind === "user") {
9336
- if (event.meta) block.meta = { ...block.meta, ...event.meta };
9337
- block.images = [
9338
- ...block.images ?? [],
9339
- { data: event.data, mimeType: event.mimeType }
9340
- ];
9414
+ const block = userBlockForAttachment(next, event);
9415
+ if (event.meta) block.meta = { ...block.meta, ...event.meta };
9416
+ block.images = [
9417
+ ...block.images ?? [],
9418
+ { data: event.data, mimeType: event.mimeType }
9419
+ ];
9420
+ break;
9421
+ }
9422
+ case "user.file.delta": {
9423
+ const block = userBlockForAttachment(next, event);
9424
+ if (event.meta) block.meta = { ...block.meta, ...event.meta };
9425
+ block.files = [
9426
+ ...block.files ?? [],
9427
+ {
9428
+ name: event.name,
9429
+ mimeType: event.mimeType,
9430
+ attachmentId: event.attachmentId
9341
9431
  }
9342
- }
9432
+ ];
9343
9433
  break;
9344
9434
  }
9345
9435
  case "assistant.text.delta":
@@ -9417,6 +9507,10 @@ function applyDaemonTranscriptEvent(next, event) {
9417
9507
  break;
9418
9508
  case "status":
9419
9509
  case "debug":
9510
+ if (isUnrecognizedDiagnostic(event)) {
9511
+ appendUnrecognizedDiagnostic(next, event);
9512
+ break;
9513
+ }
9420
9514
  appendStatusBlock(next, event.type, event.text, event, {
9421
9515
  clearActiveText: event.clearActiveText
9422
9516
  });
@@ -9856,6 +9950,8 @@ function discardToolBlock(state, toolCallId) {
9856
9950
  takeBlocksOwnership(state);
9857
9951
  state.blocks = state.blocks.filter((block) => block.id !== blockId);
9858
9952
  state.blockIndexById = rebuildDaemonTranscriptBlockIndex(state.blocks);
9953
+ ownedBlocks.set(state, state.blocks);
9954
+ ownedBlockIndexes.set(state, state.blockIndexById);
9859
9955
  delete state.toolBlockByCallId[toolCallId];
9860
9956
  delete state.toolProgress[toolCallId];
9861
9957
  if (state.currentToolCallId === toolCallId) {
@@ -10045,6 +10141,27 @@ function resolvePermissionBlock(state, event) {
10045
10141
  clearActiveText(state);
10046
10142
  }
10047
10143
  __name(resolvePermissionBlock, "resolvePermissionBlock");
10144
+ function isUnrecognizedDiagnostic(event) {
10145
+ return event.type === "debug" && isUnrecognizedDiagnosticReason(event.debugReason);
10146
+ }
10147
+ __name(isUnrecognizedDiagnostic, "isUnrecognizedDiagnostic");
10148
+ function appendUnrecognizedDiagnostic(state, event) {
10149
+ state.activeUserBlockId = void 0;
10150
+ const diagnostic = {
10151
+ debugReason: event.debugReason,
10152
+ text: truncateTextAtLimit(event.text),
10153
+ clientReceivedAt: state.now,
10154
+ ...event.promptId !== void 0 ? { promptId: event.promptId } : {},
10155
+ ...event.sourceRecordIds !== void 0 ? { sourceRecordIds: event.sourceRecordIds } : {},
10156
+ ...event.branchRecordId !== void 0 ? { branchRecordId: event.branchRecordId } : {},
10157
+ ...event.originatorClientId !== void 0 ? { originatorClientId: event.originatorClientId } : {},
10158
+ ...event.eventId !== void 0 ? { eventId: event.eventId } : {},
10159
+ ...event.serverTimestamp !== void 0 ? { serverTimestamp: event.serverTimestamp } : {}
10160
+ };
10161
+ const diagnostics = [...state.unrecognizedDiagnostics, diagnostic];
10162
+ state.unrecognizedDiagnostics = diagnostics.length > UNRECOGNIZED_DIAGNOSTICS_LIMIT ? diagnostics.slice(-UNRECOGNIZED_DIAGNOSTICS_LIMIT) : diagnostics;
10163
+ }
10164
+ __name(appendUnrecognizedDiagnostic, "appendUnrecognizedDiagnostic");
10048
10165
  function appendStatusBlock(state, kind, text, event, opts = {}) {
10049
10166
  const blockId = allocateBlockId(state, kind);
10050
10167
  const block = {
@@ -10153,7 +10270,10 @@ function cloneTranscriptState(state, opts) {
10153
10270
  // unrelated dispatches lets `useSyncExternalStore` subscribers
10154
10271
  // (e.g. `useDaemonFollowupSuggestion`) skip re-renders for events
10155
10272
  // that don't touch the suggestion.
10156
- lastFollowupSuggestion: state.lastFollowupSuggestion
10273
+ lastFollowupSuggestion: state.lastFollowupSuggestion,
10274
+ // Same reference-stability contract: the reducer replaces the whole
10275
+ // array when appending, never mutates it in-place.
10276
+ unrecognizedDiagnostics: state.unrecognizedDiagnostics
10157
10277
  };
10158
10278
  const onTruncation = opts.onTruncation ?? truncationCallbacks.get(state);
10159
10279
  if (onTruncation) truncationCallbacks.set(next, onTruncation);
@@ -10168,6 +10288,7 @@ function trimTranscriptState(state) {
10168
10288
  state.blocks = blocks;
10169
10289
  state.blockIndexById = rebuildDaemonTranscriptBlockIndex(blocks);
10170
10290
  ownedBlocks.set(state, state.blocks);
10291
+ ownedBlockIndexes.set(state, state.blockIndexById);
10171
10292
  for (const [toolCallId, blockId] of Object.entries(state.toolBlockByCallId)) {
10172
10293
  if (!keptIds.has(blockId)) {
10173
10294
  state.toolBlockByCallId[toolCallId] = TRIMMED_TOOL_BLOCK_ID;
@@ -10229,13 +10350,19 @@ function shouldRecreateTrimmedToolBlock(event) {
10229
10350
  }
10230
10351
  __name(shouldRecreateTrimmedToolBlock, "shouldRecreateTrimmedToolBlock");
10231
10352
  var ownedBlocks = /* @__PURE__ */ new WeakMap();
10353
+ var ownedBlockIndexes = /* @__PURE__ */ new WeakMap();
10232
10354
  function takeBlocksOwnership(state) {
10233
10355
  if (ownedBlocks.get(state) === state.blocks) return;
10234
10356
  state.blocks = [...state.blocks];
10235
- state.blockIndexById = createIndex(state.blockIndexById);
10236
10357
  ownedBlocks.set(state, state.blocks);
10237
10358
  }
10238
10359
  __name(takeBlocksOwnership, "takeBlocksOwnership");
10360
+ function takeBlockIndexOwnership(state) {
10361
+ if (ownedBlockIndexes.get(state) === state.blockIndexById) return;
10362
+ state.blockIndexById = createIndex(state.blockIndexById);
10363
+ ownedBlockIndexes.set(state, state.blockIndexById);
10364
+ }
10365
+ __name(takeBlockIndexOwnership, "takeBlockIndexOwnership");
10239
10366
  function rewindTranscriptToUserTurn(state, targetTurnIndex) {
10240
10367
  let userTurnIndex = 0;
10241
10368
  let lastUserIndex = -1;
@@ -10258,6 +10385,7 @@ function truncateTranscriptBeforeBlock(state, blockIndex) {
10258
10385
  state.blocks = state.blocks.slice(0, blockIndex);
10259
10386
  ownedBlocks.set(state, state.blocks);
10260
10387
  rebuildTranscriptIndexes(state);
10388
+ ownedBlockIndexes.set(state, state.blockIndexById);
10261
10389
  }
10262
10390
  __name(truncateTranscriptBeforeBlock, "truncateTranscriptBeforeBlock");
10263
10391
  function rebuildTranscriptIndexes(state) {
@@ -10291,6 +10419,7 @@ function rebuildTranscriptIndexes(state) {
10291
10419
  __name(rebuildTranscriptIndexes, "rebuildTranscriptIndexes");
10292
10420
  function appendBlock(state, block) {
10293
10421
  takeBlocksOwnership(state);
10422
+ takeBlockIndexOwnership(state);
10294
10423
  state.blockIndexById[block.id] = state.blocks.length;
10295
10424
  state.blocks.push(block);
10296
10425
  }
@@ -10354,15 +10483,20 @@ function appendBoundedText(state, block, text) {
10354
10483
  return truncateText(state, block.id, block.sourceRecordIds, existing + text);
10355
10484
  }
10356
10485
  __name(appendBoundedText, "appendBoundedText");
10357
- function truncateText(state, blockId, sourceRecordIds, text) {
10486
+ function truncateTextAtLimit(text) {
10358
10487
  if (text.length <= MAX_TEXT_BLOCK_LENGTH) return text;
10359
- reportTextTruncation(state, blockId, sourceRecordIds);
10360
10488
  const keepLength = Math.max(
10361
10489
  0,
10362
10490
  MAX_TEXT_BLOCK_LENGTH - TEXT_TRUNCATED_SUFFIX.length
10363
10491
  );
10364
10492
  return `${text.slice(0, keepLength)}${TEXT_TRUNCATED_SUFFIX}`;
10365
10493
  }
10494
+ __name(truncateTextAtLimit, "truncateTextAtLimit");
10495
+ function truncateText(state, blockId, sourceRecordIds, text) {
10496
+ if (text.length <= MAX_TEXT_BLOCK_LENGTH) return text;
10497
+ reportTextTruncation(state, blockId, sourceRecordIds);
10498
+ return truncateTextAtLimit(text);
10499
+ }
10366
10500
  __name(truncateText, "truncateText");
10367
10501
  function reportTextTruncation(state, blockId, sourceRecordIds) {
10368
10502
  truncationCallbacks.get(state)?.({
@@ -10455,6 +10589,10 @@ function selectLastFollowupSuggestion(state) {
10455
10589
  return state.lastFollowupSuggestion;
10456
10590
  }
10457
10591
  __name(selectLastFollowupSuggestion, "selectLastFollowupSuggestion");
10592
+ function selectUnrecognizedDiagnostics(state) {
10593
+ return state.unrecognizedDiagnostics;
10594
+ }
10595
+ __name(selectUnrecognizedDiagnostics, "selectUnrecognizedDiagnostics");
10458
10596
  function selectToolProgress(state, toolCallId) {
10459
10597
  return state.toolProgress[toolCallId];
10460
10598
  }
@@ -10898,6 +11036,8 @@ function daemonUiEventToTerminalText(event) {
10898
11036
  return "";
10899
11037
  case "user.image.delta":
10900
11038
  return `[image: ${sanitizeTerminalText(event.mimeType)}]`;
11039
+ case "user.file.delta":
11040
+ return `[file: ${sanitizeTerminalText(event.name)}]`;
10901
11041
  default:
10902
11042
  return assertNever(event);
10903
11043
  }
@@ -11832,6 +11972,7 @@ export {
11832
11972
  DAEMON_PLAN_TOOL_CALL_ID,
11833
11973
  DAEMON_UI_CONFORMANCE_FIXTURES,
11834
11974
  DAEMON_UI_DEBUG_REASONS,
11975
+ DAEMON_UI_UNRECOGNIZED_DIAGNOSTIC_REASONS,
11835
11976
  DEVICE_FLOW_EXPIRY_GRACE_MS,
11836
11977
  DaemonAuthFlow,
11837
11978
  DaemonCapabilityMissingError,
@@ -11847,6 +11988,7 @@ export {
11847
11988
  PENDING_PROMPT_COMPLETED_EVENT,
11848
11989
  PENDING_PROMPT_STARTED_EVENT,
11849
11990
  SseFramingError,
11991
+ UNRECOGNIZED_DIAGNOSTICS_LIMIT,
11850
11992
  WorkspaceDaemonClient,
11851
11993
  appendLocalUserTranscriptMessage,
11852
11994
  asKnownDaemonEvent,
@@ -11875,6 +12017,7 @@ export {
11875
12017
  isStaleBranchPointError,
11876
12018
  isSubagentChildBlock,
11877
12019
  isSubagentSessionNotFound,
12020
+ isUnrecognizedDiagnosticReason,
11878
12021
  isWorkspaceScopedBudgetEvent,
11879
12022
  matchTurnEvent,
11880
12023
  normalizeDaemonEvent,
@@ -11897,6 +12040,7 @@ export {
11897
12040
  selectToolProgress,
11898
12041
  selectTranscriptBlocks,
11899
12042
  selectTranscriptBlocksOrderedByEventId,
12043
+ selectUnrecognizedDiagnostics,
11900
12044
  stringifyJson as stringifyDaemonUiJson,
11901
12045
  stripOscSequences as stripDaemonOscSequences,
11902
12046
  transcriptBlockToTerminalText