System Shape
Dependency direction runs from host surfaces inward to the runtime, then into the sans-IO protocol model. Providers, modes, tools, and plugins are replaceable edges around the runtime core.
TUI, setup, resume/fork, --print
(bin + lib half hosting LashConfig)"] Facade["lash (facade)
app-facing core/session/turn API"] Export["lash-export
multi-session tree → HTML / JSON"] TraceViewer["lash-trace-viewer
JSONL trace browser"] Bench["benchmark runners
CLBench, SWE-bench, LongCoT, LongMemEval"] end subgraph Runtime["Async host runtime"] L["lash-core
LashRuntime, Session, Store, PluginHost"] Env["RuntimeEnvironment
shared runtime infrastructure"] Graph["SessionGraph
durable event graph"] Read["SessionReadView
public read seam"] Tools["Tool dispatch
dynamic tools, built-ins"] Sqlite["lash-sqlite-store
concrete SQLite persistence"] Trace["lash-trace
JSONL trace records"] end subgraph Kernel["Pure protocol kernel"] S["lash-sansio
TurnMachine, Effect, Response"] LL["lashlang
parser, AST, VM, persistent REPL state"] end subgraph Extensions["Replaceable edges"] Modes["mode plugins
standard + rlm"] Providers["provider crates
OpenAI, Codex, Anthropic, Google"] Plugins["tool/plugin crates
llm_query, plan, memory, context, UI activity"] Mcp["lash-plugin-mcp
rmcp-based MCP plugin
stdio / streamable-http / sse"] Subagents["lash-subagents
spawn_agent host + RLM bridge"] end CLI --> Facade CLI --> L Facade --> L Bench --> Facade Export --> Read TraceViewer --> Trace L --> Env L --> S L --> LL L --> Graph L --> Sqlite L --> Trace Graph --> Read L --> Tools Modes --> L Providers --> L Plugins --> L Mcp --> L Subagents --> L
Current KPIs
These figures are workspace-level and exclude generated build output.
*.rs outside target; Rust dominates the workspace.standard uses native tool calls; rlm drives work through Lashlang and can hand off to a successor session via continue_as.Authority Boundaries
The durable source of truth is the session graph. Everything else is either an execution surface, an external transport, or a projection.
-
Graph is durable.
SessionGraphstores conversation records, tool events, mode events, plugin nodes, active-path metadata, checkpoint references, and replay material. -
Projection is derived.
SessionReadViewandChronologicalProjectionread graph state into semantic order. The CLI'sUiTimelineis downstream of that — never a persistence owner. -
Modes own protocol behavior.
ModePreamble,ContextProjector, andProtocolDriverHandledecide what providers see and how model output advances a turn. RLM additionally projects read-only host bindings (e.g.,history) into Lashlang scope through theProjectedBindingsseam. -
Tool output is projected, not raw.
The
ToolOutputBudgetPluginFactorytrims oversized tool results once at theBeforeState,BeforeModel, andBeforeHistoryhook sites so on-disk state, the live model prompt, and rolled-up history each see a budgeted view. -
Handoffs are runtime continuations.
A turn can finish as
TurnOutcome::Handoff { session_id }, which transparently activates an RLM successor with a fresh window. App hosts that useTurnBuilder::stream,run, orcollect_withget the final handoff-followedTurnResult; lower-level runtime hosts can still inspect the underlying handoff chain. -
Runtime host capabilities are trait-shaped.
RuntimeSessionManagerimplements focused plugin host traits for snapshots, tool catalogs, session tool state, session lifecycle, turns, background tasks, monitors, the session graph, prompt state, direct completion, and tracing. Public tools see these through namedToolContextcapabilities, not through a general host escape hatch.