@qwen-code/web-shell 0.26.3 → 0.26.4-nightly.20261029.70be140e14
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/README.md +72 -8
- package/dist/{PierreFilePreview-DIwIw4WT.js → PierreFilePreview-CfV0XRoK.js} +1 -1
- package/dist/{SpreadsheetPreview-DpgY3sMC.js → SpreadsheetPreview-Bs2-wOb1.js} +2 -2
- package/dist/{WorkspaceFileBrowser-C9RP8zV1.js → WorkspaceFileBrowser-B-0Ycb2D.js} +2 -2
- package/dist/agents-route-DK8lW-Vp.js +1552 -0
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-CMk2DxLJ.js → index-Bc6NSs-5.js} +58573 -57907
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/transcript.js +10479 -10227
- package/dist/types/App.d.ts +7 -5
- package/dist/types/components/ChatEditor.d.ts +2 -0
- package/dist/types/components/DaemonConnectionBanner.d.ts +1 -0
- package/dist/types/components/SessionOverviewPanel.d.ts +6 -3
- package/dist/types/components/WebShellTranscript.d.ts +1 -1
- package/dist/types/components/dialogs/AddWorkspaceDialog.d.ts +7 -3
- package/dist/types/components/dialogs/DialogShell.d.ts +5 -2
- package/dist/types/components/local-control-api.d.ts +2 -1
- package/dist/types/components/managed/ManagedSessionWorktrees.d.ts +12 -0
- package/dist/types/components/managed/ManagedWorktreePopover.d.ts +9 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +344 -12
- package/dist/types/components/managed/java-managed-agent-client.d.ts +9 -9
- package/dist/types/components/managed/managed-agent-provider.d.ts +43 -10
- package/dist/types/components/managed/managed-session-export.d.ts +1 -0
- package/dist/types/components/managed/managed-session-messages.d.ts +1 -1
- package/dist/types/components/managed/managed-worktree-messages.d.ts +41 -0
- package/dist/types/components/managed/use-managed-file-upload.d.ts +3 -5
- package/dist/types/components/messages/McpApp.d.ts +4 -0
- package/dist/types/components/messages/tools/DiffView.d.ts +6 -0
- package/dist/types/components/sidebar/SessionDetailsTooltip.d.ts +3 -2
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +2 -2
- package/dist/types/components/ui/alert.d.ts +1 -1
- package/dist/types/components/ui/badge.d.ts +1 -1
- package/dist/types/components/ui/button.d.ts +2 -2
- package/dist/types/components/workspace-agents/agent-events.d.ts +1 -1
- package/dist/types/components/workspace-agents/session-agents-api.d.ts +2 -1
- package/dist/types/components/workspace-agents/threads-api.d.ts +2 -1
- package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +3 -1
- package/dist/types/customization.d.ts +4 -0
- package/dist/types/daemon/availability-context.d.ts +4 -0
- package/dist/types/daemon/availability.d.ts +43 -0
- package/dist/types/daemon/availability.test-fixtures.d.ts +12 -0
- package/dist/types/daemon/rest-request.d.ts +8 -0
- package/dist/types/desktop-relay/desktop-relay-client.d.ts +1 -1
- package/dist/types/hooks/useMcpAppMessages.d.ts +16 -1
- package/dist/types/i18n.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/live/useLiveVoiceSetup.d.ts +1 -1
- package/dist/types/local-files/bridge-client.d.ts +5 -0
- package/dist/types/mcp-app/messages.d.ts +4 -2
- package/dist/types/mcpAppHostContext.d.ts +44 -3
- package/dist/types/session-catalog/session-catalog-store.d.ts +2 -0
- package/dist/types/utils/composerTasks.d.ts +7 -0
- package/dist/types/utils/planMode.d.ts +1 -1
- package/dist/{useDaemonMidTurnInjected-Du9Zxaez.js → useDaemonMidTurnInjected-CioAIlrV.js} +8269 -6897
- package/package.json +1 -1
- package/dist/agents-route-DiTEqdRj.js +0 -1546
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const EN: {
|
|
2
|
+
readonly mode: "Session files";
|
|
3
|
+
readonly current: "Current directory";
|
|
4
|
+
readonly isolated: "Independent worktree";
|
|
5
|
+
readonly base: "Base branch or commit";
|
|
6
|
+
readonly head: "Current HEAD";
|
|
7
|
+
readonly committed: "Starts from the committed version. Uncommitted changes stay in the current directory.";
|
|
8
|
+
readonly checking: "Checking worktree support…";
|
|
9
|
+
readonly files: "Select workspace files after the worktree is ready. Existing file references must be selected again.";
|
|
10
|
+
readonly manage: "Session worktrees";
|
|
11
|
+
readonly retained: "Closing, archiving or deleting a session keeps its worktree. Cleanup removes the directory and keeps the branch.";
|
|
12
|
+
readonly empty: "No session worktrees in this workspace.";
|
|
13
|
+
readonly inspect: "Inspect cleanup";
|
|
14
|
+
readonly cleanup: "Remove worktree directory";
|
|
15
|
+
readonly confirm: "Remove this directory?";
|
|
16
|
+
readonly confirmDescription: "The session must be closed and the worktree clean. The directory will be removed; its Git branch will be retained.";
|
|
17
|
+
readonly blocked: "Cleanup is unavailable";
|
|
18
|
+
readonly session: "Session";
|
|
19
|
+
readonly branch: "Branch";
|
|
20
|
+
readonly baseCommit: "Base commit";
|
|
21
|
+
readonly preparing: "Preparing worktree";
|
|
22
|
+
readonly ready: "Worktree ready";
|
|
23
|
+
readonly failed: "Worktree preparation failed";
|
|
24
|
+
readonly blockedState: "Worktree needs attention";
|
|
25
|
+
readonly removing: "Removing worktree directory";
|
|
26
|
+
readonly removed: "Directory removed; branch retained";
|
|
27
|
+
readonly reasonUnavailable: "This worktree operation is currently unavailable.";
|
|
28
|
+
readonly workspaceBusy: "Waiting for the workspace to become idle.";
|
|
29
|
+
readonly unsupported: "This deployment or runtime environment does not support session worktrees.";
|
|
30
|
+
readonly notGit: "The selected directory is not in a Git repository.";
|
|
31
|
+
readonly layoutUnsupported: "The repository and its Git metadata must be in the same authorized storage. Select the original checkout.";
|
|
32
|
+
readonly invalidRef: "The selected base branch or commit is invalid.";
|
|
33
|
+
readonly dirty: "The worktree contains uncommitted changes, untracked files or ignored files. Preserve or remove them before cleanup.";
|
|
34
|
+
readonly identityConflict: "The original worktree directory is missing or has changed.";
|
|
35
|
+
readonly stopUnverified: "The previous Git operation has not been confirmed stopped.";
|
|
36
|
+
readonly sessionActive: "Close the session before removing its worktree.";
|
|
37
|
+
readonly backgroundBusy: "Wait for background tasks to finish before cleanup.";
|
|
38
|
+
};
|
|
39
|
+
export declare function useManagedWorktreeText(): (key: keyof typeof EN) => string;
|
|
40
|
+
export declare function useManagedWorktreeReason(): (code?: string | null) => string;
|
|
41
|
+
export {};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import type { FileUploadClient } from '../../hooks/useFileUpload';
|
|
2
2
|
import type { WebShellComposerTag } from '../../customization';
|
|
3
|
-
import type { ManagedAgentProvider } from './managed-agent-provider';
|
|
3
|
+
import type { ManagedAgentProvider, ManagedWorkspaceFileLocator } from './managed-agent-provider';
|
|
4
4
|
export interface ManagedUploadReference {
|
|
5
5
|
version: 1;
|
|
6
6
|
source: string;
|
|
7
7
|
scopeRevision: string;
|
|
8
8
|
path: string;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
workspaceId: string;
|
|
12
|
-
cwdRelative: string;
|
|
10
|
+
type UploadScope = ManagedWorkspaceFileLocator & {
|
|
13
11
|
source: string;
|
|
14
12
|
scopeRevision: string;
|
|
15
13
|
maxUploadBytes: number;
|
|
16
|
-
}
|
|
14
|
+
};
|
|
17
15
|
export declare function useManagedFileUpload(provider: ManagedAgentProvider, clientId: string, scope: UploadScope | undefined): {
|
|
18
16
|
client: FileUploadClient;
|
|
19
17
|
targetKey: string;
|
|
@@ -17,6 +17,10 @@ export interface McpAppDisplay {
|
|
|
17
17
|
export declare function getMcpAppDisplay(value: unknown): McpAppDisplay | undefined;
|
|
18
18
|
export declare function resolveMcpAppSandboxUrl(daemonBaseUrl: string, hostUrl: string, dataMode?: boolean): string | undefined;
|
|
19
19
|
export declare function applySandboxCspQuery(sandboxUrl: string, cspJson: string): string;
|
|
20
|
+
/** The saved title and summary of a Generated UI card, as readable text. */
|
|
21
|
+
export declare function GeneratedUiSummary({ display }: {
|
|
22
|
+
display: McpAppDisplay;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
24
|
export declare function GeneratedUiFallback({ display }: {
|
|
21
25
|
display: McpAppDisplay;
|
|
22
26
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
interface DiffViewProps {
|
|
2
2
|
diff: string;
|
|
3
|
+
/**
|
|
4
|
+
* The surrounding region scrolls instead of the line list (floating
|
|
5
|
+
* approval card): the list fills that region with its full height instead
|
|
6
|
+
* of capping itself at 400px with a nested scrollbar.
|
|
7
|
+
*/
|
|
8
|
+
fillScrollRegion?: boolean;
|
|
3
9
|
}
|
|
4
10
|
export declare const DiffView: import("react").NamedExoticComponent<DiffViewProps>;
|
|
5
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
import type { DaemonSessionSummary } from '@qwen-code/sdk/daemon';
|
|
3
3
|
interface SessionDetailsTooltipProps {
|
|
4
4
|
session: DaemonSessionSummary;
|
|
@@ -7,6 +7,7 @@ interface SessionDetailsTooltipProps {
|
|
|
7
7
|
completedUnread: boolean;
|
|
8
8
|
statusLabel?: string;
|
|
9
9
|
workspaceLabel?: string;
|
|
10
|
+
details?: ReactNode;
|
|
10
11
|
openOnClick?: boolean;
|
|
11
12
|
ownerToken?: string;
|
|
12
13
|
open?: boolean;
|
|
@@ -14,5 +15,5 @@ interface SessionDetailsTooltipProps {
|
|
|
14
15
|
side?: 'right' | 'bottom';
|
|
15
16
|
children: ReactElement;
|
|
16
17
|
}
|
|
17
|
-
export declare function SessionDetailsTooltip({ session, label, time, completedUnread, statusLabel, workspaceLabel, openOnClick, ownerToken, open: controlledOpen, onOpenChange, side, children, }: SessionDetailsTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function SessionDetailsTooltip({ session, label, time, completedUnread, statusLabel, workspaceLabel, details, openOnClick, ownerToken, open: controlledOpen, onOpenChange, side, children, }: SessionDetailsTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -19,7 +19,7 @@ export interface WebShellSidebarLockedWorkspace {
|
|
|
19
19
|
}
|
|
20
20
|
export type WebShellSidebarPrimaryNavItem = 'newTask' | 'agents' | 'plugins' | 'channels' | 'live' | 'scheduledTasks' | 'prWatches' | 'workflows' | 'goals' | 'managed';
|
|
21
21
|
export interface WebShellSidebarPrimaryNavOptions {
|
|
22
|
-
/** Built-in primary nav entries to show. Embedded hosts default to New
|
|
22
|
+
/** Built-in primary nav entries to show. Embedded hosts default to New session only. */
|
|
23
23
|
items?: readonly WebShellSidebarPrimaryNavItem[];
|
|
24
24
|
/** Additional custom content rendered after the built-in nav buttons. */
|
|
25
25
|
render?: () => ReactNode;
|
|
@@ -158,7 +158,7 @@ interface WebShellSidebarProps {
|
|
|
158
158
|
showSessionSourceSwitch?: boolean;
|
|
159
159
|
/** Show Live conversations and, in rail layout, the Live entry. Defaults to false. */
|
|
160
160
|
showLive?: boolean;
|
|
161
|
-
/** Whether to hide the "
|
|
161
|
+
/** Whether to hide the "Workspaces" header row (with search and add workspace). Defaults to false (shown). */
|
|
162
162
|
hideProjectHeader?: boolean;
|
|
163
163
|
/** Customize which action buttons appear on session rows. */
|
|
164
164
|
sessionActions?: WebShellSidebarSessionActionsOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "destructive" | "success" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
7
|
asChild?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
5
|
-
size?: "default" | "
|
|
4
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -17,4 +17,4 @@ export type AgentStreamState = 'open' | 'closed';
|
|
|
17
17
|
* connection: browsers allow only a handful per origin, and the sidebar plus
|
|
18
18
|
* an open conversation would otherwise hold several for the same workspace.
|
|
19
19
|
*/
|
|
20
|
-
export declare function subscribeAgentStream<T = unknown>(url: string, token: string | undefined, onEvent: (event: T) => void, onState: (state: AgentStreamState) => void): () => void;
|
|
20
|
+
export declare function subscribeAgentStream<T = unknown>(url: string, token: string | undefined, onEvent: (event: T) => void, onState: (state: AgentStreamState) => void, request: (signal: AbortSignal) => Promise<Response>, onDisconnect: () => void): () => void;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2026 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { DaemonClient } from '@qwen-code/sdk/daemon';
|
|
6
7
|
import type { SessionAgentEventFrame, SessionAgentRunFrame, SessionAgentRunStatus } from '@qwen-code/sdk/daemon';
|
|
7
8
|
import { type AgentStreamState } from './agent-events';
|
|
8
9
|
/** 202 body of `POST sessions/:sessionId/mentions`. */
|
|
@@ -36,4 +37,4 @@ export interface SessionAgentsApi {
|
|
|
36
37
|
respondToPermission(sessionId: string, runId: string, requestId: string, optionId: string): Promise<unknown>;
|
|
37
38
|
subscribe(sessionId: string, onEvent: (event: SessionAgentEventFrame) => void, onState: (state: AgentStreamState) => void): () => void;
|
|
38
39
|
}
|
|
39
|
-
export declare function createSessionAgentsHttpApi(baseUrl: string, token: string | undefined, workspaceCwd: string): SessionAgentsApi;
|
|
40
|
+
export declare function createSessionAgentsHttpApi(baseUrl: string, token: string | undefined, workspaceCwd: string, client?: DaemonClient): SessionAgentsApi;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2026 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { DaemonClient } from '@qwen-code/sdk/daemon';
|
|
6
7
|
import type { AgentConfigPatch, NewWorkspaceAgent, WorkspaceAgentRuntimeView, WorkspaceAgentSummaryView } from './ThreadsPage';
|
|
7
8
|
import type { ConnectExistingInput, JoinCoordinatorInput, JoinToken } from './add-runtime-dialog';
|
|
8
9
|
import type { AgentShare, AgentShareSummary } from './share-agent-dialog';
|
|
@@ -49,4 +50,4 @@ export interface ThreadsApi {
|
|
|
49
50
|
/** Retires the squad (it keeps its name and history). */
|
|
50
51
|
retireSquad?(id: string): Promise<unknown>;
|
|
51
52
|
}
|
|
52
|
-
export declare function createThreadsHttpApi(baseUrl: string, token: string | undefined, workspaceCwd: string): ThreadsApi;
|
|
53
|
+
export declare function createThreadsHttpApi(baseUrl: string, token: string | undefined, workspaceCwd: string, client?: DaemonClient): ThreadsApi;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DaemonClient } from '@qwen-code/sdk/daemon';
|
|
1
2
|
import { type ComponentProps } from 'react';
|
|
2
3
|
import type { ChatEditor } from '../ChatEditor';
|
|
3
4
|
import type { WebShellAtProvider } from '../../customization';
|
|
@@ -57,11 +58,12 @@ export interface PendingAgentMention {
|
|
|
57
58
|
export declare function recordedAgentMentionTexts(blocks: readonly DaemonTranscriptBlock[]): string[];
|
|
58
59
|
/** True once the record of `mention` is among the recorded mention texts. */
|
|
59
60
|
export declare function isPendingMentionRecorded(mention: PendingAgentMention, recordedTexts: readonly string[]): boolean;
|
|
60
|
-
export declare function useAgentChatEntry({ enabled, cwd, baseUrl, token, sessionApi, sessionApiFor, ensureSession, onSubmit, onError, onCreateAgent, sessionId, recordedMentionTexts, t, }: {
|
|
61
|
+
export declare function useAgentChatEntry({ enabled, cwd, baseUrl, token, client, sessionApi, sessionApiFor, ensureSession, onSubmit, onError, onCreateAgent, sessionId, recordedMentionTexts, t, }: {
|
|
61
62
|
enabled: boolean;
|
|
62
63
|
cwd?: string;
|
|
63
64
|
baseUrl: string;
|
|
64
65
|
token?: string;
|
|
66
|
+
client?: DaemonClient;
|
|
65
67
|
/** The session routes of the same workspace (`cwd`). */
|
|
66
68
|
sessionApi?: SessionAgentsApi;
|
|
67
69
|
/**
|
|
@@ -10,6 +10,10 @@ import type { ACPToolCall } from './adapters/types';
|
|
|
10
10
|
import type { WelcomeHeaderProps } from './components/WelcomeHeader';
|
|
11
11
|
import type { WebShellTheme } from './themeContext';
|
|
12
12
|
export type MarkdownContentSource = 'assistant' | 'thinking';
|
|
13
|
+
/** Select an existing directory on the connected daemon, or cancel with undefined. */
|
|
14
|
+
export type WebShellWorkspaceDirectoryPicker = (opts?: {
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
}) => Promise<string | undefined>;
|
|
13
17
|
export interface MarkdownRenderContext {
|
|
14
18
|
source: MarkdownContentSource;
|
|
15
19
|
/**
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DaemonAvailability, DaemonAvailabilityState } from './availability.js';
|
|
2
|
+
export declare const DaemonAvailabilityContext: import("react").Context<DaemonAvailability | undefined>;
|
|
3
|
+
export declare function useDaemonAvailabilityController(): DaemonAvailability | undefined;
|
|
4
|
+
export declare function useDaemonAvailability(): DaemonAvailabilityState;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DaemonClient } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import type { DaemonCapabilities, DaemonClientOptions, DaemonTransport } from '@qwen-code/sdk/daemon';
|
|
8
|
+
export type DaemonAvailabilityState = 'available' | 'unavailable' | 'auth-required';
|
|
9
|
+
export declare class DaemonUnavailableError extends Error {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare function isDaemonUnavailableError(error: unknown): boolean;
|
|
13
|
+
export declare function findDaemonAvailability(baseUrl: string, token?: string, client?: DaemonClient): DaemonAvailability | undefined;
|
|
14
|
+
export declare function registerDaemonAvailability(baseUrl: string, token: string | undefined, availability: DaemonAvailability): () => void;
|
|
15
|
+
/** One recovery loop for all requests owned by an active daemon connection. */
|
|
16
|
+
export declare class DaemonAvailability {
|
|
17
|
+
private baseUrl;
|
|
18
|
+
private token?;
|
|
19
|
+
private nativeFetch;
|
|
20
|
+
private state;
|
|
21
|
+
private listeners;
|
|
22
|
+
private timer?;
|
|
23
|
+
private probe?;
|
|
24
|
+
private controller?;
|
|
25
|
+
private attempt;
|
|
26
|
+
private generation;
|
|
27
|
+
private disposed;
|
|
28
|
+
recoveredCapabilities?: DaemonCapabilities;
|
|
29
|
+
constructor(baseUrl: string, token?: string | undefined, nativeFetch?: typeof globalThis.fetch);
|
|
30
|
+
getSnapshot: () => DaemonAvailabilityState;
|
|
31
|
+
subscribe: (listener: () => void) => (() => void);
|
|
32
|
+
private publish;
|
|
33
|
+
assertAvailable(): void;
|
|
34
|
+
waitUntilAvailable(signal?: AbortSignal): Promise<void>;
|
|
35
|
+
getGeneration(): number;
|
|
36
|
+
reportFailure(error: unknown, signal?: AbortSignal, generation?: number, source?: 'fetch' | 'consumer'): void;
|
|
37
|
+
wrapFetch(fetch: typeof globalThis.fetch): typeof globalThis.fetch;
|
|
38
|
+
wrapTransport(transport: DaemonTransport): DaemonTransport;
|
|
39
|
+
check: (immediate?: boolean) => Promise<void>;
|
|
40
|
+
private runProbe;
|
|
41
|
+
dispose(): void;
|
|
42
|
+
}
|
|
43
|
+
export declare function createDaemonClient(options: DaemonClientOptions, availability?: DaemonAvailability | undefined): DaemonClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DaemonAvailability } from './availability.js';
|
|
7
|
+
export declare function offlineDaemon(baseUrl?: string, features?: string[]): {
|
|
8
|
+
server: {
|
|
9
|
+
healthy: boolean;
|
|
10
|
+
};
|
|
11
|
+
availability: DaemonAvailability;
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DaemonClient } from '@qwen-code/sdk/daemon';
|
|
7
|
+
/** Native REST bridge, including hosts on an older supported peer SDK. */
|
|
8
|
+
export declare function createDaemonRestRequest(baseUrl: string, token?: string, client?: DaemonClient, bypassAvailability?: boolean): (path: string, init?: RequestInit) => Promise<Response>;
|
|
@@ -18,7 +18,7 @@ export declare const DESKTOP_RELAY_URL = "http://127.0.0.1:47821";
|
|
|
18
18
|
* `packages/node-repl/package.json`, and `.github/workflows/cd-cua-driver.yml`
|
|
19
19
|
* must publish that version before the setup command can be used.
|
|
20
20
|
*/
|
|
21
|
-
export declare const DESKTOP_RELAY_INSTALL_COMMAND = "npx -y @qwen-code/node-repl-mcp@0.
|
|
21
|
+
export declare const DESKTOP_RELAY_INSTALL_COMMAND = "npx -y @qwen-code/node-repl-mcp@0.27.0 desktop-relay install";
|
|
22
22
|
export type DesktopRelayRemotePhase = 'connecting' | 'registering' | 'connected' | 'stopped' | 'failed';
|
|
23
23
|
export interface DesktopRelayActive {
|
|
24
24
|
sessionId: string;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
|
|
2
|
+
import { type McpAppMessageRequest, type McpAppMessages } from '../mcpAppHostContext';
|
|
2
3
|
import type { DaemonSessionOwnerSnapshot } from '../daemon/session/types';
|
|
4
|
+
import { getTranslator } from '../i18n';
|
|
3
5
|
export interface McpAppPromptSubmission {
|
|
6
|
+
/** Shows the message as a labelled reference in the transcript. */
|
|
7
|
+
inputAnnotations?: DaemonInputAnnotation[];
|
|
4
8
|
signal: AbortSignal;
|
|
5
9
|
isCurrent(): boolean;
|
|
6
10
|
onDispatched(): void;
|
|
@@ -14,9 +18,20 @@ interface MessageHost {
|
|
|
14
18
|
clientId?: string;
|
|
15
19
|
captureOwner(): DaemonSessionOwnerSnapshot;
|
|
16
20
|
submit(text: string, options: McpAppPromptSubmission): Promise<unknown>;
|
|
21
|
+
/** The host's translator; the hook runs outside its I18nProvider. */
|
|
22
|
+
translate?: ReturnType<typeof getTranslator>;
|
|
17
23
|
}
|
|
18
24
|
export declare function useMcpAppMessages(host: MessageHost): {
|
|
19
25
|
context: McpAppMessages | undefined;
|
|
20
26
|
review: import("react/jsx-runtime").JSX.Element | null;
|
|
21
27
|
};
|
|
28
|
+
interface GeneratedUiParameters {
|
|
29
|
+
title: string;
|
|
30
|
+
documentId: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Recognizes the parameter message the built-in Generated UI App sends for
|
|
34
|
+
* its explicit continue action. Any other message keeps the review dialog.
|
|
35
|
+
*/
|
|
36
|
+
export declare function readGeneratedUiParameters(review: Pick<McpAppMessageRequest, 'requiredFeature' | 'text'>): GeneratedUiParameters | undefined;
|
|
22
37
|
export {};
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
|
-
export declare const WEB_SHELL_LANGUAGES: readonly ["en", "zh-CN"];
|
|
2
|
+
export declare const WEB_SHELL_LANGUAGES: readonly ["en", "zh-CN", "ru"];
|
|
3
3
|
export type WebShellLanguage = (typeof WEB_SHELL_LANGUAGES)[number];
|
|
4
4
|
export declare function normalizeLanguage(value: string | undefined | null): WebShellLanguage;
|
|
5
5
|
export declare function languageSettingToWebShellLanguage(value: unknown): WebShellLanguage | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export type { WebShellTheme } from './themeContext';
|
|
|
73
73
|
export type { WebShellBrand, WebShellResolvedBrand } from './brandContext';
|
|
74
74
|
export type { CommandDisplayCategory, CommandDisplayCategoryOrder, } from './utils/commandDisplay';
|
|
75
75
|
export type { ComposerToolbarAction } from './components/ChatEditor';
|
|
76
|
-
export type { CodeBlockRenderer, MarkdownContentSource, MarkdownTableMode, MarkdownRenderContext, ToolHeaderExtraRenderer, ToolHeaderExtraRenderInfo, ToolHeaderKind, ComposerTagClickHandler, ComposerTagRenderer, AssistantTurnFooterRenderer, UserMessageContentRenderer, UserMessageContentRenderInfo, UserMessageContentParser, ComposerHeaderRenderer, ComposerFooterRenderer, ComposerToolbarStartRenderer, ComposerToolbarRightRenderer, WebShellAtItemRenderInfo, WebShellAtItemRenderer, WebShellComposerApi, WebShellBuiltinComposerTagKind, WebShellBuiltinAtProviderId, WebShellBuiltinAtProvidersConfig, WebShellComposerInput, WebShellComposerTag, WebShellComposerTagIconMap, WebShellComposerTagKind, WebShellComposerTagOptions, WebShellComposerTagPlacement, WebShellComposerToolbarRenderInfo, WebShellComposerToolbarStartRenderInfo, WebShellComposerToolbarRightRenderInfo, WebShellComposerTextOptions, WelcomeFooterRenderer, WelcomeHeaderRenderer, ChatHeaderRenderer, ChatHeaderRenderInfo, WebShellChatHeaderItem, WebShellChatHeaderOptions, WebShellRightPanelItem, WebShellRightPanelOptions, WebShellEnvironmentPanelItem, WebShellEnvironmentPanelOptions, WebShellFooterRenderInfo, FooterRenderer, LoadingPhrasesResolver, WebShellAtProviderTab, WebShellAtItem, WebShellAtProvider, WebShellBottomStatusItem, WebShellCodeBlockRenderInfo, WebShellMarkdownChartCustomization, WebShellMarkdownCustomization, WebShellFootnote, WebShellSource, WebShellSourceReference, WebShellSourceIconResolver, WebShellFootnoteIconResolver, WebShellFootnotePreviewInfo, WebShellFootnotePreviewHandle, WebShellFootnotePreviewMount, WebShellAssistantMessageInfo, WebShellAssistantTurnOutcome, WebShellAssistantTurnSettledEvent, WebShellAssistantTurnFooterRenderInfo, ArtifactImageRenderer, WebShellArtifactCustomization, WebShellIconSource, WebShellTaskInfo, WebShellUserMessagePart, WebShellAgentTask, WebShellShellTask, WebShellMonitorTask, WebShellWorkflowTask, WebShellPreparedSubmit, WebShellSubmitSnapshot, WebShellSessionArtifactsChange, WebShellSessionArtifactsChangeReason, WebShellModelInfo, WebShellSkillInfo, WebShellAssistantFeedbackInfo, WebShellAssistantFeedbackOptions, WebShellAssistantFeedbackRating, WebShellAssistantFeedbackUserMessage, AssistantFeedbackHandler, } from './customization';
|
|
76
|
+
export type { CodeBlockRenderer, MarkdownContentSource, MarkdownTableMode, MarkdownRenderContext, ToolHeaderExtraRenderer, ToolHeaderExtraRenderInfo, ToolHeaderKind, ComposerTagClickHandler, ComposerTagRenderer, AssistantTurnFooterRenderer, UserMessageContentRenderer, UserMessageContentRenderInfo, UserMessageContentParser, ComposerHeaderRenderer, ComposerFooterRenderer, ComposerToolbarStartRenderer, ComposerToolbarRightRenderer, WebShellAtItemRenderInfo, WebShellAtItemRenderer, WebShellComposerApi, WebShellBuiltinComposerTagKind, WebShellBuiltinAtProviderId, WebShellBuiltinAtProvidersConfig, WebShellComposerInput, WebShellComposerTag, WebShellComposerTagIconMap, WebShellComposerTagKind, WebShellComposerTagOptions, WebShellComposerTagPlacement, WebShellComposerToolbarRenderInfo, WebShellComposerToolbarStartRenderInfo, WebShellComposerToolbarRightRenderInfo, WebShellComposerTextOptions, WelcomeFooterRenderer, WelcomeHeaderRenderer, ChatHeaderRenderer, ChatHeaderRenderInfo, WebShellChatHeaderItem, WebShellChatHeaderOptions, WebShellRightPanelItem, WebShellRightPanelOptions, WebShellEnvironmentPanelItem, WebShellEnvironmentPanelOptions, WebShellFooterRenderInfo, FooterRenderer, LoadingPhrasesResolver, WebShellAtProviderTab, WebShellAtItem, WebShellAtProvider, WebShellWorkspaceDirectoryPicker, WebShellBottomStatusItem, WebShellCodeBlockRenderInfo, WebShellMarkdownChartCustomization, WebShellMarkdownCustomization, WebShellFootnote, WebShellSource, WebShellSourceReference, WebShellSourceIconResolver, WebShellFootnoteIconResolver, WebShellFootnotePreviewInfo, WebShellFootnotePreviewHandle, WebShellFootnotePreviewMount, WebShellAssistantMessageInfo, WebShellAssistantTurnOutcome, WebShellAssistantTurnSettledEvent, WebShellAssistantTurnFooterRenderInfo, ArtifactImageRenderer, WebShellArtifactCustomization, WebShellIconSource, WebShellTaskInfo, WebShellUserMessagePart, WebShellAgentTask, WebShellShellTask, WebShellMonitorTask, WebShellWorkflowTask, WebShellPreparedSubmit, WebShellSubmitSnapshot, WebShellSessionArtifactsChange, WebShellSessionArtifactsChangeReason, WebShellModelInfo, WebShellSkillInfo, WebShellAssistantFeedbackInfo, WebShellAssistantFeedbackOptions, WebShellAssistantFeedbackRating, WebShellAssistantFeedbackUserMessage, AssistantFeedbackHandler, } from './customization';
|
|
77
77
|
export type { WelcomeHeaderProps } from './components/WelcomeHeader';
|
|
78
78
|
export type { PaneHeaderActionsInfo, PaneHeaderActionsRenderer, } from './components/ChatPane';
|
|
79
79
|
export type { ArtifactFilter, TurnOutputKind, TurnOutputOpenRequest, } from './components/artifacts/TurnOutputs';
|
|
@@ -16,4 +16,4 @@ export interface UseLiveVoiceSetupResult {
|
|
|
16
16
|
retryInstall: () => Promise<void>;
|
|
17
17
|
launchHost: () => Promise<void>;
|
|
18
18
|
}
|
|
19
|
-
export declare function useLiveVoiceSetup(supported: boolean, active?: boolean): UseLiveVoiceSetupResult;
|
|
19
|
+
export declare function useLiveVoiceSetup(supported: boolean, active?: boolean, translate?: (key: string) => string): UseLiveVoiceSetupResult;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* Framework-free on purpose (no React, no DOM globals beyond the injected
|
|
20
20
|
* socket and lock manager) so the whole state machine runs in a node test.
|
|
21
21
|
*/
|
|
22
|
+
import { type DaemonAvailability } from '../daemon/availability.js';
|
|
22
23
|
import { type JsonRpcRequest, type JsonRpcResponse } from './mcp-server.js';
|
|
23
24
|
/**
|
|
24
25
|
* The RPC surface the bridge drives. {@link LocalFilesMcpServer} satisfies it;
|
|
@@ -79,6 +80,7 @@ export interface LocalFilesBridgeOptions {
|
|
|
79
80
|
server: LocalFilesRpcServer;
|
|
80
81
|
openSocket: OpenSocket;
|
|
81
82
|
token?: string;
|
|
83
|
+
availability?: DaemonAvailability;
|
|
82
84
|
serverName?: string;
|
|
83
85
|
clientInfo?: {
|
|
84
86
|
name: string;
|
|
@@ -152,6 +154,9 @@ export declare class LocalFilesBridge {
|
|
|
152
154
|
private readonly serverName;
|
|
153
155
|
private readonly delay;
|
|
154
156
|
private socket;
|
|
157
|
+
private availability;
|
|
158
|
+
private resumeController;
|
|
159
|
+
private unsubscribeAvailability;
|
|
155
160
|
private state;
|
|
156
161
|
private stopped;
|
|
157
162
|
private running;
|
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
* Copyright 2026 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
6
|
+
type Message = string | ((vars?: Record<string, string | number>) => string);
|
|
7
|
+
export declare const MCP_APP_MESSAGES_EN: Record<string, Message>;
|
|
8
|
+
export declare const MCP_APP_MESSAGES_ZH: Record<string, Message>;
|
|
9
|
+
export {};
|
|
@@ -5,14 +5,46 @@ export declare const McpAppSessionContext: import("react").Context<string | unde
|
|
|
5
5
|
export interface McpAppMessageRequest {
|
|
6
6
|
serverName: string;
|
|
7
7
|
resourceUri: string;
|
|
8
|
+
/** Set only for the bundled Generated UI server, as core marks it. */
|
|
9
|
+
requiredFeature?: 'generated-ui';
|
|
8
10
|
text: string;
|
|
9
11
|
signal: AbortSignal;
|
|
10
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Result metadata naming a review that ended without the session accepting
|
|
15
|
+
* the message: `cancelled` by the user or the host, `expired` while awaiting
|
|
16
|
+
* review, or `failed` when it was refused before or at admission.
|
|
17
|
+
*/
|
|
18
|
+
export declare const MCP_APP_MESSAGE_REVIEW_META = "qwen-code/message-review";
|
|
19
|
+
/** The reason a message failed before the session accepted it. */
|
|
20
|
+
export declare const MCP_APP_MESSAGE_ERROR_META = "qwen-code/message-error";
|
|
21
|
+
export interface McpAppMessageResult {
|
|
22
|
+
isError?: boolean;
|
|
23
|
+
_meta?: {
|
|
24
|
+
[MCP_APP_MESSAGE_REVIEW_META]?: 'cancelled' | 'expired' | 'failed';
|
|
25
|
+
[MCP_APP_MESSAGE_ERROR_META]?: string;
|
|
26
|
+
};
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
/** Composer tag kind for values a Generated UI card attaches to a message. */
|
|
30
|
+
export declare const GENERATED_UI_CONTEXT_TAG_KIND = "generated-ui";
|
|
31
|
+
export declare function generatedUiContextTagId(documentId: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Lets the built-in Generated UI attach a card's current values to the
|
|
34
|
+
* user's next message in the session that owns the card.
|
|
35
|
+
*/
|
|
36
|
+
export interface McpAppModelContext {
|
|
37
|
+
sessionId: string;
|
|
38
|
+
attach(context: {
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
text: string;
|
|
42
|
+
}): void;
|
|
43
|
+
}
|
|
44
|
+
export declare const McpAppModelContextContext: import("react").Context<McpAppModelContext | undefined>;
|
|
11
45
|
export interface McpAppMessages {
|
|
12
46
|
sessionId: string;
|
|
13
|
-
requestMessage(request: McpAppMessageRequest): Promise<
|
|
14
|
-
isError?: boolean;
|
|
15
|
-
}>;
|
|
47
|
+
requestMessage(request: McpAppMessageRequest): Promise<McpAppMessageResult>;
|
|
16
48
|
}
|
|
17
49
|
export declare const McpAppMessagesContext: import("react").Context<McpAppMessages | undefined>;
|
|
18
50
|
export declare const McpAppToolsContext: import("react").Context<{
|
|
@@ -49,6 +81,15 @@ export interface McpAppGeneratedUiOwner {
|
|
|
49
81
|
}
|
|
50
82
|
export declare const McpAppGeneratedUiOwnerContext: import("react").Context<McpAppGeneratedUiOwner | undefined>;
|
|
51
83
|
export declare const McpAppVisibilityContext: import("react").Context<boolean>;
|
|
84
|
+
/**
|
|
85
|
+
* Whether core marked this App as the bundled Generated UI server's. Unlike
|
|
86
|
+
* {@link isBuiltInGeneratedUi}, the resource URI alone does not count: any
|
|
87
|
+
* server can claim it, so presentation that hides the App's origin keys on
|
|
88
|
+
* this instead.
|
|
89
|
+
*/
|
|
90
|
+
export declare function isBundledGeneratedUi(display?: {
|
|
91
|
+
requiredFeature?: 'generated-ui';
|
|
92
|
+
}): boolean;
|
|
52
93
|
export declare function isBuiltInGeneratedUi(display?: {
|
|
53
94
|
resourceUri: string;
|
|
54
95
|
requiredFeature?: 'generated-ui';
|
|
@@ -58,7 +58,9 @@ export declare class SessionCatalogStore {
|
|
|
58
58
|
private activeBackgroundRequests;
|
|
59
59
|
private queueSequence;
|
|
60
60
|
private visibilityListening;
|
|
61
|
+
private paused;
|
|
61
62
|
constructor(client: DaemonClient);
|
|
63
|
+
setPaused(paused: boolean): void;
|
|
62
64
|
getSnapshot(query: SessionCatalogQuery): SessionCatalogSnapshot;
|
|
63
65
|
/**
|
|
64
66
|
* Reads a display name the catalog already holds for a session, scheduling
|
|
@@ -14,3 +14,10 @@ import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon'
|
|
|
14
14
|
export declare function isComposerTask(task: DaemonSessionTaskWithWorkflowStatus): task is Exclude<DaemonSessionTaskWithWorkflowStatus, {
|
|
15
15
|
kind: 'agent';
|
|
16
16
|
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the snapshot carries a background agent that is still executing.
|
|
19
|
+
* Paused agents are parked, not active: they stay visible in the environment
|
|
20
|
+
* panel's subagents section, so they must not re-open the footer pill in the
|
|
21
|
+
* shipped entry (which would pin a stale count to parked work).
|
|
22
|
+
*/
|
|
23
|
+
export declare function hasActiveBackgroundAgent(tasks: readonly DaemonSessionTaskWithWorkflowStatus[]): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DAEMON_APPROVAL_MODES } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
2
2
|
export type WebShellApprovalMode = Exclude<(typeof DAEMON_APPROVAL_MODES)[number], 'plan'>;
|
|
3
|
-
export declare const EXECUTION_APPROVAL_MODES: ("default" | "auto
|
|
3
|
+
export declare const EXECUTION_APPROVAL_MODES: ("default" | "auto" | "auto-edit" | "yolo")[];
|
|
4
4
|
export declare function resolveApprovalModes(value: unknown): readonly WebShellApprovalMode[];
|
|
5
5
|
export declare function nextApprovalMode(available: readonly WebShellApprovalMode[], current: string): WebShellApprovalMode | undefined;
|
|
6
6
|
export declare function parsePlanCommand(args: string, enabled: boolean): {
|