@agent-native/core 0.120.1 → 0.120.3
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 +3 -3
- package/corpus/core/CHANGELOG.md +29 -0
- package/corpus/core/docs/content/extensions.mdx +23 -4
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/production-agent.ts +4 -0
- package/corpus/core/src/agent/run-manager.ts +36 -10
- package/corpus/core/src/agent/types.ts +2 -0
- package/corpus/core/src/cli/context-xray-local.ts +1 -1
- package/corpus/core/src/cli/index.ts +63 -18
- package/corpus/core/src/cli/skills.ts +5 -0
- package/corpus/core/src/cli/telemetry.ts +118 -1
- package/corpus/core/src/client/AgentPanel.tsx +10 -0
- package/corpus/core/src/client/CommandMenu.tsx +13 -1
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +39 -4
- package/corpus/core/src/client/analytics.ts +13 -0
- package/corpus/core/src/client/error-capture.ts +6 -1
- package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +28 -8
- package/corpus/core/src/client/extensions/agent-native-extension-runtime.ts +1 -1
- package/corpus/core/src/client/navigation/index.ts +2 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +14 -32
- package/corpus/core/src/client/settings/ExtensionsSettingsContent.tsx +24 -0
- package/corpus/core/src/client/settings/SettingsPanel.tsx +10 -0
- package/corpus/core/src/deploy/build.ts +3 -0
- package/corpus/core/src/extensions/theme.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +2 -0
- package/corpus/core/src/server/analytics.ts +154 -25
- package/corpus/core/src/server/core-routes-plugin.ts +10 -1
- package/corpus/core/src/server/framework-request-handler.ts +17 -26
- package/corpus/core/src/styles/agent-native.css +13 -0
- package/corpus/core/src/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +113 -51
- package/corpus/core/src/templates/chat/app/global.css +1 -1
- package/corpus/core/src/templates/chat/app/routes/extensions._index.tsx +2 -2
- package/corpus/core/src/templates/chat/netlify.toml +1 -0
- package/corpus/core/src/templates/default/app/global.css +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +16 -0
- package/corpus/core/src/tracking/error-capture.ts +151 -0
- package/corpus/core/src/tracking/index.ts +5 -0
- package/corpus/core/src/vite/client.ts +6 -0
- package/corpus/templates/analytics/.agents/skills/adhoc-analysis/SKILL.md +27 -43
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +19 -8
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +2 -2
- package/corpus/templates/analytics/AGENTS.md +20 -8
- package/corpus/templates/analytics/actions/get-explorer-dashboard.ts +3 -0
- package/corpus/templates/analytics/actions/list-dashboard-usage-stats.ts +140 -46
- package/corpus/templates/analytics/actions/migrate-analytics-artifacts.ts +48 -0
- package/corpus/templates/analytics/actions/save-analysis.ts +2 -3
- package/corpus/templates/analytics/actions/view-screen.ts +1 -1
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -4
- package/corpus/templates/analytics/app/components/dashboard/DashboardMetadata.tsx +77 -0
- package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +7 -1
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DateRangePicker.tsx +2 -2
- package/corpus/templates/analytics/app/components/dashboard/MetricCard.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +41 -9
- package/corpus/templates/analytics/app/components/dashboard/StatsCard.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +2 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +28 -14
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +1 -0
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +255 -626
- package/corpus/templates/analytics/app/global.css +31 -1
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +2 -2
- package/corpus/templates/analytics/app/i18n-data.ts +80 -0
- package/corpus/templates/analytics/app/lib/dashboard-report-capture.ts +42 -0
- package/corpus/templates/analytics/app/pages/Agents.tsx +49 -2
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ChartTypePicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/DateRangePicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventRow.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +54 -11
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +3 -3
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +4 -54
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +178 -69
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +2 -2
- package/corpus/templates/analytics/app/root.tsx +28 -0
- package/corpus/templates/analytics/app/routes/analyses._index.tsx +3 -2
- package/corpus/templates/analytics/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/analytics/changelog/2026-07-23-analytics-now-groups-saved-analyses-and-embedded-extensions-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-23-dashboard-menus-show-who-created-and-last-updated-each-dashb.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-23-dashboard-usage-now-loads-reliably-for-organizations-with-ma.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-23-long-dashboard-building-requests-now-continue-without-stoppi.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-analytics-charts-now-explain-slow-loads-and-offer-a-direct-r.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-daily-dashboard-emails-now-load-signed-reports-more-reliably.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-manage-agent-is-clearly-marked-as-a-link-to-its-dedicated-pa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/analytics/netlify.toml +4 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +1 -1
- package/corpus/templates/analytics/server/db/schema.ts +9 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +21 -0
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +0 -1
- package/corpus/templates/analytics/server/lib/agent-readable-resource-context.ts +1 -0
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +11 -0
- package/corpus/templates/analytics/server/lib/dashboard-report-subscriptions.ts +54 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +235 -26
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +4 -1
- package/corpus/templates/analytics/server/lib/migrate-analytics-artifacts.ts +1062 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +6 -52
- package/corpus/templates/analytics/server/plugins/core-routes.ts +1 -1
- package/corpus/templates/analytics/server/plugins/db.ts +19 -0
- package/corpus/templates/analytics/shared/dashboard-report-timeouts.ts +1 -1
- package/corpus/templates/assets/actions/generate-image-batch.ts +36 -1
- package/corpus/templates/assets/actions/generate-image.ts +28 -1
- package/corpus/templates/assets/app/components/asset/AssetPreviewDialog.tsx +376 -0
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +14 -4
- package/corpus/templates/assets/app/components/layout/Layout.tsx +5 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +164 -82
- package/corpus/templates/assets/app/global.css +1 -1
- package/corpus/templates/assets/app/i18n-data.ts +10 -0
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +99 -10
- package/corpus/templates/assets/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/assets/app/routes/library.tsx +21 -198
- package/corpus/templates/assets/changelog/2026-07-21-unified-asset-preview-click-any-asset-to-open-one-preview-wi.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-23-assets-image-generation-now-recovers-after-a-completed-tool-.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/assets/netlify.toml +1 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +114 -51
- package/corpus/templates/brain/app/global.css +1 -1
- package/corpus/templates/brain/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/brain/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/brain/netlify.toml +1 -0
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +110 -57
- package/corpus/templates/calendar/app/global.css +1 -1
- package/corpus/templates/calendar/app/routes/_app.extensions._index.tsx +2 -16
- package/corpus/templates/calendar/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/calendar/netlify.toml +1 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +113 -51
- package/corpus/templates/chat/app/global.css +1 -1
- package/corpus/templates/chat/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/chat/netlify.toml +1 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +117 -37
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +2 -2
- package/corpus/templates/clips/app/components/player/video-player.tsx +16 -1
- package/corpus/templates/clips/app/global.css +1 -1
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +55 -12
- package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +2 -16
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +6 -5
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -7
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +6 -5
- package/corpus/templates/clips/changelog/2026-07-23-agent-settings-are-clearly-labeled-manage-agent-in-the-sideb.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-23-meeting-recording-meters-and-dismissed-prompts.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/clips/desktop/src/hooks/useMicMeter.ts +1 -1
- package/corpus/templates/clips/desktop/src/lib/meeting-notification-dismissal.ts +2 -0
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +1 -3
- package/corpus/templates/clips/desktop/src/overlays/live-audio-bars.tsx +86 -0
- package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +24 -0
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +5 -69
- package/corpus/templates/clips/desktop/src/styles.css +35 -3
- package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +13 -44
- package/corpus/templates/clips/desktop/src-tauri/src/notifications.rs +119 -17
- package/corpus/templates/clips/netlify.toml +1 -0
- package/corpus/templates/clips/server/plugins/db.ts +113 -68
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +69 -49
- package/corpus/templates/content/app/global.css +1 -1
- package/corpus/templates/content/app/routes/_app.extensions._index.tsx +2 -2
- package/corpus/templates/content/changelog/2026-07-23-agent-settings-are-clearly-labeled-manage-agent-in-the-sideb.md +6 -0
- package/corpus/templates/content/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/content/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/content/netlify.toml +1 -0
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +115 -42
- package/corpus/templates/design/app/entry.client.tsx +14 -1
- package/corpus/templates/design/app/global.css +1 -1
- package/corpus/templates/design/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/design/changelog/2026-07-23-agent-settings-are-clearly-labeled-manage-agent-in-the-sideb.md +6 -0
- package/corpus/templates/design/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/design/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/design/netlify.toml +1 -0
- package/corpus/templates/dispatch/app/dispatch-extensions.tsx +1 -1
- package/corpus/templates/dispatch/app/global.css +1 -1
- package/corpus/templates/dispatch/changelog/2026-07-23-agent-settings-are-clearly-labeled-manage-agent-in-the-sideb.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/dispatch/netlify.toml +1 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +113 -82
- package/corpus/templates/forms/app/global.css +1 -1
- package/corpus/templates/forms/app/routes/_app.extensions._index.tsx +2 -2
- package/corpus/templates/forms/changelog/2026-07-23-agent-settings-are-clearly-labeled-manage-agent-in-the-sideb.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-24-forms-sidebar-actions-now-keep-search-language-feedback-and-.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/forms/netlify.toml +1 -0
- package/corpus/templates/macros/app/components/DailyProgress.tsx +5 -5
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +2 -2
- package/corpus/templates/macros/app/components/MealCard.tsx +2 -2
- package/corpus/templates/macros/app/components/WeightCard.tsx +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +92 -34
- package/corpus/templates/macros/app/components/ui/button.tsx +1 -2
- package/corpus/templates/macros/app/components/ui/card.tsx +1 -1
- package/corpus/templates/macros/app/global.css +1 -1
- package/corpus/templates/macros/app/routes/_index.tsx +1 -1
- package/corpus/templates/macros/app/routes/analytics.tsx +4 -7
- package/corpus/templates/macros/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/macros/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/macros/netlify.toml +1 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +125 -46
- package/corpus/templates/mail/app/global.css +1 -1
- package/corpus/templates/mail/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/mail/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/mail/netlify.toml +1 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +128 -65
- package/corpus/templates/plan/app/global.css +1 -1
- package/corpus/templates/plan/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/plan/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/plan/netlify.toml +1 -0
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +116 -36
- package/corpus/templates/slides/app/global.css +1 -1
- package/corpus/templates/slides/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/slides/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/slides/netlify.toml +1 -0
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +37 -6
- package/corpus/templates/tasks/app/global.css +1 -1
- package/corpus/templates/tasks/app/routes/extensions._index.tsx +2 -2
- package/corpus/templates/tasks/app/routes/settings.tsx +31 -0
- package/corpus/templates/tasks/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/tasks/netlify.toml +1 -0
- package/corpus/toolkit/CHANGELOG.md +8 -0
- package/corpus/toolkit/README.md +8 -1
- package/corpus/toolkit/agent-native.eject.json +1 -1
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/app-shell/index.ts +1 -0
- package/corpus/toolkit/src/app-shell/sidebar-footer-actions.tsx +48 -0
- package/corpus/toolkit/src/chat-history.css +52 -1
- package/corpus/toolkit/src/design-system/default-adapter.tsx +1 -1
- package/corpus/toolkit/src/ui/button.tsx +1 -2
- package/corpus/toolkit/src/ui/card.tsx +1 -1
- package/corpus/toolkit/src/ui/table.tsx +4 -11
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +4 -0
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +9 -0
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +25 -10
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/types.d.ts +2 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/context-xray-local.js +1 -1
- package/dist/cli/context-xray-local.js.map +1 -1
- package/dist/cli/index.js +56 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +5 -0
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/telemetry.d.ts +7 -0
- package/dist/cli/telemetry.d.ts.map +1 -1
- package/dist/cli/telemetry.js +91 -1
- package/dist/cli/telemetry.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +7 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/CommandMenu.d.ts +2 -0
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +12 -1
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.d.ts +4 -0
- package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.js +8 -4
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +7 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/error-capture.d.ts.map +1 -1
- package/dist/client/error-capture.js +8 -1
- package/dist/client/error-capture.js.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.d.ts +5 -1
- package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.js +6 -4
- package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
- package/dist/client/extensions/agent-native-extension-runtime.js +1 -1
- package/dist/client/extensions/agent-native-extension-runtime.js.map +1 -1
- package/dist/client/navigation/index.d.ts +1 -1
- package/dist/client/navigation/index.d.ts.map +1 -1
- package/dist/client/navigation/index.js +1 -1
- package/dist/client/navigation/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +9 -13
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/settings/ExtensionsSettingsContent.d.ts +2 -0
- package/dist/client/settings/ExtensionsSettingsContent.d.ts.map +1 -0
- package/dist/client/settings/ExtensionsSettingsContent.js +10 -0
- package/dist/client/settings/ExtensionsSettingsContent.js.map +1 -0
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +10 -1
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/deploy/build.js +1 -0
- package/dist/deploy/build.js.map +1 -1
- package/dist/extensions/theme.js +1 -1
- package/dist/extensions/theme.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/localization/default-messages.d.ts +2 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +2 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +7 -7
- package/dist/provider-api/actions/provider-api.d.ts +9 -9
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/analytics.d.ts +9 -4
- package/dist/server/analytics.d.ts.map +1 -1
- package/dist/server/analytics.js +111 -22
- package/dist/server/analytics.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +8 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +17 -27
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/styles/agent-native.css +13 -0
- package/dist/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +113 -51
- package/dist/templates/chat/app/global.css +1 -1
- package/dist/templates/chat/app/routes/extensions._index.tsx +2 -2
- package/dist/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/dist/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/dist/templates/chat/netlify.toml +1 -0
- package/dist/templates/default/app/global.css +1 -1
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +16 -0
- package/dist/tracking/error-capture.d.ts +14 -0
- package/dist/tracking/error-capture.d.ts.map +1 -0
- package/dist/tracking/error-capture.js +113 -0
- package/dist/tracking/error-capture.js.map +1 -0
- package/dist/tracking/index.d.ts +1 -0
- package/dist/tracking/index.d.ts.map +1 -1
- package/dist/tracking/index.js +1 -0
- package/dist/tracking/index.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +2 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/extensions.mdx +23 -4
- package/package.json +2 -2
- package/src/agent/production-agent.ts +4 -0
- package/src/agent/run-manager.ts +36 -10
- package/src/agent/types.ts +2 -0
- package/src/cli/context-xray-local.ts +1 -1
- package/src/cli/index.ts +63 -18
- package/src/cli/skills.ts +5 -0
- package/src/cli/telemetry.ts +118 -1
- package/src/client/AgentPanel.tsx +10 -0
- package/src/client/CommandMenu.tsx +13 -1
- package/src/client/agent-page/AgentTabsPage.tsx +39 -4
- package/src/client/analytics.ts +13 -0
- package/src/client/error-capture.ts +6 -1
- package/src/client/extensions/ExtensionsListPage.tsx +28 -8
- package/src/client/extensions/agent-native-extension-runtime.ts +1 -1
- package/src/client/navigation/index.ts +2 -0
- package/src/client/org/OrgSwitcher.tsx +14 -32
- package/src/client/settings/ExtensionsSettingsContent.tsx +24 -0
- package/src/client/settings/SettingsPanel.tsx +10 -0
- package/src/deploy/build.ts +3 -0
- package/src/extensions/theme.ts +1 -1
- package/src/localization/default-messages.ts +2 -0
- package/src/server/analytics.ts +154 -25
- package/src/server/core-routes-plugin.ts +10 -1
- package/src/server/framework-request-handler.ts +17 -26
- package/src/styles/agent-native.css +13 -0
- package/src/templates/chat/app/components/layout/Layout.tsx +3 -0
- package/src/templates/chat/app/components/layout/Sidebar.tsx +113 -51
- package/src/templates/chat/app/global.css +1 -1
- package/src/templates/chat/app/routes/extensions._index.tsx +2 -2
- package/src/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/src/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/src/templates/chat/netlify.toml +1 -0
- package/src/templates/default/app/global.css +1 -1
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +16 -0
- package/src/tracking/error-capture.ts +151 -0
- package/src/tracking/index.ts +5 -0
- package/src/vite/client.ts +6 -0
- package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +0 -165
- package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +0 -175
|
@@ -97,6 +97,7 @@ import {
|
|
|
97
97
|
MCP_EMBED_CORS_ALLOW_HEADERS,
|
|
98
98
|
shouldAllowMcpEmbedCredentials,
|
|
99
99
|
} from "../shared/mcp-embed-headers.js";
|
|
100
|
+
import { captureException } from "../tracking/error-capture.js";
|
|
100
101
|
import { track } from "../tracking/index.js";
|
|
101
102
|
import { registerBuiltinProviders } from "../tracking/providers.js";
|
|
102
103
|
import { validateTrackPayload } from "../tracking/route.js";
|
|
@@ -140,7 +141,7 @@ import {
|
|
|
140
141
|
type BuilderRelayCredentials,
|
|
141
142
|
type BuilderPreviewRelayState,
|
|
142
143
|
} from "./builder-browser.js";
|
|
143
|
-
import { captureError } from "./capture-error.js";
|
|
144
|
+
import { captureError, registerErrorCaptureProvider } from "./capture-error.js";
|
|
144
145
|
import {
|
|
145
146
|
getAllowedCorsOrigin,
|
|
146
147
|
readCorsAllowedOrigins,
|
|
@@ -1197,6 +1198,14 @@ export function createCoreRoutesPlugin(
|
|
|
1197
1198
|
// already registered the same key win.
|
|
1198
1199
|
registerFrameworkSecrets();
|
|
1199
1200
|
registerBuiltinProviders();
|
|
1201
|
+
registerErrorCaptureProvider("agent-native-analytics", (error, context) =>
|
|
1202
|
+
captureException(error, {
|
|
1203
|
+
...context,
|
|
1204
|
+
handled: false,
|
|
1205
|
+
runtime: "node",
|
|
1206
|
+
source: "server",
|
|
1207
|
+
}),
|
|
1208
|
+
);
|
|
1200
1209
|
registerBuiltinNotificationChannels();
|
|
1201
1210
|
|
|
1202
1211
|
try {
|
|
@@ -602,33 +602,24 @@ function registerMiddleware(
|
|
|
602
602
|
status,
|
|
603
603
|
error: err,
|
|
604
604
|
});
|
|
605
|
-
// Forward 5xx to server
|
|
606
|
-
// fire here because we convert the throw into a
|
|
607
|
-
// and a console.error alone is invisible in
|
|
608
|
-
// 4xx are user-input errors (validation, auth)
|
|
609
|
-
// alerting on.
|
|
610
|
-
// doesn't pull @sentry/node into bundles that don't need it.
|
|
605
|
+
// Forward 5xx to the configured server error providers — Nitro's own
|
|
606
|
+
// `error` hook may not fire here because we convert the throw into a
|
|
607
|
+
// normal JSON response, and a console.error alone is invisible in
|
|
608
|
+
// deployed environments. 4xx are user-input errors (validation, auth)
|
|
609
|
+
// and aren't worth alerting on.
|
|
611
610
|
if (status >= 500) {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
return undefined;
|
|
625
|
-
}
|
|
626
|
-
})(),
|
|
627
|
-
});
|
|
628
|
-
})
|
|
629
|
-
.catch(() => {
|
|
630
|
-
// Sentry is observability — never let it break a response path.
|
|
631
|
-
});
|
|
611
|
+
captureError(err, {
|
|
612
|
+
route: reqPath,
|
|
613
|
+
method: event.method,
|
|
614
|
+
tags: { status_code: String(status) },
|
|
615
|
+
userAgent: (() => {
|
|
616
|
+
try {
|
|
617
|
+
return event.headers?.get("user-agent") ?? undefined;
|
|
618
|
+
} catch {
|
|
619
|
+
return undefined;
|
|
620
|
+
}
|
|
621
|
+
})(),
|
|
622
|
+
});
|
|
632
623
|
}
|
|
633
624
|
try {
|
|
634
625
|
setResponseStatus(event, status);
|
|
@@ -310,6 +310,10 @@
|
|
|
310
310
|
opacity: 1;
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
/* A named chat surface already morphs from its old geometry during a
|
|
314
|
+
full-page-chat handoff. Override only the initial style of that panel so it
|
|
315
|
+
does not slide in from the right underneath the morph. Keeping the normal
|
|
316
|
+
rules intact preserves ordinary sidebar open/close animation. */
|
|
313
317
|
@starting-style {
|
|
314
318
|
.agent-sidebar-panel[data-agent-sidebar-animation="desktop"][data-agent-sidebar-state="open"] {
|
|
315
319
|
width: 0;
|
|
@@ -330,6 +334,15 @@
|
|
|
330
334
|
.agent-sidebar-backdrop[data-agent-sidebar-animation="mobile"][data-agent-sidebar-state="open"] {
|
|
331
335
|
opacity: 0;
|
|
332
336
|
}
|
|
337
|
+
|
|
338
|
+
.agent-native-chat-view-transition.agent-sidebar-panel[data-agent-sidebar-animation="desktop"][data-agent-sidebar-chat-handoff="true"] {
|
|
339
|
+
width: var(--agent-sidebar-width);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.agent-native-chat-view-transition.agent-sidebar-panel[data-agent-sidebar-animation="desktop"][data-agent-sidebar-chat-handoff="true"]
|
|
343
|
+
> .agent-sidebar-panel-inner {
|
|
344
|
+
transform: translateX(0);
|
|
345
|
+
}
|
|
333
346
|
}
|
|
334
347
|
|
|
335
348
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSidebar,
|
|
3
3
|
focusAgentChat,
|
|
4
|
+
isAgentChatHomeHandoffActive,
|
|
4
5
|
navigateWithAgentChatViewTransition,
|
|
5
6
|
useAgentChatHomeHandoff,
|
|
6
7
|
useAgentChatHomeHandoffLinks,
|
|
@@ -57,6 +58,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
57
58
|
activePath: location.pathname,
|
|
58
59
|
enabled: !isChatRoute,
|
|
59
60
|
});
|
|
61
|
+
const chatHomeHandoffPending = isAgentChatHomeHandoffActive("chat");
|
|
60
62
|
useAgentChatHomeHandoffLinks({
|
|
61
63
|
storageKey: "chat",
|
|
62
64
|
isChatPath: (pathname) => pathname === "/" || pathname.startsWith("/chat/"),
|
|
@@ -164,6 +166,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
164
166
|
<AgentSidebar
|
|
165
167
|
position="right"
|
|
166
168
|
chatViewTransition
|
|
169
|
+
chatViewTransitionHandoff={chatHomeHandoffPending}
|
|
167
170
|
storageKey="chat"
|
|
168
171
|
browserTabId={TAB_ID}
|
|
169
172
|
openOnChatRunning={chatHomeHandoffActive}
|
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
type ChatThreadSummary,
|
|
5
5
|
} from "@agent-native/core/client/agent-chat";
|
|
6
6
|
import { appPath } from "@agent-native/core/client/api-path";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { LanguagePicker, useT } from "@agent-native/core/client/i18n";
|
|
8
|
+
import { openCommandMenu } from "@agent-native/core/client/navigation";
|
|
9
9
|
import { OrgSwitcher } from "@agent-native/core/client/org";
|
|
10
10
|
import { FeedbackButton } from "@agent-native/core/client/ui";
|
|
11
|
+
import { SidebarFooterActions } from "@agent-native/toolkit/app-shell";
|
|
11
12
|
import {
|
|
12
13
|
ChatHistoryRail,
|
|
13
14
|
type ChatHistoryItem,
|
|
@@ -17,6 +18,7 @@ import {
|
|
|
17
18
|
IconLayoutSidebarLeftCollapse,
|
|
18
19
|
IconLayoutSidebarLeftExpand,
|
|
19
20
|
IconMessageCircle,
|
|
21
|
+
IconSearch,
|
|
20
22
|
IconSettings,
|
|
21
23
|
} from "@tabler/icons-react";
|
|
22
24
|
import { useEffect, useMemo } from "react";
|
|
@@ -38,6 +40,9 @@ const navItems = [
|
|
|
38
40
|
href: "/",
|
|
39
41
|
view: "chat",
|
|
40
42
|
},
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
const bottomNavItems = [
|
|
41
46
|
{
|
|
42
47
|
icon: IconHierarchy2,
|
|
43
48
|
labelKey: "settings.agentTitle",
|
|
@@ -124,7 +129,7 @@ function chatThreadPath(threadId: string) {
|
|
|
124
129
|
return `/chat/${encodeURIComponent(threadId)}`;
|
|
125
130
|
}
|
|
126
131
|
|
|
127
|
-
function ChatThreadsSection() {
|
|
132
|
+
function ChatThreadsSection({ open }: { open: boolean }) {
|
|
128
133
|
const navigate = useNavigate();
|
|
129
134
|
const location = useLocation();
|
|
130
135
|
const t = useT();
|
|
@@ -228,36 +233,42 @@ function ChatThreadsSection() {
|
|
|
228
233
|
}
|
|
229
234
|
|
|
230
235
|
return (
|
|
231
|
-
<div
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
236
|
+
<div
|
|
237
|
+
className="an-chat-history-rail__collapse"
|
|
238
|
+
data-state={open ? "open" : "closed"}
|
|
239
|
+
aria-hidden={!open}
|
|
240
|
+
>
|
|
241
|
+
<div className="ms-4">
|
|
242
|
+
<ChatHistoryRail
|
|
243
|
+
items={chatItems}
|
|
244
|
+
activeId={displayedActiveThreadId}
|
|
245
|
+
onSelect={(threadId) => openThread(threadId)}
|
|
246
|
+
onNewChat={() => void handleNewChat()}
|
|
247
|
+
railLabels={{
|
|
248
|
+
newChat: t("chat.newChat"),
|
|
249
|
+
showMore: t("chat.chats"),
|
|
250
|
+
showLess: t("chat.chats"),
|
|
251
|
+
}}
|
|
252
|
+
renameMaxLength={160}
|
|
253
|
+
onTogglePin={(threadId) => {
|
|
254
|
+
const thread = visibleThreads.find((item) => item.id === threadId);
|
|
255
|
+
if (thread) void pinThread(threadId, !thread.pinnedAt);
|
|
256
|
+
}}
|
|
257
|
+
onRename={handleRenameThread}
|
|
258
|
+
onDelete={(threadId) => void handleArchiveThread(threadId)}
|
|
259
|
+
labels={{
|
|
260
|
+
options: (item) =>
|
|
261
|
+
t("chat.optionsFor", { title: item.titleText ?? "" }),
|
|
262
|
+
renameInput: (item) =>
|
|
263
|
+
t("chat.renameThread", { title: item.titleText ?? "" }),
|
|
264
|
+
rename: t("chat.renameChat"),
|
|
265
|
+
pin: t("chat.pinChat"),
|
|
266
|
+
unpin: t("chat.unpinChat"),
|
|
267
|
+
delete: t("chat.archiveChat"),
|
|
268
|
+
}}
|
|
269
|
+
className="min-w-0"
|
|
270
|
+
/>
|
|
271
|
+
</div>
|
|
261
272
|
</div>
|
|
262
273
|
);
|
|
263
274
|
}
|
|
@@ -279,14 +290,14 @@ export function Sidebar({
|
|
|
279
290
|
cn(
|
|
280
291
|
"flex items-center text-sm transition-colors",
|
|
281
292
|
collapsed
|
|
282
|
-
? "relative h-10 w-full justify-center rounded-none
|
|
293
|
+
? "relative h-10 w-full justify-center rounded-none px-0"
|
|
283
294
|
: "h-9 rounded-md gap-3 px-3",
|
|
284
295
|
isActive
|
|
285
296
|
? collapsed
|
|
286
|
-
? "
|
|
297
|
+
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
287
298
|
: "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
288
299
|
: collapsed
|
|
289
|
-
? "
|
|
300
|
+
? "text-sidebar-foreground/70 hover:bg-sidebar-accent/55 hover:text-sidebar-accent-foreground"
|
|
290
301
|
: "text-sidebar-foreground hover:bg-sidebar-accent/65 hover:text-sidebar-accent-foreground",
|
|
291
302
|
);
|
|
292
303
|
const collapseButton = collapsible ? (
|
|
@@ -315,6 +326,31 @@ export function Sidebar({
|
|
|
315
326
|
</TooltipContent>
|
|
316
327
|
</Tooltip>
|
|
317
328
|
) : null;
|
|
329
|
+
const searchButton = (
|
|
330
|
+
<Tooltip>
|
|
331
|
+
<TooltipTrigger asChild>
|
|
332
|
+
<button
|
|
333
|
+
type="button"
|
|
334
|
+
onClick={openCommandMenu}
|
|
335
|
+
aria-label={t("root.commandSearch")}
|
|
336
|
+
className="flex size-8 items-center justify-center rounded-md text-sidebar-foreground/65 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
337
|
+
>
|
|
338
|
+
<IconSearch className="size-4" />
|
|
339
|
+
</button>
|
|
340
|
+
</TooltipTrigger>
|
|
341
|
+
<TooltipContent side="right">{t("root.commandSearch")}</TooltipContent>
|
|
342
|
+
</Tooltip>
|
|
343
|
+
);
|
|
344
|
+
const translateButton = (
|
|
345
|
+
<LanguagePicker variant="ghost-icon" label={t("settings.languageLabel")} />
|
|
346
|
+
);
|
|
347
|
+
const feedbackButton = (
|
|
348
|
+
<FeedbackButton
|
|
349
|
+
variant={collapsed ? "icon" : "sidebar"}
|
|
350
|
+
side="right"
|
|
351
|
+
className={collapsed ? "h-8 w-8" : "min-w-0"}
|
|
352
|
+
/>
|
|
353
|
+
);
|
|
318
354
|
|
|
319
355
|
return (
|
|
320
356
|
<aside
|
|
@@ -409,8 +445,8 @@ export function Sidebar({
|
|
|
409
445
|
) : (
|
|
410
446
|
link
|
|
411
447
|
)}
|
|
412
|
-
{!collapsed && item.view === "chat"
|
|
413
|
-
<ChatThreadsSection />
|
|
448
|
+
{!collapsed && item.view === "chat" ? (
|
|
449
|
+
<ChatThreadsSection open={isChatRoute} />
|
|
414
450
|
) : null}
|
|
415
451
|
</div>
|
|
416
452
|
);
|
|
@@ -419,11 +455,38 @@ export function Sidebar({
|
|
|
419
455
|
</nav>
|
|
420
456
|
|
|
421
457
|
<div className={cn("mt-auto shrink-0", collapsed && "py-2")}>
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
458
|
+
<nav
|
|
459
|
+
className={cn(
|
|
460
|
+
"grid",
|
|
461
|
+
collapsed ? "gap-0 px-1 py-1" : "gap-1 px-2 py-1",
|
|
462
|
+
)}
|
|
463
|
+
>
|
|
464
|
+
{bottomNavItems.map((item) => {
|
|
465
|
+
const Icon = item.icon;
|
|
466
|
+
const isActive = location.pathname.startsWith(item.href);
|
|
467
|
+
const link = (
|
|
468
|
+
<Link
|
|
469
|
+
to={item.href}
|
|
470
|
+
className={navClass({ isActive })}
|
|
471
|
+
aria-current={isActive ? "page" : undefined}
|
|
472
|
+
aria-label={collapsed ? t(item.labelKey) : undefined}
|
|
473
|
+
>
|
|
474
|
+
<Icon className="size-4 shrink-0" />
|
|
475
|
+
<span className={collapsed ? "sr-only" : "truncate"}>
|
|
476
|
+
{t(item.labelKey)}
|
|
477
|
+
</span>
|
|
478
|
+
</Link>
|
|
479
|
+
);
|
|
480
|
+
return collapsed ? (
|
|
481
|
+
<Tooltip key={item.href}>
|
|
482
|
+
<TooltipTrigger asChild>{link}</TooltipTrigger>
|
|
483
|
+
<TooltipContent side="right">{t(item.labelKey)}</TooltipContent>
|
|
484
|
+
</Tooltip>
|
|
485
|
+
) : (
|
|
486
|
+
<div key={item.href}>{link}</div>
|
|
487
|
+
);
|
|
488
|
+
})}
|
|
489
|
+
</nav>
|
|
427
490
|
|
|
428
491
|
<div className={cn(collapsed ? "px-1 py-1" : "px-3 py-2")}>
|
|
429
492
|
<OrgSwitcher
|
|
@@ -436,14 +499,13 @@ export function Sidebar({
|
|
|
436
499
|
/>
|
|
437
500
|
</div>
|
|
438
501
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
) : null}
|
|
502
|
+
<SidebarFooterActions
|
|
503
|
+
collapsed={collapsed}
|
|
504
|
+
feedback={feedbackButton}
|
|
505
|
+
translate={translateButton}
|
|
506
|
+
search={searchButton}
|
|
507
|
+
collapse={collapseButton}
|
|
508
|
+
/>
|
|
447
509
|
</div>
|
|
448
510
|
</aside>
|
|
449
511
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Navigate } from "react-router";
|
|
2
2
|
|
|
3
3
|
import { APP_TITLE } from "@/lib/app-config";
|
|
4
4
|
|
|
@@ -7,5 +7,5 @@ export function meta() {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export default function ExtensionsRoute() {
|
|
10
|
-
return <
|
|
10
|
+
return <Navigate to="/settings#extensions" replace />;
|
|
11
11
|
}
|
|
@@ -76,6 +76,22 @@ Full source-code customization is a core Agent Native capability. Extensions
|
|
|
76
76
|
are the fast, sandboxed, no-deploy layer—not the limit of what the app can
|
|
77
77
|
become.
|
|
78
78
|
|
|
79
|
+
Use this decision rule when either path could solve the request:
|
|
80
|
+
|
|
81
|
+
- Start with an extension for a self-contained, relatively one-off widget,
|
|
82
|
+
custom visualization or interaction, dashboard tile, standalone utility, or
|
|
83
|
+
add-on in an existing slot.
|
|
84
|
+
- Use app code for a core template feature, native UI/layout/routes/business
|
|
85
|
+
logic, a new slot, or behavior that should be reused broadly across dashboards
|
|
86
|
+
or users.
|
|
87
|
+
- If the same extension keeps getting rebuilt, promote it into app code as one
|
|
88
|
+
reusable native feature instead of maintaining copies.
|
|
89
|
+
|
|
90
|
+
As a rule of thumb, if an extension can solve the problem, generally start
|
|
91
|
+
there. An isolated custom dashboard visualization belongs in an extension; a
|
|
92
|
+
new chart type that should be available across dashboards belongs in the
|
|
93
|
+
template code.
|
|
94
|
+
|
|
79
95
|
**When a user asks to "make an extension", "create an extension", or "build
|
|
80
96
|
a ... extension" (or the older phrasings "make a tool" / "create a tool"):**
|
|
81
97
|
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { trackingIdentityProperties } from "../observability/tracking-identity.js";
|
|
2
|
+
import type { CaptureErrorContext } from "../server/capture-error.js";
|
|
3
|
+
import { track } from "./registry.js";
|
|
4
|
+
|
|
5
|
+
export type TrackingExceptionLevel =
|
|
6
|
+
| "fatal"
|
|
7
|
+
| "error"
|
|
8
|
+
| "warning"
|
|
9
|
+
| "info"
|
|
10
|
+
| "debug";
|
|
11
|
+
|
|
12
|
+
export interface TrackingExceptionContext extends CaptureErrorContext {
|
|
13
|
+
/** Whether the caller handled the error. Server error hooks default false. */
|
|
14
|
+
handled?: boolean;
|
|
15
|
+
level?: TrackingExceptionLevel;
|
|
16
|
+
release?: string;
|
|
17
|
+
environment?: string;
|
|
18
|
+
runtime?: "node" | "cli";
|
|
19
|
+
source?: "server" | "cli";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const MAX_MESSAGE_LENGTH = 1000;
|
|
23
|
+
const MAX_STACK_LENGTH = 8000;
|
|
24
|
+
const MAX_TAGS = 30;
|
|
25
|
+
const MAX_EXTRA_KEYS = 30;
|
|
26
|
+
const MAX_EXTRA_VALUE_LENGTH = 1000;
|
|
27
|
+
const SECRET_RE = /\b(?:bearer|basic)\s+[^\s]+/gi;
|
|
28
|
+
const SECRET_KEY_RE =
|
|
29
|
+
/(?:authorization|cookie|set[-_]?cookie|token|secret|password|passwd|pwd|api[-_]?key|apikey|credential)/i;
|
|
30
|
+
|
|
31
|
+
function redact(value: string): string {
|
|
32
|
+
return value
|
|
33
|
+
.replace(SECRET_RE, (match) => `${match.split(/\s+/, 1)[0]} <redacted>`)
|
|
34
|
+
.replace(
|
|
35
|
+
/([A-Za-z0-9_$.-]*(?:authorization|cookie|token|secret|password|passwd|pwd|api[-_]?key|apikey|credential)[A-Za-z0-9_$.-]*\s*[:=]\s*)([^\s,;}]+)/gi,
|
|
36
|
+
"$1<redacted>",
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function boundedText(value: unknown, max: number): string {
|
|
41
|
+
const text = typeof value === "string" ? value : String(value ?? "");
|
|
42
|
+
const safe = redact(text);
|
|
43
|
+
return safe.length > max ? safe.slice(0, max) : safe;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function safeValue(value: unknown, depth = 2): unknown {
|
|
47
|
+
if (
|
|
48
|
+
value == null ||
|
|
49
|
+
typeof value === "boolean" ||
|
|
50
|
+
typeof value === "number"
|
|
51
|
+
) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
if (typeof value === "string")
|
|
55
|
+
return boundedText(value, MAX_EXTRA_VALUE_LENGTH);
|
|
56
|
+
if (depth <= 0) return boundedText(value, MAX_EXTRA_VALUE_LENGTH);
|
|
57
|
+
if (Array.isArray(value)) {
|
|
58
|
+
return value.slice(0, 20).map((item) => safeValue(item, depth - 1));
|
|
59
|
+
}
|
|
60
|
+
if (typeof value === "object") {
|
|
61
|
+
const out: Record<string, unknown> = {};
|
|
62
|
+
for (const [key, child] of Object.entries(value)) {
|
|
63
|
+
if (Object.keys(out).length >= MAX_EXTRA_KEYS) break;
|
|
64
|
+
const safeKey = boundedText(key, 100);
|
|
65
|
+
out[safeKey] = SECRET_KEY_RE.test(safeKey)
|
|
66
|
+
? "<redacted>"
|
|
67
|
+
: safeValue(child, depth - 1);
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
return boundedText(value, MAX_EXTRA_VALUE_LENGTH);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function exceptionParts(error: unknown): {
|
|
75
|
+
type: string;
|
|
76
|
+
message: string;
|
|
77
|
+
stack?: string;
|
|
78
|
+
} {
|
|
79
|
+
if (error instanceof Error) {
|
|
80
|
+
return {
|
|
81
|
+
type: boundedText(error.name || "Error", 200),
|
|
82
|
+
message: boundedText(
|
|
83
|
+
error.message || error.name || "Error",
|
|
84
|
+
MAX_MESSAGE_LENGTH,
|
|
85
|
+
),
|
|
86
|
+
...(error.stack
|
|
87
|
+
? { stack: boundedText(error.stack, MAX_STACK_LENGTH) }
|
|
88
|
+
: {}),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
type: "Error",
|
|
93
|
+
message: boundedText(error, MAX_MESSAGE_LENGTH),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function safeTags(
|
|
98
|
+
tags: Record<string, string | undefined> | undefined,
|
|
99
|
+
): Record<string, string> {
|
|
100
|
+
const out: Record<string, string> = {};
|
|
101
|
+
for (const [key, value] of Object.entries(tags ?? {})) {
|
|
102
|
+
if (Object.keys(out).length >= MAX_TAGS || value == null) break;
|
|
103
|
+
const safeKey = boundedText(key, 100);
|
|
104
|
+
out[safeKey] = SECRET_KEY_RE.test(safeKey)
|
|
105
|
+
? "<redacted>"
|
|
106
|
+
: boundedText(value, 200);
|
|
107
|
+
}
|
|
108
|
+
return out;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Emit a bounded, redacted Node/CLI exception through first-party tracking. */
|
|
112
|
+
export function captureException(
|
|
113
|
+
error: unknown,
|
|
114
|
+
context: TrackingExceptionContext = {},
|
|
115
|
+
): void {
|
|
116
|
+
try {
|
|
117
|
+
const parts = exceptionParts(error);
|
|
118
|
+
const tags = safeTags({
|
|
119
|
+
...context.tags,
|
|
120
|
+
...(context.route ? { route: context.route } : {}),
|
|
121
|
+
...(context.method ? { method: context.method } : {}),
|
|
122
|
+
...(context.userAgent ? { userAgent: context.userAgent } : {}),
|
|
123
|
+
});
|
|
124
|
+
const extra = safeValue({
|
|
125
|
+
...context.extra,
|
|
126
|
+
...(context.contexts ? { contexts: context.contexts } : {}),
|
|
127
|
+
});
|
|
128
|
+
track("$exception", {
|
|
129
|
+
...trackingIdentityProperties(),
|
|
130
|
+
exceptionType: parts.type,
|
|
131
|
+
exceptionMessage: parts.message,
|
|
132
|
+
...(parts.stack ? { exceptionStack: parts.stack } : {}),
|
|
133
|
+
handled: context.handled ?? true,
|
|
134
|
+
level: context.level ?? "error",
|
|
135
|
+
occurredAt: new Date().toISOString(),
|
|
136
|
+
runtime: context.runtime ?? "node",
|
|
137
|
+
source: context.source ?? "server",
|
|
138
|
+
...(context.route ? { url: boundedText(context.route, 500) } : {}),
|
|
139
|
+
...(context.release
|
|
140
|
+
? { release: boundedText(context.release, 200) }
|
|
141
|
+
: {}),
|
|
142
|
+
...(context.environment
|
|
143
|
+
? { environment: boundedText(context.environment, 100) }
|
|
144
|
+
: {}),
|
|
145
|
+
...(Object.keys(tags).length ? { exceptionTags: tags } : {}),
|
|
146
|
+
...(extra && typeof extra === "object" ? { exceptionExtra: extra } : {}),
|
|
147
|
+
});
|
|
148
|
+
} catch {
|
|
149
|
+
// Error reporting must never mask the original failure.
|
|
150
|
+
}
|
|
151
|
+
}
|
package/src/tracking/index.ts
CHANGED
|
@@ -7,4 +7,9 @@ export {
|
|
|
7
7
|
listTrackingProviders,
|
|
8
8
|
} from "./registry.js";
|
|
9
9
|
export { registerBuiltinProviders } from "./providers.js";
|
|
10
|
+
export {
|
|
11
|
+
captureException,
|
|
12
|
+
type TrackingExceptionContext,
|
|
13
|
+
type TrackingExceptionLevel,
|
|
14
|
+
} from "./error-capture.js";
|
|
10
15
|
export type { TrackingProvider, TrackingEvent } from "./types.js";
|
package/src/vite/client.ts
CHANGED
|
@@ -3066,6 +3066,12 @@ function createAgentNativeConfig(
|
|
|
3066
3066
|
"process.env.AGENT_NATIVE_BUILD_GA_MEASUREMENT_ID": JSON.stringify(
|
|
3067
3067
|
process.env.GA_MEASUREMENT_ID?.trim() || "",
|
|
3068
3068
|
),
|
|
3069
|
+
__AGENT_NATIVE_BUILD_GTM_CONTAINER_ID__: JSON.stringify(
|
|
3070
|
+
process.env.GTM_CONTAINER_ID?.trim() || "",
|
|
3071
|
+
),
|
|
3072
|
+
"process.env.AGENT_NATIVE_BUILD_GTM_CONTAINER_ID": JSON.stringify(
|
|
3073
|
+
process.env.GTM_CONTAINER_ID?.trim() || "",
|
|
3074
|
+
),
|
|
3069
3075
|
// Framework route warmup controls how SSR `.data` routes are fetched:
|
|
3070
3076
|
// ordinary fetches keep them CDN-cacheable, while native prefetch headers
|
|
3071
3077
|
// can be refused before the CDN/origin sees the request. Keep this value
|