@agent-native/core 0.114.0 → 0.114.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +9 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/client/build-compatibility.ts +77 -0
- package/corpus/core/src/client/route-chunk-recovery/index.ts +1 -0
- package/corpus/core/src/client/use-action.ts +32 -1
- package/corpus/core/src/deploy/build.ts +4 -1
- package/corpus/core/src/org/context.ts +56 -30
- package/corpus/core/src/server/action-routes.ts +52 -2
- package/corpus/core/src/server/auth-plugin.ts +9 -4
- package/corpus/core/src/server/better-auth-instance.ts +5 -1
- package/corpus/core/src/shared/mcp-embed-headers.ts +1 -1
- package/corpus/core/src/vite/client.ts +17 -0
- package/corpus/templates/content/AGENTS.md +2 -0
- package/corpus/templates/content/actions/_content-database-personal-view.ts +49 -5
- package/corpus/templates/content/actions/_content-document-access.ts +21 -0
- package/corpus/templates/content/actions/_content-favorites.ts +91 -0
- package/corpus/templates/content/actions/_content-files.ts +79 -23
- package/corpus/templates/content/actions/_content-sidebar-state.ts +24 -0
- package/corpus/templates/content/actions/_content-space-access.ts +15 -17
- package/corpus/templates/content/actions/_content-space-catalog-guards.ts +20 -0
- package/corpus/templates/content/actions/_content-spaces.ts +364 -167
- package/corpus/templates/content/actions/_database-source-utils.ts +8 -0
- package/corpus/templates/content/actions/_database-utils.ts +249 -15
- package/corpus/templates/content/actions/_delete-content-space.ts +84 -0
- package/corpus/templates/content/actions/_files-system-properties.ts +499 -0
- package/corpus/templates/content/actions/_local-file-documents.ts +0 -1
- package/corpus/templates/content/actions/_property-utils.ts +18 -9
- package/corpus/templates/content/actions/bind-content-database-source-field.ts +3 -0
- package/corpus/templates/content/actions/configure-document-property.ts +3 -0
- package/corpus/templates/content/actions/create-content-database.ts +2 -2
- package/corpus/templates/content/actions/create-content-space.ts +34 -0
- package/corpus/templates/content/actions/create-document.ts +4 -1
- package/corpus/templates/content/actions/delete-content-space.ts +19 -0
- package/corpus/templates/content/actions/delete-database-items.ts +28 -1
- package/corpus/templates/content/actions/delete-document-property.ts +3 -0
- package/corpus/templates/content/actions/delete-document.ts +39 -2
- package/corpus/templates/content/actions/duplicate-database-item.ts +6 -0
- package/corpus/templates/content/actions/duplicate-database-items.ts +6 -0
- package/corpus/templates/content/actions/duplicate-document-property.ts +3 -0
- package/corpus/templates/content/actions/get-content-database.ts +11 -2
- package/corpus/templates/content/actions/get-content-sidebar-state.ts +23 -0
- package/corpus/templates/content/actions/get-document.ts +32 -7
- package/corpus/templates/content/actions/import-content-source.ts +33 -1
- package/corpus/templates/content/actions/list-content-spaces.ts +34 -2
- package/corpus/templates/content/actions/list-documents.ts +39 -7
- package/corpus/templates/content/actions/reorder-document-property.ts +9 -0
- package/corpus/templates/content/actions/set-document-property.ts +41 -23
- package/corpus/templates/content/actions/share-local-file-document.ts +15 -0
- package/corpus/templates/content/actions/submit-content-database-form.ts +7 -0
- package/corpus/templates/content/actions/sync-local-folder-source.ts +14 -0
- package/corpus/templates/content/actions/update-content-database-view.ts +1 -0
- package/corpus/templates/content/actions/update-content-sidebar-state.ts +27 -0
- package/corpus/templates/content/actions/update-document.ts +158 -66
- package/corpus/templates/content/app/components/EmptyState.tsx +4 -57
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +8 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +519 -178
- package/corpus/templates/content/app/components/editor/DocumentInfoPanel.tsx +39 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +266 -7
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +430 -152
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +467 -66
- package/corpus/templates/content/app/components/editor/database/view-config.ts +9 -3
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +720 -196
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +173 -1
- package/corpus/templates/content/app/components/sidebar/document-sidebar-sections.ts +1 -1
- package/corpus/templates/content/app/components/sidebar/select-content-space.ts +91 -16
- package/corpus/templates/content/app/entry.client.tsx +5 -1
- package/corpus/templates/content/app/hooks/use-content-database.ts +84 -3
- package/corpus/templates/content/app/hooks/use-content-spaces.ts +60 -2
- package/corpus/templates/content/app/hooks/use-create-page.ts +30 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +270 -19
- package/corpus/templates/content/app/i18n-data.ts +243 -20
- package/corpus/templates/content/app/lib/local-folder-picker-safety.ts +54 -0
- package/corpus/templates/content/app/lib/local-folder-picker-support.ts +18 -0
- package/corpus/templates/content/app/routes/_app.favorites.tsx +30 -0
- package/corpus/templates/content/app/routes/_app.local-files.tsx +18 -6
- package/corpus/templates/content/changelog/2026-07-17-workspace-files-now-stay-in-a-loading-state-until-automatic-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-17-workspace-switching-now-opens-the-selected-files-database-pr.md +6 -0
- package/corpus/templates/content/changelog/2026-07-17-workspaces-now-expand-above-their-own-files-list-without-dup.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-create-named-workspaces-each-with-its-own-private-files-data.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-favorites-align-with-workspace-and-file-rows-in-the-sidebar.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-local-folder-selection-no-longer-invokes-the-unsafe-native-p.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-made-content-workspaces-independently-expandable-restored-or.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-page-details-now-live-in-a-shared-info-and-comments-rail-dat.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-workspace-database-views-now-control-sidebar-workspace-navig.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-workspace-navigation-now-aligns-favorites-with-workspace-pag.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-favorites-now-open-as-a-table-and-compact-breadcrumbs-make-w.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-files-databases-now-start-unfiltered-sidebar-rows-exactly-fo.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-sidebar-page-trees-now-open-only-when-expanded-remember-thei.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspace-file-databases-now-use-the-workspace-name-open-as-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspace-navigation-now-stays-stable-on-hover-uses-folder-i.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspace-rows-now-use-folder-icons-and-deleting-a-user-crea.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspaces-can-be-created-without-leaving-the-workspaces-dat.md +6 -0
- package/corpus/templates/content/e2e/global-setup.ts +3 -2
- package/corpus/templates/content/parity/matrix.md +28 -28
- package/corpus/templates/content/parity/matrix.ts +8 -2
- package/corpus/templates/content/server/db/index.ts +1 -0
- package/corpus/templates/content/server/db/schema.ts +10 -0
- package/corpus/templates/content/server/lib/documents.ts +12 -7
- package/corpus/templates/content/server/plugins/db.ts +17 -0
- package/corpus/templates/content/shared/api.ts +9 -0
- package/corpus/templates/content/shared/database-form.ts +11 -2
- package/corpus/templates/content/vite.config.ts +1 -0
- package/dist/client/build-compatibility.d.ts +11 -0
- package/dist/client/build-compatibility.d.ts.map +1 -0
- package/dist/client/build-compatibility.js +56 -0
- package/dist/client/build-compatibility.js.map +1 -0
- package/dist/client/route-chunk-recovery/index.d.ts +1 -0
- package/dist/client/route-chunk-recovery/index.d.ts.map +1 -1
- package/dist/client/route-chunk-recovery/index.js +1 -0
- package/dist/client/route-chunk-recovery/index.js.map +1 -1
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +19 -1
- package/dist/client/use-action.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/deploy/build.js +2 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/org/context.d.ts +4 -2
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/context.js +44 -22
- package/dist/org/context.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +10 -10
- package/dist/provider-api/actions/provider-api.d.ts +12 -12
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +32 -2
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/auth-plugin.d.ts.map +1 -1
- package/dist/server/auth-plugin.js +9 -5
- package/dist/server/auth-plugin.js.map +1 -1
- package/dist/server/better-auth-instance.d.ts.map +1 -1
- package/dist/server/better-auth-instance.js +4 -1
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/mcp-embed-headers.d.ts +1 -1
- package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
- package/dist/shared/mcp-embed-headers.js +1 -1
- package/dist/shared/mcp-embed-headers.js.map +1 -1
- package/dist/vite/client.d.ts +6 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +8 -0
- package/dist/vite/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client/build-compatibility.ts +77 -0
- package/src/client/route-chunk-recovery/index.ts +1 -0
- package/src/client/use-action.ts +32 -1
- package/src/deploy/build.ts +4 -1
- package/src/org/context.ts +56 -30
- package/src/server/action-routes.ts +52 -2
- package/src/server/auth-plugin.ts +9 -4
- package/src/server/better-auth-instance.ts +5 -1
- package/src/shared/mcp-embed-headers.ts +1 -1
- package/src/vite/client.ts +17 -0
|
@@ -45,6 +45,11 @@ import {
|
|
|
45
45
|
syncLocalControlResources,
|
|
46
46
|
type LocalControlResourceFiles,
|
|
47
47
|
} from "@/lib/local-control-resources";
|
|
48
|
+
import {
|
|
49
|
+
hasInterruptedNativeFolderPickerAttempt,
|
|
50
|
+
runNativeFolderPickerWithCrashSentinel,
|
|
51
|
+
} from "@/lib/local-folder-picker-safety";
|
|
52
|
+
import { isUnsafeNativeFolderPickerHost } from "@/lib/local-folder-picker-support";
|
|
48
53
|
import { cn } from "@/lib/utils";
|
|
49
54
|
|
|
50
55
|
type PermissionState = "granted" | "denied" | "prompt";
|
|
@@ -194,7 +199,8 @@ function supportsDirectoryPicker() {
|
|
|
194
199
|
typeof (window as WindowWithDirectoryPicker).showDirectoryPicker ===
|
|
195
200
|
"function" &&
|
|
196
201
|
!getDesktopContentFiles() &&
|
|
197
|
-
!
|
|
202
|
+
!hasInterruptedNativeFolderPickerAttempt() &&
|
|
203
|
+
!isUnsafeNativeFolderPickerHost()
|
|
198
204
|
);
|
|
199
205
|
}
|
|
200
206
|
|
|
@@ -203,11 +209,13 @@ function supportsLocalFolderSync() {
|
|
|
203
209
|
}
|
|
204
210
|
|
|
205
211
|
function isElectronLikeBrowser() {
|
|
206
|
-
|
|
207
|
-
return /\bElectron\//.test(navigator.userAgent);
|
|
212
|
+
return isUnsafeNativeFolderPickerHost();
|
|
208
213
|
}
|
|
209
214
|
|
|
210
215
|
function unsupportedLocalFolderSyncMessage(t: ReturnType<typeof useT>) {
|
|
216
|
+
if (hasInterruptedNativeFolderPickerAttempt()) {
|
|
217
|
+
return t("localFiles.interruptedPicker");
|
|
218
|
+
}
|
|
211
219
|
if (isElectronLikeBrowser()) {
|
|
212
220
|
return t("localFiles.unsupportedElectron");
|
|
213
221
|
}
|
|
@@ -541,10 +549,12 @@ async function chooseDirectory(
|
|
|
541
549
|
}
|
|
542
550
|
|
|
543
551
|
const picker = (window as WindowWithDirectoryPicker).showDirectoryPicker;
|
|
544
|
-
if (!picker ||
|
|
552
|
+
if (!picker || isUnsafeNativeFolderPickerHost()) {
|
|
545
553
|
throw new Error(unsupportedLocalFolderSyncMessage(t));
|
|
546
554
|
}
|
|
547
|
-
const handle = await
|
|
555
|
+
const handle = await runNativeFolderPickerWithCrashSentinel(() =>
|
|
556
|
+
picker({ mode: "readwrite" }),
|
|
557
|
+
);
|
|
548
558
|
const existing = await Promise.all(
|
|
549
559
|
directories
|
|
550
560
|
.filter((directory) => directory.kind === "browser")
|
|
@@ -741,6 +751,7 @@ export default function LocalFilesRoute() {
|
|
|
741
751
|
const [searchParams] = useSearchParams();
|
|
742
752
|
const navigate = useNavigate();
|
|
743
753
|
const targetSpaceId = searchParams.get("spaceId") || undefined;
|
|
754
|
+
const targetDatabaseId = searchParams.get("databaseId") || undefined;
|
|
744
755
|
const manifestConnectionId = searchParams.get("connectionId") || undefined;
|
|
745
756
|
const manifestFile = searchParams.get("file") || undefined;
|
|
746
757
|
const { data: documents = [] } = useDocuments();
|
|
@@ -916,7 +927,8 @@ export default function LocalFilesRoute() {
|
|
|
916
927
|
connectionId: directory.id,
|
|
917
928
|
label: directory.sourcePrefix || directory.name,
|
|
918
929
|
spaceId: targetSpaceId,
|
|
919
|
-
|
|
930
|
+
databaseId: targetDatabaseId,
|
|
931
|
+
createSourceBackedSpace: !targetSpaceId && !targetDatabaseId,
|
|
920
932
|
truthPolicy: "source_primary",
|
|
921
933
|
dryRun,
|
|
922
934
|
} as never,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: fixed
|
|
3
|
+
date: 2026-07-18
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Local folder selection avoids unsafe embedded pickers, remembers picker attempts that never returned so they cannot cause a crash loop, and continues to support Agent Native Desktop and native folder access in Chrome, Edge, and other Chromium browsers.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: improved
|
|
3
|
+
date: 2026-07-19
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Workspace file databases now use the workspace name, open as tables, appear at the start of page breadcrumbs, nest and align child pages beneath their parents, rename sidebar rows immediately, truncate long workspace names, and provide working page actions.
|
|
@@ -28,8 +28,9 @@ async function globalSetup(_config: FullConfig) {
|
|
|
28
28
|
const page = await ctx.newPage();
|
|
29
29
|
let result: Record<string, unknown> = {};
|
|
30
30
|
try {
|
|
31
|
-
await page.goto(`${baseURL}
|
|
32
|
-
|
|
31
|
+
await page.goto(`${baseURL}/_agent-native/sign-in`, {
|
|
32
|
+
waitUntil: "domcontentloaded",
|
|
33
|
+
});
|
|
33
34
|
result = await page.evaluate(
|
|
34
35
|
async ({ email, pass }) => {
|
|
35
36
|
const post = (path: string, body: unknown) =>
|
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
This generated matrix tracks whether high-value Content UI operations use the same action surface agents can call, or have an explicit exception. Edit `matrix.ts`, then regenerate this file.
|
|
4
4
|
|
|
5
|
-
| ID | Surface | User-visible action
|
|
6
|
-
| -------------------------------------------------- | ----------- |
|
|
7
|
-
| comments.threads | comments | List, add, reply, resolve, reopen, and delete comment threads
|
|
8
|
-
| database.form-submissions | database | Submit public database forms as new rows
|
|
9
|
-
| database.lifecycle-and-trash | database | Create, soft-delete, restore, list, and inspect content databases
|
|
10
|
-
| database.private-preview-drafts | database | Persist and reconcile a user's private database-page preview draft
|
|
11
|
-
| database.properties-and-view-config | database | Configure properties, values, ordering, and saved views
|
|
12
|
-
| database.rows | database | Add, duplicate, move, open, and delete database rows
|
|
13
|
-
| editor.agent-assist-prompts | editor | Ask AI from slash generation or comment context
|
|
14
|
-
| editor.client-formatting-and-insertions | editor | Rich text formatting, selection state, slash block insertion, and copy actions
|
|
15
|
-
| editor.document-body-and-title | editor | Edit document title, body, icon, image alt text, and precise text
|
|
16
|
-
| local-files.components-workspace | local-files | Register, list, and write local MDX component workspaces
|
|
17
|
-
| local-files.host-folder-handles | local-files | Choose, persist, remove, and write trusted local folder handles
|
|
18
|
-
| local-files.import-export-mounted-folder | local-files | Import, check, export, push, and remove local folder source files
|
|
19
|
-
| notion.route-backed-document-sync | source-sync | Notion document sync status, link, unlink, pull, push, resolve, create, search, and disconnect
|
|
20
|
-
| sharing.document-discoverability-and-export | sharing | Share, hide from search, export, and reveal documents
|
|
21
|
-
| sharing.os-reveal-local-source | sharing | Reveal a local source file in the system file manager
|
|
22
|
-
| sidebar.chrome-state | sidebar | Collapse sections and resize the sidebar
|
|
23
|
-
| sidebar.document-tree-crud | sidebar | Create, delete, move, favorite, list, search, and open pages
|
|
24
|
-
| sidebar.navigation-and-screen-context | sidebar | Navigate between documents and expose current screen context
|
|
25
|
-
| source-sync.builder-body-hydration-worker | source-sync | Process queued Builder CMS body hydration work
|
|
26
|
-
| source-sync.builder-cms-review-and-write-gates | source-sync | Review, stage, validate, cancel, and execute Builder CMS source writes
|
|
27
|
-
| source-sync.builder-documents | source-sync | List, pull, check, and push Builder docs/blog MDX documents
|
|
28
|
-
| source-sync.builder-required-field-materialization | source-sync | Add required Builder publishing fields to a connected collection
|
|
29
|
-
| source-sync.database-source-bindings | source-sync | Attach, inspect, refresh, disconnect, join, and bind database sources
|
|
30
|
-
| source-sync.provider-api-and-staged-datasets | source-sync | Inspect provider APIs and stage/query/delete large provider datasets
|
|
31
|
-
| versions.history-and-restore | versions | Open version history and restore a previous document version
|
|
32
|
-
| workspace.spaces-and-files-catalog | workspace | Provision and
|
|
5
|
+
| ID | Surface | User-visible action | Status | Actions | UI entrypoints | Durable effect | Exception / gap | Reliability risk | Spine priority | Test coverage | Coverage refs | Eval scenarios | Follow-up |
|
|
6
|
+
| -------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | -------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------------------ |
|
|
7
|
+
| comments.threads | comments | List, add, reply, resolve, reopen, and delete comment threads | action-backed | `add-comment`, `delete-comment`, `list-comments`, `update-comment` | `app/components/editor/CommentsSidebar.tsx`, `app/hooks/use-comments.ts` | Comment threads, replies, anchors, mentions, resolution state, and deletion are stored through comment actions. | - | - | P0 | seeded | - | - | - |
|
|
8
|
+
| database.form-submissions | database | Submit public database forms as new rows | action-backed | `submit-content-database-form` | `app/components/editor/database/FormView.tsx` | A validated form submission atomically creates a database row document and its editable property values. | - | - | P0 | covered | `actions/submit-content-database-form.db.test.ts` | - | - |
|
|
9
|
+
| database.lifecycle-and-trash | database | Create, soft-delete, restore, list, and inspect content databases | action-backed | `create-content-database`, `create-inline-content-database`, `delete-content-database`, `get-content-database`, `list-content-databases`, `list-trashed-content-databases`, `restore-content-database` | `app/components/editor/SlashCommandMenu.tsx`, `app/hooks/use-content-database.ts`, `app/hooks/use-documents.ts` | Database pages and database records are created, read, soft-deleted, restored, and listed. | - | - | P0 | covered | `actions/content-database-lifecycle.db.test.ts` | `database-source-scope` | - |
|
|
10
|
+
| database.private-preview-drafts | database | Persist and reconcile a user's private database-page preview draft | action-backed | `get-preview-document-draft`, `update-preview-document-draft` | `app/components/editor/database/DatabaseView.tsx`, `app/hooks/use-documents.ts` | A user's private preview draft is read, saved, conflict-checked, or deleted without changing the shared database page until the normal save flow applies it. | These per-user editor-state actions are intentionally hidden from agent tools because preview drafts are a private UI recovery mechanism. | - | P1 | covered | `actions/preview-document-draft.db.test.ts` | - | - |
|
|
11
|
+
| database.properties-and-view-config | database | Configure properties, values, ordering, and saved views | action-backed | `configure-document-property`, `delete-document-property`, `duplicate-document-property`, `get-content-database-personal-view`, `list-document-properties`, `reorder-document-property`, `set-document-property`, `update-content-database-personal-view`, `update-content-database-view` | `app/components/editor/DocumentProperties.tsx`, `app/components/editor/DocumentDatabase.tsx`, `app/components/editor/database/DatabaseView.tsx`, `app/hooks/use-document-properties.ts` | Property schemas, property values, property order, filters, sorts, grouping, hidden columns, view type, and view settings are stored. | - | - | P0 | covered | `actions/bind-content-database-source-field.db.test.ts`, `actions/content-database-source-actions.test.ts`, `actions/resync-content-database-source.db.test.ts` | `database-source-scope` | - |
|
|
12
|
+
| database.rows | database | Add, duplicate, move, open, and delete database rows | action-backed | `add-database-item`, `delete-database-items`, `delete-document`, `duplicate-database-items`, `duplicate-database-item`, `move-database-item`, `set-document-property` | `app/components/editor/DocumentDatabase.tsx`, `app/components/editor/database/DatabaseView.tsx` | Database row backing documents and row ordering are created, duplicated, moved, edited, and deleted. | - | - | P0 | covered | `actions/database-row-batch-actions.db.test.ts`, `parity/__tests__/database-row-batch-reliability.test.ts` | `database-bulk-row-reliability` | - |
|
|
13
|
+
| editor.agent-assist-prompts | editor | Ask AI from slash generation or comment context | client-assist | - | `app/components/editor/SlashCommandMenu.tsx`, `app/components/editor/CommentsSidebar.tsx` | No direct durable mutation; the prompt asks the agent to use document actions when it decides to write. | - | - | P1 | none | - | - | - |
|
|
14
|
+
| editor.client-formatting-and-insertions | editor | Rich text formatting, selection state, slash block insertion, and copy actions | client-only-ephemeral | - | `app/components/editor/BubbleToolbar.tsx`, `app/components/editor/SlashCommandMenu.tsx`, `app/components/editor/DocumentToolbar.tsx` | - | - | - | P1 | none | - | - | - |
|
|
15
|
+
| editor.document-body-and-title | editor | Edit document title, body, icon, image alt text, and precise text | action-backed | `edit-document`, `pull-document`, `set-image-alt-text`, `transcribe-media`, `update-document` | `app/components/editor/DocumentEditor.tsx`, `app/components/editor/DocumentDatabase.tsx`, `app/components/editor/extensions/ImageBlock.tsx`, `app/components/editor/SlashCommandMenu.tsx` | Document content, title, icon, image metadata, and text replacements are saved to the same document source. | - | - | P0 | covered | `actions/content-database-lifecycle.db.test.ts`, `actions/_local-file-documents.test.ts` | `document-search-edit` | - |
|
|
16
|
+
| local-files.components-workspace | local-files | Register, list, and write local MDX component workspaces | host-only | `list-local-component-files`, `register-local-component-workspace`, `write-local-component-file` | `app/routes/_app.local-files.tsx`, `actions/register-local-component-workspace.ts`, `actions/list-local-component-files.ts`, `actions/write-local-component-file.ts` | Trusted local component workspace registration and component file reads/writes support local MDX previews. | Workspace registration depends on a trusted Desktop folder path and is intentionally hidden with agentTool: false. | - | P1 | seeded | - | - | Local folder exception/docs PR |
|
|
17
|
+
| local-files.host-folder-handles | local-files | Choose, persist, remove, and write trusted local folder handles | host-only | - | `app/routes/_app.local-files.tsx` | Host directory handles and browser/Desktop write permissions are managed outside SQL action state. | Mounted local folders require browser/Desktop host handles that agents cannot safely or portably hold as normal tools. | - | P0 | none | - | - | Local folder exception/docs PR |
|
|
18
|
+
| local-files.import-export-mounted-folder | local-files | Import, check, export, push, and remove local folder source files | action-backed | `connect-local-folder-source`, `disconnect-local-folder-source`, `export-content-source`, `import-content-source`, `remove-local-file-source`, `resolve-local-folder-conflict`, `sync-local-folder-source`, `sync-manifest-local-folder-source` | `app/routes/_app.local-files.tsx`, `actions/import-content-source.ts`, `actions/export-content-source.ts` | Local Markdown/MDX source files are imported into Content documents, editable Content documents are exported back to source-friendly files, and imported source entries can be removed without deleting files on disk. | - | - | P0 | covered | `actions/_local-file-documents.test.ts`, `actions/local-folder-source.db.test.ts` | `local-file-source-truth` | - |
|
|
19
|
+
| notion.route-backed-document-sync | source-sync | Notion document sync status, link, unlink, pull, push, resolve, create, search, and disconnect | action-backed | `connect-notion-status`, `create-and-link-notion-page`, `disconnect-notion`, `link-notion-page`, `list-notion-links`, `pull-notion-page`, `push-notion-page`, `refresh-notion-sync-status`, `resolve-notion-sync-conflict`, `search-notion-pages`, `sync-notion-comments`, `unlink-notion-page` | `app/hooks/use-notion.ts`, `app/components/editor/DocumentToolbar.tsx`, `app/components/editor/NotionSyncBar.tsx`, `app/components/editor/DocumentEditor.tsx` | Notion connection state, page search, link metadata, and local/remote document body sync state are read or mutated through Content actions. | Notion OAuth auth-url and callback routes remain route-shaped because they initiate and receive browser redirects rather than normal app data mutations. | - | P0 | covered | `parity/__tests__/matrix-route-gap-classify.test.ts` | - | - |
|
|
20
|
+
| sharing.document-discoverability-and-export | sharing | Share, hide from search, export, and reveal documents | action-backed | `export-document`, `reveal-local-source-file`, `set-document-discoverability`, `share-local-file-document` | `app/components/editor/DocumentToolbar.tsx`, `app/hooks/use-documents.ts` | Search discoverability, shareable copies, exports, and OS reveal requests are managed through Content actions. | - | - | P0 | covered | `actions/_local-file-documents.test.ts` | `local-file-source-truth` | - |
|
|
21
|
+
| sharing.os-reveal-local-source | sharing | Reveal a local source file in the system file manager | host-only | `reveal-local-source-file` | `app/components/editor/DocumentToolbar.tsx`, `actions/reveal-local-source-file.ts` | - | OS reveal depends on trusted local host capabilities and should not spend agent tool surface or imply portable hosted behavior. | - | P2 | seeded | - | - | Local folder exception/docs PR |
|
|
22
|
+
| sidebar.chrome-state | sidebar | Collapse sections and resize the sidebar | client-only-ephemeral | - | `app/components/sidebar/DocumentSidebar.tsx`, `app/components/layout/Layout.tsx` | - | - | - | P2 | none | - | - | - |
|
|
23
|
+
| sidebar.document-tree-crud | sidebar | Create, delete, move, favorite, list, search, and open pages | action-backed | `create-document`, `clone-creative-context-document`, `delete-document`, `get-document`, `list-documents`, `move-document`, `search-documents`, `update-document` | `app/components/sidebar/DocumentSidebar.tsx`, `app/components/sidebar/DocumentTreeItem.tsx`, `app/hooks/use-documents.ts` | Document tree rows and document metadata are created, updated, deleted, moved, searched, or read. | - | - | P0 | covered | `actions/content-database-lifecycle.db.test.ts`, `actions/_local-file-documents.test.ts` | `document-search-edit` | - |
|
|
24
|
+
| sidebar.navigation-and-screen-context | sidebar | Navigate between documents and expose current screen context | action-equivalent | `navigate`, `view-screen` | `app/components/sidebar/DocumentSidebar.tsx`, `actions/navigate.ts`, `actions/view-screen.ts` | Application navigation state is updated or read so the agent can reason about the user's current page/view. | Human navigation is router-local, while agent navigation/screen inspection uses application-state actions to produce the same workspace orientation effect. | - | P1 | seeded | - | - | - |
|
|
25
|
+
| source-sync.builder-body-hydration-worker | source-sync | Process queued Builder CMS body hydration work | action-backed | `process-builder-body-hydration` | `app/components/editor/DocumentEditor.tsx`, `app/components/editor/database/DatabaseView.tsx`, `app/hooks/use-content-database.ts` | Queued Builder body hydration entries are processed into readable Content document/database body state. | This action is intentionally hidden from the model with agentTool: false because it is an internal bounded queue worker; agents should use source refresh, review, and execution actions rather than manually driving hydration internals. | - | P0 | covered | `actions/_database-source-utils.test.ts` | - | - |
|
|
26
|
+
| source-sync.builder-cms-review-and-write-gates | source-sync | Review, stage, validate, cancel, and execute Builder CMS source writes | action-backed | `cancel-prepared-builder-source-update`, `execute-builder-source-batch`, `execute-builder-source-execution`, `prepare-builder-source-execution`, `prepare-builder-source-review`, `preview-builder-source-review`, `review-content-database-source-change-set`, `set-content-database-source-write-mode`, `stage-builder-source-bulk-update`, `stage-builder-revision`, `validate-builder-source-execution` | `app/components/editor/DocumentDatabase.tsx`, `app/components/editor/database/DatabaseView.tsx`, `app/components/editor/database-sources/BuilderSourceReviewDialog.tsx` | Builder source write mode, staged reviews, pre-dispatch cancellations, validation records, and bounded execution records are created through guarded actions. | - | - | P0 | covered | `actions/builder-source-review-gates.db.test.ts`, `actions/cancel-prepared-builder-source-update.db.test.ts`, `actions/execute-builder-source-execution.test.ts`, `actions/stage-builder-source-bulk-update.db.test.ts` | `builder-source-review-readonly` | - |
|
|
27
|
+
| source-sync.builder-documents | source-sync | List, pull, check, and push Builder docs/blog MDX documents | action-backed | `check-builder-doc`, `list-builder-docs`, `pull-builder-doc`, `push-builder-doc` | `actions/list-builder-docs.ts`, `actions/pull-builder-doc.ts`, `actions/check-builder-doc.ts`, `actions/push-builder-doc.ts` | Builder docs/blog entries can be read into Content, checked locally, and pushed through guarded Builder document actions. | - | - | P1 | seeded | - | - | - |
|
|
28
|
+
| source-sync.builder-required-field-materialization | source-sync | Add required Builder publishing fields to a connected collection | action-backed | `materialize-builder-required-fields` | `app/components/editor/database/DatabaseView.tsx`, `app/hooks/use-content-database.ts` | Required Builder fields are materialized as editable Content properties in one local mutation. | This bounded safe-model setup action is intentionally hidden from the agent tool list; the visible source settings surface invokes it. | - | P1 | covered | `actions/materialize-builder-required-fields.test.ts` | - | - |
|
|
29
|
+
| source-sync.database-source-bindings | source-sync | Attach, inspect, refresh, disconnect, join, and bind database sources | action-backed | `add-content-database-source-field-property`, `attach-content-database-source`, `bind-content-database-source-field`, `change-content-database-source-role`, `disconnect-content-database-source`, `get-content-database-source`, `list-builder-cms-models`, `list-notion-database-sources`, `refresh-content-database-source`, `suggest-source-join-key` | `app/components/editor/DocumentDatabase.tsx`, `app/components/editor/DocumentProperties.tsx`, `app/components/editor/database/DatabaseView.tsx`, `app/hooks/use-content-database.ts` | Mounted database source metadata, fields, source role, join keys, and source-field/property bindings are stored and refreshed. | - | - | P0 | covered | `actions/bind-content-database-source-field.db.test.ts`, `actions/content-database-source-actions.test.ts`, `actions/resync-content-database-source.db.test.ts` | `database-source-scope` | - |
|
|
30
|
+
| source-sync.provider-api-and-staged-datasets | source-sync | Inspect provider APIs and stage/query/delete large provider datasets | action-backed | `delete-staged-dataset`, `list-staged-datasets`, `provider-api-catalog`, `provider-api-docs`, `provider-api-request`, `query-staged-dataset` | `actions/provider-api-catalog.ts`, `actions/provider-api-docs.ts`, `actions/provider-api-request.ts`, `actions/query-staged-dataset.ts` | Provider API metadata and staged dataset scratch storage support scoped agent/source analysis. | - | - | P1 | seeded | - | - | - |
|
|
31
|
+
| versions.history-and-restore | versions | Open version history and restore a previous document version | action-backed | `list-document-versions`, `restore-document-version` | `app/components/editor/VersionHistoryPanel.tsx`, `app/hooks/use-document-versions.ts` | Document versions are listed and selected versions can restore the document while snapshotting current state. | - | - | P0 | seeded | - | - | - |
|
|
32
|
+
| workspace.spaces-and-files-catalog | workspace | Provision, navigate, and delete Content spaces through Files and Workspaces with personal expansion state | action-backed | `backfill-content-files`, `create-content-space`, `delete-content-space`, `ensure-content-spaces`, `get-content-sidebar-state`, `list-content-spaces`, `update-content-sidebar-state` | `app/components/sidebar/DocumentSidebar.tsx`, `app/hooks/use-content-spaces.ts` | Personal and organization spaces, user-created workspaces, their canonical Files databases, the personal Workspaces catalog, and each user's sidebar expansion state are stored and reconciled in SQL; deleting a user-created workspace atomically removes its catalog row and contents. | - | - | P0 | covered | `actions/content-spaces.db.test.ts`, `actions/content-files.db.test.ts`, `actions/content-sidebar-state.test.ts` | - | - |
|
|
@@ -39,20 +39,25 @@ export const parityMatrix: ParityRow[] = [
|
|
|
39
39
|
{
|
|
40
40
|
id: "workspace.spaces-and-files-catalog",
|
|
41
41
|
surface: "workspace",
|
|
42
|
-
label:
|
|
42
|
+
label:
|
|
43
|
+
"Provision, navigate, and delete Content spaces through Files and Workspaces with personal expansion state",
|
|
43
44
|
uiEntrypoints: [
|
|
44
45
|
"app/components/sidebar/DocumentSidebar.tsx",
|
|
45
46
|
"app/hooks/use-content-spaces.ts",
|
|
46
47
|
],
|
|
47
48
|
durableEffect:
|
|
48
|
-
"Personal and organization spaces, their canonical Files databases,
|
|
49
|
+
"Personal and organization spaces, user-created workspaces, their canonical Files databases, the personal Workspaces catalog, and each user's sidebar expansion state are stored and reconciled in SQL; deleting a user-created workspace atomically removes its catalog row and contents.",
|
|
49
50
|
uiImplementation:
|
|
50
51
|
"The app sidebar calls the shared space actions and renders the selected Files database through a saved sidebar view.",
|
|
51
52
|
status: "action-backed",
|
|
52
53
|
actions: [
|
|
53
54
|
"backfill-content-files",
|
|
55
|
+
"create-content-space",
|
|
56
|
+
"delete-content-space",
|
|
54
57
|
"ensure-content-spaces",
|
|
58
|
+
"get-content-sidebar-state",
|
|
55
59
|
"list-content-spaces",
|
|
60
|
+
"update-content-sidebar-state",
|
|
56
61
|
],
|
|
57
62
|
exception: null,
|
|
58
63
|
reliabilityRisk: "none",
|
|
@@ -62,6 +67,7 @@ export const parityMatrix: ParityRow[] = [
|
|
|
62
67
|
coverageRefs: [
|
|
63
68
|
"actions/content-spaces.db.test.ts",
|
|
64
69
|
"actions/content-files.db.test.ts",
|
|
70
|
+
"actions/content-sidebar-state.test.ts",
|
|
65
71
|
],
|
|
66
72
|
},
|
|
67
73
|
{
|
|
@@ -17,6 +17,7 @@ registerShareableResource({
|
|
|
17
17
|
displayName: "Document",
|
|
18
18
|
titleColumn: "title",
|
|
19
19
|
getResourcePath: (document) => `/page/${document.id}`,
|
|
20
|
+
ownerAccessIgnoresOrg: true,
|
|
20
21
|
agentReadable: {
|
|
21
22
|
resourceKind: DOCUMENT_AGENT_RESOURCE_KIND,
|
|
22
23
|
getContextPath: () => DOCUMENT_AGENT_CONTEXT_ENDPOINT,
|
|
@@ -202,6 +202,7 @@ export const documentPropertyDefinitions = table(
|
|
|
202
202
|
ownerEmail: text("owner_email").notNull().default("local@localhost"),
|
|
203
203
|
orgId: text("org_id"),
|
|
204
204
|
databaseId: text("database_id"),
|
|
205
|
+
systemRole: text("system_role"),
|
|
205
206
|
name: text("name").notNull(),
|
|
206
207
|
type: text("type").notNull(),
|
|
207
208
|
description: text("description").notNull().default(""),
|
|
@@ -211,6 +212,12 @@ export const documentPropertyDefinitions = table(
|
|
|
211
212
|
createdAt: text("created_at").notNull().default(now()),
|
|
212
213
|
updatedAt: text("updated_at").notNull().default(now()),
|
|
213
214
|
},
|
|
215
|
+
(property) => [
|
|
216
|
+
uniqueIndex("document_property_definitions_database_system_role_unique").on(
|
|
217
|
+
property.databaseId,
|
|
218
|
+
property.systemRole,
|
|
219
|
+
),
|
|
220
|
+
],
|
|
214
221
|
);
|
|
215
222
|
|
|
216
223
|
export const contentDatabases = table(
|
|
@@ -226,6 +233,9 @@ export const contentDatabases = table(
|
|
|
226
233
|
title: text("title").notNull().default("Untitled database"),
|
|
227
234
|
systemRole: text("system_role"),
|
|
228
235
|
viewConfigJson: text("view_config_json").notNull().default("{}"),
|
|
236
|
+
filesSystemPropertiesSeeded: integer("files_system_properties_seeded")
|
|
237
|
+
.notNull()
|
|
238
|
+
.default(0),
|
|
229
239
|
// Single source of truth for the primary "Content" Blocks field — the one
|
|
230
240
|
// backed by `documents.content`. A DB-enforced single-primary invariant: at
|
|
231
241
|
// most one property id lives here, so two concurrent seeds can never produce
|
|
@@ -24,9 +24,13 @@ export function parseDocumentHideFromSearch(
|
|
|
24
24
|
return parseDocumentFavorite(value);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export function documentDiscoveryFilter(
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
export function documentDiscoveryFilter(options?: {
|
|
28
|
+
userEmail?: string | null;
|
|
29
|
+
orgIds?: string[];
|
|
30
|
+
}): SQL {
|
|
31
|
+
const userEmail = options?.userEmail ?? getRequestUserEmail();
|
|
32
|
+
const orgIds =
|
|
33
|
+
options?.orgIds ?? (getRequestOrgId() ? [getRequestOrgId() as string] : []);
|
|
30
34
|
const clauses: SQL[] = [
|
|
31
35
|
eq(schema.documents.hideFromSearch, 0),
|
|
32
36
|
sql`${schema.documents.hideFromSearch} IS NULL`,
|
|
@@ -41,11 +45,12 @@ export function documentDiscoveryFilter(): SQL {
|
|
|
41
45
|
and ${schema.documentShares.principalId} = ${userEmail})`);
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
for (const orgId of orgIds) {
|
|
49
|
+
clauses.push(eq(schema.documents.orgId, orgId));
|
|
45
50
|
clauses.push(sql`exists (select 1 from ${schema.documentShares}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
where ${schema.documentShares.resourceId} = ${schema.documents.id}
|
|
52
|
+
and ${schema.documentShares.principalType} = 'org'
|
|
53
|
+
and ${schema.documentShares.principalId} = ${orgId})`);
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
return or(...clauses) ?? sql`1=0`;
|