refactor(tui): narrow mini compatibility surfaces (#38262)

This commit is contained in:
Simon Klee 2026-07-22 10:35:35 +02:00 committed by GitHub
commit 794137b33b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 67 additions and 159 deletions

View file

@ -18,10 +18,12 @@ describe("CLI frontend import boundaries", () => {
test("exposes only the intentional package entrypoints", async () => {
const run = await import("@opencode-ai/cli/run")
const mini = await import("@opencode-ai/tui/mini")
const tool = await import("@opencode-ai/tui/mini/tool")
const cli = await Bun.file(path.join(root, "packages/cli/package.json")).json()
expect(Object.keys(run).sort()).toEqual(["runNonInteractive", "runV1Bridge"])
expect(Object.keys(mini).sort()).toEqual(["runMiniFrontend"])
expect(Object.keys(tool).sort()).toEqual(["toolInlineInfo", "toolOutputText"])
expect(Object.keys(cli.exports).filter((key) => key === "./mini" || key.startsWith("./mini/"))).toEqual([])
})