Liking cljdoc? Tell your friends :D

hive-compose.adapter.swarm

ISwarm over the hive host: the live agents come from the host's swarm registry, notices go out as hivemind messages. A notice addressed to one agent (:to) is sent directed, through the host's routing-verdict shout, so it lands in that agent's context only; with no directed channel it falls back to the plain shout. Everything is soft-resolved, so the published addon never requires hive-mcp; with no host, -agents answers :host/absent and -notify! an error, and the addon runs on claims and connections alone.

A delivered notice answers {:channel :direct|:broadcast ..}: :direct with the :to it reached (and the host's :context-id, :to-unresolved when the host knows no such reader), :broadcast when it went out as a shout, :fallback? true when it was meant for one agent but no directed channel resolved.

ISwarm over the hive host: the live agents come from the host's swarm
registry, notices go out as hivemind messages. A notice addressed to one
agent (:to) is sent directed, through the host's routing-verdict shout,
so it lands in that agent's context only; with no directed channel it
falls back to the plain shout. Everything is soft-resolved, so the
published addon never requires hive-mcp; with no host, `-agents` answers
:host/absent and `-notify!` an error, and the addon runs on claims and
connections alone.

A delivered notice answers {:channel :direct|:broadcast ..}: :direct with
the :to it reached (and the host's :context-id, :to-unresolved when the
host knows no such reader), :broadcast when it went out as a shout,
:fallback? true when it was meant for one agent but no directed channel
resolved.
raw docstring

agent-rowclj

(agent-row row)

{:agent/id :agent/status :agent/cwd} of a host swarm row, nil without an id.

{:agent/id :agent/status :agent/cwd} of a host swarm row, nil without an id.
sourceraw docstring

make-swarmclj

(make-swarm)
(make-swarm {:keys [list-agents shout! send!]})

HostSwarm. opts: :list-agents (0-arity, host rows with :slave/id :slave/status :slave/cwd; default the host swarm registry's live agents), :shout! ((agent-id event-type data) -> bool; default the host hivemind shout) and :send! ((agent-id event-type data) -> routing verdict, data carrying :to; default the host's shout-with-verdict!, the directed channel). A :send! answering :host/absent sends directed notices as shouts instead.

HostSwarm. `opts`: :list-agents (0-arity, host rows with :slave/id
:slave/status :slave/cwd; default the host swarm registry's live agents),
:shout! ((agent-id event-type data) -> bool; default the host hivemind
shout) and :send! ((agent-id event-type data) -> routing verdict, data
carrying :to; default the host's shout-with-verdict!, the directed
channel). A :send! answering :host/absent sends directed notices as
shouts instead.
sourceraw docstring

senderclj

The agent id notices are shouted as.

The agent id notices are shouted as.
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