Addon config -> Settings. Pure: the profiles file's contents and the home directory arrive as values.
Config keys (manifest :addon/config, then config.edn :addons {"hive.compose" {..}}):
:compose/profiles [Profile ..] or {id Profile}, inline
:compose/profiles-file EDN file of the same shape
(default ~/.config/hive-mcp/compose-profiles.edn)
:compose/projects {id Project}: compose projects whose services
and native profiles are addressable as targets
(<project>/<target>)
:compose/default-ttl-minutes idle minutes before the reaper acts (default 60)
:compose/default-idle-action :stop | :down | :none (default :stop)
:compose/tick-seconds reaper period (default 60)
:compose/state-file default ~/.local/state/hive-compose/state.edn
:compose/timeout-ms per compose call (default 60000)
:compose/up-timeout-ms per up, pulls included (default 600000)
:compose/adopt? adopt running stacks of configured profiles (default true)
:compose/swarm? count agents working in a project's directories as
use of its sections (default true)
:compose/notify? shout nREPL routes and reaps to the swarm (default true)
:compose/activity #{:nrepl :published}: which new connections count as
use; :published (the host ports containers publish:
a browser, any host-side client) is opt-in (default
#{:nrepl}). A project overrides it for its sections
with :project/activity, a preset with
:profile/activity. Connections from the project's
own containers never count. :cpu (opt-in too)
counts a running service busier than
:compose/cpu-busy-percent, client or not
:compose/cpu-busy-percent CPU use, in percent of one core, above which a
service of a :cpu section is busy (default 5)
:compose/claim-ttl-minutes a claim not renewed for this long ends (default 30)
:compose/claim-max-ttl-minutes the longest wave claim (claim ttl_minutes=..) an
agent or coordinator may hold; a longer request
is refused, never clamped (default 480)
:compose/orphan-ttl-minutes idle minutes before the reaper acts on a section
whose last claim ended, when shorter than its TTL
(default 10)
:compose/program-grace-ms how long a host program is watched after its
start; one that exits within it is reported
:exited with its code and log tail (default 3000)
:compose/history-file flake history, EDN lines (default
flake-history.ednl beside the state file)
:compose/flaky flake thresholds {:window :min-runs
:flip-rate :streak}, each optional (defaults
in hive-compose.promote.flaky/defaults)
:compose/stacks [Stack ..] or {id Stack}: consumers brought up with
every capability they need (optional)
:compose/suites [Suite ..] or {id Suite}: test runners in any
language (optional)
A project places itself in the capability graph with :project/provides
{capability Provide} and :project/needs {capability Need} (see schema).
Addon config -> Settings. Pure: the profiles file's contents and the home
directory arrive as values.
Config keys (manifest `:addon/config`, then config.edn `:addons {"hive.compose" {..}}`):
:compose/profiles [Profile ..] or {id Profile}, inline
:compose/profiles-file EDN file of the same shape
(default ~/.config/hive-mcp/compose-profiles.edn)
:compose/projects {id Project}: compose projects whose services
and native profiles are addressable as targets
(`<project>/<target>`)
:compose/default-ttl-minutes idle minutes before the reaper acts (default 60)
:compose/default-idle-action :stop | :down | :none (default :stop)
:compose/tick-seconds reaper period (default 60)
:compose/state-file default ~/.local/state/hive-compose/state.edn
:compose/timeout-ms per compose call (default 60000)
:compose/up-timeout-ms per `up`, pulls included (default 600000)
:compose/adopt? adopt running stacks of configured profiles (default true)
:compose/swarm? count agents working in a project's directories as
use of its sections (default true)
:compose/notify? shout nREPL routes and reaps to the swarm (default true)
:compose/activity #{:nrepl :published}: which new connections count as
use; :published (the host ports containers publish:
a browser, any host-side client) is opt-in (default
#{:nrepl}). A project overrides it for its sections
with :project/activity, a preset with
:profile/activity. Connections from the project's
own containers never count. :cpu (opt-in too)
counts a running service busier than
:compose/cpu-busy-percent, client or not
:compose/cpu-busy-percent CPU use, in percent of one core, above which a
service of a :cpu section is busy (default 5)
:compose/claim-ttl-minutes a claim not renewed for this long ends (default 30)
:compose/claim-max-ttl-minutes the longest wave claim (claim ttl_minutes=..) an
agent or coordinator may hold; a longer request
is refused, never clamped (default 480)
:compose/orphan-ttl-minutes idle minutes before the reaper acts on a section
whose last claim ended, when shorter than its TTL
(default 10)
:compose/program-grace-ms how long a host program is watched after its
start; one that exits within it is reported
:exited with its code and log tail (default 3000)
:compose/history-file flake history, EDN lines (default
flake-history.ednl beside the state file)
:compose/flaky flake thresholds {:window :min-runs
:flip-rate :streak}, each optional (defaults
in `hive-compose.promote.flaky/defaults`)
:compose/stacks [Stack ..] or {id Stack}: consumers brought up with
every capability they need (optional)
:compose/suites [Suite ..] or {id Suite}: test runners in any
language (optional)
A project places itself in the capability graph with :project/provides
{capability Provide} and :project/needs {capability Need} (see schema).(activity-set v)A configured activity (a set, or a list of keywords or names, as JSON gives) as a set of keywords; a value that is no collection stays as is, for the schema to refuse.
A configured activity (a set, or a list of keywords or names, as JSON gives) as a set of keywords; a value that is no collection stays as is, for the schema to refuse.
(capability-keys m)m ({capability v}) with its capability names as strings, as JSON and EDN
keyword keys give them; a key that is no name stays as is, for the schema
to refuse.
`m` ({capability v}) with its capability names as strings, as JSON and EDN
keyword keys give them; a key that is no name stays as is, for the schema
to refuse.The files compose reads when given no -f, in its own order.
The files compose reads when given no -f, in its own order.
(compose-file-expected? p)True when project p must have a compose file. The one place that says a
project needs none: :project/compose? false declares a project without
containers by design.
True when project `p` must have a compose file. The one place that says a project needs none: `:project/compose? false` declares a project without containers by design.
The existence port: what a path is. It answers :present, :missing or
:unknown (it could not tell, e.g. permission denied); true and false read as
:present and :missing, so a set of paths is a fake. A port that throws reads
as :unknown. The addon injects the real filesystem
(hive-compose.boundary.files/path-state); tests pass a set or a fn.
The existence port: what a path is. It answers :present, :missing or :unknown (it could not tell, e.g. permission denied); true and false read as :present and :missing, so a set of paths is a fake. A port that throws reads as :unknown. The addon injects the real filesystem (`hive-compose.boundary.files/path-state`); tests pass a set or a fn.
(expand-home home s)s with a leading ~ replaced by home.
`s` with a leading ~ replaced by `home`.
(history-file cfg home state-file)Path of the flake history file: :compose/history-file expanded against
home, else flake-history.ednl beside the state file state-file.
Path of the flake history file: `:compose/history-file` expanded against `home`, else `flake-history.ednl` beside the state file `state-file`.
(mark-plan res settings stack-id exists?)Result res of plan for stack stack-id with the ProjectMissing of every
project the stack brings up under :problems, on the plan (its :text
saying so) or on the error. res unchanged when none is missing.
Result `res` of `plan` for stack `stack-id` with the ProjectMissing of every project the stack brings up under `:problems`, on the plan (its `:text` saying so) or on the error. `res` unchanged when none is missing.
(mark-projects rows projects exists?)The projects rows with each configured entry of a missing or unreadable
project carrying its ProjectProblem as :problem, and a row (status
"missing" or "unreadable") for such a configured project docker knows
nothing of. A present project's rows are unchanged.
The `projects` rows with each configured entry of a missing or unreadable project carrying its ProjectProblem as `:problem`, and a row (status "missing" or "unreadable") for such a configured project docker knows nothing of. A present project's rows are unchanged.
(normalize-needs needs)Needs ({capability Need}) with string capability names, each :via a
keyword, as JSON gives it a string, and normalized :resources.
Needs ({capability Need}) with string capability names, each `:via` a
keyword, as JSON gives it a string, and normalized `:resources`.(normalize-profile home p)Profile with a string id, its dir expanded against home and its programs
resolved against that dir.
Profile with a string id, its dir expanded against `home` and its programs resolved against that dir.
(normalize-programs home base programs)Programs with string ids and their dirs made absolute against base, the
directory of the project or profile that declares them.
Programs with string ids and their dirs made absolute against `base`, the directory of the project or profile that declares them.
(normalize-project home p)Project with a string id, its dir expanded against home, its programs
resolved against that dir and its capability names as strings.
Project with a string id, its dir expanded against `home`, its programs resolved against that dir and its capability names as strings.
(normalize-provides provides)Provides ({capability Provide}) with string capability names and
normalized :resources.
Provides ({capability Provide}) with string capability names and
normalized `:resources`.(normalize-resources v)Resources as JSON or EDN give them: "unbounded" (or the keyword) as :unbounded, anything else as is, for the schema to judge.
Resources as JSON or EDN give them: "unbounded" (or the keyword) as :unbounded, anything else as is, for the schema to judge.
(normalize-stacks stacks)Stacks ([Stack] or {id Stack}) as {id Stack} with string ids and string capability names in their needs. A malformed value (no collection of maps, a stack without id) is left for the schema to refuse, never thrown on.
Stacks ([Stack] or {id Stack}) as {id Stack} with string ids and string
capability names in their needs. A malformed value (no collection of maps,
a stack without id) is left for the schema to refuse, never thrown on.(normalize-suites home suites)Suites ([Suite] or {id Suite}) as {id Suite} with string ids, :suite/dir
expanded against home, string capability names in their needs and a
keyword report format. A malformed value is left for the schema to refuse.
Suites ([Suite] or {id Suite}) as {id Suite} with string ids, `:suite/dir`
expanded against `home`, string capability names in their needs and a
keyword report format. A malformed value is left for the schema to refuse.(path-state exists? path)What exists? says of path: :present, :missing or :unknown. Total: a
throw, or an answer that is none of these, never escapes; a throw is
:unknown, truthy :present, falsy :missing.
What `exists?` says of `path`: :present, :missing or :unknown. Total: a throw, or an answer that is none of these, never escapes; a throw is :unknown, truthy :present, falsy :missing.
(profiles-file cfg home)Path of the profiles file cfg names, expanded against home.
Path of the profiles file `cfg` names, expanded against `home`.
(project-preflight exists? p)ProjectMissing for project p when its dir, or the compose file it runs
with, is missing by exists?; ProjectUnreadable when the probe cannot tell
(and nothing it could tell is missing); nil when all are present. Pure over
the probe and total: a project without a string dir is a missing dir, and a
throwing probe is unreadable, never a throw.
ProjectMissing for project `p` when its dir, or the compose file it runs with, is missing by `exists?`; ProjectUnreadable when the probe cannot tell (and nothing it could tell is missing); nil when all are present. Pure over the probe and total: a project without a string dir is a missing dir, and a throwing probe is unreadable, never a throw.
Why a configured project cannot be brought up, decided before docker runs.
:missing :dir names the project dir in :paths; :compose-file names the
configured files that are gone, or the dir and :looked-for (compose's
default names) when it configures none.
Why a configured project cannot be brought up, decided before docker runs. `:missing` :dir names the project dir in `:paths`; :compose-file names the configured files that are gone, or the dir and `:looked-for` (compose's default names) when it configures none.
(projects-preflight exists? projects){project-id ProjectProblem} of every project in projects ({id Project})
that project-preflight marks, sorted by id; empty when all are present.
{project-id ProjectProblem} of every project in `projects` ({id Project})
that `project-preflight` marks, sorted by id; empty when all are present.The preflight could not tell whether a project's dir or compose file exists
(the probe threw or was denied): :unreadable names which, :paths the
paths. Not a refusal: up may still work, docker answers then.
The preflight could not tell whether a project's dir or compose file exists (the probe threw or was denied): `:unreadable` names which, `:paths` the paths. Not a refusal: `up` may still work, docker answers then.
(settings cfg file-profiles home)Result<Settings> from merged addon config cfg, the profiles read from the
profiles file (file-profiles, nil when absent) and home. Inline profiles
override file profiles with the same id. Stacks and suites appear only when
configured, so a config without them yields the Settings it always did.
Result<Settings> from merged addon config `cfg`, the profiles read from the profiles file (`file-profiles`, nil when absent) and `home`. Inline profiles override file profiles with the same id. Stacks and suites appear only when configured, so a config without them yields the Settings it always did.
(settings-diff old new)What differs between Settings old and new: projects and profiles by id,
other settings by key, and among those the ones a reload cannot apply
(:restart-required). Pure.
What differs between Settings `old` and `new`: projects and profiles by id, other settings by key, and among those the ones a reload cannot apply (`:restart-required`). Pure.
(stack-projects settings stack-id)Sorted ids of the configured projects stack stack-id of settings
brings up: its consumers' projects and, when its needs resolve, every
provider. Empty for an unknown stack.
Sorted ids of the configured projects stack `stack-id` of `settings` brings up: its consumers' projects and, when its needs resolve, every provider. Empty for an unknown stack.
(under home base dir)dir as an absolute path: itself when absolute or under ~, else resolved
against base.
`dir` as an absolute path: itself when absolute or under ~, else resolved against `base`.
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 |