refactor(core): convert opencode tests to nodes (#34453)

This commit is contained in:
James Long
2026-06-29 12:56:44 -04:00
committed by GitHub
parent b10d617c80
commit bc5ce5eab1
36 changed files with 112 additions and 106 deletions
@@ -6,6 +6,7 @@ import type {
SessionUpdate,
} from "@agentclientprotocol/sdk"
import type { Event, OpencodeClient } from "@opencode-ai/sdk/v2"
import { LayerNode } from "@opencode-ai/core/effect/layer-node"
import { createTwoFilesPatch } from "diff"
import { Effect, ManagedRuntime } from "effect"
import { mkdtemp, rm } from "node:fs/promises"
@@ -37,7 +38,7 @@ const pollUntil = async (
}
function makeSessionService() {
return ManagedRuntime.make(ACPSession.defaultLayer).runSync(
return ManagedRuntime.make(LayerNode.compile(ACPSession.node)).runSync(
ACPSession.Service.use((service) => Effect.succeed(service)),
)
}