The four movements
sync resource → catalog pull references inanalyze content → understanding per thing, 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 ThingReference 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(thing) 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”Thing.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”ExportThingsJob iterates the things a selector matches and copies each one’s bytes into a storage
resource, recording the copy as another ThingReference on the same thing.
app/jobs/export_things_job.rb · Export things 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 |
| things matching a selector | a storage resource | — | export |