feat(core): add embedded v2 session runtime and tool foundation (#30632)

This commit is contained in:
Kit Langton
2026-06-03 23:02:17 -04:00
committed by GitHub
parent c35267776a
commit 76ee87ead8
215 changed files with 31344 additions and 3278 deletions

View File

@@ -0,0 +1,16 @@
import { describe, expect } from "bun:test"
import { Effect } from "effect"
import { OpenCode } from "@opencode-ai/core/opencode"
import { testEffect } from "./lib/effect"
const it = testEffect(OpenCode.layer)
describe("OpenCode.layer", () => {
it.effect("exposes Sessions through the public embedded API", () =>
Effect.gen(function* () {
const opencode = yield* OpenCode.Service
expect(yield* opencode.sessions.list()).toBeArray()
}),
)
})