Skip to main content
POST
Narrow a fact to one checkout

Autorizações

Authorization
string
header
obrigatório

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.

Parâmetros de caminho

refinementId
string<uuid>
obrigatório

The refinement's id.

Corpo

application/json

Where a narrowing leaves the fact. The ledger keeps exactly two scopes, so a demotion has nothing to say except which checkout the fact keeps applying in — and it has to say that, because a narrowing to nowhere would leave the row where it was with nothing reported.

repository
string
obrigatório

The checkout the fact keeps applying in, canonicalised by the host the same way a trust answer's path is. "" IS NOT A NARROWING TO THE OWNER'S GLOBAL SCOPE by another spelling, and the host refuses it with a 422 rather than reading it as one — as it refuses anything else that canonicalises to nothing. Required and non-empty are one statement here: the only thing a demotion can be missing is its destination, and a row silently left where it was is the write nobody asked for.

Minimum string length: 1

Resposta

The refinement, as the narrowing left it.

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.

id
string<uuid>
obrigatório
kind
enum<string>
obrigatório

What a refinement IS. Four values and no more — one vocabulary is what makes "everything this repository taught narya" one question.

Opções disponíveis:
memory,
skill,
agent,
command
scope
enum<string>
obrigatório

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.

Opções disponíveis:
repository,
global
owner
string
obrigatório

Whose learning this is.

title
string
obrigatório
Maximum string length: 200
body
string
obrigatório

The fact's text, or the definition's prompt or description.

state
enum<string>
obrigatório

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.

Opções disponíveis:
pending,
active,
rolled-back,
unverifiable
origin
enum<string>
obrigatório

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.

Opções disponíveis:
loop,
api,
import
createdAt
string<date-time>
obrigatório
hits
integer<int32>
obrigatório

How many turns this has fired into.

Intervalo obrigatório: x >= 0
repository
string

The canonical checkout path, absent at the owner's global scope.

name
string

The ladder identity of the three definition kinds, absent on a memory.

Maximum string length: 128
script
string

The 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.

scriptSha256
string

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.

Pattern: ^[0-9a-f]{64}$
originSessionId
string

The conversation this was learned from. It may name a session that has since been purged, which is what unverifiable reads from.

originEntryId
string

The turn this was learned in.

originActor
string

Who was acting when this came in over the contract.

citations
object[]

The turns this stands on, in the order they were written.

events
object[]

Everything that has happened to this refinement, newest first. Present on getRefinement only.

activatedAt
string<date-time>

When a person consented. Absent while pending.

lastUsedAt
string<date-time>

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.

supersededBy
string<uuid>

The row that replaced this one, if any.