Repository navigation
v0.4.1
Release v0.4.1 – MCP Strict Conformance & Crash-Resilient Storage
Release v0.4.1 brings full compliance with the strict Model Context Protocol (MCP) specification—resolving validation errors in clients like OpenCode, Pi agent, and MCP SDK 2.0.0—alongside critical storage-layer hardening against crash consistency anomalies, atomic write guarantees, and automated sync enhancements.
1. Strict MCP Protocol Conformance (#30, #31)
- Object
outputSchemaCompliance: Aligned all MCP tool definitions (okf_search,okf_show,okf_validate,okf_create,okf_update,okf_relate) with strict JSON Schema object requirements, resolving schema rejections in OpenCode, Pi agent, and Claude Desktop. structuredContentPayloads: Tool execution results now return structured JSON objects alongside human-readable text blocks, allowing agent runtimes to consume parsed data deterministically.- Bundle Path & Root Confinement: Fixed root-directory resolution for non-
knowledge/bundles when running with custom or relative working directories.
2. Storage Hardening & Crash Consistency
- Atomic File Writes: Replaced raw
os.WriteFileacross concepts, parent indexes, andlog.mdwith atomic tempfile-and-rename (.tmp-okf-*->Sync()->os.Rename). Process terminations (SIGKILL/crashes) can no longer leave truncated or zero-byte corrupted files. - Directory Index Link Checking: Graph construction (
LoadBundle) now validates all Markdown links inside directory indexes (index.md), detecting phantom/dangling references to non-existent concepts. - Bidirectional Drift Validation:
okf validate --driftnow detects unindexed concepts that exist on disk but were missed in parent index listings, preventing silent divergence in agent deduplication loops. - Adversarial Regression Suite: Added comprehensive crash consistency integration tests (
pkg/okf/crash_consistency_test.go) covering the write-to-index gap.
3. Sync & Hub Resilience
- Append-Only
log.mdAuto-Merge: Implemented automated conflict reconciliation for concurrent dated log entries across multi-agent sync runs. - Optimistic Push Retry: Embedded client retry loop with exponential backoff for concurrent vault blob uploads.
- E2E Hub Socket Tests: Added end-to-end HTTP socket integration tests for embedded Hub serve/push workflows.
4. Developer Experience & CI
- Go 1.24+ Benchmark Loop: Modernized
BenchmarkSearchUnicodeto useb.Loop(). - Defensive Audit Templates: Updated continuous audit instructions (
SECURITY_AUDIT.md) with defensive QA and invariant-verification framing to prevent LLM safety policy over-refusals.
5. Community & Special Thanks
- A huge thank you to Rogelio (@rogeliodh) and Majid (@majido) for reporting and diagnosing the strict MCP schema rejections, missing
structuredContentpayload, and bundle root resolution issues while integrating OKF Agent Memory into OpenCode and Pi Agent (#30, #31). Your concrete reproductions and follow-up verification madev0.4.1fully spec-compliant across strict agent runtimes!
Full Changelog
See commits between v0.4.0...v0.4.1 on GitHub.