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.
Dependency-free loader for the Emacs-side hive-mcp bridge.
Dependency-free loader for the Emacs-side hive-mcp bridge.
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.
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)
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.
Auto-heal orphan cleanup for multi-daemon architecture (W3).
Detects lings bound to dead/unhealthy daemons (orphans) and either:
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.
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.
Health-scored heartbeat execution for Emacs daemons.
Health-scored heartbeat execution for Emacs daemons.
Compatibility facade over hive-emacs.runtime-ports.
Compatibility facade over hive-emacs.runtime-ports.
Daemon capacity, affinity, ranking, and selection.
Daemon capacity, affinity, ranking, and selection.
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:
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).
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:
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).
Compatibility facade for daemon ranking, scoring, heartbeat, and redistribution.
Compatibility facade for daemon ranking, scoring, heartbeat, and redistribution.
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.
: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:
`: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)
: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.
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.
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"))
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.
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.
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} ; tabbedInjected 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.
Malli contracts shared by ports, domain logic, tools, and proof facets.
Malli contracts shared by ports, domain logic, tools, and proof facets.
Emacs buffer and bridge handlers owned by hive-emacs.
Emacs buffer and bridge handlers owned by hive-emacs.
Emacs documentation handlers owned by hive-emacs.
Emacs documentation handlers owned by hive-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.
Host-neutral MCP response and command-dispatch helpers.
Host-neutral MCP response and command-dispatch helpers.
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.
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 |