MCPcopy
hub / github.com/anomalyco/opencode / provideTmpdirServer

Function provideTmpdirServer

packages/opencode/test/fixture/fixture.ts:213–228  ·  view source on GitHub ↗
(
  self: (input: { dir: string; llm: TestLLMServer["Service"] }) => Effect.Effect<A, E, R>,
  options?: { git?: boolean; config?: (url: string) => Partial<ConfigV1.Info> },
)

Source from the content-addressed store, hash-verified

211 }).pipe(Effect.provide(testInstanceStoreLayer), Effect.provide(AppNodeBuilder.build(CrossSpawnSpawner.node)))
212
213export function provideTmpdirServer<A, E, R>(
214 self: (input: { dir: string; llm: TestLLMServer["Service"] }) => Effect.Effect<A, E, R>,
215 options?: { git?: boolean; config?: (url: string) => Partial<ConfigV1.Info> },
216): Effect.Effect<
217 A,
218 E | PlatformError.PlatformError,
219 R | TestLLMServer | ChildProcessSpawner.ChildProcessSpawner | Scope.Scope
220> {
221 return Effect.gen(function* () {
222 const llm = yield* TestLLMServer
223 return yield* provideTmpdirInstance((dir) => self({ dir, llm }), {
224 git: options?.git,
225 config: options?.config?.(llm.url),
226 })
227 })
228}

Calls 2

provideTmpdirInstanceFunction · 0.85
configMethod · 0.45

Tested by

no test coverage detected