Skip to content

fix: add root exports trampoline for file:// plugin loading#73

Merged
BYK merged 1 commit intomainfrom
fix/root-plugin-entrypoint
Apr 17, 2026
Merged

fix: add root exports trampoline for file:// plugin loading#73
BYK merged 1 commit intomainfrom
fix/root-plugin-entrypoint

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented 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.

The monorepo refactor removed the root main/exports fields, breaking
`"plugin": ["file:///path/to/opencode-lore"]` loading in OpenCode.
Root now re-exports from packages/opencode/src/index.ts.
@BYK BYK enabled auto-merge (squash) April 17, 2026 10:20
@BYK BYK merged commit 8df6575 into main Apr 17, 2026
1 check passed
@BYK BYK deleted the fix/root-plugin-entrypoint branch April 17, 2026 10:21
BYK added a commit that referenced this pull request Apr 17, 2026
## Summary

Updates the curator-managed AGENTS.md monorepo architecture entry to
document the root trampoline requirement discovered in PR #73.

This also serves as the milestone marker for the completed Phase 1 work:

### What shipped (PRs #70#73)

1. **Monorepo structure** — `packages/core/` (`@loreai/core`) +
`packages/opencode/` (`opencode-lore`)
2. **SQLite driver abstraction** — `#db/driver` subpath imports swap
`bun:sqlite` ↔ `node:sqlite` at runtime
3. **Zero Bun-specific APIs** — `Bun.CryptoHasher` and `Bun.file`
replaced with `node:crypto` and `node:fs`
4. **Root trampoline** — `main`/`exports` in root `package.json` point
to the OpenCode plugin so `file:///` loading works
5. **358 tests pass**, both packages typecheck clean

### What's next (Phase 2+)

- esbuild build scripts for bundled publish
- Host abstraction (`LoreMessage`/`LorePart`, `LLMClient` interface)
- Pi extension package (`@loreai/pi`)
- Release pipeline (dual-publish under `@loreai` scope)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant