UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 1.34 kB
import"./openclaw-state-read-map-size-DJbMcZYM.mjs";import{g as e,v as t}from"./openclaw-state-read-home-dir-BQZX1pD2.mjs";import{a as n,i as r,r as i}from"./openclaw-state-read-kysely-sync-DQyYiAw5.mjs";import"./openclaw-state-read-openclaw-state-db-readonly-CDG18cNK.mjs";import{gunzipSync as a}from"node:zlib";e(Symbol.for(`openclaw.pluginSdkDeprecationUsage`)),t(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};