These definitions form the backbone of the "Tiny Core". They ensure that every Octad resolved by the WASM proxy is type-safe and consistent with the KRaft controller’s state.
type uuid = string // 128-bit UUID represented as hex
type did = string // Decentralized Identifier for the owner
type modalityType =
| Graph
| Vector
| Tensor
| Semantic
| Document
| Temporal
type storeMeta = {
endpoint: string,
supportedModalities: array<modalityType>,
policyHash: string,
}
type octad = {
id: uuid,
owner: did,
modalities: Belt.Map.String.t<storeMeta>,
policyHash: string,
lastModified: float,
}To support the KRaft-style quorum, the registry must understand log indices and terms.
type term = int
type index = int
type logEntry = {
term: term,
index: index,
command:
| RegisterOctad(octad)
| UpdatePolicy(uuid, string)
| RevokeStore(string)
}
type registryState = {
lastIncludedIndex: index,
lastIncludedTerm: term,
octads: Belt.Map.String.t<octad>,
}