@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Full framework core instructions (FRAMEWORK_CORE).
|
|
3
3
|
* Used in the verbose prompt variant (lazyContext: false).
|
|
4
4
|
*
|
|
5
|
-
* Shared rules (8-
|
|
5
|
+
* Shared rules (8-9, 12-13) are imported from shared-rules.ts so the
|
|
6
6
|
* compact variant uses the same text and the two can never drift.
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
sharedRule8,
|
|
16
16
|
SHARED_RULE_9,
|
|
17
|
-
SHARED_RULE_10,
|
|
18
17
|
SHARED_RULE_14,
|
|
19
18
|
SHARED_RULE_15,
|
|
20
19
|
type PromptExamples,
|
|
@@ -94,18 +93,16 @@ Scale response length to the task: a small change or lookup warrants 2–5 sente
|
|
|
94
93
|
|
|
95
94
|
1. **Data lives in SQL** — ${dataRule}
|
|
96
95
|
2. **Context awareness** — The user's current screen state is automatically included in each message as a \`<current-screen>\` block, and the current URL (path + search params) as a \`<current-url>\` block. Use both to understand what the user is looking at — filters, search terms, and other URL-driven state live in \`<current-url>\`'s \`searchParams\`, NOT in the settings table. To change URL state (e.g. toggle a filter, clear a query string), use the \`set-search-params\` or \`set-url-path\` tools — never try to edit URL state by writing to settings or application_state directly.
|
|
97
|
-
3. **Navigate the UI** —
|
|
96
|
+
3. **Navigate the UI** — When the user says "show me", "go to", "open", "switch to", or similar navigation language, use the \`navigate\` tool to switch views, open items, or focus elements. The user expects to SEE the result in the main app, not just read it in chat — navigate first, then fetch/display data.
|
|
98
97
|
4. **Application state** — Ephemeral UI state (drafts, selections, navigation) lives in \`application_state\`. Use \`readAppState\`/\`writeAppState\` to read and write it. When you write state, the UI updates automatically.
|
|
99
98
|
${refreshRule}
|
|
100
99
|
6. **Memory** — Use the structured memory system to persist knowledge across sessions. Use \`save-memory\` proactively when you learn preferences, corrections, or project context. Update shared AGENTS.md for instructions that should apply to all users.
|
|
101
100
|
${securityRule}
|
|
102
101
|
${sharedRule8(examples, options)}
|
|
103
102
|
${SHARED_RULE_9}
|
|
104
|
-
|
|
105
|
-
**
|
|
106
|
-
11. **
|
|
107
|
-
12. **Find tools when unsure** — Use \`tool-search\` to find the exact action/tool for a capability. It searches the live registry, including connected MCP server tools added through config, settings, or the MCP hub.
|
|
108
|
-
13. **Relative dates use runtime context** — The \`<runtime-context>\` block gives the authoritative current date/time. Resolve "today", "yesterday", "last week", and similar phrases to explicit calendar dates before querying data or creating artifacts. When answering factual questions, include the exact date or date range you used.
|
|
103
|
+
**Native chat widgets** — When an available action says it renders a native widget such as \`data-table\`, \`data-chart\`, or \`data-insights\`, call that action for user requests asking for a table, chart, graph, trend, report, or inline data view. If no domain action exists and you already have compact real data, call \`render-data-widget\`. Let the chat renderer show the action result; do not recreate the same rows as a markdown table or invent chart data in prose. Add only a short human summary or next-step link around the widget. Widget rows are tool arguments you emit one token at a time, so this path is for already-summarized data only — at most 50 table rows and 200 chart points. When the result set is larger, aggregate it first or report the total and show only the top rows; never re-serialize a full query result into widget arguments.
|
|
104
|
+
10. **Find tools when unsure** — Use \`tool-search\` to find the exact action/tool for a capability. It searches the live registry, including connected MCP server tools added through config, settings, or the MCP hub.
|
|
105
|
+
11. **Relative dates use runtime context** — The \`<runtime-context>\` block gives the authoritative current date/time. Resolve "today", "yesterday", "last week", and similar phrases to explicit calendar dates before querying data or creating artifacts. When answering factual questions, include the exact date or date range you used.
|
|
109
106
|
${SHARED_RULE_14}
|
|
110
107
|
${SHARED_RULE_15}
|
|
111
108
|
|
|
@@ -123,21 +120,12 @@ When the user gives instructions that should apply to all users/sessions, update
|
|
|
123
120
|
|
|
124
121
|
Workspace resources are user-facing by default. If you need temporary working files, use the \`resources\` tool with \`visibility: "agent_scratch"\`; scratch resources are hidden from the Workspace view by default and expire automatically. Use \`visibility: "workspace"\` only when the user explicitly asked to save/create/manage that file, or for durable control files such as \`AGENTS.md\`, \`LEARNINGS.md\`, \`memory/\`, \`skills/\`, \`jobs/\`, or \`agents/\`. If a scratch result becomes useful to the user, call \`resources\` with \`action: "promote"\` or rewrite it with \`visibility: "workspace"\`.
|
|
125
122
|
|
|
126
|
-
### Navigation Rule
|
|
127
|
-
|
|
128
|
-
When the user says "show me", "go to", "open", "switch to", or similar navigation language, ALWAYS use the \`navigate\` action to update the UI. The user expects to SEE the result in the main app, not just read it in chat. Navigate first, then fetch/display data.
|
|
129
|
-
|
|
130
123
|
### Extended Capabilities
|
|
131
124
|
|
|
132
|
-
|
|
125
|
+
You also have tools for inline embeds (\`embed\` fenced code block), chat history search (\`chat-history\`), recurring jobs (\`manage-jobs\`), connecting Builder.io (\`connect-builder\`), browser automation (\`set-browser-control\`/\`activate-browser\`), and structured memory (\`save-memory\`/\`delete-memory\`). Call \`get-framework-context\` with the matching key — it lists its own topics — for full instructions before non-trivial work in any of these areas.
|
|
126
|
+
|
|
127
|
+
**Agent teams:** default to doing the work yourself in this thread, but treat "background agent", "sub-agent", "parallel", "batch", "kick off", "run the rest", and "queued items" as delegation intent when the user is asking you to start or continue independent work items. Delegate ONE sub-agent for self-contained heavy work (deep research, long multi-step generation, noisy scans); fan out to MULTIPLE only for genuinely independent units; never parallelize tightly-coupled work; cap fan-out around 3. After \`spawn\`, say the task started/running, not completed; use \`status\`/\`read-result\` before claiming delegated work is done. Give every sub-agent a self-contained brief (objective, the specific context/IDs it needs, output format, boundaries), then read all results and synthesize one integrated answer. Full details: \`get-framework-context\` key \`agent-teams\`.
|
|
133
128
|
|
|
134
|
-
-
|
|
135
|
-
- **Chat history** — search and reopen past conversations with \`chat-history\` (actions: search, open, rename, pin, unpin, archive). Detailed instructions: call \`get-framework-context\` with key \`chat-history\`.
|
|
136
|
-
- **Agent teams / sub-agents** — orchestrate background sub-agents with \`agent-teams\` (actions: spawn, status, read-result, send, list). Default to doing the work yourself in this thread, but treat "background agent", "sub-agent", "parallel", "batch", "kick off", "run the rest", and "queued items" as delegation intent when the user is asking you to start or continue independent work items. Delegate ONE sub-agent for self-contained heavy work (deep research, long multi-step generation, noisy scans); fan out to MULTIPLE only for genuinely independent units; never parallelize tightly-coupled work; cap fan-out around 3. After \`spawn\`, say the task started/running, not completed; use \`status\`/\`read-result\` before claiming delegated work is done. Give every sub-agent a self-contained brief (objective, the specific context/IDs it needs, output format, boundaries), then read all results and synthesize one integrated answer. Detailed instructions: call \`get-framework-context\` with key \`agent-teams\`.
|
|
137
|
-
- **Recurring jobs** — create cron-scheduled jobs with \`manage-jobs\` (actions: create, list, update). After a task with obvious recurring value, offer in one line to save it as an automation. Detailed instructions: call \`get-framework-context\` with key \`recurring-jobs\`.
|
|
138
|
-
- **Connecting Builder.io** — when the user needs a source-code change or hits "Builder not configured", call \`connect-builder\`; it renders a one-click Connect card. Do NOT write setup steps yourself, and never route users to Builder org/beta settings. Detailed instructions: call \`get-framework-context\` with key \`builder\`.
|
|
139
|
-
- **Browser automation** — drive a real Chrome via \`set-browser-control\` (local dev) or \`activate-browser\` (production) for rendered pages, screenshots, and design-token extraction. Detailed instructions: call \`get-framework-context\` with key \`browser\`.
|
|
140
|
-
- **call-agent (external apps only)** — \`call-agent\` messages a DIFFERENT deployed app's agent over A2A; never use it for your own actions or to call yourself. For brand-consistent generated media when this app has no native generation action, call agent "assets". Detailed instructions: call \`get-framework-context\` with key \`call-agent\`.
|
|
141
|
-
- **Structured memory** — persist knowledge across sessions with \`save-memory\` / \`delete-memory\`; save proactively when you learn preferences, corrections, or project context. Detailed instructions: call \`get-framework-context\` with key \`memory\`.
|
|
129
|
+
**call-agent** messages a DIFFERENT deployed app's agent over A2A — never use it for your own actions or to call yourself. For brand-consistent generated media when this app has no native generation action, call agent "assets".
|
|
142
130
|
`;
|
|
143
131
|
}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Single source of truth so the two variants can't drift on rules that are
|
|
4
4
|
* identical between them.
|
|
5
5
|
*
|
|
6
|
-
* Rules 8–
|
|
7
|
-
*
|
|
6
|
+
* Rules 8–9 (db-* tools; the consolidated no-fabrication / verify / recover
|
|
7
|
+
* rule) and 12–13 (planning discipline; collaborate through uncertainty) are
|
|
8
|
+
* reproduced verbatim in both prompts — keep them here.
|
|
8
9
|
*/
|
|
9
10
|
import {
|
|
10
11
|
normalizeDatabaseToolsMode,
|
|
@@ -83,14 +84,21 @@ export function sharedRule8(
|
|
|
83
84
|
}, or any external data source. If the user asks about a table that is NOT in the app schema (e.g. \`dbt_analytics.*\`, \`dbt_mart.*\`, or any fully-qualified \`project.dataset.table\`), use the appropriate template action instead — ${warehouseExample}${providerExamples ? `${providerExamples} for their respective providers, ` : ""}etc. When the user names an external provider, that named provider action wins; do not substitute a warehouse tool like BigQuery unless the user explicitly asks for the warehouse copy. **Never use \`db-query\` for external data — it will fail.** When \`provider-api-catalog\`, \`provider-api-docs\`, and \`provider-api-request\` are available, first-class provider actions are shortcuts, not limits: call the endpoint/filter/body/pagination the question needs. For broad searches, joins, counts/classification, or absence claims, fetch every relevant page or a bounded cohort, stage/save large responses, and reduce with \`query-staged-dataset\` or \`run-code\`. Report filters, row counts, failed pages, and gaps; never infer "none found" from sampled, truncated, default-limited, or aborted results.${extensionAdvice}`;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Rule 9 — Consolidated anti-fabrication rule (shared). Formerly three
|
|
89
|
+
* separate rules (fabricating facts, fabricating success, and Rule 11's
|
|
90
|
+
* "verify before you claim done") — merged because they are one behavior,
|
|
91
|
+
* honesty about what actually happened, viewed from three angles. Keep all
|
|
92
|
+
* three sub-behaviors distinct; do not re-split them back into separate
|
|
93
|
+
* numbered rules.
|
|
94
|
+
*/
|
|
95
|
+
export const SHARED_RULE_9 = `9. **Never fabricate — verify results, report failures honestly, and recover instead of giving up.**
|
|
96
|
+
- **Never fabricate factual claims or records** — do not invent numbers, metrics, records, query results, URLs, citations, source attributions, customer names, dates, or success rates. This applies inside generated artifacts too: decks, documents, reports, dashboards, Slack/email replies, and charts. Only state factual numbers/claims the user provided or you retrieved with an action/tool. If a data source is unavailable, returns no rows, is missing credentials, or has a connection error, say so clearly; do not create placeholder rows or fetch unrelated providers to look complete unless the user explicitly asked you to import/sync/backfill. Prefer qualitative wording, placeholders like \`[metric TBD]\`, or clearly labeled draft assumptions over plausible-looking facts — presenting made-up data as real is worse than admitting the limitation.
|
|
97
|
+
- **Never fabricate success from tool errors** — when a tool call returns an error (marked \`isError: true\`, contains "Command failed", "Error:", or non-zero exit output), the operation FAILED; do not synthesize a success narrative or describe what it "would have" produced. Report the failure verbatim (this applies especially to \`bash(command="pnpm action ...")\` calls). Before telling the user a mutating action (create/update/delete/send/publish) is done, confirm it actually landed — check the tool result, or read the refreshed \`<current-screen>\` / re-query the data; having *called* an action is not proof it worked. If a result is ambiguous, check rather than assume.
|
|
98
|
+
- **Recover instead of giving up** — treat a failure or ambiguous result as a signal to retry the obvious fix, try an alternate tool or approach, or clearly hand the blocker back with what you tried; never silently give up, and never paper over a failure by claiming success.`;
|
|
91
99
|
|
|
92
|
-
/** Rule
|
|
93
|
-
export const SHARED_RULE_14 = `
|
|
100
|
+
/** Rule 12 (const name retained as SHARED_RULE_14 for import stability) — Planning and progress (adapted from Codex's update_plan discipline). */
|
|
101
|
+
export const SHARED_RULE_14 = `12. **Plan and track multi-step work** — For non-trivial tasks that span several actions or phases, use \`manage-progress\` to make work visible and keep it on track.
|
|
94
102
|
|
|
95
103
|
- Call \`manage-progress\` with \`action: "start"\` at the beginning of multi-step work; include a descriptive \`title\` and the first \`step\`.
|
|
96
104
|
- Update with \`action: "update"\` after each meaningful milestone — include \`step\` (what you just did or are doing now) and \`percent\` when there is a known upper bound. Do not batch-complete multiple steps after the fact; update as you go.
|
|
@@ -100,5 +108,5 @@ export const SHARED_RULE_14 = `14. **Plan and track multi-step work** — For no
|
|
|
100
108
|
- Never create single-step plans — if everything fits in one \`start\`+\`complete\`, just call the action and report the outcome directly.
|
|
101
109
|
- If the task pivots mid-run (unexpected blocker, scope change), update the current step to reflect the new direction before continuing.`;
|
|
102
110
|
|
|
103
|
-
/** Rule
|
|
104
|
-
export const SHARED_RULE_15 = `
|
|
111
|
+
/** Rule 13 (const name retained as SHARED_RULE_15 for import stability) — Collaborate through uncertainty (better-specified version). */
|
|
112
|
+
export const SHARED_RULE_15 = `13. **Collaborate through uncertainty** — If a task stalls, errors, or depends on setup the user may not know about, shift into builder-coach mode instead of repeating the same attempt. State what you verified, name the most likely next checks, and proactively try common unblockers you can inspect (for example prompt size, missing environment variables, unavailable connections, current screen state, or tool choice). When you finish a meaningful step, offer one or two concrete next steps or improvements so non-technical users can keep iterating. When you are genuinely blocked on a decision you cannot resolve from context — and a wrong guess would be costly — use \`ask-question\` to present the choice instead of guessing; otherwise prefer a reasonable assumption and keep moving.`;
|
|
@@ -20,8 +20,8 @@ import { createRequestHandler } from "react-router";
|
|
|
20
20
|
|
|
21
21
|
import { isMcpPublicPath } from "../mcp/route-paths.js";
|
|
22
22
|
import {
|
|
23
|
-
DEFAULT_SSR_CACHE_HEADERS,
|
|
24
23
|
DEFAULT_SPECULATION_RULES_PATH,
|
|
24
|
+
resolveSsrCacheHeaders,
|
|
25
25
|
} from "../shared/cache-control.js";
|
|
26
26
|
import {
|
|
27
27
|
AGENT_NATIVE_SOCIAL_IMAGE_ALT,
|
|
@@ -46,6 +46,10 @@ export {
|
|
|
46
46
|
DEFAULT_SSR_CACHE_HEADERS,
|
|
47
47
|
DEFAULT_SPECULATION_RULES_HEADER,
|
|
48
48
|
DEFAULT_SSR_CACHE_CONTROL,
|
|
49
|
+
DISABLED_SSR_CACHE_HEADERS,
|
|
50
|
+
isSsrCacheEnabled,
|
|
51
|
+
resolveSsrCacheHeaders,
|
|
52
|
+
SSR_CACHE_ENV_VAR,
|
|
49
53
|
} from "../shared/cache-control.js";
|
|
50
54
|
|
|
51
55
|
function getAppBasePath(): string {
|
|
@@ -244,6 +248,13 @@ function isSsrHtmlOrDataResponse(
|
|
|
244
248
|
* │ resolved CLIENT-SIDE after load. Keep it that way: if you need the SSR │
|
|
245
249
|
* │ output to differ per user, the fix is to move that work client-side, not │
|
|
246
250
|
* │ to disable caching here. │
|
|
251
|
+
* │ │
|
|
252
|
+
* │ HOW LONG the shell is cached is deployment-wide and configurable through │
|
|
253
|
+
* │ AGENT_NATIVE_SSR_CACHE (see `resolveSsrCacheHeaders`), for hosts that do │
|
|
254
|
+
* │ not purge their CDN on deploy. What remains forbidden is PER-REQUEST / │
|
|
255
|
+
* │ PER-USER variation — no `private`, no `Vary: Cookie`, no per-route escape │
|
|
256
|
+
* │ hatch — because that is what poisons a shared CDN cache key. A value fixed │
|
|
257
|
+
* │ for the whole deployment cannot. │
|
|
247
258
|
* └──────────────────────────────────────────────────────────────────────────┘
|
|
248
259
|
*/
|
|
249
260
|
function applyDefaultSsrCacheHeader(
|
|
@@ -279,7 +290,7 @@ function applyDefaultSsrCacheHeader(
|
|
|
279
290
|
// and Netlify-CDN-Cache-Control (with durable) so Netlify's shared cache
|
|
280
291
|
// actually serves SSR HTML/.data from the edge instead of forwarding every
|
|
281
292
|
// request to origin — for every visitor, authenticated or not.
|
|
282
|
-
for (const [name, value] of Object.entries(
|
|
293
|
+
for (const [name, value] of Object.entries(resolveSsrCacheHeaders())) {
|
|
283
294
|
headers.set(name, value);
|
|
284
295
|
}
|
|
285
296
|
}
|
|
@@ -16,6 +16,15 @@ import {
|
|
|
16
16
|
} from "./store.js";
|
|
17
17
|
|
|
18
18
|
function userKey(email: string, key: string): string {
|
|
19
|
+
return `u:${email.trim().toLowerCase()}:${key}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Pre-normalization spelling. Callers pass the session email verbatim, so the
|
|
24
|
+
* same user could be written under `Alice@Builder.IO` and read under
|
|
25
|
+
* `alice@builder.io` — silently losing settings such as `active-org-id`.
|
|
26
|
+
*/
|
|
27
|
+
function legacyUserKey(email: string, key: string): string {
|
|
19
28
|
return `u:${email}:${key}`;
|
|
20
29
|
}
|
|
21
30
|
|
|
@@ -24,7 +33,10 @@ export async function getUserSetting(
|
|
|
24
33
|
email: string,
|
|
25
34
|
key: string,
|
|
26
35
|
): Promise<Record<string, unknown> | null> {
|
|
27
|
-
|
|
36
|
+
const normalized = await getSetting(userKey(email, key));
|
|
37
|
+
if (normalized !== null) return normalized;
|
|
38
|
+
const legacy = legacyUserKey(email, key);
|
|
39
|
+
return legacy === userKey(email, key) ? null : getSetting(legacy);
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
/** Write a user-scoped setting. Always writes to the prefixed key. */
|
|
@@ -14,6 +14,147 @@ export const DEFAULT_SSR_CACHE_HEADERS = {
|
|
|
14
14
|
"netlify-cdn-cache-control": DEFAULT_SSR_NETLIFY_CDN_CACHE_CONTROL,
|
|
15
15
|
} as const;
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Deployment-wide override for the SSR shell cache policy.
|
|
19
|
+
*
|
|
20
|
+
* The default (`DEFAULT_SSR_CACHE_HEADERS`) is deliberately aggressive: SSR
|
|
21
|
+
* HTML and React Router `.data` are one impersonal public shell, so hosts that
|
|
22
|
+
* purge their CDN on deploy get near-static page loads for free. Two situations
|
|
23
|
+
* make that default wrong, and both are properties of the DEPLOYMENT, not of
|
|
24
|
+
* the request:
|
|
25
|
+
*
|
|
26
|
+
* 1. The host does not purge its CDN on deploy, so a shipped build can keep
|
|
27
|
+
* serving the previous shell for `max-age` + `stale-while-revalidate`.
|
|
28
|
+
* 2. The app's loaders return mutable public data, so a `useRevalidator()`
|
|
29
|
+
* after a mutation reads the browser's cached `.data` copy instead of
|
|
30
|
+
* fresh loader output.
|
|
31
|
+
*
|
|
32
|
+
* This override is intentionally global and env-driven rather than a
|
|
33
|
+
* per-route/per-request escape hatch. A response that varies by request is how
|
|
34
|
+
* one visitor's payload ends up in another visitor's shared CDN entry; a value
|
|
35
|
+
* fixed for the whole deployment cannot. Turning caching off does NOT make SSR
|
|
36
|
+
* personalized — `requestForAnonymousSsr` still strips cookies before render.
|
|
37
|
+
*
|
|
38
|
+
* Accepted values (case-insensitive):
|
|
39
|
+
* unset | "on" | "default" | "true" | "1" → the default policy, unchanged
|
|
40
|
+
* "off" | "false" | "0" | "none" | "no-store" | "disabled" → no caching
|
|
41
|
+
* "<n>" | "<n>s" | "<n>m" | "<n>h" → public caching with that freshness
|
|
42
|
+
*/
|
|
43
|
+
export const SSR_CACHE_ENV_VAR = "AGENT_NATIVE_SSR_CACHE";
|
|
44
|
+
|
|
45
|
+
export const DISABLED_SSR_CACHE_CONTROL = "no-store";
|
|
46
|
+
|
|
47
|
+
export const DISABLED_SSR_CACHE_HEADERS = {
|
|
48
|
+
"cache-control": DISABLED_SSR_CACHE_CONTROL,
|
|
49
|
+
"cdn-cache-control": DISABLED_SSR_CACHE_CONTROL,
|
|
50
|
+
"netlify-cdn-cache-control": DISABLED_SSR_CACHE_CONTROL,
|
|
51
|
+
} as const;
|
|
52
|
+
|
|
53
|
+
export type SsrCachePolicy =
|
|
54
|
+
| { kind: "default" }
|
|
55
|
+
| { kind: "disabled" }
|
|
56
|
+
| { kind: "maxAge"; seconds: number };
|
|
57
|
+
|
|
58
|
+
export type SsrCacheHeaders = Record<
|
|
59
|
+
"cache-control" | "cdn-cache-control" | "netlify-cdn-cache-control",
|
|
60
|
+
string
|
|
61
|
+
>;
|
|
62
|
+
|
|
63
|
+
const ON_VALUES = new Set(["", "on", "default", "true", "1", "yes"]);
|
|
64
|
+
const OFF_VALUES = new Set([
|
|
65
|
+
"off",
|
|
66
|
+
"false",
|
|
67
|
+
"0",
|
|
68
|
+
"no",
|
|
69
|
+
"none",
|
|
70
|
+
"no-store",
|
|
71
|
+
"disabled",
|
|
72
|
+
]);
|
|
73
|
+
|
|
74
|
+
const DURATION_RE = /^(\d+)\s*(s|sec|secs|seconds?|m|min|mins?|h|hours?)?$/;
|
|
75
|
+
const DURATION_MULTIPLIERS: Record<string, number> = {
|
|
76
|
+
s: 1,
|
|
77
|
+
m: 60,
|
|
78
|
+
h: 3600,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const MAX_SSR_CACHE_SECONDS = 31_536_000;
|
|
82
|
+
|
|
83
|
+
export function parseSsrCacheSetting(
|
|
84
|
+
raw: string | undefined | null,
|
|
85
|
+
): SsrCachePolicy {
|
|
86
|
+
const value = (raw ?? "").trim().toLowerCase();
|
|
87
|
+
if (ON_VALUES.has(value)) return { kind: "default" };
|
|
88
|
+
if (OFF_VALUES.has(value)) return { kind: "disabled" };
|
|
89
|
+
|
|
90
|
+
const match = DURATION_RE.exec(value);
|
|
91
|
+
if (match) {
|
|
92
|
+
const multiplier = DURATION_MULTIPLIERS[match[2]?.[0] ?? "s"] ?? 1;
|
|
93
|
+
const seconds = Math.min(
|
|
94
|
+
Number(match[1]) * multiplier,
|
|
95
|
+
MAX_SSR_CACHE_SECONDS,
|
|
96
|
+
);
|
|
97
|
+
return seconds > 0 ? { kind: "maxAge", seconds } : { kind: "disabled" };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Unrecognized values fall back to the default rather than failing the
|
|
101
|
+
// deployment: a typo in this env var must never silently disable the CDN.
|
|
102
|
+
console.warn(
|
|
103
|
+
`[agent-native] Ignoring unrecognized ${SSR_CACHE_ENV_VAR}=${raw}. ` +
|
|
104
|
+
`Expected "on", "off", or a duration such as "30s" / "5m".`,
|
|
105
|
+
);
|
|
106
|
+
return { kind: "default" };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function ssrCacheHeadersForPolicy(
|
|
110
|
+
policy: SsrCachePolicy,
|
|
111
|
+
): SsrCacheHeaders {
|
|
112
|
+
if (policy.kind === "default") return { ...DEFAULT_SSR_CACHE_HEADERS };
|
|
113
|
+
if (policy.kind === "disabled") return { ...DISABLED_SSR_CACHE_HEADERS };
|
|
114
|
+
// Mirror stale-while-revalidate onto the chosen freshness. Apps opt into a
|
|
115
|
+
// short max-age precisely because a long stale window is the problem; keeping
|
|
116
|
+
// the 7-day default SWR here would hand back the staleness they opted out of.
|
|
117
|
+
const control =
|
|
118
|
+
`public, max-age=${policy.seconds}, ` +
|
|
119
|
+
`stale-while-revalidate=${policy.seconds}, stale-if-error=3600`;
|
|
120
|
+
return {
|
|
121
|
+
"cache-control": control,
|
|
122
|
+
"cdn-cache-control": control,
|
|
123
|
+
"netlify-cdn-cache-control": control,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
let memoizedRaw: string | undefined;
|
|
128
|
+
let memoizedHeaders: Readonly<SsrCacheHeaders> | undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Resolve the SSR cache headers for this deployment. Reads
|
|
132
|
+
* `AGENT_NATIVE_SSR_CACHE` and memoizes per distinct value so the hot SSR path
|
|
133
|
+
* does not re-parse on every response. The result is frozen and shared by every
|
|
134
|
+
* response — copy it before mutating.
|
|
135
|
+
*/
|
|
136
|
+
export function resolveSsrCacheHeaders(
|
|
137
|
+
env: Record<string, string | undefined> = typeof process === "undefined"
|
|
138
|
+
? {}
|
|
139
|
+
: process.env,
|
|
140
|
+
): Readonly<SsrCacheHeaders> {
|
|
141
|
+
const raw = env[SSR_CACHE_ENV_VAR];
|
|
142
|
+
if (memoizedHeaders && raw === memoizedRaw) return memoizedHeaders;
|
|
143
|
+
memoizedRaw = raw;
|
|
144
|
+
memoizedHeaders = Object.freeze(
|
|
145
|
+
ssrCacheHeadersForPolicy(parseSsrCacheSetting(raw)),
|
|
146
|
+
);
|
|
147
|
+
return memoizedHeaders;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function isSsrCacheEnabled(
|
|
151
|
+
env: Record<string, string | undefined> = typeof process === "undefined"
|
|
152
|
+
? {}
|
|
153
|
+
: process.env,
|
|
154
|
+
): boolean {
|
|
155
|
+
return parseSsrCacheSetting(env[SSR_CACHE_ENV_VAR]).kind !== "disabled";
|
|
156
|
+
}
|
|
157
|
+
|
|
17
158
|
export const DEFAULT_SPECULATION_RULES_PATH =
|
|
18
159
|
"/_agent-native/speculation-rules.json";
|
|
19
160
|
|
|
@@ -56,7 +56,29 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
56
56
|
- Runs `skills update scaffold --project`
|
|
57
57
|
- Runs `typecheck` when the project has that script
|
|
58
58
|
|
|
59
|
-
3. **
|
|
59
|
+
3. **Pull upstream template changes (optional, separate from the bump)**
|
|
60
|
+
|
|
61
|
+
`agent-native upgrade` moves package versions. It never touches files that
|
|
62
|
+
were copied out of a template at scaffold time, so template fixes and
|
|
63
|
+
improvements do not arrive with a bump.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
agent-native template status # recorded ref vs latest, drift counts
|
|
67
|
+
agent-native template diff # what upstream changed, read-only
|
|
68
|
+
agent-native template sync # 3-way merge it into the app
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`sync` defaults to the ref matching the installed `@agent-native/core`, so
|
|
72
|
+
run it after `upgrade`. It merges per file against a pristine baseline
|
|
73
|
+
stored in `refs/agent-native/template-baseline/<app-path>`; files upstream
|
|
74
|
+
did not touch are left alone, and real collisions get conflict markers.
|
|
75
|
+
After resolving markers, run `agent-native template accept` — the baseline
|
|
76
|
+
deliberately does not advance past an unresolved merge.
|
|
77
|
+
|
|
78
|
+
Apps scaffolded before provenance existed have no baseline. Create one
|
|
79
|
+
with `agent-native template baseline` before the first sync.
|
|
80
|
+
|
|
81
|
+
4. **If upgrade or typecheck fails**
|
|
60
82
|
|
|
61
83
|
- Read the concrete error
|
|
62
84
|
- Fix **app** source, actions, config, or env — not framework packages
|
|
@@ -68,7 +90,7 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
68
90
|
copied component; do not use that path to reproduce framework runtime
|
|
69
91
|
behavior or hide version skew.
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
5. **Dry-run / partial runs**
|
|
72
94
|
|
|
73
95
|
```bash
|
|
74
96
|
agent-native upgrade --dry-run
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
type ChatHistoryItem,
|
|
15
15
|
} from "@agent-native/toolkit/chat-history";
|
|
16
16
|
import {
|
|
17
|
-
IconHierarchy2,
|
|
18
17
|
IconLayoutSidebarLeftCollapse,
|
|
19
18
|
IconLayoutSidebarLeftExpand,
|
|
20
19
|
IconMessageCircle,
|
|
@@ -43,12 +42,6 @@ const navItems = [
|
|
|
43
42
|
];
|
|
44
43
|
|
|
45
44
|
const bottomNavItems = [
|
|
46
|
-
{
|
|
47
|
-
icon: IconHierarchy2,
|
|
48
|
-
labelKey: "settings.agentTitle",
|
|
49
|
-
href: "/agent",
|
|
50
|
-
view: "agent",
|
|
51
|
-
},
|
|
52
45
|
{
|
|
53
46
|
icon: IconSettings,
|
|
54
47
|
labelKey: "navigation.settings",
|
|
@@ -56,7 +56,29 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
56
56
|
- Runs `skills update scaffold --project`
|
|
57
57
|
- Runs `typecheck` when the project has that script
|
|
58
58
|
|
|
59
|
-
3. **
|
|
59
|
+
3. **Pull upstream template changes (optional, separate from the bump)**
|
|
60
|
+
|
|
61
|
+
`agent-native upgrade` moves package versions. It never touches files that
|
|
62
|
+
were copied out of a template at scaffold time, so template fixes and
|
|
63
|
+
improvements do not arrive with a bump.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
agent-native template status # recorded ref vs latest, drift counts
|
|
67
|
+
agent-native template diff # what upstream changed, read-only
|
|
68
|
+
agent-native template sync # 3-way merge it into the app
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`sync` defaults to the ref matching the installed `@agent-native/core`, so
|
|
72
|
+
run it after `upgrade`. It merges per file against a pristine baseline
|
|
73
|
+
stored in `refs/agent-native/template-baseline/<app-path>`; files upstream
|
|
74
|
+
did not touch are left alone, and real collisions get conflict markers.
|
|
75
|
+
After resolving markers, run `agent-native template accept` — the baseline
|
|
76
|
+
deliberately does not advance past an unresolved merge.
|
|
77
|
+
|
|
78
|
+
Apps scaffolded before provenance existed have no baseline. Create one
|
|
79
|
+
with `agent-native template baseline` before the first sync.
|
|
80
|
+
|
|
81
|
+
4. **If upgrade or typecheck fails**
|
|
60
82
|
|
|
61
83
|
- Read the concrete error
|
|
62
84
|
- Fix **app** source, actions, config, or env — not framework packages
|
|
@@ -68,7 +90,7 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
68
90
|
copied component; do not use that path to reproduce framework runtime
|
|
69
91
|
behavior or hide version skew.
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
5. **Dry-run / partial runs**
|
|
72
94
|
|
|
73
95
|
```bash
|
|
74
96
|
agent-native upgrade --dry-run
|
|
@@ -56,7 +56,29 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
56
56
|
- Runs `skills update scaffold --project`
|
|
57
57
|
- Runs `typecheck` when the project has that script
|
|
58
58
|
|
|
59
|
-
3. **
|
|
59
|
+
3. **Pull upstream template changes (optional, separate from the bump)**
|
|
60
|
+
|
|
61
|
+
`agent-native upgrade` moves package versions. It never touches files that
|
|
62
|
+
were copied out of a template at scaffold time, so template fixes and
|
|
63
|
+
improvements do not arrive with a bump.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
agent-native template status # recorded ref vs latest, drift counts
|
|
67
|
+
agent-native template diff # what upstream changed, read-only
|
|
68
|
+
agent-native template sync # 3-way merge it into the app
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`sync` defaults to the ref matching the installed `@agent-native/core`, so
|
|
72
|
+
run it after `upgrade`. It merges per file against a pristine baseline
|
|
73
|
+
stored in `refs/agent-native/template-baseline/<app-path>`; files upstream
|
|
74
|
+
did not touch are left alone, and real collisions get conflict markers.
|
|
75
|
+
After resolving markers, run `agent-native template accept` — the baseline
|
|
76
|
+
deliberately does not advance past an unresolved merge.
|
|
77
|
+
|
|
78
|
+
Apps scaffolded before provenance existed have no baseline. Create one
|
|
79
|
+
with `agent-native template baseline` before the first sync.
|
|
80
|
+
|
|
81
|
+
4. **If upgrade or typecheck fails**
|
|
60
82
|
|
|
61
83
|
- Read the concrete error
|
|
62
84
|
- Fix **app** source, actions, config, or env — not framework packages
|
|
@@ -68,7 +90,7 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
68
90
|
copied component; do not use that path to reproduce framework runtime
|
|
69
91
|
behavior or hide version skew.
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
5. **Dry-run / partial runs**
|
|
72
94
|
|
|
73
95
|
```bash
|
|
74
96
|
agent-native upgrade --dry-run
|
|
@@ -151,6 +151,23 @@ See the `authentication` skill for the full model and `guard:ssr-cache-shell`
|
|
|
151
151
|
plus `ssr-handler.spec.ts` (`packages/core/src/server/ssr-handler.ts`) for the
|
|
152
152
|
enforced contract.
|
|
153
153
|
|
|
154
|
+
**Never route mutation-fresh reads through SSR loader data.** Data that changes
|
|
155
|
+
when a user acts belongs in an action, read from the client with
|
|
156
|
+
`useActionQuery` / `useActionMutation` and kept live by `useDbSync()` polling —
|
|
157
|
+
that path never touches the SSR shell cache. A `useRevalidator()` after a
|
|
158
|
+
mutation re-fetches `.data` with a plain GET and can legitimately be served the
|
|
159
|
+
cached copy. SSR loaders render the public shell; the client resolves anything
|
|
160
|
+
that must be fresh.
|
|
161
|
+
|
|
162
|
+
The one supported knob is the deployment-wide `AGENT_NATIVE_SSR_CACHE` env var:
|
|
163
|
+
unset/`on` keeps the default, `off` sends `no-store`, and a duration such as
|
|
164
|
+
`30s` / `5m` shortens freshness. It is for deployments whose host does not purge
|
|
165
|
+
its CDN on deploy, or whose loaders genuinely serve mutable public data. It
|
|
166
|
+
changes cache duration only — cookies are still stripped before render, so
|
|
167
|
+
turning it off does not make SSR personalized. There is deliberately no
|
|
168
|
+
per-route or per-request override; that is how one visitor's payload lands in
|
|
169
|
+
another visitor's shared CDN entry.
|
|
170
|
+
|
|
154
171
|
## 7. Big payloads and long lists
|
|
155
172
|
|
|
156
173
|
- **Paginate or window** unbounded lists (messages, responses, events, activity).
|
|
@@ -176,3 +193,5 @@ enforced contract.
|
|
|
176
193
|
- [ ] Unbounded lists are paginated/windowed; large blobs aren't inlined on the hot path.
|
|
177
194
|
- [ ] SSR HTML/`.data` path stays session-blind and cacheable — no `private`,
|
|
178
195
|
`no-store`, `Vary: Cookie`, or auth branch added to it.
|
|
196
|
+
- [ ] Mutation-fresh reads go through actions + `useActionQuery`, not SSR loader
|
|
197
|
+
data.
|
package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md
CHANGED
|
@@ -56,7 +56,29 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
56
56
|
- Runs `skills update scaffold --project`
|
|
57
57
|
- Runs `typecheck` when the project has that script
|
|
58
58
|
|
|
59
|
-
3. **
|
|
59
|
+
3. **Pull upstream template changes (optional, separate from the bump)**
|
|
60
|
+
|
|
61
|
+
`agent-native upgrade` moves package versions. It never touches files that
|
|
62
|
+
were copied out of a template at scaffold time, so template fixes and
|
|
63
|
+
improvements do not arrive with a bump.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
agent-native template status # recorded ref vs latest, drift counts
|
|
67
|
+
agent-native template diff # what upstream changed, read-only
|
|
68
|
+
agent-native template sync # 3-way merge it into the app
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`sync` defaults to the ref matching the installed `@agent-native/core`, so
|
|
72
|
+
run it after `upgrade`. It merges per file against a pristine baseline
|
|
73
|
+
stored in `refs/agent-native/template-baseline/<app-path>`; files upstream
|
|
74
|
+
did not touch are left alone, and real collisions get conflict markers.
|
|
75
|
+
After resolving markers, run `agent-native template accept` — the baseline
|
|
76
|
+
deliberately does not advance past an unresolved merge.
|
|
77
|
+
|
|
78
|
+
Apps scaffolded before provenance existed have no baseline. Create one
|
|
79
|
+
with `agent-native template baseline` before the first sync.
|
|
80
|
+
|
|
81
|
+
4. **If upgrade or typecheck fails**
|
|
60
82
|
|
|
61
83
|
- Read the concrete error
|
|
62
84
|
- Fix **app** source, actions, config, or env — not framework packages
|
|
@@ -68,7 +90,7 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
68
90
|
copied component; do not use that path to reproduce framework runtime
|
|
69
91
|
behavior or hide version skew.
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
5. **Dry-run / partial runs**
|
|
72
94
|
|
|
73
95
|
```bash
|
|
74
96
|
agent-native upgrade --dry-run
|