@qwen-code/web-shell 0.28.1-preview.0 → 0.28.1-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/NOTICES.txt +464 -0
  2. package/README.md +4 -3
  3. package/dist/{PierreFilePreview-Dotc6rOk.js → PierreFilePreview-CsARQefS.js} +1 -1
  4. package/dist/{SpreadsheetPreview-B9SWjSd8.js → SpreadsheetPreview-D3YGKe0n.js} +2 -2
  5. package/dist/{WorkspaceFileBrowser-Ckvcjlmo.js → WorkspaceFileBrowser-1GbG0WLt.js} +189 -189
  6. package/dist/WorkspacePdfRangePreview-it3G4-Se.js +22384 -0
  7. package/dist/{agents-route-B5k1PKCM.js → agents-route-Dbjm9Y2P.js} +2 -2
  8. package/dist/daemon-react-sdk.js +1 -1
  9. package/dist/i18n-ru-CfZvlNRX.js +4399 -0
  10. package/dist/i18n-zh-cn-oYBQlyci.js +4455 -0
  11. package/dist/i18n-zh-tw-meIHyJiH.js +5548 -0
  12. package/dist/{index-Plc_8yWQ.js → index-ChVhTKLB.js} +72164 -76971
  13. package/dist/index.js +3 -3
  14. package/dist/sw.js +1 -1
  15. package/dist/terminal-runtime-BQaN1NCS.js +7881 -0
  16. package/dist/transcript.js +15217 -14933
  17. package/dist/types/App.d.ts +6 -2
  18. package/dist/types/adapters/messageTypes.d.ts +7 -1
  19. package/dist/types/adapters/transcriptAdapter.d.ts +8 -0
  20. package/dist/types/completions/sendCompletion.d.ts +28 -0
  21. package/dist/types/completions/slashCompletion.d.ts +8 -1
  22. package/dist/types/components/ChatContextHeader.d.ts +8 -2
  23. package/dist/types/components/ChatEditor.d.ts +3 -1
  24. package/dist/types/components/ChatPane.d.ts +3 -1
  25. package/dist/types/components/ComposerStatusStack.d.ts +8 -0
  26. package/dist/types/components/ComposerTaskChips.d.ts +3 -2
  27. package/dist/types/components/GoalStatusStrip.d.ts +9 -0
  28. package/dist/types/components/RestartRecoveryPanel.d.ts +22 -0
  29. package/dist/types/components/SessionGoalMarker.d.ts +24 -0
  30. package/dist/types/components/UnavailableModelTooltip.d.ts +4 -2
  31. package/dist/types/components/WebShellTranscript.d.ts +3 -1
  32. package/dist/types/components/artifacts/ArtifactPanel.d.ts +26 -2
  33. package/dist/types/components/artifacts/ArtifactsListPanel.d.ts +13 -0
  34. package/dist/types/components/artifacts/SessionPanel.d.ts +19 -0
  35. package/dist/types/components/artifacts/WorkspacePdfRangePreview.d.ts +10 -0
  36. package/dist/types/components/artifacts/artifactUtils.d.ts +9 -5
  37. package/dist/types/components/artifacts/change-overview.d.ts +21 -14
  38. package/dist/types/components/channels/channel-platform.d.ts +1 -1
  39. package/dist/types/components/managed/ManagedArtifactLibraryPage.d.ts +15 -0
  40. package/dist/types/components/managed/ManagedSurfaceDecisionsDialog.d.ts +1 -0
  41. package/dist/types/components/managed/ManagedTerminalPanel.d.ts +0 -1
  42. package/dist/types/components/managed/ManagedWorkspaceNavigation.d.ts +2 -1
  43. package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +14 -2
  44. package/dist/types/components/managed/generated/managed-agent-api.d.ts +100 -6
  45. package/dist/types/components/managed/java-managed-agent-client.d.ts +21 -0
  46. package/dist/types/components/managed/managed-agent-provider.d.ts +4 -1
  47. package/dist/types/components/managed/managed-artifact-library-messages.d.ts +8 -0
  48. package/dist/types/components/managed/managed-artifact-library-messages.transcript-stub.d.ts +8 -0
  49. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +167 -167
  50. package/dist/types/components/managed/managed-extension-install.d.ts +3 -0
  51. package/dist/types/components/managed/managed-recovery-messages.d.ts +3 -1
  52. package/dist/types/components/managed/managed-surface-decisions.d.ts +10 -0
  53. package/dist/types/components/managed/managed-tool-result-types.d.ts +6 -0
  54. package/dist/types/components/managed/use-managed-recovery.d.ts +1 -2
  55. package/dist/types/components/messages/AssistantMessage.d.ts +4 -1
  56. package/dist/types/components/messages/AssistantMessageRow.d.ts +13 -0
  57. package/dist/types/components/messages/AssistantMessageRow.transcript-stub.d.ts +6 -0
  58. package/dist/types/components/messages/Markdown.d.ts +1 -0
  59. package/dist/types/components/messages/MemoryMessage.d.ts +1 -2
  60. package/dist/types/components/messages/ModAssistantMessage.d.ts +15 -0
  61. package/dist/types/components/messages/UserMessage.d.ts +5 -1
  62. package/dist/types/components/messages/WorkflowExecutionView.d.ts +4 -0
  63. package/dist/types/components/messages/mod-rows.d.ts +53 -0
  64. package/dist/types/components/panels/EnvironmentPanel.d.ts +1 -7
  65. package/dist/types/components/sidebar/WebShellSidebar.d.ts +1 -1
  66. package/dist/types/components/streaming-tail.d.ts +8 -0
  67. package/dist/types/components/streaming-tail.transcript-stub.d.ts +6 -0
  68. package/dist/types/components/terminal/TerminalPanel.d.ts +0 -1
  69. package/dist/types/components/terminal/terminal-runtime.d.ts +8 -0
  70. package/dist/types/components/terminal/use-terminal-runtime.d.ts +6 -0
  71. package/dist/types/components/ui/dialog.d.ts +1 -0
  72. package/dist/types/components/ui/drawer.d.ts +1 -1
  73. package/dist/types/constants/approvalModes.d.ts +7 -0
  74. package/dist/types/constants/localCommands.d.ts +3 -1
  75. package/dist/types/constants/sessions.d.ts +1 -0
  76. package/dist/types/customization.d.ts +16 -3
  77. package/dist/types/daemon/chat-controller.d.ts +67 -0
  78. package/dist/types/daemon/chat-intents.d.ts +88 -0
  79. package/dist/types/daemon/permission-signals.d.ts +35 -0
  80. package/dist/types/daemon/session/types.d.ts +23 -0
  81. package/dist/types/daemon/useDaemonChatController.d.ts +15 -0
  82. package/dist/types/daemon/workspace/hooks/useDaemonAgents.d.ts +5 -0
  83. package/dist/types/daemon/workspace/hooks/useDaemonAuth.d.ts +5 -0
  84. package/dist/types/daemon/workspace/hooks/useDaemonChannelEvents.d.ts +5 -0
  85. package/dist/types/daemon/workspace/hooks/useDaemonDiagnostics.d.ts +14 -2
  86. package/dist/types/daemon/workspace/hooks/useDaemonMcp.d.ts +5 -0
  87. package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +5 -0
  88. package/dist/types/daemon/workspace/hooks/useDaemonProviders.d.ts +5 -0
  89. package/dist/types/daemon/workspace/hooks/useDaemonResource.d.ts +7 -1
  90. package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +6 -0
  91. package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +5 -0
  92. package/dist/types/daemon/workspace/hooks/useDaemonStatusReport.d.ts +5 -0
  93. package/dist/types/daemon/workspace/hooks/useDaemonTools.d.ts +5 -0
  94. package/dist/types/daemon/workspace/hooks/useDaemonUsageDashboard.d.ts +5 -0
  95. package/dist/types/generated-ui/instance-store.d.ts +4 -1
  96. package/dist/types/generated-ui/view-state.d.ts +51 -0
  97. package/dist/types/hooks/useAtMentionSources.d.ts +1 -1
  98. package/dist/types/hooks/useComposerCore.d.ts +4 -2
  99. package/dist/types/hooks/useComposerWorkspace.d.ts +7 -0
  100. package/dist/types/hooks/useIsTouchComposer.d.ts +1 -0
  101. package/dist/types/hooks/useModelConfigurations.d.ts +7 -0
  102. package/dist/types/hooks/useModelRefresh.d.ts +1 -0
  103. package/dist/types/hooks/useScopedSessions.d.ts +1 -0
  104. package/dist/types/hooks/useSessionArtifacts.d.ts +7 -0
  105. package/dist/types/hooks/useSubSessionTasks.d.ts +8 -0
  106. package/dist/types/i18n-catalogs.d.ts +3 -0
  107. package/dist/types/i18n-catalogs.eager.d.ts +3 -0
  108. package/dist/types/i18n-language.d.ts +2 -0
  109. package/dist/types/i18n-ru.d.ts +7 -0
  110. package/dist/types/i18n-zh-cn.d.ts +7 -0
  111. package/dist/types/i18n-zh-tw.d.ts +8 -0
  112. package/dist/types/i18n-zh-tw.transcript-stub.d.ts +6 -0
  113. package/dist/types/i18n.d.ts +7 -2
  114. package/dist/types/index.d.ts +1 -1
  115. package/dist/types/mcpAppHostContext.d.ts +4 -0
  116. package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
  117. package/dist/types/session-catalog/session-live-work.d.ts +39 -0
  118. package/dist/types/settings.d.ts +3 -0
  119. package/dist/types/subagentDetailsContext.d.ts +9 -1
  120. package/dist/types/trajectory/buildTimeline.d.ts +1 -1
  121. package/dist/types/trajectory/types.d.ts +2 -0
  122. package/dist/types/utils/askUserPermission.d.ts +1 -1
  123. package/dist/types/utils/composerTasks.d.ts +6 -4
  124. package/dist/types/utils/imageIngestion.d.ts +1 -0
  125. package/dist/types/utils/planMode.d.ts +2 -2
  126. package/dist/types/utils/sendCommand.d.ts +31 -0
  127. package/dist/types/utils/sessionPreparation.d.ts +16 -14
  128. package/dist/types/vision-timeout-command.d.ts +17 -0
  129. package/dist/types/voice/use-voice-workspace-settings.d.ts +1 -0
  130. package/dist/types/voice/voice-workspace-target.d.ts +1 -0
  131. package/dist/useDaemonMidTurnInjected-BjQ9zxRv.js +23539 -0
  132. package/package.json +4 -1
  133. package/dist/types/components/managed/ManagedRecoveryPanel.d.ts +0 -9
  134. package/dist/useDaemonMidTurnInjected-D4Woo-Hh.js +0 -31578
@@ -1,8 +1,9 @@
1
+ import { type RefObject } from 'react';
1
2
  import { type WebShellAssistantFeedbackRating, type WebShellAssistantTurnFooterRenderInfo, type WebShellSource } from '../../customization';
2
3
  import type { DaemonSessionGenerationEvent, QwenAgentMessageMeta } from '@qwen-code/sdk/daemon';
3
4
  import type { DaemonMessageAuthor } from '../../adapters/messageTypes';
4
5
  import type { HookStatisticsTurn } from './hook-statistics-context';
5
- interface AssistantMessageProps {
6
+ export interface AssistantMessageProps {
6
7
  hookTurn?: HookStatisticsTurn;
7
8
  content: string;
8
9
  author?: DaemonMessageAuthor;
@@ -22,6 +23,8 @@ interface AssistantMessageProps {
22
23
  customFooterInfo?: WebShellAssistantTurnFooterRenderInfo;
23
24
  turnSources?: readonly WebShellSource[];
24
25
  onSourceOpen?: (source: WebShellSource) => void;
26
+ displayContent?: string;
27
+ copySource?: RefObject<HTMLDivElement | null>;
25
28
  }
26
29
  export declare const AssistantMessage: import("react").NamedExoticComponent<AssistantMessageProps>;
27
30
  interface ThinkingMessageProps {
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type ComponentType } from 'react';
7
+ import { type AssistantMessageProps } from './AssistantMessage';
8
+ type AssistantMessageRowProps = AssistantMessageProps & {
9
+ messageId: string;
10
+ };
11
+ export declare const AssistantMessageComponentContext: import("react").Context<ComponentType<AssistantMessageRowProps> | undefined>;
12
+ export declare function AssistantMessageRow(props: AssistantMessageRowProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export { AssistantMessage as AssistantMessageRow } from './AssistantMessage';
@@ -34,5 +34,6 @@ export declare function isSafeImageSrc(url: string | undefined, documentMode?: b
34
34
  * Every other href keeps the default sanitizer.
35
35
  */
36
36
  export declare function markdownUrlTransform(url: string, documentMode?: boolean): string;
37
+ export declare function isLocalFilePath(src: string | undefined): boolean;
37
38
  export declare const Markdown: import("react").NamedExoticComponent<MarkdownProps>;
38
39
  export {};
@@ -1,9 +1,8 @@
1
1
  import { type DaemonContextFileScope } from '@qwen-code/web-shell/daemon-react-sdk';
2
2
  interface MemoryMessageProps {
3
- refreshSignal?: number;
4
3
  addSignal?: number;
5
4
  addScope?: DaemonContextFileScope;
6
5
  onMessage?: (message: string, type?: 'status' | 'error') => void;
7
6
  }
8
- export declare function MemoryMessage({ refreshSignal, addSignal, addScope, onMessage, }: MemoryMessageProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function MemoryMessage({ addSignal, addScope, onMessage, }: MemoryMessageProps): import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -0,0 +1,15 @@
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 { Message } from '../../adapters/types';
8
+ import { type AssistantMessageProps } from './AssistantMessage';
9
+ export declare function ModReplyRowsProvider({ messages, children, }: {
10
+ messages: readonly Message[];
11
+ children: ReactNode;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export declare function ModAssistantMessage({ messageId, ...props }: AssistantMessageProps & {
14
+ messageId: string;
15
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
1
+ import type { DaemonInputAnnotation, DaemonInputSourceAnnotation, SessionMessageTarget } from '@qwen-code/sdk/daemon';
2
2
  import type { ComposerTagClickHandler, ComposerTagRenderer, WebShellComposerTag, WebShellComposerTagIconMap } from '../../customization';
3
3
  import type { AttachmentPreviewRequest, DaemonMessageAuthor } from '../../adapters/messageTypes';
4
4
  import type { ImageTabSource } from '../artifacts/ArtifactPanel';
@@ -34,6 +34,10 @@ interface UserMessageProps {
34
34
  onAttachmentPreview?: (file: AttachmentPreviewRequest) => void;
35
35
  /** Set when a workspace agent, not the user, posted this message. */
36
36
  author?: DaemonMessageAuthor;
37
+ /** Set when another session sent this message here. */
38
+ sentFrom?: DaemonInputSourceAnnotation;
39
+ /** Set when the user sent this message to another session with `/send`. */
40
+ sentTo?: SessionMessageTarget;
37
41
  }
38
42
  export declare const UserMessage: import("react").NamedExoticComponent<UserMessageProps>;
39
43
  export declare function ReadonlyComposerTag({ tag, composerTagIcons, renderComposerTag, renderComposerTagTooltip, onComposerTagClick, title, preserveCustomKindLabel, }: {
@@ -25,6 +25,10 @@ export interface WorkflowGraphLayout {
25
25
  id: string | null;
26
26
  title: string;
27
27
  index: number;
28
+ /** Declared in `meta.phases` and not reached yet; it has no dispatches. */
29
+ planned?: {
30
+ detail?: string;
31
+ };
28
32
  }>;
29
33
  nodes: WorkflowGraphNode[];
30
34
  edges: WorkflowGraphEdge[];
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type RefObject } from 'react';
7
+ import type { DaemonModRow, DaemonModRowAnswer } from '@qwen-code/sdk/daemon';
8
+ import type { Message } from '../../adapters/types.js';
9
+ /** Asks a session's Mods for one row this client draws. */
10
+ export type ModRowAsk = (row: DaemonModRow) => Promise<DaemonModRowAnswer>;
11
+ /**
12
+ * The Mod rows of one session that this client draws. A row is asked once
13
+ * per props, one ask at a time, since the session's Mods render one row at a
14
+ * time anyway. A row that is no longer shown leaves the queue before it is
15
+ * asked. An ask that fails or goes unanswered is not kept, so the row is
16
+ * asked again the next time it is shown.
17
+ */
18
+ export declare class ModRowAsker {
19
+ private readonly ask;
20
+ private readonly answers;
21
+ private readonly unhooked;
22
+ private readonly waiting;
23
+ private asking;
24
+ constructor(ask: ModRowAsk);
25
+ /**
26
+ * The props a row draws with: those its hooks rewrote, null to draw its
27
+ * own, or undefined while it is not answered.
28
+ */
29
+ answer(row: DaemonModRow): Record<string, unknown> | null | undefined;
30
+ /**
31
+ * Shows a row until it is answered, calling `listener` once its answer is
32
+ * known. Returns the release.
33
+ */
34
+ watch(row: DaemonModRow, listener: () => void): () => void;
35
+ private pump;
36
+ private settle;
37
+ }
38
+ export declare const ModRowAskerContext: import("react").Context<ModRowAsker | undefined>;
39
+ /** Reply blocks and whether they open the reply. Ephemeral logs and thinking
40
+ * are skipped so a row keeps its identity when the transcript is replayed. */
41
+ export declare function modReplyRows(messages: readonly Message[]): Map<string, boolean>;
42
+ /**
43
+ * Whether the element intersects the viewport, watched only while `enabled`.
44
+ * Without IntersectionObserver a mounted element counts as shown.
45
+ */
46
+ export declare function useOnScreen(ref: RefObject<Element | null>, enabled: boolean): boolean;
47
+ /**
48
+ * The props the session's Mods drew a row with, once answered: undefined
49
+ * while `row` is unset, unanswered, or drawn as it is. The row is asked for
50
+ * only while `shown`; its answer stays drawn after it scrolls away, so the
51
+ * rows above the viewport keep their height.
52
+ */
53
+ export declare function useModRow(asker: ModRowAsker | undefined, row: DaemonModRow | undefined, shown: boolean): Record<string, unknown> | undefined;
@@ -24,12 +24,6 @@ interface EnvironmentPanelProps {
24
24
  onRetryAttachments?: () => void;
25
25
  artifacts?: readonly DaemonSessionArtifact[];
26
26
  artifactsLoading?: boolean;
27
- /**
28
- * Monotonic counter bumped by the header artifact entry. Each change forces
29
- * the artifacts section open, so clicking the entry reveals the list even
30
- * when the user had collapsed the section (the panel hides, not unmounts).
31
- */
32
- artifactsExpandSignal?: number;
33
27
  items?: readonly WebShellEnvironmentPanelItem[];
34
28
  onOpenGitDiff?: () => void;
35
29
  onOpenGitCommit?: () => void;
@@ -55,5 +49,5 @@ export type EnvironmentAgentTask = DaemonSessionAgentTaskStatus & {
55
49
  * off the same set, so the dot cannot promise a row the panel shows settled.
56
50
  */
57
51
  export declare function isTaskInProgress(status: DaemonSessionTaskWithWorkflowStatus['status']): boolean;
58
- export declare function EnvironmentPanel({ sources, onOpenSource, retrySourceRegistration, floating, hidden, workspaceCwd, gitWorkspaceCwd, gitCwd, gitSessionId, branch, gitStatus, tasks, agentTasks, attachments, attachmentsLoading, attachmentsError, onRetryAttachments, artifacts, artifactsLoading, artifactsExpandSignal, items, onOpenGitDiff, onOpenGitCommit, onOpenGitWorktrees, onOpenGitLog, onOpenAgent, onOpenAgentWorkflow, onOpenTask, onReadImage, onImagePreview, onAttachmentPreview, onAttachmentPreviewError, onOpenArtifact, onDismiss, }: EnvironmentPanelProps): import("react/jsx-runtime").JSX.Element;
52
+ 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;
59
53
  export {};
@@ -102,7 +102,7 @@ interface WebShellSidebarProps {
102
102
  onNewSession: (workspaceCwd?: string) => Promise<boolean> | boolean;
103
103
  onNewStandaloneSession?: () => Promise<boolean> | boolean;
104
104
  standaloneSessionsReloadToken?: number;
105
- onLoadSession: (sessionId: string, workspaceCwd?: string) => Promise<void> | void;
105
+ onLoadSession: (sessionId: string, workspaceCwd?: string, artifactCount?: number) => Promise<void> | void;
106
106
  /**
107
107
  * Opens a session listed by a fan-out host group (#13727): the caller
108
108
  * focuses that host in-app and loads the session there. When absent, the
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { Message } from '../adapters/types.js';
7
+ /** Negative index of the only streaming row that changed, skipping Mod logs. */
8
+ export declare function streamingTailUpdatePosition(previous: readonly Message[] | undefined, current: readonly Message[]): number | undefined;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare const streamingTailUpdatePosition: () => undefined;
@@ -3,7 +3,6 @@
3
3
  * Copyright 2025 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import '@xterm/xterm/css/xterm.css';
7
6
  interface TerminalPanelProps {
8
7
  /** Stable id shared with the backend PTY session; reconnects reuse it. */
9
8
  terminalId: string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export { Terminal } from '@xterm/xterm';
7
+ export { FitAddon } from '@xterm/addon-fit';
8
+ export { default as styles } from '@xterm/xterm/css/xterm.css?inline';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare function useTerminalRuntime(enabled?: boolean): "failed" | typeof import("./terminal-runtime") | undefined;
@@ -7,6 +7,7 @@ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPri
7
7
  declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  type DialogContentProps = React.ComponentProps<typeof DialogPrimitive.Content> & {
9
9
  showCloseButton?: boolean;
10
+ closeLabel?: string;
10
11
  overlayProps?: React.ComponentProps<typeof DialogPrimitive.Overlay>;
11
12
  };
12
13
  declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Drawer as DrawerPrimitive } from 'vaul';
3
3
  declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
4
+ declare const DrawerTrigger: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger> & React.RefAttributes<React.ComponentRef<typeof DrawerPrimitive.Trigger>>>;
5
5
  declare function DrawerPortal({ container, ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
6
  declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
7
  declare const DrawerOverlay: React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Neutral mirror of the SDK's permission-mode vocabulary, for shared
3
+ * composer code that must not value-import the daemon SDK. The parity test
4
+ * pins this list against `DAEMON_APPROVAL_MODES`; update both together.
5
+ */
6
+ export declare const APPROVAL_MODES: readonly ["plan", "default", "auto-edit", "auto", "yolo"];
7
+ export type ApprovalMode = (typeof APPROVAL_MODES)[number];
@@ -1,5 +1,5 @@
1
1
  import type { CommandInfo } from '../adapters/types';
2
- import type { useI18n } from '../i18n';
2
+ import { type useI18n } from '../i18n';
3
3
  type Translate = ReturnType<typeof useI18n>['t'];
4
4
  /**
5
5
  * Commands that should always appear in the slash-command completion menu,
@@ -10,6 +10,8 @@ type Translate = ReturnType<typeof useI18n>['t'];
10
10
  export declare function getLocalCommands(t: Translate, options?: {
11
11
  sideTaskAvailable?: boolean;
12
12
  subscriptionAvailable?: boolean;
13
+ /** The daemon accepts `/send` (`session_sub_session_send`). */
14
+ sendAvailable?: boolean;
13
15
  }): CommandInfo[];
14
16
  /**
15
17
  * i18n key for a known skill's localized menu description, or undefined for a
@@ -18,6 +18,7 @@ export declare const SESSION_TURN_NAVIGATION_FEATURE = "session_turn_navigation"
18
18
  export declare const SESSION_TIMELINE_MIN_VISIBLE_ENTRIES = 4;
19
19
  export declare const SESSION_MONITOR_TOOL_CORRELATION_FEATURE = "session_monitor_tool_correlation";
20
20
  export declare const SESSION_SIDE_TASK_FEATURE = "session_side_task";
21
+ export declare const SESSION_SUB_SESSION_SEND_FEATURE = "session_sub_session_send";
21
22
  export declare const WEB_SHELL_SESSION_SOURCE_TYPE = "default";
22
23
  export declare const WEB_SHELL_SIDE_TASK_SOURCE_TYPE = "side_task";
23
24
  export declare const WEB_SHELL_HISTORY_PAGE_SIZE = 200;
@@ -183,12 +183,23 @@ export interface ChatHeaderRenderInfo {
183
183
  onOpenContextUsage?: () => void;
184
184
  /**
185
185
  * Number of session artifacts. Published together with `onOpenArtifacts`
186
- * only when the artifacts section can actually be opened, so a count never
187
- * appears without a way to act on it.
186
+ * only when the artifacts list tab can actually be opened or closed, so a
187
+ * count never appears without a way to act on it: either there are artifacts
188
+ * to reveal, or the artifacts list tab is the active right-panel tab and the
189
+ * entry serves as its close affordance.
188
190
  */
189
191
  artifactCount?: number;
190
- /** Opens the environment panel's artifacts section, when available. */
192
+ /**
193
+ * Toggles the right panel's artifacts list tab, when available. Opening
194
+ * reveals the session's artifacts; clicking again closes the right panel.
195
+ */
191
196
  onOpenArtifacts?: () => void;
197
+ /**
198
+ * Whether the artifacts list tab is the active right-panel tab. With zero
199
+ * artifacts the entry renders only in that case (as the close affordance),
200
+ * not while unrelated right-panel tabs are open.
201
+ */
202
+ artifactsTabActive?: boolean;
192
203
  /** Opens Settings deep-linked to Local Control (Daemon category). */
193
204
  onOpenLocalControlSettings?: () => void;
194
205
  }
@@ -566,6 +577,7 @@ export interface WebShellCustomization {
566
577
  renderUserMessageContent?: UserMessageContentRenderer;
567
578
  composerTagIcons?: WebShellComposerTagIconMap;
568
579
  composerVariant?: 'default' | 'simple';
580
+ composerGlowEnabled?: boolean;
569
581
  /**
570
582
  * Built-in / host @ mention providers. Split-view panes share this context
571
583
  * so they match the main composer without ChatPane prop drilling.
@@ -637,6 +649,7 @@ export interface WebShellCustomization {
637
649
  * expanded. Defaults to enabled when unset.
638
650
  */
639
651
  collapseCompletedTurns?: boolean;
652
+ overscan?: number;
640
653
  markdownTableMode?: MarkdownTableMode;
641
654
  markdown?: WebShellMarkdownCustomization;
642
655
  loadingPhrases?: LoadingPhrasesResolver;
@@ -0,0 +1,67 @@
1
+ import type { Message } from '../adapters/types.js';
2
+ import type { Admission, ApprovalSelectionController, ChatCapabilities, ChatStatusFacts, ComposerSubmit, ContextUsageController, ModelSelectionController, PendingApproval, PendingQuestion, QuestionAnswer, SessionChatController, SessionOpsController } from '../chat-core/contract.js';
3
+ /**
4
+ * A terminal prompt event from the daemon, reduced to the prompt it settles
5
+ * and whether that turn completed, was cancelled, or failed. The adapter binds
6
+ * it to the dispatched attempt by `promptId`, never by the visible
7
+ * session/turn target.
8
+ */
9
+ export interface DaemonPromptSettlement {
10
+ readonly promptId: string;
11
+ readonly outcome: 'completed' | 'cancelled' | 'failed';
12
+ }
13
+ /**
14
+ * Evidence that an approval/question decision was applied to the request it
15
+ * names. `applied` is false when the decision could not be applied; the
16
+ * adapter still terminalizes the attempt but never certifies it. The daemon
17
+ * decision event names only the request (no attempt/option discriminator), so
18
+ * correlation is request-level: the request's single active attempt.
19
+ */
20
+ export interface DaemonDecisionSettlement {
21
+ readonly requestId: string;
22
+ readonly applied: boolean;
23
+ }
24
+ /**
25
+ * The provider facts and actions the controller assembles. Everything is
26
+ * injected so the assembly is testable without mounting the session provider;
27
+ * the binding hook backs the fact fields with live provider state. Fact fields
28
+ * are read on each access, so a deps object with getter-backed fields stays
29
+ * current across renders.
30
+ */
31
+ export interface DaemonChatControllerDeps {
32
+ readonly sessionId: string;
33
+ readonly storageKey: string;
34
+ readonly messages: readonly Message[];
35
+ readonly transcriptState: 'loading' | 'ready' | 'error';
36
+ loadOlder?(): Promise<void>;
37
+ readonly statusFacts: ChatStatusFacts;
38
+ readonly capabilities: ChatCapabilities;
39
+ readonly modelSelection?: ModelSelectionController;
40
+ readonly approvalSelection?: ApprovalSelectionController;
41
+ readonly contextUsage?: ContextUsageController;
42
+ readonly sessionOps?: SessionOpsController;
43
+ readonly pendingApprovals: readonly PendingApproval[];
44
+ readonly pendingQuestions: readonly PendingQuestion[];
45
+ submitPrompt(input: ComposerSubmit, onAdmitted: (promptId: string) => void): Promise<Admission>;
46
+ cancelPrompt(): Promise<Admission>;
47
+ submitPermission(requestId: string, optionId: string): Promise<Admission>;
48
+ submitQuestionAnswers(requestId: string, answers: readonly QuestionAnswer[]): Promise<Admission>;
49
+ subscribePromptSettlement(listener: (event: DaemonPromptSettlement) => void): () => void;
50
+ subscribeDecisionSettlement(listener: (event: DaemonDecisionSettlement) => void): () => void;
51
+ subscribeApprovalCurrency(listener: (requestId: string, live: boolean) => void): () => void;
52
+ readonly liveApprovalRequestIds?: readonly string[];
53
+ readonly settledPhase?: 'idle' | 'failed';
54
+ readonly signal?: AbortSignal;
55
+ }
56
+ /**
57
+ * The daemon adapter's controller assembly (slice 2c). It wraps the injected
58
+ * provider facts and actions into the backend-neutral {@link
59
+ * SessionChatController}, wiring the slice-2b intent engine so admission stays
60
+ * separate from establishment. Its new logic is the correlation between a
61
+ * dispatched attempt and the backend identity its evidence names: settlement
62
+ * elevates only the attempt bound to the event's `promptId`/`requestId`, so a
63
+ * late event for a finished attempt cannot establish a retry on the same
64
+ * visible target. Transcript and sub-controller facts are passed through from
65
+ * the provider, not re-derived here.
66
+ */
67
+ export declare function createDaemonChatController(deps: DaemonChatControllerDeps): SessionChatController;
@@ -0,0 +1,88 @@
1
+ import type { Admission, ChatOperation, ChatPhase, IntentKind, IntentResult, IntentTarget } from '../chat-core/contract.js';
2
+ import { type OutcomeWitness } from '../chat-core/intent.js';
3
+ /**
4
+ * Transport dispatch for one intent. It resolves to an admission only; the
5
+ * resolution of this promise is never evidence that the intended effect is
6
+ * established. Outcome evidence arrives separately through {@link
7
+ * DaemonChatIntents.settle}.
8
+ */
9
+ export type IntentTransport = () => Promise<Admission>;
10
+ /**
11
+ * One dispatched attempt and the identity that binds its settlement evidence.
12
+ * The adapter must record the operation id next to the backend identity of the
13
+ * request it just made, so an incoming event can name the attempt it belongs
14
+ * to. Binding the id after the event arrives cannot authenticate it.
15
+ */
16
+ export interface DaemonIntentDispatch {
17
+ readonly operationId: string;
18
+ readonly result: IntentResult;
19
+ }
20
+ export interface DaemonChatIntents {
21
+ /**
22
+ * In-flight and recently settled intents, bounded by the contract retention.
23
+ * The snapshot identity is stable between state changes so it can back a
24
+ * `useSyncExternalStore` cache.
25
+ */
26
+ readonly operations: readonly ChatOperation[];
27
+ /** `cancelling` is derived from an unestablished cancel operation. */
28
+ phase(settled: 'idle' | 'failed'): ChatPhase;
29
+ /**
30
+ * Dispatch an intent's transport and report admission. The attempt is
31
+ * recorded as `pending` before the transport runs, so the row exists (and
32
+ * evidence can bind to it) while the request is in flight, and rows stay in
33
+ * dispatch order. The outcome is `unsettled` until authoritative evidence
34
+ * arrives via {@link settle}; a resolved transport alone never produces
35
+ * `established`.
36
+ */
37
+ dispatch(kind: IntentKind, target: IntentTarget, transport: IntentTransport): Promise<DaemonIntentDispatch>;
38
+ /**
39
+ * Apply authoritative outcome evidence to the attempt it belongs to. The
40
+ * witness is bound to one dispatched operation, so a late witness for a
41
+ * finished attempt cannot establish a later attempt that shares the same
42
+ * visible target. Unknown or already-terminal operations are a no-op.
43
+ * For approvals a *settled* decision establishes only while its request is
44
+ * still live; a superseded or unidentified request never establishes, while
45
+ * negative evidence still terminalizes the attempt.
46
+ */
47
+ settle(operationId: string, witness: OutcomeWitness): IntentResult | undefined;
48
+ /**
49
+ * Apply decision evidence to the request's active (non-terminal) approval or
50
+ * question attempt, freezing currency when the evidence arrives even though
51
+ * the attempt's operation id is not yet bound (its POST is still in flight).
52
+ * The daemon decision event names only the request, so the correlation is
53
+ * request-level. No active matching attempt is a no-op, so a late event for a
54
+ * finished attempt is not retained.
55
+ */
56
+ settleDecisionRequest(requestId: string, witness: OutcomeWitness): IntentResult | undefined;
57
+ /**
58
+ * Give an attempt whose admission can never be confirmed (a thrown transport
59
+ * leaves it `unknown`) an exit: terminalize it as `failed`, never
60
+ * `established`, so it stops holding the phase open. Unknown ids,
61
+ * already-terminal attempts, and attempts with a confirmed admission are a
62
+ * no-op — a live accepted turn must keep its chance to settle. While the POST
63
+ * is in flight, held `settled` evidence also blocks abandon (it may yet land
64
+ * on an accepted admission); once admission resolves `unknown` the held
65
+ * witness can never certify, so the attempt stays abandonable.
66
+ */
67
+ abandon(operationId: string): IntentResult | undefined;
68
+ /**
69
+ * Release a terminal row once the surface has consumed it. Non-terminal rows
70
+ * are kept; terminal rows stay readable until acknowledged.
71
+ */
72
+ acknowledge(operationId: string): void;
73
+ /**
74
+ * Track whether an approval request is still valid (not superseded). The
75
+ * daemon keeps several permission requests pending at once, so currency is a
76
+ * set, not a single "newest" id. Mark a request live when it arrives and
77
+ * not-live only when it is superseded or cancelled — not when it is answered;
78
+ * the engine releases the identity itself once the decision settles, so a
79
+ * decision establishes while its request has not been superseded.
80
+ */
81
+ setApprovalRequestLive(requestId: string, live: boolean): void;
82
+ }
83
+ /**
84
+ * The daemon adapter's intent lifecycle core. It keeps admission (transport)
85
+ * and outcome (evidence) separate so the shared contract's
86
+ * admission-is-not-establishment invariant holds for daemon chat intents.
87
+ */
88
+ export declare function createDaemonChatIntents(): DaemonChatIntents;
@@ -0,0 +1,35 @@
1
+ import type { DaemonTranscriptBlock } from '@qwen-code/sdk/daemon';
2
+ import type { DaemonDecisionSettlement } from './chat-controller.js';
3
+ /**
4
+ * The option id a question answer must vote to be applied. A question is
5
+ * answered by selecting its submit (`allow_once`) option with the answers
6
+ * attached — the same wire shape `AskUserQuestion.handleSubmit` uses. Voting
7
+ * with no option id sends a `cancelled` outcome, which discards the answers and
8
+ * cancels the question, so the submit option is required. Returns undefined when
9
+ * the request is not pending or has no submit option.
10
+ */
11
+ export declare function questionSubmitOptionId(pendingPermissions: ReadonlyArray<Extract<DaemonTranscriptBlock, {
12
+ kind: 'permission';
13
+ }>>, requestId: string): string | undefined;
14
+ /**
15
+ * The permission-derived signals the daemon controller needs but the provider
16
+ * does not expose as explicit channels: approval currency and decision
17
+ * settlement. Both are derived from the pending-permission set across renders.
18
+ *
19
+ * Currency: a request is live while its permission is pending. It is marked
20
+ * not-live only when it leaves the pending set *without* this controller having
21
+ * answered it — i.e. it was superseded. A request this controller answered stays
22
+ * live so its decision can establish; the engine releases the identity itself on
23
+ * establishment.
24
+ *
25
+ * Decision settlement: when a permission this controller answered leaves the
26
+ * pending set, the daemon applied the answer, so an `applied: true` settlement is
27
+ * emitted for that request. This is authoritative evidence (the block resolved),
28
+ * not the transport's admission.
29
+ */
30
+ export interface PermissionSignals {
31
+ readonly currency: ReadonlyArray<readonly [requestId: string, live: boolean]>;
32
+ readonly decisions: readonly DaemonDecisionSettlement[];
33
+ readonly answered: ReadonlySet<string>;
34
+ }
35
+ export declare function derivePermissionSignals(prevPending: ReadonlySet<string>, nextPending: ReadonlySet<string>, answered: ReadonlySet<string>): PermissionSignals;
@@ -117,6 +117,19 @@ export interface DaemonConnectionState {
117
117
  * the previous session's artifacts leak under the new one.
118
118
  */
119
119
  restoredArtifactsSessionId?: string;
120
+ /**
121
+ * Artifact count captured from the session-list summary at click time, so
122
+ * the header artifact entry can show it before the load response lands.
123
+ * A hint only: the load-embedded snapshot and the gated fetch supersede it,
124
+ * and the provider clears it once authoritative data commits.
125
+ */
126
+ artifactCountHint?: number;
127
+ /**
128
+ * Session the artifactCountHint belongs to. Same keying contract as
129
+ * restoredArtifactsSessionId: consumers must only use the hint when this
130
+ * matches the current sessionId.
131
+ */
132
+ artifactCountHintSessionId?: string;
120
133
  error?: string;
121
134
  /** Latest HTTP error status kept for diagnostics; use missingSession for UI. */
122
135
  errorStatus?: number;
@@ -341,6 +354,8 @@ export interface PendingPromptActionOptions {
341
354
  }
342
355
  export interface GetTasksActionOptions {
343
356
  silent?: boolean;
357
+ /** Also list the sends the daemon reports back to this session. */
358
+ includeSubSessions?: boolean;
344
359
  }
345
360
  export interface DaemonPromptImage {
346
361
  data: string;
@@ -446,6 +461,9 @@ export interface DaemonSessionActions {
446
461
  loadSession(sessionId: string, options?: {
447
462
  workspaceCwd?: string;
448
463
  sessionContext?: DaemonProductSessionContext;
464
+ /** Artifact count from the clicked session's list summary, shown in
465
+ * the header entry before the load response lands. Omit when unknown. */
466
+ artifactCountHint?: number;
449
467
  }): Promise<void>;
450
468
  /** `memory` replay is reserved for the provider's live-journal repair. */
451
469
  reloadSession(signal: AbortSignal, options?: {
@@ -677,6 +695,11 @@ export interface DaemonWorkspaceEventSignals {
677
695
  extensionsVersion: number;
678
696
  artifactsVersion: number;
679
697
  sourcesVersion?: number;
698
+ /**
699
+ * Per caller session: how many times a send it made that the daemon
700
+ * reports back started or settled. Re-read its sub-session tasks on change.
701
+ */
702
+ subSessionTaskVersions?: Record<string, number>;
680
703
  lastExtensionChange?: {
681
704
  status?: 'installed' | 'enabled' | 'disabled' | 'updated' | 'uninstalled' | 'failed';
682
705
  source?: string;
@@ -0,0 +1,15 @@
1
+ import type { SessionChatController } from '../chat-core/contract.js';
2
+ /**
3
+ * Binds the daemon session provider to the backend-neutral chat controller
4
+ * (slice 2d). It constructs {@link createDaemonChatController} once per session
5
+ * and feeds it live provider facts, wiring the intent transports to the session
6
+ * actions and deriving the two evidence channels the provider does not expose
7
+ * explicitly: prompt settlement comes from the terminal-event subscription, and
8
+ * approval currency / decision settlement are derived from the pending-permission
9
+ * set (see {@link derivePermissionSignals}).
10
+ *
11
+ * The optional capability-gated sub-controllers (model / approval-mode / context
12
+ * usage / session ops) are not bound yet; their regions stay hidden until a later
13
+ * increment wires them, so this binding is additive and renders nothing on its own.
14
+ */
15
+ export declare function useDaemonChatController(): SessionChatController;
@@ -19,4 +19,9 @@ export declare function useDaemonAgents(options?: DaemonResourceOptions): {
19
19
  data: import("@qwen-code/sdk/daemon").DaemonWorkspaceAgentsStatus | undefined;
20
20
  loading: boolean;
21
21
  error: Error | undefined;
22
+ reloadWithOutcome: () => Promise<{
23
+ data: import("@qwen-code/sdk/daemon").DaemonWorkspaceAgentsStatus | undefined;
24
+ superseded: boolean;
25
+ error?: Error;
26
+ }>;
22
27
  };
@@ -21,4 +21,9 @@ export declare function useDaemonAuth(options?: DaemonResourceOptions): {
21
21
  data: import("@qwen-code/sdk/daemon").DaemonAuthStatusSnapshot | undefined;
22
22
  loading: boolean;
23
23
  error: Error | undefined;
24
+ reloadWithOutcome: () => Promise<{
25
+ data: import("@qwen-code/sdk/daemon").DaemonAuthStatusSnapshot | undefined;
26
+ superseded: boolean;
27
+ error?: Error;
28
+ }>;
24
29
  };
@@ -27,5 +27,10 @@ export declare function useDaemonChannelEvents(options?: DaemonChannelEventsOpti
27
27
  reload: () => Promise<ChannelEventsSnapshot | undefined>;
28
28
  loading: boolean;
29
29
  error: Error | undefined;
30
+ reloadWithOutcome: () => Promise<{
31
+ data: ChannelEventsSnapshot | undefined;
32
+ superseded: boolean;
33
+ error?: Error;
34
+ }>;
30
35
  };
31
36
  export {};