@agimon-ai/po-web-dashboard 0.0.0-alpha.49 → 0.0.0-alpha.50

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/core.cjs CHANGED
@@ -130,7 +130,9 @@ exports.globalSlotFills = require_pluginRegistry.globalSlotFills;
130
130
  exports.hasSessionProtocol = require_sessionProtocolCommands.hasSessionProtocol;
131
131
  exports.heldSessionChannels = require_sessionChannelHoldsStore.heldSessionChannels;
132
132
  exports.heldThreads = require_threadStore.heldThreads;
133
+ exports.heldVoiceSessions = require_sessionChannelHoldsStore.heldVoiceSessions;
133
134
  exports.holdSessionChannels = require_sessionChannelHoldsStore.holdSessionChannels;
135
+ exports.holdVoiceSession = require_sessionChannelHoldsStore.holdVoiceSession;
134
136
  exports.imagesFromContent = require_sessionModel.imagesFromContent;
135
137
  exports.inactiveTotal = require_contextComposition.inactiveTotal;
136
138
  exports.initialSessionState = require_sessionModel.initialSessionState;
package/dist/core.d.mts CHANGED
@@ -19,7 +19,7 @@ import { SessionMeta, SessionsState, UPDATE_REQUIRED_REASON, activeSessionId, ap
19
19
  import { HistoryPage, abortRun, answerDialogConfirm, answerDialogValue, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySessionFrame, applySessionLifecycle, applyThreadFrame, beginSessionReplay, bindHistoryReader, cancelDialog, clearQueuedMessages, deleteQueuedMessage, dropSessionStore, endSessionReplay, loadModelChoices, promoteQueuedMessage, queueFollowUp, queueFollowUpWithAck, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseProtocolTranscript, renameSession, requestLatestHistory, requestNewerHistory, requestOlderHistory, resetSessionStore, resetSessionStores, resumeQueuedMessages, rewindToMessage, runCommand, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, sessionStoreFor, setAgentLock, setHasNewerHistory, setSessionStreamed, streamedSessions, submitMessage, submitMessageWithAck, useActiveSession, useHasOlderHistory } from "./web/stores/sessionStore.mjs";
20
20
  import { createPagedTranscript } from "./web/stores/pagedTranscriptStore.mjs";
21
21
  import { ImageRefScope, bindImageReader, loadImageRef, useImageRefs } from "./web/stores/imageRefStore.mjs";
22
- import { dispatchHeldSessionChannel, heldSessionChannels, holdSessionChannels } from "./web/stores/sessionChannelHoldsStore.mjs";
22
+ import { dispatchHeldSessionChannel, heldSessionChannels, heldVoiceSessions, holdSessionChannels, holdVoiceSession } from "./web/stores/sessionChannelHoldsStore.mjs";
23
23
  import { ThreadTranscriptReader, applyThreadTranscriptFrame, bindThreadReader, dropThreads, heldThreads, resetThreads, resubscribeThreads, subscribeThread, threadStoreKey, unsubscribeThread } from "./web/stores/threadStore.mjs";
24
24
  import { WorkspacesState, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, resetWorkspaces, selectWorkspace, workspacesStore } from "./web/stores/workspacesStore.mjs";
25
25
  import { ActivityGroup, MinorMode, SelectionAxis, activityGroups, fileTabForPath, minorModes, selectionAxes, subscribeActivitySources, useActivityGroups, useDockFaceBadges, useDockFaces, useFileLinks } from "./web/lib/composition.mjs";
@@ -34,4 +34,4 @@ import { bindSessionFileLinkModes, sessionMinorModes } from "./web/stores/fileLi
34
34
  import { createToolCompletionTabs } from "./web/lib/toolCompletionTabs.mjs";
35
35
  import { createWebMcpSimulator } from "./web/lib/webmcpSimulator.mjs";
36
36
  import { localHostId, parseHostKey, qualifyHostId, qualifyHostKey, splitHostId } from "./web/lib/hostIdentity.mjs";
37
- export { type ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerPromptClaim, type ContextGroup, type ContextItemSource, DialogMethod, DialogPromptClaim, DialogRequest, EditorTextRequest, EntryKind, HOST_SLOTS, HistoryPage, ImageRefScope, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, type InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, IntercomEntry, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MenuClaim, MenuKind, MenuState, type MinorMode, ModelChoice, type NativeTemplateCatalog, NoticeEntry, ProfileIdentity, QueuedEntry, RailRestartState, RailSessionInput, ReduceSessionOptions, ResolvedFill, RpcImage, type SelectionAxis, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettledEntry, StatusClock, StatusLineInput, TRIGGER_CHARS, ThreadTranscriptReader, TimelineEntry, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolRendererBoundary, type TransientTabActions, UPDATE_REQUIRED_REASON, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginRegistry, WorkspacesState, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, reuseRailWorkspaces, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
37
+ export { type ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerPromptClaim, type ContextGroup, type ContextItemSource, DialogMethod, DialogPromptClaim, DialogRequest, EditorTextRequest, EntryKind, HOST_SLOTS, HistoryPage, ImageRefScope, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, type InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, IntercomEntry, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MenuClaim, MenuKind, MenuState, type MinorMode, ModelChoice, type NativeTemplateCatalog, NoticeEntry, ProfileIdentity, QueuedEntry, RailRestartState, RailSessionInput, ReduceSessionOptions, ResolvedFill, RpcImage, type SelectionAxis, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettledEntry, StatusClock, StatusLineInput, TRIGGER_CHARS, ThreadTranscriptReader, TimelineEntry, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolRendererBoundary, type TransientTabActions, UPDATE_REQUIRED_REASON, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginRegistry, WorkspacesState, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, reuseRailWorkspaces, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
package/dist/core.mjs CHANGED
@@ -28,10 +28,10 @@ import { bindSessionFileLinkModes, sessionMinorModes } from "./web/stores/fileLi
28
28
  import { claimDialogMenu, clearPendingMenu, menuStore, pendingMenuFor, releaseDialogMenu, resetMenuStore, setPendingMenu } from "./web/stores/menuStore.mjs";
29
29
  import { ImageRefScope, bindImageReader, loadImageRef, useImageRefs } from "./web/stores/imageRefStore.mjs";
30
30
  import { createPagedTranscript } from "./web/stores/pagedTranscriptStore.mjs";
31
- import { dispatchHeldSessionChannel, heldSessionChannels, holdSessionChannels } from "./web/stores/sessionChannelHoldsStore.mjs";
31
+ import { dispatchHeldSessionChannel, heldSessionChannels, heldVoiceSessions, holdSessionChannels, holdVoiceSession } from "./web/stores/sessionChannelHoldsStore.mjs";
32
32
  import { applyThreadTranscriptFrame, bindThreadReader, dropThreads, heldThreads, resetThreads, resubscribeThreads, subscribeThread, threadStoreKey, unsubscribeThread } from "./web/stores/threadStore.mjs";
33
33
  import { closeTransientTab, dropTransientTabs, findTransientTab, openTransientTab, setTransientTabSession, transientTabsStore, useTransientTabs } from "./web/stores/transientTabsStore.mjs";
34
34
  import { applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, resetWorkspaces, selectWorkspace, workspacesStore } from "./web/stores/workspacesStore.mjs";
35
35
  import { updateDialogDraft, useDialogDraft } from "./web/stores/dialogDraftStore.mjs";
36
36
  import { createWebMcpSimulator } from "./web/lib/webmcpSimulator.mjs";
37
- export { BUILTIN_COMMANDS, HOST_SLOTS, ImageRefScope, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, TRIGGER_CHARS, ToolRendererBoundary, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, reuseRailWorkspaces, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
37
+ export { BUILTIN_COMMANDS, HOST_SLOTS, ImageRefScope, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, TRIGGER_CHARS, ToolRendererBoundary, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, answerDialogConfirm, answerDialogValue, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindHistoryReader, bindHostTransport, bindImageReader, bindSessionFileLinkModes, bindSessionProtocol, bindSessionWebWorkspace, bindThreadReader, bindTransport, buildRailWorkspaces, builtinCommandFrame, cancelDialog, claimDialogMenu, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeTransientTab, commandCompletions, compactCommand, completeSessionTransfer, contextGroups, createDashboardTransport, createPagedTranscript, createProtocolHubSocket, createToolCompletionTabs, createWebMcpSimulator, createWebPluginRegistry, deleteQueuedMessage, dialogCancelled, dialogConfirmed, dialogValue, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, endSessionReplay, enqueueAutomaticCommand, fileCompletions, fileTabForPath, findTransientTab, flushUiTrace, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSupportedImageMimeType, loadImageRef, loadModelChoices, localHostId, markSocketClosed, markUpdateRequired, menuStore, mergeScopedPlugins, minorModes, nativeTemplateCatalog, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openTransientTab, ownerLabel, ownersOf, paletteCommands, parseHostKey, parseSelection, pendingMenuFor, pendingSetupView, personaInitials, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railSessionStatus, reduceSession, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseDialogMenu, releaseProtocolTranscript, releaseTransport, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionWebPlugins, removeWorkspaceWebPlugins, renameSession, replaceQueuedEntries, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetMenuStore, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetWebPlugins, resetWorkspaces, resolveNativeTemplate, resolveParentId, resubscribeThreads, resumeQueueCommand, resumeQueuedMessages, reuseRailWorkspaces, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setHasNewerHistory, setModelCommand, setPendingMenu, setSessionNameCommand, setSessionStreamed, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, slotFills, splitHostId, startPluginDefinitions, startWebPlugins, steerCommand, streamedSessions, submitCapture, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, textFromContent, threadStoreKey, toolMessageProps, toolPromptClaim, totalTokens, traceProfilerRender, traceStore, transientTabsStore, transportForHost, triggerTokenAt, unsubscribeThread, updateDialogDraft, useActiveSession, useActiveSessionMeta, useActivityGroups, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useImageRefs, useNoSessions, useRailEntries, useRailEntry, useRenderTrace, useTransientTabs, validateComposerCapture, waitForSession, watchHubThread, webPluginDiagnostics, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceName, workspaceSlotFills, workspacesStore };
package/dist/index.cjs CHANGED
@@ -263,7 +263,9 @@ exports.groupTone = require_timelineGroups.groupTone;
263
263
  exports.hasSessionProtocol = require_sessionProtocolCommands.hasSessionProtocol;
264
264
  exports.heldSessionChannels = require_sessionChannelHoldsStore.heldSessionChannels;
265
265
  exports.heldThreads = require_threadStore.heldThreads;
266
+ exports.heldVoiceSessions = require_sessionChannelHoldsStore.heldVoiceSessions;
266
267
  exports.holdSessionChannels = require_sessionChannelHoldsStore.holdSessionChannels;
268
+ exports.holdVoiceSession = require_sessionChannelHoldsStore.holdVoiceSession;
267
269
  exports.imagesFromContent = require_sessionModel.imagesFromContent;
268
270
  exports.inactiveTotal = require_contextComposition.inactiveTotal;
269
271
  exports.initialSessionState = require_sessionModel.initialSessionState;
package/dist/index.d.mts CHANGED
@@ -18,7 +18,7 @@ import { SessionMeta, SessionsState, UPDATE_REQUIRED_REASON, activeSessionId, ap
18
18
  import { HistoryPage, abortRun, answerDialogConfirm, answerDialogValue, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySessionFrame, applySessionLifecycle, applyThreadFrame, beginSessionReplay, bindHistoryReader, cancelDialog, clearQueuedMessages, deleteQueuedMessage, dropSessionStore, endSessionReplay, loadModelChoices, promoteQueuedMessage, queueFollowUp, queueFollowUpWithAck, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, releaseProtocolTranscript, renameSession, requestLatestHistory, requestNewerHistory, requestOlderHistory, resetSessionStore, resetSessionStores, resumeQueuedMessages, rewindToMessage, runCommand, seedHistoryCursor, selectFastMode, selectModel, selectThinkingLevel, sessionStoreFor, setAgentLock, setHasNewerHistory, setSessionStreamed, streamedSessions, submitMessage, submitMessageWithAck, useActiveSession, useHasOlderHistory } from "./web/stores/sessionStore.mjs";
19
19
  import { BrowserPerformanceEvent, BrowserPerformanceEventName, browserReadyDuration, flushBrowserTelemetry, installBrowserErrorReporting, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace } from "./web/lib/browserTelemetry.mjs";
20
20
  import { createPagedTranscript } from "./web/stores/pagedTranscriptStore.mjs";
21
- import { dispatchHeldSessionChannel, heldSessionChannels, holdSessionChannels } from "./web/stores/sessionChannelHoldsStore.mjs";
21
+ import { dispatchHeldSessionChannel, heldSessionChannels, heldVoiceSessions, holdSessionChannels, holdVoiceSession } from "./web/stores/sessionChannelHoldsStore.mjs";
22
22
  import { ThreadTranscriptReader, applyThreadTranscriptFrame, bindThreadReader, dropThreads, heldThreads, resetThreads, resubscribeThreads, subscribeThread, threadStoreKey, unsubscribeThread } from "./web/stores/threadStore.mjs";
23
23
  import { WorkspacesState, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, resetWorkspaces, selectWorkspace, workspacesStore } from "./web/stores/workspacesStore.mjs";
24
24
  import { ActivityGroup, FileLinkResolver, MinorMode, MinorModeAvailability, MinorModeSource, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, SelectionAxis, activityGroups, bindFileLinkModes, fileLinkFor, fileLinkMentions, fileTabForPath, minorModes, selectionAxes, subscribeActivitySources, useActivityGroups, useDockFaceBadges, useDockFaces, useFileLinks } from "./web/lib/composition.mjs";
@@ -82,4 +82,4 @@ import { WorkspaceAdmissionDraft, admitDashboardWorkspace, resetWorkspaceAdmissi
82
82
  import { EMPTY_SETTINGS_DRAFT, SettingsDraftState, SettingsDraftTarget, discardSettingsDraft, loadSettingsDraft, saveSettingsDraft, setSettingsDraft, settingsDraftKey, settingsDraftStore } from "./web/stores/settingsDraftStore.mjs";
83
83
  import { dashboardStateFor, useDashboardState } from "./web/stores/dashboardStateStore.mjs";
84
84
  import { DashboardRendererProvider, DashboardRenderers } from "./web/lib/dashboardRenderers.mjs";
85
- export { ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, BrowserNotificationDeliveryStatus, BrowserNotificationPermissionStatus, BrowserPerformanceEvent, BrowserPerformanceEventName, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerAttachment, ComposerContextAttachment, ComposerFileAttachment, ComposerImageAttachment, ComposerPromptClaim, ComposerSessionState, ComposerTextAttachment, ContextGroup, ContextGroupKind, ContextItem, ContextItemSource, ContextOwner, CreateSessionResult, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, type DashboardRenderers, DashboardRoute, DevProxyState, DialogDraft, DialogMethod, DialogPromptClaim, DialogRequest, DockTab, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, EditorTextRequest, EntryKind, FetchItemDetailResult, FileLinkResolver, FileMention, GroupUnit, HOST_SLOTS, HistoryPage, ImageSettingsResult, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, InstalledWebTemplate, IntercomEntry, LEGACY_WORKSPACE_ID, LeaderConflict, LeaderGroup, LeaderOption, LivePushStatus, LoginFlowResult, LogoutResult, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, MenuClaim, MenuKind, MenuState, MinorMode, MinorModeAvailability, MinorModeSource, ModelChoice, NativeTemplateCatalog, NewSessionDraft, NewSessionState, NoticeEntry, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, PairingResult, PaletteState, PasskeyOutcome, PasskeySupportView, PlannedWritesInput, ProfileIdentity, ProvidersResult, QueuedEntry, RailDialogState, RailRestartState, RailSessionInput, ReadConfigResult, ReadRepositorySettingsResult, ReduceSessionOptions, RemoteAccessState, RemoteStep, RemoveWorkspaceResult, ResolvedFill, RestartSessionResult, ResumeDraft, ResumeSessionResult, ResumeTarget, ReviveSessionResult, RpcImage, STEP_UP_HEADER_NAME, Selection, SelectionAxis, SessionAsset, SessionGroupsResult, SessionHistoryResult, SessionMcpResult, SessionMcpViewState, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettingsDraftState, SettingsDraftTarget, SettingsSection, SettingsWorkspace, SettledEntry, SingleUnit, StateResult, StatusClock, StatusLineInput, StopSessionResult, StoredSessionAttachment, TRIGGER_CHARS, TargetResult, TargetsResult, TemplateConfiguration, ThemeState, ThreadTranscriptReader, TimelineEntry, TimelineUnit, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolPromptState, TransientTabActions, UPDATE_REQUIRED_REASON, UiState, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginCompositionPhase, WebPluginCompositionState, WebPluginMountState, WebPluginRegistry, WebTemplateCatalog, WebTemplateDecision, WebTemplateDiagnostic, WorkspaceAdmissionDraft, WorkspaceResult, WorkspaceSandboxRequest, WorkspacesResult, WorkspacesState, WriteConfigResult, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reuseRailWorkspaces, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
85
+ export { ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, BrowserNotificationDeliveryStatus, BrowserNotificationPermissionStatus, BrowserPerformanceEvent, BrowserPerformanceEventName, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerAttachment, ComposerContextAttachment, ComposerFileAttachment, ComposerImageAttachment, ComposerPromptClaim, ComposerSessionState, ComposerTextAttachment, ContextGroup, ContextGroupKind, ContextItem, ContextItemSource, ContextOwner, CreateSessionResult, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, type DashboardRenderers, DashboardRoute, DevProxyState, DialogDraft, DialogMethod, DialogPromptClaim, DialogRequest, DockTab, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, EditorTextRequest, EntryKind, FetchItemDetailResult, FileLinkResolver, FileMention, GroupUnit, HOST_SLOTS, HistoryPage, ImageSettingsResult, InputSender, InstallDiagnostic, InstallDiagnosticKind, InstalledContextAction, InstalledHomeContribution, InstalledNativeTemplate, InstalledRepositorySettingsPanel, InstalledSettingsPanel, InstalledUserMessageAction, InstalledWebTemplate, IntercomEntry, LEGACY_WORKSPACE_ID, LeaderConflict, LeaderGroup, LeaderOption, LivePushStatus, LoginFlowResult, LogoutResult, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, MenuClaim, MenuKind, MenuState, MinorMode, MinorModeAvailability, MinorModeSource, ModelChoice, NativeTemplateCatalog, NewSessionDraft, NewSessionState, NoticeEntry, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, PairingResult, PaletteState, PasskeyOutcome, PasskeySupportView, PlannedWritesInput, ProfileIdentity, ProvidersResult, QueuedEntry, RailDialogState, RailRestartState, RailSessionInput, ReadConfigResult, ReadRepositorySettingsResult, ReduceSessionOptions, RemoteAccessState, RemoteStep, RemoveWorkspaceResult, ResolvedFill, RestartSessionResult, ResumeDraft, ResumeSessionResult, ResumeTarget, ReviveSessionResult, RpcImage, STEP_UP_HEADER_NAME, Selection, SelectionAxis, SessionAsset, SessionGroupsResult, SessionHistoryResult, SessionMcpResult, SessionMcpViewState, SessionMeta, SessionRailModelInput, SessionSocket, SessionSocketHandlers, SessionState, SessionStats, SessionsState, SettingsDraftState, SettingsDraftTarget, SettingsSection, SettingsWorkspace, SettledEntry, SingleUnit, StateResult, StatusClock, StatusLineInput, StopSessionResult, StoredSessionAttachment, TRIGGER_CHARS, TargetResult, TargetsResult, TemplateConfiguration, ThemeState, ThreadTranscriptReader, TimelineEntry, TimelineUnit, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolPromptState, TransientTabActions, UPDATE_REQUIRED_REASON, UiState, UiTraceRecord, UiTraceSink, UserEntry, UserImage, WebPluginCompositionPhase, WebPluginCompositionState, WebPluginMountState, WebPluginRegistry, WebTemplateCatalog, WebTemplateDecision, WebTemplateDiagnostic, WorkspaceAdmissionDraft, WorkspaceResult, WorkspaceSandboxRequest, WorkspacesResult, WorkspacesState, WriteConfigResult, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reuseRailWorkspaces, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
package/dist/index.mjs CHANGED
@@ -65,7 +65,7 @@ import { createPagedTranscript } from "./web/stores/pagedTranscriptStore.mjs";
65
65
  import { closePalette, openPalette, paletteStore, setPalettePath, togglePalette } from "./web/stores/paletteStore.mjs";
66
66
  import { closeResumeDialog, openResumeDialog, railDialogStore, railRestartStore, resetRailDialogStore, restartDashboardSession, resumeDashboardSession, resumeDraftStore, updateResumeDraft } from "./web/stores/railDialogStore.mjs";
67
67
  import { addPasskey, approveDevice, closeRemoteDialog, denyDevice, newPairingCode, openRemoteDialog, refreshPasskeys, refreshRemoteState, remoteAccessStore, revokePairedDevice, revokeTrustedNativeDevice, showRemoteOptions, turnRemoteAccessOff, turnRemoteAccessOn, updateRemoteSettings } from "./web/stores/remoteAccessStore.mjs";
68
- import { dispatchHeldSessionChannel, heldSessionChannels, holdSessionChannels } from "./web/stores/sessionChannelHoldsStore.mjs";
68
+ import { dispatchHeldSessionChannel, heldSessionChannels, heldVoiceSessions, holdSessionChannels, holdVoiceSession } from "./web/stores/sessionChannelHoldsStore.mjs";
69
69
  import { configuredTemplate, ensureTemplateConfiguration, refreshTemplateConfiguration, saveTemplateDefault, templateStore, useTemplateConfiguration } from "./web/stores/templateStore.mjs";
70
70
  import { applyStoredTheme, availableThemes, selectTheme, themeStore } from "./web/stores/themeStore.mjs";
71
71
  import { applyThreadTranscriptFrame, bindThreadReader, dropThreads, heldThreads, resetThreads, resubscribeThreads, subscribeThread, threadStoreKey, unsubscribeThread } from "./web/stores/threadStore.mjs";
@@ -82,4 +82,4 @@ import { admitDashboardWorkspace, resetWorkspaceAdmission, updateWorkspaceAdmiss
82
82
  import { dialogDraftStore, updateDialogDraft, useDialogDraft } from "./web/stores/dialogDraftStore.mjs";
83
83
  import { EMPTY_SETTINGS_DRAFT, discardSettingsDraft, loadSettingsDraft, saveSettingsDraft, setSettingsDraft, settingsDraftKey, settingsDraftStore } from "./web/stores/settingsDraftStore.mjs";
84
84
  import { dashboardStateFor, useDashboardState } from "./web/stores/dashboardStateStore.mjs";
85
- export { BUILTIN_COMMANDS, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, HOST_SLOTS, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, STEP_UP_HEADER_NAME, TRIGGER_CHARS, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, holdSessionChannels, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reuseRailWorkspaces, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
85
+ export { BUILTIN_COMMANDS, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, EMPTY_NEW_SESSION_DRAFT, EMPTY_SETTINGS_DRAFT, HOST_SLOTS, LEGACY_WORKSPACE_ID, MAX_COMPLETION_ITEMS, MAX_COMPOSER_ATTACHMENTS, MAX_COMPOSER_IMAGE_BYTES, MAX_COMPOSER_TEXT_BYTES, MAX_COMPOSER_TOTAL_IMAGE_BYTES, MAX_COMPOSER_TOTAL_TEXT_BYTES, MAX_COMPOSER_UPLOAD_BYTES, PACKAGED_MINOR_MODES, PACKAGED_SELECTION_AXES, STEP_UP_HEADER_NAME, TRIGGER_CHARS, UPDATE_REQUIRED_REASON, abbreviateCwd, abortCommand, abortRun, acquireModelContext, activateWebPluginHost, activateWebPluginSession, activateWebPluginWorkspace, activeSessionId, activityGroupSlot, activityGroups, addDevProxyTarget, addPasskey, admitDashboardWorkspace, admitWorkspace, ansiSegments, answerDialogConfirm, answerDialogValue, answerLogin, appendComposerDraft, appendComposerQuote, appendQueued, appendUserPrompt, applyCaptureFrame, applyHistoryPage, applyProtocolQueue, applyProtocolTranscript, applySelectionAnswer, applySessionBacklog, applySessionFrame, applySessionLifecycle, applySessionRemoved, applySessionUpsert, applySessionsSnapshot, applyStoredTheme, applyThreadFrame, applyThreadTranscriptFrame, applyWorkspaceRemoved, applyWorkspaceUpsert, applyWorkspacesSnapshot, approveDevice, approvePairing, asWorkspace, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, bindHostTransport, bindSessionActivityRenderer, bindSessionFileLinkModes, bindSessionProtocol, bindSessionTranscriptRenderer, bindSessionWebWorkspace, bindThreadReader, bindThreadRenderer, bindTransport, bindWebPluginCompositions, browserNotificationPermission, browserReadyDuration, buildRailWorkspaces, builtinCommandFrame, canSaveSettings, cancelDialog, cancelLogin, claimDialogMenu, clearComposerState, clearDialog, clearPendingMenu, clearQueueCommand, clearQueuedEntries, clearQueuedMessages, closeNewSession, closePalette, closeRemoteDialog, closeResumeDialog, closeTransientTab, collectNativeTemplates, collectWebTemplates, commandCompletions, compactCommand, completeSessionTransfer, composerStore, composerSubmissionStore, configuredTemplate, contextGroups, createDashboardTransport, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWebPluginRegistry, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dockTabFor, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileLinkMentions, fileTabForPath, findTransientTab, flushBrowserTelemetry, flushUiTrace, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, globalSlotFills, groupSummary, groupTone, hasSessionProtocol, heldSessionChannels, heldThreads, heldVoiceSessions, holdSessionChannels, holdVoiceSession, imagesFromContent, inactiveTotal, initialSessionState, inlineTextBytes, installBrowserErrorReporting, installGlobalWebPlugins, installSessionWebPlugins, installWebPlugins, installWorkspaceWebPlugins, installedWebPlugins, invokeServerMethod, isDesktopClient, isSessionMcpActivity, isSupportedImageMimeType, leaderConflicts, leaderGroup, listDirectory, listPoFolders, listProviders, listSessionHistory, listSessionMcpClients, listSessions, listSettingsModels, listSettingsRepositories, listWorkspaceHistory, listWorkspaces, livePushStatus, loadModelChoices, loadSessionAsset, loadSessionAvatar, loadSettingsDraft, localHostId, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, noteRender, noteStoreUpdate, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, parseHostKey, parseSelection, passkeysAvailable, pendingCaptureSessions, pendingMenuFor, pendingSetupView, personaInitials, plannedSettingsWrites, pluginActivityGroups, pluginContextActions, pluginDockFaces, pluginFileLinks, pluginHomeContributions, pluginLeaderBindings, pluginMinorModes, pluginRepositorySettingsPanels, pluginSelectionAxes, pluginSessionContext, pluginSettingsPanels, pluginSettingsSections, pluginSlotProps, pluginToolRenderer, pluginUserMessageActions, pluginsAtScope, prependHistory, projectedGroups, promoteQueuedCommand, promoteQueuedMessage, promptCommand, protocolSocketUrl, publishComposerSubmission, qrMatrix, qualifyHostId, qualifyHostKey, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, railSessionStatus, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, recordBrowserUiTrace, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, removeHostWebPlugins, removeQueuedCommand, removeQueuedEntry, removeSessionMcpSetup, removeSessionWebPlugins, removeWorkspace, removeWorkspaceWebPlugins, renameSession, renameSessionGroup, renderSessionActivity, renderSessionTranscript, renderThread, replaceQueuedEntries, requestBrowserNotificationPermission, requestLatestHistory, requestNewerHistory, requestOlderHistory, requestSessionProtocolFrame, resetComposerStore, resetDevProxyStore, resetMenuStore, resetNewSessionStore, resetRailDialogStore, resetSealedSessions, resetSessionStore, resetSessionStores, resetSessions, resetThreads, resetToolPromptStore, resetTransientTabs, resetWebPlugins, resetWorkspaceAdmission, resetWorkspaces, resolveNativeTemplate, resolveParentId, resolveWebTemplate, restartDashboardSession, restartSession, restoreComposerDrafts, restoreLivePushRegistration, restoreSealedSession, resubscribeThreads, resumeDashboardSession, resumeDraftStore, resumeQueueCommand, resumeQueuedMessages, resumeSession, resumeWorkspaceSession, retryWebPluginCompositions, reuseRailWorkspaces, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, sameRailEntries, sameRailEntry, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusClock, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setUiTraceSink, setWebPluginLoadDiagnostics, setWorkspaceSandbox, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, splitHostId, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, summaryValueEqual, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, traceProfilerRender, traceStore, transientTabsOf, transientTabsStore, transportForHost, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaceBadges, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useRailEntries, useRailEntry, useRenderTrace, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryForHost, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
@@ -37,9 +37,30 @@ function dispatchHeldSessionChannel(frame) {
37
37
  }
38
38
  }
39
39
  }
40
+ /** Voice alone retains an already mounted composition and permits host background connectivity. */
41
+ const heldVoiceSessions = require_uiTrace.traceStore("voiceSessionHolds", new _tanstack_store.Store(/* @__PURE__ */ new Map()));
42
+ function holdVoiceSession(sessionId) {
43
+ const releaseChannels = holdSessionChannels(sessionId);
44
+ heldVoiceSessions.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));
45
+ let released = false;
46
+ return () => {
47
+ if (released) return;
48
+ released = true;
49
+ heldVoiceSessions.setState((current) => {
50
+ const next = new Map(current);
51
+ const count = (next.get(sessionId) ?? 1) - 1;
52
+ if (count === 0) next.delete(sessionId);
53
+ else next.set(sessionId, count);
54
+ return next;
55
+ });
56
+ releaseChannels();
57
+ };
58
+ }
40
59
  //#endregion
41
60
  exports.dispatchHeldSessionChannel = dispatchHeldSessionChannel;
42
61
  exports.heldSessionChannels = heldSessionChannels;
62
+ exports.heldVoiceSessions = heldVoiceSessions;
43
63
  exports.holdSessionChannels = holdSessionChannels;
64
+ exports.holdVoiceSession = holdVoiceSession;
44
65
 
45
66
  //# sourceMappingURL=sessionChannelHoldsStore.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sessionChannelHoldsStore.cjs","names":["traceStore","Store"],"sources":["../../../src/web/stores/sessionChannelHoldsStore.ts"],"sourcesContent":["import { Store } from '@tanstack/store';\n\nimport { traceStore } from '../lib/uiTrace';\n\n/** Dialogs can observe their target without taking focus or stealing another observer's subscription. */\nexport const heldSessionChannels = traceStore('sessionChannelHolds', new Store<ReadonlyMap<string, number>>(new Map()));\n\nconst observers = new Set<{ sessionId: string; receive: (frame: Record<string, unknown>) => void }>();\n\nexport function holdSessionChannels(sessionId: string, receive?: (frame: Record<string, unknown>) => void): () => void {\n const observer = receive === undefined ? undefined : { sessionId, receive };\n if (observer) observers.add(observer);\n heldSessionChannels.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (observer) observers.delete(observer);\n heldSessionChannels.setState((current) => {\n const next = new Map(current);\n const remaining = (next.get(sessionId) ?? 1) - 1;\n if (remaining === 0) next.delete(sessionId);\n else next.set(sessionId, remaining);\n return next;\n });\n };\n}\n\n/** Deliver to the observing dialog's composition, even when the target has never been focused. */\nexport function dispatchHeldSessionChannel(frame: Record<string, unknown>): void {\n if (typeof frame.type !== 'string' || typeof frame.sessionId !== 'string') return;\n for (const observer of observers) {\n if (observer.sessionId !== frame.sessionId) continue;\n try {\n observer.receive(frame);\n } catch (error) {\n console.error('Session channel observer failed', error);\n }\n }\n}\n"],"mappings":";;;;AAKA,MAAa,sBAAsBA,gBAAAA,WAAW,uBAAuB,IAAIC,gBAAAA,sBAAmC,IAAI,IAAI,CAAC,CAAC;AAEtH,MAAM,4BAAY,IAAI,IAA8E;AAEpG,SAAgB,oBAAoB,WAAmB,SAAgE;CACrH,MAAM,WAAW,YAAY,KAAA,IAAY,KAAA,IAAY;EAAE;EAAW;CAAQ;CAC1E,IAAI,UAAU,UAAU,IAAI,QAAQ;CACpC,oBAAoB,UAAU,YAAY,IAAI,IAAI,OAAO,CAAC,CAAC,IAAI,YAAY,QAAQ,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC;CAC5G,IAAI,WAAW;CACf,aAAa;EACX,IAAI,UAAU;EACd,WAAW;EACX,IAAI,UAAU,UAAU,OAAO,QAAQ;EACvC,oBAAoB,UAAU,YAAY;GACxC,MAAM,OAAO,IAAI,IAAI,OAAO;GAC5B,MAAM,aAAa,KAAK,IAAI,SAAS,KAAK,KAAK;GAC/C,IAAI,cAAc,GAAG,KAAK,OAAO,SAAS;QACrC,KAAK,IAAI,WAAW,SAAS;GAClC,OAAO;EACT,CAAC;CACH;AACF;;AAGA,SAAgB,2BAA2B,OAAsC;CAC/E,IAAI,OAAO,MAAM,SAAS,YAAY,OAAO,MAAM,cAAc,UAAU;CAC3E,KAAK,MAAM,YAAY,WAAW;EAChC,IAAI,SAAS,cAAc,MAAM,WAAW;EAC5C,IAAI;GACF,SAAS,QAAQ,KAAK;EACxB,SAAS,OAAO;GACd,QAAQ,MAAM,mCAAmC,KAAK;EACxD;CACF;AACF"}
1
+ {"version":3,"file":"sessionChannelHoldsStore.cjs","names":["traceStore","Store"],"sources":["../../../src/web/stores/sessionChannelHoldsStore.ts"],"sourcesContent":["import { Store } from '@tanstack/store';\n\nimport { traceStore } from '../lib/uiTrace';\n\n/** Dialogs can observe their target without taking focus or stealing another observer's subscription. */\nexport const heldSessionChannels = traceStore('sessionChannelHolds', new Store<ReadonlyMap<string, number>>(new Map()));\n\nconst observers = new Set<{ sessionId: string; receive: (frame: Record<string, unknown>) => void }>();\n\nexport function holdSessionChannels(sessionId: string, receive?: (frame: Record<string, unknown>) => void): () => void {\n const observer = receive === undefined ? undefined : { sessionId, receive };\n if (observer) observers.add(observer);\n heldSessionChannels.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (observer) observers.delete(observer);\n heldSessionChannels.setState((current) => {\n const next = new Map(current);\n const remaining = (next.get(sessionId) ?? 1) - 1;\n if (remaining === 0) next.delete(sessionId);\n else next.set(sessionId, remaining);\n return next;\n });\n };\n}\n\n/** Deliver to the observing dialog's composition, even when the target has never been focused. */\nexport function dispatchHeldSessionChannel(frame: Record<string, unknown>): void {\n if (typeof frame.type !== 'string' || typeof frame.sessionId !== 'string') return;\n for (const observer of observers) {\n if (observer.sessionId !== frame.sessionId) continue;\n try {\n observer.receive(frame);\n } catch (error) {\n console.error('Session channel observer failed', error);\n }\n }\n}\n\n/** Voice alone retains an already mounted composition and permits host background connectivity. */\nexport const heldVoiceSessions = traceStore('voiceSessionHolds', new Store<ReadonlyMap<string, number>>(new Map()));\n\nexport function holdVoiceSession(sessionId: string): () => void {\n const releaseChannels = holdSessionChannels(sessionId);\n heldVoiceSessions.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));\n let released = false;\n return () => {\n if (released) return;\n released = true;\n heldVoiceSessions.setState((current) => {\n const next = new Map(current);\n const count = (next.get(sessionId) ?? 1) - 1;\n if (count === 0) next.delete(sessionId);\n else next.set(sessionId, count);\n return next;\n });\n releaseChannels();\n };\n}\n"],"mappings":";;;;AAKA,MAAa,sBAAsBA,gBAAAA,WAAW,uBAAuB,IAAIC,gBAAAA,sBAAmC,IAAI,IAAI,CAAC,CAAC;AAEtH,MAAM,4BAAY,IAAI,IAA8E;AAEpG,SAAgB,oBAAoB,WAAmB,SAAgE;CACrH,MAAM,WAAW,YAAY,KAAA,IAAY,KAAA,IAAY;EAAE;EAAW;CAAQ;CAC1E,IAAI,UAAU,UAAU,IAAI,QAAQ;CACpC,oBAAoB,UAA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@ -5,5 +5,8 @@ export declare const heldSessionChannels: Store<ReadonlyMap<string, number>, nev
5
5
  export declare function holdSessionChannels(sessionId: string, receive?: (frame: Record<string, unknown>) => void): () => void;
6
6
  /** Deliver to the observing dialog's composition, even when the target has never been focused. */
7
7
  export declare function dispatchHeldSessionChannel(frame: Record<string, unknown>): void;
8
+ /** Voice alone retains an already mounted composition and permits host background connectivity. */
9
+ export declare const heldVoiceSessions: Store<ReadonlyMap<string, number>, never>;
10
+ export declare function holdVoiceSession(sessionId: string): () => void;
8
11
  //#endregion
9
12
  //# sourceMappingURL=sessionChannelHoldsStore.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sessionChannelHoldsStore.d.mts","names":[],"sources":["../../../src/web/stores/sessionChannelHoldsStore.ts"],"mappings":";;;qBAKa,qBAAmB,MAAA;wBAIhB,oBAAoB,mBAAmB,WAAW,OAAO;;wBAoBzD,2BAA2B,OAAO"}
1
+ {"version":3,"file":"sessionChannelHoldsStore.d.mts","names":[],"sources":["../../../src/web/stores/sessionChannelHoldsStore.ts"],"mappings":";;;qBAKa,qBAAmB,MAAA;wBAIhB,oBAAoB,mBAAmB,WAAW,OAAO;;wBAoBzD,2BAA2B,OAAO;;qBAarC,mBAAiB,MAAA;wBAEd,iBAAiB"}
@@ -37,7 +37,26 @@ function dispatchHeldSessionChannel(frame) {
37
37
  }
38
38
  }
39
39
  }
40
+ /** Voice alone retains an already mounted composition and permits host background connectivity. */
41
+ const heldVoiceSessions = traceStore("voiceSessionHolds", new Store(/* @__PURE__ */ new Map()));
42
+ function holdVoiceSession(sessionId) {
43
+ const releaseChannels = holdSessionChannels(sessionId);
44
+ heldVoiceSessions.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));
45
+ let released = false;
46
+ return () => {
47
+ if (released) return;
48
+ released = true;
49
+ heldVoiceSessions.setState((current) => {
50
+ const next = new Map(current);
51
+ const count = (next.get(sessionId) ?? 1) - 1;
52
+ if (count === 0) next.delete(sessionId);
53
+ else next.set(sessionId, count);
54
+ return next;
55
+ });
56
+ releaseChannels();
57
+ };
58
+ }
40
59
  //#endregion
41
- export { dispatchHeldSessionChannel, heldSessionChannels, holdSessionChannels };
60
+ export { dispatchHeldSessionChannel, heldSessionChannels, heldVoiceSessions, holdSessionChannels, holdVoiceSession };
42
61
 
43
62
  //# sourceMappingURL=sessionChannelHoldsStore.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sessionChannelHoldsStore.mjs","names":[],"sources":["../../../src/web/stores/sessionChannelHoldsStore.ts"],"sourcesContent":["import { Store } from '@tanstack/store';\n\nimport { traceStore } from '../lib/uiTrace';\n\n/** Dialogs can observe their target without taking focus or stealing another observer's subscription. */\nexport const heldSessionChannels = traceStore('sessionChannelHolds', new Store<ReadonlyMap<string, number>>(new Map()));\n\nconst observers = new Set<{ sessionId: string; receive: (frame: Record<string, unknown>) => void }>();\n\nexport function holdSessionChannels(sessionId: string, receive?: (frame: Record<string, unknown>) => void): () => void {\n const observer = receive === undefined ? undefined : { sessionId, receive };\n if (observer) observers.add(observer);\n heldSessionChannels.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (observer) observers.delete(observer);\n heldSessionChannels.setState((current) => {\n const next = new Map(current);\n const remaining = (next.get(sessionId) ?? 1) - 1;\n if (remaining === 0) next.delete(sessionId);\n else next.set(sessionId, remaining);\n return next;\n });\n };\n}\n\n/** Deliver to the observing dialog's composition, even when the target has never been focused. */\nexport function dispatchHeldSessionChannel(frame: Record<string, unknown>): void {\n if (typeof frame.type !== 'string' || typeof frame.sessionId !== 'string') return;\n for (const observer of observers) {\n if (observer.sessionId !== frame.sessionId) continue;\n try {\n observer.receive(frame);\n } catch (error) {\n console.error('Session channel observer failed', error);\n }\n }\n}\n"],"mappings":";;;;AAKA,MAAa,sBAAsB,WAAW,uBAAuB,IAAI,sBAAmC,IAAI,IAAI,CAAC,CAAC;AAEtH,MAAM,4BAAY,IAAI,IAA8E;AAEpG,SAAgB,oBAAoB,WAAmB,SAAgE;CACrH,MAAM,WAAW,YAAY,KAAA,IAAY,KAAA,IAAY;EAAE;EAAW;CAAQ;CAC1E,IAAI,UAAU,UAAU,IAAI,QAAQ;CACpC,oBAAoB,UAAU,YAAY,IAAI,IAAI,OAAO,CAAC,CAAC,IAAI,YAAY,QAAQ,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC;CAC5G,IAAI,WAAW;CACf,aAAa;EACX,IAAI,UAAU;EACd,WAAW;EACX,IAAI,UAAU,UAAU,OAAO,QAAQ;EACvC,oBAAoB,UAAU,YAAY;GACxC,MAAM,OAAO,IAAI,IAAI,OAAO;GAC5B,MAAM,aAAa,KAAK,IAAI,SAAS,KAAK,KAAK;GAC/C,IAAI,cAAc,GAAG,KAAK,OAAO,SAAS;QACrC,KAAK,IAAI,WAAW,SAAS;GAClC,OAAO;EACT,CAAC;CACH;AACF;;AAGA,SAAgB,2BAA2B,OAAsC;CAC/E,IAAI,OAAO,MAAM,SAAS,YAAY,OAAO,MAAM,cAAc,UAAU;CAC3E,KAAK,MAAM,YAAY,WAAW;EAChC,IAAI,SAAS,cAAc,MAAM,WAAW;EAC5C,IAAI;GACF,SAAS,QAAQ,KAAK;EACxB,SAAS,OAAO;GACd,QAAQ,MAAM,mCAAmC,KAAK;EACxD;CACF;AACF"}
1
+ {"version":3,"file":"sessionChannelHoldsStore.mjs","names":[],"sources":["../../../src/web/stores/sessionChannelHoldsStore.ts"],"sourcesContent":["import { Store } from '@tanstack/store';\n\nimport { traceStore } from '../lib/uiTrace';\n\n/** Dialogs can observe their target without taking focus or stealing another observer's subscription. */\nexport const heldSessionChannels = traceStore('sessionChannelHolds', new Store<ReadonlyMap<string, number>>(new Map()));\n\nconst observers = new Set<{ sessionId: string; receive: (frame: Record<string, unknown>) => void }>();\n\nexport function holdSessionChannels(sessionId: string, receive?: (frame: Record<string, unknown>) => void): () => void {\n const observer = receive === undefined ? undefined : { sessionId, receive };\n if (observer) observers.add(observer);\n heldSessionChannels.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (observer) observers.delete(observer);\n heldSessionChannels.setState((current) => {\n const next = new Map(current);\n const remaining = (next.get(sessionId) ?? 1) - 1;\n if (remaining === 0) next.delete(sessionId);\n else next.set(sessionId, remaining);\n return next;\n });\n };\n}\n\n/** Deliver to the observing dialog's composition, even when the target has never been focused. */\nexport function dispatchHeldSessionChannel(frame: Record<string, unknown>): void {\n if (typeof frame.type !== 'string' || typeof frame.sessionId !== 'string') return;\n for (const observer of observers) {\n if (observer.sessionId !== frame.sessionId) continue;\n try {\n observer.receive(frame);\n } catch (error) {\n console.error('Session channel observer failed', error);\n }\n }\n}\n\n/** Voice alone retains an already mounted composition and permits host background connectivity. */\nexport const heldVoiceSessions = traceStore('voiceSessionHolds', new Store<ReadonlyMap<string, number>>(new Map()));\n\nexport function holdVoiceSession(sessionId: string): () => void {\n const releaseChannels = holdSessionChannels(sessionId);\n heldVoiceSessions.setState((current) => new Map(current).set(sessionId, (current.get(sessionId) ?? 0) + 1));\n let released = false;\n return () => {\n if (released) return;\n released = true;\n heldVoiceSessions.setState((current) => {\n const next = new Map(current);\n const count = (next.get(sessionId) ?? 1) - 1;\n if (count === 0) next.delete(sessionId);\n else next.set(sessionId, count);\n return next;\n });\n releaseChannels();\n };\n}\n"],"mappings":";;;;AAKA,MAAa,sBAAsB,WAAW,uBAAuB,IAAI,sBAAmC,IAAI,IAAI,CAAC,CAAC;AAEtH,MAAM,4BAAY,IAAI,IAA8E;AAEpG,SAAgB,oBAAoB,WAAmB,SAAgE;CACrH,MAAM,WAAW,YAAY,KAAA,IAAY,KAAA,IAAY;EAAE;EAAW;CAAQ;CAC1E,IAAI,UAAU,UAAU,IAAI,QAAQ;CACpC,oBAAoB,UAAU,YAAY,IAAI,IAAI,OAAO,CAAC,CAAC,IAAI,YAAY,QAAQ,IAAI,SA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
126
  if (sessionContext !== void 0) props.sessionContext = sessionContext;
127
127
  props.holdSessionChannels = require_sessionChannelHoldsStore.holdSessionChannels;
128
+ props.holdVoiceSession = require_sessionChannelHoldsStore.holdVoiceSession;
128
129
  props.openSession = openSession;
129
130
  props.openSettings = openSettings;
130
131
  props.openPage = openPage;
@@ -1 +1 @@
1
- {"version":3,"file":"usePluginSlotProps.cjs","names":["useStore","sessionsStore","useContext","DashboardRendererContext","sessionStoreFor","useMemo","pluginSessionContext","useOpenTab","useWebPluginRegistry","useCallback","useNavigate","waitForSession","settingsSection","slotFills","HOST_SLOTS","useRouter","useSyncExternalStore","appendComposerDraft","attachComposerContext","attachComposerCapture","submitCapture","minorModes","pluginSlotProps","holdSessionChannels"],"sources":["../../../src/web/stores/usePluginSlotProps.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { useNavigate, useRouter } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { useCallback, useContext, useMemo, useSyncExternalStore } from 'react';\n\nimport { minorModes } from '../lib/composition';\nimport { DashboardRendererContext } from '../lib/dashboardRenderers';\nimport { HOST_SLOTS, slotFills } from '../lib/pluginRegistry';\nimport { pluginSessionContext, pluginSlotProps } from '../lib/pluginSlotProps';\nimport { settingsSection } from '../lib/settingsSections';\nimport { submitCapture } from './captureStore';\nimport { appendComposerDraft, attachComposerCapture, attachComposerContext } from './composerStore';\nimport { holdSessionChannels } from './sessionChannelHoldsStore';\nimport { sessionsStore, waitForSession } from './sessionsStore';\nimport { sessionStoreFor } from './sessionStore';\nimport { closeTransientTab, openTransientTab, setTransientTabSession } from './transientTabsStore';\nimport { useOpenTab } from './useOpenTab';\nimport { useWebPluginRegistry } from './useWebPluginRegistry';\n\nconst NO_SUBSCRIPTION = (): void => undefined;\nfunction useSummaryField(\n sessionId: string | null,\n key: 'workspaceId' | 'parentSessionId' | 'sessionProvenance',\n): string | undefined {\n return useStore(sessionsStore, (state) => (sessionId === null ? undefined : state.byId[sessionId]?.summary[key]));\n}\n\n/** The props a plugin component receives for a session, with the host's navigation and facts bound in. */\nexport function usePluginSlotProps(\n sessionId: string | null,\n onOpen?: () => void,\n sessionReservationId?: string,\n): WebPluginSlotProps {\n const tabOwnerId = useStore(sessionsStore, (state) =>\n sessionId === state.activeId ? (state.tabOwnerId ?? sessionId) : sessionId,\n );\n const renderers = useContext(DashboardRendererContext);\n const store = sessionStoreFor(sessionId);\n const statuses = useStore(store, (state) => state.statuses);\n const catalog = useStore(store, (state) => state.minorModes);\n const widgets = useStore(store, (state) => state.widgets);\n const context = useStore(store, (state) => state.context);\n const contextInventory = useMemo(() => context?.groups.flatMap((group) => group.items) ?? [], [context]);\n // Selected field by field so a summary upsert that changes none of them keeps the same object.\n const known = useStore(sessionsStore, (state) => sessionId !== null && state.byId[sessionId] !== undefined);\n const workspaceId = useSummaryField(sessionId, 'workspaceId');\n const parentSessionId = useSummaryField(sessionId, 'parentSessionId');\n const sessionProvenance = useSummaryField(sessionId, 'sessionProvenance');\n const sessionContext = useMemo(\n () => pluginSessionContext(sessionId, known ? { workspaceId, parentSessionId, sessionProvenance } : undefined),\n [known, parentSessionId, sessionId, sessionProvenance, workspaceId],\n );\n const openTab = useOpenTab();\n const registryRevision = useWebPluginRegistry();\n const openPluginTab = useCallback(\n (tabId: string | null) => {\n onOpen?.();\n openTab(tabId);\n },\n [onOpen, openTab],\n );\n const openPluginTransientTab = useCallback(\n (tab: Parameters<typeof openTransientTab>[1]) => {\n if (sessionId === null || tabOwnerId === null) return;\n onOpen?.();\n openTransientTab(\n tabOwnerId,\n tabOwnerId === sessionId ? tab : { ...tab, targetSessionId: tab.targetSessionId ?? sessionId },\n );\n openTab(tab.id);\n },\n [onOpen, openTab, sessionId, tabOwnerId],\n );\n const navigate = useNavigate();\n // Another session the page lists, such as a child a plugin just started. Its upsert can trail the plugin's own\n // response, so wait briefly for it; an id that never shows up is left alone.\n const openSession = useCallback(\n (target: string) => {\n void waitForSession(target).then((found) => {\n if (!found) return;\n onOpen?.();\n void navigate({ to: '/session/$sessionId', params: { sessionId: target } });\n });\n },\n [navigate, onOpen],\n );\n // A settings page, such as a sign-in a plugin needs; an unknown section id is left alone.\n const openSettings = useCallback(\n (section: string) => {\n if (settingsSection(section) === undefined) return;\n onOpen?.();\n void navigate({ to: '/settings/$section', params: { section } });\n },\n [navigate, onOpen],\n );\n // A plugin page, such as the Calendar; an id no page fill claims is left alone.\n const openPage = useCallback(\n (pageId: string) => {\n if (!slotFills(HOST_SLOTS.page, sessionId).some((fill) => fill.id === pageId)) return;\n onOpen?.();\n void navigate({ to: '/page/$pageId', params: { pageId } });\n },\n [navigate, onOpen, sessionId],\n );\n // Host surfaces also render outside a router, in tests and stories; there no page is shown.\n const router = useRouter({ warn: false }) as ReturnType<typeof useRouter> | null;\n const currentPath = (): string => router?.history.location.pathname ?? '';\n const pathname = useSyncExternalStore(\n (listener) => router?.history.subscribe(listener) ?? NO_SUBSCRIPTION,\n currentPath,\n currentPath,\n );\n const activePageId = /^\\/page\\/([^/]+)/.exec(pathname)?.[1];\n const closePluginTransientTab = useCallback(\n (tabId: string) => {\n if (tabOwnerId !== null) closeTransientTab(tabOwnerId, tabId);\n },\n [tabOwnerId],\n );\n const retargetTab = useCallback<NonNullable<WebPluginSlotProps['setTransientTabSession']>>(\n (tabId, target, retainComposer) => {\n if (tabOwnerId !== null) setTransientTabSession(tabOwnerId, tabId, target, retainComposer);\n },\n [tabOwnerId],\n );\n const appendDraft = useCallback((text: string) => appendComposerDraft(sessionId, text), [sessionId]);\n const attachContext = useCallback(\n (item: Parameters<typeof attachComposerContext>[1]) => attachComposerContext(sessionId, item),\n [sessionId],\n );\n const attachCapture = useCallback(\n (capture: Parameters<typeof attachComposerCapture>[1]) => attachComposerCapture(sessionId, capture),\n [sessionId],\n );\n const capture = useCallback(\n (value: Parameters<typeof submitCapture>[1]) => submitCapture(sessionId, value),\n [sessionId],\n );\n const activeMinorModes = useMemo(\n () =>\n minorModes(statuses, widgets, catalog)\n .filter((mode) => mode.availability === 'on')\n .map((mode) => mode.name),\n [catalog, statuses, widgets],\n );\n\n return useMemo(() => {\n void registryRevision;\n const props = pluginSlotProps(\n sessionId,\n openPluginTab,\n statuses,\n { open: openPluginTransientTab, close: closePluginTransientTab },\n appendDraft,\n attachContext,\n attachCapture,\n contextInventory,\n capture,\n sessionReservationId,\n );\n props.renderThread = (threadId, options) =>\n sessionId === null ? null : (renderers?.thread(sessionId, threadId, options) ?? null);\n props.renderSessionActivity = () =>\n sessionId === null ? null : (renderers?.activity(sessionId, () => openPluginTab(null)) ?? null);\n props.renderSessionTranscript = (targetId, options) => renderers?.transcript(targetId, options) ?? null;\n props.activeMinorModes = activeMinorModes;\n if (sessionContext !== undefined) props.sessionContext = sessionContext;\n props.holdSessionChannels = holdSessionChannels;\n props.openSession = openSession;\n props.openSettings = openSettings;\n props.openPage = openPage;\n if (activePageId !== undefined) props.activePageId = activePageId;\n props.setTransientTabSession = retargetTab;\n return props;\n }, [\n activeMinorModes,\n appendDraft,\n attachCapture,\n attachContext,\n capture,\n closePluginTransientTab,\n contextInventory,\n openPluginTab,\n openPluginTransientTab,\n openPage,\n openSession,\n openSettings,\n activePageId,\n registryRevision,\n renderers,\n sessionId,\n retargetTab,\n sessionContext,\n sessionReservationId,\n statuses,\n ]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAM,wBAA8B,KAAA;AACpC,SAAS,gBACP,WACA,KACoB;CACpB,QAAA,GAAOA,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAAW,cAAc,OAAO,KAAA,IAAY,MAAM,KAAK,UAAU,EAAE,QAAQ,IAAK;AAClH;;AAGA,SAAgB,mBACd,WACA,QACA,sBACoB;CACpB,MAAM,cAAA,GAAaD,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAC1C,cAAc,MAAM,WAAY,MAAM,cAAc,YAAa,SACnE;CACA,MAAM,aAAA,GAAYC,MAAAA,WAAAA,CAAWC,2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,MAAM,2BAA2B,UAAU,YAAY,WAAW,WAAW,UAAU,OAAO,KAAK;EACnG,MAAM,mBAAmB;EACzB,IAAI,mBAAmB,KAAA,GAAW,MAAM,iBAAiB;EACzD,MAAM,sBAAsBC,iCAAAA;EAC5B,MAAM,cAAc;EACpB,MAAM,eAAe;EACrB,MAAM,WAAW;EACjB,IAAI,iBAAiB,KAAA,GAAW,MAAM,eAAe;EACrD,MAAM,yBAAyB;EAC/B,OAAO;CACT,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"usePluginSlotProps.cjs","names":["useStore","sessionsStore","useContext","DashboardRendererContext","sessionStoreFor","useMemo","pluginSessionContext","useOpenTab","useWebPluginRegistry","useCallback","useNavigate","waitForSession","settingsSection","slotFills","HOST_SLOTS","useRouter","useSyncExternalStore","appendComposerDraft","attachComposerContext","attachComposerCapture","submitCapture","minorModes","pluginSlotProps","holdSessionChannels","holdVoiceSession"],"sources":["../../../src/web/stores/usePluginSlotProps.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { useNavigate, useRouter } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { useCallback, useContext, useMemo, useSyncExternalStore } from 'react';\n\nimport { minorModes } from '../lib/composition';\nimport { DashboardRendererContext } from '../lib/dashboardRenderers';\nimport { HOST_SLOTS, slotFills } from '../lib/pluginRegistry';\nimport { pluginSessionContext, pluginSlotProps } from '../lib/pluginSlotProps';\nimport { settingsSection } from '../lib/settingsSections';\nimport { submitCapture } from './captureStore';\nimport { appendComposerDraft, attachComposerCapture, attachComposerContext } from './composerStore';\nimport { holdSessionChannels, holdVoiceSession } from './sessionChannelHoldsStore';\nimport { sessionsStore, waitForSession } from './sessionsStore';\nimport { sessionStoreFor } from './sessionStore';\nimport { closeTransientTab, openTransientTab, setTransientTabSession } from './transientTabsStore';\nimport { useOpenTab } from './useOpenTab';\nimport { useWebPluginRegistry } from './useWebPluginRegistry';\n\nconst NO_SUBSCRIPTION = (): void => undefined;\nfunction useSummaryField(\n sessionId: string | null,\n key: 'workspaceId' | 'parentSessionId' | 'sessionProvenance',\n): string | undefined {\n return useStore(sessionsStore, (state) => (sessionId === null ? undefined : state.byId[sessionId]?.summary[key]));\n}\n\n/** The props a plugin component receives for a session, with the host's navigation and facts bound in. */\nexport function usePluginSlotProps(\n sessionId: string | null,\n onOpen?: () => void,\n sessionReservationId?: string,\n): WebPluginSlotProps {\n const tabOwnerId = useStore(sessionsStore, (state) =>\n sessionId === state.activeId ? (state.tabOwnerId ?? sessionId) : sessionId,\n );\n const renderers = useContext(DashboardRendererContext);\n const store = sessionStoreFor(sessionId);\n const statuses = useStore(store, (state) => state.statuses);\n const catalog = useStore(store, (state) => state.minorModes);\n const widgets = useStore(store, (state) => state.widgets);\n const context = useStore(store, (state) => state.context);\n const contextInventory = useMemo(() => context?.groups.flatMap((group) => group.items) ?? [], [context]);\n // Selected field by field so a summary upsert that changes none of them keeps the same object.\n const known = useStore(sessionsStore, (state) => sessionId !== null && state.byId[sessionId] !== undefined);\n const workspaceId = useSummaryField(sessionId, 'workspaceId');\n const parentSessionId = useSummaryField(sessionId, 'parentSessionId');\n const sessionProvenance = useSummaryField(sessionId, 'sessionProvenance');\n const sessionContext = useMemo(\n () => pluginSessionContext(sessionId, known ? { workspaceId, parentSessionId, sessionProvenance } : undefined),\n [known, parentSessionId, sessionId, sessionProvenance, workspaceId],\n );\n const openTab = useOpenTab();\n const registryRevision = useWebPluginRegistry();\n const openPluginTab = useCallback(\n (tabId: string | null) => {\n onOpen?.();\n openTab(tabId);\n },\n [onOpen, openTab],\n );\n const openPluginTransientTab = useCallback(\n (tab: Parameters<typeof openTransientTab>[1]) => {\n if (sessionId === null || tabOwnerId === null) return;\n onOpen?.();\n openTransientTab(\n tabOwnerId,\n tabOwnerId === sessionId ? tab : { ...tab, targetSessionId: tab.targetSessionId ?? sessionId },\n );\n openTab(tab.id);\n },\n [onOpen, openTab, sessionId, tabOwnerId],\n );\n const navigate = useNavigate();\n // Another session the page lists, such as a child a plugin just started. Its upsert can trail the plugin's own\n // response, so wait briefly for it; an id that never shows up is left alone.\n const openSession = useCallback(\n (target: string) => {\n void waitForSession(target).then((found) => {\n if (!found) return;\n onOpen?.();\n void navigate({ to: '/session/$sessionId', params: { sessionId: target } });\n });\n },\n [navigate, onOpen],\n );\n // A settings page, such as a sign-in a plugin needs; an unknown section id is left alone.\n const openSettings = useCallback(\n (section: string) => {\n if (settingsSection(section) === undefined) return;\n onOpen?.();\n void navigate({ to: '/settings/$section', params: { section } });\n },\n [navigate, onOpen],\n );\n // A plugin page, such as the Calendar; an id no page fill claims is left alone.\n const openPage = useCallback(\n (pageId: string) => {\n if (!slotFills(HOST_SLOTS.page, sessionId).some((fill) => fill.id === pageId)) return;\n onOpen?.();\n void navigate({ to: '/page/$pageId', params: { pageId } });\n },\n [navigate, onOpen, sessionId],\n );\n // Host surfaces also render outside a router, in tests and stories; there no page is shown.\n const router = useRouter({ warn: false }) as ReturnType<typeof useRouter> | null;\n const currentPath = (): string => router?.history.location.pathname ?? '';\n const pathname = useSyncExternalStore(\n (listener) => router?.history.subscribe(listener) ?? NO_SUBSCRIPTION,\n currentPath,\n currentPath,\n );\n const activePageId = /^\\/page\\/([^/]+)/.exec(pathname)?.[1];\n const closePluginTransientTab = useCallback(\n (tabId: string) => {\n if (tabOwnerId !== null) closeTransientTab(tabOwnerId, tabId);\n },\n [tabOwnerId],\n );\n const retargetTab = useCallback<NonNullable<WebPluginSlotProps['setTransientTabSession']>>(\n (tabId, target, retainComposer) => {\n if (tabOwnerId !== null) setTransientTabSession(tabOwnerId, tabId, target, retainComposer);\n },\n [tabOwnerId],\n );\n const appendDraft = useCallback((text: string) => appendComposerDraft(sessionId, text), [sessionId]);\n const attachContext = useCallback(\n (item: Parameters<typeof attachComposerContext>[1]) => attachComposerContext(sessionId, item),\n [sessionId],\n );\n const attachCapture = useCallback(\n (capture: Parameters<typeof attachComposerCapture>[1]) => attachComposerCapture(sessionId, capture),\n [sessionId],\n );\n const capture = useCallback(\n (value: Parameters<typeof submitCapture>[1]) => submitCapture(sessionId, value),\n [sessionId],\n );\n const activeMinorModes = useMemo(\n () =>\n minorModes(statuses, widgets, catalog)\n .filter((mode) => mode.availability === 'on')\n .map((mode) => mode.name),\n [catalog, statuses, widgets],\n );\n\n return useMemo(() => {\n void registryRevision;\n const props = pluginSlotProps(\n sessionId,\n openPluginTab,\n statuses,\n { open: openPluginTransientTab, close: closePluginTransientTab },\n appendDraft,\n attachContext,\n attachCapture,\n contextInventory,\n capture,\n sessionReservationId,\n );\n props.renderThread = (threadId, options) =>\n sessionId === null ? null : (renderers?.thread(sessionId, threadId, options) ?? null);\n props.renderSessionActivity = () =>\n sessionId === null ? null : (renderers?.activity(sessionId, () => openPluginTab(null)) ?? null);\n props.renderSessionTranscript = (targetId, options) => renderers?.transcript(targetId, options) ?? null;\n props.activeMinorModes = activeMinorModes;\n if (sessionContext !== undefined) props.sessionContext = sessionContext;\n props.holdSessionChannels = holdSessionChannels;\n props.holdVoiceSession = holdVoiceSession;\n props.openSession = openSession;\n props.openSettings = openSettings;\n props.openPage = openPage;\n if (activePageId !== undefined) props.activePageId = activePageId;\n props.setTransientTabSession = retargetTab;\n return props;\n }, [\n activeMinorModes,\n appendDraft,\n attachCapture,\n attachContext,\n capture,\n closePluginTransientTab,\n contextInventory,\n openPluginTab,\n openPluginTransientTab,\n openPage,\n openSession,\n openSettings,\n activePageId,\n registryRevision,\n renderers,\n sessionId,\n retargetTab,\n sessionContext,\n sessionReservationId,\n statuses,\n ]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAM,wBAA8B,KAAA;AACpC,SAAS,gBACP,WACA,KACoB;CACpB,QAAA,GAAOA,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAAW,cAAc,OAAO,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UACA;GAAE,MAAM;GAAwB,OAAO;EAAwB,GAC/D,aACA,eACA,eACA,kBACA,SACA,oBACF;EACA,MAAM,gBAAgB,UAAU,YAC9B,cAAc,OAAO,OAAQ,WAAW,OAAO,WAAW,UAAU,OAAO,KAAK;EAClF,MAAM,8BACJ,cAAc,OAAO,OAAQ,WAAW,SAAS,iBAAiB,cAAc,IAAI,CAAC,KAAK;EAC5F,MAAM,2BAA2B,UAAU,YAAY,WAAW,WAAW,UAAU,OAAO,KAAK;EACnG,MAAM,mBAAmB;EACzB,IAAI,mBAAmB,KAAA,GAAW,MAAM,iBAAiB;EACzD,MAAM,sBAAsBC,iCAAAA;EAC5B,MAAM,mBAAmBC,iCAAAA;EACzB,MAAM,cAAc;EACpB,MAAM,eAAe;EACrB,MAAM,WAAW;EACjB,IAAI,iBAAiB,KAAA,GAAW,MAAM,eAAe;EACrD,MAAM,yBAAyB;EAC/B,OAAO;CACT,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;AACH"}
@@ -6,7 +6,7 @@ import { sessionsStore, waitForSession } from "./sessionsStore.mjs";
6
6
  import { sessionStoreFor } from "./sessionStore.mjs";
7
7
  import { submitCapture } from "./captureStore.mjs";
8
8
  import { appendComposerDraft, attachComposerCapture, attachComposerContext } from "./composerStore.mjs";
9
- import { holdSessionChannels } from "./sessionChannelHoldsStore.mjs";
9
+ import { holdSessionChannels, holdVoiceSession } from "./sessionChannelHoldsStore.mjs";
10
10
  import { closeTransientTab, openTransientTab, setTransientTabSession } from "./transientTabsStore.mjs";
11
11
  import { useOpenTab } from "./useOpenTab.mjs";
12
12
  import { DashboardRendererContext } from "../lib/dashboardRenderers.mjs";
@@ -125,6 +125,7 @@ function usePluginSlotProps(sessionId, onOpen, sessionReservationId) {
125
125
  props.activeMinorModes = activeMinorModes;
126
126
  if (sessionContext !== void 0) props.sessionContext = sessionContext;
127
127
  props.holdSessionChannels = holdSessionChannels;
128
+ props.holdVoiceSession = holdVoiceSession;
128
129
  props.openSession = openSession;
129
130
  props.openSettings = openSettings;
130
131
  props.openPage = openPage;
@@ -1 +1 @@
1
- {"version":3,"file":"usePluginSlotProps.mjs","names":[],"sources":["../../../src/web/stores/usePluginSlotProps.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { useNavigate, useRouter } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { useCallback, useContext, useMemo, useSyncExternalStore } from 'react';\n\nimport { minorModes } from '../lib/composition';\nimport { DashboardRendererContext } from '../lib/dashboardRenderers';\nimport { HOST_SLOTS, slotFills } from '../lib/pluginRegistry';\nimport { pluginSessionContext, pluginSlotProps } from '../lib/pluginSlotProps';\nimport { settingsSection } from '../lib/settingsSections';\nimport { submitCapture } from './captureStore';\nimport { appendComposerDraft, attachComposerCapture, attachComposerContext } from './composerStore';\nimport { holdSessionChannels } from './sessionChannelHoldsStore';\nimport { sessionsStore, waitForSession } from './sessionsStore';\nimport { sessionStoreFor } from './sessionStore';\nimport { closeTransientTab, openTransientTab, setTransientTabSession } from './transientTabsStore';\nimport { useOpenTab } from './useOpenTab';\nimport { useWebPluginRegistry } from './useWebPluginRegistry';\n\nconst NO_SUBSCRIPTION = (): void => undefined;\nfunction useSummaryField(\n sessionId: string | null,\n key: 'workspaceId' | 'parentSessionId' | 'sessionProvenance',\n): string | undefined {\n return useStore(sessionsStore, (state) => (sessionId === null ? undefined : state.byId[sessionId]?.summary[key]));\n}\n\n/** The props a plugin component receives for a session, with the host's navigation and facts bound in. */\nexport function usePluginSlotProps(\n sessionId: string | null,\n onOpen?: () => void,\n sessionReservationId?: string,\n): WebPluginSlotProps {\n const tabOwnerId = useStore(sessionsStore, (state) =>\n sessionId === state.activeId ? (state.tabOwnerId ?? sessionId) : sessionId,\n );\n const renderers = useContext(DashboardRendererContext);\n const store = sessionStoreFor(sessionId);\n const statuses = useStore(store, (state) => state.statuses);\n const catalog = useStore(store, (state) => state.minorModes);\n const widgets = useStore(store, (state) => state.widgets);\n const context = useStore(store, (state) => state.context);\n const contextInventory = useMemo(() => context?.groups.flatMap((group) => group.items) ?? [], [context]);\n // Selected field by field so a summary upsert that changes none of them keeps the same object.\n const known = useStore(sessionsStore, (state) => sessionId !== null && state.byId[sessionId] !== undefined);\n const workspaceId = useSummaryField(sessionId, 'workspaceId');\n const parentSessionId = useSummaryField(sessionId, 'parentSessionId');\n const sessionProvenance = useSummaryField(sessionId, 'sessionProvenance');\n const sessionContext = useMemo(\n () => pluginSessionContext(sessionId, known ? { workspaceId, parentSessionId, sessionProvenance } : undefined),\n [known, parentSessionId, sessionId, sessionProvenance, workspaceId],\n );\n const openTab = useOpenTab();\n const registryRevision = useWebPluginRegistry();\n const openPluginTab = useCallback(\n (tabId: string | null) => {\n onOpen?.();\n openTab(tabId);\n },\n [onOpen, openTab],\n );\n const openPluginTransientTab = useCallback(\n (tab: Parameters<typeof openTransientTab>[1]) => {\n if (sessionId === null || tabOwnerId === null) return;\n onOpen?.();\n openTransientTab(\n tabOwnerId,\n tabOwnerId === sessionId ? tab : { ...tab, targetSessionId: tab.targetSessionId ?? sessionId },\n );\n openTab(tab.id);\n },\n [onOpen, openTab, sessionId, tabOwnerId],\n );\n const navigate = useNavigate();\n // Another session the page lists, such as a child a plugin just started. Its upsert can trail the plugin's own\n // response, so wait briefly for it; an id that never shows up is left alone.\n const openSession = useCallback(\n (target: string) => {\n void waitForSession(target).then((found) => {\n if (!found) return;\n onOpen?.();\n void navigate({ to: '/session/$sessionId', params: { sessionId: target } });\n });\n },\n [navigate, onOpen],\n );\n // A settings page, such as a sign-in a plugin needs; an unknown section id is left alone.\n const openSettings = useCallback(\n (section: string) => {\n if (settingsSection(section) === undefined) return;\n onOpen?.();\n void navigate({ to: '/settings/$section', params: { section } });\n },\n [navigate, onOpen],\n );\n // A plugin page, such as the Calendar; an id no page fill claims is left alone.\n const openPage = useCallback(\n (pageId: string) => {\n if (!slotFills(HOST_SLOTS.page, sessionId).some((fill) => fill.id === pageId)) return;\n onOpen?.();\n void navigate({ to: '/page/$pageId', params: { pageId } });\n },\n [navigate, onOpen, sessionId],\n );\n // Host surfaces also render outside a router, in tests and stories; there no page is shown.\n const router = useRouter({ warn: false }) as ReturnType<typeof useRouter> | null;\n const currentPath = (): string => router?.history.location.pathname ?? '';\n const pathname = useSyncExternalStore(\n (listener) => router?.history.subscribe(listener) ?? NO_SUBSCRIPTION,\n currentPath,\n currentPath,\n );\n const activePageId = /^\\/page\\/([^/]+)/.exec(pathname)?.[1];\n const closePluginTransientTab = useCallback(\n (tabId: string) => {\n if (tabOwnerId !== null) closeTransientTab(tabOwnerId, tabId);\n },\n [tabOwnerId],\n );\n const retargetTab = useCallback<NonNullable<WebPluginSlotProps['setTransientTabSession']>>(\n (tabId, target, retainComposer) => {\n if (tabOwnerId !== null) setTransientTabSession(tabOwnerId, tabId, target, retainComposer);\n },\n [tabOwnerId],\n );\n const appendDraft = useCallback((text: string) => appendComposerDraft(sessionId, text), [sessionId]);\n const attachContext = useCallback(\n (item: Parameters<typeof attachComposerContext>[1]) => attachComposerContext(sessionId, item),\n [sessionId],\n );\n const attachCapture = useCallback(\n (capture: Parameters<typeof attachComposerCapture>[1]) => attachComposerCapture(sessionId, capture),\n [sessionId],\n );\n const capture = useCallback(\n (value: Parameters<typeof submitCapture>[1]) => submitCapture(sessionId, value),\n [sessionId],\n );\n const activeMinorModes = useMemo(\n () =>\n minorModes(statuses, widgets, catalog)\n .filter((mode) => mode.availability === 'on')\n .map((mode) => mode.name),\n [catalog, statuses, widgets],\n );\n\n return useMemo(() => {\n void registryRevision;\n const props = pluginSlotProps(\n sessionId,\n openPluginTab,\n statuses,\n { open: openPluginTransientTab, close: closePluginTransientTab },\n appendDraft,\n attachContext,\n attachCapture,\n contextInventory,\n capture,\n sessionReservationId,\n );\n props.renderThread = (threadId, options) =>\n sessionId === null ? null : (renderers?.thread(sessionId, threadId, options) ?? null);\n props.renderSessionActivity = () =>\n sessionId === null ? null : (renderers?.activity(sessionId, () => openPluginTab(null)) ?? null);\n props.renderSessionTranscript = (targetId, options) => renderers?.transcript(targetId, options) ?? null;\n props.activeMinorModes = activeMinorModes;\n if (sessionContext !== undefined) props.sessionContext = sessionContext;\n props.holdSessionChannels = holdSessionChannels;\n props.openSession = openSession;\n props.openSettings = openSettings;\n props.openPage = openPage;\n if (activePageId !== undefined) props.activePageId = activePageId;\n props.setTransientTabSession = retargetTab;\n return props;\n }, [\n activeMinorModes,\n appendDraft,\n attachCapture,\n attachContext,\n capture,\n closePluginTransientTab,\n contextInventory,\n openPluginTab,\n openPluginTransientTab,\n openPage,\n openSession,\n openSettings,\n activePageId,\n registryRevision,\n renderers,\n sessionId,\n retargetTab,\n sessionContext,\n sessionReservationId,\n statuses,\n ]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAM,wBAA8B,KAAA;AACpC,SAAS,gBACP,WACA,KACoB;CACpB,OAAO,SAAS,gBAAgB,UAAW,cAAc,OAAO,KAAA,IAAY,MAAM,KAAK,UAAU,EAAE,QAAQ,IAAK;AAClH;;AAGA,SAAgB,mBACd,WACA,QACA,sBACoB;CACpB,MAAM,aAAa,SAAS,gBAAgB,UAC1C,cAAc,MAAM,WAAY,MAAM,cAAc,YAAa,SACnE;CACA,MAAM,YAAY,WAAW,wBAAwB;CACrD,MAAM,QAAQ,gBAAgB,SAAS;CACvC,MAAM,WAAW,SAAS,QAAQ,UAAU,MAAM,QAAQ;CAC1D,MAAM,UAAU,SAAS,QAAQ,UAAU,MAAM,UAAU;CAC3D,MAAM,UAAU,SAAS,QAAQ,UAAU,MAAM,OAAO;CACxD,MAAM,UAAU,SAAS,QAAQ,UAAU,MAAM,OAAO;CACxD,MAAM,mBAAmB,cAAc,SAAS,OAAO,SAAS,UAAU,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;CAEvG,MAAM,QAAQ,SAAS,gB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,oBACF;EACA,MAAM,gBAAgB,UAAU,YAC9B,cAAc,OAAO,OAAQ,WAAW,OAAO,WAAW,UAAU,OAAO,KAAK;EAClF,MAAM,8BACJ,cAAc,OAAO,OAAQ,WAAW,SAAS,iBAAiB,cAAc,IAAI,CAAC,KAAK;EAC5F,MAAM,2BAA2B,UAAU,YAAY,WAAW,WAAW,UAAU,OAAO,KAAK;EACnG,MAAM,mBAAmB;EACzB,IAAI,mBAAmB,KAAA,GAAW,MAAM,iBAAiB;EACzD,MAAM,sBAAsB;EAC5B,MAAM,cAAc;EACpB,MAAM,eAAe;EACrB,MAAM,WAAW;EACjB,IAAI,iBAAiB,KAAA,GAAW,MAAM,eAAe;EACrD,MAAM,yBAAyB;EAC/B,OAAO;CACT,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"usePluginSlotProps.mjs","names":[],"sources":["../../../src/web/stores/usePluginSlotProps.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { useNavigate, useRouter } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { useCallback, useContext, useMemo, useSyncExternalStore } from 'react';\n\nimport { minorModes } from '../lib/composition';\nimport { DashboardRendererContext } from '../lib/dashboardRenderers';\nimport { HOST_SLOTS, slotFills } from '../lib/pluginRegistry';\nimport { pluginSessionContext, pluginSlotProps } from '../lib/pluginSlotProps';\nimport { settingsSection } from '../lib/settingsSections';\nimport { submitCapture } from './captureStore';\nimport { appendComposerDraft, attachComposerCapture, attachComposerContext } from './composerStore';\nimport { holdSessionChannels, holdVoiceSession } from './sessionChannelHoldsStore';\nimport { sessionsStore, waitForSession } from './sessionsStore';\nimport { sessionStoreFor } from './sessionStore';\nimport { closeTransientTab, openTransientTab, setTransientTabSession } from './transientTabsStore';\nimport { useOpenTab } from './useOpenTab';\nimport { useWebPluginRegistry } from './useWebPluginRegistry';\n\nconst NO_SUBSCRIPTION = (): void => undefined;\nfunction useSummaryField(\n sessionId: string | null,\n key: 'workspaceId' | 'parentSessionId' | 'sessionProvenance',\n): string | undefined {\n return useStore(sessionsStore, (state) => (sessionId === null ? undefined : state.byId[sessionId]?.summary[key]));\n}\n\n/** The props a plugin component receives for a session, with the host's navigation and facts bound in. */\nexport function usePluginSlotProps(\n sessionId: string | null,\n onOpen?: () => void,\n sessionReservationId?: string,\n): WebPluginSlotProps {\n const tabOwnerId = useStore(sessionsStore, (state) =>\n sessionId === state.activeId ? (state.tabOwnerId ?? sessionId) : sessionId,\n );\n const renderers = useContext(DashboardRendererContext);\n const store = sessionStoreFor(sessionId);\n const statuses = useStore(store, (state) => state.statuses);\n const catalog = useStore(store, (state) => state.minorModes);\n const widgets = useStore(store, (state) => state.widgets);\n const context = useStore(store, (state) => state.context);\n const contextInventory = useMemo(() => context?.groups.flatMap((group) => group.items) ?? [], [context]);\n // Selected field by field so a summary upsert that changes none of them keeps the same object.\n const known = useStore(sessionsStore, (state) => sessionId !== null && state.byId[sessionId] !== undefined);\n const workspaceId = useSummaryField(sessionId, 'workspaceId');\n const parentSessionId = useSummaryField(sessionId, 'parentSessionId');\n const sessionProvenance = useSummaryField(sessionId, 'sessionProvenance');\n const sessionContext = useMemo(\n () => pluginSessionContext(sessionId, known ? { workspaceId, parentSessionId, sessionProvenance } : undefined),\n [known, parentSessionId, sessionId, sessionProvenance, workspaceId],\n );\n const openTab = useOpenTab();\n const registryRevision = useWebPluginRegistry();\n const openPluginTab = useCallback(\n (tabId: string | null) => {\n onOpen?.();\n openTab(tabId);\n },\n [onOpen, openTab],\n );\n const openPluginTransientTab = useCallback(\n (tab: Parameters<typeof openTransientTab>[1]) => {\n if (sessionId === null || tabOwnerId === null) return;\n onOpen?.();\n openTransientTab(\n tabOwnerId,\n tabOwnerId === sessionId ? tab : { ...tab, targetSessionId: tab.targetSessionId ?? sessionId },\n );\n openTab(tab.id);\n },\n [onOpen, openTab, sessionId, tabOwnerId],\n );\n const navigate = useNavigate();\n // Another session the page lists, such as a child a plugin just started. Its upsert can trail the plugin's own\n // response, so wait briefly for it; an id that never shows up is left alone.\n const openSession = useCallback(\n (target: string) => {\n void waitForSession(target).then((found) => {\n if (!found) return;\n onOpen?.();\n void navigate({ to: '/session/$sessionId', params: { sessionId: target } });\n });\n },\n [navigate, onOpen],\n );\n // A settings page, such as a sign-in a plugin needs; an unknown section id is left alone.\n const openSettings = useCallback(\n (section: string) => {\n if (settingsSection(section) === undefined) return;\n onOpen?.();\n void navigate({ to: '/settings/$section', params: { section } });\n },\n [navigate, onOpen],\n );\n // A plugin page, such as the Calendar; an id no page fill claims is left alone.\n const openPage = useCallback(\n (pageId: string) => {\n if (!slotFills(HOST_SLOTS.page, sessionId).some((fill) => fill.id === pageId)) return;\n onOpen?.();\n void navigate({ to: '/page/$pageId', params: { pageId } });\n },\n [navigate, onOpen, sessionId],\n );\n // Host surfaces also render outside a router, in tests and stories; there no page is shown.\n const router = useRouter({ warn: false }) as ReturnType<typeof useRouter> | null;\n const currentPath = (): string => router?.history.location.pathname ?? '';\n const pathname = useSyncExternalStore(\n (listener) => router?.history.subscribe(listener) ?? NO_SUBSCRIPTION,\n currentPath,\n currentPath,\n );\n const activePageId = /^\\/page\\/([^/]+)/.exec(pathname)?.[1];\n const closePluginTransientTab = useCallback(\n (tabId: string) => {\n if (tabOwnerId !== null) closeTransientTab(tabOwnerId, tabId);\n },\n [tabOwnerId],\n );\n const retargetTab = useCallback<NonNullable<WebPluginSlotProps['setTransientTabSession']>>(\n (tabId, target, retainComposer) => {\n if (tabOwnerId !== null) setTransientTabSession(tabOwnerId, tabId, target, retainComposer);\n },\n [tabOwnerId],\n );\n const appendDraft = useCallback((text: string) => appendComposerDraft(sessionId, text), [sessionId]);\n const attachContext = useCallback(\n (item: Parameters<typeof attachComposerContext>[1]) => attachComposerContext(sessionId, item),\n [sessionId],\n );\n const attachCapture = useCallback(\n (capture: Parameters<typeof attachComposerCapture>[1]) => attachComposerCapture(sessionId, capture),\n [sessionId],\n );\n const capture = useCallback(\n (value: Parameters<typeof submitCapture>[1]) => submitCapture(sessionId, value),\n [sessionId],\n );\n const activeMinorModes = useMemo(\n () =>\n minorModes(statuses, widgets, catalog)\n .filter((mode) => mode.availability === 'on')\n .map((mode) => mode.name),\n [catalog, statuses, widgets],\n );\n\n return useMemo(() => {\n void registryRevision;\n const props = pluginSlotProps(\n sessionId,\n openPluginTab,\n statuses,\n { open: openPluginTransientTab, close: closePluginTransientTab },\n appendDraft,\n attachContext,\n attachCapture,\n contextInventory,\n capture,\n sessionReservationId,\n );\n props.renderThread = (threadId, options) =>\n sessionId === null ? null : (renderers?.thread(sessionId, threadId, options) ?? null);\n props.renderSessionActivity = () =>\n sessionId === null ? null : (renderers?.activity(sessionId, () => openPluginTab(null)) ?? null);\n props.renderSessionTranscript = (targetId, options) => renderers?.transcript(targetId, options) ?? null;\n props.activeMinorModes = activeMinorModes;\n if (sessionContext !== undefined) props.sessionContext = sessionContext;\n props.holdSessionChannels = holdSessionChannels;\n props.holdVoiceSession = holdVoiceSession;\n props.openSession = openSession;\n props.openSettings = openSettings;\n props.openPage = openPage;\n if (activePageId !== undefined) props.activePageId = activePageId;\n props.setTransientTabSession = retargetTab;\n return props;\n }, [\n activeMinorModes,\n appendDraft,\n attachCapture,\n attachContext,\n capture,\n closePluginTransientTab,\n contextInventory,\n openPluginTab,\n openPluginTransientTab,\n openPage,\n openSession,\n openSettings,\n activePageId,\n registryRevision,\n renderers,\n sessionId,\n retargetTab,\n sessionContext,\n sessionReservationId,\n statuses,\n ]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAM,wBAA8B,KAAA;AACpC,SAAS,gBACP,WACA,KACoB;CACpB,OAAO,SAAS,gBAAgB,UAAW,cAAc,OAAO,KAAA,IAAY,MAAM,KAAK,UAAU,EAAE,QAAQ,IAAK;AAClH;;AAGA,SAAgB,mBACd,W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,sBAAsB,WAAW,IAAI,GAC5F,CAAC,SAAS,CACZ;CACA,MAAM,gBAAgB,aACnB,YAAyD,sBAAsB,WAAW,OAAO,GAClG,CAAC,SAAS,CACZ;CACA,MAAM,UAAU,aACb,UAA+C,cAAc,WAAW,KAAK,GAC9E,CAAC,SAAS,CACZ;CACA,MAAM,mBAAmB,cAErB,WAAW,UAAU,SAAS,OAAO,CAAC,CACnC,QAAQ,SAAS,KAAK,iBAAiB,IAAI,CAAC,CAC5C,KAAK,SAAS,KAAK,IAAI,GAC5B;EAAC;EAAS;EAAU;CAAO,CAC7B;CAEA,OAAO,cAAc;EAEnB,MAAM,QAAQ,gBACZ,WACA,eACA,UACA;GAAE,MAAM;GAAwB,OAAO;EAAwB,GAC/D,aACA,eACA,eACA,kBACA,SACA,oBACF;EACA,MAAM,gBAAgB,UAAU,YAC9B,cAAc,OAAO,OAAQ,WAAW,OAAO,WAAW,UAAU,OAAO,KAAK;EAClF,MAAM,8BACJ,cAAc,OAAO,OAAQ,WAAW,SAAS,iBAAiB,cAAc,IAAI,CAAC,KAAK;EAC5F,MAAM,2BAA2B,UAAU,YAAY,WAAW,WAAW,UAAU,OAAO,KAAK;EACnG,MAAM,mBAAmB;EACzB,IAAI,mBAAmB,KAAA,GAAW,MAAM,iBAAiB;EACzD,MAAM,sBAAsB;EAC5B,MAAM,mBAAmB;EACzB,MAAM,cAAc;EACpB,MAAM,eAAe;EACrB,MAAM,WAAW;EACjB,IAAI,iBAAiB,KAAA,GAAW,MAAM,eAAe;EACrD,MAAM,yBAAyB;EAC/B,OAAO;CACT,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-web-dashboard",
3
- "version": "0.0.0-alpha.49",
3
+ "version": "0.0.0-alpha.50",
4
4
  "description": "Shared browser state, actions and optional views for Po dashboard templates.",
5
5
  "keywords": [
6
6
  "ai",
@@ -61,9 +61,9 @@
61
61
  "access": "public"
62
62
  },
63
63
  "dependencies": {
64
- "@agimon-ai/po-core": "0.0.0-alpha.49",
65
- "@agimon-ai/po-web-components": "0.0.0-alpha.49",
66
- "@agimon-ai/po-web-security": "0.0.0-alpha.49",
64
+ "@agimon-ai/po-core": "0.0.0-alpha.50",
65
+ "@agimon-ai/po-web-components": "0.0.0-alpha.50",
66
+ "@agimon-ai/po-web-security": "0.0.0-alpha.50",
67
67
  "@earendil-works/chord": "1.4.0",
68
68
  "@simplewebauthn/browser": "^14.0.0",
69
69
  "@tanstack/react-router": "1.170.45",
@@ -73,7 +73,7 @@
73
73
  "qrcode-generator": "^2.0.4"
74
74
  },
75
75
  "devDependencies": {
76
- "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.49",
76
+ "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.50",
77
77
  "@types/node": "26.6.5",
78
78
  "@types/react": "19.3.0",
79
79
  "@types/react-dom": "19.3.0",