@qwen-code/web-shell 0.28.3 → 0.28.6
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/NOTICES.txt +1 -1
- package/dist/{PierreFilePreview-CxOZ1g2v.js → PierreFilePreview-CAyMSfe1.js} +1 -1
- package/dist/{SpreadsheetPreview--Hpv2uJo.js → SpreadsheetPreview-sCcmRNTT.js} +2 -2
- package/dist/{WorkspaceFileBrowser-DQ_nK8CO.js → WorkspaceFileBrowser-DEvIFGbs.js} +2 -2
- package/dist/{WorkspacePdfRangePreview-B9zOI3Db.js → WorkspacePdfRangePreview-iMWtsLo7.js} +2 -2
- package/dist/{agents-route-D1nhKzzl.js → agents-route-CrZAsZhs.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{i18n-ru-CfZvlNRX.js → i18n-ru-C7ncd9S1.js} +32 -22
- package/dist/{i18n-zh-cn-oYBQlyci.js → i18n-zh-cn-7l1xyTcL.js} +32 -20
- package/dist/{i18n-zh-tw-meIHyJiH.js → i18n-zh-tw-DU7AgDPK.js} +46 -10
- package/dist/{index-ChjMzQ_r.js → index-D-5-_HVQ.js} +65984 -63114
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/{terminal-runtime-BQaN1NCS.js → terminal-runtime-ubK12HhZ.js} +997 -997
- package/dist/transcript.js +12015 -11754
- package/dist/types/adapters/messageTypes.d.ts +4 -0
- package/dist/types/adapters/transcriptAdapter.d.ts +10 -0
- package/dist/types/adapters/transcriptToMessages.d.ts +0 -20
- package/dist/types/chat-core/ChatSurface.d.ts +49 -0
- package/dist/types/chat-core/contract.d.ts +13 -2
- package/dist/types/components/BranchPickerPopover.d.ts +15 -1
- package/dist/types/components/ComposerTaskChips.d.ts +7 -4
- package/dist/types/components/GitModePopover.d.ts +11 -1
- package/dist/types/components/MessageItem.d.ts +1 -0
- package/dist/types/components/MessageList.d.ts +1 -0
- package/dist/types/components/SessionPrBadge.d.ts +3 -1
- package/dist/types/components/TranscriptViewport.d.ts +6 -0
- package/dist/types/components/WorkspaceSelector.d.ts +7 -1
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +8 -0
- package/dist/types/components/artifacts/WorkspaceArtifactLibraryPage.d.ts +12 -0
- package/dist/types/components/artifacts/artifactUtils.d.ts +84 -1
- package/dist/types/components/artifacts/workspace-artifact-library-messages.d.ts +8 -0
- package/dist/types/components/artifacts/workspace-artifact-library-messages.transcript-stub.d.ts +8 -0
- package/dist/types/components/managed/chat-capabilities.d.ts +3 -1
- package/dist/types/components/managed/chat-controller.d.ts +65 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +1 -1
- package/dist/types/components/managed/managed-agent-provider.d.ts +13 -1
- package/dist/types/components/managed/managed-question-response.d.ts +7 -0
- package/dist/types/components/managed/use-managed-actions.d.ts +1 -1
- package/dist/types/components/managed/use-managed-chat-controller.d.ts +9 -0
- package/dist/types/components/managed/use-managed-turn-cancel.d.ts +5 -2
- package/dist/types/components/messages/AskUserQuestion.d.ts +15 -2
- package/dist/types/components/messages/AssistantMessage.d.ts +5 -1
- package/dist/types/components/messages/ModAssistantMessage.d.ts +8 -1
- package/dist/types/components/messages/ThinkingBody.d.ts +20 -0
- package/dist/types/components/messages/ThinkingBody.transcript-stub.d.ts +8 -0
- package/dist/types/components/messages/ToolGroup.d.ts +2 -6
- package/dist/types/components/messages/UserMessage.d.ts +2 -0
- package/dist/types/components/preview/SavedWebPreview.d.ts +3 -2
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +8 -3
- package/dist/types/components/sidebar/sidebar-hover-suppression.d.ts +1 -0
- package/dist/types/daemon/chat-controller.d.ts +8 -1
- package/dist/types/daemon/index.d.ts +1 -1
- package/dist/types/daemon/remotePromptSidechannel.d.ts +13 -0
- package/dist/types/daemon/session/DaemonSessionProvider.d.ts +1 -0
- package/dist/types/daemon/session/index.d.ts +1 -1
- package/dist/types/daemon/session/types.d.ts +12 -1
- package/dist/types/daemon/workspace/index.d.ts +1 -1
- package/dist/types/daemon/workspace/types.d.ts +31 -2
- package/dist/types/generated-ui/effects.d.ts +27 -0
- package/dist/types/hooks/useComposerCore.d.ts +12 -0
- package/dist/types/hooks/useInputHistory.d.ts +10 -1
- package/dist/types/hooks/useWorkspaceArtifactLibrary.d.ts +47 -0
- package/dist/types/i18n.d.ts +1 -0
- package/dist/types/settings.d.ts +1 -0
- package/dist/types/utils/automatic-trigger.d.ts +2 -0
- package/dist/types/utils/navigationUrl.d.ts +1 -1
- package/dist/types/utils/promptAdmission.d.ts +2 -1
- package/dist/types/utils/rectangles.d.ts +8 -0
- package/dist/types/utils/touchCaret.d.ts +33 -0
- package/dist/types/utils/visualViewportInset.d.ts +13 -0
- package/dist/{useDaemonMidTurnInjected-BjQ9zxRv.js → useDaemonMidTurnInjected-jDVqCK0b.js} +6318 -6037
- package/package.json +1 -1
- package/dist/types/components/managed/ManagedQuestionForm.d.ts +0 -13
|
@@ -169,6 +169,8 @@ export interface DaemonThinkingMessage extends DaemonMessageMeta {
|
|
|
169
169
|
role: 'thinking';
|
|
170
170
|
content: string;
|
|
171
171
|
isStreaming?: boolean;
|
|
172
|
+
/** Identifies a subagent's thought rendered without its parent tool card. */
|
|
173
|
+
parentToolCallId?: string;
|
|
172
174
|
}
|
|
173
175
|
export interface DaemonToolGroupMessage extends DaemonMessageMeta {
|
|
174
176
|
id: string;
|
|
@@ -183,9 +185,11 @@ export interface DaemonToolGroupMessage extends DaemonMessageMeta {
|
|
|
183
185
|
* trail the last tool.
|
|
184
186
|
*/
|
|
185
187
|
thoughts?: Array<{
|
|
188
|
+
id?: string;
|
|
186
189
|
content: string;
|
|
187
190
|
isStreaming?: boolean;
|
|
188
191
|
beforeToolCallId?: string;
|
|
192
|
+
parentToolCallId?: string;
|
|
189
193
|
}>;
|
|
190
194
|
}
|
|
191
195
|
export interface DaemonPlanMessage extends DaemonMessageMeta {
|
|
@@ -9,4 +9,14 @@ export declare function extractPendingPermission(blocks: readonly DaemonTranscri
|
|
|
9
9
|
* delta does not re-serialize each outstanding approval's payload.
|
|
10
10
|
*/
|
|
11
11
|
export declare function isAskUserPermissionBlock(block: DaemonTranscriptBlock): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Cheap content revision for a pending permission block, used to key the
|
|
14
|
+
* binding's split cache. A re-emitted `permission.request` under the same
|
|
15
|
+
* request id can change the title/options while id and classification stay
|
|
16
|
+
* put, so id+classification alone would serve a stale render-ready request.
|
|
17
|
+
* Reads only scalar/option-id fields (no payload serialization) so a streaming
|
|
18
|
+
* delta does not re-serialize the payload; `updatedAt` additionally catches
|
|
19
|
+
* raw-input-only updates that bump the block's revision.
|
|
20
|
+
*/
|
|
21
|
+
export declare function pendingPermissionRevision(block: DaemonTranscriptBlock): string;
|
|
12
22
|
export declare function escapePreviewText(text: string): string;
|
|
@@ -28,26 +28,6 @@ export declare function isRetryableTurnErrorKind(errorKind: string | undefined):
|
|
|
28
28
|
export declare function assistantBlockRendersAsSystemNotice(block: DaemonTranscriptBlock): boolean;
|
|
29
29
|
export declare function transcriptBlocksToDaemonMessages(blocks: readonly DaemonTranscriptBlock[], options?: TranscriptMessageOptions): DaemonMessage[];
|
|
30
30
|
export declare function daemonToolBlockToToolCall(block: DaemonToolTranscriptBlock, safeToolProjection: boolean): DaemonMessageToolCall;
|
|
31
|
-
type ParsedInsight = {
|
|
32
|
-
type: 'insight_progress';
|
|
33
|
-
stage: string;
|
|
34
|
-
progress: number;
|
|
35
|
-
detail?: string;
|
|
36
|
-
} | {
|
|
37
|
-
type: 'insight_ready';
|
|
38
|
-
path: string;
|
|
39
|
-
} | {
|
|
40
|
-
type: 'insight_error';
|
|
41
|
-
error: string;
|
|
42
|
-
};
|
|
43
|
-
type InsightSegment = {
|
|
44
|
-
kind: 'text';
|
|
45
|
-
text: string;
|
|
46
|
-
} | {
|
|
47
|
-
kind: 'insight';
|
|
48
|
-
data: ParsedInsight;
|
|
49
|
-
};
|
|
50
|
-
export declare function splitInsightSegments(text: string): InsightSegment[] | null;
|
|
51
31
|
/**
|
|
52
32
|
* The visible assistant text of a block's text, with insight protocol frames
|
|
53
33
|
* (`insight_progress` / `insight_ready` / `insight_error`) stripped exactly as
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
import type { CommandInfo, TodoItem } from '../adapters/types.js';
|
|
8
|
+
import type { SessionContentGenerator } from '../components/messages/AssistantMessage.js';
|
|
9
|
+
import { type ComposerToolbarAction } from '../components/ChatEditor.js';
|
|
10
|
+
import type { SessionChatController } from './contract.js';
|
|
11
|
+
export interface ChatSurfaceProps {
|
|
12
|
+
readonly controller: SessionChatController;
|
|
13
|
+
readonly header?: ReactNode;
|
|
14
|
+
readonly panels?: ReactNode;
|
|
15
|
+
readonly composerStatus?: ReactNode;
|
|
16
|
+
readonly transcriptError?: ReactNode;
|
|
17
|
+
readonly commands?: readonly CommandInfo[];
|
|
18
|
+
readonly onError?: (error: unknown, fallback: string) => void;
|
|
19
|
+
readonly hasOlderHistory?: boolean;
|
|
20
|
+
readonly onLoadOlderHistory?: (options?: {
|
|
21
|
+
force?: boolean;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
readonly historyPaginationError?: boolean;
|
|
24
|
+
readonly loadingOlderHistory?: boolean;
|
|
25
|
+
readonly historyCapacityReached?: boolean;
|
|
26
|
+
readonly planTodos?: readonly TodoItem[];
|
|
27
|
+
readonly planExecutionMode?: string;
|
|
28
|
+
readonly approvalDisabled?: boolean;
|
|
29
|
+
readonly approvalKeyboardActive?: boolean;
|
|
30
|
+
readonly showBrowserNotifications?: boolean;
|
|
31
|
+
readonly generateContent?: SessionContentGenerator;
|
|
32
|
+
readonly askUserFreeTextLabel?: string;
|
|
33
|
+
readonly askUserDetails?: () => void;
|
|
34
|
+
readonly atWorkspaceCwd?: string;
|
|
35
|
+
readonly composerScopeKey?: string;
|
|
36
|
+
readonly composerSubmitBlocked?: boolean;
|
|
37
|
+
readonly sessionViewportEnabled?: boolean;
|
|
38
|
+
readonly workspaceFeaturesEnabled?: boolean;
|
|
39
|
+
readonly visibleToolbarActions?: readonly ComposerToolbarAction[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The backend-neutral chat column (unified chat surface, slice 2). It renders
|
|
43
|
+
* every chat column from a {@link SessionChatController} view model and never
|
|
44
|
+
* branches on `controller.kind`: a region renders only when its facts are
|
|
45
|
+
* present. Backend-specific panels and chrome arrive as slots. Admission is not
|
|
46
|
+
* establishment — the composer defers its draft commit to admission, while turn
|
|
47
|
+
* and decision outcomes are reflected through the controller's observable state.
|
|
48
|
+
*/
|
|
49
|
+
export declare function ChatSurface({ controller, header, panels, composerStatus, transcriptError, commands, onError, hasOlderHistory, onLoadOlderHistory, historyPaginationError, loadingOlderHistory, historyCapacityReached, planTodos, planExecutionMode, approvalDisabled, approvalKeyboardActive, showBrowserNotifications, generateContent, askUserFreeTextLabel, askUserDetails, atWorkspaceCwd, composerScopeKey, composerSubmitBlocked, sessionViewportEnabled, workspaceFeaturesEnabled, visibleToolbarActions, }: ChatSurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Message } from '../adapters/types.js';
|
|
1
|
+
import type { Message, PermissionRequest } from '../adapters/types.js';
|
|
2
2
|
import type { PromptFile, PromptImage } from '../adapters/promptTypes.js';
|
|
3
3
|
import type { ComposerSubmitMetadata } from '../hooks/useComposerCore.js';
|
|
4
4
|
export type Admission = 'accepted' | 'rejected' | 'unknown';
|
|
@@ -26,13 +26,17 @@ export type ChatPhase = 'idle' | 'submitting' | 'running' | 'cancelling' | 'fail
|
|
|
26
26
|
export interface PendingApproval {
|
|
27
27
|
readonly id: string;
|
|
28
28
|
readonly status: 'pending' | 'superseded';
|
|
29
|
+
readonly request: PermissionRequest;
|
|
29
30
|
}
|
|
30
31
|
export interface PendingQuestion {
|
|
31
32
|
readonly id: string;
|
|
33
|
+
readonly request: PermissionRequest;
|
|
32
34
|
}
|
|
33
35
|
export interface QuestionAnswer {
|
|
34
36
|
readonly questionId: string;
|
|
35
37
|
readonly value: string;
|
|
38
|
+
readonly optionIds?: readonly string[];
|
|
39
|
+
readonly text?: string;
|
|
36
40
|
}
|
|
37
41
|
export interface ComposerSubmit {
|
|
38
42
|
readonly text: string;
|
|
@@ -86,10 +90,17 @@ export interface SessionChatController {
|
|
|
86
90
|
readonly kind: 'daemon' | 'managed';
|
|
87
91
|
readonly sessionId: string;
|
|
88
92
|
readonly storageKey: string;
|
|
93
|
+
readonly activeTurnId?: string;
|
|
89
94
|
readonly operations: readonly ChatOperation[];
|
|
90
95
|
readonly messages: readonly Message[];
|
|
91
96
|
readonly transcriptState: 'loading' | 'ready' | 'error';
|
|
92
|
-
|
|
97
|
+
readonly hasOlderHistory?: boolean;
|
|
98
|
+
readonly loadingOlderHistory?: boolean;
|
|
99
|
+
readonly historyCapacityReached?: boolean;
|
|
100
|
+
readonly historyPaginationError?: boolean;
|
|
101
|
+
loadOlder?(options?: {
|
|
102
|
+
force?: boolean;
|
|
103
|
+
}): Promise<void>;
|
|
93
104
|
readonly phase: ChatPhase;
|
|
94
105
|
submit(input: ComposerSubmit): Promise<IntentResult>;
|
|
95
106
|
cancel(): Promise<IntentResult>;
|
|
@@ -6,6 +6,19 @@
|
|
|
6
6
|
import type { DaemonGitBranchesResult, DaemonWorkspaceGitStatus } from '@qwen-code/sdk/daemon';
|
|
7
7
|
import { useI18n } from '../i18n';
|
|
8
8
|
export declare const GIT_REMOTE_MUTATION_FETCH_TIMEOUT_MS = 600000;
|
|
9
|
+
export interface BranchPickerPreservedState {
|
|
10
|
+
scopeKey: string;
|
|
11
|
+
search: string;
|
|
12
|
+
newBranchMode: boolean;
|
|
13
|
+
newBranchName: string;
|
|
14
|
+
checkoutRefMode: boolean;
|
|
15
|
+
checkoutRefValue: string;
|
|
16
|
+
createBranchMode: boolean;
|
|
17
|
+
createBranchValue: string;
|
|
18
|
+
view: 'branches' | 'remotes';
|
|
19
|
+
remoteName: string;
|
|
20
|
+
remoteUrl: string;
|
|
21
|
+
}
|
|
9
22
|
interface BranchPickerPopoverProps {
|
|
10
23
|
open: boolean;
|
|
11
24
|
onOpenChange: (open: boolean) => void;
|
|
@@ -14,6 +27,7 @@ interface BranchPickerPopoverProps {
|
|
|
14
27
|
gitSessionId?: string;
|
|
15
28
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
16
29
|
onBranchChanged?: () => void;
|
|
30
|
+
preservedStateRef?: React.MutableRefObject<BranchPickerPreservedState | null>;
|
|
17
31
|
/**
|
|
18
32
|
* Working-tree summary from the trigger chip. Seeds the hints beside the
|
|
19
33
|
* Update / Commit / Push actions (dirty counts, in-progress operation) until
|
|
@@ -84,5 +98,5 @@ export declare function deriveActionHints(t: TranslateFn, data: DaemonGitBranche
|
|
|
84
98
|
* re-fetched. Exported for tests.
|
|
85
99
|
*/
|
|
86
100
|
export declare function listingContradictsStatus(data: DaemonGitBranchesResult, status: DaemonWorkspaceGitStatus): boolean;
|
|
87
|
-
export declare function BranchPickerPopover({ open, onOpenChange, workspaceCwd, gitCwd, gitSessionId, side, onBranchChanged, status, onStatusRefreshed, onOpenDiff, onOpenCommit, onOpenWorktrees, onOpenLog, onCreateWorktreeBranch, onHandoff, children, }: BranchPickerPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
export declare function BranchPickerPopover({ open, onOpenChange, workspaceCwd, gitCwd, gitSessionId, side, onBranchChanged, status, onStatusRefreshed, onOpenDiff, onOpenCommit, onOpenWorktrees, onOpenLog, onCreateWorktreeBranch, onHandoff, preservedStateRef, children, }: BranchPickerPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
88
102
|
export {};
|
|
@@ -8,8 +8,10 @@ export interface ComposerTaskChipsProps {
|
|
|
8
8
|
tasks: readonly ComposerChipTask[];
|
|
9
9
|
/** Whether background agents get a chip (hosts without agent surfaces opt out). */
|
|
10
10
|
includeAgents: boolean;
|
|
11
|
-
/**
|
|
12
|
-
onSelectTask: (task: ComposerChipTask) => void;
|
|
11
|
+
/** Select a task; direct single-chip activation also allows collapsing it. */
|
|
12
|
+
onSelectTask: (task: ComposerChipTask, toggle?: boolean) => void;
|
|
13
|
+
/** Whether a single-task chip's target panel or dialog is currently open. */
|
|
14
|
+
isTaskOpen?: (task: ComposerChipTask) => boolean;
|
|
13
15
|
/** Ask the model to explain the task as a side question, without opening it. */
|
|
14
16
|
onExplainTask?: (task: DaemonSessionTaskWithWorkflowStatus) => void;
|
|
15
17
|
/** Hand focus back to the composer, optionally with a typed character. */
|
|
@@ -18,7 +20,8 @@ export interface ComposerTaskChipsProps {
|
|
|
18
20
|
/**
|
|
19
21
|
* Chips above the composer for this session's unfinished background work —
|
|
20
22
|
* one per kind ("1 workflow", "2 shells"). A chip that stands for a single
|
|
21
|
-
* task
|
|
22
|
-
* row to pick from
|
|
23
|
+
* task toggles its detail; one that stands for several opens a list above the
|
|
24
|
+
* row to pick from and collapses that list on repeat activation. Finished
|
|
25
|
+
* tasks have no chip, so the row clears itself.
|
|
23
26
|
*/
|
|
24
27
|
export declare const ComposerTaskChips: import("react").ForwardRefExoticComponent<ComposerTaskChipsProps & import("react").RefAttributes<ComposerTaskChipsHandle>>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2026 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { DaemonWorkspaceGitStatus } from '@qwen-code/sdk/daemon';
|
|
6
7
|
export type SessionGitIntent = {
|
|
7
8
|
mode: 'current';
|
|
8
9
|
} | {
|
|
@@ -13,11 +14,20 @@ export type SessionGitIntent = {
|
|
|
13
14
|
slug?: string;
|
|
14
15
|
};
|
|
15
16
|
export declare function validateBranchName(name: string): boolean;
|
|
17
|
+
export interface GitModePopoverDraft {
|
|
18
|
+
selectedMode: SessionGitIntent['mode'];
|
|
19
|
+
branchName: string;
|
|
20
|
+
}
|
|
16
21
|
interface GitModePopoverProps {
|
|
17
22
|
branch: string;
|
|
23
|
+
status?: DaemonWorkspaceGitStatus;
|
|
18
24
|
compact?: boolean;
|
|
19
25
|
intent: SessionGitIntent;
|
|
20
26
|
onIntentChange: (intent: SessionGitIntent) => void;
|
|
27
|
+
open?: boolean;
|
|
28
|
+
onOpenChange?: (open: boolean) => void;
|
|
29
|
+
draft?: GitModePopoverDraft;
|
|
30
|
+
onDraftChange?: (update: (current: GitModePopoverDraft) => GitModePopoverDraft) => void;
|
|
21
31
|
}
|
|
22
|
-
export declare function GitModePopover({ branch, compact, intent, onIntentChange, }: GitModePopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function GitModePopover({ branch, status, compact, intent, onIntentChange, open: openProp, onOpenChange, draft, onDraftChange, }: GitModePopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
23
33
|
export {};
|
|
@@ -24,6 +24,7 @@ interface MessageItemProps {
|
|
|
24
24
|
showRetryHint?: boolean;
|
|
25
25
|
onRetryClick?: () => void;
|
|
26
26
|
sendFailed?: boolean;
|
|
27
|
+
sendFailedStatus?: 'failed' | 'uncertain';
|
|
27
28
|
onRetrySend?: () => void;
|
|
28
29
|
/**
|
|
29
30
|
* Open the in-place editor for this user message. Return `true` when a host
|
|
@@ -95,6 +95,7 @@ export interface MessageListProps {
|
|
|
95
95
|
showRetryHint?: boolean;
|
|
96
96
|
onRetryClick?: () => void;
|
|
97
97
|
failedPromptMessageId?: string;
|
|
98
|
+
failedPromptStatus?: 'failed' | 'uncertain';
|
|
98
99
|
onRetryFailedPrompt?: () => void;
|
|
99
100
|
onBranchSession?: (branchRecordId?: string) => void | Promise<void>;
|
|
100
101
|
onCanScrollToBottomChange?: (canScrollToBottom: boolean) => void;
|
|
@@ -12,6 +12,8 @@ interface SessionPrBadgeProps {
|
|
|
12
12
|
* owns roving-tabindex keyboard navigation (e.g. picker dialogs).
|
|
13
13
|
*/
|
|
14
14
|
tabIndex?: number;
|
|
15
|
+
/** Uses less spacing and no pill background in sidebar session rows. */
|
|
16
|
+
compact?: boolean;
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
19
|
* The bound PRs the badge can open, in the order given. Bindings whose URL
|
|
@@ -27,5 +29,5 @@ export declare function openableSessionPrs(prs: DaemonSessionPrInfo[]): DaemonSe
|
|
|
27
29
|
* PR with an overflow count and opens it through the desktop-aware
|
|
28
30
|
* external-link opener.
|
|
29
31
|
*/
|
|
30
|
-
export declare function SessionPrBadge({ prs, tabIndex }: SessionPrBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
32
|
+
export declare function SessionPrBadge({ prs, tabIndex, compact, }: SessionPrBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
31
33
|
export {};
|
|
@@ -16,5 +16,11 @@ export declare function followRangeFromRows(rows: readonly {
|
|
|
16
16
|
}[], viewportTop: number, viewportBottom: number): TurnFollowRange | undefined;
|
|
17
17
|
export interface TranscriptViewportProps extends MessageListProps {
|
|
18
18
|
approvalOverlayActive?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Enables session-context historical turn navigation and message deletion.
|
|
21
|
+
* Defaults to `true` for daemon callers; pass `false` for flat live hosts
|
|
22
|
+
* (including non-daemon surfaces co-mounted inside a daemon provider tree).
|
|
23
|
+
*/
|
|
24
|
+
sessionViewportEnabled?: boolean;
|
|
19
25
|
}
|
|
20
26
|
export declare const TranscriptViewport: import("react").ForwardRefExoticComponent<TranscriptViewportProps & import("react").RefAttributes<MessageListHandle>>;
|
|
@@ -31,10 +31,16 @@ interface WorkspaceSelectorProps {
|
|
|
31
31
|
onSelectStandalone?: () => void;
|
|
32
32
|
onCreateScratch: () => void;
|
|
33
33
|
onOpenExistingFolder: () => void;
|
|
34
|
+
/** Touch activation can otherwise release over a newly opened option. */
|
|
35
|
+
contentSide?: 'top' | 'bottom';
|
|
36
|
+
open?: boolean;
|
|
37
|
+
onOpenChange?: (open: boolean) => void;
|
|
38
|
+
newWorkspaceOpen?: boolean;
|
|
39
|
+
onNewWorkspaceOpenChange?: (open: boolean) => void;
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
36
42
|
* Composer workspace menu. Capability-gated creation actions and disabled
|
|
37
43
|
* untrusted entries keep presentation aligned with daemon authorization.
|
|
38
44
|
*/
|
|
39
|
-
export declare function WorkspaceSelector({ workspaces, selectedWorkspaceCwd, disabled, busy, alwaysVisible, menuItems, scratchSupported, existingFolderSupported, standaloneSupported, selectedStandalone, className, onSelectWorkspace, onSelectHostedWorkspace, onSelectStandalone, onCreateScratch, onOpenExistingFolder, }: WorkspaceSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
|
+
export declare function WorkspaceSelector({ workspaces, selectedWorkspaceCwd, disabled, busy, alwaysVisible, menuItems, scratchSupported, existingFolderSupported, standaloneSupported, selectedStandalone, className, onSelectWorkspace, onSelectHostedWorkspace, onSelectStandalone, onCreateScratch, onOpenExistingFolder, contentSide, open: openProp, onOpenChange, newWorkspaceOpen: newWorkspaceOpenProp, onNewWorkspaceOpenChange, }: WorkspaceSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
40
46
|
export {};
|
|
@@ -10,6 +10,7 @@ import type { SessionWorkflowProjection } from '../workflow/session-workflow-mod
|
|
|
10
10
|
import type { WebPreviewState } from '../preview/web-preview';
|
|
11
11
|
import type { TrajectoryPageLoader } from '../../trajectory/useTrajectoryWindow';
|
|
12
12
|
import type { ContextUsageControls } from '../../hooks/useContextUsageControls';
|
|
13
|
+
import { type ArtifactWorkspaceActions } from './useArtifactWorkspaceTarget';
|
|
13
14
|
export type ImageTabSource = {
|
|
14
15
|
kind: 'attachment';
|
|
15
16
|
attachmentId: string;
|
|
@@ -329,4 +330,11 @@ interface ArtifactPanelProps {
|
|
|
329
330
|
onToggleFullscreen?: () => void;
|
|
330
331
|
}
|
|
331
332
|
export declare function ArtifactPanel({ contextUsageControls, artifacts, sessionArtifacts, onOpenArtifact, tabs, activeTabId, reviewChanges, selectedReviewPath, panelWidth, workspaceCwd, loading, restoring, error, onSelectTab, onSelectTurnCallsPrompt, onCloseTab, onOpenFilePreview, onOpenMemoryFile, latestReviewAvailable, onOpenLatestReview, changeOverviewAvailable, onOpenChangeOverview, onOpenTerminal, onOpenTrajectory, trajectoryTabId, onOpenFiles, onReferenceFile, onOpenWebPreview, onWebPreviewChange, items, sideTaskAvailable, sideTasks, archivedSideTasks, sideTasksLoading, onCreateSideTask, onOpenSideTask, onArchiveSideTasks, onUnarchiveSideTasks, onSideTaskMenuOpen, onCreateSideTaskSession, onSideTaskCreated, onSideTaskTitleChange, onSideTaskInitialPromptRefused, onNestedRightPanelOpen, onNestedArtifactsChange, onOpenNestedSubagent, agentTasks, explainTask, onExplainTask, taskExplanation, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onError, sessionWorkflowEnabled, modelManagement, unavailableModels, mountUnavailableModelTooltip, workflow, onImageIngestionNotice, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
333
|
+
export declare function ArtifactDetail({ artifact, sourceSessionId, workspaceActions, previewContent, onSnapshotSessionNotFound, }: {
|
|
334
|
+
artifact: DaemonSessionArtifact;
|
|
335
|
+
sourceSessionId?: string;
|
|
336
|
+
workspaceActions: ArtifactWorkspaceActions;
|
|
337
|
+
previewContent?: string;
|
|
338
|
+
onSnapshotSessionNotFound?: () => void;
|
|
339
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
332
340
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type WorkspaceArtifactLibraryReader } from '../../hooks/useWorkspaceArtifactLibrary';
|
|
2
|
+
export declare const DEFAULT_ARTIFACT_LIBRARY_RENDER_STEP = 50;
|
|
3
|
+
export interface WorkspaceArtifactLibraryPageProps {
|
|
4
|
+
workspaceCwd: string | undefined;
|
|
5
|
+
onOpenSession: (sessionId: string, archiveState: 'active' | 'archived') => void;
|
|
6
|
+
onJumpToSessionArtifact: (sessionId: string, artifactId: string, archiveState: 'active' | 'archived') => void;
|
|
7
|
+
reader?: WorkspaceArtifactLibraryReader;
|
|
8
|
+
features?: readonly string[];
|
|
9
|
+
isSessionLive?: (sessionId: string) => boolean;
|
|
10
|
+
renderLimitStep?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function WorkspaceArtifactLibraryPage({ workspaceCwd, onOpenSession, onJumpToSessionArtifact, reader: readerProp, features: featuresProp, isSessionLive: isSessionLiveProp, renderLimitStep, }: WorkspaceArtifactLibraryPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DaemonSessionArtifact, type DaemonWorkspaceFileBytes } from '@qwen-code/sdk/daemon';
|
|
2
2
|
import type { DaemonWorkspaceActions } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
3
3
|
export declare function artifactKindLabel(kind: string, workspacePath?: string): string;
|
|
4
4
|
export declare function isOfficeDocumentPath(workspacePath?: string): boolean;
|
|
@@ -55,4 +55,87 @@ export declare function stripWorkspacePath(path: string, workspaceCwd?: string):
|
|
|
55
55
|
export declare function isSamePath(left: string | undefined, right: string | undefined, workspaceCwd?: string): boolean;
|
|
56
56
|
export declare function artifactPreviewDocument(html: string, title: string): string;
|
|
57
57
|
export declare function loadArtifactPreviewDocument(html: string, title: string, signal: AbortSignal): Promise<string>;
|
|
58
|
+
export declare function isWebPreviewSnapshotArtifact(artifact: Pick<DaemonSessionArtifact, 'metadata'>): boolean;
|
|
59
|
+
export declare function isCodeReviewArtifact(artifact: Pick<DaemonSessionArtifact, 'metadata'>): boolean;
|
|
60
|
+
export declare function isAutomationSnapshotArtifact(artifact: Pick<DaemonSessionArtifact, 'metadata'>): boolean;
|
|
61
|
+
export declare function canPreviewWorkspaceArtifact(artifact: Pick<DaemonSessionArtifact, 'storage' | 'workspacePath'>): boolean;
|
|
62
|
+
export type WorkspaceArtifactDispatchAction = {
|
|
63
|
+
kind: 'workspace_preview';
|
|
64
|
+
} | {
|
|
65
|
+
kind: 'live_web_preview_snapshot';
|
|
66
|
+
} | {
|
|
67
|
+
kind: 'jump_web_preview_snapshot';
|
|
68
|
+
} | {
|
|
69
|
+
kind: 'metadata_detail';
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Shared dispatch classification for session and workspace artifact views.
|
|
73
|
+
* Saved web-preview snapshots (`metadata.artifactType === 'web_preview_snapshot'`,
|
|
74
|
+
* stored with `storage: 'published'`) require a live attached session for the
|
|
75
|
+
* snapshot content route; cold/archived sessions must jump to the session
|
|
76
|
+
* first. Metadata-only `storage: 'managed'` artifacts render straight from the
|
|
77
|
+
* envelope descriptor without loading a session or hitting the content route.
|
|
78
|
+
*/
|
|
79
|
+
export declare function classifyWorkspaceArtifactDispatch(artifact: DaemonSessionArtifact, isSessionLive: boolean): WorkspaceArtifactDispatchAction;
|
|
80
|
+
export interface DaemonHttpErrorInfo {
|
|
81
|
+
status?: number;
|
|
82
|
+
code?: string;
|
|
83
|
+
message: string;
|
|
84
|
+
}
|
|
85
|
+
export declare function readDaemonHttpErrorInfo(error: unknown): DaemonHttpErrorInfo;
|
|
86
|
+
export declare function isSessionNotFoundArtifactError(error: unknown): boolean;
|
|
87
|
+
export declare function isArtifactSnapshotUnavailableError(error: unknown): boolean;
|
|
88
|
+
export interface PendingArtifactJumpOpenRequest {
|
|
89
|
+
readonly sessionId: string;
|
|
90
|
+
readonly artifactId: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Decides whether a session-keyed post-jump artifact open request should wait,
|
|
94
|
+
* open now, or be canceled because the user switched to another session
|
|
95
|
+
* mid-load. Opening before the target session's right-panel restore commits
|
|
96
|
+
* would have its tab wiped by the restore effect's reset.
|
|
97
|
+
*/
|
|
98
|
+
export declare function resolvePendingArtifactJumpOpen(pending: PendingArtifactJumpOpenRequest | undefined, state: {
|
|
99
|
+
currentSessionId: string | undefined;
|
|
100
|
+
switchingSessionId: string | null | undefined;
|
|
101
|
+
panelStateKey: string | undefined;
|
|
102
|
+
restoredSessionKey: string | undefined;
|
|
103
|
+
panelRestoring: boolean;
|
|
104
|
+
loadingTranscript: boolean | undefined;
|
|
105
|
+
artifactsLoading: boolean;
|
|
106
|
+
connected: boolean;
|
|
107
|
+
}): 'none' | 'wait' | 'open' | 'cancel';
|
|
108
|
+
export interface ArtifactLibrarySessionJumpDeps {
|
|
109
|
+
sessionId: string;
|
|
110
|
+
archiveState: 'active' | 'archived';
|
|
111
|
+
artifactId?: string;
|
|
112
|
+
targetCwd: string | undefined;
|
|
113
|
+
primaryCwd: string | undefined;
|
|
114
|
+
showChat: () => void;
|
|
115
|
+
unarchivePrimarySession: (sessionId: string) => Promise<unknown>;
|
|
116
|
+
unarchiveWorkspaceSessions: (workspaceCwd: string, sessionIds: string[]) => Promise<{
|
|
117
|
+
unarchived: string[];
|
|
118
|
+
alreadyActive: string[];
|
|
119
|
+
notFound: string[];
|
|
120
|
+
errors: Array<{
|
|
121
|
+
sessionId: string;
|
|
122
|
+
error: string;
|
|
123
|
+
}>;
|
|
124
|
+
}>;
|
|
125
|
+
getPendingJumpArtifactOpen: () => PendingArtifactJumpOpenRequest | undefined;
|
|
126
|
+
setPendingJumpArtifactOpen: (request: PendingArtifactJumpOpenRequest | undefined) => void;
|
|
127
|
+
isCurrent: () => boolean;
|
|
128
|
+
loadSidebarSession: (sessionId: string, workspaceCwd?: string) => Promise<void>;
|
|
129
|
+
reportError: (error: unknown, fallbackMessage: string) => void;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Orchestrates opening a session (and optionally arming a post-jump artifact
|
|
133
|
+
* tab open) from the workspace artifact library. For archived sessions, the
|
|
134
|
+
* pending artifact open is armed only AFTER unarchive resolves and immediately
|
|
135
|
+
* before `loadSidebarSession`, so `resolvePendingArtifactJumpOpen` does not
|
|
136
|
+
* cancel the request while the shell is still parked on the old session during
|
|
137
|
+
* the awaited unarchive RPC. `isCurrent()` is checked after the awaited
|
|
138
|
+
* unarchive so a navigation started meanwhile is never overridden.
|
|
139
|
+
*/
|
|
140
|
+
export declare function runArtifactLibrarySessionJump(deps: ArtifactLibrarySessionJumpDeps): Promise<void>;
|
|
58
141
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const WORKSPACE_ARTIFACT_LIBRARY_MESSAGES_EN: Record<string, string>;
|
|
7
|
+
export declare const WORKSPACE_ARTIFACT_LIBRARY_MESSAGES_ZH: Record<string, string>;
|
|
8
|
+
export declare const WORKSPACE_ARTIFACT_LIBRARY_MESSAGES_RU: Record<string, string>;
|
package/dist/types/components/artifacts/workspace-artifact-library-messages.transcript-stub.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const WORKSPACE_ARTIFACT_LIBRARY_MESSAGES_EN: {};
|
|
7
|
+
export declare const WORKSPACE_ARTIFACT_LIBRARY_MESSAGES_ZH: {};
|
|
8
|
+
export declare const WORKSPACE_ARTIFACT_LIBRARY_MESSAGES_RU: {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ManagedAgentSessionSummary } from './managed-agent-provider.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ChatCapabilities } from '../../chat-core/contract.js';
|
|
3
|
+
import { type ChatRegion } from '../../chat-core/capabilities.js';
|
|
3
4
|
export type ManagedCapabilityKey = keyof ManagedAgentSessionSummary['capabilities'];
|
|
4
5
|
export declare const MANAGED_CHAT_CAPABILITY_MAP: Record<ManagedCapabilityKey, readonly ChatRegion[]>;
|
|
5
6
|
export declare function isManagedCapabilityOn(value: boolean | null | undefined): boolean;
|
|
7
|
+
export declare function managedCapabilitiesFromSummary(capabilities: Partial<ManagedAgentSessionSummary['capabilities']> | undefined): ChatCapabilities;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Message, PermissionRequest } from '../../adapters/types.js';
|
|
7
|
+
import type { Admission, ApprovalSelectionController, ChatCapabilities, ChatOperation, ChatStatusFacts, ComposerSubmit, ContextUsageController, ModelSelectionController, QuestionAnswer, SessionChatController, SessionOpsController } from '../../chat-core/contract.js';
|
|
8
|
+
import type { ManagedAgentPendingAction, ManagedAgentPendingQuestionAction, ManagedAgentQuestionAnswer, ManagedAgentSessionPhase } from './managed-agent-provider.js';
|
|
9
|
+
import { MAX_MANAGED_QUESTION_TEXT_LENGTH } from './managed-question-response.js';
|
|
10
|
+
export { MAX_MANAGED_QUESTION_TEXT_LENGTH };
|
|
11
|
+
type OperationState = ChatOperation['state'];
|
|
12
|
+
export interface ManagedTransportAdmission {
|
|
13
|
+
readonly admission: Admission;
|
|
14
|
+
readonly operationId?: string;
|
|
15
|
+
readonly turnId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ManagedOperationSettlement {
|
|
18
|
+
readonly operationId: string;
|
|
19
|
+
readonly status: 'completed' | 'failed' | 'cancelled' | 'recovery_blocked';
|
|
20
|
+
}
|
|
21
|
+
export interface ManagedTurnSettlement {
|
|
22
|
+
readonly turnId: string;
|
|
23
|
+
readonly outcome: 'completed' | 'cancelled' | 'failed';
|
|
24
|
+
}
|
|
25
|
+
export interface ManagedActionSettlement {
|
|
26
|
+
readonly actionId: string;
|
|
27
|
+
readonly outcome: 'resolved' | 'expired' | 'superseded' | 'failed';
|
|
28
|
+
}
|
|
29
|
+
export interface ManagedChatControllerDeps {
|
|
30
|
+
readonly sessionId: string;
|
|
31
|
+
readonly storageKey: string;
|
|
32
|
+
readonly activeTurnId?: string;
|
|
33
|
+
readonly sessionPhase: ManagedAgentSessionPhase;
|
|
34
|
+
readonly messages: readonly Message[];
|
|
35
|
+
readonly transcriptState: 'loading' | 'ready' | 'error';
|
|
36
|
+
readonly hasOlderHistory?: boolean;
|
|
37
|
+
readonly loadingOlderHistory?: boolean;
|
|
38
|
+
readonly historyCapacityReached?: boolean;
|
|
39
|
+
readonly historyPaginationError?: boolean;
|
|
40
|
+
loadOlder?(options?: {
|
|
41
|
+
force?: boolean;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
readonly pendingActions: readonly ManagedAgentPendingAction[];
|
|
44
|
+
readonly now?: () => number;
|
|
45
|
+
readonly statusFacts: ChatStatusFacts;
|
|
46
|
+
readonly capabilities: ChatCapabilities;
|
|
47
|
+
readonly modelSelection?: ModelSelectionController;
|
|
48
|
+
readonly approvalSelection?: ApprovalSelectionController;
|
|
49
|
+
readonly contextUsage?: ContextUsageController;
|
|
50
|
+
readonly sessionOps?: SessionOpsController;
|
|
51
|
+
submitPrompt(input: ComposerSubmit): Promise<ManagedTransportAdmission>;
|
|
52
|
+
cancelTurn(turnId: string): Promise<ManagedTransportAdmission>;
|
|
53
|
+
submitApproval(actionId: string, optionId: string): Promise<ManagedTransportAdmission>;
|
|
54
|
+
submitQuestion(actionId: string, answers: readonly ManagedAgentQuestionAnswer[]): Promise<ManagedTransportAdmission>;
|
|
55
|
+
subscribeOperationSettlement?(listener: (event: ManagedOperationSettlement) => void): () => void;
|
|
56
|
+
subscribeTurnSettlement?(listener: (event: ManagedTurnSettlement) => void): () => void;
|
|
57
|
+
subscribeActionSettlement?(listener: (event: ManagedActionSettlement) => void): () => void;
|
|
58
|
+
readonly signal?: AbortSignal;
|
|
59
|
+
}
|
|
60
|
+
export declare const MANAGED_QUESTION_SUBMIT_OPTION_ID = "submit";
|
|
61
|
+
export declare function mapManagedPhase(phase: ManagedAgentSessionPhase): 'idle' | 'running' | 'cancelling' | 'failed';
|
|
62
|
+
export declare function mapManagedOperationStatus(status: ManagedOperationSettlement['status']): Exclude<OperationState, 'pending'>;
|
|
63
|
+
export declare function toManagedQuestionPermissionRequest(action: ManagedAgentPendingQuestionAction): PermissionRequest;
|
|
64
|
+
export declare function normalizeManagedQuestionAnswers(action: ManagedAgentPendingQuestionAction, answers: readonly QuestionAnswer[]): ManagedAgentQuestionAnswer[] | null;
|
|
65
|
+
export declare function createManagedChatController(deps: ManagedChatControllerDeps): SessionChatController;
|
|
@@ -822,7 +822,7 @@ export interface paths {
|
|
|
822
822
|
};
|
|
823
823
|
get?: never;
|
|
824
824
|
put?: never;
|
|
825
|
-
/** @description Recheck only the latest original Turn under the existing cancellation/cleanup authorization. Repeated requests coalesce and may only advance existing cancellation/reconciliation or retry settled cleanup; they never resubmit input, replay effects, reset retry budgets or change claim generations. A stale Turn returns recovery_target_changed and ineligible work returns recovery_recheck_unavailable. A cleanup recheck that no Hosted Harness can serve returns 503 recovery_runtime_unavailable; a typed terminal decline returns 409 hosted_turn_recovery_declined, and retrying cannot change a decline. 202 means requested, not cancelled or ready. For a terminal Java Turn whose Harness attachment is cold or whose status cannot be read, this POST may attempt a narrow cleanup-only load. It must verify the original prompt has a durable native terminal, covered continuation checkpoint or lawful initial state, and no pending input before retrying only its existing cleanup. It never resumes models, tools, MCP or Hooks, clears a permanent journal block, or treats a historical SQL failure as native settlement. */
|
|
825
|
+
/** @description Recheck only the latest original Turn under the existing cancellation/cleanup authorization. Repeated requests coalesce and may only advance existing cancellation/reconciliation or retry settled cleanup; they never resubmit input, replay effects, reset retry budgets or change claim generations. A stale Turn returns recovery_target_changed and ineligible work returns recovery_recheck_unavailable. A cleanup recheck that no Hosted Harness can serve returns 503 recovery_runtime_unavailable; a typed terminal decline returns 409 hosted_turn_recovery_declined, and retrying cannot change a decline. 202 means requested, not cancelled or ready. For a terminal Java Turn whose Harness attachment is cold or whose status cannot be read, this POST may attempt a narrow cleanup-only load. It must verify the original prompt has a durable native terminal, covered continuation checkpoint or lawful initial state, and no pending input before retrying only its existing cleanup. A Turn cancelled before Harness admission keeps its public Turn id, while its cleanup recheck targets the settled prompt the Harness names for the Session. It never resumes models, tools, MCP or Hooks, clears a permanent journal block, or treats a historical SQL failure as native settlement. */
|
|
826
826
|
post: operations["recheckWebShellSessionRecovery"];
|
|
827
827
|
delete?: never;
|
|
828
828
|
options?: never;
|
|
@@ -214,6 +214,18 @@ export interface ManagedAgentRequestOptions {
|
|
|
214
214
|
export interface ManagedAgentCommandOptions extends ManagedAgentRequestOptions {
|
|
215
215
|
idempotencyKey: string;
|
|
216
216
|
}
|
|
217
|
+
export interface ManagedAgentOperationAdmission {
|
|
218
|
+
readonly sessionId: string;
|
|
219
|
+
readonly operationId: string;
|
|
220
|
+
readonly turnId?: string;
|
|
221
|
+
}
|
|
222
|
+
export interface ManagedAgentOperationSettlement extends ManagedAgentOperationAdmission {
|
|
223
|
+
readonly status: components['schemas']['WebShellOperation']['status'];
|
|
224
|
+
}
|
|
225
|
+
export interface ManagedAgentOperationObserver {
|
|
226
|
+
readonly onAccepted?: (admission: ManagedAgentOperationAdmission) => void;
|
|
227
|
+
readonly onSettlement?: (settlement: ManagedAgentOperationSettlement) => void;
|
|
228
|
+
}
|
|
217
229
|
export type ManagedContextCompressionOperation = components['schemas']['WebShellContextCompressionOperation'];
|
|
218
230
|
export type ManagedTask = components['schemas']['WebShellTask'];
|
|
219
231
|
export type ManagedTaskPage = components['schemas']['WebShellTaskPage'];
|
|
@@ -348,7 +360,7 @@ export interface ManagedAgentProvider {
|
|
|
348
360
|
listPending(sessionId: string, options: ManagedAgentRequestOptions & {
|
|
349
361
|
includeChildren?: boolean;
|
|
350
362
|
}): Promise<ManagedAgentPendingAction[]>;
|
|
351
|
-
respond(action: ManagedAgentPendingAction, response: ManagedAgentActionResponse, options: ManagedAgentCommandOptions): Promise<void>;
|
|
363
|
+
respond(action: ManagedAgentPendingAction, response: ManagedAgentActionResponse, options: ManagedAgentCommandOptions & ManagedAgentOperationObserver): Promise<void>;
|
|
352
364
|
};
|
|
353
365
|
readonly toolResults?: ManagedToolResultReader;
|
|
354
366
|
/** Present when the provider can list a Workspace's artifacts across Sessions. */
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { ManagedAgentPendingQuestionAction, ManagedAgentQuestionAnswer } from './managed-agent-provider';
|
|
2
2
|
export declare const MAX_MANAGED_QUESTION_ANSWER_BYTES: number;
|
|
3
|
+
export declare const MAX_MANAGED_QUESTION_TEXT_LENGTH = 8192;
|
|
4
|
+
export type ManagedQuestionDraft = Record<string, {
|
|
5
|
+
optionIds: string[];
|
|
6
|
+
text: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function managedQuestionAnswersFromDraft(action: ManagedAgentPendingQuestionAction, draft: ManagedQuestionDraft): ManagedAgentQuestionAnswer[];
|
|
9
|
+
export declare function exceedsManagedQuestionAnswerLimits(answers: readonly ManagedAgentQuestionAnswer[]): boolean;
|
|
3
10
|
export declare function canonicalQuestionAnswers(action: ManagedAgentPendingQuestionAction, answers: readonly ManagedAgentQuestionAnswer[]): ManagedAgentQuestionAnswer[];
|
|
4
11
|
export declare function questionResponseKey(action: ManagedAgentPendingQuestionAction, answers: readonly ManagedAgentQuestionAnswer[]): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ManagedAgentPendingAction, ManagedAgentActionResponse, ManagedAgentProvider, ManagedAgentSessionEvent } from './managed-agent-provider';
|
|
2
|
-
import type { ManagedQuestionDraft } from './
|
|
2
|
+
import type { ManagedQuestionDraft } from './managed-question-response';
|
|
3
3
|
export declare function managedActionKey(action: ManagedAgentPendingAction): string;
|
|
4
4
|
export interface ManagedActionsState {
|
|
5
5
|
actions: readonly ManagedAgentPendingAction[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SessionChatController } from '../../chat-core/contract';
|
|
2
|
+
import type { ManagedAgentProvider } from './managed-agent-provider';
|
|
3
|
+
interface ManagedChatControllerOptions {
|
|
4
|
+
readonly provider: ManagedAgentProvider;
|
|
5
|
+
readonly clientId: string;
|
|
6
|
+
readonly sessionId: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function useManagedChatController({ provider, clientId, sessionId, }: ManagedChatControllerOptions): SessionChatController | undefined;
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { ManagedAgentProvider, ManagedAgentSessionSummary } from './managed-agent-provider';
|
|
2
|
-
export
|
|
1
|
+
import type { ManagedAgentOperationObserver, ManagedAgentProvider, ManagedAgentSessionSummary } from './managed-agent-provider';
|
|
2
|
+
export interface ManagedTurnCancelObserver extends ManagedAgentOperationObserver {
|
|
3
|
+
readonly onError?: (error: unknown) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function useManagedTurnCancel(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined, summary: ManagedAgentSessionSummary | undefined, interactive: boolean, refreshSummary: () => Promise<ManagedAgentSessionSummary | undefined>, observer?: ManagedTurnCancelObserver): {
|
|
3
6
|
request: () => Promise<void>;
|
|
4
7
|
retry: () => Promise<void>;
|
|
5
8
|
status: "failed" | "stopping" | "unconfirmed" | undefined;
|