@agent-native/core 0.26.8 → 0.27.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/run-ownership.d.ts +12 -0
- package/dist/agent/run-ownership.d.ts.map +1 -0
- package/dist/agent/run-ownership.js +39 -0
- package/dist/agent/run-ownership.js.map +1 -0
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +108 -3
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/db-admin/DataGrid.d.ts +42 -0
- package/dist/client/db-admin/DataGrid.d.ts.map +1 -0
- package/dist/client/db-admin/DataGrid.js +204 -0
- package/dist/client/db-admin/DataGrid.js.map +1 -0
- package/dist/client/db-admin/DbAdminPage.d.ts +2 -0
- package/dist/client/db-admin/DbAdminPage.d.ts.map +1 -0
- package/dist/client/db-admin/DbAdminPage.js +72 -0
- package/dist/client/db-admin/DbAdminPage.js.map +1 -0
- package/dist/client/db-admin/DevDatabaseLink.d.ts +19 -0
- package/dist/client/db-admin/DevDatabaseLink.d.ts.map +1 -0
- package/dist/client/db-admin/DevDatabaseLink.js +25 -0
- package/dist/client/db-admin/DevDatabaseLink.js.map +1 -0
- package/dist/client/db-admin/EditableCell.d.ts +26 -0
- package/dist/client/db-admin/EditableCell.d.ts.map +1 -0
- package/dist/client/db-admin/EditableCell.js +150 -0
- package/dist/client/db-admin/EditableCell.js.map +1 -0
- package/dist/client/db-admin/FilterBar.d.ts +8 -0
- package/dist/client/db-admin/FilterBar.d.ts.map +1 -0
- package/dist/client/db-admin/FilterBar.js +68 -0
- package/dist/client/db-admin/FilterBar.js.map +1 -0
- package/dist/client/db-admin/ResultsGrid.d.ts +6 -0
- package/dist/client/db-admin/ResultsGrid.d.ts.map +1 -0
- package/dist/client/db-admin/ResultsGrid.js +41 -0
- package/dist/client/db-admin/ResultsGrid.js.map +1 -0
- package/dist/client/db-admin/RowSidePanel.d.ts +18 -0
- package/dist/client/db-admin/RowSidePanel.d.ts.map +1 -0
- package/dist/client/db-admin/RowSidePanel.js +104 -0
- package/dist/client/db-admin/RowSidePanel.js.map +1 -0
- package/dist/client/db-admin/SqlEditor.d.ts +8 -0
- package/dist/client/db-admin/SqlEditor.d.ts.map +1 -0
- package/dist/client/db-admin/SqlEditor.js +350 -0
- package/dist/client/db-admin/SqlEditor.js.map +1 -0
- package/dist/client/db-admin/TableBrowser.d.ts +10 -0
- package/dist/client/db-admin/TableBrowser.d.ts.map +1 -0
- package/dist/client/db-admin/TableBrowser.js +61 -0
- package/dist/client/db-admin/TableBrowser.js.map +1 -0
- package/dist/client/db-admin/TableEditor.d.ts +9 -0
- package/dist/client/db-admin/TableEditor.d.ts.map +1 -0
- package/dist/client/db-admin/TableEditor.js +254 -0
- package/dist/client/db-admin/TableEditor.js.map +1 -0
- package/dist/client/db-admin/cell-format.d.ts +55 -0
- package/dist/client/db-admin/cell-format.d.ts.map +1 -0
- package/dist/client/db-admin/cell-format.js +223 -0
- package/dist/client/db-admin/cell-format.js.map +1 -0
- package/dist/client/db-admin/changeset.d.ts +74 -0
- package/dist/client/db-admin/changeset.d.ts.map +1 -0
- package/dist/client/db-admin/changeset.js +169 -0
- package/dist/client/db-admin/changeset.js.map +1 -0
- package/dist/client/db-admin/export-utils.d.ts +15 -0
- package/dist/client/db-admin/export-utils.d.ts.map +1 -0
- package/dist/client/db-admin/export-utils.js +62 -0
- package/dist/client/db-admin/export-utils.js.map +1 -0
- package/dist/client/db-admin/index.d.ts +7 -0
- package/dist/client/db-admin/index.d.ts.map +1 -0
- package/dist/client/db-admin/index.js +8 -0
- package/dist/client/db-admin/index.js.map +1 -0
- package/dist/client/db-admin/sql-storage.d.ts +35 -0
- package/dist/client/db-admin/sql-storage.d.ts.map +1 -0
- package/dist/client/db-admin/sql-storage.js +117 -0
- package/dist/client/db-admin/sql-storage.js.map +1 -0
- package/dist/client/db-admin/storage.d.ts +24 -0
- package/dist/client/db-admin/storage.d.ts.map +1 -0
- package/dist/client/db-admin/storage.js +50 -0
- package/dist/client/db-admin/storage.js.map +1 -0
- package/dist/client/db-admin/useAgentSync.d.ts +22 -0
- package/dist/client/db-admin/useAgentSync.d.ts.map +1 -0
- package/dist/client/db-admin/useAgentSync.js +120 -0
- package/dist/client/db-admin/useAgentSync.js.map +1 -0
- package/dist/client/db-admin/useDbAdmin.d.ts +20 -0
- package/dist/client/db-admin/useDbAdmin.d.ts.map +1 -0
- package/dist/client/db-admin/useDbAdmin.js +154 -0
- package/dist/client/db-admin/useDbAdmin.js.map +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/credentials/index.d.ts.map +1 -1
- package/dist/credentials/index.js +25 -5
- package/dist/credentials/index.js.map +1 -1
- package/dist/db-admin/agent-tools.d.ts +15 -0
- package/dist/db-admin/agent-tools.d.ts.map +1 -0
- package/dist/db-admin/agent-tools.js +147 -0
- package/dist/db-admin/agent-tools.js.map +1 -0
- package/dist/db-admin/operations.d.ts +17 -0
- package/dist/db-admin/operations.d.ts.map +1 -0
- package/dist/db-admin/operations.js +541 -0
- package/dist/db-admin/operations.js.map +1 -0
- package/dist/db-admin/routes.d.ts +5 -0
- package/dist/db-admin/routes.d.ts.map +1 -0
- package/dist/db-admin/routes.js +134 -0
- package/dist/db-admin/routes.js.map +1 -0
- package/dist/db-admin/types.d.ts +85 -0
- package/dist/db-admin/types.d.ts.map +1 -0
- package/dist/db-admin/types.js +9 -0
- package/dist/db-admin/types.js.map +1 -0
- package/dist/extensions/url-safety.d.ts +20 -0
- package/dist/extensions/url-safety.d.ts.map +1 -1
- package/dist/extensions/url-safety.js +43 -0
- package/dist/extensions/url-safety.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts.map +1 -1
- package/dist/file-upload/actions/upload-image.js +6 -1
- package/dist/file-upload/actions/upload-image.js.map +1 -1
- package/dist/integrations/adapters/email.d.ts.map +1 -1
- package/dist/integrations/adapters/email.js +112 -0
- package/dist/integrations/adapters/email.js.map +1 -1
- package/dist/integrations/types.d.ts +11 -0
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/scripts/db/exec.d.ts.map +1 -1
- package/dist/scripts/db/exec.js +2 -1
- package/dist/scripts/db/exec.js.map +1 -1
- package/dist/scripts/db/index.d.ts.map +1 -1
- package/dist/scripts/db/index.js +1 -0
- package/dist/scripts/db/index.js.map +1 -1
- package/dist/scripts/db/migrate-encrypt-credentials.d.ts +28 -0
- package/dist/scripts/db/migrate-encrypt-credentials.d.ts.map +1 -0
- package/dist/scripts/db/migrate-encrypt-credentials.js +190 -0
- package/dist/scripts/db/migrate-encrypt-credentials.js.map +1 -0
- package/dist/scripts/db/query.d.ts.map +1 -1
- package/dist/scripts/db/query.js +2 -1
- package/dist/scripts/db/query.js.map +1 -1
- package/dist/scripts/db/safety.d.ts +1 -0
- package/dist/scripts/db/safety.d.ts.map +1 -1
- package/dist/scripts/db/safety.js +32 -0
- package/dist/scripts/db/safety.js.map +1 -1
- package/dist/scripts/db/scoping.d.ts.map +1 -1
- package/dist/scripts/db/scoping.js +11 -1
- package/dist/scripts/db/scoping.js.map +1 -1
- package/dist/secrets/crypto.d.ts +28 -0
- package/dist/secrets/crypto.d.ts.map +1 -0
- package/dist/secrets/crypto.js +81 -0
- package/dist/secrets/crypto.js.map +1 -0
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +3 -61
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +5 -2
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +24 -7
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +39 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js.map +1 -1
- package/dist/server/better-auth-instance.js +3 -3
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +5 -0
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/csrf.js +9 -1
- package/dist/server/csrf.js.map +1 -1
- package/dist/server/design-token-utils.d.ts +8 -1
- package/dist/server/design-token-utils.d.ts.map +1 -1
- package/dist/server/design-token-utils.js +12 -4
- package/dist/server/design-token-utils.js.map +1 -1
- package/dist/templates/default/AGENTS.md +4 -4
- package/dist/templates/default/app/routes/database.tsx +13 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +9 -2
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +7 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +4 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/a2a-protocol.md +2 -2
- package/docs/content/actions.md +2 -54
- package/docs/content/agent-mentions.md +1 -1
- package/docs/content/agent-teams.md +1 -1
- package/docs/content/authentication.md +2 -2
- package/docs/content/cli-adapters.md +33 -17
- package/docs/content/client.md +11 -20
- package/docs/content/code-agents-ui.md +19 -6
- package/docs/content/context-awareness.md +36 -20
- package/docs/content/database.md +3 -3
- package/docs/content/deployment.md +8 -8
- package/docs/content/dispatch.md +1 -1
- package/docs/content/external-agents.md +5 -1
- package/docs/content/faq.md +1 -0
- package/docs/content/frames.md +110 -30
- package/docs/content/getting-started.md +15 -14
- package/docs/content/mcp-clients.md +1 -1
- package/docs/content/mcp-protocol.md +11 -88
- package/docs/content/messaging.md +1 -1
- package/docs/content/migration-workbench.md +13 -87
- package/docs/content/multi-app-workspace.md +2 -38
- package/docs/content/multi-tenancy.md +3 -26
- package/docs/content/onboarding.md +10 -3
- package/docs/content/recurring-jobs.md +2 -2
- package/docs/content/security.md +33 -1
- package/docs/content/server.md +1 -1
- package/docs/content/skills-guide.md +7 -4
- package/docs/content/template-assets.md +9 -9
- package/docs/content/template-brain.md +114 -388
- package/docs/content/template-clips.md +42 -2
- package/docs/content/template-content.md +1 -1
- package/docs/content/template-design.md +38 -0
- package/docs/content/template-dispatch.md +3 -3
- package/docs/content/template-forms.md +6 -6
- package/docs/content/template-starter.md +2 -2
- package/docs/content/using-your-agent.md +56 -0
- package/docs/content/workspace-management.md +6 -6
- package/docs/content/workspace.md +19 -0
- package/package.json +10 -3
- package/src/templates/default/AGENTS.md +4 -4
- package/src/templates/default/app/routes/database.tsx +13 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +9 -2
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +7 -1
|
@@ -22,6 +22,17 @@ Use it when you want a polished landing page concept, product UI direction, bran
|
|
|
22
22
|
4. **Export when it is useful.** Download HTML, ZIP, or PDF once the prototype
|
|
23
23
|
is ready to hand to another tool or teammate.
|
|
24
24
|
|
|
25
|
+
For Codex, Claude Code, and other local agent clients, the hosted Design app can
|
|
26
|
+
be installed as an app-backed skill plus MCP connector:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @agent-native/core@latest skills add design-exploration
|
|
30
|
+
```
|
|
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.
|
|
35
|
+
|
|
25
36
|
## Useful Prompts
|
|
26
37
|
|
|
27
38
|
- "Create three landing-page directions for a technical analytics product."
|
|
@@ -55,6 +66,33 @@ The rest of this doc is for anyone forking the Design template or extending it.
|
|
|
55
66
|
pnpm dlx @agent-native/core create my-design --template design --standalone
|
|
56
67
|
```
|
|
57
68
|
|
|
69
|
+
### Data Model
|
|
70
|
+
|
|
71
|
+
All data lives in SQL via Drizzle ORM. Schema: `templates/design/server/db/schema.ts`. Designs and design systems carry the standard `ownableColumns` and a matching framework shares table, so they slot into the per-user / per-org sharing model.
|
|
72
|
+
|
|
73
|
+
| Table | What it holds |
|
|
74
|
+
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
75
|
+
| `designs` | A design project — `title`, `description`, `project_type` (`prototype` / `other`), the `data` JSON blob, and an optional `design_system_id` link |
|
|
76
|
+
| `design_files` | Individual files belonging to a design (`filename`, `content`, `file_type` defaulting to `html`) |
|
|
77
|
+
| `design_versions` | Point-in-time `snapshot`s of a design with an optional `label`, for history and rollback |
|
|
78
|
+
| `design_systems` | Reusable brand tokens — `data` (colors/typography/spacing), `assets`, `custom_instructions`, and an `is_default` flag |
|
|
79
|
+
| `design_shares` / `design_system_shares` | Framework shares tables mapping principals (users or orgs) to roles (viewer, editor, admin) |
|
|
80
|
+
|
|
81
|
+
A design project is a shell until it has content: `create-design` makes an empty row (`data: "{}"`), then `generate-design` writes the actual standalone HTML/JSX files. The generated artifact, the editable source, and every export all come from the same HTML, so there is no separate "AI mockup" format to translate. A linked design system supplies tokens and `custom_instructions` that the agent honors on every generation pass.
|
|
82
|
+
|
|
83
|
+
Routes in the UI live under `templates/design/app/routes/`: `_index.tsx` (list), `design.$id.tsx` (editor), `present.$id.tsx` (presentation), `design-systems.tsx` and `design-systems_.setup.tsx`, `templates.tsx`, `examples.tsx`, plus `settings.tsx` and `team.tsx`.
|
|
84
|
+
|
|
85
|
+
### Key Actions
|
|
86
|
+
|
|
87
|
+
Every agent-callable operation is a TypeScript file in `templates/design/actions/`, auto-mounted at `POST /_agent-native/actions/:name` and runnable from the CLI as `pnpm action <name>`. The groupings:
|
|
88
|
+
|
|
89
|
+
- **Designs** — `create-design` (empty shell), `generate-design` (write generated HTML/JSX content), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design`, and `apply-tweaks` for persisting live tweak-knob values (accent color, density, etc.).
|
|
90
|
+
- **Files** — `create-file`, `update-file`, `list-files`, `delete-file` for the files inside a design project.
|
|
91
|
+
- **Design systems** — `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system`, and `analyze-brand-assets` for gathering brand data ahead of analysis.
|
|
92
|
+
- **Import** — `import-code`, `import-figma`, `import-github`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` to lift a design system out of an existing project.
|
|
93
|
+
- **Export & handoff** — `export-html`, `export-pdf`, `export-svg`, `export-zip`, and `export-coding-handoff` to turn a design into a coding-tool handoff.
|
|
94
|
+
- **Context & navigation** — `view-screen` (current design, open file, view, pending question or variant grid), `get-design-snapshot` (current state for an external agent to continue from), and `navigate`.
|
|
95
|
+
|
|
58
96
|
### Customize It
|
|
59
97
|
|
|
60
98
|
Design is a complete, cloneable template. Some practical extension ideas:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Dispatch
|
|
2
|
+
title: "Dispatch"
|
|
3
3
|
description: "Dispatch is the workspace control plane — central inbox, cross-app orchestration, secrets vault, Slack/Telegram integration, and scheduled jobs."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -73,7 +73,7 @@ Day-to-day, Dispatch is the place admins and ops folks open to keep the workspac
|
|
|
73
73
|
_How it works under the hood (for developers)._
|
|
74
74
|
|
|
75
75
|
- **Orchestrator agent.** The chat is set up as a router: it reads `AGENTS.md`, `LEARNINGS.md`, and routes to specialist sub-agents or remote A2A agents.
|
|
76
|
-
- **Remote agent registry.** A2A manifests
|
|
76
|
+
- **Remote agent registry.** A2A agent manifests are workspace-runtime entries (not a checked-in template source folder): in a multi-app workspace, sibling apps under `apps/` are auto-discovered as A2A peers — no manual registration needed. Dispatch calls them using the `call-agent` action.
|
|
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
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.
|
|
@@ -89,7 +89,7 @@ When Dispatch approval policy is enabled, applying a shared or team-wide dream p
|
|
|
89
89
|
|
|
90
90
|
Use Dreams when you want to answer questions like "what did agents keep getting wrong this week?", "what should we remember?", or "which repeated lesson deserves a skill?" Inbound Slack, email, Telegram, WhatsApp, and web-derived evidence is treated as untrusted input, so proposals from those sources require review and provenance before they affect shared memory. Workspace-instruction proposals require durable evidence spanning at least two threads or two source apps; eval-only noise, account setup issues, quota limits, and single-app UI wording corrections stay out of global instructions.
|
|
91
91
|
|
|
92
|
-
### Dream
|
|
92
|
+
### Dream input validation boundaries
|
|
93
93
|
|
|
94
94
|
Because evidence is collected from external, untrusted sources (such as chat transcripts, webhooks, and third-party integrations), the Dream processor enforces strict input validation boundaries to prevent prompt injection and payload-size attacks:
|
|
95
95
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Forms
|
|
2
|
+
title: "Forms"
|
|
3
3
|
description: "Agent-native form builder — create, edit, publish, and route form submissions through natural language plus a visual editor."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -28,7 +28,7 @@ When you open the app, you see your forms, the current editor, and a live previe
|
|
|
28
28
|
- **Route submissions.** Send submission payloads to webhooks, Slack, Discord, or Google Sheets using the built-in integrations.
|
|
29
29
|
- **Publish public forms.** Share a public form URL and show a thank-you message after submission.
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Getting started
|
|
32
32
|
|
|
33
33
|
1. **Create a form from a prompt.** Ask for the form you want, including the
|
|
34
34
|
audience and what should happen after submission.
|
|
@@ -39,7 +39,7 @@ When you open the app, you see your forms, the current editor, and a live previe
|
|
|
39
39
|
4. **Connect destinations.** Route new submissions to Slack, Discord, Google
|
|
40
40
|
Sheets, webhooks, or your own extension point.
|
|
41
41
|
|
|
42
|
-
## Useful
|
|
42
|
+
## Useful prompts
|
|
43
43
|
|
|
44
44
|
- "Create a beta signup form with role, team size, and priority use case."
|
|
45
45
|
- "Add a required NPS question and a free-text follow-up."
|
|
@@ -53,7 +53,7 @@ The useful part of an agent-native form builder is that setup and iteration happ
|
|
|
53
53
|
|
|
54
54
|
See [What is agent-native?](/docs/what-is-agent-native) for the broader framework model.
|
|
55
55
|
|
|
56
|
-
## For
|
|
56
|
+
## For developers
|
|
57
57
|
|
|
58
58
|
### Scaffolding
|
|
59
59
|
|
|
@@ -69,7 +69,7 @@ pnpm dlx @agent-native/core create my-platform
|
|
|
69
69
|
|
|
70
70
|
Pick Forms and any other templates you want during the workspace setup.
|
|
71
71
|
|
|
72
|
-
###
|
|
72
|
+
### Customizing it
|
|
73
73
|
|
|
74
74
|
Ask the agent for shipped behavior first:
|
|
75
75
|
|
|
@@ -81,7 +81,7 @@ Ask the agent for shipped behavior first:
|
|
|
81
81
|
|
|
82
82
|
If you need new capabilities such as file uploads, signatures, or custom field widgets, treat them as template extensions: add the SQL shape, actions, UI editor controls, public renderer support, and agent instructions together. See [Creating Templates](/docs/creating-templates) for the current build pattern.
|
|
83
83
|
|
|
84
|
-
## What's
|
|
84
|
+
## What's next
|
|
85
85
|
|
|
86
86
|
- [**Templates**](/docs/cloneable-saas) — the clone-and-own model
|
|
87
87
|
- [**Actions**](/docs/actions) — the action system powering the builder
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Starter
|
|
2
|
+
title: "Starter"
|
|
3
3
|
description: "The minimal agent-native scaffold — agent chat, actions, application state, live sync, auth — wired up, with no domain code. Build from scratch."
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ Pick Starter when you're not sure which domain template fits, or when you want t
|
|
|
24
24
|
- **Agent sidebar** (`<AgentSidebar>`) wired into `app/root.tsx`. Chat, CLI, workspace tabs all present.
|
|
25
25
|
- **Agent chat plugin** pre-configured so the chat actually talks to Claude (once `ANTHROPIC_API_KEY` is set).
|
|
26
26
|
- **Auth** via Better Auth — login, signup, sessions, organizations. The same flow runs locally and in production; in development email verification is skipped so signup is just an email + password.
|
|
27
|
-
- **Actions directory** with one example (`actions/hello
|
|
27
|
+
- **Actions directory** with one example (`actions/hello.ts`) and the `view-screen` / `navigate` standard actions wired up.
|
|
28
28
|
- **Drizzle schema** with the framework's core tables (application_state, settings, oauth_tokens, sessions, resources).
|
|
29
29
|
- **Live sync** (`useDbSync`) already wired so UI auto-refreshes when the agent writes to the database.
|
|
30
30
|
- **AGENTS.md** with the framework-wide rules the agent reads on every turn.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Using Your Agent"
|
|
3
|
+
description: "The day-to-day loop of working with the agent: it sees what you're looking at, you direct it, embed it, go UI-light, and co-edit alongside it."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Using Your Agent
|
|
7
|
+
|
|
8
|
+
The defining idea behind agent-native is that the agent and the UI are **equal partners** — see [What Is Agent-Native?](/docs/what-is-agent-native) for the why. This section is about the other half of that promise: what it feels like to actually work with the agent once it's docked next to your app.
|
|
9
|
+
|
|
10
|
+
There's a simple through-line. The agent **sees** what you're looking at, you **direct** it toward what you want, you can **embed** it anywhere, you can go fully **UI-light** when that's the better fit, and you can **co-edit** the same documents at the same time. Each of those is a page in this section.
|
|
11
|
+
|
|
12
|
+
## It sees what you're looking at {#it-sees}
|
|
13
|
+
|
|
14
|
+
The agent isn't blind to your screen. Open an email and it knows which thread. Select a chart and it knows which chart. Highlight a paragraph and it can act on just that range. That shared awareness is what lets you say "reply to this" or "summarize the selection" without spelling out the context every time.
|
|
15
|
+
|
|
16
|
+
This works because the current navigation and selection live in `application_state` SQL, which the agent reads as part of its context. The agent can also drive that same state back — opening a view, selecting a row — so you watch it work in the real UI rather than in a transcript.
|
|
17
|
+
|
|
18
|
+
→ [**Context Awareness**](/docs/context-awareness) — navigation state, view-screen, navigate commands, and how the agent stays in sync with your screen.
|
|
19
|
+
|
|
20
|
+
## You direct it {#you-direct-it}
|
|
21
|
+
|
|
22
|
+
Most of the time you steer the agent by typing into the chat. Two things make that faster.
|
|
23
|
+
|
|
24
|
+
**Mentions.** Tag a custom agent, a connected agent, or a file with `@` to pull it into the conversation — "let `@analytics` pull last week's numbers, then draft the summary." Mentions are how you reach the right specialist or attach the right context without leaving the composer.
|
|
25
|
+
|
|
26
|
+
**Voice.** The composer has a microphone. Dictate a request instead of typing it, with provider options ranging from Builder's hosted transcription to bring-your-own-key to a browser fallback.
|
|
27
|
+
|
|
28
|
+
→ [**Agent Mentions**](/docs/agent-mentions) — `@`-mention custom agents, connected agents, and files in chat.
|
|
29
|
+
→ [**Voice Input**](/docs/voice-input) — dictation in the chat composer and how transcription is routed.
|
|
30
|
+
|
|
31
|
+
## You embed it {#you-embed-it}
|
|
32
|
+
|
|
33
|
+
The agent isn't a separate app you tab over to. It ships as a handful of React components — a sidebar, a raw panel, and a `sendToAgentChat()` call — that you drop into any app. Render `<AgentSidebar>` to give every screen a toggleable agent, or wire a button to hand a specific task off to the chat instead of running a one-shot LLM call.
|
|
34
|
+
|
|
35
|
+
→ [**Drop-in Agent**](/docs/drop-in-agent) — mount `<AgentPanel>`, `<AgentSidebar>`, and `sendToAgentChat()` into any React app.
|
|
36
|
+
|
|
37
|
+
## You can go UI-light {#ui-light}
|
|
38
|
+
|
|
39
|
+
Not every app needs a full dashboard. When the agent _is_ the product, you can skip most of the custom UI: open the app, ask for what you want, and let the agent do the rest. The agent still has its management surface — history, workspace, settings — but the primary interaction is conversation rather than clicks.
|
|
40
|
+
|
|
41
|
+
→ [**Pure-Agent Apps**](/docs/pure-agent-apps) — apps where the agent is the whole product.
|
|
42
|
+
|
|
43
|
+
## You co-edit with it {#you-co-edit}
|
|
44
|
+
|
|
45
|
+
When you and the agent are working on the same document, you don't take turns. With real-time collaboration, the agent's edits stream in alongside yours — live cursors, no overwrites — the same way a teammate's would. You can keep typing while it works, and it sees your changes as they happen.
|
|
46
|
+
|
|
47
|
+
→ [**Real-Time Collaboration**](/docs/real-time-collaboration) — multi-user collaborative editing with live cursors and agent edits in the same document.
|
|
48
|
+
|
|
49
|
+
## What's next {#whats-next}
|
|
50
|
+
|
|
51
|
+
- [**Context Awareness**](/docs/context-awareness) — the agent knows what you're looking at
|
|
52
|
+
- [**Agent Mentions**](/docs/agent-mentions) — direct it with `@`-mentions
|
|
53
|
+
- [**Voice Input**](/docs/voice-input) — direct it by speaking
|
|
54
|
+
- [**Drop-in Agent**](/docs/drop-in-agent) — embed it in any React app
|
|
55
|
+
- [**Pure-Agent Apps**](/docs/pure-agent-apps) — go UI-light when the agent is the product
|
|
56
|
+
- [**Real-Time Collaboration**](/docs/real-time-collaboration) — co-edit the same document together
|
|
@@ -25,7 +25,7 @@ main ← production
|
|
|
25
25
|
|
|
26
26
|
**Naming conventions:**
|
|
27
27
|
|
|
28
|
-
- **Single-app changes:** `feat/<app>-<description>` or `fix/<app>-<description>` — e.g. `feat/mail-thread-search`, `fix/
|
|
28
|
+
- **Single-app changes:** `feat/<app>-<description>` or `fix/<app>-<description>` — e.g. `feat/mail-thread-search`, `fix/calendar-recurrence-parse`
|
|
29
29
|
- **Framework changes:** `feat/core-<description>` or `fix/core-<description>` — e.g. `feat/core-polling-v2`
|
|
30
30
|
- **Dispatch changes:** `feat/dispatch-<description>` — e.g. `feat/dispatch-vault-policies`
|
|
31
31
|
- **Cross-app changes:** if a framework change requires template updates, do both in one branch so they ship atomically
|
|
@@ -69,9 +69,9 @@ templates/mail/ @your-org/mail-team
|
|
|
69
69
|
templates/analytics/ @your-org/analytics-team
|
|
70
70
|
templates/calendar/ @your-org/calendar-team
|
|
71
71
|
templates/content/ @your-org/content-team
|
|
72
|
-
templates/
|
|
72
|
+
templates/design/ @your-org/design-team
|
|
73
73
|
templates/forms/ @your-org/forms-team
|
|
74
|
-
templates/
|
|
74
|
+
templates/clips/ @your-org/clips-team
|
|
75
75
|
templates/slides/ @your-org/slides-team
|
|
76
76
|
templates/videos/ @your-org/videos-team
|
|
77
77
|
|
|
@@ -119,9 +119,9 @@ app:calendar:
|
|
|
119
119
|
- changed-files:
|
|
120
120
|
- any-glob-to-any-file: templates/calendar/**
|
|
121
121
|
|
|
122
|
-
app:
|
|
122
|
+
app:design:
|
|
123
123
|
- changed-files:
|
|
124
|
-
- any-glob-to-any-file: templates/
|
|
124
|
+
- any-glob-to-any-file: templates/design/**
|
|
125
125
|
|
|
126
126
|
dispatch:
|
|
127
127
|
- changed-files:
|
|
@@ -260,7 +260,7 @@ For a new workspace, after running `agent-native create`:
|
|
|
260
260
|
- [ ] Register reusable workspace connections for shared provider accounts, then
|
|
261
261
|
grant apps such as Brain, Analytics, Mail, or Dispatch only when they need
|
|
262
262
|
that account
|
|
263
|
-
- [ ] Add workspace-wide skills, guardrail instructions, and brand/company reference resources via the Resources page
|
|
263
|
+
- [ ] Add workspace-wide skills, guardrail instructions, and brand/company reference resources via the Resources page. See [Workspace](/docs/workspace#global-resources) for the full resource-model table and the recommended starter pack.
|
|
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
|
|
@@ -63,6 +63,25 @@ Resources have three runtime scopes:
|
|
|
63
63
|
|
|
64
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.
|
|
65
65
|
|
|
66
|
+
### Global resources and canonical paths {#global-resources}
|
|
67
|
+
|
|
68
|
+
Workspace-scope resources are managed from Dispatch's **Resources** page and inherited by apps at runtime — no copy or sync step. Dispatch supports two grant scopes:
|
|
69
|
+
|
|
70
|
+
- **All apps** — global resources every app in the workspace inherits. Most company, brand, persona, positioning, messaging, and guardrail context should be **All apps**.
|
|
71
|
+
- **Selected apps** — resources granted to specific apps for app-specific context or tools. Use these sparingly.
|
|
72
|
+
|
|
73
|
+
The path determines how the agent uses a resource. These canonical paths apply across all three scopes (workspace, organization/app, personal):
|
|
74
|
+
|
|
75
|
+
| Runtime resource | Path | How agents use it |
|
|
76
|
+
| ----------------------- | --------------------------------------- | ----------------------------------------------- |
|
|
77
|
+
| Guardrail instructions | `AGENTS.md` or `instructions/<slug>.md` | Loaded every turn in every app that receives it |
|
|
78
|
+
| Global skills | `skills/<slug>/SKILL.md` | Listed as workspace skills and read on demand |
|
|
79
|
+
| Brand/company resources | `context/<slug>.md` | Indexed every turn, read when relevant |
|
|
80
|
+
| Custom agent profiles | `agents/<slug>.md` | Available as reusable local agent profiles |
|
|
81
|
+
| Shared HTTP MCP servers | `mcp-servers/<slug>.json` | Loaded into granted apps' MCP tool registry |
|
|
82
|
+
|
|
83
|
+
This is the right home for core personas, positioning, messaging, company facts, brand guidelines, support policies, shared skills, or shared HTTP MCP tools that many apps should benefit from.
|
|
84
|
+
|
|
66
85
|
## Workspace Panel {#workspace-panel}
|
|
67
86
|
|
|
68
87
|
The agent panel includes a **Workspace** tab alongside Chat and CLI. This panel lets users browse workspace resources, create/edit/delete personal or organization resources, and view inherited workspace defaults. It displays a tree view of all resources organized by folder path.
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=22"
|
|
7
|
+
},
|
|
5
8
|
"description": "Framework for agent-native application development — where AI agents and UI share state via files",
|
|
6
9
|
"license": "MIT",
|
|
7
10
|
"repository": {
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
"./secrets": "./dist/secrets/index.js",
|
|
58
61
|
"./org": "./dist/org/index.js",
|
|
59
62
|
"./client/org": "./dist/client/org/index.js",
|
|
63
|
+
"./client/db-admin": "./dist/client/db-admin/index.js",
|
|
60
64
|
"./sharing": "./dist/sharing/index.js",
|
|
61
65
|
"./sharing/actions/share-resource": "./dist/sharing/actions/share-resource.js",
|
|
62
66
|
"./sharing/actions/unshare-resource": "./dist/sharing/actions/unshare-resource.js",
|
|
@@ -104,8 +108,7 @@
|
|
|
104
108
|
"typecheck": "tsc --noEmit",
|
|
105
109
|
"test": "vitest --run src",
|
|
106
110
|
"prepack": "npm run build && cp ../../README.md ./README.md",
|
|
107
|
-
"prepublishOnly": "npm run build"
|
|
108
|
-
"release": "npm version patch && npm publish --access public"
|
|
111
|
+
"prepublishOnly": "npm run build"
|
|
109
112
|
},
|
|
110
113
|
"dependencies": {
|
|
111
114
|
"@amplitude/analytics-browser": "^2.41.1",
|
|
@@ -113,6 +116,8 @@
|
|
|
113
116
|
"@assistant-ui/react": "^0.12.19",
|
|
114
117
|
"@assistant-ui/react-markdown": "^0.12.6",
|
|
115
118
|
"@clack/prompts": "^1.4.0",
|
|
119
|
+
"@codemirror/lang-sql": "^6.10.0",
|
|
120
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
116
121
|
"@libsql/client": "^0.15.0",
|
|
117
122
|
"@modelcontextprotocol/ext-apps": "1.7.2",
|
|
118
123
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -129,12 +134,14 @@
|
|
|
129
134
|
"@standard-schema/spec": "^1.1.0",
|
|
130
135
|
"@tabler/icons-react": "^3",
|
|
131
136
|
"@tailwindcss/typography": "^0.5.19",
|
|
137
|
+
"@tanstack/react-table": "^8.21.3",
|
|
132
138
|
"@tiptap/core": "^3.22.2",
|
|
133
139
|
"@tiptap/extension-link": "^3.22.2",
|
|
134
140
|
"@tiptap/extension-placeholder": "^3.22.2",
|
|
135
141
|
"@tiptap/pm": "^3.22.2",
|
|
136
142
|
"@tiptap/react": "^3.22.2",
|
|
137
143
|
"@tiptap/starter-kit": "^3.22.2",
|
|
144
|
+
"@uiw/react-codemirror": "^4.25.10",
|
|
138
145
|
"better-auth": "1.6.0",
|
|
139
146
|
"better-sqlite3": "^12.8.0",
|
|
140
147
|
"clsx": "^2.1.1",
|
|
@@ -21,12 +21,12 @@ This is an **@agent-native/core** application -- the AI agent and UI share state
|
|
|
21
21
|
|
|
22
22
|
### Authentication
|
|
23
23
|
|
|
24
|
-
Auth is
|
|
24
|
+
Auth is real Better Auth in every environment — there is **no dev bypass**:
|
|
25
25
|
|
|
26
|
-
- **
|
|
27
|
-
- **Production
|
|
26
|
+
- **Development**: the same Better Auth flow as production. On first run the framework auto-creates a throwaway dev account and signs you in (so you are not stuck at a login wall). `getSession()` returns the signed-in user or `null` — it never returns a `local@localhost` sentinel.
|
|
27
|
+
- **Production**: Better Auth with email/password + social providers; organizations built in.
|
|
28
28
|
|
|
29
|
-
Use `getSession(event)` server-side and `useSession()` client-side.
|
|
29
|
+
Use `getSession(event)` server-side and `useSession()` client-side. When there is no session, **throw or return 401** — never fall back to `local@localhost` (that pools every unauthenticated request into one shared tenant).
|
|
30
30
|
|
|
31
31
|
## Resources
|
|
32
32
|
|
|
@@ -16,14 +16,21 @@ Auth is powered by **Better Auth** with account-first design. Every new user cre
|
|
|
16
16
|
|
|
17
17
|
| Mode | Behavior |
|
|
18
18
|
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| **Development (default)** | Auth is
|
|
19
|
+
| **Development (default)** | Real Better Auth — same flow as production. There is **no auth bypass**. On first run the framework auto-creates a throwaway dev account and signs you in (credentials printed once to the console; disable with `AGENT_NATIVE_DISABLE_AUTO_DEV_ACCOUNT=1`), so you are not stuck at a login wall. `getSession()` returns the signed-in user or `null` — it never falls back to a sentinel identity. |
|
|
20
20
|
| **Production (default)** | Better Auth with email/password + social providers (Google, GitHub). Organizations built in. |
|
|
21
|
-
| **`AUTH_MODE=local`** |
|
|
21
|
+
| **`AUTH_MODE=local`** | **Not** a browser auth bypass, and never returns `local@localhost`. It only affects CLI/agent identity: it lets `pnpm action` / the local agent loop auto-bind to the single real signed-in dev user from the `sessions` table (see `scripts/dev-session.ts`). Browser login is unchanged. |
|
|
22
22
|
| **`AUTH_SKIP_EMAIL_VERIFICATION=1`** | QA/preview escape hatch for real email/password accounts. Signup skips email verification and does not send the signup verification email. Local dev/test skips verification by default; set `AUTH_SKIP_EMAIL_VERIFICATION=0` only when testing verification itself. Use `+qa` emails for test accounts. |
|
|
23
23
|
| **`ACCESS_TOKEN` / `ACCESS_TOKENS`** | Simple token-based auth for production deployments. |
|
|
24
24
|
| **`AUTH_DISABLED=true`** | Skip auth entirely (for apps behind infrastructure-level auth like Cloudflare Access). |
|
|
25
25
|
| **Custom** | Pass your own `getSession` to `autoMountAuth(app, { getSession })`. |
|
|
26
26
|
|
|
27
|
+
> **Never** use `local@localhost` as a fallback identity in app code
|
|
28
|
+
> (`getRequestUserEmail() ?? "local@localhost"`, `session?.email ?? "local@localhost"`,
|
|
29
|
+
> etc.). There is no dev auth shim. That pattern pools every unauthenticated
|
|
30
|
+
> request into one shared tenant and caused the 2026-04-29 credentials leak.
|
|
31
|
+
> When there is no session, **throw or return 401** — never substitute a
|
|
32
|
+
> sentinel. Enforced by `scripts/guard-no-localhost-fallback.mjs`.
|
|
33
|
+
|
|
27
34
|
## Local → Real Account Migration
|
|
28
35
|
|
|
29
36
|
Upgrading from `local@localhost` to a real account preserves SQL-backed workspace data. The built-in migration moves `application_state`, user-scoped `settings`, `oauth_tokens`, and any template table that uses `owner_email`.
|
|
@@ -144,11 +144,17 @@ import {
|
|
|
144
144
|
getRequestOrgId,
|
|
145
145
|
} from "@agent-native/core/server/request-context";
|
|
146
146
|
|
|
147
|
+
const ownerEmail = getRequestUserEmail();
|
|
148
|
+
// Never fall back to a sentinel like "local@localhost" — that pools every
|
|
149
|
+
// unauthenticated write into one shared tenant (see the 2026-04-29 leak and
|
|
150
|
+
// guard-no-localhost-fallback). Throw / 401 when there is no session instead.
|
|
151
|
+
if (!ownerEmail) throw new Error("Not authenticated");
|
|
152
|
+
|
|
147
153
|
await db.insert(schema.decks).values({
|
|
148
154
|
id: nanoid(),
|
|
149
155
|
title,
|
|
150
156
|
data,
|
|
151
|
-
ownerEmail
|
|
157
|
+
ownerEmail,
|
|
152
158
|
orgId: getRequestOrgId(),
|
|
153
159
|
// visibility defaults to 'private'
|
|
154
160
|
// ...
|