Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ What you get:
- optional implementation-agent handoff after approval

Restart OpenCode after installing or updating so it reloads the package-managed runtime.
OpenCode 1.x and 2.x are both supported.
OpenCode 2.x and OpenCode 1.18.29 or later are both supported.

### Pi

Expand Down
5 changes: 4 additions & 1 deletion opencode/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,7 @@ export const OpenPlanAnnotatorPlugin = async (ctx) => {
};
};

export default OpenPlanAnnotatorPlugin;
export default {
...OpenPlanAnnotatorPluginV2,
server: OpenPlanAnnotatorPlugin,
};
10 changes: 6 additions & 4 deletions opencode/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ describe("annotate_plan tool output (V2)", () => {
}
});

test("legacy entrypoint retains the V1 plugin function", async () => {
test("package default supports both V2 setup and V1 server entrypoints", async () => {
const mod = await loadPluginWithBridge(async () => ({ approved: true }), "v1-shape");
expect(typeof mod.default).toBe("function");
expect(mod.OpenPlanAnnotatorPlugin).toBe(mod.default);
expect(typeof mod.default).toBe("object");
expect(mod.default.id).toBe("open-plan-annotator");
expect(mod.default.setup).toBe(mod.OpenPlanAnnotatorPluginV2.setup);
expect(mod.default.server).toBe(mod.OpenPlanAnnotatorPlugin);

const plugin = await mod.default({
const plugin = await mod.default.server({
directory: process.cwd(),
client: {
session: {
Expand Down
Loading