@agent-native/core 0.121.1 → 0.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +145 -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/getting-started.mdx +477 -115
- 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/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/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/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/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -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 +5 -0
- 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/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/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/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/assets/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/brain/_gitignore +1 -0
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/calendar/_gitignore +1 -0
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/chat/_gitignore +1 -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/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/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.meetings.$meetingId.tsx +27 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +46 -15
- package/corpus/templates/clips/app/routes/record.tsx +77 -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/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 +25 -0
- package/corpus/templates/clips/server/lib/agent-views.ts +145 -0
- 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/db.ts +23 -0
- 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/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/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/dispatch/_gitignore +1 -0
- package/corpus/templates/dispatch/changelog/2026-07-24-signing-in-now-puts-you-in-your-companys-workspace.md +6 -0
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/forms/_gitignore +1 -0
- package/corpus/templates/forms/server/lib/public-form-ssr.ts +2 -2
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/macros/_gitignore +1 -0
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/mail/_gitignore +1 -0
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/plan/_gitignore +1 -0
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
- package/corpus/templates/slides/_gitignore +1 -0
- 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/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/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/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/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 +3 -3
- 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/resources/handlers.d.ts +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/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/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -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 +2 -0
- 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/getting-started.mdx +477 -115
- 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/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/sse-event-processor.ts +3 -0
- package/src/data-widgets/index.ts +41 -0
- package/src/deploy/build.ts +11 -9
- 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/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -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 +5 -0
|
@@ -122,3 +122,14 @@ For an app-created Design snapshot, use
|
|
|
122
122
|
`clone-creative-context-design-native` instead. That typed action resolves the
|
|
123
123
|
exact approved private file/Yjs payload and duplicates it through Design's
|
|
124
124
|
native path. Generic context actions must never receive or return that payload.
|
|
125
|
+
|
|
126
|
+
## Submitting to Creative Context
|
|
127
|
+
|
|
128
|
+
To submit a design to a governed Creative Context, use the Context tab or
|
|
129
|
+
`manage-context-membership`; it captures one immutable live design snapshot.
|
|
130
|
+
Reuse only a returned opaque native clone reference through the Design clone
|
|
131
|
+
action (`clone-creative-context-design-native` above) rather than re-deriving
|
|
132
|
+
one from a screenshot or generic context item. Use `operation="submit-latest"`
|
|
133
|
+
with a Library membership id when its native update status reports
|
|
134
|
+
`update-available`, so the library entry advances to the design's current
|
|
135
|
+
state instead of staying pinned to the original submission.
|
|
@@ -322,7 +322,7 @@ size. Avoid dense multi-line copy at these sizes regardless.
|
|
|
322
322
|
|
|
323
323
|
### Phase 4 — Always ship tweaks with the design
|
|
324
324
|
|
|
325
|
-
`generate-design` accepts a `--tweaks` array — pass 3-6 of the most impactful knobs bound to CSS custom properties the design's `:root` block actually defines. Surface controls users will actually want to adjust (accent color, density, radius, dark-mode toggle, font choice). Don't ship a generic preset; let the design's structure pick the knobs.
|
|
325
|
+
`generate-design` accepts a `--tweaks` array — pass 3-6 of the most impactful knobs bound to CSS custom properties the design's `:root` block actually defines. Surface controls users will actually want to adjust (accent color, density, radius, dark-mode toggle, font choice). Don't ship a generic preset; let the design's structure pick the knobs. When a user asks to add a tweak control to an existing design, preserve the existing useful tweaks and add/update only the requested definitions — read the current file with `get-design-snapshot` first if source edits are needed, and persist the complete updated tweak list through `generate-design`.
|
|
326
326
|
|
|
327
327
|
### Phase 5 — Audit, screenshot, fix, and eyeball before calling it ready
|
|
328
328
|
|
|
@@ -347,7 +347,17 @@ instead — fall back to a careful read of the HTML plus the audit findings. The
|
|
|
347
347
|
returned screenshot `url` is for human review (embed it as `` in
|
|
348
348
|
your reply); also still scan the rendered output yourself for anything the
|
|
349
349
|
diagnostics don't catch — broken hierarchy, empty/loading/error states for app
|
|
350
|
-
UI, and whether the copy/content still sounds real.
|
|
350
|
+
UI, and whether the copy/content still sounds real. To compare two design
|
|
351
|
+
snapshots/branches for a file-level visual diff (added/removed/modified) —
|
|
352
|
+
e.g. after a large refactor or before/after a review pass — call
|
|
353
|
+
`get-design-review` instead of eyeballing both versions.
|
|
354
|
+
|
|
355
|
+
After generation or a broad update, leave the user in the screen overview
|
|
356
|
+
(`navigate --view editor --editorView overview`) when the work involves
|
|
357
|
+
multiple screens or artboard placement — it's the primary editing surface for
|
|
358
|
+
selecting, moving, resizing, and entering focused single-screen editing via a
|
|
359
|
+
frame's Interact button. Reserve single-screen mode as the default landing
|
|
360
|
+
view only when the user asked to focus one specific screen.
|
|
351
361
|
|
|
352
362
|
## HTML Structure Requirements
|
|
353
363
|
|
|
@@ -698,6 +708,12 @@ regeneration is slow, expensive, and regresses unrelated parts.
|
|
|
698
708
|
tokens in `:root` rather than touching every element.
|
|
699
709
|
5. **Don't add unrequested features** during a refinement pass.
|
|
700
710
|
|
|
711
|
+
For selecting/editing DOM elements as code layers (layer projection, the
|
|
712
|
+
deterministic `apply-visual-edit` slice, and the semantic React/TSX handoff),
|
|
713
|
+
read `references/code-layers.md`. For the VS Code-style source workbench
|
|
714
|
+
(explorer, quick open, `list-source-files`/`apply-source-edit`), read
|
|
715
|
+
`references/code-workspace.md`.
|
|
716
|
+
|
|
701
717
|
## Tailwind v4 + motion gotchas
|
|
702
718
|
|
|
703
719
|
- **Gradients:** Tailwind v4 renamed the utilities. Use `bg-linear-to-r`,
|
|
@@ -792,6 +808,26 @@ persists it. `open-component-source` navigates to the component's source
|
|
|
792
808
|
location (the design file for inline/Alpine designs, or the resolved external
|
|
793
809
|
file for localhost/fusion sources).
|
|
794
810
|
|
|
811
|
+
## Suggested auto layout
|
|
812
|
+
|
|
813
|
+
For an absolute/freeform container, first measure its direct children and
|
|
814
|
+
present the proposed direction, visual order, gap, four-side padding,
|
|
815
|
+
alignment, and sizing — do not mutate source until the user applies the
|
|
816
|
+
preview. Inline HTML/Alpine applies the reviewed proposal through one
|
|
817
|
+
`apply-visual-edit`-backed content transaction so undo restores the exact
|
|
818
|
+
prior structure. Local React uses the semantic source handoff (see
|
|
819
|
+
`references/code-layers.md`, never generic AST rewriting), preserves nested
|
|
820
|
+
absolute descendants and responsive logic, and applies the approved proposal
|
|
821
|
+
as one reversible source edit.
|
|
822
|
+
|
|
823
|
+
## Editor extensions
|
|
824
|
+
|
|
825
|
+
Design editor extensions render in the right inspector slot
|
|
826
|
+
`design.editor.inspector` (`create-extension` →
|
|
827
|
+
`add-extension-slot-target` → `install-extension`). Read
|
|
828
|
+
`references/editor-extensions.md` for the context shape and the AI-driven
|
|
829
|
+
style/artboard change flow.
|
|
830
|
+
|
|
795
831
|
## Realistic app-state content
|
|
796
832
|
|
|
797
833
|
For app/product UI (not marketing pages), populate lists and tables with
|
|
@@ -829,9 +865,13 @@ tokened SVG/CSS, not photos.
|
|
|
829
865
|
|
|
830
866
|
- **Use the Assets generation tool** (`generate-asset`, or `insert-asset` once
|
|
831
867
|
an asset is chosen) instead of `<img>` placeholder URLs or colored-div
|
|
832
|
-
stand-ins
|
|
833
|
-
|
|
834
|
-
|
|
868
|
+
stand-ins — for raster generation, restyling, or editing existing
|
|
869
|
+
screenshots/photos. Always pass `callerAppId: "design"`. If no Assets MCP
|
|
870
|
+
tool is available, use the first-party Assets app via `call-agent` with
|
|
871
|
+
agent `"assets"` when available. If the user attached an image, use its
|
|
872
|
+
hosted chat-attachment URL or call `upload-image` to create one before
|
|
873
|
+
delegating. If no image/upload provider is configured, say that specific
|
|
874
|
+
setup is needed and continue any non-image Design work separately.
|
|
835
875
|
- **Write image prompts as art direction, not a one-line label.** Specify
|
|
836
876
|
subject, composition, lens/framing, lighting, and palette, and tie the
|
|
837
877
|
palette/mood back to the design's own `:root` tokens so the image reads as
|
|
@@ -847,6 +887,8 @@ tokened SVG/CSS, not photos.
|
|
|
847
887
|
Mismatched aspect ratios force ugly crops in the browser.
|
|
848
888
|
- **Always write real `alt` text** describing the image's content — never
|
|
849
889
|
leave `alt=""` on a meaningful (non-decorative) image.
|
|
850
|
-
- **Placement is a two-step pass**:
|
|
851
|
-
|
|
852
|
-
|
|
890
|
+
- **Placement is a two-step pass**: when the Assets picker returns a selected
|
|
891
|
+
asset, preserve its `assetId`, `runId`, and URLs verbatim; call `insert-asset`
|
|
892
|
+
to place the chosen image, then do one `edit-design` pass (using
|
|
893
|
+
`get-design-snapshot` first) to adjust surrounding layout/spacing if the
|
|
894
|
+
inserted figure doesn't sit flush with the rest of the design.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Code Layers — Deterministic Edits vs. Coding-Agent Handoff
|
|
2
|
+
|
|
3
|
+
Full mechanics for how selected-element edits get from a canvas selection to a
|
|
4
|
+
persisted change, for both inline HTML/Alpine designs and localhost React/TSX
|
|
5
|
+
screens. See the `design-generation` SKILL.md for when to reach for this vs.
|
|
6
|
+
`edit-design`/`generate-design`, and the `visual-edit` skill for the localhost
|
|
7
|
+
bridge itself.
|
|
8
|
+
|
|
9
|
+
## Reading layer structure
|
|
10
|
+
|
|
11
|
+
`get-code-layer-projection` reads inline HTML/JSX and returns selectable layer
|
|
12
|
+
nodes, selectors, names, and edit intents for agent and UI workflows. This is
|
|
13
|
+
the read side of the same model `apply-visual-edit` writes to.
|
|
14
|
+
|
|
15
|
+
## Inline HTML/Alpine — deterministic edits
|
|
16
|
+
|
|
17
|
+
`apply-visual-edit` supports deterministic local edits for HTML-backed code
|
|
18
|
+
layers: text, classes, styles, attributes, source order, and small structural
|
|
19
|
+
changes. Use it for selected-element edits before falling back to full
|
|
20
|
+
`update-design` / `generate-design` rewrites.
|
|
21
|
+
|
|
22
|
+
## Localhost React/TSX — narrow deterministic slice
|
|
23
|
+
|
|
24
|
+
`apply-visual-edit` also supports a narrow deterministic slice for localhost
|
|
25
|
+
JSX/TSX: single-instance leaf text, literal `className`/`class`, and flat
|
|
26
|
+
literal `style={{ ... }}` properties. Pass `source.kind: "local-file"`,
|
|
27
|
+
`designId`, `connectionId`, the verified project-relative `path`, and
|
|
28
|
+
`intent.target.sourceAnchor`. Call once without `persist` and inspect
|
|
29
|
+
`proposedDiff`; call again with `persist: true` only when it is exact. The
|
|
30
|
+
action reads the current bridge version and writes through `write-local-file`,
|
|
31
|
+
so human consent and compare-and-swap remain mandatory.
|
|
32
|
+
|
|
33
|
+
For localhost React/TSX screens, treat compiler/debug metadata
|
|
34
|
+
(project-relative source file, line, column, component, and runtime
|
|
35
|
+
multiplicity) as evidence for locating source, not as permission to run a
|
|
36
|
+
generic AST transform. Compiler tooling may verify an anchor, classify a
|
|
37
|
+
literal edit, and validate syntax. Reparenting, grouping/ungrouping,
|
|
38
|
+
wrappers, dynamic expressions, repeated `.map()` instances, shared
|
|
39
|
+
components, and cross-file changes must be handed to the coding agent with
|
|
40
|
+
both runtime relationships and exact source anchors so it can inspect the
|
|
41
|
+
surrounding program semantics.
|
|
42
|
+
|
|
43
|
+
### The coding-agent handoff contract
|
|
44
|
+
|
|
45
|
+
A localhost React handoff must:
|
|
46
|
+
|
|
47
|
+
1. Read each source file first.
|
|
48
|
+
2. Write with the exact returned `versionHash` as `expectedVersionHash` and
|
|
49
|
+
`requireExpectedVersionHash: true` — this is a compare-and-swap: the write
|
|
50
|
+
is rejected if the file changed since the read.
|
|
51
|
+
3. Re-read and re-plan on a version conflict rather than forcing the write.
|
|
52
|
+
4. Leave the optimistic canvas preview in place until the dev server/HMR
|
|
53
|
+
confirms the runtime result.
|
|
54
|
+
|
|
55
|
+
Never report a semantic canvas change as persisted merely because it was
|
|
56
|
+
submitted to the coding agent — persistence is confirmed by the dev
|
|
57
|
+
server/HMR picking up the change, not by the handoff call returning.
|
|
58
|
+
|
|
59
|
+
## Layer naming
|
|
60
|
+
|
|
61
|
+
Prefer `data-agent-native-layer-name="Readable name"` on meaningful elements.
|
|
62
|
+
The projection uses it before semantic/text fallbacks, and layer renames
|
|
63
|
+
should persist by updating that attribute. `data-code-layer-id` and similar
|
|
64
|
+
ids are for selection stability, not display naming.
|
|
65
|
+
|
|
66
|
+
## Node id stamping
|
|
67
|
+
|
|
68
|
+
For inline/Alpine screens, stamp and preserve unique
|
|
69
|
+
`data-agent-native-node-id` attributes on selectable DOM nodes. Treat
|
|
70
|
+
generated CSS selectors as a compatibility fallback only. For localhost React
|
|
71
|
+
screens, resolve through build-time source/debug metadata (stable generated
|
|
72
|
+
ids, component name, file, and line) before falling back to selectors.
|
|
73
|
+
|
|
74
|
+
## Summary of the split
|
|
75
|
+
|
|
76
|
+
- Inline/Alpine screens continue to use deterministic HTML code-layer edits.
|
|
77
|
+
- Localhost React/TSX screens use the semantic coding-agent handoff above;
|
|
78
|
+
deterministic direct React writes remain intentionally limited to the leaf
|
|
79
|
+
literal slice above and never include generic structural transforms,
|
|
80
|
+
breakpoint writes, dynamic expressions, repeated renders, shared component
|
|
81
|
+
definitions, generated/out-of-root paths, or remote URLs.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Code Workspace — VS Code-Style Workbench
|
|
2
|
+
|
|
3
|
+
The editor's left rail has a wide `code` panel: a VS Code-style workbench
|
|
4
|
+
(`app/components/design/code-workbench/`) with an explorer, workspace search,
|
|
5
|
+
editor tabs, quick open (⌘P), a command palette (⇧⌘P), and a status bar. Open
|
|
6
|
+
it with `navigate --view editor --designId <id> --leftPanel code` and
|
|
7
|
+
optionally pass `fileId`, `filename`, or `screen` to focus a file.
|
|
8
|
+
|
|
9
|
+
## Explorer roots
|
|
10
|
+
|
|
11
|
+
The explorer shows one root per workspace source:
|
|
12
|
+
|
|
13
|
+
- The design's SQL-backed files (`designfs://<designId>/`, backend
|
|
14
|
+
`virtual-inline`) — always present.
|
|
15
|
+
- One root per localhost connection referenced by the design's screens.
|
|
16
|
+
`list-local-files` / `read-local-file` proxy the `design connect` bridge;
|
|
17
|
+
writes go through `write-local-file` and its user-approved consent grant —
|
|
18
|
+
see the `visual-edit` skill for the full bridge/consent flow.
|
|
19
|
+
|
|
20
|
+
## Formatting
|
|
21
|
+
|
|
22
|
+
Inline design files are auto-formatted with Prettier the first time they are
|
|
23
|
+
opened in the workbench, and the formatted result is persisted. Local files
|
|
24
|
+
(the localhost root) are never auto-formatted.
|
|
25
|
+
|
|
26
|
+
## Inline source actions
|
|
27
|
+
|
|
28
|
+
- `list-source-files` inspects the inline source workspace; `read-source-file`
|
|
29
|
+
returns file contents. Preserve the returned `versionHash` before writing.
|
|
30
|
+
- Do not return full file content from `view-screen`; it reports only active
|
|
31
|
+
code file metadata and dirty state.
|
|
32
|
+
- `preview-source-edit` shows a diff without saving. `apply-source-edit` with
|
|
33
|
+
the prior `versionHash` saves either a full replace or an exact replace.
|
|
34
|
+
These update the same inline file state the UI uses — agent edits show up
|
|
35
|
+
live in open workbench buffers.
|
|
36
|
+
- `resolve-selection-source` finds the best matching inline file
|
|
37
|
+
location/snippet for the user's current canvas selection.
|
|
38
|
+
|
|
39
|
+
## Session state
|
|
40
|
+
|
|
41
|
+
The workbench session (open tabs, active file, sidebar layout) persists per
|
|
42
|
+
design in application state under `code-workbench:<designId>`.
|
package/corpus/templates/design/.agents/skills/design-generation/references/editor-extensions.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Design Editor Inspector Extensions
|
|
2
|
+
|
|
3
|
+
Design editor extensions render in the right inspector slot
|
|
4
|
+
`design.editor.inspector`. See the root `extension-points` skill for the
|
|
5
|
+
general slot mechanism (`window.slotContext`, `createExtension`,
|
|
6
|
+
`add-extension-slot-target`, `install-extension`); this file covers what's
|
|
7
|
+
specific to the Design inspector slot.
|
|
8
|
+
|
|
9
|
+
## Creating one
|
|
10
|
+
|
|
11
|
+
1. `create-extension`
|
|
12
|
+
2. `add-extension-slot-target` with slot id `design.editor.inspector`
|
|
13
|
+
3. `install-extension` so it appears inline in the inspector
|
|
14
|
+
|
|
15
|
+
If creating the extension opens the standalone extension editor, return to
|
|
16
|
+
the same design with `navigate` and `inspectorTab: "extensions"` after
|
|
17
|
+
installing it.
|
|
18
|
+
|
|
19
|
+
## Context shape
|
|
20
|
+
|
|
21
|
+
Extensions installed in this slot receive `window.slotContext` with the
|
|
22
|
+
current design id, active screen, selected element, zoom, mode, tool, and
|
|
23
|
+
tweak values.
|
|
24
|
+
|
|
25
|
+
## AI-driven style/artboard changes
|
|
26
|
+
|
|
27
|
+
For AI-driven style/artboard changes triggered from the extension UI,
|
|
28
|
+
extension HTML should call `agentNative.chat.send(...)` with the selected
|
|
29
|
+
element's selector/sourceId and the request. On the agent side:
|
|
30
|
+
|
|
31
|
+
1. Call `view-screen` first.
|
|
32
|
+
2. Prefer `apply-visual-edit` for element style/class/text changes.
|
|
33
|
+
3. Use `update-design` or `generate-design` with `canvasFrames` for overview
|
|
34
|
+
artboard placement changes.
|
|
@@ -35,7 +35,10 @@ scopes to `≤ 809px`). `breakpointUpperBoundPx` in
|
|
|
35
35
|
- `set-active-breakpoint` — persists the active edit scope to application
|
|
36
36
|
state (`design-active-breakpoint:<designId>`); the UI mirrors it in the
|
|
37
37
|
`design-selection` state (`activeBreakpointId`). Check the active
|
|
38
|
-
breakpoint via `view-screen` before making responsive-only edits.
|
|
38
|
+
breakpoint via `view-screen` before making responsive-only edits. Its
|
|
39
|
+
`editScope` is `cascade-smaller` by default (edits at this breakpoint also
|
|
40
|
+
apply to every narrower one); pass `only` when the user explicitly wants a
|
|
41
|
+
bounded, breakpoint-only override.
|
|
39
42
|
|
|
40
43
|
The UI's breakpoint bar (chips above the focused screen) and the overview's
|
|
41
44
|
side-by-side linked frames drive the same state — a chip click changes the
|
|
@@ -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
|
|
@@ -16,6 +16,15 @@ visually instead of generating standalone Alpine HTML. The source of truth is
|
|
|
16
16
|
the running localhost app plus its route URLs. Design shows those routes as
|
|
17
17
|
iframe-backed screens on the infinite canvas.
|
|
18
18
|
|
|
19
|
+
## Installing this skill for an external MCP host
|
|
20
|
+
|
|
21
|
+
The hosted install path
|
|
22
|
+
(`npx @agent-native/core@latest skills add visual-edit`, or `design` for the
|
|
23
|
+
full Design bundle) installs the exported instructions and registers the
|
|
24
|
+
hosted Design MCP connector together. The open Skills CLI path
|
|
25
|
+
(`npx skills@latest add BuilderIO/agent-native --skill visual-edit`) installs
|
|
26
|
+
exported instructions only, with no MCP connector registration.
|
|
27
|
+
|
|
19
28
|
## Core Model
|
|
20
29
|
|
|
21
30
|
- Each screen is a URL-backed iframe, not copied HTML.
|
|
@@ -227,6 +236,14 @@ the connected app's text/code files through the bridge
|
|
|
227
236
|
write-consent dialog (an 8-hour, folder-scoped grant) and retries
|
|
228
237
|
automatically once granted. Only text/code files are writable; secret paths
|
|
229
238
|
are always blocked.
|
|
239
|
+
- If the agent calls `write-local-file` directly (not through a UI save) and it
|
|
240
|
+
fails with "no write-consent grant", call `request-localhost-write-consent`.
|
|
241
|
+
It opens the write-consent dialog in the editor, or reports `alreadyGranted`
|
|
242
|
+
if one already exists. Granting is human-only —
|
|
243
|
+
`grant-localhost-write-consent` is hidden from agents, so you cannot approve
|
|
244
|
+
it yourself. Tell the user to click "Allow writes", then retry
|
|
245
|
+
`write-local-file` once. Do not keep retrying blindly: the write stays
|
|
246
|
+
blocked until the user approves.
|
|
230
247
|
- Saves are conflict-checked against the file's on-disk version — a file that
|
|
231
248
|
changed since it was read fails with a version conflict instead of being
|
|
232
249
|
overwritten.
|