Skip to content

kaeru 0.8.1

Choose a tag to compare

@GrumpyChubbyCat GrumpyChubbyCat released this 02 Nov 17:11

kaeru 0.8.1

Long-running agent sessions should release their transport state, and newly
written knowledge should be fast to read. This patch addresses two separate
problems: MCP state retained across requests and abandoned sessions, and a
post-write storage slowdown reproduced on Apple Silicon.

MCP sessions are cleaned up after use

  • Completed response-send tasks are reaped. The MCP SDK previously retained
    their bookkeeping until the session closed. The dependency update removes
    that accumulation within long-lived sessions.
  • The stdio bridge closes its session on exit. EOF, Ctrl-C and SIGTERM send
    a bounded, best-effort DELETE without stopping the shared daemon.
  • Abandoned HTTP sessions expire after five idle minutes. Pending operations
    and response delivery are protected; completion starts a new full idle
    interval. Session capacity defaults to 256. When full, new initialization
    receives HTTP 503 with Retry-After while existing sessions remain usable.
  • The stdio bridge recovers after expiry. It restores initialization and
    retries a call once only after a definite session-not-found rejection. Calls
    with ambiguous outcomes, including timeouts, are not automatically replayed.

Thanks to @xenmayer for the workload and measurements in
#119. The retention paths were
confirmed, but the reported 13.6 GB footprint has not been reproduced locally.
The release does not claim that the entire reported growth has been explained.

Newly written knowledge stays fast to read

Reading a freshly populated vault could become much slower until RocksDB
flushed its in-memory data. Investigation reproduced this directly in the core,
without MCP or HTTP.

Database transactions now reuse one dedicated worker. This preserves RocksDB's
thread-local state across operations instead of repeatedly resetting it as
short-lived threads reuse the same native identity. Each operation still has
its own transaction, commit and rollback; the worker releases the database when
the store closes.

On a native Apple Silicon release build with 3,000 separately committed
synthetic tasks
, median context(work) time after writing fell from
711 ms to 29 ms — approximately 24× faster in this scenario. The fixed
build used standard RocksDB performance counters and needed no forced
compaction or restart to reach that result.

Upgrade and session compatibility

The memory API remains at 35 operations. This patch adds no vault schema
migration when upgrading from 0.8.0.

Idle expiry is enabled by default. Direct HTTP clients must initialize a
new session after an expired session returns HTTP 404. The bundled stdio bridge
handles this automatically. Set KAERU_MCP_KEEP_ALIVE_SECS=0 to retain sessions
without idle expiry; such sessions still count toward the capacity limit.

Upgrade through the normal installer or rebuild from the release tag, then
restart the shared daemon so the transport and database worker fixes take
effect.

When building from source with newer GCC, add -include cstdint to
CXXFLAGS if RocksDB reports missing uint64_t declarations.

Prebuilt binaries

OS Arch Asset
Linux x86_64 kaeru-v0.8.1-x86_64-unknown-linux-gnu.tar.gz (glibc 2.34+)
macOS aarch64 kaeru-v0.8.1-aarch64-apple-darwin.tar.gz (Apple Silicon)
Windows x86_64 kaeru-v0.8.1-x86_64-pc-windows-msvc.zip (static CRT)

Linux and macOS also have .mcpb bundles for installation into an MCP client.
Verify downloads with SHA256SUMS. A matching
v0.8.1 vendor snapshot
is available for offline builds.

The native Linux binary opened and read a vault populated by 0.8.0 and passed
all six browser checks. The packaged macOS binary was tested on Apple Silicon:
existing records survived the upgrade, idle expiry released session capacity,
and the stdio bridge recovered after expiry and closed its session on exit.
Native Apple Silicon release builds also passed 397 core, MCP and real-daemon
checks. Windows archive contents, architecture, system-DLL imports and checksums
were verified; native Windows runtime verification remains outstanding.

531 tests green across the workspace.