import type { AutomationEventEnvelope } from '../automations/domain/types.js'; import { type CoalescedSignal, type CreateProactiveSubscriptionInput, type PatchProactiveSubscriptionInput, type PreparedScoutPackage, type ProactiveAuthority, type ProactiveCategory, type ProactiveHubMetrics, type ProactiveExecutedActionReceipt, type ProactiveItem, type ProactiveItemResolutionInput, type ProactiveItemState, type ProactiveProposedAction, type ProactiveProvenance, type ProactiveSubscription, type ProactiveTier } from './types.js'; export declare function ensureDefaultProactiveSubscriptions(ownerId: string, now?: number): void; export declare function listProactiveSubscriptions(ownerId: string): ProactiveSubscription[]; export declare function createProactiveSubscription(ownerId: string, input: CreateProactiveSubscriptionInput, authority?: ProactiveAuthority, now?: number, explicitId?: string): ProactiveSubscription; export declare function patchProactiveSubscription(ownerId: string, subscriptionId: string, input: PatchProactiveSubscriptionInput, now?: number): ProactiveSubscription; export declare function extractEventTaskWait(event: Pick): { taskId?: string; waitId?: string; }; export declare function retireCoveredProactiveItems(ownerId: string, taskId: string, waitId?: string, now?: number): number; export declare function findActiveEntityAnchor(_ownerId: string, event: AutomationEventEnvelope): { projectId?: string; }; export interface Gate1AdmissionResult { outcome: 'dropped_unmatched' | 'dropped_rule' | 'dropped_duplicate' | 'coalesced' | 'buffered'; coalesceKey?: string; subscriptionId?: string; eventCount?: number; } /** * Gate 1: Zero-token deterministic preflight filter, bot/noise suppressor, * fingerprint deduplicator, and sliding-window coalescer. * Internal product events (tasks / projects / sessions) never enter external signal triage. */ export declare function admitSignalAtGate1(ownerId: string, event: AutomationEventEnvelope, now?: number): Gate1AdmissionResult; export declare function claimDueCoalescedSignals(now?: number, limit?: number, leaseDurationMs?: number): CoalescedSignal[]; export declare function finalizeCoalescedSignal(ownerId: string, coalesceKey: string, leaseToken: string, finalStatus: 'triaged' | 'dropped', now?: number): boolean; export declare function saveProactiveItem(input: { id?: string; ownerId: string; agentId: string; coalesceKey: string; sourceEventIds: string[]; tier: ProactiveTier; category: ProactiveCategory; title: string; summary: string; provenance: ProactiveProvenance; preparedPayload?: PreparedScoutPackage; proposedAction?: ProactiveProposedAction; state: ProactiveItemState; idempotencyKey: string; validUntil: number; now?: number; }): ProactiveItem; export declare function listProactiveInboxItems(ownerId: string, options?: { includeActed?: boolean; limit?: number; now?: number; }): ProactiveItem[]; export declare function listPulseDigests(ownerId: string, limit?: number): ProactiveItem[]; export declare function listBufferedDigestCandidates(ownerId: string, now?: number): ProactiveItem[]; /** * Aggregates buffered Tier-B items into a single Pulse Digest card without noisy single-item notifications. * Returns null when the buffer is empty (silence by default). */ export declare function flushPulseDigestBatch(input: { ownerId: string; agentId: string; windowLabel?: string; now?: number; }): ProactiveItem | null; export declare function markProactiveConversationDelivered(ownerId: string, itemId: string, conversationEntryId: string, now?: number): void; export declare function applyProactiveItemResolution(ownerId: string, itemId: string, input: ProactiveItemResolutionInput, now?: number): ProactiveItem; export declare function recordProactiveExecutedAction(ownerId: string, itemId: string, executedAction: ProactiveExecutedActionReceipt, now?: number): ProactiveItem | undefined; export declare function getProactiveHubMetrics(ownerId: string, now?: number): ProactiveHubMetrics;