@qwen-code/web-shell 0.27.4 → 0.28.0-nightly.20261118.d9ac287c9f

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 (165) hide show
  1. package/README.md +3 -3
  2. package/dist/{PierreFilePreview-BMd8Nqyr.js → PierreFilePreview-702EU5Ue.js} +1 -1
  3. package/dist/{SpreadsheetPreview-MnZX4z-A.js → SpreadsheetPreview-Dxgc_9mv.js} +11 -11
  4. package/dist/{WorkspaceFileBrowser-CvJS8MdL.js → WorkspaceFileBrowser-XlJixW-G.js} +2 -2
  5. package/dist/agents-route-B5igtzLt.js +1746 -0
  6. package/dist/daemon-react-sdk.js +1 -1
  7. package/dist/{index-ENe4NzKy.js → index-D0g0Svhz.js} +69257 -65377
  8. package/dist/index.js +3 -3
  9. package/dist/sw.js +1 -1
  10. package/dist/transcript.js +10623 -10223
  11. package/dist/types/App.d.ts +1 -1
  12. package/dist/types/adapters/messageTypes.d.ts +6 -1
  13. package/dist/types/adapters/toolClassification.d.ts +2 -1
  14. package/dist/types/browser-notifications/messages.d.ts +1 -0
  15. package/dist/types/browser-notifications/messages.transcript-stub.d.ts +1 -0
  16. package/dist/types/chat-core/capabilities.d.ts +3 -0
  17. package/dist/types/chat-core/contract.d.ts +106 -0
  18. package/dist/types/chat-core/intent.d.ts +8 -0
  19. package/dist/types/completions/sendCompletion.d.ts +28 -0
  20. package/dist/types/completions/slashCompletion.d.ts +8 -1
  21. package/dist/types/components/BranchPickerPopover.d.ts +11 -1
  22. package/dist/types/components/ChatContextHeader.d.ts +5 -1
  23. package/dist/types/components/ChatEditor.d.ts +7 -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 +5 -2
  27. package/dist/types/components/GoalStatusStrip.d.ts +23 -2
  28. package/dist/types/components/LocalFilesControl.d.ts +40 -1
  29. package/dist/types/components/ManagedLocalFilesControl.d.ts +3 -1
  30. package/dist/types/components/MessageItem.d.ts +2 -0
  31. package/dist/types/components/MessageList.d.ts +1 -0
  32. package/dist/types/components/ReportedArtifactRegistration.d.ts +25 -0
  33. package/dist/types/components/SessionGoalMarker.d.ts +24 -0
  34. package/dist/types/components/ToastHost.d.ts +27 -1
  35. package/dist/types/components/UnavailableModelTooltip.d.ts +4 -2
  36. package/dist/types/components/WebShellTranscript.d.ts +1 -1
  37. package/dist/types/components/artifacts/ArtifactPanel.d.ts +34 -2
  38. package/dist/types/components/artifacts/ChangeOverviewPanel.d.ts +4 -0
  39. package/dist/types/components/artifacts/SessionPanel.d.ts +19 -0
  40. package/dist/types/components/artifacts/change-overview.d.ts +102 -0
  41. package/dist/types/components/artifacts/files-messages.d.ts +33 -0
  42. package/dist/types/components/artifacts/files-messages.transcript-stub.d.ts +1 -0
  43. package/dist/types/components/artifacts/token-usage-messages.d.ts +1 -0
  44. package/dist/types/components/artifacts/token-usage-messages.transcript-stub.d.ts +1 -0
  45. package/dist/types/components/artifacts/useChangeOverview.d.ts +21 -0
  46. package/dist/types/components/channels/channel-events-messages.d.ts +1 -0
  47. package/dist/types/components/channels/channel-platform.d.ts +1 -1
  48. package/dist/types/components/dialogs/GoalsDialog.d.ts +2 -1
  49. package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +14 -2
  50. package/dist/types/components/managed/chat-capabilities.d.ts +5 -0
  51. package/dist/types/components/managed/generated/managed-agent-api.d.ts +4 -4
  52. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +167 -167
  53. package/dist/types/components/managed/managed-extension-messages.d.ts +1 -0
  54. package/dist/types/components/managed/managed-lifecycle-messages.d.ts +40 -0
  55. package/dist/types/components/managed/managed-lifecycle-messages.transcript-stub.d.ts +1 -0
  56. package/dist/types/components/managed/managed-mcp-messages.d.ts +1 -0
  57. package/dist/types/components/managed/managed-mcp-messages.transcript-stub.d.ts +1 -0
  58. package/dist/types/components/managed/managed-recovery-messages.d.ts +4 -1
  59. package/dist/types/components/managed/managed-task-messages.d.ts +1 -0
  60. package/dist/types/components/managed/managed-task-messages.transcript-stub.d.ts +1 -0
  61. package/dist/types/components/managed/managed-workspace-messages.d.ts +1 -0
  62. package/dist/types/components/managed/managed-workspace-messages.transcript-stub.d.ts +1 -0
  63. package/dist/types/components/managed/use-managed-recovery.d.ts +1 -2
  64. package/dist/types/components/message-deletion-messages.d.ts +1 -0
  65. package/dist/types/components/message-deletion-messages.transcript-stub.d.ts +1 -0
  66. package/dist/types/components/messages/AssistantMessage.d.ts +2 -0
  67. package/dist/types/components/messages/BtwMessage.d.ts +6 -0
  68. package/dist/types/components/messages/HookStatistics.d.ts +4 -0
  69. package/dist/types/components/messages/HookStatistics.transcript-stub.d.ts +4 -0
  70. package/dist/types/components/messages/MemoryMessage.d.ts +1 -2
  71. package/dist/types/components/messages/UserMessage.d.ts +5 -1
  72. package/dist/types/components/messages/hook-statistics-context.d.ts +13 -0
  73. package/dist/types/components/messages/hook-statistics-turns.d.ts +3 -0
  74. package/dist/types/components/messages/session-link.d.ts +1 -0
  75. package/dist/types/components/panels/EnvironmentPanel.d.ts +7 -1
  76. package/dist/types/components/sidebar/ActivityDateSessions.d.ts +22 -0
  77. package/dist/types/components/sidebar/SessionGroupSection.d.ts +4 -2
  78. package/dist/types/components/sidebar/SessionSortMenu.d.ts +15 -1
  79. package/dist/types/components/sidebar/WebShellSidebar.d.ts +1 -1
  80. package/dist/types/components/sidebar/activity-messages.d.ts +1 -0
  81. package/dist/types/components/sidebar/activity-model.d.ts +1 -1
  82. package/dist/types/components/ui/drawer.d.ts +1 -1
  83. package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +13 -5
  84. package/dist/types/components/workspace-agents/messages.d.ts +1 -0
  85. package/dist/types/components/workspace-agents/messages.transcript-stub.d.ts +1 -0
  86. package/dist/types/constants/approvalModes.d.ts +7 -0
  87. package/dist/types/constants/localCommands.d.ts +3 -1
  88. package/dist/types/constants/sessions.d.ts +1 -0
  89. package/dist/types/customization.d.ts +10 -2
  90. package/dist/types/daemon/chat-capabilities.d.ts +3 -0
  91. package/dist/types/daemon/session/types.d.ts +42 -2
  92. package/dist/types/daemon/workspace/hooks/useDaemonAgents.d.ts +5 -0
  93. package/dist/types/daemon/workspace/hooks/useDaemonAuth.d.ts +5 -0
  94. package/dist/types/daemon/workspace/hooks/useDaemonChannelEvents.d.ts +5 -0
  95. package/dist/types/daemon/workspace/hooks/useDaemonDiagnostics.d.ts +14 -2
  96. package/dist/types/daemon/workspace/hooks/useDaemonMcp.d.ts +5 -0
  97. package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +5 -0
  98. package/dist/types/daemon/workspace/hooks/useDaemonProviders.d.ts +5 -0
  99. package/dist/types/daemon/workspace/hooks/useDaemonResource.d.ts +7 -1
  100. package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +6 -0
  101. package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +5 -0
  102. package/dist/types/daemon/workspace/hooks/useDaemonStatusReport.d.ts +5 -0
  103. package/dist/types/daemon/workspace/hooks/useDaemonTools.d.ts +5 -0
  104. package/dist/types/daemon/workspace/hooks/useDaemonUsageDashboard.d.ts +5 -0
  105. package/dist/types/generated-ui/instance-store.d.ts +4 -1
  106. package/dist/types/generated-ui/view-state.d.ts +51 -0
  107. package/dist/types/hooks/useComposerCore.d.ts +22 -2
  108. package/dist/types/hooks/useComposerWorkspace.d.ts +7 -0
  109. package/dist/types/hooks/useIsTouchComposer.d.ts +1 -0
  110. package/dist/types/hooks/useModelConfigurations.d.ts +7 -0
  111. package/dist/types/hooks/useScopedSessions.d.ts +1 -0
  112. package/dist/types/hooks/useSessionArtifacts.d.ts +8 -2
  113. package/dist/types/hooks/useSubSessionTasks.d.ts +8 -0
  114. package/dist/types/i18n-ru-part1.d.ts +1 -0
  115. package/dist/types/i18n-ru-part1.transcript-stub.d.ts +12 -0
  116. package/dist/types/i18n-ru-part2.d.ts +1 -0
  117. package/dist/types/i18n-ru-part2.transcript-stub.d.ts +12 -0
  118. package/dist/types/i18n-ru-part3.d.ts +1 -0
  119. package/dist/types/i18n-ru-part3.transcript-stub.d.ts +12 -0
  120. package/dist/types/i18n-ru-part4.d.ts +1 -0
  121. package/dist/types/i18n-ru-part4.transcript-stub.d.ts +12 -0
  122. package/dist/types/i18n-ru-part5.d.ts +1 -0
  123. package/dist/types/i18n-ru-part5.transcript-stub.d.ts +12 -0
  124. package/dist/types/i18n-ru-part6.d.ts +1 -0
  125. package/dist/types/i18n-ru-part6.transcript-stub.d.ts +12 -0
  126. package/dist/types/i18n-ru-remainder.d.ts +6 -0
  127. package/dist/types/i18n-ru-remainder.transcript-stub.d.ts +11 -0
  128. package/dist/types/i18n-zh-tw.d.ts +8 -0
  129. package/dist/types/i18n-zh-tw.transcript-stub.d.ts +6 -0
  130. package/dist/types/i18n.d.ts +7 -1
  131. package/dist/types/live/messages.d.ts +1 -0
  132. package/dist/types/live/messages.transcript-stub.d.ts +1 -0
  133. package/dist/types/local-files/useLocalFilesBridge.d.ts +7 -1
  134. package/dist/types/local-files/useManagedLocalFilesBridge.d.ts +5 -1
  135. package/dist/types/mcp-app/messages.d.ts +1 -0
  136. package/dist/types/mcp-app/messages.transcript-stub.d.ts +1 -0
  137. package/dist/types/mcpAppHostContext.d.ts +4 -0
  138. package/dist/types/session-catalog/session-catalog-hooks.d.ts +5 -1
  139. package/dist/types/session-catalog/session-live-work.d.ts +23 -0
  140. package/dist/types/settings/messages.d.ts +1 -0
  141. package/dist/types/settings/messages.transcript-stub.d.ts +1 -0
  142. package/dist/types/subagentDetailsContext.d.ts +9 -1
  143. package/dist/types/trajectory/execution-messages.d.ts +1 -0
  144. package/dist/types/trajectory/execution-messages.transcript-stub.d.ts +1 -0
  145. package/dist/types/trajectory/filter-messages.d.ts +1 -0
  146. package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +1 -0
  147. package/dist/types/trajectory/project-trajectory-lifecycle.d.ts +1 -1
  148. package/dist/types/trajectory/trajectory-live-store.d.ts +3 -1
  149. package/dist/types/trajectory/window-messages.d.ts +1 -0
  150. package/dist/types/trajectory/window-messages.transcript-stub.d.ts +1 -0
  151. package/dist/types/utils/composerTasks.d.ts +16 -4
  152. package/dist/types/utils/gitModeIntent.d.ts +14 -4
  153. package/dist/types/utils/imageIngestion.d.ts +1 -0
  154. package/dist/types/utils/planMode.d.ts +2 -2
  155. package/dist/types/utils/plural.d.ts +5 -0
  156. package/dist/types/utils/sendCommand.d.ts +31 -0
  157. package/dist/types/voice/VoiceButton.d.ts +9 -1
  158. package/dist/types/voice/messages.d.ts +1 -0
  159. package/dist/types/voice/messages.transcript-stub.d.ts +1 -0
  160. package/dist/types/voice/useVoiceCapture.d.ts +8 -0
  161. package/dist/useDaemonMidTurnInjected-CImeR4Nm.js +37291 -0
  162. package/package.json +1 -1
  163. package/dist/agents-route-BYqfB9LM.js +0 -1727
  164. package/dist/types/components/managed/ManagedRecoveryPanel.d.ts +0 -9
  165. package/dist/useDaemonMidTurnInjected-BCExZTLK.js +0 -26004
@@ -1,4 +1,6 @@
1
- import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
1
+ import type { DaemonSessionSubSessionTaskStatus, DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
2
+ /** A task the chip row can show: the child's own, or a send it made. */
3
+ export type ComposerChipTask = DaemonSessionTaskWithWorkflowStatus | DaemonSessionSubSessionTaskStatus;
2
4
  /**
3
5
  * Tasks that belong to THIS session's live background state — what the
4
6
  * composer chip row draws from and the environment panel lists.
@@ -14,10 +16,10 @@ export declare function isComposerTask(task: DaemonSessionTaskWithWorkflowStatus
14
16
  kind: 'agent';
15
17
  }>;
16
18
  /** The kinds the composer chip row groups live tasks under, in display order. */
17
- export type ComposerTaskChipKind = 'workflow' | 'agent' | 'shell' | 'monitor';
19
+ export type ComposerTaskChipKind = 'workflow' | 'agent' | 'session' | 'shell' | 'monitor';
18
20
  export interface ComposerTaskChipGroup {
19
21
  kind: ComposerTaskChipKind;
20
- tasks: DaemonSessionTaskWithWorkflowStatus[];
22
+ tasks: ComposerChipTask[];
21
23
  }
22
24
  /**
23
25
  * Group this session's unfinished background tasks for the chip row above
@@ -25,6 +27,16 @@ export interface ComposerTaskChipGroup {
25
27
  * its chip disappears, and the run stays reachable from the transcript, the
26
28
  * environment panel and the tasks dialog.
27
29
  */
28
- export declare function getComposerTaskChipGroups(tasks: readonly DaemonSessionTaskWithWorkflowStatus[], options: {
30
+ export declare function getComposerTaskChipGroups(tasks: readonly ComposerChipTask[], options: {
29
31
  includeAgents: boolean;
30
32
  }): ComposerTaskChipGroup[];
33
+ export declare function explainDisplayLabel(label: string): string;
34
+ /**
35
+ * Compose the side question the composer's "?" affordance asks about a
36
+ * background task. The facts come from the client's task snapshot; the
37
+ * forked side-question agent adds the conversation context the snapshot
38
+ * cannot carry (why the task was started). Fact labels stay English — they
39
+ * are model input, not UI text — while the instruction follows the UI
40
+ * language so the answer does too.
41
+ */
42
+ export declare function buildTaskExplainQuestion(task: DaemonSessionTaskWithWorkflowStatus, t: (key: string, vars?: Record<string, string | number>) => string): string;
@@ -9,14 +9,24 @@ import type { DaemonWorkspaceGitStatus } from '@qwen-code/sdk/daemon';
9
9
  * session can no longer apply and must fall back to the current branch.
10
10
  *
11
11
  * Only definitive states reset it: a session already exists, the workspace
12
- * is not trusted, or git status answered and reported no branch. A status
13
- * that is merely absent — not fetched yet, or a poll round that failed — is
12
+ * is not trusted, git status answered and reported neither a branch nor a
13
+ * detached HEAD, or the workspace has no commits (an unborn HEAD has no
14
+ * worktree base — the create path would refuse, and the fast status that
15
+ * armed the intent may have omitted hasHead entirely). A status that is
16
+ * merely absent — not fetched yet, or a poll round that failed — is
14
17
  * transient and leaves the intent alone; otherwise one rejected refetch
15
18
  * while a draft sits would silently turn a requested worktree task into a
16
- * plain session in the main checkout.
19
+ * plain session in the main checkout. hasHead === undefined is transient
20
+ * the same way.
21
+ *
22
+ * The git-status test mirrors `App.gitModeEligible`: a detached HEAD
23
+ * (tag/SHA checkout) reports branch:null with detached:true and is exactly
24
+ * the shared-checkout shape the worktree default isolates, so it must NOT
25
+ * reset the intent — only a non-Git workspace (no branch and not detached)
26
+ * or an unborn HEAD does.
17
27
  */
18
28
  export declare function gitModeIntentMustReset({ sessionId, workspaceTrusted, gitStatus, }: {
19
29
  sessionId: string | null | undefined;
20
30
  workspaceTrusted: boolean | undefined;
21
- gitStatus: Pick<DaemonWorkspaceGitStatus, 'branch'> | undefined;
31
+ gitStatus: Pick<DaemonWorkspaceGitStatus, 'branch' | 'hasHead' | 'detached'> | undefined;
22
32
  }): boolean;
@@ -29,6 +29,7 @@ export interface FileIngestionBatchResult {
29
29
  interface ReaderLifecycle {
30
30
  onReaderCreated?: (reader: FileReader) => void;
31
31
  onReaderSettled?: (reader: FileReader) => void;
32
+ isCancelled?: () => boolean;
32
33
  maxBytes?: number;
33
34
  }
34
35
  export declare const MAX_IMAGE_ATTACHMENT_DATA_BYTES: number;
@@ -1,5 +1,5 @@
1
- import { DAEMON_APPROVAL_MODES } from '@qwen-code/web-shell/daemon-react-sdk';
2
- export type WebShellApprovalMode = Exclude<(typeof DAEMON_APPROVAL_MODES)[number], 'plan'>;
1
+ import { APPROVAL_MODES } from '../constants/approvalModes.js';
2
+ export type WebShellApprovalMode = Exclude<(typeof APPROVAL_MODES)[number], 'plan'>;
3
3
  export declare const EXECUTION_APPROVAL_MODES: ("default" | "auto-edit" | "yolo" | "auto")[];
4
4
  export declare function resolveApprovalModes(value: unknown): readonly WebShellApprovalMode[];
5
5
  export declare function nextApprovalMode(available: readonly WebShellApprovalMode[], current: string): WebShellApprovalMode | undefined;
@@ -5,3 +5,8 @@
5
5
  */
6
6
  /** English count plus its noun, pluralised the regular way. */
7
7
  export declare function plural(count: string | number | undefined, noun: string): string;
8
+ /**
9
+ * Russian plural pick: 1 → `one`, 2–4 → `few`, otherwise → `many`, with the
10
+ * 11–14 exception per decade (ход/ходов, токен/токенов, цель/целей).
11
+ */
12
+ export declare function ruPlural(count: string | number | undefined, one: string, few: string, many: string): string;
@@ -0,0 +1,31 @@
1
+ import type { DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
2
+ /**
3
+ * `/send [--workspace <name|path|id>] [--session-id <id>] <message>`.
4
+ *
5
+ * Options come first; everything after them is the message, newlines
6
+ * included. A value may be quoted ("…" or '…') when it holds spaces, and
7
+ * `--option=value` works too. Without `--session-id` the message starts a new
8
+ * session; without `--workspace` it goes to the current workspace.
9
+ */
10
+ export type SendCommandParse = {
11
+ ok: true;
12
+ workspace?: string;
13
+ sessionId?: string;
14
+ message: string;
15
+ } | {
16
+ ok: false;
17
+ error: 'missing-message' | 'missing-value' | 'duplicate-option';
18
+ option?: string;
19
+ };
20
+ export declare const SEND_COMMAND_OPTIONS: readonly ["--workspace", "--session-id"];
21
+ export declare function getSendWorkspace(args: string): string | undefined;
22
+ export declare function parseSendCommand(args: string): SendCommandParse;
23
+ export type SendCommand = Extract<SendCommandParse, {
24
+ ok: true;
25
+ }>;
26
+ /**
27
+ * Map a `--workspace` value to a registered workspace: its path or id, or
28
+ * its name when only one workspace has that name. Anything else goes to the
29
+ * daemon as typed, which refuses what it does not know.
30
+ */
31
+ export declare function resolveSendWorkspace(workspaces: readonly DaemonWorkspaceCapability[], value: string): string;
@@ -13,4 +13,12 @@ export interface VoiceButtonProps {
13
13
  target: VoiceWorkspaceTarget | undefined;
14
14
  statusRevision?: VoiceStatusRevision;
15
15
  }
16
- export declare function VoiceButton({ onInsert, onActiveChange, disabled, target, statusRevision, }: VoiceButtonProps): React.JSX.Element | null;
16
+ export interface VoiceButtonHandle {
17
+ /**
18
+ * Finalize an active capture for a send: resolves with the final transcript
19
+ * ('' when idle, empty, failed, or aborted) without inserting it — the
20
+ * caller owns insertion so the text lands in the message being sent.
21
+ */
22
+ flush: () => Promise<string>;
23
+ }
24
+ export declare const VoiceButton: React.ForwardRefExoticComponent<VoiceButtonProps & React.RefAttributes<VoiceButtonHandle>>;
@@ -6,4 +6,5 @@
6
6
  type VoiceMessage = string | ((vars?: Record<string, string | number>) => string);
7
7
  export declare const VOICE_MESSAGES_EN: Record<string, VoiceMessage>;
8
8
  export declare const VOICE_MESSAGES_ZH: Record<string, VoiceMessage>;
9
+ export declare const VOICE_MESSAGES_RU: Record<string, VoiceMessage>;
9
10
  export {};
@@ -5,3 +5,4 @@
5
5
  */
6
6
  export declare const VOICE_MESSAGES_EN: {};
7
7
  export declare const VOICE_MESSAGES_ZH: {};
8
+ export declare const VOICE_MESSAGES_RU: {};
@@ -39,5 +39,13 @@ export interface UseVoiceCaptureReturn {
39
39
  start: () => void;
40
40
  stop: () => void;
41
41
  abort: () => void;
42
+ /**
43
+ * Stop an active capture and resolve with its final transcript once the
44
+ * server finalizes ('' when idle, empty, failed, or aborted). While a flush
45
+ * is pending the final transcript is delivered only through this promise —
46
+ * `onFinal` is suppressed so the caller owns insertion (e.g. a send that
47
+ * must include the dictation).
48
+ */
49
+ flush: () => Promise<string>;
42
50
  }
43
51
  export declare function useVoiceCapture({ baseUrl, token, target, onFinal, onError, onUnexpectedClose, }: UseVoiceCaptureOptions): UseVoiceCaptureReturn;