@agent-native/core 0.22.45 → 0.24.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/a2a/artifact-response.js +1 -1
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +5 -6
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +12 -4
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +9 -2
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +9 -2
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/cli/app-skill.d.ts +139 -0
- package/dist/cli/app-skill.d.ts.map +1 -0
- package/dist/cli/app-skill.js +960 -0
- package/dist/cli/app-skill.js.map +1 -0
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +13 -4
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +24 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts +39 -0
- package/dist/cli/skills.d.ts.map +1 -0
- package/dist/cli/skills.js +363 -0
- package/dist/cli/skills.js.map +1 -0
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +9 -6
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/cli/workspace-dev.d.ts.map +1 -1
- package/dist/cli/workspace-dev.js +103 -9
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +2 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +13 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +66 -22
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +17 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +70 -10
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +157 -2
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +6 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +9 -2
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts +8 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +37 -7
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-chat-threads.spec.js +59 -0
- package/dist/client/use-chat-threads.spec.js.map +1 -1
- package/dist/deploy/workspace-deploy.js +6 -0
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +112 -2
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/routes.d.ts.map +1 -1
- package/dist/extensions/routes.js +37 -2
- package/dist/extensions/routes.js.map +1 -1
- package/dist/extensions/schema.d.ts +275 -0
- package/dist/extensions/schema.d.ts.map +1 -1
- package/dist/extensions/schema.js +53 -1
- package/dist/extensions/schema.js.map +1 -1
- package/dist/extensions/store.d.ts +40 -0
- package/dist/extensions/store.d.ts.map +1 -1
- package/dist/extensions/store.js +367 -3
- package/dist/extensions/store.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -1
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/routes.d.ts +1 -0
- package/dist/mcp-client/routes.d.ts.map +1 -1
- package/dist/mcp-client/routes.js +52 -0
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/mcp-client/workspace-servers.d.ts +15 -0
- package/dist/mcp-client/workspace-servers.d.ts.map +1 -0
- package/dist/mcp-client/workspace-servers.js +297 -0
- package/dist/mcp-client/workspace-servers.js.map +1 -0
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +38 -25
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/store.d.ts +11 -3
- package/dist/resources/store.d.ts.map +1 -1
- package/dist/resources/store.js +220 -9
- package/dist/resources/store.js.map +1 -1
- package/dist/scripts/call-agent.js +1 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +25 -6
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-discovery.d.ts.map +1 -1
- package/dist/server/agent-discovery.js +34 -9
- package/dist/server/agent-discovery.js.map +1 -1
- package/dist/server/auth-marketing.d.ts.map +1 -1
- package/dist/server/auth-marketing.js +8 -5
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +6 -2
- package/dist/server/auth.js.map +1 -1
- package/dist/templates/default/AGENTS.md +12 -4
- package/dist/templates/default/DEVELOPING.md +7 -5
- package/dist/templates/workspace-core/AGENTS.md +7 -0
- package/dist/templates/workspace-root/AGENTS.md +6 -0
- package/docs/content/creating-templates.md +14 -9
- package/docs/content/database.md +44 -17
- package/docs/content/deployment.md +15 -7
- package/docs/content/dispatch.md +7 -1
- package/docs/content/embedding-sdk.md +79 -0
- package/docs/content/extensions.md +5 -0
- package/docs/content/key-concepts.md +15 -17
- package/docs/content/mcp-clients.md +30 -0
- package/docs/content/multi-app-workspace.md +3 -2
- package/docs/content/multi-tenancy.md +4 -4
- package/docs/content/server.md +10 -7
- package/docs/content/skills-guide.md +75 -0
- package/docs/content/template-analytics.md +1 -1
- package/docs/content/template-assets.md +130 -0
- package/docs/content/template-dispatch.md +3 -2
- package/docs/content/template-slides.md +2 -2
- package/docs/content/workspace-management.md +2 -2
- package/docs/content/workspace.md +11 -9
- package/package.json +1 -1
- package/src/templates/default/AGENTS.md +12 -4
- package/src/templates/default/DEVELOPING.md +7 -5
- package/src/templates/workspace-core/AGENTS.md +7 -0
- package/src/templates/workspace-root/AGENTS.md +6 -0
- package/docs/content/template-images.md +0 -55
|
@@ -42,6 +42,81 @@ Templates include skills specific to their domain. These live in the same `.agen
|
|
|
42
42
|
|
|
43
43
|
Domain skills follow the same format as framework skills. They encode patterns specific to the template that the agent needs to follow.
|
|
44
44
|
|
|
45
|
+
## App-backed skills {#app-backed-skills}
|
|
46
|
+
|
|
47
|
+
App-backed skills package an agent-native app as a skill marketplace artifact.
|
|
48
|
+
The bundle can include agent instructions, exported skills, MCP connector
|
|
49
|
+
metadata, hosted/local launch instructions, and UI surfaces such as MCP Apps.
|
|
50
|
+
|
|
51
|
+
Each app-backed skill starts with `agent-native.app-skill.json` at the app root:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"schemaVersion": 1,
|
|
56
|
+
"id": "assets",
|
|
57
|
+
"hosted": {
|
|
58
|
+
"url": "https://assets.agent-native.com",
|
|
59
|
+
"mcpUrl": "https://assets.agent-native.com/_agent-native/mcp"
|
|
60
|
+
},
|
|
61
|
+
"mcp": { "serverName": "agent-native-assets" },
|
|
62
|
+
"skills": [
|
|
63
|
+
{
|
|
64
|
+
"path": ".agents/skills/asset-generation",
|
|
65
|
+
"visibility": "both",
|
|
66
|
+
"exportAs": "assets"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Skill visibility controls what ships:
|
|
73
|
+
|
|
74
|
+
| Visibility | Meaning |
|
|
75
|
+
| ---------- | --------------------------------------------------------------- |
|
|
76
|
+
| `internal` | Used by the app's own agent, not exported to marketplaces. |
|
|
77
|
+
| `exported` | Exported to marketplaces, but not needed by the app internally. |
|
|
78
|
+
| `both` | Used internally and exported. |
|
|
79
|
+
|
|
80
|
+
Hosted is the default install path. Local launch is explicit for customization,
|
|
81
|
+
offline work, or privacy-sensitive use.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# One-command hosted install for the exported Assets skill plus MCP connector.
|
|
85
|
+
npx @agent-native/core@latest skills add assets
|
|
86
|
+
|
|
87
|
+
# Register the hosted MCP connector for local agent clients.
|
|
88
|
+
agent-native app-skill ensure --manifest templates/assets/agent-native.app-skill.json
|
|
89
|
+
|
|
90
|
+
# Materialize and run editable local source.
|
|
91
|
+
agent-native app-skill launch --manifest templates/assets/agent-native.app-skill.json --local --into ./assets-local
|
|
92
|
+
|
|
93
|
+
# Build marketplace adapters: Codex plugin, Claude marketplace, Vercel skills,
|
|
94
|
+
# plain/Claude skills, and MCP configs.
|
|
95
|
+
agent-native app-skill pack --manifest templates/assets/agent-native.app-skill.json --out ./dist/assets-skill
|
|
96
|
+
|
|
97
|
+
# Install the exported skill with the open skills CLI.
|
|
98
|
+
npx skills add ./dist/assets-skill --skill assets -a codex -y
|
|
99
|
+
|
|
100
|
+
# Add the generated Claude Code marketplace, then install its Assets plugin.
|
|
101
|
+
claude plugin marketplace add ./dist/assets-skill/adapters/claude-marketplace
|
|
102
|
+
claude plugin install agent-native-assets@agent-native-apps
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Keep secrets out of skill files. The manifest should contain URL-only connector
|
|
106
|
+
metadata; OAuth/device setup happens in the MCP host or through the app's normal
|
|
107
|
+
settings flow.
|
|
108
|
+
|
|
109
|
+
The Vercel Labs `skills` adapter is a portable `skills/<name>/SKILL.md` bundle
|
|
110
|
+
for `npx skills add ...`. For first-party hosted apps, prefer
|
|
111
|
+
`agent-native skills add assets`; it installs the skill instructions and runs
|
|
112
|
+
the MCP registration step together.
|
|
113
|
+
|
|
114
|
+
The Claude Code marketplace adapter writes
|
|
115
|
+
`adapters/claude-marketplace/.claude-plugin/marketplace.json` plus a nested
|
|
116
|
+
plugin directory containing `skills/<name>/SKILL.md` and `.mcp.json`. In Claude
|
|
117
|
+
Code, add the marketplace, install `agent-native-assets@agent-native-apps`,
|
|
118
|
+
reload plugins, then authenticate the URL-only MCP connector from `/mcp`.
|
|
119
|
+
|
|
45
120
|
## Creating custom skills {#creating-skills}
|
|
46
121
|
|
|
47
122
|
Create a skill when:
|
|
@@ -165,7 +165,7 @@ Credentials are stored via the framework's settings/env layer — no secrets in
|
|
|
165
165
|
|
|
166
166
|
| Variable | Purpose |
|
|
167
167
|
| ---------------------------------------- | ----------------------------- |
|
|
168
|
-
| `DATABASE_URL` |
|
|
168
|
+
| `DATABASE_URL` | Persistent SQL connection URL |
|
|
169
169
|
| `BETTER_AUTH_SECRET` / `BETTER_AUTH_URL` | Auth |
|
|
170
170
|
| `GOOGLE_CLIENT_ID` / `_SECRET` | Google sign-in (OAuth 2.0) |
|
|
171
171
|
| `BIGQUERY_PROJECT_ID` | BigQuery project |
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Assets"
|
|
3
|
+
description: "An agent-native digital asset manager and cross-agent generation service for brand-consistent media."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Assets
|
|
7
|
+
|
|
8
|
+
Assets is an agent-native workspace for creating and managing brand-consistent media. It organizes uploads and generated results into libraries and folders, lets teams collect examples for blog heroes, diagrams, landing pages, product shots, videos, and logos, then routes generation through the agent chat so every asset can be reviewed and refined.
|
|
9
|
+
|
|
10
|
+
Use it when your team needs reusable visual direction and searchable source assets instead of one-off generic media prompts.
|
|
11
|
+
|
|
12
|
+
## What You Can Do With It
|
|
13
|
+
|
|
14
|
+
- **Create asset libraries.** Group reference images, videos, canonical logos, style notes, palettes, folders, and generated output by brand, campaign, product, or category.
|
|
15
|
+
- **Generate through chat.** The home composer and library Generate controls send the prompt to the agent with `sendToAgentChat()`, so users can inspect variants, give feedback, and iterate.
|
|
16
|
+
- **Generate images and videos.** Builder-managed image generation is available when enabled, and Gemini powers video generation plus the manual image fallback.
|
|
17
|
+
- **Upload and describe references.** Add images or videos from the library UI or prompt composer attachment button, then search by title, description, alt text, prompt, model, media type, status, role, folder, or collection.
|
|
18
|
+
- **Keep a generation audit log.** Every run records prompts, model, aspect ratio, references, source asset, lineage, generated assets, status, errors, and timestamps for later design review.
|
|
19
|
+
- **Preserve logo accuracy.** The agent can generate a placeholder area and the server composites the uploaded canonical logo onto the final image instead of relying on the image model to redraw it.
|
|
20
|
+
- **Embed as a picker.** Other apps can iframe `/picker` and listen for the `chooseAsset` event from `@agent-native/embedding`, turning Assets into an asset picker/generator for blog editors, site builders, slide decks, and custom apps. The picker also emits the legacy `chooseImage` alias for existing image-only hosts.
|
|
21
|
+
- **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.
|
|
22
|
+
- **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.
|
|
23
|
+
|
|
24
|
+
## Why It's Interesting
|
|
25
|
+
|
|
26
|
+
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.
|
|
27
|
+
|
|
28
|
+
Because generation and library management are actions and chat workflows, the UI and the agent share the same operations. A user can start from the big prompt box, a library detail page, another app's chat, or an A2A request from Slides, and the same audit and lineage model is preserved. Once enabled, the provider path prefers Builder-managed image generation so teams do not need to paste model-provider keys into every app.
|
|
29
|
+
|
|
30
|
+
## For Developers
|
|
31
|
+
|
|
32
|
+
The rest of this doc is for anyone forking the Assets template or extending it.
|
|
33
|
+
|
|
34
|
+
### Scaffolding
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm dlx @agent-native/core create my-assets --template assets --standalone
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Customize It
|
|
41
|
+
|
|
42
|
+
Assets is a complete, cloneable template. Some practical extension ideas:
|
|
43
|
+
|
|
44
|
+
- "Add a product catalog connector so product reference shots can be selected by SKU."
|
|
45
|
+
- "Add a strict approval queue before generated assets are marked usable for marketing."
|
|
46
|
+
- "Add a brand review dashboard that filters failed or low-rated generations by model."
|
|
47
|
+
- "Create a workspace-wide default asset library and route Slides image generation through it."
|
|
48
|
+
- "Add a new provider behind the image generation interface after checking the latest provider docs."
|
|
49
|
+
|
|
50
|
+
The agent edits routes, components, actions, skills, and SQL-backed models as needed. See [Templates](/docs/cloneable-saas) for the full clone, customize, deploy flow, and [A2A Protocol](/docs/a2a-protocol) for cross-app generation.
|
|
51
|
+
|
|
52
|
+
### Embed The Picker
|
|
53
|
+
|
|
54
|
+
Use the picker route when a human is choosing or generating an asset inside
|
|
55
|
+
another product. Image is the default media type; pass `mediaType=video` when
|
|
56
|
+
you want video browsing/selection:
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
import { EmbeddedApp } from "@agent-native/embedding";
|
|
60
|
+
|
|
61
|
+
<EmbeddedApp
|
|
62
|
+
url="https://assets.agent-native.com/picker?mediaType=image"
|
|
63
|
+
onMessage={(name, payload) => {
|
|
64
|
+
if (name === "chooseAsset") {
|
|
65
|
+
insertAsset((payload as { url: string }).url);
|
|
66
|
+
}
|
|
67
|
+
}}
|
|
68
|
+
/>;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
External MCP hosts should call `open-asset-picker` instead of constructing this
|
|
72
|
+
iframe by hand. The action returns a browser fallback link and MCP App metadata
|
|
73
|
+
for inline hosts. When a user selects an asset, the picker emits `chooseAsset`,
|
|
74
|
+
the legacy `chooseImage` alias for image assets, and updates MCP App model
|
|
75
|
+
context where the host supports it.
|
|
76
|
+
|
|
77
|
+
Use A2A when another agent needs to create, search, or export assets without a
|
|
78
|
+
human picker UI.
|
|
79
|
+
|
|
80
|
+
### Distribute The App Skill
|
|
81
|
+
|
|
82
|
+
The Assets app skill has app id `assets` and hosted MCP URL
|
|
83
|
+
`https://assets.agent-native.com/_agent-native/mcp`.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Easiest hosted install: exported skill instructions plus MCP connector.
|
|
87
|
+
npx @agent-native/core@latest skills add assets
|
|
88
|
+
|
|
89
|
+
# Hosted install: URL-only MCP connector, no shared secrets in skill files.
|
|
90
|
+
agent-native app-skill ensure --manifest templates/assets/agent-native.app-skill.json
|
|
91
|
+
|
|
92
|
+
# Local editable launch.
|
|
93
|
+
agent-native app-skill launch --manifest templates/assets/agent-native.app-skill.json --local --into ./assets-local
|
|
94
|
+
|
|
95
|
+
# Marketplace package, including Claude Code marketplace and Vercel Labs skills adapters.
|
|
96
|
+
agent-native app-skill pack --manifest templates/assets/agent-native.app-skill.json --out ./dist/assets-skill
|
|
97
|
+
|
|
98
|
+
# Install the exported Assets skill with the open skills CLI.
|
|
99
|
+
npx skills add ./dist/assets-skill --skill assets -a codex -y
|
|
100
|
+
|
|
101
|
+
# Install from the generated Claude Code marketplace adapter.
|
|
102
|
+
claude plugin marketplace add ./dist/assets-skill/adapters/claude-marketplace
|
|
103
|
+
claude plugin install agent-native-assets@agent-native-apps
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The exported skill teaches agents to use the picker for human-in-the-loop
|
|
107
|
+
selection, direct actions for unattended image/video generation, and browser
|
|
108
|
+
links when inline MCP Apps are unavailable.
|
|
109
|
+
|
|
110
|
+
The Claude marketplace adapter contains a `.claude-plugin/marketplace.json`
|
|
111
|
+
catalog and an `agent-native-assets` plugin with `skills/assets/SKILL.md` plus
|
|
112
|
+
the hosted `.mcp.json`. In interactive Claude Code, the same flow is available
|
|
113
|
+
as `/plugin marketplace add ./dist/assets-skill/adapters/claude-marketplace`,
|
|
114
|
+
`/plugin install agent-native-assets@agent-native-apps`, `/reload-plugins`, and
|
|
115
|
+
`/mcp` for MCP authentication.
|
|
116
|
+
|
|
117
|
+
If you install from a raw marketplace bundle with `npx skills`, register the
|
|
118
|
+
hosted MCP connector so those instructions can call the live Assets app:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx @agent-native/core@latest app-skill ensure --manifest ./dist/assets-skill/agent-native.app-skill.json --yes
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## What's Next
|
|
125
|
+
|
|
126
|
+
- [**Templates**](/docs/cloneable-saas) — the clone-and-own model
|
|
127
|
+
- [**Embedding SDK**](/docs/embedding-sdk) — iframe picker and sidecar patterns
|
|
128
|
+
- [**A2A Protocol**](/docs/a2a-protocol) — how other apps call Assets
|
|
129
|
+
- [**File Uploads**](/docs/file-uploads) — storage and authenticated asset serving
|
|
130
|
+
- [**Sharing & Privacy**](/docs/sharing) — library-level access control
|
|
@@ -26,7 +26,7 @@ If you're running an [multi-app workspace](/docs/multi-app-workspace) with many
|
|
|
26
26
|
- **Central inbox.** Slack DMs, Telegram messages, email notifications, A2A requests from other agents — all land in one place. The Dispatch agent triages and either handles them itself or delegates. See [Messaging](/docs/messaging) for how to wire Slack, email, and Telegram into your workspace.
|
|
27
27
|
- **Orchestrator, not specialist.** Dispatch does _not_ try to be the email app or the analytics app. When someone asks "summarize last week's signups," Dispatch calls the analytics agent over A2A and returns the answer. When someone asks "draft a reply to Alice," Dispatch calls the mail agent.
|
|
28
28
|
- **Secrets vault.** A central store for API keys, OAuth tokens, and shared credentials. Apps in the workspace resolve secrets from Dispatch instead of duplicating them in every `.env`. Requests + approvals for sensitive access.
|
|
29
|
-
- **Workspace resources.** Global skills, guardrail instructions, custom agent profiles,
|
|
29
|
+
- **Workspace resources.** Global skills, guardrail instructions, custom agent profiles, reference resources, and HTTP MCP servers can be created once in Dispatch. All-app resources are inherited at runtime by every app with no copy or manual sync step; selected grants are for app-specific exceptions.
|
|
30
30
|
- **Reusable integrations.** One place to connect provider accounts, track
|
|
31
31
|
credential refs, and grant apps access. Dispatch owns provider identity and
|
|
32
32
|
app grants; domain apps still own app-specific source choices such as Brain's
|
|
@@ -76,7 +76,8 @@ _How it works under the hood (for developers)._
|
|
|
76
76
|
- **Remote agent registry.** A2A manifests live in `remote-agents/*.json` — one per app. Dispatch calls them using the `call-agent` action. In a multi-app workspace, sibling apps under `apps/` are auto-discovered as A2A peers — no manual registration needed.
|
|
77
77
|
- **Vault schema.** Drizzle tables for secrets, grants, requests, approvals, and audit logs. See `server/db/schema.ts` in the template.
|
|
78
78
|
- **Slack / Telegram plugins.** Server plugins that register webhooks and forward incoming messages to the orchestrator agent.
|
|
79
|
-
- **MCP
|
|
79
|
+
- **Workspace MCP resources.** Add HTTP MCP server definitions under `mcp-servers/*.json` in Resources, then scope them to All apps or selected app grants just like skills and context.
|
|
80
|
+
- **MCP hub mode.** Dispatch can still act as the workspace's [MCP hub](/docs/mcp-clients#hub) so every other app in the workspace pulls the same org-scope MCP server list. Separately, Dispatch's own `/_agent-native/mcp` endpoint is the recommended external MCP connector for Claude, ChatGPT, and other hosts that should reach multiple workspace apps.
|
|
80
81
|
|
|
81
82
|
## Dreams {#dreams}
|
|
82
83
|
|
|
@@ -23,7 +23,7 @@ When you open a deck, you get a slide editor in the middle, a sidebar of slides
|
|
|
23
23
|
|
|
24
24
|
- **Generate decks from a prompt.** "Generate a 10-slide pitch deck for a coffee subscription service, audience is investors."
|
|
25
25
|
- **Edit slides visually** — double-click text to edit, click a block for the bubble menu, use `/` for the slash menu to insert blocks.
|
|
26
|
-
- **Generate images with AI.** Hero images, product mockups, illustrations — preferably delegated to
|
|
26
|
+
- **Generate images with AI.** Hero images, product mockups, illustrations — preferably delegated to Assets, with Builder-managed image generation ready to enable once deployed and direct provider keys as today's fallback.
|
|
27
27
|
- **Search stock photos and company logos.** "Find the logo for stripe.com and add it to slide 2."
|
|
28
28
|
- **Present full-screen** with keyboard navigation, auto-hiding controls, and speaker notes.
|
|
29
29
|
- **Comment, collaborate, and share.** Multiple people can edit the same deck in real time. Generate a public read-only URL or share with specific teammates.
|
|
@@ -86,7 +86,7 @@ Built-in layouts: title, section divider, content with bullets, two-column, imag
|
|
|
86
86
|
|
|
87
87
|
### AI image generation
|
|
88
88
|
|
|
89
|
-
Generate images through the
|
|
89
|
+
Generate images through the Assets app when brand libraries matter; once the managed backend is deployed, that path can use Builder-managed image generation and keep the audit trail with the source library. Direct provider-key generation remains the fallback for standalone decks.
|
|
90
90
|
|
|
91
91
|
Actions: `generate-image`, `edit-image`, `image-search`, `logo-lookup`. UI panels: `ImageGenPanel.tsx`, `ImageSearchPanel.tsx`, `LogoSearchPanel.tsx`.
|
|
92
92
|
|
|
@@ -202,7 +202,7 @@ The [Dispatch](/docs/dispatch) app is the workspace's runtime control plane. It
|
|
|
202
202
|
secrets. Dispatch is the control plane for provider inventory, repair,
|
|
203
203
|
grants, and audit; the vault/secrets layer owns values; each app keeps its
|
|
204
204
|
own source configuration and interpretation.
|
|
205
|
-
- **Workspace resources** — manage global skills, always-on guardrail instructions, reusable agent profiles,
|
|
205
|
+
- **Workspace resources** — manage global skills, always-on guardrail instructions, reusable agent profiles, reference resources, and HTTP MCP servers inherited by apps. Use `AGENTS.md` or `instructions/<slug>.md` for instructions loaded every turn, `skills/<slug>/SKILL.md` for on-demand skills, `context/<slug>.md` for brand/company/product knowledge, and `mcp-servers/<slug>.json` for shared HTTP MCP tool servers. Scope to All apps for workspace defaults; apps read those defaults at runtime with no copy or manual sync step, and app shared or personal resources can override locally. The Resources page highlights the starter global context files, can restore missing starter files, and each app card shows the exact inherited/granted resources that app receives.
|
|
206
206
|
- **Approvals** — require review before runtime changes (destinations, settings) take effect.
|
|
207
207
|
- **Audit** — full history of secret access, grants, syncs, and changes.
|
|
208
208
|
|
|
@@ -264,4 +264,4 @@ For a new workspace, after running `agent-native create`:
|
|
|
264
264
|
- [ ] Configure the approval policy and approver emails
|
|
265
265
|
- [ ] Set up SendGrid (`SENDGRID_API_KEY`, `SENDGRID_FROM_EMAIL`) for admin notifications
|
|
266
266
|
- [ ] Connect Slack or Telegram for workspace messaging
|
|
267
|
-
- [ ] Configure shared MCP servers —
|
|
267
|
+
- [ ] Configure shared MCP servers — add `mcp-servers/<name>.json` workspace resources in Dispatch for All-app or selected-app grants; use `mcp.config.json` or [MCP hub mode](/docs/mcp-clients#hub) for lower-level deployments
|
|
@@ -46,6 +46,7 @@ The **Workspace** tab in the agent sidebar is where you and the agent share pers
|
|
|
46
46
|
| `skills/<name>/SKILL.md` | Focused domain guidance the agent pulls in on demand (invoked with `/` slash commands). |
|
|
47
47
|
| `agents/<name>.md` | **Custom agents** — reusable sub-agent profiles the agent can delegate to (invoked with `@` mentions). |
|
|
48
48
|
| `remote-agents/<name>.json` | A2A manifests for connected remote agents — edited via a form, not raw JSON. |
|
|
49
|
+
| `mcp-servers/<name>.json` | HTTP MCP server definitions that add external tools to the agent. |
|
|
49
50
|
| `jobs/<name>.md` | Scheduled tasks that run on a cron (see the recurring-jobs docs). |
|
|
50
51
|
| `context/<name>.md` | Shared reference material: brand guidelines, personas, positioning, product facts, messaging, etc. |
|
|
51
52
|
| Anything else | Notes, prompts, config, dataset snippets — any text file. |
|
|
@@ -58,7 +59,7 @@ Resources have three runtime scopes:
|
|
|
58
59
|
|
|
59
60
|
- **Personal** — scoped to a single user (their email). Good for preferences, notes, and per-user context.
|
|
60
61
|
- **Shared / organization** — visible to all users in the app or organization. Good for app/team instructions, skills, and shared config.
|
|
61
|
-
- **Workspace** — inherited global defaults managed from Dispatch Resources. Good for company facts, positioning, brand guidelines, global guardrails,
|
|
62
|
+
- **Workspace** — inherited global defaults managed from Dispatch Resources. Good for company facts, positioning, brand guidelines, global guardrails, workspace-wide skills, and shared MCP servers. Apps read these at runtime; they are not copied into each app.
|
|
62
63
|
|
|
63
64
|
The in-app Workspace panel shows all three scopes. Personal and shared/organization resources are editable there. Workspace-scope resources are read-only in app panels and edited centrally from Dispatch, so every app sees the same canonical files without a sync step.
|
|
64
65
|
|
|
@@ -270,14 +271,15 @@ The resource system also seeds a personal `LEARNINGS.md` for compatibility with
|
|
|
270
271
|
|
|
271
272
|
**Where it fits.**
|
|
272
273
|
|
|
273
|
-
| Surface | Scope
|
|
274
|
-
| ------------------ |
|
|
275
|
-
| `AGENTS.md` | Shared
|
|
276
|
-
| `LEARNINGS.md` | Shared
|
|
277
|
-
| `memory/MEMORY.md` | Personal
|
|
278
|
-
| `instructions/…` | Shared
|
|
279
|
-
| `skills/…` | Shared
|
|
280
|
-
| `context/…` | Shared
|
|
274
|
+
| Surface | Scope | Written by | Read when |
|
|
275
|
+
| ------------------ | ------------------ | ------------------------------------ | -------------------------------------- |
|
|
276
|
+
| `AGENTS.md` | Shared | Humans / agent on request | Every turn |
|
|
277
|
+
| `LEARNINGS.md` | Shared | Humans / agent on request | Every turn |
|
|
278
|
+
| `memory/MEMORY.md` | Personal | Agent / humans | Every turn |
|
|
279
|
+
| `instructions/…` | Shared | Humans / agent on request | Every turn |
|
|
280
|
+
| `skills/…` | Shared | Humans / agent on request | On demand (`/slash` command) |
|
|
281
|
+
| `context/…` | Shared | Humans / agent on request | Indexed every turn, read when relevant |
|
|
282
|
+
| `mcp-servers/…` | Workspace / shared | Humans via Dispatch or app workspace | MCP config refresh |
|
|
281
283
|
|
|
282
284
|
Users can edit these memory files directly in the Workspace tab — they're regular resources. Delete lines the agent got wrong, keep personal preferences in `memory/MEMORY.md`, or promote team-wide rules into `AGENTS.md`.
|
|
283
285
|
|
package/package.json
CHANGED
|
@@ -6,12 +6,19 @@ This is an **@agent-native/core** application -- the AI agent and UI share state
|
|
|
6
6
|
|
|
7
7
|
### Core Principles
|
|
8
8
|
|
|
9
|
-
1. **Shared SQL database** -- All app state lives in SQL
|
|
9
|
+
1. **Shared SQL database** -- All app state lives in SQL. Local SQLite at `data/app.db` is the zero-setup dev fallback; deployed apps need a persistent `DATABASE_URL` so data survives container/serverless restarts. Turso is optional, not required: Neon, Supabase, Turso/libSQL, plain Postgres, durable SQLite, D1 bindings, and Builder.io-managed environments are all valid when supported by the deploy. Core stores: `application_state`, `settings`, `oauth_tokens`, `sessions`, `resources`.
|
|
10
10
|
2. **All AI through agent chat** -- No inline LLM calls. UI delegates to the AI via `sendToAgentChat()` / `agentChat.submit()`.
|
|
11
11
|
3. **Actions for agent operations** -- `pnpm action <name>` dispatches to callable action files in `actions/`.
|
|
12
12
|
4. **Live sync keeps the UI current** -- Database writes stream over `/_agent-native/events` first, with `/_agent-native/poll` as the fallback. **When you (the agent) write data, the UI must reflect the change without a manual refresh.** This is non-negotiable. Use `useActionQuery` / `useActionMutation` for action-backed data (preferred). If you use raw `useQuery`, fold `useChangeVersions([<source>, "action"])` into the key for targeted refreshes. See the `real-time-sync` and `adding-a-feature` skills.
|
|
13
13
|
5. **Agent can update code** -- The agent can modify this app's source code directly.
|
|
14
14
|
|
|
15
|
+
### Database Code
|
|
16
|
+
|
|
17
|
+
- Define tables with `@agent-native/core/db/schema` helpers (`table`, `text`, `integer`, `real`, `now`, sharing helpers), never `drizzle-orm/sqlite-core` or `drizzle-orm/pg-core`.
|
|
18
|
+
- Use Drizzle's query builder (`db.select`, `db.insert`, `db.update`, `db.delete`) plus portable operators from `drizzle-orm` (`eq`, `and`, `or`, `inArray`, `desc`, etc.) for app reads and writes.
|
|
19
|
+
- Keep raw SQL out of normal actions, handlers, and stores. Use it only for additive migrations, health checks, or last-resort maintenance, and keep it parameterized and dialect-agnostic.
|
|
20
|
+
- Do not write SQLite-only or Postgres-only syntax in product code. The same app should run on SQLite, Postgres, libSQL/Turso, D1, and other supported Drizzle backends.
|
|
21
|
+
|
|
15
22
|
### Authentication
|
|
16
23
|
|
|
17
24
|
Auth is automatic and environment-driven:
|
|
@@ -77,12 +84,13 @@ You do NOT get auto-injected screen state. **Call `pnpm action view-screen` at t
|
|
|
77
84
|
| `hello` | `[--name <name>]` | Example script |
|
|
78
85
|
| `db-schema` | | Show all tables, columns, types |
|
|
79
86
|
| `db-query` | `--sql "SELECT ..."` | Run a SELECT query |
|
|
80
|
-
| `db-exec` | `--sql "
|
|
87
|
+
| `db-exec` | `--sql "UPDATE ..."` | Last-resort ad-hoc maintenance; prefer domain actions and Drizzle code for product work |
|
|
81
88
|
| `db-patch` | `--table <t> --column <c> --where "<clause>" --find "<old>" --replace "<new>"` | Surgical search/replace on a large text column — sends a diff instead of the full value |
|
|
82
89
|
|
|
83
|
-
**
|
|
90
|
+
**For one-off maintenance, pick the right SQL tool:**
|
|
84
91
|
|
|
85
|
-
- Use
|
|
92
|
+
- Use domain actions first. They validate input, enforce access, and refresh the UI.
|
|
93
|
+
- Use `db-exec UPDATE` only when no domain action exists and you need a small ad-hoc change.
|
|
86
94
|
- Use `db-patch` when you only need to tweak a small slice of a **large** text/JSON column (documents, slide HTML, dashboard/form JSON). It saves tokens by sending `{find, replace}` instead of re-transmitting the whole column. Targets exactly one row per call — narrow `--where` by primary key. Supports `--edits '[{find,replace},...]'` for batch edits and `--all` for replace-every-occurrence.
|
|
87
95
|
- If a template-specific action exists (e.g. `edit-document`, `update-slide`), prefer it — those also push live updates to any open collaborative editor.
|
|
88
96
|
|
|
@@ -110,12 +110,14 @@ agentChat.submit("Generate something");
|
|
|
110
110
|
|
|
111
111
|
## Database
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
Local development defaults to a SQLite file at `data/app.db`. That local file is for development; containers, previews, and serverless deploys can reset their filesystem. For production/cloud deployment, set `DATABASE_URL` to point to a persistent SQL database. Turso is optional, not required; common choices include Neon, Supabase, Turso/libSQL, plain Postgres, durable SQLite, D1 bindings, and Builder.io-managed environments when available.
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
|
118
|
-
|
|
|
115
|
+
When adding app data, define tables with `@agent-native/core/db/schema` helpers and use Drizzle's query builder for reads/writes. Do not import dialect-specific schema helpers from `drizzle-orm/sqlite-core` or `drizzle-orm/pg-core`, and do not write raw SQL in normal actions or handlers when Drizzle can express the query. Raw SQL belongs in additive migrations, health checks, or carefully scoped maintenance.
|
|
116
|
+
|
|
117
|
+
| Variable | Required | Description |
|
|
118
|
+
| --------------------- | ------------------------------- | -------------------------------------------------------------------------- |
|
|
119
|
+
| `DATABASE_URL` | Production yes, local dev no | Persistent SQL connection string (local dev default: `file:./data/app.db`) |
|
|
120
|
+
| `DATABASE_AUTH_TOKEN` | Only when the provider needs it | Auth token for providers such as Turso/libSQL |
|
|
119
121
|
|
|
120
122
|
## Tech Stack
|
|
121
123
|
|
|
@@ -77,6 +77,13 @@ the same data unless the route is for uploads, streaming, webhooks, OAuth, or
|
|
|
77
77
|
another route-only concern. Action-backed UI is what makes agent-created or
|
|
78
78
|
agent-edited records appear without a manual refresh.
|
|
79
79
|
|
|
80
|
+
App database code must be provider-agnostic. Define schemas with
|
|
81
|
+
`@agent-native/core/db/schema` helpers and write app reads/writes with Drizzle's
|
|
82
|
+
query builder and portable `drizzle-orm` operators. Do not import from
|
|
83
|
+
`drizzle-orm/sqlite-core` or `drizzle-orm/pg-core` in app templates. Keep raw SQL
|
|
84
|
+
for additive migrations, health checks, or carefully scoped maintenance, and
|
|
85
|
+
never write SQLite-only or Postgres-only product code.
|
|
86
|
+
|
|
80
87
|
In local development, run
|
|
81
88
|
`pnpm exec agent-native create <app-name> --template=<template>` from the
|
|
82
89
|
workspace root. In production, Dispatch posts new-app requests to Builder
|
|
@@ -102,6 +102,12 @@ coding agents can discover the same workspace-wide guidance from the root.
|
|
|
102
102
|
for the same data unless the route is for uploads, streaming, webhooks,
|
|
103
103
|
OAuth, or another route-only concern. Action-backed UI is what makes
|
|
104
104
|
agent-created or agent-edited records appear without a manual refresh.
|
|
105
|
+
- App database code must be provider-agnostic. Define schemas with
|
|
106
|
+
`@agent-native/core/db/schema` helpers and write app reads/writes with
|
|
107
|
+
Drizzle's query builder and portable `drizzle-orm` operators. Do not import
|
|
108
|
+
from `drizzle-orm/sqlite-core` or `drizzle-orm/pg-core` in app templates.
|
|
109
|
+
Keep raw SQL for additive migrations, health checks, or carefully scoped
|
|
110
|
+
maintenance, and never write SQLite-only or Postgres-only product code.
|
|
105
111
|
- In local development, scaffold the app from the workspace root with
|
|
106
112
|
`pnpm exec agent-native create <app-id> --template=<template>`. In production
|
|
107
113
|
Dispatch posts the request to Builder branch creation; the Builder branch
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Images"
|
|
3
|
-
description: "An agent-native image library and cross-agent image service for brand-consistent AI imagery."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Images
|
|
7
|
-
|
|
8
|
-
Images is an agent-native workspace for creating brand-consistent AI imagery. It organizes references into flat Libraries, lets teams upload examples for blog heroes, diagrams, landing pages, product shots, and logos, then routes generation through the agent chat so every image can be reviewed and refined.
|
|
9
|
-
|
|
10
|
-
Use it when your team needs reusable visual direction instead of one-off generic image prompts.
|
|
11
|
-
|
|
12
|
-
## What You Can Do With It
|
|
13
|
-
|
|
14
|
-
- **Create image libraries.** Group reference images, canonical logos, style notes, palettes, and generated output by brand, campaign, product, or image category.
|
|
15
|
-
- **Generate through chat.** The home composer and library Generate controls send the prompt to the agent with `sendToAgentChat()`, so users can inspect variants, give feedback, and iterate.
|
|
16
|
-
- **Use Builder-managed generation when enabled.** The Builder-managed path is wired behind `BUILDER_IMAGE_GENERATION_ENABLED=true`; until that backend is deployed, a Gemini API key is the manual fallback.
|
|
17
|
-
- **Upload references.** Add image examples from the library UI or the prompt composer attachment button, then tag them as hero, landing, product, logo, diagram, style-only, or other.
|
|
18
|
-
- **Keep a generation audit log.** Every run records prompts, model, aspect ratio, references, source asset, lineage, generated assets, status, errors, and timestamps for later design review.
|
|
19
|
-
- **Preserve logo accuracy.** The agent can generate a placeholder area and the server composites the uploaded canonical logo onto the final image instead of relying on the image model to redraw it.
|
|
20
|
-
- **Serve other agents.** Slides, Design, Content, Mail, and Dispatch can call Images through A2A to list libraries, generate batches, refine an asset, fetch exports, and render inline previews where embedding is allowed.
|
|
21
|
-
|
|
22
|
-
## Why It's Interesting
|
|
23
|
-
|
|
24
|
-
Most AI image tools treat brand consistency as a prompt-writing problem. Images treats it as application state: references, collections, style briefs, run history, and saved assets live in SQL, while image bytes live in object storage or the local file-upload fallback during development.
|
|
25
|
-
|
|
26
|
-
Because generation is an action and a chat workflow, the UI and the agent share the same operations. A user can start from the big prompt box, a library detail page, another app's chat, or an A2A request from Slides, and the same audit and lineage model is preserved. Once enabled, the provider path prefers Builder-managed image generation so teams do not need to paste model-provider keys into every app.
|
|
27
|
-
|
|
28
|
-
## For Developers
|
|
29
|
-
|
|
30
|
-
The rest of this doc is for anyone forking the Images template or extending it.
|
|
31
|
-
|
|
32
|
-
### Scaffolding
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
pnpm dlx @agent-native/core create my-images --template images --standalone
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Customize It
|
|
39
|
-
|
|
40
|
-
Images is a complete, cloneable template. Some practical extension ideas:
|
|
41
|
-
|
|
42
|
-
- "Add a product catalog connector so product reference shots can be selected by SKU."
|
|
43
|
-
- "Add a strict approval queue before generated images are marked usable for marketing."
|
|
44
|
-
- "Add a brand review dashboard that filters failed or low-rated generations by model."
|
|
45
|
-
- "Create a workspace-wide default image library and route Slides image generation through it."
|
|
46
|
-
- "Add a new provider behind the image generation interface after checking the latest provider docs."
|
|
47
|
-
|
|
48
|
-
The agent edits routes, components, actions, skills, and SQL-backed models as needed. See [Templates](/docs/cloneable-saas) for the full clone, customize, deploy flow, and [A2A Protocol](/docs/a2a-protocol) for cross-app generation.
|
|
49
|
-
|
|
50
|
-
## What's Next
|
|
51
|
-
|
|
52
|
-
- [**Templates**](/docs/cloneable-saas) — the clone-and-own model
|
|
53
|
-
- [**A2A Protocol**](/docs/a2a-protocol) — how other apps call Images
|
|
54
|
-
- [**File Uploads**](/docs/file-uploads) — storage and authenticated asset serving
|
|
55
|
-
- [**Sharing & Privacy**](/docs/sharing) — library-level access control
|