@agent-native/core 0.19.0 → 0.19.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.
- package/dist/a2a/caller-auth.d.ts +1 -0
- package/dist/a2a/caller-auth.d.ts.map +1 -1
- package/dist/a2a/caller-auth.js +1 -1
- package/dist/a2a/caller-auth.js.map +1 -1
- package/dist/agent/production-agent.d.ts +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +34 -2
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +47 -256
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/connect.d.ts +3 -2
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +12 -8
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/mcp-config-writers.d.ts +3 -3
- package/dist/cli/mcp-config-writers.d.ts.map +1 -1
- package/dist/cli/mcp-config-writers.js +19 -8
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +3 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +4 -4
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +3 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +11 -3
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +4 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/dynamic-suggestions.d.ts +43 -0
- package/dist/client/dynamic-suggestions.d.ts.map +1 -0
- package/dist/client/dynamic-suggestions.js +344 -0
- package/dist/client/dynamic-suggestions.js.map +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/settings/SettingsPanel.js +2 -2
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/coding-tools/index.d.ts +31 -0
- package/dist/coding-tools/index.d.ts.map +1 -0
- package/dist/coding-tools/index.js +411 -0
- package/dist/coding-tools/index.js.map +1 -0
- package/dist/mcp/build-server.d.ts +33 -1
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +33 -10
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/builtin-tools.d.ts +3 -1
- package/dist/mcp/builtin-tools.d.ts.map +1 -1
- package/dist/mcp/builtin-tools.js +115 -26
- package/dist/mcp/builtin-tools.js.map +1 -1
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +382 -74
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/mcp/org-directory.d.ts +83 -0
- package/dist/mcp/org-directory.d.ts.map +1 -0
- package/dist/mcp/org-directory.js +201 -0
- package/dist/mcp/org-directory.js.map +1 -0
- package/dist/mcp/server.d.ts +38 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +222 -77
- package/dist/mcp/server.js.map +1 -1
- package/dist/scripts/dev/index.d.ts +6 -4
- package/dist/scripts/dev/index.d.ts.map +1 -1
- package/dist/scripts/dev/index.js +28 -13
- package/dist/scripts/dev/index.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +6 -6
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +65 -32
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-teams.js +2 -2
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/agents-bundle.d.ts +3 -3
- package/dist/server/agents-bundle.js +5 -5
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/server/auth.d.ts +8 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +8 -1
- package/dist/server/auth.js.map +1 -1
- package/dist/server/sentry.d.ts.map +1 -1
- package/dist/server/sentry.js +17 -2
- package/dist/server/sentry.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/client.md +15 -0
- package/docs/content/code-agents-ui.md +11 -1
- package/docs/content/drop-in-agent.md +3 -1
- package/docs/content/external-agents.md +27 -6
- package/docs/content/frames.md +1 -1
- package/docs/content/mcp-clients.md +2 -0
- package/docs/content/mcp-protocol.md +4 -2
- package/docs/content/migration-workbench.md +5 -0
- package/package.json +1 -1
|
@@ -38,6 +38,7 @@ export default function Root() {
|
|
|
38
38
|
"Draft a reply to the latest email",
|
|
39
39
|
"Show me yesterday's signup numbers",
|
|
40
40
|
]}
|
|
41
|
+
dynamicSuggestions
|
|
41
42
|
defaultSidebarWidth={420}
|
|
42
43
|
position="right"
|
|
43
44
|
>
|
|
@@ -57,6 +58,7 @@ That's it. The user now has a toggleable agent on every page — with chat histo
|
|
|
57
58
|
- **`children`** — your app. Rendered in the main area; the sidebar overlays from the chosen side.
|
|
58
59
|
- **`emptyStateText`** — greeting shown when the chat has no messages. Default: `"How can I help you?"`.
|
|
59
60
|
- **`suggestions`** — starter prompts rendered as clickable chips when empty.
|
|
61
|
+
- **`dynamicSuggestions`** — context-aware prompt chips merged with `suggestions`. Enabled by default; pass `false` to show only static suggestions, or `{ max, includeStatic, getSuggestions }` to customize.
|
|
60
62
|
- **`defaultSidebarWidth`** — initial pixel width (mount-only; user resize and saved value override). Default: `380`.
|
|
61
63
|
- **`position`** — `"left"` or `"right"`. Default: `"right"`.
|
|
62
64
|
- **`defaultOpen`** — whether the sidebar starts open (desktop only). Default: `false`.
|
|
@@ -146,7 +148,7 @@ Type-safe arguments come from the zod schema in your `defineAction()`. See [Acti
|
|
|
146
148
|
|
|
147
149
|
## Selection + cursor awareness {#selection}
|
|
148
150
|
|
|
149
|
-
The agent can see what the user has selected — text, cells, slides, contacts — via the `navigation` and `selection` keys in application state. If you'd like Cmd-I (or similar) to send a selected range into the chat as context, see [Context Awareness](/docs/context-awareness).
|
|
151
|
+
The agent can see what the user has selected — text, cells, slides, contacts — via the `navigation` and `selection` keys in application state. The empty chat also uses those keys to offer dynamic suggestions such as "Summarize this selection" or "Improve this slide" when the current screen makes them relevant. If you'd like Cmd-I (or similar) to send a selected range into the chat as context, see [Context Awareness](/docs/context-awareness).
|
|
150
152
|
|
|
151
153
|
## Putting it all together {#putting-it-together}
|
|
152
154
|
|
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "External Agents"
|
|
3
|
-
description: "Connect your own Claude Code,
|
|
2
|
+
title: "External Agents: Claude Code, Codex, Cursor, Cowork"
|
|
3
|
+
description: "Connect your own Claude Code, Codex, Cursor, or Claude Cowork to a hosted agent-native app — then round-trip artifacts back into the running UI with deep links."
|
|
4
|
+
search: "Claude Code Codex Cursor Claude Cowork agent-native connect MCP local agent tools external agents"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# External Agents
|
|
7
8
|
|
|
8
|
-
An agent-native app is reachable by any external coding agent — Claude Code (desktop & CLI), Claude Cowork
|
|
9
|
+
An agent-native app is reachable by any external coding agent — Claude Code (desktop & CLI), Codex, Cursor, Claude Cowork — over [MCP](/docs/mcp-protocol). External agents are great at producing artifacts (a draft, an event, a dashboard) but they live in a terminal or another app. Without a bridge, the user gets a wall of JSON and has to go find the thing.
|
|
9
10
|
|
|
10
11
|
The external-agent bridge closes the loop. First you connect your own agent to a **hosted** app — one command, no token copying. Then the agent does the work over MCP and hands the user a single **"Open in <app> →"** link that opens the real app focused on exactly what was produced. It reuses the existing `navigate` / `application_state` contract the UI already drains every 2s (see [Context Awareness](/docs/context-awareness)) — there is no second navigation mechanism.
|
|
11
12
|
|
|
12
|
-
## Connect
|
|
13
|
+
## Connect Claude Code, Codex, Cursor, and Cowork {#connect}
|
|
13
14
|
|
|
14
|
-
The first-party hosted apps live at `mail.agent-native.com`, `calendar.agent-native.com`, `analytics.agent-native.com`, and so on.
|
|
15
|
+
The first-party hosted apps live at `mail.agent-native.com`, `calendar.agent-native.com`, `analytics.agent-native.com`, and so on. This flow connects supported local agent clients on your machine — Claude Code, Claude Code CLI, Codex, and Claude Cowork — to a hosted agent-native app over MCP. Cursor can use the same MCP endpoint via the no-CLI/manual config path below.
|
|
16
|
+
|
|
17
|
+
If you have the Agent-Native CLI installed, run:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
agent-native connect https://mail.agent-native.com
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or run the same command through npm without installing anything globally:
|
|
15
24
|
|
|
16
25
|
```bash
|
|
17
26
|
npx @agent-native/core connect https://mail.agent-native.com
|
|
18
27
|
```
|
|
19
28
|
|
|
20
|
-
This opens your browser at the app. You are already logged in, so you just click **Authorize** once. The command detects every installed agent client and writes the MCP config for each
|
|
29
|
+
This opens your browser at the app. You are already logged in, so you just click **Authorize** once. The command detects every installed agent client and writes the right MCP config for each:
|
|
30
|
+
|
|
31
|
+
| Local client | Config written by `connect` |
|
|
32
|
+
| ----------------------------- | ----------------------------------------------------------- |
|
|
33
|
+
| Claude Code / Claude Code CLI | `.mcp.json` or `~/.claude.json`, depending on `--scope` |
|
|
34
|
+
| Codex | `~/.codex/config.toml` under `[mcp_servers.<app>]` |
|
|
35
|
+
| Claude Cowork | `~/.cowork/mcp.json` using the Claude Code MCP server shape |
|
|
36
|
+
|
|
37
|
+
There is no token to copy and no local server to run. Restart the agent client after connecting so it picks up the new MCP server.
|
|
38
|
+
|
|
39
|
+
Connect every first-party hosted app at once with:
|
|
21
40
|
|
|
22
41
|
```bash
|
|
23
42
|
npx @agent-native/core connect --all
|
|
@@ -44,6 +63,8 @@ If you'd rather not run a command, open the app in your browser and use its **Co
|
|
|
44
63
|
|
|
45
64
|
Restart the agent client after connecting so it picks up the new MCP server.
|
|
46
65
|
|
|
66
|
+
Use this manual block for MCP clients that are not yet written by `agent-native connect`, including Cursor.
|
|
67
|
+
|
|
47
68
|
## What you can do once connected {#what-you-can-do}
|
|
48
69
|
|
|
49
70
|
Once your agent is connected, the app's full action surface is available as MCP tools, plus the `ask-agent` meta-tool that runs the full agent loop (the same entry point [A2A](/docs/a2a-protocol) uses). Ask your agent to do real work and it hands back a link straight into the running app:
|
package/docs/content/frames.md
CHANGED
|
@@ -12,7 +12,7 @@ Agent-native apps run with an AI agent alongside the app UI. Locally, the agent
|
|
|
12
12
|
- Ships with `@agent-native/core` — no separate package needed
|
|
13
13
|
- Agent panel embedded directly in your app with chat and optional CLI terminal
|
|
14
14
|
- Supports multiple AI coding CLIs — switch between them from the settings panel
|
|
15
|
-
- Toggle between production mode (app tools only) and development mode (
|
|
15
|
+
- Toggle between production mode (app tools only) and development mode (shared `bash`/`read`/`edit`/`write` coding tools plus database access)
|
|
16
16
|
- Great for local development, self-hosted production, and OSS
|
|
17
17
|
|
|
18
18
|
## Supported CLIs {#supported-clis}
|
|
@@ -7,6 +7,8 @@ description: "Connect your agent-native app to local MCP servers (claude-in-chro
|
|
|
7
7
|
|
|
8
8
|
Agent-native apps can also act as MCP **clients** — connecting to locally installed MCP servers and exposing their tools to the agent chat. This is the symmetric counterpart to the [MCP Protocol](./mcp-protocol.md) (which makes your app an MCP server).
|
|
9
9
|
|
|
10
|
+
Looking for the other direction — connecting Claude Code, Codex, Cursor, or Claude Cowork to an agent-native app? Use [External Agents](/docs/external-agents).
|
|
11
|
+
|
|
10
12
|
With one config file, every agent-native app in your workspace gains access to tools provided by MCP servers on your machine: `claude-in-chrome` for browser automation, `@modelcontextprotocol/server-filesystem` for reading files, `@playwright/mcp` for browser testing, and anything else that speaks MCP.
|
|
11
13
|
|
|
12
14
|
You can also [connect remote (HTTP) MCP servers at runtime](#remote-via-ui) — individual users or whole organizations — without editing a config file.
|
|
@@ -7,6 +7,8 @@ description: "Expose your agent-native app as a remote MCP server so Claude Code
|
|
|
7
7
|
|
|
8
8
|
Every agent-native app automatically exposes a remote MCP (Model Context Protocol) server. This lets external AI tools like Claude Code, Cursor, and Windsurf discover and call your app's actions directly — no extra code needed.
|
|
9
9
|
|
|
10
|
+
If your goal is to connect Claude Code, Codex, Cursor, or Claude Cowork to a hosted agent-native app, start with [External Agents](/docs/external-agents). It documents the one-command `agent-native connect https://mail.agent-native.com` flow, token minting, local client config writes, manual MCP config for clients like Cursor, and deep links back into the UI. This page is the lower-level MCP server reference.
|
|
11
|
+
|
|
10
12
|
## Overview {#overview}
|
|
11
13
|
|
|
12
14
|
MCP is the standard protocol for connecting AI tools to external capabilities. When you deploy an agent-native app, it auto-mounts an MCP endpoint alongside the existing A2A endpoint. Any MCP-compatible client can connect and use your app's tools.
|
|
@@ -34,9 +36,9 @@ Both protocols are auto-mounted. Use whichever fits your use case:
|
|
|
34
36
|
|
|
35
37
|
You can also use the `ask-agent` MCP tool to get the best of both worlds — call it from Claude Code and let your app's agent reason through complex tasks.
|
|
36
38
|
|
|
37
|
-
##
|
|
39
|
+
## Manual MCP client config {#claude-code}
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
For the recommended one-command setup, use [External Agents](/docs/external-agents). If you are hand-writing MCP config, add your app as a remote MCP server in Claude Code's config:
|
|
40
42
|
|
|
41
43
|
```jsonc
|
|
42
44
|
// ~/.claude/mcp_servers.json
|
|
@@ -59,6 +59,11 @@ code> /migrate ./my-next-app --out ../migrated-app
|
|
|
59
59
|
code> /audit --url https://example.com
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
Agent-Native Code uses the same minimal coding tools as the sidebar development
|
|
63
|
+
agent: `bash` for discovery/search/tests/builds, `read` for line-numbered file
|
|
64
|
+
reads, `edit` for exact replacements, and `write` for new files or full
|
|
65
|
+
rewrites.
|
|
66
|
+
|
|
62
67
|
The same goals can run directly from the command line:
|
|
63
68
|
|
|
64
69
|
```bash
|