Expand description
The GridWork contract: shared domain types, event definitions, and state machines.
Everything the kernel, clients, and adapters agree on lives here. The TypeScript contract consumed by external tooling is generated from these types and CI-checked against the committed artifact.
Re-exports§
pub use blob::BLOB_ADDRESS_SCHEME;pub use blob::BLOB_CHUNK_BYTES;pub use blob::BlobAddress;pub use blob::BlobAddressError;pub use blob::BlobDescriptor;pub use blob::SHA256_HEX_LEN;pub use blob::is_sha256_hex;pub use checkpoint::CHECKPOINT_EVENT_INTERVAL;pub use checkpoint::CHECKPOINT_INTERVAL_SECS;pub use checkpoint::CHECKPOINT_SCHEMA_VERSION;pub use checkpoint::Checkpoint;pub use command::CommandDecodeError;pub use command::KernelCommand;pub use entity::Attempt;pub use entity::AttentionItem;pub use entity::AuthorityGrant;pub use entity::Budget;pub use entity::Command;pub use entity::DISPATCH_NODE_INITIAL_STATE;pub use entity::DispatchNode;pub use entity::EngineSession;pub use entity::Evidence;pub use entity::Gate;pub use entity::IngestedRecord;pub use entity::Lease;pub use entity::Message;pub use entity::Receipt;pub use entity::Task;pub use entity::Worktree;pub use envelope::Actor;pub use envelope::CommandEnvelope;pub use envelope::ENVELOPE_SCHEMA_VERSION;pub use envelope::EventEnvelope;pub use envelope::INLINE_PAYLOAD_MAX_BYTES;pub use envelope::Origin;pub use envelope::PayloadRef;pub use envelope::UnknownSchemaVersion;pub use envelope::accept_schema_version;pub use fsm::AttemptState;pub use fsm::CommandState;pub use fsm::GateVerdict;pub use fsm::LeaseMode;pub use fsm::LeaseState;pub use fsm::MessageState;pub use fsm::Outcome;pub use fsm::StateMachine;pub use fsm::TaskState;pub use ids::AggregateId;pub use ids::AttemptId;pub use ids::AttentionItemId;pub use ids::AuthorityGrantId;pub use ids::BlobUploadId;pub use ids::ByteCount;pub use ids::CommandId;pub use ids::CorrelationId;pub use ids::CostMicros;pub use ids::DispatchNodeId;pub use ids::EngineId;pub use ids::EngineSessionId;pub use ids::EventCount;pub use ids::EventId;pub use ids::EvidenceId;pub use ids::FenceToken;pub use ids::GateId;pub use ids::IdempotencyKey;pub use ids::IngestedRecordId;pub use ids::LeaseId;pub use ids::MessageId;pub use ids::ProjectId;pub use ids::ReceiptId;pub use ids::RequestId;pub use ids::Seq;pub use ids::TaskId;pub use ids::Timestamp;pub use ids::WorktreeId;pub use ids::WriterEpoch;pub use ingestion::IngestionKind;pub use inherited::BudgetCursor;pub use inherited::FindingAction;pub use inherited::LeaseSnapshot;pub use inherited::OpenAttemptRef;pub use inherited::OrchestratorCheckpoint;pub use inherited::PendingApproval;pub use inherited::RoundFindingSummary;pub use protocol::CAPABILITY_NAME_MAX_BYTES;pub use protocol::CONNECTION_EGRESS_BYTES_PER_WINDOW;pub use protocol::CONNECTION_INGRESS_BYTES_PER_WINDOW;pub use protocol::CONTRACT_VERSION;pub use protocol::CapabilityName;pub use protocol::CapabilityNameError;pub use protocol::ClientControl;pub use protocol::FRAME_BODY_MAX_BYTES;pub use protocol::FRAME_BODY_MIN_BYTES;pub use protocol::FRAME_KIND_RESERVED_STREAM;pub use protocol::FRAME_LENGTH_PREFIX_BYTES;pub use protocol::FrameKind;pub use protocol::HELLO_DEADLINE_SECS;pub use protocol::HELLO_MAX_BYTES;pub use protocol::KernelErrorCode;pub use protocol::KernelRequest;pub use protocol::KernelResult;pub use protocol::MAX_CAPABILITIES;pub use protocol::PROTOCOL_MINOR;pub use protocol::ProjectionKind;pub use protocol::ProjectionRecord;pub use protocol::ProtocolVersion;pub use protocol::SLOW_CONSUMER_TIMEOUT_SECS;pub use protocol::ServerControl;pub use transition::Cursor;pub use transition::GuardCtx;pub use transition::GuardViolation;pub use transition::LIVENESS_PRODUCER_KIND;pub use transition::TransitionGuard;pub use transition::TransitionRequest;pub use transition::TransitionResult;pub use transition::apply;
Modules§
- blob
- Content-addressed blob contracts.
- checkpoint
- Projection checkpoints — evidence about the projections, never the truth.
- command
- The v1 kernel command set — every mutation the kernel accepts.
- contract_
sql - entity
- Entity snapshots — the vertical-slice record shapes.
- envelope
- Event and command envelopes — the two records every party agrees on.
- fsm
- The four public state machines, as data.
- ids
- Identifier and scalar newtypes.
- ingestion
- The closed ingestion taxonomy.
- inherited
- Typed shapes for the payloads that were schema-less JSON in the lineage system this contract supersedes.
- port
- The storage ports: what any event-store and blob backend must provide.
- protocol
- The client↔kernel wire protocol, as types.
- transition
- The one transition algorithm every writer goes through.