UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

21 lines (20 loc) • 1.36 kB
import { n as isPostgresSqlConnection } from "./sql-connection-Beiyg5Dt.mjs"; import { t as extractSqliteTableSchema } from "./sqlite-schema-sql-CPyk_2Hd.mjs"; import { t as OPENCLAW_AGENT_SCHEMA_SQL } from "./openclaw-agent-schema-BDRJZxWF.mjs"; import { t as createSqliteSchemaEnsurer } from "./sqlite-schema-ensure-B6yDrFvM.mjs"; //#region src/state/openclaw-agent-session-transcript-archive-schema.ts const SESSION_TRANSCRIPT_ARCHIVES_TABLE = "session_transcript_archives"; const ensureNativeSessionTranscriptArchiveSchema = createSqliteSchemaEnsurer(() => extractSqliteTableSchema(OPENCLAW_AGENT_SCHEMA_SQL, SESSION_TRANSCRIPT_ARCHIVES_TABLE, { endMarker: "CREATE TABLE IF NOT EXISTS transcript_rewrite_watermarks (", includeEndMarker: false, errorMessage: "OpenClaw session transcript archive schema markers are missing." }), { tables: [SESSION_TRANSCRIPT_ARCHIVES_TABLE, "session_transcript_cold_archives"], indexes: ["idx_agent_session_transcript_archives_pending", "idx_agent_session_transcript_archives_retention"] }); /** Lazily installs SQLite archives; PostgreSQL admits them with the agent schema. */ function ensureSessionTranscriptArchiveSchema(e) { if (!isPostgresSqlConnection(e)) ensureNativeSessionTranscriptArchiveSchema(e); } //#endregion export { ensureSessionTranscriptArchiveSchema as n, SESSION_TRANSCRIPT_ARCHIVES_TABLE as t };