Skip to content

The four movements

sync resource → catalog pull references in
analyze content → understanding per thing, 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 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

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

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

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

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