What's new — June 2026
June 2026 substrate across @pleach/core, gateway, compliance, replay, eval, coding-agent, and recipes — multi-tenant gateway primitives, replay-fork, swarm spawn substrate, and real recipe bodies.
June 2026 was a heavy substrate month. Work landed across
@pleach/core, @pleach/gateway, @pleach/compliance,
@pleach/replay, @pleach/eval, @pleach/coding-agent, and
@pleach/recipes — multi-tenant gateway primitives, replay-fork
operations, real recipe bodies for the education, government, and
cloud-mediated patterns, and the swarm spawn-event substrate.
This page is the consumer-facing summary: what shipped per package and where to read more.
@pleach/gateway — auth, BYOK, cost, region, failover, identity, swarm
Multi-tenant routing got its substrate.
- Auth adapters. Tenant identity resolves from JWT claims, the
X-Tenant-Keyheader, Okta sessions, or Clerk sessions — without you writing the boilerplate. - BYOK substrate.
TenantCredentialStoreplus Postgres / Redis / external-secret-manager adapters. Per-tenant provider keys resolve at request time, and the gateway routes the call with the right credential. - Cost adapters.
CostEmitterplus OTel, Postgres, Datadog, and Honeycomb sinks. Pick whichever observability stack you already run. - Region routing.
RegionRouter,RegionAwareCascade, andRegionDrPolicy— region-aware routing, cascade-time region constraints, and DR policy in active-passive, active-active, or warm-standby modes. Deterministic ordering for replay safety. - Failover.
FailoverPolicy(chain progression + linear backoff) andFailoverMiddleware(transient-error retry +onExhaustedcallback), with aFailoverExhaustedevent. - Federated identity.
IdentityProvider(kind: "federated", distinct from static BYOK) +TokenCache(LRU + TTL) + AWS STS, Azure managed identity, and GCP workload identity providers — all via structural peer interfaces, with no@aws-sdk/*/@azure/identity/google-auth-libraryruntime requirement. - Swarm governance.
RootTurnCostAggregator+CostCeilingMiddleware(throwsCostCeilingExceededErroron breach) +FailoverCoordinator+SwarmTopologyClassifier.
Read more → @pleach/gateway.
@pleach/coding-agent — file tools + sandbox facade + policy
The vendor-neutral file/diff/exec tool surface.
- Read tools.
read_file,write_file,apply_diff,search_files,list_files— vendor-neutral, working against any provider that supports tool calls. - Exec tools.
run_tests,git_clone,git_diff, bound to the runtime-adjacency contract that controls when a tool fires. - Sandbox facade.
SandboxProviderfacade +SandboxCompositefor stitching multiple sandbox providers together. - Policy + facade.
createCodingAgentPolicy({ maxSynthesizePerTurn: 5 })ships the opinionated coding-agent default — five synthesizes per turn, matching theplan → diff → verify → retry → verifyloop.createPerCallClassRouting({ routes })layers per-CallClass model overrides on top.
Read more → @pleach/coding-agent and
Multi-synthesize.
@pleach/eval — divergence, benchmarks, parity
- Divergence reporting.
DivergenceReporter+ distance utilities- heatmap visualization. Compare model-A vs model-B outputs at the row level.
- Benchmarks + cost estimation. MMLU, SWE-bench, HumanEval, and
custom-domain loaders, plus
CostEstimatorfor projecting a benchmark run's spend before you fire it. - Configuration parity.
runParitySuite+computeDivergence— a model-swap matrix where each run is a different configuration over the same scenarios. Sibling of the within-swarmrunSwarmParity.
Read more → @pleach/eval and Parity.
@pleach/replay — cache adapters, fork, strict
- Cache adapters. Disk / Redis / S3 cache adapters plus
CacheMiddleware. Replay runs share inference results across re-runs, so an eval loop costs what one run costs. - Fork + strict.
forkAtEventbranches replay at a specific event;StrictReplayis production-grade replay-with-tolerance;captureSlotscaptures replay slots; spawn-order serialization keeps swarm replay deterministic.
Read more → @pleach/replay.
@pleach/compliance — redaction, audit query, hash chain, erasure
- Redaction pipeline.
RedactionGate+RedactionPipeline+ Presidio / LLM / PHI scrubbers. - Audit query + export.
queryAudit+exportAuditPdf+DeterminismCertifier+ RLS templates — the surface a regulator queries against and the PDF export they read in a deposition. - Hash-chain middleware.
createHashChainMiddleware({ complianceRuntime, tenantId, chatId })decorates each event withrowHash+prevHashbefore the host writer canonicalizes and persists;verifyAfterBatch(rows)returns{ chainValid, failedIndex? }. - GDPR erasure.
executeErasureRequest({ request, eventStore, rebuildChainFromGenesis })is the structural primitive for GDPR Article 17 erasure. See GDPR right-to-erasure for the honest scope-limits on crypto-shredding vs row-deletion + chain rebuild.
Read more → @pleach/compliance.
@pleach/core — spawn substrate, multi-synthesize, fixes
- Canonical spawn. The
spawn()factory wraps a nestedSessionRuntimevia aSpawnableParentinterface. Three fan-out caps ship with sensible defaults (depth=4,perTurn=10,total=40); a breach throwsSubagentFanOutExceededwith a structural.capshape.SpawnEventcanonical schema +RootTurnRollup+recordSpawn. - Multi-synthesize contract.
SessionRuntimeConfig.maxSynthesizePerTurn?: numberplus an optionalTurnSynthesizeCounter.setMaxPerTurn?(max). The singleton-seam invariant stays; only the per-turn invocation cap relaxes — the widening that unblocks the coding-agent reflection loop. - Air-gapped substrate.
AirGappedRuntimeOption+AirGappedHostRejectedError, with fail-closed-on-empty-allowlist semantics and subdomain matching with leading-dot normalization. generateClientIdjsdom/SSR fix. Now guardswindow.localStorageconsistently across jsdom and SSR, eliminating a hydration flake.- Quickstart regression locks + plugin examples. Regression tests
covering
createPleachRoute(),useChat(), andproviderDetection, plus runnable plugin/observer examples —empty-plugin,domain-entity-recognition,custom-event-channel, adialect-normalizationstream-observer, and ahalt-on-patternobserver.
Read more → @pleach/core and
Subagents.
@pleach/recipes — real bodies for three patterns
The previously-stubbed recipe bodies now compose real pieces.
educationAgent. Composes the student-safety scrubber with a per-tenant cost cap.governmentAgent. Composes the air-gapped runtime + IAM federated identity + audit export.cloudMediatedAgent. Composes AWS / Azure / GCP identity providers with region routing + failover.
Read more → Recipes.
Publishing prep
CI scaffolds for SBOM emission and npm publish with provenance attestations landed, plus a license matrix covering every SKU's FSL-1.1-Apache-2.0 transition surface — the groundwork for government procurement conversations and ISV SBOM-conformance requirements.
Where to read more
@pleach/gateway
Auth, BYOK, cost, region, failover, identity, swarm governance.
@pleach/compliance
Redaction pipeline, scrubbers, audit query, PDF export, RLS templates.
@pleach/replay
Cache adapters, fork, strict replay, spawn-order serialization.
@pleach/eval
Divergence reporting, benchmark loaders, cost estimation, parity.
Subagents
Canonical spawn substrate, fan-out caps, swarm topology.
Recipes
Real composition bodies for the patterns above.