@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,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response-time (latency) chart over a window: an avg area with optional
|
|
3
|
+
* min/max band lines, rendered with the app's charting library (recharts) and
|
|
4
|
+
* themed with the shared chart tokens. Takes a pre-built response-time series.
|
|
5
|
+
*
|
|
6
|
+
* Reusable by the authenticated monitor detail view and the public status page.
|
|
7
|
+
*/
|
|
8
|
+
import { useId, useMemo } from "react";
|
|
9
|
+
import {
|
|
10
|
+
Area,
|
|
11
|
+
AreaChart,
|
|
12
|
+
CartesianGrid,
|
|
13
|
+
Line,
|
|
14
|
+
ResponsiveContainer,
|
|
15
|
+
Tooltip,
|
|
16
|
+
XAxis,
|
|
17
|
+
YAxis,
|
|
18
|
+
} from "recharts";
|
|
19
|
+
|
|
20
|
+
import {
|
|
21
|
+
chartAxisStroke,
|
|
22
|
+
chartGridStroke,
|
|
23
|
+
chartTooltipContentStyle,
|
|
24
|
+
chartTooltipCursorStroke,
|
|
25
|
+
} from "@/lib/chart-theme";
|
|
26
|
+
import { cn } from "@/lib/utils";
|
|
27
|
+
|
|
28
|
+
import { formatBucketTime, formatLatencyMs } from "./chart-utils";
|
|
29
|
+
import type { ResponseTimePoint } from "./types";
|
|
30
|
+
|
|
31
|
+
export interface ResponseTimeChartProps {
|
|
32
|
+
series: ResponseTimePoint[];
|
|
33
|
+
/** Also draw min & max lines around the avg area. Default false. */
|
|
34
|
+
showMinMax?: boolean;
|
|
35
|
+
/** Tailwind height for the chart. Default `h-[200px]`. */
|
|
36
|
+
heightClassName?: string;
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Message shown when the series is empty. */
|
|
39
|
+
emptyText?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface ChartRow {
|
|
43
|
+
label: string;
|
|
44
|
+
avg: number | null;
|
|
45
|
+
min: number | null;
|
|
46
|
+
max: number | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ResponseTimeChart({
|
|
50
|
+
series,
|
|
51
|
+
showMinMax = false,
|
|
52
|
+
heightClassName = "h-[200px]",
|
|
53
|
+
className,
|
|
54
|
+
emptyText = "No response-time data yet",
|
|
55
|
+
}: ResponseTimeChartProps) {
|
|
56
|
+
const gradientId = useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
57
|
+
const rows = useMemo<ChartRow[]>(
|
|
58
|
+
() =>
|
|
59
|
+
series.map((point) => ({
|
|
60
|
+
label: formatBucketTime(point.bucketStart),
|
|
61
|
+
avg: point.avg,
|
|
62
|
+
min: point.min,
|
|
63
|
+
max: point.max,
|
|
64
|
+
})),
|
|
65
|
+
[series],
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const hasData = rows.some((row) => row.avg != null);
|
|
69
|
+
|
|
70
|
+
if (!hasData) {
|
|
71
|
+
return (
|
|
72
|
+
<div
|
|
73
|
+
className={cn(
|
|
74
|
+
"flex items-center justify-center rounded-md border border-dashed border-border/60 text-sm text-muted-foreground",
|
|
75
|
+
heightClassName,
|
|
76
|
+
className,
|
|
77
|
+
)}
|
|
78
|
+
>
|
|
79
|
+
{emptyText}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div className={cn("w-full", heightClassName, className)}>
|
|
86
|
+
<ResponsiveContainer width="100%" height="100%">
|
|
87
|
+
<AreaChart data={rows}>
|
|
88
|
+
<defs>
|
|
89
|
+
<linearGradient id={gradientId} x1="0" y1="0" x2="0" y2="1">
|
|
90
|
+
<stop
|
|
91
|
+
offset="5%"
|
|
92
|
+
stopColor="var(--brand-blue)"
|
|
93
|
+
stopOpacity={0.3}
|
|
94
|
+
/>
|
|
95
|
+
<stop
|
|
96
|
+
offset="95%"
|
|
97
|
+
stopColor="var(--brand-blue)"
|
|
98
|
+
stopOpacity={0}
|
|
99
|
+
/>
|
|
100
|
+
</linearGradient>
|
|
101
|
+
</defs>
|
|
102
|
+
<CartesianGrid
|
|
103
|
+
strokeDasharray="3 3"
|
|
104
|
+
stroke={chartGridStroke}
|
|
105
|
+
vertical={false}
|
|
106
|
+
/>
|
|
107
|
+
<XAxis
|
|
108
|
+
dataKey="label"
|
|
109
|
+
stroke={chartAxisStroke}
|
|
110
|
+
fontSize={10}
|
|
111
|
+
tickLine={false}
|
|
112
|
+
axisLine={false}
|
|
113
|
+
hide
|
|
114
|
+
/>
|
|
115
|
+
<YAxis
|
|
116
|
+
stroke={chartAxisStroke}
|
|
117
|
+
fontSize={11}
|
|
118
|
+
tickLine={false}
|
|
119
|
+
axisLine={false}
|
|
120
|
+
width={48}
|
|
121
|
+
tickFormatter={(v: number) => `${Math.round(v)}ms`}
|
|
122
|
+
/>
|
|
123
|
+
<Tooltip
|
|
124
|
+
cursor={{ stroke: chartTooltipCursorStroke }}
|
|
125
|
+
contentStyle={{ ...chartTooltipContentStyle, fontSize: "12px" }}
|
|
126
|
+
formatter={(value: any, name: any) => [
|
|
127
|
+
formatLatencyMs(typeof value === "number" ? value : null),
|
|
128
|
+
name,
|
|
129
|
+
]}
|
|
130
|
+
/>
|
|
131
|
+
{showMinMax ? (
|
|
132
|
+
<Line
|
|
133
|
+
type="monotone"
|
|
134
|
+
dataKey="max"
|
|
135
|
+
name="Max"
|
|
136
|
+
stroke="var(--muted-foreground)"
|
|
137
|
+
strokeWidth={1}
|
|
138
|
+
strokeOpacity={0.4}
|
|
139
|
+
strokeDasharray="2 3"
|
|
140
|
+
dot={false}
|
|
141
|
+
connectNulls
|
|
142
|
+
isAnimationActive={false}
|
|
143
|
+
/>
|
|
144
|
+
) : null}
|
|
145
|
+
<Area
|
|
146
|
+
type="monotone"
|
|
147
|
+
dataKey="avg"
|
|
148
|
+
name="Avg"
|
|
149
|
+
stroke="var(--brand-blue)"
|
|
150
|
+
strokeWidth={2}
|
|
151
|
+
fillOpacity={1}
|
|
152
|
+
fill={`url(#${gradientId})`}
|
|
153
|
+
connectNulls
|
|
154
|
+
isAnimationActive={false}
|
|
155
|
+
/>
|
|
156
|
+
{showMinMax ? (
|
|
157
|
+
<Line
|
|
158
|
+
type="monotone"
|
|
159
|
+
dataKey="min"
|
|
160
|
+
name="Min"
|
|
161
|
+
stroke="var(--muted-foreground)"
|
|
162
|
+
strokeWidth={1}
|
|
163
|
+
strokeOpacity={0.4}
|
|
164
|
+
strokeDasharray="2 3"
|
|
165
|
+
dot={false}
|
|
166
|
+
connectNulls
|
|
167
|
+
isAnimationActive={false}
|
|
168
|
+
/>
|
|
169
|
+
) : null}
|
|
170
|
+
</AreaChart>
|
|
171
|
+
</ResponsiveContainer>
|
|
172
|
+
</div>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overall uptime cards for the standard windows (24h / 7d / 30d / 90d),
|
|
3
|
+
* UptimeRobot-style. Takes a pre-computed `UptimeWindows` object.
|
|
4
|
+
*
|
|
5
|
+
* Reusable by the authenticated monitor detail view and the public status page.
|
|
6
|
+
*/
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
8
|
+
|
|
9
|
+
import { formatUptimePct } from "./chart-utils";
|
|
10
|
+
import type { UptimeWindowKey, UptimeWindows } from "./types";
|
|
11
|
+
|
|
12
|
+
const DEFAULT_WINDOWS: { key: UptimeWindowKey; label: string }[] = [
|
|
13
|
+
{ key: "uptime24h", label: "24 hours" },
|
|
14
|
+
{ key: "uptime7d", label: "7 days" },
|
|
15
|
+
{ key: "uptime30d", label: "30 days" },
|
|
16
|
+
{ key: "uptime90d", label: "90 days" },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
/** Color the percentage by health: >=99.9 green, >=95 amber, else red. */
|
|
20
|
+
function uptimeToneClass(pct: number | null): string {
|
|
21
|
+
if (pct == null) return "text-muted-foreground";
|
|
22
|
+
if (pct >= 99.9) return "text-emerald-500";
|
|
23
|
+
if (pct >= 95) return "text-amber-500";
|
|
24
|
+
return "text-red-500";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface UptimeStatCardsProps {
|
|
28
|
+
windows: UptimeWindows;
|
|
29
|
+
/** Override which windows/labels render, in order. */
|
|
30
|
+
items?: { key: UptimeWindowKey; label: string }[];
|
|
31
|
+
className?: string;
|
|
32
|
+
cardClassName?: string;
|
|
33
|
+
/** Compact spacing/type for dense in-app layouts. */
|
|
34
|
+
compact?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function UptimeStatCards({
|
|
38
|
+
windows,
|
|
39
|
+
items = DEFAULT_WINDOWS,
|
|
40
|
+
className,
|
|
41
|
+
cardClassName,
|
|
42
|
+
compact = false,
|
|
43
|
+
}: UptimeStatCardsProps) {
|
|
44
|
+
return (
|
|
45
|
+
<div
|
|
46
|
+
className={cn(
|
|
47
|
+
"grid grid-cols-2 gap-3 lg:grid-cols-4",
|
|
48
|
+
compact && "gap-2",
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
>
|
|
52
|
+
{items.map(({ key, label }) => {
|
|
53
|
+
const pct = windows[key];
|
|
54
|
+
return (
|
|
55
|
+
<div
|
|
56
|
+
key={key}
|
|
57
|
+
className={cn(
|
|
58
|
+
"flex flex-col gap-0.5 rounded-lg border border-border/50 bg-card",
|
|
59
|
+
compact ? "px-3 py-2" : "px-4 py-3",
|
|
60
|
+
cardClassName,
|
|
61
|
+
)}
|
|
62
|
+
>
|
|
63
|
+
<span
|
|
64
|
+
className={cn(
|
|
65
|
+
"uppercase tracking-wide text-muted-foreground",
|
|
66
|
+
compact ? "text-[10px]" : "text-[11px]",
|
|
67
|
+
)}
|
|
68
|
+
>
|
|
69
|
+
{label}
|
|
70
|
+
</span>
|
|
71
|
+
<span
|
|
72
|
+
className={cn(
|
|
73
|
+
"font-semibold tabular-nums",
|
|
74
|
+
compact ? "text-lg" : "text-2xl",
|
|
75
|
+
uptimeToneClass(pct),
|
|
76
|
+
)}
|
|
77
|
+
>
|
|
78
|
+
{formatUptimePct(pct)}
|
|
79
|
+
</span>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
})}
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A strip of colored uptime buckets over a window (UptimeRobot-style), one bar
|
|
3
|
+
* per pre-bucketed period: green up / red down / amber degraded / muted
|
|
4
|
+
* no-data. Each bar has a tooltip with its time range, uptime %, and downtime.
|
|
5
|
+
*
|
|
6
|
+
* Reusable by the authenticated monitor detail view and the public status page.
|
|
7
|
+
* It takes ALREADY-bucketed data (`buckets`) — it does no fetching or
|
|
8
|
+
* aggregation itself.
|
|
9
|
+
*/
|
|
10
|
+
import {
|
|
11
|
+
Tooltip,
|
|
12
|
+
TooltipContent,
|
|
13
|
+
TooltipTrigger,
|
|
14
|
+
} from "@/components/ui/tooltip";
|
|
15
|
+
import { cn } from "@/lib/utils";
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
bucketFillClass,
|
|
19
|
+
bucketStatusLabel,
|
|
20
|
+
formatRange,
|
|
21
|
+
formatUptimePct,
|
|
22
|
+
} from "./chart-utils";
|
|
23
|
+
import type { UptimeBucket } from "./types";
|
|
24
|
+
|
|
25
|
+
export interface UptimeTimelineBarsProps {
|
|
26
|
+
buckets: UptimeBucket[];
|
|
27
|
+
/** Tailwind height for the strip. Default `h-8`. */
|
|
28
|
+
heightClassName?: string;
|
|
29
|
+
/** Rounded corners on each bar. Default `rounded-sm`. */
|
|
30
|
+
barRadiusClassName?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Accessible label describing the timeline. */
|
|
33
|
+
ariaLabel?: string;
|
|
34
|
+
/** Render nothing (instead of an empty strip) when there are no buckets. */
|
|
35
|
+
hideWhenEmpty?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function UptimeTimelineBars({
|
|
39
|
+
buckets,
|
|
40
|
+
heightClassName = "h-8",
|
|
41
|
+
barRadiusClassName = "rounded-sm",
|
|
42
|
+
className,
|
|
43
|
+
ariaLabel = "Uptime timeline",
|
|
44
|
+
hideWhenEmpty = false,
|
|
45
|
+
}: UptimeTimelineBarsProps) {
|
|
46
|
+
if (buckets.length === 0) {
|
|
47
|
+
if (hideWhenEmpty) return null;
|
|
48
|
+
return (
|
|
49
|
+
<div
|
|
50
|
+
className={cn(
|
|
51
|
+
"flex items-center justify-center rounded-md border border-dashed border-border/60 text-xs text-muted-foreground",
|
|
52
|
+
heightClassName,
|
|
53
|
+
className,
|
|
54
|
+
)}
|
|
55
|
+
>
|
|
56
|
+
No data yet{/* i18n-ignore public status page fixed copy */}
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
className={cn("flex items-stretch gap-0.5", heightClassName, className)}
|
|
64
|
+
role="img"
|
|
65
|
+
aria-label={ariaLabel}
|
|
66
|
+
>
|
|
67
|
+
{buckets.map((bucket, index) => (
|
|
68
|
+
<Tooltip key={`${bucket.start}-${index}`}>
|
|
69
|
+
<TooltipTrigger asChild>
|
|
70
|
+
<div
|
|
71
|
+
className={cn(
|
|
72
|
+
"min-w-0 flex-1 opacity-90 transition-opacity hover:opacity-100",
|
|
73
|
+
barRadiusClassName,
|
|
74
|
+
bucketFillClass(bucket.status),
|
|
75
|
+
)}
|
|
76
|
+
data-status={bucket.status}
|
|
77
|
+
/>
|
|
78
|
+
</TooltipTrigger>
|
|
79
|
+
<TooltipContent className="text-xs">
|
|
80
|
+
<div className="font-medium">
|
|
81
|
+
{bucketStatusLabel(bucket.status)}
|
|
82
|
+
</div>
|
|
83
|
+
<div className="text-muted-foreground">
|
|
84
|
+
{formatRange(bucket.start, bucket.end)}
|
|
85
|
+
</div>
|
|
86
|
+
{bucket.total > 0 ? (
|
|
87
|
+
<div className="text-muted-foreground">
|
|
88
|
+
{formatUptimePct(bucket.uptimePct)} uptime · {bucket.total}{" "}
|
|
89
|
+
{bucket.total === 1 ? "check" : "checks"}
|
|
90
|
+
{bucket.downCount > 0 ? ` · ${bucket.downCount} down` : ""}
|
|
91
|
+
{bucket.degradedCount > 0
|
|
92
|
+
? ` · ${bucket.degradedCount} degraded`
|
|
93
|
+
: ""}
|
|
94
|
+
</div>
|
|
95
|
+
) : (
|
|
96
|
+
<div className="text-muted-foreground">
|
|
97
|
+
No checks recorded
|
|
98
|
+
{/* i18n-ignore public status page fixed copy */}
|
|
99
|
+
</div>
|
|
100
|
+
)}
|
|
101
|
+
</TooltipContent>
|
|
102
|
+
</Tooltip>
|
|
103
|
+
))}
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure presentation helpers for the reusable uptime charts. Self-contained (no
|
|
3
|
+
* dependency on the in-app monitoring page utils) so these components stay
|
|
4
|
+
* importable from both the authenticated detail view and the public,
|
|
5
|
+
* unauthenticated status page.
|
|
6
|
+
*/
|
|
7
|
+
import type { BucketStatus } from "./types";
|
|
8
|
+
|
|
9
|
+
/** Solid fill for a timeline bucket / status dot. Matches the app health palette. */
|
|
10
|
+
export function bucketFillClass(status: BucketStatus): string {
|
|
11
|
+
switch (status) {
|
|
12
|
+
case "up":
|
|
13
|
+
return "bg-emerald-500";
|
|
14
|
+
case "down":
|
|
15
|
+
return "bg-red-500";
|
|
16
|
+
case "degraded":
|
|
17
|
+
return "bg-amber-500";
|
|
18
|
+
default:
|
|
19
|
+
return "bg-muted-foreground/25";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function bucketTextClass(status: BucketStatus): string {
|
|
24
|
+
switch (status) {
|
|
25
|
+
case "up":
|
|
26
|
+
return "text-emerald-500";
|
|
27
|
+
case "down":
|
|
28
|
+
return "text-red-500";
|
|
29
|
+
case "degraded":
|
|
30
|
+
return "text-amber-500";
|
|
31
|
+
default:
|
|
32
|
+
return "text-muted-foreground";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Format an uptime percentage with UptimeRobot-style precision. */
|
|
37
|
+
export function formatUptimePct(pct: number | null | undefined): string {
|
|
38
|
+
if (pct == null || !Number.isFinite(pct)) return "—";
|
|
39
|
+
if (pct >= 99.995) return "100%";
|
|
40
|
+
return `${pct.toFixed(pct >= 99.9 ? 3 : pct >= 99 ? 2 : 1)}%`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function formatLatencyMs(ms: number | null | undefined): string {
|
|
44
|
+
if (ms == null || !Number.isFinite(ms)) return "—";
|
|
45
|
+
const rounded = Math.round(ms);
|
|
46
|
+
if (rounded < 1000) return `${rounded} ms`;
|
|
47
|
+
return `${(rounded / 1000).toFixed(2)} s`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Compact date-time label for tooltips/axes (locale-aware, no year). */
|
|
51
|
+
export function formatBucketTime(value: string | null | undefined): string {
|
|
52
|
+
if (!value) return "—";
|
|
53
|
+
const date = new Date(value);
|
|
54
|
+
if (Number.isNaN(date.getTime())) return "—";
|
|
55
|
+
return date.toLocaleString(undefined, {
|
|
56
|
+
month: "short",
|
|
57
|
+
day: "numeric",
|
|
58
|
+
hour: "numeric",
|
|
59
|
+
minute: "2-digit",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Day-only label (used for wide daily uptime timelines). */
|
|
64
|
+
export function formatBucketDay(value: string | null | undefined): string {
|
|
65
|
+
if (!value) return "—";
|
|
66
|
+
const date = new Date(value);
|
|
67
|
+
if (Number.isNaN(date.getTime())) return "—";
|
|
68
|
+
return date.toLocaleDateString(undefined, {
|
|
69
|
+
month: "short",
|
|
70
|
+
day: "numeric",
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Human range like "Feb 3, 2:00 PM – 3:00 PM". */
|
|
75
|
+
export function formatRange(
|
|
76
|
+
start: string | null | undefined,
|
|
77
|
+
end: string | null | undefined,
|
|
78
|
+
): string {
|
|
79
|
+
const startLabel = formatBucketTime(start);
|
|
80
|
+
if (!end) return startLabel;
|
|
81
|
+
const endDate = new Date(end);
|
|
82
|
+
if (Number.isNaN(endDate.getTime())) return startLabel;
|
|
83
|
+
const endLabel = endDate.toLocaleString(undefined, {
|
|
84
|
+
hour: "numeric",
|
|
85
|
+
minute: "2-digit",
|
|
86
|
+
});
|
|
87
|
+
return `${startLabel} – ${endLabel}`;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function bucketStatusLabel(status: BucketStatus): string {
|
|
91
|
+
switch (status) {
|
|
92
|
+
case "up":
|
|
93
|
+
return "Operational";
|
|
94
|
+
case "down":
|
|
95
|
+
return "Down";
|
|
96
|
+
case "degraded":
|
|
97
|
+
return "Degraded";
|
|
98
|
+
default:
|
|
99
|
+
return "No data";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable, themeable uptime chart components. Feed them the aggregates from
|
|
3
|
+
* the `get-monitor-stats` action (in-app) or the `get-public-status-page`
|
|
4
|
+
* action (public status page).
|
|
5
|
+
*/
|
|
6
|
+
export { UptimeTimelineBars } from "./UptimeTimelineBars";
|
|
7
|
+
export type { UptimeTimelineBarsProps } from "./UptimeTimelineBars";
|
|
8
|
+
export { ResponseTimeChart } from "./ResponseTimeChart";
|
|
9
|
+
export type { ResponseTimeChartProps } from "./ResponseTimeChart";
|
|
10
|
+
export { UptimeStatCards } from "./UptimeStatCards";
|
|
11
|
+
export type { UptimeStatCardsProps } from "./UptimeStatCards";
|
|
12
|
+
export type {
|
|
13
|
+
BucketStatus,
|
|
14
|
+
ResponseTimePoint,
|
|
15
|
+
UptimeBucket,
|
|
16
|
+
UptimeWindowKey,
|
|
17
|
+
UptimeWindows,
|
|
18
|
+
} from "./types";
|
|
19
|
+
export {
|
|
20
|
+
bucketFillClass,
|
|
21
|
+
bucketStatusLabel,
|
|
22
|
+
bucketTextClass,
|
|
23
|
+
formatBucketDay,
|
|
24
|
+
formatBucketTime,
|
|
25
|
+
formatLatencyMs,
|
|
26
|
+
formatRange,
|
|
27
|
+
formatUptimePct,
|
|
28
|
+
} from "./chart-utils";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side shapes for the reusable uptime charts. These MIRROR the server
|
|
3
|
+
* aggregates in server/lib/monitor-stats.ts (`UptimeBucket`, `ResponseTimePoint`,
|
|
4
|
+
* `UptimeWindows`) so the chart components can be fed directly from the
|
|
5
|
+
* `get-monitor-stats` / `get-public-status-page` action payloads without any
|
|
6
|
+
* remapping. Keep them structurally in sync with the server types.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** Coarse health of a single timeline bucket. */
|
|
10
|
+
export type BucketStatus = "up" | "down" | "degraded" | "no-data";
|
|
11
|
+
|
|
12
|
+
export interface UptimeWindows {
|
|
13
|
+
uptime24h: number | null;
|
|
14
|
+
uptime7d: number | null;
|
|
15
|
+
uptime30d: number | null;
|
|
16
|
+
uptime90d: number | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UptimeBucket {
|
|
20
|
+
/** ISO timestamp for the inclusive start of the bucket. */
|
|
21
|
+
start: string;
|
|
22
|
+
/** ISO timestamp for the exclusive end of the bucket. */
|
|
23
|
+
end: string;
|
|
24
|
+
status: BucketStatus;
|
|
25
|
+
/** Uptime percentage in the bucket (null when there were no checks). */
|
|
26
|
+
uptimePct: number | null;
|
|
27
|
+
total: number;
|
|
28
|
+
downCount: number;
|
|
29
|
+
degradedCount: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ResponseTimePoint {
|
|
33
|
+
/** ISO timestamp for the start of the bucket. */
|
|
34
|
+
bucketStart: string;
|
|
35
|
+
avg: number | null;
|
|
36
|
+
min: number | null;
|
|
37
|
+
max: number | null;
|
|
38
|
+
count: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Which uptime windows the stat cards render, in order. */
|
|
42
|
+
export type UptimeWindowKey = keyof UptimeWindows;
|
|
@@ -19,6 +19,10 @@ interface NavigationState {
|
|
|
19
19
|
recordingId?: string;
|
|
20
20
|
agentsView?: string;
|
|
21
21
|
dbAdminConnectionId?: string;
|
|
22
|
+
monitoringView?: string;
|
|
23
|
+
monitorId?: string;
|
|
24
|
+
statusPageId?: string;
|
|
25
|
+
errorIssueId?: string;
|
|
22
26
|
filters?: Record<string, string>;
|
|
23
27
|
}
|
|
24
28
|
|
|
@@ -82,6 +86,23 @@ export function useNavigationState() {
|
|
|
82
86
|
if (dbAdminConnectionId)
|
|
83
87
|
state.dbAdminConnectionId = dbAdminConnectionId;
|
|
84
88
|
}
|
|
89
|
+
} else if (pathname === "/monitoring") {
|
|
90
|
+
state.view = "monitoring";
|
|
91
|
+
state.monitoringView =
|
|
92
|
+
searchParams.get("view") === "errors" ? "errors" : "uptime";
|
|
93
|
+
if (state.monitoringView === "errors") {
|
|
94
|
+
const issue = searchParams.get("issue");
|
|
95
|
+
if (issue) state.errorIssueId = issue;
|
|
96
|
+
} else {
|
|
97
|
+
const statusPage = searchParams.get("statuspage");
|
|
98
|
+
if (statusPage) {
|
|
99
|
+
// "list" | "new" | <id> - the status-pages config sub-view.
|
|
100
|
+
state.statusPageId = statusPage;
|
|
101
|
+
} else {
|
|
102
|
+
const monitor = searchParams.get("monitor");
|
|
103
|
+
if (monitor) state.monitorId = monitor;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
85
106
|
} else if (pathname === "/data-sources") {
|
|
86
107
|
state.view = "data-sources";
|
|
87
108
|
} else if (pathname === "/data-dictionary") {
|
|
@@ -112,6 +133,19 @@ export function useNavigationState() {
|
|
|
112
133
|
return `/agents?${params.toString()}`;
|
|
113
134
|
}
|
|
114
135
|
if (cmd.view === "agents") return "/agents";
|
|
136
|
+
if (cmd.view === "monitoring") {
|
|
137
|
+
const params = new URLSearchParams();
|
|
138
|
+
if (cmd.monitoringView === "errors") {
|
|
139
|
+
params.set("view", "errors");
|
|
140
|
+
if (cmd.errorIssueId) params.set("issue", cmd.errorIssueId);
|
|
141
|
+
} else if (cmd.statusPageId) {
|
|
142
|
+
params.set("statuspage", cmd.statusPageId);
|
|
143
|
+
} else if (cmd.monitorId) {
|
|
144
|
+
params.set("monitor", cmd.monitorId);
|
|
145
|
+
}
|
|
146
|
+
const qs = params.toString();
|
|
147
|
+
return qs ? `/monitoring?${qs}` : "/monitoring";
|
|
148
|
+
}
|
|
115
149
|
if (cmd.view === "data-sources") return "/data-sources";
|
|
116
150
|
if (cmd.view === "data-dictionary") return "/data-dictionary";
|
|
117
151
|
if (cmd.view === "catalog") return "/catalog";
|
|
@@ -10,6 +10,9 @@ const messages = {
|
|
|
10
10
|
dataSources: "資料來源",
|
|
11
11
|
dataDictionary: "資料字典",
|
|
12
12
|
sessions: "工作階段",
|
|
13
|
+
monitoring: "監控",
|
|
14
|
+
monitoringUptime: "正常運作時間",
|
|
15
|
+
monitoringErrors: "錯誤",
|
|
13
16
|
agents: "代理",
|
|
14
17
|
templateCatalog: "目錄",
|
|
15
18
|
dashboards: "儀表板",
|
|
@@ -28,6 +31,8 @@ const messages = {
|
|
|
28
31
|
sidebar: {
|
|
29
32
|
collapseSidebar: "收合側邊欄",
|
|
30
33
|
expandSidebar: "展開側邊欄",
|
|
34
|
+
collapseAsk: "收起提問",
|
|
35
|
+
expandAsk: "展開提問",
|
|
31
36
|
collapseDashboards: "收起儀表板",
|
|
32
37
|
expandDashboards: "展開儀表板",
|
|
33
38
|
collapseAnalyses: "收起分析",
|
|
@@ -591,6 +596,7 @@ const messages = {
|
|
|
591
596
|
dataDictionary: "資料字典 - Analytics",
|
|
592
597
|
dataSources: "資料來源 - Analytics",
|
|
593
598
|
sessions: "工作階段 - Analytics",
|
|
599
|
+
monitoring: "監控 - Analytics",
|
|
594
600
|
agents: "代理 - Analytics",
|
|
595
601
|
session: "工作階段回放 - Analytics",
|
|
596
602
|
tool: "工具 - Analytics",
|