Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
1234567891011121314151617181920export * as Instance from "./service.js"export type { Services } from "../instance.js"
import { Context, type Effect } from "effect"import type { Session } from "@opencode/schema/session"import { Node } from "@opencode/util/effect/app-node"import { LayerNode } from "@opencode/util/effect/layer-node"import type { Services } from "../instance.js"
/** Selects Session capabilities; implementations own caching and lifetime. */export interface Interface { readonly provide: ( session: Session.Info, ) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Services>>}
export class Service extends Context.Service<Service, Interface>()("@opencode/Instance") {}
export const node = LayerNode.unbound(Service, Node.tags.values.global)