import { Effect } from "effect" import { HttpServer } from "effect/unstable/http" import { ServerProcess } from "../../src/process" export const startServer = Effect.fnUntraced(function* (directory: string) { const server = yield* ServerProcess.start({ hostname: "127.0.0.1", port: 0, password: "secret", app: { version: "test-version" }, database: { path: ":memory:" }, config: { directory }, fs: { filewatcher: false }, models: { fetch: false }, }) return { base: HttpServer.formatAddress(server.address), headers: { authorization: `Basic ${btoa("opencode:secret")}` }, } })