@agent-native/core 0.102.2 → 0.103.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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +6 -0
- package/corpus/core/docs/content/local-file-mode.mdx +99 -489
- package/corpus/core/docs/content/locales/ar-SA/local-file-mode.mdx +35 -490
- package/corpus/core/docs/content/locales/ar-SA/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/de-DE/local-file-mode.mdx +37 -491
- package/corpus/core/docs/content/locales/de-DE/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/es-ES/local-file-mode.mdx +35 -493
- package/corpus/core/docs/content/locales/es-ES/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/fr-FR/local-file-mode.mdx +38 -491
- package/corpus/core/docs/content/locales/fr-FR/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/hi-IN/local-file-mode.mdx +33 -492
- package/corpus/core/docs/content/locales/hi-IN/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/ja-JP/local-file-mode.mdx +36 -492
- package/corpus/core/docs/content/locales/ja-JP/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/ko-KR/local-file-mode.mdx +35 -490
- package/corpus/core/docs/content/locales/ko-KR/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/pt-BR/local-file-mode.mdx +35 -493
- package/corpus/core/docs/content/locales/pt-BR/template-content.mdx +10 -24
- package/corpus/core/docs/content/locales/zh-CN/local-file-mode.mdx +31 -489
- package/corpus/core/docs/content/locales/zh-CN/template-content.mdx +9 -24
- package/corpus/core/docs/content/locales/zh-TW/local-file-mode.mdx +31 -489
- package/corpus/core/docs/content/locales/zh-TW/template-content.mdx +9 -24
- package/corpus/core/docs/content/template-content.mdx +26 -42
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/content-local.ts +86 -18
- package/corpus/core/src/cli/index.ts +2 -2
- package/corpus/core/src/cli/skills-content/content-skill.ts +36 -25
- package/corpus/core/src/cli/skills.ts +47 -13
- package/corpus/core/src/local-artifacts/index.ts +65 -0
- package/corpus/templates/assets/app/components/library/GenerationPresetsPanel.tsx +325 -0
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +12 -0
- package/corpus/templates/assets/app/i18n/zh-TW.ts +21 -0
- package/corpus/templates/assets/app/i18n-data.ts +215 -0
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +19 -479
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +1 -1
- package/corpus/templates/assets/app/routes/brand-kits.$id_.settings.tsx +446 -0
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +12 -2
- package/corpus/templates/clips/app/components/player/settings-panel.tsx +30 -12
- package/corpus/templates/clips/app/components/player/video-player.tsx +5 -1
- package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +22 -3
- package/corpus/templates/clips/app/i18n/ar-SA.ts +3 -2
- package/corpus/templates/clips/app/i18n/de-DE.ts +4 -2
- package/corpus/templates/clips/app/i18n/en-US.ts +3 -2
- package/corpus/templates/clips/app/i18n/es-ES.ts +4 -2
- package/corpus/templates/clips/app/i18n/fr-FR.ts +3 -2
- package/corpus/templates/clips/app/i18n/hi-IN.ts +3 -2
- package/corpus/templates/clips/app/i18n/ja-JP.ts +4 -1
- package/corpus/templates/clips/app/i18n/ko-KR.ts +3 -2
- package/corpus/templates/clips/app/i18n/pt-BR.ts +4 -2
- package/corpus/templates/clips/app/i18n/zh-CN.ts +3 -2
- package/corpus/templates/clips/app/i18n/zh-TW.ts +3 -2
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +27 -1
- package/corpus/templates/clips/server/lib/share-password.ts +6 -3
- package/corpus/templates/content/.agents/skills/content/SKILL.md +26 -39
- package/corpus/templates/content/AGENTS.md +25 -30
- package/corpus/templates/content/actions/_builder-docs-client.ts +23 -0
- package/corpus/templates/content/actions/_content-database-source-adapters.ts +21 -3
- package/corpus/templates/content/actions/_content-files.ts +338 -0
- package/corpus/templates/content/actions/_content-space-access.ts +135 -0
- package/corpus/templates/content/actions/_content-spaces.ts +640 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +90 -7
- package/corpus/templates/content/actions/_database-utils.ts +7 -1
- package/corpus/templates/content/actions/_local-file-documents.ts +0 -9
- package/corpus/templates/content/actions/_local-folder-source.ts +53 -0
- package/corpus/templates/content/actions/_property-utils.ts +9 -4
- package/corpus/templates/content/actions/add-database-item.ts +108 -65
- package/corpus/templates/content/actions/backfill-content-files.ts +22 -0
- package/corpus/templates/content/actions/connect-local-folder-source.ts +221 -0
- package/corpus/templates/content/actions/create-content-database.ts +129 -3
- package/corpus/templates/content/actions/create-document.ts +65 -55
- package/corpus/templates/content/actions/create-inline-content-database.ts +6 -1
- package/corpus/templates/content/actions/delete-content-database.ts +3 -0
- package/corpus/templates/content/actions/delete-document.ts +7 -11
- package/corpus/templates/content/actions/disconnect-local-folder-source.ts +175 -0
- package/corpus/templates/content/actions/duplicate-database-item.ts +10 -0
- package/corpus/templates/content/actions/duplicate-database-items.ts +13 -0
- package/corpus/templates/content/actions/edit-document.ts +2 -28
- package/corpus/templates/content/actions/ensure-content-spaces.ts +26 -0
- package/corpus/templates/content/actions/export-content-source.ts +47 -9
- package/corpus/templates/content/actions/get-document.ts +0 -14
- package/corpus/templates/content/actions/import-content-source.ts +43 -3
- package/corpus/templates/content/actions/list-content-spaces.ts +103 -0
- package/corpus/templates/content/actions/list-documents.ts +12 -9
- package/corpus/templates/content/actions/move-document.ts +3 -14
- package/corpus/templates/content/actions/pull-document.ts +0 -23
- package/corpus/templates/content/actions/remove-local-file-source.ts +50 -29
- package/corpus/templates/content/actions/resolve-local-folder-conflict.ts +442 -0
- package/corpus/templates/content/actions/reveal-local-source-file.ts +6 -17
- package/corpus/templates/content/actions/search-documents.ts +0 -34
- package/corpus/templates/content/actions/share-local-file-document.ts +25 -1
- package/corpus/templates/content/actions/submit-content-database-form.ts +12 -0
- package/corpus/templates/content/actions/sync-local-folder-source.ts +731 -0
- package/corpus/templates/content/actions/sync-manifest-local-folder-source.ts +123 -0
- package/corpus/templates/content/actions/update-content-database-view.ts +10 -1
- package/corpus/templates/content/actions/update-document.ts +0 -15
- package/corpus/templates/content/actions/view-screen.ts +2 -50
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +76 -62
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +70 -22
- package/corpus/templates/content/app/components/editor/database/grouping.ts +2 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +23 -20
- package/corpus/templates/content/app/components/editor/database/shared.tsx +2 -0
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +330 -0
- package/corpus/templates/content/app/components/editor/database/types.ts +1 -0
- package/corpus/templates/content/app/components/editor/database/view-config.ts +3 -1
- package/corpus/templates/content/app/components/layout/Layout.tsx +25 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +209 -113
- package/corpus/templates/content/app/components/sidebar/select-content-space.ts +31 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +16 -0
- package/corpus/templates/content/app/hooks/use-content-spaces.ts +39 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +11 -0
- package/corpus/templates/content/app/i18n-data.ts +75 -0
- package/corpus/templates/content/app/routes/_app.local-files.tsx +174 -65
- package/corpus/templates/content/changelog/2026-07-16-content-callouts-can-now-be-reviewed-and-published-to-builder.md +6 -0
- package/corpus/templates/content/changelog/2026-07-16-heading-5-and-heading-6-are-available-from-the-editor-slash-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-16-organize-every-workspace-through-a-customizable-files-databa.md +6 -0
- package/corpus/templates/content/parity/matrix.md +2 -1
- package/corpus/templates/content/parity/matrix.ts +37 -1
- package/corpus/templates/content/scripts/dev-database.mjs +7 -5
- package/corpus/templates/content/server/db/schema.ts +113 -40
- package/corpus/templates/content/server/lib/document-context.ts +15 -1
- package/corpus/templates/content/server/lib/notion-sync.ts +6 -0
- package/corpus/templates/content/server/plugins/db.ts +153 -0
- package/corpus/templates/content/shared/api.ts +17 -3
- package/corpus/templates/content/shared/builder-mdx.ts +163 -16
- package/corpus/templates/design/.agents/skills/design-templates/SKILL.md +59 -0
- package/corpus/templates/design/AGENTS.md +6 -1
- package/corpus/templates/design/actions/create-design-from-template.ts +19 -7
- package/corpus/templates/design/actions/list-design-templates.ts +69 -21
- package/corpus/templates/design/actions/navigate.ts +2 -2
- package/corpus/templates/design/actions/view-screen.ts +15 -2
- package/corpus/templates/design/agent-native.app-skill.json +5 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +281 -56
- package/corpus/templates/design/app/components/templates/TemplatePreview.tsx +14 -2
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +3 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +3 -3
- package/corpus/templates/design/app/i18n-data.ts +21 -2
- package/corpus/templates/design/app/i18n-template-feature.ts +218 -10
- package/corpus/templates/design/app/pages/Index.tsx +195 -24
- package/corpus/templates/design/app/pages/Templates.tsx +144 -55
- package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +12 -1
- package/corpus/templates/design/changelog/2026-07-14-templates-now-appear-in-the-new-design-picker-with-previews-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-15-templates-now-open-immediately-after-copying-even-while-the-.md +6 -0
- package/corpus/templates/design/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/mail/AGENTS.md +23 -18
- package/corpus/templates/mail/actions/bulk-archive.ts +32 -28
- package/corpus/templates/mail/actions/mark-read.ts +131 -20
- package/corpus/templates/mail/actions/mark-thread-read.ts +1 -1
- package/corpus/templates/mail/actions/move-email.ts +30 -24
- package/corpus/templates/mail/actions/send-email.ts +73 -68
- package/corpus/templates/mail/changelog/2026-07-15-unread-inbox-cleanup-now-completes-reliably.md +6 -0
- package/corpus/templates/mail/server/handlers/emails.ts +218 -209
- package/corpus/templates/mail/server/lib/bulk-mark-read.ts +30 -0
- package/corpus/templates/mail/server/lib/email-state.ts +198 -113
- package/corpus/templates/mail/server/lib/google-auth.ts +218 -25
- package/corpus/templates/mail/server/lib/jobs.ts +69 -74
- package/corpus/templates/mail/server/lib/local-email-store.ts +265 -0
- package/corpus/templates/mail/server/plugins/agent-chat.ts +6 -0
- package/dist/cli/content-local.d.ts +1 -0
- package/dist/cli/content-local.d.ts.map +1 -1
- package/dist/cli/content-local.js +75 -17
- package/dist/cli/content-local.js.map +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills-content/content-skill.d.ts +1 -1
- package/dist/cli/skills-content/content-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/content-skill.js +36 -25
- package/dist/cli/skills-content/content-skill.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +47 -14
- package/dist/cli/skills.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/local-artifacts/index.d.ts +10 -0
- package/dist/local-artifacts/index.d.ts.map +1 -1
- package/dist/local-artifacts/index.js +39 -0
- package/dist/local-artifacts/index.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/docs/content/local-file-mode.mdx +99 -489
- package/docs/content/locales/ar-SA/local-file-mode.mdx +35 -490
- package/docs/content/locales/ar-SA/template-content.mdx +10 -24
- package/docs/content/locales/de-DE/local-file-mode.mdx +37 -491
- package/docs/content/locales/de-DE/template-content.mdx +10 -24
- package/docs/content/locales/es-ES/local-file-mode.mdx +35 -493
- package/docs/content/locales/es-ES/template-content.mdx +10 -24
- package/docs/content/locales/fr-FR/local-file-mode.mdx +38 -491
- package/docs/content/locales/fr-FR/template-content.mdx +10 -24
- package/docs/content/locales/hi-IN/local-file-mode.mdx +33 -492
- package/docs/content/locales/hi-IN/template-content.mdx +10 -24
- package/docs/content/locales/ja-JP/local-file-mode.mdx +36 -492
- package/docs/content/locales/ja-JP/template-content.mdx +10 -24
- package/docs/content/locales/ko-KR/local-file-mode.mdx +35 -490
- package/docs/content/locales/ko-KR/template-content.mdx +10 -24
- package/docs/content/locales/pt-BR/local-file-mode.mdx +35 -493
- package/docs/content/locales/pt-BR/template-content.mdx +10 -24
- package/docs/content/locales/zh-CN/local-file-mode.mdx +31 -489
- package/docs/content/locales/zh-CN/template-content.mdx +9 -24
- package/docs/content/locales/zh-TW/local-file-mode.mdx +31 -489
- package/docs/content/locales/zh-TW/template-content.mdx +9 -24
- package/docs/content/template-content.mdx +26 -42
- package/package.json +1 -1
- package/corpus/templates/assets/app/components/library/EditLibraryDialog.tsx +0 -126
|
@@ -1,531 +1,141 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Local
|
|
3
|
-
description: "
|
|
2
|
+
title: "Local folder sources"
|
|
3
|
+
description: "Connect Markdown and MDX folders to Content's database-backed spaces without switching the app into a separate local mode."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Local
|
|
7
|
-
|
|
8
|
-
Local File Mode lets an agent-native app attach its normal UI and action surface
|
|
9
|
-
directly to files in a repo or workspace. The app still feels like the hosted
|
|
10
|
-
product, but its list views, editor, and agent tools read and write local files
|
|
11
|
-
instead of SQL-backed app records.
|
|
12
|
-
|
|
13
|
-
The first implementation is in the Content template: the left sidebar is
|
|
14
|
-
populated from local `.md` and `.mdx` files, selecting a page opens the standard
|
|
15
|
-
Content editor, and saving writes back to the selected file. The same files can
|
|
16
|
-
also be edited by Codex, Claude Code, the Agent-Native sidebar agent, or a normal
|
|
17
|
-
editor.
|
|
18
|
-
|
|
19
|
-
For Content, this makes the product feel like open-source Obsidian for MDX:
|
|
20
|
-
your docs live as files, while the app adds a visual editor, agent actions,
|
|
21
|
-
shareable copies, and rich interactive MDX components.
|
|
22
|
-
|
|
23
|
-
Use Local File Mode when you want a repo-first workflow:
|
|
24
|
-
|
|
25
|
-
- a docs repo with `docs/*.mdx`
|
|
26
|
-
- a blog with `blog/*.mdx`
|
|
27
|
-
- resources such as positioning, messaging, or team notes in `resources/*.md`
|
|
28
|
-
- a personal Obsidian-style knowledge base with a richer MDX editor
|
|
29
|
-
- docs that need interactive custom MDX blocks generated from local React code
|
|
30
|
-
- app artifacts that should be easy for coding agents to inspect and patch
|
|
31
|
-
|
|
32
|
-
Use database mode when you want the hosted collaborative app experience:
|
|
33
|
-
multi-user sharing, SQL-backed permissions, comments, version history, and
|
|
34
|
-
production hosting without local filesystem access.
|
|
35
|
-
|
|
36
|
-
## The Mental Model
|
|
37
|
-
|
|
38
|
-
There are two source-of-truth modes:
|
|
39
|
-
|
|
40
|
-
| Mode | Source of truth | Best for |
|
|
41
|
-
| --------------- | ------------------------------------------ | ------------------------------------------------------------------------ |
|
|
42
|
-
| Database mode | SQL rows through Drizzle | Hosted apps, collaboration, sharing, comments, version history |
|
|
43
|
-
| Local File Mode | Repo files declared by `agent-native.json` | Local/dev workflows, Git review, coding-agent edits, file-native content |
|
|
44
|
-
|
|
45
|
-
The UI and agent actions should stay the same shape in both modes. A Content
|
|
46
|
-
editor still edits documents; the difference is whether those documents resolve
|
|
47
|
-
to SQL rows or local files.
|
|
48
|
-
|
|
49
|
-
<Diagram id="doc-block-1bxzygx" title="Same actions, two sources of truth" summary="The UI and agent call identical actions in both modes. The action layer decides whether each call resolves to SQL rows or repo files.">
|
|
50
|
-
|
|
51
|
-
```html
|
|
52
|
-
<div class="diagram-mode">
|
|
53
|
-
<div class="diagram-col entry">
|
|
54
|
-
<div class="diagram-node">Content UI</div>
|
|
55
|
-
<div class="diagram-node">
|
|
56
|
-
Agent + actions<br /><small class="diagram-muted"
|
|
57
|
-
>list/get/update-document</small
|
|
58
|
-
>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
62
|
-
<div class="diagram-row resolve">
|
|
63
|
-
<div class="diagram-panel" data-rough>
|
|
64
|
-
<span class="diagram-pill accent">Database mode</span
|
|
65
|
-
><small class="diagram-muted">SQL rows via Drizzle</small
|
|
66
|
-
><small class="diagram-muted"
|
|
67
|
-
>hosted · sharing · comments · history</small
|
|
68
|
-
>
|
|
69
|
-
</div>
|
|
70
|
-
<div class="diagram-panel" data-rough>
|
|
71
|
-
<span class="diagram-pill ok">Local File Mode</span
|
|
72
|
-
><small class="diagram-muted">repo files via agent-native.json</small
|
|
73
|
-
><small class="diagram-muted">Git review · coding-agent edits</small>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
```
|
|
6
|
+
# Local folder sources
|
|
78
7
|
|
|
79
|
-
|
|
80
|
-
.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
gap: 14px;
|
|
84
|
-
flex-wrap: wrap;
|
|
85
|
-
}
|
|
86
|
-
.diagram-mode .diagram-col {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
gap: 10px;
|
|
90
|
-
}
|
|
91
|
-
.diagram-mode .diagram-arrow {
|
|
92
|
-
font-size: 22px;
|
|
93
|
-
line-height: 1;
|
|
94
|
-
}
|
|
95
|
-
.diagram-mode .resolve {
|
|
96
|
-
display: flex;
|
|
97
|
-
gap: 12px;
|
|
98
|
-
flex-wrap: wrap;
|
|
99
|
-
}
|
|
100
|
-
.diagram-mode .diagram-panel {
|
|
101
|
-
display: flex;
|
|
102
|
-
flex-direction: column;
|
|
103
|
-
gap: 4px;
|
|
104
|
-
padding: 12px 14px;
|
|
105
|
-
}
|
|
106
|
-
```
|
|
8
|
+
Content has one data model: every page lives in SQL, belongs to a **space**, and
|
|
9
|
+
is a member of that space's system **Files** database. A local Markdown or MDX
|
|
10
|
+
folder is a source connected to Files. It is not a second application mode and
|
|
11
|
+
does not replace the database.
|
|
107
12
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
A Content workspace can be as small as this:
|
|
113
|
-
|
|
114
|
-
<FileTree
|
|
115
|
-
id="doc-block-1h7glo0"
|
|
116
|
-
title="A Content workspace repo"
|
|
117
|
-
entries={[
|
|
118
|
-
{
|
|
119
|
-
path: "agent-native.json",
|
|
120
|
-
note: "declares which folders are content roots and their kinds",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
path: "docs/",
|
|
124
|
-
note: "content root — shows in the sidebar as pages",
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
path: "docs/getting-started.mdx",
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
path: "docs/guides/custom-components.mdx",
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
path: "blog/",
|
|
134
|
-
note: "content root",
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
path: "blog/launch-post.mdx",
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
path: "resources/",
|
|
141
|
-
note: "content root",
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
path: "resources/messaging/positioning.md",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
path: "components/",
|
|
148
|
-
note: "NOT a content root — preview component library MDX can import",
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
path: "components/FrameworkTabs.tsx",
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
path: "components/Callout.tsx",
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
path: "extensions/",
|
|
158
|
-
note: "NOT a content root — local extension library (sandboxed widgets)",
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
path: "extensions/doc-status/extension.json",
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
path: "extensions/doc-status/index.html",
|
|
165
|
-
},
|
|
166
|
-
]}
|
|
167
|
-
/>
|
|
168
|
-
|
|
169
|
-
In Local File Mode, the Content sidebar shows the `docs/`, `blog/`, and
|
|
170
|
-
`resources/` trees as pages. Selecting `docs/getting-started.mdx` opens that
|
|
171
|
-
file in the standard Content editor; editing in the UI writes back to
|
|
172
|
-
`docs/getting-started.mdx`.
|
|
173
|
-
|
|
174
|
-
`components/` is not a content root. It is a preview component library that MDX
|
|
175
|
-
files can import or reference. The editor can render simple local MDX components
|
|
176
|
-
without requiring you to clone or fork the entire Content app.
|
|
177
|
-
|
|
178
|
-
`extensions/` is also not a content root. It is a local extension library:
|
|
179
|
-
small sandboxed widgets that can render in app slots while their source stays in
|
|
180
|
-
the repo.
|
|
181
|
-
|
|
182
|
-
## Install Content Into A Repo
|
|
183
|
-
|
|
184
|
-
For an existing docs, blog, or MDX workspace, install the Content local-files
|
|
185
|
-
skill:
|
|
13
|
+
This means local files can keep their familiar repo workflow while Content still
|
|
14
|
+
provides collaboration, sharing, comments, history, search, database properties,
|
|
15
|
+
and the same action surface everywhere. There is no `AGENT_NATIVE_MODE` switch
|
|
16
|
+
and no database/local fork in document actions.
|
|
186
17
|
|
|
187
|
-
|
|
188
|
-
npx @agent-native/core@latest skills add content --mode local-files --scope project
|
|
189
|
-
```
|
|
18
|
+
## Spaces, Files, and Workspaces
|
|
190
19
|
|
|
191
|
-
|
|
192
|
-
or updates `agent-native.json` with Content defaults:
|
|
20
|
+
Content provisions:
|
|
193
21
|
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
- `extensions/` for local extension widgets
|
|
22
|
+
- a personal space for each user
|
|
23
|
+
- an organization space for each organization the user can access
|
|
24
|
+
- a system **Files** database in every space
|
|
25
|
+
- a personal **Workspaces** catalog that references the spaces shown in the app
|
|
199
26
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
and unknown MDX.
|
|
27
|
+
Every ordinary page belongs to exactly one space and exactly one Files database.
|
|
28
|
+
Files is a normal Content database: add properties, save views, filter, sort, or
|
|
29
|
+
group it. Its sidebar view renders those same rows as navigation. Grouping a
|
|
30
|
+
sidebar view creates collapsible sections, while saved views can become alternate
|
|
31
|
+
sidebar tabs.
|
|
206
32
|
|
|
207
|
-
|
|
33
|
+
The Workspaces catalog applies the same idea one level higher. It controls which
|
|
34
|
+
personal, organization, and folder-backed spaces participate in the app sidebar.
|
|
208
35
|
|
|
209
|
-
|
|
36
|
+
## Connect a folder
|
|
210
37
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"content": {
|
|
216
|
-
"mode": "local-files",
|
|
217
|
-
"roots": [
|
|
218
|
-
{
|
|
219
|
-
"name": "Docs",
|
|
220
|
-
"path": "docs",
|
|
221
|
-
"kind": "docs",
|
|
222
|
-
"extensions": [".md", ".mdx"]
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "Blog",
|
|
226
|
-
"path": "blog",
|
|
227
|
-
"kind": "blog",
|
|
228
|
-
"extensions": [".md", ".mdx"]
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"name": "Resources",
|
|
232
|
-
"path": "resources",
|
|
233
|
-
"kind": "resources",
|
|
234
|
-
"extensions": [".md", ".mdx"]
|
|
235
|
-
}
|
|
236
|
-
],
|
|
237
|
-
"components": "components",
|
|
238
|
-
"extensions": "extensions",
|
|
239
|
-
"hide": ["**/_*.md", "**/_*.mdx"]
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
```
|
|
38
|
+
Open Content's local-folder screen and select a folder through the browser File
|
|
39
|
+
System Access API or Agent Native Desktop. Content stores only an opaque
|
|
40
|
+
connection identifier, relative paths, hashes, and source metadata in SQL. It
|
|
41
|
+
does not store the absolute path, browser handle, or raw file bodies there.
|
|
244
42
|
|
|
245
|
-
|
|
246
|
-
`AGENT_NATIVE_DATA_MODE=local-files`; the manifest is preferred because it
|
|
247
|
-
documents the folder contract in the repo itself.
|
|
43
|
+
A folder can be connected in either way:
|
|
248
44
|
|
|
249
|
-
|
|
45
|
+
- attach it to the Files database of an existing personal or organization space
|
|
46
|
+
- create a private folder-backed space with its own Files database
|
|
250
47
|
|
|
251
|
-
|
|
252
|
-
the editable document:
|
|
48
|
+
Choose a truth policy for the connection:
|
|
253
49
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
updatedAt: "2026-06-12T20:00:00.000Z"
|
|
260
|
-
---
|
|
50
|
+
| Policy | Behavior |
|
|
51
|
+
| ------------------------ | ------------------------------------------------------------------ |
|
|
52
|
+
| `database_primary` | Content is authoritative; folder changes are reviewed before use |
|
|
53
|
+
| `source_primary` | The folder is authoritative when no concurrent Content edit exists |
|
|
54
|
+
| `reviewed_bidirectional` | Changes in either direction require review at conflicts |
|
|
261
55
|
|
|
262
|
-
|
|
56
|
+
Initial sync materializes files as ordinary SQL-backed pages and records their
|
|
57
|
+
source identity. A repeated sync is idempotent. If a file and its Content page
|
|
58
|
+
both changed, Content records an incoming change set instead of silently
|
|
59
|
+
overwriting either side. Disconnecting keeps both the SQL pages and local files.
|
|
263
60
|
|
|
264
|
-
|
|
265
|
-
```
|
|
61
|
+
## Start Content for a repo
|
|
266
62
|
|
|
267
|
-
|
|
268
|
-
filename. The editor preserves MDX source that it cannot visually edit yet, so
|
|
269
|
-
coding agents and normal text editors remain safe escape hatches.
|
|
270
|
-
|
|
271
|
-
## Custom MDX Components
|
|
272
|
-
|
|
273
|
-
Content can preview local components from the configured `components` folder.
|
|
274
|
-
This is meant for docs-style MDX components such as tabs, callouts, package
|
|
275
|
-
install snippets, or framework-specific code blocks.
|
|
276
|
-
|
|
277
|
-
For example, add an interactive component next to your content:
|
|
278
|
-
|
|
279
|
-
```tsx filename="components/ImpactCounter.tsx"
|
|
280
|
-
import { useState } from "react";
|
|
281
|
-
|
|
282
|
-
export function ImpactCounter({
|
|
283
|
-
label = "points",
|
|
284
|
-
accent = "blue",
|
|
285
|
-
featured = false,
|
|
286
|
-
}: {
|
|
287
|
-
label?: string;
|
|
288
|
-
accent?: "blue" | "green" | "purple";
|
|
289
|
-
featured?: boolean;
|
|
290
|
-
}) {
|
|
291
|
-
const [count, setCount] = useState(3);
|
|
292
|
-
const accentClass =
|
|
293
|
-
accent === "green"
|
|
294
|
-
? "border-green-300 bg-green-50"
|
|
295
|
-
: accent === "purple"
|
|
296
|
-
? "border-purple-300 bg-purple-50"
|
|
297
|
-
: "border-blue-300 bg-blue-50";
|
|
298
|
-
|
|
299
|
-
return (
|
|
300
|
-
<div className={`rounded-md border p-4 ${accentClass}`}>
|
|
301
|
-
<div className="text-sm text-muted-foreground">Launch impact</div>
|
|
302
|
-
<div className="mt-1 text-3xl font-semibold">
|
|
303
|
-
{count} {label}
|
|
304
|
-
</div>
|
|
305
|
-
{featured ? <div className="mt-1 text-sm">Featured metric</div> : null}
|
|
306
|
-
<button
|
|
307
|
-
type="button"
|
|
308
|
-
className="mt-3 rounded border px-3 py-1 text-sm"
|
|
309
|
-
onClick={() => setCount((value) => value + 1)}
|
|
310
|
-
>
|
|
311
|
-
Add point
|
|
312
|
-
</button>
|
|
313
|
-
</div>
|
|
314
|
-
);
|
|
315
|
-
}
|
|
63
|
+
From a repo or folder, run:
|
|
316
64
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
type: "string",
|
|
320
|
-
label: "Metric label",
|
|
321
|
-
default: "points",
|
|
322
|
-
},
|
|
323
|
-
accent: {
|
|
324
|
-
type: "select",
|
|
325
|
-
label: "Accent",
|
|
326
|
-
options: ["blue", "green", "purple"],
|
|
327
|
-
default: "blue",
|
|
328
|
-
},
|
|
329
|
-
featured: {
|
|
330
|
-
type: "boolean",
|
|
331
|
-
label: "Featured",
|
|
332
|
-
default: false,
|
|
333
|
-
},
|
|
334
|
-
};
|
|
65
|
+
```bash
|
|
66
|
+
npx @agent-native/core@latest content .
|
|
335
67
|
```
|
|
336
68
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
```mdx
|
|
340
|
-
---
|
|
341
|
-
title: "Launch Notes"
|
|
342
|
-
---
|
|
343
|
-
|
|
344
|
-
# Launch Notes
|
|
345
|
-
|
|
346
|
-
<ImpactCounter label="wins" />
|
|
347
|
-
```
|
|
69
|
+
You can also target one file:
|
|
348
70
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
components render inside the editor and appear in the slash menu under
|
|
352
|
-
**Local components**. Slash insertion creates a minimal tag such as
|
|
353
|
-
`<ImpactCounter />`; add props in the MDX source when needed.
|
|
354
|
-
|
|
355
|
-
Component execution is intentionally a local-dev/Desktop bridge capability, not
|
|
356
|
-
plain hosted browser folder access. If you open `content.agent-native.com`,
|
|
357
|
-
choose **Local files**, and pick a folder in Chrome, the app can read and write
|
|
358
|
-
the `.md` and `.mdx` files through the browser File System Access API, but
|
|
359
|
-
Chrome does not expose an absolute folder path for Vite to compile
|
|
360
|
-
`components/*.tsx`. To preview and hot reload custom React components, run
|
|
361
|
-
Content locally or use Agent Native Desktop so the trusted local bridge can
|
|
362
|
-
register the picked workspace with the local Content dev server. In that mode,
|
|
363
|
-
edits to existing component files hot reload through Vite, and adding or
|
|
364
|
-
removing component files reloads the component registry and slash menu.
|
|
365
|
-
|
|
366
|
-
Agents can also work with those registered component files. Use
|
|
367
|
-
`list-local-component-files` to find the registered workspace id, then
|
|
368
|
-
`write-local-component-file` to create or update `.tsx`, `.jsx`, `.ts`, or
|
|
369
|
-
`.js` files under the workspace's `components/` folder. The MDX files remain the
|
|
370
|
-
source of truth for component usage; the component files remain normal repo
|
|
371
|
-
source files reviewed with Git.
|
|
372
|
-
|
|
373
|
-
If a component exports input metadata, selecting the component in the editor
|
|
374
|
-
shows an edit button in the component's top-right corner. Supported input types
|
|
375
|
-
are `string`, `textarea`, `number`, `boolean`, and `select`. The form writes
|
|
376
|
-
changes back to the MDX tag, so local files remain the source of truth. The
|
|
377
|
-
metadata can be exported as `ComponentNameInputs`, `ComponentNameConfig.inputs`,
|
|
378
|
-
`Component.inputs`, or `agentNative.inputs`.
|
|
379
|
-
|
|
380
|
-
Simple component tags with literal props can preview inline:
|
|
381
|
-
|
|
382
|
-
```mdx
|
|
383
|
-
<FrameworkTabs value="react" />
|
|
384
|
-
|
|
385
|
-
<Callout tone="warning">
|
|
386
|
-
|
|
387
|
-
This setting affects production deploys.
|
|
388
|
-
|
|
389
|
-
</Callout>
|
|
71
|
+
```bash
|
|
72
|
+
npx @agent-native/core@latest content docs/getting-started.mdx
|
|
390
73
|
```
|
|
391
74
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
## Sharing Local Files
|
|
397
|
-
|
|
398
|
-
Local files are not shared directly because other users cannot read a path on
|
|
399
|
-
your machine. The Content toolbar's Share button creates or refreshes a
|
|
400
|
-
database-backed copy of the selected file, navigates to that copy, and opens the
|
|
401
|
-
normal share popover. The original local file remains under Local files; the
|
|
402
|
-
database copy appears under Shared copies in Local File Mode and uses the
|
|
403
|
-
standard document sharing model.
|
|
75
|
+
The CLI starts the normal database-backed Content app, registers the folder as a
|
|
76
|
+
local-folder source, and opens the connection screen. It does not set a mode
|
|
77
|
+
environment variable.
|
|
404
78
|
|
|
405
|
-
##
|
|
79
|
+
## Manifest configuration
|
|
406
80
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
manifest and an HTML entry file:
|
|
410
|
-
|
|
411
|
-
```text
|
|
412
|
-
extensions/
|
|
413
|
-
doc-status/
|
|
414
|
-
extension.json
|
|
415
|
-
index.html
|
|
416
|
-
```
|
|
81
|
+
`agent-native.json` declares folder roots and their adapter metadata. `mode` is
|
|
82
|
+
not a runtime selector:
|
|
417
83
|
|
|
418
84
|
```json
|
|
419
85
|
{
|
|
420
|
-
"
|
|
421
|
-
"
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
86
|
+
"version": 1,
|
|
87
|
+
"apps": {
|
|
88
|
+
"content": {
|
|
89
|
+
"roots": [
|
|
90
|
+
{
|
|
91
|
+
"name": "Docs",
|
|
92
|
+
"path": "docs",
|
|
93
|
+
"kind": "docs",
|
|
94
|
+
"extensions": [".md", ".mdx"],
|
|
95
|
+
"source": {
|
|
96
|
+
"type": "local-folder",
|
|
97
|
+
"connectionId": "local-folder:<opaque-id>",
|
|
98
|
+
"truthPolicy": "source_primary"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"components": "components",
|
|
103
|
+
"extensions": "extensions",
|
|
104
|
+
"hide": ["**/_*.md", "**/_*.mdx"]
|
|
105
|
+
}
|
|
428
106
|
}
|
|
429
107
|
}
|
|
430
108
|
```
|
|
431
109
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
declares `content.sidebar.bottom`, it renders that extension at the bottom of
|
|
435
|
-
the Content sidebar. The host passes `window.slotContext` with the selected
|
|
436
|
-
document id, title, source metadata, and whether Content is in Local File Mode.
|
|
437
|
-
|
|
438
|
-
Local extensions are previewed by the app but edited as files. The Extensions
|
|
439
|
-
list shows them with a Local File badge, and the full-page viewer points back to
|
|
440
|
-
the entry file. SQL-backed extension actions such as update, delete, share, and
|
|
441
|
-
history do not apply; use your editor, Codex, Claude Code, or Git history for
|
|
442
|
-
source changes.
|
|
110
|
+
The connection identifier is deliberately opaque. The trusted browser or
|
|
111
|
+
Desktop bridge maps it back to a folder handle locally.
|
|
443
112
|
|
|
444
|
-
|
|
113
|
+
## File format and identity
|
|
445
114
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
- slot targets are declared in `extension.json`, not installed through SQL
|
|
115
|
+
Content reads `.md` and `.mdx`. Frontmatter may preserve the stable Content page
|
|
116
|
+
ID, title, parent, ordering, and other supported metadata. Keeping the ID allows
|
|
117
|
+
renames and moves to retain page identity instead of creating duplicates.
|
|
450
118
|
|
|
451
|
-
|
|
452
|
-
|
|
119
|
+
Unknown frontmatter, imports, JSX, and custom MDX should be preserved by tools
|
|
120
|
+
that edit the source. Local components remain in the configured `components/`
|
|
121
|
+
folder and are loaded only through the trusted local bridge. Local extensions
|
|
122
|
+
remain sandboxed under `extensions/`.
|
|
453
123
|
|
|
454
|
-
##
|
|
124
|
+
## Migration from Local File Mode
|
|
455
125
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
For Content, that means:
|
|
461
|
-
|
|
462
|
-
- `list-documents` lists configured `.md` and `.mdx` files.
|
|
463
|
-
- `get-document` reads a selected local file.
|
|
464
|
-
- `update-document` writes the selected local file.
|
|
465
|
-
- `create-document` creates a new local `.mdx` file in the selected folder.
|
|
466
|
-
- `delete-document` deletes the local file.
|
|
467
|
-
- search runs across the configured local files.
|
|
468
|
-
|
|
469
|
-
Moving, renaming, and reordering local-file pages from the Content UI is not
|
|
470
|
-
supported yet. Do those operations in the workspace or with a coding agent; the
|
|
471
|
-
Content sidebar will reflect the resulting file tree.
|
|
472
|
-
|
|
473
|
-
This keeps the agent contract simple: the agent can keep using Content actions,
|
|
474
|
-
and those actions decide whether the target is SQL-backed or file-backed.
|
|
475
|
-
|
|
476
|
-
Other apps can adopt the same pattern over time. A Slides app can map
|
|
477
|
-
`slides/*.mdx` to decks, a Plans app can map `plans/*` to plan documents, and a
|
|
478
|
-
Dashboards app can map `dashboards/*.mdx` to dashboards. Those app-specific
|
|
479
|
-
folders are conventions layered on top of the same local artifact contract.
|
|
480
|
-
|
|
481
|
-
## Local Files vs. Export/Import
|
|
482
|
-
|
|
483
|
-
Content has two different file workflows:
|
|
484
|
-
|
|
485
|
-
| Workflow | What happens |
|
|
486
|
-
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
487
|
-
| `/local-files` export/import | Database mode remains the source of truth. Files are an explicit sync surface you export, edit, preview, and import. |
|
|
488
|
-
| Local File Mode | Files are the source of truth. The Content sidebar and editor operate directly on local files. |
|
|
489
|
-
|
|
490
|
-
Use export/import when you want occasional file review around a hosted workspace.
|
|
491
|
-
Use Local File Mode when the repo itself is the workspace.
|
|
492
|
-
|
|
493
|
-
## History And Collaboration
|
|
494
|
-
|
|
495
|
-
Local File Mode leans on file-native history:
|
|
496
|
-
|
|
497
|
-
- commit important changes to Git
|
|
498
|
-
- use pull requests for review
|
|
499
|
-
- let coding agents edit the same files directly
|
|
500
|
-
- use normal file diffs to understand changes
|
|
501
|
-
|
|
502
|
-
Database mode remains the better fit for hosted collaboration features such as
|
|
503
|
-
sharing, comments, SQL-backed version history, and live multi-user editing.
|
|
504
|
-
|
|
505
|
-
Provider sync can be layered on top of either mode. For example, a docs repo can
|
|
506
|
-
add actions that pull content from a CMS into local MDX files or push selected
|
|
507
|
-
local files back to that CMS.
|
|
508
|
-
|
|
509
|
-
## Production Safety
|
|
510
|
-
|
|
511
|
-
Local File Mode gives app actions direct write access to configured workspace
|
|
512
|
-
files. That is appropriate for local development and trusted single-tenant file
|
|
513
|
-
bridges, but it is not the default production security model.
|
|
514
|
-
|
|
515
|
-
When `NODE_ENV=production`, the framework refuses `local-files` mode unless you
|
|
516
|
-
set:
|
|
517
|
-
|
|
518
|
-
```bash
|
|
519
|
-
AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
|
|
520
|
-
```
|
|
126
|
+
Older manifests may contain `mode: "local-files"`, and older launch workflows
|
|
127
|
+
may set `AGENT_NATIVE_MODE=local-files`. Remove both. Keep the configured roots,
|
|
128
|
+
add `source.type`, `source.connectionId`, and `source.truthPolicy`, then launch
|
|
129
|
+
with `agent-native content <file-or-folder>`.
|
|
521
130
|
|
|
522
|
-
|
|
523
|
-
the app is allowed to read and write the configured files. For normal hosted,
|
|
524
|
-
multi-user apps, use database mode and SQL-backed sharing.
|
|
131
|
+
After the first connection and sync, verify:
|
|
525
132
|
|
|
526
|
-
|
|
133
|
+
1. the folder appears as a source on the intended Files database
|
|
134
|
+
2. each imported page belongs to the intended space
|
|
135
|
+
3. custom properties and saved sidebar views work normally
|
|
136
|
+
4. concurrent edits appear as reviewable change sets
|
|
137
|
+
5. disconnecting preserves the database pages and the files on disk
|
|
527
138
|
|
|
528
|
-
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
- [**Creating Templates**](/docs/creating-templates) — adopting the same local-artifact pattern in a new app
|
|
139
|
+
The old two-mode architecture is retired. Local folders are now adapters around
|
|
140
|
+
the global database model—which is less dramatic than a mode switch, and much
|
|
141
|
+
less likely to leave half the product living in a parallel universe.
|