server

module
v0.3.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT

README

Loomux — server

Chat-driven interface to on-demand, tmux-backed coding agents, with a lightweight swappable router model deciding routing/relay between the chat and the agent fleet. A human can SSH into wherever an agent is running and attach to its tmux session directly, without breaking the automated side.

Status: pre-alpha — domain layer (registry, targets, orchestrator, completion detection, credentials, router, LLM-backed routing model, task-continuation) plus a client-facing HTTP API with login-gated auth are wired into a runnable cmd/loomuxd process. Web/Android/iOS clients themselves remain future, separate work.

Design

The core design spec lives at docs/design/core-design.md. It covers the workspace registry, execution targets (local/remote via SSH), the tmux interaction and takeover model, tiered completion detection, the hybrid credential model, pluggable storage, client auth, and versioning.

Explicitly deferred to their own future specs: the web/Android/iOS clients, the specific router-model vendor, and concrete agent-type adapters beyond the interface they implement.

Deployment

loomuxd ships as a container image, ghcr.io/loomux/server — see docs/deploy/container.md for how it's built (including why the runtime base is not scratch/distroless, and how the web client's static bundle is sourced), its configuration, and its health probe.

Layout

Each top-level directory corresponds to a component boundary from the design spec — see each directory's own README for what belongs there and which spec section it implements.

Tracking

  • Vikunja project Loomux (command-center instance)
  • Plane project LOOM (command-center instance), epic "Loomux — Chat-Driven Multi-Agent Orchestration Platform"

Directories

Path Synopsis
Package agents holds the agent-type adapters: what Loomux knows about launching each supported agent CLI (design spec §6 — "each registered agent-type supplies a launch command template and a completion-detection adapter").
Package agents holds the agent-type adapters: what Loomux knows about launching each supported agent CLI (design spec §6 — "each registered agent-type supplies a launch command template and a completion-detection adapter").
Package api is Loomux's client-facing HTTP surface (design spec §9, §10 axis 1): a versioned /api/v1/...
Package api is Loomux's client-facing HTTP surface (design spec §9, §10 axis 1): a versioned /api/v1/...
Package app is Loomux's composition root: it wires the workspace registry, TargetExecutor, orchestrator, completion detection, credential vault, and router dispatch pipeline (design spec §2-§7) into a runnable App with a single Dispatch operation.
Package app is Loomux's composition root: it wires the workspace registry, TargetExecutor, orchestrator, completion detection, credential vault, and router dispatch pipeline (design spec §2-§7) into a runnable App with a single Dispatch operation.
cmd
loomuxd command
Command loomuxd is the Loomux server process: a thin wrapper around app.Build's fully wired domain layer and api.NewServer's client-facing HTTP surface (design spec §9, §10 axis 1, LOOM-9).
Command loomuxd is the Loomux server process: a thin wrapper around app.Build's fully wired domain layer and api.NewServer's client-facing HTTP surface (design spec §9, §10 axis 1, LOOM-9).
Package completion implements the real tiered CompletionDetector (design spec §5) behind orchestrator.CompletionDetector: tiers 1+2 (native hook / prompt-engineered self-report) share one marker-watching mechanism (marker.go); tier 3 (idle-time heuristic, the true last resort) polls a task's pane for CapturePane output going quiet (idle.go).
Package completion implements the real tiered CompletionDetector (design spec §5) behind orchestrator.CompletionDetector: tiers 1+2 (native hook / prompt-engineered self-report) share one marker-watching mechanism (marker.go); tier 3 (idle-time heuristic, the true last resort) polls a task's pane for CapturePane output going quiet (idle.go).
Package credentials implements the "everything else" half of design spec §7's hybrid credential model: GitHub/GitLab PATs, MCP tokens, and custom API keys, resolved with workspace/agent-type scoping precedence on top of the vault registry.Store owns (§8 groups the registry tables and the credential vault under one storage interface).
Package credentials implements the "everything else" half of design spec §7's hybrid credential model: GitHub/GitLab PATs, MCP tokens, and custom API keys, resolved with workspace/agent-type scoping precedence on top of the vault registry.Store owns (§8 groups the registry tables and the credential vault under one storage interface).
Package dispatch runs chat dispatches as jobs that outlive the HTTP request which submitted them (LOOM-80, design spec docs/design/async-dispatch-design.md).
Package dispatch runs chat dispatches as jobs that outlive the HTTP request which submitted them (LOOM-80, design spec docs/design/async-dispatch-design.md).
internal
health
Package health implements Loomux's deep health checks (LOOM-105).
Package health implements Loomux's deep health checks (LOOM-105).
metrics
Package metrics owns Loomux's Prometheus instrumentation.
Package metrics owns Loomux's Prometheus instrumentation.
Package notify tells the user about work that finished while they weren't looking (LOOM-102): a turn done, failed, or stopped on a prompt only they can answer.
Package notify tells the user about work that finished while they weren't looking (LOOM-102): a turn done, failed, or stopped on a prompt only they can answer.
Package orchestrator wires the workspace registry (registry.Store) and TargetExecutor together into task lifecycle management: launching a task, sending follow-up input, tearing a task down, and the takeover/release handshake.
Package orchestrator wires the workspace registry (registry.Store) and TargetExecutor together into task lifecycle management: launching a task, sending follow-up input, tearing a task down, and the takeover/release handshake.
detectortest
Package detectortest provides a trivial CompletionDetector stand-in for tests: ManualDetector.Wait blocks until Signal is called for the same task, or the context is done.
Package detectortest provides a trivial CompletionDetector stand-in for tests: ManualDetector.Wait blocks until Signal is called for the same task, or the context is done.
Package registry defines the workspace registry's domain types and the Store interface that backend implementations satisfy.
Package registry defines the workspace registry's domain types and the Store interface that backend implementations satisfy.
sqlite
Package sqlite is a registry.Store implementation backed by SQLite via the pure-Go modernc.org/sqlite driver (no cgo), so the server can still build as a single static binary.
Package sqlite is a registry.Store implementation backed by SQLite via the pure-Go modernc.org/sqlite driver (no cgo), so the server can still build as a single static binary.
storetest
Package storetest is the backend-conformance test suite for registry.Store.
Package storetest is the backend-conformance test suite for registry.Store.
Package router wires the workspace registry, orchestrator, completion detection, and credential vault together into the dispatch pipeline (design spec §2, §6): given an incoming chat message, decide which workspace to use (or provision a new one), launch or provision via the orchestrator, and relay the result back.
Package router wires the workspace registry, orchestrator, completion detection, and credential vault together into the dispatch pipeline (design spec §2, §6): given an incoming chat message, decide which workspace to use (or provision a new one), launch or provision via the orchestrator, and relay the result back.
llmrouter
Package llmrouter is a real, LLM-backed implementation of router.RoutingModel (design spec §6): a generic OpenAI-Chat-Completions -compatible client parameterized by a primary and an optional escalation tier, so swapping vendor/model is a config change, not a code change.
Package llmrouter is a real, LLM-backed implementation of router.RoutingModel (design spec §6): a generic OpenAI-Chat-Completions -compatible client parameterized by a primary and an optional escalation tier, so swapping vendor/model is a config change, not a code change.
routertest
Package routertest provides a deterministic RoutingModel stand-in for tests.
Package routertest provides a deterministic RoutingModel stand-in for tests.
Package targets defines the TargetExecutor interface — the mechanism that runs tmux operations against a registry.Target, either locally or over SSH.
Package targets defines the TargetExecutor interface — the mechanism that runs tmux operations against a registry.Target, either locally or over SSH.
executortest
Package executortest is the shared behavioral test suite for targets.TargetExecutor.
Package executortest is the shared behavioral test suite for targets.TargetExecutor.
sshtest
Package sshtest is test-only infrastructure: a minimal in-process SSH server for exercising the real ssh client binary against a loopback target, satisfying the design spec's requirement that TargetExecutor be testable against a local/loopback SSH target.
Package sshtest is test-only infrastructure: a minimal in-process SSH server for exercising the real ssh client binary against a loopback target, satisfying the design spec's requirement that TargetExecutor be testable against a local/loopback SSH target.
Package version holds loomuxd's own release version (design spec §10 axis 4) — independent of the API version (axis 1, /api/v1/...): a server patch release doesn't force an API version bump, only a breaking API change does.
Package version holds loomuxd's own release version (design spec §10 axis 4) — independent of the API version (axis 1, /api/v1/...): a server patch release doesn't force an API version bump, only a breaking API change does.
Package webbundle keeps the web client loomuxd serves current without rebuilding or redeploying its image (LOOM-118).
Package webbundle keeps the web client loomuxd serves current without rebuilding or redeploying its image (LOOM-118).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL