Skip to content

API Reference parrot.tools.repl_worker

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.tools.repl_worker

View source

Persistent-worker sandbox for PythonREPLTool (FEAT-380 Sandbox Hardening).

This package holds the control protocol (protocol.py), the worker process entrypoint (worker.py), and the host-side lifecycle classes (WorkerHandle, WorkerPool) that let PythonREPLTool run LLM-generated code in a spawned, resource-limited child process instead of in-process via exec()/eval() on the server's own thread pool.

PythonREPLTool (TASK-1943) imports WorkerPool/WorkerPoolExhaustedError from here to acquire its per-instance persistent worker lazily on first use. Arrow DataFrame transport (inject_dataframe) lands in TASK-1945.

Alias ErrorResponse

Re-exported from parrot.tools.repl_worker.protocol.ErrorResponse.

Alias ExecRequest

Re-exported from parrot.tools.repl_worker.protocol.ExecRequest.

Alias ExecResult

Re-exported from parrot.tools.repl_worker.protocol.ExecResult.

Alias GetVarRequest

Re-exported from parrot.tools.repl_worker.protocol.GetVarRequest.

Alias InProcessHandle

Re-exported from parrot.tools.repl_worker.inprocess.InProcessHandle.

Alias InjectDfRequest

Re-exported from parrot.tools.repl_worker.protocol.InjectDfRequest.

Alias ListNsRequest

Re-exported from parrot.tools.repl_worker.protocol.ListNsRequest.

Alias ListNsResponse

Re-exported from parrot.tools.repl_worker.protocol.ListNsResponse.

Alias MemoryVerdict

Re-exported from parrot.tools.repl_worker.protocol.MemoryVerdict.

Alias NamespaceLossError

Re-exported from parrot.tools.repl_worker.protocol.NamespaceLossError.

Alias NamespaceTimeoutError

Re-exported from parrot.tools.repl_worker.handle.NamespaceTimeoutError.

Alias OkResponse

Re-exported from parrot.tools.repl_worker.protocol.OkResponse.

Alias PingRequest

Re-exported from parrot.tools.repl_worker.protocol.PingRequest.

Alias PongResponse

Re-exported from parrot.tools.repl_worker.protocol.PongResponse.

Alias ProcessObserver

Re-exported from parrot.tools.repl_worker.observer.ProcessObserver.

Alias ProcessSample

Re-exported from parrot.tools.repl_worker.protocol.ProcessSample.

Alias ReadyResponse

Re-exported from parrot.tools.repl_worker.protocol.ReadyResponse.

Alias ResetRequest

Re-exported from parrot.tools.repl_worker.protocol.ResetRequest.

Alias SetVarRequest

Re-exported from parrot.tools.repl_worker.protocol.SetVarRequest.

Alias SnapshotRequest

Re-exported from parrot.tools.repl_worker.protocol.SnapshotRequest.

Alias SnapshotResponse

Re-exported from parrot.tools.repl_worker.protocol.SnapshotResponse.

Alias ValueResponse

Re-exported from parrot.tools.repl_worker.protocol.ValueResponse.

Alias Verdict

Re-exported from parrot.tools.repl_worker.protocol.Verdict.

Alias WorkerBootstrapError

Re-exported from parrot.tools.repl_worker.handle.WorkerBootstrapError.

Alias WorkerConfig

Re-exported from parrot.tools.repl_worker.protocol.WorkerConfig.

Alias WorkerHandle

Re-exported from parrot.tools.repl_worker.handle.WorkerHandle.

Alias WorkerPool

Re-exported from parrot.tools.repl_worker.pool.WorkerPool.

Alias WorkerPoolExhaustedError

Re-exported from parrot.tools.repl_worker.pool.WorkerPoolExhaustedError.

Alias decode_value

Re-exported from parrot.tools.repl_worker.protocol.decode_value.

Alias encode_value

Re-exported from parrot.tools.repl_worker.protocol.encode_value.

Alias read_frame

Re-exported from parrot.tools.repl_worker.protocol.read_frame.

Alias write_frame

Re-exported from parrot.tools.repl_worker.protocol.write_frame.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally