Expand description
Parent-side supervisor for the lean-rs worker process boundary.
LeanWorker is the public process-boundary supervisor. It hides child
spawning, pipe management, protocol framing, child exit parsing, and
cleanup behind a small lifecycle API. Sessions, capability builders, and
the local worker pool sit on top of it. The wire types it speaks come
from lean_rs_worker_protocol and are re-exported on this crate’s
public surface so callers do not need a second crate dependency for the
common path.
This crate does not link libleanshared. The worker child runtime that
does is published separately as lean-rs-worker-child.
Structs§
- Lean
Worker - Supervisor for one
lean-rs-workerchild process. - Lean
Worker Batch Fingerprint - Stable cache-key-relevant facts for a planned batch.
- Lean
Worker Bootstrap Check - One bounded worker bootstrap finding.
- Lean
Worker Bootstrap Report - Structured result of worker bootstrap checks for one capability builder.
- Lean
Worker Cancellation Token - Parent-side cancellation token for worker-session requests.
- Lean
Worker Capability - A worker-backed capability with its Lake target built and worker started.
- Lean
Worker Capability Builder - Builder for a worker-backed Lean capability session.
- Lean
Worker Capability Fact - One named capability advertised by capability metadata.
- Lean
Worker Capability Metadata - Generic metadata reported by one downstream capability package.
- Lean
Worker Child - Locator for an app-owned worker child executable.
- Lean
Worker Command Metadata - One downstream command advertised by capability metadata.
- Lean
Worker Config - Configuration for starting a
lean-rs-workerchild process. - Lean
Worker Data Row - One downstream-owned JSON row delivered over a worker request.
- Lean
Worker Declaration Filter - Filter applied when enumerating declarations from a session’s open environment.
- Lean
Worker Declaration Flags - Compact declaration flags returned by declaration search.
- Lean
Worker Declaration Inspection - Bounded facts for one inspected declaration.
- Lean
Worker Declaration Inspection Fields - Field selection for one declaration inspection request.
- Lean
Worker Declaration Inspection Request - Bounded request to inspect one selected declaration.
- Lean
Worker Declaration Outline Result - Result for
LeanWorkerModuleQuerySelector::DeclarationOutline. - Lean
Worker Declaration Proof Search Facts - Cheap proof-search facts for one declaration.
- Lean
Worker Declaration Row - One declaration row returned by
LeanWorkerSession::describeorLeanWorkerSession::describe_bulk. - Lean
Worker Declaration Search - Bounded structured declaration search request.
- Lean
Worker Declaration Search Bias - Optional namespace/module preference for declaration search.
- Lean
Worker Declaration Search Facts - Fanout and timing facts for a bounded declaration search.
- Lean
Worker Declaration Search Pruning - One broad fanout pruning record returned in search facts.
- Lean
Worker Declaration Search Result - Result of a bounded declaration search.
- Lean
Worker Declaration Search Row - One bounded metadata row returned by declaration search.
- Lean
Worker Declaration Search Timings - Cheap elapsed timings for declaration search.
- Lean
Worker Declaration Target Info - Source metadata for the declaration surrounding a proof-agent query.
- Lean
Worker Declaration Type - Bounded type rendering for a single declaration.
- Lean
Worker Declaration Verification Batch Item - One target inside a batch declaration-verification request.
- Lean
Worker Declaration Verification Batch Request - Bounded request to verify several declarations in one in-memory source snapshot.
- Lean
Worker Declaration Verification Batch Row - One ordered row inside a batch declaration-verification result.
- Lean
Worker Declaration Verification Facts - Bounded facts returned by declaration verification.
- Lean
Worker Declaration Verification Request - Bounded request to verify one declaration in an in-memory source snapshot.
- Lean
Worker Derived Work Facts - Observable derived work performed by one host query.
- Lean
Worker Diagnostic - One diagnostic emitted by worker elaboration, kernel checks, or
MetaMservices. - Lean
Worker Diagnostic Event - One diagnostic message delivered over a worker request.
- Lean
Worker Doctor Diagnostic - One structured capability health diagnostic.
- Lean
Worker Doctor Report - Capability health report returned by a downstream doctor export.
- Lean
Worker Elab Failure - Diagnostic payload returned alongside meta and elaboration failures.
- Lean
Worker Elab Options - Bounded elaboration options for worker-session requests.
- Lean
Worker Elab Result - Serializable elaboration result returned over the worker boundary.
- Lean
Worker Exit - Rendered child-process exit information.
- Lean
Worker Host Handle - A worker-backed host session handle that is backed only by bundled shims.
- Lean
Worker Host Handle Builder - Builder for a worker-backed host session that loads only bundled shims.
- Lean
Worker Import Plan Config - Capability and session requirements used to plan worker batches.
- Lean
Worker Import Planner - Planner for worker-pool import/session batches.
- Lean
Worker Json Command - A non-streaming downstream JSON command.
- Lean
Worker Kernel Result - Serializable kernel-check result returned over the worker boundary.
- Lean
Worker Kernel Summary - Projection of
lean_rs_host::ProofSummaryfor the kernel-check success arm. - Lean
Worker Lifecycle Snapshot - Compact lifecycle facts for callers that supervise a worker boundary.
- Lean
Worker Local Info - One local declaration in a proof-state result.
- Lean
Worker Module Cache Limits - Typed limits for the worker child’s module snapshot cache.
- Lean
Worker Module Query Batch Envelope - Successful batch selector envelope.
- Lean
Worker Module Query Cache Facts - Cache and timing facts attached to a batched module query outcome.
- Lean
Worker Module Query Timings - Phase timings for a batched module query, measured in the worker child.
- Lean
Worker Module Snapshot Cache Clear Result - Result of manually clearing the worker-side module snapshot cache.
- Lean
Worker Module Source Span - Source span in the original file. Positions are 1-based.
- Lean
Worker Module Work - One module-sized unit of planned worker work.
- Lean
Worker Name Ref - One identifier occurrence the elaborator recorded.
is_binderdistinguishes binding sites from use sites. - Lean
Worker Output Budgets - Explicit byte budgets for batched module projections.
- Lean
Worker Plan Metadata Expectation - Metadata expectation carried into planned session keys.
- Lean
Worker Planned Batch - One stable pool-execution batch.
- Lean
Worker Pool - Local pool for worker-backed capability sessions.
- Lean
Worker Pool Config - Configuration for a local
LeanWorkerPool. - Lean
Worker Pool Snapshot - Summary of public pool state.
- Lean
Worker Progress Event - One progress event observed by the parent from a worker request.
- Lean
Worker Proof Attempt Envelope - Envelope for a bounded proof attempt.
- Lean
Worker Proof Attempt Request - Bounded request to try one or more proof snippets without writing files.
- Lean
Worker Proof Attempt Row - Per-candidate proof attempt result row.
- Lean
Worker Proof Candidate - One proof candidate to apply to an in-memory source overlay.
- Lean
Worker Proof Position Summary - Informational summary of the selected proof position. It is not an edit handle and cannot be fed back into proof-action requests.
- Lean
Worker Proof State Info - Proof-state payload for one cursor.
- Lean
Worker References Result - Result for
LeanWorkerModuleQuery::References. - Lean
Worker Rendered - A Lean expression rendered to a string, together with the rendering path that produced it.
- Lean
Worker Rendered Info - Bounded rendered Lean text.
- Lean
Worker Restart Policy - Policy for cycling a worker child before the next request.
- Lean
Worker Runtime Metadata - Protocol/runtime facts reported by the worker child during handshake.
- Lean
Worker Session - Narrow host-session adapter over a live
LeanWorker. - Lean
Worker Session Config - Configuration for opening one host session inside a worker child.
- Lean
Worker Session Key - Worker reuse key for a capability-backed session.
- Lean
Worker Session Lease - Borrowed lease for running typed commands on a compatible worker session.
- Lean
Worker Shutdown Report - Structured result of shutting down a worker child.
- Lean
Worker Source Range - Source range Lean recorded for one declaration. Positions are 1-based.
- Lean
Worker Stats - Snapshot of worker lifecycle counters.
- Lean
Worker Stream Summary - Summary returned after a worker data-stream export completes.
- Lean
Worker Streaming Command - A streaming downstream JSON command.
- Lean
Worker Typed Data Row - One typed downstream row decoded from a worker data row.
- Lean
Worker Typed Stream Summary - Typed summary returned after a streaming command reaches terminal success.
Enums§
- Lean
Worker Bootstrap Diagnostic Code - Stable worker bootstrap diagnostic codes.
- Lean
Worker Bootstrap Severity - Severity of one worker bootstrap finding.
- Lean
Worker Declaration Inspection Result - Outcome of inspecting one selected declaration.
- Lean
Worker Declaration Name Match - Name-fragment matching policy for declaration search.
- Lean
Worker Declaration Search Scope - Scope kind used by declaration-search ranking bias.
- Lean
Worker Declaration Target Result - Result for
LeanWorkerModuleQuerySelector::DeclarationTarget. - Lean
Worker Declaration Verification Batch Result - Header-aware batch declaration-verification outcome.
- Lean
Worker Declaration Verification Result - Header-aware declaration verification outcome.
- Lean
Worker Declaration Verification Status - Verification policy result after diagnostics and declaration facts are collected.
- Lean
Worker Declaration Verification Target - Target declaration for verification.
- Lean
Worker Doctor Severity - Severity for a capability doctor diagnostic.
- Lean
Worker Error - Errors reported by the worker supervisor.
- Lean
Worker Goal AtResult - Result for
LeanWorkerModuleQuery::GoalAt. - Lean
Worker Import Plan Error - Import planning diagnostics.
- Lean
Worker Kernel Status - Kernel-check status returned over the worker boundary.
- Lean
Worker Meta Result - Outcome of one bounded
MetaMservice call over the worker boundary. - Lean
Worker Meta Transparency - Reducibility setting for
is_def_eq, mirroringlean_rs_host::meta::LeanMetaTransparency. - Lean
Worker Module Cache Status - Worker-side module snapshot cache status for a batched module query.
- Lean
Worker Module Query - Query shape for one header-aware Lean module processing request.
- Lean
Worker Module Query Batch Item - One selector result in a batched module query.
- Lean
Worker Module Query Batch Outcome - Outcome of
LeanWorkerSession::process_module_query_batch. - Lean
Worker Module Query Batch Result - Typed payload returned by one successful batch selector.
- Lean
Worker Module Query Outcome - Outcome of
LeanWorkerSession::process_module_query. - Lean
Worker Module Query Result - Typed payload returned by a successful module query.
- Lean
Worker Module Query Selector - One selector in a batched module-processing request.
- Lean
Worker Proof Attempt Result - Header-aware proof attempt outcome.
- Lean
Worker Proof Attempt Status - Per-candidate proof attempt status.
- Lean
Worker Proof Edit Target - Target for a non-mutating proof attempt over an in-memory source overlay.
- Lean
Worker Proof Position Selector - Intent selector for one proof position inside a declaration.
- Lean
Worker Proof State Result - Result for
LeanWorkerModuleQuerySelector::ProofState. - Lean
Worker Rendering - Which rendering path produced a
LeanWorkerRendered::value. - Lean
Worker Restart Policy Class - Coarse restart-policy class used in pool session keys.
- Lean
Worker Restart Reason - Reason recorded for the latest worker cycle.
- Lean
Worker Session Import Profile - Closed full-session import profiles understood by worker children.
- Lean
Worker Shutdown Outcome - Shutdown path used to reach a terminal child state.
- Lean
Worker Sorry Policy - Policy for
sorry-like constructs in declaration verification. - Lean
Worker Source Coordinate Space - Coordinate space a diagnostic position was reported in.
- Lean
Worker Status - Public lifecycle state for a worker child.
- Lean
Worker Surrounding Declaration Result - Result for
LeanWorkerModuleQuerySelector::SurroundingDeclaration. - Lean
Worker Type AtResult - Result for
LeanWorkerModuleQuery::TypeAt.
Constants§
- LEAN_
WORKER_ KILL_ WAIT_ TIMEOUT_ DEFAULT - Default deadline for waiting on a killed child process to be reaped.
- LEAN_
WORKER_ REQUEST_ TIMEOUT_ DEFAULT - Default deadline for one worker request after startup.
- LEAN_
WORKER_ REQUEST_ TIMEOUT_ LONG_ RUNNING - Suggested deadline for long-running worker requests.
- LEAN_
WORKER_ SHUTDOWN_ TIMEOUT_ DEFAULT - Default deadline for graceful child shutdown before kill escalation.
Traits§
- Lean
Worker Data Sink - Parent-side sink for downstream data rows produced by one worker request.
- Lean
Worker Diagnostic Sink - Parent-side sink for diagnostics produced by one worker request.
- Lean
Worker Progress Sink - Parent-side sink for worker progress events.
- Lean
Worker Typed Data Sink - Parent-side sink for typed downstream data rows produced by one command.