server

module
v0.3.81 Latest Latest
Warning

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

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

README

Loomux

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
loomux-plugin-fake command
loomux-plugin-fake is the fake plugin's executable (LOOM-178): a loomux-plugin/1 plugin with nothing behind it, for the host's tests and the conformance suite.
loomux-plugin-fake is the fake plugin's executable (LOOM-178): a loomux-plugin/1 plugin with nothing behind it, for the host's tests and the conformance suite.
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.
retention
Package retention deletes rows the server no longer needs once they are old enough (LOOM-193, docs/design/retention-proposal.md): sessions a while after they expired, finished dispatches, and resolved confirmations.
Package retention deletes rows the server no longer needs once they are old enough (LOOM-193, docs/design/retention-proposal.md): sessions a while after they expired, finished dispatches, and resolved confirmations.
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 plugins is the host side of Loomux's plugin system (LOOM-178, docs/design/target-providers.md §1): the manifest, the catalog of available plugins, the supervisor of a running one, and the manager that installs, configures and runs them.
Package plugins is the host side of Loomux's plugin system (LOOM-178, docs/design/target-providers.md §1): the manifest, the catalog of available plugins, the supervisor of a running one, and the manager that installs, configures and runs them.
fake
Package fake is a plugin for tests (docs/design/target-providers.md §12): no infrastructure behind it, and a configuration that scripts how it behaves, so the host's supervisor, manager and API can be exercised against a real subprocess.
Package fake is a plugin for tests (docs/design/target-providers.md §12): no infrastructure behind it, and a configuration that scripts how it behaves, so the host's supervisor, manager and API can be exercised against a real subprocess.
manifeststamp command
Command manifeststamp writes a release into plugin manifests at build time (LOOM-194; docs/release/versioning.md, "Images"):
Command manifeststamp writes a release into plugin manifests at build time (LOOM-194; docs/release/versioning.md, "Images"):
plugintest
Package plugintest is the conformance suite a loomux-plugin/1 plugin must pass (docs/design/target-providers.md §12): the analogue of registry/storetest and targets/executortest.
Package plugintest is the conformance suite a loomux-plugin/1 plugin must pass (docs/design/target-providers.md §12): the analogue of registry/storetest and targets/executortest.
protocol
Package protocol is the loomux-plugin/1 protocol's vocabulary: the method names the host calls and the parameter and result types they carry (docs/design/target-providers.md §1.3).
Package protocol is the loomux-plugin/1 protocol's vocabulary: the method names the host calls and the parameter and result types they carry (docs/design/target-providers.md §1.3).
rpc
Package rpc is the wire layer of loomux-plugin/1 (docs/design/target-providers.md §1.3): JSON-RPC 2.0 messages in Content-Length frames, the LSP convention, over a subprocess's stdio or a unix socket.
Package rpc is the wire layer of loomux-plugin/1 (docs/design/target-providers.md §1.3): JSON-RPC 2.0 messages in Content-Length frames, the LSP convention, over a subprocess's stdio or a unix socket.
sdk
Package sdk is what a plugin's main calls to speak loomux-plugin/1 (docs/design/target-providers.md §1.3): implement Plugin, hand it to Main, and the plugin serves stdio when started with no arguments or a unix socket with --listen <path> (the sidecar form).
Package sdk is what a plugin's main calls to speak loomux-plugin/1 (docs/design/target-providers.md §1.3): implement Plugin, hand it to Main, and the plugin serves stdio when started with no arguments or a unix socket with --listen <path> (the sidecar form).
Package providers is the host side of the target-provider capability (LOOM-178, docs/design/target-providers.md §1.9, §2): it asks a plugin for a machine and turns it into an ordinary managed remote target, with a Loomux SSH key authorized on it and a host key the host generated and pinned before the machine existed.
Package providers is the host side of the target-provider capability (LOOM-178, docs/design/target-providers.md §1.9, §2): it asks a plugin for a machine and turns it into an ordinary managed remote target, with a Loomux SSH key authorized on it and a host key the host generated and pinned before the machine existed.
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