// ── Types ──────────────────────────────────────────────────────────
export type {
  BasePalaceWingDoc,
  BasePalaceRoomDoc,
  BasePalaceMemoryDoc,
  BasePalaceTunnelDoc,
  BasePalaceKGTripleDoc,
  BasePalaceDiaryDoc,
  ExtractedMemory,
} from './types.js';

// ── Halls ──────────────────────────────────────────────────────────
export { ALL_HALL_TYPES, HALL_PRESETS, getHallPreset, hallFromLabel } from './halls.js';
export type { HallType, HallPreset } from './halls.js';

// ── Cosine Similarity ──────────────────────────────────────────────
export { cosineSimilarity, normalizeVector, topKByCosine } from './cosine.js';

// ── Deduplication ──────────────────────────────────────────────────
export { isContentDuplicate, isExactDuplicate, findClosestMatch } from './dedup.js';

// ── Relevance Decay ────────────────────────────────────────────────
export { computeDecayedRelevance, boostRelevance } from './decay.js';

// ── Extraction ─────────────────────────────────────────────────────
export {
  buildExtractionPrompt,
  parseExtractionResponse,
  regexFallbackExtraction,
} from './extraction.js';
export type { ExtractionContext } from './extraction.js';

// ── Knowledge Graph ────────────────────────────────────────────────
export { findContradictions, mergeTriples, isTripleCurrent } from './kg.js';
export type { TripleInput } from './kg.js';

// ── Wake-Up Context ────────────────────────────────────────────────
export {
  buildWakeUpLayers,
  truncateToTokenBudget,
  estimateTokens,
  WAKEUP_PRESETS,
} from './wakeup.js';
export type { WakeUpConfig, WakeUpContext, WakeUpLayer } from './wakeup.js';

// ── Config ─────────────────────────────────────────────────────────
export { palaceConfigSchema, parsePalaceConfig } from './config.js';
export type { PalaceConfig } from './config.js';
