UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

21 lines (20 loc) • 1.09 kB
import { f as requestSqliteWorkerOperationAdmission } from "./sqlite-worker-operation-admission-9E_X-oRy.mjs"; import { w as requireOpenClawStateDatabaseIdentity } from "./openclaw-state-db-cache-CkwtTqzF.mjs"; import { l as runOpenClawStateWriteTransaction } from "./openclaw-state-db-ARhwdPJg.mjs"; import { m as releaseExitedOpenClawAgentDatabaseLeaseInDatabase } from "./openclaw-agent-db-lease-BZhGt_sk.mjs"; //#region src/state/openclaw-agent-execution-cleanup.worker.ts function executeAgentDatabaseCleanupCommand(e, t, n) { runOpenClawStateWriteTransaction((t) => { if (t.path !== e.input.sharedStatePath || requireOpenClawStateDatabaseIdentity(t).key !== e.input.sharedStateIdentity) throw new Error("Retired agent cleanup cannot adopt a replacement shared database"); releaseExitedOpenClawAgentDatabaseLeaseInDatabase(t.db, e.input, e.input.outcome, () => requestSqliteWorkerOperationAdmission({ stage: "prepare", facts: "agent-integrity-invalidated" })); }, { database: t, path: t.path, env: n }); } //#endregion export { executeAgentDatabaseCleanupCommand };