AGENTS.md, CLAUDE.md, dependencies: the shared crate is bxcore

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 01:49:21 -07:00
co-authored by Claude Opus 5.5
parent 2b3ae080b4
commit 9672cb5e53
3 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ Unix sockets. You are implementing it one task at a time.
- No dependency that the task file does not name. All external dependencies are declared in the - No dependency that the task file does not name. All external dependencies are declared in the
root `Cargo.toml` under `[workspace.dependencies]`, used with `name.workspace = true`, and have a root `Cargo.toml` under `[workspace.dependencies]`, used with `name.workspace = true`, and have a
row in `docs/dependencies.md`. row in `docs/dependencies.md`.
- `proto` depends on no workspace crate. Every other crate depends on `proto` only, never on - `bxcore` (formerly `proto`) depends on no workspace crate. Every other crate depends on `bxcore`
another role crate. only, never on another role crate.
- No source file over 500 lines. - No source file over 500 lines.
- Library code never panics on input: no `unwrap`, `expect`, `panic!`, indexing that can go out of - Library code never panics on input: no `unwrap`, `expect`, `panic!`, indexing that can go out of
bounds, or `as` casts that can lose data on untrusted values. Tests may use them. bounds, or `as` casts that can lose data on untrusted values. Tests may use them.
+4 -3
View File
@@ -96,14 +96,15 @@ Separate binaries in one Cargo workspace. Each role holds as little authority as
`!approve`/`!deny` replies over the WebSocket. `!approve`/`!deny` replies over the WebSocket.
- `inferproxy` is a ~100-line byte forwarder from a Unix socket to the shared `llama-server` - `inferproxy` is a ~100-line byte forwarder from a Unix socket to the shared `llama-server`
router on the host. It is required, because `loopd` has no network. router on the host. It is required, because `loopd` has no network.
- `proto` holds shared types. `toolkit` holds tool container entrypoints. - `bxcore` (formerly `proto`) holds shared types, and from M5b the secret store and the
sanitizer. `toolkit` holds tool container entrypoints.
Structural rules that span crates: Structural rules that span crates:
- No crate depends on another role's crate. Crates depend only on `proto`. - No crate depends on another role's crate. Crates depend only on `bxcore`.
- Authority is encoded in types. A tool can't run without a `Decision`. It is defined in - Authority is encoded in types. A tool can't run without a `Decision`. It is defined in
`brokerd` with a private field and no `Deserialize`, so only the policy module can construct `brokerd` with a private field and no `Deserialize`, so only the policy module can construct
one (covered by a compile-fail test). `proto` carries a plain `DecisionRecord`. one (covered by a compile-fail test). `bxcore` carries a plain `DecisionRecord`.
- No source file over 500 lines. - No source file over 500 lines.
- Files are the source of truth (`sessions/`, `memory/`, `grants/`, `audit/`). SQLite is only - Files are the source of truth (`sessions/`, `memory/`, `grants/`, `audit/`). SQLite is only
for rebuildable indexes and queues. for rebuildable indexes and queues.
+5 -5
View File
@@ -4,11 +4,11 @@ Every external crate has a row here. `scripts/check-dep-docs.sh` enforces it.
| Crate | Version | Used by | Why | | Crate | Version | Used by | Why |
|---|---|---|---| |---|---|---|---|
| `serde` | 1.0.229 | `proto`, `brokerd`, `toolkit`, `gatewayd` | Derives serialization for every shared type. MIT OR Apache-2.0. | | `serde` | 1.0.229 | `bxcore`, `brokerd`, `toolkit`, `gatewayd` | Derives serialization for every shared type. MIT OR Apache-2.0. |
| `serde_json` | 1.0.151 | `proto`, `brokerd`, `toolkit`, `gatewayd` | JSON for frames and log files. MIT OR Apache-2.0. | | `serde_json` | 1.0.151 | `bxcore`, `brokerd`, `toolkit`, `gatewayd` | JSON for frames and log files. MIT OR Apache-2.0. |
| `humantime` | 2.4.0 | `proto` | RFC 3339 timestamps. No dependencies of its own. MIT OR Apache-2.0. | | `humantime` | 2.4.0 | `bxcore` | RFC 3339 timestamps. No dependencies of its own. MIT OR Apache-2.0. |
| `toml` | 1.1.6 | `proto` tests; `brokerd` and `bxctl` from M3, `gatewayd` from M4a | Parses grant files. MIT OR Apache-2.0. | | `toml` | 1.1.6 | `bxcore` tests; `brokerd` and `bxctl` from M3, `gatewayd` from M4a | Parses grant files. MIT OR Apache-2.0. |
| `emsha` | 1.0.4 | `proto` | SHA-256. Written by the owner; no dependencies, no `unsafe`. Checked against `sha256sum` on 3,204 inputs. | | `emsha` | 1.0.4 | `bxcore` | SHA-256. Written by the owner; no dependencies, no `unsafe`. Checked against `sha256sum` on 3,204 inputs. |
| `rustls` | 0.23.45 | `gatewayd` | TLS to Mattermost over the tailnet (M4a, owner's decision). `default-features = false` with `ring`, `std`, `tls12`. With its dependencies on Linux: `ring` (Apache-2.0 AND ISC; builds C and assembly), `rustls-webpki` and `untrusted` (ISC), `rustls-pki-types`, `subtle` (BSD-3-Clause), `zeroize`, `once_cell`, `getrandom`, `libc`, `cfg-if`. Apache-2.0 OR ISC OR MIT. | | `rustls` | 0.23.45 | `gatewayd` | TLS to Mattermost over the tailnet (M4a, owner's decision). `default-features = false` with `ring`, `std`, `tls12`. With its dependencies on Linux: `ring` (Apache-2.0 AND ISC; builds C and assembly), `rustls-webpki` and `untrusted` (ISC), `rustls-pki-types`, `subtle` (BSD-3-Clause), `zeroize`, `once_cell`, `getrandom`, `libc`, `cfg-if`. Apache-2.0 OR ISC OR MIT. |
| `rustls-native-certs` | 0.8.4 | `gatewayd` | The host's trusted certificates, so a CA installed on the host is trusted too; adds `openssl-probe`. Apache-2.0 OR ISC OR MIT. | | `rustls-native-certs` | 0.8.4 | `gatewayd` | The host's trusted certificates, so a CA installed on the host is trusted too; adds `openssl-probe`. Apache-2.0 OR ISC OR MIT. |
| `zeroize` | 1.9.0 | `gatewayd` | Wipes a secret's memory when it is dropped (`Secret`). Already a dependency of `rustls`. Apache-2.0 OR MIT. | | `zeroize` | 1.9.0 | `gatewayd` | Wipes a secret's memory when it is dropped (`Secret`). Already a dependency of `rustls`. Apache-2.0 OR MIT. |