UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.51 kB
import{a as withDatabaseEngineSelection,n as getDatabaseEngineSelection}from"./context-DZjni16e.mjs";import path from"node:path"; //!src/infra/database-engine/agent-port.ts const agentPortProvider={id:`agent`,minimumPostgresVersion:16,async loadDescriptor(e,t){const{loadAgentPortDescriptor:n}=await import(`./agent-port-descriptor-umHaLxA3.mjs`);return n(t)},matchesSqlite:e=>[`schema_meta`,`session_nodes`,`transcript_events`].every(t=>e.has(t)),resolveRoots:resolveAgentPortRoots};async function resolveAgentPortRoots(e,t){const[{listAgentIds:n},{resolveSharedMainAuthAgentDir:r},{resolveConfiguredAgentDatabaseTargets:i},{listDefaultAgentDatabasePaths:a},{inspectOpenClawRegisteredAgentDatabases:o},{resolveDatabaseEngineSelection:s}]=await Promise.all([import(`./agent-roster-CpoqSzSv.mjs`),import(`./shared-main-dir-BVo4EHiK.mjs`),import(`./targets-C8LX-ajf.mjs`),import(`./agent-database-path-discovery-BIIMF3fY.mjs`),import(`./openclaw-agent-db-registry-listing-BqcuBeOq.mjs`),import(`./config-CVpxUujP.mjs`)]);const c={...e.env,OPENCLAW_STATE_DIR:e.stateDir};const l=t??await withDatabaseEngineSelection(getDatabaseEngineSelection()??await s(e.config,c),()=>o({env:c,includeIncompatibleSchemaVersions:true}));return[.../* @__PURE__ */ new Set([path.join(r(c),`openclaw-agent.sqlite`),...(await a(e.stateDir)).map(e=>e.path),...i(e.config,{env:c,registeredDatabases:l,nativeAgentIds:new Set(n(e.config))}).map(e=>e.path),...l.map(e=>e.path)])]}export{resolveAgentPortRoots as n,agentPortProvider as t};