pub struct Runtime {
pub config: Arc<Config>,
pub services: Services,
pub diagnostics: Vec<String>,
pub system: SystemPrompt,
pub sessions_dir: PathBuf,
pub mode: String,
pub hindsight: Option<Endpoint>,
pub memorantado: Option<Endpoint>,
pub memory_notice: Option<String>,
pub memory_explicit: bool,
}Expand description
The process-wide composition: configuration and injected services.
Fields§
§config: Arc<Config>§services: Services§diagnostics: Vec<String>Problems found building the session (the alwaysSkills warnings of the system prompt), reported once.
system: SystemPromptThe root lane’s system prompt (subagents use it too).
sessions_dir: PathBufWhere session-scoped host files (job logs, inference context) live: the cwd’s session directory.
mode: Stringprint, json, rpc or interactive.
hindsight: Option<Endpoint>The Hindsight server and bank every instance shares (ULTRON_HINDSIGHT_URL, the global hindsightUrl
setting, else localhost:8888; ULTRON_HINDSIGHT_BANK, else “ultron”); None: memory is off.
memorantado: Option<Endpoint>The memorantado server memory uses instead, when memory.backend says so or (unset) it answered once
(memorantado::resolve).
memory_notice: Option<String>Set when memorantado is the backend but did not answer at start: memory is paused (never written to Hindsight instead); the session shows it once.
memory_explicit: boolWhether the memory server was set explicitly (ULTRON_HINDSIGHT_URL or the hindsightUrl setting;
memory.backend: memorantado, ULTRON_MEMORANTADO_URL or memorantadoUrl), not a default: automatic
memory defaults to it (crate::auto_memory).
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn new(
env: &Env,
mode: &str,
sessions_dir: PathBuf,
services: Services,
) -> Result<Runtime, String>
pub fn new( env: &Env, mode: &str, sessions_dir: PathBuf, services: Services, ) -> Result<Runtime, String>
Read the settings and the local resources for cwd (mode: “print”, “json” or “rpc”) and build the root
system prompt.
Sourcepub fn stack(
&self,
model: &Model,
api_key: Option<String>,
session_id: &str,
) -> Result<Arc<Stack>, String>
pub fn stack( &self, model: &Model, api_key: Option<String>, session_id: &str, ) -> Result<Arc<Stack>, String>
The host stack of one session, whose lanes call model; api_key (--api-key) is the key of model’s
provider, every other provider’s requests resolve their own credentials per request.
Sourcepub fn stack_with(
&self,
model: &Model,
api_key: Option<String>,
session_id: &str,
subagents: Option<SubagentHost>,
) -> Result<Arc<Stack>, String>
pub fn stack_with( &self, model: &Model, api_key: Option<String>, session_id: &str, subagents: Option<SubagentHost>, ) -> Result<Arc<Stack>, String>
Runtime::stack whose subagents run as subagents says (default: each on its agent loop, with an
in-memory task journal).