Read one refinement whole
The whole row: its text, its citations, the authored script IN FULL where there is one, and the append-only log of everything that has happened to it. The log is what answers “who taught narya this and who took it away” — nothing in it is ever rewritten.
Authorizations
Enforced on every transport, with no exempt operation. A person's request — over the default local unix socket exactly as over a TCP listener — must carry a JWT issued by the configured identity provider, which the host verifies itself against that issuer's key set: signature, issuer, expiry, and the person and organisation it names. Requests without a valid one receive 401 NRY-0011. The socket's file permissions are transport and are not an authorisation.
Path Parameters
The refinement's id.
Response
The refinement, with its script and its event log.
One thing the harness learned and a person allowed: a distilled memory, or a skill, agent or command definition the model authored.
The owner is never something a caller names.
script and events are present on getRefinement and absent from the listing. A page carrying every authored program's source is a page nobody can read; the hash is on both, which is what "what was consented to is what runs" is checked against.
What a refinement IS. Four values and no more — one vocabulary is what makes "everything this repository taught narya" one question.
memory, skill, agent, command How far a refinement reaches. repository is keyed on the canonical checkout path, the same key a trust answer uses; global is the owner's.
There is no session here and the absence is a decision: a session-scoped fact lives exactly as long as the conversation that gave it, so it is never a stored row at all.
repository, global Whose learning this is.
200The fact's text, or the definition's prompt or description.
Where a refinement stands. pending is proposed and nothing else — never rendered, never executed, never on a ladder. active is consented and firing. rolled-back is kept for the record.
unverifiable is the one that surprises: such a fact is STILL FIRING and says so. Every session it cited has been purged, which is a person deleting a transcript rather than a person retracting a belief.
pending, active, rolled-back, unverifiable Which road a refinement came in on: narya's own review of a conversation, a client teaching it through this contract, or an import. Both roads land pending and pass the same consent.
loop, api, import How many turns this has fired into.
x >= 0The canonical checkout path, absent at the owner's global scope.
The ladder identity of the three definition kinds, absent on a memory.
128The program the model wrote, IN FULL — never a digest and never a path. A person cannot consent to what they were not shown, and what they consented to is what the confined runtime later runs, byte for byte. Present on getRefinement only.
The hash of that program, on the listing as well as the read. It is what the runtime checks the text against before running it.
^[0-9a-f]{64}$The conversation this was learned from. It may name a session that has since been purged, which is what unverifiable reads from.
The turn this was learned in.
Who was acting when this came in over the contract.
The turns this stands on, in the order they were written.
Everything that has happened to this refinement, newest first. Present on getRefinement only.
When a person consented. Absent while pending.
When this last fired into a prompt. It is what eviction is ordered by — a fact that fires often is a fact that earned its place — and it is deliberately never rewound by a rollback.
The row that replaced this one, if any.

