Skip to main content

Op

Enum Op 

Source
pub enum Op {
Show 34 variants RepoInit { repo: String, daemon_key: String, human: String, human_key: HumanKey, policy: GitId, trunk: GitId, }, HumanEnroll { human: String, key: HumanKey, }, HumanRotate { human: String, key: HumanKey, }, HumanRevoke { human: String, reason: String, }, HumanRecoveryKey { human: String, key: HumanKey, }, HumanRecover { human: String, key: HumanKey, }, DaemonRotate { key: String, }, DaemonRecover { key: String, recover: Option<Recovery>, }, PolicyUpdate { policy: GitId, }, SessionStart { session: String, agent: String, model: Option<String>, task: String, scope: Scope, expires_ms: i64, continues: Option<Continuation>, harness: Option<String>, }, SessionBind { session: String, checks: BindChecks, level: ObservationLevel, }, SessionIsolate { session: String, sandbox: String, profile: String, }, SessionEnd { session: String, reason: String, }, CapAttenuate { parent: String, child: String, agent: String, scope: Scope, expires_ms: i64, leases: Vec<String>, }, CapRevoke { session: String, reason: String, }, LeaseAcquire { set: String, items: Vec<LeaseItem>, intent: String, ttl_ms: i64, }, LeaseRelease { set: String, }, LeaseRenew { set: String, ttl_ms: i64, }, LeaseInterest { items: Vec<LeaseItem>, intent: String, }, ChangePropose { change: ChangeId, commit: GitId, base: GitId, claim: Claim, }, ChangeWithdraw { change: ChangeId, }, ChangeIntegrate { change: ChangeId, trunk_before: GitId, merged: Option<GitId>, conflicts: Vec<String>, }, ChangeIntegrateBatch { trunk_before: GitId, merged: Vec<(ChangeId, GitId)>, }, Approve { target_seq: u64, note: String, checks: Vec<String>, }, Reject { target_seq: u64, reason: String, }, Observe { session: String, events: Vec<Observation>, }, Taint { session: String, reason: String, }, ImportExternal { remote: String, commit: GitId, trunk_before: GitId, }, ImportUnmediated { refname: String, found: Option<GitId>, expected: Option<GitId>, }, BridgePush { remote: String, oplog_seq: u64, oplog_hash: String, }, Freeze { reason: String, }, Unfreeze { reason: String, }, Negotiate { thread: String, to_session: String, message: NegotiationMsg, }, Redact { blob: GitId, reason: String, },
}

Variants§

§

RepoInit

Fields

§repo: String
§daemon_key: String
§human: String
§human_key: HumanKey
§policy: GitId
§trunk: GitId
§

HumanEnroll

Fields

§human: String
§

HumanRotate

Replaces the signer’s own key. Signed with the current key.

Fields

§human: String
§

HumanRevoke

Withdraws a human’s keys and everything they set in motion.

Fields

§human: String
§reason: String
§

HumanRecoveryKey

Sets (or replaces) the signer’s recovery key, kept off the machine. Signed with the current key.

Fields

§human: String
§

HumanRecover

Replaces a lost key. Signed with the human’s recovery key, which is used up by it.

Fields

§human: String
§

DaemonRotate

Replaces the daemon key (Ed25519, hex). Signed by the old daemon key and by a human; later entries are signed by the new key.

Fields

§

DaemonRecover

Re-anchors the log on a new daemon key when the old one is gone (or belongs to a daemon that is being replaced). Signed by the new key and by a human: with the human’s key, or, with recover, with their recovery key, when the Mac that held both keys is lost (log format 27).

Fields

§recover: Option<Recovery>
§

PolicyUpdate

Fields

§policy: GitId
§

SessionStart

Fields

§session: String
§agent: String
§task: String
§scope: Scope
§expires_ms: i64
§continues: Option<Continuation>

The session whose workspace this one takes over.

§harness: Option<String>

The harness the human runs the session under. Their word, and the only one an observation level is read for (format 20).

§

SessionBind

Fields

§session: String
§checks: BindChecks
§

SessionIsolate

A human’s word that the session runs in a sandbox Lonca built: what gives it level: isolated. Never from the agent, and never from the daemon, which can not see the sandbox: the launcher builds it and the human who started the session signs for it.

Fields

§session: String
§sandbox: String

The kind of sandbox (seatbelt, bwrap).

§profile: String

SHA-256 of the sandbox’s definition, lowercase hex.

§

SessionEnd

Fields

§session: String
§reason: String
§

CapAttenuate

Fields

§parent: String
§child: String
§agent: String
§scope: Scope
§expires_ms: i64
§leases: Vec<String>

Lease sets the parent hands to the child; they come back when the child ends.

§

CapRevoke

Fields

§session: String
§reason: String
§

LeaseAcquire

Fields

§intent: String
§ttl_ms: i64
§

LeaseRelease

Fields

§

LeaseRenew

Fields

§ttl_ms: i64
§

LeaseInterest

Holds nothing: when what conflicts with items is freed, the oldest interest gets a short reservation. Until then, for a limited time, no new lease can be taken that conflicts with items.

Fields

§intent: String
§

ChangePropose

Fields

§change: ChangeId
§commit: GitId
§base: GitId
§claim: Claim
§

ChangeWithdraw

Fields

§change: ChangeId
§

ChangeIntegrate

Fields

§change: ChangeId
§trunk_before: GitId
§merged: Option<GitId>

The merged trunk commit, or None when the merge conflicted.

§conflicts: Vec<String>
§

ChangeIntegrateBatch

Changes at the head of the queue, integrated at once. One entry, so that a crash can not leave trunk at a state nothing verified: the evidence is of the last commit, and trunk moves straight to it. The commits before it are in its history and were never trunk.

Fields

§trunk_before: GitId
§merged: Vec<(ChangeId, GitId)>

Each change, in queue order, with the commit it merged to.

§

Approve

checks: named checks of verification.checks the change owes from here on, besides what it owed already; only on a proposal (log format 25). Sorted, each name once.

Fields

§target_seq: u64
§note: String
§checks: Vec<String>
§

Reject

A human declines an escalated operation; the reason is for the requester (a worker fixes and proposes again) and is never interpreted.

Fields

§target_seq: u64
§reason: String
§

Observe

Fields

§session: String
§

Taint

Fields

§session: String
§reason: String
§

ImportExternal

Fields

§remote: String
§commit: GitId
§trunk_before: GitId
§

ImportUnmediated

Fields

§refname: String
§found: Option<GitId>
§expected: Option<GitId>
§

BridgePush

Fields

§remote: String
§oplog_seq: u64
§oplog_hash: String
§

Freeze

Fields

§reason: String
§

Unfreeze

Fields

§reason: String
§

Negotiate

Fields

§thread: String
§to_session: String
§

Redact

Fields

§blob: GitId
§reason: String

Implementations§

Source§

impl Op

Source

pub fn kind(&self) -> OpKind

Source

pub fn signed_by_recovery_key(&self) -> bool

Whether the human’s recovery key signs this operation, not their current key: human.recover, and daemon.recover with recover.

Source

pub fn daemon_key_switch(&self) -> Option<&str>

The daemon key this operation installs, if it is a key switch.

Trait Implementations§

Source§

impl Clone for Op

Source§

fn clone(&self) -> Self

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 Op

Source§

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

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

impl<'de> Deserialize<'de> for Op

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 Eq for Op

Source§

impl PartialEq for Op

Source§

fn eq(&self, other: &Self) -> 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 Op

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 Op

Auto Trait Implementations§

§

impl Forget for Op

§

impl Freeze for Op

§

impl RefUnwindSafe for Op

§

impl Send for Op

§

impl Sync for Op

§

impl Unpin for Op

§

impl UnsafeUnpin for Op

§

impl UnwindSafe for Op

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.