docs(#2627): add READMEs for the remaining infra crates

Second increment of the per-crate README effort, covering the rest of the
infra/wire/priv column: hive-priv, hive-metric, hive-types, hive-sh4re,
hive-core-agent-sock, hive-agent-sock. Same shape as the first batch —
purpose + when-to-use, and point at the crate-root //! docs plus the
relevant docs/ pages rather than duplicating them. Wires
readme = "README.md" into each Cargo.toml [package].

Disjoint from the batch-1 crates, so the two increments compose cleanly.
This commit is contained in:
atlas 2026-07-23 12:37:04 +02:00 committed by mara
commit bbfc578c95
12 changed files with 162 additions and 0 deletions

View file

@ -2,6 +2,7 @@
name = "hive-types"
edition.workspace = true
version.workspace = true
readme = "README.md"
[lints]
workspace = true

18
hive-types/README.md Normal file
View file

@ -0,0 +1,18 @@
# hive-types
Foundational shared **newtypes** for the hyperhive workspace. A zero-dependency
(bar `serde`) leaf crate, so every wire-type crate (`hive-sh4re`,
`hive-host-sock`, `hive-core-agent-sock`) and both binaries (`hive-c0re`,
`hivectl`) can share them without cross-crate coupling and without growing
`hive-sh4re`.
## What's here
- **`Ident`** — a validated agent-name newtype. Typing agent-name fields as
`Ident` (rather than bare `String`) gets serde-validated parsing **at the
socket boundary for free**: a malformed name is rejected at deserialize time
instead of flowing into a handler that has to re-validate by hand.
The crate is deliberately a leaf with the smallest possible dependency footprint
so anything in the workspace can depend on it. See `docs/conventions.md`
("identity = socket") for how agent identity is modelled across the sockets.