Pure protocollash-sansio
Owns TurnMachine, Effect, Response, TurnDriverPreamble, prompt templates, messages, attachments, the TurnOutcome::{Finished, AgentFrameSwitch, Stopped} contract, canonical tool-call output, and tool definitions/output contracts. It does not depend on Lashlang; runtime-facing protocol build input lives in lash-core, while Lashlang host environments live in the RLM/Lashlang runtime path. Top-level files cover turn, prompt, plugin, attachment, session, turn drivers, tool contracts, tool output, and tool catalogs; the sansio/, session_model/, and llm/ subdirectories hold the state machine, durable model, and provider request types.
lash-sansio
Async runtimelash-core
Owns LashRuntime, Session, SessionGraph, EffectHost / RuntimeEffectController, ProcessRegistry, ProcessCancelAbility, ProtocolBuildInput, ProcessEngine, and the RuntimePersistence contract, plus tool dispatch, live provider handles, attachments, tracing, runtime controls, and AgentFrame switch-following turn execution. Process support is explicit host configuration: core owns the generic process registry, worker, leases, handle grants, and opaque engine dispatch; protocol/language runtimes decide which language abilities those mechanisms expose. No knowledge of MCP, user config files, provider credential files, or any host concerns; those live in higher layers. lash-restate supplies the first-party durable EffectHost; the same controller boundary can be implemented by other workflow runtimes.
lash-core, lash-restate
Facadelash
App-facing API on top of lash-core. Provides LashCore, LashCoreBuilder, LashSession, SessionBuilder, TurnBuilder, mode presets, and typed-plugin binding helpers. Host applications use this crate (not lash-core directly) for runtime construction, chat/task sessions, persistence wiring, and semantic turn streaming.
lash, examples/*
Remote service DTOslash-remote-protocol
Owns versioned serde/schemars DTOs for exposing Lash through service boundaries: RemoteTurnRequest, RemoteTurnResult, RemoteLlmRequest, RemoteLlmResponse, RemoteTurnActivity, RemoteSessionObservation, RemoteSessionObservationEvent, RemoteLiveReplayGap, prompt layer patches, trigger occurrence/subscription envelopes, and remote tool grants. Tool execution is not a remote DTO path; hosts run remote work from their own ToolProvider. The facade reexports the DTO surface as lash::remote; optional core-conversions helpers live in the standalone crate.
lash-remote-protocol
CLI runtime + configlash-cli
Hosts the lash binary plus a [lib] half that defines LashConfig, provider spec parsing, and credential bootstrap. The bin handles resume/fork, --print, interactive TUI flows, and assembles the plugin factory chain (providers, MCP, mode presets) before constructing LashCore.
lash-cli
Protocol pluginsstandard + rlm
Standard drives native provider tool calls. RLM extracts lashlang code fences, runs persistent REPL state with read-only host bindings projected into scope (history and ProjectionRef-backed app globals), renders execution instructions only from the effective LashlangHostEnvironment, masks fence streaming, provides the continue_as AgentFrame switch control tool, and records the RLM trajectory. Both protocols return terminal outcomes; shared runtime code writes final prose transcripts.
lash-protocol-standard, lash-protocol-rlm, lashlang, lash-rlm-types
Provider pluginsOpenAI, Codex, Anthropic, Google
Each provider implements state, auth, readiness, transport, and model policy components behind ProviderHandle. The CLI wires provider factories for the compiled-in kind names (anthropic, openai, openai-compatible, codex, google_oauth) directly. Shared HTTP plumbing lives in lash-llm-transport (client build, timeouts, SSE framing, usage merge), and OpenAI-style JSON Schema projection in lash-provider-openai’s schema module.
lash-provider-*, lash-llm-transport
Tools + plugin cratesdefault tools + subagents + LLM helpers + MCP + tool-output budgeting
Standard tools (file read/glob/edit/write, shell, web search/fetch), CLI-owned grep search, subagents, llm_query, plan mode, prompt context, observational memory, rolling-history compaction, UI activity, MCP servers (via lash-plugin-mcp, rmcp-based, Stdio + Streamable HTTP + SSE), and the built-in tool-output budgeter all register through tool providers or plugin factories depending on whether they need runtime/session behavior. lash-tool-support holds shared path-resolution and static-provider helpers; lash-search-tools keeps the fff-backed local grep provider out of non-CLI hosts. Lash ships no tool-discovery primitive (ADR 0005): catalog membership is the only availability fact, and discoverability of a large MCP tail is host policy — the reference search_tools pipeline (catalogue-preview contribution, BM25/semantic ranking, LLM rerank, schema indexing, and a DeferredToolResolver) lives in lash-cli as an example.
lash-standard-plugins, lash-subagents, lash-llm-tools, lash-tools (files, shell, web), lash-search-tools (grep), lash-tool-support, lash-plugin-*, lash-plugin-tool-output-budget
PersistenceStore interfaces + first-party adapters
RuntimePersistence, ProcessRegistry, TriggerStore, artifact stores, and attachment stores are generic host seams. lash-sqlite-store is the local first-party implementation; lash-postgres-store is the shared-worker first-party implementation; lash-s3-store stores attachment bytes in S3-compatible object storage; and lash-core’s FileAttachmentStore backs attachment blobs on disk. Hosts can implement the same traits for another database or object store as long as the session execution lease, fenced commit, claim, idempotency, and blob-reference semantics hold. In-flight effect replay belongs to the active EffectHost.
lash-sqlite-store, lash-postgres-store, lash-s3-store
Host UICLI, TUI, UI surfaces
The CLI bootstraps runtime, plugins, and providers, then renders the authoritative SessionReadView through ChronologicalProjection into UiTimeline.
lash-cli, lash-tui-extensions, lash-tui
Inspection toolstrace + export + file index + perf
lash-trace defines standard and extended JSONL trace records, opt-in Lashlang process-tracking records, and the optional OpenTelemetry sink. lash-export walks root and child sessions, renders continue_as AgentFrame switches inline inside their owning session, and renders spawn_agent children as drill-in views, combining store state with provider traces for chronological sessions, prompt snapshots, and token usage in a single HTML doc. lash-trace-viewer is a standalone tool that renders JSONL traces into a self-contained HTML browser. lash-file-index powers async fuzzy file completion. lash-perf owns runtime profiling scenarios, phase measurement, stack-size matrix probes, aggregation, and guard reports.
lash-trace, lash-trace-viewer, lash-export, lash-file-index, lash-perf
Applied workflowsharness optimization + autoresearch
lash-harness-opt provides generic optimization primitives (Candidate, HarnessProject, HarnessOptimizer, SqliteHarnessStore) and the strategies::gepa reflective strategy. Autoresearch adds research tools and a UI extension on top of the normal runtime/plugin stack.
lash-harness-opt, lash-autoresearch