@agent-native/core 0.122.4 → 0.123.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +538 -0
- package/corpus/core/docs/content/actions.mdx +33 -20
- package/corpus/core/docs/content/agent-mentions.mdx +30 -19
- package/corpus/core/docs/content/agent-native-toolkit.mdx +8 -6
- package/corpus/core/docs/content/agent-resources.mdx +11 -0
- package/corpus/core/docs/content/agent-surfaces.mdx +41 -30
- package/corpus/core/docs/content/audit-log.mdx +78 -0
- package/corpus/core/docs/content/authentication.mdx +7 -5
- package/corpus/core/docs/content/automations.mdx +15 -9
- package/corpus/core/docs/content/client.mdx +11 -11
- package/corpus/core/docs/content/cloneable-saas.mdx +7 -1
- package/corpus/core/docs/content/code-agents-ui.mdx +9 -1
- package/corpus/core/docs/content/components.mdx +7 -0
- package/corpus/core/docs/content/context-awareness.mdx +1 -0
- package/corpus/core/docs/content/creating-templates.mdx +9 -1
- package/corpus/core/docs/content/custom-design-system.mdx +8 -0
- package/corpus/core/docs/content/data-programs.mdx +6 -0
- package/corpus/core/docs/content/deployment.mdx +2 -0
- package/corpus/core/docs/content/doctor.mdx +5 -3
- package/corpus/core/docs/content/extensions.mdx +26 -0
- package/corpus/core/docs/content/external-agents-catalog.mdx +533 -0
- package/corpus/core/docs/content/external-agents.mdx +20 -514
- package/corpus/core/docs/content/faq.mdx +2 -2
- package/corpus/core/docs/content/file-uploads.mdx +44 -0
- package/corpus/core/docs/content/frames.mdx +2 -2
- package/corpus/core/docs/content/generative-ui.mdx +8 -0
- package/corpus/core/docs/content/getting-started.mdx +45 -17
- package/corpus/core/docs/content/human-approval.mdx +9 -0
- package/corpus/core/docs/content/integrations.mdx +4 -3
- package/corpus/core/docs/content/internationalization.mdx +4 -11
- package/corpus/core/docs/content/key-concepts.mdx +1 -1
- package/corpus/core/docs/content/local-file-mode.mdx +5 -0
- package/corpus/core/docs/content/mcp-apps.mdx +2 -1
- package/corpus/core/docs/content/mcp-clients.mdx +32 -1
- package/corpus/core/docs/content/mcp-protocol.mdx +4 -3
- package/corpus/core/docs/content/messaging-internals.mdx +328 -0
- package/corpus/core/docs/content/messaging-recipes.mdx +194 -0
- package/corpus/core/docs/content/messaging.mdx +9 -307
- package/corpus/core/docs/content/multi-app-workspace.mdx +1 -1
- package/corpus/core/docs/content/multi-tenancy.mdx +1 -0
- package/corpus/core/docs/content/native-chat-ui.mdx +8 -0
- package/corpus/core/docs/content/notifications.mdx +18 -20
- package/corpus/core/docs/content/observability.mdx +1 -0
- package/corpus/core/docs/content/onboarding.mdx +20 -6
- package/corpus/core/docs/content/organizations-teams-permissions.mdx +99 -124
- package/corpus/core/docs/content/package-lifecycle.mdx +19 -7
- package/corpus/core/docs/content/progress.mdx +11 -0
- package/corpus/core/docs/content/real-time-collaboration.mdx +44 -3
- package/corpus/core/docs/content/recurring-jobs.mdx +14 -1
- package/corpus/core/docs/content/security.mdx +5 -2
- package/corpus/core/docs/content/server.mdx +2 -1
- package/corpus/core/docs/content/sharing.mdx +22 -3
- package/corpus/core/docs/content/skills-guide.mdx +62 -19
- package/corpus/core/docs/content/syncing-template-changes.mdx +9 -0
- package/corpus/core/docs/content/template-analytics-connectors.mdx +75 -0
- package/corpus/core/docs/content/template-analytics-dashboards.mdx +106 -0
- package/corpus/core/docs/content/template-analytics-developers.mdx +287 -0
- package/corpus/core/docs/content/template-analytics-monitoring-and-sessions.mdx +109 -0
- package/corpus/core/docs/content/template-analytics.mdx +21 -263
- package/corpus/core/docs/content/template-assets-developers.mdx +456 -0
- package/corpus/core/docs/content/template-assets-generation.mdx +147 -0
- package/corpus/core/docs/content/template-assets-integrations.mdx +319 -0
- package/corpus/core/docs/content/template-assets-presets.mdx +185 -0
- package/corpus/core/docs/content/template-assets.mdx +12 -562
- package/corpus/core/docs/content/template-brain-agent.mdx +103 -0
- package/corpus/core/docs/content/template-brain-developers.mdx +379 -0
- package/corpus/core/docs/content/template-brain-knowledge.mdx +50 -0
- package/corpus/core/docs/content/template-brain-sources.mdx +163 -0
- package/corpus/core/docs/content/template-brain.mdx +30 -390
- package/corpus/core/docs/content/template-calendar-agent.mdx +133 -0
- package/corpus/core/docs/content/template-calendar-booking-links.mdx +73 -0
- package/corpus/core/docs/content/template-calendar-developers.mdx +366 -0
- package/corpus/core/docs/content/template-calendar-scheduling.mdx +128 -0
- package/corpus/core/docs/content/template-calendar.mdx +13 -260
- package/corpus/core/docs/content/template-chat-developers.mdx +88 -0
- package/corpus/core/docs/content/template-chat-first-edits.mdx +145 -0
- package/corpus/core/docs/content/template-chat.mdx +12 -77
- package/corpus/core/docs/content/template-clips-ai-and-editing.mdx +114 -0
- package/corpus/core/docs/content/template-clips-capture-everywhere.mdx +120 -0
- package/corpus/core/docs/content/template-clips-developers.mdx +373 -0
- package/corpus/core/docs/content/template-clips-sharing-and-teams.mdx +182 -0
- package/corpus/core/docs/content/template-clips.mdx +19 -508
- package/corpus/core/docs/content/template-content-databases.mdx +406 -0
- package/corpus/core/docs/content/template-content-developers.mdx +364 -0
- package/corpus/core/docs/content/template-content-editing.mdx +60 -0
- package/corpus/core/docs/content/template-content-sync.mdx +149 -0
- package/corpus/core/docs/content/template-content.mdx +21 -561
- package/corpus/core/docs/content/template-design-brand-and-figma.mdx +150 -0
- package/corpus/core/docs/content/template-design-collaboration-and-full-apps.mdx +125 -0
- package/corpus/core/docs/content/template-design-developers.mdx +358 -0
- package/corpus/core/docs/content/template-design-quality-and-components.mdx +95 -0
- package/corpus/core/docs/content/template-design.mdx +20 -344
- package/corpus/core/docs/content/template-dispatch-developers.mdx +121 -0
- package/corpus/core/docs/content/template-dispatch-messaging-routing.mdx +114 -0
- package/corpus/core/docs/content/template-dispatch-operations.mdx +160 -0
- package/corpus/core/docs/content/template-dispatch-vault-integrations.mdx +316 -0
- package/corpus/core/docs/content/template-dispatch.mdx +24 -283
- package/corpus/core/docs/content/template-forms-building-publishing.mdx +135 -0
- package/corpus/core/docs/content/template-forms-developers.mdx +195 -0
- package/corpus/core/docs/content/template-forms-responses.mdx +120 -0
- package/corpus/core/docs/content/template-forms.mdx +21 -230
- package/corpus/core/docs/content/template-mail-agent.mdx +114 -0
- package/corpus/core/docs/content/template-mail-developers.mdx +356 -0
- package/corpus/core/docs/content/template-mail-drafts-and-queue.mdx +103 -0
- package/corpus/core/docs/content/template-mail-inbox.mdx +118 -0
- package/corpus/core/docs/content/template-mail.mdx +23 -274
- package/corpus/core/docs/content/template-plan-automations.mdx +213 -0
- package/corpus/core/docs/content/template-plan-developers.mdx +703 -0
- package/corpus/core/docs/content/template-plan-local-and-desktop.mdx +236 -0
- package/corpus/core/docs/content/template-plan-review-workflow.mdx +180 -0
- package/corpus/core/docs/content/template-plan.mdx +60 -910
- package/corpus/core/docs/content/template-slides-agent.mdx +102 -0
- package/corpus/core/docs/content/template-slides-design-and-media.mdx +94 -0
- package/corpus/core/docs/content/template-slides-developers.mdx +488 -0
- package/corpus/core/docs/content/template-slides-editing.mdx +56 -0
- package/corpus/core/docs/content/template-slides.mdx +20 -362
- package/corpus/core/docs/content/toolkit-capability-packages.mdx +38 -13
- package/corpus/core/docs/content/toolkit-context-knowledge.mdx +49 -9
- package/corpus/core/docs/content/toolkit-editors-canvases.mdx +72 -10
- package/corpus/core/docs/content/toolkit-resources.mdx +16 -0
- package/corpus/core/docs/content/toolkit-settings.mdx +3 -3
- package/corpus/core/docs/content/toolkit-sharing.mdx +5 -7
- package/corpus/core/docs/content/using-your-agent.mdx +25 -2
- package/corpus/core/docs/content/voice-input.mdx +11 -7
- package/corpus/core/docs/content/what-is-agent-native.mdx +1 -0
- package/corpus/core/docs/content/workspace-connections.mdx +21 -11
- package/corpus/core/docs/content/workspace-management.mdx +1 -1
- package/corpus/core/package.json +1 -3
- package/corpus/core/src/a2a/client.ts +4 -2
- package/corpus/core/src/agent/action-warnings.ts +103 -0
- package/corpus/core/src/agent/durable-background.ts +42 -5
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +58 -6
- package/corpus/core/src/agent/engine/anthropic-engine.ts +51 -8
- package/corpus/core/src/agent/engine/builder-engine.ts +56 -18
- package/corpus/core/src/agent/engine/continuation-dispatch-retry.ts +10 -9
- package/corpus/core/src/agent/engine/credential-errors.ts +11 -0
- package/corpus/core/src/agent/engine/error-detail.ts +39 -0
- package/corpus/core/src/agent/engine/prompt-cache.ts +44 -0
- package/corpus/core/src/agent/engine/registry.ts +22 -30
- package/corpus/core/src/agent/engine/tool-call-journal-seed.ts +2 -1
- package/corpus/core/src/agent/engine/translate-anthropic.ts +99 -0
- package/corpus/core/src/agent/loop-settings.ts +94 -7
- package/corpus/core/src/agent/production-agent.ts +667 -157
- package/corpus/core/src/agent/run-loop-with-resume.ts +27 -1
- package/corpus/core/src/agent/run-manager.ts +229 -39
- package/corpus/core/src/agent/run-store.ts +397 -64
- package/corpus/core/src/agent/thread-data-builder.ts +5 -1
- package/corpus/core/src/agent/types.ts +23 -6
- package/corpus/core/src/application-state/script-helpers.ts +5 -2
- package/corpus/core/src/cli/agents.ts +69 -1
- package/corpus/core/src/cli/app-skill.ts +1 -1
- package/corpus/core/src/cli/code-agent-executor.ts +7 -3
- package/corpus/core/src/cli/design-connect.ts +82 -8
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +169 -24
- package/corpus/core/src/client/AssistantChat.tsx +623 -607
- package/corpus/core/src/client/agent-chat-adapter.ts +176 -29
- package/corpus/core/src/client/chat/message-components.tsx +13 -0
- package/corpus/core/src/client/embed-auth.ts +3 -1
- package/corpus/core/src/client/integrations/IntegrationCard.tsx +41 -24
- package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +37 -21
- package/corpus/core/src/client/integrations/webhook-url.ts +29 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +41 -27
- package/corpus/core/src/client/org/RequireActiveOrg.tsx +7 -0
- package/corpus/core/src/client/org/TeamPage.tsx +144 -14
- package/corpus/core/src/client/org/hooks.ts +27 -0
- package/corpus/core/src/client/org/index.ts +2 -0
- package/corpus/core/src/client/require-session.tsx +40 -29
- package/corpus/core/src/client/session-replay.ts +1 -1
- package/corpus/core/src/client/settings/DemoModeSection.tsx +0 -5
- package/corpus/core/src/client/settings/SecretsSection.tsx +47 -42
- package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +0 -5
- package/corpus/core/src/client/sse-event-processor.ts +83 -8
- package/corpus/core/src/client/use-action.ts +22 -13
- package/corpus/core/src/client/use-agent-engine-configured.ts +36 -4
- package/corpus/core/src/client/use-db-sync.ts +21 -1
- package/corpus/core/src/credentials/index.ts +124 -2
- package/corpus/core/src/deploy/build.ts +93 -30
- package/corpus/core/src/deploy/workspace-deploy.ts +21 -16
- package/corpus/core/src/guards/no-localhost-fallback.ts +76 -14
- package/corpus/core/src/integrations/google-docs-poller.ts +19 -12
- package/corpus/core/src/integrations/webhook-handler.ts +56 -33
- package/corpus/core/src/jobs/scheduler.ts +57 -23
- package/corpus/core/src/localization/default-messages.ts +23 -1
- package/corpus/core/src/observability/evals.ts +7 -8
- package/corpus/core/src/observability/traces.ts +2 -0
- package/corpus/core/src/org/accept-pending.ts +2 -2
- package/corpus/core/src/org/active-org.ts +73 -0
- package/corpus/core/src/org/auto-join-domain.ts +7 -2
- package/corpus/core/src/org/context.ts +169 -66
- package/corpus/core/src/org/handlers.ts +148 -10
- package/corpus/core/src/org/plugin.ts +8 -1
- package/corpus/core/src/org/types.ts +6 -1
- package/corpus/core/src/provider-api/index.ts +6 -1
- package/corpus/core/src/resources/handlers.ts +2 -6
- package/corpus/core/src/resources/script-helpers.ts +2 -1
- package/corpus/core/src/scripts/chat/search-chats.ts +5 -2
- package/corpus/core/src/scripts/describe-workspace-apps.ts +59 -0
- package/corpus/core/src/scripts/resources/delete-memory.ts +5 -2
- package/corpus/core/src/scripts/resources/delete.ts +5 -2
- package/corpus/core/src/scripts/resources/effective.ts +5 -2
- package/corpus/core/src/scripts/resources/list.ts +5 -2
- package/corpus/core/src/scripts/resources/read.ts +5 -2
- package/corpus/core/src/scripts/resources/save-memory.ts +5 -2
- package/corpus/core/src/scripts/resources/write.ts +5 -2
- package/corpus/core/src/server/agent-capabilities.ts +147 -0
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +11 -13
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +183 -57
- package/corpus/core/src/server/agent-chat/script-entries.ts +20 -7
- package/corpus/core/src/server/agent-chat-plugin.ts +27 -0
- package/corpus/core/src/server/auth.ts +38 -32
- package/corpus/core/src/server/core-routes-plugin.ts +229 -179
- package/corpus/core/src/server/credential-provider.ts +196 -44
- package/corpus/core/src/server/embed-session.ts +10 -0
- package/corpus/core/src/server/framework-request-handler.ts +43 -0
- package/corpus/core/src/server/google-auth-plugin.ts +13 -450
- package/corpus/core/src/server/index.ts +4 -1
- package/corpus/core/src/server/onboarding-html.ts +20 -56
- package/corpus/core/src/server/open-route.ts +6 -1
- package/corpus/core/src/server/poll.ts +1 -1
- package/corpus/core/src/server/prompts/framework-core-compact.ts +5 -5
- package/corpus/core/src/server/prompts/framework-core.ts +7 -9
- package/corpus/core/src/server/prompts/shared-rules.ts +20 -9
- package/corpus/core/src/server/request-context.ts +58 -2
- package/corpus/core/src/server/scoped-key-storage.ts +1 -1
- package/corpus/core/src/settings/org-settings.ts +9 -0
- package/corpus/core/src/settings/store.ts +29 -0
- package/corpus/core/src/shared/index.ts +13 -0
- package/corpus/core/src/shared/sign-in-journey.ts +331 -0
- package/corpus/core/src/styles/agent-native.css +8 -0
- package/corpus/core/src/templates/chat/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/core/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/corpus/core/src/templates/chat/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/core/src/templates/chat/.agents/skills/security/SKILL.md +2 -0
- package/corpus/core/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/core/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/core/src/templates/chat/AGENTS.md +8 -0
- package/corpus/core/src/templates/chat/app/entry.client.tsx +3 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/core/src/templates/default/.agents/skills/security/SKILL.md +2 -0
- package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/core/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/core/src/templates/default/AGENTS.md +68 -195
- package/corpus/core/src/templates/default/app/entry.client.tsx +3 -0
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +8 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +8 -0
- package/corpus/core/src/templates/headless/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +100 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +28 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +14 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/core/src/templates/workspace-core/.agents/skills/qa/SKILL.md +6 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/security/SKILL.md +2 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +91 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +60 -0
- package/corpus/core/src/templates/workspace-core/AGENTS.md +62 -124
- package/corpus/core/src/templates/workspace-root/AGENTS.md +6 -1
- package/corpus/core/src/triggers/dispatcher.ts +28 -17
- package/corpus/core/src/vite/client.ts +20 -8
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +41 -1
- package/corpus/templates/analytics/.agents/skills/dashboard-ops/SKILL.md +50 -22
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/data-querying/references/inline-chart-embeds.md +8 -0
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/analytics/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/analytics/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/analytics/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/analytics/.builder/skills/charts/SKILL.md +2 -2
- package/corpus/templates/analytics/actions/delete-dashboard-view.ts +24 -0
- package/corpus/templates/analytics/actions/delete-user-pref.ts +22 -0
- package/corpus/templates/analytics/actions/generate-chart.ts +8 -245
- package/corpus/templates/analytics/actions/get-theme.ts +27 -0
- package/corpus/templates/analytics/actions/get-user-pref.ts +22 -0
- package/corpus/templates/analytics/actions/list-dashboard-views.ts +25 -0
- package/corpus/templates/analytics/actions/save-dashboard-view.ts +33 -0
- package/corpus/templates/analytics/actions/set-theme.ts +22 -0
- package/corpus/templates/analytics/actions/set-user-pref.ts +24 -0
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +134 -27
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +2 -9
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +0 -17
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +10 -5
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +22 -52
- package/corpus/templates/analytics/app/hooks/use-user-pref.ts +21 -31
- package/corpus/templates/analytics/app/i18n-data.ts +10 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dual-axis.ts +73 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +8 -27
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/report-panel-window.ts +0 -57
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +8 -0
- package/corpus/templates/analytics/app/root.tsx +0 -28
- package/corpus/templates/analytics/changelog/2026-07-26-error-issues-now-group-by-message-as-well-as-stack-frame-and.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-26-line-area-and-bar-dashboard-panels-can-plot-series-on-a-seco.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-26-scheduled-dashboard-email-reports-now-arrive-complete-and-re.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-26-session-replays-now-detect-rage-clicks-so-the-rage-click-fil.md +6 -0
- package/corpus/templates/analytics/docs/error-capture.md +8 -4
- package/corpus/templates/analytics/package.json +1 -2
- package/corpus/templates/analytics/scripts/preview-dashboard-report.ts +221 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +39 -32
- package/corpus/templates/analytics/server/lib/dashboard-report-render.ts +1168 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +111 -1358
- package/corpus/templates/analytics/server/lib/error-capture.ts +32 -15
- package/corpus/templates/analytics/server/lib/report-chart-svg.ts +901 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +77 -1
- package/corpus/templates/analytics/shared/dashboard-report-timeouts.ts +3 -4
- package/corpus/templates/assets/.agents/skills/a2a-assets/SKILL.md +28 -0
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/assets/.agents/skills/assets-navigation/SKILL.md +46 -0
- package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +12 -0
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/assets/.agents/skills/image-generation/SKILL.md +28 -0
- package/corpus/templates/assets/.agents/skills/library-management/SKILL.md +9 -0
- package/corpus/templates/assets/.agents/skills/logo-composite/SKILL.md +11 -0
- package/corpus/templates/assets/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/assets/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/assets/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/assets/AGENTS.md +58 -125
- package/corpus/templates/assets/actions/variant-slots.ts +8 -4
- package/corpus/templates/assets/app/entry.client.tsx +3 -0
- package/corpus/templates/assets/package.json +0 -2
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +78 -4
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/brain/.agents/skills/ingestion-and-connectors/SKILL.md +15 -3
- package/corpus/templates/brain/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/brain/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/brain/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/brain/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/brain/AGENTS.md +73 -119
- package/corpus/templates/brain/app/entry.client.tsx +3 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +56 -3
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/calendar/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/calendar/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/calendar/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/calendar/AGENTS.md +22 -45
- package/corpus/templates/calendar/app/entry.client.tsx +3 -0
- package/corpus/templates/calendar/server/handlers/events.ts +0 -364
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/chat/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/chat/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/chat/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/chat/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/chat/AGENTS.md +8 -0
- package/corpus/templates/chat/app/entry.client.tsx +3 -0
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +42 -0
- package/corpus/templates/clips/.agents/skills/brain-export/SKILL.md +59 -0
- package/corpus/templates/clips/.agents/skills/bug-reports/SKILL.md +37 -0
- package/corpus/templates/clips/.agents/skills/crm-call-evidence/SKILL.md +41 -0
- package/corpus/templates/clips/.agents/skills/dictate/SKILL.md +4 -0
- package/corpus/templates/clips/.agents/skills/external-integrations/SKILL.md +45 -0
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +9 -0
- package/corpus/templates/clips/.agents/skills/recording/SKILL.md +45 -0
- package/corpus/templates/clips/.agents/skills/screen-memory/SKILL.md +43 -0
- package/corpus/templates/clips/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/clips/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +38 -1
- package/corpus/templates/clips/AGENTS.md +82 -224
- package/corpus/templates/clips/actions/create-recording.ts +4 -0
- package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +6 -10
- package/corpus/templates/clips/app/routes/invite.$token.tsx +6 -5
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +4 -5
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +8 -8
- package/corpus/templates/clips/changelog/2026-07-26-long-agent-chat-turns-now-finish-instead-of-stopping-partway.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-26-recordings-no-longer-get-stuck-on-uploading-uploads-now-hold.md +6 -0
- package/corpus/templates/clips/server/db/schema.ts +3 -0
- package/corpus/templates/clips/server/jobs/brain-export.ts +4 -0
- package/corpus/templates/clips/server/lib/recording-upload-state.ts +0 -52
- package/corpus/templates/clips/server/lib/upload-lease.ts +241 -0
- package/corpus/templates/clips/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/clips/server/plugins/db.ts +18 -347
- package/corpus/templates/clips/server/routes/api/clips/brain-export/run.post.ts +7 -1
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +123 -126
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/reset-chunks.post.ts +4 -0
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/resume.get.ts +118 -0
- package/corpus/templates/clips/server/routes/api/uploads/reap.post.ts +69 -0
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/content/.agents/skills/content/SKILL.md +4 -0
- package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +8 -0
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +55 -0
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/content/.agents/skills/notion-integration/SKILL.md +12 -1
- package/corpus/templates/content/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/content/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/content/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/content/AGENTS.md +63 -131
- package/corpus/templates/content/app/routes/_app.tsx +4 -4
- package/corpus/templates/content/server/routes/api/notion/callback.get.ts +6 -24
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +16 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +15 -0
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/design/.agents/skills/full-app-build/SKILL.md +12 -0
- package/corpus/templates/design/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/design/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/design/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/design/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +201 -102
- package/corpus/templates/design/AGENTS.md +58 -71
- package/corpus/templates/design/actions/open-visual-edit.ts +111 -2
- package/corpus/templates/design/app/components/design/AddLocalhostScreenDialog.tsx +236 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +1 -1
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2 -2
- package/corpus/templates/design/app/entry.client.tsx +3 -0
- package/corpus/templates/design/app/i18n-data.ts +180 -0
- package/corpus/templates/design/app/pages/Present.tsx +6 -9
- package/corpus/templates/design/app/pages/VisualEdit.tsx +4 -7
- package/corpus/templates/design/app/pages/design-editor/design-data-geometry-utils.ts +20 -0
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/dispatch/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/dispatch/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/dispatch/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/dispatch/app/entry.client.tsx +3 -0
- package/corpus/templates/dispatch/server/plugins/identity-sso.ts +27 -16
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/forms/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/forms/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/forms/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/forms/DEVELOPING.md +1 -1
- package/corpus/templates/forms/app/entry.client.tsx +3 -0
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +3 -5
- package/corpus/templates/forms/app/routes/_app.tsx +4 -4
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/macros/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/macros/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/macros/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/macros/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/macros/app/entry.client.tsx +3 -0
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/mail/.agents/skills/contacts-and-crm/SKILL.md +10 -0
- package/corpus/templates/mail/.agents/skills/draft-queue/SKILL.md +3 -0
- package/corpus/templates/mail/.agents/skills/email-drafts/SKILL.md +26 -2
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/mail/.agents/skills/inbox-automations/SKILL.md +37 -0
- package/corpus/templates/mail/.agents/skills/inbox-reads-and-triage/SKILL.md +58 -0
- package/corpus/templates/mail/.agents/skills/mail-backends/SKILL.md +33 -0
- package/corpus/templates/mail/.agents/skills/provider-api-scans/SKILL.md +39 -0
- package/corpus/templates/mail/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/mail/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/mail/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/mail/AGENTS.md +74 -143
- package/corpus/templates/mail/actions/create-alias.ts +36 -0
- package/corpus/templates/mail/actions/create-automation.ts +28 -0
- package/corpus/templates/mail/actions/create-scheduled-job.ts +45 -0
- package/corpus/templates/mail/actions/delete-alias.ts +26 -0
- package/corpus/templates/mail/actions/delete-automation.ts +21 -0
- package/corpus/templates/mail/actions/get-automation-settings.ts +32 -0
- package/corpus/templates/mail/actions/get-mail-preferences.ts +18 -0
- package/corpus/templates/mail/actions/list-aliases.ts +17 -0
- package/corpus/templates/mail/actions/list-automations.ts +18 -0
- package/corpus/templates/mail/actions/list-scheduled-jobs.ts +18 -0
- package/corpus/templates/mail/actions/update-alias.ts +37 -0
- package/corpus/templates/mail/actions/update-automation-settings.ts +33 -0
- package/corpus/templates/mail/actions/update-automation.ts +33 -0
- package/corpus/templates/mail/actions/update-mail-preferences.ts +68 -0
- package/corpus/templates/mail/actions/update-scheduled-job.ts +25 -0
- package/corpus/templates/mail/app/entry.client.tsx +3 -0
- package/corpus/templates/mail/app/hooks/use-aliases.ts +6 -36
- package/corpus/templates/mail/app/hooks/use-automations.ts +9 -16
- package/corpus/templates/mail/app/hooks/use-emails.ts +6 -5
- package/corpus/templates/mail/app/hooks/use-scheduled-jobs.ts +12 -15
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +15 -9
- package/corpus/templates/mail/server/handlers/automations.ts +5 -142
- package/corpus/templates/mail/server/handlers/emails.ts +1 -56
- package/corpus/templates/mail/server/handlers/scheduled-jobs.ts +0 -134
- package/corpus/templates/mail/server/lib/aliases.ts +18 -0
- package/corpus/templates/mail/server/lib/automations.ts +104 -0
- package/corpus/templates/mail/server/lib/jobs.ts +34 -0
- package/corpus/templates/mail/server/lib/mail-settings.ts +43 -0
- package/corpus/templates/mail/shared/automation-schema.ts +10 -0
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/plan/.agents/skills/plan-authoring-flow/SKILL.md +98 -0
- package/corpus/templates/plan/.agents/skills/plan-browser-editing/SKILL.md +42 -0
- package/corpus/templates/plan/.agents/skills/plan-comments-and-feedback/SKILL.md +68 -0
- package/corpus/templates/plan/.agents/skills/plan-events/SKILL.md +22 -0
- package/corpus/templates/plan/.agents/skills/plan-hosted-writes/SKILL.md +42 -0
- package/corpus/templates/plan/.agents/skills/plan-local-codebase-chat/SKILL.md +38 -0
- package/corpus/templates/plan/.agents/skills/plan-review-recaps/SKILL.md +25 -0
- package/corpus/templates/plan/.agents/skills/plan-source-sync/SKILL.md +68 -0
- package/corpus/templates/plan/.agents/skills/plan-version-history/SKILL.md +25 -0
- package/corpus/templates/plan/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/plan/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/plan/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/plan/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/plan/AGENTS.md +64 -296
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +9 -8
- package/corpus/templates/plan/app/pages/PlansPage.tsx +5 -10
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +7 -7
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/slides/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/slides/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/slides/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -2
- package/corpus/templates/slides/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/slides/DEVELOPING.md +3 -3
- package/corpus/templates/slides/actions/_deck-write.ts +52 -0
- package/corpus/templates/slides/actions/add-deck.ts +73 -0
- package/corpus/templates/slides/actions/delete-deck.ts +60 -0
- package/corpus/templates/slides/actions/get-deck.ts +3 -1
- package/corpus/templates/slides/actions/save-deck.ts +144 -0
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +27 -20
- package/corpus/templates/slides/app/context/DeckContext.tsx +173 -100
- package/corpus/templates/slides/app/pages/Index.tsx +3 -6
- package/corpus/templates/slides/app/routes/slide.tsx +16 -12
- package/corpus/templates/slides/changelog/2026-07-26-a-newly-created-deck-now-appears-in-the-deck-list-right-away.md +6 -0
- package/corpus/templates/slides/server/handlers/decks.ts +2 -378
- package/corpus/templates/tasks/.agents/skills/action-reference/SKILL.md +47 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +19 -1
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/corpus/templates/tasks/.agents/skills/change-summary/SKILL.md +19 -1
- package/corpus/templates/tasks/.agents/skills/custom-fields/SKILL.md +63 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +20 -6
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +2 -0
- package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/corpus/templates/tasks/.agents/skills/sharing/SKILL.md +228 -0
- package/corpus/templates/tasks/.agents/skills/store-conventions/SKILL.md +45 -0
- package/corpus/templates/tasks/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/tasks/.agents/skills/task-inbox-workflow/SKILL.md +66 -0
- package/corpus/templates/tasks/AGENTS.md +48 -113
- package/corpus/templates/tasks/app/entry.client.tsx +3 -0
- package/corpus/toolkit/CHANGELOG.md +12 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/composer/PromptComposer.tsx +23 -20
- package/dist/a2a/client.d.ts +3 -1
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +4 -2
- package/dist/a2a/client.js.map +1 -1
- package/dist/agent/action-warnings.d.ts +27 -0
- package/dist/agent/action-warnings.d.ts.map +1 -0
- package/dist/agent/action-warnings.js +73 -0
- package/dist/agent/action-warnings.js.map +1 -0
- package/dist/agent/durable-background.d.ts +8 -0
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +37 -5
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +47 -6
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
- package/dist/agent/engine/anthropic-engine.js +41 -9
- package/dist/agent/engine/anthropic-engine.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +46 -19
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/engine/continuation-dispatch-retry.d.ts.map +1 -1
- package/dist/agent/engine/continuation-dispatch-retry.js +11 -9
- package/dist/agent/engine/continuation-dispatch-retry.js.map +1 -1
- package/dist/agent/engine/credential-errors.d.ts +6 -0
- package/dist/agent/engine/credential-errors.d.ts.map +1 -1
- package/dist/agent/engine/credential-errors.js +10 -0
- package/dist/agent/engine/credential-errors.js.map +1 -1
- package/dist/agent/engine/error-detail.d.ts +2 -0
- package/dist/agent/engine/error-detail.d.ts.map +1 -0
- package/dist/agent/engine/error-detail.js +37 -0
- package/dist/agent/engine/error-detail.js.map +1 -0
- package/dist/agent/engine/prompt-cache.d.ts +34 -0
- package/dist/agent/engine/prompt-cache.d.ts.map +1 -0
- package/dist/agent/engine/prompt-cache.js +39 -0
- package/dist/agent/engine/prompt-cache.js.map +1 -0
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +23 -33
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/engine/tool-call-journal-seed.d.ts +1 -1
- package/dist/agent/engine/tool-call-journal-seed.d.ts.map +1 -1
- package/dist/agent/engine/tool-call-journal-seed.js +2 -2
- package/dist/agent/engine/tool-call-journal-seed.js.map +1 -1
- package/dist/agent/engine/translate-anthropic.d.ts +28 -0
- package/dist/agent/engine/translate-anthropic.d.ts.map +1 -1
- package/dist/agent/engine/translate-anthropic.js +75 -0
- package/dist/agent/engine/translate-anthropic.js.map +1 -1
- package/dist/agent/loop-settings.d.ts +35 -2
- package/dist/agent/loop-settings.d.ts.map +1 -1
- package/dist/agent/loop-settings.js +71 -8
- package/dist/agent/loop-settings.js.map +1 -1
- package/dist/agent/production-agent.d.ts +105 -20
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +516 -123
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +24 -2
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts +52 -9
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +191 -36
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +87 -14
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +331 -59
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +6 -1
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/agent/types.d.ts +18 -6
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js +9 -5
- package/dist/agent/types.js.map +1 -1
- package/dist/application-state/script-helpers.d.ts.map +1 -1
- package/dist/application-state/script-helpers.js +2 -2
- package/dist/application-state/script-helpers.js.map +1 -1
- package/dist/cli/agents.d.ts +2 -0
- package/dist/cli/agents.d.ts.map +1 -1
- package/dist/cli/agents.js +48 -1
- package/dist/cli/agents.js.map +1 -1
- package/dist/cli/app-skill.js +1 -1
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +3 -3
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +73 -8
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.js +169 -24
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +135 -125
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +17 -0
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +141 -31
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +9 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +12 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/embed-auth.d.ts.map +1 -1
- package/dist/client/embed-auth.js +3 -1
- package/dist/client/embed-auth.js.map +1 -1
- package/dist/client/integrations/IntegrationCard.d.ts.map +1 -1
- package/dist/client/integrations/IntegrationCard.js +9 -4
- package/dist/client/integrations/IntegrationCard.js.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.d.ts.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.js +13 -7
- package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
- package/dist/client/integrations/webhook-url.d.ts +7 -0
- package/dist/client/integrations/webhook-url.d.ts.map +1 -0
- package/dist/client/integrations/webhook-url.js +32 -0
- package/dist/client/integrations/webhook-url.js.map +1 -0
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +13 -11
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/RequireActiveOrg.d.ts.map +1 -1
- package/dist/client/org/RequireActiveOrg.js +2 -2
- package/dist/client/org/RequireActiveOrg.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +52 -13
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/hooks.d.ts +9 -0
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +24 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +1 -1
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +1 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/require-session.d.ts +12 -17
- package/dist/client/require-session.d.ts.map +1 -1
- package/dist/client/require-session.js +36 -23
- package/dist/client/require-session.js.map +1 -1
- package/dist/client/session-replay.js +1 -1
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/settings/DemoModeSection.d.ts +0 -1
- package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
- package/dist/client/settings/DemoModeSection.js +0 -4
- package/dist/client/settings/DemoModeSection.js.map +1 -1
- package/dist/client/settings/SecretsSection.d.ts.map +1 -1
- package/dist/client/settings/SecretsSection.js +12 -8
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.d.ts +0 -1
- package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +1 -4
- package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +33 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +83 -8
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +23 -14
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts +9 -3
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +30 -3
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +3 -0
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +18 -1
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/credentials/index.d.ts +29 -1
- package/dist/credentials/index.d.ts.map +1 -1
- package/dist/credentials/index.js +111 -2
- package/dist/credentials/index.js.map +1 -1
- package/dist/deploy/build.d.ts +14 -3
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +81 -24
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/workspace-deploy.d.ts +15 -0
- package/dist/deploy/workspace-deploy.d.ts.map +1 -1
- package/dist/deploy/workspace-deploy.js +19 -18
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/guards/no-localhost-fallback.d.ts +7 -0
- package/dist/guards/no-localhost-fallback.d.ts.map +1 -1
- package/dist/guards/no-localhost-fallback.js +75 -16
- package/dist/guards/no-localhost-fallback.js.map +1 -1
- package/dist/integrations/google-docs-poller.d.ts.map +1 -1
- package/dist/integrations/google-docs-poller.js +8 -3
- package/dist/integrations/google-docs-poller.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +22 -4
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +17 -0
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +60 -33
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +17 -1
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +17 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/evals.d.ts.map +1 -1
- package/dist/observability/evals.js +7 -10
- package/dist/observability/evals.js.map +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/observability/traces.d.ts +2 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js.map +1 -1
- package/dist/org/accept-pending.js +2 -2
- package/dist/org/accept-pending.js.map +1 -1
- package/dist/org/active-org.d.ts +16 -0
- package/dist/org/active-org.d.ts.map +1 -0
- package/dist/org/active-org.js +57 -0
- package/dist/org/active-org.js.map +1 -0
- package/dist/org/auto-join-domain.d.ts.map +1 -1
- package/dist/org/auto-join-domain.js +3 -2
- package/dist/org/auto-join-domain.js.map +1 -1
- package/dist/org/context.d.ts +19 -1
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/context.js +159 -71
- package/dist/org/context.js.map +1 -1
- package/dist/org/handlers.d.ts +24 -1
- package/dist/org/handlers.d.ts.map +1 -1
- package/dist/org/handlers.js +129 -10
- package/dist/org/handlers.js.map +1 -1
- package/dist/org/plugin.d.ts +2 -0
- package/dist/org/plugin.d.ts.map +1 -1
- package/dist/org/plugin.js +9 -2
- package/dist/org/plugin.js.map +1 -1
- package/dist/org/types.d.ts +6 -1
- package/dist/org/types.d.ts.map +1 -1
- package/dist/org/types.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
- package/dist/provider-api/actions/provider-api.d.ts +11 -11
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +3 -2
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +2 -7
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/script-helpers.d.ts.map +1 -1
- package/dist/resources/script-helpers.js +2 -2
- package/dist/resources/script-helpers.js.map +1 -1
- package/dist/scripts/chat/search-chats.d.ts.map +1 -1
- package/dist/scripts/chat/search-chats.js +2 -2
- package/dist/scripts/chat/search-chats.js.map +1 -1
- package/dist/scripts/describe-workspace-apps.d.ts +4 -0
- package/dist/scripts/describe-workspace-apps.d.ts.map +1 -0
- package/dist/scripts/describe-workspace-apps.js +34 -0
- package/dist/scripts/describe-workspace-apps.js.map +1 -0
- package/dist/scripts/resources/delete-memory.d.ts.map +1 -1
- package/dist/scripts/resources/delete-memory.js +2 -2
- package/dist/scripts/resources/delete-memory.js.map +1 -1
- package/dist/scripts/resources/delete.d.ts.map +1 -1
- package/dist/scripts/resources/delete.js +2 -2
- package/dist/scripts/resources/delete.js.map +1 -1
- package/dist/scripts/resources/effective.d.ts.map +1 -1
- package/dist/scripts/resources/effective.js +2 -2
- package/dist/scripts/resources/effective.js.map +1 -1
- package/dist/scripts/resources/list.d.ts.map +1 -1
- package/dist/scripts/resources/list.js +2 -2
- package/dist/scripts/resources/list.js.map +1 -1
- package/dist/scripts/resources/read.d.ts.map +1 -1
- package/dist/scripts/resources/read.js +2 -2
- package/dist/scripts/resources/read.js.map +1 -1
- package/dist/scripts/resources/save-memory.d.ts.map +1 -1
- package/dist/scripts/resources/save-memory.js +2 -2
- package/dist/scripts/resources/save-memory.js.map +1 -1
- package/dist/scripts/resources/write.d.ts.map +1 -1
- package/dist/scripts/resources/write.js +2 -2
- package/dist/scripts/resources/write.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-capabilities.d.ts +21 -0
- package/dist/server/agent-capabilities.d.ts.map +1 -0
- package/dist/server/agent-capabilities.js +106 -0
- package/dist/server/agent-capabilities.js.map +1 -0
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -1
- package/dist/server/agent-chat/framework-prompts.js +11 -13
- package/dist/server/agent-chat/framework-prompts.js.map +1 -1
- package/dist/server/agent-chat/prompt-resources.d.ts +32 -0
- package/dist/server/agent-chat/prompt-resources.d.ts.map +1 -1
- package/dist/server/agent-chat/prompt-resources.js +117 -56
- package/dist/server/agent-chat/prompt-resources.js.map +1 -1
- package/dist/server/agent-chat/script-entries.d.ts.map +1 -1
- package/dist/server/agent-chat/script-entries.js +18 -8
- package/dist/server/agent-chat/script-entries.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +27 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/auth.d.ts +9 -9
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +32 -33
- package/dist/server/auth.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts +45 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +162 -139
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts +35 -2
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +155 -40
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/embed-session.d.ts.map +1 -1
- package/dist/server/embed-session.js +10 -0
- package/dist/server/embed-session.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +38 -0
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/google-auth-plugin.d.ts.map +1 -1
- package/dist/server/google-auth-plugin.js +12 -444
- package/dist/server/google-auth-plugin.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +20 -56
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/open-route.d.ts.map +1 -1
- package/dist/server/open-route.js +6 -1
- package/dist/server/open-route.js.map +1 -1
- package/dist/server/poll.js +1 -1
- package/dist/server/poll.js.map +1 -1
- package/dist/server/prompts/framework-core-compact.d.ts.map +1 -1
- package/dist/server/prompts/framework-core-compact.js +5 -6
- package/dist/server/prompts/framework-core-compact.js.map +1 -1
- package/dist/server/prompts/framework-core.d.ts.map +1 -1
- package/dist/server/prompts/framework-core.js +7 -10
- package/dist/server/prompts/framework-core.js.map +1 -1
- package/dist/server/prompts/shared-rules.d.ts +20 -2
- package/dist/server/prompts/shared-rules.d.ts.map +1 -1
- package/dist/server/prompts/shared-rules.js +20 -10
- package/dist/server/prompts/shared-rules.js.map +1 -1
- package/dist/server/request-context.d.ts +26 -1
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js +52 -2
- package/dist/server/request-context.js.map +1 -1
- package/dist/server/scoped-key-storage.js +1 -1
- package/dist/server/scoped-key-storage.js.map +1 -1
- package/dist/settings/org-settings.d.ts +2 -0
- package/dist/settings/org-settings.d.ts.map +1 -1
- package/dist/settings/org-settings.js +5 -1
- package/dist/settings/org-settings.js.map +1 -1
- package/dist/settings/store.d.ts +6 -0
- package/dist/settings/store.d.ts.map +1 -1
- package/dist/settings/store.js +25 -0
- package/dist/settings/store.js.map +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/sign-in-journey.d.ts +102 -0
- package/dist/shared/sign-in-journey.d.ts.map +1 -0
- package/dist/shared/sign-in-journey.js +269 -0
- package/dist/shared/sign-in-journey.js.map +1 -0
- package/dist/styles/agent-native.css +8 -0
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +19 -1
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +20 -6
- package/dist/templates/chat/.agents/skills/security/SKILL.md +2 -0
- package/dist/templates/chat/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/dist/templates/chat/.agents/skills/sharing/SKILL.md +228 -0
- package/dist/templates/chat/.agents/skills/storing-data/SKILL.md +178 -0
- package/dist/templates/chat/AGENTS.md +8 -0
- package/dist/templates/chat/app/entry.client.tsx +3 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +19 -1
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +20 -6
- package/dist/templates/default/.agents/skills/security/SKILL.md +2 -0
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/dist/templates/default/AGENTS.md +68 -195
- package/dist/templates/default/app/entry.client.tsx +3 -0
- package/dist/templates/default/app/i18n/ar-SA.ts +8 -0
- package/dist/templates/default/app/i18n/de-DE.ts +8 -0
- package/dist/templates/default/app/i18n/en-US.ts +8 -0
- package/dist/templates/default/app/i18n/es-ES.ts +8 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +8 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +8 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +8 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +8 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +8 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +8 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +8 -0
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +19 -1
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +19 -1
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +100 -0
- package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -1
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +28 -0
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +14 -1
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +20 -6
- package/dist/templates/workspace-core/.agents/skills/qa/SKILL.md +6 -3
- package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +91 -0
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +60 -0
- package/dist/templates/workspace-core/AGENTS.md +62 -124
- package/dist/templates/workspace-root/AGENTS.md +6 -1
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +10 -3
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +18 -8
- package/dist/vite/client.js.map +1 -1
- package/docs/content/actions.mdx +33 -20
- package/docs/content/agent-mentions.mdx +30 -19
- package/docs/content/agent-native-toolkit.mdx +8 -6
- package/docs/content/agent-resources.mdx +11 -0
- package/docs/content/agent-surfaces.mdx +41 -30
- package/docs/content/audit-log.mdx +78 -0
- package/docs/content/authentication.mdx +7 -5
- package/docs/content/automations.mdx +15 -9
- package/docs/content/client.mdx +11 -11
- package/docs/content/cloneable-saas.mdx +7 -1
- package/docs/content/code-agents-ui.mdx +9 -1
- package/docs/content/components.mdx +7 -0
- package/docs/content/context-awareness.mdx +1 -0
- package/docs/content/creating-templates.mdx +9 -1
- package/docs/content/custom-design-system.mdx +8 -0
- package/docs/content/data-programs.mdx +6 -0
- package/docs/content/deployment.mdx +2 -0
- package/docs/content/doctor.mdx +5 -3
- package/docs/content/extensions.mdx +26 -0
- package/docs/content/external-agents-catalog.mdx +533 -0
- package/docs/content/external-agents.mdx +20 -514
- package/docs/content/faq.mdx +2 -2
- package/docs/content/file-uploads.mdx +44 -0
- package/docs/content/frames.mdx +2 -2
- package/docs/content/generative-ui.mdx +8 -0
- package/docs/content/getting-started.mdx +45 -17
- package/docs/content/human-approval.mdx +9 -0
- package/docs/content/integrations.mdx +4 -3
- package/docs/content/internationalization.mdx +4 -11
- package/docs/content/key-concepts.mdx +1 -1
- package/docs/content/local-file-mode.mdx +5 -0
- package/docs/content/mcp-apps.mdx +2 -1
- package/docs/content/mcp-clients.mdx +32 -1
- package/docs/content/mcp-protocol.mdx +4 -3
- package/docs/content/messaging-internals.mdx +328 -0
- package/docs/content/messaging-recipes.mdx +194 -0
- package/docs/content/messaging.mdx +9 -307
- package/docs/content/multi-app-workspace.mdx +1 -1
- package/docs/content/multi-tenancy.mdx +1 -0
- package/docs/content/native-chat-ui.mdx +8 -0
- package/docs/content/notifications.mdx +18 -20
- package/docs/content/observability.mdx +1 -0
- package/docs/content/onboarding.mdx +20 -6
- package/docs/content/organizations-teams-permissions.mdx +99 -124
- package/docs/content/package-lifecycle.mdx +19 -7
- package/docs/content/progress.mdx +11 -0
- package/docs/content/real-time-collaboration.mdx +44 -3
- package/docs/content/recurring-jobs.mdx +14 -1
- package/docs/content/security.mdx +5 -2
- package/docs/content/server.mdx +2 -1
- package/docs/content/sharing.mdx +22 -3
- package/docs/content/skills-guide.mdx +62 -19
- package/docs/content/syncing-template-changes.mdx +9 -0
- package/docs/content/template-analytics-connectors.mdx +75 -0
- package/docs/content/template-analytics-dashboards.mdx +106 -0
- package/docs/content/template-analytics-developers.mdx +287 -0
- package/docs/content/template-analytics-monitoring-and-sessions.mdx +109 -0
- package/docs/content/template-analytics.mdx +21 -263
- package/docs/content/template-assets-developers.mdx +456 -0
- package/docs/content/template-assets-generation.mdx +147 -0
- package/docs/content/template-assets-integrations.mdx +319 -0
- package/docs/content/template-assets-presets.mdx +185 -0
- package/docs/content/template-assets.mdx +12 -562
- package/docs/content/template-brain-agent.mdx +103 -0
- package/docs/content/template-brain-developers.mdx +379 -0
- package/docs/content/template-brain-knowledge.mdx +50 -0
- package/docs/content/template-brain-sources.mdx +163 -0
- package/docs/content/template-brain.mdx +30 -390
- package/docs/content/template-calendar-agent.mdx +133 -0
- package/docs/content/template-calendar-booking-links.mdx +73 -0
- package/docs/content/template-calendar-developers.mdx +366 -0
- package/docs/content/template-calendar-scheduling.mdx +128 -0
- package/docs/content/template-calendar.mdx +13 -260
- package/docs/content/template-chat-developers.mdx +88 -0
- package/docs/content/template-chat-first-edits.mdx +145 -0
- package/docs/content/template-chat.mdx +12 -77
- package/docs/content/template-clips-ai-and-editing.mdx +114 -0
- package/docs/content/template-clips-capture-everywhere.mdx +120 -0
- package/docs/content/template-clips-developers.mdx +373 -0
- package/docs/content/template-clips-sharing-and-teams.mdx +182 -0
- package/docs/content/template-clips.mdx +19 -508
- package/docs/content/template-content-databases.mdx +406 -0
- package/docs/content/template-content-developers.mdx +364 -0
- package/docs/content/template-content-editing.mdx +60 -0
- package/docs/content/template-content-sync.mdx +149 -0
- package/docs/content/template-content.mdx +21 -561
- package/docs/content/template-design-brand-and-figma.mdx +150 -0
- package/docs/content/template-design-collaboration-and-full-apps.mdx +125 -0
- package/docs/content/template-design-developers.mdx +358 -0
- package/docs/content/template-design-quality-and-components.mdx +95 -0
- package/docs/content/template-design.mdx +20 -344
- package/docs/content/template-dispatch-developers.mdx +121 -0
- package/docs/content/template-dispatch-messaging-routing.mdx +114 -0
- package/docs/content/template-dispatch-operations.mdx +160 -0
- package/docs/content/template-dispatch-vault-integrations.mdx +316 -0
- package/docs/content/template-dispatch.mdx +24 -283
- package/docs/content/template-forms-building-publishing.mdx +135 -0
- package/docs/content/template-forms-developers.mdx +195 -0
- package/docs/content/template-forms-responses.mdx +120 -0
- package/docs/content/template-forms.mdx +21 -230
- package/docs/content/template-mail-agent.mdx +114 -0
- package/docs/content/template-mail-developers.mdx +356 -0
- package/docs/content/template-mail-drafts-and-queue.mdx +103 -0
- package/docs/content/template-mail-inbox.mdx +118 -0
- package/docs/content/template-mail.mdx +23 -274
- package/docs/content/template-plan-automations.mdx +213 -0
- package/docs/content/template-plan-developers.mdx +703 -0
- package/docs/content/template-plan-local-and-desktop.mdx +236 -0
- package/docs/content/template-plan-review-workflow.mdx +180 -0
- package/docs/content/template-plan.mdx +60 -910
- package/docs/content/template-slides-agent.mdx +102 -0
- package/docs/content/template-slides-design-and-media.mdx +94 -0
- package/docs/content/template-slides-developers.mdx +488 -0
- package/docs/content/template-slides-editing.mdx +56 -0
- package/docs/content/template-slides.mdx +20 -362
- package/docs/content/toolkit-capability-packages.mdx +38 -13
- package/docs/content/toolkit-context-knowledge.mdx +49 -9
- package/docs/content/toolkit-editors-canvases.mdx +72 -10
- package/docs/content/toolkit-resources.mdx +16 -0
- package/docs/content/toolkit-settings.mdx +3 -3
- package/docs/content/toolkit-sharing.mdx +5 -7
- package/docs/content/using-your-agent.mdx +25 -2
- package/docs/content/voice-input.mdx +11 -7
- package/docs/content/what-is-agent-native.mdx +1 -0
- package/docs/content/workspace-connections.mdx +21 -11
- package/docs/content/workspace-management.mdx +1 -1
- package/package.json +2 -4
- package/src/a2a/client.ts +4 -2
- package/src/agent/action-warnings.ts +103 -0
- package/src/agent/durable-background.ts +42 -5
- package/src/agent/engine/ai-sdk-engine.ts +58 -6
- package/src/agent/engine/anthropic-engine.ts +51 -8
- package/src/agent/engine/builder-engine.ts +56 -18
- package/src/agent/engine/continuation-dispatch-retry.ts +10 -9
- package/src/agent/engine/credential-errors.ts +11 -0
- package/src/agent/engine/error-detail.ts +39 -0
- package/src/agent/engine/prompt-cache.ts +44 -0
- package/src/agent/engine/registry.ts +22 -30
- package/src/agent/engine/tool-call-journal-seed.ts +2 -1
- package/src/agent/engine/translate-anthropic.ts +99 -0
- package/src/agent/loop-settings.ts +94 -7
- package/src/agent/production-agent.ts +667 -157
- package/src/agent/run-loop-with-resume.ts +27 -1
- package/src/agent/run-manager.ts +229 -39
- package/src/agent/run-store.ts +397 -64
- package/src/agent/thread-data-builder.ts +5 -1
- package/src/agent/types.ts +23 -6
- package/src/application-state/script-helpers.ts +5 -2
- package/src/cli/agents.ts +69 -1
- package/src/cli/app-skill.ts +1 -1
- package/src/cli/code-agent-executor.ts +7 -3
- package/src/cli/design-connect.ts +82 -8
- package/src/cli/skills-content/design-visual-edit-skill.ts +169 -24
- package/src/client/AssistantChat.tsx +623 -607
- package/src/client/agent-chat-adapter.ts +176 -29
- package/src/client/chat/message-components.tsx +13 -0
- package/src/client/embed-auth.ts +3 -1
- package/src/client/integrations/IntegrationCard.tsx +41 -24
- package/src/client/integrations/IntegrationsPanel.tsx +37 -21
- package/src/client/integrations/webhook-url.ts +29 -0
- package/src/client/org/OrgSwitcher.tsx +41 -27
- package/src/client/org/RequireActiveOrg.tsx +7 -0
- package/src/client/org/TeamPage.tsx +144 -14
- package/src/client/org/hooks.ts +27 -0
- package/src/client/org/index.ts +2 -0
- package/src/client/require-session.tsx +40 -29
- package/src/client/session-replay.ts +1 -1
- package/src/client/settings/DemoModeSection.tsx +0 -5
- package/src/client/settings/SecretsSection.tsx +47 -42
- package/src/client/settings/VoiceTranscriptionSection.tsx +0 -5
- package/src/client/sse-event-processor.ts +83 -8
- package/src/client/use-action.ts +22 -13
- package/src/client/use-agent-engine-configured.ts +36 -4
- package/src/client/use-db-sync.ts +21 -1
- package/src/credentials/index.ts +124 -2
- package/src/deploy/build.ts +93 -30
- package/src/deploy/workspace-deploy.ts +21 -16
- package/src/guards/no-localhost-fallback.ts +76 -14
- package/src/integrations/google-docs-poller.ts +19 -12
- package/src/integrations/webhook-handler.ts +56 -33
- package/src/jobs/scheduler.ts +57 -23
- package/src/localization/default-messages.ts +23 -1
- package/src/observability/evals.ts +7 -8
- package/src/observability/traces.ts +2 -0
- package/src/org/accept-pending.ts +2 -2
- package/src/org/active-org.ts +73 -0
- package/src/org/auto-join-domain.ts +7 -2
- package/src/org/context.ts +169 -66
- package/src/org/handlers.ts +148 -10
- package/src/org/plugin.ts +8 -1
- package/src/org/types.ts +6 -1
- package/src/provider-api/index.ts +6 -1
- package/src/resources/handlers.ts +2 -6
- package/src/resources/script-helpers.ts +2 -1
- package/src/scripts/chat/search-chats.ts +5 -2
- package/src/scripts/describe-workspace-apps.ts +59 -0
- package/src/scripts/resources/delete-memory.ts +5 -2
- package/src/scripts/resources/delete.ts +5 -2
- package/src/scripts/resources/effective.ts +5 -2
- package/src/scripts/resources/list.ts +5 -2
- package/src/scripts/resources/read.ts +5 -2
- package/src/scripts/resources/save-memory.ts +5 -2
- package/src/scripts/resources/write.ts +5 -2
- package/src/server/__snapshots__/agent-chat-plugin.surface.spec.ts.snap +11 -31
- package/src/server/agent-capabilities.ts +147 -0
- package/src/server/agent-chat/framework-prompts.ts +11 -13
- package/src/server/agent-chat/prompt-resources.ts +183 -57
- package/src/server/agent-chat/script-entries.ts +20 -7
- package/src/server/agent-chat-plugin.ts +27 -0
- package/src/server/auth.ts +38 -32
- package/src/server/core-routes-plugin.ts +229 -179
- package/src/server/credential-provider.ts +196 -44
- package/src/server/embed-session.ts +10 -0
- package/src/server/framework-request-handler.ts +43 -0
- package/src/server/google-auth-plugin.ts +13 -450
- package/src/server/index.ts +4 -1
- package/src/server/onboarding-html.ts +20 -56
- package/src/server/open-route.ts +6 -1
- package/src/server/poll.ts +1 -1
- package/src/server/prompts/framework-core-compact.ts +5 -5
- package/src/server/prompts/framework-core.ts +7 -9
- package/src/server/prompts/shared-rules.ts +20 -9
- package/src/server/request-context.ts +58 -2
- package/src/server/scoped-key-storage.ts +1 -1
- package/src/settings/org-settings.ts +9 -0
- package/src/settings/store.ts +29 -0
- package/src/shared/index.ts +13 -0
- package/src/shared/sign-in-journey.ts +331 -0
- package/src/styles/agent-native.css +8 -0
- package/src/templates/chat/.agents/skills/actions/SKILL.md +19 -1
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +20 -6
- package/src/templates/chat/.agents/skills/security/SKILL.md +2 -0
- package/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/src/templates/chat/.agents/skills/sharing/SKILL.md +228 -0
- package/src/templates/chat/.agents/skills/storing-data/SKILL.md +178 -0
- package/src/templates/chat/AGENTS.md +8 -0
- package/src/templates/chat/app/entry.client.tsx +3 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +19 -1
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +20 -6
- package/src/templates/default/.agents/skills/security/SKILL.md +2 -0
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/src/templates/default/AGENTS.md +68 -195
- package/src/templates/default/app/entry.client.tsx +3 -0
- package/src/templates/default/app/i18n/ar-SA.ts +8 -0
- package/src/templates/default/app/i18n/de-DE.ts +8 -0
- package/src/templates/default/app/i18n/en-US.ts +8 -0
- package/src/templates/default/app/i18n/es-ES.ts +8 -0
- package/src/templates/default/app/i18n/fr-FR.ts +8 -0
- package/src/templates/default/app/i18n/hi-IN.ts +8 -0
- package/src/templates/default/app/i18n/ja-JP.ts +8 -0
- package/src/templates/default/app/i18n/ko-KR.ts +8 -0
- package/src/templates/default/app/i18n/pt-BR.ts +8 -0
- package/src/templates/default/app/i18n/zh-CN.ts +8 -0
- package/src/templates/default/app/i18n/zh-TW.ts +8 -0
- package/src/templates/headless/.agents/skills/actions/SKILL.md +19 -1
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +19 -1
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +2 -0
- package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +100 -0
- package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -1
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +28 -0
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +14 -1
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +20 -6
- package/src/templates/workspace-core/.agents/skills/qa/SKILL.md +6 -3
- package/src/templates/workspace-core/.agents/skills/security/SKILL.md +2 -0
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -3
- package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +7 -3
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +91 -0
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +60 -0
- package/src/templates/workspace-core/AGENTS.md +62 -124
- package/src/templates/workspace-root/AGENTS.md +6 -1
- package/src/triggers/dispatcher.ts +28 -17
- package/src/vite/client.ts +20 -8
- package/corpus/core/src/client/components/MissingKeyCard.tsx +0 -61
- package/corpus/core/src/client/extensions/agent-native-extension-runtime.ts +0 -495
- package/corpus/core/src/client/settings/BackgroundAgentSection.tsx +0 -193
- package/corpus/core/src/client/settings/BrowserSection.tsx +0 -110
- package/corpus/templates/analytics/app/components/InlineMetric.tsx +0 -31
- package/corpus/templates/analytics/app/components/auth/LoginScreen.tsx +0 -4
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +0 -128
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +0 -264
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +0 -84
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +0 -92
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +0 -154
- package/corpus/templates/analytics/app/components/dashboard/StatsCard.tsx +0 -49
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +0 -120
- package/corpus/templates/analytics/server/handlers/dashboard-views.ts +0 -85
- package/corpus/templates/analytics/server/handlers/user-prefs.ts +0 -58
- package/corpus/templates/analytics/server/routes/api/dashboard-views/[dashboardId]/[viewId].delete.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/dashboard-views/[dashboardId].get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/dashboard-views/[dashboardId].post.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/theme.get.ts +0 -17
- package/corpus/templates/analytics/server/routes/api/theme.post.ts +0 -15
- package/corpus/templates/analytics/server/routes/api/user-prefs/[key].delete.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/user-prefs/[key].get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/user-prefs/[key].put.ts +0 -1
- package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +0 -156
- package/corpus/templates/assets/app/components/library/LibraryCard.tsx +0 -213
- package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +0 -49
- package/corpus/templates/calendar/server/routes/api/events/[id].delete.ts +0 -1
- package/corpus/templates/calendar/server/routes/api/events/[id].get.ts +0 -1
- package/corpus/templates/calendar/server/routes/api/events/[id].put.ts +0 -1
- package/corpus/templates/content/app/components/layout/AppLayout.tsx +0 -9
- package/corpus/templates/content/server/routes/api/comments/[id].delete.ts +0 -69
- package/corpus/templates/content/server/routes/api/comments/[id].patch.ts +0 -109
- package/corpus/templates/content/server/routes/api/documents/[id]/versions.get.ts +0 -53
- package/corpus/templates/design/app/components/design/code-workbench/ActivityBar.tsx +0 -85
- package/corpus/templates/design/app/components/design-system/DesignSystemCard.tsx +0 -129
- package/corpus/templates/forms/app/components/layout/AppLayout.tsx +0 -9
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +0 -213
- package/corpus/templates/mail/server/handlers/aliases.ts +0 -98
- package/corpus/templates/mail/server/routes/api/aliases/[id].delete.ts +0 -1
- package/corpus/templates/mail/server/routes/api/aliases/[id].patch.ts +0 -1
- package/corpus/templates/mail/server/routes/api/aliases/index.get.ts +0 -1
- package/corpus/templates/mail/server/routes/api/aliases/index.post.ts +0 -1
- package/corpus/templates/mail/server/routes/api/automations/[id].delete.ts +0 -1
- package/corpus/templates/mail/server/routes/api/automations/[id].patch.ts +0 -1
- package/corpus/templates/mail/server/routes/api/automations/index.get.ts +0 -1
- package/corpus/templates/mail/server/routes/api/automations/index.post.ts +0 -1
- package/corpus/templates/mail/server/routes/api/automations/settings.get.ts +0 -22
- package/corpus/templates/mail/server/routes/api/automations/settings.put.ts +0 -25
- package/corpus/templates/mail/server/routes/api/scheduled-jobs/[id].delete.ts +0 -1
- package/corpus/templates/mail/server/routes/api/scheduled-jobs/[id].patch.ts +0 -1
- package/corpus/templates/mail/server/routes/api/scheduled-jobs/index.get.ts +0 -1
- package/corpus/templates/mail/server/routes/api/scheduled-jobs/index.post.ts +0 -1
- package/corpus/templates/mail/server/routes/api/settings.get.ts +0 -1
- package/corpus/templates/mail/server/routes/api/settings.patch.ts +0 -1
- package/corpus/templates/slides/app/components/deck/BuilderLogo.tsx +0 -22
- package/corpus/templates/slides/app/components/design-system/DesignSystemPreview.tsx +0 -176
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +0 -244
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +0 -84
- package/corpus/templates/slides/server/routes/api/comments/[id].delete.ts +0 -43
- package/corpus/templates/slides/server/routes/api/comments/[id].patch.ts +0 -50
- package/corpus/templates/slides/server/routes/api/decks/[id].delete.ts +0 -1
- package/corpus/templates/slides/server/routes/api/decks/[id].get.ts +0 -1
- package/corpus/templates/slides/server/routes/api/decks/[id].put.ts +0 -1
- package/corpus/templates/slides/server/routes/api/decks/index.get.ts +0 -1
- package/corpus/templates/slides/server/routes/api/decks/index.post.ts +0 -1
- package/dist/client/components/MissingKeyCard.d.ts +0 -7
- package/dist/client/components/MissingKeyCard.d.ts.map +0 -1
- package/dist/client/components/MissingKeyCard.js +0 -32
- package/dist/client/components/MissingKeyCard.js.map +0 -1
- package/dist/client/extensions/agent-native-extension-runtime.d.ts +0 -69
- package/dist/client/extensions/agent-native-extension-runtime.d.ts.map +0 -1
- package/dist/client/extensions/agent-native-extension-runtime.js +0 -348
- package/dist/client/extensions/agent-native-extension-runtime.js.map +0 -1
- package/dist/client/settings/BackgroundAgentSection.d.ts +0 -2
- package/dist/client/settings/BackgroundAgentSection.d.ts.map +0 -1
- package/dist/client/settings/BackgroundAgentSection.js +0 -68
- package/dist/client/settings/BackgroundAgentSection.js.map +0 -1
- package/dist/client/settings/BrowserSection.d.ts +0 -2
- package/dist/client/settings/BrowserSection.d.ts.map +0 -1
- package/dist/client/settings/BrowserSection.js +0 -40
- package/dist/client/settings/BrowserSection.js.map +0 -1
- package/dist/templates/chat/.react-router/types/+server-build.d.ts +0 -18
- package/dist/templates/chat/.react-router/types/app/+types/root.ts +0 -68
- package/src/client/components/MissingKeyCard.tsx +0 -61
- package/src/client/extensions/agent-native-extension-runtime.ts +0 -495
- package/src/client/settings/BackgroundAgentSection.tsx +0 -193
- package/src/client/settings/BrowserSection.tsx +0 -110
- package/src/templates/chat/.react-router/types/+server-build.d.ts +0 -18
- package/src/templates/chat/.react-router/types/app/+types/root.ts +0 -68
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: shadcn-ui
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
The shadcn CLI, component composition, theming, and registry workflow. Use
|
|
5
|
+
when adding, replacing, upgrading, or debugging a shadcn/ui primitive itself,
|
|
6
|
+
or when changing a theme or registry. Do not load it for ordinary edits to a
|
|
7
|
+
file that happens to import a shadcn component.
|
|
7
8
|
scope: dev
|
|
8
9
|
source: https://ui.shadcn.com/docs/skills
|
|
10
|
+
local-changes: >-
|
|
11
|
+
Description narrowed deliberately; an upstream sync must not restore the
|
|
12
|
+
"any project with a components.json file" trigger.
|
|
9
13
|
metadata:
|
|
10
14
|
internal: true
|
|
11
15
|
---
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sharing
|
|
3
|
+
description: >-
|
|
4
|
+
Framework-level sharing and privacy for user-authored resources
|
|
5
|
+
(dashboards, documents, forms, decks, etc.). Use when making a resource
|
|
6
|
+
table ownable, wiring list/read/update access checks, or dropping the
|
|
7
|
+
standard share dialog into a template.
|
|
8
|
+
scope: dev
|
|
9
|
+
metadata:
|
|
10
|
+
internal: true
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Sharing — Private by Default, Explicit Share
|
|
14
|
+
|
|
15
|
+
## Rule
|
|
16
|
+
|
|
17
|
+
Any resource a user **creates** (dashboards, documents, forms, decks, compositions, booking links, issues, analyses) is **private to the creator** by default and visible to others only when they have been **explicitly shared** with or when the creator changes visibility to `org` or `public`.
|
|
18
|
+
|
|
19
|
+
This is the framework-level primitive. Every ownable resource gets it for free — same API, same UI, same skill.
|
|
20
|
+
|
|
21
|
+
## Concepts
|
|
22
|
+
|
|
23
|
+
### Three visibility levels
|
|
24
|
+
|
|
25
|
+
- **`private`** — owner + explicit share grants only. Default.
|
|
26
|
+
- **`org`** — owner + explicit grants + anyone in the same org (read-only).
|
|
27
|
+
- **`public`** — owner + explicit grants + **anyone with the link** (read-only). Public docs do NOT appear in other users' list/sidebar/search results — `accessFilter` omits them by default. They're reachable by id (`resolveAccess` admits them) so direct links and SSR routes like `/p/:id` keep working. If a list endpoint legitimately needs cross-user public discovery (a template gallery, etc.), pass `accessFilter(table, shares, ctx, minRole, { includePublic: true })`.
|
|
28
|
+
|
|
29
|
+
Visibility is coarse. Explicit share grants are fine-grained (per user or per org).
|
|
30
|
+
|
|
31
|
+
### Roles on a share grant
|
|
32
|
+
|
|
33
|
+
- **`viewer`** — read only.
|
|
34
|
+
- **`editor`** — read + write.
|
|
35
|
+
- **`admin`** — read + write + manage shares. Does NOT replace the single `owner_email` on the resource.
|
|
36
|
+
|
|
37
|
+
### Anonymous public URLs stay separate
|
|
38
|
+
|
|
39
|
+
Form "publish" slugs, booking-link slugs, any feature that exposes a URL to unauthenticated users — these are a different axis and are NOT controlled by the sharing system. Keep them alongside it.
|
|
40
|
+
|
|
41
|
+
## Make a resource ownable
|
|
42
|
+
|
|
43
|
+
In your template's `server/db/schema.ts`:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import {
|
|
47
|
+
table,
|
|
48
|
+
text,
|
|
49
|
+
integer,
|
|
50
|
+
now,
|
|
51
|
+
ownableColumns,
|
|
52
|
+
createSharesTable,
|
|
53
|
+
} from "@agent-native/core/db/schema";
|
|
54
|
+
|
|
55
|
+
export const decks = table("decks", {
|
|
56
|
+
id: text("id").primaryKey(),
|
|
57
|
+
title: text("title").notNull(),
|
|
58
|
+
data: text("data").notNull(),
|
|
59
|
+
createdAt: text("created_at").notNull().default(now()),
|
|
60
|
+
updatedAt: text("updated_at").notNull().default(now()),
|
|
61
|
+
...ownableColumns(), // adds owner_email, org_id, visibility
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const deckShares = createSharesTable("deck_shares");
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then register it **in `server/db/index.ts`** (not the schema file — keeps the schema file free of the `getDb` closure and avoids circular imports):
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
// server/db/index.ts
|
|
71
|
+
import * as schema from "./schema.js";
|
|
72
|
+
import { createGetDb } from "@agent-native/core/db";
|
|
73
|
+
import { registerShareableResource } from "@agent-native/core/sharing";
|
|
74
|
+
|
|
75
|
+
export const getDb = createGetDb(schema);
|
|
76
|
+
export { schema };
|
|
77
|
+
|
|
78
|
+
registerShareableResource({
|
|
79
|
+
type: "deck",
|
|
80
|
+
resourceTable: schema.decks,
|
|
81
|
+
sharesTable: schema.deckShares,
|
|
82
|
+
displayName: "Deck",
|
|
83
|
+
titleColumn: "title",
|
|
84
|
+
getResourcePath: (deck) => `/deck/${deck.id}`,
|
|
85
|
+
getDb,
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The `type` string is the stable id the UI and actions use. `getDb` is required — the framework-level share actions use it to reach your template's DB.
|
|
90
|
+
|
|
91
|
+
### Restricting public visibility and cross-org user shares
|
|
92
|
+
|
|
93
|
+
Some resources should NOT be reachable by an arbitrary authenticated user even with the link, and should NOT be shareable to an email outside the org. Two optional registration flags lock these axes down:
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
registerShareableResource({
|
|
97
|
+
type: "extension",
|
|
98
|
+
// ...
|
|
99
|
+
allowPublic: false, // hides "Public" in the share dialog and rejects it server-side
|
|
100
|
+
requireOrgMemberForUserShares: true, // user shares must target an org member or pending invitee
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- **`allowPublic: false`** — `set-resource-visibility('public')` throws `ForbiddenError`, `accessFilter` / `resolveAccess` treat any stored `'public'` row as private (defense in depth against bad data), and the share popover hides the "Public" option. `list-resource-shares` returns `policy.allowPublic: false` so the UI follows the server.
|
|
105
|
+
- **`requireOrgMemberForUserShares: true`** — `share-resource` looks up `principalId` in `org_members` and `org_invitations` (pending) for the resource's `orgId` and rejects user shares to anyone else. The same flag also pins `principalType: "org"` shares to the resource's own org — sharing to a *different* org would let that org's members run code in the viewer's auth context (same threat model as a public extension). (The flag name is kept for backward compatibility; treat it as "lock both user and org shares to the resource's org".)
|
|
106
|
+
|
|
107
|
+
Use both for resources that execute code or expose privileged data with the *viewer's* credentials. Extensions ship with both set: an extension's HTML calls actions / SQL / the secrets-injecting proxy as the viewer, so a public or cross-org-shared extension would let a stranger run arbitrary code with someone else's auth context. `scripts/guard-extension-no-public.mjs` (CI + `pnpm prep`) statically enforces that the extension registration keeps both flags set.
|
|
108
|
+
|
|
109
|
+
Defaults match historical behaviour: `allowPublic: true`, `requireOrgMemberForUserShares: false`. Resources that don't set the flags work as before.
|
|
110
|
+
|
|
111
|
+
## Filter list/read queries
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
import { accessFilter } from "@agent-native/core/sharing";
|
|
115
|
+
|
|
116
|
+
const rows = await db
|
|
117
|
+
.select()
|
|
118
|
+
.from(schema.decks)
|
|
119
|
+
.where(accessFilter(schema.decks, schema.deckShares));
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`accessFilter` admits rows the current user owns, has been shared on, or that the user can reach via `org` visibility. `public` rows are NOT admitted by default — see the visibility section above for why and how to opt in.
|
|
123
|
+
|
|
124
|
+
## Guard write actions
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
128
|
+
|
|
129
|
+
export default defineAction({
|
|
130
|
+
schema: z.object({ id: z.string(), title: z.string() }),
|
|
131
|
+
run: async (args) => {
|
|
132
|
+
await assertAccess("deck", args.id, "editor");
|
|
133
|
+
// ...proceed
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
For delete actions use `"admin"` (or fold in `"owner"` to require the real owner).
|
|
139
|
+
|
|
140
|
+
## Create actions must set owner
|
|
141
|
+
|
|
142
|
+
When inserting a new row, fill `ownerEmail` and `orgId` from the request context:
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
import {
|
|
146
|
+
getRequestUserEmail,
|
|
147
|
+
getRequestOrgId,
|
|
148
|
+
} from "@agent-native/core/server/request-context";
|
|
149
|
+
|
|
150
|
+
const ownerEmail = getRequestUserEmail();
|
|
151
|
+
// Never fall back to a sentinel like "local@localhost" — that pools every
|
|
152
|
+
// unauthenticated write into one shared tenant (see the 2026-04-29 leak and
|
|
153
|
+
// guard-no-localhost-fallback). Throw / 401 when there is no session instead.
|
|
154
|
+
if (!ownerEmail) throw new Error("Not authenticated");
|
|
155
|
+
|
|
156
|
+
await db.insert(schema.decks).values({
|
|
157
|
+
id: nanoid(),
|
|
158
|
+
title,
|
|
159
|
+
data,
|
|
160
|
+
ownerEmail,
|
|
161
|
+
orgId: getRequestOrgId(),
|
|
162
|
+
// visibility defaults to 'private'
|
|
163
|
+
// ...
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Drop in the share UI
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
import { ShareButton } from "@agent-native/core/client/sharing";
|
|
171
|
+
|
|
172
|
+
// In the resource's header/toolbar:
|
|
173
|
+
<ShareButton
|
|
174
|
+
resourceType="deck"
|
|
175
|
+
resourceId={deck.id}
|
|
176
|
+
resourceTitle={deck.title}
|
|
177
|
+
/>;
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
For list views, show `<VisibilityBadge visibility={row.visibility} />` next to each resource.
|
|
181
|
+
|
|
182
|
+
## Actions available everywhere
|
|
183
|
+
|
|
184
|
+
The framework auto-mounts these actions in every template — no per-template boilerplate:
|
|
185
|
+
|
|
186
|
+
| Action | Args | Purpose |
|
|
187
|
+
| -------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
188
|
+
| `share-resource` | `resourceType, resourceId, principalType, principalId, role, notify?, resourceUrl?` | Grant a user or org access. `notify` defaults to true for individual user shares; `resourceUrl` can provide the direct app link used in the notification email. |
|
|
189
|
+
| `unshare-resource` | `resourceType, resourceId, principalType, principalId` | Revoke access. |
|
|
190
|
+
| `list-resource-shares` | `resourceType, resourceId` | Current visibility + all share grants. |
|
|
191
|
+
| `set-resource-visibility` | `resourceType, resourceId, visibility` | Change to `private` / `org` / `public`. |
|
|
192
|
+
|
|
193
|
+
Both the agent and the UI use these same actions. The agent calls them as tools;
|
|
194
|
+
UI code should use `ShareButton` / `ShareDialog` or the action client hooks
|
|
195
|
+
instead of hand-writing route calls.
|
|
196
|
+
|
|
197
|
+
## Migration pattern for existing tables
|
|
198
|
+
|
|
199
|
+
When retrofitting an existing resource table:
|
|
200
|
+
|
|
201
|
+
1. Add `owner_email`, `org_id`, `visibility` columns (defaults `'local@localhost'`, `NULL`, `'private'`).
|
|
202
|
+
2. Backfill `owner_email` from any prior creator trail; otherwise leave the default.
|
|
203
|
+
3. Add the companion `{type}_shares` table.
|
|
204
|
+
4. Register via `registerShareableResource`.
|
|
205
|
+
5. Update list/read actions to use `accessFilter`.
|
|
206
|
+
6. Update update/delete actions to `assertAccess` with the correct role.
|
|
207
|
+
7. Add `<ShareButton>` to the resource header.
|
|
208
|
+
8. Add `getResourcePath` in the registration so agent-triggered shares can email a direct link even when no UI supplied `resourceUrl`.
|
|
209
|
+
|
|
210
|
+
## Templates that opt out
|
|
211
|
+
|
|
212
|
+
Sharing doesn't apply to:
|
|
213
|
+
|
|
214
|
+
- **Personal-data apps** (mail, macros) — user-scoped by design.
|
|
215
|
+
- **External source-of-truth apps** (issues → Jira, recruiting → Greenhouse) — ACL lives in the upstream system.
|
|
216
|
+
- **Demo/boilerplate** (starter) — no resources.
|
|
217
|
+
|
|
218
|
+
For these, add a short note to the template's `AGENTS.md` explaining why.
|
|
219
|
+
|
|
220
|
+
## Analytics (follow-up)
|
|
221
|
+
|
|
222
|
+
Dashboards and analyses in the `analytics` template currently live in the settings KV store (`u:<email>:dashboard-*` keys), not SQL. Sharing requires either migrating them to SQL tables (then applying this skill) or extending the settings store with a parallel share overlay. This is a tracked follow-up — see the analytics template's `AGENTS.md`.
|
|
223
|
+
|
|
224
|
+
## Debugging
|
|
225
|
+
|
|
226
|
+
- `ForbiddenError` from an action means the current user isn't owner / hasn't been shared / can't meet the role bar.
|
|
227
|
+
- If the agent can't see a resource it just created, check that the insert actually set `owner_email` from the request context.
|
|
228
|
+
- If a share doesn't take effect in the UI, confirm the template's `list-*` action uses `accessFilter` — the share rows are there but nothing is reading them yet.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: store-conventions
|
|
3
|
+
description: >-
|
|
4
|
+
Naming and transaction rules for server store functions in
|
|
5
|
+
`server/**/store.ts`. Use when adding, renaming, or calling a store function,
|
|
6
|
+
writing a bulk or singular CRUD helper, or wiring a query into a transaction.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Store Functions And Transactions
|
|
10
|
+
|
|
11
|
+
Every store in `server/**/store.ts` exposes full CRUD for its entity: `create`,
|
|
12
|
+
`get` + `list`, `update`, `delete`. Naming follows three rules:
|
|
13
|
+
|
|
14
|
+
- **Unsuffixed means "by ids."** `deleteCustomFieldValues({ ids })` deletes by
|
|
15
|
+
value id. Any other selector is explicit: `deleteCustomFieldValuesByTaskIds`,
|
|
16
|
+
`deleteCustomFieldValuesByFieldIds`, `updateCustomFieldValuesByTaskId`.
|
|
17
|
+
- **The plural is the implementation; the singular delegates to it** with a
|
|
18
|
+
one-element id list. `deleteTask` calls `deleteTasks`, `updateCustomFieldValue`
|
|
19
|
+
calls `updateCustomFieldValues`. Never write the same query twice.
|
|
20
|
+
- **`list` takes every selector as optional** rather than splitting into `ByX`
|
|
21
|
+
variants — `listStoredItems({ ids?, includeDone? })`,
|
|
22
|
+
`listCustomFieldValues({ ids?, taskIds?, fieldIds? })`.
|
|
23
|
+
|
|
24
|
+
Where a patch is genuinely per-row (custom field title/config, a task's field
|
|
25
|
+
values), the bulk form takes one entry per id instead of one patch across ids.
|
|
26
|
+
Upsert counts as create; do not add a separate `create` for upserted rows.
|
|
27
|
+
|
|
28
|
+
Action names are a separate public surface and do not follow this convention:
|
|
29
|
+
the `bulk-delete-tasks` action still exists and calls `deleteTasks`.
|
|
30
|
+
|
|
31
|
+
Every function takes the database handle as an **optional trailing argument**,
|
|
32
|
+
so it runs standalone or joins a caller's transaction. The handle is defined
|
|
33
|
+
once, in `server/db/transaction.ts`:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
export type DbHandle = Pick<
|
|
37
|
+
ReturnType<typeof getDb>,
|
|
38
|
+
"select" | "insert" | "update" | "delete" | "transaction"
|
|
39
|
+
>;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Related Skills
|
|
43
|
+
|
|
44
|
+
- **actions** — actions are the callers that compose these store functions.
|
|
45
|
+
- **task-inbox-workflow** — the task/inbox operations backed by these stores.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: storing-data
|
|
3
|
+
description: >-
|
|
4
|
+
How to store application data in agent-native apps. All data lives in SQL.
|
|
5
|
+
Use when adding data models, deciding where to store data, or reading/writing
|
|
6
|
+
application data.
|
|
7
|
+
scope: dev
|
|
8
|
+
metadata:
|
|
9
|
+
internal: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Storing Data — SQL is the Source of Truth
|
|
13
|
+
|
|
14
|
+
## Rule
|
|
15
|
+
|
|
16
|
+
All application data lives in **SQL** (SQLite locally, persistent database in production). The agent and UI share the same database. SQL stores structured records, metadata, references, and searchable text — not large raw file payloads. Do not store durable app data in the filesystem unless the app is explicitly running a Local File Mode artifact flow described below.
|
|
17
|
+
|
|
18
|
+
Large binary or file-like payloads (images, video/audio, PDFs, ZIPs, screenshots, session replay chunks, thumbnails, generated assets, `data:` URLs, and base64 file bodies) must go through configured file/blob storage such as `uploadFile()` or `putPrivateBlob()`. Persist only the returned URL, asset id, or opaque blob handle in SQL. If storage is unavailable in hosted or persistent-database mode, fail closed with setup guidance instead of falling back to base64 in `application_state`, `settings`, `resources`, or app tables. Local SQLite-only dev fallbacks may exist for tiny assets, but they must be capped, documented as dev-only, and kept off hot list/read paths.
|
|
19
|
+
|
|
20
|
+
**Local File Mode exception:** some artifact apps (Content, Plans, Slides, Dashboards, Designs, etc.) can intentionally use repo files as the source of truth for the artifact itself. This must be explicit via `agent-native.json`, `AGENT_NATIVE_MODE=local-files`, or an app-owned local-file action helper. In that mode, the UI and agent still go through app actions, but those actions read/write scoped files through `@agent-native/core/local-artifacts` instead of SQL rows. App state, auth, settings, credentials, collaboration metadata, and hosted database mode remain SQL. File-to-database or file-to-provider synchronization is an explicit sync step, not an implicit side effect of editing.
|
|
21
|
+
|
|
22
|
+
When you add a data model, a list, or a read path, also follow the `performance` skill: project only the columns a list renders, index the columns hot queries filter/sort on, and avoid query waterfalls — so apps stay fast as data grows.
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
Agent-native apps use Drizzle ORM over the configured SQL backend. Local development works out of the box with a SQLite file at `data/app.db`; production and shared preview deploys need a persistent `DATABASE_URL` because container/serverless filesystems can reset. The code should behave the same across backends, but the local SQLite file is not durable once deployed.
|
|
27
|
+
|
|
28
|
+
For app code, use Drizzle's schema/query DSL by default. Raw SQL is an escape hatch for additive migrations, health checks, or one-off maintenance, not the normal way to build features.
|
|
29
|
+
|
|
30
|
+
### Naming migrations
|
|
31
|
+
|
|
32
|
+
When you add an entry to a `runMigrations([...])` list (`@agent-native/core/db`), always give it a unique `name:` slug (e.g. `name: "analytics-alert-rules-table"`) alongside its `version`. Never renumber or reuse version numbers on existing entries.
|
|
33
|
+
|
|
34
|
+
Why: version numbers alone are not a safe identity. Two branches that each independently extend the same migration list can ship different DDL under the same version numbers — whichever branch deploys first "claims" those version numbers in the bookkeeping table, and the other branch's DDL is silently treated as already applied even though it never ran. This exact collision took down analytics: parallel branches both extended their migration list through v75-v83 with different DDL, so `analytics_alert_rules`, `analytics_alert_incidents`, and `session_recordings.network_error_count` never made it to production despite the bookkeeping table showing every version as applied. A `name:` slug is tracked independently of version numbers, so it applies exactly once per database regardless of what any other branch already recorded.
|
|
35
|
+
|
|
36
|
+
Existing unnamed migrations don't need to be renamed retroactively (the two gating strategies coexist), but any new entry should always carry a name.
|
|
37
|
+
|
|
38
|
+
### Core SQL Stores (auto-created, available in all templates)
|
|
39
|
+
|
|
40
|
+
| Store | Purpose | Access |
|
|
41
|
+
| ------------------- | ---------------------------------------------------- | ------------------------------------------ |
|
|
42
|
+
| `application_state` | Ephemeral UI state (compose windows, navigation) | `readAppState()` / `writeAppState()` |
|
|
43
|
+
| `settings` | Persistent KV config (preferences, app settings) | `getSetting()` / `putSetting()` |
|
|
44
|
+
| `oauth_tokens` | OAuth credentials | `@agent-native/core/oauth-tokens` |
|
|
45
|
+
| `sessions` | Auth sessions | `@agent-native/core/server` |
|
|
46
|
+
|
|
47
|
+
### Domain Data (per-template)
|
|
48
|
+
|
|
49
|
+
Define schema with the framework Drizzle helpers in `server/db/schema.ts`. Get a database instance with `const db = getDb()` from `server/db/index.ts`. All queries are async.
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { eq } from "drizzle-orm";
|
|
53
|
+
import { table, text, integer, now } from "@agent-native/core/db/schema";
|
|
54
|
+
|
|
55
|
+
export const tasks = table("tasks", {
|
|
56
|
+
id: text("id").primaryKey(),
|
|
57
|
+
title: text("title").notNull(),
|
|
58
|
+
completed: integer("completed", { mode: "boolean" })
|
|
59
|
+
.notNull()
|
|
60
|
+
.default(false),
|
|
61
|
+
createdAt: text("created_at").notNull().default(now()),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const rows = await db.select().from(tasks).where(eq(tasks.id, taskId));
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Never import `sqliteTable` / `pgTable` or column helpers from `drizzle-orm/sqlite-core` or `drizzle-orm/pg-core` in app templates. Use `@agent-native/core/db/schema` so the same schema can run against SQLite, Postgres, libSQL/Turso, D1, and other supported backends.
|
|
68
|
+
|
|
69
|
+
| Template | Tables |
|
|
70
|
+
| ------------ | --------------------------------------------- |
|
|
71
|
+
| **Mail** | emails, labels (+ Gmail API when connected) |
|
|
72
|
+
| **Calendar** | events, bookings |
|
|
73
|
+
| **Forms** | forms, responses |
|
|
74
|
+
| **Content** | documents |
|
|
75
|
+
| **Slides** | decks (JSON stored in SQL) |
|
|
76
|
+
| **Videos** | compositions in registry + localStorage |
|
|
77
|
+
|
|
78
|
+
### Agent Access
|
|
79
|
+
|
|
80
|
+
The agent uses app-specific actions to read/write the database. Core DB scripts are for inspection and maintenance, not for implementing normal product behavior:
|
|
81
|
+
|
|
82
|
+
- `pnpm action db-schema` — Show all tables, columns, types
|
|
83
|
+
- `pnpm action db-query --sql "SELECT * FROM forms"` — Run SELECT queries
|
|
84
|
+
- `pnpm action db-exec --sql "UPDATE ..."` — Last-resort ad-hoc maintenance for short columns, multi-column writes, or computed updates when no domain action exists. For several related writes, prefer `--statements '[{"sql":"...","args":[...]}]'` so they run sequentially in one transaction. Schema changes are blocked; use reviewed additive migrations/startup code instead.
|
|
85
|
+
- `pnpm action db-patch --table <t> --column <c> --where "<clause>" --find "<old>" --replace "<new>"` — **Surgical search/replace on a large text column.** Sends the diff instead of re-transmitting the whole value, so it's dramatically more token-efficient than `db-exec UPDATE` when editing multi-kilobyte documents, slide HTML, dashboard/form JSON, etc. Targets exactly one row per call — narrow `--where` by primary key. Supports `--edits '[{find,replace},...]'` for batch edits and `--all` to replace every occurrence.
|
|
86
|
+
- App-specific actions for domain operations — **always prefer these over raw SQL when one exists.** They encode business rules, power the client action hooks, and for editor-backed tables (documents, slides) also push live Yjs updates to open collaborative editors. `db-patch` is the generic fallback for tables without a dedicated edit action.
|
|
87
|
+
|
|
88
|
+
**For one-off maintenance, how to choose between `db-exec UPDATE` and `db-patch`:**
|
|
89
|
+
|
|
90
|
+
| Scenario | Use |
|
|
91
|
+
| -------------------------------------------------------------- | ------------ |
|
|
92
|
+
| `SET status = 'published'` on one row | `db-exec` |
|
|
93
|
+
| `SET calories = calories + 50` | `db-exec` |
|
|
94
|
+
| Updating several columns at once | `db-exec` |
|
|
95
|
+
| Inserting/updating several rows as one logical operation | `db-exec --statements` |
|
|
96
|
+
| Fixing a typo in a 50KB markdown document's `content` column | `db-patch` |
|
|
97
|
+
| Changing a single key in a dashboard's JSON blob | `db-patch` |
|
|
98
|
+
| Tweaking one paragraph of slide HTML stored in `decks.data` | `db-patch` |
|
|
99
|
+
| Any edit where you'd otherwise re-send thousands of characters | `db-patch` |
|
|
100
|
+
|
|
101
|
+
All of these honor the per-user / per-org data scoping — you can't read or write rows outside the current user's data, regardless of which tool you choose.
|
|
102
|
+
|
|
103
|
+
### Frontend Access
|
|
104
|
+
|
|
105
|
+
The frontend calls actions using React Query hooks from the client API. The framework owns the HTTP transport behind these hooks, so components should not call action routes with raw `fetch`.
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { useActionQuery, useActionMutation } from "@agent-native/core/client/hooks";
|
|
109
|
+
|
|
110
|
+
// Read data
|
|
111
|
+
const { data } = useActionQuery("list-meals", { date: "2025-01-01" });
|
|
112
|
+
|
|
113
|
+
// Write data
|
|
114
|
+
const { mutate } = useActionMutation("log-meal");
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Actions are the **preferred way** for the frontend to access data. You rarely need custom `/api/` routes — only for file uploads, streaming, webhooks, or OAuth callbacks.
|
|
118
|
+
|
|
119
|
+
### Production / Cloud Deployment
|
|
120
|
+
|
|
121
|
+
Local SQLite works out of the box for development. To deploy to production or any environment where data must survive restarts:
|
|
122
|
+
|
|
123
|
+
1. Set `DATABASE_URL` to a persistent SQL database.
|
|
124
|
+
2. Set `DATABASE_AUTH_TOKEN` only when the provider requires a separate token, such as Turso/libSQL.
|
|
125
|
+
3. No code changes should be needed when the schema and queries stay portable.
|
|
126
|
+
|
|
127
|
+
Turso is one valid option, not the required option. Common choices include Neon or Supabase Postgres, Turso/libSQL, plain Postgres, durable SQLite, Cloudflare D1 bindings, and managed platform SQL environments when available.
|
|
128
|
+
|
|
129
|
+
### Real-time Sync
|
|
130
|
+
|
|
131
|
+
Polling streams database changes to the UI. When the agent writes to the database via scripts, the UI updates automatically via `useDbSync()` which invalidates React Query caches.
|
|
132
|
+
|
|
133
|
+
## Do
|
|
134
|
+
|
|
135
|
+
- Use Drizzle ORM for structured domain data (forms, bookings, documents)
|
|
136
|
+
- Use Drizzle query builder methods (`select`, `insert`, `update`, `delete`) and portable operators from `drizzle-orm` (`eq`, `and`, `or`, `inArray`, `desc`, etc.) for app reads/writes
|
|
137
|
+
- Use framework schema helpers from `@agent-native/core/db/schema`, not dialect-specific Drizzle imports
|
|
138
|
+
- Use the `settings` store for app configuration and user preferences
|
|
139
|
+
- Use `application-state` for ephemeral UI state that the agent and UI share
|
|
140
|
+
- Use `oauth-tokens` for OAuth credentials
|
|
141
|
+
- Use `uploadFile()` or `putPrivateBlob()` for large files/blob data and store only URLs, ids, or handles in SQL
|
|
142
|
+
- Use core DB scripts (`db-schema`, `db-query`, `db-exec`, `db-patch`) for ad-hoc database operations
|
|
143
|
+
- Use `db-exec --statements` instead of several separate `db-exec` calls for related writes; it is faster and rolls back the whole batch if one statement fails
|
|
144
|
+
- Reach for `db-patch` instead of `db-exec UPDATE` whenever you're making a small change to a large text/JSON column — it's much cheaper on tokens
|
|
145
|
+
|
|
146
|
+
## Don't
|
|
147
|
+
|
|
148
|
+
- Don't store structured app data as JSON files
|
|
149
|
+
- Don't store app state in localStorage, sessionStorage, or cookies (except for UI-only preferences like sidebar width)
|
|
150
|
+
- Don't keep state only in memory (server variables, global stores)
|
|
151
|
+
- Don't use Redis or any external state store for app data
|
|
152
|
+
- Don't store large files, base64 blobs, `data:` URLs, screenshots, videos, audio, PDFs, ZIPs, or session replay chunks directly in SQL rows, `application_state`, `settings`, or `resources`
|
|
153
|
+
- Don't implement product features with raw SQL or `getDbExec()` when Drizzle can express the query
|
|
154
|
+
- Don't write SQLite-only or Postgres-only SQL in app code
|
|
155
|
+
- Don't interpolate user input directly into SQL queries — use Drizzle ORM's query builder
|
|
156
|
+
|
|
157
|
+
## Security
|
|
158
|
+
|
|
159
|
+
- **SQL injection** — Use Drizzle ORM's query builder, never raw string interpolation for SQL queries
|
|
160
|
+
- **Validate before writing** — Check data shape before writing, especially for user-submitted data
|
|
161
|
+
|
|
162
|
+
## Application State and Context Awareness
|
|
163
|
+
|
|
164
|
+
When storing app-state, include **navigation state** — the agent needs to know what the user is looking at. The `application_state` table holds ephemeral UI state that both the agent and UI share. Key patterns:
|
|
165
|
+
|
|
166
|
+
- **`navigation` key** — the UI writes current view and selection on every route change. The agent reads this before acting.
|
|
167
|
+
- **`navigate` key** — the agent writes one-shot commands to navigate the UI. The UI processes and deletes them.
|
|
168
|
+
- **Domain-specific keys** (e.g., `compose-{id}`) — bidirectional state for features like email drafts.
|
|
169
|
+
|
|
170
|
+
When adding a new data model or feature, also consider what navigation and selection state needs to be exposed via application-state. See the **context-awareness** skill for the full pattern.
|
|
171
|
+
|
|
172
|
+
## Related Skills
|
|
173
|
+
|
|
174
|
+
- **context-awareness** — How to expose navigation and selection state via application-state
|
|
175
|
+
- **real-time-sync** — Set up polling so the UI updates when the database changes
|
|
176
|
+
- **actions** — Create actions with `defineAction` to query the database
|
|
177
|
+
- **client-methods** — Keep route details behind named client helpers/hooks
|
|
178
|
+
- **self-modifying-code** — The agent can also modify the app's source code
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-inbox-workflow
|
|
3
|
+
description: >-
|
|
4
|
+
How the agent captures, reads, edits, reorders, and deletes tasks and inbox
|
|
5
|
+
items using view-screen context. Use when the user mentions "this task",
|
|
6
|
+
"these tasks", "this inbox item", or "the list", or asks to capture, show,
|
|
7
|
+
review, reorder, complete, or delete tasks or inbox items.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Task And Inbox Agent Workflow
|
|
11
|
+
|
|
12
|
+
## Rule
|
|
13
|
+
|
|
14
|
+
Read the user's visible context with `view-screen` before acting on anything
|
|
15
|
+
referential, capture ambiguous input into the inbox rather than the task list,
|
|
16
|
+
and never delete without explicit confirmation in chat.
|
|
17
|
+
|
|
18
|
+
## Capture
|
|
19
|
+
|
|
20
|
+
- Capture in chat → `create-inbox-item` by default; use `create-task` only when
|
|
21
|
+
the user asks to add directly to the task list.
|
|
22
|
+
|
|
23
|
+
## Read the screen before ambiguous edits
|
|
24
|
+
|
|
25
|
+
- Call `view-screen` before ambiguous edits when the user says "this task",
|
|
26
|
+
"these tasks", "this inbox item", or "the list".
|
|
27
|
+
- On `/tasks` or `/inbox`, `view-screen` returns `list` (with `items`), optional
|
|
28
|
+
`selectedItem` (`inListSnapshot`), and optional `selection`
|
|
29
|
+
(`selectedItems`, `selectedIdsNotInVisibleList`) when bulk-select is active.
|
|
30
|
+
- Prefer `selection.selectedItems` when the user has UI rows selected; fall back
|
|
31
|
+
to `selectedItem` for a single deep-link highlight.
|
|
32
|
+
- Use `navigation.includeDone` and `list` from `view-screen` to match what the
|
|
33
|
+
user sees on `/tasks`.
|
|
34
|
+
|
|
35
|
+
## Showing the list from another view
|
|
36
|
+
|
|
37
|
+
- When the user asks to see, review, or manage tasks while `navigation.view` is
|
|
38
|
+
not `tasks`, call `render-task-list-inline` instead of navigating away. Pass
|
|
39
|
+
`includeDone: true` when completed tasks should be included. The widget can
|
|
40
|
+
add tasks and toggle completion through the existing task actions.
|
|
41
|
+
- When the user is already on `/tasks`, use `view-screen` and the native task
|
|
42
|
+
list for task-list context unless the user explicitly asks for an inline
|
|
43
|
+
widget.
|
|
44
|
+
|
|
45
|
+
## Reordering
|
|
46
|
+
|
|
47
|
+
- Use `reorder-tasks` with the same `includeDone` flag when moving tasks in the
|
|
48
|
+
visible list.
|
|
49
|
+
- Use `reorder-inbox-items` with the inbox item ids in the desired
|
|
50
|
+
top-to-bottom order.
|
|
51
|
+
|
|
52
|
+
## Deleting
|
|
53
|
+
|
|
54
|
+
- `delete-task`, `bulk-delete-tasks`, `delete-inbox-item`, and
|
|
55
|
+
`bulk-delete-inbox-items` only after explicit user confirmation in chat.
|
|
56
|
+
|
|
57
|
+
## Task detail extension slot
|
|
58
|
+
|
|
59
|
+
The task detail panel exposes `tasks.task-detail.bottom` as an `ExtensionSlot`
|
|
60
|
+
with `slotContext` containing `taskId`, `title`, `done`, and `fieldValues`.
|
|
61
|
+
|
|
62
|
+
## Related Skills
|
|
63
|
+
|
|
64
|
+
- **custom-fields** — custom field definitions, values, and task-card visibility.
|
|
65
|
+
- **action-reference** — the full action table with HTTP methods and arguments.
|
|
66
|
+
- **store-conventions** — the server store functions these actions call.
|