@wrongstack/webui 0.313.0 → 0.316.1
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/dist/assets/AgentRosterView-CESYPVXA.js +9 -0
- package/dist/assets/AnalyticsDashboard-zDBIqTxO.js +1 -0
- package/dist/assets/AudienceMemoryPanel-BnNJ0EhQ.js +3 -0
- package/dist/assets/ChangesView-CGwCocSR.js +1 -0
- package/dist/assets/ChimeraReviewsView-CFxZwJBI.js +1 -0
- package/dist/assets/ChronicleDashboard-DKiMK5nl.js +1 -0
- package/dist/assets/CodeEditor-CZcMPNTH.js +2 -0
- package/dist/assets/CodeMap-zPUlmh5G.js +1 -0
- package/dist/assets/ConfirmModal-CUGk-0lT.js +1 -0
- package/dist/assets/{CronJobsPanel-CUPHNDwl.js → CronJobsPanel-C_wutCVP.js} +1 -1
- package/dist/assets/{DeadCodeScanPanel-Dj-5SAEE.js → DeadCodeScanPanel-DCCjg17Q.js} +2 -2
- package/dist/assets/{DebugDashboard-DmgHPeuw.js → DebugDashboard-D-ogYAbO.js} +1 -1
- package/dist/assets/DesignGalleryView-CtlHZWOn.js +1 -0
- package/dist/assets/GoalView-Czksj2nD.js +1 -0
- package/dist/assets/KanbanView-C5_GD0qk.js +3 -0
- package/dist/assets/MailboxDetailView-2rWp3cTv.js +1 -0
- package/dist/assets/MemoryDrawer-D9Chtt6v.js +1 -0
- package/dist/assets/MemoryManager-Bj41s3KW.js +1 -0
- package/dist/assets/ModelPicker-vwrqLOL4.js +1 -0
- package/dist/assets/OfficeMapPanel-BfuePIGH.js +4 -0
- package/dist/assets/ProcessMonitor-CHPTCtyu.js +1 -0
- package/dist/assets/PromptJournalView-tOTjKpi8.js +1 -0
- package/dist/assets/QueuePanel-BIwoG-tG.js +1 -0
- package/dist/assets/RefreshDebugView-DesPEAAq.js +1 -0
- package/dist/assets/RequirementIntakeView-BonXC1a5.js +1 -0
- package/dist/assets/SageTabs-82lpgRh-.js +2 -0
- package/dist/assets/SddFlowGraph-CMedulJi.js +1 -0
- package/dist/assets/SddHub-D3Gm4Io2.js +2 -0
- package/dist/assets/SessionInspectView-BUs2B4mF.js +1 -0
- package/dist/assets/SessionList-DxQgJqgl.js +1 -0
- package/dist/assets/SessionsDashboard-JtwQf-N5.js +1 -0
- package/dist/assets/SetupScreen-XFBFjPbd.js +1 -0
- package/dist/assets/SkillDetailView-C_P_-783.js +3 -0
- package/dist/assets/{SpecsView-Bkrq2hhM.js → SpecsView-D6GqoZ2L.js} +1 -1
- package/dist/assets/TechStackView-BE4tdEYZ.js +2 -0
- package/dist/assets/TerminalPanel-BcizpYrZ.js +1 -0
- package/dist/assets/activity-B2_Vr2oD.js +10 -0
- package/dist/assets/activity-BF1idM4Y.js +10 -0
- package/dist/assets/activity-C-kOJZXC.js +10 -0
- package/dist/assets/activity-DPpMW8BU.js +10 -0
- package/dist/assets/activity-DYMBKGt0.js +10 -0
- package/dist/assets/activity-IxgYWPDt.js +10 -0
- package/dist/assets/activity-q85HXQNv.js +10 -0
- package/dist/assets/{button-Dhmop_yM.js → button-C_EYpeP-.js} +1 -1
- package/dist/assets/{chat-CR2B97dj.js → chat-B5a3cvps.js} +1 -1
- package/dist/assets/{chat-DResBrkV.js → chat-B60h8Cji.js} +1 -1
- package/dist/assets/{chat-BnkVCZ3Q.js → chat-BNWqeV-N.js} +1 -1
- package/dist/assets/chat-BlllxfpP.js +1 -0
- package/dist/assets/{chat-BfQBSiII.js → chat-BvKkSd09.js} +1 -1
- package/dist/assets/{chat-BPuAsrkF.js → chat-DTI7lNDx.js} +1 -1
- package/dist/assets/{chat-Di8o0wDz.js → chat-DlhXGxxi.js} +1 -1
- package/dist/assets/chat-store-x5w4ss_D.js +1 -0
- package/dist/assets/{codemap-activity-store-BWt_a7Gs.js → codemap-activity-store-ZCXcHlwd.js} +1 -1
- package/dist/assets/codemap-index-store-Cb5mn74P.js +1 -0
- package/dist/assets/{dialog-DPl7DolS.js → dialog-9eW9sG90.js} +1 -1
- package/dist/assets/{empty-state-IT10GzRA.js → empty-state-DJb_tw7Q.js} +1 -1
- package/dist/assets/i18n-DkMSw3tI.js +2 -0
- package/dist/assets/index-BSpLtv9S.css +1 -0
- package/dist/assets/index-CTyM4bm8.js +137 -0
- package/dist/assets/{input-C3rIQ26u.js → input-CsEvo8Oo.js} +1 -1
- package/dist/assets/{mailbox-store-DhAVkVJQ.js → mailbox-store-KHcrg_Fm.js} +1 -1
- package/dist/assets/{roster-ws-Vj_HH49O.js → roster-ws-CXnrEaEu.js} +1 -1
- package/dist/assets/settings-1o1gooaL.js +1 -0
- package/dist/assets/settings-BGvRM3vJ.js +1 -0
- package/dist/assets/{settings-BV1_j8_-.js → settings-BV8EFmpH.js} +1 -1
- package/dist/assets/settings-Ci_RMpCQ.js +1 -0
- package/dist/assets/settings-Cy_xp4Jt.js +1 -0
- package/dist/assets/settings-D-LlBmzO.js +1 -0
- package/dist/assets/settings-nWMBX3xS.js +1 -0
- package/dist/assets/{shared-BUXBOqyO.js → shared-sYlGVRJI.js} +1 -1
- package/dist/assets/stores-5ynEAenb.js +7 -0
- package/dist/assets/toasts-BsmyGP95.js +1 -0
- package/dist/assets/toasts-CgXHu8ZB.js +1 -0
- package/dist/assets/toasts-DZ6HdKgG.js +1 -0
- package/dist/assets/toasts-DizCJjAR.js +1 -0
- package/dist/assets/toasts-NC2MT4uN.js +1 -0
- package/dist/assets/toasts-bPl097de.js +1 -0
- package/dist/assets/toasts-tCVo15mP.js +1 -0
- package/dist/assets/ui-store-9b7zzi3V.js +1 -0
- package/dist/assets/useWebSocket-1kxFH7f8.js +27 -0
- package/dist/assets/utils-DIo8iytt.js +1 -0
- package/dist/assets/{vector-memory-panel-CBA4CK6N.js → vector-memory-panel-Dd3jXXYA.js} +1 -1
- package/dist/assets/{vendor-DZ9_OO6N.js → vendor-UFryhfbN.js} +30 -30
- package/dist/assets/view-navigation-ICwpL9qw.js +1 -0
- package/dist/assets/ws-client-Ccf_VLRQ.js +22 -0
- package/dist/components/AgentOfficeView/model.d.ts +4 -3
- package/dist/components/AgentRosterView.d.ts +8 -1
- package/dist/components/ChatInput/composer-button-bar.d.ts +6 -2
- package/dist/components/ChatInput/image-attachments.d.ts +2 -1
- package/dist/components/ChatInput/next-steps-helpers.d.ts +0 -16
- package/dist/components/ChatInput/refine-panel-host.d.ts +2 -2
- package/dist/components/ChatInput/session-effort-select.d.ts +16 -0
- package/dist/components/ChatInput/slash-commands.d.ts +2 -1
- package/dist/components/ChatInput/slash-routing.d.ts +8 -0
- package/dist/components/ChatInput/use-chat-input-mcp.d.ts +2 -1
- package/dist/components/ChatInput/use-paste-drop.d.ts +2 -1
- package/dist/components/ChatInput/use-refine-timeout.d.ts +2 -1
- package/dist/components/ChatInput/use-speech-recognition.d.ts +9 -0
- package/dist/components/ChatView/AgentTabs.d.ts +1 -1
- package/dist/components/ChatView/BrainDecisionCard.d.ts +9 -0
- package/dist/components/ChatView/ChatHeader.d.ts +3 -3
- package/dist/components/ChatView/ChatRowView.d.ts +3 -1
- package/dist/components/ChatView/ChimeraReportCard.d.ts +22 -0
- package/dist/components/ChatView/CouncilDecisionCard.d.ts +9 -0
- package/dist/components/ChatView/auto-collapse.d.ts +2 -1
- package/dist/components/ChatView/useChatViewState.d.ts +14 -28
- package/dist/components/ChatView/utils.d.ts +2 -1
- package/dist/components/ChimeraReviewsView.d.ts +2 -0
- package/dist/components/CodeMapActivityStreamPanel.d.ts +2 -1
- package/dist/components/CodeMapDirectoryTree.d.ts +2 -1
- package/dist/components/CodeMapLiveOverlay.d.ts +0 -3
- package/dist/components/CodeMapSelectedNodeSummary.d.ts +2 -1
- package/dist/components/CollabPanel.d.ts +2 -7
- package/dist/components/ConfirmModal.d.ts +6 -13
- package/dist/components/CronJobsPanel.d.ts +2 -1
- package/dist/components/CustomRosterPanel.d.ts +0 -1
- package/dist/components/DependencyGraph.d.ts +2 -1
- package/dist/components/FileActivityDrawer.d.ts +2 -2
- package/dist/components/FileExplorer/FileExplorerModals.d.ts +11 -6
- package/dist/components/FileExplorer/TreeRow.d.ts +2 -6
- package/dist/components/FileExplorer/tree-helpers.d.ts +7 -0
- package/dist/components/FleetPanel.d.ts +4 -13
- package/dist/components/InspectorPanel.d.ts +6 -1
- package/dist/components/KanbanBoardSidebar.d.ts +2 -1
- package/dist/components/KanbanBoardState.d.ts +1 -1
- package/dist/components/KanbanContractGraphView.d.ts +3 -2
- package/dist/components/KanbanQueueHealthBar.d.ts +2 -1
- package/dist/components/KanbanTaskActivityRecorder.d.ts +2 -1
- package/dist/components/MemoryManager/MemoryDetail.d.ts +2 -1
- package/dist/components/MemoryManager/MemoryEditor.d.ts +2 -1
- package/dist/components/MemoryManager/MemoryFilters.d.ts +2 -1
- package/dist/components/MemoryManager/MemoryList.d.ts +2 -1
- package/dist/components/MemoryManager/MemorySearchBreakdown.d.ts +2 -1
- package/dist/components/MemoryManager/ReviewQueue.d.ts +2 -1
- package/dist/components/MemoryManager/SageTabs.d.ts +2 -1
- package/dist/components/MemoryManager/shared.d.ts +0 -1
- package/dist/components/MessageBubble/FailedRunContinue.d.ts +12 -0
- package/dist/components/MessageBubble/utils.d.ts +6 -0
- package/dist/components/ModelPickDialog.d.ts +1 -1
- package/dist/components/ModelSelectDialog.d.ts +4 -3
- package/dist/components/NextStepsBar.d.ts +1 -6
- package/dist/components/NotificationMenu.d.ts +6 -0
- package/dist/components/OfficeMapCanvas/edges.d.ts +0 -6
- package/dist/components/OfficeMapCanvas/nodes.d.ts +0 -32
- package/dist/components/OfficeMapCanvas/use-recently-finished.d.ts +2 -1
- package/dist/components/OfficeMapCanvas/utils.d.ts +4 -10
- package/dist/components/ProcessMonitor.d.ts +2 -1
- package/dist/components/ProviderWaitingRoom.d.ts +8 -0
- package/dist/components/QueuePanel.d.ts +1 -1
- package/dist/components/QuickModelSwitcher.filter.d.ts +23 -7
- package/dist/components/RestoreTabsModal.d.ts +20 -0
- package/dist/components/SddFlowGraph.d.ts +3 -2
- package/dist/components/SessionTabBar/TabMap.d.ts +19 -0
- package/dist/components/SessionTabBar/summaries.d.ts +39 -0
- package/dist/components/SessionTabBar.d.ts +14 -0
- package/dist/components/SettingsPanel/ClearAllowlistDialog.d.ts +2 -1
- package/dist/components/SettingsPanel/ModelCatalogPicker.d.ts +2 -14
- package/dist/components/SettingsPanel/ModelEffortSelect.d.ts +12 -0
- package/dist/components/SettingsPanel/ModelListEditor.d.ts +2 -1
- package/dist/components/SettingsPanel/ModelSchemaEditor.d.ts +2 -1
- package/dist/components/SettingsPanel/ModelSection.d.ts +3 -1
- package/dist/components/SettingsPanel/ModelTiersSection.d.ts +7 -0
- package/dist/components/SettingsPanel/OAuthLoginSection.d.ts +2 -2
- package/dist/components/SettingsPanel/PluginToggleList.d.ts +3 -1
- package/dist/components/SettingsPanel/ProviderModelsPanel.d.ts +2 -1
- package/dist/components/SettingsPanel/ProviderModelsPanel.filter.d.ts +2 -1
- package/dist/components/SettingsPanel/ProviderSection.d.ts +2 -2
- package/dist/components/SettingsPanel/ToolsSection.d.ts +0 -10
- package/dist/components/SettingsPanel/brain-section-options.d.ts +3 -10
- package/dist/components/SettingsPanel/contracts.d.ts +5 -3
- package/dist/components/SettingsPanel/sync-settings-preference.d.ts +8 -0
- package/dist/components/SettingsPanel/undo-send-decision.d.ts +2 -1
- package/dist/components/SidePanel/ChangesPanel.d.ts +0 -6
- package/dist/components/SidePanel/DesignStudioPanel.d.ts +7 -0
- package/dist/components/SidePanel/SessionList.d.ts +6 -6
- package/dist/components/SystemPromptDialog.d.ts +18 -0
- package/dist/components/TaskActivityTimeline.d.ts +3 -3
- package/dist/components/TaskBoard.d.ts +1 -1
- package/dist/components/TaskCard.d.ts +2 -7
- package/dist/components/TaskExecutionAttempts.d.ts +2 -1
- package/dist/components/TaskIntelligencePanel.d.ts +1 -1
- package/dist/components/TaskRiskPanel.d.ts +4 -3
- package/dist/components/TechStackView/DependencyDetail.d.ts +2 -1
- package/dist/components/TechStackView/DependencyTable.d.ts +2 -1
- package/dist/components/TechStackView/FindingsPanel.d.ts +2 -1
- package/dist/components/TechStackView/TechStackToolbar.d.ts +2 -1
- package/dist/components/TechStackView/shared.d.ts +5 -5
- package/dist/components/Toaster.d.ts +3 -31
- package/dist/components/ToolStatsModal.d.ts +15 -0
- package/dist/components/UpdateBanner.d.ts +6 -4
- package/dist/components/WorkbenchTopbar.d.ts +1 -3
- package/dist/components/agent-roster-data.d.ts +1 -1
- package/dist/components/agents/AgentDetailSection.d.ts +2 -1
- package/dist/components/agents/AgentRosterCard.d.ts +2 -1
- package/dist/components/agents/FleetSummaryBar.d.ts +6 -3
- package/dist/components/codemap-model.d.ts +3 -2
- package/dist/components/ui/PickerCardList.d.ts +3 -2
- package/dist/components/ui/badge.d.ts +2 -2
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/concurrency-gauge.d.ts +2 -1
- package/dist/components/ui/dialog.d.ts +5 -5
- package/dist/components/ui/dropdown-menu.d.ts +8 -8
- package/dist/components/ui/event-timeline.d.ts +2 -1
- package/dist/components/ui/fleet-agent-row.d.ts +2 -7
- package/dist/components/ui/scroll-area.d.ts +2 -2
- package/dist/components/ui/sheet.d.ts +2 -2
- package/dist/components/ui/sparkline.d.ts +2 -1
- package/dist/components/vector-memory-panel/model.d.ts +2 -7
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useDesktopBridge.d.ts +2 -1
- package/dist/hooks/useF5Resilience.d.ts +0 -14
- package/dist/hooks/useFleetPolling.d.ts +2 -1
- package/dist/hooks/useGlobalKeyboardShortcuts.d.ts +4 -1
- package/dist/hooks/useIntegrationStatus.d.ts +10 -0
- package/dist/hooks/useKanbanMeta.d.ts +4 -3
- package/dist/hooks/useLiveContextDebug.d.ts +4 -3
- package/dist/hooks/useMemoryForFile.d.ts +3 -2
- package/dist/hooks/usePagination.d.ts +2 -1
- package/dist/hooks/useProviderModels.d.ts +1 -0
- package/dist/hooks/useSessionSubscription.d.ts +15 -0
- package/dist/hooks/useViewport.d.ts +2 -3
- package/dist/hooks/useWebSocket.d.ts +6 -1
- package/dist/hooks/ws-handlers/chat-handlers.d.ts +22 -10
- package/dist/hooks/ws-handlers/coordinator-handlers.d.ts +7 -0
- package/dist/hooks/ws-handlers/files-mailbox-handlers.d.ts +1 -3
- package/dist/hooks/ws-handlers/misc-handlers.d.ts +22 -0
- package/dist/hooks/ws-handlers/session-context-handlers.d.ts +24 -2
- package/dist/hooks/ws-handlers/session-execution-handlers.d.ts +13 -0
- package/dist/hooks/ws-handlers/session-handlers.d.ts +3 -3
- package/dist/hooks/ws-handlers/session-replay-handlers.d.ts +31 -2
- package/dist/hooks/ws-handlers/techstack-handlers.d.ts +0 -3
- package/dist/index.html +30 -26
- package/dist/index.js +77838 -67041
- package/dist/lib/agent-office.d.ts +3 -3
- package/dist/lib/agent-session.d.ts +19 -0
- package/dist/lib/agent-status.d.ts +5 -4
- package/dist/lib/completion.d.ts +3 -2
- package/dist/lib/delegate-format.d.ts +33 -0
- package/dist/lib/favicon.d.ts +2 -1
- package/dist/lib/kanban-verification.d.ts +3 -2
- package/dist/lib/model-matrix-routes.d.ts +3 -3
- package/dist/lib/plugin-enablement.d.ts +1 -1
- package/dist/lib/reasoning-effort.d.ts +76 -0
- package/dist/lib/sdd-theme.d.ts +4 -3
- package/dist/lib/task-brief-preview.d.ts +5 -0
- package/dist/lib/terminal-dock.d.ts +0 -1
- package/dist/lib/view-navigation.d.ts +2 -2
- package/dist/lib/ws-client-actions.d.ts +1 -0
- package/dist/lib/ws-client-domain-methods.d.ts +45 -5
- package/dist/lib/ws-client-utils.d.ts +33 -0
- package/dist/lib/ws-client.d.ts +135 -6
- package/dist/manifest.json +17 -0
- package/dist/protocol-compatibility.d.ts +0 -10
- package/dist/stores/auto-submit-streak.d.ts +3 -1
- package/dist/stores/chat-lanes.d.ts +279 -0
- package/dist/stores/chat-retention.d.ts +2 -4
- package/dist/stores/chat-store-types.d.ts +1 -0
- package/dist/stores/chat-store.d.ts +46 -25
- package/dist/stores/chimera-hub-store.d.ts +140 -0
- package/dist/stores/chimera-reports-store.d.ts +45 -0
- package/dist/stores/codemap-activity-store.d.ts +4 -4
- package/dist/stores/context-editor-store.d.ts +4 -5
- package/dist/stores/coordinator-monitor-store.d.ts +3 -2
- package/dist/stores/council-log-store.d.ts +6 -20
- package/dist/stores/file-store.d.ts +32 -13
- package/dist/stores/fleet-store.d.ts +49 -5
- package/dist/stores/git-changes-store.d.ts +25 -1
- package/dist/stores/goal-run-store.d.ts +2 -2
- package/dist/stores/history-store.d.ts +11 -0
- package/dist/stores/index.d.ts +17 -9
- package/dist/stores/local-prefs.d.ts +87 -0
- package/dist/stores/mailbox-store.d.ts +2 -2
- package/dist/stores/memory-injector-store.d.ts +2 -2
- package/dist/stores/memory-lifecycle-store.d.ts +6 -2
- package/dist/stores/monitor-store.d.ts +3 -2
- package/dist/stores/notification-store.d.ts +141 -0
- package/dist/stores/provider-status-store.d.ts +19 -0
- package/dist/stores/restore-tabs-store.d.ts +29 -0
- package/dist/stores/resume-progress-store.d.ts +58 -0
- package/dist/stores/session-inspect-store.d.ts +1 -1
- package/dist/stores/session-lanes.d.ts +242 -0
- package/dist/stores/session-scoped-store.d.ts +56 -0
- package/dist/stores/session-store.d.ts +97 -154
- package/dist/stores/session-tab-store.d.ts +197 -0
- package/dist/stores/side-effect-store.d.ts +9 -1
- package/dist/stores/system-prompt-store.d.ts +48 -0
- package/dist/stores/tool-stats-store.d.ts +52 -0
- package/dist/stores/types.d.ts +81 -4
- package/dist/stores/ui-store.d.ts +113 -11
- package/dist/types/brain.d.ts +17 -16
- package/dist/types/chronicle.d.ts +3 -2
- package/dist/types/client-message.d.ts +139 -23
- package/dist/types/collab.d.ts +0 -2
- package/dist/types/protocol-core.d.ts +62 -6
- package/dist/types/server-message.d.ts +204 -3
- package/dist/types/skills-design.d.ts +2 -1
- package/package.json +9 -9
- package/dist/assets/AgentRosterView-CoAI4zVY.js +0 -9
- package/dist/assets/AnalyticsDashboard-BHKB7MA7.js +0 -1
- package/dist/assets/AudienceMemoryPanel-B1Ddueaa.js +0 -3
- package/dist/assets/ChangesView-DEsqwAdJ.js +0 -1
- package/dist/assets/ChronicleDashboard-CCoGRIP2.js +0 -1
- package/dist/assets/CodeEditor-C8nAvIw1.js +0 -2
- package/dist/assets/CodeMap-BvqQN6MG.js +0 -1
- package/dist/assets/ConfirmModal-CRSE2t_c.js +0 -1
- package/dist/assets/DesignGalleryView-DHVayfgO.js +0 -1
- package/dist/assets/GoalView-BV0HgkVM.js +0 -1
- package/dist/assets/KanbanView-_S_44j5W.js +0 -3
- package/dist/assets/MailboxDetailView-DS0INWjY.js +0 -1
- package/dist/assets/MemoryDrawer-CASOliWm.js +0 -1
- package/dist/assets/MemoryManager-CHJccmRF.js +0 -1
- package/dist/assets/ModelPicker-BD-yKqK0.js +0 -1
- package/dist/assets/OfficeMapPanel-CeK44Zg_.js +0 -4
- package/dist/assets/ProcessMonitor-QErl6IY_.js +0 -1
- package/dist/assets/PromptJournalView-CoLmLGEt.js +0 -1
- package/dist/assets/QueuePanel-rdZBX64y.js +0 -1
- package/dist/assets/RefreshDebugView-CzGncYqB.js +0 -1
- package/dist/assets/RequirementIntakeView-exfkRXjK.js +0 -1
- package/dist/assets/SageTabs-he_mI7tp.js +0 -2
- package/dist/assets/SddFlowGraph-C484p5L9.js +0 -1
- package/dist/assets/SddHub-Fv-cENSK.js +0 -2
- package/dist/assets/SessionInspectView--89Niv2G.js +0 -1
- package/dist/assets/SessionList-DLmayeUi.js +0 -1
- package/dist/assets/SessionsDashboard-DiGHUFnB.js +0 -1
- package/dist/assets/SetupScreen-DHa4BQF7.js +0 -1
- package/dist/assets/SkillDetailView-CQ6luqj6.js +0 -3
- package/dist/assets/TechStackView-B4xMV0Z9.js +0 -2
- package/dist/assets/TerminalPanel-D25-VKJU.js +0 -1
- package/dist/assets/Toaster-CcgCyzaU.js +0 -1
- package/dist/assets/activity-BA8C9ueU.js +0 -9
- package/dist/assets/activity-BYnOci5N.js +0 -9
- package/dist/assets/activity-COQ9xSFu.js +0 -9
- package/dist/assets/activity-CuJqhGz7.js +0 -9
- package/dist/assets/activity-D3ZccGOh.js +0 -9
- package/dist/assets/activity-YMES6OPI.js +0 -9
- package/dist/assets/activity-zlMMaNE1.js +0 -9
- package/dist/assets/chat-CzaGXz_W.js +0 -1
- package/dist/assets/chat-store-BiEXyguk.js +0 -17
- package/dist/assets/codemap-index-store-CDhApwWQ.js +0 -1
- package/dist/assets/i18n-BeHaHx3x.js +0 -2
- package/dist/assets/index-B8J_xxU5.css +0 -1
- package/dist/assets/index-CGMJmLO0.js +0 -134
- package/dist/assets/session-store-CKpAwNIm.js +0 -1
- package/dist/assets/settings-BNbqEBSr.js +0 -1
- package/dist/assets/settings-BsZgLIo2.js +0 -1
- package/dist/assets/settings-C3OnmFrY.js +0 -1
- package/dist/assets/settings-C3bNf1Bx.js +0 -1
- package/dist/assets/settings-C9FOpDBt.js +0 -1
- package/dist/assets/settings-oeXlO4HA.js +0 -1
- package/dist/assets/stores-CHaV9Mb9.js +0 -7
- package/dist/assets/toasts-BCDGDcyq.js +0 -1
- package/dist/assets/toasts-BwQJwYLe.js +0 -1
- package/dist/assets/toasts-CFzweRH5.js +0 -1
- package/dist/assets/toasts-DDYQsJV8.js +0 -1
- package/dist/assets/toasts-DOfXc7Rt.js +0 -1
- package/dist/assets/toasts-Dm12Nq8t.js +0 -1
- package/dist/assets/toasts-frBt6fvE.js +0 -1
- package/dist/assets/ui-store-3HoYrTu5.js +0 -1
- package/dist/assets/useWebSocket-DJWEKY_A.js +0 -29
- package/dist/assets/utils-BecmXwgG.js +0 -1
- package/dist/assets/view-navigation-C1UDTk5R.js +0 -1
- package/dist/assets/ws-client-DXT4gi-N.js +0 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* session-lanes.ts — Per-tab session accounting.
|
|
3
|
+
*
|
|
4
|
+
* Twin of `chat-lanes.ts` for everything that is true of ONE session rather
|
|
5
|
+
* than of the project: which model it runs, how many tokens it burned, what it
|
|
6
|
+
* costs, which iteration it is on, its todo list, its context ceiling.
|
|
7
|
+
*
|
|
8
|
+
* The split matters. Before this file all of it lived in one store describing
|
|
9
|
+
* "the session in front", and a background run's `provider.response` either
|
|
10
|
+
* landed on the foreground tab's counters (visible bleed: tab 1's cost jumping
|
|
11
|
+
* while tab 2 worked) or was folded into a side-map of parked snapshots by
|
|
12
|
+
* hand, one call site at a time. Now a lane owns its numbers whether or not it
|
|
13
|
+
* is on screen, and the foreground is a pointer.
|
|
14
|
+
*
|
|
15
|
+
* Fields that describe the PROJECT — its root, cwd, name, the catalog of modes,
|
|
16
|
+
* the app version — stay global here: four tabs of the same project share them
|
|
17
|
+
* and giving each lane a copy would only invent ways for them to disagree.
|
|
18
|
+
*/
|
|
19
|
+
import type { Usage } from '@wrongstack/core/types';
|
|
20
|
+
import type { SessionInfo } from './types.js';
|
|
21
|
+
export type CacheStats = {
|
|
22
|
+
readTokens: number;
|
|
23
|
+
writeTokens: number;
|
|
24
|
+
hitRatio: number;
|
|
25
|
+
providers?: Array<{
|
|
26
|
+
provider: string;
|
|
27
|
+
input: number;
|
|
28
|
+
cacheRead: number;
|
|
29
|
+
cacheWrite: number;
|
|
30
|
+
hitRatio: number;
|
|
31
|
+
}>;
|
|
32
|
+
coverageTokens: number;
|
|
33
|
+
};
|
|
34
|
+
export type ContextLimitWarning = {
|
|
35
|
+
previousMaxContext: number;
|
|
36
|
+
maxContext: number;
|
|
37
|
+
providerId: string;
|
|
38
|
+
modelId: string;
|
|
39
|
+
};
|
|
40
|
+
export type TodoItem = {
|
|
41
|
+
id: string;
|
|
42
|
+
content: string;
|
|
43
|
+
status: 'pending' | 'in_progress' | 'completed';
|
|
44
|
+
activeForm?: string | undefined;
|
|
45
|
+
blockedBy?: string[] | undefined;
|
|
46
|
+
kanbanBoardId?: string | undefined;
|
|
47
|
+
kanbanTaskId?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
/** Everything true of ONE session. */
|
|
50
|
+
export interface SessionLaneData {
|
|
51
|
+
session: SessionInfo | null;
|
|
52
|
+
totalTokens: Usage;
|
|
53
|
+
lastInputTokens: number;
|
|
54
|
+
cost: number;
|
|
55
|
+
startTime: number | null;
|
|
56
|
+
maxContext: number;
|
|
57
|
+
contextLimitWarning: ContextLimitWarning | null;
|
|
58
|
+
cacheStats: CacheStats | null;
|
|
59
|
+
inputCost: number;
|
|
60
|
+
outputCost: number;
|
|
61
|
+
cacheReadCost: number;
|
|
62
|
+
reasoningEffortLevels?: string[] | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Tri-state effort-support signal from the model's reasoningConfig
|
|
65
|
+
* (`undefined` = undocumented → show the control with the full canonical
|
|
66
|
+
* set; `false` = model documents NO effort control → hide it). Never
|
|
67
|
+
* boolean-coerce: undefined is not false.
|
|
68
|
+
*/
|
|
69
|
+
effortSupported?: boolean | undefined;
|
|
70
|
+
/** Project-wide effort — display-only hint behind the composer auto option. */
|
|
71
|
+
projectReasoningEffort?: string | undefined;
|
|
72
|
+
mode: string;
|
|
73
|
+
contextMode: string;
|
|
74
|
+
iteration: {
|
|
75
|
+
index: number;
|
|
76
|
+
max: number;
|
|
77
|
+
} | null;
|
|
78
|
+
todos: TodoItem[];
|
|
79
|
+
droppedTools: number;
|
|
80
|
+
lastVisitedAt: number;
|
|
81
|
+
}
|
|
82
|
+
export declare function createSessionLaneData(): SessionLaneData;
|
|
83
|
+
/** Stable empty lane. Singleton for the same referential-stability reason as
|
|
84
|
+
* `chat-lanes.EMPTY_LANE`. */
|
|
85
|
+
export declare const EMPTY_SESSION_LANE: SessionLaneData;
|
|
86
|
+
/** Project-wide state. Four tabs of one project share exactly this much. */
|
|
87
|
+
export interface SessionGlobals {
|
|
88
|
+
projectName: string;
|
|
89
|
+
projectRoot: string;
|
|
90
|
+
cwd: string;
|
|
91
|
+
modes: Array<{
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
description: string;
|
|
95
|
+
}>;
|
|
96
|
+
contextModes: Array<{
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
description: string;
|
|
100
|
+
thresholds?: {
|
|
101
|
+
warn: number | undefined;
|
|
102
|
+
soft: number;
|
|
103
|
+
hard: number;
|
|
104
|
+
};
|
|
105
|
+
preserveK?: number | undefined;
|
|
106
|
+
eliseThreshold?: number | undefined;
|
|
107
|
+
custom?: boolean | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
appVersion: string;
|
|
110
|
+
latestVersion: string;
|
|
111
|
+
updateAvailable: boolean;
|
|
112
|
+
}
|
|
113
|
+
interface SessionLanesState extends SessionGlobals {
|
|
114
|
+
lanes: Record<string, SessionLaneData>;
|
|
115
|
+
activeSessionId: string;
|
|
116
|
+
}
|
|
117
|
+
export declare const SESSION_DEFAULT_LANE_ID = "__unbound__";
|
|
118
|
+
export declare const useSessionLanes: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SessionLanesState>, "persist" | "setState"> & {
|
|
119
|
+
setState(partial: Partial<SessionLanesState> | SessionLanesState | ((state: SessionLanesState) => Partial<SessionLanesState> | SessionLanesState), replace?: false | undefined): unknown;
|
|
120
|
+
setState(state: SessionLanesState | ((state: SessionLanesState) => SessionLanesState), replace: true): unknown;
|
|
121
|
+
persist: {
|
|
122
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SessionLanesState, {
|
|
123
|
+
projectName: string;
|
|
124
|
+
projectRoot: string;
|
|
125
|
+
cwd: string;
|
|
126
|
+
lanes: {
|
|
127
|
+
[k: string]: {
|
|
128
|
+
session: SessionInfo | null;
|
|
129
|
+
mode: string;
|
|
130
|
+
contextMode: string;
|
|
131
|
+
lastInputTokens: number;
|
|
132
|
+
lastVisitedAt: number;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}, unknown>>) => void;
|
|
136
|
+
clearStorage: () => void;
|
|
137
|
+
rehydrate: () => Promise<void> | void;
|
|
138
|
+
hasHydrated: () => boolean;
|
|
139
|
+
onHydrate: (fn: (state: SessionLanesState) => void) => () => void;
|
|
140
|
+
onFinishHydration: (fn: (state: SessionLanesState) => void) => () => void;
|
|
141
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SessionLanesState, {
|
|
142
|
+
projectName: string;
|
|
143
|
+
projectRoot: string;
|
|
144
|
+
cwd: string;
|
|
145
|
+
lanes: {
|
|
146
|
+
[k: string]: {
|
|
147
|
+
session: SessionInfo | null;
|
|
148
|
+
mode: string;
|
|
149
|
+
contextMode: string;
|
|
150
|
+
lastInputTokens: number;
|
|
151
|
+
lastVisitedAt: number;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
}, unknown>>;
|
|
155
|
+
};
|
|
156
|
+
}>;
|
|
157
|
+
export declare function readSessionLane(sessionId: string | null | undefined): SessionLaneData;
|
|
158
|
+
export declare function hasSessionLane(sessionId: string | null | undefined): boolean;
|
|
159
|
+
export declare function sessionLaneIds(): string[];
|
|
160
|
+
export declare function ensureSessionLane(sessionId: string): string;
|
|
161
|
+
export declare function disposeSessionLane(sessionId: string): void;
|
|
162
|
+
/**
|
|
163
|
+
* Retire the pre-session lane once a real session exists.
|
|
164
|
+
*
|
|
165
|
+
* Nothing is carried over: accounting recorded before any session started
|
|
166
|
+
* (a stray todo list, a zeroed token counter) describes no session, and
|
|
167
|
+
* inheriting it would credit the new tab with numbers it never earned. The
|
|
168
|
+
* CHAT lane is different — a message typed before `session.start` landed is
|
|
169
|
+
* the user's, and `adoptDefaultLane` does move that.
|
|
170
|
+
*/
|
|
171
|
+
export declare function adoptDefaultSessionLane(sessionId: string): void;
|
|
172
|
+
/**
|
|
173
|
+
* Move the foreground pointer — BOTH of them.
|
|
174
|
+
*
|
|
175
|
+
* The chat surface and the accounting surface each keep their own
|
|
176
|
+
* `activeSessionId`, and "the tab in front" is only meaningful when the two
|
|
177
|
+
* agree. Every caller used to move them in a pair by hand, which made a
|
|
178
|
+
* missed line a silent bleed: the strip highlighted one slot while the
|
|
179
|
+
* transcript rendered another's, and the send path stamped a third. Moving the
|
|
180
|
+
* chat pointer from here makes the pair impossible to half-apply.
|
|
181
|
+
*
|
|
182
|
+
* `chat-lanes` must NOT reach back into this module (it is the lower layer),
|
|
183
|
+
* so this direction is the only one available — and it is the right one:
|
|
184
|
+
* accounting is what the tab registry re-points.
|
|
185
|
+
*/
|
|
186
|
+
export declare function setActiveSessionLane(sessionId: string | null): void;
|
|
187
|
+
export declare function activeSessionLaneId(): string;
|
|
188
|
+
/**
|
|
189
|
+
* Hook form of the lane pointer, `null` before any session is bound.
|
|
190
|
+
*
|
|
191
|
+
* Components that need "which tab is the user looking at" must read THIS and
|
|
192
|
+
* not `useSessionStore((s) => s.session?.id)`. The latter is the foreground
|
|
193
|
+
* lane's SessionInfo record, which is null between opening a tab and its
|
|
194
|
+
* `session.start` landing — a window in which the tab strip concluded no tab
|
|
195
|
+
* was in front and purged the slot the user had just opened.
|
|
196
|
+
*/
|
|
197
|
+
export declare function useActiveSessionId(): string | null;
|
|
198
|
+
export interface SessionLaneActions {
|
|
199
|
+
readonly sessionId: string;
|
|
200
|
+
readonly data: SessionLaneData;
|
|
201
|
+
setSession: (session: SessionInfo | null) => void;
|
|
202
|
+
startSession: (session: SessionInfo) => void;
|
|
203
|
+
endSession: () => void;
|
|
204
|
+
updateUsage: (usage: Usage, providerId?: string) => void;
|
|
205
|
+
addCost: (cost: number) => void;
|
|
206
|
+
setEnvRates: (env: {
|
|
207
|
+
maxContext?: number | undefined;
|
|
208
|
+
mode?: string | undefined;
|
|
209
|
+
contextMode?: string | undefined;
|
|
210
|
+
inputCost?: number | undefined;
|
|
211
|
+
outputCost?: number | undefined;
|
|
212
|
+
cacheReadCost?: number | undefined;
|
|
213
|
+
reasoningEffortLevels?: string[] | undefined;
|
|
214
|
+
hasReasoningEffortKey?: boolean;
|
|
215
|
+
effortSupported?: boolean | undefined;
|
|
216
|
+
hasEffortSupportedKey?: boolean;
|
|
217
|
+
projectReasoningEffort?: string | undefined;
|
|
218
|
+
hasProjectEffortKey?: boolean;
|
|
219
|
+
}) => void;
|
|
220
|
+
setIteration: (it: {
|
|
221
|
+
index: number;
|
|
222
|
+
max: number;
|
|
223
|
+
} | null) => void;
|
|
224
|
+
setContextUsage: (tokens: number, maxContext?: number | undefined) => void;
|
|
225
|
+
setContextLimitWarning: (w: ContextLimitWarning | null) => void;
|
|
226
|
+
setCacheStats: (c: CacheStats | null) => void;
|
|
227
|
+
setTodos: (todos: TodoItem[]) => void;
|
|
228
|
+
setDroppedTools: (count: number) => void;
|
|
229
|
+
touch: () => void;
|
|
230
|
+
patch: (updates: Partial<SessionLaneData>) => void;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* The one way to write session accounting. Same contract as `chatLane`: the
|
|
234
|
+
* session must be named, so a background run can never credit its tokens to
|
|
235
|
+
* the tab in front.
|
|
236
|
+
*/
|
|
237
|
+
export declare function sessionLane(sessionId: string): SessionLaneActions;
|
|
238
|
+
export declare function activeSessionLane(): SessionLaneActions;
|
|
239
|
+
/** Project-wide setters. Deliberately not per-lane. */
|
|
240
|
+
export declare function setSessionGlobals(patch: Partial<SessionGlobals>): void;
|
|
241
|
+
export {};
|
|
242
|
+
//# sourceMappingURL=session-lanes.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A store whose ENTIRE state belongs to one conversation.
|
|
3
|
+
*
|
|
4
|
+
* The WebUI runs up to four conversations side by side. Most stores describe
|
|
5
|
+
* one of them — the memory injector's traces, the Brain council's panels, the
|
|
6
|
+
* side effects a run recorded — and holding them in a single global object
|
|
7
|
+
* meant the four tabs shared one copy. Two failure modes, and the codebase has
|
|
8
|
+
* had both:
|
|
9
|
+
*
|
|
10
|
+
* - the handler wrote whatever arrived, so a background tab's records landed
|
|
11
|
+
* on the screen the user was looking at; or
|
|
12
|
+
* - the handler defended itself with `isActiveSessionMessage` and DROPPED
|
|
13
|
+
* the background tab's records entirely, so switching to that tab showed
|
|
14
|
+
* an empty panel for work that had definitely happened.
|
|
15
|
+
*
|
|
16
|
+
* Neither is "separate". This factory gives every conversation its own store
|
|
17
|
+
* instance, with the reducer written exactly as it would be for a single
|
|
18
|
+
* session — no `bySession` threading through the reducer bodies, no chance of
|
|
19
|
+
* a new action forgetting the key.
|
|
20
|
+
*
|
|
21
|
+
* Shape, deliberately mirroring the chat/session lane facades:
|
|
22
|
+
* - calling it as a hook, or reaching for `getState()`, addresses the tab
|
|
23
|
+
* that is IN FRONT — the right default for components and for a user
|
|
24
|
+
* action, which by definition happens in the visible tab;
|
|
25
|
+
* - `for(sessionId)` addresses one named conversation, which is what a WS
|
|
26
|
+
* handler must use: the frame names its session and the write has to land
|
|
27
|
+
* there whether or not that tab is on screen.
|
|
28
|
+
*
|
|
29
|
+
* Bounds: one instance per live conversation, dropped when the tab closes
|
|
30
|
+
* (`onLaneDisposed`). The cap is a backstop for ids that never see a lane
|
|
31
|
+
* teardown — losing a diagnostic buffer for a conversation nobody is showing
|
|
32
|
+
* costs nothing, and the next event rebuilds it.
|
|
33
|
+
*
|
|
34
|
+
* @module session-scoped-store
|
|
35
|
+
*/
|
|
36
|
+
import { type StateCreator, type StoreApi } from 'zustand/vanilla';
|
|
37
|
+
export interface SessionScopedStore<S> {
|
|
38
|
+
/** Hook form: the state of the tab in front. */
|
|
39
|
+
<T>(selector: (state: S) => T): T;
|
|
40
|
+
/** Snapshot of the tab in front. */
|
|
41
|
+
getState(): S;
|
|
42
|
+
/** Patch the tab in front. */
|
|
43
|
+
setState(partial: Partial<S> | ((state: S) => Partial<S>)): void;
|
|
44
|
+
/** Subscribe to the tab in front. Resolved once, at call time. */
|
|
45
|
+
subscribe(listener: (state: S, previous: S) => void): () => void;
|
|
46
|
+
/** The store of ONE named conversation — the handler entry point. */
|
|
47
|
+
for(sessionId: string | null | undefined): StoreApi<S>;
|
|
48
|
+
/** Forget a conversation's copy. Called on lane teardown. */
|
|
49
|
+
dropSession(sessionId: string): void;
|
|
50
|
+
/** Conversations holding an instance, oldest first. */
|
|
51
|
+
sessionIds(): string[];
|
|
52
|
+
}
|
|
53
|
+
export declare function createSessionScopedStore<S>(initializer: StateCreator<S, [], []>, options?: {
|
|
54
|
+
max?: number;
|
|
55
|
+
}): SessionScopedStore<S>;
|
|
56
|
+
//# sourceMappingURL=session-scoped-store.d.ts.map
|
|
@@ -1,120 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* session-store.ts — Foreground view over the session lane registry.
|
|
3
|
+
*
|
|
4
|
+
* The per-tab accounting lives in `session-lanes.ts`. This module projects
|
|
5
|
+
* `lanes[activeSessionId]` (plus the project-wide globals) behind the
|
|
6
|
+
* historical `useSessionStore` API, so every panel that renders the tab in
|
|
7
|
+
* front keeps working unchanged.
|
|
8
|
+
*
|
|
9
|
+
* WS handlers must NOT write through this facade — they route by
|
|
10
|
+
* `payload.sessionId` via `sessionFor(msg)` / `sessionLane(sessionId)`.
|
|
11
|
+
* Writing here from a handler credits a background run's tokens, cost or
|
|
12
|
+
* iteration to whichever tab happens to be on screen.
|
|
13
|
+
*/
|
|
1
14
|
import type { Usage } from '@wrongstack/core/types';
|
|
15
|
+
import { type CacheStats, type ContextLimitWarning, createSessionLaneData, type SessionGlobals, type SessionLaneData, type TodoItem, useSessionLanes } from './session-lanes.js';
|
|
2
16
|
import type { SessionInfo } from './types.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Input tokens of the LAST provider response — used as the "live context
|
|
7
|
-
* size" indicator in the topbar (matches what TUI's ContextChip shows). */
|
|
8
|
-
lastInputTokens: number;
|
|
9
|
-
cost: number;
|
|
10
|
-
startTime: number | null;
|
|
11
|
-
/** Active effective context window. 0 = unknown. */
|
|
12
|
-
maxContext: number;
|
|
13
|
-
/** Live provider-reported decrease, shown until the session/model changes. */
|
|
14
|
-
contextLimitWarning: {
|
|
15
|
-
previousMaxContext: number;
|
|
16
|
-
maxContext: number;
|
|
17
|
-
providerId: string;
|
|
18
|
-
modelId: string;
|
|
19
|
-
} | null;
|
|
20
|
-
/**
|
|
21
|
-
* Live prompt-cache snapshot from the most recent `stats.get`
|
|
22
|
-
* reply. `null` until the first reply lands — distinguishes "no
|
|
23
|
-
* cache yet" from "0 hit". Cleared on session start/end and on
|
|
24
|
-
* provider/model switch (same lifecycle as `contextLimitWarning`,
|
|
25
|
-
* so a stale reading from the previous session can never leak into
|
|
26
|
-
* the new one).
|
|
27
|
-
*/
|
|
28
|
-
cacheStats: {
|
|
29
|
-
readTokens: number;
|
|
30
|
-
writeTokens: number;
|
|
31
|
-
hitRatio: number;
|
|
32
|
-
/** Session cache telemetry split by routed provider (fallback/model switches included). */
|
|
33
|
-
providers?: Array<{
|
|
34
|
-
provider: string;
|
|
35
|
-
input: number;
|
|
36
|
-
cacheRead: number;
|
|
37
|
-
cacheWrite: number;
|
|
38
|
-
hitRatio: number;
|
|
39
|
-
}>;
|
|
40
|
-
/**
|
|
41
|
-
* Cached prefix of the most recent prompt, capped at `lastInputTokens`
|
|
42
|
-
* so the coverage figure never overshoots the live request size.
|
|
43
|
-
* Used by the context breakdown modal and topbar cache badge.
|
|
44
|
-
*/
|
|
45
|
-
coverageTokens: number;
|
|
46
|
-
} | null;
|
|
47
|
-
/** USD per 1M tokens — used to compute cost deltas on every provider.response. */
|
|
48
|
-
inputCost: number;
|
|
49
|
-
outputCost: number;
|
|
50
|
-
cacheReadCost: number;
|
|
51
|
-
/** Effort levels the ACTIVE model advertises (session.start payload).
|
|
52
|
-
* Undefined when the model has no explicit list — the settings effort
|
|
53
|
-
* dropdown then shows the full canonical set. Same lifecycle as
|
|
54
|
-
* `cacheStats`: refreshed on every session.start (which fires on model
|
|
55
|
-
* switch), so a stale list from the previous model never leaks. */
|
|
56
|
-
reasoningEffortLevels?: string[] | undefined;
|
|
57
|
-
/** basename(projectRoot) for the topbar. */
|
|
58
|
-
projectName: string;
|
|
59
|
-
/** Full project root path — used for richer tooltips / hover context. */
|
|
60
|
-
projectRoot: string;
|
|
61
|
-
/** Full working directory path — can differ from projectRoot. */
|
|
62
|
-
cwd: string;
|
|
63
|
-
/** Active mode id (default | code | …). */
|
|
64
|
-
mode: string;
|
|
65
|
-
/** All modes the backend knows about, populated by modes.list. The
|
|
66
|
-
* topbar mode chip uses this to render a picker; empty until the
|
|
67
|
-
* backend responds. */
|
|
68
|
-
modes: Array<{
|
|
69
|
-
id: string;
|
|
70
|
-
name: string;
|
|
71
|
-
description: string;
|
|
72
|
-
}>;
|
|
73
|
-
/** Active context-window policy id (balanced | frugal | deep | archival). */
|
|
74
|
-
contextMode: string;
|
|
75
|
-
/** Context-window policy presets from the backend. */
|
|
76
|
-
contextModes: Array<{
|
|
77
|
-
id: string;
|
|
78
|
-
name: string;
|
|
79
|
-
description: string;
|
|
80
|
-
thresholds?: {
|
|
81
|
-
warn: number | undefined;
|
|
82
|
-
soft: number;
|
|
83
|
-
hard: number;
|
|
84
|
-
};
|
|
85
|
-
preserveK?: number | undefined;
|
|
86
|
-
eliseThreshold?: number | undefined;
|
|
87
|
-
custom?: boolean | undefined;
|
|
88
|
-
}>;
|
|
89
|
-
/** Iteration progress while the agent is running. Resets on run.result. */
|
|
90
|
-
iteration: {
|
|
91
|
-
index: number;
|
|
92
|
-
max: number;
|
|
93
|
-
} | null;
|
|
94
|
-
/** Live snapshot of context.todos — backend broadcasts on every
|
|
95
|
-
* tool.executed, and the sidebar/overlay reads from here. */
|
|
96
|
-
todos: Array<{
|
|
97
|
-
id: string;
|
|
98
|
-
content: string;
|
|
99
|
-
status: 'pending' | 'in_progress' | 'completed';
|
|
100
|
-
activeForm?: string | undefined;
|
|
101
|
-
/** Board-derived titles of the unfinished work this row waits on. */
|
|
102
|
-
blockedBy?: string[] | undefined;
|
|
103
|
-
kanbanBoardId?: string | undefined;
|
|
104
|
-
kanbanTaskId?: string | undefined;
|
|
105
|
-
}>;
|
|
106
|
-
/** Client-side wall-clock at the last successful session.start. Survives
|
|
107
|
-
* F5 because it's in partialize. Used by the resilience verifier view
|
|
108
|
-
* to confirm the active session round-trips through localStorage. */
|
|
109
|
-
lastVisitedAt: number;
|
|
110
|
-
/** Current app version string (e.g. "0.7.0") from the boot-time update check. */
|
|
111
|
-
appVersion: string;
|
|
112
|
-
/** Latest published version on npm, when known. */
|
|
113
|
-
latestVersion: string;
|
|
114
|
-
/** True when a newer published version exists than appVersion. */
|
|
115
|
-
updateAvailable: boolean;
|
|
116
|
-
/** Number of tools dropped from provider requests due to maxTools limit (0 = no limit or within limit). */
|
|
117
|
-
droppedTools: number;
|
|
17
|
+
export type { CacheStats, ContextLimitWarning, SessionLaneData, TodoItem, } from './session-lanes.js';
|
|
18
|
+
export { activeSessionLane, activeSessionLaneId, adoptDefaultSessionLane, disposeSessionLane, ensureSessionLane, hasSessionLane, readSessionLane, type SessionLaneActions, sessionLane, sessionLaneIds, setActiveSessionLane, setSessionGlobals, useSessionLanes, } from './session-lanes.js';
|
|
19
|
+
export interface SessionState extends SessionGlobals, SessionLaneData {
|
|
118
20
|
setSession: (session: SessionInfo | null) => void;
|
|
119
21
|
updateUsage: (usage: Usage, providerId?: string) => void;
|
|
120
22
|
addCost: (cost: number) => void;
|
|
@@ -131,56 +33,97 @@ interface SessionState {
|
|
|
131
33
|
outputCost?: number | undefined;
|
|
132
34
|
cacheReadCost?: number | undefined;
|
|
133
35
|
reasoningEffortLevels?: string[] | undefined;
|
|
36
|
+
/** Tri-state: undefined=undocumented, false=model documents no effort control. */
|
|
37
|
+
effortSupported?: boolean | undefined;
|
|
38
|
+
/** Project-wide effort — display-only hint behind the composer auto option. */
|
|
39
|
+
projectReasoningEffort?: string | undefined;
|
|
134
40
|
}) => void;
|
|
135
41
|
setIteration: (it: {
|
|
136
42
|
index: number;
|
|
137
43
|
max: number;
|
|
138
44
|
} | null) => void;
|
|
139
45
|
setContextUsage: (tokens: number, maxContext?: number | undefined) => void;
|
|
140
|
-
setContextLimitWarning: (warning:
|
|
141
|
-
setCacheStats: (cache:
|
|
142
|
-
setModes: (modes:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
description: string;
|
|
146
|
-
}>) => void;
|
|
147
|
-
setContextModes: (modes: SessionState['contextModes']) => void;
|
|
148
|
-
setTodos: (todos: SessionState['todos']) => void;
|
|
46
|
+
setContextLimitWarning: (warning: ContextLimitWarning | null) => void;
|
|
47
|
+
setCacheStats: (cache: CacheStats | null) => void;
|
|
48
|
+
setModes: (modes: SessionGlobals['modes']) => void;
|
|
49
|
+
setContextModes: (modes: SessionGlobals['contextModes']) => void;
|
|
50
|
+
setTodos: (todos: TodoItem[]) => void;
|
|
149
51
|
setUpdateInfo: (info: {
|
|
150
52
|
appVersion: string;
|
|
151
53
|
latestVersion: string;
|
|
152
54
|
updateAvailable: boolean;
|
|
153
55
|
}) => void;
|
|
154
56
|
setDroppedTools: (count: number) => void;
|
|
57
|
+
switchSession: (newSessionId: string) => void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Re-point the stores that ROUTE SERVER WRITES by bound session.
|
|
61
|
+
*
|
|
62
|
+
* `useFileStore` and `useGitChangesStore` both compare the `sessionId` a
|
|
63
|
+
* server message carries against their own bound id, and a write whose stamp
|
|
64
|
+
* does not match is parked in `…BySession[<that session>]` rather than applied
|
|
65
|
+
* to the projection panels render. So a pointer move that skips these does not
|
|
66
|
+
* merely show stale data — it makes every stamped response for the tab now in
|
|
67
|
+
* front invisible. `files.tree` and `files.read` are the case users see: the
|
|
68
|
+
* explorer keeps the previous tab's tree and double-clicking a file opens
|
|
69
|
+
* nothing, because both responses are stamped with the LANE POINTER
|
|
70
|
+
* (`withSession` -> `foregroundSessionId()`) while `fileSessionId` still names
|
|
71
|
+
* the tab before the switch.
|
|
72
|
+
*
|
|
73
|
+
* Deliberately narrower than `bindForeground`: this is the data half, safe to
|
|
74
|
+
* call from any path that moves the pointer. Chrome (which view is up, whether
|
|
75
|
+
* the sidebar is open) is navigation, not routing, and is rebound only where
|
|
76
|
+
* the surface really is switching tabs.
|
|
77
|
+
*
|
|
78
|
+
* Both binds are idempotent -- each returns early when already on `sessionId`
|
|
79
|
+
* -- so calling this from more than one pointer-move path is free.
|
|
80
|
+
*/
|
|
81
|
+
export declare function bindForegroundStores(sessionId: string | null): void;
|
|
82
|
+
declare function getState(): SessionState;
|
|
83
|
+
declare function setState(partial: Partial<SessionState> | ((state: SessionState) => Partial<SessionState>)): void;
|
|
84
|
+
declare function subscribe(listener: (state: SessionState, prev: SessionState) => void): () => void;
|
|
85
|
+
interface SessionStoreFacade {
|
|
86
|
+
<T>(selector: (state: SessionState) => T): T;
|
|
87
|
+
getState: typeof getState;
|
|
88
|
+
getInitialState: typeof getState;
|
|
89
|
+
setState: typeof setState;
|
|
90
|
+
subscribe: typeof subscribe;
|
|
91
|
+
/** The lane registry's own persist API (rehydrate/flush/clearStorage). */
|
|
92
|
+
persist: (typeof useSessionLanes)['persist'];
|
|
93
|
+
}
|
|
94
|
+
export declare const useSessionStore: SessionStoreFacade;
|
|
95
|
+
interface SessionSnapshot {
|
|
96
|
+
session: SessionInfo | null;
|
|
97
|
+
provider?: string | undefined;
|
|
98
|
+
model?: string | undefined;
|
|
99
|
+
mode: string;
|
|
100
|
+
contextMode: string;
|
|
101
|
+
totalTokens: Usage;
|
|
102
|
+
lastInputTokens: number;
|
|
103
|
+
cost: number;
|
|
104
|
+
startTime: number | null;
|
|
105
|
+
maxContext: number;
|
|
106
|
+
reasoningEffortLevels?: string[] | undefined;
|
|
107
|
+
cacheStats: CacheStats | null;
|
|
108
|
+
iteration: {
|
|
109
|
+
index: number;
|
|
110
|
+
max: number;
|
|
111
|
+
} | null;
|
|
112
|
+
todos: TodoItem[];
|
|
155
113
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
hasHydrated: () => boolean;
|
|
172
|
-
onHydrate: (fn: (state: SessionState) => void) => () => void;
|
|
173
|
-
onFinishHydration: (fn: (state: SessionState) => void) => () => void;
|
|
174
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SessionState, {
|
|
175
|
-
session: SessionInfo | null;
|
|
176
|
-
projectName: string;
|
|
177
|
-
projectRoot: string;
|
|
178
|
-
cwd: string;
|
|
179
|
-
mode: string;
|
|
180
|
-
contextMode: string;
|
|
181
|
-
lastVisitedAt: number;
|
|
182
|
-
}, unknown>>;
|
|
183
|
-
};
|
|
184
|
-
}>;
|
|
185
|
-
export {};
|
|
114
|
+
/**
|
|
115
|
+
* Read-through view of the lane registry in the shape the old parked-snapshot
|
|
116
|
+
* map exposed. Kept so the few call sites that want "what does tab X look
|
|
117
|
+
* like right now" keep reading — but it is no longer a separate copy of the
|
|
118
|
+
* truth that has to be kept in sync, which is what let a tab come back showing
|
|
119
|
+
* a neighbour's model or zeroed counters.
|
|
120
|
+
*/
|
|
121
|
+
export declare const memorySessionSnapshots: {
|
|
122
|
+
has(sessionId: string): boolean;
|
|
123
|
+
get(sessionId: string): SessionSnapshot | undefined;
|
|
124
|
+
set(sessionId: string, snapshot: Partial<SessionSnapshot>): void;
|
|
125
|
+
delete(sessionId: string): void;
|
|
126
|
+
clear(): void;
|
|
127
|
+
};
|
|
128
|
+
export { createSessionLaneData };
|
|
186
129
|
//# sourceMappingURL=session-store.d.ts.map
|