Skip to main content

Module placement

Module placement 

Source
Expand description

ai.hyprstream.placement.* — the P1 placement-directory lexicons.

Four DAG-CBOR record types form the consent-scoped placement directory that sits alongside crate::record::ModelRecord (ai.hyprstream.model):

  • node::NodeRecord (ai.hyprstream.placement.node) — a schedulable node advertised by an account: its labels, capacities, and group consents.
  • workload::WorkloadRecord (ai.hyprstream.placement.workload) — a workload→node placement decision.
  • group::GroupRecord (ai.hyprstream.placement.group) — an atproto list record naming a consent group.
  • group_item::GroupItemRecord (ai.hyprstream.placement.groupItem) — an atproto listitem record adding a node (subject) to a group.

§Encoding

Like ai.hyprstream.model, every record is DAG-CBOR with canonical map-key order — pure lexicographic byte order (RFC 7049 §4.2.1 “core determinism”, not length-first). The encoder applies that ordering, so callers construct fields in any order. Each record has a frozen field set: decoding rejects unknown fields. Optional fields are omitted from the encoded map when absent (never encoded as null).

All format-bearing fields are validated at construction time, mirroring record.rs: at-uri fields must start with at://, did fields must start with did: (both did:web and did:key are accepted), and datetime fields must match the atproto ISO-8601 shape (UTC, milliseconds, trailing Z).

Re-exports§

pub use group::GroupRecord;
pub use group_item::GroupItemRecord;
pub use node::NodeRecord;
pub use workload::WorkloadRecord;

Modules§

group
ai.hyprstream.placement.group — a consent group (the atproto list record).
group_item
ai.hyprstream.placement.groupItem — a group membership (atproto listitem).
node
ai.hyprstream.placement.node — a schedulable node advertised by an account.
workload
ai.hyprstream.placement.workload — a workload→node placement decision.