@mathew-cf/opencode-memory 0.2.1 → 0.3.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/README.md CHANGED
@@ -23,7 +23,7 @@ LLM agents forget everything between sessions. That means rediscovering the same
23
23
  ```jsonc
24
24
  // opencode.jsonc
25
25
  {
26
- "plugin": ["@mathew-cf/opencode-memory@0.2.1"]
26
+ "plugin": ["@mathew-cf/opencode-memory@0.3.1"]
27
27
  }
28
28
  ```
29
29
 
package/dist/index.d.ts CHANGED
@@ -8,8 +8,22 @@
8
8
  * - Config modifications (skill path, agent prompts, permission rules)
9
9
  */
10
10
  import type { Plugin } from "@opencode-ai/plugin";
11
- declare const MemoryPlugin: Plugin;
12
- export default MemoryPlugin;
11
+ /**
12
+ * Default export uses the V1 plugin format — a record with `id` + `server`.
13
+ *
14
+ * OpenCode's plugin loader first tries V1 (`readV1Plugin`): if `default` is
15
+ * a record with `id`/`server`/`tui`, it uses only those. Otherwise it falls
16
+ * back to "legacy" detection which iterates EVERY named export and requires
17
+ * each to be a function — so a single non-function re-export (e.g. the
18
+ * `MEMORY_PROMPT_APPENDIX` string below) would abort plugin load with a
19
+ * TypeError. Shipping V1 keeps the named helper re-exports safe because the
20
+ * loader never iterates them.
21
+ */
22
+ declare const _default: {
23
+ id: string;
24
+ server: Plugin;
25
+ };
26
+ export default _default;
13
27
  export { applyConfig, MEMORY_PROMPT_APPENDIX, TARGET_AGENTS } from "./config";
14
28
  export { afterToolUpdate, buildCompactionContext, createGuardHooks, makeInitialState, matchesToolName, type SessionState, } from "./hooks/guard";
15
29
  export * as memoryTools from "./tools/memory";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AA6BlD,QAAA,MAAM,YAAY,EAAE,MA+BnB,CAAC;AAEF,eAAe,YAAY,CAAC;AAG5B,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AA8DlD;;;;;;;;;;GAUG;;;;;AACH,wBAGE;AAGF,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -13560,7 +13560,10 @@ var MemoryPlugin = async () => {
13560
13560
  "experimental.session.compacting": guard.compacting
13561
13561
  };
13562
13562
  };
13563
- var src_default = MemoryPlugin;
13563
+ var src_default = {
13564
+ id: "opencode-memory",
13565
+ server: MemoryPlugin
13566
+ };
13564
13567
  export {
13565
13568
  exports_session as sessionTools,
13566
13569
  exports_memory as memoryTools,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathew-cf/opencode-memory",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "Persistent cross-session memory for OpenCode — a hybrid keyword + semantic search layer over a local markdown knowledge base, plus session history tools and guardrails that nudge agents to use them.",
5
5
  "author": "mat",
6
6
  "license": "Apache-2.0",