| Filename | Latest commit message | Latest commit date |
|---|---|---|
`age_seconds` is documented on the LooseEnd enum as saturating to zero on any clock anomaly, but the derivation was in three places: hive-c0re had a named `saturating_age` helper with tests, and the in-agent socket server hand-rolled the same two lines twice, untested. Move the helper to hive-sh4re::inbox, beside the enum whose contract it implements and inside the one crate both producers already depend on. Its three tests move with it (not dropped) and gain two arms: the whole-i64 range, where the saturating_sub is what stops the subtraction overflowing, and a far-past control so those zeros are the clamp firing rather than the function bottoming out on large inputs. The two clamps are not redundant, which is what `to_loose_end`'s doc got wrong: it credited "saturating" for the zero, but saturating_sub bottoms out at i64::MIN, still negative. The try_from is what yields 0. Also cover the two projections themselves, which is the part the shared helper cannot: that a reminder ages from created_at rather than due_at, and a todo from updated_at, with a future timestamp reading 0 through both and a past-timestamp control on each. |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
hive-sh4re
The shared payload vocabulary between hive-c0re and the in-container
harness — the common types (Message, Approval, LooseEnd, HelperEvent, …)
that the per-socket wire protocols are built from. The request/response
envelopes themselves now live in the per-socket crates (below); this crate
holds the payloads they carry.
Where it sits
This is the shared payload crate; the per-socket protocol envelopes have been
split into their own smaller crates so specialised binaries don't have to pull
in all of hive-sh4re:
hive-host-sock— host admin socket (hivectl↔hive-c0re)hive-core-agent-sock— per-agent/manager socket (/run/hive/mcp.sock)hive-priv-sock— the privileged-helper socket
Those crates re-export or reference the payload types that still live here
(Approval, Message, LooseEnd, …).
Modules
wire_time— the timestamp convention: wire fields arechrono::DateTime<Utc>(serialized RFC 3339), while sqlite storage + input args stay unix-epochi64; this module owns the two boundary conversions.paths— well-known on-disk path helpers.assets— resolves bundled runtime asset paths (branding, prompts) underHIVE_ASSETS_DIR.
Agent-name fields are typed as hive_types::Ident for serde-validated parsing at
the socket boundary.