Liking cljdoc? Tell your friends :D

hive-compose.promote.config

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. :compose/claim-ttl-minutes a claim not renewed for this long ends (default 30) :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)

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.
  :compose/claim-ttl-minutes    a claim not renewed for this long ends (default 30)
  :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)
raw docstring

hive-compose.promote.env

Pure: an environment is {name value}, a value either a string or a secret reference, a one-entry map naming its scheme: {:pass "<store path>"}.

A reference is read from its store only when a process is spawned (see hive-compose.adapter.secrets). Everything else, a compose query, an error, a rendered surface, sees it as its rendering <scheme>:<path>, never the value it stands for.

Pure: an environment is {name value}, a value either a string or a secret
reference, a one-entry map naming its scheme: `{:pass "<store path>"}`.

A reference is read from its store only when a process is spawned (see
`hive-compose.adapter.secrets`). Everything else, a compose query, an error,
a rendered surface, sees it as its rendering `<scheme>:<path>`, never the
value it stands for.
raw docstring

hive-compose.promote.plan

Pure planning over the active map ({profile-id Active}): which services a profile can release without starving another active profile, what a switch releases, and what the reaper reaps. Plans are vectors of Release steps.

Pure planning over the active map ({profile-id Active}): which services a
profile can release without starving another active profile, what a switch
releases, and what the reaper reaps. Plans are vectors of Release steps.
raw docstring

hive-compose.promote.profile

Pure reads over a Profile value and the Settings that default it.

Pure reads over a Profile value and the Settings that default it.
raw docstring

hive-compose.promote.program

Pure: a Program is a host process a section needs beside its containers (a shadow-cljs watch, a JVM with an nREPL). What starts it and where its nREPL listens are derived from the build files of its directory (facts), unless the Program says so itself.

Facts are the parsed build files, keyed by file name:

{"shadow-cljs.edn" {..} "deps.edn" {..} "bb.edn" {..} "project.clj" true}

A Clojure kind always starts with its nREPL: shadow-cljs opens its own, a deps.edn project runs its :nrepl alias or a plain nrepl.cmdline, lein and babashka run their headless REPL servers.

Pure: a Program is a host process a section needs beside its containers (a
shadow-cljs watch, a JVM with an nREPL). What starts it and where its nREPL
listens are derived from the build files of its directory (`facts`), unless
the Program says so itself.

Facts are the parsed build files, keyed by file name:

  {"shadow-cljs.edn" {..} "deps.edn" {..} "bb.edn" {..} "project.clj" true}

A Clojure kind always starts with its nREPL: shadow-cljs opens its own, a
deps.edn project runs its `:nrepl` alias or a plain nrepl.cmdline, lein and
babashka run their headless REPL servers.
raw docstring

hive-compose.promote.swarm

Pure: who works on what a section runs, which shared nREPL drives which module, and whether a section is in use.

Agents are {:agent/id :agent/status :agent/cwd}. A claim is what an agent declared itself, kept on the active entry under :claims {agent-id {:since ms :seen ms :note s :swarm? bool}}. A route is one program with an nREPL: {:dir :program/id :project :nrepl-port ..}.

Pure: who works on what a section runs, which shared nREPL drives which
module, and whether a section is in use.

Agents are {:agent/id :agent/status :agent/cwd}. A claim is what an agent
declared itself, kept on the active entry under :claims
{agent-id {:since ms :seen ms :note s :swarm? bool}}. A route is one
program with an nREPL: {:dir :program/id :project :nrepl-port ..}.
raw docstring

hive-compose.promote.sync

Three-way merge of the persisted state {:active {id Active} :current id}.

Two addon instances can share one state file for a while: a hot remount mounts a new instance while a call still runs on the old one. Each instance keeps the state it last read or wrote (base). On every write it merges its own state (mine) with what the file holds now (theirs):

  • a key only one side changed takes that side's value, a removal included;
  • a key both sides changed to two maps merges them: claims key by key the same way, the rest from the side touched last, :last-touch the later;
  • a key one side removed while the other changed it stays, because losing a claim or a running section costs more than keeping an entry the reaper or the forget pass drops later.

Pure: no clock, no file.

Three-way merge of the persisted state {:active {id Active} :current id}.

Two addon instances can share one state file for a while: a hot remount
mounts a new instance while a call still runs on the old one. Each instance
keeps the state it last read or wrote (`base`). On every write it merges its
own state (`mine`) with what the file holds now (`theirs`):

  - a key only one side changed takes that side's value, a removal included;
  - a key both sides changed to two maps merges them: claims key by key the
    same way, the rest from the side touched last, :last-touch the later;
  - a key one side removed while the other changed it stays, because losing a
    claim or a running section costs more than keeping an entry the reaper
    or the forget pass drops later.

Pure: no clock, no file.
raw docstring

hive-compose.promote.target

Pure: a target names services or native compose profiles of a configured Project; a section is the Profile that runs exactly what it names, closed over the compose file's depends_on.

Pure: a target names services or native compose profiles of a configured
Project; a section is the Profile that runs exactly what it names, closed
over the compose file's depends_on.
raw 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