Changelog
On this page
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.5.0] - 2026-11-21
Changed
- MCP clients now use
server/discoverand per-request metadata for protocol2026-07-28. This replaces theinitializehandshake from2025-11-25. - Building from source now requires Zig 0.17.1 or later.
[0.4.5] - 2026-11-18
[0.4.4] - 2026-10-23
[0.4.3] - 2026-10-22
[0.4.2] - 2026-10-19
Fixed
- B002: MCP tool schemas and CLI documentation now advertise the optional
memoryselector for the 11 affected read and snapshot tools, includingget-knowledge-schema
[0.4.1] - 2026-06-13
Fixed
- B001:
clear_context --memory <segment>now retracts facts from the target segment instead of the default memory- Root cause:
parseHeadFunctorAritywas stripping the module prefix from clauses, causingretractall(seg:foo(_))to retract fromuser:foo(_)instead - Fix: Extended
HeadFunctorAritywith an optionalmodulefield; updateddeclareDynamicand cache keying to preserve module qualification inretractallcalls - Impact:
clear_contextwith the--memoryflag (and MCPmemoryparameter) now correctly targets the specified segment; default memory is unaffected
- Root cause:
[0.4.0] - 2026-05-24
Added
- F025:
rename_predicateMCP tool and CLI subcommand — atomically rename a Prolog functor across facts, rule bodies, and TMS justificationsold_functorandnew_functorparameters (required); optionalarity,memory,dry_run,propagate_cross_memory_refsdry_run=truereturns the full impact report (renamed_facts,rewritten_rule_bodies,affected_rule_ids,cross_memory_impact) without mutating the KB (byte-identical persistence files before/after)- TMS preservation: assumption identifiers stay unchanged; justification facts are rewritten to reference the new functor
- Optional cross-memory propagation rewrites qualified refs (
segment:old/N) in every writable mounted memory; read-only segments are always reported underskipped_readonlywithout modification - Guardrails: rejects ISO Prolog operators (built-in blacklist), self-renames, name collisions, ambiguous arity (when multiple arities exist and
arityis omitted), and read-only target memories - Available via MCP (
rename_predicate) and CLI (zpm rename-predicate --old_functor X --new_functor Y --arity N)
- F022:
get_kb_overviewMCP tool and CLI subcommand — single-call JSON snapshot of the entire knowledge base- Reports predicates with samples, assumptions, snapshots, persistence health, and mounted memory segments in one response
sample_sizeparameter (default2, clamped to[0, 50]);0returns predicates with emptysamplesarrays- Budget enforcement: payload capped at 64 KiB by progressively reducing
sample_size; setstruncated: truewhen applied mountssection reportsname,scope, andmodeof every mounted segment, sorted lexicographically for stable output- Available via MCP (
get_kb_overview) and CLI (zpm get-kb-overview [--sample-size N])
- F021: Segmented memories — named, isolated knowledge segments backed by Trealla Prolog modules
- Four new MCP tools:
create_memory,mount_memory,unmount_memory,list_memories - Optional
memoryparameter on all 20 knowledge/reasoning tools for targeting specific segments - CLI subcommand group:
zpm memory create|mount|unmount|list --memoryflag on existing CLI tool subcommands- Read-only mount mode (
ro) to prevent accidental mutations - Dual-scope storage: project-local (
.zpm/kb/) and global ($XDG_DATA_HOME/zpm/kb/) - Per-memory WAL and snapshot persistence with independent rotation
- Cross-memory queries via Prolog module qualification syntax (
module:predicate(Args)) - Auto-creation and auto-mount of
defaultmemory on boot for backward compatibility
- Four new MCP tools:
Fixed
- Snapshots and mutations targeting the
defaultmemory now route through the globalPersistenceManagerinstead of the segment-local one. Previously,save_snapshotwrote.plfiles to.zpm/kb/default/andremember_factjournaled to.zpm/kb/default/journal.wal, whileinitBootstraprestored from.zpm/data/— causing facts and snapshots ondefaultto silently disappear across restarts.
Breaking Changes
mount_memoryis now idempotent. Calling it on an already-mounted segment returns success instead of raisingMemoryError.AlreadyMounted. Required becausecreate_memorywrites the segment to the manifest and bootstrap auto-mounts it on subsequent invocations, which made an explicitmount_memorystep fail spuriously in CLI lifecycles. Clients that previously relied onis_error: trueto detect double-mounts will silently see success instead.- Knowledge base directory layout changed. Persistence now uses
.zpm/kb/<name>/per memory segment instead of the flat.zpm/kb/+.zpm/data/layout. Existing knowledge bases are not auto-migrated. Runrm -rf .zpm/andzpm initto reinitialize.
[0.3.0] - 2026-04-29
[0.2.1] - 2026-04-22
Fixed
- Version string reported by
zpm --versionand MCPserverInfo.versionnow matches the release tag. Previous releases (v0.1.1,v0.2.0) shipped binaries that reported0.1.0because the version was hardcoded insrc/version.zigand never bumped.
Changed
build.zig.zonis now the single source of truth for the project version.build.ziginjects it intosrc/version.zigviab.addOptions(); functional tests read it from the ZON too. Bumping the version requires editing onlybuild.zig.zon.
Breaking Changes
- Persistence storage format incompatible with prior versions. Snapshot format and WAL format have both changed. After upgrading, run
rm -rf .zpm/kb/to reset the local knowledge base. Pre-upgrade data cannot be migrated automatically.
Refactor
- Replace hand-rolled text parsing of Prolog query results with JSON pipeline (hand-rolled JSON writer in Prolog + Zig
std.jsondecoder). Removes ~500 lines of fragile parsing code. - Snapshots now use Trealla’s canonical
listing/1writer instead of Zig-side term serialization. - WAL switched to JSON Lines (NDJSON) with
fsyncper write and persistent file handle. No more 4KB clause / 64KB journal limits.
[0.2.0] - 2026-04-09
Added
- F001: MCP server implementation with stdio transport
- JSON-RPC 2.0 protocol compliance
- Server metadata and capability advertisement
- Echo tool for testing and validation
- Comprehensive functional test suite
- Integration with Makefile build pipeline
[0.1.0] - 2026-04-08
Added
- Initial project setup with hexagonal architecture