@agent-native/core 0.54.1 → 0.55.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.
Files changed (134) hide show
  1. package/README.md +16 -1
  2. package/dist/agent/production-agent.d.ts.map +1 -1
  3. package/dist/agent/production-agent.js +4 -0
  4. package/dist/agent/production-agent.js.map +1 -1
  5. package/dist/cli/connect.d.ts +3 -1
  6. package/dist/cli/connect.d.ts.map +1 -1
  7. package/dist/cli/connect.js +7 -1
  8. package/dist/cli/connect.js.map +1 -1
  9. package/dist/cli/index.js +1 -1
  10. package/dist/cli/index.js.map +1 -1
  11. package/dist/cli/plan-local.d.ts +40 -0
  12. package/dist/cli/plan-local.d.ts.map +1 -1
  13. package/dist/cli/plan-local.js +495 -9
  14. package/dist/cli/plan-local.js.map +1 -1
  15. package/dist/cli/skills.d.ts +17 -2
  16. package/dist/cli/skills.d.ts.map +1 -1
  17. package/dist/cli/skills.js +135 -36
  18. package/dist/cli/skills.js.map +1 -1
  19. package/dist/client/AgentChatHome.d.ts +23 -0
  20. package/dist/client/AgentChatHome.d.ts.map +1 -0
  21. package/dist/client/AgentChatHome.js +13 -0
  22. package/dist/client/AgentChatHome.js.map +1 -0
  23. package/dist/client/AgentPanel.d.ts +29 -2
  24. package/dist/client/AgentPanel.d.ts.map +1 -1
  25. package/dist/client/AgentPanel.js +116 -68
  26. package/dist/client/AgentPanel.js.map +1 -1
  27. package/dist/client/AssistantChat.d.ts.map +1 -1
  28. package/dist/client/AssistantChat.js +140 -18
  29. package/dist/client/AssistantChat.js.map +1 -1
  30. package/dist/client/FeedbackButton.d.ts +7 -1
  31. package/dist/client/FeedbackButton.d.ts.map +1 -1
  32. package/dist/client/FeedbackButton.js +13 -3
  33. package/dist/client/FeedbackButton.js.map +1 -1
  34. package/dist/client/MultiTabAssistantChat.d.ts +1 -2
  35. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  36. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  37. package/dist/client/agent-sidebar-state.d.ts +2 -0
  38. package/dist/client/agent-sidebar-state.d.ts.map +1 -1
  39. package/dist/client/agent-sidebar-state.js +15 -4
  40. package/dist/client/agent-sidebar-state.js.map +1 -1
  41. package/dist/client/chat/index.d.ts +5 -0
  42. package/dist/client/chat/index.d.ts.map +1 -1
  43. package/dist/client/chat/index.js +5 -0
  44. package/dist/client/chat/index.js.map +1 -1
  45. package/dist/client/chat/run-recovery.d.ts.map +1 -1
  46. package/dist/client/chat/run-recovery.js +4 -6
  47. package/dist/client/chat/run-recovery.js.map +1 -1
  48. package/dist/client/chat/tool-call-display.d.ts +1 -0
  49. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  50. package/dist/client/chat/tool-call-display.js +16 -0
  51. package/dist/client/chat/tool-call-display.js.map +1 -1
  52. package/dist/client/chat/tool-render-registry.d.ts +24 -0
  53. package/dist/client/chat/tool-render-registry.d.ts.map +1 -0
  54. package/dist/client/chat/tool-render-registry.js +37 -0
  55. package/dist/client/chat/tool-render-registry.js.map +1 -0
  56. package/dist/client/chat/widgets/DataChartRenderer.d.ts +5 -0
  57. package/dist/client/chat/widgets/DataChartRenderer.d.ts.map +1 -0
  58. package/dist/client/chat/widgets/DataChartRenderer.js +33 -0
  59. package/dist/client/chat/widgets/DataChartRenderer.js.map +1 -0
  60. package/dist/client/chat/widgets/DataChartWidget.d.ts +5 -0
  61. package/dist/client/chat/widgets/DataChartWidget.d.ts.map +1 -0
  62. package/dist/client/chat/widgets/DataChartWidget.js +15 -0
  63. package/dist/client/chat/widgets/DataChartWidget.js.map +1 -0
  64. package/dist/client/chat/widgets/DataInsightsWidget.d.ts +5 -0
  65. package/dist/client/chat/widgets/DataInsightsWidget.d.ts.map +1 -0
  66. package/dist/client/chat/widgets/DataInsightsWidget.js +18 -0
  67. package/dist/client/chat/widgets/DataInsightsWidget.js.map +1 -0
  68. package/dist/client/chat/widgets/DataTableWidget.d.ts +9 -0
  69. package/dist/client/chat/widgets/DataTableWidget.d.ts.map +1 -0
  70. package/dist/client/chat/widgets/DataTableWidget.js +95 -0
  71. package/dist/client/chat/widgets/DataTableWidget.js.map +1 -0
  72. package/dist/client/chat/widgets/builtin-tool-renderers.d.ts +2 -0
  73. package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -0
  74. package/dist/client/chat/widgets/builtin-tool-renderers.js +27 -0
  75. package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -0
  76. package/dist/client/chat/widgets/data-widget-types.d.ts +52 -0
  77. package/dist/client/chat/widgets/data-widget-types.d.ts.map +1 -0
  78. package/dist/client/chat/widgets/data-widget-types.js +93 -0
  79. package/dist/client/chat/widgets/data-widget-types.js.map +1 -0
  80. package/dist/client/chat-view-transition.d.ts +23 -0
  81. package/dist/client/chat-view-transition.d.ts.map +1 -0
  82. package/dist/client/chat-view-transition.js +50 -0
  83. package/dist/client/chat-view-transition.js.map +1 -0
  84. package/dist/client/composer/PromptComposer.d.ts +1 -1
  85. package/dist/client/composer/PromptComposer.d.ts.map +1 -1
  86. package/dist/client/composer/PromptComposer.js +2 -2
  87. package/dist/client/composer/PromptComposer.js.map +1 -1
  88. package/dist/client/composer/TiptapComposer.d.ts +2 -1
  89. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  90. package/dist/client/composer/TiptapComposer.js +2 -1
  91. package/dist/client/composer/TiptapComposer.js.map +1 -1
  92. package/dist/client/index.d.ts +5 -1
  93. package/dist/client/index.d.ts.map +1 -1
  94. package/dist/client/index.js +5 -1
  95. package/dist/client/index.js.map +1 -1
  96. package/dist/client/route-state.d.ts +6 -0
  97. package/dist/client/route-state.d.ts.map +1 -1
  98. package/dist/client/route-state.js +29 -1
  99. package/dist/client/route-state.js.map +1 -1
  100. package/dist/client/use-chat-threads.d.ts.map +1 -1
  101. package/dist/client/use-chat-threads.js +19 -4
  102. package/dist/client/use-chat-threads.js.map +1 -1
  103. package/dist/scripts/dev/index.d.ts +1 -0
  104. package/dist/scripts/dev/index.d.ts.map +1 -1
  105. package/dist/scripts/dev/index.js +129 -127
  106. package/dist/scripts/dev/index.js.map +1 -1
  107. package/dist/server/agent-chat-plugin.d.ts +8 -0
  108. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  109. package/dist/server/agent-chat-plugin.js +29 -21
  110. package/dist/server/agent-chat-plugin.js.map +1 -1
  111. package/dist/server/prompts/framework-core-compact.d.ts +4 -1
  112. package/dist/server/prompts/framework-core-compact.d.ts.map +1 -1
  113. package/dist/server/prompts/framework-core-compact.js +11 -4
  114. package/dist/server/prompts/framework-core-compact.js.map +1 -1
  115. package/dist/server/prompts/framework-core.d.ts +4 -1
  116. package/dist/server/prompts/framework-core.d.ts.map +1 -1
  117. package/dist/server/prompts/framework-core.js +15 -5
  118. package/dist/server/prompts/framework-core.js.map +1 -1
  119. package/dist/server/prompts/shared-rules.d.ts +4 -1
  120. package/dist/server/prompts/shared-rules.d.ts.map +1 -1
  121. package/dist/server/prompts/shared-rules.js +4 -1
  122. package/dist/server/prompts/shared-rules.js.map +1 -1
  123. package/dist/styles/agent-native.css +55 -0
  124. package/dist/vite/client.d.ts.map +1 -1
  125. package/dist/vite/client.js +4 -0
  126. package/dist/vite/client.js.map +1 -1
  127. package/docs/content/external-agents.md +14 -4
  128. package/docs/content/getting-started.md +1 -0
  129. package/docs/content/key-concepts.md +34 -15
  130. package/docs/content/mcp-apps.md +2 -0
  131. package/docs/content/mcp-protocol.md +2 -2
  132. package/docs/content/template-plan.md +16 -1
  133. package/docs/content/what-is-agent-native.md +10 -2
  134. package/package.json +1 -1
@@ -190,21 +190,40 @@ See [Context Awareness](/docs/context-awareness) for the full pattern: navigatio
190
190
 
191
191
  Agent-native supports a lot of agent-facing protocols because different hosts standardize different pieces of the same workflow. App authors should not have to choose among them or rebuild the same operation for each client. The center of gravity stays the action system.
192
192
 
193
- | Surface | What agent-native provides | What you write |
194
- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
195
- | Agent tool calling | The in-app agent sees actions as function tools with zod-derived JSON Schema. | `defineAction()` |
196
- | UI actions | React calls the same action through `useActionMutation()` / `useActionQuery()`. | The same action |
197
- | HTTP and CLI | Actions auto-mount at `/_agent-native/actions/:name` and run via `pnpm action <name>`. | The same action |
198
- | MCP server | External MCP hosts get Streamable HTTP tools, the `ask-agent` meta-tool, and optional MCP Apps resources. | The same action, plus optional `mcpApp` |
199
- | MCP Auth | Remote MCP OAuth, PKCE, dynamic client registration, refresh tokens, and `mcp:read` / `mcp:write` / `mcp:apps` scopes. | Nothing per action |
200
- | A2A | Other agents discover the agent card and call the app over JSON-RPC tasks. | The same actions and agent config |
201
- | Deep links | Action results can round-trip users into the running UI through `/_agent-native/open` and `agentnative://open`. | Optional `link` metadata |
202
- | MCP clients | The app can also consume local, remote, or hub-shared MCP servers as `mcp__...` tools. | `mcp.config.json` or settings |
203
- | Instructions and skills | `AGENTS.md`, skills, memory, slash commands, sub-agents, jobs, and automations live in the SQL-backed workspace. | Workspace resources, not protocol glue |
204
- | Agent Web | Public pages can publish `robots.txt`, `sitemap.xml`, `llms.txt`, markdown mirrors, and structured metadata. | Route access plus `agentWeb` config |
205
- | Extensions | Sandboxed mini-apps call app actions, persist extension data, and use proxied fetch helpers. | Extension HTML using `appAction()` |
206
-
207
- The practical rule is simple: implement domain operations as actions, add `readOnly`, `publicAgent`, `link`, or `mcpApp` metadata only when the surface needs it, and use skills/instructions for behavior. MCP, A2A, MCP Apps, MCP Auth, UI mutations, CLI commands, and deep-link handoffs are adapters around that same core.
193
+ | Surface | Status | What agent-native provides | What you write |
194
+ | ----------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
195
+ | Agent tool calling | Shipping | The in-app agent sees actions as function tools with zod-derived JSON Schema. | `defineAction()` |
196
+ | UI actions | Shipping | React calls the same action through `useActionMutation()` / `useActionQuery()`. | The same action |
197
+ | Native chat widgets | Shipping | Tool results with explicit widget discriminants can render native tables, charts, approvals, and setup cards in chat. | Structured action results |
198
+ | HTTP and CLI | Shipping | Actions auto-mount at `/_agent-native/actions/:name` and run via `pnpm action <name>`. | The same action |
199
+ | MCP server | Shipping | External MCP hosts get Streamable HTTP tools, the `ask-agent` meta-tool, and optional MCP Apps resources. | The same action, plus optional `mcpApp` |
200
+ | MCP Auth | Shipping | Remote MCP OAuth, PKCE, dynamic client registration, refresh tokens, and `mcp:read` / `mcp:write` / `mcp:apps` scopes. | Nothing per action |
201
+ | MCP Apps | Shipping | External hosts that support app resources can render iframe/native-host widgets, with deep-link fallback elsewhere. | Optional `mcpApp` metadata |
202
+ | A2A | Shipping | Other agents discover the agent card and call the app over JSON-RPC tasks. | The same actions and agent config |
203
+ | Deep links | Shipping | Action results can round-trip users into the running UI through `/_agent-native/open` and `agentnative://open`. | Optional `link` metadata |
204
+ | MCP clients | Shipping | The app can also consume local, remote, or hub-shared MCP servers as `mcp__...` tools. | `mcp.config.json` or settings |
205
+ | Instructions and skills | Shipping | `AGENTS.md`, skills, memory, slash commands, sub-agents, jobs, and automations live in the SQL-backed workspace. | Workspace resources, not protocol glue |
206
+ | Agent Web | Shipping | Public pages can publish `robots.txt`, `sitemap.xml`, `llms.txt`, markdown mirrors, and structured metadata. | Route access plus `agentWeb` config |
207
+ | Extensions | Shipping | Sandboxed mini-apps call app actions, persist extension data, and use proxied fetch helpers. | Extension HTML using `appAction()` |
208
+ | AG-UI | Adapter target | A good fit for connecting an external agent runtime to an agent-native chat/UI shell through event streams. | An adapter, not duplicate actions |
209
+ | A2UI | Watch / future | A promising declarative UI wire format for agent-generated cross-platform widgets. | A renderer/adapter when it matures |
210
+ | ACP | Coding-agent IDE | Useful for coding agents inside editors/IDEs; not the general app-agent UI contract. | Editor/agent adapter work |
211
+
212
+ The practical rule is simple: implement domain operations as actions, add `readOnly`, `publicAgent`, `link`, `mcpApp`, or an explicit native widget result only when a surface needs it, and use skills/instructions for behavior. MCP, A2A, MCP Apps, MCP Auth, UI mutations, native chat widgets, CLI commands, and deep-link handoffs are adapters around that same core.
213
+
214
+ Adapter horizon: [AG-UI](https://docs.ag-ui.com/introduction) is a strong fit for connecting external agent runtimes to Agent-Native chat and app shells through events. [A2UI](https://developers.googleblog.com/introducing-a2ui-an-open-project-for-agent-driven-interfaces/) is a promising declarative UI format for generated widgets. [ACP](https://zed.dev/acp) is important for coding-agent/editor interoperability, but it is not the general BYO app-agent UI contract.
215
+
216
+ ## Three product shapes {#three-product-shapes}
217
+
218
+ Those protocol adapters let the same app grow across three product shapes:
219
+
220
+ | Shape | User experience | Best for |
221
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
222
+ | **Headless agent** | Call actions and the agent from your code, another app, MCP, A2A, HTTP, or CLI. | Automation, integrations, background jobs, developer workflows |
223
+ | **Rich chat agent** | A standalone or embedded chat can guide setup, call tools, request approvals, and render native tables/charts/results. | Agent-first workflows that still need inspectable output |
224
+ | **Whole application** | Chat starts central when helpful, then becomes a sidebar next to forms, dashboards, editors, calendars, or documents. | Durable products where humans and agents share state over time |
225
+
226
+ You should be able to start with the headless contract, add rich chat, and then grow a full app around the same actions and SQL state instead of rebuilding.
208
227
 
209
228
  ## Agent modifies code {#agent-modifies-code}
210
229
 
@@ -9,6 +9,8 @@ MCP Apps are the official `io.modelcontextprotocol/ui` extension that lets compa
9
9
 
10
10
  For connecting external agents and the broader MCP server setup, see [External Agents](/docs/external-agents) and [MCP Protocol](/docs/mcp-protocol). This page covers authoring MCP App resources and the embed bridge that powers them.
11
11
 
12
+ Inside an Agent-Native app's own chat, prefer native chat renderers for first-party widgets such as tables, charts, setup cards, and approvals. Use MCP Apps for external/cross-host inline UI in Claude, ChatGPT, Copilot, Cursor, and other compatible hosts, with the action `link` as the universal deep-link fallback.
13
+
12
14
  ## Authoring: optional MCP Apps UI {#mcp-apps}
13
15
 
14
16
  For hosts that support the MCP Apps extension, an action can also advertise an inline UI resource with `mcpApp`. This is a progressive enhancement for flows where the external agent should hand the user an interactive surface instead of only text — for example reviewing an email draft, editing a calendar invite, or choosing between generated dashboard variants.
@@ -15,7 +15,7 @@ Every agent-native app automatically exposes a remote MCP (Model Context Protoco
15
15
  | Make your app callable over MCP (server setup, auth, tools) | This page |
16
16
  | Give your app's agent more tools from external MCP servers | [MCP Clients](/docs/mcp-clients) |
17
17
  | App-to-app delegation via JSON-RPC | [A2A Protocol](/docs/a2a-protocol) |
18
- | Build or embed interactive MCP App UIs | [MCP Apps](/docs/mcp-apps) |
18
+ | Build or embed interactive MCP App resources | [MCP Apps](/docs/mcp-apps) |
19
19
 
20
20
  If your goal is to connect Claude, ChatGPT, Claude Code, Codex, Cursor, or Claude Cowork to hosted agent-native apps, start with [External Agents](/docs/external-agents). It documents the recommended single Dispatch connector at `https://dispatch.agent-native.com/_agent-native/mcp`, direct per-app URLs for isolated app access, standard remote MCP OAuth, fallback config for older clients, MCP Apps inline UIs, and deep links back into the UI. This page is the lower-level MCP server reference.
21
21
 
@@ -29,7 +29,7 @@ Key concepts:
29
29
  - **Streamable HTTP** — uses the modern MCP transport over standard HTTP (POST + SSE)
30
30
  - **Same actions** — the exact same action registry that powers agent chat and A2A
31
31
  - **`ask-agent` tool** — a meta-tool that delegates to the full agent loop for complex tasks
32
- - **MCP Apps** — actions can advertise inline HTML UIs through the official `io.modelcontextprotocol/ui` extension
32
+ - **MCP Apps** — actions can advertise interactive UI resources through the official `io.modelcontextprotocol/ui` extension
33
33
  - **Standard remote MCP OAuth** — OAuth 2.1 discovery, dynamic client registration, authorization-code + PKCE, refresh-token rotation
34
34
  - **Bearer auth fallback** — uses `ACCESS_TOKEN`, `ACCESS_TOKENS`, or connect-minted JWTs for clients that cannot run OAuth
35
35
 
@@ -211,6 +211,7 @@ After writing the folder, the agent starts a tiny localhost bridge and opens the
211
211
  hosted Plan UI against that local-only source:
212
212
 
213
213
  ```bash
214
+ npx @agent-native/core@latest plan local check --dir plans/<slug>
214
215
  npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind plan --open
215
216
  ```
216
217
 
@@ -220,7 +221,21 @@ The page is the normal Plan viewer, but the browser fetches `plan.mdx`,
220
221
  `canvas.mdx`, `prototype.mdx`, `.plan-state.json`, and local image assets from
221
222
  the localhost bridge. Plan content is not written to the hosted database and is
222
223
  not sent through hosted Plan actions. Keep the bridge process running while you
223
- review; the URL is local to your machine and is not a shareable team link.
224
+ review; the URL is local to your machine and is not a shareable team link. The
225
+ serve command writes the open URL to `.plan-url` by default so coding agents can
226
+ capture it without scraping long-running stdout; treat that file as local-only
227
+ because the URL contains the bridge token, and do not commit it.
228
+
229
+ On macOS, `--open` prefers Chrome/Chromium because Safari can block the hosted
230
+ HTTPS Plan page from fetching an HTTP localhost bridge. For headless
231
+ troubleshooting, run:
232
+
233
+ ```bash
234
+ npx @agent-native/core@latest plan local verify --dir plans/<slug> --kind plan
235
+ ```
236
+
237
+ `verify` starts the bridge, checks the private-network preflight and JSON
238
+ payload, prints diagnostics, and exits.
224
239
 
225
240
  If you run the Plan app locally with the same `PLAN_LOCAL_DIR`, you can also
226
241
  open the editable app route:
@@ -11,7 +11,7 @@ If you only remember one thing from this page, remember this: most AI apps today
11
11
 
12
12
  ## What it looks like as a user {#what-it-looks-like}
13
13
 
14
- Picture your inbox, calendar, or analytics dashboard. Now picture an agent panel docked on the right side of that app. You can:
14
+ Picture your inbox, calendar, form builder, or analytics dashboard. Sometimes the first screen is chat: you ask what you want, the agent guides setup, shows a table or chart, and opens the right app view. Sometimes chat is docked on the right side of a full application. In both cases, you can:
15
15
 
16
16
  - **Click anything you'd normally click.** All the buttons, lists, dashboards, keyboard shortcuts — they all still work. This is a real app, not a chat window pretending to be one.
17
17
  - **Or just ask.** Type "reply to the email from Sara saying I'll be there by 3" into the agent. It opens the right thread, drafts the reply, and shows it to you for approval — exactly as if you'd done it by hand.
@@ -63,6 +63,14 @@ Even when the agent does all the heavy lifting, humans still need to:
63
63
 
64
64
  At minimum, "a UI for the agent" is an observability and management dashboard. At maximum, it's a full SaaS app with the agent embedded as a co-pilot. Both ends count as agent-native — see [Pure-Agent Apps](/docs/pure-agent-apps) for the minimal end and [Templates](/docs/cloneable-saas) for the maximal end.
65
65
 
66
+ There are three useful shapes:
67
+
68
+ - **Headless** — call the agent and actions from code, HTTP, CLI, MCP, or A2A.
69
+ - **Rich chat** — give the agent a first-class chat UI with native tool widgets such as tables, charts, approvals, setup cards, and links into app views.
70
+ - **Whole app** — put a full application around the agent, with SQL state, context awareness, deep links, and live sync so humans and agents stay in the same workspace.
71
+
72
+ Agent-native is designed so those are stages, not rewrites. You can start headless, add rich chat, and grow into a full app around the same action surface.
73
+
66
74
  ## Why every app benefits from an agent {#why-every-app-benefits-from-an-agent}
67
75
 
68
76
  The flip side is just as important. Existing SaaS products keep hitting the same wall: 80% of what you need works great, and 20% you just can't change. Adding a chat sidebar rarely fixes that — the chat usually can't actually _do_ the things the UI can.
@@ -173,7 +181,7 @@ import { AgentSidebar } from "@agent-native/core/client";
173
181
  <AgentSidebar />;
174
182
  ```
175
183
 
176
- One action, many surfaces: the agent calls it as a tool, the UI calls it as a typesafe mutation, external agents reach it over [A2A](/docs/a2a-protocol), and MCP hosts call it through the app's [MCP server](/docs/mcp-protocol), optionally with MCP Apps UI resources and standard remote MCP OAuth handled by the framework. See [Actions](/docs/actions) for the full reference.
184
+ One action, many surfaces: the agent calls it as a tool, the UI calls it as a typesafe mutation, native chat can render explicit widget results, external agents reach it over [A2A](/docs/a2a-protocol), and MCP hosts call it through the app's [MCP server](/docs/mcp-protocol), optionally with MCP Apps UI resources and standard remote MCP OAuth handled by the framework. See [Actions](/docs/actions) for the full reference.
177
185
 
178
186
  ## What's next {#whats-next}
179
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.54.1",
3
+ "version": "0.55.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"