IAddon hive.compose. Construction is pure. initialize! reads the config
and profiles file, loads the active map and starts the reaper; shutdown!
stops the reaper. Containers and host programs are never touched by the
lifecycle itself.
The reaper is one daemon thread waking every :compose/tick-seconds. Its first
pass adopts running stacks of configured profiles (when :compose/adopt?);
every pass forgets profiles taken down outside the addon and releases the ones
idle past their TTL.
Config: see hive-compose.promote.config. :compose/engine injects an
IComposeEngine in place of the docker CLI, :compose/runner an
IProgramRunner in place of the host one, :compose/history an
IFlakeHistory in place of the history file, :compose/resolver the
{scheme ISecretBackend} env references are read through in place of pass.
IAddon `hive.compose`. Construction is pure. `initialize!` reads the config
and profiles file, loads the active map and starts the reaper; `shutdown!`
stops the reaper. Containers and host programs are never touched by the
lifecycle itself.
The reaper is one daemon thread waking every `:compose/tick-seconds`. Its first
pass adopts running stacks of configured profiles (when `:compose/adopt?`);
every pass forgets profiles taken down outside the addon and releases the ones
idle past their TTL.
Config: see `hive-compose.promote.config`. `:compose/engine` injects an
IComposeEngine in place of the docker CLI, `:compose/runner` an
IProgramRunner in place of the host one, `:compose/history` an
IFlakeHistory in place of the history file, `:compose/resolver` the
{scheme ISecretBackend} env references are read through in place of `pass`.(addon-ctor config)hive-addon.mount constructor: config -> uninitialized IAddon.
hive-addon.mount constructor: config -> uninitialized IAddon.
One line per command: what it does and the params it reads.
One line per command: what it does and the params it reads.
{command #{param}}: the params each command reads, the one source the control API rejects unknown params by and the spec's Req_<command> schemas are generated from. Read off the [cmd|..] prefix of each param's description in the tool's inputSchema, plus target and profile for the commands that resolve a section and agent_id (stamped by the MCP host) for claim and release.
{command #{param}}: the params each command reads, the one source the
control API rejects unknown params by and the spec's Req_<command>
schemas are generated from. Read off the [cmd|..] prefix of each param's
description in the tool's inputSchema, plus target and profile for the
commands that resolve a section and agent_id (stamped by the MCP host)
for claim and release.Where why reads traces when :compose/tempo-url names none: the otel
provider's Tempo port as published on the host.
Where `why` reads traces when `:compose/tempo-url` names none: the otel provider's Tempo port as published on the host.
(dispatch a command params)Result of command with params (the tool's params, string or keyword
keys) on addon a: the one dispatch both transports run, the MCP compose
tool (tool) and the control API (hive-compose.api).
Result of `command` with `params` (the tool's params, string or keyword keys) on addon `a`: the one dispatch both transports run, the MCP `compose` tool (`tool`) and the control API (`hive-compose.api`).
(make-addon)(make-addon seed)Uninitialized IAddon. No thread, file or container is touched.
Uninitialized IAddon. No thread, file or container is touched.
(reload! {:keys [state seed]})Re-read the addon config block declared now and the profiles file into the running context, keeping the active map; the engine and program runner are rebuilt from the new config. Answers Result<report>: :source (where the block came from), :profiles and :projects (ids now), :changed (projects, profiles and settings that differ, by id or key, never by value), :sections (active sections re-based on their changed project: :rebased ids, :kept with why) and :not-reloaded (what applies only at the next initialize!, and that running containers keep the env they were created with until recreated).
Re-read the addon config block declared now and the profiles file into the running context, keeping the active map; the engine and program runner are rebuilt from the new config. Answers Result<report>: :source (where the block came from), :profiles and :projects (ids now), :changed (projects, profiles and settings that differ, by id or key, never by value), :sections (active sections re-based on their changed project: :rebased ids, :kept with why) and :not-reloaded (what applies only at the next initialize!, and that running containers keep the env they were created with until recreated).
The params test-opts reads; command-params "test" must equal it
(addon_test checks), so the API never refuses what test reads.
The params `test-opts` reads; `command-params` "test" must equal it (addon_test checks), so the API never refuses what `test` reads.
(tick! {:keys [state]})One reaper pass on the calling thread: adopt once, then reap. Answers the pass, or {:skipped ..} when not active or a pass is running.
One reaper pass on the calling thread: adopt once, then reap. Answers the
pass, or {:skipped ..} when not active or a pass is running.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 |