Repository navigation
Conversation
- extract host-agnostic memory behavior into src/runtime.ts - add src/plugin-v2.ts using session/tool hooks and event subscription - port /memory TUI command to the V2 keymap and dialog APIs - export dual entrypoint: setup() for V2, server() for V1 - keep the existing on-disk memory format and storage paths - track V2 todowrite snapshots for compaction context
- export active OpenCode memories as opencode-*.md into CodeBuddy's project memory - maintain a marked block in CodeBuddy MEMORY.md without touching its own lines - index CodeBuddy project/global topics in the OpenCode prompt, bounded by a char budget - import CodeBuddy edits to opencode-*.md and supersede on deletion - import CodeBuddy files marked shared: true into workspace JSON - skip credential-looking files by default; redact exported text - add per-workspace hash state to prevent sync loops - add bridge tests and fix a cross-process storage test race
- keep index summaries redacted but preserve raw body text when includeSensitive is enabled - list sensitive CodeBuddy entries by name, prioritizing root/sudo/vps/access files - import shared sensitive files without redaction when explicitly enabled
Frame the CodeBuddy bridge as the first cross-harness memory integration and state that CodeBuddy Code is supported today while other local harness agents are in progress.
Add a two-way bridge for oh-my-pi's plain-Markdown local memory backend. OpenCode exports memories as [opencode:<id>] lesson lines in learned.md, imports edits and deletions back, indexes oh-my-pi lessons in the prompt, and imports recent lessons as omp-tagged JSON memories. memory_summary.md, MEMORY.md, and skills/ stay owned by oh-my-pi.
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
Adds optional two-way bridges that let CodeBuddy Code and oh-my-pi read and edit OpenCode's workspace memory, so the same decisions, preferences, and project facts follow you between harnesses. The README now presents memory sharing as a project feature: CodeBuddy Code and oh-my-pi are supported today, more local harness agents are in progress.
What changed
CodeBuddy Code
src/codebuddy-bridge.ts, a filesystem bridge between the JSON workspace store and CodeBuddy's Markdown memory.opencode-<id>.mdtopic files plus one marked block in CodeBuddy'sMEMORY.md.shared: trueimports them into JSON memory.opencode-*.mdare imported back; deleting one supersedes the memory.oh-my-pi (
localbackend)src/oh-my-pi-bridge.ts, a line-oriented bridge for omp's plain-Markdown local memory backend.- [opencode:<id>] <text>lesson lines in~/.omp/agent/memories/<encoded-workdir>/learned.md.omp-tagged JSON memories.memory_summary.md,MEMORY.md, andskills/are owned by oh-my-pi's consolidation pipeline and are never written.Shared plumbing
src/runtime.ts, so V1 and V2 adapters support them.atomicWriteTextto the storage layer for generated Markdown mirrors.tests/codebuddy-bridge.test.tsandtests/oh-my-pi-bridge.test.ts, plus a V2 adapter integration test for each bridge.README.md,docs/architecture.md,docs/configuration.md,AGENTS.md, andCHANGELOG.md.Ownership model
Both bridges only write files/lines OpenCode owns and never rewrite another agent's content.
opencode-<id>.md, one marked block inMEMORY.md- [opencode:<id>] ...lines inlearned.md- <lesson>lines,memory_summary.md,MEMORY.md,skills/codebuddy-bridge.json/oh-my-pi-bridge.jsonbesideworkspace-memory.json, preventing write/read loops.includeSensitiveis enabled.Configuration
{ "plugins": [ { "package": "opencode-working-memory", "options": { "codeBuddyBridge": { "includeGlobal": true, "includeSensitive": false }, "ohMyPiBridge": { "includeSensitive": false } } } ] }Both bridges are disabled unless their option object is present. oh-my-pi requires
memory.backend: localin~/.omp/agent/config.yml.Verification
npm run typechecknpm test: 565 passing (including 15 new bridge tests)npm run buildnpm run check:package-integritysession.hook("context")and exports the expected files.Scope and follow-ups
~/.codebuddy; oh-my-pi through~/.omp/agent(both overridable).mnemopi,hindsight, andsharpshooterbackends are intentionally out of scope; only the plain-Markdownlocalbackend is bridged.