Skip to main content

Psp9AgentRuntime

Struct Psp9AgentRuntime 

Source
pub struct Psp9AgentRuntime { /* private fields */ }
Expand description

The production runtime for one coding task.

Implementations§

Source§

impl Psp9AgentRuntime

Source

pub async fn run_exploration(self, task: String) -> Result<Psp9RunSummary>

Exploration-only session (PSP-9 phase 7): the deterministic repository map plus an interactive read-only explorer tool loop. The explorer holds only read capabilities; every tool call still passes the kernel, so a mutation attempt is denied and recorded rather than prevented by convention. Nothing is measured, gated, or promoted.

Source§

impl Psp9AgentRuntime

Source

pub async fn resume_session(self, session_id: String) -> Result<Psp9RunSummary>

Continue an interrupted model loop from its newest durable candidate checkpoint (PSP-9 resolved decision 6). Nothing live is deserialized: the accepted candidate is rebuilt from content-addressed artifacts, a fresh capability is minted from the grant intersection at the current durable authority epoch, and the loop re-enters with exactly the checkpoint’s remaining budgets. A bumped epoch refuses the resume.

Source§

impl Psp9AgentRuntime

Source

pub fn from_config( working_dir: PathBuf, config: &Config, routes: Psp9ModelRoutes, run_config: Psp9RunConfig, ) -> Result<Self>

Source

pub fn with_transport( working_dir: PathBuf, transport: Arc<dyn ModelTransport>, model: ModelId, run_config: Psp9RunConfig, ) -> Self

Assemble the same runtime with an injected provider-neutral transport. Used by conformance tests and embedders that supply their own model plane.

Source

pub fn with_tool_handlers(self, handlers: CandidateHandlerRegistry) -> Self

Extend or replace the execution plane with a registry assembled at the composition root (registered tool families beyond the builtins). A configured MCP dispatcher is preserved as the fallback.

Source

pub fn with_tool_family(self, entries: Vec<ToolEntry>) -> Self

Add a registered tool family’s catalog entries. Pair with Self::with_tool_handlers; the entries enter every node’s assembled catalog and therefore its derived grant.

Source

pub fn with_domain(self, domain: Arc<dyn AgentDomainPackage>) -> Self

Select the domain package (from a DomainRegistry at the composition root). Defaults to the coding domain.

Source

pub fn with_database_path(self, path: PathBuf) -> Self

Source

pub fn with_session_store(self, store: Arc<SessionStore>) -> Self

Record into an existing store handle instead of opening a second live handle on the same database file (used when an in-process dashboard already holds one).

Source

pub fn with_prompt_overrides(self, overrides: SectionOverrides) -> Self

Install experimental platform-section overrides (validated bundle replacements). The composition root gates this behind --allow-experimental-prompts; active overrides are ledgered at session start.

Source

pub fn with_search_limits(self, limits: SearchLimits) -> Self

Override the forest’s Definition 5 limit vector (tests, embedders).

Source

pub fn with_fallback_models(self, models: Vec<ModelId>) -> Self

Source

pub fn with_explorer_model(self, model: ModelId) -> Self

Source

pub fn with_adjudicator_model(self, model: ModelId) -> Self

Source

pub fn connect_tui(self, sender: EventSender, receiver: ActionReceiver) -> Self

Source

pub async fn run(self, task: String) -> Result<Psp9RunSummary>

Trait Implementations§

Source§

impl Debug for Psp9AgentRuntime

Source§

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

Formats the value using the given formatter. 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

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
§

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
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<T> ToAst for T

§

fn ast(self, begin: usize, end: usize) -> Spanned<Self>

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

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> AsTypeStaticRegistered for T

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> HasTyVTable for T
where T: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> StarlarkAnyBound for T
where T: Debug + Send + Sync + 'static,