UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

25 lines (24 loc) • 993 B
import { n as withOpenClawAgentDatabaseReadOnly } from "./openclaw-agent-db-readonly-DAqV3tqr.mjs"; import { n as captureSessionEntryReadSource } from "./session-entry-read-source-zzWLWZhr.mjs"; import { t as readSessionCleanupSnapshotInDatabase } from "./cleanup-service-read.kernel-Cz4NFCyQ.mjs"; //#region src/config/sessions/cleanup-service-read.worker.ts function readSessionCleanupSnapshot(request) { const result = withOpenClawAgentDatabaseReadOnly((database) => { const source = captureSessionEntryReadSource(database, request.expectedIdentity); return { ...readSessionCleanupSnapshotInDatabase(database, request), source }; }, { ...request.database, env: request.env }); if (!result.found && request.expectedIdentity?.key.startsWith("file:")) throw new Error("Session cleanup lost its captured physical owner"); return result.found ? result.value : { kind: "session-cleanup", store: {}, missing: [] }; } //#endregion export { readSessionCleanupSnapshot };