import type { MemoryEdge, MemoryId, MemoryRecord, MemoryScope, MemoryType } from "@oscharko-dev/keiko-contracts/memory";
export interface MemoryQueryPort {
    /** Fetch memories visible at the given scope. Cross-scope queries forbidden. */
    listByScope(scope: MemoryScope, options?: ListByScopeOptions): readonly MemoryRecord[];
    /** Fetch outgoing edges for graph-proximity scoring. */
    listOutgoingEdges?(memoryId: MemoryId): readonly MemoryEdge[];
    /** Fetch incoming edges. */
    listIncomingEdges?(memoryId: MemoryId): readonly MemoryEdge[];
}
export interface ListByScopeOptions {
    readonly includeForgotten?: boolean;
    readonly includeArchived?: boolean;
    readonly includeExpired?: boolean;
    readonly maxResults?: number;
}
export interface RankingWeights {
    readonly relevance: number;
    readonly recency: number;
    readonly confidence: number;
    readonly pinned: number;
    readonly correction: number;
    readonly graph: number;
    readonly semantic: number;
}
export declare const DEFAULT_RANKING_WEIGHTS: RankingWeights;
export declare const DEFAULT_BUDGET_TOKENS = 1500;
export declare const DEFAULT_MAX_INCLUDED = 12;
export declare const DEFAULT_STALE_CONFIDENCE_THRESHOLD = 0.3;
export declare const DEFAULT_LIST_BY_SCOPE_MAX_RESULTS = 500;
export interface MemoryRetrievalRequest {
    readonly scopes: readonly MemoryScope[];
    readonly queryText?: string;
    readonly types?: readonly MemoryType[];
    readonly nowMs: number;
    readonly budgetTokens?: number;
    readonly maxIncluded?: number;
    readonly recencyWeight?: number;
    readonly confidenceWeight?: number;
    readonly pinnedBoost?: number;
    readonly correctionBoost?: number;
    readonly graphProximityBoost?: number;
    readonly relevanceWeight?: number;
    readonly semanticWeight?: number;
    readonly staleConfidenceThreshold?: number;
    readonly semanticById?: ReadonlyMap<MemoryId, number>;
}
export interface MemoryContextBlockEntry {
    readonly memoryId: MemoryId;
    readonly bodyExcerpt: string;
    readonly inclusionReason: string;
}
export interface MemoryContextBlock {
    /** Compact text rendering for prompt assembly. */
    readonly text: string;
    /** Structured payload for UI/audit consumers. */
    readonly memories: readonly MemoryContextBlockEntry[];
}
export interface IncludedSubscores {
    readonly relevance: number;
    readonly recency: number;
    readonly confidence: number;
    readonly pinned: number;
    readonly correction: number;
    readonly graph: number;
    readonly semantic: number;
}
export interface IncludedMemory {
    readonly memoryId: MemoryId;
    readonly score: number;
    readonly subscores: IncludedSubscores;
    readonly inclusionReason: string;
}
export type OmittedReason = "suppressed-by-status" | "below-threshold" | "budget-exceeded" | "out-of-scope" | "type-filtered";
export interface OmittedMemory {
    readonly memoryId: MemoryId;
    readonly reason: OmittedReason;
    readonly suppressionDetail?: string;
}
export interface MemoryBudget {
    readonly tokens: number;
    readonly used: number;
}
export interface MemoryRetrievalResult {
    readonly contextBlock: MemoryContextBlock;
    readonly included: readonly IncludedMemory[];
    readonly omitted: readonly OmittedMemory[];
    readonly budget: MemoryBudget;
    readonly request: MemoryRetrievalRequest;
}
/**
 * Internal result type used by `assembleContextBlock`. Mirrors `MemoryRetrievalResult`
 * minus the `request` field, which is attached by `retrieveMemoryContext` after assembly.
 * The brief lists `assembleContextBlock(ranked, memories, options): MemoryRetrievalResult`
 * but the assembler has no need for the request envelope to compose its output — keeping
 * the function pure on its (ranked, memories, options) inputs is cleaner than threading
 * the request through a layer that does not read it.
 */
export type AssembledContext = Omit<MemoryRetrievalResult, "request">;
//# sourceMappingURL=types.d.ts.map