openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
23 lines (22 loc) • 789 B
JavaScript
import { E as settleSqliteSnapshotRequest, n as captureSqliteReadOnlyWorkerLaunch, t as captureSqliteSnapshotStagingOwner } from "./sqlite-snapshot-staging-owner-D6iplEEs.mjs";
import path from "node:path";
//#region src/infra/sqlite-snapshot-staging-allocation.ts
async function allocateWorkerOwnedSqliteSnapshotDirectory(e, t, n) {
const r = path.resolve(e);
const { env: i, cwd: a } = captureSqliteReadOnlyWorkerLaunch();
const o = captureSqliteSnapshotStagingOwner();
const s = o.start({
type: "allocate",
root: r,
allowLegacyWorker: t,
launch: {
env: i,
cwd: a,
transport: { kind: "native" }
}
}, n);
const c = await settleSqliteSnapshotRequest(s);
return o.retainDirectory(c.directory);
}
//#endregion
export { allocateWorkerOwnedSqliteSnapshotDirectory };