/**
 * Multi-recipient (broadcast) handoff — atomic fan-out with compensating
 * rollback.
 *
 * See session-hierarchy.md §6.2 (Multi-recipient broadcast flow — atomic),
 * §5.4 (broadcast source-session post-fan-out), §6.5 (capacity enforcement).
 *
 * **Atomicity contract** — one transaction boundary: either the full fan-out
 * commits (source CAS-lock + N assignments + N sub-sessions + N worktrees),
 * or none of it is externally observable. On any step failure the kernel
 * executes a compensating rollback and emits `onBroadcastRollback` with
 * accurate `partialState` counts. The rollback itself is idempotent per
 * roadmap Risk #3.
 *
 * Commit / rollback sequence (pattern doc §6.2):
 * ```
 * COMMIT:   idle → locked(CAS) → N assignments → N sub-sessions → N worktrees → awaiting_merge
 * ROLLBACK: ( ← tear down partial worktrees ← delete partial sub-sessions ←
 *             delete partial assignments ← release CAS ) emit broadcast.rollback;
 *             source → idle
 * ```
 */
import type { ThreadManager } from '../../manager/thread/lifecycle.js';
import type { TenantId } from '../../types/ids/index.js';
import type { SessionStore } from '../../types/session/store.js';
import type { WorkspaceBackendRegistry } from '../workspace/registry.js';
import type { HandoffAssignment, HandoffOutcome } from './assignment.js';
import type { CapacityValidator } from './capacity.js';
import type { HandoffEventSink } from './events.js';
import { type RunStatusResolver } from './single.js';
export interface BroadcastHandoffDeps {
    store: SessionStore;
    workspaceRegistry: WorkspaceBackendRegistry;
    capacity: CapacityValidator;
    events: HandoffEventSink;
    runStatus?: RunStatusResolver;
    /**
     * Gate every recipient-session creation on the Thread being `'open'`.
     * Added in Phase 2.6; checked once per broadcast (all recipients share
     * a threadId by the fan-out invariant validated above).
     */
    threadManager: ThreadManager;
}
/**
 * Executes a broadcast fan-out. All assignments MUST share the same
 * `sourceSessionId`, `expectedOwnerVersion`, `broadcastId`, and `projectId`.
 * Duplicate recipients (same actor kind + id) are rejected before any write.
 *
 * Returns one {@link HandoffOutcome} per recipient on success. On failure the
 * source session is restored, every provisioned resource is torn down, and
 * the underlying error propagates after `onBroadcastRollback` is emitted.
 */
export declare function executeBroadcastHandoff(deps: BroadcastHandoffDeps, assignments: readonly HandoffAssignment[], tenantId: TenantId): Promise<readonly HandoffOutcome[]>;
//# sourceMappingURL=broadcast.d.ts.map