Oko/Docs

Command reference

oko sessions unpublish

Withdraws one of this member's shared-session publications; the session itself keeps running.

Invocation#

Command
oko sessions unpublish ID [--json]

Inputs and options#

  • ID is the publication's registry id, as `oko sessions list` prints it under published or orphanedPublications.

Output and state effect#

  • Sets ended_at on that row of oko_live_sessions, scoped to this member and organization, and prints the row; a publisher still running elsewhere sees the row ended at its next renewal and stops. Oko Desktop's Stop sharing does the same through the native API, and a publication the Oko service itself runs is stopped there first, its bridge ending the row.

Refusals and safe exits#

  • “no active publication <id> of yours is in the registry”; “publication <id> matched more than one row”; a member who is not signed in is refused by the database connection.
  • When the resident service cannot send its stop request, it reports the publication identity and actual cause while retaining the bridge handle for a later explicit attempt. A bridge already observed finished is joined for its actual result without sending another stop request. Neither a failed signal nor a retained handle proves that publication ended.
  • Stopping attempts both the WebSocket close frame and transport shutdown. A failed close frame remains an error even if transport shutdown succeeds, with that observed shutdown state stated explicitly; if both fail, both causes are preserved. Shutdown failure alone does not prove that the connection stayed open.

CLI reference#