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: SurfaceKeyThe surface; degenerate (all None) on a terminal.
profile: Option<String>The profile that owns it (None = the home’s default).
worker: WorkerThe worker session.
trigger: TriggerWhy 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: ResidueSource fields the record does not model, verbatim.
Implementations§
Source§impl Binding
impl Binding
Sourcepub fn surface(&self) -> Option<SurfaceKey>
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.
Sourcepub fn nouns(&self) -> OrchestrationNouns
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
impl Binding
Sourcepub fn from_hermes_row(row: &HermesSessionRow, locator: Option<&str>) -> Self
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
impl Binding
Sourcepub fn from_openclaw_key(
key: &str,
agent_from_path: Option<&str>,
session_id: Option<&str>,
locator: Option<&str>,
) -> Option<Self>
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
impl Binding
Sourcepub fn from_orchestrator_row(
profile: &str,
row: &OrchestratorBindingRow,
) -> Self
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<'de> Deserialize<'de> for Binding
impl<'de> Deserialize<'de> for Binding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Binding
Source§impl JsonSchema for Binding
impl JsonSchema for Binding
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Binding
Auto Trait Implementations§
impl Freeze for Binding
impl RefUnwindSafe for Binding
impl Send for Binding
impl Sync for Binding
impl Unpin for Binding
impl UnsafeUnpin for Binding
impl UnwindSafe for Binding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.