@agent-native/core 0.76.2 → 0.76.4
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/corpus/core/CHANGELOG.md +14 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/durable-background.ts +8 -7
- package/corpus/core/src/client/AgentPanel.tsx +3 -3
- package/corpus/core/src/client/AgentTaskCard.tsx +2 -1
- package/corpus/core/src/client/AppearancePicker.tsx +1 -1
- package/corpus/core/src/client/AssistantChat.tsx +3 -3
- package/corpus/core/src/client/CommandMenu.tsx +4 -4
- package/corpus/core/src/client/ErrorBoundary.tsx +1 -1
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +11 -11
- package/corpus/core/src/client/NewWorkspaceAppFlow.tsx +5 -5
- package/corpus/core/src/client/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/core/src/client/components/ui/sheet.tsx +1 -1
- package/corpus/core/src/client/composer/ComposerPlusMenu.tsx +6 -6
- package/corpus/core/src/client/composer/MentionPopover.tsx +4 -4
- package/corpus/core/src/client/composer/PastedTextChip.tsx +3 -3
- package/corpus/core/src/client/composer/PromptComposer.tsx +3 -3
- package/corpus/core/src/client/composer/TiptapComposer.tsx +16 -16
- package/corpus/core/src/client/guided-questions.tsx +6 -8
- package/corpus/core/src/client/i18n.tsx +2 -2
- package/corpus/core/src/client/integrations/IntegrationCard.tsx +2 -2
- package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +4 -4
- package/corpus/core/src/client/notifications/NotificationsBell.tsx +3 -3
- package/corpus/core/src/client/onboarding/OnboardingBanner.tsx +3 -3
- package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +17 -10
- package/corpus/core/src/client/org/OrgSwitcher.tsx +13 -11
- package/corpus/core/src/client/org/TeamPage.tsx +2 -2
- package/corpus/core/src/client/settings/AgentsSection.tsx +3 -3
- package/corpus/core/src/client/settings/AutomationsSection.tsx +3 -3
- package/corpus/core/src/client/settings/SecretsSection.tsx +2 -2
- package/corpus/core/src/client/settings/SettingsPanel.tsx +5 -7
- package/corpus/core/src/client/settings/SettingsSection.tsx +1 -1
- package/corpus/core/src/client/settings/UsageSection.tsx +3 -3
- package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +3 -3
- package/corpus/core/src/client/sharing/ShareButton.tsx +7 -7
- package/corpus/core/src/client/sharing/ShareDialog.tsx +3 -3
- package/corpus/core/src/deploy/build.ts +2 -2
- package/corpus/core/src/styles/agent-conversation.css +10 -10
- package/corpus/core/src/styles/blocks.css +2 -2
- package/corpus/core/src/styles/rich-markdown-editor.css +2 -2
- package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/calendar.tsx +6 -6
- package/corpus/templates/analytics/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/analytics/app/components/ui/command.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/analytics/app/components/ui/date-picker.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/analytics/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/analytics/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/analytics/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/analytics/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/select.tsx +3 -3
- package/corpus/templates/analytics/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/analytics/app/components/ui/table.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/assets/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +12 -12
- package/corpus/templates/assets/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/assets/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/assets/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/assets/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/select.tsx +3 -3
- package/corpus/templates/assets/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/assets/app/components/ui/table.tsx +2 -2
- package/corpus/templates/assets/app/routes/library.tsx +3 -3
- package/corpus/templates/assets/app/routes/settings.tsx +1 -1
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/brain/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/brain/app/components/ui/select.tsx +3 -3
- package/corpus/templates/brain/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/brain/app/components/ui/table.tsx +2 -2
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +6 -6
- package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -3
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +11 -9
- package/corpus/templates/calendar/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/calendar/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/calendar/app/components/ui/command.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/calendar/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/calendar/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/calendar/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/calendar/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/calendar/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/select.tsx +3 -3
- package/corpus/templates/calendar/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/calendar/app/components/ui/sonner.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/table.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/calendar/app/pages/Settings.tsx +5 -5
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/chat/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/chat/app/components/ui/command.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/chat/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/chat/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/select.tsx +3 -3
- package/corpus/templates/chat/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/chat/app/components/ui/table.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/clips/app/components/capture-install-options.tsx +3 -3
- package/corpus/templates/clips/app/components/editable-recording-title.tsx +1 -1
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +3 -3
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +5 -5
- package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +4 -4
- package/corpus/templates/clips/app/components/library/recording-card.tsx +11 -11
- package/corpus/templates/clips/app/components/library/search-bar.tsx +4 -4
- package/corpus/templates/clips/app/components/library/space-card.tsx +1 -1
- package/corpus/templates/clips/app/components/library/tag-input.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +2 -2
- package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +2 -2
- package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +4 -4
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +1 -1
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/clips/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/clips/app/components/ui/command.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/clips/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/clips/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/clips/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/clips/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/clips/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/select.tsx +3 -3
- package/corpus/templates/clips/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/clips/app/components/ui/table.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +2 -2
- package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +2 -2
- package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +6 -6
- package/corpus/templates/clips/app/components/workspace/top-videos-table.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +4 -4
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +7 -7
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/download.tsx +2 -2
- package/corpus/templates/clips/app/routes/invite.$token.tsx +2 -2
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +3 -3
- package/corpus/templates/clips/app/routes/record.tsx +5 -5
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +7 -7
- package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +17 -17
- package/corpus/templates/content/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +10 -9
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +10 -6
- package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +3 -3
- package/corpus/templates/content/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/content/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/content/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/content/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/content/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/content/app/components/ui/table.tsx +2 -2
- package/corpus/templates/content/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/design/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/design/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/design/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/design/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/design/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/design/app/components/ui/command.tsx +2 -2
- package/corpus/templates/design/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/design/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/design/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/design/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/design/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/design/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/design/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/design/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/design/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/design/app/components/ui/select.tsx +3 -3
- package/corpus/templates/design/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/design/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/design/app/components/ui/table.tsx +2 -2
- package/corpus/templates/design/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/design/app/pages/DesignSystems.tsx +6 -8
- package/corpus/templates/design/app/pages/Index.tsx +8 -8
- package/corpus/templates/design/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/design/app/pages/Templates.tsx +2 -2
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/forms/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/calendar.tsx +9 -6
- package/corpus/templates/forms/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/forms/app/components/ui/command.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/forms/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/forms/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/forms/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/forms/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/forms/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/select.tsx +3 -3
- package/corpus/templates/forms/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/forms/app/components/ui/table.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +18 -18
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +9 -9
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +4 -4
- package/corpus/templates/macros/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/command.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/macros/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/macros/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/macros/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/macros/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/macros/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/select.tsx +3 -3
- package/corpus/templates/macros/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/table.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/macros/app/routes/_index.tsx +2 -2
- package/corpus/templates/macros/app/routes/analytics.tsx +1 -1
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +6 -6
- package/corpus/templates/mail/app/components/email/AttachmentStrip.tsx +2 -2
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +5 -5
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +5 -5
- package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +3 -3
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +10 -10
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +1 -1
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +3 -3
- package/corpus/templates/mail/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/calendar.tsx +4 -4
- package/corpus/templates/mail/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/mail/app/components/ui/command.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/mail/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/mail/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/mail/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/mail/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/mail/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/select.tsx +3 -3
- package/corpus/templates/mail/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/mail/app/components/ui/sonner.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/table.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +10 -10
- package/corpus/templates/plan/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/plan/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/plan/app/components/ui/command.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/plan/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/plan/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/plan/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/plan/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/plan/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/select.tsx +3 -3
- package/corpus/templates/plan/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/plan/app/components/ui/table.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/slides/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/slides/app/components/ui/command.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/slides/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/slides/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/slides/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/slides/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/slides/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/select.tsx +3 -3
- package/corpus/templates/slides/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/slides/app/components/ui/table.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/videos/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/videos/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/videos/app/components/ui/command.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/videos/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/videos/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/videos/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/videos/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/videos/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/select.tsx +3 -3
- package/corpus/templates/videos/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/videos/app/components/ui/table.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/toast.tsx +3 -3
- package/dist/agent/durable-background.d.ts +2 -2
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +8 -7
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/client/AgentPanel.js +3 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AgentTaskCard.d.ts.map +1 -1
- package/dist/client/AgentTaskCard.js +1 -1
- package/dist/client/AgentTaskCard.js.map +1 -1
- package/dist/client/AppearancePicker.js +1 -1
- package/dist/client/AppearancePicker.js.map +1 -1
- package/dist/client/AssistantChat.js +3 -3
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/CommandMenu.js +4 -4
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/ErrorBoundary.js +1 -1
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +9 -9
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +5 -5
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/components/ui/dropdown-menu.js +6 -6
- package/dist/client/components/ui/dropdown-menu.js.map +1 -1
- package/dist/client/components/ui/sheet.js +1 -1
- package/dist/client/components/ui/sheet.js.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +5 -5
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/MentionPopover.js +4 -4
- package/dist/client/composer/MentionPopover.js.map +1 -1
- package/dist/client/composer/PastedTextChip.js +2 -2
- package/dist/client/composer/PastedTextChip.js.map +1 -1
- package/dist/client/composer/PromptComposer.js +3 -3
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +12 -12
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +5 -5
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/i18n.js +2 -2
- package/dist/client/i18n.js.map +1 -1
- package/dist/client/integrations/IntegrationCard.js +1 -1
- package/dist/client/integrations/IntegrationCard.js.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.js +4 -4
- package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
- package/dist/client/notifications/NotificationsBell.js +3 -3
- package/dist/client/notifications/NotificationsBell.js.map +1 -1
- package/dist/client/onboarding/OnboardingBanner.js +3 -3
- package/dist/client/onboarding/OnboardingBanner.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.d.ts.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +15 -10
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +7 -7
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/TeamPage.js +2 -2
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/settings/AgentsSection.js +3 -3
- package/dist/client/settings/AgentsSection.js.map +1 -1
- package/dist/client/settings/AutomationsSection.js +2 -2
- package/dist/client/settings/AutomationsSection.js.map +1 -1
- package/dist/client/settings/SecretsSection.js +2 -2
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +4 -4
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsSection.js +1 -1
- package/dist/client/settings/SettingsSection.js.map +1 -1
- package/dist/client/settings/UsageSection.js +2 -2
- package/dist/client/settings/UsageSection.js.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +3 -3
- package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
- package/dist/client/sharing/ShareButton.js +6 -6
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.js +3 -3
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/deploy/build.js +2 -2
- package/dist/deploy/build.js.map +1 -1
- package/dist/styles/agent-conversation.css +10 -10
- package/dist/styles/blocks.css +2 -2
- package/dist/styles/rich-markdown-editor.css +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-background.js","sourceRoot":"","sources":["../../src/agent/durable-background.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GACtC,wCAAwC,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AAExE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,uBAAuB,8BAA8B,EAAE,CAAC;AAE1G;;;;;;;;GAQG;AACH,SAAS,yCAAyC;IAChD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EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["/**\n * Durable background agent-chat runs (Netlify background functions).\n *\n * Off by default. When enabled, a long in-app agent-chat turn is dispatched\n * into a Netlify *background* function (15-min budget) instead of completing\n * synchronously under the ~40s soft-timeout. The foreground POST claims the\n * run slot, inserts the run row, fires an HMAC-signed self-dispatch to\n * `AGENT_CHAT_PROCESS_RUN_PATH`, and returns the existing SSE subscription so\n * the client streams the same events (via the cross-isolate SQL-poll path)\n * with no client change.\n *\n * This module owns ONLY the gating decision + shared constants so both the\n * HTTP handler (`production-agent.ts`) and the processor route\n * (`agent-chat-plugin.ts`) agree on when the path is active without a circular\n * import. The actual run machinery is reused verbatim from run-manager /\n * run-store / self-dispatch / internal-token.\n *\n * GUARDRAIL: when `isAgentChatDurableBackgroundEnabled()` returns false, the\n * agent-chat handler must behave byte-for-byte like the current synchronous\n * path. The gate is true only when ALL of these hold:\n * 1. `AGENT_CHAT_DURABLE_BACKGROUND` env is not explicitly disabled. It is\n * DEFAULT-ON: unset/empty/unknown counts as enabled; set it to a falsy\n * value (`false`/`0`/`no`/`off`) to opt a specific app back out.\n * 2. The runtime is hosted/serverless (local dev keeps the inline path so SSE\n * stays a single live stream and no second function is needed).\n * 3. `A2A_SECRET` is configured (the HMAC handoff is required to authenticate\n * the background dispatch; without it the dispatch can't be trusted).\n *\n * Default-on is safe because a *dispatch failure degrades to an inline run*: if\n * the self-dispatch self-POST can't be delivered (fast connection error or\n * fast non-2xx), the foreground handler runs the turn synchronously instead of\n * erroring (see `production-agent.ts` — the inline fallback claims the run row\n * atomically so a delayed delivery can never double-execute). So an app where\n * durable dispatch happens to fail still gets a working chat, just without the\n * 15-min budget.\n */\nimport {\n hasConfiguredA2ASecret,\n isA2AProductionRuntime,\n} from \"../a2a/auth-policy.js\";\nimport {\n extractBearerToken,\n verifyInternalToken,\n} from \"../integrations/internal-token.js\";\n\n/**\n * Framework route the background function actually runs — sibling to\n * `AGENT_TEAM_PROCESS_RUN_PATH`. Reached *through* the Netlify background\n * function, so it inherits the 15-min budget.\n */\nexport const AGENT_CHAT_PROCESS_RUN_PATH =\n \"/_agent-native/agent-chat/_process-run\";\n\n/**\n * Name of the standalone Netlify background function the build emits (see\n * `emitSingleTemplateNetlifyBackgroundFunction` in deploy/build.ts). Shared so\n * the emit and the dispatch-path helper below can never drift on the name.\n *\n * MUST end in `-background` — both because that is the conventional Netlify\n * async-function suffix and because `isInBackgroundFunctionRuntime()` reads the\n * `AWS_LAMBDA_FUNCTION_NAME` `-background` suffix as a secondary runtime signal.\n */\nexport const AGENT_BACKGROUND_FUNCTION_NAME = \"server-agent-background\";\n\n/**\n * Default function URL of the background function on Netlify. Every Netlify\n * function is reachable at `/.netlify/functions/<name>` BY DEFAULT; that default\n * url is removed ONLY if the function declares a custom `config.path`. The\n * emitted background function declares NO custom `config.path` (it sets\n * `background: true` and nothing else routing-related), so it KEEPS this default\n * url — and the Nitro `server` function already excludes `/.netlify/*` from its\n * `/*` catch-all, so this namespace is never shadowed. The foreground therefore\n * dispatches HERE on hosted Netlify (see `resolveAgentChatProcessRunDispatchPath`).\n */\nexport const AGENT_BACKGROUND_FUNCTION_URL_PATH = `/.netlify/functions/${AGENT_BACKGROUND_FUNCTION_NAME}`;\n\n/**\n * The per-app workspace background function URL path. Workspace deploy emits one\n * background function per app named `<app>-agent-background`, reachable at its\n * DEFAULT url `/.netlify/functions/<app>-agent-background` (no custom\n * `config.path`). The foreground resolves the current workspace app id from\n * `AGENT_NATIVE_WORKSPACE_APP_ID` (set by the workspace function entry) so it can\n * dispatch to the right per-app function url. Returns `null` when no workspace\n * app id is configured (single-template deploy).\n */\nfunction resolveWorkspaceBackgroundFunctionUrlPath(): string | null {\n const raw = process.env.AGENT_NATIVE_WORKSPACE_APP_ID;\n if (typeof raw !== \"string\") return null;\n // Mirror the workspace app-id normalization (resources/store.ts): take the\n // first path segment and accept only the safe slug shape used for function\n // names. Anything else falls back to the single-template name.\n const candidate = raw.trim().replace(/^\\/+/, \"\").split(\"/\")[0] ?? \"\";\n if (!/^[a-z0-9][a-z0-9-]{0,127}$/.test(candidate)) return null;\n return `/.netlify/functions/${candidate}-agent-background`;\n}\n\n/**\n * Resolve the path the foreground POST should self-dispatch the chat background\n * worker to.\n *\n * GROUNDED IN THE REAL NETLIFY BUILD OUTPUT + THE NETLIFY DOCS DEFAULT-URL RULE:\n * the background function is emitted INTO the scanned dir\n * (`.netlify/functions-internal/server-agent-background`, or per-app\n * `<app>-agent-background` for workspaces) with `export const config = {\n * background: true, ... }` and NO custom `config.path`. Because it has no custom\n * path, Netlify keeps its DEFAULT function url `/.netlify/functions/<name>`, and\n * `background: true` makes any invocation of that url ASYNC (immediate 202,\n * 15-min budget). The Nitro `server` function already excludes `/.netlify/*`\n * from its `/*` catch-all, so the default-url namespace is NEVER shadowed by the\n * synchronous function.\n *\n * Therefore on hosted Netlify the foreground dispatches to the function's DEFAULT\n * url (`/.netlify/functions/<name>`); the function entry then rewrites the\n * incoming pathname to `AGENT_CHAT_PROCESS_RUN_PATH` (base-path-prefixed for\n * workspaces) before delegating to the Nitro router, so the `_process-run`\n * plugin runs with the async 15-min budget. Everywhere else (local dev, `netlify\n * dev`, non-Netlify hosts where no second function exists) there is no second\n * function, so the foreground dispatches to the framework route\n * `AGENT_CHAT_PROCESS_RUN_PATH` and the same in-process catch-all handles it\n * inline. The HMAC token (signed over the runId) is unchanged either way.\n *\n * NOTE: this is the DOC-CORRECT approach. An earlier attempt gave the function a\n * custom `config.path` + a catch-all `excludedPath` patch; the custom path was\n * NOT honored as a route in prod (probe → 404). Using the default function url\n * (no custom path) is what Netlify documents and is simpler — there is nothing\n * to shadow because `/.netlify/*` is already excluded from the `server` catch-all.\n */\nexport function resolveAgentChatProcessRunDispatchPath(): string {\n if (\n process.env.NETLIFY &&\n process.env.NETLIFY !== \"false\" &&\n process.env.NETLIFY_LOCAL !== \"true\"\n ) {\n return (\n resolveWorkspaceBackgroundFunctionUrlPath() ??\n AGENT_BACKGROUND_FUNCTION_URL_PATH\n );\n }\n return AGENT_CHAT_PROCESS_RUN_PATH;\n}\n\n/**\n * Env flag for durable background runs. DEFAULT-ON: unset means enabled; an app\n * opts OUT with an explicit falsy value (`false`/`0`/`no`/`off`).\n */\nexport const AGENT_CHAT_DURABLE_BACKGROUND_ENV =\n \"AGENT_CHAT_DURABLE_BACKGROUND\";\n\n/**\n * Body field the foreground handler injects when self-dispatching to the\n * background processor. Its presence is how the re-entered handler knows it is\n * the background worker (run inline with the background soft-timeout; do NOT\n * re-claim the slot or re-dispatch). Untrusted on its own — the route also\n * verifies the HMAC token before invoking the handler.\n */\nexport const AGENT_CHAT_BACKGROUND_RUN_FIELD = \"__backgroundRun\";\n\n/**\n * Mirror of run-manager's private `isHostedRuntime`. Kept in sync deliberately:\n * the durable-background gate must agree with the soft-timeout regime about\n * what \"hosted\" means.\n */\nexport function isHostedRuntimeForDurableBackground(): boolean {\n if (\n process.env.NETLIFY &&\n process.env.NETLIFY !== \"false\" &&\n process.env.NETLIFY_LOCAL !== \"true\"\n ) {\n return true;\n }\n if (\n process.env.AWS_LAMBDA_FUNCTION_NAME &&\n process.env.NETLIFY_LOCAL !== \"true\"\n ) {\n return true;\n }\n return Boolean(\n process.env.CF_PAGES ||\n process.env.VERCEL ||\n process.env.VERCEL_ENV ||\n process.env.RENDER ||\n process.env.FLY_APP_NAME ||\n process.env.K_SERVICE,\n );\n}\n\n/**\n * True when THIS process is actually executing inside a Netlify *background*\n * function (the long, 15-min-budget async function whose deployed name ends in\n * `-background`). Netlify runs functions on AWS Lambda and sets\n * `AWS_LAMBDA_FUNCTION_NAME` to the function's name, so a `-background` suffix is\n * the runtime proof that the ~60s synchronous wall does NOT apply here.\n *\n * This is the SAFETY GUARD for the soft-timeout regime. The `_process-run`\n * self-dispatch worker (`isBackgroundWorker`) is NOT enough on its own: if the\n * `-background` function was never emitted (deploy gate off, or Netlify routed\n * the path to the synchronous function), the self-POST lands on the regular\n * ~60s `server` function. A worker there MUST use the 40s soft-timeout and\n * checkpoint before the 60s wall — using the ~13min budget would overshoot the\n * hard wall and get killed at 60s, then re-dispatch/resume in a wasteful loop.\n * So the 13-min budget is taken ONLY when this returns true.\n *\n * The PRIMARY signal is a `globalThis` marker the emitted background function's\n * entry sets at cold start — the deployed Lambda name is not guaranteed to end\n * in `-background` on Netlify, so the entry marks its own runtime. A `globalThis`\n * flag (not `process.env`) keeps the no-env-mutation guard satisfied and carries\n * no cross-request state (set once per isolate). The `AWS_LAMBDA_FUNCTION_NAME`\n * suffix and the explicit `AGENT_CHAT_FORCE_BACKGROUND_RUNTIME` env (truthy) are\n * additional signals — the latter an operator escape hatch. Off by default.\n */\nexport function isInBackgroundFunctionRuntime(): boolean {\n // Set by the emitted `-background` function entry at cold start (the primary,\n // most reliable signal — see the emit in deploy/build.ts).\n if (\n (globalThis as Record<string, unknown>)\n .__AGENT_NATIVE_BACKGROUND_RUNTIME__ === true\n ) {\n return true;\n }\n const lambdaName = process.env.AWS_LAMBDA_FUNCTION_NAME;\n if (\n typeof lambdaName === \"string\" &&\n lambdaName.toLowerCase().endsWith(\"-background\")\n ) {\n return true;\n }\n const forced = process.env.AGENT_CHAT_FORCE_BACKGROUND_RUNTIME;\n if (forced != null) {\n const v = forced.trim().toLowerCase();\n return v === \"1\" || v === \"true\" || v === \"yes\" || v === \"on\";\n }\n return false;\n}\n\nfunction isFlagEnabled(): boolean {\n // Read the literal key (not `process.env[CONST]`) so guard:no-env-credentials\n // can statically verify it against the allowlisted `AGENT_*` prefix. Keep this\n // in sync with AGENT_CHAT_DURABLE_BACKGROUND_ENV.\n //\n // DEFAULT-OFF (opt-in): durable background runs are still being hardened. A\n // premature fleet-wide default-on caused real-user incidents (Assets/Analytics\n // hit \"Failed to dispatch\" + stalls, 2026-06-24) because the async background\n // worker path is not yet proven end-to-end and the deploy-time env opt-out is\n // not reliably baked into a given deploy. So an unset/empty/unknown flag means\n // OFF; an app opts IN only with an explicit truthy value\n // (AGENT_CHAT_DURABLE_BACKGROUND=true). This still composes with the hosted +\n // A2A_SECRET gates below. Flip back to default-on only after the 15-min\n // background-function worker is verified live in production (see the\n // project_durable_bg_prod_verified memory).\n const raw = process.env.AGENT_CHAT_DURABLE_BACKGROUND;\n if (raw == null) return false;\n const normalized = raw.trim().toLowerCase();\n return (\n normalized === \"1\" ||\n normalized === \"true\" ||\n normalized === \"yes\" ||\n normalized === \"on\"\n );\n}\n\n/**\n * The single gate. True when the flag is explicitly enabled (opt-in/default-off)\n * AND the runtime is hosted AND A2A_SECRET is configured. False otherwise — and\n * false means the current synchronous behavior is used, unchanged. So a local /\n * non-hosted / unconfigured app stays synchronous, and an app that has not opted\n * in stays synchronous; durable only engages where it is explicitly enabled and\n * the runtime actually supports it.\n */\nexport function isAgentChatDurableBackgroundEnabled(): boolean {\n return (\n isFlagEnabled() &&\n isHostedRuntimeForDurableBackground() &&\n hasConfiguredA2ASecret()\n );\n}\n\n/** Decision returned by `prepareProcessRunRequest`. */\nexport type ProcessRunPreparation =\n | {\n ok: true;\n /** The pre-claimed run id the background worker must reuse. */\n runId: string;\n /** Body to stash for the re-entered handler (marker guaranteed present). */\n body: Record<string, unknown>;\n }\n | {\n ok: false;\n /** HTTP status the route should return. */\n status: number;\n /** Error payload. */\n error: string;\n /**\n * The run id parsed from the body, when present. Carried even on failure\n * so the route can RECORD the auth/validation failure ONTO the run\n * (diag_stage) before returning the error status — otherwise a 401/503 in\n * the unreadable Netlify background function would leave the run to time\n * out with no clue why. Null when no run id could be parsed.\n */\n runId: string | null;\n };\n\n/**\n * Parse the run id from a `_process-run` request body without authenticating.\n * Mirrors the precedence in `prepareProcessRunRequest` (marker.runId, then\n * top-level taskId). Returns null when neither is a usable string. Used so the\n * route can attach a diagnostic to the run even on an auth/validation failure.\n */\nexport function extractProcessRunId(body: unknown): string | null {\n if (!body || typeof body !== \"object\") return null;\n const record = body as Record<string, unknown>;\n const marker = record[AGENT_CHAT_BACKGROUND_RUN_FIELD] as\n | { runId?: unknown }\n | undefined;\n if (marker && typeof marker.runId === \"string\" && marker.runId) {\n return marker.runId;\n }\n if (typeof record.taskId === \"string\" && record.taskId) {\n return record.taskId;\n }\n return null;\n}\n\n/**\n * Pure, transport-agnostic core of the `_process-run` route: validate the body,\n * authenticate the HMAC self-dispatch, and produce the body the re-entered\n * agent-chat handler should run as the background worker.\n *\n * Auth policy mirrors the agent-teams processor exactly:\n * - `A2A_SECRET` set → require a valid `verifyInternalToken(runId, token)`.\n * - no secret but a production runtime → refuse (503) — never run unsigned in\n * prod.\n * - no secret + non-prod (local dev) → allow unsigned; the SQL atomic claim\n * in the worker still prevents double-processing.\n *\n * Extracted from the route handler so the auth + marker-prep decision is unit\n * testable without booting the whole Nitro plugin. The route only adds body\n * reading and the final handler invocation around this.\n */\nexport function prepareProcessRunRequest(\n body: unknown,\n authHeader: string | undefined,\n): ProcessRunPreparation {\n if (!body || typeof body !== \"object\") {\n return {\n ok: false,\n status: 400,\n error: \"Invalid request body\",\n runId: null,\n };\n }\n const record = body as Record<string, unknown>;\n const marker = record[AGENT_CHAT_BACKGROUND_RUN_FIELD] as\n | { runId?: unknown }\n | undefined;\n const runId =\n marker && typeof marker.runId === \"string\"\n ? marker.runId\n : typeof record.taskId === \"string\"\n ? (record.taskId as string)\n : \"\";\n if (!runId) {\n return { ok: false, status: 400, error: \"runId required\", runId: null };\n }\n\n if (hasConfiguredA2ASecret()) {\n const token = extractBearerToken(authHeader);\n if (!verifyInternalToken(runId, token ?? \"\")) {\n return {\n ok: false,\n status: 401,\n error: \"Invalid or expired processor token\",\n runId,\n };\n }\n } else if (isA2AProductionRuntime()) {\n return {\n ok: false,\n status: 503,\n error:\n \"Agent chat background processor not configured — set A2A_SECRET on this deployment.\",\n runId,\n };\n }\n\n // Ensure the marker is present so the re-entered handler runs as the\n // background worker (reuses runId/turnId, no re-claim, no re-dispatch).\n if (!marker || typeof marker.runId !== \"string\") {\n record[AGENT_CHAT_BACKGROUND_RUN_FIELD] = { runId };\n }\n return { ok: true, runId, body: record };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"durable-background.js","sourceRoot":"","sources":["../../src/agent/durable-background.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GACtC,wCAAwC,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AAExE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,uBAAuB,8BAA8B,EAAE,CAAC;AAE1G;;;;;;;;GAQG;AACH,SAAS,yCAAyC;IAChD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;IACtD,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACzC,2EAA2E;IAC3E,2EAA2E;IAC3E,+DAA+D;IAC/D,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACrE,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/D,OAAO,uBAAuB,SAAS,mBAAmB,CAAC;AAC7D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,sCAAsC;IACpD,IACE,OAAO,CAAC,GAAG,CAAC,OAAO;QACnB,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,OAAO;QAC/B,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,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;YAC7C,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,GAAG;gBACX,KAAK,EAAE,oCAAoC;gBAC3C,KAAK;aACN,CAAC;QACJ,CAAC;IACH,CAAC;SAAM,IAAI,sBAAsB,EAAE,EAAE,CAAC;QACpC,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,GAAG;YACX,KAAK,EACH,qFAAqF;YACvF,KAAK;SACN,CAAC;IACJ,CAAC;IAED,qEAAqE;IACrE,wEAAwE;IACxE,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,MAAM,CAAC,+BAA+B,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC;IACtD,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["/**\n * Durable background agent-chat runs (Netlify background functions).\n *\n * Off by default. When enabled, a long in-app agent-chat turn is dispatched\n * into a Netlify *background* function (15-min budget) instead of completing\n * synchronously under the ~40s soft-timeout. The foreground POST claims the\n * run slot, inserts the run row, fires an HMAC-signed self-dispatch to\n * `AGENT_CHAT_PROCESS_RUN_PATH`, and returns the existing SSE subscription so\n * the client streams the same events (via the cross-isolate SQL-poll path)\n * with no client change.\n *\n * This module owns ONLY the gating decision + shared constants so both the\n * HTTP handler (`production-agent.ts`) and the processor route\n * (`agent-chat-plugin.ts`) agree on when the path is active without a circular\n * import. The actual run machinery is reused verbatim from run-manager /\n * run-store / self-dispatch / internal-token.\n *\n * GUARDRAIL: when `isAgentChatDurableBackgroundEnabled()` returns false, the\n * agent-chat handler must behave byte-for-byte like the current synchronous\n * path. The gate is true only when ALL of these hold:\n * 1. `AGENT_CHAT_DURABLE_BACKGROUND` env is explicitly enabled. It is\n * DEFAULT-OFF (opt-in): unset/empty/unknown counts as disabled; set it to a\n * truthy value (`true`/`1`/`yes`/`on`) to opt a specific app in.\n * 2. The runtime is hosted/serverless (local dev keeps the inline path so SSE\n * stays a single live stream and no second function is needed).\n * 3. `A2A_SECRET` is configured (the HMAC handoff is required to authenticate\n * the background dispatch; without it the dispatch can't be trusted).\n *\n * Opt-in keeps the blast radius small while the worker path is still being\n * proven. And even when enabled, a *dispatch failure degrades to an inline run*:\n * if the self-dispatch self-POST can't be delivered (fast connection error or\n * fast non-2xx), the foreground handler runs the turn synchronously instead of\n * erroring (see `production-agent.ts` — the inline fallback claims the run row\n * atomically so a delayed delivery can never double-execute). So an app where\n * durable dispatch happens to fail still gets a working chat, just without the\n * 15-min budget.\n */\nimport {\n hasConfiguredA2ASecret,\n isA2AProductionRuntime,\n} from \"../a2a/auth-policy.js\";\nimport {\n extractBearerToken,\n verifyInternalToken,\n} from \"../integrations/internal-token.js\";\n\n/**\n * Framework route the background function actually runs — sibling to\n * `AGENT_TEAM_PROCESS_RUN_PATH`. Reached *through* the Netlify background\n * function, so it inherits the 15-min budget.\n */\nexport const AGENT_CHAT_PROCESS_RUN_PATH =\n \"/_agent-native/agent-chat/_process-run\";\n\n/**\n * Name of the standalone Netlify background function the build emits (see\n * `emitSingleTemplateNetlifyBackgroundFunction` in deploy/build.ts). Shared so\n * the emit and the dispatch-path helper below can never drift on the name.\n *\n * MUST end in `-background` — both because that is the conventional Netlify\n * async-function suffix and because `isInBackgroundFunctionRuntime()` reads the\n * `AWS_LAMBDA_FUNCTION_NAME` `-background` suffix as a secondary runtime signal.\n */\nexport const AGENT_BACKGROUND_FUNCTION_NAME = \"server-agent-background\";\n\n/**\n * Default function URL of the background function on Netlify. Every Netlify\n * function is reachable at `/.netlify/functions/<name>` BY DEFAULT; that default\n * url is removed ONLY if the function declares a custom `config.path`. The\n * emitted background function declares NO custom `config.path` (it sets\n * `background: true` and nothing else routing-related), so it KEEPS this default\n * url — and the Nitro `server` function already excludes `/.netlify/*` from its\n * `/*` catch-all, so this namespace is never shadowed. The foreground therefore\n * dispatches HERE on hosted Netlify (see `resolveAgentChatProcessRunDispatchPath`).\n */\nexport const AGENT_BACKGROUND_FUNCTION_URL_PATH = `/.netlify/functions/${AGENT_BACKGROUND_FUNCTION_NAME}`;\n\n/**\n * The per-app workspace background function URL path. Workspace deploy emits one\n * background function per app named `<app>-agent-background`, reachable at its\n * DEFAULT url `/.netlify/functions/<app>-agent-background` (no custom\n * `config.path`). The foreground resolves the current workspace app id from\n * `AGENT_NATIVE_WORKSPACE_APP_ID` (set by the workspace function entry) so it can\n * dispatch to the right per-app function url. Returns `null` when no workspace\n * app id is configured (single-template deploy).\n */\nfunction resolveWorkspaceBackgroundFunctionUrlPath(): string | null {\n const raw = process.env.AGENT_NATIVE_WORKSPACE_APP_ID;\n if (typeof raw !== \"string\") return null;\n // Mirror the workspace app-id normalization (resources/store.ts): take the\n // first path segment and accept only the safe slug shape used for function\n // names. Anything else falls back to the single-template name.\n const candidate = raw.trim().replace(/^\\/+/, \"\").split(\"/\")[0] ?? \"\";\n if (!/^[a-z0-9][a-z0-9-]{0,127}$/.test(candidate)) return null;\n return `/.netlify/functions/${candidate}-agent-background`;\n}\n\n/**\n * Resolve the path the foreground POST should self-dispatch the chat background\n * worker to.\n *\n * GROUNDED IN THE REAL NETLIFY BUILD OUTPUT + THE NETLIFY DOCS DEFAULT-URL RULE:\n * the background function is emitted INTO the scanned dir\n * (`.netlify/functions-internal/server-agent-background`, or per-app\n * `<app>-agent-background` for workspaces) with `export const config = {\n * background: true, ... }` and NO custom `config.path`. Because it has no custom\n * path, Netlify keeps its DEFAULT function url `/.netlify/functions/<name>`, and\n * `background: true` makes any invocation of that url ASYNC (immediate 202,\n * 15-min budget). The Nitro `server` function already excludes `/.netlify/*`\n * from its `/*` catch-all, so the default-url namespace is NEVER shadowed by the\n * synchronous function.\n *\n * Therefore on hosted Netlify the foreground dispatches to the function's DEFAULT\n * url (`/.netlify/functions/<name>`); the function entry then rewrites the\n * incoming pathname to `AGENT_CHAT_PROCESS_RUN_PATH` (base-path-prefixed for\n * workspaces) before delegating to the Nitro router, so the `_process-run`\n * plugin runs with the async 15-min budget. Everywhere else (local dev, `netlify\n * dev`, non-Netlify hosts where no second function exists) there is no second\n * function, so the foreground dispatches to the framework route\n * `AGENT_CHAT_PROCESS_RUN_PATH` and the same in-process catch-all handles it\n * inline. The HMAC token (signed over the runId) is unchanged either way.\n *\n * NOTE: this is the DOC-CORRECT approach. An earlier attempt gave the function a\n * custom `config.path` + a catch-all `excludedPath` patch; the custom path was\n * NOT honored as a route in prod (probe → 404). Using the default function url\n * (no custom path) is what Netlify documents and is simpler — there is nothing\n * to shadow because `/.netlify/*` is already excluded from the `server` catch-all.\n */\nexport function resolveAgentChatProcessRunDispatchPath(): string {\n if (\n process.env.NETLIFY &&\n process.env.NETLIFY !== \"false\" &&\n process.env.NETLIFY_LOCAL !== \"true\"\n ) {\n return (\n resolveWorkspaceBackgroundFunctionUrlPath() ??\n AGENT_BACKGROUND_FUNCTION_URL_PATH\n );\n }\n return AGENT_CHAT_PROCESS_RUN_PATH;\n}\n\n/**\n * Env flag for durable background runs. DEFAULT-OFF (opt-in): unset means\n * disabled; an app opts IN with an explicit truthy value (`true`/`1`/`yes`/`on`).\n */\nexport const AGENT_CHAT_DURABLE_BACKGROUND_ENV =\n \"AGENT_CHAT_DURABLE_BACKGROUND\";\n\n/**\n * Body field the foreground handler injects when self-dispatching to the\n * background processor. Its presence is how the re-entered handler knows it is\n * the background worker (run inline with the background soft-timeout; do NOT\n * re-claim the slot or re-dispatch). Untrusted on its own — the route also\n * verifies the HMAC token before invoking the handler.\n */\nexport const AGENT_CHAT_BACKGROUND_RUN_FIELD = \"__backgroundRun\";\n\n/**\n * Mirror of run-manager's private `isHostedRuntime`. Kept in sync deliberately:\n * the durable-background gate must agree with the soft-timeout regime about\n * what \"hosted\" means.\n */\nexport function isHostedRuntimeForDurableBackground(): boolean {\n if (\n process.env.NETLIFY &&\n process.env.NETLIFY !== \"false\" &&\n process.env.NETLIFY_LOCAL !== \"true\"\n ) {\n return true;\n }\n if (\n process.env.AWS_LAMBDA_FUNCTION_NAME &&\n process.env.NETLIFY_LOCAL !== \"true\"\n ) {\n return true;\n }\n return Boolean(\n process.env.CF_PAGES ||\n process.env.VERCEL ||\n process.env.VERCEL_ENV ||\n process.env.RENDER ||\n process.env.FLY_APP_NAME ||\n process.env.K_SERVICE,\n );\n}\n\n/**\n * True when THIS process is actually executing inside a Netlify *background*\n * function (the long, 15-min-budget async function whose deployed name ends in\n * `-background`). Netlify runs functions on AWS Lambda and sets\n * `AWS_LAMBDA_FUNCTION_NAME` to the function's name, so a `-background` suffix is\n * the runtime proof that the ~60s synchronous wall does NOT apply here.\n *\n * This is the SAFETY GUARD for the soft-timeout regime. The `_process-run`\n * self-dispatch worker (`isBackgroundWorker`) is NOT enough on its own: if the\n * `-background` function was never emitted (deploy gate off, or Netlify routed\n * the path to the synchronous function), the self-POST lands on the regular\n * ~60s `server` function. A worker there MUST use the 40s soft-timeout and\n * checkpoint before the 60s wall — using the ~13min budget would overshoot the\n * hard wall and get killed at 60s, then re-dispatch/resume in a wasteful loop.\n * So the 13-min budget is taken ONLY when this returns true.\n *\n * The PRIMARY signal is a `globalThis` marker the emitted background function's\n * entry sets at cold start — the deployed Lambda name is not guaranteed to end\n * in `-background` on Netlify, so the entry marks its own runtime. A `globalThis`\n * flag (not `process.env`) keeps the no-env-mutation guard satisfied and carries\n * no cross-request state (set once per isolate). The `AWS_LAMBDA_FUNCTION_NAME`\n * suffix and the explicit `AGENT_CHAT_FORCE_BACKGROUND_RUNTIME` env (truthy) are\n * additional signals — the latter an operator escape hatch. Off by default.\n */\nexport function isInBackgroundFunctionRuntime(): boolean {\n // Set by the emitted `-background` function entry at cold start (the primary,\n // most reliable signal — see the emit in deploy/build.ts).\n if (\n (globalThis as Record<string, unknown>)\n .__AGENT_NATIVE_BACKGROUND_RUNTIME__ === true\n ) {\n return true;\n }\n const lambdaName = process.env.AWS_LAMBDA_FUNCTION_NAME;\n if (\n typeof lambdaName === \"string\" &&\n lambdaName.toLowerCase().endsWith(\"-background\")\n ) {\n return true;\n }\n const forced = process.env.AGENT_CHAT_FORCE_BACKGROUND_RUNTIME;\n if (forced != null) {\n const v = forced.trim().toLowerCase();\n return v === \"1\" || v === \"true\" || v === \"yes\" || v === \"on\";\n }\n return false;\n}\n\nfunction isFlagEnabled(): boolean {\n // Read the literal key (not `process.env[CONST]`) so guard:no-env-credentials\n // can statically verify it against the allowlisted `AGENT_*` prefix. Keep this\n // in sync with AGENT_CHAT_DURABLE_BACKGROUND_ENV.\n //\n // DEFAULT-OFF (opt-in): durable background runs are still being hardened. A\n // premature fleet-wide default-on caused real-user incidents (Assets/Analytics\n // hit \"Failed to dispatch\" + stalls, 2026-06-24) because the async background\n // worker path is not yet proven end-to-end and the deploy-time env opt-out is\n // not reliably baked into a given deploy. So an unset/empty/unknown flag means\n // OFF; an app opts IN only with an explicit truthy value\n // (AGENT_CHAT_DURABLE_BACKGROUND=true). This still composes with the hosted +\n // A2A_SECRET gates below. Flip back to default-on only after the 15-min\n // background-function worker is verified live in production (see the\n // project_durable_bg_prod_verified memory).\n const raw = process.env.AGENT_CHAT_DURABLE_BACKGROUND;\n if (raw == null) return false;\n const normalized = raw.trim().toLowerCase();\n return (\n normalized === \"1\" ||\n normalized === \"true\" ||\n normalized === \"yes\" ||\n normalized === \"on\"\n );\n}\n\n/**\n * The single gate. True when the flag is explicitly enabled (opt-in/default-off)\n * AND the runtime is hosted AND A2A_SECRET is configured. False otherwise — and\n * false means the current synchronous behavior is used, unchanged. So a local /\n * non-hosted / unconfigured app stays synchronous, and an app that has not opted\n * in stays synchronous; durable only engages where it is explicitly enabled and\n * the runtime actually supports it.\n */\nexport function isAgentChatDurableBackgroundEnabled(): boolean {\n return (\n isFlagEnabled() &&\n isHostedRuntimeForDurableBackground() &&\n hasConfiguredA2ASecret()\n );\n}\n\n/** Decision returned by `prepareProcessRunRequest`. */\nexport type ProcessRunPreparation =\n | {\n ok: true;\n /** The pre-claimed run id the background worker must reuse. */\n runId: string;\n /** Body to stash for the re-entered handler (marker guaranteed present). */\n body: Record<string, unknown>;\n }\n | {\n ok: false;\n /** HTTP status the route should return. */\n status: number;\n /** Error payload. */\n error: string;\n /**\n * The run id parsed from the body, when present. Carried even on failure\n * so the route can RECORD the auth/validation failure ONTO the run\n * (diag_stage) before returning the error status — otherwise a 401/503 in\n * the unreadable Netlify background function would leave the run to time\n * out with no clue why. Null when no run id could be parsed.\n */\n runId: string | null;\n };\n\n/**\n * Parse the run id from a `_process-run` request body without authenticating.\n * Mirrors the precedence in `prepareProcessRunRequest` (marker.runId, then\n * top-level taskId). Returns null when neither is a usable string. Used so the\n * route can attach a diagnostic to the run even on an auth/validation failure.\n */\nexport function extractProcessRunId(body: unknown): string | null {\n if (!body || typeof body !== \"object\") return null;\n const record = body as Record<string, unknown>;\n const marker = record[AGENT_CHAT_BACKGROUND_RUN_FIELD] as\n | { runId?: unknown }\n | undefined;\n if (marker && typeof marker.runId === \"string\" && marker.runId) {\n return marker.runId;\n }\n if (typeof record.taskId === \"string\" && record.taskId) {\n return record.taskId;\n }\n return null;\n}\n\n/**\n * Pure, transport-agnostic core of the `_process-run` route: validate the body,\n * authenticate the HMAC self-dispatch, and produce the body the re-entered\n * agent-chat handler should run as the background worker.\n *\n * Auth policy mirrors the agent-teams processor exactly:\n * - `A2A_SECRET` set → require a valid `verifyInternalToken(runId, token)`.\n * - no secret but a production runtime → refuse (503) — never run unsigned in\n * prod.\n * - no secret + non-prod (local dev) → allow unsigned; the SQL atomic claim\n * in the worker still prevents double-processing.\n *\n * Extracted from the route handler so the auth + marker-prep decision is unit\n * testable without booting the whole Nitro plugin. The route only adds body\n * reading and the final handler invocation around this.\n */\nexport function prepareProcessRunRequest(\n body: unknown,\n authHeader: string | undefined,\n): ProcessRunPreparation {\n if (!body || typeof body !== \"object\") {\n return {\n ok: false,\n status: 400,\n error: \"Invalid request body\",\n runId: null,\n };\n }\n const record = body as Record<string, unknown>;\n const marker = record[AGENT_CHAT_BACKGROUND_RUN_FIELD] as\n | { runId?: unknown }\n | undefined;\n const runId =\n marker && typeof marker.runId === \"string\"\n ? marker.runId\n : typeof record.taskId === \"string\"\n ? (record.taskId as string)\n : \"\";\n if (!runId) {\n return { ok: false, status: 400, error: \"runId required\", runId: null };\n }\n\n if (hasConfiguredA2ASecret()) {\n const token = extractBearerToken(authHeader);\n if (!verifyInternalToken(runId, token ?? \"\")) {\n return {\n ok: false,\n status: 401,\n error: \"Invalid or expired processor token\",\n runId,\n };\n }\n } else if (isA2AProductionRuntime()) {\n return {\n ok: false,\n status: 503,\n error:\n \"Agent chat background processor not configured — set A2A_SECRET on this deployment.\",\n runId,\n };\n }\n\n // Ensure the marker is present so the re-entered handler runs as the\n // background worker (reuses runId/turnId, no re-claim, no re-dispatch).\n if (!marker || typeof marker.runId !== \"string\") {\n record[AGENT_CHAT_BACKGROUND_RUN_FIELD] = { runId };\n }\n return { ok: true, runId, body: record };\n}\n"]}
|
|
@@ -520,7 +520,7 @@ function AgentPanelInner({ defaultMode = "chat", className, style, apiUrl, empty
|
|
|
520
520
|
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground"), style: AGENT_PANEL_CONTROL_STYLE, children: [_jsx(IconLayoutGrid, { size: 14 }), "Workspace"] }) }), _jsx(TooltipContent, { children: "Workspace files, agents, skills, and tasks" })] })] }) })), [codeAccessEnabled, codeUnavailableDescription, showCliMode]);
|
|
521
521
|
const [headerMenuOpen, setHeaderMenuOpen] = useState(false);
|
|
522
522
|
const [feedbackOpen, setFeedbackOpen] = useState(false);
|
|
523
|
-
const renderHeaderActions = useCallback(({ activeChatSessionId, activeTabId, addTab, clearActiveTab, closeAllTabs, closeOtherTabs, closeTab, showHistory, tabs, toggleHistory, }) => (_jsxs("div", { className: "relative flex shrink-0 items-center gap-0.5", children: [SHOW_ONBOARDING && (_jsx(Suspense, { fallback: null, children: _jsx(SetupButton, {}) })), _jsx(FeedbackButton, { variant: "icon", side: "bottom", align: "end", chatSessionId: activeChatSessionId, chatStorageKey: storageKey, open: feedbackOpen, onOpenChange: setFeedbackOpen, trigger: _jsx("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "pointer-events-none absolute
|
|
523
|
+
const renderHeaderActions = useCallback(({ activeChatSessionId, activeTabId, addTab, clearActiveTab, closeAllTabs, closeOtherTabs, closeTab, showHistory, tabs, toggleHistory, }) => (_jsxs("div", { className: "relative flex shrink-0 items-center gap-0.5", children: [SHOW_ONBOARDING && (_jsx(Suspense, { fallback: null, children: _jsx(SetupButton, {}) })), _jsx(FeedbackButton, { variant: "icon", side: "bottom", align: "end", chatSessionId: activeChatSessionId, chatStorageKey: storageKey, open: feedbackOpen, onOpenChange: setFeedbackOpen, trigger: _jsx("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "pointer-events-none absolute end-0 top-full h-px w-px opacity-0" }) }), mode === "chat" && (_jsx(IconTooltip, { content: "New chat", children: _jsx("button", { onClick: addTab, "aria-label": "New chat", className: "agent-sidebar-hover-reveal flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-accent/50", children: _jsx(IconPlus, { size: 14 }) }) })), mode === "cli" && canUseCodeTools && (_jsx(IconTooltip, { content: "New terminal", children: _jsx("button", { onClick: addCliTab, "aria-label": "New terminal", className: "agent-sidebar-hover-reveal flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-accent/50", children: _jsx(IconPlus, { size: 14 }) }) })), _jsxs(DropdownMenu, { open: headerMenuOpen, onOpenChange: setHeaderMenuOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { className: cn("flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-accent/50", (headerMenuOpen || mode === "settings") &&
|
|
524
524
|
"bg-accent text-foreground"), "aria-label": "Agent panel options", children: _jsx(IconDotsVertical, { size: 14 }) }) }), _jsxs(DropdownMenuContent, { align: "end", sideOffset: 6, className: "w-48", children: [onCollapse && (_jsxs(_Fragment, { children: [_jsxs(DropdownMenuItem, { onSelect: onCollapse, children: [_jsx(IconLayoutSidebarRightCollapse, { size: 14, className: "shrink-0" }), "Collapse sidebar"] }), _jsx(DropdownMenuSeparator, {})] })), mode === "chat" && toggleHistory && (_jsxs(DropdownMenuItem, { onSelect: toggleHistory, children: [_jsx(IconHistory, { size: 14, className: "shrink-0" }), showHistory ? "Hide chats" : "All chats"] })), mode === "chat" && (_jsx(RunsTrayMenuItem, { pollMs: 2000, limit: 12, showRecent: true, onOpenThread: openRunThread })), mode === "chat" && _jsx(DropdownMenuSeparator, {}), mode === "cli" && availableClis.length > 0 && (_jsxs(_Fragment, { children: [availableClis.map((cli) => (_jsxs(DropdownMenuItem, { onSelect: () => selectCli(cli.command), className: cn(cli.command === selectedCli
|
|
525
525
|
? "font-medium"
|
|
526
526
|
: "text-muted-foreground"), children: [cli.command === selectedCli ? (_jsx(IconCheck, { size: 12, className: "shrink-0" })) : (_jsx("span", { className: "w-3" })), cli.label] }, cli.command))), _jsx(DropdownMenuSeparator, {})] })), _jsxs(DropdownMenuItem, { onSelect: () => switchMode("settings"), className: cn(mode === "settings" ? "font-medium" : "text-muted-foreground"), children: [_jsx(IconSettings, { size: 14, className: "shrink-0" }), "Settings"] }), _jsxs(DropdownMenuItem, { onSelect: () => setFeedbackOpen(true), children: [_jsx(IconMessageDots, { size: 14, className: "shrink-0" }), "Feedback"] }), onToggleFullscreen && (_jsxs(DropdownMenuItem, { onSelect: onToggleFullscreen, children: [isFullscreen ? (_jsx(IconArrowsMinimize, { size: 14, className: "shrink-0" })) : (_jsx(IconArrowsMaximize, { size: 14, className: "shrink-0" })), isFullscreen ? "Exit fullscreen" : "Fullscreen"] })), ((mode === "chat" && activeTabId) ||
|
|
@@ -596,7 +596,7 @@ function AgentPanelInner({ defaultMode = "chat", className, style, apiUrl, empty
|
|
|
596
596
|
activeTab?.parentThreadId === tab.id);
|
|
597
597
|
return (_jsxs("div", { role: "button", tabIndex: 0, ref: isActive ? activeTabRefCb : undefined, onClick: () => setActiveTabId(tab.id), onKeyDown: activateOnKeyDown(() => setActiveTabId(tab.id)), className: cn("agent-tab relative flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-[11px] font-medium cursor-pointer max-w-[150px]", isActive
|
|
598
598
|
? "bg-accent text-foreground"
|
|
599
|
-
: "text-muted-foreground hover:bg-accent hover:text-foreground"), children: [_jsx("span", { className: "truncate
|
|
599
|
+
: "text-muted-foreground hover:bg-accent hover:text-foreground"), children: [_jsx("span", { className: "truncate pe-1", children: tab.label }), tab.status === "running" && (_jsx("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-muted-foreground/50 animate-pulse" })), _jsx("button", { type: "button", "aria-label": "Close tab", onClick: (e) => {
|
|
600
600
|
e.stopPropagation();
|
|
601
601
|
closeTab(tab.id);
|
|
602
602
|
}, className: "agent-tab-close flex items-center justify-end text-muted-foreground hover:text-foreground", style: {
|
|
@@ -628,7 +628,7 @@ function AgentPanelInner({ defaultMode = "chat", className, style, apiUrl, empty
|
|
|
628
628
|
? "bg-accent text-foreground"
|
|
629
629
|
: "text-muted-foreground hover:bg-accent hover:text-foreground"), children: "Main" }), childTabs.map((tab) => (_jsxs("div", { role: "button", tabIndex: 0, ref: tab.id === activeTabId ? activeTabRefCb : undefined, onClick: () => setActiveTabId(tab.id), onKeyDown: activateOnKeyDown(() => setActiveTabId(tab.id)), className: cn("agent-tab relative flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium cursor-pointer max-w-[140px]", tab.id === activeTabId
|
|
630
630
|
? "bg-accent text-foreground"
|
|
631
|
-
: "text-muted-foreground hover:bg-accent hover:text-foreground"), children: [_jsx("span", { className: "truncate
|
|
631
|
+
: "text-muted-foreground hover:bg-accent hover:text-foreground"), children: [_jsx("span", { className: "truncate pe-1", children: tab.subAgentName || tab.label }), tab.status === "running" && (_jsx("span", { className: "h-1 w-1 shrink-0 rounded-full bg-muted-foreground/50 animate-pulse" })), _jsx("button", { type: "button", "aria-label": "Close tab", onClick: (e) => {
|
|
632
632
|
e.stopPropagation();
|
|
633
633
|
closeTab(tab.id);
|
|
634
634
|
}, className: "agent-tab-close flex items-center justify-end text-muted-foreground hover:text-foreground", style: {
|