Skip to content

Commit 762137d

Browse files
authored
Merge pull request #111 from supermemoryai/fix/v1-server-export
Fix the ./server issue for opencode v1
2 parents fd61c76 + 1d889fa commit 762137d

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opencode-supermemory",
3-
"version": "2.0.16",
3+
"version": "2.0.17",
44
"description": "OpenCode plugin that gives coding agents persistent memory using Supermemory",
55
"type": "module",
66
"main": "dist/index.js",

‎src/server.ts‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
/**
2-
* OpenCode 2 server plugin entry, resolved as `opencode-supermemory/server`.
3-
* The root export stays the OpenCode V1 plugin so both generations can load
4-
* the same package.
2+
* Server plugin entry, resolved as `opencode-supermemory/server` by both
3+
* OpenCode generations. OpenCode 2 reads `id` and `setup()`. OpenCode V1
4+
* (1.16 and later) also resolves this export and calls `server()`, so the
5+
* default export carries both implementations.
56
*/
7+
import type { Plugin as V1Plugin } from "@opencode-ai/plugin";
68
import type { Plugin } from "@opencode/plugin";
79

10+
import { SupermemoryPlugin } from "./index.js";
811
import { setupV2 } from "./v2/runtime.js";
912

10-
const plugin: Plugin.Plugin = {
13+
const plugin: Plugin.Plugin & { server: V1Plugin } = {
1114
id: "supermemory",
1215
setup: (context) => setupV2(context),
16+
server: (input, options) => SupermemoryPlugin(input, options),
1317
};
1418

1519
export default plugin;

‎src/version.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// AUTO-GENERATED by scripts/sync-version.mjs — do not edit by hand.
22
// Sourced from package.json "version" so the two cannot drift.
3-
export const PLUGIN_VERSION = "2.0.16";
3+
export const PLUGIN_VERSION = "2.0.17";

0 commit comments

Comments
 (0)