import { Context, Effect, Layer } from 'effect'; import type { Brand } from '../../domain/identity/index.js'; export type LeadershipIdentity = string & Brand<'LeadershipIdentity'>; export type LeadershipRole = { readonly _tag: 'Strategy'; readonly name: string; } | { readonly _tag: 'CadenceRepair'; } | { readonly _tag: 'OutboxDrain'; }; export type LeadershipObserver = { readonly requested: Effect.Effect; readonly acquired: Effect.Effect; readonly released: Effect.Effect; }; type LeadershipServiceShape = { run: (identity: LeadershipIdentity, effect: Effect.Effect, observer?: LeadershipObserver) => Effect.Effect; }; declare const LeadershipService_base: Context.ServiceClass; export declare class LeadershipService extends LeadershipService_base { } export type LeadershipLayer = Layer.Layer; export type Leadership = LeadershipServiceShape & { dispose: () => Promise; }; export declare const leadershipIdentity: (input: { readonly scope: readonly string[]; readonly role: LeadershipRole; }) => LeadershipIdentity; export declare const makeLeadership: (layer: LeadershipLayer | undefined) => Leadership; export {}; //# sourceMappingURL=leadership.d.ts.map