19 lines
1.7 KiB
Markdown
19 lines
1.7 KiB
Markdown
# 2026-02-23 Session Notes
|
|
|
|
## OpenCode Plugin Full Integration Plan Received
|
|
|
|
The session began with a comprehensive plan for replacing the current string-template OpenCode integration with a proper TypeScript plugin. The plan establishes a connector/adapter architecture following the established OpenClaw pattern:
|
|
|
|
- **New `packages/opencode-plugin/`** — Self-contained runtime plugin with zero @signet/* workspace dependencies, published as @signet/opencode-plugin. Includes 8 tools (remember/recall, memory_search/store/get/list/modify/forget), daemon client, types, and lifecycle hooks.
|
|
|
|
- **Refactored `packages/connector-opencode/`** — Install-time setup that writes the bundled plugin to ~/.config/opencode/plugins/signet.mjs, generates AGENTS.md, symlinks skills, and handles migration from legacy memory.mjs format.
|
|
|
|
## Key Architectural Decisions
|
|
|
|
The integration leverages OpenCode's auto-discovery mechanism — plugins from ~/.config/opencode/plugins/ are auto-discovered on launch, eliminating the need for config patching. All install paths (fresh, update, migrate) funnel through a single idempotent connector.install() method. Plugin lifecycle hooks (session.compacted, session.idle, session.deleted) fire for memory compaction and session tracking. The plugin bundle is embedded at build time and written during connector installation.
|
|
|
|
## Next Steps
|
|
|
|
Implementation begins with scaffold creation followed by strict TypeScript discipline (no any types, no as assertions, explicit return types, readonly modifiers). Build sequence: opencode-plugin package → plugin bundle embedding → connector refactoring.
|
|
|
|
Plan was provided but implementation work had not yet commenced at session end. |