Gateway transport for the shared View lifecycle.
The engine publishes :view/open, :view/patch and :view/close envelopes on
every selected channel. This namespace projects the :app copy into the matching
view.open, view.patch and view.close session events, preserving :kind so
clients choose capability policy without guessing from event names.
An :input View blocks while a :live View streams coalesced patches on
[[live-flush-ms]]. Operator intent for either kind enters through one action!
and one kind-independent REST resource; the engine owns the closed action
vocabulary and capability checks.
A :view/send envelope carries a Send of an app of the python_execution sandbox.
It becomes one bounded notification turn of the session that owns the app.
An input View is shown in one session: its input-home. For a managed
subagent, that is the session of its leader, because the person watches the
leader. Each input View carries an :origin that names the session which asks
and its parent.
Gateway transport for the shared View lifecycle. The engine publishes `:view/open`, `:view/patch` and `:view/close` envelopes on every selected channel. This namespace projects the `:app` copy into the matching `view.open`, `view.patch` and `view.close` session events, preserving `:kind` so clients choose capability policy without guessing from event names. An `:input` View blocks while a `:live` View streams coalesced patches on [[live-flush-ms]]. Operator intent for either kind enters through one [[action!]] and one kind-independent REST resource; the engine owns the closed action vocabulary and capability checks. A `:view/send` envelope carries a Send of an app of the python_execution sandbox. It becomes one bounded notification turn of the session that owns the app. An input View is shown in one session: its [[input-home]]. For a managed subagent, that is the session of its leader, because the person watches the leader. Each input View carries an `:origin` that names the session which asks and its parent.
(action! view-id action)Apply one closed operator action to open View view-id. Kind policy and all
validation stay in the engine, so every remote surface receives the same verdict.
The decoded action's own keys become engine keywords here, once; the values
it submits stay keyed by field name.
Apply one closed operator action to open View `view-id`. Kind policy and all validation stay in the engine, so every remote surface receives the same verdict. The decoded action's own keys become engine keywords here, once; the `values` it submits stay keyed by field name.
Channel the companion app is served on.
Channel the companion app is served on.
(clear-comments! sid drafts)Remove the drafts drafts of session sid that turn-comments gave to a turn.
A draft that the human changed since then stays.
Remove the drafts `drafts` of session `sid` that [[turn-comments]] gave to a turn. A draft that the human changed since then stays.
(deltas-since view since)The view deltas (view.json view_delta) that take app view from seq since to
its newest published frame, oldest first. Nil when the reader must take the
whole view: the gateway does not hold these frames, or their strings are not
shorter than the strings of the view. A reader at the newest frame is behind
when the app has a newer seq and no frame waits: a new owner changed the icon.
The view deltas (view.json `view_delta`) that take app `view` from seq `since` to its newest published frame, oldest first. Nil when the reader must take the whole view: the gateway does not hold these frames, or their strings are not shorter than the strings of the view. A reader at the newest frame is behind when the app has a newer seq and no frame waits: a new owner changed the icon.
(elided-app-patch event)Wire event event as a stream that asked for elided app patches gets it. The
view.patch of an app whose strings hold more characters than
[[view-spec/patch-elide-above-chars]] leaves out its patch and says so. A client
that shows the app reads the view again; another client does no work for it.
Every other event stays as it is.
Wire event `event` as a stream that asked for elided app patches gets it. The `view.patch` of an app whose strings hold more characters than [[view-spec/patch-elide-above-chars]] leaves out its patch and says so. A client that shows the app reads the view again; another client does no work for it. Every other event stays as it is.
(flush-live-patches!)Publish every buffered patch NOW. The tick decides when this happens in a running gateway; a caller that needs the stream settled — a test, a shutdown — asks for it.
Publish every buffered patch NOW. The tick decides when this happens in a running gateway; a caller that needs the stream settled — a test, a shutdown — asks for it.
(global-app-of view-id)Global app view-id, open or closed, else nil. A session view never answers
here, so the global routes cannot read a session.
Global app `view-id`, open or closed, else nil. A session view never answers here, so the global routes cannot read a session.
(global-apps)(global-apps archived?)(global-apps archived? summary?)The global apps, oldest first. A closed app stays listed until it is archived;
with archived?, only the archived apps. With summary?, each app comes without
its body. Empty while apps_global is off.
The global apps, oldest first. A closed app stays listed until it is archived; with `archived?`, only the archived apps. With `summary?`, each app comes without its body. Empty while `apps_global` is off.
(global-listed?)Whether the person lets the surfaces list global apps: setting apps_global.
Whether the person lets the surfaces list global apps: setting `apps_global`.
(input-home sid)The session that shows the input Views of session sid: the leader of its team
for a managed subagent, else sid. The person watches the leader, so a form that
a subagent raises goes there (issue #494). When the lookup fails, the form stays
with the session that asks.
The session that shows the input Views of session `sid`: the leader of its team for a managed subagent, else `sid`. The person watches the leader, so a form that a subagent raises goes there (issue #494). When the lookup fails, the form stays with the session that asks.
(input-view-of sid view-id)Input View view-id when session sid shows it, else nil.
Input View `view-id` when session `sid` shows it, else nil.
(input-views sid)Input Views that session sid shows right now, oldest first, each with its
:origin: its own, and those of its subagents when sid leads a team.
Input Views that session `sid` shows right now, oldest first, each with its `:origin`: its own, and those of its subagents when `sid` leads a team.
(install!)Subscribe the gateway to :app View lifecycle events. Idempotent.
Subscribe the gateway to `:app` View lifecycle events. Idempotent.
(live-log-range sid view-id node-id from limit & [query])Read one bounded page of a live or closed log. query is a case-insensitive
literal substring; from counts matches, not source lines. Nil paging values
use the log-window policy, which is also the maximum response size.
Read one bounded page of a live or closed log. `query` is a case-insensitive literal substring; `from` counts matches, not source lines. Nil paging values use the log-window policy, which is also the maximum response size.
(live-view-of sid view-id)Live view view-id when it belongs to sid, else nil. Every REST answer goes
through this: a view id from another session must not be readable from here.
Live view `view-id` when it belongs to `sid`, else nil. Every REST answer goes through this: a view id from another session must not be readable from here.
(live-views sid)(live-views sid placement)(live-views sid placement archived?)(live-views sid placement archived? summary?)The live views of session sid, oldest first — the resync a client reads after
joining late, waking up or losing its stream. A placement (inline, panel
or attachment) keeps only the views it names. An app stays in the list after
it closes, until it is archived. With archived?, the list holds only the
archived apps. With summary?, an app comes without its body.
The live views of session `sid`, oldest first — the resync a client reads after joining late, waking up or losing its stream. A `placement` (`inline`, `panel` or `attachment`) keeps only the views it names. An app stays in the list after it closes, until it is archived. With `archived?`, the list holds only the archived apps. With `summary?`, an app comes without its body.
(on-channel-event! event)Project one canonical :app View event into the session journal. A Send of a
sandbox app becomes a notification turn of its session.
Project one canonical `:app` View event into the session journal. A Send of a sandbox app becomes a notification turn of its session.
(string-edits base target)The edits (view.json string_edit) that turn base into target, in ascending
order and without overlap. Each group of changed lines is one edit, so two
changes far from each other do not carry the text between them. A string
without lines, and a change of more than [[edit-distance-cap]] lines, gives one
edit from the first change to the last. No edit splits a surrogate pair.
The edits (view.json `string_edit`) that turn `base` into `target`, in ascending order and without overlap. Each group of changed lines is one edit, so two changes far from each other do not carry the text between them. A string without lines, and a change of more than [[edit-distance-cap]] lines, gives one edit from the first change to the last. No edit splits a surrogate pair.
(summarized-app-open event)Wire event event as a stream that asked for app summaries gets it. The
view.open of an app whose body holds more characters than
[[view-spec/patch-elide-above-chars]] carries the summary of the app, as a list
with summary? does. A client that has the view at that seq keeps its body;
another client reads the app when it shows it. Every other event stays as it is.
Wire event `event` as a stream that asked for app summaries gets it. The `view.open` of an app whose body holds more characters than [[view-spec/patch-elide-above-chars]] carries the summary of the app, as a list with `summary?` does. A client that has the view at that seq keeps its body; another client reads the app when it shows it. Every other event stays as it is.
(turn-comments sid refs)The saved drafts of the open apps of session sid that the comment refs refs
of a new turn name, as {:text :drafts}, or nil when none is there. A ref is a
wire map of view_id, node_id, thread_id and an optional reference, the
marker of the comment in the turn text. A ref to a missing draft gives
nothing, so a retry after the drafts are gone adds no text.
The saved drafts of the open apps of session `sid` that the comment refs `refs`
of a new turn name, as `{:text :drafts}`, or nil when none is there. A ref is a
wire map of `view_id`, `node_id`, `thread_id` and an optional `reference`, the
marker of the comment in the turn text. A ref to a missing draft gives
nothing, so a retry after the drafts are gone adds no text.(uninstall!)Drop the subscription installed by install!. Anything a view still has
buffered is published first: a gateway going away must not swallow patches
the engine already accepted.
Drop the subscription installed by [[install!]]. Anything a view still has buffered is published first: a gateway going away must not swallow patches the engine already accepted.
(view-of sid view-id)Open View view-id when session sid may act on it, as a kind/document
descriptor, else nil. This is the ownership gate for the shared action route.
A View belongs to the one session that shows it.
Open View `view-id` when session `sid` may act on it, as a kind/document descriptor, else nil. This is the ownership gate for the shared action route. A View belongs to the one session that shows it.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |