import { type ReactNode } from 'react';
import { type ApplicationUpdatePayload, type OperationLogAppendPayload } from '../../../../packages/core/src/domain/generated/output.js';
import type { AgentMessageStreamEvent, AgentQuestionStreamEvent, SupervisorDecisionStreamEvent } from '../../../../packages/core/src/application/use-cases/agents/stream-agent-events.use-case.js';
import { type UseAgentEventsOptions, type UseAgentEventsResult } from './use-agent-events.js';
export declare const AgentEventsContext: import("react").Context<UseAgentEventsResult | null>;
interface AgentEventsProviderProps extends UseAgentEventsOptions {
    children: ReactNode;
}
/**
 * Single SSE connection for agent events shared across all consumers.
 * Wrap the app once; use `useAgentEventsContext()` to read.
 */
export declare function AgentEventsProvider({ children, runId }: AgentEventsProviderProps): import("react/jsx-runtime").JSX.Element;
export declare function useAgentEventsContext(): UseAgentEventsResult;
/**
 * Like {@link useAgentEventsContext} but returns `null` instead of throwing
 * when no provider is mounted — use this from components that also need to
 * render in isolated contexts (Storybook, unit tests) where the global
 * SSE provider is not available.
 */
export declare function useOptionalAgentEventsContext(): UseAgentEventsResult | null;
/**
 * Latest `ApplicationUpdated` event scoped to one `applicationId`, or `null`.
 * Returns the payload (not the full `NotificationEvent`) because callers
 * only need the patchable fields.
 */
export declare function useApplicationUpdate(applicationId: string): ApplicationUpdatePayload | null;
/**
 * Latest `OperationLogAppended` entry scoped to one `applicationId`, or
 * `null`. Entries are scoped by `entry.operationId === applicationId`.
 */
export declare function useOperationLogAppend(applicationId: string): OperationLogAppendPayload['entry'] | null;
/**
 * Spec 093 — agent message stream scoped to a (scopeType, scopeId?, featureId?) tuple.
 * Returns the cumulative list and the most recent envelope so consumers can
 * either render history or react to the latest delta.
 */
export interface AgentMessageScope {
    scopeType: string;
    scopeId?: string;
    featureId?: string;
}
export declare function useAgentMessages(scope: AgentMessageScope): {
    messages: AgentMessageStreamEvent[];
    last: AgentMessageStreamEvent | null;
};
/**
 * Spec 093 — agent question stream scoped by scope type/id/feature.
 */
export declare function useAgentQuestions(scope: AgentMessageScope): {
    questions: AgentQuestionStreamEvent[];
    last: AgentQuestionStreamEvent | null;
};
/**
 * Spec 093 — supervisor decision stream scoped by scope type/id/feature.
 */
export declare function useSupervisorDecisions(scope: AgentMessageScope): {
    decisions: SupervisorDecisionStreamEvent[];
    last: SupervisorDecisionStreamEvent | null;
};
export {};
//# sourceMappingURL=agent-events-provider.d.ts.map