import { z } from 'zod'; import type { AutomationEventEnvelope } from '../automations/domain/types.js'; export declare const ProactiveScopeTypeSchema: z.ZodEnum<{ project: "project"; workspace: "workspace"; global: "global"; thread: "thread"; }>; export type ProactiveScopeType = z.infer; export declare const ProactiveRouteHintSchema: z.ZodEnum<{ drop: "drop"; digest_only: "digest_only"; triage: "triage"; force_scout: "force_scout"; }>; export type ProactiveRouteHint = z.infer; export declare const ProactiveAuthoritySchema: z.ZodEnum<{ user_explicit: "user_explicit"; system_default: "system_default"; }>; export type ProactiveAuthority = z.infer; export declare const ProactiveTierSchema: z.ZodEnum<{ tier_s_chat: "tier_s_chat"; tier_a_inbox: "tier_a_inbox"; tier_b_digest: "tier_b_digest"; tier_c_silent: "tier_c_silent"; }>; export type ProactiveTier = z.infer; export declare const ProactiveCategorySchema: z.ZodEnum<{ info: "info"; meeting_prep: "meeting_prep"; blocker: "blocker"; prepared_draft: "prepared_draft"; folder_insight: "folder_insight"; pulse_digest: "pulse_digest"; }>; export type ProactiveCategory = z.infer; export declare const ProactiveItemStateSchema: z.ZodEnum<{ expired: "expired"; ready: "ready"; stale: "stale"; delivered: "delivered"; snoozed: "snoozed"; muted: "muted"; buffered_digest: "buffered_digest"; acted: "acted"; }>; export type ProactiveItemState = z.infer; export declare const ProactiveMatchPredicatesSchema: z.ZodObject<{ equals: z.ZodOptional>>; notEquals: z.ZodOptional>>; in: z.ZodOptional>>; notIn: z.ZodOptional>>; contains: z.ZodOptional>; excludeAutomatedSenders: z.ZodOptional; }, z.core.$strict>; export type ProactiveMatchPredicates = z.infer; export declare const CreateProactiveSubscriptionSchema: z.ZodObject<{ scopeType: z.ZodDefault>; scopeId: z.ZodOptional; sourcePattern: z.ZodString; eventTypePattern: z.ZodString; matchPredicates: z.ZodDefault>>; notEquals: z.ZodOptional>>; in: z.ZodOptional>>; notIn: z.ZodOptional>>; contains: z.ZodOptional>; excludeAutomatedSenders: z.ZodOptional; }, z.core.$strict>>; defaultRoute: z.ZodDefault>; coalesceWindowMs: z.ZodDefault; enabled: z.ZodDefault; }, z.core.$strict>; export type CreateProactiveSubscriptionInput = z.infer; export declare const PatchProactiveSubscriptionSchema: z.ZodObject<{ expectedRevision: z.ZodNumber; matchPredicates: z.ZodOptional>>; notEquals: z.ZodOptional>>; in: z.ZodOptional>>; notIn: z.ZodOptional>>; contains: z.ZodOptional>; excludeAutomatedSenders: z.ZodOptional; }, z.core.$strict>>; defaultRoute: z.ZodOptional>; coalesceWindowMs: z.ZodOptional; enabled: z.ZodOptional; }, z.core.$strict>; export type PatchProactiveSubscriptionInput = z.infer; export interface ProactiveSubscription { id: string; ownerId: string; scopeType: ProactiveScopeType; scopeId?: string; sourcePattern: string; eventTypePattern: string; matchPredicates: ProactiveMatchPredicates; defaultRoute: ProactiveRouteHint; coalesceWindowMs: number; authority: ProactiveAuthority; enabled: boolean; revision: number; createdAt: number; updatedAt: number; } export interface CoalescedSignal { ownerId: string; coalesceKey: string; subscriptionId?: string; source: string; eventType: string; subjectKind?: string; subjectId?: string; trust: AutomationEventEnvelope['trust']; latestEventId: string; eventIds: string[]; eventCount: number; payload: Record; contentFingerprint: string; routeHint: ProactiveRouteHint; windowStartedAt: number; flushAfter: number; status: 'buffering' | 'processing' | 'triaged' | 'dropped'; leaseToken?: string; leaseUntil: number; updatedAt: number; } export interface ProactiveTriageScore { actionability: 0 | 1 | 2 | 3; urgency: 0 | 1 | 2 | 3; novelty: 0 | 1 | 2; preparedness: 0 | 1 | 2; disruptionPenalty: number; netScore: number; } export interface ProactiveProposedAction { kind: 'approve_draft' | 'create_task' | 'acknowledge'; safetyMode: 'ask_before_apply'; label: string; targetRef?: string; parameters?: Record; } export interface PreparedScoutPackage { verifiedFacts: string[]; evidenceRefs: string[]; preparedDraft?: string; proposedAction?: ProactiveProposedAction; } export interface ProactiveProvenance { source: string; eventType: string; trust: AutomationEventEnvelope['trust']; coalescedCount: number; subscriptionId?: string; matchedProjectId?: string; matchedThreadId?: string; matchedTaskId?: string; matchedWaitId?: string; reason: string; evidenceRefs: string[]; score: ProactiveTriageScore; } export declare const ProactiveItemResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ action: z.ZodLiteral<"approve">; idempotencyKey: z.ZodString; note: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ action: z.ZodLiteral<"edit_and_approve">; idempotencyKey: z.ZodString; editedDraft: z.ZodString; note: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ action: z.ZodLiteral<"move_to_digest">; idempotencyKey: z.ZodString; }, z.core.$strict>, z.ZodObject<{ action: z.ZodLiteral<"snooze">; idempotencyKey: z.ZodString; untilMs: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ action: z.ZodLiteral<"mute_rule">; idempotencyKey: z.ZodString; mode: z.ZodDefault>; senderOrSubjectFilter: z.ZodOptional; }, z.core.$strict>], "action">; export type ProactiveItemResolutionInput = z.infer; export interface ProactiveExecutedActionReceipt { kind: 'create_task' | 'approve_draft'; taskId?: string; summary: string; executedAt: number; } export interface ProactiveHumanResolution { action: ProactiveItemResolutionInput['action']; idempotencyKey: string; resolvedAt: number; originalDraft?: string; editedDraft?: string; muteMode?: 'drop' | 'digest_only'; senderOrSubjectFilter?: string; note?: string; executedAction?: ProactiveExecutedActionReceipt; } export interface ProactiveItem { 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; digestBatchId?: string; conversationEntryId?: string; humanResolution?: ProactiveHumanResolution; idempotencyKey: string; validUntil: number; createdAt: number; updatedAt: number; } export interface ProactiveHubMetrics { activeSubscriptions: number; bufferingSignals: number; droppedSignalsTotal: number; inboxPendingCount: number; chatEscalatedCount: number; digestBufferedCount: number; actedCount: number; mutedCount: number; }