Skip to main content

Binding

Struct Binding 

Source
pub struct Binding {
    pub key: SurfaceKey,
    pub profile: Option<String>,
    pub worker: Worker,
    pub trigger: Trigger,
    pub recurrence: Option<Recurrence>,
    pub handoff: Option<Handoff>,
    pub started_at: Option<String>,
    pub last_activity_at: Option<String>,
    pub ended_at: Option<String>,
    pub end_reason: Option<EndReason>,
    pub residue: Residue,
}
Expand description

The conversation record.

Fields§

§key: SurfaceKey

The surface; degenerate (all None) on a terminal.

§profile: Option<String>

The profile that owns it (None = the home’s default).

§worker: Worker

The worker session.

§trigger: Trigger

Why the conversation exists. The orchestrator’s own store keeps no trigger column (it is derived from the key and recurrence), so the wire may omit it.

§recurrence: Option<Recurrence>

The job this conversation is a fire of.

§handoff: Option<Handoff>

Moved (or moving) to another surface.

§started_at: Option<String>

RFC3339 instants where the source has them.

§last_activity_at: Option<String>

Last activity, RFC3339.

§ended_at: Option<String>

End, RFC3339, when ended.

§end_reason: Option<EndReason>

Why it ended.

§residue: Residue

Source fields the record does not model, verbatim.

Implementations§

Source§

impl Binding

Source

pub fn surface(&self) -> Option<SurfaceKey>

The surface as a discovery row shows it: None on a terminal, where the key carries no key string, platform or chat id.

Source

pub fn nouns(&self) -> OrchestrationNouns

The discovery row’s nouns. workspace is left for the row’s own cwd rule (SessionMeta::workspace), the one derivation that is not this record’s to make.

Source§

impl Binding

Source

pub fn from_hermes_row(row: &HermesSessionRow, locator: Option<&str>) -> Self

Decode a Hermes sessions row. Always yields a record: a terminal session is a binding with a degenerate key. The columns win over the parsed key when both are present (ORC-8 finding: api_server conversations carry the surface only in session_key).

Source§

impl Binding

Source

pub fn from_openclaw_key( key: &str, agent_from_path: Option<&str>, session_id: Option<&str>, locator: Option<&str>, ) -> Option<Self>

Decode an OpenClaw session key. None when the key has no known shape (nothing is claimed, as before). agent_from_path is the profile the file’s own agents/<id>/ directory names, used when the key names none.

Source§

impl Binding

Source

pub fn from_orchestrator_row( profile: &str, row: &OrchestratorBindingRow, ) -> Self

Decode an orchestrator bindings row under profile. The key string is the orchestrator’s own rendering (docs/ORCHESTRATOR-IR.md §2.3), which is Hermes’s form, so parse_hermes_session_key reads it back unchanged.

Trait Implementations§

Source§

impl Clone for Binding

Source§

fn clone(&self) -> Binding

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 Binding

Source§

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

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

impl Default for Binding

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Binding

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 Binding

Source§

impl JsonSchema for Binding

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for Binding

Source§

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

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 Binding

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

Checks if this value is equivalent to the given key. Read more
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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more