@agent-native/core 0.22.9 → 0.22.11

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 (42) hide show
  1. package/dist/client/AgentPanel.d.ts.map +1 -1
  2. package/dist/client/AgentPanel.js +8 -12
  3. package/dist/client/AgentPanel.js.map +1 -1
  4. package/dist/client/AssistantChat.d.ts +7 -0
  5. package/dist/client/AssistantChat.d.ts.map +1 -1
  6. package/dist/client/AssistantChat.js +106 -23
  7. package/dist/client/AssistantChat.js.map +1 -1
  8. package/dist/client/FeedbackButton.d.ts +5 -1
  9. package/dist/client/FeedbackButton.d.ts.map +1 -1
  10. package/dist/client/FeedbackButton.js +20 -3
  11. package/dist/client/FeedbackButton.js.map +1 -1
  12. package/dist/client/agent-chat-adapter.d.ts +10 -0
  13. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  14. package/dist/client/agent-chat-adapter.js +6 -19
  15. package/dist/client/agent-chat-adapter.js.map +1 -1
  16. package/dist/client/analytics.d.ts +1 -1
  17. package/dist/client/analytics.d.ts.map +1 -1
  18. package/dist/client/analytics.js +2 -40
  19. package/dist/client/analytics.js.map +1 -1
  20. package/dist/client/clipboard.d.ts +2 -0
  21. package/dist/client/clipboard.d.ts.map +1 -0
  22. package/dist/client/clipboard.js +51 -0
  23. package/dist/client/clipboard.js.map +1 -0
  24. package/dist/client/feedback-context.d.ts +11 -0
  25. package/dist/client/feedback-context.d.ts.map +1 -0
  26. package/dist/client/feedback-context.js +73 -0
  27. package/dist/client/feedback-context.js.map +1 -0
  28. package/dist/client/url-scrub.d.ts +2 -0
  29. package/dist/client/url-scrub.d.ts.map +1 -0
  30. package/dist/client/url-scrub.js +41 -0
  31. package/dist/client/url-scrub.js.map +1 -0
  32. package/dist/mcp/build-server.d.ts.map +1 -1
  33. package/dist/mcp/build-server.js +161 -17
  34. package/dist/mcp/build-server.js.map +1 -1
  35. package/dist/server/agent-chat-plugin.d.ts +5 -0
  36. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  37. package/dist/server/agent-chat-plugin.js +74 -59
  38. package/dist/server/agent-chat-plugin.js.map +1 -1
  39. package/docs/content/actions.md +2 -2
  40. package/docs/content/external-agents.md +3 -1
  41. package/docs/content/mcp-protocol.md +5 -3
  42. package/package.json +1 -1
@@ -152,7 +152,7 @@ If your app is an [A2A](/docs/a2a-protocol) peer, other agent-native apps discov
152
152
 
153
153
  ## Exposing it over MCP {#mcp}
154
154
 
155
- With MCP enabled, your actions show up in the framework's MCP server at `/_agent-native/mcp`. Any MCP client Claude, ChatGPT custom MCP apps, Claude Desktop/Code, Cursor, Codex, etc. can connect and see them as tools. See [MCP Protocol](/docs/mcp-protocol).
155
+ With MCP enabled, your actions show up in the framework's MCP server at `/_agent-native/mcp`. Stdio/static-token developer clients see the full connected action surface. OAuth app hosts that request `mcp:apps` get a compact catalog containing app-facing builtins, actions with `mcpApp`, and actions explicitly marked `publicAgent.expose`, so ChatGPT/Claude discovery stays small. See [MCP Protocol](/docs/mcp-protocol).
156
156
 
157
157
  For UI-capable MCP hosts, actions can also attach an optional MCP Apps resource.
158
158
  Use the shared full-app embed helper when the action needs an inline experience.
@@ -188,7 +188,7 @@ export default defineAction({
188
188
  });
189
189
  ```
190
190
 
191
- This advertises the MCP Apps extension (`io.modelcontextprotocol/ui`), exposes the HTML via MCP resources, and includes both current and legacy UI resource metadata for compatible hosts. Keep `link` as the fallback for CLI and non-UI MCP clients; see [External Agents](/docs/external-agents#mcp-apps).
191
+ This advertises the MCP Apps extension (`io.modelcontextprotocol/ui`), exposes the HTML via MCP resources/templates, and includes standard MCP Apps plus ChatGPT Apps SDK widget metadata for compatible hosts. Keep `link` as the fallback for CLI and non-UI MCP clients; see [External Agents](/docs/external-agents#mcp-apps).
192
192
 
193
193
  The helper launches the action's `link` target through `/_agent-native/embed/start` with a short-lived browser session, so routes such as full dashboards, filtered inboxes, drafts, and extension pages can reuse the app's React components directly.
194
194
 
@@ -229,6 +229,8 @@ On top of the per-action tools the MCP server exposes a stable verb set, so an e
229
229
 
230
230
  `create_workspace_app` rejects any non-allow-listed template — the public template allow-list in `packages/shared-app-config/templates.ts` is authoritative and CI-guarded; an external agent cannot widen it. A same-named template action overrides a builtin (template-over-core precedence). Disable the whole set with `MCPConfig.builtinCrossAppTools: false`.
231
231
 
232
+ For OAuth callers that request `mcp:apps`, the server intentionally advertises a compact `tools/list` catalog so app hosts do not ingest every internal action schema. The model sees app-facing builtins (`list_apps`, `open_app`, app-only `create_embed_session`), actions with `mcpApp`, and actions explicitly marked `publicAgent.expose`. Stdio/static-token developer clients still get the full connected action surface. If a host should be able to call a new action from an MCP App conversation, mark it with `mcpApp` for UI-producing work or `publicAgent` for safe read/ingest work.
233
+
232
234
  ### Per-app tour {#tour}
233
235
 
234
236
  Every allow-listed template that produces or lists a navigable resource ships a `link` builder, and the ingest-heavy ones ship a GET + `publicAgent` action so a connected agent can pull live state:
@@ -306,7 +308,7 @@ export default defineAction({
306
308
  });
307
309
  ```
308
310
 
309
- The MCP server advertises extension `io.modelcontextprotocol/ui`, adds `_meta.ui.resourceUri` plus `_meta["ui/resourceUri"]` to `tools/list`, and exposes the HTML through `resources/list` + `resources/read` using MIME `text/html;profile=mcp-app`. The stdio proxy forwards those resource handlers from the live app, so desktop and CLI clients see the same resources as HTTP clients.
311
+ The MCP server advertises extension `io.modelcontextprotocol/ui`, adds `_meta.ui.resourceUri` plus `_meta["ui/resourceUri"]` to `tools/list`, and also emits ChatGPT Apps SDK compatibility metadata (`openai/outputTemplate`, widget CSP/description/accessibility). It exposes the HTML through `resources/list`, `resources/templates/list`, and `resources/read` using MIME `text/html;profile=mcp-app`. The stdio proxy forwards those resource handlers from the live app, so desktop and CLI clients see the same resources as HTTP clients.
310
312
 
311
313
  Keep the existing `link` builder even when adding `mcpApp`. CLI-only clients, older hosts, and any host that does not render MCP Apps will ignore the UI metadata and still need the `"Open in … →"` link. `embedApp()` uses that link as its launch target, calls the app-only `create_embed_session` helper, exchanges a one-time SQL ticket at `/_agent-native/embed/start`, and loads the target route in an iframe with a short-lived browser session plus a bearer fallback for same-origin fetches. `open_app({ app, path, embed: true })` is the generic escape hatch for routes such as full dashboards, filtered inboxes, calendar draft views, analyses, and extension pages, and should be used liberally when the full app is the clearest review/edit surface.
312
314
 
@@ -72,11 +72,13 @@ POST https://your-app.example.com/_agent-native/mcp
72
72
 
73
73
  The server supports the standard MCP handshake: `initialize` → `initialized` → `tools/list` → `tools/call`.
74
74
 
75
- If an action declares `mcpApp`, the server also advertises the official MCP Apps extension (`io.modelcontextprotocol/ui`) and supports `resources/list`, `resources/templates/list`, and `resources/read` for the app resource. Hosts that render MCP Apps can show the UI inline; hosts that do not can still call the tool and use the deep-link fallback. Product UIs should use `embedApp()` so the inline surface is the real React app route, or a focused route that renders a shared React component such as an Analytics chart, not a separate plain HTML implementation. The current official extension matrix includes Claude, Claude Desktop, VS Code GitHub Copilot, Goose, Postman, MCPJam, ChatGPT, and Cursor; host support varies by version and plan, so use the [External Agents MCP Apps notes](/docs/external-agents#mcp-apps-compatibility) for the user-facing guidance.
75
+ If an action declares `mcpApp`, the server also advertises the official MCP Apps extension (`io.modelcontextprotocol/ui`) and supports `resources/list`, `resources/templates/list`, and `resources/read` for the app resource. Hosts that render MCP Apps can show the UI inline; hosts that do not can still call the tool and use the deep-link fallback. Product UIs should use `embedApp()` so the inline surface is the real React app route, or a focused route that renders a shared React component such as an Analytics chart, not a separate plain HTML implementation. The server emits both standard MCP Apps metadata and ChatGPT Apps SDK compatibility metadata so app-capable hosts can find the same `ui://` resource. The current official extension matrix includes Claude, Claude Desktop, VS Code GitHub Copilot, Goose, Postman, MCPJam, ChatGPT, and Cursor; host support varies by version and plan, so use the [External Agents MCP Apps notes](/docs/external-agents#mcp-apps-compatibility) for the user-facing guidance.
76
76
 
77
77
  ## Tools {#tools}
78
78
 
79
- All actions registered in your app are exposed as MCP tools. The mapping is direct:
79
+ Stdio/static-token developer clients see all connected app actions as MCP tools. OAuth callers that request `mcp:apps` get a compact app-host catalog: app-facing builtins, actions with `mcpApp`, and actions explicitly marked `publicAgent.expose`. This keeps ChatGPT/Claude app-host discovery small while preserving the full developer surface for local agents.
80
+
81
+ The mapping is direct:
80
82
 
81
83
  | Action property | MCP tool property |
82
84
  | ------------------ | ----------------- |
@@ -84,7 +86,7 @@ All actions registered in your app are exposed as MCP tools. The mapping is dire
84
86
  | `tool.parameters` | `inputSchema` |
85
87
  | Action name | Tool name |
86
88
 
87
- When `mcpApp` is present, the tool entry also includes `_meta.ui.resourceUri` and `_meta["ui/resourceUri"]`, and the corresponding `ui://` resource is returned as `text/html;profile=mcp-app`.
89
+ When `mcpApp` is present, the tool entry also includes `_meta.ui.resourceUri`, `_meta["ui/resourceUri"]`, and `_meta["openai/outputTemplate"]`, and the corresponding `ui://` resource is returned as `text/html;profile=mcp-app`.
88
90
 
89
91
  ### The `ask-agent` tool {#ask-agent}
90
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.22.9",
3
+ "version": "0.22.11",
4
4
  "type": "module",
5
5
  "description": "Framework for agent-native application development — where AI agents and UI share state via files",
6
6
  "license": "MIT",