@agent-native/core 0.48.1 → 0.48.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +4 -4
  2. package/dist/cli/skills.js +14 -14
  3. package/dist/cli/skills.js.map +1 -1
  4. package/dist/client/index.d.ts +1 -0
  5. package/dist/client/index.d.ts.map +1 -1
  6. package/dist/client/index.js +1 -0
  7. package/dist/client/index.js.map +1 -1
  8. package/dist/client/require-session.d.ts +61 -0
  9. package/dist/client/require-session.d.ts.map +1 -0
  10. package/dist/client/require-session.js +75 -0
  11. package/dist/client/require-session.js.map +1 -0
  12. package/dist/collab/client.d.ts +1 -1
  13. package/dist/collab/client.d.ts.map +1 -1
  14. package/dist/collab/client.js +5 -5
  15. package/dist/collab/client.js.map +1 -1
  16. package/dist/mcp/actions/service-token-access.d.ts.map +1 -1
  17. package/dist/mcp/actions/service-token-access.js +30 -2
  18. package/dist/mcp/actions/service-token-access.js.map +1 -1
  19. package/dist/server/auth.d.ts.map +1 -1
  20. package/dist/server/auth.js +5 -5
  21. package/dist/server/auth.js.map +1 -1
  22. package/dist/server/core-routes-plugin.d.ts +3 -0
  23. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  24. package/dist/server/core-routes-plugin.js +12 -2
  25. package/dist/server/core-routes-plugin.js.map +1 -1
  26. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +36 -1
  27. package/docs/content/agent-web-surfaces.md +2 -2
  28. package/docs/content/authentication.md +1 -1
  29. package/docs/content/cloneable-saas.md +2 -2
  30. package/docs/content/code-agents-ui.md +16 -17
  31. package/docs/content/creating-templates.md +3 -3
  32. package/docs/content/deployment.md +18 -18
  33. package/docs/content/dispatch.md +2 -2
  34. package/docs/content/external-agents.md +21 -28
  35. package/docs/content/faq.md +1 -1
  36. package/docs/content/frames.md +1 -1
  37. package/docs/content/getting-started.md +7 -7
  38. package/docs/content/mcp-apps.md +1 -1
  39. package/docs/content/mcp-protocol.md +2 -2
  40. package/docs/content/migration-workbench.md +2 -2
  41. package/docs/content/multi-app-workspace.md +8 -8
  42. package/docs/content/multi-tenancy.md +1 -1
  43. package/docs/content/plan-plugin.md +6 -8
  44. package/docs/content/pr-visual-recap.md +23 -23
  45. package/docs/content/pure-agent-apps.md +1 -1
  46. package/docs/content/skills-guide.md +3 -3
  47. package/docs/content/template-analytics.md +1 -1
  48. package/docs/content/template-assets.md +4 -4
  49. package/docs/content/template-brain.md +1 -1
  50. package/docs/content/template-calendar.md +1 -1
  51. package/docs/content/template-clips.md +1 -1
  52. package/docs/content/template-content.md +1 -1
  53. package/docs/content/template-design.md +1 -1
  54. package/docs/content/template-dispatch.md +1 -1
  55. package/docs/content/template-forms.md +2 -2
  56. package/docs/content/template-mail.md +2 -2
  57. package/docs/content/template-plan.md +6 -12
  58. package/docs/content/template-slides.md +1 -1
  59. package/docs/content/template-starter.md +2 -2
  60. package/docs/content/template-videos.md +1 -1
  61. package/docs/content/workspace-management.md +1 -1
  62. package/package.json +3 -3
  63. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +36 -1
@@ -119,7 +119,42 @@ window.location.href =
119
119
 
120
120
  After successful sign-in (token / email-password / Google OAuth), the framework 302s to `return`. The path is validated as same-origin via the URL parser — open-redirect / header-injection inputs fall back to `/`.
121
121
 
122
- Bookmarked private paths already work without any plumbing — the framework's login page is served at the requested URL, and post-login reload returns the user there.
122
+ Bookmarked private paths already work _when the request reaches the server_ — the auth guard serves the login page at the requested URL and post-login reload returns the user there.
123
+
124
+ ## Gating the App Shell (avoid the logged-out infinite spinner)
125
+
126
+ The server auth guard only protects requests that actually reach the Nitro
127
+ function. A statically-served / CDN-cached SPA shell, or a client-side (React
128
+ Router) navigation made after the session expired, never re-hits the guard — so
129
+ the app boots with **no session**, every data query 401s, and the UI sticks on
130
+ its loading state forever. Server-side protection alone is not enough; gate on
131
+ the client too.
132
+
133
+ For a fully private app (every page requires auth, like mail), wrap the routed
134
+ shell with the framework's `RequireSession`. It resolves the session on the
135
+ client and redirects signed-out visitors to `/_agent-native/sign-in?return=…`
136
+ instead of spinning:
137
+
138
+ ```tsx
139
+ import { AppProviders, RequireSession } from "@agent-native/core/client";
140
+
141
+ <AppProviders queryClient={queryClient}>
142
+ <RequireSession bypass={isMcpEmbedSurface()}>
143
+ <AppLayout>
144
+ <Outlet />
145
+ </AppLayout>
146
+ </RequireSession>
147
+ </AppProviders>;
148
+ ```
149
+
150
+ - Place it **inside** `AppProviders` (so the loading fallback is themed) and
151
+ **around** the layout/outlet — also around any always-mounted effects (poll,
152
+ automation trigger) so they don't fire 401s for logged-out visitors.
153
+ - Pass `bypass` for surfaces that authenticate by another mechanism (embed /
154
+ popout iframes carrying their own token) so they are never bounced to sign-in.
155
+ - Apps with public/anonymous routes (share pages) must **not** wrap the whole
156
+ app — gate only the private subtree, or use the `redirect={false}` +
157
+ `signedOut` props to render an inline call-to-action instead of redirecting.
123
158
 
124
159
  ## Related Skills
125
160
 
@@ -15,7 +15,7 @@ The docs site is the reference implementation. Today it ships:
15
15
  - Markdown mirrors such as `/docs/getting-started.md`.
16
16
  - `Accept: text/markdown` responses for public docs pages after a production build.
17
17
  - JSON-LD for base organization, website, and page metadata.
18
- - An audit CLI (`agent-native audit-agent-web`) that checks all of the above.
18
+ - An audit CLI (`npx @agent-native/core@latest audit-agent-web`) that checks all of the above.
19
19
 
20
20
  Setting `publicMcp: true` additionally exposes opted-in actions as a public MCP endpoint, allowing external agents to call them directly (see [MCP Protocol](/docs/mcp-protocol)).
21
21
 
@@ -128,7 +128,7 @@ Vite apps can use `createAgentWebVitePlugin` from `@agent-native/core/vite` to w
128
128
  Use the CLI audit against a deployed site or a local production server:
129
129
 
130
130
  ```bash
131
- agent-native audit-agent-web --url https://www.agent-native.com
131
+ npx @agent-native/core@latest audit-agent-web --url https://www.agent-native.com
132
132
  ```
133
133
 
134
134
  The audit checks for:
@@ -130,7 +130,7 @@ Unauthenticated MCP requests return a `WWW-Authenticate` challenge pointing at `
130
130
 
131
131
  Access tokens are signed with `A2A_SECRET` when set, otherwise `BETTER_AUTH_SECRET`. They carry the signed user/org identity and the `mcp:read`, `mcp:write`, and/or `mcp:apps` scopes, and are audience-bound to the exact MCP resource URL. Refresh tokens are stored only as hashes and rotate on every refresh. Tool calls and MCP Apps resource reads run inside the same request context as the signed-in user; the embedded MCP App iframe never receives raw OAuth tokens.
132
132
 
133
- `agent-native connect <url> --client claude-code` writes the URL-only MCP entry for this standard flow. For clients that cannot perform remote MCP OAuth, use the Connect page or `agent-native connect --token <token>` fallback to write an explicit bearer-token entry.
133
+ `npx @agent-native/core@latest connect <url> --client claude-code` writes the URL-only MCP entry for this standard flow. For clients that cannot perform remote MCP OAuth, use the Connect page or `npx @agent-native/core@latest connect --token <token>` fallback to write an explicit bearer-token entry.
134
134
 
135
135
  ## Bring Your Own Auth {#byoa}
136
136
 
@@ -87,13 +87,13 @@ Not ready to scaffold? You can add agent-native superpowers to a coding agent yo
87
87
  If you're scaffolding now, the CLI command is:
88
88
 
89
89
  ```bash
90
- npx @agent-native/core create my-platform
90
+ npx @agent-native/core@latest create my-platform
91
91
  ```
92
92
 
93
93
  You'll get a multi-select picker. Pick one app (standalone) or several (workspace — apps share auth, brand, agent config, and database). Each picked template is scaffolded into `apps/<name>/` with every file you need.
94
94
 
95
95
  Fill in `.env` (mostly `ANTHROPIC_API_KEY` and `DATABASE_URL`), `pnpm install`, `pnpm dev`, and it works. No "TODO: implement login," no placeholder routes.
96
96
 
97
- Deploy targets: any Nitro-compatible host (Node, Cloudflare, Netlify, Vercel, Deno, Lambda, Bun) and any Drizzle-compatible SQL database (SQLite, Postgres, Turso, D1, Supabase, Neon). For workspaces, `agent-native deploy` builds every app at once and ships them behind a single origin. See [Deployment](/docs/deployment).
97
+ Deploy targets: any Nitro-compatible host (Node, Cloudflare, Netlify, Vercel, Deno, Lambda, Bun) and any Drizzle-compatible SQL database (SQLite, Postgres, Turso, D1, Supabase, Neon). For workspaces, `npx @agent-native/core@latest deploy` builds every app at once and ships them behind a single origin. See [Deployment](/docs/deployment).
98
98
 
99
99
  To author and publish your own template, see [Creating Templates](/docs/creating-templates).
@@ -5,11 +5,11 @@ description: "Build and customize Agent-Native Code surfaces with the shared UI
5
5
 
6
6
  # Agent-Native Code UI
7
7
 
8
- Agent-Native Code is the Agent-Native coding surface: a local Claude Code/Codex-style workspace for coding sessions, slash commands, migrations, audits, transcripts, run controls, and follow-ups. A bare `npx @agent-native/core@latest` or installed `agent-native` command opens this workspace; `agent-native code` is the explicit subcommand for the same experience.
8
+ Agent-Native Code is the Agent-Native coding surface: a local Claude Code/Codex-style workspace for coding sessions, slash commands, migrations, audits, transcripts, run controls, and follow-ups. A bare `npx @agent-native/core@latest` command opens this workspace; `npx @agent-native/core@latest code` is the explicit subcommand for the same experience.
9
9
 
10
10
  There are three layers:
11
11
 
12
- - **CLI**: `npx @agent-native/core@latest`, `agent-native`, and `agent-native code` start, resume, inspect, and stop runs.
12
+ - **CLI**: `npx @agent-native/core@latest` and `npx @agent-native/core@latest code` start, resume, inspect, and stop runs.
13
13
  - **Desktop**: the left-sidebar Code tab adds native terminal launch, app webviews, and desktop deep links while using the same run model.
14
14
  - **Shared UI**: `@agent-native/code-agents-ui` renders the reusable React surface.
15
15
 
@@ -95,19 +95,18 @@ The top-level CLI behaves like Claude Code or Codex:
95
95
 
96
96
  ```bash
97
97
  npx @agent-native/core@latest
98
- agent-native
99
- agent-native "fix the failing auth tests"
100
- agent-native code
98
+ npx @agent-native/core@latest "fix the failing auth tests"
99
+ npx @agent-native/core@latest code
101
100
  ```
102
101
 
103
- Use `agent-native code` when you want the explicit namespace. Built-in slash
102
+ Use `npx @agent-native/core@latest code` when you want the explicit namespace. Built-in slash
104
103
  goals and project commands can run inside the interactive workspace or directly
105
104
  from the shell:
106
105
 
107
106
  ```bash
108
- agent-native code /migrate ./legacy-app --emit ./migration-dossier
109
- agent-native code /audit --url https://example.com
110
- agent-native code /release-check
107
+ npx @agent-native/core@latest code /migrate ./legacy-app --emit ./migration-dossier
108
+ npx @agent-native/core@latest code /audit --url https://example.com
109
+ npx @agent-native/core@latest code /release-check
111
110
  ```
112
111
 
113
112
  Here `/migrate` and `/audit` are built-in goals (the built-in goals are
@@ -118,13 +117,13 @@ commands come from `.agents/commands/*.md`; project skills come from
118
117
  records that the Desktop Code tab and shared UI display:
119
118
 
120
119
  ```bash
121
- agent-native code list
122
- agent-native code status --last
123
- agent-native code attach --last
124
- agent-native code logs --last
125
- agent-native code resume --last
126
- agent-native code stop --last
127
- agent-native code ui
120
+ npx @agent-native/core@latest code list
121
+ npx @agent-native/core@latest code status --last
122
+ npx @agent-native/core@latest code attach --last
123
+ npx @agent-native/core@latest code logs --last
124
+ npx @agent-native/core@latest code resume --last
125
+ npx @agent-native/core@latest code stop --last
126
+ npx @agent-native/core@latest code ui
128
127
  ```
129
128
 
130
129
  `resume` appends context and continues a run, `status` reports the latest run
@@ -267,7 +266,7 @@ Project skills live in:
267
266
  .agents/skills/*/SKILL.md
268
267
  ```
269
268
 
270
- When the host implements `listCodePacks`, the shared UI shows project commands and skills in the rail. Command rows insert `/<command>`, and skill rows insert a focused “Use the <skill> skill…” prompt so the rail stays actionable. The built-in slash goals `/migrate` and `/audit` stay reserved for the global Agent-Native Code controls, as do run-control names such as `status` and `resume` — those are subcommands invoked without a slash (`agent-native code status`, `agent-native code resume`), not slash goals.
269
+ When the host implements `listCodePacks`, the shared UI shows project commands and skills in the rail. Command rows insert `/<command>`, and skill rows insert a focused “Use the <skill> skill…” prompt so the rail stays actionable. The built-in slash goals `/migrate` and `/audit` stay reserved for the global Agent-Native Code controls, as do run-control names such as `status` and `resume` — those are subcommands invoked without a slash (`npx @agent-native/core@latest code status`, `npx @agent-native/core@latest code resume`), not slash goals.
271
270
 
272
271
  Do not create a separate slash-command registry for a new Code host. Project
273
272
  commands and skills are discovered from `.agents/commands/*.md` and
@@ -22,13 +22,13 @@ A good template:
22
22
  Use the CLI-only Starter scaffold when you want a blank app with the framework wiring already in place:
23
23
 
24
24
  ```bash
25
- pnpm dlx @agent-native/core create my-template --template starter --standalone
25
+ npx @agent-native/core@latest create my-template --template starter --standalone
26
26
  ```
27
27
 
28
28
  For a workspace with multiple apps, run the picker and include Starter with any domain templates you want:
29
29
 
30
30
  ```bash
31
- pnpm dlx @agent-native/core create my-platform
31
+ npx @agent-native/core@latest create my-platform
32
32
  ```
33
33
 
34
34
  Starter gives you auth, the agent sidebar, SQL-backed resources, tools, application state, actions, and polling sync. You add the domain model and product UI.
@@ -388,7 +388,7 @@ Before sharing:
388
388
  Community templates can be created from a GitHub repo:
389
389
 
390
390
  ```bash
391
- pnpm dlx @agent-native/core create my-app --template github:user/repo
391
+ npx @agent-native/core@latest create my-app --template github:user/repo
392
392
  ```
393
393
 
394
394
  ## Contributing to the framework monorepo {#contributing}
@@ -20,7 +20,7 @@ Use `DATABASE_AUTH_TOKEN` only when your database provider requires a separate t
20
20
  If your project is a [workspace](/docs/multi-app-workspace), you can ship every app in it to a single origin with one command:
21
21
 
22
22
  ```bash
23
- agent-native deploy
23
+ npx @agent-native/core@latest deploy
24
24
  # https://your-agents.com/mail/* → apps/mail
25
25
  # https://your-agents.com/calendar/* → apps/calendar
26
26
  # https://your-agents.com/forms/* → apps/forms
@@ -42,26 +42,26 @@ wrangler pages deploy dist
42
42
  For Netlify unified deploys, use the Netlify preset:
43
43
 
44
44
  ```bash
45
- agent-native deploy --preset netlify
45
+ npx @agent-native/core@latest deploy --preset netlify
46
46
  ```
47
47
 
48
48
  For Vercel unified deploys, use the Vercel preset:
49
49
 
50
50
  ```bash
51
- agent-native deploy --preset vercel
51
+ npx @agent-native/core@latest deploy --preset vercel
52
52
  ```
53
53
 
54
- When configuring a provider build command, use the same command with `--build-only`. Vercel should run `pnpm exec agent-native deploy --preset vercel --build-only`; the command writes `.vercel/output` directly, so no `vercel.json` is required for workspace routing.
54
+ When configuring a provider build command, use the same command with `--build-only`. Vercel should run `npx @agent-native/core@latest deploy --preset vercel --build-only`; the command writes `.vercel/output` directly, so no `vercel.json` is required for workspace routing.
55
55
 
56
56
  Hosted workspace builds require `A2A_SECRET` in the deploy provider environment.
57
57
  This makes Slack, inbound webhooks, and cross-app A2A resume work through signed
58
58
  background processors. Local `--build-only` artifact checks still run without it.
59
59
 
60
- Per-app independent deploy is still supported — just `cd apps/<name> && agent-native build` like a standalone scaffold.
60
+ Per-app independent deploy is still supported — just `cd apps/<name> && npx @agent-native/core@latest build` like a standalone scaffold.
61
61
 
62
62
  ## How It Works {#how-it-works}
63
63
 
64
- When you run `agent-native build`, Nitro builds both the client SPA and the server API into `.output/`:
64
+ When you run `npx @agent-native/core@latest build`, Nitro builds both the client SPA and the server API into `.output/`:
65
65
 
66
66
  ```text
67
67
  .output/
@@ -90,7 +90,7 @@ export default defineConfig({
90
90
  Or use the `NITRO_PRESET` environment variable at build time:
91
91
 
92
92
  ```bash
93
- NITRO_PRESET=netlify agent-native build
93
+ NITRO_PRESET=netlify npx @agent-native/core@latest build
94
94
  ```
95
95
 
96
96
  ## Node.js (Default) {#nodejs}
@@ -98,7 +98,7 @@ NITRO_PRESET=netlify agent-native build
98
98
  The default preset. Build and run:
99
99
 
100
100
  ```bash
101
- agent-native build
101
+ npx @agent-native/core@latest build
102
102
  node .output/server/index.mjs
103
103
  ```
104
104
 
@@ -147,13 +147,13 @@ vercel deploy
147
147
  For a workspace, build every app into one Vercel Build Output API bundle:
148
148
 
149
149
  ```bash
150
- agent-native deploy --preset vercel
150
+ npx @agent-native/core@latest deploy --preset vercel
151
151
  ```
152
152
 
153
153
  For Vercel Git deployments, set the build command to:
154
154
 
155
155
  ```bash
156
- pnpm exec agent-native deploy --preset vercel --build-only
156
+ npx @agent-native/core@latest deploy --preset vercel --build-only
157
157
  ```
158
158
 
159
159
  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>`.
@@ -174,7 +174,7 @@ export default defineConfig({
174
174
  For a workspace, deploy every app from one Netlify site by running:
175
175
 
176
176
  ```bash
177
- agent-native deploy --preset netlify
177
+ npx @agent-native/core@latest deploy --preset netlify
178
178
  ```
179
179
 
180
180
  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.
@@ -210,13 +210,13 @@ export default defineConfig({
210
210
 
211
211
  ### Build / Runtime {#env-runtime}
212
212
 
213
- | Variable | Description |
214
- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
215
- | `PORT` | Server port (Node.js only) |
216
- | `NITRO_PRESET` | Override build preset at build time |
217
- | `APP_BASE_PATH` | Mount the app under a prefix (e.g. `/mail`). Set automatically by `agent-native deploy`; leave unset for standalone. |
218
- | `DATABASE_URL` | Persistent SQL connection string. Required in production. See [Database](/docs/database#production) for adapter and dialect details. |
219
- | `DATABASE_AUTH_TOKEN` | Auth token for providers that require a separate token, such as Turso/libSQL. |
213
+ | Variable | Description |
214
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
215
+ | `PORT` | Server port (Node.js only) |
216
+ | `NITRO_PRESET` | Override build preset at build time |
217
+ | `APP_BASE_PATH` | Mount the app under a prefix (e.g. `/mail`). Set automatically by `npx @agent-native/core@latest deploy`; leave unset for standalone. |
218
+ | `DATABASE_URL` | Persistent SQL connection string. Required in production. See [Database](/docs/database#production) for adapter and dialect details. |
219
+ | `DATABASE_AUTH_TOKEN` | Auth token for providers that require a separate token, such as Turso/libSQL. |
220
220
 
221
221
  ### Required in Production {#env-required-prod}
222
222
 
@@ -115,9 +115,9 @@ The whole pipeline is built to survive on every serverless host (Netlify, Vercel
115
115
 
116
116
  Three short steps:
117
117
 
118
- 1. **Scaffold a workspace that includes Dispatch.** Run `pnpm dlx @agent-native/core create my-company-platform` and pick `dispatch` alongside whatever domain templates you want. Dispatch lives at `apps/dispatch` and the rest of the apps sit beside it. See [Multi-App Workspace](/docs/multi-app-workspace).
118
+ 1. **Scaffold a workspace that includes Dispatch.** Run `npx @agent-native/core@latest create my-company-platform` and pick `dispatch` alongside whatever domain templates you want. Dispatch lives at `apps/dispatch` and the rest of the apps sit beside it. See [Multi-App Workspace](/docs/multi-app-workspace).
119
119
  2. **Connect messaging.** Open **Settings → Messaging** in Dispatch and click connect for Slack, Email, Telegram, or WhatsApp. The form fields match the env vars in the [Messaging](/docs/messaging) doc — refer there for what each platform needs.
120
- 3. **Add other apps.** Run `npx @agent-native/core add-app` from the workspace root for each domain app. They auto-appear as A2A peers in Dispatch's `list-workspace-apps` — no manual registration, no agent-card editing. Dispatch will start delegating to them as soon as their agent cards are reachable.
120
+ 3. **Add other apps.** Run `npx @agent-native/core@latest add-app` from the workspace root for each domain app. They auto-appear as A2A peers in Dispatch's `list-workspace-apps` — no manual registration, no agent-card editing. Dispatch will start delegating to them as soon as their agent cards are reachable.
121
121
 
122
122
  Then add credentials to the vault and (optionally) author global workspace resources under **Resources**. Vault keys can still be synced or granted depending on access mode; All-app workspace resources are inherited automatically. If you need per-app secret isolation, switch the vault access setting to manual before granting individual apps.
123
123
 
@@ -85,16 +85,10 @@ In hosts that support MCP Apps, Analytics can render real dashboard and analysis
85
85
 
86
86
  Use this flow for local agent clients on your machine — Claude Code, Claude Code CLI, Codex, and Claude Cowork. (Cursor uses the paste-URL flow above; it does not need this CLI path.)
87
87
 
88
- If you have the Agent-Native CLI installed, run:
88
+ Run the connect command through npm:
89
89
 
90
90
  ```bash
91
- agent-native connect https://dispatch.agent-native.com
92
- ```
93
-
94
- Or run the same command through npm without installing anything globally:
95
-
96
- ```bash
97
- npx @agent-native/core connect https://dispatch.agent-native.com
91
+ npx @agent-native/core@latest connect https://dispatch.agent-native.com
98
92
  ```
99
93
 
100
94
  The command asks which local agent clients should receive MCP config. All clients are preselected the first time; after you choose, the selection is saved to `~/.agent-native/connect.json` so the next run can reuse it with Enter, or you can edit the checked items.
@@ -105,7 +99,7 @@ Keep the `connect` command running until the browser approval completes. If the
105
99
  waiting process is stopped early, the approval can succeed in the browser but
106
100
  the local client config will not receive the token.
107
101
 
108
- If you previously connected Claude Code through the old bearer-token flow, just run the same `agent-native connect ... --client claude-code` command again. The CLI replaces the legacy `Authorization` headers with the URL-only OAuth entry and tells you to re-authenticate from `/mcp`.
102
+ If you previously connected Claude Code through the old bearer-token flow, just run the same `npx @agent-native/core@latest connect ... --client claude-code` command again. The CLI replaces the legacy `Authorization` headers with the URL-only OAuth entry and tells you to re-authenticate from `/mcp`.
109
103
 
110
104
  | Local client | Config written by `connect` | Auth flow |
111
105
  | ----------------------------- | ------------------------------------------------------- | ----------------------------------------------- |
@@ -136,8 +130,7 @@ npx skills add BuilderIO/agent-native --skill assets
136
130
  ```
137
131
 
138
132
  The raw `skills` CLI installs `SKILL.md` files only; local MCP clients still
139
- need a connector such as `npx @agent-native/core@latest connect
140
- https://assets.agent-native.com`.
133
+ need a connector such as `npx @agent-native/core@latest connect https://assets.agent-native.com`.
141
134
 
142
135
  | Skill | Alias | For |
143
136
  | -------- | ------------------ | ---------------------- |
@@ -149,7 +142,7 @@ When you truly need an isolated app instead of Dispatch's workspace gateway,
149
142
  run the same command with that app's host:
150
143
 
151
144
  ```bash
152
- npx @agent-native/core connect https://mail.agent-native.com
145
+ npx @agent-native/core@latest connect https://mail.agent-native.com
153
146
  ```
154
147
 
155
148
  `connect --all` still exists for legacy per-app client setups, but new
@@ -187,7 +180,7 @@ claude mcp add --transport http agent-native \
187
180
  https://dispatch.agent-native.com/_agent-native/mcp
188
181
  ```
189
182
 
190
- This is the same URL-only entry that `agent-native connect https://dispatch.agent-native.com --client claude-code` writes for you. Then run `/mcp` in Claude Code and choose **Authenticate**. The client discovers auth from the MCP server's `401 WWW-Authenticate` challenge, fetches `/.well-known/oauth-protected-resource` and `/.well-known/oauth-authorization-server`, dynamically registers a public OAuth client, opens the app's authorization page, and stores the resulting token securely. ChatGPT developer-mode connectors use the same server URL:
183
+ This is the same URL-only entry that `npx @agent-native/core@latest connect https://dispatch.agent-native.com --client claude-code` writes for you. Then run `/mcp` in Claude Code and choose **Authenticate**. The client discovers auth from the MCP server's `401 WWW-Authenticate` challenge, fetches `/.well-known/oauth-protected-resource` and `/.well-known/oauth-authorization-server`, dynamically registers a public OAuth client, opens the app's authorization page, and stores the resulting token securely. ChatGPT developer-mode connectors use the same server URL:
191
184
 
192
185
  ```text
193
186
  https://dispatch.agent-native.com/_agent-native/mcp
@@ -203,7 +196,7 @@ Current scopes are:
203
196
  | `mcp:write` | mutating actions and the `ask-agent` meta-tool |
204
197
  | `mcp:apps` | MCP Apps resource listing/reading and inline UI rendering where supported |
205
198
 
206
- When the client requests no explicit scope, the app grants all three so the connector behaves like the browser-authorized Connect flow. Keep the bearer-token Connect page and `agent-native connect --token <token>` fallback around for local dev, fallback hosts, and clients where you need a ready-to-paste config block.
199
+ When the client requests no explicit scope, the app grants all three so the connector behaves like the browser-authorized Connect flow. Keep the bearer-token Connect page and `npx @agent-native/core@latest connect --token <token>` fallback around for local dev, fallback hosts, and clients where you need a ready-to-paste config block.
207
200
 
208
201
  ## Catalog tiers {#catalog-tiers}
209
202
 
@@ -233,7 +226,7 @@ always serve the full action surface. When the env flag is set, individual
233
226
  callers can still opt up by minting their token with `--full-catalog`:
234
227
 
235
228
  ```bash
236
- agent-native connect https://plan.agent-native.com --full-catalog
229
+ npx @agent-native/core@latest connect https://plan.agent-native.com --full-catalog
237
230
  ```
238
231
 
239
232
  This embeds a `catalog_scope: "full"` claim in the minted JWT. On subsequent
@@ -453,10 +446,10 @@ The hosted `connect` flow above is the recommended path. The options below are f
453
446
 
454
447
  ### Local development {#local-dev}
455
448
 
456
- Run your app locally (`pnpm dev` / `agent-native dev`), then point a local agent at it with one command:
449
+ Run your app locally (`pnpm dev` / `npx @agent-native/core@latest dev`), then point a local agent at it with one command:
457
450
 
458
451
  ```bash
459
- agent-native mcp install --client claude-code|claude-code-cli|codex|cowork \
452
+ npx @agent-native/core@latest mcp install --client claude-code|claude-code-cli|codex|cowork \
460
453
  [--app <id>] [--scope user|project]
461
454
  ```
462
455
 
@@ -466,17 +459,17 @@ It provisions a token (a random `ACCESS_TOKEN` into the workspace `.env` for loc
466
459
  - **cowork** — the same Claude Code JSON shape in `~/.cowork/mcp.json`.
467
460
  - **codex** — an `[mcp_servers.<name>]` block in `~/.codex/config.toml`.
468
461
 
469
- The entry runs `agent-native mcp serve --app <id>`, which by default is a **thin stdio proxy** to the running local app's `/_agent-native/mcp` — so the live action registry, HMR, and correct deep links stay the single source of truth. Pass `--standalone` to build the registry in-process instead. When `agent-native mcp install` detects a hosted origin (a non-localhost `APP_URL` / `BETTER_AUTH_URL` / `AGENT_NATIVE_MCP_URL` in the workspace `.env`), it writes an `http` client entry pointing at `<origin>/_agent-native/mcp` with a `Bearer` JWT instead of a stdio entry.
462
+ The entry runs `npx @agent-native/core@latest mcp serve --app <id>`, which by default is a **thin stdio proxy** to the running local app's `/_agent-native/mcp` — so the live action registry, HMR, and correct deep links stay the single source of truth. Pass `--standalone` to build the registry in-process instead. When `npx @agent-native/core@latest mcp install` detects a hosted origin (a non-localhost `APP_URL` / `BETTER_AUTH_URL` / `AGENT_NATIVE_MCP_URL` in the workspace `.env`), it writes an `http` client entry pointing at `<origin>/_agent-native/mcp` with a `Bearer` JWT instead of a stdio entry.
470
463
 
471
464
  Companion subcommands:
472
465
 
473
- | Command | What it does |
474
- | ----------------------------------------- | ------------------------------------------------------------------- |
475
- | `agent-native mcp serve [--app <id>]` | Run the MCP stdio transport (what client configs spawn). |
476
- | `agent-native mcp install --client <c>` | Provision a token + write the client's MCP config (idempotent). |
477
- | `agent-native mcp uninstall --client <c>` | Remove the named MCP entry from a client's config (idempotent). |
478
- | `agent-native mcp status` | Show resolved MCP URL/port, token state, and per-client entries. |
479
- | `agent-native mcp token [--rotate]` | Print (or rotate) the local `ACCESS_TOKEN` in the workspace `.env`. |
466
+ | Command | What it does |
467
+ | ---------------------------------------------------------- | ------------------------------------------------------------------- |
468
+ | `npx @agent-native/core@latest mcp serve [--app <id>]` | Run the MCP stdio transport (what client configs spawn). |
469
+ | `npx @agent-native/core@latest mcp install --client <c>` | Provision a token + write the client's MCP config (idempotent). |
470
+ | `npx @agent-native/core@latest mcp uninstall --client <c>` | Remove the named MCP entry from a client's config (idempotent). |
471
+ | `npx @agent-native/core@latest mcp status` | Show resolved MCP URL/port, token state, and per-client entries. |
472
+ | `npx @agent-native/core@latest mcp token [--rotate]` | Print (or rotate) the local `ACCESS_TOKEN` in the workspace `.env`. |
480
473
 
481
474
  Restart the client after `install` so it picks up the new MCP server.
482
475
 
@@ -510,7 +503,7 @@ When you already have first-party hosted apps connected and want to test local f
510
503
  ```bash
511
504
  pnpm dev:lazy -- --apps mail,calendar,analytics
512
505
 
513
- agent-native connect dev --apps mail,calendar,analytics --client codex
506
+ npx @agent-native/core@latest connect dev --apps mail,calendar,analytics --client codex
514
507
  ```
515
508
 
516
509
  `connect dev` rewrites the same stable MCP server names (`agent-native-mail`, `agent-native-calendar`, etc.) to the local dev-lazy gateway, so tool names do not change. It backs up the current production entries in `~/.agent-native/connect-profiles.json` before writing dev entries. The default gateway is `http://127.0.0.1:8080`; use `--gateway <url>` or `--port <n>` if your gateway moved.
@@ -518,7 +511,7 @@ agent-native connect dev --apps mail,calendar,analytics --client codex
518
511
  Switch back with:
519
512
 
520
513
  ```bash
521
- agent-native connect prod --apps mail,calendar,analytics --client codex
514
+ npx @agent-native/core@latest connect prod --apps mail,calendar,analytics --client codex
522
515
  ```
523
516
 
524
517
  If `connect dev` cannot infer your local owner identity from an existing connected JWT, pass `--owner-email you@example.com`; this keeps local dev tools on the full authenticated MCP surface instead of the sparse unauthenticated dev surface.
@@ -540,7 +533,7 @@ The fallback hosted `connect` flow never copies the deployment's shared secret.
540
533
 
541
534
  **Do**
542
535
 
543
- - Connect your own agent to Dispatch with `npx @agent-native/core connect https://dispatch.agent-native.com`; use a direct app URL only when you want one isolated app.
536
+ - Connect your own agent to Dispatch with `npx @agent-native/core@latest connect https://dispatch.agent-native.com`; use a direct app URL only when you want one isolated app.
544
537
  - Add a `link` builder to any action that produces or lists a navigable resource (draft, event, dashboard, document).
545
538
  - Build the URL with `buildDeepLink(...)` — the single source of truth for the open-route format.
546
539
  - Keep `link` pure and synchronous; return `null` when there's nothing to open.
@@ -66,7 +66,7 @@ That's the whole point. Fork a template and customize it by asking the agent. "A
66
66
 
67
67
  ### Can I build something the templates don't cover? {#build-from-scratch}
68
68
 
69
- Yes. Run `npx @agent-native/core create my-app` and accept the default **Starter** selection in the picker (or pass `--template starter`) — you get the framework scaffolding (frontend, backend, agent panel, database) but no domain-specific code. See [Getting Started](/docs/getting-started). For agent-first products with no traditional UI, see [Pure-Agent Apps](/docs/pure-agent-apps).
69
+ Yes. Run `npx @agent-native/core@latest create my-app` and accept the default **Starter** selection in the picker (or pass `--template starter`) — you get the framework scaffolding (frontend, backend, agent panel, database) but no domain-specific code. See [Getting Started](/docs/getting-started). For agent-first products with no traditional UI, see [Pure-Agent Apps](/docs/pure-agent-apps).
70
70
 
71
71
  ### Can I try it without forking a template? {#try-with-a-skill}
72
72
 
@@ -122,7 +122,7 @@ The embedded agent panel is part of every app — scaffold a template and it's
122
122
  already there:
123
123
 
124
124
  ```bash
125
- pnpm dlx @agent-native/core create my-app --template mail --standalone
125
+ npx @agent-native/core@latest create my-app --template mail --standalone
126
126
  cd my-app
127
127
  pnpm dev
128
128
  ```
@@ -22,7 +22,7 @@ Not sure which path? If you've never written code, the hosted version is for you
22
22
  Three commands and you're up:
23
23
 
24
24
  ```bash
25
- npx @agent-native/core create my-platform
25
+ npx @agent-native/core@latest create my-platform
26
26
  cd my-platform
27
27
  pnpm install && pnpm dev
28
28
  ```
@@ -73,14 +73,14 @@ Run `create` from the folder where you want a brand-new workspace:
73
73
 
74
74
  ```bash
75
75
  cd ~/projects
76
- npx @agent-native/core create my-platform
76
+ npx @agent-native/core@latest create my-platform
77
77
  ```
78
78
 
79
79
  After a workspace exists, run app commands from the workspace root:
80
80
 
81
81
  ```bash
82
82
  cd my-platform
83
- npx @agent-native/core add-app
83
+ npx @agent-native/core@latest add-app
84
84
  pnpm install
85
85
  pnpm dev
86
86
  ```
@@ -90,7 +90,7 @@ If your terminal is inside `apps/content` or another app folder, the CLI still d
90
90
  To make a second app from the same template, give it a new app name:
91
91
 
92
92
  ```bash
93
- npx @agent-native/core add-app design-lab --template design
93
+ npx @agent-native/core@latest add-app design-lab --template design
94
94
  ```
95
95
 
96
96
  ## Try it with a skill {#try-with-a-skill}
@@ -136,10 +136,10 @@ Good first moves:
136
136
  - **Open Agent-Native Code** — run `npx @agent-native/core@latest` or `npx @agent-native/core@latest code` from the project. A bare command opens the local Claude Code/Codex-like workspace; a bare prompt such as `npx @agent-native/core@latest "rename the app"` starts a Code task directly.
137
137
  - **Ask the built-in agent what it sees** — open the agent panel and type "what app am I looking at, and what can you do here?" This verifies the app, UI state, and agent loop are all talking to each other.
138
138
  - **Make a tiny customization** — ask your coding tool to rename the app, change the first screen copy, or add one field to a form. It will read `AGENTS.md` for the framework conventions.
139
- - **Add another app to the same workspace** — use `npx @agent-native/core add-app` from inside the workspace folder. The command starts at `npx`.
140
- - **Single app instead of a monorepo?** Pass `--standalone` when creating: `npx @agent-native/core create my-app --standalone --template mail`.
139
+ - **Add another app to the same workspace** — use `npx @agent-native/core@latest add-app` from inside the workspace folder. The command starts at `npx`.
140
+ - **Single app instead of a monorepo?** Pass `--standalone` when creating: `npx @agent-native/core@latest create my-app --standalone --template mail`.
141
141
 
142
- Agent-Native Code understands built-in slash goals such as `/migrate` and `/audit`, plus project commands in `.agents/commands/*.md`. Use `agent-native code list`, `status`, `resume`, `stop`, or `ui` to inspect and control the same run from the CLI, the local UI, or the Desktop Code tab.
142
+ Agent-Native Code understands built-in slash goals such as `/migrate` and `/audit`, plus project commands in `.agents/commands/*.md`. Use `npx @agent-native/core@latest code list`, `status`, `resume`, `stop`, or `ui` to inspect and control the same run from the CLI, the local UI, or the Desktop Code tab.
143
143
 
144
144
  ## Architecture principles {#architecture-principles}
145
145
 
@@ -63,7 +63,7 @@ The resource shell owns the outer host size. `embedApp({ height })` defaults to
63
63
 
64
64
  Claude uses the single-frame transplant path by default. You can also force it in other hosts with `embedMode: "transplant"` or `frame: "transplant"` when debugging host module-loading behavior. You can force the nested diagnostic iframe with `embedMode: "iframe"`, `renderMode: "iframe"`, `nested: true`, or `frame: "iframe"`. If the iframe is blocked, `embedApp()` replaces it with an open-app fallback: the user can retry inline, open a freshly minted embed session through the host, or use the visible route URL. Keep the action's `link` target useful on its own because it is still the universal escape hatch.
65
65
 
66
- When testing Claude through ngrok, use a production build (`agent-native build` then `agent-native start`) or a deployed preview/production URL. Claude's single-frame transplant path works with production asset chunks; raw Vite dev modules such as `/app/root.tsx` can be protected by app auth and fail dynamic imports from the Claude resource origin.
66
+ When testing Claude through ngrok, use a production build (`npx @agent-native/core@latest build` then `npx @agent-native/core@latest start`) or a deployed preview/production URL. Claude's single-frame transplant path works with production asset chunks; raw Vite dev modules such as `/app/root.tsx` can be protected by app auth and fail dynamic imports from the Claude resource origin.
67
67
 
68
68
  ## Host bridge API {#host-bridge}
69
69
 
@@ -149,7 +149,7 @@ The MCP endpoint supports standard remote MCP OAuth plus the existing bearer-tok
149
149
  | Mode | How it works |
150
150
  | --------------------------- | --------------------------------------------------------------------------------------------------------------------- |
151
151
  | Standard MCP OAuth | Client discovers auth from `WWW-Authenticate`, registers, runs PKCE, and sends `Authorization: Bearer <access-token>` |
152
- | Connect-minted JWT | `agent-native connect` / the Connect page mints a per-user, revocable JWT |
152
+ | Connect-minted JWT | `npx @agent-native/core@latest connect` / the Connect page mints a per-user, revocable JWT |
153
153
  | `ACCESS_TOKEN` | Static bearer token — client sends `Authorization: Bearer <token>` |
154
154
  | `ACCESS_TOKENS` | Comma-separated list of valid static bearer tokens |
155
155
  | `A2A_SECRET` | JWT-based auth — tokens are verified cryptographically |
@@ -186,7 +186,7 @@ Access tokens are signed JWTs whose audience is the exact MCP resource URL. The
186
186
  | `mcp:write` | mutating actions and `ask-agent` |
187
187
  | `mcp:apps` | MCP Apps resources (`ui://` HTML resources) |
188
188
 
189
- Refresh tokens are stored only as hashes and are rotated on every refresh. `agent-native connect` writes this URL-only OAuth entry for Claude Code clients by default; keep the Connect page, `agent-native connect --token <token>`, and static bearer config for local stdio proxying, older clients, and emergency/debug flows.
189
+ Refresh tokens are stored only as hashes and are rotated on every refresh. `npx @agent-native/core@latest connect` writes this URL-only OAuth entry for Claude Code clients by default; keep the Connect page, `npx @agent-native/core@latest connect --token <token>`, and static bearer config for local stdio proxying, older clients, and emergency/debug flows.
190
190
 
191
191
  ## Custom MCP setup {#custom-setup}
192
192
 
@@ -16,7 +16,7 @@ npx @agent-native/core@latest code attach --last
16
16
  npx @agent-native/core@latest code /migrate ./my-next-app --out ../migrated-app
17
17
  ```
18
18
 
19
- **Agent-Native Code** is the open-source Claude Code/Codex-like workspace for coding work in Agent-Native. `agent-native` or `agent-native code` launches it with no prompt required, and a bare prompt starts a generic coding task directly. `/migrate` is one built-in capability for moving an existing app, URL, or described product into agent-native. It uses the same session store, transcript, and desktop hub as the CLI `code` command, so migration behaves like a goal you can resume, attach to, inspect, and stop rather than a separate one-off product.
19
+ **Agent-Native Code** is the open-source Claude Code/Codex-like workspace for coding work in Agent-Native. `npx @agent-native/core@latest` or `npx @agent-native/core@latest code` launches it with no prompt required, and a bare prompt starts a generic coding task directly. `/migrate` is one built-in capability for moving an existing app, URL, or described product into agent-native. It uses the same session store, transcript, and desktop hub as the CLI `code` command, so migration behaves like a goal you can resume, attach to, inspect, and stop rather than a separate one-off product.
20
20
 
21
21
  See [Agent-Native Code UI](/docs/code-agents-ui) for the shared CLI run controls (`list`/`attach`/`logs`/`resume`/`status`/`stop`/`ui`) and the file-backed, long-running background-run model that `/migrate` sessions use.
22
22
 
@@ -35,7 +35,7 @@ full run-control command set).
35
35
 
36
36
  ## Code Workspace
37
37
 
38
- `agent-native code` opens the interactive Agent-Native Code shell. Inside the shell, `/migrate` is a slash goal alongside `/audit` and other built-in commands. Projects can also define custom migration variants in `.agents/commands/*.md`. The CLI and Desktop hub share the same run store — start in one and continue in the other using the standard `list`/`attach`/`logs`/`resume`/`approve`/`stop` controls.
38
+ `npx @agent-native/core@latest code` opens the interactive Agent-Native Code shell. Inside the shell, `/migrate` is a slash goal alongside `/audit` and other built-in commands. Projects can also define custom migration variants in `.agents/commands/*.md`. The CLI and Desktop hub share the same run store — start in one and continue in the other using the standard `list`/`attach`/`logs`/`resume`/`approve`/`stop` controls.
39
39
 
40
40
  See [Agent-Native Code UI](/docs/code-agents-ui) for the full shell, run controls, Plan/Auto modes, slash-goal discovery, and Desktop hub integration.
41
41