Skip to content

Releases: cortexkit/opencode-magic-context

v0.2.9

29 Mar 10:35

Choose a tag to compare

Bug Fixes

  • Critical: Zero-config path now returns Zod-parsed defaults instead of empty object
  • clearIndexedMessages wrapped in transaction for consistent FTS/index state on partial failure
  • isArrayLikeNumber type guard strengthened to validate length is numeric and sample element is a number
  • Stale dream queue cleanup now uses configurable maxRuntimeMinutes + 30min buffer instead of hardcoded 2h
  • deleteMemory uses surgical single-memory embedding cache invalidation instead of full project invalidation
  • Memory promotion loop catches per-fact errors instead of aborting all remaining promotions

Cleanup

  • FTS search uses toMemory() instead of object spread for consistency
  • Removed unused _unprocessedFrom parameter from healCompartmentGaps
  • Standardized getErrorMessage() usage across catch blocks

v0.2.8

29 Mar 00:30

Choose a tag to compare

Bug Fixes

  • Note nudge state persisted to DB — trigger and sticky state now survives restarts without cache busts. Previously, restarting would lose deferred triggers and cause delivered nudge text to vanish from user messages (cache bust).
  • Note nudge deferred to next user message — triggers mid-turn (e.g., from todowrite) no longer inject into the current cached user message. The nudge waits for the next user turn.
  • Sticky note nudge replay — delivered nudges re-inject at the same anchored message on subsequent transform passes, following the same pattern as sticky turn reminders.
  • Commit detection guard — false commit_detected triggers no longer fire on first pass after restart.

v0.2.7

28 Mar 23:18

Choose a tag to compare

Bug Fixes

  • Note nudges now work in all sessions — delivery was gated by fullFeatureMode which is false for subagent/orchestrator sessions. Triggers fired but nudges were silently suppressed. Now runs independently of fullFeatureMode.
  • Note nudge state only clears after successful placement — previously triggerPending was cleared before confirming the append succeeded, causing silent drops when no suitable user message existed.

Improvements

  • Added logging for note nudge lifecycle: trigger source, delivery, skip reasons
  • Split getNoteNudgeText into peekNoteNudgeText + markNoteNudgeDelivered for safer two-phase delivery

Full Changelog: v0.2.6...v0.2.7

v0.2.6

28 Mar 19:31

Choose a tag to compare

Full Changelog: v0.2.5...v0.2.6

v0.2.5

28 Mar 19:02

Choose a tag to compare

Full Changelog: v0.2.4...v0.2.5

v0.2.4

28 Mar 18:54

Choose a tag to compare

Full Changelog: v0.2.3...v0.2.4

v0.2.3

28 Mar 18:50

Choose a tag to compare

Full Changelog: v0.2.2...v0.2.3

v0.2.2

28 Mar 18:25

Choose a tag to compare

What's New

Interactive Setup Wizard

One command to install and configure everything:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/scripts/install.sh | bash

# Windows (PowerShell)
irm https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/scripts/install.ps1 | iex

# Or directly
bunx @cortexkit/opencode-magic-context setup

The wizard walks through:

  1. OpenCode installation check
  2. Available model detection (opencode models)
  3. Plugin registration + built-in compaction disable
  4. Historian model selection (per-request models recommended first)
  5. Dreamer setup (local/ollama models recommended if available)
  6. Sidekick setup (fast models like cerebras recommended first)
  7. Oh-my-opencode hook compatibility (auto-disables conflicting hooks)

Cross-platform: macOS, Linux, Windows (PowerShell).

Full Changelog: v0.2.1...v0.2.2

v0.2.1

27 Mar 22:03

Choose a tag to compare

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

v0.2.0

27 Mar 16:54

Choose a tag to compare

What's New

ctx_search — Unified search across all data layers

Search project memories, session facts, and raw conversation history with a single query. Results are ranked by score × source_boost so strong message matches surface alongside curated memories instead of being buried.

ctx_search(query="authentication approach")

Message results include ordinal numbers — pass them to ctx_expand to retrieve the surrounding conversation context.

ctx_reduce_enabled config option

Set "ctx_reduce_enabled": false to hide the ctx_reduce tool, disable all nudges/reminders, and strip reduction guidance from prompts. Heuristic cleanup, compartments, memory, and search continue working. Useful for testing whether automatic cleanup alone is sufficient for the model of choice.

Bug Fixes

  • Dreamer: Schedule was piggy backing on active messages, now it properly use timer.
  • 4 cache-bust fixes from council audit: compartment injection caching on defer passes, nudge placement lifecycle gating, nudge anchor retirement on execute only, system message stripping boundary gated behind cache-busting passes
  • Note nudge fix: deferred notes now surface reliably via user messages instead of depending on context-pressure nudge infrastructure
  • Sticky reminder gating: clearing deferred to cache-busting passes only, preventing unintended prefix invalidation
  • Search ranking: replaced hard priority partitioning (all memories before all messages) with boost-based interleaving (memory=1.3×, fact=1.15×, message=1.0×)

Breaking Changes

  • ctx_memory action="search" removed — agents use ctx_search instead
  • ctx_memory is now write/delete only

Internal

  • Release script now includes bun test in pre-release checks
  • Test fixes for CI (injectable message reader for OpenCode DB isolation)