pub struct WorkGraphService { /* private fields */ }Implementations§
Source§impl WorkGraphService
impl WorkGraphService
pub fn new(store: Arc<dyn WorkGraphStore>) -> Self
pub fn with_scope( store: Arc<dyn WorkGraphStore>, default_realm_id: impl Into<String>, default_namespace: WorkNamespace, ) -> Self
pub fn store(&self) -> &Arc<dyn WorkGraphStore>
pub fn default_realm_id(&self) -> &str
pub fn default_namespace(&self) -> &WorkNamespace
pub async fn create( &self, request: CreateWorkItemRequest, ) -> Result<WorkItem, WorkGraphError>
pub async fn create_goal( &self, request: GoalCreateRequest, ) -> Result<GoalCreateResult, WorkGraphError>
pub async fn goal_status( &self, request: GoalStatusRequest, ) -> Result<GoalStatusResult, WorkGraphError>
pub async fn attention_binding( &self, request: AttentionBindingRequest, ) -> Result<AttentionBindingResult, WorkGraphError>
pub async fn list_attention( &self, request: AttentionListRequest, ) -> Result<AttentionListResult, WorkGraphError>
Sourcepub async fn prune_terminal_attention(
&self,
request: AttentionPruneRequest,
) -> Result<AttentionPruneResult, WorkGraphError>
pub async fn prune_terminal_attention( &self, request: AttentionPruneRequest, ) -> Result<AttentionPruneResult, WorkGraphError>
Prune TERMINAL (superseded/stopped) attention binding rows in scope. The workgraph event stream keeps the audit history; binding rows otherwise grow monotonically with reassignment churn. Host-plane lifecycle API — not exposed on the agent tool surface.
pub async fn pause_attention( &self, request: AttentionPauseRequest, ) -> Result<AttentionBindingResult, WorkGraphError>
pub async fn resume_attention( &self, request: AttentionResumeRequest, ) -> Result<AttentionBindingResult, WorkGraphError>
pub async fn reassign_attention( &self, request: AttentionReassignRequest, ) -> Result<AttentionReassignResult, WorkGraphError>
Sourcepub async fn break_glass_reassign_attention(
&self,
request: BreakGlassAttentionReassignRequest,
) -> Result<AttentionReassignResult, WorkGraphError>
pub async fn break_glass_reassign_attention( &self, request: BreakGlassAttentionReassignRequest, ) -> Result<AttentionReassignResult, WorkGraphError>
Break-glass host-plane reassignment. WorkGraphs are agent-operated: the agent-native transfer is a coordinate-mode agent executing the move, and the agent tool surface’s mode-derived authority stays untouched. This entry exists for the one state the graph cannot heal agent-natively — a binding stuck on a wedged/retired agent with no coordinator holding authority over it. It bypasses the projection witness (hosts must not forge projections) but keeps every other invariant: binding currency (expected_revision CAS), item non-terminality, and the active-binding-per-target occupancy guard. Mandatory attribution is recorded in the workgraph event stream and a WARN log. Never exposed on the agent tool surface or wire catalogs.
pub async fn attention_projection( &self, request: AttentionProjectionRequest, ) -> Result<AttentionProjectionResult, WorkGraphError>
pub async fn goal_confirm( &self, request: GoalConfirmRequest, ) -> Result<GoalConfirmResult, WorkGraphError>
pub async fn goal_confirm_public( &self, request: GoalConfirmRequest, ) -> Result<GoalConfirmResult, WorkGraphError>
pub async fn goal_request_close( &self, request: GoalRequestCloseRequest, ) -> Result<GoalRequestCloseResult, WorkGraphError>
pub async fn get( &self, realm_id: Option<String>, namespace: Option<WorkNamespace>, id: WorkItemId, ) -> Result<WorkItem, WorkGraphError>
pub async fn list( &self, filter: WorkItemFilter, ) -> Result<Vec<WorkItem>, WorkGraphError>
pub async fn ready( &self, filter: ReadyWorkFilter, ) -> Result<Vec<WorkItem>, WorkGraphError>
pub async fn snapshot( &self, filter: WorkGraphSnapshotFilter, ) -> Result<WorkGraphSnapshot, WorkGraphError>
pub async fn claim( &self, request: ClaimWorkItemRequest, ) -> Result<WorkItem, WorkGraphError>
pub async fn release( &self, request: ReleaseWorkItemRequest, ) -> Result<WorkItem, WorkGraphError>
pub async fn update( &self, request: UpdateWorkItemRequest, ) -> Result<WorkItem, WorkGraphError>
pub async fn escalate_policy( &self, request: PolicyEscalateRequest, ) -> Result<WorkItem, WorkGraphError>
pub async fn block( &self, realm_id: Option<String>, namespace: Option<WorkNamespace>, id: WorkItemId, expected_revision: u64, ) -> Result<WorkItem, WorkGraphError>
pub async fn close( &self, request: CloseWorkItemRequest, ) -> Result<WorkItem, WorkGraphError>
pub async fn link( &self, request: LinkWorkItemsRequest, ) -> Result<WorkEdge, WorkGraphError>
pub async fn add_evidence( &self, request: AddEvidenceRequest, ) -> Result<WorkItem, WorkGraphError>
pub async fn events( &self, filter: WorkGraphEventFilter, ) -> Result<Vec<WorkGraphEvent>, WorkGraphError>
Trait Implementations§
Source§impl Clone for WorkGraphService
impl Clone for WorkGraphService
Source§fn clone(&self) -> WorkGraphService
fn clone(&self) -> WorkGraphService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more