Metadata-Version: 2.4
Name: ciris-server
Version: 0.5.147
License-File: LICENSE
Summary: The fabric node — the federation's headless cohabitation runtime (registry + lens [+ node] over one shared substrate), as the abi3 wheel CIRISAgent consumes. agent = fabric node + brain.
Author-email: Eric Moore <eric@ciris.ai>
License: AGPL-3.0-or-later
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/CIRISAI/CIRISServer

# `ciris-server` — the fabric node

**The node of the CIRIS Epistemic Web ([CEWP](https://ciris.ai/cewp)).** One
Rust crate that composes the federation's cores — `ciris-persist` (corpus +
admission), `ciris-edge` (transport + replication), `ciris-verify` (hybrid
post-quantum crypto) — into a runnable federation node, shipped as the headless
`ciris-server` binary **and** the PyO3 abi3 wheel a
[CIRISAgent](https://github.com/CIRISAI/CIRISAgent) embeds. The defining
identity: **`agent = fabric node + brain`** — the same composition folds into an
agent; packaged alone it attests, stores, replicates, scores, and serves, but it
does **not** reason, decide, or act. Infrastructure must not have agency.

Server is built on two disciplines: **the API never touches the runtime — it
writes CEG, and the runtime is CEG-driven** (every control surface authors a
signed claim; controller loops converge the live node to the corpus, hot, no
restart), and **zero environment variables** — a node's entire configuration is
signed `config:*` CEG resolved at boot (`--home` + key identity, nothing else).
The fabric IS the config, the same way the agent IS its graph.

> **📖 The model: [`FSD/CEG_REPLICATION_MODEL.md`](FSD/CEG_REPLICATION_MODEL.md)** —
> the 3-gate replication model, the 14 EnvelopeKinds carrying all 95 CC-3.1
> claim families, and the classical-edge audit. The per-family card/vocabulary
> manifest lives in [`FSD/NAMESPACE_SUPERSETS.md`](FSD/NAMESPACE_SUPERSETS.md)
> (versioned; regenerated against pinned constitution + registry revs). Start there.

## What ciris-server does

```
rich clients (KMP app · CIRISAgent · status)          ┌─ owner ops: claim (NodeCode+PIN),
    │ consume the control surface                     │  consent grants, config:*, trust roots
    ▼                                                 │
ciris-server ── writes CEG ── controller loops ───────┤  reconcile: consent topology → live
    │  compose · identity · owner-binding · scorer    │  replication peers (4 planes/peer),
    ▼  safety (age·moderation·watchlist) · genesis    │  config re-resolve, announce rooting
ciris-edge ──── anti-entropy over Reticulum/HTTPS ────┘
    ▼
ciris-persist ── keys · attestations · trace · admission (Registry-of-Record)
```

One identity per node, **by construction** — `cfg.key_id` derives from the
engine's own signing identity, so every plane (claim, NodeCode, owned-nodes,
self-publish, edge signer) agrees on who this node is. Library composition, not
sidecars: the agent links the same wheel instead of assembling cores itself.

## Read in this order

1. **[`MISSION.md`](MISSION.md)** — the WHY. M-1 (sustainable adaptive coherence),
   the fabric-node discipline, de-singletonized infrastructure, the stewardship
   covenant ("the work belongs to whoever keeps it running").
2. **[`FSD/CEG_REPLICATION_MODEL.md`](FSD/CEG_REPLICATION_MODEL.md)** — how state
   moves: every flow gated by a verified signed claim; no copies, no outboxes.
3. **[`FSD/THREAT_MODEL.md`](FSD/THREAT_MODEL.md)** — "ingest is open and cheap;
   admission is the gate." **[`FSD/TRUST_ROOT_CAPABILITY_GATE.md`](FSD/TRUST_ROOT_CAPABILITY_GATE.md)** —
   how `infra:serve` / `infra:attest` are conferred and why no root ⇒ no capability.
4. **[`FSD/SERVER_1.0_PLAN.md`](FSD/SERVER_1.0_PLAN.md)** — the build plan on the
   agent train (0.5 config-as-CEG → 0.6 +registry → 1.0 +node consensus).

## The shape of the node (one-paragraph tour)

A node boots from the **baked genesis** — the canonical seed minted in a human
co-scrub ceremony ships inside persist, so a fresh node starts **already rooted
to a real trust root** — and resolves its config from signed `config:*` claims.
An owner **claims** it (NodeCode + one-time PIN); ownership is an
**owner-binding** (`delegates_to` + identity occurrence + cohort scope), never
an auth role. The owner authors **`consent:replication:v1` grants** through the
API — and those consent objects **ARE the replication topology**: a reconciler
loop converges the live runtime to them (four anti-entropy planes per consented
peer — Attestation, Key, IdentityOccurrence, TransportDestination), adds
becoming active initiators at runtime, revocations stopping cold, no restart.
Payloads follow the consent edge: promotion inherits the grant's full audience
(tier **and** cohort scope). Serving is capability-gated — a canonical is, by
definition, a node whose record carries accord-conferred
`infra:serve`+`infra:attest` roles rooted to a root this node trusts: **being a
server IS the consent to serve**. Consumer policy stays constitutional at
runtime too (CC 4.1.4: a consent peer that turns `withdraws`-arbitrager is
refused per-tick, and re-admitted when it mends). The scorer folds inbound
traces into `capacity:*` attestations; the safety surfaces (age assurance,
moderation, watchlist) emit their own signed, federation-visible claims. All of
it hybrid Ed25519 + ML-DSA-65, and the replication/serve policy manifests are
**drift-witnessed** — hash-pinned by gate tests that fail the build if policy
moves without a deliberate cut.

## A node *and* a client

`ciris-server` renders no UI; it exposes the full control surface, and rich
clients consume it. The vendored [`client/`](client/) — the same
Kotlin-Multiplatform app as CIRISAgent's, minus the agent (brain) cards — mints
hardware-rooted federation IDs (YubiKey / TPM / Secure Enclave, software
fallback), claims nodes, manages trust roots and consent objects, and renders
the CEG surfaces. Headless works too:

```sh
pip install ciris-server        # the abi3 wheel (or: cargo build --release)
ciris-server                    # boots a zero-setup node; unclaimed → prints NodeCode + claim PIN
ciris-server identity create --backend pkcs11   # YubiKey-backed CIRIS-V2- fedcode
```

Data under `$CIRIS_HOME`, SQLite corpus (Postgres via config), Reticulum
transport up by default. The same wheel is CIRISAgent's substrate: one PyO3
registry, one shared engine, one edge runtime.

## Status

**v0.5.x — the CEG-native node.** Config-as-CEG shipped (zero env vars,
owner-authored, hot-reconciled). The federation trace arc is proven end-to-end
across the substrate triple — seal → consent → converge → bootstrap → root →
heal → publish → transfer → admit → attribute → serve — with each gate named,
logged, and regression-pinned (the #315 saga). One-node-identity closed by
construction (0.5.138). Substrate pins: **persist v21.4.0 / edge v14.4.0 /
verify v10.6.3** — hybrid PQ throughout, Registry-of-Record admission,
drift-witnessed policy hashes. `ciris-lens-core` is absorbed in-tree
([`crates/ciris-lens-core`](crates/ciris-lens-core)); the standalone lens
deployment is retired — a central dashboard the whole federation reads is
itself the singleton this architecture forbids.

Roadmap (the CIRISAgent train): **0.5** config-as-CEG (here) → **0.6**
+registry authority → **1.0** +node consensus, the complete fabric node.

## Sister repos

- [`CIRISConstitution`](https://github.com/CIRISAI/CIRISConstitution) — the
  canonical CEG spec; Part 3's namespace registry is vendored and hash-pinned
  into persist.
- [`CIRISPersist`](https://github.com/CIRISAI/CIRISPersist) — substrate: keys,
  attestations, trace, admission; ships the baked genesis seed.
- [`CIRISEdge`](https://github.com/CIRISAI/CIRISEdge) — transport + replication:
  the 14 kinds over Reticulum/HTTPS/packet-radio; consent *is* routing.
- [`CIRISVerify`](https://github.com/CIRISAI/CIRISVerify) — hybrid crypto
  primitives (Ed25519 + ML-DSA-65, X-Wing), consumed via persist.
- [`CIRISAgent`](https://github.com/CIRISAI/CIRISAgent) — the brain; embeds this
  node via the one wheel and emits the signed traces it federates.

## License

[AGPL-3.0-or-later](LICENSE) — matching the CIRIS ecosystem.

