openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
21 lines • 19.5 kB
JavaScript
import{a as e}from"./transcript-record-coerce-CPLgmAk9.mjs";import{i as t}from"./transcript-global-singleton-DIJgobpU.mjs";import{M as n,d as r}from"./transcript-plugin-instance-invocation-7y9lfaeO.mjs";import{_ as i}from"./transcript-agent-creation-claim-Da8lP1e6.mjs";import{a,o,v as s}from"./transcript-sqlite-database-admission-IPmtadyc.mjs";import{n as c}from"./transcript-path-guards-u0N7Z9_x.mjs";import{d as l,m as u}from"./transcript-sqlite-worker-identity-CA1Up8Es.mjs";import{a as d,o as f,r as p}from"./transcript-sqlite-worker-request-class-D66Pq2HG.mjs";import{t as m}from"./transcript-subsystem-C0UTtuvS.mjs";import{I as h,L as g,O as _,P as v,R as ee,a as y,at as b,c as x,l as S,n as C,ot as w,r as te,s as ne,t as T,z as E}from"./transcript-sqlite-readonly-worker-cXU3LbpW.mjs";import{_ as D}from"./transcript-openclaw-state-worker-error-CXQGmrMf.mjs";import{v as O}from"./transcript-sqlite-post-commit-B_pko32i.mjs";import{m as k}from"./transcript-sqlite-user-version-CMolZa8i.mjs";import{a as A}from"./transcript-sqlite-transaction-CBQXI8WC.mjs";import{A as j,D as M}from"./transcript-openclaw-agent-db-resources-W6NYYBYU.mjs";import{d as N}from"./transcript-gateway-process-argv-CixOvMwa.mjs";import{V as P,a as F,d as I,f as L,g as R,m as z,t as B,y as V}from"./transcript-sqlite-private-snapshot-fork-CKFbjfTN.mjs";import{r as H,t as U}from"./transcript-node-sqlite-RfCz-ZxM.mjs";import{t as W}from"./transcript-sqlite-snapshot-staging-owner-B-Am-HqY.mjs";import G from"node:path";import{AsyncLocalStorage as K}from"node:async_hooks";import q,{existsSync as J,mkdirSync as re}from"node:fs";const Y=[``,`-wal`,`-shm`,`-journal`],ie=Y.slice(1);Buffer.from([0,5,22,7]);const ae=m(`state/sqlite`);var SqliteOrphanedSidecarsError=class extends Error{constructor(e,t,n){super(`SQLite database is missing at ${e}, and orphaned sidecars could not be copied: ${t.join(`, `)}. Refusing to open because SQLite could delete orphan WAL or journal state. Preserve the sidecar bytes, restore the main database, and pair it with the matching sidecar before retrying.`,{cause:n}),this.name=`SqliteOrphanedSidecarsError`}};function resolveSqliteDatabaseFilePaths(e){return Y.map(t=>`${e}${t}`)}function findMatchingOrphanedSidecarCopy(e,t){let n=G.dirname(e),r=`${G.basename(e)}.orphaned-`,i=q.readdirSync(n,{withFileTypes:!0}).filter(e=>e.isFile()&&e.name.startsWith(r)).map(e=>G.join(n,e.name)).filter(e=>q.statSync(e).size===t);if(i.length===0)return;let a=N(e);for(let e of i)if(N(e)===a)return e}function copyOrphanedSidecar(e,t){let n=`${e}.orphaned-${t}`;for(let t=0;;t+=1){let r=t===0?n:`${n}-${t}`;try{return q.copyFileSync(e,r,q.constants.COPYFILE_EXCL),r}catch(e){if(e.code!==`EEXIST`)throw e}}}function quarantineOrphanedSqliteSidecars(e){if(q.existsSync(e))return;let t=[{path:`${e}-wal`,minimumBytes:32},{path:`${e}-journal`,minimumBytes:0}].flatMap(e=>{let t=q.statSync(e.path,{throwIfNoEntry:!1});return t?.isFile()===!0&&t.size>e.minimumBytes?[{path:e.path,size:t.size}]:[]});if(t.length===0)return;let n=Date.now(),r=[];try{for(let e of t){if(findMatchingOrphanedSidecarCopy(e.path,e.size))continue;let t=copyOrphanedSidecar(e.path,n);r.push({quarantinePath:t,sourcePath:e.path})}}catch(n){throw new SqliteOrphanedSidecarsError(e,t.map(e=>e.path),n)}if(r.length===0)return;let i=r.map(({sourcePath:e,quarantinePath:t})=>`${e} -> ${t}`);ae.warn(`SQLite database is missing at ${e}; copied orphaned sidecars: ${i.join(`, `)}. Committed frames could not be applied because the main database is missing. The bytes are preserved. Recovery requires restoring the main database and pairing it with the quarantined file.`,{databasePath:e,copiedSidecars:r})}function buildUpdateRehearsalPathEnv(e){return{HOME:e,USERPROFILE:e,TMPDIR:e,TMP:e,TEMP:e,XDG_CONFIG_HOME:G.join(e,`config`),XDG_CACHE_HOME:G.join(e,`cache`),XDG_DATA_HOME:G.join(e,`data`),XDG_STATE_HOME:G.join(e,`state`),OPENCLAW_HOME:e,OPENCLAW_STATE_DIR:e,OPENCLAW_CONFIG_PATH:G.join(e,`openclaw.json`),OPENCLAW_WORKSPACE_DIR:G.join(e,`workspace`),OPENCLAW_SKIP_CHANNELS:`1`,OPENCLAW_SKIP_PROVIDERS:`1`,OPENCLAW_SKIP_CRON:`1`,OPENCLAW_SKIP_GMAIL_WATCHER:`1`,OPENCLAW_SKIP_CANVAS_HOST:`1`,OPENCLAW_SKIP_BROWSER_CONTROL_SERVER:`1`,OPENCLAW_SKIP_STARTUP_MODEL_PREWARM:`1`,OPENCLAW_NO_AUTO_UPDATE:`1`,NODE_DISABLE_COMPILE_CACHE:`1`}}function projectUpdateRehearsalDatabaseConfig(t,n){if(!e(t)||!e(t.database)||!resolveUpdateRehearsalRoot(n))return t;let{engine:r,families:i}=t.database;return r===`postgres`||e(i)&&Object.values(i).some(t=>e(t)&&t.engine===`postgres`)?{...t,database:{engine:`sqlite`}}:t}function resolveUpdateRehearsalRoot(e){let t=e.OPENCLAW_STATE_DIR;if(t&&G.isAbsolute(t)&&[`0`,`1`].includes(e.OPENCLAW_UPDATE_IN_PROGRESS??``)&&!Object.entries(buildUpdateRehearsalPathEnv(t)).some(([t,n])=>e[t]!==n)&&e.OPENCLAW_SERVICE_REPAIR_POLICY===`external`&&e.OPENCLAW_UPDATE_PARENT_ALLOWS_GATEWAY_SERVICE_REPAIR===`0`&&e.OPENCLAW_UPDATE_PARENT_ALLOWS_GATEWAY_ACTIVATION===`0`&&!e.OPENCLAW_COMPATIBILITY_HOST_VERSION)return G.resolve(t)}function isUpdateRehearsalReadOnlyPath(e,t){let n=resolveUpdateRehearsalRoot(t);if(!n)return!1;let i=G.resolve(e);return!c(n,i)||!c(r(n),r(i))}function isUpdateRehearsalPrivateDatabase(e,t){return resolveUpdateRehearsalRoot(t)!==void 0&&resolveSqliteDatabaseFilePaths(e).every(e=>!isUpdateRehearsalReadOnlyPath(e,t))}function readSqliteFileGenerationSync(e){return R(S(e,void 0,`file-generation`))}const X=t(Symbol.for(`openclaw.sqliteSnapshotFlights`),()=>({unscoped:/* @__PURE__ */ new Map,scoped:/* @__PURE__ */ new WeakMap}));function completed(e){let t=p(()=>{});return t.resolve(e),t.operation}function serviceWhenSettled(e,t){e.result.then(t,t)}function createFlight(e,t,n){let r,i=!1,a=!1,o,s,c,l=p(()=>{if(!(a||l.operation.read().status!==`pending`)){a=!0;try{i||(i=!0,r=n(d.controller.signal,e=>c=e),serviceWhenSettled(r.operation,serviceFlight)),r.operation.service();let e=r.operation.read();e.status===`fulfilled`?l.resolve(e.value):e.status===`rejected`&&l.reject(e.error)}catch(e){l.reject(e)}finally{a=!1}}}),u=p(()=>{l.operation.service();let n=l.operation.read();if(n.status!==`pending`&&u.operation.read().status===`pending`){if(e.get(t)===d&&e.delete(t),n.status===`rejected`)u.reject(c??n.error);else if(d.references>0)u.resolve(n.value);else{o||(o=releaseSnapshot(d,n.value),serviceWhenSettled(o,()=>u.operation.service())),o.service();let e=o.read();e.status===`fulfilled`?e.value?u.resolve(n.value):u.reject(new O(`SQLite orphan snapshot cleanup did not complete`)):e.status===`rejected`&&u.reject(e.error)}}});function serviceFlight(){l.operation.service();for(let e of d.listeners)e();u.operation.service()}let d={controller:new AbortController,references:0,listeners:/* @__PURE__ */ new Set,production:l.operation,settled:u.operation,closeProducer(){return s??=r?.startClose?.()??completed(void 0),s}};return E(u.operation.result,()=>{d.controller.abort(/* @__PURE__ */ Error(`SQLite snapshot owner stopped`)),serviceFlight()}),d}function releaseSnapshot(e,t){return d(t.startCleanup(),t=>t?f(e.closeProducer(),()=>!0):completed(!1))}function leaseFlight(e,t){let n=!1,r,releaseReference=()=>(n||(n=!0,e.references--),e.references===0),startCleanup=()=>(r??=!n&&releaseReference()?releaseSnapshot(e,t):completed(!0),r);return{location:t.location,cleanupRoot:t.cleanupRoot,privateFamily:t.privateFamily,cleanup(){if(n){let e=r?.read();return!e||e.status===`fulfilled`&&e.value}if(e.references>1)return releaseReference(),!0;let i=t.cleanup();return i&&releaseReference(),i},cleanupAsync:()=>startCleanup().result,startCleanup}}function startSnapshotFlight(e,t,n,r,i){r?.throwIfAborted();let a=`${u(e).key}:${t}`,o=X.unscoped;if(i?.scope){let e=X.scoped.get(i.scope);e||(e=/* @__PURE__ */ new Map,X.scoped.set(i.scope,e)),o=e}let s=o.get(a);s||(s=createFlight(o,a,n),o.set(a,s));let c=s;c.references++;let l=!1,d=!1,m,h=p(()=>{if(h.operation.read().status===`pending`){if(l||r?.aborted){if(d||(d=!0,c.references--),c.references===0&&(c.controller.abort(r?.reason),o.get(a)===c&&o.delete(a),c.settled.service(),c.settled.read().status===`pending`))return;h.reject(r?.reason??/* @__PURE__ */ Error(`SQLite snapshot preparation closed`))}else{c.production.service();let e=c.production.read();if(e.status===`pending`)return;e.status===`fulfilled`?h.resolve(leaseFlight(c,e.value)):(c.references--,h.reject(e.error))}r?.removeEventListener(`abort`,service),c.listeners.delete(service),c.settled.service()}}),service=()=>h.operation.service();return serviceWhenSettled(c.settled,service),c.listeners.add(service),r?.addEventListener(`abort`,service,{once:!0}),queueMicrotask(service),{...h.operation,startClose(){l=!0,h.operation.service();let e=h.operation.read();return m??=e.status===`fulfilled`?f(e.value.startCleanup(),e=>{if(!e)throw new O(`SQLite snapshot lease cleanup did not complete`)}):c.references===0?c.closeProducer():completed(void 0),m}}}function startAwaitedSnapshotWork(e){let t=p(()=>{});return Promise.resolve().then(e).then(t.resolve,t.reject),t.operation}async function prepareSingleFlightSqliteSnapshot(e,t,n,r,i){return startSnapshotFlight(e,t,(e,t)=>({operation:startAwaitedSnapshotWork(async()=>{let r=await n(e,t);return{...r,startCleanup:()=>startAwaitedSnapshotWork(()=>r.cleanupAsync())}})}),r,i).result}function startSingleFlightSqliteSnapshot(e,t,n,r,i){return startSnapshotFlight(e,t,(e,t)=>{let r=n(e,t);return{operation:r,startClose:()=>r.startClose()}},r,i)}const Z=t(Symbol.for(`openclaw.sqliteLiveSnapshotOwners`),()=>/* @__PURE__ */ new Map);function registerLiveSqliteSnapshotOwner(e){let t=u(e.databasePath),n={assertCurrent:e.assertCurrent,database:e.database};return Z.set(t.key,n),()=>{Z.get(t.key)===n&&Z.delete(t.key)}}function prepareSqliteSnapshotFromLiveOwner(e,t){t?.throwIfAborted();let n=u(e),r=Z.get(n.key);if(r)return r.assertCurrent(),prepareSingleFlightSqliteSnapshot(n.canonicalPath,`live-owner:openclaw-state`,e=>F(r.database,r.assertCurrent,e),t)}function readCustodiedDrainedSqliteSource(e){if(j(M(),e)&&!(q.existsSync(`${e}-journal`)||(q.statSync(`${e}-wal`,{throwIfNoEntry:!1})?.size??0)>0))return q.statSync(e,{bigint:!0})}function assertCustodiedSourceUnchanged(e,t){let n=q.statSync(e,{bigint:!0,throwIfNoEntry:!1});if(!n||n.ino!==t.ino||n.size!==t.size||n.mtimeNs!==t.mtimeNs||readCustodiedDrainedSqliteSource(e)===void 0)throw Error(`SQLite source changed during in-place inspection: ${e}`)}function openSqliteReadOnlyDatabase(e,t={}){let n=b.getStore();if(!n||!w(`agent`,e))return U(e,{...t,readOnly:!0});let r=readCustodiedDrainedSqliteSource(e),i=r||isUpdateRehearsalPrivateDatabase(e,process.env)?void 0:prepareSqliteReadOnlyLocationSync(e),a=i?ee(i.cleanupRoot??G.dirname(i.location)):void 0,o={},close=()=>{if(o.close?.(),a?.(),i&&!i.cleanup())throw new O(`SQLite inspection snapshot cleanup failed.`);n.readers.delete(close)};n.readers.add(close);let s=i?.location??(r?H(e):e),c=U(s,{...t,readOnly:!0}),l=c.close.bind(c);return o.close=()=>{c.isOpen&&(l(),r&&assertCustodiedSourceUnchanged(e,r))},c.close=close,c}async function prepareSqliteReadOnlyLocation(e,t={}){let r=y(t.signal),i=t.preserveSourceArtifacts===!0||w(`agent`,e);try{if(r?.throwIfAborted(),!i&&t.allowLiveOwner!==!1){let t=prepareSqliteSnapshotFromLiveOwner(e,r);if(t)return await t}r?.throwIfAborted();let a=t.requireCleanup??t.signal!==void 0;return prepareSingleFlightSqliteSnapshot(e,`${i?`worker-sync`:`worker-async`}:${a?`strict`:`best-effort`}:sync-token`,async(t,r)=>{let o;try{t.throwIfAborted(),o=await I(void 0,!1,t),t.throwIfAborted();let n=await ne(e,{mode:i?`sync`:`async`,signal:t,stagingRoot:o});return t.throwIfAborted(),_(n,o,a)}catch(e){if(o&&!await g(o)){let t=new O(`${n(e)}; SQLite snapshot cleanup failed: ${o}`,{cause:e});throw r?.(t),t}throw e instanceof O?(r(e),e):(t.throwIfAborted(),e)}},r)}catch(e){throw r?.throwIfAborted(),e}}function startSqliteReadOnlyLocationAsync(e,t={}){let n=y(t.signal);n?.throwIfAborted();let r=G.resolve(e),i=t.preserveSourceArtifacts===!0||w(`agent`,r),a=t.expectedSourceIdentity===void 0?void 0:l(t.expectedSourceIdentity);if(a&&!i)throw Error(`SQLite source identity requires artifact-preserving preparation`);let o=t.signal!==void 0,{env:s,cwd:c}=T(),u=z(),d=te(),p=W(),m=K.snapshot();return startSingleFlightSqliteSnapshot(r,`${i?`worker-sync`:`worker-async`}:${o?`strict`:`best-effort`}:async-token${a?`:${JSON.stringify(a)}`:``}`,e=>m(()=>{let t=p.start({type:`prepare`,root:u,pathname:r,allowLegacyWorker:!1,preserveSourceArtifacts:i,expectedSourceIdentity:a,deadlineOwnedByCaller:d,launch:{env:s,cwd:c,transport:{kind:`native`}}},e);return{...f(t,e=>{if(e.type!==`prepared`)throw Error(`SQLite snapshot producer returned an allocation without its prepared location`);let t=_(e.location,e.directory,o);return t.privateFamily=i?B(e.location,e.directory):void 0,t}),startClose:()=>t.startClose()}}),n,{scope:p})}async function prepareSqliteReadOnlyLocationAwaited(e,t){let n=y(t.signal),r=G.resolve(e),i=l(t.expectedSourceIdentity);return prepareSingleFlightSqliteSnapshot(r,`worker-${t.allowLiveOwner?`metadata`:`sync`}:strict:awaited-token:${JSON.stringify(i)}`,async(e,n)=>{let a=t.allowLiveOwner;return useAwaitedSnapshotWorker(e,n,async(t,n)=>{let o={mode:a?`metadata`:`sync`,stagingRoot:n,expectedSourceIdentity:i,signal:e},s=a?await x(r,o):await t.run(r,o);if(typeof s!=`string`)throw Error(`SQLite snapshot preparation returned an invalid location`);return e.throwIfAborted(),_(s,n,!0)})},n)}async function useAwaitedSnapshotWorker(e,t,n){e.throwIfAborted();let r=T(),i=C({...r,retainOnOperationError:!0}),a,o,retire=()=>{if(o&&o.read().status!==`rejected`)return o;let e=p(()=>{});return o=e.operation,(async()=>{if(a){let e=i.isRetired();e&&(await i.close(),i=C(r)),await i.run(a,{mode:e?`staging-reconcile`:`staging-retire`})}await i.close(),await i.closed,a&&await q.promises.rm(a,{recursive:!0,force:!0,maxRetries:3,retryDelay:20})})().then(e.resolve,e.reject),o};try{let t=await i.run(z(),{mode:`staging-create`,signal:e});if(typeof t!=`string`)throw Error(`SQLite snapshot allocation returned an invalid directory`);a=t,v(a,retire),e.throwIfAborted();let r=await n(i,a);return e.throwIfAborted(),r}catch(e){try{if(a){if(!await g(a))throw new O(`SQLite snapshot cleanup failed: ${a}`)}else await i.close(),await i.closed}catch(n){let r=AggregateError([e,n],`SQLite snapshot preparation and cleanup failed`);throw t?.(r),r}throw e}}function prepareSqliteReadOnlyLocationSync(e,t){let r=L();try{return _(S(e,r,`sync`,t),r)}catch(e){throw h(r)?e:new O(`${n(e)}; SQLite snapshot cleanup failed: ${r}`,{cause:e})}}const Q=5e3,$={name:`openclaw.quarantine.schema`,lifetime:`process`,schemaDependent:!0,read(e){if(typeof e==`object`&&e&&`version`in e&&typeof e.version==`number`)return{version:e.version}}};function quarantineDecisionAdmission(e){return{name:`openclaw.quarantine.decision:${G.resolve(e)}`,lifetime:`process`,read:e=>e===null||isQuarantineDecision(e)?e:void 0}}function isQuarantineDecision(t){return e(t)&&(t.kind===`agent`||t.kind===`state`)&&typeof t.reason==`string`&&typeof t.quarantinedAt==`number`&&(t.verifiedGenerationJson===null||typeof t.verifiedGenerationJson==`string`)}function configureQuarantineWriter(e,t){e.exec(`
PRAGMA journal_mode = DELETE;
PRAGMA synchronous = FULL;
`);let n=readQuarantineSchemaVersion(e,t);n!==2&&(n===1?A(e,()=>e.exec(`
ALTER TABLE quarantined_databases ADD COLUMN verified_generation TEXT;
PRAGMA user_version = 2;
`)):n!==2&&A(e,()=>e.exec(`
CREATE TABLE IF NOT EXISTS quarantined_databases (
path TEXT NOT NULL PRIMARY KEY,
kind TEXT NOT NULL,
reason TEXT NOT NULL,
quarantined_at INTEGER NOT NULL,
writer_app_version TEXT,
verified_generation TEXT
) STRICT;
PRAGMA user_version = 2;
`)),e.exec(`CREATE TABLE IF NOT EXISTS agent_integrity_verifications (
path TEXT NOT NULL PRIMARY KEY, dev TEXT NOT NULL, ino TEXT NOT NULL,
app_version TEXT NOT NULL, verified_at INTEGER NOT NULL,
clean_close INTEGER NOT NULL CHECK (clean_close IN (0, 1))
) STRICT;`),s(e,$,{version:2}))}function readQuarantineSchemaVersion(e,t,n=!1){let r=n?void 0:o(e,$);if(r)return r.version;let i=e.prepare(`PRAGMA user_version`).get()?.user_version;if(typeof i!=`number`||!Number.isInteger(i))throw Error(`OpenClaw quarantine store ${t} has an invalid schema version.`);if(i>2)throw Error(`OpenClaw quarantine store ${t} uses newer schema version ${i}.`);return i!==0&&s(e,$,{version:i}),i}function withQuarantineWriter(e,t){let n=i(e),r=J(n),a=G.dirname(n);re(a,{recursive:!0,mode:448}),P(a,448);let o=U(n,{timeout:Q}),s=!1;try{r||P(n,384),configureQuarantineWriter(o,n);let e=t(o);return s=!0,e}finally{o.isOpen&&o.close(),(s||!r)&&P(n,384)}}function ensureOpenClawQuarantineStore(e){J(i(e))||withQuarantineWriter(e,()=>{})}function readOpenClawDatabaseQuarantine(e,t={}){let n=i(t.env??process.env),load=()=>readPersistedQuarantineDecision(e,n,t.fresh)??null,r=t.fresh?load():a(n,quarantineDecisionAdmission(e),load);return r?resolveQuarantineDecision(r,e,n):void 0}function readPersistedQuarantineDecision(e,t,n=!1){if(!J(t))return;let r=openSqliteReadOnlyDatabase(t,{timeout:Q}),i;try{i={value:readQuarantineDecision(r,e,t,n)}}catch(e){i={error:e}}try{r.close()}catch(n){let r,a=`error`in i?i.error:void 0;if(`value`in i&&i.value)try{r=resolveQuarantineDecision(i.value,e,t)}catch(e){a=e}throw new D(a===void 0?[n]:[a,n],r)}if(`error`in i)throw i.error;return i.value}function readQuarantineDecision(e,t,n,r=!1){let i=readQuarantineSchemaVersion(e,n,r);if(i===0)return;let a=i>=2?`, verified_generation`:``,o=e.prepare(`SELECT kind, reason, quarantined_at${a} FROM quarantined_databases WHERE path = ? LIMIT 1`).get(G.resolve(t));if(!o)return;let s=i>=2?o.verified_generation:void 0;if(o.kind!==`agent`&&o.kind!==`state`||typeof o.reason!=`string`||typeof o.quarantined_at!=`number`||!Number.isInteger(o.quarantined_at)||s!=null&&typeof s!=`string`)throw Error(`OpenClaw quarantine store ${n} contains an invalid row.`);return{kind:o.kind,quarantinedAt:o.quarantined_at,reason:o.reason,verifiedGenerationJson:typeof s==`string`?s:null}}function resolveQuarantineDecision(e,t,n){if(e.verifiedGenerationJson!==null){let r;try{r=R(e.verifiedGenerationJson)}catch{throw Error(`OpenClaw quarantine store ${n} contains an invalid row.`)}try{let e=readSqliteFileGenerationSync(G.resolve(t));if(!V(r,e))return}catch{return}}return{kind:e.kind,quarantinedAt:e.quarantinedAt,reason:e.reason}}function readOpenClawDatabaseQuarantineFailure(e,t,n={}){let r,i;try{r=readOpenClawDatabaseQuarantine(t,n)}catch(e){if(!(e instanceof D))return;if(!e.quarantine)throw e;r=e.quarantine,i=e}if(!r)return;let a=/* @__PURE__ */ Error(`OpenClaw ${e} database ${t} is quarantined after integrity verification failed: ${r.reason??`unknown integrity error`}. Restore the database from a backup or repair it, then run openclaw doctor --fix to clear the quarantine. See ${k}.`);return a.name=`SqliteIntegrityError`,i&&(a.cause=i),a}export{prepareSqliteReadOnlyLocationAwaited as a,registerLiveSqliteSnapshotOwner as c,resolveUpdateRehearsalRoot as d,ie as f,prepareSqliteReadOnlyLocation as i,isUpdateRehearsalPrivateDatabase as l,resolveSqliteDatabaseFilePaths as m,readOpenClawDatabaseQuarantineFailure as n,prepareSqliteReadOnlyLocationSync as o,quarantineOrphanedSqliteSidecars as p,openSqliteReadOnlyDatabase as r,startSqliteReadOnlyLocationAsync as s,ensureOpenClawQuarantineStore as t,projectUpdateRehearsalDatabaseConfig as u};