@agent-native/core 0.164.11 → 0.164.12

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.
Files changed (65) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +84 -0
  3. package/corpus/templates/calendar/AGENTS.md +5 -0
  4. package/corpus/templates/calendar/actions/delete-event.ts +1 -1
  5. package/corpus/templates/calendar/actions/delete-events.ts +508 -0
  6. package/corpus/templates/calendar/actions/event-action-helpers.ts +1 -1
  7. package/corpus/templates/calendar/actions/list-events.ts +53 -0
  8. package/corpus/templates/calendar/changelog/2026-08-18-the-agent-can-now-remove-many-meetings-at-once-such-as-every.md +6 -0
  9. package/corpus/templates/calendar/server/lib/event-weekday.ts +112 -0
  10. package/corpus/templates/factory/AGENTS.md +2 -1
  11. package/corpus/templates/factory/actions/get-factory-graph-version.ts +69 -0
  12. package/corpus/templates/factory/actions/list-factory-graph-versions.ts +82 -0
  13. package/corpus/templates/factory/actions/restore-factory-graph-version.ts +163 -0
  14. package/corpus/templates/factory/actions/save-factory-graph.ts +93 -60
  15. package/corpus/templates/factory/app/components/factory/FactoryHistoryView.tsx +709 -0
  16. package/corpus/templates/factory/app/components/factory/FactoryInspector.tsx +62 -2
  17. package/corpus/templates/factory/app/components/ui/alert-dialog.tsx +1 -0
  18. package/corpus/templates/factory/app/i18n/en-US.ts +43 -0
  19. package/corpus/templates/factory/app/routes/factory.tsx +115 -15
  20. package/corpus/templates/factory/server/plugins/agent-chat.ts +3 -1
  21. package/dist/collab/awareness.d.ts +2 -2
  22. package/dist/collab/struct-routes.d.ts +1 -1
  23. package/dist/notifications/routes.d.ts +3 -3
  24. package/dist/observability/routes.d.ts +3 -3
  25. package/dist/progress/routes.d.ts +1 -1
  26. package/dist/secrets/routes.d.ts +9 -9
  27. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  28. package/dist/server/realtime-token.d.ts +1 -1
  29. package/docs/content/actions-access-control.mdx +136 -2
  30. package/docs/content/actions-agent-tools.mdx +101 -0
  31. package/docs/content/actions-defining.mdx +2 -2
  32. package/docs/content/audit-log.mdx +1 -1
  33. package/docs/content/authentication.mdx +1 -1
  34. package/docs/content/cloudflare.mdx +43 -0
  35. package/docs/content/creating-templates.mdx +1 -1
  36. package/docs/content/deploy-an-app.mdx +109 -0
  37. package/docs/content/deployment-environment-variables.mdx +101 -0
  38. package/docs/content/deployment.mdx +125 -792
  39. package/docs/content/docs-components.mdx +2 -2
  40. package/docs/content/environment-variables.mdx +41 -41
  41. package/docs/content/file-uploads.mdx +74 -40
  42. package/docs/content/harness-agents.mdx +2 -2
  43. package/docs/content/internationalization.mdx +61 -65
  44. package/docs/content/key-concepts.mdx +3 -3
  45. package/docs/content/multi-app-workspace.mdx +2 -2
  46. package/docs/content/netlify.mdx +47 -0
  47. package/docs/content/node-docker.mdx +138 -0
  48. package/docs/content/organizations-teams-permissions.mdx +5 -5
  49. package/docs/content/other-platforms.mdx +27 -0
  50. package/docs/content/ssr-caching.mdx +45 -0
  51. package/docs/content/template-assets-developers.mdx +2 -2
  52. package/docs/content/template-chat-developers.mdx +2 -2
  53. package/docs/content/template-content-developers.mdx +2 -2
  54. package/docs/content/{local-file-mode.mdx → template-content-local-files.mdx} +2 -1
  55. package/docs/content/template-content-sync.mdx +2 -2
  56. package/docs/content/toolkit-agent-ux.mdx +1 -1
  57. package/docs/content/toolkit-resources.mdx +2 -2
  58. package/docs/content/updating-ui-in-production.mdx +35 -0
  59. package/docs/content/vercel.mdx +38 -0
  60. package/docs/content/what-is-agent-native.mdx +1 -1
  61. package/docs/content/workspace-deployment.mdx +350 -0
  62. package/package.json +1 -1
  63. package/docs/content/agents.mdx +0 -9
  64. package/docs/content/database.mdx +0 -317
  65. package/docs/content/human-approval.mdx +0 -156
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: "Netlify"
3
+ description: "Deploy an agent-native app to Netlify with the Netlify Nitro preset, and configure keep-warm for scale-to-zero databases."
4
+ ---
5
+
6
+ # Netlify
7
+
8
+ The Nitro `netlify` preset works well and, in practice, has given us much faster cold starts than Cloudflare Pages (~200ms TTFB vs ~9s) for templates that talk to external Postgres (Neon). Either set the preset in `vite.config.ts`:
9
+
10
+ ```ts filename="vite.config.ts"
11
+ export default defineConfig({
12
+ plugins: [agentNative({ nitro: { preset: "netlify" } })],
13
+ });
14
+ ```
15
+
16
+ …or set `NITRO_PRESET=netlify` at build time.
17
+
18
+ For a workspace, deploy every app from one Netlify site by running:
19
+
20
+ ```bash
21
+ npx @agent-native/core@latest deploy --preset netlify
22
+ ```
23
+
24
+ The workspace build writes static assets under `dist/_workspace_static/` and routes each app to its own Netlify function without forced asset redirects, so files like `/mail/assets/...` are served statically before the server function handles app routes.
25
+
26
+ ## Keep-warm and scale-to-zero databases {#netlify-keep-warm}
27
+
28
+ When enabled, the Netlify build emits a scheduled function that requests `/_agent-native/health` **every minute**. That keeps the server function and its database warm so the next visitor after an idle period doesn't pay a cold start (1–5s on Neon).
29
+
30
+ Keep-warm is **disabled by default** because a once-a-minute wake prevents autosuspend on metered scale-to-zero databases. On a free-tier Neon this can exhaust the compute quota, and the database then rejects **all** reads mid-session. The symptom is a dead app, not a slow one. Set `AGENT_NATIVE_ENABLE_KEEP_WARM=1` when the lower next-visitor latency is worth the database awake-time.
31
+
32
+ The keep-warm schedule and background-function warm only apply after the main keep-warm flag is enabled:
33
+
34
+ | Variable | Effect |
35
+ | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36
+ | `AGENT_NATIVE_ENABLE_KEEP_WARM` | Opts into the scheduled server/database warm. Unset by default. |
37
+ | `AGENT_NATIVE_DISABLE_KEEP_WARM` | Compatibility kill switch that wins over the opt-in flag when set. |
38
+ | `AGENT_NATIVE_KEEP_WARM_SCHEDULE` | Overrides the cadence with a 5-field cron expression, e.g. `*/5 * * * *`. The default cadence when enabled is `* * * * *`. An unparseable value **fails the build**. |
39
+ | `AGENT_NATIVE_DISABLE_KEEP_WARM_BACKGROUND` | Drops only the background-function warm, keeping the server warm. Warming `server` is one request. Warming `-background` starts a fresh container that re-probes the schema. |
40
+
41
+ If you are on a free or otherwise quota-limited database tier, leave `AGENT_NATIVE_ENABLE_KEEP_WARM` unset. If you opt in, use a slower cadence or set `AGENT_NATIVE_DISABLE_KEEP_WARM_BACKGROUND=1` to drop the more expensive background warm.
42
+
43
+ ## What's next
44
+
45
+ - [**Deployment**](/docs/deployment) — pick a persistent database and a preset before your first production deploy
46
+ - [**SSR Caching**](/docs/ssr-caching) — the default cache policy and Netlify's separate `netlify-cdn-cache-control` behavior
47
+ - [**Node.js & Docker**](/docs/node-docker), [**Vercel**](/docs/vercel), [**Cloudflare**](/docs/cloudflare), and [**Other Platforms**](/docs/other-platforms) — the other Nitro presets
@@ -0,0 +1,138 @@
1
+ ---
2
+ title: "Node.js & Docker"
3
+ description: "Deploy an agent-native app with the default Node.js Nitro preset, standalone or containerized with Docker."
4
+ ---
5
+
6
+ # Node.js & Docker
7
+
8
+ Node.js is the default Nitro preset. This page covers running it directly and containerizing it with Docker. See [Deployment](/docs/deployment) for picking a database first, and [Workspace Deployment](/docs/workspace-deployment#workspace-docker-compose) for self-hosting a multi-app workspace with Docker Compose.
9
+
10
+ ## Fast path: self-host a Chat app locally {#self-host-quickstart}
11
+
12
+ There are two good starting points, depending on your role:
13
+
14
+ - **Building an app?** Start with [Getting Started](/docs/getting-started), then return here when you are ready to put the result somewhere permanent.
15
+ - **Operating an app?** Use the local Docker path below first. It exercises the same Node.js, Postgres, authentication, and environment-variable shape you will use on a small server.
16
+
17
+ The local stack intentionally uses a fake auth secret, trust authentication, and a local Postgres volume. It is for `localhost`, not an internet-facing deployment. Do not reuse the trust-authentication setting in production.
18
+
19
+ ### 1. Create the app
20
+
21
+ ```bash
22
+ npx @agent-native/core@latest create my-app --standalone --template chat
23
+ cd my-app
24
+ pnpm install
25
+ ```
26
+
27
+ The install step creates the lockfile that the production Dockerfile below copies into its build stage.
28
+
29
+ ### 2. Add the local Docker files
30
+
31
+ Create `Dockerfile`, `.dockerignore`, and `docker-compose.yml` in the app root. `docker compose up --build` needs the Dockerfile, and `.dockerignore` keeps host-only files such as `node_modules` out of the Linux build context. Compose starts Postgres only on the private Compose network.
32
+
33
+ You can also download the [Dockerfile](https://www.agent-native.com/examples/self-hosted-chat/Dockerfile), [.dockerignore](https://www.agent-native.com/examples/self-hosted-chat/.dockerignore), [Compose file](https://www.agent-native.com/examples/self-hosted-chat/docker-compose.yml), and [environment template](https://www.agent-native.com/examples/self-hosted-chat/env.example) as a starter fixture. The [Dockerfile](#docker) below matches the fixture.
34
+
35
+ ```yaml filename="docker-compose.yml" maxLines=40
36
+ services:
37
+ app:
38
+ build: .
39
+ ports:
40
+ - "127.0.0.1:3000:3000"
41
+ environment:
42
+ DATABASE_URL: postgres://agent_native@postgres:5432/agent_native
43
+ BETTER_AUTH_SECRET: local-development-secret-change-me-1234567890
44
+ ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
45
+ depends_on:
46
+ postgres:
47
+ condition: service_healthy
48
+
49
+ postgres:
50
+ image: postgres:18
51
+ environment:
52
+ POSTGRES_DB: agent_native
53
+ POSTGRES_USER: agent_native
54
+ POSTGRES_HOST_AUTH_METHOD: trust
55
+ volumes:
56
+ - postgres-data-v18:/var/lib/postgresql
57
+ healthcheck:
58
+ test: ["CMD-SHELL", "pg_isready -U agent_native -d agent_native"]
59
+ interval: 5s
60
+ timeout: 5s
61
+ retries: 10
62
+
63
+ volumes:
64
+ postgres-data-v18:
65
+ ```
66
+
67
+ PostgreSQL 18 uses `/var/lib/postgresql` as its volume mount path, unlike PostgreSQL 17 and earlier. The versioned volume name keeps this fresh fixture separate from older local stacks. If you are upgrading an existing PostgreSQL 17 or earlier stack, back up and migrate its data before changing the image or mount path. Do not point this fixture at the old volume without a migration.
68
+
69
+ ### 3. Run it
70
+
71
+ ```bash
72
+ docker compose up --build
73
+ ```
74
+
75
+ Open [http://localhost:3000](http://localhost:3000). The app infers its local auth origin from the browser request. Set `ANTHROPIC_API_KEY` in a local `.env` file if you want to use the embedded agent; leave it empty if you only want to verify that the app and database start. Stop the stack with `docker compose down`; add `-v` when you intentionally want to reset the local database.
76
+
77
+ Before putting this on the public internet, replace the example secret, configure HTTPS and OAuth callback URLs, use a persistent production database, and complete the [production environment checklist](/docs/deployment-environment-variables#env-required-prod).
78
+
79
+ ## Node.js (Default) {#nodejs}
80
+
81
+ The default preset. Build and run:
82
+
83
+ ```bash
84
+ npx @agent-native/core@latest build
85
+ node .output/server/index.mjs
86
+ ```
87
+
88
+ Set `PORT` to configure the listen port (default: `3000`).
89
+
90
+ Use the current Node.js LTS line for production deploys. As of May 2026, that
91
+ is Node.js 24. Node.js 20 reached end-of-life on April 30, 2026 and no longer
92
+ receives upstream security updates.
93
+
94
+ ## Docker {#docker}
95
+
96
+ This Dockerfile works for the standalone app created above. Run `pnpm install` before building so `pnpm-lock.yaml` exists in the build context. Keep the dependency manifest and lockfile in sync when you update the app.
97
+
98
+ ```dockerfile filename="Dockerfile"
99
+ FROM node:24-slim AS build
100
+ WORKDIR /app
101
+ COPY package.json pnpm-lock.yaml ./
102
+ RUN corepack enable && pnpm install --frozen-lockfile
103
+ COPY . .
104
+ RUN pnpm build
105
+
106
+ FROM node:24-slim
107
+ WORKDIR /app
108
+ COPY --from=build /app/.output .output
109
+ # data/ is a runtime-created SQLite directory. Do not copy a dev DB into prod.
110
+ # For production, set DATABASE_URL to a hosted Postgres or Turso instance.
111
+ RUN mkdir -p /app/data
112
+ ENV NODE_ENV=production
113
+ ENV PORT=3000
114
+ EXPOSE 3000
115
+ CMD ["node", ".output/server/index.mjs"]
116
+ ```
117
+
118
+ Create `.dockerignore` alongside the Dockerfile:
119
+
120
+ ```text filename=".dockerignore"
121
+ node_modules
122
+ .output
123
+ data
124
+ .env
125
+ .env.*
126
+ !.env.example
127
+ .git
128
+ ```
129
+
130
+ Self-hosting a multi-app workspace with Docker Compose, built on this same
131
+ standalone Dockerfile, is covered in
132
+ [Workspace Deployment](/docs/workspace-deployment#workspace-docker-compose).
133
+
134
+ ## What's next
135
+
136
+ - [**Deployment**](/docs/deployment) — pick a persistent database and a preset before your first production deploy
137
+ - [**Workspace Deployment**](/docs/workspace-deployment) — self-host a multi-app workspace with Docker Compose
138
+ - [**Vercel**](/docs/vercel), [**Netlify**](/docs/netlify), [**Cloudflare**](/docs/cloudflare), and [**Other Platforms**](/docs/other-platforms) — the other Nitro presets
@@ -338,7 +338,7 @@ There is no single useful list of every environment variable in an app: each
338
338
  template and provider adds its own integration settings. The table below is the
339
339
  framework-level set developers most often need. Feature-specific variables stay
340
340
  on the page for the feature that owns them, and
341
- [Deployment → Environment Variables](/docs/deployment#environment-variables) is
341
+ [Deployment: Environment Variables](/docs/deployment-environment-variables) is
342
342
  the canonical production checklist (build/runtime vars, required secrets such as
343
343
  `ANTHROPIC_API_KEY` and `A2A_SECRET`, and production code execution) — the
344
344
  tables below don't repeat what's already covered there.
@@ -364,7 +364,7 @@ tables below don't repeat what's already covered there.
364
364
 
365
365
  `APP_URL`, `BETTER_AUTH_URL` / `VITE_BETTER_AUTH_URL`, `PORT`,
366
366
  `APP_BASE_PATH` / `VITE_APP_BASE_PATH`, and `NITRO_PRESET` are documented in
367
- [Deployment → Environment Variables](/docs/deployment#environment-variables).
367
+ [Deployment: Environment Variables](/docs/deployment-environment-variables).
368
368
 
369
369
  ### Authentication, cookies, and org defaults
370
370
 
@@ -399,7 +399,7 @@ org/workspace-specific and aren't covered on either of those pages:
399
399
  | `AGENT_MAX_OUTPUT_TOKENS` | Default output-token limit for the agent. |
400
400
 
401
401
  `ANTHROPIC_API_KEY` and `AGENT_PROD_CODE_EXECUTION` are documented in
402
- [Deployment → Environment Variables](/docs/deployment#environment-variables).
402
+ [Deployment: Environment Variables](/docs/deployment-environment-variables).
403
403
 
404
404
  ### Optional framework integrations
405
405
 
@@ -489,6 +489,6 @@ For a new team app, configure in this order:
489
489
  - [**Multi-Tenancy**](/docs/multi-tenancy) — org switching and tenant isolation
490
490
  - [**Security — Data Scoping**](/docs/security#data-scoping) — SQL scoping and access guards
491
491
  - [**Sharing & Privacy**](/docs/sharing) — resource visibility and share roles
492
- - [**Database**](/docs/database) — schema and connection details
493
- - [**Deployment**](/docs/deployment#environment-variables) — production and provider environment
492
+ - [**Database**](/docs/server-database) — schema and connection details
493
+ - [**Deployment: Environment Variables**](/docs/deployment-environment-variables) — production and provider environment
494
494
  - [**Org & Team Kit**](/docs/toolkit-org-team) — reusable UI components and hooks
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: "Other Platforms"
3
+ description: "Deploy an agent-native app to AWS Lambda or Deno Deploy with the matching Nitro preset."
4
+ ---
5
+
6
+ # Other Platforms
7
+
8
+ ## AWS Lambda {#aws-lambda}
9
+
10
+ ```ts filename="vite.config.ts"
11
+ export default defineConfig({
12
+ plugins: [agentNative({ nitro: { preset: "aws_lambda" } })],
13
+ });
14
+ ```
15
+
16
+ ## Deno Deploy {#deno-deploy}
17
+
18
+ ```ts filename="vite.config.ts"
19
+ export default defineConfig({
20
+ plugins: [agentNative({ nitro: { preset: "deno_deploy" } })],
21
+ });
22
+ ```
23
+
24
+ ## What's next
25
+
26
+ - [**Deployment**](/docs/deployment) — pick a persistent database and a preset before your first production deploy
27
+ - [**Node.js & Docker**](/docs/node-docker), [**Vercel**](/docs/vercel), [**Netlify**](/docs/netlify), and [**Cloudflare**](/docs/cloudflare) — the other Nitro presets
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: "SSR Caching"
3
+ description: "The default hard-cache policy for SSR HTML and React Router .data responses, and how to override it with AGENT_NATIVE_SSR_CACHE."
4
+ ---
5
+
6
+ # SSR Caching
7
+
8
+ Every SSR HTML response and every React Router `.data` response is one impersonal, public shell. `createH3SSRHandler` strips cookies before rendering, so the same bytes are correct for every visitor and all personalization happens on the client after load. That is what makes it safe to stamp a single hard-cache policy on those responses by default:
9
+
10
+ ```txt
11
+ cache-control: public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600
12
+ ```
13
+
14
+ The same value is mirrored onto `cdn-cache-control`. `netlify-cdn-cache-control` carries its own longer-lived default instead, `public, durable, s-maxage=31536000, stale-while-revalidate=604800, stale-if-error=3600`, since Netlify's CDN reads that header separately from the standard one. One shared CDN entry then serves the whole site instead of a per-request render. This is the single biggest lever on first-response latency. Leave it on unless one of the cases below applies to your deployment.
15
+
16
+ ## Overriding with `AGENT_NATIVE_SSR_CACHE` {#ssr-cache-env}
17
+
18
+ Set `AGENT_NATIVE_SSR_CACHE` in the deploy environment to change the policy for the whole deployment:
19
+
20
+ | Value | Result |
21
+ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
22
+ | unset, `on`, `default`, `true`, `1` | The default policy above, unchanged. Recommended for best performance. |
23
+ | `off`, `false`, `0`, `none`, `no-store`, `disabled` | `no-store` on `cache-control`, `cdn-cache-control`, and `netlify-cdn-cache-control`. |
24
+ | A duration: `30`, `30s`, `5m`, `2h` | `public, max-age=<n>, stale-while-revalidate=<n>, stale-if-error=3600` on `cache-control` and `cdn-cache-control`. `netlify-cdn-cache-control` uses the same duration with `public, durable, s-maxage=<n>, stale-while-revalidate=<n>, stale-if-error=3600`. |
25
+
26
+ Bare numbers are seconds. `stale-while-revalidate` deliberately mirrors `max-age` for a custom duration: a short freshness window paired with the default seven-day stale window would hand back exactly the staleness you opted out of. An unrecognized value logs a warning and falls back to the default, so a typo can never silently disable the CDN.
27
+
28
+ Turn it down or off when either of these is true:
29
+
30
+ 1. **Your host does not purge its CDN on deploy.** Netlify and Vercel do. Some self-managed setups do not. Without a purge, a shipped build can keep serving the previous shell for `max-age` plus `stale-while-revalidate`.
31
+ 2. **Your loaders return mutable public data.** After a successful mutation, a `useRevalidator()` or redirect-after-action re-fetch can read the browser's cached `.data` copy instead of fresh loader output.
32
+
33
+ The setting applies to every public-shell surface: React Router SSR HTML and `.data`, the login HTML shell, the `/_agent-native/speculation-rules.json` route, the docs site, and the public-form SSR in the forms template. The generated Cloudflare Worker resolves it at build time, so set it in the deploy environment before the build runs.
34
+
35
+ Three things to keep in mind:
36
+
37
+ - **Turning caching off does not make SSR personalized.** Cookies are still stripped before render and SSR loaders still see the anonymous branch. Per-user data must still be resolved client-side. This variable controls cache _duration_ only.
38
+ - **It is deployment-wide, not per-route, by design.** A per-route or per-request cache override is how one visitor's payload ends up in another visitor's shared CDN entry, so the framework does not offer one. `guard:ssr-cache-shell` enforces it.
39
+ - **For mutation-fresh data, prefer actions over disabling the cache.** App data belongs in [actions](/docs/actions-overview), read from the client with `useActionQuery` / `useActionMutation` and kept live by `useDbSync()` polling. None of that goes through the SSR shell cache. Keep SSR loaders rendering the public shell, and reach for this variable only when you genuinely want loader data fresher.
40
+
41
+ ## What's next
42
+
43
+ - [**Deployment**](/docs/deployment) — pick a persistent database and a preset before your first production deploy
44
+ - [**Deployment: Environment Variables**](/docs/deployment-environment-variables) — the full production env var reference
45
+ - [**Netlify**](/docs/netlify) — why `netlify-cdn-cache-control` carries its own longer-lived default
@@ -366,7 +366,7 @@ The schema is strictly additive — hosted templates share their production
366
366
  database across every deploy context, so add columns via
367
367
  `ALTER TABLE ... ADD COLUMN IF NOT EXISTS ...` in a new migration version in
368
368
  `server/plugins/db.ts`; never rename or drop a column, and never run
369
- `drizzle-kit push` against production. See [Database](/docs/database#migrations)
369
+ `drizzle-kit push` against production. See [Database](/docs/server-database#migrations)
370
370
  for the full migration pattern.
371
371
 
372
372
  ## Customizing it
@@ -451,6 +451,6 @@ on the integrations page.
451
451
 
452
452
  - [**Using Assets from other apps and agents**](/docs/template-assets-integrations) — embedding, A2A, Creative Context, and the packaged skill bundle
453
453
  - [**Sharing & Privacy**](/docs/sharing#building) — `ownableColumns()` and the visibility model this template relies on
454
- - [**Database**](/docs/database) — migrations, dialects, and `getDb`/`schema`
454
+ - [**Database**](/docs/server-database) — migrations, dialects, and `getDb`/`schema`
455
455
  - [**Actions**](/docs/actions-access-control#access-control) — the action system powering every entry above
456
456
  - [**Assets**](/docs/template-assets) — back to the overview
@@ -72,7 +72,7 @@ Three routes are mounted whether or not your app ever links to them:
72
72
  ]}
73
73
  />
74
74
 
75
- **Database** (`/database`) is the same `DbAdminPage` every template gets — a direct table browser/editor over the app's SQL database. See [Database](/docs/database) for the connection model behind it.
75
+ **Database** (`/database`) is the same `DbAdminPage` every template gets — a direct table browser/editor over the app's SQL database. See [Database](/docs/server-database) for the connection model behind it.
76
76
 
77
77
  **Observability** (`/observability`) is the same zero-config `ObservabilityDashboard` every template gets: traces, cost, evals, and feedback for every agent run, computed from data already in your own database. See [Agent Observability](/docs/observability).
78
78
 
@@ -82,7 +82,7 @@ Three routes are mounted whether or not your app ever links to them:
82
82
 
83
83
  - [**Chat Template**](/docs/template-chat) — what ships by default and when to pick it
84
84
  - [**Your first feature in Chat**](/docs/template-chat-first-edits) — the starter chat route, annotated, plus a full feature walkthrough
85
- - [**Database**](/docs/database) — connecting a real database and the portable-SQL model
85
+ - [**Database**](/docs/server-database) — connecting a real database and the portable-SQL model
86
86
  - [**Agent Observability**](/docs/observability) — what the dashboard tracks and how
87
87
  - [**Extensions**](/docs/extensions) — building mini-apps inside a template
88
88
  - [**Authentication**](/docs/authentication) — sessions, organizations, and protected routes
@@ -394,7 +394,7 @@ The places to look when changing behavior:
394
394
  - **`app/components/editor/`** — the Tiptap editor. Add a new node type under `extensions/` and register it in `DocumentEditor.tsx`. The bubble toolbar, slash menu, and hover previews are all component files you can edit.
395
395
  - **`.agents/skills/`** — guidance the agent reads before acting: `content`, `document-editing`, `notion-integration`, `creative-context`, plus the framework skills. Add a new skill folder when you add a capability big enough to need its own guidance.
396
396
  - **`AGENTS.md`** — the top-level agent guide with the action cheatsheet. Update it whenever you add a feature so the agent discovers it without exploring.
397
- - **`server/db/schema.ts`** — the data model. Content has no `db:push` script; it relies on strictly additive migrations that run on startup. Migrations must never drop, rename, or destructively alter existing tables or columns — see [Database](/docs/database#migrations).
397
+ - **`server/db/schema.ts`** — the data model. Content has no `db:push` script; it relies on strictly additive migrations that run on startup. Migrations must never drop, rename, or destructively alter existing tables or columns — see [Database](/docs/server-database#migrations).
398
398
  - **A new external-source adapter** — implement the `ContentDatabaseSourceAdapter` interface in `actions/_content-database-source-adapters.ts` (see the existing `builder-cms`, `local-table`, and `notion-database` adapters) and wire it into `attach-content-database-source`. Every adapter reads into the same change-set/review pipeline described on the [Databases page](/docs/template-content-databases#connecting-an-external-source) — a new adapter should not bypass it with a direct write.
399
399
  - **`shared/content-source.ts`** — the local-folder sync contract (filenames, frontmatter, parsing, serialization). Extend this if you change what an exported file looks like.
400
400
  - **`shared/nfm.ts`** — the Notion-Flavored Markdown converter. Extend this if you add block types that need to round-trip through Notion.
@@ -407,6 +407,6 @@ The agent can make most of these changes itself — ask it to "add a tags column
407
407
  - [Writing & organizing documents](/docs/template-content-editing) — the non-developer view of the editor and sharing model
408
408
  - [Databases, properties & forms](/docs/template-content-databases) — the full inline-database and external-source data model
409
409
  - [Local files, Notion & Builder CMS sync](/docs/template-content-sync) — the non-developer view of every sync surface
410
- - [Database](/docs/database) — the framework's Drizzle conventions and migration rules
410
+ - [Database](/docs/server-database) — the framework's Drizzle conventions and migration rules
411
411
  - [Actions](/docs/actions-overview) — the action system every operation above is built on
412
412
  - [Sharing](/docs/sharing) — the share-grant model `document_shares` builds on
@@ -142,5 +142,6 @@ less likely to leave half the product living in a parallel universe.
142
142
 
143
143
  ## What's next
144
144
 
145
- - [**Database**](/docs/database) — the SQL model every Content page and space is backed by, mode switch or not
145
+ - [**Database**](/docs/server-database) — the SQL model every Content page and space is backed by, mode switch or not
146
146
  - [**Content**](/docs/template-content) — the app this connects to: spaces, the Files database, and the editor built on top of it
147
+ - [**Content: Local Files, Notion & Builder CMS Sync**](/docs/template-content-sync) — connecting a folder day-to-day, local MDX components, and conflict handling
@@ -83,7 +83,7 @@ To open Content for an existing repo directly against a folder:
83
83
  npx @agent-native/core@latest content .
84
84
  ```
85
85
 
86
- This starts normal database-backed Content and registers an opaque local-folder connection in `agent-native.json` — it does not switch the app into a separate local-only mode. See [Local folder sources](/docs/local-file-mode) for the manifest format, truth policies, and Desktop bridge details.
86
+ This starts normal database-backed Content and registers an opaque local-folder connection in `agent-native.json` — it does not switch the app into a separate local-only mode. See [Local folder sources](/docs/template-content-local-files) for the manifest format, truth policies, and Desktop bridge details.
87
87
 
88
88
  ### Local MDX components
89
89
 
@@ -145,5 +145,5 @@ Every document belongs to a **space** — your personal space, or one shared wit
145
145
  - [Content overview](/docs/template-content) — what the app is and how to get started
146
146
  - [Writing & organizing documents](/docs/template-content-editing) — the editor and sharing model these synced documents use
147
147
  - [Databases, properties & forms](/docs/template-content-databases) — syncing rows inside a database, rather than whole documents
148
- - [Local folder sources](/docs/local-file-mode) — full configuration, truth policies, and conflict handling reference
148
+ - [Local folder sources](/docs/template-content-local-files) — full configuration, truth policies, and conflict handling reference
149
149
  - [Developer Guide](/docs/template-content-developers) — the full sync action inventory and data model
@@ -85,7 +85,7 @@ chat surface, not just the input — see [Drop-in Agent](/docs/drop-in-agent).
85
85
 
86
86
  - [**Using Your Agent**](/docs/using-your-agent) — the end-user model/composer
87
87
  experience this kit implements.
88
- - [**Human Approval**](/docs/human-approval) — the approval-gate contract
88
+ - [**Human Approval**](/docs/actions-access-control#needs-approval) — the approval-gate contract
89
89
  behind approval prompts.
90
90
  - [**Progress**](/docs/progress) — the run data `<RunsTray>` polls and renders.
91
91
  - [**Native Chat UI**](/docs/native-chat-ui) — build a custom chat surface on
@@ -108,8 +108,8 @@ the same shape and invalidate the tree/resource queries on success.
108
108
 
109
109
  ## What's next
110
110
 
111
- - [**Local File Mode**](/docs/local-file-mode) — repo-backed resources where
112
- files are the source of truth.
111
+ - [**Local folder sources**](/docs/template-content-local-files) — repo-backed
112
+ resources where files are the source of truth.
113
113
  - [**File Uploads**](/docs/file-uploads) — the shared attachment path resource
114
114
  uploads reuse.
115
115
  - [**Component API**](/docs/components#resources) — the full prop reference for
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: "Updating UI in Production"
3
+ description: "How a deployed app's UI gets updated after launch, and Builder.io's separate managed workflow for visual editing in production."
4
+ ---
5
+
6
+ # Updating UI in Production
7
+
8
+ The ordinary deployed app agent works through app tools (actions, database,
9
+ MCP, and configured integrations) rather than receiving ambient access to the
10
+ app's source code. Source changes belong in the repository's development
11
+ workflow. An embedded, local, or Builder frame can edit the repository when
12
+ that frame is intentionally granted workspace and write tooling.
13
+
14
+ In a standard production deployment with [production code execution](/docs/actions-agent-tools#production-code-execution) left off, the agent has access to app tools (actions, database, MCP) but not the filesystem. This means the agent can read and write data, run actions, and interact with external services. It can't edit your React components or add new routes on a deployed instance.
15
+
16
+ ## Builder.io: Visual Editing in Production {#builderio}
17
+
18
+ [Builder.io](https://www.builder.io?utm_source=agent-native&utm_medium=docs&utm_campaign=framework&utm_content=deployment) is a separate managed code-capable workflow where an agent can modify your app's UI in production. Connect your repo to Builder.io (free tier available) and prompt for UI changes directly. No redeploy needed.
19
+
20
+ **Connect Builder** in Settings uses Builder OAuth (`builder:ai:invoke`) with a same-origin HTTPS callback under `/_agent-native/builder/callback`, so hosted origins such as Railway work without a domain allowlist. Legacy `BUILDER_*` private keys remain a runtime fallback for existing connections.
21
+
22
+ **How it works:**
23
+
24
+ 1. Connect your agent-native repo to Builder.io (free tier available)
25
+ 2. Builder.io provides a cloud frame with the agent, visual editing, and real-time collaboration
26
+ 3. Prompt the agent to make UI changes. It edits your components, routes, and styles live
27
+ 4. Changes are committed back to your repo
28
+
29
+ See [Frames](/docs/frames) for more on the embedded agent panel vs. cloud frame options.
30
+
31
+ ## What's next
32
+
33
+ - [**Deployment**](/docs/deployment) — pick a persistent database and a preset before your first production deploy
34
+ - [**Frames**](/docs/frames) — the embedded agent panel vs. Builder.io's cloud frame for production UI edits
35
+ - [**Production Agent Access**](/docs/actions-agent-tools) — what tools the deployed agent has by default
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: "Vercel"
3
+ description: "Deploy an agent-native app to Vercel with the Vercel Nitro preset, standalone or as a workspace."
4
+ ---
5
+
6
+ # Vercel
7
+
8
+ ```ts filename="vite.config.ts"
9
+ export default defineConfig({
10
+ plugins: [agentNative({ nitro: { preset: "vercel" } })],
11
+ });
12
+ ```
13
+
14
+ Deploy via the Vercel CLI or git push:
15
+
16
+ ```bash
17
+ vercel deploy
18
+ ```
19
+
20
+ For a workspace, build every app into one Vercel Build Output API bundle:
21
+
22
+ ```bash
23
+ npx @agent-native/core@latest deploy --preset vercel
24
+ ```
25
+
26
+ For Vercel Git deployments, set the build command to:
27
+
28
+ ```bash
29
+ npx @agent-native/core@latest deploy --preset vercel --build-only
30
+ ```
31
+
32
+ The workspace build copies each app's Nitro `vercel` output into the root `.vercel/output`, gives each function its own mount-path environment, and writes the route config that serves apps at `/<app-id>`.
33
+
34
+ ## What's next
35
+
36
+ - [**Deployment**](/docs/deployment) — pick a persistent database and a preset before your first production deploy
37
+ - [**Workspace Deployment**](/docs/workspace-deployment) — the `deploy --preset vercel` workspace build in full
38
+ - [**Node.js & Docker**](/docs/node-docker), [**Netlify**](/docs/netlify), [**Cloudflare**](/docs/cloudflare), and [**Other Platforms**](/docs/other-platforms) — the other Nitro presets
@@ -51,7 +51,7 @@ Three shared foundations make this possible:
51
51
  - **Shared operations.** People trigger them through the UI, while agents call
52
52
  them directly. Agent-Native defines each operation once as an
53
53
  [action](/docs/actions-overview).
54
- - **[Shared data](/docs/database)** holds the work and information the
54
+ - **[Shared data](/docs/server-database)** holds the work and information the
55
55
  application needs to preserve. Depending on the application, that might be
56
56
  customer records, project plans, conversations, or reports. The UI and agent
57
57
  both read and update this shared data.