@agent-native/core 0.59.1 → 0.61.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/index.d.ts +2 -0
- package/dist/a2a/index.d.ts.map +1 -1
- package/dist/a2a/index.js +1 -0
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/invoke.d.ts +63 -0
- package/dist/a2a/invoke.d.ts.map +1 -0
- package/dist/a2a/invoke.js +157 -0
- package/dist/a2a/invoke.js.map +1 -0
- package/dist/agent/run-store.d.ts +15 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +28 -0
- package/dist/agent/run-store.js.map +1 -1
- package/dist/chat-threads/store.d.ts +21 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +128 -0
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/agent.d.ts +23 -0
- package/dist/cli/agent.d.ts.map +1 -0
- package/dist/cli/agent.js +300 -0
- package/dist/cli/agent.js.map +1 -0
- package/dist/cli/agents.d.ts +14 -0
- package/dist/cli/agents.d.ts.map +1 -0
- package/dist/cli/agents.js +95 -0
- package/dist/cli/agents.js.map +1 -0
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +264 -2
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/create.d.ts +3 -2
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +154 -83
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +50 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/invoke.d.ts +26 -0
- package/dist/cli/invoke.d.ts.map +1 -0
- package/dist/cli/invoke.js +227 -0
- package/dist/cli/invoke.js.map +1 -0
- package/dist/cli/templates-meta.d.ts +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +9 -8
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/cli/workspacify.d.ts +1 -1
- package/dist/cli/workspacify.d.ts.map +1 -1
- package/dist/cli/workspacify.js +6 -6
- package/dist/cli/workspacify.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +5 -4
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/blocks/library/diagram.d.ts.map +1 -1
- package/dist/client/blocks/library/diagram.js +23 -17
- package/dist/client/blocks/library/diagram.js.map +1 -1
- package/dist/client/blocks/types.d.ts +2 -0
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/chat/index.d.ts +1 -1
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.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/settings/useBuilderStatus.d.ts +10 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts +13 -0
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +41 -0
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +2 -2
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/onboarding/default-steps.d.ts.map +1 -1
- package/dist/onboarding/default-steps.js +102 -0
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/provider-api/actions/github-repo-files.d.ts +84 -0
- package/dist/provider-api/actions/github-repo-files.d.ts.map +1 -0
- package/dist/provider-api/actions/github-repo-files.js +213 -0
- package/dist/provider-api/actions/github-repo-files.js.map +1 -0
- package/dist/provider-api/github-repo.d.ts +11 -0
- package/dist/provider-api/github-repo.d.ts.map +1 -0
- package/dist/provider-api/github-repo.js +553 -0
- package/dist/provider-api/github-repo.js.map +1 -0
- package/dist/provider-api/index.d.ts +184 -11
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +519 -0
- package/dist/provider-api/index.js.map +1 -1
- package/dist/scripts/docs/search.d.ts.map +1 -1
- package/dist/scripts/docs/search.js +38 -13
- package/dist/scripts/docs/search.js.map +1 -1
- package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
- package/dist/secrets/register-framework-secrets.js +11 -0
- package/dist/secrets/register-framework-secrets.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +32 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +297 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth-marketing.d.ts.map +1 -1
- package/dist/server/auth-marketing.js +17 -7
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +6 -0
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-browser.d.ts +11 -0
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/builder-space.d.ts +47 -0
- package/dist/server/builder-space.d.ts.map +1 -0
- package/dist/server/builder-space.js +142 -0
- package/dist/server/builder-space.js.map +1 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +39 -98
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +29 -6
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/styles/blocks.css +30 -8
- package/dist/styles/rich-markdown-editor.css +10 -4
- package/dist/templates/{starter-shell-sync.spec.ts → chat-shell-sync.spec.ts} +21 -21
- package/dist/templates/default/.agents/skills/actions/SKILL.md +5 -5
- package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/dist/templates/default/AGENTS.md +22 -1
- package/dist/templates/default/actions/hello.ts +1 -1
- package/dist/templates/default/actions/navigate.ts +1 -1
- package/dist/templates/default/actions/view-screen.ts +1 -1
- package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/dist/templates/headless/.env.example +4 -0
- package/dist/templates/headless/.prettierrc +5 -0
- package/dist/templates/headless/AGENTS.md +58 -0
- package/dist/templates/headless/DEVELOPING.md +22 -0
- package/dist/templates/headless/_gitignore +36 -0
- package/dist/templates/headless/actions/hello.ts +14 -0
- package/dist/templates/headless/actions/run.ts +3 -0
- package/dist/templates/headless/package.json +22 -0
- package/dist/templates/headless/tsconfig.json +7 -0
- package/dist/templates/ui-primitives-sync.spec.ts +2 -2
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -5
- package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +93 -0
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +1 -1
- package/dist/templates/workspace-core/AGENTS.md +20 -3
- package/dist/templates/workspace-core/src/server/index.ts +1 -1
- package/dist/templates/workspace-root/AGENTS.md +25 -5
- package/dist/templates/workspace-root/README.md +7 -7
- package/dist/triggers/dispatcher.d.ts +2 -3
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +2 -3
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/triggers/routes.d.ts +38 -0
- package/dist/triggers/routes.d.ts.map +1 -0
- package/dist/triggers/routes.js +202 -0
- package/dist/triggers/routes.js.map +1 -0
- package/docs/AGENTS.md +57 -0
- package/docs/SKILL.md +40 -0
- package/docs/content/a2a-protocol.md +1 -1
- package/docs/content/actions.md +48 -8
- package/docs/content/agent-surfaces.md +76 -14
- package/docs/content/cli-adapters.md +1 -1
- package/docs/content/cloneable-saas.md +5 -4
- package/docs/content/code-agents-ui.md +1 -1
- package/docs/content/components.md +1 -1
- package/docs/content/context-awareness.md +1 -1
- package/docs/content/creating-templates.md +9 -7
- package/docs/content/drop-in-agent.md +1 -1
- package/docs/content/faq.md +6 -4
- package/docs/content/getting-started.md +63 -73
- package/docs/content/key-concepts.md +24 -24
- package/docs/content/native-chat-ui.md +4 -4
- package/docs/content/pure-agent-apps.md +34 -10
- package/docs/content/security.md +1 -1
- package/docs/content/server.md +1 -1
- package/docs/content/template-chat.md +85 -0
- package/docs/content/template-dispatch.md +1 -1
- package/docs/content/tracking.md +1 -1
- package/docs/content/what-is-agent-native.md +7 -6
- package/package.json +10 -1
- package/src/templates/{starter-shell-sync.spec.ts → chat-shell-sync.spec.ts} +21 -21
- package/src/templates/default/.agents/skills/actions/SKILL.md +5 -5
- package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/src/templates/default/AGENTS.md +22 -1
- package/src/templates/default/actions/hello.ts +1 -1
- package/src/templates/default/actions/navigate.ts +1 -1
- package/src/templates/default/actions/view-screen.ts +1 -1
- package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/src/templates/headless/.env.example +4 -0
- package/src/templates/headless/.prettierrc +5 -0
- package/src/templates/headless/AGENTS.md +58 -0
- package/src/templates/headless/DEVELOPING.md +22 -0
- package/src/templates/headless/_gitignore +36 -0
- package/src/templates/headless/actions/hello.ts +14 -0
- package/src/templates/headless/actions/run.ts +3 -0
- package/src/templates/headless/package.json +22 -0
- package/src/templates/headless/tsconfig.json +7 -0
- package/src/templates/ui-primitives-sync.spec.ts +2 -2
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +5 -5
- package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +63 -0
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +93 -0
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +1 -1
- package/src/templates/workspace-core/AGENTS.md +20 -3
- package/src/templates/workspace-core/src/server/index.ts +1 -1
- package/src/templates/workspace-root/AGENTS.md +25 -5
- package/src/templates/workspace-root/README.md +7 -7
- package/docs/content/template-starter.md +0 -78
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-native-docs
|
|
3
|
+
description: >-
|
|
4
|
+
How to find version-matched Agent Native framework docs bundled in
|
|
5
|
+
node_modules. Use before implementing or answering questions about
|
|
6
|
+
@agent-native/core APIs, generated apps, workspaces, or advanced features.
|
|
7
|
+
metadata:
|
|
8
|
+
internal: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Agent Native Docs Lookup
|
|
12
|
+
|
|
13
|
+
## Rule
|
|
14
|
+
|
|
15
|
+
Before implementing or explaining non-trivial Agent Native behavior, read the
|
|
16
|
+
version-matched docs installed with `@agent-native/core`.
|
|
17
|
+
|
|
18
|
+
## Why
|
|
19
|
+
|
|
20
|
+
Generated apps and workspaces may be on a different framework version than the
|
|
21
|
+
public docs or model memory. The installed package is the source that matches
|
|
22
|
+
the app in front of you.
|
|
23
|
+
|
|
24
|
+
## How
|
|
25
|
+
|
|
26
|
+
From a generated app directory:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm action docs-search --query "<feature>"
|
|
30
|
+
pnpm action docs-search --slug <slug>
|
|
31
|
+
pnpm action docs-search --list
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The headless `pnpm agent` loop and built-in app agent also expose a read-only
|
|
35
|
+
`docs-search` tool with the same `query`, `slug`, and `list` options.
|
|
36
|
+
|
|
37
|
+
If the action runner is unavailable, search the package docs directly:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
rg -n "actions|automations|a2a|sharing" node_modules/@agent-native/core/docs
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then read `node_modules/@agent-native/core/docs/AGENTS.md` or the matching file
|
|
44
|
+
under `node_modules/@agent-native/core/docs/content/`.
|
|
45
|
+
|
|
46
|
+
## Useful Slugs
|
|
47
|
+
|
|
48
|
+
| Need | Slugs |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| Actions and typed client calls | `actions`, `client` |
|
|
51
|
+
| SQL, auth, access, sharing | `database`, `authentication`, `security`, `sharing` |
|
|
52
|
+
| UI state visible to the agent | `context-awareness` |
|
|
53
|
+
| Headless and chat-first apps | `pure-agent-apps`, `agent-surfaces`, `using-your-agent` |
|
|
54
|
+
| Automations and schedules | `automations`, `recurring-jobs` |
|
|
55
|
+
| Cross-app and external agents | `a2a-protocol`, `external-agents`, `mcp-protocol`, `mcp-apps` |
|
|
56
|
+
| Skills and instructions | `skills-guide`, `writing-agent-instructions` |
|
|
57
|
+
|
|
58
|
+
## Don't
|
|
59
|
+
|
|
60
|
+
- Do not rely on memory for framework APIs when package docs are present.
|
|
61
|
+
- Do not add custom REST wrappers for app data before reading `actions`.
|
|
62
|
+
- Do not add inline LLM calls before reading `using-your-agent` and
|
|
63
|
+
`agent-surfaces`.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: composable-mini-apps
|
|
3
|
+
description: >-
|
|
4
|
+
Build many focused workspace apps that compose through agent discovery and
|
|
5
|
+
A2A. Use when designing headless mini-apps or cross-app workflows.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Composable Mini-Apps
|
|
9
|
+
|
|
10
|
+
## Rule
|
|
11
|
+
|
|
12
|
+
Prefer many one-job apps in a workspace over one oversized app. A headless app
|
|
13
|
+
can own a provider, dataset, workflow, or specialist action surface without a
|
|
14
|
+
full UI; the main agent composes those apps through discovery and A2A.
|
|
15
|
+
|
|
16
|
+
## Shape
|
|
17
|
+
|
|
18
|
+
- Give each mini-app one clear job, a concise `package.json` description, and
|
|
19
|
+
action names that describe the job it owns.
|
|
20
|
+
- Keep provider credentials and upstream API details in the app that owns that
|
|
21
|
+
provider or workflow. Other apps should delegate to it instead of copying its
|
|
22
|
+
integration code.
|
|
23
|
+
- Use a tiny status/config screen only when users need to inspect state. A
|
|
24
|
+
pure headless app is fine when its job is invoked by agents, automations, or
|
|
25
|
+
sibling apps.
|
|
26
|
+
- If two workflows only share a helper, put the helper in `packages/shared`;
|
|
27
|
+
keep the workflow actions in separate apps.
|
|
28
|
+
|
|
29
|
+
## Discovery And Invocation
|
|
30
|
+
|
|
31
|
+
The main agent should discover available siblings before assuming capability:
|
|
32
|
+
|
|
33
|
+
- Runtime agents receive an `<available-apps>` block built from
|
|
34
|
+
`discoverAgents()`. Workspace siblings are layered in by
|
|
35
|
+
`discoverWorkspaceAgents()`.
|
|
36
|
+
- UI shells, headless surfaces, and scripts can read the same registry through
|
|
37
|
+
`GET /_agent-native/agents?selfAppId=<app-id>`.
|
|
38
|
+
- Code or CLI callers should use the first-class A2A invocation path
|
|
39
|
+
(`invokeAgent()` / `agent-native invoke`) when they need to call an app by
|
|
40
|
+
id, name, or URL.
|
|
41
|
+
- In the agent loop, use `call-agent` with the sibling app id when another app
|
|
42
|
+
owns the work or data. Never call the current app through `call-agent`; use
|
|
43
|
+
local actions instead.
|
|
44
|
+
|
|
45
|
+
Send narrow prompts to siblings: name the exact question, relevant ids, date
|
|
46
|
+
ranges, and expected output shape. Preserve returned ids and URLs verbatim.
|
|
47
|
+
|
|
48
|
+
## Provider APIs
|
|
49
|
+
|
|
50
|
+
Provider-specific actions are shortcuts, not limits. When the upstream API can
|
|
51
|
+
answer the question better than a first-class shortcut, call
|
|
52
|
+
`provider-api-catalog` and `provider-api-docs` as needed, then
|
|
53
|
+
`provider-api-request` against the real provider endpoint. For broad joins,
|
|
54
|
+
searches, or absence claims, stage the bounded corpus with `stageAs` and reduce
|
|
55
|
+
it with `query-staged-dataset` or code.
|
|
56
|
+
|
|
57
|
+
When composing apps, make the provider-owning mini-app do those
|
|
58
|
+
`provider-api-request` calls. The orchestrator should delegate a bounded job;
|
|
59
|
+
it should not reimplement every provider endpoint locally.
|
|
60
|
+
|
|
61
|
+
## Example
|
|
62
|
+
|
|
63
|
+
For a sales-intelligence workspace, split the job into small apps:
|
|
64
|
+
|
|
65
|
+
| App | Owns | Calls |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `hubspot-pipeline` | CRM deals, contacts, companies, associations | `provider-api-request` with provider `hubspot` |
|
|
68
|
+
| `gong-evidence` | Calls, transcripts, snippets, speaker evidence | `provider-api-request` with provider `gong` |
|
|
69
|
+
| `knowledge-base` | Internal docs, pricing rules, playbooks | local search/read actions |
|
|
70
|
+
| `deal-brief` | Orchestration and final brief | `invokeAgent()` or `call-agent` to the three apps |
|
|
71
|
+
|
|
72
|
+
Flow: `deal-brief` asks `hubspot-pipeline` for the target account and open
|
|
73
|
+
deals, asks `gong-evidence` for recent transcript evidence about those deals,
|
|
74
|
+
asks `knowledge-base` for relevant playbook guidance, then synthesizes the
|
|
75
|
+
answer. That is a HubSpot→Gong→knowledge-base chain made of focused apps,
|
|
76
|
+
not a single app that clones every provider integration.
|
|
77
|
+
|
|
78
|
+
## Don't
|
|
79
|
+
|
|
80
|
+
- Do not clone Mail, Calendar, Analytics, Brain, Assets, or another first-party
|
|
81
|
+
app just to reuse its data. Delegate or link to the existing app.
|
|
82
|
+
- Do not hide a multi-provider workflow inside a giant "misc tools" app.
|
|
83
|
+
- Do not add one-off provider endpoints when `provider-api-request` can express
|
|
84
|
+
the upstream API safely.
|
|
85
|
+
- Do not create wrapper routes that only re-export another app's action or A2A
|
|
86
|
+
result.
|
|
87
|
+
|
|
88
|
+
## Related Skills
|
|
89
|
+
|
|
90
|
+
- **a2a-protocol** - How apps expose and call A2A endpoints.
|
|
91
|
+
- **actions** - How each mini-app exposes its own operation surface.
|
|
92
|
+
- **external-agents** - How external MCP hosts route through workspace apps.
|
|
93
|
+
- **storing-data** - How app-owned data stays SQL-backed and portable.
|
|
@@ -111,7 +111,7 @@ row is written — status is derived from `hasOAuthTokens("google")`.
|
|
|
111
111
|
|
|
112
112
|
```ts
|
|
113
113
|
import { z } from "zod";
|
|
114
|
-
import { defineAction } from "@agent-native/core";
|
|
114
|
+
import { defineAction } from "@agent-native/core/action";
|
|
115
115
|
import { readAppSecret } from "@agent-native/core/secrets";
|
|
116
116
|
import { getRequestUserEmail } from "@agent-native/core/server";
|
|
117
117
|
|
|
@@ -4,6 +4,23 @@ These instructions apply to every app in the {{APP_TITLE}} workspace. Keep
|
|
|
4
4
|
only rules that should be shared across all apps here. App-specific behavior
|
|
5
5
|
belongs in that app's own `AGENTS.md` or `.agents/skills/` directory.
|
|
6
6
|
|
|
7
|
+
## Framework Docs Lookup
|
|
8
|
+
|
|
9
|
+
Version-matched Agent Native docs ship with `@agent-native/core` in
|
|
10
|
+
`node_modules/@agent-native/core/docs`.
|
|
11
|
+
|
|
12
|
+
- From an app directory, use `pnpm action docs-search --query "<topic>"`,
|
|
13
|
+
`pnpm action docs-search --slug <slug>`, or `pnpm action docs-search --list`.
|
|
14
|
+
- If the action runner is unavailable, read
|
|
15
|
+
`node_modules/@agent-native/core/docs/AGENTS.md` and search
|
|
16
|
+
`node_modules/@agent-native/core/docs/content/` directly with `rg`.
|
|
17
|
+
- For advanced workspace features, start with `workspace`, `multi-app-workspace`,
|
|
18
|
+
`a2a-protocol`, `pure-agent-apps`, `automations`, `recurring-jobs`,
|
|
19
|
+
`external-agents`, `mcp-protocol`, `sharing`, and `security`.
|
|
20
|
+
|
|
21
|
+
Use package docs for framework APIs, and use this `AGENTS.md` plus
|
|
22
|
+
`.agents/skills/` for workspace-specific conventions.
|
|
23
|
+
|
|
7
24
|
## Shared Context
|
|
8
25
|
|
|
9
26
|
Add company, product, compliance, or support-context notes that every app
|
|
@@ -55,7 +72,7 @@ become a separate workspace app under `apps/<app-name>`, mounted at
|
|
|
55
72
|
`/<app-name>`.
|
|
56
73
|
|
|
57
74
|
Do not implement a new app by adding a route, page, component, or file to
|
|
58
|
-
`apps/
|
|
75
|
+
`apps/chat` or another existing app unless the user explicitly asks to modify
|
|
59
76
|
that existing app.
|
|
60
77
|
|
|
61
78
|
Dispatch vault access is workspace-wide by default: every saved vault key is
|
|
@@ -101,8 +118,8 @@ branch creation; Builder should still scaffold the separate workspace app. The
|
|
|
101
118
|
workspace dev gateway (`pnpm dev`) detects new `apps/<app-name>` directories
|
|
102
119
|
automatically.
|
|
103
120
|
|
|
104
|
-
When using the
|
|
121
|
+
When using the chat template, treat it as scaffolding only. The finished app
|
|
105
122
|
must be branded as the requested app, with its own home screen, navigation,
|
|
106
123
|
package metadata, manifest, and domain workflow. Do not leave visible
|
|
107
|
-
`Starter`, `Blank app`, `Start building`, or `New app` UI in a
|
|
124
|
+
`Chat`, `Starter`, `Blank app`, `Start building`, or `New app` UI in a chat-derived
|
|
108
125
|
app.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Export workspace-wide server plugin overrides here when you need them.
|
|
2
|
-
//
|
|
2
|
+
// Chat-derived apps inherit these exports, so provide explicit framework defaults
|
|
3
3
|
// to keep generated workspaces warning-free until a workspace customizes them.
|
|
4
4
|
import {
|
|
5
5
|
createAgentChatPlugin,
|
|
@@ -6,6 +6,22 @@ in `apps/<app>/AGENTS.md`; shared cross-app behavior belongs in
|
|
|
6
6
|
The root `.agents/skills` path points at the shared package's skills so local
|
|
7
7
|
coding agents can discover the same workspace-wide guidance from the root.
|
|
8
8
|
|
|
9
|
+
## Framework Docs Lookup
|
|
10
|
+
|
|
11
|
+
Version-matched Agent Native docs ship with `@agent-native/core` in
|
|
12
|
+
`node_modules/@agent-native/core/docs`.
|
|
13
|
+
|
|
14
|
+
- From an app directory, use `pnpm action docs-search --query "<topic>"`,
|
|
15
|
+
`pnpm action docs-search --slug <slug>`, or `pnpm action docs-search --list`.
|
|
16
|
+
- From the workspace root, read `node_modules/@agent-native/core/docs/AGENTS.md`
|
|
17
|
+
and search `node_modules/@agent-native/core/docs/content/` directly with `rg`.
|
|
18
|
+
- For advanced workspace features, start with `workspace`, `multi-app-workspace`,
|
|
19
|
+
`a2a-protocol`, `pure-agent-apps`, `automations`, `recurring-jobs`,
|
|
20
|
+
`external-agents`, `mcp-protocol`, `sharing`, and `security`.
|
|
21
|
+
|
|
22
|
+
Use package docs for framework APIs, and use `packages/shared/AGENTS.md` plus
|
|
23
|
+
`packages/shared/.agents/skills/` for workspace-specific conventions.
|
|
24
|
+
|
|
9
25
|
## Core Agent Rule
|
|
10
26
|
|
|
11
27
|
- All AI/LLM behavior goes through the app's agent chat. UI and server code
|
|
@@ -61,11 +77,15 @@ coding agents can discover the same workspace-wide guidance from the root.
|
|
|
61
77
|
`/<app-id>`.
|
|
62
78
|
- When a user explicitly asks for a new app or workspace app, create the
|
|
63
79
|
separate workspace app.
|
|
80
|
+
- For composable workflows, prefer many one-job headless or small-UI apps that
|
|
81
|
+
discover and call sibling apps over A2A. Read
|
|
82
|
+
`packages/shared/.agents/skills/composable-mini-apps/SKILL.md` before
|
|
83
|
+
designing cross-app orchestration.
|
|
64
84
|
- Dispatch vault access is workspace-wide by default: every saved vault key is
|
|
65
85
|
available to every workspace app. Only create or request per-app vault grants
|
|
66
86
|
when Dispatch's vault access setting is switched to manual mode.
|
|
67
87
|
- Do not satisfy a new-app request by adding a route, page, component, or file
|
|
68
|
-
to `apps/
|
|
88
|
+
to `apps/chat` or another existing app unless the user explicitly asks to
|
|
69
89
|
modify that existing app.
|
|
70
90
|
- Treat first-party apps such as Mail, Calendar, Analytics, Brain, Assets, and Dispatch as
|
|
71
91
|
existing hosted/connected neighbors available through links and A2A/default
|
|
@@ -121,14 +141,14 @@ coding agents can discover the same workspace-wide guidance from the root.
|
|
|
121
141
|
- In local development, scaffold the app from the workspace root with
|
|
122
142
|
`pnpm exec agent-native create <app-id> --template=<template>`. In production
|
|
123
143
|
Dispatch posts the request to Builder branch creation; the Builder branch
|
|
124
|
-
should still create the separate workspace app, not patch
|
|
144
|
+
should still create the separate workspace app, not patch chat. The local
|
|
125
145
|
workspace gateway detects new app directories automatically and starts each
|
|
126
146
|
app server lazily on first visit.
|
|
127
|
-
- When using the
|
|
147
|
+
- When using the chat template, treat it as scaffolding only. The finished
|
|
128
148
|
app must be branded as the requested app, with its own home screen,
|
|
129
149
|
navigation, package metadata, manifest, and domain workflow. Do not leave
|
|
130
|
-
visible `Starter`, `Blank app`, `Start building`, or `New app` UI in
|
|
131
|
-
|
|
150
|
+
visible `Chat`, `Starter`, `Blank app`, `Start building`, or `New app` UI in
|
|
151
|
+
a chat-derived app.
|
|
132
152
|
|
|
133
153
|
## Workspace Identity
|
|
134
154
|
|
|
@@ -68,10 +68,10 @@ pnpm dev # starts the workspace gateway; opens Dispatch when prese
|
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
The dev gateway serves Dispatch at `/dispatch` when you keep the recommended
|
|
71
|
-
Dispatch app selected, and every app at its own path such as `/
|
|
71
|
+
Dispatch app selected, and every app at its own path such as `/chat`. It
|
|
72
72
|
watches `apps/`, so newly-created apps are detected without restarting
|
|
73
73
|
`pnpm dev`. App servers start lazily the first time you visit their path. App
|
|
74
|
-
links should stay relative, such as `/
|
|
74
|
+
links should stay relative, such as `/chat` or `/<app-id>`; do not hardcode
|
|
75
75
|
localhost or dev ports because the active gateway origin owns the port.
|
|
76
76
|
|
|
77
77
|
Dispatch vault keys are workspace-wide by default: every saved vault key is
|
|
@@ -100,18 +100,18 @@ authenticated org routes whenever possible.
|
|
|
100
100
|
## Adding a new app
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
pnpm exec agent-native create crm --template=
|
|
103
|
+
pnpm exec agent-native create crm --template=chat
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
The CLI detects the workspace root and scaffolds a minimal app that already
|
|
106
|
+
The CLI detects the workspace root and scaffolds a minimal chat app that already
|
|
107
107
|
depends on `@{{APP_NAME}}/shared`. Edit only the routes you care about;
|
|
108
108
|
auth, org switching, skills, and instructions come from the shared package.
|
|
109
|
-
|
|
109
|
+
Chat is only the source scaffold: the finished app should use its own name,
|
|
110
110
|
home screen, navigation, package metadata, and manifest rather than leaving
|
|
111
|
-
|
|
111
|
+
chat or new-app UI in place.
|
|
112
112
|
If the request starts from Dispatch in production, Dispatch sends it to Builder
|
|
113
113
|
branch creation; that branch should still add a new `apps/<app-id>` workspace
|
|
114
|
-
app rather than adding files to `apps/
|
|
114
|
+
app rather than adding files to `apps/chat`.
|
|
115
115
|
Dispatch discovers ready apps from `apps/<app-id>/package.json`; there is no
|
|
116
116
|
separate workspace app registry to edit. React Router apps must preserve
|
|
117
117
|
`APP_BASE_PATH` / `VITE_APP_BASE_PATH` in `app/entry.client.tsx` via
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Starter"
|
|
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
|
-
---
|
|
5
|
-
|
|
6
|
-
# Starter
|
|
7
|
-
|
|
8
|
-
Starter is the minimum viable agent-native app. You get the six-rules architecture, the agent sidebar, the workspace tab, live sync, auth, and exactly one example action. Nothing else. Build from there.
|
|
9
|
-
|
|
10
|
-
<!-- screenshot:
|
|
11
|
-
app: starter
|
|
12
|
-
view: /
|
|
13
|
-
shows: Blank-slate app with sidebar (Blank app brand, Home / Observability), centered "Blank app" card with Start building prompt button + quick-action tiles for Documentation and Theme, agent chat panel on the right
|
|
14
|
-
account: screenshot-account (no domain data needed — starter ships with no seed schema)
|
|
15
|
-
capture: 1400x800 viewport, cropped 90px from bottom (final 1400x710)
|
|
16
|
-
-->
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
Pick Starter when you're not sure which domain template fits, or when you want to learn the framework by doing. It is scaffolding for your app, not a launcher for more apps, so starter-derived apps should be renamed and reshaped into the actual product.
|
|
21
|
-
|
|
22
|
-
## What's in it {#whats-in-it}
|
|
23
|
-
|
|
24
|
-
- **Agent sidebar** (`<AgentSidebar>`) wired into `app/root.tsx`. Chat, CLI, workspace tabs all present.
|
|
25
|
-
- **Agent chat plugin** pre-configured so the chat actually talks to Claude (once `ANTHROPIC_API_KEY` is set).
|
|
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.ts`) and the `view-screen` / `navigate` standard actions wired up.
|
|
28
|
-
- **The framework's core tables** (application_state, settings, oauth_tokens, sessions, resources) provided by `@agent-native/core` at runtime — there's no template-local schema file to maintain. Add your own Drizzle schema when you define domain tables.
|
|
29
|
-
- **Live sync** (`useDbSync`) already wired so UI auto-refreshes when the agent writes to the database.
|
|
30
|
-
- **AGENTS.md** with the framework-wide rules the agent reads on every turn.
|
|
31
|
-
- **One example domain route** at `/` that says hi and renders the sidebar toggle, plus the framework-shared admin routes (Database, Team, Observability, Extensions).
|
|
32
|
-
|
|
33
|
-
## What's _not_ in it {#not-in-it}
|
|
34
|
-
|
|
35
|
-
- No domain tables (no emails, no events, no forms)
|
|
36
|
-
- No fancy UI — no dashboards, no lists, no charts
|
|
37
|
-
- No template-specific actions beyond the stubs
|
|
38
|
-
- No integrations (Slack, SendGrid, etc.)
|
|
39
|
-
|
|
40
|
-
That's the point. Ship whatever belongs to _your_ app, not someone else's.
|
|
41
|
-
|
|
42
|
-
## When to pick it {#when-to-pick}
|
|
43
|
-
|
|
44
|
-
- **Building a pure-agent app** — the kind where the UI is mostly "let me see what the agent did." See [Pure-Agent Apps](/docs/pure-agent-apps).
|
|
45
|
-
- **Learning the framework** — this is the smallest surface to wrap your head around.
|
|
46
|
-
- **An internal tool** with a unique domain that doesn't match any of the other templates.
|
|
47
|
-
- **A prototype** — ship the agent now, add real UI later.
|
|
48
|
-
|
|
49
|
-
Pick a domain template ([Mail](/docs/template-mail), [Calendar](/docs/template-calendar), [Content](/docs/template-content), [Forms](/docs/template-forms), [Analytics](/docs/template-analytics), etc.) when there's an existing product shape that fits.
|
|
50
|
-
|
|
51
|
-
## Scaffolding {#scaffolding}
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npx @agent-native/core@latest create my-app --standalone --template starter
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Or, in a workspace:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npx @agent-native/core@latest create my-platform # pick "Starter" (pre-selected by default) plus any others
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## First edits {#first-edits}
|
|
64
|
-
|
|
65
|
-
After scaffolding:
|
|
66
|
-
|
|
67
|
-
1. Ask the agent: "Add a data model for `notes` — a note has an id, title, body, owner. Render a list of notes at `/notes` and let the user create one."
|
|
68
|
-
2. The agent adds the Drizzle schema, the `create-note` and `list-notes` actions, and the new route. You watch it happen.
|
|
69
|
-
3. `pnpm dev`, navigate to `/notes`, add a note through the UI. Ask the agent "draft a note summarizing yesterday's standup." Watch it use your new action.
|
|
70
|
-
|
|
71
|
-
That's the loop.
|
|
72
|
-
|
|
73
|
-
## What's next
|
|
74
|
-
|
|
75
|
-
- [**Getting Started**](/docs) — the broader CLI + workspace flow
|
|
76
|
-
- [**Key Concepts**](/docs/key-concepts) — the six rules and what you get for free
|
|
77
|
-
- [**Actions**](/docs/actions) — the action system you'll add to
|
|
78
|
-
- [**Adding a Feature**](/docs/key-concepts#four-area-checklist) — the four-area checklist every new feature should update
|