Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 18 Sep 08:49
· 84 commits to develop since this release
v0.4.1
e310fb4

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 outputSchema Compliance: 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.
  • structuredContent Payloads: 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.WriteFile across concepts, parent indexes, and log.md with 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 --drift now 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.md Auto-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 BenchmarkSearchUnicode to use b.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 structuredContent payload, and bundle root resolution issues while integrating OKF Agent Memory into OpenCode and Pi Agent (#30, #31). Your concrete reproductions and follow-up verification made v0.4.1 fully spec-compliant across strict agent runtimes!

Full Changelog

See commits between v0.4.0...v0.4.1 on GitHub.