Skip to main content

Crate oino_core

Crate oino_core 

Source
Expand description

oino-core: the coding-agent runtime for Oino.

The composition root of the runtime crates: oino-agent (loop), oino-tools (built-ins), oino-settings, oino-resources, oino-models and oino-session. Providers and extensions are reached only through the extensions::api traits (implemented by the WASM host); core contains no provider code and never depends on wasmtime.

§API map

ModuleContents
servicesservices::Services per cwd, services::ExtensionLoader, services::HostRouter
runtimeruntime::AgentSessionRuntime: create, new/switch/fork/clone/import
safe_modesafe_mode::SafeMode: failed-start counter, suspects, -ne plan
sessionsession::AgentSession: prompts, queues (+ single-item edits), models, tools, compaction, retry, bash (+ detach), tree, stats, export, file checkpoints
extensionsinstance contract, host operations, registries, composition dispatch, turn arbiter
agentsnested AgentSessions behind agents.spawn: agents::ChildAgent, agents::AgentSpec
providerprovider::ProviderStream: requests to provider components
compactioncut points, summaries, branch summaries, overflow/retry classification
eventsevents::ClientEvent and friends (move to oino-protocol)
uiui::UiBridge: dialogs, fire-and-forget requests, dismissals
hubhub::EventHub: ordered, bounded, coalescing fan-out
topicstopics::TopicStore: sticky bus topics mirrored to frontends (_oino/topics, oino:git)
builtinbuilt-in tools bound to session context
exportself-contained HTML export
testing (feature)—

Modules§

agents
Nested agents (runtime §12, D8): extensions spawn child AgentSessions in the same process through agents.spawn. Children share the parent’s services (settings, resources, models, provider components) and may run with none, all or some of its extensions.
builtin
Built-in tools of a session (oino-tools wired to the session’s settings and context).
compaction
Compaction and branch summarisation, plus the assistant error classification core reuses for overflow recovery and auto-retry.
events
Client events (runtime.md §6): AgentSessionEvent plus the other client events.
export
Self-contained HTML export of a session branch (structure: header, messages, tool calls, collapsed thinking, embedded CSS, no external assets).
extensions
Extension runner over native extension instances.
hub
Ordered client event fan-out with bounded, coalescing subscriber queues (architecture.md §4.2).
provider
Provider dispatch: the StreamFn that talks only to provider extensions.
runtime
AgentSessionRuntime (agent-session-runtime + createAgentSession): owns the current AgentSession, replaces it on new/switch/fork/clone/import, and keeps one client event stream across replacements.
safe_mode
Safe mode (X-SAFE, spec-core §2.3.3): after two consecutive failed starts, the next start runs with extensions off and providers on (-ne semantics — the agent stays usable), and a banner diagnostic names the recorded suspects.
services
Per-cwd services: settings, resources, models + auth, loaded extensions, the provider stream and the host router extensions call back into.
session
AgentSession: agent lifecycle, persistence, prompts, queues, models, tools, compaction, retry, bash, tree navigation and the extension bindings of one session.
topics
Frontend topic feed (_oino/topics, modes §4): the sticky bus topics extensions publish (an embedder’s acme:long-horizon:state, acme:workflow:status, acme:bg:tasks, acme:fusion:status, acme:kanboard:status, …) plus the core’s own oino:git topic, mirrored to subscribed frontends as crate::events::OinoEvent::Topic.
ui
Extension UI plumbing (ui-protocol.md §2–§6, §9).