Oko/Docs

Command reference

oko sessions posts

Lists every kept message and where it is: queued, delivering (by which process, since when), delivered (where, worded how), refused (why) or interrupted (its deliverer ended mid-handoff with no sign in the target's transcript that it arrived), with its judgment.

Invocation#

Command
oko sessions posts [--batch BATCH | --since TIME] [--session ID] [--settled] [--judge] [--seen]; oko sessions posts --record POST --verdict allowed|refused --cause TEXT --by SESSION

Inputs and options#

  • --batch names one batch; --since an RFC 3339 time, every batch queued since; --session the posts to or from one session. --settled first waits until no selected post is queued or delivering. --judge first asks Brama for every unjudged post. --record keeps the sending session's own judgment of its unjudged post.

Output and state effect#

  • Prints {counts: {queued, delivering, delivered, left, refused, interrupted}, posts: […], inbox: […], judgedLater?, seen?}. delivered means the text was typed into a broker terminal (or a resumed one); left means it was only placed in a session's inbox file, recorded with that file as inbox, and is never counted as delivered; interrupted means its deliverer ended mid-handoff and the target's transcript did not hold it, and it is never typed again. inbox carries one entry per left post, {id, state, file, deliveryError?}, read from the inbox now: waiting, delivered (the reader's post-call runtime receipt validated), unconfirmed (its receipt is missing or malformed, or its reader ended mid-send), refused, or absent (no file of the message remains). The state is chosen from the typed handoff, never from the wording of reached. --settled waits on the kernel's events for the batch folders and the delivering processes, with no clock, and returns once every selected post settled; a left or interrupted post is settled for its deliverer.
  • --seen reads, once per target, the transcript of the session each delivered or left post went to and answers one entry per such post: {id, seenAt} once a message addressed to the session (a user-role record carrying no tool result) containing the post's text was written at or after the post was queued, {id, unseen: true} while none is, or {id, seenUnread} naming why the transcript could not be read (no transcript of that session on this machine — a broker terminal named by its own id, or a session held elsewhere — or a record that carries the post but names no RFC 3339 time). Delivered or a validated inbox receipt means Oko handed the text over; seen means the session took it. Oko Desktop's Messages panel asks for the same (native API sessions posts {…, seen: true}) and prints the counts, each left post's inbox file state and receipt cause, and seen on each line.
  • A reply (`oko sessions reply`) carries replyTo, the post it answers, so a thread reads back here and in the digest.
  • Every message any part of Oko hands a session is a post here: a send's, with from, and those Oko's own routines hand at once, with origin naming the routine (supervision routine, supervision pass, model policy continuation, review answer, reflection improve, defect recurrence, instruction retraction, wait watch). Such a post is kept as delivering by the routine's own process before it is handed and as delivered {reached}, left {reached, inbox} or refused {cause} after; one whose process ended between the two is settled by `oko sessions deliver` from the target's transcript, delivered when it holds the post and interrupted otherwise. counts carries interrupted beside refused, --seen reads interrupted posts too, so one that arrives after all shows seenAt, and Oko Desktop's Messages panel counts them and marks them as it marks refused ones.
  • `oko sessions digest` lists the posts to and from its session since its window began, and Oko Desktop's Agent sessions shows them in its Messages panel (native API sessions posts {batch, session, since}).

Refusals and safe exits#

  • “no batch <batch> is kept in <folder>”; an unreadable --since; with --settled, “<n> post(s) are still queued or delivering and no process delivers them any more: <post> to <target>, …; `oko sessions deliver --batch <batch>` delivers the queued ones and refuses those whose deliverer ended mid-delivery”. --record refuses a post that is not unjudged, a verdict other than allowed or refused, and a session other than the post's sender; its --by is proven as the send's is.

CLI reference#