Index
diapason.system
¶
Top-level system composition: DiapasonSystem, SystemBuilder, and helpers.
AgentRuntime
dataclass
¶
Active agent and agent lifecycle managers.
DiapasonSystem
dataclass
¶
Fully wired system -- the single source of truth for primitive composition.
act(command)
¶
Execute an explicit low-risk desktop command without inference.
Unlike ask(), this method deliberately authorizes the deterministic
action path. Ambiguous or disallowed commands still fall back to the
normal configured assistant.
close()
¶
Release resources.
wire_channel(channel_bridge)
¶
Register a message handler on channel_bridge that routes every incoming message through this system (agent or engine) and replies.
Sessions are isolated per "<channel>:<conversation_id>" key so
each chat retains its own history.
Parameters¶
channel_bridge:
A connected :class:~diapason.channels._stubs.BaseChannel
instance whose on_message method accepts a callable.
Observability
dataclass
¶
Telemetry, traces, and hardware monitoring.
OrchestratorDeps
¶
Bases: Protocol
Minimum surface of DiapasonSystem that QueryOrchestrator depends on.
Tests can satisfy this with a lightweight class — no need to construct the full DiapasonSystem dataclass or materialize every subsystem.
QueryOrchestrator
¶
ask(query, *, context=True, temperature=None, max_tokens=None, agent=None, tools=None, system_prompt=None, operator_id=None, prior_messages=None, action_mode='off')
¶
Execute a query through the system and return a result dict.
Scheduling
dataclass
¶
Task scheduler and its persistent store.
SecurityContext
dataclass
¶
Security policy, audit, and boundary enforcement.
SystemBuilder
¶
Config-driven fluent builder for DiapasonSystem.
build()
¶
Construct a fully wired DiapasonSystem.
engine_instance(engine, key='openai-compat')
¶
Inject a pre-built engine instance, bypassing engine discovery.
Used by callers that must target one exact endpoint (e.g.
diapason eval --base-url). build() health-checks the instance
and raises a loud error if it is unreachable — it never silently
substitutes a different discovered engine.