The four movements
sync resource → catalog pull references inanalyze content → understanding per item, by kindsearch catalog → you one index across everythingexport catalog → resource bytes back outAll four are reachable over /mcp and over /graphql.
Resource#sync! claims the resource, starts a Run, and enqueues SyncResourceJob.
The job iterates each_page on the resource and records a Reference per object. No bytes
move. Eight of the ten types sync: six implement each_page and Caldav and Carddav
inherit it from Webdav. See
Resources.
app/models/resource.rb, app/jobs/sync_resource_job.rb · Sync a resource
analyze
Section titled “analyze”Analyzer.for(item) picks the first of twelve analyzers whose handles? returns true, then runs
its steps. Steps record started_at, finished_at and either result or error under
reference.analysis["steps"].
app/analyzers/ · Analysis
search
Section titled “search”Item.search asks SearchIndex for ids and reloads them from Postgres in index order. OpenSearch
is the query path; Postgres is the system of record.
app/models/search_index.rb · Search the catalog
export
Section titled “export”ExportItemsJob iterates the items a selector matches and copies each one’s bytes into a storage
resource, recording the copy as another Reference on the same item.
app/jobs/export_items_job.rb · Export items back out
Sync and export are one form
Section titled “Sync and export are one form”The same shape with source and destination swapped, and cataloguing as an independent flag. Four combinations follow:
| source | destination | catalogued | is |
|---|---|---|---|
| a resource | — | ✓ | ingest — references only |
| a resource | a storage resource | — | backup |
| a resource | default storage | ✓ | ingest + materialize |
| items matching a selector | a storage resource | — | export |