/**
 * Main application layer composition
 *
 * Composes all services with their production dependencies.
 * Each service gets its dependencies provided, then all are merged.
 */
import { NodeContext } from "@effect/platform-node";
import { ConfigManagerLayer, EventStreamServiceLayer, GhostflowClientLayer, LaunchdServiceLayer, NodeConfigStorageLayer, UnixSocketTransportLayer } from "@ghostflow/client";
import { Layer } from "effect";
/**
 * GhostflowClient with its Transport dependency satisfied
 */
const ClientWithTransport = GhostflowClientLayer.pipe(Layer.provide(UnixSocketTransportLayer));
/**
 * ConfigManager with fully satisfied dependencies.
 */
const ConfigManagerLive = ConfigManagerLayer.pipe(Layer.provide(NodeConfigStorageLayer), Layer.provide(NodeContext.layer));
/**
 * Main production layer with all services and platform dependencies
 *
 * Dependency graph:
 *   NodeContext (FileSystem, Path, Terminal) - platform I/O for path resolution
 *   LaunchdServiceLayer (daemon lifecycle, uses Node APIs directly)
 *   GhostflowClient <- UnixSocketTransport (daemon communication)
 *   EventStreamService (real-time event streaming)
 *   ConfigManager <- NodeConfigStorage <- NodeContext
 *
 * Note: We use Layer.provideMerge to ensure NodeContext services (FileSystem, Path, Terminal)
 * are included in the layer's output type. This is required because @effect/cli commands
 * expect these services to be available.
 */
export const MainLive = Layer.mergeAll(LaunchdServiceLayer, ClientWithTransport, EventStreamServiceLayer, ConfigManagerLive).pipe(Layer.provideMerge(NodeContext.layer));
//# sourceMappingURL=MainLive.js.map