@agent-native/core 0.98.0 → 0.98.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +32 -0
- package/corpus/core/docs/content/locales/ar-SA/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/ar-SA/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/de-DE/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/es-ES/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/fr-FR/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/hi-IN/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/ja-JP/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/ko-KR/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/pt-BR/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/zh-CN/template-plan.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.mdx +25 -1
- package/corpus/core/docs/content/locales/zh-TW/template-plan.mdx +1 -1
- package/corpus/core/docs/content/pr-visual-recap.mdx +50 -1
- package/corpus/core/docs/content/template-plan.mdx +1 -1
- package/corpus/core/package.json +2 -2
- package/corpus/core/src/action-change-marker.ts +8 -1
- package/corpus/core/src/changelog/parse.ts +8 -3
- package/corpus/core/src/cli/plan-local.ts +43 -11
- package/corpus/core/src/cli/pr-visual-recap-workflow.ts +2 -9
- package/corpus/core/src/cli/recap.ts +356 -4
- package/corpus/core/src/cli/skills-content/local-files.ts +17 -12
- package/corpus/core/src/client/AgentPanel.tsx +2 -3
- package/corpus/core/src/client/AssistantChat.tsx +83 -39
- package/corpus/core/src/client/analytics.ts +125 -14
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +16 -2
- package/corpus/core/src/client/chat-model-groups.ts +28 -0
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +442 -85
- package/corpus/core/src/client/composer/TiptapComposer.tsx +46 -29
- package/corpus/core/src/client/composer/VoiceButton.tsx +2 -1
- package/corpus/core/src/client/composer/index.ts +5 -0
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +1206 -67
- package/corpus/core/src/client/index.ts +10 -0
- package/corpus/core/src/client/progress/RunsTray.tsx +13 -1
- package/corpus/core/src/client/session-replay.ts +10 -0
- package/corpus/core/src/client/settings/DemoModeSection.tsx +4 -28
- package/corpus/core/src/client/settings/SecretsSection.tsx +387 -266
- package/corpus/core/src/client/settings/SettingsPanel.tsx +117 -38
- package/corpus/core/src/client/url-scrub.ts +13 -0
- package/corpus/core/src/client/use-action.ts +12 -0
- package/corpus/core/src/client/use-agent-chat-home-handoff.ts +8 -1
- package/corpus/core/src/client/use-agent-engine-configured.ts +17 -3
- package/corpus/core/src/client/use-db-sync.ts +84 -34
- package/corpus/core/src/client/use-demo-mode-status.ts +44 -0
- package/corpus/core/src/client/use-pausing-interval.ts +14 -4
- package/corpus/core/src/integrations/scope-store.ts +1 -1
- package/corpus/core/src/integrations/usage-budget-store.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +44 -1
- package/corpus/core/src/mcp-client/workspace-servers.ts +4 -4
- package/corpus/core/src/secrets/crypto.ts +28 -8
- package/corpus/core/src/server/action-change.ts +5 -1
- package/corpus/core/src/server/action-routes.ts +8 -0
- package/corpus/core/src/server/poll.ts +1 -0
- package/corpus/core/src/server/realtime-voice.ts +299 -13
- package/corpus/core/src/styles/agent-native.css +2 -2
- package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
- package/corpus/core/src/vite/client.ts +9 -1
- package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +10 -5
- package/corpus/templates/analytics/AGENTS.md +17 -13
- package/corpus/templates/analytics/actions/navigate.ts +59 -5
- package/corpus/templates/analytics/actions/view-screen.ts +3 -6
- package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +20 -3
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +20 -5
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +21 -6
- package/corpus/templates/analytics/app/global.css +19 -20
- package/corpus/templates/analytics/app/lib/demo-chart-trend.ts +156 -0
- package/corpus/templates/analytics/app/lib/provider-corpus-job-sync.ts +26 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +35 -341
- package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +38 -7
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +3 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +333 -272
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +72 -17
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +297 -108
- package/corpus/templates/analytics/app/root.tsx +28 -8
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +2 -1
- package/corpus/templates/analytics/changelog/2026-06-25-referrer-dashboard-panels-show-external-domains.md +2 -1
- package/corpus/templates/analytics/changelog/2026-07-06-mobile-chat-header-is-more-compact-and-the-menu-button-opens-navigation.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-history-and-chat-context.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-no-longer-repeatedly-restarts-background-requests-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-only-asks-for-replay-storage-when-you-enable-sessi.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-charts-now-show-their-loading-skeleton-while-refreshing.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-realtime-voice-now-shows-a-clear-connection-indicator-comple.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-event-counts-stay-hidden-until-recordings-finish-load.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-storage-key-mismatches-show-actionable-setup-guidance.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-timelines-group-continuous-scrolling-and-dev-tools-co.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-filters-now-stay-compact-in-a-settings-menu-at-mediu.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replay-console-errors-now-link-to-matching-issues-or.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-load-large-recordings-faster-and-surface-fai.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-preserve-recorded-styles-and-viewport-layout.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-stay-centered-instead-of-clipping-wide-recor.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-daily-dashboard-emails-reliably-include-the-complete-dashboa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-demo-mode-charts-trend-upward.md +6 -0
- package/corpus/templates/analytics/package.json +1 -1
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +1 -303
- package/corpus/templates/analytics/server/handlers/session-replay.ts +57 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +2 -0
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -1
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +17 -33
- package/corpus/templates/analytics/server/lib/demo-dashboards.ts +16 -3
- package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +12 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +208 -2
- package/corpus/templates/analytics/server/plugins/onboarding.ts +7 -79
- package/corpus/templates/analytics/server/routes/api/session-replay/recordings/[recordingId]/chunks.get.ts +1 -0
- package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/assets/app/global.css +4 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +0 -1
- package/corpus/templates/assets/app/routes/library.tsx +0 -1
- package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/brain/app/global.css +5 -5
- package/corpus/templates/brain/app/root.tsx +0 -3
- package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/calendar/app/root.tsx +1 -0
- package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/clips/app/components/player/video-player.tsx +5 -1
- package/corpus/templates/clips/app/hooks/use-auto-title.ts +74 -8
- package/corpus/templates/clips/app/hooks/use-library.ts +12 -25
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +20 -22
- package/corpus/templates/clips/changelog/2026-07-11-clips-no-longer-stay-stuck-on-preparing-clip-when-they-are-r.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-generated-titles-no-longer-cause-continuous-background-refreshes.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-s3-storage-setup-stays-collapsed-until-you-choose-it-as-the-.md +6 -0
- package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +2 -2
- package/corpus/templates/content/app/hooks/use-comments.ts +0 -1
- package/corpus/templates/content/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
- package/corpus/templates/content/changelog/2026-07-12-the-left-sidebar-stays-fixed-horizontally-while-scrolling-on.md +6 -0
- package/corpus/templates/design/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -2
- package/corpus/templates/macros/app/root.tsx +0 -3
- package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/mail/app/hooks/use-compose-state.ts +1 -0
- package/corpus/templates/mail/app/root.tsx +1 -12
- package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/plan/.agents/skills/visual-plan/references/local-files.md +17 -12
- package/corpus/templates/plan/.agents/skills/visual-recap/references/local-files.md +17 -12
- package/corpus/templates/plan/actions/validate-local-plan-source.ts +4 -4
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +2 -1
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -2
- package/corpus/templates/plan/app/hooks/use-plans.ts +6 -13
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +41 -0
- package/corpus/templates/plan/app/lib/plan-tracking.ts +3 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +14 -36
- package/corpus/templates/plan/app/root.tsx +13 -3
- package/corpus/templates/plan/changelog/2026-07-11-plan-refreshes-only-when-content-changes.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-12-local-plan-source-now-stays-on-device.md +6 -0
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +4 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +1 -0
- package/corpus/templates/slides/app/hooks/use-slide-comments.ts +7 -31
- package/corpus/templates/slides/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
- package/dist/action-change-marker.d.ts +1 -0
- package/dist/action-change-marker.d.ts.map +1 -1
- package/dist/action-change-marker.js +7 -1
- package/dist/action-change-marker.js.map +1 -1
- package/dist/changelog/parse.d.ts +4 -2
- package/dist/changelog/parse.d.ts.map +1 -1
- package/dist/changelog/parse.js +5 -3
- package/dist/changelog/parse.js.map +1 -1
- package/dist/cli/plan-local.d.ts +6 -6
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +36 -7
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +2 -8
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +2 -8
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts +22 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +286 -2
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills-content/local-files.d.ts +1 -1
- package/dist/cli/skills-content/local-files.d.ts.map +1 -1
- package/dist/cli/skills-content/local-files.js +17 -12
- package/dist/cli/skills-content/local-files.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +7 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +62 -40
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/analytics.d.ts +8 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +103 -13
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +2 -0
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +9 -2
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
- package/dist/client/chat-model-groups.d.ts.map +1 -1
- package/dist/client/chat-model-groups.js +24 -0
- package/dist/client/chat-model-groups.js.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts +40 -4
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.js +172 -42
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +4 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +47 -29
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/VoiceButton.d.ts.map +1 -1
- package/dist/client/composer/VoiceButton.js +2 -2
- package/dist/client/composer/VoiceButton.js.map +1 -1
- package/dist/client/composer/index.d.ts +2 -2
- package/dist/client/composer/index.d.ts.map +1 -1
- package/dist/client/composer/index.js +1 -1
- package/dist/client/composer/index.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts +100 -3
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.js +952 -51
- package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
- package/dist/client/index.d.ts +3 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +10 -1
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/session-replay.d.ts +2 -0
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +7 -0
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
- package/dist/client/settings/DemoModeSection.js +4 -23
- package/dist/client/settings/DemoModeSection.js.map +1 -1
- package/dist/client/settings/SecretsSection.d.ts +2 -3
- package/dist/client/settings/SecretsSection.d.ts.map +1 -1
- package/dist/client/settings/SecretsSection.js +46 -22
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts +9 -0
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +46 -12
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/url-scrub.d.ts.map +1 -1
- package/dist/client/url-scrub.js +14 -0
- package/dist/client/url-scrub.js.map +1 -1
- package/dist/client/use-action.d.ts +2 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +10 -0
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.d.ts +2 -0
- package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.js +7 -1
- package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +17 -3
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +8 -2
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +57 -32
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/client/use-demo-mode-status.d.ts +12 -0
- package/dist/client/use-demo-mode-status.d.ts.map +1 -0
- package/dist/client/use-demo-mode-status.js +30 -0
- package/dist/client/use-demo-mode-status.js.map +1 -0
- package/dist/client/use-pausing-interval.d.ts.map +1 -1
- package/dist/client/use-pausing-interval.js +16 -4
- package/dist/client/use-pausing-interval.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/integrations/scope-store.js +1 -1
- package/dist/integrations/scope-store.js.map +1 -1
- package/dist/integrations/usage-budget-store.js +1 -1
- package/dist/integrations/usage-budget-store.js.map +1 -1
- package/dist/localization/default-messages.d.ts +41 -1
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +41 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp-client/workspace-servers.js +4 -4
- package/dist/mcp-client/workspace-servers.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/secrets/crypto.d.ts +7 -6
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +30 -11
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/server/action-change.d.ts +1 -0
- package/dist/server/action-change.d.ts.map +1 -1
- package/dist/server/action-change.js +4 -1
- package/dist/server/action-change.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +5 -0
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +1 -0
- package/dist/server/poll.js.map +1 -1
- package/dist/server/realtime-voice.d.ts +7 -0
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +222 -12
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/styles/agent-native.css +2 -2
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +6 -1
- package/dist/vite/client.js.map +1 -1
- package/docs/content/locales/ar-SA/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/ar-SA/template-plan.mdx +1 -1
- package/docs/content/locales/de-DE/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/de-DE/template-plan.mdx +1 -1
- package/docs/content/locales/es-ES/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/es-ES/template-plan.mdx +1 -1
- package/docs/content/locales/fr-FR/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/fr-FR/template-plan.mdx +1 -1
- package/docs/content/locales/hi-IN/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/hi-IN/template-plan.mdx +1 -1
- package/docs/content/locales/ja-JP/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/ja-JP/template-plan.mdx +1 -1
- package/docs/content/locales/ko-KR/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/ko-KR/template-plan.mdx +1 -1
- package/docs/content/locales/pt-BR/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/pt-BR/template-plan.mdx +1 -1
- package/docs/content/locales/zh-CN/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/zh-CN/template-plan.mdx +1 -1
- package/docs/content/locales/zh-TW/pr-visual-recap.mdx +25 -1
- package/docs/content/locales/zh-TW/template-plan.mdx +1 -1
- package/docs/content/pr-visual-recap.mdx +50 -1
- package/docs/content/template-plan.mdx +1 -1
- package/package.json +2 -2
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
|
@@ -30,7 +30,7 @@ The agent modifies data in SQL, but the UI runs in the browser. SSE bridges same
|
|
|
30
30
|
useDbSync({ queryClient });
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
For each non-own event, `useDbSync` bumps a per-source counter (e.g. `dashboards`, `analyses`, `settings`, `action`) and invalidates a small fixed list of framework-internal prefixes (`["action"]`, `["app-state"]`, `["__set_url__"]`, etc.). It does **not** blanket-invalidate templates' own data queries
|
|
33
|
+
For each non-own event, `useDbSync` bumps a per-source counter (e.g. `dashboards`, `analyses`, `settings`, `action`) and invalidates a small fixed list of framework-internal prefixes (`["action"]`, `["app-state"]`, `["__set_url__"]`, etc.). It does **not** blanket-invalidate templates' own data queries — that caused request storms in production. A successful mutating action refreshes active `useActionQuery` observers under the `["action"]` prefix. Browser actions carry a tab id so their originating tab ignores the sync echo while other tabs refresh. Legacy apps can opt into broader compatibility with `actionInvalidatePredicate`, but first-party apps should use action-backed or source-versioned query keys. Idle fallback polling runs once per minute; active agent work temporarily uses the faster cadence.
|
|
34
34
|
|
|
35
35
|
3. **Templates fold per-source counters into their query keys.** This is the pattern that makes "agent writes show up without a manual refresh" reliable:
|
|
36
36
|
|
|
@@ -117,7 +117,7 @@ useQuery({
|
|
|
117
117
|
| UI not updating after agent writes | Is `useDbSync` called with the correct `queryClient`? Does the affected query have an active observer? |
|
|
118
118
|
| Poll endpoint not responding | Is `/_agent-native/poll` accessible? Is the server running? |
|
|
119
119
|
| SSE not connecting | Is `/_agent-native/events` accessible and authenticated? Polling should still keep the UI fresh as fallback. |
|
|
120
|
-
| High CPU / event storms |
|
|
120
|
+
| High CPU / event storms | Use targeted source keys, settle bursty list counters, and avoid broad action invalidation. |
|
|
121
121
|
|
|
122
122
|
## Jitter Prevention
|
|
123
123
|
|
|
@@ -30,7 +30,7 @@ The agent modifies data in SQL, but the UI runs in the browser. SSE bridges same
|
|
|
30
30
|
useDbSync({ queryClient });
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
For each non-own event, `useDbSync` bumps a per-source counter (e.g. `dashboards`, `analyses`, `settings`, `action`) and invalidates a small fixed list of framework-internal prefixes (`["action"]`, `["app-state"]`, `["__set_url__"]`, etc.). It does **not** blanket-invalidate templates' own data queries
|
|
33
|
+
For each non-own event, `useDbSync` bumps a per-source counter (e.g. `dashboards`, `analyses`, `settings`, `action`) and invalidates a small fixed list of framework-internal prefixes (`["action"]`, `["app-state"]`, `["__set_url__"]`, etc.). It does **not** blanket-invalidate templates' own data queries — that caused request storms in production. A successful mutating action refreshes active `useActionQuery` observers under the `["action"]` prefix. Browser actions carry a tab id so their originating tab ignores the sync echo while other tabs refresh. Legacy apps can opt into broader compatibility with `actionInvalidatePredicate`, but first-party apps should use action-backed or source-versioned query keys. Idle fallback polling runs once per minute; active agent work temporarily uses the faster cadence.
|
|
34
34
|
|
|
35
35
|
3. **Templates fold per-source counters into their query keys.** This is the pattern that makes "agent writes show up without a manual refresh" reliable:
|
|
36
36
|
|
|
@@ -117,7 +117,7 @@ useQuery({
|
|
|
117
117
|
| UI not updating after agent writes | Is `useDbSync` called with the correct `queryClient`? Does the affected query have an active observer? |
|
|
118
118
|
| Poll endpoint not responding | Is `/_agent-native/poll` accessible? Is the server running? |
|
|
119
119
|
| SSE not connecting | Is `/_agent-native/events` accessible and authenticated? Polling should still keep the UI fresh as fallback. |
|
|
120
|
-
| High CPU / event storms |
|
|
120
|
+
| High CPU / event storms | Use targeted source keys, settle bursty list counters, and avoid broad action invalidation. |
|
|
121
121
|
|
|
122
122
|
## Jitter Prevention
|
|
123
123
|
|
|
@@ -170,9 +170,13 @@ Core routes plugin mounts these under `/_agent-native/secrets/` automatically:
|
|
|
170
170
|
- Values are stored in `app_secrets` (created on-demand; no migration
|
|
171
171
|
needed).
|
|
172
172
|
- Encrypted at rest with AES-256-GCM. Key material is derived from
|
|
173
|
-
`
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
`<APP_NAME>_SECRETS_ENCRYPTION_KEY` when set (for example,
|
|
174
|
+
`ANALYTICS_SECRETS_ENCRYPTION_KEY`), then `SECRETS_ENCRYPTION_KEY`, then
|
|
175
|
+
`BETTER_AUTH_SECRET`. App-scoped keys are useful when a local multi-app
|
|
176
|
+
workspace connects one app to its production database without replacing the
|
|
177
|
+
shared local authentication secret. If none is set, the framework uses a
|
|
178
|
+
machine-local fallback and logs a one-time warning — set stable key material
|
|
179
|
+
in production and in every runtime that reads the same encrypted data.
|
|
176
180
|
|
|
177
181
|
## Ad-hoc Keys
|
|
178
182
|
|
package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md
CHANGED
|
@@ -52,24 +52,54 @@ action before requesting microphone permission.
|
|
|
52
52
|
- Starting voice mode collapses the chat into a persistent bottom-end speech
|
|
53
53
|
orb. The orb stays visible above the chat even when the chat opens
|
|
54
54
|
automatically. Clicking it shows or hides chat without ending the session;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
opening chat slides the orb clear of the sidebar. The progressively disclosed
|
|
56
|
+
controls contain only settings and the separate end-session action.
|
|
57
|
+
- The orb's compact waveform stays visible for the full session and reflects
|
|
58
|
+
actual microphone or assistant audio activity. At silence it rests at its
|
|
59
|
+
baseline instead of turning into a loading spinner. While connecting, show a
|
|
60
|
+
distinct compact spinner; when the session becomes live, the assistant gives
|
|
61
|
+
one brief spoken greeting so readiness is unambiguous. Do not apply a
|
|
62
|
+
text-sized `max_output_tokens` cap to that audio greeting because audio tokens
|
|
63
|
+
can truncate it mid-sentence.
|
|
64
|
+
- The orb settings cog opens in place without ending voice mode or navigating
|
|
65
|
+
away. Nested pickers must not dismiss the settings popover. Language and
|
|
66
|
+
intelligence update the active Realtime session; the microphone picker swaps
|
|
67
|
+
the live WebRTC input track and remembers the browser-local device choice;
|
|
68
|
+
an output-voice change updates immediately only before the assistant has
|
|
69
|
+
emitted audio and otherwise applies to the next conversation, matching the
|
|
70
|
+
Realtime API's voice immutability rule.
|
|
58
71
|
- Semantic VAD keeps listening, starts responses automatically, and supports
|
|
59
72
|
barge-in while the agent is speaking.
|
|
60
73
|
- Function calls must cross the authenticated realtime tool bridge and enter
|
|
61
74
|
`executeAgentToolCall`. Never call `ActionEntry.run` directly: that bypasses
|
|
62
75
|
schema validation, approvals, audit/journal behavior, timeouts, redaction,
|
|
63
76
|
and mutation refreshes.
|
|
64
|
-
- Preserve the active browser-tab id in request context so `set-url`,
|
|
77
|
+
- Preserve the active browser-tab id in request context so `set-url-path`,
|
|
65
78
|
`set-search-params`, `view-screen`, and tab-scoped application state affect
|
|
66
|
-
the app the user is actually speaking to.
|
|
79
|
+
the app the user is actually speaking to. Realtime tool manifests are capped,
|
|
80
|
+
so prioritize `navigate`, `set-url-path`, `set-search-params`, and
|
|
81
|
+
`view-screen` before packing large template registries.
|
|
82
|
+
- Keep `tool-search` in the initial Realtime manifest. A successful specific
|
|
83
|
+
search may expand the live session with matching action schemas, but the
|
|
84
|
+
server must derive those schemas from its own registry, bind authorization
|
|
85
|
+
to the authenticated voice session, and continue execution through
|
|
86
|
+
`executeAgentToolCall`. Treat `session.update.tools` as a full replacement:
|
|
87
|
+
preserve the pinned navigation/discovery tools, evict lower-priority entries
|
|
88
|
+
within the manifest cap, and wait for `session.updated` before asking the
|
|
89
|
+
model to continue with a newly discovered tool.
|
|
67
90
|
- Do not persist audio or interim transcript deltas. Append completed user and
|
|
68
91
|
assistant utterances as ordinary text messages to the exact chat thread
|
|
69
|
-
captured when the session starts.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
92
|
+
captured when the session starts. Input transcription completes
|
|
93
|
+
asynchronously from assistant generation, so reserve provider conversation
|
|
94
|
+
item order and publish only the contiguous completed sequence; never use
|
|
95
|
+
completion arrival time as chat order. Ending voice mode opens that chat so
|
|
96
|
+
the user can continue over text. Store only compact lifecycle and latest
|
|
97
|
+
context at `application_state["realtime-voice-session"]`; delete it when the
|
|
98
|
+
session ends.
|
|
99
|
+
- Store the user-controlled language, intelligence, and output-voice choices at
|
|
100
|
+
`application_state["realtime-voice-prefs"]`. Keep this separate from
|
|
101
|
+
`voice-transcription-prefs`, which configures editable dictation rather than
|
|
102
|
+
the speech-to-speech session.
|
|
73
103
|
- Missing-key failures should open Settings focused on the user-scoped
|
|
74
104
|
`OPENAI_API_KEY` field. Never send, log, or echo the key to the browser.
|
|
75
105
|
|
|
@@ -2140,7 +2140,15 @@ function readAppChangelogMarkdown(
|
|
|
2140
2140
|
.map((file) => {
|
|
2141
2141
|
const filePath = path.join(pendingDir, file);
|
|
2142
2142
|
watchFile(filePath);
|
|
2143
|
-
|
|
2143
|
+
// `agent-native changelog add` prefixes every pending filename with its
|
|
2144
|
+
// date. Preserve that date when a hand-written entry omits `date:` so a
|
|
2145
|
+
// deployed What's new surface never groups an already-merged update
|
|
2146
|
+
// under an inaccurate "Unreleased" heading.
|
|
2147
|
+
const filenameDate = file.match(/^(\d{4}-\d{2}-\d{2})(?:-|\.md$)/)?.[1];
|
|
2148
|
+
return parsePendingEntry(
|
|
2149
|
+
fs.readFileSync(filePath, "utf-8"),
|
|
2150
|
+
filenameDate,
|
|
2151
|
+
);
|
|
2144
2152
|
});
|
|
2145
2153
|
return mergePendingChangelog(existing, pending);
|
|
2146
2154
|
}
|
|
@@ -30,7 +30,7 @@ The agent modifies data in SQL, but the UI runs in the browser. SSE bridges same
|
|
|
30
30
|
useDbSync({ queryClient });
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
For each non-own event, `useDbSync` bumps a per-source counter (e.g. `dashboards`, `analyses`, `settings`, `action`) and invalidates a small fixed list of framework-internal prefixes (`["action"]`, `["app-state"]`, `["__set_url__"]`, etc.). It does **not** blanket-invalidate templates' own data queries
|
|
33
|
+
For each non-own event, `useDbSync` bumps a per-source counter (e.g. `dashboards`, `analyses`, `settings`, `action`) and invalidates a small fixed list of framework-internal prefixes (`["action"]`, `["app-state"]`, `["__set_url__"]`, etc.). It does **not** blanket-invalidate templates' own data queries — that caused request storms in production. A successful mutating action refreshes active `useActionQuery` observers under the `["action"]` prefix. Browser actions carry a tab id so their originating tab ignores the sync echo while other tabs refresh. Legacy apps can opt into broader compatibility with `actionInvalidatePredicate`, but first-party apps should use action-backed or source-versioned query keys. Idle fallback polling runs once per minute; active agent work temporarily uses the faster cadence.
|
|
34
34
|
|
|
35
35
|
3. **Templates fold per-source counters into their query keys.** This is the pattern that makes "agent writes show up without a manual refresh" reliable:
|
|
36
36
|
|
|
@@ -117,7 +117,7 @@ useQuery({
|
|
|
117
117
|
| UI not updating after agent writes | Is `useDbSync` called with the correct `queryClient`? Does the affected query have an active observer? |
|
|
118
118
|
| Poll endpoint not responding | Is `/_agent-native/poll` accessible? Is the server running? |
|
|
119
119
|
| SSE not connecting | Is `/_agent-native/events` accessible and authenticated? Polling should still keep the UI fresh as fallback. |
|
|
120
|
-
| High CPU / event storms |
|
|
120
|
+
| High CPU / event storms | Use targeted source keys, settle bursty list counters, and avoid broad action invalidation. |
|
|
121
121
|
|
|
122
122
|
## Jitter Prevention
|
|
123
123
|
|
|
@@ -28,6 +28,10 @@ agent answers about browser recordings in the Analytics template.
|
|
|
28
28
|
`session-recording` access before reading private blob refs.
|
|
29
29
|
- SQL inline chunks are a local/dev fallback only; production should use
|
|
30
30
|
private or encrypted blob storage.
|
|
31
|
+
- A local Analytics app pointed at a production database must also use the key
|
|
32
|
+
that encrypted those replay blobs. Set `ANALYTICS_SECRETS_ENCRYPTION_KEY` in
|
|
33
|
+
an untracked local env file; do not replace the workspace-wide
|
|
34
|
+
`BETTER_AUTH_SECRET` just to read production replay storage.
|
|
31
35
|
- When sharing a replay with an external agent, use
|
|
32
36
|
`create-session-replay-agent-link`. It mints a two-hour `agent_access` URL
|
|
33
37
|
scoped to the recording, embeds a small SSR discovery payload on
|
|
@@ -98,11 +102,12 @@ agent answers about browser recordings in the Analytics template.
|
|
|
98
102
|
- Wait for all replay chunks (`isComplete`) before constructing the rrweb
|
|
99
103
|
`Replayer`. Progressive chunk publishes should only update the loading bar;
|
|
100
104
|
rebuilding the player mid-load desyncs the scrubber and playhead.
|
|
101
|
-
- Pass events to `Replayer` untouched
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
the outer wrapper
|
|
105
|
-
|
|
105
|
+
- Pass events to `Replayer` untouched. rrweb rebuilds them in a sandboxed iframe;
|
|
106
|
+
pre-processing DOM, stylesheet, resource, or mutation payloads makes playback
|
|
107
|
+
diverge from the captured page. Let rrweb own iframe sizing via Meta /
|
|
108
|
+
ViewportResize, and keep the outer wrapper in that same coordinate system for
|
|
109
|
+
fit-to-stage scaling. Never clamp only one layer, rewrite Meta widths, or force
|
|
110
|
+
iframe dimensions — that desyncs the FullSnapshot DOM and breaks the stage.
|
|
106
111
|
- The event timeline soft-highlights the active marker, auto-scrolls it into
|
|
107
112
|
view (pausing briefly after manual scroll), and supports search. It appears
|
|
108
113
|
beside the player from ~880px content width upward.
|
|
@@ -39,6 +39,14 @@ details live in `.agents/skills/`.
|
|
|
39
39
|
Prometheus credential slot. Treat it as demo-environment data: do not use it
|
|
40
40
|
for `REAL_DATA_REQUIRED`, saved analyses, or real user analytics answers
|
|
41
41
|
unless the user explicitly asks to inspect the demo dashboard.
|
|
42
|
+
- Framework Demo mode is separate from the built-in `demo` source. While Demo
|
|
43
|
+
mode is enabled, Analytics line and area charts reshape each returned numeric
|
|
44
|
+
series into a deterministic, natural-looking upward trend using that series'
|
|
45
|
+
actual minimum, maximum, and normalized volatility. Smooth source series stay
|
|
46
|
+
smooth; spiky source series keep larger swings. This is presentation-only:
|
|
47
|
+
query results, tables, metrics, exports, and non-time-series charts remain
|
|
48
|
+
unchanged, so do not cite the displayed intermediate line/area points as
|
|
49
|
+
retrieved source values.
|
|
42
50
|
- Every analytical answer should include enough audit context for the user to
|
|
43
51
|
trust it: source(s), time window, filters, sample size or row count,
|
|
44
52
|
join/match method when relevant, and caveats/gaps.
|
|
@@ -298,19 +306,15 @@ details live in `.agents/skills/`.
|
|
|
298
306
|
- `install-dashboard-template` installs a catalog template into normal
|
|
299
307
|
SQL-backed dashboards. Required: `templateId`. Optional: `dashboardId`,
|
|
300
308
|
`name`, `overwrite`, `forceNew`, and `mergePanels`.
|
|
301
|
-
- Keep
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
`
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
attributed main model in `$ai_model` or `model`, and the classifier in
|
|
311
|
-
`classifier_model`. Never group the by-main-model panel on
|
|
312
|
-
`classifier_model`, and never split these panels into a separately installable
|
|
313
|
-
observability template.
|
|
309
|
+
- Keep the canonical Agent Native dashboard
|
|
310
|
+
(`agent-native-templates-first-party`) focused: it includes one explicit
|
|
311
|
+
feedback-sentiment-by-model chart and one optional inferred-message-sentiment
|
|
312
|
+
chart, not the broader LLM cost, token, latency, or error suite. Explicit
|
|
313
|
+
feedback uses content-free `$ai_feedback` events with `sentiment` (`positive`
|
|
314
|
+
or `negative`) and model in `$ai_model` or `model`. Inferred sentiment uses
|
|
315
|
+
`$ai_sentiment` events with `method = 'llm'` and `sentiment` (`positive`,
|
|
316
|
+
`neutral`, or `negative`). Keep these panels in the canonical dashboard and
|
|
317
|
+
do not recreate a separately installable observability template.
|
|
314
318
|
- To add a template's panels to an existing dashboard, call
|
|
315
319
|
`install-dashboard-template` with `mergePanels: true` and the existing
|
|
316
320
|
`dashboardId`. It appends only the template panels whose id is not already
|
|
@@ -1,7 +1,47 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import {
|
|
2
|
+
import { writeAppStateForCurrentTab } from "@agent-native/core/application-state";
|
|
3
|
+
import {
|
|
4
|
+
getRequestOrgId,
|
|
5
|
+
getRequestUserEmail,
|
|
6
|
+
} from "@agent-native/core/server";
|
|
3
7
|
import { z } from "zod";
|
|
4
8
|
|
|
9
|
+
import { listDashboardSummaries } from "../server/lib/dashboards-store";
|
|
10
|
+
|
|
11
|
+
function normalizeDashboardName(value: string): string {
|
|
12
|
+
return value.trim().replace(/\s+/g, " ").toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async function resolveDashboardIdByName(name: string): Promise<string> {
|
|
16
|
+
const email = getRequestUserEmail();
|
|
17
|
+
if (!email) throw new Error("Dashboard navigation requires authentication.");
|
|
18
|
+
const orgId = getRequestOrgId() || null;
|
|
19
|
+
const dashboards = await listDashboardSummaries(
|
|
20
|
+
{ email, orgId },
|
|
21
|
+
{ kind: "sql", archived: "active", hidden: "visible" },
|
|
22
|
+
);
|
|
23
|
+
const normalized = normalizeDashboardName(name);
|
|
24
|
+
const withoutDashboardSuffix = normalized.replace(/\s+dashboard$/, "");
|
|
25
|
+
const matches = dashboards.filter((dashboard) => {
|
|
26
|
+
const candidate = normalizeDashboardName(dashboard.name);
|
|
27
|
+
return candidate === normalized || candidate === withoutDashboardSuffix;
|
|
28
|
+
});
|
|
29
|
+
if (matches.length === 0) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
`No accessible dashboard named "${name.trim()}" was found.`,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
if (matches.length === 1) return matches[0]!.id;
|
|
35
|
+
|
|
36
|
+
const ownedMatches = matches.filter(
|
|
37
|
+
(dashboard) => dashboard.ownerEmail.toLowerCase() === email.toLowerCase(),
|
|
38
|
+
);
|
|
39
|
+
if (ownedMatches.length === 1) return ownedMatches[0]!.id;
|
|
40
|
+
throw new Error(
|
|
41
|
+
`More than one accessible dashboard is named "${name.trim()}". Use its dashboard id instead.`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
5
45
|
export default defineAction({
|
|
6
46
|
description:
|
|
7
47
|
"Navigate the UI to a specific view, dashboard, analysis, extension, Analytics session recording, Monitoring tab (uptime checks, public status pages, or captured errors), or Analytics agent-admin surface. For filter changes (dashboard filter query params like ?f_date=... or session filters like ?range=30d&q=signup), use the framework-level `set-search-params` tool instead of this action.",
|
|
@@ -16,6 +56,14 @@ export default defineAction({
|
|
|
16
56
|
.string()
|
|
17
57
|
.optional()
|
|
18
58
|
.describe("Dashboard ID to open (used with view=adhoc)"),
|
|
59
|
+
dashboardName: z
|
|
60
|
+
.string()
|
|
61
|
+
.trim()
|
|
62
|
+
.min(1)
|
|
63
|
+
.optional()
|
|
64
|
+
.describe(
|
|
65
|
+
'Accessible SQL dashboard name to open when its id is unknown (for example, "Agent Native" or "Agent Native dashboard").',
|
|
66
|
+
),
|
|
19
67
|
analysisId: z
|
|
20
68
|
.string()
|
|
21
69
|
.optional()
|
|
@@ -70,6 +118,7 @@ export default defineAction({
|
|
|
70
118
|
if (
|
|
71
119
|
!args.view &&
|
|
72
120
|
!args.dashboardId &&
|
|
121
|
+
!args.dashboardName &&
|
|
73
122
|
!args.analysisId &&
|
|
74
123
|
!args.extensionId &&
|
|
75
124
|
!args.recordingId &&
|
|
@@ -81,13 +130,18 @@ export default defineAction({
|
|
|
81
130
|
!args.errorIssueId
|
|
82
131
|
) {
|
|
83
132
|
throw new Error(
|
|
84
|
-
"At least --view, --dashboardId, --analysisId, --extensionId, --recordingId, --agentsView, --dbAdminConnectionId, --monitoringView, --monitorId, --statusPageId, or --errorIssueId is required.",
|
|
133
|
+
"At least --view, --dashboardId, --dashboardName, --analysisId, --extensionId, --recordingId, --agentsView, --dbAdminConnectionId, --monitoringView, --monitorId, --statusPageId, or --errorIssueId is required.",
|
|
85
134
|
);
|
|
86
135
|
}
|
|
136
|
+
const dashboardId =
|
|
137
|
+
args.dashboardId ??
|
|
138
|
+
(args.dashboardName
|
|
139
|
+
? await resolveDashboardIdByName(args.dashboardName)
|
|
140
|
+
: undefined);
|
|
87
141
|
const nav: Record<string, string> = {};
|
|
88
142
|
if (args.view) nav.view = args.view === "overview" ? "ask" : args.view;
|
|
89
|
-
if (
|
|
90
|
-
nav.dashboardId =
|
|
143
|
+
if (dashboardId) {
|
|
144
|
+
nav.dashboardId = dashboardId;
|
|
91
145
|
if (!args.view) nav.view = "adhoc";
|
|
92
146
|
}
|
|
93
147
|
if (args.analysisId) {
|
|
@@ -133,7 +187,7 @@ export default defineAction({
|
|
|
133
187
|
nav.monitoringView = "errors";
|
|
134
188
|
if (!args.view) nav.view = "monitoring";
|
|
135
189
|
}
|
|
136
|
-
await
|
|
190
|
+
await writeAppStateForCurrentTab("navigate", nav);
|
|
137
191
|
|
|
138
192
|
const parts: string[] = [];
|
|
139
193
|
if (nav.view) parts.push(nav.view);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import {
|
|
3
|
-
readAppState,
|
|
4
|
-
readAppStateForCurrentTab,
|
|
5
|
-
} from "@agent-native/core/application-state";
|
|
2
|
+
import { readAppStateForCurrentTab } from "@agent-native/core/application-state";
|
|
6
3
|
import {
|
|
7
4
|
getRequestUserEmail,
|
|
8
5
|
getRequestOrgId,
|
|
@@ -37,12 +34,12 @@ export default defineAction({
|
|
|
37
34
|
readOnly: true,
|
|
38
35
|
run: async () => {
|
|
39
36
|
const navigation = await readAppStateForCurrentTab("navigation");
|
|
40
|
-
const url = (await
|
|
37
|
+
const url = (await readAppStateForCurrentTab("__url__")) as {
|
|
41
38
|
pathname?: string;
|
|
42
39
|
search?: string;
|
|
43
40
|
searchParams?: Record<string, string>;
|
|
44
41
|
} | null;
|
|
45
|
-
const selectedObject = await
|
|
42
|
+
const selectedObject = await readAppStateForCurrentTab("selected-object");
|
|
46
43
|
|
|
47
44
|
const screen: Record<string, unknown> = {};
|
|
48
45
|
if (navigation) screen.navigation = navigation;
|
|
@@ -4,6 +4,7 @@ import { useNavigate } from "react-router";
|
|
|
4
4
|
import { toast } from "sonner";
|
|
5
5
|
|
|
6
6
|
import { useAuth } from "@/components/auth/AuthProvider";
|
|
7
|
+
import { subscribeProviderCorpusJobSync } from "@/lib/provider-corpus-job-sync";
|
|
7
8
|
|
|
8
9
|
type ProviderCorpusJobStatus =
|
|
9
10
|
| "running"
|
|
@@ -41,23 +42,39 @@ type ProviderCorpusJobsResponse = {
|
|
|
41
42
|
|
|
42
43
|
const STORAGE_KEY = "analytics.providerCorpusJobNotifier.seen.v1";
|
|
43
44
|
const RECENT_WINDOW_MS = 24 * 60 * 60 * 1_000;
|
|
45
|
+
const ACTIVE_JOB_POLL_MS = 15_000;
|
|
46
|
+
|
|
47
|
+
export function providerCorpusJobsRefetchInterval(query: {
|
|
48
|
+
state: { data?: unknown };
|
|
49
|
+
}): number | false {
|
|
50
|
+
const jobs = (query.state.data as ProviderCorpusJobsResponse | undefined)
|
|
51
|
+
?.jobs;
|
|
52
|
+
return jobs?.some((entry) => entry.job.status === "running")
|
|
53
|
+
? ACTIVE_JOB_POLL_MS
|
|
54
|
+
: false;
|
|
55
|
+
}
|
|
44
56
|
|
|
45
57
|
export function ProviderCorpusJobNotifier() {
|
|
46
58
|
const { auth, isLoading } = useAuth();
|
|
47
59
|
const t = useT();
|
|
48
60
|
const navigate = useNavigate();
|
|
49
61
|
const seenRef = useRef<Record<string, string> | null>(null);
|
|
50
|
-
const { data } = useActionQuery(
|
|
62
|
+
const { data, refetch } = useActionQuery(
|
|
51
63
|
"provider-corpus-jobs",
|
|
52
64
|
{ operation: "list", limit: 20 },
|
|
53
65
|
{
|
|
54
66
|
enabled: Boolean(auth) && !isLoading,
|
|
55
|
-
refetchInterval:
|
|
56
|
-
refetchIntervalInBackground:
|
|
67
|
+
refetchInterval: providerCorpusJobsRefetchInterval,
|
|
68
|
+
refetchIntervalInBackground: false,
|
|
57
69
|
retry: false,
|
|
58
70
|
},
|
|
59
71
|
);
|
|
60
72
|
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (!auth || isLoading) return;
|
|
75
|
+
return subscribeProviderCorpusJobSync(() => void refetch());
|
|
76
|
+
}, [auth, isLoading, refetch]);
|
|
77
|
+
|
|
61
78
|
useEffect(() => {
|
|
62
79
|
const jobs = (data as ProviderCorpusJobsResponse | undefined)?.jobs ?? [];
|
|
63
80
|
if (!jobs.length) return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useT } from "@agent-native/core/client";
|
|
1
|
+
import { useDemoModeStatus, useT } from "@agent-native/core/client";
|
|
2
2
|
import { EmbeddedExtension } from "@agent-native/core/client/extensions";
|
|
3
3
|
import {
|
|
4
4
|
IconArrowsSort,
|
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
55
55
|
|
|
56
56
|
const PAGE_SIZE_OPTIONS = [10, 25, 50, 100];
|
|
57
|
+
import { createDemoChartTrendRows } from "@/lib/demo-chart-trend";
|
|
57
58
|
import { useSqlQuery } from "@/lib/sql-query";
|
|
58
59
|
import { serializePanelSql } from "@/pages/adhoc/sql-dashboard/panel-sql";
|
|
59
60
|
import { pivotRows } from "@/pages/adhoc/sql-dashboard/pivot";
|
|
@@ -994,6 +995,7 @@ export function SqlChart({
|
|
|
994
995
|
onExportCsvChange,
|
|
995
996
|
}: SqlChartProps) {
|
|
996
997
|
const t = useT();
|
|
998
|
+
const { enabled: demoModeEnabled } = useDemoModeStatus();
|
|
997
999
|
// Hooks must be called unconditionally before any early return.
|
|
998
1000
|
const isSection = panel.chartType === "section";
|
|
999
1001
|
const isExtension = panel.chartType === "extension";
|
|
@@ -1004,6 +1006,7 @@ export function SqlChart({
|
|
|
1004
1006
|
const {
|
|
1005
1007
|
data: result,
|
|
1006
1008
|
isLoading,
|
|
1009
|
+
isFetching,
|
|
1007
1010
|
error: queryError,
|
|
1008
1011
|
} = useSqlQuery(
|
|
1009
1012
|
["sql-chart", panel.id, sql, panel.source],
|
|
@@ -1023,7 +1026,7 @@ export function SqlChart({
|
|
|
1023
1026
|
const error =
|
|
1024
1027
|
rawRows.length === 0 ? (result?.error ?? queryErrorMessage) : undefined;
|
|
1025
1028
|
|
|
1026
|
-
const { rows, forcedYKeys } = useMemo(() => {
|
|
1029
|
+
const { rows: queryRows, forcedYKeys } = useMemo(() => {
|
|
1027
1030
|
if (panel.config?.pivot && rawRows.length) {
|
|
1028
1031
|
const pivoted = pivotRows(rawRows, panel.config.pivot);
|
|
1029
1032
|
return { rows: pivoted.rows, forcedYKeys: pivoted.seriesKeys };
|
|
@@ -1032,8 +1035,20 @@ export function SqlChart({
|
|
|
1032
1035
|
}, [rawRows, panel.config?.pivot]);
|
|
1033
1036
|
|
|
1034
1037
|
const { xKey, yKeys } = useMemo(
|
|
1035
|
-
() => detectKeys(
|
|
1036
|
-
[
|
|
1038
|
+
() => detectKeys(queryRows, panel.config, forcedYKeys),
|
|
1039
|
+
[queryRows, panel.config, forcedYKeys],
|
|
1040
|
+
);
|
|
1041
|
+
const shouldCreateDemoTrend =
|
|
1042
|
+
demoModeEnabled &&
|
|
1043
|
+
(panel.chartType === "line" ||
|
|
1044
|
+
panel.chartType === "area" ||
|
|
1045
|
+
(panel.chartType as string) === "stacked-area");
|
|
1046
|
+
const rows = useMemo(
|
|
1047
|
+
() =>
|
|
1048
|
+
shouldCreateDemoTrend
|
|
1049
|
+
? createDemoChartTrendRows(queryRows, yKeys, panel.id)
|
|
1050
|
+
: queryRows,
|
|
1051
|
+
[queryRows, yKeys, panel.id, shouldCreateDemoTrend],
|
|
1037
1052
|
);
|
|
1038
1053
|
|
|
1039
1054
|
// Section panels are pure layout — no query, no chart. Render a header with
|
|
@@ -1079,7 +1094,7 @@ export function SqlChart({
|
|
|
1079
1094
|
: "min-h-[250px]";
|
|
1080
1095
|
const placeholderPadY = isMetric ? "py-2" : "py-8";
|
|
1081
1096
|
|
|
1082
|
-
if (!loadData || isLoading) {
|
|
1097
|
+
if (!loadData || isLoading || isFetching) {
|
|
1083
1098
|
return <SqlChartLoadingSkeleton panel={panel} />;
|
|
1084
1099
|
}
|
|
1085
1100
|
|
|
@@ -68,6 +68,20 @@ type SidebarDashboard = {
|
|
|
68
68
|
/** Id of the dashboard this one nests under in the sidebar, if any. */
|
|
69
69
|
parentId?: string;
|
|
70
70
|
};
|
|
71
|
+
|
|
72
|
+
const SIDEBAR_SYNC_SETTLE_MS = 500;
|
|
73
|
+
|
|
74
|
+
function useSettledSyncVersion(version: number): number {
|
|
75
|
+
const [settledVersion, setSettledVersion] = useState(version);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
const timeout = window.setTimeout(
|
|
78
|
+
() => setSettledVersion(version),
|
|
79
|
+
SIDEBAR_SYNC_SETTLE_MS,
|
|
80
|
+
);
|
|
81
|
+
return () => window.clearTimeout(timeout);
|
|
82
|
+
}, [version]);
|
|
83
|
+
return settledVersion;
|
|
84
|
+
}
|
|
71
85
|
import {
|
|
72
86
|
DevDatabaseLink,
|
|
73
87
|
FeedbackButton,
|
|
@@ -1751,12 +1765,13 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
|
|
|
1751
1765
|
|
|
1752
1766
|
// Fold per-source counters into sidebar list query keys so agent-driven
|
|
1753
1767
|
// create/rename/archive/delete shows up without a manual refresh. We
|
|
1754
|
-
//
|
|
1755
|
-
//
|
|
1756
|
-
//
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1768
|
+
// Domain counters keep these lists targeted. Folding the generic `action`
|
|
1769
|
+
// counter into the keys makes unrelated background work cancel and restart
|
|
1770
|
+
// both sidebar reads.
|
|
1771
|
+
const dashboardsSync = useSettledSyncVersion(
|
|
1772
|
+
useChangeVersions(["dashboards"]),
|
|
1773
|
+
);
|
|
1774
|
+
const analysesSync = useSettledSyncVersion(useChangeVersions(["analyses"]));
|
|
1760
1775
|
const dashboardsSyncRef = useRef(dashboardsSync);
|
|
1761
1776
|
const analysesSyncRef = useRef(analysesSync);
|
|
1762
1777
|
dashboardsSyncRef.current = dashboardsSync;
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
.analytics-chat-intro {
|
|
187
187
|
display: grid;
|
|
188
188
|
width: 100%;
|
|
189
|
-
max-width: min(
|
|
189
|
+
max-width: min(570px, 90%);
|
|
190
190
|
gap: 0.5rem;
|
|
191
191
|
margin: 0 auto 1rem;
|
|
192
192
|
text-align: center;
|
|
@@ -223,12 +223,12 @@
|
|
|
223
223
|
[data-agent-empty-state="centered"]
|
|
224
224
|
.agent-plan-mode-callout {
|
|
225
225
|
width: 100%;
|
|
226
|
-
max-width: min(
|
|
226
|
+
max-width: min(570px, 90%);
|
|
227
227
|
padding: 0;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.analytics-chat-panel [data-agent-empty-state="centered"] .agent-composer-root {
|
|
231
|
-
min-height:
|
|
231
|
+
min-height: 7.875rem;
|
|
232
232
|
border-color: hsl(var(--border));
|
|
233
233
|
border-radius: 1rem;
|
|
234
234
|
background: hsl(var(--card));
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
.analytics-chat-panel
|
|
389
389
|
[data-agent-empty-state="centered"]
|
|
390
390
|
.agent-composer-prosemirror {
|
|
391
|
-
min-height:
|
|
391
|
+
min-height: 5.0625rem;
|
|
392
392
|
font-size: 1rem;
|
|
393
393
|
line-height: 1.625rem;
|
|
394
394
|
}
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
.analytics-chat-panel
|
|
427
427
|
[data-agent-empty-state="centered"]
|
|
428
428
|
.agent-composer-root {
|
|
429
|
-
min-height:
|
|
429
|
+
min-height: 6.75rem;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
|
|
@@ -513,6 +513,11 @@
|
|
|
513
513
|
overflow-wrap: anywhere;
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
+
.analytics-sessions-filter-search {
|
|
517
|
+
flex: 1 1 100%;
|
|
518
|
+
order: 4;
|
|
519
|
+
}
|
|
520
|
+
|
|
516
521
|
@container agent-native-main (min-width: 720px) {
|
|
517
522
|
.analytics-sessions-page {
|
|
518
523
|
padding-inline: 1.5rem;
|
|
@@ -520,6 +525,15 @@
|
|
|
520
525
|
}
|
|
521
526
|
|
|
522
527
|
@container analytics-sessions (min-width: 640px) {
|
|
528
|
+
.analytics-sessions-filter-bar {
|
|
529
|
+
flex-wrap: nowrap;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.analytics-sessions-filter-search {
|
|
533
|
+
flex: 1 1 0;
|
|
534
|
+
order: initial;
|
|
535
|
+
}
|
|
536
|
+
|
|
523
537
|
.analytics-session-row {
|
|
524
538
|
grid-template-columns: 104px minmax(0, 0.9fr) minmax(0, 1.15fr);
|
|
525
539
|
align-items: center;
|
|
@@ -551,21 +565,6 @@
|
|
|
551
565
|
.analytics-session-badges {
|
|
552
566
|
justify-content: flex-end;
|
|
553
567
|
}
|
|
554
|
-
|
|
555
|
-
.analytics-sessions-filter-extra {
|
|
556
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
@container analytics-sessions (min-width: 920px) {
|
|
561
|
-
.analytics-sessions-filter-grid {
|
|
562
|
-
grid-template-columns: 150px minmax(260px, 1fr) 160px auto auto;
|
|
563
|
-
align-items: center;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
.analytics-sessions-filter-label {
|
|
567
|
-
min-width: 0;
|
|
568
|
-
}
|
|
569
568
|
}
|
|
570
569
|
|
|
571
570
|
@container analytics-sessions (min-width: 960px) {
|