UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

37 lines (36 loc) • 1.45 kB
import { n as assertDatabasePathIdentity } from "./sqlite-worker-identity-BH8ZkJU9.mjs"; import { a as deferSqliteWorkerCommitReceipt } from "./sqlite-worker-operation-settlement-OZQM-wtd.mjs"; 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 { n as unregisterOpenClawAgentDatabase } from "./openclaw-agent-db-registry-DobcJNwx.mjs"; //#region src/state/openclaw-agent-db-registry.worker.ts const agentDatabaseRegistryOperations = { "agentDatabaseRegistry.remove": (e, { stateOptions: t }) => { const n = t(); return runOpenClawStateWriteTransaction((t) => { requestSqliteWorkerOperationAdmission({ stage: "transaction", facts: void 0 }); assertDatabasePathIdentity(e.agentPath, e.identity); unregisterOpenClawAgentDatabase({ agentId: e.agentId, path: e.agentPath, env: n.env }); requestSqliteWorkerOperationAdmission({ stage: "commit", facts: void 0 }); const r = { agentId: e.agentId, agentPath: e.agentPath, stateDatabasePath: t.path, stateDatabaseIdentity: requireOpenClawStateDatabaseIdentity(t).key }; deferSqliteWorkerCommitReceipt(t.db, r); return r; }, n); } }; //#endregion export { agentDatabaseRegistryOperations };