pub struct Agent {
pub id: String,
pub name: String,
pub workspace: String,
pub status: AgentStatus,
pub started_at: String,
pub isolated: bool,
pub interactive: bool,
pub session_dir: PathBuf,
pub permission_posture: PermissionPosture,
pub reason: Option<String>,
pub detail: Option<String>,
}Expand description
Prospero’s view of a single agent (projected from a caliban AgentRecord).
Fields§
§id: StringOpaque caliban agent id.
name: StringHuman-readable label.
workspace: StringOwning workspace name (Prospero registry key).
status: AgentStatusCurrent lifecycle state.
started_at: StringRFC-3339 timestamp when the agent was registered.
isolated: boolTrue if the agent runs in an isolated git worktree.
interactive: boolTrue if the agent was spawned in interactive mode (accepts operator input).
session_dir: PathBufPath to the agent’s session directory on disk.
permission_posture: PermissionPostureThe posture this agent is actually running under (#238) — in k8s the one
the operator admitted, not the one requested. #[serde(default)] so a
snapshot from an older prosperod still deserializes, as supervised.
reason: Option<String>Why the agent is in this state, when something other than the agent
itself decided it (#241). A machine-readable code from the backend —
e.g. PostureNotPermitted when the operator refused an unattended task
because its Workspace forbids one. None when there is nothing to
explain, which is the healthy case.
detail: Option<String>Human-readable detail for Agent::reason, when the backend supplied
one.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Agent
impl<'de> Deserialize<'de> for Agent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Agent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Agent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Agent
Source§impl JsonSchema for Agent
impl JsonSchema for Agent
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 moreSource§impl Serialize for Agent
impl Serialize for Agent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Agent
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl UnwindSafe for Agent
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more