@agimon-ai/po-web-dashboard 0.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +29 -0
- package/README.md +10 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/core.cjs +222 -0
- package/dist/core.d.mts +21 -0
- package/dist/core.mjs +21 -0
- package/dist/index.cjs +546 -0
- package/dist/index.d.mts +81 -0
- package/dist/index.mjs +81 -0
- package/dist/testing.cjs +18 -0
- package/dist/testing.d.mts +6 -0
- package/dist/testing.mjs +6 -0
- package/dist/types/auth.cjs +20 -0
- package/dist/types/auth.cjs.map +1 -0
- package/dist/types/auth.d.mts +160 -0
- package/dist/types/auth.d.mts.map +1 -0
- package/dist/types/auth.mjs +19 -0
- package/dist/types/auth.mjs.map +1 -0
- package/dist/types/bridge.d.mts +18 -0
- package/dist/types/bridge.d.mts.map +1 -0
- package/dist/types/devProxy.cjs +41 -0
- package/dist/types/devProxy.cjs.map +1 -0
- package/dist/types/devProxy.d.mts +54 -0
- package/dist/types/devProxy.d.mts.map +1 -0
- package/dist/types/devProxy.mjs +39 -0
- package/dist/types/devProxy.mjs.map +1 -0
- package/dist/types/hub.cjs +220 -0
- package/dist/types/hub.cjs.map +1 -0
- package/dist/types/hub.d.mts +447 -0
- package/dist/types/hub.d.mts.map +1 -0
- package/dist/types/hub.mjs +179 -0
- package/dist/types/hub.mjs.map +1 -0
- package/dist/types/media.cjs +75 -0
- package/dist/types/media.cjs.map +1 -0
- package/dist/types/media.d.mts +22 -0
- package/dist/types/media.d.mts.map +1 -0
- package/dist/types/media.mjs +70 -0
- package/dist/types/media.mjs.map +1 -0
- package/dist/types/notification.cjs +19 -0
- package/dist/types/notification.cjs.map +1 -0
- package/dist/types/notification.d.mts +10 -0
- package/dist/types/notification.d.mts.map +1 -0
- package/dist/types/notification.mjs +19 -0
- package/dist/types/notification.mjs.map +1 -0
- package/dist/types/remoteAccess.cjs +92 -0
- package/dist/types/remoteAccess.cjs.map +1 -0
- package/dist/types/remoteAccess.d.mts +214 -0
- package/dist/types/remoteAccess.d.mts.map +1 -0
- package/dist/types/remoteAccess.mjs +68 -0
- package/dist/types/remoteAccess.mjs.map +1 -0
- package/dist/types/session.cjs +23 -0
- package/dist/types/session.cjs.map +1 -0
- package/dist/types/session.d.mts +29 -0
- package/dist/types/session.d.mts.map +1 -0
- package/dist/types/session.mjs +18 -0
- package/dist/types/session.mjs.map +1 -0
- package/dist/types/sessionMcp.d.mts +56 -0
- package/dist/types/sessionMcp.d.mts.map +1 -0
- package/dist/types/settings.cjs +18 -0
- package/dist/types/settings.cjs.map +1 -0
- package/dist/types/settings.d.mts +126 -0
- package/dist/types/settings.d.mts.map +1 -0
- package/dist/types/settings.mjs +12 -0
- package/dist/types/settings.mjs.map +1 -0
- package/dist/types.cjs +101 -0
- package/dist/types.d.mts +11 -0
- package/dist/types.mjs +9 -0
- package/dist/views.cjs +120 -0
- package/dist/views.d.mts +56 -0
- package/dist/views.mjs +56 -0
- package/dist/web/components/MascotMark.cjs +18 -0
- package/dist/web/components/MascotMark.cjs.map +1 -0
- package/dist/web/components/MascotMark.d.mts +9 -0
- package/dist/web/components/MascotMark.d.mts.map +1 -0
- package/dist/web/components/MascotMark.mjs +18 -0
- package/dist/web/components/MascotMark.mjs.map +1 -0
- package/dist/web/components/PluginSurface.cjs +15 -0
- package/dist/web/components/PluginSurface.cjs.map +1 -0
- package/dist/web/components/PluginSurface.d.mts +13 -0
- package/dist/web/components/PluginSurface.d.mts.map +1 -0
- package/dist/web/components/PluginSurface.mjs +15 -0
- package/dist/web/components/PluginSurface.mjs.map +1 -0
- package/dist/web/components/QrCode.cjs +37 -0
- package/dist/web/components/QrCode.cjs.map +1 -0
- package/dist/web/components/QrCode.d.mts +22 -0
- package/dist/web/components/QrCode.d.mts.map +1 -0
- package/dist/web/components/QrCode.mjs +37 -0
- package/dist/web/components/QrCode.mjs.map +1 -0
- package/dist/web/components/Remote.fixture.cjs +73 -0
- package/dist/web/components/Remote.fixture.cjs.map +1 -0
- package/dist/web/components/Remote.fixture.mjs +72 -0
- package/dist/web/components/Remote.fixture.mjs.map +1 -0
- package/dist/web/components/SessionMcp.cjs +279 -0
- package/dist/web/components/SessionMcp.cjs.map +1 -0
- package/dist/web/components/SessionMcp.d.mts +12 -0
- package/dist/web/components/SessionMcp.d.mts.map +1 -0
- package/dist/web/components/SessionMcp.mjs +278 -0
- package/dist/web/components/SessionMcp.mjs.map +1 -0
- package/dist/web/components/Story.fixture.cjs +124 -0
- package/dist/web/components/Story.fixture.cjs.map +1 -0
- package/dist/web/components/Story.fixture.d.mts +19 -0
- package/dist/web/components/Story.fixture.d.mts.map +1 -0
- package/dist/web/components/Story.fixture.mjs +119 -0
- package/dist/web/components/Story.fixture.mjs.map +1 -0
- package/dist/web/components/Template.fixture.cjs +67 -0
- package/dist/web/components/Template.fixture.cjs.map +1 -0
- package/dist/web/components/Template.fixture.d.mts +7 -0
- package/dist/web/components/Template.fixture.d.mts.map +1 -0
- package/dist/web/components/Template.fixture.mjs +65 -0
- package/dist/web/components/Template.fixture.mjs.map +1 -0
- package/dist/web/components/ToolRendererBoundary.cjs +23 -0
- package/dist/web/components/ToolRendererBoundary.cjs.map +1 -0
- package/dist/web/components/ToolRendererBoundary.d.mts +23 -0
- package/dist/web/components/ToolRendererBoundary.d.mts.map +1 -0
- package/dist/web/components/ToolRendererBoundary.mjs +23 -0
- package/dist/web/components/ToolRendererBoundary.mjs.map +1 -0
- package/dist/web/features/activity/ActivityDock.cjs +271 -0
- package/dist/web/features/activity/ActivityDock.cjs.map +1 -0
- package/dist/web/features/activity/ActivityDock.d.mts +22 -0
- package/dist/web/features/activity/ActivityDock.d.mts.map +1 -0
- package/dist/web/features/activity/ActivityDock.mjs +271 -0
- package/dist/web/features/activity/ActivityDock.mjs.map +1 -0
- package/dist/web/features/activity/ContextItemDialog.cjs +276 -0
- package/dist/web/features/activity/ContextItemDialog.cjs.map +1 -0
- package/dist/web/features/activity/ContextItemDialog.d.mts +16 -0
- package/dist/web/features/activity/ContextItemDialog.d.mts.map +1 -0
- package/dist/web/features/activity/ContextItemDialog.mjs +276 -0
- package/dist/web/features/activity/ContextItemDialog.mjs.map +1 -0
- package/dist/web/features/activity/ContextPanel.cjs +248 -0
- package/dist/web/features/activity/ContextPanel.cjs.map +1 -0
- package/dist/web/features/activity/ContextPanel.d.mts +4 -0
- package/dist/web/features/activity/ContextPanel.d.mts.map +1 -0
- package/dist/web/features/activity/ContextPanel.mjs +248 -0
- package/dist/web/features/activity/ContextPanel.mjs.map +1 -0
- package/dist/web/features/activity/DockTabs.cjs +47 -0
- package/dist/web/features/activity/DockTabs.cjs.map +1 -0
- package/dist/web/features/activity/DockTabs.d.mts +9 -0
- package/dist/web/features/activity/DockTabs.d.mts.map +1 -0
- package/dist/web/features/activity/DockTabs.mjs +47 -0
- package/dist/web/features/activity/DockTabs.mjs.map +1 -0
- package/dist/web/features/connection/RefusedCard.cjs +76 -0
- package/dist/web/features/connection/RefusedCard.cjs.map +1 -0
- package/dist/web/features/connection/RefusedCard.d.mts +5 -0
- package/dist/web/features/connection/RefusedCard.d.mts.map +1 -0
- package/dist/web/features/connection/RefusedCard.mjs +76 -0
- package/dist/web/features/connection/RefusedCard.mjs.map +1 -0
- package/dist/web/features/dialogs/DialogOverlay.cjs +164 -0
- package/dist/web/features/dialogs/DialogOverlay.cjs.map +1 -0
- package/dist/web/features/dialogs/DialogOverlay.d.mts +15 -0
- package/dist/web/features/dialogs/DialogOverlay.d.mts.map +1 -0
- package/dist/web/features/dialogs/DialogOverlay.mjs +164 -0
- package/dist/web/features/dialogs/DialogOverlay.mjs.map +1 -0
- package/dist/web/features/leader/CommandPalette.cjs +390 -0
- package/dist/web/features/leader/CommandPalette.cjs.map +1 -0
- package/dist/web/features/leader/CommandPalette.d.mts +14 -0
- package/dist/web/features/leader/CommandPalette.d.mts.map +1 -0
- package/dist/web/features/leader/CommandPalette.mjs +390 -0
- package/dist/web/features/leader/CommandPalette.mjs.map +1 -0
- package/dist/web/features/remote/DevProxyTargets.cjs +122 -0
- package/dist/web/features/remote/DevProxyTargets.cjs.map +1 -0
- package/dist/web/features/remote/DevProxyTargets.d.mts +15 -0
- package/dist/web/features/remote/DevProxyTargets.d.mts.map +1 -0
- package/dist/web/features/remote/DevProxyTargets.mjs +122 -0
- package/dist/web/features/remote/DevProxyTargets.mjs.map +1 -0
- package/dist/web/features/remote/HandoverProgress.cjs +28 -0
- package/dist/web/features/remote/HandoverProgress.cjs.map +1 -0
- package/dist/web/features/remote/HandoverProgress.d.mts +12 -0
- package/dist/web/features/remote/HandoverProgress.d.mts.map +1 -0
- package/dist/web/features/remote/HandoverProgress.mjs +28 -0
- package/dist/web/features/remote/HandoverProgress.mjs.map +1 -0
- package/dist/web/features/remote/PairedDeviceList.cjs +37 -0
- package/dist/web/features/remote/PairedDeviceList.cjs.map +1 -0
- package/dist/web/features/remote/PairedDeviceList.d.mts +5 -0
- package/dist/web/features/remote/PairedDeviceList.d.mts.map +1 -0
- package/dist/web/features/remote/PairedDeviceList.mjs +37 -0
- package/dist/web/features/remote/PairedDeviceList.mjs.map +1 -0
- package/dist/web/features/remote/PairingApprovalDialog.cjs +65 -0
- package/dist/web/features/remote/PairingApprovalDialog.cjs.map +1 -0
- package/dist/web/features/remote/PairingApprovalDialog.d.mts +11 -0
- package/dist/web/features/remote/PairingApprovalDialog.d.mts.map +1 -0
- package/dist/web/features/remote/PairingApprovalDialog.mjs +65 -0
- package/dist/web/features/remote/PairingApprovalDialog.mjs.map +1 -0
- package/dist/web/features/remote/RemoteAccessDialog.cjs +83 -0
- package/dist/web/features/remote/RemoteAccessDialog.cjs.map +1 -0
- package/dist/web/features/remote/RemoteAccessDialog.d.mts +11 -0
- package/dist/web/features/remote/RemoteAccessDialog.d.mts.map +1 -0
- package/dist/web/features/remote/RemoteAccessDialog.mjs +83 -0
- package/dist/web/features/remote/RemoteAccessDialog.mjs.map +1 -0
- package/dist/web/features/remote/RemoteAccessOptions.cjs +154 -0
- package/dist/web/features/remote/RemoteAccessOptions.cjs.map +1 -0
- package/dist/web/features/remote/RemoteAccessOptions.d.mts +11 -0
- package/dist/web/features/remote/RemoteAccessOptions.d.mts.map +1 -0
- package/dist/web/features/remote/RemoteAccessOptions.mjs +154 -0
- package/dist/web/features/remote/RemoteAccessOptions.mjs.map +1 -0
- package/dist/web/features/remote/RemoteAccessPairing.cjs +93 -0
- package/dist/web/features/remote/RemoteAccessPairing.cjs.map +1 -0
- package/dist/web/features/remote/RemoteAccessPairing.d.mts +5 -0
- package/dist/web/features/remote/RemoteAccessPairing.d.mts.map +1 -0
- package/dist/web/features/remote/RemoteAccessPairing.mjs +93 -0
- package/dist/web/features/remote/RemoteAccessPairing.mjs.map +1 -0
- package/dist/web/features/remote/SandboxWorkspaces.cjs +87 -0
- package/dist/web/features/remote/SandboxWorkspaces.cjs.map +1 -0
- package/dist/web/features/remote/SandboxWorkspaces.d.mts +7 -0
- package/dist/web/features/remote/SandboxWorkspaces.d.mts.map +1 -0
- package/dist/web/features/remote/SandboxWorkspaces.mjs +87 -0
- package/dist/web/features/remote/SandboxWorkspaces.mjs.map +1 -0
- package/dist/web/features/remote/TrustedDeviceList.cjs +65 -0
- package/dist/web/features/remote/TrustedDeviceList.cjs.map +1 -0
- package/dist/web/features/remote/TrustedDeviceList.d.mts +13 -0
- package/dist/web/features/remote/TrustedDeviceList.d.mts.map +1 -0
- package/dist/web/features/remote/TrustedDeviceList.mjs +64 -0
- package/dist/web/features/remote/TrustedDeviceList.mjs.map +1 -0
- package/dist/web/features/selection/SelectionBar.cjs +401 -0
- package/dist/web/features/selection/SelectionBar.cjs.map +1 -0
- package/dist/web/features/selection/SelectionBar.d.mts +14 -0
- package/dist/web/features/selection/SelectionBar.d.mts.map +1 -0
- package/dist/web/features/selection/SelectionBar.mjs +400 -0
- package/dist/web/features/selection/SelectionBar.mjs.map +1 -0
- package/dist/web/features/session/AgentLockPanel.cjs +31 -0
- package/dist/web/features/session/AgentLockPanel.cjs.map +1 -0
- package/dist/web/features/session/AgentLockPanel.mjs +31 -0
- package/dist/web/features/session/AgentLockPanel.mjs.map +1 -0
- package/dist/web/features/session/Composer.cjs +808 -0
- package/dist/web/features/session/Composer.cjs.map +1 -0
- package/dist/web/features/session/Composer.d.mts +21 -0
- package/dist/web/features/session/Composer.d.mts.map +1 -0
- package/dist/web/features/session/Composer.mjs +806 -0
- package/dist/web/features/session/Composer.mjs.map +1 -0
- package/dist/web/features/session/ComposerPrompt.cjs +47 -0
- package/dist/web/features/session/ComposerPrompt.cjs.map +1 -0
- package/dist/web/features/session/ComposerPrompt.d.mts +16 -0
- package/dist/web/features/session/ComposerPrompt.d.mts.map +1 -0
- package/dist/web/features/session/ComposerPrompt.mjs +47 -0
- package/dist/web/features/session/ComposerPrompt.mjs.map +1 -0
- package/dist/web/features/session/DormantPanel.cjs +61 -0
- package/dist/web/features/session/DormantPanel.cjs.map +1 -0
- package/dist/web/features/session/DormantPanel.d.mts +8 -0
- package/dist/web/features/session/DormantPanel.d.mts.map +1 -0
- package/dist/web/features/session/DormantPanel.mjs +61 -0
- package/dist/web/features/session/DormantPanel.mjs.map +1 -0
- package/dist/web/features/session/MentionPreviews.cjs +128 -0
- package/dist/web/features/session/MentionPreviews.cjs.map +1 -0
- package/dist/web/features/session/MentionPreviews.d.mts +17 -0
- package/dist/web/features/session/MentionPreviews.d.mts.map +1 -0
- package/dist/web/features/session/MentionPreviews.mjs +127 -0
- package/dist/web/features/session/MentionPreviews.mjs.map +1 -0
- package/dist/web/features/session/MessageMarkdown.cjs +20 -0
- package/dist/web/features/session/MessageMarkdown.cjs.map +1 -0
- package/dist/web/features/session/MessageMarkdown.d.mts +19 -0
- package/dist/web/features/session/MessageMarkdown.d.mts.map +1 -0
- package/dist/web/features/session/MessageMarkdown.mjs +20 -0
- package/dist/web/features/session/MessageMarkdown.mjs.map +1 -0
- package/dist/web/features/session/QueueSheet.cjs +189 -0
- package/dist/web/features/session/QueueSheet.cjs.map +1 -0
- package/dist/web/features/session/QueueSheet.d.mts +16 -0
- package/dist/web/features/session/QueueSheet.d.mts.map +1 -0
- package/dist/web/features/session/QueueSheet.mjs +189 -0
- package/dist/web/features/session/QueueSheet.mjs.map +1 -0
- package/dist/web/features/session/SessionActivity.cjs +88 -0
- package/dist/web/features/session/SessionActivity.cjs.map +1 -0
- package/dist/web/features/session/SessionActivity.d.mts +16 -0
- package/dist/web/features/session/SessionActivity.d.mts.map +1 -0
- package/dist/web/features/session/SessionActivity.mjs +87 -0
- package/dist/web/features/session/SessionActivity.mjs.map +1 -0
- package/dist/web/features/session/SessionTranscriptView.cjs +34 -0
- package/dist/web/features/session/SessionTranscriptView.cjs.map +1 -0
- package/dist/web/features/session/SessionTranscriptView.d.mts +16 -0
- package/dist/web/features/session/SessionTranscriptView.d.mts.map +1 -0
- package/dist/web/features/session/SessionTranscriptView.mjs +34 -0
- package/dist/web/features/session/SessionTranscriptView.mjs.map +1 -0
- package/dist/web/features/session/ThreadView.cjs +40 -0
- package/dist/web/features/session/ThreadView.cjs.map +1 -0
- package/dist/web/features/session/ThreadView.d.mts +18 -0
- package/dist/web/features/session/ThreadView.d.mts.map +1 -0
- package/dist/web/features/session/ThreadView.mjs +40 -0
- package/dist/web/features/session/ThreadView.mjs.map +1 -0
- package/dist/web/features/session/Timeline.cjs +620 -0
- package/dist/web/features/session/Timeline.cjs.map +1 -0
- package/dist/web/features/session/Timeline.d.mts +28 -0
- package/dist/web/features/session/Timeline.d.mts.map +1 -0
- package/dist/web/features/session/Timeline.mjs +619 -0
- package/dist/web/features/session/Timeline.mjs.map +1 -0
- package/dist/web/features/session/ToolCard.cjs +210 -0
- package/dist/web/features/session/ToolCard.cjs.map +1 -0
- package/dist/web/features/session/ToolCard.d.mts +16 -0
- package/dist/web/features/session/ToolCard.d.mts.map +1 -0
- package/dist/web/features/session/ToolCard.mjs +210 -0
- package/dist/web/features/session/ToolCard.mjs.map +1 -0
- package/dist/web/features/session/session.fixture.cjs +76 -0
- package/dist/web/features/session/session.fixture.cjs.map +1 -0
- package/dist/web/features/session/session.fixture.d.mts +6 -0
- package/dist/web/features/session/session.fixture.d.mts.map +1 -0
- package/dist/web/features/session/session.fixture.mjs +74 -0
- package/dist/web/features/session/session.fixture.mjs.map +1 -0
- package/dist/web/features/sessions/NewSessionDialog.cjs +70 -0
- package/dist/web/features/sessions/NewSessionDialog.cjs.map +1 -0
- package/dist/web/features/sessions/NewSessionDialog.d.mts +9 -0
- package/dist/web/features/sessions/NewSessionDialog.d.mts.map +1 -0
- package/dist/web/features/sessions/NewSessionDialog.mjs +70 -0
- package/dist/web/features/sessions/NewSessionDialog.mjs.map +1 -0
- package/dist/web/features/sessions/ResumeSessionDialog.cjs +131 -0
- package/dist/web/features/sessions/ResumeSessionDialog.cjs.map +1 -0
- package/dist/web/features/sessions/ResumeSessionDialog.d.mts +14 -0
- package/dist/web/features/sessions/ResumeSessionDialog.d.mts.map +1 -0
- package/dist/web/features/sessions/ResumeSessionDialog.mjs +131 -0
- package/dist/web/features/sessions/ResumeSessionDialog.mjs.map +1 -0
- package/dist/web/features/sessions/SessionRailDialogs.cjs +62 -0
- package/dist/web/features/sessions/SessionRailDialogs.cjs.map +1 -0
- package/dist/web/features/sessions/SessionRailDialogs.d.mts +10 -0
- package/dist/web/features/sessions/SessionRailDialogs.d.mts.map +1 -0
- package/dist/web/features/sessions/SessionRailDialogs.mjs +62 -0
- package/dist/web/features/sessions/SessionRailDialogs.mjs.map +1 -0
- package/dist/web/features/sessions/WelcomePanel.cjs +42 -0
- package/dist/web/features/sessions/WelcomePanel.cjs.map +1 -0
- package/dist/web/features/sessions/WelcomePanel.d.mts +16 -0
- package/dist/web/features/sessions/WelcomePanel.d.mts.map +1 -0
- package/dist/web/features/sessions/WelcomePanel.mjs +42 -0
- package/dist/web/features/sessions/WelcomePanel.mjs.map +1 -0
- package/dist/web/features/sessions/useNewSessionActions.cjs +38 -0
- package/dist/web/features/sessions/useNewSessionActions.cjs.map +1 -0
- package/dist/web/features/sessions/useNewSessionActions.d.mts +12 -0
- package/dist/web/features/sessions/useNewSessionActions.d.mts.map +1 -0
- package/dist/web/features/sessions/useNewSessionActions.mjs +38 -0
- package/dist/web/features/sessions/useNewSessionActions.mjs.map +1 -0
- package/dist/web/features/sessions/useSessionRail.cjs +302 -0
- package/dist/web/features/sessions/useSessionRail.cjs.map +1 -0
- package/dist/web/features/sessions/useSessionRail.d.mts +14 -0
- package/dist/web/features/sessions/useSessionRail.d.mts.map +1 -0
- package/dist/web/features/sessions/useSessionRail.mjs +302 -0
- package/dist/web/features/sessions/useSessionRail.mjs.map +1 -0
- package/dist/web/features/settings/AppearanceSettings.cjs +126 -0
- package/dist/web/features/settings/AppearanceSettings.cjs.map +1 -0
- package/dist/web/features/settings/AppearanceSettings.d.mts +12 -0
- package/dist/web/features/settings/AppearanceSettings.d.mts.map +1 -0
- package/dist/web/features/settings/AppearanceSettings.mjs +126 -0
- package/dist/web/features/settings/AppearanceSettings.mjs.map +1 -0
- package/dist/web/features/settings/ContributedSettings.cjs +257 -0
- package/dist/web/features/settings/ContributedSettings.cjs.map +1 -0
- package/dist/web/features/settings/ContributedSettings.d.mts +14 -0
- package/dist/web/features/settings/ContributedSettings.d.mts.map +1 -0
- package/dist/web/features/settings/ContributedSettings.mjs +257 -0
- package/dist/web/features/settings/ContributedSettings.mjs.map +1 -0
- package/dist/web/features/settings/ImageSettings.cjs +146 -0
- package/dist/web/features/settings/ImageSettings.cjs.map +1 -0
- package/dist/web/features/settings/ImageSettings.d.mts +12 -0
- package/dist/web/features/settings/ImageSettings.d.mts.map +1 -0
- package/dist/web/features/settings/ImageSettings.mjs +146 -0
- package/dist/web/features/settings/ImageSettings.mjs.map +1 -0
- package/dist/web/features/settings/LoginFlowDialog.cjs +226 -0
- package/dist/web/features/settings/LoginFlowDialog.cjs.map +1 -0
- package/dist/web/features/settings/LoginFlowDialog.d.mts +15 -0
- package/dist/web/features/settings/LoginFlowDialog.d.mts.map +1 -0
- package/dist/web/features/settings/LoginFlowDialog.mjs +225 -0
- package/dist/web/features/settings/LoginFlowDialog.mjs.map +1 -0
- package/dist/web/features/settings/NotificationSettings.cjs +69 -0
- package/dist/web/features/settings/NotificationSettings.cjs.map +1 -0
- package/dist/web/features/settings/NotificationSettings.d.mts +5 -0
- package/dist/web/features/settings/NotificationSettings.d.mts.map +1 -0
- package/dist/web/features/settings/NotificationSettings.mjs +69 -0
- package/dist/web/features/settings/NotificationSettings.mjs.map +1 -0
- package/dist/web/features/settings/PluginSettings.cjs +106 -0
- package/dist/web/features/settings/PluginSettings.cjs.map +1 -0
- package/dist/web/features/settings/PluginSettings.d.mts +10 -0
- package/dist/web/features/settings/PluginSettings.d.mts.map +1 -0
- package/dist/web/features/settings/PluginSettings.mjs +106 -0
- package/dist/web/features/settings/PluginSettings.mjs.map +1 -0
- package/dist/web/features/settings/ProviderSettings.cjs +323 -0
- package/dist/web/features/settings/ProviderSettings.cjs.map +1 -0
- package/dist/web/features/settings/ProviderSettings.d.mts +9 -0
- package/dist/web/features/settings/ProviderSettings.d.mts.map +1 -0
- package/dist/web/features/settings/ProviderSettings.mjs +323 -0
- package/dist/web/features/settings/ProviderSettings.mjs.map +1 -0
- package/dist/web/features/settings/RemoteControlSettings.cjs +50 -0
- package/dist/web/features/settings/RemoteControlSettings.cjs.map +1 -0
- package/dist/web/features/settings/RemoteControlSettings.d.mts +5 -0
- package/dist/web/features/settings/RemoteControlSettings.d.mts.map +1 -0
- package/dist/web/features/settings/RemoteControlSettings.mjs +50 -0
- package/dist/web/features/settings/RemoteControlSettings.mjs.map +1 -0
- package/dist/web/features/settings/RepositorySettings.cjs +318 -0
- package/dist/web/features/settings/RepositorySettings.cjs.map +1 -0
- package/dist/web/features/settings/RepositorySettings.d.mts +7 -0
- package/dist/web/features/settings/RepositorySettings.d.mts.map +1 -0
- package/dist/web/features/settings/RepositorySettings.mjs +318 -0
- package/dist/web/features/settings/RepositorySettings.mjs.map +1 -0
- package/dist/web/features/settings/RepositoryWorkspace.cjs +160 -0
- package/dist/web/features/settings/RepositoryWorkspace.cjs.map +1 -0
- package/dist/web/features/settings/RepositoryWorkspace.d.mts +10 -0
- package/dist/web/features/settings/RepositoryWorkspace.d.mts.map +1 -0
- package/dist/web/features/settings/RepositoryWorkspace.mjs +160 -0
- package/dist/web/features/settings/RepositoryWorkspace.mjs.map +1 -0
- package/dist/web/features/settings/SessionMcpSettings.cjs +488 -0
- package/dist/web/features/settings/SessionMcpSettings.cjs.map +1 -0
- package/dist/web/features/settings/SessionMcpSettings.d.mts +5 -0
- package/dist/web/features/settings/SessionMcpSettings.d.mts.map +1 -0
- package/dist/web/features/settings/SessionMcpSettings.mjs +488 -0
- package/dist/web/features/settings/SessionMcpSettings.mjs.map +1 -0
- package/dist/web/features/settings/SettingsMenu.cjs +135 -0
- package/dist/web/features/settings/SettingsMenu.cjs.map +1 -0
- package/dist/web/features/settings/SettingsMenu.d.mts +9 -0
- package/dist/web/features/settings/SettingsMenu.d.mts.map +1 -0
- package/dist/web/features/settings/SettingsMenu.mjs +135 -0
- package/dist/web/features/settings/SettingsMenu.mjs.map +1 -0
- package/dist/web/features/settings/SettingsPanelHost.cjs +32 -0
- package/dist/web/features/settings/SettingsPanelHost.cjs.map +1 -0
- package/dist/web/features/settings/SettingsPanelHost.d.mts +8 -0
- package/dist/web/features/settings/SettingsPanelHost.d.mts.map +1 -0
- package/dist/web/features/settings/SettingsPanelHost.mjs +32 -0
- package/dist/web/features/settings/SettingsPanelHost.mjs.map +1 -0
- package/dist/web/features/settings/TemplateSettings.cjs +177 -0
- package/dist/web/features/settings/TemplateSettings.cjs.map +1 -0
- package/dist/web/features/settings/TemplateSettings.d.mts +8 -0
- package/dist/web/features/settings/TemplateSettings.d.mts.map +1 -0
- package/dist/web/features/settings/TemplateSettings.mjs +177 -0
- package/dist/web/features/settings/TemplateSettings.mjs.map +1 -0
- package/dist/web/features/settings/TunnelSettings.cjs +182 -0
- package/dist/web/features/settings/TunnelSettings.cjs.map +1 -0
- package/dist/web/features/settings/TunnelSettings.d.mts +8 -0
- package/dist/web/features/settings/TunnelSettings.d.mts.map +1 -0
- package/dist/web/features/settings/TunnelSettings.mjs +182 -0
- package/dist/web/features/settings/TunnelSettings.mjs.map +1 -0
- package/dist/web/features/settings/settings.fixture.cjs +230 -0
- package/dist/web/features/settings/settings.fixture.cjs.map +1 -0
- package/dist/web/features/settings/settings.fixture.d.mts +6 -0
- package/dist/web/features/settings/settings.fixture.d.mts.map +1 -0
- package/dist/web/features/settings/settings.fixture.mjs +223 -0
- package/dist/web/features/settings/settings.fixture.mjs.map +1 -0
- package/dist/web/features/status/TopBar.cjs +200 -0
- package/dist/web/features/status/TopBar.cjs.map +1 -0
- package/dist/web/features/status/TopBar.d.mts +11 -0
- package/dist/web/features/status/TopBar.d.mts.map +1 -0
- package/dist/web/features/status/TopBar.mjs +200 -0
- package/dist/web/features/status/TopBar.mjs.map +1 -0
- package/dist/web/lib/authApi.cjs +77 -0
- package/dist/web/lib/authApi.cjs.map +1 -0
- package/dist/web/lib/authApi.d.mts +28 -0
- package/dist/web/lib/authApi.d.mts.map +1 -0
- package/dist/web/lib/authApi.mjs +72 -0
- package/dist/web/lib/authApi.mjs.map +1 -0
- package/dist/web/lib/browserNotifications.cjs +37 -0
- package/dist/web/lib/browserNotifications.cjs.map +1 -0
- package/dist/web/lib/browserNotifications.d.mts +12 -0
- package/dist/web/lib/browserNotifications.d.mts.map +1 -0
- package/dist/web/lib/browserNotifications.mjs +35 -0
- package/dist/web/lib/browserNotifications.mjs.map +1 -0
- package/dist/web/lib/browserTelemetry.cjs +158 -0
- package/dist/web/lib/browserTelemetry.cjs.map +1 -0
- package/dist/web/lib/browserTelemetry.d.mts +28 -0
- package/dist/web/lib/browserTelemetry.d.mts.map +1 -0
- package/dist/web/lib/browserTelemetry.mjs +154 -0
- package/dist/web/lib/browserTelemetry.mjs.map +1 -0
- package/dist/web/lib/commands.cjs +176 -0
- package/dist/web/lib/commands.cjs.map +1 -0
- package/dist/web/lib/commands.d.mts +53 -0
- package/dist/web/lib/commands.d.mts.map +1 -0
- package/dist/web/lib/commands.mjs +153 -0
- package/dist/web/lib/commands.mjs.map +1 -0
- package/dist/web/lib/composerSubmissions.cjs +20 -0
- package/dist/web/lib/composerSubmissions.cjs.map +1 -0
- package/dist/web/lib/composerSubmissions.d.mts +7 -0
- package/dist/web/lib/composerSubmissions.d.mts.map +1 -0
- package/dist/web/lib/composerSubmissions.mjs +19 -0
- package/dist/web/lib/composerSubmissions.mjs.map +1 -0
- package/dist/web/lib/composition.cjs +403 -0
- package/dist/web/lib/composition.cjs.map +1 -0
- package/dist/web/lib/composition.d.mts +137 -0
- package/dist/web/lib/composition.d.mts.map +1 -0
- package/dist/web/lib/composition.mjs +392 -0
- package/dist/web/lib/composition.mjs.map +1 -0
- package/dist/web/lib/contextComposition.cjs +132 -0
- package/dist/web/lib/contextComposition.cjs.map +1 -0
- package/dist/web/lib/contextComposition.d.mts +75 -0
- package/dist/web/lib/contextComposition.d.mts.map +1 -0
- package/dist/web/lib/contextComposition.mjs +127 -0
- package/dist/web/lib/contextComposition.mjs.map +1 -0
- package/dist/web/lib/contextDetailApi.cjs +61 -0
- package/dist/web/lib/contextDetailApi.cjs.map +1 -0
- package/dist/web/lib/contextDetailApi.d.mts +12 -0
- package/dist/web/lib/contextDetailApi.d.mts.map +1 -0
- package/dist/web/lib/contextDetailApi.mjs +61 -0
- package/dist/web/lib/contextDetailApi.mjs.map +1 -0
- package/dist/web/lib/dashboardRenderers.cjs +9 -0
- package/dist/web/lib/dashboardRenderers.cjs.map +1 -0
- package/dist/web/lib/dashboardRenderers.d.mts +12 -0
- package/dist/web/lib/dashboardRenderers.d.mts.map +1 -0
- package/dist/web/lib/dashboardRenderers.mjs +9 -0
- package/dist/web/lib/dashboardRenderers.mjs.map +1 -0
- package/dist/web/lib/dashboardRoute.cjs +27 -0
- package/dist/web/lib/dashboardRoute.cjs.map +1 -0
- package/dist/web/lib/dashboardRoute.d.mts +29 -0
- package/dist/web/lib/dashboardRoute.d.mts.map +1 -0
- package/dist/web/lib/dashboardRoute.mjs +26 -0
- package/dist/web/lib/dashboardRoute.mjs.map +1 -0
- package/dist/web/lib/dashboardTranscript.cjs +15 -0
- package/dist/web/lib/dashboardTranscript.cjs.map +1 -0
- package/dist/web/lib/dashboardTranscript.d.mts +6 -0
- package/dist/web/lib/dashboardTranscript.d.mts.map +1 -0
- package/dist/web/lib/dashboardTranscript.mjs +14 -0
- package/dist/web/lib/dashboardTranscript.mjs.map +1 -0
- package/dist/web/lib/devProxyApi.cjs +74 -0
- package/dist/web/lib/devProxyApi.cjs.map +1 -0
- package/dist/web/lib/devProxyApi.d.mts +21 -0
- package/dist/web/lib/devProxyApi.d.mts.map +1 -0
- package/dist/web/lib/devProxyApi.mjs +72 -0
- package/dist/web/lib/devProxyApi.mjs.map +1 -0
- package/dist/web/lib/fileMentions.cjs +30 -0
- package/dist/web/lib/fileMentions.cjs.map +1 -0
- package/dist/web/lib/fileMentions.d.mts +13 -0
- package/dist/web/lib/fileMentions.d.mts.map +1 -0
- package/dist/web/lib/fileMentions.mjs +29 -0
- package/dist/web/lib/fileMentions.mjs.map +1 -0
- package/dist/web/lib/hubApi.cjs +283 -0
- package/dist/web/lib/hubApi.cjs.map +1 -0
- package/dist/web/lib/hubApi.d.mts +109 -0
- package/dist/web/lib/hubApi.d.mts.map +1 -0
- package/dist/web/lib/hubApi.mjs +268 -0
- package/dist/web/lib/hubApi.mjs.map +1 -0
- package/dist/web/lib/leaderTree.cjs +150 -0
- package/dist/web/lib/leaderTree.cjs.map +1 -0
- package/dist/web/lib/leaderTree.d.mts +41 -0
- package/dist/web/lib/leaderTree.d.mts.map +1 -0
- package/dist/web/lib/leaderTree.mjs +149 -0
- package/dist/web/lib/leaderTree.mjs.map +1 -0
- package/dist/web/lib/livePush.cjs +97 -0
- package/dist/web/lib/livePush.cjs.map +1 -0
- package/dist/web/lib/livePush.d.mts +10 -0
- package/dist/web/lib/livePush.d.mts.map +1 -0
- package/dist/web/lib/livePush.mjs +94 -0
- package/dist/web/lib/livePush.mjs.map +1 -0
- package/dist/web/lib/modelContextAdapter.cjs +63 -0
- package/dist/web/lib/modelContextAdapter.cjs.map +1 -0
- package/dist/web/lib/modelContextAdapter.d.mts +11 -0
- package/dist/web/lib/modelContextAdapter.d.mts.map +1 -0
- package/dist/web/lib/modelContextAdapter.mjs +62 -0
- package/dist/web/lib/modelContextAdapter.mjs.map +1 -0
- package/dist/web/lib/piTransport.cjs +103 -0
- package/dist/web/lib/piTransport.cjs.map +1 -0
- package/dist/web/lib/piTransport.d.mts +8 -0
- package/dist/web/lib/piTransport.d.mts.map +1 -0
- package/dist/web/lib/piTransport.mjs +102 -0
- package/dist/web/lib/piTransport.mjs.map +1 -0
- package/dist/web/lib/pluginCompositions.cjs +57 -0
- package/dist/web/lib/pluginCompositions.cjs.map +1 -0
- package/dist/web/lib/pluginCompositions.d.mts +37 -0
- package/dist/web/lib/pluginCompositions.d.mts.map +1 -0
- package/dist/web/lib/pluginCompositions.mjs +52 -0
- package/dist/web/lib/pluginCompositions.mjs.map +1 -0
- package/dist/web/lib/pluginRegistry.cjs +675 -0
- package/dist/web/lib/pluginRegistry.cjs.map +1 -0
- package/dist/web/lib/pluginRegistry.d.mts +155 -0
- package/dist/web/lib/pluginRegistry.d.mts.map +1 -0
- package/dist/web/lib/pluginRegistry.mjs +633 -0
- package/dist/web/lib/pluginRegistry.mjs.map +1 -0
- package/dist/web/lib/pluginScopes.cjs +48 -0
- package/dist/web/lib/pluginScopes.cjs.map +1 -0
- package/dist/web/lib/pluginScopes.d.mts +8 -0
- package/dist/web/lib/pluginScopes.d.mts.map +1 -0
- package/dist/web/lib/pluginScopes.mjs +47 -0
- package/dist/web/lib/pluginScopes.mjs.map +1 -0
- package/dist/web/lib/pluginSlotProps.cjs +83 -0
- package/dist/web/lib/pluginSlotProps.cjs.map +1 -0
- package/dist/web/lib/pluginSlotProps.d.mts +21 -0
- package/dist/web/lib/pluginSlotProps.d.mts.map +1 -0
- package/dist/web/lib/pluginSlotProps.mjs +82 -0
- package/dist/web/lib/pluginSlotProps.mjs.map +1 -0
- package/dist/web/lib/promptFocus.cjs +30 -0
- package/dist/web/lib/promptFocus.cjs.map +1 -0
- package/dist/web/lib/promptFocus.d.mts +7 -0
- package/dist/web/lib/promptFocus.d.mts.map +1 -0
- package/dist/web/lib/promptFocus.mjs +29 -0
- package/dist/web/lib/promptFocus.mjs.map +1 -0
- package/dist/web/lib/protocolHubSocket.cjs +107 -0
- package/dist/web/lib/protocolHubSocket.cjs.map +1 -0
- package/dist/web/lib/protocolHubSocket.d.mts +18 -0
- package/dist/web/lib/protocolHubSocket.d.mts.map +1 -0
- package/dist/web/lib/protocolHubSocket.mjs +107 -0
- package/dist/web/lib/protocolHubSocket.mjs.map +1 -0
- package/dist/web/lib/protocolTimeline.cjs +86 -0
- package/dist/web/lib/protocolTimeline.cjs.map +1 -0
- package/dist/web/lib/protocolTimeline.d.mts +9 -0
- package/dist/web/lib/protocolTimeline.d.mts.map +1 -0
- package/dist/web/lib/protocolTimeline.mjs +85 -0
- package/dist/web/lib/protocolTimeline.mjs.map +1 -0
- package/dist/web/lib/qrMatrix.cjs +37 -0
- package/dist/web/lib/qrMatrix.cjs.map +1 -0
- package/dist/web/lib/qrMatrix.d.mts +5 -0
- package/dist/web/lib/qrMatrix.d.mts.map +1 -0
- package/dist/web/lib/qrMatrix.mjs +35 -0
- package/dist/web/lib/qrMatrix.mjs.map +1 -0
- package/dist/web/lib/remoteApi.cjs +100 -0
- package/dist/web/lib/remoteApi.cjs.map +1 -0
- package/dist/web/lib/remoteApi.d.mts +45 -0
- package/dist/web/lib/remoteApi.d.mts.map +1 -0
- package/dist/web/lib/remoteApi.mjs +92 -0
- package/dist/web/lib/remoteApi.mjs.map +1 -0
- package/dist/web/lib/sealedSession.cjs +81 -0
- package/dist/web/lib/sealedSession.cjs.map +1 -0
- package/dist/web/lib/sealedSession.d.mts +24 -0
- package/dist/web/lib/sealedSession.d.mts.map +1 -0
- package/dist/web/lib/sealedSession.mjs +75 -0
- package/dist/web/lib/sealedSession.mjs.map +1 -0
- package/dist/web/lib/sessionActivityRenderer.cjs +19 -0
- package/dist/web/lib/sessionActivityRenderer.cjs.map +1 -0
- package/dist/web/lib/sessionActivityRenderer.d.mts +10 -0
- package/dist/web/lib/sessionActivityRenderer.d.mts.map +1 -0
- package/dist/web/lib/sessionActivityRenderer.mjs +17 -0
- package/dist/web/lib/sessionActivityRenderer.mjs.map +1 -0
- package/dist/web/lib/sessionAsset.cjs +45 -0
- package/dist/web/lib/sessionAsset.cjs.map +1 -0
- package/dist/web/lib/sessionAsset.d.mts +17 -0
- package/dist/web/lib/sessionAsset.d.mts.map +1 -0
- package/dist/web/lib/sessionAsset.mjs +44 -0
- package/dist/web/lib/sessionAsset.mjs.map +1 -0
- package/dist/web/lib/sessionAvatar.cjs +18 -0
- package/dist/web/lib/sessionAvatar.cjs.map +1 -0
- package/dist/web/lib/sessionAvatar.d.mts +10 -0
- package/dist/web/lib/sessionAvatar.d.mts.map +1 -0
- package/dist/web/lib/sessionAvatar.mjs +18 -0
- package/dist/web/lib/sessionAvatar.mjs.map +1 -0
- package/dist/web/lib/sessionMcpApi.cjs +120 -0
- package/dist/web/lib/sessionMcpApi.cjs.map +1 -0
- package/dist/web/lib/sessionMcpApi.d.mts +27 -0
- package/dist/web/lib/sessionMcpApi.d.mts.map +1 -0
- package/dist/web/lib/sessionMcpApi.mjs +114 -0
- package/dist/web/lib/sessionMcpApi.mjs.map +1 -0
- package/dist/web/lib/sessionMcpPrompt.cjs +24 -0
- package/dist/web/lib/sessionMcpPrompt.cjs.map +1 -0
- package/dist/web/lib/sessionMcpPrompt.mjs +23 -0
- package/dist/web/lib/sessionMcpPrompt.mjs.map +1 -0
- package/dist/web/lib/sessionModel.cjs +970 -0
- package/dist/web/lib/sessionModel.cjs.map +1 -0
- package/dist/web/lib/sessionModel.d.mts +254 -0
- package/dist/web/lib/sessionModel.d.mts.map +1 -0
- package/dist/web/lib/sessionModel.mjs +958 -0
- package/dist/web/lib/sessionModel.mjs.map +1 -0
- package/dist/web/lib/sessionProtocolCommands.cjs +196 -0
- package/dist/web/lib/sessionProtocolCommands.cjs.map +1 -0
- package/dist/web/lib/sessionProtocolCommands.d.mts +15 -0
- package/dist/web/lib/sessionProtocolCommands.d.mts.map +1 -0
- package/dist/web/lib/sessionProtocolCommands.mjs +193 -0
- package/dist/web/lib/sessionProtocolCommands.mjs.map +1 -0
- package/dist/web/lib/sessionRailModel.cjs +107 -0
- package/dist/web/lib/sessionRailModel.cjs.map +1 -0
- package/dist/web/lib/sessionRailModel.d.mts +38 -0
- package/dist/web/lib/sessionRailModel.d.mts.map +1 -0
- package/dist/web/lib/sessionRailModel.mjs +104 -0
- package/dist/web/lib/sessionRailModel.mjs.map +1 -0
- package/dist/web/lib/sessionSummary.cjs +58 -0
- package/dist/web/lib/sessionSummary.cjs.map +1 -0
- package/dist/web/lib/sessionSummary.d.mts +39 -0
- package/dist/web/lib/sessionSummary.d.mts.map +1 -0
- package/dist/web/lib/sessionSummary.mjs +54 -0
- package/dist/web/lib/sessionSummary.mjs.map +1 -0
- package/dist/web/lib/sessionTranscriptRenderer.cjs +19 -0
- package/dist/web/lib/sessionTranscriptRenderer.cjs.map +1 -0
- package/dist/web/lib/sessionTranscriptRenderer.d.mts +11 -0
- package/dist/web/lib/sessionTranscriptRenderer.d.mts.map +1 -0
- package/dist/web/lib/sessionTranscriptRenderer.mjs +17 -0
- package/dist/web/lib/sessionTranscriptRenderer.mjs.map +1 -0
- package/dist/web/lib/settingsApi.cjs +237 -0
- package/dist/web/lib/settingsApi.cjs.map +1 -0
- package/dist/web/lib/settingsApi.d.mts +57 -0
- package/dist/web/lib/settingsApi.d.mts.map +1 -0
- package/dist/web/lib/settingsApi.mjs +230 -0
- package/dist/web/lib/settingsApi.mjs.map +1 -0
- package/dist/web/lib/settingsDraft.cjs +48 -0
- package/dist/web/lib/settingsDraft.cjs.map +1 -0
- package/dist/web/lib/settingsDraft.d.mts +28 -0
- package/dist/web/lib/settingsDraft.d.mts.map +1 -0
- package/dist/web/lib/settingsDraft.mjs +45 -0
- package/dist/web/lib/settingsDraft.mjs.map +1 -0
- package/dist/web/lib/settingsSections.cjs +108 -0
- package/dist/web/lib/settingsSections.cjs.map +1 -0
- package/dist/web/lib/settingsSections.d.mts +36 -0
- package/dist/web/lib/settingsSections.d.mts.map +1 -0
- package/dist/web/lib/settingsSections.mjs +105 -0
- package/dist/web/lib/settingsSections.mjs.map +1 -0
- package/dist/web/lib/statusLine.cjs +82 -0
- package/dist/web/lib/statusLine.cjs.map +1 -0
- package/dist/web/lib/statusLine.d.mts +27 -0
- package/dist/web/lib/statusLine.d.mts.map +1 -0
- package/dist/web/lib/statusLine.mjs +79 -0
- package/dist/web/lib/statusLine.mjs.map +1 -0
- package/dist/web/lib/stepUp.cjs +41 -0
- package/dist/web/lib/stepUp.cjs.map +1 -0
- package/dist/web/lib/stepUp.d.mts +18 -0
- package/dist/web/lib/stepUp.d.mts.map +1 -0
- package/dist/web/lib/stepUp.mjs +41 -0
- package/dist/web/lib/stepUp.mjs.map +1 -0
- package/dist/web/lib/templateCatalog.cjs +123 -0
- package/dist/web/lib/templateCatalog.cjs.map +1 -0
- package/dist/web/lib/templateCatalog.d.mts +38 -0
- package/dist/web/lib/templateCatalog.d.mts.map +1 -0
- package/dist/web/lib/templateCatalog.mjs +118 -0
- package/dist/web/lib/templateCatalog.mjs.map +1 -0
- package/dist/web/lib/threadRenderer.cjs +25 -0
- package/dist/web/lib/threadRenderer.cjs.map +1 -0
- package/dist/web/lib/threadRenderer.d.mts +17 -0
- package/dist/web/lib/threadRenderer.d.mts.map +1 -0
- package/dist/web/lib/threadRenderer.mjs +23 -0
- package/dist/web/lib/threadRenderer.mjs.map +1 -0
- package/dist/web/lib/timelineGroups.cjs +83 -0
- package/dist/web/lib/timelineGroups.cjs.map +1 -0
- package/dist/web/lib/timelineGroups.d.mts +36 -0
- package/dist/web/lib/timelineGroups.d.mts.map +1 -0
- package/dist/web/lib/timelineGroups.mjs +81 -0
- package/dist/web/lib/timelineGroups.mjs.map +1 -0
- package/dist/web/lib/toolCompletionTabs.cjs +98 -0
- package/dist/web/lib/toolCompletionTabs.cjs.map +1 -0
- package/dist/web/lib/toolCompletionTabs.d.mts +14 -0
- package/dist/web/lib/toolCompletionTabs.d.mts.map +1 -0
- package/dist/web/lib/toolCompletionTabs.mjs +98 -0
- package/dist/web/lib/toolCompletionTabs.mjs.map +1 -0
- package/dist/web/lib/toolMessageProps.cjs +19 -0
- package/dist/web/lib/toolMessageProps.cjs.map +1 -0
- package/dist/web/lib/toolMessageProps.d.mts +7 -0
- package/dist/web/lib/toolMessageProps.d.mts.map +1 -0
- package/dist/web/lib/toolMessageProps.mjs +19 -0
- package/dist/web/lib/toolMessageProps.mjs.map +1 -0
- package/dist/web/lib/toolPrompt.cjs +44 -0
- package/dist/web/lib/toolPrompt.cjs.map +1 -0
- package/dist/web/lib/toolPrompt.d.mts +34 -0
- package/dist/web/lib/toolPrompt.d.mts.map +1 -0
- package/dist/web/lib/toolPrompt.mjs +44 -0
- package/dist/web/lib/toolPrompt.mjs.map +1 -0
- package/dist/web/lib/transport.cjs +57 -0
- package/dist/web/lib/transport.cjs.map +1 -0
- package/dist/web/lib/transport.d.mts +40 -0
- package/dist/web/lib/transport.d.mts.map +1 -0
- package/dist/web/lib/transport.mjs +50 -0
- package/dist/web/lib/transport.mjs.map +1 -0
- package/dist/web/lib/useSessionMcp.cjs +65 -0
- package/dist/web/lib/useSessionMcp.cjs.map +1 -0
- package/dist/web/lib/useSessionMcp.d.mts +15 -0
- package/dist/web/lib/useSessionMcp.d.mts.map +1 -0
- package/dist/web/lib/useSessionMcp.mjs +65 -0
- package/dist/web/lib/useSessionMcp.mjs.map +1 -0
- package/dist/web/lib/webauthnClient.cjs +110 -0
- package/dist/web/lib/webauthnClient.cjs.map +1 -0
- package/dist/web/lib/webauthnClient.d.mts +32 -0
- package/dist/web/lib/webauthnClient.d.mts.map +1 -0
- package/dist/web/lib/webauthnClient.mjs +106 -0
- package/dist/web/lib/webauthnClient.mjs.map +1 -0
- package/dist/web/lib/webmcpSimulator.cjs +105 -0
- package/dist/web/lib/webmcpSimulator.cjs.map +1 -0
- package/dist/web/lib/webmcpSimulator.mjs +105 -0
- package/dist/web/lib/webmcpSimulator.mjs.map +1 -0
- package/dist/web/stores/captureStore.cjs +137 -0
- package/dist/web/stores/captureStore.cjs.map +1 -0
- package/dist/web/stores/captureStore.d.mts +13 -0
- package/dist/web/stores/captureStore.d.mts.map +1 -0
- package/dist/web/stores/captureStore.mjs +133 -0
- package/dist/web/stores/captureStore.mjs.map +1 -0
- package/dist/web/stores/composerStore.cjs +390 -0
- package/dist/web/stores/composerStore.cjs.map +1 -0
- package/dist/web/stores/composerStore.d.mts +101 -0
- package/dist/web/stores/composerStore.d.mts.map +1 -0
- package/dist/web/stores/composerStore.mjs +370 -0
- package/dist/web/stores/composerStore.mjs.map +1 -0
- package/dist/web/stores/composerSubmissionStore.cjs +88 -0
- package/dist/web/stores/composerSubmissionStore.cjs.map +1 -0
- package/dist/web/stores/composerSubmissionStore.d.mts +11 -0
- package/dist/web/stores/composerSubmissionStore.d.mts.map +1 -0
- package/dist/web/stores/composerSubmissionStore.mjs +87 -0
- package/dist/web/stores/composerSubmissionStore.mjs.map +1 -0
- package/dist/web/stores/dashboardStateStore.cjs +35 -0
- package/dist/web/stores/dashboardStateStore.cjs.map +1 -0
- package/dist/web/stores/dashboardStateStore.d.mts +11 -0
- package/dist/web/stores/dashboardStateStore.d.mts.map +1 -0
- package/dist/web/stores/dashboardStateStore.mjs +33 -0
- package/dist/web/stores/dashboardStateStore.mjs.map +1 -0
- package/dist/web/stores/devProxyStore.cjs +76 -0
- package/dist/web/stores/devProxyStore.cjs.map +1 -0
- package/dist/web/stores/devProxyStore.d.mts +25 -0
- package/dist/web/stores/devProxyStore.d.mts.map +1 -0
- package/dist/web/stores/devProxyStore.mjs +73 -0
- package/dist/web/stores/devProxyStore.mjs.map +1 -0
- package/dist/web/stores/dialogDraftStore.cjs +38 -0
- package/dist/web/stores/dialogDraftStore.cjs.map +1 -0
- package/dist/web/stores/dialogDraftStore.d.mts +13 -0
- package/dist/web/stores/dialogDraftStore.d.mts.map +1 -0
- package/dist/web/stores/dialogDraftStore.mjs +36 -0
- package/dist/web/stores/dialogDraftStore.mjs.map +1 -0
- package/dist/web/stores/fileLinkModesStore.cjs +20 -0
- package/dist/web/stores/fileLinkModesStore.cjs.map +1 -0
- package/dist/web/stores/fileLinkModesStore.d.mts +5 -0
- package/dist/web/stores/fileLinkModesStore.d.mts.map +1 -0
- package/dist/web/stores/fileLinkModesStore.mjs +20 -0
- package/dist/web/stores/fileLinkModesStore.mjs.map +1 -0
- package/dist/web/stores/menuStore.cjs +85 -0
- package/dist/web/stores/menuStore.cjs.map +1 -0
- package/dist/web/stores/menuStore.d.mts +42 -0
- package/dist/web/stores/menuStore.d.mts.map +1 -0
- package/dist/web/stores/menuStore.mjs +79 -0
- package/dist/web/stores/menuStore.mjs.map +1 -0
- package/dist/web/stores/newSessionStore.cjs +93 -0
- package/dist/web/stores/newSessionStore.cjs.map +1 -0
- package/dist/web/stores/newSessionStore.d.mts +30 -0
- package/dist/web/stores/newSessionStore.d.mts.map +1 -0
- package/dist/web/stores/newSessionStore.mjs +86 -0
- package/dist/web/stores/newSessionStore.mjs.map +1 -0
- package/dist/web/stores/pagedTranscriptStore.cjs +235 -0
- package/dist/web/stores/pagedTranscriptStore.cjs.map +1 -0
- package/dist/web/stores/pagedTranscriptStore.d.mts +12 -0
- package/dist/web/stores/pagedTranscriptStore.d.mts.map +1 -0
- package/dist/web/stores/pagedTranscriptStore.mjs +235 -0
- package/dist/web/stores/pagedTranscriptStore.mjs.map +1 -0
- package/dist/web/stores/paletteStore.cjs +37 -0
- package/dist/web/stores/paletteStore.cjs.map +1 -0
- package/dist/web/stores/paletteStore.d.mts +14 -0
- package/dist/web/stores/paletteStore.d.mts.map +1 -0
- package/dist/web/stores/paletteStore.mjs +34 -0
- package/dist/web/stores/paletteStore.mjs.map +1 -0
- package/dist/web/stores/railDialogStore.cjs +105 -0
- package/dist/web/stores/railDialogStore.cjs.map +1 -0
- package/dist/web/stores/railDialogStore.d.mts +32 -0
- package/dist/web/stores/railDialogStore.d.mts.map +1 -0
- package/dist/web/stores/railDialogStore.mjs +97 -0
- package/dist/web/stores/railDialogStore.mjs.map +1 -0
- package/dist/web/stores/remoteAccessStore.cjs +216 -0
- package/dist/web/stores/remoteAccessStore.cjs.map +1 -0
- package/dist/web/stores/remoteAccessStore.d.mts +48 -0
- package/dist/web/stores/remoteAccessStore.d.mts.map +1 -0
- package/dist/web/stores/remoteAccessStore.mjs +202 -0
- package/dist/web/stores/remoteAccessStore.mjs.map +1 -0
- package/dist/web/stores/sessionChannelHoldsStore.cjs +43 -0
- package/dist/web/stores/sessionChannelHoldsStore.cjs.map +1 -0
- package/dist/web/stores/sessionChannelHoldsStore.d.mts +9 -0
- package/dist/web/stores/sessionChannelHoldsStore.d.mts.map +1 -0
- package/dist/web/stores/sessionChannelHoldsStore.mjs +42 -0
- package/dist/web/stores/sessionChannelHoldsStore.mjs.map +1 -0
- package/dist/web/stores/sessionStore.cjs +610 -0
- package/dist/web/stores/sessionStore.cjs.map +1 -0
- package/dist/web/stores/sessionStore.d.mts +116 -0
- package/dist/web/stores/sessionStore.d.mts.map +1 -0
- package/dist/web/stores/sessionStore.mjs +568 -0
- package/dist/web/stores/sessionStore.mjs.map +1 -0
- package/dist/web/stores/sessionsStore.cjs +272 -0
- package/dist/web/stores/sessionsStore.cjs.map +1 -0
- package/dist/web/stores/sessionsStore.d.mts +74 -0
- package/dist/web/stores/sessionsStore.d.mts.map +1 -0
- package/dist/web/stores/sessionsStore.mjs +257 -0
- package/dist/web/stores/sessionsStore.mjs.map +1 -0
- package/dist/web/stores/settingsDraftStore.cjs +138 -0
- package/dist/web/stores/settingsDraftStore.cjs.map +1 -0
- package/dist/web/stores/settingsDraftStore.d.mts +27 -0
- package/dist/web/stores/settingsDraftStore.d.mts.map +1 -0
- package/dist/web/stores/settingsDraftStore.mjs +132 -0
- package/dist/web/stores/settingsDraftStore.mjs.map +1 -0
- package/dist/web/stores/templateStore.cjs +136 -0
- package/dist/web/stores/templateStore.cjs.map +1 -0
- package/dist/web/stores/templateStore.d.mts +20 -0
- package/dist/web/stores/templateStore.d.mts.map +1 -0
- package/dist/web/stores/templateStore.mjs +131 -0
- package/dist/web/stores/templateStore.mjs.map +1 -0
- package/dist/web/stores/themeStore.cjs +42 -0
- package/dist/web/stores/themeStore.cjs.map +1 -0
- package/dist/web/stores/themeStore.d.mts +20 -0
- package/dist/web/stores/themeStore.d.mts.map +1 -0
- package/dist/web/stores/themeStore.mjs +39 -0
- package/dist/web/stores/themeStore.mjs.map +1 -0
- package/dist/web/stores/threadStore.cjs +122 -0
- package/dist/web/stores/threadStore.cjs.map +1 -0
- package/dist/web/stores/threadStore.d.mts +24 -0
- package/dist/web/stores/threadStore.d.mts.map +1 -0
- package/dist/web/stores/threadStore.mjs +114 -0
- package/dist/web/stores/threadStore.mjs.map +1 -0
- package/dist/web/stores/toolPromptStore.cjs +15 -0
- package/dist/web/stores/toolPromptStore.cjs.map +1 -0
- package/dist/web/stores/toolPromptStore.d.mts +23 -0
- package/dist/web/stores/toolPromptStore.d.mts.map +1 -0
- package/dist/web/stores/toolPromptStore.mjs +14 -0
- package/dist/web/stores/toolPromptStore.mjs.map +1 -0
- package/dist/web/stores/transientTabsStore.cjs +66 -0
- package/dist/web/stores/transientTabsStore.cjs.map +1 -0
- package/dist/web/stores/transientTabsStore.d.mts +21 -0
- package/dist/web/stores/transientTabsStore.d.mts.map +1 -0
- package/dist/web/stores/transientTabsStore.mjs +59 -0
- package/dist/web/stores/transientTabsStore.mjs.map +1 -0
- package/dist/web/stores/uiStore.cjs +47 -0
- package/dist/web/stores/uiStore.cjs.map +1 -0
- package/dist/web/stores/uiStore.d.mts +18 -0
- package/dist/web/stores/uiStore.d.mts.map +1 -0
- package/dist/web/stores/uiStore.mjs +45 -0
- package/dist/web/stores/uiStore.mjs.map +1 -0
- package/dist/web/stores/useOpenTab.cjs +31 -0
- package/dist/web/stores/useOpenTab.cjs.map +1 -0
- package/dist/web/stores/useOpenTab.d.mts +9 -0
- package/dist/web/stores/useOpenTab.d.mts.map +1 -0
- package/dist/web/stores/useOpenTab.mjs +31 -0
- package/dist/web/stores/useOpenTab.mjs.map +1 -0
- package/dist/web/stores/usePluginSlotProps.cjs +115 -0
- package/dist/web/stores/usePluginSlotProps.cjs.map +1 -0
- package/dist/web/stores/usePluginSlotProps.d.mts +6 -0
- package/dist/web/stores/usePluginSlotProps.d.mts.map +1 -0
- package/dist/web/stores/usePluginSlotProps.mjs +115 -0
- package/dist/web/stores/usePluginSlotProps.mjs.map +1 -0
- package/dist/web/stores/useToolPrompt.cjs +42 -0
- package/dist/web/stores/useToolPrompt.cjs.map +1 -0
- package/dist/web/stores/useToolPrompt.d.mts +14 -0
- package/dist/web/stores/useToolPrompt.d.mts.map +1 -0
- package/dist/web/stores/useToolPrompt.mjs +42 -0
- package/dist/web/stores/useToolPrompt.mjs.map +1 -0
- package/dist/web/stores/useWebPluginRegistry.cjs +11 -0
- package/dist/web/stores/useWebPluginRegistry.cjs.map +1 -0
- package/dist/web/stores/useWebPluginRegistry.d.mts +5 -0
- package/dist/web/stores/useWebPluginRegistry.d.mts.map +1 -0
- package/dist/web/stores/useWebPluginRegistry.mjs +11 -0
- package/dist/web/stores/useWebPluginRegistry.mjs.map +1 -0
- package/dist/web/stores/workspaceAdmissionStore.cjs +67 -0
- package/dist/web/stores/workspaceAdmissionStore.cjs.map +1 -0
- package/dist/web/stores/workspaceAdmissionStore.d.mts +24 -0
- package/dist/web/stores/workspaceAdmissionStore.d.mts.map +1 -0
- package/dist/web/stores/workspaceAdmissionStore.mjs +64 -0
- package/dist/web/stores/workspaceAdmissionStore.mjs.map +1 -0
- package/dist/web/stores/workspacesStore.cjs +83 -0
- package/dist/web/stores/workspacesStore.cjs.map +1 -0
- package/dist/web/stores/workspacesStore.d.mts +17 -0
- package/dist/web/stores/workspacesStore.d.mts.map +1 -0
- package/dist/web/stores/workspacesStore.mjs +78 -0
- package/dist/web/stores/workspacesStore.mjs.map +1 -0
- package/llms.txt +3 -0
- package/package.json +107 -0
- package/styles/dashboard.css +2 -0
- package/styles/preview.css +3 -0
|
@@ -0,0 +1,970 @@
|
|
|
1
|
+
const require_commands = require("./commands.cjs");
|
|
2
|
+
const require_hub = require("../../types/hub.cjs");
|
|
3
|
+
const require_notification = require("../../types/notification.cjs");
|
|
4
|
+
//#region src/web/lib/sessionModel.ts
|
|
5
|
+
const initialSessionState = {
|
|
6
|
+
hasNewerHistory: false,
|
|
7
|
+
entries: [],
|
|
8
|
+
activeTools: [],
|
|
9
|
+
statuses: {},
|
|
10
|
+
widgets: [],
|
|
11
|
+
streaming: false,
|
|
12
|
+
settled: false,
|
|
13
|
+
lifecycle: null,
|
|
14
|
+
stats: null,
|
|
15
|
+
liveCost: 0,
|
|
16
|
+
agent: null,
|
|
17
|
+
commands: [],
|
|
18
|
+
models: [],
|
|
19
|
+
fastMode: false,
|
|
20
|
+
agentLocked: false,
|
|
21
|
+
thinkingLevels: [],
|
|
22
|
+
dialog: null,
|
|
23
|
+
editorTextRequest: null,
|
|
24
|
+
minorModes: null,
|
|
25
|
+
context: null,
|
|
26
|
+
profileIdentity: null,
|
|
27
|
+
toolsThisRun: 0,
|
|
28
|
+
restoredIds: [],
|
|
29
|
+
pendingUserEntries: [],
|
|
30
|
+
reconciledUserEntries: [],
|
|
31
|
+
protocolUserEntryIds: {},
|
|
32
|
+
nextId: 1
|
|
33
|
+
};
|
|
34
|
+
function isRecord(value) {
|
|
35
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
36
|
+
}
|
|
37
|
+
function asString(value, fallback = "") {
|
|
38
|
+
return typeof value === "string" ? value : fallback;
|
|
39
|
+
}
|
|
40
|
+
function asNumber(value) {
|
|
41
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
42
|
+
}
|
|
43
|
+
/** Joins the text blocks of a Pi content array, ignoring non-text parts. */
|
|
44
|
+
function textFromContent(content) {
|
|
45
|
+
if (typeof content === "string") return content;
|
|
46
|
+
if (!Array.isArray(content)) return "";
|
|
47
|
+
return content.map((block) => isRecord(block) && block.type === "text" ? asString(block.text) : "").filter(Boolean).join("");
|
|
48
|
+
}
|
|
49
|
+
const SUPPORTED_IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
50
|
+
"image/png",
|
|
51
|
+
"image/jpeg",
|
|
52
|
+
"image/gif",
|
|
53
|
+
"image/webp"
|
|
54
|
+
]);
|
|
55
|
+
function isSupportedImageMimeType(mimeType) {
|
|
56
|
+
return SUPPORTED_IMAGE_MIME_TYPES.has(mimeType);
|
|
57
|
+
}
|
|
58
|
+
/** Keeps only image blocks the cockpit can safely render as data URLs. */
|
|
59
|
+
function imagesFromContent(content) {
|
|
60
|
+
if (!Array.isArray(content)) return [];
|
|
61
|
+
return content.flatMap((block) => {
|
|
62
|
+
if (!isRecord(block) || block.type !== "image") return [];
|
|
63
|
+
const data = asString(block.data);
|
|
64
|
+
const mimeType = asString(block.mimeType);
|
|
65
|
+
return data && isSupportedImageMimeType(mimeType) ? [{
|
|
66
|
+
data,
|
|
67
|
+
mimeType
|
|
68
|
+
}] : [];
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/** A one-line description of a tool call, good enough for a card header. */
|
|
72
|
+
function summariseArgs(args) {
|
|
73
|
+
if (!isRecord(args)) return "";
|
|
74
|
+
for (const key of [
|
|
75
|
+
"command",
|
|
76
|
+
"file_path",
|
|
77
|
+
"filePath",
|
|
78
|
+
"path",
|
|
79
|
+
"pattern",
|
|
80
|
+
"query",
|
|
81
|
+
"url"
|
|
82
|
+
]) {
|
|
83
|
+
const value = args[key];
|
|
84
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
85
|
+
}
|
|
86
|
+
const keys = Object.keys(args);
|
|
87
|
+
return keys.length > 0 ? keys.join(", ") : "";
|
|
88
|
+
}
|
|
89
|
+
function withEntry(state, entry) {
|
|
90
|
+
return {
|
|
91
|
+
...state,
|
|
92
|
+
entries: [...state.entries, entry],
|
|
93
|
+
nextId: state.nextId + 1
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function withChronologicalEntry(state, entry) {
|
|
97
|
+
const timestamp = entry.timestamp;
|
|
98
|
+
if (timestamp === void 0) return withEntry(state, entry);
|
|
99
|
+
const index = state.entries.findIndex((existing) => existing.timestamp !== void 0 && existing.timestamp > timestamp);
|
|
100
|
+
if (index === -1) return withEntry(state, entry);
|
|
101
|
+
return {
|
|
102
|
+
...state,
|
|
103
|
+
entries: [
|
|
104
|
+
...state.entries.slice(0, index),
|
|
105
|
+
entry,
|
|
106
|
+
...state.entries.slice(index)
|
|
107
|
+
],
|
|
108
|
+
nextId: state.nextId + 1
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function replaceEntry(state, id, next) {
|
|
112
|
+
return {
|
|
113
|
+
...state,
|
|
114
|
+
entries: state.entries.map((entry) => entry.id === id ? next : entry)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function openAssistant(state) {
|
|
118
|
+
const last = state.entries[state.entries.length - 1];
|
|
119
|
+
if (last && last.kind === "assistant" && last.streaming) return {
|
|
120
|
+
state,
|
|
121
|
+
entry: last
|
|
122
|
+
};
|
|
123
|
+
const entry = {
|
|
124
|
+
kind: "assistant",
|
|
125
|
+
id: `a${state.nextId}`,
|
|
126
|
+
text: "",
|
|
127
|
+
thinking: "",
|
|
128
|
+
streaming: true,
|
|
129
|
+
...state.profileIdentity === null ? {} : { identity: state.profileIdentity }
|
|
130
|
+
};
|
|
131
|
+
return {
|
|
132
|
+
state: withEntry(state, entry),
|
|
133
|
+
entry
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function applyAssistantDelta(state, event) {
|
|
137
|
+
const type = asString(event.type);
|
|
138
|
+
if (type !== "text_delta" && type !== "thinking_delta" && type !== "text_start" && type !== "thinking_start") return state;
|
|
139
|
+
const opened = openAssistant(state);
|
|
140
|
+
const delta = asString(event.delta);
|
|
141
|
+
if (!delta) return opened.state;
|
|
142
|
+
const next = type === "thinking_delta" ? {
|
|
143
|
+
...opened.entry,
|
|
144
|
+
thinking: opened.entry.thinking + delta
|
|
145
|
+
} : {
|
|
146
|
+
...opened.entry,
|
|
147
|
+
text: opened.entry.text + delta
|
|
148
|
+
};
|
|
149
|
+
return replaceEntry(opened.state, opened.entry.id, next);
|
|
150
|
+
}
|
|
151
|
+
function closeAssistant(state, message) {
|
|
152
|
+
const index = state.entries.findLastIndex((entry) => entry.kind === "assistant" && entry.streaming);
|
|
153
|
+
if (index === -1) return state;
|
|
154
|
+
const current = state.entries[index];
|
|
155
|
+
const content = isRecord(message) ? message.content : void 0;
|
|
156
|
+
const hasContent = typeof content === "string" || Array.isArray(content);
|
|
157
|
+
const next = {
|
|
158
|
+
...current,
|
|
159
|
+
text: hasContent ? textFromContent(content) : current.text,
|
|
160
|
+
thinking: hasContent ? thinkingFromContent(Array.isArray(content) ? content.filter(isRecord) : []) : current.thinking,
|
|
161
|
+
streaming: false
|
|
162
|
+
};
|
|
163
|
+
const entries = [...state.entries];
|
|
164
|
+
if (next.text || next.thinking) entries[index] = next;
|
|
165
|
+
else entries.splice(index, 1);
|
|
166
|
+
return {
|
|
167
|
+
...state,
|
|
168
|
+
entries
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function toolEntryFromStart(frame, id) {
|
|
172
|
+
return {
|
|
173
|
+
kind: "tool",
|
|
174
|
+
id,
|
|
175
|
+
toolCallId: asString(frame.toolCallId),
|
|
176
|
+
name: asString(frame.toolName, "tool"),
|
|
177
|
+
args: isRecord(frame.args) ? frame.args : {},
|
|
178
|
+
argSummary: summariseArgs(frame.args),
|
|
179
|
+
result: null,
|
|
180
|
+
output: "",
|
|
181
|
+
isError: false,
|
|
182
|
+
running: true
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function applyToolStart(state, frame) {
|
|
186
|
+
const closed = closeAssistant(state, void 0);
|
|
187
|
+
const toolCallId = asString(frame.toolCallId);
|
|
188
|
+
if (toolCallId !== "" && closed.entries.some((entry) => entry.kind === "tool" && entry.toolCallId === toolCallId)) return {
|
|
189
|
+
...closed,
|
|
190
|
+
toolsThisRun: closed.toolsThisRun + 1
|
|
191
|
+
};
|
|
192
|
+
const opened = withEntry(closed, toolEntryFromStart(frame, `t${state.nextId}`));
|
|
193
|
+
return {
|
|
194
|
+
...opened,
|
|
195
|
+
toolsThisRun: opened.toolsThisRun + 1
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The result a tool frame carries, kept whole: the text blocks feed the
|
|
200
|
+
* default card, and the content plus details reach the owning plugin's
|
|
201
|
+
* renderer untouched, the way Pi hands them to a TUI renderResult.
|
|
202
|
+
*/
|
|
203
|
+
function toolResult(raw) {
|
|
204
|
+
if (!isRecord(raw)) return null;
|
|
205
|
+
return {
|
|
206
|
+
content: Array.isArray(raw.content) ? raw.content : [],
|
|
207
|
+
details: raw.details
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
function updateTool(state, toolCallId, patch) {
|
|
211
|
+
const index = state.entries.findLastIndex((entry) => entry.kind === "tool" && entry.toolCallId === toolCallId);
|
|
212
|
+
if (index === -1) return state;
|
|
213
|
+
const entries = [...state.entries];
|
|
214
|
+
entries[index] = {
|
|
215
|
+
...entries[index],
|
|
216
|
+
...patch
|
|
217
|
+
};
|
|
218
|
+
return {
|
|
219
|
+
...state,
|
|
220
|
+
entries
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
function modelChoice(value) {
|
|
224
|
+
if (!isRecord(value) || typeof value.id !== "string" || typeof value.provider !== "string") return void 0;
|
|
225
|
+
return {
|
|
226
|
+
provider: value.provider,
|
|
227
|
+
id: value.id,
|
|
228
|
+
name: asString(value.name, value.id),
|
|
229
|
+
reasoning: value.reasoning === true
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function applyResponse(state, frame) {
|
|
233
|
+
const command = asString(frame.command);
|
|
234
|
+
if (frame.success === false && command !== "get_state" && command !== "get_session_stats") return withEntry(state, {
|
|
235
|
+
kind: "notice",
|
|
236
|
+
id: `n${state.nextId}`,
|
|
237
|
+
text: asString(frame.error, `The agent refused ${command}.`),
|
|
238
|
+
tone: "error"
|
|
239
|
+
});
|
|
240
|
+
const data = frame.data;
|
|
241
|
+
if (!isRecord(data)) return state;
|
|
242
|
+
if (command === "get_state") {
|
|
243
|
+
const model = isRecord(data.model) ? asString(data.model.id ?? data.model.name, "unknown") : "unknown";
|
|
244
|
+
const provider = isRecord(data.model) ? asString(data.model.provider) : "";
|
|
245
|
+
const streaming = state.lifecycle !== null ? state.lifecycle.operation !== null : data.isStreaming === void 0 ? state.streaming : data.isStreaming === true;
|
|
246
|
+
return {
|
|
247
|
+
...state,
|
|
248
|
+
streaming,
|
|
249
|
+
settled: !streaming,
|
|
250
|
+
fastMode: data.fastMode === true,
|
|
251
|
+
agentLocked: data.agentLocked === true,
|
|
252
|
+
agent: {
|
|
253
|
+
model,
|
|
254
|
+
provider,
|
|
255
|
+
thinkingLevel: asString(data.thinkingLevel, state.agent?.thinkingLevel ?? "unknown"),
|
|
256
|
+
sessionId: asString(data.sessionId, state.agent?.sessionId ?? ""),
|
|
257
|
+
sessionName: asString(data.sessionName, state.agent?.sessionName ?? ""),
|
|
258
|
+
messageCount: asNumber(data.messageCount) ?? state.agent?.messageCount ?? 0,
|
|
259
|
+
isStreaming: streaming
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
if (command === "navigate_tree" && data.cancelled !== true) {
|
|
264
|
+
const editorText = asString(data.editorText);
|
|
265
|
+
return {
|
|
266
|
+
...state,
|
|
267
|
+
editorTextRequest: {
|
|
268
|
+
id: `rewind:${asString(data.leafId, "root")}:${String(state.nextId)}`,
|
|
269
|
+
text: editorText
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
if (command === "get_available_models") {
|
|
274
|
+
const models = Array.isArray(data.models) ? data.models.map(modelChoice).filter((m) => m !== void 0) : [];
|
|
275
|
+
return {
|
|
276
|
+
...state,
|
|
277
|
+
models
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
if (command === "get_available_thinking_levels") {
|
|
281
|
+
const levels = Array.isArray(data.levels) ? data.levels.filter((level) => typeof level === "string") : [];
|
|
282
|
+
return {
|
|
283
|
+
...state,
|
|
284
|
+
thinkingLevels: levels
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
if (command === "set_model" && state.agent) {
|
|
288
|
+
const chosen = modelChoice(data);
|
|
289
|
+
return chosen ? {
|
|
290
|
+
...state,
|
|
291
|
+
agent: {
|
|
292
|
+
...state.agent,
|
|
293
|
+
model: chosen.id,
|
|
294
|
+
provider: chosen.provider
|
|
295
|
+
}
|
|
296
|
+
} : state;
|
|
297
|
+
}
|
|
298
|
+
if (command === "get_session_stats") {
|
|
299
|
+
const tokens = isRecord(data.tokens) ? asNumber(data.tokens.total) : null;
|
|
300
|
+
const usage = isRecord(data.contextUsage) ? data.contextUsage : void 0;
|
|
301
|
+
return {
|
|
302
|
+
...state,
|
|
303
|
+
stats: {
|
|
304
|
+
cost: asNumber(data.cost) ?? 0,
|
|
305
|
+
totalTokens: tokens ?? 0,
|
|
306
|
+
contextPercent: usage ? asNumber(usage.percent) : null,
|
|
307
|
+
contextTokens: usage ? asNumber(usage.tokens) : null,
|
|
308
|
+
contextWindow: usage ? asNumber(usage.contextWindow) : null
|
|
309
|
+
},
|
|
310
|
+
liveCost: 0
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
if (command === "get_commands") {
|
|
314
|
+
const reported = (Array.isArray(data.commands) ? data.commands : []).filter(isRecord).map((entry) => ({
|
|
315
|
+
name: asString(entry.name),
|
|
316
|
+
description: asString(entry.description)
|
|
317
|
+
})).filter((entry) => entry.name.length > 0);
|
|
318
|
+
const claimed = new Set(reported.map((entry) => entry.name));
|
|
319
|
+
const commands = [...reported, ...require_commands.BUILTIN_COMMANDS.filter((entry) => !claimed.has(entry.name))];
|
|
320
|
+
return {
|
|
321
|
+
...state,
|
|
322
|
+
commands
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
return state;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Folds the streaming message's own cost into the view model.
|
|
329
|
+
*
|
|
330
|
+
* Pi builds `message_update.usage` from the in-progress message's usage, not
|
|
331
|
+
* from a session running total, so this is added to the last figure Pi
|
|
332
|
+
* reported rather than replacing it. Providers that only price a message once
|
|
333
|
+
* it completes report zero here, and the chip then steps at each message
|
|
334
|
+
* instead of streaming, which is the provider's granularity showing through
|
|
335
|
+
* rather than a fault.
|
|
336
|
+
*/
|
|
337
|
+
function applyLiveUsage(state, frame) {
|
|
338
|
+
if (asString(frame.type) !== "message_update") return state;
|
|
339
|
+
const usage = isRecord(frame.usage) ? frame.usage : void 0;
|
|
340
|
+
const cost = usage && isRecord(usage.cost) ? asNumber(usage.cost.total) ?? 0 : 0;
|
|
341
|
+
if (state.liveCost === cost) return state;
|
|
342
|
+
return {
|
|
343
|
+
...state,
|
|
344
|
+
liveCost: cost
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function applyStatus(state, frame) {
|
|
348
|
+
const key = asString(frame.statusKey);
|
|
349
|
+
if (!key) return state;
|
|
350
|
+
const text = typeof frame.statusText === "string" ? frame.statusText : "";
|
|
351
|
+
if (state.statuses[key] === text) return state;
|
|
352
|
+
return {
|
|
353
|
+
...state,
|
|
354
|
+
statuses: {
|
|
355
|
+
...state.statuses,
|
|
356
|
+
[key]: text
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
function applyContextSelection(state, projection) {
|
|
361
|
+
const selection = projection.selection;
|
|
362
|
+
if (!selection || !selection.majorMode || !Array.isArray(selection.domains)) return {
|
|
363
|
+
...state,
|
|
364
|
+
context: projection
|
|
365
|
+
};
|
|
366
|
+
const profile = typeof selection.profile === "string" ? selection.profile : "";
|
|
367
|
+
const status = [
|
|
368
|
+
profile ? `*${profile}*` : void 0,
|
|
369
|
+
`[${selection.majorMode}]`,
|
|
370
|
+
selection.domains.join(",")
|
|
371
|
+
].filter(Boolean).join(":");
|
|
372
|
+
return {
|
|
373
|
+
...state,
|
|
374
|
+
context: projection,
|
|
375
|
+
statuses: {
|
|
376
|
+
...state.statuses,
|
|
377
|
+
"doom-major-mode": status,
|
|
378
|
+
"doom-domain": selection.domains.join(","),
|
|
379
|
+
"doom-profile": profile
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function applyWidget(state, frame) {
|
|
384
|
+
const key = asString(frame.widgetKey);
|
|
385
|
+
if (!key) return state;
|
|
386
|
+
if (!(Array.isArray(frame.widgetLines) && frame.widgetLines.length > 0)) {
|
|
387
|
+
if (!state.widgets.includes(key)) return state;
|
|
388
|
+
return {
|
|
389
|
+
...state,
|
|
390
|
+
widgets: state.widgets.filter((widget) => widget !== key)
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
if (state.widgets.includes(key)) return state;
|
|
394
|
+
return {
|
|
395
|
+
...state,
|
|
396
|
+
widgets: [...state.widgets, key]
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function applyDialog(state, frame) {
|
|
400
|
+
const method = asString(frame.method);
|
|
401
|
+
if (method === "setStatus") return applyStatus(state, frame);
|
|
402
|
+
if (method === "setWidget") return applyWidget(state, frame);
|
|
403
|
+
if (method === "append_composer_text") {
|
|
404
|
+
if (typeof frame.text !== "string") return state;
|
|
405
|
+
return {
|
|
406
|
+
...state,
|
|
407
|
+
editorTextRequest: {
|
|
408
|
+
id: asString(frame.id),
|
|
409
|
+
text: frame.text,
|
|
410
|
+
append: true
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
if (method === "set_editor_text") {
|
|
415
|
+
if (typeof frame.text !== "string") return state;
|
|
416
|
+
return {
|
|
417
|
+
...state,
|
|
418
|
+
editorTextRequest: {
|
|
419
|
+
id: asString(frame.id),
|
|
420
|
+
text: frame.text
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
if (method !== "select" && method !== "confirm" && method !== "input" && method !== "editor") return state;
|
|
425
|
+
const options = Array.isArray(frame.options) ? frame.options.map((option) => asString(option)).filter(Boolean) : [];
|
|
426
|
+
return {
|
|
427
|
+
...state,
|
|
428
|
+
dialog: {
|
|
429
|
+
id: asString(frame.id),
|
|
430
|
+
method,
|
|
431
|
+
title: asString(frame.title, "The agent needs an answer"),
|
|
432
|
+
message: asString(frame.message),
|
|
433
|
+
options,
|
|
434
|
+
placeholder: asString(frame.placeholder),
|
|
435
|
+
prefill: asString(frame.prefill)
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
/** The thinking blocks of a journalled assistant message, joined as one passage. */
|
|
440
|
+
function thinkingFromContent(content) {
|
|
441
|
+
return content.map((block) => block.type === "thinking" ? asString(block.thinking) : "").filter(Boolean).join("");
|
|
442
|
+
}
|
|
443
|
+
/** Remembers a prompt this page rendered, so the journal's copy of it folds into the same entry. */
|
|
444
|
+
function withPendingUser(state, id, text, images = []) {
|
|
445
|
+
const pending = {
|
|
446
|
+
id,
|
|
447
|
+
text,
|
|
448
|
+
...images.length > 0 ? { images } : {}
|
|
449
|
+
};
|
|
450
|
+
return {
|
|
451
|
+
...state,
|
|
452
|
+
pendingUserEntries: [...state.pendingUserEntries, pending]
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Folds a journalled user message into the entry this page already rendered
|
|
457
|
+
* for it, or returns undefined when no such entry exists.
|
|
458
|
+
*
|
|
459
|
+
* A message the cockpit sent is on screen before it reaches the journal, and a
|
|
460
|
+
* queued one is on screen as queued until the run picks it up. Both are the
|
|
461
|
+
* same message the journal later reports, so it settles the entry that stands
|
|
462
|
+
* rather than adding a second copy of the text.
|
|
463
|
+
*
|
|
464
|
+
* A prompt Pi's protocol snapshot already claimed is matched here too. That
|
|
465
|
+
* claim consumed the pending record, so without the second list a journalled
|
|
466
|
+
* copy arriving after the run, which is what happens when transcript
|
|
467
|
+
* ownership falls back to the journal, would read as a new message and be
|
|
468
|
+
* appended below the settled divider.
|
|
469
|
+
*/
|
|
470
|
+
function reconcilePendingUser(state, text, images) {
|
|
471
|
+
const index = state.pendingUserEntries.findIndex((pending) => pending.text === text);
|
|
472
|
+
const reconciledIndex = index === -1 ? state.reconciledUserEntries.findIndex((claimed) => claimed.text === text) : -1;
|
|
473
|
+
if (index === -1 && reconciledIndex === -1) return void 0;
|
|
474
|
+
const source = index === -1 ? state.reconciledUserEntries : state.pendingUserEntries;
|
|
475
|
+
const at = index === -1 ? reconciledIndex : index;
|
|
476
|
+
const pending = source[at];
|
|
477
|
+
const remaining = index === -1 ? state.reconciledUserEntries : source.filter((_, position) => position !== at);
|
|
478
|
+
const entries = state.entries.map((entry) => {
|
|
479
|
+
if (entry.id !== pending.id) return entry;
|
|
480
|
+
const reconciledImages = images.length > 0 ? images : pending.images;
|
|
481
|
+
if (entry.kind === "queued") return {
|
|
482
|
+
kind: "user",
|
|
483
|
+
id: entry.id,
|
|
484
|
+
text: entry.text,
|
|
485
|
+
...reconciledImages ? { images: reconciledImages } : {}
|
|
486
|
+
};
|
|
487
|
+
return entry.kind === "user" && images.length > 0 ? {
|
|
488
|
+
...entry,
|
|
489
|
+
images
|
|
490
|
+
} : entry;
|
|
491
|
+
});
|
|
492
|
+
return index === -1 ? {
|
|
493
|
+
...state,
|
|
494
|
+
entries,
|
|
495
|
+
reconciledUserEntries: remaining
|
|
496
|
+
} : {
|
|
497
|
+
...state,
|
|
498
|
+
entries,
|
|
499
|
+
pendingUserEntries: remaining
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Folds one journalled message into the timeline.
|
|
504
|
+
*
|
|
505
|
+
* The journal is the session's own record, so its shape is not the live frame
|
|
506
|
+
* shape: a tool call is a block inside an assistant message (`id`,
|
|
507
|
+
* `arguments`) rather than a tool_execution_start frame, and its result is a
|
|
508
|
+
* message of its own. Mapping them here is what lets a transcript written
|
|
509
|
+
* before this page existed read exactly like one it watched arrive.
|
|
510
|
+
*/
|
|
511
|
+
function applyJournalMessage(state, message, entryId, timestamp) {
|
|
512
|
+
const role = asString(message.role);
|
|
513
|
+
const content = typeof message.content === "string" ? [{
|
|
514
|
+
type: "text",
|
|
515
|
+
text: message.content
|
|
516
|
+
}] : Array.isArray(message.content) ? message.content.filter(isRecord) : [];
|
|
517
|
+
if (role === "user") {
|
|
518
|
+
const text = textFromContent(content);
|
|
519
|
+
const images = imagesFromContent(content);
|
|
520
|
+
if (!text && images.length === 0) return state;
|
|
521
|
+
return reconcilePendingUser(state, text, images) ?? withEntry(state, {
|
|
522
|
+
kind: "user",
|
|
523
|
+
id: entryId ?? `u${state.nextId}`,
|
|
524
|
+
text,
|
|
525
|
+
...timestamp === void 0 ? {} : { timestamp },
|
|
526
|
+
...images.length > 0 ? { images } : {}
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
if (role === "assistant") {
|
|
530
|
+
timestamp ??= asNumber(message.timestamp) ?? void 0;
|
|
531
|
+
const model = typeof message.model === "string" ? message.model : void 0;
|
|
532
|
+
const text = textFromContent(content);
|
|
533
|
+
const thinking = thinkingFromContent(content);
|
|
534
|
+
const draft = state.entries.findLast((item) => item.kind === "assistant" && item.streaming);
|
|
535
|
+
if (draft && entryId && !state.entries.some((item) => item.id === entryId)) {
|
|
536
|
+
state = closeAssistant(state, message);
|
|
537
|
+
state = {
|
|
538
|
+
...state,
|
|
539
|
+
entries: state.entries.map((item) => item.id === draft.id ? {
|
|
540
|
+
...item,
|
|
541
|
+
id: entryId,
|
|
542
|
+
...timestamp === void 0 ? {} : { timestamp },
|
|
543
|
+
...model === void 0 ? {} : { model }
|
|
544
|
+
} : item)
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
let next = (text || thinking) && !state.entries.some((item) => item.id === entryId) ? withEntry(state, {
|
|
548
|
+
kind: "assistant",
|
|
549
|
+
id: entryId ?? `a${state.nextId}`,
|
|
550
|
+
...timestamp === void 0 ? {} : { timestamp },
|
|
551
|
+
...model === void 0 ? {} : { model },
|
|
552
|
+
text,
|
|
553
|
+
thinking,
|
|
554
|
+
streaming: false,
|
|
555
|
+
...state.profileIdentity === null ? {} : { identity: state.profileIdentity }
|
|
556
|
+
}) : state;
|
|
557
|
+
for (const block of content) {
|
|
558
|
+
if (block.type !== "toolCall") continue;
|
|
559
|
+
if (next.entries.some((item) => item.kind === "tool" && item.toolCallId === asString(block.id))) continue;
|
|
560
|
+
next = withEntry(next, {
|
|
561
|
+
kind: "tool",
|
|
562
|
+
id: entryId ? `tool:${asString(block.id)}` : `t${next.nextId}`,
|
|
563
|
+
...timestamp === void 0 ? {} : { timestamp },
|
|
564
|
+
toolCallId: asString(block.id),
|
|
565
|
+
name: asString(block.name, "tool"),
|
|
566
|
+
args: isRecord(block.arguments) ? block.arguments : {},
|
|
567
|
+
argSummary: summariseArgs(block.arguments),
|
|
568
|
+
result: null,
|
|
569
|
+
output: "",
|
|
570
|
+
isError: false,
|
|
571
|
+
running: true
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
return next;
|
|
575
|
+
}
|
|
576
|
+
if (role === "toolResult") return updateTool(state, asString(message.toolCallId), {
|
|
577
|
+
result: {
|
|
578
|
+
content,
|
|
579
|
+
details: message.details
|
|
580
|
+
},
|
|
581
|
+
output: textFromContent(content),
|
|
582
|
+
isError: message.isError === true,
|
|
583
|
+
running: false
|
|
584
|
+
});
|
|
585
|
+
return state;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Folds one journal entry, once. Entries without an id are the runtime's own
|
|
589
|
+
* bookkeeping and are left alone; a message already folded is skipped, which
|
|
590
|
+
* is what makes a re-attach idempotent.
|
|
591
|
+
*/
|
|
592
|
+
function applyJournalEntry(state, entry) {
|
|
593
|
+
if (entry.type !== "message" || !isRecord(entry.message)) return state;
|
|
594
|
+
const id = asString(entry.id);
|
|
595
|
+
if (id === "" || state.restoredIds.includes(id)) return state;
|
|
596
|
+
const next = applyJournalMessage(state, entry.message, id, asNumber(entry.timestamp) ?? void 0);
|
|
597
|
+
return {
|
|
598
|
+
...next,
|
|
599
|
+
restoredIds: [...next.restoredIds, id]
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Records a journal entry the protocol already publishes, without folding it.
|
|
604
|
+
*
|
|
605
|
+
* The hub re-reads the journal at every run boundary and re-publishes user
|
|
606
|
+
* messages, because no live frame carries one. Dropping those copies without a
|
|
607
|
+
* trace left the page with no memory of them, so a copy arriving after protocol
|
|
608
|
+
* ownership lapsed read as a new prompt and landed below the settled divider.
|
|
609
|
+
* Keeping the id is what makes the drop idempotent.
|
|
610
|
+
*/
|
|
611
|
+
function rememberJournalEntry(state, entry) {
|
|
612
|
+
if (entry.type !== "message" || !isRecord(entry.message)) return state;
|
|
613
|
+
const id = asString(entry.id);
|
|
614
|
+
if (id === "" || state.restoredIds.includes(id)) return state;
|
|
615
|
+
return {
|
|
616
|
+
...state,
|
|
617
|
+
restoredIds: [...state.restoredIds, id]
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Folds an older window of transcript above what the page already holds.
|
|
622
|
+
*
|
|
623
|
+
* The reducer is append-only by design: it builds the timeline as the session
|
|
624
|
+
* produces it. Paging backwards is the one case that runs the other way, so
|
|
625
|
+
* the window is reduced on its own and the result is prepended, rather than
|
|
626
|
+
* teaching every case in the reducer about a second direction.
|
|
627
|
+
*
|
|
628
|
+
* Entry ids are positional, so a window reduced from scratch would collide
|
|
629
|
+
* with the live entries. Prefixing by page keeps every key unique and stable
|
|
630
|
+
* across re-renders, which is what a virtualised list needs to keep its
|
|
631
|
+
* measurements.
|
|
632
|
+
*/
|
|
633
|
+
function prependHistory(state, frames, page) {
|
|
634
|
+
const older = frames.reduce((carried, frame) => reduceSession(carried, frame), initialSessionState);
|
|
635
|
+
const known = new Set(state.restoredIds);
|
|
636
|
+
const restored = older.restoredIds.filter((id) => !known.has(id));
|
|
637
|
+
if (restored.length === 0) return state;
|
|
638
|
+
const prefix = `h${page}-`;
|
|
639
|
+
const entries = older.entries.filter((entry) => entry.kind !== "notice").map((entry) => ({
|
|
640
|
+
...entry,
|
|
641
|
+
id: `${prefix}${entry.id}`
|
|
642
|
+
}));
|
|
643
|
+
return {
|
|
644
|
+
...state,
|
|
645
|
+
entries: [...entries, ...state.entries],
|
|
646
|
+
restoredIds: [...restored, ...state.restoredIds]
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Folds one agent frame into the view model.
|
|
651
|
+
*
|
|
652
|
+
* Pure and total: an unrecognised frame returns the state unchanged, so a Pi
|
|
653
|
+
* protocol addition cannot break the cockpit, it just is not rendered yet.
|
|
654
|
+
*/
|
|
655
|
+
/** Frames whose only product is a timeline entry the protocol now publishes. */
|
|
656
|
+
const TRANSCRIPT_FRAMES = /* @__PURE__ */ new Set([
|
|
657
|
+
"message_start",
|
|
658
|
+
"message_update",
|
|
659
|
+
"message_end",
|
|
660
|
+
"tool_execution_start",
|
|
661
|
+
"tool_execution_update",
|
|
662
|
+
"tool_execution_end"
|
|
663
|
+
]);
|
|
664
|
+
function reduceSession(state, frame, options = {}) {
|
|
665
|
+
return reduceFrame(applyLiveUsage(state, frame), frame, options);
|
|
666
|
+
}
|
|
667
|
+
function reduceFrame(state, frame, options) {
|
|
668
|
+
const type = asString(frame.type);
|
|
669
|
+
if (options.transcriptFromProtocol && TRANSCRIPT_FRAMES.has(type)) {
|
|
670
|
+
if (type === "tool_execution_start") {
|
|
671
|
+
const active = toolEntryFromStart(frame, `active:${asString(frame.toolCallId)}`);
|
|
672
|
+
const activeTools = [...state.activeTools.filter((entry) => entry.toolCallId !== active.toolCallId), active];
|
|
673
|
+
return {
|
|
674
|
+
...state,
|
|
675
|
+
activeTools,
|
|
676
|
+
toolsThisRun: state.toolsThisRun + 1
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
if (type === "tool_execution_end") {
|
|
680
|
+
const toolCallId = asString(frame.toolCallId);
|
|
681
|
+
return {
|
|
682
|
+
...state,
|
|
683
|
+
activeTools: state.activeTools.filter((entry) => entry.toolCallId !== toolCallId)
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
return state;
|
|
687
|
+
}
|
|
688
|
+
switch (type) {
|
|
689
|
+
case "replay": return isRecord(frame.frame) ? reduceSession(state, frame.frame, options) : state;
|
|
690
|
+
case "agent_start": return {
|
|
691
|
+
...state,
|
|
692
|
+
activeTools: [],
|
|
693
|
+
streaming: state.lifecycle === null ? true : state.lifecycle.operation !== null,
|
|
694
|
+
settled: false,
|
|
695
|
+
toolsThisRun: 0
|
|
696
|
+
};
|
|
697
|
+
case "message_start":
|
|
698
|
+
case "message_update": {
|
|
699
|
+
const event = isRecord(frame.assistantMessageEvent) ? frame.assistantMessageEvent : void 0;
|
|
700
|
+
const message = isRecord(frame.message) ? frame.message : event?.type === "start" && isRecord(event.partial) ? event.partial : void 0;
|
|
701
|
+
if (message?.role !== void 0 && message.role !== "assistant") return state;
|
|
702
|
+
const timestamp = asNumber(message?.timestamp);
|
|
703
|
+
const model = typeof message?.model === "string" ? message.model : void 0;
|
|
704
|
+
if (type === "message_start" && timestamp !== null) {
|
|
705
|
+
const previous = state.entries.findLast((entry) => entry.kind === "assistant" && entry.timestamp !== void 0);
|
|
706
|
+
if (previous?.kind === "assistant" && previous.timestamp !== void 0) {
|
|
707
|
+
if (previous.timestamp > timestamp || previous.timestamp === timestamp && (!model || !previous.model || previous.model === model)) return state;
|
|
708
|
+
if (previous.streaming && previous.timestamp < timestamp) state = closeAssistant(state, void 0);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
if (message && (typeof message.content === "string" || Array.isArray(message.content))) {
|
|
712
|
+
const opened = openAssistant(state);
|
|
713
|
+
return replaceEntry(opened.state, opened.entry.id, {
|
|
714
|
+
...opened.entry,
|
|
715
|
+
...timestamp === null ? {} : { timestamp },
|
|
716
|
+
...model === void 0 ? {} : { model },
|
|
717
|
+
text: textFromContent(message.content),
|
|
718
|
+
thinking: thinkingFromContent(Array.isArray(message.content) ? message.content.filter(isRecord) : [])
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
return isRecord(frame.assistantMessageEvent) ? applyAssistantDelta(state, frame.assistantMessageEvent) : state;
|
|
722
|
+
}
|
|
723
|
+
case "message_end": {
|
|
724
|
+
if (isRecord(frame.message) && frame.message.role !== void 0 && frame.message.role !== "assistant") return state;
|
|
725
|
+
const id = asString(frame.entryId);
|
|
726
|
+
if (id && state.entries.some((item) => item.id === id)) return state;
|
|
727
|
+
const draft = state.entries.findLast((item) => item.kind === "assistant" && item.streaming);
|
|
728
|
+
const closed = closeAssistant(state, frame.message);
|
|
729
|
+
if (!id || !draft) return closed;
|
|
730
|
+
return {
|
|
731
|
+
...closed,
|
|
732
|
+
entries: closed.entries.map((item) => item.id === draft.id ? {
|
|
733
|
+
...item,
|
|
734
|
+
id
|
|
735
|
+
} : item)
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
case "tool_execution_start": return applyToolStart(state, frame);
|
|
739
|
+
case "tool_execution_update": return updateTool(state, asString(frame.toolCallId), {
|
|
740
|
+
result: toolResult(frame.partialResult),
|
|
741
|
+
output: textFromContent(isRecord(frame.partialResult) ? frame.partialResult.content : void 0)
|
|
742
|
+
});
|
|
743
|
+
case "tool_execution_end": return updateTool(state, asString(frame.toolCallId), {
|
|
744
|
+
result: toolResult(frame.result),
|
|
745
|
+
output: textFromContent(isRecord(frame.result) ? frame.result.content : void 0),
|
|
746
|
+
isError: frame.isError === true,
|
|
747
|
+
running: false
|
|
748
|
+
});
|
|
749
|
+
case "agent_settled": {
|
|
750
|
+
const closed = options.transcriptFromProtocol ? state : closeAssistant(state, void 0);
|
|
751
|
+
const timestamp = asNumber(frame.timestamp) ?? void 0;
|
|
752
|
+
const id = typeof frame.runId === "string" ? `settled:${frame.runId}` : `s${closed.nextId}`;
|
|
753
|
+
return {
|
|
754
|
+
...closed.entries.some((entry) => entry.id === id) ? closed : withChronologicalEntry(closed, {
|
|
755
|
+
kind: "settled",
|
|
756
|
+
id,
|
|
757
|
+
tools: closed.toolsThisRun,
|
|
758
|
+
...timestamp === void 0 ? {} : { timestamp }
|
|
759
|
+
}),
|
|
760
|
+
activeTools: [],
|
|
761
|
+
dialog: null,
|
|
762
|
+
streaming: state.lifecycle === null ? false : state.lifecycle.operation !== null,
|
|
763
|
+
settled: state.lifecycle === null ? true : state.lifecycle.operation === null
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
case "queue_update": {
|
|
767
|
+
if (state.lifecycle !== null) return state;
|
|
768
|
+
const steering = Array.isArray(frame.steering) ? frame.steering : [];
|
|
769
|
+
const followUp = Array.isArray(frame.followUp) ? frame.followUp : [];
|
|
770
|
+
const queue = [...steering.map((entry) => ({
|
|
771
|
+
text: asString(entry),
|
|
772
|
+
delivery: "steer"
|
|
773
|
+
})), ...followUp.map((entry) => ({
|
|
774
|
+
text: asString(entry),
|
|
775
|
+
delivery: "followUp"
|
|
776
|
+
}))].map((entry, index) => ({
|
|
777
|
+
kind: "queued",
|
|
778
|
+
id: `queue-${index}`,
|
|
779
|
+
...entry
|
|
780
|
+
})).filter((entry) => entry.text.length > 0);
|
|
781
|
+
return replaceQueuedEntries(state, queue);
|
|
782
|
+
}
|
|
783
|
+
case "extension_ui_request":
|
|
784
|
+
if (frame.method === "notify") {
|
|
785
|
+
const text = asString(frame.message, "");
|
|
786
|
+
if (text === "") return state;
|
|
787
|
+
return withEntry(state, {
|
|
788
|
+
kind: "notice",
|
|
789
|
+
id: `n${state.nextId}`,
|
|
790
|
+
text,
|
|
791
|
+
tone: frame.notifyType === "error" ? "error" : "info"
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
return applyDialog(state, frame);
|
|
795
|
+
case require_hub.DIALOG_ANSWERED_TYPE: return state.dialog && state.dialog.id === asString(frame.id) ? {
|
|
796
|
+
...state,
|
|
797
|
+
dialog: null
|
|
798
|
+
} : state;
|
|
799
|
+
case "fast_mode_changed": return typeof frame.enabled === "boolean" ? {
|
|
800
|
+
...state,
|
|
801
|
+
fastMode: frame.enabled
|
|
802
|
+
} : state;
|
|
803
|
+
case "agent_lock_changed": return typeof frame.locked === "boolean" ? {
|
|
804
|
+
...state,
|
|
805
|
+
agentLocked: frame.locked
|
|
806
|
+
} : state;
|
|
807
|
+
case "thinking_level_changed": {
|
|
808
|
+
if (state.agent === null) return state;
|
|
809
|
+
const level = asString(frame.level, state.agent.thinkingLevel);
|
|
810
|
+
return {
|
|
811
|
+
...state,
|
|
812
|
+
agent: {
|
|
813
|
+
...state.agent,
|
|
814
|
+
thinkingLevel: level
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
case "entry_appended": {
|
|
819
|
+
const entry = isRecord(frame.entry) ? frame.entry : void 0;
|
|
820
|
+
if (!entry) return state;
|
|
821
|
+
const notification = require_notification.parseDoomNotificationEntry(frame);
|
|
822
|
+
if (notification) {
|
|
823
|
+
if (state.restoredIds.includes(notification.entryId)) return state;
|
|
824
|
+
const timestamp = asNumber(entry.timestamp) ?? void 0;
|
|
825
|
+
const next = withChronologicalEntry(state, {
|
|
826
|
+
kind: "notice",
|
|
827
|
+
id: `n${state.nextId}`,
|
|
828
|
+
text: notification.data.body,
|
|
829
|
+
tone: notification.data.level === "error" ? "error" : "info",
|
|
830
|
+
...timestamp === void 0 ? {} : { timestamp }
|
|
831
|
+
});
|
|
832
|
+
return {
|
|
833
|
+
...next,
|
|
834
|
+
restoredIds: [...next.restoredIds, notification.entryId]
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
if (entry.type === "custom" && entry.customType === "doom-minor-modes") {
|
|
838
|
+
const data = isRecord(entry.data) ? entry.data : void 0;
|
|
839
|
+
if (!data || !Array.isArray(data.modes)) return state;
|
|
840
|
+
return {
|
|
841
|
+
...state,
|
|
842
|
+
minorModes: data
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
if (entry.type === "custom" && entry.customType === "doom-context") {
|
|
846
|
+
const data = isRecord(entry.data) ? entry.data : void 0;
|
|
847
|
+
if (!data || !Array.isArray(data.groups)) return state;
|
|
848
|
+
return applyContextSelection(state, data);
|
|
849
|
+
}
|
|
850
|
+
if (entry.type === "custom" && entry.customType === "doom-agent-model") {
|
|
851
|
+
const data = isRecord(entry.data) ? entry.data : void 0;
|
|
852
|
+
if (!data || state.agent === null) return state;
|
|
853
|
+
const id = asString(data.id, "");
|
|
854
|
+
const provider = asString(data.provider, "");
|
|
855
|
+
if (id === "" || provider === "") return state;
|
|
856
|
+
return {
|
|
857
|
+
...state,
|
|
858
|
+
agent: {
|
|
859
|
+
...state.agent,
|
|
860
|
+
model: id,
|
|
861
|
+
provider
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
if (entry.type === "custom" && entry.customType === "doom-profile-identity") {
|
|
866
|
+
const data = isRecord(entry.data) ? entry.data : void 0;
|
|
867
|
+
const profile = asString(data?.profile, "");
|
|
868
|
+
if (profile === "") return state;
|
|
869
|
+
const name = asString(data?.name, "");
|
|
870
|
+
const icon = asString(data?.icon, "");
|
|
871
|
+
return {
|
|
872
|
+
...state,
|
|
873
|
+
profileIdentity: {
|
|
874
|
+
profile,
|
|
875
|
+
...name === "" ? {} : { name },
|
|
876
|
+
...icon === "" ? {} : { icon }
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
if (entry.type === "custom" && entry.customType === "po.agent-settled") {
|
|
881
|
+
const data = isRecord(entry.data) ? entry.data : {};
|
|
882
|
+
const id = `settled:${asString(data.runId)}`;
|
|
883
|
+
if (state.entries.some((item) => item.id === id)) return state;
|
|
884
|
+
return withChronologicalEntry(state, {
|
|
885
|
+
kind: "settled",
|
|
886
|
+
id,
|
|
887
|
+
tools: asNumber(data.tools) ?? 0,
|
|
888
|
+
timestamp: asNumber(data.timestamp) ?? asNumber(entry.timestamp) ?? void 0
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
return options.transcriptFromProtocol ? rememberJournalEntry(state, entry) : applyJournalEntry(state, entry);
|
|
892
|
+
}
|
|
893
|
+
case "response": return applyResponse(state, frame);
|
|
894
|
+
case "error":
|
|
895
|
+
case "extension_error": return withEntry(state, {
|
|
896
|
+
kind: "notice",
|
|
897
|
+
id: `n${state.nextId}`,
|
|
898
|
+
text: asString(frame.message ?? frame.error, "The agent reported an error."),
|
|
899
|
+
tone: "error"
|
|
900
|
+
});
|
|
901
|
+
default: return state;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
/** Records the prompt locally, because Pi does not echo it back as an event. */
|
|
905
|
+
function appendUserPrompt(state, text, images = []) {
|
|
906
|
+
const id = `u${state.nextId}`;
|
|
907
|
+
return withPendingUser(withEntry(state, {
|
|
908
|
+
kind: "user",
|
|
909
|
+
id,
|
|
910
|
+
text,
|
|
911
|
+
...images.length > 0 ? { images } : {}
|
|
912
|
+
}), id, text, images);
|
|
913
|
+
}
|
|
914
|
+
/** A follow-up waits for the current run, so it is marked rather than shown as sent. */
|
|
915
|
+
function appendQueued(state, text, images = []) {
|
|
916
|
+
const id = `q${state.nextId}`;
|
|
917
|
+
return withPendingUser(withEntry(state, {
|
|
918
|
+
kind: "queued",
|
|
919
|
+
id,
|
|
920
|
+
text,
|
|
921
|
+
delivery: "followUp",
|
|
922
|
+
...images.length > 0 ? { images } : {}
|
|
923
|
+
}), id, text, images);
|
|
924
|
+
}
|
|
925
|
+
/** Uses server IDs as-is: equal text or a snapshot revision is not an item identity. */
|
|
926
|
+
function replaceQueuedEntries(state, queue) {
|
|
927
|
+
return {
|
|
928
|
+
...state,
|
|
929
|
+
entries: [...state.entries.filter((entry) => entry.kind !== "queued"), ...queue]
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
/** Removes queued rows and their reconciliation records after Pi clears the queue. */
|
|
933
|
+
function clearQueuedEntries(state) {
|
|
934
|
+
const queuedIds = new Set(state.entries.filter((entry) => entry.kind === "queued").map((entry) => entry.id));
|
|
935
|
+
return {
|
|
936
|
+
...state,
|
|
937
|
+
entries: state.entries.filter((entry) => entry.kind !== "queued"),
|
|
938
|
+
pendingUserEntries: state.pendingUserEntries.filter((entry) => !queuedIds.has(entry.id))
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
/** Removes one queued row and the optimistic reconciliation record tied to it. */
|
|
942
|
+
function removeQueuedEntry(state, id) {
|
|
943
|
+
return {
|
|
944
|
+
...state,
|
|
945
|
+
entries: state.entries.filter((entry) => entry.kind !== "queued" || entry.id !== id),
|
|
946
|
+
pendingUserEntries: state.pendingUserEntries.filter((entry) => entry.id !== id)
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
function clearDialog(state) {
|
|
950
|
+
return {
|
|
951
|
+
...state,
|
|
952
|
+
dialog: null
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
//#endregion
|
|
956
|
+
exports.appendQueued = appendQueued;
|
|
957
|
+
exports.appendUserPrompt = appendUserPrompt;
|
|
958
|
+
exports.clearDialog = clearDialog;
|
|
959
|
+
exports.clearQueuedEntries = clearQueuedEntries;
|
|
960
|
+
exports.imagesFromContent = imagesFromContent;
|
|
961
|
+
exports.initialSessionState = initialSessionState;
|
|
962
|
+
exports.isSupportedImageMimeType = isSupportedImageMimeType;
|
|
963
|
+
exports.prependHistory = prependHistory;
|
|
964
|
+
exports.reduceSession = reduceSession;
|
|
965
|
+
exports.removeQueuedEntry = removeQueuedEntry;
|
|
966
|
+
exports.replaceQueuedEntries = replaceQueuedEntries;
|
|
967
|
+
exports.summariseArgs = summariseArgs;
|
|
968
|
+
exports.textFromContent = textFromContent;
|
|
969
|
+
|
|
970
|
+
//# sourceMappingURL=sessionModel.cjs.map
|