@agent-native/core 0.130.1 → 0.131.2
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/README.md +2 -2
- package/corpus/core/CHANGELOG.md +57 -0
- package/corpus/core/docs/content/agent-surfaces.mdx +4 -4
- package/corpus/core/docs/content/automations.mdx +61 -12
- package/corpus/core/docs/content/deployment.mdx +11 -4
- package/corpus/core/docs/content/extensions.mdx +39 -33
- package/corpus/core/docs/content/recurring-jobs.mdx +41 -19
- package/corpus/core/docs/content/template-dispatch-operations.mdx +19 -7
- package/corpus/core/package.json +3 -1
- package/corpus/core/src/action.ts +55 -0
- package/corpus/core/src/agent/engine/builder-engine.ts +8 -4
- package/corpus/core/src/agent/production-agent.ts +175 -100
- package/corpus/core/src/agent/tool-search.ts +36 -0
- package/corpus/core/src/automations/service.ts +506 -0
- package/corpus/core/src/browser-context/index.ts +392 -0
- package/corpus/core/src/client/AgentPanel.tsx +2 -1
- package/corpus/core/src/client/FeedbackButton.tsx +37 -4
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +21 -0
- package/corpus/core/src/client/agent-chat.ts +31 -3
- package/corpus/core/src/client/agent-page/AgentJobsTab.tsx +438 -310
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +4 -4
- package/corpus/core/src/client/agent-page/use-jobs.ts +7 -0
- package/corpus/core/src/client/analytics-session.ts +13 -0
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +67 -0
- package/corpus/core/src/client/settings/AutomationsSection.tsx +27 -499
- package/corpus/core/src/client/settings/SettingsPanel.tsx +32 -11
- package/corpus/core/src/client/settings/index.ts +2 -0
- package/corpus/core/src/client/use-agent-chat.ts +35 -3
- package/corpus/core/src/client/use-chat-threads.ts +8 -25
- package/corpus/core/src/deploy/build.ts +2 -0
- package/corpus/core/src/deploy/workspace-deploy.ts +2 -0
- package/corpus/core/src/extensions/actions.ts +115 -3
- package/corpus/core/src/extensions/fetch-tool.ts +11 -0
- package/corpus/core/src/extensions/routes.ts +16 -1
- package/corpus/core/src/extensions/web-content.ts +96 -1
- package/corpus/core/src/integrations/computer-supervision.ts +33 -1
- package/corpus/core/src/integrations/index.ts +6 -0
- package/corpus/core/src/integrations/integration-durable-dispatch-config.ts +10 -0
- package/corpus/core/src/integrations/integration-durable-dispatch.ts +4 -0
- package/corpus/core/src/integrations/plugin.ts +94 -41
- package/corpus/core/src/integrations/remote-browser-actions.ts +621 -0
- package/corpus/core/src/jobs/actions/list-recurring-jobs.ts +5 -7
- package/corpus/core/src/jobs/actions/manage-recurring-job.ts +3 -7
- package/corpus/core/src/jobs/background-automation-runner.ts +437 -0
- package/corpus/core/src/jobs/frontmatter.ts +308 -0
- package/corpus/core/src/jobs/scheduler.ts +89 -598
- package/corpus/core/src/jobs/tools.ts +22 -3
- package/corpus/core/src/localization/default-messages.ts +45 -45
- package/corpus/core/src/mcp-client/index.ts +6 -0
- package/corpus/core/src/notifications/actions.ts +5 -0
- package/corpus/core/src/progress/actions.ts +5 -0
- package/corpus/core/src/provider-api/actions/github-repo-files.ts +11 -0
- package/corpus/core/src/provider-api/actions/provider-api.ts +13 -0
- package/corpus/core/src/server/action-discovery.ts +7 -0
- package/corpus/core/src/server/agent-chat/browser-team-tools.ts +126 -3
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +7 -11
- package/corpus/core/src/server/agent-chat/plugin-options.ts +3 -3
- package/corpus/core/src/server/agent-chat/script-entries.ts +52 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +25 -5
- package/corpus/core/src/server/attribution.ts +22 -0
- package/corpus/core/src/server/auth.ts +20 -6
- package/corpus/core/src/server/better-auth-instance.ts +10 -2
- package/corpus/core/src/server/core-routes-plugin.ts +10 -1
- package/corpus/core/src/server/csrf.ts +25 -0
- package/corpus/core/src/server/email-template.ts +43 -13
- package/corpus/core/src/server/google-oauth.ts +21 -1
- package/corpus/core/src/server/onboarding-html.ts +18 -0
- package/corpus/core/src/server/prompts/framework-core-compact.ts +3 -3
- package/corpus/core/src/server/prompts/framework-core.ts +3 -3
- package/corpus/core/src/server/prompts/shared-rules.ts +3 -3
- package/corpus/core/src/settings/index.ts +1 -0
- package/corpus/core/src/shared/analytics-anonymous-id.ts +35 -0
- package/corpus/core/src/sharing/actions/share-resource.ts +26 -4
- package/corpus/core/src/sharing/index.ts +1 -0
- package/corpus/core/src/sharing/registry.ts +23 -0
- package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +26 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +28 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +27 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +28 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +28 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +25 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +27 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +27 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +27 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +24 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +24 -0
- package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +10 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/automations/SKILL.md +53 -8
- package/corpus/core/src/templates/workspace-core/.agents/skills/browser-sessions/SKILL.md +131 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +13 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +23 -15
- package/corpus/core/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +33 -18
- package/corpus/core/src/tracking/providers.ts +1 -0
- package/corpus/core/src/tracking/registry.ts +2 -1
- package/corpus/core/src/tracking/types.ts +1 -0
- package/corpus/core/src/triggers/actions/list-automations.ts +43 -44
- package/corpus/core/src/triggers/actions/manage-automation.ts +17 -48
- package/corpus/core/src/triggers/actions.ts +218 -127
- package/corpus/core/src/triggers/dispatcher.ts +181 -367
- package/corpus/core/src/triggers/routes.ts +84 -27
- package/corpus/core/src/triggers/types.ts +9 -23
- package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/analytics/actions/install-dashboard-template.ts +13 -4
- package/corpus/templates/analytics/actions/rename-dashboard.ts +8 -3
- package/corpus/templates/analytics/actions/restore-dashboard-revision.ts +8 -3
- package/corpus/templates/analytics/actions/update-dashboard.ts +22 -5
- package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +7 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +1 -82
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +4 -4
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +23 -13
- package/corpus/templates/analytics/app/global.css +21 -0
- package/corpus/templates/analytics/app/i18n-data.ts +165 -101
- package/corpus/templates/analytics/app/lib/custom-block-promotion.ts +62 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +17 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +3 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +77 -12
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dashboard-save-queue.ts +34 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +42 -26
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +15 -0
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +1 -1
- package/corpus/templates/analytics/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-the-dashboard.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-custom-dashboard-blocks-now-identify-one-off-agent-patches-a.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-dashboard-chart-deletions-now-save-in-order-so-removed-rows-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-dashboard-chart-loaders-are-easier-to-see-and-animate-more-s.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-plan-mode-can-now-query-connected-analytics-sources-while-ke.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-plan-mode-can-use-clips-as-read-only-prompt-context.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-signup-entry-pages-now-show-the-first-page-viewed-before-eac.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +26 -1
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +0 -33
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +13 -3
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +9 -1
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +44 -1
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +96 -16
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +18 -27
- package/corpus/templates/analytics/server/plugins/core-routes.ts +1 -0
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +4 -8
- package/corpus/templates/assets/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-the-workspace.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +3 -7
- package/corpus/templates/brain/app/root.tsx +0 -3
- package/corpus/templates/brain/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-ask-brain.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-29-extensions-are-no-longer-shown-as-a-default-command-menu-des.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +25 -5
- package/corpus/templates/calendar/AGENTS.md +5 -0
- package/corpus/templates/calendar/actions/create-event.ts +43 -13
- package/corpus/templates/calendar/actions/event-action-helpers.ts +131 -1
- package/corpus/templates/calendar/actions/manage-event-draft.ts +65 -2
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +437 -258
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +19 -3
- package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +24 -0
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +15 -2
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +1 -5
- package/corpus/templates/calendar/app/hooks/use-events.ts +44 -5
- package/corpus/templates/calendar/app/i18n-data.ts +50 -0
- package/corpus/templates/calendar/app/lib/all-day-layout.ts +9 -2
- package/corpus/templates/calendar/app/lib/event-form-initialization.ts +4 -8
- package/corpus/templates/calendar/app/lib/event-form-utils.ts +30 -8
- package/corpus/templates/calendar/app/lib/location-suggestions.ts +36 -0
- package/corpus/templates/calendar/app/lib/out-of-office.ts +87 -1
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +68 -13
- package/corpus/templates/calendar/changelog/2026-07-26-out-of-office-events-now-default-to-full-days-with-a-ready.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-29-recent-calendar-locations-now-appear-as-address-suggestions-.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/calendar/server/lib/find-time.ts +29 -5
- package/corpus/templates/calendar/shared/api.ts +2 -0
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +1 -5
- package/corpus/templates/chat/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +3 -1
- package/corpus/templates/clips/app/components/library/library-layout.tsx +2 -6
- package/corpus/templates/clips/app/components/meetings/day-header.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +1 -22
- package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +26 -1
- package/corpus/templates/clips/app/components/workspace/organization-identity-card.tsx +107 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +3 -4
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +0 -10
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +23 -51
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +1 -8
- package/corpus/templates/clips/changelog/2026-07-29-clearing-all-recording-edits-no-longer-leaves-the-editor-unr.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-clip-share-emails-now-open-with-who-shared-the-clip-add-a-su.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-finished-meeting-pills-now-have-a-clear-close-button.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-fixed-system-audio-recordings-picking-up-your-microphone-in-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-meeting-cards-no-longer-flicker-or-disappear-when-hovered-in.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-organization-name-logo-brand-color-and-default-visibility-no.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-the-desktop-camera-preview-now-closes-after-a-recording-fin.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-transcript-lines-on-the-meeting-page-no-longer-jump-to-the-r.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-when-a-meeting-wraps-up-the-recording-pill-now-shows-a-green.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +14 -15
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +6 -3
- package/corpus/templates/clips/desktop/src/lib/bubble-session.ts +11 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +9 -4
- package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +11 -0
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +112 -32
- package/corpus/templates/clips/desktop/src/styles.css +42 -2
- package/corpus/templates/clips/server/db/index.ts +6 -0
- package/corpus/templates/clips/server/jobs/transactional-emails.ts +47 -23
- package/corpus/templates/clips/server/lib/share-email-hero.ts +33 -0
- package/corpus/templates/clips/server/lib/transactional-email-store.ts +16 -6
- package/corpus/templates/clips/shared/clips-ai-prefs.ts +0 -1
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/content/.agents/skills/content-product-development/SKILL.md +103 -0
- package/corpus/templates/content/.agents/skills/content-product-development/references/verification.md +57 -0
- package/corpus/templates/content/AGENTS.md +2 -0
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -6
- package/corpus/templates/content/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/content/docs/product/README.md +115 -0
- package/corpus/templates/content/docs/product/architecture.md +98 -0
- package/corpus/templates/content/docs/product/capabilities/content.access.page-database.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.access.row-private.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.access.safe-aggregate.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.access.visibility-closure.md +79 -0
- package/corpus/templates/content/docs/product/capabilities/content.action.button.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.agent.action-parity.md +73 -0
- package/corpus/templates/content/docs/product/capabilities/content.agent.audience-safe.md +91 -0
- package/corpus/templates/content/docs/product/capabilities/content.agent.automation.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.agent.expression-authoring.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.agent.presence.md +103 -0
- package/corpus/templates/content/docs/product/capabilities/content.agent.resource-consent.md +90 -0
- package/corpus/templates/content/docs/product/capabilities/content.agent.skill-catalog.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.api.cms.md +70 -0
- package/corpus/templates/content/docs/product/capabilities/content.author.code.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.author.document-editor.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.author.footnotes.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.author.math.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.author.media.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.author.mermaid.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.automation.scheduled.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.capture.enrich.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.command.fabric.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.comment.page-owned.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.diff.ai-assist.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.diff.filtered-review.md +79 -0
- package/corpus/templates/content/docs/product/capabilities/content.diff.in-place.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.discussion.page.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.embed.host-grant.md +70 -0
- package/corpus/templates/content/docs/product/capabilities/content.embed.mcp-app.md +69 -0
- package/corpus/templates/content/docs/product/capabilities/content.embed.surface.md +74 -0
- package/corpus/templates/content/docs/product/capabilities/content.event.committed.md +85 -0
- package/corpus/templates/content/docs/product/capabilities/content.expression.cached-result.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.expression.catalog.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.expression.language.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.feedback.signal.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.form.shared-engine.md +72 -0
- package/corpus/templates/content/docs/product/capabilities/content.history.queryable.md +79 -0
- package/corpus/templates/content/docs/product/capabilities/content.home.global.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.job.durable.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.knowledge.graph.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.knowledge.links.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.knowledge.search.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.layout.responsive.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.navigation.sidebar.md +86 -0
- package/corpus/templates/content/docs/product/capabilities/content.notification.source.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.object.block.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.object.blocks-field.md +79 -0
- package/corpus/templates/content/docs/product/capabilities/content.object.database.md +92 -0
- package/corpus/templates/content/docs/product/capabilities/content.object.multi-membership.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.object.page.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.object.reference.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.object.transclusion.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.organization.teams.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.portability.pdf-export.md +78 -0
- package/corpus/templates/content/docs/product/capabilities/content.portability.roundtrip.md +154 -0
- package/corpus/templates/content/docs/product/capabilities/content.portability.source-representation.md +70 -0
- package/corpus/templates/content/docs/product/capabilities/content.portability.vault-export.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.presentation.mode.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.preset.catalog.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.property.actor.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.property.catalog.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.property.constraints.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.property.guarded-change.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.property.location.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.property.typed.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.publish.public.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.publish.reading.md +74 -0
- package/corpus/templates/content/docs/product/capabilities/content.query.object.md +114 -0
- package/corpus/templates/content/docs/product/capabilities/content.reader.documents.md +69 -0
- package/corpus/templates/content/docs/product/capabilities/content.reader.surface.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.relationship.edge.md +183 -0
- package/corpus/templates/content/docs/product/capabilities/content.renderer.artifact-block.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.renderer.custom-block.md +81 -0
- package/corpus/templates/content/docs/product/capabilities/content.renderer.graph.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.renderer.typed.md +92 -0
- package/corpus/templates/content/docs/product/capabilities/content.research.annotation.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.research.citation.md +70 -0
- package/corpus/templates/content/docs/product/capabilities/content.review.code.md +67 -0
- package/corpus/templates/content/docs/product/capabilities/content.revision.suggestions.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.rule.deterministic.md +79 -0
- package/corpus/templates/content/docs/product/capabilities/content.schedule.constraints.md +81 -0
- package/corpus/templates/content/docs/product/capabilities/content.security.private-vault.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.share.views.md +140 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.adapters.md +154 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.builder-codec.md +70 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.catalog.md +149 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.file-folder.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.local-bridge.md +156 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.local-project.md +70 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.page-link.md +70 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.row-union.md +69 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.spaces-files.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.sync-policy.md +161 -0
- package/corpus/templates/content/docs/product/capabilities/content.system.dependencies.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.system.my-tasks.md +75 -0
- package/corpus/templates/content/docs/product/capabilities/content.system.project-status.md +77 -0
- package/corpus/templates/content/docs/product/capabilities/content.system.research-workspace.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.system.task-project.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.template.governance.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.template.graph.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.template.item-body.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.template.update.md +71 -0
- package/corpus/templates/content/docs/product/capabilities/content.time.types.md +85 -0
- package/corpus/templates/content/docs/product/capabilities/content.version.branching.md +151 -0
- package/corpus/templates/content/docs/product/capabilities/content.version.field-history.md +103 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.canvas.md +94 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.chart.md +91 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.dynamic-create.md +137 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.fast-capture.md +82 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.graph.md +95 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.grouping-aggregation.md +83 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.map.md +77 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.personal-state.md +99 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.pivot.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.query.md +106 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.renderer-conformance.md +77 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.scale.md +77 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.source-query.md +159 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.timeline.md +86 -0
- package/corpus/templates/content/docs/product/capabilities/content.view.tree.md +77 -0
- package/corpus/templates/content/docs/product/capabilities/content.workspace.multi-scope.md +80 -0
- package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.workspace.view-instance.md +76 -0
- package/corpus/templates/content/docs/product/capabilities/content.workspace.working-set.md +77 -0
- package/corpus/templates/content/docs/product/chapters/content.chapter.capture-research.md +20 -0
- package/corpus/templates/content/docs/product/chapters/content.chapter.connected-sources.md +20 -0
- package/corpus/templates/content/docs/product/chapters/content.chapter.consensus.md +19 -0
- package/corpus/templates/content/docs/product/chapters/content.chapter.durable-home.md +21 -0
- package/corpus/templates/content/docs/product/chapters/content.chapter.publishing-portability.md +21 -0
- package/corpus/templates/content/docs/product/chapters/content.chapter.working-systems.md +27 -0
- package/corpus/templates/content/docs/product/encyclopedia.md +559 -0
- package/corpus/templates/content/docs/product/features/content.feature.bring-your-local-work.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.build-living-dashboards.md +34 -0
- package/corpus/templates/content/docs/product/features/content.feature.build-new-surfaces.md +33 -0
- package/corpus/templates/content/docs/product/features/content.feature.capture-into-action.md +34 -0
- package/corpus/templates/content/docs/product/features/content.feature.cite-what-you-found.md +34 -0
- package/corpus/templates/content/docs/product/features/content.feature.collaborate-in-context.md +59 -0
- package/corpus/templates/content/docs/product/features/content.feature.collect-structured-input.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.connect-your-sources.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.data-that-keeps-itself-right.md +45 -0
- package/corpus/templates/content/docs/product/features/content.feature.durable-foundations.md +48 -0
- package/corpus/templates/content/docs/product/features/content.feature.evolve-systems-safely.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.explore-alternatives-safely.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.find-your-place-again.md +40 -0
- package/corpus/templates/content/docs/product/features/content.feature.keep-your-private-vault-private.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.living-references.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.make-the-workspace-yours.md +40 -0
- package/corpus/templates/content/docs/product/features/content.feature.move-without-starting-over.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.plan-work-across-time.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.publish-with-confidence.md +43 -0
- package/corpus/templates/content/docs/product/features/content.feature.put-your-organizations-know-how-to-work.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.read-and-annotate-anything.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.review-changes-in-place.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.run-projects-your-way.md +44 -0
- package/corpus/templates/content/docs/product/features/content.feature.see-your-information-your-way.md +44 -0
- package/corpus/templates/content/docs/product/features/content.feature.share-how-your-organization-works.md +38 -0
- package/corpus/templates/content/docs/product/features/content.feature.sketch-connections-keep-whats-true.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.take-the-whole-vault-with-you.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.trust-your-connected-sources.md +40 -0
- package/corpus/templates/content/docs/product/features/content.feature.understand-what-your-data-says.md +39 -0
- package/corpus/templates/content/docs/product/features/content.feature.when-this-happens-that-follows.md +43 -0
- package/corpus/templates/content/docs/product/features/content.feature.work-across-every-workspace.md +37 -0
- package/corpus/templates/content/docs/product/features/content.feature.work-on-content-inside-another-application.md +37 -0
- package/corpus/templates/content/docs/product/roadmap.md +878 -0
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +1 -7
- package/corpus/templates/crm/app/i18n/en-US.ts +4 -0
- package/corpus/templates/crm/app/routes/settings.tsx +33 -8
- package/corpus/templates/crm/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +133 -63
- package/corpus/templates/design/.generated/bridge/embedded-wheel.generated.ts +19 -2
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +51 -14
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +41 -26
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +22 -4
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +216 -116
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +21 -2
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +5 -1
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbenchLoader.tsx +10 -2
- package/corpus/templates/design/app/components/design/code-workbench/code-workbench-shell.ts +2 -0
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +60 -55
- package/corpus/templates/design/app/components/design/design-canvas/content-size-report.ts +88 -2
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +3 -2
- package/corpus/templates/design/app/components/design/types.ts +4 -0
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -5
- package/corpus/templates/design/app/pages/design-editor/clipboard-layer-source.ts +28 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +117 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +3 -1
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +120 -74
- package/corpus/templates/design/app/pages/design-editor/pending-structure-verification.ts +11 -0
- package/corpus/templates/design/app/pages/design-editor/react-semantic-handoff.ts +2 -0
- package/corpus/templates/design/app/pages/design-editor/source-location.ts +1 -1
- package/corpus/templates/design/changelog/2026-07-29-copy-rendered-ui-between-live-local-apps-and-design-files-wh.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-design-boards-stay-dark-and-viewport-height-content-keeps-it.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-design-frames-no-longer-grow-continuously-when-their-content.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-the-code-panel-and-apply-design-update-control-now-use-clear.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-the-tools-panel-now-keeps-extension-creation-and-discovery-h.md +6 -0
- package/corpus/templates/design/shared/source-mode.ts +7 -1
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +171 -0
- package/corpus/templates/dispatch/app/routes/browser-chat.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/browser-connect.tsx +4 -0
- package/corpus/templates/dispatch/changelog/2026-07-29-browser-chat-can-securely-connect-the-agent-native-chrome-ex.md +6 -0
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +1 -6
- package/corpus/templates/forms/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -5
- package/corpus/templates/macros/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -9
- package/corpus/templates/mail/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +3 -7
- package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -2
- package/corpus/templates/plan/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-ask-plan.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-29-fixed-plan-pages-crashing-when-recent-activity-is-unavailabl.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +60 -4
- package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +20 -0
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +30 -1
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -1
- package/corpus/templates/slides/AGENTS.md +22 -24
- package/corpus/templates/slides/actions/check-image-gen.ts +8 -2
- package/corpus/templates/slides/actions/create-deck.ts +4 -12
- package/corpus/templates/slides/actions/export-pptx.ts +25 -3
- package/corpus/templates/slides/actions/generate-image-api.ts +4 -2
- package/corpus/templates/slides/actions/generate-slides-ai.ts +1 -1
- package/corpus/templates/slides/actions/get-deck-reference-context.ts +136 -0
- package/corpus/templates/slides/actions/get-workspace-defaults.ts +55 -0
- package/corpus/templates/slides/actions/image-gen-status.ts +10 -1
- package/corpus/templates/slides/actions/import-file.ts +53 -38
- package/corpus/templates/slides/actions/list-decks.ts +2 -0
- package/corpus/templates/slides/actions/patch-deck.ts +2 -0
- package/corpus/templates/slides/actions/set-workspace-defaults.ts +50 -0
- package/corpus/templates/slides/actions/view-screen.ts +6 -0
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +67 -3
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +40 -8
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +33 -8
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -2
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +114 -128
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1193 -267
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +302 -102
- package/corpus/templates/slides/app/components/editor/rich-text-selection.ts +270 -0
- package/corpus/templates/slides/app/components/editor/slide-escape-arbiter.ts +34 -0
- package/corpus/templates/slides/app/components/editor/slide-object-interactions.ts +368 -0
- package/corpus/templates/slides/app/components/editor/slide-presence.ts +13 -0
- package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +23 -3
- package/corpus/templates/slides/app/components/layout/Layout.tsx +39 -6
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +1 -6
- package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +23 -0
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +0 -2
- package/corpus/templates/slides/app/context/DeckContext.tsx +2 -0
- package/corpus/templates/slides/app/global.css +60 -0
- package/corpus/templates/slides/app/hooks/use-agent-generating.ts +76 -5
- package/corpus/templates/slides/app/hooks/use-workspace-defaults.ts +26 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +38 -3
- package/corpus/templates/slides/app/lib/generation-state.ts +13 -3
- package/corpus/templates/slides/app/lib/slide-image-replacement.ts +27 -6
- package/corpus/templates/slides/app/lib/text-tool-shortcut.ts +62 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +197 -83
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +95 -0
- package/corpus/templates/slides/app/pages/Index.tsx +348 -53
- package/corpus/templates/slides/changelog/2026-07-28-pick-an-existing-deck-as-a-style-reference-when-creating-a-n.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-ai-editing-status-is-now-quieter-and-only-shows-slide-presen.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-design-systems-and-reference-decks-are-easier-to-choose-toge.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-generated-decks-now-receive-a-concise-relevant-title-before-.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-new-deck-prompts-reuse-empty-chats.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-new-deck-setup-now-stays-in-the-editor-with-closable-style-a.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-selected-words-and-text-runs-can-now-be-styled-independently.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-slide-annotation-tools-are-clearer-and-escape-now-exits-anno.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-slide-editing-now-opens-with-the-app-navigation-collapsed-fo.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-slide-editing-stays-visually-clean-on-hover-without-a-canvas.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-slides-now-appear-one-by-one-while-ai-builds-a-deck-with-ste.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-text-boxes-now-select-move-duplicate-resize-and-style-like-a.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-29-untitled-decks-now-use-a-clearer-this-deck-label-in-the-agen.md +6 -0
- package/corpus/templates/slides/server/handlers/image-providers/builder.ts +305 -0
- package/corpus/templates/slides/server/handlers/image-providers/index.ts +6 -3
- package/corpus/templates/slides/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/slides/server/workspace-defaults.ts +169 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +31 -8
- package/corpus/templates/tasks/app/i18n/en-US.ts +7 -0
- package/corpus/templates/tasks/app/routes/settings.tsx +25 -2
- package/corpus/templates/tasks/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/toolkit/CHANGELOG.md +15 -0
- package/corpus/toolkit/README.md +2 -2
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/app-shell/sidebar-footer-actions.tsx +0 -3
- package/corpus/toolkit/src/chat-history.css +1 -0
- package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +35 -14
- package/corpus/toolkit/src/composer/PromptComposer.tsx +6 -0
- package/corpus/toolkit/src/composer/TiptapComposer.tsx +11 -3
- package/corpus/toolkit/src/design-tweaks/visual-style-controls.tsx +64 -11
- package/dist/action.d.ts +44 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +9 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/builder-engine.js +6 -4
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/production-agent.d.ts +11 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +131 -90
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/tool-search.d.ts +4 -0
- package/dist/agent/tool-search.d.ts.map +1 -1
- package/dist/agent/tool-search.js +30 -0
- package/dist/agent/tool-search.js.map +1 -1
- package/dist/automations/service.d.ts +85 -0
- package/dist/automations/service.d.ts.map +1 -0
- package/dist/automations/service.js +332 -0
- package/dist/automations/service.js.map +1 -0
- package/dist/browser-context/index.d.ts +579 -0
- package/dist/browser-context/index.d.ts.map +1 -0
- package/dist/browser-context/index.js +331 -0
- package/dist/browser-context/index.js.map +1 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +1 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/FeedbackButton.d.ts +6 -2
- package/dist/client/FeedbackButton.d.ts.map +1 -1
- package/dist/client/FeedbackButton.js +20 -3
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +19 -2
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat.d.ts +15 -0
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +13 -3
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/agent-page/AgentJobsTab.d.ts +1 -0
- package/dist/client/agent-page/AgentJobsTab.d.ts.map +1 -1
- package/dist/client/agent-page/AgentJobsTab.js +186 -98
- package/dist/client/agent-page/AgentJobsTab.js.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.js +4 -4
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
- package/dist/client/agent-page/use-jobs.d.ts +7 -0
- package/dist/client/agent-page/use-jobs.d.ts.map +1 -1
- package/dist/client/agent-page/use-jobs.js.map +1 -1
- package/dist/client/analytics-session.d.ts.map +1 -1
- package/dist/client/analytics-session.js +13 -0
- package/dist/client/analytics-session.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +29 -6
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/settings/AutomationsSection.d.ts +0 -9
- package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
- package/dist/client/settings/AutomationsSection.js +9 -168
- package/dist/client/settings/AutomationsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts +9 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +19 -11
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/index.d.ts +1 -1
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -1
- package/dist/client/settings/index.js.map +1 -1
- package/dist/client/use-agent-chat.d.ts.map +1 -1
- package/dist/client/use-agent-chat.js +20 -3
- package/dist/client/use-agent-chat.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +4 -17
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +2 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/workspace-deploy.d.ts.map +1 -1
- package/dist/deploy/workspace-deploy.js +2 -1
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +82 -6
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/fetch-tool.d.ts.map +1 -1
- package/dist/extensions/fetch-tool.js +11 -0
- package/dist/extensions/fetch-tool.js.map +1 -1
- package/dist/extensions/routes.d.ts +5 -1
- package/dist/extensions/routes.d.ts.map +1 -1
- package/dist/extensions/routes.js +7 -1
- package/dist/extensions/routes.js.map +1 -1
- package/dist/extensions/web-content.d.ts +1 -0
- package/dist/extensions/web-content.d.ts.map +1 -1
- package/dist/extensions/web-content.js +82 -1
- package/dist/extensions/web-content.js.map +1 -1
- package/dist/integrations/computer-supervision.d.ts.map +1 -1
- package/dist/integrations/computer-supervision.js +22 -1
- package/dist/integrations/computer-supervision.js.map +1 -1
- package/dist/integrations/index.d.ts +3 -2
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +3 -2
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/integration-durable-dispatch-config.d.ts +2 -0
- package/dist/integrations/integration-durable-dispatch-config.d.ts.map +1 -1
- package/dist/integrations/integration-durable-dispatch-config.js +4 -0
- package/dist/integrations/integration-durable-dispatch-config.js.map +1 -1
- package/dist/integrations/integration-durable-dispatch.d.ts +2 -2
- package/dist/integrations/integration-durable-dispatch.d.ts.map +1 -1
- package/dist/integrations/integration-durable-dispatch.js +2 -2
- package/dist/integrations/integration-durable-dispatch.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +84 -39
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/remote-browser-actions.d.ts +7 -0
- package/dist/integrations/remote-browser-actions.d.ts.map +1 -0
- package/dist/integrations/remote-browser-actions.js +482 -0
- package/dist/integrations/remote-browser-actions.js.map +1 -0
- package/dist/jobs/actions/list-recurring-jobs.d.ts.map +1 -1
- package/dist/jobs/actions/list-recurring-jobs.js +4 -6
- package/dist/jobs/actions/list-recurring-jobs.js.map +1 -1
- package/dist/jobs/actions/manage-recurring-job.js +3 -6
- package/dist/jobs/actions/manage-recurring-job.js.map +1 -1
- package/dist/jobs/background-automation-runner.d.ts +76 -0
- package/dist/jobs/background-automation-runner.d.ts.map +1 -0
- package/dist/jobs/background-automation-runner.js +288 -0
- package/dist/jobs/background-automation-runner.js.map +1 -0
- package/dist/jobs/frontmatter.d.ts +63 -0
- package/dist/jobs/frontmatter.d.ts.map +1 -0
- package/dist/jobs/frontmatter.js +216 -0
- package/dist/jobs/frontmatter.js.map +1 -0
- package/dist/jobs/scheduler.d.ts +6 -60
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +67 -484
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/jobs/tools.d.ts.map +1 -1
- package/dist/jobs/tools.js +24 -3
- package/dist/jobs/tools.js.map +1 -1
- package/dist/localization/default-messages.d.ts +28 -33
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +34 -39
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +4 -0
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/notifications/actions.d.ts.map +1 -1
- package/dist/notifications/actions.js +5 -0
- package/dist/notifications/actions.js.map +1 -1
- package/dist/notifications/routes.d.ts +6 -6
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/actions.d.ts.map +1 -1
- package/dist/progress/actions.js +5 -0
- package/dist/progress/actions.js.map +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
- package/dist/provider-api/actions/github-repo-files.d.ts.map +1 -1
- package/dist/provider-api/actions/github-repo-files.js +9 -0
- package/dist/provider-api/actions/github-repo-files.js.map +1 -1
- package/dist/provider-api/actions/provider-api.d.ts +16 -16
- package/dist/provider-api/actions/provider-api.d.ts.map +1 -1
- package/dist/provider-api/actions/provider-api.js +14 -0
- package/dist/provider-api/actions/provider-api.js.map +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +5 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat/browser-team-tools.d.ts.map +1 -1
- package/dist/server/agent-chat/browser-team-tools.js +90 -3
- package/dist/server/agent-chat/browser-team-tools.js.map +1 -1
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -1
- package/dist/server/agent-chat/framework-prompts.js +7 -11
- package/dist/server/agent-chat/framework-prompts.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +3 -3
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat/script-entries.d.ts.map +1 -1
- package/dist/server/agent-chat/script-entries.js +43 -1
- package/dist/server/agent-chat/script-entries.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +24 -5
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/attribution.d.ts +6 -0
- package/dist/server/attribution.d.ts.map +1 -1
- package/dist/server/attribution.js +14 -14
- package/dist/server/attribution.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +5 -2
- package/dist/server/auth.js.map +1 -1
- package/dist/server/better-auth-instance.d.ts +2 -1
- package/dist/server/better-auth-instance.d.ts.map +1 -1
- package/dist/server/better-auth-instance.js +6 -3
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts +7 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +3 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/csrf.js +25 -0
- package/dist/server/csrf.js.map +1 -1
- package/dist/server/email-template.d.ts +4 -0
- package/dist/server/email-template.d.ts.map +1 -1
- package/dist/server/email-template.js +25 -8
- package/dist/server/email-template.js.map +1 -1
- package/dist/server/google-oauth.d.ts +3 -0
- package/dist/server/google-oauth.d.ts.map +1 -1
- package/dist/server/google-oauth.js +12 -1
- package/dist/server/google-oauth.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +18 -0
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/prompts/framework-core-compact.js +3 -3
- package/dist/server/prompts/framework-core-compact.js.map +1 -1
- package/dist/server/prompts/framework-core.js +3 -3
- package/dist/server/prompts/framework-core.js.map +1 -1
- package/dist/server/prompts/shared-rules.js +3 -3
- package/dist/server/prompts/shared-rules.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.d.ts.map +1 -1
- package/dist/settings/index.js +1 -1
- package/dist/settings/index.js.map +1 -1
- package/dist/shared/analytics-anonymous-id.d.ts +12 -0
- package/dist/shared/analytics-anonymous-id.d.ts.map +1 -0
- package/dist/shared/analytics-anonymous-id.js +29 -0
- package/dist/shared/analytics-anonymous-id.js.map +1 -0
- package/dist/sharing/actions/share-resource.d.ts.map +1 -1
- package/dist/sharing/actions/share-resource.js +23 -4
- package/dist/sharing/actions/share-resource.js.map +1 -1
- package/dist/sharing/index.d.ts +1 -1
- package/dist/sharing/index.d.ts.map +1 -1
- package/dist/sharing/index.js.map +1 -1
- package/dist/sharing/registry.d.ts +23 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +1 -5
- package/dist/templates/chat/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/default/app/i18n/ar-SA.ts +26 -0
- package/dist/templates/default/app/i18n/de-DE.ts +28 -0
- package/dist/templates/default/app/i18n/en-US.ts +27 -0
- package/dist/templates/default/app/i18n/es-ES.ts +28 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +28 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +25 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +27 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +27 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +27 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +24 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +24 -0
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +10 -7
- package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +53 -8
- package/dist/templates/workspace-core/.agents/skills/browser-sessions/SKILL.md +131 -0
- package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +13 -4
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +23 -15
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +33 -18
- package/dist/tracking/providers.d.ts.map +1 -1
- package/dist/tracking/providers.js +1 -0
- package/dist/tracking/providers.js.map +1 -1
- package/dist/tracking/registry.d.ts +1 -0
- package/dist/tracking/registry.d.ts.map +1 -1
- package/dist/tracking/registry.js +1 -0
- package/dist/tracking/registry.js.map +1 -1
- package/dist/tracking/types.d.ts +1 -0
- package/dist/tracking/types.d.ts.map +1 -1
- package/dist/tracking/types.js.map +1 -1
- package/dist/triggers/actions/list-automations.d.ts +7 -0
- package/dist/triggers/actions/list-automations.d.ts.map +1 -1
- package/dist/triggers/actions/list-automations.js +29 -41
- package/dist/triggers/actions/list-automations.js.map +1 -1
- package/dist/triggers/actions/manage-automation.js +15 -33
- package/dist/triggers/actions/manage-automation.js.map +1 -1
- package/dist/triggers/actions.d.ts.map +1 -1
- package/dist/triggers/actions.js +184 -95
- package/dist/triggers/actions.js.map +1 -1
- package/dist/triggers/dispatcher.d.ts +3 -9
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +134 -304
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/triggers/routes.d.ts.map +1 -1
- package/dist/triggers/routes.js +76 -17
- package/dist/triggers/routes.js.map +1 -1
- package/dist/triggers/types.d.ts +4 -23
- package/dist/triggers/types.d.ts.map +1 -1
- package/dist/triggers/types.js.map +1 -1
- package/docs/content/agent-surfaces.mdx +4 -4
- package/docs/content/automations.mdx +61 -12
- package/docs/content/deployment.mdx +11 -4
- package/docs/content/extensions.mdx +39 -33
- package/docs/content/recurring-jobs.mdx +41 -19
- package/docs/content/template-dispatch-operations.mdx +19 -7
- package/package.json +4 -2
- package/src/action.ts +55 -0
- package/src/agent/engine/builder-engine.ts +8 -4
- package/src/agent/production-agent.ts +175 -100
- package/src/agent/tool-search.ts +36 -0
- package/src/automations/service.ts +506 -0
- package/src/browser-context/index.ts +392 -0
- package/src/client/AgentPanel.tsx +2 -1
- package/src/client/FeedbackButton.tsx +37 -4
- package/src/client/MultiTabAssistantChat.tsx +21 -0
- package/src/client/agent-chat.ts +31 -3
- package/src/client/agent-page/AgentJobsTab.tsx +438 -310
- package/src/client/agent-page/AgentTabsPage.tsx +4 -4
- package/src/client/agent-page/use-jobs.ts +7 -0
- package/src/client/analytics-session.ts +13 -0
- package/src/client/extensions/ExtensionViewer.tsx +67 -0
- package/src/client/settings/AutomationsSection.tsx +27 -499
- package/src/client/settings/SettingsPanel.tsx +32 -11
- package/src/client/settings/index.ts +2 -0
- package/src/client/use-agent-chat.ts +35 -3
- package/src/client/use-chat-threads.ts +8 -25
- package/src/deploy/build.ts +2 -0
- package/src/deploy/workspace-deploy.ts +2 -0
- package/src/extensions/actions.ts +115 -3
- package/src/extensions/fetch-tool.ts +11 -0
- package/src/extensions/routes.ts +16 -1
- package/src/extensions/web-content.ts +96 -1
- package/src/integrations/computer-supervision.ts +33 -1
- package/src/integrations/index.ts +6 -0
- package/src/integrations/integration-durable-dispatch-config.ts +10 -0
- package/src/integrations/integration-durable-dispatch.ts +4 -0
- package/src/integrations/plugin.ts +94 -41
- package/src/integrations/remote-browser-actions.ts +621 -0
- package/src/jobs/actions/list-recurring-jobs.ts +5 -7
- package/src/jobs/actions/manage-recurring-job.ts +3 -7
- package/src/jobs/background-automation-runner.ts +437 -0
- package/src/jobs/frontmatter.ts +308 -0
- package/src/jobs/scheduler.ts +89 -598
- package/src/jobs/tools.ts +22 -3
- package/src/localization/default-messages.ts +45 -45
- package/src/mcp-client/index.ts +6 -0
- package/src/notifications/actions.ts +5 -0
- package/src/progress/actions.ts +5 -0
- package/src/provider-api/actions/github-repo-files.ts +11 -0
- package/src/provider-api/actions/provider-api.ts +13 -0
- package/src/server/__snapshots__/agent-chat-plugin.surface.spec.ts.snap +4 -4
- package/src/server/action-discovery.ts +7 -0
- package/src/server/agent-chat/browser-team-tools.ts +126 -3
- package/src/server/agent-chat/framework-prompts.ts +7 -11
- package/src/server/agent-chat/plugin-options.ts +3 -3
- package/src/server/agent-chat/script-entries.ts +52 -1
- package/src/server/agent-chat-plugin.ts +25 -5
- package/src/server/attribution.ts +22 -0
- package/src/server/auth.ts +20 -6
- package/src/server/better-auth-instance.ts +10 -2
- package/src/server/core-routes-plugin.ts +10 -1
- package/src/server/csrf.ts +25 -0
- package/src/server/email-template.ts +43 -13
- package/src/server/google-oauth.ts +21 -1
- package/src/server/onboarding-html.ts +18 -0
- package/src/server/prompts/framework-core-compact.ts +3 -3
- package/src/server/prompts/framework-core.ts +3 -3
- package/src/server/prompts/shared-rules.ts +3 -3
- package/src/settings/index.ts +1 -0
- package/src/shared/analytics-anonymous-id.ts +35 -0
- package/src/sharing/actions/share-resource.ts +26 -4
- package/src/sharing/index.ts +1 -0
- package/src/sharing/registry.ts +23 -0
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/chat/app/components/layout/Sidebar.tsx +1 -5
- package/src/templates/chat/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/default/app/i18n/ar-SA.ts +26 -0
- package/src/templates/default/app/i18n/de-DE.ts +28 -0
- package/src/templates/default/app/i18n/en-US.ts +27 -0
- package/src/templates/default/app/i18n/es-ES.ts +28 -0
- package/src/templates/default/app/i18n/fr-FR.ts +28 -0
- package/src/templates/default/app/i18n/hi-IN.ts +25 -0
- package/src/templates/default/app/i18n/ja-JP.ts +27 -0
- package/src/templates/default/app/i18n/ko-KR.ts +27 -0
- package/src/templates/default/app/i18n/pt-BR.ts +27 -0
- package/src/templates/default/app/i18n/zh-CN.ts +24 -0
- package/src/templates/default/app/i18n/zh-TW.ts +24 -0
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +10 -7
- package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +53 -8
- package/src/templates/workspace-core/.agents/skills/browser-sessions/SKILL.md +131 -0
- package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +13 -4
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +23 -15
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +33 -18
- package/src/tracking/providers.ts +1 -0
- package/src/tracking/registry.ts +2 -1
- package/src/tracking/types.ts +1 -0
- package/src/triggers/actions/list-automations.ts +43 -44
- package/src/triggers/actions/manage-automation.ts +17 -48
- package/src/triggers/actions.ts +218 -127
- package/src/triggers/dispatcher.ts +181 -367
- package/src/triggers/routes.ts +84 -27
- package/src/triggers/types.ts +9 -23
- package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +0 -232
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTabsPage.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentTabsPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,GAE9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,oBAAoB;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E,CACP,IACG,EACN,cACE,EAAE,EAAE,kBAAkB,WAAW,EAAE,EAAE,IAAI,SAAS,EAAE,EACpD,IAAI,EAAC,UAAU,qBACE,aAAa,WAAW,EAAE,EAAE,IAAI,SAAS,EAAE,EAC5D,SAAS,EAAC,mDAAmD,YAE5D,WAAW,EAAE,OAAO,IAAI,KAAC,SAAS,IAAC,KAAK,EAAC,eAAe,GAAG,GACxD,IACF,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconBook2,\n IconChecklist,\n IconClock,\n IconExternalLink,\n IconFolder,\n IconHistory,\n IconHelpCircle,\n IconHierarchy2,\n IconNotes,\n IconPlugConnected,\n IconTopologyRing2,\n IconSearch,\n IconSettings,\n IconShieldLock,\n IconX,\n} from \"@tabler/icons-react\";\nimport {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ComponentType,\n type ReactNode,\n} from \"react\";\n\nimport {\n MCP_CONNECT_GUIDES,\n MCP_CONNECT_MCP_URL_TEMPLATE,\n MCP_STATIC_TOKEN_FALLBACK,\n interpolateMcpConnectTemplate,\n type McpConnectTemplateValues,\n} from \"../../shared/mcp-connect-content.js\";\nimport { appPath } from \"../api-path.js\";\nimport { useT } from \"../i18n.js\";\nimport { useOrg } from \"../org/hooks.js\";\nimport {\n McpIntegrationDialog,\n // The dialog is intentionally reused here so the Agent page remains a thin\n // host for the existing MCP management flow.\n} from \"../resources/McpIntegrationDialog.js\";\nimport { McpServerDetail } from \"../resources/McpServerDetail.js\";\nimport type { ResourceView } from \"../resources/ResourcesPanel.js\";\nimport {\n useCreateMcpServer,\n useDeleteMcpServer,\n useMcpServers,\n type McpServer,\n type McpServerScope,\n} from \"../resources/use-mcp-servers.js\";\nimport {\n AGENT_SETTINGS_SECTIONS,\n buildSectionSearchEntries,\n} from \"../settings/agent-settings-search.js\";\nimport { AgentSettingsContent } from \"../settings/SettingsPanel.js\";\nimport type {\n SettingsSearchEntry,\n SettingsTabItem,\n} from \"../settings/SettingsTabsPage.js\";\nimport { cn } from \"../utils.js\";\nimport { AgentEmptyState } from \"./AgentEmptyState.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageScope, AgentPageTabProps } from \"./types.js\";\n\nconst AgentContextTab = lazy(() =>\n import(\"./AgentContextTab.js\").then((module) => ({\n default: module.AgentContextTab,\n })),\n);\nconst AgentJobsTab = lazy(() =>\n import(\"./AgentJobsTab.js\").then((module) => ({\n default: module.AgentJobsTab,\n })),\n);\nconst ResourcesPanel = lazy(() =>\n import(\"../resources/ResourcesPanel.js\").then((module) => ({\n default: module.ResourcesPanel,\n })),\n);\n\ntype SettingsTabIcon = ComponentType<{ className?: string }>;\n\nfunction normalizeTabId(value?: string | null): string | null {\n const normalized = value\n ?.replace(/^#/, \"\")\n .trim()\n .toLowerCase()\n .replace(/[\"']/g, \"\")\n .replace(/[\\s_]+/g, \"-\");\n return normalized || null;\n}\n\nfunction resolveTabId(\n tabs: SettingsTabItem[],\n value?: string | null,\n): string | null {\n const normalized = normalizeTabId(value);\n if (!normalized) return null;\n if (normalized === \"context\" && tabs.some((tab) => tab.id === \"snapshots\")) {\n return \"snapshots\";\n }\n if (tabs.some((tab) => tab.id === normalized)) return normalized;\n const section = normalized.split(\":\", 1)[0];\n const owner = tabs.find((tab) =>\n tab.searchEntries?.some(\n (entry) => normalizeTabId(entry.hash ?? entry.id) === section,\n ),\n );\n return owner?.id ?? null;\n}\n\nfunction updateTabHash(tabId: string) {\n if (typeof window === \"undefined\") return;\n const hash = tabId === \"files\" ? \"\" : `#${encodeURIComponent(tabId)}`;\n window.history.pushState(\n null,\n \"\",\n `${window.location.pathname}${window.location.search}${hash}`,\n );\n}\n\nfunction TabLoading() {\n return (\n <div className=\"space-y-3\" aria-busy=\"true\">\n <div className=\"h-5 w-36 animate-pulse rounded bg-muted\" />\n <div className=\"h-20 animate-pulse rounded-lg border border-border bg-muted/30\" />\n <div className=\"h-20 animate-pulse rounded-lg border border-border bg-muted/30\" />\n </div>\n );\n}\n\nfunction EmptySlot({ label }: { label: string }) {\n return (\n <div className=\"flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-border/70 bg-muted/10\">\n <span className=\"sr-only\">{label}</span>\n </div>\n );\n}\n\nexport const AGENT_RESOURCE_DOCS_HREF: Record<ResourceView, string> = {\n files: \"https://agent-native.com/docs/agent-resources#resources-tab\",\n instructions: \"https://agent-native.com/docs/agent-resources#agents-md\",\n agents: \"https://agent-native.com/docs/agent-resources#custom-agents\",\n memory: \"https://agent-native.com/docs/agent-resources#memory\",\n skills: \"https://agent-native.com/docs/skills-guide\",\n learnings: \"https://agent-native.com/docs/agent-resources#memory\",\n \"remote-agents\":\n \"https://agent-native.com/docs/agent-resources#remote-vs-custom-agents\",\n};\n\nconst RESOURCE_TAB_COPY: Record<\n ResourceView,\n { titleKey: string; descriptionKey: string }\n> = {\n files: {\n titleKey: \"agentResources.files.title\",\n descriptionKey: \"agentResources.files.description\",\n },\n instructions: {\n titleKey: \"agentResources.instructions.title\",\n descriptionKey: \"agentResources.instructions.description\",\n },\n agents: {\n titleKey: \"agentResources.agents.title\",\n descriptionKey: \"agentResources.agents.description\",\n },\n memory: {\n titleKey: \"agentResources.memory.title\",\n descriptionKey: \"agentResources.memory.description\",\n },\n skills: {\n titleKey: \"agentResources.skills.title\",\n descriptionKey: \"agentResources.skills.description\",\n },\n learnings: {\n titleKey: \"agentResources.learnings.title\",\n descriptionKey: \"agentResources.learnings.description\",\n },\n \"remote-agents\": {\n titleKey: \"agentResources.remoteAgents.title\",\n descriptionKey: \"agentResources.remoteAgents.description\",\n },\n};\n\nfunction AgentResourceTab({\n scope,\n view,\n}: AgentPageTabProps & { view: ResourceView }) {\n const t = useT();\n const copy = RESOURCE_TAB_COPY[view];\n const title = t(copy.titleKey);\n return (\n <AgentTabFrame\n title={title}\n description={t(copy.descriptionKey)}\n helpHref={AGENT_RESOURCE_DOCS_HREF[view]}\n helpLabel={t(\"agentResources.openDocs\", { section: title })}\n >\n <div className=\"min-h-[480px]\">\n <ResourcesPanel\n key={`${scope}-${view}`}\n showMcpServers={false}\n resourceFilter={view}\n resourceTreeVariant={view === \"files\" ? \"tree\" : \"collection\"}\n scope=\"personal\"\n />\n </div>\n </AgentTabFrame>\n );\n}\n\nfunction ServerStatus({ server }: { server: McpServer }) {\n if (server.status.state === \"connected\") {\n return (\n <span className=\"text-[11px] text-emerald-600 dark:text-emerald-400\">\n Connected · {server.status.toolCount} tools\n </span>\n );\n }\n if (server.status.state === \"error\") {\n return (\n <span className=\"truncate text-[11px] text-destructive\">\n Connection error\n </span>\n );\n }\n return (\n <span className=\"text-[11px] text-muted-foreground\">Status unknown</span>\n );\n}\n\nfunction ConnectionsTab({ canManageOrg = false }: AgentPageTabProps) {\n const t = useT();\n const serversQuery = useMcpServers();\n const createServer = useCreateMcpServer();\n const deleteServer = useDeleteMcpServer();\n const [dialogOpen, setDialogOpen] = useState(false);\n const [selectedServer, setSelectedServer] = useState<McpServer | null>(null);\n const [deleteTarget, setDeleteTarget] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const data = serversQuery.data;\n const hasOrg = Boolean(data?.orgId);\n const canCreateOrgMcp = hasOrg && canManageOrg;\n\n const onCreateMcpServer = useCallback(\n async (args: {\n scope: McpServerScope;\n name: string;\n url: string;\n headers?: Record<string, string>;\n description?: string;\n }) => {\n if (args.scope === \"org\" && !canCreateOrgMcp) {\n throw new Error(\n \"Only organization admins can add organization MCP servers.\",\n );\n }\n return createServer.mutateAsync(args);\n },\n [canCreateOrgMcp, createServer],\n );\n\n const removeServer = async (server: McpServer) => {\n const key = `${server.scope}:${server.id}`;\n if (deleteTarget !== key) {\n setDeleteTarget(key);\n return;\n }\n setError(null);\n try {\n await deleteServer.mutateAsync({ id: server.id, scope: server.scope });\n if (\n selectedServer?.id === server.id &&\n selectedServer.scope === server.scope\n ) {\n setSelectedServer(null);\n }\n setDeleteTarget(null);\n } catch (cause) {\n setError(cause instanceof Error ? cause.message : String(cause));\n }\n };\n\n const renderServer = (server: McpServer) => {\n const key = `${server.scope}:${server.id}`;\n const canDelete = server.scope === \"user\" || canManageOrg;\n const selected =\n selectedServer?.id === server.id && selectedServer.scope === server.scope;\n return (\n <div\n key={key}\n className={cn(\n \"group/connection-row py-4 transition-colors first:pt-5 last:pb-5\",\n selected && \"bg-accent/20\",\n )}\n >\n <div className=\"flex items-start gap-3\">\n <button\n type=\"button\"\n onClick={() => setSelectedServer(selected ? null : server)}\n className=\"min-w-0 flex-1 cursor-pointer text-start\"\n >\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"truncate text-sm font-medium text-foreground\">\n {server.name}\n </span>\n </div>\n <code className=\"mt-1 block truncate text-[11px] text-muted-foreground\">\n {server.url}\n </code>\n <div className=\"mt-2 flex items-center gap-2\">\n <ServerStatus server={server} />\n {server.description && (\n <span className=\"truncate text-[11px] text-muted-foreground/70\">\n {server.description}\n </span>\n )}\n </div>\n </button>\n {canDelete && (\n <button\n type=\"button\"\n onClick={() => void removeServer(server)}\n disabled={deleteServer.isPending}\n className={cn(\n \"cursor-pointer rounded-md px-2 py-1 text-[11px] font-medium text-muted-foreground hover:bg-destructive/10 hover:text-destructive\",\n deleteTarget === key && \"bg-destructive/10 text-destructive\",\n )}\n >\n {deleteTarget === key ? \"Confirm\" : \"Delete\"}\n </button>\n )}\n </div>\n {selected && (\n <div className=\"mt-3 border-t border-border/70 pt-3\">\n <McpServerDetail server={server} />\n </div>\n )}\n </div>\n );\n };\n\n return (\n <AgentTabFrame\n title=\"Connections\"\n description=\"Tools and services this agent can reach, grouped by where they are configured.\"\n actions={\n <button\n type=\"button\"\n onClick={() => {\n setError(null);\n setDialogOpen(true);\n }}\n className=\"cursor-pointer rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.connect\")}\n </button>\n }\n >\n <section className=\"space-y-4\">\n {error && (\n <p className=\"rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive\">\n {error}\n </p>\n )}\n {serversQuery.isLoading ? (\n <TabLoading />\n ) : serversQuery.isError ? (\n <p className=\"rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive\">\n Could not load MCP servers.\n </p>\n ) : (\n <div className=\"space-y-6\">\n {[\n { label: \"Personal\", servers: data?.user ?? [] },\n { label: \"Organization\", servers: data?.org ?? [] },\n ].map((section) => (\n <section key={section.label} className=\"space-y-2\">\n <h2 className=\"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70\">\n {section.label}\n </h2>\n {section.servers.length > 0 ? (\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {section.servers.map(renderServer)}\n </div>\n ) : (\n <AgentEmptyState\n icon={IconPlugConnected}\n title={`No ${section.label.toLowerCase()} connections yet`}\n description={\n section.label === \"Personal\"\n ? \"Connect a service to give the agent access to it.\"\n : \"Organization connections shared with this workspace will appear here.\"\n }\n />\n )}\n </section>\n ))}\n </div>\n )}\n <McpIntegrationDialog\n open={dialogOpen}\n onOpenChange={setDialogOpen}\n defaultScope=\"user\"\n canCreateOrgMcp={canCreateOrgMcp}\n hasOrg={hasOrg}\n onCreateMcpServer={onCreateMcpServer}\n />\n </section>\n </AgentTabFrame>\n );\n}\n\ninterface AccessUrls {\n appName: string;\n appUrl: string;\n mcpUrl: string;\n connectUrl: string;\n agentCardUrl: string;\n}\n\nexport const AGENT_ACCESS_DOCS_HREF = {\n mcp: \"https://agent-native.com/docs/mcp-protocol\",\n a2a: \"https://agent-native.com/docs/a2a-protocol\",\n} as const;\n\ninterface CopyFieldProps {\n label: string;\n value: string;\n docsHref?: string;\n docsLabel?: string;\n}\n\nfunction CopyField({ label, value, docsHref, docsLabel }: CopyFieldProps) {\n const [copied, setCopied] = useState(false);\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(value);\n setCopied(true);\n window.setTimeout(() => setCopied(false), 1600);\n } catch {\n setCopied(false);\n }\n };\n return (\n <div className=\"flex min-w-0 items-center gap-2 rounded-md border border-border bg-muted/20 p-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground/70\">\n {label}\n {docsHref && (\n <a\n href={docsHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={docsLabel ?? `Open ${label} documentation`}\n title={docsLabel ?? `Open ${label} documentation`}\n className=\"inline-flex size-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground\"\n >\n <IconHelpCircle className=\"size-3\" />\n </a>\n )}\n </div>\n <code className=\"mt-1 block truncate text-xs text-foreground\">\n {value}\n </code>\n </div>\n <button\n type=\"button\"\n onClick={() => void copy()}\n className=\"shrink-0 cursor-pointer rounded-md border border-border bg-background px-2.5 py-1.5 text-[11px] font-medium text-foreground hover:bg-accent\"\n >\n {copied ? \"Copied\" : \"Copy\"}\n </button>\n </div>\n );\n}\n\nfunction AccessTab({\n appName: appNameProp,\n}: AgentPageTabProps & { appName?: string }) {\n const [urls, setUrls] = useState<AccessUrls | null>(null);\n const [agentCardAvailable, setAgentCardAvailable] = useState(false);\n const [activeGuide, setActiveGuide] = useState(MCP_CONNECT_GUIDES[0]?.id);\n\n useEffect(() => {\n const origin = window.location.origin;\n const baseUrl = new URL(appPath(\"/\"), origin).toString().replace(/\\/$/, \"\");\n const hostname = window.location.hostname || \"app\";\n const metaSiteName = document\n .querySelector('meta[property=\"og:site_name\"]')\n ?.getAttribute(\"content\")\n ?.trim();\n const hostnameGuess =\n hostname !== \"localhost\" && hostname !== \"127.0.0.1\"\n ? hostname.split(\".\")[0]\n : \"\";\n const appName =\n appNameProp?.trim() || metaSiteName || hostnameGuess || \"this app\";\n const templateValues = {\n appName,\n appUrl: baseUrl,\n mcpUrl: \"\",\n serverId: `agent-native-${hostname}`,\n } satisfies McpConnectTemplateValues;\n setUrls({\n appName,\n appUrl: baseUrl,\n mcpUrl: interpolateMcpConnectTemplate(\n MCP_CONNECT_MCP_URL_TEMPLATE,\n templateValues,\n ),\n connectUrl: new URL(appPath(\"/mcp/connect\"), origin).toString(),\n agentCardUrl: new URL(\n appPath(\"/.well-known/agent-card.json\"),\n origin,\n ).toString(),\n });\n }, [appNameProp]);\n\n useEffect(() => {\n if (!urls) return;\n let cancelled = false;\n fetch(urls.agentCardUrl)\n .then((response) => {\n if (!cancelled) setAgentCardAvailable(response.ok);\n })\n .catch(() => {\n if (!cancelled) setAgentCardAvailable(false);\n });\n return () => {\n cancelled = true;\n };\n }, [urls]);\n\n const templateValues: McpConnectTemplateValues | null = urls\n ? {\n appName: urls.appName,\n appUrl: urls.appUrl,\n mcpUrl: urls.mcpUrl,\n serverId: `agent-native-${window.location.hostname || \"app\"}`,\n }\n : null;\n const guide =\n MCP_CONNECT_GUIDES.find((item) => item.id === activeGuide) ??\n MCP_CONNECT_GUIDES[0];\n\n return (\n <AgentTabFrame\n title=\"Access\"\n description=\"Choose which external clients can talk to this app's agent.\"\n >\n <div className=\"space-y-6\">\n {urls ? (\n <>\n <CopyField\n label=\"MCP URL\"\n value={urls.mcpUrl}\n docsHref={AGENT_ACCESS_DOCS_HREF.mcp}\n docsLabel=\"Open MCP documentation\"\n />\n {agentCardAvailable && (\n <CopyField\n label=\"A2A agent card\"\n value={urls.agentCardUrl}\n docsHref={AGENT_ACCESS_DOCS_HREF.a2a}\n docsLabel=\"Open A2A documentation\"\n />\n )}\n <section className=\"space-y-3 border-t border-border/70 pt-6\">\n <div>\n <h3 className=\"text-sm font-semibold text-foreground\">\n Client setup\n </h3>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n These instructions are also available on the full connect\n page.\n </p>\n </div>\n <div\n className=\"flex gap-1 overflow-x-auto border-b border-border pb-2\"\n role=\"tablist\"\n aria-label=\"Choose your AI assistant\"\n >\n {MCP_CONNECT_GUIDES.map((item) => (\n <button\n key={item.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={item.id === guide?.id}\n onClick={() => setActiveGuide(item.id)}\n className={cn(\n \"shrink-0 cursor-pointer rounded-md px-2.5 py-1.5 text-xs font-medium\",\n item.id === guide?.id\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:bg-accent/50 hover:text-foreground\",\n )}\n >\n {item.label}\n </button>\n ))}\n </div>\n {guide && templateValues && (\n <div className=\"space-y-3 pt-1\" role=\"tabpanel\">\n {guide.steps?.length ? (\n <ol className=\"list-decimal space-y-2 ps-5 text-xs leading-relaxed text-muted-foreground\">\n {guide.steps.map((step) => (\n <li key={step}>\n {interpolateMcpConnectTemplate(step, templateValues)}\n </li>\n ))}\n </ol>\n ) : null}\n {guide.intro && (\n <p className=\"text-xs text-muted-foreground\">\n {interpolateMcpConnectTemplate(\n guide.intro,\n templateValues,\n )}\n </p>\n )}\n {guide.commandTemplate && (\n <CopyField\n label=\"Command\"\n value={interpolateMcpConnectTemplate(\n guide.commandTemplate,\n templateValues,\n )}\n />\n )}\n {guide.configTemplate && (\n <CopyField\n label=\"MCP config\"\n value={interpolateMcpConnectTemplate(\n guide.configTemplate,\n templateValues,\n )}\n />\n )}\n {guide.action?.kind === \"link\" && guide.action.href && (\n <a\n href={guide.action.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent\"\n >\n {guide.action.label}\n <IconExternalLink className=\"size-3.5\" />\n </a>\n )}\n {guide.note && (\n <p className=\"text-xs leading-relaxed text-muted-foreground\">\n {interpolateMcpConnectTemplate(\n guide.note,\n templateValues,\n )}\n </p>\n )}\n </div>\n )}\n </section>\n <section className=\"border-t border-border/70 pt-6\">\n <h3 className=\"text-sm font-semibold text-foreground\">\n {MCP_STATIC_TOKEN_FALLBACK.title}\n </h3>\n <p className=\"mt-1 text-xs leading-relaxed text-muted-foreground\">\n {MCP_STATIC_TOKEN_FALLBACK.state}. Open the connect page to\n create a token for clients that cannot complete OAuth.\n </p>\n <a\n href={urls.connectUrl}\n className=\"mt-3 inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent\"\n >\n Open full connect page\n <IconExternalLink className=\"size-3.5\" />\n </a>\n </section>\n </>\n ) : (\n <TabLoading />\n )}\n </div>\n </AgentTabFrame>\n );\n}\n\nexport interface AgentPageExtraTabContext extends AgentPageTabProps {\n scopeControl: ReactNode;\n}\n\nexport type AgentPageExtraTabFactory = (\n context: AgentPageExtraTabContext,\n) => SettingsTabItem;\n\nexport interface AgentTabsPageProps {\n /**\n * Human-readable app name used in the Access tab's connect instructions\n * (e.g. \"name it Mail\"). Falls back to the `og:site_name` meta tag, then a\n * hostname-derived guess — never `document.title`, which this page owns.\n */\n appName?: string;\n extraTabs?: SettingsTabItem[];\n /** Scoped app-specific tabs that receive the current Manage agent page scope. */\n extraTabFactories?: AgentPageExtraTabFactory[];\n defaultTab?: string;\n className?: string;\n /** Whether to render the Agent page search box. Defaults to true. */\n enableSearch?: boolean;\n searchPlaceholder?: string;\n hiddenTabs?: string[];\n value?: string;\n onValueChange?: (tabId: string) => void;\n}\n\nexport function AgentTabsPage({\n appName,\n extraTabs = [],\n extraTabFactories = [],\n defaultTab = \"files\",\n className,\n enableSearch = true,\n searchPlaceholder = \"Search\",\n hiddenTabs = [],\n value,\n onValueChange,\n}: AgentTabsPageProps) {\n const t = useT();\n const { data: org } = useOrg();\n const canManageOrg =\n !org?.orgId || org.role === \"owner\" || org.role === \"admin\";\n const scope: AgentPageScope = \"user\";\n const rootRef = useRef<HTMLDivElement | null>(null);\n const searchRef = useRef<HTMLInputElement | null>(null);\n const [query, setQuery] = useState(\"\");\n const normalizedHiddenTabs = useMemo(\n () => new Set(hiddenTabs.map((tab) => normalizeTabId(tab)).filter(Boolean)),\n [hiddenTabs],\n );\n const scopeControl: ReactNode = null;\n const scopedExtraTabs = useMemo(\n () =>\n extraTabFactories.map((factory) =>\n factory({ scope, canManageOrg, scopeControl }),\n ),\n [canManageOrg, extraTabFactories, scope, scopeControl],\n );\n\n const tabs = useMemo<SettingsTabItem[]>(\n () => [\n {\n id: \"files\",\n label: \"Files\",\n icon: IconFolder,\n group: \"resources\",\n keywords: \"workspace plain files documents uploads\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"files\" />\n </Suspense>\n ),\n },\n {\n id: \"instructions\",\n label: \"Instructions\",\n icon: IconChecklist,\n group: \"resources\",\n keywords: \"agents md rules preferences guidance\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"instructions\" />\n </Suspense>\n ),\n },\n {\n id: \"agents\",\n label: \"Agents\",\n icon: IconHierarchy2,\n group: \"resources\",\n keywords: \"custom sub agents delegate profiles\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"agents\" />\n </Suspense>\n ),\n },\n {\n id: \"memory\",\n label: \"Memory\",\n icon: IconNotes,\n group: \"resources\",\n keywords: \"long term notes memory index recall\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"memory\" />\n </Suspense>\n ),\n },\n {\n id: \"skills\",\n label: \"Skills\",\n icon: IconBook2,\n group: \"resources\",\n keywords: \"abilities reusable instructions workflows\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"skills\" />\n </Suspense>\n ),\n },\n {\n id: \"learnings\",\n label: \"Learnings\",\n icon: IconHistory,\n group: \"resources\",\n keywords: \"corrections patterns knowledge feedback\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"learnings\" />\n </Suspense>\n ),\n },\n {\n id: \"remote-agents\",\n label: \"Remote agents\",\n icon: IconTopologyRing2,\n group: \"resources\",\n keywords: \"a2a connected remote agents delegation\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"remote-agents\" />\n </Suspense>\n ),\n },\n {\n id: \"snapshots\",\n label: \"Snapshots\",\n icon: IconHistory,\n group: \"agent\",\n keywords: \"context recent loads provenance tokens\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentContextTab scope={scope} canManageOrg={canManageOrg} />\n </Suspense>\n ),\n },\n {\n id: \"connections\",\n label: \"Connections\",\n icon: IconPlugConnected,\n group: \"agent\",\n keywords: \"mcp servers tools integrations\",\n searchEntries: [\n { id: \"mcp-servers\", label: \"MCP servers\", keywords: \"tools\" },\n ],\n content: <ConnectionsTab scope={scope} canManageOrg={canManageOrg} />,\n },\n {\n id: \"jobs\",\n label: \"Jobs\",\n icon: IconClock,\n group: \"agent\",\n keywords: \"scheduled automations recurring\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentJobsTab scope={scope} canManageOrg={canManageOrg} />\n </Suspense>\n ),\n },\n {\n id: \"settings\",\n label: t(\"settings.agentTitle\"),\n icon: IconSettings,\n group: \"agent\",\n keywords: \"agent settings model llm api keys limits voice automations\",\n searchEntries: buildSectionSearchEntries(AGENT_SETTINGS_SECTIONS),\n content: (\n <AgentTabFrame\n title={t(\"settings.agentTitle\")}\n description={t(\"settings.agentDescription\")}\n >\n <AgentSettingsContent />\n </AgentTabFrame>\n ),\n },\n {\n id: \"access\",\n label: \"Access\",\n icon: IconShieldLock,\n group: \"agent\",\n keywords: \"external clients oauth a2a exposure\",\n searchEntries: [\n {\n id: \"mcp-connect\",\n label: \"External client setup\",\n keywords: \"oauth connect\",\n },\n {\n id: \"a2a-agent-card\",\n label: \"A2A agent card\",\n keywords: \"agent card\",\n },\n ],\n content: (\n <AccessTab\n scope={scope}\n canManageOrg={canManageOrg}\n appName={appName}\n />\n ),\n },\n ...extraTabs,\n ...scopedExtraTabs,\n ],\n [appName, canManageOrg, extraTabs, scope, scopedExtraTabs],\n );\n const visibleTabs = useMemo(\n () => tabs.filter((tab) => !normalizedHiddenTabs.has(tab.id)),\n [normalizedHiddenTabs, tabs],\n );\n const fallbackTab = visibleTabs.some((tab) => tab.id === defaultTab)\n ? defaultTab\n : (visibleTabs[0]?.id ?? \"context\");\n const [internalTab, setInternalTab] = useState(() => {\n if (typeof window === \"undefined\") return fallbackTab;\n return resolveTabId(visibleTabs, window.location.hash) ?? fallbackTab;\n });\n const isControlled = value !== undefined;\n const activeTab = isControlled ? value : internalTab;\n const selectedTab =\n visibleTabs.find((tab) => tab.id === activeTab) ?? visibleTabs[0];\n const tabGroups = useMemo(() => {\n const groups: Array<{ id: string; tabs: SettingsTabItem[] }> = [];\n for (const tab of visibleTabs) {\n const groupId = tab.group ?? \"agent\";\n const previous = groups.at(-1);\n if (previous?.id === groupId) previous.tabs.push(tab);\n else groups.push({ id: groupId, tabs: [tab] });\n }\n return groups;\n }, [visibleTabs]);\n\n useEffect(() => {\n if (!isControlled && !visibleTabs.some((tab) => tab.id === internalTab)) {\n setInternalTab(fallbackTab);\n }\n }, [fallbackTab, internalTab, isControlled, visibleTabs]);\n\n useEffect(() => {\n if (isControlled) return;\n const onHashChange = () => {\n const next = resolveTabId(visibleTabs, window.location.hash);\n if (next) setInternalTab(next);\n };\n window.addEventListener(\"hashchange\", onHashChange);\n return () => window.removeEventListener(\"hashchange\", onHashChange);\n }, [isControlled, visibleTabs]);\n\n const changeTab = useCallback(\n (tabId: string) => {\n if (!isControlled) setInternalTab(tabId);\n onValueChange?.(tabId);\n },\n [isControlled, onValueChange],\n );\n\n const searchIndex = useMemo(() => {\n const entries: Array<\n SettingsSearchEntry & { tabId: string; haystack: string }\n > = [];\n for (const tab of visibleTabs) {\n entries.push({\n id: `tab:${tab.id}`,\n label: tab.label,\n keywords: tab.keywords,\n tabId: tab.id,\n haystack: `${tab.label} ${tab.keywords ?? \"\"}`.toLowerCase(),\n });\n for (const entry of tab.searchEntries ?? []) {\n entries.push({\n ...entry,\n tabId: entry.tabId ?? tab.id,\n haystack:\n `${entry.label} ${entry.keywords ?? \"\"} ${entry.description ?? \"\"} ${tab.label}`.toLowerCase(),\n });\n }\n }\n return entries;\n }, [visibleTabs]);\n const results = useMemo(() => {\n const terms = query.trim().toLowerCase().split(/\\s+/).filter(Boolean);\n if (!terms.length) return [];\n return searchIndex\n .filter((entry) => terms.every((term) => entry.haystack.includes(term)))\n .sort((a, b) => a.label.localeCompare(b.label));\n }, [query, searchIndex]);\n\n const selectSearchResult = useCallback(\n (entry: (typeof searchIndex)[number]) => {\n changeTab(entry.tabId);\n setQuery(\"\");\n if (isControlled || typeof window === \"undefined\") return;\n if (entry.hash) {\n window.history.pushState(\n null,\n \"\",\n `${window.location.pathname}${window.location.search}#${entry.hash.replace(/^#/, \"\")}`,\n );\n window.dispatchEvent(new Event(\"hashchange\"));\n } else {\n updateTabHash(entry.tabId);\n }\n },\n [changeTab, isControlled],\n );\n\n return (\n <div\n ref={rootRef}\n className={cn(\n \"flex h-full min-h-0 w-full flex-col overflow-hidden bg-background\",\n className,\n )}\n >\n <div className=\"flex min-h-0 flex-1 flex-col sm:flex-row\">\n <div className=\"flex shrink-0 flex-col gap-2 bg-background p-2 sm:min-h-0 sm:w-56 sm:overflow-y-auto sm:p-3\">\n {enableSearch ? (\n <div className=\"relative sm:mb-1\">\n <IconSearch className=\"pointer-events-none absolute start-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n ref={searchRef}\n type=\"search\"\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Escape\") setQuery(\"\");\n if (event.key === \"Enter\" && results[0]) {\n event.preventDefault();\n selectSearchResult(results[0]);\n }\n }}\n placeholder={searchPlaceholder}\n aria-label={searchPlaceholder}\n className=\"h-8 w-full rounded-md border border-border bg-background ps-8 pe-7 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground focus:border-foreground/30 focus:ring-2 focus:ring-accent/40\"\n />\n {query && (\n <button\n type=\"button\"\n onClick={() => setQuery(\"\")}\n aria-label=\"Clear search\"\n className=\"absolute end-1.5 top-1/2 flex size-5 -translate-y-1/2 cursor-pointer items-center justify-center rounded text-muted-foreground hover:bg-accent/60 hover:text-foreground\"\n >\n <IconX className=\"size-3.5\" />\n </button>\n )}\n </div>\n ) : null}\n {query.trim() ? (\n <div\n role=\"listbox\"\n aria-label=\"Agent search results\"\n className=\"flex flex-col gap-0.5\"\n >\n {results.length === 0 ? (\n <p className=\"px-2 py-6 text-center text-xs text-muted-foreground\">\n No matching items\n </p>\n ) : (\n results.map((entry) => (\n <button\n key={entry.id}\n type=\"button\"\n role=\"option\"\n onClick={() => selectSearchResult(entry)}\n className=\"flex cursor-pointer items-start gap-2 rounded-md px-2.5 py-2 text-start text-sm text-foreground hover:bg-accent/60\"\n >\n <span className=\"flex min-w-0 flex-col\">\n <span className=\"truncate font-medium\">\n {entry.label}\n </span>\n <span className=\"truncate text-[11px] text-muted-foreground\">\n {entry.description ?? entry.tabId}\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n ) : (\n <nav\n aria-label=\"Agent sections\"\n role=\"tablist\"\n className=\"flex gap-1 overflow-x-auto sm:flex-col sm:overflow-x-visible\"\n >\n {tabGroups.map((group, groupIndex) => (\n <div\n key={group.id}\n className={cn(\n \"contents sm:block\",\n groupIndex > 0 &&\n \"sm:mt-2 sm:border-t sm:border-border/60 sm:pt-2\",\n )}\n >\n {group.id === \"resources\" && (\n <div className=\"hidden px-2.5 pb-1 pt-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/50 sm:block\">\n Agent resources\n </div>\n )}\n {group.id === \"agent\" && (\n <div className=\"hidden px-2.5 pb-1 pt-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/50 sm:block\">\n Agent operations\n </div>\n )}\n <div className=\"contents sm:flex sm:flex-col sm:gap-1\">\n {group.tabs.map((tab) => {\n const Icon = tab.icon as SettingsTabIcon | undefined;\n const selected = tab.id === selectedTab?.id;\n return (\n <button\n key={tab.id}\n type=\"button\"\n id={`agent-tab-${tab.id}`}\n role=\"tab\"\n aria-selected={selected}\n aria-controls={`agent-tabpanel-${tab.id}`}\n onClick={() => {\n changeTab(tab.id);\n if (!isControlled) updateTabHash(tab.id);\n }}\n className={cn(\n \"flex min-h-9 shrink-0 cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-start text-sm font-medium transition-colors sm:w-full\",\n selected\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:bg-accent/50 hover:text-foreground\",\n )}\n >\n {Icon ? (\n <Icon\n className={cn(\n \"size-4 shrink-0\",\n selected\n ? \"text-foreground\"\n : \"text-muted-foreground\",\n )}\n />\n ) : null}\n <span className=\"truncate\">{tab.label}</span>\n </button>\n );\n })}\n </div>\n </div>\n ))}\n </nav>\n )}\n </div>\n <div\n id={`agent-tabpanel-${selectedTab?.id ?? \"context\"}`}\n role=\"tabpanel\"\n aria-labelledby={`agent-tab-${selectedTab?.id ?? \"context\"}`}\n className=\"min-h-0 min-w-0 flex-1 overflow-y-auto p-4 sm:p-6\"\n >\n {selectedTab?.content ?? <EmptySlot label=\"Agent section\" />}\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AgentTabsPage.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentTabsPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,GAE9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,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,GAAG,CAAC,EAAE,CA4BJ,CACV,CAAC;wCACJ,CAAC,CAAC,GACE,KAtDD,KAAK,CAAC,EAAE,CAuDT,CACP,CAAC,GACE,CACP,IACG,EACN,cACE,EAAE,EAAE,kBAAkB,WAAW,EAAE,EAAE,IAAI,SAAS,EAAE,EACpD,IAAI,EAAC,UAAU,qBACE,aAAa,WAAW,EAAE,EAAE,IAAI,SAAS,EAAE,EAC5D,SAAS,EAAC,mDAAmD,YAE5D,WAAW,EAAE,OAAO,IAAI,KAAC,SAAS,IAAC,KAAK,EAAC,eAAe,GAAG,GACxD,IACF,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconBook2,\n IconBolt,\n IconChecklist,\n IconExternalLink,\n IconFolder,\n IconHistory,\n IconHelpCircle,\n IconHierarchy2,\n IconNotes,\n IconPlugConnected,\n IconTopologyRing2,\n IconSearch,\n IconSettings,\n IconShieldLock,\n IconX,\n} from \"@tabler/icons-react\";\nimport {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ComponentType,\n type ReactNode,\n} from \"react\";\n\nimport {\n MCP_CONNECT_GUIDES,\n MCP_CONNECT_MCP_URL_TEMPLATE,\n MCP_STATIC_TOKEN_FALLBACK,\n interpolateMcpConnectTemplate,\n type McpConnectTemplateValues,\n} from \"../../shared/mcp-connect-content.js\";\nimport { appPath } from \"../api-path.js\";\nimport { useT } from \"../i18n.js\";\nimport { useOrg } from \"../org/hooks.js\";\nimport {\n McpIntegrationDialog,\n // The dialog is intentionally reused here so the Agent page remains a thin\n // host for the existing MCP management flow.\n} from \"../resources/McpIntegrationDialog.js\";\nimport { McpServerDetail } from \"../resources/McpServerDetail.js\";\nimport type { ResourceView } from \"../resources/ResourcesPanel.js\";\nimport {\n useCreateMcpServer,\n useDeleteMcpServer,\n useMcpServers,\n type McpServer,\n type McpServerScope,\n} from \"../resources/use-mcp-servers.js\";\nimport {\n AGENT_SETTINGS_SECTIONS,\n buildSectionSearchEntries,\n} from \"../settings/agent-settings-search.js\";\nimport { AgentSettingsContent } from \"../settings/SettingsPanel.js\";\nimport type {\n SettingsSearchEntry,\n SettingsTabItem,\n} from \"../settings/SettingsTabsPage.js\";\nimport { cn } from \"../utils.js\";\nimport { AgentEmptyState } from \"./AgentEmptyState.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageScope, AgentPageTabProps } from \"./types.js\";\n\nconst AgentContextTab = lazy(() =>\n import(\"./AgentContextTab.js\").then((module) => ({\n default: module.AgentContextTab,\n })),\n);\nconst AgentJobsTab = lazy(() =>\n import(\"./AgentJobsTab.js\").then((module) => ({\n default: module.AgentJobsTab,\n })),\n);\nconst ResourcesPanel = lazy(() =>\n import(\"../resources/ResourcesPanel.js\").then((module) => ({\n default: module.ResourcesPanel,\n })),\n);\n\ntype SettingsTabIcon = ComponentType<{ className?: string }>;\n\nfunction normalizeTabId(value?: string | null): string | null {\n const normalized = value\n ?.replace(/^#/, \"\")\n .trim()\n .toLowerCase()\n .replace(/[\"']/g, \"\")\n .replace(/[\\s_]+/g, \"-\");\n return normalized || null;\n}\n\nfunction resolveTabId(\n tabs: SettingsTabItem[],\n value?: string | null,\n): string | null {\n const normalized = normalizeTabId(value);\n if (!normalized) return null;\n if (normalized === \"context\" && tabs.some((tab) => tab.id === \"snapshots\")) {\n return \"snapshots\";\n }\n if (tabs.some((tab) => tab.id === normalized)) return normalized;\n const section = normalized.split(\":\", 1)[0];\n const owner = tabs.find((tab) =>\n tab.searchEntries?.some(\n (entry) => normalizeTabId(entry.hash ?? entry.id) === section,\n ),\n );\n return owner?.id ?? null;\n}\n\nfunction updateTabHash(tabId: string) {\n if (typeof window === \"undefined\") return;\n const hash = tabId === \"files\" ? \"\" : `#${encodeURIComponent(tabId)}`;\n window.history.pushState(\n null,\n \"\",\n `${window.location.pathname}${window.location.search}${hash}`,\n );\n}\n\nfunction TabLoading() {\n return (\n <div className=\"space-y-3\" aria-busy=\"true\">\n <div className=\"h-5 w-36 animate-pulse rounded bg-muted\" />\n <div className=\"h-20 animate-pulse rounded-lg border border-border bg-muted/30\" />\n <div className=\"h-20 animate-pulse rounded-lg border border-border bg-muted/30\" />\n </div>\n );\n}\n\nfunction EmptySlot({ label }: { label: string }) {\n return (\n <div className=\"flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-border/70 bg-muted/10\">\n <span className=\"sr-only\">{label}</span>\n </div>\n );\n}\n\nexport const AGENT_RESOURCE_DOCS_HREF: Record<ResourceView, string> = {\n files: \"https://agent-native.com/docs/agent-resources#resources-tab\",\n instructions: \"https://agent-native.com/docs/agent-resources#agents-md\",\n agents: \"https://agent-native.com/docs/agent-resources#custom-agents\",\n memory: \"https://agent-native.com/docs/agent-resources#memory\",\n skills: \"https://agent-native.com/docs/skills-guide\",\n learnings: \"https://agent-native.com/docs/agent-resources#memory\",\n \"remote-agents\":\n \"https://agent-native.com/docs/agent-resources#remote-vs-custom-agents\",\n};\n\nconst RESOURCE_TAB_COPY: Record<\n ResourceView,\n { titleKey: string; descriptionKey: string }\n> = {\n files: {\n titleKey: \"agentResources.files.title\",\n descriptionKey: \"agentResources.files.description\",\n },\n instructions: {\n titleKey: \"agentResources.instructions.title\",\n descriptionKey: \"agentResources.instructions.description\",\n },\n agents: {\n titleKey: \"agentResources.agents.title\",\n descriptionKey: \"agentResources.agents.description\",\n },\n memory: {\n titleKey: \"agentResources.memory.title\",\n descriptionKey: \"agentResources.memory.description\",\n },\n skills: {\n titleKey: \"agentResources.skills.title\",\n descriptionKey: \"agentResources.skills.description\",\n },\n learnings: {\n titleKey: \"agentResources.learnings.title\",\n descriptionKey: \"agentResources.learnings.description\",\n },\n \"remote-agents\": {\n titleKey: \"agentResources.remoteAgents.title\",\n descriptionKey: \"agentResources.remoteAgents.description\",\n },\n};\n\nfunction AgentResourceTab({\n scope,\n view,\n}: AgentPageTabProps & { view: ResourceView }) {\n const t = useT();\n const copy = RESOURCE_TAB_COPY[view];\n const title = t(copy.titleKey);\n return (\n <AgentTabFrame\n title={title}\n description={t(copy.descriptionKey)}\n helpHref={AGENT_RESOURCE_DOCS_HREF[view]}\n helpLabel={t(\"agentResources.openDocs\", { section: title })}\n >\n <div className=\"min-h-[480px]\">\n <ResourcesPanel\n key={`${scope}-${view}`}\n showMcpServers={false}\n resourceFilter={view}\n resourceTreeVariant={view === \"files\" ? \"tree\" : \"collection\"}\n scope=\"personal\"\n />\n </div>\n </AgentTabFrame>\n );\n}\n\nfunction ServerStatus({ server }: { server: McpServer }) {\n if (server.status.state === \"connected\") {\n return (\n <span className=\"text-[11px] text-emerald-600 dark:text-emerald-400\">\n Connected · {server.status.toolCount} tools\n </span>\n );\n }\n if (server.status.state === \"error\") {\n return (\n <span className=\"truncate text-[11px] text-destructive\">\n Connection error\n </span>\n );\n }\n return (\n <span className=\"text-[11px] text-muted-foreground\">Status unknown</span>\n );\n}\n\nfunction ConnectionsTab({ canManageOrg = false }: AgentPageTabProps) {\n const t = useT();\n const serversQuery = useMcpServers();\n const createServer = useCreateMcpServer();\n const deleteServer = useDeleteMcpServer();\n const [dialogOpen, setDialogOpen] = useState(false);\n const [selectedServer, setSelectedServer] = useState<McpServer | null>(null);\n const [deleteTarget, setDeleteTarget] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const data = serversQuery.data;\n const hasOrg = Boolean(data?.orgId);\n const canCreateOrgMcp = hasOrg && canManageOrg;\n\n const onCreateMcpServer = useCallback(\n async (args: {\n scope: McpServerScope;\n name: string;\n url: string;\n headers?: Record<string, string>;\n description?: string;\n }) => {\n if (args.scope === \"org\" && !canCreateOrgMcp) {\n throw new Error(\n \"Only organization admins can add organization MCP servers.\",\n );\n }\n return createServer.mutateAsync(args);\n },\n [canCreateOrgMcp, createServer],\n );\n\n const removeServer = async (server: McpServer) => {\n const key = `${server.scope}:${server.id}`;\n if (deleteTarget !== key) {\n setDeleteTarget(key);\n return;\n }\n setError(null);\n try {\n await deleteServer.mutateAsync({ id: server.id, scope: server.scope });\n if (\n selectedServer?.id === server.id &&\n selectedServer.scope === server.scope\n ) {\n setSelectedServer(null);\n }\n setDeleteTarget(null);\n } catch (cause) {\n setError(cause instanceof Error ? cause.message : String(cause));\n }\n };\n\n const renderServer = (server: McpServer) => {\n const key = `${server.scope}:${server.id}`;\n const canDelete = server.scope === \"user\" || canManageOrg;\n const selected =\n selectedServer?.id === server.id && selectedServer.scope === server.scope;\n return (\n <div\n key={key}\n className={cn(\n \"group/connection-row py-4 transition-colors first:pt-5 last:pb-5\",\n selected && \"bg-accent/20\",\n )}\n >\n <div className=\"flex items-start gap-3\">\n <button\n type=\"button\"\n onClick={() => setSelectedServer(selected ? null : server)}\n className=\"min-w-0 flex-1 cursor-pointer text-start\"\n >\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"truncate text-sm font-medium text-foreground\">\n {server.name}\n </span>\n </div>\n <code className=\"mt-1 block truncate text-[11px] text-muted-foreground\">\n {server.url}\n </code>\n <div className=\"mt-2 flex items-center gap-2\">\n <ServerStatus server={server} />\n {server.description && (\n <span className=\"truncate text-[11px] text-muted-foreground/70\">\n {server.description}\n </span>\n )}\n </div>\n </button>\n {canDelete && (\n <button\n type=\"button\"\n onClick={() => void removeServer(server)}\n disabled={deleteServer.isPending}\n className={cn(\n \"cursor-pointer rounded-md px-2 py-1 text-[11px] font-medium text-muted-foreground hover:bg-destructive/10 hover:text-destructive\",\n deleteTarget === key && \"bg-destructive/10 text-destructive\",\n )}\n >\n {deleteTarget === key ? \"Confirm\" : \"Delete\"}\n </button>\n )}\n </div>\n {selected && (\n <div className=\"mt-3 border-t border-border/70 pt-3\">\n <McpServerDetail server={server} />\n </div>\n )}\n </div>\n );\n };\n\n return (\n <AgentTabFrame\n title=\"Connections\"\n description=\"Tools and services this agent can reach, grouped by where they are configured.\"\n actions={\n <button\n type=\"button\"\n onClick={() => {\n setError(null);\n setDialogOpen(true);\n }}\n className=\"cursor-pointer rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.connect\")}\n </button>\n }\n >\n <section className=\"space-y-4\">\n {error && (\n <p className=\"rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive\">\n {error}\n </p>\n )}\n {serversQuery.isLoading ? (\n <TabLoading />\n ) : serversQuery.isError ? (\n <p className=\"rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive\">\n Could not load MCP servers.\n </p>\n ) : (\n <div className=\"space-y-6\">\n {[\n { label: \"Personal\", servers: data?.user ?? [] },\n { label: \"Organization\", servers: data?.org ?? [] },\n ].map((section) => (\n <section key={section.label} className=\"space-y-2\">\n <h2 className=\"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70\">\n {section.label}\n </h2>\n {section.servers.length > 0 ? (\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {section.servers.map(renderServer)}\n </div>\n ) : (\n <AgentEmptyState\n icon={IconPlugConnected}\n title={`No ${section.label.toLowerCase()} connections yet`}\n description={\n section.label === \"Personal\"\n ? \"Connect a service to give the agent access to it.\"\n : \"Organization connections shared with this workspace will appear here.\"\n }\n />\n )}\n </section>\n ))}\n </div>\n )}\n <McpIntegrationDialog\n open={dialogOpen}\n onOpenChange={setDialogOpen}\n defaultScope=\"user\"\n canCreateOrgMcp={canCreateOrgMcp}\n hasOrg={hasOrg}\n onCreateMcpServer={onCreateMcpServer}\n />\n </section>\n </AgentTabFrame>\n );\n}\n\ninterface AccessUrls {\n appName: string;\n appUrl: string;\n mcpUrl: string;\n connectUrl: string;\n agentCardUrl: string;\n}\n\nexport const AGENT_ACCESS_DOCS_HREF = {\n mcp: \"https://agent-native.com/docs/mcp-protocol\",\n a2a: \"https://agent-native.com/docs/a2a-protocol\",\n} as const;\n\ninterface CopyFieldProps {\n label: string;\n value: string;\n docsHref?: string;\n docsLabel?: string;\n}\n\nfunction CopyField({ label, value, docsHref, docsLabel }: CopyFieldProps) {\n const [copied, setCopied] = useState(false);\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(value);\n setCopied(true);\n window.setTimeout(() => setCopied(false), 1600);\n } catch {\n setCopied(false);\n }\n };\n return (\n <div className=\"flex min-w-0 items-center gap-2 rounded-md border border-border bg-muted/20 p-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground/70\">\n {label}\n {docsHref && (\n <a\n href={docsHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={docsLabel ?? `Open ${label} documentation`}\n title={docsLabel ?? `Open ${label} documentation`}\n className=\"inline-flex size-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground\"\n >\n <IconHelpCircle className=\"size-3\" />\n </a>\n )}\n </div>\n <code className=\"mt-1 block truncate text-xs text-foreground\">\n {value}\n </code>\n </div>\n <button\n type=\"button\"\n onClick={() => void copy()}\n className=\"shrink-0 cursor-pointer rounded-md border border-border bg-background px-2.5 py-1.5 text-[11px] font-medium text-foreground hover:bg-accent\"\n >\n {copied ? \"Copied\" : \"Copy\"}\n </button>\n </div>\n );\n}\n\nfunction AccessTab({\n appName: appNameProp,\n}: AgentPageTabProps & { appName?: string }) {\n const [urls, setUrls] = useState<AccessUrls | null>(null);\n const [agentCardAvailable, setAgentCardAvailable] = useState(false);\n const [activeGuide, setActiveGuide] = useState(MCP_CONNECT_GUIDES[0]?.id);\n\n useEffect(() => {\n const origin = window.location.origin;\n const baseUrl = new URL(appPath(\"/\"), origin).toString().replace(/\\/$/, \"\");\n const hostname = window.location.hostname || \"app\";\n const metaSiteName = document\n .querySelector('meta[property=\"og:site_name\"]')\n ?.getAttribute(\"content\")\n ?.trim();\n const hostnameGuess =\n hostname !== \"localhost\" && hostname !== \"127.0.0.1\"\n ? hostname.split(\".\")[0]\n : \"\";\n const appName =\n appNameProp?.trim() || metaSiteName || hostnameGuess || \"this app\";\n const templateValues = {\n appName,\n appUrl: baseUrl,\n mcpUrl: \"\",\n serverId: `agent-native-${hostname}`,\n } satisfies McpConnectTemplateValues;\n setUrls({\n appName,\n appUrl: baseUrl,\n mcpUrl: interpolateMcpConnectTemplate(\n MCP_CONNECT_MCP_URL_TEMPLATE,\n templateValues,\n ),\n connectUrl: new URL(appPath(\"/mcp/connect\"), origin).toString(),\n agentCardUrl: new URL(\n appPath(\"/.well-known/agent-card.json\"),\n origin,\n ).toString(),\n });\n }, [appNameProp]);\n\n useEffect(() => {\n if (!urls) return;\n let cancelled = false;\n fetch(urls.agentCardUrl)\n .then((response) => {\n if (!cancelled) setAgentCardAvailable(response.ok);\n })\n .catch(() => {\n if (!cancelled) setAgentCardAvailable(false);\n });\n return () => {\n cancelled = true;\n };\n }, [urls]);\n\n const templateValues: McpConnectTemplateValues | null = urls\n ? {\n appName: urls.appName,\n appUrl: urls.appUrl,\n mcpUrl: urls.mcpUrl,\n serverId: `agent-native-${window.location.hostname || \"app\"}`,\n }\n : null;\n const guide =\n MCP_CONNECT_GUIDES.find((item) => item.id === activeGuide) ??\n MCP_CONNECT_GUIDES[0];\n\n return (\n <AgentTabFrame\n title=\"Access\"\n description=\"Choose which external clients can talk to this app's agent.\"\n >\n <div className=\"space-y-6\">\n {urls ? (\n <>\n <CopyField\n label=\"MCP URL\"\n value={urls.mcpUrl}\n docsHref={AGENT_ACCESS_DOCS_HREF.mcp}\n docsLabel=\"Open MCP documentation\"\n />\n {agentCardAvailable && (\n <CopyField\n label=\"A2A agent card\"\n value={urls.agentCardUrl}\n docsHref={AGENT_ACCESS_DOCS_HREF.a2a}\n docsLabel=\"Open A2A documentation\"\n />\n )}\n <section className=\"space-y-3 border-t border-border/70 pt-6\">\n <div>\n <h3 className=\"text-sm font-semibold text-foreground\">\n Client setup\n </h3>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n These instructions are also available on the full connect\n page.\n </p>\n </div>\n <div\n className=\"flex gap-1 overflow-x-auto border-b border-border pb-2\"\n role=\"tablist\"\n aria-label=\"Choose your AI assistant\"\n >\n {MCP_CONNECT_GUIDES.map((item) => (\n <button\n key={item.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={item.id === guide?.id}\n onClick={() => setActiveGuide(item.id)}\n className={cn(\n \"shrink-0 cursor-pointer rounded-md px-2.5 py-1.5 text-xs font-medium\",\n item.id === guide?.id\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:bg-accent/50 hover:text-foreground\",\n )}\n >\n {item.label}\n </button>\n ))}\n </div>\n {guide && templateValues && (\n <div className=\"space-y-3 pt-1\" role=\"tabpanel\">\n {guide.steps?.length ? (\n <ol className=\"list-decimal space-y-2 ps-5 text-xs leading-relaxed text-muted-foreground\">\n {guide.steps.map((step) => (\n <li key={step}>\n {interpolateMcpConnectTemplate(step, templateValues)}\n </li>\n ))}\n </ol>\n ) : null}\n {guide.intro && (\n <p className=\"text-xs text-muted-foreground\">\n {interpolateMcpConnectTemplate(\n guide.intro,\n templateValues,\n )}\n </p>\n )}\n {guide.commandTemplate && (\n <CopyField\n label=\"Command\"\n value={interpolateMcpConnectTemplate(\n guide.commandTemplate,\n templateValues,\n )}\n />\n )}\n {guide.configTemplate && (\n <CopyField\n label=\"MCP config\"\n value={interpolateMcpConnectTemplate(\n guide.configTemplate,\n templateValues,\n )}\n />\n )}\n {guide.action?.kind === \"link\" && guide.action.href && (\n <a\n href={guide.action.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent\"\n >\n {guide.action.label}\n <IconExternalLink className=\"size-3.5\" />\n </a>\n )}\n {guide.note && (\n <p className=\"text-xs leading-relaxed text-muted-foreground\">\n {interpolateMcpConnectTemplate(\n guide.note,\n templateValues,\n )}\n </p>\n )}\n </div>\n )}\n </section>\n <section className=\"border-t border-border/70 pt-6\">\n <h3 className=\"text-sm font-semibold text-foreground\">\n {MCP_STATIC_TOKEN_FALLBACK.title}\n </h3>\n <p className=\"mt-1 text-xs leading-relaxed text-muted-foreground\">\n {MCP_STATIC_TOKEN_FALLBACK.state}. Open the connect page to\n create a token for clients that cannot complete OAuth.\n </p>\n <a\n href={urls.connectUrl}\n className=\"mt-3 inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent\"\n >\n Open full connect page\n <IconExternalLink className=\"size-3.5\" />\n </a>\n </section>\n </>\n ) : (\n <TabLoading />\n )}\n </div>\n </AgentTabFrame>\n );\n}\n\nexport interface AgentPageExtraTabContext extends AgentPageTabProps {\n scopeControl: ReactNode;\n}\n\nexport type AgentPageExtraTabFactory = (\n context: AgentPageExtraTabContext,\n) => SettingsTabItem;\n\nexport interface AgentTabsPageProps {\n /**\n * Human-readable app name used in the Access tab's connect instructions\n * (e.g. \"name it Mail\"). Falls back to the `og:site_name` meta tag, then a\n * hostname-derived guess — never `document.title`, which this page owns.\n */\n appName?: string;\n extraTabs?: SettingsTabItem[];\n /** Scoped app-specific tabs that receive the current Manage agent page scope. */\n extraTabFactories?: AgentPageExtraTabFactory[];\n defaultTab?: string;\n className?: string;\n /** Whether to render the Agent page search box. Defaults to true. */\n enableSearch?: boolean;\n searchPlaceholder?: string;\n hiddenTabs?: string[];\n value?: string;\n onValueChange?: (tabId: string) => void;\n}\n\nexport function AgentTabsPage({\n appName,\n extraTabs = [],\n extraTabFactories = [],\n defaultTab = \"files\",\n className,\n enableSearch = true,\n searchPlaceholder = \"Search\",\n hiddenTabs = [],\n value,\n onValueChange,\n}: AgentTabsPageProps) {\n const t = useT();\n const { data: org } = useOrg();\n const canManageOrg =\n !org?.orgId || org.role === \"owner\" || org.role === \"admin\";\n const scope: AgentPageScope = \"user\";\n const rootRef = useRef<HTMLDivElement | null>(null);\n const searchRef = useRef<HTMLInputElement | null>(null);\n const [query, setQuery] = useState(\"\");\n const normalizedHiddenTabs = useMemo(\n () => new Set(hiddenTabs.map((tab) => normalizeTabId(tab)).filter(Boolean)),\n [hiddenTabs],\n );\n const scopeControl: ReactNode = null;\n const scopedExtraTabs = useMemo(\n () =>\n extraTabFactories.map((factory) =>\n factory({ scope, canManageOrg, scopeControl }),\n ),\n [canManageOrg, extraTabFactories, scope, scopeControl],\n );\n\n const tabs = useMemo<SettingsTabItem[]>(\n () => [\n {\n id: \"files\",\n label: \"Files\",\n icon: IconFolder,\n group: \"resources\",\n keywords: \"workspace plain files documents uploads\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"files\" />\n </Suspense>\n ),\n },\n {\n id: \"instructions\",\n label: \"Instructions\",\n icon: IconChecklist,\n group: \"resources\",\n keywords: \"agents md rules preferences guidance\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"instructions\" />\n </Suspense>\n ),\n },\n {\n id: \"agents\",\n label: \"Agents\",\n icon: IconHierarchy2,\n group: \"resources\",\n keywords: \"custom sub agents delegate profiles\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"agents\" />\n </Suspense>\n ),\n },\n {\n id: \"memory\",\n label: \"Memory\",\n icon: IconNotes,\n group: \"resources\",\n keywords: \"long term notes memory index recall\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"memory\" />\n </Suspense>\n ),\n },\n {\n id: \"skills\",\n label: \"Skills\",\n icon: IconBook2,\n group: \"resources\",\n keywords: \"abilities reusable instructions workflows\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"skills\" />\n </Suspense>\n ),\n },\n {\n id: \"learnings\",\n label: \"Learnings\",\n icon: IconHistory,\n group: \"resources\",\n keywords: \"corrections patterns knowledge feedback\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"learnings\" />\n </Suspense>\n ),\n },\n {\n id: \"remote-agents\",\n label: \"Remote agents\",\n icon: IconTopologyRing2,\n group: \"resources\",\n keywords: \"a2a connected remote agents delegation\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentResourceTab scope={scope} view=\"remote-agents\" />\n </Suspense>\n ),\n },\n {\n id: \"snapshots\",\n label: \"Snapshots\",\n icon: IconHistory,\n group: \"agent\",\n keywords: \"context recent loads provenance tokens\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentContextTab scope={scope} canManageOrg={canManageOrg} />\n </Suspense>\n ),\n },\n {\n id: \"connections\",\n label: \"Connections\",\n icon: IconPlugConnected,\n group: \"agent\",\n keywords: \"mcp servers tools integrations\",\n searchEntries: [\n { id: \"mcp-servers\", label: \"MCP servers\", keywords: \"tools\" },\n ],\n content: <ConnectionsTab scope={scope} canManageOrg={canManageOrg} />,\n },\n {\n id: \"jobs\",\n label: \"Automations\",\n icon: IconBolt,\n group: \"agent\",\n keywords: \"jobs scheduled automations recurring event triggers\",\n content: (\n <Suspense fallback={<TabLoading />}>\n <AgentJobsTab scope={scope} canManageOrg={canManageOrg} />\n </Suspense>\n ),\n },\n {\n id: \"settings\",\n label: t(\"settings.agentTitle\"),\n icon: IconSettings,\n group: \"agent\",\n keywords: \"agent settings model llm api keys limits voice automations\",\n searchEntries: buildSectionSearchEntries(AGENT_SETTINGS_SECTIONS),\n content: (\n <AgentTabFrame\n title={t(\"settings.agentTitle\")}\n description={t(\"settings.agentDescription\")}\n >\n <AgentSettingsContent />\n </AgentTabFrame>\n ),\n },\n {\n id: \"access\",\n label: \"Access\",\n icon: IconShieldLock,\n group: \"agent\",\n keywords: \"external clients oauth a2a exposure\",\n searchEntries: [\n {\n id: \"mcp-connect\",\n label: \"External client setup\",\n keywords: \"oauth connect\",\n },\n {\n id: \"a2a-agent-card\",\n label: \"A2A agent card\",\n keywords: \"agent card\",\n },\n ],\n content: (\n <AccessTab\n scope={scope}\n canManageOrg={canManageOrg}\n appName={appName}\n />\n ),\n },\n ...extraTabs,\n ...scopedExtraTabs,\n ],\n [appName, canManageOrg, extraTabs, scope, scopedExtraTabs],\n );\n const visibleTabs = useMemo(\n () => tabs.filter((tab) => !normalizedHiddenTabs.has(tab.id)),\n [normalizedHiddenTabs, tabs],\n );\n const fallbackTab = visibleTabs.some((tab) => tab.id === defaultTab)\n ? defaultTab\n : (visibleTabs[0]?.id ?? \"context\");\n const [internalTab, setInternalTab] = useState(() => {\n if (typeof window === \"undefined\") return fallbackTab;\n return resolveTabId(visibleTabs, window.location.hash) ?? fallbackTab;\n });\n const isControlled = value !== undefined;\n const activeTab = isControlled ? value : internalTab;\n const selectedTab =\n visibleTabs.find((tab) => tab.id === activeTab) ?? visibleTabs[0];\n const tabGroups = useMemo(() => {\n const groups: Array<{ id: string; tabs: SettingsTabItem[] }> = [];\n for (const tab of visibleTabs) {\n const groupId = tab.group ?? \"agent\";\n const previous = groups.at(-1);\n if (previous?.id === groupId) previous.tabs.push(tab);\n else groups.push({ id: groupId, tabs: [tab] });\n }\n return groups;\n }, [visibleTabs]);\n\n useEffect(() => {\n if (!isControlled && !visibleTabs.some((tab) => tab.id === internalTab)) {\n setInternalTab(fallbackTab);\n }\n }, [fallbackTab, internalTab, isControlled, visibleTabs]);\n\n useEffect(() => {\n if (isControlled) return;\n const onHashChange = () => {\n const next = resolveTabId(visibleTabs, window.location.hash);\n if (next) setInternalTab(next);\n };\n window.addEventListener(\"hashchange\", onHashChange);\n return () => window.removeEventListener(\"hashchange\", onHashChange);\n }, [isControlled, visibleTabs]);\n\n const changeTab = useCallback(\n (tabId: string) => {\n if (!isControlled) setInternalTab(tabId);\n onValueChange?.(tabId);\n },\n [isControlled, onValueChange],\n );\n\n const searchIndex = useMemo(() => {\n const entries: Array<\n SettingsSearchEntry & { tabId: string; haystack: string }\n > = [];\n for (const tab of visibleTabs) {\n entries.push({\n id: `tab:${tab.id}`,\n label: tab.label,\n keywords: tab.keywords,\n tabId: tab.id,\n haystack: `${tab.label} ${tab.keywords ?? \"\"}`.toLowerCase(),\n });\n for (const entry of tab.searchEntries ?? []) {\n entries.push({\n ...entry,\n tabId: entry.tabId ?? tab.id,\n haystack:\n `${entry.label} ${entry.keywords ?? \"\"} ${entry.description ?? \"\"} ${tab.label}`.toLowerCase(),\n });\n }\n }\n return entries;\n }, [visibleTabs]);\n const results = useMemo(() => {\n const terms = query.trim().toLowerCase().split(/\\s+/).filter(Boolean);\n if (!terms.length) return [];\n return searchIndex\n .filter((entry) => terms.every((term) => entry.haystack.includes(term)))\n .sort((a, b) => a.label.localeCompare(b.label));\n }, [query, searchIndex]);\n\n const selectSearchResult = useCallback(\n (entry: (typeof searchIndex)[number]) => {\n changeTab(entry.tabId);\n setQuery(\"\");\n if (isControlled || typeof window === \"undefined\") return;\n if (entry.hash) {\n window.history.pushState(\n null,\n \"\",\n `${window.location.pathname}${window.location.search}#${entry.hash.replace(/^#/, \"\")}`,\n );\n window.dispatchEvent(new Event(\"hashchange\"));\n } else {\n updateTabHash(entry.tabId);\n }\n },\n [changeTab, isControlled],\n );\n\n return (\n <div\n ref={rootRef}\n className={cn(\n \"flex h-full min-h-0 w-full flex-col overflow-hidden bg-background\",\n className,\n )}\n >\n <div className=\"flex min-h-0 flex-1 flex-col sm:flex-row\">\n <div className=\"flex shrink-0 flex-col gap-2 bg-background p-2 sm:min-h-0 sm:w-56 sm:overflow-y-auto sm:p-3\">\n {enableSearch ? (\n <div className=\"relative sm:mb-1\">\n <IconSearch className=\"pointer-events-none absolute start-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n ref={searchRef}\n type=\"search\"\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Escape\") setQuery(\"\");\n if (event.key === \"Enter\" && results[0]) {\n event.preventDefault();\n selectSearchResult(results[0]);\n }\n }}\n placeholder={searchPlaceholder}\n aria-label={searchPlaceholder}\n className=\"h-8 w-full rounded-md border border-border bg-background ps-8 pe-7 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground focus:border-foreground/30 focus:ring-2 focus:ring-accent/40\"\n />\n {query && (\n <button\n type=\"button\"\n onClick={() => setQuery(\"\")}\n aria-label=\"Clear search\"\n className=\"absolute end-1.5 top-1/2 flex size-5 -translate-y-1/2 cursor-pointer items-center justify-center rounded text-muted-foreground hover:bg-accent/60 hover:text-foreground\"\n >\n <IconX className=\"size-3.5\" />\n </button>\n )}\n </div>\n ) : null}\n {query.trim() ? (\n <div\n role=\"listbox\"\n aria-label=\"Agent search results\"\n className=\"flex flex-col gap-0.5\"\n >\n {results.length === 0 ? (\n <p className=\"px-2 py-6 text-center text-xs text-muted-foreground\">\n No matching items\n </p>\n ) : (\n results.map((entry) => (\n <button\n key={entry.id}\n type=\"button\"\n role=\"option\"\n onClick={() => selectSearchResult(entry)}\n className=\"flex cursor-pointer items-start gap-2 rounded-md px-2.5 py-2 text-start text-sm text-foreground hover:bg-accent/60\"\n >\n <span className=\"flex min-w-0 flex-col\">\n <span className=\"truncate font-medium\">\n {entry.label}\n </span>\n <span className=\"truncate text-[11px] text-muted-foreground\">\n {entry.description ?? entry.tabId}\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n ) : (\n <nav\n aria-label=\"Agent sections\"\n role=\"tablist\"\n className=\"flex gap-1 overflow-x-auto sm:flex-col sm:overflow-x-visible\"\n >\n {tabGroups.map((group, groupIndex) => (\n <div\n key={group.id}\n className={cn(\n \"contents sm:block\",\n groupIndex > 0 &&\n \"sm:mt-2 sm:border-t sm:border-border/60 sm:pt-2\",\n )}\n >\n {group.id === \"resources\" && (\n <div className=\"hidden px-2.5 pb-1 pt-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/50 sm:block\">\n Agent resources\n </div>\n )}\n {group.id === \"agent\" && (\n <div className=\"hidden px-2.5 pb-1 pt-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/50 sm:block\">\n Agent operations\n </div>\n )}\n <div className=\"contents sm:flex sm:flex-col sm:gap-1\">\n {group.tabs.map((tab) => {\n const Icon = tab.icon as SettingsTabIcon | undefined;\n const selected = tab.id === selectedTab?.id;\n return (\n <button\n key={tab.id}\n type=\"button\"\n id={`agent-tab-${tab.id}`}\n role=\"tab\"\n aria-selected={selected}\n aria-controls={`agent-tabpanel-${tab.id}`}\n onClick={() => {\n changeTab(tab.id);\n if (!isControlled) updateTabHash(tab.id);\n }}\n className={cn(\n \"flex min-h-9 shrink-0 cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-start text-sm font-medium transition-colors sm:w-full\",\n selected\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:bg-accent/50 hover:text-foreground\",\n )}\n >\n {Icon ? (\n <Icon\n className={cn(\n \"size-4 shrink-0\",\n selected\n ? \"text-foreground\"\n : \"text-muted-foreground\",\n )}\n />\n ) : null}\n <span className=\"truncate\">{tab.label}</span>\n </button>\n );\n })}\n </div>\n </div>\n ))}\n </nav>\n )}\n </div>\n <div\n id={`agent-tabpanel-${selectedTab?.id ?? \"context\"}`}\n role=\"tabpanel\"\n aria-labelledby={`agent-tab-${selectedTab?.id ?? \"context\"}`}\n className=\"min-h-0 min-w-0 flex-1 overflow-y-auto p-4 sm:p-6\"\n >\n {selectedTab?.content ?? <EmptySlot label=\"Agent section\" />}\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -33,6 +33,13 @@ export interface Automation {
|
|
|
33
33
|
lastError: string | null;
|
|
34
34
|
nextRun: string | null;
|
|
35
35
|
createdBy: string | null;
|
|
36
|
+
model: string | null;
|
|
37
|
+
mcpTools: string[];
|
|
38
|
+
originScopeId: string | null;
|
|
39
|
+
deliveryPlatform: string | null;
|
|
40
|
+
deliveryDestination: string | null;
|
|
41
|
+
deliveryThreadRef: string | null;
|
|
42
|
+
deliveryTenantId: string | null;
|
|
36
43
|
canUpdate: boolean;
|
|
37
44
|
}
|
|
38
45
|
export type ManageJobInput = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-jobs.d.ts","sourceRoot":"","sources":["../../../src/client/agent-page/use-jobs.ts"],"names":[],"mappings":"AAI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3B,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,GAAG,cAAc,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,GAAG,cAAc,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAUF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,kFAMhD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,gFAM9C;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS;cAMtC,OAAO;UAAQ,MAAM;cAAY,OAAO;mCA0BvD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS;cAMpC,OAAO;UAAQ,MAAM;cAAY,OAAO;0CA4BvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-jobs.js","sourceRoot":"","sources":["../../../src/client/agent-page/use-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-jobs.js","sourceRoot":"","sources":["../../../src/client/agent-page/use-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA+DrE,SAAS,eAAe,CAAC,KAAgB;IACvC,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,EAAW,CAAC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AAS,KAAK,QAAQ,EAAE,CAAC;oBACrC,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CACnD,CAAC;gBACJ,CAAC;gBACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAChC,UAAU,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,KAAK,SAAS;oBACnE,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE;oBAC/C,CAAC,CAAC,UAAU,CACf,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,EAAE,QAAQ,EAAE,CAAC;QACtB,CAAC;QACD,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;YACvC,MAAM,QAAQ,GAAG,OAAkD,CAAC;YACpE,IAAI,QAAQ,IAAI,UAAU,IAAI,QAAQ,EAAE,CAAC;gBACvC,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { useQueryClient } from \"@tanstack/react-query\";\n\nimport { useActionMutation, useActionQuery } from \"../use-action.js\";\n\nexport type JobsScope = \"user\" | \"org\";\n\nexport interface RecurringJob {\n id: string;\n name: string;\n path: string;\n scope: \"personal\" | \"organization\";\n schedule: string;\n scheduleDescription: string;\n instructions: string;\n enabled: boolean;\n lastRun: string | null;\n lastStatus: string | null;\n lastError: string | null;\n nextRun: string | null;\n createdBy: string | null;\n mcpTools: string[];\n canUpdate: boolean;\n}\n\nexport interface Automation {\n id: string;\n name: string;\n path: string;\n scope: \"personal\" | \"organization\";\n triggerType: \"event\" | \"schedule\";\n event: string | null;\n schedule: string | null;\n scheduleDescription: string | null;\n condition: string | null;\n body: string;\n enabled: boolean;\n lastRun: string | null;\n lastStatus: string | null;\n lastError: string | null;\n nextRun: string | null;\n createdBy: string | null;\n model: string | null;\n mcpTools: string[];\n originScopeId: string | null;\n deliveryPlatform: string | null;\n deliveryDestination: string | null;\n deliveryThreadRef: string | null;\n deliveryTenantId: string | null;\n canUpdate: boolean;\n}\n\nexport type ManageJobInput = {\n operation: \"update\" | \"delete\";\n name: string;\n scope: \"personal\" | \"organization\";\n enabled?: boolean;\n};\n\nexport type ManageAutomationInput = {\n operation: \"update\" | \"delete\";\n name: string;\n scope: \"personal\" | \"organization\";\n enabled?: boolean;\n};\n\nfunction recurringParams(scope: JobsScope) {\n return { scope: scope === \"org\" ? \"organization\" : \"personal\" } as const;\n}\n\nfunction automationParams(scope: JobsScope) {\n return { scope: scope === \"org\" ? \"organization\" : \"personal\" } as const;\n}\n\nexport function useRecurringJobs(scope: JobsScope) {\n return useActionQuery<RecurringJob[]>(\n \"list-recurring-jobs\",\n recurringParams(scope),\n { staleTime: 5_000 },\n );\n}\n\nexport function useAutomations(scope: JobsScope) {\n return useActionQuery<Automation[]>(\n \"list-automations\",\n automationParams(scope),\n { staleTime: 5_000 },\n );\n}\n\nexport function useManageRecurringJob(scope: JobsScope) {\n const queryClient = useQueryClient();\n const params = recurringParams(scope);\n const queryKey = [\"action\", \"list-recurring-jobs\", params] as const;\n\n return useActionMutation<\n { deleted?: boolean; name: string; enabled?: boolean },\n ManageJobInput\n >(\"manage-recurring-job\", {\n onMutate: async (variables) => {\n await queryClient.cancelQueries({ queryKey });\n const previous = queryClient.getQueryData<RecurringJob[]>(queryKey);\n queryClient.setQueryData<RecurringJob[]>(queryKey, (current) => {\n if (!current) return current;\n if (variables.operation === \"delete\") {\n return current.filter((job) => job.name !== variables.name);\n }\n return current.map((job) =>\n job.name === variables.name && variables.enabled !== undefined\n ? { ...job, enabled: variables.enabled }\n : job,\n );\n });\n return { previous };\n },\n onError: (_error, _variables, context) => {\n const rollback = context as { previous?: RecurringJob[] } | undefined;\n if (rollback && \"previous\" in rollback) {\n queryClient.setQueryData(queryKey, rollback.previous);\n }\n },\n });\n}\n\nexport function useManageAutomation(scope: JobsScope) {\n const queryClient = useQueryClient();\n const params = automationParams(scope);\n const queryKey = [\"action\", \"list-automations\", params] as const;\n\n return useActionMutation<\n { deleted?: boolean; name: string; enabled?: boolean },\n ManageAutomationInput\n >(\"manage-automation\", {\n onMutate: async (variables) => {\n await queryClient.cancelQueries({ queryKey });\n const previous = queryClient.getQueryData<Automation[]>(queryKey);\n queryClient.setQueryData<Automation[]>(queryKey, (current) => {\n if (!current) return current;\n if (variables.operation === \"delete\") {\n return current.filter(\n (automation) => automation.name !== variables.name,\n );\n }\n return current.map((automation) =>\n automation.name === variables.name && variables.enabled !== undefined\n ? { ...automation, enabled: variables.enabled }\n : automation,\n );\n });\n return { previous };\n },\n onError: (_error, _variables, context) => {\n const rollback = context as { previous?: Automation[] } | undefined;\n if (rollback && \"previous\" in rollback) {\n queryClient.setQueryData(queryKey, rollback.previous);\n }\n },\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics-session.d.ts","sourceRoot":"","sources":["../../src/client/analytics-session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics-session.d.ts","sourceRoot":"","sources":["../../src/client/analytics-session.ts"],"names":[],"mappings":"AAqDA,wBAAgB,+BAA+B,IAAI,MAAM,GAAG,SAAS,CASpE;AAED,wBAAgB,6BAA6B,IAAI,MAAM,GAAG,SAAS,CAkBlE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { serializeAnalyticsAnonymousIdCookie } from "../shared/analytics-anonymous-id.js";
|
|
1
2
|
const ANONYMOUS_ID_STORAGE_KEY = "agent-native.anonymous_id";
|
|
2
3
|
const SESSION_ID_STORAGE_KEY = "agent-native.session_id";
|
|
3
4
|
const SESSION_LAST_ACTIVITY_STORAGE_KEY = "agent-native.session_last_activity";
|
|
@@ -34,6 +35,17 @@ function safeStorageSet(key, value) {
|
|
|
34
35
|
// private browsing / storage disabled -- best-effort
|
|
35
36
|
}
|
|
36
37
|
}
|
|
38
|
+
function syncAnalyticsAnonymousIdCookie(id) {
|
|
39
|
+
try {
|
|
40
|
+
const cookie = serializeAnalyticsAnonymousIdCookie(id);
|
|
41
|
+
if (cookie)
|
|
42
|
+
document.cookie = cookie;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Cookie access can be unavailable in sandboxed frames — local storage
|
|
46
|
+
// remains the browser-side source of truth in that case.
|
|
47
|
+
}
|
|
48
|
+
}
|
|
37
49
|
export function getOrCreateAnalyticsAnonymousId() {
|
|
38
50
|
if (typeof window === "undefined")
|
|
39
51
|
return undefined;
|
|
@@ -42,6 +54,7 @@ export function getOrCreateAnalyticsAnonymousId() {
|
|
|
42
54
|
id = generateVisitorId();
|
|
43
55
|
safeStorageSet(ANONYMOUS_ID_STORAGE_KEY, id);
|
|
44
56
|
}
|
|
57
|
+
syncAnalyticsAnonymousIdCookie(id);
|
|
45
58
|
return id;
|
|
46
59
|
}
|
|
47
60
|
export function getOrCreateAnalyticsSessionId() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics-session.js","sourceRoot":"","sources":["../../src/client/analytics-session.ts"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAC7D,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AACzD,MAAM,iCAAiC,GAAG,oCAAoC,CAAC;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE/C,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,IACE,OAAO,MAAM,KAAK,WAAW;YAC7B,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EACvC,CAAC;YACD,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IAAC,MAAM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,eAAe;QAClC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,CAAC;QACtC,CAAC,CAAC,CAAC,CAAC;IACN,IAAI,EAAE,GAAG,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAChD,MAAM,OAAO,GACX,CAAC,YAAY;QACb,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;QAC1B,GAAG,GAAG,YAAY,GAAG,uBAAuB,CAAC;IAC/C,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,CAAC;QACnB,EAAE,GAAG,iBAAiB,EAAE,CAAC;QACzB,cAAc,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc,CAAC,iCAAiC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"analytics-session.js","sourceRoot":"","sources":["../../src/client/analytics-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAE1F,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAC7D,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AACzD,MAAM,iCAAiC,GAAG,oCAAoC,CAAC;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE/C,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,IACE,OAAO,MAAM,KAAK,WAAW;YAC7B,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EACvC,CAAC;YACD,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,8BAA8B;IAChC,CAAC;IACD,OAAO,CACL,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,MAA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W;QAAE,OAAO,SAAS,CAAC;IACpD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,eAAe,GAAG,cAAc,CAAC,iCAAiC,CAAC,CAAC;IAC1E,MAAM,YAAY,GAAG,eAAe;QAClC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,CAAC;QACtC,CAAC,CAAC,CAAC,CAAC;IACN,IAAI,EAAE,GAAG,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAChD,MAAM,OAAO,GACX,CAAC,YAAY;QACb,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;QAC1B,GAAG,GAAG,YAAY,GAAG,uBAAuB,CAAC;IAC/C,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,CAAC;QACnB,EAAE,GAAG,iBAAiB,EAAE,CAAC;QACzB,cAAc,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc,CAAC,iCAAiC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import { serializeAnalyticsAnonymousIdCookie } from \"../shared/analytics-anonymous-id.js\";\n\nconst ANONYMOUS_ID_STORAGE_KEY = \"agent-native.anonymous_id\";\nconst SESSION_ID_STORAGE_KEY = \"agent-native.session_id\";\nconst SESSION_LAST_ACTIVITY_STORAGE_KEY = \"agent-native.session_last_activity\";\n// 30-minute idle timeout matches GA4 / Mixpanel defaults: a tab left open\n// overnight starts a new session in the morning instead of stretching one visit.\nconst SESSION_IDLE_TIMEOUT_MS = 30 * 60 * 1000;\n\nfunction generateVisitorId(): string {\n try {\n if (\n typeof crypto !== \"undefined\" &&\n typeof crypto.randomUUID === \"function\"\n ) {\n return crypto.randomUUID();\n }\n } catch {\n // fall through to Math.random\n }\n return (\n Date.now().toString(36) +\n Math.random().toString(36).slice(2) +\n Math.random().toString(36).slice(2)\n );\n}\n\nfunction safeStorageGet(key: string): string | null {\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction safeStorageSet(key: string, value: string): void {\n try {\n window.localStorage.setItem(key, value);\n } catch {\n // private browsing / storage disabled -- best-effort\n }\n}\n\nfunction syncAnalyticsAnonymousIdCookie(id: string): void {\n try {\n const cookie = serializeAnalyticsAnonymousIdCookie(id);\n if (cookie) document.cookie = cookie;\n } catch {\n // Cookie access can be unavailable in sandboxed frames — local storage\n // remains the browser-side source of truth in that case.\n }\n}\n\nexport function getOrCreateAnalyticsAnonymousId(): string | undefined {\n if (typeof window === \"undefined\") return undefined;\n let id = safeStorageGet(ANONYMOUS_ID_STORAGE_KEY);\n if (!id) {\n id = generateVisitorId();\n safeStorageSet(ANONYMOUS_ID_STORAGE_KEY, id);\n }\n syncAnalyticsAnonymousIdCookie(id);\n return id;\n}\n\nexport function getOrCreateAnalyticsSessionId(): string | undefined {\n if (typeof window === \"undefined\") return undefined;\n const now = Date.now();\n const lastActivityRaw = safeStorageGet(SESSION_LAST_ACTIVITY_STORAGE_KEY);\n const lastActivity = lastActivityRaw\n ? Number.parseInt(lastActivityRaw, 10)\n : 0;\n let id = safeStorageGet(SESSION_ID_STORAGE_KEY);\n const expired =\n !lastActivity ||\n Number.isNaN(lastActivity) ||\n now - lastActivity > SESSION_IDLE_TIMEOUT_MS;\n if (!id || expired) {\n id = generateVisitorId();\n safeStorageSet(SESSION_ID_STORAGE_KEY, id);\n }\n safeStorageSet(SESSION_LAST_ACTIVITY_STORAGE_KEY, String(now));\n return id;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionViewer.d.ts","sourceRoot":"","sources":["../../../src/client/extensions/ExtensionViewer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExtensionViewer.d.ts","sourceRoot":"","sources":["../../../src/client/extensions/ExtensionViewer.tsx"],"names":[],"mappings":"AAuHA,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;CACrB;AAyjBD,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,EAAE,oBAAoB,+BAymBpE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { IconArrowBackUp, IconChevronRight, IconDotsVertical, IconHistory, IconLoader2, IconPencil, IconRefresh, IconTrash, IconX, } from "@tabler/icons-react";
|
|
2
|
+
import { IconArrowBackUp, IconChevronRight, IconCode, IconDotsVertical, IconHistory, IconLoader2, IconPencil, IconRefresh, IconTrash, IconX, } from "@tabler/icons-react";
|
|
3
3
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { useState, useEffect, useRef, useCallback, useMemo } from "react";
|
|
5
5
|
import { Link, useLocation, useNavigate } from "react-router";
|
|
@@ -721,14 +721,18 @@ export function ExtensionViewer({ extensionId }) {
|
|
|
721
721
|
submitRename();
|
|
722
722
|
if (e.key === "Escape")
|
|
723
723
|
setIsRenaming(false);
|
|
724
|
-
}, className: "min-w-0 bg-transparent px-0 py-0 text-sm font-medium outline-none border-b border-primary" })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "truncate text-sm font-medium", children: extension.name }),
|
|
724
|
+
}, className: "min-w-0 bg-transparent px-0 py-0 text-sm font-medium outline-none border-b border-primary" })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "truncate text-sm font-medium", children: extension.name }), !isLocalExtension && (_jsx("span", { className: "shrink-0 text-[10px] font-medium text-muted-foreground/70", title: extension.ownerEmail
|
|
725
|
+
? t("extensions.sandboxedCustomBlockCreatedBy", {
|
|
726
|
+
email: extension.ownerEmail,
|
|
727
|
+
})
|
|
728
|
+
: t("extensions.sandboxedCustomBlock"), children: t("extensions.customBlockSandboxed") })), extension.canEdit && !isLocalExtension && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: startRename, className: "shrink-0 cursor-pointer rounded p-0.5 text-muted-foreground/40 opacity-0 group-hover/name:opacity-100 hover:text-foreground", children: _jsx(IconPencil, { className: "h-3 w-3" }) }) }), _jsx(TooltipContent, { children: "Rename" })] }))] }))] }) }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => setRefreshKey((k) => k + 1), className: "inline-flex items-center justify-center rounded-md h-8 w-8 text-muted-foreground hover:bg-accent hover:text-accent-foreground cursor-pointer", children: _jsx(IconRefresh, { className: "h-4 w-4" }) }) }), _jsx(TooltipContent, { children: "Refresh" })] }), !isLocalExtension && (_jsxs(_Fragment, { children: [_jsx(ExtensionHistoryPopover, { extensionId: extensionId, canEdit: extension.canEdit, onRestored: () => setRefreshKey((k) => k + 1), onOpenChange: onPopoverOpenChange }), _jsx(EditToolPopover, { extension: extension, onOpenChange: onPopoverOpenChange })] })), _jsx(ToolMoreMenu, { extensionId: extensionId, toolName: extension.name, ownerEmail: extension.ownerEmail, canDelete: extension.canDelete, canEdit: extension.canEdit, sourceMode: extension.source?.mode, onOpenChange: onPopoverOpenChange }), !isLocalExtension && (_jsx(_Fragment, { children: _jsx(ShareButton, { resourceType: "extension", resourceId: extensionId, resourceTitle: extension.name, onOpenChange: onPopoverOpenChange, accessNote: _jsx(_Fragment, { children: "Extensions can be shared inside your organization only \u2014 they run with the viewer's credentials, so cross-org access isn't supported." }) }) })), _jsx(AgentToggleButton, {})] })] }), isLocalExtension && (_jsxs("div", { className: "shrink-0 border-b bg-muted/30 px-4 py-2 text-xs text-muted-foreground", children: ["Repo-backed extension. Edit", " ", _jsx("span", { className: "font-mono text-foreground", children: extension.source?.entryPath ?? "extensions/*/index.html" }), " ", "in your workspace, then refresh this preview."] })), _jsxs("div", { className: "relative flex-1 min-h-0", children: [!iframeReady && (_jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-background z-10", children: _jsx(IconLoader2, { className: "size-5 animate-spin text-muted-foreground", role: "status", "aria-label": "Loading" }) })), _jsx("iframe", { [SESSION_REPLAY_IFRAME_ATTRIBUTE]: "", ref: iframeRef, src: iframeSrcDoc ? undefined : iframeSrc, srcDoc: iframeSrcDoc, className: "h-full w-full border-0", sandbox: EXTENSION_IFRAME_SANDBOX, title: extension.name, style: {
|
|
725
729
|
pointerEvents: openPopoverCount > 0 ? "none" : "auto",
|
|
726
730
|
}, onLoad: () => {
|
|
727
731
|
sendThemeToIframe();
|
|
728
732
|
setTimeout(() => setIframeReady(true), 150);
|
|
729
733
|
} }, `${extension.updatedAt}-${refreshKey}`)] })] }) }));
|
|
730
734
|
}
|
|
731
|
-
function ToolMoreMenu({ extensionId, toolName, canDelete, sourceMode, onOpenChange, }) {
|
|
735
|
+
function ToolMoreMenu({ extensionId, toolName, ownerEmail, canDelete, canEdit, sourceMode, onOpenChange, }) {
|
|
732
736
|
const t = useT();
|
|
733
737
|
const [open, setOpen] = useState(false);
|
|
734
738
|
const [confirmingDelete, setConfirmingDelete] = useState(false);
|
|
@@ -776,14 +780,33 @@ function ToolMoreMenu({ extensionId, toolName, canDelete, sourceMode, onOpenChan
|
|
|
776
780
|
queryClient.invalidateQueries({ queryKey: ["extension", extensionId] });
|
|
777
781
|
}
|
|
778
782
|
};
|
|
783
|
+
const promoteToAppCode = () => {
|
|
784
|
+
closeMenu();
|
|
785
|
+
sendToAgentChat({
|
|
786
|
+
message: `Promote "${toolName}" from a sandboxed custom block into reusable native app code. Preserve the existing custom block as-is until the code change is reviewed and deployed.`,
|
|
787
|
+
context: [
|
|
788
|
+
`The user intentionally selected "Promote to app code" for database-backed extension "${toolName}" (id: ${extensionId}).`,
|
|
789
|
+
"Call connect-builder with this extensionId and the visible user request as its prompt.",
|
|
790
|
+
"Do not copy extension HTML from the browser or ask the client to supply it. connect-builder resolves the authoritative SQL artifact and re-checks editor access server-side.",
|
|
791
|
+
"The promotion is non-destructive: do not update, archive, delete, or replace the existing extension.",
|
|
792
|
+
].join("\n"),
|
|
793
|
+
submit: true,
|
|
794
|
+
openSidebar: true,
|
|
795
|
+
newTab: true,
|
|
796
|
+
});
|
|
797
|
+
};
|
|
779
798
|
const isLocalExtension = sourceMode === "local-files";
|
|
780
799
|
return (_jsxs(Popover, { open: open, onOpenChange: (o) => {
|
|
781
800
|
setOpenAndNotify(o);
|
|
782
801
|
if (!o)
|
|
783
802
|
setConfirmingDelete(false);
|
|
784
|
-
}, children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "inline-flex items-center justify-center rounded-md h-8 w-8 text-muted-foreground hover:bg-accent hover:text-accent-foreground cursor-pointer", "aria-label": "More options", children: _jsx(IconDotsVertical, { className: "h-4 w-4" }) }) }) }), _jsx(TooltipContent, { children: "More options" })] }), _jsx(PopoverContent, { align: "end", sideOffset: 4, className: "w-72 p-0", children: !confirmingDelete ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "px-3 py-2 border-b border-border/40", children: [_jsx("p", { className: "text-[12px] font-medium", children: "Appears in" }), slotsQuery.isError ? (_jsx(ExtensionQueryErrorState, { compact: true, className: "px-0", message: t("extensions.widgetAreasLoadError"), onRetry: () => void slotsQuery.refetch(), retrying: slotsQuery.isFetching })) : slots.length === 0 ? (_jsx("p", { className: "text-[11px] text-muted-foreground/70 mt-0.5", children: "Not installed in any widget areas. Ask the agent to add it somewhere." })) : (_jsxs("p", { className: "text-[11px] text-muted-foreground/70 mt-0.5", children: ["This extension can render in ", slots.length, " widget area", slots.length === 1 ? "" : "s", "."] }))] }), slots.length > 0 && (_jsx("div", { className: "max-h-48 overflow-y-auto py-1", children: slots.map((s) => (_jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5 text-[12px]", children: [_jsx("span", { className: "flex-1 truncate font-mono text-[11px] text-muted-foreground", children: s.slotId }), !isLocalExtension && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => removeFromSlot(s.slotId), className: "rounded p-1 text-muted-foreground/60 hover:bg-accent hover:text-foreground cursor-pointer", "aria-label": "Remove from this widget area", children: _jsx(IconX, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Remove from this widget area (for me)" })] }))] }, s.id))) })), isLocalExtension ? (_jsx("div", { className: "border-t border-border/40 px-3 py-2 text-[11px] text-muted-foreground", children: "Slot targets and source edits are controlled by this extension's files." })) : (
|
|
785
|
-
|
|
786
|
-
|
|
803
|
+
}, children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "inline-flex items-center justify-center rounded-md h-8 w-8 text-muted-foreground hover:bg-accent hover:text-accent-foreground cursor-pointer", "aria-label": "More options", children: _jsx(IconDotsVertical, { className: "h-4 w-4" }) }) }) }), _jsx(TooltipContent, { children: "More options" })] }), _jsx(PopoverContent, { align: "end", sideOffset: 4, className: "w-72 p-0", children: !confirmingDelete ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "px-3 py-2 border-b border-border/40", children: [_jsx("p", { className: "text-[12px] font-medium", children: "Appears in" }), slotsQuery.isError ? (_jsx(ExtensionQueryErrorState, { compact: true, className: "px-0", message: t("extensions.widgetAreasLoadError"), onRetry: () => void slotsQuery.refetch(), retrying: slotsQuery.isFetching })) : slots.length === 0 ? (_jsx("p", { className: "text-[11px] text-muted-foreground/70 mt-0.5", children: "Not installed in any widget areas. Ask the agent to add it somewhere." })) : (_jsxs("p", { className: "text-[11px] text-muted-foreground/70 mt-0.5", children: ["This extension can render in ", slots.length, " widget area", slots.length === 1 ? "" : "s", "."] }))] }), slots.length > 0 && (_jsx("div", { className: "max-h-48 overflow-y-auto py-1", children: slots.map((s) => (_jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5 text-[12px]", children: [_jsx("span", { className: "flex-1 truncate font-mono text-[11px] text-muted-foreground", children: s.slotId }), !isLocalExtension && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => removeFromSlot(s.slotId), className: "rounded p-1 text-muted-foreground/60 hover:bg-accent hover:text-foreground cursor-pointer", "aria-label": "Remove from this widget area", children: _jsx(IconX, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Remove from this widget area (for me)" })] }))] }, s.id))) })), isLocalExtension ? (_jsx("div", { className: "border-t border-border/40 px-3 py-2 text-[11px] text-muted-foreground", children: "Slot targets and source edits are controlled by this extension's files." })) : (_jsxs("div", { className: "border-t border-border/40 p-1", children: [canEdit && (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", onClick: promoteToAppCode, className: "flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-[12px] text-foreground hover:bg-accent", children: [_jsx(IconCode, { className: "h-3.5 w-3.5" }), _jsx("span", { children: t("extensions.promoteToAppCode") })] }), _jsx("p", { className: "truncate px-2 pb-1.5 text-[10px] text-muted-foreground/70", title: ownerEmail
|
|
804
|
+
? t("extensions.createdByHistoryShowsSourceVersions", { email: ownerEmail })
|
|
805
|
+
: t("extensions.historyShowsSourceVersions"), children: ownerEmail
|
|
806
|
+
? t("extensions.createdByHistoryShowsSourceVersionsCompact", { email: ownerEmail })
|
|
807
|
+
: t("extensions.historyShowsSourceVersions") })] })), _jsxs("button", { type: "button", onClick: () => setConfirmingDelete(true), className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-[12px] text-destructive hover:bg-destructive/10 cursor-pointer text-left", children: [_jsx(IconTrash, { className: "h-3.5 w-3.5" }), _jsx("span", { children: canDelete === false
|
|
808
|
+
? "Remove from my list..."
|
|
809
|
+
: "Archive extension..." })] })] }))] })) : (_jsxs("div", { className: "flex flex-col gap-2 p-3", children: [_jsxs("p", { className: "text-[12px]", children: [canDelete === false ? "Remove " : "Archive ", _jsx("span", { className: "font-medium", children: toolName }), "?", canDelete === false
|
|
787
810
|
? " This hides it from your Extensions list without deleting it for anyone else."
|
|
788
811
|
: " This archives the extension everywhere, for everyone it's shared with."] }), _jsxs("div", { className: "flex justify-end gap-1", children: [_jsx("button", { type: "button", onClick: () => setConfirmingDelete(false), className: "rounded-md px-2 py-1 text-[12px] hover:bg-accent cursor-pointer", children: "Cancel" }), _jsx("button", { type: "button", onClick: deleteExtension, className: "rounded-md bg-destructive px-2 py-1 text-[12px] text-destructive-foreground hover:bg-destructive/90 cursor-pointer", children: canDelete === false ? "Remove" : "Archive" })] })] })) })] }));
|
|
789
812
|
}
|