Skip to content

The four movements

sync resource → catalog pull references in
analyze content → understanding per item, by kind
search catalog → you one index across everything
export catalog → resource bytes back out

All 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

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

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

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

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