@qwen-code/web-shell 0.24.1-preview.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.
- package/README.md +651 -0
- package/dist/daemon-react-sdk.js +53 -0
- package/dist/index.js +109094 -0
- package/dist/sw.js +9 -0
- package/dist/toolNames-DgCpmhML.js +17992 -0
- package/dist/transcript.js +31609 -0
- package/dist/types/App.d.ts +419 -0
- package/dist/types/WebShellContexts.d.ts +31 -0
- package/dist/types/adapters/localizedMessages.d.ts +24 -0
- package/dist/types/adapters/messageTypes.d.ts +194 -0
- package/dist/types/adapters/parallelAgentGrouping.d.ts +18 -0
- package/dist/types/adapters/promptTypes.d.ts +12 -0
- package/dist/types/adapters/toolClassification.d.ts +10 -0
- package/dist/types/adapters/transcriptAdapter.d.ts +3 -0
- package/dist/types/adapters/transcriptToMessages.d.ts +41 -0
- package/dist/types/adapters/types.d.ts +123 -0
- package/dist/types/brandContext.d.ts +44 -0
- package/dist/types/browser-turn-notifications.d.ts +36 -0
- package/dist/types/completions/slashCompletion.d.ts +35 -0
- package/dist/types/components/AtMentionPanel.d.ts +13 -0
- package/dist/types/components/BranchPickerPopover.d.ts +73 -0
- package/dist/types/components/ChatContextHeader.d.ts +18 -0
- package/dist/types/components/ChatEditor.d.ts +134 -0
- package/dist/types/components/ChatPane.d.ts +93 -0
- package/dist/types/components/ContextCompressionFeedback.d.ts +5 -0
- package/dist/types/components/ContextUsagePopover.d.ts +10 -0
- package/dist/types/components/ErrorBoundary.d.ts +40 -0
- package/dist/types/components/FileAttachmentContent.d.ts +4 -0
- package/dist/types/components/FileTypeIcon.d.ts +6 -0
- package/dist/types/components/GitBranchIndicator.d.ts +66 -0
- package/dist/types/components/GitModePopover.d.ts +23 -0
- package/dist/types/components/GlobalTurnNavigation.d.ts +16 -0
- package/dist/types/components/GoalStatusStrip.d.ts +13 -0
- package/dist/types/components/InsightProgress.d.ts +12 -0
- package/dist/types/components/InsightReady.d.ts +6 -0
- package/dist/types/components/LocalControlQrButton.d.ts +12 -0
- package/dist/types/components/LocalFilesControl.d.ts +74 -0
- package/dist/types/components/MessageItem.d.ts +43 -0
- package/dist/types/components/MessageList.d.ts +222 -0
- package/dist/types/components/MessageTimestamp.d.ts +32 -0
- package/dist/types/components/ModeIcon.d.ts +3 -0
- package/dist/types/components/MonitorIcon.d.ts +2 -0
- package/dist/types/components/PaneHeaderActions.d.ts +23 -0
- package/dist/types/components/PromptChevron.d.ts +7 -0
- package/dist/types/components/QueuedPromptDisplay.d.ts +57 -0
- package/dist/types/components/RootErrorFallback.d.ts +21 -0
- package/dist/types/components/SessionOverviewPanel.d.ts +46 -0
- package/dist/types/components/SessionPrBadge.d.ts +24 -0
- package/dist/types/components/SessionPrStateIcon.d.ts +32 -0
- package/dist/types/components/SessionRecoveryBanner.d.ts +3 -0
- package/dist/types/components/ShadowDomBoundary.d.ts +11 -0
- package/dist/types/components/SplitView.d.ts +69 -0
- package/dist/types/components/StandaloneAuth.d.ts +17 -0
- package/dist/types/components/StatusBar.d.ts +26 -0
- package/dist/types/components/StreamingStatus.d.ts +20 -0
- package/dist/types/components/Tips.d.ts +1 -0
- package/dist/types/components/ToastHost.d.ts +25 -0
- package/dist/types/components/TranscriptViewport.d.ts +17 -0
- package/dist/types/components/WebShellTranscript.d.ts +38 -0
- package/dist/types/components/WelcomeHeader.d.ts +8 -0
- package/dist/types/components/WorkspaceIndicator.d.ts +27 -0
- package/dist/types/components/WorkspaceSelector.d.ts +29 -0
- package/dist/types/components/WorkspaceSessionProvider.d.ts +19 -0
- package/dist/types/components/WorkspaceUnavailableState.d.ts +11 -0
- package/dist/types/components/agents/AgentCreatePage.d.ts +9 -0
- package/dist/types/components/agents/AgentsManagerPage.d.ts +8 -0
- package/dist/types/components/agents/agent-tool-options.d.ts +9 -0
- package/dist/types/components/agents/agents-manager-logic.d.ts +8 -0
- package/dist/types/components/artifacts/AgentWorkflow.d.ts +7 -0
- package/dist/types/components/artifacts/ArtifactIcon.d.ts +9 -0
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +229 -0
- package/dist/types/components/artifacts/CodeReviewArtifactDetail.d.ts +63 -0
- package/dist/types/components/artifacts/ContextUsagePanel.d.ts +7 -0
- package/dist/types/components/artifacts/LineStats.d.ts +12 -0
- package/dist/types/components/artifacts/SideTaskPanel.d.ts +24 -0
- package/dist/types/components/artifacts/SubagentDetail.d.ts +14 -0
- package/dist/types/components/artifacts/TokenUsagePanel.d.ts +7 -0
- package/dist/types/components/artifacts/TurnOutputs.d.ts +121 -0
- package/dist/types/components/artifacts/artifactUtils.d.ts +37 -0
- package/dist/types/components/artifacts/turnOutputSelectors.d.ts +7 -0
- package/dist/types/components/artifacts/useArtifactWorkspaceTarget.d.ts +16 -0
- package/dist/types/components/channels/ChannelEditorDialog.d.ts +25 -0
- package/dist/types/components/channels/ChannelPairingRequests.d.ts +15 -0
- package/dist/types/components/channels/ChannelsManagerPage.d.ts +12 -0
- package/dist/types/components/channels/channel-editor-state.d.ts +25 -0
- package/dist/types/components/channels/channel-platform.d.ts +9 -0
- package/dist/types/components/composer/AddMenu.d.ts +20 -0
- package/dist/types/components/composer/prependSkillInvocation.d.ts +12 -0
- package/dist/types/components/dialogs/AddWorkspaceDialog.d.ts +24 -0
- package/dist/types/components/dialogs/ApprovalModeDialog.d.ts +7 -0
- package/dist/types/components/dialogs/DaemonStatusDialog.d.ts +3 -0
- package/dist/types/components/dialogs/DeleteSessionDialog.d.ts +8 -0
- package/dist/types/components/dialogs/DialogShell.d.ts +15 -0
- package/dist/types/components/dialogs/GitDialog.d.ts +14 -0
- package/dist/types/components/dialogs/GitDiffDialog.d.ts +14 -0
- package/dist/types/components/dialogs/GitHubPrsDialog.d.ts +9 -0
- package/dist/types/components/dialogs/GitLogDialog.d.ts +14 -0
- package/dist/types/components/dialogs/GoalEditDialog.d.ts +9 -0
- package/dist/types/components/dialogs/GoalsDialog.d.ts +16 -0
- package/dist/types/components/dialogs/HelpDialog.d.ts +6 -0
- package/dist/types/components/dialogs/ModelDialog.d.ts +28 -0
- package/dist/types/components/dialogs/ModelFallbacksDialog.d.ts +14 -0
- package/dist/types/components/dialogs/ReleaseSessionDialog.d.ts +8 -0
- package/dist/types/components/dialogs/ResumeDialog.d.ts +7 -0
- package/dist/types/components/dialogs/RewindDialog.d.ts +12 -0
- package/dist/types/components/dialogs/ScheduledTasksDialog.d.ts +30 -0
- package/dist/types/components/dialogs/SessionRow.d.ts +46 -0
- package/dist/types/components/dialogs/SvgLineChart.d.ts +35 -0
- package/dist/types/components/dialogs/ThemeDialog.d.ts +8 -0
- package/dist/types/components/dialogs/TokenHeatmap.d.ts +18 -0
- package/dist/types/components/dialogs/ToolsDialog.d.ts +1 -0
- package/dist/types/components/dialogs/UsageDashboardTab.d.ts +13 -0
- package/dist/types/components/dialogs/dialogStyles.d.ts +2 -0
- package/dist/types/components/dialogs/scheduledTasksSchedule.d.ts +62 -0
- package/dist/types/components/extensions/ExtensionsManagerPage.d.ts +9 -0
- package/dist/types/components/extensions/extensions-manager-logic.d.ts +3 -0
- package/dist/types/components/local-control-api.d.ts +30 -0
- package/dist/types/components/mcp/McpManagerPage.d.ts +12 -0
- package/dist/types/components/messages/AskUserQuestion.d.ts +18 -0
- package/dist/types/components/messages/AssistantMessage.d.ts +40 -0
- package/dist/types/components/messages/AuthMessage.d.ts +6 -0
- package/dist/types/components/messages/BtwMessage.d.ts +7 -0
- package/dist/types/components/messages/ContextUsageMessage.d.ts +9 -0
- package/dist/types/components/messages/EnhancedMarkdownTable.d.ts +31 -0
- package/dist/types/components/messages/FootnoteCard.d.ts +11 -0
- package/dist/types/components/messages/FootnotePreviewContent.d.ts +9 -0
- package/dist/types/components/messages/GoalApprovalContent.d.ts +5 -0
- package/dist/types/components/messages/GoalStatusMessage.d.ts +15 -0
- package/dist/types/components/messages/LinkifiedText.d.ts +8 -0
- package/dist/types/components/messages/LocalControlSettingsCard.d.ts +1 -0
- package/dist/types/components/messages/Markdown.d.ts +38 -0
- package/dist/types/components/messages/MarkdownChartRenderer.d.ts +65 -0
- package/dist/types/components/messages/McpApp.d.ts +21 -0
- package/dist/types/components/messages/McpStatusMessage.d.ts +22 -0
- package/dist/types/components/messages/MemoryMessage.d.ts +9 -0
- package/dist/types/components/messages/ModelManagementSection.d.ts +23 -0
- package/dist/types/components/messages/PlanExecutionView.d.ts +91 -0
- package/dist/types/components/messages/PlanMessage.d.ts +8 -0
- package/dist/types/components/messages/QuestionAnswerMessage.d.ts +7 -0
- package/dist/types/components/messages/SettingsMessage.d.ts +46 -0
- package/dist/types/components/messages/StatsMessage.d.ts +14 -0
- package/dist/types/components/messages/StatusMessage.d.ts +18 -0
- package/dist/types/components/messages/SystemMessage.d.ts +29 -0
- package/dist/types/components/messages/TasksStatusMessage.d.ts +38 -0
- package/dist/types/components/messages/TodoView.d.ts +17 -0
- package/dist/types/components/messages/ToolApproval.d.ts +28 -0
- package/dist/types/components/messages/ToolFilePreviewButton.d.ts +7 -0
- package/dist/types/components/messages/ToolGroup.d.ts +50 -0
- package/dist/types/components/messages/UserMessage.d.ts +46 -0
- package/dist/types/components/messages/UserShellMessage.d.ts +6 -0
- package/dist/types/components/messages/WorkflowExecutionView.d.ts +48 -0
- package/dist/types/components/messages/agentForest.d.ts +96 -0
- package/dist/types/components/messages/codeHighlighter.d.ts +25 -0
- package/dist/types/components/messages/rehype-footnote-cards.d.ts +22 -0
- package/dist/types/components/messages/toolFormatting.d.ts +63 -0
- package/dist/types/components/messages/tools/DiffView.d.ts +5 -0
- package/dist/types/components/messages/tools/ParallelAgentsGroup.d.ts +12 -0
- package/dist/types/components/messages/tools/SubAgentPanel.d.ts +10 -0
- package/dist/types/components/messages/tools/toolDisplay.d.ts +7 -0
- package/dist/types/components/panels/EnvironmentPanel.d.ts +45 -0
- package/dist/types/components/panels/SourcesSection.d.ts +25 -0
- package/dist/types/components/panels/TodoPanel.d.ts +11 -0
- package/dist/types/components/plugins/PluginManagerPage.d.ts +8 -0
- package/dist/types/components/plugins/manager-page.d.ts +4 -0
- package/dist/types/components/preview/SavedWebPreview.d.ts +5 -0
- package/dist/types/components/preview/WebPreviewPanel.d.ts +5 -0
- package/dist/types/components/preview/web-preview.d.ts +7 -0
- package/dist/types/components/sidebar/SessionDetailsTooltip.d.ts +17 -0
- package/dist/types/components/sidebar/SessionGroupSection.d.ts +19 -0
- package/dist/types/components/sidebar/StandaloneRecents.d.ts +33 -0
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +139 -0
- package/dist/types/components/sidebar/WorkspaceDetailsTooltip.d.ts +49 -0
- package/dist/types/components/sidebar/WorkspaceMenu.d.ts +41 -0
- package/dist/types/components/sidebar/WorkspaceRenameDialog.d.ts +18 -0
- package/dist/types/components/sidebar/WorkspaceSection.d.ts +112 -0
- package/dist/types/components/sidebar/channelSessionGroups.d.ts +7 -0
- package/dist/types/components/sidebar/collapsedSessionSections.d.ts +25 -0
- package/dist/types/components/sidebar/scheduled-task-session-groups.d.ts +12 -0
- package/dist/types/components/sidebar/sessionDetailsCollisionBoundary.d.ts +1 -0
- package/dist/types/components/sidebar/sessionSearch.d.ts +28 -0
- package/dist/types/components/sidebar/sessionTitleScroll.d.ts +7 -0
- package/dist/types/components/sidebar/sidebarToggleShortcut.d.ts +18 -0
- package/dist/types/components/sidebar/useSessionContentSearch.d.ts +20 -0
- package/dist/types/components/sidebar/useWorkspaceOverview.d.ts +40 -0
- package/dist/types/components/sidebar/workspaceExpansion.d.ts +4 -0
- package/dist/types/components/sidebar/workspaceOverviewModel.d.ts +123 -0
- package/dist/types/components/skills/SkillInstallDialog.d.ts +8 -0
- package/dist/types/components/skills/SkillsManagerPage.d.ts +11 -0
- package/dist/types/components/skills/skills-manager-logic.d.ts +6 -0
- package/dist/types/components/sources/SourceList.d.ts +5 -0
- package/dist/types/components/sources/TurnSources.d.ts +5 -0
- package/dist/types/components/sources/sourceEntries.d.ts +8 -0
- package/dist/types/components/summaryRunId.d.ts +9 -0
- package/dist/types/components/terminal/TerminalPanel.d.ts +17 -0
- package/dist/types/components/toolbarDropdown.d.ts +39 -0
- package/dist/types/components/ui/alert-dialog.d.ts +19 -0
- package/dist/types/components/ui/alert.d.ts +10 -0
- package/dist/types/components/ui/badge.d.ts +9 -0
- package/dist/types/components/ui/breadcrumb.d.ts +11 -0
- package/dist/types/components/ui/button.d.ts +11 -0
- package/dist/types/components/ui/card.d.ts +11 -0
- package/dist/types/components/ui/checkbox.d.ts +4 -0
- package/dist/types/components/ui/data-table.d.ts +31 -0
- package/dist/types/components/ui/dialog.d.ts +19 -0
- package/dist/types/components/ui/drawer.d.ts +16 -0
- package/dist/types/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/types/components/ui/empty.d.ts +11 -0
- package/dist/types/components/ui/field.d.ts +24 -0
- package/dist/types/components/ui/input.d.ts +3 -0
- package/dist/types/components/ui/label.d.ts +4 -0
- package/dist/types/components/ui/management-notice.d.ts +12 -0
- package/dist/types/components/ui/popover.d.ts +13 -0
- package/dist/types/components/ui/radio-group.d.ts +5 -0
- package/dist/types/components/ui/scroll-area.d.ts +5 -0
- package/dist/types/components/ui/select.d.ts +16 -0
- package/dist/types/components/ui/separator.d.ts +4 -0
- package/dist/types/components/ui/skeleton.d.ts +2 -0
- package/dist/types/components/ui/spinner.d.ts +2 -0
- package/dist/types/components/ui/switch.d.ts +6 -0
- package/dist/types/components/ui/table.d.ts +10 -0
- package/dist/types/components/ui/tabs.d.ts +13 -0
- package/dist/types/components/ui/textarea.d.ts +3 -0
- package/dist/types/components/ui/toggle-group.d.ts +10 -0
- package/dist/types/components/ui/toggle.d.ts +9 -0
- package/dist/types/components/ui/tooltip.d.ts +7 -0
- package/dist/types/components/workflow/SessionWorkflowCockpit.d.ts +17 -0
- package/dist/types/components/workflow/SessionWorkflowInspector.d.ts +15 -0
- package/dist/types/components/workflow/session-workflow-model.d.ts +32 -0
- package/dist/types/components/workflows/WorkflowRunsPage.d.ts +6 -0
- package/dist/types/components/workspaces/WorkspaceRemovalDialog.d.ts +20 -0
- package/dist/types/components/workspaces/WorkspacesOverviewPanel.d.ts +21 -0
- package/dist/types/components/workspaces/useWorkspaceRemoval.d.ts +47 -0
- package/dist/types/config/daemon.d.ts +41 -0
- package/dist/types/config/standalone.d.ts +1 -0
- package/dist/types/constants/loadingPhrases.d.ts +4 -0
- package/dist/types/constants/localCommands.d.ts +27 -0
- package/dist/types/constants/sessions.d.ts +43 -0
- package/dist/types/constants/toolNames.d.ts +9 -0
- package/dist/types/customization.d.ts +508 -0
- package/dist/types/daemon/followupSidechannel.d.ts +11 -0
- package/dist/types/daemon/index.d.ts +14 -0
- package/dist/types/daemon/midTurnInjectedSidechannel.d.ts +37 -0
- package/dist/types/daemon/pendingPromptVersion.d.ts +19 -0
- package/dist/types/daemon/session/DaemonSessionProvider.d.ts +45 -0
- package/dist/types/daemon/session/actions.d.ts +100 -0
- package/dist/types/daemon/session/clientLifecycle.d.ts +21 -0
- package/dist/types/daemon/session/httpErrors.d.ts +9 -0
- package/dist/types/daemon/session/index.d.ts +15 -0
- package/dist/types/daemon/session/live-journal-repair.d.ts +19 -0
- package/dist/types/daemon/session/mappers.d.ts +71 -0
- package/dist/types/daemon/session/promptContent.d.ts +11 -0
- package/dist/types/daemon/session/selectors.d.ts +21 -0
- package/dist/types/daemon/session/session-context.d.ts +16 -0
- package/dist/types/daemon/session/status.d.ts +12 -0
- package/dist/types/daemon/session/transcript-page-table.d.ts +147 -0
- package/dist/types/daemon/session/turn-navigation-store.d.ts +117 -0
- package/dist/types/daemon/session/turn-notification-context.d.ts +43 -0
- package/dist/types/daemon/session/types.d.ts +568 -0
- package/dist/types/daemon/timing.d.ts +14 -0
- package/dist/types/daemon/useDaemonFollowupSuggestion.d.ts +77 -0
- package/dist/types/daemon/useDaemonMidTurnInjected.d.ts +30 -0
- package/dist/types/daemon/workspace/DaemonWorkspaceProvider.d.ts +21 -0
- package/dist/types/daemon/workspace/actions.d.ts +14 -0
- package/dist/types/daemon/workspace/hooks/index.d.ts +21 -0
- package/dist/types/daemon/workspace/hooks/useDaemonAgents.d.ts +22 -0
- package/dist/types/daemon/workspace/hooks/useDaemonAuth.d.ts +24 -0
- package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +33 -0
- package/dist/types/daemon/workspace/hooks/useDaemonDiagnostics.d.ts +10 -0
- package/dist/types/daemon/workspace/hooks/useDaemonFiles.d.ts +10 -0
- package/dist/types/daemon/workspace/hooks/useDaemonGlob.d.ts +8 -0
- package/dist/types/daemon/workspace/hooks/useDaemonMcp.d.ts +31 -0
- package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +16 -0
- package/dist/types/daemon/workspace/hooks/useDaemonProviders.d.ts +20 -0
- package/dist/types/daemon/workspace/hooks/useDaemonResource.d.ts +7 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +48 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +20 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSkills.d.ts +30 -0
- package/dist/types/daemon/workspace/hooks/useDaemonStatusReport.d.ts +18 -0
- package/dist/types/daemon/workspace/hooks/useDaemonTools.d.ts +16 -0
- package/dist/types/daemon/workspace/hooks/useDaemonUsageDashboard.d.ts +27 -0
- package/dist/types/daemon/workspace/hooks/useWorkspaceEventReload.d.ts +6 -0
- package/dist/types/daemon/workspace/index.d.ts +10 -0
- package/dist/types/daemon/workspace/load-ready-skills.d.ts +7 -0
- package/dist/types/daemon/workspace/types.d.ts +415 -0
- package/dist/types/daemon-react-sdk.d.ts +319 -0
- package/dist/types/extensions/inputHighlight.d.ts +10 -0
- package/dist/types/hooks/daemonSessionMappers.d.ts +2 -0
- package/dist/types/hooks/useAnimationFrameTranscriptBlocks.d.ts +10 -0
- package/dist/types/hooks/useAnimationFrameValue.d.ts +1 -0
- package/dist/types/hooks/useAtMentionMenu.d.ts +72 -0
- package/dist/types/hooks/useAtMentionSources.d.ts +113 -0
- package/dist/types/hooks/useBackgroundTasks.d.ts +8 -0
- package/dist/types/hooks/useChatNavigationVisible.d.ts +2 -0
- package/dist/types/hooks/useComposerCore.d.ts +226 -0
- package/dist/types/hooks/useContextUsageControls.d.ts +26 -0
- package/dist/types/hooks/useCopiedFlash.d.ts +15 -0
- package/dist/types/hooks/useDelayedGlobalKeyDown.d.ts +1 -0
- package/dist/types/hooks/useExternalLinkOpener.d.ts +11 -0
- package/dist/types/hooks/useFileUpload.d.ts +62 -0
- package/dist/types/hooks/useFilterInput.d.ts +27 -0
- package/dist/types/hooks/useInputHistory.d.ts +17 -0
- package/dist/types/hooks/useIsLargeScreen.d.ts +20 -0
- package/dist/types/hooks/useIsTouchComposer.d.ts +36 -0
- package/dist/types/hooks/useListboxKeyboard.d.ts +42 -0
- package/dist/types/hooks/useMessages.d.ts +20 -0
- package/dist/types/hooks/useModelConfigurations.d.ts +11 -0
- package/dist/types/hooks/useNewSessionSuggestion.d.ts +26 -0
- package/dist/types/hooks/useOtherWorkspaceSessions.d.ts +11 -0
- package/dist/types/hooks/usePrefersReducedMotion.d.ts +1 -0
- package/dist/types/hooks/useQueuedPrompts.d.ts +74 -0
- package/dist/types/hooks/useScopedSessions.d.ts +65 -0
- package/dist/types/hooks/useSessionArtifacts.d.ts +10 -0
- package/dist/types/hooks/useSessionArtifactsChange.d.ts +12 -0
- package/dist/types/hooks/useSessionSources.d.ts +13 -0
- package/dist/types/hooks/useShallowMemo.d.ts +2 -0
- package/dist/types/hooks/useSharedNow.d.ts +1 -0
- package/dist/types/hooks/useStreamingLoadingMetrics.d.ts +19 -0
- package/dist/types/hooks/useTranscriptViewport.d.ts +31 -0
- package/dist/types/i18n.d.ts +14 -0
- package/dist/types/index.d.ts +69 -0
- package/dist/types/interactionBlockContext.d.ts +3 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/live/HotkeySetter.d.ts +16 -0
- package/dist/types/live/LiveVoiceButton.d.ts +7 -0
- package/dist/types/live/LiveVoiceSettingsCard.d.ts +9 -0
- package/dist/types/live/useLiveVoice.d.ts +17 -0
- package/dist/types/live/useLiveVoiceSetup.d.ts +19 -0
- package/dist/types/local-files/bridge-client.d.ts +207 -0
- package/dist/types/local-files/capabilities.d.ts +33 -0
- package/dist/types/local-files/directory-handle-store.d.ts +15 -0
- package/dist/types/local-files/local-directory.d.ts +130 -0
- package/dist/types/local-files/mcp-server.d.ts +57 -0
- package/dist/types/local-files/pick-directory.d.ts +49 -0
- package/dist/types/local-files/useLocalFilesBridge.d.ts +64 -0
- package/dist/types/main.d.ts +6 -0
- package/dist/types/mcpAppHostContext.d.ts +1 -0
- package/dist/types/midTurnDedup.d.ts +52 -0
- package/dist/types/monitorDetailsContext.d.ts +12 -0
- package/dist/types/notification-text.d.ts +8 -0
- package/dist/types/portalRoot.d.ts +2 -0
- package/dist/types/pwa-registration.d.ts +10 -0
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +121 -0
- package/dist/types/session-catalog/session-catalog-store.d.ts +143 -0
- package/dist/types/session-catalog/session-live-state-poll-interval.d.ts +2 -0
- package/dist/types/session-catalog/workspace-session-live-state.d.ts +20 -0
- package/dist/types/settings.d.ts +70 -0
- package/dist/types/shadowDom.d.ts +17 -0
- package/dist/types/subagentDetailsContext.d.ts +15 -0
- package/dist/types/themeContext.d.ts +12 -0
- package/dist/types/transcript.d.ts +33 -0
- package/dist/types/transcriptRenderMode.d.ts +5 -0
- package/dist/types/utils/ansi.d.ts +9 -0
- package/dist/types/utils/askUserPermission.d.ts +13 -0
- package/dist/types/utils/base64.d.ts +1 -0
- package/dist/types/utils/bounded-map.d.ts +11 -0
- package/dist/types/utils/clipboard.d.ts +31 -0
- package/dist/types/utils/commandDisplay.d.ts +7 -0
- package/dist/types/utils/composerInputState.d.ts +19 -0
- package/dist/types/utils/composerModels.d.ts +28 -0
- package/dist/types/utils/composerTag.d.ts +42 -0
- package/dist/types/utils/composerTasks.d.ts +16 -0
- package/dist/types/utils/contextUsage.d.ts +9 -0
- package/dist/types/utils/copyCommand.d.ts +18 -0
- package/dist/types/utils/cssUrlVar.d.ts +3 -0
- package/dist/types/utils/dialogLabels.d.ts +1 -0
- package/dist/types/utils/dom.d.ts +2 -0
- package/dist/types/utils/errorDetail.d.ts +1 -0
- package/dist/types/utils/escapeIntent.d.ts +29 -0
- package/dist/types/utils/externalOpen.d.ts +15 -0
- package/dist/types/utils/formatDateTime.d.ts +7 -0
- package/dist/types/utils/formatRelativeTime.d.ts +4 -0
- package/dist/types/utils/formatRuntime.d.ts +1 -0
- package/dist/types/utils/formatTokenCount.d.ts +13 -0
- package/dist/types/utils/gitModeIntent.d.ts +22 -0
- package/dist/types/utils/goalCondition.d.ts +43 -0
- package/dist/types/utils/goalControlRequest.d.ts +20 -0
- package/dist/types/utils/goalGate.d.ts +39 -0
- package/dist/types/utils/imageIngestion.d.ts +47 -0
- package/dist/types/utils/largePaste.d.ts +44 -0
- package/dist/types/utils/linkify.d.ts +19 -0
- package/dist/types/utils/localCommandQueue.d.ts +47 -0
- package/dist/types/utils/modelDisplay.d.ts +1 -0
- package/dist/types/utils/modelEncoding.d.ts +15 -0
- package/dist/types/utils/modelSwitchMessages.d.ts +4 -0
- package/dist/types/utils/monitorTasks.d.ts +3 -0
- package/dist/types/utils/planMode.d.ts +5 -0
- package/dist/types/utils/promptAdmission.d.ts +1 -0
- package/dist/types/utils/queueDrain.d.ts +21 -0
- package/dist/types/utils/remote-name-skeleton.d.ts +1 -0
- package/dist/types/utils/sentinelMessage.d.ts +4 -0
- package/dist/types/utils/sessionErrors.d.ts +2 -0
- package/dist/types/utils/sessionPath.d.ts +19 -0
- package/dist/types/utils/sessionPreparation.d.ts +77 -0
- package/dist/types/utils/slash-command-action.d.ts +3 -0
- package/dist/types/utils/slashSectionPlan.d.ts +26 -0
- package/dist/types/utils/splitUrl.d.ts +37 -0
- package/dist/types/utils/standalone-session-routing.d.ts +2 -0
- package/dist/types/utils/systemInfo.d.ts +26 -0
- package/dist/types/utils/taskActivity.d.ts +18 -0
- package/dist/types/utils/timeAgo.d.ts +10 -0
- package/dist/types/utils/todos.d.ts +165 -0
- package/dist/types/utils/unicodeConfusables.d.ts +1 -0
- package/dist/types/utils/unifiedDiff.d.ts +12 -0
- package/dist/types/utils/workflowTasks.d.ts +3 -0
- package/dist/types/utils/workspace.d.ts +34 -0
- package/dist/types/utils/workspaceColor.d.ts +15 -0
- package/dist/types/voice/VoiceButton.d.ts +16 -0
- package/dist/types/voice/use-voice-workspace-settings.d.ts +13 -0
- package/dist/types/voice/useVoiceCapture.d.ts +42 -0
- package/dist/types/voice/voice-workspace-target.d.ts +45 -0
- package/dist/types/voice/voiceModels.d.ts +23 -0
- package/dist/types/workflowDetailsContext.d.ts +11 -0
- package/package.json +102 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
7
|
+
import type { DaemonSessionClient, CreateSessionRequest, DaemonTranscriptStore, DaemonCapabilities } from '@qwen-code/sdk/daemon';
|
|
8
|
+
import { type TimerRef } from '../timing.js';
|
|
9
|
+
import type { ActivePrompt, AddDaemonSessionNotice, DaemonActivePromptState, DaemonConnectionState, DaemonPromptStatus, DaemonSessionActions, SettledPrompt, PendingSessionLoad, DaemonProductSessionContext } from './types.js';
|
|
10
|
+
interface RefBox<T> {
|
|
11
|
+
current: T;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveSessionRestoreTimeouts(capabilities: DaemonCapabilities | undefined): {
|
|
14
|
+
requestTimeoutMs: number;
|
|
15
|
+
watchdogTimeoutMs: number | undefined;
|
|
16
|
+
};
|
|
17
|
+
export interface CreateDaemonSessionActionsArgs {
|
|
18
|
+
store: DaemonTranscriptStore;
|
|
19
|
+
sessionRef: RefBox<DaemonSessionClient | undefined>;
|
|
20
|
+
activePromptsRef: RefBox<Map<string, ActivePrompt>>;
|
|
21
|
+
settledPromptsRef: RefBox<Map<string, SettledPrompt>>;
|
|
22
|
+
pendingSessionLoadRef: RefBox<PendingSessionLoad | undefined>;
|
|
23
|
+
pendingSessionLoadIdRef: RefBox<number>;
|
|
24
|
+
sessionConfigGeneration: WeakMap<DaemonSessionClient, number>;
|
|
25
|
+
sessionRecoveryGeneration: WeakMap<DaemonSessionClient, number>;
|
|
26
|
+
heartbeatSupportedRef: RefBox<boolean>;
|
|
27
|
+
manualSessionClearRef: RefBox<boolean>;
|
|
28
|
+
skipNextCleanupDetachSessionRef: RefBox<DaemonSessionClient | undefined>;
|
|
29
|
+
passiveAssistantDoneTimerRef: TimerRef;
|
|
30
|
+
/**
|
|
31
|
+
* Daemon-authoritative "a prompt is in flight" state and its owner,
|
|
32
|
+
* published by the host through `setDaemonActivePrompt`.
|
|
33
|
+
* `undefined` means no authority is available (a daemon without
|
|
34
|
+
* `workspace_session_live_state`, or a host that never wires it) and the
|
|
35
|
+
* silence-based heuristics stay in charge.
|
|
36
|
+
*/
|
|
37
|
+
daemonActivePromptRef: RefBox<DaemonActivePromptState | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* Settle the current session's restored-prompt snapshot (the `hasActivePrompt`
|
|
40
|
+
* flag `/load` returned). A restored prompt has no terminal handling in this
|
|
41
|
+
* browser — it can only be settled by the event stream — so the
|
|
42
|
+
* `setDaemonActivePrompt` backstop settles it when the daemon reports the
|
|
43
|
+
* turn finished. Returns whether a restored prompt was settled.
|
|
44
|
+
*/
|
|
45
|
+
settleRestoredActivePrompt: () => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Apply the provider's buffered transcript batch (`TRANSCRIPT_DISPATCH_BATCH_MS`)
|
|
48
|
+
* so a read of the store sees every event delivered so far. Every
|
|
49
|
+
* provider-side settle path flushes first; an action that settles a turn has
|
|
50
|
+
* to do the same or it reads a store up to one batch window stale.
|
|
51
|
+
*/
|
|
52
|
+
flushTranscript: () => void;
|
|
53
|
+
getCreateSessionRequest: () => CreateSessionRequest;
|
|
54
|
+
createDetachedSession: (workspaceCwd?: string, overrides?: Pick<CreateSessionRequest, 'approvalMode' | 'sourceType' | 'worktree' | 'branch'>) => Promise<DaemonSessionClient>;
|
|
55
|
+
createDetachedStandaloneSession: (overrides?: Pick<CreateSessionRequest, 'approvalMode' | 'modelServiceId'>) => Promise<DaemonSessionClient>;
|
|
56
|
+
getDefaultSessionContext: () => DaemonProductSessionContext | undefined;
|
|
57
|
+
getConnection: () => DaemonConnectionState;
|
|
58
|
+
getEventDetailMode: () => 'full' | 'summary';
|
|
59
|
+
hasSessionActivePrompt: () => boolean;
|
|
60
|
+
resetCurrentSessionActivePrompt: () => void;
|
|
61
|
+
restartEventStream: (sessionId: string) => void;
|
|
62
|
+
addNotice: AddDaemonSessionNotice;
|
|
63
|
+
setConnection: Dispatch<SetStateAction<DaemonConnectionState>>;
|
|
64
|
+
setPromptStatus: Dispatch<SetStateAction<DaemonPromptStatus>>;
|
|
65
|
+
setRestoreSessionId: Dispatch<SetStateAction<string | undefined>>;
|
|
66
|
+
setRestoreSessionContext: Dispatch<SetStateAction<DaemonProductSessionContext | undefined>>;
|
|
67
|
+
setRestoreMode: Dispatch<SetStateAction<'load' | 'resume'>>;
|
|
68
|
+
setRestoreSessionNonce: Dispatch<SetStateAction<number>>;
|
|
69
|
+
setAttachSessionNonce: Dispatch<SetStateAction<number>>;
|
|
70
|
+
setNewSessionNonce: Dispatch<SetStateAction<number>>;
|
|
71
|
+
clearLiveJournalRepair?: () => void;
|
|
72
|
+
onPromptAdmitted?: (owner: DaemonSessionClient, admission: {
|
|
73
|
+
promptId: string;
|
|
74
|
+
label: string;
|
|
75
|
+
blockId?: string;
|
|
76
|
+
}) => void;
|
|
77
|
+
onContinuationAdmitted?: (owner: DaemonSessionClient, promptId: string) => void;
|
|
78
|
+
onPromptRemoved?: (owner: DaemonSessionClient, promptId: string) => void;
|
|
79
|
+
}
|
|
80
|
+
export declare function getWorkspaceModelsAfterSessionClear(current: DaemonConnectionState): DaemonConnectionState['models'];
|
|
81
|
+
export declare function getConnectionAfterSessionClear(current: DaemonConnectionState, clearedSessionId: string | undefined, preserveWorkspaceMetadata?: boolean): DaemonConnectionState;
|
|
82
|
+
export declare function advanceSessionRecoveryGeneration(generations: WeakMap<DaemonSessionClient, number>, session: DaemonSessionClient): number;
|
|
83
|
+
export declare function createDaemonSessionActions({ store, sessionRef, activePromptsRef, settledPromptsRef, pendingSessionLoadRef, pendingSessionLoadIdRef, sessionConfigGeneration, sessionRecoveryGeneration, heartbeatSupportedRef, manualSessionClearRef, skipNextCleanupDetachSessionRef, passiveAssistantDoneTimerRef, daemonActivePromptRef, settleRestoredActivePrompt, flushTranscript, getCreateSessionRequest, createDetachedSession, createDetachedStandaloneSession, getDefaultSessionContext, getConnection, getEventDetailMode, hasSessionActivePrompt, resetCurrentSessionActivePrompt, restartEventStream, addNotice, setConnection, setPromptStatus, setRestoreSessionId, setRestoreSessionContext, setRestoreMode, setRestoreSessionNonce, setAttachSessionNonce, setNewSessionNonce, clearLiveJournalRepair, onPromptAdmitted, onContinuationAdmitted, onPromptRemoved, }: CreateDaemonSessionActionsArgs): DaemonSessionActions;
|
|
84
|
+
/**
|
|
85
|
+
* Key under which a shell command tracks its prompt in the active-prompt map.
|
|
86
|
+
* Shell commands run as their own prompt alongside a conversation turn, so they
|
|
87
|
+
* cannot share the plain session key.
|
|
88
|
+
*/
|
|
89
|
+
export declare function getShellPromptKey(sessionId: string): string;
|
|
90
|
+
/**
|
|
91
|
+
* Whether this browser has a prompt of any kind in flight for `sessionId`.
|
|
92
|
+
*
|
|
93
|
+
* Every active-prompt key scheme lives here. Readers that hand-rolled the
|
|
94
|
+
* membership check would silently miss a new prompt kind, and a reader that
|
|
95
|
+
* answers "no local prompt" for one that is running lets a lagging live-state
|
|
96
|
+
* sample settle a turn this browser is still driving (#9487).
|
|
97
|
+
*/
|
|
98
|
+
export declare function hasLocallySubmittedPrompt(activePrompts: ReadonlyMap<string, ActivePrompt>, sessionId: string): boolean;
|
|
99
|
+
export declare function getPromptSettledKey(sessionId: string, promptId: string): string;
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare function getStableClientId(clientId: string | undefined, sessionId?: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Read the client id persisted for `sessionId` without generating one. Returns
|
|
9
|
+
* `undefined` when nothing is stored (SSR, private-mode quota failure, or a
|
|
10
|
+
* session this client never attached). Callers use this to act on behalf of a
|
|
11
|
+
* NON-current session, where `getStableClientId`'s generate-on-miss would mint
|
|
12
|
+
* an unrelated id that is not attached to the target session.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getPersistedClientId(sessionId: string): string | undefined;
|
|
15
|
+
export declare function persistStableClientId(clientId: string | undefined, sessionId?: string): void;
|
|
16
|
+
export declare function detachDaemonClient(opts: {
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
token?: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
clientId?: string;
|
|
21
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare function extractHttpStatus(error: unknown): number | undefined;
|
|
7
|
+
export declare function isInvalidClientIdError(error: unknown): boolean;
|
|
8
|
+
export declare function isAcpChildCapacityError(error: unknown): boolean;
|
|
9
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export { DaemonSessionProvider, DEFAULT_MAX_BLOCKS, useDaemonActions, useOptionalDaemonActions, useDaemonSessionOwnerGuard, useDaemonWorkspaceEventSignals, useDaemonActiveTodoList, useDaemonConnection, useDaemonPendingPermissions, useDaemonPromptStatus, useDaemonSessionNotices, useDaemonStreamingState, useDaemonSession, useDaemonTranscriptBlocks, useDaemonTranscriptHistory, useDaemonTranscriptState, useDaemonTranscriptStore, useDaemonTurnNavigationState, useDaemonTurnNavigationStore, } from './DaemonSessionProvider.js';
|
|
7
|
+
export type { DaemonTranscriptHistory } from './DaemonSessionProvider.js';
|
|
8
|
+
export { createDaemonTurnNavigationStore } from './turn-navigation-store.js';
|
|
9
|
+
export type { CreateDaemonTurnNavigationStoreOptions, DaemonPromptAdmission, DaemonProvisionalTurn, DaemonSelectedTurnState, DaemonTurnIndexPage, DaemonTurnLocation, DaemonTurnNavigationClient, DaemonTurnNavigationError, DaemonTurnNavigationSession, DaemonTurnNavigationSnapshot, DaemonTurnNavigationStore, } from './turn-navigation-store.js';
|
|
10
|
+
export type { HistoricalTranscriptPage, HistoricalTranscriptRange, TranscriptBoundary, } from './transcript-page-table.js';
|
|
11
|
+
export type { DaemonCommandInfo, DaemonConnectionState, DaemonConnectionStatus, DaemonModelInfo, DaemonProductSessionContext, DaemonStandaloneConnectionState, DaemonNoticeCategory, DaemonNoticeOperation, DaemonNoticeSeverity, DaemonPromptFile, DaemonPromptImage, DaemonPromptStatus, DaemonReasoningControls, DaemonSessionActions, DaemonSessionContextValue, DaemonSessionNotice, DaemonSessionOwnerGuard, DaemonSessionOwnerSnapshot, DaemonSessionProviderProps, DaemonTokenUsage, DaemonTodoItem, DaemonTodoList, DaemonTodoPriority, DaemonTodoStatus, DaemonWorkspaceEventSignals, PendingPromptActionOptions, SendPromptOptions, SubmitPromptOptions, SubmitPromptResult, } from './types.js';
|
|
12
|
+
export { extractDaemonTodosFromToolBlock, hasDaemonActiveTodos, isDaemonSubAgentToolBlock, parseDaemonTodoItemsFromEntries, selectDaemonActiveTodoList, selectDaemonLatestTodoList, selectDaemonPendingPermissions, selectDaemonSubAgentToolBlocks, selectDaemonStreamingState, selectDaemonTodoLists, selectDaemonTranscriptStreamingState, } from './selectors.js';
|
|
13
|
+
export type { DaemonStreamingState } from './selectors.js';
|
|
14
|
+
export { toDaemonPromptContent } from './promptContent.js';
|
|
15
|
+
export { isMissingSessionHttpStatus } from './status.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type DaemonEvent } from '@qwen-code/sdk/daemon';
|
|
7
|
+
export interface LiveJournalRepairTarget {
|
|
8
|
+
marker: DaemonEvent;
|
|
9
|
+
promptId: string;
|
|
10
|
+
signature: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LiveJournalRepairSuffix {
|
|
13
|
+
events: DaemonEvent[];
|
|
14
|
+
terminal: DaemonEvent;
|
|
15
|
+
}
|
|
16
|
+
export declare function findLiveJournalRepairTarget(sessionId: string, liveJournal: readonly DaemonEvent[], lastEventId: number | undefined, replayDegraded: boolean): LiveJournalRepairTarget | undefined;
|
|
17
|
+
export declare function findLiveJournalRepairSuffix(replayEvents: readonly DaemonEvent[], promptId: string): LiveJournalRepairSuffix | undefined;
|
|
18
|
+
export declare function eventPromptId(event: DaemonEvent): string | undefined;
|
|
19
|
+
export declare function isLiveJournalMarker(event: DaemonEvent): boolean;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
7
|
+
import type { DaemonEvent, DaemonSessionContextStatus, DaemonSessionSupportedCommandsStatus, DaemonWorkspaceProvidersStatus, DaemonWorkspaceSkillsStatus, GoalSnapshotV2 } from '@qwen-code/sdk/daemon';
|
|
8
|
+
import type { DaemonCommandInfo, DaemonConnectionState, DaemonModelInfo, DaemonReasoningControls, DaemonTokenUsage } from './types.js';
|
|
9
|
+
export declare function mapProviderStatus(status: Pick<DaemonWorkspaceProvidersStatus, 'current' | 'approvalMode' | 'providers'> | undefined, preferredCurrentModel?: string): {
|
|
10
|
+
models: DaemonModelInfo[];
|
|
11
|
+
currentModel?: string;
|
|
12
|
+
currentMode?: string;
|
|
13
|
+
contextWindow?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function mapSessionContextModels(status: DaemonSessionContextStatus | undefined): {
|
|
16
|
+
models: DaemonModelInfo[];
|
|
17
|
+
currentModel?: string;
|
|
18
|
+
contextWindow?: number;
|
|
19
|
+
} | undefined;
|
|
20
|
+
export declare function mapReasoningControls(configOptions: unknown): DaemonReasoningControls | undefined;
|
|
21
|
+
export declare function mapSessionContextReasoning(status: DaemonSessionContextStatus | undefined): DaemonReasoningControls | undefined;
|
|
22
|
+
export declare function mapSupportedCommands(status: DaemonSessionSupportedCommandsStatus | undefined): {
|
|
23
|
+
commands: DaemonCommandInfo[];
|
|
24
|
+
skills: string[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Maps the session-less `/workspace/skills` status into slash-command entries.
|
|
28
|
+
*
|
|
29
|
+
* Session creation is deferred until the first prompt, so before any session
|
|
30
|
+
* exists the only way to populate skill-backed slash commands (e.g. `/review`)
|
|
31
|
+
* is this workspace-level status, which the daemon answers from `Config`'s
|
|
32
|
+
* SkillManager without a live session. The shape mirrors the skills portion of
|
|
33
|
+
* {@link mapSupportedCommands} so the deferred bootstrap and the post-attach
|
|
34
|
+
* snapshot stay consistent — except workspace status carries real descriptions
|
|
35
|
+
* and argument hints, which we surface here.
|
|
36
|
+
*/
|
|
37
|
+
export declare function mapWorkspaceSkills(status: DaemonWorkspaceSkillsStatus | undefined): {
|
|
38
|
+
commands: DaemonCommandInfo[];
|
|
39
|
+
skills: string[];
|
|
40
|
+
};
|
|
41
|
+
export declare function mergeCommands(...groups: DaemonCommandInfo[][]): DaemonCommandInfo[];
|
|
42
|
+
export declare function updateConnectionFromDaemonEvent(event: DaemonEvent, setConnection: Dispatch<SetStateAction<DaemonConnectionState>>): void;
|
|
43
|
+
/**
|
|
44
|
+
* Reconcile a `goal()` READ against whatever landed while it was in flight.
|
|
45
|
+
*
|
|
46
|
+
* A read the daemon answered while goal-less carries no `clearedGoal`
|
|
47
|
+
* tombstone, so `selectGoalState` derives the clear target from the goal a
|
|
48
|
+
* concurrent create installed meanwhile — accepting the clear AND tombstoning
|
|
49
|
+
* that goal's identity, after which its own later frames at the same revision
|
|
50
|
+
* are rejected as superseded. Stamp the read with the goal observed when it was
|
|
51
|
+
* ISSUED: a bare-null response may only clear the goal it actually observed.
|
|
52
|
+
*
|
|
53
|
+
* Returns `current` unchanged when the read is stale, so callers can compare
|
|
54
|
+
* identity to skip the state write entirely.
|
|
55
|
+
*/
|
|
56
|
+
export declare function selectGoalStateFromRead(current: GoalSnapshotV2 | undefined, incoming: GoalSnapshotV2, observedGoalId: string | undefined): GoalSnapshotV2;
|
|
57
|
+
export declare function selectGoalState(current: GoalSnapshotV2 | undefined, incoming: GoalSnapshotV2): GoalSnapshotV2;
|
|
58
|
+
export declare function getSessionDisplayName(state: Record<string, unknown> | undefined): string | undefined;
|
|
59
|
+
export declare function getCurrentMode(status: DaemonSessionContextStatus | undefined): string | undefined;
|
|
60
|
+
export declare function getPlanExecutionMode(status: DaemonSessionContextStatus | undefined): string | undefined;
|
|
61
|
+
export declare function getCurrentModel(status: DaemonSessionContextStatus | undefined): string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Latest usage token count carried in a replay snapshot, or undefined if
|
|
64
|
+
* no replayed event has one. Token usage is not part of the attach-time
|
|
65
|
+
* status fetches — it only arrives on streaming `session_update` events —
|
|
66
|
+
* so on session load the last usage-bearing replay event is the freshest
|
|
67
|
+
* count available.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getReplayTokenCount(events: readonly DaemonEvent[]): number | undefined;
|
|
70
|
+
export declare function getTokenCountFromUsage(usage: DaemonTokenUsage | undefined): number | undefined;
|
|
71
|
+
export declare function getReplayTokenUsage(events: readonly DaemonEvent[]): DaemonTokenUsage | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { PromptContentBlock } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import type { DaemonPromptFile, DaemonPromptImage } from './types.js';
|
|
8
|
+
export declare function attachmentUriForName(name: string): string;
|
|
9
|
+
export declare function withAttachmentTokens(text: string, attachmentUris: readonly string[]): string;
|
|
10
|
+
export declare function daemonPromptImageToBlob(image: DaemonPromptImage): Blob;
|
|
11
|
+
export declare function toDaemonPromptContent(text: string, images?: readonly DaemonPromptImage[], files?: readonly DaemonPromptFile[]): PromptContentBlock[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonToolTranscriptBlock, DaemonTranscriptBlock } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import type { DaemonPromptStatus, DaemonTodoItem, DaemonTodoList } from './types.js';
|
|
8
|
+
export type DaemonStreamingState = 'idle' | 'waiting' | 'responding' | 'thinking';
|
|
9
|
+
export declare function selectDaemonPendingPermissions(blocks: readonly DaemonTranscriptBlock[]): ReadonlyArray<Extract<DaemonTranscriptBlock, {
|
|
10
|
+
kind: 'permission';
|
|
11
|
+
}>>;
|
|
12
|
+
export declare function selectDaemonTodoLists(blocks: readonly DaemonTranscriptBlock[]): DaemonTodoList[];
|
|
13
|
+
export declare function selectDaemonLatestTodoList(blocks: readonly DaemonTranscriptBlock[]): DaemonTodoList | undefined;
|
|
14
|
+
export declare function selectDaemonActiveTodoList(blocks: readonly DaemonTranscriptBlock[]): DaemonTodoList | undefined;
|
|
15
|
+
export declare function extractDaemonTodosFromToolBlock(block: DaemonToolTranscriptBlock): DaemonTodoItem[] | undefined;
|
|
16
|
+
export declare function parseDaemonTodoItemsFromEntries(entries: readonly unknown[]): DaemonTodoItem[];
|
|
17
|
+
export declare function hasDaemonActiveTodos(items: readonly DaemonTodoItem[]): boolean;
|
|
18
|
+
export declare function isDaemonSubAgentToolBlock(block: DaemonToolTranscriptBlock): boolean;
|
|
19
|
+
export declare function selectDaemonSubAgentToolBlocks(blocks: readonly DaemonTranscriptBlock[]): DaemonToolTranscriptBlock[];
|
|
20
|
+
export declare function selectDaemonTranscriptStreamingState(blocks: readonly DaemonTranscriptBlock[]): Exclude<DaemonStreamingState, 'waiting'>;
|
|
21
|
+
export declare function selectDaemonStreamingState(blocks: readonly DaemonTranscriptBlock[], promptStatus?: DaemonPromptStatus): DaemonStreamingState;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonCapabilities, DaemonSession } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import type { DaemonProductSessionContext, DaemonStandaloneConnectionState } from './types.js';
|
|
8
|
+
export declare function resolveProviderSessionContext(sessionContext: DaemonProductSessionContext | undefined, workspaceCwd: string | undefined, inheritedWorkspaceCwd: string | undefined): DaemonProductSessionContext | undefined;
|
|
9
|
+
export declare function resolveActionSessionContext(sessionContext: DaemonProductSessionContext | undefined, workspaceCwd: string | undefined, fallback: DaemonProductSessionContext | undefined): DaemonProductSessionContext | undefined;
|
|
10
|
+
export declare function resolveLiveSessionWorkspaceCwd(capabilities: DaemonCapabilities): string;
|
|
11
|
+
export declare function sessionContextKey(context: DaemonProductSessionContext | undefined): string;
|
|
12
|
+
export declare function restoreSessionContextMatches(requested: DaemonProductSessionContext | undefined, active: DaemonProductSessionContext | undefined): boolean;
|
|
13
|
+
export declare function getDaemonErrorCode(error: unknown): string | undefined;
|
|
14
|
+
export declare function isSessionWriterBlockedCode(code: string | undefined): boolean;
|
|
15
|
+
export declare function isDaemonErrorExplicitlyNonRetryable(error: unknown): boolean;
|
|
16
|
+
export declare function getStandaloneConnectionState(session: DaemonSession | undefined): DaemonStandaloneConnectionState | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const MISSING_SESSION_HTTP_STATUSES: readonly [404, 410];
|
|
7
|
+
export declare function isMissingSessionHttpStatus(status: number | undefined): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Preserve 404/410 after heartbeat detects a missing session so a later
|
|
10
|
+
* status-less transport retry cannot hide the missing-session empty state.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveConnectionErrorStatus(nextStatus: number | undefined, currentStatus: number | undefined): number | undefined;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type DaemonEvent, type DaemonSessionTranscriptPage, type DaemonTranscriptBlock } from '@qwen-code/sdk/daemon';
|
|
7
|
+
export type FrozenTranscriptBoundaryRequest = {
|
|
8
|
+
kind: 'older';
|
|
9
|
+
beforeRecordId: string;
|
|
10
|
+
snapshot: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'cursor';
|
|
13
|
+
cursor: string;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'gap';
|
|
16
|
+
anchorRecordId: string;
|
|
17
|
+
afterRecordId: string;
|
|
18
|
+
snapshot: string;
|
|
19
|
+
beforeAnchor?: true;
|
|
20
|
+
};
|
|
21
|
+
export interface TranscriptGapResolution {
|
|
22
|
+
excludedRecordIds: readonly string[];
|
|
23
|
+
fromAnchor: boolean;
|
|
24
|
+
}
|
|
25
|
+
export type TranscriptBoundary = {
|
|
26
|
+
kind: 'end';
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'live';
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'cached';
|
|
31
|
+
rangeId: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'loadable';
|
|
34
|
+
request: FrozenTranscriptBoundaryRequest;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'loading';
|
|
37
|
+
request: FrozenTranscriptBoundaryRequest;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'error';
|
|
40
|
+
request: FrozenTranscriptBoundaryRequest;
|
|
41
|
+
retryable: boolean;
|
|
42
|
+
};
|
|
43
|
+
export interface HistoricalTranscriptPage {
|
|
44
|
+
id: string;
|
|
45
|
+
snapshot: string;
|
|
46
|
+
blocks: readonly DaemonTranscriptBlock[];
|
|
47
|
+
recordIds: ReadonlySet<string>;
|
|
48
|
+
firstRecordId?: string;
|
|
49
|
+
lastRecordId?: string;
|
|
50
|
+
retainedBytes: number;
|
|
51
|
+
turnBlockById: ReadonlyMap<string, string>;
|
|
52
|
+
newerRequest?: FrozenTranscriptBoundaryRequest;
|
|
53
|
+
}
|
|
54
|
+
export interface HistoricalTranscriptRange {
|
|
55
|
+
id: string;
|
|
56
|
+
anchorOrdinal: number;
|
|
57
|
+
anchorTurnId: string;
|
|
58
|
+
pageIds: readonly string[];
|
|
59
|
+
older: TranscriptBoundary;
|
|
60
|
+
newer: TranscriptBoundary;
|
|
61
|
+
}
|
|
62
|
+
export interface SequentialHistoricalTranscriptRange {
|
|
63
|
+
id: string;
|
|
64
|
+
beforeRecordId: string;
|
|
65
|
+
snapshot: string;
|
|
66
|
+
pageIds: readonly string[];
|
|
67
|
+
older: TranscriptBoundary;
|
|
68
|
+
newer: TranscriptBoundary;
|
|
69
|
+
}
|
|
70
|
+
export type HistoricalViewportRange = HistoricalTranscriptRange | SequentialHistoricalTranscriptRange;
|
|
71
|
+
export interface HistoricalTranscriptPageTableSnapshot {
|
|
72
|
+
pages: ReadonlyMap<string, HistoricalTranscriptPage>;
|
|
73
|
+
ranges: readonly HistoricalViewportRange[];
|
|
74
|
+
retainedBytes: number;
|
|
75
|
+
}
|
|
76
|
+
export interface MaterializedTranscriptPage {
|
|
77
|
+
blocks: readonly DaemonTranscriptBlock[];
|
|
78
|
+
nextBlockOrdinal: number;
|
|
79
|
+
encounteredRecordIds: readonly string[];
|
|
80
|
+
}
|
|
81
|
+
export interface HistoricalTranscriptPageTableOptions {
|
|
82
|
+
maxPages: number;
|
|
83
|
+
maxRetainedBytes: number;
|
|
84
|
+
materialize(events: readonly DaemonEvent[], nextBlockOrdinal: number, excludedRecordIds: ReadonlySet<string>): MaterializedTranscriptPage;
|
|
85
|
+
}
|
|
86
|
+
export interface AdmittedHistoricalTarget {
|
|
87
|
+
rangeId: string;
|
|
88
|
+
pageId: string;
|
|
89
|
+
blockId: string;
|
|
90
|
+
}
|
|
91
|
+
export declare class HistoricalTranscriptPageTooLargeError extends Error {
|
|
92
|
+
constructor();
|
|
93
|
+
}
|
|
94
|
+
export declare class HistoricalTranscriptWindowFullError extends Error {
|
|
95
|
+
constructor();
|
|
96
|
+
}
|
|
97
|
+
type BoundaryDirection = 'older' | 'newer';
|
|
98
|
+
export declare class HistoricalTranscriptPageTable {
|
|
99
|
+
private readonly options;
|
|
100
|
+
private snapshot;
|
|
101
|
+
private nextPageId;
|
|
102
|
+
private nextRangeId;
|
|
103
|
+
private nextBlockOrdinal;
|
|
104
|
+
private readonly rangeAccess;
|
|
105
|
+
private accessClock;
|
|
106
|
+
private selectedRangeId;
|
|
107
|
+
private selectedPageId;
|
|
108
|
+
private liveRecordIds;
|
|
109
|
+
private readonly viewportPins;
|
|
110
|
+
private readonly cachedBoundaryRequests;
|
|
111
|
+
constructor(options: HistoricalTranscriptPageTableOptions);
|
|
112
|
+
getSnapshot(): HistoricalTranscriptPageTableSnapshot;
|
|
113
|
+
reset(): void;
|
|
114
|
+
setLiveRecordIds(recordIds: Iterable<string>): void;
|
|
115
|
+
releaseLoadingBoundaries(): boolean;
|
|
116
|
+
findTurn(turnId: string): AdmittedHistoricalTarget | undefined;
|
|
117
|
+
select(rangeId: string, pageId: string): void;
|
|
118
|
+
clearSelection(): void;
|
|
119
|
+
setViewportAnchor(viewportId: string, pageId?: string): void;
|
|
120
|
+
admitBefore(beforeRecordId: string, snapshot: string, response: DaemonSessionTranscriptPage): AdmittedHistoricalTarget | undefined;
|
|
121
|
+
admitAnchor(ordinal: number, turnId: string, snapshot: string, response: DaemonSessionTranscriptPage): AdmittedHistoricalTarget;
|
|
122
|
+
private admitAnchorPage;
|
|
123
|
+
beginBoundaryLoad(rangeId: string, direction: BoundaryDirection): FrozenTranscriptBoundaryRequest | undefined;
|
|
124
|
+
reopenLiveBoundary(rangeId: string, beforeRecordId: string, snapshot: string): void;
|
|
125
|
+
failBoundaryLoad(rangeId: string, direction: BoundaryDirection, request: FrozenTranscriptBoundaryRequest, retryable: boolean): void;
|
|
126
|
+
cancelBoundaryLoad(rangeId: string, direction: BoundaryDirection, request: FrozenTranscriptBoundaryRequest): void;
|
|
127
|
+
admitBoundary(rangeId: string, direction: BoundaryDirection, snapshot: string, response: DaemonSessionTranscriptPage, recovery?: TranscriptGapResolution): void;
|
|
128
|
+
private admitBoundaryPage;
|
|
129
|
+
private materializePage;
|
|
130
|
+
private pageFromBlocks;
|
|
131
|
+
private assertPageFits;
|
|
132
|
+
private withNewerRequest;
|
|
133
|
+
private nextBoundary;
|
|
134
|
+
private finishBoundaryWithoutPage;
|
|
135
|
+
private allRecordIds;
|
|
136
|
+
private findOverlappingRange;
|
|
137
|
+
private cachedBoundary;
|
|
138
|
+
private boundaryKey;
|
|
139
|
+
private replaceRange;
|
|
140
|
+
private touch;
|
|
141
|
+
private evict;
|
|
142
|
+
private measureRetainedBytes;
|
|
143
|
+
private measureBoundaryBytes;
|
|
144
|
+
private restoreCachedBoundaries;
|
|
145
|
+
private restoreCachedBoundary;
|
|
146
|
+
}
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonEvent, DaemonSessionTranscriptPage, DaemonSessionTranscriptPageOptions, DaemonSessionTurnIndexEntry, DaemonSessionTurnIndexPage, DaemonSessionTurnIndexPageOptions, DaemonTranscriptBlock } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import { type HistoricalTranscriptPage, type HistoricalTranscriptRange, type HistoricalViewportRange, type MaterializedTranscriptPage } from './transcript-page-table.js';
|
|
8
|
+
export interface DaemonTurnIndexPage {
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
snapshot: string;
|
|
12
|
+
turns: readonly DaemonSessionTurnIndexEntry[];
|
|
13
|
+
retainedBytes: number;
|
|
14
|
+
}
|
|
15
|
+
export interface DaemonProvisionalTurn {
|
|
16
|
+
provisionalId: string;
|
|
17
|
+
promptId: string;
|
|
18
|
+
label: string;
|
|
19
|
+
blockId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DaemonTurnLocation {
|
|
22
|
+
turnId: string;
|
|
23
|
+
blockId: string;
|
|
24
|
+
view: 'live' | 'historical';
|
|
25
|
+
rangeId?: string;
|
|
26
|
+
pageId?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DaemonSelectedTurnState {
|
|
29
|
+
ordinal: number;
|
|
30
|
+
turnId?: string;
|
|
31
|
+
status: 'loading' | 'ready' | 'unavailable';
|
|
32
|
+
location?: DaemonTurnLocation;
|
|
33
|
+
}
|
|
34
|
+
export interface DaemonTurnNavigationError {
|
|
35
|
+
operation: 'index' | 'locate' | 'older' | 'newer';
|
|
36
|
+
message: string;
|
|
37
|
+
retryable: boolean;
|
|
38
|
+
rangeId?: string;
|
|
39
|
+
ordinal?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface DaemonTurnNavigationSnapshot {
|
|
42
|
+
sessionId?: string;
|
|
43
|
+
mode: 'legacy' | 'loading' | 'ready' | 'degraded';
|
|
44
|
+
fallbackReason?: 'unsupported' | 'too_large' | 'initial_error';
|
|
45
|
+
totalTurns: number;
|
|
46
|
+
effectiveTurnCount: number;
|
|
47
|
+
indexPages: ReadonlyMap<number, DaemonTurnIndexPage>;
|
|
48
|
+
provisionalTurns: readonly DaemonProvisionalTurn[];
|
|
49
|
+
historicalPages: ReadonlyMap<string, HistoricalTranscriptPage>;
|
|
50
|
+
historicalRanges: readonly HistoricalTranscriptRange[];
|
|
51
|
+
locations: ReadonlyMap<string, DaemonTurnLocation>;
|
|
52
|
+
selected?: DaemonSelectedTurnState;
|
|
53
|
+
error?: DaemonTurnNavigationError;
|
|
54
|
+
}
|
|
55
|
+
export interface DaemonTurnNavigationClient {
|
|
56
|
+
owner: object;
|
|
57
|
+
getTurnIndexPage(options: DaemonSessionTurnIndexPageOptions): Promise<DaemonSessionTurnIndexPage>;
|
|
58
|
+
getTranscriptPage(options: DaemonSessionTranscriptPageOptions): Promise<DaemonSessionTranscriptPage>;
|
|
59
|
+
materializeTranscriptEvents(events: readonly DaemonEvent[], nextBlockOrdinal: number, excludedRecordIds: ReadonlySet<string>): MaterializedTranscriptPage;
|
|
60
|
+
}
|
|
61
|
+
export interface DaemonTurnNavigationSession {
|
|
62
|
+
sessionId?: string;
|
|
63
|
+
supported: boolean;
|
|
64
|
+
client?: DaemonTurnNavigationClient;
|
|
65
|
+
}
|
|
66
|
+
export interface DaemonPromptAdmission {
|
|
67
|
+
promptId: string;
|
|
68
|
+
label: string;
|
|
69
|
+
blockId?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface DaemonTurnNavigationStore {
|
|
72
|
+
getSnapshot(): DaemonTurnNavigationSnapshot;
|
|
73
|
+
subscribe(listener: () => void): () => void;
|
|
74
|
+
configure(session: DaemonTurnNavigationSession): void;
|
|
75
|
+
observeLiveBlocks(blocks: readonly DaemonTranscriptBlock[]): void;
|
|
76
|
+
recordPromptAdmitted(admission: DaemonPromptAdmission): void;
|
|
77
|
+
recordPromptRemoved(promptId: string): void;
|
|
78
|
+
handleSessionEvent(type: string): void;
|
|
79
|
+
loadOrdinal(ordinal: number): Promise<void>;
|
|
80
|
+
locateOrdinal(ordinal: number): Promise<DaemonTurnLocation>;
|
|
81
|
+
refreshHead(): Promise<void>;
|
|
82
|
+
loadOlder(rangeId: string): Promise<void>;
|
|
83
|
+
loadNewer(rangeId: string): Promise<void>;
|
|
84
|
+
retry(): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
export interface DaemonHistoryViewportSnapshot {
|
|
87
|
+
sessionId?: string;
|
|
88
|
+
revision: number;
|
|
89
|
+
connected: boolean;
|
|
90
|
+
pages: ReadonlyMap<string, HistoricalTranscriptPage>;
|
|
91
|
+
ranges: readonly HistoricalViewportRange[];
|
|
92
|
+
}
|
|
93
|
+
export interface HistoryViewportRequest {
|
|
94
|
+
isCurrent(): boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface DaemonHistoryNavigationStore extends DaemonTurnNavigationStore {
|
|
97
|
+
locateViewportOrdinal(ordinal: number, request: HistoryViewportRequest, releaseAnchor: () => void): Promise<DaemonTurnLocation>;
|
|
98
|
+
getViewportSnapshot(): DaemonHistoryViewportSnapshot;
|
|
99
|
+
captureLiveBoundary(): LiveHistoryBoundary;
|
|
100
|
+
hasLiveOverlap(rangeId: string): boolean;
|
|
101
|
+
openBeforeLive(beforeRecordId: string, request: HistoryViewportRequest): Promise<string>;
|
|
102
|
+
setViewportAnchor(viewportId: string, pageId?: string): void;
|
|
103
|
+
loadViewportBoundary(rangeId: string, direction: 'older' | 'newer', request: HistoryViewportRequest, beforeAdmit?: () => void): Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
export interface CreateDaemonTurnNavigationStoreOptions {
|
|
106
|
+
captureLiveBoundary?: () => LiveHistoryBoundary;
|
|
107
|
+
indexPageSize?: number;
|
|
108
|
+
maxIndexPages?: number;
|
|
109
|
+
maxIndexBytes?: number;
|
|
110
|
+
maxHistoricalPages?: number;
|
|
111
|
+
maxHistoricalBytes?: number;
|
|
112
|
+
}
|
|
113
|
+
export interface LiveHistoryBoundary extends HistoryViewportRequest {
|
|
114
|
+
beforeRecordId?: string;
|
|
115
|
+
reachable: boolean;
|
|
116
|
+
}
|
|
117
|
+
export declare function createDaemonTurnNavigationStore(options?: CreateDaemonTurnNavigationStoreOptions): DaemonHistoryNavigationStore;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonEvent, DaemonTranscriptBlock } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import type { DaemonConnectionState, DaemonProductSessionContext } from './types.js';
|
|
8
|
+
export interface TurnNotificationTarget {
|
|
9
|
+
sessionId: string;
|
|
10
|
+
sessionContext: DaemonProductSessionContext;
|
|
11
|
+
}
|
|
12
|
+
export declare const TurnNotificationNavigationContext: import("react").Context<EventTarget | undefined>;
|
|
13
|
+
export interface TurnNotificationContent {
|
|
14
|
+
target?: TurnNotificationTarget;
|
|
15
|
+
sessionTitle?: string;
|
|
16
|
+
promptText?: string;
|
|
17
|
+
responseText?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface TurnNotification extends TurnNotificationContent {
|
|
20
|
+
key: string;
|
|
21
|
+
outcome: 'completed' | 'failed' | 'ended' | 'cancelled';
|
|
22
|
+
}
|
|
23
|
+
export interface TurnNotificationObserver {
|
|
24
|
+
retain(scope: string): () => void;
|
|
25
|
+
admit(scope: string, promptId: string, label?: string): void;
|
|
26
|
+
remove(scope: string, promptId: string): void;
|
|
27
|
+
observe(scope: string, sessionId: string, event: DaemonEvent, replay?: boolean, content?: TurnNotificationContent | (() => TurnNotificationContent | undefined)): void;
|
|
28
|
+
}
|
|
29
|
+
export declare const TurnNotificationContext: import("react").Context<TurnNotificationObserver | undefined>;
|
|
30
|
+
interface NotificationOwner {
|
|
31
|
+
sessionId: string;
|
|
32
|
+
workspaceCwd: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function useTurnNotificationBinding(baseUrl: string | undefined, connection: DaemonConnectionState): {
|
|
35
|
+
remember<T extends NotificationOwner>(owner: T, context: DaemonProductSessionContext): T;
|
|
36
|
+
activate: (owner: NotificationOwner) => string | undefined;
|
|
37
|
+
admit(owner: NotificationOwner, promptId: string, label?: string): void;
|
|
38
|
+
remove(owner: NotificationOwner, promptId: string): void;
|
|
39
|
+
observe(owner: NotificationOwner, event: DaemonEvent, replay?: boolean, content?: TurnNotificationContent | (() => TurnNotificationContent | undefined)): void;
|
|
40
|
+
};
|
|
41
|
+
export declare function getTurnNotificationContent(event: DaemonEvent, blocks: readonly DaemonTranscriptBlock[], sessionTitle: string | undefined): TurnNotificationContent | undefined;
|
|
42
|
+
export declare function createTurnNotificationObserver(notify: (notification: TurnNotification) => void): TurnNotificationObserver;
|
|
43
|
+
export {};
|