@qwen-code/web-shell 0.24.6-nightly.20260926.d6f414190a → 0.24.7
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/daemon-react-sdk.js +1 -1
- package/dist/index.js +47349 -45427
- package/dist/sw.js +1 -1
- package/dist/{toolNames-B0FO3NVV.js → toolNames-B0O1UjKB.js} +4194 -3923
- package/dist/transcript.js +8925 -8606
- package/dist/types/components/BranchPickerPopover.d.ts +2 -1
- package/dist/types/components/DesktopRelayControl.d.ts +51 -0
- package/dist/types/components/MessageList.d.ts +1 -0
- package/dist/types/components/artifacts/TrajectoryInspector.d.ts +15 -0
- package/dist/types/components/dialogs/BranchSessionDialog.d.ts +6 -0
- package/dist/types/components/dialogs/GitDiffDialog.d.ts +2 -1
- package/dist/types/components/dialogs/GitLogDialog.d.ts +2 -1
- package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +6 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +1074 -0
- package/dist/types/components/managed/java-managed-agent-client.d.ts +32 -113
- package/dist/types/components/managed/java-managed-agent-provider.d.ts +1 -0
- package/dist/types/components/managed/managed-agent-provider.d.ts +31 -1
- package/dist/types/components/messages/McpApp.d.ts +1 -1
- package/dist/types/components/messages/toolFormatting.d.ts +2 -0
- package/dist/types/components/panels/EnvironmentPanel.d.ts +2 -1
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +1 -1
- package/dist/types/daemon/session/transcript-page-table.d.ts +10 -1
- package/dist/types/daemon/session/types.d.ts +2 -2
- package/dist/types/desktop-relay/desktop-relay-client.d.ts +63 -0
- package/dist/types/mcpAppHostContext.d.ts +7 -0
- package/dist/types/trajectory/summarizeTrajectory.d.ts +20 -0
- package/package.json +3 -1
|
@@ -1,80 +1,27 @@
|
|
|
1
|
+
import type { components } from './generated/managed-agent-api';
|
|
2
|
+
type Schemas = components['schemas'];
|
|
1
3
|
export type JavaAgentDate = number | string;
|
|
2
|
-
export
|
|
3
|
-
turnId: string;
|
|
4
|
-
sessionId: string;
|
|
5
|
-
status: string;
|
|
6
|
-
submittedAt: JavaAgentDate;
|
|
7
|
-
completedAt?: JavaAgentDate;
|
|
8
|
-
errorCode?: string;
|
|
9
|
-
usage?: Record<string, unknown>;
|
|
10
|
-
}
|
|
4
|
+
export type JavaAgentTurn = Schemas['WebShellTurn'];
|
|
11
5
|
export interface JavaAgentEnvironment {
|
|
12
6
|
environmentId?: string;
|
|
13
7
|
state?: string;
|
|
14
8
|
errorCode?: string;
|
|
15
9
|
}
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
turnId: string;
|
|
32
|
-
itemId?: string;
|
|
33
|
-
type: string;
|
|
34
|
-
createdAt: JavaAgentDate;
|
|
35
|
-
data?: Record<string, unknown>;
|
|
36
|
-
terminal: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface JavaAgentContentPart {
|
|
39
|
-
partId: string;
|
|
40
|
-
type: 'input_text' | 'output_text' | 'reasoning' | string;
|
|
41
|
-
text: string;
|
|
42
|
-
firstSequence: number;
|
|
43
|
-
lastSequence: number;
|
|
44
|
-
}
|
|
45
|
-
export interface JavaAgentItem {
|
|
46
|
-
itemId: string;
|
|
47
|
-
sessionId: string;
|
|
48
|
-
turnId: string;
|
|
49
|
-
type: 'message' | 'tool_call' | string;
|
|
50
|
-
role?: string;
|
|
51
|
-
status: string;
|
|
52
|
-
content: JavaAgentContentPart[];
|
|
53
|
-
attributes: Record<string, unknown>;
|
|
54
|
-
firstSequence: number;
|
|
55
|
-
lastSequence: number;
|
|
56
|
-
createdAt: JavaAgentDate;
|
|
57
|
-
updatedAt: JavaAgentDate;
|
|
58
|
-
}
|
|
59
|
-
export interface JavaAgentCommandAdmission {
|
|
60
|
-
sessionId: string;
|
|
61
|
-
turnId?: string;
|
|
62
|
-
status: string;
|
|
63
|
-
replayed: boolean;
|
|
64
|
-
}
|
|
65
|
-
export interface JavaAgentCursorPage<T> {
|
|
66
|
-
data: T[];
|
|
67
|
-
nextCursor?: string;
|
|
68
|
-
hasMore: boolean;
|
|
69
|
-
}
|
|
70
|
-
export interface JavaAgentTranscript {
|
|
71
|
-
items?: JavaAgentItem[];
|
|
72
|
-
events: JavaAgentEvent[];
|
|
73
|
-
coveredSequence?: number;
|
|
74
|
-
olderCursor?: string;
|
|
75
|
-
hasMore: boolean;
|
|
76
|
-
lastSequence: number;
|
|
77
|
-
}
|
|
10
|
+
export type JavaAgentSession = Omit<Schemas['WebShellSession'], 'environment'> & {
|
|
11
|
+
environment?: JavaAgentEnvironment | null;
|
|
12
|
+
};
|
|
13
|
+
export type JavaAgentWorkspace = Schemas['WebShellWorkspace'];
|
|
14
|
+
export type JavaAgentWorkspacePage = Schemas['WebShellWorkspacePage'];
|
|
15
|
+
export type JavaAgentSessionPage = Omit<Schemas['WebShellSessionPage'], 'data'> & {
|
|
16
|
+
data: JavaAgentSession[];
|
|
17
|
+
};
|
|
18
|
+
export type JavaAgentEvent = Schemas['WebShellEvent'];
|
|
19
|
+
export type JavaAgentResyncRequired = Schemas['WebShellResyncRequired'];
|
|
20
|
+
export declare function isJavaAgentResyncRequired(frame: JavaAgentEvent | JavaAgentResyncRequired): frame is JavaAgentResyncRequired;
|
|
21
|
+
export type JavaAgentContentPart = Schemas['WebShellContentPart'];
|
|
22
|
+
export type JavaAgentItem = Schemas['WebShellItem'];
|
|
23
|
+
export type JavaAgentCommandAdmission = Schemas['WebShellAdmission'];
|
|
24
|
+
export type JavaAgentTranscript = Schemas['WebShellTranscript'];
|
|
78
25
|
export interface JavaManagedAgentClientOptions {
|
|
79
26
|
baseUrl: string;
|
|
80
27
|
getHeaders?: () => HeadersInit | Promise<HeadersInit>;
|
|
@@ -92,49 +39,21 @@ export declare class JavaManagedAgentClient {
|
|
|
92
39
|
private readonly fetchImpl;
|
|
93
40
|
private readonly credentials;
|
|
94
41
|
constructor(options: JavaManagedAgentClientOptions);
|
|
95
|
-
listSessions(request:
|
|
96
|
-
cursor?: string;
|
|
97
|
-
limit?: number;
|
|
98
|
-
}, signal?: AbortSignal): Promise<JavaAgentCursorPage<JavaAgentSession>>;
|
|
42
|
+
listSessions(request: Schemas['WebShellListRequest'], signal?: AbortSignal): Promise<JavaAgentSessionPage>;
|
|
99
43
|
getSession(sessionId: string, signal?: AbortSignal): Promise<JavaAgentSession>;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
type: 'text';
|
|
113
|
-
text: string;
|
|
114
|
-
}>;
|
|
115
|
-
metadata?: Record<string, unknown>;
|
|
116
|
-
}, signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
|
|
117
|
-
submitTurn(request: {
|
|
118
|
-
requestId: string;
|
|
119
|
-
idempotencyKey: string;
|
|
120
|
-
sessionId: string;
|
|
121
|
-
input: Array<{
|
|
122
|
-
type: 'text';
|
|
123
|
-
text: string;
|
|
124
|
-
}>;
|
|
125
|
-
metadata?: Record<string, unknown>;
|
|
126
|
-
}, signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
|
|
127
|
-
cancelTurn(request: {
|
|
128
|
-
requestId: string;
|
|
129
|
-
idempotencyKey: string;
|
|
130
|
-
sessionId: string;
|
|
131
|
-
turnId: string;
|
|
132
|
-
}, signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
|
|
133
|
-
streamEvents(request: {
|
|
134
|
-
sessionId: string;
|
|
135
|
-
afterSequence?: number;
|
|
136
|
-
limit?: number;
|
|
137
|
-
}, signal?: AbortSignal): AsyncGenerator<JavaAgentEvent>;
|
|
44
|
+
listWorkspaces(request: Schemas['WebShellWorkspaceQueryRequest'], signal?: AbortSignal): Promise<JavaAgentWorkspacePage>;
|
|
45
|
+
getWorkspace(workspaceId: string, signal?: AbortSignal): Promise<{
|
|
46
|
+
workspaceId: string;
|
|
47
|
+
displayName: string;
|
|
48
|
+
canCreateSession: boolean;
|
|
49
|
+
state: "active" | "draining" | "removed";
|
|
50
|
+
}>;
|
|
51
|
+
getTranscript(request: Schemas['WebShellTranscriptRequest'], signal?: AbortSignal): Promise<JavaAgentTranscript>;
|
|
52
|
+
createSession(request: Schemas['WebShellCreateRequest'], signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
|
|
53
|
+
submitTurn(request: Schemas['WebShellSubmitRequest'], signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
|
|
54
|
+
cancelTurn(request: Schemas['WebShellCancelRequest'], signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
|
|
55
|
+
streamEvents(request: Schemas['WebShellStreamRequest'], signal?: AbortSignal): AsyncGenerator<JavaAgentEvent | JavaAgentResyncRequired>;
|
|
138
56
|
private post;
|
|
139
57
|
private request;
|
|
140
58
|
}
|
|
59
|
+
export {};
|
|
@@ -4,5 +4,6 @@ export interface JavaManagedAgentProviderOptions extends JavaManagedAgentClientO
|
|
|
4
4
|
agentId?: string;
|
|
5
5
|
environmentId?: string;
|
|
6
6
|
productScope?: string;
|
|
7
|
+
enableWorkspaceBinding?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare function createJavaManagedAgentProvider(options: JavaManagedAgentProviderOptions): ManagedAgentProvider;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export type ManagedAgentSessionPhase = 'admitted' | 'runtime_starting' | 'agent_running' | 'waiting_runtime' | 'tool_running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
|
|
1
|
+
export type ManagedAgentSessionPhase = 'created' | 'admitted' | 'runtime_starting' | 'agent_running' | 'waiting_runtime' | 'tool_running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
|
|
2
2
|
export type ManagedAgentRuntimeState = 'unknown' | 'starting' | 'ready' | 'failed';
|
|
3
3
|
export interface ManagedAgentSessionSummary {
|
|
4
4
|
sessionId: string;
|
|
5
5
|
activeTurnId?: string;
|
|
6
6
|
title: string;
|
|
7
7
|
workspaceCwd?: string;
|
|
8
|
+
workspace?: {
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
cwdRelative: string;
|
|
11
|
+
};
|
|
8
12
|
createdAt: number;
|
|
9
13
|
admittedAt: number;
|
|
10
14
|
updatedAt: number;
|
|
@@ -50,6 +54,26 @@ export interface ManagedAgentProvider {
|
|
|
50
54
|
readonly storageKey: string;
|
|
51
55
|
readonly canCancel: boolean;
|
|
52
56
|
readonly acceptsWorkspaceCwd: boolean;
|
|
57
|
+
readonly workspaceBinding?: {
|
|
58
|
+
readonly agentId: string;
|
|
59
|
+
list(options: ManagedAgentRequestOptions & {
|
|
60
|
+
cursor?: string;
|
|
61
|
+
limit?: number;
|
|
62
|
+
}): Promise<{
|
|
63
|
+
data: ManagedAgentWorkspace[];
|
|
64
|
+
defaultWorkspace?: ManagedAgentWorkspace | null;
|
|
65
|
+
nextCursor?: string;
|
|
66
|
+
supported: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
get(workspaceId: string, options: ManagedAgentRequestOptions): Promise<ManagedAgentWorkspace>;
|
|
69
|
+
createEmpty(request: {
|
|
70
|
+
agentId: string;
|
|
71
|
+
workspaceId: string;
|
|
72
|
+
cwdRelative: string;
|
|
73
|
+
}, options: ManagedAgentCommandOptions): Promise<{
|
|
74
|
+
sessionId: string;
|
|
75
|
+
}>;
|
|
76
|
+
};
|
|
53
77
|
listSessions(options: ManagedAgentRequestOptions & {
|
|
54
78
|
workspaceCwd?: string;
|
|
55
79
|
limit?: number;
|
|
@@ -75,3 +99,9 @@ export interface ManagedAgentProvider {
|
|
|
75
99
|
lastEventId?: number;
|
|
76
100
|
}): AsyncIterable<ManagedAgentSessionEvent>;
|
|
77
101
|
}
|
|
102
|
+
export interface ManagedAgentWorkspace {
|
|
103
|
+
workspaceId: string;
|
|
104
|
+
displayName: string;
|
|
105
|
+
state: string;
|
|
106
|
+
canCreateSession: boolean;
|
|
107
|
+
}
|
|
@@ -13,7 +13,7 @@ export interface McpAppDisplay {
|
|
|
13
13
|
permissions?: SandboxResource['permissions'];
|
|
14
14
|
}
|
|
15
15
|
export declare function getMcpAppDisplay(value: unknown): McpAppDisplay | undefined;
|
|
16
|
-
export declare function resolveMcpAppSandboxUrl(daemonBaseUrl: string, hostUrl: string): string | undefined;
|
|
16
|
+
export declare function resolveMcpAppSandboxUrl(daemonBaseUrl: string, hostUrl: string, dataMode?: boolean): string | undefined;
|
|
17
17
|
export declare function applySandboxCspQuery(sandboxUrl: string, cspJson: string): string;
|
|
18
18
|
export declare function McpApp({ display }: {
|
|
19
19
|
display: McpAppDisplay;
|
|
@@ -36,6 +36,8 @@ export declare function getShellToolSemanticDescription(tool: ACPToolCall): stri
|
|
|
36
36
|
export declare function extractText(tool: ACPToolCall): string | null;
|
|
37
37
|
export declare function getAdvisorDisplayText(tool: ACPToolCall): string | null;
|
|
38
38
|
export declare function getToolResultSummary(tool: ACPToolCall): string;
|
|
39
|
+
export declare function getEmptyMcpToolTitleDescription(toolName: string | undefined, title: string | undefined, input: Record<string, unknown> | undefined): string | undefined;
|
|
40
|
+
export declare function isEmptyMcpToolTitle(toolName: string | undefined, title: string | undefined, input: Record<string, unknown> | undefined): boolean;
|
|
39
41
|
/**
|
|
40
42
|
* Like every other is*ToolName helper, normalizes case so callers can pass
|
|
41
43
|
* the raw wire name. One predicate on purpose: ToolGroup gates the detail
|
|
@@ -13,6 +13,7 @@ interface EnvironmentPanelProps {
|
|
|
13
13
|
workspaceCwd?: string;
|
|
14
14
|
gitWorkspaceCwd?: string;
|
|
15
15
|
gitCwd?: string;
|
|
16
|
+
gitSessionId?: string;
|
|
16
17
|
branch?: string;
|
|
17
18
|
gitStatus?: DaemonWorkspaceGitStatus;
|
|
18
19
|
tasks: readonly DaemonSessionTaskWithWorkflowStatus[];
|
|
@@ -43,5 +44,5 @@ export type EnvironmentAgentTask = DaemonSessionAgentTaskStatus & {
|
|
|
43
44
|
color?: string;
|
|
44
45
|
lineageState?: 'complete' | 'orphaned' | 'cycle';
|
|
45
46
|
};
|
|
46
|
-
export declare function EnvironmentPanel({ sources, onOpenSource, retrySourceRegistration, floating, hidden, workspaceCwd, gitWorkspaceCwd, gitCwd, branch, gitStatus, tasks, agentTasks, attachments, attachmentsLoading, attachmentsError, onRetryAttachments, artifacts, artifactsLoading, items, onOpenGitDiff, onOpenGitCommit, onOpenGitWorktrees, onOpenGitLog, onOpenAgent, onOpenAgentWorkflow, onOpenTask, onReadImage, onImagePreview, onAttachmentPreview, onAttachmentPreviewError, onOpenArtifact, onDismiss, }: EnvironmentPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function EnvironmentPanel({ sources, onOpenSource, retrySourceRegistration, floating, hidden, workspaceCwd, gitWorkspaceCwd, gitCwd, gitSessionId, branch, gitStatus, tasks, agentTasks, attachments, attachmentsLoading, attachmentsError, onRetryAttachments, artifacts, artifactsLoading, items, onOpenGitDiff, onOpenGitCommit, onOpenGitWorktrees, onOpenGitLog, onOpenAgent, onOpenAgentWorkflow, onOpenTask, onReadImage, onImagePreview, onAttachmentPreview, onAttachmentPreviewError, onOpenArtifact, onDismiss, }: EnvironmentPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
47
48
|
export {};
|
|
@@ -2,7 +2,7 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { type DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
|
|
3
3
|
import { type WebShellTheme } from '../../themeContext';
|
|
4
4
|
import { type WorkspaceManagementTarget, type WorkspaceOverviewItem } from './workspaceOverviewModel';
|
|
5
|
-
export type WebShellSidebarFooterItem = 'settings' | 'update' | 'version' | 'theme' | 'sessionsOverview' | 'workspacesOverview' | 'splitView' | 'daemonStatus' | 'localFiles' | 'collapse';
|
|
5
|
+
export type WebShellSidebarFooterItem = 'settings' | 'update' | 'version' | 'theme' | 'sessionsOverview' | 'workspacesOverview' | 'splitView' | 'daemonStatus' | 'localFiles' | 'desktopRelay' | 'collapse';
|
|
6
6
|
export interface WebShellSidebarBranding {
|
|
7
7
|
/** Replace the complete top branding row. */
|
|
8
8
|
render?: () => ReactNode;
|
|
@@ -128,7 +128,16 @@ export declare class HistoricalTranscriptPageTable {
|
|
|
128
128
|
private admitBoundaryPage;
|
|
129
129
|
private materializePage;
|
|
130
130
|
private pageFromBlocks;
|
|
131
|
-
|
|
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(
|
|
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,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.
|
|
3
|
+
"version": "0.24.7",
|
|
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",
|