pub struct Psp9AgentRuntime { /* private fields */ }Expand description
The production runtime for one coding task.
Implementations§
Source§impl Psp9AgentRuntime
impl Psp9AgentRuntime
Sourcepub async fn run_exploration(self, task: String) -> Result<Psp9RunSummary>
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
impl Psp9AgentRuntime
Sourcepub async fn resume_session(self, session_id: String) -> Result<Psp9RunSummary>
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
impl Psp9AgentRuntime
pub fn from_config( working_dir: PathBuf, config: &Config, routes: Psp9ModelRoutes, run_config: Psp9RunConfig, ) -> Result<Self>
Sourcepub fn with_transport(
working_dir: PathBuf,
transport: Arc<dyn ModelTransport>,
model: ModelId,
run_config: Psp9RunConfig,
) -> Self
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.
Sourcepub fn with_tool_handlers(self, handlers: CandidateHandlerRegistry) -> Self
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.
Sourcepub fn with_tool_family(self, entries: Vec<ToolEntry>) -> Self
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.
Sourcepub fn with_domain(self, domain: Arc<dyn AgentDomainPackage>) -> Self
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.
pub fn with_database_path(self, path: PathBuf) -> Self
Sourcepub fn with_session_store(self, store: Arc<SessionStore>) -> Self
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).
Sourcepub fn with_prompt_overrides(self, overrides: SectionOverrides) -> Self
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.
Sourcepub fn with_search_limits(self, limits: SearchLimits) -> Self
pub fn with_search_limits(self, limits: SearchLimits) -> Self
Override the forest’s Definition 5 limit vector (tests, embedders).
pub fn with_fallback_models(self, models: Vec<ModelId>) -> Self
pub fn with_explorer_model(self, model: ModelId) -> Self
pub fn with_adjudicator_model(self, model: ModelId) -> Self
pub fn connect_tui(self, sender: EventSender, receiver: ActionReceiver) -> Self
pub async fn run(self, task: String) -> Result<Psp9RunSummary>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Psp9AgentRuntime
impl !RefUnwindSafe for Psp9AgentRuntime
impl Send for Psp9AgentRuntime
impl Sync for Psp9AgentRuntime
impl Unpin for Psp9AgentRuntime
impl UnsafeUnpin for Psp9AgentRuntime
impl !UnwindSafe for Psp9AgentRuntime
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.