@agent-native/core 0.48.4 → 0.49.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.
- package/dist/agent/context-xray/actions/context-evict.d.ts +1 -1
- package/dist/agent/context-xray/actions/context-pin.d.ts +1 -1
- package/dist/agent/context-xray/actions/context-report.d.ts +4 -4
- package/dist/agent/context-xray/actions/context-restore.d.ts +1 -1
- package/dist/application-state/handlers.d.ts +2 -2
- package/dist/application-state/handlers.d.ts.map +1 -1
- package/dist/cli/app-skill.d.ts +157 -0
- package/dist/cli/app-skill.d.ts.map +1 -0
- package/dist/cli/app-skill.js +17 -7
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/audit-agent-web.d.ts +2 -0
- package/dist/cli/audit-agent-web.d.ts.map +1 -0
- package/dist/cli/code-agent-connector.d.ts +17 -0
- package/dist/cli/code-agent-connector.d.ts.map +1 -0
- package/dist/cli/code.d.ts +66 -0
- package/dist/cli/code.d.ts.map +1 -0
- package/dist/cli/connect.d.ts +168 -0
- package/dist/cli/connect.d.ts.map +1 -0
- package/dist/cli/connect.js +118 -30
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/context-xray-local.d.ts +16 -0
- package/dist/cli/context-xray-local.d.ts.map +1 -0
- package/dist/cli/create-workspace.d.ts +8 -0
- package/dist/cli/create-workspace.d.ts.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/info.d.ts +2 -0
- package/dist/cli/info.d.ts.map +1 -0
- package/dist/cli/mcp-config-writers.d.ts +108 -0
- package/dist/cli/mcp-config-writers.d.ts.map +1 -0
- package/dist/cli/mcp-config-writers.js +143 -0
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/cli/mcp.d.ts +16 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +10 -10
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/migrate.d.ts +38 -0
- package/dist/cli/migrate.d.ts.map +1 -0
- package/dist/cli/plan-local.d.ts +43 -0
- package/dist/cli/plan-local.d.ts.map +1 -0
- package/dist/cli/plan-publish-store.d.ts +62 -0
- package/dist/cli/plan-publish-store.d.ts.map +1 -0
- package/dist/cli/pr-visual-recap-workflow.d.ts +11 -0
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -0
- package/dist/cli/pr-visual-recap-workflow.js +1 -1
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts +453 -0
- package/dist/cli/recap.d.ts.map +1 -0
- package/dist/cli/recap.js +228 -95
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts +193 -0
- package/dist/cli/skills.d.ts.map +1 -0
- package/dist/cli/skills.js +369 -171
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/telemetry.d.ts +13 -0
- package/dist/cli/telemetry.d.ts.map +1 -0
- package/dist/cli/telemetry.js +115 -0
- package/dist/cli/telemetry.js.map +1 -0
- package/dist/cli/workspace-dev.d.ts +96 -0
- package/dist/cli/workspace-dev.d.ts.map +1 -0
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +15 -7
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DiffBlock.js +17 -10
- package/dist/client/blocks/library/DiffBlock.js.map +1 -1
- package/dist/client/blocks/library/annotation-rail.d.ts +5 -0
- package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
- package/dist/client/blocks/library/annotation-rail.js +6 -0
- package/dist/client/blocks/library/annotation-rail.js.map +1 -1
- package/dist/client/blocks/types.d.ts +5 -0
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/extensions/schema.d.ts +54 -54
- package/dist/extensions/slots/schema.d.ts +13 -13
- package/dist/file-upload/actions/upload-image.d.ts +4 -4
- package/dist/mcp/actions/create-org-service-token.d.ts +1 -1
- package/dist/mcp/actions/list-org-service-tokens.d.ts +7 -7
- package/dist/mcp/build-server.d.ts +12 -12
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/connect-route.js +1 -1
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/mcp/oauth-route.d.ts +10 -0
- package/dist/mcp/oauth-route.d.ts.map +1 -1
- package/dist/mcp/oauth-route.js +34 -3
- package/dist/mcp/oauth-route.js.map +1 -1
- package/dist/mcp/oauth-store.d.ts +15 -1
- package/dist/mcp/oauth-store.d.ts.map +1 -1
- package/dist/mcp/oauth-store.js +60 -4
- package/dist/mcp/oauth-store.js.map +1 -1
- package/dist/mcp/oauth-token.d.ts +3 -1
- package/dist/mcp/oauth-token.d.ts.map +1 -1
- package/dist/mcp/oauth-token.js +78 -6
- package/dist/mcp/oauth-token.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +8 -6
- package/dist/mcp/server.js.map +1 -1
- package/dist/observability/routes.d.ts +11 -11
- package/dist/org/handlers.d.ts +7 -11
- package/dist/org/handlers.d.ts.map +1 -1
- package/dist/secrets/schema.d.ts +7 -7
- package/dist/server/csrf.d.ts +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/poll-events.d.ts +1 -1
- package/dist/server/security-headers.d.ts +1 -1
- package/dist/server/security-headers.d.ts.map +1 -1
- package/dist/sharing/actions/list-resource-shares.d.ts +3 -3
- package/dist/sharing/actions/set-resource-visibility.d.ts +2 -2
- package/dist/sharing/actions/share-resource.d.ts +4 -4
- package/dist/sharing/actions/unshare-resource.d.ts +1 -1
- package/dist/sharing/schema.d.ts +12 -12
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +2 -2
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +6 -6
- package/dist/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +2 -2
- package/dist/workspace-files/schema.d.ts +8 -8
- package/docs/content/external-agents.md +14 -0
- package/docs/content/plan-plugin.md +16 -7
- package/package.json +5 -1
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +2 -2
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +6 -6
- package/src/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +2 -2
package/dist/sharing/schema.d.ts
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
* - `visibility`— coarse default: `'private' | 'org' | 'public'`. Default `'private'`.
|
|
32
32
|
*/
|
|
33
33
|
export declare function ownableColumns(): {
|
|
34
|
-
ownerEmail: import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTextBuilderInitial<"owner_email", [string, ...string[]], number
|
|
35
|
-
orgId: import("drizzle-orm/sqlite-core").SQLiteTextBuilderInitial<"org_id", [string, ...string[]], number
|
|
36
|
-
visibility: import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTextBuilderInitial<"visibility", ["private", "org", "public"], number
|
|
34
|
+
ownerEmail: import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTextBuilderInitial<"owner_email", [string, ...string[]], number>>>;
|
|
35
|
+
orgId: import("drizzle-orm/sqlite-core").SQLiteTextBuilderInitial<"org_id", [string, ...string[]], number>;
|
|
36
|
+
visibility: import("drizzle-orm").HasDefault<import("drizzle-orm").NotNull<import("drizzle-orm/sqlite-core").SQLiteTextBuilderInitial<"visibility", ["private", "org", "public"], number>>>;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* Create a companion shares table for an ownable resource. Call this right
|
|
@@ -74,7 +74,7 @@ export declare function createSharesTable(tableName: string): import("drizzle-or
|
|
|
74
74
|
identity: undefined;
|
|
75
75
|
generated: undefined;
|
|
76
76
|
}, {}, {
|
|
77
|
-
length: number
|
|
77
|
+
length: number;
|
|
78
78
|
}>;
|
|
79
79
|
resourceId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
80
80
|
name: "resource_id";
|
|
@@ -93,14 +93,14 @@ export declare function createSharesTable(tableName: string): import("drizzle-or
|
|
|
93
93
|
identity: undefined;
|
|
94
94
|
generated: undefined;
|
|
95
95
|
}, {}, {
|
|
96
|
-
length: number
|
|
96
|
+
length: number;
|
|
97
97
|
}>;
|
|
98
98
|
principalType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
99
99
|
name: "principal_type";
|
|
100
100
|
tableName: string;
|
|
101
101
|
dataType: "string";
|
|
102
102
|
columnType: "SQLiteText";
|
|
103
|
-
data: "
|
|
103
|
+
data: "org" | "user";
|
|
104
104
|
driverParam: string;
|
|
105
105
|
notNull: true;
|
|
106
106
|
hasDefault: false;
|
|
@@ -112,7 +112,7 @@ export declare function createSharesTable(tableName: string): import("drizzle-or
|
|
|
112
112
|
identity: undefined;
|
|
113
113
|
generated: undefined;
|
|
114
114
|
}, {}, {
|
|
115
|
-
length: number
|
|
115
|
+
length: number;
|
|
116
116
|
}>;
|
|
117
117
|
principalId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
118
118
|
name: "principal_id";
|
|
@@ -131,14 +131,14 @@ export declare function createSharesTable(tableName: string): import("drizzle-or
|
|
|
131
131
|
identity: undefined;
|
|
132
132
|
generated: undefined;
|
|
133
133
|
}, {}, {
|
|
134
|
-
length: number
|
|
134
|
+
length: number;
|
|
135
135
|
}>;
|
|
136
136
|
role: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
137
137
|
name: "role";
|
|
138
138
|
tableName: string;
|
|
139
139
|
dataType: "string";
|
|
140
140
|
columnType: "SQLiteText";
|
|
141
|
-
data: "
|
|
141
|
+
data: "admin" | "viewer" | "editor";
|
|
142
142
|
driverParam: string;
|
|
143
143
|
notNull: true;
|
|
144
144
|
hasDefault: true;
|
|
@@ -150,7 +150,7 @@ export declare function createSharesTable(tableName: string): import("drizzle-or
|
|
|
150
150
|
identity: undefined;
|
|
151
151
|
generated: undefined;
|
|
152
152
|
}, {}, {
|
|
153
|
-
length: number
|
|
153
|
+
length: number;
|
|
154
154
|
}>;
|
|
155
155
|
createdBy: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
156
156
|
name: "created_by";
|
|
@@ -169,7 +169,7 @@ export declare function createSharesTable(tableName: string): import("drizzle-or
|
|
|
169
169
|
identity: undefined;
|
|
170
170
|
generated: undefined;
|
|
171
171
|
}, {}, {
|
|
172
|
-
length: number
|
|
172
|
+
length: number;
|
|
173
173
|
}>;
|
|
174
174
|
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
175
175
|
name: "created_at";
|
|
@@ -188,7 +188,7 @@ export declare function createSharesTable(tableName: string): import("drizzle-or
|
|
|
188
188
|
identity: undefined;
|
|
189
189
|
generated: undefined;
|
|
190
190
|
}, {}, {
|
|
191
|
-
length: number
|
|
191
|
+
length: number;
|
|
192
192
|
}>;
|
|
193
193
|
};
|
|
194
194
|
dialect: "sqlite";
|
|
@@ -43,10 +43,10 @@ client, and complete authorization-code + PKCE at
|
|
|
43
43
|
`/_agent-native/mcp/oauth/authorize` / `/_agent-native/mcp/oauth/token`.
|
|
44
44
|
Access tokens are audience-bound to the exact MCP URL and carry user/org
|
|
45
45
|
identity plus `mcp:read`, `mcp:write`, and/or `mcp:apps`; refresh tokens are
|
|
46
|
-
stored hashed and rotate. Keep `ACCESS_TOKEN` and `agent-native connect` for
|
|
46
|
+
stored hashed and rotate. Keep `ACCESS_TOKEN` and `pnpm exec agent-native connect` for
|
|
47
47
|
local stdio proxying and fallback clients. The CLI
|
|
48
48
|
uses the OAuth-native URL-only entry for Claude Code/Claude Code CLI by
|
|
49
|
-
default; use the Connect page or `agent-native connect --token <token>` when a
|
|
49
|
+
default; use the Connect page or `npx @agent-native/core@latest connect --token <token>` when a
|
|
50
50
|
client needs explicit bearer headers.
|
|
51
51
|
|
|
52
52
|
## Local → Real Account Migration
|
|
@@ -106,7 +106,7 @@ no-CLI equivalent is `https://<app>/_agent-native/mcp/connect`, which shows
|
|
|
106
106
|
the copyable MCP URL, Claude / ChatGPT / Cursor / Claude Code / Codex / Other
|
|
107
107
|
steps, and static-token fallback for clients that need it.
|
|
108
108
|
|
|
109
|
-
Re-running `agent-native connect <url> --client claude-code` over an older
|
|
109
|
+
Re-running `npx @agent-native/core@latest connect <url> --client claude-code` over an older
|
|
110
110
|
Claude bearer-token entry is the migration path: the CLI replaces
|
|
111
111
|
`Authorization` headers with URL-only OAuth config and tells the user to
|
|
112
112
|
authenticate from `/mcp`.
|
|
@@ -325,10 +325,10 @@ agent sees what the user actually has on screen.
|
|
|
325
325
|
### 5. Advanced: local development & manual setup
|
|
326
326
|
|
|
327
327
|
The hosted `connect` flow above is the recommended path. For local dev, run
|
|
328
|
-
the app (`pnpm dev` / `agent-native dev`) then point a local agent at it:
|
|
328
|
+
the app (`pnpm dev` / `pnpm exec agent-native dev`) then point a local agent at it:
|
|
329
329
|
|
|
330
330
|
```bash
|
|
331
|
-
agent-native mcp install --client claude-code|claude-code-cli|codex|cowork \
|
|
331
|
+
pnpm exec agent-native mcp install --client claude-code|claude-code-cli|codex|cowork \
|
|
332
332
|
[--app <id>] [--scope user|project]
|
|
333
333
|
```
|
|
334
334
|
|
|
@@ -336,7 +336,7 @@ It provisions a token (random `ACCESS_TOKEN` into the workspace `.env` for
|
|
|
336
336
|
local dev, or a `signA2AToken` JWT for a detected hosted origin) and writes an
|
|
337
337
|
idempotent stdio server entry — `.mcp.json` / `~/.claude.json` for Claude Code,
|
|
338
338
|
the `[mcp_servers.*]` block in `~/.codex/config.toml` for Codex, the
|
|
339
|
-
Claude-Code JSON shape for Cowork. The entry runs `agent-native mcp serve
|
|
339
|
+
Claude-Code JSON shape for Cowork. The entry runs `pnpm exec agent-native mcp serve
|
|
340
340
|
--app <id>`, by default a **thin stdio proxy** to the running local app's
|
|
341
341
|
`/_agent-native/mcp` (live registry + HMR + correct deep links stay the single
|
|
342
342
|
source of truth; `--standalone` builds the registry in-process). Companion
|
|
@@ -351,7 +351,7 @@ deliberately exposes only the generic builtins plus actions with
|
|
|
351
351
|
and mutating actions are filtered out (`filterPublicAgentActions`). The full
|
|
352
352
|
surface appears when authenticated as a real caller: a deployed /
|
|
353
353
|
`AGENT_MODE=production` app, or a local app reached through `connect` /
|
|
354
|
-
`agent-native mcp install` (which provisions an identity-bearing token). A
|
|
354
|
+
`pnpm exec agent-native mcp install` (which provisions an identity-bearing token). A
|
|
355
355
|
sparse or empty `tools/list` is diagnostic, not proof of auth failure: check
|
|
356
356
|
OAuth scopes, compact-catalog filtering, and the client/server auth status
|
|
357
357
|
before telling the user they are unauthenticated.
|
|
@@ -395,7 +395,7 @@ before telling the user they are unauthenticated.
|
|
|
395
395
|
- Don't hand-write product UI in `mcpApp.resource.html`; use a real React
|
|
396
396
|
route/component and embed it with `embedApp()`.
|
|
397
397
|
- Don't test Claude full-app embeds against raw Vite dev modules and conclude
|
|
398
|
-
production is broken; use `agent-native start`, a preview deploy, or prod.
|
|
398
|
+
production is broken; use `pnpm exec agent-native start`, a preview deploy, or prod.
|
|
399
399
|
- Don't scope the `navigate` write to the agent token, or pass privileged
|
|
400
400
|
state through the deep link — it's a pure pointer.
|
|
401
401
|
- Don't invent a new navigation mechanism; bridge to the existing
|
|
@@ -136,8 +136,8 @@ Claude/ChatGPT conversation. Hidden context stays in model context; do not put
|
|
|
136
136
|
internal app-state file instructions into the visible prompt. `submit: false`
|
|
137
137
|
stays local as a prefill/review path.
|
|
138
138
|
|
|
139
|
-
When testing Claude through ngrok, use a production build (`agent-native build`
|
|
140
|
-
then `agent-native start`) or a deployed preview/production URL. Claude's
|
|
139
|
+
When testing Claude through ngrok, use a production build (`pnpm exec agent-native build`
|
|
140
|
+
then `pnpm exec agent-native start`) or a deployed preview/production URL. Claude's
|
|
141
141
|
transplant path works with production asset chunks; raw Vite dev modules such
|
|
142
142
|
as `/app/root.tsx` can be app-auth protected and fail dynamic imports from the
|
|
143
143
|
Claude resource origin.
|
|
@@ -31,7 +31,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
31
31
|
identity: undefined;
|
|
32
32
|
generated: undefined;
|
|
33
33
|
}, {}, {
|
|
34
|
-
length: number
|
|
34
|
+
length: number;
|
|
35
35
|
}>;
|
|
36
36
|
scope: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
37
37
|
name: "scope";
|
|
@@ -50,7 +50,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
50
50
|
identity: undefined;
|
|
51
51
|
generated: undefined;
|
|
52
52
|
}, {}, {
|
|
53
|
-
length: number
|
|
53
|
+
length: number;
|
|
54
54
|
}>;
|
|
55
55
|
scopeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
56
56
|
name: "scope_id";
|
|
@@ -69,7 +69,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
69
69
|
identity: undefined;
|
|
70
70
|
generated: undefined;
|
|
71
71
|
}, {}, {
|
|
72
|
-
length: number
|
|
72
|
+
length: number;
|
|
73
73
|
}>;
|
|
74
74
|
path: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
75
75
|
name: "path";
|
|
@@ -88,7 +88,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
88
88
|
identity: undefined;
|
|
89
89
|
generated: undefined;
|
|
90
90
|
}, {}, {
|
|
91
|
-
length: number
|
|
91
|
+
length: number;
|
|
92
92
|
}>;
|
|
93
93
|
content: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
94
94
|
name: "content";
|
|
@@ -107,7 +107,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
107
107
|
identity: undefined;
|
|
108
108
|
generated: undefined;
|
|
109
109
|
}, {}, {
|
|
110
|
-
length: number
|
|
110
|
+
length: number;
|
|
111
111
|
}>;
|
|
112
112
|
contentType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
113
113
|
name: "content_type";
|
|
@@ -126,7 +126,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
126
126
|
identity: undefined;
|
|
127
127
|
generated: undefined;
|
|
128
128
|
}, {}, {
|
|
129
|
-
length: number
|
|
129
|
+
length: number;
|
|
130
130
|
}>;
|
|
131
131
|
sizeBytes: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
132
132
|
name: "size_bytes";
|
|
@@ -162,7 +162,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
162
162
|
identity: undefined;
|
|
163
163
|
generated: undefined;
|
|
164
164
|
}, {}, {
|
|
165
|
-
length: number
|
|
165
|
+
length: number;
|
|
166
166
|
}>;
|
|
167
167
|
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
168
168
|
name: "updated_at";
|
|
@@ -181,7 +181,7 @@ export declare const workspaceFiles: import("drizzle-orm/sqlite-core").SQLiteTab
|
|
|
181
181
|
identity: undefined;
|
|
182
182
|
generated: undefined;
|
|
183
183
|
}, {}, {
|
|
184
|
-
length: number
|
|
184
|
+
length: number;
|
|
185
185
|
}>;
|
|
186
186
|
};
|
|
187
187
|
dialect: "sqlite";
|
|
@@ -150,6 +150,20 @@ workspace setups should prefer the single Dispatch connector.
|
|
|
150
150
|
|
|
151
151
|
The connection is **per-user, scoped, and revocable**. In the OAuth path, the host stores the tokens after `/mcp` authentication; in the fallback path, the browser session you authorized with is the identity the agent acts as. Nothing exposes the deployment's shared secret.
|
|
152
152
|
|
|
153
|
+
### Re-authenticating after a 401 {#reconnect}
|
|
154
|
+
|
|
155
|
+
Once connected, auth should persist long-term — access tokens last 30 days by default (override with `MCP_OAUTH_ACCESS_TOKEN_TTL` on the server, e.g. `7d` or `12h`) with a sliding 365-day refresh window, so random 401s should be rare. When one does happen, use the lightweight reconnect command rather than reinstalling:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npx @agent-native/core@latest reconnect https://plan.agent-native.com
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
`reconnect` finds any MCP config entry whose URL ends in `/_agent-native/mcp` for the given host (matching by URL regardless of connector name), then refreshes or replaces the auth material without touching your installed skills or re-running the full install flow. Pass the base app URL (e.g. `https://plan.agent-native.com`) — the `/_agent-native/mcp` suffix is inferred.
|
|
162
|
+
|
|
163
|
+
In Claude Code, the equivalent UI path is: run `/mcp` and choose **Authenticate** (or **Reconnect**) for the relevant connector.
|
|
164
|
+
|
|
165
|
+
Never reinstall the skill from scratch just to fix a 401 — `reconnect` is the right tool.
|
|
166
|
+
|
|
153
167
|
### Connect page fallback {#connect-page-fallback}
|
|
154
168
|
|
|
155
169
|
For MCP clients that cannot add a remote OAuth URL directly, open the app in your browser and use its **Connect** affordance (served at `https://<app>/_agent-native/mcp/connect`). While logged in, click **Connect / Authorize**. The page hands you either a one-click deep link that configures a detected agent, or a ready-to-paste `.mcp.json` block:
|
|
@@ -12,13 +12,22 @@ The Agent-Native **Plan** app ships as one installable bundle. A single install
|
|
|
12
12
|
One install gives you:
|
|
13
13
|
|
|
14
14
|
- **Two skills** — `/visual-plan` (the canonical entry point) and `/visual-recap`.
|
|
15
|
-
- **The Plan MCP connector** — registered against the hosted app at `https://plan.agent-native.com` (MCP endpoint `https://plan.agent-native.com/_agent-native/mcp`, server name `plan
|
|
15
|
+
- **The Plan MCP connector** — registered against the hosted app at `https://plan.agent-native.com` (MCP endpoint `https://plan.agent-native.com/_agent-native/mcp`, server name `plan`).
|
|
16
16
|
|
|
17
17
|
By default, both skills publish to the hosted Plan app — they create a plan via
|
|
18
18
|
the MCP connector and hand you a link or inline plan to review. They never dump
|
|
19
19
|
an inline Markdown/ASCII plan into chat as the deliverable. If a Plan tool
|
|
20
|
-
returns `needs auth`, `Unauthorized`, or `Session terminated`, authenticate
|
|
21
|
-
connector
|
|
20
|
+
returns `needs auth`, `Unauthorized`, or `Session terminated`, re-authenticate
|
|
21
|
+
the connector instead of falling back to inline output. Access tokens are
|
|
22
|
+
long-lived (30-day default, sliding 365-day refresh), so this should be rare;
|
|
23
|
+
when it happens, the lightweight fix is:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @agent-native/core@latest reconnect https://plan.agent-native.com
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`reconnect` finds and refreshes the connector by URL — no reinstall needed. In
|
|
30
|
+
Claude Code, the equivalent is `/mcp` → **Authenticate / Reconnect**.
|
|
22
31
|
|
|
23
32
|
The exception is explicit **local-files privacy mode**. When you ask for no DB
|
|
24
33
|
writes or set `AGENT_NATIVE_PLANS_MODE=local-files`, the skills must not call
|
|
@@ -47,7 +56,7 @@ Works for any host — Claude Code, Codex, Cursor, Cline, Goose, ChatGPT custom
|
|
|
47
56
|
npx @agent-native/core@latest skills add visual-plan
|
|
48
57
|
```
|
|
49
58
|
|
|
50
|
-
This installs `visual-plan` plus the companion `visual-recap` skill, then registers the `plan` connector
|
|
59
|
+
This installs `visual-plan` plus the companion `visual-recap` skill, then registers the `plan` connector, then runs auth (OAuth prompt for hosted/account-backed sharing). Useful flags:
|
|
51
60
|
|
|
52
61
|
- `--client codex|claude-code|claude-code-cli|cowork|all` — which local agents to write the MCP config for (default `codex`).
|
|
53
62
|
- `--no-connect` — register the connector without authenticating; run `npx @agent-native/core@latest connect https://plan.agent-native.com` later.
|
|
@@ -94,11 +103,11 @@ The same repo is a Codex plugin marketplace. Add it, install the plugin, then au
|
|
|
94
103
|
codex plugin marketplace add BuilderIO/agent-native
|
|
95
104
|
codex plugin add agent-native-visual-plans@agent-native-apps
|
|
96
105
|
codex mcp login plan # OAuth in the browser
|
|
97
|
-
# Existing installs may already be authenticated as:
|
|
98
|
-
codex mcp login agent-native-plans
|
|
99
106
|
```
|
|
100
107
|
|
|
101
|
-
After install, **start a new Codex thread** so the skills and MCP tools load into the session. The plugin ships URL-only
|
|
108
|
+
After install, **start a new Codex thread** so the skills and MCP tools load into the session. The plugin ships a URL-only connector (`[mcp_servers.plan]` → `https://plan.agent-native.com/_agent-native/mcp`); `codex mcp login plan` runs the OAuth flow. The universal CLI route above also works for Codex (`npx @agent-native/core@latest skills add visual-plan --client codex`) if you prefer one command that installs and authenticates together.
|
|
109
|
+
|
|
110
|
+
> **Older installs:** if your config still has an `agent-native-plans` entry pointing at the same URL, running `npx @agent-native/core@latest reconnect https://plan.agent-native.com` (or `skills add visual-plan` for a full reinstall) consolidates it to the canonical `plan` name.
|
|
102
111
|
|
|
103
112
|
## Updates {#updates}
|
|
104
113
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -95,6 +95,10 @@
|
|
|
95
95
|
"./client/transcription/BuilderTranscriptionCta": "./dist/client/transcription/BuilderTranscriptionCta.js",
|
|
96
96
|
"./transcription/builder": "./dist/transcription/builder-transcription.js",
|
|
97
97
|
"./adapters/cli": "./dist/adapters/cli/index.js",
|
|
98
|
+
"./cli/skills": {
|
|
99
|
+
"types": "./dist/cli/skills.d.ts",
|
|
100
|
+
"default": "./dist/cli/skills.js"
|
|
101
|
+
},
|
|
98
102
|
"./router": "./dist/router/index.js",
|
|
99
103
|
"./collab": "./dist/collab/index.js",
|
|
100
104
|
"./a2a": "./dist/a2a/index.js",
|
|
@@ -43,10 +43,10 @@ client, and complete authorization-code + PKCE at
|
|
|
43
43
|
`/_agent-native/mcp/oauth/authorize` / `/_agent-native/mcp/oauth/token`.
|
|
44
44
|
Access tokens are audience-bound to the exact MCP URL and carry user/org
|
|
45
45
|
identity plus `mcp:read`, `mcp:write`, and/or `mcp:apps`; refresh tokens are
|
|
46
|
-
stored hashed and rotate. Keep `ACCESS_TOKEN` and `agent-native connect` for
|
|
46
|
+
stored hashed and rotate. Keep `ACCESS_TOKEN` and `pnpm exec agent-native connect` for
|
|
47
47
|
local stdio proxying and fallback clients. The CLI
|
|
48
48
|
uses the OAuth-native URL-only entry for Claude Code/Claude Code CLI by
|
|
49
|
-
default; use the Connect page or `agent-native connect --token <token>` when a
|
|
49
|
+
default; use the Connect page or `npx @agent-native/core@latest connect --token <token>` when a
|
|
50
50
|
client needs explicit bearer headers.
|
|
51
51
|
|
|
52
52
|
## Local → Real Account Migration
|
|
@@ -106,7 +106,7 @@ no-CLI equivalent is `https://<app>/_agent-native/mcp/connect`, which shows
|
|
|
106
106
|
the copyable MCP URL, Claude / ChatGPT / Cursor / Claude Code / Codex / Other
|
|
107
107
|
steps, and static-token fallback for clients that need it.
|
|
108
108
|
|
|
109
|
-
Re-running `agent-native connect <url> --client claude-code` over an older
|
|
109
|
+
Re-running `npx @agent-native/core@latest connect <url> --client claude-code` over an older
|
|
110
110
|
Claude bearer-token entry is the migration path: the CLI replaces
|
|
111
111
|
`Authorization` headers with URL-only OAuth config and tells the user to
|
|
112
112
|
authenticate from `/mcp`.
|
|
@@ -325,10 +325,10 @@ agent sees what the user actually has on screen.
|
|
|
325
325
|
### 5. Advanced: local development & manual setup
|
|
326
326
|
|
|
327
327
|
The hosted `connect` flow above is the recommended path. For local dev, run
|
|
328
|
-
the app (`pnpm dev` / `agent-native dev`) then point a local agent at it:
|
|
328
|
+
the app (`pnpm dev` / `pnpm exec agent-native dev`) then point a local agent at it:
|
|
329
329
|
|
|
330
330
|
```bash
|
|
331
|
-
agent-native mcp install --client claude-code|claude-code-cli|codex|cowork \
|
|
331
|
+
pnpm exec agent-native mcp install --client claude-code|claude-code-cli|codex|cowork \
|
|
332
332
|
[--app <id>] [--scope user|project]
|
|
333
333
|
```
|
|
334
334
|
|
|
@@ -336,7 +336,7 @@ It provisions a token (random `ACCESS_TOKEN` into the workspace `.env` for
|
|
|
336
336
|
local dev, or a `signA2AToken` JWT for a detected hosted origin) and writes an
|
|
337
337
|
idempotent stdio server entry — `.mcp.json` / `~/.claude.json` for Claude Code,
|
|
338
338
|
the `[mcp_servers.*]` block in `~/.codex/config.toml` for Codex, the
|
|
339
|
-
Claude-Code JSON shape for Cowork. The entry runs `agent-native mcp serve
|
|
339
|
+
Claude-Code JSON shape for Cowork. The entry runs `pnpm exec agent-native mcp serve
|
|
340
340
|
--app <id>`, by default a **thin stdio proxy** to the running local app's
|
|
341
341
|
`/_agent-native/mcp` (live registry + HMR + correct deep links stay the single
|
|
342
342
|
source of truth; `--standalone` builds the registry in-process). Companion
|
|
@@ -351,7 +351,7 @@ deliberately exposes only the generic builtins plus actions with
|
|
|
351
351
|
and mutating actions are filtered out (`filterPublicAgentActions`). The full
|
|
352
352
|
surface appears when authenticated as a real caller: a deployed /
|
|
353
353
|
`AGENT_MODE=production` app, or a local app reached through `connect` /
|
|
354
|
-
`agent-native mcp install` (which provisions an identity-bearing token). A
|
|
354
|
+
`pnpm exec agent-native mcp install` (which provisions an identity-bearing token). A
|
|
355
355
|
sparse or empty `tools/list` is diagnostic, not proof of auth failure: check
|
|
356
356
|
OAuth scopes, compact-catalog filtering, and the client/server auth status
|
|
357
357
|
before telling the user they are unauthenticated.
|
|
@@ -395,7 +395,7 @@ before telling the user they are unauthenticated.
|
|
|
395
395
|
- Don't hand-write product UI in `mcpApp.resource.html`; use a real React
|
|
396
396
|
route/component and embed it with `embedApp()`.
|
|
397
397
|
- Don't test Claude full-app embeds against raw Vite dev modules and conclude
|
|
398
|
-
production is broken; use `agent-native start`, a preview deploy, or prod.
|
|
398
|
+
production is broken; use `pnpm exec agent-native start`, a preview deploy, or prod.
|
|
399
399
|
- Don't scope the `navigate` write to the agent token, or pass privileged
|
|
400
400
|
state through the deep link — it's a pure pointer.
|
|
401
401
|
- Don't invent a new navigation mechanism; bridge to the existing
|
package/src/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md
CHANGED
|
@@ -136,8 +136,8 @@ Claude/ChatGPT conversation. Hidden context stays in model context; do not put
|
|
|
136
136
|
internal app-state file instructions into the visible prompt. `submit: false`
|
|
137
137
|
stays local as a prefill/review path.
|
|
138
138
|
|
|
139
|
-
When testing Claude through ngrok, use a production build (`agent-native build`
|
|
140
|
-
then `agent-native start`) or a deployed preview/production URL. Claude's
|
|
139
|
+
When testing Claude through ngrok, use a production build (`pnpm exec agent-native build`
|
|
140
|
+
then `pnpm exec agent-native start`) or a deployed preview/production URL. Claude's
|
|
141
141
|
transplant path works with production asset chunks; raw Vite dev modules such
|
|
142
142
|
as `/app/root.tsx` can be app-auth protected and fail dynamic imports from the
|
|
143
143
|
Claude resource origin.
|