v0.16.1
Unified CLI: one command for both harnesses
The setup and doctor commands have been consolidated into a single @cortexkit/magic-context package. Instead of running per-plugin binaries, you now use one CLI that auto-detects which harnesses you have installed (OpenCode, Pi, or both) and dispatches to the right pipeline.
# Auto-detects installed harnesses
bunx --bun @cortexkit/magic-context@latest setup
# Or target a specific harness
bunx --bun @cortexkit/magic-context@latest doctor --harness opencode
bunx --bun @cortexkit/magic-context@latest doctor --harness piThe plugin packages (@cortexkit/opencode-magic-context, @cortexkit/pi-magic-context) are now runtime-only — they no longer ship CLI binaries. About 7,100 lines of duplicated CLI logic across the two plugins were collapsed into a shared adapter pattern.
What's New
-
@cortexkit/magic-context— new unified CLI package withsetup,doctor, anddoctor migratecommands. Auto-detects installed harnesses; pass--harness opencodeor--harness pito target a specific one. The piped install scripts (install.sh,install.ps1) and the in-app conflict warnings now point at this single CLI. -
Doctor checks aligned across both harnesses. OpenCode doctor gained the checks Pi already had: CLI version vs npm latest,
magic-context.jsoncJSONC parse + schema-load validation, shared SQLite DB existence +PRAGMA integrity_check+ per-table row counts. Pi doctor gained the historian-debug-dumps inspection. Both now report aPASS X / WARN Y / FAIL Zsummary line so results scan at a glance. -
Discord — Magic Context now has a Discord server. Drop in for help, feature discussion, or release coordination.
What's Fixed
-
Local dev-path plugin entries are no longer overwritten by
doctor. Previously, an entry like/Users/.../opencode-magic-context/packages/pluginin your OpenCode config would be silently replaced with@cortexkit/opencode-magic-context@latest, swapping the developer's local plugin instance for the published version. Doctor and setup now recognize dev-path entries (file://, absolute paths, relative paths) and leave them alone — even under--force. Affected entries are logged asPlugin registered (dev path: ...)so it's clear they were detected. -
comment-jsonrestored as a plugin runtime dependency. The CLI restructure inadvertently droppedcomment-jsonfrom the OpenCode and Pi plugin packages, even though the TUI config helper, auto-update checker, and Pi config loader still import it at runtime. Local builds masked the regression because workspacenode_modulesstill resolved it; CI and fresh installs hitCannot find module 'comment-json'at typecheck and load. Restored on both plugin packages with version pinned to^4.2.5across the workspace. -
better-sqlite3properly externalized from the CLI bundle so the unified CLI works under Node without trying to bundle a native module. Declared as a runtime dependency on the CLI package and marked external in the build. -
Docker E2E images updated for the unified CLI so the test pipeline exercises the same code path users run. Both Dockerfiles now COPY the CLI dist, install it with build tools available, and symlink the binary into
/usr/local/bin/magic-context.
Upgrade
bunx --bun @cortexkit/magic-context@latest doctor --forceThis installs the new unified CLI and runs doctor against your installed harnesses. The runtime plugin entries in your opencode.json[c] (@cortexkit/opencode-magic-context) and Pi settings (@cortexkit/pi-magic-context) are unchanged — those are the runtime plugin packages, separate from the CLI.
If you previously had bunx --bun @cortexkit/opencode-magic-context@latest setup or magic-context-pi setup aliased anywhere, switch to:
bunx --bun @cortexkit/magic-context@latest setupFull Changelog: v0.16.0...v0.16.1