pub struct AgentProtocolHost { /* private fields */ }Expand description
One release- and session-bound A3S Code headless protocol host.
Cloud, Fleet, and other callers may transport commands and receipts, but this adapter is the sole mapping into Code’s run lifecycle and event store.
Implementations§
Source§impl AgentProtocolHost
impl AgentProtocolHost
pub fn new( agent_release_identity: impl Into<String>, session: Arc<AgentSession>, ) -> Result<Self, AgentProtocolHostError>
Sourcepub fn from_manifest(
manifest: &AgentReleaseManifest,
session: Arc<AgentSession>,
) -> Result<Self, AgentProtocolHostError>
pub fn from_manifest( manifest: &AgentReleaseManifest, session: Arc<AgentSession>, ) -> Result<Self, AgentProtocolHostError>
Bind an admitted v1 release manifest to its Code session.
Capability compatibility remains an activation concern for the process host, but a manifest for another protocol can never enter this v1 host.
pub fn agent_release_identity(&self) -> &str
pub fn session(&self) -> &Arc<AgentSession> ⓘ
Sourcepub async fn execute(
&self,
command: &AgentProtocolCommandV1,
) -> Result<AgentProtocolCommandReceiptV1, AgentProtocolHostError>
pub async fn execute( &self, command: &AgentProtocolCommandV1, ) -> Result<AgentProtocolCommandReceiptV1, AgentProtocolHostError>
Execute, cancel, or recover one exact run and return a digest-bound
receipt. Start and recovery return after Code has admitted the detached
worker; progress is observed through Self::event_page.
Sourcepub async fn execute_exact_recovery(
&self,
request: &AgentProtocolRunRecoverExactV1,
) -> Result<AgentProtocolCommandReceiptV1, AgentProtocolExactRecoveryError>
pub async fn execute_exact_recovery( &self, request: &AgentProtocolRunRecoverExactV1, ) -> Result<AgentProtocolCommandReceiptV1, AgentProtocolExactRecoveryError>
Recover only when the locally loadable loop boundary matches the logical component of the complete portable-checkpoint descriptor.
This additive entry point leaves AgentProtocolCommandV1 and its v1
transport shape unchanged. Validation pins the immutable checkpoint in
memory before workspace baseline capture and before the target Run is
admitted, so a concurrently overwritten store entry cannot change what
the worker resumes.
Sourcepub async fn execute_exact_recovery_from_checkpoint(
&self,
request: &AgentProtocolRunRecoverExactV1,
checkpoint: LoopCheckpoint,
) -> Result<AgentProtocolCommandReceiptV1, AgentProtocolExactRecoveryError>
pub async fn execute_exact_recovery_from_checkpoint( &self, request: &AgentProtocolRunRecoverExactV1, checkpoint: LoopCheckpoint, ) -> Result<AgentProtocolCommandReceiptV1, AgentProtocolExactRecoveryError>
Recover from the logical value decoded from the same validated portable
checkpoint as request, without first publishing split store writes.
Sourcepub async fn event_page(
&self,
identity: &AgentProtocolRunIdentityV1,
after_event_sequence: Option<u64>,
limit: usize,
) -> Result<AgentProtocolEventPageV1, AgentProtocolHostError>
pub async fn event_page( &self, identity: &AgentProtocolRunIdentityV1, after_event_sequence: Option<u64>, limit: usize, ) -> Result<AgentProtocolEventPageV1, AgentProtocolHostError>
Project a bounded cursor page directly from Code’s authoritative run store without introducing a second provider event model.
Sourcepub async fn event_page_for(
&self,
request: &AgentProtocolEventPageRequestV1,
) -> Result<AgentProtocolEventPageV1, AgentProtocolHostError>
pub async fn event_page_for( &self, request: &AgentProtocolEventPageRequestV1, ) -> Result<AgentProtocolEventPageV1, AgentProtocolHostError>
Execute the canonical transport-facing event page query.
Sourcepub async fn change_set_for(
&self,
request: &AgentProtocolChangeSetRequestV1,
) -> Result<AgentProtocolChangeSetV1, AgentProtocolHostError>
pub async fn change_set_for( &self, request: &AgentProtocolChangeSetRequestV1, ) -> Result<AgentProtocolChangeSetV1, AgentProtocolHostError>
Read the immutable Git-compatible patch captured for one terminal run.
Trait Implementations§
Source§impl Clone for AgentProtocolHost
impl Clone for AgentProtocolHost
Source§fn clone(&self) -> AgentProtocolHost
fn clone(&self) -> AgentProtocolHost
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 !RefUnwindSafe for AgentProtocolHost
impl !UnwindSafe for AgentProtocolHost
impl Freeze for AgentProtocolHost
impl Send for AgentProtocolHost
impl Sync for AgentProtocolHost
impl Unpin for AgentProtocolHost
impl UnsafeUnpin for AgentProtocolHost
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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