Ledger rows
links.jsonl contains one JSON object per line. Blank lines are ignored. IDs are unique; malformed rows are reported with line numbers and excluded from reads. Mutations refuse malformed input.
Unknown top-level and origin fields are retained. Lineage stays local; a cloud localReference is bounded and cannot replace it.
Portable single-check artifact
check —source … —target … returnsschema:"linktrail.local-check.v1", result_id, input, checked_at, observation and provenance. The ID is an lr_ SHA-256 digest of normalized input and observation. input has source, target and scope. provenance records execution:“local”, verifier:“linktrail-shared-verifier” and raw_html_included:false.
Each occurrence contains href, targetUrl, anchor and context strings; rel string array; visibility:“not_rendered”; and locator:null or an object with integer line, column and offset. A matching HTML link does not prove rendered visibility.
Evidence requires method, checkerVersion, complete and fetchedAt (timestamp or null). Optional fields are bytes, nullable contentType/etag/lastModified, baseUrl, rendered, sha256, parseErrors and renderEligibility (required or comparison). Optional readiness contains requiresRender, nullable reason and possibleLoginWall, plus optional hasVisiblePassword, targetInScript, emptyAppRoot and emptyProfileRoot booleans.
A robots result requires nullable allowed, reason, matchedRule and crawlDelaySeconds, plus nullable fetched. Optional fields are sourceUrl, robotsUrl, nullable httpStatus, productToken, up to five redirects and retryAfterSeconds. Nullable fields remain unknown when absent evidence cannot support a conclusion.
Adoption validates the portable observation contract, matching source/target/scope, timestamp identity and result identity. Present requires complete evidence and matching occurrences. Absent requires complete evidence and no occurrences. Portable observations cannot include raw HTML, body or headers. The artifact size check is 512 KiB of serialized JSON characters. Use adopt-result to persist it.
Observation mirror and activity state
Observation rows contain id (ledger ID), checked_at, state, reason, occurrences (count), complete, checker_version, source, evidence_key and result. Result contains verifier metadata with raw HTML removed. Deduplication uses ledger ID, checked timestamp and source. Cloud projection rows can carry projection metadata in addition to these fields. The observation mirror records changes; state.json records repeated-check activity. State version 2 holds entries, cursors and cloud mappings. Source and destination cursors remain independent. Preserve unknown state fields and let the CLI own migration; changing a cursor can skip history.Receipt input
receipt add accepts a claim object:actor.role is human or agent. acted_at needs a timezone. Optional ledger must identify a matching placement. Optional intent_after defaults to expected for internal and wanted for external claims. expect, ref, tags and note follow ledger rules. An idempotency replay reuses the original claim only when its placement, kind, scope and acted_at match. A claim remains claimed until independent observations can be read alongside it; receipt history reports that evidence without declaring causation.
Source contracts: cli/ledger.js, cli/local-result.js, cli/mirror.js, cli/state.js and cli/receipts.js.