design: the shared crate is bxcore (decision of 2026-09-26)
Code constraints: `proto` became `bxcore` in M5b task 00 and holds the code roles share as well as the shared types. Recorded in docs/decisions.md with the M5b spec. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -246,14 +246,14 @@ Files are the source of truth. SQLite is allowed only for rebuildable indexes an
|
|||||||
|
|
||||||
| Crate | Purpose |
|
| Crate | Purpose |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `proto` | Defines the data every role shares and the frame format they exchange it in. |
|
| `bxcore` | Defines the data every role shares and the frame format they exchange it in, and holds the code roles share: the secret store and the sanitizer. Called `proto` until M5b. |
|
||||||
| `toolkit` | Holds the programs that run inside tool containers. |
|
| `toolkit` | Holds the programs that run inside tool containers. |
|
||||||
| `bxctl` | Is the owner's command line: chat, local approvals, checks and maintenance. |
|
| `bxctl` | Is the owner's command line: chat, local approvals, checks and maintenance. |
|
||||||
- No source file over 500 lines. No crate depends on another role's crate, only on `proto`.
|
- No source file over 500 lines. No crate depends on another role's crate, only on `bxcore`.
|
||||||
- Authority is encoded in types: a tool cannot execute without a `Decision` value that only
|
- Authority is encoded in types: a tool cannot execute without a `Decision` value that only
|
||||||
`brokerd`'s policy module can construct. `Decision` is defined in `brokerd`, has a private
|
`brokerd`'s policy module can construct. `Decision` is defined in `brokerd`, has a private
|
||||||
field and does not implement `Deserialize`, so no other crate or wire message can produce one.
|
field and does not implement `Deserialize`, so no other crate or wire message can produce one.
|
||||||
`proto` carries a plain `DecisionRecord` for the audit log and the wire.
|
`bxcore` carries a plain `DecisionRecord` for the audit log and the wire.
|
||||||
- Dependencies are few and justified in `docs/dependencies.md`. `cargo-deny` runs in the gate.
|
- Dependencies are few and justified in `docs/dependencies.md`. `cargo-deny` runs in the gate.
|
||||||
- `make gate` runs offline. Checks that need straylight run in `make verify-device`.
|
- `make gate` runs offline. Checks that need straylight run in `make verify-device`.
|
||||||
- No telemetry, no update checks, no outbound call not listed in `docs/egress.md`.
|
- No telemetry, no update checks, no outbound call not listed in `docs/egress.md`.
|
||||||
|
|||||||
Reference in New Issue
Block a user