server

module
v0.3.162 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 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.

Security

Loomux v1 is single-user: one password protects everything. Whoever logs in, or holds a session token, can:

  • start agents and run shell commands on every machine you registered, as that machine's user;
  • create and destroy machines through the plugins. The Docker plugin uses its Docker engine, which is root on that host.

So don't expose it to the internet as it is. Keep it on localhost, a VPN or a tailnet, or put an authenticating proxy with multi-factor login in front: Loomux has no MFA of its own.

What else to know:

  • Logins. The password is a bcrypt hash; failed logins back off. A login gets a bearer token that stays valid for 30 days after its last use and 90 days at most (LOOMUX_SESSION_TTL, LOOMUX_SESSION_MAX_AGE). Settings → Devices lists them and logs any one out.
  • Agents run with your accounts, on your machines. Each agent is the real Claude Code or Codex CLI, signed in with your account (or given a key from the vault), running as the machine's user. Their default permission modes are Claude Code's --permission-mode auto (its classifier lets routine edits and commands through and stops risky ones for approval, which Loomux shows you) and Codex's --ask-for-approval on-request --sandbox workspace-write. A machine can be set stricter (permission_mode); Loomux never uses a bypass mode.
  • Machines are not a network sandbox. A Docker machine reaches whatever its host reaches, LAN and tailnet included. A Kubernetes machine gets internet egress unless you ask for none.
  • The router model sees what you send. Every chat message goes to the router-model provider you configure, and so does the agents' output, as the machine's relay says: all of it with full (the default), only each agent's final message with last_message, nothing with none (the default only for a machine whose purpose is work). Pick a provider you're comfortable with.
  • Credentials. API keys and tokens in the vault, plugin secrets and the machines' SSH keys are encrypted with AES-256-GCM under LOOMUX_MASTER_KEY, each bound to its record and scope (AEAD additional data). A credential is handed to the agent's environment at launch, so the agent can read it. Known values are redacted from what Loomux relays and stores, as a best effort, not a guarantee.
  • What is checked. SSH host keys are pinned: scanned and confirmed by you for your own hosts, generated and pinned before a machine a plugin makes exists. The web client is served with a strict Content Security Policy and X-Frame-Options: DENY, and HSTS behind a TLS proxy that sets X-Forwarded-Proto: https. The server and agent images carry GitHub build-provenance attestations: gh attestation verify oci://ghcr.io/loomux/server:X.Y.Z -R loomux/server.
  • Logs never contain message text, but error text is logged as it is, and can name hosts, users and paths.

Report a vulnerability privately, as SECURITY.md describes; please don't open a public issue.

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").
api
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/...
apitest
Package apitest runs a real api.Server for tests in another module (LOOM-270, docs/design/tui-client-design.md "How it pins and tests against the server's API").
Package apitest runs a real api.Server for tests in another module (LOOM-270, docs/design/tui-client-design.md "How it pins and tests against the server's API").
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.
loomux-routereval command
loomux-routereval scores a router tier on the routing-evaluation fixtures (LOOM-187): accuracy, latency, tokens and cost.
loomux-routereval scores a router tier on the routing-evaluation fixtures (LOOM-187): accuracy, latency, tokens and cost.
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, resolved confirmations, and ended task holds (LOOM-263).
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, resolved confirmations, and ended task holds (LOOM-263).
tmuxtest
Package tmuxtest gives each test a tmux server of its own (LOOM-210).
Package tmuxtest gives each test a tmux server of its own (LOOM-210).
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.
attest
Package attest verifies plugin executables for loomuxd (LOOM-218): the plugins.Verifier the catalog asks about plugins from the plugin directory.
Package attest verifies plugin executables for loomuxd (LOOM-218): the plugins.Verifier the catalog asks about plugins from the plugin directory.
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.
llmrouter/llmroutertest
Package llmroutertest has fakes of the router model's endpoints for tests and offline evaluation runs: no network, no keys.
Package llmroutertest has fakes of the router model's endpoints for tests and offline evaluation runs: no network, no keys.
llmrouter/routereval
Package routereval scores one router tier against a fixed set of routing and relay decisions (LOOM-187): accuracy, latency, tokens and cost, live against any configured endpoint or offline against a fake.
Package routereval scores one router tier against a fixed set of routing and relay decisions (LOOM-187): accuracy, latency, tokens and cost, live against any configured endpoint or offline against a fake.
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