Skip to main content

Crate pointlock_human_cli

Crate pointlock_human_cli 

Source
Expand description

The CLI human channel (06 §4: the cli notification/collection channel): renders pending human requests from the ledger and collects responses through the store’s single-writer arbitration.

This crate is presentation + collection only. It never judges, never writes ledger events itself (submission goes through pointlock_store::Store::submit_human_response, the one arbitration door), and reads request context straight from the humanRequested events — the log is the truth (I1).

Modules§

webhook
The webhook notify-only channel (06 §4.2): the POST payload and its optional HMAC signature. Notify-only by ruling — v0.1’s single-process local architecture has no authenticable inbound HTTP face, so responses NEVER come back this way; collection stays with the cli channel (store-arbitrated). Transport (the actual POST) lives with the assembly layer; this module is the pure, testable half.

Structs§

PendingRequest
One unanswered human request, reconstructed from the ledger (the humanRequested payload plus its pairing state).

Enums§

HumanCliError
Errors of the collection channel.

Functions§

answer_hint
The answer vocabulary line for a request (what the human may type).
cli_actor
The CLI channel’s actor string: cli:os:<user>@<host> (06 §4.4). Attribution, not authentication — the v0.1 trust boundary is the machine itself; the report honestly records who was at the keyboard.
collect
Renders the request, reads one answer line, and submits it through the store arbitration. Returns the appended humanResponded seq and the interpreted response (the interactive loop inspects supervision suspend answers to stop re-prompting).
find_pending
Finds one pending request by id.
interpret_answer
Interprets one answer line into the mode-shaped response payload the store arbitration validates (06 §2.1 union).
pending_requests
Scans one run’s ledger for unanswered human requests, in request order. A supervision suspend answer is non-final and keeps its request pending (spine §6.9). A terminal exit of the awaiting step (or an ancestor of it) settles its request without a response — the lazy timeout settlement and the aborted disposition (06 §5.3) — so the channel’s view matches the store’s, which rejects such requests as settled.
render
Renders one pending request for a terminal.