import { i as NodmixConfig } from "./types.nodmix-B9QJSty6.js";
import { S as MemorySearchManager } from "./memory-state-3sKs-bSN.js";
//#region src/plugin-sdk/memory-core-engine-runtime.d.ts
type BuiltinMemoryEmbeddingProviderDoctorMetadata = {
  providerId: string;
  authProviderId: string;
  envVars: string[];
  transport: "local" | "remote";
  autoSelectPriority?: number;
};
type DreamingArtifactsAuditIssue = {
  severity: "warn" | "error";
  code: "dreaming-session-corpus-unreadable" | "dreaming-session-corpus-self-ingested" | "dreaming-session-ingestion-unreadable" | "dreaming-diary-unreadable";
  message: string;
  fixable: boolean;
};
type DreamingArtifactsAuditSummary = {
  dreamsPath?: string;
  sessionCorpusDir: string;
  sessionCorpusFileCount: number;
  suspiciousSessionCorpusFileCount: number;
  suspiciousSessionCorpusLineCount: number;
  sessionIngestionPath: string;
  sessionIngestionExists: boolean;
  issues: DreamingArtifactsAuditIssue[];
};
type RepairDreamingArtifactsResult = {
  changed: boolean;
  archiveDir?: string;
  archivedDreamsDiary: boolean;
  archivedSessionCorpus: boolean;
  archivedSessionIngestion: boolean;
  archivedPaths: string[];
  warnings: string[];
};
type ShortTermAuditIssue = {
  severity: "warn" | "error";
  code: "recall-store-unreadable" | "recall-store-empty" | "recall-store-invalid" | "recall-store-over-limit" | "recall-lock-stale" | "recall-lock-unreadable" | "qmd-index-missing" | "qmd-index-empty" | "qmd-collections-empty";
  message: string;
  fixable: boolean;
};
type ShortTermAuditSummary = {
  storePath: string;
  lockPath: string;
  updatedAt?: string;
  exists: boolean;
  entryCount: number;
  promotedCount: number;
  spacedEntryCount: number;
  conceptTaggedEntryCount: number;
  conceptTagScripts?: Record<string, unknown>;
  invalidEntryCount: number;
  issues: ShortTermAuditIssue[];
  qmd?: {
    dbPath?: string;
    collections?: number;
    dbBytes?: number;
  } | undefined;
};
type RepairShortTermPromotionArtifactsResult = {
  changed: boolean;
  removedInvalidEntries: number;
  removedOverflowEntries?: number;
  rewroteStore: boolean;
  removedStaleLock: boolean;
};
type MemoryIndexManagerFacade = {
  get(params: {
    cfg: NodmixConfig;
    agentId: string;
    purpose?: "default" | "status";
  }): Promise<MemorySearchManager | null>;
};
type FacadeModule = {
  auditShortTermPromotionArtifacts: (params: {
    workspaceDir: string;
    qmd?: {
      dbPath?: string;
      collections?: number;
    };
  }) => Promise<ShortTermAuditSummary>;
  auditDreamingArtifacts: (params: {
    workspaceDir: string;
  }) => Promise<DreamingArtifactsAuditSummary>;
  getBuiltinMemoryEmbeddingProviderDoctorMetadata: (providerId: string) => BuiltinMemoryEmbeddingProviderDoctorMetadata | null;
  getMemorySearchManager: (params: {
    cfg: NodmixConfig;
    agentId: string;
    purpose?: "default" | "status";
  }) => Promise<{
    manager: MemorySearchManager | null;
    error?: string;
  }>;
  listBuiltinAutoSelectMemoryEmbeddingProviderDoctorMetadata: () => Array<BuiltinMemoryEmbeddingProviderDoctorMetadata>;
  MemoryIndexManager: MemoryIndexManagerFacade;
  repairShortTermPromotionArtifacts: (params: {
    workspaceDir: string;
  }) => Promise<RepairShortTermPromotionArtifactsResult>;
  repairDreamingArtifacts: (params: {
    workspaceDir: string;
    archiveDiary?: boolean;
    now?: Date;
  }) => Promise<RepairDreamingArtifactsResult>;
};
declare const auditShortTermPromotionArtifacts: FacadeModule["auditShortTermPromotionArtifacts"];
declare const auditDreamingArtifacts: FacadeModule["auditDreamingArtifacts"];
declare const getBuiltinMemoryEmbeddingProviderDoctorMetadata: FacadeModule["getBuiltinMemoryEmbeddingProviderDoctorMetadata"];
declare const getMemorySearchManager: FacadeModule["getMemorySearchManager"];
declare const listBuiltinAutoSelectMemoryEmbeddingProviderDoctorMetadata: FacadeModule["listBuiltinAutoSelectMemoryEmbeddingProviderDoctorMetadata"];
declare const MemoryIndexManager: FacadeModule["MemoryIndexManager"];
declare const repairShortTermPromotionArtifacts: FacadeModule["repairShortTermPromotionArtifacts"];
declare const repairDreamingArtifacts: FacadeModule["repairDreamingArtifacts"];
//#endregion
export { BuiltinMemoryEmbeddingProviderDoctorMetadata, DreamingArtifactsAuditIssue, DreamingArtifactsAuditSummary, MemoryIndexManager, RepairDreamingArtifactsResult, RepairShortTermPromotionArtifactsResult, ShortTermAuditIssue, ShortTermAuditSummary, auditDreamingArtifacts, auditShortTermPromotionArtifacts, getBuiltinMemoryEmbeddingProviderDoctorMetadata, getMemorySearchManager, listBuiltinAutoSelectMemoryEmbeddingProviderDoctorMetadata, repairDreamingArtifacts, repairShortTermPromotionArtifacts };