@qwen-code/web-shell 0.26.7 → 0.26.8

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 (36) hide show
  1. package/README.md +2 -1
  2. package/dist/{PierreFilePreview-CUfIRw63.js → PierreFilePreview-BFgHDFfb.js} +1 -1
  3. package/dist/{SpreadsheetPreview-CFnRo-Yk.js → SpreadsheetPreview-CeMwcgfx.js} +2 -2
  4. package/dist/{WorkspaceFileBrowser-C0YJRw5U.js → WorkspaceFileBrowser-C5R9bwVy.js} +2 -2
  5. package/dist/agents-route-BGwI44Wi.js +1727 -0
  6. package/dist/daemon-react-sdk.js +1 -1
  7. package/dist/{index-Bgo2d7hn.js → index-BurR4Gb3.js} +67400 -65760
  8. package/dist/index.js +42 -40
  9. package/dist/sw.js +1 -1
  10. package/dist/transcript.js +5992 -5736
  11. package/dist/types/App.d.ts +4 -1
  12. package/dist/types/components/ProjectHooksApprovalCard.d.ts +13 -0
  13. package/dist/types/components/WorkspaceSessionProvider.d.ts +1 -0
  14. package/dist/types/components/channels/channel-editor-state.d.ts +9 -1
  15. package/dist/types/components/channels/channel-platform.d.ts +26 -0
  16. package/dist/types/components/messages/AuthMessage.d.ts +3 -1
  17. package/dist/types/components/messages/QwenSubscriptionEntry.d.ts +10 -0
  18. package/dist/types/components/messages/QwenSubscriptionPanel.d.ts +29 -0
  19. package/dist/types/components/messages/QwenSubscriptionSidebarStatus.d.ts +2 -0
  20. package/dist/types/components/messages/QwenSubscriptionStatus.d.ts +36 -0
  21. package/dist/types/components/messages/ToolApproval.d.ts +10 -1
  22. package/dist/types/components/messages/use-subscription.d.ts +21 -0
  23. package/dist/types/components/sidebar/workspaceOverviewModel.d.ts +2 -0
  24. package/dist/types/components/ui/collapsible.d.ts +5 -0
  25. package/dist/types/components/workspace-agents/ThreadsPage.d.ts +6 -4
  26. package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +30 -2
  27. package/dist/types/components/workspace-agents/squads-section.d.ts +6 -1
  28. package/dist/types/constants/localCommands.d.ts +1 -0
  29. package/dist/types/daemon/session/types.d.ts +3 -1
  30. package/dist/types/daemon/workspace/actions.d.ts +1 -1
  31. package/dist/types/daemon/workspace/types.d.ts +6 -2
  32. package/dist/types/hooks/useSubscriptionLogout.d.ts +15 -0
  33. package/dist/types/index.d.ts +3 -0
  34. package/dist/{useDaemonMidTurnInjected-Bsza8bIn.js → useDaemonMidTurnInjected-DjE4i35e.js} +7008 -6658
  35. package/package.json +2 -1
  36. package/dist/agents-route-Ce70dXW4.js +0 -1552
@@ -69,6 +69,7 @@ export type SessionChangeEvent = {
69
69
  error?: Error;
70
70
  };
71
71
  export interface WebShellApi {
72
+ refreshModels: () => Promise<void>;
72
73
  /** 按持久化记录 ID 定位当前会话消息,包含尚未渲染的历史。宿主先切换会话。 */
73
74
  navigateToMessage: (request: WebShellMessageNavigationRequest) => Promise<WebShellMessageNavigationResult>;
74
75
  /** Open the in-window split view, matching the built-in sidebar button. */
@@ -118,6 +119,8 @@ export interface WebShellProps {
118
119
  sessionId?: string;
119
120
  sessionName?: string;
120
121
  }) => void;
122
+ /** Called when the active model connection changes. */
123
+ onModelChange?: (modelId: string | undefined, authType: string | undefined) => void;
121
124
  /** Called after a new session is created. Session setup waits up to 30 seconds. */
122
125
  onSessionCreated?: (sessionId: string) => Promise<void> | void;
123
126
  /** Explicit Managed Agent backend. Omit to keep the daemon provider unchanged. */
@@ -460,4 +463,4 @@ export declare function canArchiveSideTaskSummary(session: Pick<DaemonSessionSum
460
463
  export declare function mergeSideTaskCatalog(catalog: SideTaskCatalogState, parentSessionId: string, listedItems: SideTaskListItem[], optimisticIds: ReadonlySet<string>): SideTaskCatalogState;
461
464
  export declare function getEnvironmentAgentTasks(messages: readonly Message[], sessionTasks: readonly DaemonSessionTaskWithWorkflowStatus[]): EnvironmentAgentTask[];
462
465
  export declare function mergeAgentTrace(liveAgents: readonly EnvironmentAgentTask[], trace: DaemonAgentTrace | undefined, now?: number): EnvironmentAgentTask[];
463
- export declare function App({ onRefreshModels, askUserFreeTextLabel, onSessionIdChange, onSessionInfoChange, onSessionCreated, managedAgentProvider, theme: providedTheme, onThemeChange, onThemeResolved, language: providedLanguage, onLanguageChange, onLanguageResolved, brand: providedBrand, onBrandResolved, className: externalClassName, style: externalStyle, shadowDom, onConnectionChange, onStreamingStateChange, onError, onBugReport, hiddenSlashCommands, slashCommandCategoryOrder, onSlashCommand, builtinAtProviders, atProviders, composerTagIcons, fileUploadEnabled, fileUploadDirectory, artifact, fileDropAction, renderToolHeaderExtra, renderWelcomeHeader, renderWelcomeFooter, mobileWelcomeFooterMiddle, parseUserMessageContent, renderUserMessageContent, renderComposerTag, renderComposerTagTooltip, onComposerTagClick, renderAssistantTurnFooter, assistantFeedback, getAssistantSourcesIcon, sourceReferences, renderComposerToolbarStart, renderComposerToolbarEnd, renderComposerToolbarRight, renderComposerHeader, renderComposerFooter, renderChatHeader, renderFooter, bottomStatusItems, chatMaxWidth, sidebar, settings: settingsPresentation, modelManagement, unavailableModels, mountUnavailableModelTooltip, header, rightPanel, showToolCalls, environmentPanel, splitSessionIds: externalSplitSessionIds, onSplitSessionIdsChange, renderPaneHeaderActions, onRightPanelOpen, onFileReviewOpen, onWorkspaceFileOpen, onPickWorkspaceDirectory, onInsightReportOpen, onContextUsageOpen, messageTurnOutputs, filterArtifact, shellRef, composerToolbarActions, allowedApprovalModes: allowedApprovalModesProp, composerVariant, mainModelFilter, compactComposerOverlays, autoSubmitSlashCommands, additionalSlashCommands, contextUsageAlwaysVisible, userMessageEditing, onUserMessageEditRequest, cycleModeOnTab, sessionSourceType, composerToolbarAdditionalActions, composerPlaceholders, compactThinking, hostOwnsEditDiffPreview, collapseCompletedTurns, markdownTableMode, virtualScrollThreshold, conversationSearchThreshold, markdown, loadingPhrases, onAgentTasksChange, onTranscriptChange, onSessionArtifactsChange, onToast, composerRef, onComposerReady, composerInput, composerInputVersion, onSessionChange, onAssistantTurnSettled, prepareSubmit, onSubmitBefore, restartSseOnPrompt, historyPageSize, initialSelectedWorkspaceCwd, lockedWorkspaceCwd, lockedWorkspaceCapability, }?: AppProps): import("react/jsx-runtime").JSX.Element;
466
+ export declare function App({ onRefreshModels, askUserFreeTextLabel, onSessionIdChange, onSessionInfoChange, onModelChange, onSessionCreated, managedAgentProvider, theme: providedTheme, onThemeChange, onThemeResolved, language: providedLanguage, onLanguageChange, onLanguageResolved, brand: providedBrand, onBrandResolved, className: externalClassName, style: externalStyle, shadowDom, onConnectionChange, onStreamingStateChange, onError, onBugReport, hiddenSlashCommands, slashCommandCategoryOrder, onSlashCommand, builtinAtProviders, atProviders, composerTagIcons, fileUploadEnabled, fileUploadDirectory, artifact, fileDropAction, renderToolHeaderExtra, renderWelcomeHeader, renderWelcomeFooter, mobileWelcomeFooterMiddle, parseUserMessageContent, renderUserMessageContent, renderComposerTag, renderComposerTagTooltip, onComposerTagClick, renderAssistantTurnFooter, assistantFeedback, getAssistantSourcesIcon, sourceReferences, renderComposerToolbarStart, renderComposerToolbarEnd, renderComposerToolbarRight, renderComposerHeader, renderComposerFooter, renderChatHeader, renderFooter, bottomStatusItems, chatMaxWidth, sidebar, settings: settingsPresentation, modelManagement, unavailableModels, mountUnavailableModelTooltip, header, rightPanel, showToolCalls, environmentPanel, splitSessionIds: externalSplitSessionIds, onSplitSessionIdsChange, renderPaneHeaderActions, onRightPanelOpen, onFileReviewOpen, onWorkspaceFileOpen, onPickWorkspaceDirectory, onInsightReportOpen, onContextUsageOpen, messageTurnOutputs, filterArtifact, shellRef, composerToolbarActions, allowedApprovalModes: allowedApprovalModesProp, composerVariant, mainModelFilter, compactComposerOverlays, autoSubmitSlashCommands, additionalSlashCommands, contextUsageAlwaysVisible, userMessageEditing, onUserMessageEditRequest, cycleModeOnTab, sessionSourceType, composerToolbarAdditionalActions, composerPlaceholders, compactThinking, hostOwnsEditDiffPreview, collapseCompletedTurns, markdownTableMode, virtualScrollThreshold, conversationSearchThreshold, markdown, loadingPhrases, onAgentTasksChange, onTranscriptChange, onSessionArtifactsChange, onToast, composerRef, onComposerReady, composerInput, composerInputVersion, onSessionChange, onAssistantTurnSettled, prepareSubmit, onSubmitBefore, restartSseOnPrompt, historyPageSize, initialSelectedWorkspaceCwd, lockedWorkspaceCwd, lockedWorkspaceCapability, }?: AppProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The Web Shell counterpart of the TUI project-hooks approval dialog: when
3
+ * the workspace's `.qwen/settings.json` declares hooks that have not been
4
+ * approved, they stay withheld and the shared ToolApproval card asks for an
5
+ * explicit decision, in the same slot and style as tool approvals.
6
+ * Deliberately not a session permission prompt — automation clients
7
+ * auto-answer those; a trust decision must be a user act.
8
+ */
9
+ export declare function ProjectHooksApprovalCard({ onActiveChange, }?: {
10
+ /** Reports whether the card owns the approval slot, so the host treats
11
+ * the composer as dormant exactly like a tool approval overlay. */
12
+ onActiveChange?: (active: boolean) => void;
13
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -4,6 +4,7 @@ import { type WebShellUrlNavigationOptions } from '../navigation';
4
4
  import { type WebShellLanguage } from '../i18n';
5
5
  import { type WebShellTheme } from '../themeContext';
6
6
  interface WorkspaceSessionProviderProps {
7
+ viewHidden?: boolean;
7
8
  urlNavigation?: WebShellUrlNavigationOptions;
8
9
  sessionId?: string;
9
10
  workspaceId?: string;
@@ -30,7 +30,7 @@ export interface ChannelGroupOverrideDraft {
30
30
  senders: '' | 'open' | 'allowlist';
31
31
  allowedUsers: string;
32
32
  }
33
- export type ChannelEditorValidationCode = 'required' | 'credential' | 'duplicate' | 'invalid' | 'invalidGroupId' | 'invalidOption' | 'invalidRepoId' | 'conflictingRepoAliases' | 'invalidGroupEntry' | 'number' | 'outOfRange' | 'policy';
33
+ export type ChannelEditorValidationCode = 'required' | 'credential' | 'duplicate' | 'invalid' | 'invalidGroupId' | 'invalidOption' | 'invalidRepoId' | 'conflictingRepoAliases' | 'invalidGroupEntry' | 'number' | 'outOfRange' | 'policy' | 'requiresBoundDelivery';
34
34
  export type ChannelEditorValidationErrors = Record<string, ChannelEditorValidationCode>;
35
35
  /** Access fields that only gate direct messages, which repository-only channels never receive. */
36
36
  export declare const PRIVATE_ONLY_FIELD_KEYS: Set<string>;
@@ -41,6 +41,14 @@ export declare const PRIVATE_ONLY_FIELD_KEYS: Set<string>;
41
41
  */
42
42
  export declare function repositoryAllowlistIds(value: string): string[];
43
43
  export declare function toList(value: string): string[];
44
+ /**
45
+ * The one record rule, shared by validation, the save path, and the editor's
46
+ * visibility/auto-open predicates: a JSON record holding at least one
47
+ * non-empty string value. Returns the filtered record so the save path and
48
+ * the boolean readers cannot drift apart.
49
+ */
50
+ export declare function parseRouteRecord(value: string): Record<string, string> | undefined;
51
+ export declare function recordHasRoute(value: string): boolean;
44
52
  export declare function hasDescriptorPrivatePolicy(descriptor: DaemonChannelTypeDescriptor): boolean;
45
53
  export declare function hasDescriptorGroupPolicy(descriptor: DaemonChannelTypeDescriptor): boolean;
46
54
  export declare function defaultGroupSenders(): Exclude<ChannelGroupSenders, ''>;
@@ -8,3 +8,29 @@ export declare const PLATFORM_MARKS: Record<string, string>;
8
8
  export declare function isSupportedChannelType(type: unknown): type is 'dingtalk' | 'dws' | 'wecom' | 'wecom-callback' | 'feishu' | 'github' | 'gitlab';
9
9
  export declare function isChannelPlatformAvailable(descriptor: DaemonChannelTypeDescriptor): boolean;
10
10
  export declare function isRepositoryOnlyChannelType(type: unknown): boolean;
11
+ export interface GithubEventRef {
12
+ repository?: string;
13
+ number?: number;
14
+ thread?: string;
15
+ }
16
+ /**
17
+ * The issue/PR number a journal event refers to: the explicit `number`
18
+ * field, else the one carried by `thread` (`pr:42` / `issue:42`). The shared
19
+ * inbound path journals without `number`, so display and URL must derive it
20
+ * the same way or they would name different destinations.
21
+ */
22
+ export declare function githubEventNumber(event: GithubEventRef): number | undefined;
23
+ /**
24
+ * Web URL for a GitHub channel journal event, or undefined when the event
25
+ * cannot be linked. The daemon emits the resolved web origin
26
+ * (`channelLinkMeta.webOrigin`, single owner: the channel package's
27
+ * resolveGithubWebOrigin); this client only concatenates it. The baseUrl
28
+ * derivation below is a compatibility fallback for daemons that predate the
29
+ * emitted origin (including the scope-local listing, which never carries
30
+ * one).
31
+ */
32
+ export declare function githubEventWebUrl(event: GithubEventRef, config: {
33
+ type?: unknown;
34
+ baseUrl?: unknown;
35
+ webOrigin?: unknown;
36
+ } | undefined): string | undefined;
@@ -1,7 +1,9 @@
1
1
  interface AuthMessageProps {
2
+ dialog?: boolean;
2
3
  allowAdd?: boolean;
3
4
  onMessage: (text: string, type?: 'status' | 'error') => void;
5
+ onModelActivated?: (modelId: string) => void;
4
6
  onClose: () => void;
5
7
  }
6
- export declare function AuthMessage({ onMessage, onClose, allowAdd, }: AuthMessageProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function AuthMessage({ onMessage, onModelActivated, onClose, allowAdd, dialog, }: AuthMessageProps): import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare function QwenSubscriptionEntry({ selected, onClick, onFocus, }: {
7
+ selected: boolean;
8
+ onClick: () => void;
9
+ onFocus: () => void;
10
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type CSSProperties } from 'react';
7
+ import { type WebShellLanguage } from '../../i18n';
8
+ import type { WebShellTheme } from '../../themeContext';
9
+ import { type SubscriptionTransport } from './use-subscription';
10
+ type FlowProps = {
11
+ dialog?: boolean;
12
+ desktopSuccess?: boolean;
13
+ transport: SubscriptionTransport;
14
+ onOpenExternal: (url: string) => void | Promise<void>;
15
+ onClose: () => void;
16
+ onSignedOut?: () => void;
17
+ onOtherProviders: () => void;
18
+ onActivate?: (signal: AbortSignal) => Promise<string | void>;
19
+ onActivated?: (message?: string) => void;
20
+ onModelsUnavailable?: () => void;
21
+ onAuthError?: (message: string) => void;
22
+ };
23
+ export declare function QwenSubscriptionFlow(props: FlowProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function QwenSubscriptionPanel({ language, theme, style, ...props }: FlowProps & {
25
+ language: WebShellLanguage;
26
+ theme?: WebShellTheme;
27
+ style?: CSSProperties;
28
+ }): import("react/jsx-runtime").JSX.Element;
29
+ export {};
@@ -0,0 +1,2 @@
1
+ import { type QwenSubscriptionStatusProps } from './QwenSubscriptionStatus';
2
+ export declare function QwenSubscriptionSidebarStatus(props: QwenSubscriptionStatusProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ export type QwenSubscriptionState = {
2
+ status: 'waiting';
3
+ authorizationUrl: string;
4
+ } | {
5
+ status: 'purchase-required';
6
+ email: string;
7
+ plan: string;
8
+ checking?: boolean;
9
+ canCheckAgain?: boolean;
10
+ message?: string;
11
+ } | {
12
+ status: 'ready';
13
+ email: string;
14
+ plan: string;
15
+ model?: string;
16
+ authorizationUrl?: string;
17
+ showCommonCommands?: boolean;
18
+ } | {
19
+ status: 'query-error';
20
+ message: string;
21
+ checking?: boolean;
22
+ } | {
23
+ status: 'error';
24
+ message: string;
25
+ retry?: 'authorization';
26
+ };
27
+ export interface QwenSubscriptionStatusProps {
28
+ state: QwenSubscriptionState;
29
+ onOpenAuthorization: (url: string) => void;
30
+ onOpenPurchase: () => void;
31
+ onRetry: () => void;
32
+ onSwitchProvider: () => void;
33
+ onUseAnotherAccount: () => void;
34
+ onCancel: () => void;
35
+ }
36
+ export declare function QwenSubscriptionStatus({ state, onOpenAuthorization, onOpenPurchase, onRetry, onSwitchProvider, onUseAnotherAccount, onCancel, }: QwenSubscriptionStatusProps): import("react/jsx-runtime").JSX.Element;
@@ -17,6 +17,15 @@ interface ToolApprovalProps {
17
17
  * it — it just never grabs focus on its own.
18
18
  */
19
19
  keyboardActive?: boolean;
20
+ /**
21
+ * Escape dismisses without recording a decision (the TUI approval dialog's
22
+ * defer semantics). Default false keeps the tool-approval behavior where
23
+ * Escape rejects the pending request. A persistent trust decision must
24
+ * not be recordable by a habitual Escape.
25
+ */
26
+ escapeDismisses?: boolean;
27
+ /** Called when Escape dismisses; only meaningful with escapeDismisses. */
28
+ onDismiss?: () => void;
20
29
  /**
21
30
  * Id of an extra description the caller renders beside this panel, added to
22
31
  * `aria-describedby`. The Managed approvals card states there that the tool
@@ -33,5 +42,5 @@ export declare function parseTitle(title?: string): {
33
42
  toolName: string;
34
43
  description: string;
35
44
  };
36
- export declare function ToolApproval({ request, onConfirm, variant, disabled, showBrowserNotifications, keyboardActive, extraDescriptionId, planTodos, planExecutionMode, generateContent, }: ToolApprovalProps): import("react/jsx-runtime").JSX.Element;
45
+ export declare function ToolApproval({ request, onConfirm, variant, disabled, showBrowserNotifications, keyboardActive, escapeDismisses, onDismiss, extraDescriptionId, planTodos, planExecutionMode, generateContent, }: ToolApprovalProps): import("react/jsx-runtime").JSX.Element;
37
46
  export {};
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonClient } from '@qwen-code/sdk/daemon';
7
+ import type { QwenSubscriptionState } from './QwenSubscriptionStatus';
8
+ export type SubscriptionTransport = Pick<DaemonClient, 'getSubscriptionConfig' | 'startSubscriptionLogin' | 'getSubscriptionLogin' | 'cancelSubscriptionLogin' | 'getSubscriptionUserInfo' | 'signOutSubscription'>;
9
+ export declare function useSubscription(transport: SubscriptionTransport, onOpenExternal: (url: string) => void | Promise<void>): {
10
+ state: QwenSubscriptionState;
11
+ authorizationUrl: string;
12
+ readySignal: AbortSignal | undefined;
13
+ working: boolean;
14
+ expire: (message?: string) => void;
15
+ retry: () => void;
16
+ signOut: () => Promise<boolean>;
17
+ switchAccount: () => Promise<void>;
18
+ cancel: () => void;
19
+ openAuthorization: (url: string) => void;
20
+ openPlans: () => void;
21
+ };
@@ -76,6 +76,8 @@ export interface WorkspaceHooksSummary {
76
76
  initialized: boolean;
77
77
  count: number;
78
78
  disabled: boolean;
79
+ /** Hooks the trust gate withholds (reason 'untrusted'); older daemons omit the reason. */
80
+ untrusted: number;
79
81
  }
80
82
  export declare function summarizeHooks(status: DaemonWorkspaceHooksStatus): WorkspaceHooksSummary;
81
83
  /**
@@ -0,0 +1,5 @@
1
+ import { Collapsible as CollapsiblePrimitive } from 'radix-ui';
2
+ declare const Collapsible: import("react").ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
3
+ declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
4
+ declare const CollapsibleContent: import("react").ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -3,7 +3,7 @@
3
3
  * Copyright 2026 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { type ConnectExistingInput, type JoinCoordinatorInput, type JoinToken } from './add-runtime-dialog';
6
+ import { type ConnectExistingInput, type JoinCoordinatorInput, type JoinToken, type RuntimeJoinOutcome } from './add-runtime-dialog';
7
7
  import { type AgentShare, type AgentShareSummary } from './share-agent-dialog';
8
8
  import { type AgentProgramView } from './agents-view-logic';
9
9
  import { type SquadsSectionProps } from './squads-section';
@@ -29,9 +29,9 @@ export interface AgentConfigPatch {
29
29
  };
30
30
  }
31
31
  export interface ThreadsPageProps {
32
- onConnectRemoteHost?: (input: ConnectExistingInput) => Promise<boolean>;
32
+ onConnectRemoteHost?: (input: ConnectExistingInput) => Promise<RuntimeJoinOutcome>;
33
33
  /** Joins this daemon to another coordinator as one of its runtimes. */
34
- onJoinCoordinator?: (input: JoinCoordinatorInput) => Promise<boolean>;
34
+ onJoinCoordinator?: (input: JoinCoordinatorInput) => Promise<RuntimeJoinOutcome>;
35
35
  agents: readonly WorkspaceAgentSummaryView[];
36
36
  runtimes?: readonly WorkspaceAgentRuntimeView[];
37
37
  view: AgentWorkspaceView;
@@ -62,6 +62,8 @@ export interface ThreadsPageProps {
62
62
  */
63
63
  squads?: Pick<SquadsSectionProps, 'squads' | 'onCreate' | 'onUpdate' | 'onRetire'>;
64
64
  pending?: boolean;
65
+ /** A join or remote connect from a runtime dialog is in flight. */
66
+ connecting?: boolean;
65
67
  }
66
68
  export interface WorkspaceAgentSummaryView {
67
69
  id: string;
@@ -119,4 +121,4 @@ export interface NewWorkspaceAgent {
119
121
  * Agents are addressed by @-mention in a chat session; this page only manages
120
122
  * who they are and where they run.
121
123
  */
122
- export declare function ThreadsPage({ agents, runtimes, view, onViewChange, onMentionAgent, onDeleteAgent, onSetAgentEnabled, onUpdateAgent, onOpenAgentBuilder, onOpenDefinitions, onCreateJoinToken, onRemoveRuntime, onConnectRemoteHost, onJoinCoordinator, hostServerUrl, shares, squads, pending, }: ThreadsPageProps): import("react/jsx-runtime").JSX.Element;
124
+ export declare function ThreadsPage({ agents, runtimes, view, onViewChange, onMentionAgent, onDeleteAgent, onSetAgentEnabled, onUpdateAgent, onOpenAgentBuilder, onOpenDefinitions, onCreateJoinToken, onRemoveRuntime, onConnectRemoteHost, onJoinCoordinator, hostServerUrl, shares, squads, pending, connecting, }: ThreadsPageProps): import("react/jsx-runtime").JSX.Element;
@@ -11,6 +11,8 @@ export interface RuntimeSummary {
11
11
  /** Program ids the runtime reported it can run. */
12
12
  programs?: readonly string[];
13
13
  status: 'online' | 'offline';
14
+ /** The workspace it serves, on its own machine. */
15
+ workspaceCwd?: string;
14
16
  }
15
17
  export interface JoinToken {
16
18
  token: string;
@@ -55,6 +57,32 @@ export declare function joinCommands(address: string, join: JoinToken): {
55
57
  npx: string;
56
58
  insecure: boolean;
57
59
  };
60
+ /**
61
+ * A join that went through, as the dialog sees it: whether the computer that
62
+ * joined saved the connection. A `saveError` means it will not reconnect
63
+ * after a restart or a workspace reload. `workspaceCwd`, from a remote
64
+ * connect: the workspace the remote answered from, which its runtime
65
+ * reports too. `false` is a connect that failed and was already reported
66
+ * elsewhere; a failed join throws instead.
67
+ */
68
+ export type RuntimeJoinOutcome = false | {
69
+ saveError?: string;
70
+ workspaceCwd?: string;
71
+ };
72
+ /**
73
+ * Reads a `hosts/connect` answer, which `hosts/remote-connect` passes on. An
74
+ * older daemon sends no `saved` field; it always claimed the save.
75
+ */
76
+ export declare function joinOutcome(answer: unknown): {
77
+ saveError?: string;
78
+ };
79
+ /**
80
+ * The dialog's "I have its address and token" callback over `run`, which
81
+ * reports a failure itself and resolves false for it.
82
+ */
83
+ export declare function connectExistingWith(run: (action: () => Promise<unknown>) => Promise<boolean>, connect: (input: ConnectExistingInput) => Promise<unknown>, onBusy?: (busy: boolean) => void): (input: ConnectExistingInput) => Promise<RuntimeJoinOutcome>;
84
+ /** The dialog's "Join a coordinator" callback; a failed join throws. */
85
+ export declare function joinCoordinatorWith(join: (input: JoinCoordinatorInput) => Promise<unknown>, onBusy?: (busy: boolean) => void): (input: JoinCoordinatorInput) => Promise<RuntimeJoinOutcome>;
58
86
  /**
59
87
  * "Add runtime": hand another machine a one-line command, then wait for it to
60
88
  * show up. The dialog notices the new runtime through the same roster poll
@@ -68,9 +96,9 @@ export declare function AddRuntimeDialog({ open, onOpenChange, serverUrl, runtim
68
96
  serverUrl: string;
69
97
  runtimes: readonly RuntimeSummary[];
70
98
  onCreateJoinToken: (supersedesHostId?: string) => Promise<JoinToken>;
71
- onConnectExisting?: (input: ConnectExistingInput) => Promise<boolean>;
99
+ onConnectExisting?: (input: ConnectExistingInput) => Promise<RuntimeJoinOutcome>;
72
100
  /** Joins THIS daemon to another coordinator; absent hides that entry. */
73
- onJoinCoordinator?: (input: JoinCoordinatorInput) => Promise<boolean>;
101
+ onJoinCoordinator?: (input: JoinCoordinatorInput) => Promise<RuntimeJoinOutcome>;
74
102
  onCreateAgentOn?: (runtimeId: string) => void;
75
103
  replacementTarget?: RuntimeSummary;
76
104
  }): import("react/jsx-runtime").JSX.Element;
@@ -18,6 +18,11 @@ export interface SquadsSectionProps {
18
18
  onRetire: (squadId: string) => void;
19
19
  /** Puts `@name ` into the chat composer; absent hides the button. */
20
20
  onMention?: (name: string) => void;
21
+ /**
22
+ * A join or remote connect from a runtime dialog is in flight: mentioning
23
+ * would leave the page, and drop its result.
24
+ */
25
+ connecting?: boolean;
21
26
  }
22
27
  /** No squads (or a daemon without squad routes). */
23
28
  export declare function SquadsEmpty(): import("react/jsx-runtime").JSX.Element;
@@ -25,4 +30,4 @@ export declare function SquadsEmpty(): import("react/jsx-runtime").JSX.Element;
25
30
  * The Agents page's Squads view: list, create, edit, retire. A squad is
26
31
  * addressed by `@name` in a chat, which wakes its leader (session-multi-agent design §11.5).
27
32
  */
28
- export declare function SquadsSection({ squads, agents, pending, creating, onCreatingChange, onCreate, onUpdate, onRetire, onMention, }: SquadsSectionProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function SquadsSection({ squads, agents, pending, creating, onCreatingChange, onCreate, onUpdate, onRetire, onMention, connecting, }: SquadsSectionProps): import("react/jsx-runtime").JSX.Element;
@@ -9,6 +9,7 @@ type Translate = ReturnType<typeof useI18n>['t'];
9
9
  */
10
10
  export declare function getLocalCommands(t: Translate, options?: {
11
11
  sideTaskAvailable?: boolean;
12
+ subscriptionAvailable?: boolean;
12
13
  }): CommandInfo[];
13
14
  /**
14
15
  * i18n key for a known skill's localized menu description, or undefined for a
@@ -399,7 +399,9 @@ export interface DaemonSessionActions {
399
399
  refreshModels(beforeRefresh?: (target: {
400
400
  workspaceCwd: string;
401
401
  sessionId?: string;
402
- }) => void | Promise<void>): Promise<void>;
402
+ }) => void | Promise<void>, options?: {
403
+ reloadProviders?: boolean;
404
+ }): Promise<void>;
403
405
  setWorkflowMode(requested: boolean): Promise<void>;
404
406
  setReasoningEffort(value: ReasoningSelection, opts?: {
405
407
  persist?: boolean;
@@ -3,7 +3,7 @@
3
3
  * Copyright 2025 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { type DaemonClient } from '@qwen-code/sdk/daemon';
6
+ import { DaemonClient } from '@qwen-code/sdk/daemon';
7
7
  import type { DaemonWorkspaceActions } from './types.js';
8
8
  export interface CreateDaemonWorkspaceActionsArgs {
9
9
  getClient: () => DaemonClient | undefined;
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { ReactNode } from 'react';
7
- import type { DaemonAgentMutationResult, DaemonAuthProviderId, DaemonAuthProviderCatalog, DaemonAuthProviderInstallRequest, DaemonAuthProviderInstallResult, DaemonAuthStatusSnapshot, DaemonCapabilities, DaemonChannelEvent, DaemonChannelEventsQuery, DaemonChannelEventsSnapshot, DaemonChannelMutationResult, DaemonChannelPairingApprovalResult, DaemonChannelPairingApprovalsSnapshot, DaemonChannelPairingRequestsSnapshot, DaemonChannelPairingRevocationRequest, DaemonChannelPairingRevocationResult, DaemonChannelsSnapshot, DaemonChannelStartupRequest, DaemonChannelTypeCatalog, DaemonChannelUpsertRequest, DaemonClient, DaemonCreateAgentRequest, DaemonGitCloneJob, DaemonWorkspaceGenerationEvent, DaemonGeneratedAgentContent, DaemonDeviceFlowStartResult, DaemonDeviceFlowState, ExtensionMutationResponse, ExtensionInteractionResponse, ExtensionInteractionResponseResult, ExtensionOperationStatus, ExtensionActiveOperations, ExtensionRefreshResponse, ExtensionScopeRequest, ExtensionInstallRequest, ExtensionArchiveInstallRequest, ExtensionInstallResponse, ExtensionUpdateCheckResponse, GoalControlRequest, GoalSnapshotV2, GoalStateResponse, DaemonInitWorkspaceResult, DaemonMcpRestartResult, DaemonMcpManageAction, DaemonMcpManageResult, DaemonRuntimeMcpAddRequest, DaemonRuntimeMcpAddResult, DaemonRuntimeMcpRemoveResult, DaemonUpdateAgentRequest, DaemonWorkspaceAgentDetail, DaemonWorkspaceAgentsStatus, DaemonWorkspaceAcpPreheatResult, DaemonWorkspaceEnvStatus, DaemonWorkspaceExtensionsStatus, DaemonWorkspaceExtensionSummaries, DaemonExtensionEntry, DaemonWorkspaceFile, DaemonWorkspaceFileBytes, DaemonWorkspaceFileEditRequest, DaemonWorkspaceFileEditResult, DaemonWorkspaceFileWriteRequest, DaemonWorkspaceFileWriteResult, DaemonWorkspaceMcpStatus, DaemonWorkspaceDirectories, DaemonWorkspaceDirectoriesMutation, DaemonWorkspaceMcpConfigStatus, DaemonMcpConfigMutationResult, DaemonMcpConfigScope, DaemonWorkspaceRuntimeStatus, DaemonWorkspaceMcpInitializeResult, DaemonWorkspaceMcpReloadResult, DaemonWorkspaceMcpToolsStatus, DaemonWorkspaceMcpResourcesStatus, DaemonWorkspaceMemoryStatus, DaemonWorkspaceCapability, DaemonWorkspaceRemovalResult, DaemonWorkspaceUpdate, DaemonWorkspacePreflightStatus, DaemonWorkspaceProvidersStatus, DaemonWorkspaceSkillsStatus, DaemonSkillToggleResult, DaemonSkillInstallRequest, DaemonSkillMutationResult, DaemonSkillScope, DaemonWorkspaceToolsStatus, DaemonBrand, DaemonWorkspaceSettingsStatus, DaemonSettingUpdateResult, DaemonModelDeleteRequest, DaemonModelDeleteResult, DaemonSessionGroup, DaemonSessionGroupCatalog, DaemonSessionGroupInput, DaemonSessionGroupUpdate, DaemonSessionListPage, DaemonSessionListPageOptions, DaemonSessionOrganizationResult, DaemonSessionOrganizationUpdate, DaemonSessionSummary, DaemonSessionExportFormat, DaemonSessionExportResult, DaemonStatusReport, DaemonStatusReportDetail, DaemonUsageDashboard, DaemonUsageRange, DaemonWriteMemoryRequest, DaemonWriteMemoryResult, DaemonRevisionRequest } from '@qwen-code/sdk/daemon';
7
+ import type { DaemonAgentMutationResult, DaemonAuthProviderId, DaemonAuthProviderCatalog, DaemonAuthProviderInstallRequest, DaemonAuthProviderInstallResult, DaemonAuthStatusSnapshot, DaemonSubscriptionActivation, DaemonCapabilities, DaemonChannelEvent, DaemonChannelEventsQuery, DaemonChannelEventsSnapshot, DaemonChannelMutationResult, DaemonChannelPairingApprovalResult, DaemonChannelPairingApprovalsSnapshot, DaemonChannelPairingRequestsSnapshot, DaemonChannelPairingRevocationRequest, DaemonChannelPairingRevocationResult, DaemonChannelsSnapshot, DaemonChannelStartupRequest, DaemonChannelTypeCatalog, DaemonChannelUpsertRequest, DaemonClient, DaemonCreateAgentRequest, DaemonGitCloneJob, DaemonWorkspaceGenerationEvent, DaemonGeneratedAgentContent, DaemonDeviceFlowStartResult, DaemonDeviceFlowState, ExtensionMutationResponse, ExtensionInteractionResponse, ExtensionInteractionResponseResult, ExtensionOperationStatus, ExtensionActiveOperations, ExtensionRefreshResponse, ExtensionScopeRequest, ExtensionInstallRequest, ExtensionArchiveInstallRequest, ExtensionInstallResponse, ExtensionUpdateCheckResponse, GoalControlRequest, GoalSnapshotV2, GoalStateResponse, DaemonInitWorkspaceResult, DaemonMcpRestartResult, DaemonMcpManageAction, DaemonMcpManageResult, DaemonRuntimeMcpAddRequest, DaemonRuntimeMcpAddResult, DaemonRuntimeMcpRemoveResult, DaemonUpdateAgentRequest, DaemonWorkspaceAgentDetail, DaemonWorkspaceAgentsStatus, DaemonWorkspaceAcpPreheatResult, DaemonWorkspaceEnvStatus, DaemonWorkspaceExtensionsStatus, DaemonWorkspaceExtensionSummaries, DaemonExtensionEntry, DaemonWorkspaceFile, DaemonWorkspaceFileBytes, DaemonWorkspaceFileEditRequest, DaemonWorkspaceFileEditResult, DaemonWorkspaceFileWriteRequest, DaemonWorkspaceFileWriteResult, DaemonWorkspaceMcpStatus, DaemonWorkspaceDirectories, DaemonWorkspaceDirectoriesMutation, DaemonWorkspaceMcpConfigStatus, DaemonMcpConfigMutationResult, DaemonMcpConfigScope, DaemonWorkspaceRuntimeStatus, DaemonWorkspaceMcpInitializeResult, DaemonWorkspaceMcpReloadResult, DaemonWorkspaceMcpToolsStatus, DaemonWorkspaceMcpResourcesStatus, DaemonWorkspaceMemoryStatus, DaemonWorkspaceCapability, DaemonWorkspaceRemovalResult, DaemonWorkspaceUpdate, DaemonWorkspacePreflightStatus, DaemonWorkspaceProvidersStatus, DaemonWorkspaceSkillsStatus, DaemonSkillToggleResult, DaemonSkillInstallRequest, DaemonSkillMutationResult, DaemonSkillScope, DaemonWorkspaceToolsStatus, DaemonBrand, DaemonWorkspaceSettingsStatus, DaemonSettingUpdateResult, DaemonModelDeleteRequest, DaemonModelDeleteResult, DaemonSessionGroup, DaemonSessionGroupCatalog, DaemonSessionGroupInput, DaemonSessionGroupUpdate, DaemonSessionListPage, DaemonSessionListPageOptions, DaemonSessionOrganizationResult, DaemonSessionOrganizationUpdate, DaemonSessionSummary, DaemonSessionExportFormat, DaemonSessionExportResult, DaemonStatusReport, DaemonStatusReportDetail, DaemonUsageDashboard, DaemonUsageRange, DaemonWriteMemoryRequest, DaemonWriteMemoryResult, DaemonRevisionRequest, SetUserLanguageResult } from '@qwen-code/sdk/daemon';
8
8
  export interface DaemonResourceOptions {
9
9
  autoLoad?: boolean;
10
10
  enabled?: boolean;
@@ -366,7 +366,11 @@ export type DaemonWorkspaceDirectoryPickerResult = {
366
366
  kind: 'workspace-directory-picker';
367
367
  selected: false;
368
368
  };
369
- export interface DaemonWorkspaceActions {
369
+ export interface DaemonWorkspaceActions extends Pick<DaemonClient, 'getSubscriptionConfig' | 'startSubscriptionLogin' | 'getSubscriptionLogin' | 'cancelSubscriptionLogin' | 'getSubscriptionUserInfo' | 'signOutSubscription'> {
370
+ activateSubscription(options?: {
371
+ signal?: AbortSignal;
372
+ }): Promise<DaemonSubscriptionActivation>;
373
+ setUiLanguage(language: string, scope: 'user' | 'workspace', workspaceCwd?: string): Promise<SetUserLanguageResult>;
370
374
  listSessions(options?: DaemonSessionListPageOptions): Promise<DaemonSessionSummary[]>;
371
375
  listSessionsPage(options?: DaemonSessionListPageOptions): Promise<DaemonSessionListPage>;
372
376
  listSessionGroups(workspaceCwd?: string): Promise<DaemonSessionGroupCatalog>;
@@ -0,0 +1,15 @@
1
+ import type { useI18n } from '../i18n';
2
+ interface Options {
3
+ t: ReturnType<typeof useI18n>['t'];
4
+ workspaceCwd?: string;
5
+ isBlocked: () => boolean;
6
+ onBlocked: () => boolean;
7
+ onNotice: (kind: 'info' | 'success' | 'warning', message: string) => void;
8
+ onError: (error: unknown, message: string) => void;
9
+ onCommand?: (text: string) => boolean;
10
+ }
11
+ export declare function useSubscriptionLogout(options: Options): {
12
+ available: boolean;
13
+ handleCommand: (text: string) => boolean | undefined;
14
+ };
15
+ export {};
@@ -14,6 +14,8 @@ export { ManagedAgentWebShell, type ManagedAgentWebShellProps, } from './Managed
14
14
  export type { ManagedArtifact, ManagedArtifactPage, ManagedArtifactResponse, ManagedArtifactSave, ManagedToolResult, ManagedToolResultReader, ManagedToolResultResponse, } from './components/managed/managed-tool-result-types';
15
15
  export { type ManagedAgentCommandOptions, type ManagedAgentPendingAction, type ManagedAgentProvider, type ManagedAgentRequestOptions, type ManagedAgentRuntimeState, type ManagedAgentSessionEvent, type ManagedAgentSessionEventType, type ManagedAgentSessionPhase, type ManagedAgentSessionSummary, type ManagedAgentSessionTranscript, type ManagedAgentTurnAdmission, type ManagedRuntimeNode, type ManagedWorkspaceDirectory, type ManagedWorkspaceCreateOperation, type ManagedWorkspaceRegistration, } from './components/managed/managed-agent-provider';
16
16
  export interface WebShellWithProvidersProps extends WebShellProps {
17
+ /** Unmount the chat view and its portals while keeping the daemon session attached. */
18
+ viewHidden?: boolean;
17
19
  /**
18
20
  * Opt in to URL routing. Explicit initial session target props override the
19
21
  * URL; later target prop changes replace it. Stop host history writes when
@@ -86,3 +88,4 @@ export type { WebShellUnavailableModel, WebShellUnavailableModelTooltipHandle, W
86
88
  export type { WebShellMessageNavigationRequest, WebShellMessageNavigationResult, } from './hooks/useMessageNavigation';
87
89
  export { highlightCode } from './components/messages/codeHighlighter';
88
90
  export type { CodeHighlightRequest } from './components/messages/codeHighlighter';
91
+ export { QwenSubscriptionPanel, QwenSubscriptionFlow, } from './components/messages/QwenSubscriptionPanel';