import { un as OpenClawPluginToolContext } from "../../channel-core-DmnMLBXB.js";
import { it as MemorySearchResult, n as OpenClawConfig, tt as MemoryProviderStatus, ut as MemorySyncProgressUpdate } from "../../types.openclaw-BE90iBq2.js";
import "../../config-contracts-CzH7DGBq.js";
import { t as MemoryEmbeddingProbeResult } from "../../memory-core-host-engine-storage-Bbq923AW.js";
import { f as ShortTermRecallEntry, h as writeBackfillDiaryEntries, m as removeBackfillDiaryEntries, n as resolveMemoryRemDreamingConfig, p as dedupeDreamDiaryEntries, s as PromotionCandidate, t as resolveMemoryDeepDreamingConfig } from "../../memory-core-host-runtime-core-CcOwFQJR.js";
import { n as configureMemoryCoreDreamingState } from "../../dreaming-state-BzN0zLc4.js";
import { n as pluginStateIsolatedDoctorCheckIds, r as registerMemoryCoreDoctorChecks, t as MEMORY_MANAGED_LOCAL_EMBEDDING_SETUP_CHECK_ID } from "../../doctor-health-Dfetf6CH.js";
//#region extensions/memory-core/src/rem-evidence.d.ts
type GroundedRemPreviewItem = {
  text: string;
  refs: string[];
};
type GroundedRemCandidate = GroundedRemPreviewItem & {
  lean: "likely_durable" | "unclear" | "likely_situational";
};
type GroundedRemFilePreview = {
  path: string;
  facts: GroundedRemPreviewItem[];
  reflections: GroundedRemPreviewItem[];
  memoryImplications: GroundedRemPreviewItem[];
  candidates: GroundedRemCandidate[];
  renderedMarkdown: string;
};
type GroundedRemPreviewResult = {
  workspaceDir: string;
  scannedFiles: number;
  files: GroundedRemFilePreview[];
};
export declare function previewGroundedRemMarkdown(params: {
  workspaceDir: string;
  inputPaths: string[];
}): Promise<GroundedRemPreviewResult>;
//#endregion
//#region extensions/memory-core/src/dreaming-phases.d.ts
export declare function filterRecallEntriesWithinLookback(params: {
  entries: readonly ShortTermRecallEntry[];
  nowMs: number;
  lookbackDays: number;
}): ShortTermRecallEntry[];
type RemTruthSelection = {
  key: string;
  snippet: string;
  confidence: number;
  evidence: string;
};
type RemTruthCandidate = Omit<RemTruthSelection, "key">;
type RemDreamingPreview = {
  sourceEntryCount: number;
  reflections: string[];
  candidateTruths: RemTruthCandidate[];
  candidateKeys: string[];
  bodyLines: string[];
};
//#endregion
//#region extensions/memory-core/src/rem-harness.d.ts
type MemoryRemHarnessRemConfig = ReturnType<typeof resolveMemoryRemDreamingConfig>;
type MemoryRemHarnessDeepConfig = ReturnType<typeof resolveMemoryDeepDreamingConfig>;
type PreviewRemHarnessOptions = {
  workspaceDir: string;
  cfg?: OpenClawConfig;
  pluginConfig?: Record<string, unknown>;
  grounded?: boolean;
  groundedInputPaths?: string[];
  groundedFileLimit?: number;
  includePromoted?: boolean;
  candidateLimit?: number;
  remPreviewLimit?: number;
  nowMs?: number;
};
type PreviewRemHarnessResult = {
  workspaceDir: string;
  nowMs: number;
  remConfig: MemoryRemHarnessRemConfig;
  deepConfig: MemoryRemHarnessDeepConfig;
  recallEntryCount: number;
  remSkipped: boolean;
  rem: RemDreamingPreview;
  groundedInputPaths: string[];
  grounded: GroundedRemPreviewResult | null;
  deep: {
    candidateLimit?: number;
    candidateCount: number;
    truncated: boolean;
    candidates: PromotionCandidate[];
  };
};
export declare function previewRemHarness(params: PreviewRemHarnessOptions): Promise<PreviewRemHarnessResult>;
//#endregion
//#region extensions/memory-core/src/session-search-visibility.d.ts
type ConversationRecallContext = NonNullable<OpenClawPluginToolContext["conversationRecall"]>;
export declare function filterMemorySearchHitsBySessionVisibility(params: {
  cfg: OpenClawConfig;
  agentId?: string;
  requesterSessionKey: string | undefined;
  sandboxed: boolean;
  hits: MemorySearchResult[];
  conversationRecall?: ConversationRecallContext;
  /** Trusted control-plane calls may authorize only hits already scoped to this agent. */
  trustedAgentScope?: boolean;
}): Promise<MemorySearchResult[]>;
//#endregion
//#region extensions/memory-core/src/memory/local-embedding-provider.d.ts
export declare const MISSING_LOCAL_MEMORY_EMBEDDING_PROVIDER_MESSAGE: string;
//#endregion
export { MEMORY_MANAGED_LOCAL_EMBEDDING_SETUP_CHECK_ID, type MemoryEmbeddingProbeResult, type MemoryProviderStatus, type MemorySyncProgressUpdate, type OpenClawConfig, type PreviewRemHarnessOptions, type PreviewRemHarnessResult, configureMemoryCoreDreamingState, dedupeDreamDiaryEntries, pluginStateIsolatedDoctorCheckIds, registerMemoryCoreDoctorChecks, removeBackfillDiaryEntries, writeBackfillDiaryEntries };