Expand description
aspero’s JSON contract: the shapes agents and apps read, shared by the CLI and any other front end so they can’t drift.
Fields are omitted when unknown rather than null; the lean default set
is enough to identify and cite, and full adds everything known. Every
result echoes what it answers (input, a claim’s key), so results can
arrive in any order.
Structs§
- Claim
Input - A claim as an agent would write it, one JSON object per stdin line. Unknown keys are rejected so typos aren’t silently ignored.
- Input
Claim - A claim with the input it came from and the caller’s
key, or why that input isn’t one.
Enums§
- Status
- How a lookup ended, as its item’s
statussays.
Functions§
- candidate
- A scored candidate: confidence, per-field checks, who found it, and the work (with every identifier merged records asserted).
- disagreements
- Where a record contradicts its DOI’s registry:
[{field, value, <registry>: registry_value}]. - input_
lookup - One input’s lookup, with whatever extras were asked for.
- invalid
- An input that isn’t an identifier.
- invalid_
claim - A claim that couldn’t be read, after its echo.
- lookup_
item - One result. Attempts are included when nothing was found (so the caller
sees why) or with
full. - mention
- One mention: where it is, the identifier, and how it was written.
- merged
basewithextra’s fields added (both JSON objects).- set_
abstract - Sets a work’s
abstract(null when none was found) andabstract_source. - usage
- usage_
one - verification
- One verification, after the claim’s echo (input, key, claim).
- work
- One work: lean by default, every known field with
full.