Skip to main content

lm_provision_protocol/
lib.rs

1//! # lm-provision-protocol
2//!
3//! The types that cross the license boundary, and nothing else.
4//!
5//! The workspace has two sides. The engine — `lm-provision`,
6//! `lm-provision-cli`,
7//! [`lm-provision-driver`](https://docs.rs/lm-provision-driver),
8//! `lm-provision-mcp` — is dual-licensed MIT / Apache-2.0 and stays
9//! that way. The control plane — `lm-provision-host`, the
10//! TTL-enforcement daemon — is AGPL-3.0-or-later. Both sides read and
11//! write the same rows, so the vocabulary they share cannot live on
12//! either one: a permissive caller may not link the AGPL crate, and
13//! moving the AGPL crate's types into the permissive ones would
14//! relicense them by the back door. It lives here, permissive,
15//! depended on from both directions.
16//!
17//! **The license boundary is the crate boundary.** That is the only
18//! line a compiler can check, which is why the split was cut before
19//! the host implementation exists rather than after — relicensing code
20//! that has already taken outside contributions needs a CLA or DCO
21//! from every contributor.
22//!
23//! The shared vocabulary is rows a driver appends and the host will
24//! take custody of: the apply-ledger row schema and its JSON Lines
25//! encoding ([`ledger`]); the acquisitions record ([`acquisition`]) —
26//! one row per machine bought, one per machine given back, which is
27//! what a TTL sweep on either side of the boundary reads to know what
28//! is still running; the forwards record ([`forward`]) — the detached
29//! tunnels this host opened and which of them still exist; and the
30//! price record ([`price`]) — one row per (platform, model, instant)
31//! saying what a token costs there, appended by a sync or by hand,
32//! read by the endpoint inventory to put a price beside each endpoint
33//! it lists.
34
35#![warn(missing_docs)]
36
37pub mod acquisition;
38pub mod forward;
39pub mod ledger;
40pub mod price;