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
archive_manifest_sha256: StringLowercase 64-hex SHA-256 of the archive manifest
(crate::blob::is_sha256_hex).
CreateTask
Fields
TransitionTask
UpdateBudget
CreateAttempt
Fields
TransitionAttempt
Fields
to: AttemptStatereceipt_id: Option<ReceiptId>REQUIRED on the running ⇄ blocked flip (the liveness-producer
rule in crate::transition); absent elsewhere.
RecordAttemptOutcome
Fields
OpenEngineSession
Fields
engine_session_id: EngineSessionIdCloseEngineSession
Fields
engine_session_id: EngineSessionIdSendMessage
Fields
correlation_id: Option<CorrelationId>TransitionMessage
Fields
to: MessageStateIssueCommand
Fields
TransitionCommand
RecordCommandOutcome
AcquireLease
Fields
RenewLease
ReleaseLease
ExpireLease
OpenGate
DecideGate
GrantAuthority
Fields
RevokeAuthority
RaiseAttention
Fields
attention_item_id: AttentionItemIdResolveAttention
RecordEvidence
Fields
evidence_id: EvidenceIdRegisterWorktree
Fields
worktree_id: WorktreeIdUpdateWorktree
ReleaseWorktree
RegisterDispatchNode
TransitionDispatchNode
Fields
dispatch_node_id: DispatchNodeIdWriteOrchestratorCheckpoint
Fields
checkpoint: OrchestratorCheckpointRecordRound
RecordFinding
Fields
action: FindingActionIngestRecord
Fields
kind: IngestionKindpayload: ValueBounded inline JSON
(≤ INLINE_PAYLOAD_MAX_BYTES
serialized); larger content travels as payload_ref.
payload_ref: Option<PayloadRef>Implementations§
Source§impl KernelCommand
impl KernelCommand
Sourcepub fn command_type(&self) -> &'static str
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.
Sourcepub fn from_envelope(
envelope: &CommandEnvelope,
) -> Result<Self, CommandDecodeError>
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
impl Clone for KernelCommand
Source§fn clone(&self) -> KernelCommand
fn clone(&self) -> KernelCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more