source_register
Records a primary source in a journal before ingesting it, deduping by SHA-256 or locator so repeats return the existing ID instead of creating duplicates.
Instructions
Records a primary source BEFORE ingesting it: a Source concept in a journal (default 'sources', map_create kind journal). Dedupes by sha256, else locator: a duplicate returns {id, duplicate: true, ingest_status}, writes nothing, adding locator_mismatch + existing_locator if the locator differs. Never fetches; body is your distillation. Cite its ID in provenance, then concept_patch ingest_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map | No | Ledger journal; default 'sources' | |
| body | No | Distillation: facts, decisions, open questions | |
| title | Yes | ||
| reason | No | Why (commit trailer) | |
| sha256 | No | Lowercase hex SHA-256 of the original bytes | |
| locator | No | URL or {{path:<key>}}, never a raw path | |
| timestamp | No | ||
| source_kind | Yes | ||
| ingest_status | No |