Skip to main content

KernelCommand

Enum KernelCommand 

Source
pub enum KernelCommand {
Show 34 variants ActivateKernel { cutover_id: String, archive_manifest_sha256: String, }, CreateTask { task_id: TaskId, kind: Option<String>, title: Option<String>, spec_ref: Option<String>, project: Option<String>, priority: Option<i32>, tracker_ref: Option<String>, }, TransitionTask { task_id: TaskId, to: TaskState, expected_version: u32, }, UpdateBudget { attempt_id: AttemptId, expected_version: u32, budget: Budget, }, CreateAttempt { attempt_id: AttemptId, task_id: TaskId, engine: EngineId, capability: Option<String>, role: Option<String>, model_lane: Option<String>, permission_profile: Option<String>, worktree_lease_id: Option<LeaseId>, base_sha: Option<String>, budget: Option<Budget>, }, TransitionAttempt { attempt_id: AttemptId, to: AttemptState, expected_version: u32, receipt_id: Option<ReceiptId>, }, RecordAttemptOutcome { attempt_id: AttemptId, expected_version: u32, exit_code: Option<i32>, provider_terminal_event: Option<String>, result_valid: Option<bool>, evidence_manifest_ref: Option<String>, }, OpenEngineSession { engine_session_id: EngineSessionId, attempt_id: AttemptId, engine: EngineId, provider_session_ref: Option<String>, }, CloseEngineSession { engine_session_id: EngineSessionId, }, SendMessage { message_id: MessageId, correlation_id: Option<CorrelationId>, reply_to: Option<MessageId>, sender: Option<String>, recipient: Option<String>, channel: Option<String>, kind: Option<String>, payload: Option<Value>, deadline: Option<Timestamp>, }, TransitionMessage { message_id: MessageId, to: MessageState, expected_version: u32, dead_letter_reason: Option<String>, }, IssueCommand { command_id: CommandId, kind: String, targets: Vec<String>, actor: Option<Actor>, }, TransitionCommand { command_id: CommandId, to: CommandState, expected_version: u32, }, RecordCommandOutcome { command_id: CommandId, expected_version: u32, outcome: Outcome, }, AcquireLease { lease_id: LeaseId, mode: LeaseMode, holder: Option<String>, scope: Option<String>, repo: Option<String>, path: Option<String>, branch: Option<String>, base_sha: Option<String>, expires_at: Option<Timestamp>, }, RenewLease { lease_id: LeaseId, expected_version: u32, expires_at: Option<Timestamp>, }, ReleaseLease { lease_id: LeaseId, expected_version: u32, disposition: Option<String>, }, ExpireLease { lease_id: LeaseId, expected_version: u32, }, OpenGate { gate_id: GateId, attempt_id: Option<AttemptId>, phase_ref: Option<String>, kind: Option<String>, }, DecideGate { gate_id: GateId, expected_version: u32, verdict: GateVerdict, evidence_ref: Option<String>, }, GrantAuthority { authority_grant_id: AuthorityGrantId, grantee: Actor, action_class: String, scope: Option<String>, expires_at: Option<Timestamp>, }, RevokeAuthority { authority_grant_id: AuthorityGrantId, reason: Option<String>, }, RaiseAttention { attention_item_id: AttentionItemId, kind: String, summary: String, subject_ref: Option<String>, raised_by: Option<Actor>, }, ResolveAttention { attention_item_id: AttentionItemId, resolution: Option<String>, }, RecordEvidence { evidence_id: EvidenceId, kind: String, ref: String, digest: Option<String>, byte_size: Option<ByteCount>, }, RegisterWorktree { worktree_id: WorktreeId, repo: String, path: String, branch: String, base_sha: Option<String>, lease_id: Option<LeaseId>, }, UpdateWorktree { worktree_id: WorktreeId, dirty: bool, unpushed: bool, base_sha: Option<String>, }, ReleaseWorktree { worktree_id: WorktreeId, disposition: Option<String>, }, RegisterDispatchNode { dispatch_node_id: DispatchNodeId, parent_id: Option<DispatchNodeId>, attempt_id: Option<AttemptId>, kind: String, label: Option<String>, }, TransitionDispatchNode { dispatch_node_id: DispatchNodeId, to: String, expected_version: u32, }, WriteOrchestratorCheckpoint { checkpoint: OrchestratorCheckpoint, }, RecordRound { attempt_id: AttemptId, round: u32, findings: RoundFindingSummary, }, RecordFinding { attempt_id: AttemptId, round: u32, action: FindingAction, summary: String, subject_ref: Option<String>, }, IngestRecord { kind: IngestionKind, payload: Value, payload_ref: Option<PayloadRef>, },
}
Expand description

One requested mutation, tagged by type.

Variants are grouped by aggregate. Absent optionals are OMITTED on the wire (the tri-state discipline in docs/contract/NAMING.md): absent means “not specified”, never zero and never null.

Variants§

§

ActivateKernel

The irreversible cutover boundary. Appended once, at aggregate version 2, under idempotency key kernel_activated:<cutover_id>: the same cutover ID retries stably, a different one conflicts.

Fields

§cutover_id: String
§archive_manifest_sha256: String

Lowercase 64-hex SHA-256 of the archive manifest (crate::blob::is_sha256_hex).

§

CreateTask

Fields

§task_id: TaskId
§spec_ref: Option<String>
§project: Option<String>
§priority: Option<i32>
§tracker_ref: Option<String>
§

TransitionTask

Fields

§task_id: TaskId
§expected_version: u32
§

UpdateBudget

Fields

§attempt_id: AttemptId
§expected_version: u32
§budget: Budget
§

CreateAttempt

Fields

§attempt_id: AttemptId
§task_id: TaskId
§engine: EngineId
§capability: Option<String>
§model_lane: Option<String>
§permission_profile: Option<String>
§worktree_lease_id: Option<LeaseId>
§base_sha: Option<String>
§budget: Option<Budget>
§

TransitionAttempt

Fields

§attempt_id: AttemptId
§expected_version: u32
§receipt_id: Option<ReceiptId>

REQUIRED on the runningblocked flip (the liveness-producer rule in crate::transition); absent elsewhere.

§

RecordAttemptOutcome

Fields

§attempt_id: AttemptId
§expected_version: u32
§exit_code: Option<i32>
§provider_terminal_event: Option<String>
§result_valid: Option<bool>
§evidence_manifest_ref: Option<String>
§

OpenEngineSession

Fields

§engine_session_id: EngineSessionId
§attempt_id: AttemptId
§engine: EngineId
§provider_session_ref: Option<String>
§

CloseEngineSession

Fields

§engine_session_id: EngineSessionId
§

SendMessage

Fields

§message_id: MessageId
§correlation_id: Option<CorrelationId>
§reply_to: Option<MessageId>
§sender: Option<String>
§recipient: Option<String>
§channel: Option<String>
§payload: Option<Value>
§deadline: Option<Timestamp>
§

TransitionMessage

Fields

§message_id: MessageId
§expected_version: u32
§dead_letter_reason: Option<String>
§

IssueCommand

Fields

§command_id: CommandId
§kind: String

OPEN bounded string (e.g. stop_attempt).

§targets: Vec<String>

A stop may name several subjects; the projection keeps the first as its primary target.

§actor: Option<Actor>
§

TransitionCommand

Fields

§command_id: CommandId
§expected_version: u32
§

RecordCommandOutcome

Fields

§command_id: CommandId
§expected_version: u32
§outcome: Outcome
§

AcquireLease

Fields

§lease_id: LeaseId
§holder: Option<String>
§branch: Option<String>
§base_sha: Option<String>
§expires_at: Option<Timestamp>
§

RenewLease

Fields

§lease_id: LeaseId
§expected_version: u32
§expires_at: Option<Timestamp>
§

ReleaseLease

Fields

§lease_id: LeaseId
§expected_version: u32
§disposition: Option<String>
§

ExpireLease

Fields

§lease_id: LeaseId
§expected_version: u32
§

OpenGate

Fields

§gate_id: GateId
§attempt_id: Option<AttemptId>
§phase_ref: Option<String>
§

DecideGate

Fields

§gate_id: GateId
§expected_version: u32
§verdict: GateVerdict
§evidence_ref: Option<String>
§

GrantAuthority

Fields

§authority_grant_id: AuthorityGrantId
§grantee: Actor
§action_class: String

OPEN action class this grant covers (e.g. deploy, auto_answer).

§expires_at: Option<Timestamp>
§

RevokeAuthority

Fields

§authority_grant_id: AuthorityGrantId
§reason: Option<String>
§

RaiseAttention

Fields

§attention_item_id: AttentionItemId
§kind: String

OPEN kind; deduplicated with subject_ref while unresolved.

§summary: String
§subject_ref: Option<String>
§raised_by: Option<Actor>
§

ResolveAttention

Fields

§attention_item_id: AttentionItemId
§resolution: Option<String>
§

RecordEvidence

Fields

§evidence_id: EvidenceId
§kind: String

OPEN bounded string (e.g. transcript, diff, log).

§digest: Option<String>
§byte_size: Option<ByteCount>
§

RegisterWorktree

Fields

§worktree_id: WorktreeId
§repo: String
§path: String
§branch: String
§base_sha: Option<String>
§lease_id: Option<LeaseId>
§

UpdateWorktree

Fields

§worktree_id: WorktreeId
§dirty: bool
§unpushed: bool
§base_sha: Option<String>
§

ReleaseWorktree

Fields

§worktree_id: WorktreeId
§disposition: Option<String>
§

RegisterDispatchNode

Fields

§dispatch_node_id: DispatchNodeId
§attempt_id: Option<AttemptId>
§kind: String

OPEN kind (e.g. orchestrator, subagent, engine).

§

TransitionDispatchNode

Fields

§dispatch_node_id: DispatchNodeId
§to: String

OPEN bounded lifecycle label. A dispatch node is bookkeeping over the spawn tree, not one of the four public state machines, so this is deliberately not an FSM state.

§expected_version: u32
§

WriteOrchestratorCheckpoint

Fields

§

RecordRound

Fields

§attempt_id: AttemptId
§round: u32
§

RecordFinding

Fields

§attempt_id: AttemptId
§round: u32
§summary: String
§subject_ref: Option<String>
§

IngestRecord

Fields

§payload: Value

Bounded inline JSON (≤ INLINE_PAYLOAD_MAX_BYTES serialized); larger content travels as payload_ref.

§payload_ref: Option<PayloadRef>

Implementations§

Source§

impl KernelCommand

Source

pub fn command_type(&self) -> &'static str

The command_type an envelope carrying this body must declare — identical to the body’s own type tag.

Source

pub fn from_envelope( envelope: &CommandEnvelope, ) -> Result<Self, CommandDecodeError>

Decode the typed body out of an envelope and require the envelope’s command_type to name the same variant.

Routing metadata and the discriminant disagreeing is a refusal, not a preference for one of them: a handler picked by command_type would otherwise execute a body of some other shape.

Trait Implementations§

Source§

impl Clone for KernelCommand

Source§

fn clone(&self) -> KernelCommand

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KernelCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for KernelCommand

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for KernelCommand

Source§

fn eq(&self, other: &KernelCommand) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for KernelCommand

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for KernelCommand

Source§

impl Type for KernelCommand

Source§

fn definition(types: &mut Types) -> DataType

Returns a DataType that represents Self. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.