1import * as Effect from "effect/Effect";
2import * as Layer from "effect/Layer";
3import { Interaction } from "../../Interaction.ts";
4import { CliKit } from "./CliKit.ts";
5
6/**
7 * The CLI's implementation of the engine's {@link Interaction} capability,
8 * backed by the full CliKit terminal runtime: messages and `task` render
9 * through the live renderer, prompts run as real interactive screens.
10 * Provided by the CLI entrypoints next to `CliKit.layer()`; every other
11 * process uses `Interaction.layerNonInteractive` (or nothing at all —
12 * children have no interaction capability in their graphs).
13 */
14export const CliKitInteraction = Layer.effect(
15 Interaction,
16 // CliKit's surface is a structural superset of Interaction's — the
17 // terminal service IS the CLI's Interaction implementation.
18 Effect.map(CliKit, (cli): Interaction["Service"] => cli),
19);