astrocyte meters the AI usage on one machine. It reads the session stores of
local coding harnesses and broca's run index store directly, accepts usage pushed by peer
modules, and records each request as an immutable usage event. It prices
events in signed nanodollars against the fusiform price catalog, applies
declared subscriptions, and serves spend reports, statement reconciliation and
a subscription multiplier. It runs as a supervised module of the subconscious
daemon (subc) and never sits on a request's hot path. budget.verdict always
returns allow: cap enforcement is not built.
| Crate | Role |
|---|---|
astrocyte-core |
Event identity, ingest, pricing, subscriptions, statements, reconciliation, reports and the SQLite schema. No subc dependency. |
astrocyte-module |
The ck-astrocyte binary: served operations, configuration, the refresher loop, peer clients and producer mappings; the spend_drive and corpus_drive tools. |
astrocyte-readers |
Parsers for coding-harness session stores and provider-name normalization. |
See the architecture overview and the code map.
Use a current stable Rust toolchain. Every dependency resolves from crates.io
through the committed Cargo.lock, so building and testing need only the
toolchain; no sibling checkout is needed:
cargo build --locked -p astrocyte-module
cargo test --workspace --lockedThe build produces target/debug/ck-astrocyte, target/debug/spend_drive and
target/debug/corpus_drive. ck-astrocyte is supervised by subc, not a
standalone daemon; ck-astrocyte --version and ck-astrocyte --check-config <path> run without it. The module surface lists the
operations it serves.
The full gate that CI runs is in CONTRIBUTING.md. The
Windows clippy pass needs the x86_64-pc-windows-gnu target
(rustup target add x86_64-pc-windows-gnu). Replaying the mutation catalogue
needs ckdev-mutate, installed from the revision pinned as CK_MUTATE_REV in
.github/workflows/ci.yml:
cargo install --locked --git https://github.com/cortexkit/commons --rev <CK_MUTATE_REV> cortexkit-mutate
ckdev-mutate check- Data model: ledger tables, event identity, the priced-charge chain and money.
- Harness readers: where each harness store is found and what one event is.
- Module surface: the served operations and the peer calls.
- Money ingest: caller corrections and statement attribution.
- Claude workers contract: declared worker roots and acknowledgements.
- Configuration: the desired configuration file.
- Operations: subscriptions, repricing, basis corrections and multiplier recomputes.
- CONTRIBUTING.md: contribution workflow and verification.
- SECURITY.md: private reporting and the local threat model.
- THIRD-PARTY-NOTICES.md: adapted code.
astrocyte is licensed under the MIT License. Code adapted from other projects keeps its own license; see THIRD-PARTY-NOTICES.md.