Skip to content

Latest commit

 

History

89 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

πŸ–§ CosMix

CosMix is an agent-operable computing system: legible, modifiable, and reconstructible by design. Not a desktop with AI features β€” an AI-first foundation that currently manifests as a Linux desktop plus a mesh service stack. The intended primary operator is an AI agent; the intended primary user is an AI-first developer driving the system through such agents.

This is the whole project in one repository: the Bus protocol, the Mix language, the daemon family, the desktop, and the documentation site (cosmix.dev).

Get it running

git clone https://github.com/markc/cosmix ~/Projects/cosmix
~/Projects/cosmix/bootstrap
. ~/Projects/cosmix/env
mix man overview

That is the entire install. bootstrap is a small POSIX-sh script β€” the one thing that runs before mix exists β€” which installs a Rust toolchain via rustup if you have none, builds mix, and hands over to setup.mix, which builds everything else and installs the binaries. Nothing needs root.

  • Clone it anywhere. The directory bootstrap lives in is $COSMIX; ~/Projects/cosmix is only the documented default. Every path β€” source, binaries, config, state β€” derives from that one root, and the binaries find it from their own location, so no environment variable is required to run them (env is what you source to put bin/ on your PATH).
  • Remove it by deleting the directory. rm -rf $COSMIX removes the install completely; cloning and running bootstrap again recreates it.
  • Update: git pull && mix setup.mix β€” the same script, re-run, rebuilds and reinstalls (it is idempotent).
  • setup.mix --desktop also builds the desktop; --system additionally copies the binaries to /opt/cosmix/bin with sudo (the systemd units under src/_etc expect them there β€” installing those is deploy tooling's job).

Layout β€” everything keyed off $COSMIX

$COSMIX/
β”œβ”€β”€ bootstrap        the pre-mix installer (sh); its directory defines $COSMIX
β”œβ”€β”€ setup.mix        everything after that, in Mix; re-run to rebuild/reinstall
β”œβ”€β”€ env              generated: `. $COSMIX/env` exports COSMIX and adds bin/ to PATH
β”œβ”€β”€ bin/             generated: installed binaries          ($COSMIX_BIN)
β”œβ”€β”€ etc/ var/ run/ log/ tmp/   generated runtime tree       ($COSMIX_ETC …)
β”œβ”€β”€ src/             ONE Cargo workspace                    ($COSMIX_SRC)
β”‚   β”œβ”€β”€ crates/      every crate, flat: bus family, mix, substrate libs, daemons
β”‚   β”œβ”€β”€ desktop/     the desktop β€” its own workspace + toolchain (Bevy/Smithay)
β”‚   β”œβ”€β”€ _etc/        systemd units, polkit rules, sysusers, tmpfiles (shipped templates)
β”‚   └── rust-toolchain.toml   the compiler every clone builds with
└── docs/            the cosmix.dev site: bus/ cos/ mix/ manuals (source of truth), bugs/, dev/

The runtime tree is resolved by one rule shared by mix and every daemon (src/crates/cosmix-lib-config/src/paths.rs): $COSMIX from the environment, else self-located from the running binary, else the documented default; COSMIX_<KIND> overrides any single directory. A system install at /opt/cosmix/bin with no checkout above it keeps the usual FHS/XDG locations (/etc/cosmix, /var/lib/cosmix, ~/.config/cosmix, …).

What is in the workspace

CosMix is a one-way dependency chain β€” bus ← mix ← cos β€” that used to be three repositories and is now three groups of crates in one workspace. The name is the architecture: Cos + Mix.

Group Crates What it is
Bus cosmix-lib-bus, -client, -buildinfo, -log, -props-core The CosMix Agent Bus. The wire protocol, client, and shared primitives every layer talks over. Depends on nothing. β†’ docs
Mix cosmix-lib-mix, cosmix-mix, mix-bench Mesh & Interprocess eXchange. A pure-Rust, ARexx-inspired shell and scripting language with native keywords for routing messages across the mesh. Depends on bus. β†’ manual
Cos everything else under src/crates/ Cooperative Operating System. The daemon family β€” broker, mail, web, DNS, knowledge indexer, agent runtime β€” plus the foundation libraries they share. Depends on bus + mix. β†’ docs
Desktop src/desktop/ The compositor (cosmix-comp), the ctk toolkit and the apps. A separate workspace because it pins its own toolchain and vendors patched Smithay/wgpu.

Origin note: CoS was first named for the Claude and Codex agents that co-authored the codebase; it now reads as the Cooperative Operating System layer.

Documentation β€” cosmix.dev

docs/ is the GitHub Pages source for cosmix.dev. The manuals are written there directly β€” docs/mix/*.md is what mix man reads locally and what cosmix.dev/mix/ serves β€” so a doc edit and the code it describes land in the same commit.

URL Documents
cosmix.dev/bus/ Bus protocol family β€” wire protocol, vocabularies, client, per-crate references
cosmix.dev/mix/ Mix language manual β€” syntax, builtins, man pages, per-crate references
cosmix.dev/cos/ Daemon family + foundation libraries, per-crate references
cosmix.dev/bugs/ Public bug reports β€” upstream defects found and root-caused during CosMix development
cosmix.dev/history The story so far β€” six months of decisions, reversals and what stuck, in one sitting

Every doc has a clean URL β€” cosmix.dev/<section>/<page> β€” served by a pre-generated HTML shell beside each markdown file. The shells are generated, not written: after adding, renaming or removing a doc, regenerate and commit them with mix docs/build/gen-doc-pages.mix. docs/dev/{bus,mix,cos}/ keeps each former repository's agent-facing notes (README, CLAUDE.md, AGENTS.md), rewritten to the monorepo paths.

The thesis

The system is the project. Everything else β€” the desktop, the Bus-flavoured IPC, the sovereign mesh, the Mix language, the mail stack β€” is one of its surfaces, not its identity.

Lineage: AmigaOS / ARexx (every app is an addressable message port), Smalltalk / Lisp machines (a live, self-reflective image), Plan 9 (everything is a namespace). The novel contribution is an AI agent as a first-class operator of self-observation, self-modification, and self-reconstruction β€” which none of the precedents could have, because the agents didn't exist.

Three design criteria

Every architectural decision is filtered through three questions:

  1. More legible to agents? β€” state queryable as structured data; code paths introspectable; events as accessible log streams; schemas agent-readable.
  2. More modifiable by agents? β€” config mutable through structured channels, not ad-hoc file edits; component lifecycle agent-operable; schemas updatable at runtime.
  3. More reconstructible by agents? β€” the build system itself agent-operable; sources/deps/artifacts navigable as structured data; the system able to rebuild parts of itself from source changes.

bootstrap + setup.mix are criterion 3 made literal: the whole system rebuilds from one clone with one command, and the only script not written in the system's own language is the one that exists to build that language.

Public repo vs. private control

This repository is public and contains no operator-specific state: no real host names, addresses, domains, keys or deploy targets (a hygiene gate on the maintainer's side refuses commits that carry them). Operational command-and-control β€” deploy scripts, mesh inventory, journals, specs and decision records β€” lives in a private control repo the maintainer keeps beside this one. Contributions go through pull requests here.

Status

CosMix is a research system under active development β€” a bet that AI-first sovereign computing is real and that an agent-operable system is its right shape. The code is exploration residue, not frozen canon; where a document and the code disagree, the three criteria decide.

License

MIT β€” see LICENSE.


πŸ–§ CosMix Β· an agent-operable computing platform Β· 2026 Β© Mark Constable <mc@cosmix.dev>

About

Cosmix β€” the public umbrella for an agent-operable computing substrate (thesis, specs, architecture decisions, build orchestration for amp/mix/cos).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages