pub struct NewActivity {
pub agent_id: String,
pub collective_id: CollectiveId,
pub current_task: Option<String>,
pub context_summary: Option<String>,
}Expand description
Input for registering a new agent activity.
The started_at and last_heartbeat timestamps are set automatically
to Timestamp::now() when the activity is registered.
§Example
use pulsedb::NewActivity;
let activity = NewActivity {
agent_id: "claude-opus".to_string(),
collective_id,
current_task: Some("Implementing error handling".to_string()),
context_summary: Some("Working on src/error.rs".to_string()),
};
db.register_activity(activity)?;Fields§
§agent_id: StringThe agent’s identifier (non-empty, max 255 bytes).
collective_id: CollectiveIdThe collective to register in (must exist).
current_task: Option<String>What the agent is currently working on (max 1KB).
context_summary: Option<String>Summary of the agent’s current context (max 1KB).
Auto Trait Implementations§
impl Freeze for NewActivity
impl RefUnwindSafe for NewActivity
impl Send for NewActivity
impl Sync for NewActivity
impl Unpin for NewActivity
impl UnsafeUnpin for NewActivity
impl UnwindSafe for NewActivity
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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