@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,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path-safe filesystem facade over one user-granted directory.
|
|
3
|
+
*
|
|
4
|
+
* Every path is relative to the granted root: the File System Access API gives
|
|
5
|
+
* no way to reach outside it, and the checks here exist so a model-supplied
|
|
6
|
+
* path cannot even *ask* for that (no absolute paths, no `..`, no backslashes).
|
|
7
|
+
*
|
|
8
|
+
* The handle types are structural rather than the DOM interfaces so this module
|
|
9
|
+
* is testable with an in-memory tree; a real `FileSystemDirectoryHandle`
|
|
10
|
+
* satisfies them as-is.
|
|
11
|
+
*/
|
|
12
|
+
export interface LocalFileLike {
|
|
13
|
+
readonly size: number;
|
|
14
|
+
readonly lastModified: number;
|
|
15
|
+
readonly type: string;
|
|
16
|
+
text(): Promise<string>;
|
|
17
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
18
|
+
}
|
|
19
|
+
export interface LocalFileWriterLike {
|
|
20
|
+
write(data: string): Promise<void>;
|
|
21
|
+
close(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export interface LocalFileHandleLike {
|
|
24
|
+
readonly kind: 'file';
|
|
25
|
+
readonly name: string;
|
|
26
|
+
getFile(): Promise<LocalFileLike>;
|
|
27
|
+
createWritable(): Promise<LocalFileWriterLike>;
|
|
28
|
+
}
|
|
29
|
+
export interface LocalDirectoryHandleLike {
|
|
30
|
+
readonly kind: 'directory';
|
|
31
|
+
readonly name: string;
|
|
32
|
+
getDirectoryHandle(name: string, options?: {
|
|
33
|
+
create?: boolean;
|
|
34
|
+
}): Promise<LocalDirectoryHandleLike>;
|
|
35
|
+
getFileHandle(name: string, options?: {
|
|
36
|
+
create?: boolean;
|
|
37
|
+
}): Promise<LocalFileHandleLike>;
|
|
38
|
+
values(): AsyncIterableIterator<unknown>;
|
|
39
|
+
}
|
|
40
|
+
export type LocalDirectoryErrorCode = 'invalid_path' | 'not_found' | 'not_a_directory' | 'not_a_file' | 'too_large' | 'binary_content' | 'permission_denied' | 'failed';
|
|
41
|
+
export declare class LocalDirectoryError extends Error {
|
|
42
|
+
readonly code: LocalDirectoryErrorCode;
|
|
43
|
+
constructor(code: LocalDirectoryErrorCode, message: string);
|
|
44
|
+
}
|
|
45
|
+
export interface LocalDirectoryLimits {
|
|
46
|
+
maxListEntries: number;
|
|
47
|
+
maxReadBytes: number;
|
|
48
|
+
maxWriteBytes: number;
|
|
49
|
+
maxSearchFiles: number;
|
|
50
|
+
maxSearchBytes: number;
|
|
51
|
+
maxSearchHits: number;
|
|
52
|
+
maxSearchDirs: number;
|
|
53
|
+
}
|
|
54
|
+
export declare const DEFAULT_LOCAL_DIRECTORY_LIMITS: LocalDirectoryLimits;
|
|
55
|
+
export interface LocalDirectoryEntry {
|
|
56
|
+
name: string;
|
|
57
|
+
path: string;
|
|
58
|
+
kind: 'file' | 'directory';
|
|
59
|
+
size?: number;
|
|
60
|
+
lastModified?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface LocalReadResult {
|
|
63
|
+
path: string;
|
|
64
|
+
content: string;
|
|
65
|
+
totalLines: number;
|
|
66
|
+
returnedLines: number;
|
|
67
|
+
/** True when more lines remain below the returned window. */
|
|
68
|
+
truncated: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface LocalWriteResult {
|
|
71
|
+
path: string;
|
|
72
|
+
bytes: number;
|
|
73
|
+
created: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface LocalSearchHit {
|
|
76
|
+
path: string;
|
|
77
|
+
line: number;
|
|
78
|
+
text: string;
|
|
79
|
+
}
|
|
80
|
+
export interface LocalSearchResult {
|
|
81
|
+
pattern: string;
|
|
82
|
+
hits: LocalSearchHit[];
|
|
83
|
+
filesScanned: number;
|
|
84
|
+
bytesScanned: number;
|
|
85
|
+
/** Files seen but not searched: over the read cap, binary, or unreadable. */
|
|
86
|
+
filesSkipped: number;
|
|
87
|
+
/** Directory skeletons walked; bounded by its own cap, not maxFiles. */
|
|
88
|
+
dirsScanned: number;
|
|
89
|
+
truncated: boolean;
|
|
90
|
+
truncatedBy: 'hits' | 'files' | 'bytes' | 'directories' | null;
|
|
91
|
+
}
|
|
92
|
+
export interface LocalListResult {
|
|
93
|
+
entries: LocalDirectoryEntry[];
|
|
94
|
+
/** True when the listing stopped at the cap and more entries exist. */
|
|
95
|
+
truncated: boolean;
|
|
96
|
+
limit: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Split a caller-supplied path into segments under the granted root. Throws
|
|
100
|
+
* `invalid_path` for anything that could escape it or that the API cannot
|
|
101
|
+
* address: absolute paths, drive letters, backslashes, `..`, empty segments,
|
|
102
|
+
* and control characters.
|
|
103
|
+
*
|
|
104
|
+
* Resolution is verbatim (no whole-input trim): `list()` and `search()` echo
|
|
105
|
+
* entry names as-is, and a name with leading or trailing whitespace is legal
|
|
106
|
+
* on POSIX — trimming here would resolve ` draft.md` to `draft.md` and let a
|
|
107
|
+
* read-modify-write cycle clobber the wrong file.
|
|
108
|
+
*/
|
|
109
|
+
export declare function splitRelativePath(path: unknown): string[];
|
|
110
|
+
export declare class LocalDirectory {
|
|
111
|
+
private readonly root;
|
|
112
|
+
private readonly limits;
|
|
113
|
+
constructor(root: LocalDirectoryHandleLike, limits?: LocalDirectoryLimits);
|
|
114
|
+
/** Display name of the granted root (the directory's own name). */
|
|
115
|
+
get name(): string;
|
|
116
|
+
private resolveDirectory;
|
|
117
|
+
list(path: string, limit?: number): Promise<LocalListResult>;
|
|
118
|
+
read(path: string, offset?: number, limit?: number): Promise<LocalReadResult>;
|
|
119
|
+
write(path: string, content: string): Promise<LocalWriteResult>;
|
|
120
|
+
/**
|
|
121
|
+
* Literal substring search (case-sensitive) over text files. Not a regex:
|
|
122
|
+
* a model-supplied pattern is untrusted input, and a literal scan has no
|
|
123
|
+
* catastrophic-backtracking failure mode.
|
|
124
|
+
*/
|
|
125
|
+
search(pattern: string, options?: {
|
|
126
|
+
path?: string;
|
|
127
|
+
maxFiles?: number;
|
|
128
|
+
maxBytes?: number;
|
|
129
|
+
}): Promise<LocalSearchResult>;
|
|
130
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The browser side of the local-files bridge: a minimal MCP server that answers
|
|
3
|
+
* the daemon's reverse-channel JSON-RPC and executes every call against the
|
|
4
|
+
* user-granted directory.
|
|
5
|
+
*
|
|
6
|
+
* Hand-rolled rather than the MCP SDK — the daemon's client only drives
|
|
7
|
+
* initialize / tools/list / tools/call (plus prompts/resources probes, which
|
|
8
|
+
* get empty answers), and pulling the SDK into the browser bundle for four
|
|
9
|
+
* methods is not a trade worth making.
|
|
10
|
+
*
|
|
11
|
+
* The handshake must be idempotent: one `mcp_register` drives a full discovery
|
|
12
|
+
* pass per registration target, so a session-bound bridge is initialized more
|
|
13
|
+
* than once (measured: 2 handshakes for one session).
|
|
14
|
+
*/
|
|
15
|
+
import type { LocalListResult, LocalReadResult, LocalSearchResult, LocalWriteResult } from './local-directory.js';
|
|
16
|
+
export declare const LOCAL_FILES_SERVER_NAME = "local-files";
|
|
17
|
+
export declare const LOCAL_FILES_SERVER_VERSION = "1.0.0";
|
|
18
|
+
/** Fallback when the client does not state one; we echo whatever it sends. */
|
|
19
|
+
export declare const LOCAL_FILES_PROTOCOL_VERSION = "2024-11-05";
|
|
20
|
+
export interface JsonRpcRequest {
|
|
21
|
+
jsonrpc?: string;
|
|
22
|
+
id?: number | string | null;
|
|
23
|
+
method?: string;
|
|
24
|
+
params?: unknown;
|
|
25
|
+
}
|
|
26
|
+
export interface JsonRpcResponse {
|
|
27
|
+
jsonrpc: '2.0';
|
|
28
|
+
id: number | string | null;
|
|
29
|
+
result?: unknown;
|
|
30
|
+
error?: {
|
|
31
|
+
code: number;
|
|
32
|
+
message: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** The slice of {@link LocalDirectory} this server drives. */
|
|
36
|
+
export interface LocalFilesFs {
|
|
37
|
+
readonly name: string;
|
|
38
|
+
list(path: string, limit?: number): Promise<LocalListResult>;
|
|
39
|
+
read(path: string, offset?: number, limit?: number): Promise<LocalReadResult>;
|
|
40
|
+
write(path: string, content: string): Promise<LocalWriteResult>;
|
|
41
|
+
search(pattern: string, options?: {
|
|
42
|
+
path?: string;
|
|
43
|
+
maxFiles?: number;
|
|
44
|
+
maxBytes?: number;
|
|
45
|
+
}): Promise<LocalSearchResult>;
|
|
46
|
+
}
|
|
47
|
+
export declare class LocalFilesMcpServer {
|
|
48
|
+
private readonly fs;
|
|
49
|
+
constructor(fs: LocalFilesFs);
|
|
50
|
+
/**
|
|
51
|
+
* Answer one inbound JSON-RPC message. Returns `undefined` for notifications,
|
|
52
|
+
* which must not be replied to.
|
|
53
|
+
*/
|
|
54
|
+
handle(message: JsonRpcRequest): Promise<JsonRpcResponse | undefined>;
|
|
55
|
+
private dispatch;
|
|
56
|
+
private callTool;
|
|
57
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grant acquisition and recovery for the local-files bridge.
|
|
3
|
+
*
|
|
4
|
+
* Two paths, because the browser splits them: `pickDirectoryHandle` needs a
|
|
5
|
+
* user gesture and opens the native picker; `ensureReadwritePermission` reports
|
|
6
|
+
* whether an already-stored handle can be used silently. Chrome may answer
|
|
7
|
+
* `granted` after a reload (persistent permission) or `prompt`, and `prompt`
|
|
8
|
+
* can only be cleared by another real gesture — `requestPermission()` consumes
|
|
9
|
+
* the activation that a page load does not have. The UI therefore needs a
|
|
10
|
+
* reconnect affordance even though the common case is silent.
|
|
11
|
+
*/
|
|
12
|
+
import { type LocalFilesBlocker, type LocalFilesWindowLike } from './capabilities.js';
|
|
13
|
+
export type PickResult = {
|
|
14
|
+
kind: 'picked';
|
|
15
|
+
handle: FileSystemDirectoryHandle;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'cancelled';
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'unavailable';
|
|
20
|
+
blocker: Exclude<LocalFilesBlocker, null>;
|
|
21
|
+
}
|
|
22
|
+
/** The picker existed and was invoked, but the grant itself failed. */
|
|
23
|
+
| {
|
|
24
|
+
kind: 'failed';
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
export interface DirectoryPickerLike {
|
|
28
|
+
(options?: {
|
|
29
|
+
id?: string;
|
|
30
|
+
mode?: 'read' | 'readwrite';
|
|
31
|
+
}): Promise<FileSystemDirectoryHandle>;
|
|
32
|
+
}
|
|
33
|
+
export declare function pickDirectoryHandle(win: LocalFilesWindowLike): Promise<PickResult>;
|
|
34
|
+
export interface PermissionResult {
|
|
35
|
+
state: PermissionState;
|
|
36
|
+
/**
|
|
37
|
+
* True when `requestPermission` ran and consumed the click's transient
|
|
38
|
+
* activation — including when it ended in denial, in which case a picker
|
|
39
|
+
* opened in the same click would fail gesture-less.
|
|
40
|
+
*/
|
|
41
|
+
requested: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Report — and optionally ask for — readwrite access to a stored handle. Pass
|
|
45
|
+
* `allowRequest: true` only from inside a real click handler.
|
|
46
|
+
*/
|
|
47
|
+
export declare function ensureReadwritePermission(handle: FileSystemDirectoryHandle, options?: {
|
|
48
|
+
allowRequest?: boolean;
|
|
49
|
+
}): Promise<PermissionResult>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 4d — React wiring for the local-files bridge.
|
|
3
|
+
*
|
|
4
|
+
* Owns the whole lifecycle the design doc describes: probe the context, restore
|
|
5
|
+
* a stored grant silently when the browser allows it, otherwise wait for a real
|
|
6
|
+
* click, then run {@link LocalFilesBridge} bound to the active session.
|
|
7
|
+
*
|
|
8
|
+
* Three rules here come from measurement, not preference:
|
|
9
|
+
* - `requestPermission()` consumes user activation, so a `prompt` state can
|
|
10
|
+
* only be cleared from inside a click handler — never from an effect.
|
|
11
|
+
* - Session-scoped registration emits no workspace event, so nothing outside
|
|
12
|
+
* this hook will report that the bridge came or went; this status is the
|
|
13
|
+
* only source of truth.
|
|
14
|
+
* - Registration needs a live session AND a live ACP channel, so a granted
|
|
15
|
+
* handle is kept even when no session exists yet, and the bridge starts the
|
|
16
|
+
* moment one appears.
|
|
17
|
+
*/
|
|
18
|
+
import { type AcpWorkspaceSelector, type LockManagerLike, type OpenSocket } from './bridge-client.js';
|
|
19
|
+
import { type LocalFilesBlocker, type LocalFilesWindowLike } from './capabilities.js';
|
|
20
|
+
import { type DirectoryHandleStore } from './directory-handle-store.js';
|
|
21
|
+
export type LocalFilesPhase = 'unavailable' | 'needs-session' | 'idle' | 'needs-gesture' | 'held-elsewhere' | 'connecting' | 'registering' | 'connected' | 'reconnecting' | 'failed';
|
|
22
|
+
export interface LocalFilesStatus {
|
|
23
|
+
phase: LocalFilesPhase;
|
|
24
|
+
/** Set when `phase` is 'unavailable'. */
|
|
25
|
+
blocker: LocalFilesBlocker;
|
|
26
|
+
/** Granted directory name, once known. */
|
|
27
|
+
rootName?: string;
|
|
28
|
+
toolCount?: number;
|
|
29
|
+
/** Reason for 'failed' / 'reconnecting', or a picker error. */
|
|
30
|
+
message?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface UseLocalFilesBridgeOptions {
|
|
33
|
+
/** The session the bridge binds to; undefined until one exists. */
|
|
34
|
+
sessionId: string | undefined;
|
|
35
|
+
baseUrl: string;
|
|
36
|
+
token?: string;
|
|
37
|
+
/** Re-warm the ACP child before a registration retry. */
|
|
38
|
+
rewarm?: () => Promise<void>;
|
|
39
|
+
openSocket?: OpenSocket;
|
|
40
|
+
locks?: LockManagerLike | null;
|
|
41
|
+
store?: DirectoryHandleStore | null;
|
|
42
|
+
win?: LocalFilesWindowLike;
|
|
43
|
+
/** Test seam for the bridge's backoff delays. */
|
|
44
|
+
delay?: (ms: number) => Promise<void>;
|
|
45
|
+
/** The session's workspace when not the primary one; see the bridge. */
|
|
46
|
+
workspaceSelector?: AcpWorkspaceSelector;
|
|
47
|
+
/**
|
|
48
|
+
* Deployment-level blocker the browser probe cannot see (the session's
|
|
49
|
+
* workspace is untrusted or live): withholds the bridge entirely.
|
|
50
|
+
*/
|
|
51
|
+
withheldBlocker?: LocalFilesBlocker;
|
|
52
|
+
}
|
|
53
|
+
export declare function useLocalFilesBridge(options: UseLocalFilesBridgeOptions): {
|
|
54
|
+
status: LocalFilesStatus;
|
|
55
|
+
capability: {
|
|
56
|
+
blocker: "unsupported-browser" | "insecure-context" | "cross-origin-frame" | "workspace-ineligible" | "workspace-resolving" | "unsupported-daemon" | null;
|
|
57
|
+
pickerAvailable: boolean;
|
|
58
|
+
secureContext: boolean;
|
|
59
|
+
frame: import("./capabilities.js").LocalFilesFrame;
|
|
60
|
+
};
|
|
61
|
+
connect: () => Promise<void>;
|
|
62
|
+
disconnect: () => Promise<void>;
|
|
63
|
+
restore: () => Promise<void>;
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const McpAppHostContext: import("react").Context<string | undefined>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export interface MidTurnQueueItem {
|
|
7
|
+
text: string;
|
|
8
|
+
images?: unknown[];
|
|
9
|
+
files?: unknown[];
|
|
10
|
+
midTurnState?: 'submitting' | 'queued';
|
|
11
|
+
midTurnMessageId?: string;
|
|
12
|
+
isInserting?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface MidTurnInjectedBatch {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
messages: readonly string[];
|
|
17
|
+
messageIds?: readonly string[];
|
|
18
|
+
/** Trusted client id that queued the messages (from the SSE envelope). */
|
|
19
|
+
originatorClientId?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Reconcile injected mid-turn messages against the local pending queue: remove
|
|
23
|
+
* the entry matching each injected message for `sessionId`, across ALL `batches`
|
|
24
|
+
* (a multi-batch turn drains once per tool batch, so the consumer must process
|
|
25
|
+
* every accumulated batch, not just the latest).
|
|
26
|
+
*
|
|
27
|
+
* Each injected message is matched in two passes. The first pass is a strict
|
|
28
|
+
* `midTurnMessageId` match (the daemon mints an id at admission and echoes it on
|
|
29
|
+
* injection); it wins regardless of array position, so two same-text sends can't
|
|
30
|
+
* steal each other's removal when their admission responses arrive out of order.
|
|
31
|
+
* Image rows are only matched here — the id proves the daemon owns them, while
|
|
32
|
+
* a text comparison can't verify their attachments. File rows are never
|
|
33
|
+
* matched — files are not pushed mid-turn, so they stay queued for the next
|
|
34
|
+
* turn. Only when no id match exists does the second pass fall back to the
|
|
35
|
+
* first text-only entry with matching text — any mid-turn row when the batch
|
|
36
|
+
* carries no ids (older daemon), or a still-`submitting` row that hasn't
|
|
37
|
+
* received its id yet. Matching stays count-based — one removal per injected
|
|
38
|
+
* message — so a queue that holds the same text twice loses one entry per
|
|
39
|
+
* matching injection. An entry that already fell back to the ordinary path
|
|
40
|
+
* (`midTurnState === undefined`) is never matched.
|
|
41
|
+
*
|
|
42
|
+
* Text fallback skips batches from another originator so coincidentally equal
|
|
43
|
+
* messages are not removed. In strict-id mode, an exact id still wins because
|
|
44
|
+
* a refreshed client can adopt a session-wide daemon-owned row.
|
|
45
|
+
*
|
|
46
|
+
* Returns a NEW array when something was removed, or `null` when nothing matched
|
|
47
|
+
* (so the caller can skip a redundant state update). `strictMessageIds`
|
|
48
|
+
* disables the submitting-row text fallback for daemons that accept the
|
|
49
|
+
* client-generated ids used by reconciliation; older daemons still need the
|
|
50
|
+
* fallback because they mint their id after the request arrives.
|
|
51
|
+
*/
|
|
52
|
+
export declare function removeInjectedFromQueue<T extends MidTurnQueueItem>(prompts: readonly T[], batches: readonly MidTurnInjectedBatch[], sessionId: string, clientId?: string, strictMessageIds?: boolean): T[] | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ACPToolCall } from './adapters/types';
|
|
3
|
+
export type OpenMonitorDetails = (tool: ACPToolCall) => Promise<boolean>;
|
|
4
|
+
interface MonitorDetailsContextValue {
|
|
5
|
+
onOpen: OpenMonitorDetails;
|
|
6
|
+
}
|
|
7
|
+
export declare function MonitorDetailsProvider({ onOpen, children, }: {
|
|
8
|
+
onOpen: OpenMonitorDetails;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useMonitorDetails(): MonitorDetailsContextValue | undefined;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const MAX_NOTIFICATION_SOURCE_LENGTH = 4096;
|
|
7
|
+
export declare function notificationTextLines(text: string): string[];
|
|
8
|
+
export declare function notificationExcerpt(text: string, limit: number): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ServiceWorkerRegistrationOptions {
|
|
2
|
+
production: boolean;
|
|
3
|
+
root?: Pick<HTMLElement, 'hasAttribute'>;
|
|
4
|
+
serviceWorker?: Pick<ServiceWorkerContainer, 'register'>;
|
|
5
|
+
addLoadListener?: (listener: () => void) => void;
|
|
6
|
+
warn?: (...args: unknown[]) => void;
|
|
7
|
+
}
|
|
8
|
+
/** Schedule standalone PWA registration after the initial document load. */
|
|
9
|
+
export declare function scheduleServiceWorkerRegistration({ production, root, serviceWorker, addLoadListener, warn, }: ServiceWorkerRegistrationOptions): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { DaemonClient, DaemonBackgroundTurn, DaemonSessionArchiveState, DaemonSessionSummary } from '@qwen-code/sdk/daemon';
|
|
2
|
+
import { type SessionCatalogQuery, type SessionCatalogSnapshot } from './session-catalog-store';
|
|
3
|
+
interface SessionCatalogHookOptions {
|
|
4
|
+
autoLoad?: boolean;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
maxAgeMs?: number;
|
|
7
|
+
pollIntervalMs?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface WebShellSessionsOptions extends SessionCatalogHookOptions {
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
cursor?: string;
|
|
12
|
+
archiveState?: DaemonSessionArchiveState;
|
|
13
|
+
view?: 'organized';
|
|
14
|
+
group?: string;
|
|
15
|
+
sourceType?: string;
|
|
16
|
+
sourceId?: string;
|
|
17
|
+
parentSessionId?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function useSessionCatalogQuery(client: DaemonClient, query: SessionCatalogQuery | undefined, options?: SessionCatalogHookOptions): {
|
|
20
|
+
sessions: DaemonSessionSummary[];
|
|
21
|
+
nextCursor: string | undefined;
|
|
22
|
+
liveMergeFailed: boolean;
|
|
23
|
+
truncated: boolean;
|
|
24
|
+
reload: (options?: {
|
|
25
|
+
interactive?: boolean;
|
|
26
|
+
}) => Promise<import("@qwen-code/sdk/daemon").DaemonSessionListPage> | Promise<undefined>;
|
|
27
|
+
page?: import("@qwen-code/sdk/daemon").DaemonSessionListPage;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
stale: boolean;
|
|
30
|
+
error?: Error;
|
|
31
|
+
updatedAt?: number;
|
|
32
|
+
};
|
|
33
|
+
export declare function useSessionCatalogQueries(client: DaemonClient, queries: readonly SessionCatalogQuery[], options?: SessionCatalogHookOptions): readonly SessionCatalogSnapshot[];
|
|
34
|
+
/**
|
|
35
|
+
* Whether the daemon reports a prompt in flight for `sessionId`, together with
|
|
36
|
+
* whether that answer is allowed to *settle* a running turn.
|
|
37
|
+
*
|
|
38
|
+
* Only a live-state response observed after this session became the target is
|
|
39
|
+
* `authoritative`. A cached response can still light the indicator, but cannot
|
|
40
|
+
* settle a newer `/load` snapshot. The catalog-page fallback cannot settle
|
|
41
|
+
* either: the page is bounded, so a running session may simply have fallen off
|
|
42
|
+
* a fresher first page (#9487).
|
|
43
|
+
*/
|
|
44
|
+
export declare function useSessionActivePromptState(client: DaemonClient, workspaceCwd: string | undefined, sessionId: string | undefined): {
|
|
45
|
+
hasActivePrompt: boolean;
|
|
46
|
+
activeWorkState: DaemonSessionSummary['activeWorkState'];
|
|
47
|
+
backgroundTurn?: DaemonBackgroundTurn;
|
|
48
|
+
authoritative: boolean;
|
|
49
|
+
observationRevision: number | undefined;
|
|
50
|
+
requestStartedAt?: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Read the daemon's live prompt state for the surrounding
|
|
54
|
+
* `DaemonSessionProvider`'s session, and publish it back into that provider.
|
|
55
|
+
*
|
|
56
|
+
* Every view that owns a provider needs its own bridge: a split pane and a
|
|
57
|
+
* side task each mount one (via ChatPane), and each is an observer of a turn
|
|
58
|
+
* it did not submit — the case where the event stream alone cannot tell a long
|
|
59
|
+
* silent tool call from a finished turn (#9487). Publishing `undefined` while
|
|
60
|
+
* the answer is unknown leaves that provider's pre-existing heuristics alone.
|
|
61
|
+
*
|
|
62
|
+
* Returns both live facts for callers that need them; the boolean wrapper
|
|
63
|
+
* below preserves the existing prompt-only API.
|
|
64
|
+
*/
|
|
65
|
+
export declare function useDaemonSessionActivityBridge(client: DaemonClient, workspaceCwd: string | undefined, sessionId: string | undefined): {
|
|
66
|
+
hasActivePrompt: boolean;
|
|
67
|
+
activeWorkState: DaemonSessionSummary['activeWorkState'];
|
|
68
|
+
};
|
|
69
|
+
export declare function useDaemonActivePromptBridge(client: DaemonClient, workspaceCwd: string | undefined, sessionId: string | undefined): boolean;
|
|
70
|
+
export declare function useSessionCatalogPolling(client: DaemonClient, query: SessionCatalogQuery | undefined, pollIntervalMs: number | undefined): void;
|
|
71
|
+
export declare function useSessionCatalogController(client: DaemonClient): {
|
|
72
|
+
refreshQueries(queries: readonly SessionCatalogQuery[]): void;
|
|
73
|
+
invalidateWorkspace(workspaceCwd: string): void;
|
|
74
|
+
refreshWorkspace(workspaceCwd: string): void;
|
|
75
|
+
sessionCreated(workspaceCwd: string, _sessionId: string): void;
|
|
76
|
+
promptAdmitted(workspaceCwd: string, sessionId: string): void;
|
|
77
|
+
promptAdmissionUncertain(workspaceCwd: string): void;
|
|
78
|
+
renamed(workspaceCwd: string, sessionId: string, displayName: string): void;
|
|
79
|
+
toggleSessionPinned(workspaceCwd: string, session: DaemonSessionSummary, toggle: {
|
|
80
|
+
pinned: boolean;
|
|
81
|
+
pinnedAt?: string;
|
|
82
|
+
}): void;
|
|
83
|
+
turnCompleted(workspaceCwd: string, sessionId: string): void;
|
|
84
|
+
};
|
|
85
|
+
export declare function useWebShellSessions(options?: WebShellSessionsOptions): {
|
|
86
|
+
data: DaemonSessionSummary[] | undefined;
|
|
87
|
+
sessions: DaemonSessionSummary[];
|
|
88
|
+
loading: boolean;
|
|
89
|
+
error: Error | undefined;
|
|
90
|
+
reload: (reloadOptions?: {
|
|
91
|
+
interactive?: boolean;
|
|
92
|
+
}) => Promise<DaemonSessionSummary[] | undefined>;
|
|
93
|
+
nextCursor: string | undefined;
|
|
94
|
+
liveMergeFailed: boolean;
|
|
95
|
+
truncated: boolean;
|
|
96
|
+
loadSession: ((sessionId: string, options?: {
|
|
97
|
+
workspaceCwd?: string;
|
|
98
|
+
sessionContext?: import("@qwen-code/web-shell/daemon-react-sdk").DaemonProductSessionContext;
|
|
99
|
+
}) => Promise<void>) | undefined;
|
|
100
|
+
resumeSession: ((sessionId: string, options?: {
|
|
101
|
+
workspaceCwd?: string;
|
|
102
|
+
sessionContext?: import("@qwen-code/web-shell/daemon-react-sdk").DaemonProductSessionContext;
|
|
103
|
+
}) => Promise<void>) | undefined;
|
|
104
|
+
newSession: (() => Promise<void>) | undefined;
|
|
105
|
+
releaseSession: ((sessionId: string) => Promise<void>) | undefined;
|
|
106
|
+
releaseSessionAction: ((sessionId: string) => Promise<void>) | undefined;
|
|
107
|
+
deleteSession: (sessionId: string) => Promise<boolean>;
|
|
108
|
+
deleteSessions: (sessionIds: string[]) => Promise<{
|
|
109
|
+
removed: string[];
|
|
110
|
+
notFound: string[];
|
|
111
|
+
errors: Array<{
|
|
112
|
+
sessionId: string;
|
|
113
|
+
error: string;
|
|
114
|
+
}>;
|
|
115
|
+
}>;
|
|
116
|
+
exportSession: (sessionId: string, format?: import("@qwen-code/sdk/daemon").DaemonSessionExportFormat) => Promise<import("@qwen-code/sdk/daemon").DaemonSessionExportResult>;
|
|
117
|
+
archiveSession: (sessionId: string) => Promise<boolean>;
|
|
118
|
+
unarchiveSession: (sessionId: string) => Promise<boolean>;
|
|
119
|
+
catalogQuery: SessionCatalogQuery | undefined;
|
|
120
|
+
};
|
|
121
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { DaemonClient, DaemonSessionLiveState, DaemonSessionListPage, DaemonSessionListPageOptions, DaemonSessionSummary } from '@qwen-code/sdk/daemon';
|
|
2
|
+
export type SessionCatalogRouteKind = 'legacy' | 'qualified';
|
|
3
|
+
export interface SessionCatalogQuery {
|
|
4
|
+
routeKind: SessionCatalogRouteKind;
|
|
5
|
+
workspaceCwd: string;
|
|
6
|
+
options: DaemonSessionListPageOptions;
|
|
7
|
+
}
|
|
8
|
+
export interface SessionCatalogSnapshot {
|
|
9
|
+
page?: DaemonSessionListPage;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
stale: boolean;
|
|
12
|
+
error?: Error;
|
|
13
|
+
updatedAt?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface SessionCatalogSubscriptionOptions {
|
|
16
|
+
autoLoad?: boolean;
|
|
17
|
+
maxAgeMs?: number;
|
|
18
|
+
pollIntervalMs?: number;
|
|
19
|
+
}
|
|
20
|
+
interface StagedCatalogPage {
|
|
21
|
+
key: string;
|
|
22
|
+
revision: number;
|
|
23
|
+
page: DaemonSessionListPage;
|
|
24
|
+
}
|
|
25
|
+
export interface StagedWorkspaceSessionCatalog {
|
|
26
|
+
workspaceCwd: string;
|
|
27
|
+
pages: StagedCatalogPage[];
|
|
28
|
+
complete: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const SESSION_CATALOG_ERROR_RETRY_MS = 30000;
|
|
31
|
+
export declare const SESSION_CATALOG_RETENTION_MS = 30000;
|
|
32
|
+
export declare const SESSION_CATALOG_TRAILING_REFRESH_MS = 2000;
|
|
33
|
+
export declare function getSessionCatalogQueryKey(query: SessionCatalogQuery): string;
|
|
34
|
+
export declare class SessionCatalogStore {
|
|
35
|
+
private readonly client;
|
|
36
|
+
private readonly entries;
|
|
37
|
+
private readonly queue;
|
|
38
|
+
private readonly trailingRefreshTimers;
|
|
39
|
+
private readonly liveStateWorkspaceUsers;
|
|
40
|
+
private readonly liveStateWorkspaceRefreshRequests;
|
|
41
|
+
private readonly liveStateWakeHandlers;
|
|
42
|
+
private liveStateActivitySequence;
|
|
43
|
+
private readonly liveStatePendingActivity;
|
|
44
|
+
private readonly liveStateFailureStreaks;
|
|
45
|
+
private liveSessionRevision;
|
|
46
|
+
private readonly liveSessionRevisions;
|
|
47
|
+
private readonly liveSessionRequestTimes;
|
|
48
|
+
private readonly liveSessionsByWorkspace;
|
|
49
|
+
private readonly liveSessionListeners;
|
|
50
|
+
private readonly liveSessionObservationListeners;
|
|
51
|
+
private activeRequests;
|
|
52
|
+
private activeBackgroundRequests;
|
|
53
|
+
private queueSequence;
|
|
54
|
+
private visibilityListening;
|
|
55
|
+
constructor(client: DaemonClient);
|
|
56
|
+
getSnapshot(query: SessionCatalogQuery): SessionCatalogSnapshot;
|
|
57
|
+
getEmptySnapshot(): SessionCatalogSnapshot;
|
|
58
|
+
retainWorkspaceLiveState(workspaceCwd: string): () => void;
|
|
59
|
+
isWorkspaceLiveStateEnabled(workspaceCwd: string): boolean;
|
|
60
|
+
consumeWorkspaceLiveStateRefreshRequest(workspaceCwd: string): 'interactive' | 'invalidated' | undefined;
|
|
61
|
+
onLiveStateWake(handler: (workspaceCwd: string, bypassRetry?: boolean) => void): () => void;
|
|
62
|
+
requestWorkspaceLiveStateRefresh(workspaceCwd: string): void;
|
|
63
|
+
recordSessionActivity(workspaceCwd: string, sessionId: string): void;
|
|
64
|
+
snapshotSessionActivity(workspaceCwd: string): ReadonlyMap<string, number> | undefined;
|
|
65
|
+
resolveSessionActivity(workspaceCwd: string, sessionId: string, sequence: number): void;
|
|
66
|
+
private requestLiveStateRefresh;
|
|
67
|
+
subscribe(query: SessionCatalogQuery, listener: () => void, options?: SessionCatalogSubscriptionOptions): () => void;
|
|
68
|
+
refresh(query: SessionCatalogQuery, options?: {
|
|
69
|
+
interactive?: boolean;
|
|
70
|
+
}): Promise<DaemonSessionListPage>;
|
|
71
|
+
loadOnce(query: SessionCatalogQuery, options?: {
|
|
72
|
+
fresh?: boolean;
|
|
73
|
+
}): Promise<DaemonSessionListPage>;
|
|
74
|
+
invalidateWorkspace(workspaceCwd: string, options?: {
|
|
75
|
+
background?: boolean;
|
|
76
|
+
interactive?: boolean;
|
|
77
|
+
}): void;
|
|
78
|
+
patchSession(workspaceCwd: string, sessionId: string, patch: Partial<Omit<DaemonSessionSummary, 'sessionId' | 'workspaceCwd'>>): void;
|
|
79
|
+
/**
|
|
80
|
+
* Apply a pin toggle optimistically to every loaded page of the workspace,
|
|
81
|
+
* so the store owns the optimistic state's lifetime (the R5-1 fix
|
|
82
|
+
* direction). Pinned-view pages gain or lose the row; every other page
|
|
83
|
+
* patches it in place. Because the toggle lands in the page data itself,
|
|
84
|
+
* later local writes (`patchSession`, `applyLiveState`) churn around it
|
|
85
|
+
* without dropping it, and only an authoritative refetch replaces it.
|
|
86
|
+
* Rolling back is the same operation with the opposite target.
|
|
87
|
+
*/
|
|
88
|
+
applySessionPinToggle(workspaceCwd: string, session: DaemonSessionSummary, toggle: {
|
|
89
|
+
pinned: boolean;
|
|
90
|
+
pinnedAt?: string;
|
|
91
|
+
}): void;
|
|
92
|
+
getLiveSession(workspaceCwd: string, sessionId: string): DaemonSessionLiveState | undefined;
|
|
93
|
+
hasLiveSessions(workspaceCwd: string): boolean;
|
|
94
|
+
getLiveSessionRequestStartedAt(workspaceCwd: string): number | undefined;
|
|
95
|
+
getLiveSessionRevision(workspaceCwd: string): number | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Drop the retained live-state snapshot after its channel has failed for
|
|
98
|
+
* long enough that the snapshot can no longer be called current. Readers
|
|
99
|
+
* then report the answer as unknown rather than serving a last-known value
|
|
100
|
+
* indefinitely — a daemon that dies mid-turn must not leave a pane believing
|
|
101
|
+
* the turn is still running for the life of the tab (#9487).
|
|
102
|
+
*/
|
|
103
|
+
markWorkspaceLiveStateUnavailable(workspaceCwd: string): void;
|
|
104
|
+
recordLiveStateFailure(workspaceCwd: string): number;
|
|
105
|
+
subscribeLiveSessions(workspaceCwd: string, listener: () => void): () => void;
|
|
106
|
+
subscribeLiveSessionObservations(workspaceCwd: string, listener: () => void): () => void;
|
|
107
|
+
applyLiveState(workspaceCwd: string, liveSessions: readonly DaemonSessionLiveState[], requestStartedAt?: number): ReadonlySet<string>;
|
|
108
|
+
private recordLiveSessions;
|
|
109
|
+
private clearLiveSessions;
|
|
110
|
+
stageWorkspaceRefresh(workspaceCwd: string): Promise<StagedWorkspaceSessionCatalog>;
|
|
111
|
+
commitWorkspaceRefresh(staged: StagedWorkspaceSessionCatalog): boolean;
|
|
112
|
+
scheduleWorkspaceRefresh(workspaceCwd: string, delayMs?: number): void;
|
|
113
|
+
dispose(): void;
|
|
114
|
+
private getOrCreateEntry;
|
|
115
|
+
private requestFresh;
|
|
116
|
+
private createWaiter;
|
|
117
|
+
private requestBackground;
|
|
118
|
+
private ensureScheduled;
|
|
119
|
+
private sortQueue;
|
|
120
|
+
private drainQueue;
|
|
121
|
+
private startJob;
|
|
122
|
+
private finishJob;
|
|
123
|
+
private fetchStagedPage;
|
|
124
|
+
private fetchPage;
|
|
125
|
+
private resolveWaiters;
|
|
126
|
+
private rejectWaiters;
|
|
127
|
+
private setSnapshot;
|
|
128
|
+
private resetPollSchedule;
|
|
129
|
+
private schedulePollFromNow;
|
|
130
|
+
private scheduleEntryTimer;
|
|
131
|
+
private clearPollTimer;
|
|
132
|
+
private removeQueuedJob;
|
|
133
|
+
private scheduleCleanup;
|
|
134
|
+
private isHidden;
|
|
135
|
+
private updateVisibilityListener;
|
|
136
|
+
private removeVisibilityListener;
|
|
137
|
+
private readonly onVisibilityChange;
|
|
138
|
+
}
|
|
139
|
+
export declare function getSessionCatalogStore(client: DaemonClient): SessionCatalogStore;
|
|
140
|
+
export declare function loadSessionCatalogOnce(client: DaemonClient, query: SessionCatalogQuery, options?: {
|
|
141
|
+
fresh?: boolean;
|
|
142
|
+
}): Promise<DaemonSessionListPage>;
|
|
143
|
+
export {};
|