@agent-native/core 0.92.0 → 0.92.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +20 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/application-state/store.ts +12 -1
- package/corpus/core/src/cli/sync-builder-starter-manifest.ts +29 -1
- package/corpus/core/src/client/AssistantChat.tsx +27 -14
- package/corpus/core/src/client/PoweredByBadge.tsx +1 -8
- package/corpus/core/src/client/agent-chat-adapter.ts +37 -10
- package/corpus/core/src/client/chat/widgets/DataTableWidget.tsx +52 -1
- package/corpus/core/src/client/db-admin/TableEditor.tsx +49 -0
- package/corpus/core/src/client/db-admin/export-utils.ts +13 -4
- package/corpus/core/src/client/db-admin/useAgentSync.ts +72 -0
- package/corpus/core/src/client/error-capture.ts +69 -7
- package/corpus/core/src/client/extensions/EmbeddedExtension.tsx +5 -1
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +53 -8
- package/corpus/core/src/client/extensions/InlineExtensionFrame.tsx +5 -1
- package/corpus/core/src/client/extensions/portable-extension.ts +1 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +12 -9
- package/corpus/core/src/client/org/TeamPage.tsx +77 -71
- package/corpus/core/src/client/settings/SettingsPanel.tsx +205 -52
- package/corpus/core/src/client/settings/SettingsSection.tsx +8 -1
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +25 -9
- package/corpus/core/src/db-admin/agent-tools.ts +8 -2
- package/corpus/core/src/db-admin/operations.ts +116 -4
- package/corpus/core/src/db-admin/routes.ts +1 -0
- package/corpus/core/src/db-admin/types.ts +4 -0
- package/corpus/core/src/extensions/html-shell.ts +5 -4
- package/corpus/core/src/extensions/routes.ts +10 -0
- package/corpus/core/src/navigation/index.ts +1 -1
- package/corpus/core/src/notifications/channels.ts +1 -22
- package/corpus/core/src/resources/handlers.ts +10 -8
- package/corpus/core/src/server/poll.ts +293 -8
- package/corpus/core/src/styles/agent-native.css +27 -0
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/security/SKILL.md +7 -0
- package/corpus/core/src/templates/default/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/core/src/templates/default/AGENTS.md +4 -2
- package/corpus/core/src/templates/headless/AGENTS.md +4 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +4 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +6 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/performance/SKILL.md +4 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/security/SKILL.md +7 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/core/src/templates/workspace-core/AGENTS.md +7 -1
- package/corpus/core/src/templates/workspace-root/AGENTS.md +7 -1
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +10 -0
- package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/templates/analytics/AGENTS.md +33 -14
- package/corpus/templates/analytics/actions/capture-test-error.ts +4 -0
- package/corpus/templates/analytics/actions/get-analytics-alert-rule-defaults.ts +23 -0
- package/corpus/templates/analytics/actions/get-error-issue.ts +1 -1
- package/corpus/templates/analytics/actions/list-analysis-revisions.ts +40 -0
- package/corpus/templates/analytics/actions/list-dashboard-revisions.ts +40 -0
- package/corpus/templates/analytics/actions/list-dashboard-usage-stats.ts +299 -0
- package/corpus/templates/analytics/actions/navigate.ts +4 -2
- package/corpus/templates/analytics/actions/restore-analysis-revision.ts +43 -0
- package/corpus/templates/analytics/actions/restore-dashboard-revision.ts +68 -0
- package/corpus/templates/analytics/actions/save-analytics-alert-rule.ts +14 -0
- package/corpus/templates/analytics/actions/save-monitor.ts +1 -1
- package/corpus/templates/analytics/actions/view-screen.ts +24 -0
- package/corpus/templates/analytics/app/components/analysis/AnalysisHistoryPanel.tsx +181 -0
- package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +184 -0
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +22 -16
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +27 -21
- package/corpus/templates/analytics/app/hooks/use-analysis-revisions.ts +43 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +110 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +43 -0
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +8 -3
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +64 -2
- package/corpus/templates/analytics/app/i18n-data.ts +783 -3
- package/corpus/templates/analytics/app/pages/Agents.tsx +359 -19
- package/corpus/templates/analytics/app/pages/Settings.tsx +3 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +34 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +28 -0
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +18 -1
- package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +7 -10
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +479 -23
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +0 -9
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +11 -0
- package/corpus/templates/analytics/app/pages/monitoring/errors/types.ts +9 -1
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +6 -3
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +26 -30
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +9 -99
- package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +262 -104
- package/corpus/templates/analytics/app/routes/team.tsx +1 -1
- package/corpus/templates/analytics/changelog/2026-07-08-admins-can-audit-dashboard-usage-ownership-and-cleanup-signa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-agent-monitoring-stays-available-to-non-admins.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-alert-emails-now-show-the-message-without-raw-metadata-json.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-alert-rules-are-easier-to-scan-expand-and-edit-from-settings.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-analytics-alert-forms-remember-last-email-recipients.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-analytics-alert-rules-can-now-use-per-rule-slack-and-webhook.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-history-and-chat-context.md +5 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-usage-now-counts-explorer-dashboard-traffic.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-demo-mode-session-emails-are-filtered-and-anonymized.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-error-issue-detail-adds-stack-traces-and-frequency-bars.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-error-issue-detail-now-shows-the-latest-occurrence-message-a.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-monitoring-errors-only-show-test-action-when-empty.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-production-session-replay-now-requires-private-blob-storage-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-shared-extension-links-now-show-a-clear-message-when-you-do-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-team-settings-show-access-controls-next-to-member-lists.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-uptime-checks-no-longer-count-ssrf-setup-time-against-the-re.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-uptime-checks-reuse-one-keep-alive-connection-so-recorded-la.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-uptime-monitors-now-confirm-transient-timeout-failures-befor.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-uptime-monitors-now-use-a-10-second-request-timeout-by-defau.md +6 -0
- package/corpus/templates/analytics/docs/uptime-monitoring.md +30 -18
- package/corpus/templates/analytics/server/db/schema-monitoring.ts +1 -1
- package/corpus/templates/analytics/server/db/schema.ts +56 -0
- package/corpus/templates/analytics/server/lib/analytics-alerts.ts +92 -0
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +334 -5
- package/corpus/templates/analytics/server/lib/error-capture.ts +231 -36
- package/corpus/templates/analytics/server/lib/session-replay.ts +114 -8
- package/corpus/templates/analytics/server/lib/uptime-monitors.ts +244 -33
- package/corpus/templates/analytics/server/plugins/db.ts +112 -2
- package/corpus/templates/analytics/server/routes/api/dashboard-agent-context.json.get.ts +1 -0
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/templates/assets/AGENTS.md +4 -0
- package/corpus/templates/assets/app/routes/settings.tsx +1 -1
- package/corpus/templates/assets/app/routes/team.tsx +1 -1
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/brain/AGENTS.md +4 -0
- package/corpus/templates/brain/app/routes/team.tsx +1 -1
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/templates/calendar/AGENTS.md +4 -0
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +11 -2
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +21 -8
- package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +7 -1
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +11 -2
- package/corpus/templates/calendar/app/lib/popover-click-guard.ts +48 -4
- package/corpus/templates/calendar/app/pages/Settings.tsx +1 -1
- package/corpus/templates/calendar/app/routes/_app.team.tsx +1 -1
- package/corpus/templates/calendar/changelog/2026-07-08-clicking-empty-calendar-space-closes-an-open-event-popover-b.md +6 -0
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/chat/AGENTS.md +4 -0
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/chat/app/routes/settings.tsx +2 -2
- package/corpus/templates/chat/app/routes/team.tsx +1 -1
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/clips/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/clips/AGENTS.md +4 -0
- package/corpus/templates/clips/actions/finalize-recording.ts +9 -3
- package/corpus/templates/clips/actions/set-thumbnail.ts +11 -2
- package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +1 -7
- package/corpus/templates/clips/app/components/player/player-controls.tsx +21 -13
- package/corpus/templates/clips/app/components/player/video-player.tsx +30 -75
- package/corpus/templates/clips/app/i18n/ar-SA.ts +6 -5
- package/corpus/templates/clips/app/i18n/de-DE.ts +6 -6
- package/corpus/templates/clips/app/i18n/en-US.ts +6 -5
- package/corpus/templates/clips/app/i18n/es-ES.ts +6 -5
- package/corpus/templates/clips/app/i18n/fr-FR.ts +6 -6
- package/corpus/templates/clips/app/i18n/hi-IN.ts +6 -5
- package/corpus/templates/clips/app/i18n/ja-JP.ts +6 -5
- package/corpus/templates/clips/app/i18n/ko-KR.ts +6 -5
- package/corpus/templates/clips/app/i18n/pt-BR.ts +6 -5
- package/corpus/templates/clips/app/i18n/zh-CN.ts +6 -5
- package/corpus/templates/clips/app/i18n/zh-TW.ts +6 -5
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +51 -118
- package/corpus/templates/clips/changelog/2026-07-08-hosted-clip-uploads-now-clear-failed-buffered-chunks.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-hosted-recording-uploads-now-avoid-sql-chunk-storage.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-recaps-now-keep-summaries-action-items-and-transcrip.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-video-playback-controls-now-match-loom-style-5-second-skips-.md +6 -0
- package/corpus/templates/clips/server/lib/recording-upload-state.ts +63 -0
- package/corpus/templates/clips/server/lib/video-storage.ts +4 -0
- package/corpus/templates/clips/server/routes/api/recordings/[recordingId]/thumbnail.post.ts +19 -13
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +40 -1
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/templates/content/AGENTS.md +4 -0
- package/corpus/templates/content/app/routes/_app.settings.tsx +2 -2
- package/corpus/templates/content/app/routes/_app.team.tsx +1 -1
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/design/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/design/AGENTS.md +4 -0
- package/corpus/templates/design/actions/take-design-screenshot.ts +12 -9
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +57 -13
- package/corpus/templates/design/app/routes/team.tsx +1 -1
- package/corpus/templates/design/changelog/2026-07-08-local-images-added-to-designs-now-upload-to-file-storage-ins.md +6 -0
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/dispatch/AGENTS.md +4 -0
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/dispatch/app/routes/settings.tsx +2 -2
- package/corpus/templates/dispatch/app/routes/team.tsx +1 -1
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/templates/forms/AGENTS.md +4 -0
- package/corpus/templates/forms/app/routes/_app.settings.tsx +2 -2
- package/corpus/templates/forms/app/routes/_app.team.tsx +1 -1
- package/corpus/templates/forms/shared/navigation.ts +1 -1
- package/corpus/templates/macros/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/macros/AGENTS.md +4 -0
- package/corpus/templates/macros/app/routes/settings.tsx +2 -2
- package/corpus/templates/macros/app/routes/team.tsx +1 -1
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/mail/.agents/skills/email-drafts/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +5 -1
- package/corpus/templates/mail/AGENTS.md +4 -0
- package/corpus/templates/mail/changelog/2026-07-08-mail-attachments-in-hosted-environments-now-require-file-sto.md +6 -0
- package/corpus/templates/mail/server/handlers/media.ts +26 -1
- package/corpus/templates/mail/server/lib/outgoing-email.ts +24 -1
- package/corpus/templates/mail/server/lib/upload-store.ts +2 -1
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/plan/AGENTS.md +4 -0
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/plan/app/routes/settings.tsx +2 -2
- package/corpus/templates/plan/app/routes/team.tsx +1 -1
- package/corpus/templates/plan/changelog/2026-07-08-hosted-plan-images-now-require-connected-storage.md +6 -0
- package/corpus/templates/plan/server/lib/plan-assets.ts +33 -4
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +5 -0
- package/corpus/templates/slides/.agents/skills/security/SKILL.md +7 -0
- package/corpus/templates/slides/AGENTS.md +4 -0
- package/corpus/templates/slides/actions/generate-image-api.ts +15 -3
- package/corpus/templates/slides/app/routes/settings.tsx +2 -2
- package/corpus/templates/slides/app/routes/team.tsx +1 -1
- package/corpus/templates/slides/changelog/2026-07-08-generated-slide-images-now-return-hosted-file-storage-urls-i.md +6 -0
- package/corpus/templates/slides/shared/api.ts +1 -1
- package/dist/application-state/store.d.ts.map +1 -1
- package/dist/application-state/store.js +8 -2
- package/dist/application-state/store.js.map +1 -1
- package/dist/cli/sync-builder-starter-manifest.d.ts.map +1 -1
- package/dist/cli/sync-builder-starter-manifest.js +24 -1
- package/dist/cli/sync-builder-starter-manifest.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +24 -13
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/PoweredByBadge.d.ts +1 -1
- package/dist/client/PoweredByBadge.d.ts.map +1 -1
- package/dist/client/PoweredByBadge.js +3 -9
- package/dist/client/PoweredByBadge.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +28 -9
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/chat/widgets/DataTableWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/DataTableWidget.js +19 -2
- package/dist/client/chat/widgets/DataTableWidget.js.map +1 -1
- package/dist/client/db-admin/TableEditor.d.ts.map +1 -1
- package/dist/client/db-admin/TableEditor.js +19 -2
- package/dist/client/db-admin/TableEditor.js.map +1 -1
- package/dist/client/db-admin/export-utils.d.ts +2 -0
- package/dist/client/db-admin/export-utils.d.ts.map +1 -1
- package/dist/client/db-admin/export-utils.js +11 -3
- package/dist/client/db-admin/export-utils.js.map +1 -1
- package/dist/client/db-admin/useAgentSync.d.ts.map +1 -1
- package/dist/client/db-admin/useAgentSync.js +63 -0
- package/dist/client/db-admin/useAgentSync.js.map +1 -1
- package/dist/client/error-capture.d.ts.map +1 -1
- package/dist/client/error-capture.js +41 -7
- package/dist/client/error-capture.js.map +1 -1
- package/dist/client/extensions/EmbeddedExtension.d.ts.map +1 -1
- package/dist/client/extensions/EmbeddedExtension.js +3 -1
- package/dist/client/extensions/EmbeddedExtension.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +32 -5
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/extensions/InlineExtensionFrame.d.ts.map +1 -1
- package/dist/client/extensions/InlineExtensionFrame.js +3 -1
- package/dist/client/extensions/InlineExtensionFrame.js.map +1 -1
- package/dist/client/extensions/portable-extension.d.ts.map +1 -1
- package/dist/client/extensions/portable-extension.js +1 -0
- package/dist/client/extensions/portable-extension.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +11 -6
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +5 -5
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +37 -14
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsSection.js +1 -1
- package/dist/client/settings/SettingsSection.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +21 -10
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db-admin/agent-tools.d.ts.map +1 -1
- package/dist/db-admin/agent-tools.js +7 -2
- package/dist/db-admin/agent-tools.js.map +1 -1
- package/dist/db-admin/operations.d.ts.map +1 -1
- package/dist/db-admin/operations.js +90 -4
- package/dist/db-admin/operations.js.map +1 -1
- package/dist/db-admin/routes.d.ts.map +1 -1
- package/dist/db-admin/routes.js +1 -0
- package/dist/db-admin/routes.js.map +1 -1
- package/dist/db-admin/types.d.ts +4 -0
- package/dist/db-admin/types.d.ts.map +1 -1
- package/dist/db-admin/types.js.map +1 -1
- package/dist/extensions/html-shell.d.ts +5 -4
- package/dist/extensions/html-shell.d.ts.map +1 -1
- package/dist/extensions/html-shell.js.map +1 -1
- package/dist/extensions/routes.d.ts.map +1 -1
- package/dist/extensions/routes.js +8 -0
- package/dist/extensions/routes.js.map +1 -1
- package/dist/navigation/index.d.ts +1 -1
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/navigation/index.js.map +1 -1
- package/dist/notifications/channels.js +1 -17
- package/dist/notifications/channels.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +5 -0
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +9 -8
- package/dist/resources/handlers.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/poll.d.ts +12 -4
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +236 -9
- package/dist/server/poll.js.map +1 -1
- package/dist/styles/agent-native.css +27 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +5 -0
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/security/SKILL.md +7 -0
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +5 -1
- package/dist/templates/default/AGENTS.md +4 -2
- package/dist/templates/headless/AGENTS.md +4 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +4 -0
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +6 -0
- package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +4 -0
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +7 -0
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +5 -1
- package/dist/templates/workspace-core/AGENTS.md +7 -1
- package/dist/templates/workspace-root/AGENTS.md +7 -1
- package/package.json +1 -1
- package/src/templates/default/.agents/skills/actions/SKILL.md +5 -0
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/security/SKILL.md +7 -0
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +5 -1
- package/src/templates/default/AGENTS.md +4 -2
- package/src/templates/headless/AGENTS.md +4 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +4 -0
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +6 -0
- package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +4 -0
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/security/SKILL.md +7 -0
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +5 -1
- package/src/templates/workspace-core/AGENTS.md +7 -1
- package/src/templates/workspace-root/AGENTS.md +7 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@agent-native/core/client";
|
|
6
6
|
import {
|
|
7
7
|
IconBell,
|
|
8
|
-
|
|
8
|
+
IconChevronDown,
|
|
9
9
|
IconLoader2,
|
|
10
10
|
IconPencil,
|
|
11
11
|
IconPlayerPlay,
|
|
@@ -36,6 +36,11 @@ import {
|
|
|
36
36
|
CardTitle,
|
|
37
37
|
} from "@/components/ui/card";
|
|
38
38
|
import { Checkbox } from "@/components/ui/checkbox";
|
|
39
|
+
import {
|
|
40
|
+
Collapsible,
|
|
41
|
+
CollapsibleContent,
|
|
42
|
+
CollapsibleTrigger,
|
|
43
|
+
} from "@/components/ui/collapsible";
|
|
39
44
|
import {
|
|
40
45
|
Dialog,
|
|
41
46
|
DialogContent,
|
|
@@ -54,14 +59,6 @@ import {
|
|
|
54
59
|
SelectValue,
|
|
55
60
|
} from "@/components/ui/select";
|
|
56
61
|
import { Switch } from "@/components/ui/switch";
|
|
57
|
-
import {
|
|
58
|
-
Table,
|
|
59
|
-
TableBody,
|
|
60
|
-
TableCell,
|
|
61
|
-
TableHead,
|
|
62
|
-
TableHeader,
|
|
63
|
-
TableRow,
|
|
64
|
-
} from "@/components/ui/table";
|
|
65
62
|
import { Textarea } from "@/components/ui/textarea";
|
|
66
63
|
import { cn } from "@/lib/utils";
|
|
67
64
|
|
|
@@ -92,6 +89,8 @@ interface AnalyticsAlertRule {
|
|
|
92
89
|
severity: AlertSeverity;
|
|
93
90
|
channels: string[];
|
|
94
91
|
emailRecipients: string[];
|
|
92
|
+
slackWebhookUrl: string | null;
|
|
93
|
+
webhookUrl: string | null;
|
|
95
94
|
enabled: boolean;
|
|
96
95
|
lastEvaluatedAt: string | null;
|
|
97
96
|
lastTriggeredAt: string | null;
|
|
@@ -108,6 +107,10 @@ interface RunAlertsResult {
|
|
|
108
107
|
remaining: number;
|
|
109
108
|
}
|
|
110
109
|
|
|
110
|
+
interface AlertRuleDefaults {
|
|
111
|
+
emailRecipients: string[];
|
|
112
|
+
}
|
|
113
|
+
|
|
111
114
|
interface AlertRuleFormState {
|
|
112
115
|
id?: string;
|
|
113
116
|
name: string;
|
|
@@ -124,11 +127,16 @@ interface AlertRuleFormState {
|
|
|
124
127
|
channels: Record<KnownChannel, boolean>;
|
|
125
128
|
customChannels: string;
|
|
126
129
|
emailRecipients: string;
|
|
130
|
+
slackWebhookUrl: string;
|
|
131
|
+
webhookUrl: string;
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
const KNOWN_CHANNELS = ["inbox", "email", "slack", "webhook"] as const;
|
|
130
135
|
|
|
131
|
-
function emptyAlertForm(
|
|
136
|
+
function emptyAlertForm(
|
|
137
|
+
defaults?: AlertRuleDefaults | null,
|
|
138
|
+
): AlertRuleFormState {
|
|
139
|
+
const emailRecipients = defaults?.emailRecipients ?? [];
|
|
132
140
|
return {
|
|
133
141
|
name: "",
|
|
134
142
|
description: "",
|
|
@@ -143,12 +151,14 @@ function emptyAlertForm(): AlertRuleFormState {
|
|
|
143
151
|
enabled: true,
|
|
144
152
|
channels: {
|
|
145
153
|
inbox: true,
|
|
146
|
-
email:
|
|
154
|
+
email: emailRecipients.length > 0,
|
|
147
155
|
slack: false,
|
|
148
156
|
webhook: false,
|
|
149
157
|
},
|
|
150
158
|
customChannels: "",
|
|
151
|
-
emailRecipients: "",
|
|
159
|
+
emailRecipients: emailRecipients.join("\n"),
|
|
160
|
+
slackWebhookUrl: "",
|
|
161
|
+
webhookUrl: "",
|
|
152
162
|
};
|
|
153
163
|
}
|
|
154
164
|
|
|
@@ -180,6 +190,8 @@ function formFromRule(rule: AnalyticsAlertRule): AlertRuleFormState {
|
|
|
180
190
|
},
|
|
181
191
|
customChannels: customChannels.join(", "),
|
|
182
192
|
emailRecipients: rule.emailRecipients.join("\n"),
|
|
193
|
+
slackWebhookUrl: rule.slackWebhookUrl ?? "",
|
|
194
|
+
webhookUrl: rule.webhookUrl ?? "",
|
|
183
195
|
};
|
|
184
196
|
}
|
|
185
197
|
|
|
@@ -195,6 +207,15 @@ function parseInteger(value: string, fallback: number): number {
|
|
|
195
207
|
return Number.isFinite(parsed) ? parsed : fallback;
|
|
196
208
|
}
|
|
197
209
|
|
|
210
|
+
function isHttpUrl(value: string): boolean {
|
|
211
|
+
try {
|
|
212
|
+
const parsed = new URL(value);
|
|
213
|
+
return parsed.protocol === "http:" || parsed.protocol === "https:";
|
|
214
|
+
} catch {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
198
219
|
function formatDate(value: string | null, fallback: string): string {
|
|
199
220
|
if (!value) return fallback;
|
|
200
221
|
const date = new Date(value);
|
|
@@ -237,6 +258,8 @@ function payloadFromRule(
|
|
|
237
258
|
severity: rule.severity,
|
|
238
259
|
channels: rule.channels,
|
|
239
260
|
emailRecipients: rule.emailRecipients,
|
|
261
|
+
slackWebhookUrl: rule.slackWebhookUrl,
|
|
262
|
+
webhookUrl: rule.webhookUrl,
|
|
240
263
|
enabled: rule.enabled,
|
|
241
264
|
...overrides,
|
|
242
265
|
};
|
|
@@ -256,6 +279,9 @@ export function AlertRulesSettingsCard() {
|
|
|
256
279
|
const t = useT();
|
|
257
280
|
const queryClient = useQueryClient();
|
|
258
281
|
const [editing, setEditing] = useState<AlertRuleFormState | null>(null);
|
|
282
|
+
const [expandedRuleIds, setExpandedRuleIds] = useState<Set<string>>(
|
|
283
|
+
() => new Set(),
|
|
284
|
+
);
|
|
259
285
|
const [ruleToDelete, setRuleToDelete] = useState<AnalyticsAlertRule | null>(
|
|
260
286
|
null,
|
|
261
287
|
);
|
|
@@ -265,6 +291,11 @@ export function AlertRulesSettingsCard() {
|
|
|
265
291
|
undefined,
|
|
266
292
|
{ staleTime: 10_000 },
|
|
267
293
|
);
|
|
294
|
+
const { data: alertDefaults } = useActionQuery<AlertRuleDefaults>(
|
|
295
|
+
"get-analytics-alert-rule-defaults",
|
|
296
|
+
undefined,
|
|
297
|
+
{ staleTime: 10_000 },
|
|
298
|
+
);
|
|
268
299
|
const saveRule = useActionMutation("save-analytics-alert-rule");
|
|
269
300
|
const deleteRule = useActionMutation("delete-analytics-alert-rule");
|
|
270
301
|
const runAlerts = useActionMutation("run-analytics-alerts");
|
|
@@ -276,9 +307,28 @@ export function AlertRulesSettingsCard() {
|
|
|
276
307
|
await queryClient.invalidateQueries({
|
|
277
308
|
queryKey: ["action", "list-analytics-alert-rules"],
|
|
278
309
|
});
|
|
310
|
+
await queryClient.invalidateQueries({
|
|
311
|
+
queryKey: ["action", "get-analytics-alert-rule-defaults"],
|
|
312
|
+
});
|
|
279
313
|
await refetch();
|
|
280
314
|
}
|
|
281
315
|
|
|
316
|
+
function startCreateAlert() {
|
|
317
|
+
setEditing(emptyAlertForm(alertDefaults));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function setRuleExpanded(ruleId: string, expanded: boolean) {
|
|
321
|
+
setExpandedRuleIds((current) => {
|
|
322
|
+
const next = new Set(current);
|
|
323
|
+
if (expanded) {
|
|
324
|
+
next.add(ruleId);
|
|
325
|
+
} else {
|
|
326
|
+
next.delete(ruleId);
|
|
327
|
+
}
|
|
328
|
+
return next;
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
|
|
282
332
|
async function handleSave() {
|
|
283
333
|
if (!editing) return;
|
|
284
334
|
let filters: AnalyticsAlertFilter[];
|
|
@@ -304,6 +354,22 @@ export function AlertRulesSettingsCard() {
|
|
|
304
354
|
toast.error(t("settings.alertChannelRequired"));
|
|
305
355
|
return;
|
|
306
356
|
}
|
|
357
|
+
if (
|
|
358
|
+
editing.channels.slack &&
|
|
359
|
+
editing.slackWebhookUrl.trim() &&
|
|
360
|
+
!isHttpUrl(editing.slackWebhookUrl.trim())
|
|
361
|
+
) {
|
|
362
|
+
toast.error(t("settings.alertSlackWebhookUrlInvalid"));
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
if (
|
|
366
|
+
editing.channels.webhook &&
|
|
367
|
+
editing.webhookUrl.trim() &&
|
|
368
|
+
!isHttpUrl(editing.webhookUrl.trim())
|
|
369
|
+
) {
|
|
370
|
+
toast.error(t("settings.alertWebhookUrlInvalid"));
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
307
373
|
|
|
308
374
|
try {
|
|
309
375
|
await saveRule.mutateAsync({
|
|
@@ -323,6 +389,10 @@ export function AlertRulesSettingsCard() {
|
|
|
323
389
|
severity: editing.severity,
|
|
324
390
|
channels,
|
|
325
391
|
emailRecipients: splitList(editing.emailRecipients),
|
|
392
|
+
slackWebhookUrl: editing.channels.slack
|
|
393
|
+
? editing.slackWebhookUrl.trim()
|
|
394
|
+
: null,
|
|
395
|
+
webhookUrl: editing.channels.webhook ? editing.webhookUrl.trim() : null,
|
|
326
396
|
enabled: editing.enabled,
|
|
327
397
|
});
|
|
328
398
|
setEditing(null);
|
|
@@ -422,11 +492,7 @@ export function AlertRulesSettingsCard() {
|
|
|
422
492
|
)}
|
|
423
493
|
{t("settings.alertRunNow")}
|
|
424
494
|
</Button>
|
|
425
|
-
<Button
|
|
426
|
-
type="button"
|
|
427
|
-
size="sm"
|
|
428
|
-
onClick={() => setEditing(emptyAlertForm())}
|
|
429
|
-
>
|
|
495
|
+
<Button type="button" size="sm" onClick={startCreateAlert}>
|
|
430
496
|
<IconPlus className="size-3.5" />
|
|
431
497
|
{t("settings.alertNew")}
|
|
432
498
|
</Button>
|
|
@@ -455,30 +521,25 @@ export function AlertRulesSettingsCard() {
|
|
|
455
521
|
type="button"
|
|
456
522
|
size="sm"
|
|
457
523
|
className="mt-4"
|
|
458
|
-
onClick={
|
|
524
|
+
onClick={startCreateAlert}
|
|
459
525
|
>
|
|
460
526
|
<IconPlus className="size-3.5" />
|
|
461
527
|
{t("settings.alertNew")}
|
|
462
528
|
</Button>
|
|
463
529
|
</div>
|
|
464
530
|
) : (
|
|
465
|
-
<
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
<
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
<TableBody>
|
|
478
|
-
{rules.map((rule) => (
|
|
479
|
-
<TableRow key={rule.id}>
|
|
480
|
-
<TableCell className="min-w-[190px]">
|
|
481
|
-
<div className="flex items-start gap-3">
|
|
531
|
+
<div className="space-y-2">
|
|
532
|
+
{rules.map((rule) => {
|
|
533
|
+
const expanded = expandedRuleIds.has(rule.id);
|
|
534
|
+
return (
|
|
535
|
+
<Collapsible
|
|
536
|
+
key={rule.id}
|
|
537
|
+
open={expanded}
|
|
538
|
+
onOpenChange={(open) => setRuleExpanded(rule.id, open)}
|
|
539
|
+
className="rounded-lg border border-border/60 bg-background/40"
|
|
540
|
+
>
|
|
541
|
+
<div className="flex flex-col gap-3 px-3 py-3 sm:flex-row sm:items-center">
|
|
542
|
+
<div className="flex min-w-0 flex-1 items-start gap-3">
|
|
482
543
|
<Switch
|
|
483
544
|
checked={rule.enabled}
|
|
484
545
|
onCheckedChange={(enabled) =>
|
|
@@ -487,10 +548,11 @@ export function AlertRulesSettingsCard() {
|
|
|
487
548
|
aria-label={t("settings.alertToggleLabel", {
|
|
488
549
|
name: rule.name,
|
|
489
550
|
})}
|
|
551
|
+
className="mt-0.5 shrink-0"
|
|
490
552
|
/>
|
|
491
|
-
<div className="min-w-0">
|
|
553
|
+
<div className="min-w-0 flex-1">
|
|
492
554
|
<div className="flex min-w-0 flex-wrap items-center gap-2">
|
|
493
|
-
<span className="truncate font-medium">
|
|
555
|
+
<span className="truncate text-sm font-medium">
|
|
494
556
|
{rule.name}
|
|
495
557
|
</span>
|
|
496
558
|
<Badge
|
|
@@ -506,79 +568,114 @@ export function AlertRulesSettingsCard() {
|
|
|
506
568
|
: t("settings.alertSeverityWarning")}
|
|
507
569
|
</Badge>
|
|
508
570
|
</div>
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
</p>
|
|
513
|
-
) : null}
|
|
571
|
+
<p className="mt-0.5 line-clamp-1 text-xs text-muted-foreground">
|
|
572
|
+
{rule.description || formatScope(rule, t)}
|
|
573
|
+
</p>
|
|
514
574
|
</div>
|
|
515
575
|
</div>
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
576
|
+
|
|
577
|
+
<div className="flex flex-wrap items-center gap-3 sm:justify-end">
|
|
578
|
+
<div className="min-w-0 text-xs sm:w-40">
|
|
579
|
+
<div className="truncate font-medium">
|
|
580
|
+
{formatThreshold(rule, t)}
|
|
581
|
+
</div>
|
|
582
|
+
<div className="mt-0.5 flex items-center gap-1.5 text-muted-foreground">
|
|
583
|
+
<span
|
|
584
|
+
className={cn(
|
|
585
|
+
"size-1.5 rounded-full",
|
|
586
|
+
statusDotClass(rule.lastStatus),
|
|
587
|
+
)}
|
|
588
|
+
/>
|
|
589
|
+
<span>{statusLabel(rule.lastStatus, t)}</span>
|
|
590
|
+
</div>
|
|
591
|
+
</div>
|
|
592
|
+
<div className="flex shrink-0 items-center gap-1">
|
|
593
|
+
<Button
|
|
594
|
+
type="button"
|
|
595
|
+
variant="outline"
|
|
596
|
+
size="sm"
|
|
597
|
+
onClick={() => setEditing(formFromRule(rule))}
|
|
598
|
+
aria-label={t("settings.alertEditLabel", {
|
|
599
|
+
name: rule.name,
|
|
600
|
+
})}
|
|
532
601
|
>
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
602
|
+
<IconPencil className="size-3.5" />
|
|
603
|
+
{t("sidebar.edit")}
|
|
604
|
+
</Button>
|
|
605
|
+
<CollapsibleTrigger asChild>
|
|
606
|
+
<Button
|
|
607
|
+
type="button"
|
|
608
|
+
variant="ghost"
|
|
609
|
+
size="sm"
|
|
610
|
+
aria-label={t("sessions.devtoolsToggleDetails")}
|
|
611
|
+
>
|
|
612
|
+
{t("sqlDashboard.details")}
|
|
613
|
+
<IconChevronDown
|
|
614
|
+
className={cn(
|
|
615
|
+
"size-3.5 transition-transform",
|
|
616
|
+
expanded && "rotate-180",
|
|
617
|
+
)}
|
|
618
|
+
/>
|
|
619
|
+
</Button>
|
|
620
|
+
</CollapsibleTrigger>
|
|
540
621
|
</div>
|
|
541
|
-
) : null}
|
|
542
|
-
</TableCell>
|
|
543
|
-
<TableCell className="min-w-[150px] text-xs">
|
|
544
|
-
<div className="flex items-center gap-2">
|
|
545
|
-
<span
|
|
546
|
-
className={cn(
|
|
547
|
-
"size-2 rounded-full",
|
|
548
|
-
statusDotClass(rule.lastStatus),
|
|
549
|
-
)}
|
|
550
|
-
/>
|
|
551
|
-
<span className="font-medium">
|
|
552
|
-
{statusLabel(rule.lastStatus, t)}
|
|
553
|
-
</span>
|
|
554
622
|
</div>
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
623
|
+
</div>
|
|
624
|
+
|
|
625
|
+
<CollapsibleContent className="border-t border-border/60 px-3 py-3">
|
|
626
|
+
<div className="grid gap-3 text-xs sm:grid-cols-2 lg:grid-cols-3">
|
|
627
|
+
<AlertRuleDetail
|
|
628
|
+
label={t("settings.alertConditionColumn")}
|
|
629
|
+
value={formatThreshold(rule, t)}
|
|
630
|
+
detail={formatScope(rule, t)}
|
|
631
|
+
/>
|
|
632
|
+
<AlertRuleDetail
|
|
633
|
+
label={t("settings.alertDeliveryColumn")}
|
|
634
|
+
value={rule.channels
|
|
635
|
+
.map((channel) => knownChannelLabel(channel, t))
|
|
636
|
+
.join(", ")}
|
|
637
|
+
detail={
|
|
638
|
+
rule.emailRecipients.length > 0
|
|
639
|
+
? rule.emailRecipients.join(", ")
|
|
640
|
+
: undefined
|
|
641
|
+
}
|
|
642
|
+
/>
|
|
643
|
+
<AlertRuleDetail
|
|
644
|
+
label={t("settings.alertStatusColumn")}
|
|
645
|
+
value={statusLabel(rule.lastStatus, t)}
|
|
646
|
+
detail={t("settings.alertLastChecked", {
|
|
647
|
+
date: formatDate(
|
|
648
|
+
rule.lastEvaluatedAt,
|
|
649
|
+
t("settings.alertNever"),
|
|
650
|
+
),
|
|
651
|
+
})}
|
|
652
|
+
/>
|
|
653
|
+
<AlertRuleDetail
|
|
654
|
+
label={t("settings.alertEventName")}
|
|
655
|
+
value={rule.eventName || t("settings.alertAllEvents")}
|
|
656
|
+
/>
|
|
657
|
+
<AlertRuleDetail
|
|
658
|
+
label={t("settings.alertFilters")}
|
|
659
|
+
value={
|
|
660
|
+
rule.filters.length > 0
|
|
661
|
+
? JSON.stringify(rule.filters)
|
|
662
|
+
: "[]"
|
|
663
|
+
}
|
|
664
|
+
/>
|
|
665
|
+
<AlertRuleDetail
|
|
666
|
+
label={t("settings.alertStatusTriggered")}
|
|
667
|
+
value={formatDate(
|
|
668
|
+
rule.lastTriggeredAt,
|
|
559
669
|
t("settings.alertNever"),
|
|
560
|
-
)
|
|
561
|
-
|
|
670
|
+
)}
|
|
671
|
+
/>
|
|
562
672
|
</div>
|
|
563
673
|
{rule.lastError ? (
|
|
564
|
-
<div className="mt-
|
|
674
|
+
<div className="mt-3 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive">
|
|
565
675
|
{rule.lastError}
|
|
566
676
|
</div>
|
|
567
677
|
) : null}
|
|
568
|
-
|
|
569
|
-
<TableCell>
|
|
570
|
-
<div className="flex justify-end gap-1">
|
|
571
|
-
<Button
|
|
572
|
-
type="button"
|
|
573
|
-
variant="ghost"
|
|
574
|
-
size="sm"
|
|
575
|
-
onClick={() => setEditing(formFromRule(rule))}
|
|
576
|
-
aria-label={t("settings.alertEditLabel", {
|
|
577
|
-
name: rule.name,
|
|
578
|
-
})}
|
|
579
|
-
>
|
|
580
|
-
<IconPencil className="size-3.5" />
|
|
581
|
-
</Button>
|
|
678
|
+
<div className="mt-3 flex justify-end">
|
|
582
679
|
<Button
|
|
583
680
|
type="button"
|
|
584
681
|
variant="ghost"
|
|
@@ -590,13 +687,14 @@ export function AlertRulesSettingsCard() {
|
|
|
590
687
|
})}
|
|
591
688
|
>
|
|
592
689
|
<IconTrash className="size-3.5" />
|
|
690
|
+
{t("sidebar.delete")}
|
|
593
691
|
</Button>
|
|
594
692
|
</div>
|
|
595
|
-
</
|
|
596
|
-
</
|
|
597
|
-
)
|
|
598
|
-
|
|
599
|
-
</
|
|
693
|
+
</CollapsibleContent>
|
|
694
|
+
</Collapsible>
|
|
695
|
+
);
|
|
696
|
+
})}
|
|
697
|
+
</div>
|
|
600
698
|
)}
|
|
601
699
|
</CardContent>
|
|
602
700
|
</Card>
|
|
@@ -642,6 +740,28 @@ export function AlertRulesSettingsCard() {
|
|
|
642
740
|
);
|
|
643
741
|
}
|
|
644
742
|
|
|
743
|
+
function AlertRuleDetail({
|
|
744
|
+
label,
|
|
745
|
+
value,
|
|
746
|
+
detail,
|
|
747
|
+
}: {
|
|
748
|
+
label: string;
|
|
749
|
+
value: string;
|
|
750
|
+
detail?: string;
|
|
751
|
+
}) {
|
|
752
|
+
return (
|
|
753
|
+
<div className="min-w-0 rounded-md bg-muted/25 px-3 py-2">
|
|
754
|
+
<div className="text-[11px] font-medium uppercase tracking-wide text-muted-foreground">
|
|
755
|
+
{label}
|
|
756
|
+
</div>
|
|
757
|
+
<div className="mt-1 truncate font-medium">{value}</div>
|
|
758
|
+
{detail ? (
|
|
759
|
+
<div className="mt-0.5 truncate text-muted-foreground">{detail}</div>
|
|
760
|
+
) : null}
|
|
761
|
+
</div>
|
|
762
|
+
);
|
|
763
|
+
}
|
|
764
|
+
|
|
645
765
|
function AlertRuleDialog({
|
|
646
766
|
form,
|
|
647
767
|
setForm,
|
|
@@ -853,6 +973,44 @@ function AlertRuleDialog({
|
|
|
853
973
|
</div>
|
|
854
974
|
</div>
|
|
855
975
|
|
|
976
|
+
{form.channels.slack ? (
|
|
977
|
+
<div className="space-y-1.5">
|
|
978
|
+
<Label htmlFor="alert-slack-webhook-url">
|
|
979
|
+
{t("settings.alertSlackWebhookUrl")}
|
|
980
|
+
</Label>
|
|
981
|
+
<Input
|
|
982
|
+
id="alert-slack-webhook-url"
|
|
983
|
+
type="url"
|
|
984
|
+
value={form.slackWebhookUrl}
|
|
985
|
+
onChange={(event) =>
|
|
986
|
+
setField("slackWebhookUrl", event.target.value)
|
|
987
|
+
}
|
|
988
|
+
placeholder={t("settings.alertSlackWebhookUrlPlaceholder")}
|
|
989
|
+
/>
|
|
990
|
+
<p className="text-xs text-muted-foreground">
|
|
991
|
+
{t("settings.alertSlackWebhookUrlHint")}
|
|
992
|
+
</p>
|
|
993
|
+
</div>
|
|
994
|
+
) : null}
|
|
995
|
+
|
|
996
|
+
{form.channels.webhook ? (
|
|
997
|
+
<div className="space-y-1.5">
|
|
998
|
+
<Label htmlFor="alert-webhook-url">
|
|
999
|
+
{t("settings.alertWebhookUrl")}
|
|
1000
|
+
</Label>
|
|
1001
|
+
<Input
|
|
1002
|
+
id="alert-webhook-url"
|
|
1003
|
+
type="url"
|
|
1004
|
+
value={form.webhookUrl}
|
|
1005
|
+
onChange={(event) => setField("webhookUrl", event.target.value)}
|
|
1006
|
+
placeholder={t("settings.alertWebhookUrlPlaceholder")}
|
|
1007
|
+
/>
|
|
1008
|
+
<p className="text-xs text-muted-foreground">
|
|
1009
|
+
{t("settings.alertWebhookUrlHint")}
|
|
1010
|
+
</p>
|
|
1011
|
+
</div>
|
|
1012
|
+
) : null}
|
|
1013
|
+
|
|
856
1014
|
<div className="space-y-1.5">
|
|
857
1015
|
<Label htmlFor="alert-custom-channels">
|
|
858
1016
|
{t("settings.alertCustomChannels")}
|