@aislop-inc/opencode-mem 0.0.0-stage → 2.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +811 -2
- package/dist/config.d.ts +577 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1141 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1268 -0
- package/dist/plugin.d.ts +10 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +10 -0
- package/dist/services/ai/ai-provider-factory.d.ts +8 -0
- package/dist/services/ai/ai-provider-factory.d.ts.map +1 -0
- package/dist/services/ai/ai-provider-factory.js +61 -0
- package/dist/services/ai/api-key-placeholder.d.ts +2 -0
- package/dist/services/ai/api-key-placeholder.d.ts.map +1 -0
- package/dist/services/ai/api-key-placeholder.js +14 -0
- package/dist/services/ai/internal-capture-sessions.d.ts +7 -0
- package/dist/services/ai/internal-capture-sessions.d.ts.map +1 -0
- package/dist/services/ai/internal-capture-sessions.js +31 -0
- package/dist/services/ai/opencode-diagnostics.d.ts +8 -0
- package/dist/services/ai/opencode-diagnostics.d.ts.map +1 -0
- package/dist/services/ai/opencode-diagnostics.js +36 -0
- package/dist/services/ai/opencode-host-config.d.ts +11 -0
- package/dist/services/ai/opencode-host-config.d.ts.map +1 -0
- package/dist/services/ai/opencode-host-config.js +51 -0
- package/dist/services/ai/opencode-provider-loader.d.ts +4 -0
- package/dist/services/ai/opencode-provider-loader.d.ts.map +1 -0
- package/dist/services/ai/opencode-provider-loader.js +4 -0
- package/dist/services/ai/opencode-provider.d.ts +154 -0
- package/dist/services/ai/opencode-provider.d.ts.map +1 -0
- package/dist/services/ai/opencode-provider.js +731 -0
- package/dist/services/ai/opencode-sdk-client.d.ts +7 -0
- package/dist/services/ai/opencode-sdk-client.d.ts.map +1 -0
- package/dist/services/ai/opencode-sdk-client.js +38 -0
- package/dist/services/ai/profile-llm-client.d.ts +3 -0
- package/dist/services/ai/profile-llm-client.d.ts.map +1 -0
- package/dist/services/ai/profile-llm-client.js +29 -0
- package/dist/services/ai/provider-config.d.ts +19 -0
- package/dist/services/ai/provider-config.d.ts.map +1 -0
- package/dist/services/ai/provider-config.js +36 -0
- package/dist/services/ai/providers/anthropic-messages.d.ts +35 -0
- package/dist/services/ai/providers/anthropic-messages.d.ts.map +1 -0
- package/dist/services/ai/providers/anthropic-messages.js +220 -0
- package/dist/services/ai/providers/api-route.d.ts +49 -0
- package/dist/services/ai/providers/api-route.d.ts.map +1 -0
- package/dist/services/ai/providers/api-route.js +57 -0
- package/dist/services/ai/providers/atlas-cloud.d.ts +51 -0
- package/dist/services/ai/providers/atlas-cloud.d.ts.map +1 -0
- package/dist/services/ai/providers/atlas-cloud.js +59 -0
- package/dist/services/ai/providers/base-provider.d.ts +33 -0
- package/dist/services/ai/providers/base-provider.d.ts.map +1 -0
- package/dist/services/ai/providers/base-provider.js +24 -0
- package/dist/services/ai/providers/cheaper-inference.d.ts +50 -0
- package/dist/services/ai/providers/cheaper-inference.d.ts.map +1 -0
- package/dist/services/ai/providers/cheaper-inference.js +58 -0
- package/dist/services/ai/providers/cloudgpu.d.ts +52 -0
- package/dist/services/ai/providers/cloudgpu.d.ts.map +1 -0
- package/dist/services/ai/providers/cloudgpu.js +60 -0
- package/dist/services/ai/providers/google-gemini.d.ts +16 -0
- package/dist/services/ai/providers/google-gemini.d.ts.map +1 -0
- package/dist/services/ai/providers/google-gemini.js +228 -0
- package/dist/services/ai/providers/minimax.d.ts +38 -0
- package/dist/services/ai/providers/minimax.d.ts.map +1 -0
- package/dist/services/ai/providers/minimax.js +57 -0
- package/dist/services/ai/providers/openai-chat-completion.d.ts +30 -0
- package/dist/services/ai/providers/openai-chat-completion.d.ts.map +1 -0
- package/dist/services/ai/providers/openai-chat-completion.js +532 -0
- package/dist/services/ai/providers/openai-responses.d.ts +14 -0
- package/dist/services/ai/providers/openai-responses.d.ts.map +1 -0
- package/dist/services/ai/providers/openai-responses.js +182 -0
- package/dist/services/ai/providers/orcarouter.d.ts +52 -0
- package/dist/services/ai/providers/orcarouter.d.ts.map +1 -0
- package/dist/services/ai/providers/orcarouter.js +66 -0
- package/dist/services/ai/providers/runcrate.d.ts +49 -0
- package/dist/services/ai/providers/runcrate.d.ts.map +1 -0
- package/dist/services/ai/providers/runcrate.js +57 -0
- package/dist/services/ai/session/ai-session-manager.d.ts +25 -0
- package/dist/services/ai/session/ai-session-manager.d.ts.map +1 -0
- package/dist/services/ai/session/ai-session-manager.js +180 -0
- package/dist/services/ai/session/session-types.d.ts +43 -0
- package/dist/services/ai/session/session-types.d.ts.map +1 -0
- package/dist/services/ai/session/session-types.js +1 -0
- package/dist/services/ai/tools/tool-schema.d.ts +41 -0
- package/dist/services/ai/tools/tool-schema.d.ts.map +1 -0
- package/dist/services/ai/tools/tool-schema.js +24 -0
- package/dist/services/ai/validators/user-profile-validator.d.ts +13 -0
- package/dist/services/ai/validators/user-profile-validator.d.ts.map +1 -0
- package/dist/services/ai/validators/user-profile-validator.js +114 -0
- package/dist/services/api-handlers.d.ts +277 -0
- package/dist/services/api-handlers.d.ts.map +1 -0
- package/dist/services/api-handlers.js +1740 -0
- package/dist/services/auth-token.d.ts +11 -0
- package/dist/services/auth-token.d.ts.map +1 -0
- package/dist/services/auth-token.js +44 -0
- package/dist/services/auto-capture-config-status.d.ts +15 -0
- package/dist/services/auto-capture-config-status.d.ts.map +1 -0
- package/dist/services/auto-capture-config-status.js +31 -0
- package/dist/services/auto-capture.d.ts +33 -0
- package/dist/services/auto-capture.d.ts.map +1 -0
- package/dist/services/auto-capture.js +906 -0
- package/dist/services/auto-update.d.ts +28 -0
- package/dist/services/auto-update.d.ts.map +1 -0
- package/dist/services/auto-update.js +197 -0
- package/dist/services/capture-evidence-events.d.ts +3 -0
- package/dist/services/capture-evidence-events.d.ts.map +1 -0
- package/dist/services/capture-evidence-events.js +15 -0
- package/dist/services/capture-evidence.d.ts +21 -0
- package/dist/services/capture-evidence.d.ts.map +1 -0
- package/dist/services/capture-evidence.js +168 -0
- package/dist/services/capture-tool-evidence.d.ts +21 -0
- package/dist/services/capture-tool-evidence.d.ts.map +1 -0
- package/dist/services/capture-tool-evidence.js +109 -0
- package/dist/services/cleanup-service.d.ts +26 -0
- package/dist/services/cleanup-service.d.ts.map +1 -0
- package/dist/services/cleanup-service.js +199 -0
- package/dist/services/client.d.ts +167 -0
- package/dist/services/client.d.ts.map +1 -0
- package/dist/services/client.js +535 -0
- package/dist/services/context.d.ts +15 -0
- package/dist/services/context.d.ts.map +1 -0
- package/dist/services/context.js +44 -0
- package/dist/services/cors.d.ts +13 -0
- package/dist/services/cors.d.ts.map +1 -0
- package/dist/services/cors.js +52 -0
- package/dist/services/deduplication-service.d.ts +29 -0
- package/dist/services/deduplication-service.d.ts.map +1 -0
- package/dist/services/deduplication-service.js +113 -0
- package/dist/services/dreaming-lock.d.ts +6 -0
- package/dist/services/dreaming-lock.d.ts.map +1 -0
- package/dist/services/dreaming-lock.js +84 -0
- package/dist/services/dreaming-service.d.ts +96 -0
- package/dist/services/dreaming-service.d.ts.map +1 -0
- package/dist/services/dreaming-service.js +626 -0
- package/dist/services/embedding.d.ts +92 -0
- package/dist/services/embedding.d.ts.map +1 -0
- package/dist/services/embedding.js +467 -0
- package/dist/services/injected-prompt-filter.d.ts +49 -0
- package/dist/services/injected-prompt-filter.d.ts.map +1 -0
- package/dist/services/injected-prompt-filter.js +79 -0
- package/dist/services/jsonc.d.ts +7 -0
- package/dist/services/jsonc.d.ts.map +1 -0
- package/dist/services/jsonc.js +110 -0
- package/dist/services/language-detector.d.ts +3 -0
- package/dist/services/language-detector.d.ts.map +1 -0
- package/dist/services/language-detector.js +33 -0
- package/dist/services/logger.d.ts +15 -0
- package/dist/services/logger.d.ts.map +1 -0
- package/dist/services/logger.js +171 -0
- package/dist/services/markdown/backend.d.ts +35 -0
- package/dist/services/markdown/backend.d.ts.map +1 -0
- package/dist/services/markdown/backend.js +111 -0
- package/dist/services/markdown/document.d.ts +44 -0
- package/dist/services/markdown/document.d.ts.map +1 -0
- package/dist/services/markdown/document.js +159 -0
- package/dist/services/markdown/reconcile.d.ts +26 -0
- package/dist/services/markdown/reconcile.d.ts.map +1 -0
- package/dist/services/markdown/reconcile.js +333 -0
- package/dist/services/markdown/vault.d.ts +32 -0
- package/dist/services/markdown/vault.d.ts.map +1 -0
- package/dist/services/markdown/vault.js +142 -0
- package/dist/services/markdown/watcher.d.ts +22 -0
- package/dist/services/markdown/watcher.d.ts.map +1 -0
- package/dist/services/markdown/watcher.js +131 -0
- package/dist/services/memory-portability-service.d.ts +38 -0
- package/dist/services/memory-portability-service.d.ts.map +1 -0
- package/dist/services/memory-portability-service.js +372 -0
- package/dist/services/memory-provenance.d.ts +16 -0
- package/dist/services/memory-provenance.d.ts.map +1 -0
- package/dist/services/memory-provenance.js +115 -0
- package/dist/services/memory-recall.d.ts +49 -0
- package/dist/services/memory-recall.d.ts.map +1 -0
- package/dist/services/memory-recall.js +196 -0
- package/dist/services/memory-scope.d.ts +17 -0
- package/dist/services/memory-scope.d.ts.map +1 -0
- package/dist/services/memory-scope.js +43 -0
- package/dist/services/migration-service.d.ts +43 -0
- package/dist/services/migration-service.d.ts.map +1 -0
- package/dist/services/migration-service.js +333 -0
- package/dist/services/onnxruntime-resolve.d.ts +25 -0
- package/dist/services/onnxruntime-resolve.d.ts.map +1 -0
- package/dist/services/onnxruntime-resolve.js +176 -0
- package/dist/services/privacy.d.ts +38 -0
- package/dist/services/privacy.d.ts.map +1 -0
- package/dist/services/privacy.js +156 -0
- package/dist/services/request-timeouts.d.ts +4 -0
- package/dist/services/request-timeouts.d.ts.map +1 -0
- package/dist/services/request-timeouts.js +5 -0
- package/dist/services/runtime-require.d.ts +18 -0
- package/dist/services/runtime-require.d.ts.map +1 -0
- package/dist/services/runtime-require.js +75 -0
- package/dist/services/secret-resolver.d.ts +2 -0
- package/dist/services/secret-resolver.d.ts.map +1 -0
- package/dist/services/secret-resolver.js +65 -0
- package/dist/services/shard-inventory-service.d.ts +70 -0
- package/dist/services/shard-inventory-service.d.ts.map +1 -0
- package/dist/services/shard-inventory-service.js +315 -0
- package/dist/services/shard-path-migration-service.d.ts +32 -0
- package/dist/services/shard-path-migration-service.d.ts.map +1 -0
- package/dist/services/shard-path-migration-service.js +386 -0
- package/dist/services/skills/skills-manager.d.ts +39 -0
- package/dist/services/skills/skills-manager.d.ts.map +1 -0
- package/dist/services/skills/skills-manager.js +231 -0
- package/dist/services/skills/types.d.ts +32 -0
- package/dist/services/skills/types.d.ts.map +1 -0
- package/dist/services/skills/types.js +5 -0
- package/dist/services/stats-service.d.ts +71 -0
- package/dist/services/stats-service.d.ts.map +1 -0
- package/dist/services/stats-service.js +288 -0
- package/dist/services/tags.d.ts +30 -0
- package/dist/services/tags.d.ts.map +1 -0
- package/dist/services/tags.js +245 -0
- package/dist/services/transformers-resolve.d.ts +17 -0
- package/dist/services/transformers-resolve.d.ts.map +1 -0
- package/dist/services/transformers-resolve.js +142 -0
- package/dist/services/turso/connection-manager.d.ts +66 -0
- package/dist/services/turso/connection-manager.d.ts.map +1 -0
- package/dist/services/turso/connection-manager.js +408 -0
- package/dist/services/turso/encryption-key.d.ts +17 -0
- package/dist/services/turso/encryption-key.d.ts.map +1 -0
- package/dist/services/turso/encryption-key.js +111 -0
- package/dist/services/turso/encryption-migrator.d.ts +6 -0
- package/dist/services/turso/encryption-migrator.d.ts.map +1 -0
- package/dist/services/turso/encryption-migrator.js +234 -0
- package/dist/services/turso/engine-migrator.d.ts +6 -0
- package/dist/services/turso/engine-migrator.d.ts.map +1 -0
- package/dist/services/turso/engine-migrator.js +318 -0
- package/dist/services/turso/error-classifiers.d.ts +4 -0
- package/dist/services/turso/error-classifiers.d.ts.map +1 -0
- package/dist/services/turso/error-classifiers.js +19 -0
- package/dist/services/turso/legacy-migrator.d.ts +2 -0
- package/dist/services/turso/legacy-migrator.d.ts.map +1 -0
- package/dist/services/turso/legacy-migrator.js +535 -0
- package/dist/services/turso/lifecycle.d.ts +11 -0
- package/dist/services/turso/lifecycle.d.ts.map +1 -0
- package/dist/services/turso/lifecycle.js +32 -0
- package/dist/services/turso/operation-lock.d.ts +26 -0
- package/dist/services/turso/operation-lock.d.ts.map +1 -0
- package/dist/services/turso/operation-lock.js +188 -0
- package/dist/services/turso/plugin-refs.d.ts +13 -0
- package/dist/services/turso/plugin-refs.d.ts.map +1 -0
- package/dist/services/turso/plugin-refs.js +43 -0
- package/dist/services/turso/ready.d.ts +3 -0
- package/dist/services/turso/ready.d.ts.map +1 -0
- package/dist/services/turso/ready.js +32 -0
- package/dist/services/turso/schema-migrations.d.ts +24 -0
- package/dist/services/turso/schema-migrations.d.ts.map +1 -0
- package/dist/services/turso/schema-migrations.js +367 -0
- package/dist/services/turso/shard-manager.d.ts +41 -0
- package/dist/services/turso/shard-manager.d.ts.map +1 -0
- package/dist/services/turso/shard-manager.js +419 -0
- package/dist/services/turso/sqlite-handle-release.d.ts +31 -0
- package/dist/services/turso/sqlite-handle-release.d.ts.map +1 -0
- package/dist/services/turso/sqlite-handle-release.js +101 -0
- package/dist/services/turso/turso-db.d.ts +61 -0
- package/dist/services/turso/turso-db.d.ts.map +1 -0
- package/dist/services/turso/turso-db.js +214 -0
- package/dist/services/turso/types.d.ts +52 -0
- package/dist/services/turso/types.d.ts.map +1 -0
- package/dist/services/turso/types.js +1 -0
- package/dist/services/turso/vector-search.d.ts +63 -0
- package/dist/services/turso/vector-search.d.ts.map +1 -0
- package/dist/services/turso/vector-search.js +510 -0
- package/dist/services/turso/vector-utils.d.ts +16 -0
- package/dist/services/turso/vector-utils.d.ts.map +1 -0
- package/dist/services/turso/vector-utils.js +98 -0
- package/dist/services/turso/wal-index-recovery.d.ts +51 -0
- package/dist/services/turso/wal-index-recovery.d.ts.map +1 -0
- package/dist/services/turso/wal-index-recovery.js +248 -0
- package/dist/services/update-on-capture.d.ts +77 -0
- package/dist/services/update-on-capture.d.ts.map +1 -0
- package/dist/services/update-on-capture.js +116 -0
- package/dist/services/user-memory-learning.d.ts +137 -0
- package/dist/services/user-memory-learning.d.ts.map +1 -0
- package/dist/services/user-memory-learning.js +787 -0
- package/dist/services/user-profile/ai-cleanup.d.ts +59 -0
- package/dist/services/user-profile/ai-cleanup.d.ts.map +1 -0
- package/dist/services/user-profile/ai-cleanup.js +488 -0
- package/dist/services/user-profile/learning-lock.d.ts +41 -0
- package/dist/services/user-profile/learning-lock.d.ts.map +1 -0
- package/dist/services/user-profile/learning-lock.js +619 -0
- package/dist/services/user-profile/profile-context.d.ts +2 -0
- package/dist/services/user-profile/profile-context.d.ts.map +1 -0
- package/dist/services/user-profile/profile-context.js +105 -0
- package/dist/services/user-profile/profile-utils.d.ts +17 -0
- package/dist/services/user-profile/profile-utils.d.ts.map +1 -0
- package/dist/services/user-profile/profile-utils.js +77 -0
- package/dist/services/user-profile/types.d.ts +93 -0
- package/dist/services/user-profile/types.d.ts.map +1 -0
- package/dist/services/user-profile/types.js +1 -0
- package/dist/services/user-profile/user-profile-manager.d.ts +106 -0
- package/dist/services/user-profile/user-profile-manager.d.ts.map +1 -0
- package/dist/services/user-profile/user-profile-manager.js +1793 -0
- package/dist/services/user-prompt/user-prompt-manager.d.ts +64 -0
- package/dist/services/user-prompt/user-prompt-manager.d.ts.map +1 -0
- package/dist/services/user-prompt/user-prompt-manager.js +428 -0
- package/dist/services/web-api-auth.d.ts +4 -0
- package/dist/services/web-api-auth.d.ts.map +1 -0
- package/dist/services/web-api-auth.js +24 -0
- package/dist/services/web-auth.d.ts +47 -0
- package/dist/services/web-auth.d.ts.map +1 -0
- package/dist/services/web-auth.js +105 -0
- package/dist/services/web-server.d.ts +58 -0
- package/dist/services/web-server.d.ts.map +1 -0
- package/dist/services/web-server.js +774 -0
- package/dist/shared/api/index.d.ts +5 -0
- package/dist/shared/api/index.d.ts.map +1 -0
- package/dist/shared/api/index.js +2 -0
- package/dist/shared/api/portability-schemas.d.ts +57 -0
- package/dist/shared/api/portability-schemas.d.ts.map +1 -0
- package/dist/shared/api/portability-schemas.js +39 -0
- package/dist/shared/api/schemas.d.ts +296 -0
- package/dist/shared/api/schemas.d.ts.map +1 -0
- package/dist/shared/api/schemas.js +134 -0
- package/dist/shared/api/types.d.ts +29 -0
- package/dist/shared/api/types.d.ts.map +1 -0
- package/dist/shared/api/types.js +1 -0
- package/dist/tui.d.ts +10 -0
- package/dist/tui.d.ts.map +1 -0
- package/dist/tui.js +17 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/context-limit.d.ts +11 -0
- package/dist/utils/context-limit.d.ts.map +1 -0
- package/dist/utils/context-limit.js +43 -0
- package/dist/utils/math.d.ts +8 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/math.js +48 -0
- package/dist/utils/profile.d.ts +3 -0
- package/dist/utils/profile.d.ts.map +1 -0
- package/dist/utils/profile.js +15 -0
- package/dist/v2/adapter.d.ts +3 -0
- package/dist/v2/adapter.d.ts.map +1 -0
- package/dist/v2/adapter.js +217 -0
- package/dist/v2/legacy-client.d.ts +22 -0
- package/dist/v2/legacy-client.d.ts.map +1 -0
- package/dist/v2/legacy-client.js +410 -0
- package/dist/v2/plugin.d.ts +4 -0
- package/dist/v2/plugin.d.ts.map +1 -0
- package/dist/v2/plugin.js +34 -0
- package/dist/v2/toast-rpc.d.ts +43 -0
- package/dist/v2/toast-rpc.d.ts.map +1 -0
- package/dist/v2/toast-rpc.js +26 -0
- package/dist/web/accent-preview.html +444 -0
- package/dist/web/assets/index-mTgxOb5l.css +2 -0
- package/dist/web/assets/index-ysje17yK.js +109 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +11 -0
- package/dist/web/index.html +29 -0
- package/dist/web/opencode-mem-icon.png +0 -0
- package/package.json +122 -4
package/README.md
CHANGED
|
@@ -1,3 +1,812 @@
|
|
|
1
|
-
|
|
1
|
+
> AISlop-Inc npm package: `@aislop-inc/opencode-mem`.
|
|
2
|
+
> Manual release instructions: [npm publishing](docs/NPM-PUBLISHING.md).
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# OpenCode Memory
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/@aislop-inc/opencode-mem)
|
|
7
|
+
[](https://www.npmjs.com/package/@aislop-inc/opencode-mem)
|
|
8
|
+
[](https://www.npmjs.com/package/@aislop-inc/opencode-mem)
|
|
9
|
+
[](https://github.com/tickernelz/opencode-mem)
|
|
10
|
+
[](https://opencode-mem.zhafron.my.id)
|
|
11
|
+
[](https://opencode-mem.zhafron.my.id/docs/)
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
Languages: **🇬🇧** | [🇩🇪](./.github/i18n/README.de.md) | [🇨🇳](./.github/i18n/README.zh.md) | [🇸🇦](./.github/i18n/README.ar.md) | [🇹🇷](./.github/i18n/README.tr.md) | [🇳🇱](./.github/i18n/README.nl.md)
|
|
16
|
+
|
|
17
|
+
A persistent memory system for AI coding agents that enables long-term context retention across sessions using local vector database technology.
|
|
18
|
+
|
|
19
|
+
## Core Features
|
|
20
|
+
|
|
21
|
+
- **Local database:** embedded Turso/libSQL with native vector search, stored under `storagePath`. No separate vector database.
|
|
22
|
+
- **Intelligent prompt-based memory extraction (auto-capture):** when a session goes idle, a background AI request turns the technical work into persistent project memories.
|
|
23
|
+
- **Automatic recall:** relevant memories and the user profile are injected into the model's context (`chatMessage`).
|
|
24
|
+
- **User profile learning:** a cross-project summary of your preferences, patterns and workflows.
|
|
25
|
+
- **Memory hygiene:** smart deduplication, optional update-on-capture, and optional dreaming consolidation with recoverable trash.
|
|
26
|
+
- **Multi-provider AI support:** any provider configured in OpenCode (`opencodeProvider` / `opencodeModel`), or a manual API: OpenAI Chat Completions, OpenAI Responses, Anthropic, MiniMax, OrcaRouter, Atlas Cloud, Cheaper Inference, API Route, Runcrate, CloudGPU.
|
|
27
|
+
- **Embeddings:** 12+ local embedding models on CPU (no GPU needed) or any OpenAI-compatible embeddings API.
|
|
28
|
+
- **Full-featured web UI:** unified memory–prompt timeline, user profile, skill library, Markdown vault and health stats, with optional HTTP Basic Auth.
|
|
29
|
+
- **Privacy:** `<private>` tags, credential redaction before capture, and optional encryption at rest.
|
|
30
|
+
- **Portability:** optional Markdown vault backend, and `memory` tool `export` / `import` / `migrate` for moved or copied projects.
|
|
31
|
+
|
|
32
|
+
## Memory credential redaction
|
|
33
|
+
|
|
34
|
+
Before auto-capture sends context to its configured summarization provider (including fallback),
|
|
35
|
+
the plugin removes recognizable credentials from user text, assistant text, tool inputs,
|
|
36
|
+
preserved tool-result evidence and prior-memory context. Pending prompts/evidence are sanitized
|
|
37
|
+
before persistence; generated summaries and tags are sanitized again before embedding and new
|
|
38
|
+
memory writes. The explicit memory `add` tool uses the same write boundary. This applies to
|
|
39
|
+
both Turso and plugin-created Markdown memories, without an extra model call or dependency.
|
|
40
|
+
|
|
41
|
+
Recognized formats include supported GitHub tokens, OpenAI/Anthropic/OpenRouter/Google API key
|
|
42
|
+
shapes, Slack tokens, AWS access key IDs, bearer credentials and PEM private keys, plus
|
|
43
|
+
conservative credential assignments. Replacements retain useful surrounding context. Existing
|
|
44
|
+
`<private>...</private>` protection remains: nested or unclosed regions fail closed. An unclosed
|
|
45
|
+
PEM private-key opener similarly redacts to the end of that text. Sanitization precedes capture
|
|
46
|
+
length limits so a cutoff does not leave part of a recognized credential behind. Plugin diagnostic
|
|
47
|
+
strings use the same sanitizer; matches are never reported separately.
|
|
48
|
+
|
|
49
|
+
**Limits:** this is best-effort protection for the plugin's memory copies, not OpenCode's original
|
|
50
|
+
conversation, main-model requests or tool traffic. Arbitrary passwords, all-letter bearer values,
|
|
51
|
+
custom/encoded tokens,
|
|
52
|
+
obfuscated values and credentials split across separate messages may not be recognized. Use
|
|
53
|
+
`<private>` for other sensitive text. Hashes, UUIDs and arbitrary long strings are not treated as
|
|
54
|
+
secrets. Existing stored memories are not scanned or rewritten. Web/API additions, imports,
|
|
55
|
+
user-edited Markdown reconciliation, migrations and profile/dreaming generation have separate
|
|
56
|
+
paths and are not covered by this capture/add guarantee. Content and tag edits through the
|
|
57
|
+
shared memory client are sanitized when supplied, but untouched historical fields are preserved
|
|
58
|
+
(and can still be re-embedded by existing edit behavior).
|
|
59
|
+
New capture/add content is already redacted when later searched, displayed or injected; this is
|
|
60
|
+
not a read-time scrub of historical data. Keep credentials out of memory input where possible,
|
|
61
|
+
and rotate any credential already disclosed.
|
|
62
|
+
|
|
63
|
+
## Prerequisites
|
|
64
|
+
|
|
65
|
+
This plugin uses embedded Turso (`@tursodatabase/database`) with `F32_BLOB` vectors and exact cosine search via `vector_distance_cos`. No separate vector database or custom SQLite build is required.
|
|
66
|
+
|
|
67
|
+
**Recommended runtime:**
|
|
68
|
+
|
|
69
|
+
- Bun
|
|
70
|
+
- Standard OpenCode plugin environment
|
|
71
|
+
- Internet access on first use if you use the default local embedding model, because the model is downloaded by `@huggingface/transformers`.
|
|
72
|
+
- For source/development installs, run `bun install` before building or testing. The published plugin package installs its runtime dependencies automatically through OpenCode.
|
|
73
|
+
|
|
74
|
+
**CI-tested platforms:** Linux, Windows, and macOS 15 / macOS 26 on Apple Silicon (`darwin/arm64`). **Intel Mac (`darwin/x64`) is not supported** — `@tursodatabase/database` and fixed `onnxruntime-node` releases ship no x64 native binding. Older macOS releases are not excluded by that matrix; they are simply outside the current GitHub-hosted runner set.
|
|
75
|
+
|
|
76
|
+
**Notes:**
|
|
77
|
+
|
|
78
|
+
- Vector embeddings are stored and searched directly in Turso; inserts store `F32_BLOB` vectors for exact cosine ranking.
|
|
79
|
+
- Vector search uses exact cosine distance via `vector_distance_cos` (no DiskANN / approximate index), with optional keyword hybrid ranking when a query string is provided (`@tursodatabase/database` does not ship FTS5).
|
|
80
|
+
- Session lookups use an indexed `session_id` column (backfilled from `metadata.sessionID` on schema v2).
|
|
81
|
+
- Auto-capture and user profile learning require an AI provider that can return structured/tool-call output. Memory search/add/list still work without auto-capture provider configuration.
|
|
82
|
+
|
|
83
|
+
### Hardware / resource expectations
|
|
84
|
+
|
|
85
|
+
opencode-mem does **not** require a GPU. Local embeddings run on CPU via `@huggingface/transformers` and ONNX (there is no MLX backend). Extra VRAM is not needed.
|
|
86
|
+
|
|
87
|
+
| Workload | Typical extra resources |
|
|
88
|
+
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
89
|
+
| **Local embeddings** (default `Xenova/nomic-embed-text-v1`) | About **0.5–2 GB RAM** while the model is loaded, depending on the Hugging Face id you pick. First use downloads the model; disk cache lives under `{storagePath}/.cache` (default `~/.opencode-mem/data/.cache`) and is often **hundreds of MB to ~1–2 GB** per model. |
|
|
90
|
+
| **Remote embeddings** (`embeddingApiUrl` + `embeddingApiKey`) | Negligible local ML RAM — only plugin + Turso overhead. |
|
|
91
|
+
| **Database / plugin** | Turso/libSQL on disk under `storagePath`. Size grows with how many memories you store, not with GPU memory. |
|
|
92
|
+
|
|
93
|
+
Platform limits above still apply (no Intel Mac `darwin/x64`; use Apple Silicon, Linux, Windows, or a remote embedding endpoint). See [Choosing / configuring embeddings](#choosing--configuring-embeddings).
|
|
94
|
+
|
|
95
|
+
### Upgrading from legacy SQLite shards
|
|
96
|
+
|
|
97
|
+
Startup recovers interrupted re-embed swaps, converts libSQL DiskANN indexes to the current Turso engine, and then verifies or upgrades the legacy shard schema. Engine conversion runs even when a store already has a completed legacy migration marker, and preserves stored vectors without re-embedding. Each converted database is backed up as `<database>.pre-tursodb-<timestamp>.bak`.
|
|
98
|
+
|
|
99
|
+
On macOS and Linux, multiple OpenCode sessions can share the same `storagePath` via Turso’s experimental `multiprocess_wal` (every process must use the same mode — restart all sessions after upgrading). On Windows the engine rejects that flag, so only one OpenCode session can own the memory databases at a time.
|
|
100
|
+
|
|
101
|
+
`tursoMultiprocessWal: false` opens in single-owner mode instead: other processes then fail with `database is locked` rather than sharing the store. That is the safer choice if non-plugin tools touch the same files, because a _writing_ foreign SQLite process makes Turso’s WAL index stale and its own next write is silently lost. `tursoAutoHeal` (default `true`) moves a store’s `-shm`/`-tshm` index sidecars into `storagePath/recovery/<db>-<timestamp>/` and retries once when an open fails with a stale WAL index, after verifying a copy of the main database. A non-empty `-wal` is never moved, so committed but uncheckpointed transactions survive; only an absent or 0-byte `-wal` is removed. Concurrent sessions serialise healing through `storagePath/recovery/<db>.lock`.
|
|
102
|
+
|
|
103
|
+
On first startup after upgrading, opencode-mem automatically migrates existing memory shard databases to native Turso/libSQL vector format:
|
|
104
|
+
|
|
105
|
+
- Each shard is backed up as `<shard>.db.legacy.bak` before rewrite
|
|
106
|
+
- Progress is tracked per shard in `<shard>.db.turso-migrate.json`
|
|
107
|
+
- A global marker `.turso-migrated` is written only after all shards verify successfully
|
|
108
|
+
- Normal inserts and deletes do not invalidate a completed shard migration; startup still checks that its vectors are readable and match its stored dimensions
|
|
109
|
+
- Do not run multiple OpenCode instances against the same `storagePath` during migration; a lock file (`.turso-migrate.lock`) prevents concurrent migration
|
|
110
|
+
- Manual dimension migrations use `.turso-operation.lock`; other plugin processes reject new memory writes until the migration finishes
|
|
111
|
+
- Locks expire after 30 minutes without a progress timestamp update (or file modification time if the timestamp is unavailable), even if the owning process is alive. This lease uses wall-clock time: a forward clock step greater than 30 minutes can expire a progressing operation early; a backward step or future-dated lock can extend an inert lock's life. Locks carry a unique acquisition id, and stale cleanup only removes the exact file it inspected. Migrations heartbeat as they progress and abort if they discover that ownership was lost. Stale-lock cleanup is logged for diagnosis
|
|
112
|
+
|
|
113
|
+
If migration is interrupted, the next startup resumes from the backup automatically.
|
|
114
|
+
|
|
115
|
+
If a shard becomes incompatible (for example after changing `embeddingDimensions`), writes are blocked and the original database is left untouched. Use the Web UI's re-embed migration to build and verify a replacement before it is swapped into place. The previous shard remains available as `<shard>.db.pre-reembed-<pid>-<timestamp>.bak`.
|
|
116
|
+
|
|
117
|
+
## Schema migrations
|
|
118
|
+
|
|
119
|
+
Local Turso shards and auxiliary databases (`metadata.db`, `user-prompts.db`, `user-profiles.db`, `ai-sessions.db`) are upgraded with ordered `PRAGMA user_version` migrations in `src/services/turso/schema-migrations.ts`. Migrations are idempotent: starting the plugin applies only pending versions.
|
|
120
|
+
|
|
121
|
+
## Getting Started
|
|
122
|
+
|
|
123
|
+
For OpenCode v2, add the package to the native `plugins` list:
|
|
124
|
+
|
|
125
|
+
```jsonc
|
|
126
|
+
{
|
|
127
|
+
"plugins": ["@aislop-inc/opencode-mem@latest"],
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
OpenCode also loads the package's `./tui` companion automatically so
|
|
132
|
+
auto-capture / profile / error toasts render in the TUI (server plugins
|
|
133
|
+
cannot call `ui.toast` directly). You do not need a second entry in
|
|
134
|
+
`plugins`. If you run a CLI-only TUI against a remote OpenCode server,
|
|
135
|
+
register `opencode-mem/tui` in that CLI's plugin list (for example
|
|
136
|
+
`cli.json`) so the companion can subscribe to toast RPC events.
|
|
137
|
+
|
|
138
|
+
For OpenCode v1, add the default entrypoint to your configuration at
|
|
139
|
+
`~/.config/opencode/opencode.json`:
|
|
140
|
+
|
|
141
|
+
```jsonc
|
|
142
|
+
{
|
|
143
|
+
"plugin": ["@aislop-inc/opencode-mem@latest"],
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
With `@latest` (or a semver range) and `autoUpdate: true` in `opencode-mem.jsonc` (default), the plugin clears OpenCode's cached install when a newer npm release is available and asks you to restart. Pinned versions like `@aislop-inc/opencode-mem@2.26.0` are never auto-updated.
|
|
148
|
+
|
|
149
|
+
### Automatic memory context on OpenCode v2
|
|
150
|
+
|
|
151
|
+
The v2 plugin supplies automatic memory context through the model's system context.
|
|
152
|
+
These blocks are not added to the authored user prompt or stored in the chat transcript.
|
|
153
|
+
With `chatMessage.injectOn: "first"` (the default), the session's initial context is
|
|
154
|
+
retained across user turns and model steps. With `"always"`, it is refreshed on each
|
|
155
|
+
authored user turn.
|
|
156
|
+
|
|
157
|
+
After a host or plugin restart, a resumed session rebuilds its context from the
|
|
158
|
+
current memory store on its next model request, even if no new user prompt arrives.
|
|
159
|
+
The rebuilt context may differ from the original as memories and the profile evolve.
|
|
160
|
+
Restoration does not capture a synthetic user prompt or store a second copy of the
|
|
161
|
+
memory text in OpenCode plugin storage. Compaction invalidates the cached automatic
|
|
162
|
+
context; the existing compaction-memory restoration also continues to run.
|
|
163
|
+
|
|
164
|
+
### Using a local checkout
|
|
165
|
+
|
|
166
|
+
To run the plugin from a local source checkout instead of the npm release, `bun install && bun run build` in the checkout, then point the `plugins` list at the checkout directory:
|
|
167
|
+
|
|
168
|
+
```jsonc
|
|
169
|
+
{
|
|
170
|
+
"plugins": ["/absolute/path/to/opencode-mem"],
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Point at the package root, not at `dist/` or a single file. OpenCode resolves a directory plugin by falling back to `<directory>/index` (OpenCode does not read `package.json` `exports`/`main` for a path spec on current releases), so this repository ships a thin root `index.js` that re-exports the built v2 entrypoint from `dist/plugin.js`, and a root `tui.js` that re-exports `dist/tui.js` for the TUI companion. A path to a file is rejected (`configured plugin path must be a directory`), and a directory without a root `index.js` is skipped silently.
|
|
175
|
+
|
|
176
|
+
### Optional database encryption at rest
|
|
177
|
+
|
|
178
|
+
Enable AES-256-GCM encryption for local Turso shards in `~/.config/opencode/opencode-mem.jsonc`:
|
|
179
|
+
|
|
180
|
+
```jsonc
|
|
181
|
+
{
|
|
182
|
+
"databaseEncryptionEnabled": true,
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
On first start the plugin creates `~/.config/opencode/opencode-mem-db.key` (32-byte hex key, `chmod 600`) and migrates existing plaintext shards. Override with `"databaseEncryptionKey": "env://OPENCODE_MEM_DB_KEY"` or `"file://~/path/to.key"` if you manage the key yourself. Losing the key means the encrypted databases cannot be opened. `databaseEncryptionCipher` selects the cipher: `aes256gcm` (default), `aes128gcm`, `aegis256`, `aegis256x2`, `aegis128l`, `aegis128x2` or `aegis128x4`.
|
|
187
|
+
|
|
188
|
+
**Windows:** use `%USERPROFILE%\.config\opencode\opencode.json` (for example `C:\Users\<you>\.config\opencode\opencode.json`). This plugin does **not** read `%APPDATA%` or `%LOCALAPPDATA%` for its OpenCode plugin entry — put the file under `.config\opencode` in your user profile, then restart OpenCode. If the plugin does not appear, confirm that path and restart again.
|
|
189
|
+
|
|
190
|
+
The plugin downloads automatically on next startup.
|
|
191
|
+
|
|
192
|
+
## How to use day-to-day
|
|
193
|
+
|
|
194
|
+
You do **not** need to ask OpenCode to “remember” things for the plugin to work. With the defaults, memory builds up as you work.
|
|
195
|
+
|
|
196
|
+
### Typical daily flow
|
|
197
|
+
|
|
198
|
+
1. Enable the plugin (see [Getting Started](#getting-started)) and restart OpenCode.
|
|
199
|
+
2. Configure an AI provider for auto-capture — recommended: `opencodeProvider` + `opencodeModel` (or `"opencodeModel": "inherit"`). Details under [Auto-Capture AI Provider](#auto-capture-ai-provider).
|
|
200
|
+
3. Work normally in OpenCode. When a session goes idle, auto-capture extracts memorable technical context and stores it.
|
|
201
|
+
4. In later sessions, relevant memories are injected into context (see `chatMessage` / compaction settings). Browse or edit them in the web UI at `http://127.0.0.1:4747`.
|
|
202
|
+
5. Use the `memory` tool when you want something stored or retrieved immediately (see [Usage Examples](#usage-examples)).
|
|
203
|
+
|
|
204
|
+
### Automatic vs manual memory
|
|
205
|
+
|
|
206
|
+
| Approach | When it runs | What you do |
|
|
207
|
+
| ------------------------------------------------------ | --------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
208
|
+
| **Auto-capture** (`autoCaptureEnabled: true`, default) | After conversation turns when the session goes idle | Nothing — extraction is automatic |
|
|
209
|
+
| **Manual** `memory` tool / commands | On demand | `add`, `search`, `list`, `profile`, `forget`, `list-shards`, `migrate`, `export`, `import`, `help` |
|
|
210
|
+
|
|
211
|
+
Manual search/add/list still work even if auto-capture has no provider configured. Auto-capture and user profile learning need a provider that can return structured/tool-call output.
|
|
212
|
+
|
|
213
|
+
### Memory vs AGENTS.md vs Skills
|
|
214
|
+
|
|
215
|
+
| Store in **memory** | Store in **AGENTS.md** / static docs | Store as **Skills** (web UI / `skills.db`) |
|
|
216
|
+
| -------------------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
|
217
|
+
| Project-specific decisions, bug patterns, “we tried X and it failed” | Stable rules and workflows that rarely change | Reusable procedures the agent loads on demand |
|
|
218
|
+
| User preferences discovered over sessions | Always-on coding conventions and process | Team-editable skill packs shared via the same storage |
|
|
219
|
+
| Facts that should follow you across chats | Instructions every agent should see regardless of retrieval | OpenCode-native `skill` tool (V2 plugin bridge) |
|
|
220
|
+
|
|
221
|
+
Rule of thumb: lasting always-on project instructions → `AGENTS.md`; growing work context → memory; reusable on-demand procedures → **Skills**.
|
|
222
|
+
|
|
223
|
+
#### Shared Skills (V2)
|
|
224
|
+
|
|
225
|
+
- Create/edit skills in the web explorer (**Skills** tab at `/skill-library`).
|
|
226
|
+
- Persisted in `skills.db` under the plugin storage path (not as memory vectors).
|
|
227
|
+
- On OpenCode **V2**, the plugin registers enabled skills via `ctx.skill.transform` so the agent can load them with the native `skill` tool.
|
|
228
|
+
- Optional HTTP catalog for other OpenCode instances: `"skills": ["http://127.0.0.1:4747/skills/"]` (serves `/skills/index.json` and `/skills/<id>/<id>.md` — separate from the UI path).
|
|
229
|
+
- REST: `GET/POST /api/skills`, `GET/PUT/DELETE /api/skills/:id`.
|
|
230
|
+
|
|
231
|
+
### Health stats
|
|
232
|
+
|
|
233
|
+
The web UI's **Stats** tab (at `/stats`) shows memory-system health at a glance: totals per scope, per-shard memory counts with stale/missing-shard warnings and a same-tag duplication proxy, the active user-profile version, and a 14-day activity series (captures, skipped captures, profile/compaction injections, and errors bucketed by message) parsed from the plugin's own structured logs in `~/.opencode-mem/`. It is read-only — `GET /api/stats` — and degrades per section if a database is unavailable, so it keeps reporting during incidents.
|
|
234
|
+
|
|
235
|
+
### Intelligent prompt-based memory extraction
|
|
236
|
+
|
|
237
|
+
That phrase in the feature list is **auto-capture**: after a conversation, a background AI request summarizes technical work and saves it as memory. No special prompt from you is required. It uses `opencodeProvider` / `opencodeModel` when set, otherwise the manual `memoryProvider` fallback.
|
|
238
|
+
|
|
239
|
+
Auto-capture uses bounded textual tool outcomes alongside assistant text. Invocation status is
|
|
240
|
+
not proof that a command, test, or task succeeded: summaries must distinguish plans, attempts,
|
|
241
|
+
failures, observed results and unverified claims. Useful failure/recovery lessons can be
|
|
242
|
+
remembered; routine command failures need not produce memories.
|
|
243
|
+
|
|
244
|
+
Tool results are privacy-filtered before truncation, limited to 2 KiB per result and 16 KiB
|
|
245
|
+
for the whole tool-evidence block (or less under a small context budget). Up to 32 calls are
|
|
246
|
+
retained, preserving early and recent attempts and explicitly marking omissions. File
|
|
247
|
+
attachments, arbitrary metadata and full logs are not imported. This adds no new evidence
|
|
248
|
+
store; existing deleted-session recovery bounds/expiry remain unchanged. These excerpts
|
|
249
|
+
are partial evidence, not a verifier, and model summaries can still be wrong.
|
|
250
|
+
|
|
251
|
+
Generated capture summaries are limited to 8 KiB UTF-8, with at most eight 64-byte tags.
|
|
252
|
+
Oversized responses use the existing fallback/retry path rather than silently chopping away
|
|
253
|
+
an outcome caveat; oversized update-on-capture rewrites fall back to adding the bounded draft.
|
|
254
|
+
These limits apply before memory embedding/storage, not to all provider response traffic.
|
|
255
|
+
External providers retain requests and raw responses in their existing session history
|
|
256
|
+
(seven-day default expiry), before capture validation. Tool evidence in requests is bounded,
|
|
257
|
+
but this does not bound raw provider responses; retries retain separate copies and cleanup
|
|
258
|
+
must run.
|
|
259
|
+
This is not a global database-size cap, and deleting rows need not immediately shrink DB/WAL
|
|
260
|
+
files. No historical memories or provider-history settings are changed.
|
|
261
|
+
|
|
262
|
+
### User profile
|
|
263
|
+
|
|
264
|
+
The **User Profile** is a separate, cross-project summary of how you like to work (preferences, habits). It is updated on an interval (`userProfileAnalysisInterval`, default every 10 analyzed prompts), shown in the web UI’s profile view, and readable via `memory({ mode: "profile" })`. You do not populate it by hand for normal use — profile learning fills it when a provider is ready. Output language follows `autoCaptureLanguage` (default `"auto"`, mirroring the language of your prompts), the same setting used for auto-captured memories.
|
|
265
|
+
|
|
266
|
+
**“No profile found. Keep chatting to build your profile.”** is the expected empty state, not a crash. Profile learning needs:
|
|
267
|
+
|
|
268
|
+
1. Auto-capture running with a reachable provider (`opencodeProvider` + `opencodeModel`, or a complete manual fallback with `memoryModel` + `memoryApiUrl`).
|
|
269
|
+
2. Enough session prompts since the last analysis — at least `userProfileAnalysisInterval` (default **10**).
|
|
270
|
+
3. That provider to support structured/tool-call output (same requirement as auto-capture).
|
|
271
|
+
|
|
272
|
+
If you have chatted for a while and still see the message, check that auto-capture is actually firing in the logs and that the configured provider succeeds (failed profile analysis no longer hides behind a generic empty state when the provider errors).
|
|
273
|
+
|
|
274
|
+
### Web UI
|
|
275
|
+
|
|
276
|
+
Open `http://127.0.0.1:4747` to browse the memory–prompt timeline, inspect captures, and manage the user profile. The UI has five views: **Project memories** (`/project-memories`), **User profile** (`/user-profile`), **Skill library** (`/skill-library`), **Markdown vault** (`/markdown-vault`) and **Stats** (`/stats`). Change the port with `webServerPort`, or set `webServerEnabled: false` to run without the web UI. If you bind the server beyond loopback, see [Web UI HTTP Basic Auth](#web-ui-http-basic-auth).
|
|
277
|
+
|
|
278
|
+
The timeline shows each memory and prompt once. If several capture prompts refer to one memory, its current prompt is paired with it when available on the page; earlier prompts remain visible as separate entries.
|
|
279
|
+
|
|
280
|
+
## Usage Examples
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
memory({ mode: "add", content: "Project uses microservices architecture" });
|
|
284
|
+
memory({ mode: "search", query: "architecture decisions" });
|
|
285
|
+
memory({ mode: "search", query: "architecture decisions", scope: "all-projects" });
|
|
286
|
+
memory({ mode: "profile" });
|
|
287
|
+
memory({ mode: "list", limit: 10 });
|
|
288
|
+
memory({ mode: "list-shards" });
|
|
289
|
+
memory({ mode: "migrate", fromPath: "/old/path/to/project" });
|
|
290
|
+
memory({ mode: "export", outputPath: "./memories.json" });
|
|
291
|
+
memory({ mode: "import", inputPath: "./memories.json" });
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Access the web interface at `http://127.0.0.1:4747` for visual memory browsing and management.
|
|
295
|
+
|
|
296
|
+
**Network binding security:** Keep `webServerHost` on `127.0.0.1` unless you intentionally expose the UI. Binding to `0.0.0.0` (or any non-loopback host) requires `webServerApiToken`; all `/api/*` requests must then send `Authorization: Bearer <token>` or `X-Opencode-Mem-Token`. Open the UI with `?apiToken=<token>` so the browser stores and sends it.
|
|
297
|
+
|
|
298
|
+
Dimension migrations generate every new embedding first, import them into a temporary indexed shard, verify the row count, and only then replace the original file. Failed migrations leave the source shard untouched.
|
|
299
|
+
|
|
300
|
+
## Configuration Essentials
|
|
301
|
+
|
|
302
|
+
Configure at `~/.config/opencode/opencode-mem.jsonc`:
|
|
303
|
+
|
|
304
|
+
**Windows:** `%USERPROFILE%\.config\opencode\opencode-mem.jsonc` (same `.config\opencode` directory as above — not AppData). Default storage resolves to `%USERPROFILE%\.opencode-mem\data` (the `~` form expands to your user home on Windows as well).
|
|
305
|
+
|
|
306
|
+
The plugin creates a full commented template at this path on first startup. For every setting and comment, see [`opencode-mem.example.jsonc`](opencode-mem.example.jsonc).
|
|
307
|
+
|
|
308
|
+
Commonly tuned top-level options:
|
|
309
|
+
|
|
310
|
+
| Option | Default | What it does |
|
|
311
|
+
| --------------------------------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
312
|
+
| `storagePath` | `"~/.opencode-mem/data"` | Where the memory databases live. |
|
|
313
|
+
| `webServerEnabled` / `webServerPort` / `webServerHost` | `true` / `4747` / `"127.0.0.1"` | Web UI server switch, port and bind address. |
|
|
314
|
+
| `autoCaptureEnabled` | `true` | Summarize idle sessions into memories (needs a provider, see [Auto-Capture AI Provider](#auto-capture-ai-provider)). |
|
|
315
|
+
| `similarityThreshold` / `maxMemories` | `0.6` / `10` | Minimum similarity score and maximum number of results for memory search. |
|
|
316
|
+
| `injectProfile` | `true` | Inject the user profile (preferences, patterns, workflows) into the AI context. |
|
|
317
|
+
| `deduplicationEnabled` / `deduplicationSimilarityThreshold` | `true` / `0.9` | Detect and remove duplicate memories. |
|
|
318
|
+
| `autoCleanupEnabled` / `autoCleanupRetentionDays` | `true` / `30` | At most once a day, delete prompts older than, and memories not updated within, the retention window. Pinned memories are kept. |
|
|
319
|
+
| `showAutoCaptureToasts` / `showUserProfileToasts` / `showErrorToasts` | `true` | Toasts for auto-capture, profile updates and errors. |
|
|
320
|
+
| `autoUpdate` | `true` | Clear OpenCode's cached install when a newer npm release is available. |
|
|
321
|
+
|
|
322
|
+
Profile context limits are set by `userProfileInjectPreferences` (default `5`), `userProfileInjectPatterns` (`5`), and `userProfileInjectWorkflows` (`3`). These control how many items are injected into the LLM conversation, not how many are displayed in the web UI. The legacy `maxProfileItems`, `userProfileDisplayPreferences`, `userProfileDisplayPatterns`, and `userProfileDisplayWorkflows` options are deprecated and have no effect. Existing config files still load, but you can remove these four keys.
|
|
323
|
+
|
|
324
|
+
### Markdown vault backend (`memoryBackend`)
|
|
325
|
+
|
|
326
|
+
By default memories live only in Turso under `storagePath`. Optionally set a **generic Markdown folder** as the source of truth (Obsidian/Raneto-compatible plain `.md` files — not an Obsidian-specific integration):
|
|
327
|
+
|
|
328
|
+
```jsonc
|
|
329
|
+
{
|
|
330
|
+
"memoryBackend": "markdown",
|
|
331
|
+
"markdownPath": "~/Documents/LLM-Wiki",
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Plugin-created vault files preserve capture provenance (`promptId`, `sessionID`, and `captureTimestamp`) so reindexing can restore those fields. Legacy files without them retain any corresponding metadata already in the index. Provenance already missing from both the file and the index cannot be recovered automatically.
|
|
336
|
+
|
|
337
|
+
| Key | Default | What it does |
|
|
338
|
+
| --------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
339
|
+
| `memoryBackend` | `"database"` | `"database"` keeps content in Turso. `"markdown"` uses all `.md` files under `markdownPath` as source of truth. |
|
|
340
|
+
| `markdownPath` | — | Required when `memoryBackend` is `"markdown"`. Absolute or `~/…` path to the vault folder. No separate memory subfolder — the path _is_ the store. |
|
|
341
|
+
|
|
342
|
+
When Markdown mode is on:
|
|
343
|
+
|
|
344
|
+
- Plugin-created memories are written as `{id}.md` with YAML frontmatter + body.
|
|
345
|
+
- Existing notes in the folder (any Markdown page style) are imported/indexed; Turso is only a rebuildable semantic-search index.
|
|
346
|
+
- File adds/edits/deletes are watched and re-indexed; the Web UI shows a **Markdown** sidebar page (status, file list, reindex) only in this mode.
|
|
347
|
+
- Switching to Markdown rebuilds the index from the folder. DB-only rows without a matching file are dropped only after a readable, complete scan of a nonempty vault. Export with `memory export` first if you need to keep old database memories.
|
|
348
|
+
- Reconciliation skips deletion and warns when the vault is missing, unreadable, only partially scanned or processed, or contains no Markdown files; existing indexed memories are retained. Restore or fix the vault, then reindex. To intentionally remove the final file's indexed memory, explicitly delete that memory through the tool or Web UI.
|
|
349
|
+
- A healthy, nonempty vault still permits permanent deletion of indexed memories whose files are absent. Export or back up first: these safeguards are not a backup and cannot detect an incomplete sync that appears to be a healthy, nonempty vault.
|
|
350
|
+
|
|
351
|
+
### Chat message capture and injection (`chatMessage`)
|
|
352
|
+
|
|
353
|
+
These settings live under the `chatMessage` key in `~/.config/opencode/opencode-mem.jsonc`:
|
|
354
|
+
|
|
355
|
+
| Option | Default | What it does |
|
|
356
|
+
| ------------------------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
357
|
+
| `enabled` | `true` | Capture authored user prompts and inject memory context. |
|
|
358
|
+
| `injectOn` | `"first"` | For `recall: "recent"`, inject on the first user message or on `"always"` every authored turn. With `recall: "relevant"` / `"both"`, context always refreshes each authored turn (issue #460). |
|
|
359
|
+
| `recall` | `"relevant"` | How injected memories are chosen: `"relevant"` embeds the user message and runs vector search each turn; `"recent"` keeps the legacy newest-N listing; `"both"` prefers relevant then fills remaining slots with recent. |
|
|
360
|
+
| `recallScope` | `"default"` | Scope for auto-recall: `"default"` follows `memory.defaultScope`, or force `"project"` / `"all-projects"`. When searching all projects, hits from the current project get a small similarity boost. |
|
|
361
|
+
| `similarityThreshold` | (top-level) | Optional per-inject floor; otherwise uses the top-level `similarityThreshold`. |
|
|
362
|
+
| `maxMemories` / `excludeCurrentSession` / `maxAgeDays` | `3` / `true` / — | How many memories the injected context holds, whether memories captured in the current session are excluded, and an optional age cutoff in days. |
|
|
363
|
+
| `filterInjectedPrompts` | `true` | Skip prompt text injected by the host or by other OpenCode plugins (system reminders, orchestration directives, background-task notifications) so it is never stored as if the user had typed it. |
|
|
364
|
+
| `injectionMarkers` | built-ins | Extra markers identifying injected blocks; added to the built-in list, never replacing it. |
|
|
365
|
+
| `captureChildSessions` | `false` | Capture prompts from orchestrator child sessions (sessions with a `parentID`, e.g. OpenCode task/subagent children). Their "user" messages are written by the parent agent, not by you, so by default they are not stored, auto-captured, used for profile learning, or given injected memory context. |
|
|
366
|
+
|
|
367
|
+
Session and age exclusions are applied before the injected memory limit, so excluded
|
|
368
|
+
memories do not consume slots that could hold eligible memories. Setting
|
|
369
|
+
`chatMessage.maxMemories` to `0` disables project-memory injection while still allowing
|
|
370
|
+
the user profile to be injected when enabled.
|
|
371
|
+
|
|
372
|
+
Injected memory tags identify `selection="recent"` or `selection="semantic"`.
|
|
373
|
+
Recent selections (including fallback and recent fill in `both`) have no
|
|
374
|
+
numeric score. Semantic selections carry a finite `retrieval_score` when available;
|
|
375
|
+
this is a ranking signal that can include the current-project boost, not a probability
|
|
376
|
+
of relevance or factual correctness. Missing or invalid scores are omitted. This
|
|
377
|
+
replaces the former `relevance="...%"` prompt attribute without changing memory
|
|
378
|
+
selection, ordering, content, or provenance. Compaction retains its existing format.
|
|
379
|
+
|
|
380
|
+
When semantic recall fails (for example, embedding is unavailable), `relevant` and
|
|
381
|
+
`both` fall back to the existing recent listing with the same scope, count, session,
|
|
382
|
+
and age restrictions. A successful search with no eligible matches stays empty in
|
|
383
|
+
`relevant`; `both` still fills from recent as usual. Partial-shard warnings do not
|
|
384
|
+
trigger failure fallback. If recent fallback also fails, recall remains empty and
|
|
385
|
+
nonfatal. Missing-query fallback and per-turn refresh behavior are unchanged.
|
|
386
|
+
|
|
387
|
+
### Update-on-capture (optional)
|
|
388
|
+
|
|
389
|
+
Opt-in path that keeps memories current as facts change. When `updateOnCaptureEnabled` is
|
|
390
|
+
`true`, auto-capture embeds the new summary, searches for similar memories above
|
|
391
|
+
`updateOnCaptureSimilarityThreshold` (default `0.75`), and asks the capture model to
|
|
392
|
+
choose `add`, `update` (rewrite in place), or `supersede` (save new + soft-delete old into
|
|
393
|
+
trash). Pinned memories are skipped. Default is off so existing installs keep add-only
|
|
394
|
+
behavior.
|
|
395
|
+
|
|
396
|
+
```jsonc
|
|
397
|
+
"updateOnCaptureEnabled": true,
|
|
398
|
+
"updateOnCaptureSimilarityThreshold": 0.75,
|
|
399
|
+
"updateOnCaptureMaxCandidates": 5,
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
Tip: with `Xenova/nomic-embed-text-v1`, enabling `embeddingUseTaskPrefixes: true` (and
|
|
403
|
+
optionally lowering recall `similarityThreshold`) often improves match quality for longer
|
|
404
|
+
memories. Prefixes stay opt-in by default.
|
|
405
|
+
|
|
406
|
+
### Dreaming (optional memory consolidation)
|
|
407
|
+
|
|
408
|
+
Opt-in background pass that finds **related** memories (via `dreaming.relatedThreshold`,
|
|
409
|
+
default `0.75`, independent of `deduplicationSimilarityThreshold`), asks the configured
|
|
410
|
+
`opencodeProvider` / `opencodeModel` (with `memoryModel` / `memoryApiUrl` as fallback,
|
|
411
|
+
same channel order as auto-capture) to `merge`, `update`, `supersede`, `keep`, or `flag`
|
|
412
|
+
contradictions, and soft-deletes superseded rows into recoverable trash. Pinned memories
|
|
413
|
+
are never touched. Set `dreaming.crossProject: true` (or `memory.defaultScope:
|
|
414
|
+
"all-projects"`) to group across project tags; user-scope stays separate. Configure under
|
|
415
|
+
`dreaming` in `opencode-mem.jsonc`. `dreaming.enabled` (default `false`) gates only the
|
|
416
|
+
scheduled background run — the web UI **Dream** button and `POST /api/dreaming/run` still
|
|
417
|
+
work when it is false (manual-only mode). Soft-deleted rows are hard-purged after
|
|
418
|
+
`dreaming.trashRetentionDays` during normal cleanup. The web UI also exposes **Trash**
|
|
419
|
+
(restore).
|
|
420
|
+
|
|
421
|
+
### Choosing / configuring embeddings
|
|
422
|
+
|
|
423
|
+
Embeddings power similarity search for memories and the user profile. Configure them in the same file (`~/.config/opencode/opencode-mem.jsonc`). There is **no MLX backend** — local embeddings use `@huggingface/transformers` with ONNX, not Apple MLX.
|
|
424
|
+
|
|
425
|
+
**Local (default):** set only `embeddingModel`. On first use the model is downloaded from Hugging Face and cached under `{storagePath}/.cache` (default `~/.opencode-mem/data/.cache`). The weights stay resident for the life of the host process; set `embeddingIdleTimeoutMs` to release them after that many idle milliseconds, and the next memory operation re-warms them from the local cache (about a second, not a re-download).
|
|
426
|
+
|
|
427
|
+
**Remote (OpenAI-compatible):** set both `embeddingApiUrl` and `embeddingApiKey`. The plugin then calls `{embeddingApiUrl}/embeddings` with a Bearer token. `embeddingApiKey` accepts the same secret formats as `memoryApiKey` (`literal`, `env://…`, `file://…`).
|
|
428
|
+
|
|
429
|
+
| Key | Role |
|
|
430
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
431
|
+
| `embeddingModel` | Hugging Face id (local) or API model name (remote). Default: `Xenova/nomic-embed-text-v1` |
|
|
432
|
+
| `embeddingDimensions` | Optional override; usually omit — dimensions are looked up from a built-in map |
|
|
433
|
+
| `embeddingPooling` | Local pooling: `"mean"` (default), `"cls"`, or `"last_token"`. Unset → small known-model preset or `"mean"` |
|
|
434
|
+
| `embeddingQueryPrefix` | Prefix for query-task embeddings. Unset → model preset or Nomic when `embeddingUseTaskPrefixes` is true. Explicit `""` disables |
|
|
435
|
+
| `embeddingDocumentPrefix` | Prefix for document-task embeddings (same resolution rules as `embeddingQueryPrefix`) |
|
|
436
|
+
| `embeddingUseTaskPrefixes` | Opt-in Nomic `search_query:` / `search_document:` prefixes when custom/preset prefixes are unset. Default `false` |
|
|
437
|
+
| `embeddingDtype` | Optional local ONNX dtype override (e.g. `"q8"`, `"fp32"`). When set, passed to transformers.js `pipeline({ dtype })` |
|
|
438
|
+
| `embeddingIdleTimeoutMs` | Release the local model after this many idle milliseconds (e.g. `600000` for 10 minutes). `0` (default) keeps it loaded for the process lifetime |
|
|
439
|
+
| `embeddingApiUrl` | Base URL for an OpenAI-compatible embeddings API (no trailing path beyond `/v1`) |
|
|
440
|
+
| `embeddingApiKey` | API key for that endpoint (required together with `embeddingApiUrl`) |
|
|
441
|
+
|
|
442
|
+
Recommended local models:
|
|
443
|
+
|
|
444
|
+
| Model | Dims | Notes |
|
|
445
|
+
| ------------------------------------ | ---- | ------------------------------------------------- |
|
|
446
|
+
| `Xenova/nomic-embed-text-v1` | 768 | Default; multilingual, 8192 context; mean pooling |
|
|
447
|
+
| `Xenova/jina-embeddings-v2-base-en` | 768 | English-only, 8192 context |
|
|
448
|
+
| `Xenova/jina-embeddings-v2-small-en` | 512 | Faster, 8192 context |
|
|
449
|
+
| `Xenova/all-MiniLM-L6-v2` | 384 | Very fast, 512 context |
|
|
450
|
+
| `Xenova/all-mpnet-base-v2` | 768 | Good quality, 512 context |
|
|
451
|
+
| `Xenova/bge-m3` | 1024 | Multilingual; auto CLS pooling |
|
|
452
|
+
| `intfloat/multilingual-e5-large` | 1024 | Auto `query:` / `passage:` prefixes |
|
|
453
|
+
|
|
454
|
+
Example — remote OpenAI embeddings:
|
|
455
|
+
|
|
456
|
+
```jsonc
|
|
457
|
+
{
|
|
458
|
+
"embeddingApiUrl": "https://api.openai.com/v1",
|
|
459
|
+
"embeddingApiKey": "env://OPENAI_API_KEY",
|
|
460
|
+
"embeddingModel": "text-embedding-3-small",
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Example — local bge-m3 (pooling defaults to CLS via preset; override if needed):
|
|
465
|
+
|
|
466
|
+
```jsonc
|
|
467
|
+
{
|
|
468
|
+
"embeddingModel": "Xenova/bge-m3",
|
|
469
|
+
// "embeddingPooling": "cls",
|
|
470
|
+
// "embeddingDtype": "q8",
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
Changing `embeddingModel`, dimensions, pooling, or task prefixes can require re-embedding stored memories so store and query vectors stay aligned. Prefer picking a model (and pooling/prefix settings) once and sticking with them for a given data directory.
|
|
475
|
+
|
|
476
|
+
**Unsupported — Intel Mac (`darwin/x64`):** Local persistence requires `@tursodatabase/database`, which does not publish an Intel Mac native binding. Fixed `onnxruntime-node` releases (`1.24.1+`, including the pinned `1.31.1`) also lack darwin/x64. Use an Apple Silicon Mac, Linux, or Windows, or a remote endpoint via `embeddingApiUrl` + `embeddingApiKey` (example above). On supported platforms, `opencode-mem` pins `onnxruntime-node@1.31.1` (Ort::Env teardown fix from `1.24.1` / #225) and loads transformers through a CJS resolve shim so OpenCode nested installs keep that binding. Transformers is resolved to an absolute path before that shim is installed so OpenCode's Bun `--compile` host does not fail with `Cannot find module '@huggingface/transformers' from ''`. After upgrading, clear OpenCode's nested plugin cache (`~/.cache/opencode/packages/@aislop-inc/opencode-mem@*`) and reinstall.
|
|
477
|
+
|
|
478
|
+
### Memory Scope
|
|
479
|
+
|
|
480
|
+
- `scope: "project"`: query only the current project. This is the default.
|
|
481
|
+
- `scope: "all-projects"`: query `search` / `list` across all project shards.
|
|
482
|
+
- `memory.defaultScope` sets the default query scope when no explicit scope is provided.
|
|
483
|
+
|
|
484
|
+
### Web UI HTTP Basic Auth
|
|
485
|
+
|
|
486
|
+
When `webServerHost` is set to anything other than loopback (for example `0.0.0.0`), the web UI is reachable by anyone on the network. To keep your memories off the LAN, gate the web server with HTTP Basic Auth via the same config file used for everything else:
|
|
487
|
+
|
|
488
|
+
```jsonc
|
|
489
|
+
{
|
|
490
|
+
"webServerHost": "0.0.0.0", // optional: reach the UI from the LAN
|
|
491
|
+
"webServerAuthPassword": "pick-a-strong-one",
|
|
492
|
+
"webServerAuthUsername": "admin", // optional, defaults to the current OS user
|
|
493
|
+
}
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
| Field | Default | Effect |
|
|
497
|
+
| ----------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
498
|
+
| `webServerAuthPassword` | _(empty)_ | When set, the server demands HTTP Basic Auth credentials on every request. Leave empty to keep the open-by-default behavior. |
|
|
499
|
+
| `webServerAuthUsername` | OS user (`$USER`) | Username required by the Basic Auth challenge. |
|
|
500
|
+
|
|
501
|
+
`webServerAuthPassword` accepts the same secret formats as `memoryApiKey`:
|
|
502
|
+
|
|
503
|
+
- a literal string (simple, fine for personal machines),
|
|
504
|
+
- `env://SOME_ENV_VAR` to pull the value from the environment at startup,
|
|
505
|
+
- `file:///path/to/secret` to read it from a file (`chmod 600` recommended — the plugin will warn if the file is world-readable).
|
|
506
|
+
|
|
507
|
+
The browser will pop its native Basic Auth dialog and remember the credentials for the current session; closing all browser windows discards them, so reopening the browser requires signing in again. Credentials are compared with a constant-time check, and the unauthenticated 401 response carries `Cache-Control: no-store` so no intermediate cache will replay it. CORS is also relaxed once auth is on, so other tools on the same LAN can talk to the API after authenticating.
|
|
508
|
+
|
|
509
|
+
### Sharing One Project Memory Across Nested Repos
|
|
510
|
+
|
|
511
|
+
By default a project is identified by its enclosing git repository, so every
|
|
512
|
+
physical git repo gets its own isolated memory store. That is wrong for
|
|
513
|
+
multi-repo workspaces — trees managed by Google [`repo`](https://gerrit.googlesource.com/git-repo/+/HEAD/Docs/manual-repo.md),
|
|
514
|
+
monorepos, or any layout where several nested git repositories belong to one
|
|
515
|
+
logical project — because each sub-repository would be siloed.
|
|
516
|
+
|
|
517
|
+
Drop an empty **`.opencode-mem-project`** marker file at the workspace root:
|
|
518
|
+
|
|
519
|
+
```
|
|
520
|
+
my-workspace/
|
|
521
|
+
├── .opencode-mem-project ← workspace root
|
|
522
|
+
├── kernel/ (own git repo)
|
|
523
|
+
├── userspace/ (own git repo)
|
|
524
|
+
└── tools/ (own git repo)
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Every session started anywhere underneath the marker then resolves onto that
|
|
528
|
+
root and shares one memory store, regardless of which sub-repo the working
|
|
529
|
+
directory lives in:
|
|
530
|
+
|
|
531
|
+
```sh
|
|
532
|
+
touch ~/my-workspace/.opencode-mem-project
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
The marker is looked up by walking up from the working directory that every
|
|
536
|
+
code path already passes in (the plugin's working directory, the web API's
|
|
537
|
+
`process.cwd()`), so identity is **directory-driven and process-independent**.
|
|
538
|
+
It does not rely on environment variables or a global config value, which
|
|
539
|
+
would be unreliable here: opencode-mem runs across multiple opencode processes
|
|
540
|
+
that share a single web server, and only some of those processes carry a
|
|
541
|
+
given env var. With the marker, the project root is always derived from where
|
|
542
|
+
the session actually runs.
|
|
543
|
+
|
|
544
|
+
The marker takes precedence over git detection. When it is present, the
|
|
545
|
+
sub-repo's own git remote is intentionally ignored (it would describe only one
|
|
546
|
+
nested repository). Without a marker, behavior is unchanged (git-based
|
|
547
|
+
identity).
|
|
548
|
+
|
|
549
|
+
### Moving or Recovering Project Memories
|
|
550
|
+
|
|
551
|
+
opencode-mem keys project shards by a hash of the project identity. Moving a
|
|
552
|
+
repository (OS migration, path reorganization, switching from a Windows mount
|
|
553
|
+
to a native path) can therefore orphan the old shard under
|
|
554
|
+
`~/.opencode-mem/data/projects/` while a new empty shard is created for the
|
|
555
|
+
new path.
|
|
556
|
+
|
|
557
|
+
These are OpenCode `memory` tool calls with JSON arguments, not commands to
|
|
558
|
+
run in a terminal. The issue-style `memory migrate --from ...` notation maps
|
|
559
|
+
to `memory({ mode: "migrate", fromPath: "..." })`.
|
|
560
|
+
|
|
561
|
+
**1. Local move when you still know the old path**
|
|
562
|
+
|
|
563
|
+
Open OpenCode in the **new** project directory. The target project must not
|
|
564
|
+
already contain memories (migration aborts unchanged on conflict). Preview the
|
|
565
|
+
detected source, destination, and file actions before changing anything:
|
|
566
|
+
|
|
567
|
+
```typescript
|
|
568
|
+
memory({ mode: "migrate", fromPath: "/old/path/to/project", dryRun: true });
|
|
569
|
+
memory({ mode: "migrate", fromPath: "/old/path/to/project" });
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
For safety, migration refuses a source whose stored project directory still
|
|
573
|
+
exists. If you intentionally want to move an active source, inspect the dry-run
|
|
574
|
+
output first and then pass `allowLinkedSource: true`. Original source shard
|
|
575
|
+
files are retained as timestamped `*.pre-path-migrate-*.bak` backups.
|
|
576
|
+
|
|
577
|
+
**2. Old path is gone — discover the orphaned shard first**
|
|
578
|
+
|
|
579
|
+
```typescript
|
|
580
|
+
memory({ mode: "list-shards" });
|
|
581
|
+
memory({ mode: "migrate", fromHash: "fa645294d88bbae2" });
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
`list-shards` reports each project hash, stored `projectPath`, memory count,
|
|
585
|
+
and status (`current`, `linked`, `orphaned`, `missing-file`, `empty`, or
|
|
586
|
+
`ambiguous`). `fromHash` is the 16-character lowercase hexadecimal `scopeHash`
|
|
587
|
+
returned by this call. Prefer it when the old directory no longer exists or
|
|
588
|
+
multiple shards contain the same stored path, because git-based identities
|
|
589
|
+
cannot always be recomputed from a missing path.
|
|
590
|
+
|
|
591
|
+
**3. Cross-machine backup / restore**
|
|
592
|
+
|
|
593
|
+
```typescript
|
|
594
|
+
// on the source machine / old checkout
|
|
595
|
+
memory({ mode: "export", outputPath: "./memories.json" });
|
|
596
|
+
|
|
597
|
+
// on the destination machine / new checkout
|
|
598
|
+
memory({ mode: "import", inputPath: "./memories.json", dryRun: true });
|
|
599
|
+
memory({ mode: "import", inputPath: "./memories.json" });
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
Export writes a versioned JSON document without vectors. Import remaps the
|
|
603
|
+
memories onto the current project and recomputes embeddings with the currently
|
|
604
|
+
configured model. Import adds memories to an existing project, but duplicate
|
|
605
|
+
memory IDs abort the whole import before writing; this differs from `migrate`,
|
|
606
|
+
which requires an empty target.
|
|
607
|
+
|
|
608
|
+
Export files are plaintext and can contain memory content, user names/email
|
|
609
|
+
addresses, repository URLs, and absolute project paths. Store them like other
|
|
610
|
+
sensitive backups and delete them when no longer needed. Fully private entries
|
|
611
|
+
are omitted, and user profiles and prompt history are not included. The
|
|
612
|
+
document contains `schemaVersion: 1`; imports reject newer unsupported schema
|
|
613
|
+
versions rather than guessing.
|
|
614
|
+
|
|
615
|
+
### Auto-Capture AI Provider
|
|
616
|
+
|
|
617
|
+
Auto-capture runs a background AI request to summarize technical work and save it as memory. It needs one of the provider configurations below.
|
|
618
|
+
|
|
619
|
+
**Recommended:** Use a provider that is already authenticated in opencode and supports structured output:
|
|
620
|
+
|
|
621
|
+
```jsonc
|
|
622
|
+
"opencodeProvider": "anthropic",
|
|
623
|
+
"opencodeModel": "claude-haiku-4-5-20251001",
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
The plugin issues structured-output requests to opencode's session API instead of calling provider endpoints directly, so opencode owns the auth, token refresh, and provider routing. The provider name must match an entry from `opencode providers list`, and the selected model must support structured JSON output through opencode.
|
|
627
|
+
|
|
628
|
+
Optionally pin a model reasoning variant with `"opencodeVariant": "xhigh"` (e.g. for grok-4.7). It is applied to the plugin's internal LLM calls (auto-capture summaries, profile learning, profile cleanup), including when `opencodeModel` is `"inherit"`, so background work can use a different reasoning level than the interactive session.
|
|
629
|
+
|
|
630
|
+
Slow reasoning models (or very large profile prompts) can exceed the default 90 s structured-output budget. Set `"opencodeTimeoutMs"` (milliseconds) to extend it for internal structured-output calls (auto-capture summaries, profile learning) — e.g. `"opencodeTimeoutMs": 180000` for 3 minutes. Values are clamped to 10000..600000; the default stays 90000. Numeric strings are coerced. Profile cleanup uses a separate, longer timeout.
|
|
631
|
+
|
|
632
|
+
Supported providers: any provider listed by `opencode providers list` (e.g. `anthropic`, `openai`, `github-copilot`, `openrouter`, ...).
|
|
633
|
+
|
|
634
|
+
**Built-in Free / Zen models** under provider id `opencode` (e.g. `big-pickle`) often cannot run the plugin’s internal structured-output sessions — OpenCode may reject them outside interactive chat. Prefer an authenticated provider from `opencode providers list`, or use `"opencodeModel": "inherit"` so capture follows the model you already use in the session.
|
|
635
|
+
|
|
636
|
+
If `autoCaptureEnabled` is `true` (default) but neither `opencodeProvider`/`opencodeModel` nor a complete manual fallback is configured, the plugin logs a warning and shows a startup toast (when `showErrorToasts` is enabled) so missing config is visible without digging through logs.
|
|
637
|
+
|
|
638
|
+
If `opencodeProvider` and `opencodeModel` are set, they take precedence over the manual `memoryProvider` settings below by default (`"autoCaptureProviderOrder": "opencode-first"`). Set `"autoCaptureProviderOrder": "external-first"` to prefer the manual API when both are configured (useful when the host session API is busy/slow); the other channel is used as fallback. Lower `"opencodeTimeoutMs"` to fail over from the opencode channel sooner.
|
|
639
|
+
|
|
640
|
+
**Follow the session model:** set `"opencodeModel": "inherit"` to use a concrete OpenCode model at call time instead of a pinned id. For **auto-capture**, each prompt is recorded via the `chat.params` hook and the capture request reuses that prompt's provider/model. For **profile learning** and other structured-output paths (which are not tied to a single user message), `inherit` first reuses the last model the host reported on `chat.params` / the V2 context hook, then falls back to OpenCode's `model.json` recent list when present (preferring the configured `opencodeProvider`). OpenCode v2 no longer writes `model.json`, so the in-process session model is the primary fallback there. Sending the literal model id `inherit` is never valid and previously caused `ProviderModelNotFoundError: Model not found: <provider>/inherit` on those paths. `opencodeProvider` is still required as the normal config gate.
|
|
641
|
+
|
|
642
|
+
**Fallback:** Manual API configuration (if not using opencodeProvider):
|
|
643
|
+
|
|
644
|
+
```jsonc
|
|
645
|
+
"memoryProvider": "openai-chat",
|
|
646
|
+
"memoryModel": "gpt-4o-mini",
|
|
647
|
+
"memoryApiUrl": "https://api.openai.com/v1",
|
|
648
|
+
"memoryApiKey": "sk-...",
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
**API Key Formats:**
|
|
652
|
+
|
|
653
|
+
```jsonc
|
|
654
|
+
"memoryApiKey": "sk-..."
|
|
655
|
+
"memoryApiKey": "file://~/.config/opencode/api-key.txt"
|
|
656
|
+
"memoryApiKey": "env://OPENAI_API_KEY"
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
Manual `memoryProvider` modes:
|
|
660
|
+
|
|
661
|
+
- `openai-chat`: OpenAI Chat Completions compatible API with tool/function calling. This can work with compatible proxies such as LiteLLM only when the selected upstream model and proxy preserve tool calls.
|
|
662
|
+
- `openai-responses`: OpenAI Responses API with function-call output.
|
|
663
|
+
- `anthropic`: Anthropic Messages API with tool use.
|
|
664
|
+
- `minimax`: MiniMax Anthropic Messages-compatible endpoint. Set `memoryApiUrl` to the global endpoint (`https://api.minimax.io`) or the [China endpoint](https://platform.minimaxi.com/docs/api-reference/text-anthropic-api.md) (`https://api.minimax.cn`); the `/anthropic/v1/messages` path and `x-api-key` header are applied automatically. Use `MiniMax-M3.1-Flash` (recommended) or `MiniMax-M3`, both with a 1,000,000-token context. Flash always thinks; optionally set `memoryExtraParams` to `{ "output_config": { "effort": "max" } }` with `low`, `medium`, `high`, `xhigh`, or `max` (default). Flash rejects disabled thinking and effort `none`, and does not support `service_tier`. M3 thinking is off by default on this endpoint; enable it with `{ "thinking": { "type": "adaptive" } }`. Model IDs remain explicitly configured; existing custom or legacy IDs are passed through unchanged. See the [MiniMax compatibility reference](https://platform.minimax.io/docs/api-reference/text-anthropic-api.md).
|
|
665
|
+
- `orcarouter`: OpenAI-compatible model gateway with namespaced model IDs. `memoryApiUrl` and `memoryModel` are optional — they default to `https://api.orcarouter.ai/v1` and `orcarouter/auto` (a routing alias that selects a capable model per request). If you set `memoryModel`, use a namespaced ID such as `openai/gpt-5.5` or `deepseek/deepseek-v4-flash`; OrcaRouter rejects bare model names. Example:
|
|
666
|
+
```jsonc
|
|
667
|
+
"memoryProvider": "orcarouter",
|
|
668
|
+
"memoryApiKey": "<OrcaRouter API key>",
|
|
669
|
+
```
|
|
670
|
+
[OrcaRouter](https://www.orcarouter.ai) also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.
|
|
671
|
+
- `atlas-cloud`: OpenAI-compatible Chat Completions preset for [Atlas Cloud](https://www.atlascloud.ai). `memoryApiUrl` and `memoryModel` are optional — they default to `https://api.atlascloud.ai/v1` and `deepseek-ai/deepseek-v4-pro`. If `memoryApiKey` is omitted, `ATLASCLOUD_API_KEY` from the environment is used. Example:
|
|
672
|
+
```jsonc
|
|
673
|
+
"memoryProvider": "atlas-cloud",
|
|
674
|
+
"memoryApiKey": "env://ATLASCLOUD_API_KEY",
|
|
675
|
+
```
|
|
676
|
+
When this provider is selected, auto-capture / profile prompts, model responses, and relevant conversation context are transmitted to `https://api.atlascloud.ai`.
|
|
677
|
+
- `cheaper-inference`: OpenAI-compatible Chat Completions preset for [Cheaper Inference](https://cheaperinference.com). `memoryApiUrl` and `memoryModel` are optional — they default to `https://api.cheaperinference.com/v1` and `gpt-5.4-mini`. If `memoryApiKey` is omitted, `CHEAPER_INFERENCE_API_KEY` from the environment is used. Example:
|
|
678
|
+
```jsonc
|
|
679
|
+
"memoryProvider": "cheaper-inference",
|
|
680
|
+
"memoryApiKey": "env://CHEAPER_INFERENCE_API_KEY",
|
|
681
|
+
```
|
|
682
|
+
When this provider is selected, auto-capture / profile prompts, model responses, and relevant conversation context are transmitted to `https://api.cheaperinference.com`.
|
|
683
|
+
- `api-route`: OpenAI-compatible Chat Completions preset for [API Route](https://www.api-route.com/en/docs/quickstart). `memoryApiUrl` and `memoryModel` are optional — they default to `https://global.api-route.com/v1` and `gpt-6.1-sol`. If `memoryApiKey` is omitted, `API_ROUTE_API_KEY` from the environment is used. Example:
|
|
684
|
+
```jsonc
|
|
685
|
+
"memoryProvider": "api-route",
|
|
686
|
+
"memoryApiKey": "env://API_ROUTE_API_KEY",
|
|
687
|
+
```
|
|
688
|
+
When this provider is selected, auto-capture / profile prompts, model responses, and relevant conversation context are transmitted to `https://global.api-route.com`.
|
|
689
|
+
- `runcrate`: OpenAI-compatible Chat Completions preset for [Runcrate](https://www.runcrate.ai). `memoryApiUrl` and `memoryModel` are optional — they default to `https://api.runcrate.ai/v1` and `deepseek-ai/DeepSeek-V4.1-Flash`. If `memoryApiKey` is omitted, `RUNCRATE_API_KEY` from the environment is used. Example:
|
|
690
|
+
```jsonc
|
|
691
|
+
"memoryProvider": "runcrate",
|
|
692
|
+
"memoryApiKey": "env://RUNCRATE_API_KEY",
|
|
693
|
+
```
|
|
694
|
+
When this provider is selected, auto-capture / profile prompts, model responses, and relevant conversation context are transmitted to `https://api.runcrate.ai`.
|
|
695
|
+
- `cloudgpu`: OpenAI-compatible Chat Completions preset for [CloudGPU](https://cloudgpu.app). `memoryApiUrl` and `memoryModel` are optional — they default to `https://cloudgpu.app/v1` and `deepseek-v4.1-flash`. If `memoryApiKey` is omitted, `CLOUDGPU_API_KEY` from the environment is used (create a key at https://cloudgpu.app/api/console; API docs: https://cloudgpu.app/api/docs). Example:
|
|
696
|
+
```jsonc
|
|
697
|
+
"memoryProvider": "cloudgpu",
|
|
698
|
+
"memoryApiKey": "env://CLOUDGPU_API_KEY",
|
|
699
|
+
```
|
|
700
|
+
When this provider is selected, auto-capture / profile prompts, model responses, and relevant conversation context are transmitted to `https://cloudgpu.app`.
|
|
701
|
+
|
|
702
|
+
Troubleshooting:
|
|
703
|
+
|
|
704
|
+
- Auto-capture failures do not block manual `memory` tool usage.
|
|
705
|
+
- Auto-capture preserves bounded final assistant text and terminal tool outcomes from
|
|
706
|
+
delivered V1/V2 events before the delayed summarization runs. Normal idle capture still
|
|
707
|
+
prefers the live host transcript; ready pending evidence is the fallback when the session
|
|
708
|
+
is already gone (deletion or startup replay). Recovery is scoped to the same project
|
|
709
|
+
and uses the normal capture provider and claim queue. It does not infer completed work
|
|
710
|
+
from the request alone. Deleting an OpenCode session does **not** delete this pending
|
|
711
|
+
memory evidence or already captured memories.
|
|
712
|
+
- Pending evidence is private-tag redacted before persistence (including tags spanning
|
|
713
|
+
final text parts within one assistant message); reasoning, attachments, raw provider
|
|
714
|
+
metadata, streaming deltas, and tool arguments are excluded. Limits are 16 KiB per
|
|
715
|
+
part, 16 parts per prompt, 256 parts globally (at most 4 MiB of text), and 64 KiB per
|
|
716
|
+
capture. Truncation is marked; oldest parts are evicted when the budget is exceeded.
|
|
717
|
+
Evidence expires after 24 hours and is pruned on subsequent store access. It is cleared
|
|
718
|
+
when capture finishes/skips or its prompt is removed by existing deletion/retention
|
|
719
|
+
paths. These are logical retention limits, not secure erasure of SQLite/WAL backups.
|
|
720
|
+
- V2 events are a volatile stream: disconnected/missed events, unresolvable prompt
|
|
721
|
+
association, and evidence lost to expiry/eviction cannot be recovered. The guarantee
|
|
722
|
+
is capture from evidence received, saved, and checkpointed ready by an idle/deleted
|
|
723
|
+
event, not reconstruction of unseen or previously deleted transcripts. After that
|
|
724
|
+
checkpoint the session is sealed against late rebinds until the next authored user
|
|
725
|
+
input (V2 `session.inbox.delivered`, V1 user `message.updated`), so buffered parts
|
|
726
|
+
cannot flip ready evidence back to unreadiness. A disconnect before the terminal
|
|
727
|
+
checkpoint leaves the partial evidence deferred until a later checkpoint; restart
|
|
728
|
+
does not assume unfinished work is complete. V1 uses explicit assistant parent IDs;
|
|
729
|
+
V2 freezes the delivered input at step start rather than guessing the latest queued
|
|
730
|
+
prompt.
|
|
731
|
+
- If the live host reports `Session.NotFoundError` (or deletion/startup replay has no
|
|
732
|
+
ready evidence), capture logs `skipped` / `session_not_found`, releases its claim
|
|
733
|
+
without backoff or consuming retries, and skips further host-dependent lookups in that
|
|
734
|
+
batch. Later prompts with ready saved evidence still proceed. A later independent idle
|
|
735
|
+
may retry. Already exhausted prompts are not revived. Other failures retain their
|
|
736
|
+
existing retry behavior.
|
|
737
|
+
- Auto-capture additions use a stable per-project/prompt ID so sequential crash/restart
|
|
738
|
+
replay reuses the prior memory, including soft-deleted records, instead of inserting or
|
|
739
|
+
resurrecting it. This does not claim distributed exactly-once semantics for optional
|
|
740
|
+
semantic update/supersede operations or every multi-process crash interleaving.
|
|
741
|
+
- If auto-capture reports that a provider is not connected, confirm the provider name with `opencode providers list` and configure that provider in opencode first.
|
|
742
|
+
- If a proxy or custom provider returns plain text instead of structured/tool output, choose another model/provider or use one of the manual provider modes above.
|
|
743
|
+
- For models that reject `temperature`, add `"memoryTemperature": false` when using manual API configuration.
|
|
744
|
+
- For models that reject forced tool calls (`tool_choice: "required"`, e.g. some thinking modes), add `"forceToolChoice": false` when using `openai-chat` / `orcarouter` / `atlas-cloud` / `cheaper-inference` / `api-route` / `runcrate` / `cloudgpu`.
|
|
745
|
+
- For `opencodeProvider` / `opencodeModel` (e.g. DeepSeek V4 thinking), OpenCode still sends forced `tool_choice` for structured output. opencode-mem disables thinking on the internal `opencode-mem-structured` agent (and re-applies that in `chat.params` after variant merge) so auto-capture and profile learning can complete. Your interactive chat agent is unchanged. If capture still fails with a thinking/`tool_choice` error, pick a non-thinking model for `opencodeModel` or configure a complete manual fallback (`memoryModel` + `memoryApiUrl`).
|
|
746
|
+
- **`opencode-claude-auth` / Claude Code:** auto-capture uses OpenCode with your authenticated `anthropic` provider. Forced `format: json_schema` often loops with Claude-auth, so opencode-mem uses an auth-preserving **text-JSON** path for `opencodeProvider: "anthropic"` (no forced `StructuredOutput` tools; reply is parsed with Zod). A step watchdog still aborts runaway internal sessions after 2 steps. If capture still fails, configure a complete manual Anthropic API-key fallback (`memoryProvider: "anthropic"` + `memoryModel` + `memoryApiUrl` + `memoryApiKey`) — Claude Pro/Max OAuth cannot be reused outside OpenCode.
|
|
747
|
+
- **Unsupported platforms:** Intel Mac (`darwin/x64`) is not supported — `@tursodatabase/database` and fixed `onnxruntime-node` releases (pinned `1.31.1`) ship no x64 native binding. Use Apple Silicon, Linux, or Windows, or a remote embedding endpoint via `embeddingApiUrl` + `embeddingApiKey`. MLX is not supported.
|
|
748
|
+
|
|
749
|
+
## Public Subpath Exports
|
|
750
|
+
|
|
751
|
+
In addition to the main plugin entry, `opencode-mem` exposes one stable subpath
|
|
752
|
+
that other opencode plugins can import directly. This avoids having to
|
|
753
|
+
reverse-engineer container-tag conventions when writing third-party tools that
|
|
754
|
+
read or write into the same memory store.
|
|
755
|
+
|
|
756
|
+
### `opencode-mem/tags`
|
|
757
|
+
|
|
758
|
+
Canonical container-tag helpers. The same functions opencode-mem itself uses
|
|
759
|
+
to scope auto-captured memories.
|
|
760
|
+
|
|
761
|
+
```ts
|
|
762
|
+
import { getProjectTagInfo, getUserTagInfo, getTags } from "opencode-mem/tags";
|
|
763
|
+
|
|
764
|
+
// Canonical project tag derived from cwd (git remote URL if present, else
|
|
765
|
+
// the project root path). Format: `opencode_project_<sha16>`.
|
|
766
|
+
const projectTag = getProjectTagInfo(process.cwd()).tag;
|
|
767
|
+
|
|
768
|
+
// Canonical user tag derived from `git config user.email`.
|
|
769
|
+
// Format: `opencode_user_<sha16>`.
|
|
770
|
+
const userTag = getUserTagInfo().tag;
|
|
771
|
+
|
|
772
|
+
// Both at once.
|
|
773
|
+
const { user, project } = getTags(process.cwd());
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
Tags produced by these helpers match what auto-capture writes, so third-party
|
|
777
|
+
plugins that call `POST /api/memories` will land in the same shards the rest
|
|
778
|
+
of the system already understands. Hand-rolled tags whose substring isn't
|
|
779
|
+
`_project_` or `_user_` end up in shadow shards that `/api/stats` and
|
|
780
|
+
`/api/memories` silently filter out — using these helpers avoids that pitfall.
|
|
781
|
+
|
|
782
|
+
## Development & Contribution
|
|
783
|
+
|
|
784
|
+
Build and test locally:
|
|
785
|
+
|
|
786
|
+
```bash
|
|
787
|
+
bun install
|
|
788
|
+
bun run build
|
|
789
|
+
bun test
|
|
790
|
+
bun run check
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
`bun run check` runs `format:check`, `lint` and `typecheck`; `bun run format` rewrites formatting.
|
|
794
|
+
|
|
795
|
+
The [docs](https://opencode-mem.zhafron.my.id/docs/) are generated from this README and the translations under `.github/i18n/`; the [landing page](https://opencode-mem.zhafron.my.id) lives in `github-site/src/`. Every README heading must be mapped to a docs page in `github-site/docs-map.json`, otherwise the site build fails. Build the site locally with `cd github-site && bun install && bun run build`.
|
|
796
|
+
|
|
797
|
+
This project is actively seeking contributions to become the definitive memory plugin for AI coding agents. Whether you are fixing bugs, adding features, improving documentation, or expanding embedding model support, your contributions are critical. The codebase is well-structured and ready for enhancement. Please open issues with the Issue or Feature request templates, and fill out the pull request template when you submit a PR — we review and merge contributions quickly.
|
|
798
|
+
|
|
799
|
+
**README translations:** `README.md` (English) is the source of truth. When you change its content, update the files under `.github/i18n/` (`README.de.md`, `README.zh.md`, `README.ar.md`, `README.tr.md`, and `README.nl.md`) to match.
|
|
800
|
+
|
|
801
|
+
## License & Links
|
|
802
|
+
|
|
803
|
+
MIT License - see LICENSE file
|
|
804
|
+
|
|
805
|
+
- **Website**: https://opencode-mem.zhafron.my.id
|
|
806
|
+
- **Docs**: https://opencode-mem.zhafron.my.id/docs/
|
|
807
|
+
- **Repository**: https://github.com/tickernelz/opencode-mem
|
|
808
|
+
- **Issues**: https://github.com/tickernelz/opencode-mem/issues
|
|
809
|
+
- **npm**: https://www.npmjs.com/package/@aislop-inc/opencode-mem
|
|
810
|
+
- **OpenCode Platform**: https://opencode.ai
|
|
811
|
+
|
|
812
|
+
Inspired by [opencode-supermemory](https://github.com/supermemoryai/opencode-supermemory)
|