Skip to content

v0.2.1

Choose a tag to compare

@ualtinok ualtinok released this 27 Mar 22:03

What's Changed

Performance

  • In-memory embedding cache with TTL — eliminates repeated blob deserialization on every ctx_search call. 60s TTL, invalidated on write/delete/update
  • FTS pre-filtering for semantic search — narrows cosine similarity candidates from O(N) to O(k) before scoring. Falls back to full scan when FTS returns no matches
  • Scoped raw-message cache — compartment trigger evaluation now loads OpenCode's message DB once instead of twice per evaluation
  • Cached scoped tag assignments — avoids 16k+ regex iterations per transform pass in long sessions (size-based invalidation)
  • WeakMap prepared statement caching — added to storage-tags.ts and storage-ops.ts for consistency

Bug Fixes

  • Session cleanup: FTS index data now cleaned on session deletion — prevents unbounded DB growth
  • Memory TTL enforcement: expires_at predicate added to all active-memory queries — expired memories no longer persist forever
  • Embedding credential rotation: API key hash included in embedding model identity — provider key changes now trigger re-embedding
  • Per-model scheduler threshold: modelKey threaded through scheduler.shouldExecute() — per-model execute_threshold_percentage now applies to queue execution decisions
  • Compaction transaction: updateSessionMeta moved inside compaction transaction boundary
  • Dreamer queue index: Added idx_dream_queue_pending(started_at, enqueued_at)
  • Dream timer lifecycle: Timer returns cleanup function, properly unref'd

Refactoring

  • Extracted insertCompartmentRows/insertFactRows helpers — replaces 4 duplicate INSERT sites
  • Removed dead exports: DreamingConfigSchema, DreamingConfig, getQueueSize, hasPendingOps, parseJsoncSafe, createTagContentResolver
  • Documented intentional patterns to prevent repeat audit noise

Full Changelog: v0.2.0...v0.2.1

Full Changelog: v0.2.0...v0.2.1