@agent-native/core 0.121.2 → 0.122.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/README.md +4 -12
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +148 -0
- package/corpus/core/docs/content/actions.mdx +2 -2
- package/corpus/core/docs/content/agent-surfaces.mdx +1 -1
- package/corpus/core/docs/content/authentication.mdx +2 -0
- package/corpus/core/docs/content/deployment.mdx +36 -0
- package/corpus/core/docs/content/http-api.mdx +266 -0
- package/corpus/core/docs/content/syncing-template-changes.mdx +159 -0
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/a2a/activity.ts +38 -27
- package/corpus/core/src/a2a/client.ts +57 -4
- package/corpus/core/src/agent/engine/builder-engine.ts +35 -4
- package/corpus/core/src/agent/run-manager.ts +20 -1
- package/corpus/core/src/agent/run-store.ts +4 -1
- package/corpus/core/src/agent/types.ts +28 -8
- package/corpus/core/src/chat-threads/store.ts +45 -0
- package/corpus/core/src/checkpoints/index.ts +2 -0
- package/corpus/core/src/checkpoints/route-match.ts +13 -0
- package/corpus/core/src/cli/create.ts +105 -17
- package/corpus/core/src/cli/index.ts +20 -0
- package/corpus/core/src/cli/template-baseline.ts +410 -0
- package/corpus/core/src/cli/template-sync.ts +1004 -0
- package/corpus/core/src/cli/templates-meta.ts +1 -0
- package/corpus/core/src/client/AssistantChat.tsx +38 -12
- package/corpus/core/src/client/NewWorkspaceAppFlow.tsx +75 -10
- package/corpus/core/src/client/chat/message-components.tsx +127 -66
- package/corpus/core/src/client/chat/tool-call-display.tsx +29 -5
- package/corpus/core/src/client/error-format.ts +18 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +30 -8
- package/corpus/core/src/client/org/TeamPage.tsx +7 -6
- package/corpus/core/src/client/settings/SettingsPanel.tsx +9 -9
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +12 -2
- package/corpus/core/src/client/sse-event-processor.ts +3 -0
- package/corpus/core/src/data-widgets/index.ts +41 -0
- package/corpus/core/src/deploy/build.ts +11 -9
- package/corpus/core/src/extensions/url-safety.ts +67 -4
- package/corpus/core/src/integrations/webhook-handler.ts +63 -9
- package/corpus/core/src/org/auto-join-domain.ts +4 -3
- package/corpus/core/src/org/context.ts +108 -39
- package/corpus/core/src/org/index.ts +5 -0
- package/corpus/core/src/org/service-identity.ts +60 -0
- package/corpus/core/src/provider-api/index.ts +22 -1
- package/corpus/core/src/scripts/docs/search.ts +12 -1
- package/corpus/core/src/server/agent-chat/context-tools.ts +9 -4
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +38 -66
- package/corpus/core/src/server/agent-chat-plugin.ts +17 -10
- package/corpus/core/src/server/agents-bundle.ts +84 -5
- package/corpus/core/src/server/auth.ts +4 -3
- package/corpus/core/src/server/builder-browser.ts +47 -19
- package/corpus/core/src/server/core-routes-plugin.ts +2 -2
- package/corpus/core/src/server/credential-provider.ts +209 -68
- package/corpus/core/src/server/index.ts +3 -0
- package/corpus/core/src/server/prompts/framework-core-compact.ts +6 -13
- package/corpus/core/src/server/prompts/framework-core.ts +9 -21
- package/corpus/core/src/server/prompts/index.ts +0 -1
- package/corpus/core/src/server/prompts/shared-rules.ts +19 -11
- package/corpus/core/src/server/ssr-handler.ts +13 -2
- package/corpus/core/src/settings/user-settings.ts +13 -1
- package/corpus/core/src/shared/cache-control.ts +141 -0
- package/corpus/core/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/core/src/templates/chat/_gitignore +1 -0
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/core/src/templates/default/app/root.tsx +1 -1
- package/corpus/core/src/templates/default/public/manifest.json +2 -2
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/performance/SKILL.md +19 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/visual-answer/SKILL.md +1 -0
- package/corpus/core/src/vite/agents-bundle-plugin.ts +7 -6
- package/corpus/core/src/vite/client.ts +69 -3
- package/corpus/templates/analytics/.agents/skills/adhoc-analysis/SKILL.md +4 -5
- package/corpus/templates/analytics/.agents/skills/admin-surfaces/SKILL.md +55 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +10 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-management/references/template-catalog-and-demo.md +62 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-ops/SKILL.md +85 -0
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +27 -2
- package/corpus/templates/analytics/.agents/skills/data-querying/references/inline-chart-embeds.md +139 -0
- package/corpus/templates/analytics/.agents/skills/monitoring/SKILL.md +77 -0
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/analytics/AGENTS.md +91 -563
- package/corpus/templates/analytics/_gitignore +1 -0
- package/corpus/templates/analytics/actions/bigquery.ts +12 -4
- package/corpus/templates/analytics/actions/generate-chart.ts +5 -5
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +30 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +1 -23
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +3 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +1 -0
- package/corpus/templates/analytics/app/routes/_index.tsx +1 -1
- package/corpus/templates/analytics/changelog/2026-07-24-analytics-finds-saved-dashboards-and-queries-far-more-reliab.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-24-notion-access-errors-now-explain-that-a-page-needs-sharing-w.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/analytics/package.json +1 -1
- package/corpus/templates/analytics/public/manifest.json +1 -1
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +7 -0
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +191 -30
- package/corpus/templates/analytics/server/lib/bigquery.ts +11 -1
- package/corpus/templates/analytics/server/lib/notion.ts +15 -4
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +10 -0
- package/corpus/templates/analytics/server/plugins/auth.ts +1 -1
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/assets/app/routes/_index.tsx +1 -1
- package/corpus/templates/assets/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/assets/server/plugins/auth.ts +1 -1
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/brain/_gitignore +1 -0
- package/corpus/templates/brain/app/lib/brain.ts +0 -7
- package/corpus/templates/brain/app/routes/_index.tsx +1 -2
- package/corpus/templates/brain/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/brain/package.json +1 -1
- package/corpus/templates/brain/public/manifest.json +1 -1
- package/corpus/templates/brain/server/plugins/auth.ts +1 -1
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/calendar/_gitignore +1 -0
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +0 -6
- package/corpus/templates/calendar/app/routes/_app._index.tsx +1 -1
- package/corpus/templates/calendar/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/calendar/package.json +1 -1
- package/corpus/templates/calendar/public/manifest.json +1 -1
- package/corpus/templates/calendar/server/plugins/auth.ts +1 -1
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/chat/_gitignore +1 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/corpus/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +34 -0
- package/corpus/templates/clips/AGENTS.md +5 -4
- package/corpus/templates/clips/_gitignore +1 -0
- package/corpus/templates/clips/actions/cleanup-transcript.ts +5 -0
- package/corpus/templates/clips/actions/get-recording-insights.ts +44 -8
- package/corpus/templates/clips/actions/get-recording-player-data.ts +39 -70
- package/corpus/templates/clips/actions/import-loom-recording.ts +53 -98
- package/corpus/templates/clips/actions/lib/loom-import-job.ts +260 -0
- package/corpus/templates/clips/actions/list-clip-views.ts +2 -4
- package/corpus/templates/clips/actions/list-recordings.ts +69 -19
- package/corpus/templates/clips/actions/list-viewers.ts +5 -2
- package/corpus/templates/clips/actions/regenerate-summary.ts +5 -1
- package/corpus/templates/clips/actions/request-transcript.ts +28 -1
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +21 -1
- package/corpus/templates/clips/app/components/library/library-layout.tsx +0 -7
- package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +14 -1
- package/corpus/templates/clips/app/components/player/insights-panel.tsx +8 -20
- package/corpus/templates/clips/app/components/player/recording-views-badge.tsx +335 -0
- package/corpus/templates/clips/app/components/player/video-player.tsx +13 -8
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +13 -2
- package/corpus/templates/clips/app/lib/capture-permissions.ts +110 -0
- package/corpus/templates/clips/app/lib/recording-link.ts +32 -0
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +27 -0
- package/corpus/templates/clips/app/routes/_index.tsx +1 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +52 -15
- package/corpus/templates/clips/app/routes/record.tsx +82 -31
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +42 -31
- package/corpus/templates/clips/changelog/2026-07-24-clip-pages-now-show-a-view-count-with-viewer-avatars-next-to.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-clip-summaries-read-like-a-description-you-d-write-yourself-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-clip-view-counts-now-separate-human-views-from-agent-views-s.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-clips-actions-can-now-be-called-by-org-service-tokens-so-ext.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-clips-no-longer-briefly-shows-a-dock-icon-while-launching.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-fixed-owner-and-editor-share-links-redirecting-to-the-record.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-meeting-and-note-recordings-now-start-as-a-compact-pill-on-t.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-new-clips-now-copy-a-shareable-link-instead-of-the-owner-onl.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-opening-a-share-link-as-the-clip-s-owner-now-goes-straight-t.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-permissions-and-rewind-controls-now-use-compact-consistent-h.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-quitting-the-desktop-app-no-longer-shows-a-false-macos-crash.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-screen-recording-permission-errors-now-name-the-exact-app-to.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-the-desktop-app-now-copies-a-new-clip-s-share-link-to-your-c.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-the-recording-toolbar-now-stays-above-other-apps-including-o.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-transcript-captions-now-use-real-speech-timings-instead-of-a.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-24-video-playback-no-longer-stutters-and-replays-the-last-momen.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +17 -1
- package/corpus/templates/clips/desktop/package.json +2 -0
- package/corpus/templates/clips/desktop/src/app.tsx +89 -0
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +9 -3
- package/corpus/templates/clips/desktop/src/lib/audio-meter.ts +51 -0
- package/corpus/templates/clips/desktop/src/lib/native-notification.ts +44 -0
- package/corpus/templates/clips/desktop/src/lib/recording-link.ts +67 -0
- package/corpus/templates/clips/desktop/src/overlays/live-audio-bars.tsx +35 -35
- package/corpus/templates/clips/desktop/src/overlays/live-transcript.tsx +3 -2
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +47 -46
- package/corpus/templates/clips/desktop/src/styles.css +127 -78
- package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +7 -0
- package/corpus/templates/clips/desktop/src-tauri/Info.plist +6 -0
- package/corpus/templates/clips/desktop/src-tauri/capabilities/default.json +1 -0
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +7 -3
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +4 -1
- package/corpus/templates/clips/desktop/src-tauri/src/main.rs +8 -0
- package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +21 -10
- package/corpus/templates/clips/desktop/src-tauri/src/util.rs +40 -0
- package/corpus/templates/clips/server/db/schema.ts +27 -0
- package/corpus/templates/clips/server/lib/agent-views.ts +145 -0
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +2 -1
- package/corpus/templates/clips/server/lib/public-agent-context.ts +7 -0
- package/corpus/templates/clips/server/lib/recording-share-grant.ts +79 -0
- package/corpus/templates/clips/server/lib/recordings.ts +51 -3
- package/corpus/templates/clips/server/plugins/auth.ts +1 -1
- package/corpus/templates/clips/server/plugins/db.ts +31 -0
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +56 -3
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +49 -17
- package/corpus/templates/clips/shared/recording-link.ts +43 -0
- package/corpus/templates/clips/shared/share-attribution.ts +4 -0
- package/corpus/templates/clips/shared/share-dashboard-redirect.ts +42 -0
- package/corpus/templates/clips/shared/view-analytics.ts +26 -0
- package/corpus/templates/content/.agents/skills/content/SKILL.md +5 -0
- package/corpus/templates/content/.agents/skills/content/references/local-file-mode.md +135 -0
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +12 -0
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +238 -0
- package/corpus/templates/content/.agents/skills/document-editing/references/document-behavior.md +91 -0
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/content/AGENTS.md +62 -583
- package/corpus/templates/content/_gitignore +1 -0
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -39
- package/corpus/templates/content/app/routes/_app._index.tsx +1 -2
- package/corpus/templates/content/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/content/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/content/package.json +1 -1
- package/corpus/templates/content/public/manifest.json +1 -1
- package/corpus/templates/content/server/plugins/auth.ts +1 -1
- package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +11 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +50 -8
- package/corpus/templates/design/.agents/skills/design-generation/references/code-layers.md +81 -0
- package/corpus/templates/design/.agents/skills/design-generation/references/code-workspace.md +42 -0
- package/corpus/templates/design/.agents/skills/design-generation/references/editor-extensions.md +34 -0
- package/corpus/templates/design/.agents/skills/responsive-breakpoints/SKILL.md +4 -1
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +17 -0
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +8196 -0
- package/corpus/templates/design/.generated/bridge/embedded-wheel.generated.ts +265 -0
- package/corpus/templates/design/.generated/bridge/hit-test.generated.ts +642 -0
- package/corpus/templates/design/.generated/bridge/motion-preview.generated.ts +571 -0
- package/corpus/templates/design/.generated/bridge/nav.generated.ts +91 -0
- package/corpus/templates/design/.generated/bridge/sample.generated.ts +23 -0
- package/corpus/templates/design/.generated/bridge/shader-fill-preview.generated.ts +263 -0
- package/corpus/templates/design/.generated/bridge/shader-runtime.generated.ts +518 -0
- package/corpus/templates/design/.generated/bridge/tweak.generated.ts +20 -0
- package/corpus/templates/design/.generated/bridge/zoom.generated.ts +32 -0
- package/corpus/templates/design/AGENTS.md +88 -503
- package/corpus/templates/design/_gitignore +1 -0
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/design/app/routes/_index.tsx +1 -1
- package/corpus/templates/design/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/design/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/design/server/plugins/auth.ts +1 -1
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/dispatch/_gitignore +1 -0
- package/corpus/templates/dispatch/app/dispatch-extensions.tsx +1 -10
- package/corpus/templates/dispatch/app/routes/overview.tsx +1 -1
- package/corpus/templates/dispatch/changelog/2026-07-24-signing-in-now-puts-you-in-your-companys-workspace.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/dispatch/package.json +1 -1
- package/corpus/templates/dispatch/public/manifest.json +1 -1
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/forms/_gitignore +1 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +0 -35
- package/corpus/templates/forms/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/forms/package.json +1 -1
- package/corpus/templates/forms/public/manifest.json +1 -1
- package/corpus/templates/forms/server/lib/public-form-ssr.ts +2 -2
- package/corpus/templates/forms/server/plugins/auth.ts +1 -1
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/macros/_gitignore +1 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -2
- package/corpus/templates/macros/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/macros/package.json +1 -1
- package/corpus/templates/macros/server/plugins/auth.ts +2 -2
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/mail/_gitignore +1 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +0 -39
- package/corpus/templates/mail/app/routes/$view.$threadId.tsx +1 -1
- package/corpus/templates/mail/app/routes/$view.tsx +1 -1
- package/corpus/templates/mail/app/routes/_index.tsx +1 -1
- package/corpus/templates/mail/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/mail/package.json +1 -1
- package/corpus/templates/mail/public/manifest.json +1 -1
- package/corpus/templates/mail/server/plugins/auth.ts +1 -1
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/plan/_gitignore +1 -0
- package/corpus/templates/plan/agent-native.app-skill.json +1 -1
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +4 -9
- package/corpus/templates/plan/app/lib/app-config.ts +1 -1
- package/corpus/templates/plan/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/plan/package.json +1 -1
- package/corpus/templates/plan/public/manifest.json +1 -1
- package/corpus/templates/plan/server/plugins/auth.ts +1 -1
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/slides/_gitignore +1 -0
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/slides/app/routes/_index.tsx +1 -1
- package/corpus/templates/slides/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/slides/package.json +1 -1
- package/corpus/templates/slides/public/manifest.json +1 -1
- package/corpus/templates/slides/server/plugins/auth.ts +1 -1
- package/corpus/templates/slides/server/plugins/db.ts +4 -0
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/tasks/AGENTS.md +1 -1
- package/corpus/templates/tasks/_gitignore +1 -0
- package/dist/a2a/activity.d.ts +4 -1
- package/dist/a2a/activity.d.ts.map +1 -1
- package/dist/a2a/activity.js +27 -16
- package/dist/a2a/activity.js.map +1 -1
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +58 -4
- package/dist/a2a/client.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts +1 -0
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +31 -4
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +18 -1
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +1 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +2 -1
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/types.d.ts +12 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js +21 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/chat-threads/store.d.ts +10 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +41 -0
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/checkpoints/index.d.ts +1 -0
- package/dist/checkpoints/index.d.ts.map +1 -1
- package/dist/checkpoints/index.js +1 -0
- package/dist/checkpoints/index.js.map +1 -1
- package/dist/checkpoints/route-match.d.ts +8 -0
- package/dist/checkpoints/route-match.d.ts.map +1 -0
- package/dist/checkpoints/route-match.js +13 -0
- package/dist/checkpoints/route-match.js.map +1 -0
- package/dist/cli/create.d.ts +35 -4
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +69 -19
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +19 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/template-baseline.d.ts +54 -0
- package/dist/cli/template-baseline.d.ts.map +1 -0
- package/dist/cli/template-baseline.js +334 -0
- package/dist/cli/template-baseline.js.map +1 -0
- package/dist/cli/template-sync.d.ts +57 -0
- package/dist/cli/template-sync.d.ts.map +1 -0
- package/dist/cli/template-sync.js +787 -0
- package/dist/cli/template-sync.js.map +1 -0
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +1 -0
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +2 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +38 -10
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +32 -2
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +20 -0
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +81 -46
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +14 -6
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/error-format.d.ts.map +1 -1
- package/dist/client/error-format.js +13 -0
- package/dist/client/error-format.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts +8 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +3 -2
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +1 -1
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/settings/SettingsPanel.js +9 -9
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +7 -4
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +3 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/data-widgets/index.d.ts +3 -0
- package/dist/data-widgets/index.d.ts.map +1 -1
- package/dist/data-widgets/index.js +33 -0
- package/dist/data-widgets/index.js.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +11 -7
- package/dist/deploy/build.js.map +1 -1
- package/dist/eject/provider-api-definitions.d.ts +1 -0
- package/dist/eject/provider-api-definitions.d.ts.map +1 -1
- package/dist/extensions/url-safety.d.ts +9 -16
- package/dist/extensions/url-safety.d.ts.map +1 -1
- package/dist/extensions/url-safety.js +48 -4
- package/dist/extensions/url-safety.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +46 -9
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +3 -3
- package/dist/org/auto-join-domain.d.ts +3 -2
- package/dist/org/auto-join-domain.d.ts.map +1 -1
- package/dist/org/auto-join-domain.js +1 -1
- package/dist/org/auto-join-domain.js.map +1 -1
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/context.js +84 -28
- package/dist/org/context.js.map +1 -1
- package/dist/org/index.d.ts +1 -0
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +1 -0
- package/dist/org/index.js.map +1 -1
- package/dist/org/service-identity.d.ts +43 -0
- package/dist/org/service-identity.d.ts.map +1 -0
- package/dist/org/service-identity.js +34 -0
- package/dist/org/service-identity.js.map +1 -0
- package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
- package/dist/provider-api/actions/provider-api.d.ts +13 -11
- package/dist/provider-api/actions/provider-api.d.ts.map +1 -1
- package/dist/provider-api/index.d.ts +4 -0
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +17 -1
- package/dist/provider-api/index.js.map +1 -1
- package/dist/scripts/docs/search.d.ts.map +1 -1
- package/dist/scripts/docs/search.js +12 -1
- package/dist/scripts/docs/search.js.map +1 -1
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
- package/dist/server/agent-chat/context-tools.js +3 -3
- package/dist/server/agent-chat/context-tools.js.map +1 -1
- package/dist/server/agent-chat/framework-prompts.d.ts +8 -3
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -1
- package/dist/server/agent-chat/framework-prompts.js +33 -62
- package/dist/server/agent-chat/framework-prompts.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +16 -10
- 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/agents-bundle.d.ts +18 -0
- package/dist/server/agents-bundle.d.ts.map +1 -1
- package/dist/server/agents-bundle.js +70 -4
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +4 -3
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +43 -19
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/core-routes-plugin.js +2 -2
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts +38 -2
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +142 -64
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/prompts/framework-core-compact.d.ts +1 -1
- package/dist/server/prompts/framework-core-compact.d.ts.map +1 -1
- package/dist/server/prompts/framework-core-compact.js +7 -13
- package/dist/server/prompts/framework-core-compact.js.map +1 -1
- package/dist/server/prompts/framework-core.d.ts +1 -1
- package/dist/server/prompts/framework-core.d.ts.map +1 -1
- package/dist/server/prompts/framework-core.js +10 -21
- package/dist/server/prompts/framework-core.js.map +1 -1
- package/dist/server/prompts/index.d.ts +1 -1
- package/dist/server/prompts/index.d.ts.map +1 -1
- package/dist/server/prompts/index.js +1 -1
- package/dist/server/prompts/index.js.map +1 -1
- package/dist/server/prompts/shared-rules.d.ts +16 -10
- package/dist/server/prompts/shared-rules.d.ts.map +1 -1
- package/dist/server/prompts/shared-rules.js +19 -10
- package/dist/server/prompts/shared-rules.js.map +1 -1
- package/dist/server/ssr-handler.d.ts +1 -1
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +10 -3
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/settings/user-settings.d.ts.map +1 -1
- package/dist/settings/user-settings.js +13 -1
- package/dist/settings/user-settings.js.map +1 -1
- package/dist/shared/cache-control.d.ts +52 -0
- package/dist/shared/cache-control.d.ts.map +1 -1
- package/dist/shared/cache-control.js +107 -0
- package/dist/shared/cache-control.js.map +1 -1
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/dist/templates/chat/_gitignore +1 -0
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/dist/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/dist/templates/default/app/root.tsx +1 -1
- package/dist/templates/default/public/manifest.json +2 -2
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +19 -0
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/dist/templates/workspace-core/.agents/skills/visual-answer/SKILL.md +1 -0
- package/dist/vite/agents-bundle-plugin.d.ts.map +1 -1
- package/dist/vite/agents-bundle-plugin.js +8 -7
- package/dist/vite/agents-bundle-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +66 -1
- package/dist/vite/client.js.map +1 -1
- package/docs/content/actions.mdx +2 -2
- package/docs/content/agent-surfaces.mdx +1 -1
- package/docs/content/authentication.mdx +2 -0
- package/docs/content/deployment.mdx +36 -0
- package/docs/content/http-api.mdx +266 -0
- package/docs/content/syncing-template-changes.mdx +159 -0
- package/package.json +4 -3
- package/src/a2a/activity.ts +38 -27
- package/src/a2a/client.ts +57 -4
- package/src/agent/engine/builder-engine.ts +35 -4
- package/src/agent/run-manager.ts +20 -1
- package/src/agent/run-store.ts +4 -1
- package/src/agent/types.ts +28 -8
- package/src/chat-threads/store.ts +45 -0
- package/src/checkpoints/index.ts +2 -0
- package/src/checkpoints/route-match.ts +13 -0
- package/src/cli/create.ts +105 -17
- package/src/cli/index.ts +20 -0
- package/src/cli/template-baseline.ts +410 -0
- package/src/cli/template-sync.ts +1004 -0
- package/src/cli/templates-meta.ts +1 -0
- package/src/client/AssistantChat.tsx +38 -12
- package/src/client/NewWorkspaceAppFlow.tsx +75 -10
- package/src/client/chat/message-components.tsx +127 -66
- package/src/client/chat/tool-call-display.tsx +29 -5
- package/src/client/error-format.ts +18 -0
- package/src/client/org/OrgSwitcher.tsx +30 -8
- package/src/client/org/TeamPage.tsx +7 -6
- package/src/client/settings/SettingsPanel.tsx +9 -9
- package/src/client/settings/SettingsTabsPage.tsx +12 -2
- package/src/client/sse-event-processor.ts +3 -0
- package/src/data-widgets/index.ts +41 -0
- package/src/deploy/build.ts +11 -9
- package/src/extensions/url-safety.ts +67 -4
- package/src/integrations/webhook-handler.ts +63 -9
- package/src/org/auto-join-domain.ts +4 -3
- package/src/org/context.ts +108 -39
- package/src/org/index.ts +5 -0
- package/src/org/service-identity.ts +60 -0
- package/src/provider-api/index.ts +22 -1
- package/src/scripts/docs/search.ts +12 -1
- package/src/server/__snapshots__/agent-chat-plugin.surface.spec.ts.snap +25 -36
- package/src/server/agent-chat/context-tools.ts +9 -4
- package/src/server/agent-chat/framework-prompts.ts +38 -66
- package/src/server/agent-chat-plugin.ts +17 -10
- package/src/server/agents-bundle.ts +84 -5
- package/src/server/auth.ts +4 -3
- package/src/server/builder-browser.ts +47 -19
- package/src/server/core-routes-plugin.ts +2 -2
- package/src/server/credential-provider.ts +209 -68
- package/src/server/index.ts +3 -0
- package/src/server/prompts/framework-core-compact.ts +6 -13
- package/src/server/prompts/framework-core.ts +9 -21
- package/src/server/prompts/index.ts +0 -1
- package/src/server/prompts/shared-rules.ts +19 -11
- package/src/server/ssr-handler.ts +13 -2
- package/src/settings/user-settings.ts +13 -1
- package/src/shared/cache-control.ts +141 -0
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/src/templates/chat/_gitignore +1 -0
- package/src/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/src/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/src/templates/default/app/root.tsx +1 -1
- package/src/templates/default/public/manifest.json +2 -2
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +19 -0
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/src/templates/workspace-core/.agents/skills/visual-answer/SKILL.md +1 -0
- package/src/vite/agents-bundle-plugin.ts +7 -6
- package/src/vite/client.ts +69 -3
|
@@ -1,583 +1,111 @@
|
|
|
1
1
|
# Analytics — Agent Guide
|
|
2
2
|
|
|
3
3
|
Analytics is an agent-native BI workspace. The agent manages data sources,
|
|
4
|
-
queries, dashboards, charts, and
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
queries, dashboards, charts, and warehouse integrations through actions and
|
|
5
|
+
SQL-backed state. Dashboards are the canonical user-facing artifact; legacy
|
|
6
|
+
analyses remain readable only for compatibility.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
**This agent is Claude with BigQuery/Gong/HubSpot/Prometheus access.** Reason
|
|
9
|
+
over fetched data here; do not suggest another AI tool.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Prompt cap: ~6,000 characters; put detail in `.agents/skills/*`.
|
|
12
|
+
|
|
13
|
+
Before building common workspace or agent UI, read `agent-native-toolkit`; use
|
|
14
|
+
`customizing-agent-native` for the configure → compose → eject → propose
|
|
14
15
|
ladder.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
## How To Answer A Data Question
|
|
18
|
+
|
|
19
|
+
1. **Search existing work first.** Call `search-analytics-query-catalog` before
|
|
20
|
+
writing any new query. This is grep for analytics: someone has likely already
|
|
21
|
+
saved this query, and its SQL names the exact source, table, and columns.
|
|
22
|
+
Adapt the closest match to the requested filters and window, run it once, and
|
|
23
|
+
stop.
|
|
24
|
+
2. **One bounded call.** List, filter, count, and cohort questions ("which X,
|
|
25
|
+
excluding Y") are a single SQL statement, or one `run-code` script that
|
|
26
|
+
filters server-side. Never page through a cohort across separate tool calls
|
|
27
|
+
and never fan out per item to apply a filter — that is what turns a
|
|
28
|
+
ten-second answer into a twenty-minute one.
|
|
29
|
+
3. **Escalate only on a miss.** If the catalog returns nothing usable, make at
|
|
30
|
+
most one discovery pass (`list-data-dictionary`, `search-bigquery-schema`,
|
|
31
|
+
`data-source-status`), then query. Don't cross-check or add breakdowns
|
|
32
|
+
nobody asked for.
|
|
33
|
+
4. **Answer in chat.** Give the result directly with a short table or inline
|
|
34
|
+
chart — never deflect to "check the dashboard." Keep native data widgets to
|
|
35
|
+
already-summarized data (≤50 rows); above that, state the total and show the
|
|
36
|
+
top rows.
|
|
37
|
+
5. **Chunk only for reading.** Group into 5-10 with per-item notes only when 30+
|
|
38
|
+
items each need qualitative reading no query can do (call transcripts, ticket
|
|
39
|
+
threads). Chunking a question a query could answer is the most expensive
|
|
40
|
+
mistake available here. See `adhoc-analysis`.
|
|
41
|
+
|
|
42
|
+
Use `ask-question` (multiple choice, at most once per turn) only when metric
|
|
43
|
+
definition, date range, or grain is genuinely ambiguous and a wrong guess would
|
|
44
|
+
change the numbers.
|
|
20
45
|
|
|
21
46
|
## Core Rules
|
|
22
47
|
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- `
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- Clarify-first for ambiguous ad-hoc work: when the metric definition, date
|
|
56
|
-
range, or grain is ambiguous and a wrong guess would change the numbers, use
|
|
57
|
-
the `ask-question` clarifying tool (multiple-choice) before computing. Ask at
|
|
58
|
-
most once per turn, and never when the dictionary or the user already settled
|
|
59
|
-
it.
|
|
60
|
-
- Verify before claiming: only present numbers you actually retrieved from a
|
|
61
|
-
source. Never report a value you did not query.
|
|
62
|
-
- The built-in Node Exporter demo dashboard uses the `demo` source. It queries
|
|
63
|
-
the built-in public demo Prometheus endpoint by default, not the user's
|
|
64
|
-
Prometheus credential slot. Treat it as demo-environment data: do not use it
|
|
65
|
-
for `REAL_DATA_REQUIRED`, saved analyses, or real user analytics answers
|
|
66
|
-
unless the user explicitly asks to inspect the demo dashboard.
|
|
67
|
-
- Framework Demo mode is separate from the built-in `demo` source. While Demo
|
|
68
|
-
mode is enabled, Analytics line and area charts reshape each returned numeric
|
|
69
|
-
series into a deterministic upward trend using that series' actual minimum,
|
|
70
|
-
maximum, and local step pattern. Source spikes and dips remain at the same
|
|
71
|
-
x-positions while the smallest necessary linear drift moves the series up and
|
|
72
|
-
to the right. This is presentation-only: query results, tables, metrics,
|
|
73
|
-
exports, and non-time-series charts remain unchanged, so do not cite the
|
|
74
|
-
displayed intermediate line/area points as retrieved source values.
|
|
75
|
-
- Every analytical answer should include enough audit context for the user to
|
|
76
|
-
trust it: source(s), time window, filters, sample size or row count,
|
|
77
|
-
join/match method when relevant, and caveats/gaps.
|
|
78
|
-
- Use actions for data sources, queries, charts, dashboards, analyses, and
|
|
79
|
-
sharing. Do not bypass app access checks with raw SQL for ownable resources.
|
|
80
|
-
- In dev, call actions with `pnpm action <name>`; in production, call native
|
|
81
|
-
tools. The action schema is authoritative.
|
|
82
|
-
- Prefer app query actions and provider readers over hand-written ad hoc SQL
|
|
83
|
-
unless the user explicitly asks for low-level inspection.
|
|
84
|
-
- Provider actions are shortcuts, not limits. When a canned action cannot
|
|
85
|
-
express the endpoint, filters, request body, pagination, or API version the
|
|
86
|
-
user needs, call `provider-api-catalog` / `provider-api-docs`, then
|
|
87
|
-
`provider-api-request` against the provider's real HTTP API. The generic
|
|
88
|
-
request action uses the shared `@agent-native/core/provider-api` runtime,
|
|
89
|
-
injects configured credentials, blocks private/internal URLs, and redacts
|
|
90
|
-
secrets.
|
|
91
|
-
- For questions about tracking events or instrumentation in GitHub-hosted code,
|
|
92
|
-
use `github-repo-files` before raw provider requests: check
|
|
93
|
-
`data-source-status` for GitHub, `operation="search"` likely event names/calls
|
|
94
|
-
with `includeTextMatches=true`, then `operation="read"` the relevant files.
|
|
95
|
-
Report the repo, ref/default branch, queries used, files read, and any
|
|
96
|
-
truncation or GitHub incomplete-results flags so absence claims are auditable.
|
|
97
|
-
- For named account/deal deep dives, call `account-deep-dive` first. It bundles
|
|
98
|
-
HubSpot deal/account/contact activity with Gong call detail and compact
|
|
99
|
-
transcript evidence so the final report can match Fusion-style depth.
|
|
100
|
-
- For HubSpot deal cohorts, prefer structured `hubspot-deals` filters
|
|
101
|
-
(`product`, `pipeline`, `closedStatus`, `closedDateFrom`/`closedDateTo`) for
|
|
102
|
-
the common case. `query` is full-text search and is not proof a specific
|
|
103
|
-
property matched. When a cohort needs an arbitrary property filter, an
|
|
104
|
-
IN-search, or a join against another provider, use the generic
|
|
105
|
-
provider-access pattern below instead of asking for a new action.
|
|
106
|
-
- For BigQuery, Prometheus, or other external providers, use the provider skill
|
|
107
|
-
and existing credential/integration flow.
|
|
108
|
-
- For questions that span multiple sources, follow `cross-source-analysis`:
|
|
109
|
-
stitch identities on BOTH a stable id AND email, de-duplicate, and cite
|
|
110
|
-
per-source provenance.
|
|
111
|
-
- When the user challenges coverage or asks why records are missing, rerun or
|
|
112
|
-
revise from the source cohort and provide the updated answer directly. Do not
|
|
113
|
-
say a revised analysis exists unless you include it or save it.
|
|
114
|
-
- Dashboards and charts should be useful, explainable, and scoped to the user's
|
|
115
|
-
question. Avoid decorative metrics.
|
|
116
|
-
- For shipped dashboard templates, call `list-dashboard-templates` first, then
|
|
117
|
-
`install-dashboard-template` with the selected `templateId`. Do not recreate a
|
|
118
|
-
catalog template by hand unless the user asks for a custom variant.
|
|
119
|
-
- Agent Native observability is the exception: its panels belong in the
|
|
120
|
-
canonical Agent Native dashboard (`agent-native-templates-first-party`). Do
|
|
121
|
-
not create, publish, or install a separate observability dashboard template.
|
|
122
|
-
- Agent LLM observability is collected through the same first-party tracking
|
|
123
|
-
API as product analytics. Core emits PostHog-compatible `$ai_generation`
|
|
124
|
-
events when emitting apps are configured with `AGENT_NATIVE_ANALYTICS_PUBLIC_KEY`
|
|
125
|
-
and `AGENT_NATIVE_ANALYTICS_ENDPOINT` (or the default hosted endpoint). Query
|
|
126
|
-
these with `query-agent-native-analytics` using `event_name = '$ai_generation'`;
|
|
127
|
-
useful JSON properties include `$ai_trace_id` / `run_id`, `$ai_session_id` /
|
|
128
|
-
`thread_id`, `$ai_model` / `model`, `$ai_provider` / `provider`,
|
|
129
|
-
`$ai_input_tokens`, `$ai_output_tokens`, `cache_read_tokens`,
|
|
130
|
-
`cache_write_tokens`, `cost_cents_x100`, `$ai_total_cost_usd`, `duration_ms`
|
|
131
|
-
/ `$ai_latency`, `status`, `tool_calls`, `successful_tools`, `failed_tools`,
|
|
132
|
-
and `$ai_error` / `error_message`. Do not expect prompts, tool args, or model
|
|
133
|
-
responses in these tracked events by default.
|
|
134
|
-
- External MCP callers should use `ask_app` as the default for multi-step
|
|
135
|
-
Analytics work. It can resolve a person's known email, correlate sessions
|
|
136
|
-
with captured errors, mint a temporary replay-context link, and inspect the
|
|
137
|
-
timeline, page navigation, console diagnostics, failed network requests, and
|
|
138
|
-
clicks when needed. The authenticated connector catalog is the fast fallback
|
|
139
|
-
and exposes only bounded, user/org-scoped read actions. Incident triage uses:
|
|
140
|
-
`list-session-recordings`, `get-session-replay-summary`,
|
|
141
|
-
`get-session-replay-timeline`, `query-agent-native-analytics`,
|
|
142
|
-
`list-error-issues`, and `get-error-issue`. Cross-app Gong work also exposes
|
|
143
|
-
`account-deep-dive`, `gong-calls`, and `gong-native-insights`. Fetch the summary before the
|
|
144
|
-
sanitized timeline; the timeline contains bounded page/click/error markers
|
|
145
|
-
without raw replay events or storage references. Do not add replay blob or
|
|
146
|
-
dashboard mutation actions to this catalog without an explicit security
|
|
147
|
-
review.
|
|
148
|
-
- Demo mode is a browser-local presentation preference. Analytics backend
|
|
149
|
-
actions, agent/MCP reads, session replays, and error issues always return real
|
|
150
|
-
authorized identities, so incident lookups should use the actual
|
|
151
|
-
`userId`/email parameter (e.g. `userId: "user@example.com"`) or recording/
|
|
152
|
-
issue id.
|
|
153
|
-
- Analytics keeps its direct MCP surface explicitly curated, so external
|
|
154
|
-
agents should use `ask_app` for multi-step investigation and changes. The
|
|
155
|
-
cataloged reads above are bounded, user/org-scoped fallback tools for callers
|
|
156
|
-
that already know which lookup they need. Sibling apps should invoke the exact
|
|
157
|
-
action directly when no Analytics reasoning loop is needed. Generic core
|
|
158
|
-
`db-schema` / `db-query` remain in-app agent tools and are not exposed
|
|
159
|
-
directly because broad SQL/schema access is too powerful to infer from
|
|
160
|
-
read-only metadata. Writes remain `ask_app`-only. Use the explicit catalog
|
|
161
|
-
and `denyActions` policy for any unusually sensitive read instead of
|
|
162
|
-
exposing an unannotated action.
|
|
163
|
-
- `/agents` is the Analytics home for admin surfaces. The default Monitoring
|
|
164
|
-
view embeds the shared observability dashboard for traces, conversations,
|
|
165
|
-
evals, agent experiments, and feedback. `/agents?view=flags` is the
|
|
166
|
-
sole admin-only fleet feature-flag control plane. Call
|
|
167
|
-
`list-workspace-feature-flags` before changing a flag and preserve
|
|
168
|
-
each app's explicit state: `unsupported`, `unreachable`, `forbidden`, and
|
|
169
|
-
`unknown-legacy` are unknown states, never synonyms for off. Use
|
|
170
|
-
`set-workspace-feature-flag` for app-qualified changes; target apps remain the
|
|
171
|
-
source of truth and are resolved only through the trusted organization
|
|
172
|
-
directory. Treat only a versioned mutation response whose key, org scope, and
|
|
173
|
-
requested rules match as success. Flags are source-declared booleans; do not
|
|
174
|
-
create variants, metrics, exposure tracking, or per-app management panels.
|
|
175
|
-
Report a failed target mutation instead of claiming the rollout changed.
|
|
176
|
-
`/agents?view=dashboards` shows the
|
|
177
|
-
admin-only dashboard usage audit; call `list-dashboard-usage-stats` when
|
|
178
|
-
admins ask about dashboard created/modified dates, owners, last tracked
|
|
179
|
-
modifier, views, edits, engagements, saved views, or cleanup candidates. The
|
|
180
|
-
dashboard overflow menu shows created/updated timestamps and their tracked
|
|
181
|
-
actors for both SQL and Explorer dashboards. The
|
|
182
|
-
Advanced menu opens `/agents?view=database`, where organization owners/admins
|
|
183
|
-
can connect other agent-native app databases and use the shared database admin
|
|
184
|
-
tool for table browsing, row editing, and SQL inspection. This database
|
|
185
|
-
surface is for connected target app databases, not broad access to all
|
|
186
|
-
Analytics data. Keep future admin additions inside this route instead of
|
|
187
|
-
adding many top-level sidebar tabs.
|
|
188
|
-
- The `migrate-analytics-artifacts` action is the organization-scoped
|
|
189
|
-
consolidation path. Run it first with `dryRun: true`, then use the exact
|
|
190
|
-
`confirm: "MIGRATE_ANALYTICS_ARTIFACTS"` token for an owner/admin-approved
|
|
191
|
-
write. It materializes legacy settings, turns saved analyses and standalone
|
|
192
|
-
extensions into dashboard blocks, archives exact duplicates, copies shares,
|
|
193
|
-
and keeps source rows recoverable. It intentionally covers organization-
|
|
194
|
-
scoped rows, not private member-only rows.
|
|
195
|
-
- For dashboard edits, default to `mutate-dashboard` with its typed
|
|
196
|
-
`dashboard.*` script API. It supports id-based panel moves, title/SQL/config
|
|
197
|
-
edits, inserts, duplication, removal, and dashboard field patches in one
|
|
198
|
-
atomic save. The main payload is a string, so it avoids native-array
|
|
199
|
-
serialization traps. The script is constrained: only documented dashboard
|
|
200
|
-
method calls with JSON-compatible arguments are parsed; variables, imports,
|
|
201
|
-
loops, functions, network, filesystem, and DB access are not available.
|
|
202
|
-
- Dashboard extension boxes use `chartType: "extension"`. For ordinary requests
|
|
203
|
-
such as "put X in this dashboard," default to `config.extensionId`: the
|
|
204
|
-
author-selected extension is part of the shared dashboard, renders for every
|
|
205
|
-
viewer who can access it, and remains present in scheduled report captures.
|
|
206
|
-
Direct embeds receive dashboard id, name, description, current filters, and
|
|
207
|
-
panel context. Use `config.extensionSlotId` only when the user explicitly asks
|
|
208
|
-
for a personal/per-viewer widget slot. The stable per-box slot is
|
|
209
|
-
`analytics.dashboard.<dashboard-id>.panel.<panel-id>`; call
|
|
210
|
-
`add-extension-slot-target` and `install-extension` for it. Slot installs are
|
|
211
|
-
per-user, so different viewers can see different widgets and service-account
|
|
212
|
-
report captures may show the empty install affordance.
|
|
213
|
-
- Dashboard saves keep bounded history in SQL. Use
|
|
214
|
-
`list-dashboard-revisions` to inspect undo points and
|
|
215
|
-
`restore-dashboard-revision` to restore one instead of hand-editing history
|
|
216
|
-
rows.
|
|
217
|
-
- Saved analyses also keep bounded history. Use `list-analysis-revisions` and
|
|
218
|
-
`restore-analysis-revision` for rollback after a re-run updates the saved
|
|
219
|
-
findings.
|
|
220
|
-
- Do not count shifting `/panels/<index>` values for ordinary dashboard edit
|
|
221
|
-
requests. Use low-level JSON-pointer edits only when explicitly requested.
|
|
222
|
-
- `get-sql-dashboard` is compact by default for agents. Use its `panels`
|
|
223
|
-
summaries and `layout.panelOrder` / `layout.firstPanelIds` for orientation and
|
|
224
|
-
proof. Pass `includeConfig: true` only when full panel SQL/config is needed.
|
|
225
|
-
- Native dashboards are constrained artifacts. If a requested dashboard,
|
|
226
|
-
analysis/report surface, visualization, interaction model, custom layout, or
|
|
227
|
-
bespoke workflow cannot be done faithfully with the built-in dashboard JSON
|
|
228
|
-
config/components, automatically create an extension and embed it as one or
|
|
229
|
-
more `chartType: "extension"` panels using `config.extensionId`. Never leave
|
|
230
|
-
the extension standalone or direct the user to an Extensions page from
|
|
231
|
-
Analytics.
|
|
232
|
-
- For an existing extension-backed dashboard or migrated surface such as Risk
|
|
233
|
-
Meeting, separate data repair from visual redesign. Inspect the dashboard and
|
|
234
|
-
extension first, then call `update-extension` with exactly `id`,
|
|
235
|
-
`operation: "edit"`, and a `payloadJson` string containing focused
|
|
236
|
-
`patches`/`edits` that touch only the data-loading seam. Never send empty
|
|
237
|
-
placeholder fields. Preserve the existing layout, CSS, copy, and interactions;
|
|
238
|
-
never reconstruct the full HTML body for a data-only fix. A request that
|
|
239
|
-
combines a visual rewrite (for example compacting, removing sections,
|
|
240
|
-
renaming, or changing padding) with a data repair is still a broad rewrite;
|
|
241
|
-
after inspecting the current extension, use `operation: "replace"` with the
|
|
242
|
-
complete replacement body inside `payloadJson`. Use
|
|
243
|
-
`set-resource-visibility` for sharing changes. If a focused edit fails, do not
|
|
244
|
-
retry unchanged arguments.
|
|
245
|
-
- Use framework sharing and access helpers for dashboards, analyses, and saved
|
|
246
|
-
resources.
|
|
247
|
-
- Dashboard email reports live in SQL via the
|
|
248
|
-
`dashboard-report-subscriptions` actions. They send daily snapshots scoped to
|
|
249
|
-
the exact user/org context that created the subscription with saved URL
|
|
250
|
-
filters; do not hand-wire custom email routes around that action surface.
|
|
251
|
-
- Table panels can be exported with `export-dashboard-panel-to-google-sheet`.
|
|
252
|
-
The action re-runs the accessible panel query with the dashboard's current
|
|
253
|
-
filter variables, creates a new Sheet through the connected Google Drive
|
|
254
|
-
workspace connection, and returns its URL plus bounded export metadata.
|
|
255
|
-
Report PNGs are Playwright captures of the real dashboard route in
|
|
256
|
-
`reportScreenshot=1` mode, authenticated by a short-lived embed-session token
|
|
257
|
-
and embedded inline in email as ordered CID images. Complete dashboards are
|
|
258
|
-
captured sequentially in four-panel windows matching the browser's four-query
|
|
259
|
-
concurrency limit; every window must match the panel ids snapshotted at the
|
|
260
|
-
start, and a failed or mismatched window
|
|
261
|
-
invalidates the entire image set so the scheduler can retry instead of
|
|
262
|
-
sending a partial report. Capture is capped at 10 windows and 14 MiB of raw
|
|
263
|
-
PNG data, and subscriptions are capped at five distinct recipients; use a
|
|
264
|
-
mailing-list address for larger audiences. The serverless capture deadline
|
|
265
|
-
reserves 90 seconds of the 300-second worker budget for cleanup and delivery.
|
|
266
|
-
The ten-minute retry delay is an eligibility floor; the \*/15 sweep runs the
|
|
267
|
-
retry on its first tick after that floor. Netlify builds emit a scheduled
|
|
268
|
-
trigger plus a background worker from
|
|
269
|
-
`scripts/emit-netlify-dashboard-report-cron.ts`, using a per-deploy internal
|
|
270
|
-
token and disabling the in-process interval scheduler on Netlify to avoid
|
|
271
|
-
duplicate sends. External cron callers can still sweep due reports by POSTing
|
|
272
|
-
`/api/dashboard-reports/run` with
|
|
273
|
-
`Authorization: Bearer $DASHBOARD_REPORTS_CRON_SECRET`. PNG rendering uses
|
|
274
|
-
local Chrome in development and `playwright-core` plus
|
|
275
|
-
`@sparticuz/chromium-min` in serverless runtimes; set
|
|
276
|
-
`DASHBOARD_REPORT_CHROMIUM_PACK_URL` only when overriding the default
|
|
277
|
-
Chromium pack location.
|
|
278
|
-
- Analytics alert rules live in SQL via the `analytics-alert-rules` actions.
|
|
279
|
-
Use `save-analytics-alert-rule`, `list-analytics-alert-rules`,
|
|
280
|
-
`delete-analytics-alert-rule`, and `run-analytics-alerts`; do not hardcode
|
|
281
|
-
one-off alert checks in product code. Rules are generic over first-party
|
|
282
|
-
analytics events: set `eventName` for an exact event name, then filter on
|
|
283
|
-
columns like `event_name`, `app`, `template`, `user_key`, `session_id`,
|
|
284
|
-
`path`, or nested JSON fields like `properties.stage` and
|
|
285
|
-
`context.referrer`. `thresholdMode: "event_count"` counts matching events;
|
|
286
|
-
`thresholdMode: "distinct_count"` counts unique values from `distinctBy`.
|
|
287
|
-
Alert notifications use the shared notification channel registry, so
|
|
288
|
-
`channels` can include `inbox`, `email`, `slack`, `webhook`, or any custom
|
|
289
|
-
registered channel. Slack/webhook prefer delivery-only
|
|
290
|
-
`metadata.delivery.slackWebhookUrl` / `metadata.delivery.webhookUrl` (uptime
|
|
291
|
-
monitors store these on the monitor row), then fall back to
|
|
292
|
-
`NOTIFICATIONS_SLACK_WEBHOOK_URL` / `NOTIFICATIONS_WEBHOOK_URL`. Configure
|
|
293
|
-
optional `NOTIFICATIONS_SLACK_WEBHOOK_AUTH`; configure email with existing
|
|
294
|
-
`RESEND_API_KEY` or `SENDGRID_API_KEY` plus `EMAIL_FROM`, and pass per-rule
|
|
295
|
-
`emailRecipients` or the fallback `NOTIFICATIONS_EMAIL_RECIPIENTS`. Saving
|
|
296
|
-
explicit `emailRecipients` also remembers them as the current user's defaults
|
|
297
|
-
for the next alert rule created in Settings.
|
|
298
|
-
Netlify builds emit an alert cron trigger plus background worker from
|
|
299
|
-
`scripts/emit-netlify-dashboard-report-cron.ts` every five minutes; long-lived
|
|
300
|
-
runtimes use the in-process scheduler unless `ANALYTICS_ALERT_JOBS=0` is set.
|
|
301
|
-
External cron callers can POST `/api/analytics-alerts/run` with
|
|
302
|
-
`Authorization: Bearer $ANALYTICS_ALERTS_CRON_SECRET`.
|
|
303
|
-
Users can view and manage these rules in Settings under the Alerts card, which
|
|
304
|
-
uses the same action surface as the agent.
|
|
48
|
+
- Data integrity first. Never invent numbers, dimensions, filters, or source
|
|
49
|
+
semantics; only present values you actually retrieved, and state uncertainty.
|
|
50
|
+
- Every analytical answer carries audit context: source(s), time window,
|
|
51
|
+
filters, row count/sample size, join method, caveats.
|
|
52
|
+
- Use actions for sources, queries, charts, dashboards, and sharing. Don't
|
|
53
|
+
bypass access checks with raw SQL for ownable resources. In dev call actions
|
|
54
|
+
with `pnpm action <name>`; in production call native tools. Use
|
|
55
|
+
`share-resource` / `set-resource-visibility` for sharing.
|
|
56
|
+
- Provider actions are shortcuts, not limits — escalate to
|
|
57
|
+
`provider-api-catalog` / `provider-api-docs` / `provider-api-request` when a
|
|
58
|
+
canned action is too narrow. See `provider-api`.
|
|
59
|
+
- Create dashboards, panels, or saved artifacts only when explicitly asked;
|
|
60
|
+
suggest and wait otherwise. Scope them to the question, avoid decorative
|
|
61
|
+
metrics, and never modify existing dashboards without a directive.
|
|
62
|
+
- For named account/deal deep dives, call `account-deep-dive` first.
|
|
63
|
+
- When the user challenges coverage or asks why records are missing, rerun from
|
|
64
|
+
the source cohort and include the updated answer directly — never claim a
|
|
65
|
+
revision you didn't produce.
|
|
66
|
+
- The `demo` source (Node Exporter) is demo data against a public endpoint.
|
|
67
|
+
Never cite it as real analytics evidence unless the user asks about the demo
|
|
68
|
+
dashboard.
|
|
69
|
+
- Store large payloads (images, PDFs, exports, replay chunks, base64, `data:`
|
|
70
|
+
URLs) in file/blob storage — never in SQL tables, `application_state`,
|
|
71
|
+
`settings`, or `resources`. Persist URLs, ids, or handles.
|
|
72
|
+
- Never hardcode API keys, tokens, webhook URLs, secrets, private Builder data,
|
|
73
|
+
or customer data. Use secrets/OAuth and obvious placeholders in examples.
|
|
74
|
+
- External MCP callers should default to `ask_app` for multi-step work; the
|
|
75
|
+
curated read-only fallback catalog is bounded and user/org-scoped, and writes
|
|
76
|
+
stay `ask_app`-only. Backend reads always return real identities.
|
|
77
|
+
- Dashboard email reports and analytics alert rules are SQL-backed,
|
|
78
|
+
self-describing action surfaces — don't hand-wire routes around them. Reports
|
|
79
|
+
cap at five recipients. See `dashboard-ops`.
|
|
305
80
|
|
|
306
81
|
## Application State
|
|
307
82
|
|
|
308
|
-
- `navigation` exposes current dashboard, analysis, source, chart, and
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
context
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
`view="catalog"` for the template catalog, `view="sessions"` for session
|
|
315
|
-
replay, `view="monitoring"` with `monitoringView="uptime|errors"` (plus the
|
|
316
|
-
`monitorId`, `statusPageId`, or `errorIssueId` deep links) for uptime checks,
|
|
317
|
-
public status pages, or error triage, and `view="agents"` with
|
|
318
|
-
`agentsView="dashboards|database|flags"` plus optional
|
|
319
|
-
`dbAdminConnectionId` for dashboard usage, connected app database admin,
|
|
320
|
-
or fleet feature flags.
|
|
321
|
-
- Use `view-screen` when the active dashboard/chart context is unclear.
|
|
322
|
-
|
|
323
|
-
## Session Replay
|
|
324
|
-
|
|
325
|
-
- `/sessions` lists scoped, signed-in first-party session recordings with an
|
|
326
|
-
email-backed visitor identity and playable replay events. Filters live in the
|
|
327
|
-
URL (`range`, `app`, `q`) and are mirrored through application state so the
|
|
328
|
-
agent sees the same list the user sees.
|
|
329
|
-
- `/sessions/:recordingId` loads summary/timeline data through
|
|
330
|
-
`get-session-replay-summary` and fetches rrweb payloads only through scoped
|
|
331
|
-
chunk routes. Do not expose storage/provider URLs, raw chunk table access, or
|
|
332
|
-
unscoped replay blobs in UI, actions, dashboards, docs, or prompts.
|
|
333
|
-
- The session detail page can mint a temporary `Copy for agent` link through
|
|
334
|
-
`create-session-replay-agent-link`. That URL carries an `agent_access` token
|
|
335
|
-
scoped to one recording for two hours; SSR embeds an agent discovery payload
|
|
336
|
-
and the JSON APIs expose only summary/timeline metadata plus bounded event
|
|
337
|
-
reads.
|
|
338
|
-
- Use `@agent-native/core/server` and `@agent-native/core/shared` agent-access
|
|
339
|
-
helpers for scoped token mint/verify and bot-visible URL construction. Keep
|
|
340
|
-
replay chunk/blob authorization, diagnostics payloads, and the session detail
|
|
341
|
-
UI in Analytics.
|
|
342
|
-
- Recordings also capture console logs and network request metadata (request
|
|
343
|
-
bodies/headers never captured; response bodies captured only as bounded,
|
|
344
|
-
redacted 5xx snippets; scrubbed URLs, truncated messages, per-session
|
|
345
|
-
budgets); ingest derives `errorCount`/`networkErrorCount` and adds
|
|
346
|
-
`console-error`/`network-error` timeline markers.
|
|
347
|
-
- The agent context includes a bounded `diagnostics` section (errors first) and
|
|
348
|
-
advertises `GET /api/session-replay/agent-diagnostics.json` with
|
|
349
|
-
`kind`/`level`/`limit` params (limit max 500) under the same `agent_access`
|
|
350
|
-
token — the primary signal when debugging a user-reported issue. `offset` and
|
|
351
|
-
`fromMs`/`toMs` page/window the same endpoint in strictly chronological order
|
|
352
|
-
(with `hasMore`/`truncated` per kind) so an agent can enumerate every
|
|
353
|
-
captured entry in a large session.
|
|
354
|
-
- The replay player has a Dev Tools panel with Console and Network tabs
|
|
355
|
-
(filters, search, jump-to-seek, error badge); extend it rather than adding a
|
|
356
|
-
separate replay debugging surface. See the `session-replay` skill.
|
|
357
|
-
- Dashboard rows that include `recording_id` should link to
|
|
358
|
-
`/sessions/:recordingId`; rows that only include `session_id` can link to a
|
|
359
|
-
filtered `/sessions` search.
|
|
360
|
-
|
|
361
|
-
## Monitoring
|
|
362
|
-
|
|
363
|
-
- `/monitoring` is the Monitoring tab (`app/routes/monitoring._index.tsx` →
|
|
364
|
-
`app/pages/monitoring/MonitoringPage.tsx`), a thin shell hosting two
|
|
365
|
-
independently-owned panels selected by `?view=uptime|errors` (defaults to
|
|
366
|
-
uptime). `navigation` mirrors it as `view="monitoring"` with `monitoringView`
|
|
367
|
-
(plus `monitorId`/`errorIssueId` when a row is open); each panel also writes
|
|
368
|
-
richer selection to the `monitoring` application-state key.
|
|
369
|
-
- Uptime (`app/pages/monitoring/UptimePanel.tsx`,
|
|
370
|
-
`app/pages/monitoring/uptime/**`) manages synthetic HTTP checks with
|
|
371
|
-
alerting. Actions: `list-monitors`, `get-monitor`, `save-monitor`,
|
|
372
|
-
`run-monitor-check`, `delete-monitor`. Checks/alerting run server-side in
|
|
373
|
-
`server/lib/uptime-monitors.ts` (sweep job `server/jobs/uptime-monitors.ts`,
|
|
374
|
-
scheduler `server/plugins/uptime-monitor-jobs.ts`) over
|
|
375
|
-
`server/db/schema-monitoring.ts`. Production serverless/Netlify-style
|
|
376
|
-
runtimes skip the in-process interval scheduler and rely on the generated
|
|
377
|
-
scheduled/background worker or external cron instead. Deep links: list
|
|
378
|
-
`?view=uptime`, detail `?view=uptime&monitor=<id>`, create
|
|
379
|
-
`?view=uptime&monitor=new`, edit `?view=uptime&monitor=<id>&edit=1`. See
|
|
380
|
-
`docs/uptime-monitoring.md`.
|
|
381
|
-
- Status pages (`app/pages/monitoring/uptime/status-pages/**`) are a config
|
|
382
|
-
sub-view under Uptime that bundle chosen monitors under a public
|
|
383
|
-
`/status/<slug>` page. Actions: `list-status-pages`, `get-status-page`,
|
|
384
|
-
`save-status-page`, `delete-status-page`, `add-status-page-monitor`,
|
|
385
|
-
`remove-status-page-monitor`, `reorder-status-page-monitors`, plus the
|
|
386
|
-
unauthenticated `get-public-status-page`. Owner-scoped CRUD and the sanitized
|
|
387
|
-
public projection live in `server/lib/status-pages.ts` over
|
|
388
|
-
`server/db/schema-monitoring.ts`. Deep links: index
|
|
389
|
-
`?view=uptime&statuspage=list`, create `?view=uptime&statuspage=new`, edit
|
|
390
|
-
`?view=uptime&statuspage=<id>`.
|
|
391
|
-
- Errors (`app/pages/monitoring/ErrorsPanel.tsx`,
|
|
392
|
-
`app/pages/monitoring/errors/**`) is Sentry-style exception triage grouped
|
|
393
|
-
into issues by fingerprint. Actions: `list-error-issues`, `get-error-issue`,
|
|
394
|
-
`resolve-error-issue`, `capture-test-error`, `match-error-issues`.
|
|
395
|
-
Ingest/grouping lives in `server/lib/error-capture.ts` over
|
|
396
|
-
`server/db/schema-errors.ts`. Browser capture uses the SDK from
|
|
397
|
-
`@agent-native/core/client` (`captureException` / `captureMessage` /
|
|
398
|
-
`addErrorBreadcrumb`), auto-enabled by `configureTracking` and transported
|
|
399
|
-
through the first-party analytics ingest as a `$exception` event. Deep link:
|
|
400
|
-
`?view=errors&issue=<id>`. Issue detail includes recent frequency,
|
|
401
|
-
parsed/raw stack traces, source code snippets when available, breadcrumbs,
|
|
402
|
-
tags, occurrence history, and session replay links. See
|
|
403
|
-
`docs/error-capture.md`.
|
|
404
|
-
- Session replay ↔ Errors: a recording's devtools Console error lines link to
|
|
405
|
-
the grouped issue at `/monitoring?view=errors&issue=<id>`, resolved by
|
|
406
|
-
`match-error-issues` (exact fingerprint match, no heuristics); issues link
|
|
407
|
-
back to the originating recording at `/sessions/<recordingId>`.
|
|
408
|
-
|
|
409
|
-
## Dashboard Template Catalog
|
|
410
|
-
|
|
411
|
-
- To build or extend a LARGE first-party dashboard, prefer `compose-dashboard`:
|
|
412
|
-
name the metrics and the server generates the validated SQL/config for every
|
|
413
|
-
panel in ONE fast call. Do NOT hand-author big `update-dashboard` configs
|
|
414
|
-
panel-by-panel or loop `update-dashboard` — streaming a giant multi-panel
|
|
415
|
-
argument across timeout boundaries fails and thrashes. Unknown metric keys are
|
|
416
|
-
skipped and reported; per-panel SQL validates independently; existing
|
|
417
|
-
dashboards append by default (`overwrite: true` replaces). Report the returned
|
|
418
|
-
`panelCount` as proof-of-done.
|
|
419
|
-
- `list-dashboard-templates` lists source-controlled dashboard templates with
|
|
420
|
-
`id`, category, data sources, panel count, and installed dashboard IDs.
|
|
421
|
-
- `install-dashboard-template` installs a catalog template into normal
|
|
422
|
-
SQL-backed dashboards. Required: `templateId`. Optional: `dashboardId`,
|
|
423
|
-
`name`, `overwrite`, `forceNew`, and `mergePanels`.
|
|
424
|
-
- Keep the canonical Agent Native dashboard
|
|
425
|
-
(`agent-native-templates-first-party`) focused: it includes one explicit
|
|
426
|
-
feedback-sentiment-by-model chart and one optional inferred-message-sentiment
|
|
427
|
-
chart, not the broader LLM cost, token, latency, or error suite. Explicit
|
|
428
|
-
feedback uses content-free `$ai_feedback` events with `sentiment` (`positive`
|
|
429
|
-
or `negative`) and model in `$ai_model` or `model`. Inferred sentiment uses
|
|
430
|
-
`$ai_sentiment` events with `method = 'llm'` and `sentiment` (`positive`,
|
|
431
|
-
`neutral`, or `negative`). Keep these panels in the canonical dashboard and
|
|
432
|
-
do not recreate a separately installable observability template.
|
|
433
|
-
- To add a template's panels to an existing dashboard, call
|
|
434
|
-
`install-dashboard-template` with `mergePanels: true` and the existing
|
|
435
|
-
`dashboardId`. It appends only the template panels whose id is not already
|
|
436
|
-
present (preserving existing panels and order) in one atomic save and returns
|
|
437
|
-
`{ addedPanelIds, skippedExistingIds, panelCount }`. Prefer this over looping
|
|
438
|
-
`update-dashboard` to add many panels — sequential calls time out on the ~40s
|
|
439
|
-
hosted run budget.
|
|
440
|
-
- Node Exporter ships as `node-exporter-macos` for Darwin/Homebrew
|
|
441
|
-
`node_exporter` scrapes and `node-exporter-full` for the Linux-focused
|
|
442
|
-
Grafana 1860 revision 45 full dashboard converted into native Analytics
|
|
443
|
-
panels. `node-exporter-full` also includes Prometheus Observability Demo app
|
|
444
|
-
metrics (`demo_http_*`, `demo_chaos_mode`, and synthetic CPU/disk/memory
|
|
445
|
-
workload metrics). Keep the first-open `App / Overview` tab light: it should
|
|
446
|
-
show the Request Latency highlight plus current app state, while Traffic,
|
|
447
|
-
Latency, and Workload details stay split across their own `App / *` tabs.
|
|
448
|
-
|
|
449
|
-
## Demo Dashboard
|
|
450
|
-
|
|
451
|
-
- `ensure-demo-dashboards` installs one private per-user demo on first app
|
|
452
|
-
open: `demo-node-exporter`. The Analytics root route calls this before
|
|
453
|
-
honoring local last-opened state; when the action creates the demo, the user
|
|
454
|
-
should land directly on the Node Exporter demo's `App / Overview` tab without
|
|
455
|
-
visiting the template catalog or data-source setup.
|
|
456
|
-
- The demo dashboard is generated from the same `node-exporter-full` seed as
|
|
457
|
-
the catalog template. Its Prometheus panels keep the same PromQL descriptors
|
|
458
|
-
and use `source: "demo"` so queries route to the demo Prometheus endpoint
|
|
459
|
-
instead of the user's `PROMETHEUS_*` credential slot.
|
|
460
|
-
- The demo Prometheus endpoint defaults to the public read-only
|
|
461
|
-
`https://prometheus.agent-native.foo`, so cloud and local MPX installs work
|
|
462
|
-
without user setup. Deployments can override it with
|
|
463
|
-
`ANALYTICS_DEMO_PROMETHEUS_URL` and optional
|
|
464
|
-
`ANALYTICS_DEMO_PROMETHEUS_USERNAME`,
|
|
465
|
-
`ANALYTICS_DEMO_PROMETHEUS_PASSWORD`, or
|
|
466
|
-
`ANALYTICS_DEMO_PROMETHEUS_BEARER_TOKEN`. Do not put credential values in
|
|
467
|
-
source, docs, fixtures, tests, prompts, or dashboard seeds.
|
|
468
|
-
- Demo dashboards are ordinary SQL dashboard rows, so rename, share, archive,
|
|
469
|
-
and delete flows apply. Deleted demo IDs are tombstoned in SQL settings and
|
|
470
|
-
are not recreated unless the user explicitly asks to reset demos.
|
|
471
|
-
- Use `ensure-demo-dashboards --reset=true` only when the user asks to restore
|
|
472
|
-
a deleted or changed demo dashboard.
|
|
473
|
-
|
|
474
|
-
## Deep Analysis Rules
|
|
475
|
-
|
|
476
|
-
**The analytics agent IS Claude with provider access** — the same 200K context
|
|
477
|
-
window, the same reasoning capability, plus direct access to BigQuery, Gong,
|
|
478
|
-
HubSpot, Pylon, Sentry, Grafana, etc. It can do everything a standalone AI
|
|
479
|
-
conversation can do, including reading large unstructured text and producing
|
|
480
|
-
long-form memo-style output.
|
|
481
|
-
|
|
482
|
-
**NEVER suggest the user move to a separate AI tool, project, or external service for:**
|
|
483
|
-
|
|
484
|
-
- Reasoning or synthesis over data fetched in this session
|
|
485
|
-
- Deep analysis across multiple accounts, calls, or data points
|
|
486
|
-
- Holding context and judgment across a complex multi-step investigation
|
|
487
|
-
- Generating written summaries, memos, findings, or recommendations
|
|
488
|
-
|
|
489
|
-
### Answer with Real Data
|
|
490
|
-
|
|
491
|
-
When the user asks a data question, **query real data first**, then present the
|
|
492
|
-
answer directly in chat with tables, inline charts, and findings. Never deflect
|
|
493
|
-
to "check the dashboard" — actually run the query, get the data, and present it.
|
|
494
|
-
|
|
495
|
-
### Incident / Metric Investigations
|
|
496
|
-
|
|
497
|
-
When investigating a production incident, metric anomaly, or performance issue:
|
|
498
|
-
|
|
499
|
-
1. **Query real metrics FIRST** — Prometheus/Grafana for service metrics, Sentry
|
|
500
|
-
for errors, BigQuery for event trends. Real data tells you what happened.
|
|
501
|
-
2. **Check upstream dependencies** — many incidents are caused by provider-side
|
|
502
|
-
degradation (LLM APIs, external services), not local code.
|
|
503
|
-
3. **Only analyze code/config after you have data** — code tells you what _could_
|
|
504
|
-
happen; metrics tell you what _did_ happen.
|
|
505
|
-
|
|
506
|
-
### Batch / Large Fan-Out Analyses
|
|
507
|
-
|
|
508
|
-
For analyses spanning 30+ accounts, deals, or calls:
|
|
509
|
-
|
|
510
|
-
1. Define the cohort and chunk into groups of 5-10 items.
|
|
511
|
-
2. Process each chunk, writing per-item findings as intermediate notes.
|
|
512
|
-
3. Synthesize across all chunks in a final pass.
|
|
513
|
-
|
|
514
|
-
Do not try to hold 30+ full records in one context pass.
|
|
515
|
-
|
|
516
|
-
### Provider Access & Dashboard Data Programs
|
|
517
|
-
|
|
518
|
-
One generic pattern covers arbitrary provider access, cross-source joins,
|
|
519
|
-
corpus search, and turning any of that into a live dashboard panel — there is
|
|
520
|
-
no separate per-vendor workflow:
|
|
521
|
-
|
|
522
|
-
1. `provider-api-catalog` / `provider-api-docs` to confirm the endpoint,
|
|
523
|
-
params, and auth (check `corpusRecipes` for broad body-text searches).
|
|
524
|
-
2. `provider-api-request` for a one-off call, or `run-code`'s `providerFetch` /
|
|
525
|
-
`providerFetchAll` / `providerSearchAll` to fetch/join/filter/aggregate
|
|
526
|
-
server-side so big intermediates never enter chat context (`stageAs` +
|
|
527
|
-
`query-staged-dataset` for a large single-source pull).
|
|
528
|
-
3. `save-data-program` to persist that run-code script as a live dashboard
|
|
529
|
-
panel feed: it dry-runs before saving, the panel binds with
|
|
530
|
-
`source: "program"`, and refresh policy (ttl/manual/background) lives on
|
|
531
|
-
the program — the agent does not re-run it per view.
|
|
532
|
-
4. Report coverage: source, filters, time window, row counts, joins,
|
|
533
|
-
failed/aborted pages, truncation, and remaining gaps. Never turn sampled or
|
|
534
|
-
truncated results into a confident "none found" or exhaustive conclusion.
|
|
535
|
-
|
|
536
|
-
See the `provider-api` and `data-programs` skills for the full API surface,
|
|
537
|
-
caching model, and a worked HubSpot x Pylon join example.
|
|
538
|
-
|
|
539
|
-
### Learnings Flywheel
|
|
540
|
-
|
|
541
|
-
After completing any significant analysis, record discoveries to `LEARNINGS.md`
|
|
542
|
-
via the `resources` tool (`action: "read"` then `action: "write"`). Capture:
|
|
543
|
-
|
|
544
|
-
- Confirmed metric definitions
|
|
545
|
-
- Provider gotchas discovered
|
|
546
|
-
- Schema discoveries (table/column names, join patterns that worked)
|
|
547
|
-
- Identity-stitching rules confirmed across sources
|
|
548
|
-
|
|
549
|
-
The `save-memory` tool works for personal-scope learnings; `LEARNINGS.md` is the
|
|
550
|
-
shared team knowledge layer.
|
|
83
|
+
- `navigation` exposes the current dashboard, analysis, source, chart, and
|
|
84
|
+
selection. `navigate` moves the user, including `view="catalog"`,
|
|
85
|
+
`"sessions"`, `"monitoring"`, and `"agents"`. Use `view-screen` when the
|
|
86
|
+
active context is unclear.
|
|
87
|
+
- Clicking a panel stages it as a chat context chip and writes `selected-object`
|
|
88
|
+
with `type="dashboard-panel"`.
|
|
551
89
|
|
|
552
90
|
## Skills
|
|
553
91
|
|
|
554
92
|
Read the relevant skill before deeper work:
|
|
555
93
|
|
|
556
|
-
- `data-querying` for source inspection, SQL
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
- `
|
|
569
|
-
- `
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
dashboard data source: the `emit(rows, schema)` contract, caching/refresh
|
|
573
|
-
model, limits, and the Risk Meeting worked example.
|
|
574
|
-
- `dashboard-management` for dashboard/chart creation and layout.
|
|
575
|
-
- `adhoc-analysis` for one-off analytical answers and batch fan-out pattern.
|
|
576
|
-
- `analysis-workspace` for large-scale multi-source analyses: Resources-backed
|
|
577
|
-
files, `scratch/` temporary staging, chunked batch processing with per-item
|
|
578
|
-
memos, `run-code` aggregation, `saveToFile`/`fetchAllPages` for large API
|
|
579
|
-
pulls, and multi-turn synthesis.
|
|
580
|
-
Read this before any analysis spanning 30+ items or requiring data larger
|
|
581
|
-
than one context window.
|
|
94
|
+
- `data-querying` for source inspection, SQL generation, result handling, and
|
|
95
|
+
`/chart` embeds; `bigquery`, `hubspot`, `gong`, `prometheus` for provider
|
|
96
|
+
specifics.
|
|
97
|
+
- `cross-source-analysis` for questions spanning sources (identity stitching,
|
|
98
|
+
de-duplication).
|
|
99
|
+
- `dashboard-management` for dashboard/panel storage, layout, extensions,
|
|
100
|
+
mutation, sharing, and the template catalog.
|
|
101
|
+
- `adhoc-analysis` and `analysis-workspace` for one-off answers and large
|
|
102
|
+
multi-source work.
|
|
103
|
+
- `provider-api` and `data-programs` for the escape hatch and durable,
|
|
104
|
+
refreshable data sources.
|
|
105
|
+
- `creative-context` for governed contexts and immutable dashboard revisions.
|
|
106
|
+
- `admin-surfaces` (`/agents` fleet flags, usage audit, connected DBs),
|
|
107
|
+
`dashboard-ops`, `monitoring`, and `session-replay` for those surfaces.
|
|
108
|
+
- `agent-native-toolkit` and `customizing-agent-native` before building shared
|
|
109
|
+
workspace UI.
|
|
582
110
|
- `storing-data`, `real-time-sync`, `security`, `actions`, and
|
|
583
111
|
`frontend-design` for framework work.
|