openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 1.29 kB
JavaScript
import{Cn as e,xn as t}from"./openclaw-state-read-subsystem-Dwoo5bcz.mjs";import{a as n,i as r,r as i}from"./openclaw-state-read-kysely-sync-Bcu0Qb7F.mjs";import"./openclaw-state-read-openclaw-state-db-readonly-Bv32Owin.mjs";import{gunzipSync as a}from"node:zlib";t(Symbol.for(`openclaw.pluginSdkDeprecationUsage`)),e(Symbol.for(`openclaw.pluginSdkDeprecations`),()=>/* @__PURE__ */ new Set);function readDebugProxyCaptureSessionEvents(e,t,r=500){return i(e,n(e).selectFrom(`capture_events`).select([`id`,`session_id as sessionId`,`ts`,`source_scope as sourceScope`,`source_process as sourceProcess`,`protocol`,`direction`,`kind`,`flow_id as flowId`,`method`,`host`,`path`,`status`,`close_code as closeCode`,`content_type as contentType`,`headers_json as headersJson`,`data_text as dataText`,`data_blob_id as dataBlobId`,`data_sha256 as dataSha256`,`error_text as errorText`,`meta_json as metaJson`]).where(`session_id`,`=`,t).orderBy(`ts`,`desc`).orderBy(`id`,`desc`).limit(r)).rows}function readDebugProxyCaptureBlob(e,t){let i=r(e,n(e).selectFrom(`capture_blobs`).select([`encoding`,`data`]).where(`blob_id`,`=`,t));if(!i?.data)return null;let o=Buffer.from(i.data);return(i.encoding===`gzip`?a(o):o).toString(`utf8`)}export{readDebugProxyCaptureBlob,readDebugProxyCaptureSessionEvents};