@qwen-code/web-shell 0.24.7 → 0.25.0-nightly.20261009.085a44f336

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 (94) hide show
  1. package/README.md +65 -2
  2. package/dist/agents-route-D7hp7io8.js +1546 -0
  3. package/dist/daemon-react-sdk.js +1 -1
  4. package/dist/index-BEPcxy4Z.js +125142 -0
  5. package/dist/index.js +69 -120254
  6. package/dist/sw.js +1 -1
  7. package/dist/{toolNames-B0O1UjKB.js → toolNames-D4oueGGC.js} +5956 -5252
  8. package/dist/transcript.js +10276 -9739
  9. package/dist/types/App.d.ts +2 -2
  10. package/dist/types/ManagedAgentWebShell.d.ts +1 -0
  11. package/dist/types/adapters/messageTypes.d.ts +23 -1
  12. package/dist/types/adapters/transcriptAdapter.d.ts +1 -0
  13. package/dist/types/components/ChatContextHeader.d.ts +3 -1
  14. package/dist/types/components/ChatEditor.d.ts +1 -0
  15. package/dist/types/components/DesktopRelayControl.d.ts +2 -1
  16. package/dist/types/components/LocalFilesControl.d.ts +3 -1
  17. package/dist/types/components/MessageItem.d.ts +1 -0
  18. package/dist/types/components/MessageList.d.ts +1 -0
  19. package/dist/types/components/agents/AgentCreatePage.d.ts +35 -1
  20. package/dist/types/components/agents/AgentsManagerPage.d.ts +5 -1
  21. package/dist/types/components/artifacts/TrajectoryFilters.d.ts +15 -0
  22. package/dist/types/components/artifacts/TrajectoryInspector.d.ts +5 -1
  23. package/dist/types/components/artifacts/TrajectoryOverview.d.ts +3 -1
  24. package/dist/types/components/artifacts/TrajectoryWaterfallCell.d.ts +15 -0
  25. package/dist/types/components/artifacts/artifactUtils.d.ts +9 -0
  26. package/dist/types/components/channels/ChannelsManagerPage.d.ts +1 -1
  27. package/dist/types/components/extensions/extensions-manager-logic.d.ts +3 -3
  28. package/dist/types/components/managed/ManagedToolResultPanel.d.ts +9 -0
  29. package/dist/types/components/managed/ManagedToolResultSummary.d.ts +5 -0
  30. package/dist/types/components/managed/generated/managed-agent-api.d.ts +915 -18
  31. package/dist/types/components/managed/java-managed-agent-client.d.ts +29 -1
  32. package/dist/types/components/managed/java-managed-agent-provider.d.ts +4 -0
  33. package/dist/types/components/managed/managed-agent-provider.d.ts +43 -1
  34. package/dist/types/components/managed/managed-agent-sse.test-fixtures.d.ts +8 -0
  35. package/dist/types/components/managed/managed-approval.d.ts +10 -0
  36. package/dist/types/components/managed/managed-artifact-download.d.ts +2 -0
  37. package/dist/types/components/managed/managed-request-error.d.ts +14 -0
  38. package/dist/types/components/managed/managed-tool-result-types.d.ts +24 -0
  39. package/dist/types/components/managed/managed-tool-result.test-fixtures.d.ts +6 -0
  40. package/dist/types/components/managed/use-managed-actions.d.ts +34 -0
  41. package/dist/types/components/messages/AssistantMessage.d.ts +6 -1
  42. package/dist/types/components/messages/AuthorAvatar.d.ts +16 -0
  43. package/dist/types/components/messages/ContextUsageMessage.d.ts +5 -1
  44. package/dist/types/components/messages/StatsMessage.d.ts +6 -1
  45. package/dist/types/components/messages/ToolApproval.d.ts +9 -1
  46. package/dist/types/components/messages/ToolGroup.d.ts +2 -0
  47. package/dist/types/components/messages/UserMessage.d.ts +3 -1
  48. package/dist/types/components/messages/agent-message-details.d.ts +36 -0
  49. package/dist/types/components/messages/squad-tag.d.ts +16 -0
  50. package/dist/types/components/sidebar/UpdateControl.d.ts +3 -1
  51. package/dist/types/components/sidebar/WebShellSidebar.d.ts +16 -5
  52. package/dist/types/components/sidebar/WorkspaceSection.d.ts +2 -1
  53. package/dist/types/components/sidebar/sessionSearch.d.ts +2 -1
  54. package/dist/types/components/workspace-agents/ThreadsPage.d.ts +122 -0
  55. package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +76 -0
  56. package/dist/types/components/workspace-agents/agent-events.d.ts +20 -0
  57. package/dist/types/components/workspace-agents/agents-route.d.ts +19 -0
  58. package/dist/types/components/workspace-agents/agents-view-logic.d.ts +31 -0
  59. package/dist/types/components/workspace-agents/lazy-agents-route.d.ts +7 -0
  60. package/dist/types/components/workspace-agents/messages.d.ts +16 -0
  61. package/dist/types/components/workspace-agents/messages.transcript-stub.d.ts +12 -0
  62. package/dist/types/components/workspace-agents/session-agent-live-runs.d.ts +96 -0
  63. package/dist/types/components/workspace-agents/session-agents-api.d.ts +39 -0
  64. package/dist/types/components/workspace-agents/share-agent-dialog.d.ts +33 -0
  65. package/dist/types/components/workspace-agents/squads-section.d.ts +28 -0
  66. package/dist/types/components/workspace-agents/threads-api.d.ts +52 -0
  67. package/dist/types/components/workspace-agents/use-session-agent-runs.d.ts +66 -0
  68. package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +100 -0
  69. package/dist/types/components/workspaces/WorkspaceHostProjects.d.ts +11 -0
  70. package/dist/types/components/workspaces/WorkspaceLocation.d.ts +7 -0
  71. package/dist/types/config/workspace-hosts.d.ts +11 -0
  72. package/dist/types/customization.d.ts +10 -0
  73. package/dist/types/daemon/session/types.d.ts +19 -3
  74. package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +4 -0
  75. package/dist/types/daemon/workspace/types.d.ts +6 -2
  76. package/dist/types/index.d.ts +2 -1
  77. package/dist/types/live/LiveVoiceButton.d.ts +2 -1
  78. package/dist/types/navigation.d.ts +1 -0
  79. package/dist/types/settings.d.ts +1 -0
  80. package/dist/types/trajectory/buildTrajectoryLayout.d.ts +27 -0
  81. package/dist/types/trajectory/filter-messages.d.ts +9 -0
  82. package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +7 -0
  83. package/dist/types/trajectory/filterTrajectory.d.ts +22 -0
  84. package/dist/types/trajectory/types.d.ts +3 -1
  85. package/dist/types/trajectory/useTimelineViewport.d.ts +19 -0
  86. package/dist/types/trajectory/useTrajectoryWindow.d.ts +21 -36
  87. package/dist/types/trajectory/window-messages.d.ts +9 -0
  88. package/dist/types/trajectory/window-messages.transcript-stub.d.ts +7 -0
  89. package/dist/types/utils/cancelledTurn.d.ts +17 -0
  90. package/dist/types/utils/composerTag.d.ts +6 -1
  91. package/dist/types/utils/modelEncoding.d.ts +6 -0
  92. package/dist/types/utils/navigationUrl.d.ts +1 -1
  93. package/dist/types/utils/workspace.d.ts +1 -0
  94. package/package.json +2 -1
@@ -1,4 +1,5 @@
1
1
  import type { components } from './generated/managed-agent-api';
2
+ import type { ManagedArtifact } from './managed-tool-result-types';
2
3
  type Schemas = components['schemas'];
3
4
  export type JavaAgentDate = number | string;
4
5
  export type JavaAgentTurn = Schemas['WebShellTurn'];
@@ -17,11 +18,14 @@ export type JavaAgentSessionPage = Omit<Schemas['WebShellSessionPage'], 'data'>
17
18
  };
18
19
  export type JavaAgentEvent = Schemas['WebShellEvent'];
19
20
  export type JavaAgentResyncRequired = Schemas['WebShellResyncRequired'];
21
+ export declare const SKIP_ON_CORRUPT: ReadonlySet<string>;
20
22
  export declare function isJavaAgentResyncRequired(frame: JavaAgentEvent | JavaAgentResyncRequired): frame is JavaAgentResyncRequired;
21
23
  export type JavaAgentContentPart = Schemas['WebShellContentPart'];
22
24
  export type JavaAgentItem = Schemas['WebShellItem'];
23
25
  export type JavaAgentCommandAdmission = Schemas['WebShellAdmission'];
24
26
  export type JavaAgentTranscript = Schemas['WebShellTranscript'];
27
+ export type JavaAgentAction = Schemas['WebShellAction'];
28
+ export type JavaAgentActionPage = Schemas['WebShellActionPage'];
25
29
  export interface JavaManagedAgentClientOptions {
26
30
  baseUrl: string;
27
31
  getHeaders?: () => HeadersInit | Promise<HeadersInit>;
@@ -52,7 +56,31 @@ export declare class JavaManagedAgentClient {
52
56
  createSession(request: Schemas['WebShellCreateRequest'], signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
53
57
  submitTurn(request: Schemas['WebShellSubmitRequest'], signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
54
58
  cancelTurn(request: Schemas['WebShellCancelRequest'], signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
55
- streamEvents(request: Schemas['WebShellStreamRequest'], signal?: AbortSignal): AsyncGenerator<JavaAgentEvent | JavaAgentResyncRequired>;
59
+ queryActions(request: Schemas['WebShellActionQueryRequest'], signal?: AbortSignal): Promise<JavaAgentActionPage>;
60
+ respondAction(request: Schemas['WebShellActionRespondRequest'], signal?: AbortSignal): Promise<Schemas['WebShellCommandOperation']>;
61
+ /** Reads an operation's latest durable status; polling is not a replay. */
62
+ queryOperation(request: Schemas['WebShellOperationRequest'], signal?: AbortSignal): Promise<Schemas['WebShellOperation']>;
63
+ getToolResult(sessionId: string, itemId: string, signal?: AbortSignal): Promise<{
64
+ result: components["schemas"]["PublicToolResult"];
65
+ access: components["schemas"]["ArtifactAccess"];
66
+ }>;
67
+ listArtifacts(request: {
68
+ sessionId: string;
69
+ cursor?: string;
70
+ limit?: number;
71
+ }, signal?: AbortSignal): Promise<{
72
+ data: components["schemas"]["ArtifactResponse"][];
73
+ nextCursor: string | null;
74
+ hasMore: boolean;
75
+ }>;
76
+ getArtifact(sessionId: string, artifactId: string, signal?: AbortSignal): Promise<{
77
+ artifact: components["schemas"]["PublicArtifact"];
78
+ access: components["schemas"]["ArtifactAccess"];
79
+ }>;
80
+ readArtifactRange(artifact: ManagedArtifact, offset: number, length: number, signal?: AbortSignal): Promise<Uint8Array>;
81
+ openArtifactStream(artifact: ManagedArtifact, signal?: AbortSignal): Promise<ReadableStream<Uint8Array>>;
82
+ private artifactContent;
83
+ streamEvents(request: Schemas['WebShellStreamRequest'], signal?: AbortSignal, onOpen?: () => void): AsyncGenerator<JavaAgentEvent | JavaAgentResyncRequired>;
56
84
  private post;
57
85
  private request;
58
86
  }
@@ -1,9 +1,13 @@
1
1
  import { type JavaManagedAgentClientOptions } from './java-managed-agent-client';
2
+ import type { ManagedArtifactSave } from './managed-tool-result-types';
2
3
  import type { ManagedAgentProvider } from './managed-agent-provider';
3
4
  export interface JavaManagedAgentProviderOptions extends JavaManagedAgentClientOptions {
4
5
  agentId?: string;
5
6
  environmentId?: string;
7
+ /** Include tenant and actor identity; replace this scope/provider when either changes. Token refresh alone can use getHeaders. */
6
8
  productScope?: string;
7
9
  enableWorkspaceBinding?: boolean;
10
+ /** Acquire a streaming save target during the user gesture, then call openStream. */
11
+ saveArtifact?: ManagedArtifactSave;
8
12
  }
9
13
  export declare function createJavaManagedAgentProvider(options: JavaManagedAgentProviderOptions): ManagedAgentProvider;
@@ -1,3 +1,5 @@
1
+ import type { components } from './generated/managed-agent-api';
2
+ import type { ManagedToolResultReader } from './managed-tool-result-types';
1
3
  export type ManagedAgentSessionPhase = 'created' | 'admitted' | 'runtime_starting' | 'agent_running' | 'waiting_runtime' | 'tool_running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
2
4
  export type ManagedAgentRuntimeState = 'unknown' | 'starting' | 'ready' | 'failed';
3
5
  export interface ManagedAgentSessionSummary {
@@ -18,13 +20,17 @@ export interface ManagedAgentSessionSummary {
18
20
  capabilities: {
19
21
  canSend: boolean;
20
22
  canCancel: boolean;
23
+ actions?: boolean;
24
+ artifacts?: boolean;
25
+ /** The caller may submit later Turns to this Workspace-bound Session. */
26
+ workspaceTurns?: boolean;
21
27
  };
22
28
  failure?: {
23
29
  code: string;
24
30
  message: string;
25
31
  };
26
32
  }
27
- export type ManagedAgentSessionEventType = 'accepted' | 'runtime_starting' | 'runtime_ready' | 'runtime_failed' | 'runtime_released' | 'agent_started' | 'assistant_thought' | 'assistant_delta' | 'tool_requested' | 'tool_started' | 'tool_completed' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | 'stream_gap';
33
+ export type ManagedAgentSessionEventType = 'accepted' | 'runtime_starting' | 'runtime_ready' | 'runtime_failed' | 'runtime_released' | 'agent_started' | 'assistant_thought' | 'assistant_delta' | 'tool_requested' | 'tool_started' | 'tool_completed' | 'tool_result_updated' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | 'action_updated' | 'stream_gap';
28
34
  export interface ManagedAgentSessionEvent {
29
35
  id: number;
30
36
  at: number;
@@ -32,6 +38,12 @@ export interface ManagedAgentSessionEvent {
32
38
  sessionId: string;
33
39
  turnId: string;
34
40
  data?: unknown;
41
+ /**
42
+ * Projected from a durable snapshot item rather than a raw event. The
43
+ * server can retract its items (reconciliation), after which these
44
+ * projections must not survive a resync.
45
+ */
46
+ assembledFromItem?: boolean;
35
47
  }
36
48
  export interface ManagedAgentSessionTranscript {
37
49
  events: ManagedAgentSessionEvent[];
@@ -49,11 +61,34 @@ export interface ManagedAgentRequestOptions {
49
61
  export interface ManagedAgentCommandOptions extends ManagedAgentRequestOptions {
50
62
  idempotencyKey: string;
51
63
  }
64
+ /** A Hosted tool approval waiting for the Session owner's answer. */
65
+ export interface ManagedAgentPendingAction {
66
+ actionId: string;
67
+ sessionId: string;
68
+ /** Public Turn ID; absent when the Turn could not be resolved. */
69
+ turnId?: string;
70
+ functionCallId: string;
71
+ toolName: string;
72
+ inputRevision: number;
73
+ policyRevision: string;
74
+ expiresAt: number;
75
+ options: Array<{
76
+ id: string;
77
+ label: string;
78
+ }>;
79
+ inputPreview?: components['schemas']['WebShellActionInputPreview'];
80
+ }
52
81
  export interface ManagedAgentProvider {
53
82
  readonly kind: 'daemon' | 'java';
54
83
  readonly storageKey: string;
55
84
  readonly canCancel: boolean;
56
85
  readonly acceptsWorkspaceCwd: boolean;
86
+ /** Present when the provider can serve Hosted permission Actions. */
87
+ readonly actions?: {
88
+ listPending(sessionId: string, options: ManagedAgentRequestOptions): Promise<ManagedAgentPendingAction[]>;
89
+ respond(action: ManagedAgentPendingAction, optionId: string, options: ManagedAgentCommandOptions): Promise<void>;
90
+ };
91
+ readonly toolResults?: ManagedToolResultReader;
57
92
  readonly workspaceBinding?: {
58
93
  readonly agentId: string;
59
94
  list(options: ManagedAgentRequestOptions & {
@@ -97,6 +132,13 @@ export interface ManagedAgentProvider {
97
132
  cancel(sessionId: string, turnId: string, options: ManagedAgentCommandOptions): Promise<void>;
98
133
  subscribeEvents(sessionId: string, options: ManagedAgentRequestOptions & {
99
134
  lastEventId?: number;
135
+ /**
136
+ * Called once the stream connection has been (re-)established. An
137
+ * established stream can stay silent indefinitely — heartbeats are
138
+ * not events — so this is the only liveness signal that does not
139
+ * depend on stream activity.
140
+ */
141
+ onEstablished?(): void;
100
142
  }): AsyncIterable<ManagedAgentSessionEvent>;
101
143
  }
102
144
  export interface ManagedAgentWorkspace {
@@ -0,0 +1,8 @@
1
+ export declare function javaDeltaEvent(sequence: number, text: string): string;
2
+ /** A complete item.output_text.delta SSE frame. */
3
+ export declare function sseFrame(sequence: number, text: string): string;
4
+ /** A complete item.output_text.delta SSE frame with an empty data object. */
5
+ export declare function validEventFrame(sequence: number): string;
6
+ /** A well-formed SSE frame whose data payload is truncated JSON. */
7
+ export declare function corruptFrame(sequence: number, name?: string): string;
8
+ export declare function javaSessionPayload(lastSequence: number): string;
@@ -0,0 +1,10 @@
1
+ import type { ACPToolCall, Message, PermissionRequest } from '../../adapters/types';
2
+ import type { ManagedAgentPendingAction } from './managed-agent-provider';
3
+ /**
4
+ * Finds the transcript tool that a pending Action asks about. Managed tool
5
+ * rows are keyed `${turnId}:${toolCallId}`, and the Action's functionCallId is
6
+ * that tool call ID; without a resolved Turn only the call ID can match.
7
+ */
8
+ export declare function findManagedApprovalTool(messages: readonly Message[], action: ManagedAgentPendingAction): ACPToolCall | undefined;
9
+ /** Presents a pending Hosted approval through the shared approval card. */
10
+ export declare function toManagedPermissionRequest(action: ManagedAgentPendingAction, messages: readonly Message[]): PermissionRequest;
@@ -0,0 +1,2 @@
1
+ import type { ManagedArtifactSave } from './managed-tool-result-types';
2
+ export declare function browserArtifactSave(): ManagedArtifactSave | undefined;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Whether the service answered a request in a way a retry cannot change.
8
+ *
9
+ * A 4xx other than a timeout (408) or a rate limit (429) is an answer, not a
10
+ * hiccup: a deleted Session or an unknown Action replies the same way however
11
+ * often it is asked, so retrying only burns requests. Timeouts and rate limits
12
+ * are worth another attempt.
13
+ */
14
+ export declare function isNonRetryableClientError(error: unknown): boolean;
@@ -0,0 +1,24 @@
1
+ import type { components } from './generated/managed-agent-api';
2
+ import type { ManagedAgentRequestOptions } from './managed-agent-provider';
3
+ type Schemas = components['schemas'];
4
+ export type ManagedToolResult = Schemas['PublicToolResult'];
5
+ export type ManagedArtifact = Schemas['PublicArtifact'];
6
+ export type ManagedToolResultResponse = Schemas['ToolResultResponse'];
7
+ export type ManagedArtifactResponse = Schemas['ArtifactResponse'];
8
+ export type ManagedArtifactPage = Schemas['WebShellArtifactPage'];
9
+ export type ManagedArtifactSave = (artifact: ManagedArtifact, options: {
10
+ signal?: AbortSignal;
11
+ openStream: () => Promise<ReadableStream<Uint8Array>>;
12
+ }) => Promise<void>;
13
+ export interface ManagedToolResultReader {
14
+ readonly canDownload: boolean;
15
+ getResult(sessionId: string, itemId: string, options: ManagedAgentRequestOptions): Promise<ManagedToolResultResponse>;
16
+ listArtifacts(sessionId: string, options: ManagedAgentRequestOptions & {
17
+ cursor?: string;
18
+ limit?: number;
19
+ }): Promise<ManagedArtifactPage>;
20
+ getArtifact(sessionId: string, artifactId: string, options: ManagedAgentRequestOptions): Promise<ManagedArtifactResponse>;
21
+ readRange(artifact: ManagedArtifact, offset: number, length: number, options: ManagedAgentRequestOptions): Promise<Uint8Array>;
22
+ downloadArtifact(artifact: ManagedArtifact, options: ManagedAgentRequestOptions): Promise<void>;
23
+ }
24
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { ManagedArtifact, ManagedToolResult } from './managed-tool-result-types';
2
+ export declare const artifact: ManagedArtifact;
3
+ export declare const result: ManagedToolResult;
4
+ export declare const notStartedResult: ManagedToolResult;
5
+ export declare const blockedResult: ManagedToolResult;
6
+ export declare const previewOnlyResult: ManagedToolResult;
@@ -0,0 +1,34 @@
1
+ import type { ManagedAgentPendingAction, ManagedAgentProvider, ManagedAgentSessionEvent } from './managed-agent-provider';
2
+ export interface ManagedActionsState {
3
+ /** The approval to show; answered ones stay hidden while they settle. */
4
+ action?: ManagedAgentPendingAction;
5
+ /** Reading the pending approvals failed; retries run in the background. */
6
+ loadError?: unknown;
7
+ /**
8
+ * The pending approvals have been read for this Session, so a failed read is
9
+ * a failed refresh of what the page already shows rather than an empty list.
10
+ */
11
+ loaded: boolean;
12
+ /** Sending an answer failed; the approval is shown again. */
13
+ answerError?: unknown;
14
+ /**
15
+ * The service refused an answer under the owner-or-Workspace-operator
16
+ * rule. That refusal is a fact about the viewer's Workspace role row,
17
+ * which an operator can raise while the page stays open, so the latch
18
+ * covers every later approval the same Session raises and survives
19
+ * leaving that Session and coming back — but `retry()` drops it and
20
+ * re-probes instead of treating one 403 as permanent for the mount.
21
+ */
22
+ respondForbidden: boolean;
23
+ respond(actionId: string, optionId: string): Promise<void>;
24
+ /** Reads the pending approvals again now. */
25
+ retry(): void;
26
+ }
27
+ /**
28
+ * Loads a Session's pending Hosted approvals and answers them. It re-reads
29
+ * when the transcript reports an approval change or a reconciled gap, when an
30
+ * approval expires, and after an answer. `enabled` is undefined while the
31
+ * Session summary is unknown, for example during a reload: the shown approval
32
+ * stays and can be answered, and reads resume once the capability is known.
33
+ */
34
+ export declare function useManagedActions(provider: ManagedAgentProvider, sessionId: string | undefined, clientId: string, enabled: boolean | undefined, events: readonly ManagedAgentSessionEvent[]): ManagedActionsState;
@@ -1,7 +1,11 @@
1
1
  import { type WebShellAssistantFeedbackRating, type WebShellAssistantTurnFooterRenderInfo, type WebShellSource } from '../../customization';
2
- import type { DaemonSessionGenerationEvent } from '@qwen-code/sdk/daemon';
2
+ import type { DaemonSessionGenerationEvent, QwenAgentMessageMeta } from '@qwen-code/sdk/daemon';
3
+ import type { DaemonMessageAuthor } from '../../adapters/messageTypes';
3
4
  interface AssistantMessageProps {
4
5
  content: string;
6
+ author?: DaemonMessageAuthor;
7
+ /** A workspace agent's reply: its run status, error, steps and tokens. */
8
+ agentMessage?: QwenAgentMessageMeta;
5
9
  isStreaming?: boolean;
6
10
  timestamp?: number;
7
11
  onBranchSession?: () => void | Promise<void>;
@@ -19,6 +23,7 @@ interface AssistantMessageProps {
19
23
  export declare const AssistantMessage: import("react").NamedExoticComponent<AssistantMessageProps>;
20
24
  interface ThinkingMessageProps {
21
25
  content: string;
26
+ author?: DaemonMessageAuthor;
22
27
  isStreaming?: boolean;
23
28
  timestamp?: number;
24
29
  isLocateFlashing?: boolean;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * The initial of a named assistant voice, tinted with its color when it has
8
+ * one. The same mark stands for an agent in its replies, the Team panel and
9
+ * the Agents page, so a reader learns it once.
10
+ */
11
+ export declare function AuthorAvatar({ name, color, size, className, }: {
12
+ name: string;
13
+ color?: string;
14
+ size?: 'sm' | 'md';
15
+ className?: string;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,10 @@
1
1
  import type { DaemonSessionContextUsageStatus } from '@qwen-code/web-shell/daemon-react-sdk';
2
+ export declare function createContextUsageMessageData(status: DaemonSessionContextUsageStatus): {
3
+ type: string;
4
+ status: DaemonSessionContextUsageStatus;
5
+ };
2
6
  export declare function serializeContextUsageMessage(status: DaemonSessionContextUsageStatus): string;
3
- export declare function parseContextUsageMessage(content: string): DaemonSessionContextUsageStatus | null;
7
+ export declare function parseContextUsageMessage(content: string, data?: unknown): DaemonSessionContextUsageStatus | null;
4
8
  export declare function ContextUsageMessage({ status, onShowDetail, compact, }: {
5
9
  status: DaemonSessionContextUsageStatus;
6
10
  /** Run /context detail, exactly like typing it. */
@@ -4,8 +4,13 @@ interface ParsedStats {
4
4
  view: StatsView;
5
5
  status: DaemonSessionStatsStatus;
6
6
  }
7
+ export declare function createStatsMessageData(status: DaemonSessionStatsStatus, view?: StatsView): {
8
+ type: string;
9
+ view: StatsView;
10
+ status: DaemonSessionStatsStatus;
11
+ };
7
12
  export declare function serializeStatsMessage(status: DaemonSessionStatsStatus, view?: StatsView): string;
8
- export declare function parseStatsMessage(content: string): ParsedStats | null;
13
+ export declare function parseStatsMessage(content: string, data?: unknown): ParsedStats | null;
9
14
  export declare function formatDuration(ms: number): string;
10
15
  export declare function StatsMessage({ view, status, }: {
11
16
  view: StatsView;
@@ -16,6 +16,14 @@ interface ToolApprovalProps {
16
16
  * it — it just never grabs focus on its own.
17
17
  */
18
18
  keyboardActive?: boolean;
19
+ /**
20
+ * Id of an extra description the caller renders beside this panel, added to
21
+ * `aria-describedby`. The Managed approvals card states there that the tool
22
+ * arguments are unavailable, which is exactly the case where the panel's own
23
+ * description (tool name only) would let a screen-reader user confirm blind.
24
+ * Pass it only while that element is mounted, so no IDREF dangles.
25
+ */
26
+ extraDescriptionId?: string;
19
27
  planTodos?: readonly TodoItem[];
20
28
  planExecutionMode?: string;
21
29
  generateContent?: SessionContentGenerator;
@@ -24,5 +32,5 @@ export declare function parseTitle(title?: string): {
24
32
  toolName: string;
25
33
  description: string;
26
34
  };
27
- export declare function ToolApproval({ request, onConfirm, variant, disabled, keyboardActive, planTodos, planExecutionMode, generateContent, }: ToolApprovalProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function ToolApproval({ request, onConfirm, variant, disabled, keyboardActive, extraDescriptionId, planTodos, planExecutionMode, generateContent, }: ToolApprovalProps): import("react/jsx-runtime").JSX.Element;
28
36
  export {};
@@ -19,6 +19,7 @@ interface ToolGroupProps {
19
19
  pendingApproval?: PermissionRequest | null;
20
20
  workspaceCwd?: string;
21
21
  onTurnOutputOpen?: (request: TurnOutputOpenRequest) => void;
22
+ onToolResultOpen?: (itemId: string) => void;
22
23
  isLocateFlashing?: boolean;
23
24
  /** Powers the translate action on completed thinking rows (zh-CN). */
24
25
  generateContent?: SessionContentGenerator;
@@ -32,6 +33,7 @@ interface ToolLineProps {
32
33
  approval?: PermissionRequest | null;
33
34
  workspaceCwd?: string;
34
35
  onTurnOutputOpen?: (request: TurnOutputOpenRequest) => void;
36
+ onToolResultOpen?: (itemId: string) => void;
35
37
  summaryOnly?: boolean;
36
38
  forceExpanded?: boolean;
37
39
  detailsVisible?: boolean;
@@ -1,6 +1,6 @@
1
1
  import type { DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
2
2
  import type { ComposerTagClickHandler, ComposerTagRenderer, WebShellComposerTag, WebShellComposerTagIconMap } from '../../customization';
3
- import type { AttachmentPreviewRequest } from '../../adapters/messageTypes';
3
+ import type { AttachmentPreviewRequest, DaemonMessageAuthor } from '../../adapters/messageTypes';
4
4
  import type { ImageTabSource } from '../artifacts/ArtifactPanel';
5
5
  interface UserMessageImage {
6
6
  data: string;
@@ -32,6 +32,8 @@ interface UserMessageProps {
32
32
  /** Click an uploaded image to preview it in the right panel. */
33
33
  onImagePreview?: (src: string, alt?: string, source?: ImageTabSource) => void;
34
34
  onAttachmentPreview?: (file: AttachmentPreviewRequest) => void;
35
+ /** Set when a workspace agent, not the user, posted this message. */
36
+ author?: DaemonMessageAuthor;
35
37
  }
36
38
  export declare const UserMessage: import("react").NamedExoticComponent<UserMessageProps>;
37
39
  export declare function ReadonlyComposerTag({ tag, composerTagIcons, renderComposerTag, renderComposerTagTooltip, onComposerTagClick, title, preserveCustomKindLabel, }: {
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { QwenAgentMessageMeta, SessionAgentStep } from '@qwen-code/sdk/daemon';
7
+ /** True when an agent's text shows nothing: render it as no text at all. */
8
+ export declare function isBlankAgentText(text: string): boolean;
9
+ /**
10
+ * One line per tool call an agent made, like a CI job's step list. Shared by
11
+ * the live run card and the finished reply, so a run reads the same before
12
+ * and after its record lands.
13
+ *
14
+ * Renders in exported transcripts: only `agentMessage.*` strings (i18n.tsx),
15
+ * never the collaboration dictionary.
16
+ */
17
+ export declare function AgentStepList({ steps, label, settled, }: {
18
+ steps: readonly SessionAgentStep[];
19
+ label?: string;
20
+ /**
21
+ * The run has ended (completed, failed, stopped, offline). A step still
22
+ * marked running then never finished; show it as stopped, not spinning.
23
+ */
24
+ settled?: boolean;
25
+ }): import("react/jsx-runtime").JSX.Element | null;
26
+ /** "1,234 tokens", or nothing when the run reported no usage. */
27
+ export declare function AgentTokenUsage({ totalTokens }: {
28
+ totalTokens?: number;
29
+ }): import("react/jsx-runtime").JSX.Element | null;
30
+ /**
31
+ * Status, error, steps and token usage of a finished agent reply. A completed
32
+ * run shows no status word: its text is the result.
33
+ */
34
+ export declare function AgentMessageDetails({ meta }: {
35
+ meta: QwenAgentMessageMeta;
36
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * "This belongs to squad X": a small muted pill, the squad's counterpart to
8
+ * AuthorAvatar. Used on a leader's and a member's author line, the leader's
9
+ * no-action line and the live engagement bar, so a reader learns it once.
10
+ *
11
+ * Renders in exported transcripts: no collaboration strings here.
12
+ */
13
+ export declare function SquadTag({ name, className, }: {
14
+ name: string;
15
+ className?: string;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -5,6 +5,8 @@ interface UpdateControlProps {
5
5
  currentVersion: string;
6
6
  onError: (error: unknown, fallback: string) => void;
7
7
  onRestarted?: (url: string) => void;
8
+ /** Keep background update/restart polling alive when the menu closes. */
9
+ portalContainer?: HTMLElement | null;
8
10
  }
9
- export declare function UpdateControl({ client, collapsed, currentVersion, onError, onRestarted, }: UpdateControlProps): import("react/jsx-runtime").JSX.Element | null;
11
+ export declare function UpdateControl({ client, collapsed, currentVersion, onError, onRestarted, portalContainer, }: UpdateControlProps): import("react/jsx-runtime").JSX.Element | null;
10
12
  export {};
@@ -2,11 +2,12 @@ import { type ReactNode } from 'react';
2
2
  import { type DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
3
3
  import { type WebShellTheme } from '../../themeContext';
4
4
  import { type WorkspaceManagementTarget, type WorkspaceOverviewItem } from './workspaceOverviewModel';
5
+ export declare const SIDEBAR_RAIL_WIDTH = 56;
5
6
  export type WebShellSidebarFooterItem = 'settings' | 'update' | 'version' | 'theme' | 'sessionsOverview' | 'workspacesOverview' | 'splitView' | 'daemonStatus' | 'localFiles' | 'desktopRelay' | 'collapse';
6
7
  export interface WebShellSidebarBranding {
7
8
  /** Replace the complete top branding row. */
8
9
  render?: () => ReactNode;
9
- /** Hide the branding row in the compact drawer. Defaults to true. */
10
+ /** Hide the branding row in the compact drawer. Defaults to false. */
10
11
  hideWhenCompact?: boolean;
11
12
  }
12
13
  export interface WebShellSidebarLockedWorkspace {
@@ -15,9 +16,9 @@ export interface WebShellSidebarLockedWorkspace {
15
16
  expanded: boolean;
16
17
  }) => ReactNode;
17
18
  }
18
- export type WebShellSidebarPrimaryNavItem = 'newTask' | 'plugins' | 'channels' | 'scheduledTasks' | 'workflows' | 'goals' | 'managed';
19
+ export type WebShellSidebarPrimaryNavItem = 'newTask' | 'agents' | 'plugins' | 'channels' | 'live' | 'scheduledTasks' | 'workflows' | 'goals' | 'managed';
19
20
  export interface WebShellSidebarPrimaryNavOptions {
20
- /** Built-in primary nav entries to show. Defaults to all. */
21
+ /** Built-in primary nav entries to show. Embedded hosts default to New task only. */
21
22
  items?: readonly WebShellSidebarPrimaryNavItem[];
22
23
  /** Additional custom content rendered after the built-in nav buttons. */
23
24
  render?: () => ReactNode;
@@ -28,6 +29,9 @@ export interface WebShellSidebarFooterOptions {
28
29
  /** Additional custom content rendered before the built-in footer items (left side). */
29
30
  render?: () => ReactNode;
30
31
  }
32
+ export declare const DEFAULT_FOOTER_ITEMS: readonly WebShellSidebarFooterItem[];
33
+ export declare const DESKTOP_DEFAULT_FOOTER_ITEMS: readonly WebShellSidebarFooterItem[];
34
+ export declare const DEFAULT_PRIMARY_NAV_ITEMS: readonly WebShellSidebarPrimaryNavItem[];
31
35
  export type WebShellSidebarSessionActionItem = 'details' | 'rename' | 'group' | 'export' | 'delete' | 'pin' | 'archive';
32
36
  /** Subset of action items that have working inline (hover-button) handlers. */
33
37
  export type WebShellSidebarSessionInlineActionItem = 'pin' | 'rename' | 'export' | 'delete';
@@ -55,10 +59,17 @@ export interface WebShellSidebarWorkspaceOverviewOptions {
55
59
  export type { WorkspaceManagementTarget, WorkspaceOverviewItem };
56
60
  interface WebShellSidebarProps {
57
61
  collapsed: boolean;
62
+ layout?: 'single' | 'rail';
63
+ activePage?: string;
64
+ containerWidth?: number;
65
+ onOpenHome?: () => void;
58
66
  onCollapsedChange: (collapsed: boolean) => void;
59
67
  onOpenSettings: () => void;
68
+ onOpenAgents?: (view?: 'agents' | 'squads' | 'runtime') => void;
60
69
  onOpenPlugins: () => void;
61
70
  onOpenChannels: () => void;
71
+ onOpenLive?: () => void;
72
+ onLiveVoiceSlotChange?: (element: HTMLDivElement | null) => void;
62
73
  onOpenManagedSessions?: () => void;
63
74
  onOpenDaemonStatus: () => void;
64
75
  onOpenScheduledTasks: () => void;
@@ -120,7 +131,7 @@ interface WebShellSidebarProps {
120
131
  primaryNav?: WebShellSidebarPrimaryNavOptions;
121
132
  /** Whether to show the Tasks/Channels session-source switch. Defaults to true. */
122
133
  showSessionSourceSwitch?: boolean;
123
- /** Whether to show daemon-owned Live conversations. Defaults to false. */
134
+ /** Show Live conversations and, in rail layout, the Live entry. Defaults to false. */
124
135
  showLive?: boolean;
125
136
  /** Whether to hide the "Projects" header row (with search and add workspace). Defaults to false (shown). */
126
137
  hideProjectHeader?: boolean;
@@ -145,4 +156,4 @@ interface WebShellSidebarProps {
145
156
  onLoadStandaloneSession?: (sessionId: string) => Promise<void> | void;
146
157
  onStandaloneNotice?: (message: string) => void;
147
158
  }
148
- export declare function WebShellSidebar({ collapsed, onCollapsedChange, onOpenSettings, onOpenPlugins, onOpenChannels, onOpenManagedSessions, onOpenDaemonStatus, onOpenScheduledTasks, onOpenWorkflows, onOpenGoals, onOpenSessions, canOpenSessionsOverview, onOpenWorkspacesOverview, onOpenSplitView, canOpenSplitView, onNewSession, onNewStandaloneSession, onLoadSession, onSelectCurrentSession, onSessionRenameConfirmed, onSessionsDeleted, onError, theme, onThemeChange, mobileOpen, onMobileClose, selectedWorkspaceCwd, onSelectWorkspace, onOpenGitDiff, onOpenCommit, onOpenAddWorkspace, workspaces: providedWorkspaces, lockedWorkspaceCwd, lockedWorkspace: lockedWorkspaceOptions, branding, primaryNav: primaryNavOptions, showSessionSourceSwitch, showLive, hideProjectHeader, sessionActions: sessionActionsOptions, footer, workspaceOverview, onOpenWorkspaceManagement, onNewWorktreeSession, projectFeaturesEnabled, onLoadStandaloneSession, onStandaloneNotice, }: WebShellSidebarProps): import("react/jsx-runtime").JSX.Element;
159
+ export declare function WebShellSidebar({ collapsed, layout, activePage, containerWidth, onOpenHome, onCollapsedChange, onOpenSettings, onOpenAgents, onOpenPlugins, onOpenChannels, onOpenLive, onLiveVoiceSlotChange, onOpenManagedSessions, onOpenDaemonStatus, onOpenScheduledTasks, onOpenWorkflows, onOpenGoals, onOpenSessions, canOpenSessionsOverview, onOpenWorkspacesOverview, onOpenSplitView, canOpenSplitView, onNewSession, onNewStandaloneSession, onLoadSession, onSelectCurrentSession, onSessionRenameConfirmed, onSessionsDeleted, onError, theme, onThemeChange, mobileOpen, onMobileClose, selectedWorkspaceCwd, onSelectWorkspace, onOpenGitDiff, onOpenCommit, onOpenAddWorkspace, workspaces: providedWorkspaces, lockedWorkspaceCwd, lockedWorkspace: lockedWorkspaceOptions, branding, primaryNav: primaryNavOptions, showSessionSourceSwitch, showLive, hideProjectHeader, sessionActions: sessionActionsOptions, footer, workspaceOverview, onOpenWorkspaceManagement, onNewWorktreeSession, projectFeaturesEnabled, onLoadStandaloneSession, onStandaloneNotice, }: WebShellSidebarProps): import("react/jsx-runtime").JSX.Element;
@@ -12,6 +12,7 @@ interface WorkspaceSectionProps {
12
12
  workspace: DaemonWorkspaceCapability;
13
13
  remote?: boolean;
14
14
  renderHeader?: (expanded: boolean) => ReactNode;
15
+ hideHeader?: boolean;
15
16
  client: DaemonClient;
16
17
  reloadToken: number;
17
18
  untrustedLabel: string;
@@ -116,5 +117,5 @@ interface WorkspaceSectionProps {
116
117
  /** Commit entry for the same picker; the row still opens without it. */
117
118
  onOpenCommit?: (workspaceCwd: string) => void;
118
119
  }
119
- export declare function WorkspaceSection({ workspace, remote, renderHeader, client, reloadToken, untrustedLabel, readOnlyLabel, trustToOpenLabel, noSessionsLabel, loadErrorLabel, organizationEnabled, sessionCatalogRequestsEnabled, sessionGroupCatalog, sessionLiveStateEnabled, sourceType, channelGroupingEnabled, ungroupedLabel, searchQuery, expanded: controlledExpanded, autoExpandKey, forceAutoExpand, onExpandedChange, renderSessions, renderSession, pendingSession, mapSession, showSessionDetails, headerActions, overviewEnabled, overviewMenuOpen, overviewItems, gitBranchWanted, sessionStats, onRenameGroup, onDeleteGroup, renameGroupLabel, deleteGroupLabel, groupActionsDisabled, excludePinned, limitSessions, isPinnedSectionMember, onOpenPathLocally, onOpenTerminalLocally, onOpenGitDiff, onOpenCommit, }: WorkspaceSectionProps): import("react/jsx-runtime").JSX.Element;
120
+ export declare function WorkspaceSection({ workspace, remote, renderHeader, hideHeader, client, reloadToken, untrustedLabel, readOnlyLabel, trustToOpenLabel, noSessionsLabel, loadErrorLabel, organizationEnabled, sessionCatalogRequestsEnabled, sessionGroupCatalog, sessionLiveStateEnabled, sourceType, channelGroupingEnabled, ungroupedLabel, searchQuery, expanded: controlledExpanded, autoExpandKey, forceAutoExpand, onExpandedChange, renderSessions, renderSession, pendingSession, mapSession, showSessionDetails, headerActions, overviewEnabled, overviewMenuOpen, overviewItems, gitBranchWanted, sessionStats, onRenameGroup, onDeleteGroup, renameGroupLabel, deleteGroupLabel, groupActionsDisabled, excludePinned, limitSessions, isPinnedSectionMember, onOpenPathLocally, onOpenTerminalLocally, onOpenGitDiff, onOpenCommit, }: WorkspaceSectionProps): import("react/jsx-runtime").JSX.Element;
120
121
  export {};
@@ -8,7 +8,8 @@ export declare function sessionMatchesGitQuery(session: DaemonSessionSummary, qu
8
8
  /**
9
9
  * The sidebar's session-source scope: the "channel" tab lists only
10
10
  * channel-source sessions, the "default" tab lists unattributed (legacy)
11
- * and default/Qwen Live tasks, and no filter lists everything.
11
+ * and default/Qwen Live tasks, every other source lists exact matches, and
12
+ * no filter lists everything.
12
13
  */
13
14
  export declare function sessionMatchesSource(session: DaemonSessionSummary, source: string | undefined): boolean;
14
15
  /**