@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DASHBOARD_REDIRECT_PARAM,
|
|
3
|
+
DASHBOARD_REDIRECT_VALUE,
|
|
4
|
+
} from "./share-attribution.js";
|
|
5
|
+
|
|
6
|
+
/** Query params worth carrying from /share/:id over to /r/:id. */
|
|
7
|
+
const FORWARDED_PARAMS = ["t", "panel"] as const;
|
|
8
|
+
|
|
9
|
+
export interface DashboardRedirectInput {
|
|
10
|
+
recordingId: string | null | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The server's `canOpenDirectRecordingPage` verdict, not a display role.
|
|
13
|
+
* /r sends anyone it rejects back to /share, so a looser predicate here
|
|
14
|
+
* bounces the viewer between the two routes forever.
|
|
15
|
+
*/
|
|
16
|
+
canOpenDashboard: boolean;
|
|
17
|
+
/** Current location search string, with or without the leading `?`. */
|
|
18
|
+
search: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Where a share-link visitor should be sent instead of rendering /share/:id,
|
|
23
|
+
* or null to stay put.
|
|
24
|
+
*/
|
|
25
|
+
export function resolveDashboardRedirect(
|
|
26
|
+
input: DashboardRedirectInput,
|
|
27
|
+
): string | null {
|
|
28
|
+
if (!input.canOpenDashboard || !input.recordingId) return null;
|
|
29
|
+
|
|
30
|
+
const params = new URLSearchParams(input.search);
|
|
31
|
+
if (params.get(DASHBOARD_REDIRECT_PARAM) === DASHBOARD_REDIRECT_VALUE)
|
|
32
|
+
return null;
|
|
33
|
+
|
|
34
|
+
const forwarded = new URLSearchParams();
|
|
35
|
+
for (const key of FORWARDED_PARAMS) {
|
|
36
|
+
const value = params.get(key);
|
|
37
|
+
if (value) forwarded.set(key, value);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const query = forwarded.toString();
|
|
41
|
+
return `/r/${encodeURIComponent(input.recordingId)}${query ? `?${query}` : ""}`;
|
|
42
|
+
}
|
|
@@ -2,3 +2,29 @@ export function clampCompletionPct(value: number | null | undefined): number {
|
|
|
2
2
|
if (typeof value !== "number" || !Number.isFinite(value)) return 0;
|
|
3
3
|
return Math.min(100, Math.max(0, value));
|
|
4
4
|
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* In-memory twin of `countedViewCondition` / `countRecordingViews` in
|
|
8
|
+
* `server/lib/recordings.ts`: a view is one `recording_viewers` row whose
|
|
9
|
+
* `countedView` flag is set. Use it whenever the rows are already loaded so
|
|
10
|
+
* every surface reports the same number.
|
|
11
|
+
*/
|
|
12
|
+
export function isCountedViewerRow(row: { countedView?: unknown }): boolean {
|
|
13
|
+
return Boolean(row.countedView);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const ANONYMOUS_VIEWER_NAME_PREFIX = "anon:";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Anonymous rows keep their `anon:<sessionId>` dedup key in `viewer_name`.
|
|
20
|
+
* That key is storage plumbing, never a display name — return null so callers
|
|
21
|
+
* render their own "Someone" placeholder instead of leaking the session key.
|
|
22
|
+
*/
|
|
23
|
+
export function displayViewerName(
|
|
24
|
+
viewerName: string | null | undefined,
|
|
25
|
+
): string | null {
|
|
26
|
+
if (viewerName == null) return null;
|
|
27
|
+
return viewerName.startsWith(ANONYMOUS_VIEWER_NAME_PREFIX)
|
|
28
|
+
? null
|
|
29
|
+
: viewerName;
|
|
30
|
+
}
|
|
@@ -237,6 +237,11 @@ File access still requires a local Content app, Agent Native Desktop, or another
|
|
|
237
237
|
trusted bridge. Disconnecting a folder leaves the SQL pages and disk files in
|
|
238
238
|
place. Concurrent edits and missing source files require explicit review.
|
|
239
239
|
|
|
240
|
+
See **`references/local-file-mode.md`** for the full folder-source Pull/Check/Push
|
|
241
|
+
workflow, the manifest/CLI launch commands, Builder Symbols and Builder
|
|
242
|
+
source-component preservation rules, picked-folder/Desktop component
|
|
243
|
+
previews, and the agent component-edit workflow.
|
|
244
|
+
|
|
240
245
|
## MDX And Components
|
|
241
246
|
|
|
242
247
|
- Preserve frontmatter keys you do not understand. Preserve MDX imports,
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Local File Mode Reference
|
|
2
|
+
|
|
3
|
+
Content has one database-backed document model with optional folder sources.
|
|
4
|
+
This file covers the folder-source workflow, the manifest/CLI bridge, and
|
|
5
|
+
local MDX components in full; the `content` skill's "Local Folder Sources"
|
|
6
|
+
section is the short version.
|
|
7
|
+
|
|
8
|
+
## Local folder sources
|
|
9
|
+
|
|
10
|
+
The `/local-files` view links one or more browser or Agent Native Desktop
|
|
11
|
+
folders to SQL-backed documents. The UI uses folder rows: **Pull** calls
|
|
12
|
+
`sync-local-folder-source`, **Check** runs the same action with
|
|
13
|
+
`dryRun: true`, and **Push** uses the source-scoped `export-content-source`.
|
|
14
|
+
Imported files become ordinary SQL documents in the target space's canonical
|
|
15
|
+
Files database. Preserve frontmatter `id` across renames; missing files and
|
|
16
|
+
concurrent changes become reviewable incoming change sets instead of
|
|
17
|
+
silently deleting or overwriting a page. SQL stores only opaque connection
|
|
18
|
+
identity, relative paths, and hashes. Disconnecting a folder keeps both the
|
|
19
|
+
Content pages and disk files.
|
|
20
|
+
|
|
21
|
+
## Manifest/CLI bridge
|
|
22
|
+
|
|
23
|
+
`agent-native content local-files <target>` remains as a compatibility
|
|
24
|
+
spelling, but it launches normal database-backed Content. `agent-native.json`
|
|
25
|
+
declares `source.type: "local-folder"` and an opaque `connectionId`; it does
|
|
26
|
+
not select a separate application mode. The trusted local server bridge
|
|
27
|
+
materializes that source through `sync-manifest-local-folder-source`.
|
|
28
|
+
|
|
29
|
+
Launch Content directly against a local folder or file with:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
agent-native content local-files docs --profile docs/no-bookkeeping
|
|
33
|
+
agent-native content local-files docs/guide.mdx --profile docs/no-bookkeeping
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Minimal `agent-native.json`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"version": 1,
|
|
41
|
+
"apps": {
|
|
42
|
+
"content": {
|
|
43
|
+
"mode": "local-files",
|
|
44
|
+
"profile": "docs/no-bookkeeping",
|
|
45
|
+
"roots": [
|
|
46
|
+
{
|
|
47
|
+
"name": "Docs",
|
|
48
|
+
"path": "docs",
|
|
49
|
+
"profile": "docs/no-bookkeeping",
|
|
50
|
+
"extensions": [".md", ".mdx"]
|
|
51
|
+
},
|
|
52
|
+
{ "name": "Blog", "path": "blog", "extensions": [".md", ".mdx"] },
|
|
53
|
+
{
|
|
54
|
+
"name": "Resources",
|
|
55
|
+
"path": "resources",
|
|
56
|
+
"extensions": [".md", ".mdx"]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"components": "components"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
In Local File Mode, use the normal document actions (`list-documents`,
|
|
66
|
+
`get-document`, `create-document`, `update-document`, `delete-document`)
|
|
67
|
+
instead of raw filesystem writes when operating through the app. To share a
|
|
68
|
+
local file, call `share-local-file-document --id <local-file-document-id>`
|
|
69
|
+
first; it creates or refreshes a database-backed copy and returns the
|
|
70
|
+
shareable document id. Provider sync such as Builder.io pull/push should
|
|
71
|
+
remain a Content-specific explicit sync action.
|
|
72
|
+
|
|
73
|
+
## Local MDX components
|
|
74
|
+
|
|
75
|
+
Local file workspaces can expose React components from the configured
|
|
76
|
+
`components` folder. Export PascalCase components such as `ImpactCounter`
|
|
77
|
+
from `.tsx` files, then use `<ImpactCounter />` in MDX or pick it from the
|
|
78
|
+
editor slash menu under Local components. Simple string props are previewed.
|
|
79
|
+
Components can export editable input metadata such as `ImpactCounterInputs`
|
|
80
|
+
with `string`, `textarea`, `number`, `boolean`, and `select` fields;
|
|
81
|
+
selecting the component in the editor shows a corner edit button that
|
|
82
|
+
rewrites the MDX props. JSX expression props are preserved in source but
|
|
83
|
+
shown as an unsupported preview.
|
|
84
|
+
|
|
85
|
+
## Reusable MDX references
|
|
86
|
+
|
|
87
|
+
Local-file MDX can embed another local document with
|
|
88
|
+
`<ContentReference sourcePath="./shared/example.mdx" />`. The editor resolves
|
|
89
|
+
`sourcePath` relative to the current file, previews the referenced MDX
|
|
90
|
+
read-only in place, and preserves the original tag in source. Use this for
|
|
91
|
+
reusable docs fragments instead of copy/pasting shared content.
|
|
92
|
+
|
|
93
|
+
## Builder Symbols
|
|
94
|
+
|
|
95
|
+
Builder MDX pulls preserve Symbol blocks as `<BuilderSymbol ... />`. When
|
|
96
|
+
Builder returns enriched symbol content, the pull also writes a referenced
|
|
97
|
+
`.builder.mdx` file under `content/builder/symbols/` and sets the Symbol
|
|
98
|
+
block's `source` attribute. Edit reusable symbol content in that emitted
|
|
99
|
+
source file; do not retarget `entry`, `model`, or `source` in the parent MDX
|
|
100
|
+
unless a dedicated Builder retargeting workflow is added.
|
|
101
|
+
|
|
102
|
+
## Builder source components
|
|
103
|
+
|
|
104
|
+
Builder CMS database body hydration renders unsupported provider-native body
|
|
105
|
+
blocks as `<SourceComponent ... />` markers. These markers include
|
|
106
|
+
`mappingStatus` and `sourceEditState`: `mapped` / `safe-to-edit` content has
|
|
107
|
+
an explicit Markdown/NFM mapper, `preserved` / `needs-review` content keeps a
|
|
108
|
+
known Builder/source component intact for review, and `unknown` /
|
|
109
|
+
`preserved-only` content is an unmapped provider block that must round-trip
|
|
110
|
+
as-is. Treat source-component markers as read-only preservation anchors, not
|
|
111
|
+
editable local blocks. Agents may edit surrounding prose, but must not
|
|
112
|
+
delete, duplicate, move, or rewrite `rawRef`, `rawHash`, mapping metadata, or
|
|
113
|
+
marker ids unless a dedicated provider conversion workflow exists. Guarded
|
|
114
|
+
Builder write-back refuses missing, tampered, or structurally moved markers
|
|
115
|
+
so source-native components are not lost. Readable bodies hydrated before
|
|
116
|
+
source-component mapping may need a fresh Builder body hydration pass before
|
|
117
|
+
guarded push, because newly preserved markers are intentionally treated as
|
|
118
|
+
structure changes.
|
|
119
|
+
|
|
120
|
+
## Picked folders and components
|
|
121
|
+
|
|
122
|
+
Browser-picked folders can be the source of truth for `.md`/`.mdx` files, but
|
|
123
|
+
the browser does not expose an absolute path that Vite can compile. Component
|
|
124
|
+
previews from a picked `components/` folder require Agent Native Desktop or a
|
|
125
|
+
local Content dev server. Desktop-selected folders register their workspace
|
|
126
|
+
path with the local dev server so Vite can import and hot reload
|
|
127
|
+
`components/*.tsx`.
|
|
128
|
+
|
|
129
|
+
## Agent component edits
|
|
130
|
+
|
|
131
|
+
Use `list-local-component-files` to find the registered workspace id, then
|
|
132
|
+
`write-local-component-file` to add or edit `.tsx`, `.jsx`, `.ts`, or `.js`
|
|
133
|
+
files under that workspace's `components/` folder. The Vite component
|
|
134
|
+
registry reloads after file additions/removals; edits to already-loaded files
|
|
135
|
+
hot reload through Vite.
|
|
@@ -205,3 +205,15 @@ descriptions narrow the guidance further when working with structured values.
|
|
|
205
205
|
| "Show me the document tree" | `list-documents` |
|
|
206
206
|
|
|
207
207
|
Always run `refresh-list` after any create, update, or delete operation.
|
|
208
|
+
|
|
209
|
+
## Reference Files
|
|
210
|
+
|
|
211
|
+
- **`references/document-behavior.md`** — self-documenting descriptions,
|
|
212
|
+
`pull-document`'s collab-flush handshake vs `get-document`, versions, image
|
|
213
|
+
blocks, and the sharing/visibility model (`/page/<id>` vs `/p/<id>`,
|
|
214
|
+
discoverability, the read-only public chat). Read it before touching
|
|
215
|
+
descriptions, external ingest, or a document's visibility.
|
|
216
|
+
- **`references/databases.md`** — full behavioral reference for Content
|
|
217
|
+
databases: property types, Blocks fields, and every view type (table,
|
|
218
|
+
list, gallery, board, calendar, timeline, form). Read it before building or
|
|
219
|
+
modifying database views, properties, or forms.
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Content Databases — Behavioral Reference
|
|
2
|
+
|
|
3
|
+
Notion-style databases layered on top of the normal document model. The SQL
|
|
4
|
+
column shapes are injected separately by the framework schema block — this
|
|
5
|
+
file covers behavior the schema can't convey: what each property type means,
|
|
6
|
+
how views work, and which actions own which mutation.
|
|
7
|
+
|
|
8
|
+
## Databases are document-backed page-level objects
|
|
9
|
+
|
|
10
|
+
A normal document has no properties by default. A row in a database is also a
|
|
11
|
+
document, linked through `content_database_items`; when that row document
|
|
12
|
+
opens, it shows the database's properties. The database page itself renders as
|
|
13
|
+
a table and owns the schema in `document_property_definitions.database_id`.
|
|
14
|
+
Database row documents and their descendants stay contained by the database
|
|
15
|
+
and are omitted from the ordinary sidebar page tree; users open them from the
|
|
16
|
+
database view or an explicit link. When a row document is open, the editor
|
|
17
|
+
shows a small parent-database breadcrumb above the title so the user can
|
|
18
|
+
return to the containing database without relying on the sidebar. The
|
|
19
|
+
`view-screen` document tree follows the same rule: database row pages are
|
|
20
|
+
omitted from the ordinary tree and counted separately as contained database
|
|
21
|
+
items.
|
|
22
|
+
|
|
23
|
+
When a database row is open in the side preview, navigation state includes
|
|
24
|
+
`databasePreviewDocumentId`, and `view-screen` returns that row as
|
|
25
|
+
`databasePreview` with its content and properties. Database navigation state
|
|
26
|
+
also includes the active view type, search query, sort count, the saved
|
|
27
|
+
database view list, active sort/filter definitions, filter match mode, saved
|
|
28
|
+
column calculations, table cell wrapping state, table row density, collapsed
|
|
29
|
+
group IDs, calendar or timeline date property IDs/names, the visible date
|
|
30
|
+
range for calendar/timeline views, empty-group visibility state, visible
|
|
31
|
+
source summary when attached, and database row preview state. Source-aware
|
|
32
|
+
metadata lives alongside the database model in `content_database_sources`,
|
|
33
|
+
`content_database_source_fields`, `content_database_source_rows`, and
|
|
34
|
+
`content_database_source_change_sets`; those tables store binding status,
|
|
35
|
+
field mappings, source-qualified row identity/provenance, freshness
|
|
36
|
+
timestamps, and proposed local-only diff records without changing the normal
|
|
37
|
+
table view.
|
|
38
|
+
|
|
39
|
+
Navigation state includes a capped `databaseVisibleItems` summary with row
|
|
40
|
+
item IDs, document IDs, titles, positions, and visible property value
|
|
41
|
+
summaries for the visible rows, plus row count and total row count, so agents
|
|
42
|
+
can tell whether the user is looking at the full database or a constrained
|
|
43
|
+
slice and can refer to the same rows and cells the user can currently scan;
|
|
44
|
+
for calendar and timeline views this summary is limited to rows in the
|
|
45
|
+
current visible date window plus rows shown in the "No date" section. When
|
|
46
|
+
footer calculations are active, navigation state also includes
|
|
47
|
+
`databaseCalculationResults` with the visible result text for each calculated
|
|
48
|
+
column. When table rows are selected, navigation state also includes
|
|
49
|
+
`databaseSelectedItemCount` and `databaseSelectedItems`, and
|
|
50
|
+
`view-screen.databaseCurrentView` mirrors that selected row summary.
|
|
51
|
+
`view-screen` exposes the same slice as `databaseCurrentView` alongside the
|
|
52
|
+
full database payload. Its row property summaries should mirror the active
|
|
53
|
+
database view's property order, hidden-property list, and empty-property
|
|
54
|
+
visibility rules. It also marks database page entries in
|
|
55
|
+
`documentTree.items[].database`, matching the sidebar's database icon
|
|
56
|
+
fallback so agents can distinguish database pages from ordinary pages.
|
|
57
|
+
|
|
58
|
+
Database views render the row page's custom icon anywhere a row title
|
|
59
|
+
appears, falling back to the default page icon when the row has no icon. The
|
|
60
|
+
database side preview exposes the same icon picker affordance as a normal
|
|
61
|
+
page, so users can set or remove a row page icon without leaving the
|
|
62
|
+
database. The preview is an overlay-free, non-modal side peek so the database
|
|
63
|
+
context stays visible while the row page is open. Background database
|
|
64
|
+
interactions should not dismiss it; use the explicit close control to close
|
|
65
|
+
the preview. Keep it narrow enough on desktop that the underlying database
|
|
66
|
+
still reads as the active context. In table views, clicking a row title opens
|
|
67
|
+
that side preview; inline title editing lives behind the hover pencil
|
|
68
|
+
affordance.
|
|
69
|
+
|
|
70
|
+
## Property types
|
|
71
|
+
|
|
72
|
+
Document properties are SQL-backed, Notion-style structured metadata rather
|
|
73
|
+
than YAML embedded in the markdown body. Database property definitions
|
|
74
|
+
support `text`, `number`, `select`, `multi_select`, `status`, `date`,
|
|
75
|
+
`person`, `place`, `files_media` (`Files & media`), `checkbox`, `url`,
|
|
76
|
+
`email`, `phone`, `blocks` (Capacities-style rich-text body field), plus
|
|
77
|
+
computed `formula`, `id`, `created_time`, `created_by`, and
|
|
78
|
+
`last_edited_time`, `last_edited_by`, plus property visibility
|
|
79
|
+
(`always_show`, `hide_when_empty`, `always_hide`). The value table stores
|
|
80
|
+
per-row-document JSON values.
|
|
81
|
+
|
|
82
|
+
### Blocks fields
|
|
83
|
+
|
|
84
|
+
A `blocks` field is independent rich-text content per row — NOT YAML and NOT
|
|
85
|
+
a pointer to the body. Every database is seeded with one primary "Content"
|
|
86
|
+
Blocks field whose content is backed by `documents.content` (so it reuses the
|
|
87
|
+
collaborative TipTap/Yjs body editor and existing data migrates for free).
|
|
88
|
+
Each additional Blocks field stores its own content in
|
|
89
|
+
`document_block_field_contents`, keyed by `(document_id, property_id)`, so no
|
|
90
|
+
two Blocks fields ever share content — adding a second Blocks field creates a
|
|
91
|
+
new, empty, independent field. On the page: one Blocks field renders
|
|
92
|
+
chromeless (no header, just the body); two or more each show their name as a
|
|
93
|
+
header and are collapsible and reorderable (the surviving lone field keeps
|
|
94
|
+
its stored name). In table views a Blocks column shows a word count (e.g.
|
|
95
|
+
"412 words"), not the body. A Blocks field can only be deleted from the
|
|
96
|
+
database view's column menu (not from the page body); deleting the last
|
|
97
|
+
Blocks field warns that it removes the body for every object of the type.
|
|
98
|
+
|
|
99
|
+
Formula properties store their expression in property options and support
|
|
100
|
+
`{Property name}` substitution plus simple numeric math such as `{MSV} * 2`.
|
|
101
|
+
|
|
102
|
+
## Views
|
|
103
|
+
|
|
104
|
+
Database views support multiple named table, list, gallery, board, calendar,
|
|
105
|
+
timeline, and form views saved in `content_databases.view_config_json`. Each
|
|
106
|
+
view has its own stacked sorts, type-aware filters with an all/any match
|
|
107
|
+
mode, per-view hidden property IDs, column widths, and (for table, list,
|
|
108
|
+
gallery, and board views) grouping property or (for calendar/timeline views)
|
|
109
|
+
date property: text-like fields can use contains/exact/empty filters, numbers
|
|
110
|
+
support comparisons, dates support before/after, and checkboxes support
|
|
111
|
+
checked/unchecked. Users can reorder stacked sort and filter conditions from
|
|
112
|
+
the database toolbar menus, and sort priority follows the same top-to-bottom
|
|
113
|
+
order shown in the menu.
|
|
114
|
+
|
|
115
|
+
New rows created from a filtered UI view inherit simple editable equality and
|
|
116
|
+
checkbox filters as initial property values, resolving option labels back to
|
|
117
|
+
stable option IDs for select, status, and multi-select filters, so a row
|
|
118
|
+
created under "Status is Published" remains visible instead of immediately
|
|
119
|
+
disappearing. Agents can mirror that behavior by passing
|
|
120
|
+
`--propertyValues '{"propertyId":"value"}'` to `add-database-item`. Filter
|
|
121
|
+
controls are type-aware: option properties choose from their configured
|
|
122
|
+
options, option value editors can search existing options or create a new
|
|
123
|
+
option from the typed query, and property settings can rename option labels
|
|
124
|
+
or change option colors while preserving stable option IDs. Option-backed
|
|
125
|
+
filter value pickers are searchable, can create a new option from the typed
|
|
126
|
+
query, and can be cleared without removing the whole filter row. Date
|
|
127
|
+
properties use date inputs, and number properties use numeric inputs.
|
|
128
|
+
|
|
129
|
+
Column header menus can add or clear column sorts, add or replace type-aware
|
|
130
|
+
quick filters (including checked/unchecked for checkbox fields), clear
|
|
131
|
+
filters for that column, hide property columns in the current view without
|
|
132
|
+
changing other views, and resize column widths. Column headers show compact
|
|
133
|
+
sort/filter indicators when that column has active view constraints. Table
|
|
134
|
+
rows can be selected with row checkboxes, and the table shows a compact
|
|
135
|
+
selected-row bar with clear, duplicate, confirmed delete, and bulk property
|
|
136
|
+
set actions for editable non-computed fields. Empty table cells stay
|
|
137
|
+
visually blank while remaining clickable for editing, and checkbox table
|
|
138
|
+
cells render as compact checkbox glyphs instead of "Checked"/"Unchecked"
|
|
139
|
+
text; clicking a checkbox cell toggles it directly via
|
|
140
|
+
`set-document-property`, matching Notion's quieter table surface. Table
|
|
141
|
+
views can toggle wrapped cells and row density per view for longer
|
|
142
|
+
text-heavy tables or more compact scanning.
|
|
143
|
+
|
|
144
|
+
Table, list, and gallery views can group rows by status, select,
|
|
145
|
+
multi-select, or checkbox properties; creating a page inside a group seeds
|
|
146
|
+
the grouped property so the new page stays in that group. Grouped table,
|
|
147
|
+
list, and gallery sections can be collapsed individually or all at once per
|
|
148
|
+
view, and views can hide empty groups to reduce option-backed clutter. Active
|
|
149
|
+
search, sort, and filter constraints show as removable chips below the
|
|
150
|
+
toolbar with a clear-all control, and every database view shows a
|
|
151
|
+
Notion-style page count footer that switches to "count of total" when search
|
|
152
|
+
or filters reduce the result set. Table views can also save per-column
|
|
153
|
+
footer calculations such as count values, count empty, percent empty, sum,
|
|
154
|
+
average, count all rows, count unique values, percent filled, checkbox
|
|
155
|
+
checked/unchecked summaries, percent checked/unchecked, min/max/median/range
|
|
156
|
+
numbers, and earliest/latest/date-range dates in the active view config.
|
|
157
|
+
Empty constrained views show a clear search/filter recovery action in the
|
|
158
|
+
view body. The database Properties menu can search fields and show or hide
|
|
159
|
+
all fields for the current view, and it includes a New property control for
|
|
160
|
+
adding fields without returning to the table header. The New property picker
|
|
161
|
+
supports searching property types by label or machine name.
|
|
162
|
+
|
|
163
|
+
In unconstrained table views, row drag handles can reorder database item
|
|
164
|
+
pages through `move-database-item`; clear search, sort, and filters before
|
|
165
|
+
manual reordering. Creating a database row returns the created item IDs and
|
|
166
|
+
opens the new row page in the side preview. Duplicating a database row
|
|
167
|
+
returns the duplicate item IDs and opens the copied row in the side preview
|
|
168
|
+
so users can continue editing the new page immediately, including from
|
|
169
|
+
table, list, and gallery row action menus. Board, calendar, and timeline
|
|
170
|
+
cards expose the same row action menu without showing table-only manual
|
|
171
|
+
reorder actions. Deleting the currently previewed row from any row action
|
|
172
|
+
menu or from the side preview header advances to the next row, falls back to
|
|
173
|
+
the previous row, or closes the preview when no rows remain.
|
|
174
|
+
|
|
175
|
+
List views render the same row pages as a compact page list with visible
|
|
176
|
+
property metadata. Gallery views render row pages as cards with a preview
|
|
177
|
+
area and visible property metadata.
|
|
178
|
+
|
|
179
|
+
Calendar views render row pages on a month grid using a `date`,
|
|
180
|
+
`created_time`, or `last_edited_time` property; when the selected date
|
|
181
|
+
property is editable, creating a page from a day sets that page's date
|
|
182
|
+
property to the day. Calendar and timeline views keep rows without the
|
|
183
|
+
selected date value reachable in a compact "No date" section instead of
|
|
184
|
+
treating them as missing search results. If a calendar or timeline view has
|
|
185
|
+
not saved a date property yet, the UI and `view-screen` both use the same
|
|
186
|
+
first available date-like property fallback. Timeline views render the same
|
|
187
|
+
date-backed row pages in a horizontally scrollable six-week range, using a
|
|
188
|
+
per-view start date property and optional end date property so cards can
|
|
189
|
+
span multiple days.
|
|
190
|
+
|
|
191
|
+
Form views render database properties as ordered questions. Each form view
|
|
192
|
+
owns its enabled-question order and required flags, so two forms on the same
|
|
193
|
+
database can collect different information. Use `submit-content-database-form`
|
|
194
|
+
for agent, Slack, MCP, and UI submissions instead of composing
|
|
195
|
+
`add-database-item` plus several property writes. The action accepts
|
|
196
|
+
property definition IDs or exact property names, accepts select/status
|
|
197
|
+
option IDs or labels, rejects unknown options, writes primary and additional
|
|
198
|
+
Blocks fields to their correct stores in one transaction, verifies the saved
|
|
199
|
+
row, and returns `createdItemId`, `createdDocumentId`, `urlPath`, and
|
|
200
|
+
`deepLink`.
|
|
201
|
+
|
|
202
|
+
The active view menu can rename, duplicate, delete, or switch an existing
|
|
203
|
+
view's layout between table, list, gallery, calendar, timeline, board, and
|
|
204
|
+
form while preserving its sorts, filters, hidden properties, and
|
|
205
|
+
layout-specific settings.
|
|
206
|
+
|
|
207
|
+
Board views group pages by status, select, multi-select, or checkbox
|
|
208
|
+
properties, and board columns can be collapsed per view using the same
|
|
209
|
+
`collapsedGroupIds` state as grouped table/list/gallery sections, including
|
|
210
|
+
collapse-all and expand-all group commands. Board views also honor the
|
|
211
|
+
per-view empty-group visibility setting. Changing the group-by property
|
|
212
|
+
clears stale collapsed group IDs for that view. Board card metadata follows
|
|
213
|
+
the same active-view hidden-property and empty-property visibility rules as
|
|
214
|
+
table/list/gallery metadata. Dragging a board card between columns updates
|
|
215
|
+
that row page's grouping property through `set-document-property`. When a
|
|
216
|
+
board is grouped by status, select, or multi-select, users can add a new
|
|
217
|
+
board group from the board itself; this appends a new option to the grouped
|
|
218
|
+
property definition.
|
|
219
|
+
|
|
220
|
+
## Actions
|
|
221
|
+
|
|
222
|
+
Use `create-content-database`, `create-inline-content-database`,
|
|
223
|
+
`get-content-database`, `list-trashed-content-databases`,
|
|
224
|
+
`restore-content-database`, `add-database-item`, `duplicate-database-item`,
|
|
225
|
+
`duplicate-database-items`, `delete-database-items`, `move-database-item`,
|
|
226
|
+
`update-content-database-view`, `list-document-properties`,
|
|
227
|
+
`configure-document-property`, `set-document-property`,
|
|
228
|
+
`duplicate-document-property`, and `delete-document-property`; do not edit
|
|
229
|
+
property rows or view config via raw SQL when an action can do it.
|
|
230
|
+
|
|
231
|
+
When targeting more than one database row, call `duplicate-database-items` or
|
|
232
|
+
`delete-database-items` once with a native JSON array of `itemIds` or
|
|
233
|
+
`documentIds`. Do not loop `duplicate-database-item` or `delete-document` for
|
|
234
|
+
multi-row duplicate/delete requests.
|
|
235
|
+
|
|
236
|
+
Database views follow Notion-style tab labels. When creating or duplicating
|
|
237
|
+
views in `viewConfig`, use unique default names (`Table 2`, `SEO copy 2`,
|
|
238
|
+
etc.) instead of appending several tabs with the same label.
|
package/corpus/templates/content/.agents/skills/document-editing/references/document-behavior.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Document Behavior Reference
|
|
2
|
+
|
|
3
|
+
Non-obvious semantics for reading, describing, versioning, illustrating, and
|
|
4
|
+
sharing documents. Read this before doing focused work in one of these areas.
|
|
5
|
+
|
|
6
|
+
## Self-documenting descriptions
|
|
7
|
+
|
|
8
|
+
Descriptions are stable semantic guidance, not generated summaries of current
|
|
9
|
+
content. Preserve this distinction when reading or writing them:
|
|
10
|
+
|
|
11
|
+
- A page description explains why the page exists and what belongs there.
|
|
12
|
+
- A database description explains the collection's purpose and inclusion
|
|
13
|
+
boundary. Inline and full-page views of one database share the same
|
|
14
|
+
description.
|
|
15
|
+
- A property description explains what the field means and what value
|
|
16
|
+
belongs there.
|
|
17
|
+
- A select, status, or multi-select option description explains when to
|
|
18
|
+
choose that option.
|
|
19
|
+
|
|
20
|
+
Descriptions are owned; context is inherited. Never copy an ancestor's prose
|
|
21
|
+
into a child description. Focused reads expose a root-to-parent `contextPath`
|
|
22
|
+
so the agent can use ancestor guidance without creating stale duplicates.
|
|
23
|
+
Read the returned descriptions before placing content or setting property
|
|
24
|
+
values. Update a description only when the object's meaning changes, not
|
|
25
|
+
whenever its current content changes.
|
|
26
|
+
|
|
27
|
+
## `pull-document` vs `get-document`
|
|
28
|
+
|
|
29
|
+
**`pull-document` is the collab-aware "ingest the final" read** — prefer it
|
|
30
|
+
over `get-document` for external ingest (another app, an external coding
|
|
31
|
+
agent over MCP/A2A, an A2A peer). `get-document` returns whatever is in the
|
|
32
|
+
`documents.content` SQL column, which can lag behind a live editing session:
|
|
33
|
+
the open editor holds the authoritative Y.Doc in memory and only debounces it
|
|
34
|
+
back to SQL. `pull-document` closes that gap with a flush handshake — if a
|
|
35
|
+
live Yjs collab session exists for the document it writes a one-shot
|
|
36
|
+
`flush-request-<id>` application-state key (scoped to the browser session,
|
|
37
|
+
just like `navigate`); the open editor sees that key, serializes its current
|
|
38
|
+
document to markdown through its own existing serializer, calls
|
|
39
|
+
`update-document`, and writes an explicit request-id-matched success/error
|
|
40
|
+
acknowledgement. `pull-document` waits for that acknowledgement and fails
|
|
41
|
+
closed if the open editor cannot save; when no active human editor is
|
|
42
|
+
present, the SQL column is authoritative and the handshake is skipped. It is
|
|
43
|
+
GET + read-only + public-agent exposed (`requiresAuth: true`), returns
|
|
44
|
+
`{ id, title, content, format, deepLink }`, and surfaces an "Open document"
|
|
45
|
+
deep link for external agents. Use `--format text` for a plain-text strip of
|
|
46
|
+
the markdown.
|
|
47
|
+
|
|
48
|
+
## Versions
|
|
49
|
+
|
|
50
|
+
`list-document-versions` / `restore-document-version` operate on saved
|
|
51
|
+
document versions. There is no diff view — restoring replaces the current
|
|
52
|
+
content with the selected version's content wholesale.
|
|
53
|
+
|
|
54
|
+
## Image blocks
|
|
55
|
+
|
|
56
|
+
Documents support image blocks as markdown images: ``.
|
|
57
|
+
The UI uploads local image files through the framework
|
|
58
|
+
`/_agent-native/file-upload` endpoint, with Builder.io as the recommended
|
|
59
|
+
storage path. If image upload fails because storage is not configured, tell
|
|
60
|
+
the user to connect Builder.io in Settings -> File uploads. Agents can add
|
|
61
|
+
images that already have a hosted URL by using `edit-document` or
|
|
62
|
+
`update-document` to insert markdown image syntax. Do not embed base64 image
|
|
63
|
+
data in document content.
|
|
64
|
+
|
|
65
|
+
## Sharing and visibility
|
|
66
|
+
|
|
67
|
+
Documents are **private by default** — only the creator can see them. To
|
|
68
|
+
grant access to others, change the visibility or add explicit share grants
|
|
69
|
+
using the framework-wide `share-resource` / `unshare-resource` /
|
|
70
|
+
`list-resource-shares` / `set-resource-visibility` actions (`resourceType`
|
|
71
|
+
`document`). See the `sharing` skill for the general access model.
|
|
72
|
+
|
|
73
|
+
Read (`get-document`, `list-documents`, `search-documents`) admits rows the
|
|
74
|
+
current user owns, has been shared on, or that match the resource's
|
|
75
|
+
visibility. Write (`update-document`, `edit-document`) requires `editor` role
|
|
76
|
+
or above; `delete-document` requires `admin` (owners always satisfy).
|
|
77
|
+
|
|
78
|
+
For Notion-style "workspace access but don't list it everywhere," set
|
|
79
|
+
`visibility` to `org` and then run `set-document-discoverability --id <id>
|
|
80
|
+
--hideFromSearch true`. Organization members can still open the document
|
|
81
|
+
with the link, but it is omitted from their Organization sidebar and
|
|
82
|
+
document search unless they own it or have an explicit share grant. Use
|
|
83
|
+
`--includeChildren true` (default) when hiding a page with sub-pages so
|
|
84
|
+
descendants do not leak into the org list.
|
|
85
|
+
|
|
86
|
+
Public documents are reachable at `/p/<id>` once visibility is `public`.
|
|
87
|
+
Anyone with the link can read the page. The public page mounts a read-only
|
|
88
|
+
agent chat with the document injected as context; public viewers must not
|
|
89
|
+
create, edit, comment on, delete, or share documents through that chat.
|
|
90
|
+
Private app documents (any visibility other than a deliberately public link)
|
|
91
|
+
are reached at `/page/<id>`.
|
|
@@ -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
|