@qwen-code/web-shell 0.25.1-preview.0 → 0.25.1-preview.1

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 (48) hide show
  1. package/dist/agents-route-DAa1HKQE.js +1546 -0
  2. package/dist/daemon-react-sdk.js +1 -1
  3. package/dist/{index-D9Bc2Hcz.js → index-zUj3SlrB.js} +46696 -45366
  4. package/dist/index.js +22 -22
  5. package/dist/sw.js +1 -1
  6. package/dist/{toolNames-CDhDlFnq.js → toolNames-B_KiYcXs.js} +3633 -3746
  7. package/dist/transcript.js +9600 -9312
  8. package/dist/types/adapters/messageTypes.d.ts +8 -1
  9. package/dist/types/components/ChatContextHeader.d.ts +3 -1
  10. package/dist/types/components/agents/AgentCreatePage.d.ts +7 -1
  11. package/dist/types/components/agents/AgentsManagerPage.d.ts +4 -5
  12. package/dist/types/components/artifacts/ArtifactPanel.d.ts +1 -8
  13. package/dist/types/components/artifacts/TrajectoryFilters.d.ts +15 -0
  14. package/dist/types/components/artifacts/TrajectoryInspector.d.ts +3 -1
  15. package/dist/types/components/managed/generated/managed-agent-api.d.ts +9 -7
  16. package/dist/types/components/managed/java-managed-agent-client.d.ts +2 -0
  17. package/dist/types/components/messages/AssistantMessage.d.ts +3 -1
  18. package/dist/types/components/messages/UserMessage.d.ts +3 -1
  19. package/dist/types/components/messages/agent-message-details.d.ts +36 -0
  20. package/dist/types/components/messages/squad-tag.d.ts +16 -0
  21. package/dist/types/components/sidebar/WebShellSidebar.d.ts +2 -4
  22. package/dist/types/components/sidebar/WorkspaceSection.d.ts +1 -2
  23. package/dist/types/components/workspace-agents/ThreadsPage.d.ts +30 -54
  24. package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +30 -4
  25. package/dist/types/components/workspace-agents/agent-events.d.ts +4 -34
  26. package/dist/types/components/workspace-agents/agents-route.d.ts +19 -0
  27. package/dist/types/components/workspace-agents/agents-view-logic.d.ts +14 -163
  28. package/dist/types/components/workspace-agents/lazy-agents-route.d.ts +7 -0
  29. package/dist/types/components/workspace-agents/messages.d.ts +2 -2
  30. package/dist/types/components/workspace-agents/session-agent-live-runs.d.ts +96 -0
  31. package/dist/types/components/workspace-agents/session-agents-api.d.ts +39 -0
  32. package/dist/types/components/workspace-agents/squads-section.d.ts +28 -0
  33. package/dist/types/components/workspace-agents/threads-api.d.ts +24 -35
  34. package/dist/types/components/workspace-agents/use-session-agent-runs.d.ts +66 -0
  35. package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +74 -10
  36. package/dist/types/components/workspaces/WorkspaceHostProjects.d.ts +11 -0
  37. package/dist/types/components/workspaces/WorkspaceLocation.d.ts +7 -0
  38. package/dist/types/config/workspace-hosts.d.ts +11 -0
  39. package/dist/types/trajectory/filter-messages.d.ts +9 -0
  40. package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +7 -0
  41. package/dist/types/trajectory/filterTrajectory.d.ts +22 -0
  42. package/package.json +2 -1
  43. package/dist/ThreadsRoute-CXAiD3t_.js +0 -2407
  44. package/dist/types/components/workspace-agents/LazyThreadsRoute.d.ts +0 -7
  45. package/dist/types/components/workspace-agents/ThreadChat.d.ts +0 -35
  46. package/dist/types/components/workspace-agents/ThreadView.d.ts +0 -72
  47. package/dist/types/components/workspace-agents/ThreadsRoute.d.ts +0 -23
  48. package/dist/types/components/workspace-agents/useProjectConversations.d.ts +0 -10
@@ -3,7 +3,7 @@
3
3
  * Copyright 2025 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { DaemonBackgroundTurn, DaemonSessionArtifactInput, DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
6
+ import type { DaemonBackgroundTurn, DaemonSessionArtifactInput, DaemonInputAnnotation, QwenAgentMessageMeta } from '@qwen-code/sdk/daemon';
7
7
  import type { components } from '../components/managed/generated/managed-agent-api.js';
8
8
  export interface AttachmentPreviewRequest {
9
9
  name: string;
@@ -119,6 +119,8 @@ export interface DaemonUserMessage extends DaemonMessageMeta {
119
119
  }>;
120
120
  inputAnnotations?: DaemonInputAnnotation[];
121
121
  source?: string;
122
+ /** `_meta.qwenAgentMessage` of an @-mention (`kind: 'agent_mention'`). */
123
+ agentMessage?: QwenAgentMessageMeta;
122
124
  }
123
125
  export interface DaemonAssistantMessage extends DaemonMessageMeta {
124
126
  reportedArtifacts?: DaemonSessionArtifactInput[];
@@ -138,6 +140,11 @@ export interface DaemonAssistantMessage extends DaemonMessageMeta {
138
140
  outputTokens: number;
139
141
  cachedTokens?: number;
140
142
  };
143
+ /**
144
+ * `_meta.qwenAgentMessage` of a workspace agent's reply in this session
145
+ * (`kind: 'agent_message'`): its run status, error, steps and tokens.
146
+ */
147
+ agentMessage?: QwenAgentMessageMeta;
141
148
  }
142
149
  export interface DaemonThinkingMessage extends DaemonMessageMeta {
143
150
  id: string;
@@ -1,6 +1,8 @@
1
1
  import type { ReactNode } from 'react';
2
2
  interface ChatContextHeaderProps {
3
3
  content: ReactNode;
4
+ /** Names where the chat runs, beside the actions; hidden when omitted. */
5
+ location?: ReactNode;
4
6
  /**
5
7
  * Workspace shown as the header's leading icon. Omitting it means the shell
6
8
  * has no workspace: the icon stays the same folder and only its tooltip says
@@ -23,5 +25,5 @@ interface ChatContextHeaderProps {
23
25
  /** Shows the Local Control QR entry; hidden when omitted. */
24
26
  onOpenLocalControlSettings?: () => void;
25
27
  }
26
- export declare function ChatContextHeader({ content, workspaceName, workspacePath, environmentOpen, environmentAvailable, rightPanelOpen, rightPanelAvailable, onToggleEnvironment, onToggleRightPanel, onOpenTokenUsage, onOpenContextUsage, onOpenLocalControlSettings, }: ChatContextHeaderProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function ChatContextHeader({ content, location, workspaceName, workspacePath, environmentOpen, environmentAvailable, rightPanelOpen, rightPanelAvailable, onToggleEnvironment, onToggleRightPanel, onOpenTokenUsage, onOpenContextUsage, onOpenLocalControlSettings, }: ChatContextHeaderProps): import("react/jsx-runtime").JSX.Element;
27
29
  export {};
@@ -17,6 +17,11 @@ interface AgentCreatePageProps {
17
17
  }[];
18
18
  /** Preselects the runtime, e.g. right after it joined. */
19
19
  initialHostId?: string;
20
+ /**
21
+ * Program ids this computer's daemon reported it can run. Absent (an older
22
+ * daemon) means Qwen Code only.
23
+ */
24
+ localPrograms?: readonly string[];
20
25
  onSaveWorkspaceAgent?: (input: {
21
26
  name: string;
22
27
  description?: string;
@@ -26,6 +31,7 @@ interface AgentCreatePageProps {
26
31
  maxConcurrentRuns: number;
27
32
  execution?: {
28
33
  mode: 'local';
34
+ provider?: AgentProgramView;
29
35
  } | {
30
36
  mode: 'managed-host';
31
37
  hostIds: string[];
@@ -33,5 +39,5 @@ interface AgentCreatePageProps {
33
39
  };
34
40
  }) => Promise<void>;
35
41
  }
36
- export declare function AgentCreatePage({ initialScope, agent, onCancel, onCreated, executionHosts, workspaceCwd, initialHostId, onSaveWorkspaceAgent, }: AgentCreatePageProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare function AgentCreatePage({ initialScope, agent, onCancel, onCreated, executionHosts, workspaceCwd, initialHostId, localPrograms, onSaveWorkspaceAgent, }: AgentCreatePageProps): import("react/jsx-runtime").JSX.Element;
37
43
  export {};
@@ -1,13 +1,12 @@
1
1
  import type { EmbeddedManagerPage } from '../plugins/manager-page';
2
2
  interface AgentsManagerPageProps {
3
- initialAgentView?: 'agents' | 'tasks' | 'runtime' | 'new-agent';
3
+ initialAgentView?: 'agents' | 'squads' | 'runtime' | 'new-agent';
4
4
  onClose: () => void;
5
5
  embedded?: EmbeddedManagerPage;
6
6
  initialCreateScope?: 'workspace' | 'global' | null;
7
7
  workspaceCwd?: string;
8
- /** Opens an agent's own session in the shell's session view. */
9
- onOpenAgentSession?: (sessionId: string) => void;
10
- onOpenThreadChat?: (threadId: string, workspaceCwd: string) => void;
8
+ /** Puts `@name ` into the chat composer, from an agent card. */
9
+ onMentionAgent?: (name: string) => void;
11
10
  }
12
- export declare function AgentsManagerPage({ initialAgentView, onClose, embedded, initialCreateScope, workspaceCwd, onOpenAgentSession, onOpenThreadChat, }: AgentsManagerPageProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function AgentsManagerPage({ initialAgentView, onClose, embedded, initialCreateScope, workspaceCwd, onMentionAgent, }: AgentsManagerPageProps): import("react/jsx-runtime").JSX.Element;
13
12
  export {};
@@ -171,12 +171,6 @@ export type ArtifactPanelTab = (WebPreviewState & {
171
171
  kind: 'workflow';
172
172
  title: string;
173
173
  sessionId?: string;
174
- } | {
175
- id: string;
176
- kind: 'agent_activity';
177
- title: string;
178
- threadId: string;
179
- workspaceCwd: string;
180
174
  } | {
181
175
  id: 'turn_calls';
182
176
  kind: 'turn_calls';
@@ -245,7 +239,6 @@ interface ArtifactPanelProps {
245
239
  agentTraceLoading?: boolean;
246
240
  agentTraceError?: string;
247
241
  onOpenWorkflowAgent?: (task: EnvironmentAgentTask) => void;
248
- onOpenCollaborationSession?: (sessionId: string, workspaceCwd: string) => void;
249
242
  onError?: (error: unknown, fallback: string) => void;
250
243
  sessionWorkflowEnabled?: boolean;
251
244
  modelManagement?: WebShellModelManagementOptions;
@@ -270,5 +263,5 @@ interface ArtifactPanelProps {
270
263
  fullscreen?: boolean;
271
264
  onToggleFullscreen?: () => void;
272
265
  }
273
- export declare function ArtifactPanel({ contextUsageControls, artifacts, tabs, activeTabId, reviewChanges, selectedReviewPath, panelWidth, workspaceCwd, loading, restoring, error, onSelectTab, onSelectTurnCallsPrompt, onCloseTab, onOpenFilePreview, latestReviewAvailable, onOpenLatestReview, onOpenTerminal, onOpenTrajectory, trajectoryTabId, onOpenWebPreview, onWebPreviewChange, items, sideTaskAvailable, sideTasks, sideTasksLoading, onCreateSideTask, onOpenSideTask, onCreateSideTaskSession, onSideTaskCreated, onSideTaskTitleChange, onSideTaskInitialPromptRefused, onNestedRightPanelOpen, onNestedArtifactsChange, onOpenNestedSubagent, agentTasks, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onOpenCollaborationSession, onError, sessionWorkflowEnabled, modelManagement, workflow, onImageIngestionNotice, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
266
+ export declare function ArtifactPanel({ contextUsageControls, artifacts, tabs, activeTabId, reviewChanges, selectedReviewPath, panelWidth, workspaceCwd, loading, restoring, error, onSelectTab, onSelectTurnCallsPrompt, onCloseTab, onOpenFilePreview, latestReviewAvailable, onOpenLatestReview, onOpenTerminal, onOpenTrajectory, trajectoryTabId, onOpenWebPreview, onWebPreviewChange, items, sideTaskAvailable, sideTasks, sideTasksLoading, onCreateSideTask, onOpenSideTask, onCreateSideTaskSession, onSideTaskCreated, onSideTaskTitleChange, onSideTaskInitialPromptRefused, onNestedRightPanelOpen, onNestedArtifactsChange, onOpenNestedSubagent, agentTasks, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onError, sessionWorkflowEnabled, modelManagement, workflow, onImageIngestionNotice, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
274
267
  export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { TrajectoryFilter } from '../../trajectory/filterTrajectory';
7
+ export declare function TrajectoryFilters({ value, onChange, onNavigate, onClear, count, position, truncatedCount, }: {
8
+ value: TrajectoryFilter;
9
+ onChange: (filter: TrajectoryFilter) => void;
10
+ onNavigate: (direction: 1 | -1, filter?: TrajectoryFilter) => void;
11
+ onClear: () => void;
12
+ count: number;
13
+ position: number;
14
+ truncatedCount: number;
15
+ }): import("react/jsx-runtime").JSX.Element;
@@ -4,13 +4,15 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { TrajectoryRow } from '../../trajectory/types';
7
- export declare function TrajectoryInspector({ row, title, stale, turnSelected, hiddenByRange, hiddenByCollapse, onReveal, onClearRange, onClose, }: {
7
+ export declare function TrajectoryInspector({ row, title, stale, turnSelected, hiddenByRange, hiddenByCollapse, hiddenByFilter, onClearFilter, onReveal, onClearRange, onClose, }: {
8
8
  row?: TrajectoryRow;
9
9
  title?: string;
10
10
  stale?: boolean;
11
11
  turnSelected?: boolean;
12
12
  hiddenByRange: boolean;
13
13
  hiddenByCollapse: boolean;
14
+ hiddenByFilter?: boolean;
15
+ onClearFilter?: () => void;
14
16
  onReveal: () => void;
15
17
  onClearRange: () => void;
16
18
  onClose: () => void;
@@ -74,7 +74,7 @@ export interface paths {
74
74
  };
75
75
  get?: never;
76
76
  put?: never;
77
- /** @description Maps workspaceId/cwdRelative to public Workspace selection without using environmentId or absolute cwd. Shares G0's opt-in initial file-tool Turn admission and fixed server-owned profile with public Session creation. The Session creator may submit later Turns and cancel its running Turns under the same opt-in, and may rename the Session, while the creator currently holds Workspace read and create grants on a registry row whose state is ACTIVE and the Session is an active, undeleted qwen-code Session on the frozen execution profile; Workspace close follows its separate close capability and lifecycle admission; archive, delete and unarchive follow their separate retention capabilities after reliable Workspace close; controlled same-Workspace cwd changes ship through the durable cwd_change operations (v1.32). The per-caller workspaceTurns capability on this surface advertises the same rule. Freeze selection with the original idempotency key; admission does not prove physical directory readiness. */
77
+ /** @description Maps workspaceId/cwdRelative to public Workspace selection without using environmentId or absolute cwd. Shares G0's opt-in initial file-tool Turn admission and fixed server-owned profile with public Session creation. The Session creator may submit later Turns under the same opt-in with current read and create grants on the bound ACTIVE Workspace generation and storage. Cancellation of running work requires the creator’s read grant and the opt-in, even after create authority is revoked (a live cancel reuses the owner's resident Harness attachment; a cold connector cache passively re-attaches for a persisted cancellation after frozen identity checks, independently of current creation grants, registry state or mount readiness; new work still rechecks execution authority); Workspace close follows its separate close capability and lifecycle admission; archive and unarchive follow retention capabilities after reliable Workspace close; delete supports either L3 idle ACTIVE files Sessions or L2 CLOSED/ARCHIVED Sessions; controlled same-Workspace cwd changes ship through the durable cwd_change operations (v1.32). The per-caller workspaceTurns capability on this surface advertises current submit and rename admission; it does not gate cancellation. Freeze selection with the original idempotency key; admission does not prove physical directory readiness. */
78
78
  post: operations["webShellCreateSession"];
79
79
  delete?: never;
80
80
  options?: never;
@@ -224,7 +224,7 @@ export interface paths {
224
224
  };
225
225
  get?: never;
226
226
  put?: never;
227
- /** @description Uses the same close admission, creator authorization and durable cleanup semantics as the public close route. sessionClose describes deployment support; it does not grant actor authorization. */
227
+ /** @description Uses the same close admission, creator authorization and durable cleanup semantics as the public close route. sessionClose describes deployment support; it does not grant actor authorization. New L3 Workspace close operations run SessionEnd only, retain data, and finish after durable effects verification and original Runtime stop. SessionDelete is reserved for ACTIVE delete. Missing protocol support rejects new admission; previously admitted operations retain their saved protocol. Unknown outcomes remain recovery_blocked. */
228
228
  post: operations["closeWebShellSession"];
229
229
  delete?: never;
230
230
  options?: never;
@@ -258,7 +258,7 @@ export interface paths {
258
258
  };
259
259
  get?: never;
260
260
  put?: never;
261
- /** @description Workspace-bound delete accepts only closed or archived Sessions with completed reliable-close evidence and the creator with current read access. Active deletion returns 409 session_state_conflict. Completion atomically retires private recovery/publication access with the tombstone, operation receipt and terminal event; it calls neither Harness nor Runtime and erases no shared Workspace files or backup bytes. Operations remain readable under current read grants; the same authorized actor/key can replay after deletion. A readable non-creator returns 403; missing close evidence returns 409 workspace_unavailable. */
261
+ /** @description Workspace-bound ACTIVE deletion supports idle hosted-workspace-files/1 Sessions when L3 lifecycle protocol and reliable Runtime stop are available. Only the creator with current read access may admit it; accepted, running, cancelling or approval-waiting Turns return 409 turn_active. Admission persists a lifecycle-only execution fence and a versioned actor-scoped operation. SessionEnd settles before SessionDelete; committed Hook results are verified in Session Store and saved before permanent draining, attachment cleanup and original worker stop. Unknown outcomes or missing original stop evidence remain recovery_blocked and are never replayed on a replacement worker. CLOSED/ARCHIVED deletion retains L2: completed reliable-close evidence is required and no Harness or Hook is invoked. Completion atomically commits retirement, tombstone, receipt and terminal event, retaining shared Workspace files and neighboring holders. Authorized same-actor/key replays return the original operation, including after deletion; readable non-creators return 403. Missing lifecycle capability or close evidence returns 409 workspace_unavailable. */
262
262
  post: operations["deleteWebShellSession"];
263
263
  delete?: never;
264
264
  options?: never;
@@ -528,10 +528,10 @@ export interface components {
528
528
  /** @default false */
529
529
  actions: boolean;
530
530
  /**
531
- * @description True when the caller may submit later Turns of this Workspace-bound Session, cancel its running Turns and rename it: the deployment enables Workspace files, the caller created the Session and currently holds Workspace read and create grants on a registry row whose state is ACTIVE, and the Session is an active qwen-code Session on the frozen execution profile. False for every other caller and for unbound Sessions, which do not use it.
531
+ * @description True when the caller may submit later Turns of this Workspace-bound Session: the deployment enables Workspace files, the caller created the Session and currently holds Workspace read and create grants on a registry row whose state is ACTIVE and still carries the Workspace generation and storage identity the Session was bound to, and the Session is an active, undeleted qwen-code Session on the frozen execution profile. Cancelling only aborts work that is already running, so the creator may cancel a running Turn even when this is false, as long as they can still read the Workspace and the deployment still enables Workspace files. False for every other caller and for unbound Sessions, which do not use it.
532
532
  * @default false
533
533
  */
534
- workspaceTurns?: boolean;
534
+ workspaceTurns: boolean;
535
535
  tasks: boolean;
536
536
  artifacts: boolean;
537
537
  /**
@@ -550,7 +550,7 @@ export interface components {
550
550
  */
551
551
  sessionUnarchive?: boolean;
552
552
  /**
553
- * @description Optional support for this retention operation. For a Workspace-bound Session requires completed reliable-close evidence; authorization and source-state validation still apply.
553
+ * @description Optional support capability. ACTIVE Workspace files Sessions require L3 lifecycle protocol and reliable original Runtime stop; CLOSED/ARCHIVED Sessions use independent L2 close evidence. Current creator/read authorization and idle/source-state admission checks still apply. The aggregate session lifecycle capability is unchanged.
554
554
  * @default false
555
555
  */
556
556
  sessionDelete?: boolean;
@@ -640,6 +640,8 @@ export interface components {
640
640
  code: string;
641
641
  message: string;
642
642
  request_id: string;
643
+ /** @description Present on Runtime Broker refusals; true permits retry, false is a definite refusal. Other errors may omit this field. */
644
+ retryable?: boolean;
643
645
  /** Format: int64 */
644
646
  replay_floor_sequence?: number | null;
645
647
  /** Format: int64 */
@@ -1097,7 +1099,7 @@ export interface components {
1097
1099
  "application/json": components["schemas"]["ErrorEnvelope"];
1098
1100
  };
1099
1101
  };
1100
- /** @description State, idempotency, or recovery conflict. */
1102
+ /** @description State, idempotency, or recovery conflict. New Workspace-scoped admissions return workspace_unavailable with retryable=false while an offline Workspace migration holds the storage fence; authorized durable replays retain their existing behavior. */
1101
1103
  Conflict: {
1102
1104
  headers: {
1103
1105
  [name: string]: unknown;
@@ -58,6 +58,8 @@ export declare class JavaManagedAgentClient {
58
58
  cancelTurn(request: Schemas['WebShellCancelRequest'], signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
59
59
  queryActions(request: Schemas['WebShellActionQueryRequest'], signal?: AbortSignal): Promise<JavaAgentActionPage>;
60
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']>;
61
63
  getToolResult(sessionId: string, itemId: string, signal?: AbortSignal): Promise<{
62
64
  result: components["schemas"]["PublicToolResult"];
63
65
  access: components["schemas"]["ArtifactAccess"];
@@ -1,9 +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
3
  import type { DaemonMessageAuthor } from '../../adapters/messageTypes';
4
4
  interface AssistantMessageProps {
5
5
  content: string;
6
6
  author?: DaemonMessageAuthor;
7
+ /** A workspace agent's reply: its run status, error, steps and tokens. */
8
+ agentMessage?: QwenAgentMessageMeta;
7
9
  isStreaming?: boolean;
8
10
  timestamp?: number;
9
11
  onBranchSession?: () => void | Promise<void>;
@@ -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;
@@ -58,8 +58,6 @@ export interface WebShellSidebarWorkspaceOverviewOptions {
58
58
  }
59
59
  export type { WorkspaceManagementTarget, WorkspaceOverviewItem };
60
60
  interface WebShellSidebarProps {
61
- selectedCollaborationId?: string;
62
- onOpenCollaboration?: (id: string, cwd: string) => void;
63
61
  collapsed: boolean;
64
62
  layout?: 'single' | 'rail';
65
63
  activePage?: string;
@@ -67,7 +65,7 @@ interface WebShellSidebarProps {
67
65
  onOpenHome?: () => void;
68
66
  onCollapsedChange: (collapsed: boolean) => void;
69
67
  onOpenSettings: () => void;
70
- onOpenAgents?: (view?: 'agents' | 'tasks' | 'runtime') => void;
68
+ onOpenAgents?: (view?: 'agents' | 'squads' | 'runtime') => void;
71
69
  onOpenPlugins: () => void;
72
70
  onOpenChannels: () => void;
73
71
  onOpenLive?: () => void;
@@ -158,4 +156,4 @@ interface WebShellSidebarProps {
158
156
  onLoadStandaloneSession?: (sessionId: string) => Promise<void> | void;
159
157
  onStandaloneNotice?: (message: string) => void;
160
158
  }
161
- export declare function WebShellSidebar({ selectedCollaborationId, onOpenCollaboration, 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;
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;
@@ -9,7 +9,6 @@ export interface WorkspaceHeaderActionsContext {
9
9
  gitBranch: string | null | undefined;
10
10
  }
11
11
  interface WorkspaceSectionProps {
12
- additionalSessions?: readonly DaemonSessionSummary[];
13
12
  workspace: DaemonWorkspaceCapability;
14
13
  remote?: boolean;
15
14
  renderHeader?: (expanded: boolean) => ReactNode;
@@ -118,5 +117,5 @@ interface WorkspaceSectionProps {
118
117
  /** Commit entry for the same picker; the row still opens without it. */
119
118
  onOpenCommit?: (workspaceCwd: string) => void;
120
119
  }
121
- export declare function WorkspaceSection({ additionalSessions, 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
+ 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;
122
121
  export {};
@@ -3,9 +3,10 @@
3
3
  * Copyright 2026 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { type JoinToken } from './add-runtime-dialog';
6
+ import { type ConnectExistingInput, type JoinCoordinatorInput, type JoinToken } from './add-runtime-dialog';
7
7
  import { type AgentShare, type AgentShareSummary } from './share-agent-dialog';
8
- import { type AgentProgramView, type RoutingPreviewTarget, type ThreadSummaryView } from './agents-view-logic';
8
+ import { type AgentProgramView } from './agents-view-logic';
9
+ import { type SquadsSectionProps } from './squads-section';
9
10
  /**
10
11
  * A change to one agent's configuration. Absent leaves a field alone; `null`
11
12
  * clears the override and returns the agent to what its definition says.
@@ -19,34 +20,27 @@ export interface AgentConfigPatch {
19
20
  maxConcurrentRuns?: number | null;
20
21
  execution?: {
21
22
  mode: 'local';
23
+ /** Program on this computer; Qwen Code when absent. */
24
+ provider?: AgentProgramView;
22
25
  } | {
23
26
  mode: 'managed-host';
24
27
  hostIds: string[];
25
28
  provider?: AgentProgramView;
26
29
  };
27
30
  }
28
- /** What every agent in this workspace may do. A property of the subsystem. */
29
- export interface AgentCapabilitiesView {
30
- readOnly: boolean;
31
- allowed: readonly string[];
32
- threadTools: readonly string[];
33
- }
34
31
  export interface ThreadsPageProps {
35
- onConnectRemoteHost?: (input: {
36
- remoteUrl: string;
37
- remoteToken: string;
38
- remoteCwd: string;
39
- serverUrl: string;
40
- provider: 'qwen';
41
- allowHttp: boolean;
42
- }) => Promise<boolean>;
43
- createError?: string;
32
+ onConnectRemoteHost?: (input: ConnectExistingInput) => Promise<boolean>;
33
+ /** Joins this daemon to another coordinator as one of its runtimes. */
34
+ onJoinCoordinator?: (input: JoinCoordinatorInput) => Promise<boolean>;
44
35
  agents: readonly WorkspaceAgentSummaryView[];
45
- threads: readonly ThreadSummaryView[];
46
36
  runtimes?: readonly WorkspaceAgentRuntimeView[];
47
37
  view: AgentWorkspaceView;
48
38
  onViewChange: (view: AgentWorkspaceView) => void;
49
- onOpenThread: (threadId: string) => void;
39
+ /**
40
+ * Puts `@name ` into the chat composer. Absent hides the agent card's
41
+ * mention button.
42
+ */
43
+ onMentionAgent?: (name: string) => void;
50
44
  onDeleteAgent: (agentId: string) => void;
51
45
  onSetAgentEnabled: (agentId: string, enabled: boolean) => void;
52
46
  onUpdateAgent?: (agentId: string, patch: AgentConfigPatch) => void;
@@ -62,15 +56,11 @@ export interface ThreadsPageProps {
62
56
  list: (agentId: string) => Promise<AgentShareSummary[]>;
63
57
  revoke: (agentId: string, callerId: string) => Promise<unknown>;
64
58
  };
65
- capabilities?: AgentCapabilitiesView;
66
- onCreateThread: (input: NewThread) => Promise<boolean> | void;
67
- workspaceCwd?: string;
68
- workspaces?: readonly {
69
- cwd: string;
70
- }[];
71
- onWorkspaceChange?: (cwd: string) => void;
72
- onPreviewThread?: (assignee?: string) => void;
73
- createPreview?: readonly RoutingPreviewTarget[];
59
+ /**
60
+ * The workspace's squads and their actions. Absent (a daemon without squad
61
+ * routes, or not loaded yet) shows the Squads view empty, with no New squad.
62
+ */
63
+ squads?: Pick<SquadsSectionProps, 'squads' | 'onCreate' | 'onUpdate' | 'onRetire'>;
74
64
  pending?: boolean;
75
65
  }
76
66
  export interface WorkspaceAgentSummaryView {
@@ -86,16 +76,12 @@ export interface WorkspaceAgentSummaryView {
86
76
  maxConcurrentRuns?: number;
87
77
  execution?: AgentConfigPatch['execution'];
88
78
  enabled: boolean;
89
- status: 'offline' | 'idle' | 'working' | 'blocked' | 'error';
79
+ status: 'offline' | 'idle' | 'working' | 'error';
90
80
  /** Absent from a daemon older than runtimes; that agent runs here. */
91
81
  runtime?: WorkspaceAgentRuntimeView;
92
82
  /** Set once the identity is retired: it keeps its posts and takes no work. */
93
83
  retiredAt?: number;
94
- workingOn?: {
95
- id: string;
96
- title: string;
97
- state: 'working' | 'finishing' | 'stopping';
98
- };
84
+ /** Queued session-agent runs waiting for this agent. */
99
85
  waiting: number;
100
86
  }
101
87
  export interface WorkspaceAgentRuntimeView {
@@ -103,19 +89,21 @@ export interface WorkspaceAgentRuntimeView {
103
89
  kind: 'local' | 'external';
104
90
  label: string;
105
91
  provider: string;
106
- /** Program ids the runtime reported it can run. */
92
+ /**
93
+ * Program ids (`qwen` | `claude` | `codex`) the runtime reported it can run,
94
+ * the local daemon included (from its program probe). None means Qwen Code.
95
+ */
107
96
  programs?: readonly string[];
108
97
  status: 'online' | 'offline';
109
98
  workspaceId?: string;
110
99
  workspaceCwd?: string;
111
- hostSessionId?: string;
112
100
  lastSeenAt?: number;
113
101
  agentCount?: number;
114
102
  sessionCount?: number;
115
103
  runningTaskCount?: number;
116
104
  queuedTaskCount?: number;
117
105
  }
118
- export type AgentWorkspaceView = 'agents' | 'tasks' | 'runtime';
106
+ export type AgentWorkspaceView = 'agents' | 'squads' | 'runtime';
119
107
  export interface NewWorkspaceAgent {
120
108
  name: string;
121
109
  description?: string;
@@ -125,22 +113,10 @@ export interface NewWorkspaceAgent {
125
113
  maxConcurrentRuns?: number;
126
114
  execution?: AgentConfigPatch['execution'];
127
115
  }
128
- export type ThreadPriorityChoice = 'urgent' | 'high' | 'normal' | 'low';
129
- export interface NewThread {
130
- title: string;
131
- body: string;
132
- /** What "done" means. Sent only when written, so a blank stays absent. */
133
- acceptanceCriteria?: string;
134
- priority?: ThreadPriorityChoice;
135
- assignee?: string;
136
- /** The first post; the assignee starts from it. */
137
- message?: string;
138
- }
139
116
  /**
140
- * The thread list, grouped by what each thread needs.
141
- *
142
- * Recency sorting is the obvious default and it buries the two threads that
143
- * need a person under twenty that do not. Grouping answers the question
144
- * someone actually opens this page with.
117
+ * The Agents page: the workspace's agent roster, its squads, and the runtimes
118
+ * agents run on.
119
+ * Agents are addressed by @-mention in a chat session; this page only manages
120
+ * who they are and where they run.
145
121
  */
146
- export declare function ThreadsPage({ agents, threads, runtimes, view, onViewChange, onOpenThread, onDeleteAgent, onSetAgentEnabled, onUpdateAgent, onOpenAgentBuilder, onOpenDefinitions, onCreateJoinToken, onRemoveRuntime, onConnectRemoteHost, hostServerUrl, shares, capabilities, onCreateThread, workspaceCwd, workspaces, onWorkspaceChange, createError, onPreviewThread, createPreview, pending, }: ThreadsPageProps): import("react/jsx-runtime").JSX.Element;
122
+ export declare function ThreadsPage({ agents, runtimes, view, onViewChange, onMentionAgent, onDeleteAgent, onSetAgentEnabled, onUpdateAgent, onOpenAgentBuilder, onOpenDefinitions, onCreateJoinToken, onRemoveRuntime, onConnectRemoteHost, onJoinCoordinator, hostServerUrl, shares, squads, pending, }: ThreadsPageProps): import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,8 @@ export interface RuntimeSummary {
8
8
  kind: 'local' | 'external';
9
9
  label: string;
10
10
  provider: string;
11
- providers?: readonly string[];
11
+ /** Program ids the runtime reported it can run. */
12
+ programs?: readonly string[];
12
13
  status: 'online' | 'offline';
13
14
  }
14
15
  export interface JoinToken {
@@ -22,9 +23,32 @@ export interface ConnectExistingInput {
22
23
  remoteToken: string;
23
24
  remoteCwd: string;
24
25
  serverUrl: string;
25
- provider: 'qwen';
26
26
  allowHttp: boolean;
27
27
  }
28
+ /** `POST /hosts/connect`: this daemon joins another coordinator as a runtime. */
29
+ export interface JoinCoordinatorInput {
30
+ serverUrl: string;
31
+ workspaceId: string;
32
+ enrollmentToken: string;
33
+ allowHttp: boolean;
34
+ }
35
+ /**
36
+ * Reads the link a coordinator shows under Runtime › Add runtime,
37
+ * `<coordinator URL>/join/<workspace id>`. Same rules as `parseJoinLink` in
38
+ * `packages/cli/src/serve/agent-host-join.ts` (keep the two in step); returns
39
+ * undefined instead of throwing so a form can validate as the user types.
40
+ */
41
+ export declare function parseJoinLink(link: string): {
42
+ serverUrl: string;
43
+ workspaceId: string;
44
+ } | undefined;
45
+ /**
46
+ * The terminal equivalent of "Join a coordinator": `qwen agents join <link>`
47
+ * asks the running local `qwen serve` to join with the same link (it calls
48
+ * that daemon's `/hosts/connect`, exactly as this dialog does). The token
49
+ * rides in the environment, never in argv.
50
+ */
51
+ export declare function joinCoordinatorCommand(link: string, token: string, allowHttp: boolean): string;
28
52
  export declare function findReplacementRuntime(runtimes: readonly RuntimeSummary[], knownIds: ReadonlySet<string>, supersededHostId: string, replacementHostId?: string): RuntimeSummary | undefined;
29
53
  export declare function joinCommands(address: string, join: JoinToken): {
30
54
  qwen: string;
@@ -33,11 +57,11 @@ export declare function joinCommands(address: string, join: JoinToken): {
33
57
  };
34
58
  /**
35
59
  * "Add runtime": hand another machine a one-line command, then wait for it to
36
- * show up. The dialog notices the new runtime through the same live stream
60
+ * show up. The dialog notices the new runtime through the same roster poll
37
61
  * that updates the Runtime tab, so it flips from waiting to connected by
38
62
  * itself (the Tailscale/Vercel "add device" pattern).
39
63
  */
40
- export declare function AddRuntimeDialog({ open, onOpenChange, serverUrl, runtimes, onCreateJoinToken, onConnectExisting, onCreateAgentOn, replacementTarget, }: {
64
+ export declare function AddRuntimeDialog({ open, onOpenChange, serverUrl, runtimes, onCreateJoinToken, onConnectExisting, onJoinCoordinator, onCreateAgentOn, replacementTarget, }: {
41
65
  open: boolean;
42
66
  onOpenChange: (open: boolean) => void;
43
67
  /** The coordinator address this page talks to; the link's default. */
@@ -45,6 +69,8 @@ export declare function AddRuntimeDialog({ open, onOpenChange, serverUrl, runtim
45
69
  runtimes: readonly RuntimeSummary[];
46
70
  onCreateJoinToken: (supersedesHostId?: string) => Promise<JoinToken>;
47
71
  onConnectExisting?: (input: ConnectExistingInput) => Promise<boolean>;
72
+ /** Joins THIS daemon to another coordinator; absent hides that entry. */
73
+ onJoinCoordinator?: (input: JoinCoordinatorInput) => Promise<boolean>;
48
74
  onCreateAgentOn?: (runtimeId: string) => void;
49
75
  replacementTarget?: RuntimeSummary;
50
76
  }): import("react/jsx-runtime").JSX.Element;