UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 847 B
import{p as e}from"./transcript-kysely-sync-CAP5xe3V.mjs";import{t}from"./transcript-session-accessor.sqlite-scope-helpers-LCM13IZK.mjs";import{c as n}from"./transcript-transcript-payload-F5t-l1WZ.mjs";import{t as r}from"./transcript-sqlite-jsonl-budget-C_hRCeey.mjs";const i=2097152;function transcriptEventReadBytesSql(t=`transcript_events`){let r=e.ref(`${t}.event_json`);return e`coalesce(${n(t)}, octet_length(${r}))`}function assertTranscriptEventReadBudget(e,n,i){let{beforeEventSeq:a,maxEventBytes:o}=i;o!==void 0&&Number.isFinite(o)&&o>=0&&r(e.db,t(e.db).selectFrom(`transcript_events`).select([`event_json`,`event_utf8_bytes`]).where(`session_id`,`=`,n).$if(a!==void 0,e=>e.where(`seq`,`<`,a)).as(`events`),Math.floor(o),`Trajectory transcript store`)}export{assertTranscriptEventReadBudget as n,transcriptEventReadBytesSql as r,i as t};