{"_id":"@bunkercache/memoir","_rev":"9-ed3ca811adc534bb17f06a42dc3507d4","name":"@bunkercache/memoir","dist-tags":{"next":"0.2.0-next.4","latest":"0.2.0"},"versions":{"0.1.0":{"name":"@bunkercache/memoir","version":"0.1.0","author":{"name":"Chris Tunbridge","email":"967304+Destreyf@users.noreply.github.com"},"_id":"@bunkercache/memoir@0.1.0","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"homepage":"https://github.com/bunkercache/memoir#readme","bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"dist":{"shasum":"dcf9de1b67766018ac055569574c22f9186a478b","tarball":"https://registry.npmjs.org/@bunkercache/memoir/-/memoir-0.1.0.tgz","fileCount":4,"integrity":"sha512-Md5VxEHoPgW88ZwEsIBuNvCiz9P9+t3Hbf603Lyt3gx0j9TekhwqCZkCo6uXjnI5s6uv20ayVoQpdHql9qpZ/w==","signatures":[{"sig":"MEYCIQC6UwaKwglSJwev3Mjc1+IrtLt/Wl160owAHaANM0gxKgIhAI8WKxrVoyIha7Uwr0AnWvLHmPrLcF+d1/EW1jsnGcL3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":496633},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"3e08cfc93dcca7386b04b613d21124e7aa41cf0b","_npmUser":{"name":"destreyf","email":"blasterjr@gmail.com"},"deprecated":"This package has been renamed to @bunkercache/opencode-memoir","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"_npmVersion":"11.6.3","description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","directories":{},"_nodeVersion":"24.5.0","dependencies":{"sqlite-vec":"^0.1.6","@opencode-ai/plugin":"1.0.204"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","vitest":"^3.2.4","prettier":"^3.2.4","bun-types":"latest","@eslint/js":"^9.39.1","@types/node":"^22.10.5","typescript-eslint":"^8.47.0","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"8.47.0","@typescript-eslint/eslint-plugin":"8.47.0"},"_npmOperationalInternal":{"tmp":"tmp/memoir_0.1.0_1766907837556_0.47570547202688185","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-next.1":{"name":"@bunkercache/memoir","version":"0.1.0-next.1","author":{"name":"Chris Tunbridge","email":"967304+Destreyf@users.noreply.github.com"},"_id":"@bunkercache/memoir@0.1.0-next.1","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"homepage":"https://github.com/bunkercache/memoir#readme","bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"dist":{"shasum":"1873c7cfdabc82470a64f9d56897a30f0cfdd8aa","tarball":"https://registry.npmjs.org/@bunkercache/memoir/-/memoir-0.1.0-next.1.tgz","fileCount":4,"integrity":"sha512-UU87IrbtlETw7jR2X0s1Y2lUTB1l3MlD7w2jHIkHE5sHmuD6zdBS3LzpxEUxQ+lMN2UJwuBHffdJDbMMTDsuYg==","signatures":[{"sig":"MEUCIQCuqGlO2iDUiyiMvFakoLWe0jW+u/gwqeL6bp9EcFPUbgIgGIz/yeoE/pT/CshANAxK8NROLZ+5xESjrD2IRgBqH74=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bunkercache%2fmemoir@0.1.0-next.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":524636},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"79e85c31611011dd0000e07cb331d531889dd839","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cce5279c-cf89-4062-8635-ba2da65cda66"}},"deprecated":"This package has been renamed to @bunkercache/opencode-memoir","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"_npmVersion":"11.7.0","description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"sqlite-vec":"^0.1.6","@opencode-ai/plugin":"1.0.204"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.0","prettier":"^3.2.4","bun-types":"latest","@eslint/js":"^9.39.1","typescript":"^5.9.3","@types/node":"^25.0.0","typescript-eslint":"^8.47.0","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"8.50.1","@typescript-eslint/eslint-plugin":"8.50.1"},"_npmOperationalInternal":{"tmp":"tmp/memoir_0.1.0-next.1_1766928909154_0.7274392056961247","host":"s3://npm-registry-packages-npm-production"}},"0.2.0-next.1":{"name":"@bunkercache/memoir","version":"0.2.0-next.1","author":{"name":"Chris Tunbridge","email":"967304+Destreyf@users.noreply.github.com"},"license":"MIT","_id":"@bunkercache/memoir@0.2.0-next.1","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"homepage":"https://github.com/bunkercache/memoir#readme","bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"dist":{"shasum":"3cc34541802a75b4f7783a493b81d02e56b63b4d","tarball":"https://registry.npmjs.org/@bunkercache/memoir/-/memoir-0.2.0-next.1.tgz","fileCount":4,"integrity":"sha512-Nilchvp/yvA+XEITzp1qgRPOGkdZnOP3P3AZuFdjpe0rghmYMtvMWjIIaID8YfN9FNez5eCG1jkwOJg8/mKarw==","signatures":[{"sig":"MEQCIH9PZYadmwKUcvqUhznWgyYkQYdNR1IffivVCwCO/70JAiAUGj048cJYu8SwZHXGKgPF/vyZCROu+H591tFKI4WjMg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bunkercache%2fmemoir@0.2.0-next.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":524543},"type":"module","exports":{".":"./dist/index.js"},"gitHead":"11e110448621bde6ca9af89723d52f00680aa95f","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cce5279c-cf89-4062-8635-ba2da65cda66"}},"deprecated":"This package has been renamed to @bunkercache/opencode-memoir","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"_npmVersion":"11.7.0","description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"sqlite-vec":"^0.1.6","@opencode-ai/plugin":"1.0.204"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.0","prettier":"^3.2.4","bun-types":"latest","@eslint/js":"^9.39.1","typescript":"^5.9.3","typescript-eslint":"^8.47.0","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"8.50.1","@typescript-eslint/eslint-plugin":"8.50.1"},"_npmOperationalInternal":{"tmp":"tmp/memoir_0.2.0-next.1_1766929685588_0.7083522477009292","host":"s3://npm-registry-packages-npm-production"}},"0.2.0-next.2":{"name":"@bunkercache/memoir","version":"0.2.0-next.2","author":{"name":"Chris Tunbridge","email":"967304+Destreyf@users.noreply.github.com"},"license":"MIT","_id":"@bunkercache/memoir@0.2.0-next.2","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"homepage":"https://github.com/bunkercache/memoir#readme","bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"dist":{"shasum":"f914d8332fe4e65f56de370e246ce37742c63447","tarball":"https://registry.npmjs.org/@bunkercache/memoir/-/memoir-0.2.0-next.2.tgz","fileCount":4,"integrity":"sha512-5y+JHT9Dvv5/PLoOf/2pgLxQqHmUJG1q1qQ0gixBuvRQjdVA+jGZBOxX/K5/WUnlxWhNl1EqoZUb4cEg41PWeQ==","signatures":[{"sig":"MEUCIAnTSN8HZ1mHQGk+GSWbaf19yVOfajz+dDflMH7Q7cm6AiEA48lMRW1dZV2+DPLAqERmIsrUPjUfx1oTlOcYgr5RkVk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bunkercache%2fmemoir@0.2.0-next.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":524543},"type":"module","exports":{".":"./dist/index.js"},"gitHead":"4f2a20e73a8c0b04ba1059fcf9c1416eb78f2e8f","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cce5279c-cf89-4062-8635-ba2da65cda66"}},"deprecated":"This package has been renamed to @bunkercache/opencode-memoir","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"_npmVersion":"11.7.0","description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"sqlite-vec":"^0.1.6","@opencode-ai/plugin":"1.0.204"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.0","prettier":"^3.2.4","bun-types":"latest","@eslint/js":"^9.39.1","typescript":"^5.9.3","typescript-eslint":"^8.47.0","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"8.50.1","@typescript-eslint/eslint-plugin":"8.50.1"},"_npmOperationalInternal":{"tmp":"tmp/memoir_0.2.0-next.2_1766930019208_0.14484021003672298","host":"s3://npm-registry-packages-npm-production"}},"0.2.0-next.3":{"name":"@bunkercache/memoir","version":"0.2.0-next.3","author":{"name":"Chris Tunbridge","email":"967304+Destreyf@users.noreply.github.com"},"license":"MIT","_id":"@bunkercache/memoir@0.2.0-next.3","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"homepage":"https://github.com/bunkercache/memoir#readme","bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"dist":{"shasum":"7876c505a1e6c478c98e9c3c04cc95aa1a53dc4e","tarball":"https://registry.npmjs.org/@bunkercache/memoir/-/memoir-0.2.0-next.3.tgz","fileCount":4,"integrity":"sha512-BV+jQugzaKM4qEzAf9wEd7udHOyWcySslBuG0jSoHtz7Xp38BSv9jthWxlPaHXjLY7NFTjU4pl9v4PwdSO35cA==","signatures":[{"sig":"MEUCIQDwduhGEhybfeutAXsGg4AdRPct+2osnzKHfg6YZ7oQ6wIgAKSSGCGaSW8eUJzckyXxL+bxwYEVl/4up/+0ZKuwIXA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bunkercache%2fmemoir@0.2.0-next.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":524543},"type":"module","exports":{".":"./dist/index.js"},"gitHead":"a5b6c5896085ec550a7507b23a1f53de58afacc0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cce5279c-cf89-4062-8635-ba2da65cda66"}},"deprecated":"This package has been renamed to @bunkercache/opencode-memoir","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"_npmVersion":"11.7.0","description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"sqlite-vec":"^0.1.6","@opencode-ai/plugin":"1.0.204"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.0","prettier":"^3.2.4","bun-types":"latest","@eslint/js":"^9.39.1","typescript":"^5.9.3","typescript-eslint":"^8.47.0","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"8.50.1","@typescript-eslint/eslint-plugin":"8.50.1"},"_npmOperationalInternal":{"tmp":"tmp/memoir_0.2.0-next.3_1766930633280_0.9755515729283133","host":"s3://npm-registry-packages-npm-production"}},"0.2.0-next.4":{"name":"@bunkercache/memoir","version":"0.2.0-next.4","author":{"name":"Chris Tunbridge","email":"967304+Destreyf@users.noreply.github.com"},"license":"MIT","_id":"@bunkercache/memoir@0.2.0-next.4","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"homepage":"https://github.com/bunkercache/memoir#readme","bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"dist":{"shasum":"8643aaacc3a124be3885d08f06908f408bc5797e","tarball":"https://registry.npmjs.org/@bunkercache/memoir/-/memoir-0.2.0-next.4.tgz","fileCount":4,"integrity":"sha512-joF/dg6DU6b7YUNgXbJGtPp9/YZQdIY0mV4WNTp2AK8a4jIdrjbbu9dZX8iauh48nSXd8qGfVRyv96Nwf8WZOQ==","signatures":[{"sig":"MEUCIQDEtPrraXfrvpZh9OKkylj2TdUODe8whnWiNhkTNeExrQIgP9LseJnN7LH54ZRXfVrMuIH5dpnSR48osWDUhfnrHAU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bunkercache%2fmemoir@0.2.0-next.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":524543},"type":"module","exports":{".":"./dist/index.js"},"gitHead":"e7c9902f862da1b4252ccd1890980e637f4810f5","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cce5279c-cf89-4062-8635-ba2da65cda66"}},"deprecated":"This package has been renamed to @bunkercache/opencode-memoir","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"_npmVersion":"11.7.0","description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"sqlite-vec":"^0.1.6","@opencode-ai/plugin":"1.0.204"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.0","prettier":"^3.2.4","bun-types":"latest","@eslint/js":"^9.39.1","typescript":"^5.9.3","typescript-eslint":"^8.47.0","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"8.50.1","@typescript-eslint/eslint-plugin":"8.50.1"},"_npmOperationalInternal":{"tmp":"tmp/memoir_0.2.0-next.4_1766930883233_0.525450483337182","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bunkercache/memoir","version":"0.2.0","author":{"name":"Chris Tunbridge","email":"Destreyf@users.noreply.github.com"},"license":"MIT","_id":"@bunkercache/memoir@0.2.0","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"homepage":"https://github.com/bunkercache/memoir#readme","bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"dist":{"shasum":"8e2aca96822a6e43f06789cb56e4f159e144eb72","tarball":"https://registry.npmjs.org/@bunkercache/memoir/-/memoir-0.2.0.tgz","fileCount":4,"integrity":"sha512-9R4E+VRCmQvpnCZWkxi/10Q7Xy2RJUXxUnTMgBcD+q4zv0TRbW+N+CLHx3IJjXY0OGpQCoGVd/7CnMEjvLWv6A==","signatures":[{"sig":"MEUCIBkKMRyDfYSfrBJggYMr5TFjwBRlMLd7XBJ0xC46GS78AiEArPF9TdzppFNx9tVvo8cVuXgJjRrFDiDtA9eUOtu+cUw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bunkercache%2fmemoir@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":524529},"type":"module","exports":{".":"./dist/index.js"},"gitHead":"cd048e8def276f6bdc9642451620a7842bfc5a0f","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cce5279c-cf89-4062-8635-ba2da65cda66"}},"deprecated":"This package has been renamed to @bunkercache/opencode-memoir","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"_npmVersion":"11.7.0","description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"sqlite-vec":"^0.1.6","@opencode-ai/plugin":"1.0.204"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.0","prettier":"^3.2.4","bun-types":"latest","@eslint/js":"^9.39.1","typescript":"^5.9.3","typescript-eslint":"^8.47.0","eslint-config-prettier":"10.1.8","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"8.50.1","@typescript-eslint/eslint-plugin":"8.50.1"},"_npmOperationalInternal":{"tmp":"tmp/memoir_0.2.0_1766931322316_0.851493688450059","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-12-28T07:43:57.422Z","modified":"2025-12-28T14:28:55.206Z","0.1.0":"2025-12-28T07:43:57.724Z","0.1.0-next.1":"2025-12-28T13:35:09.328Z","0.2.0-next.1":"2025-12-28T13:48:05.742Z","0.2.0-next.2":"2025-12-28T13:53:39.353Z","0.2.0-next.3":"2025-12-28T14:03:53.446Z","0.2.0-next.4":"2025-12-28T14:08:03.392Z","0.2.0":"2025-12-28T14:15:22.460Z"},"bugs":{"url":"https://github.com/bunkercache/memoir/issues"},"author":{"name":"Chris Tunbridge","email":"Destreyf@users.noreply.github.com"},"license":"MIT","homepage":"https://github.com/bunkercache/memoir#readme","repository":{"url":"git+https://github.com/bunkercache/memoir.git","type":"git"},"description":"A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.","maintainers":[{"name":"destreyf","email":"blasterjr@gmail.com"}],"readme":"# @bunkercache/memoir\n\nA local-first, repo-scoped memory plugin for OpenCode. Provides persistent project learnings and hierarchical session history with \"blockchain-style\" compaction.\n\n## Features\n\n- **Project Memory** - Store preferences, patterns, gotchas, and facts about your codebase\n- **Session History** - Hierarchical chunk tree for traversing compacted conversation history\n- **Full-Text Search** - SQLite FTS5 with BM25 ranking\n- **Keyword Detection** - Auto-save when you say \"remember\", \"don't forget\", etc.\n- **Vector Search Ready** - Schema supports sqlite-vec for future semantic search\n\n## Installation\n\n```bash\nbun add @bunkercache/memoir\n```\n\nAdd to your OpenCode config (`~/.config/opencode/config.json`):\n\n```json\n{\n  \"plugins\": [\"@bunkercache/memoir\"]\n}\n```\n\n## Tools\n\nThe plugin provides three tools for the LLM:\n\n### `memoir`\n\nAdd, search, list, or forget project memories.\n\n```\nmemoir add \"Always run tests before committing\" --type preference\nmemoir search \"testing patterns\"\nmemoir list --limit 10\nmemoir forget mem_abc123\n```\n\n### `memoir_expand`\n\nExpand a compacted chunk to see full details.\n\n```\nmemoir_expand ch_abc123\nmemoir_expand ch_abc123 --include-children\n```\n\n### `memoir_history`\n\nSearch session history chunks.\n\n```\nmemoir_history \"auth bug fix\"\nmemoir_history \"rate limiting\" --session abc123\n```\n\n## Memory Types\n\n| Type         | Description                         | Example                                  |\n| ------------ | ----------------------------------- | ---------------------------------------- |\n| `preference` | User/project preferences            | \"Always run tests after changes\"         |\n| `pattern`    | Coding patterns used in the project | \"We use Result<T, E> for error handling\" |\n| `gotcha`     | Known issues or things to avoid     | \"Don't use lodash, we have utilities\"    |\n| `fact`       | General facts about the project     | \"API is at /api/v2\"                      |\n| `learned`    | Auto-detected patterns              | \"User prefers TypeScript strict mode\"    |\n\n## Configuration\n\nCreate `~/.config/opencode/memoir.json` (global) or `<repo>/.opencode/memoir.json` (local):\n\n```json\n{\n  \"$schema\": \"https://bunkercache.github.io/memoir/schema/config.json\",\n  \"memory\": {\n    \"maxInject\": 10,\n    \"maxSearchResults\": 20,\n    \"keywordDetection\": true,\n    \"customKeywords\": [\"note to self\"]\n  },\n  \"storage\": {\n    \"forceLocal\": true\n  }\n}\n```\n\nSee [schema/config.schema.json](schema/config.schema.json) for all options.\n\n## How It Works\n\n### Context Injection\n\nOn the first message of each session, Memoir searches for relevant memories and injects them into the context.\n\n### Keyword Detection\n\nWhen you say things like \"remember this\" or \"don't forget\", Memoir nudges the LLM to save the information.\n\n### Chunk Compaction\n\nWhen OpenCode compacts a session, Memoir creates summary chunks that reference the original chunks. Use `memoir_expand` to drill down into details.\n\n```\nSession: abc123\n┌─────────────────────────────────────────────────────────────┐\n│ Summary Chunk (ch_003)                                       │\n│ \"Fixed auth bug [ch_001], added rate limiting [ch_002]\"      │\n│     │                                                        │\n│     ├── ch_001: Full auth fix details                        │\n│     └── ch_002: Full rate limiting details                   │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Development\n\n```bash\n# Install dependencies\nbun install\n\n# Run tests\nmise run test\n\n# Build\nmise run build\n\n# Lint\nmise run lint\nmise run lint:fix\n\n# Format\nmise run format\n```\n\n## Storage Locations\n\n**Local install** (when `.opencode/opencode.json` exists):\n\n```\n<repo>/.opencode/memoir/memory.db\n```\n\n**Global install**:\n\n```\n~/.local/share/opencode/project/<project-id>/memoir/memory.db\n```\n\n## Contributing\n\nContributions welcome! Please read [STYLEGUIDE.md](STYLEGUIDE.md) before submitting PRs.\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","readmeFilename":"README.md"}