From 05bddc4cd2d44268173af6c9b3c784f91cd4c2dd Mon Sep 17 00:00:00 2001
From: Alice Alexandra Moore <86723305+3mdistal@users.noreply.github.com>
Date: Thu, 16 Jul 2026 15:49:03 -0400
Subject: [PATCH 01/76] feat(content): unify workspaces around database-backed
files
---
.changeset/calm-files-share.md | 5 +
.../core/docs/content/local-file-mode.mdx | 588 +++-------------
.../content/locales/ar-SA/local-file-mode.mdx | 525 +-------------
.../locales/ar-SA/template-content.mdx | 34 +-
.../content/locales/de-DE/local-file-mode.mdx | 528 +--------------
.../locales/de-DE/template-content.mdx | 34 +-
.../content/locales/es-ES/local-file-mode.mdx | 528 +--------------
.../locales/es-ES/template-content.mdx | 34 +-
.../content/locales/fr-FR/local-file-mode.mdx | 529 ++-------------
.../locales/fr-FR/template-content.mdx | 34 +-
.../content/locales/hi-IN/local-file-mode.mdx | 525 +-------------
.../locales/hi-IN/template-content.mdx | 34 +-
.../content/locales/ja-JP/local-file-mode.mdx | 528 +--------------
.../locales/ja-JP/template-content.mdx | 34 +-
.../content/locales/ko-KR/local-file-mode.mdx | 525 +-------------
.../locales/ko-KR/template-content.mdx | 34 +-
.../content/locales/pt-BR/local-file-mode.mdx | 528 +--------------
.../locales/pt-BR/template-content.mdx | 34 +-
.../content/locales/zh-CN/local-file-mode.mdx | 520 +-------------
.../locales/zh-CN/template-content.mdx | 33 +-
.../content/locales/zh-TW/local-file-mode.mdx | 520 +-------------
.../locales/zh-TW/template-content.mdx | 33 +-
.../core/docs/content/template-content.mdx | 68 +-
packages/core/src/cli/content-local.spec.ts | 56 +-
packages/core/src/cli/content-local.ts | 69 +-
packages/core/src/cli/index.ts | 4 +-
.../core/src/local-artifacts/index.spec.ts | 47 ++
packages/core/src/local-artifacts/index.ts | 65 ++
.../content/.agents/skills/content/SKILL.md | 65 +-
templates/content/AGENTS.md | 55 +-
.../content/actions/_builder-docs-client.ts | 23 +
.../_content-database-source-adapters.test.ts | 5 +-
.../_content-database-source-adapters.ts | 24 +-
templates/content/actions/_content-files.ts | 320 +++++++++
.../content/actions/_content-space-access.ts | 135 ++++
templates/content/actions/_content-spaces.ts | 613 +++++++++++++++++
.../content/actions/_database-source-utils.ts | 89 ++-
templates/content/actions/_database-utils.ts | 8 +-
.../actions/_local-file-documents.test.ts | 73 +-
.../content/actions/_local-file-documents.ts | 9 -
.../actions/_local-folder-source.test.ts | 40 ++
.../content/actions/_local-folder-source.ts | 53 ++
templates/content/actions/_property-utils.ts | 13 +-
.../content/actions/add-database-item.ts | 172 +++--
.../content/actions/backfill-content-files.ts | 22 +
.../actions/connect-local-folder-source.ts | 221 ++++++
.../content/actions/content-files.db.test.ts | 272 ++++++++
.../content/actions/content-spaces.db.test.ts | 256 +++++++
.../actions/create-content-database.ts | 126 +++-
.../content/actions/create-document.test.ts | 53 --
templates/content/actions/create-document.ts | 117 ++--
.../actions/create-inline-content-database.ts | 7 +-
.../database-row-batch-actions.db.test.ts | 35 +
.../actions/delete-content-database.ts | 3 +
templates/content/actions/delete-document.ts | 18 +-
.../actions/disconnect-local-folder-source.ts | 103 +++
.../actions/duplicate-database-item.ts | 10 +
.../actions/duplicate-database-items.ts | 13 +
templates/content/actions/edit-document.ts | 30 +-
.../content/actions/ensure-content-spaces.ts | 26 +
.../content/actions/export-content-source.ts | 56 +-
templates/content/actions/get-document.ts | 14 -
.../actions/import-content-source.db.test.ts | 19 +-
.../content/actions/import-content-source.ts | 44 +-
.../content/actions/list-content-spaces.ts | 103 +++
templates/content/actions/list-documents.ts | 21 +-
.../actions/local-folder-source.db.test.ts | 467 +++++++++++++
.../content/actions/move-document.db.test.ts | 12 +
templates/content/actions/move-document.ts | 17 +-
templates/content/actions/pull-document.ts | 23 -
.../actions/remove-local-file-source.ts | 79 ++-
.../actions/resolve-local-folder-conflict.ts | 295 ++++++++
.../resync-content-database-source.db.test.ts | 36 +
.../actions/reveal-local-source-file.ts | 23 +-
templates/content/actions/search-documents.ts | 34 -
.../actions/share-local-file-document.ts | 26 +-
.../actions/space-aware-writers.db.test.ts | 212 ++++++
.../actions/split-mode-retirement.test.ts | 38 ++
.../submit-content-database-form.db.test.ts | 33 +
.../actions/submit-content-database-form.ts | 12 +
.../actions/sync-local-folder-source.ts | 638 ++++++++++++++++++
.../sync-manifest-local-folder-source.ts | 123 ++++
.../update-content-database-view.test.ts | 22 +
.../actions/update-content-database-view.ts | 11 +-
templates/content/actions/update-document.ts | 15 -
templates/content/actions/view-screen.ts | 52 +-
.../editor/database/DatabaseView.tsx | 92 ++-
.../components/editor/database/grouping.ts | 3 +-
.../components/editor/database/settings.tsx | 43 +-
.../app/components/editor/database/shared.tsx | 2 +
.../editor/database/sidebar.test.tsx | 72 ++
.../components/editor/database/sidebar.tsx | 330 +++++++++
.../app/components/editor/database/types.ts | 1 +
.../editor/database/view-config.test.ts | 20 +
.../components/editor/database/view-config.ts | 4 +-
.../content/app/components/layout/Layout.tsx | 26 +-
.../sidebar/DocumentSidebar.layout.test.ts | 29 +-
.../components/sidebar/DocumentSidebar.tsx | 288 +++++---
.../content/app/hooks/use-content-database.ts | 16 +
.../content/app/hooks/use-content-spaces.ts | 39 ++
templates/content/app/i18n-data.ts | 35 +
templates/content/app/i18n/zh-TW.ts | 7 +
.../content/app/routes/_app.local-files.tsx | 239 +++++--
...ace-through-a-customizable-files-databa.md | 6 +
templates/content/parity/matrix.md | 3 +-
templates/content/parity/matrix.ts | 38 +-
templates/content/scripts/dev-database.mjs | 12 +-
.../server/db/content-spaces-schema.spec.ts | 51 ++
templates/content/server/db/schema.ts | 153 +++--
.../content/server/lib/document-context.ts | 16 +-
templates/content/server/lib/notion-sync.ts | 6 +
templates/content/server/plugins/db.ts | 153 +++++
templates/content/shared/api.ts | 20 +-
113 files changed, 7049 insertions(+), 6585 deletions(-)
create mode 100644 .changeset/calm-files-share.md
create mode 100644 templates/content/actions/_content-files.ts
create mode 100644 templates/content/actions/_content-space-access.ts
create mode 100644 templates/content/actions/_content-spaces.ts
create mode 100644 templates/content/actions/_local-folder-source.test.ts
create mode 100644 templates/content/actions/_local-folder-source.ts
create mode 100644 templates/content/actions/backfill-content-files.ts
create mode 100644 templates/content/actions/connect-local-folder-source.ts
create mode 100644 templates/content/actions/content-files.db.test.ts
create mode 100644 templates/content/actions/content-spaces.db.test.ts
delete mode 100644 templates/content/actions/create-document.test.ts
create mode 100644 templates/content/actions/disconnect-local-folder-source.ts
create mode 100644 templates/content/actions/ensure-content-spaces.ts
create mode 100644 templates/content/actions/list-content-spaces.ts
create mode 100644 templates/content/actions/local-folder-source.db.test.ts
create mode 100644 templates/content/actions/resolve-local-folder-conflict.ts
create mode 100644 templates/content/actions/space-aware-writers.db.test.ts
create mode 100644 templates/content/actions/split-mode-retirement.test.ts
create mode 100644 templates/content/actions/sync-local-folder-source.ts
create mode 100644 templates/content/actions/sync-manifest-local-folder-source.ts
create mode 100644 templates/content/app/components/editor/database/sidebar.test.tsx
create mode 100644 templates/content/app/components/editor/database/sidebar.tsx
create mode 100644 templates/content/app/hooks/use-content-spaces.ts
create mode 100644 templates/content/changelog/2026-07-16-organize-every-workspace-through-a-customizable-files-databa.md
create mode 100644 templates/content/server/db/content-spaces-schema.spec.ts
diff --git a/.changeset/calm-files-share.md b/.changeset/calm-files-share.md
new file mode 100644
index 0000000000..65be1757e7
--- /dev/null
+++ b/.changeset/calm-files-share.md
@@ -0,0 +1,5 @@
+---
+"@agent-native/core": minor
+---
+
+Let Content connect manifest-declared local folders to its normal database-backed workspace without enabling a separate local-file data mode.
diff --git a/packages/core/docs/content/local-file-mode.mdx b/packages/core/docs/content/local-file-mode.mdx
index b412935b0d..1f2ec7e062 100644
--- a/packages/core/docs/content/local-file-mode.mdx
+++ b/packages/core/docs/content/local-file-mode.mdx
@@ -1,531 +1,141 @@
---
-title: "Local File Mode"
-description: "Run agent-native apps with local Markdown, MDX, and other repo files as the source of truth - including Obsidian-style MDX docs with custom components."
+title: "Local folder sources"
+description: "Connect Markdown and MDX folders to Content's database-backed spaces without switching the app into a separate local mode."
---
-# Local File Mode
-
-Local File Mode lets an agent-native app attach its normal UI and action surface
-directly to files in a repo or workspace. The app still feels like the hosted
-product, but its list views, editor, and agent tools read and write local files
-instead of SQL-backed app records.
-
-The first implementation is in the Content template: the left sidebar is
-populated from local `.md` and `.mdx` files, selecting a page opens the standard
-Content editor, and saving writes back to the selected file. The same files can
-also be edited by Codex, Claude Code, the Agent-Native sidebar agent, or a normal
-editor.
-
-For Content, this makes the product feel like open-source Obsidian for MDX:
-your docs live as files, while the app adds a visual editor, agent actions,
-shareable copies, and rich interactive MDX components.
-
-Use Local File Mode when you want a repo-first workflow:
-
-- a docs repo with `docs/*.mdx`
-- a blog with `blog/*.mdx`
-- resources such as positioning, messaging, or team notes in `resources/*.md`
-- a personal Obsidian-style knowledge base with a richer MDX editor
-- docs that need interactive custom MDX blocks generated from local React code
-- app artifacts that should be easy for coding agents to inspect and patch
-
-Use database mode when you want the hosted collaborative app experience:
-multi-user sharing, SQL-backed permissions, comments, version history, and
-production hosting without local filesystem access.
-
-## The Mental Model
-
-There are two source-of-truth modes:
-
-| Mode | Source of truth | Best for |
-| --------------- | ------------------------------------------ | ------------------------------------------------------------------------ |
-| Database mode | SQL rows through Drizzle | Hosted apps, collaboration, sharing, comments, version history |
-| Local File Mode | Repo files declared by `agent-native.json` | Local/dev workflows, Git review, coding-agent edits, file-native content |
-
-The UI and agent actions should stay the same shape in both modes. A Content
-editor still edits documents; the difference is whether those documents resolve
-to SQL rows or local files.
-
-
-
-```html
-
-
-
Content UI
-
- Agent + actions list/get/update-document
-
-
-
→
-
-
- Database modeSQL rows via Drizzlehosted · sharing · comments · history
-
-
- Local File Moderepo files via agent-native.jsonGit review · coding-agent edits
-
-
-
-```
+# Local folder sources
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
+Content has one data model: every page lives in SQL, belongs to a **space**, and
+is a member of that space's system **Files** database. A local Markdown or MDX
+folder is a source connected to Files. It is not a second application mode and
+does not replace the database.
-
-
-## Example Repo
-
-A Content workspace can be as small as this:
-
-
-
-In Local File Mode, the Content sidebar shows the `docs/`, `blog/`, and
-`resources/` trees as pages. Selecting `docs/getting-started.mdx` opens that
-file in the standard Content editor; editing in the UI writes back to
-`docs/getting-started.mdx`.
-
-`components/` is not a content root. It is a preview component library that MDX
-files can import or reference. The editor can render simple local MDX components
-without requiring you to clone or fork the entire Content app.
-
-`extensions/` is also not a content root. It is a local extension library:
-small sandboxed widgets that can render in app slots while their source stays in
-the repo.
-
-## Install Content Into A Repo
-
-For an existing docs, blog, or MDX workspace, install the Content local-files
-skill:
+This means local files can keep their familiar repo workflow while Content still
+provides collaboration, sharing, comments, history, search, database properties,
+and the same action surface everywhere. There is no `AGENT_NATIVE_MODE` switch
+and no database/local fork in document actions.
-```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
-```
+## Spaces, Files, and Workspaces
-This copies the `content` skill into the repo's agent skill folders and writes
-or updates `agent-native.json` with Content defaults:
+Content provisions:
-- `mode: "local-files"` at the workspace level
-- `apps.content.mode: "local-files"`
-- content roots for `docs/`, `blog/`, `content/`, and `resources/`
-- `components/` for local MDX components
-- `extensions/` for local extension widgets
+- a personal space for each user
+- an organization space for each organization the user can access
+- a system **Files** database in every space
+- a personal **Workspaces** catalog that references the spaces shown in the app
-The installed skill tells coding agents to use Content actions
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document`, and component-file actions) when a local Content app
-or Agent Native Desktop bridge exposes them. If no bridge is running, the skill
-falls back to safe direct repo edits while preserving frontmatter, imports, JSX,
-and unknown MDX.
+Every ordinary page belongs to exactly one space and exactly one Files database.
+Files is a normal Content database: add properties, save views, filter, sort, or
+group it. Its sidebar view renders those same rows as navigation. Grouping a
+sidebar view creates collapsible sections, while saved views can become alternate
+sidebar tabs.
-## Configuration
+The Workspaces catalog applies the same idea one level higher. It controls which
+personal, organization, and folder-backed spaces participate in the app sidebar.
-Add `agent-native.json` to the repo or workspace root:
+## Connect a folder
-```json
-{
- "version": 1,
- "apps": {
- "content": {
- "mode": "local-files",
- "roots": [
- {
- "name": "Docs",
- "path": "docs",
- "kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
- }
- ],
- "components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
- }
- }
-}
-```
+Open Content's local-folder screen and select a folder through the browser File
+System Access API or Agent Native Desktop. Content stores only an opaque
+connection identifier, relative paths, hashes, and source metadata in SQL. It
+does not store the absolute path, browser handle, or raw file bodies there.
-You can also enable local files with `AGENT_NATIVE_MODE=local-files` or
-`AGENT_NATIVE_DATA_MODE=local-files`; the manifest is preferred because it
-documents the folder contract in the repo itself.
+A folder can be connected in either way:
-## Content File Format
+- attach it to the Files database of an existing personal or organization space
+- create a private folder-backed space with its own Files database
-Content reads Markdown and MDX. Frontmatter holds page metadata, and the body is
-the editable document:
+Choose a truth policy for the connection:
-```mdx
----
-title: "Getting Started"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
+| Policy | Behavior |
+| ------------------------ | ------------------------------------------------------------------ |
+| `database_primary` | Content is authoritative; folder changes are reviewed before use |
+| `source_primary` | The folder is authoritative when no concurrent Content edit exists |
+| `reviewed_bidirectional` | Changes in either direction require review at conflicts |
-# Getting Started
+Initial sync materializes files as ordinary SQL-backed pages and records their
+source identity. A repeated sync is idempotent. If a file and its Content page
+both changed, Content records an incoming change set instead of silently
+overwriting either side. Disconnecting keeps both the SQL pages and local files.
-Use to show framework-specific code.
-```
+## Start Content for a repo
-The title comes from `title` frontmatter when present, otherwise from the
-filename. The editor preserves MDX source that it cannot visually edit yet, so
-coding agents and normal text editors remain safe escape hatches.
-
-## Custom MDX Components
-
-Content can preview local components from the configured `components` folder.
-This is meant for docs-style MDX components such as tabs, callouts, package
-install snippets, or framework-specific code blocks.
-
-For example, add an interactive component next to your content:
-
-```tsx filename="components/ImpactCounter.tsx"
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
+From a repo or folder, run:
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
+```bash
+npx @agent-native/core@latest content .
```
-Then use it from any local MDX file:
-
-```mdx
----
-title: "Launch Notes"
----
-
-# Launch Notes
-
-
-```
+You can also target one file:
-The Content dev server discovers PascalCase named exports and PascalCase default
-exports from `.tsx`, `.jsx`, `.ts`, and `.js` files under `components/`. Those
-components render inside the editor and appear in the slash menu under
-**Local components**. Slash insertion creates a minimal tag such as
-``; add props in the MDX source when needed.
-
-Component execution is intentionally a local-dev/Desktop bridge capability, not
-plain hosted browser folder access. If you open `content.agent-native.com`,
-choose **Local files**, and pick a folder in Chrome, the app can read and write
-the `.md` and `.mdx` files through the browser File System Access API, but
-Chrome does not expose an absolute folder path for Vite to compile
-`components/*.tsx`. To preview and hot reload custom React components, run
-Content locally or use Agent Native Desktop so the trusted local bridge can
-register the picked workspace with the local Content dev server. In that mode,
-edits to existing component files hot reload through Vite, and adding or
-removing component files reloads the component registry and slash menu.
-
-Agents can also work with those registered component files. Use
-`list-local-component-files` to find the registered workspace id, then
-`write-local-component-file` to create or update `.tsx`, `.jsx`, `.ts`, or
-`.js` files under the workspace's `components/` folder. The MDX files remain the
-source of truth for component usage; the component files remain normal repo
-source files reviewed with Git.
-
-If a component exports input metadata, selecting the component in the editor
-shows an edit button in the component's top-right corner. Supported input types
-are `string`, `textarea`, `number`, `boolean`, and `select`. The form writes
-changes back to the MDX tag, so local files remain the source of truth. The
-metadata can be exported as `ComponentNameInputs`, `ComponentNameConfig.inputs`,
-`Component.inputs`, or `agentNative.inputs`.
-
-Simple component tags with literal props can preview inline:
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
+```bash
+npx @agent-native/core@latest content docs/getting-started.mdx
```
-Complex JSX expressions are preserved in source. If the editor cannot safely
-preview a component prop yet, it shows a warning placeholder rather than
-silently dropping data.
-
-## Sharing Local Files
-
-Local files are not shared directly because other users cannot read a path on
-your machine. The Content toolbar's Share button creates or refreshes a
-database-backed copy of the selected file, navigates to that copy, and opens the
-normal share popover. The original local file remains under Local files; the
-database copy appears under Shared copies in Local File Mode and uses the
-standard document sharing model.
+The CLI starts the normal database-backed Content app, registers the folder as a
+local-folder source, and opens the connection screen. It does not set a mode
+environment variable.
-## Local Extensions
+## Manifest configuration
-Local File Mode can also load repo-backed extensions from the configured
-`extensions` folder. Each extension is one directory with an `extension.json`
-manifest and an HTML entry file:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
+`agent-native.json` declares folder roots and their adapter metadata. `mode` is
+not a runtime selector:
```json
{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
+ "version": 1,
+ "apps": {
+ "content": {
+ "roots": [
+ {
+ "name": "Docs",
+ "path": "docs",
+ "kind": "docs",
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
+ }
+ ],
+ "components": "components",
+ "extensions": "extensions",
+ "hide": ["**/_*.md", "**/_*.mdx"]
+ }
}
}
```
-`index.html` is the same Alpine/Tailwind extension body format used by normal
-database-backed extensions. When the Content app sees a local extension that
-declares `content.sidebar.bottom`, it renders that extension at the bottom of
-the Content sidebar. The host passes `window.slotContext` with the selected
-document id, title, source metadata, and whether Content is in Local File Mode.
-
-Local extensions are previewed by the app but edited as files. The Extensions
-list shows them with a Local File badge, and the full-page viewer points back to
-the entry file. SQL-backed extension actions such as update, delete, share, and
-history do not apply; use your editor, Codex, Claude Code, or Git history for
-source changes.
+The connection identifier is deliberately opaque. The trusted browser or
+Desktop bridge maps it back to a folder handle locally.
-For v1, local extensions are intentionally conservative:
+## File format and identity
-- they can use `extensionData` for their own small runtime state
-- they can call only the `appAction`s listed in `extension.json`
-- raw SQL helpers and external `extensionFetch` are disabled
-- slot targets are declared in `extension.json`, not installed through SQL
+Content reads `.md` and `.mdx`. Frontmatter may preserve the stable Content page
+ID, title, parent, ordering, and other supported metadata. Keeping the ID allows
+renames and moves to retain page identity instead of creating duplicates.
-This gives local workspaces an Obsidian-like plugin surface without letting an
-arbitrary repo file inherit every capability of a database-backed extension.
+Unknown frontmatter, imports, JSX, and custom MDX should be preserved by tools
+that edit the source. Local components remain in the configured `components/`
+folder and are loaded only through the trusted local bridge. Local extensions
+remain sandboxed under `extensions/`.
-## How Apps Use It
+## Migration from Local File Mode
-Local File Mode is implemented through the framework's local artifact helpers.
-An app declares roots for the artifact types it owns, then reads and writes
-through the same action surface its UI and agent already use.
-
-For Content, that means:
-
-- `list-documents` lists configured `.md` and `.mdx` files.
-- `get-document` reads a selected local file.
-- `update-document` writes the selected local file.
-- `create-document` creates a new local `.mdx` file in the selected folder.
-- `delete-document` deletes the local file.
-- search runs across the configured local files.
-
-Moving, renaming, and reordering local-file pages from the Content UI is not
-supported yet. Do those operations in the workspace or with a coding agent; the
-Content sidebar will reflect the resulting file tree.
-
-This keeps the agent contract simple: the agent can keep using Content actions,
-and those actions decide whether the target is SQL-backed or file-backed.
-
-Other apps can adopt the same pattern over time. A Slides app can map
-`slides/*.mdx` to decks, a Plans app can map `plans/*` to plan documents, and a
-Dashboards app can map `dashboards/*.mdx` to dashboards. Those app-specific
-folders are conventions layered on top of the same local artifact contract.
-
-## Local Files vs. Export/Import
-
-Content has two different file workflows:
-
-| Workflow | What happens |
-| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- |
-| `/local-files` export/import | Database mode remains the source of truth. Files are an explicit sync surface you export, edit, preview, and import. |
-| Local File Mode | Files are the source of truth. The Content sidebar and editor operate directly on local files. |
-
-Use export/import when you want occasional file review around a hosted workspace.
-Use Local File Mode when the repo itself is the workspace.
-
-## History And Collaboration
-
-Local File Mode leans on file-native history:
-
-- commit important changes to Git
-- use pull requests for review
-- let coding agents edit the same files directly
-- use normal file diffs to understand changes
-
-Database mode remains the better fit for hosted collaboration features such as
-sharing, comments, SQL-backed version history, and live multi-user editing.
-
-Provider sync can be layered on top of either mode. For example, a docs repo can
-add actions that pull content from a CMS into local MDX files or push selected
-local files back to that CMS.
-
-## Production Safety
-
-Local File Mode gives app actions direct write access to configured workspace
-files. That is appropriate for local development and trusted single-tenant file
-bridges, but it is not the default production security model.
-
-When `NODE_ENV=production`, the framework refuses `local-files` mode unless you
-set:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
+Older manifests may contain `mode: "local-files"`, and older launch workflows
+may set `AGENT_NATIVE_MODE=local-files`. Remove both. Keep the configured roots,
+add `source.type`, `source.connectionId`, and `source.truthPolicy`, then launch
+with `agent-native content `.
-Only set that for a trusted single-tenant deployment where everyone who can use
-the app is allowed to read and write the configured files. For normal hosted,
-multi-user apps, use database mode and SQL-backed sharing.
+After the first connection and sync, verify:
-## What's next
+1. the folder appears as a source on the intended Files database
+2. each imported page belongs to the intended space
+3. custom properties and saved sidebar views work normally
+4. concurrent edits appear as reviewable change sets
+5. disconnecting preserves the database pages and the files on disk
-- [**Database**](/docs/database) — the SQL-backed mode this page contrasts with
-- [**Sharing**](/docs/sharing) — the standard document-sharing model that database-mode copies use
-- [**Extensions**](/docs/extensions) — the SQL-backed extension model that local extensions intentionally simplify
-- [**Creating Templates**](/docs/creating-templates) — adopting the same local-artifact pattern in a new app
+The old two-mode architecture is retired. Local folders are now adapters around
+the global database model—which is less dramatic than a mode switch, and much
+less likely to leave half the product living in a parallel universe.
diff --git a/packages/core/docs/content/locales/ar-SA/local-file-mode.mdx b/packages/core/docs/content/locales/ar-SA/local-file-mode.mdx
index 73358f9877..fac64eed34 100644
--- a/packages/core/docs/content/locales/ar-SA/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/ar-SA/local-file-mode.mdx
@@ -1,523 +1,68 @@
---
-title: "وضع الملف المحلي"
-description: "قم بتشغيل تطبيقات الوكيل الأصلية باستخدام ملفات Markdown وMDX المحلية وملفات الريبو الأخرى كمصدر للحقيقة - بما في ذلك مستندات MDX ذات النمط Obsidian مع المكونات المخصصة."
+title: "مصادر المجلدات المحلية"
+description: "اربط مجلدات Markdown وMDX بمساحات Content المدعومة بقاعدة البيانات."
---
-# وضع الملف المحلي
+# مصادر المجلدات المحلية
-يتيح وضع الملف المحلي لتطبيق الوكيل الأصلي إرفاق UI العادي وسطح الإجراء
-مباشرة إلى الملفات الموجودة في الريبو أو مساحة العمل. لا يزال التطبيق يبدو وكأنه التطبيق المستضاف
-المنتج، لكن طرق عرض القائمة والمحرر وأدوات الوكيل الخاصة به تقرأ وتكتب الملفات المحلية
-بدلاً من سجلات التطبيقات المدعومة بـ SQL.
+يستخدم Content الآن نموذج بيانات واحدًا: تُحفظ كل صفحة في SQL، وتنتمي إلى
+**مساحة**، وتكون عنصرًا في قاعدة النظام **Files** لتلك المساحة. المجلد المحلي
+مصدر متصل بـ Files، وليس وضعًا آخر للتطبيق. لم يعد هناك مفتاح
+`AGENT_NATIVE_MODE`.
-التنفيذ الأول موجود في قالب المحتوى: الشريط الجانبي الأيسر هو
-يتم ملؤها من ملفات `.md` و`.mdx` المحلية، ويؤدي تحديد صفحة إلى فتح المعيار
-محرر المحتوى، ويحفظ الحفظ ويكتب مرة أخرى إلى الملف المحدد. نفس الملفات يمكن
-يتم تحريره أيضًا بواسطة Codex أو Claude أو وكيل الشريط الجانبي Agent-Native أو وكيل عادي
-محرر.
+لكل مستخدم مساحة شخصية، ولكل مؤسسة متاحة مساحة مؤسسة، ويحدد كتالوج
+**Workspaces** الشخصي المساحات التي تظهر. Files قاعدة Content عادية؛ يمكن
+لخصائصها وعوامل التصفية والترتيب والتجميع وطرق العرض المحفوظة أن تعرض الشريط
+الجانبي أيضًا.
-بالنسبة للمحتوى، هذا يجعل المنتج يبدو وكأنه سبج مفتوح المصدر لـ MDX:
-تظهر مستنداتك كملفات، بينما يضيف التطبيق محررًا مرئيًا، الوكيل actions،
-نسخ قابلة للمشاركة، ومكونات MDX تفاعلية غنية.
+## ربط مجلد
-استخدم وضع الملف المحلي عندما تريد سير عمل الريبو الأول:
+اختر مجلدًا عبر المتصفح أو Agent Native Desktop، ثم اربطه بمساحة موجودة أو
+أنشئ له مساحة خاصة. لا يخزن SQL سوى معرف الاتصال المعتم، والمسارات النسبية،
+والبصمات، وبيانات المصدر الوصفية؛ ولا يخزن المسار المطلق أو مقبض المتصفح أو نص
+الملف الخام.
-- مستودع المستندات باستخدام `docs/*.mdx`
-- مدونة تحتوي على `blog/*.mdx`
-- موارد مثل تحديد المواقع أو المراسلة أو ملاحظات الفريق في `resources/*.md`
-- قاعدة معرفية شخصية على طراز Obsidian مع محرر MDX الأكثر ثراءً
-- المستندات التي تحتاج إلى كتل MDX تفاعلية مخصصة تم إنشاؤها من كود React المحلي
-- عناصر التطبيق التي ينبغي أن يسهل على وكلاء البرمجة فحصها وتصحيحها
+السياسات هي `database_primary` و`source_primary` و`reviewed_bidirectional`.
+تحول المزامنة الملفات إلى صفحات SQL عادية. إذا تغير الملف وصفحته معًا، يُنشئ
+Content تغييرًا للمراجعة بدل الكتابة فوق أحدهما. يحافظ قطع الاتصال على الصفحات
+والملفات المحلية.
-استخدم وضع قاعدة البيانات عندما تريد تجربة التطبيق التعاوني المستضاف:
-مشاركة متعددة المستخدمين، والأذونات المدعومة SQL، والتعليقات، وسجل الإصدارات، و
-استضافة الإنتاج دون الوصول إلى نظام الملفات المحلي.
-
-## النموذج العقلي
-
-هناك وضعان لمصدر الحقيقة:
-
-| الوضع | مصدر الحقيقة | الأفضل لـ |
-| ------------------ | ----------------------------------------------- | ---------------------------------------------------------------------------------- |
-| وضع قاعدة البيانات | صفوف SQL حتى Drizzle | التطبيقات المستضافة والتعاون والمشاركة والتعليقات وسجل الإصدارات |
-| وضع الملف المحلي | ملفات الريبو المعلنة بواسطة `agent-native.json` | سير العمل المحلي/المطور، ومراجعة Git، وتعديلات وكيل الترميز، والمحتوى الأصلي للملف |
-
-يجب أن يظل UI والوكيل actions بنفس الشكل في كلا الوضعين. المحتوى
-لا يزال المحرر يقوم بتحرير المستندات؛ والفرق هو ما إذا كانت هذه المستندات قد تم حلها
-إلى صفوف SQL أو الملفات المحلية.
-
-
-
-```html
-
-
-
واجهة المحتوى
-
- الوكيل + الإجراءات list/get/update-document
-
-
-
→
-
-
- وضع قاعدة البياناتSQL rows via Drizzleمستضاف · مشاركة · تعليقات · سجل
-
-
- Local File Moderepo files via agent-native.jsonمراجعة Git · تعديلات وكيل الترميز
-
-
-
-```
-
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
-
-
-
-## مثال الريبو
-
-يمكن أن تكون مساحة عمل المحتوى صغيرة مثل هذا:
-
-
-
-في وضع الملف المحلي، يعرض الشريط الجانبي للمحتوى `docs/` و`blog/` و
-أشجار `resources/` كصفحات. يؤدي تحديد `docs/getting-started.mdx` إلى فتح ذلك
-ملف في محرر المحتوى القياسي؛ التحرير في UI يعيد الكتابة إلى
-`docs/getting-started.mdx`.
-
-`components/` ليس جذر محتوى. إنها مكتبة مكونات المعاينة MDX
-يمكن استيراد الملفات أو الرجوع إليها. يمكن للمحرر عرض مكونات MDX محلية بسيطة
-دون مطالبتك باستنساخ تطبيق المحتوى بالكامل أو تفرعه.
-
-`extensions/` ليس جذرًا للمحتوى أيضًا. إنها مكتبة ملحقة محلية:
-أدوات صغيرة في وضع الحماية يمكن عرضها في فتحات التطبيق بينما يبقى مصدرها في
-الريبو.
-
-## تثبيت المحتوى في الريبو
-
-بالنسبة إلى المستندات أو المدونة أو مساحة عمل MDX الموجودة، قم بتثبيت ملفات المحتوى المحلية
-المهارة:
+## البدء من مستودع
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-يؤدي هذا إلى نسخ مهارة `content` إلى مجلدات مهارات وكيل الريبو والكتابة
-أو يقوم بتحديث `agent-native.json` باستخدام الإعدادات الافتراضية للمحتوى:
-
-- `mode: "local-files"` على مستوى مساحة العمل
-- `apps.content.mode: "local-files"`
-- جذور المحتوى لـ `docs/` و`blog/` و`content/` و`resources/`
-- `components/` لمكونات MDX المحلية
-- `extensions/` لعناصر واجهة المستخدم المحلية
-
-تخبر المهارة المثبتة وكلاء البرمجة باستخدام المحتوى actions
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document`، وملف المكون actions) عند تطبيق محتوى محلي
-أو جسر سطح المكتب Agent Native يعرضهم. إذا لم يتم تشغيل أي جسر، فستتم المهارة
-يعود إلى تعديلات الريبو المباشرة الآمنة مع الحفاظ على المادة الأمامية، والواردات، JSX،
-وMDX غير معروف.
-
-## التكوين
+يشغل الأمر تطبيق Content العادي المدعوم بقاعدة البيانات، ويسجل المجلد كمصدر،
+ويفتح شاشة الاتصال. ولا يضبط متغير بيئة خاصًا بالوضع.
-أضف `agent-native.json` إلى الريبو أو جذر مساحة العمل:
+## الإعداد
```json
{
"version": 1,
"apps": {
"content": {
- "mode": "local-files",
"roots": [
{
"name": "Docs",
"path": "docs",
"kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
}
],
"components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
+ "extensions": "extensions"
}
}
}
```
-يمكنك أيضًا تمكين الملفات المحلية باستخدام `AGENT_NATIVE_MODE=local-files` أو
-`AGENT_NATIVE_DATA_MODE=local-files`; the manifest is preferred because it
-يوثق عقد المجلد في الريبو نفسه.
-
-## تنسيق ملف المحتوى
-
-يقرأ المحتوى Markdown وMDX. يحتفظ Frontmatter بالبيانات التعريفية للصفحة، والنص الأساسي هو
-المستند القابل للتحرير:
-
-```mdx
----
-title: "البدء"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
-
-# البدء
-
-Use to show framework-specific code.
-```
-
-يأتي العنوان من المادة الأمامية `title` في حالة وجوده، وإلا من
-اسم الملف. يحتفظ المحرر بمصدر MDX الذي لا يمكنه تحريره بصريًا بعد، لذا
-تظل عوامل الترميز ومحررات النصوص العادية بمثابة بوابات هروب آمنة.
-
-## مكونات MDX المخصصة
-
-يمكن للمحتوى معاينة المكونات المحلية من المجلد `components` الذي تم تكوينه.
-هذا مخصص لمكونات MDX بنمط المستندات مثل علامات التبويب ووسائل الشرح والحزمة
-قم بتثبيت المقتطفات أو كتل التعليمات البرمجية الخاصة بإطار العمل.
-
-على سبيل المثال، أضف مكونًا تفاعليًا بجوار المحتوى الخاص بك:
-
-```tsx
-// components/ImpactCounter.tsx
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-ثم استخدمه من أي ملف MDX محلي:
-
-```mdx
----
-title: "إطلاق الملاحظات"
----
-
-# إطلاق الملاحظات
-
-
-```
-
-يكتشف خادم تطوير المحتوى PascalCase المسمى الصادرات وPascalCase الافتراضي
-يتم التصدير من ملفات `.tsx` و`.jsx` و`.ts` و`.js` ضمن `components/`. تلك
-يتم عرض المكونات داخل المحرر وتظهر في قائمة الشرطة المائلة ضمن
-**المكونات المحلية**. يؤدي إدراج شرطة مائلة إلى إنشاء علامة صغيرة مثل
-``؛ أضف الدعائم في مصدر MDX عند الحاجة.
-
-تنفيذ المكون هو عن قصد إمكانية جسر محلي/سطح المكتب، وليس
-الوصول العادي إلى مجلد المتصفح المستضاف. إذا قمت بفتح `content.agent-native.com`،
-اختر **الملفات المحلية**، واختر مجلدًا في Chrome، حيث يمكن للتطبيق القراءة والكتابة
-الملفات `.md` و`.mdx` من خلال الوصول إلى نظام الملفات في المتصفح API، ولكن
-لا يعرض Chrome مسارًا مطلقًا للمجلد لتجميعه Vite
-`components/*.tsx`. لمعاينة مكونات React المخصصة وإعادة تحميلها بسرعة، قم بتشغيل
-المحتوى محليًا أو استخدم Agent Native Desktop حتى يتمكن الجسر المحلي الموثوق به من
-قم بتسجيل مساحة العمل المختارة باستخدام خادم تطوير المحتوى المحلي. في هذا الوضع،
-عمليات التحرير على ملفات المكونات الموجودة، إعادة التحميل السريع من خلال Vite، وإضافة أو
-تؤدي إزالة ملفات المكونات إلى إعادة تحميل سجل المكونات وقائمة الشرطة المائلة.
-
-يمكن للوكلاء أيضًا العمل مع ملفات المكونات المسجلة. استخدم
-`list-local-component-files` للعثور على معرف مساحة العمل المسجلة، ثم
-`write-local-component-file` لإنشاء أو تحديث `.tsx` أو `.jsx` أو `.ts` أو
-ملفات `.js` ضمن المجلد `components/` الخاص بمساحة العمل. تظل ملفات MDX هي
-مصدر الحقيقة لاستخدام المكونات؛ تظل ملفات المكونات مستودعًا عاديًا
-تمت مراجعة الملفات المصدر باستخدام Git.
-
-إذا قام أحد المكونات بتصدير بيانات التعريف المدخلة، فحدد المكون في المحرر
-يُظهر زر التحرير في الزاوية العلوية اليمنى للمكون. أنواع الإدخال المدعومة
-هي `string`، و`textarea`، و`number`، و`boolean`، و`select`. يكتب النموذج
-مرة أخرى إلى علامة MDX، بحيث تظل الملفات المحلية هي مصدر الحقيقة. ال
-يمكن تصدير البيانات الوصفية بتنسيق `ComponentNameInputs`، `ComponentNameConfig.inputs`،
-`Component.inputs`، أو `agentNative.inputs`.
-
-يمكن معاينة علامات المكونات البسيطة ذات الدعائم الحرفية في السطر:
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-يتم الاحتفاظ بتعبيرات JSX المعقدة في المصدر. إذا لم يتمكن المحرر بأمان
-قم بمعاينة خاصية المكون حتى الآن، فهي تعرض عنصرًا نائبًا للتحذير بدلاً من
-إسقاط البيانات بصمت.
-
-## مشاركة الملفات المحلية
-
-لا تتم مشاركة الملفات المحلية مباشرة لأن المستخدمين الآخرين لا يستطيعون قراءة المسار الموجود على
-جهازك. يقوم زر المشاركة في شريط أدوات المحتوى بإنشاء أو تحديث
-نسخة مدعومة بقاعدة بيانات من الملف المحدد، وتنتقل إلى تلك النسخة، وتفتح
-مشاركة عادية منبثقة. يبقى الملف المحلي الأصلي ضمن الملفات المحلية؛
-تظهر نسخة قاعدة البيانات ضمن النسخ المشتركة في وضع الملف المحلي وتستخدم
-النموذج القياسي لمشاركة المستندات.
-
-## الإضافات المحلية
-
-يمكن أيضًا أن يقوم وضع الملف المحلي بتحميل الامتدادات المدعومة بالريبو من الملف الذي تم تكوينه
-مجلد `extensions`. كل ملحق عبارة عن دليل واحد به `extension.json`
-البيان وملف الإدخال HTML:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html` هو نفس تنسيق هيكل امتداد Alpine/Tailwind المستخدم في المعتاد
-الامتدادات المدعومة بقاعدة البيانات. عندما يرى تطبيق المحتوى امتدادًا محليًا
-يُعلن عن `content.sidebar.bottom`، ويعرض هذا الامتداد في الجزء السفلي من
-الشريط الجانبي للمحتوى. يمرر المضيف `window.slotContext` مع
-معرف المستند، والعنوان، وبيانات تعريف المصدر، وما إذا كان المحتوى في وضع الملف المحلي.
-
-يقوم التطبيق بمعاينة الإضافات المحلية ولكن يتم تحريرها كملفات. الامتدادات
-هذه الملفات بشارة ملف محلي، ويشير عارض الصفحة الكاملة إلى
-ملف الإدخال. الامتداد المدعوم SQL actions مثل التحديث والحذف والمشاركة و
-لا ينطبق التاريخ؛ استخدم المحرر الخاص بك، Codex، رمز Claude، أو سجل Git لـ
-تغييرات المصدر.
-
-بالنسبة للإصدار 1، تكون الامتدادات المحلية متحفظة عمدًا:
-
-- يمكنهم استخدام `extensionData` لحالة وقت التشغيل الصغيرة الخاصة بهم
-- يمكنهم الاتصال فقط بـ `appAction` المدرجة في `extension.json`
-- تم تعطيل مساعدات SQL الأولية و`extensionFetch` الخارجية
-- تم الإعلان عن أهداف الفتحات في `extension.json`، ولم يتم تثبيتها من خلال SQL
-
-يمنح هذا مساحات العمل المحلية سطحًا إضافيًا شبيهًا بسطح Obsidian دون السماح
-يرث ملف الريبو التعسفي كل إمكانات الامتداد المدعوم بقاعدة البيانات.
-
-## كيفية استخدام التطبيقات لها
-
-يتم تنفيذ وضع الملف المحلي من خلال أدوات المساعدة المحلية لإطار العمل.
-يعلن التطبيق عن جذور أنواع العناصر التي يمتلكها، ثم يقرأها ويكتبها
-من خلال نفس سطح الإجراء الذي يستخدمه UI والوكيل بالفعل.
-
-بالنسبة للمحتوى، فهذا يعني:
-
-- يسرد `list-documents` ملفات `.md` و`.mdx` التي تم تكوينها.
-- يقرأ `get-document` ملفًا محليًا محددًا.
-- يقوم `update-document` بكتابة الملف المحلي المحدد.
-- يقوم `create-document` بإنشاء ملف `.mdx` محلي جديد في المجلد المحدد.
-- يحذف `delete-document` الملف المحلي.
-- يتم تشغيل البحث عبر الملفات المحلية التي تم تكوينها.
-
-لا يعد نقل صفحات الملفات المحلية وإعادة تسميتها وإعادة ترتيبها من المحتوى UI
-معتمد حتى الآن. قم بإجراء تلك العمليات في مساحة العمل أو باستخدام وكيل ترميز؛ ال
-سيعكس الشريط الجانبي للمحتوى شجرة الملفات الناتجة.
-
-يُبقي هذا عقد الوكيل بسيطًا: يمكن للوكيل الاستمرار في استخدام المحتوى actions،
-ويقرر هؤلاء actions ما إذا كان الهدف مدعومًا بـ SQL أو مدعومًا بالملف.
-
-يمكن للتطبيقات الأخرى أن تتبنى نفس النمط مع مرور الوقت. يمكن لتطبيق العروض التقديمية تعيين
-`slides/*.mdx` إلى المجموعات، ويمكن لتطبيق الخطط تعيين `plans/*` لتخطيط المستندات، و
-يمكن لتطبيق لوحات المعلومات تعيين `dashboards/*.mdx` إلى لوحات المعلومات. تلك الخاصة بالتطبيق
-المجلدات عبارة عن اتفاقيات موضوعة فوق نفس عقد المنتج المحلي.
-
-## الملفات المحلية مقابل التصدير/الاستيراد
-
-يحتوي المحتوى على سير عمل ملفين مختلفين:
-
-| سير العمل | ماذا يحدث |
-| ---------------------------- | ------------------------------------------------------------------------------------------------------------------- |
-| تصدير/استيراد `/local-files` | يظل وضع قاعدة البيانات هو مصدر الحقيقة. تعد الملفات بمثابة سطح مزامنة واضح يمكنك تصديره وتحريره ومعاينته واستيراده. |
-| وضع الملف المحلي | الملفات هي مصدر الحقيقة. يعمل الشريط الجانبي للمحتوى والمحرر مباشرة على الملفات المحلية. |
-
-استخدم التصدير/الاستيراد عندما تريد مراجعة الملفات من حين لآخر حول مساحة عمل مستضافة.
-استخدم وضع الملف المحلي عندما يكون الريبو نفسه هو مساحة العمل.
-
-## التاريخ والتعاون
-
-يعتمد وضع الملف المحلي على سجل الملف الأصلي:
-
-- إجراء تغييرات مهمة على Git
-- استخدم طلبات السحب للمراجعة
-- السماح لوكلاء البرمجة بتحرير نفس الملفات مباشرة
-- استخدم اختلافات الملفات العادية لفهم التغييرات
-
-يظل وضع قاعدة البيانات هو الأفضل لميزات التعاون المستضافة مثل
-المشاركة والتعليقات وسجل الإصدارات المدعومة بـ SQL والتحرير المباشر لعدة مستخدمين.
-
-يمكن وضع مزامنة الموفر في أعلى أي من الوضعين. على سبيل المثال، يمكن لمستودع المستندات
-أضف actions الذي يسحب المحتوى من CMS إلى ملفات MDX المحلية أو يدفع المحدد
-الملفات المحلية تعود إلى CMS.
-
-## سلامة الإنتاج
-
-يمنح وضع الملف المحلي التطبيق actions إمكانية الوصول المباشر للكتابة إلى مساحة العمل التي تم تكوينها
-ملفات. وهذا مناسب للتطوير المحلي وملف المستأجر الفردي الموثوق به
-الجسور، ولكنها ليست نموذج أمان الإنتاج الافتراضي.
-
-عند `NODE_ENV=production`، يرفض إطار العمل وضع `local-files` إلا إذا
-المجموعة:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-قم بتعيين ذلك فقط لنشر مستأجر واحد موثوق به حيث يمكن لكل من يمكنه استخدامه
-يُسمح للتطبيق بقراءة الملفات التي تم تكوينها وكتابتها. بالنسبة للاستضافة العادية،
-تطبيقات متعددة المستخدمين، استخدم وضع قاعدة البيانات والمشاركة المدعومة SQL.
+للترحيل، احذف `mode: "local-files"` و`AGENT_NATIVE_MODE=local-files`، واحتفظ
+بالجذور، وأضف `source`. تحافظ معرفات frontmatter على هوية الصفحة عند إعادة
+التسمية أو النقل. وتستمر المكونات والامتدادات المحلية عبر الجسر المحلي الموثوق.
diff --git a/packages/core/docs/content/locales/ar-SA/template-content.mdx b/packages/core/docs/content/locales/ar-SA/template-content.mdx
index 42d98d0cb8..6c27b2d73f 100644
--- a/packages/core/docs/content/locales/ar-SA/template-content.mdx
+++ b/packages/core/docs/content/locales/ar-SA/template-content.mdx
@@ -93,9 +93,8 @@ description: "Obsidian مفتوح المصدر لـ MDX: قم بتحرير مل
- **تنظيم الصفحات في شجرة** — تداخل بشكل لا نهائي، اسحب لإعادة ترتيب الصفحات المفضلة التي تستخدمها كثيرًا.
- **البحث في كل شيء** من خلال البحث في النص الكامل عبر العناوين والمحتوى.
- **تحرير ملفات Markdown/MDX المحلية مثل Obsidian.** استخدم طريقة العرض `/local-files`
- لتصدير مساحة العمل الخاصة بك إلى الملفات، قم بتحريرها باستخدام أدواتك الخاصة، ثم قم بالمعاينة
- التغييرات، ثم قم باستيرادها مرة أخرى. في وضع الملف المحلي، تتم كتابة المحتوى مباشرة إلى
- الملف `.md` أو `.mdx` المحدد.
+ لربط مجلد بـ Files وتحريره بأدواتك ومزامنة التغييرات ومراجعة التعارضات
+ داخل تطبيق SQL.
- **إنشاء كتل مخصصة تفاعلية غنية.** تسجيل مكونات React المحلية،
أدخلها كـ MDX، واسمح للوكيل بإنشاء أو تحديث ملفات المكونات لـ
مستنداتك.
@@ -138,32 +137,19 @@ description: "Obsidian مفتوح المصدر لـ MDX: قم بتحرير مل
التعليقات والأذونات والتعاون المباشر؛ المجلد المحلي صريح
سطح المزامنة.
-يمكن أيضًا تشغيل المحتوى في **وضع الملف المحلي**، حيث تكون الملفات هي مصدر
-الحقيقة بدلاً من مستندات SQL. أضف `agent-native.json` إلى الريبو، اضبط
-`mode: "local-files"`، وقم بتكوين الجذور مثل `docs/`، `blog/`،
-`content/` و`resources/`. يقوم محرر المحتوى القياسي بعد ذلك بملء
-الشريط الجانبي الأيسر من ملفات `.md`/`.mdx` المحلية ويكتب التعديلات مرة أخرى إلى
-الملف المحدد من خلال المستند العادي actions. استخدم هذا لمستندات الريبو الأولى،
-المدونات أو مكتبات الموارد أو المحتوى الشخصي بنمط Obsidian الذي يعمل بنظام MDX
-المكونات؛ قم بالتبديل مرة أخرى إلى وضع قاعدة البيانات عندما تريد التعاون المستضاف و
-المشاركة المدعومة بـ SQL. راجع [Local File Mode](/docs/local-file-mode) لمعرفة
-تخطيط الريبو المستقل، التكوين، مكونات MDX المخصصة، المحلية
-أدوات `extensions/` ودليل سلامة الإنتاج.
+تستخدم المجلدات المحلية الآن نموذج SQL نفسه الذي تستخدمه كل الصفحات. تنتمي كل
+صفحة إلى مساحة وقاعدة Files الخاصة بها؛ والمجلد هو محول مصدر لهذه القاعدة. راجع
+[مصادر المجلدات المحلية](/docs/local-file-mode) للسياسات والتعارضات ومكونات MDX
+والترحيل من الوضع القديم.
-لتثبيت مهارة ملفات المحتوى المحلية في الريبو الحالي:
+لفتح Content في مستودع موجود:
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-يقوم المثبت بنسخ مهارة `content` لوكيل الترميز الخاص بك ويقوم بكتابة أو
-تحديثات `agent-native.json` بجذور المحتوى لـ `docs/`، و`blog/`، و`content/`،
-و `resources/`. عندما يكون تطبيق المحتوى المحلي، أو Agent Native Desktop، أو موثوقًا به
-الجسر المحلي قيد التشغيل، ويجب على الوكلاء استخدام المحتوى actions مثل
-`list-documents`، و`get-document`، و`edit-document`، و`update-document`، و
-يكتب `share-local-file-document` بدلاً من نظام الملفات الخام. بدون ذلك المحلي
-الجسر، لا تزال المهارة المثبتة تمنح الوكيل عقد تحرير الريبو لـ
-تعديلات Markdown/MDX الآمنة.
+يشغل CLI تطبيق Content العادي المدعوم بقاعدة البيانات، ويسجل مصدر المجلد، ويفتح
+الاتصال من دون ضبط متغير بيئة خاص بالوضع.
## للمطورين
diff --git a/packages/core/docs/content/locales/de-DE/local-file-mode.mdx b/packages/core/docs/content/locales/de-DE/local-file-mode.mdx
index 7cabd36ca5..c67166f5b4 100644
--- a/packages/core/docs/content/locales/de-DE/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/de-DE/local-file-mode.mdx
@@ -1,525 +1,71 @@
---
-title: "Lokaler Dateimodus"
-description: "Führen Sie agentennative Apps mit lokalen Markdown-, MDX- und anderen Repo-Dateien als Quelle der Wahrheit aus – einschließlich MDX-Dokumenten im Obsidian-Stil mit benutzerdefinierten Komponenten."
+title: "Lokale Ordnerquellen"
+description: "Markdown- und MDX-Ordner mit den datenbankgestützten Content-Bereichen verbinden."
---
-# Lokaler Dateimodus
+# Lokale Ordnerquellen
-Im lokalen Dateimodus kann eine agentennative App ihre normale UI- und Aktionsoberfläche anhängen
-direkt zu Dateien in einem Repository oder Arbeitsbereich. Die App fühlt sich immer noch wie eine gehostete App an
-Produkt, aber seine Listenansichten, Editor- und Agent-Tools lesen und schreiben lokale Dateien
-anstelle von SQL-gestützten App-Datensätzen.
+Content verwendet nur noch ein Datenmodell: Jede Seite liegt in SQL, gehört zu
+einem **Bereich** und ist Mitglied der Systemdatenbank **Files** dieses Bereichs.
+Ein lokaler Ordner ist eine mit Files verbundene Quelle, kein zweiter App-Modus.
+Einen `AGENT_NATIVE_MODE`-Schalter gibt es nicht mehr.
-Die erste Implementierung befindet sich in der Inhaltsvorlage: Die linke Seitenleiste ist
-wird aus lokalen `.md`- und `.mdx`-Dateien gefüllt. Wenn Sie eine Seite auswählen, wird der Standard geöffnet
-Inhaltseditor und Speichern schreibt zurück in die ausgewählte Datei. Dieselben Dateien können
-kann auch von Codex, Claude Code, dem Agent-Native-Sidebar-Agenten oder einem normalen bearbeitet werden
-Herausgeber.
+Jeder Benutzer erhält einen persönlichen Bereich, jede zugängliche Organisation
+einen Organisationsbereich. Der persönliche **Workspaces**-Katalog bestimmt,
+welche Bereiche erscheinen. Files ist eine normale Content-Datenbank; ihre
+Eigenschaften, Filter, Sortierungen, Gruppen und gespeicherten Ansichten können
+auch die Seitenleiste darstellen.
-Was den Inhalt angeht, fühlt sich das Produkt dadurch wie Open-Source-Obsidian für MDX an:
-Ihre Dokumente bleiben als Dateien bestehen, während die App einen visuellen Editor, Agentenaktionen, hinzufügt
-gemeinsame Kopien und umfangreiche interaktive MDX-Komponenten.
+## Ordner verbinden
-Verwenden Sie den lokalen Dateimodus, wenn Sie einen Repo-First-Workflow wünschen:
+Wählen Sie den Ordner im Browser oder in Agent Native Desktop. Verbinden Sie ihn
+mit einem vorhandenen Bereich oder erstellen Sie einen privaten ordnergestützten
+Bereich. SQL speichert nur die undurchsichtige Verbindungs-ID, relative Pfade,
+Hashes und Quellmetadaten — nie absoluten Pfad, Browser-Handle oder Dateitext.
-- ein Dokumenten-Repo mit `docs/*.mdx`
-- ein Blog mit `blog/*.mdx`
-- Ressourcen wie Positionierung, Nachrichten oder Teamnotizen in `resources/*.md`
-- eine persönliche Wissensdatenbank im Obsidian-Stil mit einem umfangreicheren MDX-Editor
-- Dokumente, die interaktive benutzerdefinierte MDX-Blöcke benötigen, die aus lokalem React-Code generiert werden
-- App-Artefakte, die für Programmierer leicht zu prüfen und zu patchen sein sollten
+Verfügbar sind `database_primary`, `source_primary` und
+`reviewed_bidirectional`. Die Synchronisierung materialisiert Dateien als
+normale SQL-Seiten. Gleichzeitige Änderungen werden zur Prüfung erfasst, statt
+eine Seite zu überschreiben. Beim Trennen bleiben Seiten und Dateien erhalten.
-Verwenden Sie den Datenbankmodus, wenn Sie die gehostete kollaborative App-Erfahrung wünschen:
-Mehrbenutzerfreigabe, SQL-gestützte Berechtigungen, Kommentare, Versionsverlauf und
-Produktionshosting ohne Zugriff auf das lokale Dateisystem.
-
-## Das mentale Modell
-
-Es gibt zwei Source-of-Truth-Modi:
-
-| Modus | Quelle der Wahrheit | Am besten für |
-| ------------------ | ----------------------------------------------- | ------------------------------------------------------------------------------------------ |
-| Datenbankmodus | SQL Zeilen bis Drizzle | Gehostete Apps, Zusammenarbeit, Freigabe, Kommentare, Versionsverlauf |
-| Lokaler Dateimodus | Repo-Dateien deklariert von `agent-native.json` | Lokale/Entwickler-Workflows, Git-Überprüfung, Coding-Agent-Änderungen, dateinativer Inhalt |
-
-UI und Agentenaktionen sollten in beiden Modi die gleiche Form behalten. Ein Inhalt
-Editor bearbeitet weiterhin Dokumente; Der Unterschied besteht darin, ob diese Dokumente aufgelöst werden
-in SQL Zeilen oder lokale Dateien.
-
-
-
-```html
-
- Local File Moderepo files via agent-native.jsonGit-Review · Coding-Agent-Edits
-
-
-
-```
-
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
-
-
-
-## Beispiel-Repo
-
-Ein Inhaltsarbeitsbereich kann so klein sein:
-
-
-
-Im lokalen Dateimodus zeigt die Inhaltsseitenleiste `docs/`, `blog/` und
-`resources/` Bäume als Seiten. Wenn Sie `docs/getting-started.mdx` auswählen, wird das geöffnet
-Datei im Standard-Inhaltseditor; Bearbeitung im UI schreibt zurück nach
-`docs/getting-started.mdx`.
-
-`components/` ist kein Inhaltsstammverzeichnis. Es handelt sich um eine Vorschau-Komponentenbibliothek, die MDX
-Dateien können importiert oder referenziert werden. Der Editor kann einfache lokale MDX-Komponenten rendern
-ohne dass Sie die gesamte Content-App klonen oder forken müssen.
-
-`extensions/` ist ebenfalls kein Inhaltsstammverzeichnis. Es handelt sich um eine lokale Erweiterungsbibliothek:
-kleine Sandbox-Widgets, die in App-Slots gerendert werden können, während ihre Quelle drin bleibt
-das Repo.
-
-## Inhalt in ein Repo installieren
-
-Installieren Sie für vorhandene Dokumente, Blogs oder MDX-Arbeitsbereiche die lokalen Inhaltsdateien
-Fähigkeit:
+## Aus einem Repository starten
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-Dadurch wird der `content`-Skill in die Agent-Skill-Ordner des Repositorys kopiert und geschrieben
-oder aktualisiert `agent-native.json` mit den Inhaltsstandards:
-
-- `mode: "local-files"` auf Arbeitsbereichsebene
-- `apps.content.mode: "local-files"`
-- Inhaltsstämme für `docs/`, `blog/`, `content/` und `resources/`
-- `components/` für lokale MDX-Komponenten
-- `extensions/` für lokale Erweiterungs-Widgets
-
-Der installierte Skill weist Programmieragenten an, Content actions zu verwenden
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document` und Komponentendatei actions) bei einer lokalen Content-App
-oder Agent Native Desktop Bridge macht sie verfügbar. Wenn keine Bridge läuft, wird der Skill
-greift auf sichere direkte Repo-Bearbeitungen zurück und behält dabei Frontmatter, Importe, JSX,
-und unbekanntes MDX.
+Der Befehl startet die normale datenbankgestützte Content-App, registriert den
+Ordner als Quelle und öffnet die Verbindung — ohne Modus-Umgebungsvariable.
## Konfiguration
-Fügen Sie `agent-native.json` zum Repository oder Arbeitsbereichsstamm hinzu:
-
```json
{
"version": 1,
"apps": {
"content": {
- "mode": "local-files",
"roots": [
{
"name": "Docs",
"path": "docs",
"kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
}
],
"components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
+ "extensions": "extensions"
}
}
}
```
-Sie können lokale Dateien auch mit `AGENT_NATIVE_MODE=local-files` oder
-`AGENT_NATIVE_DATA_MODE=local-files`; Das Manifest wird bevorzugt, weil es
-dokumentiert den Ordnervertrag im Repo selbst.
-
-## Inhaltsdateiformat
-
-Der Inhalt lautet Markdown und MDX. Frontmatter enthält Seitenmetadaten und der Text ist
-das bearbeitbare Dokument:
-
-```mdx
----
-title: "Erste Schritte"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
-
-# Erste Schritte
-
-Use to show framework-specific code.
-```
-
-Der Titel stammt von `title` frontmatter, sofern vorhanden, andernfalls von
-Dateiname. Der Editor behält die MDX-Quelle bei, die er noch nicht visuell bearbeiten kann, also
-Codierungsagenten und normale Texteditoren bleiben sichere Fluchtwege.
-
-## Benutzerdefinierte MDX-Komponenten
-
-Inhalte können eine Vorschau lokaler Komponenten aus dem konfigurierten `components`-Ordner anzeigen.
-Dies ist für MDX-Komponenten im Dokumentstil wie Registerkarten, Beschriftungen und Pakete gedacht.
-Installieren Sie Snippets oder Framework-spezifische Codeblöcke.
-
-Fügen Sie beispielsweise eine interaktive Komponente neben Ihrem Inhalt hinzu:
-
-```tsx
-// components/ImpactCounter.tsx
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-Dann verwenden Sie es aus einer beliebigen lokalen MDX-Datei:
-
-```mdx
----
-title: "Notizen starten"
----
-
-# Notizen starten
-
-
-```
-
-Der Content-Entwicklungsserver erkennt PascalCase-benannte Exporte und PascalCase-Standardwerte
-Exporte aus `.tsx`-, `.jsx`-, `.ts`- und `.js`-Dateien unter `components/`. Diese
-Komponenten werden im Editor gerendert und im Slash-Menü darunter angezeigt
-**Lokale Komponenten**. Durch das Einfügen eines Schrägstrichs wird ein minimales Tag erstellt, z. B.
-``; Fügen Sie bei Bedarf Requisiten zur MDX-Quelle hinzu.
-
-Die Komponentenausführung ist absichtlich eine lokale Dev/Desktop-Bridge-Funktion, nicht
-einfacher Zugriff auf gehostete Browserordner. Wenn Sie `content.agent-native.com` öffnen,
-Wählen Sie **Lokale Dateien** und einen Ordner in Chrome, den die App lesen und schreiben kann
-die Dateien `.md` und `.mdx` über den Browser-Dateisystemzugriff auf API, aber
-Chrome stellt keinen absoluten Ordnerpfad für die Kompilierung durch Vite bereit
-`components/*.tsx`. Um benutzerdefinierte React-Komponenten in der Vorschau anzuzeigen und im laufenden Betrieb neu zu laden, führen Sie
-Inhalte lokal oder verwenden Sie Agent Native Desktop, damit die vertrauenswürdige lokale Bridge dies tun kann
-registrieren Sie den ausgewählten Arbeitsbereich beim lokalen Content-Entwicklungsserver. In diesem Modus
-Änderungen an vorhandenen Komponentendateien, Hot-Reload über Vite und Hinzufügen von oder
-Durch das Entfernen von Komponentendateien werden die Komponentenregistrierung und das Slash-Menü neu geladen.
-
-Agenten können auch mit diesen registrierten Komponentendateien arbeiten. Verwenden
-`list-local-component-files`, um dann die registrierte Arbeitsbereichs-ID zu finden
-`write-local-component-file` zum Erstellen oder Aktualisieren von `.tsx`, `.jsx`, `.ts` oder
-`.js`-Dateien im Ordner `components/` des Arbeitsbereichs. Die MDX-Dateien bleiben die
-Quelle der Wahrheit für die Komponentenverwendung; Die Komponentendateien bleiben normale Repo
-Quelldateien mit Git überprüft.
-
-Wenn eine Komponente Eingabemetadaten exportiert, wählen Sie die Komponente im Editor aus
-zeigt eine Schaltfläche zum Bearbeiten in der oberen rechten Ecke der Komponente an. Unterstützte Eingabetypen
-sind `string`, `textarea`, `number`, `boolean` und `select`. Das Formular schreibt
-wechselt zurück zum MDX-Tag, sodass lokale Dateien die Quelle der Wahrheit bleiben. Die
-Metadaten können als `ComponentNameInputs`, `ComponentNameConfig.inputs`,
-`Component.inputs` oder `agentNative.inputs`.
-
-Einfache Komponenten-Tags mit Literal-Requisiten können inline in der Vorschau angezeigt werden:
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-Komplexe JSX-Ausdrücke bleiben in der Quelle erhalten. Wenn der Editor dies nicht sicher tun kann
-Sehen Sie sich noch eine Vorschau einer Komponenten-Requisite an, es wird ein Warnungsplatzhalter angezeigt und nicht
-Daten werden stillschweigend gelöscht.
-
-## Lokale Dateien teilen
-
-Lokale Dateien werden nicht direkt freigegeben, da andere Benutzer einen Pfad darauf nicht lesen können
-Ihre Maschine. Mit der Schaltfläche „Teilen“ in der Symbolleiste „Inhalt“ wird ein
-datenbankgestützte Kopie der ausgewählten Datei, navigiert zu dieser Kopie und öffnet die
-normales Freigabe-Popover. Die ursprüngliche lokale Datei verbleibt unter „Lokale Dateien“. die
-Datenbankkopie erscheint unter „Freigegebene Kopien“ im lokalen Dateimodus und verwendet die
-Standardmodell für die gemeinsame Nutzung von Dokumenten.
-
-## Lokale Erweiterungen
-
-Der lokale Dateimodus kann auch Repo-gestützte Erweiterungen aus der konfigurierten Datei laden
-`extensions`-Ordner. Jede Erweiterung ist ein Verzeichnis mit einem `extension.json`
-Manifest und eine HTML-Eintragsdatei:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html` ist das gleiche Alpine/Tailwind-Erweiterungskörperformat, das von Normal verwendet wird
-datenbankgestützte Erweiterungen. Wenn die Content-App eine lokale Erweiterung erkennt,
-deklariert `content.sidebar.bottom` und rendert diese Erweiterung am Ende von
-die Inhaltsseitenleiste. Der Host übergibt `window.slotContext` mit dem ausgewählten
-Dokument-ID, Titel, Quellmetadaten und ob sich der Inhalt im lokalen Dateimodus befindet.
-
-Lokale Erweiterungen werden von der App in der Vorschau angezeigt, aber als Dateien bearbeitet. Die Erweiterungen
-Liste zeigt sie mit einem Lokaldatei-Logo an und der Ganzseitenbetrachter verweist darauf
-die Eintragsdatei. Von SQL unterstützte Erweiterung actions wie Aktualisieren, Löschen, Teilen und
-Verlauf gilt nicht; Verwenden Sie Ihren Editor, Codex-, Claude-Code oder den Git-Verlauf für
-Quellenänderungen.
-
-Für v1 sind lokale Erweiterungen absichtlich konservativ:
-
-- Sie können `extensionData` für ihren eigenen kleinen Laufzeitstatus verwenden
-- Sie können nur die in `extension.json` aufgeführten `appAction`s aufrufen
-- rohe SQL-Helfer und externe `extensionFetch` sind deaktiviert
-- Slot-Ziele werden in `extension.json` deklariert und nicht über SQL installiert
-
-Dadurch erhalten lokale Arbeitsbereiche eine Obsidian-ähnliche Plugin-Oberfläche, ohne dass eine
-Beliebige Repo-Dateien erben alle Funktionen einer datenbankgestützten Erweiterung.
-
-## Wie Apps es nutzen
-
-Der lokale Dateimodus wird durch die lokalen Artefakt-Helfer des Frameworks implementiert.
-Eine App deklariert Roots für die Artefakttypen, die sie besitzt, und liest und schreibt dann
-über dieselbe Aktionsoberfläche, die UI und Agent bereits verwenden.
-
-Für Inhalte bedeutet das:
-
-- `list-documents` listet konfigurierte `.md`- und `.mdx`-Dateien auf.
-- `get-document` liest eine ausgewählte lokale Datei.
-- `update-document` schreibt die ausgewählte lokale Datei.
-- `create-document` erstellt eine neue lokale `.mdx`-Datei im ausgewählten Ordner.
-- `delete-document` löscht die lokale Datei.
-- Die Suche erfolgt über die konfigurierten lokalen Dateien.
-
-Das Verschieben, Umbenennen und Neuanordnen lokaler Dateiseiten aus dem Inhalt UI ist nicht möglich
-wird noch unterstützt. Führen Sie diese Vorgänge im Arbeitsbereich oder mit einem Codierungsagenten aus. die
-Die Inhaltsseitenleiste spiegelt den resultierenden Dateibaum wider.
-
-Dadurch bleibt der Agentenvertrag einfach: Der Agent kann weiterhin Inhalte actions verwenden,
-und diese actions entscheiden, ob das Ziel SQL-backed oder file-backed ist.
-
-Andere Apps können im Laufe der Zeit dasselbe Muster annehmen. Eine Slides-App kann Karten erstellen
-`slides/*.mdx` zu Decks, eine Pläne-App kann `plans/*` zu Plandokumenten zuordnen und ein
-Dashboards-App kann `dashboards/*.mdx` Dashboards zuordnen. Diese App-spezifischen
-Ordner sind Konventionen, die über demselben lokalen Artefaktvertrag liegen.
-
-## Lokale Dateien vs. Export/Import
-
-Inhalt hat zwei verschiedene Datei-Workflows:
-
-| Workflow | Was passiert |
-| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `/local-files` Export/Import | Der Datenbankmodus bleibt die Quelle der Wahrheit. Dateien sind eine explizite Synchronisierungsoberfläche, die Sie exportieren, bearbeiten, in der Vorschau anzeigen und importieren können. |
-| Lokaler Dateimodus | Dateien sind die Quelle der Wahrheit. Die Inhaltsseitenleiste und der Editor arbeiten direkt mit lokalen Dateien. |
-
-Verwenden Sie Export/Import, wenn Sie gelegentlich Dateien in einem gehosteten Arbeitsbereich überprüfen möchten.
-Verwenden Sie den lokalen Dateimodus, wenn das Repo selbst der Arbeitsbereich ist.
-
-## Geschichte und Zusammenarbeit
-
-Der lokale Dateimodus basiert auf dem dateinativen Verlauf:
-
-- übertragen Sie wichtige Änderungen an Git
-- Pull-Anfragen zur Überprüfung verwenden
-- Lassen Sie Codierungsagenten dieselben Dateien direkt bearbeiten
-- Verwenden Sie normale Dateiunterschiede, um Änderungen zu verstehen
-
-Der Datenbankmodus eignet sich weiterhin besser für gehostete Kollaborationsfunktionen wie
-Freigabe, Kommentare, SQL-gestützter Versionsverlauf und Live-Mehrbenutzerbearbeitung.
-
-Die Anbietersynchronisierung kann über beide Modi gelegt werden. Beispielsweise kann ein Dokumenten-Repository
-Fügen Sie actions hinzu, die Inhalte von einem CMS in lokale MDX-Dateien ziehen oder ausgewählte Dateien per Push übertragen
-lokale Dateien zurück zu diesem CMS.
-
-## Produktionssicherheit
-
-Der lokale Dateimodus gewährt der App-Actions direkten Schreibzugriff auf den konfigurierten Arbeitsbereich
-Dateien. Dies eignet sich für die lokale Entwicklung und vertrauenswürdige Single-Tenant-Dateien
-Brücken, aber es ist nicht das Standard-Produktionssicherheitsmodell.
-
-Bei `NODE_ENV=production` verweigert das Framework den `local-files`-Modus, es sei denn, Sie
-set:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-Legen Sie dies nur für eine vertrauenswürdige Einzelmandantenbereitstellung fest, die jeder verwenden kann
-Die App darf die konfigurierten Dateien lesen und schreiben. Für normales Hosting:
-Mehrbenutzer-Apps, verwenden Sie den Datenbankmodus und SQL-gestützte Freigabe.
+Zur Migration `mode: "local-files"` und
+`AGENT_NATIVE_MODE=local-files` entfernen, Roots behalten und `source`
+ergänzen. Frontmatter-IDs bewahren die Seitenidentität bei Umbenennungen und
+Verschiebungen. Lokale Komponenten und Erweiterungen verwenden weiter die
+vertrauenswürdige lokale Bridge.
diff --git a/packages/core/docs/content/locales/de-DE/template-content.mdx b/packages/core/docs/content/locales/de-DE/template-content.mdx
index ef934039df..6a5c26fa08 100644
--- a/packages/core/docs/content/locales/de-DE/template-content.mdx
+++ b/packages/core/docs/content/locales/de-DE/template-content.mdx
@@ -91,9 +91,8 @@ Wenn Sie die App öffnen, sehen Sie neben dem Editor einen Seitenbaum. Der Agent
- **Seiten in einer Baumstruktur organisieren** – unbegrenzt verschachteln, zum Neuanordnen ziehen, Lieblingsseiten, die Sie häufig verwenden.
- **Alles durchsuchen** mit Volltextsuche über Titel und Inhalte hinweg.
- **Bearbeiten Sie lokale Markdown/MDX-Dateien wie Obsidian.** Verwenden Sie die `/local-files`-Ansicht
- Um Ihren Arbeitsbereich in Dateien zu exportieren, diese in Ihren eigenen Tools zu bearbeiten und eine Vorschau anzuzeigen
- Änderungen und importieren Sie sie zurück. Im lokalen Dateimodus schreibt der Inhalt direkt nach
- die ausgewählte `.md`- oder `.mdx`-Datei.
+ um einen Ordner mit Files zu verbinden, ihn mit eigenen Werkzeugen zu bearbeiten,
+ Änderungen zu synchronisieren und Konflikte in der SQL-App zu prüfen.
- **Generieren Sie umfangreiche interaktive benutzerdefinierte Blöcke.** Registrieren Sie lokale React-Komponenten,
Fügen Sie sie als MDX ein und lassen Sie den Agent Komponentendateien erstellen oder aktualisieren
Ihre Dokumente.
@@ -136,32 +135,19 @@ als Überprüfungsoberfläche. Die gehostete App bleibt die Quelle der Wahrheit
Kommentare, Berechtigungen und Live-Zusammenarbeit; Der lokale Ordner ist ein expliziter
Oberfläche synchronisieren.
-Inhalte können auch im **Lokalen Dateimodus** ausgeführt werden, wobei Dateien die Quelle sind
-Wahrheit statt SQL Dokumente. `agent-native.json` zu einem Repo hinzufügen, set
-`mode: "local-files"` und konfigurieren Sie Roots wie `docs/`, `blog/`
-`content/` und `resources/`. Der Standard-Inhaltseditor füllt dann dessen
-linkte Seitenleiste aus diesen lokalen `.md`/`.mdx`-Dateien und schreibt Änderungen zurück in die
-ausgewählte Datei durch das normale Dokument actions. Verwenden Sie dies für Repo-First-Dokumente
-Blogs, Ressourcenbibliotheken oder persönliche Inhalte im Obsidian-Stil mit MDX-Unterstützung
-Komponenten; Wechseln Sie zurück in den Datenbankmodus, wenn Sie eine gehostete Zusammenarbeit wünschen und
-SQL-gestütztes Teilen. Siehe [Local File Mode](/docs/local-file-mode) für
-eigenständiges Repo-Layout, Konfiguration, benutzerdefinierte MDX-Komponenten, lokal
-`extensions/`-Widgets und Leitfaden zur Produktionssicherheit.
+Lokale Ordner verwenden jetzt dasselbe SQL-Modell wie alle Seiten. Jede Seite
+gehört zu einem Bereich und seiner Files-Datenbank; der Ordner ist ein
+Quelladapter. Siehe [Lokale Ordnerquellen](/docs/local-file-mode) für Richtlinien,
+Konflikte, MDX-Komponenten und die Migration vom alten Modus.
-So installieren Sie den Content Local-Files-Skill in einem vorhandenen Repository:
+So öffnen Sie Content für ein vorhandenes Repository:
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-Das Installationsprogramm kopiert den `content`-Skill für Ihren Coding-Agent und schreibt oder
-aktualisiert `agent-native.json` mit Inhaltswurzeln für `docs/`, `blog/`, `content/`
-und `resources/`. Wenn eine lokale Content-App, Agent Native Desktop oder vertrauenswürdig
-Lokale Bridge läuft, Agenten sollten Content actions wie
-`list-documents`, `get-document`, `edit-document`, `update-document` und
-`share-local-file-document` anstelle von unformatierten Dateisystem-Schreibvorgängen. Ohne dieses lokale
-bridge, der installierte Skill gibt dem Agent weiterhin den Repo-Bearbeitungsvertrag für
-sichere Markdown/MDX-Änderungen.
+Die CLI startet Content mit der normalen Datenbank, registriert die Ordnerquelle
+und öffnet die Verbindung, ohne eine Modus-Umgebungsvariable zu setzen.
## Für Entwickler
diff --git a/packages/core/docs/content/locales/es-ES/local-file-mode.mdx b/packages/core/docs/content/locales/es-ES/local-file-mode.mdx
index 1f182cae05..7d0905212f 100644
--- a/packages/core/docs/content/locales/es-ES/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/es-ES/local-file-mode.mdx
@@ -1,527 +1,69 @@
---
-title: "Modo de archivo local"
-description: "Ejecute aplicaciones nativas del agente con Markdown, MDX y otros archivos de repositorio locales como fuente de verdad, incluidos documentos MDX estilo Obsidian con componentes personalizados."
+title: "Fuentes de carpetas locales"
+description: "Conecte carpetas Markdown y MDX a los espacios de Content respaldados por base de datos."
---
-# Modo de archivo local
+# Fuentes de carpetas locales
-El modo de archivo local permite que una aplicación nativa del agente adjunte su UI normal y su superficie de acción
-directamente a archivos en un repositorio o espacio de trabajo. La aplicación todavía se siente como si estuviera alojada
-producto, pero sus vistas de lista, editor y herramientas de agente leen y escriben archivos locales
-en lugar de registros de aplicaciones respaldados por SQL.
+Content tiene un único modelo de datos: cada página se guarda en SQL, pertenece
+a un **espacio** y figura en la base del sistema **Files** de ese espacio. Una
+carpeta local es una fuente conectada a Files, no otro modo de la aplicación. Ya
+no existe un interruptor `AGENT_NATIVE_MODE`.
-La primera implementación está en la plantilla de Contenido: la barra lateral izquierda es
-rellenado a partir de archivos locales `.md` y `.mdx`; al seleccionar una página se abre el estándar
-Editor de contenido y guardar escrituras en el archivo seleccionado. Los mismos archivos pueden
-También puede ser editado por Codex, Código Claude, el agente de la barra lateral Agent-Native o un normal
-editor.
+Cada usuario tiene un espacio personal, cada organización accesible tiene el
+suyo, y el catálogo personal **Workspaces** decide qué espacios aparecen. Files
+es una base de Content normal: sus propiedades, filtros, orden, agrupación y
+vistas guardadas también pueden representar la barra lateral.
-En cuanto al contenido, esto hace que el producto parezca Obsidian de código abierto para MDX:
-tus documentos se guardan como archivos, mientras que la aplicación agrega un editor visual, el agente actions
-Copias que se pueden compartir y componentes interactivos enriquecidos de MDX.
+## Conectar una carpeta
-Utilice el modo de archivo local cuando desee un flujo de trabajo basado en el repositorio:
+Elija una carpeta mediante el navegador o Agent Native Desktop y conéctela a un
+espacio existente, o cree un espacio privado respaldado por esa carpeta. SQL
+solo guarda el identificador opaco, rutas relativas, hashes y metadatos; nunca
+la ruta absoluta, el identificador del navegador ni el cuerpo bruto del archivo.
-- un repositorio de documentos con `docs/*.mdx`
-- un blog con `blog/*.mdx`
-- recursos como posicionamiento, mensajería o notas del equipo en `resources/*.md`
-- una base de conocimientos personal estilo Obsidian con un editor MDX más completo
-- Documentos que necesitan bloques MDX personalizados e interactivos generados a partir del código React local
-- artefactos de aplicaciones que deberían ser fáciles de inspeccionar y parchar para los agentes de codificación
+Las políticas son `database_primary`, `source_primary` y
+`reviewed_bidirectional`. La sincronización materializa los archivos como
+páginas SQL normales. Los cambios simultáneos crean un cambio revisable en vez
+de sobrescribir un lado. Desconectar conserva las páginas y los archivos.
-Utilice el modo de base de datos cuando desee disfrutar de la experiencia de la aplicación colaborativa alojada:
-Compartir entre varios usuarios, permisos respaldados por SQL, comentarios, historial de versiones y
-alojamiento de producción sin acceso al sistema de archivos local.
-
-## El modelo mental
-
-Hay dos modos de fuente de verdad:
-
-| Modo | Fuente de la verdad | Mejor para |
-| --------------------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
-| Modo de base de datos | Filas SQL hasta Drizzle | Aplicaciones alojadas, colaboración, uso compartido, comentarios, historial de versiones |
-| Modo de archivo local | Archivos de repositorio declarados por `agent-native.json` | Flujos de trabajo locales/de desarrollo, revisión de Git, ediciones del agente de codificación, contenido nativo de archivos |
-
-El UI y el agente actions deben mantener la misma forma en ambos modos. Un contenido
-el editor aún edita documentos; la diferencia es si esos documentos resuelven
-a filas SQL o archivos locales.
-
-
-
-```html
-
-
-
UI de contenido
-
- Agente + acciones list/get/update-document
-
-
-
→
-
-
- Modo base de datosSQL rows via Drizzlealojado · compartir · comentarios · historial
-
-
- Local File Moderepo files via agent-native.jsonrevisión Git · ediciones del agente de código
-
-
-
-```
-
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
-
-
-
-## Repositorio de ejemplo
-
-Un espacio de trabajo de contenido puede ser tan pequeño como este:
-
-
-
-En el modo de archivo local, la barra lateral de Contenido muestra `docs/`, `blog/` y
-`resources/` árboles como páginas. Al seleccionar `docs/getting-started.mdx` se abre eso
-archivo en el editor de contenido estándar; la edición en el UI escribe de nuevo en
-`docs/getting-started.mdx`.
-
-`components/` no es una raíz de contenido. Es una biblioteca de componentes de vista previa que MDX
-los archivos pueden importarse o hacer referencia. El editor puede renderizar componentes MDX locales simples
-sin necesidad de clonar o bifurcar toda la aplicación de contenido.
-
-`extensions/` tampoco es una raíz de contenido. Es una biblioteca de extensión local:
-pequeños widgets aislados que pueden renderizarse en espacios de aplicaciones mientras su fuente permanece en
-el repositorio.
-
-## Instalar contenido en un repositorio
-
-Para documentos, blogs o espacios de trabajo MDX existentes, instale los archivos locales de contenido
-habilidad:
+## Iniciar desde un repositorio
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-Esto copia la habilidad `content` en las carpetas de habilidades del agente del repositorio y escribe
-o actualiza `agent-native.json` con los valores predeterminados de contenido:
-
-- `mode: "local-files"` a nivel del espacio de trabajo
-- `apps.content.mode: "local-files"`
-- raíces de contenido para `docs/`, `blog/`, `content/` y `resources/`
-- `components/` para componentes locales MDX
-- `extensions/` para widgets de extensión local
-
-La habilidad instalada indica a los agentes de codificación que utilicen Content actions
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document` y archivo de componente actions) cuando se trata de una aplicación de contenido local
-o Agent Native Desktop Bridge los expone. Si no hay ningún puente en funcionamiento, la habilidad
-recurre a ediciones directas seguras del repositorio mientras conserva el frontmatter, las importaciones, JSX,
-y desconocido MDX.
+El comando inicia Content con su base de datos normal, registra la carpeta como
+fuente y abre la conexión. No define una variable de modo.
## Configuración
-Agregue `agent-native.json` al repositorio o a la raíz del espacio de trabajo:
-
```json
{
"version": 1,
"apps": {
"content": {
- "mode": "local-files",
"roots": [
{
"name": "Docs",
"path": "docs",
"kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
}
],
"components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
+ "extensions": "extensions"
}
}
}
```
-También puedes habilitar archivos locales con `AGENT_NATIVE_MODE=local-files` o
-`AGENT_NATIVE_DATA_MODE=local-files`; se prefiere el manifiesto porque
-documenta el contrato de la carpeta en el propio repositorio.
-
-## Formato de archivo de contenido
-
-El contenido dice Markdown y MDX. Frontmatter contiene metadatos de la página y el cuerpo es
-el documento editable:
-
-```mdx
----
-title: "Empezando"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
-
-# Empezando
-
-Use to show framework-specific code.
-```
-
-El título proviene del frontmatter `title` cuando está presente; de lo contrario, del
-nombre de archivo. El editor conserva la fuente MDX que aún no puede editar visualmente, por lo que
-Los agentes de codificación y los editores de texto normales siguen siendo puertas de escape seguras.
-
-## Componentes MDX personalizados
-
-El contenido puede obtener una vista previa de los componentes locales desde la carpeta `components` configurada.
-Esto está destinado a componentes MDX de estilo documentos, como pestañas, llamadas y paquetes
-instale fragmentos o bloques de código específicos del marco.
-
-Por ejemplo, agregue un componente interactivo junto a su contenido:
-
-```tsx
-// components/ImpactCounter.tsx
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-Luego úselo desde cualquier archivo MDX local:
-
-```mdx
----
-title: "Notas de lanzamiento"
----
-
-# Notas de lanzamiento
-
-
-```
-
-El servidor de desarrollo de contenido descubre las exportaciones con nombre de PascalCase y el valor predeterminado de PascalCase
-exportaciones de archivos `.tsx`, `.jsx`, `.ts` y `.js` en `components/`. Esos
-Los componentes se procesan dentro del editor y aparecen en el menú diagonal debajo
-**Componentes locales**. La inserción de barra diagonal crea una etiqueta mínima como
-``; agregue accesorios en la fuente MDX cuando sea necesario.
-
-La ejecución de componentes es intencionalmente una capacidad de puente entre desarrollo local y escritorio, no
-acceso simple a la carpeta del navegador alojado. Si abres `content.agent-native.com`,
-elija **Archivos locales** y elija una carpeta en Chrome, la aplicación puede leer y escribir
-los archivos `.md` y `.mdx` a través del navegador File System Access API, pero
-Chrome no expone una ruta de carpeta absoluta para que Vite pueda compilar
-`components/*.tsx`. Para obtener una vista previa y recargar en caliente componentes React personalizados, ejecute
-Contenido local o use Agent Native Desktop para que el puente local confiable pueda
-registre el espacio de trabajo elegido con el servidor de desarrollo de contenido local. En ese modo,
-ediciones en archivos de componentes existentes, recarga en caliente a través de Vite y adición o
-Al eliminar los archivos de componentes se vuelve a cargar el registro de componentes y el menú diagonal.
-
-Los agentes también pueden trabajar con esos archivos de componentes registrados. Usar
-`list-local-component-files` para encontrar la identificación del espacio de trabajo registrado, luego
-`write-local-component-file` para crear o actualizar `.tsx`, `.jsx`, `.ts` o
-Archivos `.js` en la carpeta `components/` del espacio de trabajo. Los archivos MDX siguen siendo los
-fuente de verdad para el uso de componentes; los archivos componentes permanecen en el repositorio normal
-archivos fuente revisados con Git.
-
-Si un componente exporta metadatos de entrada, seleccione el componente en el editor
-muestra un botón de edición en la esquina superior derecha del componente. Tipos de entrada admitidos
-son `string`, `textarea`, `number`, `boolean` y `select`. El formulario escribe
-vuelve a la etiqueta MDX, por lo que los archivos locales siguen siendo la fuente de la verdad. El
-Los metadatos se pueden exportar como `ComponentNameInputs`, `ComponentNameConfig.inputs`,
-`Component.inputs` o `agentNative.inputs`.
-
-Las etiquetas de componentes simples con accesorios literales pueden obtener una vista previa en línea:
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-Las expresiones JSX complejas se conservan en el código fuente. Si el editor no puede hacerlo de forma segura
-obtenga una vista previa de la propiedad de un componente todavía, muestra un marcador de posición de advertencia en lugar de
-soltar datos silenciosamente.
-
-## Compartir archivos locales
-
-Los archivos locales no se comparten directamente porque otros usuarios no pueden leer una ruta
-tu máquina. El botón Compartir de la barra de herramientas Contenido crea o actualiza un
-copia respaldada por la base de datos del archivo seleccionado, navega hasta esa copia y abre el
-ventana emergente de compartir normal. El archivo local original permanece en Archivos locales; el
-La copia de la base de datos aparece en Copias compartidas en modo de archivo local y utiliza el
-modelo estándar para compartir documentos.
-
-## Extensiones locales
-
-El modo de archivo local también puede cargar extensiones respaldadas por repositorio desde el archivo configurado
-Carpeta `extensions`. Cada extensión es un directorio con un `extension.json`
-manifiesto y un archivo de entrada HTML:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html` es el mismo formato de cuerpo de extensión Alpine/Tailwind utilizado por normal
-extensiones respaldadas por bases de datos. Cuando la aplicación Contenido ve una extensión local que
-declara `content.sidebar.bottom`, representa esa extensión en la parte inferior de
-la barra lateral de Contenido. El anfitrión pasa `window.slotContext` con el seleccionado
-ID del documento, título, metadatos de origen y si el contenido está en modo de archivo local.
-
-La aplicación obtiene una vista previa de las extensiones locales, pero las edita como archivos. Las extensiones
-la lista los muestra con una insignia de Archivo local y el visor de página completa apunta a
-el archivo de entrada. Extensión respaldada por SQL actions, como actualizar, eliminar, compartir y
-el historial no se aplica; use su editor, Codex, código Claude o historial de Git para
-cambios de fuente.
-
-Para v1, las extensiones locales son intencionalmente conservadoras:
-
-- pueden usar `extensionData` para su propio estado de ejecución pequeño
-- solo pueden llamar a los `appAction` enumerados en `extension.json`
-- Los asistentes SQL sin formato y `extensionFetch` externos están deshabilitados
-- Los destinos de ranura se declaran en `extension.json`, no se instalan a través de SQL
-
-Esto proporciona a los espacios de trabajo locales una superficie de complemento similar a Obsidian sin permitir que
-El archivo de repositorio arbitrario hereda todas las capacidades de una extensión respaldada por una base de datos.
-
-## Cómo lo usan las aplicaciones
-
-El modo de archivo local se implementa a través de los asistentes de artefactos locales del marco.
-Una aplicación declara raíces para los tipos de artefactos que posee, luego lee y escribe
-a través de la misma superficie de acción que su UI y su agente ya utilizan.
-
-Para Contenido, eso significa:
-
-- `list-documents` enumera los archivos `.md` y `.mdx` configurados.
-- `get-document` lee un archivo local seleccionado.
-- `update-document` escribe el archivo local seleccionado.
-- `create-document` crea un nuevo archivo `.mdx` local en la carpeta seleccionada.
-- `delete-document` elimina el archivo local.
-- La búsqueda se ejecuta en los archivos locales configurados.
-
-Mover, renombrar y reordenar páginas de archivos locales desde UI de contenido no lo es
-aún es compatible. Realice esas operaciones en el espacio de trabajo o con un agente de codificación; el
-La barra lateral de contenido reflejará el árbol de archivos resultante.
-
-Esto simplifica el contrato del agente: el agente puede seguir usando Content actions,
-y esos actions deciden si el objetivo está respaldado por SQL o por archivos.
-
-Otras aplicaciones pueden adoptar el mismo patrón con el tiempo. Una aplicación de Presentaciones puede mapear
-`slides/*.mdx` a cubiertas, una aplicación de Planes puede asignar `plans/*` a documentos de planos y
-La aplicación Paneles puede asignar `dashboards/*.mdx` a paneles. Aquellos específicos de la aplicación
-Las carpetas son convenciones superpuestas al mismo contrato de artefacto local.
-
-## Archivos locales frente a exportación/importación
-
-El contenido tiene dos flujos de trabajo de archivos diferentes:
-
-| Flujo de trabajo | Qué pasa |
-| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Exportación/importación `/local-files` | El modo de base de datos sigue siendo la fuente de la verdad. Los archivos son una superficie de sincronización explícita que puedes exportar, editar, obtener una vista previa e importar. |
-| Modo de archivo local | Los archivos son la fuente de la verdad. La barra lateral de contenido y el editor funcionan directamente en archivos locales. |
-
-Utilice exportar/importar cuando desee revisar archivos ocasionalmente en un espacio de trabajo alojado.
-Utilice el modo de archivo local cuando el repositorio en sí sea el espacio de trabajo.
-
-## Historia y colaboración
-
-El modo de archivo local se basa en el historial nativo del archivo:
-
-- realizar cambios importantes en Git
-- usar solicitudes de extracción para revisión
-- permitir que los agentes de codificación editen los mismos archivos directamente
-- use diferencias de archivos normales para comprender los cambios
-
-El modo de base de datos sigue siendo el más adecuado para funciones de colaboración alojadas como
-Compartir, comentarios, historial de versiones respaldado por SQL y edición multiusuario en vivo.
-
-La sincronización del proveedor se puede superponer a cualquier modo. Por ejemplo, un repositorio de documentos puede
-Agregue actions que extraiga contenido de un CMS a archivos MDX locales o envíe los seleccionados
-archivos locales de regreso a ese CMS.
-
-## Seguridad en la producción
-
-El modo de archivo local le da a la aplicación actions acceso directo de escritura al espacio de trabajo configurado
-archivos. Esto es apropiado para el desarrollo local y un archivo de inquilino único confiable
-puentes, pero no es el modelo de seguridad de producción predeterminado.
-
-Cuando `NODE_ENV=production`, el marco rechaza el modo `local-files` a menos que usted
-conjunto:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-Establezca esto solo para una implementación confiable de un solo inquilino donde todos los que puedan usarlo
-la aplicación puede leer y escribir los archivos configurados. Para alojamiento normal,
-aplicaciones multiusuario, uso del modo de base de datos y uso compartido respaldado por SQL.
+Para migrar, elimine `mode: "local-files"` y
+`AGENT_NATIVE_MODE=local-files`, conserve las raíces y añada `source`. Los IDs
+del frontmatter mantienen la identidad al renombrar o mover una página. Los
+componentes y extensiones locales siguen usando el puente local de confianza.
diff --git a/packages/core/docs/content/locales/es-ES/template-content.mdx b/packages/core/docs/content/locales/es-ES/template-content.mdx
index 3e3e275a9d..209a0018b3 100644
--- a/packages/core/docs/content/locales/es-ES/template-content.mdx
+++ b/packages/core/docs/content/locales/es-ES/template-content.mdx
@@ -95,9 +95,8 @@ Cuando abras la aplicación, verás un árbol de páginas al lado del editor. El
- **Organiza las páginas en un árbol**: anida infinitamente, arrastra para reordenar, páginas favoritas que usas con frecuencia.
- **Busca en todo** con búsqueda de texto completo en títulos y contenido.
- **Edite archivos locales Markdown/MDX como Obsidian.** Utilice la vista `/local-files`
- para exportar su espacio de trabajo a archivos, edítelos en sus propias herramientas, obtenga una vista previa
- cambios e importarlos nuevamente. En el modo de archivo local, el contenido se escribe directamente en
- el archivo `.md` o `.mdx` seleccionado.
+ para conectar una carpeta a Files, editarla con sus herramientas, sincronizar
+ cambios y revisar conflictos dentro de la aplicación SQL.
- **Genere bloques personalizados interactivos enriquecidos.** Registre componentes React locales,
insértelos como MDX y permita que el agente cree o actualice archivos de componentes para
tus documentos.
@@ -140,32 +139,19 @@ como superficie de revisión. La aplicación alojada sigue siendo la fuente de v
comentarios, permisos y colaboración en vivo; la carpeta local es explícita
superficie de sincronización.
-El contenido también se puede ejecutar en **Modo de archivo local**, donde los archivos son la fuente de
-verdad en lugar de documentos SQL. Agregue `agent-native.json` a un repositorio, configure
-`mode: "local-files"` y configurar raíces como `docs/`, `blog/`,
-`content/` y `resources/`. Luego, el editor de contenido estándar completa su
-barra lateral izquierda de esos archivos locales `.md`/`.mdx` y escribe las ediciones en el
-archivo seleccionado a través del documento normal actions. Utilice esto para documentos de repositorio primero,
-blogs, bibliotecas de recursos o contenido personal estilo Obsidian con tecnología MDX
-componentes; volver al modo de base de datos cuando desee colaboración alojada y
-Compartición respaldada por SQL. Consulte [Local File Mode](/docs/local-file-mode) para
-diseño de repositorio independiente, configuración, componentes personalizados MDX, local
-Widgets `extensions/` y guía de seguridad de producción.
+Las carpetas locales ahora usan el mismo modelo SQL que todas las páginas. Cada
+página pertenece a un espacio y a su base Files; la carpeta es un adaptador de
+fuente. Consulte [Fuentes de carpetas locales](/docs/local-file-mode) para las
+políticas, conflictos, componentes MDX y la migración del modo anterior.
-Para instalar la habilidad de archivos locales de contenido en un repositorio existente:
+Para abrir Content en un repositorio existente:
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-El instalador copia la habilidad `content` para su agente de codificación y escribe o
-actualiza `agent-native.json` con raíces de contenido para `docs/`, `blog/`, `content/`,
-y `resources/`. Cuando una aplicación de contenido local, Agent Native Desktop o de confianza
-El puente local se está ejecutando, los agentes deben usar Contenido actions como
-`list-documents`, `get-document`, `edit-document`, `update-document` y
-`share-local-file-document` en lugar de escrituras en el sistema de archivos sin formato. Sin ese local
-puente, la habilidad instalada aún le otorga al agente el contrato de edición de repositorio para
-ediciones seguras de Markdown/MDX.
+La CLI inicia Content con su base normal, registra la carpeta como fuente y abre
+la conexión sin definir una variable de modo.
## Para desarrolladores
diff --git a/packages/core/docs/content/locales/fr-FR/local-file-mode.mdx b/packages/core/docs/content/locales/fr-FR/local-file-mode.mdx
index 482f4bad92..2898680424 100644
--- a/packages/core/docs/content/locales/fr-FR/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/fr-FR/local-file-mode.mdx
@@ -1,525 +1,72 @@
---
-title: "Mode fichier local"
-description: "Exécutez des applications natives d'agent avec Markdown, MDX et d'autres fichiers de dépôt locaux comme source de vérité, y compris des documents MDX de style Obsidian avec des composants personnalisés."
+title: "Sources de dossiers locaux"
+description: "Connectez des dossiers Markdown et MDX aux espaces Content, tous stockés en base de données."
---
-# Mode fichier local
+# Sources de dossiers locaux
-Le mode Fichier local permet à une application native d'agent d'attacher son UI et sa surface d'action normales
-directement vers les fichiers d'un dépôt ou d'un espace de travail. L'application ressemble toujours à une application hébergée
-produit, mais ses vues de liste, son éditeur et ses outils d'agent lisent et écrivent des fichiers locaux
-au lieu des enregistrements d'application basés sur SQL.
+Content utilise désormais un seul modèle de données : chaque page est stockée
+en SQL, appartient à un **espace** et figure dans la base système **Files** de
+cet espace. Un dossier local est une source connectée à Files, pas un second
+mode d'application. Il n'existe plus de commutateur `AGENT_NATIVE_MODE`.
-La première implémentation se trouve dans le modèle de contenu : la barre latérale gauche est
-rempli à partir des fichiers `.md` et `.mdx` locaux, la sélection d'une page ouvre la norme
-Éditeur de contenu et enregistrement des écritures dans le fichier sélectionné. Les mêmes fichiers peuvent
-être également modifié par Codex, Claude Code, l'agent de la barre latérale Agent-Native ou un utilisateur normal
-éditeur.
+Chaque utilisateur possède un espace personnel, chaque organisation accessible
+possède son espace, et le catalogue personnel **Workspaces** détermine les
+espaces affichés. Files est une base Content normale : ses propriétés, filtres,
+tris, groupes et vues enregistrées peuvent aussi rendre la barre latérale.
-Pour le contenu, cela donne au produit l'impression d'être Obsidian open source pour MDX :
-vos documents vivent sous forme de fichiers, tandis que l'application ajoute un éditeur visuel, l'agent actions,
-copies partageables et riches composants interactifs MDX.
+## Connecter un dossier
-Utilisez le mode fichier local lorsque vous souhaitez un workflow axé sur le dépôt :
+Choisissez un dossier via le navigateur ou Agent Native Desktop, puis rattachez-
+le à un espace existant ou créez un espace privé associé au dossier. SQL ne
+conserve que l'identifiant opaque de connexion, les chemins relatifs, les
+empreintes et les métadonnées de source — jamais le chemin absolu, le handle du
+navigateur ou le corps brut des fichiers.
-- un dépôt de documents avec `docs/*.mdx`
-- un blog avec `blog/*.mdx`
-- ressources telles que le positionnement, la messagerie ou les notes d'équipe dans `resources/*.md`
-- une base de connaissances personnelle de style Obsidian avec un éditeur MDX plus riche
-- documents nécessitant des blocs MDX personnalisés interactifs générés à partir du code React local
-- Artefacts d'application qui devraient être faciles à inspecter et à corriger pour les agents de codage
+Les stratégies disponibles sont `database_primary`, `source_primary` et
+`reviewed_bidirectional`. La synchronisation matérialise les fichiers comme des
+pages SQL ordinaires. En cas de modifications concurrentes, elle crée un
+changement à examiner au lieu d'écraser un côté. La déconnexion conserve les
+pages et les fichiers locaux.
-Utilisez le mode base de données lorsque vous souhaitez bénéficier de l'expérience d'une application collaborative hébergée :
-partage multi-utilisateurs, autorisations basées sur SQL, commentaires, historique des versions et
-hébergement de production sans accès au système de fichiers local.
-
-## Le modèle mental
-
-Il existe deux modes de source de vérité :
-
-| Mode | Source de vérité | Idéal pour |
-| -------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
-| Mode base de données | Lignes SQL jusqu'à Drizzle | Applications hébergées, collaboration, partage, commentaires, historique des versions |
-| Mode fichier local | Fichiers Repo déclarés par `agent-native.json` | Workflows locaux/de développement, révision de Git, modifications de l'agent de codage, contenu natif du fichier |
-
-Le UI et l'agent actions doivent conserver la même forme dans les deux modes. Un contenu
-l'éditeur édite toujours les documents ; la différence est de savoir si ces documents résolvent
-vers des lignes SQL ou des fichiers locaux.
-
-
-
-```html
-
-
-
UI de contenu
-
- Agent et actions applicatives list/get/update-document
-
-
-
→
-
-
- Mode base de donnéesSQL rows via Drizzlehébergé · partage · commentaires · historique
-
-
- Local File Moderepo files via agent-native.jsonrevue Git · éditions agent de code
-
-
-
-```
-
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
-
-
-
-## Exemple de dépôt
-
-Un espace de travail de contenu peut être aussi petit que ceci :
-
-
-
-En mode fichier local, la barre latérale Contenu affiche les `docs/`, `blog/` et
-Arborescences `resources/` sous forme de pages. La sélection de `docs/getting-started.mdx` ouvre cela
-fichier dans l'éditeur de contenu standard ; l'édition dans le UI réécrit dans
-`docs/getting-started.mdx`.
-
-`components/` n'est pas une racine de contenu. Il s'agit d'une bibliothèque de composants en avant-première que MDX
-les fichiers peuvent être importés ou référencés. L'éditeur peut restituer des composants MDX locaux simples
-sans que vous ayez à cloner ou à dupliquer l'intégralité de l'application de contenu.
-
-`extensions/` n'est pas non plus une racine de contenu. Il s'agit d'une bibliothèque d'extensions locale :
-petits widgets en bac à sable qui peuvent s'afficher dans les emplacements d'application tandis que leur source reste dans
-le dépôt.
-
-## Installer le contenu dans un dépôt
-
-Pour un espace de travail de documents, de blog ou MDX existant, installez les fichiers locaux de contenu
-compétence :
+## Démarrer depuis un dépôt
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-Cela copie la compétence `content` dans les dossiers de compétences d'agent du dépôt et écrit
-ou met à jour `agent-native.json` avec les valeurs par défaut du contenu :
-
-- `mode: "local-files"` au niveau de l'espace de travail
-- `apps.content.mode: "local-files"`
-- racines de contenu pour `docs/`, `blog/`, `content/` et `resources/`
-- `components/` pour les composants locaux MDX
-- `extensions/` pour les widgets d'extension locale
-
-La compétence installée indique aux agents de codage d'utiliser le contenu actions
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document` et fichier de composant actions) lorsqu'une application de contenu locale
-ou le pont Agent Native Desktop les expose. Si aucun pont ne fonctionne, la compétence
-revient à des modifications de dépôt directes sécurisées tout en préservant le contenu, les importations, JSX,
-et MDX inconnu.
+La commande démarre l'application Content normale, enregistre le dossier comme
+source et ouvre l'écran de connexion. Elle ne définit aucune variable de mode.
## Configuration
-Ajoutez `agent-native.json` à la racine du dépôt ou de l'espace de travail :
-
```json
{
"version": 1,
"apps": {
"content": {
- "mode": "local-files",
"roots": [
{
"name": "Docs",
"path": "docs",
"kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
}
],
"components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
+ "extensions": "extensions"
}
}
}
```
-Vous pouvez également activer les fichiers locaux avec `AGENT_NATIVE_MODE=local-files` ou
-`AGENT_NATIVE_DATA_MODE=local-files` ; le manifeste est préféré car il
-documente le contrat de dossier dans le dépôt lui-même.
-
-## Format de fichier de contenu
-
-Le contenu lit Markdown et MDX. Frontmatter contient les métadonnées de la page et le corps est
-le document modifiable :
-
-```mdx
----
-title: "Commencer"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
-
-# Commencer
-
-Use to show framework-specific code.
-```
-
-Le titre vient du frontmatter `title` lorsqu'il est présent, sinon du
-nom de fichier. L'éditeur conserve la source MDX qu'il ne peut pas encore modifier visuellement, donc
-Les agents de codage et les éditeurs de texte normaux restent des issues de secours sûres.
-
-## Composants MDX personnalisés
-
-Le contenu peut prévisualiser les composants locaux du dossier `components` configuré.
-Ceci est destiné aux composants MDX de style document tels que les onglets, les légendes, le package
-installez des extraits ou des blocs de code spécifiques au framework.
-
-Par exemple, ajoutez un composant interactif à côté de votre contenu :
-
-```tsx
-// components/ImpactCounter.tsx
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-Utilisez-le ensuite à partir de n'importe quel fichier MDX local :
-
-```mdx
----
-title: "Notes de lancement"
----
-
-# Notes de lancement
-
-
-```
-
-Le serveur de développement de contenu découvre les exportations nommées PascalCase et PascalCase par défaut
-exporte à partir de fichiers `.tsx`, `.jsx`, `.ts` et `.js` sous `components/`. Ceux
-les composants s'affichent dans l'éditeur et apparaissent dans le menu barre oblique sous
-**Composants locaux**. L'insertion d'une barre oblique crée une balise minimale telle que
-`` ; ajoutez des accessoires dans la source MDX si nécessaire.
-
-L'exécution des composants est intentionnellement une fonctionnalité de pont de développement local/de bureau, et non
-accès simple au dossier du navigateur hébergé. Si vous ouvrez `content.agent-native.com`,
-choisissez **Fichiers locaux** et choisissez un dossier dans Chrome, l'application peut lire et écrire
-les fichiers `.md` et `.mdx` via le système de fichiers du navigateur Accédez à API, mais
-Chrome n'expose pas de chemin de dossier absolu à compiler par Vite
-`components/*.tsx`. Pour prévisualiser et recharger à chaud les composants React personnalisés, exécutez
-Contenu localement ou utilisez Agent Native Desktop pour que le pont local de confiance puisse
-enregistrez l'espace de travail sélectionné auprès du serveur de développement de contenu local. Dans ce mode,
-modifications des fichiers de composants existants, rechargement à chaud via Vite et ajout de ou
-la suppression des fichiers de composants recharge le registre des composants et le menu barre oblique.
-
-Les agents peuvent également travailler avec ces fichiers de composants enregistrés. Utiliser
-`list-local-component-files` pour trouver l'identifiant de l'espace de travail enregistré, puis
-`write-local-component-file` pour créer ou mettre à jour `.tsx`, `.jsx`, `.ts` ou
-Fichiers `.js` dans le dossier `components/` de l'espace de travail. Les fichiers MDX restent les
-source de vérité pour l'utilisation des composants ; les fichiers de composants restent un dépôt normal
-fichiers sources examinés avec Git.
-
-Si un composant exporte des métadonnées d'entrée, sélection du composant dans l'éditeur
-affiche un bouton d'édition dans le coin supérieur droit du composant. Types d'entrée pris en charge
-sont `string`, `textarea`, `number`, `boolean` et `select`. Le formulaire écrit
-revient à la balise MDX, les fichiers locaux restent donc la source de vérité. Le
-les métadonnées peuvent être exportées au format `ComponentNameInputs`, `ComponentNameConfig.inputs`,
-`Component.inputs` ou `agentNative.inputs`.
-
-Les balises de composants simples avec des accessoires littéraux peuvent être prévisualisées en ligne :
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-Les expressions complexes JSX sont conservées dans la source. Si l'éditeur ne peut pas en toute sécurité
-prévisualisez encore un accessoire de composant, il affiche un espace réservé d'avertissement plutôt que
-supprimer silencieusement des données.
-
-## Partage de fichiers locaux
-
-Les fichiers locaux ne sont pas partagés directement car les autres utilisateurs ne peuvent pas lire de chemin
-votre machine. Le bouton Partager de la barre d'outils Contenu crée ou actualise un
-copie sauvegardée dans la base de données du fichier sélectionné, accède à cette copie et ouvre le
-popover de partage normal. Le fichier local d'origine reste sous Fichiers locaux ; le
-la copie de la base de données apparaît sous Copies partagées en mode fichier local et utilise le
-modèle standard de partage de documents.
-
-## Extensions locales
-
-Le mode fichier local peut également charger des extensions sauvegardées en dépôt à partir du fichier configuré
-Dossier `extensions`. Chaque extension est un répertoire avec un `extension.json`
-manifeste et un fichier d'entrée HTML :
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html` est le même format de corps d'extension Alpine/Tailwind utilisé par la normale
-extensions basées sur une base de données. Lorsque l'application de contenu détecte une extension locale qui
-déclare `content.sidebar.bottom`, il affiche cette extension en bas de
-la barre latérale Contenu. L'hôte transmet `window.slotContext` avec le
-ID du document, titre, métadonnées sources et si le contenu est en mode fichier local.
-
-Les extensions locales sont prévisualisées par l'application mais modifiées sous forme de fichiers. Les extensions
-la liste les affiche avec un badge de fichier local et la visionneuse pleine page renvoie à
-le fichier d'entrée. Extension actions basée sur SQL, telle que la mise à jour, la suppression, le partage et
-l'historique ne s'applique pas ; utilisez votre éditeur, le code Codex, le code Claude ou l'historique Git pour
-modifications de la source.
-
-Pour la version v1, les extensions locales sont intentionnellement conservatrices :
-
-- ils peuvent utiliser `extensionData` pour leur propre petit état d'exécution
-- ils ne peuvent appeler que les `appAction` répertoriés dans `extension.json`
-- Les assistants SQL bruts et les `extensionFetch` externes sont désactivés
-- les emplacements cibles sont déclarés dans `extension.json`, non installés via SQL
-
-Cela donne aux espaces de travail locaux une surface de plugin de type Obsidian sans laisser passer
-un fichier de dépôt arbitraire hérite de toutes les fonctionnalités d'une extension basée sur une base de données.
-
-## Comment les applications l'utilisent
-
-Le mode fichier local est implémenté via les assistants d'artefacts locaux du framework.
-Une application déclare les racines des types d'artefacts qu'elle possède, puis lit et écrit
-via la même surface d'action, son UI et son agent l'utilisent déjà.
-
-Pour le contenu, cela signifie :
-
-- `list-documents` répertorie les fichiers `.md` et `.mdx` configurés.
-- `get-document` lit un fichier local sélectionné.
-- `update-document` écrit le fichier local sélectionné.
-- `create-document` crée un nouveau fichier `.mdx` local dans le dossier sélectionné.
-- `delete-document` supprime le fichier local.
-- la recherche s'exécute sur les fichiers locaux configurés.
-
-Le déplacement, le renommage et la réorganisation des pages de fichiers locaux à partir du contenu UI ne sont pas autorisés
-pas encore pris en charge. Effectuer ces opérations dans l'espace de travail ou avec un agent de codage ; le
-La barre latérale de contenu reflétera l'arborescence de fichiers résultante.
-
-Le contrat de l'agent reste ainsi simple : l'agent peut continuer à utiliser Content actions,
-et ces actions décident si la cible est sauvegardée sur SQL ou sur fichier.
-
-D'autres applications peuvent adopter le même modèle au fil du temps. Une application Slides peut cartographier
-`slides/*.mdx` aux decks, une application Plans peut mapper `plans/*` aux documents de plan, et
-L'application Dashboards peut mapper `dashboards/*.mdx` aux tableaux de bord. Ceux spécifiques à l'application
-les dossiers sont des conventions superposées au même contrat d'artefact local.
-
-## Fichiers locaux vs exportation/importation
-
-Le contenu comporte deux flux de travail de fichiers différents :
-
-| Flux de travail | Que se passe-t-il |
-| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Export/importation `/local-files` | Le mode base de données reste la source de vérité. Les fichiers constituent une surface de synchronisation explicite que vous exportez, modifiez, prévisualisez et importez. |
-| Mode fichier local | Les fichiers sont la source de la vérité. La barre latérale de contenu et l'éditeur fonctionnent directement sur les fichiers locaux. |
-
-Utilisez l'exportation/importation lorsque vous souhaitez examiner occasionnellement des fichiers dans un espace de travail hébergé.
-Utilisez le mode fichier local lorsque le dépôt lui-même est l'espace de travail.
-
-## Historique et collaboration
-
-Le mode fichier local s'appuie sur l'historique natif des fichiers :
-
-- valider les modifications importantes dans Git
-- utiliser les demandes d'extraction pour examen
-- laisser les agents de codage modifier directement les mêmes fichiers
-- utiliser les différences de fichiers normales pour comprendre les changements
-
-Le mode base de données reste le meilleur choix pour les fonctionnalités de collaboration hébergées telles que
-partage, commentaires, historique des versions soutenu par SQL et édition multi-utilisateurs en direct.
-
-La synchronisation du fournisseur peut être superposée à l'un ou l'autre mode. Par exemple, un dépôt de documents peut
-ajouter des actions qui extraient le contenu d'un CMS vers des fichiers MDX locaux ou poussent la sélection
-fichiers locaux vers ce CMS.
-
-## Sécurité de la production
-
-Le mode fichier local donne à l'application actions un accès direct en écriture à l'espace de travail configuré
-fichiers. Cela est approprié pour le développement local et les fichiers à locataire unique de confiance
-des ponts, mais ce n'est pas le modèle de sécurité de production par défaut.
-
-Lorsque `NODE_ENV=production`, le framework refuse le mode `local-files` sauf si vous
-définir :
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-Définissez cela uniquement pour un déploiement fiable à locataire unique où tous ceux qui peuvent l'utiliser
-l'application est autorisée à lire et à écrire les fichiers configurés. Pour un hébergement normal,
-Applications multi-utilisateurs, utilisez le mode base de données et le partage basé sur SQL.
+Pour migrer, supprimez `mode: "local-files"` et
+`AGENT_NATIVE_MODE=local-files`, conservez les racines et ajoutez la section
+`source`. Les identifiants de frontmatter préservent l'identité d'une page lors
+d'un renommage ou déplacement. Les composants et extensions locaux continuent
+de passer par le pont local de confiance.
diff --git a/packages/core/docs/content/locales/fr-FR/template-content.mdx b/packages/core/docs/content/locales/fr-FR/template-content.mdx
index c6699f705f..4245c5dce7 100644
--- a/packages/core/docs/content/locales/fr-FR/template-content.mdx
+++ b/packages/core/docs/content/locales/fr-FR/template-content.mdx
@@ -95,9 +95,8 @@ Lorsque vous ouvrez l'application, vous verrez une arborescence de pages à côt
- **Organisez les pages dans une arborescence** : emboîtez-les à l'infini, faites-les glisser pour réorganiser les pages favorites que vous utilisez souvent.
- **Recherchez partout** avec la recherche en texte intégral dans les titres et le contenu.
- **Modifiez les fichiers Markdown/MDX locaux comme Obsidian.** Utilisez la vue `/local-files`
- pour exporter votre espace de travail vers des fichiers, modifiez-les dans vos propres outils, prévisualisez
- modifications et réimportez-les. En mode fichier local, le contenu écrit directement dans
- le fichier `.md` ou `.mdx` sélectionné.
+ pour connecter un dossier à Files, le modifier avec vos outils, synchroniser
+ les changements et examiner les conflits dans l'application SQL.
- **Générez des blocs personnalisés interactifs riches.** Enregistrez les composants React locaux,
insérez-les en tant que MDX et laissez l'agent créer ou mettre à jour les fichiers de composants pour
vos documents.
@@ -140,32 +139,19 @@ comme surface de révision. L'application hébergée reste la source de vérité
commentaires, autorisations et collaboration en direct ; le dossier local est un explicite
surface de synchronisation.
-Le contenu peut également s'exécuter en **mode fichier local**, où les fichiers sont la source de
-la vérité au lieu des documents SQL. Ajoutez `agent-native.json` à un dépôt, définissez
-`mode: "local-files"` et configurez les racines telles que `docs/`, `blog/`,
-`content/` et `resources/`. L'éditeur de contenu standard remplit ensuite son
-barre latérale gauche de ces fichiers `.md`/`.mdx` locaux et réécrit les modifications dans
-fichier sélectionné via le document normal actions. Utilisez-le pour les documents repo-first,
-blogs, bibliothèques de ressources ou contenu personnel de style Obsidian avec MDX
-composants ; revenez en mode base de données lorsque vous souhaitez une collaboration hébergée et
-Partage soutenu par SQL. Voir [Local File Mode](/docs/local-file-mode) pour le
-Disposition du dépôt autonome, configuration, composants MDX personnalisés, local
-Widgets `extensions/` et guide de sécurité de production.
+Les dossiers locaux utilisent maintenant le même modèle SQL que toutes les
+pages. Chaque page appartient à un espace et à sa base Files ; le dossier est
+un adaptateur de source sur cette base. Voir [Sources de dossiers locaux](/docs/local-file-mode)
+pour les stratégies, conflits, composants MDX et la migration depuis l'ancien mode.
-Pour installer la compétence Content local-files dans un dépôt existant :
+Pour ouvrir Content sur un dépôt existant :
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-Le programme d'installation copie la compétence `content` pour votre agent de codage et écrit ou
-met à jour `agent-native.json` avec les racines de contenu pour `docs/`, `blog/`, `content/`,
-et `resources/`. Lorsqu'une application de contenu locale, un bureau Agent Native ou une application approuvée
-le pont local est en cours d'exécution, les agents doivent utiliser le contenu actions tel que
-`list-documents`, `get-document`, `edit-document`, `update-document` et
-`share-local-file-document` au lieu d'écritures brutes sur le système de fichiers. Sans ce local
-pont, la compétence installée donne toujours à l'agent le contrat de repo-édition pour
-Modifications sécurisées de Markdown/MDX.
+La CLI démarre Content avec sa base normale, enregistre la source du dossier et
+ouvre la connexion sans définir de variable d'environnement de mode.
## Pour les développeurs
diff --git a/packages/core/docs/content/locales/hi-IN/local-file-mode.mdx b/packages/core/docs/content/locales/hi-IN/local-file-mode.mdx
index bbc6e114fb..034149d77c 100644
--- a/packages/core/docs/content/locales/hi-IN/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/hi-IN/local-file-mode.mdx
@@ -1,525 +1,66 @@
---
-title: "स्थानीय फ़ाइल मोड"
-description: "सच्चाई के स्रोत के रूप में स्थानीय Markdown, MDX और अन्य रेपो फ़ाइलों के साथ एजेंट-मूल ऐप्स चलाएं - जिसमें कस्टम घटकों के साथ ओब्सीडियन-शैली MDX दस्तावेज़ शामिल हैं।"
+title: "लोकल फ़ोल्डर स्रोत"
+description: "Markdown और MDX फ़ोल्डर को डेटाबेस-समर्थित Content स्पेस से जोड़ें।"
---
-# स्थानीय फ़ाइल मोड
+# लोकल फ़ोल्डर स्रोत
-स्थानीय फ़ाइल मोड एक एजेंट-मूल ऐप को उसकी सामान्य UI और क्रिया सतह संलग्न करने देता है
-सीधे रेपो या कार्यक्षेत्र में फ़ाइलों तक। ऐप अभी भी होस्ट किया हुआ लगता है
-उत्पाद, लेकिन इसके सूची दृश्य, संपादक और एजेंट उपकरण स्थानीय फ़ाइलें पढ़ते और लिखते हैं
-SQL-समर्थित ऐप रिकॉर्ड के बजाय।
+Content में अब एक ही डेटा मॉडल है: हर पेज SQL में रहता है, किसी **स्पेस** से
+जुड़ा होता है और उस स्पेस के सिस्टम **Files** डेटाबेस का आइटम होता है। लोकल
+फ़ोल्डर Files से जुड़ा स्रोत है, ऐप का दूसरा मोड नहीं। `AGENT_NATIVE_MODE`
+स्विच अब नहीं है।
-पहला कार्यान्वयन सामग्री टेम्पलेट में है: बायां साइडबार है
-स्थानीय `.md` और `.mdx` फ़ाइलों से भरा हुआ, एक पृष्ठ का चयन करने से मानक खुल जाता है
-सामग्री संपादक, और बचत चयनित फ़ाइल पर वापस लिखता है। वही फ़ाइलें
-Codex, Claude कोड, Agent-Native साइडबार एजेंट या सामान्य द्वारा भी संपादित किया जा सकता है
-संपादक.
+हर उपयोगकर्ता का निजी स्पेस, हर उपलब्ध संगठन का संगठन स्पेस और दिखाई देने वाले
+स्पेस चुनने के लिए निजी **Workspaces** कैटलॉग होता है। Files एक सामान्य Content
+डेटाबेस है; उसके गुण, फ़िल्टर, क्रम, समूह और सहेजे गए व्यू साइडबार भी बना सकते हैं।
-सामग्री के लिए, यह उत्पाद को MDX के लिए ओपन-सोर्स ओब्सीडियन जैसा महसूस कराता है:
-आपके दस्तावेज़ फ़ाइलों के रूप में रहते हैं, जबकि ऐप एक विज़ुअल संपादक, एजेंट actions जोड़ता है,
-साझा करने योग्य प्रतियां, और समृद्ध इंटरैक्टिव MDX घटक।
+## फ़ोल्डर जोड़ें
-जब आप रेपो-प्रथम वर्कफ़्लो चाहते हैं तो स्थानीय फ़ाइल मोड का उपयोग करें:
+ब्राउज़र या Agent Native Desktop से फ़ोल्डर चुनकर उसे मौजूदा स्पेस में जोड़ें,
+या उसका निजी स्पेस बनाएँ। SQL में केवल अपारदर्शी कनेक्शन ID, सापेक्ष पथ, hash और
+स्रोत मेटाडेटा रहता है—absolute path, browser handle या फ़ाइल का मूल body नहीं।
-- `docs/*.mdx` के साथ एक डॉक्स रेपो
-- `blog/*.mdx` के साथ एक ब्लॉग
-- `resources/*.md` में पोजिशनिंग, मैसेजिंग या टीम नोट्स जैसे संसाधन
-- एक समृद्ध MDX संपादक के साथ एक व्यक्तिगत ओब्सीडियन-शैली ज्ञान का आधार
-- ऐसे दस्तावेज़ जिन्हें स्थानीय React कोड से उत्पन्न इंटरैक्टिव कस्टम MDX ब्लॉक की आवश्यकता होती है
-- ऐप कलाकृतियाँ जिनका निरीक्षण करना और पैच करना कोडिंग एजेंटों के लिए आसान होना चाहिए
+नीतियाँ `database_primary`, `source_primary` और `reviewed_bidirectional` हैं।
+Sync फ़ाइलों को सामान्य SQL पेज बनाता है। दोनों तरफ एक साथ बदलाव होने पर किसी
+को overwrite करने के बजाय समीक्षा योग्य बदलाव बनता है। Disconnect करने पर पेज
+और लोकल फ़ाइलें बनी रहती हैं।
-जब आप होस्टेड सहयोगी ऐप अनुभव चाहते हैं तो डेटाबेस मोड का उपयोग करें:
-बहु-उपयोगकर्ता साझाकरण, SQL-समर्थित अनुमतियाँ, टिप्पणियाँ, संस्करण इतिहास, और
-स्थानीय फ़ाइल सिस्टम पहुंच के बिना उत्पादन होस्टिंग।
-
-## मानसिक मॉडल
-
-सत्य के स्रोत के दो तरीके हैं:
-
-| मोड | सत्य का स्रोत | के लिए सर्वश्रेष्ठ |
-| ----------------- | --------------------------------------------- | ---------------------------------------------------------------------------- |
-| डेटाबेस मोड | SQL पंक्तियाँ Drizzle तक | होस्टेड ऐप्स, सहयोग, साझाकरण, टिप्पणियाँ, संस्करण इतिहास |
-| स्थानीय फ़ाइल मोड | रेपो फ़ाइलें `agent-native.json` द्वारा घोषित | स्थानीय/डेवलप वर्कफ़्लो, Git समीक्षा, कोडिंग-एजेंट संपादन, फ़ाइल-मूल सामग्री |
-
-UI और एजेंट actions को दोनों मोड में एक ही आकार में रहना चाहिए। एक सामग्री
-संपादक अभी भी दस्तावेज़ों का संपादन करता है; अंतर यह है कि क्या वे दस्तावेज़ हल हो जाते हैं
-SQL पंक्तियों या स्थानीय फ़ाइलों तक।
-
-
-
-```html
-
-
-
सामग्री UI
-
- एजेंट + actions list/get/update-document
-
-
-
→
-
-
- डेटाबेस मोडSQL rows via Drizzleहोस्टेड · साझाकरण · टिप्पणियां · इतिहास
-
-
- Local File Moderepo files via agent-native.jsonGit समीक्षा · कोडिंग-एजेंट संपादन
-
-
-
-```
-
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
-
-
-
-## उदाहरण रेपो
-
-एक सामग्री कार्यक्षेत्र इतना छोटा हो सकता है:
-
-
-
-स्थानीय फ़ाइल मोड में, सामग्री साइडबार `docs/`, `blog/`, और
-`resources/` पेड़ पृष्ठों के रूप में। `docs/getting-started.mdx` का चयन करने से वह खुल जाता है
-मानक सामग्री संपादक में फ़ाइल; UI में संपादन करने पर वापस लिखता है
-`docs/getting-started.mdx`.
-
-`components/` एक सामग्री रूट नहीं है. यह एक पूर्वावलोकन घटक लाइब्रेरी है जो MDX
-फ़ाइलें आयात या संदर्भित कर सकती हैं। संपादक सरल स्थानीय MDX घटकों को प्रस्तुत कर सकता है
-संपूर्ण सामग्री ऐप को क्लोन या फोर्क करने की आवश्यकता के बिना।
-
-`extensions/` भी एक कंटेंट रूट नहीं है। यह एक स्थानीय विस्तार पुस्तकालय है:
-छोटे सैंडबॉक्स वाले विजेट जो अपने स्रोत के रहते हुए ऐप स्लॉट में रेंडर कर सकते हैं
-रेपो.
-
-## सामग्री को एक रेपो में स्थापित करें
-
-मौजूदा डॉक्स, ब्लॉग, या MDX कार्यक्षेत्र के लिए, सामग्री स्थानीय-फ़ाइलें स्थापित करें
-कौशल:
+## Repository से शुरू करें
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-यह `content` कौशल को रेपो के एजेंट कौशल फ़ोल्डर में कॉपी करता है और लिखता है
-या सामग्री डिफ़ॉल्ट के साथ `agent-native.json` को अपडेट करता है:
-
-- कार्यस्थान स्तर पर `mode: "local-files"`
-- `apps.content.mode: "local-files"`
-- `docs/`, `blog/`, `content/`, और `resources/` के लिए सामग्री जड़ें
-- स्थानीय MDX घटकों के लिए `components/`
-- स्थानीय एक्सटेंशन विजेट के लिए `extensions/`
-
-स्थापित कौशल कोडिंग एजेंटों को सामग्री actions का उपयोग करने के लिए कहता है
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document`, और घटक-फ़ाइल actions) जब एक स्थानीय सामग्री ऐप
-या Agent Native डेस्कटॉप ब्रिज उन्हें उजागर करता है। यदि कोई पुल नहीं चल रहा है, तो कौशल
-फ्रंटमैटर, आयात, JSX को संरक्षित करते हुए सुरक्षित प्रत्यक्ष रेपो संपादन पर वापस आ जाता है
-और अज्ञात MDX.
-
-## कॉन्फ़िगरेशन
+यह सामान्य database-backed Content शुरू करता है, फ़ोल्डर को स्रोत के रूप में
+दर्ज करता है और कनेक्शन स्क्रीन खोलता है। कोई mode environment variable नहीं लगता।
-`agent-native.json` को रेपो या वर्कस्पेस रूट में जोड़ें:
+## Configuration
```json
{
"version": 1,
"apps": {
"content": {
- "mode": "local-files",
"roots": [
{
"name": "Docs",
"path": "docs",
"kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
}
],
"components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
+ "extensions": "extensions"
}
}
}
```
-आप `AGENT_NATIVE_MODE=local-files` या
-`AGENT_NATIVE_DATA_MODE=local-files`; मेनिफेस्ट को प्राथमिकता दी जाती है क्योंकि यह
-फ़ोल्डर अनुबंध को रेपो में ही दस्तावेज़ित करता है।
-
-## सामग्री फ़ाइल स्वरूप
-
-सामग्री Markdown और MDX पढ़ती है। फ्रंटमैटर पेज मेटाडेटा रखता है, और बॉडी
-संपादन योग्य दस्तावेज़:
-
-```mdx
----
-title: "आरंभ करना"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
-
-# आरंभ करना
-
-Use to show framework-specific code.
-```
-
-उपस्थित होने पर शीर्षक `title` फ्रंटमैटर से आता है, अन्यथा
-फ़ाइल नाम. संपादक MDX स्रोत को सुरक्षित रखता है जिसे वह अभी तक दृश्य रूप से संपादित नहीं कर सकता है, इसलिए
-कोडिंग एजेंट और सामान्य टेक्स्ट संपादक सुरक्षित बच निकलते हैं।
-
-## कस्टम MDX घटक
-
-सामग्री कॉन्फ़िगर किए गए `components` फ़ोल्डर से स्थानीय घटकों का पूर्वावलोकन कर सकती है।
-यह दस्तावेज़-शैली MDX घटकों जैसे टैब, कॉलआउट, पैकेज के लिए है
-स्निपेट, या फ़्रेमवर्क-विशिष्ट कोड ब्लॉक स्थापित करें।
-
-उदाहरण के लिए, अपनी सामग्री के आगे एक इंटरैक्टिव घटक जोड़ें:
-
-```tsx
-// components/ImpactCounter.tsx
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-फिर इसे किसी भी स्थानीय MDX फ़ाइल से उपयोग करें:
-
-```mdx
----
-title: "नोट्स लॉन्च करें"
----
-
-# नोट्स लॉन्च करें
-
-
-```
-
-कंटेंट डेव सर्वर पास्कलकेस नाम के एक्सपोर्ट और पास्कलकेस डिफ़ॉल्ट का पता लगाता है
-`components/` के अंतर्गत `.tsx`, `.jsx`, `.ts`, और `.js` फ़ाइलों से निर्यात। वे
-घटक संपादक के अंदर प्रस्तुत होते हैं और नीचे स्लैश मेनू में दिखाई देते हैं
-**स्थानीय घटक**. स्लैश प्रविष्टि एक न्यूनतम टैग बनाती है जैसे
-``; आवश्यकता पड़ने पर MDX स्रोत में प्रॉप्स जोड़ें।
-
-घटक निष्पादन जानबूझकर एक स्थानीय-डेव/डेस्कटॉप ब्रिज क्षमता है, नहीं
-सादा होस्ट किया गया ब्राउज़र फ़ोल्डर एक्सेस। यदि आप `content.agent-native.com` खोलते हैं,
-**स्थानीय फ़ाइलें** चुनें, और Chrome में एक फ़ोल्डर चुनें, ऐप पढ़ और लिख सकता है
-ब्राउज़र फ़ाइल सिस्टम एक्सेस API के माध्यम से `.md` और `.mdx` फ़ाइलें, लेकिन
-क्रोम Vite को संकलित करने के लिए एक पूर्ण फ़ोल्डर पथ को उजागर नहीं करता है
-`components/*.tsx`. कस्टम React घटकों का पूर्वावलोकन और हॉट रीलोड करने के लिए, चलाएँ
-स्थानीय रूप से सामग्री या Agent Native डेस्कटॉप का उपयोग करें ताकि विश्वसनीय स्थानीय ब्रिज का उपयोग किया जा सके
-चुने गए कार्यक्षेत्र को स्थानीय सामग्री विकास सर्वर के साथ पंजीकृत करें। उस मोड में,
-मौजूदा घटक फ़ाइलों में संपादन Vite के माध्यम से हॉट रीलोड, और जोड़ना
-घटक फ़ाइलों को हटाने से घटक रजिस्ट्री और स्लैश मेनू पुनः लोड होता है।
-
-एजेंट उन पंजीकृत घटक फ़ाइलों के साथ भी काम कर सकते हैं। उपयोग करें
-`list-local-component-files` पंजीकृत कार्यक्षेत्र आईडी खोजने के लिए, फिर
-`.tsx`, `.jsx`, `.ts`, या बनाने या अपडेट करने के लिए `write-local-component-file`
-कार्यस्थान के `components/` फ़ोल्डर के अंतर्गत `.js` फ़ाइलें। MDX फ़ाइलें
-घटक उपयोग के लिए सत्य का स्रोत; घटक फ़ाइलें सामान्य रेपो
-स्रोत फ़ाइलों की Git के साथ समीक्षा की गई।
-
-यदि कोई घटक इनपुट मेटाडेटा निर्यात करता है, तो संपादक में घटक का चयन करें
-घटक के ऊपरी-दाएँ कोने में एक संपादन बटन दिखाता है। समर्थित इनपुट प्रकार
-`string`, `textarea`, `number`, `boolean`, और `select` हैं। फॉर्म लिखता है
-वापस MDX टैग में बदल जाता है, इसलिए स्थानीय फ़ाइलें सत्य का स्रोत बनी रहती हैं। द
-मेटाडेटा को `ComponentNameInputs`, `ComponentNameConfig.inputs`, के रूप में निर्यात किया जा सकता है
-`Component.inputs`, या `agentNative.inputs`.
-
-शाब्दिक प्रॉप्स के साथ सरल घटक टैग इनलाइन पूर्वावलोकन कर सकते हैं:
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-जटिल JSX अभिव्यक्तियाँ स्रोत में संरक्षित हैं। यदि संपादक सुरक्षित रूप से
-अभी तक एक घटक प्रोप का पूर्वावलोकन करें, यह इसके बजाय एक चेतावनी प्लेसहोल्डर दिखाता है
-चुपचाप डेटा छोड़ रहा है।
-
-## स्थानीय फ़ाइलें साझा करना
-
-स्थानीय फ़ाइलें सीधे साझा नहीं की जाती हैं क्योंकि अन्य उपयोगकर्ता पथ नहीं पढ़ सकते हैं
-आपकी मशीन। सामग्री टूलबार का शेयर बटन एक
-चयनित फ़ाइल की डेटाबेस-समर्थित प्रतिलिपि, उस प्रतिलिपि पर नेविगेट करती है, और खोलती है
-सामान्य शेयर पॉपओवर। मूल स्थानीय फ़ाइल स्थानीय फ़ाइलों के अंतर्गत रहती है; द
-डेटाबेस कॉपी स्थानीय फ़ाइल मोड में साझा प्रतियों के अंतर्गत दिखाई देती है और
-मानक दस्तावेज़ साझाकरण मॉडल।
-
-## स्थानीय एक्सटेंशन
-
-स्थानीय फ़ाइल मोड कॉन्फ़िगर किए गए से रेपो-समर्थित एक्सटेंशन भी लोड कर सकता है
-`extensions` फ़ोल्डर. प्रत्येक एक्सटेंशन एक `extension.json`
-मैनिफ़ेस्ट और एक HTML प्रविष्टि फ़ाइल:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html` वही अल्पाइन/Tailwind एक्सटेंशन बॉडी फॉर्मेट है जिसका उपयोग सामान्य लोग करते हैं
-डेटाबेस-समर्थित एक्सटेंशन। जब कंटेंट ऐप एक स्थानीय एक्सटेंशन देखता है तो
-`content.sidebar.bottom` घोषित करता है, यह उस एक्सटेंशन को नीचे प्रस्तुत करता है
-the Content sidebar. The host passes `window.slotContext` with the selected
-दस्तावेज़ आईडी, शीर्षक, स्रोत मेटाडेटा, और क्या सामग्री स्थानीय फ़ाइल मोड में है।
-
-स्थानीय एक्सटेंशन का पूर्वावलोकन ऐप द्वारा किया जाता है लेकिन फ़ाइलों के रूप में संपादित किया जाता है। एक्सटेंशन
-सूची उन्हें स्थानीय फ़ाइल बैज के साथ दिखाती है, और पूर्ण-पृष्ठ व्यूअर वापस इंगित करता है
-प्रविष्टि फ़ाइल. SQL-समर्थित एक्सटेंशन actions जैसे अपडेट, डिलीट, शेयर और
-इतिहास लागू नहीं होता; इसके लिए अपने संपादक, Codex, Claude कोड, या Git इतिहास का उपयोग करें
-स्रोत परिवर्तन।
-
-v1 के लिए, स्थानीय एक्सटेंशन जानबूझकर रूढ़िवादी हैं:
-
-- वे अपनी छोटी रनटाइम स्थिति के लिए `extensionData` का उपयोग कर सकते हैं
-- वे केवल `extension.json` में सूचीबद्ध `appAction`s को कॉल कर सकते हैं
-- कच्चे SQL सहायक और बाहरी `extensionFetch` अक्षम हैं
-- स्लॉट लक्ष्य `extension.json` में घोषित किए गए हैं, SQL के माध्यम से स्थापित नहीं किए गए हैं
-
-यह स्थानीय कार्यस्थानों को बिना किसी अनुमति के ओब्सीडियन जैसी प्लगइन सतह देता है
-मनमाना रेपो फ़ाइल डेटाबेस-समर्थित एक्सटेंशन की प्रत्येक क्षमता को प्राप्त करती है।
-
-## ऐप्स इसका उपयोग कैसे करते हैं
-
-स्थानीय फ़ाइल मोड को फ़्रेमवर्क के स्थानीय आर्टिफैक्ट सहायकों के माध्यम से कार्यान्वित किया जाता है।
-एक ऐप अपने स्वामित्व वाले आर्टिफैक्ट प्रकारों के लिए रूट घोषित करता है, फिर पढ़ता और लिखता है
-उसी क्रिया के माध्यम से इसकी सतह UI और एजेंट पहले से ही उपयोग करते हैं।
-
-सामग्री के लिए, इसका अर्थ है:
-
-- `list-documents` सूचीबद्ध `.md` और `.mdx` फ़ाइलें।
-- `get-document` एक चयनित स्थानीय फ़ाइल को पढ़ता है।
-- `update-document` चयनित स्थानीय फ़ाइल लिखता है।
-- `create-document` चयनित फ़ोल्डर में एक नई स्थानीय `.mdx` फ़ाइल बनाता है।
-- `delete-document` स्थानीय फ़ाइल को हटा देता है।
-- खोज कॉन्फ़िगर की गई स्थानीय फ़ाइलों पर चलती है।
-
-सामग्री UI से स्थानीय-फ़ाइल पृष्ठों को स्थानांतरित करना, नाम बदलना और पुन: व्यवस्थित करना
-अभी तक समर्थित है। उन कार्यों को कार्यक्षेत्र में या कोडिंग एजेंट के साथ करें; द
-सामग्री साइडबार परिणामी फ़ाइल ट्री को प्रतिबिंबित करेगा।
-
-यह एजेंट अनुबंध को सरल रखता है: एजेंट सामग्री actions का उपयोग जारी रख सकता है,
-और वे actions तय करते हैं कि लक्ष्य SQL-समर्थित है या फ़ाइल-समर्थित है।
-
-अन्य ऐप्स समय के साथ समान पैटर्न अपना सकते हैं। एक स्लाइड ऐप मैप कर सकता है
-`slides/*.mdx` को डेक पर, एक प्लान ऐप दस्तावेजों को प्लान करने के लिए `plans/*` को मैप कर सकता है, और एक
-डैशबोर्ड ऐप `dashboards/*.mdx` को डैशबोर्ड पर मैप कर सकता है। वे ऐप-विशिष्ट
-फ़ोल्डर समान स्थानीय आर्टिफैक्ट अनुबंध के शीर्ष पर स्तरित कन्वेंशन हैं।
-
-## स्थानीय फ़ाइलें बनाम निर्यात/आयात
-
-सामग्री में दो भिन्न फ़ाइल वर्कफ़्लो हैं:
-
-| वर्कफ़्लो | क्या होता है |
-| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
-| `/local-files` निर्यात/आयात | डेटाबेस मोड सत्य का स्रोत बना हुआ है। फ़ाइलें एक स्पष्ट सिंक सतह हैं जिन्हें आप निर्यात, संपादित, पूर्वावलोकन और आयात करते हैं। |
-| स्थानीय फ़ाइल मोड | फ़ाइलें सत्य का स्रोत हैं। सामग्री साइडबार और संपादक सीधे स्थानीय फ़ाइलों पर काम करते हैं। |
-
-जब आप होस्ट किए गए कार्यक्षेत्र के आसपास कभी-कभी फ़ाइल समीक्षा चाहते हैं तो निर्यात/आयात का उपयोग करें।
-स्थानीय फ़ाइल मोड का उपयोग करें जब रेपो स्वयं कार्यक्षेत्र हो।
-
-## इतिहास और सहयोग
-
-स्थानीय फ़ाइल मोड फ़ाइल-मूल इतिहास पर निर्भर करता है:
-
-- Git में महत्वपूर्ण परिवर्तन करें
-- समीक्षा के लिए पुल अनुरोधों का उपयोग करें
-- कोडिंग एजेंटों को उन्हीं फ़ाइलों को सीधे संपादित करने दें
-- परिवर्तनों को समझने के लिए सामान्य फ़ाइल अंतर का उपयोग करें
-
-डेटाबेस मोड होस्ट की गई सहयोग सुविधाओं जैसे
-साझाकरण, टिप्पणियाँ, SQL-समर्थित संस्करण इतिहास, और लाइव बहु-उपयोगकर्ता संपादन।
-
-प्रदाता सिंक को किसी भी मोड के शीर्ष पर स्तरित किया जा सकता है। उदाहरण के लिए, एक डॉक्स रेपो
-actions जोड़ें जो CMS से सामग्री को स्थानीय MDX फ़ाइलों में खींचता है या चयनित पुश करता है
-स्थानीय फ़ाइलें उस CMS पर वापस आती हैं।
-
-## उत्पादन सुरक्षा
-
-स्थानीय फ़ाइल मोड ऐप actions को कॉन्फ़िगर किए गए कार्यक्षेत्र तक सीधी लेखन पहुंच प्रदान करता है
-फ़ाइलें। यह स्थानीय विकास और विश्वसनीय एकल-किरायेदार फ़ाइल
-पुल, लेकिन यह डिफ़ॉल्ट उत्पादन सुरक्षा मॉडल नहीं है।
-
-जब `NODE_ENV=production`, फ्रेमवर्क `local-files` मोड को अस्वीकार कर देता है जब तक कि आप
-सेट:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-इसे केवल विश्वसनीय एकल-किरायेदार परिनियोजन के लिए सेट करें जहां हर कोई इसका उपयोग कर सके
-ऐप को कॉन्फ़िगर की गई फ़ाइलों को पढ़ने और लिखने की अनुमति है। सामान्य होस्ट के लिए,
-बहु-उपयोगकर्ता ऐप्स, डेटाबेस मोड और SQL-समर्थित साझाकरण का उपयोग करें।
+Migration में `mode: "local-files"` और `AGENT_NATIVE_MODE=local-files` हटाएँ,
+roots रखें और `source` जोड़ें। Frontmatter ID rename या move पर पेज की पहचान
+बचाता है। लोकल components और extensions trusted local bridge से ही लोड होते हैं।
diff --git a/packages/core/docs/content/locales/hi-IN/template-content.mdx b/packages/core/docs/content/locales/hi-IN/template-content.mdx
index 3234d4c838..667449c6d9 100644
--- a/packages/core/docs/content/locales/hi-IN/template-content.mdx
+++ b/packages/core/docs/content/locales/hi-IN/template-content.mdx
@@ -93,9 +93,8 @@ description: "MDX के लिए ओपन-सोर्स ओब्सीड
- **पेड़ों को एक पेड़ में व्यवस्थित करें** - असीमित रूप से घोंसला बनाएं, पुन: व्यवस्थित करने के लिए खींचें, पसंदीदा पृष्ठ जिनका आप अक्सर उपयोग करते हैं।
- **सभी चीज़ों में खोजें** शीर्षकों और सामग्री में पूर्ण-पाठ खोज के साथ।
- **ओब्सीडियन की तरह स्थानीय Markdown/MDX फ़ाइलों को संपादित करें।** `/local-files` दृश्य का उपयोग करें
- अपने कार्यक्षेत्र को फ़ाइलों में निर्यात करने के लिए, उन्हें अपने टूल में संपादित करें, पूर्वावलोकन करें
- परिवर्तन करें, और उन्हें वापस आयात करें। स्थानीय फ़ाइल मोड में, सामग्री सीधे
- चयनित `.md` या `.mdx` फ़ाइल।
+ फ़ोल्डर को Files से जोड़ें, अपने टूल में संपादित और sync करें, और SQL ऐप में
+ टकराव की समीक्षा करें।
- **समृद्ध इंटरैक्टिव कस्टम ब्लॉक उत्पन्न करें।** स्थानीय React घटकों को पंजीकृत करें,
उन्हें MDX के रूप में डालें, और एजेंट को घटक फ़ाइलें बनाने या अपडेट करने दें
आपके दस्तावेज़.
@@ -138,32 +137,19 @@ description: "MDX के लिए ओपन-सोर्स ओब्सीड
टिप्पणियाँ, अनुमतियाँ, और लाइव सहयोग; स्थानीय फ़ोल्डर एक स्पष्ट
सिंक सतह।
-सामग्री **स्थानीय फ़ाइल मोड** में भी चल सकती है, जहाँ फ़ाइलें स्रोत हैं
-SQL दस्तावेज़ों के बजाय सत्य। रेपो में `agent-native.json` जोड़ें, सेट करें
-`mode: "local-files"`, और `docs/`, `blog/`, जैसे रूट कॉन्फ़िगर करें
-`content/`, और `resources/`। मानक सामग्री संपादक तब इसे पॉप्युलेट करता है
-उन स्थानीय `.md`/`.mdx` फ़ाइलों से बायाँ साइडबार और संपादन वापस लिखता है
-सामान्य दस्तावेज़ actions के माध्यम से चयनित फ़ाइल। रेपो-प्रथम दस्तावेज़ों के लिए इसका उपयोग करें,
-ब्लॉग, संसाधन लाइब्रेरी, या MDX-संचालित के साथ ओब्सीडियन-शैली की व्यक्तिगत सामग्री
-घटक; जब आप होस्टेड सहयोग चाहते हैं तो डेटाबेस मोड पर वापस जाएँ और
-SQL-backed sharing. See [Local File Mode](/docs/local-file-mode) for the
-स्टैंडअलोन रेपो लेआउट, कॉन्फ़िगरेशन, कस्टम MDX घटक, स्थानीय
-`extensions/` विजेट, और उत्पादन सुरक्षा गाइड।
+लोकल फ़ोल्डर अब सभी पेजों जैसा SQL मॉडल उपयोग करते हैं। हर पेज किसी स्पेस और
+उसके Files डेटाबेस में रहता है; फ़ोल्डर उसका source adapter है। नीतियों, टकराव,
+MDX components और पुराने मोड से migration के लिए
+[लोकल फ़ोल्डर स्रोत](/docs/local-file-mode) देखें।
-सामग्री स्थानीय-फ़ाइल कौशल को मौजूदा रेपो में स्थापित करने के लिए:
+मौजूदा repository में Content खोलने के लिए:
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-इंस्टॉलर आपके कोडिंग एजेंट के लिए `content` कौशल की प्रतिलिपि बनाता है और लिखता है या
-`docs/`, `blog/`, `content/` के लिए कंटेंट रूट्स के साथ `agent-native.json` को अपडेट करता है
-और `resources/`। जब कोई स्थानीय सामग्री ऐप, Agent Native डेस्कटॉप, या विश्वसनीय
-स्थानीय ब्रिज चल रहा है, एजेंटों को सामग्री actions जैसे
-`list-documents`, `get-document`, `edit-document`, `update-document`, और
-`share-local-file-document` कच्चे फ़ाइल सिस्टम के बजाय लिखता है। उस लोकल के बिना
-ब्रिज, स्थापित कौशल अभी भी एजेंट को
-सुरक्षित Markdown/MDX संपादन।
+CLI सामान्य database-backed Content शुरू करता है, फ़ोल्डर स्रोत दर्ज करता है और
+बिना mode environment variable के कनेक्शन स्क्रीन खोलता है।
## डेवलपर्स के लिए
diff --git a/packages/core/docs/content/locales/ja-JP/local-file-mode.mdx b/packages/core/docs/content/locales/ja-JP/local-file-mode.mdx
index aaab236ecb..c823be8568 100644
--- a/packages/core/docs/content/locales/ja-JP/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/ja-JP/local-file-mode.mdx
@@ -1,525 +1,69 @@
---
-title: "ローカル ファイル モード"
-description: "ローカルの Markdown、MDX、およびその他のリポジトリ ファイルを信頼できるソースとして使用して、エージェント ネイティブ アプリを実行します。これには、カスタム コンポーネントを含む Obsidian スタイルの MDX ドキュメントが含まれます。"
+title: "ローカルフォルダーソース"
+description: "Markdown / MDX フォルダーを、データベースで管理される Content スペースへ接続します。"
---
-# ローカル ファイル モード
+# ローカルフォルダーソース
-ローカル ファイル モードにより、エージェント ネイティブ アプリは通常の UI とアクション サーフェスをアタッチできます
-リポジトリまたはワークスペース内のファイルに直接。アプリは依然としてホストされているように感じます
-製品ですが、そのリスト ビュー、エディタ、エージェント ツールはローカル ファイルの読み取りと書き込みを行います
-SQL がサポートするアプリ レコードの代わり。
+Content のデータモデルは 1 つです。すべてのページは SQL に保存され、
+**スペース**に属し、そのスペースのシステムデータベース **Files** の項目に
+なります。ローカルフォルダーは Files に接続するソースであり、別のアプリ
+モードではありません。`AGENT_NATIVE_MODE` 切り替えは廃止されました。
-最初の実装はコンテンツ テンプレート内にあります。左側のサイドバーは
-ローカルの `.md` および `.mdx` ファイルから設定され、ページを選択すると標準ファイルが開きます
-コンテンツ エディター、および保存すると、選択したファイルに書き戻されます。同じファイルは
-Codex、Claude コード、Agent-Native サイドバー エージェント、または通常のエージェントでも編集できます
-編集者。
+ユーザーには個人スペース、アクセス可能な組織には組織スペースがあり、個人の
+**Workspaces** カタログが表示対象を決めます。Files は通常の Content
+データベースなので、プロパティ、フィルター、並べ替え、グループ、保存ビューを
+サイドバー表示にも利用できます。
-コンテンツに関しては、これにより製品が MDX のオープンソース Obsidian のように感じられます:
-ドキュメントはファイルとして保存されますが、アプリにはビジュアル エディター、エージェント actions が追加されます。
-共有可能なコピー、および豊富なインタラクティブな MDX コンポーネント。
+## フォルダーを接続する
-リポジトリ優先のワークフローが必要な場合は、ローカル ファイル モードを使用します。
+ブラウザーまたは Agent Native Desktop でフォルダーを選び、既存スペースへ
+接続するか、専用の非公開スペースを作成します。SQL に保存されるのは不透明な
+接続 ID、相対パス、ハッシュ、ソースメタデータのみです。絶対パス、ブラウザー
+ハンドル、ファイル本文は保存されません。
-- `docs/*.mdx` のドキュメント リポジトリ
-- `blog/*.mdx` のブログ
-- `resources/*.md` のポジショニング、メッセージング、チームメモなどのリソース
-- より豊富な MDX エディターを備えた個人用の Obsidian スタイルのナレッジ ベース
-- ローカルの React コードから生成されたインタラクティブなカスタム MDX ブロックを必要とするドキュメント
-- コーディング エージェントが簡単に検査してパッチを適用できるアプリ アーティファクト
+ポリシーは `database_primary`、`source_primary`、
+`reviewed_bidirectional` です。同期はファイルを通常の SQL ページとして
+実体化します。両側が同時に変わった場合は上書きせず、レビュー対象の変更を
+作成します。切断してもページとローカルファイルは残ります。
-ホストされたコラボレーション アプリのエクスペリエンスが必要な場合は、データベース モードを使用します。
-マルチユーザー共有、SQL による権限、コメント、バージョン履歴、および
-ローカル ファイル システムにアクセスしない運用ホスティング。
-
-## メンタルモデル
-
-2 つの信頼できる情報源モードがあります:
-
-| モード | 真実の源 | こんな人に最適 |
-| ------------------------ | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
-| データベースモード | SQL 行から Drizzle | ホストされているアプリ、コラボレーション、共有、コメント、バージョン履歴 |
-| ローカル ファイル モード | `agent-native.json` によって宣言されたリポジトリ ファイル | ローカル/開発ワークフロー、Git レビュー、コーディング エージェント編集、ファイルネイティブ コンテンツ |
-
-UI とエージェント actions は、両方のモードで同じ形状のままである必要があります。コンテンツ
-エディターは引き続きドキュメントを編集します。違いは、それらの文書が解決されるかどうかです
-SQL 行またはローカル ファイルへ。
-
-
-
-```html
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-次に、ローカルの MDX ファイルからそれを使用します。
-
-```mdx
----
-title: "起動ノート"
----
-
-# 起動ノート
-
-
-```
-
-Content dev サーバーは、PascalCase という名前のエクスポートと PascalCase のデフォルトを検出します
-は、`.tsx`、`.jsx`、`.ts`、および `.js` ファイルから `components/` の下にエクスポートします。それら
-コンポーネントはエディタ内でレンダリングされ、
-**ローカルコンポーネント**。スラッシュを挿入すると、
-``;必要に応じて、MDX ソースにプロパティを追加します。
-
-コンポーネントの実行は、意図的にローカル開発/デスクトップ ブリッジ機能ではなく、
-プレーン ホスト ブラウザー フォルダー アクセス。 `content.agent-native.com` を開くと、
-**ローカル ファイル** を選択し、Chrome でフォルダーを選択します。アプリが読み書きできる
-`.md` および `.mdx` ファイルは、ブラウザ ファイル システム アクセス API を介してアクセスされますが、
-Chrome は、Vite をコンパイルするための絶対フォルダー パスを公開しません
-`components/*.tsx`。カスタム React コンポーネントをプレビューしてホット リロードするには、
-コンテンツをローカルに保存するか、信頼できるローカル ブリッジができるように Agent Native デスクトップを使用します
-選択したワークスペースをローカルのコンテンツ開発サーバーに登録します。そのモードでは、
-Vite を介して既存のコンポーネント ファイルを編集し、ホット リロードし、または追加します。
-コンポーネント ファイルを削除すると、コンポーネント レジストリとスラッシュ メニューが再ロードされます。
-
-エージェントは、登録されたコンポーネント ファイルを操作することもできます。使用
-`list-local-component-files` で登録されたワークスペース ID を検索し、
-`write-local-component-file` は、`.tsx`、`.jsx`、`.ts` を作成または更新します。
-ワークスペースの `components/` フォルダーにある `.js` ファイル。 MDX ファイルは
-コンポーネントの使用法に関する信頼できる情報源。コンポーネント ファイルは通常のリポジトリのままです
-Git でレビューされたソース ファイル。
-
-コンポーネントが入力メタデータをエクスポートする場合、エディターでコンポーネントを選択する
-は、コンポーネントの右上隅に編集ボタンを表示します。サポートされている入力タイプ
-は、`string`、`textarea`、`number`、`boolean`、および `select` です。フォームには
-は MDX タグに戻るため、ローカル ファイルが信頼できる情報源のままになります。
-メタデータは `ComponentNameInputs`、`ComponentNameConfig.inputs` としてエクスポートできます
-`Component.inputs`、または `agentNative.inputs`。
-
-リテラル props を含む単純なコンポーネント タグはインラインでプレビューできます。
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-複雑な JSX 式はソースに保存されます。編集者が安全に作業できない場合
-コンポーネント プロップをプレビューしても、警告のプレースホルダーが表示されません。
-サイレントにデータを削除します。
-
-## ローカル ファイルの共有
-
-他のユーザーはパスを読み取ることができないため、ローカル ファイルは直接共有されません
-あなたのマシン。コンテンツ ツールバーの [共有] ボタンは、
-選択したファイルのデータベースにバックアップされたコピー。そのコピーに移動して、
-通常の共有ポップオーバー。元のローカル ファイルはローカル ファイルの下に残ります。
-データベース コピーは、ローカル ファイル モードの共有コピーの下に表示され、
-標準ドキュメント共有モデル。
-
-## ローカル内線番号
-
-ローカル ファイル モードでは、設定されたファイルからリポジトリにバックアップされた拡張機能をロードすることもできます。
-`extensions` フォルダー。各拡張子は、`extension.json`
-マニフェストと HTML エントリ ファイル:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html` は、通常で使用されるのと同じ Alpine/Tailwind 拡張本体形式です
-データベースベースの拡張機能。コンテンツ アプリがローカル拡張機能を認識すると、
-`content.sidebar.bottom` を宣言すると、
-the Content sidebar. The host passes `window.slotContext` with the selected
-ドキュメント ID、タイトル、ソース メタデータ、コンテンツがローカル ファイル モードかどうか。
-
-ローカル拡張子はアプリによってプレビューされますが、ファイルとして編集されます。拡張機能
-リストにはローカル ファイル バッジが表示され、フルページ ビューアは に戻ります
-エントリファイル。 SQL でサポートされる拡張機能 actions (更新、削除、共有、
-履歴は適用されません。エディタ、Codex、Claude コード、または Git 履歴を使用してください。
-ソースの変更。
-
-v1 の場合、ローカル拡張機能は意図的に保守的です:
-
-- 独自の小さな実行時状態に `extensionData` を使用できます
-- `extension.json` にリストされている `appAction` のみを呼び出すことができます
-- 生の SQL ヘルパーと外部 `extensionFetch` は無効になります
-- スロット ターゲットは `extension.json` で宣言されており、SQL を通じてインストールされていません
-
-これにより、ローカル ワークスペースに Obsidian のようなプラグイン サーフェスが提供されます。
-任意のリポジトリ ファイルは、データベースベースの拡張機能のすべての機能を継承します。
-
-## アプリでの使用方法
-
-ローカル ファイル モードは、フレームワークのローカル アーティファクト ヘルパーを通じて実装されます。
-アプリは、所有するアーティファクト タイプのルートを宣言し、読み取りと書き込みを行います
-UI とエージェントがすでに使用している同じアクション サーフェスを介して。
-
-コンテンツの場合、それは次のことを意味します:
-
-- `list-documents` には、構成された `.md` および `.mdx` ファイルがリストされます。
-- `get-document` は、選択されたローカル ファイルを読み取ります。
-- `update-document` は、選択されたローカル ファイルを書き込みます。
-- `create-document` は、選択したフォルダーに新しいローカル `.mdx` ファイルを作成します。
-- `delete-document` はローカル ファイルを削除します。
-- 検索は、設定されたローカル ファイル全体で実行されます。
-
-コンテンツ UI からのローカル ファイル ページの移動、名前変更、並べ替えはできません
-はまだサポートされています。これらの操作はワークスペースまたはコーディング エージェントを使用して実行します。
-コンテンツ サイドバーには、結果のファイル ツリーが反映されます。
-
-これにより、エージェント契約がシンプルになります。エージェントはコンテンツ actions を使用し続けることができます。
-これらの actions は、ターゲットが SQL ベースであるかファイルベースであるかを決定します。
-
-他のアプリも時間の経過とともに同じパターンを採用する可能性があります。スライド アプリではマッピングが可能
-`slides/*.mdx` をデッキに、計画アプリは `plans/*` を計画ドキュメントにマッピングでき、
-ダッシュボード アプリでは、`dashboards/*.mdx` をダッシュボードにマッピングできます。アプリ固有のもの
-フォルダは、同じローカル アーティファクト コントラクトの上に階層化された規則です。
-
-## ローカル ファイルとエクスポート/インポート
-
-コンテンツには 2 つの異なるファイル ワークフローがあります:
-
-| ワークフロー | 何が起こるか |
-| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
-| `/local-files` エクスポート/インポート | データベース モードは依然として信頼できる情報源です。ファイルは、エクスポート、編集、プレビュー、インポートするための明示的な同期面です。 |
-| ローカル ファイル モード | ファイルは真実の情報源です。コンテンツ サイドバーとエディタはローカル ファイルで直接動作します。 |
-
-ホストされたワークスペースでファイルを時折確認したい場合は、エクスポート/インポートを使用します。
-リポジトリ自体がワークスペースである場合は、ローカル ファイル モードを使用します。
-
-## 歴史とコラボレーション
-
-ローカル ファイル モードはファイルネイティブの履歴に基づいています:
-
-- 重要な変更を Git にコミットする
-- プル リクエストをレビューに使用する
-- コーディング エージェントが同じファイルを直接編集できるようにする
-- 通常のファイルの差分を使用して変更を理解する
-
-データベース モードは、引き続きホスト型コラボレーション機能に適しています。
-共有、コメント、SQL によるバージョン履歴、ライブ マルチユーザー編集。
-
-プロバイダー同期は、どちらのモードの上にも重ねることができます。たとえば、ドキュメント リポジトリでは、
-CMS からローカル MDX ファイルにコンテンツをプルする actions を追加するか、選択したものをプッシュします
-ローカル ファイルを CMS に戻します。
-
-## 生産の安全性
-
-ローカル ファイル モードでは、アプリ actions に構成されたワークスペースへの直接書き込みアクセスが許可されます
-ファイル。これは、ローカル開発および信頼できるシングルテナント ファイルに適しています
-ブリッジですが、これはデフォルトの実稼働セキュリティ モデルではありません。
-
-`NODE_ENV=production` の場合、フレームワークは、次の操作を行わない限り `local-files` モードを拒否します。
-セット:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-誰もが使用できる信頼できるシングルテナント展開に対してのみ設定してください
-アプリは構成されたファイルの読み取りと書き込みを許可されます。通常のホストの場合、
-マルチユーザー アプリでは、データベース モードと SQL による共有を使用します。
+移行時は `mode: "local-files"` と `AGENT_NATIVE_MODE=local-files` を
+削除し、roots を残して `source` を追加します。frontmatter の ID は名前変更や
+移動でもページ識別を保ちます。ローカルコンポーネントと拡張機能は引き続き信頼
+されたローカルブリッジ経由で読み込まれます。
diff --git a/packages/core/docs/content/locales/ja-JP/template-content.mdx b/packages/core/docs/content/locales/ja-JP/template-content.mdx
index 828f6cc420..a926f78b7c 100644
--- a/packages/core/docs/content/locales/ja-JP/template-content.mdx
+++ b/packages/core/docs/content/locales/ja-JP/template-content.mdx
@@ -93,9 +93,8 @@ description: "オープンソースの Obsidian for MDX: ローカルの Markdow
- **ページをツリーに整理** — 無限にネストしたり、ドラッグして並べ替えたり、よく使うお気に入りのページを作成したりできます。
- **タイトルやコンテンツ全体の全文検索を使用して、すべてを検索**します。
- **Obsidian などのローカル Markdown/MDX ファイルを編集します。** `/local-files` ビューを使用します
- ワークスペースをファイルにエクスポートし、独自のツールで編集し、プレビューするには
- 変更を加えてインポートし直します。ローカル ファイル モードでは、コンテンツは
- 選択した `.md` または `.mdx` ファイル。
+ フォルダーを Files に接続し、独自のツールで編集して変更を同期し、
+ SQL アプリ内で競合をレビューできます。
- **リッチでインタラクティブなカスタム ブロックを生成します。** ローカル React コンポーネントを登録します。
それらを MDX として挿入し、エージェントにコンポーネント ファイルを作成または更新させます
あなたのドキュメント。
@@ -138,32 +137,19 @@ description: "オープンソースの Obsidian for MDX: ローカルの Markdow
コメント、権限、ライブコラボレーション。ローカル フォルダーは明示的です
サーフェスを同期します。
-コンテンツは、ファイルがソースとなる **ローカル ファイル モード** でも実行できます。
-SQL 文書の代わりに真実。 `agent-native.json` をリポジトリに追加し、
-`mode: "local-files"`、`docs/`、`blog/` などのルートを構成します
-`content/`、および `resources/`。標準のコンテンツ エディタは、
-ローカルの `.md`/`.mdx` ファイルから左側のサイドバーを選択し、編集内容をファイルに書き込みます。
-通常のドキュメント actions を通じて選択されたファイル。これをリポジトリファーストのドキュメントに使用します。
-ブログ、リソース ライブラリ、または MDX を利用した Obsidian スタイルの個人コンテンツ
-コンポーネント;ホスト型コラボレーションが必要な場合は、データベース モードに戻してください。
-SQL-backed sharing. See [Local File Mode](/docs/local-file-mode) for the
-スタンドアロン リポジトリのレイアウト、構成、カスタム MDX コンポーネント、ローカル
-`extensions/` ウィジェット、および本番環境の安全ガイド。
+ローカルフォルダーも、すべてのページと同じ SQL モデルを使います。各ページは
+スペースとその Files データベースに属し、フォルダーはそのソースアダプターです。
+ポリシー、競合、MDX コンポーネント、旧モードからの移行については
+[ローカルフォルダーソース](/docs/local-file-mode) を参照してください。
-コンテンツ ローカル ファイル スキルを既存のリポジトリにインストールするには:
+既存のリポジトリで Content を開くには:
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-インストーラーはコーディング エージェントの `content` スキルをコピーし、または
-`docs/`、`blog/`、`content/` のコンテンツ ルートで `agent-native.json` を更新します
-と `resources/`。ローカル コンテンツ アプリ、Agent Native デスクトップ、または信頼できる場合
-ローカル ブリッジが実行中です。エージェントはコンテンツ actions を使用する必要があります。
-`list-documents`、`get-document`、`edit-document`、`update-document`、
-生のファイルシステム書き込みの代わりに `share-local-file-document`。そのローカルがなければ
-ブリッジ、インストールされたスキルは引き続きエージェントにリポジトリ編集契約を与えます
-安全な Markdown/MDX 編集。
+CLI は通常のデータベース版 Content を起動し、フォルダーソースを登録して、
+モード環境変数を設定せずに接続画面を開きます。
## 開発者向け
diff --git a/packages/core/docs/content/locales/ko-KR/local-file-mode.mdx b/packages/core/docs/content/locales/ko-KR/local-file-mode.mdx
index b082dc0297..02e0012f1b 100644
--- a/packages/core/docs/content/locales/ko-KR/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/ko-KR/local-file-mode.mdx
@@ -1,523 +1,68 @@
---
-title: "로컬 파일 모드"
-description: "로컬 Markdown, MDX 및 기타 repo 파일을 정보 소스로 사용하여 에이전트 네이티브 앱을 실행합니다. 여기에는 맞춤 구성요소가 포함된 Obsidian 스타일 MDX 문서도 포함됩니다."
+title: "로컬 폴더 소스"
+description: "Markdown 및 MDX 폴더를 데이터베이스 기반 Content 공간에 연결합니다."
---
-# 로컬 파일 모드
+# 로컬 폴더 소스
-로컬 파일 모드를 사용하면 에이전트 네이티브 앱이 일반 UI 및 작업 표면을 연결할 수 있습니다.
-저장소나 작업공간의 파일에 직접 연결됩니다. 앱이 여전히 호스팅된 것처럼 느껴집니다.
-제품, 목록 보기, 편집기 및 에이전트 도구는 로컬 파일을 읽고 씁니다
-SQL 지원 앱 기록 대신
+Content에는 하나의 데이터 모델만 있습니다. 모든 페이지는 SQL에 저장되고
+**공간**에 속하며 해당 공간의 시스템 **Files** 데이터베이스 항목이 됩니다.
+로컬 폴더는 Files에 연결되는 소스이지 별도의 앱 모드가 아닙니다.
+`AGENT_NATIVE_MODE` 전환은 더 이상 사용하지 않습니다.
-첫 번째 구현은 콘텐츠 템플릿에 있습니다. 왼쪽 사이드바는 다음과 같습니다.
-로컬 `.md` 및 `.mdx` 파일로 채워지며, 페이지를 선택하면 표준이 열립니다.
-컨텐츠 편집기 및 저장하면 선택한 파일에 다시 기록됩니다. 동일한 파일은 다음과 같습니다.
-Codex, Claude 코드, Agent-Native 사이드바 에이전트 또는 일반 사용자로도 편집 가능
-편집자.
+사용자마다 개인 공간이 있고 접근 가능한 조직마다 조직 공간이 있습니다. 개인
+**Workspaces** 카탈로그가 앱에 표시할 공간을 정합니다. Files는 일반 Content
+데이터베이스이므로 속성, 필터, 정렬, 그룹 및 저장된 보기를 사이드바에도 사용할 수
+있습니다.
-콘텐츠의 경우 제품이 MDX용 오픈 소스 Obsidian처럼 느껴집니다.
-문서는 파일로 저장되고 앱에는 시각적 편집기인 에이전트 actions가 추가됩니다.
-공유 가능한 복사본 및 풍부한 대화형 MDX 구성 요소
+## 폴더 연결
-저장소 우선 워크플로를 원할 경우 로컬 파일 모드를 사용하세요.
+브라우저 또는 Agent Native Desktop에서 폴더를 선택해 기존 공간에 연결하거나
+전용 비공개 공간을 만듭니다. SQL에는 불투명한 연결 ID, 상대 경로, 해시와 소스
+메타데이터만 저장합니다. 절대 경로, 브라우저 핸들, 원본 파일 본문은 저장하지
+않습니다.
-- `docs/*.mdx`를 사용한 문서 저장소
-- `blog/*.mdx`가 있는 블로그
-- `resources/*.md`의 포지셔닝, 메시지 또는 팀 메모와 같은 리소스
-- 풍부한 MDX 편집기를 갖춘 개인 흑요석 스타일 지식 기반
-- 로컬 React 코드에서 생성된 대화형 사용자 정의 MDX 블록이 필요한 문서
-- 코딩 에이전트가 쉽게 검사하고 패치할 수 있는 앱 아티팩트
+정책은 `database_primary`, `source_primary`, `reviewed_bidirectional`입니다.
+동기화는 파일을 일반 SQL 페이지로 구체화합니다. 양쪽이 동시에 바뀌면 덮어쓰는
+대신 검토할 변경을 만듭니다. 연결을 끊어도 페이지와 로컬 파일은 유지됩니다.
-호스팅된 협업 앱 경험을 원할 때 데이터베이스 모드를 사용하세요:
-다중 사용자 공유, SQL 지원 권한, 댓글, 버전 기록 및
-로컬 파일 시스템 액세스가 없는 프로덕션 호스팅
-
-## 정신 모델
-
-두 가지 정보 소스 모드가 있습니다:
-
-| 모드 | 진실의 근원 | 최적의 용도 |
-| ----------------- | -------------------------------------- | ------------------------------------------------------------------ |
-| 데이터베이스 모드 | Drizzle를 통한 SQL 행 | 호스팅된 앱, 공동 작업, 공유, 댓글, 버전 기록 |
-| 로컬 파일 모드 | `agent-native.json`가 선언한 Repo 파일 | 로컬/개발 워크플로, Git 검토, 코딩 에이전트 편집, 파일 기본 콘텐츠 |
-
-UI와 에이전트 actions는 두 모드 모두에서 동일한 모양을 유지해야 합니다. 내용
-편집자는 여전히 문서를 편집합니다. 차이점은 해당 문서가 해결되는지 여부입니다.
-SQL 행 또는 로컬 파일
-
-
-
-```html
-
-
-
콘텐츠 UI
-
- 에이전트 + actions list/get/update-document
-
-
-
→
-
-
- 데이터베이스 모드SQL rows via Drizzle호스팅 · 공유 · 댓글 · 기록
-
-
- Local File Moderepo files via agent-native.jsonGit 리뷰 · 코딩 에이전트 편집
-
-
-
-```
-
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
-
-
-
-## 예시 저장소
-
-콘텐츠 작업공간은 다음과 같이 작을 수 있습니다:
-
-
-
-로컬 파일 모드에서 콘텐츠 사이드바에는 `docs/`, `blog/` 및
-`resources/` 트리를 페이지로 표시합니다. `docs/getting-started.mdx`를 선택하면 다음이 열립니다.
-표준 컨텐츠 편집기의 파일; UI에서 편집하면
-`docs/getting-started.mdx`.
-
-`components/`는 콘텐츠 루트가 아닙니다. MDX가 제공하는 미리보기 구성요소 라이브러리입니다
-파일을 가져오거나 참조할 수 있습니다. 편집기는 간단한 로컬 MDX 구성요소를 렌더링할 수 있습니다
-전체 콘텐츠 앱을 복제하거나 포크할 필요가 없습니다.
-
-`extensions/`도 콘텐츠 루트가 아닙니다. 로컬 확장 라이브러리입니다:
-소스가 그대로 유지되는 동안 앱 슬롯에서 렌더링할 수 있는 작은 샌드박스 위젯
-저장소.
-
-## 저장소에 콘텐츠 설치
-
-기존 문서, 블로그 또는 MDX 작업공간의 경우 콘텐츠 로컬 파일을 설치하세요.
-스킬:
+## 저장소에서 시작
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-`content` 스킬을 저장소의 에이전트 스킬 폴더에 복사하고 씁니다.
-또는 콘텐츠 기본값으로 `agent-native.json`를 업데이트합니다.
-
-- 작업 공간 수준의 `mode: "local-files"`
-- `apps.content.mode: "local-files"`
-- `docs/`, `blog/`, `content/` 및 `resources/`의 콘텐츠 루트
-- 로컬 MDX 구성요소용 `components/`
-- 로컬 확장 위젯용 `extensions/`
-
-설치된 스킬은 코딩 에이전트에게 콘텐츠 actions를 사용하도록 지시합니다
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document` 및 구성 요소 파일 actions)(로컬 콘텐츠 앱인 경우)
-또는 Agent Native 데스크탑 브리지가 이를 노출합니다. 다리가 달리고 있지 않으면 스킬
-머리말, 가져오기, JSX를 보존하면서 안전한 직접 저장소 편집으로 대체
-그리고 알 수 없는 MDX.
-
-## 구성
+이 명령은 일반 데이터베이스 기반 Content를 시작하고 폴더를 소스로 등록한 뒤 연결
+화면을 엽니다. 모드 환경 변수는 설정하지 않습니다.
-저장소 또는 작업공간 루트에 `agent-native.json`를 추가하세요.
+## 설정
```json
{
"version": 1,
"apps": {
"content": {
- "mode": "local-files",
"roots": [
{
"name": "Docs",
"path": "docs",
"kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
}
],
"components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
+ "extensions": "extensions"
}
}
}
```
-`AGENT_NATIVE_MODE=local-files` 또는
-`AGENT_NATIVE_DATA_MODE=local-files`; 매니페스트가 선호되는 이유는
-저장소 자체에 폴더 계약을 문서화합니다.
-
-## 콘텐츠 파일 형식
-
-콘텐츠는 Markdown 및 MDX를 읽습니다. Frontmatter는 페이지 메타데이터를 담고 있으며 본문은
-편집 가능한 문서:
-
-```mdx
----
-title: "시작하기"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
-
-# 시작하기
-
-Use to show framework-specific code.
-```
-
-제목은 `title` 머리말에서 나오며, 그렇지 않으면
-파일 이름. 편집기는 아직 시각적으로 편집할 수 없는 MDX 소스를 보존하므로
-코딩 에이전트와 일반 텍스트 편집기는 안전한 탈출구로 남아 있습니다.
-
-## 사용자 정의 MDX 구성 요소
-
-콘텐츠는 구성된 `components` 폴더에서 로컬 구성 요소를 미리 볼 수 있습니다.
-이는 탭, 콜아웃, 패키지와 같은 문서 스타일 MDX 구성요소를 위한 것입니다.
-스니펫 또는 프레임워크별 코드 블록을 설치합니다.
-
-예를 들어 콘텐츠 옆에 대화형 구성요소를 추가하세요.
-
-```tsx
-// components/ImpactCounter.tsx
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-그런 다음 로컬 MDX 파일에서 사용하십시오.
-
-```mdx
----
-title: "출시 노트"
----
-
-# 출시 노트
-
-
-```
-
-콘텐츠 개발 서버는 내보내기 및 PascalCase 기본값이라는 PascalCase를 검색합니다.
-`components/` 아래의 `.tsx`, `.jsx`, `.ts` 및 `.js` 파일에서 내보냅니다. 그
-구성요소는 편집기 내에서 렌더링되고 아래의 슬래시 메뉴에 나타납니다
-**로컬 구성요소**. 슬래시를 삽입하면 다음과 같은 최소한의 태그가 생성됩니다.
-``; 필요한 경우 MDX 소스에 소품을 추가하세요.
-
-구성요소 실행은 의도적으로 로컬 개발/데스크톱 브리지 기능이 아닌
-일반 호스팅 브라우저 폴더 액세스. `content.agent-native.com`를 열면
-**로컬 파일**을 선택하고 Chrome에서 폴더를 선택하면 앱이 읽고 쓸 수 있습니다.
-`.md` 및 `.mdx` 파일은 브라우저 파일 시스템 액세스 API를 통해 이루어지지만
-Chrome은 컴파일할 Vite의 절대 폴더 경로를 노출하지 않습니다.
-`components/*.tsx`. 사용자 정의 React 구성 요소를 미리 보고 핫 리로드하려면 다음을 실행하세요.
-신뢰할 수 있는 로컬 브리지에서 콘텐츠를 로컬로 전송하거나 Agent Native 데스크탑을 사용하여
-선택한 작업공간을 로컬 컨텐츠 개발 서버에 등록합니다. 해당 모드에서는
-Vite를 통해 기존 구성 요소 파일 핫 리로드를 편집하고 또는 추가
-구성요소 파일을 제거하면 구성요소 레지스트리와 슬래시 메뉴가 다시 로드됩니다.
-
-에이전트는 등록된 구성 요소 파일로 작업할 수도 있습니다. 사용
-`list-local-component-files`를 사용하여 등록된 작업공간 ID를 찾은 다음
-`write-local-component-file` - `.tsx`, `.jsx`, `.ts` 생성 또는 업데이트
-작업 공간의 `components/` 폴더 아래에 있는 `.js` 파일. MDX 파일은 그대로 유지됩니다.
-구성요소 사용에 대한 정보 소스. 구성 요소 파일은 일반 저장소로 유지됩니다.
-Git로 검토한 소스 파일.
-
-구성 요소가 입력 메타데이터를 내보내는 경우 편집기에서 구성 요소 선택
-구성요소의 오른쪽 상단에 편집 버튼이 표시됩니다. 지원되는 입력 유형
-`string`, `textarea`, `number`, `boolean` 및 `select`입니다. 양식은 다음과 같습니다.
-MDX 태그로 다시 변경되므로 로컬 파일은 정보 소스로 유지됩니다.
-메타데이터는 `ComponentNameInputs`, `ComponentNameConfig.inputs`로 내보낼 수 있습니다.
-`Component.inputs` 또는 `agentNative.inputs`.
-
-리터럴 소품이 있는 간단한 구성 요소 태그는 인라인으로 미리 볼 수 있습니다.
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-복잡한 JSX 표현식은 소스에 보존됩니다. 편집자가 안전하게 할 수 없는 경우
-아직 구성 요소 속성을 미리 보면
-데이터를 자동으로 삭제합니다.
-
-## 로컬 파일 공유
-
-다른 사용자가 경로를 읽을 수 없기 때문에 로컬 파일은 직접 공유되지 않습니다.
-당신의 기계. 콘텐츠 도구 모음의 공유 버튼은
-선택한 파일의 데이터베이스 기반 복사본을 찾아 해당 복사본을 탐색하고
-일반 공유 팝오버. 원본 로컬 파일은 로컬 파일 아래에 남아 있습니다.
-데이터베이스 복사본은 로컬 파일 모드의 공유 복사본 아래에 나타나며
-표준 문서 공유 모델.
-
-## 지역 확장
-
-로컬 파일 모드는 구성된 파일에서 repo 지원 확장을 로드할 수도 있습니다.
-`extensions` 폴더. 각 확장은 `extension.json`가 포함된 하나의 디렉터리입니다.
-매니페스트 및 HTML 항목 파일:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html`는 일반에서 사용하는 것과 동일한 Alpine/Tailwind 확장 본문 형식입니다.
-데이터베이스 지원 확장. 콘텐츠 앱이 다음과 같은 로컬 확장을 볼 때
-`content.sidebar.bottom`를 선언하면 해당 확장을
-the Content sidebar. The host passes `window.slotContext` with the selected
-문서 ID, 제목, 소스 메타데이터 및 콘텐츠가 로컬 파일 모드에 있는지 여부
-
-로컬 확장자는 앱에서 미리 볼 수 있지만 파일로 편집됩니다. 확장 프로그램
-목록에는 로컬 파일 배지가 표시되며 전체 페이지 뷰어는 다음을 가리킵니다
-항목 파일입니다. 업데이트, 삭제, 공유 및
-이력은 적용되지 않습니다. 편집기, Codex, Claude 코드 또는 Git 기록을 사용하여
-소스 변경.
-
-v1의 경우 로컬 확장은 의도적으로 보수적입니다.
-
-- 그들은 자신의 작은 런타임 상태를 위해 `extensionData`를 사용할 수 있습니다
-- `extension.json`에 나열된 `appAction`만 호출할 수 있습니다
-- 원시 SQL 도우미 및 외부 `extensionFetch`가 비활성화되었습니다.
-- 슬롯 대상은 SQL를 통해 설치되지 않은 `extension.json`에서 선언되었습니다.
-
-이것은 로컬 작업 공간에 Obsidian과 유사한 플러그인 표면을 제공하지만
-임의의 repo 파일은 데이터베이스 지원 확장 프로그램의 모든 기능을 상속합니다.
-
-## 앱이 이를 사용하는 방법
-
-로컬 파일 모드는 프레임워크의 로컬 아티팩트 도우미를 통해 구현됩니다.
-앱은 자신이 소유한 아티팩트 유형의 루트를 선언한 다음 읽고 씁니다.
-UI와 에이전트가 이미 사용하고 있는 동일한 작업 표면을 통해
-
-콘텐츠의 경우 다음을 의미합니다.
-
-- `list-documents`에는 구성된 `.md` 및 `.mdx` 파일이 나열됩니다.
-- `get-document`는 선택한 로컬 파일을 읽습니다.
-- `update-document`는 선택한 로컬 파일을 씁니다.
-- `create-document`는 선택한 폴더에 새 로컬 `.mdx` 파일을 생성합니다.
-- `delete-document`는 로컬 파일을 삭제합니다.
-- 검색은 구성된 로컬 파일 전체에서 실행됩니다.
-
-컨텐츠 UI에서 로컬 파일 페이지를 이동하고, 이름을 바꾸고, 순서를 바꾸는 것은
-아직 지원됩니다. 작업 공간이나 코딩 에이전트를 사용하여 해당 작업을 수행하십시오.
-콘텐츠 사이드바에는 결과 파일 트리가 반영됩니다.
-
-이렇게 하면 에이전트 계약이 단순해집니다. 에이전트는 콘텐츠 actions를 계속 사용할 수 있습니다.
-그리고 actions는 대상이 SQL 지원인지 파일 지원인지 결정합니다.
-
-시간이 지남에 따라 다른 앱도 동일한 패턴을 채택할 수 있습니다. 프레젠테이션 앱은 지도를 작성할 수 있습니다
-`slides/*.mdx`를 데크에 연결하고 Plans 앱은 `plans/*`를 계획 문서에 매핑할 수 있으며
-대시보드 앱은 `dashboards/*.mdx`를 대시보드에 매핑할 수 있습니다. 특정 앱
-폴더는 동일한 로컬 아티팩트 계약 위에 쌓인 규칙입니다.
-
-## 로컬 파일과 내보내기/가져오기
-
-콘텐츠에는 두 가지 파일 작업 흐름이 있습니다:
-
-| 워크플로우 | 무슨 일이 일어나는지 |
-| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
-| `/local-files` 내보내기/가져오기 | 데이터베이스 모드는 여전히 정보의 원천입니다. 파일은 내보내고, 편집하고, 미리 보고, 가져오는 명시적인 동기화 표면입니다. |
-| 로컬 파일 모드 | 파일은 정보의 원천입니다. 콘텐츠 사이드바와 편집기는 로컬 파일에서 직접 작동합니다. |
-
-호스팅된 작업공간 주변에서 가끔 파일을 검토하려는 경우 내보내기/가져오기를 사용하세요.
-저장소 자체가 작업공간인 경우 로컬 파일 모드를 사용하세요.
-
-## 역사와 협력
-
-로컬 파일 모드는 파일 기본 기록에 의존합니다:
-
-- Git에 중요한 변경 사항을 커밋
-- 검토를 위해 풀 요청 사용
-- 코딩 에이전트가 동일한 파일을 직접 편집하도록 허용
-- 변경사항을 이해하려면 일반 파일 비교를 사용하세요
-
-데이터베이스 모드는 다음과 같은 호스팅 공동 작업 기능에 더 적합합니다.
-공유, 댓글, SQL 지원 버전 기록 및 실시간 다중 사용자 편집
-
-공급자 동기화는 두 모드 중 하나 위에 계층화될 수 있습니다. 예를 들어, 문서 저장소는
-CMS의 콘텐츠를 로컬 MDX 파일로 가져오거나 선택한 항목을 푸시하는 actions를 추가하세요.
-로컬 파일을 해당 CMS로 되돌립니다.
-
-## 생산 안전
-
-로컬 파일 모드는 앱 actions에 구성된 작업 공간에 대한 직접 쓰기 액세스를 제공합니다.
-파일. 로컬 개발 및 신뢰할 수 있는 단일 테넌트 파일에 적합합니다.
-브리지이지만 기본 프로덕션 보안 모델은 아닙니다.
-
-`NODE_ENV=production`일 때, 프레임워크는 다음을 제외하고 `local-files` 모드를 거부합니다.
-설정:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-모든 사람이 사용할 수 있는 신뢰할 수 있는 단일 테넌트 배포에 대해서만 설정하십시오.
-앱은 구성된 파일을 읽고 쓸 수 있습니다. 일반 호스팅의 경우
-다중 사용자 앱, 데이터베이스 모드 및 SQL 지원 공유를 사용하세요.
+마이그레이션할 때 `mode: "local-files"`와
+`AGENT_NATIVE_MODE=local-files`를 제거하고 roots는 유지한 채 `source`를
+추가합니다. frontmatter ID는 이름 변경과 이동 시 페이지 정체성을 유지합니다.
+로컬 컴포넌트와 확장은 계속 신뢰할 수 있는 로컬 브리지를 사용합니다.
diff --git a/packages/core/docs/content/locales/ko-KR/template-content.mdx b/packages/core/docs/content/locales/ko-KR/template-content.mdx
index 198aa35f42..ee161b98ac 100644
--- a/packages/core/docs/content/locales/ko-KR/template-content.mdx
+++ b/packages/core/docs/content/locales/ko-KR/template-content.mdx
@@ -91,9 +91,8 @@ description: "MDX용 오픈 소스 Obsidian: 로컬 Markdown/MDX 파일을 편
- **페이지를 트리로 정리** — 자주 사용하는 즐겨찾는 페이지를 무한히 중첩하고 드래그하여 재정렬하세요.
- 제목과 콘텐츠 전체에 대한 전체 텍스트 검색으로 **모든 것을 검색**하세요.
- **Obsidian과 같은 로컬 Markdown/MDX 파일을 편집합니다.** `/local-files` 보기를 사용하세요.
- 작업 공간을 파일로 내보내고, 자신의 도구에서 편집하고, 미리 보려면
- 변경 사항을 다시 가져옵니다. 로컬 파일 모드에서는 콘텐츠가 바로
- 선택한 `.md` 또는 `.mdx` 파일
+ 폴더를 Files에 연결하고 자신의 도구로 편집한 다음 변경 사항을 동기화하고
+ SQL 앱 안에서 충돌을 검토할 수 있습니다.
- **풍부한 대화형 사용자 정의 블록을 생성합니다.** 로컬 React 구성요소를 등록합니다.
이를 MDX로 삽입하고 에이전트가 다음에 대한 구성 요소 파일을 생성하거나 업데이트하도록 합니다.
문서
@@ -136,32 +135,19 @@ description: "MDX용 오픈 소스 Obsidian: 로컬 Markdown/MDX 파일을 편
댓글, 권한 및 실시간 공동 작업 로컬 폴더는 명시적입니다
동기화 표면.
-파일이 원본인 **로컬 파일 모드**에서도 콘텐츠를 실행할 수 있습니다.
-SQL 문서 대신 진실. 저장소에 `agent-native.json`를 추가하고 설정
-`mode: "local-files"` 및 `docs/`, `blog/`와 같은 루트 구성
-`content/` 및 `resources/`. 그러면 표준 콘텐츠 편집기가 해당 항목을 채웁니다.
-해당 로컬 `.md`/`.mdx` 파일의 왼쪽 사이드바를 편집하고 편집 내용을 다시
-일반 문서 actions를 통해 선택한 파일입니다. 저장소 우선 문서에 이것을 사용하세요.
-MDX 기반 블로그, 리소스 라이브러리 또는 Obsidian 스타일의 개인 콘텐츠
-구성요소; 호스팅된 공동 작업을 원할 때 데이터베이스 모드로 다시 전환하고
-SQL 지원 공유. 자세한 내용은 [Local File Mode](/docs/local-file-mode)를 참조하세요.
-독립형 저장소 레이아웃, 구성, 사용자 정의 MDX 구성 요소, 로컬
-`extensions/` 위젯 및 생산 안전 가이드.
+로컬 폴더도 모든 페이지와 같은 SQL 모델을 사용합니다. 각 페이지는 공간과 해당
+Files 데이터베이스에 속하고 폴더는 소스 어댑터가 됩니다. 정책, 충돌, MDX 구성
+요소와 이전 모드에서의 마이그레이션은 [로컬 폴더 소스](/docs/local-file-mode)를
+참조하세요.
-기존 저장소에 콘텐츠 로컬 파일 기술을 설치하려면:
+기존 저장소에서 Content를 열려면:
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-설치 프로그램은 코딩 에이전트에 대한 `content` 기술을 복사하고 쓰기 또는
-`docs/`, `blog/`, `content/`에 대한 콘텐츠 루트로 `agent-native.json`를 업데이트합니다.
-및 `resources/`. 로컬 콘텐츠 앱, Agent Native 데스크톱 또는 신뢰할 수 있는 경우
-로컬 브리지가 실행 중입니다. 에이전트는 다음과 같은 Content actions를 사용해야 합니다.
-`list-documents`, `get-document`, `edit-document`, `update-document` 및
-원시 파일 시스템 쓰기 대신 `share-local-file-document`. 그 지역이 없으면
-브리지, 설치된 스킬은 여전히 에이전트에게 저장소 편집 계약을 제공합니다
-Markdown/MDX 편집은 안전합니다.
+CLI는 일반 데이터베이스 기반 Content를 시작하고 폴더 소스를 등록한 뒤 모드
+환경 변수를 설정하지 않고 연결 화면을 엽니다.
## 개발자용
diff --git a/packages/core/docs/content/locales/pt-BR/local-file-mode.mdx b/packages/core/docs/content/locales/pt-BR/local-file-mode.mdx
index efd1744926..44dc82317e 100644
--- a/packages/core/docs/content/locales/pt-BR/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/pt-BR/local-file-mode.mdx
@@ -1,527 +1,69 @@
---
-title: "Modo de arquivo local"
-description: "Execute aplicativos nativos do agente com Markdown, MDX locais e outros arquivos repo como fonte da verdade, incluindo documentos MDX no estilo Obsidian com componentes personalizados."
+title: "Fontes de pastas locais"
+description: "Conecte pastas Markdown e MDX aos espaços do Content com suporte de banco de dados."
---
-# Modo de arquivo local
+# Fontes de pastas locais
-O modo de arquivo local permite que um aplicativo nativo do agente anexe seu UI normal e sua superfície de ação
-diretamente para arquivos em um repositório ou espaço de trabalho. O aplicativo ainda parece hospedado
-produto, mas suas visualizações de lista, editor e ferramentas de agente leem e gravam arquivos locais
-em vez de registros de aplicativos baseados em SQL.
+O Content agora tem um único modelo de dados: cada página fica no SQL, pertence
+a um **espaço** e integra o banco de sistema **Files** desse espaço. Uma pasta
+local é uma fonte conectada a Files, não um segundo modo do aplicativo. Não há
+mais uma chave `AGENT_NATIVE_MODE`.
-A primeira implementação está no modelo Conteúdo: a barra lateral esquerda está
-preenchido a partir de arquivos locais `.md` e `.mdx`, selecionar uma página abre o padrão
-Editor de conteúdo e gravação de gravação no arquivo selecionado. Os mesmos arquivos podem
-também pode ser editado por Codex, Claude Code, agente da barra lateral Agent-Native ou um normal
-editor.
+Cada usuário tem um espaço pessoal, cada organização acessível tem seu espaço,
+e o catálogo pessoal **Workspaces** determina quais aparecem. Files é um banco
+normal do Content: propriedades, filtros, ordenação, agrupamento e visualizações
+salvas também podem renderizar a barra lateral.
-Para conteúdo, isso faz com que o produto pareça Obsidian de código aberto para MDX:
-seus documentos ficam como arquivos, enquanto o aplicativo adiciona um editor visual, o agente actions,
-cópias compartilháveis e componentes MDX interativos avançados.
+## Conectar uma pasta
-Use o modo de arquivo local quando desejar um fluxo de trabalho com foco no repositório:
+Escolha uma pasta pelo navegador ou Agent Native Desktop e conecte-a a um espaço
+existente, ou crie um espaço privado baseado nela. O SQL guarda apenas o ID
+opaco da conexão, caminhos relativos, hashes e metadados — nunca o caminho
+absoluto, o identificador do navegador ou o conteúdo bruto do arquivo.
-- um repositório de documentos com `docs/*.mdx`
-- um blog com `blog/*.mdx`
-- recursos como posicionamento, mensagens ou notas da equipe em `resources/*.md`
-- uma base de conhecimento pessoal no estilo Obsidian com um editor MDX mais rico
-- documentos que precisam de blocos MDX personalizados interativos gerados a partir do código React local
-- artefatos de aplicativos que devem ser fáceis de serem inspecionados e corrigidos pelos agentes de codificação
+As políticas são `database_primary`, `source_primary` e
+`reviewed_bidirectional`. A sincronização materializa os arquivos como páginas
+SQL normais. Alterações simultâneas geram uma mudança para revisão, em vez de
+sobrescrever um lado. Desconectar preserva páginas e arquivos.
-Use o modo de banco de dados quando desejar a experiência de aplicativo colaborativo hospedado:
-compartilhamento multiusuário, permissões baseadas em SQL, comentários, histórico de versões e
-hospedagem de produção sem acesso ao sistema de arquivos local.
-
-## O modelo mental
-
-Existem dois modos de fonte da verdade:
-
-| Modo | Fonte da verdade | Melhor para |
-| --------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| Modo banco de dados | Linhas SQL até Drizzle | Aplicativos hospedados, colaboração, compartilhamento, comentários, histórico de versões |
-| Modo de arquivo local | Arquivos repositórios declarados por `agent-native.json` | Fluxos de trabalho locais/de desenvolvimento, revisão do Git, edições do agente de codificação, conteúdo nativo de arquivo |
-
-O UI e o agente actions devem permanecer na mesma forma em ambos os modos. Um conteúdo
-editor ainda edita documentos; a diferença é se esses documentos resolvem
-para linhas SQL ou arquivos locais.
-
-
-
-```html
-
-
-
UI de conteúdo
-
- Agente + ações list/get/update-document
-
-
-
→
-
-
- Modo banco de dadosSQL rows via Drizzlehospedado · compartilhamento · comentários · histórico
-
-
- Local File Moderepo files via agent-native.jsonrevisão Git · edições do agente de código
-
-
-
-```
-
-```css
-.diagram-mode {
- display: flex;
- align-items: center;
- gap: 14px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-col {
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.diagram-mode .diagram-arrow {
- font-size: 22px;
- line-height: 1;
-}
-.diagram-mode .resolve {
- display: flex;
- gap: 12px;
- flex-wrap: wrap;
-}
-.diagram-mode .diagram-panel {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 12px 14px;
-}
-```
-
-
-
-## Exemplo de repositório
-
-Um espaço de trabalho Conteúdo pode ser tão pequeno quanto isto:
-
-
-
-No modo de arquivo local, a barra lateral de conteúdo mostra `docs/`, `blog/` e
-Árvores `resources/` como páginas. Selecionar `docs/getting-started.mdx` abre isso
-arquivo no editor de conteúdo padrão; a edição no UI grava de volta em
-`docs/getting-started.mdx`.
-
-`components/` não é uma raiz de conteúdo. É uma biblioteca de componentes de visualização que MDX
-arquivos podem ser importados ou referenciados. O editor pode renderizar componentes MDX locais simples
-sem precisar clonar ou bifurcar todo o aplicativo Content.
-
-`extensions/` também não é uma raiz de conteúdo. É uma biblioteca de extensão local:
-pequenos widgets em sandbox que podem ser renderizados em slots de aplicativos enquanto sua fonte permanece em
-o repositório.
-
-## Instalar conteúdo em um repositório
-
-Para documentos, blogs ou espaço de trabalho MDX existentes, instale os arquivos locais de conteúdo
-habilidade:
+## Iniciar em um repositório
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-Isso copia a habilidade `content` nas pastas de habilidades do agente do repositório e grava
-ou atualiza `agent-native.json` com padrões de conteúdo:
-
-- `mode: "local-files"` no nível do espaço de trabalho
-- `apps.content.mode: "local-files"`
-- raízes de conteúdo para `docs/`, `blog/`, `content/` e `resources/`
-- `components/` para componentes MDX locais
-- `extensions/` para widgets de extensão local
-
-A habilidade instalada informa aos agentes de codificação para usarem o Conteúdo actions
-(`list-documents`, `get-document`, `edit-document`, `update-document`,
-`share-local-file-document` e arquivo de componente actions) quando um aplicativo de conteúdo local
-ou Agent Native Desktop bridge os expõe. Se nenhuma ponte estiver funcionando, a habilidade
-volta para edições de repositório diretas e seguras, preservando o frontmatter, as importações, JSX,
-e MDX desconhecido.
+O comando inicia o Content normal com banco de dados, registra a pasta como
+fonte e abre a conexão. Nenhuma variável de modo é definida.
## Configuração
-Adicione `agent-native.json` ao repositório ou raiz do espaço de trabalho:
-
```json
{
"version": 1,
"apps": {
"content": {
- "mode": "local-files",
"roots": [
{
"name": "Docs",
"path": "docs",
"kind": "docs",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Blog",
- "path": "blog",
- "kind": "blog",
- "extensions": [".md", ".mdx"]
- },
- {
- "name": "Resources",
- "path": "resources",
- "kind": "resources",
- "extensions": [".md", ".mdx"]
+ "extensions": [".md", ".mdx"],
+ "source": {
+ "type": "local-folder",
+ "connectionId": "local-folder:",
+ "truthPolicy": "source_primary"
+ }
}
],
"components": "components",
- "extensions": "extensions",
- "hide": ["**/_*.md", "**/_*.mdx"]
+ "extensions": "extensions"
}
}
}
```
-Você também pode ativar arquivos locais com `AGENT_NATIVE_MODE=local-files` ou
-`AGENT_NATIVE_DATA_MODE=local-files`; o manifesto é preferido porque
-documenta o contrato da pasta no próprio repositório.
-
-## Formato de arquivo de conteúdo
-
-O conteúdo diz Markdown e MDX. Frontmatter contém metadados da página e o corpo é
-o documento editável:
-
-```mdx
----
-title: "Primeiros passos"
-icon: "sparkles"
-isFavorite: true
-updatedAt: "2026-06-12T20:00:00.000Z"
----
-
-# Primeiros passos
-
-Use to show framework-specific code.
-```
-
-O título vem do frontmatter `title` quando presente, caso contrário, do
-nome do arquivo. O editor preserva a fonte MDX que ainda não pode ser editada visualmente, portanto
-agentes de codificação e editores de texto normais permanecem como saídas de escape seguras.
-
-## Componentes MDX personalizados
-
-O conteúdo pode visualizar componentes locais da pasta `components` configurada.
-Isso se destina a componentes MDX de estilo de documento, como guias, textos explicativos, pacote
-instale snippets ou blocos de código específicos da estrutura.
-
-Por exemplo, adicione um componente interativo próximo ao seu conteúdo:
-
-```tsx
-// components/ImpactCounter.tsx
-import { useState } from "react";
-
-export function ImpactCounter({
- label = "points",
- accent = "blue",
- featured = false,
-}: {
- label?: string;
- accent?: "blue" | "green" | "purple";
- featured?: boolean;
-}) {
- const [count, setCount] = useState(3);
- const accentClass =
- accent === "green"
- ? "border-green-300 bg-green-50"
- : accent === "purple"
- ? "border-purple-300 bg-purple-50"
- : "border-blue-300 bg-blue-50";
-
- return (
-
-
Launch impact
-
- {count} {label}
-
- {featured ?
Featured metric
: null}
-
-
- );
-}
-
-export const ImpactCounterInputs = {
- label: {
- type: "string",
- label: "Metric label",
- default: "points",
- },
- accent: {
- type: "select",
- label: "Accent",
- options: ["blue", "green", "purple"],
- default: "blue",
- },
- featured: {
- type: "boolean",
- label: "Featured",
- default: false,
- },
-};
-```
-
-Em seguida, use-o em qualquer arquivo MDX local:
-
-```mdx
----
-title: "Notas de lançamento"
----
-
-# Notas de lançamento
-
-
-```
-
-O servidor de desenvolvimento de conteúdo descobre exportações nomeadas de PascalCase e padrão de PascalCase
-exporta arquivos `.tsx`, `.jsx`, `.ts` e `.js` em `components/`. Aqueles
-componentes são renderizados dentro do editor e aparecem no menu de barras em
-**Componentes locais**. A inserção de barra cria uma tag mínima como
-``; adicione adereços na fonte MDX quando necessário.
-
-A execução do componente é intencionalmente um recurso de ponte local-dev/Desktop, não
-acesso simples à pasta do navegador hospedado. Se você abrir `content.agent-native.com`,
-escolha **Arquivos locais** e escolha uma pasta no Chrome, o app pode ler e gravar
-os arquivos `.md` e `.mdx` através do navegador Sistema de Arquivos Acesse API, mas
-O Chrome não expõe um caminho de pasta absoluto para Vite compilar
-`components/*.tsx`. Para visualizar e recarregar componentes React personalizados, execute
-Conteúdo localmente ou use o Agent Native Desktop para que a ponte local confiável possa
-registre o espaço de trabalho escolhido no servidor de desenvolvimento de conteúdo local. Nesse modo,
-edições em arquivos de componentes existentes, recarregamento a quente por meio de Vite e adição de ou
-a remoção de arquivos de componentes recarrega o registro do componente e o menu de barras.
-
-Os agentes também podem trabalhar com esses arquivos de componentes registrados. Usar
-`list-local-component-files` para encontrar o ID do espaço de trabalho registrado e, em seguida,
-`write-local-component-file` para criar ou atualizar `.tsx`, `.jsx`, `.ts` ou
-Arquivos `.js` na pasta `components/` do espaço de trabalho. Os arquivos MDX permanecem os
-fonte de verdade para uso de componentes; os arquivos do componente permanecem no repositório normal
-arquivos de origem revisados com Git.
-
-Se um componente exportar metadados de entrada, selecione o componente no editor
-mostra um botão de edição no canto superior direito do componente. Tipos de entrada suportados
-são `string`, `textarea`, `number`, `boolean` e `select`. O formulário escreve
-volta para a tag MDX, então os arquivos locais permanecem a fonte da verdade. O
-metadados podem ser exportados como `ComponentNameInputs`, `ComponentNameConfig.inputs`,
-`Component.inputs` ou `agentNative.inputs`.
-
-Tags de componentes simples com adereços literais podem ser visualizados in-line:
-
-```mdx
-
-
-
-
-This setting affects production deploys.
-
-
-```
-
-Expressões JSX complexas são preservadas na origem. Se o editor não puder com segurança
-visualizar um suporte de componente ainda, ele mostra um espaço reservado de aviso em vez de
-descartando dados silenciosamente.
-
-## Compartilhando arquivos locais
-
-Os arquivos locais não são compartilhados diretamente porque outros usuários não conseguem ler um caminho
-sua máquina. O botão Compartilhar da barra de ferramentas Conteúdo cria ou atualiza um
-cópia do arquivo selecionado com base no banco de dados, navega até essa cópia e abre o
-popover de compartilhamento normal. O arquivo local original permanece em Arquivos locais; o
-a cópia do banco de dados aparece em Cópias compartilhadas no modo de arquivo local e usa o
-modelo padrão de compartilhamento de documentos.
-
-## Extensões locais
-
-O modo de arquivo local também pode carregar extensões apoiadas por repositório a partir do configurado
-Pasta `extensions`. Cada extensão é um diretório com um `extension.json`
-manifesto e um arquivo de entrada HTML:
-
-```text
-extensions/
- doc-status/
- extension.json
- index.html
-```
-
-```json
-{
- "id": "doc-status",
- "name": "Doc Status",
- "description": "Shows metadata for the selected Content file.",
- "entry": "index.html",
- "slots": ["content.sidebar.bottom"],
- "permissions": {
- "appActions": ["list-documents"],
- "extensionData": true
- }
-}
-```
-
-`index.html` é o mesmo formato de corpo de extensão Alpine/Tailwind usado pelo normal
-extensões apoiadas por banco de dados. Quando o aplicativo Content vê uma extensão local que
-declara `content.sidebar.bottom`, ele renderiza essa extensão na parte inferior de
-a barra lateral de Conteúdo. O host passa `window.slotContext` com o selecionado
-ID do documento, título, metadados de origem e se o conteúdo está no modo de arquivo local.
-
-As extensões locais são visualizadas pelo aplicativo, mas editadas como arquivos. As extensões
-a lista mostra-os com um selo de arquivo local, e o visualizador de página inteira aponta de volta para
-o arquivo de entrada. Extensão actions apoiada por SQL, como atualizar, excluir, compartilhar e
-história não se aplica; use seu editor, código Codex, Claude ou histórico do Git para
-alterações na origem.
-
-Para v1, as extensões locais são intencionalmente conservadoras:
-
-- eles podem usar `extensionData` para seu próprio estado de tempo de execução pequeno
-- eles podem ligar apenas para os `appAction`s listados em `extension.json`
-- ajudantes SQL brutos e `extensionFetch` externos estão desabilitados
-- os destinos dos slots são declarados em `extension.json`, não instalados por meio de SQL
-
-Isso dá aos espaços de trabalho locais uma superfície de plug-in semelhante ao Obsidian, sem permitir
-O arquivo repositório arbitrário herda todos os recursos de uma extensão baseada em banco de dados.
-
-## Como os aplicativos usam isso
-
-O modo de arquivo local é implementado por meio dos auxiliares de artefatos locais da estrutura.
-Um aplicativo declara raízes para os tipos de artefatos que possui, depois lê e grava
-através da mesma ação, o UI e o agente já usam.
-
-Para Conteúdo, isso significa:
-
-- `list-documents` lista os arquivos `.md` e `.mdx` configurados.
-- `get-document` lê um arquivo local selecionado.
-- `update-document` grava o arquivo local selecionado.
-- `create-document` cria um novo arquivo `.mdx` local na pasta selecionada.
-- `delete-document` exclui o arquivo local.
-- a pesquisa é executada nos arquivos locais configurados.
-
-Mover, renomear e reordenar páginas de arquivos locais do Conteúdo UI não é
-ainda compatível. Faça essas operações no espaço de trabalho ou com um agente de codificação; o
-A barra lateral de conteúdo refletirá a árvore de arquivos resultante.
-
-Isso mantém o contrato do agente simples: o agente pode continuar usando o Conteúdo actions,
-e aqueles actions decidem se o alvo é apoiado por SQL ou por arquivo.
-
-Outros aplicativos podem adotar o mesmo padrão ao longo do tempo. Um aplicativo Apresentações pode mapear
-`slides/*.mdx` para decks, um aplicativo de Planos pode mapear `plans/*` para documentos de planejamento e um
-O aplicativo Dashboards pode mapear `dashboards/*.mdx` para dashboards. Aqueles específicos do aplicativo
-pastas são convenções colocadas em camadas sobre o mesmo contrato de artefato local.
-
-## Arquivos locais x exportação/importação
-
-O conteúdo tem dois fluxos de trabalho de arquivo diferentes:
-
-| Fluxo de trabalho | O que acontece |
-| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Exportação/importação `/local-files` | O modo banco de dados continua sendo a fonte da verdade. Os arquivos são uma superfície de sincronização explícita que você exporta, edita, visualiza e importa. |
-| Modo de arquivo local | Os arquivos são a fonte da verdade. A barra lateral e o editor de conteúdo operam diretamente em arquivos locais. |
-
-Use exportar/importar quando quiser revisar arquivos ocasionalmente em um espaço de trabalho hospedado.
-Use o modo de arquivo local quando o próprio repositório for o espaço de trabalho.
-
-## História e colaboração
-
-O modo de arquivo local depende do histórico nativo do arquivo:
-
-- confirmar alterações importantes no Git
-- use pull requests para revisão
-- permitir que os agentes de codificação editem os mesmos arquivos diretamente
-- use diferenças normais de arquivo para entender as alterações
-
-O modo banco de dados continua sendo o mais adequado para recursos de colaboração hospedados, como
-compartilhamento, comentários, histórico de versões apoiado por SQL e edição multiusuário ao vivo.
-
-A sincronização do provedor pode ser colocada em camadas sobre qualquer um dos modos. Por exemplo, um repositório de documentos pode
-adicione actions que extrai conteúdo de um CMS para arquivos MDX locais ou envia por push os selecionados
-arquivos locais de volta para esse CMS.
-
-## Segurança de produção
-
-O modo de arquivo local fornece ao aplicativo actions acesso direto de gravação ao espaço de trabalho configurado
-arquivos. Isso é apropriado para desenvolvimento local e arquivo confiável de locatário único
-pontes, mas não é o modelo de segurança de produção padrão.
-
-Quando `NODE_ENV=production`, a estrutura recusa o modo `local-files`, a menos que você
-definir:
-
-```bash
-AGENT_NATIVE_ALLOW_LOCAL_FILES_IN_PRODUCTION=true
-```
-
-Defina isso apenas para uma implantação confiável de locatário único, onde todos que podem usar
-o aplicativo tem permissão para ler e gravar os arquivos configurados. Para hospedagem normal,
-aplicativos multiusuário, usam modo de banco de dados e compartilhamento apoiado por SQL.
+Para migrar, remova `mode: "local-files"` e
+`AGENT_NATIVE_MODE=local-files`, mantenha as raízes e adicione `source`. IDs no
+frontmatter preservam a identidade ao renomear ou mover uma página. Componentes
+e extensões locais continuam usando a ponte local confiável.
diff --git a/packages/core/docs/content/locales/pt-BR/template-content.mdx b/packages/core/docs/content/locales/pt-BR/template-content.mdx
index 402b06920d..89127566f8 100644
--- a/packages/core/docs/content/locales/pt-BR/template-content.mdx
+++ b/packages/core/docs/content/locales/pt-BR/template-content.mdx
@@ -95,9 +95,8 @@ Ao abrir o aplicativo, você verá uma árvore de páginas ao lado do editor. O
- **Organize as páginas em uma árvore** — aninhe infinitamente, arraste para reordenar, páginas favoritas que você usa com frequência.
- **Pesquise tudo** com pesquisa de texto completo em títulos e conteúdo.
- **Edite arquivos Markdown/MDX locais como Obsidian.** Use a visualização `/local-files`
- para exportar seu espaço de trabalho para arquivos, edite-os em suas próprias ferramentas, visualize
- alterações e importe-as de volta. No modo de arquivo local, o conteúdo é gravado diretamente em
- o arquivo `.md` ou `.mdx` selecionado.
+ para conectar uma pasta ao Files, editar com suas ferramentas, sincronizar
+ mudanças e revisar conflitos dentro do aplicativo SQL.
- **Gere blocos personalizados interativos avançados.** Registre componentes React locais,
insira-os como MDX e deixe o agente criar ou atualizar arquivos de componentes para
seus documentos.
@@ -140,32 +139,19 @@ como superfície de revisão. O aplicativo hospedado continua sendo a fonte da v
comentários, permissões e colaboração ao vivo; a pasta local é explícita
superfície de sincronização.
-O conteúdo também pode ser executado no **Modo de arquivo local**, onde os arquivos são a origem de
-verdade em vez de documentos SQL. Adicione `agent-native.json` a um repositório, defina
-`mode: "local-files"` e configure raízes como `docs/`, `blog/`,
-`content/` e `resources/`. O editor de conteúdo padrão preenche seu
-barra lateral esquerda dos arquivos `.md`/`.mdx` locais e grava as edições de volta no
-arquivo selecionado através do documento normal actions. Use isto para documentos repo-first,
-blogs, bibliotecas de recursos ou conteúdo pessoal no estilo Obsidian com tecnologia MDX
-componentes; volte para o modo de banco de dados quando desejar colaboração hospedada e
-Compartilhamento apoiado por SQL. Consulte [Local File Mode](/docs/local-file-mode) para
-layout de repositório independente, configuração, componentes MDX personalizados, local
-Widgets `extensions/` e guia de segurança de produção.
+Pastas locais agora usam o mesmo modelo SQL que todas as páginas. Cada página
+pertence a um espaço e ao banco Files; a pasta é um adaptador de fonte. Consulte
+[Fontes de pastas locais](/docs/local-file-mode) para políticas, conflitos,
+componentes MDX e a migração do modo antigo.
-Para instalar a habilidade Content local-files em um repositório existente:
+Para abrir Content em um repositório existente:
```bash
-npx @agent-native/core@latest skills add content --mode local-files --scope project
+npx @agent-native/core@latest content .
```
-O instalador copia a habilidade `content` para seu agente de codificação e grava ou
-atualiza `agent-native.json` com raízes de conteúdo para `docs/`, `blog/`, `content/`,
-e `resources/`. Quando um aplicativo de conteúdo local, Agent Native Desktop ou confiável
-a ponte local está em execução, os agentes devem usar o Conteúdo actions como
-`list-documents`, `get-document`, `edit-document`, `update-document` e
-`share-local-file-document` em vez de gravações brutas no sistema de arquivos. Sem aquele local
-bridge, a habilidade instalada ainda dá ao agente o contrato de repoediting para
-edições seguras de Markdown/MDX.
+O CLI inicia Content com seu banco normal, registra a pasta como fonte e abre a
+conexão sem definir uma variável de modo.
## Para desenvolvedores
diff --git a/packages/core/docs/content/locales/zh-CN/local-file-mode.mdx b/packages/core/docs/content/locales/zh-CN/local-file-mode.mdx
index c266dd1bc4..82baa87d62 100644
--- a/packages/core/docs/content/locales/zh-CN/local-file-mode.mdx
+++ b/packages/core/docs/content/locales/zh-CN/local-file-mode.mdx
@@ -1,523 +1,65 @@
---
-title: "本地文件模式"
-description: "使用本地 Markdown、MDX 和其他存储库文件作为事实来源运行代理本机应用 - 包括带有自定义组件的黑曜石风格 MDX 文档。"
+title: "本地文件夹源"
+description: "将 Markdown 和 MDX 文件夹连接到由数据库支持的 Content 空间。"
---
-# 本地文件模式
+# 本地文件夹源
-本地文件模式允许代理本机应用程序附加其正常的 UI 和操作界面
-直接到存储库或工作区中的文件。该应用程序仍然感觉像是托管的
-产品,但其列表视图、编辑器和代理工具可读写本地文件
-而不是 SQL 支持的应用记录。
+Content 现在只有一个数据模型:每个页面都存储在 SQL 中,属于一个**空间**,并且
+是该空间系统 **Files** 数据库的条目。本地文件夹是连接到 Files 的数据源,而不是
+另一种应用模式。`AGENT_NATIVE_MODE` 开关已被移除。
-第一个实现是在内容模板中:左侧边栏是
-从本地 `.md` 和 `.mdx` 文件填充,选择一个页面打开标准
-内容编辑器,并保存写回到所选文件。相同的文件可以
-也可以由 Codex、Claude 代码、Agent-Native 侧边栏代理或普通编辑
-编辑器。
+每位用户有个人空间,每个可访问的组织有组织空间;个人 **Workspaces** 目录决定
+应用中显示哪些空间。Files 是普通的 Content 数据库,因此它的属性、筛选、排序、
+分组和保存视图也可以呈现为侧边栏。
-对于内容,这使得该产品感觉像是 MDX 的开源黑曜石:
-您的文档以文件形式存在,而应用程序添加了可视化编辑器、代理 actions,
-可共享的副本,以及丰富的交互式 MDX 组件。
+## 连接文件夹
-当您想要回购优先的工作流程时,请使用本地文件模式:
+通过浏览器或 Agent Native Desktop 选择文件夹,将它连接到现有空间,或创建一个
+由该文件夹支持的私有空间。SQL 只保存不透明的连接 ID、相对路径、哈希和数据源
+元数据;不保存绝对路径、浏览器句柄或原始文件正文。
-- `docs/*.mdx` 的文档存储库
-- `blog/*.mdx` 的博客
-- `resources/*.md` 中的定位、消息传递或团队笔记等资源
-- 个人黑曜石风格的知识库,具有更丰富的MDX编辑器
-- 需要从本地 React 代码生成的交互式自定义 MDX 块的文档
-- 应用程序工件应该易于编码代理检查和修补
+可选策略为 `database_primary`、`source_primary` 和
+`reviewed_bidirectional`。同步会把文件实体化为普通 SQL 页面。如果文件与 Content
+页面同时更改,系统会创建待审核变更,而不会悄悄覆盖任一方。断开连接会保留页面
+和本地文件。
-当您需要托管协作应用程序体验时,请使用数据库模式:
-多用户共享、SQL 支持的权限、评论、版本历史记录和
-没有本地文件系统访问权限的生产托管。
-
-## 心智模型
-
-有两种真相来源模式:
-
-| 模式 | 事实来源 | 最适合 |
-| ------------ | --------------------------------- | ------------------------------------------------------- |
-| 数据库模式 | SQL 行至 Drizzle | 托管应用、协作、共享、评论、版本历史记录 |
-| 本地文件模式 | `agent-native.json`声明的Repo文件 | 本地/开发工作流程、Git 审核、编码代理编辑、文件本机内容 |
-
-UI 和特工 actions 在两种模式下都应保持相同的形状。内容
-编辑器仍然编辑文档;区别在于这些文档是否解析
-到 SQL 行或本地文件。
-
-
-
-```html
-
-
-
内容 UI
-
- 代理 + actions list/get/update-document
-
-
-
→
-
-
- 数据库模式SQL rows via Drizzle托管 · 分享 · 评论 · 历史
-
-
- Local File Moderepo files via agent-native.jsonGit 评审 · 编码代理编辑
-