Skip to main content

How Core uses the packages

Version: V2
View Markdown

How it works​

Core uses published libraries to interpret an atom and decide which providers can enrich it. Its services own HTTP requests, worker leases and the database writes that persist the results. To trace a behavior in a fork, start with the service that handles the input.

Published libraryWhere Core uses it
@0xintuition/atom-runtimeThe atom-services wrapper passes cache settings and the operator’s preset to createAtomServicesProcessingRuntime. The HTTP service and workers can reuse the same classification and enrichment engine composition. Runtime wrapper
@0xintuition/atom-classificationAtom-services imports the default enhancement policy. Its processing handler runs the configured classifier and passes the classification into the enrichment stage. Processing handler
@0xintuition/atom-enrichmentThe same handler calls toClassifiedAtomInput to prepare the provider input. A background enrichment worker uses Core’s shared runtime wrapper and persists results for the claimed atom. Enrichment worker
@0xintuition/iidWorkers call inspectIntuitionId to inspect an identifier. When IID reads are enabled, they also use the published IID registry for classifications and provider hints, and the IID ladder to evaluate identity candidates. Inspection · Registry adapter · Ladder adapter

Find the Core-owned code​

Five private workspaces live under packages/. The database-kg workspace owns graph storage and delegates atom and triple ID derivation to the public IDs library. The database-timescale workspace supplies market read models and query helpers. The contracts workspace adapts published contract artifacts for deployment and indexer integration. The types workspace holds indexing scope configuration and shared type exports. The atom-rules-engine workspace contains standalone presentation rules with no active caller in Core’s runtime. Workspace inventory · Graph ID adapter · Contract artifacts

Check what a build installs​

At this Core commit, 17 of the 21 libraries appear in the root Bun lockfile. It retains the November release: sixteen libraries resolve to 0.1.0, and protocol resolves to 4.0.0. Only the unchanged specification package matches the current documentation pins; the other sixteen resolved libraries predate the December CommonJS release. A frozen Core install keeps those recorded versions. Core lockfile · Current package release.

The four absent libraries are @0xintuition/cli, @0xintuition/periphery, @0xintuition/react and @0xintuition/sdk. Core also resolves the separately versioned contract artifact @0xintuition/contracts-v2@1.1.0-alpha.1. The package versions displayed at the top of this page describe the current library release, not Core's frozen dependency graph.

For a later checkout, compare every registry resolution for each release package in the lockfile’s packages map. Collect the full set of resolved versions per package so that a second version is visible. Count missing packages separately, and set aside local workspace: entries and separately published artifacts. The root and service manifests explain which workspace requested a dependency. The actual imports tell you which service calls it directly. Root manifest · Atom-services manifest · Workers manifest

The Query API, worker and atom-services image builds copy the source tree and install from the root lockfile with bun install --frozen-lockfile --production. A frozen install requires the manifests and recorded dependency graph to agree. API Dockerfile · Worker Dockerfile · Atom-services Dockerfile

To check package behavior in your fork, run these commands from the Core root with Bun and Node 22 or later available.

bun install --frozen-lockfile
bun run test:conformance

The URI suite creates an isolated consumer from the installed dependencies. Node and Bun must produce identical output for nine creation vectors covering atom data and ordered URI contexts. Core checks those results against the committed fixture, including atom IDs and encoded contract calls. The IID tests use published conformance vectors and fixture providers. A pass covers those inputs. Running services, live providers and transaction submission require separate checks. Conformance guide · Consumer and fixtures

Applies to V2 · @0xintuition/atom-runtime 0.1.1 · @0xintuition/atom-classification 0.1.1 · @0xintuition/atom-enrichment 0.1.1 · @0xintuition/iid 0.1.1