openpod

An opencode plugin that spins up a dedicated virtual machine for each session to isolate agent work.
git clone https://unitehenry.com/git/openpod.git
Log | Files | Refs | README

commit 07b233406e588db9c597bcc44599d134e279bbf7
parent 7696bb18b5bbe00360a5fd292a98a6d956f2e67a
Author: Henry Unite <unitehenry@gmail.com>
Date:   Sun, 25 Oct 2026 18:00:28 +0000

test(opencode): register plugin

Diffstat:
Mopencode.test.ts | 23++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/opencode.test.ts b/opencode.test.ts @@ -1,5 +1,6 @@ import { OpenCode } from "@opencode/sdk" -import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; +import { describe, it, expect, beforeEach, afterEach } from "vitest"; +import openpod from "./index"; describe("opencode", () => { let opencode: Awaited<ReturnType<typeof OpenCode.create>>; @@ -12,11 +13,19 @@ describe("opencode", () => { await opencode?.close?.(); }); - it("Opencode plugin cant register without limactl", async () => { - // TODO: temporarily unlink `limactl` from path - // TODO: Call await opencode.plugin(plugin) to register another plugin after startup. - console.log(opencode); - // TODO: assert limactl error is thrown - // TODO: cleanup finally - link `limactl` from path + it("registers openpod plugin with opencode", async () => { + await opencode.plugin(openpod); + + await opencode.sessions.create(); + + let commands; + + for (let i = 0; i < 20; i++) { + commands = await opencode.command.list(); + if (commands.data.some((c) => c.name === "clear-openpod")) break; + await new Promise((r) => setTimeout(r, 50)); + } + + expect(commands.data.some((c) => c.name === "clear-openpod")).toBe(true); }); });