Liking cljdoc? Tell your friends :D

hive-emacs.addon

Canonical hive-addon boundary for hive-emacs.

Construction is pure. Initialization owns only hive-emacs state. Hosts adapt declarative tools, hooks, editor, and vessel descriptors through their own integration layer.

Canonical hive-addon boundary for hive-emacs.

Construction is pure. Initialization owns only hive-emacs state. Hosts
adapt declarative tools, hooks, editor, and vessel descriptors through
their own integration layer.
raw docstring

hive-emacs.bridge-loader

Dependency-free loader for the Emacs-side hive-mcp bridge.

Dependency-free loader for the Emacs-side hive-mcp bridge.
raw docstring

hive-emacs.client

Shell wrapper for emacsclient communication with running Emacs.

3-state circuit breaker (closed/open/half-open) with exponential backoff and structured telemetry prevent cascading failures when Emacs dies. structured data for observability.

Shell wrapper for emacsclient communication with running Emacs.

3-state circuit breaker (closed/open/half-open) with exponential backoff
and structured telemetry prevent cascading failures when Emacs dies.
structured data for observability.
raw docstring

hive-emacs.config

Typed config for hive-emacs via hive-di defconfig.

Replaces ad-hoc (System/getenv ...) reads scattered across client.clj, daemon-store.clj, and daemon-selection.clj with a single declarative config surface.

Env vars: EMACSCLIENT — path to emacsclient binary (default "emacsclient") EMACS_SOCKET_NAME — daemon socket name (optional; nil = default daemon)

Generated by defconfig: EmacsConfig — ADT EmacsConfig-fields — field registry EmacsConfig-schema — Malli schema resolve-EmacsConfig — resolver fn (0/1/2 arity, returns Result)

Typed config for hive-emacs via hive-di defconfig.

Replaces ad-hoc (System/getenv ...) reads scattered across client.clj,
daemon-store.clj, and daemon-selection.clj with a single declarative
config surface.

Env vars:
  EMACSCLIENT       — path to emacsclient binary (default "emacsclient")
  EMACS_SOCKET_NAME — daemon socket name (optional; nil = default daemon)

Generated by defconfig:
  EmacsConfig          — ADT
  EmacsConfig-fields   — field registry
  EmacsConfig-schema   — Malli schema
  resolve-EmacsConfig  — resolver fn (0/1/2 arity, returns Result)
raw docstring

hive-emacs.daemon

Protocol definition for Emacs daemon lifecycle management.

Abstracts daemon registration, heartbeat, ling binding, and stale detection so that different storage backends (DataScript, Datalevin) can be used interchangeably.

This namespace owns only daemon domain contracts.

Protocol definition for Emacs daemon lifecycle management.

Abstracts daemon registration, heartbeat, ling binding, and
stale detection so that different storage backends (DataScript,
Datalevin) can be used interchangeably.

This namespace owns only daemon domain contracts.
raw docstring

hive-emacs.daemon-autoheal

Auto-heal orphan cleanup for multi-daemon architecture (W3).

Detects lings bound to dead/unhealthy daemons (orphans) and either:

  1. Rebinds them to a healthy daemon (if idle)
  2. Marks working lings' tasks as failed and releases claims (graceful termination)

Integration: Called from daemon_store.clj heartbeat loop on each cycle.

All foreign ling/task state crosses injected runtime ports.

Auto-heal orphan cleanup for multi-daemon architecture (W3).

Detects lings bound to dead/unhealthy daemons (orphans) and either:
1. Rebinds them to a healthy daemon (if idle)
2. Marks working lings' tasks as failed and releases claims (graceful termination)

Integration: Called from daemon_store.clj heartbeat loop on each cycle.

All foreign ling/task state crosses injected runtime ports.
raw docstring

hive-emacs.daemon-ds

Private DataScript repository for Emacs daemon lifecycle state.

Daemon entities no longer share a host database. Cross-domain ling data is queried through runtime ports, preserving a strict dependency boundary.

Private DataScript repository for Emacs daemon lifecycle state.

Daemon entities no longer share a host database. Cross-domain ling data is
queried through runtime ports, preserving a strict dependency boundary.
raw docstring

hive-emacs.daemon-heartbeat

Health-scored heartbeat execution for Emacs daemons.

Health-scored heartbeat execution for Emacs daemons.
raw docstring

hive-emacs.daemon-ports

Compatibility facade over hive-emacs.runtime-ports.

Compatibility facade over hive-emacs.runtime-ports.
raw docstring

hive-emacs.daemon-redistribution

Ling redistribution across Emacs daemons.

Redistributes lings from overloaded/degraded daemons to healthier ones. Unlike W3 (autoheal) which handles DEAD daemons, redistribution handles ALIVE but stressed daemons — the Emacs process is still running but is degraded or overloaded.

Redistribution is conservative:

  1. Only moves IDLE lings (never interrupts working lings)
  2. Only migrates when the target daemon is significantly better
  3. Caps migrations per cycle to avoid thundering herd
  4. Respects project affinity (prefers same-project daemons)

DDD: Domain Service — stateless redistribution algorithm. Separated from daemon-selection (SRP: selection vs redistribution).

Ling redistribution across Emacs daemons.

Redistributes lings from overloaded/degraded daemons to healthier ones.
Unlike W3 (autoheal) which handles DEAD daemons, redistribution handles
ALIVE but stressed daemons — the Emacs process is still running but is
degraded or overloaded.

Redistribution is conservative:
1. Only moves IDLE lings (never interrupts working lings)
2. Only migrates when the target daemon is significantly better
3. Caps migrations per cycle to avoid thundering herd
4. Respects project affinity (prefers same-project daemons)

DDD: Domain Service — stateless redistribution algorithm.
Separated from daemon-selection (SRP: selection vs redistribution).
raw docstring

hive-emacs.daemon-scoring

Pure health-scoring computation for Emacs daemons.

Extracted from daemon-selection to separate pure scoring algorithms from I/O-bound selection and heartbeat orchestration.

Contains:

  • Health classification (health-level, healthy?)
  • EWMA-based health score computation
  • Latency, error, and load penalty calculations
  • Pure heartbeat helpers (metrics, tx-data, report)

DDD: Value Object / Domain Service (pure, no I/O).

Pure health-scoring computation for Emacs daemons.

Extracted from daemon-selection to separate pure scoring algorithms
from I/O-bound selection and heartbeat orchestration.

Contains:
- Health classification (health-level, healthy?)
- EWMA-based health score computation
- Latency, error, and load penalty calculations
- Pure heartbeat helpers (metrics, tx-data, report)

DDD: Value Object / Domain Service (pure, no I/O).
raw docstring

hive-emacs.daemon-store

Singleton daemon store for shared access across modules.

Provides a shared IEmacsDaemon store instance that can be accessed from swarm sync, emacsclient, and coordinator modules.

DDD: Infrastructure layer - singleton access to repository.

Singleton daemon store for shared access across modules.

Provides a shared IEmacsDaemon store instance that can be accessed
from swarm sync, emacsclient, and coordinator modules.

DDD: Infrastructure layer - singleton access to repository.
raw docstring

hive-emacs.dsl.ext-hooks

:emacs/* IAddon hook entries — declarative capability contributions.

Consumers adapt stable keys such as :emacs/eval-elisp through their own extension mechanism instead of importing hive-emacs implementation namespaces. The host owns registration and lifecycle binding.

Decisions:

  • 20260429195812-0c5dfe8d (outphase free-form ext-keys via IAddon hooks)
  • 20260429230453-7e7627cc (extraction + Phase 2 plan)
`:emacs/*` IAddon hook entries — declarative capability contributions.

Consumers adapt stable keys such as `:emacs/eval-elisp` through their own
extension mechanism instead of importing hive-emacs implementation
namespaces. The host owns registration and lifecycle binding.

Decisions:
- 20260429195812-0c5dfe8d (outphase free-form ext-keys via IAddon hooks)
- 20260429230453-7e7627cc (extraction + Phase 2 plan)
raw docstring

hive-emacs.dsl.multi-hooks

:multi/* IAddon hook entries owned by hive.emacs.

Adds compact verb codes for the consolidated emacs tool. A host may adapt these declarative entries into its own registry; this namespace has no host API dependency.

Param aliases are owned by hive.knowledge to avoid first-write-wins conflicts at registration time.

Decision: 20260429230453-7e7627cc.

`:multi/*` IAddon hook entries owned by `hive.emacs`.

Adds compact verb codes for the consolidated `emacs` tool. A host may
adapt these declarative entries into its own registry; this namespace has
no host API dependency.

Param aliases are owned by `hive.knowledge` to avoid first-write-wins
conflicts at registration time.

Decision: 20260429230453-7e7627cc.
raw docstring

hive-emacs.editor-adapter

Host-neutral Emacs editor capability.

The returned map is data plus functions. A host-specific adapter may wrap it in its own editor protocol; hive-emacs never imports or resolves that host.

Host-neutral Emacs editor capability.

The returned map is data plus functions. A host-specific adapter may wrap it
in its own editor protocol; hive-emacs never imports or resolves that host.
raw docstring

hive-emacs.elisp

Elisp generation helpers for hive-mcp.

This namespace provides string-based helpers for generating elisp code, with optional clojure-elisp integration for more advanced use cases.

The string helpers are stable and don't require clojure-elisp to be mature. As clojure-elisp matures, more features can be migrated to use it.

Usage: (require '[hive-emacs.elisp :as el])

;; String-based helpers (stable, recommended) (el/require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-status) ;; => "(progn (require 'hive-mcp-magit nil t) ...)"

(el/require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-log 10) ;; => "(progn ... (json-encode (hive-mcp-magit-api-log 10)) ...)"

;; clojure-elisp integration (experimental) (el/emit '(if (> x 0) "yes" "no"))

Elisp generation helpers for hive-mcp.

This namespace provides string-based helpers for generating elisp code,
with optional clojure-elisp integration for more advanced use cases.

The string helpers are stable and don't require clojure-elisp to be mature.
As clojure-elisp matures, more features can be migrated to use it.

Usage:
  (require '[hive-emacs.elisp :as el])

  ;; String-based helpers (stable, recommended)
  (el/require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-status)
  ;; => "(progn (require 'hive-mcp-magit nil t) ...)"

  (el/require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-log 10)
  ;; => "(progn ... (json-encode (hive-mcp-magit-api-log 10)) ...)"

  ;; clojure-elisp integration (experimental)
  (el/emit '(if (> x 0) "yes" "no"))
raw docstring

hive-emacs.init

Compatibility facade for the historical hive-emacs entrypoint.

New manifests resolve hive-emacs.addon/addon-ctor directly. These delegates remain for older hosts and callers; they construct only. hive-addon.mount owns registration and lifecycle drive.

Compatibility facade for the historical hive-emacs entrypoint.

New manifests resolve hive-emacs.addon/addon-ctor directly. These delegates
remain for older hosts and callers; they construct only. `hive-addon.mount`
owns registration and lifecycle drive.
raw docstring

hive-emacs.notify

Desktop notifications via notify-send (freedesktop.org).

Provides OS-level notifications that appear in the system notification area, independent of Emacs. Used for hivemind alerts that require human attention.

Desktop notifications via notify-send (freedesktop.org).

Provides OS-level notifications that appear in the system notification area,
independent of Emacs. Used for hivemind alerts that require human attention.
raw docstring

hive-emacs.olympus

Pure Clojure core for Olympus grid view layout calculation.

Layout algorithm: n=1: {:rows 1 :cols 1} ; full screen n=2: {:rows 1 :cols 2} ; side-by-side n=3: {:rows 2 :cols 2 :empty #{[1 1]}} ; 2+1 n=4: {:rows 2 :cols 2} ; 2x2 n=5+: {:tabs (ceil n/4) :per-tab 4} ; tabbed

Pure Clojure core for Olympus grid view layout calculation.


Layout algorithm:
n=1: {:rows 1 :cols 1}           ; full screen
n=2: {:rows 1 :cols 2}           ; side-by-side
n=3: {:rows 2 :cols 2 :empty #{[1 1]}}  ; 2+1
n=4: {:rows 2 :cols 2}           ; 2x2
n=5+: {:tabs (ceil n/4) :per-tab 4}  ; tabbed
raw docstring

hive-emacs.runtime-ports

Injected runtime capabilities used by host-neutral hive-emacs services.

Ports are plain functions installed by IAddon initialization. No symbol in this namespace names or resolves a concrete host. Missing query ports return empty values; missing mutation ports report an explicit unavailable result.

Injected runtime capabilities used by host-neutral hive-emacs services.

Ports are plain functions installed by IAddon initialization. No symbol in
this namespace names or resolves a concrete host. Missing query ports return
empty values; missing mutation ports report an explicit unavailable result.
raw docstring

hive-emacs.schema

Malli contracts shared by ports, domain logic, tools, and proof facets.

Malli contracts shared by ports, domain logic, tools, and proof facets.
raw docstring

hive-emacs.tools.emacs

Consolidated Emacs CLI tool.

Absorbs all buffer.clj and docs.clj functionality into a single consolidated tool. Docs are nested under a :docs subtree (e.g. emacs docs describe-function).

Owned entirely by hive-emacs and exposed as declarative IAddon tool data.

Consolidated Emacs CLI tool.

Absorbs all buffer.clj and docs.clj functionality into a single
consolidated tool. Docs are nested under a :docs subtree
(e.g. emacs docs describe-function).

Owned entirely by hive-emacs and exposed as declarative IAddon tool data.
raw docstring

hive-emacs.tools.support

Host-neutral MCP response and command-dispatch helpers.

Host-neutral MCP response and command-dispatch helpers.
raw docstring

hive-emacs.vessel

Host-neutral Emacs vessel capability.

A host adapter may translate this descriptor into its own vessel protocol. Context and capability lookups are injected runtime ports.

Host-neutral Emacs vessel capability.

A host adapter may translate this descriptor into its own vessel protocol.
Context and capability lookups are injected runtime ports.
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