effect-tea-persistent
    Preparing search index...

    The runtime launch gives: it deploys programs on the database it holds, and settled waits for the work they have under way.

    interface Runtime {
        deploy: <
            T extends
                Readonly<
                    {
                        flags: unknown;
                        inbound: unknown;
                        index: string;
                        internal: unknown;
                        key: string;
                        operation: Readonly<{ _tag: string }>;
                        parameter: object;
                        projection: unknown;
                        rejection: unknown;
                        sender: unknown;
                        services: unknown;
                        state: object;
                        topics?: Readonly<Record<string, Json>>;
                    },
                >,
            const C extends Consumers<T> = {},
        >(
            program: Program<T>,
            options?: Readonly<{ consumers?: C }>,
        ) => Effect<Handle<T, C>, never, Exclude<T["services"], Entities>>;
        settled: Effect<void>;
    }
    Index
    deploy: <
        T extends
            Readonly<
                {
                    flags: unknown;
                    inbound: unknown;
                    index: string;
                    internal: unknown;
                    key: string;
                    operation: Readonly<{ _tag: string }>;
                    parameter: object;
                    projection: unknown;
                    rejection: unknown;
                    sender: unknown;
                    services: unknown;
                    state: object;
                    topics?: Readonly<Record<string, Json>>;
                },
            >,
        const C extends Consumers<T> = {},
    >(
        program: Program<T>,
        options?: Readonly<{ consumers?: C }>,
    ) => Effect<Handle<T, C>, never, Exclude<T["services"], Entities>>

    Runs a program's entities in this process. The operations' services are taken from here, and their fibers run in the runtime's scope: a program is deployed where its services are. Entities is the runtime's own, filled in with the entity each operation runs for, so a program that only talks to other entities needs nothing. A program that cannot run as written dies here, before anything is stored or run (decision 0054). So does one whose name this process has deployed already: a new version is deployed by a new process (decision 0075). consumers are the names the log is read with, by topic, none by default. The deploy stores each that is not stored yet, so that it holds its topic from then on. A consumer stored and not declared is kept, and the deploy logs a warning for it. A topic the program does not publish, consumers of a topic that are no list, an empty name or a name declared twice in a topic are refused, before anything is stored (decision 0152). A deploy within a transaction of the client of the runtime is the caller's defect, since its activations are steps, which commit apart from any transaction of the caller (decision 0256).

    settled: Effect<void>

    Waits until nothing is under way. Nothing is under way when no event waits, no mailbox holds a message and no operation runs; when no entity told to leave is still held (decision 0076), and none is still unloading (decision 0109); and when no stored timer of an entity this process has unloaded is due (decision 0029).