@agent-native/core 0.29.0 → 0.30.2

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.
@@ -113,6 +113,20 @@ Restart the agent client after connecting so it picks up the new MCP server; OAu
113
113
 
114
114
  Use `--client codex` (or `--client claude-code`, `--client claude-code-cli`, `--client cowork`, `--client all`) to skip the picker for scripts or one-off installs.
115
115
 
116
+ First-party app skills install the instructions and the hosted MCP connector together with `skills add <name>`. Each has a short alias for demos and tutorials:
117
+
118
+ ```bash
119
+ npx @agent-native/core@latest skills add assets # aliases: images, image-generation
120
+ npx @agent-native/core@latest skills add design-exploration # aliases: design, ux-exploration
121
+ ```
122
+
123
+ | Skill | Alias | For |
124
+ | -------------------- | -------- | ---------------------- |
125
+ | `assets` | `images` | image/video generation |
126
+ | `design-exploration` | `design` | UI/design exploration |
127
+
128
+ The default client is `codex`; add `--client claude-code` or `--client all` for others. Inline hosts (ChatGPT, Claude.ai, Claude Desktop main chat) render the picker / variant grid in chat; CLI/link-only hosts (Codex, Claude Code, Claude Desktop "Code" tab) return an "Open in … →" link where the user picks in the browser and pastes a handoff summary back.
129
+
116
130
  When you truly need an isolated app instead of Dispatch's workspace gateway,
117
131
  run the same command with that app's host:
118
132
 
@@ -408,7 +422,7 @@ List/search actions point at a record-focused view the same way — e.g. calenda
408
422
 
409
423
  For hosts that support the MCP Apps extension, an action can also advertise an inline UI resource with `mcpApp`. This is a progressive enhancement for flows where the external agent should hand the user an interactive surface instead of only text — for example reviewing an email draft, editing a calendar invite, or choosing between generated dashboard variants.
410
424
 
411
- Use the real React app with `embedRoute()` or `embedApp()` whenever the user needs UI. The mental model is simple: the action's `link` target is also the MCP App embed target. Expose the operation as a normal action/tool, return a focused deep link with `link`, and add `mcpApp.resource = embedApp(...)` so capable hosts load that same route inline instead of opening a new tab. When both should be built from the same route, prefer `embedRoute({ title, openLabel, path })`; it returns matching `link` and `mcpApp` action fields.
425
+ Use the real React app with `embedRoute()` or `embedApp()` whenever the user needs UI. The mental model is simple: the action's `link` target is also the MCP App embed target. Expose the operation as a normal action/tool, return a focused deep link with `link`, and add `mcpApp.resource = embedApp(...)` so capable hosts load that same route inline instead of opening a new tab. When both should be built from the same route, prefer `embedRoute({ title, openLabel, path })`: it is the convenience wrapper that returns matching `link` and `mcpApp` fields from one call, while `embedApp(...)` is the lower-level resource you assign to `mcpApp.resource` directly.
412
426
 
413
427
  That means full-app embeds can do anything the route can do once opened: review or edit an email draft, show a filtered inbox/search, open a calendar event or event draft, load an extension page, inspect a full analytics dashboard or saved analysis, continue a deck in the Slides editor, or open a Design project/editor. Prefer URL/deep-link params and the existing `/_agent-native/open` navigation/app-state bridge over inventing a second state protocol for MCP Apps.
414
428
 
@@ -43,6 +43,34 @@ Use it when your team needs reusable visual direction and searchable source asse
43
43
  - **Install as an app-backed skill.** The `agent-native.app-skill.json` manifest exports an Assets skill plus MCP connector metadata so marketplaces can install the app, its instructions, and its picker together.
44
44
  - **Serve other agents.** Slides, Design, Content, Mail, and Dispatch can call Assets through A2A to list libraries, generate batches, create videos, refine an asset, fetch exports, and render inline previews where embedding is allowed.
45
45
 
46
+ ## Using it from your coding agent
47
+
48
+ Generate and pick brand media without leaving Codex, Claude Code, Claude, or ChatGPT.
49
+
50
+ 1. **Install once.** This adds the skill instructions and registers the hosted MCP connector together:
51
+
52
+ ```bash
53
+ npx @agent-native/core@latest skills add assets # aliases: images, image-generation
54
+ ```
55
+
56
+ Default client is `codex`; add `--client claude-code` or `--client all` for others.
57
+
58
+ 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.
59
+ 3. **Pick.** In inline hosts (ChatGPT, Claude.ai, Claude Desktop main chat) the picker renders right in the chat — click a candidate and the choice flows back automatically. On CLI/link-only hosts (Codex, Claude Code, Claude Desktop "Code" tab) 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".
60
+
61
+ ```text
62
+ Paste this selection back into your chat so the agent can use it.
63
+
64
+ Selected Assets image for the next step: <label>
65
+ Media URL: <url>
66
+ Use this selected asset in the current artifact or design.
67
+
68
+ Selected asset context:
69
+ { "selectedAsset": { "assetId": "...", "url": "...", "mediaType": "image", ... } }
70
+ ```
71
+
72
+ 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`.
73
+
46
74
  ## Why it's interesting
47
75
 
48
76
  Most AI media tools treat brand consistency as a prompt-writing problem. Assets treats it as application state: references, folders, collections, style briefs, run history, descriptions, and saved assets live in SQL, while binary media lives in object storage or the local file-upload fallback during development.
@@ -29,9 +29,10 @@ be installed as an app-backed skill plus MCP connector:
29
29
  npx @agent-native/core@latest skills add design-exploration
30
30
  ```
31
31
 
32
- That gives the agent instructions to create a design shell, present three visual
33
- directions in the inline Design MCP app, wait for your pick, and iterate from
34
- the selected prototype.
32
+ That gives the agent instructions to create a design shell, present 2-5 visual
33
+ directions (3 is the sweet spot) in the inline Design MCP app, wait for your
34
+ pick, and iterate from the selected prototype. See [Using it from your coding
35
+ agent](#coding-agent) for the full flow.
35
36
 
36
37
  ## Useful Prompts
37
38
 
@@ -50,6 +51,33 @@ the selected prototype.
50
51
  - **Import references.** Bring in existing HTML or reference material as context for a new design pass.
51
52
  - **Export real files.** Export HTML, ZIP, or PDF from the generated prototype.
52
53
 
54
+ ## Using It From Your Coding Agent {#coding-agent}
55
+
56
+ Generate and pick design directions without leaving Codex, Claude Code, Claude, or ChatGPT.
57
+
58
+ 1. **Install once.** This adds the skill instructions and registers the hosted MCP connector together:
59
+
60
+ ```bash
61
+ npx @agent-native/core@latest skills add design-exploration # aliases: design, ux-exploration
62
+ ```
63
+
64
+ Default client is `codex`; add `--client claude-code` or `--client all` for others.
65
+
66
+ 2. **Ask for directions.** In your agent's chat: "Create three landing-page directions for a technical analytics product." The agent generates 2-5 directions (3 is the sweet spot) you can compare side by side.
67
+ 3. **Pick.** In inline hosts (ChatGPT, Claude.ai, Claude Desktop main chat) the variant grid renders right in the chat — pick a direction and it auto-persists as `index.html`, then keep refining. On CLI/link-only hosts (Codex, Claude Code, Claude Desktop "Code" tab) you get an **"Open in Design →"** link; open it, pick in the browser, then paste the copied handoff summary back into your chat — or just say "I picked direction B".
68
+
69
+ ```text
70
+ Paste this back into your chat so your agent continues from the chosen design.
71
+
72
+ I picked the "<label>" design direction.
73
+ It's saved as index.html in design <designId>. Refine from here with get-design-snapshot + generate-design, or export-coding-handoff to bring it into code. Don't show new variants unless I ask.
74
+
75
+ Design selection context:
76
+ { "selectedDesign": { "designId": "...", "variantId": "...", "label": "...", "file": "index.html" } }
77
+ ```
78
+
79
+ 4. **Apply to code.** Run `export-coding-handoff`; it returns a tokenized raw-code URL plus a ready-to-paste prompt. Your coding agent fetches that URL and writes the code.
80
+
53
81
  ## Why It's Interesting
54
82
 
55
83
  Design is useful because the agent edits an artifact that is already close to shippable web UI. There is no separate "AI mockup" format to translate later: the preview, the editable source, and the exported artifact all come from the same HTML.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.29.0",
3
+ "version": "0.30.2",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"