Oko/Docs

Command reference

oko rulings check

The gate every channel runs before a text reaches the operator — a session's final answer, a Slack reply, a message composed on Oko Desktop — the same comparison `oko asks ask` makes before it writes an ask. The text is compared with what he already said: every standing ruling in the rulings register, in his words with where and when he said it, and every rule the task ledger holds from his messages in every harness. Brama compares; when Brama gives no comparison, no comparison is never a pass: the text goes out only once the sending session's own model says how it differs from what he said.

Invocation#

Command
oko rulings check --from WHO --text TEXT [--differs TEXT] [--json]

Inputs and options#

  • --from names who would send the text (a session or a product); --text is the text as it would reach him.
  • --differs is the sending session's own answer of how the text differs from each statement that bears on it, by its id, after reading the file a held check names. It stands only when Brama gave no comparison; a text Brama finds settled is refused whatever it says.
  • Example: `oko rulings check --from 01a1… --text 'Please sign in to the gateway by hand'`.

Output and state effect#

  • Exit 0 means the text may go: prints `may go: <note>` naming who compared it, or with --json `{from, mayGo: true, compared}`: `Compared with what the operator already said by Brama: nothing he decided stands against it`, or `Compared with what the operator already said by the asking session's own model, since Brama gave no comparison (<cause>): <the --differs text>`, or null (and `may go: the operator decided nothing yet to compare it with`) when no ruling or rule exists. Reads the rulings register and the task ledger; asks Brama.
  • A held text writes `{proposal, cause, said: {rulings: [{id, said, session, ordinal, saidAt}], rules, unread}}` to `ask-comparisons/<sha256 of the proposal>.json` in Oko's folder (`OKO_ASK_COMPARISONS` names another directory), the file the sending session reads before it answers with --differs.

Refusals and safe exits#

  • `oko rulings check: "<time>" is a UTC time outside brackets, and the operator reads times in his zone: write it as <date> <hh:mm> <zone abbreviation>, with UTC at most in brackets; nothing reached the operator` (exit 1) when the text carries a date and time ending in Z or +00:00, or a clock time followed by Z or UTC, outside ( ) or [ ]; a clock time without a date is read on the current UTC date. With no zone declared the same text is refused with `the operator's time zone is not declared in his Oko profile; …` (`oko person zone set`). `oko asks ask` refuses the same way. Real test: `tests/no-model/zone.rs`.
  • `oko rulings check would ask the operator again what he already decided in ruling <id> (<session> #<n>, <time>): "<his words>"; <cause>; nothing reached the operator` and `oko rulings check would revisit the operator's standing decision in <session> #<n> (<time>): "<his words>"; <cause>; nothing reached the operator` when Brama cites what he said; `oko rulings check: what the operator already said did not resolve this: <cause>; nothing reached the operator` when Brama is uncertain (exit 1).
  • `oko rulings check: Brama gave no comparison with what the operator already said (<cause>), and no comparison is never a pass: his <n> standing rulings and <m> rules are in <path>; read them, and run it again with --differs saying how this differs from each one that bears on it, by its id, or do not put to him what he already answered; nothing reached the operator` (exit 1) when Brama is held, does not answer, answers unreadably or cites nothing the registers hold, or when the rulings register or the task ledger cannot be read (the cause names which).
  • `oko rulings check requires --from <text>` and the same for --text (exit 2); `oko rulings check does not take <flags>; it takes --from, --text, --differs, --json` (exit 2). Real test: `tests/no-model/settled.rs` (`cargo test --test no-model-settled`).

CLI reference#