Skip to main content

Crate patchwork_eval

Crate patchwork_eval 

Source
Expand description

Patchwork interpreter with synchronous blocking execution.

This crate provides an interpreter for Patchwork code. Think blocks block on channel operations waiting for LLM responses. Exceptions are modeled as Error::Exception(Value) and propagate using Rust’s ? operator.

Structs§

AgentHandle
A handle to the agent that can be used by the interpreter.
Interpreter
The Patchwork interpreter.
Runtime
The runtime environment for executing Patchwork code.
ThinkRequest
A request to execute a think block.

Enums§

Error
Errors that can occur during interpretation.
ThinkResponse
Response from the agent during a think session.
Value
A runtime value in the Patchwork language.

Functions§

eval_block
Evaluate a block of statements.
eval_expr
Evaluate an expression.
eval_statement
Evaluate a single statement.

Type Aliases§

PrintSink
A sink for print output, allowing redirection away from stdout.
Result
Result type for interpreter operations.