Versioning policy
Semver, deprecation, schema-bundle versioning, and `AUDIT_RECORD_VERSION_HISTORY`.
@pleach/core ships under semantic versioning with a deliberate
deprecation policy. Three orthogonal version axes matter to
consumers: the package semver, the schema bundle version, and
the auditRecordVersion on the audit row.
Each axis has its own evolution rules. This page walks them so you know what's compatible across upgrades and what isn't.
Package semver
Standard semver: MAJOR.MINOR.PATCH.
| Bump | Triggers |
|---|---|
PATCH | Bug fixes, performance improvements, internal refactors with no API surface change |
MINOR | New typed config fields, new optional plugin hooks, new subpaths, new SQL files in the schema bundle, new StreamEvent variants, new error codes |
MAJOR | Removal of a typed config field, signature change to executeMessage / createSession, removal of a StreamEvent variant, removal of a public subpath |
Practical implications:
- Minor upgrades are always safe — adding a new variant to
StreamEventdoesn't breakswitch-based consumers that have adefaultarm. - Major upgrades come with a migration note in the changelog.
The substrate hasn't shipped a major yet — every
@pleach/*package is versioned0.1.0in source (see Packages). The first major bump will be1.0.0, telegraphed in advance. - Patch upgrades never change runtime behavior in a way that
invalidates the cache — same
pleachVersionfield on the fingerprint.
What lives outside the semver contract
A few surfaces are deliberately excluded from the semver guarantee, because pinning them would prevent the substrate from fixing bugs.
| Surface | Why |
|---|---|
Internal channel names (__planning__, __synth__, etc.) | Internal; not part of the public contract |
Loader-seam keys under setHarnessModuleLoader | Surface is shrinking; key removal isn't a major-version event |
Deep wildcard imports under @pleach/core/* | Marked unstable; expect rename / removal without major bump |
Exact bytes of composed prompts under seedCoreDefaults: true | Determinism guarantee is "same version, same input"; the version moving is what invalidates |
If you depend on any of these for a contract behavior, the right fix is to file an issue asking for the surface to be promoted to a stable subpath.
Deprecation policy
A surface marked deprecated stays in for at least:
- Two minor versions if it's a typed config field or a documented public function.
- One major version if it's a structural commitment (a channel kind, an export-map subpath, an audit row column).
Deprecation notices land in three places:
- The package's
CHANGELOG.mdfor the version that deprecates. - A
@deprecatedJSDoc on the type definition. - The relevant docs page on this site.
A deprecated surface still works until removed. The deprecation notice tells you what to migrate to and which version removes it.
Schema bundle versioning
The schema bundle ships with the package version; there is no
separate bundle version number. It is organised in tiers: base/,
which every Postgres-backed runtime applies, and opt-in
extensions/<tier>/ directories, plus schema tiers that other
@pleach/* packages ship. Each tier numbers its own files
(base/000_… to base/007_…, extensions/<tier>/001_…).
pleach schema --applycopies each file as<rank>_<tier>__<file>.sql(for example000_base__003_<file>.sql). The rank is fixed per tier (base000, core extensions100+, packages200+), so lexical order is apply order.- Files only add tables, columns, indexes and policies; they don't
drop or rename. A release can extend an existing file with
ADD COLUMN IF NOT EXISTSand similar guarded statements, so re-running the newer file upgrades an existing install in place. Because a copied file's content then differs,pleach schema --applyrefuses to overwrite it (exit 3); apply the updated file from the package directly, or replace your copy deliberately. - The session-store file and the call-ledger file in
base/are the load-bearing files; changing the audit row's column shape is anauditRecordVersionevent (next section).
Applying an older bundle against a newer database is safe — the
existing tables stay; the new bundle's IF NOT EXISTS clauses
skip them. Going the other direction (newer bundle, older
database) installs new tables; the runtime will use them on the
next call.
The schema version stored on each session row is the in-row marker. Bumps coordinate with the package's session schema version; old rows hydrate through a migration function inside the runtime.
auditRecordVersion
The wire-format version of AuditableCall rows. CI checks that a row
shape change comes with a bump, and bumps coordinate with consumer
adapters.
import { AUDIT_RECORD_VERSION_HISTORY } from "@pleach/core/audit";
for (const entry of AUDIT_RECORD_VERSION_HISTORY) {
console.log(`v${entry.to} (${entry.landedAt}): ${entry.reason}`);
}The history constant lets consumers render "what changed in v7" at runtime. Each entry carries:
| Field | Purpose |
|---|---|
version | The wire version this entry describes |
shippedIn | The @pleach/core package version that introduced it |
summary | Short prose description |
addedFields | Field names added on this version |
removedFields | Field names removed (rare; gated by major bump) |
Adapters check this constant during migration to know which payload fields are new. Adding a field to the payload is non-breaking for readers — old rows simply lack the new field.
Pre-1.0 and reserved placeholders
Source versions and npm
Every @pleach/* package is versioned 0.1.0 in source and
licensed FSL-1.1-Apache-2.0. On npm, some names are reserved with
0.0.1 · UNLICENSED placeholders until each package's first real
release. @pleach/trust-pack is the one exception: a reserved npm
name with no code, kept UNLICENSED. See
Packages for per-SKU notes (which packages
are substrate-complete, which expose a typed contract with one
method still throwing a sentinel, and which are pure contract).
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 dependencies, not a caret range.
For future 1.x releases, caret ranges become safe.
License
@pleach/* ships 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; auto-
transitions to permissive Apache 2.0 two years after each
release. The license text is in LICENSE at each package root.
@pleach/trust-pack is the one license exception: a reserved
npm name with no shipping code, kept UNLICENSED. See per-SKU README for
the canonical license declaration.
Migration guides
The site carries migration guides for the changes that affect typical consumers:
- Migrating from the AI SDK — not a version migration, a tool migration.
- Migrating from LangChain — same.
Future version migrations (@pleach/core@2.x → 3.x, etc.)
will land as migrating-from-v2.mdx etc. when they exist.
Registry-state discipline
CI compares the in-tree package.json#version of the @pleach/*
packages against the latest version on the registry.
If you vendor @pleach/* packages, record which release each vendored
copy came from, and make the same comparison when you update it.
Peer-dependency promotion timing
Peer-dep ranges on @pleach/core and @pleach/react tightened
at the first 1.x cut. The ranges are now a contract, not a
suggestion.
Policy: peer-dep ranges move on minor bumps only — never on patch. Consumer code should pin peer deps explicitly and re-verify ranges at each minor bump. A patch upgrade never forces a peer-dep churn.
At a major bump, recompute the full peer-dep tree (peer ranges, peer-meta-dependencies). Major bumps are when wider compatibility changes land. See publishing contract for the broader packaging conventions.
Test the published tarball
If you fork or vendor @pleach/*, a clean monorepo build doesn't prove
the published tarball works, so test the tarball.
Workspace path aliases are a common reason the two differ. A monorepo
resolves @/lib/foo, or a relative path above the package root, through
its tsconfig.json paths map. A consumer running
npm install @pleach/<pkg> has no such map, so the first import from
the package fails with ERR_MODULE_NOT_FOUND.
Before you publish, check the built dist/:
- Undeclared imports. Every third-party
importorrequirespecifier is declared independencies,peerDependencies, oroptionalDependencies. - Workspace aliases. No
dist/file imports through a workspace-only alias, or walks above the package root.
If an alias turns up in dist/, the fix is one of two moves:
- Move the imported module into the package's own source tree.
- Invert the dependency: the package defines an interface and the host implements it at runtime.
The same rule applies to types. A consumer's TypeScript can't see a
workspace alias either, so check your .d.ts files the same way.
See Publishing contract for the rest of what a package has to satisfy before it ships.
Where to go next
Cycle-break contract packages
Why Pleach extracts a zero-dependency `@pleach/<sku>-contract` package when a sibling SKU's type contract needs to be referenced from inside `@pleach/core`. The pattern, the boundary it protects, and when to use it.
@pleach/base-tools changelog
Release history for @pleach/base-tools — site-docs entries that materially touched the @pleach/base-tools surface, newest-first. Canonical runtime history lives upstream.