@agent-native/core 0.99.3 → 0.100.1
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 +21 -0
- package/corpus/core/docs/content/agent-surfaces.mdx +43 -0
- package/corpus/core/docs/content/external-agents.mdx +11 -0
- package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +30 -0
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +34 -0
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +34 -0
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +34 -0
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +11 -0
- package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +31 -0
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +32 -0
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +32 -0
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +33 -0
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +29 -0
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +29 -0
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +8 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/context-xray/actions/context-evict.ts +11 -0
- package/corpus/core/src/agent/context-xray/actions/context-pin.ts +11 -0
- package/corpus/core/src/agent/context-xray/actions/context-preview-get.ts +134 -0
- package/corpus/core/src/agent/context-xray/actions/context-restore.ts +11 -0
- package/corpus/core/src/agent/context-xray/actions/errors.ts +20 -0
- package/corpus/core/src/agent/context-xray/manifest.ts +106 -7
- package/corpus/core/src/agent/engine/context-directives-transform.ts +5 -1
- package/corpus/core/src/agent/production-agent.ts +100 -38
- package/corpus/core/src/agent/run-loop-with-resume.ts +7 -2
- package/corpus/core/src/client/AgentPanel.tsx +35 -8
- package/corpus/core/src/client/agent-page/AgentContextTab.tsx +501 -0
- package/corpus/core/src/client/agent-page/AgentJobsTab.tsx +370 -0
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +1084 -0
- package/corpus/core/src/client/agent-page/types.ts +18 -0
- package/corpus/core/src/client/agent-page/use-jobs.ts +150 -0
- package/corpus/core/src/client/context-xray/ContextMeter.tsx +22 -5
- package/corpus/core/src/client/context-xray/ContextTreemap.tsx +16 -1
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +168 -3
- package/corpus/core/src/client/context-xray/format.ts +6 -0
- package/corpus/core/src/client/index.ts +6 -0
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +51 -23
- package/corpus/core/src/client/settings/AutomationsSection.tsx +407 -387
- package/corpus/core/src/jobs/actions/list-recurring-jobs.ts +105 -0
- package/corpus/core/src/jobs/actions/manage-recurring-job.ts +85 -0
- package/corpus/core/src/jobs/tools.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +110 -0
- package/corpus/core/src/mcp/build-server.ts +1 -0
- package/corpus/core/src/mcp/connect-route.ts +62 -65
- package/corpus/core/src/server/action-discovery.ts +23 -0
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +174 -2
- package/corpus/core/src/server/agent-chat-plugin.ts +175 -2
- package/corpus/core/src/server/auth.ts +1 -7
- package/corpus/core/src/server/google-oauth.ts +1 -7
- package/corpus/core/src/server/workspace-oauth.ts +31 -0
- package/corpus/core/src/shared/context-xray.ts +84 -1
- package/corpus/core/src/shared/mcp-connect-content.ts +130 -0
- package/corpus/core/src/templates/default/app/routes/_index.tsx +11 -0
- package/corpus/core/src/templates/default/app/routes/agent.tsx +33 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
- package/corpus/core/src/triggers/actions/list-automations.ts +99 -0
- package/corpus/core/src/triggers/actions/manage-automation.ts +78 -0
- package/corpus/templates/analytics/actions/data-source-status.ts +33 -15
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +149 -24
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +17 -0
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +8 -0
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/analytics/app/i18n-data.ts +1 -0
- package/corpus/templates/analytics/app/routes/agent.tsx +5 -0
- package/corpus/templates/analytics/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-13-analytics-answers-can-use-built-in-first-party-event-data.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-13-chart-legends-can-filter-to-one-series-or-hide-a-series-on-h.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-13-gpt-5-6-luna-answers-now-recover-normally-instead-of-showing.md +6 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -2
- package/corpus/templates/assets/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/assets/app/routes/agent.tsx +5 -0
- package/corpus/templates/assets/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +4 -1
- package/corpus/templates/brain/app/lib/brain.ts +11 -0
- package/corpus/templates/brain/app/root.tsx +15 -1
- package/corpus/templates/brain/app/routes/agent.tsx +11 -0
- package/corpus/templates/brain/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/calendar/AGENTS.md +9 -0
- package/corpus/templates/calendar/actions/list-events.ts +659 -44
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -0
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/calendar/app/root.tsx +17 -1
- package/corpus/templates/calendar/app/routes/_app.agent.tsx +25 -0
- package/corpus/templates/calendar/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-13-calendar-inventory-reads-report-source-coverage.md +6 -0
- package/corpus/templates/calendar/server/lib/calendar-connector-catalog.ts +8 -0
- package/corpus/templates/calendar/server/lib/google-calendar.ts +173 -51
- package/corpus/templates/calendar/server/lib/ical-fetcher.ts +13 -2
- package/corpus/templates/calendar/server/plugins/agent-chat.ts +5 -3
- package/corpus/templates/calendar/shared/api.ts +2 -0
- package/corpus/templates/chat/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +7 -0
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -0
- package/corpus/templates/chat/app/root.tsx +24 -2
- package/corpus/templates/chat/app/routes/agent.tsx +15 -0
- package/corpus/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +8 -0
- package/corpus/templates/clips/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +2 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/clips/app/root.tsx +7 -1
- package/corpus/templates/clips/app/routes/_app.agent.tsx +15 -0
- package/corpus/templates/clips/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/content/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +36 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/content/app/i18n-data.ts +44 -6
- package/corpus/templates/content/app/root.tsx +8 -0
- package/corpus/templates/content/app/routes/_app.agent.tsx +15 -0
- package/corpus/templates/content/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/design/app/i18n-data.ts +20 -0
- package/corpus/templates/design/app/root.tsx +7 -1
- package/corpus/templates/design/app/routes/agent.tsx +15 -0
- package/corpus/templates/design/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/dispatch/app/dispatch-extensions.tsx +10 -1
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +20 -0
- package/corpus/templates/dispatch/app/root.tsx +7 -2
- package/corpus/templates/dispatch/app/routes/agent.tsx +18 -0
- package/corpus/templates/dispatch/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +35 -0
- package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/forms/app/root.tsx +6 -1
- package/corpus/templates/forms/app/routes/_app.agent.tsx +15 -0
- package/corpus/templates/forms/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +14 -2
- package/corpus/templates/macros/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/macros/app/root.tsx +17 -2
- package/corpus/templates/macros/app/routes/agent.tsx +15 -0
- package/corpus/templates/macros/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/mail/AGENTS.md +12 -0
- package/corpus/templates/mail/actions/list-emails.ts +486 -4
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +42 -0
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +6 -0
- package/corpus/templates/mail/app/routes/agent.tsx +15 -0
- package/corpus/templates/mail/changelog/2026-07-13-coverage-aware-connected-inbox-inventory.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/mail/server/db/schema.ts +17 -0
- package/corpus/templates/mail/server/lib/google-auth.ts +33 -5
- package/corpus/templates/mail/server/lib/inventory-cursor.ts +406 -0
- package/corpus/templates/mail/server/lib/list-inbox-emails.ts +21 -2
- package/corpus/templates/mail/server/lib/mail-connector-catalog.ts +8 -0
- package/corpus/templates/mail/server/plugins/agent-chat.ts +4 -9
- package/corpus/templates/mail/server/plugins/db.ts +20 -0
- package/corpus/templates/plan/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/plan/app/root.tsx +8 -0
- package/corpus/templates/plan/app/routes/agent.tsx +15 -0
- package/corpus/templates/plan/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/slides/app/root.tsx +10 -1
- package/corpus/templates/slides/app/routes/agent.tsx +15 -0
- package/corpus/templates/slides/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/dist/agent/context-xray/actions/context-evict.js +5 -2
- package/dist/agent/context-xray/actions/context-evict.js.map +1 -1
- package/dist/agent/context-xray/actions/context-pin.js +5 -2
- package/dist/agent/context-xray/actions/context-pin.js.map +1 -1
- package/dist/agent/context-xray/actions/context-preview-get.d.ts +17 -0
- package/dist/agent/context-xray/actions/context-preview-get.d.ts.map +1 -0
- package/dist/agent/context-xray/actions/context-preview-get.js +94 -0
- package/dist/agent/context-xray/actions/context-preview-get.js.map +1 -0
- package/dist/agent/context-xray/actions/context-restore.js +5 -2
- package/dist/agent/context-xray/actions/context-restore.js.map +1 -1
- package/dist/agent/context-xray/actions/errors.d.ts +3 -0
- package/dist/agent/context-xray/actions/errors.d.ts.map +1 -1
- package/dist/agent/context-xray/actions/errors.js +6 -0
- package/dist/agent/context-xray/actions/errors.js.map +1 -1
- package/dist/agent/context-xray/manifest.d.ts +18 -1
- package/dist/agent/context-xray/manifest.d.ts.map +1 -1
- package/dist/agent/context-xray/manifest.js +68 -6
- package/dist/agent/context-xray/manifest.js.map +1 -1
- package/dist/agent/engine/context-directives-transform.d.ts +2 -0
- package/dist/agent/engine/context-directives-transform.d.ts.map +1 -1
- package/dist/agent/engine/context-directives-transform.js +2 -1
- package/dist/agent/engine/context-directives-transform.js.map +1 -1
- package/dist/agent/production-agent.d.ts +15 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +74 -36
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +6 -3
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +5 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +9 -11
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/agent-page/AgentContextTab.d.ts +5 -0
- package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -0
- package/dist/client/agent-page/AgentContextTab.js +202 -0
- package/dist/client/agent-page/AgentContextTab.js.map +1 -0
- package/dist/client/agent-page/AgentJobsTab.d.ts +3 -0
- package/dist/client/agent-page/AgentJobsTab.d.ts.map +1 -0
- package/dist/client/agent-page/AgentJobsTab.js +98 -0
- package/dist/client/agent-page/AgentJobsTab.js.map +1 -0
- package/dist/client/agent-page/AgentTabsPage.d.ts +20 -0
- package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -0
- package/dist/client/agent-page/AgentTabsPage.js +420 -0
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -0
- package/dist/client/agent-page/types.d.ts +17 -0
- package/dist/client/agent-page/types.d.ts.map +1 -0
- package/dist/client/agent-page/types.js +9 -0
- package/dist/client/agent-page/types.js.map +1 -0
- package/dist/client/agent-page/use-jobs.d.ts +61 -0
- package/dist/client/agent-page/use-jobs.d.ts.map +1 -0
- package/dist/client/agent-page/use-jobs.js +71 -0
- package/dist/client/agent-page/use-jobs.js.map +1 -0
- package/dist/client/context-xray/ContextMeter.d.ts +3 -1
- package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
- package/dist/client/context-xray/ContextMeter.js +14 -5
- package/dist/client/context-xray/ContextMeter.js.map +1 -1
- package/dist/client/context-xray/ContextTreemap.d.ts +3 -2
- package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
- package/dist/client/context-xray/ContextTreemap.js +9 -1
- package/dist/client/context-xray/ContextTreemap.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +95 -20
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/context-xray/format.d.ts.map +1 -1
- package/dist/client/context-xray/format.js +12 -0
- package/dist/client/context-xray/format.js.map +1 -1
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts +9 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +26 -10
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/settings/AutomationsSection.d.ts +9 -0
- package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
- package/dist/client/settings/AutomationsSection.js +128 -147
- package/dist/client/settings/AutomationsSection.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/actions/list-recurring-jobs.d.ts +21 -0
- package/dist/jobs/actions/list-recurring-jobs.d.ts.map +1 -0
- package/dist/jobs/actions/list-recurring-jobs.js +74 -0
- package/dist/jobs/actions/list-recurring-jobs.js.map +1 -0
- package/dist/jobs/actions/manage-recurring-job.d.ts +18 -0
- package/dist/jobs/actions/manage-recurring-job.d.ts.map +1 -0
- package/dist/jobs/actions/manage-recurring-job.js +68 -0
- package/dist/jobs/actions/manage-recurring-job.js.map +1 -0
- package/dist/jobs/tools.d.ts +13 -0
- package/dist/jobs/tools.d.ts.map +1 -1
- package/dist/jobs/tools.js +1 -1
- package/dist/jobs/tools.js.map +1 -1
- package/dist/localization/default-messages.d.ts +96 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +96 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +1 -0
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +44 -59
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +23 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat/prompt-resources.d.ts +14 -0
- package/dist/server/agent-chat/prompt-resources.d.ts.map +1 -1
- package/dist/server/agent-chat/prompt-resources.js +139 -2
- package/dist/server/agent-chat/prompt-resources.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +1 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +136 -3
- 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/auth.d.ts.map +1 -1
- package/dist/server/auth.js +1 -4
- package/dist/server/auth.js.map +1 -1
- package/dist/server/google-oauth.d.ts.map +1 -1
- package/dist/server/google-oauth.js +1 -4
- package/dist/server/google-oauth.js.map +1 -1
- package/dist/server/workspace-oauth.d.ts +11 -0
- package/dist/server/workspace-oauth.d.ts.map +1 -0
- package/dist/server/workspace-oauth.js +25 -0
- package/dist/server/workspace-oauth.js.map +1 -0
- package/dist/shared/context-xray.d.ts +45 -1
- package/dist/shared/context-xray.d.ts.map +1 -1
- package/dist/shared/context-xray.js +12 -0
- package/dist/shared/context-xray.js.map +1 -1
- package/dist/shared/mcp-connect-content.d.ts +37 -0
- package/dist/shared/mcp-connect-content.d.ts.map +1 -0
- package/dist/shared/mcp-connect-content.js +92 -0
- package/dist/shared/mcp-connect-content.js.map +1 -0
- package/dist/templates/default/app/routes/_index.tsx +11 -0
- package/dist/templates/default/app/routes/agent.tsx +33 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
- package/dist/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
- package/dist/triggers/actions/list-automations.d.ts +24 -0
- package/dist/triggers/actions/list-automations.d.ts.map +1 -0
- package/dist/triggers/actions/list-automations.js +72 -0
- package/dist/triggers/actions/list-automations.js.map +1 -0
- package/dist/triggers/actions/manage-automation.d.ts +18 -0
- package/dist/triggers/actions/manage-automation.d.ts.map +1 -0
- package/dist/triggers/actions/manage-automation.js +60 -0
- package/dist/triggers/actions/manage-automation.js.map +1 -0
- package/docs/content/agent-surfaces.mdx +43 -0
- package/docs/content/external-agents.mdx +11 -0
- package/docs/content/locales/ar-SA/agent-surfaces.mdx +30 -0
- package/docs/content/locales/ar-SA/external-agents.mdx +9 -0
- package/docs/content/locales/de-DE/agent-surfaces.mdx +34 -0
- package/docs/content/locales/de-DE/external-agents.mdx +10 -0
- package/docs/content/locales/es-ES/agent-surfaces.mdx +34 -0
- package/docs/content/locales/es-ES/external-agents.mdx +10 -0
- package/docs/content/locales/fr-FR/agent-surfaces.mdx +34 -0
- package/docs/content/locales/fr-FR/external-agents.mdx +11 -0
- package/docs/content/locales/hi-IN/agent-surfaces.mdx +31 -0
- package/docs/content/locales/hi-IN/external-agents.mdx +9 -0
- package/docs/content/locales/ja-JP/agent-surfaces.mdx +32 -0
- package/docs/content/locales/ja-JP/external-agents.mdx +10 -0
- package/docs/content/locales/ko-KR/agent-surfaces.mdx +32 -0
- package/docs/content/locales/ko-KR/external-agents.mdx +9 -0
- package/docs/content/locales/pt-BR/agent-surfaces.mdx +33 -0
- package/docs/content/locales/pt-BR/external-agents.mdx +10 -0
- package/docs/content/locales/zh-CN/agent-surfaces.mdx +29 -0
- package/docs/content/locales/zh-CN/external-agents.mdx +8 -0
- package/docs/content/locales/zh-TW/agent-surfaces.mdx +29 -0
- package/docs/content/locales/zh-TW/external-agents.mdx +8 -0
- package/package.json +1 -1
- package/src/templates/default/app/routes/_index.tsx +11 -0
- package/src/templates/default/app/routes/agent.tsx +33 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
- package/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
|
@@ -45,6 +45,11 @@ import {
|
|
|
45
45
|
|
|
46
46
|
import { Button } from "@/components/ui/button";
|
|
47
47
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
48
|
+
import {
|
|
49
|
+
Popover,
|
|
50
|
+
PopoverAnchor,
|
|
51
|
+
PopoverContent,
|
|
52
|
+
} from "@/components/ui/popover";
|
|
48
53
|
import {
|
|
49
54
|
Select,
|
|
50
55
|
SelectContent,
|
|
@@ -435,10 +440,18 @@ export function sortTooltipPayloadItems<
|
|
|
435
440
|
});
|
|
436
441
|
}
|
|
437
442
|
|
|
443
|
+
export function getHiddenSeriesKeysAfterFilter(
|
|
444
|
+
keys: string[],
|
|
445
|
+
filteredKey: string,
|
|
446
|
+
): Set<string> {
|
|
447
|
+
return new Set(keys.filter((key) => key !== filteredKey));
|
|
448
|
+
}
|
|
449
|
+
|
|
438
450
|
function useSeriesVisibility(keys: string[]): {
|
|
439
451
|
hiddenKeys: Set<string>;
|
|
440
452
|
visibleKeys: string[];
|
|
441
453
|
toggleSeries: (key: string) => void;
|
|
454
|
+
filterSeries: (key: string) => void;
|
|
442
455
|
} {
|
|
443
456
|
const [hiddenKeys, setHiddenKeys] = useState<Set<string>>(() => new Set());
|
|
444
457
|
|
|
@@ -473,22 +486,61 @@ function useSeriesVisibility(keys: string[]): {
|
|
|
473
486
|
[keys],
|
|
474
487
|
);
|
|
475
488
|
|
|
476
|
-
|
|
489
|
+
const filterSeries = useCallback(
|
|
490
|
+
(key: string) => {
|
|
491
|
+
setHiddenKeys(getHiddenSeriesKeysAfterFilter(keys, key));
|
|
492
|
+
},
|
|
493
|
+
[keys],
|
|
494
|
+
);
|
|
495
|
+
|
|
496
|
+
return { hiddenKeys, visibleKeys, toggleSeries, filterSeries };
|
|
477
497
|
}
|
|
478
498
|
|
|
479
|
-
function SeriesLegend({
|
|
499
|
+
export function SeriesLegend({
|
|
480
500
|
keys,
|
|
481
501
|
colors,
|
|
482
502
|
panel,
|
|
483
503
|
hiddenKeys,
|
|
484
504
|
onToggleKey,
|
|
505
|
+
onFilterKey,
|
|
485
506
|
}: {
|
|
486
507
|
keys: string[];
|
|
487
508
|
colors: string[];
|
|
488
509
|
panel: SqlPanel;
|
|
489
510
|
hiddenKeys?: Set<string>;
|
|
490
511
|
onToggleKey?: (key: string) => void;
|
|
512
|
+
onFilterKey?: (key: string) => void;
|
|
491
513
|
}) {
|
|
514
|
+
const t = useT();
|
|
515
|
+
const hasLegendActions = Boolean(onToggleKey || onFilterKey);
|
|
516
|
+
const [openKey, setOpenKey] = useState<string | null>(null);
|
|
517
|
+
const closeTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
518
|
+
|
|
519
|
+
const clearCloseTimeout = useCallback(() => {
|
|
520
|
+
if (closeTimeoutRef.current) {
|
|
521
|
+
clearTimeout(closeTimeoutRef.current);
|
|
522
|
+
closeTimeoutRef.current = null;
|
|
523
|
+
}
|
|
524
|
+
}, []);
|
|
525
|
+
|
|
526
|
+
const openLegendActions = useCallback(
|
|
527
|
+
(key: string) => {
|
|
528
|
+
clearCloseTimeout();
|
|
529
|
+
setOpenKey(key);
|
|
530
|
+
},
|
|
531
|
+
[clearCloseTimeout],
|
|
532
|
+
);
|
|
533
|
+
|
|
534
|
+
const scheduleCloseLegendActions = useCallback(() => {
|
|
535
|
+
clearCloseTimeout();
|
|
536
|
+
closeTimeoutRef.current = setTimeout(() => {
|
|
537
|
+
setOpenKey(null);
|
|
538
|
+
closeTimeoutRef.current = null;
|
|
539
|
+
}, 120);
|
|
540
|
+
}, [clearCloseTimeout]);
|
|
541
|
+
|
|
542
|
+
useEffect(() => () => clearCloseTimeout(), [clearCloseTimeout]);
|
|
543
|
+
|
|
492
544
|
if (!shouldShowLegend(panel, keys.length)) return null;
|
|
493
545
|
|
|
494
546
|
return (
|
|
@@ -499,28 +551,94 @@ function SeriesLegend({
|
|
|
499
551
|
const label = formatSeriesLabelForPanel(panel, key);
|
|
500
552
|
const color = colors[i % colors.length];
|
|
501
553
|
return (
|
|
502
|
-
<
|
|
554
|
+
<Popover
|
|
503
555
|
key={key}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
className={`inline-flex max-w-[14rem] items-center gap-1.5 rounded-sm text-left transition-opacity hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring ${
|
|
507
|
-
hidden ? "opacity-35" : "opacity-100"
|
|
508
|
-
} ${onToggleKey ? "cursor-pointer" : "cursor-default"}`}
|
|
509
|
-
title={label}
|
|
510
|
-
onClick={() => onToggleKey?.(key)}
|
|
556
|
+
open={openKey === key}
|
|
557
|
+
onOpenChange={(open) => setOpenKey(open ? key : null)}
|
|
511
558
|
>
|
|
512
|
-
<
|
|
513
|
-
<
|
|
514
|
-
className="
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
559
|
+
<PopoverAnchor asChild>
|
|
560
|
+
<div
|
|
561
|
+
className="inline-flex max-w-[14rem]"
|
|
562
|
+
onPointerEnter={
|
|
563
|
+
hasLegendActions ? () => openLegendActions(key) : undefined
|
|
564
|
+
}
|
|
565
|
+
onPointerLeave={
|
|
566
|
+
hasLegendActions ? scheduleCloseLegendActions : undefined
|
|
567
|
+
}
|
|
568
|
+
onFocusCapture={
|
|
569
|
+
hasLegendActions ? () => openLegendActions(key) : undefined
|
|
570
|
+
}
|
|
571
|
+
onBlurCapture={
|
|
572
|
+
hasLegendActions ? scheduleCloseLegendActions : undefined
|
|
573
|
+
}
|
|
574
|
+
>
|
|
575
|
+
<button
|
|
576
|
+
type="button"
|
|
577
|
+
aria-pressed={!hidden}
|
|
578
|
+
className={`inline-flex max-w-[14rem] items-center gap-1.5 rounded-sm text-left transition-opacity hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring ${
|
|
579
|
+
hidden ? "opacity-35" : "opacity-100"
|
|
580
|
+
} ${onToggleKey ? "cursor-pointer" : "cursor-default"}`}
|
|
581
|
+
title={label}
|
|
582
|
+
onClick={() => onToggleKey?.(key)}
|
|
583
|
+
>
|
|
584
|
+
<span className="relative h-2.5 w-3 shrink-0">
|
|
585
|
+
<span
|
|
586
|
+
className="absolute left-0 right-0 top-1/2 h-px -translate-y-1/2"
|
|
587
|
+
style={{ backgroundColor: color }}
|
|
588
|
+
/>
|
|
589
|
+
<span
|
|
590
|
+
className="absolute left-1/2 top-1/2 h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full"
|
|
591
|
+
style={{ backgroundColor: color }}
|
|
592
|
+
/>
|
|
593
|
+
</span>
|
|
594
|
+
<span className="truncate">{label}</span>
|
|
595
|
+
</button>
|
|
596
|
+
</div>
|
|
597
|
+
</PopoverAnchor>
|
|
598
|
+
{hasLegendActions && (
|
|
599
|
+
<PopoverContent
|
|
600
|
+
side="top"
|
|
601
|
+
align="start"
|
|
602
|
+
sideOffset={6}
|
|
603
|
+
className="w-auto min-w-28 p-1"
|
|
604
|
+
onPointerEnter={clearCloseTimeout}
|
|
605
|
+
onPointerLeave={scheduleCloseLegendActions}
|
|
606
|
+
onFocusCapture={clearCloseTimeout}
|
|
607
|
+
>
|
|
608
|
+
<div className="flex items-center gap-0.5">
|
|
609
|
+
{onFilterKey && (
|
|
610
|
+
<button
|
|
611
|
+
type="button"
|
|
612
|
+
data-chart-legend-action="filter"
|
|
613
|
+
aria-label={`${t("sqlDashboard.filterSeries")} ${label}`}
|
|
614
|
+
className="rounded-sm px-2 py-1 text-[11px] font-medium text-popover-foreground outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground"
|
|
615
|
+
onClick={() => {
|
|
616
|
+
onFilterKey(key);
|
|
617
|
+
setOpenKey(null);
|
|
618
|
+
}}
|
|
619
|
+
>
|
|
620
|
+
{t("sqlDashboard.filterSeries")}
|
|
621
|
+
</button>
|
|
622
|
+
)}
|
|
623
|
+
{onToggleKey && (
|
|
624
|
+
<button
|
|
625
|
+
type="button"
|
|
626
|
+
data-chart-legend-action="hide"
|
|
627
|
+
aria-label={`${t("sqlDashboard.hide")} ${label}`}
|
|
628
|
+
disabled={hidden}
|
|
629
|
+
className="rounded-sm px-2 py-1 text-[11px] font-medium text-popover-foreground outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-40"
|
|
630
|
+
onClick={() => {
|
|
631
|
+
onToggleKey(key);
|
|
632
|
+
setOpenKey(null);
|
|
633
|
+
}}
|
|
634
|
+
>
|
|
635
|
+
{t("sqlDashboard.hide")}
|
|
636
|
+
</button>
|
|
637
|
+
)}
|
|
638
|
+
</div>
|
|
639
|
+
</PopoverContent>
|
|
640
|
+
)}
|
|
641
|
+
</Popover>
|
|
524
642
|
);
|
|
525
643
|
})}
|
|
526
644
|
</div>
|
|
@@ -548,6 +666,7 @@ function ChartFrame({
|
|
|
548
666
|
colors,
|
|
549
667
|
hiddenKeys,
|
|
550
668
|
onToggleLegendKey,
|
|
669
|
+
onFilterLegendKey,
|
|
551
670
|
showCustomLegend = false,
|
|
552
671
|
children,
|
|
553
672
|
}: {
|
|
@@ -556,6 +675,7 @@ function ChartFrame({
|
|
|
556
675
|
colors: string[];
|
|
557
676
|
hiddenKeys?: Set<string>;
|
|
558
677
|
onToggleLegendKey?: (key: string) => void;
|
|
678
|
+
onFilterLegendKey?: (key: string) => void;
|
|
559
679
|
showCustomLegend?: boolean;
|
|
560
680
|
children: ReactNode;
|
|
561
681
|
}) {
|
|
@@ -585,6 +705,7 @@ function ChartFrame({
|
|
|
585
705
|
panel={panel}
|
|
586
706
|
hiddenKeys={hiddenKeys}
|
|
587
707
|
onToggleKey={onToggleLegendKey}
|
|
708
|
+
onFilterKey={onFilterLegendKey}
|
|
588
709
|
/>
|
|
589
710
|
</div>
|
|
590
711
|
);
|
|
@@ -1731,7 +1852,7 @@ function BarRenderer({
|
|
|
1731
1852
|
formatXLabel(String(value ?? ""), panel);
|
|
1732
1853
|
const seriesNameFormatter = (name: string) =>
|
|
1733
1854
|
formatSeriesLabelForPanel(panel, name);
|
|
1734
|
-
const { hiddenKeys, toggleSeries } = useSeriesVisibility(yKeys);
|
|
1855
|
+
const { hiddenKeys, toggleSeries, filterSeries } = useSeriesVisibility(yKeys);
|
|
1735
1856
|
|
|
1736
1857
|
return (
|
|
1737
1858
|
<ChartFrame
|
|
@@ -1740,6 +1861,7 @@ function BarRenderer({
|
|
|
1740
1861
|
colors={colors}
|
|
1741
1862
|
hiddenKeys={hiddenKeys}
|
|
1742
1863
|
onToggleLegendKey={toggleSeries}
|
|
1864
|
+
onFilterLegendKey={filterSeries}
|
|
1743
1865
|
showCustomLegend
|
|
1744
1866
|
>
|
|
1745
1867
|
<ResponsiveContainer width="100%" height="100%">
|
|
@@ -1819,7 +1941,8 @@ function TimeSeriesRenderer({
|
|
|
1819
1941
|
formatXLabel(String(value ?? ""), panel);
|
|
1820
1942
|
const seriesNameFormatter = (name: string) =>
|
|
1821
1943
|
formatSeriesLabelForPanel(panel, name);
|
|
1822
|
-
const { hiddenKeys, visibleKeys, toggleSeries } =
|
|
1944
|
+
const { hiddenKeys, visibleKeys, toggleSeries, filterSeries } =
|
|
1945
|
+
useSeriesVisibility(yKeys);
|
|
1823
1946
|
const splitPartialDay = shouldSplitCurrentDayTimeSeries(panel, xKey);
|
|
1824
1947
|
const { rows: chartRows, series } = useMemo(
|
|
1825
1948
|
() =>
|
|
@@ -1844,6 +1967,7 @@ function TimeSeriesRenderer({
|
|
|
1844
1967
|
colors={colors}
|
|
1845
1968
|
hiddenKeys={hiddenKeys}
|
|
1846
1969
|
onToggleLegendKey={toggleSeries}
|
|
1970
|
+
onFilterLegendKey={filterSeries}
|
|
1847
1971
|
showCustomLegend
|
|
1848
1972
|
>
|
|
1849
1973
|
<ResponsiveContainer width="100%" height="100%">
|
|
@@ -1925,6 +2049,7 @@ function TimeSeriesRenderer({
|
|
|
1925
2049
|
colors={colors}
|
|
1926
2050
|
hiddenKeys={hiddenKeys}
|
|
1927
2051
|
onToggleLegendKey={toggleSeries}
|
|
2052
|
+
onFilterLegendKey={filterSeries}
|
|
1928
2053
|
showCustomLegend
|
|
1929
2054
|
>
|
|
1930
2055
|
<ResponsiveContainer width="100%" height="100%">
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
IconHistory,
|
|
20
20
|
IconLanguage,
|
|
21
21
|
IconRefresh,
|
|
22
|
+
IconBrain,
|
|
22
23
|
IconSettings,
|
|
23
24
|
} from "@tabler/icons-react";
|
|
24
25
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -584,6 +585,22 @@ export function CommandPalette() {
|
|
|
584
585
|
|
|
585
586
|
{showHiddenResults && (
|
|
586
587
|
<CommandGroup key="settings" heading={t("navigation.settings")}>
|
|
588
|
+
<CommandItem
|
|
589
|
+
value={`setting:agent-page:${t("settings.agentTitle")}`}
|
|
590
|
+
onSelect={() => go("/agent")}
|
|
591
|
+
keywords={commandPaletteKeywords(
|
|
592
|
+
t("settings.agentTitle"),
|
|
593
|
+
"agent",
|
|
594
|
+
"context",
|
|
595
|
+
"files",
|
|
596
|
+
"connections",
|
|
597
|
+
"jobs",
|
|
598
|
+
"access",
|
|
599
|
+
)}
|
|
600
|
+
>
|
|
601
|
+
<IconBrain className="me-2 h-4 w-4 text-muted-foreground" />
|
|
602
|
+
<span className="truncate">{t("settings.agentTitle")}</span>
|
|
603
|
+
</CommandItem>
|
|
587
604
|
{settingsCommands.map((setting) => (
|
|
588
605
|
<CommandItem
|
|
589
606
|
key={`setting-${setting.id}`}
|
|
@@ -22,6 +22,7 @@ const pageTitleKeys: Record<string, string> = {
|
|
|
22
22
|
"/sessions": "navigation.sessions",
|
|
23
23
|
"/monitoring": "navigation.monitoring",
|
|
24
24
|
"/agents": "navigation.admin",
|
|
25
|
+
"/agent": "settings.agentTitle",
|
|
25
26
|
"/dashboards/explorer": "navigation.explorer",
|
|
26
27
|
"/settings": "navigation.settings",
|
|
27
28
|
};
|
|
@@ -283,6 +283,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
283
283
|
openOnChatRunning={chatHomeHandoffActive && !isSessionsRoute}
|
|
284
284
|
onFullscreenRequest={openAskAgentFullscreen}
|
|
285
285
|
emptyStateText={t("chat.emptyState")}
|
|
286
|
+
agentPageHref="/agent"
|
|
286
287
|
suggestions={[
|
|
287
288
|
t("chat.suggestionArrGrowth"),
|
|
288
289
|
t("chat.suggestionChurn"),
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
IconPlayerPlay,
|
|
28
28
|
IconLayoutSidebarLeftCollapse,
|
|
29
29
|
IconLayoutSidebarLeftExpand,
|
|
30
|
+
IconBrain,
|
|
30
31
|
} from "@tabler/icons-react";
|
|
31
32
|
import {
|
|
32
33
|
useQuery,
|
|
@@ -183,6 +184,7 @@ import {
|
|
|
183
184
|
import { CSS } from "@dnd-kit/utilities";
|
|
184
185
|
|
|
185
186
|
const bottomItems = [
|
|
187
|
+
{ icon: IconBrain, labelKey: "settings.agentTitle", href: "/agent" },
|
|
186
188
|
{ icon: IconSettings, labelKey: "navigation.settings", href: "/settings" },
|
|
187
189
|
];
|
|
188
190
|
|
|
@@ -2445,6 +2447,12 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
|
|
|
2445
2447
|
href: "/data-dictionary",
|
|
2446
2448
|
active: location.pathname.startsWith("/data-dictionary"),
|
|
2447
2449
|
},
|
|
2450
|
+
{
|
|
2451
|
+
icon: IconBrain,
|
|
2452
|
+
label: t("settings.agentTitle"),
|
|
2453
|
+
href: "/agent",
|
|
2454
|
+
active: location.pathname === "/agent",
|
|
2455
|
+
},
|
|
2448
2456
|
{
|
|
2449
2457
|
icon: IconSettings,
|
|
2450
2458
|
label: t("navigation.settings"),
|
|
@@ -30,6 +30,9 @@ import {
|
|
|
30
30
|
export const SIMPLE_TIME_BOUNDED_METRIC_FAST_PATH_GUIDANCE =
|
|
31
31
|
"SIMPLE TIME-BOUNDED METRIC FAST PATH — When the data dictionary or a known canonical source identifies the metric, run one bounded aggregate. Once it returns a valid result, answer the explicit question immediately with the source, time window, row count, and only necessary caveats. Do not schema-discover, retry, enrich, cross-check, or add breakdowns after that successful result unless the query failed or the result conflicts with the known metric definition. This does not waive the real-data requirement: never answer from a guess, stale value, or unverified result. ";
|
|
32
32
|
|
|
33
|
+
export const BUILT_IN_FIRST_PARTY_SOURCE_GUIDANCE =
|
|
34
|
+
"BUILT-IN FIRST-PARTY SOURCE — Analytics always provides one built-in first-party source alongside connected external providers such as BigQuery, HubSpot, Gong, Slack, and the other configured integrations. This does not replace or restrict external sources. For Builder/product signups, page views, app/template usage, conversions, and LLM observability, use `query-agent-native-analytics` over `analytics_events` (or `session_recordings` for replay summaries) when the event lives in first-party Analytics. When the user names an external provider, or the data dictionary identifies one as authoritative, query that provider instead. Do not report the first-party source as disconnected merely because an external provider is not configured. If the first-party query returns no rows, report that grounded result with its scope and time window. ";
|
|
35
|
+
|
|
33
36
|
export const ANALYTICS_OBSERVABILITY_INCIDENT_GUIDANCE =
|
|
34
37
|
"OBSERVABILITY INCIDENT WORKFLOW — For a named user's session or error question, resolve the user's email from context, then use list-session-recordings with userId over a bounded recent window to discover the relevant sessions. Do not require hasErrors=true for this initial lookup: replay/network/stuck-run evidence can exist while the recording's JavaScript errorCount is zero. Use hasErrors=true only when the user specifically asks for recordings with captured JavaScript errors or the recording metadata confirms that filter is appropriate. Use list-error-issues with userId or sessionRecordingId to identify a grouped issue, then get-error-issue for stack, breadcrumbs, occurrences, and linked recordings. For console diagnostics or failed network requests, create-session-replay-agent-link first and use its scoped diagnostics endpoint for detailed error text, stacks, request metadata, and bounded 5xx snippets; enumerate with kind/limit and fromMs/toMs or offset when needed. Use get-session-replay-summary and get-session-replay-timeline for the page-navigation and click sequence, and use get-session-replay-events only for additional bounded replay-event details. If no grouped error exists, correlate first-party observability events such as agent_chat_stuck_detected with query-agent-native-analytics in execution mode. In Plan mode, query-agent-native-analytics is intentionally unavailable: do not claim a live event correlation or root cause from it, and describe the event lookup as a planned next step. Prefer these first-party actions over generic SQL. Report the matching evidence and do not claim a root cause without a corroborating error, event, or replay signal. ";
|
|
35
38
|
|
|
@@ -54,6 +57,7 @@ export function analyticsSourceGuidanceOpening(): string {
|
|
|
54
57
|
"Apply real-data requirements only when presenting analytics results, source records, or derived metrics. Do not call data-source tools for workflow migration, recurring-job setup, UI/code fixes, settings help, conceptual planning, or other non-data tasks unless the user explicitly asks for data. " +
|
|
55
58
|
NON_ANALYTICS_REQUEST_GUIDANCE +
|
|
56
59
|
SIMPLE_TIME_BOUNDED_METRIC_FAST_PATH_GUIDANCE +
|
|
60
|
+
BUILT_IN_FIRST_PARTY_SOURCE_GUIDANCE +
|
|
57
61
|
ANALYTICS_OBSERVABILITY_INCIDENT_GUIDANCE +
|
|
58
62
|
"SURFACE DIFFERENTIATION — You are the analytics assistant for definitions, deep-dive analysis, and action. For questions about what a metric, model, or table means, use the Data Dictionary and configured schema tools first. For trends, comparisons, anomalies, current data, or anything that requires querying live data, answer directly in chat with the relevant provider query, dashboard analysis, and inline charts when useful. "
|
|
59
63
|
);
|
|
@@ -144,7 +148,12 @@ export function realDataFinalGuard(
|
|
|
144
148
|
if ((context as { executionMode?: string }).executionMode === "plan") {
|
|
145
149
|
return null;
|
|
146
150
|
}
|
|
147
|
-
|
|
151
|
+
// Keep the template compatible with the currently installed core package
|
|
152
|
+
// while the new requestText field ships in the same framework release.
|
|
153
|
+
const stableRequestText = (
|
|
154
|
+
context as AgentLoopFinalResponseGuardContext & { requestText?: string }
|
|
155
|
+
).requestText;
|
|
156
|
+
const userText = stableRequestText ?? latestUserText(context.messages ?? []);
|
|
148
157
|
if (!looksLikeAnalyticsDataRequest(userText)) {
|
|
149
158
|
// Deterministic backstop: the soft NON_ANALYTICS_REQUEST_GUIDANCE prompt
|
|
150
159
|
// sentence is not always enough, and a model occasionally parrots the
|
|
@@ -289,7 +298,7 @@ export default createAgentChatPlugin({
|
|
|
289
298
|
'FIRST-PARTY DASHBOARD TIME RULE — AI-generated `source: "first-party"` panels are dashboard-time-bound by default: set `config.timeScope` to `dashboard` and include a matching dashboard time predicate. `{{timeRange}}` requires a matching `filters` entry with `id: "timeRange"` and `type: "select"`; `{{<id>Start}}`/`{{<id>End}}` require a matching `type: "date-range"` filter with that id. Allowed `timeScope` values are `dashboard`, `fixed-window`, `cohort-history`, and `all-time`; use `all-time` only when the user requests full available history and put all-time, lifetime, or historical in the title or description. Server validation rejects unbound first-party SQL. ' +
|
|
290
299
|
"DASHBOARD READ RULE — `get-sql-dashboard` is compact by default: use its `panels` summaries plus `layout.panelOrder`, `layout.firstPanelIds`, and `layout.groups[].rows[].rowNumber/panelIds` for orientation and verification. Pass `includeConfig: true` only when you truly need full panel SQL/config. " +
|
|
291
300
|
'DASHBOARD REORDER RULE — For simple chart/section moves, use `mutate-dashboard` code such as `dashboard.panels(["panel-a","panel-b"]).moveToTop();`. For visible placement requests like "second row" or "next to return rates", use row-aware placement such as `dashboard.insertPanel({...}).nextTo("retention-over-time")`, `.atRow(2)`, or `dashboard.panel("panel-a").moveNextTo("panel-b")`; these keep panels in the intended rendered row and expand/rebalance that row when needed. Never count shifting `/panels/<index>` positions for ordinary \'move this chart\' requests. Use `get-sql-dashboard.layout.groups[].rows` as proof of visible row placement, not only flat `panelOrder`. ' +
|
|
292
|
-
"Use configured data sources and actions only. Call `data-source-status` when you need to know which providers are connected, and treat provider actions as unavailable for analysis if they return missing credentials, permission, syntax, quota, or network errors. " +
|
|
301
|
+
"Use configured data sources and actions only. The built-in first-party Analytics source is an additional source and is always available through `query-agent-native-analytics`, even when no external provider credentials are connected. External provider actions remain available and are the authoritative path when the user names a provider or the data lives there. Call `data-source-status` when you need to know which external providers are connected, and treat provider actions as unavailable for analysis only if they return missing credentials, permission, syntax, quota, or network errors. " +
|
|
293
302
|
"The built-in `demo` dashboard source is a demo-environment Prometheus source reserved for the Node Exporter demo. It must never satisfy REAL_DATA_REQUIRED or be cited as user analytics evidence unless the user explicitly asks to inspect the demo dashboard. " +
|
|
294
303
|
"When the user names a provider or tool such as Jira, Pylon, HubSpot, Gong, Slack, Sentry, GA4, or BigQuery, that named source is authoritative for the turn: use that provider's real tool/API surface, not a warehouse or different-provider substitute, unless the user explicitly asks for the copy/fallback. For bounded lookups where a first-class action fully models the requested source, object, filter, and pagination need, that shortcut is fine. For broad provider searches, cross-source joins, corpus-wide counts, exact cohort coverage, or any answer where absence matters, do not start and stop with shortcuts; use the broad provider API/MCP and corpus/code workflow as the primary path. " +
|
|
295
304
|
"Provider-specific actions are shortcuts, not limits. If a first-class action cannot express the exact endpoint, object type, filters, request body, pagination mode, API version, or corpus coverage needed, call `provider-api-catalog` and `provider-api-docs` as needed, then call `provider-api-request` against the provider's real HTTP API. Use this raw provider API escape hatch instead of weakening the analysis, broadening filters, sampling default pages, or claiming the integration cannot do something the underlying API can do. " +
|
|
@@ -13,6 +13,7 @@ const pageTitleKeys: Record<string, string> = {
|
|
|
13
13
|
"/": "navigation.create",
|
|
14
14
|
"/library": "navigation.library",
|
|
15
15
|
"/brand-kits": "navigation.brandKits",
|
|
16
|
+
"/agent": "settings.agentTitle",
|
|
16
17
|
"/extensions": "navigation.extensions",
|
|
17
18
|
"/settings": "navigation.settings",
|
|
18
19
|
};
|
|
@@ -156,6 +156,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
156
156
|
openOnChatRunning={chatHomeHandoffActive}
|
|
157
157
|
onFullscreenRequest={openCreateChatFullscreen}
|
|
158
158
|
emptyStateText={t("chat.emptyState")}
|
|
159
|
+
agentPageHref="/agent"
|
|
159
160
|
suggestions={[
|
|
160
161
|
t("chat.suggestionBlogHeroes"),
|
|
161
162
|
t("chat.suggestionProductVideo"),
|
|
@@ -13,6 +13,7 @@ import { ExtensionsSidebarSection } from "@agent-native/core/client/extensions";
|
|
|
13
13
|
import { OrgSwitcher } from "@agent-native/core/client/org";
|
|
14
14
|
import {
|
|
15
15
|
IconArchive,
|
|
16
|
+
IconBrain,
|
|
16
17
|
IconClipboardList,
|
|
17
18
|
IconDots,
|
|
18
19
|
IconEdit,
|
|
@@ -47,6 +48,7 @@ import { cn } from "@/lib/utils";
|
|
|
47
48
|
const baseNavItems = [
|
|
48
49
|
{ icon: IconPhotoPlus, labelKey: "navigation.create", href: "/" },
|
|
49
50
|
{ icon: IconLayoutGrid, labelKey: "navigation.library", href: "/library" },
|
|
51
|
+
{ icon: IconBrain, labelKey: "settings.agentTitle", href: "/agent" },
|
|
50
52
|
{ icon: IconSettings, labelKey: "navigation.settings", href: "/settings" },
|
|
51
53
|
];
|
|
52
54
|
|
|
@@ -130,6 +130,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
130
130
|
openOnChatRunning={chatHomeHandoffActive}
|
|
131
131
|
onFullscreenRequest={openAskAgentFullscreen}
|
|
132
132
|
emptyStateText={t("chat.emptyState")}
|
|
133
|
+
agentPageHref="/agent"
|
|
133
134
|
suggestions={[
|
|
134
135
|
t("chat.suggestionSecurity"),
|
|
135
136
|
t("chat.suggestionStaleFacts"),
|
|
@@ -435,7 +435,10 @@ export function Sidebar({
|
|
|
435
435
|
>
|
|
436
436
|
{navItems.map((item) => {
|
|
437
437
|
const Icon = item.icon;
|
|
438
|
-
const label =
|
|
438
|
+
const label =
|
|
439
|
+
item.view === "agent"
|
|
440
|
+
? t("settings.agentTitle")
|
|
441
|
+
: t(`navigation.${item.view}`);
|
|
439
442
|
const link = (
|
|
440
443
|
<NavLink
|
|
441
444
|
to={item.href}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Icon } from "@tabler/icons-react";
|
|
2
2
|
import {
|
|
3
|
+
IconBrain,
|
|
3
4
|
IconBook2,
|
|
4
5
|
IconChecks,
|
|
5
6
|
IconDatabase,
|
|
@@ -16,6 +17,7 @@ export type BrainView =
|
|
|
16
17
|
| "review"
|
|
17
18
|
| "sources"
|
|
18
19
|
| "ops"
|
|
20
|
+
| "agent"
|
|
19
21
|
| "settings";
|
|
20
22
|
|
|
21
23
|
export type KnowledgeStatus = "approved" | "needs_review" | "draft" | "stale";
|
|
@@ -923,6 +925,12 @@ export const navItems: Array<{
|
|
|
923
925
|
href: "/settings",
|
|
924
926
|
icon: IconSettings,
|
|
925
927
|
},
|
|
928
|
+
{
|
|
929
|
+
view: "agent",
|
|
930
|
+
label: "Agent settings",
|
|
931
|
+
href: "/agent",
|
|
932
|
+
icon: IconBrain,
|
|
933
|
+
},
|
|
926
934
|
];
|
|
927
935
|
|
|
928
936
|
export const defaultSettings: BrainSettings = {
|
|
@@ -952,6 +960,7 @@ export function viewFromPath(pathname: string): BrainView {
|
|
|
952
960
|
if (pathname.startsWith("/review")) return "review";
|
|
953
961
|
if (pathname.startsWith("/sources")) return "sources";
|
|
954
962
|
if (pathname.startsWith("/ops")) return "ops";
|
|
963
|
+
if (pathname.startsWith("/agent")) return "agent";
|
|
955
964
|
if (pathname.startsWith("/settings")) return "settings";
|
|
956
965
|
return "ask";
|
|
957
966
|
}
|
|
@@ -970,6 +979,8 @@ export function pathFromView(view?: string): string {
|
|
|
970
979
|
return "/sources";
|
|
971
980
|
case "ops":
|
|
972
981
|
return "/ops";
|
|
982
|
+
case "agent":
|
|
983
|
+
return "/agent";
|
|
973
984
|
case "settings":
|
|
974
985
|
return "/settings";
|
|
975
986
|
case "ask":
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useT,
|
|
11
11
|
} from "@agent-native/core/client";
|
|
12
12
|
import { configureTracking } from "@agent-native/core/client";
|
|
13
|
-
import { IconMoon, IconSun } from "@tabler/icons-react";
|
|
13
|
+
import { IconBrain, IconMoon, IconSun } from "@tabler/icons-react";
|
|
14
14
|
import { useQueryClient } from "@tanstack/react-query";
|
|
15
15
|
import { useTheme } from "next-themes";
|
|
16
16
|
import { useCallback, useState } from "react";
|
|
@@ -184,6 +184,20 @@ function AppContent() {
|
|
|
184
184
|
<CommandMenu.Item onSelect={() => navigate("/settings")}>
|
|
185
185
|
{t("navigation.settings")}
|
|
186
186
|
</CommandMenu.Item>
|
|
187
|
+
<CommandMenu.Item
|
|
188
|
+
onSelect={() => navigate("/agent")}
|
|
189
|
+
keywords={[
|
|
190
|
+
"agent",
|
|
191
|
+
"context",
|
|
192
|
+
"files",
|
|
193
|
+
"connections",
|
|
194
|
+
"jobs",
|
|
195
|
+
"access",
|
|
196
|
+
]}
|
|
197
|
+
>
|
|
198
|
+
<IconBrain size={16} />
|
|
199
|
+
{t("settings.openAgentSettings")}
|
|
200
|
+
</CommandMenu.Item>
|
|
187
201
|
</CommandMenu.Group>
|
|
188
202
|
<CommandMenu.Group heading={t("root.commandAppearance")}>
|
|
189
203
|
<ThemeToggleItem />
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AgentTabsPage } from "@agent-native/core/client";
|
|
2
|
+
|
|
3
|
+
import { messagesByLocale } from "@/i18n-data";
|
|
4
|
+
|
|
5
|
+
export function meta() {
|
|
6
|
+
return [{ title: messagesByLocale["en-US"].settings.agentTitle }];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function AgentRoute() {
|
|
10
|
+
return <AgentTabsPage appName="Brain" />;
|
|
11
|
+
}
|
|
@@ -37,6 +37,15 @@ Detailed event, availability, booking, storage, and UI rules live in
|
|
|
37
37
|
with `stageAs` and analyze them with `query-staged-dataset`.
|
|
38
38
|
- For Google Calendar, distinguish an empty calendar from missing auth,
|
|
39
39
|
reauth-needed, or fetch failures.
|
|
40
|
+
- `list-events` remains the UI-compatible event list by default. External MCP
|
|
41
|
+
callers receive its compact, paginated version 1 inventory envelope
|
|
42
|
+
unless they explicitly request `format: "legacy"`; use `format: "inventory"`
|
|
43
|
+
for that same coverage-aware result from other callers. Preserve its
|
|
44
|
+
account coverage, `sourceCoverage`, and `coverageComplete` fields: Google
|
|
45
|
+
account, ICS feed, overlay, and local-booking sources are independent, and a
|
|
46
|
+
partial source failure is not an empty calendar. Pass `accountEmails` only
|
|
47
|
+
for connected accounts; the action validates the whole requested set before
|
|
48
|
+
provider work.
|
|
40
49
|
- Google Calendar working locations are status events (`eventType:
|
|
41
50
|
"workingLocation"`). Sync and display them as working locations, keep them
|
|
42
51
|
transparent/non-blocking, and preserve `workingLocationProperties` instead of
|