Autonomous control plane for the Logos network state workspace. Manages the module lifecycle across 55 Git submodules: snapshots state, verifies modules in sandbox, detects upgrades, generates dependency-ordered proposals as patches, and gates activation through a progressive governance pipeline.

Built on Agentix, a safety-first agent control layer for NixOS.

Architecture

The daemon runs a loop every N seconds:

Snapshot — captures all 55 submodule SHAs, tracked diffs, untracked file hashes in <1 second.

Verify — loads each module via the Logos host binary in a sandboxed temp directory.

Self-heal — if a module regressed since last cycle, auto-rollback to last known good commit. No human intervention.

Policy — enforces configurable rules: RLN for messaging modules, forbidden flake overrides, submodule drift, signed metadata.

Upgrade detection — compares local pins against remote master, orders by dependency (leaves first via topological sort of flake.nix).

Proposals — creates a git worktree per upgrade, pins the submodule, saves the diff as a .patch. Never applied automatically.

Governance — three backends, same interface:

Backend Status Description
Human Working Approve/reject/apply via CLI
Multisig Stubbed N-of-M signatures, falls back to human
On-chain program Stubbed Verifiable policy, falls back to human

Audit — tamper-evident JSONL chain with SHA-256 CID linking. Designed for publishing to Codex.

Notifications — Telegram alerts on health checks, proposals, rollbacks. Desktop notifications via notify-send.

Stack

  • Python, Click CLI, systemd service on NixOS
  • Extends Agentix core (propose/sandbox/audit/approve)
  • Module verification via logos_host binary
  • 200 unit tests, 19 integration tests, mypy clean, ruff clean

Status

Working: daemon, snapshots, verification, self-healing, upgrade detection, dependency ordering, human governance, Telegram alerts, audit chain, policy enforcement.

Needs upstream: Logos workspace master build issues (3 PRs filed against logos-co repos).

Not yet built: multisig/on-chain governance (interfaces exist), Codex audit publishing (local chain works), web dashboard.

Links