@agent-native/core 0.90.11 → 0.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +22 -0
- package/corpus/core/docs/content/toolkit-settings.mdx +56 -3
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/agent/run-ownership.ts +29 -1
- package/corpus/core/src/changelog/parse.ts +78 -0
- package/corpus/core/src/chat-threads/schema.ts +43 -0
- package/corpus/core/src/chat-threads/store.ts +144 -12
- package/corpus/core/src/cli/workspace-dev.ts +25 -5
- package/corpus/core/src/client/AgentPanel.tsx +79 -14
- package/corpus/core/src/client/AssistantChat.tsx +359 -425
- package/corpus/core/src/client/analytics-session.ts +70 -0
- package/corpus/core/src/client/analytics.ts +175 -49
- package/corpus/core/src/client/chat/message-components.tsx +22 -2
- package/corpus/core/src/client/components/ui/message-scroller.tsx +131 -0
- package/corpus/core/src/client/conversation/AgentConversation.tsx +63 -41
- package/corpus/core/src/client/error-capture.ts +616 -0
- package/corpus/core/src/client/index.ts +12 -0
- package/corpus/core/src/client/session-replay.ts +57 -7
- package/corpus/core/src/client/settings/SettingsPanel.tsx +123 -1
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +292 -45
- package/corpus/core/src/client/settings/index.ts +1 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +14 -11
- package/corpus/core/src/client/sharing/ShareDialog.tsx +13 -10
- package/corpus/core/src/mcp/builtin-tools.ts +29 -2
- package/corpus/core/src/server/agent-chat-plugin.ts +174 -79
- package/corpus/core/src/server/onboarding-html.ts +28 -16
- package/corpus/core/src/sharing/actions/list-resource-shares.ts +45 -1
- package/corpus/core/src/sharing/actions/share-resource.ts +9 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
- package/corpus/core/src/vite/client.ts +217 -35
- package/corpus/templates/analytics/.agents/skills/adhoc-analysis/SKILL.md +8 -7
- package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +14 -10
- package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +15 -15
- package/corpus/templates/analytics/.agents/skills/cross-source-analysis/SKILL.md +1 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +38 -22
- package/corpus/templates/analytics/.agents/skills/data-programs/SKILL.md +114 -61
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +1 -0
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +7 -7
- package/corpus/templates/analytics/.agents/skills/hubspot/SKILL.md +1 -0
- package/corpus/templates/analytics/.agents/skills/prometheus/SKILL.md +1 -1
- package/corpus/templates/analytics/.builder/skills/bigquery/SKILL.md +17 -17
- package/corpus/templates/analytics/.builder/skills/gcloud/SKILL.md +5 -5
- package/corpus/templates/analytics/.builder/skills/github/SKILL.md +7 -7
- package/corpus/templates/analytics/.builder/skills/gong/SKILL.md +12 -12
- package/corpus/templates/analytics/.builder/skills/grafana/SKILL.md +7 -7
- package/corpus/templates/analytics/.builder/skills/sentry/SKILL.md +7 -7
- package/corpus/templates/analytics/.builder/skills/slack/SKILL.md +6 -6
- package/corpus/templates/analytics/.builder/skills/stripe/SKILL.md +7 -7
- package/corpus/templates/analytics/AGENTS.md +47 -2
- package/corpus/templates/analytics/actions/add-status-page-monitor.ts +36 -0
- package/corpus/templates/analytics/actions/capture-test-error.ts +33 -0
- package/corpus/templates/analytics/actions/delete-monitor.ts +24 -0
- package/corpus/templates/analytics/actions/delete-status-page.ts +23 -0
- package/corpus/templates/analytics/actions/get-error-issue.ts +36 -0
- package/corpus/templates/analytics/actions/get-monitor-stats.ts +55 -0
- package/corpus/templates/analytics/actions/get-monitor.ts +27 -0
- package/corpus/templates/analytics/actions/get-public-status-page.ts +41 -0
- package/corpus/templates/analytics/actions/get-status-page.ts +29 -0
- package/corpus/templates/analytics/actions/list-error-issues.ts +40 -0
- package/corpus/templates/analytics/actions/list-monitors.ts +21 -0
- package/corpus/templates/analytics/actions/list-status-pages.ts +21 -0
- package/corpus/templates/analytics/actions/match-error-issues.ts +51 -0
- package/corpus/templates/analytics/actions/navigate.ts +58 -4
- package/corpus/templates/analytics/actions/remove-status-page-monitor.ts +22 -0
- package/corpus/templates/analytics/actions/reorder-status-page-monitors.ts +25 -0
- package/corpus/templates/analytics/actions/resolve-error-issue.ts +38 -0
- package/corpus/templates/analytics/actions/run-monitor-check.ts +23 -0
- package/corpus/templates/analytics/actions/save-analysis.ts +1 -0
- package/corpus/templates/analytics/actions/save-monitor.ts +145 -0
- package/corpus/templates/analytics/actions/save-status-page.ts +47 -0
- package/corpus/templates/analytics/actions/view-screen.ts +212 -0
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +10 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +134 -39
- package/corpus/templates/analytics/app/components/monitoring/PublicStatusView.tsx +351 -0
- package/corpus/templates/analytics/app/components/monitoring/ResponseTimeChart.tsx +174 -0
- package/corpus/templates/analytics/app/components/monitoring/UptimeStatCards.tsx +85 -0
- package/corpus/templates/analytics/app/components/monitoring/UptimeTimelineBars.tsx +106 -0
- package/corpus/templates/analytics/app/components/monitoring/chart-utils.ts +101 -0
- package/corpus/templates/analytics/app/components/monitoring/index.ts +28 -0
- package/corpus/templates/analytics/app/components/monitoring/types.ts +42 -0
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +34 -0
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +6 -0
- package/corpus/templates/analytics/app/i18n-data.ts +33 -0
- package/corpus/templates/analytics/app/pages/DataSources.tsx +28 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +77 -9
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +3 -3
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dashboard-layout.ts +7 -0
- package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +205 -0
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +100 -0
- package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +475 -0
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +372 -0
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +360 -0
- package/corpus/templates/analytics/app/pages/monitoring/errors/Sparkline.tsx +55 -0
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +106 -0
- package/corpus/templates/analytics/app/pages/monitoring/errors/types.ts +75 -0
- package/corpus/templates/analytics/app/pages/monitoring/errors/utils.ts +132 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +535 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +1026 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorList.tsx +311 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +235 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +661 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +355 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +106 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/slug.ts +24 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/types.ts +20 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-summary.ts +87 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +161 -0
- package/corpus/templates/analytics/app/pages/monitoring/uptime/utils.ts +210 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +76 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +74 -9
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +197 -20
- package/corpus/templates/analytics/app/root.tsx +33 -1
- package/corpus/templates/analytics/app/routes/monitoring._index.tsx +10 -0
- package/corpus/templates/analytics/app/routes/status.$slug.tsx +118 -0
- package/corpus/templates/analytics/changelog/2026-07-08-add-uptime-monitors-that-ping-your-urls-and-alert-you-when-t.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-analytics-chats-keep-large-data-dictionaries-compact-so-prov.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-create-public-status-pages-that-share-the-live-health-of-cho.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-extension-panels-use-clearer-open-copy.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-error-capture.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-fixed-single-panel-dashboard-drags-so-they-no-longer-rewrite.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-jump-straight-from-an-error-in-a-session-recording-to-its-fu.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-monitor-detail-and-list-now-show-colorful-uptime-timelines-r.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-pinned-ask-chats-now-show-a-pin-icon-in-the-sidebar.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-publish-a-public-uptime-status-page-with-colorful-uptime-tim.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sessions-now-hide-visitor-emails-in-demo-mode-and-show-clean.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +5 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +5 -0
- package/corpus/templates/analytics/changelog/2026-07-08-the-uptime-monitor-list-now-has-a-current-status-overview-wi.md +6 -0
- package/corpus/templates/analytics/docs/error-capture.md +172 -0
- package/corpus/templates/analytics/docs/uptime-monitoring.md +150 -0
- package/corpus/templates/analytics/server/db/schema-errors.ts +150 -0
- package/corpus/templates/analytics/server/db/schema-monitoring.ts +177 -0
- package/corpus/templates/analytics/server/db/schema.ts +6 -0
- package/corpus/templates/analytics/server/jobs/uptime-monitors.ts +123 -0
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +41 -0
- package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +55 -12
- package/corpus/templates/analytics/server/lib/error-capture.ts +1331 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +47 -1
- package/corpus/templates/analytics/server/lib/monitor-stats.ts +494 -0
- package/corpus/templates/analytics/server/lib/status-pages.ts +798 -0
- package/corpus/templates/analytics/server/lib/uptime-monitors.ts +1665 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +7 -37
- package/corpus/templates/analytics/server/plugins/auth.ts +11 -1
- package/corpus/templates/analytics/server/plugins/db.ts +408 -0
- package/corpus/templates/analytics/server/plugins/uptime-monitor-jobs.ts +63 -0
- package/corpus/templates/assets/app/routes/_index.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.tsx +22 -1
- package/corpus/templates/assets/changelog/2026-07-08-recent-drafts-keep-comfortable-side-padding.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/brain/app/routes/settings.tsx +43 -5
- package/corpus/templates/brain/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/calendar/app/pages/Settings.tsx +44 -6
- package/corpus/templates/calendar/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/chat/app/routes/settings.tsx +16 -1
- package/corpus/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +79 -37
- package/corpus/templates/clips/app/components/player/player-controls.tsx +35 -0
- package/corpus/templates/clips/app/components/player/video-player.tsx +162 -18
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +63 -6
- package/corpus/templates/clips/app/routes/record.tsx +18 -1
- package/corpus/templates/clips/changelog/2026-07-07-shared-clips-start-playback-reliably-from-the-first-play-click.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-camera-and-microphone-menus-now-show-which-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-copies-new-clip-links-after-saving.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-recordings-now-continue-after-granting-came.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-mobile-shared-clips-now-have-loom-style-tap-and-skip-controls.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-recordings-and-uploads-copy-links-after-saving.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-settings-are-cleaner-searchable-and-collapse-s3-with-builder.md +5 -0
- package/corpus/templates/clips/changelog/2026-07-08-transcripts-are-more-reliable-for-longer-desktop-recordings-.md +6 -0
- package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +162 -13
- package/corpus/templates/clips/chrome-extension/src/content-script.ts +14 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +36 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +99 -25
- package/corpus/templates/clips/chrome-extension/src/permission.ts +63 -14
- package/corpus/templates/clips/chrome-extension/src/popup.ts +123 -23
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +47 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +33 -4
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +214 -29
- package/corpus/templates/content/actions/attach-content-database-source.ts +3 -0
- package/corpus/templates/content/actions/change-content-database-source-role.ts +1 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +42 -32
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +352 -81
- package/corpus/templates/content/app/components/editor/database/settings.tsx +49 -24
- package/corpus/templates/content/app/routes/_app.settings.tsx +19 -1
- package/corpus/templates/content/changelog/2026-07-07-builder-source-tag-fields-now-import-as-multi-select.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/content/shared/api.ts +3 -0
- package/corpus/templates/content/shared/properties.ts +42 -0
- package/corpus/templates/design/actions/generate-design.ts +3 -0
- package/corpus/templates/design/actions/get-design-system.ts +147 -1
- package/corpus/templates/design/app/routes/settings.tsx +16 -1
- package/corpus/templates/design/changelog/2026-07-08-design-generation-now-follows-hydrated-builder-design-system.md +6 -0
- package/corpus/templates/design/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/dispatch/app/routes/settings.tsx +23 -2
- package/corpus/templates/dispatch/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/forms/app/routes/_app.settings.tsx +16 -1
- package/corpus/templates/forms/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/macros/app/routes/settings.tsx +16 -1
- package/corpus/templates/macros/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
- package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +123 -105
- package/corpus/templates/mail/changelog/2026-07-08-settings-redesigned-with-a-consistent-searchable-layout.md +5 -0
- package/corpus/templates/plan/app/routes/settings.tsx +23 -2
- package/corpus/templates/plan/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/slides/actions/add-slide.ts +1 -0
- package/corpus/templates/slides/actions/get-design-system.ts +147 -1
- package/corpus/templates/slides/app/pages/Index.tsx +46 -1
- package/corpus/templates/slides/app/routes/settings.tsx +16 -1
- package/corpus/templates/slides/changelog/2026-07-08-deck-generation-now-follows-hydrated-builder-design-system-g.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/dist/agent/run-ownership.d.ts +6 -0
- package/dist/agent/run-ownership.d.ts.map +1 -1
- package/dist/agent/run-ownership.js +11 -1
- package/dist/agent/run-ownership.js.map +1 -1
- package/dist/changelog/parse.d.ts +7 -0
- package/dist/changelog/parse.d.ts.map +1 -1
- package/dist/changelog/parse.js +64 -0
- package/dist/changelog/parse.js.map +1 -1
- package/dist/chat-threads/schema.d.ts +445 -0
- package/dist/chat-threads/schema.d.ts.map +1 -0
- package/dist/chat-threads/schema.js +39 -0
- package/dist/chat-threads/schema.js.map +1 -0
- package/dist/chat-threads/store.d.ts +12 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +99 -10
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/workspace-dev.d.ts.map +1 -1
- package/dist/cli/workspace-dev.js +20 -5
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +35 -7
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +105 -183
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/analytics-session.d.ts +3 -0
- package/dist/client/analytics-session.d.ts.map +1 -0
- package/dist/client/analytics-session.js +66 -0
- package/dist/client/analytics-session.js.map +1 -0
- package/dist/client/analytics.d.ts +32 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +116 -46
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +2 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +16 -6
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/components/ui/message-scroller.d.ts +16 -0
- package/dist/client/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/client/components/ui/message-scroller.js +25 -0
- package/dist/client/components/ui/message-scroller.js.map +1 -0
- package/dist/client/conversation/AgentConversation.d.ts +1 -1
- package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
- package/dist/client/conversation/AgentConversation.js +3 -8
- package/dist/client/conversation/AgentConversation.js.map +1 -1
- package/dist/client/error-capture.d.ts +99 -0
- package/dist/client/error-capture.d.ts.map +1 -0
- package/dist/client/error-capture.js +437 -0
- package/dist/client/error-capture.js.map +1 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/session-replay.d.ts +22 -0
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +45 -4
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +100 -5
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts +49 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +131 -19
- package/dist/client/settings/SettingsTabsPage.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.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +13 -8
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
- package/dist/client/sharing/ShareDialog.js +12 -7
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/mcp/builtin-tools.d.ts.map +1 -1
- package/dist/mcp/builtin-tools.js +21 -2
- package/dist/mcp/builtin-tools.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/org/schema.d.ts +15 -15
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +109 -73
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +28 -16
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/sharing/actions/list-resource-shares.js +30 -1
- package/dist/sharing/actions/list-resource-shares.js.map +1 -1
- package/dist/sharing/actions/share-resource.js +6 -0
- package/dist/sharing/actions/share-resource.js.map +1 -1
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
- package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +192 -30
- package/dist/vite/client.js.map +1 -1
- package/docs/content/toolkit-settings.mdx +56 -3
- package/package.json +2 -1
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
- package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { CodeSurface } from "@agent-native/core/blocks";
|
|
2
|
+
import {
|
|
3
|
+
IconAlertTriangle,
|
|
4
|
+
IconBug,
|
|
5
|
+
IconCode,
|
|
6
|
+
IconExternalLink,
|
|
7
|
+
IconRefresh,
|
|
8
|
+
IconSearch,
|
|
9
|
+
IconUsers,
|
|
10
|
+
} from "@tabler/icons-react";
|
|
11
|
+
|
|
12
|
+
import { Button } from "@/components/ui/button";
|
|
13
|
+
import { Card, CardContent } from "@/components/ui/card";
|
|
14
|
+
import { Input } from "@/components/ui/input";
|
|
15
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
16
|
+
import { cn } from "@/lib/utils";
|
|
17
|
+
|
|
18
|
+
import { fmt, useErrorsT } from "./i18n";
|
|
19
|
+
import { Sparkline } from "./Sparkline";
|
|
20
|
+
import type { ErrorIssueSummary, StatusFilter } from "./types";
|
|
21
|
+
import {
|
|
22
|
+
formatNumber,
|
|
23
|
+
formatRelativeTime,
|
|
24
|
+
levelAccentClass,
|
|
25
|
+
levelBadgeClass,
|
|
26
|
+
statusBadgeClass,
|
|
27
|
+
useLevelLabel,
|
|
28
|
+
useStatusLabel,
|
|
29
|
+
} from "./utils";
|
|
30
|
+
|
|
31
|
+
const ERROR_CAPTURE_DOCS_URL =
|
|
32
|
+
"https://www.agent-native.com/docs/tracking#error-capture";
|
|
33
|
+
|
|
34
|
+
const ERROR_CAPTURE_SNIPPET = `// Agent Native templates already call configureTracking().
|
|
35
|
+
import { configureTracking, captureException } from "@agent-native/core/client";
|
|
36
|
+
|
|
37
|
+
configureTracking({
|
|
38
|
+
key: "anpk_...",
|
|
39
|
+
endpoint: "https://analytics.example.com/api/analytics/track",
|
|
40
|
+
// Auto-captures window.onerror + unhandledrejection and links each
|
|
41
|
+
// error to the session replay it happened in. On by default when a
|
|
42
|
+
// public key is set; pass errorCapture: false to opt out.
|
|
43
|
+
errorCapture: true,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// Manual, Sentry-style capture anywhere in your app:
|
|
47
|
+
try {
|
|
48
|
+
risky();
|
|
49
|
+
} catch (err) {
|
|
50
|
+
captureException(err, { tags: { area: "checkout" } });
|
|
51
|
+
}`;
|
|
52
|
+
|
|
53
|
+
const STATUS_TABS: StatusFilter[] = [
|
|
54
|
+
"unresolved",
|
|
55
|
+
"resolved",
|
|
56
|
+
"ignored",
|
|
57
|
+
"all",
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
export function IssueList({
|
|
61
|
+
issues,
|
|
62
|
+
isLoading,
|
|
63
|
+
status,
|
|
64
|
+
onStatusChange,
|
|
65
|
+
search,
|
|
66
|
+
onSearchChange,
|
|
67
|
+
onRefresh,
|
|
68
|
+
isFetching,
|
|
69
|
+
onSelect,
|
|
70
|
+
onSendTestError,
|
|
71
|
+
sendingTest,
|
|
72
|
+
error,
|
|
73
|
+
}: {
|
|
74
|
+
issues: ErrorIssueSummary[];
|
|
75
|
+
isLoading: boolean;
|
|
76
|
+
status: StatusFilter;
|
|
77
|
+
onStatusChange: (status: StatusFilter) => void;
|
|
78
|
+
search: string;
|
|
79
|
+
onSearchChange: (value: string) => void;
|
|
80
|
+
onRefresh: () => void;
|
|
81
|
+
isFetching: boolean;
|
|
82
|
+
onSelect: (id: string) => void;
|
|
83
|
+
onSendTestError: () => void;
|
|
84
|
+
sendingTest: boolean;
|
|
85
|
+
error?: string | null;
|
|
86
|
+
}) {
|
|
87
|
+
const t = useErrorsT();
|
|
88
|
+
|
|
89
|
+
const tabLabel = (tab: StatusFilter): string => {
|
|
90
|
+
switch (tab) {
|
|
91
|
+
case "unresolved":
|
|
92
|
+
return t.tabUnresolved;
|
|
93
|
+
case "resolved":
|
|
94
|
+
return t.tabResolved;
|
|
95
|
+
case "ignored":
|
|
96
|
+
return t.tabIgnored;
|
|
97
|
+
default:
|
|
98
|
+
return t.tabAll;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<div className="space-y-4">
|
|
104
|
+
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
105
|
+
<div
|
|
106
|
+
className="inline-flex rounded-lg border border-border/60 bg-muted/20 p-0.5"
|
|
107
|
+
role="tablist"
|
|
108
|
+
>
|
|
109
|
+
{STATUS_TABS.map((tab) => (
|
|
110
|
+
<button
|
|
111
|
+
key={tab}
|
|
112
|
+
type="button"
|
|
113
|
+
role="tab"
|
|
114
|
+
aria-selected={status === tab}
|
|
115
|
+
onClick={() => onStatusChange(tab)}
|
|
116
|
+
className={cn(
|
|
117
|
+
"rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
118
|
+
status === tab
|
|
119
|
+
? "bg-background text-foreground shadow-sm"
|
|
120
|
+
: "text-muted-foreground hover:text-foreground",
|
|
121
|
+
)}
|
|
122
|
+
>
|
|
123
|
+
{tabLabel(tab)}
|
|
124
|
+
</button>
|
|
125
|
+
))}
|
|
126
|
+
</div>
|
|
127
|
+
<div className="flex items-center gap-2">
|
|
128
|
+
<div className="relative sm:w-64">
|
|
129
|
+
<IconSearch className="pointer-events-none absolute start-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground/60" />
|
|
130
|
+
<Input
|
|
131
|
+
type="search"
|
|
132
|
+
value={search}
|
|
133
|
+
onChange={(e) => onSearchChange(e.target.value)}
|
|
134
|
+
placeholder={t.searchPlaceholder}
|
|
135
|
+
className="ps-8"
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
<Button
|
|
139
|
+
variant="outline"
|
|
140
|
+
size="sm"
|
|
141
|
+
onClick={onRefresh}
|
|
142
|
+
aria-label={t.refresh}
|
|
143
|
+
>
|
|
144
|
+
<IconRefresh
|
|
145
|
+
className={cn("size-3.5", isFetching && "animate-spin")}
|
|
146
|
+
/>
|
|
147
|
+
</Button>
|
|
148
|
+
<Button
|
|
149
|
+
variant="outline"
|
|
150
|
+
size="sm"
|
|
151
|
+
onClick={onSendTestError}
|
|
152
|
+
disabled={sendingTest}
|
|
153
|
+
>
|
|
154
|
+
<IconBug className="size-3.5" />
|
|
155
|
+
{sendingTest ? t.sending : t.sendTestError}
|
|
156
|
+
</Button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
{error ? (
|
|
161
|
+
<Card>
|
|
162
|
+
<CardContent className="p-6 text-sm text-destructive">
|
|
163
|
+
{fmt(t.loadFailed, { message: error })}
|
|
164
|
+
</CardContent>
|
|
165
|
+
</Card>
|
|
166
|
+
) : isLoading ? (
|
|
167
|
+
<IssueListSkeleton />
|
|
168
|
+
) : issues.length === 0 ? (
|
|
169
|
+
<EmptyState
|
|
170
|
+
filtered={status !== "unresolved" || search.trim().length > 0}
|
|
171
|
+
onSendTestError={onSendTestError}
|
|
172
|
+
sendingTest={sendingTest}
|
|
173
|
+
/>
|
|
174
|
+
) : (
|
|
175
|
+
<Card>
|
|
176
|
+
<CardContent className="p-0">
|
|
177
|
+
<ul className="divide-y divide-border/60">
|
|
178
|
+
{issues.map((issue) => (
|
|
179
|
+
<IssueRow key={issue.id} issue={issue} onSelect={onSelect} />
|
|
180
|
+
))}
|
|
181
|
+
</ul>
|
|
182
|
+
</CardContent>
|
|
183
|
+
</Card>
|
|
184
|
+
)}
|
|
185
|
+
</div>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function IssueRow({
|
|
190
|
+
issue,
|
|
191
|
+
onSelect,
|
|
192
|
+
}: {
|
|
193
|
+
issue: ErrorIssueSummary;
|
|
194
|
+
onSelect: (id: string) => void;
|
|
195
|
+
}) {
|
|
196
|
+
const t = useErrorsT();
|
|
197
|
+
const levelLabel = useLevelLabel();
|
|
198
|
+
const statusLabel = useStatusLabel();
|
|
199
|
+
|
|
200
|
+
return (
|
|
201
|
+
<li className="relative">
|
|
202
|
+
<button
|
|
203
|
+
type="button"
|
|
204
|
+
onClick={() => onSelect(issue.id)}
|
|
205
|
+
className="flex w-full items-center gap-4 py-3 pe-4 ps-5 text-left transition-colors hover:bg-muted/35 focus-visible:bg-muted/35 focus-visible:outline-none"
|
|
206
|
+
>
|
|
207
|
+
<span
|
|
208
|
+
className={cn(
|
|
209
|
+
"absolute inset-y-2 start-0 w-1 rounded-full",
|
|
210
|
+
levelAccentClass(issue.level),
|
|
211
|
+
)}
|
|
212
|
+
/>
|
|
213
|
+
<span className="min-w-0 flex-1">
|
|
214
|
+
<span className="flex items-center gap-2">
|
|
215
|
+
<span
|
|
216
|
+
className={cn(
|
|
217
|
+
"inline-flex shrink-0 items-center rounded border px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide",
|
|
218
|
+
levelBadgeClass(issue.level),
|
|
219
|
+
)}
|
|
220
|
+
>
|
|
221
|
+
{issue.type}
|
|
222
|
+
</span>
|
|
223
|
+
<span className="truncate text-sm font-semibold text-foreground">
|
|
224
|
+
{stripTypePrefix(issue.title, issue.type)}
|
|
225
|
+
</span>
|
|
226
|
+
</span>
|
|
227
|
+
<span className="mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted-foreground">
|
|
228
|
+
{issue.culprit ? (
|
|
229
|
+
<span className="truncate font-mono">{issue.culprit}</span>
|
|
230
|
+
) : null}
|
|
231
|
+
{issue.app ? <span>· {issue.app}</span> : null}
|
|
232
|
+
<span>
|
|
233
|
+
·{" "}
|
|
234
|
+
{fmt(t.lastSeen, { time: formatRelativeTime(issue.lastSeenAt) })}
|
|
235
|
+
</span>
|
|
236
|
+
</span>
|
|
237
|
+
</span>
|
|
238
|
+
|
|
239
|
+
<Sparkline
|
|
240
|
+
data={issue.sparkline}
|
|
241
|
+
className="hidden shrink-0 sm:block"
|
|
242
|
+
/>
|
|
243
|
+
|
|
244
|
+
<span className="hidden w-16 shrink-0 flex-col items-end md:flex">
|
|
245
|
+
<span className="text-sm font-semibold text-foreground">
|
|
246
|
+
{formatNumber(issue.eventCount)}
|
|
247
|
+
</span>
|
|
248
|
+
<span className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
249
|
+
{t.events}
|
|
250
|
+
</span>
|
|
251
|
+
</span>
|
|
252
|
+
<span className="hidden w-16 shrink-0 flex-col items-end lg:flex">
|
|
253
|
+
<span className="inline-flex items-center gap-1 text-sm font-semibold text-foreground">
|
|
254
|
+
<IconUsers className="size-3.5 text-muted-foreground" />
|
|
255
|
+
{formatNumber(issue.usersAffected)}
|
|
256
|
+
</span>
|
|
257
|
+
<span className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
258
|
+
{t.users}
|
|
259
|
+
</span>
|
|
260
|
+
</span>
|
|
261
|
+
|
|
262
|
+
<span
|
|
263
|
+
className={cn(
|
|
264
|
+
"inline-flex shrink-0 items-center rounded-full border px-2 py-0.5 text-[11px] font-medium",
|
|
265
|
+
statusBadgeClass(issue.status),
|
|
266
|
+
)}
|
|
267
|
+
>
|
|
268
|
+
{statusLabel(issue.status)}
|
|
269
|
+
</span>
|
|
270
|
+
{levelLabel(issue.level) ? (
|
|
271
|
+
<span className="sr-only">{levelLabel(issue.level)}</span>
|
|
272
|
+
) : null}
|
|
273
|
+
</button>
|
|
274
|
+
</li>
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function EmptyState({
|
|
279
|
+
filtered,
|
|
280
|
+
onSendTestError,
|
|
281
|
+
sendingTest,
|
|
282
|
+
}: {
|
|
283
|
+
filtered: boolean;
|
|
284
|
+
onSendTestError: () => void;
|
|
285
|
+
sendingTest: boolean;
|
|
286
|
+
}) {
|
|
287
|
+
const t = useErrorsT();
|
|
288
|
+
|
|
289
|
+
if (filtered) {
|
|
290
|
+
return (
|
|
291
|
+
<Card>
|
|
292
|
+
<CardContent className="flex flex-col items-center gap-2 py-14 text-center">
|
|
293
|
+
<IconAlertTriangle className="size-6 text-muted-foreground/60" />
|
|
294
|
+
<p className="text-sm text-muted-foreground">{t.emptySearch}</p>
|
|
295
|
+
</CardContent>
|
|
296
|
+
</Card>
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return (
|
|
301
|
+
<Card>
|
|
302
|
+
<CardContent className="grid gap-6 p-6 lg:grid-cols-2 lg:p-8">
|
|
303
|
+
<div className="flex flex-col justify-center gap-3">
|
|
304
|
+
<div className="flex size-10 items-center justify-center rounded-md border bg-muted/40">
|
|
305
|
+
<IconAlertTriangle className="size-5 text-primary" />
|
|
306
|
+
</div>
|
|
307
|
+
<div className="space-y-2">
|
|
308
|
+
<h2 className="text-lg font-semibold">{t.emptyTitle}</h2>
|
|
309
|
+
<p className="max-w-xl text-sm text-muted-foreground">
|
|
310
|
+
{t.emptyDescription}
|
|
311
|
+
</p>
|
|
312
|
+
</div>
|
|
313
|
+
<div className="flex flex-wrap items-center gap-2 pt-1">
|
|
314
|
+
<Button size="sm" onClick={onSendTestError} disabled={sendingTest}>
|
|
315
|
+
<IconBug className="size-3.5" />
|
|
316
|
+
{sendingTest ? t.sending : t.sendTestError}
|
|
317
|
+
</Button>
|
|
318
|
+
<Button asChild variant="ghost" size="sm">
|
|
319
|
+
<a href={ERROR_CAPTURE_DOCS_URL} target="_blank" rel="noreferrer">
|
|
320
|
+
{t.docs}
|
|
321
|
+
<IconExternalLink className="size-3.5" />
|
|
322
|
+
</a>
|
|
323
|
+
</Button>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
<div className="overflow-hidden rounded-md border bg-muted/30">
|
|
327
|
+
<div className="flex items-center gap-2 border-b px-4 py-3 text-sm font-medium">
|
|
328
|
+
<IconCode className="size-4 text-muted-foreground" />
|
|
329
|
+
<span className="truncate">{t.installTitle}</span>
|
|
330
|
+
</div>
|
|
331
|
+
<CodeSurface
|
|
332
|
+
code={ERROR_CAPTURE_SNIPPET}
|
|
333
|
+
language="typescript"
|
|
334
|
+
maxLines={null}
|
|
335
|
+
showLanguageLabel={false}
|
|
336
|
+
className="mt-0"
|
|
337
|
+
/>
|
|
338
|
+
</div>
|
|
339
|
+
</CardContent>
|
|
340
|
+
</Card>
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function IssueListSkeleton() {
|
|
345
|
+
return (
|
|
346
|
+
<Card>
|
|
347
|
+
<CardContent className="space-y-3 p-6">
|
|
348
|
+
{Array.from({ length: 6 }).map((_, index) => (
|
|
349
|
+
<Skeleton key={index} className="h-12 w-full" />
|
|
350
|
+
))}
|
|
351
|
+
</CardContent>
|
|
352
|
+
</Card>
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/** Issue titles are "Type: message"; the type is shown as a badge already. */
|
|
357
|
+
function stripTypePrefix(title: string, type: string): string {
|
|
358
|
+
const prefix = `${type}: `;
|
|
359
|
+
return title.startsWith(prefix) ? title.slice(prefix.length) : title;
|
|
360
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useId } from "react";
|
|
2
|
+
import { Area, AreaChart, ResponsiveContainer } from "recharts";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Tiny inline volume sparkline for an issue row. Purely decorative — no axes,
|
|
6
|
+
* tooltip, or interaction — so it stays legible at ~100x28px.
|
|
7
|
+
*/
|
|
8
|
+
export function Sparkline({
|
|
9
|
+
data,
|
|
10
|
+
className,
|
|
11
|
+
color = "hsl(var(--primary))",
|
|
12
|
+
}: {
|
|
13
|
+
data: number[];
|
|
14
|
+
className?: string;
|
|
15
|
+
color?: string;
|
|
16
|
+
}) {
|
|
17
|
+
const gradientId = useId().replace(/:/g, "");
|
|
18
|
+
const points = (data.length ? data : [0]).map((value, index) => ({
|
|
19
|
+
index,
|
|
20
|
+
value: Number.isFinite(value) ? value : 0,
|
|
21
|
+
}));
|
|
22
|
+
const hasVolume = points.some((point) => point.value > 0);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div
|
|
26
|
+
className={className}
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
style={{ width: 96, height: 28 }}
|
|
29
|
+
>
|
|
30
|
+
<ResponsiveContainer width="100%" height="100%">
|
|
31
|
+
<AreaChart
|
|
32
|
+
data={points}
|
|
33
|
+
margin={{ top: 2, right: 0, bottom: 2, left: 0 }}
|
|
34
|
+
>
|
|
35
|
+
<defs>
|
|
36
|
+
<linearGradient id={gradientId} x1="0" y1="0" x2="0" y2="1">
|
|
37
|
+
<stop offset="0%" stopColor={color} stopOpacity={0.35} />
|
|
38
|
+
<stop offset="100%" stopColor={color} stopOpacity={0} />
|
|
39
|
+
</linearGradient>
|
|
40
|
+
</defs>
|
|
41
|
+
<Area
|
|
42
|
+
type="monotone"
|
|
43
|
+
dataKey="value"
|
|
44
|
+
stroke={color}
|
|
45
|
+
strokeWidth={1.5}
|
|
46
|
+
strokeOpacity={hasVolume ? 1 : 0.35}
|
|
47
|
+
fill={`url(#${gradientId})`}
|
|
48
|
+
isAnimationActive={false}
|
|
49
|
+
dot={false}
|
|
50
|
+
/>
|
|
51
|
+
</AreaChart>
|
|
52
|
+
</ResponsiveContainer>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-contained i18n for the Error capture feature. English is the source of
|
|
3
|
+
* truth; other locales fall back to English per key. Do NOT move these into the
|
|
4
|
+
* shared app i18n — this feature owns its copy.
|
|
5
|
+
*/
|
|
6
|
+
import { useLocale } from "@agent-native/core/client";
|
|
7
|
+
|
|
8
|
+
const MESSAGES = {
|
|
9
|
+
"en-US": {
|
|
10
|
+
// Toolbar / list
|
|
11
|
+
searchPlaceholder: "Search errors…", // i18n-ignore feature-local i18n source
|
|
12
|
+
refresh: "Refresh",
|
|
13
|
+
sendTestError: "Send test error",
|
|
14
|
+
sending: "Sending…",
|
|
15
|
+
// Filter tabs
|
|
16
|
+
tabUnresolved: "Unresolved",
|
|
17
|
+
tabResolved: "Resolved",
|
|
18
|
+
tabIgnored: "Ignored",
|
|
19
|
+
tabAll: "All",
|
|
20
|
+
// Status labels
|
|
21
|
+
statusUnresolved: "Unresolved",
|
|
22
|
+
statusResolved: "Resolved",
|
|
23
|
+
statusIgnored: "Ignored",
|
|
24
|
+
// Level labels
|
|
25
|
+
levelFatal: "Fatal",
|
|
26
|
+
levelError: "Error",
|
|
27
|
+
levelWarning: "Warning",
|
|
28
|
+
levelInfo: "Info",
|
|
29
|
+
levelDebug: "Debug",
|
|
30
|
+
// List columns / meta
|
|
31
|
+
events: "events",
|
|
32
|
+
users: "users",
|
|
33
|
+
eventCount: "{count} events",
|
|
34
|
+
usersAffected: "{count} users",
|
|
35
|
+
lastSeen: "Last seen {time}",
|
|
36
|
+
firstSeen: "First seen {time}",
|
|
37
|
+
handled: "Handled",
|
|
38
|
+
unhandled: "Unhandled",
|
|
39
|
+
// Empty state
|
|
40
|
+
emptyTitle: "No errors captured yet", // i18n-ignore feature-local i18n source
|
|
41
|
+
emptyDescription:
|
|
42
|
+
"Your app's analytics SDK automatically captures uncaught exceptions and unhandled promise rejections, groups them into issues, and links each one to the session replay where it happened.",
|
|
43
|
+
emptySearch: "No errors match your filter.",
|
|
44
|
+
installTitle: "Enable error capture",
|
|
45
|
+
docs: "Docs",
|
|
46
|
+
// Detail
|
|
47
|
+
back: "Back to errors",
|
|
48
|
+
resolve: "Resolve",
|
|
49
|
+
reopen: "Reopen",
|
|
50
|
+
ignore: "Ignore",
|
|
51
|
+
unignore: "Unignore",
|
|
52
|
+
watchReplay: "Watch session replay",
|
|
53
|
+
overview: "Overview",
|
|
54
|
+
metaFirstSeen: "First seen",
|
|
55
|
+
metaLastSeen: "Last seen",
|
|
56
|
+
metaEvents: "Events",
|
|
57
|
+
metaUsers: "Users affected",
|
|
58
|
+
metaEnvironment: "Environment",
|
|
59
|
+
metaRelease: "Release",
|
|
60
|
+
stackTrace: "Stack trace",
|
|
61
|
+
noStack: "No stack trace was captured for this error.",
|
|
62
|
+
inApp: "In app",
|
|
63
|
+
vendor: "Vendor",
|
|
64
|
+
breadcrumbs: "Breadcrumbs",
|
|
65
|
+
noBreadcrumbs: "No breadcrumbs were captured before this error.",
|
|
66
|
+
occurrences: "Recent occurrences",
|
|
67
|
+
noOccurrences: "No occurrences recorded yet.",
|
|
68
|
+
occurredAt: "Occurred {time}",
|
|
69
|
+
anonymous: "Anonymous",
|
|
70
|
+
tags: "Tags",
|
|
71
|
+
additionalData: "Additional data",
|
|
72
|
+
loadFailed: "Could not load errors: {message}",
|
|
73
|
+
detailLoadFailed: "Could not load this error: {message}",
|
|
74
|
+
// Cross-links from session recordings
|
|
75
|
+
viewIssue: "View issue",
|
|
76
|
+
viewIssueTooltip:
|
|
77
|
+
"Open this error's issue — how many users hit it, the stack trace, and recent occurrences",
|
|
78
|
+
// Toasts
|
|
79
|
+
resolvedToast: "Issue resolved.",
|
|
80
|
+
reopenedToast: "Issue reopened.",
|
|
81
|
+
ignoredToast: "Issue ignored.",
|
|
82
|
+
updateFailed: "Could not update issue: {message}",
|
|
83
|
+
testSentToast: "Sent a test error. It should appear in the list shortly.",
|
|
84
|
+
testFailed: "Could not send a test error: {message}",
|
|
85
|
+
},
|
|
86
|
+
} as const;
|
|
87
|
+
|
|
88
|
+
type ErrorMessages = (typeof MESSAGES)["en-US"];
|
|
89
|
+
|
|
90
|
+
export function useErrorsT(): ErrorMessages {
|
|
91
|
+
const { locale } = useLocale();
|
|
92
|
+
return {
|
|
93
|
+
...MESSAGES["en-US"],
|
|
94
|
+
...((MESSAGES as Record<string, Partial<ErrorMessages>>)[locale] ?? {}),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Interpolate {placeholders} in a message template. */
|
|
99
|
+
export function fmt(
|
|
100
|
+
template: string,
|
|
101
|
+
vars: Record<string, string | number> = {},
|
|
102
|
+
): string {
|
|
103
|
+
return template.replace(/\{(\w+)\}/g, (match, key) =>
|
|
104
|
+
key in vars ? String(vars[key]) : match,
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side mirrors of the error-capture server types
|
|
3
|
+
* (`server/lib/error-capture.ts`). Kept as plain structural types so the panel
|
|
4
|
+
* stays decoupled from the server module.
|
|
5
|
+
*/
|
|
6
|
+
export type ExceptionLevel = "fatal" | "error" | "warning" | "info" | "debug";
|
|
7
|
+
|
|
8
|
+
export type IssueStatus = "unresolved" | "resolved" | "ignored";
|
|
9
|
+
|
|
10
|
+
export type StatusFilter = IssueStatus | "all";
|
|
11
|
+
|
|
12
|
+
export interface ParsedStackFrame {
|
|
13
|
+
function: string | null;
|
|
14
|
+
file: string | null;
|
|
15
|
+
lineno: number | null;
|
|
16
|
+
colno: number | null;
|
|
17
|
+
inApp: boolean;
|
|
18
|
+
raw: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ErrorIssueSummary {
|
|
22
|
+
id: string;
|
|
23
|
+
fingerprint: string;
|
|
24
|
+
type: string;
|
|
25
|
+
title: string;
|
|
26
|
+
culprit: string | null;
|
|
27
|
+
level: ExceptionLevel;
|
|
28
|
+
status: IssueStatus;
|
|
29
|
+
firstSeenAt: string;
|
|
30
|
+
lastSeenAt: string;
|
|
31
|
+
eventCount: number;
|
|
32
|
+
usersAffected: number;
|
|
33
|
+
lastSessionRecordingId: string | null;
|
|
34
|
+
lastSessionRecordingPath: string | null;
|
|
35
|
+
assignee: string | null;
|
|
36
|
+
app: string | null;
|
|
37
|
+
template: string | null;
|
|
38
|
+
sparkline: number[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ErrorEventDetail {
|
|
42
|
+
id: string;
|
|
43
|
+
type: string;
|
|
44
|
+
message: string;
|
|
45
|
+
culprit: string | null;
|
|
46
|
+
level: ExceptionLevel;
|
|
47
|
+
stack: ParsedStackFrame[];
|
|
48
|
+
handled: boolean;
|
|
49
|
+
url: string | null;
|
|
50
|
+
userId: string | null;
|
|
51
|
+
anonymousId: string | null;
|
|
52
|
+
userKey: string | null;
|
|
53
|
+
sessionId: string | null;
|
|
54
|
+
sessionRecordingId: string | null;
|
|
55
|
+
sessionRecordingPath: string | null;
|
|
56
|
+
release: string | null;
|
|
57
|
+
environment: string | null;
|
|
58
|
+
tags: Record<string, unknown>;
|
|
59
|
+
extra: Record<string, unknown>;
|
|
60
|
+
breadcrumbs: ErrorBreadcrumb[];
|
|
61
|
+
occurredAt: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ErrorBreadcrumb {
|
|
65
|
+
timestamp?: string;
|
|
66
|
+
category?: string;
|
|
67
|
+
message?: string;
|
|
68
|
+
level?: ExceptionLevel;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ErrorIssueDetail {
|
|
72
|
+
issue: ErrorIssueSummary;
|
|
73
|
+
events: ErrorEventDetail[];
|
|
74
|
+
sessions: Array<{ recordingId: string; path: string }>;
|
|
75
|
+
}
|