UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 1.01 kB
import{n as e}from"./transcript-agent-id-DmscQLD6.mjs";import{n as t}from"./transcript-session-key-normalization-3Mbu27cw.mjs";import{i as n}from"./transcript-session-key-MDDhuEG9.mjs";import{n as r}from"./transcript-store-entry-Ch3rW6qd.mjs";import{a as i}from"./transcript-kysely-sync-CAP5xe3V.mjs";function getSessionKysely(e){return i(e)}function resolveSqliteSessionKey(e,i){let a=r(e);return!a||a===`global`||a===`unknown`||t(a)?a:n({agentId:i,requestKey:a})}function resolveSqliteAgentId(n){let r=n.scopedAgentId?e(n.scopedAgentId):void 0;if(r&&n.storeAgentId&&r!==n.storeAgentId&&!n.storeShared)throw Error(`SQLite session store path belongs to agent ${n.storeAgentId}; requested agent ${r}.`);let i=n.sessionKey?t(n.sessionKey)?.agentId:void 0;return r??n.storeAgentId??i}function toDatabaseOptions(e){return{agentId:e.databaseAgentId??e.agentId,...e.env?{env:e.env}:{},...e.path?{path:e.path}:{}}}export{toDatabaseOptions as i,resolveSqliteAgentId as n,resolveSqliteSessionKey as r,getSessionKysely as t};