import type { ConversationId, MemoryForget, MemoryId, MemoryProposal, MemoryProposalId, MemoryScope, MemoryScopeKind, MemorySensitivity, MemorySupersession, MemoryUpdate, ProjectId, UserId, WorkflowDefinitionId, WorkflowRunId, WorkspaceId } from "@oscharko-dev/keiko-contracts/memory";
import type { RejectionReason } from "./errors.js";
export interface CaptureContext {
    readonly userId: UserId;
    readonly workspaceId?: WorkspaceId;
    readonly projectId?: ProjectId;
    readonly workflowDefinitionId?: WorkflowDefinitionId;
    readonly sourceWorkflowRunId?: WorkflowRunId;
    readonly conversationId?: ConversationId;
    readonly nowMs: number;
    readonly newMemoryId: () => MemoryId;
    readonly newProposalId: () => MemoryProposalId;
}
export type CaptureMemoryResolver = (target: string, scope: MemoryScope) => readonly MemoryId[];
export interface CapturePolicyOptions {
    readonly customerIdentifierMatchers?: readonly RegExp[];
    readonly defaultSensitivity?: MemorySensitivity;
    readonly resolver?: CaptureMemoryResolver;
    readonly allowGlobalScope?: boolean;
    readonly scopeKind?: MemoryScopeKind;
    readonly maxBodyChars?: number;
}
export interface WorkflowOutcomeInput {
    readonly runId: WorkflowRunId;
    readonly outcomeKind: "success" | "corrected" | "failed";
    readonly structuredReport: string;
    readonly capturedAt: number;
}
export type CaptureOutcome = {
    readonly kind: "candidate";
    readonly proposal: MemoryProposal;
    readonly requiresApproval: boolean;
} | {
    readonly kind: "update";
    readonly operation: MemoryUpdate;
} | {
    readonly kind: "forget";
    readonly operation: MemoryForget;
    readonly requiresConfirmation: boolean;
} | {
    readonly kind: "supersession";
    readonly operation: MemorySupersession;
} | {
    readonly kind: "rejected";
    readonly reason: RejectionReason;
};
export type MemoryScopeKindHint = Extract<MemoryScopeKind, "user" | "project" | "workspace">;
export interface SalienceInput {
    readonly userText: string;
    readonly assistantText?: string;
    readonly existingBodies: readonly string[];
    readonly context: CaptureContext;
    readonly policy?: CapturePolicyOptions;
}
export interface SalienceDeps {
    readonly callModel: (system: string, user: string) => Promise<string>;
    readonly now: () => number;
    readonly newMemoryId: () => MemoryId;
    readonly newProposalId: () => MemoryProposalId;
}
//# sourceMappingURL=types.d.ts.map