Docs/Reference

Reference

What the operator already knows

block-known-to-operator is a Stop gate that refuses a final message telling the operator what he already knows: what this session already told him, or what he himself decided — a refusal from his own hooks, a limit he set, a rule he stated — handed back to him as a blocker, a limitation, a reason the work stopped, or as news.

block-known-to-operator is a Stop gate that refuses a final message telling the operator what he already knows: what this session already told him, or what he himself decided — a refusal from his own hooks, a limit he set, a rule he stated — handed back to him as a blocker, a limitation, a reason the work stopped, or as news.

#Why it exists

A refusal from the machine's own gates (one-off repairs), a build ration the operator set, or a rule he stated is his own decision, and a fact the session already told him is known to him. An answer that hands either back to him as a blocker, a limitation or news gives him nothing: the operator's rule is that a model should not provide the user information that was already communicated or that he decidedly asked for. block-repeated-blocker reads only Oko's defect register; this gate reads what the session told him and what he decided.

#How it decides

Shape cannot decide this — whether a sentence restates an earlier answer, or reports the operator's own decision back to him, is a reading of two texts against a third — so the decider is a model, asked through Brama by the product's one route for that, model_judgement::choose (oko gateway object). The session is the memory. The gate reads the live transcript the stop payload names, or the newest transcript of the payload's session id, and puts three texts in front of the model: every message the operator wrote this session, every earlier answer the agent gave him, and the answer about to be sent. The model answers one object under a strict JSON Schema: a choice of PASS or BLOCK, and a reason that, for BLOCK, quotes each offending sentence verbatim with one clause saying whether it was told before or is his own decision. An answer that is neither option is no judgement.

#What is refused

Sentence of the answerVerdict
Tells him in substance what an earlier answer of this session already told him — the same fact, failure, refusal or explanation, reworded or repeated Refused: what this session already told him is not news.
Reports back to him something he decided, asked for or installed — a refusal by his own hooks, gates or policy, a limit, quota or ration he set, a rule he stated, a choice he made — as a blocker, a limitation, a reason the work stopped, or as news Refused: what he decided is his intention, not the session's obstacle, and never needs telling.

The refusal is one {"decision":"block"} document on stdout. It names the gate, quotes the sentences the model named, quotes his rule verbatim, and says: A gate of his that refused you is his decision, not your blocker; what this session already told him is not news. Delete those sentences and answer with the work.

#What passes

The results of the work he asked for. A direct answer to a question he asked. A defect identifier named in one clause. A failure outside his own decisions that no earlier answer mentioned. A sentence that only names what he must do or decide next, without explaining his own policy to him. A turn under stop_hook_active.

A session with no operator words and no earlier answer has nothing to be known yet: the model is not asked and the turn passes at no cost. A judgement nobody could obtain is never a denial: a judge Oko has recorded as not answering (judge-health.json, lifted by oko tasks judge --probe) is not asked at all, and an absent Oko CLI, a refused gateway or an empty reply is written to stderr as block-known-to-operator: no judgement: … and the turn passes. That is this stop gate's own rule; a shell or write gate refuses an unanswered question instead (asking a model). The OMP adapter's whole-event wait (hook-model) is the only limit on how long its question may take. A transcript the gate cannot read, or one holding a complete line that is no record, is not a missing judgement: it refuses with block-known-to-operator: TAMA_HOOK_INFRASTRUCTURE: the session transcript <path> cannot be read: …, the cause naming the byte the damaged line starts at, since what that line said would otherwise be judged as never said. A last line the harness is still writing is set aside.

#While work is open

The model judgement above passes everything while the judge is down, and the obstacles an agent likes to report — the judge itself, a Stado release, a build the operator has not allowed yet — are exactly the ones he already ruled on. So block-repeated-blocker holds one rule that needs no judge: while Oko holds any open task of any session or any open defect of any product, the answer's Blokady (Blockers) section and its Następne kroki (Next steps) section must say brak (none). Anything else is refused with the count of open items and the instruction to take the next one, repair it and push the repair. The rule reads the two sections, not their words, so no rewording passes it. Open work is read the way block-stop-with-open-work reads it; an Oko that cannot be read refuses nothing here, because that gate already refuses the stop. Source: rust/crates/tama-hook-tools/src/ports/block_repeated_blocker/while_open.rs.

#Items he already ruled on

The model judgement passes everything while no model answers, and the item agents retell most is exactly one he ruled on. block-ruled-subject-retold needs no model: it reads Oko's ruling register (oko rulings; the file Oko keeps, or the one OKO_RULING_REGISTER names), finds every task identity (task- and hex) and defect id, whole or in the eight-character form oko defects list prints, that the final message names, and refuses when a ruling stands on one of them: BLOCKED: this answer names what the operator already ruled on, so it tells him again what he decided. His rulings: - <id> (<session> #<n>): «<his words>» …. The answer acts on the ruling instead of reporting the item. A register that does not exist holds no ruling; one that cannot be read is refused by name. Source: rust/crates/tama-hook-tools/src/assignment/rulings.rs (retold) and rust/crates/tama-hook-tools/src/programs/block/completion/block_ruled_subject_retold.rs; declaration: hook-declarations/answer-discipline/repetition/block-ruled-subject-retold.json.

#A blocker is a record every session shares

Once no work is open, the blockers and next-steps parts may hold items again, and each must be the object every session reads: a record of Oko's blocker register (oko blockers record, which Oko refuses when it waits on a decision or a consent). block-blocker-without-record needs no model: the parts are the last two of the communication contract's three headed parts, found by the answer's headings and their order, and every bullet or paragraph there must name an open record by its id, the eight characters oko blockers list prints or the whole UUID. An item naming none, or naming only records that are no longer open, is refused: BLOCKED: every item of the blockers and next-steps parts must name an open record of Oko's blocker register by its id … - "<item>" names no blocker record. A part of one word, the contract's none, passes, and an answer without the three headed parts is not read. The register is read with oko blockers list --json; a register that cannot be read refuses the answer by name. Source: rust/crates/tama-hook-tools/src/ports/block_blocker_without_record/mod.rs; declaration: hook-declarations/answer-discipline/blockers/block-blocker-without-record.json.

#Where the refusal comes from

Source: rust/crates/tama-hook-tools/src/ports/block_known_to_operator/mod.rs (the judgement) and rust/crates/tama-hook-tools/src/ports/block_known_to_operator/session.rs (the transcript reading); program: rust/crates/tama-hook-tools/src/programs/block/completion/block_known_to_operator.rs; the declaration: hook-declarations/answer-discipline/block-known-to-operator.json. Declared with DEVICE_HOOK_EDIT_APPROVED=1 tama hooks declare --file <declaration> and installed with DEVICE_HOOK_EDIT_APPROVED=1 tama hooks release; which hooks this machine runs is decided by tama enforcement only <hook-id>…, which has to be run outside an agent session.

The real journey tests/known-to-operator/gate.rs runs the built gate with the stop payload a harness hands it and a transcript of its own: a transcript with a damaged line refuses naming the transcript, and a session that has said nothing is not asked about. Its two judged cases ask the real judge through this machine's Brama route and run with --ignored: an answer repeating what an earlier answer told is refused quoting it, and an answer reporting new results passes; each fails when the judge did not answer.