@qwen-code/web-shell 0.26.2-preview.0 → 0.26.2

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 (30) hide show
  1. package/dist/{PierreFilePreview-Cz8IByld.js → PierreFilePreview-O6IBJs2H.js} +1 -1
  2. package/dist/{SpreadsheetPreview-BSdHX6Lq.js → SpreadsheetPreview-q8wEr2or.js} +2 -2
  3. package/dist/{WorkspaceFileBrowser-B0EUYL2u.js → WorkspaceFileBrowser-BOWKyjrM.js} +2 -2
  4. package/dist/{agents-route-DrM0Iy5a.js → agents-route-Vi7-UViC.js} +2 -2
  5. package/dist/daemon-react-sdk.js +1 -1
  6. package/dist/{index-DhmGlDKS.js → index-DXZfOyhz.js} +57170 -56343
  7. package/dist/index.js +3 -3
  8. package/dist/sw.js +1 -1
  9. package/dist/transcript.js +4263 -4188
  10. package/dist/types/components/autofixPr/AutofixPrWatchSummary.d.ts +30 -0
  11. package/dist/types/components/dialogs/AutofixPrWatchesDialog.d.ts +27 -0
  12. package/dist/types/components/dialogs/ScheduledTasksDialog.d.ts +9 -3
  13. package/dist/types/components/sidebar/SessionRenameEditor.d.ts +20 -0
  14. package/dist/types/components/sidebar/WebShellSidebar.d.ts +5 -2
  15. package/dist/types/components/sidebar/WorkspaceSection.d.ts +10 -1
  16. package/dist/types/components/sidebar/sessionTree.d.ts +37 -0
  17. package/dist/types/components/sidebar/useSessionTree.d.ts +19 -0
  18. package/dist/types/daemon/index.d.ts +1 -1
  19. package/dist/types/daemon/session/types.d.ts +7 -0
  20. package/dist/types/daemon/workspace/index.d.ts +1 -1
  21. package/dist/types/daemon/workspace/types.d.ts +71 -0
  22. package/dist/types/daemon-react-sdk.d.ts +4 -0
  23. package/dist/types/hooks/useAutofixPrWatches.d.ts +25 -0
  24. package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
  25. package/dist/types/session-catalog/session-catalog-store.d.ts +20 -0
  26. package/dist/types/utils/autofixPrWatches.d.ts +45 -0
  27. package/dist/types/utils/navigationUrl.d.ts +1 -1
  28. package/dist/types/utils/sessionTitleFromPrompt.d.ts +11 -0
  29. package/dist/{useDaemonMidTurnInjected-DY7azBbC.js → useDaemonMidTurnInjected-CvLW7Fjj.js} +1213 -1099
  30. package/package.json +1 -1
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonAutofixPrWatch } from '../../daemon/workspace/types';
7
+ interface AutofixPrWatchSummaryProps {
8
+ watch: DaemonAutofixPrWatch;
9
+ /** The scheduled task showing it no longer drives the watch. */
10
+ stale?: boolean;
11
+ /** Show the PR as a link heading (the PR watches page); a scheduled-task
12
+ * card names it in its own title. */
13
+ showPr?: boolean;
14
+ /** Open the session that owns the watch; absent when it is no session of
15
+ * this Web Shell. */
16
+ onOpenSession?: () => void;
17
+ /** Run `/autofix-pr stop <n>` in the session that owns the watch; absent
18
+ * when it is no session of this Web Shell. */
19
+ onStop?: () => void;
20
+ stopping?: boolean;
21
+ /** Its session is no session of this Web Shell: say where to stop it. */
22
+ outsideDaemon?: boolean;
23
+ }
24
+ /**
25
+ * One watch's state, as `qwen autofix-pr status` reports it: where the watch
26
+ * is, its pushes and last check, and the items left for a person. Shared by
27
+ * the scheduled-task card of a watch and the PR watches page.
28
+ */
29
+ export declare function AutofixPrWatchSummary({ watch, stale, showPr, onOpenSession, onStop, stopping, outsideDaemon, }: AutofixPrWatchSummaryProps): import("react/jsx-runtime").JSX.Element;
30
+ export {};
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
7
+ interface AutofixPrWatchesDialogProps {
8
+ /** Run a prompt in a session of this Web Shell, as the scheduled-tasks
9
+ * page runs a task: `/autofix-pr stop <n>` in the watch's own session. */
10
+ onRunPrompt: (prompt: string, sessionId: string, workspaceCwd?: string) => void | Promise<void>;
11
+ /** `workspaceCwd`: the workspace of the session's task, where its
12
+ * session is restored (absent on a single-workspace page). */
13
+ onOpenSession: (sessionId: string, workspaceCwd?: string) => void;
14
+ /** Registered workspaces (multi-workspace daemons): every operable one's
15
+ * watches are listed, each under its workspace. */
16
+ workspaces?: DaemonWorkspaceCapability[];
17
+ /** Reads only this workspace's, by its own route. */
18
+ lockedWorkspace?: DaemonWorkspaceCapability;
19
+ onError: (error: unknown, fallback: string) => void;
20
+ }
21
+ /**
22
+ * The PR watches page: every `/autofix-pr` watch of the workspaces' clones,
23
+ * as `qwen autofix-pr status` lists them, with the session that runs each
24
+ * one. Stopping one runs the skill in that session.
25
+ */
26
+ export declare function AutofixPrWatchesDialog({ onRunPrompt, onOpenSession, workspaces, lockedWorkspace, onError, }: AutofixPrWatchesDialogProps): import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -8,13 +8,16 @@ interface ScheduledTasksDialogProps {
8
8
  /** Manual "run now": execute the task's prompt in its bound session (so it
9
9
  * lands in the same transcript as its scheduled runs), or in the current
10
10
  * session for an unbound task. The App wiring switches to that session. */
11
- onRunPrompt: (prompt: string, sessionId: string | null) => void | Promise<void>;
11
+ onRunPrompt: (prompt: string, sessionId: string | null,
12
+ /** The task's workspace, on a multi-workspace page: its session is
13
+ * restored there, not in the current conversation's. */
14
+ workspaceCwd?: string) => void | Promise<void>;
12
15
  /** Switch to the chat view with the composer primed to describe a task, so
13
16
  * the agent can create it conversationally via its cron_create tool. */
14
17
  onCreateViaChat: () => void;
15
18
  /** Open a task's bound session — its transcript IS the task's run history.
16
19
  * When absent, tasks fall back to the inline fire-timestamp list. */
17
- onOpenSession?: (sessionId: string) => void;
20
+ onOpenSession?: (sessionId: string, workspaceCwd?: string) => void;
18
21
  /** Registered workspaces on a multi-workspace daemon (from capabilities).
19
22
  * When more than one is present the page aggregates every trusted workspace's
20
23
  * tasks (each card tagged with its workspace) and the New-task form offers a
@@ -28,7 +31,10 @@ interface ScheduledTasksDialogProps {
28
31
  * command and the request carries it. An older daemon would drop the field
29
32
  * silently, so it is never sent without the capability. */
30
33
  gateAvailable?: boolean;
34
+ /** The daemon advertises `autofix_pr_watches`: the card of an
35
+ * `/autofix-pr` watch's task shows the watch's state, and can stop it. */
36
+ autofixPrWatchesAvailable?: boolean;
31
37
  onError: (error: unknown, fallback: string) => void;
32
38
  }
33
- export declare function ScheduledTasksDialog({ onRunPrompt, onCreateViaChat, onOpenSession, workspaces, lockedWorkspace, currentSession, currentSessionSchedulingAvailable, gateAvailable, onError, }: ScheduledTasksDialogProps): import("react/jsx-runtime").JSX.Element;
39
+ export declare function ScheduledTasksDialog({ onRunPrompt, onCreateViaChat, onOpenSession, workspaces, lockedWorkspace, currentSession, currentSessionSchedulingAvailable, gateAvailable, autofixPrWatchesAvailable, onError, }: ScheduledTasksDialogProps): import("react/jsx-runtime").JSX.Element;
34
40
  export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export interface SessionRenameEditorProps {
7
+ label: string;
8
+ /** Restores an in-progress draft after the row moves or remounts. */
9
+ initialName?: string;
10
+ /** Records the draft outside the editor so a remount cannot lose it. */
11
+ onDraftChange?: (displayName: string) => void;
12
+ onCommit: (displayName: string) => void;
13
+ onCancel: () => void;
14
+ }
15
+ /**
16
+ * Keeps the draft local to the input. Lifting it into WebShellSidebar made
17
+ * every keystroke rebuild the whole (fully expanded) session list, because
18
+ * the row renderer depends on the sidebar's editing state.
19
+ */
20
+ export declare function SessionRenameEditor({ label, initialName, onDraftChange, onCommit, onCancel, }: SessionRenameEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -17,7 +17,7 @@ export interface WebShellSidebarLockedWorkspace {
17
17
  expanded: boolean;
18
18
  }) => ReactNode;
19
19
  }
20
- export type WebShellSidebarPrimaryNavItem = 'newTask' | 'agents' | 'plugins' | 'channels' | 'live' | 'scheduledTasks' | 'workflows' | 'goals' | 'managed';
20
+ export type WebShellSidebarPrimaryNavItem = 'newTask' | 'agents' | 'plugins' | 'channels' | 'live' | 'scheduledTasks' | 'prWatches' | 'workflows' | 'goals' | 'managed';
21
21
  export interface WebShellSidebarPrimaryNavOptions {
22
22
  /** Built-in primary nav entries to show. Embedded hosts default to New task only. */
23
23
  items?: readonly WebShellSidebarPrimaryNavItem[];
@@ -77,6 +77,9 @@ interface WebShellSidebarProps {
77
77
  onOpenManagedSessions?: () => void;
78
78
  onOpenDaemonStatus: () => void;
79
79
  onOpenScheduledTasks: () => void;
80
+ /** Opens the PR watches page; absent when the daemon does not list
81
+ * `/autofix-pr` watches (`autofix_pr_watches`). */
82
+ onOpenPrWatches?: () => void;
80
83
  onOpenWorkflows: () => void;
81
84
  onOpenGoals: () => void;
82
85
  onOpenSessions: () => void;
@@ -176,4 +179,4 @@ interface WebShellSidebarProps {
176
179
  onLoadStandaloneSession?: (sessionId: string, displayName?: string) => Promise<void> | void;
177
180
  onStandaloneNotice?: (message: string) => void;
178
181
  }
179
- export declare function WebShellSidebar({ collapsed, layout, activePage, containerWidth, onOpenHome, onCollapsedChange, onOpenSettings, onOpenAgents, onOpenPlugins, onOpenChannels, onOpenLive, onLiveVoiceSlotChange, onOpenManagedSessions, onOpenDaemonStatus, onOpenScheduledTasks, onOpenWorkflows, onOpenGoals, onOpenSessions, canOpenSessionsOverview, onOpenWorkspacesOverview, onOpenSplitView, canOpenSplitView, onNewSession, onNewStandaloneSession, onLoadSession, onOpenHostSession, onSelectCurrentSession, onSessionRenameConfirmed, onSessionsDeleted, onError, theme, onThemeChange, mobileOpen, onMobileClose, selectedWorkspaceCwd, onSelectWorkspace, onOpenGitDiff, onOpenCommit, onOpenAddWorkspace, workspaces: providedWorkspaces, lockedWorkspaceCwd, lockedWorkspace: lockedWorkspaceOptions, branding, primaryNav: primaryNavOptions, sessionContent, sessionHeader, managedWorkspaces, managedArchivedSessions, onSearchQueryChange, currentSessionActive, showSessionSourceSwitch, showLive, hideProjectHeader, sessionActions: sessionActionsOptions, footer, workspaceOverview, onOpenWorkspaceManagement, onNewWorktreeSession, projectFeaturesEnabled, onLoadStandaloneSession, onStandaloneNotice, }: WebShellSidebarProps): import("react/jsx-runtime").JSX.Element;
182
+ export declare function WebShellSidebar({ collapsed, layout, activePage, containerWidth, onOpenHome, onCollapsedChange, onOpenSettings, onOpenAgents, onOpenPlugins, onOpenChannels, onOpenLive, onLiveVoiceSlotChange, onOpenManagedSessions, onOpenDaemonStatus, onOpenScheduledTasks, onOpenPrWatches, onOpenWorkflows, onOpenGoals, onOpenSessions, canOpenSessionsOverview, onOpenWorkspacesOverview, onOpenSplitView, canOpenSplitView, onNewSession, onNewStandaloneSession, onLoadSession, onOpenHostSession, onSelectCurrentSession, onSessionRenameConfirmed, onSessionsDeleted, onError, theme, onThemeChange, mobileOpen, onMobileClose, selectedWorkspaceCwd, onSelectWorkspace, onOpenGitDiff, onOpenCommit, onOpenAddWorkspace, workspaces: providedWorkspaces, lockedWorkspaceCwd, lockedWorkspace: lockedWorkspaceOptions, branding, primaryNav: primaryNavOptions, sessionContent, sessionHeader, managedWorkspaces, managedArchivedSessions, onSearchQueryChange, currentSessionActive, showSessionSourceSwitch, showLive, hideProjectHeader, sessionActions: sessionActionsOptions, footer, workspaceOverview, onOpenWorkspaceManagement, onNewWorktreeSession, projectFeaturesEnabled, onLoadStandaloneSession, onStandaloneNotice, }: WebShellSidebarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { DaemonClient, DaemonSessionGroupCatalog } from '@qwen-code/sdk/daemon';
3
3
  import type { DaemonSessionGroup, DaemonSessionSummary, DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
4
+ import type { SessionTreeRenderOptions } from './sessionTree';
4
5
  import { type WorkspaceOverviewItem, type WorkspaceOverviewSnapshot, type WorkspaceSessionStats } from './workspaceOverviewModel';
5
6
  export declare function isAbsolutePath(cwd: string): boolean;
6
7
  export interface WorkspaceHeaderActionsContext {
@@ -51,6 +52,7 @@ interface WorkspaceSectionProps {
51
52
  */
52
53
  renderSession: (session: DaemonSessionSummary, options?: {
53
54
  searchSnippet?: string | undefined;
55
+ tree?: SessionTreeRenderOptions;
54
56
  }) => ReactNode;
55
57
  pendingSession?: {
56
58
  key: string;
@@ -99,6 +101,13 @@ interface WorkspaceSectionProps {
99
101
  groupActionsDisabled?: boolean;
100
102
  excludePinned?: boolean;
101
103
  limitSessions?: boolean;
104
+ /**
105
+ * The session currently being renamed in the sidebar, when this section owns
106
+ * it. A catalog refresh can reorder rows while the editor is open; revealing
107
+ * only the list that would truncate the edited row keeps it mounted. The
108
+ * sidebar leaves this undefined when the Pinned section hosts the editor.
109
+ */
110
+ editingSessionId?: string;
102
111
  /**
103
112
  * Whether the sidebar-level Pinned section renders this session. Pinned
104
113
  * rows have one owner: a pinned content-search ghost is kept in this
@@ -126,5 +135,5 @@ interface WorkspaceSectionProps {
126
135
  /** Commit entry for the same picker; the row still opens without it. */
127
136
  onOpenCommit?: (workspaceCwd: string) => void;
128
137
  }
129
- export declare function WorkspaceSection({ workspace, executionLabel, storageKey, remote, renderHeader, hideHeader, client, reloadToken, untrustedLabel, readOnlyLabel, trustToOpenLabel, noSessionsLabel, loadErrorLabel, organizationEnabled, sessionCatalogRequestsEnabled, sessionGroupCatalog, sessionLiveStateEnabled, sourceType, channelGroupingEnabled, ungroupedLabel, searchQuery, expanded: controlledExpanded, autoExpandKey, forceAutoExpand, onExpandedChange, renderSessions, renderSession, pendingSession, mapSession, showSessionDetails, headerActions, overviewEnabled, overviewMenuOpen, overviewItems, gitBranchWanted, sessionStats, onRenameGroup, onDeleteGroup, renameGroupLabel, deleteGroupLabel, groupActionsDisabled, excludePinned, limitSessions, isPinnedSectionMember, onOpenPathLocally, onOpenTerminalLocally, onOpenGitDiff, onOpenCommit, }: WorkspaceSectionProps): import("react/jsx-runtime").JSX.Element;
138
+ export declare function WorkspaceSection({ workspace, executionLabel, storageKey, remote, renderHeader, hideHeader, client, reloadToken, untrustedLabel, readOnlyLabel, trustToOpenLabel, noSessionsLabel, loadErrorLabel, organizationEnabled, sessionCatalogRequestsEnabled, sessionGroupCatalog, sessionLiveStateEnabled, sourceType, channelGroupingEnabled, ungroupedLabel, searchQuery, expanded: controlledExpanded, autoExpandKey, forceAutoExpand, onExpandedChange, renderSessions, renderSession, pendingSession, mapSession, showSessionDetails, headerActions, overviewEnabled, overviewMenuOpen, overviewItems, gitBranchWanted, sessionStats, onRenameGroup, onDeleteGroup, renameGroupLabel, deleteGroupLabel, groupActionsDisabled, excludePinned, limitSessions, editingSessionId, isPinnedSectionMember, onOpenPathLocally, onOpenTerminalLocally, onOpenGitDiff, onOpenCommit, }: WorkspaceSectionProps): import("react/jsx-runtime").JSX.Element;
130
139
  export {};
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonSessionSummary } from '@qwen-code/sdk/daemon';
7
+ export interface SessionTreeOptions {
8
+ expandedParentIds?: ReadonlySet<string>;
9
+ /**
10
+ * Parent ids rendered expanded regardless of the stored toggle. A search
11
+ * uses this so a matched child is never hidden behind a collapsed parent.
12
+ */
13
+ forceExpandedParentIds?: ReadonlySet<string>;
14
+ }
15
+ export interface SessionTreeRow {
16
+ session: DaemonSessionSummary;
17
+ depth: 0 | 1;
18
+ childCount: number;
19
+ expanded: boolean;
20
+ }
21
+ /** Tree state a session row needs to render its chevron and indentation. */
22
+ export interface SessionTreeRenderOptions {
23
+ depth: 0 | 1;
24
+ childCount: number;
25
+ expanded: boolean;
26
+ onToggle: () => void;
27
+ }
28
+ /**
29
+ * Orders a page of sessions so derived sessions render under their spawner.
30
+ * The daemon caps nesting at one level, so the result never has a depth above
31
+ * one. A child is emitted right after its parent and only when the parent is
32
+ * expanded; roots keep the page's activity order. A child whose parent is not
33
+ * in the page keeps its own row (depth 0) so it stays reachable.
34
+ */
35
+ export declare function buildSessionTree(sessions: readonly DaemonSessionSummary[], options?: SessionTreeOptions): SessionTreeRow[];
36
+ export declare function readSessionTreeExpanded(storageId: string): Set<string>;
37
+ export declare function writeSessionTreeExpanded(storageId: string, parentIds: ReadonlySet<string>): void;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonSessionSummary } from '@qwen-code/sdk/daemon';
7
+ import { type SessionTreeRenderOptions, type SessionTreeRow } from './sessionTree';
8
+ export interface SessionTreeControllers {
9
+ /** Rows for one surface (a flat list or one group section). */
10
+ buildRows: (sessions: readonly DaemonSessionSummary[]) => SessionTreeRow[];
11
+ /** Per-row state to hand to the session row renderer. */
12
+ renderOptions: (row: SessionTreeRow) => SessionTreeRenderOptions;
13
+ }
14
+ /**
15
+ * Expansion state for the sidebar's session tree, persisted per surface
16
+ * (`storageId` is the workspace's sidebar storage id). Search results force
17
+ * every matched parent open so a matched child is never hidden.
18
+ */
19
+ export declare function useSessionTree(storageId: string, searchedSessions: readonly DaemonSessionSummary[], searchActive: boolean): SessionTreeControllers;
@@ -6,7 +6,7 @@
6
6
  export { DaemonSessionProvider, useDaemonActions, useDaemonActiveTodoList, useDaemonConnection, useDaemonPendingPermissions, useDaemonPromptStatus, useDaemonSessionNotices, useDaemonSessionOwnerGuard, useDaemonStreamingState, useDaemonSession, useDaemonTranscriptBlocks, useDaemonTranscriptHistory, useDaemonTranscriptState, useDaemonTranscriptStore, useDaemonTurnNavigationState, useDaemonTurnNavigationStore, useDaemonWorkspaceEventSignals, extractDaemonTodosFromToolBlock, hasDaemonActiveTodos, isDaemonSubAgentToolBlock, parseDaemonTodoItemsFromEntries, selectDaemonActiveTodoList, selectDaemonLatestTodoList, selectDaemonPendingPermissions, selectDaemonSubAgentToolBlocks, selectDaemonStreamingState, selectDaemonTodoLists, selectDaemonTranscriptStreamingState, isMissingSessionHttpStatus, toDaemonPromptContent, } from './session/index.js';
7
7
  export type { DaemonCommandInfo, DaemonConnectionState, DaemonConnectionStatus, DaemonModelInfo, DaemonProductSessionContext, DaemonStandaloneConnectionState, DaemonNoticeCategory, DaemonNoticeOperation, DaemonNoticeSeverity, DaemonPromptFile, DaemonPromptImage, DaemonPromptStatus, DaemonReasoningControls, DaemonSessionActions, DaemonSessionContextValue, DaemonSessionNotice, DaemonSessionOwnerGuard, DaemonSessionOwnerSnapshot, DaemonSessionProviderProps, DaemonTranscriptHistory, DaemonPromptAdmission, DaemonProvisionalTurn, DaemonSelectedTurnState, DaemonTurnIndexPage, DaemonTurnLocation, DaemonTurnNavigationClient, DaemonTurnNavigationError, DaemonTurnNavigationSession, DaemonTurnNavigationSnapshot, DaemonTurnNavigationStore, HistoricalTranscriptPage, HistoricalTranscriptRange, TranscriptBoundary, DaemonTokenUsage, DaemonTodoItem, DaemonTodoList, DaemonTodoPriority, DaemonTodoStatus, DaemonStreamingState, DaemonWorkspaceEventSignals, PendingPromptActionOptions, SendPromptOptions, SubmitPromptOptions, SubmitPromptResult, } from './session/index.js';
8
8
  export { DaemonWorkspaceProvider, useDaemonWorkspace, useDaemonWorkspaceActions, useOptionalDaemonWorkspace, useDaemonAgents, useDaemonAuth, useDaemonChannels, useDaemonDiagnostics, useDaemonFiles, useDaemonGlob, useDaemonMcp, useDaemonMemory, useDaemonResource, useDaemonSessions, useDaemonSkills, useDaemonStatusReport, useDaemonUsageDashboard, useDaemonTools, useDaemonSettings, useDaemonProviders, } from './workspace/index.js';
9
- export type { DaemonDirectoryEntry, DaemonDirectoryListing, DaemonFileStat, DaemonGlobOptions, DaemonGlobResult, DaemonGoal, DaemonGoalList, DaemonScheduledTask, DaemonScheduledTaskGateStatus, DaemonScheduledTaskRun, DaemonCreateScheduledTaskRequest, DaemonUpdateScheduledTaskRequest, DaemonResourceOptions, DaemonChannelPairingActions, DaemonChannelsResource, DaemonStatusReportOptions, DaemonUsageDashboardOptions, DaemonWorkspaceActions, DaemonWorkspaceContextValue, DaemonWorkspaceProviderProps, DaemonWorkspaceStatus, ResourceResult, ResourceState, } from './workspace/index.js';
9
+ export type { DaemonDirectoryEntry, DaemonDirectoryListing, DaemonFileStat, DaemonGlobOptions, DaemonGlobResult, DaemonGoal, DaemonGoalList, DaemonAutofixPrWatch, DaemonAutofixPrWatchList, DaemonScheduledTask, DaemonScheduledTaskGateStatus, DaemonScheduledTaskRun, DaemonCreateScheduledTaskRequest, DaemonUpdateScheduledTaskRequest, DaemonResourceOptions, DaemonChannelPairingActions, DaemonChannelsResource, DaemonStatusReportOptions, DaemonUsageDashboardOptions, DaemonWorkspaceActions, DaemonWorkspaceContextValue, DaemonWorkspaceProviderProps, DaemonWorkspaceStatus, ResourceResult, ResourceState, } from './workspace/index.js';
10
10
  export { useDaemonFollowupSuggestion, type UseDaemonFollowupSuggestionReturn, } from './useDaemonFollowupSuggestion.js';
11
11
  export { useDaemonMidTurnInjected } from './useDaemonMidTurnInjected.js';
12
12
  export { getPendingPromptVersion, getPendingPromptEvents, consumePendingPromptEvents, subscribePendingPromptEvents, subscribePendingPromptVersion, } from './pendingPromptVersion.js';
@@ -471,6 +471,13 @@ export interface DaemonSessionActions {
471
471
  * callers that fall back on their own. */
472
472
  silent?: boolean;
473
473
  }): Promise<DaemonRewindResult>;
474
+ btwSessionStream(question: string, opts?: {
475
+ signal?: AbortSignal;
476
+ }): AsyncGenerator<{
477
+ type: 'answer' | 'done';
478
+ answer: string;
479
+ }>;
480
+ /** Legacy JSON action retained for existing daemon-react-sdk consumers. */
474
481
  btwSession(question: string, opts?: {
475
482
  signal?: AbortSignal;
476
483
  }): Promise<DaemonSessionBtwResult>;
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  export { DaemonWorkspaceProvider, useDaemonWorkspace, useDaemonWorkspaceActions, useOptionalDaemonWorkspace, } from './DaemonWorkspaceProvider.js';
7
- export type { DaemonDirectoryEntry, DaemonDirectoryListing, DaemonFileStat, DaemonGlobOptions, DaemonGlobResult, DaemonGoal, DaemonGoalList, DaemonScheduledTask, DaemonScheduledTaskGateStatus, DaemonScheduledTaskRun, DaemonCreateScheduledTaskRequest, DaemonUpdateScheduledTaskRequest, DaemonResourceOptions, DaemonChannelPairingActions, DaemonChannelsResource, DaemonWorkspaceActions, DaemonWorkspaceContextValue, DaemonWorkspaceProviderProps, DaemonWorkspaceStatus, ResourceResult, ResourceState, } from './types.js';
7
+ export type { DaemonDirectoryEntry, DaemonDirectoryListing, DaemonFileStat, DaemonGlobOptions, DaemonGlobResult, DaemonGoal, DaemonGoalList, DaemonAutofixPrWatch, DaemonAutofixPrWatchList, DaemonScheduledTask, DaemonScheduledTaskGateStatus, DaemonScheduledTaskRun, DaemonCreateScheduledTaskRequest, DaemonUpdateScheduledTaskRequest, DaemonResourceOptions, DaemonChannelPairingActions, DaemonChannelsResource, DaemonWorkspaceActions, DaemonWorkspaceContextValue, DaemonWorkspaceProviderProps, DaemonWorkspaceStatus, ResourceResult, ResourceState, } from './types.js';
8
8
  export { useDaemonAgents, useDaemonAuth, useDaemonChannels, useDaemonDiagnostics, useDaemonFiles, useDaemonGlob, useDaemonMcp, useDaemonMemory, useDaemonResource, useDaemonSessions, useDaemonSkills, useDaemonStatusReport, useDaemonUsageDashboard, useDaemonTools, useDaemonSettings, useDaemonProviders, } from './hooks/index.js';
9
9
  export type { DaemonStatusReportOptions } from './hooks/index.js';
10
10
  export type { DaemonUsageDashboardOptions } from './hooks/index.js';
@@ -274,6 +274,74 @@ export interface DaemonGoalList {
274
274
  */
275
275
  droppedCount: number;
276
276
  }
277
+ /**
278
+ * One `/autofix-pr` watch of a workspace's clone, as `qwen autofix-pr status`
279
+ * lists it (`GET /autofix-pr/watches`, advertised as `autofix_pr_watches`).
280
+ */
281
+ export interface DaemonAutofixPrWatch {
282
+ pr: number;
283
+ /** `<owner>/<repo>`. */
284
+ repo: string;
285
+ host: string;
286
+ url: string;
287
+ headRefName: string;
288
+ /** The PR head the watch knows of. */
289
+ headSha: string;
290
+ pushes: number;
291
+ maxPushes: number;
292
+ /** The session that owns the watch: maybe no session of this daemon. */
293
+ session: string;
294
+ preparedAt: string | null;
295
+ /** The last run of the watch's own gate. */
296
+ lastCheck: string | null;
297
+ /** Whether `lastCheck` is within two of the watch's intervals. */
298
+ checkedRecently: boolean;
299
+ /** The last round's snapshot. */
300
+ lastRound: string | null;
301
+ /** The gate saw the PR end, and the watch was not cleaned up. */
302
+ stopped: 'merged' | 'closed' | null;
303
+ /** The task `schedule` recorded, or null for a `--once` round. */
304
+ watch: {
305
+ every: number;
306
+ reply: boolean;
307
+ instructions: string;
308
+ task?: string;
309
+ } | null;
310
+ /** A `cleanup` that kept the worktree ended the watch. */
311
+ ended: {
312
+ at: string;
313
+ reason: string;
314
+ } | null;
315
+ /** Items the watch left for a person, newest last. */
316
+ needsHuman: Array<{
317
+ sha: string;
318
+ at: string;
319
+ text: string;
320
+ }>;
321
+ worktreeExists: boolean;
322
+ /** A background fix's attempt: `fresh` while it has not ended. */
323
+ fix: {
324
+ attempt: string | null;
325
+ startedAt: string | null;
326
+ fresh: boolean;
327
+ } | null;
328
+ }
329
+ /** The `GET /autofix-pr/watches` payload. */
330
+ export interface DaemonAutofixPrWatchList {
331
+ /** False when no git repository is found for the workspace. */
332
+ available: boolean;
333
+ /** The clone's main worktree: two workspaces of one clone list the same
334
+ * watches. */
335
+ root?: string;
336
+ /** When the daemon read the files, for comparing `lastCheck` with. */
337
+ now?: string;
338
+ watches: DaemonAutofixPrWatch[];
339
+ /** State files that could not be read, with the reason. */
340
+ unreadable?: Array<{
341
+ pr: number;
342
+ error: string;
343
+ }>;
344
+ }
277
345
  export interface DaemonWorkspacePathSuggestion {
278
346
  name: string;
279
347
  path: string;
@@ -403,6 +471,9 @@ export interface DaemonWorkspaceActions {
403
471
  * caller; per-run tasks are dispatched into a fresh daemon session. */
404
472
  runScheduledTask(id: string, workspaceId?: string): Promise<DaemonScheduledTask>;
405
473
  deleteScheduledTask(id: string, workspaceId?: string): Promise<void>;
474
+ /** The `/autofix-pr` watches of a workspace's clone; `workspaceId` as for
475
+ * `listScheduledTasks`. Only to a daemon advertising `autofix_pr_watches`. */
476
+ listAutofixPrWatches(workspaceId?: string): Promise<DaemonAutofixPrWatchList>;
406
477
  listGoals(): Promise<DaemonGoalList>;
407
478
  controlGoal(sessionId: string, request: GoalControlRequest): Promise<GoalStateResponse>;
408
479
  /** Drop a session's goal hook. No-op when that session has no active goal. */
@@ -221,6 +221,10 @@ DaemonGlobResult,
221
221
  DaemonGoal,
222
222
  /** The `GET /goals` payload: the goals plus a count of unreachable sessions. */
223
223
  DaemonGoalList,
224
+ /** One `/autofix-pr` watch of a workspace's clone, as `status` lists it. */
225
+ DaemonAutofixPrWatch,
226
+ /** The `GET /autofix-pr/watches` payload. */
227
+ DaemonAutofixPrWatchList,
224
228
  /** A durable scheduled task (cron) as returned by the daemon. */
225
229
  DaemonScheduledTask,
226
230
  /** Summary of a gated task's recent gate runs. */
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type DaemonAutofixPrWatchList } from '@qwen-code/web-shell/daemon-react-sdk';
7
+ /** A watch moves when a gate fires or a round runs: minutes, not seconds. */
8
+ export declare const AUTOFIX_PR_WATCHES_RELOAD_MS = 15000;
9
+ /** The key a workspace's list is under: its id, or '' for the primary. */
10
+ export declare function autofixPrWatchesKey(workspaceId: string | undefined): string;
11
+ export interface AutofixPrWatchesState {
12
+ /** Each workspace's watches, by `autofixPrWatchesKey`; missing while it
13
+ * loads or when it failed. */
14
+ lists: ReadonlyMap<string, DaemonAutofixPrWatchList>;
15
+ /** The first workspace that failed, if any. */
16
+ error: string | null;
17
+ loaded: boolean;
18
+ reload: () => Promise<void>;
19
+ }
20
+ /**
21
+ * The `/autofix-pr` watches of the given workspaces (`undefined` is the
22
+ * primary), polled on a slow lane while `enabled`. One workspace failing
23
+ * keeps the others.
24
+ */
25
+ export declare function useAutofixPrWatches(enabled: boolean, workspaceIds: ReadonlyArray<string | undefined>): AutofixPrWatchesState;
@@ -76,6 +76,7 @@ export declare function useSessionCatalogController(client: DaemonClient): {
76
76
  promptAdmitted(workspaceCwd: string, sessionId: string): void;
77
77
  promptAdmissionUncertain(workspaceCwd: string): void;
78
78
  renamed(workspaceCwd: string, sessionId: string, displayName: string): void;
79
+ setPendingSessionTitle(workspaceCwd: string, sessionId: string, displayName: string): void;
79
80
  toggleSessionPinned(workspaceCwd: string, session: DaemonSessionSummary, toggle: {
80
81
  pinned: boolean;
81
82
  pinnedAt?: string;
@@ -34,6 +34,12 @@ export declare function getSessionCatalogQueryKey(query: SessionCatalogQuery): s
34
34
  export declare class SessionCatalogStore {
35
35
  private readonly client;
36
36
  private readonly entries;
37
+ /**
38
+ * Prompt-derived titles for sessions whose rename has not landed yet.
39
+ * Applied to every published page so periodic and in-flight catalog reads
40
+ * cannot surface the session-id fallback first.
41
+ */
42
+ private readonly pendingSessionTitles;
37
43
  private readonly queue;
38
44
  private readonly trailingRefreshTimers;
39
45
  private readonly liveStateWorkspaceUsers;
@@ -83,6 +89,18 @@ export declare class SessionCatalogStore {
83
89
  interactive?: boolean;
84
90
  }): void;
85
91
  patchSession(workspaceCwd: string, sessionId: string, patch: Partial<Omit<DaemonSessionSummary, 'sessionId' | 'workspaceCwd'>>): void;
92
+ /**
93
+ * Record a prompt-derived title for a session whose rename is still in
94
+ * flight. Every subsequent page (poll, in-flight load, live merge) gets the
95
+ * title until the daemon reports a real custom title, so no read can publish
96
+ * the session-id fallback first.
97
+ */
98
+ setPendingSessionTitle(workspaceCwd: string, sessionId: string, displayName: string): void;
99
+ /**
100
+ * Drop a pending prompt title once a real rename lands (or the session is
101
+ * closed), so a later catalog page cannot revive the provisional label.
102
+ */
103
+ clearPendingSessionTitle(workspaceCwd: string, sessionId: string): void;
86
104
  /**
87
105
  * Apply a pin toggle optimistically to every loaded page of the workspace,
88
106
  * so the store owns the optimistic state's lifetime (the R5-1 fix
@@ -132,6 +150,8 @@ export declare class SessionCatalogStore {
132
150
  private resolveWaiters;
133
151
  private rejectWaiters;
134
152
  private setSnapshot;
153
+ private applyPendingSessionTitles;
154
+ private applyPendingSessionTitlesToPage;
135
155
  private resetPollSchedule;
136
156
  private schedulePollFromNow;
137
157
  private scheduleEntryTimer;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonAutofixPrWatch } from '../daemon/workspace/types';
7
+ /** What the prompt of a watch's scheduled task names (`qwen autofix-pr
8
+ * schedule` writes `Run /autofix-pr tick <owner>/<repo>#<n> [--task <id>]…`). */
9
+ export interface AutofixPrTick {
10
+ /** `<owner>/<repo>`. */
11
+ repo: string;
12
+ pr: number;
13
+ task?: string;
14
+ }
15
+ export declare function parseAutofixPrTick(prompt: string): AutofixPrTick | null;
16
+ /**
17
+ * The watch a scheduled task drives, among the watches of its workspace's
18
+ * clone. `stale` as the task's gate judges it: the watch ended, records no
19
+ * task where the task has an id, or records another task — one a later
20
+ * `schedule` replaced. Such a task stops at its next fire.
21
+ */
22
+ export declare function watchOfTask(prompt: string, watches: readonly DaemonAutofixPrWatch[] | undefined): {
23
+ watch: DaemonAutofixPrWatch;
24
+ stale: boolean;
25
+ } | null;
26
+ /** Where a watch is, the first that holds in this order. */
27
+ export type AutofixPrWatchPhase =
28
+ /** The gate saw the PR merged or closed: only a cleanup is left. */
29
+ 'merged' | 'closed'
30
+ /** A `cleanup` that kept the worktree ended it. */
31
+ | 'ended'
32
+ /** No task drives it: a `--once` check's state, or a watch whose
33
+ * scheduling did not finish. */
34
+ | 'unscheduled'
35
+ /** A fix agent works in the background, or its round has yet to claim it. */
36
+ | 'fixing'
37
+ /** A background fix its session left behind: the next round redoes it. */
38
+ | 'abandonedFix'
39
+ /** Its gate checked the PR within two intervals. */
40
+ | 'watching'
41
+ /** No check that recent: its session is gone or not running its task. */
42
+ | 'idle';
43
+ export declare function watchPhase(watch: DaemonAutofixPrWatch): AutofixPrWatchPhase;
44
+ /** What stops a watch in the session that owns it, as a user types it. */
45
+ export declare function stopCommand(watch: DaemonAutofixPrWatch): string;
@@ -3,7 +3,7 @@
3
3
  * Copyright 2026 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export declare const WEB_SHELL_PAGES: readonly ["plugins", "channels", "live", "scheduled-tasks", "goals", "settings"];
6
+ export declare const WEB_SHELL_PAGES: readonly ["plugins", "channels", "live", "scheduled-tasks", "pr-watches", "goals", "settings"];
7
7
  export type WebShellPage = (typeof WEB_SHELL_PAGES)[number];
8
8
  export interface SessionUrlTarget {
9
9
  sessionId?: string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Derive a session title from the first prompt when the prompt itself is
3
+ * already a usable short title. Returns undefined for anything the fast-model
4
+ * title should handle instead: multi-line prompts, long prompts, and a bare
5
+ * slash command with no arguments.
6
+ *
7
+ * Deliberately lighter than core's `sanitizeTitle`: this runs in the browser
8
+ * bundle, which must not pull in the model client. Keep the trailing
9
+ * punctuation class in sync with that helper.
10
+ */
11
+ export declare function titleFromPrompt(text: string): string | undefined;