@agent-native/core 0.131.5 → 0.131.7
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 +3 -3
- package/corpus/core/CHANGELOG.md +70 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +13 -6
- package/corpus/core/docs/content/cloneable-saas.mdx +5 -5
- package/corpus/core/docs/content/creating-templates.mdx +9 -0
- package/corpus/core/docs/content/deployment.mdx +18 -12
- package/corpus/core/docs/content/doctor.mdx +8 -1
- package/corpus/core/docs/content/drop-in-agent.mdx +1 -1
- package/corpus/core/docs/content/extensions.mdx +18 -18
- package/corpus/core/docs/content/faq.mdx +4 -4
- package/corpus/core/docs/content/key-concepts.mdx +30 -21
- package/corpus/core/docs/content/security.mdx +2 -2
- package/corpus/core/docs/content/template-brain-developers.mdx +4 -1
- package/corpus/core/docs/content/template-mail-developers.mdx +4 -1
- package/corpus/core/docs/content/what-is-agent-native.mdx +6 -6
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +449 -66
- package/corpus/core/src/a2a/correlation.ts +31 -0
- package/corpus/core/src/a2a/invoke.ts +4 -2
- package/corpus/core/src/a2a/types.ts +4 -0
- package/corpus/core/src/action.ts +3 -0
- package/corpus/core/src/agent/action-continuation-guidance.ts +2 -1
- package/corpus/core/src/agent/engine/registry.ts +98 -6
- package/corpus/core/src/agent/production-agent.ts +151 -18
- package/corpus/core/src/agent/run-loop-with-resume.ts +190 -3
- package/corpus/core/src/agent/run-manager.ts +117 -41
- package/corpus/core/src/agent/thread-debug-history.ts +86 -0
- package/corpus/core/src/agent/types.ts +3 -1
- package/corpus/core/src/cli/create.ts +11 -1
- package/corpus/core/src/cli/templates-meta.ts +2 -2
- package/corpus/core/src/client/agent-chat-adapter.ts +91 -13
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/corpus/core/src/client/sse-event-processor.ts +17 -3
- package/corpus/core/src/db/client.ts +57 -17
- package/corpus/core/src/guards/no-env-credentials.ts +2 -0
- package/corpus/core/src/integrations/adapters/slack.ts +8 -3
- package/corpus/core/src/localization/default-messages.ts +44 -0
- package/corpus/core/src/observability/traces.ts +78 -5
- package/corpus/core/src/scripts/call-agent.ts +294 -11
- package/corpus/core/src/scripts/describe-workspace-apps.ts +2 -2
- package/corpus/core/src/secrets/crypto.ts +156 -35
- package/corpus/core/src/secrets/storage.ts +64 -26
- package/corpus/core/src/server/agent-capabilities.ts +1 -1
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +113 -7
- package/corpus/core/src/server/agent-chat/context-tools.ts +2 -0
- package/corpus/core/src/server/agent-chat/plugin-options.ts +34 -1
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +1 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +91 -59
- package/corpus/core/src/templates/default/.agents/skills/secrets/SKILL.md +19 -7
- package/corpus/core/src/templates/headless/.agents/skills/secrets/SKILL.md +19 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +19 -7
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-ops/SKILL.md +5 -4
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +6 -4
- package/corpus/templates/analytics/AGENTS.md +7 -4
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +4 -3
- package/corpus/templates/analytics/changelog/2026-07-30-delegated-analytics-questions-now-return-a-useful-current-me.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-30-scheduled-dashboard-emails-complete-every-panel-without-pool.md +6 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +28 -1
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +18 -11
- package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +4 -4
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +9 -5
- package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +6 -2
- package/corpus/templates/analytics/server/lib/dashboard-panel-source-resolver.ts +11 -4
- package/corpus/templates/analytics/server/lib/dashboard-report-render.ts +49 -31
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +16 -8
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +9 -3
- package/corpus/templates/analytics/server/lib/production-serverless-runtime.ts +11 -0
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +10 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/analytics/server/plugins/analytics-alert-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/dashboard-report-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/uptime-monitor-jobs.ts +1 -12
- package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +54 -6
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +20 -9
- package/corpus/templates/brain/.agents/skills/ingestion-and-connectors/SKILL.md +33 -1
- package/corpus/templates/brain/AGENTS.md +3 -1
- package/corpus/templates/brain/README.md +4 -1
- package/corpus/templates/brain/actions/_schemas.ts +30 -8
- package/corpus/templates/brain/actions/ask-brain.ts +124 -14
- package/corpus/templates/brain/actions/create-source.ts +18 -2
- package/corpus/templates/brain/actions/enqueue-captures-distillation.ts +8 -123
- package/corpus/templates/brain/actions/enqueue-distillation.ts +6 -127
- package/corpus/templates/brain/actions/import-capture.ts +17 -5
- package/corpus/templates/brain/actions/import-transcript.ts +17 -5
- package/corpus/templates/brain/actions/update-source.ts +25 -5
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/brain/changelog/2026-07-30-blessed-resources-can-feed-cited-company-answers.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-30-the-left-sidebar-no-longer-shows-a-blank-organization-placeh.md +6 -0
- package/corpus/templates/brain/server/lib/brain.ts +49 -19
- package/corpus/templates/brain/server/lib/distillation-queue.ts +147 -0
- package/corpus/templates/brain/server/lib/source-policy.ts +264 -0
- package/corpus/templates/brain/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/brain/server/routes/api/_agent-native/brain/ingest.post.ts +116 -19
- package/corpus/templates/clips/app/components/meetings/google-oauth-identity-notice.tsx +51 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-07-30-google-calendar-warning.md +6 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +72 -8
- package/corpus/templates/content/changelog/2026-07-30-the-slash-command-hint-now-stays-on-only-the-active-empty-li.md +6 -0
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +506 -11
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +148 -17
- package/corpus/templates/design/app/components/design/canvas-interactions/design-canvas-interactions.ts +357 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +7 -466
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +15 -311
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +19 -997
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +8 -1216
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +31 -38
- package/corpus/templates/design/package.json +0 -1
- package/corpus/templates/dispatch/AGENTS.md +8 -0
- package/corpus/templates/dispatch/DEVELOPING.md +29 -0
- package/corpus/templates/dispatch/actions/view-screen.ts +34 -2
- package/corpus/templates/dispatch/app/i18n-data.ts +457 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-delegated-dispatch-work-continues-reliably-in-the-background.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-find-failed-runs-across-apps.md +6 -0
- package/corpus/templates/dispatch/netlify.toml +3 -0
- package/corpus/templates/plan/actions/get-visual-plan.ts +10 -6
- package/corpus/templates/plan/actions/patch-visual-plan-source.ts +117 -1
- package/corpus/templates/plan/actions/update-visual-plan.ts +56 -14
- package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -1
- package/corpus/templates/plan/changelog/2026-07-30-plan-agents-recover-with-targeted-writes.md +6 -0
- package/corpus/templates/plan/shared/plan-content.ts +35 -0
- package/corpus/templates/slides/.agents/skills/analytics-data-for-decks/SKILL.md +8 -12
- package/corpus/templates/slides/AGENTS.md +4 -4
- package/corpus/templates/slides/actions/create-deck.ts +1 -1
- package/corpus/templates/slides/actions/duplicate-deck.ts +19 -4
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -10
- package/corpus/templates/slides/app/components/deck/MermaidRenderer.tsx +12 -1
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +30 -13
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +35 -0
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +63 -56
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +21 -76
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1110 -292
- package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +53 -0
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +235 -18
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +4 -1
- package/corpus/templates/slides/app/components/editor/canvas-interactions/index.ts +11 -0
- package/corpus/templates/slides/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +129 -0
- package/corpus/templates/slides/app/components/editor/selection-overlay-measurement.ts +70 -0
- package/corpus/templates/slides/app/components/editor/slide-object-interactions.ts +519 -65
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +36 -426
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +19 -458
- package/corpus/templates/slides/app/context/DeckContext.tsx +179 -72
- package/corpus/templates/slides/app/global.css +105 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +8 -0
- package/corpus/templates/slides/app/lib/deck-editor-loading.ts +26 -0
- package/corpus/templates/slides/app/lib/mermaid-blocks.ts +27 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +71 -38
- package/corpus/templates/slides/app/pages/Index.tsx +98 -41
- package/corpus/templates/slides/changelog/2026-07-30-deck-loading-no-longer-flashes-an-unavailable-message.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-duplicating-a-deck-from-the-deck-list-now-opens-the-copy-imm.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-layout-overflow-warning-is-readable-and-dismissible.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-new-decks-now-start-with-an-empty-slide-list-when-no-slides-.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-shared-canvas-annotations.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-objects-can-be-moved-as-a-group-copied-and-pasted-with.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-text-editing-and-object-controls-now-match-google-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-style-panel-now-scrolls-with-speaker-notes-open-shows-the-sl.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-top-toolbar-controls-now-use-consistent-sizing-with-undo-and.md +6 -0
- package/corpus/templates/slides/netlify.toml +3 -1
- package/corpus/templates/slides/package.json +0 -1
- package/corpus/templates/slides/server/lib/chat-attachments.ts +18 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/slides/vite.config.ts +0 -1
- package/corpus/toolkit/CHANGELOG.md +13 -0
- package/corpus/toolkit/README.md +19 -0
- package/corpus/toolkit/agent-native.eject.json +38 -0
- package/corpus/toolkit/package.json +29 -1
- package/corpus/toolkit/src/canvas-annotations/CanvasCommentPins.tsx +861 -0
- package/corpus/toolkit/src/canvas-annotations/DrawOverlay.tsx +1233 -0
- package/corpus/toolkit/src/canvas-annotations/index.ts +15 -0
- package/corpus/toolkit/src/canvas-annotations/types.ts +14 -0
- package/corpus/toolkit/src/canvas-interactions/canvas-interactions.ts +933 -0
- package/corpus/toolkit/src/canvas-interactions/index.ts +67 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input-utils.ts +311 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input.tsx +491 -0
- package/corpus/toolkit/src/design-tweaks/visual-style-controls.tsx +26 -171
- package/corpus/toolkit/src/index.ts +1 -0
- package/dist/a2a/client.d.ts +23 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +309 -44
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/correlation.d.ts +1 -0
- package/dist/a2a/correlation.d.ts.map +1 -1
- package/dist/a2a/correlation.js +27 -0
- package/dist/a2a/correlation.js.map +1 -1
- package/dist/a2a/invoke.d.ts.map +1 -1
- package/dist/a2a/invoke.js +4 -2
- package/dist/a2a/invoke.js.map +1 -1
- package/dist/a2a/types.d.ts +4 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +3 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/action-continuation-guidance.d.ts.map +1 -1
- package/dist/agent/action-continuation-guidance.js +2 -1
- package/dist/agent/action-continuation-guidance.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +82 -8
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts +40 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +113 -15
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +21 -0
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +163 -4
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts +16 -9
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +93 -42
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-debug-history.d.ts +10 -0
- package/dist/agent/thread-debug-history.d.ts.map +1 -0
- package/dist/agent/thread-debug-history.js +68 -0
- package/dist/agent/thread-debug-history.js.map +1 -0
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +6 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/templates-meta.js +2 -2
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +76 -13
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +1 -1
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +12 -3
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +48 -17
- package/dist/db/client.js.map +1 -1
- package/dist/guards/no-env-credentials.d.ts.map +1 -1
- package/dist/guards/no-env-credentials.js +2 -0
- package/dist/guards/no-env-credentials.js.map +1 -1
- package/dist/integrations/adapters/slack.js +7 -3
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/localization/default-messages.d.ts +43 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +43 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/observability/traces.d.ts +3 -1
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +73 -4
- package/dist/observability/traces.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +12 -12
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +237 -12
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/describe-workspace-apps.js +2 -2
- package/dist/scripts/describe-workspace-apps.js.map +1 -1
- package/dist/secrets/crypto.d.ts +36 -21
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +134 -33
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/storage.d.ts +6 -6
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +43 -26
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/agent-capabilities.js +1 -1
- package/dist/server/agent-capabilities.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +17 -3
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +94 -3
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
- package/dist/server/agent-chat/context-tools.js +2 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +23 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js +4 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat/prompt-resources.js +1 -1
- package/dist/server/agent-chat/prompt-resources.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +2 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +79 -56
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +19 -7
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +19 -7
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +19 -7
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +13 -6
- package/docs/content/cloneable-saas.mdx +5 -5
- package/docs/content/creating-templates.mdx +9 -0
- package/docs/content/deployment.mdx +18 -12
- package/docs/content/doctor.mdx +8 -1
- package/docs/content/drop-in-agent.mdx +1 -1
- package/docs/content/extensions.mdx +18 -18
- package/docs/content/faq.mdx +4 -4
- package/docs/content/key-concepts.mdx +30 -21
- package/docs/content/security.mdx +2 -2
- package/docs/content/template-brain-developers.mdx +4 -1
- package/docs/content/template-mail-developers.mdx +4 -1
- package/docs/content/what-is-agent-native.mdx +6 -6
- package/package.json +3 -3
- package/src/a2a/client.ts +449 -66
- package/src/a2a/correlation.ts +31 -0
- package/src/a2a/invoke.ts +4 -2
- package/src/a2a/types.ts +4 -0
- package/src/action.ts +3 -0
- package/src/agent/action-continuation-guidance.ts +2 -1
- package/src/agent/engine/registry.ts +98 -6
- package/src/agent/production-agent.ts +151 -18
- package/src/agent/run-loop-with-resume.ts +190 -3
- package/src/agent/run-manager.ts +117 -41
- package/src/agent/thread-debug-history.ts +86 -0
- package/src/agent/types.ts +3 -1
- package/src/cli/create.ts +11 -1
- package/src/cli/templates-meta.ts +2 -2
- package/src/client/agent-chat-adapter.ts +91 -13
- package/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/src/client/sse-event-processor.ts +17 -3
- package/src/db/client.ts +57 -17
- package/src/guards/no-env-credentials.ts +2 -0
- package/src/integrations/adapters/slack.ts +8 -3
- package/src/localization/default-messages.ts +44 -0
- package/src/observability/traces.ts +78 -5
- package/src/scripts/call-agent.ts +294 -11
- package/src/scripts/describe-workspace-apps.ts +2 -2
- package/src/secrets/crypto.ts +156 -35
- package/src/secrets/storage.ts +64 -26
- package/src/server/agent-capabilities.ts +1 -1
- package/src/server/agent-chat/action-filters-a2a.ts +113 -7
- package/src/server/agent-chat/context-tools.ts +2 -0
- package/src/server/agent-chat/plugin-options.ts +34 -1
- package/src/server/agent-chat/prompt-resources.ts +1 -1
- package/src/server/agent-chat-plugin.ts +91 -59
- package/src/templates/default/.agents/skills/secrets/SKILL.md +19 -7
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +19 -7
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +19 -7
- package/src/vite/client.ts +1 -0
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
import { useSession, callAction } from "@agent-native/core/client/hooks";
|
|
9
9
|
import { useT } from "@agent-native/core/client/i18n";
|
|
10
10
|
import { useOrg } from "@agent-native/core/client/org";
|
|
11
|
-
import type { PinpointProps } from "@agent-native/pinpoint/react";
|
|
12
11
|
import {
|
|
13
12
|
DndContext,
|
|
14
13
|
closestCenter,
|
|
@@ -24,21 +23,14 @@ import {
|
|
|
24
23
|
IconUsersGroup,
|
|
25
24
|
} from "@tabler/icons-react";
|
|
26
25
|
import { nanoid } from "nanoid";
|
|
27
|
-
import {
|
|
28
|
-
useState,
|
|
29
|
-
useCallback,
|
|
30
|
-
useRef,
|
|
31
|
-
useEffect,
|
|
32
|
-
lazy,
|
|
33
|
-
Suspense,
|
|
34
|
-
} from "react";
|
|
35
|
-
import type { ComponentType } from "react";
|
|
26
|
+
import { useState, useCallback, useRef, useEffect } from "react";
|
|
36
27
|
import { useParams, useSearchParams, useNavigate } from "react-router";
|
|
37
28
|
import { toast } from "sonner";
|
|
38
29
|
|
|
39
30
|
import { SlideCommentsPanel } from "@/components/comments/SlideCommentsPanel";
|
|
40
31
|
import { AnimationsPanel } from "@/components/editor/AnimationsPanel";
|
|
41
32
|
import AssetLibraryPanel from "@/components/editor/AssetLibraryPanel";
|
|
33
|
+
import { DeckEditorSkeleton } from "@/components/editor/DeckEditorSkeleton";
|
|
42
34
|
import EditorSidebar from "@/components/editor/EditorSidebar";
|
|
43
35
|
import EditorToolbar from "@/components/editor/EditorToolbar";
|
|
44
36
|
import GeneratingOverlay from "@/components/editor/GeneratingOverlay";
|
|
@@ -61,6 +53,10 @@ import {
|
|
|
61
53
|
type CommentThread,
|
|
62
54
|
} from "@/hooks/use-slide-comments";
|
|
63
55
|
import type { AspectRatio } from "@/lib/aspect-ratios";
|
|
56
|
+
import {
|
|
57
|
+
deckAccessCheckKey,
|
|
58
|
+
shouldShowDeckEditorSkeleton,
|
|
59
|
+
} from "@/lib/deck-editor-loading";
|
|
64
60
|
import { getPreset } from "@/lib/design-systems";
|
|
65
61
|
import { exportDeckToGoogleSlides } from "@/lib/export-google-slides-client";
|
|
66
62
|
import { exportDeckAsPdf } from "@/lib/export-pdf-client";
|
|
@@ -80,12 +76,6 @@ import { TAB_ID } from "@/lib/tab-id";
|
|
|
80
76
|
import { shouldActivateTextTool } from "@/lib/text-tool-shortcut";
|
|
81
77
|
import { shortcutLabel } from "@/lib/utils";
|
|
82
78
|
|
|
83
|
-
const Pinpoint = lazy<ComponentType<PinpointProps>>(() =>
|
|
84
|
-
import("@agent-native/pinpoint/react").then((m) => ({
|
|
85
|
-
default: m.Pinpoint as ComponentType<PinpointProps>,
|
|
86
|
-
})),
|
|
87
|
-
);
|
|
88
|
-
|
|
89
79
|
type EditorSidePanel = "style" | "comments" | null;
|
|
90
80
|
|
|
91
81
|
function MissingDeckAccessPane({
|
|
@@ -162,6 +152,7 @@ export default function DeckEditor() {
|
|
|
162
152
|
const {
|
|
163
153
|
getDeck,
|
|
164
154
|
reloadDecks,
|
|
155
|
+
reloadDecksWithStatus,
|
|
165
156
|
updateDeck,
|
|
166
157
|
updateSlide,
|
|
167
158
|
deleteSlide,
|
|
@@ -171,10 +162,8 @@ export default function DeckEditor() {
|
|
|
171
162
|
reorderSlides,
|
|
172
163
|
markDeckDirty,
|
|
173
164
|
undo,
|
|
174
|
-
redo,
|
|
175
|
-
canUndo,
|
|
176
|
-
canRedo,
|
|
177
165
|
loading,
|
|
166
|
+
loadError,
|
|
178
167
|
} = useDecks();
|
|
179
168
|
const [activeSlideId, setActiveSlideId] = useState<string | null>(null);
|
|
180
169
|
const { generating } = useAgentGenerating();
|
|
@@ -192,6 +181,9 @@ export default function DeckEditor() {
|
|
|
192
181
|
() => typeof window !== "undefined" && window.innerWidth >= 768,
|
|
193
182
|
);
|
|
194
183
|
const [retryingMissingDeck, setRetryingMissingDeck] = useState(false);
|
|
184
|
+
const [checkedDeckAccessKey, setCheckedDeckAccessKey] = useState<
|
|
185
|
+
string | null
|
|
186
|
+
>(null);
|
|
195
187
|
const {
|
|
196
188
|
data: org,
|
|
197
189
|
isLoading: orgLoading,
|
|
@@ -262,6 +254,7 @@ export default function DeckEditor() {
|
|
|
262
254
|
}, []);
|
|
263
255
|
|
|
264
256
|
const deck = getDeck(id || "");
|
|
257
|
+
const currentDeckAccessKey = deckAccessCheckKey(id, org?.orgId);
|
|
265
258
|
const hasTeamJoinOption =
|
|
266
259
|
!org?.orgId &&
|
|
267
260
|
((org?.pendingInvitations?.length ?? 0) > 0 ||
|
|
@@ -315,9 +308,44 @@ export default function DeckEditor() {
|
|
|
315
308
|
const showQuestionFlow = Boolean(questionFlowQuestions?.length);
|
|
316
309
|
|
|
317
310
|
useEffect(() => {
|
|
318
|
-
if (
|
|
319
|
-
|
|
320
|
-
|
|
311
|
+
if (
|
|
312
|
+
loading ||
|
|
313
|
+
deck ||
|
|
314
|
+
!id ||
|
|
315
|
+
!currentDeckAccessKey ||
|
|
316
|
+
orgLoading ||
|
|
317
|
+
checkedDeckAccessKey === currentDeckAccessKey
|
|
318
|
+
) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
if (!org?.orgId) {
|
|
323
|
+
setCheckedDeckAccessKey(currentDeckAccessKey);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
let cancelled = false;
|
|
328
|
+
void (async () => {
|
|
329
|
+
let status = await reloadDecksWithStatus();
|
|
330
|
+
while (!cancelled && status === "stale") {
|
|
331
|
+
status = await reloadDecksWithStatus();
|
|
332
|
+
}
|
|
333
|
+
if (!cancelled) setCheckedDeckAccessKey(currentDeckAccessKey);
|
|
334
|
+
})();
|
|
335
|
+
|
|
336
|
+
return () => {
|
|
337
|
+
cancelled = true;
|
|
338
|
+
};
|
|
339
|
+
}, [
|
|
340
|
+
checkedDeckAccessKey,
|
|
341
|
+
currentDeckAccessKey,
|
|
342
|
+
deck,
|
|
343
|
+
id,
|
|
344
|
+
loading,
|
|
345
|
+
org?.orgId,
|
|
346
|
+
orgLoading,
|
|
347
|
+
reloadDecksWithStatus,
|
|
348
|
+
]);
|
|
321
349
|
|
|
322
350
|
const retryOpenDeck = useCallback(async () => {
|
|
323
351
|
setRetryingMissingDeck(true);
|
|
@@ -826,13 +854,24 @@ export default function DeckEditor() {
|
|
|
826
854
|
(t) => !t.resolved,
|
|
827
855
|
).length;
|
|
828
856
|
|
|
829
|
-
if (
|
|
857
|
+
if (
|
|
858
|
+
shouldShowDeckEditorSkeleton({
|
|
859
|
+
deckFound: Boolean(deck),
|
|
860
|
+
decksLoading: loading,
|
|
861
|
+
orgLoading,
|
|
862
|
+
accessCheckKey: currentDeckAccessKey,
|
|
863
|
+
checkedAccessKey: checkedDeckAccessKey,
|
|
864
|
+
retrying: retryingMissingDeck,
|
|
865
|
+
})
|
|
866
|
+
) {
|
|
867
|
+
return <DeckEditorSkeleton label={t("deckEditor.lookingForDeck")} />;
|
|
868
|
+
}
|
|
830
869
|
if (!deck || !id) {
|
|
831
870
|
return (
|
|
832
871
|
<MissingDeckAccessPane
|
|
833
872
|
hasTeamJoinOption={hasTeamJoinOption}
|
|
834
873
|
orgLoading={orgLoading}
|
|
835
|
-
orgError={orgError}
|
|
874
|
+
orgError={orgError || loadError}
|
|
836
875
|
refreshing={retryingMissingDeck}
|
|
837
876
|
onRetry={() => void retryOpenDeck()}
|
|
838
877
|
onBack={() => navigate("/")}
|
|
@@ -898,10 +937,6 @@ export default function DeckEditor() {
|
|
|
898
937
|
historyOpen={historyOpen}
|
|
899
938
|
onShowHistory={() => setHistoryOpen(!historyOpen)}
|
|
900
939
|
historyButtonRef={historyButtonRef}
|
|
901
|
-
onUndo={undo}
|
|
902
|
-
onRedo={redo}
|
|
903
|
-
canUndo={canUndo}
|
|
904
|
-
canRedo={canRedo}
|
|
905
940
|
currentSlide={currentSlide}
|
|
906
941
|
onUpdateSlide={(updates) =>
|
|
907
942
|
currentSlide && updateSlide(id, currentSlide.id, updates)
|
|
@@ -1030,6 +1065,7 @@ export default function DeckEditor() {
|
|
|
1030
1065
|
deleteSlideWithUndo(id, slideId);
|
|
1031
1066
|
if (nextSlide) setActiveSlideId(nextSlide.id);
|
|
1032
1067
|
}}
|
|
1068
|
+
readOnly={!canEdit}
|
|
1033
1069
|
slidePresence={slidePresence}
|
|
1034
1070
|
recentEdits={deckRecentEdits}
|
|
1035
1071
|
aspectRatio={deck.aspectRatio}
|
|
@@ -1070,8 +1106,13 @@ export default function DeckEditor() {
|
|
|
1070
1106
|
slide={currentSlide}
|
|
1071
1107
|
deckId={id}
|
|
1072
1108
|
readOnly={!canEdit}
|
|
1073
|
-
onUpdateSlide={(updates, slideIdOverride) =>
|
|
1074
|
-
updateSlide(
|
|
1109
|
+
onUpdateSlide={(updates, slideIdOverride, options) =>
|
|
1110
|
+
updateSlide(
|
|
1111
|
+
id,
|
|
1112
|
+
slideIdOverride ?? currentSlide.id,
|
|
1113
|
+
updates,
|
|
1114
|
+
options,
|
|
1115
|
+
)
|
|
1075
1116
|
}
|
|
1076
1117
|
onInlineEditStart={() => markDeckDirty(id)}
|
|
1077
1118
|
onGenerateImage={() => setImageGenOpen(true)}
|
|
@@ -1171,14 +1212,6 @@ export default function DeckEditor() {
|
|
|
1171
1212
|
onClose={() => setTweaksOpen(false)}
|
|
1172
1213
|
/>
|
|
1173
1214
|
)}
|
|
1174
|
-
|
|
1175
|
-
<Suspense>
|
|
1176
|
-
<Pinpoint
|
|
1177
|
-
author={session?.email || "anonymous"}
|
|
1178
|
-
colorScheme="dark"
|
|
1179
|
-
compactPopup
|
|
1180
|
-
/>
|
|
1181
|
-
</Suspense>
|
|
1182
1215
|
</div>
|
|
1183
1216
|
|
|
1184
1217
|
{/* Hidden upload input */}
|
|
@@ -14,9 +14,10 @@ import {
|
|
|
14
14
|
IconStack2,
|
|
15
15
|
IconUserCircle,
|
|
16
16
|
} from "@tabler/icons-react";
|
|
17
|
+
import { nanoid } from "nanoid";
|
|
17
18
|
import { useState, useRef, useCallback, useEffect, useMemo } from "react";
|
|
18
19
|
import { flushSync } from "react-dom";
|
|
19
|
-
import { useNavigate, useSearchParams } from "react-router";
|
|
20
|
+
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
|
20
21
|
import { toast } from "sonner";
|
|
21
22
|
|
|
22
23
|
import DeckCard from "@/components/deck/DeckCard";
|
|
@@ -55,6 +56,13 @@ import { cn } from "@/lib/utils";
|
|
|
55
56
|
const NEW_DECK_DRAFT_SCOPE = "slides-new-deck";
|
|
56
57
|
const PENDING_PROMPT_KEY = "slides:pending-deck-prompt";
|
|
57
58
|
|
|
59
|
+
/** Router-state payload for recovering the new-deck prompt after a failed
|
|
60
|
+
* generation kickoff forces a navigate away from and back to this route. */
|
|
61
|
+
interface DeckGenerationRetryState {
|
|
62
|
+
retryPrompt?: string;
|
|
63
|
+
retryFiles?: UploadedFile[];
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
function savePromptForRetry(
|
|
59
67
|
prompt: string,
|
|
60
68
|
options: { persistAcrossSignIn?: boolean } = {},
|
|
@@ -195,6 +203,7 @@ export default function Index() {
|
|
|
195
203
|
const {
|
|
196
204
|
decks,
|
|
197
205
|
createDeck,
|
|
206
|
+
duplicateDeck,
|
|
198
207
|
ensureDeckPersisted,
|
|
199
208
|
deleteDeck,
|
|
200
209
|
updateDeck,
|
|
@@ -211,6 +220,7 @@ export default function Index() {
|
|
|
211
220
|
} = useWorkspaceDefaults();
|
|
212
221
|
const { session } = useSession();
|
|
213
222
|
const navigate = useNavigate();
|
|
223
|
+
const location = useLocation();
|
|
214
224
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
215
225
|
const [deckToDelete, setDeckToDelete] = useState<string | null>(null);
|
|
216
226
|
const [workspaceDefaultCandidate, setWorkspaceDefaultCandidate] =
|
|
@@ -235,8 +245,6 @@ export default function Index() {
|
|
|
235
245
|
const designSystemAutoRef = useRef(true);
|
|
236
246
|
const referenceDeckAutoRef = useRef(true);
|
|
237
247
|
const [showSignInDialog, setShowSignInDialog] = useState(false);
|
|
238
|
-
const [duplicating, setDuplicating] = useState<string | null>(null);
|
|
239
|
-
const duplicatingRef = useRef<string | null>(null);
|
|
240
248
|
const { generating, submit: agentSubmit } = useAgentGenerating();
|
|
241
249
|
const anchorElRef = useRef<HTMLElement | null>(null);
|
|
242
250
|
const anchorRef = useRef<HTMLElement | null>(null);
|
|
@@ -398,6 +406,25 @@ export default function Index() {
|
|
|
398
406
|
setShowNewDeckPrompt(true);
|
|
399
407
|
}, [initialDesignSystemId, workspaceReferenceDeckId, session]);
|
|
400
408
|
|
|
409
|
+
// Recovering from a failed deck-generation kickoff (see
|
|
410
|
+
// recoverFromGenerationSetupFailure below) navigates back to this route
|
|
411
|
+
// from an Index instance that already unmounted, so that instance's own
|
|
412
|
+
// setShowNewDeckPrompt/setNewDeckInitialPrompt calls landed on a dead
|
|
413
|
+
// component and did nothing. Carry the retry payload through router state
|
|
414
|
+
// instead and restore it here, on the freshly mounted instance.
|
|
415
|
+
useEffect(() => {
|
|
416
|
+
const state = location.state as DeckGenerationRetryState | null;
|
|
417
|
+
if (!state?.retryPrompt) return;
|
|
418
|
+
if (savePromptToComposerDraft(NEW_DECK_DRAFT_SCOPE, state.retryPrompt)) {
|
|
419
|
+
setNewDeckInitialPrompt(null);
|
|
420
|
+
} else {
|
|
421
|
+
setNewDeckInitialPrompt({ text: state.retryPrompt, key: Date.now() });
|
|
422
|
+
}
|
|
423
|
+
setNewDeckRetryFiles(state.retryFiles ?? []);
|
|
424
|
+
setShowNewDeckPrompt(true);
|
|
425
|
+
navigate(".", { replace: true, state: null });
|
|
426
|
+
}, [location.state, navigate]);
|
|
427
|
+
|
|
401
428
|
const handleCreateDeckBlank = () => {
|
|
402
429
|
const selectedDesignSystem =
|
|
403
430
|
selectedDesignSystemId && selectedDesignSystemId !== "none"
|
|
@@ -443,6 +470,7 @@ export default function Index() {
|
|
|
443
470
|
});
|
|
444
471
|
});
|
|
445
472
|
if (!deck) return;
|
|
473
|
+
const deckId = deck.id;
|
|
446
474
|
setNewDeckPromptOpen(false);
|
|
447
475
|
|
|
448
476
|
const persisted = await ensureDeckPersisted(deck.id);
|
|
@@ -451,7 +479,7 @@ export default function Index() {
|
|
|
451
479
|
setNewDeckInitialPrompt({ text: prompt, key: Date.now() });
|
|
452
480
|
}
|
|
453
481
|
setNewDeckRetryFiles(filesForGeneration);
|
|
454
|
-
deleteDeck(
|
|
482
|
+
deleteDeck(deckId);
|
|
455
483
|
toast.error(t("home.generationStartFailed"), {
|
|
456
484
|
description: t("home.generationStartFailedDescription"),
|
|
457
485
|
});
|
|
@@ -464,25 +492,51 @@ export default function Index() {
|
|
|
464
492
|
setNewDeckRetryFiles([]);
|
|
465
493
|
navigate(`/deck/${deck.id}`, { flushSync: true });
|
|
466
494
|
|
|
467
|
-
//
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
495
|
+
// The deck now exists server-side and the user is looking at it, so a
|
|
496
|
+
// failure past this point (e.g. askUserQuestion rejecting on an
|
|
497
|
+
// application-state write error) must undo the navigation and restore
|
|
498
|
+
// the prompt instead of stranding the user on a permanently empty deck.
|
|
499
|
+
const recoverFromGenerationSetupFailure = () => {
|
|
500
|
+
deleteDeck(deckId);
|
|
501
|
+
toast.error(t("home.generationStartFailed"), {
|
|
502
|
+
description: t("home.generationStartFailedDescription"),
|
|
503
|
+
});
|
|
504
|
+
// This Index instance is about to unmount (we already navigated away
|
|
505
|
+
// to the deck page above), so state setters here would land on a dead
|
|
506
|
+
// component. Hand the retry payload to the next Index mount via router
|
|
507
|
+
// state instead; the effect above restores it.
|
|
508
|
+
const retryState: DeckGenerationRetryState = {
|
|
509
|
+
retryPrompt: prompt,
|
|
510
|
+
retryFiles: filesForGeneration,
|
|
511
|
+
};
|
|
512
|
+
navigate("/", { state: retryState });
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
let deckLength: Awaited<ReturnType<typeof askUserQuestion>> = null;
|
|
516
|
+
try {
|
|
517
|
+
// One quick, skippable decision so the agent doesn't guess the deck size.
|
|
518
|
+
deckLength = await askUserQuestion({
|
|
519
|
+
question: t("home.deckLengthQuestion"),
|
|
520
|
+
header: t("home.deckLengthHeader"),
|
|
521
|
+
options: [
|
|
522
|
+
{ label: t("home.deckLengthShort"), value: "3–5 slides" },
|
|
523
|
+
{
|
|
524
|
+
label: t("home.deckLengthMedium"),
|
|
525
|
+
value: "6–10 slides",
|
|
526
|
+
recommended: true,
|
|
527
|
+
},
|
|
528
|
+
{ label: t("home.deckLengthLong"), value: "11+ slides" },
|
|
529
|
+
{
|
|
530
|
+
label: t("home.deckLengthSingleVisual"),
|
|
531
|
+
value: "a single standalone visual slide",
|
|
532
|
+
},
|
|
533
|
+
],
|
|
534
|
+
allowFreeText: false,
|
|
535
|
+
});
|
|
536
|
+
} catch {
|
|
537
|
+
recoverFromGenerationSetupFailure();
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
486
540
|
const deckLengthContext =
|
|
487
541
|
typeof deckLength === "string" && deckLength
|
|
488
542
|
? `Target length: aim for ${deckLength} unless the user's request clearly specifies a different count.`
|
|
@@ -495,7 +549,7 @@ export default function Index() {
|
|
|
495
549
|
: extractGoogleDocUrls(trimmedPrompt);
|
|
496
550
|
const fileContext = describeUploadedFilesForAgent(
|
|
497
551
|
filesForGeneration,
|
|
498
|
-
|
|
552
|
+
deckId,
|
|
499
553
|
);
|
|
500
554
|
const googleDocContext =
|
|
501
555
|
googleDocUrls.length > 0
|
|
@@ -532,7 +586,7 @@ export default function Index() {
|
|
|
532
586
|
].join("\n");
|
|
533
587
|
|
|
534
588
|
const context = [
|
|
535
|
-
`The user just created a new empty deck (id: "${
|
|
589
|
+
`The user just created a new empty deck (id: "${deckId}") and wants to create a presentation or standalone visual.`,
|
|
536
590
|
"The visible user message above contains the user's request and/or pasted source material for the deck. Treat pasted memo content as source material even if the user did not explicitly say they are pasting it.",
|
|
537
591
|
googleDocContext,
|
|
538
592
|
fileContext,
|
|
@@ -542,11 +596,11 @@ export default function Index() {
|
|
|
542
596
|
deckLengthContext,
|
|
543
597
|
"Start a `manage-progress` run so progress appears in the app header. Add the first slide as soon as it is ready, then continue one slide at a time so the editor visibly fills in.",
|
|
544
598
|
"After reading any requested or imported source material, but before adding the first slide, choose a concise, specific deck title from the user's request and source material. Call `patch-deck` with `deckId: \"" +
|
|
545
|
-
|
|
599
|
+
deckId +
|
|
546
600
|
'"` and `operations: [{ "op": "patch-deck-fields", "fields": { "title": "<generated title>" } }]`. Never leave a generated deck named "Untitled Deck" or another placeholder.',
|
|
547
601
|
"If the user asks for a standalone visual, diagram, hero, one-pager, poster, or a couple of visuals, create only the requested one/few polished visual slides. Do not pad the result into a full presentation.",
|
|
548
602
|
"Add slides ONE AT A TIME using the `add-slide` action with --deckId=" +
|
|
549
|
-
|
|
603
|
+
deckId +
|
|
550
604
|
". Wait for each `add-slide` result before calling it again; do not batch or parallelize slide writes.",
|
|
551
605
|
"If the user asked for a specific slide count, keep going sequentially until that count is reached unless a tool error blocks you.",
|
|
552
606
|
"Every slide is rendered into a fixed native canvas (default 16:9 is 960x540 CSS pixels). Keep each slide within the density limits in AGENTS.md; split dense source material across more slides instead of packing it tightly.",
|
|
@@ -654,22 +708,26 @@ export default function Index() {
|
|
|
654
708
|
void applyWorkspaceDefaultDeck(deck);
|
|
655
709
|
}, [workspaceDefaultCandidate, applyWorkspaceDefaultDeck]);
|
|
656
710
|
|
|
711
|
+
// Navigating on the action's response raced the deck list: the editor reads
|
|
712
|
+
// the copy out of `useDecks()`, which had not seen the new row yet, so the
|
|
713
|
+
// route rendered "Deck unavailable". Insert the optimistic copy locally
|
|
714
|
+
// first (the same path the editor's own Duplicate uses) and navigate to
|
|
715
|
+
// that; the background action reconciles or rolls the copy back.
|
|
657
716
|
const handleDuplicate = useCallback(
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
duplicatingRef.current = null;
|
|
669
|
-
setDuplicating(null);
|
|
717
|
+
(id: string) => {
|
|
718
|
+
let copy: ReturnType<typeof duplicateDeck> | undefined;
|
|
719
|
+
flushSync(() => {
|
|
720
|
+
copy = duplicateDeck(id, `deck-${nanoid()}`);
|
|
721
|
+
});
|
|
722
|
+
// The context refuses a second copy of the same deck while the first
|
|
723
|
+
// one's action is still in flight.
|
|
724
|
+
if (!copy) {
|
|
725
|
+
toast.error(t("home.duplicateFailed"));
|
|
726
|
+
return;
|
|
670
727
|
}
|
|
728
|
+
navigate(`/deck/${copy.id}`);
|
|
671
729
|
},
|
|
672
|
-
[navigate],
|
|
730
|
+
[duplicateDeck, navigate, t],
|
|
673
731
|
);
|
|
674
732
|
|
|
675
733
|
useSetPageTitle(t("home.decksTitle"));
|
|
@@ -800,7 +858,6 @@ export default function Index() {
|
|
|
800
858
|
onRename={handleRename}
|
|
801
859
|
onDuplicate={handleDuplicate}
|
|
802
860
|
onToggleStar={handleToggleStar}
|
|
803
|
-
isDuplicating={duplicating === deck.id}
|
|
804
861
|
designSystemTitle={
|
|
805
862
|
deck.designSystemId
|
|
806
863
|
? designSystemTitleById.get(deck.designSystemId)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
[build]
|
|
2
2
|
ignore = "node ./scripts/netlify-ignore-build.mjs slides"
|
|
3
|
-
|
|
3
|
+
# Rebuild Core explicitly so a cached Netlify install cannot bundle an older
|
|
4
|
+
# agent loop or A2A handler into Slides' server functions.
|
|
5
|
+
command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && pnpm --filter @agent-native/core build && NITRO_PRESET=netlify pnpm --filter slides build"
|
|
4
6
|
publish = "templates/slides/dist"
|
|
5
7
|
functions = "templates/slides/.netlify/functions-internal"
|
|
6
8
|
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@agent-native/core": "workspace:*",
|
|
18
18
|
"@agent-native/creative-context": "workspace:*",
|
|
19
|
-
"@agent-native/pinpoint": "workspace:*",
|
|
20
19
|
"@agent-native/toolkit": "workspace:*",
|
|
21
20
|
"@dnd-kit/core": "^6.3.1",
|
|
22
21
|
"@dnd-kit/sortable": "^10.0.0",
|
|
@@ -96,6 +96,17 @@ export async function prepareSlidesChatAttachments(args: {
|
|
|
96
96
|
const failureList = failed
|
|
97
97
|
.map((file) => `- ${file.name}: ${file.reason}`)
|
|
98
98
|
.join("\n");
|
|
99
|
+
// saveUploadedReferenceFile() saves the file either way but swallows the
|
|
100
|
+
// public-URL upload failure (missing/misbehaving file-upload provider) so
|
|
101
|
+
// the private path is never blocked. Without this callout the agent has no
|
|
102
|
+
// signal that embedding is impossible and silently drops the image from
|
|
103
|
+
// the deck instead of telling the user why.
|
|
104
|
+
const unembeddableImages = uploaded.filter(
|
|
105
|
+
(file) => !file.url && file.type.startsWith("image/"),
|
|
106
|
+
);
|
|
107
|
+
const unembeddableImageList = unembeddableImages
|
|
108
|
+
.map((file) => `- ${file.originalName}`)
|
|
109
|
+
.join("\n");
|
|
99
110
|
const attachmentContext = [
|
|
100
111
|
"<slides-chat-attachments>",
|
|
101
112
|
uploaded.length > 0
|
|
@@ -113,6 +124,13 @@ export async function prepareSlidesChatAttachments(args: {
|
|
|
113
124
|
"- Do not say no PDF/PPTX/DOCX/FIG/image was attached when a matching saved path is listed here.",
|
|
114
125
|
].join("\n")
|
|
115
126
|
: "",
|
|
127
|
+
unembeddableImages.length > 0
|
|
128
|
+
? [
|
|
129
|
+
"The following attached image(s) have NO embeddable URL — the file-upload provider that hosts public image URLs failed or is not configured, so they were only saved to private import storage and CANNOT be embedded as `<img>` in slide HTML:",
|
|
130
|
+
unembeddableImageList,
|
|
131
|
+
"Do not silently skip these images. Tell the user the image(s) could not be added to the deck because no public file-upload provider is available, and that connecting Builder.io (or another file provider) in Settings will enable embedding.",
|
|
132
|
+
].join("\n")
|
|
133
|
+
: "",
|
|
116
134
|
failed.length > 0
|
|
117
135
|
? [
|
|
118
136
|
"Some attached file(s) could not be saved to Slides upload storage:",
|
|
@@ -36,6 +36,11 @@ export default createAgentChatPlugin({
|
|
|
36
36
|
initialToolNames: INITIAL_TOOL_NAMES,
|
|
37
37
|
durableBackgroundRuns: true,
|
|
38
38
|
runSoftTimeoutMs: SLIDES_BACKGROUND_RUN_SOFT_TIMEOUT_MS,
|
|
39
|
+
a2aAgentDelegation: true,
|
|
40
|
+
// Customer and product activity data belongs to Analytics. Keep raw DB
|
|
41
|
+
// tools out of both the interactive and A2A Slides agent surfaces so the
|
|
42
|
+
// agent cannot bypass the Analytics data dictionary with local SQL.
|
|
43
|
+
databaseTools: "off",
|
|
39
44
|
// Enable sandboxed JavaScript execution so Slides agents can fetch,
|
|
40
45
|
// paginate, and reduce provider data through providerFetch() without us
|
|
41
46
|
// hardcoding one action per Google Drive endpoint.
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @agent-native/toolkit
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c0e7d64: Add reusable canvas drawing, text annotation, and pinned agent-comment controls.
|
|
8
|
+
- c0e7d64: Add a reusable canvas interaction controller for text activation, shortcuts, moving, resizing, duplication, and gesture lifecycle.
|
|
9
|
+
|
|
10
|
+
## 0.11.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- cc35067: Fix `VisualInspectorPanel` clipping its own scroll area instead of scrolling. The panel body was capped by a viewport-derived `max-height`, so when a host laid the panel out shorter than the viewport — for example a style dock sharing vertical space with an expanded notes panel — overflowing content was hidden by the panel's `overflow-hidden` with no way to reach it. The body now flexes within the panel's actual height and keeps the cap as an upper bound.
|
|
15
|
+
|
|
3
16
|
## 0.11.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/corpus/toolkit/README.md
CHANGED
|
@@ -39,6 +39,14 @@ import {
|
|
|
39
39
|
StatsCard,
|
|
40
40
|
buildDashboardPanelGroups,
|
|
41
41
|
} from "@agent-native/toolkit/dashboard";
|
|
42
|
+
import {
|
|
43
|
+
CanvasCommentPins,
|
|
44
|
+
DrawOverlay,
|
|
45
|
+
} from "@agent-native/toolkit/canvas-annotations";
|
|
46
|
+
import {
|
|
47
|
+
createCanvasGestureController,
|
|
48
|
+
createCanvasInteractionCore,
|
|
49
|
+
} from "@agent-native/toolkit/canvas-interactions";
|
|
42
50
|
import { VisualTweakControl } from "@agent-native/toolkit/design-tweaks";
|
|
43
51
|
import { SharedRichEditor } from "@agent-native/toolkit/editor";
|
|
44
52
|
import { VisibilityBadge } from "@agent-native/toolkit/sharing";
|
|
@@ -56,6 +64,17 @@ source scanning. If an app renders `SharedRichEditor`, also import
|
|
|
56
64
|
`@agent-native/toolkit/editor.css`. If an app renders `ChatHistoryList` or
|
|
57
65
|
`ChatHistoryRail`, also import `@agent-native/toolkit/chat-history.css`.
|
|
58
66
|
|
|
67
|
+
`DrawOverlay` backs the Design and Slides drawing tools. `CanvasCommentPins`
|
|
68
|
+
provides lightweight, transient pins that send canvas context to an agent.
|
|
69
|
+
Translation, agent-chat routing, document context, and storage-backed review
|
|
70
|
+
threads stay with the app.
|
|
71
|
+
|
|
72
|
+
`createCanvasGestureController` provides a headless move and resize state
|
|
73
|
+
machine with zoom conversion, modifier policies, previews, cancellation, and a
|
|
74
|
+
single commit boundary. Apps provide adapters for selection, rendering, and
|
|
75
|
+
persistence. `createCanvasInteractionCore` exposes the same shared geometry,
|
|
76
|
+
text-activation, Escape, nudge, and shortcut policies without owning state.
|
|
77
|
+
|
|
59
78
|
Use `ChatHistoryRail` for app sidebars. It shows five recent chats by default,
|
|
60
79
|
progressively discloses up to fifteen, and keeps the app-provided New chat
|
|
61
80
|
action in a footer row with the ellipsis disclosure on its right. The app
|