refactor: split into @loreai/core + opencode-lore monorepo#71
Merged
Conversation
Restructures the single opencode-lore package into a Bun workspace with: - packages/core (@loreai/core) — shared memory engine - packages/opencode (opencode-lore) — OpenCode plugin (name preserved) What moved: - src/*.ts → packages/core/src/ - src/index.ts + reflect.ts→ packages/opencode/src/ (OpenCode-specific) - test/* → packages/core/test/ (+ opencode-specific subset) - scripts/ → packages/opencode/scripts/ - eval/ → packages/opencode/eval/ What stays the same: - Package name opencode-lore — existing users' "plugin": ["opencode-lore"] configs keep working unchanged. - All 354 tests pass unchanged. - No runtime behavior change — this is purely a source layout refactor. Why: First step toward dual-publish (opencode-lore legacy name + @loreai/opencode canonical name) and upcoming @loreai/pi extension that will share the core. Follow-up PRs: - SQLite driver swap (node:sqlite subpath imports) - esbuild build scripts for packaged output - Pi extension package
BYK
added a commit
that referenced
this pull request
Apr 17, 2026
The monorepo refactor (PR #71) removed the root \`main\` and \`exports\` fields, which breaks \`"plugin": ["file:///path/to/opencode-lore"]\` loading in OpenCode. Adds a root-level trampoline that points to \`packages/opencode/src/index.ts\`. Verified: \`bun --eval 'import("/home/byk/Code/opencode-lore")'.\` exports \`LorePlugin\` correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First step toward the @LoreAi monorepo. Restructures the single opencode-lore package into a Bun workspace with two packages:
@loreai/core— shared memory engine (SQLite, FTS5, distillation, curation, gradient)opencode-lore— OpenCode plugin (Plugin entry + recall tool)What moved
src/*.ts(core modules)packages/core/src/src/index.ts,src/reflect.tspackages/opencode/src/test/*(core tests)packages/core/test/test/index.test.ts+ newrecovery.test.tspackages/opencode/test/scripts/packages/opencode/scripts/eval/packages/opencode/eval/Zero user-visible change
opencode-lore— existing users'"plugin": ["opencode-lore"]configs keep working unchanged.Why
First step toward:
opencode-lore(legacy) +@loreai/opencode(canonical), sharing the same tarball.@loreai/coreso a future@loreai/piextension can depend on the same memory engine.Follow-up PRs
#db/driversubpath imports forbun:sqlite↔node:sqlite)LoreMessage/LorePart,LLMClientinterface)