@qwen-code/web-shell 0.28.7 → 0.29.0

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 (71) hide show
  1. package/README.md +15 -2
  2. package/dist/{PierreFilePreview-mjl-NyoO.js → PierreFilePreview-DWbHmHOS.js} +1 -1
  3. package/dist/{SpreadsheetPreview-CLwpWAHt.js → SpreadsheetPreview-B08CpKHj.js} +2 -2
  4. package/dist/{WorkspaceFileBrowser-BUHjDcz5.js → WorkspaceFileBrowser-DzMtvhcc.js} +2 -2
  5. package/dist/{WorkspacePdfRangePreview-T1wFDszO.js → WorkspacePdfRangePreview-CAkjyk-W.js} +2 -2
  6. package/dist/{agents-route-Cko0LJBS.js → agents-route-CJd4n--m.js} +2 -2
  7. package/dist/daemon-react-sdk.js +1 -1
  8. package/dist/{i18n-ru-zX2HBIQv.js → i18n-ru-LoTd6Qm6.js} +36 -30
  9. package/dist/{i18n-zh-cn-CqjpUMZJ.js → i18n-zh-cn-69yYbjuK.js} +34 -18
  10. package/dist/{i18n-zh-tw-DyTerQIj.js → i18n-zh-tw-BaBS2zL1.js} +41 -6
  11. package/dist/{index-BO8CdGLJ.js → index-BkNSRmEr.js} +79426 -74596
  12. package/dist/index.js +3 -3
  13. package/dist/sw.js +1 -1
  14. package/dist/transcript.js +4825 -4770
  15. package/dist/types/App.d.ts +1 -1
  16. package/dist/types/chat-core/ChatSurface.d.ts +47 -3
  17. package/dist/types/components/ChatContextHeader.d.ts +11 -3
  18. package/dist/types/components/ChatEditor.d.ts +2 -0
  19. package/dist/types/components/ComposerTaskChips.d.ts +4 -0
  20. package/dist/types/components/ComposerUsageStats.d.ts +4 -4
  21. package/dist/types/components/LocalFilesControl.d.ts +2 -48
  22. package/dist/types/components/LocalFilesPanel.d.ts +52 -0
  23. package/dist/types/components/artifacts/ArtifactPanel.d.ts +19 -2
  24. package/dist/types/components/artifacts/TokenUsageTrend.d.ts +2 -11
  25. package/dist/types/components/artifacts/TurnOutputs.d.ts +9 -0
  26. package/dist/types/components/artifacts/artifact-mime.d.ts +10 -0
  27. package/dist/types/components/artifacts/artifactUtils.d.ts +2 -4
  28. package/dist/types/components/artifacts/tokenUsageTotals.d.ts +60 -11
  29. package/dist/types/components/artifacts/turnOutputSelectors.d.ts +6 -0
  30. package/dist/types/components/artifacts/useArtifactWorkspaceTarget.d.ts +1 -0
  31. package/dist/types/components/composer/composer-integrations.d.ts +14 -0
  32. package/dist/types/components/composer/daemon-composer-integrations.d.ts +7 -0
  33. package/dist/types/components/dialogs/ScheduledTasksDialog.d.ts +21 -1
  34. package/dist/types/components/dialogs/scheduledTasksSchedule.d.ts +8 -0
  35. package/dist/types/components/managed/ManagedDiagnosticsPanel.d.ts +3 -1
  36. package/dist/types/components/managed/chat-controller.d.ts +1 -0
  37. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +1 -1
  38. package/dist/types/components/managed/managed-usage-stats.d.ts +18 -0
  39. package/dist/types/components/managed/use-managed-actions.d.ts +6 -2
  40. package/dist/types/components/managed/use-managed-chat-controller.d.ts +32 -1
  41. package/dist/types/components/panels/EnvironmentPanel.d.ts +13 -1
  42. package/dist/types/components/sidebar/ArchivedSessionsPanel.d.ts +53 -0
  43. package/dist/types/components/sidebar/StandaloneRecents.d.ts +8 -1
  44. package/dist/types/components/sidebar/WebShellSidebar.d.ts +6 -1
  45. package/dist/types/components/sidebar/archived-session-sort.d.ts +14 -0
  46. package/dist/types/components/sidebar/archived-sessions-messages.d.ts +10 -0
  47. package/dist/types/components/sidebar/archived-sessions-messages.transcript-stub.d.ts +8 -0
  48. package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +3 -1
  49. package/dist/types/customization.d.ts +12 -2
  50. package/dist/types/daemon/availability-context.d.ts +2 -1
  51. package/dist/types/daemon/availability.d.ts +4 -3
  52. package/dist/types/daemon/permission-signals.d.ts +0 -12
  53. package/dist/types/daemon/remotePromptSidechannel.d.ts +1 -8
  54. package/dist/types/daemon/session/DaemonSessionProvider.d.ts +1 -0
  55. package/dist/types/daemon/session/httpErrors.d.ts +1 -0
  56. package/dist/types/daemon/session/types.d.ts +10 -5
  57. package/dist/types/daemon/timing.d.ts +1 -1
  58. package/dist/types/daemon/useDaemonChatController.d.ts +21 -1
  59. package/dist/types/daemon/workspace/hooks/useDaemonOverloadPause.d.ts +41 -0
  60. package/dist/types/daemon/workspace/types.d.ts +10 -3
  61. package/dist/types/hooks/useBackgroundTasks.d.ts +7 -2
  62. package/dist/types/hooks/useInputHistory.d.ts +3 -1
  63. package/dist/types/hooks/useSessionScheduledTasks.d.ts +97 -0
  64. package/dist/types/utils/action-timeout.d.ts +6 -0
  65. package/dist/types/utils/remote-prompt-sidechannel.d.ts +13 -0
  66. package/dist/types/utils/scheduledTaskManualRun.d.ts +29 -0
  67. package/dist/types/utils/service-availability.d.ts +20 -0
  68. package/dist/types/utils/shell-result-display.d.ts +26 -0
  69. package/dist/types/utils/taskActivity.d.ts +6 -0
  70. package/dist/{useDaemonMidTurnInjected-K7Sl7y1O.js → useDaemonMidTurnInjected-BItW6Ibf.js} +4705 -4489
  71. package/package.json +1 -1
@@ -5,7 +5,7 @@ import './styles/globals.css';
5
5
  import { type WebShellMessageNavigationRequest, type WebShellMessageNavigationResult } from './hooks/useMessageNavigation';
6
6
  import { type DaemonProductSessionContext, type DaemonStreamingState } from '@qwen-code/web-shell/daemon-react-sdk';
7
7
  import type { DaemonAgentTrace, DaemonSessionAgentTaskStatus, DaemonTranscriptBlock, DaemonSessionMonitorTaskStatus, DaemonSessionTaskWithWorkflowStatus, DaemonSessionSummary, DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
8
- import { type ComposerToolbarAction } from './components/ChatEditor';
8
+ import type { ComposerToolbarAction } from './components/ChatEditor';
9
9
  import { type ToastTone } from './components/ToastHost';
10
10
  import { type EnvironmentAgentTask } from './components/panels/EnvironmentPanel';
11
11
  import { type WebShellApprovalMode } from './utils/planMode';
@@ -3,16 +3,36 @@
3
3
  * Copyright 2026 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { type ReactNode } from 'react';
6
+ import { type ComponentProps, type CSSProperties, type ReactNode, type Ref } from 'react';
7
7
  import type { CommandInfo, TodoItem } from '../adapters/types.js';
8
+ import type { MessageListHandle } from '../components/MessageList.js';
9
+ import { type TranscriptViewportProps } from '../components/TranscriptViewport.js';
8
10
  import type { SessionContentGenerator } from '../components/messages/AssistantMessage.js';
9
- import { type ComposerToolbarAction } from '../components/ChatEditor.js';
11
+ import { type AskUserQuestionDraft } from '../components/messages/AskUserQuestion.js';
12
+ import { ChatEditor, type ComposerToolbarAction } from '../components/ChatEditor.js';
13
+ import type { EditorHandle } from '../hooks/useComposerCore.js';
10
14
  import type { SessionChatController } from './contract.js';
15
+ type SurfaceOwnedTranscriptKeys = 'ref' | 'messages' | 'pendingApproval' | 'approvalOverlayActive' | 'sessionViewportEnabled' | 'loadingTranscript' | 'sessionKey' | 'hasOlderHistory' | 'onLoadOlderHistory' | 'historyPaginationError' | 'loadingOlderHistory' | 'historyCapacityReached';
16
+ export type ChatSurfaceTranscriptProps = Omit<TranscriptViewportProps, SurfaceOwnedTranscriptKeys>;
17
+ type ChatEditorComponentProps = ComponentProps<typeof ChatEditor>;
18
+ type SurfaceOwnedComposerKeys = 'ref' | 'commands' | 'atWorkspaceCwd' | 'composerScopeKey' | 'workspaceFeaturesEnabled' | 'visibleToolbarActions' | 'submitDisabled' | 'onCancel' | 'onSubmit';
19
+ export type ChatSurfaceComposerProps = Omit<ChatEditorComponentProps, SurfaceOwnedComposerKeys>;
11
20
  export interface ChatSurfaceProps {
12
21
  readonly controller: SessionChatController;
22
+ readonly className?: string;
13
23
  readonly header?: ReactNode;
14
24
  readonly panels?: ReactNode;
25
+ readonly footerRef?: Ref<HTMLDivElement>;
26
+ readonly footerStyle?: CSSProperties;
27
+ readonly footerClassName?: string;
28
+ readonly footerHeader?: ReactNode;
29
+ readonly footerTrailing?: ReactNode;
30
+ readonly transcriptContent?: ReactNode;
31
+ readonly transcriptClassName?: string;
32
+ readonly transcriptRef?: Ref<MessageListHandle>;
33
+ readonly transcriptProps?: ChatSurfaceTranscriptProps;
15
34
  readonly composerStatus?: ReactNode;
35
+ readonly composerFooter?: ReactNode;
16
36
  readonly transcriptError?: ReactNode;
17
37
  readonly commands?: readonly CommandInfo[];
18
38
  readonly onError?: (error: unknown, fallback: string) => void;
@@ -23,17 +43,40 @@ export interface ChatSurfaceProps {
23
43
  readonly historyPaginationError?: boolean;
24
44
  readonly loadingOlderHistory?: boolean;
25
45
  readonly historyCapacityReached?: boolean;
46
+ readonly decisionClassName?: string;
47
+ readonly decisionTestId?: string;
48
+ readonly decisionRef?: Ref<HTMLDivElement>;
49
+ readonly decisionHeader?: ReactNode;
50
+ readonly decisionFooter?: ReactNode;
51
+ readonly approvalKey?: string;
52
+ readonly approvalExtraDescriptionId?: string;
26
53
  readonly planTodos?: readonly TodoItem[];
27
54
  readonly planExecutionMode?: string;
28
55
  readonly approvalDisabled?: boolean;
29
56
  readonly approvalKeyboardActive?: boolean;
57
+ readonly questionKeyboardActive?: boolean;
30
58
  readonly showBrowserNotifications?: boolean;
31
59
  readonly generateContent?: SessionContentGenerator;
60
+ readonly questionKey?: string;
32
61
  readonly askUserFreeTextLabel?: string;
33
62
  readonly askUserDetails?: () => void;
63
+ readonly askUserInitialDraft?: AskUserQuestionDraft;
64
+ readonly askUserOnDraftChange?: (draft: AskUserQuestionDraft) => void;
65
+ readonly askUserSubmitDisabled?: boolean;
66
+ readonly hideComposerWhenCardActive?: boolean;
34
67
  readonly atWorkspaceCwd?: string;
35
68
  readonly composerScopeKey?: string;
36
69
  readonly composerSubmitBlocked?: boolean;
70
+ readonly composerClassName?: string;
71
+ readonly composerVisible?: boolean;
72
+ readonly composerEditorVisible?: boolean;
73
+ readonly composerKey?: string;
74
+ readonly composerRef?: Ref<EditorHandle>;
75
+ readonly composerContainerRef?: Ref<HTMLDivElement>;
76
+ readonly composerCancelEnabled?: boolean;
77
+ readonly onComposerCancel?: () => void;
78
+ readonly onComposerSubmit?: ChatEditorComponentProps['onSubmit'];
79
+ readonly composerProps?: ChatSurfaceComposerProps;
37
80
  readonly sessionViewportEnabled?: boolean;
38
81
  readonly workspaceFeaturesEnabled?: boolean;
39
82
  readonly visibleToolbarActions?: readonly ComposerToolbarAction[];
@@ -46,4 +89,5 @@ export interface ChatSurfaceProps {
46
89
  * establishment — the composer defers its draft commit to admission, while turn
47
90
  * and decision outcomes are reflected through the controller's observable state.
48
91
  */
49
- export declare function ChatSurface({ controller, header, panels, composerStatus, transcriptError, commands, onError, hasOlderHistory, onLoadOlderHistory, historyPaginationError, loadingOlderHistory, historyCapacityReached, planTodos, planExecutionMode, approvalDisabled, approvalKeyboardActive, showBrowserNotifications, generateContent, askUserFreeTextLabel, askUserDetails, atWorkspaceCwd, composerScopeKey, composerSubmitBlocked, sessionViewportEnabled, workspaceFeaturesEnabled, visibleToolbarActions, }: ChatSurfaceProps): import("react/jsx-runtime").JSX.Element;
92
+ export declare function ChatSurface({ controller, className, header, panels, footerRef, footerStyle, footerClassName, footerHeader, footerTrailing, transcriptContent, transcriptClassName, transcriptRef, transcriptProps, composerStatus, composerFooter, transcriptError, commands, onError, hasOlderHistory, onLoadOlderHistory, historyPaginationError, loadingOlderHistory, historyCapacityReached, decisionClassName, decisionTestId, decisionRef, decisionHeader, decisionFooter, approvalKey, approvalExtraDescriptionId, planTodos, planExecutionMode, approvalDisabled, approvalKeyboardActive, questionKeyboardActive, showBrowserNotifications, generateContent, questionKey, askUserFreeTextLabel, askUserDetails, askUserInitialDraft, askUserOnDraftChange, askUserSubmitDisabled, hideComposerWhenCardActive, atWorkspaceCwd, composerScopeKey, composerSubmitBlocked, composerClassName, composerVisible, composerEditorVisible, composerKey, composerRef, composerContainerRef, composerCancelEnabled, onComposerCancel, onComposerSubmit, composerProps, sessionViewportEnabled, workspaceFeaturesEnabled, visibleToolbarActions, }: ChatSurfaceProps): import("react/jsx-runtime").JSX.Element;
93
+ export {};
@@ -41,8 +41,16 @@ interface ChatContextHeaderProps {
41
41
  * case, not for unrelated open tabs.
42
42
  */
43
43
  artifactsTabActive?: boolean;
44
- /** Shows the Local Control QR entry; hidden when omitted. */
45
- onOpenLocalControlSettings?: () => void;
44
+ /** Session scheduled task count (durable bound + session-scoped); shown when > 0. */
45
+ scheduledTaskCount?: number;
46
+ /** Count of enabled/active scheduled tasks in this session. */
47
+ scheduledTaskActiveCount?: number;
48
+ /** Earliest next fire timestamp (epoch ms) among active tasks. */
49
+ scheduledTaskNextRunAt?: number | null;
50
+ /** Opens the environment panel's scheduled-tasks section; hidden when omitted. */
51
+ onOpenScheduledTasks?: () => void;
52
+ /** Renders an optional leading action button ahead of header actions. */
53
+ renderLeadingAction?: (actionClassName: string) => ReactNode;
46
54
  }
47
- export declare function ChatContextHeader({ content, location, workspaceName, workspacePath, hideWorkspaceIcon, environmentOpen, environmentAvailable, environmentRunning, rightPanelOpen, rightPanelAvailable, onToggleEnvironment, onToggleRightPanel, onOpenFiles, onOpenTokenUsage, onOpenContextUsage, artifactCount, onOpenArtifacts, artifactsTabActive, onOpenLocalControlSettings, }: ChatContextHeaderProps): import("react/jsx-runtime").JSX.Element;
55
+ export declare function ChatContextHeader({ content, location, workspaceName, workspacePath, hideWorkspaceIcon, environmentOpen, environmentAvailable, environmentRunning, rightPanelOpen, rightPanelAvailable, onToggleEnvironment, onToggleRightPanel, onOpenFiles, onOpenTokenUsage, onOpenContextUsage, artifactCount, onOpenArtifacts, artifactsTabActive, scheduledTaskCount, scheduledTaskActiveCount, scheduledTaskNextRunAt, onOpenScheduledTasks, renderLeadingAction, }: ChatContextHeaderProps): import("react/jsx-runtime").JSX.Element;
48
56
  export {};
@@ -16,6 +16,7 @@ import type { ContextCompressionControls } from '../hooks/useContextUsageControl
16
16
  import type { WebShellUnavailableModel, WebShellUnavailableModelTooltipMount } from '../unavailableModels';
17
17
  import type { VoiceStatusRevision, VoiceWorkspaceTarget } from '../voice/voice-workspace-target';
18
18
  import { type SessionGitIntent } from './GitModePopover';
19
+ import type { ComposerIntegrations } from './composer/composer-integrations';
19
20
  import { type WorkspaceSelectorOption } from './WorkspaceSelector';
20
21
  export type ComposerToolbarAction = 'approvalMode' | 'plan' | 'workflowMode' | 'contextUsage' | 'gitBranch' | 'model' | 'commands' | 'files' | 'widthMode' | 'voice' | 'workspace' | 'addMenu';
21
22
  interface ChatEditorProps {
@@ -172,6 +173,7 @@ interface ChatEditorProps {
172
173
  composerTagIcons?: WebShellComposerTagIconMap;
173
174
  voiceTarget?: VoiceWorkspaceTarget;
174
175
  voiceStatusRevision?: VoiceStatusRevision;
176
+ composerIntegrations?: ComposerIntegrations;
175
177
  onImageIngestionNotice?: (tone: 'warning' | 'error', message: string) => void;
176
178
  /** Click a pasted image in the composer to preview it in the right panel. */
177
179
  onImagePreview?: (src: string, alt?: string) => void;
@@ -16,6 +16,10 @@ export interface ComposerTaskChipsProps {
16
16
  onExplainTask?: (task: DaemonSessionTaskWithWorkflowStatus) => void;
17
17
  /** Hand focus back to the composer, optionally with a typed character. */
18
18
  onReturnToInput?: (text?: string) => void;
19
+ /** Count of active in-memory session-scoped cron jobs and pending wakeups. */
20
+ activeScheduledCount?: number;
21
+ /** Opens the environment panel's scheduled-tasks section. */
22
+ onOpenScheduledTasks?: () => void;
19
23
  }
20
24
  /**
21
25
  * Chips above the composer for this session's unfinished background work —
@@ -3,11 +3,11 @@
3
3
  * Copyright 2026 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { DaemonSessionStatsStatus } from '@qwen-code/web-shell/daemon-react-sdk';
6
+ import { type SessionUsageStatsSnapshot } from './artifacts/tokenUsageTotals';
7
7
  interface ComposerUsageStatsProps {
8
8
  sessionId?: string;
9
- /** Reads `GET /session/:id/stats` without raising a user-facing notice. */
10
- loadStats?: (sessionId: string) => Promise<DaemonSessionStatsStatus>;
9
+ /** Reads session statistics without raising a user-facing notice. */
10
+ loadStats?: (sessionId: string, signal?: AbortSignal) => Promise<SessionUsageStatsSnapshot>;
11
11
  /**
12
12
  * Changes whenever the session may hold new usage, such as the context
13
13
  * token count after a model response.
@@ -15,7 +15,7 @@ interface ComposerUsageStatsProps {
15
15
  refreshSignal?: unknown;
16
16
  /** The session is working; usage is read on a slow poll meanwhile. */
17
17
  running: boolean;
18
- /** Opens the full token usage panel. */
18
+ /** Opens the full token usage or diagnostics statistics panel. */
19
19
  onOpen?: () => void;
20
20
  }
21
21
  /**
@@ -5,57 +5,12 @@
5
5
  */
6
6
  import type { DaemonCapabilities, DaemonClient, DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
7
7
  import type { AcpWorkspaceSelector } from '../local-files/bridge-client';
8
- import { type LocalFilesStatus } from '../local-files/useLocalFilesBridge';
9
- /** Concrete command that enables the reverse channel on the daemon. */
10
- export declare const LOCAL_FILES_DAEMON_COMMAND = "QWEN_SERVE_CLIENT_MCP_OVER_WS=1 qwen serve";
11
- /**
12
- * The startup command in the user's shell syntax: the POSIX env-prefix form
13
- * is not parseable by PowerShell, so on Windows the affordance must copy the
14
- * `$env:` form or the one action the blocker offers cannot enable the feature.
15
- * The variable name is the literal run-qwen-serve.ts reads.
16
- */
17
- export declare function deriveLocalFilesDaemonCommand(platform: string | undefined): string;
18
- /**
19
- * Trigger dot color per phase. `null` means no dot. Failed and needs-gesture
20
- * get distinct colors so a broken or re-authorization-pending bridge is not
21
- * invisible the way a plain busy dot made it. `held-elsewhere` stays muted
22
- * (not primary): the bridge is live but owned by another tab, so this tab must
23
- * not read the dot as "I have a working bridge here". The warning states use
24
- * the theme-aware `--warning-color` token (App.module.css) rather than a fixed
25
- * palette color, so the dot keeps contrast in the light theme too.
26
- */
27
- export declare function getLocalFilesDotClass(status: LocalFilesStatus): string | null;
28
- /** Tooltip naming the state (and directory) instead of the static label. */
29
- export declare function getLocalFilesTooltip(status: LocalFilesStatus, t: (key: string) => string): string;
8
+ import { LOCAL_FILES_DAEMON_COMMAND, LocalFilesPanel, deriveLocalFilesDaemonCommand, getLocalFilesDotClass, getLocalFilesTooltip, type LocalFilesPanelProps } from './LocalFilesPanel';
9
+ export { LOCAL_FILES_DAEMON_COMMAND, LocalFilesPanel, deriveLocalFilesDaemonCommand, getLocalFilesDotClass, getLocalFilesTooltip, type LocalFilesPanelProps, };
30
10
  /** Derive the SSH tunnel command for the insecure-context blocker. */
31
11
  export declare function deriveLocalFilesTunnelCommand(baseUrl: string): string | undefined;
32
12
  /** The local port the copied tunnel binds — the address the user must open. */
33
13
  export declare function deriveLocalFilesTunnelLocalPort(baseUrl: string): number | undefined;
34
- export interface LocalFilesPanelProps {
35
- status: LocalFilesStatus;
36
- onConnect: () => void;
37
- onDisconnect: () => void;
38
- onOpenInNewTab: () => void;
39
- /** Offered only while connected; re-opens the picker for a new grant. */
40
- onChangeDirectory?: () => void;
41
- /** Bound session title, shown while connected when known. */
42
- sessionName?: string;
43
- /** Offered in needs-session when the host can create a session. */
44
- onNewSession?: () => void;
45
- /** Copies a concrete fix command; absent hosts render no copy buttons. */
46
- onCopyCommand?: (command: string) => void;
47
- /** SSH tunnel command for the insecure-context blocker, when derivable. */
48
- tunnelCommand?: string;
49
- /** Local port the tunnel binds; the blocker copy names the address to open. */
50
- tunnelLocalPort?: number;
51
- /** Daemon startup command in the user's shell syntax; defaults to POSIX. */
52
- daemonCommand?: string;
53
- }
54
- /**
55
- * The popover body, kept prop-driven and free of hooks/portals so the phase →
56
- * affordance mapping is testable without a Radix portal or a daemon provider.
57
- */
58
- export declare function LocalFilesPanel({ status, onConnect, onDisconnect, onOpenInNewTab, onChangeDirectory, sessionName, onNewSession, onCopyCommand, tunnelCommand, tunnelLocalPort, daemonCommand, }: LocalFilesPanelProps): import("react/jsx-runtime").JSX.Element;
59
14
  interface LocalFilesControlProps {
60
15
  /**
61
16
  * Class for the trigger button. Required, and supplied by the host surface
@@ -112,4 +67,3 @@ export declare function createLocalFilesRewarm(options: {
112
67
  preheat: () => Promise<unknown>;
113
68
  }): () => Promise<void>;
114
69
  export declare function LocalFilesControl({ triggerClassName, portalContainer, workspaces, }: LocalFilesControlProps): import("react/jsx-runtime").JSX.Element | null;
115
- export {};
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { LocalFilesStatus } from '../local-files/useLocalFilesBridge';
7
+ /** Concrete command that enables the reverse channel on the daemon. */
8
+ export declare const LOCAL_FILES_DAEMON_COMMAND = "QWEN_SERVE_CLIENT_MCP_OVER_WS=1 qwen serve";
9
+ /**
10
+ * The startup command in the user's shell syntax: the POSIX env-prefix form
11
+ * is not parseable by PowerShell, so on Windows the affordance must copy the
12
+ * `$env:` form or the one action the blocker offers cannot enable the feature.
13
+ * The variable name is the literal run-qwen-serve.ts reads.
14
+ */
15
+ export declare function deriveLocalFilesDaemonCommand(platform: string | undefined): string;
16
+ /**
17
+ * Trigger dot color per phase. `null` means no dot. Failed and needs-gesture
18
+ * get distinct colors so a broken or re-authorization-pending bridge is not
19
+ * invisible the way a plain busy dot made it. `held-elsewhere` stays muted
20
+ * (not primary): the bridge is live but owned by another tab, so this tab must
21
+ * not read the dot as "I have a working bridge here". The warning states use
22
+ * the theme-aware `--warning-color` token (App.module.css) rather than a fixed
23
+ * palette color, so the dot keeps contrast in the light theme too.
24
+ */
25
+ export declare function getLocalFilesDotClass(status: LocalFilesStatus): string | null;
26
+ /** Tooltip naming the state (and directory) instead of the static label. */
27
+ export declare function getLocalFilesTooltip(status: LocalFilesStatus, t: (key: string) => string): string;
28
+ export interface LocalFilesPanelProps {
29
+ status: LocalFilesStatus;
30
+ onConnect: () => void;
31
+ onDisconnect: () => void;
32
+ onOpenInNewTab: () => void;
33
+ /** Offered only while connected; re-opens the picker for a new grant. */
34
+ onChangeDirectory?: () => void;
35
+ /** Bound session title, shown while connected when known. */
36
+ sessionName?: string;
37
+ /** Offered in needs-session when the host can create a session. */
38
+ onNewSession?: () => void;
39
+ /** Copies a concrete fix command; absent hosts render no copy buttons. */
40
+ onCopyCommand?: (command: string) => void;
41
+ /** SSH tunnel command for the insecure-context blocker, when derivable. */
42
+ tunnelCommand?: string;
43
+ /** Local port the tunnel binds; the blocker copy names the address to open. */
44
+ tunnelLocalPort?: number;
45
+ /** Daemon startup command in the user's shell syntax; defaults to POSIX. */
46
+ daemonCommand?: string;
47
+ }
48
+ /**
49
+ * The popover body, kept prop-driven and free of hooks/portals so the phase →
50
+ * affordance mapping is testable without a Radix portal or a daemon provider.
51
+ */
52
+ export declare function LocalFilesPanel({ status, onConnect, onDisconnect, onOpenInNewTab, onChangeDirectory, sessionName, onNewSession, onCopyCommand, tunnelCommand, tunnelLocalPort, daemonCommand, }: LocalFilesPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
- import type { DaemonSessionArtifact, SessionSource, DaemonSessionMonitorTaskStatus, DaemonSessionShellTaskStatus, DaemonSessionTaskStatus, DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
1
+ import type { DaemonSessionArtifact, DaemonSessionScheduledTaskStatus, SessionSource, DaemonSessionMonitorTaskStatus, DaemonSessionShellTaskStatus, DaemonSessionTaskStatus, DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
2
2
  import type { ACPToolCall, TodoItem } from '../../adapters/types';
3
3
  import type { WebShellRightPanelItem } from '../../customization';
4
4
  import { type DaemonContextMemoryDetail, type DaemonSessionOwnerSnapshot, type DaemonSessionActions } from '@qwen-code/web-shell/daemon-react-sdk';
5
+ import { type SessionDurableScheduledTask } from '../../hooks/useSessionScheduledTasks';
5
6
  import { type TurnOutputFileChange, type TurnOutputOpenRequest, type TurnOutputScheduledTask } from './TurnOutputs';
6
7
  import type { EnvironmentAgentTask } from '../panels/EnvironmentPanel';
7
8
  import type { WebShellModelManagementOptions } from '../../modelManagement';
@@ -273,6 +274,8 @@ interface ArtifactPanelProps {
273
274
  sideTasks?: readonly SideTaskListItem[];
274
275
  archivedSideTasks?: readonly SideTaskListItem[];
275
276
  sideTasksLoading?: boolean;
277
+ /** Disables New side task controls while daemon load admission is paused. */
278
+ overloadPaused?: boolean;
276
279
  onCreateSideTask?: () => void;
277
280
  onOpenSideTask?: (sideTask: SideTaskListItem) => void;
278
281
  onArchiveSideTasks?: (sideTasks: readonly SideTaskListItem[]) => void | Promise<void>;
@@ -323,13 +326,27 @@ interface ArtifactPanelProps {
323
326
  canvasMode?: boolean;
324
327
  };
325
328
  onImageIngestionNotice?: (tone: 'warning' | 'error', message: string) => void;
329
+ liveSessionScheduledTasks?: ReadonlyMap<string, DaemonSessionScheduledTaskStatus>;
330
+ /** Owner of the live snapshot; other sessions must not borrow it. */
331
+ liveSessionScheduledTasksOwnerSessionId?: string;
332
+ liveDurableScheduledTasks?: readonly SessionDurableScheduledTask[];
333
+ /** Workspace covered by `hasLiveDurableScheduledSnapshot` (`null` = primary). */
334
+ liveDurableScheduledTasksWorkspaceId?: string | null;
335
+ confirmedDeletedDurableTaskKeys?: ReadonlySet<string>;
336
+ confirmedCancelledSessionTaskIds?: ReadonlySet<string>;
337
+ hasLiveDurableScheduledSnapshot?: boolean;
338
+ hasLiveSessionScheduledSnapshot?: boolean;
339
+ onCancelSessionScheduledTask?: (taskId: string, source?: 'cron' | 'wakeup') => Promise<boolean>;
340
+ onSessionScheduledTaskStopped?: (taskId: string, sourceSessionId?: string, source?: 'cron' | 'wakeup') => void;
341
+ onDurableScheduledTaskDeleted?: (id: string, workspaceId: string | undefined, sourceSessionId: string | undefined) => void;
342
+ onScheduledTasksMutated?: () => void;
326
343
  deferSubagentMount?: boolean;
327
344
  onClose: () => void;
328
345
  variant?: 'docked' | 'drawer';
329
346
  fullscreen?: boolean;
330
347
  onToggleFullscreen?: () => void;
331
348
  }
332
- export declare function ArtifactPanel({ contextUsageControls, artifacts, sessionArtifacts, onOpenArtifact, tabs, activeTabId, reviewChanges, selectedReviewPath, panelWidth, workspaceCwd, loading, restoring, error, onSelectTab, onSelectTurnCallsPrompt, onCloseTab, onOpenFilePreview, onOpenMemoryFile, latestReviewAvailable, onOpenLatestReview, changeOverviewAvailable, onOpenChangeOverview, onOpenTerminal, onOpenTrajectory, trajectoryTabId, onOpenFiles, onReferenceFile, onOpenWebPreview, onWebPreviewChange, items, sideTaskAvailable, sideTasks, archivedSideTasks, sideTasksLoading, onCreateSideTask, onOpenSideTask, onArchiveSideTasks, onUnarchiveSideTasks, onSideTaskMenuOpen, onCreateSideTaskSession, onSideTaskCreated, onSideTaskTitleChange, onSideTaskInitialPromptRefused, onNestedRightPanelOpen, onNestedArtifactsChange, onOpenNestedSubagent, agentTasks, explainTask, onExplainTask, taskExplanation, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onError, sessionWorkflowEnabled, modelManagement, unavailableModels, mountUnavailableModelTooltip, workflow, onImageIngestionNotice, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
349
+ export declare function ArtifactPanel({ contextUsageControls, artifacts, sessionArtifacts, onOpenArtifact, tabs, activeTabId, reviewChanges, selectedReviewPath, panelWidth, workspaceCwd, loading, restoring, error, onSelectTab, onSelectTurnCallsPrompt, onCloseTab, onOpenFilePreview, onOpenMemoryFile, latestReviewAvailable, onOpenLatestReview, changeOverviewAvailable, onOpenChangeOverview, onOpenTerminal, onOpenTrajectory, trajectoryTabId, onOpenFiles, onReferenceFile, onOpenWebPreview, onWebPreviewChange, items, sideTaskAvailable, sideTasks, archivedSideTasks, sideTasksLoading, overloadPaused, onCreateSideTask, onOpenSideTask, onArchiveSideTasks, onUnarchiveSideTasks, onSideTaskMenuOpen, onCreateSideTaskSession, onSideTaskCreated, onSideTaskTitleChange, onSideTaskInitialPromptRefused, onNestedRightPanelOpen, onNestedArtifactsChange, onOpenNestedSubagent, agentTasks, explainTask, onExplainTask, taskExplanation, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onError, sessionWorkflowEnabled, modelManagement, unavailableModels, mountUnavailableModelTooltip, workflow, onImageIngestionNotice, liveSessionScheduledTasks, liveSessionScheduledTasksOwnerSessionId, liveDurableScheduledTasks, liveDurableScheduledTasksWorkspaceId, confirmedDeletedDurableTaskKeys, confirmedCancelledSessionTaskIds, hasLiveDurableScheduledSnapshot, hasLiveSessionScheduledSnapshot, onCancelSessionScheduledTask, onSessionScheduledTaskStopped, onDurableScheduledTaskDeleted, onScheduledTasksMutated, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
333
350
  export declare function ArtifactDetail({ artifact, sourceSessionId, workspaceActions, previewContent, onSnapshotSessionNotFound, }: {
334
351
  artifact: DaemonSessionArtifact;
335
352
  sourceSessionId?: string;
@@ -4,6 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { DaemonSessionStatsModelMetrics } from '@qwen-code/web-shell/daemon-react-sdk';
7
+ import { isLegacySpeed, tokensPerSecond } from './tokenUsageTotals';
8
+ export { isLegacySpeed, tokensPerSecond };
7
9
  type TimingSample = NonNullable<DaemonSessionStatsModelMetrics['timingSamples']>[number];
8
10
  type FailureSample = NonNullable<DaemonSessionStatsModelMetrics['failures']>['recent'][number];
9
11
  export interface TrendSeries {
@@ -17,16 +19,6 @@ export interface TrendSeries {
17
19
  failures: FailureSample[];
18
20
  }
19
21
  export type TrendMetric = 'speed' | 'ttft';
20
- /**
21
- * Whether these totals come from a daemon before full-request output speed.
22
- * Its sums and samples only support the rate over the generation window.
23
- */
24
- export declare function isLegacySpeed(generation: DaemonSessionStatsModelMetrics['generation']): boolean;
25
- /**
26
- * Output tokens per second over `durationMs`; undefined without output tokens
27
- * (no usage reported) or time.
28
- */
29
- export declare function tokensPerSecond(outputTokens: number, durationMs: number): number | undefined;
30
22
  /**
31
23
  * Output tokens per second over the time from sending the request to its last
32
24
  * visible output, TTFT included. From an older daemon, over the generation
@@ -44,4 +36,3 @@ export declare function SpeedSpread({ samples, legacy, scaleMax, }: {
44
36
  legacy: boolean;
45
37
  scaleMax: number;
46
38
  }): import("react/jsx-runtime").JSX.Element | null;
47
- export {};
@@ -23,8 +23,17 @@ export interface TurnOutputScheduledTask {
23
23
  prompt: string;
24
24
  recurring: boolean;
25
25
  durable: boolean;
26
+ /**
27
+ * True when created via `cron_create(durable: true)` with default unbound
28
+ * `sessionMode` (not `'current'`). `qwen serve`'s keepalive adopts such
29
+ * tasks into their own dedicated `scheduled_task` session shortly after
30
+ * creation, so their runtime `sessionId` differs from the creating chat's
31
+ * `sourceSessionId`.
32
+ */
33
+ unboundCreation?: boolean;
26
34
  workspaceId?: string;
27
35
  display?: string;
36
+ liveStatus?: 'active' | 'paused';
28
37
  }
29
38
  export type TurnOutputKind = 'file' | 'artifact' | 'scheduled_task';
30
39
  export declare const TURN_OUTPUT_KINDS: readonly TurnOutputKind[];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare const AUDIO_EXTENSIONS: Set<string>;
7
+ export declare function workspaceFileExtension(workspacePath?: string): string;
8
+ export declare function pathExtension(workspacePath?: string): string;
9
+ export declare function normalizeArtifactMimeType(mimeType?: string): string;
10
+ export declare function isAudioArtifact(workspacePath?: string, mimeType?: string): boolean;
@@ -1,5 +1,7 @@
1
1
  import { type DaemonSessionArtifact, type DaemonWorkspaceFileBytes } from '@qwen-code/sdk/daemon';
2
2
  import type { DaemonWorkspaceActions } from '@qwen-code/web-shell/daemon-react-sdk';
3
+ import { isAudioArtifact, normalizeArtifactMimeType, pathExtension } from './artifact-mime.js';
4
+ export { isAudioArtifact, normalizeArtifactMimeType, pathExtension };
3
5
  export declare function artifactKindLabel(kind: string, workspacePath?: string): string;
4
6
  export declare function isOfficeDocumentPath(workspacePath?: string): boolean;
5
7
  export declare function isExcelFile(workspacePath?: string, mimeType?: string): boolean;
@@ -15,13 +17,10 @@ export declare function isDownloadOnlyWorkspaceArtifact(artifact: {
15
17
  workspacePath?: string;
16
18
  mimeType?: string;
17
19
  }): boolean;
18
- export declare function pathExtension(workspacePath?: string): string;
19
- export declare function isAudioArtifact(workspacePath?: string, mimeType?: string): boolean;
20
20
  export declare function getArtifactFreshnessKey(artifact: Pick<DaemonSessionArtifact, 'status' | 'updatedAt' | 'metadata'>): string;
21
21
  export declare function getArtifactTypeLabel(artifact: DaemonSessionArtifact): string;
22
22
  export declare function formatArtifactSize(sizeBytes: number | undefined): string;
23
23
  export declare const MAX_WORKSPACE_FILE_BLOB_BYTES: number;
24
- export declare function normalizeArtifactMimeType(mimeType?: string): string;
25
24
  export declare function getArtifactImageMimeType(artifact: Pick<DaemonSessionArtifact, 'mimeType' | 'workspacePath'>): string | undefined;
26
25
  export declare function getImageMimeTypeFromPath(path: string): string | undefined;
27
26
  export declare function getReviewDownloadMimeType(value: string): string;
@@ -138,4 +137,3 @@ export interface ArtifactLibrarySessionJumpDeps {
138
137
  * unarchive so a navigation started meanwhile is never overridden.
139
138
  */
140
139
  export declare function runArtifactLibrarySessionJump(deps: ArtifactLibrarySessionJumpDeps): Promise<void>;
141
- export {};
@@ -3,13 +3,55 @@
3
3
  * Copyright 2026 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { DaemonSessionStatsModelMetrics, DaemonSessionStatsStatus } from '@qwen-code/web-shell/daemon-react-sdk';
7
- type ModelTokens = DaemonSessionStatsModelMetrics['tokens'];
8
- type ModelGeneration = NonNullable<DaemonSessionStatsModelMetrics['generation']>;
6
+ export interface SessionUsageTokens {
7
+ readonly prompt: number;
8
+ readonly candidates: number;
9
+ readonly total: number;
10
+ readonly cached: number;
11
+ readonly thoughts: number;
12
+ }
13
+ export interface SessionUsageGeneration {
14
+ readonly timedRequests: number;
15
+ readonly totalTtftMs: number;
16
+ readonly totalGenerationDurationMs: number;
17
+ readonly totalThroughputOutputTokens: number;
18
+ readonly totalTimedGenerationDurationMs?: number;
19
+ readonly totalOutputSpeedTokens?: number;
20
+ readonly totalOutputSpeedDurationMs?: number;
21
+ }
22
+ export interface SessionUsageModelMetrics {
23
+ readonly api: {
24
+ readonly totalRequests: number;
25
+ readonly totalErrors: number;
26
+ readonly totalLatencyMs: number;
27
+ };
28
+ readonly tokens: SessionUsageTokens;
29
+ readonly generation?: SessionUsageGeneration;
30
+ }
31
+ export interface SessionUsageStatsSnapshot {
32
+ readonly sessionId: string;
33
+ readonly promptCount: number;
34
+ readonly models: Readonly<Record<string, SessionUsageModelMetrics>>;
35
+ /**
36
+ * True when the backend does not report cached token counts for any request,
37
+ * so the bar omits the cache-hit segment instead of showing `0%`.
38
+ */
39
+ readonly cacheHitUnknown?: boolean;
40
+ }
41
+ /**
42
+ * Whether these totals come from a backend without full-request output speed.
43
+ * Its sums and samples only support the rate over the generation window.
44
+ */
45
+ export declare function isLegacySpeed(generation: SessionUsageGeneration | undefined): boolean;
46
+ /**
47
+ * Output tokens per second over `durationMs`; undefined without output tokens
48
+ * (no usage reported) or time.
49
+ */
50
+ export declare function tokensPerSecond(outputTokenCount: number, durationMs: number): number | undefined;
9
51
  /** Prompt-side tokens; `prompt` already includes the cached part. */
10
- export declare function inputTokens(tokens: ModelTokens): number;
11
- export declare function totalTokens(tokens: ModelTokens): number;
12
- export declare function outputTokens(tokens: ModelTokens): number;
52
+ export declare function inputTokens(tokens: SessionUsageTokens): number;
53
+ export declare function totalTokens(tokens: SessionUsageTokens): number;
54
+ export declare function outputTokens(tokens: SessionUsageTokens): number;
13
55
  /** Compact token counts: 1,390,000 → "1.39M", 199,076 → "199.1K". */
14
56
  export declare function formatCompact(n: number): string;
15
57
  /**
@@ -18,7 +60,7 @@ export declare function formatCompact(n: number): string;
18
60
  * daemons do not send that time; their sums only support their own rate over
19
61
  * the generation window.
20
62
  */
21
- export declare function outputSpeed(generation: DaemonSessionStatsModelMetrics['generation'], legacy: boolean): number | undefined;
63
+ export declare function outputSpeed(generation: SessionUsageGeneration | undefined, legacy: boolean): number | undefined;
22
64
  export interface SessionUsageTotals {
23
65
  prompt: number;
24
66
  cached: number;
@@ -27,10 +69,17 @@ export interface SessionUsageTotals {
27
69
  total: number;
28
70
  requests: number;
29
71
  failed: number;
30
- generation: Required<ModelGeneration>;
31
- /** The daemon predates the full-request speed fields. */
72
+ generation: {
73
+ timedRequests: number;
74
+ totalTtftMs: number;
75
+ totalGenerationDurationMs: number;
76
+ totalThroughputOutputTokens: number;
77
+ totalTimedGenerationDurationMs: number;
78
+ totalOutputSpeedTokens: number;
79
+ totalOutputSpeedDurationMs: number;
80
+ };
81
+ /** The backend predates or omits the full-request speed fields. */
32
82
  legacySpeed: boolean;
33
83
  }
34
84
  /** Session-wide sums over every model that served a request. */
35
- export declare function summarizeSessionUsage(status: DaemonSessionStatsStatus): SessionUsageTotals;
36
- export {};
85
+ export declare function summarizeSessionUsage(status: SessionUsageStatsSnapshot): SessionUsageTotals;
@@ -3,5 +3,11 @@ import type { ACPToolCall, Message } from '../../adapters/types';
3
3
  import type { TurnOutputFileChange, TurnOutputScheduledTask } from './TurnOutputs';
4
4
  export declare function getArtifactsByTurn(messages: readonly Message[], artifacts: readonly DaemonSessionArtifact[], workspaceCwd?: string): ReadonlyMap<string, readonly DaemonSessionArtifact[]>;
5
5
  export declare function getFileChangesByTurn(messages: readonly Message[], artifactsByTurn: ReadonlyMap<string, readonly DaemonSessionArtifact[]>, workspaceCwd?: string): ReadonlyMap<string, readonly TurnOutputFileChange[]>;
6
+ export interface SessionScheduledTaskLiveSnapshots {
7
+ taskStatusById: ReadonlyMap<string, 'active' | 'paused'>;
8
+ hasLiveDurableSnapshot: boolean;
9
+ hasLiveSessionSnapshot: boolean;
10
+ }
11
+ export declare function enrichScheduledTasksByTurn(byTurn: ReadonlyMap<string, readonly TurnOutputScheduledTask[]>, live: SessionScheduledTaskLiveSnapshots): ReadonlyMap<string, readonly TurnOutputScheduledTask[]>;
6
12
  export declare function getScheduledTasksByTurn(messages: readonly Message[]): ReadonlyMap<string, readonly TurnOutputScheduledTask[]>;
7
13
  export declare function getToolFilePath(tool: ACPToolCall): string | undefined;
@@ -14,6 +14,7 @@ interface ArtifactWorkspaceOwner {
14
14
  export interface ArtifactWorkspaceTarget {
15
15
  workspaceCwd: string;
16
16
  workspaceId?: string;
17
+ primary?: boolean;
17
18
  actions: ArtifactWorkspaceActions;
18
19
  }
19
20
  export declare function resolveArtifactWorkspaceOwner(capabilities: DaemonCapabilities | undefined, workspaceCwd: string | undefined): ArtifactWorkspaceOwner | undefined;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ComponentProps, ComponentType, RefAttributes } from 'react';
7
+ import type { VoiceButton, VoiceButtonHandle } from '../../voice/VoiceButton';
8
+ import type { LiveVoiceButton } from '../../live/LiveVoiceButton';
9
+ import type { BranchPickerPopover } from '../BranchPickerPopover';
10
+ export interface ComposerIntegrations {
11
+ readonly VoiceButton?: ComponentType<ComponentProps<typeof VoiceButton> & RefAttributes<VoiceButtonHandle>>;
12
+ readonly LiveVoiceButton?: ComponentType<ComponentProps<typeof LiveVoiceButton>>;
13
+ readonly BranchPickerPopover?: ComponentType<ComponentProps<typeof BranchPickerPopover>>;
14
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { ComposerIntegrations } from './composer-integrations';
7
+ export declare const DAEMON_COMPOSER_INTEGRATIONS: Required<ComposerIntegrations>;
@@ -3,6 +3,7 @@
3
3
  * Copyright 2025 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ import { type DaemonScheduledTask } from '@qwen-code/web-shell/daemon-react-sdk';
6
7
  import type { DaemonWorkspaceCapability, DaemonSessionSummary } from '@qwen-code/sdk/daemon';
7
8
  interface ScheduledTasksDialogProps {
8
9
  /** Manual "run now": execute the task's prompt in its bound session (so it
@@ -38,7 +39,26 @@ interface ScheduledTasksDialogProps {
38
39
  /** The daemon advertises `autofix_pr_watches`: the card of an
39
40
  * `/autofix-pr` watch's task shows the watch's state, and can stop it. */
40
41
  autofixPrWatchesAvailable?: boolean;
42
+ /** Re-read live App state after refresh, before a manual run consumes a
43
+ * one-shot or dispatches a fresh-session attempt that must be refused. */
44
+ shouldRefuseManualRun?: (task: DaemonScheduledTask) => boolean;
45
+ overloadDetail?: string;
46
+ onOverloadRefused?: () => void;
47
+ isTaskDeleted?: (task: {
48
+ id: string;
49
+ workspaceId?: string;
50
+ sessionId?: string | null;
51
+ }) => boolean;
52
+ onTaskDeleted?: (task: {
53
+ id: string;
54
+ workspaceId?: string;
55
+ sessionId?: string | null;
56
+ }) => void;
57
+ onTaskMutated?: (task?: {
58
+ workspaceId?: string;
59
+ sessionId?: string | null;
60
+ }) => void;
41
61
  onError: (error: unknown, fallback: string) => void;
42
62
  }
43
- export declare function ScheduledTasksDialog({ onRunPrompt, onCreateViaChat, onOpenSession, workspaces, primaryWorkspaceCwd, lockedWorkspace, currentSession, currentSessionSchedulingAvailable, gateAvailable, deliveryAvailable, observedContactsAvailable, autofixPrWatchesAvailable, onError, }: ScheduledTasksDialogProps): import("react/jsx-runtime").JSX.Element;
63
+ export declare function ScheduledTasksDialog({ onRunPrompt, onCreateViaChat, onOpenSession, workspaces, primaryWorkspaceCwd, lockedWorkspace, currentSession, currentSessionSchedulingAvailable, gateAvailable, deliveryAvailable, observedContactsAvailable, autofixPrWatchesAvailable, shouldRefuseManualRun, overloadDetail, onOverloadRefused, isTaskDeleted, onTaskDeleted, onTaskMutated, onError, }: ScheduledTasksDialogProps): import("react/jsx-runtime").JSX.Element;
44
64
  export {};
@@ -61,3 +61,11 @@ export declare function describeLastRun(task: {
61
61
  lastFiredAt: number | null;
62
62
  gate?: string | null;
63
63
  }, t: TranslateFn): string;
64
+ export declare function scheduledTaskRuntimeKey(task: {
65
+ readonly id: string;
66
+ readonly scope: 'durable';
67
+ } | {
68
+ readonly id: string;
69
+ readonly scope: 'session';
70
+ readonly source: 'cron' | 'wakeup';
71
+ }): string;