UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

172 lines 6.41 kB
import { v as OpenClawPluginToolContext } from "./agent-harness-runtime-pGCreG_J.js"; import { ba as MemorySearchResult, ki as OpenClawConfig } from "./install-security-scan.types-CwuFCGpV.js"; import "./config-contracts-XvM_MVXG.js"; import { t as HealthCheck } from "./health-DhW-0z2E.js"; import { c as PromotionCandidate, n as resolveMemoryDeepDreamingConfig, p as ShortTermRecallEntry, r as resolveMemoryRemDreamingConfig } from "./memory-core-host-runtime-core-Cgfgh_Sr.js"; //#region extensions/memory-core/src/dreaming-dreams-file.d.ts declare function writeBackfillDiaryEntries(params: { workspaceDir: string; entries: Array<{ isoDay: string; bodyLines: string[]; sourcePath?: string; }>; preserveExisting?: boolean; timezone?: string; }): Promise<{ dreamsPath: string; written: number; replaced: number; }>; declare function removeBackfillDiaryEntries(params: { workspaceDir: string; }): Promise<{ dreamsPath: string; removed: number; }>; declare function dedupeDreamDiaryEntries(params: { workspaceDir: string; }): Promise<{ dreamsPath: string; removed: number; kept: number; }>; //#endregion //#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[]; }; declare function previewGroundedRemMarkdown(params: { workspaceDir: string; inputPaths: string[]; }): Promise<GroundedRemPreviewResult>; //#endregion //#region extensions/memory-core/src/dreaming-phases.d.ts 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[]; }; }; declare function previewRemHarness(params: PreviewRemHarnessOptions): Promise<PreviewRemHarnessResult>; //#endregion //#region extensions/memory-core/src/session-search-visibility.d.ts type ConversationRecallContext = NonNullable<OpenClawPluginToolContext["conversationRecall"]>; 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/doctor-vector-index-provider.d.ts type ProviderFailure = { provider: string; reason: string; requirement?: string; fixHint?: string; }; type VectorProviderFinding = ProviderFailure & { agentId: string; model: string; configPrefix: string; }; type InspectConfiguredProvider = (params: { config: OpenClawConfig; agentId: string; env: NodeJS.ProcessEnv; }) => Promise<ProviderFailure | null>; declare function collectVectorProviderFindings(params: { config: OpenClawConfig; env: NodeJS.ProcessEnv; stateDir: string; }, inspectProvider: InspectConfiguredProvider): Promise<VectorProviderFinding[]>; //#endregion //#region extensions/memory-core/src/doctor-health.d.ts declare const MEMORY_MANAGED_LOCAL_EMBEDDING_SETUP_CHECK_ID = "memory-core/managed-local-embedding-setup"; declare const pluginStateIsolatedDoctorCheckIds: readonly ["memory-core/managed-local-embedding-setup"]; type InspectManagedLocalEmbeddingSetup = (params: { config: Parameters<typeof collectVectorProviderFindings>[0]["config"]; env: NodeJS.ProcessEnv; agentId: string; provider: string; }) => ProviderFailure | null | undefined | Promise<ProviderFailure | null | undefined>; type MemoryCoreDoctorRegistrationHost = { registerHealthCheck: (check: HealthCheck) => void; getHealthCheck: (id: string) => HealthCheck | undefined; inspectEmbeddingProviderSetup: InspectManagedLocalEmbeddingSetup; memoryCoreActive: boolean; }; declare function registerMemoryCoreDoctorChecks(host: MemoryCoreDoctorRegistrationHost): void; //#endregion //#region extensions/memory-core/src/memory/local-embedding-provider.d.ts declare const MISSING_LOCAL_MEMORY_EMBEDDING_PROVIDER_MESSAGE: string; //#endregion export { filterMemorySearchHitsBySessionVisibility as a, previewRemHarness as c, dedupeDreamDiaryEntries as d, removeBackfillDiaryEntries as f, registerMemoryCoreDoctorChecks as i, filterRecallEntriesWithinLookback as l, MEMORY_MANAGED_LOCAL_EMBEDDING_SETUP_CHECK_ID as n, PreviewRemHarnessOptions as o, writeBackfillDiaryEntries as p, pluginStateIsolatedDoctorCheckIds as r, PreviewRemHarnessResult as s, MISSING_LOCAL_MEMORY_EMBEDDING_PROVIDER_MESSAGE as t, previewGroundedRemMarkdown as u };