@agent-native/core 0.149.1 → 0.149.3
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 +1 -1
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/analytics/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/analytics/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +2 -0
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/analytics/AGENTS.md +25 -32
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +150 -46
- package/corpus/templates/analytics/app/global.css +1 -1
- package/corpus/templates/analytics/app/i18n-data.ts +37 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -0
- package/corpus/templates/analytics/changelog/2026-08-10-dashboard-tables-can-be-copied-and-sorted-by-multiple-column.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/assets/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/assets/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/assets/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/assets/AGENTS.md +6 -9
- package/corpus/templates/assets/app/global.css +1 -1
- package/corpus/templates/assets/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/assets/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/brain/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/brain/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/brain/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/brain/AGENTS.md +5 -12
- package/corpus/templates/brain/app/global.css +1 -1
- package/corpus/templates/brain/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/brain/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/calendar/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/calendar/AGENTS.md +8 -9
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/chat/AGENTS.md +32 -80
- package/corpus/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/clips/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/clips/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/clips/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/clips/AGENTS.md +25 -31
- package/corpus/templates/clips/changelog/2026-08-10-clips-desktop-sign-in-now-starts-with-magic-links-and-google.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.css +1 -0
- package/corpus/templates/clips/desktop/src/app.tsx +274 -137
- package/corpus/templates/clips/desktop/src/styles.css +35 -0
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/content/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/content/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/content/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/content/AGENTS.md +5 -9
- package/corpus/templates/content/app/global.css +1 -0
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/crm/AGENTS.md +7 -11
- package/corpus/templates/crm/app/global.css +1 -1
- package/corpus/templates/crm/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/crm/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/design/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/design/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/design/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +70 -3
- package/corpus/templates/design/AGENTS.md +13 -21
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +12 -0
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +19 -2
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +115 -7
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +82 -7
- package/corpus/templates/design/app/components/design/design-trace.ts +120 -0
- package/corpus/templates/design/app/components/design/dnd-debug.ts +2 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +40 -26
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -1
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +12 -3
- package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +4 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +7 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +1 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +5 -5
- package/corpus/templates/design/app/pages/DesignSystems.tsx +3 -2
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +100 -13
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/data-operations.ts +14 -0
- package/corpus/templates/design/changelog/2026-08-10-marquee-selecting-layers-far-down-a-tall-screen-now-selects-.md +6 -0
- package/corpus/templates/design/changelog/2026-08-10-the-frame-tool-draws-a-plain-frame-by-default-with-screen-av.md +6 -0
- package/corpus/templates/design/e2e/global-setup.ts +27 -32
- package/corpus/templates/design/playwright.config.ts +3 -5
- package/corpus/templates/design/shared/breakpoint-media.ts +9 -2
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/dispatch/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/dispatch/AGENTS.md +9 -16
- package/corpus/templates/dispatch/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/factory/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/factory/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/factory/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/factory/AGENTS.md +10 -24
- package/corpus/templates/factory/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/forms/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/forms/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/forms/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/forms/AGENTS.md +11 -17
- package/corpus/templates/forms/app/global.css +1 -0
- package/corpus/templates/forms/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/forms/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/macros/AGENTS.md +8 -8
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/mail/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/mail/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/mail/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/mail/AGENTS.md +5 -6
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/plan/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/plan/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/plan/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/plan/AGENTS.md +5 -14
- package/corpus/templates/plan/app/global.css +1 -0
- package/corpus/templates/plan/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/plan/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
- package/corpus/templates/plan/server/ui-plan-html.ts +4 -1
- package/corpus/templates/plan/vite.config.ts +5 -0
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/slides/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/slides/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +2 -2
- package/corpus/templates/slides/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +6 -3
- package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +6 -1
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +3 -2
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -0
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/slides/AGENTS.md +33 -35
- package/corpus/templates/slides/actions/add-deck.ts +2 -0
- package/corpus/templates/slides/actions/add-slide.ts +15 -1
- package/corpus/templates/slides/actions/create-deck.ts +18 -6
- package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
- package/corpus/templates/slides/actions/get-deck.ts +83 -7
- package/corpus/templates/slides/actions/import-file.ts +2 -1
- package/corpus/templates/slides/actions/patch-deck.ts +165 -9
- package/corpus/templates/slides/actions/save-deck.ts +24 -1
- package/corpus/templates/slides/actions/update-slide.ts +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +2 -2
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -23
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -2
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +6 -6
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +3 -3
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +4 -4
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +432 -668
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +296 -259
- package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +13 -1
- package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +56 -174
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +241 -116
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +42 -14
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +6 -12
- package/corpus/templates/slides/app/components/editor/editor-command-model.ts +35 -0
- package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/Layout.tsx +34 -35
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +8 -10
- package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +2 -5
- package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +45 -40
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +63 -16
- package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
- package/corpus/templates/slides/app/global.css +76 -1
- package/corpus/templates/slides/app/hooks/use-generating-slide-preview.ts +25 -3
- package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +52 -23
- package/corpus/templates/slides/app/lib/recent-references.ts +23 -1
- package/corpus/templates/slides/app/lib/slide-animation-elements.ts +104 -3
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -33
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
- package/corpus/templates/slides/app/pages/Index.tsx +315 -151
- package/corpus/templates/slides/app/root.tsx +43 -0
- package/corpus/templates/slides/changelog/2026-08-10-ai-editing-avatar-badge.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-generated-decks-keep-a-clear-human-readable-title.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-new-deck-creation-now-shows-progress-opens-the-editor-direct.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-presentation-reveals-now-follow-valid-targets.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-editing-controls-are-consolidated-into-one-focused-me.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-now-verify-and-restyle-every-imported-slide-in-one-pa.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-only-suggests-a-google-connection-for-relevant-reques.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-the-google-slides-import-option-is-now-labeled-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-faster-slides-chat-deck-reads.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-chat-can-read-one-slide-without-loading-the-full-deck.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-clearly-indicate-when-an-ai-agent-is-editing-alongsid.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
- package/corpus/templates/slides/server/lib/validate-slide-animations.ts +163 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +8 -5
- package/corpus/templates/slides/shared/api.ts +47 -15
- package/corpus/templates/slides/shared/deck-title.ts +135 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/tasks/AGENTS.md +5 -20
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +4 -1
- package/dist/agent/engine/ai-sdk-engine.js +1 -1
- package/dist/agent/production-agent.d.ts +21 -1
- package/dist/agent/production-agent.js +505 -355
- package/dist/agent/run-manager.js +156 -14
- package/dist/agent/run-store.d.ts +11 -10
- package/dist/agent/run-store.js +17 -13
- package/dist/agent/tool-approval-store.d.ts +18 -0
- package/dist/agent/tool-approval-store.js +122 -0
- package/dist/agent/types.d.ts +1 -1
- package/dist/cli/code-agent-executor.js +11 -2
- package/dist/client/AgentPanel.js +31 -6
- package/dist/client/AssistantChat.d.ts +9 -4
- package/dist/client/AssistantChat.js +221 -149
- package/dist/client/active-run-state.d.ts +9 -1
- package/dist/client/active-run-state.js +34 -3
- package/dist/client/agent-chat/index.d.ts +1 -1
- package/dist/client/agent-chat-adapter.d.ts +8 -0
- package/dist/client/agent-chat-adapter.js +125 -28
- package/dist/client/agent-chat.d.ts +1 -1
- package/dist/client/chat/markdown-renderer.js +14 -2
- package/dist/client/chat/message-components.d.ts +13 -3
- package/dist/client/chat/message-components.js +57 -52
- package/dist/client/chat/run-recovery.d.ts +1 -0
- package/dist/client/chat/run-recovery.js +8 -0
- package/dist/client/chat/tool-call-display.d.ts +5 -5
- package/dist/client/chat/tool-call-display.js +9 -212
- package/dist/client/chat-first/apps-rail.js +3 -3
- package/dist/client/chat-first/browser-pane.js +4 -1
- package/dist/client/chat-first/chat-history.d.ts +3 -1
- package/dist/client/chat-first/chat-history.js +7 -4
- package/dist/client/chat-first/surface-tabs.d.ts +1 -1
- package/dist/client/chat-first/surface-tabs.js +52 -41
- package/dist/client/chat-first/types.d.ts +3 -0
- package/dist/client/chat-first.d.ts +10 -0
- package/dist/client/chat-first.js +37 -2
- package/dist/client/components/ui/message-scroller.js +4 -1
- package/dist/client/i18n.js +3 -1
- package/dist/client/resources/McpConnectionSuggestion.js +9 -1
- package/dist/client/sse-event-processor.d.ts +4 -2
- package/dist/client/sse-event-processor.js +46 -6
- package/dist/client/use-chat-models.js +156 -80
- package/dist/client/use-run-stuck-detection.d.ts +2 -0
- package/dist/client/use-run-stuck-detection.js +85 -9
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/integrations/adapters/slack.d.ts +0 -4
- package/dist/integrations/adapters/slack.js +6 -30
- package/dist/integrations/catalog.js +1 -1
- package/dist/integrations/pending-tasks-store.d.ts +0 -8
- package/dist/integrations/pending-tasks-store.js +0 -21
- package/dist/integrations/slack-manifest.d.ts +2 -2
- package/dist/integrations/slack-manifest.js +0 -3
- package/dist/integrations/webhook-handler.js +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/provider-api/actions/provider-api.d.ts +8 -8
- package/dist/scripts/docs/source-search.js +2 -2
- package/dist/server/agent-chat/framework-prompts.js +7 -2
- package/dist/server/agent-chat/prompt-resources.js +2 -2
- package/dist/server/agent-chat/skill-frontmatter.d.ts +31 -2
- package/dist/server/agent-chat/skill-frontmatter.js +41 -15
- package/dist/server/agent-chat-plugin.js +3 -3
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agents-bundle.d.ts +16 -19
- package/dist/server/agents-bundle.js +19 -35
- package/dist/server/auth.js +262 -31
- package/dist/server/better-auth-instance.d.ts +1 -0
- package/dist/server/better-auth-instance.js +17 -2
- package/dist/server/onboarding-html.js +56 -9
- package/dist/server/prompts/framework-core-compact.d.ts +6 -1
- package/dist/server/prompts/framework-core-compact.js +12 -9
- package/dist/server/prompts/framework-core.d.ts +6 -1
- package/dist/server/prompts/framework-core.js +11 -9
- package/dist/server/prompts/index.d.ts +1 -1
- package/dist/server/prompts/index.js +1 -1
- package/dist/server/prompts/shared-rules.d.ts +15 -11
- package/dist/server/prompts/shared-rules.js +17 -13
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/reasoning-effort.d.ts +8 -8
- package/dist/shared/reasoning-effort.js +10 -10
- package/dist/shared/streaming-text-smoothing.js +41 -11
- package/dist/styles/agent-native.css +19 -32
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/chat/AGENTS.md +32 -80
- package/dist/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/dist/templates/workspace-core/AGENTS.md +7 -16
- package/docs/content/messaging.mdx +6 -7
- package/docs/content/template-chat.mdx +1 -1
- package/package.json +2 -2
- package/src/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/chat/AGENTS.md +32 -80
- package/src/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/src/templates/workspace-core/AGENTS.md +7 -16
|
@@ -31,7 +31,12 @@ import {
|
|
|
31
31
|
sourceImportForDeck,
|
|
32
32
|
type SourceImportMetadata,
|
|
33
33
|
} from "../server/lib/source-import.js";
|
|
34
|
+
import { assertSlideAnimationsResolve } from "../server/lib/validate-slide-animations.js";
|
|
34
35
|
import { ASPECT_RATIO_VALUES } from "../shared/aspect-ratios.js";
|
|
36
|
+
import {
|
|
37
|
+
assertHumanReadableDeckTitle,
|
|
38
|
+
repairGeneratedDeckTitle,
|
|
39
|
+
} from "../shared/deck-title.js";
|
|
35
40
|
|
|
36
41
|
// ---------------------------------------------------------------------------
|
|
37
42
|
// Per-deck write lock — same pattern as add-slide.ts so all client and agent
|
|
@@ -66,6 +71,29 @@ export function withDeckLock<T>(
|
|
|
66
71
|
// Operation schemas
|
|
67
72
|
// ---------------------------------------------------------------------------
|
|
68
73
|
|
|
74
|
+
const SlideAnimationSchema = z.object({
|
|
75
|
+
id: z.string().min(1).describe("Stable ID for this ordered reveal step"),
|
|
76
|
+
elementIndex: z
|
|
77
|
+
.number()
|
|
78
|
+
.int()
|
|
79
|
+
.min(0)
|
|
80
|
+
.describe(
|
|
81
|
+
"0-based legacy child index. Keep it paired with elementPath for compatibility.",
|
|
82
|
+
),
|
|
83
|
+
elementPath: z
|
|
84
|
+
.array(z.number().int().min(0))
|
|
85
|
+
.min(1)
|
|
86
|
+
.optional()
|
|
87
|
+
.describe(
|
|
88
|
+
"Preferred 0-based child-index path from the outer .fmd-slide wrapper. Required for agent-created or content-revised animations; re-read final HTML after content edits.",
|
|
89
|
+
),
|
|
90
|
+
type: z
|
|
91
|
+
.enum(["appear", "fade", "slide-up", "zoom"])
|
|
92
|
+
.describe(
|
|
93
|
+
"Animation used when this step is revealed. Supported semantics: appear (immediate reveal), fade (opacity), slide-up (subtle upward motion), zoom (subtle scale). Do not invent other types.",
|
|
94
|
+
),
|
|
95
|
+
});
|
|
96
|
+
|
|
69
97
|
const SlideFieldsSchema = z.object({
|
|
70
98
|
content: z.string().optional(),
|
|
71
99
|
notes: z.string().optional(),
|
|
@@ -75,8 +103,16 @@ const SlideFieldsSchema = z.object({
|
|
|
75
103
|
imageLoading: z.boolean().optional(),
|
|
76
104
|
imagePrompt: z.string().optional(),
|
|
77
105
|
excalidrawData: z.string().optional(),
|
|
78
|
-
transition: z
|
|
79
|
-
|
|
106
|
+
transition: z
|
|
107
|
+
.enum(["instant", "none", "fade", "slide", "zoom"])
|
|
108
|
+
.optional()
|
|
109
|
+
.describe("Transition used when entering this slide"),
|
|
110
|
+
animations: z
|
|
111
|
+
.array(SlideAnimationSchema)
|
|
112
|
+
.optional()
|
|
113
|
+
.describe(
|
|
114
|
+
"Complete ordered on-click reveal list. Include every intended target in order; unlisted elements remain visible. Use elementPath from the final HTML and 0-based indexes.",
|
|
115
|
+
),
|
|
80
116
|
});
|
|
81
117
|
|
|
82
118
|
/** Update fields on a single existing slide */
|
|
@@ -171,11 +207,51 @@ export function assertSourceImportOperationsPreserved(
|
|
|
171
207
|
);
|
|
172
208
|
}
|
|
173
209
|
|
|
210
|
+
/**
|
|
211
|
+
* A deck-wide source restyle must be atomic from the agent's point of view:
|
|
212
|
+
* accepting a partial batch makes an apparently successful run indistinguishable
|
|
213
|
+
* from a run that quietly left the tail of the imported deck untouched.
|
|
214
|
+
*/
|
|
215
|
+
export function assertSourceImportSlidesCovered(
|
|
216
|
+
metadata: SourceImportMetadata | null,
|
|
217
|
+
operations: Operation[],
|
|
218
|
+
requireAllSourceSlides: boolean,
|
|
219
|
+
): void {
|
|
220
|
+
if (!metadata || !requireAllSourceSlides) return;
|
|
221
|
+
|
|
222
|
+
const sourceSlideIds =
|
|
223
|
+
Array.isArray(metadata.slideIds) && metadata.slideIds.length > 0
|
|
224
|
+
? metadata.slideIds
|
|
225
|
+
: metadata.slides.map((slide) => slide.id);
|
|
226
|
+
const patchedContentSlideIds = new Set(
|
|
227
|
+
operations.flatMap((operation) =>
|
|
228
|
+
operation.op === "patch-slide" && operation.fields.content !== undefined
|
|
229
|
+
? [operation.slideId]
|
|
230
|
+
: [],
|
|
231
|
+
),
|
|
232
|
+
);
|
|
233
|
+
const missingSlideIds = sourceSlideIds.filter(
|
|
234
|
+
(slideId) => !patchedContentSlideIds.has(slideId),
|
|
235
|
+
);
|
|
236
|
+
if (missingSlideIds.length === 0) return;
|
|
237
|
+
|
|
238
|
+
throw new Error(
|
|
239
|
+
`Deck-wide source restyle requires one content patch per imported slide. Missing ${missingSlideIds.length} slide(s): ${missingSlideIds.slice(0, 12).join(", ")}${missingSlideIds.length > 12 ? ", …" : ""}. Continue with every source slide ID in one patch-deck call before verifying with get-deck compact=true.`,
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
174
243
|
// The browser uses the full operation union above. Agents additionally use
|
|
175
244
|
// this action for one bounded, deck-wide layout repair: one patch-slide per
|
|
176
|
-
// slide in a single SQL transaction, followed by
|
|
245
|
+
// source slide in a single SQL transaction, followed by compact verification.
|
|
177
246
|
const AgentPatchDeckInputSchema = z.object({
|
|
178
247
|
deckId: z.string().describe("Deck ID"),
|
|
248
|
+
requireAllSourceSlides: z
|
|
249
|
+
.boolean()
|
|
250
|
+
.optional()
|
|
251
|
+
.default(false)
|
|
252
|
+
.describe(
|
|
253
|
+
"For a deck-wide source-import restyle, require one content patch for every imported slide before any write is committed.",
|
|
254
|
+
),
|
|
179
255
|
operations: z
|
|
180
256
|
.array(
|
|
181
257
|
z.union([
|
|
@@ -192,7 +268,7 @@ const AgentPatchDeckInputSchema = z.object({
|
|
|
192
268
|
)
|
|
193
269
|
.min(1)
|
|
194
270
|
.describe(
|
|
195
|
-
"
|
|
271
|
+
"For a deck-wide source restyle, include one patch-slide operation with content for every existing source slide. Use patch-deck-fields only for a deck title change.",
|
|
196
272
|
),
|
|
197
273
|
});
|
|
198
274
|
|
|
@@ -332,7 +408,19 @@ export function applyOperation(deck: any, op: Operation): void {
|
|
|
332
408
|
|
|
333
409
|
case "patch-deck-fields": {
|
|
334
410
|
const { fields } = op;
|
|
335
|
-
if (fields.title !== undefined)
|
|
411
|
+
if (fields.title !== undefined) {
|
|
412
|
+
const repairedTitle = repairGeneratedDeckTitle(
|
|
413
|
+
fields.title,
|
|
414
|
+
slides[0]?.content,
|
|
415
|
+
deck.title,
|
|
416
|
+
);
|
|
417
|
+
if (repairedTitle) {
|
|
418
|
+
deck.title = repairedTitle;
|
|
419
|
+
} else {
|
|
420
|
+
assertHumanReadableDeckTitle(fields.title);
|
|
421
|
+
deck.title = fields.title;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
336
424
|
if ("designSystemId" in fields)
|
|
337
425
|
deck.designSystemId = fields.designSystemId;
|
|
338
426
|
if (fields.tweaks !== undefined) deck.tweaks = fields.tweaks;
|
|
@@ -346,6 +434,43 @@ export function applyOperation(deck: any, op: Operation): void {
|
|
|
346
434
|
}
|
|
347
435
|
}
|
|
348
436
|
|
|
437
|
+
/**
|
|
438
|
+
* Content and animation metadata are one contract. Validate only slides whose
|
|
439
|
+
* content or animation list changed so unrelated note/title writes do not
|
|
440
|
+
* resurrect old metadata failures, while any edit that can stale a path is
|
|
441
|
+
* rejected before persistence.
|
|
442
|
+
*/
|
|
443
|
+
export function assertPatchedSlideAnimationsResolve(
|
|
444
|
+
deck: any,
|
|
445
|
+
operations: readonly Operation[],
|
|
446
|
+
options?: { requireElementPaths?: boolean },
|
|
447
|
+
): void {
|
|
448
|
+
const slideIdsToValidate = new Set(
|
|
449
|
+
operations.flatMap((operation) =>
|
|
450
|
+
operation.op === "patch-slide" &&
|
|
451
|
+
(operation.fields.content !== undefined ||
|
|
452
|
+
operation.fields.animations !== undefined)
|
|
453
|
+
? [operation.slideId]
|
|
454
|
+
: [],
|
|
455
|
+
),
|
|
456
|
+
);
|
|
457
|
+
if (slideIdsToValidate.size === 0) return;
|
|
458
|
+
|
|
459
|
+
const slides: any[] = Array.isArray(deck.slides) ? deck.slides : [];
|
|
460
|
+
for (const slideId of slideIdsToValidate) {
|
|
461
|
+
const slide = slides.find((candidate) => candidate?.id === slideId);
|
|
462
|
+
if (!slide || !Array.isArray(slide.animations) || !slide.animations.length)
|
|
463
|
+
continue;
|
|
464
|
+
|
|
465
|
+
assertSlideAnimationsResolve({
|
|
466
|
+
slideId,
|
|
467
|
+
content: typeof slide.content === "string" ? slide.content : "",
|
|
468
|
+
animations: slide.animations,
|
|
469
|
+
requireElementPaths: options?.requireElementPaths,
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
349
474
|
/**
|
|
350
475
|
* Resolve the last operation in a sequence. For example, when typing a new name
|
|
351
476
|
* this will be the latest name of the deck in a sequence of keystrokes.
|
|
@@ -353,6 +478,7 @@ export function applyOperation(deck: any, op: Operation): void {
|
|
|
353
478
|
export function resolveDeckColumnUpdates(
|
|
354
479
|
current: { title: string; designSystemId: string | null },
|
|
355
480
|
operations: Operation[],
|
|
481
|
+
resolvedTitle?: string,
|
|
356
482
|
): { title: string; designSystemId: string | null } {
|
|
357
483
|
const fieldOps = operations
|
|
358
484
|
.filter(
|
|
@@ -363,7 +489,7 @@ export function resolveDeckColumnUpdates(
|
|
|
363
489
|
const titleOp = fieldOps.find((op) => typeof op.fields.title === "string");
|
|
364
490
|
const dsOp = fieldOps.find((op) => "designSystemId" in op.fields);
|
|
365
491
|
return {
|
|
366
|
-
title: titleOp?.fields.title ?? current.title,
|
|
492
|
+
title: resolvedTitle ?? titleOp?.fields.title ?? current.title,
|
|
367
493
|
designSystemId: dsOp
|
|
368
494
|
? (dsOp.fields.designSystemId ?? null)
|
|
369
495
|
: current.designSystemId,
|
|
@@ -391,10 +517,22 @@ export default defineAction({
|
|
|
391
517
|
"Granular deck patch used by the browser editor for concurrent-safe writes. " +
|
|
392
518
|
"Each operation touches only the target slide or field — concurrent writers " +
|
|
393
519
|
"on different slides never overwrite each other's work. For a deck-wide " +
|
|
394
|
-
"
|
|
395
|
-
"
|
|
520
|
+
"source restyle, set requireAllSourceSlides=true and send one patch-slide " +
|
|
521
|
+
"operation with content for every imported slide in one call; the action " +
|
|
522
|
+
"rejects partial coverage. For animations, inspect the final slide HTML, " +
|
|
523
|
+
"then patch content and the complete ordered animations list together; " +
|
|
524
|
+
"validate every 0-based elementPath and do not invent one-based indexes. " +
|
|
525
|
+
"Then call get-deck with compact=true to verify the persisted slide IDs, " +
|
|
526
|
+
"count, and animation metadata before reporting success.",
|
|
396
527
|
schema: z.object({
|
|
397
528
|
deckId: z.string().describe("Deck ID"),
|
|
529
|
+
requireAllSourceSlides: z
|
|
530
|
+
.boolean()
|
|
531
|
+
.optional()
|
|
532
|
+
.default(false)
|
|
533
|
+
.describe(
|
|
534
|
+
"For a deck-wide source-import restyle, require one content patch for every imported slide before any write is committed.",
|
|
535
|
+
),
|
|
398
536
|
operations: z
|
|
399
537
|
.array(OperationSchema)
|
|
400
538
|
.min(1)
|
|
@@ -414,7 +552,10 @@ export default defineAction({
|
|
|
414
552
|
),
|
|
415
553
|
}),
|
|
416
554
|
agentInputSchema: AgentPatchDeckInputSchema,
|
|
417
|
-
run: async (
|
|
555
|
+
run: async (
|
|
556
|
+
{ deckId, operations, requireAllSourceSlides, creativeContext },
|
|
557
|
+
ctx,
|
|
558
|
+
) => {
|
|
418
559
|
await assertAccess("deck", deckId, "editor");
|
|
419
560
|
const isAgentCaller = isAgentPatchCaller(ctx?.caller);
|
|
420
561
|
|
|
@@ -450,6 +591,11 @@ export default defineAction({
|
|
|
450
591
|
const sourceImport = sourceImportForDeck(deck.sourceImport);
|
|
451
592
|
if (isAgentCaller) {
|
|
452
593
|
assertSourceImportOperationsPreserved(sourceImport, operations);
|
|
594
|
+
assertSourceImportSlidesCovered(
|
|
595
|
+
sourceImport,
|
|
596
|
+
operations,
|
|
597
|
+
requireAllSourceSlides,
|
|
598
|
+
);
|
|
453
599
|
}
|
|
454
600
|
for (const op of operations) {
|
|
455
601
|
if (
|
|
@@ -474,6 +620,9 @@ export default defineAction({
|
|
|
474
620
|
for (const op of operations) {
|
|
475
621
|
applyOperation(deck, op);
|
|
476
622
|
}
|
|
623
|
+
assertPatchedSlideAnimationsResolve(deck, operations, {
|
|
624
|
+
requireElementPaths: isAgentCaller,
|
|
625
|
+
});
|
|
477
626
|
|
|
478
627
|
const now = new Date().toISOString();
|
|
479
628
|
deck.updatedAt = now;
|
|
@@ -482,6 +631,13 @@ export default defineAction({
|
|
|
482
631
|
resolveDeckColumnUpdates(
|
|
483
632
|
{ title: row.title, designSystemId: row.designSystemId },
|
|
484
633
|
operations,
|
|
634
|
+
operations.some(
|
|
635
|
+
(operation) =>
|
|
636
|
+
operation.op === "patch-deck-fields" &&
|
|
637
|
+
operation.fields.title !== undefined,
|
|
638
|
+
) && typeof deck.title === "string"
|
|
639
|
+
? deck.title
|
|
640
|
+
: undefined,
|
|
485
641
|
);
|
|
486
642
|
|
|
487
643
|
let generationRecord:
|
|
@@ -19,6 +19,10 @@ import { z } from "zod";
|
|
|
19
19
|
import { getDb, schema } from "../server/db/index.js";
|
|
20
20
|
import { notifyClients } from "../server/handlers/decks.js";
|
|
21
21
|
import { createDeckVersionSnapshot } from "../server/lib/deck-versions.js";
|
|
22
|
+
import {
|
|
23
|
+
assertHumanReadableDeckTitle,
|
|
24
|
+
repairGeneratedDeckTitle,
|
|
25
|
+
} from "../shared/deck-title.js";
|
|
22
26
|
import {
|
|
23
27
|
assertDesignSystemReadable,
|
|
24
28
|
assertValidAspectRatio,
|
|
@@ -71,7 +75,7 @@ export default defineAction({
|
|
|
71
75
|
|
|
72
76
|
deck.id = deckId;
|
|
73
77
|
deck.updatedAt = now;
|
|
74
|
-
const
|
|
78
|
+
const requestedTitle = deckTitle(deck);
|
|
75
79
|
const nextDesignSystemId = deckDesignSystemId(deck);
|
|
76
80
|
|
|
77
81
|
// Resolve access first — this loads the row AND tells us the caller's
|
|
@@ -88,6 +92,11 @@ export default defineAction({
|
|
|
88
92
|
if (!ownerEmail) {
|
|
89
93
|
throw deckHttpError(403, "Sign in to create a deck");
|
|
90
94
|
}
|
|
95
|
+
const title =
|
|
96
|
+
repairGeneratedDeckTitle(requestedTitle, firstSlideContent(deck)) ??
|
|
97
|
+
requestedTitle;
|
|
98
|
+
assertHumanReadableDeckTitle(title);
|
|
99
|
+
deck.title = title;
|
|
91
100
|
await assertDesignSystemReadable(nextDesignSystemId);
|
|
92
101
|
try {
|
|
93
102
|
await db.insert(schema.decks).values({
|
|
@@ -110,6 +119,14 @@ export default defineAction({
|
|
|
110
119
|
access.role === "admin" ||
|
|
111
120
|
access.role === "editor"
|
|
112
121
|
) {
|
|
122
|
+
const title =
|
|
123
|
+
repairGeneratedDeckTitle(
|
|
124
|
+
requestedTitle,
|
|
125
|
+
firstSlideContent(deck),
|
|
126
|
+
access.resource.title,
|
|
127
|
+
) ?? requestedTitle;
|
|
128
|
+
assertHumanReadableDeckTitle(title);
|
|
129
|
+
deck.title = title;
|
|
113
130
|
await assertDesignSystemReadable(nextDesignSystemId);
|
|
114
131
|
if (shouldSnapshotDeckWrite(access.resource, title, deck)) {
|
|
115
132
|
await createDeckVersionSnapshot(
|
|
@@ -142,3 +159,9 @@ export default defineAction({
|
|
|
142
159
|
return deck;
|
|
143
160
|
}),
|
|
144
161
|
});
|
|
162
|
+
|
|
163
|
+
function firstSlideContent(deck: DeckPayload): string | null {
|
|
164
|
+
const slides = Array.isArray(deck.slides) ? deck.slides : [];
|
|
165
|
+
const content = slides[0] && (slides[0] as Record<string, unknown>).content;
|
|
166
|
+
return typeof content === "string" ? content : null;
|
|
167
|
+
}
|
|
@@ -364,7 +364,7 @@ export default defineAction({
|
|
|
364
364
|
if (rmw.notFound) {
|
|
365
365
|
return {
|
|
366
366
|
ok: false,
|
|
367
|
-
message: `Text not found in slide: "${find!.slice(0, 60)}". Use get-deck to see current slide
|
|
367
|
+
message: `Text not found in slide: "${find!.slice(0, 60)}". Use get-deck with compact=false to see the current slide HTML.`,
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
370
|
|
|
@@ -458,9 +458,9 @@ export function SlideCommentsPanel({
|
|
|
458
458
|
const showInput = pendingComment || addingComment;
|
|
459
459
|
|
|
460
460
|
return (
|
|
461
|
-
<div className="flex h-full w-[17rem] flex-shrink-0 flex-col
|
|
461
|
+
<div className="flex h-full w-[17rem] flex-shrink-0 flex-col bg-[var(--slides-editor-surface)]">
|
|
462
462
|
{/* Header */}
|
|
463
|
-
<div className="flex items-center justify-between px-4 py-3
|
|
463
|
+
<div className="flex flex-shrink-0 items-center justify-between px-4 py-3">
|
|
464
464
|
<span className="text-[13px] font-medium text-foreground/80">
|
|
465
465
|
{t("comments.title")}
|
|
466
466
|
</span>
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
IconTrash,
|
|
8
8
|
IconCopy,
|
|
9
9
|
IconPencil,
|
|
10
|
-
IconPalette,
|
|
11
10
|
IconPlus,
|
|
12
11
|
IconStar,
|
|
13
12
|
IconStarFilled,
|
|
@@ -33,7 +32,6 @@ interface DeckCardProps {
|
|
|
33
32
|
onRename: (id: string, newTitle: string) => void;
|
|
34
33
|
onDuplicate: (id: string) => void;
|
|
35
34
|
onToggleStar: (id: string, starred: boolean) => void;
|
|
36
|
-
designSystemTitle?: string | null;
|
|
37
35
|
isWorkspaceDefault?: boolean;
|
|
38
36
|
canSetWorkspaceDefault?: boolean;
|
|
39
37
|
onSetWorkspaceDefault?: (id: string, isDefault: boolean) => void;
|
|
@@ -45,7 +43,6 @@ export default function DeckCard({
|
|
|
45
43
|
onRename,
|
|
46
44
|
onDuplicate,
|
|
47
45
|
onToggleStar,
|
|
48
|
-
designSystemTitle,
|
|
49
46
|
isWorkspaceDefault = false,
|
|
50
47
|
canSetWorkspaceDefault = false,
|
|
51
48
|
onSetWorkspaceDefault,
|
|
@@ -101,7 +98,7 @@ export default function DeckCard({
|
|
|
101
98
|
<div className="group relative">
|
|
102
99
|
<Link
|
|
103
100
|
to={`/deck/${deck.id}`}
|
|
104
|
-
className="block rounded-xl border border-
|
|
101
|
+
className="block overflow-hidden rounded-xl border border-transparent bg-card transition-[background-color,border-color] duration-200 hover:border-border hover:bg-accent/30"
|
|
105
102
|
onClick={(e) => {
|
|
106
103
|
if (isRenaming) e.preventDefault();
|
|
107
104
|
}}
|
|
@@ -144,25 +141,6 @@ export default function DeckCard({
|
|
|
144
141
|
)}
|
|
145
142
|
<VisibilityBadge visibility={deck.visibility} />
|
|
146
143
|
</div>
|
|
147
|
-
<div className="mt-1 flex min-w-0 items-center gap-2 text-xs text-muted-foreground">
|
|
148
|
-
<span className="shrink-0 whitespace-nowrap">
|
|
149
|
-
{deck.slides.length} slide{deck.slides.length !== 1 ? "s" : ""}
|
|
150
|
-
</span>
|
|
151
|
-
{isWorkspaceDefault && (
|
|
152
|
-
<span className="inline-flex shrink-0 items-center gap-1 rounded border border-[#609FF8]/40 px-1.5 py-0.5 text-[10px] text-[#609FF8]">
|
|
153
|
-
<IconBuildingCommunity className="h-3 w-3 shrink-0" />
|
|
154
|
-
{t("home.workspaceDefaultBadge")}
|
|
155
|
-
</span>
|
|
156
|
-
)}
|
|
157
|
-
{deck.designSystemId && (
|
|
158
|
-
<span className="inline-flex min-w-0 max-w-full items-center gap-1 rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground/80">
|
|
159
|
-
<IconPalette className="h-3 w-3 shrink-0 text-[#609FF8]" />
|
|
160
|
-
<span className="max-w-28 truncate">
|
|
161
|
-
{designSystemTitle || "Design system"}
|
|
162
|
-
</span>
|
|
163
|
-
</span>
|
|
164
|
-
)}
|
|
165
|
-
</div>
|
|
166
144
|
</div>
|
|
167
145
|
</Link>
|
|
168
146
|
|
|
@@ -3,8 +3,8 @@ import { ShareButton } from "@agent-native/core/client/sharing";
|
|
|
3
3
|
import { VisibilityBadge } from "@agent-native/toolkit/sharing";
|
|
4
4
|
import {
|
|
5
5
|
IconBuildingCommunity,
|
|
6
|
+
IconComponents,
|
|
6
7
|
IconDots,
|
|
7
|
-
IconPalette,
|
|
8
8
|
IconStar,
|
|
9
9
|
IconStarFilled,
|
|
10
10
|
IconTrash,
|
|
@@ -190,7 +190,7 @@ export function DesignSystemCard({
|
|
|
190
190
|
{/* Info area */}
|
|
191
191
|
<div className="p-4 space-y-1.5">
|
|
192
192
|
<div className="flex items-center gap-2 min-w-0">
|
|
193
|
-
<
|
|
193
|
+
<IconComponents className="w-3.5 h-3.5 text-muted-foreground shrink-0" />
|
|
194
194
|
<h3
|
|
195
195
|
className="font-medium text-sm text-foreground truncate"
|
|
196
196
|
title={title}
|
|
@@ -8,7 +8,7 @@ import { openAgentSidebar } from "@agent-native/core/client/navigation";
|
|
|
8
8
|
import { withBuilderUtmTrackingParams } from "@agent-native/core/shared";
|
|
9
9
|
import {
|
|
10
10
|
IconWorld,
|
|
11
|
-
|
|
11
|
+
IconComponents,
|
|
12
12
|
IconLoader2,
|
|
13
13
|
IconBrandGithub,
|
|
14
14
|
IconBrandFigma,
|
|
@@ -721,7 +721,7 @@ export function DesignSystemSetup({
|
|
|
721
721
|
</div>
|
|
722
722
|
|
|
723
723
|
<SourceAccordionRow
|
|
724
|
-
icon={
|
|
724
|
+
icon={IconComponents}
|
|
725
725
|
title={t("designSystemSetup.otherSources")}
|
|
726
726
|
description={t("designSystemSetup.otherSourcesDescription")}
|
|
727
727
|
expanded={sourcePanel === "other"}
|
|
@@ -741,7 +741,7 @@ export function DesignSystemSetup({
|
|
|
741
741
|
<div className="divide-y divide-border">
|
|
742
742
|
<SourceAccordionRow
|
|
743
743
|
className="rounded-none border-0"
|
|
744
|
-
icon={
|
|
744
|
+
icon={IconComponents}
|
|
745
745
|
title={t("designSystemSetup.companyBrand")}
|
|
746
746
|
description={t(
|
|
747
747
|
"designSystemSetup.companyBrandPlaceholder",
|
|
@@ -771,7 +771,7 @@ export function DesignSystemSetup({
|
|
|
771
771
|
{existingSystems.length > 0 && (
|
|
772
772
|
<SourceAccordionRow
|
|
773
773
|
className="rounded-none border-0"
|
|
774
|
-
icon={
|
|
774
|
+
icon={IconComponents}
|
|
775
775
|
title={t("designSystemSetup.forkExisting")}
|
|
776
776
|
description={t(
|
|
777
777
|
"designSystemSetup.customInstructionsDescription",
|
|
@@ -1064,7 +1064,7 @@ export function DesignSystemSetup({
|
|
|
1064
1064
|
}`}
|
|
1065
1065
|
>
|
|
1066
1066
|
<div className="flex items-center gap-2">
|
|
1067
|
-
<
|
|
1067
|
+
<IconComponents className="w-3.5 h-3.5 text-muted-foreground" />
|
|
1068
1068
|
<span className="text-sm text-foreground/80 truncate">
|
|
1069
1069
|
{ds.title}
|
|
1070
1070
|
</span>
|
|
@@ -1276,7 +1276,7 @@ function BuilderSourceStatus({ builder }: { builder: BuilderSourceDetails }) {
|
|
|
1276
1276
|
? IconBrandGithub
|
|
1277
1277
|
: sourceKind === "code"
|
|
1278
1278
|
? IconFolder
|
|
1279
|
-
:
|
|
1279
|
+
: IconComponents;
|
|
1280
1280
|
const sourceTitle =
|
|
1281
1281
|
sourceKind === "figma"
|
|
1282
1282
|
? t("designSystemSetup.sourceFigma")
|
|
@@ -244,9 +244,9 @@ export function AnimationsPanel({
|
|
|
244
244
|
);
|
|
245
245
|
|
|
246
246
|
return (
|
|
247
|
-
<div className="
|
|
247
|
+
<div className="flex h-full w-60 flex-col bg-[var(--slides-editor-surface)]">
|
|
248
248
|
{/* Header */}
|
|
249
|
-
<div className="flex items-center justify-between px-3 py-2.5
|
|
249
|
+
<div className="flex items-center justify-between px-3 py-2.5">
|
|
250
250
|
<span className="text-xs font-medium text-foreground/90">
|
|
251
251
|
{t("animations.title")}
|
|
252
252
|
</span>
|
|
@@ -303,7 +303,7 @@ export function AnimationsPanel({
|
|
|
303
303
|
|
|
304
304
|
{/* Available elements to add */}
|
|
305
305
|
{availableElements.length > 0 && (
|
|
306
|
-
<div className="
|
|
306
|
+
<div className="px-2 py-2">
|
|
307
307
|
<div className="flex items-center justify-between mb-1.5 px-1">
|
|
308
308
|
<span className="text-[9px] font-medium text-muted-foreground/70 uppercase tracking-wider">
|
|
309
309
|
{t("animations.elements")}
|
|
@@ -3,12 +3,12 @@ import { Skeleton } from "@/components/ui/skeleton";
|
|
|
3
3
|
export function DeckEditorSkeleton({ label }: { label: string }) {
|
|
4
4
|
return (
|
|
5
5
|
<div
|
|
6
|
-
className="flex h-full min-h-0 flex-1 flex-col overflow-hidden bg-background"
|
|
6
|
+
className="deck-editor-shell flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-xl bg-background"
|
|
7
7
|
role="status"
|
|
8
8
|
aria-label={label}
|
|
9
9
|
data-testid="deck-editor-loading"
|
|
10
10
|
>
|
|
11
|
-
<div className="flex h-11 shrink-0 items-center gap-3
|
|
11
|
+
<div className="flex h-11 shrink-0 items-center gap-3 px-3">
|
|
12
12
|
<Skeleton className="size-8 rounded-md" />
|
|
13
13
|
<Skeleton className="h-5 w-36" />
|
|
14
14
|
<div className="ml-auto flex items-center gap-2">
|
|
@@ -18,7 +18,7 @@ export function DeckEditorSkeleton({ label }: { label: string }) {
|
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
<div className="flex min-h-0 flex-1">
|
|
21
|
-
<div className="hidden w-56 shrink-0 flex-col gap-4
|
|
21
|
+
<div className="hidden w-56 shrink-0 flex-col gap-4 p-4 sm:w-64 md:flex">
|
|
22
22
|
{[0, 1, 2].map((index) => (
|
|
23
23
|
<div key={index} className="flex gap-3">
|
|
24
24
|
<Skeleton className="h-4 w-4 shrink-0 rounded-sm" />
|
|
@@ -26,7 +26,7 @@ export function DeckEditorSkeleton({ label }: { label: string }) {
|
|
|
26
26
|
</div>
|
|
27
27
|
))}
|
|
28
28
|
</div>
|
|
29
|
-
<div className="flex min-w-0 flex-1 items-center justify-center bg-
|
|
29
|
+
<div className="flex min-w-0 flex-1 items-center justify-center bg-[var(--slides-editor-surface)] p-6">
|
|
30
30
|
<Skeleton className="aspect-video w-full max-w-4xl rounded-md shadow-sm" />
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
@@ -445,7 +445,7 @@ export default function EditorSidebar({
|
|
|
445
445
|
}, [slides, activeSlideId, onSelectSlide]);
|
|
446
446
|
|
|
447
447
|
return (
|
|
448
|
-
<div className="flex h-full min-h-0 w-48 flex-shrink-0 flex-col
|
|
448
|
+
<div className="flex h-full min-h-0 w-48 flex-shrink-0 flex-col bg-background sm:w-52">
|
|
449
449
|
<div
|
|
450
450
|
ref={thumbScrollRef}
|
|
451
451
|
className="relative min-h-0 flex-1 space-y-1 overflow-y-auto overscroll-contain p-2"
|