pub struct AgentStateServiceClient<T> { /* private fields */ }Expand description
Client-facing gateway service for agent state operations. The gateway generates execution plans locally and routes to data nodes.
Implementations§
Source§impl<T> AgentStateServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> AgentStateServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AgentStateServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn fork(
&mut self,
request: impl IntoRequest<AgentForkRequest>,
) -> Result<Response<AgentForkResponse>, Status>
pub async fn fork( &mut self, request: impl IntoRequest<AgentForkRequest>, ) -> Result<Response<AgentForkResponse>, Status>
── Branch (fork) operations ─────────────────────────────────────────
pub async fn merge_branch( &mut self, request: impl IntoRequest<AgentMergeBranchRequest>, ) -> Result<Response<AgentMergeBranchResponse>, Status>
pub async fn discard_branch( &mut self, request: impl IntoRequest<AgentDiscardBranchRequest>, ) -> Result<Response<AgentDiscardBranchResponse>, Status>
pub async fn list_branches( &mut self, request: impl IntoRequest<AgentListBranchesRequest>, ) -> Result<Response<AgentListBranchesResponse>, Status>
pub async fn branch_put( &mut self, request: impl IntoRequest<AgentBranchPutRequest>, ) -> Result<Response<AgentBranchPutResponse>, Status>
pub async fn branch_get( &mut self, request: impl IntoRequest<AgentBranchGetRequest>, ) -> Result<Response<AgentBranchGetResponse>, Status>
Sourcepub async fn add_step(
&mut self,
request: impl IntoRequest<AgentAddStepRequest>,
) -> Result<Response<AgentAddStepResponse>, Status>
pub async fn add_step( &mut self, request: impl IntoRequest<AgentAddStepRequest>, ) -> Result<Response<AgentAddStepResponse>, Status>
── Causal graph operations ──────────────────────────────────────────
pub async fn add_edge( &mut self, request: impl IntoRequest<AgentAddEdgeRequest>, ) -> Result<Response<AgentAddEdgeResponse>, Status>
pub async fn get_step( &mut self, request: impl IntoRequest<AgentGetStepRequest>, ) -> Result<Response<AgentGetStepResponse>, Status>
pub async fn get_content( &mut self, request: impl IntoRequest<AgentGetContentRequest>, ) -> Result<Response<AgentGetContentResponse>, Status>
pub async fn get_edges( &mut self, request: impl IntoRequest<AgentGetEdgesRequest>, ) -> Result<Response<AgentGetEdgesResponse>, Status>
pub async fn traverse( &mut self, request: impl IntoRequest<AgentTraverseRequest>, ) -> Result<Response<AgentTraverseResponse>, Status>
pub async fn find_similar_chains( &mut self, request: impl IntoRequest<AgentFindSimilarChainsRequest>, ) -> Result<Response<AgentFindSimilarChainsResponse>, Status>
Sourcepub async fn cas_put(
&mut self,
request: impl IntoRequest<AgentCasPutRequest>,
) -> Result<Response<AgentCasPutResponse>, Status>
pub async fn cas_put( &mut self, request: impl IntoRequest<AgentCasPutRequest>, ) -> Result<Response<AgentCasPutResponse>, Status>
── Reactive state operations ────────────────────────────────────────
pub async fn txn_commit( &mut self, request: impl IntoRequest<AgentTxnCommitRequest>, ) -> Result<Response<AgentTxnCommitResponse>, Status>
Sourcepub async fn claim(
&mut self,
request: impl IntoRequest<AgentClaimRequest>,
) -> Result<Response<AgentClaimResponse>, Status>
pub async fn claim( &mut self, request: impl IntoRequest<AgentClaimRequest>, ) -> Result<Response<AgentClaimResponse>, Status>
── Coordination primitives (claim / lease / renew / release) ───────── Native etcd/Consul/Zookeeper-style coordination: a claim is an atomic SetIfNotExists(claim_key, agent_id); a lease is the same with a TTL so an un-renewed holder auto-expires; renew/release are fenced so only the live holder can extend/drop the key. See issue #691.
pub async fn lease( &mut self, request: impl IntoRequest<AgentLeaseRequest>, ) -> Result<Response<AgentLeaseResponse>, Status>
pub async fn renew( &mut self, request: impl IntoRequest<AgentRenewRequest>, ) -> Result<Response<AgentRenewResponse>, Status>
pub async fn release( &mut self, request: impl IntoRequest<AgentReleaseRequest>, ) -> Result<Response<AgentReleaseResponse>, Status>
Sourcepub async fn expire_edge(
&mut self,
request: impl IntoRequest<AgentExpireEdgeRequest>,
) -> Result<Response<AgentExpireEdgeResponse>, Status>
pub async fn expire_edge( &mut self, request: impl IntoRequest<AgentExpireEdgeRequest>, ) -> Result<Response<AgentExpireEdgeResponse>, Status>
── Temporal graph operations ────────────────────────────────────────
pub async fn edge_history( &mut self, request: impl IntoRequest<AgentEdgeHistoryRequest>, ) -> Result<Response<AgentEdgeHistoryResponse>, Status>
Sourcepub async fn query_provenance(
&mut self,
request: impl IntoRequest<AgentQueryProvenanceRequest>,
) -> Result<Response<AgentQueryProvenanceResponse>, Status>
pub async fn query_provenance( &mut self, request: impl IntoRequest<AgentQueryProvenanceRequest>, ) -> Result<Response<AgentQueryProvenanceResponse>, Status>
── Memory-scope provenance audit (#697 phase 4) ──────────────────────
Gated by ManageMemoryScope; the gateway authorizes then forwards to the
data node that owns the _agent_provenance CF.
Sourcepub async fn agent_manage_team_grant(
&mut self,
request: impl IntoRequest<AgentManageTeamGrantRequest>,
) -> Result<Response<AgentManageTeamGrantResponse>, Status>
pub async fn agent_manage_team_grant( &mut self, request: impl IntoRequest<AgentManageTeamGrantRequest>, ) -> Result<Response<AgentManageTeamGrantResponse>, Status>
── Memory-scope team-membership admin (#697 phase 2c / #794) ───────── Grant/revoke an agent’s team membership; gated by ManageMemoryScope. The gateway authorizes then applies a durable metadata-Raft op so the change immediately affects Team-scope reads after the next internal-token refresh.
Sourcepub async fn agent_team_snapshot_local(
&mut self,
request: impl IntoRequest<TeamSnapshotLocalRequest>,
) -> Result<Response<TeamSnapshotLocalResponse>, Status>
pub async fn agent_team_snapshot_local( &mut self, request: impl IntoRequest<TeamSnapshotLocalRequest>, ) -> Result<Response<TeamSnapshotLocalResponse>, Status>
── Team time-travel (#787) — gateway facade fan-out/fence/merge ──────
pub async fn agent_team_diff_local( &mut self, request: impl IntoRequest<TeamDiffLocalRequest>, ) -> Result<Response<TeamDiffLocalResponse>, Status>
Sourcepub async fn cascade_expire(
&mut self,
request: impl IntoRequest<AgentCascadeExpireRequest>,
) -> Result<Response<AgentCascadeExpireResponse>, Status>
pub async fn cascade_expire( &mut self, request: impl IntoRequest<AgentCascadeExpireRequest>, ) -> Result<Response<AgentCascadeExpireResponse>, Status>
Cascade-expire a fact and its derived dependents (#693).
Sourcepub async fn supersede_fact(
&mut self,
request: impl IntoRequest<AgentSupersedeFactRequest>,
) -> Result<Response<AgentSupersedeFactResponse>, Status>
pub async fn supersede_fact( &mut self, request: impl IntoRequest<AgentSupersedeFactRequest>, ) -> Result<Response<AgentSupersedeFactResponse>, Status>
Supersede a fact with a replacement, optionally cascading (#693 phase 4).
Sourcepub async fn memory_ingest(
&mut self,
request: impl IntoRequest<AgentMemoryIngestRequest>,
) -> Result<Response<AgentMemoryIngestResponse>, Status>
pub async fn memory_ingest( &mut self, request: impl IntoRequest<AgentMemoryIngestRequest>, ) -> Result<Response<AgentMemoryIngestResponse>, Status>
Transactional memory ingest (#780): forwarded to the owning data node’s AgentMemoryIngest (atomic, snapshot-isolated dedup/create/supersede).
Sourcepub async fn belief_query(
&mut self,
request: impl IntoRequest<AgentBeliefQueryRequest>,
) -> Result<Response<AgentBeliefQueryResponse>, Status>
pub async fn belief_query( &mut self, request: impl IntoRequest<AgentBeliefQueryRequest>, ) -> Result<Response<AgentBeliefQueryResponse>, Status>
── Bitemporal belief queries (“who believed what, when”) ─────────────
pub async fn belief_divergence( &mut self, request: impl IntoRequest<AgentBeliefDivergenceRequest>, ) -> Result<Response<AgentBeliefDivergenceResponse>, Status>
Sourcepub async fn start_run(
&mut self,
request: impl IntoRequest<AgentStartRunRequest>,
) -> Result<Response<AgentStartRunResponse>, Status>
pub async fn start_run( &mut self, request: impl IntoRequest<AgentStartRunRequest>, ) -> Result<Response<AgentStartRunResponse>, Status>
── Durable agent execution (#846, epic #699 / sub-epic #792) ───────── Run-id-pinned routing: StartRun picks a shard by hashing run_key/agent_id through the ShardRouter and returns run_id = (shard_id << 40) | local_seq; every subsequent call extracts the owning shard as run_id >> 40 — no metadata lookup needed to route. The gateway resolves that shard’s leader and retries on NotLeader.
pub async fn run_step( &mut self, request: impl IntoRequest<AgentRunStepRequest>, ) -> Result<Response<AgentRunStepResponse>, Status>
pub async fn complete_step( &mut self, request: impl IntoRequest<AgentCompleteStepRequest>, ) -> Result<Response<AgentCompleteStepResponse>, Status>
pub async fn checkpoint_get( &mut self, request: impl IntoRequest<AgentCheckpointGetRequest>, ) -> Result<Response<AgentCheckpointGetResponse>, Status>
pub async fn checkpoint_latest( &mut self, request: impl IntoRequest<AgentCheckpointLatestRequest>, ) -> Result<Response<AgentCheckpointLatestResponse>, Status>
pub async fn provenance_chain_query( &mut self, request: impl IntoRequest<AgentProvenanceChainQueryRequest>, ) -> Result<Response<AgentProvenanceChainQueryResponse>, Status>
pub async fn resume_from_step( &mut self, request: impl IntoRequest<AgentResumeFromStepRequest>, ) -> Result<Response<AgentResumeFromStepResponse>, Status>
pub async fn resume_semantic( &mut self, request: impl IntoRequest<AgentResumeSemanticRequest>, ) -> Result<Response<AgentResumeSemanticResponse>, Status>
pub async fn get_run_status( &mut self, request: impl IntoRequest<AgentGetRunStatusRequest>, ) -> Result<Response<AgentGetRunStatusResponse>, Status>
Sourcepub async fn fork_run(
&mut self,
request: impl IntoRequest<AgentForkRunRequest>,
) -> Result<Response<AgentForkRunResponse>, Status>
pub async fn fork_run( &mut self, request: impl IntoRequest<AgentForkRunRequest>, ) -> Result<Response<AgentForkRunResponse>, Status>
Phase 5 (#797): branch/time-travel resume. Routed by source_run_id >> 40 to the shard owning the source run; the child run is allocated on that same shard so its self-routing run_id stays addressable.
pub async fn fork_across_candidates( &mut self, request: impl IntoRequest<AgentForkAcrossCandidatesRequest>, ) -> Result<Response<AgentForkAcrossCandidatesResponse>, Status>
pub async fn artifact_put( &mut self, request: impl IntoRequest<AgentArtifactPutRequest>, ) -> Result<Response<AgentArtifactPutResponse>, Status>
pub async fn artifact_get( &mut self, request: impl IntoRequest<AgentArtifactGetRequest>, ) -> Result<Response<AgentArtifactGetResponse>, Status>
pub async fn artifact_resolve( &mut self, request: impl IntoRequest<AgentArtifactResolveRequest>, ) -> Result<Response<AgentArtifactResolveResponse>, Status>
Sourcepub async fn watch_prefix(
&mut self,
request: impl IntoRequest<AgentWatchPrefixRequest>,
) -> Result<Response<Streaming<AgentWatchEventProto>>, Status>
pub async fn watch_prefix( &mut self, request: impl IntoRequest<AgentWatchPrefixRequest>, ) -> Result<Response<Streaming<AgentWatchEventProto>>, Status>
── Streaming ops ────────────────────────────────────────────────────
Trait Implementations§
Source§impl<T: Clone> Clone for AgentStateServiceClient<T>
impl<T: Clone> Clone for AgentStateServiceClient<T>
Source§fn clone(&self) -> AgentStateServiceClient<T>
fn clone(&self) -> AgentStateServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for AgentStateServiceClient<T>
impl<T> RefUnwindSafe for AgentStateServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for AgentStateServiceClient<T>where
T: Send,
impl<T> Sync for AgentStateServiceClient<T>where
T: Sync,
impl<T> Unpin for AgentStateServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for AgentStateServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AgentStateServiceClient<T>where
T: UnwindSafe,
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,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request