@agent-native/core 0.219.0 → 0.220.0-nightly-20261023212848
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/action.d.ts +23 -3
- package/dist/action.js +58 -3
- package/dist/agent/abort-reasons.d.ts +6 -0
- package/dist/agent/abort-reasons.js +6 -0
- package/dist/agent/execution-fence.js +5 -1
- package/dist/agent/production-agent.d.ts +22 -6
- package/dist/agent/production-agent.js +136 -37
- package/dist/agent/run-manager.js +92 -44
- package/dist/agent/run-store.d.ts +1 -0
- package/dist/agent/run-store.js +260 -31
- package/dist/agent/run-terminal-tracking.d.ts +29 -0
- package/dist/agent/run-terminal-tracking.js +56 -0
- package/dist/agent/run-turn-id-header.d.ts +9 -0
- package/dist/agent/run-turn-id-header.js +13 -0
- package/dist/agent/types.d.ts +11 -0
- package/dist/chat-threads/store.d.ts +23 -6
- package/dist/chat-threads/store.js +119 -36
- package/dist/cli/amplify-stream.js +1 -1
- package/dist/client/agent-chat/index.d.ts +2 -1
- package/dist/client/agent-chat/index.js +2 -1
- package/dist/client/agent-chat.d.ts +2 -0
- package/dist/client/agent-chat.js +31 -5
- package/dist/client/chat/agentkit-agent-native.js +8 -1
- package/dist/client/chat/agentkit-protocol.js +7 -1
- package/dist/client/chat/run-outcome-telemetry.js +1 -0
- package/dist/client/chat/run-outcome.d.ts +5 -0
- package/dist/client/chat/runtime.d.ts +34 -1
- package/dist/client/chat/runtime.js +96 -12
- package/dist/client/chat/turn-submitted-telemetry.d.ts +4 -0
- package/dist/client/chat/turn-submitted-telemetry.js +39 -0
- package/dist/client/chat/turn-submitted.d.ts +39 -0
- package/dist/client/chat/turn-submitted.js +16 -0
- package/dist/client/route-chunk-recovery.d.ts +3 -8
- package/dist/client/route-chunk-recovery.js +11 -9
- package/dist/client/use-chat-thread-list.d.ts +2 -0
- package/dist/client/use-chat-thread-list.js +48 -2
- package/dist/client/use-chat-threads.d.ts +13 -0
- package/dist/client/use-chat-threads.js +59 -4
- package/dist/collab/routes.d.ts +2 -2
- package/dist/db/client.d.ts +1 -0
- package/dist/db/client.js +28 -18
- package/dist/db/schema-snapshot.generated.js +5 -0
- package/dist/identity/rekey.d.ts +2 -0
- package/dist/identity/rekey.js +19 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/agent-connected.d.ts +5 -0
- package/dist/mcp/agent-connected.js +10 -3
- package/dist/mcp/analytics.d.ts +14 -1
- package/dist/mcp/analytics.js +54 -2
- package/dist/mcp/embed-app.js +2 -1
- package/dist/mcp/oauth-route.js +56 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +7 -7
- package/dist/observability/traces.d.ts +2 -0
- package/dist/observability/traces.js +11 -2
- package/dist/provider-api/actions/custom-provider-registration.d.ts +16 -16
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/review/index.d.ts +1 -1
- package/dist/review/index.js +1 -1
- package/dist/review/suggestions/actions.js +25 -17
- package/dist/review/suggestions/store.d.ts +14 -1
- package/dist/review/suggestions/store.js +16 -3
- package/dist/review/suggestions/types.d.ts +15 -1
- package/dist/scripts/chat/search-chats.js +14 -2
- package/dist/server/agent-chat/browser-team-tools.js +39 -6
- package/dist/server/agent-chat/script-entries.js +44 -9
- package/dist/server/agent-chat-plugin.d.ts +2 -0
- package/dist/server/agent-chat-plugin.js +66 -16
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-default-model-route.d.ts +1 -1
- package/dist/server/first-touch-route.d.ts +2 -2
- package/dist/shared/route-chunk-recovery-bootstrap.d.ts +9 -0
- package/dist/shared/route-chunk-recovery-bootstrap.js +25 -0
- package/dist/sharing/actions/list-resource-shares.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/factory/.agents/skills/review-prs/SKILL.md +27 -3
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +12 -5
- package/dist/tracking/providers.js +3 -0
- package/dist/triggers/actions/manage-automation.d.ts +2 -2
- package/docs/content/external-agents.mdx +1 -1
- package/docs/content/mcp-apps.mdx +3 -3
- package/docs/content/mcp-protocol.mdx +1 -1
- package/docs/content/sharing.mdx +1 -0
- package/docs/content/template-assets-integrations.mdx +5 -3
- package/package.json +3 -3
- package/src/templates/chat/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/factory/.agents/skills/review-prs/SKILL.md +27 -3
- package/src/templates/headless/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +12 -5
|
@@ -9,6 +9,8 @@ const AGENT_NATIVE_ANALYTICS_DEFAULT_ENDPOINT = "https://analytics.agent-native.
|
|
|
9
9
|
export const AGENT_NATIVE_ANALYTICS_PROVIDER = "agent-native-analytics";
|
|
10
10
|
const BATCH_INTERVAL_MS = 10_000;
|
|
11
11
|
const MAX_BATCH_SIZE = 50;
|
|
12
|
+
// The PostHog, Segment and Amplitude Node SDKs' default request timeout.
|
|
13
|
+
const SEND_TIMEOUT_MS = 10_000;
|
|
12
14
|
const QUEUE_KEY = Symbol.for("@agent-native/core/tracking.queue");
|
|
13
15
|
const TIMER_KEY = Symbol.for("@agent-native/core/tracking.timer");
|
|
14
16
|
function getQueue() {
|
|
@@ -52,6 +54,7 @@ function drainQueue() {
|
|
|
52
54
|
method: "POST",
|
|
53
55
|
headers: { "Content-Type": "application/json", ...item.headers },
|
|
54
56
|
body: item.body,
|
|
57
|
+
signal: AbortSignal.timeout(SEND_TIMEOUT_MS),
|
|
55
58
|
}).then(() => undefined, () => undefined)));
|
|
56
59
|
}
|
|
57
60
|
function isLocalhostUrl(value) {
|
|
@@ -67,6 +67,7 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
67
67
|
triggerType: "event" | "manual" | "schedule" | "webhook";
|
|
68
68
|
body: string;
|
|
69
69
|
}, {
|
|
70
|
+
updated?: undefined;
|
|
70
71
|
created: boolean;
|
|
71
72
|
resourceId: string;
|
|
72
73
|
name: string;
|
|
@@ -88,16 +89,15 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
88
89
|
mcpTools: string[];
|
|
89
90
|
webhookPath: string;
|
|
90
91
|
deleted?: undefined;
|
|
91
|
-
updated?: undefined;
|
|
92
92
|
changed?: undefined;
|
|
93
93
|
previouslyEnabled?: undefined;
|
|
94
94
|
requestedEnabled?: undefined;
|
|
95
95
|
} | {
|
|
96
|
+
updated?: undefined;
|
|
96
97
|
created?: undefined;
|
|
97
98
|
deleted: boolean;
|
|
98
99
|
resourceId: string;
|
|
99
100
|
name: string;
|
|
100
|
-
updated?: undefined;
|
|
101
101
|
scope?: undefined;
|
|
102
102
|
triggerType?: undefined;
|
|
103
103
|
event?: undefined;
|
|
@@ -309,7 +309,7 @@ need a connector such as `npx @agent-native/core@latest connect https://assets.a
|
|
|
309
309
|
| `visual-plans` | `agent-native-plans` | visual plans, recaps, and repo-native docs |
|
|
310
310
|
| `context-xray` | `xray` | local Codex/Claude Code context usage |
|
|
311
311
|
|
|
312
|
-
The default client selection is all supported local clients; add `--client codex`, `--client claude-code`, or another specific target to narrow setup. Inline hosts (ChatGPT, Claude
|
|
312
|
+
The default client selection is all supported local clients; add `--client codex`, `--client claude-code`, or another specific target to narrow setup. Inline hosts (ChatGPT, Claude chat on web, desktop, and mobile, plus the Claude Desktop Code tab) render the picker / variant grid in chat; CLI/link-only hosts (Codex CLI, Claude Code terminal, Cowork, Code on claude.ai web) return an "Open in … →" link where the user picks in the browser and pastes a handoff summary back. [Cowork doesn't declare MCP Apps yet](https://github.com/anthropics/claude-code/issues/103924), and using it on the same connector can make inline apps disappear in Chat until you reconnect the connector.
|
|
313
313
|
|
|
314
314
|
When you truly need an isolated app instead of Dispatch's workspace gateway,
|
|
315
315
|
run the same command with that app's host:
|
|
@@ -15,7 +15,7 @@ description: "Author and embed interactive MCP App UIs inside Claude, ChatGPT, a
|
|
|
15
15
|
| Build generated inline UI inside Agent-Native chat | [Generative UI](/docs/generative-ui) |
|
|
16
16
|
| Lower-level MCP server reference (auth, tools, custom mount) | [MCP Server](/docs/mcp-protocol) |
|
|
17
17
|
|
|
18
|
-
MCP Apps are the official `io.modelcontextprotocol/ui` extension that lets compatible hosts — Claude,
|
|
18
|
+
MCP Apps are the official `io.modelcontextprotocol/ui` extension that lets compatible hosts — Claude, ChatGPT, VS Code GitHub Copilot, Microsoft 365 Copilot, Cursor, Goose, Postman, MCPJam, and others — render interactive UIs inline in chat. In agent-native apps, every MCP App is a **real React route**, not a separate plain-HTML widget.
|
|
19
19
|
|
|
20
20
|
Inside an Agent-Native app's own chat, prefer [native chat renderers](/docs/native-chat-ui) for first-party widgets such as tables, charts, typed results, and approval affordances. Use [Generative UI](/docs/generative-ui) when the in-app agent should create arbitrary sandboxed controls or visualizers inline. 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.
|
|
21
21
|
|
|
@@ -241,9 +241,9 @@ Display mode is best-effort. The in-app `McpAppRenderer` currently reports an in
|
|
|
241
241
|
|
|
242
242
|
## Host support and caching {#client-support}
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
Hosts that render MCP Apps inline include Claude chat on web, desktop, and mobile, plus the Claude Desktop Code tab; ChatGPT; VS Code GitHub Copilot (1.109+); Microsoft 365 Copilot; Cursor (2.6+); Goose; Postman; MCPJam; Codex Desktop (26.616+); and T3 Code (in Codex threads). Host support still varies by plan, release channel, and client version, so check the [MCP extension support matrix](https://modelcontextprotocol.io/extensions/client-matrix). ChatGPT custom MCP apps are available through developer mode for Business and Enterprise/Edu workspaces on ChatGPT web; see OpenAI's [developer mode and MCP apps](https://help.openai.com/en/articles/12584461-developer-mode-and-full-mcp-apps-in-chatgpt-beta) notes.
|
|
245
245
|
|
|
246
|
-
Claude Code
|
|
246
|
+
The Claude Desktop Code tab renders MCP Apps, as observed in [widget data](https://github.com/anthropics/claude-code/issues/103809) and [tool-name](https://github.com/anthropics/claude-code/issues/104045) bug reports. Use the deep-link fallback in the Claude Code terminal, Cowork, Code on claude.ai web, and the Codex CLI. [Cowork doesn't declare MCP Apps yet](https://github.com/anthropics/claude-code/issues/103924), and using it on the same connector can make inline apps disappear in Chat until you reconnect the connector. For other clients, verify inline iframe rendering in the exact surface you target. The deep link remains the reliable fallback when a host chooses not to render an iframe. In practice, every agent-native app should be authored with both: MCP Apps for inline review/edit in capable hosts, and `link` for universal round-tripping back to the full app.
|
|
247
247
|
|
|
248
248
|
Claude and ChatGPT can cache tool and resource metadata for an existing custom connector. After changing MCP App metadata, verify with a fresh tool call; if the host still uses the old descriptor, reconnect the Claude connector or rescan/review the ChatGPT connector so it refreshes the catalog. If Claude logs a warning about `_meta.ui.csp` or `_meta.ui.permissions` living on the tool descriptor after a deploy, that connector is using stale metadata: delete/reconnect the Claude connector and start a fresh chat.
|
|
249
249
|
|
|
@@ -203,7 +203,7 @@ If an action declares `mcpApp`, the server advertises the official MCP Apps exte
|
|
|
203
203
|
- Hosts that render MCP Apps show the UI inline; hosts that don't can still call the tool and use the deep-link fallback.
|
|
204
204
|
- 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 — never a separate plain-HTML implementation.
|
|
205
205
|
- The server emits both standard MCP Apps metadata and ChatGPT Apps SDK compatibility metadata so app-capable hosts find the same `ui://` resource.
|
|
206
|
-
-
|
|
206
|
+
- Host support varies by plan, release channel, and client version. See [MCP Apps → Host support](/docs/mcp-apps#client-support) for rendering hosts and link-out clients, including Claude Code.
|
|
207
207
|
|
|
208
208
|
### MCP App embed bridge {#mcp-app-embed-bridge}
|
|
209
209
|
|
package/docs/content/sharing.mdx
CHANGED
|
@@ -197,6 +197,7 @@ A failed request sets `error` and keeps the rows already loaded. It never looks
|
|
|
197
197
|
For a ready-made sidebar that combines owned chats, shared chats, and eligible started drafts, import `useOwnershipChatHistory()` and `OwnershipChatHistoryRail` from `@agent-native/toolkit/app/chat/ownership-history`. The adapter keeps owner and access-basis details on shared rows, pages each section independently, and retains rows and local optimistic changes when a refresh fails. Its mutation callbacks return `Promise<boolean>`, allowing the app to navigate only after a write succeeds. See [Sharing Kit](/docs/toolkit-sharing#shared-chat-history) for an example.
|
|
198
198
|
|
|
199
199
|
An active empty draft remains selectable and runnable while its first save is pending. Until persistence is confirmed, hide pin, rename, and archive actions, and the adapter rejects calls to those callbacks. `ownDraftRows` supplies persistence provenance for owned drafts, while confirmed owned rows from the server list keep their normal actions. For custom `OwnDraftRow` values, set optional `persisted?: boolean` to `true` only for a confirmed persisted server row owned by the current user. Do not infer persistence from message count or active ID. Role, privacy, and whether the active draft is empty remain separate facts.
|
|
200
|
+
Pins are personal: `pinnedAt` is the caller's pin, including on shared chats; list and search sort by it. `useChatThreads().pinThread(id, pinned)` keeps its existing signature. Both `useChatThreads()` and `useChatThreadList()` provide `hideThread(id, hidden)` for shared chats. Hidden chats are excluded from list and search unless `includeHidden: true` is set; their rows and single-thread reads include the caller's `hiddenAt`. Opening a hidden chat by id or link still works. Owners cannot hide their own chats; they archive instead. Rename and archive remain owner-only. Hide throws `ChatThreadMutationError` on HTTP refusals (`status` 403 for owners, 404 without access); successful calls return `true`. The HTTP contract is `POST /_agent-native/agent-chat/threads/:id/hide` with `{ hidden: boolean }`; list/search use `includeHidden=1`. The `chat-history` tool supports `pin`, `unpin`, `hide`, `unhide`, and search with `includeHidden: true`. Revoking access hides prior viewer state; deleting a thread deletes that state.
|
|
200
201
|
|
|
201
202
|
## Same model, agent and UI {#agent-and-ui}
|
|
202
203
|
|
|
@@ -52,8 +52,10 @@ copies a handoff summary and shows a copyable context block; paste that summary
|
|
|
52
52
|
back into the chat so the external agent can use the selected media URL and
|
|
53
53
|
asset metadata.
|
|
54
54
|
|
|
55
|
-
Codex, Claude Code, and
|
|
56
|
-
|
|
55
|
+
Codex CLI, the Claude Code terminal, Cowork, and Code on claude.ai web use the
|
|
56
|
+
link-out flow. For rendering hosts, including the Claude Desktop Code tab and
|
|
57
|
+
Codex Desktop, see
|
|
58
|
+
[MCP Apps → Host support](/docs/mcp-apps#client-support). Remote CDN markdown
|
|
57
59
|
images may not display reliably in the chat transcript. Agents should keep the
|
|
58
60
|
asset link as the source of truth; when a visible inline preview is needed in a
|
|
59
61
|
code-editor chat, download the selected `previewUrl`/`downloadUrl` to a local
|
|
@@ -211,7 +213,7 @@ Generate and pick brand media without leaving Codex, Claude Code, Claude, or Cha
|
|
|
211
213
|
the one-command setup.
|
|
212
214
|
|
|
213
215
|
2. **Ask for images.** In your agent's chat: "Generate three blog hero options from the Acme product shots." The agent opens the picker with candidate images you can regenerate, retune (prompt, aspect, count), and choose from.
|
|
214
|
-
3. **Pick.** In inline hosts (ChatGPT, Claude
|
|
216
|
+
3. **Pick.** In inline hosts (ChatGPT, Claude chat on web, desktop, and mobile, plus the Claude Desktop Code tab) the picker renders right in the chat — click a candidate and the choice flows back automatically. On CLI/link-only hosts (Codex CLI, Claude Code terminal, Cowork, Code on claude.ai web) you get an **"Open in Assets →"** link; open it, pick in the browser, then paste the copied handoff summary back into your chat — or just say "use image A". [Cowork doesn't declare MCP Apps yet](https://github.com/anthropics/claude-code/issues/103924), and using it on the same connector can make inline apps disappear in Chat until you reconnect the connector.
|
|
215
217
|
4. **Apply to code.** The chosen Media URL and `assetId` come back to the agent, which uses the URL directly in the code it writes (an `<img>` src, a download) or calls `export-asset`.
|
|
216
218
|
|
|
217
219
|
### Distributing the app skill
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.220.0-nightly-20261023212848",
|
|
4
4
|
"description": "The agentic application framework for building autonomous agents with intuitive UIs",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
"yaml": "^2.9.0",
|
|
731
731
|
"yjs": "^13.6.33",
|
|
732
732
|
"zod": "^4.3.6",
|
|
733
|
-
"@agent-native/agentkit": "^0.
|
|
733
|
+
"@agent-native/agentkit": "^0.220.0-nightly-20261023212848",
|
|
734
734
|
"@agent-native/recap-cli": "^0.5.88"
|
|
735
735
|
},
|
|
736
736
|
"devDependencies": {
|
|
@@ -801,7 +801,7 @@
|
|
|
801
801
|
"xlsx": "^0.18.5"
|
|
802
802
|
},
|
|
803
803
|
"peerDependencies": {
|
|
804
|
-
"@agent-native/core-corpus": "
|
|
804
|
+
"@agent-native/core-corpus": "0.220.0-nightly-20261023212848",
|
|
805
805
|
"@ai-sdk/anthropic": ">=3",
|
|
806
806
|
"@ai-sdk/cohere": ">=3",
|
|
807
807
|
"@ai-sdk/google": ">=3",
|
|
@@ -172,6 +172,7 @@ Everything else — CRUD, settings, search, list/detail reads, auth state, anyth
|
|
|
172
172
|
- **Do** signal failure by throwing, using `fail()` for expected caller-readable failures. Never return `{ error: ... }` as a failure result: a normal return is treated as a successful action. Reserve bare errors for unexpected internal faults.
|
|
173
173
|
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser and to agents; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
174
174
|
- **Do** give `fail()` the status that matches the cause: it defaults to `400`, and `useActionQuery` retries only `429`, `502`, `503`, and `504`. Mutations do not retry; use transient statuses only for retryable failures.
|
|
175
|
+
- **Do** throw `NoWriteError(message, { errorCode, statusCode })` instead of `fail()` for a rejection raised before the action's first write, such as an edit that matches nothing or a missing target. The agent then retries with corrected arguments instead of stopping on a write whose outcome is unknown. Throw it only before the first write: the framework rejects the claim when a nested write action ran, but it cannot see the handler's own writes.
|
|
175
176
|
- **Do** render `actionErrorMessage(error) ?? yourCopy` in UI, never bare `error.message`. The message keeps an `Action <name> failed:` prefix that belongs in a console, so a toast built from it reads "Action update-brand-kit failed: That name is taken." The helper returns only what the action wrote, and `undefined` when nothing did (network drop, proxy HTML page), which is why the fallback is not optional.
|
|
176
177
|
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP. `details` follow as an `Error details: {...}` JSON line, and as `structuredContent.error` over MCP, capped at 2,000 characters, so keep them to what the agent acts on next: ids, limits, field names. The status never reaches either.
|
|
177
178
|
- **Don't** re-export actions as REST — `/_agent-native/actions/:name` is already the REST surface; duplicating it under `/api/*` hides the operation from agents.
|
|
@@ -172,6 +172,7 @@ Everything else — CRUD, settings, search, list/detail reads, auth state, anyth
|
|
|
172
172
|
- **Do** signal failure by throwing, using `fail()` for expected caller-readable failures. Never return `{ error: ... }` as a failure result: a normal return is treated as a successful action. Reserve bare errors for unexpected internal faults.
|
|
173
173
|
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser and to agents; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
174
174
|
- **Do** give `fail()` the status that matches the cause: it defaults to `400`, and `useActionQuery` retries only `429`, `502`, `503`, and `504`. Mutations do not retry; use transient statuses only for retryable failures.
|
|
175
|
+
- **Do** throw `NoWriteError(message, { errorCode, statusCode })` instead of `fail()` for a rejection raised before the action's first write, such as an edit that matches nothing or a missing target. The agent then retries with corrected arguments instead of stopping on a write whose outcome is unknown. Throw it only before the first write: the framework rejects the claim when a nested write action ran, but it cannot see the handler's own writes.
|
|
175
176
|
- **Do** render `actionErrorMessage(error) ?? yourCopy` in UI, never bare `error.message`. The message keeps an `Action <name> failed:` prefix that belongs in a console, so a toast built from it reads "Action update-brand-kit failed: That name is taken." The helper returns only what the action wrote, and `undefined` when nothing did (network drop, proxy HTML page), which is why the fallback is not optional.
|
|
176
177
|
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP. `details` follow as an `Error details: {...}` JSON line, and as `structuredContent.error` over MCP, capped at 2,000 characters, so keep them to what the agent acts on next: ids, limits, field names. The status never reaches either.
|
|
177
178
|
- **Don't** re-export actions as REST — `/_agent-native/actions/:name` is already the REST surface; duplicating it under `/api/*` hides the operation from agents.
|
|
@@ -287,6 +287,12 @@ not already settled by Steve's written direction, flag it to Steve and do not
|
|
|
287
287
|
merge until he decides. A routine bug fix or bounded improvement within an
|
|
288
288
|
established workflow is not a major decision.
|
|
289
289
|
|
|
290
|
+
Keep the PR thread silent while a product, UX, or app-owner decision is
|
|
291
|
+
unresolved. Do not comment or reply to request, announce, or explain that the
|
|
292
|
+
decision is needed; record the gate only in the recap. This remains true after
|
|
293
|
+
an author update, so do not send a thanks-only or status-only reply while the
|
|
294
|
+
decision is pending.
|
|
295
|
+
|
|
290
296
|
The app-owner map is for approval exceptions only; an owner approval is not a
|
|
291
297
|
merge requirement:
|
|
292
298
|
|
|
@@ -455,12 +461,29 @@ code or screenshot requests. This also applies when another comment or bot
|
|
|
455
461
|
event is newer than Steve's request; bot activity alone does not reopen the
|
|
456
462
|
handoff.
|
|
457
463
|
|
|
464
|
+
On a contributor-owned PR, do not draft a follow-up unless the author has made
|
|
465
|
+
a substantive update since Steve's last message. Begin a first reply by
|
|
466
|
+
thanking the author for the PR; if replying after an author update, begin by
|
|
467
|
+
thanking them for that update. Never write “I have no further feedback” or
|
|
468
|
+
another vague closing. State the disposition, the exact next action, and who
|
|
469
|
+
owns it. If a product, UX, or app-owner decision is still needed, do not post
|
|
470
|
+
an author-facing status comment or ask the author to get that review; keep the
|
|
471
|
+
thread silent and report the decision gate in the recap. Never comment that a
|
|
472
|
+
product owner needs to review the PR. For a contributor thread paused by an
|
|
473
|
+
unresolved gate, an internal decision does not count as an author update, and
|
|
474
|
+
an author update made while the decision is pending does not qualify for a
|
|
475
|
+
follow-up. Keep the thread silent until the decision is resolved and the author
|
|
476
|
+
makes a substantive update after resolution; then thank them for that update
|
|
477
|
+
and state the resolved disposition, exact next action, and owner. This
|
|
478
|
+
contributor-update gate does not govern review feedback on the active user's
|
|
479
|
+
own PR; follow the own-PR review-update rule in `ship`.
|
|
480
|
+
|
|
458
481
|
If no prior Steve request is awaiting an update and this would be Steve's first
|
|
459
482
|
comment on that PR, begin the draft with a warm thank-you that tags the author
|
|
460
483
|
using the exact GitHub `author.login` from the live PR metadata, for example:
|
|
461
484
|
|
|
462
485
|
```text
|
|
463
|
-
Thanks for the
|
|
486
|
+
Thanks for the PR, @username!
|
|
464
487
|
|
|
465
488
|
Couple requests. Can you please [make the specific update] so [the intended
|
|
466
489
|
behavior or outcome] is preserved?
|
|
@@ -473,8 +496,9 @@ the concrete request in a friendly, conversational way (for example, "Couple
|
|
|
473
496
|
requests. Can you please ...?"). Keep the technical request specific,
|
|
474
497
|
actionable, and supported by the diff or source evidence; ask for a regression
|
|
475
498
|
test when appropriate to the code change rather than as a blanket requirement.
|
|
476
|
-
|
|
477
|
-
|
|
499
|
+
For a follow-up after an author update, thank them for that update rather than
|
|
500
|
+
repeating the first-contact thanks. Do not draft a duplicate request when an
|
|
501
|
+
existing Steve comment already covers it; link or summarize that request
|
|
478
502
|
instead. Drafts are for the user to review and are never posted by this skill
|
|
479
503
|
unless the current invocation explicitly authorizes posting.
|
|
480
504
|
|
|
@@ -172,6 +172,7 @@ Everything else — CRUD, settings, search, list/detail reads, auth state, anyth
|
|
|
172
172
|
- **Do** signal failure by throwing, using `fail()` for expected caller-readable failures. Never return `{ error: ... }` as a failure result: a normal return is treated as a successful action. Reserve bare errors for unexpected internal faults.
|
|
173
173
|
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser and to agents; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
174
174
|
- **Do** give `fail()` the status that matches the cause: it defaults to `400`, and `useActionQuery` retries only `429`, `502`, `503`, and `504`. Mutations do not retry; use transient statuses only for retryable failures.
|
|
175
|
+
- **Do** throw `NoWriteError(message, { errorCode, statusCode })` instead of `fail()` for a rejection raised before the action's first write, such as an edit that matches nothing or a missing target. The agent then retries with corrected arguments instead of stopping on a write whose outcome is unknown. Throw it only before the first write: the framework rejects the claim when a nested write action ran, but it cannot see the handler's own writes.
|
|
175
176
|
- **Do** render `actionErrorMessage(error) ?? yourCopy` in UI, never bare `error.message`. The message keeps an `Action <name> failed:` prefix that belongs in a console, so a toast built from it reads "Action update-brand-kit failed: That name is taken." The helper returns only what the action wrote, and `undefined` when nothing did (network drop, proxy HTML page), which is why the fallback is not optional.
|
|
176
177
|
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP. `details` follow as an `Error details: {...}` JSON line, and as `structuredContent.error` over MCP, capped at 2,000 characters, so keep them to what the agent acts on next: ids, limits, field names. The status never reaches either.
|
|
177
178
|
- **Don't** re-export actions as REST — `/_agent-native/actions/:name` is already the REST surface; duplicating it under `/api/*` hides the operation from agents.
|
|
@@ -172,6 +172,7 @@ Everything else — CRUD, settings, search, list/detail reads, auth state, anyth
|
|
|
172
172
|
- **Do** signal failure by throwing, using `fail()` for expected caller-readable failures. Never return `{ error: ... }` as a failure result: a normal return is treated as a successful action. Reserve bare errors for unexpected internal faults.
|
|
173
173
|
- **Do** use `fail()` rather than a bare `Error` for caller-readable failures. It carries the action's message, `errorCode`, and `details` to the browser and to agents; unexpected errors become a generic 500. Reserve bare throws for internal faults.
|
|
174
174
|
- **Do** give `fail()` the status that matches the cause: it defaults to `400`, and `useActionQuery` retries only `429`, `502`, `503`, and `504`. Mutations do not retry; use transient statuses only for retryable failures.
|
|
175
|
+
- **Do** throw `NoWriteError(message, { errorCode, statusCode })` instead of `fail()` for a rejection raised before the action's first write, such as an edit that matches nothing or a missing target. The agent then retries with corrected arguments instead of stopping on a write whose outcome is unknown. Throw it only before the first write: the framework rejects the claim when a nested write action ran, but it cannot see the handler's own writes.
|
|
175
176
|
- **Do** render `actionErrorMessage(error) ?? yourCopy` in UI, never bare `error.message`. The message keeps an `Action <name> failed:` prefix that belongs in a console, so a toast built from it reads "Action update-brand-kit failed: That name is taken." The helper returns only what the action wrote, and `undefined` when nothing did (network drop, proxy HTML page), which is why the fallback is not optional.
|
|
176
177
|
- **Do** pass a real `errorCode` when the agent should branch on the failure rather than re-read it. Codes other than the default `action_failed` are appended to the tool result as `(errorCode: not_found)`, on both the in-app agent and MCP. `details` follow as an `Error details: {...}` JSON line, and as `structuredContent.error` over MCP, capped at 2,000 characters, so keep them to what the agent acts on next: ids, limits, field names. The status never reaches either.
|
|
177
178
|
- **Don't** re-export actions as REST — `/_agent-native/actions/:name` is already the REST surface; duplicating it under `/api/*` hides the operation from agents.
|
package/src/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md
CHANGED
|
@@ -162,8 +162,15 @@ actions for Forms, Content, Clips, Slides, and Design. The action should return
|
|
|
162
162
|
concise structured content plus the link; it should not dump large catalogs or
|
|
163
163
|
HTML.
|
|
164
164
|
|
|
165
|
-
Compatibility target: build to the standard once, not per-client shims.
|
|
166
|
-
Apps
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
Compatibility target: build to the standard once, not per-client shims.
|
|
166
|
+
Hosts that render MCP Apps inline today include Claude chat on web, desktop, and
|
|
167
|
+
mobile, plus the Claude Desktop Code tab; ChatGPT; VS Code GitHub Copilot (1.109+);
|
|
168
|
+
Microsoft 365 Copilot; Cursor (2.6+); Goose; Postman; MCPJam; Codex Desktop (26.616+);
|
|
169
|
+
and T3 Code (in Codex threads). Desktop Code rendering is observed in
|
|
170
|
+
[widget bug reports](https://github.com/anthropics/claude-code/issues/103809).
|
|
171
|
+
Treat the Claude Code terminal, Cowork, and Code on claude.ai web as link-out hosts.
|
|
172
|
+
[Cowork doesn't declare MCP Apps yet](https://github.com/anthropics/claude-code/issues/103924),
|
|
173
|
+
and using it on the same connector can make inline apps disappear in Chat until
|
|
174
|
+
you reconnect the connector. Host support varies by plan, release channel, and client version,
|
|
175
|
+
so keep the deep link fallback. See the community-maintained
|
|
176
|
+
[MCP client matrix](https://modelcontextprotocol.io/extensions/client-matrix).
|