@agimon-ai/po-web-dashboard 0.0.0-alpha.30 → 0.0.0-alpha.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/index.cjs +1 -0
  2. package/dist/index.d.mts +2 -2
  3. package/dist/index.mjs +2 -2
  4. package/dist/web/features/activity/ActivityDock.cjs +6 -1
  5. package/dist/web/features/activity/ActivityDock.cjs.map +1 -1
  6. package/dist/web/features/activity/ActivityDock.d.mts +3 -1
  7. package/dist/web/features/activity/ActivityDock.d.mts.map +1 -1
  8. package/dist/web/features/activity/ActivityDock.mjs +6 -1
  9. package/dist/web/features/activity/ActivityDock.mjs.map +1 -1
  10. package/dist/web/lib/composition.cjs +1 -2
  11. package/dist/web/lib/composition.cjs.map +1 -1
  12. package/dist/web/lib/composition.d.mts.map +1 -1
  13. package/dist/web/lib/composition.mjs +1 -2
  14. package/dist/web/lib/composition.mjs.map +1 -1
  15. package/dist/web/lib/hubApi.cjs +4 -4
  16. package/dist/web/lib/hubApi.cjs.map +1 -1
  17. package/dist/web/lib/hubApi.d.mts +2 -2
  18. package/dist/web/lib/hubApi.d.mts.map +1 -1
  19. package/dist/web/lib/hubApi.mjs +4 -4
  20. package/dist/web/lib/hubApi.mjs.map +1 -1
  21. package/dist/web/lib/piTransport.cjs +3 -0
  22. package/dist/web/lib/piTransport.cjs.map +1 -1
  23. package/dist/web/lib/piTransport.d.mts.map +1 -1
  24. package/dist/web/lib/piTransport.mjs +3 -0
  25. package/dist/web/lib/piTransport.mjs.map +1 -1
  26. package/dist/web/lib/protocolHubSocket.cjs +20 -3
  27. package/dist/web/lib/protocolHubSocket.cjs.map +1 -1
  28. package/dist/web/lib/protocolHubSocket.d.mts.map +1 -1
  29. package/dist/web/lib/protocolHubSocket.mjs +20 -3
  30. package/dist/web/lib/protocolHubSocket.mjs.map +1 -1
  31. package/dist/web/lib/sealedSession.cjs +32 -4
  32. package/dist/web/lib/sealedSession.cjs.map +1 -1
  33. package/dist/web/lib/sealedSession.d.mts +9 -1
  34. package/dist/web/lib/sealedSession.d.mts.map +1 -1
  35. package/dist/web/lib/sealedSession.mjs +32 -5
  36. package/dist/web/lib/sealedSession.mjs.map +1 -1
  37. package/package.json +5 -5
package/dist/index.cjs CHANGED
@@ -304,6 +304,7 @@ exports.notifyHubConnected = require_transport.notifyHubConnected;
304
304
  exports.onCaptureStatus = require_captureStore.onCaptureStatus;
305
305
  exports.onComposerSubmitted = require_composerSubmissions.onComposerSubmitted;
306
306
  exports.onHubConnected = require_transport.onHubConnected;
307
+ exports.onSealedSignInRequired = require_sealedSession.onSealedSignInRequired;
307
308
  exports.openNewSession = require_newSessionStore.openNewSession;
308
309
  exports.openPalette = require_paletteStore.openPalette;
309
310
  exports.openRemoteDialog = require_remoteAccessStore.openRemoteDialog;
package/dist/index.d.mts CHANGED
@@ -45,7 +45,7 @@ import { focusPrompt, registerPromptInput } from "./web/lib/promptFocus.mjs";
45
45
  import { toQueuedEntries, toTimelineEntries } from "./web/lib/protocolTimeline.mjs";
46
46
  import { qrMatrix } from "./web/lib/qrMatrix.mjs";
47
47
  import { PairingResult, StateResult, approvePairing, denyPairing, disableRemoteAccess, enableRemoteAccess, fetchRemoteState, mintPairingCode, revokeDevice, revokeTrustedDevice, saveRemoteSettings } from "./web/lib/remoteApi.mjs";
48
- import { rememberHostChannelKey, rememberedHostChannelKey, resetSealedSessions, restoreSealedSession, sealedHttpSession, sealedProtocolSession, sealedSession } from "./web/lib/sealedSession.mjs";
48
+ import { onSealedSignInRequired, rememberHostChannelKey, rememberedHostChannelKey, resetSealedSessions, restoreSealedSession, sealedHttpSession, sealedProtocolSession, sealedSession } from "./web/lib/sealedSession.mjs";
49
49
  import { bindSessionActivityRenderer, releaseSessionActivityRenderer, renderSessionActivity } from "./web/lib/sessionActivityRenderer.mjs";
50
50
  import { SessionAsset, StoredSessionAttachment, loadSessionAsset, uploadSessionAttachment } from "./web/lib/sessionAsset.mjs";
51
51
  import { loadSessionAvatar } from "./web/lib/sessionAvatar.mjs";
@@ -80,4 +80,4 @@ import { WorkspaceAdmissionDraft, admitDashboardWorkspace, resetWorkspaceAdmissi
80
80
  import { EMPTY_SETTINGS_DRAFT, SettingsDraftState, SettingsDraftTarget, discardSettingsDraft, loadSettingsDraft, saveSettingsDraft, setSettingsDraft, settingsDraftKey, settingsDraftStore } from "./web/stores/settingsDraftStore.mjs";
81
81
  import { dashboardStateFor, useDashboardState } from "./web/stores/dashboardStateStore.mjs";
82
82
  import { DashboardRendererProvider, DashboardRenderers } from "./web/lib/dashboardRenderers.mjs";
83
- export { ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, BrowserNotificationDeliveryStatus, BrowserNotificationPermissionStatus, BrowserPerformanceEvent, BrowserPerformanceEventName, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerAttachment, ComposerContextAttachment, ComposerFileAttachment, ComposerImageAttachment, ComposerSessionState, ComposerTextAttachment, ContextGroup, ContextGroupKind, ContextItem, ContextItemSource, ContextOwner, CreateSessionResult, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, type DashboardRenderers, DashboardRoute, DevProxyState, DialogDraft, DialogMethod, DialogRequest, DockAutoSelectKeys, 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, StatusLineInput, StopSessionResult, StoredSessionAttachment, TRIGGER_CHARS, TargetResult, TargetsResult, TemplateConfiguration, ThemeState, ThreadTranscriptReader, TimelineEntry, TimelineUnit, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolPromptState, TransientTabActions, UPDATE_REQUIRED_REASON, UiState, UserEntry, UserImage, WebPluginCompositionPhase, WebPluginCompositionState, WebPluginMountState, WebTemplateCatalog, WebTemplateDecision, WebTemplateDiagnostic, WorkspaceAdmissionDraft, WorkspaceResult, WorkspacesResult, WorkspacesState, WriteConfigResult, abbreviateCwd, abortCommand, abortRun, acquireModelContext, 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, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, autoSelectedDockFace, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, 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, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileTabForPath, findTransientTab, flushBrowserTelemetry, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, formatRunDuration, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, 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, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, 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, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, 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, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setWebPluginLoadDiagnostics, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, transientTabsOf, transientTabsStore, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
83
+ export { ActivityGroup, AgentInfo, AssistantEntry, AttachPhase, BUILTIN_COMMANDS, BrowserNotificationDeliveryStatus, BrowserNotificationPermissionStatus, BrowserPerformanceEvent, BrowserPerformanceEventName, CommandInfo, CompletionItem, CompletionKind, CompletionTrigger, ComposerAttachment, ComposerContextAttachment, ComposerFileAttachment, ComposerImageAttachment, ComposerSessionState, ComposerTextAttachment, ContextGroup, ContextGroupKind, ContextItem, ContextItemSource, ContextOwner, CreateSessionResult, DEFAULT_REPOSITORY_SETTINGS_SECTION, DEFAULT_SETTINGS_SECTION, DashboardRendererProvider, type DashboardRenderers, DashboardRoute, DevProxyState, DialogDraft, DialogMethod, DialogRequest, DockAutoSelectKeys, 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, StatusLineInput, StopSessionResult, StoredSessionAttachment, TRIGGER_CHARS, TargetResult, TargetsResult, TemplateConfiguration, ThemeState, ThreadTranscriptReader, TimelineEntry, TimelineUnit, ToolEntry, ToolPromptClaim, ToolPromptInput, ToolPromptState, TransientTabActions, UPDATE_REQUIRED_REASON, UiState, UserEntry, UserImage, WebPluginCompositionPhase, WebPluginCompositionState, WebPluginMountState, WebTemplateCatalog, WebTemplateDecision, WebTemplateDiagnostic, WorkspaceAdmissionDraft, WorkspaceResult, WorkspacesResult, WorkspacesState, WriteConfigResult, abbreviateCwd, abortCommand, abortRun, acquireModelContext, 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, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, autoSelectedDockFace, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, 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, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileTabForPath, findTransientTab, flushBrowserTelemetry, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, formatRunDuration, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, 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, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, 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, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, 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, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setWebPluginLoadDiagnostics, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, transientTabsOf, transientTabsStore, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { rememberHostChannelKey, rememberedHostChannelKey, resetSealedSessions, restoreSealedSession, sealedHttpSession, sealedProtocolSession, sealedSession } from "./web/lib/sealedSession.mjs";
1
+ import { onSealedSignInRequired, rememberHostChannelKey, rememberedHostChannelKey, resetSealedSessions, restoreSealedSession, sealedHttpSession, sealedProtocolSession, sealedSession } from "./web/lib/sealedSession.mjs";
2
2
  import { STEP_UP_HEADER_NAME, assertionFor, passkeysAvailable, registerPasskey, signInWithPasskey } from "./web/lib/webauthnClient.mjs";
3
3
  import { fetchWithStepUp } from "./web/lib/stepUp.mjs";
4
4
  import { answerLogin, cancelLogin, listProviders, logoutProvider, readLogin, startLogin } from "./web/lib/authApi.mjs";
@@ -80,4 +80,4 @@ import { admitDashboardWorkspace, resetWorkspaceAdmission, updateWorkspaceAdmiss
80
80
  import { dialogDraftStore, updateDialogDraft, useDialogDraft } from "./web/stores/dialogDraftStore.mjs";
81
81
  import { EMPTY_SETTINGS_DRAFT, discardSettingsDraft, loadSettingsDraft, saveSettingsDraft, setSettingsDraft, settingsDraftKey, settingsDraftStore } from "./web/stores/settingsDraftStore.mjs";
82
82
  import { dashboardStateFor, useDashboardState } from "./web/stores/dashboardStateStore.mjs";
83
- 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, 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, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, autoSelectedDockFace, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, 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, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileTabForPath, findTransientTab, flushBrowserTelemetry, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, formatRunDuration, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, 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, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, 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, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, 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, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setWebPluginLoadDiagnostics, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, transientTabsOf, transientTabsStore, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
83
+ 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, 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, assertionFor, attachComposerCapture, attachComposerContext, attachmentPrompt, autoSelectedDockFace, availableThemes, beginSessionReplay, beginSessionTransfer, bindBundledNativeTemplates, bindBundledWebTemplates, bindDashboardTranscriptWatcher, bindFileLinkModes, bindHistoryReader, 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, createDevProxyTarget, createPagedTranscript, createPlainSession, createProtocolHubSocket, createProtocolLink, createSession, createSessionMcpClient, createToolCompletionTabs, createWorkspaceSession, dashboardRouteFrom, dashboardStateFor, deleteDevProxyTarget, deleteQueuedMessage, deleteSessionGroup, deliverBrowserNotification, denyDevice, denyPairing, devProxyStore, dialogCancelled, dialogConfirmed, dialogDraftStore, dialogValue, disableLivePush, disableRemoteAccess, discardSettingsDraft, disconnectCaptures, dispatchChannelFrame, dispatchHeldSessionChannel, disposeModelContextAdapter, dropComposerState, dropPluginSessionData, dropSessionStore, dropThreads, dropTransientTabs, emptySelection, enableLivePush, enableRemoteAccess, endSessionReplay, enqueueAutomaticCommand, ensureTemplateConfiguration, fetchContextItemDetail, fetchDevProxyTargets, fetchRemoteState, fetchWithStepUp, fileCompletions, fileLinkFor, fileTabForPath, findTransientTab, flushBrowserTelemetry, focusPrompt, focusWorkspaceWebPlugins, followUpCommand, formatRunDuration, getAvailableModelsCommand, getAvailableThinkingLevelsCommand, getCommandsCommand, getSessionStatsCommand, getStateCommand, 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, logoutProvider, markSocketClosed, markToolPromptFailed, markUpdateRequired, mediaKindFor, menuStore, mergeScopedPlugins, minorModes, mintPairingCode, nativeTemplateCatalog, newPairingCode, newSessionDraftStore, newSessionStore, noSessions, notifyHubConnected, onCaptureStatus, onComposerSubmitted, onHubConnected, onSealedSignInRequired, openNewSession, openPalette, openRemoteDialog, openResumeDialog, openTransientTab, ownerLabel, ownersOf, paletteCommands, paletteStore, parseFileMentions, 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, queueFollowUp, queueFollowUpWithAck, railDialogStore, railRestartStore, readDormantTranscriptPage, readImageSettings, readLogin, readRepositorySettings, readSessionMcpActivity, readSessionMcpConfig, readSettingsConfig, recordBrowserError, recordBrowserPerformance, reduceSession, refreshDevProxyTargets, refreshPasskeys, refreshRemoteState, refreshSessionFacts, refreshSessionSelection, refreshSessionStats, refreshTemplateConfiguration, refreshWebPluginCompositions, registerPasskey, registerPromptInput, releaseDialogMenu, releaseProtocolTranscript, releaseSessionActivityRenderer, releaseSessionTranscriptRenderer, releaseThreadRenderer, releaseTransport, reloadWebTemplateDecision, rememberHostChannelKey, rememberedHostChannelKey, remoteAccessStore, removeDevProxyTarget, 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, reviveSession, revokeDevice, revokePairedDevice, revokeSessionMcpClient, revokeTrustedDevice, revokeTrustedNativeDevice, rewindCommand, rewindToMessage, runCommand, runningCount, saveComposerDrafts, saveRemoteSettings, saveSettingsDraft, saveTemplateDefault, sealedHttpSession, sealedProtocolSession, sealedSession, searchDirectories, searchSessionFiles, seedHistoryCursor, selectFastMode, selectModel, selectTheme, selectThinkingLevel, selectWorkspace, selectionAxes, selectionStatuses, sendFrame, sendFrameWithAck, sendHubFrame, sendSessionProtocolFrame, sessionMinorModes, sessionStatusLine, sessionStoreFor, sessionToolRenderer, sessionWebPluginsInstalled, sessionsStore, setActiveSession, setAgentLock, setDockOpen, setDockTab, setHasNewerHistory, setModelCommand, setNewSessionName, setPalettePath, setPendingMenu, setSessionGroups, setSessionNameCommand, setSessionStreamed, setSettingsDraft, setThinkingLevelCommand, setTransientTabSession, setWebPluginLoadDiagnostics, settingsDraftKey, settingsDraftStore, settingsKeyOf, settingsLockedReason, settingsSection, settingsSections, showRemoteOptions, signInWithPasskey, slotFills, startLogin, startPluginDefinitions, startWebPlugins, steerCommand, stopSession, streamedSessions, stripAnsi, submitCapture, submitComposerDraft, submitMessage, submitMessageWithAck, subscribeActivitySources, subscribeThread, subscribeWebPluginRegistry, summariseArgs, tabComposerContext, templateStore, textFromContent, themeStore, threadStoreKey, timelineUnits, toQueuedEntries, toTimelineEntries, togglePalette, toolMessageProps, toolPromptClaim, toolPromptStore, totalTokens, transientTabsOf, transientTabsStore, triggerTokenAt, turnRemoteAccessOff, turnRemoteAccessOn, uiStore, unsubscribeThread, updateComposerState, updateDialogDraft, updateRemoteSettings, updateResumeDraft, updateWorkspaceAdmission, uploadSessionAttachment, useActiveSession, useActiveSessionMeta, useActivityGroups, useComposerState, useDashboardRoute, useDashboardState, useDialogDraft, useDockFaces, useFileLinks, useHasOlderHistory, useNoSessions, useOpenTab, usePluginSlotProps, useSessionMcp, useTemplateConfiguration, useToolPrompt, useTransientTabs, useWebPluginRegistry, validateComposerCapture, waitForSession, watchDashboardTranscript, watchHubThread, webPluginCompositionStore, webPluginDiagnostics, webPluginMountState, webPluginRegistryRevision, webPluginsInstalled, webTabs, webTemplateCatalog, workspaceAdmissionStore, workspaceName, workspaceSlotFills, workspacesStore, writeImageSettings, writeRepositorySelection, writeSettingsValue };
@@ -32,7 +32,7 @@ let automaticFaceKeys = {
32
32
  * plugin registers under that name render there, in slot order, and a group
33
33
  * nobody fills shows the one-line summary the session's footer publishes.
34
34
  */
35
- function ActivityDock({ onClose, onOpenContent, mcp, tabId }) {
35
+ function ActivityDock({ onClose, onOpenContent, mcp, tabId, scope }) {
36
36
  const activeId = (0, _tanstack_react_store.useStore)(require_sessionsStore.sessionsStore, (state) => state.activeId);
37
37
  const connection = (0, _tanstack_react_store.useStore)(require_sessionsStore.sessionsStore, (state) => state.activeId === null ? void 0 : state.byId[state.activeId]);
38
38
  const updateRequired = (0, _tanstack_react_store.useStore)(require_sessionsStore.sessionsStore, (state) => state.updateRequired);
@@ -107,6 +107,11 @@ function ActivityDock({ onClose, onOpenContent, mcp, tabId }) {
107
107
  "data-testid": "activity-scroll",
108
108
  className: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4",
109
109
  children: [
110
+ scope === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
111
+ "data-testid": "activity-scope",
112
+ className: "px-1 text-sm text-po-dim",
113
+ children: scope
114
+ }),
110
115
  connection?.attach === "offline" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("output", {
111
116
  "data-testid": "activity-offline",
112
117
  className: updateRequired ? "block px-1 text-sm text-po-magenta" : "block px-1 text-sm text-po-dim",
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityDock.cjs","names":["useStore","sessionsStore","useActiveSession","usePluginSlotProps","uiStore","useDockFaces","autoSelectedDockFace","webPluginCompositionStore","webPluginMountState","useActivityGroups","DockTabs","Button","CloseIcon","SessionMcpTools","ContextPanel","retryWebPluginCompositions","PluginSurface","HOST_SLOTS","LightbulbIcon","LoaderIcon","SparklesIcon","ActivityIcon","Kbd","ChevronRightIcon","slotFills","activityGroupSlot"],"sources":["../../../../src/web/features/activity/ActivityDock.tsx"],"sourcesContent":["import {\n ActivityIcon,\n Button,\n ChevronRightIcon,\n CloseIcon,\n Kbd,\n LightbulbIcon,\n LoaderIcon,\n SparklesIcon,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect } from 'react';\n\nimport { PluginSurface } from '../../components/PluginSurface';\nimport { SessionMcpTools } from '../../components/SessionMcp';\nimport {\n type ActivityGroup,\n autoSelectedDockFace,\n type DockAutoSelectKeys,\n useActivityGroups,\n useDockFaces,\n} from '../../lib/composition';\nimport {\n retryWebPluginCompositions,\n webPluginCompositionStore,\n webPluginMountState,\n} from '../../lib/pluginCompositions';\nimport { activityGroupSlot, HOST_SLOTS, slotFills } from '../../lib/pluginRegistry';\nimport type { SessionMcpViewState } from '../../lib/useSessionMcp';\nimport { sessionsStore } from '../../stores/sessionsStore';\nimport { useActiveSession } from '../../stores/sessionStore';\nimport { setDockTab, uiStore } from '../../stores/uiStore';\nimport { usePluginSlotProps } from '../../stores/usePluginSlotProps';\nimport { ContextPanel } from './ContextPanel';\nimport { DockTabs } from './DockTabs';\n\n/** Outlives the dock: hiding and reopening it must not count as entering the tab again. */\nlet automaticFaceKeys: DockAutoSelectKeys = { sessions: [], tab: '' };\n/**\n * The column for everything that is not the transcript.\n *\n * `activity` is asynchronous work that outlives the turn that started it.\n * `context` is the composition that work runs under, and what carrying it costs.\n * `mcp` lists capabilities granted to this session's remote connections.\n *\n * On the activity face the host owns only the frame: which groups exist, their\n * key chips, and what they render come from the packages that declare them.\n * Each declared group opens the keyed slot activity.<name>; the sections any\n * plugin registers under that name render there, in slot order, and a group\n * nobody fills shows the one-line summary the session's footer publishes.\n */\nexport function ActivityDock({\n onClose,\n onOpenContent,\n mcp,\n tabId,\n}: {\n onClose: () => void;\n onOpenContent: () => void;\n mcp?: SessionMcpViewState;\n tabId?: string;\n}) {\n const activeId = useStore(sessionsStore, (state) => state.activeId);\n const connection = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId],\n );\n const updateRequired = useStore(sessionsStore, (state) => state.updateRequired);\n const statuses = useActiveSession((state) => state.statuses);\n const widgets = useActiveSession((state) => state.widgets);\n const slotProps = usePluginSlotProps(activeId, onOpenContent);\n const tab = useStore(uiStore, (state) => state.dockTab);\n const dockFaces = useDockFaces(activeId).filter(\n (face) => face.requiredMinorMode === undefined || slotProps.activeMinorModes?.includes(face.requiredMinorMode),\n );\n const selectedFace = dockFaces.find((face) => face.id === tab);\n const mcpEnabled = mcp?.snapshot?.enabled === true;\n const resolvedTab =\n tab === 'context' || tab === 'activity' || (tab === 'mcp' && mcpEnabled) || selectedFace !== undefined\n ? tab\n : 'activity';\n const DockPanel = selectedFace?.panel;\n const automaticSelection = autoSelectedDockFace(\n dockFaces,\n { sessionId: activeId, tabId: tabId ?? null },\n automaticFaceKeys,\n );\n const automaticFace = automaticSelection.face;\n const automaticSessionKeys = automaticSelection.keys.sessions;\n const automaticTabKey = automaticSelection.keys.tab;\n const workspaceId = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId]?.summary.workspaceId,\n );\n const compositionSnapshot = useStore(webPluginCompositionStore);\n const compositionState = webPluginMountState(\n activeId === null ? { scope: 'global' } : { scope: 'session', sessionId: activeId, workspaceId: workspaceId ?? '' },\n compositionSnapshot,\n );\n const groups = useActivityGroups(statuses, widgets, activeId);\n const ordinaryGroups = groups.filter((group) => group.placement !== 'bottom');\n const pinnedGroups = groups.filter((group) => group.placement === 'bottom');\n const busy = groups.filter((group) => group.active).length;\n\n useEffect(() => {\n automaticFaceKeys = { sessions: automaticSessionKeys, tab: automaticTabKey };\n if (automaticFace !== undefined) setDockTab(automaticFace.id);\n }, [automaticFace, automaticSessionKeys, automaticTabKey]);\n useEffect(() => {\n if (resolvedTab !== tab) setDockTab(resolvedTab);\n }, [resolvedTab, tab]);\n return (\n <aside\n data-testid=\"activity-dock\"\n className=\"flex w-[min(360px,calc(100vw-48px))] shrink-0 flex-col overflow-hidden border-l border-po-border-soft bg-po-rail sm:w-[360px]\"\n >\n <div className=\"flex h-16 shrink-0 items-end gap-6 border-b border-po-border-soft px-5\">\n <DockTabs contributed={dockFaces} mcpEnabled={mcpEnabled} />\n <span className=\"flex-1\" />\n <Button\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"activity-close\"\n aria-label=\"Hide activity\"\n title=\"Hide activity\"\n onClick={onClose}\n className=\"mb-4 text-po-dim\"\n >\n <CloseIcon aria-hidden className=\"size-3.5\" />\n </Button>\n </div>\n\n {resolvedTab === 'mcp' && mcp !== undefined ? (\n <SessionMcpTools key={activeId} state={mcp} />\n ) : DockPanel !== undefined ? (\n <DockPanel {...slotProps} />\n ) : resolvedTab === 'context' ? (\n <ContextPanel />\n ) : (\n <>\n <div data-testid=\"activity-scroll\" className=\"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4\">\n {connection?.attach === 'offline' ? (\n <output\n data-testid=\"activity-offline\"\n className={updateRequired ? 'block px-1 text-sm text-po-magenta' : 'block px-1 text-sm text-po-dim'}\n >\n {connection.reason || 'Reconnecting'}\n </output>\n ) : null}\n {compositionState.phase === 'error' ? (\n <div\n data-testid=\"activity-error\"\n role=\"alert\"\n className=\"flex items-center justify-between gap-3 rounded-lg border border-po-border-soft px-4 py-3\"\n >\n <span className=\"text-sm text-po-dim\">Activity failed to load</span>\n <Button\n variant=\"outline\"\n size=\"xs\"\n data-testid=\"activity-retry\"\n onClick={() => void retryWebPluginCompositions().catch((error: unknown) => console.error(error))}\n >\n Retry\n </Button>\n </div>\n ) : null}\n {groups.length === 0 && compositionState.phase === 'loading' ? (\n <Placeholder\n testId=\"activity-loading\"\n title=\"Loading activity\"\n description=\"Loading the package extensions that supervise work.\"\n />\n ) : null}\n {groups.length === 0 && compositionState.phase !== 'loading' && compositionState.phase !== 'error' ? (\n <Placeholder\n testId=\"activity-empty\"\n title=\"Nothing supervised yet\"\n description=\"A package's group appears here once its extension reports in.\"\n />\n ) : null}\n {ordinaryGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n\n <PluginSurface slot={HOST_SLOTS.activity} sessionId={activeId} />\n <PromoPanel />\n </div>\n\n {pinnedGroups.length > 0 ? (\n <div data-testid=\"activity-pinned\" className=\"flex shrink-0 flex-col gap-3 px-4 pb-4\">\n {pinnedGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n </div>\n ) : null}\n\n {/* The busy count overlays the footer hint instead of joining the scroll\n column, so it appearing or clearing never shifts the groups. It\n belongs to the activity face only: on the context face it would be\n a number about a list the reader is not looking at. */}\n <div className=\"relative shrink-0\">\n <p className=\"flex gap-2 border-t border-po-border-soft px-5 py-3 text-sm leading-relaxed text-po-dim\">\n <LightbulbIcon aria-hidden className=\"size-3.5 shrink-0\" />\n Each group is rendered by the package that owns it. The session's summary line stands in until that\n package publishes per-run detail.\n </p>\n {busy > 0 ? (\n <div className=\"absolute inset-0 flex items-center border-t border-po-border-soft bg-po-rail px-4\">\n <output\n data-testid=\"activity-busy\"\n className=\"flex flex-1 items-center gap-2 rounded-lg bg-po-tint-yellow px-3 py-2 text-sm text-po-yellow\"\n >\n <LoaderIcon aria-hidden className=\"size-3.5 animate-spin\" />\n {busy} running in the background\n </output>\n </div>\n ) : null}\n </div>\n </>\n )}\n </aside>\n );\n}\n\n/** Plugin group names are lowercase identifiers; the heading reads in sentence case. */\nfunction sentenceCase(name: string): string {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}\n\nfunction Placeholder({ testId, title, description }: { testId: string; title: string; description: string }) {\n return (\n <div\n data-testid={testId}\n className=\"flex flex-col gap-1 rounded-lg border border-dashed border-po-border px-4 py-5\"\n >\n <span className=\"text-base font-semibold text-po-hi\">{title}</span>\n <span className=\"text-sm text-po-dim\">{description}</span>\n </div>\n );\n}\n\n/** Static and decorative: it names what the dock is for and offers no action. */\nfunction PromoPanel() {\n return (\n <div className=\"relative shrink-0 overflow-hidden rounded-lg border border-po-border-soft px-4 pt-3.5 pb-16\">\n <span className=\"flex items-start gap-3\">\n <SparklesIcon aria-hidden className=\"mt-0.5 size-5 shrink-0 text-po-green\" />\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-base font-semibold text-po-hi\">A more capable you</span>\n <span className=\"text-sm text-po-dim\">Agents, tools, and your codebase. All in one place.</span>\n </span>\n </span>\n <svg\n aria-hidden\n viewBox=\"0 0 320 80\"\n preserveAspectRatio=\"none\"\n className=\"absolute inset-x-0 bottom-0 h-16 w-full\"\n >\n <path d=\"M0 50 C60 30 110 70 170 46 S280 18 320 34 V80 H0Z\" className=\"fill-po-tint-green\" />\n <path d=\"M0 64 C70 46 120 78 190 58 S290 44 320 52 V80 H0Z\" className=\"fill-po-edge-green opacity-40\" />\n <path d=\"M0 74 C80 62 150 82 220 70 S300 64 320 68 V80 H0Z\" className=\"fill-po-green opacity-20\" />\n </svg>\n </div>\n );\n}\n\nfunction ActivityGroupView({\n group,\n slotProps,\n}: {\n group: ActivityGroup;\n slotProps: ReturnType<typeof usePluginSlotProps>;\n}) {\n // Plugins without icon metadata get the host's generic mark rather than nothing.\n const GroupIcon = group.icon ?? ActivityIcon;\n const label = sentenceCase(group.name);\n const heading = (\n <>\n <span className=\"min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi\">{label}</span>\n {group.keys ? (\n <Kbd data-testid={`activity-keys-${group.name}`} className=\"bg-po-bg\">\n {group.keys}\n </Kbd>\n ) : null}\n </>\n );\n return (\n <div\n data-testid={`activity-${group.name}`}\n data-active={group.active}\n className=\"flex shrink-0 gap-3 rounded-lg border border-po-border-soft px-4 py-4\"\n >\n {/* One marker per head, carrying the busy colour. */}\n <GroupIcon aria-hidden className={`mt-0.5 size-5 shrink-0 ${group.active ? 'text-po-yellow' : 'text-po-hi'}`} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n {/* A group that owns a panel opens it from its own name: the tab is\n temporary, so the tab strip carries it only while the reader is\n using it. Only those headings get a chevron. */}\n {group.transientTab === undefined ? (\n <span className=\"flex min-w-0 items-center gap-2\">{heading}</span>\n ) : (\n <Button\n variant=\"ghost\"\n size=\"xs\"\n data-testid={`activity-open-${group.name}`}\n title={`Open ${group.name}`}\n onClick={() => {\n const tab = group.transientTab?.();\n if (tab !== undefined) slotProps.openTransientTab(tab);\n }}\n className=\"group/heading h-auto min-w-0 justify-start gap-2 px-0 py-0 hover:bg-transparent\"\n >\n {heading}\n <ChevronRightIcon aria-hidden className=\"size-4 shrink-0 text-po-faint group-hover/heading:text-po-dim\" />\n </Button>\n )}\n {slotFills(activityGroupSlot(group.name)).length > 0 ? (\n slotProps.renderSlot(activityGroupSlot(group.name))\n ) : (\n <p\n data-testid={`activity-summary-${group.name}`}\n className={`text-sm first-letter:uppercase ${group.active ? 'text-po-yellow' : 'text-po-dim'}`}\n >\n {group.summary || 'Idle'}\n </p>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,IAAI,oBAAwC;CAAE,UAAU,CAAC;CAAG,KAAK;AAAG;;;;;;;;;;;;;;AAcpE,SAAgB,aAAa,EAC3B,SACA,eACA,KACA,SAMC;CACD,MAAM,YAAA,GAAWA,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAAU,MAAM,QAAQ;CAClE,MAAM,cAAA,GAAaD,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAC1C,MAAM,aAAa,OAAO,KAAA,IAAY,MAAM,KAAK,MAAM,SACzD;CACA,MAAM,kBAAA,GAAiBD,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAAU,MAAM,cAAc;CAC9E,MAAM,WAAWC,qBAAAA,kBAAkB,UAAU,MAAM,QAAQ;CAC3D,MAAM,UAAUA,qBAAAA,kB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D,UAAA,MAAM;CACJ,CAAA,IACH,IACJ,EAAA,CAAA;CAEJ,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EACE,eAAa,YAAY,MAAM;EAC/B,eAAa,MAAM;EACnB,WAAU;EAHZ,UAAA,CAME,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;GAAW,eAAA;GAAY,WAAW,0BAA0B,MAAM,SAAS,mBAAmB;EAAiB,CAAA,GAC/G,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CAIG,MAAM,iBAAiB,KAAA,IACtB,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAU;IAAmC,UAAA;GAAc,CAAA,IAEjE,iBAAA,GAAA,kBAAA,KAAA,CAACX,6BAAAA,QAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAa,iBAAiB,MAAM;IACpC,OAAO,QAAQ,MAAM;IACrB,eAAe;KACb,MAAM,MAAM,MAAM,eAAe;KACjC,IAAI,QAAQ,KAAA,GAAW,UAAU,iBAAiB,GAAG;IACvD;IACA,WAAU;IATZ,UAAA,CAWG,SACD,iBAAA,GAAA,kBAAA,IAAA,CAACY,6BAAAA,kBAAD;KAAkB,eAAA;KAAY,WAAU;IAAiE,CAAA,CACnG;GAETC,CAAAA,GAAAA,uBAAAA,UAAUC,uBAAAA,kBAAkB,MAAM,IAAI,CAAC,CAAC,CAAC,SAAS,IACjD,UAAU,WAAWA,uBAAAA,kBAAkB,MAAM,IAAI,CAAC,IAElD,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;IACE,eAAa,oBAAoB,MAAM;IACvC,WAAW,kCAAkC,MAAM,SAAS,mBAAmB;IAE9E,UAAA,MAAM,WAAW;GACjB,CAAA,CAEF;EACF,CAAA,CAAA;;AAET"}
1
+ {"version":3,"file":"ActivityDock.cjs","names":["useStore","sessionsStore","useActiveSession","usePluginSlotProps","uiStore","useDockFaces","autoSelectedDockFace","webPluginCompositionStore","webPluginMountState","useActivityGroups","DockTabs","Button","CloseIcon","SessionMcpTools","ContextPanel","retryWebPluginCompositions","PluginSurface","HOST_SLOTS","LightbulbIcon","LoaderIcon","SparklesIcon","ActivityIcon","Kbd","ChevronRightIcon","slotFills","activityGroupSlot"],"sources":["../../../../src/web/features/activity/ActivityDock.tsx"],"sourcesContent":["import {\n ActivityIcon,\n Button,\n ChevronRightIcon,\n CloseIcon,\n Kbd,\n LightbulbIcon,\n LoaderIcon,\n SparklesIcon,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect } from 'react';\n\nimport { PluginSurface } from '../../components/PluginSurface';\nimport { SessionMcpTools } from '../../components/SessionMcp';\nimport {\n type ActivityGroup,\n autoSelectedDockFace,\n type DockAutoSelectKeys,\n useActivityGroups,\n useDockFaces,\n} from '../../lib/composition';\nimport {\n retryWebPluginCompositions,\n webPluginCompositionStore,\n webPluginMountState,\n} from '../../lib/pluginCompositions';\nimport { activityGroupSlot, HOST_SLOTS, slotFills } from '../../lib/pluginRegistry';\nimport type { SessionMcpViewState } from '../../lib/useSessionMcp';\nimport { sessionsStore } from '../../stores/sessionsStore';\nimport { useActiveSession } from '../../stores/sessionStore';\nimport { setDockTab, uiStore } from '../../stores/uiStore';\nimport { usePluginSlotProps } from '../../stores/usePluginSlotProps';\nimport { ContextPanel } from './ContextPanel';\nimport { DockTabs } from './DockTabs';\n\n/** Outlives the dock: hiding and reopening it must not count as entering the tab again. */\nlet automaticFaceKeys: DockAutoSelectKeys = { sessions: [], tab: '' };\n/**\n * The column for everything that is not the transcript.\n *\n * `activity` is asynchronous work that outlives the turn that started it.\n * `context` is the composition that work runs under, and what carrying it costs.\n * `mcp` lists capabilities granted to this session's remote connections.\n *\n * On the activity face the host owns only the frame: which groups exist, their\n * key chips, and what they render come from the packages that declare them.\n * Each declared group opens the keyed slot activity.<name>; the sections any\n * plugin registers under that name render there, in slot order, and a group\n * nobody fills shows the one-line summary the session's footer publishes.\n */\nexport function ActivityDock({\n onClose,\n onOpenContent,\n mcp,\n tabId,\n scope,\n}: {\n onClose: () => void;\n onOpenContent: () => void;\n mcp?: SessionMcpViewState;\n tabId?: string;\n /** Names what the activity face is showing when it is not the session itself, such as a workflow step. */\n scope?: string;\n}) {\n const activeId = useStore(sessionsStore, (state) => state.activeId);\n const connection = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId],\n );\n const updateRequired = useStore(sessionsStore, (state) => state.updateRequired);\n const statuses = useActiveSession((state) => state.statuses);\n const widgets = useActiveSession((state) => state.widgets);\n const slotProps = usePluginSlotProps(activeId, onOpenContent);\n const tab = useStore(uiStore, (state) => state.dockTab);\n const dockFaces = useDockFaces(activeId).filter(\n (face) => face.requiredMinorMode === undefined || slotProps.activeMinorModes?.includes(face.requiredMinorMode),\n );\n const selectedFace = dockFaces.find((face) => face.id === tab);\n const mcpEnabled = mcp?.snapshot?.enabled === true;\n const resolvedTab =\n tab === 'context' || tab === 'activity' || (tab === 'mcp' && mcpEnabled) || selectedFace !== undefined\n ? tab\n : 'activity';\n const DockPanel = selectedFace?.panel;\n const automaticSelection = autoSelectedDockFace(\n dockFaces,\n { sessionId: activeId, tabId: tabId ?? null },\n automaticFaceKeys,\n );\n const automaticFace = automaticSelection.face;\n const automaticSessionKeys = automaticSelection.keys.sessions;\n const automaticTabKey = automaticSelection.keys.tab;\n const workspaceId = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId]?.summary.workspaceId,\n );\n const compositionSnapshot = useStore(webPluginCompositionStore);\n const compositionState = webPluginMountState(\n activeId === null ? { scope: 'global' } : { scope: 'session', sessionId: activeId, workspaceId: workspaceId ?? '' },\n compositionSnapshot,\n );\n const groups = useActivityGroups(statuses, widgets, activeId);\n const ordinaryGroups = groups.filter((group) => group.placement !== 'bottom');\n const pinnedGroups = groups.filter((group) => group.placement === 'bottom');\n const busy = groups.filter((group) => group.active).length;\n\n useEffect(() => {\n automaticFaceKeys = { sessions: automaticSessionKeys, tab: automaticTabKey };\n if (automaticFace !== undefined) setDockTab(automaticFace.id);\n }, [automaticFace, automaticSessionKeys, automaticTabKey]);\n useEffect(() => {\n if (resolvedTab !== tab) setDockTab(resolvedTab);\n }, [resolvedTab, tab]);\n return (\n <aside\n data-testid=\"activity-dock\"\n className=\"flex w-[min(360px,calc(100vw-48px))] shrink-0 flex-col overflow-hidden border-l border-po-border-soft bg-po-rail sm:w-[360px]\"\n >\n <div className=\"flex h-16 shrink-0 items-end gap-6 border-b border-po-border-soft px-5\">\n <DockTabs contributed={dockFaces} mcpEnabled={mcpEnabled} />\n <span className=\"flex-1\" />\n <Button\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"activity-close\"\n aria-label=\"Hide activity\"\n title=\"Hide activity\"\n onClick={onClose}\n className=\"mb-4 text-po-dim\"\n >\n <CloseIcon aria-hidden className=\"size-3.5\" />\n </Button>\n </div>\n\n {resolvedTab === 'mcp' && mcp !== undefined ? (\n <SessionMcpTools key={activeId} state={mcp} />\n ) : DockPanel !== undefined ? (\n <DockPanel {...slotProps} />\n ) : resolvedTab === 'context' ? (\n <ContextPanel />\n ) : (\n <>\n <div data-testid=\"activity-scroll\" className=\"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4\">\n {scope === undefined ? null : (\n <p data-testid=\"activity-scope\" className=\"px-1 text-sm text-po-dim\">\n {scope}\n </p>\n )}\n {connection?.attach === 'offline' ? (\n <output\n data-testid=\"activity-offline\"\n className={updateRequired ? 'block px-1 text-sm text-po-magenta' : 'block px-1 text-sm text-po-dim'}\n >\n {connection.reason || 'Reconnecting'}\n </output>\n ) : null}\n {compositionState.phase === 'error' ? (\n <div\n data-testid=\"activity-error\"\n role=\"alert\"\n className=\"flex items-center justify-between gap-3 rounded-lg border border-po-border-soft px-4 py-3\"\n >\n <span className=\"text-sm text-po-dim\">Activity failed to load</span>\n <Button\n variant=\"outline\"\n size=\"xs\"\n data-testid=\"activity-retry\"\n onClick={() => void retryWebPluginCompositions().catch((error: unknown) => console.error(error))}\n >\n Retry\n </Button>\n </div>\n ) : null}\n {groups.length === 0 && compositionState.phase === 'loading' ? (\n <Placeholder\n testId=\"activity-loading\"\n title=\"Loading activity\"\n description=\"Loading the package extensions that supervise work.\"\n />\n ) : null}\n {groups.length === 0 && compositionState.phase !== 'loading' && compositionState.phase !== 'error' ? (\n <Placeholder\n testId=\"activity-empty\"\n title=\"Nothing supervised yet\"\n description=\"A package's group appears here once its extension reports in.\"\n />\n ) : null}\n {ordinaryGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n\n <PluginSurface slot={HOST_SLOTS.activity} sessionId={activeId} />\n <PromoPanel />\n </div>\n\n {pinnedGroups.length > 0 ? (\n <div data-testid=\"activity-pinned\" className=\"flex shrink-0 flex-col gap-3 px-4 pb-4\">\n {pinnedGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n </div>\n ) : null}\n\n {/* The busy count overlays the footer hint instead of joining the scroll\n column, so it appearing or clearing never shifts the groups. It\n belongs to the activity face only: on the context face it would be\n a number about a list the reader is not looking at. */}\n <div className=\"relative shrink-0\">\n <p className=\"flex gap-2 border-t border-po-border-soft px-5 py-3 text-sm leading-relaxed text-po-dim\">\n <LightbulbIcon aria-hidden className=\"size-3.5 shrink-0\" />\n Each group is rendered by the package that owns it. The session's summary line stands in until that\n package publishes per-run detail.\n </p>\n {busy > 0 ? (\n <div className=\"absolute inset-0 flex items-center border-t border-po-border-soft bg-po-rail px-4\">\n <output\n data-testid=\"activity-busy\"\n className=\"flex flex-1 items-center gap-2 rounded-lg bg-po-tint-yellow px-3 py-2 text-sm text-po-yellow\"\n >\n <LoaderIcon aria-hidden className=\"size-3.5 animate-spin\" />\n {busy} running in the background\n </output>\n </div>\n ) : null}\n </div>\n </>\n )}\n </aside>\n );\n}\n\n/** Plugin group names are lowercase identifiers; the heading reads in sentence case. */\nfunction sentenceCase(name: string): string {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}\n\nfunction Placeholder({ testId, title, description }: { testId: string; title: string; description: string }) {\n return (\n <div\n data-testid={testId}\n className=\"flex flex-col gap-1 rounded-lg border border-dashed border-po-border px-4 py-5\"\n >\n <span className=\"text-base font-semibold text-po-hi\">{title}</span>\n <span className=\"text-sm text-po-dim\">{description}</span>\n </div>\n );\n}\n\n/** Static and decorative: it names what the dock is for and offers no action. */\nfunction PromoPanel() {\n return (\n <div className=\"relative shrink-0 overflow-hidden rounded-lg border border-po-border-soft px-4 pt-3.5 pb-16\">\n <span className=\"flex items-start gap-3\">\n <SparklesIcon aria-hidden className=\"mt-0.5 size-5 shrink-0 text-po-green\" />\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-base font-semibold text-po-hi\">A more capable you</span>\n <span className=\"text-sm text-po-dim\">Agents, tools, and your codebase. All in one place.</span>\n </span>\n </span>\n <svg\n aria-hidden\n viewBox=\"0 0 320 80\"\n preserveAspectRatio=\"none\"\n className=\"absolute inset-x-0 bottom-0 h-16 w-full\"\n >\n <path d=\"M0 50 C60 30 110 70 170 46 S280 18 320 34 V80 H0Z\" className=\"fill-po-tint-green\" />\n <path d=\"M0 64 C70 46 120 78 190 58 S290 44 320 52 V80 H0Z\" className=\"fill-po-edge-green opacity-40\" />\n <path d=\"M0 74 C80 62 150 82 220 70 S300 64 320 68 V80 H0Z\" className=\"fill-po-green opacity-20\" />\n </svg>\n </div>\n );\n}\n\nfunction ActivityGroupView({\n group,\n slotProps,\n}: {\n group: ActivityGroup;\n slotProps: ReturnType<typeof usePluginSlotProps>;\n}) {\n // Plugins without icon metadata get the host's generic mark rather than nothing.\n const GroupIcon = group.icon ?? ActivityIcon;\n const label = sentenceCase(group.name);\n const heading = (\n <>\n <span className=\"min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi\">{label}</span>\n {group.keys ? (\n <Kbd data-testid={`activity-keys-${group.name}`} className=\"bg-po-bg\">\n {group.keys}\n </Kbd>\n ) : null}\n </>\n );\n return (\n <div\n data-testid={`activity-${group.name}`}\n data-active={group.active}\n className=\"flex shrink-0 gap-3 rounded-lg border border-po-border-soft px-4 py-4\"\n >\n {/* One marker per head, carrying the busy colour. */}\n <GroupIcon aria-hidden className={`mt-0.5 size-5 shrink-0 ${group.active ? 'text-po-yellow' : 'text-po-hi'}`} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n {/* A group that owns a panel opens it from its own name: the tab is\n temporary, so the tab strip carries it only while the reader is\n using it. Only those headings get a chevron. */}\n {group.transientTab === undefined ? (\n <span className=\"flex min-w-0 items-center gap-2\">{heading}</span>\n ) : (\n <Button\n variant=\"ghost\"\n size=\"xs\"\n data-testid={`activity-open-${group.name}`}\n title={`Open ${group.name}`}\n onClick={() => {\n const tab = group.transientTab?.();\n if (tab !== undefined) slotProps.openTransientTab(tab);\n }}\n className=\"group/heading h-auto min-w-0 justify-start gap-2 px-0 py-0 hover:bg-transparent\"\n >\n {heading}\n <ChevronRightIcon aria-hidden className=\"size-4 shrink-0 text-po-faint group-hover/heading:text-po-dim\" />\n </Button>\n )}\n {slotFills(activityGroupSlot(group.name)).length > 0 ? (\n slotProps.renderSlot(activityGroupSlot(group.name))\n ) : (\n <p\n data-testid={`activity-summary-${group.name}`}\n className={`text-sm first-letter:uppercase ${group.active ? 'text-po-yellow' : 'text-po-dim'}`}\n >\n {group.summary || 'Idle'}\n </p>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,IAAI,oBAAwC;CAAE,UAAU,CAAC;CAAG,KAAK;AAAG;;;;;;;;;;;;;;AAcpE,SAAgB,aAAa,EAC3B,SACA,eACA,KACA,OACA,SAQC;CACD,MAAM,YAAA,GAAWA,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAAU,MAAM,QAAQ;CAClE,MAAM,cAAA,GAAaD,sBAAAA,SAAAA,CAASC,sBAAAA,gBAAgB,UAC1C,MAAM,aAAa,OAAO,KAAA,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A,uBAAAA,kBAAkB,MAAM,IAAI,CAAC,IAElD,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;IACE,eAAa,oBAAoB,MAAM;IACvC,WAAW,kCAAkC,MAAM,SAAS,mBAAmB;IAE9E,UAAA,MAAM,WAAW;GACjB,CAAA,CAEF;EACF,CAAA,CAAA;;AAET"}
@@ -13,11 +13,13 @@ import { SessionMcpViewState } from "../../lib/useSessionMcp.mjs";
13
13
  * plugin registers under that name render there, in slot order, and a group
14
14
  * nobody fills shows the one-line summary the session's footer publishes.
15
15
  */
16
- export declare function ActivityDock({ onClose, onOpenContent, mcp, tabId }: {
16
+ export declare function ActivityDock({ onClose, onOpenContent, mcp, tabId, scope }: {
17
17
  onClose: () => void;
18
18
  onOpenContent: () => void;
19
19
  mcp?: SessionMcpViewState;
20
20
  tabId?: string;
21
+ /** Names what the activity face is showing when it is not the session itself, such as a workflow step. */
22
+ scope?: string;
21
23
  }): import("react").JSX.Element;
22
24
  //#endregion
23
25
  //# sourceMappingURL=ActivityDock.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityDock.d.mts","names":[],"sources":["../../../../src/web/features/activity/ActivityDock.tsx"],"mappings":";;;;;;;;;;;;;;;wBAmDgB,eACd,SACA,eACA,KACA;EAEA;EACA;EACA,MAAM;EACN;oBACD,IAAA"}
1
+ {"version":3,"file":"ActivityDock.d.mts","names":[],"sources":["../../../../src/web/features/activity/ActivityDock.tsx"],"mappings":";;;;;;;;;;;;;;;wBAmDgB,eACd,SACA,eACA,KACA,OACA;EAEA;EACA;EACA,MAAM;EACN;;EAEA;oBACD,IAAA"}
@@ -32,7 +32,7 @@ let automaticFaceKeys = {
32
32
  * plugin registers under that name render there, in slot order, and a group
33
33
  * nobody fills shows the one-line summary the session's footer publishes.
34
34
  */
35
- function ActivityDock({ onClose, onOpenContent, mcp, tabId }) {
35
+ function ActivityDock({ onClose, onOpenContent, mcp, tabId, scope }) {
36
36
  const activeId = useStore(sessionsStore, (state) => state.activeId);
37
37
  const connection = useStore(sessionsStore, (state) => state.activeId === null ? void 0 : state.byId[state.activeId]);
38
38
  const updateRequired = useStore(sessionsStore, (state) => state.updateRequired);
@@ -107,6 +107,11 @@ function ActivityDock({ onClose, onOpenContent, mcp, tabId }) {
107
107
  "data-testid": "activity-scroll",
108
108
  className: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4",
109
109
  children: [
110
+ scope === void 0 ? null : /* @__PURE__ */ jsx("p", {
111
+ "data-testid": "activity-scope",
112
+ className: "px-1 text-sm text-po-dim",
113
+ children: scope
114
+ }),
110
115
  connection?.attach === "offline" ? /* @__PURE__ */ jsx("output", {
111
116
  "data-testid": "activity-offline",
112
117
  className: updateRequired ? "block px-1 text-sm text-po-magenta" : "block px-1 text-sm text-po-dim",
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityDock.mjs","names":[],"sources":["../../../../src/web/features/activity/ActivityDock.tsx"],"sourcesContent":["import {\n ActivityIcon,\n Button,\n ChevronRightIcon,\n CloseIcon,\n Kbd,\n LightbulbIcon,\n LoaderIcon,\n SparklesIcon,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect } from 'react';\n\nimport { PluginSurface } from '../../components/PluginSurface';\nimport { SessionMcpTools } from '../../components/SessionMcp';\nimport {\n type ActivityGroup,\n autoSelectedDockFace,\n type DockAutoSelectKeys,\n useActivityGroups,\n useDockFaces,\n} from '../../lib/composition';\nimport {\n retryWebPluginCompositions,\n webPluginCompositionStore,\n webPluginMountState,\n} from '../../lib/pluginCompositions';\nimport { activityGroupSlot, HOST_SLOTS, slotFills } from '../../lib/pluginRegistry';\nimport type { SessionMcpViewState } from '../../lib/useSessionMcp';\nimport { sessionsStore } from '../../stores/sessionsStore';\nimport { useActiveSession } from '../../stores/sessionStore';\nimport { setDockTab, uiStore } from '../../stores/uiStore';\nimport { usePluginSlotProps } from '../../stores/usePluginSlotProps';\nimport { ContextPanel } from './ContextPanel';\nimport { DockTabs } from './DockTabs';\n\n/** Outlives the dock: hiding and reopening it must not count as entering the tab again. */\nlet automaticFaceKeys: DockAutoSelectKeys = { sessions: [], tab: '' };\n/**\n * The column for everything that is not the transcript.\n *\n * `activity` is asynchronous work that outlives the turn that started it.\n * `context` is the composition that work runs under, and what carrying it costs.\n * `mcp` lists capabilities granted to this session's remote connections.\n *\n * On the activity face the host owns only the frame: which groups exist, their\n * key chips, and what they render come from the packages that declare them.\n * Each declared group opens the keyed slot activity.<name>; the sections any\n * plugin registers under that name render there, in slot order, and a group\n * nobody fills shows the one-line summary the session's footer publishes.\n */\nexport function ActivityDock({\n onClose,\n onOpenContent,\n mcp,\n tabId,\n}: {\n onClose: () => void;\n onOpenContent: () => void;\n mcp?: SessionMcpViewState;\n tabId?: string;\n}) {\n const activeId = useStore(sessionsStore, (state) => state.activeId);\n const connection = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId],\n );\n const updateRequired = useStore(sessionsStore, (state) => state.updateRequired);\n const statuses = useActiveSession((state) => state.statuses);\n const widgets = useActiveSession((state) => state.widgets);\n const slotProps = usePluginSlotProps(activeId, onOpenContent);\n const tab = useStore(uiStore, (state) => state.dockTab);\n const dockFaces = useDockFaces(activeId).filter(\n (face) => face.requiredMinorMode === undefined || slotProps.activeMinorModes?.includes(face.requiredMinorMode),\n );\n const selectedFace = dockFaces.find((face) => face.id === tab);\n const mcpEnabled = mcp?.snapshot?.enabled === true;\n const resolvedTab =\n tab === 'context' || tab === 'activity' || (tab === 'mcp' && mcpEnabled) || selectedFace !== undefined\n ? tab\n : 'activity';\n const DockPanel = selectedFace?.panel;\n const automaticSelection = autoSelectedDockFace(\n dockFaces,\n { sessionId: activeId, tabId: tabId ?? null },\n automaticFaceKeys,\n );\n const automaticFace = automaticSelection.face;\n const automaticSessionKeys = automaticSelection.keys.sessions;\n const automaticTabKey = automaticSelection.keys.tab;\n const workspaceId = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId]?.summary.workspaceId,\n );\n const compositionSnapshot = useStore(webPluginCompositionStore);\n const compositionState = webPluginMountState(\n activeId === null ? { scope: 'global' } : { scope: 'session', sessionId: activeId, workspaceId: workspaceId ?? '' },\n compositionSnapshot,\n );\n const groups = useActivityGroups(statuses, widgets, activeId);\n const ordinaryGroups = groups.filter((group) => group.placement !== 'bottom');\n const pinnedGroups = groups.filter((group) => group.placement === 'bottom');\n const busy = groups.filter((group) => group.active).length;\n\n useEffect(() => {\n automaticFaceKeys = { sessions: automaticSessionKeys, tab: automaticTabKey };\n if (automaticFace !== undefined) setDockTab(automaticFace.id);\n }, [automaticFace, automaticSessionKeys, automaticTabKey]);\n useEffect(() => {\n if (resolvedTab !== tab) setDockTab(resolvedTab);\n }, [resolvedTab, tab]);\n return (\n <aside\n data-testid=\"activity-dock\"\n className=\"flex w-[min(360px,calc(100vw-48px))] shrink-0 flex-col overflow-hidden border-l border-po-border-soft bg-po-rail sm:w-[360px]\"\n >\n <div className=\"flex h-16 shrink-0 items-end gap-6 border-b border-po-border-soft px-5\">\n <DockTabs contributed={dockFaces} mcpEnabled={mcpEnabled} />\n <span className=\"flex-1\" />\n <Button\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"activity-close\"\n aria-label=\"Hide activity\"\n title=\"Hide activity\"\n onClick={onClose}\n className=\"mb-4 text-po-dim\"\n >\n <CloseIcon aria-hidden className=\"size-3.5\" />\n </Button>\n </div>\n\n {resolvedTab === 'mcp' && mcp !== undefined ? (\n <SessionMcpTools key={activeId} state={mcp} />\n ) : DockPanel !== undefined ? (\n <DockPanel {...slotProps} />\n ) : resolvedTab === 'context' ? (\n <ContextPanel />\n ) : (\n <>\n <div data-testid=\"activity-scroll\" className=\"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4\">\n {connection?.attach === 'offline' ? (\n <output\n data-testid=\"activity-offline\"\n className={updateRequired ? 'block px-1 text-sm text-po-magenta' : 'block px-1 text-sm text-po-dim'}\n >\n {connection.reason || 'Reconnecting'}\n </output>\n ) : null}\n {compositionState.phase === 'error' ? (\n <div\n data-testid=\"activity-error\"\n role=\"alert\"\n className=\"flex items-center justify-between gap-3 rounded-lg border border-po-border-soft px-4 py-3\"\n >\n <span className=\"text-sm text-po-dim\">Activity failed to load</span>\n <Button\n variant=\"outline\"\n size=\"xs\"\n data-testid=\"activity-retry\"\n onClick={() => void retryWebPluginCompositions().catch((error: unknown) => console.error(error))}\n >\n Retry\n </Button>\n </div>\n ) : null}\n {groups.length === 0 && compositionState.phase === 'loading' ? (\n <Placeholder\n testId=\"activity-loading\"\n title=\"Loading activity\"\n description=\"Loading the package extensions that supervise work.\"\n />\n ) : null}\n {groups.length === 0 && compositionState.phase !== 'loading' && compositionState.phase !== 'error' ? (\n <Placeholder\n testId=\"activity-empty\"\n title=\"Nothing supervised yet\"\n description=\"A package's group appears here once its extension reports in.\"\n />\n ) : null}\n {ordinaryGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n\n <PluginSurface slot={HOST_SLOTS.activity} sessionId={activeId} />\n <PromoPanel />\n </div>\n\n {pinnedGroups.length > 0 ? (\n <div data-testid=\"activity-pinned\" className=\"flex shrink-0 flex-col gap-3 px-4 pb-4\">\n {pinnedGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n </div>\n ) : null}\n\n {/* The busy count overlays the footer hint instead of joining the scroll\n column, so it appearing or clearing never shifts the groups. It\n belongs to the activity face only: on the context face it would be\n a number about a list the reader is not looking at. */}\n <div className=\"relative shrink-0\">\n <p className=\"flex gap-2 border-t border-po-border-soft px-5 py-3 text-sm leading-relaxed text-po-dim\">\n <LightbulbIcon aria-hidden className=\"size-3.5 shrink-0\" />\n Each group is rendered by the package that owns it. The session's summary line stands in until that\n package publishes per-run detail.\n </p>\n {busy > 0 ? (\n <div className=\"absolute inset-0 flex items-center border-t border-po-border-soft bg-po-rail px-4\">\n <output\n data-testid=\"activity-busy\"\n className=\"flex flex-1 items-center gap-2 rounded-lg bg-po-tint-yellow px-3 py-2 text-sm text-po-yellow\"\n >\n <LoaderIcon aria-hidden className=\"size-3.5 animate-spin\" />\n {busy} running in the background\n </output>\n </div>\n ) : null}\n </div>\n </>\n )}\n </aside>\n );\n}\n\n/** Plugin group names are lowercase identifiers; the heading reads in sentence case. */\nfunction sentenceCase(name: string): string {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}\n\nfunction Placeholder({ testId, title, description }: { testId: string; title: string; description: string }) {\n return (\n <div\n data-testid={testId}\n className=\"flex flex-col gap-1 rounded-lg border border-dashed border-po-border px-4 py-5\"\n >\n <span className=\"text-base font-semibold text-po-hi\">{title}</span>\n <span className=\"text-sm text-po-dim\">{description}</span>\n </div>\n );\n}\n\n/** Static and decorative: it names what the dock is for and offers no action. */\nfunction PromoPanel() {\n return (\n <div className=\"relative shrink-0 overflow-hidden rounded-lg border border-po-border-soft px-4 pt-3.5 pb-16\">\n <span className=\"flex items-start gap-3\">\n <SparklesIcon aria-hidden className=\"mt-0.5 size-5 shrink-0 text-po-green\" />\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-base font-semibold text-po-hi\">A more capable you</span>\n <span className=\"text-sm text-po-dim\">Agents, tools, and your codebase. All in one place.</span>\n </span>\n </span>\n <svg\n aria-hidden\n viewBox=\"0 0 320 80\"\n preserveAspectRatio=\"none\"\n className=\"absolute inset-x-0 bottom-0 h-16 w-full\"\n >\n <path d=\"M0 50 C60 30 110 70 170 46 S280 18 320 34 V80 H0Z\" className=\"fill-po-tint-green\" />\n <path d=\"M0 64 C70 46 120 78 190 58 S290 44 320 52 V80 H0Z\" className=\"fill-po-edge-green opacity-40\" />\n <path d=\"M0 74 C80 62 150 82 220 70 S300 64 320 68 V80 H0Z\" className=\"fill-po-green opacity-20\" />\n </svg>\n </div>\n );\n}\n\nfunction ActivityGroupView({\n group,\n slotProps,\n}: {\n group: ActivityGroup;\n slotProps: ReturnType<typeof usePluginSlotProps>;\n}) {\n // Plugins without icon metadata get the host's generic mark rather than nothing.\n const GroupIcon = group.icon ?? ActivityIcon;\n const label = sentenceCase(group.name);\n const heading = (\n <>\n <span className=\"min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi\">{label}</span>\n {group.keys ? (\n <Kbd data-testid={`activity-keys-${group.name}`} className=\"bg-po-bg\">\n {group.keys}\n </Kbd>\n ) : null}\n </>\n );\n return (\n <div\n data-testid={`activity-${group.name}`}\n data-active={group.active}\n className=\"flex shrink-0 gap-3 rounded-lg border border-po-border-soft px-4 py-4\"\n >\n {/* One marker per head, carrying the busy colour. */}\n <GroupIcon aria-hidden className={`mt-0.5 size-5 shrink-0 ${group.active ? 'text-po-yellow' : 'text-po-hi'}`} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n {/* A group that owns a panel opens it from its own name: the tab is\n temporary, so the tab strip carries it only while the reader is\n using it. Only those headings get a chevron. */}\n {group.transientTab === undefined ? (\n <span className=\"flex min-w-0 items-center gap-2\">{heading}</span>\n ) : (\n <Button\n variant=\"ghost\"\n size=\"xs\"\n data-testid={`activity-open-${group.name}`}\n title={`Open ${group.name}`}\n onClick={() => {\n const tab = group.transientTab?.();\n if (tab !== undefined) slotProps.openTransientTab(tab);\n }}\n className=\"group/heading h-auto min-w-0 justify-start gap-2 px-0 py-0 hover:bg-transparent\"\n >\n {heading}\n <ChevronRightIcon aria-hidden className=\"size-4 shrink-0 text-po-faint group-hover/heading:text-po-dim\" />\n </Button>\n )}\n {slotFills(activityGroupSlot(group.name)).length > 0 ? (\n slotProps.renderSlot(activityGroupSlot(group.name))\n ) : (\n <p\n data-testid={`activity-summary-${group.name}`}\n className={`text-sm first-letter:uppercase ${group.active ? 'text-po-yellow' : 'text-po-dim'}`}\n >\n {group.summary || 'Idle'}\n </p>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,IAAI,oBAAwC;CAAE,UAAU,CAAC;CAAG,KAAK;AAAG;;;;;;;;;;;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U;EAAwE,UAAA;CAAY,CAAA,GACnG,MAAM,OACL,oBAAC,KAAD;EAAK,eAAa,iBAAiB,MAAM;EAAQ,WAAU;EACxD,UAAA,MAAM;CACJ,CAAA,IACH,IACJ,EAAA,CAAA;CAEJ,OACE,qBAAC,OAAD;EACE,eAAa,YAAY,MAAM;EAC/B,eAAa,MAAM;EACnB,WAAU;EAHZ,UAAA,CAME,oBAAC,WAAD;GAAW,eAAA;GAAY,WAAW,0BAA0B,MAAM,SAAS,mBAAmB;EAAiB,CAAA,GAC/G,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CAIG,MAAM,iBAAiB,KAAA,IACtB,oBAAC,QAAD;IAAM,WAAU;IAAmC,UAAA;GAAc,CAAA,IAEjE,qBAAC,QAAD;IACE,SAAQ;IACR,MAAK;IACL,eAAa,iBAAiB,MAAM;IACpC,OAAO,QAAQ,MAAM;IACrB,eAAe;KACb,MAAM,MAAM,MAAM,eAAe;KACjC,IAAI,QAAQ,KAAA,GAAW,UAAU,iBAAiB,GAAG;IACvD;IACA,WAAU;IATZ,UAAA,CAWG,SACD,oBAAC,kBAAD;KAAkB,eAAA;KAAY,WAAU;IAAiE,CAAA,CACnG;GAET,CAAA,GAAA,UAAU,kBAAkB,MAAM,IAAI,CAAC,CAAC,CAAC,SAAS,IACjD,UAAU,WAAW,kBAAkB,MAAM,IAAI,CAAC,IAElD,oBAAC,KAAD;IACE,eAAa,oBAAoB,MAAM;IACvC,WAAW,kCAAkC,MAAM,SAAS,mBAAmB;IAE9E,UAAA,MAAM,WAAW;GACjB,CAAA,CAEF;EACF,CAAA,CAAA;;AAET"}
1
+ {"version":3,"file":"ActivityDock.mjs","names":[],"sources":["../../../../src/web/features/activity/ActivityDock.tsx"],"sourcesContent":["import {\n ActivityIcon,\n Button,\n ChevronRightIcon,\n CloseIcon,\n Kbd,\n LightbulbIcon,\n LoaderIcon,\n SparklesIcon,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { useEffect } from 'react';\n\nimport { PluginSurface } from '../../components/PluginSurface';\nimport { SessionMcpTools } from '../../components/SessionMcp';\nimport {\n type ActivityGroup,\n autoSelectedDockFace,\n type DockAutoSelectKeys,\n useActivityGroups,\n useDockFaces,\n} from '../../lib/composition';\nimport {\n retryWebPluginCompositions,\n webPluginCompositionStore,\n webPluginMountState,\n} from '../../lib/pluginCompositions';\nimport { activityGroupSlot, HOST_SLOTS, slotFills } from '../../lib/pluginRegistry';\nimport type { SessionMcpViewState } from '../../lib/useSessionMcp';\nimport { sessionsStore } from '../../stores/sessionsStore';\nimport { useActiveSession } from '../../stores/sessionStore';\nimport { setDockTab, uiStore } from '../../stores/uiStore';\nimport { usePluginSlotProps } from '../../stores/usePluginSlotProps';\nimport { ContextPanel } from './ContextPanel';\nimport { DockTabs } from './DockTabs';\n\n/** Outlives the dock: hiding and reopening it must not count as entering the tab again. */\nlet automaticFaceKeys: DockAutoSelectKeys = { sessions: [], tab: '' };\n/**\n * The column for everything that is not the transcript.\n *\n * `activity` is asynchronous work that outlives the turn that started it.\n * `context` is the composition that work runs under, and what carrying it costs.\n * `mcp` lists capabilities granted to this session's remote connections.\n *\n * On the activity face the host owns only the frame: which groups exist, their\n * key chips, and what they render come from the packages that declare them.\n * Each declared group opens the keyed slot activity.<name>; the sections any\n * plugin registers under that name render there, in slot order, and a group\n * nobody fills shows the one-line summary the session's footer publishes.\n */\nexport function ActivityDock({\n onClose,\n onOpenContent,\n mcp,\n tabId,\n scope,\n}: {\n onClose: () => void;\n onOpenContent: () => void;\n mcp?: SessionMcpViewState;\n tabId?: string;\n /** Names what the activity face is showing when it is not the session itself, such as a workflow step. */\n scope?: string;\n}) {\n const activeId = useStore(sessionsStore, (state) => state.activeId);\n const connection = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId],\n );\n const updateRequired = useStore(sessionsStore, (state) => state.updateRequired);\n const statuses = useActiveSession((state) => state.statuses);\n const widgets = useActiveSession((state) => state.widgets);\n const slotProps = usePluginSlotProps(activeId, onOpenContent);\n const tab = useStore(uiStore, (state) => state.dockTab);\n const dockFaces = useDockFaces(activeId).filter(\n (face) => face.requiredMinorMode === undefined || slotProps.activeMinorModes?.includes(face.requiredMinorMode),\n );\n const selectedFace = dockFaces.find((face) => face.id === tab);\n const mcpEnabled = mcp?.snapshot?.enabled === true;\n const resolvedTab =\n tab === 'context' || tab === 'activity' || (tab === 'mcp' && mcpEnabled) || selectedFace !== undefined\n ? tab\n : 'activity';\n const DockPanel = selectedFace?.panel;\n const automaticSelection = autoSelectedDockFace(\n dockFaces,\n { sessionId: activeId, tabId: tabId ?? null },\n automaticFaceKeys,\n );\n const automaticFace = automaticSelection.face;\n const automaticSessionKeys = automaticSelection.keys.sessions;\n const automaticTabKey = automaticSelection.keys.tab;\n const workspaceId = useStore(sessionsStore, (state) =>\n state.activeId === null ? undefined : state.byId[state.activeId]?.summary.workspaceId,\n );\n const compositionSnapshot = useStore(webPluginCompositionStore);\n const compositionState = webPluginMountState(\n activeId === null ? { scope: 'global' } : { scope: 'session', sessionId: activeId, workspaceId: workspaceId ?? '' },\n compositionSnapshot,\n );\n const groups = useActivityGroups(statuses, widgets, activeId);\n const ordinaryGroups = groups.filter((group) => group.placement !== 'bottom');\n const pinnedGroups = groups.filter((group) => group.placement === 'bottom');\n const busy = groups.filter((group) => group.active).length;\n\n useEffect(() => {\n automaticFaceKeys = { sessions: automaticSessionKeys, tab: automaticTabKey };\n if (automaticFace !== undefined) setDockTab(automaticFace.id);\n }, [automaticFace, automaticSessionKeys, automaticTabKey]);\n useEffect(() => {\n if (resolvedTab !== tab) setDockTab(resolvedTab);\n }, [resolvedTab, tab]);\n return (\n <aside\n data-testid=\"activity-dock\"\n className=\"flex w-[min(360px,calc(100vw-48px))] shrink-0 flex-col overflow-hidden border-l border-po-border-soft bg-po-rail sm:w-[360px]\"\n >\n <div className=\"flex h-16 shrink-0 items-end gap-6 border-b border-po-border-soft px-5\">\n <DockTabs contributed={dockFaces} mcpEnabled={mcpEnabled} />\n <span className=\"flex-1\" />\n <Button\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"activity-close\"\n aria-label=\"Hide activity\"\n title=\"Hide activity\"\n onClick={onClose}\n className=\"mb-4 text-po-dim\"\n >\n <CloseIcon aria-hidden className=\"size-3.5\" />\n </Button>\n </div>\n\n {resolvedTab === 'mcp' && mcp !== undefined ? (\n <SessionMcpTools key={activeId} state={mcp} />\n ) : DockPanel !== undefined ? (\n <DockPanel {...slotProps} />\n ) : resolvedTab === 'context' ? (\n <ContextPanel />\n ) : (\n <>\n <div data-testid=\"activity-scroll\" className=\"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4\">\n {scope === undefined ? null : (\n <p data-testid=\"activity-scope\" className=\"px-1 text-sm text-po-dim\">\n {scope}\n </p>\n )}\n {connection?.attach === 'offline' ? (\n <output\n data-testid=\"activity-offline\"\n className={updateRequired ? 'block px-1 text-sm text-po-magenta' : 'block px-1 text-sm text-po-dim'}\n >\n {connection.reason || 'Reconnecting'}\n </output>\n ) : null}\n {compositionState.phase === 'error' ? (\n <div\n data-testid=\"activity-error\"\n role=\"alert\"\n className=\"flex items-center justify-between gap-3 rounded-lg border border-po-border-soft px-4 py-3\"\n >\n <span className=\"text-sm text-po-dim\">Activity failed to load</span>\n <Button\n variant=\"outline\"\n size=\"xs\"\n data-testid=\"activity-retry\"\n onClick={() => void retryWebPluginCompositions().catch((error: unknown) => console.error(error))}\n >\n Retry\n </Button>\n </div>\n ) : null}\n {groups.length === 0 && compositionState.phase === 'loading' ? (\n <Placeholder\n testId=\"activity-loading\"\n title=\"Loading activity\"\n description=\"Loading the package extensions that supervise work.\"\n />\n ) : null}\n {groups.length === 0 && compositionState.phase !== 'loading' && compositionState.phase !== 'error' ? (\n <Placeholder\n testId=\"activity-empty\"\n title=\"Nothing supervised yet\"\n description=\"A package's group appears here once its extension reports in.\"\n />\n ) : null}\n {ordinaryGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n\n <PluginSurface slot={HOST_SLOTS.activity} sessionId={activeId} />\n <PromoPanel />\n </div>\n\n {pinnedGroups.length > 0 ? (\n <div data-testid=\"activity-pinned\" className=\"flex shrink-0 flex-col gap-3 px-4 pb-4\">\n {pinnedGroups.map((group) => (\n <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n ))}\n </div>\n ) : null}\n\n {/* The busy count overlays the footer hint instead of joining the scroll\n column, so it appearing or clearing never shifts the groups. It\n belongs to the activity face only: on the context face it would be\n a number about a list the reader is not looking at. */}\n <div className=\"relative shrink-0\">\n <p className=\"flex gap-2 border-t border-po-border-soft px-5 py-3 text-sm leading-relaxed text-po-dim\">\n <LightbulbIcon aria-hidden className=\"size-3.5 shrink-0\" />\n Each group is rendered by the package that owns it. The session's summary line stands in until that\n package publishes per-run detail.\n </p>\n {busy > 0 ? (\n <div className=\"absolute inset-0 flex items-center border-t border-po-border-soft bg-po-rail px-4\">\n <output\n data-testid=\"activity-busy\"\n className=\"flex flex-1 items-center gap-2 rounded-lg bg-po-tint-yellow px-3 py-2 text-sm text-po-yellow\"\n >\n <LoaderIcon aria-hidden className=\"size-3.5 animate-spin\" />\n {busy} running in the background\n </output>\n </div>\n ) : null}\n </div>\n </>\n )}\n </aside>\n );\n}\n\n/** Plugin group names are lowercase identifiers; the heading reads in sentence case. */\nfunction sentenceCase(name: string): string {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}\n\nfunction Placeholder({ testId, title, description }: { testId: string; title: string; description: string }) {\n return (\n <div\n data-testid={testId}\n className=\"flex flex-col gap-1 rounded-lg border border-dashed border-po-border px-4 py-5\"\n >\n <span className=\"text-base font-semibold text-po-hi\">{title}</span>\n <span className=\"text-sm text-po-dim\">{description}</span>\n </div>\n );\n}\n\n/** Static and decorative: it names what the dock is for and offers no action. */\nfunction PromoPanel() {\n return (\n <div className=\"relative shrink-0 overflow-hidden rounded-lg border border-po-border-soft px-4 pt-3.5 pb-16\">\n <span className=\"flex items-start gap-3\">\n <SparklesIcon aria-hidden className=\"mt-0.5 size-5 shrink-0 text-po-green\" />\n <span className=\"flex flex-col gap-1\">\n <span className=\"text-base font-semibold text-po-hi\">A more capable you</span>\n <span className=\"text-sm text-po-dim\">Agents, tools, and your codebase. All in one place.</span>\n </span>\n </span>\n <svg\n aria-hidden\n viewBox=\"0 0 320 80\"\n preserveAspectRatio=\"none\"\n className=\"absolute inset-x-0 bottom-0 h-16 w-full\"\n >\n <path d=\"M0 50 C60 30 110 70 170 46 S280 18 320 34 V80 H0Z\" className=\"fill-po-tint-green\" />\n <path d=\"M0 64 C70 46 120 78 190 58 S290 44 320 52 V80 H0Z\" className=\"fill-po-edge-green opacity-40\" />\n <path d=\"M0 74 C80 62 150 82 220 70 S300 64 320 68 V80 H0Z\" className=\"fill-po-green opacity-20\" />\n </svg>\n </div>\n );\n}\n\nfunction ActivityGroupView({\n group,\n slotProps,\n}: {\n group: ActivityGroup;\n slotProps: ReturnType<typeof usePluginSlotProps>;\n}) {\n // Plugins without icon metadata get the host's generic mark rather than nothing.\n const GroupIcon = group.icon ?? ActivityIcon;\n const label = sentenceCase(group.name);\n const heading = (\n <>\n <span className=\"min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi\">{label}</span>\n {group.keys ? (\n <Kbd data-testid={`activity-keys-${group.name}`} className=\"bg-po-bg\">\n {group.keys}\n </Kbd>\n ) : null}\n </>\n );\n return (\n <div\n data-testid={`activity-${group.name}`}\n data-active={group.active}\n className=\"flex shrink-0 gap-3 rounded-lg border border-po-border-soft px-4 py-4\"\n >\n {/* One marker per head, carrying the busy colour. */}\n <GroupIcon aria-hidden className={`mt-0.5 size-5 shrink-0 ${group.active ? 'text-po-yellow' : 'text-po-hi'}`} />\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n {/* A group that owns a panel opens it from its own name: the tab is\n temporary, so the tab strip carries it only while the reader is\n using it. Only those headings get a chevron. */}\n {group.transientTab === undefined ? (\n <span className=\"flex min-w-0 items-center gap-2\">{heading}</span>\n ) : (\n <Button\n variant=\"ghost\"\n size=\"xs\"\n data-testid={`activity-open-${group.name}`}\n title={`Open ${group.name}`}\n onClick={() => {\n const tab = group.transientTab?.();\n if (tab !== undefined) slotProps.openTransientTab(tab);\n }}\n className=\"group/heading h-auto min-w-0 justify-start gap-2 px-0 py-0 hover:bg-transparent\"\n >\n {heading}\n <ChevronRightIcon aria-hidden className=\"size-4 shrink-0 text-po-faint group-hover/heading:text-po-dim\" />\n </Button>\n )}\n {slotFills(activityGroupSlot(group.name)).length > 0 ? (\n slotProps.renderSlot(activityGroupSlot(group.name))\n ) : (\n <p\n data-testid={`activity-summary-${group.name}`}\n className={`text-sm first-letter:uppercase ${group.active ? 'text-po-yellow' : 'text-po-dim'}`}\n >\n {group.summary || 'Idle'}\n </p>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,IAAI,oBAAwC;CAAE,UAAU,CAAC;CAAG,KAAK;AAAG;;;;;;;;;;;;;;AAcpE,SAAgB,aAAa,EAC3B,SACA,eACA,KACA,OACA,SAQC;CACD,MAAM,WAAW,SAAS,gBAAgB,UAAU,MAAM,QAAQ;CAClE,MAAM,aAAa,SAAS,gBAAgB,UAC1C,MAAM,aAAa,OAAO,KAAA,IAAY,MAAM,KAAK,MAAM,SACzD;CACA,MAAM,iBAAiB,SAAS,gBAAgB,UAAU,MAAM,cAAc;CAC9E,MAAM,WAAW,kBAAkB,UAAU,MAAM,QAAQ;CAC3D,MAAM,UAAU,kBAAkB,UAAU,MAAM,OAAO;CACzD,MAAM,YAAY,mBAAmB,UAAU,aAAa;CAC5D,MAAM,MAAM,SAAS,UAAU,UAAU,MAAM,OAAO;CACtD,MAAM,YAAY,aAAa,QAAQ,CAAC,CAAC,QACtC,SAAS,KAAK,sBAAsB,KAAA,KAAa,UAAU,kBAAkB,SAAS,KAAK,iBAAiB,CAC/G;CACA,MAAM,eAAe,UAAU,MAAM,SAAS,KAAK,O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,eAAa,iBAAiB,MAAM;IACpC,OAAO,QAAQ,MAAM;IACrB,eAAe;KACb,MAAM,MAAM,MAAM,eAAe;KACjC,IAAI,QAAQ,KAAA,GAAW,UAAU,iBAAiB,GAAG;IACvD;IACA,WAAU;IATZ,UAAA,CAWG,SACD,oBAAC,kBAAD;KAAkB,eAAA;KAAY,WAAU;IAAiE,CAAA,CACnG;GAET,CAAA,GAAA,UAAU,kBAAkB,MAAM,IAAI,CAAC,CAAC,CAAC,SAAS,IACjD,UAAU,WAAW,kBAAkB,MAAM,IAAI,CAAC,IAElD,oBAAC,KAAD;IACE,eAAa,oBAAoB,MAAM;IACvC,WAAW,kCAAkC,MAAM,SAAS,mBAAmB;IAE9E,UAAA,MAAM,WAAW;GACjB,CAAA,CAEF;EACF,CAAA,CAAA;;AAET"}
@@ -94,8 +94,7 @@ const PACKAGED_MINOR_MODES = [
94
94
  modeId: "computer-use",
95
95
  keys: "c e",
96
96
  statusKey: "po-computer-use-mode",
97
- hideWhenMissing: true,
98
- desktopOnly: true
97
+ hideWhenMissing: true
99
98
  }
100
99
  ];
101
100
  /** The declared source a catalog mode corresponds to, by id, id stem, or label. */
@@ -1 +1 @@
1
- {"version":3,"file":"composition.cjs","names":["pluginSelectionAxes","stripAnsi","isDesktopClient","pluginMinorModes","pluginActivityGroups","subscribeWebPluginRegistry","webPluginRegistryRevision","pluginDockFaces","pluginFileLinks","useSyncExternalStore","useCallback"],"sources":["../../../src/web/lib/composition.ts"],"sourcesContent":["import type {\n ActivityGroupContribution,\n DockFaceContribution,\n SelectionAxisContribution,\n TransientTab,\n} from '@agimon-ai/po-core/web';\nimport { useCallback, useSyncExternalStore } from 'react';\n\nimport type { MinorModeProjection, MinorModeRecordProjection } from '../../types/hub';\nimport {\n isDesktopClient,\n pluginActivityGroups,\n pluginDockFaces,\n pluginFileLinks,\n pluginMinorModes,\n pluginSelectionAxes,\n subscribeWebPluginRegistry,\n webPluginRegistryRevision,\n} from './pluginRegistry';\nimport { stripAnsi } from './statusLine';\n\nexport interface SelectionAxis {\n name: string;\n command: string;\n /** The current selections, empty while the session reports none; one at most unless multi. */\n values: string[];\n emptyLabel: string;\n multi: boolean;\n}\n\nconst AXIS_LIST_SEPARATOR = ',';\n\n/**\n * The fallback axis table for the packaged bundle; a synced bundle carries\n * each axis as its owning package's plugin declaration, and the registry\n * list wins whenever any plugin declares one. Exported only so the workspace\n * composition test can hold it equal to what the packages declare.\n */\nexport const PACKAGED_SELECTION_AXES: readonly SelectionAxisContribution[] = [\n { name: 'profile', command: 'profile', statusKey: 'po-profile', emptyLabel: 'no profile', order: 10 },\n { name: 'domains', command: 'domains', statusKey: 'po-domain', emptyLabel: 'no domains', multi: true, order: 20 },\n];\n\n/**\n * The declared axes the session actually offers: an axis whose status key\n * the session never published stays off the bar entirely, which is how a\n * package withholds its axis when there is nothing to select.\n */\nexport function selectionAxes(statuses: Record<string, string>): SelectionAxis[] {\n const declared = pluginSelectionAxes();\n const sources: readonly SelectionAxisContribution[] = declared.length > 0 ? declared : PACKAGED_SELECTION_AXES;\n return sources.flatMap((source) => {\n const raw = statuses[source.statusKey];\n if (raw === undefined) return [];\n const multi = source.multi === true;\n const values = (multi ? stripAnsi(raw).split(AXIS_LIST_SEPARATOR) : [stripAnsi(raw)])\n .map((value) => value.trim())\n .filter(Boolean);\n return [{ name: source.name, command: source.command, values, emptyLabel: source.emptyLabel, multi }];\n });\n}\n\nexport type MinorModeAvailability = 'unavailable' | 'off' | 'on';\n\nexport interface MinorMode {\n name: string;\n /** The catalog id /minor accepts; the display name until the catalog reports. */\n id: string;\n /** Leader Space key path, as the TUI documents it. */\n keys: string;\n availability: MinorModeAvailability;\n /** What the mode itself is reporting while on. */\n detail: string;\n /** Activity group to focus instead of invoking the mode command from the cockpit. */\n activityGroup?: string;\n /**\n * Why the mode cannot be driven from here, in the words of the mode itself.\n * Empty when it can. A mode may be installed and still refuse a cockpit:\n * autonomous voice captures from the terminal's own microphone, which a\n * browser talking to a headless agent does not have.\n */\n unavailableReason: string;\n}\n\nexport interface MinorModeSource {\n name: string;\n /** The catalog mode this row drives, when the runtime registers it under another id. */\n modeId?: string;\n /** Leader Space key path, as the TUI documents it. */\n keys: string;\n /** Activity group to focus instead of invoking the mode command from the cockpit. */\n activityGroup?: string;\n statusKey?: string;\n widgetKey?: string;\n hideWhenMissing?: boolean;\n desktopOnly?: boolean;\n}\n\n/**\n * The fallback minor-mode table for the packaged bundle.\n *\n * A synced bundle carries each mode as its package's own web plugin\n * contribution, and the registry list wins whenever any plugin declares one.\n * This literal survives only so the built-in-only bundle keeps rendering the\n * modes Po ships; help is listed without a signal on purpose: it\n * registers no footer entry, so the cockpit reports it as unavailable rather\n * than guessing it is off. Exported only for the workspace composition test.\n */\nexport const PACKAGED_MINOR_MODES: readonly MinorModeSource[] = [\n { name: 'help', keys: 'h e' },\n { name: 'plan', keys: 'p e', statusKey: 'plan-mode' },\n { name: 'loop', keys: 'l l', statusKey: 'po-loop' },\n { name: 'goal', keys: 'g e', statusKey: 'goal' },\n { name: 'author', keys: 'o a' },\n { name: 'workflow', keys: 'w e', widgetKey: 'workflow-mcp-progress' },\n // `v e` drives autonomous capture, which the runtime registers as 'voice-auto'.\n { name: 'voice', modeId: 'voice-auto', keys: 'v e', statusKey: 'po-voice' },\n {\n name: 'computer use',\n modeId: 'computer-use',\n keys: 'c e',\n statusKey: 'po-computer-use-mode',\n hideWhenMissing: true,\n desktopOnly: true,\n },\n];\n\n/** The declared source a catalog mode corresponds to, by id, id stem, or label. */\nfunction sourceFor(sources: readonly MinorModeSource[], mode: MinorModeRecordProjection): MinorModeSource | undefined {\n const candidates = new Set([mode.id.toLowerCase(), mode.id.toLowerCase().split('.')[0], mode.label.toLowerCase()]);\n return sources.find((source) =>\n [source.name, source.modeId].some((identity) => identity !== undefined && candidates.has(identity.toLowerCase())),\n );\n}\n\n/**\n * Catalog-backed rows: the runtime's own activation state per mode, with the\n * declared leader keys attached where a plugin documents them. Declared modes\n * the catalog does not know are still listed, as unavailable, so a mode that\n * is missing from a composition stays visible rather than silently gone.\n */\nfunction catalogMinorModes(sources: readonly MinorModeSource[], projection: MinorModeProjection): MinorMode[] {\n const rows: MinorMode[] = projection.modes\n .filter((mode) => !sourceFor(sources, mode)?.desktopOnly || isDesktopClient())\n .map((mode) => {\n const source = sourceFor(sources, mode);\n const on = mode.activation === 'active' || mode.activation === 'deactivating';\n // The catalog says per action whether it can run here and why not. A mode\n // with nothing runnable is offered as a row that cannot be clicked rather\n // than one that answers \"no actions available\" after the fact.\n const blocked = mode.actions.length > 0 && mode.actions.every((action) => !action.enabled);\n const reason = blocked ? (mode.actions.find((action) => action.disabledReason)?.disabledReason ?? '') : '';\n return {\n name: source?.name ?? mode.label.toLowerCase(),\n id: mode.id,\n keys: source?.keys ?? '',\n availability: blocked && !on ? 'unavailable' : on ? 'on' : 'off',\n ...(source?.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: mode.detail ?? (mode.activation === 'activating' ? 'activating' : ''),\n unavailableReason: reason,\n };\n });\n const seen = new Set(rows.map((row) => row.name));\n for (const source of sources) {\n if (source.hideWhenMissing === true || (source.desktopOnly && !isDesktopClient())) continue;\n if (!seen.has(source.name)) {\n rows.push({\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: 'unavailable',\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: 'No package in this session registers this mode.',\n });\n }\n }\n return rows;\n}\n\nexport function minorModes(\n statuses: Record<string, string>,\n widgets: readonly string[],\n projection: MinorModeProjection | null = null,\n): MinorMode[] {\n const declared = pluginMinorModes();\n const sources: readonly MinorModeSource[] = declared.length > 0 ? declared : PACKAGED_MINOR_MODES;\n if (projection) return catalogMinorModes(sources, projection);\n return sources.flatMap((source) => {\n if (source.desktopOnly && !isDesktopClient()) return [];\n if (source.statusKey !== undefined) {\n const raw = statuses[source.statusKey];\n if (raw === undefined) {\n if (source.hideWhenMissing === true) return [];\n return [\n {\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: 'unavailable' as const,\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: 'This session has not reported the mode.',\n },\n ];\n }\n const detail = stripAnsi(raw).trim();\n return {\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: detail ? ('on' as const) : ('off' as const),\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail,\n unavailableReason: '',\n };\n }\n if (source.widgetKey !== undefined && widgets.includes(source.widgetKey)) {\n return {\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: 'off' as const,\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: '',\n };\n }\n return {\n name: source.name,\n id: source.name,\n keys: source.keys,\n availability: 'unavailable' as const,\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: 'This session has not reported the mode.',\n };\n });\n}\n\nexport interface ActivityGroup {\n name: string;\n keys: string;\n /** The heading visual its package declares; the dock draws a generic one without it. */\n icon?: ActivityGroupContribution['icon'];\n /** What the publishing extension is reporting, empty when it reports nothing. */\n summary: string;\n active: boolean;\n marksBackgroundWork?: boolean;\n /** The temporary tab the group's name opens, when its package declares one. */\n transientTab?: () => TransientTab;\n /** Keeps the group visible below the dock's scrolling ordinary groups. */\n placement?: 'bottom';\n}\n\n/** Subscribe to package-owned activity sources, rewiring when the focused composition changes. */\nexport function subscribeActivitySources(listener: () => void): () => void {\n let subscriptions: (() => void)[] = [];\n const unsubscribeSources = (): void => {\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions = [];\n };\n const subscribeSources = (): void => {\n subscriptions = pluginActivityGroups().flatMap((source) =>\n source.activeSource === undefined ? [] : [source.activeSource.subscribe(listener)],\n );\n };\n subscribeSources();\n const unsubscribeRegistry = subscribeWebPluginRegistry(() => {\n unsubscribeSources();\n subscribeSources();\n listener();\n });\n return () => {\n unsubscribeRegistry();\n unsubscribeSources();\n };\n}\n\nfunction activitySourceFingerprint(sessionId: string | null): string {\n const activeSources = pluginActivityGroups()\n .map((source) => (source.activeSource?.isActive(sessionId) === true ? '1' : '0'))\n .join('');\n return `${webPluginRegistryRevision()}:${activeSources}`;\n}\n\n/**\n * The groups available in this plugin composition. Status and widget signals\n * reveal legacy groups. A package-owned active source also reveals its group,\n * including while idle, so the section can remain a stable launcher unless it\n * opts into `hideWhenEmpty`.\n *\n * A group that declared `hideWhenEmpty` goes away once its session stops\n * reporting. Clearing a status reaches the page as an empty string rather than\n * an absent key, because the same map tells the selection bar which minor modes\n * exist and an absent key means \"not reported\" there. Emptiness is read here,\n * where only the dock is looking.\n */\nexport function activityGroups(\n statuses: Record<string, string>,\n widgets: readonly string[],\n sessionId: string | null = null,\n): ActivityGroup[] {\n const groups: ActivityGroup[] = [];\n for (const source of pluginActivityGroups()) {\n const tab = source.transientTab === undefined ? {} : { transientTab: source.transientTab };\n const placement = {\n ...(source.placement === undefined ? {} : { placement: source.placement }),\n ...(source.marksBackgroundWork === false ? { marksBackgroundWork: false } : {}),\n ...(source.icon === undefined ? {} : { icon: source.icon }),\n };\n if (source.statusKey !== undefined && statuses[source.statusKey] !== undefined) {\n const summary = stripAnsi(statuses[source.statusKey] ?? '').trim();\n const active =\n source.activeSource?.isActive(sessionId) ?? (source.marksBackgroundWork !== false && summary.length > 0);\n if (summary.length === 0 && source.hideWhenEmpty === true && !active) continue;\n groups.push({ name: source.name, keys: source.keys, summary, active, ...tab, ...placement });\n continue;\n }\n if (source.widgetKeys !== undefined && source.widgetKeys.some((key) => widgets.includes(key))) {\n const activeKeys = source.activeWidgetKeys ?? source.widgetKeys;\n const active =\n source.activeSource?.isActive(sessionId) ??\n (source.marksBackgroundWork !== false && activeKeys.some((key) => widgets.includes(key)));\n groups.push({ name: source.name, keys: source.keys, summary: '', active, ...tab, ...placement });\n continue;\n }\n if (source.activeSource !== undefined) {\n const active = source.activeSource.isActive(sessionId);\n if (source.hideWhenEmpty === true && !active) continue;\n groups.push({\n name: source.name,\n keys: source.keys,\n summary: '',\n active,\n ...tab,\n ...placement,\n });\n }\n }\n return groups;\n}\n\n/** Dock faces update when the active session composition changes. */\nexport function useDockFaces(sessionId: string | null): readonly DockFaceContribution[] {\n useSyncExternalStore(subscribeWebPluginRegistry, webPluginRegistryRevision, webPluginRegistryRevision);\n const subscribe = (listener: () => void) => {\n const releases = pluginDockFaces().flatMap((face) =>\n face.visibility ? [face.visibility.subscribe(listener)] : [],\n );\n return () => releases.forEach((release) => release());\n };\n const snapshot = () =>\n pluginDockFaces()\n .map((face) => (face.visibility?.isVisible(sessionId) !== false ? '1' : '0'))\n .join('');\n useSyncExternalStore(subscribe, snapshot, snapshot);\n return pluginDockFaces().filter((face) => face.visibility?.isVisible(sessionId) !== false);\n}\n\nexport interface DockAutoSelectKeys {\n /** Every session face already chosen, so returning to a session leaves the user's pick alone. */\n sessions: readonly string[];\n /** The last tab face chosen, so only entering a matching tab selects it again. */\n tab: string;\n}\n\n/** Chooses the first newly eligible tab face, then the first session face not yet chosen. */\nexport function autoSelectedDockFace(\n faces: readonly DockFaceContribution[],\n context: { sessionId: string | null; tabId: string | null },\n previous: DockAutoSelectKeys,\n): { face: DockFaceContribution | undefined; keys: DockAutoSelectKeys } {\n const sessionFace = faces.find((face) => face.autoSelect === true);\n const tabFace = faces.find((face) => typeof face.autoSelect === 'function' && face.autoSelect(context));\n const sessionKey = sessionFace === undefined ? '' : `${context.sessionId}:${sessionFace.id}`;\n const freshSession = sessionKey !== '' && !previous.sessions.includes(sessionKey);\n const keys = {\n sessions: freshSession ? [...previous.sessions, sessionKey] : previous.sessions,\n tab: tabFace === undefined ? '' : `${context.sessionId}:${context.tabId}:${tabFace.id}`,\n };\n const face = tabFace !== undefined && keys.tab !== previous.tab ? tabFace : freshSession ? sessionFace : undefined;\n return { face, keys };\n}\n\n/** Activity groups that update when either host signals or a plugin's session store changes. */\nexport function useActivityGroups(\n statuses: Record<string, string>,\n widgets: readonly string[],\n sessionId: string | null,\n): ActivityGroup[] {\n useSyncExternalStore(\n subscribeActivitySources,\n () => activitySourceFingerprint(sessionId),\n () => activitySourceFingerprint(sessionId),\n );\n return activityGroups(statuses, widgets, sessionId);\n}\n\n/** The tab one path opens, or undefined when no installed plugin recognises it. */\nexport type FileLinkResolver = (path: string) => TransientTab | undefined;\n\ninterface FileLinkModes {\n active(sessionId: string | null): readonly string[];\n subscribe(sessionId: string | null, listener: () => void): () => void;\n}\nlet fileLinkModes: FileLinkModes | undefined;\nconst modeBindings = new Set<() => void>();\n\n/** Binds host session facts without making the composition library own session state. */\nexport function bindFileLinkModes(source: FileLinkModes): () => void {\n fileLinkModes = source;\n modeBindings.forEach((listener) => listener());\n return () => {\n if (fileLinkModes !== source) return;\n fileLinkModes = undefined;\n modeBindings.forEach((listener) => listener());\n };\n}\nfunction subscribeFileLinks(sessionId: string | null, listener: () => void): () => void {\n let unsubscribeModes = fileLinkModes?.subscribe(sessionId, listener);\n const rebindModes = () => {\n unsubscribeModes?.();\n unsubscribeModes = fileLinkModes?.subscribe(sessionId, listener);\n listener();\n };\n modeBindings.add(rebindModes);\n let subscriptions: (() => void)[] = [];\n const unsubscribeSources = (): void => {\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions = [];\n };\n const subscribeSources = (): void => {\n subscriptions = pluginFileLinks().map((source) => source.subscribe(listener));\n };\n subscribeSources();\n const unsubscribeRegistry = subscribeWebPluginRegistry(() => {\n unsubscribeSources();\n subscribeSources();\n listener();\n });\n return () => {\n modeBindings.delete(rebindModes);\n unsubscribeModes?.();\n unsubscribeRegistry();\n unsubscribeSources();\n };\n}\n\nfunction activeFileLinkSources(sessionId: string | null) {\n const enabled = new Set(fileLinkModes?.active(sessionId) ?? []);\n return pluginFileLinks(sessionId).filter(\n (source) => source.requiredMinorMode === undefined || enabled.has(source.requiredMinorMode),\n );\n}\n\nfunction fileLinkFingerprint(sessionId: string | null): string {\n const sourceFingerprints = activeFileLinkSources(sessionId)\n .map((source) => `${source.requiredMinorMode ?? ''}:${source.fingerprint(sessionId)}`)\n .join('\\n');\n return `${webPluginRegistryRevision()}:${sourceFingerprints}`;\n}\n\n/**\n * The tab a path opens, from the first source that claims it.\n *\n * A path no source claims is not a link. The host cannot tell a file name from\n * a class name, and the plugin that tracks the session's files can, so the\n * decision belongs there rather than in a heuristic here.\n */\nexport function fileLinkFor(sessionId: string | null, path: string): TransientTab | undefined {\n for (const source of activeFileLinkSources(sessionId)) {\n const tab = source.resolve(sessionId, path);\n if (tab !== undefined) return tab;\n }\n return undefined;\n}\n\n/**\n * The tab a path the caller is sure about opens: a tool call's path argument,\n * not a token spotted in prose.\n *\n * A source that offers `openPath` answers here, and it may claim a file the\n * session never changed, which `resolve` deliberately will not. Sources\n * without it fall back to the same guess prose gets.\n */\nexport function fileTabForPath(sessionId: string | null, path: string): TransientTab | undefined {\n for (const source of activeFileLinkSources(sessionId)) {\n const tab = source.openPath?.(sessionId, path) ?? source.resolve(sessionId, path);\n if (tab !== undefined) return tab;\n }\n return undefined;\n}\n/**\n * Resolves the paths a message names against the plugins that track them.\n *\n * The resolver's identity is stable while the linkable set is, so a component\n * that hands it to a renderer does not rebuild that renderer on every frame of\n * a streaming reply.\n */\nexport function useFileLinks(sessionId: string | null): FileLinkResolver {\n const fingerprint = useSyncExternalStore(\n useCallback((listener: () => void) => subscribeFileLinks(sessionId, listener), [sessionId]),\n () => fileLinkFingerprint(sessionId),\n () => fileLinkFingerprint(sessionId),\n );\n return useCallback(\n (path: string) => fileLinkFor(sessionId, path),\n // The fingerprint is the dependency: the same path resolves differently\n // once the session's set of tracked files changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- fingerprint is a deliberate identity buster, not a value the callback reads.\n [sessionId, fingerprint],\n );\n}\n"],"mappings":";;;;AA8BA,MAAM,sBAAsB;;;;;;;AAQ5B,MAAa,0BAAgE,CAC3E;CAAE,MAAM;CAAW,SAAS;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ACxD,KAAK,WAAW,GAAG,OAAO,qBAAqB,GAAG,GAAG,OAAO,YAAY,SAAS,GAAG,CAAC,CACrF,KAAK,IAAI;CACZ,OAAO,GAAGF,uBAAAA,0BAA0B,EAAE,GAAG;AAC3C;;;;;;;;AASA,SAAgB,YAAY,WAA0B,MAAwC;CAC5F,KAAK,MAAM,UAAU,sBAAsB,SAAS,GAAG;EACrD,MAAM,MAAM,OAAO,QAAQ,WAAW,IAAI;EAC1C,IAAI,QAAQ,KAAA,GAAW,OAAO;CAChC;AAEF;;;;;;;;;AAUA,SAAgB,eAAe,WAA0B,MAAwC;CAC/F,KAAK,MAAM,UAAU,sBAAsB,SAAS,GAAG;EACrD,MAAM,MAAM,OAAO,WAAW,WAAW,IAAI,KAAK,OAAO,QAAQ,WAAW,IAAI;EAChF,IAAI,QAAQ,KAAA,GAAW,OAAO;CAChC;AAEF;;;;;;;;AAQA,SAAgB,aAAa,WAA4C;CACvE,MAAM,eAAA,GAAcG,MAAAA,qBAAAA,EAAAA,GAClBC,MAAAA,YAAAA,EAAa,aAAyB,mBAAmB,WAAW,QAAQ,GAAG,CAAC,SAAS,CAAC,SACpF,oBAAoB,SAAS,SAC7B,oBAAoB,SAAS,CACrC;CACA,QAAA,GAAOA,MAAAA,YAAAA,EACJ,SAAiB,YAAY,WAAW,IAAI,GAI7C,CAAC,WAAW,WAAW,CACzB;AACF"}
1
+ {"version":3,"file":"composition.cjs","names":["pluginSelectionAxes","stripAnsi","isDesktopClient","pluginMinorModes","pluginActivityGroups","subscribeWebPluginRegistry","webPluginRegistryRevision","pluginDockFaces","pluginFileLinks","useSyncExternalStore","useCallback"],"sources":["../../../src/web/lib/composition.ts"],"sourcesContent":["import type {\n ActivityGroupContribution,\n DockFaceContribution,\n SelectionAxisContribution,\n TransientTab,\n} from '@agimon-ai/po-core/web';\nimport { useCallback, useSyncExternalStore } from 'react';\n\nimport type { MinorModeProjection, MinorModeRecordProjection } from '../../types/hub';\nimport {\n isDesktopClient,\n pluginActivityGroups,\n pluginDockFaces,\n pluginFileLinks,\n pluginMinorModes,\n pluginSelectionAxes,\n subscribeWebPluginRegistry,\n webPluginRegistryRevision,\n} from './pluginRegistry';\nimport { stripAnsi } from './statusLine';\n\nexport interface SelectionAxis {\n name: string;\n command: string;\n /** The current selections, empty while the session reports none; one at most unless multi. */\n values: string[];\n emptyLabel: string;\n multi: boolean;\n}\n\nconst AXIS_LIST_SEPARATOR = ',';\n\n/**\n * The fallback axis table for the packaged bundle; a synced bundle carries\n * each axis as its owning package's plugin declaration, and the registry\n * list wins whenever any plugin declares one. Exported only so the workspace\n * composition test can hold it equal to what the packages declare.\n */\nexport const PACKAGED_SELECTION_AXES: readonly SelectionAxisContribution[] = [\n { name: 'profile', command: 'profile', statusKey: 'po-profile', emptyLabel: 'no profile', order: 10 },\n { name: 'domains', command: 'domains', statusKey: 'po-domain', emptyLabel: 'no domains', multi: true, order: 20 },\n];\n\n/**\n * The declared axes the session actually offers: an axis whose status key\n * the session never published stays off the bar entirely, which is how a\n * package withholds its axis when there is nothing to select.\n */\nexport function selectionAxes(statuses: Record<string, string>): SelectionAxis[] {\n const declared = pluginSelectionAxes();\n const sources: readonly SelectionAxisContribution[] = declared.length > 0 ? declared : PACKAGED_SELECTION_AXES;\n return sources.flatMap((source) => {\n const raw = statuses[source.statusKey];\n if (raw === undefined) return [];\n const multi = source.multi === true;\n const values = (multi ? stripAnsi(raw).split(AXIS_LIST_SEPARATOR) : [stripAnsi(raw)])\n .map((value) => value.trim())\n .filter(Boolean);\n return [{ name: source.name, command: source.command, values, emptyLabel: source.emptyLabel, multi }];\n });\n}\n\nexport type MinorModeAvailability = 'unavailable' | 'off' | 'on';\n\nexport interface MinorMode {\n name: string;\n /** The catalog id /minor accepts; the display name until the catalog reports. */\n id: string;\n /** Leader Space key path, as the TUI documents it. */\n keys: string;\n availability: MinorModeAvailability;\n /** What the mode itself is reporting while on. */\n detail: string;\n /** Activity group to focus instead of invoking the mode command from the cockpit. */\n activityGroup?: string;\n /**\n * Why the mode cannot be driven from here, in the words of the mode itself.\n * Empty when it can. A mode may be installed and still refuse a cockpit:\n * autonomous voice captures from the terminal's own microphone, which a\n * browser talking to a headless agent does not have.\n */\n unavailableReason: string;\n}\n\nexport interface MinorModeSource {\n name: string;\n /** The catalog mode this row drives, when the runtime registers it under another id. */\n modeId?: string;\n /** Leader Space key path, as the TUI documents it. */\n keys: string;\n /** Activity group to focus instead of invoking the mode command from the cockpit. */\n activityGroup?: string;\n statusKey?: string;\n widgetKey?: string;\n hideWhenMissing?: boolean;\n desktopOnly?: boolean;\n}\n\n/**\n * The fallback minor-mode table for the packaged bundle.\n *\n * A synced bundle carries each mode as its package's own web plugin\n * contribution, and the registry list wins whenever any plugin declares one.\n * This literal survives only so the built-in-only bundle keeps rendering the\n * modes Po ships; help is listed without a signal on purpose: it\n * registers no footer entry, so the cockpit reports it as unavailable rather\n * than guessing it is off. Exported only for the workspace composition test.\n */\nexport const PACKAGED_MINOR_MODES: readonly MinorModeSource[] = [\n { name: 'help', keys: 'h e' },\n { name: 'plan', keys: 'p e', statusKey: 'plan-mode' },\n { name: 'loop', keys: 'l l', statusKey: 'po-loop' },\n { name: 'goal', keys: 'g e', statusKey: 'goal' },\n { name: 'author', keys: 'o a' },\n { name: 'workflow', keys: 'w e', widgetKey: 'workflow-mcp-progress' },\n // `v e` drives autonomous capture, which the runtime registers as 'voice-auto'.\n { name: 'voice', modeId: 'voice-auto', keys: 'v e', statusKey: 'po-voice' },\n {\n name: 'computer use',\n modeId: 'computer-use',\n keys: 'c e',\n statusKey: 'po-computer-use-mode',\n hideWhenMissing: true,\n },\n];\n\n/** The declared source a catalog mode corresponds to, by id, id stem, or label. */\nfunction sourceFor(sources: readonly MinorModeSource[], mode: MinorModeRecordProjection): MinorModeSource | undefined {\n const candidates = new Set([mode.id.toLowerCase(), mode.id.toLowerCase().split('.')[0], mode.label.toLowerCase()]);\n return sources.find((source) =>\n [source.name, source.modeId].some((identity) => identity !== undefined && candidates.has(identity.toLowerCase())),\n );\n}\n\n/**\n * Catalog-backed rows: the runtime's own activation state per mode, with the\n * declared leader keys attached where a plugin documents them. Declared modes\n * the catalog does not know are still listed, as unavailable, so a mode that\n * is missing from a composition stays visible rather than silently gone.\n */\nfunction catalogMinorModes(sources: readonly MinorModeSource[], projection: MinorModeProjection): MinorMode[] {\n const rows: MinorMode[] = projection.modes\n .filter((mode) => !sourceFor(sources, mode)?.desktopOnly || isDesktopClient())\n .map((mode) => {\n const source = sourceFor(sources, mode);\n const on = mode.activation === 'active' || mode.activation === 'deactivating';\n // The catalog says per action whether it can run here and why not. A mode\n // with nothing runnable is offered as a row that cannot be clicked rather\n // than one that answers \"no actions available\" after the fact.\n const blocked = mode.actions.length > 0 && mode.actions.every((action) => !action.enabled);\n const reason = blocked ? (mode.actions.find((action) => action.disabledReason)?.disabledReason ?? '') : '';\n return {\n name: source?.name ?? mode.label.toLowerCase(),\n id: mode.id,\n keys: source?.keys ?? '',\n availability: blocked && !on ? 'unavailable' : on ? 'on' : 'off',\n ...(source?.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: mode.detail ?? (mode.activation === 'activating' ? 'activating' : ''),\n unavailableReason: reason,\n };\n });\n const seen = new Set(rows.map((row) => row.name));\n for (const source of sources) {\n if (source.hideWhenMissing === true || (source.desktopOnly && !isDesktopClient())) continue;\n if (!seen.has(source.name)) {\n rows.push({\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: 'unavailable',\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: 'No package in this session registers this mode.',\n });\n }\n }\n return rows;\n}\n\nexport function minorModes(\n statuses: Record<string, string>,\n widgets: readonly string[],\n projection: MinorModeProjection | null = null,\n): MinorMode[] {\n const declared = pluginMinorModes();\n const sources: readonly MinorModeSource[] = declared.length > 0 ? declared : PACKAGED_MINOR_MODES;\n if (projection) return catalogMinorModes(sources, projection);\n return sources.flatMap((source) => {\n if (source.desktopOnly && !isDesktopClient()) return [];\n if (source.statusKey !== undefined) {\n const raw = statuses[source.statusKey];\n if (raw === undefined) {\n if (source.hideWhenMissing === true) return [];\n return [\n {\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: 'unavailable' as const,\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: 'This session has not reported the mode.',\n },\n ];\n }\n const detail = stripAnsi(raw).trim();\n return {\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: detail ? ('on' as const) : ('off' as const),\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail,\n unavailableReason: '',\n };\n }\n if (source.widgetKey !== undefined && widgets.includes(source.widgetKey)) {\n return {\n name: source.name,\n id: source.modeId ?? source.name,\n keys: source.keys,\n availability: 'off' as const,\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: '',\n };\n }\n return {\n name: source.name,\n id: source.name,\n keys: source.keys,\n availability: 'unavailable' as const,\n ...(source.activityGroup === undefined ? {} : { activityGroup: source.activityGroup }),\n detail: '',\n unavailableReason: 'This session has not reported the mode.',\n };\n });\n}\n\nexport interface ActivityGroup {\n name: string;\n keys: string;\n /** The heading visual its package declares; the dock draws a generic one without it. */\n icon?: ActivityGroupContribution['icon'];\n /** What the publishing extension is reporting, empty when it reports nothing. */\n summary: string;\n active: boolean;\n marksBackgroundWork?: boolean;\n /** The temporary tab the group's name opens, when its package declares one. */\n transientTab?: () => TransientTab;\n /** Keeps the group visible below the dock's scrolling ordinary groups. */\n placement?: 'bottom';\n}\n\n/** Subscribe to package-owned activity sources, rewiring when the focused composition changes. */\nexport function subscribeActivitySources(listener: () => void): () => void {\n let subscriptions: (() => void)[] = [];\n const unsubscribeSources = (): void => {\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions = [];\n };\n const subscribeSources = (): void => {\n subscriptions = pluginActivityGroups().flatMap((source) =>\n source.activeSource === undefined ? [] : [source.activeSource.subscribe(listener)],\n );\n };\n subscribeSources();\n const unsubscribeRegistry = subscribeWebPluginRegistry(() => {\n unsubscribeSources();\n subscribeSources();\n listener();\n });\n return () => {\n unsubscribeRegistry();\n unsubscribeSources();\n };\n}\n\nfunction activitySourceFingerprint(sessionId: string | null): string {\n const activeSources = pluginActivityGroups()\n .map((source) => (source.activeSource?.isActive(sessionId) === true ? '1' : '0'))\n .join('');\n return `${webPluginRegistryRevision()}:${activeSources}`;\n}\n\n/**\n * The groups available in this plugin composition. Status and widget signals\n * reveal legacy groups. A package-owned active source also reveals its group,\n * including while idle, so the section can remain a stable launcher unless it\n * opts into `hideWhenEmpty`.\n *\n * A group that declared `hideWhenEmpty` goes away once its session stops\n * reporting. Clearing a status reaches the page as an empty string rather than\n * an absent key, because the same map tells the selection bar which minor modes\n * exist and an absent key means \"not reported\" there. Emptiness is read here,\n * where only the dock is looking.\n */\nexport function activityGroups(\n statuses: Record<string, string>,\n widgets: readonly string[],\n sessionId: string | null = null,\n): ActivityGroup[] {\n const groups: ActivityGroup[] = [];\n for (const source of pluginActivityGroups()) {\n const tab = source.transientTab === undefined ? {} : { transientTab: source.transientTab };\n const placement = {\n ...(source.placement === undefined ? {} : { placement: source.placement }),\n ...(source.marksBackgroundWork === false ? { marksBackgroundWork: false } : {}),\n ...(source.icon === undefined ? {} : { icon: source.icon }),\n };\n if (source.statusKey !== undefined && statuses[source.statusKey] !== undefined) {\n const summary = stripAnsi(statuses[source.statusKey] ?? '').trim();\n const active =\n source.activeSource?.isActive(sessionId) ?? (source.marksBackgroundWork !== false && summary.length > 0);\n if (summary.length === 0 && source.hideWhenEmpty === true && !active) continue;\n groups.push({ name: source.name, keys: source.keys, summary, active, ...tab, ...placement });\n continue;\n }\n if (source.widgetKeys !== undefined && source.widgetKeys.some((key) => widgets.includes(key))) {\n const activeKeys = source.activeWidgetKeys ?? source.widgetKeys;\n const active =\n source.activeSource?.isActive(sessionId) ??\n (source.marksBackgroundWork !== false && activeKeys.some((key) => widgets.includes(key)));\n groups.push({ name: source.name, keys: source.keys, summary: '', active, ...tab, ...placement });\n continue;\n }\n if (source.activeSource !== undefined) {\n const active = source.activeSource.isActive(sessionId);\n if (source.hideWhenEmpty === true && !active) continue;\n groups.push({\n name: source.name,\n keys: source.keys,\n summary: '',\n active,\n ...tab,\n ...placement,\n });\n }\n }\n return groups;\n}\n\n/** Dock faces update when the active session composition changes. */\nexport function useDockFaces(sessionId: string | null): readonly DockFaceContribution[] {\n useSyncExternalStore(subscribeWebPluginRegistry, webPluginRegistryRevision, webPluginRegistryRevision);\n const subscribe = (listener: () => void) => {\n const releases = pluginDockFaces().flatMap((face) =>\n face.visibility ? [face.visibility.subscribe(listener)] : [],\n );\n return () => releases.forEach((release) => release());\n };\n const snapshot = () =>\n pluginDockFaces()\n .map((face) => (face.visibility?.isVisible(sessionId) !== false ? '1' : '0'))\n .join('');\n useSyncExternalStore(subscribe, snapshot, snapshot);\n return pluginDockFaces().filter((face) => face.visibility?.isVisible(sessionId) !== false);\n}\n\nexport interface DockAutoSelectKeys {\n /** Every session face already chosen, so returning to a session leaves the user's pick alone. */\n sessions: readonly string[];\n /** The last tab face chosen, so only entering a matching tab selects it again. */\n tab: string;\n}\n\n/** Chooses the first newly eligible tab face, then the first session face not yet chosen. */\nexport function autoSelectedDockFace(\n faces: readonly DockFaceContribution[],\n context: { sessionId: string | null; tabId: string | null },\n previous: DockAutoSelectKeys,\n): { face: DockFaceContribution | undefined; keys: DockAutoSelectKeys } {\n const sessionFace = faces.find((face) => face.autoSelect === true);\n const tabFace = faces.find((face) => typeof face.autoSelect === 'function' && face.autoSelect(context));\n const sessionKey = sessionFace === undefined ? '' : `${context.sessionId}:${sessionFace.id}`;\n const freshSession = sessionKey !== '' && !previous.sessions.includes(sessionKey);\n const keys = {\n sessions: freshSession ? [...previous.sessions, sessionKey] : previous.sessions,\n tab: tabFace === undefined ? '' : `${context.sessionId}:${context.tabId}:${tabFace.id}`,\n };\n const face = tabFace !== undefined && keys.tab !== previous.tab ? tabFace : freshSession ? sessionFace : undefined;\n return { face, keys };\n}\n\n/** Activity groups that update when either host signals or a plugin's session store changes. */\nexport function useActivityGroups(\n statuses: Record<string, string>,\n widgets: readonly string[],\n sessionId: string | null,\n): ActivityGroup[] {\n useSyncExternalStore(\n subscribeActivitySources,\n () => activitySourceFingerprint(sessionId),\n () => activitySourceFingerprint(sessionId),\n );\n return activityGroups(statuses, widgets, sessionId);\n}\n\n/** The tab one path opens, or undefined when no installed plugin recognises it. */\nexport type FileLinkResolver = (path: string) => TransientTab | undefined;\n\ninterface FileLinkModes {\n active(sessionId: string | null): readonly string[];\n subscribe(sessionId: string | null, listener: () => void): () => void;\n}\nlet fileLinkModes: FileLinkModes | undefined;\nconst modeBindings = new Set<() => void>();\n\n/** Binds host session facts without making the composition library own session state. */\nexport function bindFileLinkModes(source: FileLinkModes): () => void {\n fileLinkModes = source;\n modeBindings.forEach((listener) => listener());\n return () => {\n if (fileLinkModes !== source) return;\n fileLinkModes = undefined;\n modeBindings.forEach((listener) => listener());\n };\n}\nfunction subscribeFileLinks(sessionId: string | null, listener: () => void): () => void {\n let unsubscribeModes = fileLinkModes?.subscribe(sessionId, listener);\n const rebindModes = () => {\n unsubscribeModes?.();\n unsubscribeModes = fileLinkModes?.subscribe(sessionId, listener);\n listener();\n };\n modeBindings.add(rebindModes);\n let subscriptions: (() => void)[] = [];\n const unsubscribeSources = (): void => {\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions = [];\n };\n const subscribeSources = (): void => {\n subscriptions = pluginFileLinks().map((source) => source.subscribe(listener));\n };\n subscribeSources();\n const unsubscribeRegistry = subscribeWebPluginRegistry(() => {\n unsubscribeSources();\n subscribeSources();\n listener();\n });\n return () => {\n modeBindings.delete(rebindModes);\n unsubscribeModes?.();\n unsubscribeRegistry();\n unsubscribeSources();\n };\n}\n\nfunction activeFileLinkSources(sessionId: string | null) {\n const enabled = new Set(fileLinkModes?.active(sessionId) ?? []);\n return pluginFileLinks(sessionId).filter(\n (source) => source.requiredMinorMode === undefined || enabled.has(source.requiredMinorMode),\n );\n}\n\nfunction fileLinkFingerprint(sessionId: string | null): string {\n const sourceFingerprints = activeFileLinkSources(sessionId)\n .map((source) => `${source.requiredMinorMode ?? ''}:${source.fingerprint(sessionId)}`)\n .join('\\n');\n return `${webPluginRegistryRevision()}:${sourceFingerprints}`;\n}\n\n/**\n * The tab a path opens, from the first source that claims it.\n *\n * A path no source claims is not a link. The host cannot tell a file name from\n * a class name, and the plugin that tracks the session's files can, so the\n * decision belongs there rather than in a heuristic here.\n */\nexport function fileLinkFor(sessionId: string | null, path: string): TransientTab | undefined {\n for (const source of activeFileLinkSources(sessionId)) {\n const tab = source.resolve(sessionId, path);\n if (tab !== undefined) return tab;\n }\n return undefined;\n}\n\n/**\n * The tab a path the caller is sure about opens: a tool call's path argument,\n * not a token spotted in prose.\n *\n * A source that offers `openPath` answers here, and it may claim a file the\n * session never changed, which `resolve` deliberately will not. Sources\n * without it fall back to the same guess prose gets.\n */\nexport function fileTabForPath(sessionId: string | null, path: string): TransientTab | undefined {\n for (const source of activeFileLinkSources(sessionId)) {\n const tab = source.openPath?.(sessionId, path) ?? source.resolve(sessionId, path);\n if (tab !== undefined) return tab;\n }\n return undefined;\n}\n/**\n * Resolves the paths a message names against the plugins that track them.\n *\n * The resolver's identity is stable while the linkable set is, so a component\n * that hands it to a renderer does not rebuild that renderer on every frame of\n * a streaming reply.\n */\nexport function useFileLinks(sessionId: string | null): FileLinkResolver {\n const fingerprint = useSyncExternalStore(\n useCallback((listener: () => void) => subscribeFileLinks(sessionId, listener), [sessionId]),\n () => fileLinkFingerprint(sessionId),\n () => fileLinkFingerprint(sessionId),\n );\n return useCallback(\n (path: string) => fileLinkFor(sessionId, path),\n // The fingerprint is the dependency: the same path resolves differently\n // once the session's set of tracked files changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- fingerprint is a deliberate identity buster, not a value the callback reads.\n [sessionId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EAEA;;EAEA;EACA;EACA;EACA;EACA;;;;;;;;;;;;qBAaW,+BAA+B;wBAwE5B,WACd,UAAU,wBACV,4BACA,aAAY,6BACX;iBAwDc;EACf;EACA;;EAEA,OAAO;;EAEP;EACA;EACA;;EAEA,qBAAqB;;EAErB;;;wBAIc,yBAAyB;;;;;;;;;;;;;wBA0CzB,eACd,UAAU,wBACV,4BACA,4BACC;;wBA0Ca,aAAa,oCAAoC;iBAgBhD;;EAEf;;EAEA;;;wBAIc,qBACd,gBAAgB,wBAChB;EAAW;EAA0B;GACrC,UAAU;EACP,MAAM;EAAkC,MAAM;;;wBAcnC,kBACd,UAAU,wBACV,4BACA,2BACC;;YAUS,oBAAoB,iBAAiB;UAEvC;EACR,OAAO;EACP,UAAU,0BAA0B;;;wBAMtB,kBAAkB,QAAQ;;;;;;;;wBA4D1B,YAAY,0BAA0B,eAAe;;;;;;;;;wBAgBrD,eAAe,0BAA0B,eAAe;;;;;;;;wBAcxD,aAAa,2BAA2B"}
1
+ {"version":3,"file":"composition.d.mts","names":[],"sources":["../../../src/web/lib/composition.ts"],"mappings":";;;iBAqBiB;EACf;EACA;;EAEA;EACA;EACA;;;;;;;;qBAWW,kCAAkC;;;;;;wBAU/B,cAAc,UAAU,yBAAyB;YAcrD;iBAEK;EACf;;EAEA;;EAEA;EACA,cAAc;;EAEd;;EAEA;;;;;;;EAOA;;iBAGe;EACf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;EACA;;;;;;;;;;;;qBAaW,+BAA+B;wBAuE5B,WACd,UAAU,wBACV,4BACA,aAAY,6BACX;iBAwDc;EACf;EACA;;EAEA,OAAO;;EAEP;EACA;EACA;;EAEA,qBAAqB;;EAErB;;;wBAIc,yBAAyB;;;;;;;;;;;;;wBA0CzB,eACd,UAAU,wBACV,4BACA,4BACC;;wBA0Ca,aAAa,oCAAoC;iBAgBhD;;EAEf;;EAEA;;;wBAIc,qBACd,gBAAgB,wBAChB;EAAW;EAA0B;GACrC,UAAU;EACP,MAAM;EAAkC,MAAM;;;wBAcnC,kBACd,UAAU,wBACV,4BACA,2BACC;;YAUS,oBAAoB,iBAAiB;UAEvC;EACR,OAAO;EACP,UAAU,0BAA0B;;;wBAMtB,kBAAkB,QAAQ;;;;;;;;wBA4D1B,YAAY,0BAA0B,eAAe;;;;;;;;;wBAgBrD,eAAe,0BAA0B,eAAe;;;;;;;;wBAcxD,aAAa,2BAA2B"}