Skip to main content

Crate theway_daemon

Crate theway_daemon 

Source
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 ExecutionEnv implementations 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/ overrides paths.base/templates/ on a name collision.
tgrep_server
tgrep serve process 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§

AgentSession
Lightweight wrapper. Holds the harness + retry settings; not a deep clone of TS AgentSession (no extension orchestration, no event-bus fan-out — just retry).
DaemonOptions
DaemonPaths
Resolved host-path context for one daemon process.
DaemonServices
Shared services owned by one daemon application instance.
RetrySettings

Enums§

DaemonTransport
SessionSelection

Functions§

run