Liking cljdoc? Tell your friends :D

hive-addon.terminal

ITerminalAddon: the contract for addon-contributed terminal backends.

A companion protocol to IAddon. A concrete terminal backend (a vessel) implements BOTH on the same reify: IAddon carries lifecycle, this carries the terminal operations.

It lives here, beside IAddon, for the same reason IAddon does. A vessel is an addon like any other, so it must be able to compile against the contract alone. Defining it in a host would force every vessel to compile-depend on that host, which is precisely what this leaf lib exists to prevent.

Method signatures mirror a host's ling-strategy protocol exactly, same arities and argument semantics, so a host can dispatch to an addon backend through a thin adapter.

Lifecycle: the backend is started during IAddon/initialize! and torn down during IAddon/shutdown!.

ITerminalAddon: the contract for addon-contributed terminal backends.

A companion protocol to IAddon. A concrete terminal backend (a vessel)
implements BOTH on the same reify: IAddon carries lifecycle, this carries
the terminal operations.

It lives here, beside IAddon, for the same reason IAddon does. A vessel is
an addon like any other, so it must be able to compile against the contract
alone. Defining it in a host would force every vessel to compile-depend on
that host, which is precisely what this leaf lib exists to prevent.

Method signatures mirror a host's ling-strategy protocol exactly, same
arities and argument semantics, so a host can dispatch to an addon
backend through a thin adapter.

Lifecycle: the backend is started during IAddon/initialize! and torn down
during IAddon/shutdown!.
raw docstring

ITerminalAddonclj/sprotocol

Protocol for addon-contributed terminal backends.

Implementors must also satisfy IAddon for addon lifecycle integration.

Protocol for addon-contributed terminal backends.

Implementors must also satisfy IAddon for addon lifecycle integration.

terminal-dispatch!clj/s

(terminal-dispatch! this ctx task-opts)

Dispatch a task to a running terminal. Arguments: ctx - Ling context map {:keys [id]} task-opts - Task options {:keys [task timeout-ms] :or {timeout-ms 60000}} Returns: true on successful dispatch. Throws: ex-info on dispatch failure with {:ling-id str :error str}

Dispatch a task to a running terminal.
Arguments:
  ctx       - Ling context map {:keys [id]}
  task-opts - Task options {:keys [task timeout-ms] :or {timeout-ms 60000}}
Returns: true on successful dispatch.
Throws: ex-info on dispatch failure with {:ling-id str :error str}

terminal-idclj/s

(terminal-id this)

Return the keyword identifier for this terminal backend. Examples: :vterm, :opencode, :crush, :kitty, :tmux Must be stable: it is used as the dispatch key for backend selection and for mode resolution at spawn time.

Return the keyword identifier for this terminal backend.
Examples: :vterm, :opencode, :crush, :kitty, :tmux
Must be stable: it is used as the dispatch key for backend selection
and for mode resolution at spawn time.

terminal-interrupt!clj/s

(terminal-interrupt! this ctx)

Interrupt the current query/task of a running terminal. Arguments: ctx - Ling context map {:keys [id]} Returns: {:success? true :ling-id str} or {:success? false :ling-id str :errors [str]}

Interrupt the current query/task of a running terminal.
Arguments: ctx - Ling context map {:keys [id]}
Returns: {:success? true :ling-id str}
         or {:success? false :ling-id str :errors [str]}

terminal-kill!clj/s

(terminal-kill! this ctx)

Terminate the terminal/process using this backend's mechanism. Arguments: ctx - Ling context map {:keys [id]} Returns: {:killed? true :id str} or {:killed? false :id str :reason kw}

Terminate the terminal/process using this backend's mechanism.
Arguments: ctx - Ling context map {:keys [id]}
Returns: {:killed? true :id str} or {:killed? false :id str :reason kw}

terminal-spawn!clj/s

(terminal-spawn! this ctx opts)

Spawn a terminal/process using this backend's mechanism. Arguments: ctx - Ling context map {:keys [id cwd presets project-id]} opts - Spawn options map {:keys [task kanban-task-id terminal presets]} Returns: String slave-id on success. Throws: ex-info on spawn failure with {:id str :error str}

Spawn a terminal/process using this backend's mechanism.
Arguments:
  ctx  - Ling context map {:keys [id cwd presets project-id]}
  opts - Spawn options map {:keys [task kanban-task-id terminal presets]}
Returns: String slave-id on success.
Throws: ex-info on spawn failure with {:id str :error str}

terminal-statusclj/s

(terminal-status this ctx ds-status)

Get terminal-specific liveness and status information. Arguments: ctx - Ling context map {:keys [id]} ds-status - Host status map, may be nil or {:slave/status kw} Returns: Status map {:slave/id str :slave/status kw} or nil. May include backend-specific keys (e.g. :elisp-alive? for vterm).

Get terminal-specific liveness and status information.
Arguments:
  ctx       - Ling context map {:keys [id]}
  ds-status - Host status map, may be nil or {:slave/status kw}
Returns: Status map {:slave/id str :slave/status kw} or nil.
May include backend-specific keys (e.g. :elisp-alive? for vterm).
sourceraw docstring

terminal-addon?clj/s

(terminal-addon? x)

Check if object implements both IAddon and ITerminalAddon.

Check if object implements both IAddon and ITerminalAddon.
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