Skip to main content

AgentMessage

Enum AgentMessage 

Source
pub enum AgentMessage {
Show 46 variants TaskRequest { task_id: String, description: String, priority: u8, }, TaskResult { task_id: String, success: bool, result: String, }, StatusUpdate { agent_id: String, status: String, details: Option<String>, }, HelpRequest { request_id: String, topic: String, details: String, }, HelpResponse { request_id: String, response: String, }, Broadcast { sender: String, message: String, }, Custom { message_type: String, data: Value, }, AgentSpawned { agent_id: String, task_id: String, }, AgentProgress { agent_id: String, progress_percent: u8, message: String, }, AgentCompleted { agent_id: String, task_id: String, summary: String, }, LockContention { agent_id: String, path: String, waiting_for: String, }, ApprovalRequest { request_id: String, agent_id: String, operation: String, details: String, }, ApprovalResponse { request_id: String, approved: bool, reason: Option<String>, }, OperationStarted { agent_id: String, operation_type: OperationType, scope: String, estimated_duration_ms: Option<u64>, description: String, }, OperationCompleted { agent_id: String, operation_type: OperationType, scope: String, success: bool, duration_ms: u64, summary: String, }, LockAvailable { operation_type: OperationType, scope: String, released_by: String, }, WaitQueuePosition { agent_id: String, operation_type: OperationType, scope: String, position: usize, estimated_wait_ms: Option<u64>, }, GitOperationStarted { agent_id: String, git_op: GitOperationType, branch: Option<String>, description: String, }, GitOperationCompleted { agent_id: String, git_op: GitOperationType, success: bool, summary: String, }, BuildBlocked { agent_id: String, reason: String, conflicts: Vec<ConflictInfo>, estimated_wait_ms: Option<u64>, }, FileWriteBlocked { agent_id: String, path: String, reason: String, conflicts: Vec<ConflictInfo>, }, ConflictResolved { agent_id: String, operation_type: OperationType, scope: String, }, SagaStarted { saga_id: String, agent_id: String, description: String, total_steps: usize, }, SagaStepCompleted { saga_id: String, agent_id: String, step_index: usize, step_name: String, success: bool, }, SagaCompleted { saga_id: String, agent_id: String, success: bool, compensated: bool, summary: String, }, SagaCompensating { saga_id: String, agent_id: String, reason: String, steps_to_compensate: usize, }, TaskAnnounced { task_id: String, announcer: String, description: String, bid_deadline_ms: u64, }, BidSubmitted { task_id: String, agent_id: String, capability_score: f32, current_load: f32, }, TaskAwarded { task_id: String, winner: String, announcer: String, }, TaskAccepted { task_id: String, agent_id: String, }, TaskDeclined { task_id: String, agent_id: String, reason: String, }, ResourceAvailable { resource_id: String, resource_type: String, }, ResourceBidSubmitted { resource_id: String, agent_id: String, priority: u8, urgency: f32, }, ResourceAllocated { resource_id: String, agent_id: String, price: u32, }, ResourceReleased { resource_id: String, agent_id: String, }, WorktreeCreated { agent_id: String, worktree_path: String, branch: String, }, WorktreeRemoved { agent_id: String, worktree_path: String, }, WorktreeSwitched { agent_id: String, from_path: Option<String>, to_path: String, }, ValidationFailed { agent_id: String, operation: String, rule_name: String, message: String, }, ValidationWarning { agent_id: String, operation: String, rule_name: String, message: String, }, CycleStarted { cycle_number: u32, goal: String, }, CycleCompleted { cycle_number: u32, verdict_type: String, }, PlanCreated { cycle_number: u32, task_count: usize, rationale: String, }, WorkerBranchMerged { agent_id: String, branch: String, status: String, }, VersionConflict { resource_id: String, agent_id: String, expected_version: u64, actual_version: u64, }, ConflictResolutionApplied { resource_id: String, resolution_type: String, winning_agent: Option<String>, },
}
Expand description

Types of messages agents can send to each other

Variants§

§

TaskRequest

Request to execute a task

Fields

§task_id: String

Unique task identifier.

§description: String

Task description.

§priority: u8

Task priority (lower = higher priority).

§

TaskResult

Result of task execution

Fields

§task_id: String

Unique task identifier.

§success: bool

Whether the task succeeded.

§result: String

Result summary.

§

StatusUpdate

Status update

Fields

§agent_id: String

Agent reporting the status.

§status: String

Current status string.

§details: Option<String>

Optional additional details.

§

HelpRequest

Request for help/collaboration

Fields

§request_id: String

Unique request identifier.

§topic: String

Help topic.

§details: String

Detailed description of what help is needed.

§

HelpResponse

Response to help request

Fields

§request_id: String

ID of the original help request.

§response: String

Help response content.

§

Broadcast

Broadcast message to all agents

Fields

§sender: String

ID of the sending agent.

§message: String

Broadcast message content.

§

Custom

Custom message with arbitrary data

Fields

§message_type: String

Custom message type identifier.

§data: Value

Arbitrary JSON data payload.

§

AgentSpawned

Notification that an agent was spawned

Fields

§agent_id: String

ID of the spawned agent.

§task_id: String

ID of the task assigned to the agent.

§

AgentProgress

Progress update from an agent

Fields

§agent_id: String

ID of the reporting agent.

§progress_percent: u8

Completion percentage (0-100).

§message: String

Progress description.

§

AgentCompleted

Notification that an agent completed

Fields

§agent_id: String

ID of the completed agent.

§task_id: String

ID of the completed task.

§summary: String

Completion summary.

§

LockContention

Notification about lock contention

Fields

§agent_id: String

ID of the waiting agent.

§path: String

Path being contended.

§waiting_for: String

ID of the agent holding the lock.

§

ApprovalRequest

Request for approval (dangerous operation)

Fields

§request_id: String

Unique request identifier.

§agent_id: String

ID of the requesting agent.

§operation: String

Operation requiring approval.

§details: String

Operation details.

§

ApprovalResponse

Response to approval request

Fields

§request_id: String

ID of the original approval request.

§approved: bool

Whether the operation was approved.

§reason: Option<String>

Reason for approval or rejection.

§

OperationStarted

Notification that an exclusive operation has started

Fields

§agent_id: String

ID of the agent performing the operation.

§operation_type: OperationType

Type of operation.

§scope: String

Scope of the operation (e.g., project path).

§estimated_duration_ms: Option<u64>

Estimated duration in milliseconds.

§description: String

Human-readable description.

§

OperationCompleted

Notification that an exclusive operation has completed

Fields

§agent_id: String

ID of the agent that completed the operation.

§operation_type: OperationType

Type of operation.

§scope: String

Scope of the operation.

§success: bool

Whether the operation succeeded.

§duration_ms: u64

Actual duration in milliseconds.

§summary: String

Completion summary.

§

LockAvailable

Notification that a lock has become available

Fields

§operation_type: OperationType

Type of operation the lock was for.

§scope: String

Scope of the released lock.

§released_by: String

ID of the agent that released the lock.

§

WaitQueuePosition

Update on wait queue position

Fields

§agent_id: String

ID of the waiting agent.

§operation_type: OperationType

Type of operation being waited on.

§scope: String

Scope of the operation.

§position: usize

Current position in the wait queue.

§estimated_wait_ms: Option<u64>

Estimated wait time in milliseconds.

§

GitOperationStarted

Git operation started

Fields

§agent_id: String

ID of the agent performing the git operation.

§git_op: GitOperationType

Type of git operation.

§branch: Option<String>

Target branch (if applicable).

§description: String

Human-readable description.

§

GitOperationCompleted

Git operation completed

Fields

§agent_id: String

ID of the agent that completed the operation.

§git_op: GitOperationType

Type of git operation.

§success: bool

Whether the operation succeeded.

§summary: String

Completion summary.

§

BuildBlocked

Build blocked due to conflicts

Fields

§agent_id: String

ID of the blocked agent.

§reason: String

Reason the build is blocked.

§conflicts: Vec<ConflictInfo>

List of conflicts causing the block.

§estimated_wait_ms: Option<u64>

Estimated wait time in milliseconds.

§

FileWriteBlocked

File write blocked due to conflicts

Fields

§agent_id: String

ID of the blocked agent.

§path: String

Path that cannot be written.

§reason: String

Reason the write is blocked.

§conflicts: Vec<ConflictInfo>

List of conflicts causing the block.

§

ConflictResolved

Resource conflict resolved - agent can proceed

Fields

§agent_id: String

ID of the agent that can now proceed.

§operation_type: OperationType

Type of operation that was unblocked.

§scope: String

Scope of the resolved conflict.

§

SagaStarted

A saga (multi-step transaction) has started

Fields

§saga_id: String

Unique saga identifier.

§agent_id: String

ID of the agent executing the saga.

§description: String

Saga description.

§total_steps: usize

Total number of steps in the saga.

§

SagaStepCompleted

A saga step has completed

Fields

§saga_id: String

Unique saga identifier.

§agent_id: String

ID of the executing agent.

§step_index: usize

Index of the completed step.

§step_name: String

Name of the completed step.

§success: bool

Whether the step succeeded.

§

SagaCompleted

A saga has completed (successfully or with compensation)

Fields

§saga_id: String

Unique saga identifier.

§agent_id: String

ID of the executing agent.

§success: bool

Whether the saga completed successfully.

§compensated: bool

Whether compensation was applied.

§summary: String

Completion summary.

§

SagaCompensating

A saga is being compensated (rolling back)

Fields

§saga_id: String

Unique saga identifier.

§agent_id: String

ID of the executing agent.

§reason: String

Reason for compensation.

§steps_to_compensate: usize

Number of steps to compensate.

§

TaskAnnounced

A task has been announced for bidding

Fields

§task_id: String

Unique task identifier.

§announcer: String

ID of the announcing agent.

§description: String

Task description.

§bid_deadline_ms: u64

Deadline for bids in milliseconds.

§

BidSubmitted

An agent has submitted a bid

Fields

§task_id: String

Task being bid on.

§agent_id: String

ID of the bidding agent.

§capability_score: f32

Self-assessed capability score (0.0-1.0).

§current_load: f32

Current workload (0.0-1.0).

§

TaskAwarded

A task has been awarded to an agent

Fields

§task_id: String

Task that was awarded.

§winner: String

ID of the winning agent.

§announcer: String

ID of the announcing agent.

§

TaskAccepted

An agent has accepted an awarded task

Fields

§task_id: String

Task that was accepted.

§agent_id: String

ID of the accepting agent.

§

TaskDeclined

An agent has declined an awarded task

Fields

§task_id: String

Task that was declined.

§agent_id: String

ID of the declining agent.

§reason: String

Reason for declining.

§

ResourceAvailable

A resource is available for bidding

Fields

§resource_id: String

Unique resource identifier.

§resource_type: String

Type of resource.

§

ResourceBidSubmitted

A resource bid has been submitted

Fields

§resource_id: String

Resource being bid on.

§agent_id: String

ID of the bidding agent.

§priority: u8

Bid priority.

§urgency: f32

Bid urgency (0.0-1.0).

§

ResourceAllocated

A resource has been allocated to an agent

Fields

§resource_id: String

Allocated resource identifier.

§agent_id: String

ID of the agent receiving the resource.

§price: u32

Allocation price in credits.

§

ResourceReleased

A resource has been released

Fields

§resource_id: String

Released resource identifier.

§agent_id: String

ID of the releasing agent.

§

WorktreeCreated

A worktree has been created for an agent

Fields

§agent_id: String

ID of the agent that owns the worktree.

§worktree_path: String

Filesystem path to the worktree.

§branch: String

Git branch for the worktree.

§

WorktreeRemoved

A worktree has been removed

Fields

§agent_id: String

ID of the agent whose worktree was removed.

§worktree_path: String

Path of the removed worktree.

§

WorktreeSwitched

An agent is switching worktrees

Fields

§agent_id: String

ID of the switching agent.

§from_path: Option<String>

Previous worktree path (if any).

§to_path: String

New worktree path.

§

ValidationFailed

A validation check has failed

Fields

§agent_id: String

ID of the agent that failed validation.

§operation: String

Operation that was being validated.

§rule_name: String

Name of the failed validation rule.

§message: String

Failure description.

§

ValidationWarning

A validation warning was raised

Fields

§agent_id: String

ID of the agent that triggered the warning.

§operation: String

Operation that was being validated.

§rule_name: String

Name of the warning rule.

§message: String

Warning description.

§

CycleStarted

A Plan→Work→Judge cycle has started

Fields

§cycle_number: u32

Current cycle number (0-indexed).

§goal: String

The high-level goal being pursued.

§

CycleCompleted

A Plan→Work→Judge cycle has completed

Fields

§cycle_number: u32

Completed cycle number.

§verdict_type: String

Type of verdict reached (complete, continue, fresh_restart, abort).

§

PlanCreated

A planner has produced a task plan

Fields

§cycle_number: u32

Cycle number the plan belongs to.

§task_count: usize

Number of tasks in the plan.

§rationale: String

Planner’s rationale summary.

§

WorkerBranchMerged

A worker’s branch has been merged

Fields

§agent_id: String

ID of the worker agent.

§branch: String

Name of the merged branch.

§status: String

Merge status description.

§

VersionConflict

A version conflict was detected

Fields

§resource_id: String

Resource with the version conflict.

§agent_id: String

ID of the agent that encountered the conflict.

§expected_version: u64

Version the agent expected.

§actual_version: u64

Actual current version.

§

ConflictResolutionApplied

A conflict has been resolved

Fields

§resource_id: String

Resource where the conflict was resolved.

§resolution_type: String

Type of resolution applied.

§winning_agent: Option<String>

Agent whose changes won (if applicable).

Trait Implementations§

Source§

impl Clone for AgentMessage

Source§

fn clone(&self) -> AgentMessage

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentMessage

Source§

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

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

impl<'de> Deserialize<'de> for AgentMessage

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 Serialize for AgentMessage

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

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<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> 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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,