Releases: cortexkit/opencode-magic-context
v0.2.9
Bug Fixes
- Critical: Zero-config path now returns Zod-parsed defaults instead of empty object
clearIndexedMessageswrapped in transaction for consistent FTS/index state on partial failureisArrayLikeNumbertype guard strengthened to validatelengthis numeric and sample element is a number- Stale dream queue cleanup now uses configurable
maxRuntimeMinutes + 30min bufferinstead of hardcoded 2h deleteMemoryuses 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
_unprocessedFromparameter fromhealCompartmentGaps - Standardized
getErrorMessage()usage across catch blocks
v0.2.8
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_detectedtriggers no longer fire on first pass after restart.
v0.2.7
Bug Fixes
- Note nudges now work in all sessions — delivery was gated by
fullFeatureModewhich isfalsefor subagent/orchestrator sessions. Triggers fired but nudges were silently suppressed. Now runs independently offullFeatureMode. - Note nudge state only clears after successful placement — previously
triggerPendingwas 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
getNoteNudgeTextintopeekNoteNudgeText+markNoteNudgeDeliveredfor safer two-phase delivery
Full Changelog: v0.2.6...v0.2.7
v0.2.6
Full Changelog: v0.2.5...v0.2.6
v0.2.5
Full Changelog: v0.2.4...v0.2.5
v0.2.4
Full Changelog: v0.2.3...v0.2.4
v0.2.3
Full Changelog: v0.2.2...v0.2.3
v0.2.2
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 setupThe wizard walks through:
- OpenCode installation check
- Available model detection (
opencode models) - Plugin registration + built-in compaction disable
- Historian model selection (per-request models recommended first)
- Dreamer setup (local/ollama models recommended if available)
- Sidekick setup (fast models like cerebras recommended first)
- 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
What's Changed
Performance
- In-memory embedding cache with TTL — eliminates repeated blob deserialization on every
ctx_searchcall. 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_atpredicate 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:
modelKeythreaded throughscheduler.shouldExecute()— per-modelexecute_threshold_percentagenow applies to queue execution decisions - Compaction transaction:
updateSessionMetamoved 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/insertFactRowshelpers — 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
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 usectx_searchinsteadctx_memoryis now write/delete only
Internal
- Release script now includes
bun testin pre-release checks - Test fixes for CI (injectable message reader for OpenCode DB isolation)