@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
|
@@ -118,10 +118,12 @@ export function agentsBundlePlugin(): Plugin {
|
|
|
118
118
|
const rel = path.relative(projectRoot, file);
|
|
119
119
|
if (!rel.startsWith("..")) {
|
|
120
120
|
if (rel === "AGENTS.md") return true;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
for (const skillsDir of TEMPLATE_SKILLS_DIRS) {
|
|
122
|
+
// Any file under a skills directory can affect the bundle now —
|
|
123
|
+
// `readSkillsDir` reads reference sub-files (not just SKILL.md)
|
|
124
|
+
// into `Skill.files`, so dev HMR must match that or reference
|
|
125
|
+
// edits go stale until a manual restart.
|
|
126
|
+
if (rel.startsWith(skillsDir + path.sep)) return true;
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
// Workspace-core files
|
|
@@ -130,8 +132,7 @@ export function agentsBundlePlugin(): Plugin {
|
|
|
130
132
|
}
|
|
131
133
|
if (
|
|
132
134
|
workspaceSkillsDir &&
|
|
133
|
-
file.startsWith(workspaceSkillsDir + path.sep)
|
|
134
|
-
file.endsWith("SKILL.md")
|
|
135
|
+
file.startsWith(workspaceSkillsDir + path.sep)
|
|
135
136
|
) {
|
|
136
137
|
return true;
|
|
137
138
|
}
|
|
@@ -872,6 +872,7 @@ const CORE_CLIENT_SUBPATHS = [
|
|
|
872
872
|
// entry.client.tsx imports from here so it never pulls the full client barrel
|
|
873
873
|
// (and its transitive ~650-700 KB gzip chat stack) onto the critical path.
|
|
874
874
|
"@agent-native/core/client/api-path",
|
|
875
|
+
"@agent-native/core/client/clipboard",
|
|
875
876
|
"@agent-native/core/blocks",
|
|
876
877
|
"@agent-native/core/blocks/server",
|
|
877
878
|
"@agent-native/core/client/extensions",
|
|
@@ -1265,6 +1266,10 @@ function getCoreSourceAliases(
|
|
|
1265
1266
|
coreSrc,
|
|
1266
1267
|
"client/api-path.ts",
|
|
1267
1268
|
),
|
|
1269
|
+
"@agent-native/core/client/clipboard": path.join(
|
|
1270
|
+
coreSrc,
|
|
1271
|
+
"client/clipboard.ts",
|
|
1272
|
+
),
|
|
1268
1273
|
"@agent-native/core/blocks": path.join(coreSrc, "client/blocks/index.ts"),
|
|
1269
1274
|
"@agent-native/core/blocks/server": path.join(
|
|
1270
1275
|
coreSrc,
|
|
@@ -2409,6 +2414,10 @@ type NitroModuleGraph = {
|
|
|
2409
2414
|
|
|
2410
2415
|
const NITRO_STARTUP_SETTLE_MS = 1_000;
|
|
2411
2416
|
const NITRO_STARTUP_TIMEOUT_MS = 30_000;
|
|
2417
|
+
const NITRO_STARTUP_RETRY_KEY = "__agent_native_nitro_startup_retry";
|
|
2418
|
+
const NITRO_STARTUP_RETRY_MAX = 5;
|
|
2419
|
+
const NITRO_STARTUP_RETRY_DELAY_MS = 1_000;
|
|
2420
|
+
const NITRO_STARTUP_RETRY_RESET_MS = 15_000;
|
|
2412
2421
|
|
|
2413
2422
|
function nitroModuleGraphSignature(environment: unknown): string | null {
|
|
2414
2423
|
const graph = (environment as { moduleGraph?: NitroModuleGraph } | undefined)
|
|
@@ -2451,9 +2460,66 @@ function sendNitroStartingResponse(
|
|
|
2451
2460
|
res.end();
|
|
2452
2461
|
return;
|
|
2453
2462
|
}
|
|
2454
|
-
res.end(
|
|
2455
|
-
|
|
2456
|
-
|
|
2463
|
+
res.end(`<!doctype html>
|
|
2464
|
+
<html>
|
|
2465
|
+
<head>
|
|
2466
|
+
<meta charset="utf-8">
|
|
2467
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
2468
|
+
<title>Dev server restarting…</title>
|
|
2469
|
+
<style>
|
|
2470
|
+
body { margin: 0; min-height: 100vh; display: grid; place-items: center; font: 16px/1.5 system-ui, sans-serif; color: #171717; background: #fafafa; }
|
|
2471
|
+
main { width: min(560px, calc(100vw - 48px)); }
|
|
2472
|
+
h1 { margin: 0 0 8px; font-size: 1.25rem; }
|
|
2473
|
+
p { margin: 0; color: #737373; }
|
|
2474
|
+
</style>
|
|
2475
|
+
</head>
|
|
2476
|
+
<body>
|
|
2477
|
+
<main>
|
|
2478
|
+
<h1>Dev server is restarting…</h1>
|
|
2479
|
+
<p id="agent-native-nitro-retry-status">Checking again shortly.</p>
|
|
2480
|
+
</main>
|
|
2481
|
+
<script>
|
|
2482
|
+
(() => {
|
|
2483
|
+
const key = ${JSON.stringify(NITRO_STARTUP_RETRY_KEY)};
|
|
2484
|
+
const maxRetries = ${NITRO_STARTUP_RETRY_MAX};
|
|
2485
|
+
const resetAfterMs = ${NITRO_STARTUP_RETRY_RESET_MS};
|
|
2486
|
+
const retryDelayMs = ${NITRO_STARTUP_RETRY_DELAY_MS};
|
|
2487
|
+
const status = document.getElementById("agent-native-nitro-retry-status");
|
|
2488
|
+
const now = Date.now();
|
|
2489
|
+
let count = 0;
|
|
2490
|
+
let lastAttemptAt = 0;
|
|
2491
|
+
|
|
2492
|
+
try {
|
|
2493
|
+
const stored = JSON.parse(sessionStorage.getItem(key) || "null");
|
|
2494
|
+
if (stored && typeof stored === "object") {
|
|
2495
|
+
count = Number.isFinite(stored.count) ? stored.count : 0;
|
|
2496
|
+
lastAttemptAt = Number.isFinite(stored.at) ? stored.at : 0;
|
|
2497
|
+
}
|
|
2498
|
+
} catch (error) {
|
|
2499
|
+
// A blocked session store is handled below by showing a manual retry.
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
if (now - lastAttemptAt > resetAfterMs) count = 0;
|
|
2503
|
+
if (count >= maxRetries) {
|
|
2504
|
+
if (status) status.textContent = "The server is still unavailable. Refresh when it is ready.";
|
|
2505
|
+
return;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
const nextState = JSON.stringify({ count: count + 1, at: now });
|
|
2509
|
+
try {
|
|
2510
|
+
sessionStorage.setItem(key, nextState);
|
|
2511
|
+
if (sessionStorage.getItem(key) !== nextState) throw new Error("unavailable");
|
|
2512
|
+
} catch (error) {
|
|
2513
|
+
if (status) status.textContent = "Refresh manually when the server is ready.";
|
|
2514
|
+
return;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
if (status) status.textContent = "Retrying in one second…";
|
|
2518
|
+
setTimeout(() => window.location.reload(), retryDelayMs);
|
|
2519
|
+
})();
|
|
2520
|
+
</script>
|
|
2521
|
+
</body>
|
|
2522
|
+
</html>`);
|
|
2457
2523
|
}
|
|
2458
2524
|
|
|
2459
2525
|
function nitroStartupGate(
|
|
@@ -68,11 +68,10 @@ Use the available actions to pull data. Read the relevant `.agents/skills/<provi
|
|
|
68
68
|
associated companies/contacts/tickets/notes/emails, Gong call detail, compact
|
|
69
69
|
transcript excerpts, coverage counts, and gaps. Use targeted `hubspot-records`
|
|
70
70
|
or `gong-calls` follow-ups only when that bundle leaves a specific gap.
|
|
71
|
-
- Structure named deal/account reports
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
alone.
|
|
71
|
+
- Structure named deal/account reports as: executive summary, company/deal
|
|
72
|
+
overview, key contacts and roles, dated timeline, Gong evidence with call
|
|
73
|
+
dates/titles, current state, risks/blockers, recommended next steps, and
|
|
74
|
+
methodology/gaps. Do not answer from an all-deals dump or Gong metadata alone.
|
|
76
75
|
- Use action filters such as `query`, `properties`, `objectType`, `company`, and
|
|
77
76
|
`limit` to narrow results before cross-referencing
|
|
78
77
|
- For HubSpot deal cohorts, use `hubspot-deals` structured filters (`product`,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: admin-surfaces
|
|
3
|
+
description: >-
|
|
4
|
+
The /agents admin home for Analytics: fleet feature-flag control plane,
|
|
5
|
+
dashboard usage audit, and connected-app database admin. Use when an admin
|
|
6
|
+
asks about feature flags/rollouts, dashboard usage stats, or connecting
|
|
7
|
+
another agent-native app's database.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Admin Surfaces (`/agents`)
|
|
11
|
+
|
|
12
|
+
`/agents` is the Analytics home for admin surfaces. The default Monitoring
|
|
13
|
+
view embeds the shared observability dashboard for traces, conversations,
|
|
14
|
+
evals, agent experiments, and feedback.
|
|
15
|
+
|
|
16
|
+
## Feature Flags (`?view=flags`)
|
|
17
|
+
|
|
18
|
+
`/agents?view=flags` is the sole admin-only fleet feature-flag control plane.
|
|
19
|
+
|
|
20
|
+
- Call `list-workspace-feature-flags` before changing a flag.
|
|
21
|
+
- Preserve each app's explicit state: `unsupported`, `unreachable`,
|
|
22
|
+
`forbidden`, and `unknown-legacy` are unknown states, **never** synonyms for
|
|
23
|
+
off. Do not collapse them to a disabled toggle.
|
|
24
|
+
- Use `set-workspace-feature-flag` for app-qualified changes; target apps
|
|
25
|
+
remain the source of truth and are resolved only through the trusted
|
|
26
|
+
organization directory.
|
|
27
|
+
- Treat only a versioned mutation response whose key, org scope, and
|
|
28
|
+
requested rules match as success. Report a failed target mutation instead
|
|
29
|
+
of claiming the rollout changed.
|
|
30
|
+
- Flags are source-declared booleans; do not create variants, metrics,
|
|
31
|
+
exposure tracking, or per-app management panels.
|
|
32
|
+
|
|
33
|
+
## Dashboard Usage (`?view=dashboards`)
|
|
34
|
+
|
|
35
|
+
`/agents?view=dashboards` shows the admin-only dashboard usage audit. Call
|
|
36
|
+
`list-dashboard-usage-stats` when admins ask about dashboard created/modified
|
|
37
|
+
dates, owners, last tracked modifier, views, edits, engagements, saved views,
|
|
38
|
+
or cleanup candidates. The dashboard overflow menu shows created/updated
|
|
39
|
+
timestamps and their tracked actors for both SQL and Explorer dashboards.
|
|
40
|
+
|
|
41
|
+
## Connected Database Admin (`?view=database`)
|
|
42
|
+
|
|
43
|
+
The Advanced menu opens `/agents?view=database`, where organization
|
|
44
|
+
owners/admins can connect other agent-native app databases and use the
|
|
45
|
+
shared database admin tool for table browsing, row editing, and SQL
|
|
46
|
+
inspection. This surface is for connected target app databases, not broad
|
|
47
|
+
access to all Analytics data.
|
|
48
|
+
|
|
49
|
+
Keep future admin additions inside this route instead of adding many
|
|
50
|
+
top-level sidebar tabs.
|
|
51
|
+
|
|
52
|
+
## Related Skills
|
|
53
|
+
|
|
54
|
+
- Root **feature-flags** (dev-scope) — how to declare and register a flag in
|
|
55
|
+
app code; this skill covers only the Analytics fleet control-plane UI/actions.
|
|
@@ -615,6 +615,16 @@ state or tracker context, but docs traffic is not app usage and should not appea
|
|
|
615
615
|
as an app/template series. Use a minimum cohort-size threshold for retention
|
|
616
616
|
rates so one or two identities cannot create misleading 100% or 0% spikes.
|
|
617
617
|
|
|
618
|
+
## Template Catalog And Demo Dashboards
|
|
619
|
+
|
|
620
|
+
`list-dashboard-templates` / `install-dashboard-template` install shipped
|
|
621
|
+
dashboard templates (Node Exporter, the canonical Agent Native observability
|
|
622
|
+
dashboard, etc.), and `ensure-demo-dashboards` auto-installs a per-user demo
|
|
623
|
+
on first app open. See
|
|
624
|
+
`references/template-catalog-and-demo.md` for the canonical-dashboard panel
|
|
625
|
+
rule, Node Exporter template specifics, and the full demo-dashboard lifecycle
|
|
626
|
+
(source routing, env var overrides, tombstoning, reset).
|
|
627
|
+
|
|
618
628
|
## Building Large First-Party Dashboards (compose-dashboard)
|
|
619
629
|
|
|
620
630
|
For a **first-party analytics** dashboard, prefer `compose-dashboard` over hand-authoring a big `update-dashboard` config. You name the metrics; the SERVER expands each into a full, validated panel (SQL + chart config) from the shipped metric catalog and saves them in ONE atomic call. This avoids the failure mode where the agent must stream a giant multi-panel `update-dashboard` argument inside the ~40s budget — that big tool-call can't be resumed mid-stream and is all-or-nothing on validation, so the agent thrashes (repeated update-dashboard + tool-search, never landing).
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Template Catalog And Demo Dashboards
|
|
2
|
+
|
|
3
|
+
## Listing And Installing Templates
|
|
4
|
+
|
|
5
|
+
- `list-dashboard-templates` lists source-controlled dashboard templates with
|
|
6
|
+
`id`, category, data sources, panel count, and installed dashboard IDs.
|
|
7
|
+
- `install-dashboard-template` installs a catalog template into normal
|
|
8
|
+
SQL-backed dashboards. Required: `templateId`. Optional: `dashboardId`,
|
|
9
|
+
`name`, `overwrite`, `forceNew`, and `mergePanels` (see "Reliable Bulk
|
|
10
|
+
Edits" in the main skill for the `mergePanels` append behavior).
|
|
11
|
+
|
|
12
|
+
## Canonical Agent Native Dashboard
|
|
13
|
+
|
|
14
|
+
Keep the canonical Agent Native dashboard (`agent-native-templates-first-party`)
|
|
15
|
+
focused: it includes one explicit feedback-sentiment-by-model chart and one
|
|
16
|
+
optional inferred-message-sentiment chart, not the broader LLM cost, token,
|
|
17
|
+
latency, or error suite.
|
|
18
|
+
|
|
19
|
+
- Explicit feedback uses content-free `$ai_feedback` events with `sentiment`
|
|
20
|
+
(`positive` or `negative`) and model in `$ai_model` or `model`.
|
|
21
|
+
- Inferred sentiment uses `$ai_sentiment` events with `method = 'llm'` and
|
|
22
|
+
`sentiment` (`positive`, `neutral`, or `negative`).
|
|
23
|
+
|
|
24
|
+
Keep these panels in the canonical dashboard and do not recreate a separately
|
|
25
|
+
installable observability template.
|
|
26
|
+
|
|
27
|
+
## Node Exporter Templates
|
|
28
|
+
|
|
29
|
+
Node Exporter ships as `node-exporter-macos` (Darwin/Homebrew `node_exporter`
|
|
30
|
+
scrapes) and `node-exporter-full` (the Linux-focused Grafana 1860 revision 45
|
|
31
|
+
dashboard converted into native Analytics panels, plus Prometheus
|
|
32
|
+
Observability Demo app metrics — `demo_http_*`, `demo_chaos_mode`, synthetic
|
|
33
|
+
CPU/disk/memory workload metrics). See the `prometheus` skill for the full
|
|
34
|
+
panel/field breakdown and local Homebrew setup.
|
|
35
|
+
|
|
36
|
+
Keep the first-open `App / Overview` tab light: it should show the Request
|
|
37
|
+
Latency highlight plus current app state, while Traffic, Latency, and
|
|
38
|
+
Workload details stay split across their own `App / *` tabs.
|
|
39
|
+
|
|
40
|
+
## Demo Dashboard
|
|
41
|
+
|
|
42
|
+
- `ensure-demo-dashboards` installs one private per-user demo on first app
|
|
43
|
+
open: `demo-node-exporter`. The Analytics root route calls this before
|
|
44
|
+
honoring local last-opened state; when the action creates the demo, the
|
|
45
|
+
user should land directly on the Node Exporter demo's `App / Overview` tab
|
|
46
|
+
without visiting the template catalog or data-source setup.
|
|
47
|
+
- The demo dashboard is generated from the same `node-exporter-full` seed as
|
|
48
|
+
the catalog template. Its Prometheus panels keep the same PromQL
|
|
49
|
+
descriptors and use `source: "demo"` so queries route to the demo
|
|
50
|
+
Prometheus endpoint instead of the user's `PROMETHEUS_*` credential slot.
|
|
51
|
+
- The demo Prometheus endpoint defaults to the public read-only
|
|
52
|
+
`https://prometheus.agent-native.foo`, so cloud and local MPX installs work
|
|
53
|
+
without user setup. Deployments can override it with
|
|
54
|
+
`ANALYTICS_DEMO_PROMETHEUS_URL` and optional
|
|
55
|
+
`ANALYTICS_DEMO_PROMETHEUS_USERNAME`, `ANALYTICS_DEMO_PROMETHEUS_PASSWORD`,
|
|
56
|
+
or `ANALYTICS_DEMO_PROMETHEUS_BEARER_TOKEN`. Do not put credential values
|
|
57
|
+
in source, docs, fixtures, tests, prompts, or dashboard seeds.
|
|
58
|
+
- Demo dashboards are ordinary SQL dashboard rows, so rename, share, archive,
|
|
59
|
+
and delete flows apply. Deleted demo IDs are tombstoned in SQL settings and
|
|
60
|
+
are not recreated unless the user explicitly asks to reset demos.
|
|
61
|
+
- Use `ensure-demo-dashboards --reset=true` only when the user asks to
|
|
62
|
+
restore a deleted or changed demo dashboard.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dashboard-ops
|
|
3
|
+
description: >-
|
|
4
|
+
Deployment and runtime internals for dashboard email reports and analytics
|
|
5
|
+
alert rules: Playwright/Chromium capture, serverless timing budgets, cron
|
|
6
|
+
wiring, and notification delivery env vars. Use when configuring, deploying,
|
|
7
|
+
or debugging report/alert delivery infrastructure — not when just creating a
|
|
8
|
+
report subscription or alert rule via the action surface.
|
|
9
|
+
scope: dev
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Dashboard Reports & Alerts Ops
|
|
13
|
+
|
|
14
|
+
Dashboard email reports (`dashboard-report-subscriptions` actions) and
|
|
15
|
+
analytics alert rules (`analytics-alert-rules` actions) are SQL-backed action
|
|
16
|
+
surfaces. This skill covers the deployment/runtime machinery behind them —
|
|
17
|
+
the agent chatting with an end user does not need this; it only needs the
|
|
18
|
+
action names and the user-facing constraints already in `AGENTS.md`.
|
|
19
|
+
|
|
20
|
+
## Dashboard Email Report Capture
|
|
21
|
+
|
|
22
|
+
- Report PNGs are Playwright captures of the real dashboard route in
|
|
23
|
+
`reportScreenshot=1` mode, authenticated by a short-lived embed-session
|
|
24
|
+
token, and embedded inline in the email as ordered CID images.
|
|
25
|
+
- Complete dashboards are captured sequentially in four-panel windows matching
|
|
26
|
+
the browser's four-query concurrency limit. Every window must match the
|
|
27
|
+
panel ids snapshotted at the start; a failed or mismatched window
|
|
28
|
+
invalidates the entire image set so the scheduler retries instead of
|
|
29
|
+
sending a partial report.
|
|
30
|
+
- Capture is capped at 10 windows and 14 MiB of raw PNG data. Subscriptions
|
|
31
|
+
are capped at five distinct recipients — recommend a mailing-list address
|
|
32
|
+
for larger audiences.
|
|
33
|
+
- The serverless capture deadline reserves 90 seconds of the 300-second
|
|
34
|
+
worker budget for cleanup and delivery.
|
|
35
|
+
- The ten-minute retry delay is an eligibility floor, not a guarantee; the
|
|
36
|
+
`*/15` sweep runs the retry on its first tick after that floor.
|
|
37
|
+
- PNG rendering uses local Chrome in development and `playwright-core` plus
|
|
38
|
+
`@sparticuz/chromium-min` in serverless runtimes. Set
|
|
39
|
+
`DASHBOARD_REPORT_CHROMIUM_PACK_URL` only when overriding the default
|
|
40
|
+
Chromium pack location.
|
|
41
|
+
|
|
42
|
+
## Cron Wiring
|
|
43
|
+
|
|
44
|
+
- Netlify builds emit a scheduled trigger plus a background worker from
|
|
45
|
+
`scripts/emit-netlify-dashboard-report-cron.ts`, using a per-deploy internal
|
|
46
|
+
token and disabling the in-process interval scheduler on Netlify to avoid
|
|
47
|
+
duplicate sends.
|
|
48
|
+
- External cron callers can sweep due reports by POSTing
|
|
49
|
+
`/api/dashboard-reports/run` with
|
|
50
|
+
`Authorization: Bearer $DASHBOARD_REPORTS_CRON_SECRET`.
|
|
51
|
+
- The same `scripts/emit-netlify-dashboard-report-cron.ts` script also emits
|
|
52
|
+
the alert-rule cron trigger plus background worker, running every five
|
|
53
|
+
minutes on Netlify. Long-lived runtimes use the in-process scheduler unless
|
|
54
|
+
`ANALYTICS_ALERT_JOBS=0` is set.
|
|
55
|
+
- External cron callers can run due alerts by POSTing
|
|
56
|
+
`/api/analytics-alerts/run` with
|
|
57
|
+
`Authorization: Bearer $ANALYTICS_ALERTS_CRON_SECRET`.
|
|
58
|
+
|
|
59
|
+
## Alert Notification Delivery
|
|
60
|
+
|
|
61
|
+
Alert notifications use the shared notification channel registry
|
|
62
|
+
(`channels` can include `inbox`, `email`, `slack`, `webhook`, or any custom
|
|
63
|
+
registered channel):
|
|
64
|
+
|
|
65
|
+
- Slack/webhook delivery prefers per-rule `metadata.delivery.slackWebhookUrl`
|
|
66
|
+
/ `metadata.delivery.webhookUrl` (uptime monitors store these on the
|
|
67
|
+
monitor row), then falls back to `NOTIFICATIONS_SLACK_WEBHOOK_URL` /
|
|
68
|
+
`NOTIFICATIONS_WEBHOOK_URL`. Optional `NOTIFICATIONS_SLACK_WEBHOOK_AUTH`
|
|
69
|
+
configures Slack auth.
|
|
70
|
+
- Email delivery needs `RESEND_API_KEY` or `SENDGRID_API_KEY` plus
|
|
71
|
+
`EMAIL_FROM`. Per-rule `emailRecipients` fall back to
|
|
72
|
+
`NOTIFICATIONS_EMAIL_RECIPIENTS`. Saving explicit `emailRecipients` also
|
|
73
|
+
remembers them as the current user's defaults for the next alert rule
|
|
74
|
+
created in Settings.
|
|
75
|
+
|
|
76
|
+
Users can also view and manage report subscriptions and alert rules in
|
|
77
|
+
Settings; that UI uses the same action surface as the agent, so no separate
|
|
78
|
+
implementation is needed there.
|
|
79
|
+
|
|
80
|
+
## Related Skills
|
|
81
|
+
|
|
82
|
+
- **dashboard-management** — the dashboard artifact model these features
|
|
83
|
+
attach to.
|
|
84
|
+
- **integration-webhooks** (root) — the general queue-and-processor pattern
|
|
85
|
+
for outbound webhook delivery.
|
|
@@ -34,12 +34,37 @@ Convert the user's requested local date/timezone to UTC before querying. For
|
|
|
34
34
|
example, May 1, 2026 in America/New_York is `2026-05-01T04:00:00Z`
|
|
35
35
|
through `2026-05-02T04:00:00Z`.
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Inline Charts In Chat
|
|
38
38
|
|
|
39
|
-
For an in-chat answer, **emit a live `/chart` embed** — never `generate-chart`. The embed mounts a live `SqlChart` that re-queries when its source changes, and it doesn't choke on rigid JSON params the way the PNG action does.
|
|
39
|
+
For an in-chat answer, **emit a live `/chart` embed** — never `generate-chart`. The embed mounts a live `SqlChart` that re-queries when its source changes, and it doesn't choke on rigid JSON params the way the PNG action does. Reach for `generate-chart` only when you're building a dashboard artifact that needs a persisted report image.
|
|
40
40
|
|
|
41
41
|
If `generate-chart` returns an error in any chat-answering flow, the recovery is to switch to the live embed, not to retry with reformatted params.
|
|
42
42
|
|
|
43
|
+
**How it renders.** The core chat markdown renderer turns any fenced block tagged `embed` into a sandboxed, same-origin iframe. Emit:
|
|
44
|
+
|
|
45
|
+
````markdown
|
|
46
|
+
```embed
|
|
47
|
+
src: /chart?panel=<base64url-encoded panel JSON>
|
|
48
|
+
title: Daily pageviews
|
|
49
|
+
height: 320
|
|
50
|
+
```
|
|
51
|
+
````
|
|
52
|
+
|
|
53
|
+
Fence keys: `src` (required, same-origin path), `title`, and either `height` (px) or `aspect` (`16/9`, `4/3`, `1/1`, `21/9`, `3/2`, `2/1`; default `16/9`). A cross-origin `src` renders an "Embed blocked" notice instead of a chart.
|
|
54
|
+
|
|
55
|
+
**Panel JSON.** The `/chart` route decodes `panel` into a `SqlPanel` (`app/pages/adhoc/sql-dashboard/types.ts`):
|
|
56
|
+
|
|
57
|
+
- `sql` — required, non-empty.
|
|
58
|
+
- `source` — required, one of `bigquery`, `ga4`, `amplitude`, `first-party`, `demo`, `prometheus`. `program` is deliberately **not** embeddable.
|
|
59
|
+
- `chartType` — required, one of `line`, `area`, `bar`, `metric`, `table`, `pie`. Dashboard-layout types (`section`, `heatmap`, `callout`, `extension`) are rejected.
|
|
60
|
+
- `id` (defaults `"embed"`), `title` (rendered above the chart), `width` (dashboard-only, ignored here), `config` (passed through unvalidated — `xKey`/`yKeys`, `colors`, `yFormatter`, `columns`, `stacked`, `legend`, …).
|
|
61
|
+
|
|
62
|
+
An unknown `source`/`chartType` or blank `sql` renders an error card, not a chart.
|
|
63
|
+
|
|
64
|
+
**Encoding.** JSON-stringify the panel, base64-encode it, then make it URL-safe: `+` → `-`, `/` → `_`, strip `=` padding. No further URL-encoding is needed. Keep the SQL short — it rides in a query string; if it's long, save it as a dashboard panel and link to the dashboard instead.
|
|
65
|
+
|
|
66
|
+
Full details (per-field validation, `config` keys, a verified round-trip example, and how this differs from `generate-chart`) are in `references/inline-chart-embeds.md` — read it with `docs-search --slug "skill-data-querying--references-inline-chart-embeds"`.
|
|
67
|
+
|
|
43
68
|
## Script Patterns
|
|
44
69
|
|
|
45
70
|
### Reusing Existing Actions
|
package/corpus/templates/analytics/.agents/skills/data-querying/references/inline-chart-embeds.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Inline Chart Embeds (the live `/chart` embed)
|
|
2
|
+
|
|
3
|
+
For an in-chat answer, emit a fenced ` ```embed ` block whose `src` points at
|
|
4
|
+
the app's own `/chart` route with a base64url-encoded panel in the `panel`
|
|
5
|
+
query param. The chat renderer mounts that route in a sandboxed same-origin
|
|
6
|
+
iframe, which renders a live `SqlChart` that re-queries when its source
|
|
7
|
+
changes. This is a different mechanism from `generate-chart` (a static
|
|
8
|
+
PNG/SVG render) — see "How This Differs From `generate-chart`" below.
|
|
9
|
+
|
|
10
|
+
## The Two Layers
|
|
11
|
+
|
|
12
|
+
1. **The chat markdown embed fence** — this lives in core, not in the
|
|
13
|
+
template. Analytics chat renders through `AgentChatSurface` →
|
|
14
|
+
`MarkdownText` (`packages/core/src/client/chat/markdown-renderer.tsx`),
|
|
15
|
+
whose `markdownComponents.pre` handler intercepts any code block tagged
|
|
16
|
+
`language-embed` and renders `IframeEmbed`
|
|
17
|
+
(`packages/core/src/client/IframeEmbed.tsx`) instead of a `<pre>`.
|
|
18
|
+
`parseEmbedBody` there reads `key: value` lines:
|
|
19
|
+
- `src` (required) — the iframe URL.
|
|
20
|
+
- `title` (optional) — shown in the embed's "Preview" header bar and used
|
|
21
|
+
as the iframe `title`. Defaults to "Embedded content".
|
|
22
|
+
- `aspect` (optional) — one of `16/9`, `4/3`, `1/1`, `21/9`, `3/2`, `2/1`;
|
|
23
|
+
anything else falls back to `16/9`. Ignored when `height` is set.
|
|
24
|
+
- `height` (optional) — pixels; overrides `aspect`.
|
|
25
|
+
|
|
26
|
+
`isSameOriginSrc` only allows same-origin URLs: a path starting with `/`
|
|
27
|
+
(but not `//`), `./`, or `../`, or an absolute URL whose origin matches the
|
|
28
|
+
app's. Anything cross-origin renders an "Embed blocked" notice instead of
|
|
29
|
+
an iframe. The iframe itself is sandboxed
|
|
30
|
+
(`allow-scripts allow-same-origin allow-forms allow-popups`),
|
|
31
|
+
`referrerPolicy="same-origin"`, and lazy-loaded. An embedded page can call
|
|
32
|
+
`postNavigate()` from `@agent-native/core/client/embed` to pop the user out
|
|
33
|
+
into the parent window at the same path.
|
|
34
|
+
|
|
35
|
+
The template also ships its own `embed`-fence implementation in
|
|
36
|
+
`templates/analytics/app/components/Markdown.tsx`, but that one renders
|
|
37
|
+
**saved analysis bodies** (`app/pages/analyses/AnalysisDetail.tsx`), not
|
|
38
|
+
chat. It is stricter: relative `src` only (no absolute same-origin URL) and
|
|
39
|
+
`height` clamped to 2000. Keep embeds relative and they work in both.
|
|
40
|
+
|
|
41
|
+
2. **The `/chart` route** — `templates/analytics/app/routes/chart.tsx`. It
|
|
42
|
+
reads the `panel` search param and decodes it with `decodePanel`
|
|
43
|
+
(`chart.tsx:31-73`), then renders `<SqlChart panel={result} />`
|
|
44
|
+
(`chart.tsx:115`), the same live chart component dashboards use
|
|
45
|
+
(`templates/analytics/app/components/dashboard/SqlChart.tsx:1111`).
|
|
46
|
+
|
|
47
|
+
So the full pattern the agent must emit is:
|
|
48
|
+
|
|
49
|
+
```embed
|
|
50
|
+
src: /chart?panel=<base64url-encoded-panel-json>
|
|
51
|
+
title: Daily pageviews
|
|
52
|
+
height: 320
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## The Panel JSON Shape (validated by `decodePanel`, `chart.tsx:31-73`)
|
|
56
|
+
|
|
57
|
+
| Field | Required | Type / allowed values | Notes |
|
|
58
|
+
| ----------- | -------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `sql` | yes | non-empty string | The query to run. |
|
|
60
|
+
| `source` | yes | `"bigquery"` \| `"ga4"` \| `"amplitude"` \| `"first-party"` \| `"demo"` \| `"prometheus"` | `chart.tsx:22-29`. This is every `DataSourceType` (`app/pages/adhoc/sql-dashboard/types.ts:1-8`) **except `"program"`** — data-program-backed sources cannot be embedded this way. |
|
|
61
|
+
| `chartType` | yes | `"line"` \| `"area"` \| `"bar"` \| `"metric"` \| `"table"` \| `"pie"` | `chart.tsx:12-19`. This is every `ChartType` (`types.ts:10-20`) **except `"section"`, `"heatmap"`, `"callout"`, `"extension"`** — those are dashboard-layout-only types and are not valid for a standalone embed. |
|
|
62
|
+
| `id` | no | string | Defaults to `"embed"`. |
|
|
63
|
+
| `title` | no | string | Defaults to `""`. Shown above the chart in `ChartRoute` (`chart.tsx:109-113`) — separate from the outer `embed` fence's own `title:` line, which only sets the iframe's `title` attribute. |
|
|
64
|
+
| `width` | no | number ≥ 1, floored | Defaults to `1`. Legacy dashboard row-layout field; has no effect on the standalone `/chart` page. |
|
|
65
|
+
| `config` | no | `SqlPanelConfig` object (`types.ts`) | Passed through as-is — `decodePanel` only checks `typeof === "object"`, it does not validate individual keys. |
|
|
66
|
+
|
|
67
|
+
Any other `source`/`chartType` value, or a missing/blank `sql`, makes
|
|
68
|
+
`decodePanel` return an error and the route renders `ChartError`
|
|
69
|
+
(`chart.tsx:75-92`) instead of a chart.
|
|
70
|
+
|
|
71
|
+
### Useful `config` keys (from `SqlPanelConfig`, `types.ts`)
|
|
72
|
+
|
|
73
|
+
- `xKey`, `yKey` / `yKeys` — column names for the x-axis and series. If
|
|
74
|
+
omitted, `SqlChart`'s `detectKeys` (`SqlChart.tsx:1013-1060`) auto-picks a
|
|
75
|
+
date/string-like column for `xKey` and all remaining numeric columns for
|
|
76
|
+
`yKeys`, so these are usually only needed to override the guess. Prefer
|
|
77
|
+
writing SQL that already returns unambiguous column names over relying on
|
|
78
|
+
auto-detection.
|
|
79
|
+
- `colors` / `color` — series colors.
|
|
80
|
+
- `yFormatter` — `"number"` | `"currency"` | `"percent"`.
|
|
81
|
+
- `columns` — `table` chartType only: `{ key, label?, format?, linkKey?, hidden? }[]`.
|
|
82
|
+
- `stacked`, `legend`, `pivot`, `limit`, `valueLabels`, `description` — see
|
|
83
|
+
`SqlPanelConfig` in `types.ts` for the full list.
|
|
84
|
+
|
|
85
|
+
## Encoding The `panel` Param
|
|
86
|
+
|
|
87
|
+
`decodePanel` un-does a URL-safe, unpadded base64 encoding
|
|
88
|
+
(`chart.tsx:33-35`): it replaces `-` back to `+` and `_` back to `/`, then
|
|
89
|
+
pads with `=` before `atob`-decoding and `JSON.parse`-ing. To encode, do the
|
|
90
|
+
reverse — base64-encode the JSON, then replace `+` with `-`, `/` with `_`,
|
|
91
|
+
and strip any trailing `=` padding.
|
|
92
|
+
|
|
93
|
+
Worked example (verified round-trip):
|
|
94
|
+
|
|
95
|
+
Panel JSON:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"title": "Daily pageviews",
|
|
100
|
+
"sql": "SELECT date_trunc('day', timestamp) AS day, COUNT(*) AS pageviews FROM analytics_events WHERE event_name = 'pageview' GROUP BY 1 ORDER BY 1",
|
|
101
|
+
"source": "first-party",
|
|
102
|
+
"chartType": "line"
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Resulting embed:
|
|
107
|
+
|
|
108
|
+
```embed
|
|
109
|
+
src: /chart?panel=eyJ0aXRsZSI6IkRhaWx5IHBhZ2V2aWV3cyIsInNxbCI6IlNFTEVDVCBkYXRlX3RydW5jKCdkYXknLCB0aW1lc3RhbXApIEFTIGRheSwgQ09VTlQoKikgQVMgcGFnZXZpZXdzIEZST00gYW5hbHl0aWNzX2V2ZW50cyBXSEVSRSBldmVudF9uYW1lID0gJ3BhZ2V2aWV3JyBHUk9VUCBCWSAxIE9SREVSIEJZIDEiLCJzb3VyY2UiOiJmaXJzdC1wYXJ0eSIsImNoYXJ0VHlwZSI6ImxpbmUifQ
|
|
110
|
+
title: Daily pageviews
|
|
111
|
+
height: 320
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Since it's a plain query-string param, keep the SQL reasonably short — it
|
|
115
|
+
rides in a URL that also has to survive markdown fencing and the iframe's
|
|
116
|
+
`src` attribute. It does not need extra URL-encoding beyond the base64url
|
|
117
|
+
step above (base64url output contains only `A-Za-z0-9-_`, which is
|
|
118
|
+
URL-safe).
|
|
119
|
+
|
|
120
|
+
## How This Differs From `generate-chart`
|
|
121
|
+
|
|
122
|
+
`generate-chart` (`templates/analytics/actions/generate-chart.ts`) renders a
|
|
123
|
+
**static** PNG (or SVG fallback) file to the media directory:
|
|
124
|
+
|
|
125
|
+
- Params are separate top-level fields (`title`, `labels`, `data`, `type`,
|
|
126
|
+
`subtitle`, `width`, `height`, `theme`, `color`), where `labels` and `data`
|
|
127
|
+
are **pre-stringified JSON arrays** the caller must have already computed —
|
|
128
|
+
there is no `sql`/`source` and no live query.
|
|
129
|
+
- Only three chart types: `bar`, `line`, `area` (no `pie`, `metric`, `table`).
|
|
130
|
+
- The output is a saved image file, not a live component — it never
|
|
131
|
+
re-queries if the underlying data changes.
|
|
132
|
+
- It exists for `save-analysis` artifacts and other places that need a
|
|
133
|
+
persisted image (exports, archived reports), not for in-chat answers.
|
|
134
|
+
|
|
135
|
+
The `/chart` embed instead re-runs `sql` against `source` live through
|
|
136
|
+
`SqlChart`/`useSqlQuery`, so it always reflects current data and supports the
|
|
137
|
+
full `pie`/`metric`/`table` chart types dashboards use. Prefer it for every
|
|
138
|
+
in-chat data answer; reach for `generate-chart` only when building a
|
|
139
|
+
save-analysis artifact that needs a static image.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: monitoring
|
|
3
|
+
description: >-
|
|
4
|
+
Implementation map for the Monitoring tab (uptime checks, public status
|
|
5
|
+
pages, error triage): component/server file locations, schema, jobs, and
|
|
6
|
+
scheduler wiring. Use when building or debugging Monitoring UI, uptime
|
|
7
|
+
checks, status pages, or error capture/grouping — not when just calling the
|
|
8
|
+
monitoring actions from chat.
|
|
9
|
+
scope: dev
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Monitoring Implementation Map
|
|
13
|
+
|
|
14
|
+
`/monitoring` is a thin shell (`app/routes/monitoring._index.tsx` →
|
|
15
|
+
`app/pages/monitoring/MonitoringPage.tsx`) hosting two independently-owned
|
|
16
|
+
panels selected by `?view=uptime|errors` (defaults to uptime). `navigation`
|
|
17
|
+
mirrors it as `view="monitoring"` with `monitoringView` (plus
|
|
18
|
+
`monitorId`/`errorIssueId` when a row is open); each panel also writes richer
|
|
19
|
+
selection to the `monitoring` application-state key.
|
|
20
|
+
|
|
21
|
+
## Uptime
|
|
22
|
+
|
|
23
|
+
- UI: `app/pages/monitoring/UptimePanel.tsx`, `app/pages/monitoring/uptime/**`.
|
|
24
|
+
- Server: `server/lib/uptime-monitors.ts` (checks/alerting), sweep job
|
|
25
|
+
`server/jobs/uptime-monitors.ts`, scheduler
|
|
26
|
+
`server/plugins/uptime-monitor-jobs.ts`, schema
|
|
27
|
+
`server/db/schema-monitoring.ts`.
|
|
28
|
+
- Actions: `list-monitors`, `get-monitor`, `save-monitor`, `run-monitor-check`,
|
|
29
|
+
`delete-monitor`.
|
|
30
|
+
- Production serverless/Netlify-style runtimes skip the in-process interval
|
|
31
|
+
scheduler and rely on the generated scheduled/background worker or external
|
|
32
|
+
cron instead.
|
|
33
|
+
- Deep links: list `?view=uptime`, detail `?view=uptime&monitor=<id>`, create
|
|
34
|
+
`?view=uptime&monitor=new`, edit `?view=uptime&monitor=<id>&edit=1`.
|
|
35
|
+
- See `docs/uptime-monitoring.md`.
|
|
36
|
+
|
|
37
|
+
## Status Pages
|
|
38
|
+
|
|
39
|
+
- UI: `app/pages/monitoring/uptime/status-pages/**`, a config sub-view under
|
|
40
|
+
Uptime that bundles chosen monitors under a public `/status/<slug>` page.
|
|
41
|
+
- Server: owner-scoped CRUD and the sanitized public projection live in
|
|
42
|
+
`server/lib/status-pages.ts` over `server/db/schema-monitoring.ts`.
|
|
43
|
+
- Actions: `list-status-pages`, `get-status-page`, `save-status-page`,
|
|
44
|
+
`delete-status-page`, `add-status-page-monitor`,
|
|
45
|
+
`remove-status-page-monitor`, `reorder-status-page-monitors`, plus the
|
|
46
|
+
unauthenticated `get-public-status-page`.
|
|
47
|
+
- Deep links: index `?view=uptime&statuspage=list`, create
|
|
48
|
+
`?view=uptime&statuspage=new`, edit `?view=uptime&statuspage=<id>`.
|
|
49
|
+
|
|
50
|
+
## Errors
|
|
51
|
+
|
|
52
|
+
- UI: `app/pages/monitoring/ErrorsPanel.tsx`, `app/pages/monitoring/errors/**`
|
|
53
|
+
— Sentry-style exception triage grouped into issues by fingerprint.
|
|
54
|
+
- Server: ingest/grouping in `server/lib/error-capture.ts` over
|
|
55
|
+
`server/db/schema-errors.ts`.
|
|
56
|
+
- Actions: `list-error-issues`, `get-error-issue`, `resolve-error-issue`,
|
|
57
|
+
`capture-test-error`, `match-error-issues`.
|
|
58
|
+
- Browser capture uses the SDK from `@agent-native/core/client`
|
|
59
|
+
(`captureException` / `captureMessage` / `addErrorBreadcrumb`),
|
|
60
|
+
auto-enabled by `configureTracking` and transported through the first-party
|
|
61
|
+
analytics ingest as a `$exception` event.
|
|
62
|
+
- Deep link: `?view=errors&issue=<id>`. Issue detail includes recent
|
|
63
|
+
frequency, parsed/raw stack traces, source code snippets when available,
|
|
64
|
+
breadcrumbs, tags, occurrence history, and session replay links.
|
|
65
|
+
- See `docs/error-capture.md`.
|
|
66
|
+
|
|
67
|
+
## Session Replay ↔ Errors
|
|
68
|
+
|
|
69
|
+
A recording's devtools Console error lines link to the grouped issue at
|
|
70
|
+
`/monitoring?view=errors&issue=<id>`, resolved by `match-error-issues` (exact
|
|
71
|
+
fingerprint match, no heuristics); issues link back to the originating
|
|
72
|
+
recording at `/sessions/<recordingId>`.
|
|
73
|
+
|
|
74
|
+
## Related Skills
|
|
75
|
+
|
|
76
|
+
- **session-replay** — replay storage, capture, and the Dev Tools panel this
|
|
77
|
+
feature links to.
|