@qwen-code/web-shell 0.25.0 → 0.25.1-nightly.20261011.01d3e6d81a
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.
- package/dist/agents-route-BeUPyDqT.js +1546 -0
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-tVJkU24-.js → index-gPVpv8Cx.js} +51414 -48423
- package/dist/index.js +22 -22
- package/dist/sw.js +1 -1
- package/dist/{toolNames-CAeFJ9L9.js → toolNames-Co4lBbW-.js} +4058 -4051
- package/dist/transcript.js +9782 -9428
- package/dist/types/adapters/messageTypes.d.ts +8 -1
- package/dist/types/adapters/transcriptAdapter.d.ts +1 -0
- package/dist/types/components/ChatContextHeader.d.ts +3 -1
- package/dist/types/components/ChatEditor.d.ts +4 -7
- package/dist/types/components/QueuedPromptDisplay.d.ts +4 -1
- package/dist/types/components/WorkspaceSelector.d.ts +9 -1
- package/dist/types/components/agents/AgentCreatePage.d.ts +7 -1
- package/dist/types/components/agents/AgentsManagerPage.d.ts +4 -5
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +1 -8
- package/dist/types/components/artifacts/TrajectoryFilters.d.ts +15 -0
- package/dist/types/components/artifacts/TrajectoryInspector.d.ts +3 -1
- package/dist/types/components/artifacts/artifactUtils.d.ts +9 -0
- package/dist/types/components/managed/ManagedSessionCwdControl.d.ts +9 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +269 -21
- package/dist/types/components/managed/java-managed-agent-client.d.ts +4 -1
- package/dist/types/components/managed/managed-agent-provider.d.ts +27 -1
- package/dist/types/components/managed/managed-request-error.d.ts +6 -0
- package/dist/types/components/managed/use-managed-actions.d.ts +6 -5
- package/dist/types/components/managed/use-managed-cwd-change.d.ts +21 -0
- package/dist/types/components/managed/use-managed-session.d.ts +15 -1
- package/dist/types/components/messages/AssistantMessage.d.ts +3 -1
- package/dist/types/components/messages/UserMessage.d.ts +3 -1
- package/dist/types/components/messages/agent-message-details.d.ts +36 -0
- package/dist/types/components/messages/squad-tag.d.ts +16 -0
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +8 -4
- package/dist/types/components/sidebar/WorkspaceSection.d.ts +9 -2
- package/dist/types/components/workspace-agents/ThreadsPage.d.ts +31 -55
- package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +34 -5
- package/dist/types/components/workspace-agents/agent-events.d.ts +4 -34
- package/dist/types/components/workspace-agents/agents-route.d.ts +19 -0
- package/dist/types/components/workspace-agents/agents-view-logic.d.ts +14 -163
- package/dist/types/components/workspace-agents/lazy-agents-route.d.ts +7 -0
- package/dist/types/components/workspace-agents/messages.d.ts +2 -2
- package/dist/types/components/workspace-agents/session-agent-live-runs.d.ts +96 -0
- package/dist/types/components/workspace-agents/session-agents-api.d.ts +39 -0
- package/dist/types/components/workspace-agents/squads-section.d.ts +28 -0
- package/dist/types/components/workspace-agents/threads-api.d.ts +25 -36
- package/dist/types/components/workspace-agents/use-session-agent-runs.d.ts +66 -0
- package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +74 -10
- package/dist/types/components/workspaces/HostLabel.d.ts +8 -0
- package/dist/types/components/workspaces/WorkspaceHostProjects.d.ts +18 -0
- package/dist/types/components/workspaces/WorkspaceLocation.d.ts +10 -0
- package/dist/types/config/daemon-target.d.ts +76 -0
- package/dist/types/config/daemon.d.ts +16 -0
- package/dist/types/config/host-fanout.d.ts +53 -0
- package/dist/types/config/remote-connections.d.ts +3 -0
- package/dist/types/config/workspace-hosts.d.ts +18 -0
- package/dist/types/daemon/session/types.d.ts +28 -4
- package/dist/types/hooks/useQueuedPrompts.d.ts +2 -0
- package/dist/types/trajectory/filter-messages.d.ts +9 -0
- package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +7 -0
- package/dist/types/trajectory/filterTrajectory.d.ts +22 -0
- package/dist/types/trajectory/types.d.ts +1 -0
- package/dist/types/trajectory/useTrajectoryWindow.d.ts +21 -36
- package/dist/types/trajectory/window-messages.d.ts +9 -0
- package/dist/types/trajectory/window-messages.transcript-stub.d.ts +7 -0
- package/dist/types/utils/cancelledTurn.d.ts +17 -0
- package/dist/types/utils/workspace.d.ts +10 -0
- package/package.json +2 -1
- package/dist/ThreadsRoute-CtecWS_K.js +0 -2358
- package/dist/types/components/workspace-agents/LazyThreadsRoute.d.ts +0 -7
- package/dist/types/components/workspace-agents/ThreadChat.d.ts +0 -35
- package/dist/types/components/workspace-agents/ThreadView.d.ts +0 -72
- package/dist/types/components/workspace-agents/ThreadsRoute.d.ts +0 -23
- package/dist/types/components/workspace-agents/useProjectConversations.d.ts +0 -10
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { components } from './generated/managed-agent-api';
|
|
1
2
|
import type { ManagedToolResultReader } from './managed-tool-result-types';
|
|
2
3
|
export type ManagedAgentSessionPhase = 'created' | 'admitted' | 'runtime_starting' | 'agent_running' | 'waiting_runtime' | 'tool_running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
|
|
3
4
|
export type ManagedAgentRuntimeState = 'unknown' | 'starting' | 'ready' | 'failed';
|
|
@@ -9,6 +10,8 @@ export interface ManagedAgentSessionSummary {
|
|
|
9
10
|
workspace?: {
|
|
10
11
|
workspaceId: string;
|
|
11
12
|
cwdRelative: string;
|
|
13
|
+
contextRevision?: number;
|
|
14
|
+
state?: 'ready' | 'changing' | 'recovery_blocked';
|
|
12
15
|
};
|
|
13
16
|
createdAt: number;
|
|
14
17
|
admittedAt: number;
|
|
@@ -23,13 +26,14 @@ export interface ManagedAgentSessionSummary {
|
|
|
23
26
|
artifacts?: boolean;
|
|
24
27
|
/** The caller may submit later Turns to this Workspace-bound Session. */
|
|
25
28
|
workspaceTurns?: boolean;
|
|
29
|
+
cwdChange?: boolean;
|
|
26
30
|
};
|
|
27
31
|
failure?: {
|
|
28
32
|
code: string;
|
|
29
33
|
message: string;
|
|
30
34
|
};
|
|
31
35
|
}
|
|
32
|
-
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';
|
|
36
|
+
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' | 'context_changed' | 'stream_gap';
|
|
33
37
|
export interface ManagedAgentSessionEvent {
|
|
34
38
|
id: number;
|
|
35
39
|
at: number;
|
|
@@ -60,6 +64,7 @@ export interface ManagedAgentRequestOptions {
|
|
|
60
64
|
export interface ManagedAgentCommandOptions extends ManagedAgentRequestOptions {
|
|
61
65
|
idempotencyKey: string;
|
|
62
66
|
}
|
|
67
|
+
export type ManagedCwdOperation = components['schemas']['WebShellCwdOperation'];
|
|
63
68
|
/** A Hosted tool approval waiting for the Session owner's answer. */
|
|
64
69
|
export interface ManagedAgentPendingAction {
|
|
65
70
|
actionId: string;
|
|
@@ -75,6 +80,7 @@ export interface ManagedAgentPendingAction {
|
|
|
75
80
|
id: string;
|
|
76
81
|
label: string;
|
|
77
82
|
}>;
|
|
83
|
+
inputPreview?: components['schemas']['WebShellActionInputPreview'];
|
|
78
84
|
}
|
|
79
85
|
export interface ManagedAgentProvider {
|
|
80
86
|
readonly kind: 'daemon' | 'java';
|
|
@@ -87,6 +93,13 @@ export interface ManagedAgentProvider {
|
|
|
87
93
|
respond(action: ManagedAgentPendingAction, optionId: string, options: ManagedAgentCommandOptions): Promise<void>;
|
|
88
94
|
};
|
|
89
95
|
readonly toolResults?: ManagedToolResultReader;
|
|
96
|
+
readonly cwdChange?: {
|
|
97
|
+
submit(sessionId: string, request: {
|
|
98
|
+
cwdRelative: string;
|
|
99
|
+
expectedContextRevision: number;
|
|
100
|
+
}, options: ManagedAgentCommandOptions): Promise<ManagedCwdOperation>;
|
|
101
|
+
query(sessionId: string, operationId: string, options: ManagedAgentRequestOptions): Promise<ManagedCwdOperation>;
|
|
102
|
+
};
|
|
90
103
|
readonly workspaceBinding?: {
|
|
91
104
|
readonly agentId: string;
|
|
92
105
|
list(options: ManagedAgentRequestOptions & {
|
|
@@ -130,6 +143,19 @@ export interface ManagedAgentProvider {
|
|
|
130
143
|
cancel(sessionId: string, turnId: string, options: ManagedAgentCommandOptions): Promise<void>;
|
|
131
144
|
subscribeEvents(sessionId: string, options: ManagedAgentRequestOptions & {
|
|
132
145
|
lastEventId?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Called once the stream connection has been (re-)established. An
|
|
148
|
+
* established stream can stay silent indefinitely — heartbeats are
|
|
149
|
+
* not events — so this is the only liveness signal that does not
|
|
150
|
+
* depend on stream activity.
|
|
151
|
+
*/
|
|
152
|
+
onEstablished?(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Called for each complete heartbeat or comment frame the stream
|
|
155
|
+
* delivers. Heartbeats never decode into events, so on an idle
|
|
156
|
+
* Session this is the only sign of life an established stream gives.
|
|
157
|
+
*/
|
|
158
|
+
onAlive?(): void;
|
|
133
159
|
}): AsyncIterable<ManagedAgentSessionEvent>;
|
|
134
160
|
}
|
|
135
161
|
export interface ManagedAgentWorkspace {
|
|
@@ -12,3 +12,9 @@
|
|
|
12
12
|
* are worth another attempt.
|
|
13
13
|
*/
|
|
14
14
|
export declare function isNonRetryableClientError(error: unknown): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* A 401/403. This client re-derives its credentials on every request, so an
|
|
17
|
+
* expired short-lived token gets a fresh answer on the very next attempt
|
|
18
|
+
* once the host refreshes — never a terminal condition.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isAuthFailure(error: unknown): boolean;
|
|
@@ -12,11 +12,12 @@ export interface ManagedActionsState {
|
|
|
12
12
|
/** Sending an answer failed; the approval is shown again. */
|
|
13
13
|
answerError?: unknown;
|
|
14
14
|
/**
|
|
15
|
-
* The service refused an answer
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
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.
|
|
20
21
|
*/
|
|
21
22
|
respondForbidden: boolean;
|
|
22
23
|
respond(actionId: string, optionId: string): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ManagedAgentProvider, ManagedAgentSessionSummary } from './managed-agent-provider';
|
|
2
|
+
interface CwdIntent {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
cwdRelative: string;
|
|
6
|
+
expectedContextRevision: number;
|
|
7
|
+
idempotencyKey: string;
|
|
8
|
+
operationId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function useManagedCwdChange(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined, summary: ManagedAgentSessionSummary | undefined, refreshSummary: (signal?: AbortSignal) => Promise<ManagedAgentSessionSummary | undefined>): {
|
|
11
|
+
blocked: boolean;
|
|
12
|
+
submit: (cwdRelative: string, expectedContextRevision: number) => Promise<true | undefined>;
|
|
13
|
+
confirm: () => Promise<void>;
|
|
14
|
+
isBlocked: () => boolean;
|
|
15
|
+
key: string;
|
|
16
|
+
pending?: CwdIntent;
|
|
17
|
+
busy: boolean;
|
|
18
|
+
errorCode?: string;
|
|
19
|
+
target?: string;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import type { ManagedAgentProvider, ManagedAgentSessionEvent, ManagedAgentSessionSummary } from './managed-agent-provider';
|
|
2
|
+
type SignalLeg = 'session' | 'transcript' | 'stream';
|
|
3
|
+
interface SignalEntry {
|
|
4
|
+
readonly message: string;
|
|
5
|
+
readonly final: boolean;
|
|
6
|
+
readonly seq: number;
|
|
7
|
+
readonly leg: SignalLeg;
|
|
8
|
+
readonly stall?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function failureRetryDelayMs(failures: number): number;
|
|
2
11
|
export declare function useManagedSession(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined): {
|
|
12
|
+
stoppedReason: string | undefined;
|
|
13
|
+
stoppedLeg: SignalLeg | undefined;
|
|
14
|
+
error: string | undefined;
|
|
3
15
|
loadingOlder: boolean;
|
|
4
16
|
loadOlder: () => Promise<void>;
|
|
5
17
|
reload: () => void;
|
|
18
|
+
refreshSummary: (signal?: AbortSignal) => Promise<ManagedAgentSessionSummary | undefined>;
|
|
6
19
|
sessionId?: string;
|
|
7
20
|
summary?: ManagedAgentSessionSummary;
|
|
8
21
|
events: ManagedAgentSessionEvent[];
|
|
9
22
|
olderCursor?: string;
|
|
10
23
|
loading: boolean;
|
|
11
|
-
|
|
24
|
+
signals?: Partial<Record<SignalLeg, SignalEntry>>;
|
|
12
25
|
};
|
|
26
|
+
export {};
|
|
@@ -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' | '
|
|
68
|
+
onOpenAgents?: (view?: 'agents' | 'squads' | 'runtime') => void;
|
|
71
69
|
onOpenPlugins: () => void;
|
|
72
70
|
onOpenChannels: () => void;
|
|
73
71
|
onOpenLive?: () => void;
|
|
@@ -91,6 +89,12 @@ interface WebShellSidebarProps {
|
|
|
91
89
|
onNewSession: (workspaceCwd?: string) => Promise<boolean> | boolean;
|
|
92
90
|
onNewStandaloneSession?: () => Promise<boolean> | boolean;
|
|
93
91
|
onLoadSession: (sessionId: string, workspaceCwd?: string) => Promise<void> | void;
|
|
92
|
+
/**
|
|
93
|
+
* Opens a session listed by a fan-out host group (#13727): the caller
|
|
94
|
+
* focuses that host in-app and loads the session there. When absent, the
|
|
95
|
+
* groups fall back to full navigation via `openHostedWorkspace`.
|
|
96
|
+
*/
|
|
97
|
+
onOpenHostSession?: (origin: string, sessionId: string, workspaceCwd?: string) => void;
|
|
94
98
|
onSelectCurrentSession?: () => void;
|
|
95
99
|
onSessionRenameConfirmed?: (workspaceCwd: string | undefined, sessionId: string, displayName: string) => void;
|
|
96
100
|
/**
|
|
@@ -158,4 +162,4 @@ interface WebShellSidebarProps {
|
|
|
158
162
|
onLoadStandaloneSession?: (sessionId: string) => Promise<void> | void;
|
|
159
163
|
onStandaloneNotice?: (message: string) => void;
|
|
160
164
|
}
|
|
161
|
-
export declare function WebShellSidebar({
|
|
165
|
+
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, onOpenHostSession, 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,8 +9,15 @@ export interface WorkspaceHeaderActionsContext {
|
|
|
9
9
|
gitBranch: string | null | undefined;
|
|
10
10
|
}
|
|
11
11
|
interface WorkspaceSectionProps {
|
|
12
|
-
additionalSessions?: readonly DaemonSessionSummary[];
|
|
13
12
|
workspace: DaemonWorkspaceCapability;
|
|
13
|
+
/**
|
|
14
|
+
* localStorage seed for the expansion/collapsed-group preferences,
|
|
15
|
+
* defaulting to the workspace id. Multi-host renderers pass an
|
|
16
|
+
* origin-prefixed id so two daemons hosting the same workspace id
|
|
17
|
+
* never share a preference; single-host callers leave it unset and
|
|
18
|
+
* keep the keys they always had.
|
|
19
|
+
*/
|
|
20
|
+
storageKey?: string;
|
|
14
21
|
remote?: boolean;
|
|
15
22
|
renderHeader?: (expanded: boolean) => ReactNode;
|
|
16
23
|
hideHeader?: boolean;
|
|
@@ -118,5 +125,5 @@ interface WorkspaceSectionProps {
|
|
|
118
125
|
/** Commit entry for the same picker; the row still opens without it. */
|
|
119
126
|
onOpenCommit?: (workspaceCwd: string) => void;
|
|
120
127
|
}
|
|
121
|
-
export declare function WorkspaceSection({
|
|
128
|
+
export declare function WorkspaceSection({ workspace, storageKey, 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
129
|
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
|
|
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,41 +20,34 @@ 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
|
-
|
|
37
|
-
|
|
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
|
-
|
|
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;
|
|
53
47
|
onOpenAgentBuilder?: (hostId?: string) => void;
|
|
54
48
|
onOpenDefinitions?: () => void;
|
|
55
49
|
/** Issues a single-use join token for the Add runtime dialog. */
|
|
56
|
-
onCreateJoinToken?: () => Promise<JoinToken>;
|
|
50
|
+
onCreateJoinToken?: (supersedesHostId?: string) => Promise<JoinToken>;
|
|
57
51
|
onRemoveRuntime?: (hostId: string) => void;
|
|
58
52
|
hostServerUrl?: string;
|
|
59
53
|
/** A2A shares of one agent; absent hides Share. */
|
|
@@ -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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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' | '
|
|
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
|
-
|
|
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
|
-
/**
|
|
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' | '
|
|
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
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
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,
|
|
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,22 +8,48 @@ export interface RuntimeSummary {
|
|
|
8
8
|
kind: 'local' | 'external';
|
|
9
9
|
label: string;
|
|
10
10
|
provider: string;
|
|
11
|
-
|
|
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 {
|
|
15
16
|
token: string;
|
|
16
17
|
workspaceId: string;
|
|
17
18
|
expiresAt: number;
|
|
19
|
+
replacementHostId?: string;
|
|
18
20
|
}
|
|
19
21
|
export interface ConnectExistingInput {
|
|
20
22
|
remoteUrl: string;
|
|
21
23
|
remoteToken: string;
|
|
22
24
|
remoteCwd: string;
|
|
23
25
|
serverUrl: string;
|
|
24
|
-
provider: 'qwen';
|
|
25
26
|
allowHttp: boolean;
|
|
26
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;
|
|
52
|
+
export declare function findReplacementRuntime(runtimes: readonly RuntimeSummary[], knownIds: ReadonlySet<string>, supersededHostId: string, replacementHostId?: string): RuntimeSummary | undefined;
|
|
27
53
|
export declare function joinCommands(address: string, join: JoinToken): {
|
|
28
54
|
qwen: string;
|
|
29
55
|
npx: string;
|
|
@@ -31,17 +57,20 @@ export declare function joinCommands(address: string, join: JoinToken): {
|
|
|
31
57
|
};
|
|
32
58
|
/**
|
|
33
59
|
* "Add runtime": hand another machine a one-line command, then wait for it to
|
|
34
|
-
* show up. The dialog notices the new runtime through the same
|
|
60
|
+
* show up. The dialog notices the new runtime through the same roster poll
|
|
35
61
|
* that updates the Runtime tab, so it flips from waiting to connected by
|
|
36
62
|
* itself (the Tailscale/Vercel "add device" pattern).
|
|
37
63
|
*/
|
|
38
|
-
export declare function AddRuntimeDialog({ open, onOpenChange, serverUrl, runtimes, onCreateJoinToken, onConnectExisting, onCreateAgentOn, }: {
|
|
64
|
+
export declare function AddRuntimeDialog({ open, onOpenChange, serverUrl, runtimes, onCreateJoinToken, onConnectExisting, onJoinCoordinator, onCreateAgentOn, replacementTarget, }: {
|
|
39
65
|
open: boolean;
|
|
40
66
|
onOpenChange: (open: boolean) => void;
|
|
41
67
|
/** The coordinator address this page talks to; the link's default. */
|
|
42
68
|
serverUrl: string;
|
|
43
69
|
runtimes: readonly RuntimeSummary[];
|
|
44
|
-
onCreateJoinToken: () => Promise<JoinToken>;
|
|
70
|
+
onCreateJoinToken: (supersedesHostId?: string) => Promise<JoinToken>;
|
|
45
71
|
onConnectExisting?: (input: ConnectExistingInput) => Promise<boolean>;
|
|
72
|
+
/** Joins THIS daemon to another coordinator; absent hides that entry. */
|
|
73
|
+
onJoinCoordinator?: (input: JoinCoordinatorInput) => Promise<boolean>;
|
|
46
74
|
onCreateAgentOn?: (runtimeId: string) => void;
|
|
75
|
+
replacementTarget?: RuntimeSummary;
|
|
47
76
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,47 +4,17 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* Client for
|
|
7
|
+
* Client for the session-agents stream under `/workspaces/:ws/agent/`
|
|
8
|
+
* (`session-events?sessionId=`: a chat session's live agent runs). The roster
|
|
9
|
+
* has no stream; the Agents page polls it.
|
|
8
10
|
*
|
|
9
11
|
* `fetch` rather than `EventSource`: the daemon wants a bearer header, which
|
|
10
12
|
* `EventSource` cannot send. Frames are plain `event:` + one `data:` line.
|
|
11
13
|
*/
|
|
12
|
-
export interface AgentPermissionPromptView {
|
|
13
|
-
requestId: string;
|
|
14
|
-
title: string;
|
|
15
|
-
options: Array<{
|
|
16
|
-
optionId: string;
|
|
17
|
-
name: string;
|
|
18
|
-
kind?: string;
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
21
|
-
export interface AgentRunStepView {
|
|
22
|
-
id: string;
|
|
23
|
-
title: string;
|
|
24
|
-
status: 'running' | 'done' | 'failed';
|
|
25
|
-
}
|
|
26
|
-
export interface AgentRunProgressEvent {
|
|
27
|
-
type: 'progress';
|
|
28
|
-
threadId: string;
|
|
29
|
-
runId: string;
|
|
30
|
-
attempt: number;
|
|
31
|
-
sessionId: string;
|
|
32
|
-
stage: string;
|
|
33
|
-
detail: string;
|
|
34
|
-
outputText: string;
|
|
35
|
-
thoughtText: string;
|
|
36
|
-
activityAt: number;
|
|
37
|
-
permission?: AgentPermissionPromptView;
|
|
38
|
-
steps?: AgentRunStepView[];
|
|
39
|
-
}
|
|
40
|
-
export type AgentLiveEvent = {
|
|
41
|
-
type: 'changed';
|
|
42
|
-
threadId?: string;
|
|
43
|
-
} | AgentRunProgressEvent;
|
|
44
14
|
export type AgentStreamState = 'open' | 'closed';
|
|
45
15
|
/**
|
|
46
16
|
* Subscribes to a workspace's stream. Subscribers of the same URL share one
|
|
47
17
|
* connection: browsers allow only a handful per origin, and the sidebar plus
|
|
48
18
|
* an open conversation would otherwise hold several for the same workspace.
|
|
49
19
|
*/
|
|
50
|
-
export declare function subscribeAgentStream(url: string, token: string | undefined, onEvent: (event:
|
|
20
|
+
export declare function subscribeAgentStream<T = unknown>(url: string, token: string | undefined, onEvent: (event: T) => void, onState: (state: AgentStreamState) => void): () => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type AgentWorkspaceView } from './ThreadsPage';
|
|
7
|
+
export interface AgentsRouteProps {
|
|
8
|
+
/** `new-agent` opens straight into the New agent page. */
|
|
9
|
+
initialView?: AgentWorkspaceView | 'new-agent';
|
|
10
|
+
workspaceCwd?: string;
|
|
11
|
+
onOpenDefinitions?: () => void;
|
|
12
|
+
/** Puts `@name ` into the chat composer; absent hides the card button. */
|
|
13
|
+
onMentionAgent?: (name: string) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The Agents page with its data: the workspace's roster and runtimes, kept
|
|
17
|
+
* fresh by polling.
|
|
18
|
+
*/
|
|
19
|
+
export declare function AgentsRoute({ initialView, workspaceCwd: boundWorkspaceCwd, onOpenDefinitions, onMentionAgent, }: AgentsRouteProps): import("react/jsx-runtime").JSX.Element;
|