@qwen-code/web-shell 0.24.6 → 0.24.7-nightly.20260929.b906f937ec

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 (57) hide show
  1. package/README.md +10 -0
  2. package/dist/ThreadsRoute-DIWrKAvJ.js +1726 -0
  3. package/dist/daemon-react-sdk.js +1 -1
  4. package/dist/index-BQmwkK6l.js +121229 -0
  5. package/dist/index.js +69 -118171
  6. package/dist/sw.js +1 -1
  7. package/dist/{toolNames-C6S4xtsA.js → toolNames-C6G4mcM3.js} +5485 -4631
  8. package/dist/transcript.js +9384 -9198
  9. package/dist/types/adapters/messageTypes.d.ts +11 -0
  10. package/dist/types/components/BranchPickerPopover.d.ts +2 -1
  11. package/dist/types/components/ChatEditor.d.ts +1 -0
  12. package/dist/types/components/DesktopRelayControl.d.ts +51 -0
  13. package/dist/types/components/MessageList.d.ts +1 -0
  14. package/dist/types/components/agents/AgentCreatePage.d.ts +10 -1
  15. package/dist/types/components/agents/AgentsManagerPage.d.ts +5 -1
  16. package/dist/types/components/artifacts/ArtifactPanel.d.ts +8 -1
  17. package/dist/types/components/artifacts/TrajectoryInspector.d.ts +15 -0
  18. package/dist/types/components/composer/AddMenu.d.ts +5 -1
  19. package/dist/types/components/dialogs/BranchSessionDialog.d.ts +6 -0
  20. package/dist/types/components/dialogs/GitDiffDialog.d.ts +2 -1
  21. package/dist/types/components/dialogs/GitLogDialog.d.ts +2 -1
  22. package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +6 -0
  23. package/dist/types/components/managed/generated/managed-agent-api.d.ts +1074 -0
  24. package/dist/types/components/managed/java-managed-agent-client.d.ts +32 -113
  25. package/dist/types/components/managed/java-managed-agent-provider.d.ts +1 -0
  26. package/dist/types/components/managed/managed-agent-provider.d.ts +31 -1
  27. package/dist/types/components/messages/AssistantMessage.d.ts +3 -0
  28. package/dist/types/components/messages/AuthorAvatar.d.ts +16 -0
  29. package/dist/types/components/messages/McpApp.d.ts +1 -1
  30. package/dist/types/components/messages/toolFormatting.d.ts +2 -0
  31. package/dist/types/components/panels/EnvironmentPanel.d.ts +2 -1
  32. package/dist/types/components/sidebar/UpdateControl.d.ts +10 -0
  33. package/dist/types/components/sidebar/WebShellSidebar.d.ts +6 -3
  34. package/dist/types/components/sidebar/WorkspaceSection.d.ts +2 -1
  35. package/dist/types/components/sidebar/sessionSearch.d.ts +2 -1
  36. package/dist/types/components/workspace-agents/LazyThreadsRoute.d.ts +7 -0
  37. package/dist/types/components/workspace-agents/ThreadChat.d.ts +30 -0
  38. package/dist/types/components/workspace-agents/ThreadView.d.ts +65 -0
  39. package/dist/types/components/workspace-agents/ThreadsPage.d.ts +97 -0
  40. package/dist/types/components/workspace-agents/ThreadsRoute.d.ts +23 -0
  41. package/dist/types/components/workspace-agents/agent-events.d.ts +50 -0
  42. package/dist/types/components/workspace-agents/agents-view-logic.d.ts +176 -0
  43. package/dist/types/components/workspace-agents/messages.d.ts +16 -0
  44. package/dist/types/components/workspace-agents/messages.transcript-stub.d.ts +12 -0
  45. package/dist/types/components/workspace-agents/threads-api.d.ts +43 -0
  46. package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +36 -0
  47. package/dist/types/components/workspace-agents/useProjectConversations.d.ts +10 -0
  48. package/dist/types/customization.d.ts +10 -0
  49. package/dist/types/daemon/session/transcript-page-table.d.ts +10 -1
  50. package/dist/types/daemon/session/types.d.ts +2 -2
  51. package/dist/types/desktop-relay/desktop-relay-client.d.ts +63 -0
  52. package/dist/types/mcpAppHostContext.d.ts +7 -0
  53. package/dist/types/settings/messages.d.ts +16 -0
  54. package/dist/types/settings/messages.transcript-stub.d.ts +12 -0
  55. package/dist/types/settings.d.ts +1 -0
  56. package/dist/types/trajectory/summarizeTrajectory.d.ts +20 -0
  57. package/package.json +3 -1
@@ -0,0 +1,176 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @fileoverview Presentation logic for the agents-and-threads surface.
8
+ *
9
+ * Everything here is pure and testable without a browser, following the same
10
+ * split as `agents-manager-logic.ts`. Two rules it exists to enforce:
11
+ *
12
+ * 1. **The server decides a thread's state; this file only renders it.** The
13
+ * thread resolver already returns a status *and* the sentence explaining it.
14
+ * Deriving a second, shorter vocabulary here would give the product two
15
+ * answers to "why is this blocked", and the shorter one would win because it
16
+ * is the one on screen.
17
+ * 2. **A label never asserts a cause its reason code does not carry.** Copy
18
+ * that conflates two causes sends people to fix the wrong thing — Multica
19
+ * learned this when "runtime offline" wording sent users to reconnect a
20
+ * machine that was already connected. Each refusal below names its own fix.
21
+ */
22
+ import type { AgentPermissionPromptView, AgentRunStepView } from './agent-events';
23
+ /**
24
+ * Opens a thread body that carries the conversation it was started from. The
25
+ * agents read it as-is; the chat view shows it folded instead of as a message.
26
+ */
27
+ export declare const CONVERSATION_CONTEXT_PREFIX = "Context from the conversation this was sent from:\n\n";
28
+ /** Wire shape of a thread row, as the REST layer returns it. */
29
+ export interface ThreadSummaryView {
30
+ id: string;
31
+ title: string;
32
+ status: 'open' | 'in_progress' | 'blocked' | 'in_review' | 'done' | 'cancelled';
33
+ /** The resolver's own sentence. Rendered verbatim; never re-derived. */
34
+ reason: string;
35
+ updatedAt: number;
36
+ liveRunCount: number;
37
+ assigneeName?: string;
38
+ parentThreadId?: string;
39
+ }
40
+ export interface ThreadGroup {
41
+ key: 'needs_you' | 'running' | 'idle' | 'done';
42
+ threads: ThreadSummaryView[];
43
+ /** Finished work is evidence, not a task, so it starts collapsed. */
44
+ collapsedByDefault: boolean;
45
+ }
46
+ /**
47
+ * Groups threads by what they need, not by recency.
48
+ *
49
+ * Recency is the default sort and it buries the two threads that need a person
50
+ * under twenty that do not. `blocked` and `in_review` share one group because
51
+ * they are the same query for the reader — this is waiting on me — even though
52
+ * one is a question and the other is finished work. What tells them apart is
53
+ * each thread's own sentence, which is already on the row.
54
+ */
55
+ export declare function groupThreads(threads: readonly ThreadSummaryView[]): ThreadGroup[];
56
+ /** Which threads carry the single attention treatment. */
57
+ export declare function needsAttention(thread: ThreadSummaryView): boolean;
58
+ /** Wire shape of one run, as the REST layer returns it. */
59
+ export interface RunView {
60
+ progress?: {
61
+ attempt?: number;
62
+ receivedAt: number;
63
+ activityAt: number;
64
+ /** A code: starting, thinking, responding, tool, awaiting_approval, stream_lost. */
65
+ stage: string;
66
+ /** Raw text such as a tool title; never UI copy. */
67
+ detail: string;
68
+ outputText?: string;
69
+ thoughtText?: string;
70
+ permission?: AgentPermissionPromptView;
71
+ /** The turn's latest tool calls, oldest first. */
72
+ steps?: AgentRunStepView[];
73
+ };
74
+ id: string;
75
+ agentId: string;
76
+ agentName: string;
77
+ agentColor?: string;
78
+ status: 'queued' | 'running' | 'finishing' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
79
+ closeKind?: 'waiting' | 'blocked' | 'review' | 'unclosed' | 'stranded';
80
+ closeAcknowledged: boolean;
81
+ failureStage?: string;
82
+ error?: string;
83
+ /** Why this run exists, e.g. "assigned by you", "mentioned by alice". */
84
+ trigger: string;
85
+ /** Queued runs of the same agent that start before this one. */
86
+ queueAhead?: number;
87
+ startedAt?: number;
88
+ endedAt?: number;
89
+ /** The agent session this run took its turn in, once one is bound. */
90
+ sessionId?: string;
91
+ }
92
+ export interface RunRow {
93
+ run: RunView;
94
+ /** What this run is doing or left behind, in the reader's words. */
95
+ state: string;
96
+ /** Live runs pin to the top; terminal runs collapse behind a count. */
97
+ live: boolean;
98
+ /** True when a person still owes this run an answer. */
99
+ outstanding: boolean;
100
+ }
101
+ /**
102
+ * Describes a run the way the reader asks about it.
103
+ *
104
+ * A failed run reports its failure whatever close it managed to record first,
105
+ * because the failure is the thing a person has to act on. A stranded run is
106
+ * the exception: nothing the agent did ended it.
107
+ */
108
+ export declare function describeRun(run: RunView, t: Translate): string;
109
+ /**
110
+ * Orders runs for the side panel: live first in start order, then terminal
111
+ * runs newest-first behind their count.
112
+ *
113
+ * The row carries no agent-availability indicator. Whether an agent is
114
+ * reachable is not this row's story — the run's own state is, and a second
115
+ * signal beside it competes for the same glance.
116
+ */
117
+ export declare function buildRunRows(runs: readonly RunView[], t: Translate): {
118
+ live: RunRow[];
119
+ past: RunRow[];
120
+ };
121
+ /**
122
+ * One line, not a bar. A budget is a limit you want to notice before it trips,
123
+ * not a goal you are filling, and a bar invites the second reading.
124
+ */
125
+ export declare function formatBudget(budget: {
126
+ turnsUsed: number;
127
+ turnLimit: number;
128
+ tokensUsed: number;
129
+ tokenLimit: number;
130
+ }, t: Translate): {
131
+ turns: string;
132
+ tokens: string;
133
+ scope: string;
134
+ };
135
+ /** One target's fate for a draft reply, as the server previews it. */
136
+ export interface RoutingPreviewTarget {
137
+ agentName: string;
138
+ willWake: boolean;
139
+ kind?: 'dispatch' | 'coalesce' | 'skip';
140
+ into?: 'queued' | 'running';
141
+ /** Present when `willWake` is false. A skip reason from the rules layer. */
142
+ reason?: string;
143
+ /** True when the name matched no agent, so it renders as a warning. */
144
+ unknown?: boolean;
145
+ }
146
+ /**
147
+ * What a refusal means, and what to do about it.
148
+ *
149
+ * Each entry names its own fix. Two reasons that look alike but need different
150
+ * fixes stay apart: a missing definition is repaired by pointing the agent at
151
+ * one that exists, while a disabled agent is repaired by enabling it, and copy
152
+ * that merged them would send the reader to the wrong screen.
153
+ */
154
+ export declare function explainSkip(reason: string, target: string, t: Translate): string;
155
+ /**
156
+ * A one-line summary of a preview, for the composer's collapsed state.
157
+ *
158
+ * Says who *will* run, because that is the consequence of pressing send. When
159
+ * nobody will, that is the headline, since it is the case the system used to
160
+ * swallow silently.
161
+ */
162
+ export declare function summarizePreview(targets: readonly RoutingPreviewTarget[], t: Translate): string;
163
+ type Translate = (key: string, vars?: Record<string, string | number>) => string;
164
+ /** "45 秒" or "6 分 45 秒": the one duration format the collaboration UI uses. */
165
+ export declare function formatElapsed(ms: number, t: Translate): string;
166
+ /**
167
+ * Why a run exists, in the reader's language. The server words this in
168
+ * English from a fixed set; anything outside it is shown as sent.
169
+ */
170
+ export declare function triggerLabel(trigger: string, t: Translate): string;
171
+ /**
172
+ * A thread's status reason in the reader's language. The server words it in
173
+ * English from a fixed set; anything outside it is shown as sent.
174
+ */
175
+ export declare function statusReasonLabel(reason: string, t: Translate): string;
176
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Agent collaboration strings (the Agent page, collaboration conversations,
8
+ * the @ picker's agent entries). Kept out of the main dictionary like Live
9
+ * Voice's: an exported transcript never renders these surfaces, so
10
+ * `vite.lib.config.ts` resolves this module to `messages.transcript-stub.ts`
11
+ * in `--mode transcript` and the transcript bundle stays within its budget.
12
+ */
13
+ type CollabMessage = string | ((vars?: Record<string, string | number>) => string);
14
+ export declare const COLLAB_MESSAGES_EN: Record<string, CollabMessage>;
15
+ export declare const COLLAB_MESSAGES_ZH: Record<string, CollabMessage>;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Stands in for `./messages` in the transcript build (`--mode transcript`).
8
+ * The transcript renderer has no collaboration surface, so its dictionary
9
+ * carries none of those strings.
10
+ */
11
+ export declare const COLLAB_MESSAGES_EN: {};
12
+ export declare const COLLAB_MESSAGES_ZH: {};
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { AgentCapabilitiesView, AgentConfigPatch, NewThread, NewWorkspaceAgent, WorkspaceAgentSummaryView } from './ThreadsPage';
7
+ import type { ThreadDetailView } from './ThreadView';
8
+ import type { RoutingPreviewTarget, ThreadSummaryView } from './agents-view-logic';
9
+ import { type AgentLiveEvent, type AgentStreamState } from './agent-events';
10
+ interface CreateThreadResult {
11
+ id: string;
12
+ }
13
+ export interface ThreadsApi {
14
+ listAgents(): Promise<{
15
+ agents: WorkspaceAgentSummaryView[];
16
+ capabilities?: AgentCapabilitiesView;
17
+ }>;
18
+ listThreads(): Promise<{
19
+ threads: ThreadSummaryView[];
20
+ }>;
21
+ getThread(id: string): Promise<ThreadDetailView>;
22
+ createAgent(input: NewWorkspaceAgent): Promise<unknown>;
23
+ deleteAgent(id: string): Promise<unknown>;
24
+ setAgentEnabled(id: string, enabled: boolean): Promise<unknown>;
25
+ updateAgent(id: string, patch: AgentConfigPatch): Promise<unknown>;
26
+ createThread(input: NewThread): Promise<CreateThreadResult>;
27
+ previewThread(assignee?: string): Promise<{
28
+ targets: RoutingPreviewTarget[];
29
+ }>;
30
+ assignThread(id: string, assignee?: string): Promise<unknown>;
31
+ previewReply(id: string, text: string): Promise<{
32
+ targets: RoutingPreviewTarget[];
33
+ }>;
34
+ postReply(id: string, text: string): Promise<unknown>;
35
+ markDone(id: string): Promise<unknown>;
36
+ cancelRun(threadId: string, runId: string): Promise<unknown>;
37
+ /** Live events; absent in tests and older daemons, which then poll. */
38
+ subscribe?(onEvent: (event: AgentLiveEvent) => void, onState: (state: AgentStreamState) => void): () => void;
39
+ /** Answers a tool approval an agent is waiting on. */
40
+ respondToPermission?(sessionId: string, requestId: string, optionId: string): Promise<unknown>;
41
+ }
42
+ export declare function createThreadsHttpApi(baseUrl: string, token: string | undefined, workspaceCwd: string): ThreadsApi;
43
+ export {};
@@ -0,0 +1,36 @@
1
+ import { type ComponentProps } from 'react';
2
+ import type { ChatEditor } from '../ChatEditor';
3
+ import type { WebShellAtProvider } from '../../customization';
4
+ import type { useI18n } from '../../i18n';
5
+ type Submit = ComponentProps<typeof ChatEditor>['onSubmit'];
6
+ /**
7
+ * The tail of the conversation an agent was mentioned from, so a thread
8
+ * started mid-conversation does not begin blind.
9
+ */
10
+ export declare function conversationContext(messages: readonly {
11
+ role: string;
12
+ content?: unknown;
13
+ }[]): string;
14
+ export declare function useAgentChatEntry({ enabled, cwd, baseUrl, token, onSubmit, onOpen, onError, getContext, onCreateAgent, t, }: {
15
+ enabled: boolean;
16
+ cwd?: string;
17
+ baseUrl: string;
18
+ token?: string;
19
+ onSubmit: Submit;
20
+ onOpen: (id: string, cwd: string) => void;
21
+ onError: (message: string) => void;
22
+ /** The conversation so far, when mentioning from a chat that has one. */
23
+ getContext?: () => string;
24
+ /** Offered as the picker's last item: open the New agent page. */
25
+ onCreateAgent?: () => void;
26
+ /**
27
+ * The caller's translator. App calls this hook above its I18nProvider, where
28
+ * useI18n() would hand back the default that echoes keys.
29
+ */
30
+ t: ReturnType<typeof useI18n>['t'];
31
+ }): {
32
+ providers: WebShellAtProvider[];
33
+ 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;
34
+ pending: boolean;
35
+ };
36
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { DaemonSessionSummary } from '@qwen-code/sdk/daemon';
2
+ export declare const COLLABORATION_SOURCE = "workspace_collaboration";
3
+ export declare function useProjectConversations(cwds: readonly string[]): {
4
+ scope: string;
5
+ sessions: DaemonSessionSummary[];
6
+ error?: string;
7
+ } | {
8
+ sessions: never[];
9
+ error: undefined;
10
+ };
@@ -362,6 +362,11 @@ export interface WebShellAtItem {
362
362
  iconTooltip?: string;
363
363
  insertText?: string;
364
364
  composerTag?: WebShellComposerTag;
365
+ /**
366
+ * Makes the item an action instead of a reference: choosing it removes the
367
+ * typed `@query` and calls this, inserting nothing.
368
+ */
369
+ onSelect?: () => void;
365
370
  }
366
371
  export type WebShellBuiltinAtProviderId = 'files' | 'extensions' | 'mcp-resources';
367
372
  export type WebShellBuiltinAtProvidersConfig = boolean | readonly WebShellBuiltinAtProviderId[] | {
@@ -389,6 +394,11 @@ export interface WebShellAtProvider {
389
394
  order?: number;
390
395
  tabs?: readonly WebShellAtProviderTab[];
391
396
  renderItem?: WebShellAtItemRenderer;
397
+ /**
398
+ * Claims a typed `@query` that names no category, so it searches this
399
+ * provider instead of falling back to files.
400
+ */
401
+ claimsTypedQuery?(query: string): boolean;
392
402
  search(params: {
393
403
  query: string;
394
404
  signal: AbortSignal;
@@ -128,7 +128,16 @@ export declare class HistoricalTranscriptPageTable {
128
128
  private admitBoundaryPage;
129
129
  private materializePage;
130
130
  private pageFromBlocks;
131
- private assertPageFits;
131
+ /**
132
+ * Return the page when it fits the budget. When it does not, degrade
133
+ * per document before failing per page: retained MCP App HTML is the one
134
+ * payload whose loss renderers absorb via `fallbackText`, and a single
135
+ * 4 MiB App document is estimated at twice its size (UTF-16 code units
136
+ * times two), so two of them would otherwise push a whole page — up to
137
+ * `WEB_SHELL_HISTORY_PAGE_SIZE` records — into a permanent, non-retryable
138
+ * `unavailable`. Only a page with nothing left to degrade fails closed.
139
+ */
140
+ private fitPageWithinBudget;
132
141
  private withNewerRequest;
133
142
  private nextBoundary;
134
143
  private finishBoundaryWithoutPage;
@@ -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, DaemonCapabilities, DaemonBackgroundTurn, DaemonEvent, DaemonApprovalMode, DaemonApprovalModeResult, DaemonAvailableCommand, DaemonForkSessionResult, DaemonInputAnnotation, DaemonSessionBtwResult, DaemonSessionGenerationEvent, DaemonSessionAttachmentReference, DaemonSessionAttachmentData, DaemonMidTurnMessageResult, DaemonMidTurnMessagesResult, DaemonRemoveMidTurnMessageResult, DaemonPendingPromptsResult, DaemonRemovePendingPromptResult, DaemonSessionContextStatus, DaemonSessionSavedWorkflowDetail, DaemonSessionContextUsageStatus, DaemonSessionRecapResult, DaemonRewindResult, DaemonRewindSnapshotInfo, DaemonSession, DaemonSessionSummary, DaemonSessionSupportedCommandsStatus, 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, DaemonPendingPromptsResult, DaemonRemovePendingPromptResult, DaemonSessionContextStatus, DaemonSessionSavedWorkflowDetail, DaemonSessionContextUsageStatus, DaemonSessionRecapResult, DaemonRewindResult, DaemonRewindSnapshotInfo, DaemonSession, DaemonSessionSummary, DaemonSessionSupportedCommandsStatus, 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;
@@ -531,7 +531,7 @@ export interface DaemonSessionActions {
531
531
  listSources(): Promise<SessionSourcesResult>;
532
532
  upsertSource(source: SessionSourceInput): Promise<SessionSourceUpsertResult>;
533
533
  removeSource(sourceId: string): Promise<SessionSourceRemoveResult>;
534
- branchSession(name?: string, atRecordId?: string): Promise<{
534
+ branchSession(options?: DaemonBranchSessionRequest): Promise<{
535
535
  sessionId: string;
536
536
  displayName: string;
537
537
  switchStarted: boolean;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Talks to the desktop relay on the viewer's own computer: a loopback socket
8
+ * that `node-repl-mcp desktop-relay install` registers with launchd. The port
9
+ * is fixed on both sides (`packages/node-repl/src/desktop-relay/constants.ts`).
10
+ */
11
+ export declare const DESKTOP_RELAY_URL = "http://127.0.0.1:47821";
12
+ /**
13
+ * Pinned on purpose, never `@latest`. A `latest` build that predates the
14
+ * `desktop-relay` subcommand ignores argv and connects a stdio MCP server, so
15
+ * the command this panel hands out (with a Copy button, in exactly the
16
+ * `missing` state that command produced) would block on stdin and install
17
+ * nothing. `desktop-relay-client.test.ts` fails when the pin drifts from
18
+ * `packages/node-repl/package.json`, and `.github/workflows/cd-cua-driver.yml`
19
+ * must publish that version before the setup command can be used.
20
+ */
21
+ export declare const DESKTOP_RELAY_INSTALL_COMMAND = "npx -y @qwen-code/node-repl-mcp@0.1.7 desktop-relay install";
22
+ export type DesktopRelayRemotePhase = 'connecting' | 'registering' | 'connected' | 'stopped' | 'failed';
23
+ export interface DesktopRelayActive {
24
+ sessionId: string;
25
+ daemonUrl: string;
26
+ phase: DesktopRelayRemotePhase;
27
+ message?: string;
28
+ }
29
+ export type DesktopRelayProbe = {
30
+ kind: 'missing';
31
+ } | {
32
+ kind: 'permission-required';
33
+ } | {
34
+ kind: 'ready';
35
+ version: string;
36
+ active?: DesktopRelayActive;
37
+ };
38
+ export interface DesktopRelayConnectRequest {
39
+ daemonUrl: string;
40
+ sessionId: string;
41
+ token?: string;
42
+ workspace?: {
43
+ kind: 'id' | 'cwd';
44
+ value: string;
45
+ };
46
+ }
47
+ export type DesktopRelayConnectResult = {
48
+ ok: true;
49
+ } | {
50
+ ok: false;
51
+ code: string;
52
+ message?: string;
53
+ };
54
+ export type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
55
+ export declare function probeDesktopRelay(fetchImpl?: FetchLike, timeoutMs?: number): Promise<DesktopRelayProbe>;
56
+ /** Resolves once the person at the computer has answered its dialog. */
57
+ export declare function connectDesktopRelay(request: DesktopRelayConnectRequest, fetchImpl?: FetchLike, cancellation?: AbortSignal): Promise<DesktopRelayConnectResult>;
58
+ /**
59
+ * Revokes the approved session. Resolves `false` when the relay was unreachable
60
+ * or refused, so a caller can never report a revocation that did not happen.
61
+ * The next status probe shows whatever state is left.
62
+ */
63
+ export declare function disconnectDesktopRelay(fetchImpl?: FetchLike): Promise<boolean>;
@@ -1 +1,8 @@
1
+ import type { DaemonMcpAppToolCall, DaemonMcpAppToolResult } from '@qwen-code/sdk/daemon';
1
2
  export declare const McpAppHostContext: import("react").Context<string | undefined>;
3
+ export type McpAppToolCallRequest = DaemonMcpAppToolCall;
4
+ export declare const McpAppSessionContext: import("react").Context<string | undefined>;
5
+ export declare const McpAppToolsContext: import("react").Context<{
6
+ sessionId: string;
7
+ callTool: (request: McpAppToolCallRequest, signal: AbortSignal) => Promise<DaemonMcpAppToolResult>;
8
+ } | undefined>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Settings panel strings. Kept out of the main dictionary so the read-only
8
+ * transcript build can drop them — an exported transcript never renders the
9
+ * settings panel, yet every reader of an exported file downloads the whole
10
+ * dictionary. `vite.lib.config.ts` resolves this module to
11
+ * `messages.transcript-stub.ts` in `--mode transcript`.
12
+ */
13
+ type SettingsMessage = string | ((vars?: Record<string, string | number>) => string);
14
+ export declare const SETTINGS_MESSAGES_EN: Record<string, SettingsMessage>;
15
+ export declare const SETTINGS_MESSAGES_ZH: Record<string, SettingsMessage>;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Stands in for `./messages` in the transcript build (`--mode transcript`).
8
+ * The transcript renderer has no settings panel, so its dictionary carries
9
+ * none of those strings.
10
+ */
11
+ export declare const SETTINGS_MESSAGES_EN: {};
12
+ export declare const SETTINGS_MESSAGES_ZH: {};
@@ -53,6 +53,7 @@ declare const SETTING_KEYS: {
53
53
  readonly 'setting:scheduled-tasks': "experimental.cron";
54
54
  readonly 'setting:session-writer-lease': "experimental.sessionWriterLease";
55
55
  readonly 'setting:agent-team': "experimental.agentTeam";
56
+ readonly 'setting:agent-collaboration': "experimental.agentCollaboration";
56
57
  readonly 'setting:omni-media-delivery': "omni.enabled";
57
58
  readonly 'setting:artifacts': "experimental.artifact";
58
59
  readonly 'setting:tool-use-summaries': "experimental.emitToolUseSummaries";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { Trajectory } from './types';
7
+ export interface TrajectorySummary {
8
+ turnCount: number;
9
+ requestCount: number;
10
+ toolCount: number;
11
+ requestFailures: number;
12
+ toolFailures: number;
13
+ mainRequestMs?: number;
14
+ elapsedMs?: number;
15
+ activeMs?: number;
16
+ plottedCount: number;
17
+ missingStartCount: number;
18
+ missingTimingCount: number;
19
+ }
20
+ export declare function summarizeTrajectory(trajectory: Trajectory): TrajectorySummary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/web-shell",
3
- "version": "0.24.6",
3
+ "version": "0.24.7-nightly.20260929.b906f937ec",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/QwenLM/qwen-code.git",
@@ -80,6 +80,7 @@
80
80
  "@types/react-dom": "^19.0.0",
81
81
  "@vitejs/plugin-react": "^4.2.0",
82
82
  "jsdom": "^26.1.0",
83
+ "openapi-typescript": "^7.13.0",
83
84
  "postcss": "^8.5.17",
84
85
  "postcss-selector-parser": "^7.1.4",
85
86
  "react": "^19.2.0",
@@ -98,6 +99,7 @@
98
99
  "lint:fix": "cd ../.. && eslint packages/web-shell --ext .ts,.tsx --fix",
99
100
  "format:check": "cd ../.. && prettier --experimental-cli --check packages/web-shell",
100
101
  "typecheck": "tsc -p tsconfig.json --noEmit",
102
+ "generate:managed-agent-api": "node scripts/generate-managed-agent-api.mjs",
101
103
  "test": "vitest run --config vitest.config.ts",
102
104
  "test:ci": "vitest run --config vitest.config.ts",
103
105
  "test:coverage": "vitest run --config vitest.config.ts --coverage",