Skip to content

Writers, holders and stewards

A holder is who a belief belongs to. A writer is who sent the request. They are different things: an agent holds a belief, and the service that runs the agent is the writer that states it. The service decides who the writer is, records it on every record, and lets a writer state claims and beliefs only for the holders it speaks for.

Who the writer is

The writer is decided by the service from the connection, never from anything in the request. Nothing in a body or a header names it.

The caller is The writer is
another ankka service, identified by its certificate service:<project>/<name>
a machine registered on an organization, verified by the platform machine:<organization>/<name>
a person arriving through the gateway with a token an accepted issuer signed person:<subject>@<issuer name>
anything, when the service runs outside a cluster local
a caller arriving through the gateway with no token, or one no accepted issuer signed refused with 401

A person's token is verified by ankka's ankka-auth-oidc against the issuers the service lists in ANKKA_AUTH_ISSUERS, as Configuration describes. The subject is the token's sub and the issuer name is the service's own word for the issuer, so the same person signed in through two issuers is two writers. A service that lists no issuer refuses every caller through the gateway, and its writers are the services and machines of the installation. A token sent by a caller that has a connection of its own, another service or a machine, changes nothing: the connection decides.

Outside a cluster there are no certificates, so every caller is the one writer local. That is for a laptop: with a single writer, "speaks for" refuses nobody.

Every record carries its writer and the service returns it when the record is read back. It is not published to the graph.

Speaking for a holder

A writer speaks for a holder when it is one of the holder's writers. The writer who registers a holder is its first, and any of a holder's writers can add another:

curl -s localhost:9000/holders/agent-a/writers -d '{"writer":"service:forecasting/second-agent"}'

Writers are never removed from a holder.

Speaking for a holder is what permits stating a claim as that holder, stating a revision of its belief, and adding a writer to it. A writer that does not is refused with 403 and holder.writer.does-not-speak, and the refusal names the holder:

{
  "rule": "holder.writer.does-not-speak",
  "status": 403,
  "error": "The writer does not speak for the holder 'agent-a'.",
  "names": { "holder": "agent-a", "writer": "service:forecasting/other" }
}

A market's holder is spoken for by the writer who opened the market, so only that writer, and those it adds, can record the market's price observations and resolutions.

What needs no holder

Opening a question, adding a hypothesis, registering a source and recording evidence are open to any writer the service can identify. None of them is a statement of belief: evidence is what was observed, and it belongs to no holder. What a holder makes of it is a claim, and that is where "speaks for" begins.

Stewards

A steward is a writer who may withdraw the text of any record. Stewards are named in the service's configuration, in REASONING_STEWARDS, as whole writer strings separated by commas:

REASONING_STEWARDS=service:compliance/steward,service:ops/console

Without being a steward, a writer may withdraw the text of evidence it recorded itself and of a claim whose holder it speaks for. A steward exists for the case where that writer is gone or will not: text that has to come out still can. A steward can do nothing else that other writers cannot; it does not speak for any holder by being one.

Withdraw text is the request.