Expand description
Host tool execution (§4’s concurrency rule): a bounded thread pool runs effects in parallel; ALL store writes stay on the driver thread. The executor is a host-supplied trait — Areev never executes anything itself (Tool grains are data; execution is the host’s job), it hands the host a name, a pinned definition hash, the input, and the deterministic idempotency key the crash-redelivery contract depends on (§5.3).
Structs§
- Command
Executor - A subprocess executor — the CLI’s zero-dependency host-tool seam, the
same pattern as
--embed-cmd/--llm-cmd: the command receives the input JSON on stdin andAREEV_TOOL_NAME/AREEV_TOOL_HASH/AREEV_IDEMPOTENCY_KEYin the environment, and prints the result JSON on stdout. Non-zero exit or unparseable output is anExecutorError(retryable per the §6.3 table). The subprocess NEVER opens the memory file — the parent journals on its behalf (§4’s single-writer rule, and the process-wide open-path registry would refuse it anyway). - Dispatch
Done - A completed dispatch coming back to the driver thread. Carries the executor the job DISPATCHED under — a flow tool inside an abstract node runs as a Host tool while the node-level executor says Abstract, and the result grain must re-state what actually ran (§5.1).
- Dispatch
Job - One in-flight dispatch handed to the pool.
- Executor
Registry - A registry-backed executor: tools dispatch by name; unknown names fail
with
ExecutorError(never a panic — a plan naming a tool the host didn’t register is the host’s configuration error, reported per attempt). - Pool
- The bounded pool: N worker threads, jobs in, completions out. Workers touch NO store handle — parallelism lives here and only here. LLM effects route to the tool-calling seam; everything else to the host executor.
- Prepared
Llm - A prepared LLM request, built ON THE DRIVER THREAD (the pool never touches the store): the transcript translated to seam messages plus the pinned tool Definitions already fetched.
Enums§
- Exec
Result - What a host tool run produced. The driver turns this into an
EffectOutcomewith deterministic storage accounting.
Traits§
- Host
Tool Executor - The host’s executor.
idempotency_keyis stable across crash redeliveries of the same attempt — an executor that performs external side effects should deduplicate on it; one that cannot should be run withon_dangling = fail.
Type Aliases§
- Token
Sink - A §6.10 TokenChunk sink: text deltas stream into it as they arrive.