Skip to content
pleach
Build

Packages

The @pleach/* package matrix — what each SKU does and how they compose.

Every sibling package plugs into @pleach/core's HarnessPlugin contract. @pleach/core is the lattice; the siblings are branches grafted onto it through one shared contract — none of them rewrite the substrate. Each one adds a specific capability (compliance scrub, hash-chain verification, OTel destinations, recipe factories) without altering the four-stage shape or the row keyed by turnId.

Every package is versioned 0.1.0 in source under FSL-1.1-Apache-2.0 — uniform version, uniform license, one row per package. The version column is that source version, not what npm install returns today. The reader signal that used to live in the version number now lives in the Notes column: which packages are substrate-complete, which expose a typed contract with one method still throwing a sentinel. @pleach/trust-pack is a reserved placeholder with no contract.

Not on npm yet

The @pleach/* packages aren't on npm yet. Some names are reserved with 0.0.1 placeholders. Each package's first real release ships under FSL-1.1-Apache-2.0. The versions below are the source versions, not what npm returns today.

Pin exact versions. The 0.0.x → 0.1.0 jump and the 0.1.x → 1.0.0 jump are both non-caretable, and a caret range on a 0.x version won't pick up later minors either. Use "@pleach/<name>": "<exact version>" in your dependencies, not a caret range.

Each sibling fills a specific subset of the slots documented in Plugin contract: @pleach/compliance ships scrubbers, a hash-chain verifier, GDPR erasure, and a ComplianceRuntime (attestRun, verifyChain, produceAuditReport). Attestation signing is beta: the file-backed key-store signs on its own, and the AWS KMS and Vault Transit adapters sign through a client you inject (see Attestation). @pleach/eval reads the AuditableCall ledger via the split lifecycle hooks (onToolCompleted / onMessageAdded) and consumes @pleach/replay's ReplayClient via DI. @pleach/gateway wraps @pleach/core's model-family substrate through a typed GatewayClient. None of them can add an out-of-lattice edge or bypass the singleton synthesize seam.

PackageRoleStatus / notes
@pleach/coreRuntime substrate — sessions, graph, channels, audit ledger, checkpointing, sync, storage adapters. Native providers AnthropicSdkProvider and OpenAINativeProvider (Chat Completions) ship from the root and @pleach/core/providers.0.1.0 · source · substrate complete
@pleach/toolsSubstrate tool-calling primitives — UnifiedToolDefinition contract, queryable registry, Zod schema helpers, form-config + hints surfaces. Now ships inside @pleach/core at the opt-in subpaths @pleach/core/tools and @pleach/core/tools/unified; the standalone SKU is a thin re-export shim.0.1.0 in source · not on npm yet · deprecated, ships in @pleach/core
@pleach/reactReact-binding primitives — runtime acquisition, message stream, event-log facade, interrupt UI, correction dedup, plus a Vercel AI SDK migration adapter. The lower-level surface that @pleach/core/react composes.0.1.0 in source · not on npm yet · substrate complete
@pleach/base-toolsDomain-agnostic tool primitives: math, datetime, scratchpad, unit_convert, text_search, opt-in url_fetch, plus a markdown citation extractor. Now ships inside @pleach/core at the opt-in subpath @pleach/core/base-tools; the standalone SKU is a thin re-export shim.0.1.0 in source · not on npm yet · deprecated, ships in @pleach/core
@pleach/replayReplayClient walks the canonical event log via runtime.events.iterate/fold. createReplayRuntime factory ships replayTurn, fromSnapshot, fork, and aggregateMultiTenant bodies. The original first-slice not-implemented message stays exported for back-compat detection only.0.1.0 in source · not on npm yet
@pleach/sandboxVendor-neutral SandboxProvider contract for @pleach/core runtimes. Ships the contract, an in-memory fixture, and adapters for an HTTP stream wire shape, HTTP polling, a local child process, and AWS ECS Fargate (subpaths @pleach/sandbox/adapters/httpStream, /httpPoll, /childProcess, and /awsFargate); and createSandboxedCodeRunner at /adapters/codeRunner, which runs code in a container, macOS seatbelt, or Linux bwrap sandbox and refuses when none is available; canonical name SandboxProvider with the legacy SandboxAdapter retained as a @deprecated alias. Per-vendor packages aren't shipped; vendor coupling lives in your own gateway or adapter config.0.1.0 in source · not on npm yet · contract
@pleach/langchainBidirectional LangChain / LangGraph adapter — a LangGraph checkpointer adapter, tool converters, a store adapter, and a LangChainProvider, plus reverse HarnessCheckpointSaver and HarnessEventLogCallback. Surface still moving — pin tight.0.1.0 in source · not on npm yet
@pleach/compliancePII / PHI scrubbers (SsnUsScrubber, CreditCardScrubber (Luhn-validated), UsDriverLicenseScrubber, KeyedRegexScrubber), event-chain attestation, and verification utilities for HIPAA / GDPR / PCI-DSS / SOC 2 deployments. Implements the Scrubber contract from @pleach/core/scrubbers. Re-exports the ComplianceRuntime + ComplianceProfile types from @pleach/compliance-contract.0.1.0 in source · not on npm yet
@pleach/compliance-contractZero-dependency contract sub-SKU carving out the ComplianceRuntime interface + ComplianceProfile literal union + structural Scrubber mirror. Breaks the @pleach/core ↔ @pleach/compliance type-graph cycle: both packages depend one-way on this contract; neither needs the other at the type layer. No runtime code.0.1.0 in source · not on npm yet · type-only contract
@pleach/rbac-contractZero-dependency contract for role-based access control — a 2-method RbacRuntime interface (checkPermission, getRolesForActor) plus CheckPermissionInput / PermissionDecision shapes. Same cycle-break pattern as @pleach/compliance-contract, but authored fresh with no shipped implementer yet — deliberately not ga. @pleach/core/rbac adapts it into the existing approval-flow plugin hook.0.1.0 in source · not on npm yet · type-only contract
@pleach/evalEvalSuite + EvalCase discriminated union + EvalReport. Subpaths under ./scorers, ./replay, ./report for built-ins, replay coupling, and report formatters. Deterministic fixture grading, custom scorers, LLM-as-judge ensembles, event-log replay.0.1.0 in source · not on npm yet
@pleach/gatewayGatewayClient — thin SKU wrapper over @pleach/core's model-family substrate. Per-tenant BYOK key routing, family-strict cascade pivot, per-call cost emission (domain.gateway.cost.recorded), OTel llm.invocation span emission. Routing math, family matrix, and BYOK resolution stay in core. Concrete native transports aren't bundled: the host supplies a transports map, and createOpenAiCompatibleTransport ships from @pleach/gateway/transport. routeEmbedding, getProviderHealth, and getTrafficStats aren't implemented yet.0.1.0 in source · not on npm yet
@pleach/mcpConcrete MCPServer class wrapping SessionRuntime — tools (projected from runtime.tools.list(); native execution opt-in and approval-gated), resources (pleach://artifact/*, pleach://sandbox/*), and prompts surfaced over MCP. Transports: stdio, HTTP+SSE with optional Streamable HTTP, and WebSocket (optional ws peer), with loopback-default Host / Origin allowlists and connection, in-flight, and timeout limits. Fail-closed per-connection multi-tenant routing via tenantIdExtractor, registerSession({ tenantId }), or a resolveRuntime hook.0.1.0 in source · not on npm yet
@pleach/coding-agentSWE-bench-shaped coding-agent runtime opt-in for @pleach/core. All three async methods have real bodies: start() composes the underlying SessionRuntime, stop() drains it, executeStep() drives one turn through SessionRuntime.executeMessage. The body throws a not-started error only when called before start() — no auto-start, by design. LRU CodingContextManager for file-context budget management.0.1.0 in source · not on npm yet
@pleach/observeDestination-flexible observability SDK — a thin facade (init + per-turn recorder + destination plug) that hooks into existing AI SDK / LangChain / custom loops and writes a chained AuditableCall row to the runtime's table and chain for each call you hand it when pointed at Postgres (or any ledger you pass); OTel and in-memory destinations get telemetry. Destinations: Postgres, Supabase, OTel, memory (a Pleach Hosted destination isn't available yet). The @pleach/observe/resource-meter subpath adds measureResources, a per-scope CPU, memory, event-loop, and fetch meter.0.1.0 · scoped, not yet on npm
@pleach/recipesComposable one-line factories over @pleach/core — simpleChatbot, ragChatbot, observableChatbot, compliantChatbot, instrumentedCodingAgent. Each subpath pulls only the @pleach/* peers its recipe needs; peer deps for observe, compliance, coding-agent, and sandbox are optional.0.1.0 in source · not on npm yet
@pleach/transport-bedrockAWS Bedrock transport implementing the AgentProvider contract — Anthropic, Llama, Mistral, and Cohere models on Bedrock. @aws-sdk/client-bedrock-runtime is an optional peer.0.1.0 · source-complete, not on npm (private)
@pleach/transport-azure-openaiAzure OpenAI transport implementing the AgentProvider contract — API-key, Azure AD, and managed-identity auth.0.1.0 · source-complete, not on npm (private)
@pleach/transport-vertexGCP Vertex AI transport implementing the AgentProvider contract — Gemini, Claude on Vertex, and Llama, with ADC or service-account auth.0.1.0 · source-complete, not on npm (private)
@pleach/trust-packReserved name. No contract or code.0.0.1 · placeholder · UNLICENSED

Subpath exports per package

Every @pleach/* package uses a dir-style entry convention: the root export is the public API, with named subpaths under it for narrower surfaces (/react, /server, /testing, and similar). Each exports map orders conditions types-first per Node's resolution spec, so TypeScript sees the .d.ts before the runtime entry.

The per-subpath inventory lives in Subpath exports — one table per package, listing every documented entry and what it's for.

The full packaging conventions — exports ordering rules, sideEffects discipline, and engines floors — live in Publishing contract.

Language-agnostic contract

The runtime contract — sessions, checkpoints, storage, tools, sync, SSE wire — is language-agnostic by design. The TypeScript distribution is the reference implementation, in production today. A Go implementation is planned; the wire contract already works in a Go reference consumer, which reads the SSE frames and checkpoint envelopes. The five contract shapes a non-TS consumer implements (HTTP+SSE wire, StreamEvent union, AuditableCall row, Checkpoint envelope, version vector) are enumerated on the Language-agnostic contract page.

If a claim in these docs only holds in JavaScript, that's a documentation bug. Issues welcome on the relevant package's repo.

Licensing

Every @pleach/* package — substrate, adapter, and SDK alike — is licensed under FSL-1.1-Apache-2.0 (Functional Source License with Apache 2.0 as the future license). Source-available, usable in production, free of charge during the FSL window; the only restriction is on competing offerings. Each release auto- transitions to permissive Apache 2.0 two years after it ships. The single exception is @pleach/trust-pack: a reserved npm name with no shipping code, kept at 0.0.1 · UNLICENSED until a future cut. See Pricing for commercial-use guidance.

Where to go next