Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.gateway.human-input

Gateway half of the typed human-input pause.

com.blockether.vis.internal.human-input BLOCKS the extension thread and publishes :human-input/request / :human-input/close on every channel the request names — [:tui :app] by default. The TUI draws its dialog from the :tui channel; this namespace serves the :app channel and is the reason a companion-app operator ever learns a run is waiting on them:

  • the request becomes a human_input.request SESSION event, so it rides SSE live, sits in the replay ring for a client that connects later, and reaches the push tap (which alerts the phone);
  • the close becomes human_input.close, so every client drops the form the moment ANY surface answers — TUI, app or a timeout;
  • pending / submit! / cancel! back the REST routes so the app can answer a request it finds already open.

A request raised outside a gateway session carries no :session-id. It is still published (the TUI shows it) and silently skipped here — a session event with no session has nowhere to go.

Gateway half of the typed human-input pause.

`com.blockether.vis.internal.human-input` BLOCKS the extension thread and
publishes `:human-input/request` / `:human-input/close` on every channel the
request names — `[:tui :app]` by default. The TUI draws its dialog from the
`:tui` channel; this namespace serves the `:app` channel and is the reason a
companion-app operator ever learns a run is waiting on them:

  - the request becomes a `human_input.request` SESSION event, so it rides
    SSE live, sits in the replay ring for a client that connects later, and
    reaches the push tap (which alerts the phone);
  - the close becomes `human_input.close`, so every client drops the form
    the moment ANY surface answers — TUI, app or a timeout;
  - [[pending]] / [[submit!]] / [[cancel!]] back the REST routes so the app
    can answer a request it finds already open.

A request raised outside a gateway session carries no `:session-id`. It is
still published (the TUI shows it) and silently skipped here — a session
event with no session has nowhere to go.
raw docstring

cancel!clj

(cancel! request-id)

Cancel request-id. Returns true when it was still pending and dismissable: the engine refuses a request declared is_cancellable false, so the app is held to exactly the rule the TUI dialog paints.

Cancel `request-id`. Returns true when it was still pending and dismissable:
the engine refuses a request declared `is_cancellable false`, so the app is
held to exactly the rule the TUI dialog paints.
sourceraw docstring

channel-idclj

Channel the companion app is served on.

Channel the companion app is served on.
sourceraw docstring

install!clj

(install!)

Subscribe the gateway to :app human-input events. Idempotent — the bus replaces a listener registered under the same id.

Subscribe the gateway to `:app` human-input events. Idempotent — the bus
replaces a listener registered under the same id.
sourceraw docstring

on-channel-event!clj

(on-channel-event! event)

Translate one :app channel event into a session event. Unknown ops are ignored — the channel bus is shared.

Translate one `:app` channel event into a session event. Unknown ops are
ignored — the channel bus is shared.
sourceraw docstring

pendingclj

(pending sid)

Pending human-input request views for session sid, oldest first. These are the requests this session is BLOCKED on right now.

Pending human-input request views for session `sid`, oldest first. These are
the requests this session is BLOCKED on right now.
sourceraw docstring

request-ofclj

(request-of sid request-id)

The pending request request-id when it belongs to sid, else nil. Every REST answer goes through this: a request id from another session (or an already-settled one) must not be answerable.

The pending request `request-id` when it belongs to `sid`, else nil. Every
REST answer goes through this: a request id from another session (or an
already-settled one) must not be answerable.
sourceraw docstring

submit!clj

(submit! request-id values)

Answer request-id with a raw field id -> value map. Returns {:is-accepted true}, or {:is-accepted false :errors {field-id message}} when a value fails validation — the request stays pending so the operator can fix it.

Answer `request-id` with a raw `field id -> value` map. Returns
`{:is-accepted true}`, or `{:is-accepted false :errors {field-id message}}`
when a value fails validation — the request stays pending so the operator
can fix it.
sourceraw docstring

uninstall!clj

(uninstall!)

Drop the subscription installed by install!.

Drop the subscription installed by [[install!]].
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close