@qwen-code/web-shell 0.27.2 → 0.27.4

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 (167) hide show
  1. package/NOTICES.txt +2 -2
  2. package/README.md +143 -0
  3. package/dist/{PierreFilePreview-CVi_Wsf-.js → PierreFilePreview-BMd8Nqyr.js} +1 -1
  4. package/dist/{SpreadsheetPreview-CTyYrLmD.js → SpreadsheetPreview-MnZX4z-A.js} +2 -2
  5. package/dist/{WorkspaceFileBrowser-DkQgnDFv.js → WorkspaceFileBrowser-CvJS8MdL.js} +2 -2
  6. package/dist/{abnfDiagram-VCTEODGH-DXK3iWaN.js → abnfDiagram-VCTEODGH-Bv0PY8t9.js} +3 -3
  7. package/dist/{abnfDiagram-VCTEODGH-CQWhk3bg.js → abnfDiagram-VCTEODGH-DtCQRLBn.js} +3 -3
  8. package/dist/{agents-route-ZD8W2lTb.js → agents-route-BYqfB9LM.js} +2 -2
  9. package/dist/{arc-DkZAOzaU.js → arc-C9Fz3b3w.js} +1 -1
  10. package/dist/{arc-BcP3aO-G.js → arc-QRx-tRi9.js} +1 -1
  11. package/dist/{architectureDiagram-5GKGNRK7-DusU8ybk.js → architectureDiagram-5GKGNRK7-Cq2r75mE.js} +2 -2
  12. package/dist/{architectureDiagram-5GKGNRK7-DhcVEkLQ.js → architectureDiagram-5GKGNRK7-UM6LRJXg.js} +2 -2
  13. package/dist/{blockDiagram-NRAW4CY4-BMOuo5wl.js → blockDiagram-NRAW4CY4-8jzOft5T.js} +3 -3
  14. package/dist/{blockDiagram-NRAW4CY4-YciA8-8I.js → blockDiagram-NRAW4CY4-Cg0XJgiI.js} +3 -3
  15. package/dist/{c4Diagram-UCG6FXSJ-DNpq-cdF.js → c4Diagram-UCG6FXSJ-B13GwaU1.js} +2 -2
  16. package/dist/{c4Diagram-UCG6FXSJ-BJxpHO4v.js → c4Diagram-UCG6FXSJ-OLlWXJbv.js} +2 -2
  17. package/dist/{channel-CfhQTpjX.js → channel-DZupPnpU.js} +1 -1
  18. package/dist/{channel-QZAYPfF8.js → channel-OaMC7mHn.js} +1 -1
  19. package/dist/{chunk-2Q5K7J3B-EGbMOnEe.js → chunk-2Q5K7J3B-CtAmr6l0.js} +1 -1
  20. package/dist/{chunk-2Q5K7J3B-mtpkChaF.js → chunk-2Q5K7J3B-VYh2Z2EU.js} +1 -1
  21. package/dist/{chunk-5VM5RSS4-CP4Q2W8n.js → chunk-5VM5RSS4-CS08-akS.js} +1 -1
  22. package/dist/{chunk-5VM5RSS4-CucJ3wyB.js → chunk-5VM5RSS4-D6zF9hVH.js} +1 -1
  23. package/dist/{chunk-F27PBJKO-CS9kzvAx.js → chunk-F27PBJKO-CnRnHE8-.js} +1 -1
  24. package/dist/{chunk-F27PBJKO-Cfw_29T-.js → chunk-F27PBJKO-D70ioBbq.js} +1 -1
  25. package/dist/{chunk-G27WJ6UU-BZzmQ8FW.js → chunk-G27WJ6UU-CfPfcj_Q.js} +4 -4
  26. package/dist/{chunk-G27WJ6UU-DdeEiwmL.js → chunk-G27WJ6UU-oq9aNO3N.js} +4 -4
  27. package/dist/{chunk-JWPE2WC7-BL_hjRLf.js → chunk-JWPE2WC7-C8sFa4JA.js} +1 -1
  28. package/dist/{chunk-JWPE2WC7-C03UDQBx.js → chunk-JWPE2WC7-DWG2vaxW.js} +1 -1
  29. package/dist/{chunk-LCL6LL3I-CR-IGGIM.js → chunk-LCL6LL3I-BO1WHi1A.js} +5 -5
  30. package/dist/{chunk-LCL6LL3I-CNn3XyuL.js → chunk-LCL6LL3I-CeUEAKcc.js} +5 -5
  31. package/dist/{chunk-POPQ4Y6H-BVQbxVHz.js → chunk-POPQ4Y6H-0k1uCy9w.js} +1 -1
  32. package/dist/{chunk-POPQ4Y6H-UJK1fYGP.js → chunk-POPQ4Y6H-4u40N2Gl.js} +1 -1
  33. package/dist/{chunk-SVP7TREG-BUmyTmov.js → chunk-SVP7TREG-34lWdHk_.js} +1 -1
  34. package/dist/{chunk-SVP7TREG-B-E-xFG8.js → chunk-SVP7TREG-DDs3xrn_.js} +1 -1
  35. package/dist/{chunk-XXDRQBXY-BDcf4DQz.js → chunk-XXDRQBXY-CUHjo6qB.js} +1 -1
  36. package/dist/{chunk-XXDRQBXY-BHAq0mtL.js → chunk-XXDRQBXY-Ug95Mv8M.js} +1 -1
  37. package/dist/{classDiagram-DTDB5LWJ-CVA3J-EH.js → classDiagram-DTDB5LWJ-CtVOkCOx.js} +2 -2
  38. package/dist/{classDiagram-DTDB5LWJ-Dh121Rlt.js → classDiagram-DTDB5LWJ-DrnxKzn3.js} +2 -2
  39. package/dist/{classDiagram-v2-JRS7N3AN-CVA3J-EH.js → classDiagram-v2-JRS7N3AN-CtVOkCOx.js} +2 -2
  40. package/dist/{classDiagram-v2-JRS7N3AN-Dh121Rlt.js → classDiagram-v2-JRS7N3AN-DrnxKzn3.js} +2 -2
  41. package/dist/{cose-bilkent-JH36ORCC-CLe0kcHa.js → cose-bilkent-JH36ORCC-DdToriLo.js} +1 -1
  42. package/dist/{cose-bilkent-JH36ORCC-DpMM48hA.js → cose-bilkent-JH36ORCC-DwyNUx5U.js} +1 -1
  43. package/dist/{cynefinDiagram-5FMLGOSQ-mLaK-3R3.js → cynefinDiagram-5FMLGOSQ-CMVnYBto.js} +2 -2
  44. package/dist/{cynefinDiagram-5FMLGOSQ-C5xaWeuA.js → cynefinDiagram-5FMLGOSQ-Ct3Kw1RW.js} +2 -2
  45. package/dist/daemon-react-sdk.js +1 -1
  46. package/dist/{dagre-3AP2YEHR-CmNFrtW9.js → dagre-3AP2YEHR-CTYnAWpM.js} +2 -2
  47. package/dist/{dagre-3AP2YEHR-zDm3fBQq.js → dagre-3AP2YEHR-Dpv_LiCL.js} +2 -2
  48. package/dist/{diagram-S7CK7UJ4-Clojnf04.js → diagram-S7CK7UJ4-DQHeL6-s.js} +3 -3
  49. package/dist/{diagram-S7CK7UJ4-BQtgRcGU.js → diagram-S7CK7UJ4-DjeleT-0.js} +3 -3
  50. package/dist/{diagram-UQ7AKVKN-CTn4O0fd.js → diagram-UQ7AKVKN-BEBKTGDQ.js} +2 -2
  51. package/dist/{diagram-UQ7AKVKN-B3Ll3rB4.js → diagram-UQ7AKVKN-DtXjm2iL.js} +2 -2
  52. package/dist/{diagram-VSXAHHWV-mdxkNEZP.js → diagram-VSXAHHWV-DfbCHMm2.js} +2 -2
  53. package/dist/{diagram-VSXAHHWV-BeYXDVEh.js → diagram-VSXAHHWV-hbkOSX96.js} +2 -2
  54. package/dist/{diagram-VX7I27RA-DaPLIQOr.js → diagram-VX7I27RA--8imafs4.js} +3 -3
  55. package/dist/{diagram-VX7I27RA-C3bzQYLd.js → diagram-VX7I27RA-C8IxrKer.js} +3 -3
  56. package/dist/{diagram-Z3DM3KII-CkkdGhWO.js → diagram-Z3DM3KII-BV-k-SHd.js} +2 -2
  57. package/dist/{diagram-Z3DM3KII-BImvaL3c.js → diagram-Z3DM3KII-CHdV8r8y.js} +2 -2
  58. package/dist/{ebnfDiagram-PWID7BFC-C8RUggbp.js → ebnfDiagram-PWID7BFC-C3THC4i_.js} +3 -3
  59. package/dist/{ebnfDiagram-PWID7BFC-gJHJx-lt.js → ebnfDiagram-PWID7BFC-lYLcJq20.js} +3 -3
  60. package/dist/{erDiagram-SSCWMZ5O-DLJjXFG9.js → erDiagram-SSCWMZ5O-BLPb7gye.js} +4 -4
  61. package/dist/{erDiagram-SSCWMZ5O-CKFzjLCd.js → erDiagram-SSCWMZ5O-CbcO0mmG.js} +4 -4
  62. package/dist/{flowDiagram-A5DVABFB-BHAeEzG1.js → flowDiagram-A5DVABFB-R1z9XJ6w.js} +6 -6
  63. package/dist/{flowDiagram-A5DVABFB-BOdsfJ-4.js → flowDiagram-A5DVABFB-vckXB2YQ.js} +6 -6
  64. package/dist/{ganttDiagram-EL5Y4UJY-D0hNphpF.js → ganttDiagram-EL5Y4UJY-C8WN6e37.js} +2 -2
  65. package/dist/{ganttDiagram-EL5Y4UJY-CtL6LAbW.js → ganttDiagram-EL5Y4UJY-WeLoHtnc.js} +2 -2
  66. package/dist/{gitGraphDiagram-WWUBYQGX-DxHtQ0ba.js → gitGraphDiagram-WWUBYQGX-D-P5h6Lr.js} +3 -3
  67. package/dist/{gitGraphDiagram-WWUBYQGX-8XcPnT4w.js → gitGraphDiagram-WWUBYQGX-MFeLW7T-.js} +3 -3
  68. package/dist/{index-BGsppGgG.js → index-ENe4NzKy.js} +99753 -97474
  69. package/dist/index.js +3 -3
  70. package/dist/{infoDiagram-RXCK75RN-B-Ds06LN.js → infoDiagram-RXCK75RN-BNKeKO1s.js} +1 -1
  71. package/dist/{infoDiagram-RXCK75RN-Dhirg4if.js → infoDiagram-RXCK75RN-Dps8MUWi.js} +1 -1
  72. package/dist/{ishikawaDiagram-5VMMS53U-CsttzTkq.js → ishikawaDiagram-5VMMS53U-BEGNZ7_e.js} +1 -1
  73. package/dist/{ishikawaDiagram-5VMMS53U-BJPKneVd.js → ishikawaDiagram-5VMMS53U-DD-5xbYo.js} +1 -1
  74. package/dist/{journeyDiagram-EYS64GPL-BBAEhOQ9.js → journeyDiagram-EYS64GPL-CwoTwXxQ.js} +4 -4
  75. package/dist/{journeyDiagram-EYS64GPL-DfXS6tI_.js → journeyDiagram-EYS64GPL-D_CRU8vl.js} +4 -4
  76. package/dist/{kanban-definition-3QL26DDD-Bh1Jz01C.js → kanban-definition-3QL26DDD-CGfVH7-u.js} +2 -2
  77. package/dist/{kanban-definition-3QL26DDD-C8yOTG02.js → kanban-definition-3QL26DDD-gFZV4o3C.js} +2 -2
  78. package/dist/{layout-sTbo9v3C.js → layout-CAcWj7Kv.js} +1 -1
  79. package/dist/{layout-Dxab-q-T.js → layout-DZbn3kqO.js} +1 -1
  80. package/dist/{linear-BhTDfwHZ.js → linear-CIB8jUpO.js} +1 -1
  81. package/dist/{linear-CjDL9r_e.js → linear-DXD1YCMV.js} +1 -1
  82. package/dist/{mermaid.core-DBp8atac.js → mermaid.core-BK41FwyV.js} +7197 -6573
  83. package/dist/{mermaid.core-CFV16zMl.js → mermaid.core-BKgs-Htx.js} +7194 -6570
  84. package/dist/{mindmap-definition-FBJOCRG2-KPo1Z4it.js → mindmap-definition-FBJOCRG2-CNksARfZ.js} +3 -3
  85. package/dist/{mindmap-definition-FBJOCRG2-vau9OLMK.js → mindmap-definition-FBJOCRG2-O4Y3c493.js} +3 -3
  86. package/dist/{pegDiagram-XKGWAZYB-CFjH6RoO.js → pegDiagram-XKGWAZYB-C1-7KdxI.js} +3 -3
  87. package/dist/{pegDiagram-XKGWAZYB-EeXt14MX.js → pegDiagram-XKGWAZYB-CaQotQw4.js} +3 -3
  88. package/dist/{pieDiagram-E7YTZNPT-CJa9GbCV.js → pieDiagram-E7YTZNPT-CuVj0IA0.js} +3 -3
  89. package/dist/{pieDiagram-E7YTZNPT-JyO_8fWF.js → pieDiagram-E7YTZNPT-D0dXDdXT.js} +3 -3
  90. package/dist/{quadrantDiagram-AXDQQJYC-G9wAekw0.js → quadrantDiagram-AXDQQJYC-DRsuFMxM.js} +2 -2
  91. package/dist/{quadrantDiagram-AXDQQJYC-B7tyPD89.js → quadrantDiagram-AXDQQJYC-pqP_q82t.js} +2 -2
  92. package/dist/{railroadDiagram-O6MQD6OU-3-cuTnqH.js → railroadDiagram-O6MQD6OU-BwN8iv67.js} +3 -3
  93. package/dist/{railroadDiagram-O6MQD6OU-SyM4QCMp.js → railroadDiagram-O6MQD6OU-CUAntKim.js} +3 -3
  94. package/dist/{requirementDiagram-EFPCY7ZU-BJal3W63.js → requirementDiagram-EFPCY7ZU-G9huvmji.js} +3 -3
  95. package/dist/{requirementDiagram-EFPCY7ZU-bMW72Av_.js → requirementDiagram-EFPCY7ZU-mJ1dporl.js} +3 -3
  96. package/dist/{sankeyDiagram-P5KCCOFB-BKP8fccK.js → sankeyDiagram-P5KCCOFB-BCgAcSoR.js} +1 -1
  97. package/dist/{sankeyDiagram-P5KCCOFB-C4KDi8Ty.js → sankeyDiagram-P5KCCOFB-Cdc1x2zX.js} +1 -1
  98. package/dist/{sequenceDiagram-WJ2MYXX4-DvgRoXFL.js → sequenceDiagram-WJ2MYXX4-DdTTcHCq.js} +3 -3
  99. package/dist/{sequenceDiagram-WJ2MYXX4-DFvbPjPG.js → sequenceDiagram-WJ2MYXX4-J9jJ_PIj.js} +3 -3
  100. package/dist/{sizeCapture-X5ZJPWSS-DPkvpCxM.js → sizeCapture-X5ZJPWSS-14A9sXYR.js} +1 -1
  101. package/dist/{sizeCapture-X5ZJPWSS-DU4nf5aV.js → sizeCapture-X5ZJPWSS-D4qVP_Sa.js} +1 -1
  102. package/dist/{stateDiagram-HBIQ2CUA-CWp0mOcF.js → stateDiagram-HBIQ2CUA-4NneHSIC.js} +3 -3
  103. package/dist/{stateDiagram-HBIQ2CUA-DkN3hNFV.js → stateDiagram-HBIQ2CUA-DkNYgHbg.js} +3 -3
  104. package/dist/{stateDiagram-v2-4QOOHH4V-Bh7H2ZBJ.js → stateDiagram-v2-4QOOHH4V-BMgrYGU3.js} +2 -2
  105. package/dist/{stateDiagram-v2-4QOOHH4V-DX-OvV9U.js → stateDiagram-v2-4QOOHH4V-rkG8uy--.js} +2 -2
  106. package/dist/sw.js +1 -1
  107. package/dist/{swimlanes-XN3QIQJK-CI3ENZQA.js → swimlanes-XN3QIQJK-BH6gLXA3.js} +1 -1
  108. package/dist/{swimlanes-XN3QIQJK-2s4fbN8J.js → swimlanes-XN3QIQJK-DrNfUgyT.js} +1 -1
  109. package/dist/{swimlanesDiagram-VK2B7HYN-BEjeqDmx.js → swimlanesDiagram-VK2B7HYN-BlPGkTOD.js} +2 -2
  110. package/dist/{swimlanesDiagram-VK2B7HYN-DWJY6BGD.js → swimlanesDiagram-VK2B7HYN-CSVKUjI1.js} +2 -2
  111. package/dist/{timeline-definition-24CTP7MA-C_tZHri9.js → timeline-definition-24CTP7MA-CeK_Y-eQ.js} +2 -2
  112. package/dist/{timeline-definition-24CTP7MA-DYXEracn.js → timeline-definition-24CTP7MA-s9sNQrJl.js} +2 -2
  113. package/dist/transcript.js +9228 -9060
  114. package/dist/types/App.d.ts +4 -1
  115. package/dist/types/components/ChatEditor.d.ts +4 -1
  116. package/dist/types/components/ComposerTaskChips.d.ts +21 -0
  117. package/dist/types/components/ManagedLocalFilesControl.d.ts +18 -0
  118. package/dist/types/components/ModelPickerContent.d.ts +13 -0
  119. package/dist/types/components/TranscriptViewport.d.ts +4 -1
  120. package/dist/types/components/UnavailableModelTooltip.d.ts +2 -1
  121. package/dist/types/components/WorkspacePill.d.ts +14 -0
  122. package/dist/types/components/channels/ChannelEditorDialog.d.ts +2 -2
  123. package/dist/types/components/channels/ChannelQrLogin.d.ts +2 -2
  124. package/dist/types/components/channels/ChannelsManagerPage.d.ts +10 -1
  125. package/dist/types/components/channels/channel-editor-state.d.ts +5 -4
  126. package/dist/types/components/channels/channel-platform.d.ts +5 -1
  127. package/dist/types/components/channels/qr-login-contract.type-test.d.ts +55 -0
  128. package/dist/types/components/dialogs/BindSessionPrDialog.d.ts +27 -0
  129. package/dist/types/components/dialogs/GoalsDialog.d.ts +22 -6
  130. package/dist/types/components/managed/ManagedTerminalPanel.d.ts +17 -0
  131. package/dist/types/components/managed/generated/managed-agent-api.d.ts +382 -5
  132. package/dist/types/components/managed/java-managed-agent-client.d.ts +14 -0
  133. package/dist/types/components/managed/managed-agent-provider.d.ts +22 -0
  134. package/dist/types/components/managed/managed-terminal-protocol.d.ts +14 -0
  135. package/dist/types/components/managed/use-managed-model-change.d.ts +3 -11
  136. package/dist/types/components/messages/ToolGroup.d.ts +2 -0
  137. package/dist/types/components/sidebar/SessionSearchDialog.d.ts +14 -0
  138. package/dist/types/components/sidebar/WebShellSidebar.d.ts +1 -1
  139. package/dist/types/components/sidebar/use-session-search.d.ts +38 -0
  140. package/dist/types/components/terminal/terminal-protocol.d.ts +30 -0
  141. package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +1 -1
  142. package/dist/types/constants/sessions.d.ts +1 -0
  143. package/dist/types/customization.d.ts +2 -0
  144. package/dist/types/daemon/session/actions.d.ts +2 -1
  145. package/dist/types/daemon/session/types.d.ts +5 -2
  146. package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +9 -2
  147. package/dist/types/daemon/workspace/types.d.ts +29 -1
  148. package/dist/types/hooks/useComposerCore.d.ts +2 -0
  149. package/dist/types/hooks/useListboxKeyboard.d.ts +8 -1
  150. package/dist/types/index.d.ts +1 -0
  151. package/dist/types/local-files/managed-client-files-bridge.d.ts +87 -0
  152. package/dist/types/local-files/useManagedLocalFilesBridge.d.ts +29 -0
  153. package/dist/types/model-picker.d.ts +32 -0
  154. package/dist/types/session-catalog/session-catalog-hooks.d.ts +3 -2
  155. package/dist/types/settings.d.ts +1 -0
  156. package/dist/types/toolRevealContext.d.ts +42 -0
  157. package/dist/types/utils/composerTasks.d.ts +15 -8
  158. package/dist/types/utils/random-uuid.d.ts +6 -0
  159. package/dist/{useDaemonMidTurnInjected-B7dPEdqk.js → useDaemonMidTurnInjected-BCExZTLK.js} +5921 -5744
  160. package/dist/{vennDiagram-4TSXK5OY-DZCe1Ffi.js → vennDiagram-4TSXK5OY-Ugg_3Ng_.js} +1 -1
  161. package/dist/{vennDiagram-4TSXK5OY-Bi3e_aHN.js → vennDiagram-4TSXK5OY-lGXxi-Hh.js} +1 -1
  162. package/dist/{wardleyDiagram-VM6X3IG4-DqFJHRmt.js → wardleyDiagram-VM6X3IG4-CJ3EtuQM.js} +2 -2
  163. package/dist/{wardleyDiagram-VM6X3IG4-BNV5jzew.js → wardleyDiagram-VM6X3IG4-EJ4kWZKd.js} +2 -2
  164. package/dist/{xychartDiagram-S5SC5T6Z-J8xP-hcH.js → xychartDiagram-S5SC5T6Z-CWsXVaw1.js} +2 -2
  165. package/dist/{xychartDiagram-S5SC5T6Z-BVIJ86ch.js → xychartDiagram-S5SC5T6Z-aoVIM2Tw.js} +2 -2
  166. package/package.json +4 -2
  167. package/dist/types/components/StatusBar.d.ts +0 -26
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type DaemonClient, type DaemonSessionSummary } from '@qwen-code/sdk/daemon';
7
+ export interface SessionSearchEntry {
8
+ session: DaemonSessionSummary;
9
+ workspaceCwd?: string;
10
+ snippet?: string;
11
+ }
12
+ export interface SessionSearchOptions {
13
+ client: DaemonClient | undefined;
14
+ workspaces: readonly {
15
+ cwd: string;
16
+ trusted?: boolean;
17
+ displayName?: string;
18
+ }[];
19
+ initialSessions: readonly DaemonSessionSummary[];
20
+ primaryWorkspaceCwd?: string;
21
+ includeStandalone: boolean;
22
+ source?: string;
23
+ organizationEnabled: boolean;
24
+ qualified: boolean;
25
+ /**
26
+ * Order-insensitive catalog membership (reload token + sorted session ids).
27
+ * A change drops settled content hits for sessions deleted, archived, or
28
+ * renamed while a query is active.
29
+ */
30
+ catalogKey: string;
31
+ query: string;
32
+ }
33
+ export declare function useSessionSearch({ client, workspaces, initialSessions, primaryWorkspaceCwd, includeStandalone, source, organizationEnabled, qualified, catalogKey, query, }: SessionSearchOptions): {
34
+ entries: SessionSearchEntry[];
35
+ loading: boolean;
36
+ failed: boolean;
37
+ retry: () => void;
38
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { WebShellTheme } from '../../themeContext';
7
+ export declare const CONTROL_FRAME_PREFIX = "\0";
8
+ /** Exponential backoff bounds for automatic WebSocket reconnection. */
9
+ export declare const RECONNECT_INITIAL_MS = 500;
10
+ export declare const RECONNECT_MAX_MS = 10000;
11
+ /**
12
+ * Close codes that end the terminal instead of reconnecting. 4003 is the
13
+ * Managed relay's synthesized "worker lost" code (TerminalRelayHandler
14
+ * TERMINAL_LOST_CLOSE_CODE); the daemon's own terminal never sends it, so the
15
+ * shared local panel is unaffected. Keep the two sides in sync.
16
+ */
17
+ export declare const NON_RETRYABLE_CLOSE_CODES: Set<number>;
18
+ export declare const WS_AUTH_SUBPROTOCOL = "qwen-ws";
19
+ export declare const WS_BEARER_SUBPROTOCOL_PREFIX = "qwen-bearer.";
20
+ export declare function xtermTheme(theme: WebShellTheme): {
21
+ background: string;
22
+ foreground: string;
23
+ cursor: string;
24
+ selectionBackground: string;
25
+ } | {
26
+ background: string;
27
+ foreground: string;
28
+ cursor: string;
29
+ selectionBackground?: undefined;
30
+ };
@@ -101,7 +101,7 @@ export declare function useAgentChatEntry({ enabled, cwd, baseUrl, token, client
101
101
  t: ReturnType<typeof useI18n>['t'];
102
102
  }): {
103
103
  providers: WebShellAtProvider[];
104
- submit: (text: string, images?: import("../../adapters/promptTypes").PromptImage[], files?: import("../../adapters/promptTypes").PromptFile[], commitAccepted?: import("../../hooks/useComposerCore").ComposerSubmitCommit, metadata?: import("../../hooks/useComposerCore").ComposerSubmitMetadata) => boolean | void;
104
+ submit: (text: string, images?: import("../../adapters/promptTypes.js").PromptImage[], files?: import("../../adapters/promptTypes.js").PromptFile[], commitAccepted?: import("../../hooks/useComposerCore.js").ComposerSubmitCommit, metadata?: import("../../hooks/useComposerCore.js").ComposerSubmitMetadata) => boolean | void;
105
105
  pending: boolean;
106
106
  pendingMentions: PendingAgentMention[];
107
107
  };
@@ -10,6 +10,7 @@
10
10
  export declare const SESSION_LIST_PAGE_SIZE = 1000;
11
11
  export declare const SESSION_ARCHIVE_BATCH_SIZE = 100;
12
12
  export declare const SIDEBAR_SESSION_PREVIEW_LIMIT = 5;
13
+ export declare const SIDEBAR_SESSION_EXPAND_STEP = 10;
13
14
  export declare const SESSION_ORGANIZATION_FEATURE = "session_organization";
14
15
  export declare const SESSION_LIVE_STATE_FEATURE = "workspace_session_live_state";
15
16
  export declare const SESSION_TRANSCRIPT_PAGINATION_FEATURE = "session_transcript_pagination";
@@ -10,6 +10,7 @@ import type { ACPToolCall } from './adapters/types';
10
10
  import type { WelcomeHeaderProps } from './components/WelcomeHeader';
11
11
  import type { WebShellTheme } from './themeContext';
12
12
  import type { ComposerPlaceholderState } from './utils/composerInputState';
13
+ import type { WebShellModelPickerOptions } from './model-picker';
13
14
  export type MarkdownContentSource = 'assistant' | 'thinking';
14
15
  /** Select an existing directory on the connected daemon, or cancel with undefined. */
15
16
  export type WebShellWorkspaceDirectoryPicker = (opts?: {
@@ -519,6 +520,7 @@ export type FooterRenderer = ComponentType<WebShellFooterRenderInfo>;
519
520
  */
520
521
  export type LoadingPhrasesResolver = (language: string) => readonly string[] | undefined | null;
521
522
  export interface WebShellCustomization {
523
+ modelPicker?: WebShellModelPickerOptions;
522
524
  onRefreshModels?: Parameters<DaemonSessionActions['refreshModels']>[0];
523
525
  allowedApprovalModes?: readonly WebShellApprovalMode[];
524
526
  filterArtifact?: ArtifactFilter;
@@ -65,6 +65,7 @@ export interface CreateDaemonSessionActionsArgs {
65
65
  getDefaultSessionContext: () => DaemonProductSessionContext | undefined;
66
66
  getClient?: () => DaemonClient | undefined;
67
67
  getConnection: () => DaemonConnectionState;
68
+ getPromptStatus: () => DaemonPromptStatus;
68
69
  getEventDetailMode: () => 'full' | 'summary';
69
70
  hasSessionActivePrompt: () => boolean;
70
71
  resetCurrentSessionActivePrompt: () => void;
@@ -91,7 +92,7 @@ export interface CreateDaemonSessionActionsArgs {
91
92
  export declare function getWorkspaceModelsAfterSessionClear(current: DaemonConnectionState): DaemonConnectionState['models'];
92
93
  export declare function getConnectionAfterSessionClear(current: DaemonConnectionState, clearedSessionId: string | undefined, preserveWorkspaceMetadata?: boolean, dropSessionContext?: boolean): DaemonConnectionState;
93
94
  export declare function advanceSessionRecoveryGeneration(generations: WeakMap<DaemonSessionClient, number>, session: DaemonSessionClient): number;
94
- export declare function createDaemonSessionActions({ store, sessionRef, activePromptsRef, settledPromptsRef, pendingSessionLoadRef, pendingSessionLoadIdRef, sessionConfigGeneration, sessionRecoveryGeneration, heartbeatSupportedRef, manualSessionClearRef, skipNextCleanupDetachSessionRef, passiveAssistantDoneTimerRef, daemonActivePromptRef, settleRestoredActivePrompt, flushTranscript, getCreateSessionRequest, createDetachedSession, createDetachedStandaloneSession, getDefaultSessionContext, getClient, getConnection, getEventDetailMode, hasSessionActivePrompt, resetCurrentSessionActivePrompt, restartEventStream, addNotice, setConnection, setPromptStatus, setRestoreSessionId, setRestoreSessionContext, setRestoreMode, setRestoreSessionNonce, setAttachSessionNonce, setNewSessionNonce, clearLiveJournalRepair, onGeneratedUiInvalidated, onPromptAdmitted, onContinuationAdmitted, onPromptRemoved, }: CreateDaemonSessionActionsArgs): DaemonSessionActions;
95
+ export declare function createDaemonSessionActions({ store, sessionRef, activePromptsRef, settledPromptsRef, pendingSessionLoadRef, pendingSessionLoadIdRef, sessionConfigGeneration, sessionRecoveryGeneration, heartbeatSupportedRef, manualSessionClearRef, skipNextCleanupDetachSessionRef, passiveAssistantDoneTimerRef, daemonActivePromptRef, settleRestoredActivePrompt, flushTranscript, getCreateSessionRequest, createDetachedSession, createDetachedStandaloneSession, getDefaultSessionContext, getClient, getConnection, getPromptStatus, getEventDetailMode, hasSessionActivePrompt, resetCurrentSessionActivePrompt, restartEventStream, addNotice, setConnection, setPromptStatus, setRestoreSessionId, setRestoreSessionContext, setRestoreMode, setRestoreSessionNonce, setAttachSessionNonce, setNewSessionNonce, clearLiveJournalRepair, onGeneratedUiInvalidated, onPromptAdmitted, onContinuationAdmitted, onPromptRemoved, }: CreateDaemonSessionActionsArgs): DaemonSessionActions;
95
96
  /**
96
97
  * Key under which a shell command tracks its prompt in the active-prompt map.
97
98
  * Shell commands run as their own prompt alongside a conversation turn, so they
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { ReactNode } from 'react';
7
- import type { CreateSessionRequest, DaemonBranchSessionRequest, DaemonCapabilities, DaemonBackgroundTurn, DaemonEvent, DaemonApprovalMode, DaemonApprovalModeResult, DaemonAvailableCommand, DaemonForkSessionResult, DaemonInputAnnotation, DaemonSessionBtwResult, DaemonSessionGenerationEvent, DaemonSessionAttachmentReference, DaemonSessionAttachmentData, DaemonMidTurnMessageResult, DaemonMidTurnMessagesResult, DaemonRemoveMidTurnMessageResult, DaemonSendMidTurnMessagesNowResult, DaemonPendingPromptsResult, DaemonRemovePendingPromptResult, DaemonSessionContextStatus, DaemonSessionSavedWorkflowDetail, DaemonSessionContextUsageStatus, DaemonSessionRecapResult, DaemonRewindResult, DaemonRewindSnapshotInfo, DaemonSession, DaemonSessionClient, DaemonSessionSummary, DaemonSessionSupportedCommandsStatus, DaemonSessionTaskRuntimeStatus, DaemonSessionTaskWithWorkflowStatus, DaemonSessionTasksStatus, DaemonSessionWorkflowTaskStatus, DaemonSessionWorkflowTasksStatus, DaemonSessionStatsStatus, DaemonSessionArtifactsEnvelope, DaemonSessionArtifactInput, DaemonSessionArtifactMutationResult, SessionSourceInput, SessionSourcesResult, SessionSourceUpsertResult, SessionSourceRemoveResult, DaemonSkillToggleMutation, DaemonShellCommandResult, DaemonTranscriptBlock, DaemonTranscriptStore, DaemonWorkspaceGitStatus, DaemonWorkspaceProvidersStatus, DaemonStandaloneCreationRecovery, DaemonStandaloneWorkingDirectory, HeartbeatResult, GoalControlRequest, GoalSnapshotV2, GoalStateResponse, PermissionResponse, PromptContentBlock, PromptResult, ReasoningSelection, SessionMetadataResult, SetModelResult } from '@qwen-code/sdk/daemon';
7
+ import type { CreateSessionRequest, DaemonBranchSessionRequest, DaemonCapabilities, DaemonBackgroundTurn, DaemonEvent, DaemonApprovalMode, DaemonApprovalModeResult, DaemonAvailableCommand, DaemonForkSessionResult, DaemonInputAnnotation, DaemonSessionBtwResult, DaemonSessionGenerationEvent, DaemonSessionAttachmentReference, DaemonSessionAttachmentData, DaemonMidTurnMessageResult, DaemonMidTurnMessagesResult, DaemonRemoveMidTurnMessageResult, DaemonSendMidTurnMessagesNowResult, DaemonPendingPromptsResult, DaemonRemovePendingPromptResult, DaemonSessionContextStatus, DaemonSessionSavedWorkflowDetail, DaemonSessionContextUsageStatus, DaemonSessionRecapResult, DaemonRewindResult, DaemonRewindSnapshotInfo, DaemonSession, DaemonSessionClient, DaemonSessionPrInfo, DaemonSessionSummary, DaemonSessionSupportedCommandsStatus, DaemonSessionTaskRuntimeStatus, DaemonSessionTaskWithWorkflowStatus, DaemonSessionTasksStatus, DaemonSessionWorkflowTaskStatus, DaemonSessionWorkflowTasksStatus, DaemonSessionStatsStatus, DaemonSessionArtifactsEnvelope, DaemonSessionArtifactInput, DaemonSessionArtifactMutationResult, SessionSourceInput, SessionSourcesResult, SessionSourceUpsertResult, SessionSourceRemoveResult, DaemonSkillToggleMutation, DaemonShellCommandResult, DaemonTranscriptBlock, DaemonTranscriptStore, DaemonWorkspaceGitStatus, DaemonWorkspaceProvidersStatus, DaemonStandaloneCreationRecovery, DaemonStandaloneWorkingDirectory, HeartbeatResult, GoalControlRequest, GoalSnapshotV2, GoalStateResponse, PermissionResponse, PromptContentBlock, PromptResult, ReasoningSelection, SessionMetadataResult, SetModelResult } from '@qwen-code/sdk/daemon';
8
8
  export type DaemonConnectionStatus = 'idle' | 'connecting' | 'connected' | 'disconnected' | 'error';
9
9
  export interface DaemonSessionOwnerSnapshot {
10
10
  isCurrent(): boolean;
@@ -239,7 +239,7 @@ export type DaemonPromptSettledListener = (event: DaemonPromptSettledEvent) => v
239
239
  export type DaemonPromptSettlementSubscribe = (listener: DaemonPromptSettledListener) => () => void;
240
240
  export type DaemonNoticeSeverity = 'info' | 'warning' | 'error';
241
241
  export type DaemonNoticeCategory = 'validation' | 'user_action' | 'connection' | 'protocol' | 'lifecycle' | 'system';
242
- export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_workflow_mode' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
242
+ export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_workflow_mode' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'bind_session_pr' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
243
243
  export interface DaemonSessionNotice {
244
244
  id: string;
245
245
  severity: DaemonNoticeSeverity;
@@ -514,6 +514,8 @@ export interface DaemonSessionActions {
514
514
  silent?: boolean;
515
515
  }): Promise<DaemonSessionContextUsageStatus>;
516
516
  renameSession(displayName: string): Promise<SessionMetadataResult>;
517
+ /** Manually bind a GitHub PR to the current session (supplementary registration). */
518
+ bindSessionPr(pr: Omit<DaemonSessionPrInfo, 'issues'>): Promise<SessionMetadataResult>;
517
519
  recapSession(): Promise<DaemonSessionRecapResult>;
518
520
  generateSessionContent(prompt: string, opts?: {
519
521
  signal?: AbortSignal;
@@ -696,5 +698,6 @@ export interface PendingSessionLoad {
696
698
  reject: (error: unknown) => void;
697
699
  signal?: AbortSignal;
698
700
  replaySource?: 'configured' | 'memory';
701
+ reconcilePromptActivity?: boolean;
699
702
  }
700
703
  export {};
@@ -4,12 +4,19 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { DaemonChannelStartupRequest, DaemonChannelUpsertRequest, DaemonRevisionRequest } from '@qwen-code/sdk/daemon';
7
- import type { DaemonChannelPairingActions, DaemonChannelQrLoginActions, DaemonChannelsResource, DaemonResourceOptions } from '../types.js';
7
+ import type { DaemonChannelPairingActions, DaemonChannelQrLoginHandlers, DaemonChannelsResource, DaemonResourceOptions } from '../types.js';
8
8
  interface WorkspaceChannelsResource extends DaemonChannelsResource {
9
9
  workspaceCwd: string;
10
10
  }
11
11
  interface DaemonChannelsOptions extends DaemonResourceOptions {
12
12
  workspaceCwd?: string;
13
+ /**
14
+ * This tab's daemon-registered client id. QR-login routes use it to attribute
15
+ * a login to the tab that created it, so a peer tab neither reattaches nor
16
+ * cancels it. Omitted when no session is attached, which keeps the previous
17
+ * id-less behaviour rather than sending an id the daemon would reject.
18
+ */
19
+ clientId?: string;
13
20
  }
14
21
  export declare function useDaemonChannels(options?: DaemonChannelsOptions): {
15
22
  data: {
@@ -29,6 +36,6 @@ export declare function useDaemonChannels(options?: DaemonChannelsOptions): {
29
36
  stop: (name: string) => Promise<import("@qwen-code/sdk/daemon").DaemonChannelMutationResult>;
30
37
  restart: (name: string) => Promise<import("@qwen-code/sdk/daemon").DaemonChannelMutationResult>;
31
38
  pairing: DaemonChannelPairingActions;
32
- qrLogin: DaemonChannelQrLoginActions;
39
+ qrLogin: DaemonChannelQrLoginHandlers;
33
40
  };
34
41
  export {};
@@ -130,9 +130,33 @@ export interface DaemonChannelObservedContacts {
130
130
  }>;
131
131
  }
132
132
  export interface DaemonChannelQrLoginActions {
133
+ /**
134
+ * `clientId` attributes the login to this browser tab. Without it the daemon
135
+ * treats every id-less caller as the same client, so it reattaches a peer's
136
+ * login and lets any of them cancel it.
137
+ */
138
+ start(name: string, clientId?: string): Promise<DaemonChannelQrLoginStartResult>;
139
+ state(loginId: string, clientId?: string): Promise<DaemonChannelQrLoginView>;
140
+ cancel(loginId: string, clientId?: string): Promise<DaemonChannelQrLoginView>;
141
+ /**
142
+ * Release a login while the page is going away. Sent with `keepalive` so the
143
+ * request outlives the document: a reload or tab close runs no React cleanup,
144
+ * so `cancel` alone never fires for the abandonment path operators use most.
145
+ * Best-effort — the session still expires if the request is lost.
146
+ */
147
+ release(loginId: string, clientId?: string, workspaceCwd?: string): Promise<void>;
148
+ }
149
+ /**
150
+ * What the channels hook hands its consumers: the identity is the tab's own, so
151
+ * a caller cannot supply one per call. Advertising the wider contract here
152
+ * would promise an attribution the hook does not honour — and with no tab id
153
+ * attached, honouring a caller's would attribute the login to a peer tab.
154
+ */
155
+ export interface DaemonChannelQrLoginHandlers {
133
156
  start(name: string): Promise<DaemonChannelQrLoginStartResult>;
134
157
  state(loginId: string): Promise<DaemonChannelQrLoginView>;
135
158
  cancel(loginId: string): Promise<DaemonChannelQrLoginView>;
159
+ release(loginId: string): Promise<void>;
136
160
  }
137
161
  export interface DaemonChannelPairingActions {
138
162
  list(name: string): Promise<DaemonChannelPairingRequestsSnapshot>;
@@ -286,6 +310,10 @@ export interface DaemonGoal {
286
310
  hasActivePrompt: boolean;
287
311
  /** Canonical lifecycle state; UI controls must use its goalId/revision. */
288
312
  snapshot: GoalSnapshotV2;
313
+ /** The owning workspace's cwd, tagged client-side by the Goals page (in
314
+ * every listing branch) so opening a goal's session restores it in that
315
+ * workspace's context. Absent when the daemon advertises no workspaces. */
316
+ workspaceCwd?: string;
289
317
  }
290
318
  /** The `GET /goals` payload. */
291
319
  export interface DaemonGoalList {
@@ -511,7 +539,7 @@ export interface DaemonWorkspaceActions extends Pick<DaemonClient, 'getSubscript
511
539
  /** The provider workspace's Channel event journal, newest last. A scoped
512
540
  * workspace reads its own through its client. */
513
541
  listChannelEvents(query?: DaemonChannelEventsQuery): Promise<DaemonChannelEventList>;
514
- listGoals(): Promise<DaemonGoalList>;
542
+ listGoals(workspaceId?: string): Promise<DaemonGoalList>;
515
543
  controlGoal(sessionId: string, request: GoalControlRequest): Promise<GoalStateResponse>;
516
544
  /** Drop a session's goal hook. No-op when that session has no active goal. */
517
545
  clearGoal(sessionId: string): Promise<{
@@ -68,6 +68,8 @@ export interface UseComposerCoreOptions {
68
68
  cycleModeOnTab?: boolean;
69
69
  onToggleShortcuts?: () => void;
70
70
  disabled?: boolean;
71
+ /** Keep the editor editable while rejecting every submit path. */
72
+ submitDisabled?: boolean;
71
73
  /**
72
74
  * Whether the composer may react to FILE drags at all (drag highlight and
73
75
  * drop ingestion on the inline image/text lane). `false` leaves paste
@@ -1,3 +1,4 @@
1
+ import type { RefObject } from 'react';
1
2
  export interface ListboxKeyboardOptions {
2
3
  /** Number of selectable items in the list. */
3
4
  itemCount: number;
@@ -9,6 +10,12 @@ export interface ListboxKeyboardOptions {
9
10
  onConfirm: (index: number) => void;
10
11
  /** Disable the listener without unmounting the host component. */
11
12
  enabled?: boolean;
13
+ /**
14
+ * Optional element that must contain the focused element for keys to act.
15
+ * Dialogs that are not `DialogShell`s have no stack identity, so they use
16
+ * this to stay inert while another dialog is stacked above them.
17
+ */
18
+ scope?: RefObject<HTMLElement | null>;
12
19
  }
13
20
  export interface ListboxKeyboardResult {
14
21
  /**
@@ -39,4 +46,4 @@ export interface ListboxKeyboardResult {
39
46
  * Escape is intentionally NOT handled here — {@link DialogShell} owns dialog
40
47
  * dismissal.
41
48
  */
42
- export declare function useListboxKeyboard({ itemCount, activeIndex, onActiveIndexChange, onConfirm, enabled, }: ListboxKeyboardOptions): ListboxKeyboardResult;
49
+ export declare function useListboxKeyboard({ itemCount, activeIndex, onActiveIndexChange, onConfirm, enabled, scope, }: ListboxKeyboardOptions): ListboxKeyboardResult;
@@ -85,6 +85,7 @@ export type { DatasetCell, EchartsFullDataBlockProps, EchartsFullDataOption, Ech
85
85
  export { WEB_SHELL_SETTING_ITEM_IDS } from './settings';
86
86
  export type { WebShellSettingItemId, WebShellSettingsOptions, } from './settings';
87
87
  export type { WebShellModelManagementOptions } from './modelManagement';
88
+ export type { WebShellModelPickerContext, WebShellModelPickerItemContext, WebShellModelPickerMount, WebShellModelPickerOptions, } from './model-picker';
88
89
  export type { WebShellUnavailableModel, WebShellUnavailableModelTooltipHandle, WebShellUnavailableModelTooltipInfo, WebShellUnavailableModelTooltipMount, } from './unavailableModels';
89
90
  export type { WebShellMessageNavigationRequest, WebShellMessageNavigationResult, } from './hooks/useMessageNavigation';
90
91
  export { highlightCode } from './components/messages/codeHighlighter';
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The Managed-mode transport for the client filesystem bridge.
3
+ *
4
+ * Unlike the daemon bridge (one `/acp` WebSocket carrying `mcp_*` frames), the
5
+ * Managed control plane has no WebSocket: the browser registers over HTTP,
6
+ * drains JSON-RPC requests from an SSE downlink, and posts responses back. The
7
+ * directory grant and the MCP server itself are unchanged — this file only
8
+ * swaps the transport beneath {@link LocalFilesRpcServer}.
9
+ *
10
+ * Framework-free (no React, injected `fetch`) so the whole exchange runs in a
11
+ * node test against a scripted control-plane peer.
12
+ */
13
+ import type { LocalFilesRpcServer } from './bridge-client.js';
14
+ export type { LocalFilesRpcServer };
15
+ export type ManagedFetch = (url: string, init?: {
16
+ method?: string;
17
+ headers?: Record<string, string>;
18
+ body?: string;
19
+ signal?: AbortSignal;
20
+ }) => Promise<{
21
+ ok: boolean;
22
+ status: number;
23
+ json(): Promise<unknown>;
24
+ body: ReadableStream<Uint8Array> | null;
25
+ }>;
26
+ export interface ManagedClientFilesOptions {
27
+ /** The Managed WebShell API base, e.g. `/api/agent/web-shell/v1`. */
28
+ baseUrl: string;
29
+ sessionId: string;
30
+ server: LocalFilesRpcServer;
31
+ fetch: ManagedFetch;
32
+ }
33
+ export type ManagedClientFilesState = {
34
+ phase: 'idle';
35
+ } | {
36
+ phase: 'connecting';
37
+ } | {
38
+ phase: 'connected';
39
+ generation: number;
40
+ toolCount: number;
41
+ } | {
42
+ phase: 'stopped';
43
+ } | {
44
+ phase: 'failed';
45
+ code: string;
46
+ message: string;
47
+ };
48
+ /**
49
+ * Drains one SSE downlink and answers each request through the MCP server.
50
+ * Registration is a single HTTP call; the relay is always present while the
51
+ * binding is active, so there is no daemon-style re-warm retry loop.
52
+ */
53
+ export declare class ManagedClientFilesBridge {
54
+ private readonly options;
55
+ private abort?;
56
+ private running;
57
+ private connectionId?;
58
+ private state;
59
+ private readonly listeners;
60
+ constructor(options: ManagedClientFilesOptions);
61
+ getState(): ManagedClientFilesState;
62
+ onState(listener: (state: ManagedClientFilesState) => void): () => void;
63
+ private setState;
64
+ private headers;
65
+ private url;
66
+ /** Registers the directory grant and opens the SSE downlink. */
67
+ connect(): Promise<void>;
68
+ /**
69
+ * Polls status until the binding carrying this registration's connection
70
+ * identity is active. Matching the identity (not just a newer generation)
71
+ * guarantees the drain serves this tab's registration, never a concurrent
72
+ * tab's. The stream route refuses an unknown binding, so the drain cannot
73
+ * start earlier.
74
+ */
75
+ private waitForBinding;
76
+ /** Whether the binding still carries this registration's identity. */
77
+ private ownsConnection;
78
+ /** Stops the downlink and unregisters the binding (best-effort). Idempotent:
79
+ * once the owned identity is cleared, a second call sends nothing, so it can
80
+ * never issue an identity-less teardown that closes another registration. */
81
+ disconnect(): Promise<void>;
82
+ /** Best-effort unregister carrying the owned identity; the server fences a
83
+ * stale identity to a no-op, so this never closes another tab's binding. */
84
+ private unregisterOwned;
85
+ private drain;
86
+ private answer;
87
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * React wiring for the Managed-mode client filesystem bridge.
3
+ *
4
+ * The Managed control plane has no WebSocket and no ACP child to re-warm, so
5
+ * this hook is deliberately simpler than the daemon's `useLocalFilesBridge`:
6
+ * it reuses the same directory grant acquisition ({@link pickDirectoryHandle},
7
+ * {@link createDirectoryHandleStore}) and the same {@link LocalFilesMcpServer},
8
+ * but drives {@link ManagedClientFilesBridge} (HTTP register + SSE downlink +
9
+ * POST responses) instead of the daemon WebSocket state machine.
10
+ *
11
+ * The grant is gesture-bound: a stored handle is restored silently when the
12
+ * browser still allows it, otherwise `connect()` must run inside a real click.
13
+ */
14
+ import { type ManagedFetch } from './managed-client-files-bridge.js';
15
+ import type { LocalFilesStatus } from './useLocalFilesBridge.js';
16
+ export interface UseManagedLocalFilesBridgeOptions {
17
+ sessionId: string | undefined;
18
+ /** The Managed WebShell API base, e.g. `/api/agent/web-shell/v1`. */
19
+ baseUrl: string;
20
+ fetch: ManagedFetch;
21
+ /** Injected for tests; defaults to the live window. */
22
+ win?: Window;
23
+ idb?: IDBFactory;
24
+ }
25
+ export declare function useManagedLocalFilesBridge(options: UseManagedLocalFilesBridgeOptions): {
26
+ status: LocalFilesStatus;
27
+ connect: () => Promise<void>;
28
+ disconnect: () => Promise<void>;
29
+ };
@@ -0,0 +1,32 @@
1
+ import type { WebShellLanguage } from './i18n';
2
+ import type { WebShellTheme } from './themeContext';
3
+ export interface WebShellModelPickerContext {
4
+ readonly composerId: string;
5
+ readonly sessionId?: string;
6
+ readonly workspaceId?: string;
7
+ readonly workspaceCwd?: string;
8
+ readonly daemonBaseUrl?: string;
9
+ readonly currentModelId?: string;
10
+ readonly language: WebShellLanguage;
11
+ readonly theme: WebShellTheme;
12
+ readonly overlayContainer: HTMLElement;
13
+ }
14
+ export interface WebShellModelPickerItemContext extends WebShellModelPickerContext {
15
+ readonly model: {
16
+ readonly id: string;
17
+ readonly label: string;
18
+ readonly disabled: boolean;
19
+ readonly tooltip?: string;
20
+ };
21
+ readonly isSelected: boolean;
22
+ readonly rowElement: HTMLElement;
23
+ }
24
+ /** Keep mount functions stable; create an independent view for each call. */
25
+ export type WebShellModelPickerMount<TContext> = (container: HTMLElement, context: TContext) => {
26
+ update(context: TContext): void;
27
+ dispose(): void;
28
+ } | null | undefined;
29
+ export interface WebShellModelPickerOptions {
30
+ readonly mountHeader?: WebShellModelPickerMount<WebShellModelPickerContext>;
31
+ readonly displayContentByModelId?: Readonly<Partial<Record<string, WebShellModelPickerMount<WebShellModelPickerItemContext>>>>;
32
+ }
@@ -58,8 +58,9 @@ export declare function useSessionActivePromptState(client: DaemonClient, worksp
58
58
  * Every view that owns a provider needs its own bridge: a split pane and a
59
59
  * side task each mount one (via ChatPane), and each is an observer of a turn
60
60
  * it did not submit — the case where the event stream alone cannot tell a long
61
- * silent tool call from a finished turn (#9487). Publishing `undefined` while
62
- * the answer is unknown leaves that provider's pre-existing heuristics alone.
61
+ * silent tool call from a finished turn (#9487). Before authority is available,
62
+ * `undefined` leaves the existing heuristics alone; losing known activity
63
+ * reconciles the provider against a fresh session snapshot.
63
64
  *
64
65
  * Returns both live facts for callers that need them; the boolean wrapper
65
66
  * below preserves the existing prompt-only API.
@@ -64,6 +64,7 @@ declare const SETTING_KEYS: {
64
64
  readonly 'setting:artifacts': "experimental.artifact";
65
65
  readonly 'setting:tool-use-summaries': "experimental.emitToolUseSummaries";
66
66
  readonly 'setting:unified-agent-loop': "experimental.unifiedAgentLoop";
67
+ readonly 'setting:event-bus-agent-loop': "experimental.eventBusAgentLoop";
67
68
  readonly 'setting:voice-model': "voiceModel";
68
69
  readonly 'setting:image-model': "imageModel";
69
70
  };
@@ -0,0 +1,42 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * A one-shot "open this tool call" request, keyed by tool call id.
4
+ *
5
+ * The transcript is virtualized, so the tool group a caller wants to open may
6
+ * not be mounted when the request is made: it mounts once the list scrolls to
7
+ * it. The request therefore waits in this store until the group holding the
8
+ * call consumes it, instead of being delivered to a DOM node that does not
9
+ * exist yet.
10
+ */
11
+ export interface ToolRevealStore {
12
+ /** Ask the row for `callId` to expand. Replaces any earlier request. */
13
+ request(callId: string): void;
14
+ /** Drop a request that can no longer be served (e.g. the scroll failed). */
15
+ cancel(callId: string): void;
16
+ /**
17
+ * The pending call id when `matches` accepts it; undefined otherwise. A
18
+ * request keeps being served for a short grace period after the first
19
+ * match, then clears.
20
+ */
21
+ consume(matches: (callId: string) => boolean): string | undefined;
22
+ subscribe(listener: () => void): () => void;
23
+ getVersion(): number;
24
+ }
25
+ /**
26
+ * How long a served request keeps being served. Scrolling to a row can
27
+ * unmount and remount it right after it first mounts (the virtualized list
28
+ * re-measures), and the fresh instance must open too. A remount after this
29
+ * is the user scrolling back, which keeps the row's own state.
30
+ */
31
+ export declare const REVEAL_REMOUNT_GRACE_MS = 1000;
32
+ export declare function createToolRevealStore(now?: () => number): ToolRevealStore;
33
+ export declare function ToolRevealProvider({ store, children, }: {
34
+ store: ToolRevealStore;
35
+ children: ReactNode;
36
+ }): import("react/jsx-runtime").JSX.Element;
37
+ /**
38
+ * Calls `onReveal` with the requested call id when a reveal request names a
39
+ * call `matches` accepts — right away when the consumer is already mounted,
40
+ * or on mount when the request arrived first.
41
+ */
42
+ export declare function useToolRevealRequest(matches: (callId: string) => boolean, onReveal: (callId: string) => void): void;
@@ -1,23 +1,30 @@
1
1
  import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
2
2
  /**
3
3
  * Tasks that belong to THIS session's live background state — what the
4
- * status-bar pill counts and the environment panel lists.
4
+ * composer chip row draws from and the environment panel lists.
5
5
  *
6
6
  * Agent tasks have their own surfaces, and retained workflow runs are
7
7
  * history: `getWorkflowTasks()` merges the project's saved snapshots into
8
8
  * the same list, so without the `isHistorical` exclusion a project with
9
- * saved runs shows "30 tasks done" in the pill the first time polling runs,
10
- * for the rest of the session, with no way to clear it. Consumers that
9
+ * saved runs would list every one of them as this session's work. Consumers that
11
10
  * genuinely want the history (the workflow details provider, the tasks
12
11
  * dialog) read the unfiltered list instead.
13
12
  */
14
13
  export declare function isComposerTask(task: DaemonSessionTaskWithWorkflowStatus): task is Exclude<DaemonSessionTaskWithWorkflowStatus, {
15
14
  kind: 'agent';
16
15
  }>;
16
+ /** The kinds the composer chip row groups live tasks under, in display order. */
17
+ export type ComposerTaskChipKind = 'workflow' | 'agent' | 'shell' | 'monitor';
18
+ export interface ComposerTaskChipGroup {
19
+ kind: ComposerTaskChipKind;
20
+ tasks: DaemonSessionTaskWithWorkflowStatus[];
21
+ }
17
22
  /**
18
- * Whether the snapshot carries a background agent that is still executing.
19
- * Paused agents are parked, not active: they stay visible in the environment
20
- * panel's subagents section, so they must not re-open the footer pill in the
21
- * shipped entry (which would pin a stale count to parked work).
23
+ * Group this session's unfinished background tasks for the chip row above
24
+ * the composer. Finished tasks are left out on purpose: once a run settles
25
+ * its chip disappears, and the run stays reachable from the transcript, the
26
+ * environment panel and the tasks dialog.
22
27
  */
23
- export declare function hasActiveBackgroundAgent(tasks: readonly DaemonSessionTaskWithWorkflowStatus[]): boolean;
28
+ export declare function getComposerTaskChipGroups(tasks: readonly DaemonSessionTaskWithWorkflowStatus[], options: {
29
+ includeAgents: boolean;
30
+ }): ComposerTaskChipGroup[];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare function randomUUID(): string;