@qwen-code/web-shell 0.26.4 → 0.26.5

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/{PierreFilePreview-CVoJL-kD.js → PierreFilePreview-BqZBliqk.js} +1 -1
  3. package/dist/{SpreadsheetPreview-CPSqOai5.js → SpreadsheetPreview-Bn-HzKXD.js} +2 -2
  4. package/dist/{WorkspaceFileBrowser-IuQcqNWd.js → WorkspaceFileBrowser-BSNZoggH.js} +2 -2
  5. package/dist/{agents-route-BBfOMyJ5.js → agents-route-B1Ckyab-.js} +2 -2
  6. package/dist/daemon-react-sdk.js +1 -1
  7. package/dist/{index-DyFoZ0bq.js → index-minpPSyG.js} +53144 -52296
  8. package/dist/index.js +3 -3
  9. package/dist/sw.js +1 -1
  10. package/dist/transcript.js +10017 -9865
  11. package/dist/types/App.d.ts +1 -1
  12. package/dist/types/completions/slashCompletion.d.ts +1 -1
  13. package/dist/types/components/ChatEditor.d.ts +6 -2
  14. package/dist/types/components/MessageItem.d.ts +3 -0
  15. package/dist/types/components/MessageList.d.ts +3 -1
  16. package/dist/types/components/SplitView.d.ts +1 -1
  17. package/dist/types/components/WebShellTranscript.d.ts +1 -1
  18. package/dist/types/components/WorkflowModeControl.d.ts +8 -0
  19. package/dist/types/components/artifacts/ArtifactPanel.d.ts +4 -2
  20. package/dist/types/components/artifacts/ContextUsagePanel.d.ts +3 -2
  21. package/dist/types/components/artifacts/readContextInstructionFile.d.ts +22 -0
  22. package/dist/types/components/managed/generated/managed-agent-api.d.ts +113 -20
  23. package/dist/types/components/managed/java-managed-agent-client.d.ts +1 -0
  24. package/dist/types/components/managed/managed-agent-provider.d.ts +3 -1
  25. package/dist/types/components/managed/managed-session-export.d.ts +1 -0
  26. package/dist/types/components/managed/managed-session-messages.d.ts +1 -1
  27. package/dist/types/components/messages/ContextUsageMessage.d.ts +4 -2
  28. package/dist/types/components/messages/SystemMessage.d.ts +3 -0
  29. package/dist/types/components/messages/tools/DiffView.d.ts +6 -0
  30. package/dist/types/components/sidebar/WebShellSidebar.d.ts +1 -0
  31. package/dist/types/components/workflow-mode-messages.d.ts +18 -0
  32. package/dist/types/daemon/index.d.ts +1 -1
  33. package/dist/types/daemon/session/DaemonSessionProvider.d.ts +9 -0
  34. package/dist/types/daemon/session/actions.d.ts +2 -1
  35. package/dist/types/daemon/session/index.d.ts +1 -1
  36. package/dist/types/daemon/session/mappers.d.ts +6 -0
  37. package/dist/types/daemon/session/session-config-sync.d.ts +22 -0
  38. package/dist/types/daemon/session/types.d.ts +17 -1
  39. package/dist/types/daemon-react-sdk.d.ts +1 -1
  40. package/dist/types/extensions/inputHighlight.d.ts +3 -2
  41. package/dist/types/hooks/useMcpAppMessages.d.ts +9 -10
  42. package/dist/types/hooks/useOtherWorkspaceSessions.d.ts +29 -0
  43. package/dist/types/hooks/useScopedSessions.d.ts +5 -0
  44. package/dist/types/i18n.d.ts +1 -1
  45. package/dist/types/mcpAppHostContext.d.ts +19 -0
  46. package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
  47. package/dist/types/utils/composerTasks.d.ts +7 -0
  48. package/dist/{useDaemonMidTurnInjected-BpWZTnoN.js → useDaemonMidTurnInjected-CyCL08_O.js} +6595 -6204
  49. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonSessionClient } from '@qwen-code/sdk/daemon';
7
+ export interface SessionConfigSync {
8
+ generation: number;
9
+ pendingWrites: number;
10
+ readSequence: number;
11
+ refresh?: () => void;
12
+ }
13
+ export type SessionConfigSyncMap = WeakMap<DaemonSessionClient, SessionConfigSync>;
14
+ export declare function getSessionConfigSync(states: SessionConfigSyncMap, session: DaemonSessionClient): SessionConfigSync;
15
+ export declare function resetSessionConfigSync(states: SessionConfigSyncMap, session: DaemonSessionClient): void;
16
+ export declare function observeSessionConfig(states: SessionConfigSyncMap, session: DaemonSessionClient): void;
17
+ export declare function beginSessionConfigRead(states: SessionConfigSyncMap, session: DaemonSessionClient): () => boolean;
18
+ export declare function queueSessionConfigRefresh(states: SessionConfigSyncMap, session: DaemonSessionClient, refresh: () => void): void;
19
+ export declare function beginSessionConfigMutation(states: SessionConfigSyncMap, session: DaemonSessionClient): {
20
+ finish: () => void;
21
+ isCurrent: () => boolean;
22
+ };
@@ -28,6 +28,13 @@ export interface DaemonStandaloneConnectionState {
28
28
  creationRecovery?: DaemonStandaloneCreationRecovery;
29
29
  errorCode?: string;
30
30
  }
31
+ export interface DaemonWorkflowMode {
32
+ requested: boolean;
33
+ available: boolean;
34
+ effective: boolean;
35
+ reason?: string;
36
+ }
37
+ export type DaemonWorkflowModeStatus = 'unbound' | 'unknown' | 'syncing' | 'ready' | 'unsupported';
31
38
  export interface DaemonConnectionState {
32
39
  status: DaemonConnectionStatus;
33
40
  runtimeStopped?: boolean;
@@ -65,6 +72,9 @@ export interface DaemonConnectionState {
65
72
  models?: DaemonModelInfo[];
66
73
  currentModel?: string;
67
74
  reasoning?: DaemonReasoningControls;
75
+ workflowMode?: DaemonWorkflowMode;
76
+ workflowModeStatus?: DaemonWorkflowModeStatus;
77
+ workflowModePending?: boolean;
68
78
  currentMode?: string;
69
79
  planExecutionMode?: string;
70
80
  displayName?: string;
@@ -94,6 +104,11 @@ export interface DaemonConnectionState {
94
104
  errorStatus?: number;
95
105
  /** True only when the server confirmed the current session is missing. */
96
106
  missingSession?: boolean;
107
+ /**
108
+ * True while the connection is parked on the daemon's terminal 409
109
+ * `session_archived` answer for the session it tried to load.
110
+ */
111
+ sessionArchived?: boolean;
97
112
  }
98
113
  export interface DaemonReasoningControls {
99
114
  enabled: boolean;
@@ -219,7 +234,7 @@ export type DaemonPromptSettledListener = (event: DaemonPromptSettledEvent) => v
219
234
  export type DaemonPromptSettlementSubscribe = (listener: DaemonPromptSettledListener) => () => void;
220
235
  export type DaemonNoticeSeverity = 'info' | 'warning' | 'error';
221
236
  export type DaemonNoticeCategory = 'validation' | 'user_action' | 'connection' | 'protocol' | 'lifecycle' | 'system';
222
- export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
237
+ export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_workflow_mode' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
223
238
  export interface DaemonSessionNotice {
224
239
  id: string;
225
240
  severity: DaemonNoticeSeverity;
@@ -385,6 +400,7 @@ export interface DaemonSessionActions {
385
400
  workspaceCwd: string;
386
401
  sessionId?: string;
387
402
  }) => void | Promise<void>): Promise<void>;
403
+ setWorkflowMode(requested: boolean): Promise<void>;
388
404
  setReasoningEffort(value: ReasoningSelection, opts?: {
389
405
  persist?: boolean;
390
406
  }): Promise<void>;
@@ -157,7 +157,7 @@ DaemonSessionProviderProps, DaemonTranscriptHistory, DaemonProvisionalTurn, Daem
157
157
  /** Streaming lifecycle: `'idle' | 'waiting' | 'responding' | 'thinking'`. */
158
158
  DaemonStreamingState,
159
159
  /** Prompt submission status: `'idle' | 'waiting' | 'streaming'`. */
160
- DaemonPromptStatus, DaemonReasoningControls,
160
+ DaemonPromptStatus, DaemonReasoningControls, DaemonWorkflowMode, DaemonWorkflowModeStatus,
161
161
  /** Hook return value for daemon follow-up suggestions. */
162
162
  UseDaemonFollowupSuggestionReturn,
163
163
  /** Image attachment (base64 data + MIME type) for prompt submission. */
@@ -1,9 +1,10 @@
1
1
  import { ViewPlugin, EditorView } from '@codemirror/view';
2
2
  import type { DecorationSet, ViewUpdate } from '@codemirror/view';
3
3
  import type { CommandInfo } from '../adapters/types';
4
+ import type { SkillInfo } from '../completions/slashCompletion';
4
5
  import type { WebShellLanguage } from '../i18n';
5
- export declare function buildInputHighlightDecorations(view: EditorView, getCommands: () => CommandInfo[], getLanguage: () => WebShellLanguage): DecorationSet;
6
- export declare function inputHighlight(getCommands?: () => CommandInfo[], getLanguage?: () => WebShellLanguage): ViewPlugin<{
6
+ export declare function buildInputHighlightDecorations(view: EditorView, getCommands: () => CommandInfo[], getLanguage: () => WebShellLanguage, getSkills?: () => readonly SkillInfo[]): DecorationSet;
7
+ export declare function inputHighlight(getCommands?: () => CommandInfo[], getLanguage?: () => WebShellLanguage, getSkills?: () => readonly SkillInfo[]): ViewPlugin<{
7
8
  decorations: DecorationSet;
8
9
  update(update: ViewUpdate): void;
9
10
  }, undefined>;
@@ -1,6 +1,10 @@
1
+ import type { DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
1
2
  import { type McpAppMessageRequest, type McpAppMessages } from '../mcpAppHostContext';
2
3
  import type { DaemonSessionOwnerSnapshot } from '../daemon/session/types';
4
+ import { getTranslator } from '../i18n';
3
5
  export interface McpAppPromptSubmission {
6
+ /** Shows the message as a labelled reference in the transcript. */
7
+ inputAnnotations?: DaemonInputAnnotation[];
4
8
  signal: AbortSignal;
5
9
  isCurrent(): boolean;
6
10
  onDispatched(): void;
@@ -14,6 +18,8 @@ interface MessageHost {
14
18
  clientId?: string;
15
19
  captureOwner(): DaemonSessionOwnerSnapshot;
16
20
  submit(text: string, options: McpAppPromptSubmission): Promise<unknown>;
21
+ /** The host's translator; the hook runs outside its I18nProvider. */
22
+ translate?: ReturnType<typeof getTranslator>;
17
23
  }
18
24
  export declare function useMcpAppMessages(host: MessageHost): {
19
25
  context: McpAppMessages | undefined;
@@ -21,18 +27,11 @@ export declare function useMcpAppMessages(host: MessageHost): {
21
27
  };
22
28
  interface GeneratedUiParameters {
23
29
  title: string;
24
- inputs: Array<{
25
- id: string;
26
- value: string;
27
- checked: boolean;
28
- }>;
29
- rejectedEvents: number;
30
+ documentId: string;
30
31
  }
31
32
  /**
32
- * Reads the parameter message the built-in Generated UI App sends, so the
33
- * review can show the values first. Anything else keeps the generic layout:
34
- * the table folds the message text away, so only the bundled server counts,
35
- * not any App that claims its resource URI.
33
+ * Recognizes the parameter message the built-in Generated UI App sends for
34
+ * its explicit continue action. Any other message keeps the review dialog.
36
35
  */
37
36
  export declare function readGeneratedUiParameters(review: Pick<McpAppMessageRequest, 'requiredFeature' | 'text'>): GeneratedUiParameters | undefined;
38
37
  export {};
@@ -6,6 +6,35 @@
6
6
  import type { DaemonSessionSummary } from '@qwen-code/sdk/daemon';
7
7
  export interface OtherWorkspaceSessionsResult {
8
8
  sessions: DaemonSessionSummary[];
9
+ /**
10
+ * True only while a non-primary workspace list is still in flight. A first
11
+ * fetch that failed is settled, not loading — it is reported per-cwd by
12
+ * `notReadyCwds` instead, so a persistently-failing workspace can't pin
13
+ * this forever. Consumers that compare the merged list against live state
14
+ * (for example, pruning panes) must wait for this to be false so a
15
+ * still-loading workspace can't look like a vanished session.
16
+ */
17
+ loading: boolean;
18
+ /**
19
+ * The workspaces the fan-out is actually querying (the daemon's listed
20
+ * non-primary trusted workspaces). Empty while the hook is disabled or the
21
+ * daemon lists none. Consumers that prune panes must reason over this set
22
+ * (plus their own primary page) and never over workspaces the daemon no
23
+ * longer advertises: a pane whose workspace is not here is outside the
24
+ * catalog's coverage, and its absence from the merged list proves nothing.
25
+ */
26
+ queriedCwds: string[];
27
+ /**
28
+ * The subset of `queriedCwds` where absence can't currently be proven: the
29
+ * page never landed (an errored fetch, a deferred load in a hidden tab),
30
+ * it settled with an error (even while the store still serves a retained
31
+ * page), or it landed but is incomplete (truncated / nextCursor /
32
+ * liveMergeFailed) or stale. A pane whose workspace is here must not be
33
+ * pruned on catalog absence. The set is derived from the live snapshots, so
34
+ * it self-clears: the store re-tries an errored fetch, and a deferred load
35
+ * is scheduled the moment the store becomes active again.
36
+ */
37
+ notReadyCwds: string[];
9
38
  reload: () => Promise<void>;
10
39
  }
11
40
  export declare function useOtherWorkspaceSessions(enabled?: boolean, pollIntervalMs?: number): OtherWorkspaceSessionsResult;
@@ -15,6 +15,7 @@ export declare function useScopedSessions(workspaceCwd: string | undefined, opti
15
15
  sessions: import("@qwen-code/sdk/daemon").DaemonSessionSummary[];
16
16
  loading: boolean;
17
17
  error: Error | undefined;
18
+ stale: boolean;
18
19
  reload: (reloadOptions?: {
19
20
  interactive?: boolean;
20
21
  }) => Promise<import("@qwen-code/sdk/daemon").DaemonSessionSummary[] | undefined>;
@@ -51,6 +52,10 @@ export declare function useScopedSessions(workspaceCwd: string | undefined, opti
51
52
  loading: boolean;
52
53
  error: Error | undefined;
53
54
  reload: () => Promise<import("@qwen-code/sdk/daemon").DaemonSessionSummary[]>;
55
+ nextCursor: string | undefined;
56
+ liveMergeFailed: boolean;
57
+ truncated: boolean;
58
+ stale: boolean;
54
59
  deleteSession: (sessionId: string) => Promise<boolean>;
55
60
  deleteSessions: (sessionIds: string[]) => Promise<{
56
61
  removed: string[];
@@ -1,5 +1,5 @@
1
1
  import { type PropsWithChildren } from 'react';
2
- export declare const WEB_SHELL_LANGUAGES: readonly ["en", "zh-CN"];
2
+ export declare const WEB_SHELL_LANGUAGES: readonly ["en", "zh-CN", "ru"];
3
3
  export type WebShellLanguage = (typeof WEB_SHELL_LANGUAGES)[number];
4
4
  export declare function normalizeLanguage(value: string | undefined | null): WebShellLanguage;
5
5
  export declare function languageSettingToWebShellLanguage(value: unknown): WebShellLanguage | undefined;
@@ -16,13 +16,32 @@ export interface McpAppMessageRequest {
16
16
  * review, or `failed` when it was refused before or at admission.
17
17
  */
18
18
  export declare const MCP_APP_MESSAGE_REVIEW_META = "qwen-code/message-review";
19
+ /** The reason a message failed before the session accepted it. */
20
+ export declare const MCP_APP_MESSAGE_ERROR_META = "qwen-code/message-error";
19
21
  export interface McpAppMessageResult {
20
22
  isError?: boolean;
21
23
  _meta?: {
22
24
  [MCP_APP_MESSAGE_REVIEW_META]?: 'cancelled' | 'expired' | 'failed';
25
+ [MCP_APP_MESSAGE_ERROR_META]?: string;
23
26
  };
24
27
  [key: string]: unknown;
25
28
  }
29
+ /** Composer tag kind for values a Generated UI card attaches to a message. */
30
+ export declare const GENERATED_UI_CONTEXT_TAG_KIND = "generated-ui";
31
+ export declare function generatedUiContextTagId(documentId: string): string;
32
+ /**
33
+ * Lets the built-in Generated UI attach a card's current values to the
34
+ * user's next message in the session that owns the card.
35
+ */
36
+ export interface McpAppModelContext {
37
+ sessionId: string;
38
+ attach(context: {
39
+ id: string;
40
+ title: string;
41
+ text: string;
42
+ }): void;
43
+ }
44
+ export declare const McpAppModelContextContext: import("react").Context<McpAppModelContext | undefined>;
26
45
  export interface McpAppMessages {
27
46
  sessionId: string;
28
47
  requestMessage(request: McpAppMessageRequest): Promise<McpAppMessageResult>;
@@ -88,6 +88,7 @@ export declare function useWebShellSessions(options?: WebShellSessionsOptions):
88
88
  sessions: DaemonSessionSummary[];
89
89
  loading: boolean;
90
90
  error: Error | undefined;
91
+ stale: boolean;
91
92
  reload: (reloadOptions?: {
92
93
  interactive?: boolean;
93
94
  }) => Promise<DaemonSessionSummary[] | undefined>;
@@ -14,3 +14,10 @@ import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon'
14
14
  export declare function isComposerTask(task: DaemonSessionTaskWithWorkflowStatus): task is Exclude<DaemonSessionTaskWithWorkflowStatus, {
15
15
  kind: 'agent';
16
16
  }>;
17
+ /**
18
+ * Whether the snapshot carries a background agent that is still executing.
19
+ * Paused agents are parked, not active: they stay visible in the environment
20
+ * panel's subagents section, so they must not re-open the footer pill in the
21
+ * shipped entry (which would pin a stale count to parked work).
22
+ */
23
+ export declare function hasActiveBackgroundAgent(tasks: readonly DaemonSessionTaskWithWorkflowStatus[]): boolean;