Expand description
theway-daemon — the headless agent runtime kernel.
The daemon composes the core agent runtime with storage, tools, automation,
MCP/LSP adapters, and the gRPC/HTTP/MCP protocol servers. Shared wire
contracts live in theway-transport; persistence lives in
theway-storage; client presentation lives outside this crate.
Most implementation modules are crate-private. The root exports process
startup types, while the public modules below are extension surfaces for
custom executors, hooks, storage adapters, tools, and automation sources.
Self-alias so #[path]-included src modules (integration tests) and lib code
share one absolute path shape: theway_daemon::tools, theway_daemon::...
resolve identically inside the lib and inside test crates that pull src files
in by path (same pattern as theway-core’s theway_core alias).
Modules§
- agent_
specs - App-layer subagent spec table — the spec CONCEPT lives here, not in the engine.
- env
- Environment adapters — the
ExecutionEnvimplementations owned by the daemon kernel (daemon-kernel-layers: the engine crate keeps the trait, the kernel supplies the concrete implementations). - executor
- Execution-environment seam: the kernel-side executor implementations and process primitives.
- hook_
executors - Daemon-side implementations of the hook side-effect seams.
- hooks
- User-configured CLI hooks.
- runtime_
storage - Daemon persistence ports and their local/controller-backed adapters.
- session_
ops - Session resources (session-resource-model) — the app-side surface the transport servers program against for the session lifecycle RPCs / HTTP routes.
- skills
- Skills discovery for the daemon.
- templates
- Prompt-template discovery for the CLI. Same dual-root precedence as the skills loader:
paths.work_dir/.theway/templates/overridespaths.base/templates/on a name collision. - tgrep_
server tgrep serveprocess registry for the built-in grep tool (issue #121).- tools
- Tool ASSEMBLY layer — the application-layer half of the session tool set.
- trigger_
engine - Trigger engine — the host-side (CLI) implementation of external-event-driven agent invocation, moved out of theway-core.
- ts_
extensions - Daemon-owned TypeScript extension discovery and execution.
Structs§
- Agent
Session - Lightweight wrapper. Holds the harness + retry settings; not a deep clone of TS
AgentSession(no extension orchestration, no event-bus fan-out — just retry). - Daemon
Options - Daemon
Paths - Resolved host-path context for one daemon process.
- Daemon
Services - Shared services owned by one daemon application instance.
- Retry
Settings