pty-environment.ts 589 B

12345678910111213141516171819
  1. export * as PtyEnvironment from "./pty-environment"
  2. import { Context, Effect, Layer } from "effect"
  3. import { makeGlobalNode } from "@kirincode-ai/core/effect/app-node"
  4. export interface Interface {
  5. readonly get: (input: { directory: string; cwd: string }) => Effect.Effect<Record<string, string>>
  6. }
  7. export class Service extends Context.Service<Service, Interface>()("@kirincode/ServerPtyEnvironment") {}
  8. export const layer = Layer.succeed(
  9. Service,
  10. Service.of({
  11. get: () => Effect.succeed({}),
  12. }),
  13. )
  14. export const node = makeGlobalNode({ service: Service, layer, deps: [] })