@inkeep/agents-run-api 0.37.2 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var agentsCore = require('@inkeep/agents-core');
6
5
  var zodOpenapi = require('@hono/zod-openapi');
6
+ var agentsCore = require('@inkeep/agents-core');
7
7
  var s3 = require('fs');
8
8
  var o3 = require('path');
9
9
  var schema = require('@inkeep/agents-core/db/schema');
@@ -12,12 +12,6 @@ var child_process = require('child_process');
12
12
  var crypto2 = require('crypto');
13
13
  var os = require('os');
14
14
  var sandbox = require('@vercel/sandbox');
15
- var otel = require('@hono/otel');
16
- var api = require('@opentelemetry/api');
17
- var hono = require('hono');
18
- var cors = require('hono/cors');
19
- var httpException = require('hono/http-exception');
20
- var requestId = require('hono/request-id');
21
15
  var autoInstrumentationsNode = require('@opentelemetry/auto-instrumentations-node');
22
16
  var baggageSpanProcessor = require('@opentelemetry/baggage-span-processor');
23
17
  var contextAsyncHooks = require('@opentelemetry/context-async-hooks');
@@ -27,12 +21,19 @@ var resources = require('@opentelemetry/resources');
27
21
  var sdkNode = require('@opentelemetry/sdk-node');
28
22
  var sdkTraceBase = require('@opentelemetry/sdk-trace-base');
29
23
  var semanticConventions = require('@opentelemetry/semantic-conventions');
24
+ var otel = require('@hono/otel');
25
+ var api = require('@opentelemetry/api');
26
+ var hono = require('hono');
27
+ var cors = require('hono/cors');
28
+ var httpException = require('hono/http-exception');
29
+ var requestId = require('hono/request-id');
30
30
  var factory = require('hono/factory');
31
31
  var swaggerUi = require('@hono/swagger-ui');
32
32
  var streaming = require('hono/streaming');
33
33
  var ai = require('ai');
34
34
  var jmespath = require('jmespath');
35
35
  var Ajv = require('ajv');
36
+ var zod = require('zod');
36
37
  var destr = require('destr');
37
38
  var traverse = require('traverse');
38
39
  var mcp_js = require('@alcyone-labs/modelcontextprotocol-sdk/server/mcp.js');
@@ -128,10 +129,10 @@ var init_logger = __esm({
128
129
  }
129
130
  });
130
131
 
131
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-QY3QWFKW.js
132
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-QY3QWFKW.js
132
133
  var p, i2, c, f, l, s, a, _, d, D, F, g, L, P, n, h, R, x, T, U, u;
133
134
  var init_chunk_QY3QWFKW = __esm({
134
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-QY3QWFKW.js"() {
135
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-QY3QWFKW.js"() {
135
136
  p = Object.create;
136
137
  i2 = Object.defineProperty;
137
138
  c = Object.getOwnPropertyDescriptor;
@@ -168,7 +169,7 @@ var init_chunk_QY3QWFKW = __esm({
168
169
  }
169
170
  });
170
171
 
171
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-3WWIVTCY.js
172
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-3WWIVTCY.js
172
173
  function ue(e, t2, n3) {
173
174
  if (e === null) return null;
174
175
  let r = n3?.[t2] ?? Se.parsers[t2];
@@ -283,7 +284,7 @@ function Nr(e) {
283
284
  }
284
285
  var hn, ht, bt, be, ge, gt, we, ve, Ge, wt, V, je, At, xt, St, Ae, Dt, Bt, It, Mt, Rt, Tt, Qe, We, Et, Ct, Pt, Ut, Nt, Lt, Ot, kt, Vt, _e, ze, He, Ft, qe, xe, vt, Gt, jt, Qt, Wt, _t, zt, Ht, qt, Yt, $t, Kt, Jt, Xt, Zt, en, tn, nn, rn, sn, an, Ye, on, un, $e, Se, ln, cn, dn, fn, he, wn, Ue, Be, Ie, Me, Re, Te, Ee, Ce, Pe, F2, v, G, j, Q, W, C, _2, z2, H, q, Y, $, K, J, X, Z, ee, te, zn, b, g2, N, ce, L2, x2, le, U2, Xe, T2, m, An, xn, Sn, Dn, Bn, In, Mn, Rn, O, Tn, En, Cn, Pn, Un, Ne, Nn, Ln, On, kn, Vn, Fn, pe, vn, Gn, jn, Qn, k, Le, Wn, R2, w, fe, me, ne, de, Oe, _n, Ze, et, A, S, D2, o, l2, tt, nt, rt, st, it, at, ot, ke, ut, lt, ct, pt, dt, ft, mt, yt, Ve, ye, Fe, se, re;
285
286
  var init_chunk_3WWIVTCY = __esm({
286
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-3WWIVTCY.js"() {
287
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-3WWIVTCY.js"() {
287
288
  init_chunk_QY3QWFKW();
288
289
  hn = {};
289
290
  F(hn, { ABSTIME: () => Et, ACLITEM: () => Vt, BIT: () => jt, BOOL: () => be, BPCHAR: () => _e, BYTEA: () => ge, CHAR: () => gt, CID: () => St, CIDR: () => Tt, CIRCLE: () => Ut, DATE: () => He, FLOAT4: () => Qe, FLOAT8: () => We, GTSVECTOR: () => rn, INET: () => kt, INT2: () => ve, INT4: () => Ge, INT8: () => we, INTERVAL: () => vt, JSON: () => Ae, JSONB: () => Ye, MACADDR: () => Ot, MACADDR8: () => Nt, MONEY: () => Lt, NUMERIC: () => Wt, OID: () => je, PATH: () => Mt, PG_DEPENDENCIES: () => en, PG_LSN: () => Xt, PG_NDISTINCT: () => Zt, PG_NODE_TREE: () => Bt, POLYGON: () => Rt, REFCURSOR: () => _t, REGCLASS: () => Yt, REGCONFIG: () => sn, REGDICTIONARY: () => an, REGNAMESPACE: () => on, REGOPER: () => Ht, REGOPERATOR: () => qt, REGPROC: () => wt, REGPROCEDURE: () => zt, REGROLE: () => un, REGTYPE: () => $t, RELTIME: () => Ct, SMGR: () => It, TEXT: () => V, TID: () => At, TIME: () => Ft, TIMESTAMP: () => qe, TIMESTAMPTZ: () => xe, TIMETZ: () => Gt, TINTERVAL: () => Pt, TSQUERY: () => nn, TSVECTOR: () => tn, TXID_SNAPSHOT: () => Jt, UUID: () => Kt, VARBIT: () => Qt, VARCHAR: () => ze, XID: () => xt, XML: () => Dt, arrayParser: () => yn, arraySerializer: () => Ke, parseType: () => ue, parsers: () => ln, serializers: () => cn, types: () => $e });
@@ -878,7 +879,7 @@ var init_chunk_3WWIVTCY = __esm({
878
879
  }
879
880
  });
880
881
 
881
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-F4GETNPB.js
882
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-F4GETNPB.js
882
883
  function s2(t2, r, ...e) {
883
884
  let a2 = t2.length - 1, p4 = e.length - 1;
884
885
  if (p4 !== -1) {
@@ -913,21 +914,21 @@ function g3(t2, ...r) {
913
914
  }
914
915
  var o2;
915
916
  var init_chunk_F4GETNPB = __esm({
916
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-F4GETNPB.js"() {
917
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-F4GETNPB.js"() {
917
918
  init_chunk_QY3QWFKW();
918
919
  u();
919
920
  o2 = { part: "part", container: "container" };
920
921
  }
921
922
  });
922
923
 
923
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-F2DQ4FIK.js
924
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-F2DQ4FIK.js
924
925
  function E(m4) {
925
926
  let s4 = m4.e;
926
927
  return s4.query = m4.query, s4.params = m4.params, s4.queryOptions = m4.options, s4;
927
928
  }
928
929
  var T3, p2, t, y2, x3, h2, O2, k2;
929
930
  var init_chunk_F2DQ4FIK = __esm({
930
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-F2DQ4FIK.js"() {
931
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-F2DQ4FIK.js"() {
931
932
  init_chunk_3WWIVTCY();
932
933
  init_chunk_F4GETNPB();
933
934
  init_chunk_QY3QWFKW();
@@ -1048,7 +1049,7 @@ var init_chunk_F2DQ4FIK = __esm({
1048
1049
  }
1049
1050
  });
1050
1051
 
1051
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-VBDAOXYI.js
1052
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-VBDAOXYI.js
1052
1053
  async function H2(r, e, t2 = "pgdata", s4 = "auto") {
1053
1054
  let a2 = Br(r, e), [n3, o4] = await qr(a2, s4), i3 = t2 + (o4 ? ".tar.gz" : ".tar"), u2 = o4 ? "application/x-gzip" : "application/x-tar";
1054
1055
  return typeof File < "u" ? new File([n3], i3, { type: u2 }) : new Blob([n3], { type: u2 });
@@ -1139,7 +1140,7 @@ function sr(r) {
1139
1140
  }
1140
1141
  var w2, x4, L3, er, nr, or, g4, Hr, Vr, C2, ur, cr, pr, Zr;
1141
1142
  var init_chunk_VBDAOXYI = __esm({
1142
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-VBDAOXYI.js"() {
1143
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/chunk-VBDAOXYI.js"() {
1143
1144
  init_chunk_QY3QWFKW();
1144
1145
  w2 = D(($r, l3) => {
1145
1146
  u();
@@ -1610,14 +1611,14 @@ var init_chunk_VBDAOXYI = __esm({
1610
1611
  }
1611
1612
  });
1612
1613
 
1613
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/fs/nodefs.js
1614
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/fs/nodefs.js
1614
1615
  var nodefs_exports = {};
1615
1616
  __export(nodefs_exports, {
1616
1617
  NodeFS: () => m2
1617
1618
  });
1618
1619
  var m2;
1619
1620
  var init_nodefs = __esm({
1620
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/fs/nodefs.js"() {
1621
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/fs/nodefs.js"() {
1621
1622
  init_chunk_VBDAOXYI();
1622
1623
  init_chunk_QY3QWFKW();
1623
1624
  u();
@@ -1638,14 +1639,14 @@ var init_nodefs = __esm({
1638
1639
  }
1639
1640
  });
1640
1641
 
1641
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/fs/opfs-ahp.js
1642
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/fs/opfs-ahp.js
1642
1643
  var opfs_ahp_exports = {};
1643
1644
  __export(opfs_ahp_exports, {
1644
1645
  OpfsAhpFS: () => L4
1645
1646
  });
1646
1647
  var $2, G2, T4, H3, v2, F3, M, y3, b2, m3, x5, P3, D3, S2, n2, C3, O3, k3, w3, f2, I, W2, j2, L4, p3;
1647
1648
  var init_opfs_ahp = __esm({
1648
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/fs/opfs-ahp.js"() {
1649
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/fs/opfs-ahp.js"() {
1649
1650
  init_chunk_VBDAOXYI();
1650
1651
  init_chunk_QY3QWFKW();
1651
1652
  u();
@@ -1944,7 +1945,7 @@ ${t2}`), i3 = h(this, y3).getSize();
1944
1945
  }
1945
1946
  });
1946
1947
 
1947
- // ../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/index.js
1948
+ // ../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/index.js
1948
1949
  async function ke2(e) {
1949
1950
  if (Fe) {
1950
1951
  let t2 = await import('fs'), r = await import('zlib'), { Writable: a2 } = await import('stream'), { pipeline: s4 } = await import('stream/promises');
@@ -2024,7 +2025,7 @@ async function Ue2(e, t2) {
2024
2025
  }
2025
2026
  var ot2, nt2, Fe2, it2, Y2, Le2, ue2, ce3, pt2, He2, je2, ne2, te2, re2, ie, _e2, xe2, we2, Se2, ye2, le2, fe2, he2, pe2, ae, $3, I2, se2, de2, B, Q2, K2, me2, oe, J2, O4, Z2, q2, G3, C4, Ve2, Xe2, ge2, Ke2, Ye2, L5, We2;
2026
2027
  var init_dist = __esm({
2027
- "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/index.js"() {
2028
+ "../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/index.js"() {
2028
2029
  init_chunk_F2DQ4FIK();
2029
2030
  init_chunk_VBDAOXYI();
2030
2031
  init_chunk_3WWIVTCY();
@@ -5281,7 +5282,7 @@ ${_3}`), 0;
5281
5282
  Module._getTempRet0 = _getTempRet0, registerWasmPlugin(), FS.createPreloadedFile = FS_createPreloadedFile, FS.staticInit(), Module.FS_createPath = FS.createPath, Module.FS_createDataFile = FS.createDataFile, Module.FS_createPreloadedFile = FS.createPreloadedFile, Module.FS_unlink = FS.unlink, Module.FS_createLazyFile = FS.createLazyFile, Module.FS_createDevice = FS.createDevice, MEMFS.doesNotExistError = new FS.ErrnoError(44), MEMFS.doesNotExistError.stack = "<generic error, no stack>", ENVIRONMENT_IS_NODE && NODEFS.staticInit();
5282
5283
  var wasmImports = { __assert_fail: ___assert_fail, __call_sighandler: ___call_sighandler, __heap_base: ___heap_base, __indirect_function_table: wasmTable, __memory_base: ___memory_base, __stack_pointer: ___stack_pointer, __syscall__newselect: ___syscall__newselect, __syscall_bind: ___syscall_bind, __syscall_chdir: ___syscall_chdir, __syscall_chmod: ___syscall_chmod, __syscall_dup: ___syscall_dup, __syscall_dup3: ___syscall_dup3, __syscall_faccessat: ___syscall_faccessat, __syscall_fadvise64: ___syscall_fadvise64, __syscall_fallocate: ___syscall_fallocate, __syscall_fcntl64: ___syscall_fcntl64, __syscall_fdatasync: ___syscall_fdatasync, __syscall_fstat64: ___syscall_fstat64, __syscall_ftruncate64: ___syscall_ftruncate64, __syscall_getcwd: ___syscall_getcwd, __syscall_getdents64: ___syscall_getdents64, __syscall_ioctl: ___syscall_ioctl, __syscall_lstat64: ___syscall_lstat64, __syscall_mkdirat: ___syscall_mkdirat, __syscall_newfstatat: ___syscall_newfstatat, __syscall_openat: ___syscall_openat, __syscall_pipe: ___syscall_pipe, __syscall_readlinkat: ___syscall_readlinkat, __syscall_recvfrom: ___syscall_recvfrom, __syscall_renameat: ___syscall_renameat, __syscall_rmdir: ___syscall_rmdir, __syscall_sendto: ___syscall_sendto, __syscall_socket: ___syscall_socket, __syscall_stat64: ___syscall_stat64, __syscall_symlinkat: ___syscall_symlinkat, __syscall_truncate64: ___syscall_truncate64, __syscall_unlinkat: ___syscall_unlinkat, __table_base: ___table_base, _abort_js: __abort_js, _dlopen_js: __dlopen_js, _dlsym_js: __dlsym_js, _emscripten_memcpy_js: __emscripten_memcpy_js, _emscripten_runtime_keepalive_clear: __emscripten_runtime_keepalive_clear, _emscripten_system: __emscripten_system, _emscripten_throw_longjmp: __emscripten_throw_longjmp, _gmtime_js: __gmtime_js, _localtime_js: __localtime_js, _mmap_js: __mmap_js, _munmap_js: __munmap_js, _setitimer_js: __setitimer_js, _tzset_js: __tzset_js, clock_time_get: _clock_time_get, emscripten_asm_const_int: _emscripten_asm_const_int, emscripten_date_now: _emscripten_date_now, emscripten_force_exit: _emscripten_force_exit, emscripten_get_now: _emscripten_get_now, emscripten_resize_heap: _emscripten_resize_heap, environ_get: _environ_get, environ_sizes_get: _environ_sizes_get, exit: _exit, fd_close: _fd_close, fd_fdstat_get: _fd_fdstat_get, fd_pread: _fd_pread, fd_pwrite: _fd_pwrite, fd_read: _fd_read, fd_seek: _fd_seek, fd_sync: _fd_sync, fd_write: _fd_write, getTempRet0: _getTempRet0, getaddrinfo: _getaddrinfo, getnameinfo: _getnameinfo, invoke_di, invoke_i, invoke_id, invoke_ii, invoke_iii, invoke_iiii, invoke_iiiii, invoke_iiiiii, invoke_iiiiiii, invoke_iiiiiiii, invoke_iiiiiiiii, invoke_iiiiiiiiii, invoke_iiiiiiiiiii, invoke_iiiiiiiiiiiiii, invoke_iiiiiiiiiiiiiiiiii, invoke_iiiiiji, invoke_iiiij, invoke_iiiijii, invoke_iiij, invoke_iiji, invoke_ij, invoke_ijiiiii, invoke_ijiiiiii, invoke_j, invoke_ji, invoke_jii, invoke_jiiii, invoke_jiiiiii, invoke_jiiiiiiiii, invoke_v, invoke_vi, invoke_vid, invoke_vii, invoke_viii, invoke_viiii, invoke_viiiii, invoke_viiiiii, invoke_viiiiiii, invoke_viiiiiiii, invoke_viiiiiiiii, invoke_viiiiiiiiiiii, invoke_viiiji, invoke_viij, invoke_viiji, invoke_viijii, invoke_viijiiii, invoke_vij, invoke_viji, invoke_vijiji, invoke_vj, invoke_vji, memory: wasmMemory, proc_exit: _proc_exit, setTempRet0: _setTempRet0 }, wasmExports;
5283
5284
  createWasm();
5284
- var _fflush = Module._fflush = (e) => (_fflush = Module._fflush = wasmExports.fflush)(e); Module.___errno_location = () => (Module.___errno_location = wasmExports.__errno_location)(); Module._ProcessInterrupts = () => (Module._ProcessInterrupts = wasmExports.ProcessInterrupts)(); Module._errstart_cold = (e, t2) => (Module._errstart_cold = wasmExports.errstart_cold)(e, t2); Module._errcode = (e) => (Module._errcode = wasmExports.errcode)(e); Module._errmsg = (e, t2) => (Module._errmsg = wasmExports.errmsg)(e, t2); Module._errfinish = (e, t2, r) => (Module._errfinish = wasmExports.errfinish)(e, t2, r); Module._puts = (e) => (Module._puts = wasmExports.puts)(e); Module._errstart = (e, t2) => (Module._errstart = wasmExports.errstart)(e, t2); Module._errmsg_internal = (e, t2) => (Module._errmsg_internal = wasmExports.errmsg_internal)(e, t2); Module._errdetail = (e, t2) => (Module._errdetail = wasmExports.errdetail)(e, t2); Module._errhint = (e, t2) => (Module._errhint = wasmExports.errhint)(e, t2); Module._pg_parse_query = (e) => (Module._pg_parse_query = wasmExports.pg_parse_query)(e); Module._gettimeofday = (e, t2) => (Module._gettimeofday = wasmExports.gettimeofday)(e, t2); Module._raw_parser = (e, t2) => (Module._raw_parser = wasmExports.raw_parser)(e, t2); Module._initStringInfo = (e) => (Module._initStringInfo = wasmExports.initStringInfo)(e); Module._appendStringInfoString = (e, t2) => (Module._appendStringInfoString = wasmExports.appendStringInfoString)(e, t2); Module._appendStringInfo = (e, t2, r) => (Module._appendStringInfo = wasmExports.appendStringInfo)(e, t2, r); Module._errdetail_internal = (e, t2) => (Module._errdetail_internal = wasmExports.errdetail_internal)(e, t2); Module._pfree = (e) => (Module._pfree = wasmExports.pfree)(e); Module._list_make1_impl = (e, t2) => (Module._list_make1_impl = wasmExports.list_make1_impl)(e, t2); Module._QueryRewrite = (e) => (Module._QueryRewrite = wasmExports.QueryRewrite)(e); Module._pg_plan_query = (e, t2, r, a2) => (Module._pg_plan_query = wasmExports.pg_plan_query)(e, t2, r, a2); Module._palloc0 = (e) => (Module._palloc0 = wasmExports.palloc0)(e); Module._lappend = (e, t2) => (Module._lappend = wasmExports.lappend)(e, t2); Module._GetCurrentTimestamp = () => (Module._GetCurrentTimestamp = wasmExports.GetCurrentTimestamp)(); Module._pg_prng_double = (e) => (Module._pg_prng_double = wasmExports.pg_prng_double)(e); Module._pg_snprintf = (e, t2, r, a2) => (Module._pg_snprintf = wasmExports.pg_snprintf)(e, t2, r, a2); Module._die = (e) => (Module._die = wasmExports.die)(e); Module._check_stack_depth = () => (Module._check_stack_depth = wasmExports.check_stack_depth)(); Module._pre_format_elog_string = (e, t2) => (Module._pre_format_elog_string = wasmExports.pre_format_elog_string)(e, t2); Module._format_elog_string = (e, t2) => (Module._format_elog_string = wasmExports.format_elog_string)(e, t2); Module._pstrdup = (e) => (Module._pstrdup = wasmExports.pstrdup)(e); Module._SplitIdentifierString = (e, t2, r) => (Module._SplitIdentifierString = wasmExports.SplitIdentifierString)(e, t2, r); Module._list_free = (e) => (Module._list_free = wasmExports.list_free)(e); Module._pg_strcasecmp = (e, t2) => (Module._pg_strcasecmp = wasmExports.pg_strcasecmp)(e, t2); Module._guc_malloc = (e, t2) => (Module._guc_malloc = wasmExports.guc_malloc)(e, t2); Module._SetConfigOption = (e, t2, r, a2) => (Module._SetConfigOption = wasmExports.SetConfigOption)(e, t2, r, a2); Module._pg_sprintf = (e, t2, r) => (Module._pg_sprintf = wasmExports.pg_sprintf)(e, t2, r); Module._strcmp = (e, t2) => (Module._strcmp = wasmExports.strcmp)(e, t2); Module._atoi = (e) => (Module._atoi = wasmExports.atoi)(e); Module._pgl_shutdown = () => (Module._pgl_shutdown = wasmExports.pgl_shutdown)(); Module._pgl_closed = () => (Module._pgl_closed = wasmExports.pgl_closed)(); Module._MemoryContextReset = (e) => (Module._MemoryContextReset = wasmExports.MemoryContextReset)(e); Module._resetStringInfo = (e) => (Module._resetStringInfo = wasmExports.resetStringInfo)(e); Module._getc = (e) => (Module._getc = wasmExports.getc)(e); Module._appendStringInfoChar = (e, t2) => (Module._appendStringInfoChar = wasmExports.appendStringInfoChar)(e, t2); Module._strlen = (e) => (Module._strlen = wasmExports.strlen)(e); Module._strncmp = (e, t2, r) => (Module._strncmp = wasmExports.strncmp)(e, t2, r); Module._pg_fprintf = (e, t2, r) => (Module._pg_fprintf = wasmExports.pg_fprintf)(e, t2, r); Module._pgstat_report_activity = (e, t2) => (Module._pgstat_report_activity = wasmExports.pgstat_report_activity)(e, t2); Module._errhidestmt = (e) => (Module._errhidestmt = wasmExports.errhidestmt)(e); Module._GetTransactionSnapshot = () => (Module._GetTransactionSnapshot = wasmExports.GetTransactionSnapshot)(); Module._PushActiveSnapshot = (e) => (Module._PushActiveSnapshot = wasmExports.PushActiveSnapshot)(e); Module._AllocSetContextCreateInternal = (e, t2, r, a2, s4) => (Module._AllocSetContextCreateInternal = wasmExports.AllocSetContextCreateInternal)(e, t2, r, a2, s4); Module._PopActiveSnapshot = () => (Module._PopActiveSnapshot = wasmExports.PopActiveSnapshot)(); Module._CreateDestReceiver = (e) => (Module._CreateDestReceiver = wasmExports.CreateDestReceiver)(e); Module._CommitTransactionCommand = () => (Module._CommitTransactionCommand = wasmExports.CommitTransactionCommand)(); Module._CommandCounterIncrement = () => (Module._CommandCounterIncrement = wasmExports.CommandCounterIncrement)(); Module._MemoryContextDelete = (e) => (Module._MemoryContextDelete = wasmExports.MemoryContextDelete)(e); Module._StartTransactionCommand = () => (Module._StartTransactionCommand = wasmExports.StartTransactionCommand)(); Module.___wasm_setjmp_test = (e, t2) => (Module.___wasm_setjmp_test = wasmExports.__wasm_setjmp_test)(e, t2); Module._pg_printf = (e, t2) => (Module._pg_printf = wasmExports.pg_printf)(e, t2); Module.___wasm_setjmp = (e, t2, r) => (Module.___wasm_setjmp = wasmExports.__wasm_setjmp)(e, t2, r); Module._FlushErrorState = () => (Module._FlushErrorState = wasmExports.FlushErrorState)(); Module._emscripten_longjmp = (e, t2) => (Module._emscripten_longjmp = wasmExports.emscripten_longjmp)(e, t2); Module._enlargeStringInfo = (e, t2) => (Module._enlargeStringInfo = wasmExports.enlargeStringInfo)(e, t2); var _malloc = Module._malloc = (e) => (_malloc = Module._malloc = wasmExports.malloc)(e); Module._realloc = (e, t2) => (Module._realloc = wasmExports.realloc)(e, t2); Module._strspn = (e, t2) => (Module._strspn = wasmExports.strspn)(e, t2); Module._memcpy = (e, t2, r) => (Module._memcpy = wasmExports.memcpy)(e, t2, r); Module._fileno = (e) => (Module._fileno = wasmExports.fileno)(e); Module._strchr = (e, t2) => (Module._strchr = wasmExports.strchr)(e, t2); Module._free = (e) => (Module._free = wasmExports.free)(e); Module._pg_vsnprintf = (e, t2, r, a2) => (Module._pg_vsnprintf = wasmExports.pg_vsnprintf)(e, t2, r, a2); Module._strcpy = (e, t2) => (Module._strcpy = wasmExports.strcpy)(e, t2); Module._psprintf = (e, t2) => (Module._psprintf = wasmExports.psprintf)(e, t2); Module._stat = (e, t2) => (Module._stat = wasmExports.stat)(e, t2); Module._fwrite = (e, t2, r, a2) => (Module._fwrite = wasmExports.fwrite)(e, t2, r, a2); Module._strftime = (e, t2, r, a2) => (Module._strftime = wasmExports.strftime)(e, t2, r, a2); Module._strstr = (e, t2) => (Module._strstr = wasmExports.strstr)(e, t2); Module._strtol = (e, t2, r) => (Module._strtol = wasmExports.strtol)(e, t2, r); Module._ferror = (e) => (Module._ferror = wasmExports.ferror)(e); Module._clear_error = () => (Module._clear_error = wasmExports.clear_error)(); Module._interactive_one = (e, t2) => (Module._interactive_one = wasmExports.interactive_one)(e, t2); Module._pq_getmsgint = (e, t2) => (Module._pq_getmsgint = wasmExports.pq_getmsgint)(e, t2); Module._palloc = (e) => (Module._palloc = wasmExports.palloc)(e); Module._makeParamList = (e) => (Module._makeParamList = wasmExports.makeParamList)(e); Module._getTypeInputInfo = (e, t2, r) => (Module._getTypeInputInfo = wasmExports.getTypeInputInfo)(e, t2, r); Module._pnstrdup = (e, t2) => (Module._pnstrdup = wasmExports.pnstrdup)(e, t2); Module._MemoryContextSetParent = (e, t2) => (Module._MemoryContextSetParent = wasmExports.MemoryContextSetParent)(e, t2); Module._pgl_backend = () => (Module._pgl_backend = wasmExports.pgl_backend)(); Module._pgl_initdb = () => (Module._pgl_initdb = wasmExports.pgl_initdb)(); Module._main = (e, t2) => (Module._main = wasmExports.__main_argc_argv)(e, t2); Module._appendStringInfoStringQuoted = (e, t2, r) => (Module._appendStringInfoStringQuoted = wasmExports.appendStringInfoStringQuoted)(e, t2, r); Module._set_errcontext_domain = (e) => (Module._set_errcontext_domain = wasmExports.set_errcontext_domain)(e); Module._errcontext_msg = (e, t2) => (Module._errcontext_msg = wasmExports.errcontext_msg)(e, t2); Module._memchr = (e, t2, r) => (Module._memchr = wasmExports.memchr)(e, t2, r); Module._strrchr = (e, t2) => (Module._strrchr = wasmExports.strrchr)(e, t2); Module._xsltFreeStylesheet = (e) => (Module._xsltFreeStylesheet = wasmExports.xsltFreeStylesheet)(e); Module._xsltParseStylesheetDoc = (e) => (Module._xsltParseStylesheetDoc = wasmExports.xsltParseStylesheetDoc)(e); Module._xsltSaveResultToString = (e, t2, r, a2) => (Module._xsltSaveResultToString = wasmExports.xsltSaveResultToString)(e, t2, r, a2); Module._xsltCleanupGlobals = () => (Module._xsltCleanupGlobals = wasmExports.xsltCleanupGlobals)(); Module._xsltNewTransformContext = (e, t2) => (Module._xsltNewTransformContext = wasmExports.xsltNewTransformContext)(e, t2); Module._xsltFreeTransformContext = (e) => (Module._xsltFreeTransformContext = wasmExports.xsltFreeTransformContext)(e); Module._xsltApplyStylesheetUser = (e, t2, r, a2, s4, o4) => (Module._xsltApplyStylesheetUser = wasmExports.xsltApplyStylesheetUser)(e, t2, r, a2, s4, o4); Module._xsltNewSecurityPrefs = () => (Module._xsltNewSecurityPrefs = wasmExports.xsltNewSecurityPrefs)(); Module._xsltFreeSecurityPrefs = (e) => (Module._xsltFreeSecurityPrefs = wasmExports.xsltFreeSecurityPrefs)(e); Module._xsltSetSecurityPrefs = (e, t2, r) => (Module._xsltSetSecurityPrefs = wasmExports.xsltSetSecurityPrefs)(e, t2, r); Module._xsltSetCtxtSecurityPrefs = (e, t2) => (Module._xsltSetCtxtSecurityPrefs = wasmExports.xsltSetCtxtSecurityPrefs)(e, t2); Module._xsltSecurityForbid = (e, t2, r) => (Module._xsltSecurityForbid = wasmExports.xsltSecurityForbid)(e, t2, r); Module._replace_percent_placeholders = (e, t2, r, a2) => (Module._replace_percent_placeholders = wasmExports.replace_percent_placeholders)(e, t2, r, a2); Module._memset = (e, t2, r) => (Module._memset = wasmExports.memset)(e, t2, r); Module._MemoryContextAllocZero = (e, t2) => (Module._MemoryContextAllocZero = wasmExports.MemoryContextAllocZero)(e, t2); Module._MemoryContextAllocExtended = (e, t2, r) => (Module._MemoryContextAllocExtended = wasmExports.MemoryContextAllocExtended)(e, t2, r); Module._hash_bytes = (e, t2) => (Module._hash_bytes = wasmExports.hash_bytes)(e, t2); Module._memcmp = (e, t2, r) => (Module._memcmp = wasmExports.memcmp)(e, t2, r); Module._repalloc = (e, t2) => (Module._repalloc = wasmExports.repalloc)(e, t2); Module._pg_qsort = (e, t2, r, a2) => (Module._pg_qsort = wasmExports.pg_qsort)(e, t2, r, a2); Module._OpenTransientFile = (e, t2) => (Module._OpenTransientFile = wasmExports.OpenTransientFile)(e, t2); Module._errcode_for_file_access = () => (Module._errcode_for_file_access = wasmExports.errcode_for_file_access)(); Module._read = (e, t2, r) => (Module._read = wasmExports.read)(e, t2, r); Module._CloseTransientFile = (e) => (Module._CloseTransientFile = wasmExports.CloseTransientFile)(e); Module._close = (e) => (Module._close = wasmExports.close)(e); Module.___multi3 = (e, t2, r, a2, s4) => (Module.___multi3 = wasmExports.__multi3)(e, t2, r, a2, s4); Module._isalnum = (e) => (Module._isalnum = wasmExports.isalnum)(e); Module._wait_result_to_str = (e) => (Module._wait_result_to_str = wasmExports.wait_result_to_str)(e); Module._float_to_shortest_decimal_bufn = (e, t2) => (Module._float_to_shortest_decimal_bufn = wasmExports.float_to_shortest_decimal_bufn)(e, t2); Module._float_to_shortest_decimal_buf = (e, t2) => (Module._float_to_shortest_decimal_buf = wasmExports.float_to_shortest_decimal_buf)(e, t2); Module._memmove = (e, t2, r) => (Module._memmove = wasmExports.memmove)(e, t2, r); Module._pwrite = (e, t2, r, a2) => (Module._pwrite = wasmExports.pwrite)(e, t2, r, a2); Module._hash_bytes_extended = (e, t2, r) => (Module._hash_bytes_extended = wasmExports.hash_bytes_extended)(e, t2, r); var _calloc = (e, t2) => (_calloc = wasmExports.calloc)(e, t2); Module._IsValidJsonNumber = (e, t2) => (Module._IsValidJsonNumber = wasmExports.IsValidJsonNumber)(e, t2); Module._appendBinaryStringInfo = (e, t2, r) => (Module._appendBinaryStringInfo = wasmExports.appendBinaryStringInfo)(e, t2, r); Module._makeStringInfo = () => (Module._makeStringInfo = wasmExports.makeStringInfo)(); Module._GetDatabaseEncodingName = () => (Module._GetDatabaseEncodingName = wasmExports.GetDatabaseEncodingName)(); Module._ScanKeywordLookup = (e, t2) => (Module._ScanKeywordLookup = wasmExports.ScanKeywordLookup)(e, t2); Module._strtoul = (e, t2, r) => (Module._strtoul = wasmExports.strtoul)(e, t2, r); Module._sscanf = (e, t2, r) => (Module._sscanf = wasmExports.sscanf)(e, t2, r); Module._pg_prng_uint64 = (e) => (Module._pg_prng_uint64 = wasmExports.pg_prng_uint64)(e); Module._pg_prng_uint32 = (e) => (Module._pg_prng_uint32 = wasmExports.pg_prng_uint32)(e); Module._log = (e) => (Module._log = wasmExports.log)(e); Module._sin = (e) => (Module._sin = wasmExports.sin)(e); Module._forkname_to_number = (e) => (Module._forkname_to_number = wasmExports.forkname_to_number)(e); Module._unlink = (e) => (Module._unlink = wasmExports.unlink)(e); Module._pg_utf_mblen_private = (e) => (Module._pg_utf_mblen_private = wasmExports.pg_utf_mblen_private)(e); Module._bsearch = (e, t2, r, a2, s4) => (Module._bsearch = wasmExports.bsearch)(e, t2, r, a2, s4); Module._palloc_extended = (e, t2) => (Module._palloc_extended = wasmExports.palloc_extended)(e, t2); Module._appendStringInfoSpaces = (e, t2) => (Module._appendStringInfoSpaces = wasmExports.appendStringInfoSpaces)(e, t2); Module._fcntl = (e, t2, r) => (Module._fcntl = wasmExports.fcntl)(e, t2, r); Module._pg_popcount_optimized = (e, t2) => (Module._pg_popcount_optimized = wasmExports.pg_popcount_optimized)(e, t2); Module._open = (e, t2, r) => (Module._open = wasmExports.open)(e, t2, r); Module._pg_usleep = (e) => (Module._pg_usleep = wasmExports.pg_usleep)(e); Module._nanosleep = (e, t2) => (Module._nanosleep = wasmExports.nanosleep)(e, t2); Module._getpid = () => (Module._getpid = wasmExports.getpid)(); Module._qsort_arg = (e, t2, r, a2, s4) => (Module._qsort_arg = wasmExports.qsort_arg)(e, t2, r, a2, s4); Module._RelationGetNumberOfBlocksInFork = (e, t2) => (Module._RelationGetNumberOfBlocksInFork = wasmExports.RelationGetNumberOfBlocksInFork)(e, t2); Module._ExtendBufferedRel = (e, t2, r, a2) => (Module._ExtendBufferedRel = wasmExports.ExtendBufferedRel)(e, t2, r, a2); Module._MarkBufferDirty = (e) => (Module._MarkBufferDirty = wasmExports.MarkBufferDirty)(e); Module._XLogBeginInsert = () => (Module._XLogBeginInsert = wasmExports.XLogBeginInsert)(); Module._XLogRegisterData = (e, t2) => (Module._XLogRegisterData = wasmExports.XLogRegisterData)(e, t2); Module._XLogInsert = (e, t2) => (Module._XLogInsert = wasmExports.XLogInsert)(e, t2); Module._UnlockReleaseBuffer = (e) => (Module._UnlockReleaseBuffer = wasmExports.UnlockReleaseBuffer)(e); Module._brin_build_desc = (e) => (Module._brin_build_desc = wasmExports.brin_build_desc)(e); Module._EnterParallelMode = () => (Module._EnterParallelMode = wasmExports.EnterParallelMode)(); Module._CreateParallelContext = (e, t2, r) => (Module._CreateParallelContext = wasmExports.CreateParallelContext)(e, t2, r); Module._RegisterSnapshot = (e) => (Module._RegisterSnapshot = wasmExports.RegisterSnapshot)(e); Module._table_parallelscan_estimate = (e, t2) => (Module._table_parallelscan_estimate = wasmExports.table_parallelscan_estimate)(e, t2); Module._add_size = (e, t2) => (Module._add_size = wasmExports.add_size)(e, t2); Module._tuplesort_estimate_shared = (e) => (Module._tuplesort_estimate_shared = wasmExports.tuplesort_estimate_shared)(e); Module._InitializeParallelDSM = (e) => (Module._InitializeParallelDSM = wasmExports.InitializeParallelDSM)(e); Module._UnregisterSnapshot = (e) => (Module._UnregisterSnapshot = wasmExports.UnregisterSnapshot)(e); Module._DestroyParallelContext = (e) => (Module._DestroyParallelContext = wasmExports.DestroyParallelContext)(e); Module._ExitParallelMode = () => (Module._ExitParallelMode = wasmExports.ExitParallelMode)(); Module._shm_toc_allocate = (e, t2) => (Module._shm_toc_allocate = wasmExports.shm_toc_allocate)(e, t2); Module._ConditionVariableInit = (e) => (Module._ConditionVariableInit = wasmExports.ConditionVariableInit)(e); Module._s_init_lock_sema = (e, t2) => (Module._s_init_lock_sema = wasmExports.s_init_lock_sema)(e, t2); Module._table_parallelscan_initialize = (e, t2, r) => (Module._table_parallelscan_initialize = wasmExports.table_parallelscan_initialize)(e, t2, r); Module._tuplesort_initialize_shared = (e, t2, r) => (Module._tuplesort_initialize_shared = wasmExports.tuplesort_initialize_shared)(e, t2, r); Module._shm_toc_insert = (e, t2, r) => (Module._shm_toc_insert = wasmExports.shm_toc_insert)(e, t2, r); Module._LaunchParallelWorkers = (e) => (Module._LaunchParallelWorkers = wasmExports.LaunchParallelWorkers)(e); Module._WaitForParallelWorkersToAttach = (e) => (Module._WaitForParallelWorkersToAttach = wasmExports.WaitForParallelWorkersToAttach)(e); Module._tas_sema = (e) => (Module._tas_sema = wasmExports.tas_sema)(e); Module._s_lock = (e, t2, r, a2) => (Module._s_lock = wasmExports.s_lock)(e, t2, r, a2); Module._s_unlock_sema = (e) => (Module._s_unlock_sema = wasmExports.s_unlock_sema)(e); Module._ConditionVariableSleep = (e, t2) => (Module._ConditionVariableSleep = wasmExports.ConditionVariableSleep)(e, t2); Module._ConditionVariableCancelSleep = () => (Module._ConditionVariableCancelSleep = wasmExports.ConditionVariableCancelSleep)(); Module._tuplesort_performsort = (e) => (Module._tuplesort_performsort = wasmExports.tuplesort_performsort)(e); Module._tuplesort_end = (e) => (Module._tuplesort_end = wasmExports.tuplesort_end)(e); Module._brin_deform_tuple = (e, t2, r) => (Module._brin_deform_tuple = wasmExports.brin_deform_tuple)(e, t2, r); Module._log_newpage_buffer = (e, t2) => (Module._log_newpage_buffer = wasmExports.log_newpage_buffer)(e, t2); Module._LockBuffer = (e, t2) => (Module._LockBuffer = wasmExports.LockBuffer)(e, t2); Module._ReleaseBuffer = (e) => (Module._ReleaseBuffer = wasmExports.ReleaseBuffer)(e); Module._IndexGetRelation = (e, t2) => (Module._IndexGetRelation = wasmExports.IndexGetRelation)(e, t2); Module._table_open = (e, t2) => (Module._table_open = wasmExports.table_open)(e, t2); Module._ReadBufferExtended = (e, t2, r, a2, s4) => (Module._ReadBufferExtended = wasmExports.ReadBufferExtended)(e, t2, r, a2, s4); Module._table_close = (e, t2) => (Module._table_close = wasmExports.table_close)(e, t2); Module._build_reloptions = (e, t2, r, a2, s4, o4) => (Module._build_reloptions = wasmExports.build_reloptions)(e, t2, r, a2, s4, o4); Module._RelationGetIndexScan = (e, t2, r) => (Module._RelationGetIndexScan = wasmExports.RelationGetIndexScan)(e, t2, r); Module._pgstat_assoc_relation = (e) => (Module._pgstat_assoc_relation = wasmExports.pgstat_assoc_relation)(e); Module._index_getprocinfo = (e, t2, r) => (Module._index_getprocinfo = wasmExports.index_getprocinfo)(e, t2, r); Module._fmgr_info_copy = (e, t2, r) => (Module._fmgr_info_copy = wasmExports.fmgr_info_copy)(e, t2, r); Module._FunctionCall4Coll = (e, t2, r, a2, s4, o4) => (Module._FunctionCall4Coll = wasmExports.FunctionCall4Coll)(e, t2, r, a2, s4, o4); Module._FunctionCall1Coll = (e, t2, r) => (Module._FunctionCall1Coll = wasmExports.FunctionCall1Coll)(e, t2, r); Module._brin_free_desc = (e) => (Module._brin_free_desc = wasmExports.brin_free_desc)(e); Module._WaitForParallelWorkersToFinish = (e) => (Module._WaitForParallelWorkersToFinish = wasmExports.WaitForParallelWorkersToFinish)(e); Module._PageGetFreeSpace = (e) => (Module._PageGetFreeSpace = wasmExports.PageGetFreeSpace)(e); Module._BufferGetBlockNumber = (e) => (Module._BufferGetBlockNumber = wasmExports.BufferGetBlockNumber)(e); Module._BuildIndexInfo = (e) => (Module._BuildIndexInfo = wasmExports.BuildIndexInfo)(e); Module._Int64GetDatum = (e) => (Module._Int64GetDatum = wasmExports.Int64GetDatum)(e); Module._DirectFunctionCall2Coll = (e, t2, r, a2) => (Module._DirectFunctionCall2Coll = wasmExports.DirectFunctionCall2Coll)(e, t2, r, a2); Module._RecoveryInProgress = () => (Module._RecoveryInProgress = wasmExports.RecoveryInProgress)(); Module._GetUserIdAndSecContext = (e, t2) => (Module._GetUserIdAndSecContext = wasmExports.GetUserIdAndSecContext)(e, t2); Module._SetUserIdAndSecContext = (e, t2) => (Module._SetUserIdAndSecContext = wasmExports.SetUserIdAndSecContext)(e, t2); Module._NewGUCNestLevel = () => (Module._NewGUCNestLevel = wasmExports.NewGUCNestLevel)(); Module._RestrictSearchPath = () => (Module._RestrictSearchPath = wasmExports.RestrictSearchPath)(); Module._index_open = (e, t2) => (Module._index_open = wasmExports.index_open)(e, t2); Module._object_ownercheck = (e, t2, r) => (Module._object_ownercheck = wasmExports.object_ownercheck)(e, t2, r); Module._aclcheck_error = (e, t2, r) => (Module._aclcheck_error = wasmExports.aclcheck_error)(e, t2, r); Module._AtEOXact_GUC = (e, t2) => (Module._AtEOXact_GUC = wasmExports.AtEOXact_GUC)(e, t2); Module._relation_close = (e, t2) => (Module._relation_close = wasmExports.relation_close)(e, t2); Module._GetUserId = () => (Module._GetUserId = wasmExports.GetUserId)(); Module._ReadBuffer = (e, t2) => (Module._ReadBuffer = wasmExports.ReadBuffer)(e, t2); Module._shm_toc_lookup = (e, t2, r) => (Module._shm_toc_lookup = wasmExports.shm_toc_lookup)(e, t2, r); Module._tuplesort_attach_shared = (e, t2) => (Module._tuplesort_attach_shared = wasmExports.tuplesort_attach_shared)(e, t2); Module._index_close = (e, t2) => (Module._index_close = wasmExports.index_close)(e, t2); Module._table_beginscan_parallel = (e, t2) => (Module._table_beginscan_parallel = wasmExports.table_beginscan_parallel)(e, t2); Module._ConditionVariableSignal = (e) => (Module._ConditionVariableSignal = wasmExports.ConditionVariableSignal)(e); Module._datumCopy = (e, t2, r) => (Module._datumCopy = wasmExports.datumCopy)(e, t2, r); Module._lookup_type_cache = (e, t2) => (Module._lookup_type_cache = wasmExports.lookup_type_cache)(e, t2); Module._get_fn_opclass_options = (e) => (Module._get_fn_opclass_options = wasmExports.get_fn_opclass_options)(e); Module._pg_detoast_datum = (e) => (Module._pg_detoast_datum = wasmExports.pg_detoast_datum)(e); Module._index_getprocid = (e, t2, r) => (Module._index_getprocid = wasmExports.index_getprocid)(e, t2, r); Module._init_local_reloptions = (e, t2) => (Module._init_local_reloptions = wasmExports.init_local_reloptions)(e, t2); Module._FunctionCall2Coll = (e, t2, r, a2) => (Module._FunctionCall2Coll = wasmExports.FunctionCall2Coll)(e, t2, r, a2); Module._SysCacheGetAttrNotNull = (e, t2, r) => (Module._SysCacheGetAttrNotNull = wasmExports.SysCacheGetAttrNotNull)(e, t2, r); Module._ReleaseSysCache = (e) => (Module._ReleaseSysCache = wasmExports.ReleaseSysCache)(e); Module._fmgr_info_cxt = (e, t2, r) => (Module._fmgr_info_cxt = wasmExports.fmgr_info_cxt)(e, t2, r); Module._Float8GetDatum = (e) => (Module._Float8GetDatum = wasmExports.Float8GetDatum)(e); Module._numeric_sub = (e) => (Module._numeric_sub = wasmExports.numeric_sub)(e); Module._DirectFunctionCall1Coll = (e, t2, r) => (Module._DirectFunctionCall1Coll = wasmExports.DirectFunctionCall1Coll)(e, t2, r); Module._pg_detoast_datum_packed = (e) => (Module._pg_detoast_datum_packed = wasmExports.pg_detoast_datum_packed)(e); Module._add_local_int_reloption = (e, t2, r, a2, s4, o4, n3) => (Module._add_local_int_reloption = wasmExports.add_local_int_reloption)(e, t2, r, a2, s4, o4, n3); Module._getTypeOutputInfo = (e, t2, r) => (Module._getTypeOutputInfo = wasmExports.getTypeOutputInfo)(e, t2, r); Module._fmgr_info = (e, t2) => (Module._fmgr_info = wasmExports.fmgr_info)(e, t2); Module._OutputFunctionCall = (e, t2) => (Module._OutputFunctionCall = wasmExports.OutputFunctionCall)(e, t2); Module._cstring_to_text_with_len = (e, t2) => (Module._cstring_to_text_with_len = wasmExports.cstring_to_text_with_len)(e, t2); Module._accumArrayResult = (e, t2, r, a2, s4) => (Module._accumArrayResult = wasmExports.accumArrayResult)(e, t2, r, a2, s4); Module._makeArrayResult = (e, t2) => (Module._makeArrayResult = wasmExports.makeArrayResult)(e, t2); Module._OidOutputFunctionCall = (e, t2) => (Module._OidOutputFunctionCall = wasmExports.OidOutputFunctionCall)(e, t2); Module._cstring_to_text = (e) => (Module._cstring_to_text = wasmExports.cstring_to_text)(e); Module._PageGetExactFreeSpace = (e) => (Module._PageGetExactFreeSpace = wasmExports.PageGetExactFreeSpace)(e); Module._PageIndexTupleOverwrite = (e, t2, r, a2) => (Module._PageIndexTupleOverwrite = wasmExports.PageIndexTupleOverwrite)(e, t2, r, a2); Module._PageInit = (e, t2, r) => (Module._PageInit = wasmExports.PageInit)(e, t2, r); Module._PageAddItemExtended = (e, t2, r, a2, s4) => (Module._PageAddItemExtended = wasmExports.PageAddItemExtended)(e, t2, r, a2, s4); Module._LockRelationForExtension = (e, t2) => (Module._LockRelationForExtension = wasmExports.LockRelationForExtension)(e, t2); Module._UnlockRelationForExtension = (e, t2) => (Module._UnlockRelationForExtension = wasmExports.UnlockRelationForExtension)(e, t2); Module._smgropen = (e, t2) => (Module._smgropen = wasmExports.smgropen)(e, t2); Module._smgrpin = (e) => (Module._smgrpin = wasmExports.smgrpin)(e); Module._ItemPointerEquals = (e, t2) => (Module._ItemPointerEquals = wasmExports.ItemPointerEquals)(e, t2); Module._detoast_external_attr = (e) => (Module._detoast_external_attr = wasmExports.detoast_external_attr)(e); Module._CreateTemplateTupleDesc = (e) => (Module._CreateTemplateTupleDesc = wasmExports.CreateTemplateTupleDesc)(e); Module._TupleDescInitEntry = (e, t2, r, a2, s4, o4) => (Module._TupleDescInitEntry = wasmExports.TupleDescInitEntry)(e, t2, r, a2, s4, o4); Module._SearchSysCache1 = (e, t2) => (Module._SearchSysCache1 = wasmExports.SearchSysCache1)(e, t2); Module._SearchSysCacheList = (e, t2, r, a2, s4) => (Module._SearchSysCacheList = wasmExports.SearchSysCacheList)(e, t2, r, a2, s4); Module._check_amproc_signature = (e, t2, r, a2, s4, o4) => (Module._check_amproc_signature = wasmExports.check_amproc_signature)(e, t2, r, a2, s4, o4); Module._check_amoptsproc_signature = (e) => (Module._check_amoptsproc_signature = wasmExports.check_amoptsproc_signature)(e); Module._format_procedure = (e) => (Module._format_procedure = wasmExports.format_procedure)(e); Module._format_operator = (e) => (Module._format_operator = wasmExports.format_operator)(e); Module._check_amop_signature = (e, t2, r, a2) => (Module._check_amop_signature = wasmExports.check_amop_signature)(e, t2, r, a2); Module._identify_opfamily_groups = (e, t2) => (Module._identify_opfamily_groups = wasmExports.identify_opfamily_groups)(e, t2); Module._format_type_be = (e) => (Module._format_type_be = wasmExports.format_type_be)(e); Module._ReleaseCatCacheList = (e) => (Module._ReleaseCatCacheList = wasmExports.ReleaseCatCacheList)(e); Module._format_type_with_typemod = (e, t2) => (Module._format_type_with_typemod = wasmExports.format_type_with_typemod)(e, t2); Module._DatumGetEOHP = (e) => (Module._DatumGetEOHP = wasmExports.DatumGetEOHP)(e); Module._EOH_get_flat_size = (e) => (Module._EOH_get_flat_size = wasmExports.EOH_get_flat_size)(e); Module._EOH_flatten_into = (e, t2, r) => (Module._EOH_flatten_into = wasmExports.EOH_flatten_into)(e, t2, r); Module._getmissingattr = (e, t2, r) => (Module._getmissingattr = wasmExports.getmissingattr)(e, t2, r); Module._hash_create = (e, t2, r, a2) => (Module._hash_create = wasmExports.hash_create)(e, t2, r, a2); Module._hash_search = (e, t2, r, a2) => (Module._hash_search = wasmExports.hash_search)(e, t2, r, a2); Module._nocachegetattr = (e, t2, r) => (Module._nocachegetattr = wasmExports.nocachegetattr)(e, t2, r); Module._heap_form_tuple = (e, t2, r) => (Module._heap_form_tuple = wasmExports.heap_form_tuple)(e, t2, r); Module._heap_modify_tuple = (e, t2, r, a2, s4) => (Module._heap_modify_tuple = wasmExports.heap_modify_tuple)(e, t2, r, a2, s4); Module._heap_deform_tuple = (e, t2, r, a2) => (Module._heap_deform_tuple = wasmExports.heap_deform_tuple)(e, t2, r, a2); Module._heap_modify_tuple_by_cols = (e, t2, r, a2, s4, o4) => (Module._heap_modify_tuple_by_cols = wasmExports.heap_modify_tuple_by_cols)(e, t2, r, a2, s4, o4); Module._heap_freetuple = (e) => (Module._heap_freetuple = wasmExports.heap_freetuple)(e); Module._index_form_tuple = (e, t2, r) => (Module._index_form_tuple = wasmExports.index_form_tuple)(e, t2, r); Module._nocache_index_getattr = (e, t2, r) => (Module._nocache_index_getattr = wasmExports.nocache_index_getattr)(e, t2, r); Module._index_deform_tuple = (e, t2, r, a2) => (Module._index_deform_tuple = wasmExports.index_deform_tuple)(e, t2, r, a2); Module._slot_getsomeattrs_int = (e, t2) => (Module._slot_getsomeattrs_int = wasmExports.slot_getsomeattrs_int)(e, t2); Module._pg_ltoa = (e, t2) => (Module._pg_ltoa = wasmExports.pg_ltoa)(e, t2); Module._relation_open = (e, t2) => (Module._relation_open = wasmExports.relation_open)(e, t2); Module._LockRelationOid = (e, t2) => (Module._LockRelationOid = wasmExports.LockRelationOid)(e, t2); Module._try_relation_open = (e, t2) => (Module._try_relation_open = wasmExports.try_relation_open)(e, t2); Module._relation_openrv = (e, t2) => (Module._relation_openrv = wasmExports.relation_openrv)(e, t2); Module._RangeVarGetRelidExtended = (e, t2, r, a2, s4) => (Module._RangeVarGetRelidExtended = wasmExports.RangeVarGetRelidExtended)(e, t2, r, a2, s4); Module._add_reloption_kind = () => (Module._add_reloption_kind = wasmExports.add_reloption_kind)(); Module._register_reloptions_validator = (e, t2) => (Module._register_reloptions_validator = wasmExports.register_reloptions_validator)(e, t2); Module._add_int_reloption = (e, t2, r, a2, s4, o4, n3) => (Module._add_int_reloption = wasmExports.add_int_reloption)(e, t2, r, a2, s4, o4, n3); Module._MemoryContextStrdup = (e, t2) => (Module._MemoryContextStrdup = wasmExports.MemoryContextStrdup)(e, t2); Module._transformRelOptions = (e, t2, r, a2, s4, o4) => (Module._transformRelOptions = wasmExports.transformRelOptions)(e, t2, r, a2, s4, o4); Module._deconstruct_array_builtin = (e, t2, r, a2, s4) => (Module._deconstruct_array_builtin = wasmExports.deconstruct_array_builtin)(e, t2, r, a2, s4); Module._defGetString = (e) => (Module._defGetString = wasmExports.defGetString)(e); Module._defGetBoolean = (e) => (Module._defGetBoolean = wasmExports.defGetBoolean)(e); Module._untransformRelOptions = (e) => (Module._untransformRelOptions = wasmExports.untransformRelOptions)(e); Module._text_to_cstring = (e) => (Module._text_to_cstring = wasmExports.text_to_cstring)(e); Module._makeString = (e) => (Module._makeString = wasmExports.makeString)(e); Module._makeDefElem = (e, t2, r) => (Module._makeDefElem = wasmExports.makeDefElem)(e, t2, r); Module._heap_reloptions = (e, t2, r) => (Module._heap_reloptions = wasmExports.heap_reloptions)(e, t2, r); Module._MemoryContextAlloc = (e, t2) => (Module._MemoryContextAlloc = wasmExports.MemoryContextAlloc)(e, t2); Module._parse_bool = (e, t2) => (Module._parse_bool = wasmExports.parse_bool)(e, t2); Module._parse_int = (e, t2, r, a2) => (Module._parse_int = wasmExports.parse_int)(e, t2, r, a2); Module._parse_real = (e, t2, r, a2) => (Module._parse_real = wasmExports.parse_real)(e, t2, r, a2); Module._ScanKeyInit = (e, t2, r, a2, s4) => (Module._ScanKeyInit = wasmExports.ScanKeyInit)(e, t2, r, a2, s4); Module._dsm_segment_handle = (e) => (Module._dsm_segment_handle = wasmExports.dsm_segment_handle)(e); Module._dsm_create = (e, t2) => (Module._dsm_create = wasmExports.dsm_create)(e, t2); Module._dsm_segment_address = (e) => (Module._dsm_segment_address = wasmExports.dsm_segment_address)(e); Module._dsm_attach = (e) => (Module._dsm_attach = wasmExports.dsm_attach)(e); Module._dsm_detach = (e) => (Module._dsm_detach = wasmExports.dsm_detach)(e); Module._ShmemInitStruct = (e, t2, r) => (Module._ShmemInitStruct = wasmExports.ShmemInitStruct)(e, t2, r); Module._LWLockAcquire = (e, t2) => (Module._LWLockAcquire = wasmExports.LWLockAcquire)(e, t2); Module._LWLockRelease = (e) => (Module._LWLockRelease = wasmExports.LWLockRelease)(e); Module._LWLockInitialize = (e, t2) => (Module._LWLockInitialize = wasmExports.LWLockInitialize)(e, t2); Module._MemoryContextMemAllocated = (e, t2) => (Module._MemoryContextMemAllocated = wasmExports.MemoryContextMemAllocated)(e, t2); Module._GetCurrentCommandId = (e) => (Module._GetCurrentCommandId = wasmExports.GetCurrentCommandId)(e); Module._toast_open_indexes = (e, t2, r, a2) => (Module._toast_open_indexes = wasmExports.toast_open_indexes)(e, t2, r, a2); Module._RelationGetIndexList = (e) => (Module._RelationGetIndexList = wasmExports.RelationGetIndexList)(e); Module._systable_beginscan = (e, t2, r, a2, s4, o4) => (Module._systable_beginscan = wasmExports.systable_beginscan)(e, t2, r, a2, s4, o4); Module._systable_getnext = (e) => (Module._systable_getnext = wasmExports.systable_getnext)(e); Module._systable_endscan = (e) => (Module._systable_endscan = wasmExports.systable_endscan)(e); Module._toast_close_indexes = (e, t2, r) => (Module._toast_close_indexes = wasmExports.toast_close_indexes)(e, t2, r); Module._systable_beginscan_ordered = (e, t2, r, a2, s4) => (Module._systable_beginscan_ordered = wasmExports.systable_beginscan_ordered)(e, t2, r, a2, s4); Module._systable_getnext_ordered = (e, t2) => (Module._systable_getnext_ordered = wasmExports.systable_getnext_ordered)(e, t2); Module._systable_endscan_ordered = (e) => (Module._systable_endscan_ordered = wasmExports.systable_endscan_ordered)(e); Module._init_toast_snapshot = (e) => (Module._init_toast_snapshot = wasmExports.init_toast_snapshot)(e); Module._convert_tuples_by_position = (e, t2, r) => (Module._convert_tuples_by_position = wasmExports.convert_tuples_by_position)(e, t2, r); Module._execute_attr_map_tuple = (e, t2) => (Module._execute_attr_map_tuple = wasmExports.execute_attr_map_tuple)(e, t2); Module._ExecStoreVirtualTuple = (e) => (Module._ExecStoreVirtualTuple = wasmExports.ExecStoreVirtualTuple)(e); Module._bms_is_member = (e, t2) => (Module._bms_is_member = wasmExports.bms_is_member)(e, t2); Module._bms_add_member = (e, t2) => (Module._bms_add_member = wasmExports.bms_add_member)(e, t2); Module._CreateTupleDescCopy = (e) => (Module._CreateTupleDescCopy = wasmExports.CreateTupleDescCopy)(e); Module._DecrTupleDescRefCount = (e) => (Module._DecrTupleDescRefCount = wasmExports.DecrTupleDescRefCount)(e); Module._datumIsEqual = (e, t2, r, a2) => (Module._datumIsEqual = wasmExports.datumIsEqual)(e, t2, r, a2); Module._TupleDescInitEntryCollation = (e, t2, r) => (Module._TupleDescInitEntryCollation = wasmExports.TupleDescInitEntryCollation)(e, t2, r); Module._stringToNode = (e) => (Module._stringToNode = wasmExports.stringToNode)(e); Module._pg_detoast_datum_copy = (e) => (Module._pg_detoast_datum_copy = wasmExports.pg_detoast_datum_copy)(e); Module._get_typlenbyvalalign = (e, t2, r, a2) => (Module._get_typlenbyvalalign = wasmExports.get_typlenbyvalalign)(e, t2, r, a2); Module._deconstruct_array = (e, t2, r, a2, s4, o4, n3, _3) => (Module._deconstruct_array = wasmExports.deconstruct_array)(e, t2, r, a2, s4, o4, n3, _3); Module._tbm_add_tuples = (e, t2, r, a2) => (Module._tbm_add_tuples = wasmExports.tbm_add_tuples)(e, t2, r, a2); Module._ginPostingListDecode = (e, t2) => (Module._ginPostingListDecode = wasmExports.ginPostingListDecode)(e, t2); Module._ItemPointerCompare = (e, t2) => (Module._ItemPointerCompare = wasmExports.ItemPointerCompare)(e, t2); Module._LockPage = (e, t2, r) => (Module._LockPage = wasmExports.LockPage)(e, t2, r); Module._UnlockPage = (e, t2, r) => (Module._UnlockPage = wasmExports.UnlockPage)(e, t2, r); Module._vacuum_delay_point = () => (Module._vacuum_delay_point = wasmExports.vacuum_delay_point)(); Module._RecordFreeIndexPage = (e, t2) => (Module._RecordFreeIndexPage = wasmExports.RecordFreeIndexPage)(e, t2); Module._IndexFreeSpaceMapVacuum = (e) => (Module._IndexFreeSpaceMapVacuum = wasmExports.IndexFreeSpaceMapVacuum)(e); Module._log_newpage_range = (e, t2, r, a2, s4) => (Module._log_newpage_range = wasmExports.log_newpage_range)(e, t2, r, a2, s4); Module._GetFreeIndexPage = (e) => (Module._GetFreeIndexPage = wasmExports.GetFreeIndexPage)(e); Module._ConditionalLockBuffer = (e) => (Module._ConditionalLockBuffer = wasmExports.ConditionalLockBuffer)(e); Module._LockBufferForCleanup = (e) => (Module._LockBufferForCleanup = wasmExports.LockBufferForCleanup)(e); Module._gistcheckpage = (e, t2) => (Module._gistcheckpage = wasmExports.gistcheckpage)(e, t2); Module._PageIndexMultiDelete = (e, t2, r) => (Module._PageIndexMultiDelete = wasmExports.PageIndexMultiDelete)(e, t2, r); Module._smgrnblocks = (e, t2) => (Module._smgrnblocks = wasmExports.smgrnblocks)(e, t2); Module._list_free_deep = (e) => (Module._list_free_deep = wasmExports.list_free_deep)(e); Module._pairingheap_remove_first = (e) => (Module._pairingheap_remove_first = wasmExports.pairingheap_remove_first)(e); Module._pairingheap_add = (e, t2) => (Module._pairingheap_add = wasmExports.pairingheap_add)(e, t2); Module._float_overflow_error = () => (Module._float_overflow_error = wasmExports.float_overflow_error)(); Module._float_underflow_error = () => (Module._float_underflow_error = wasmExports.float_underflow_error)(); Module._DirectFunctionCall5Coll = (e, t2, r, a2, s4, o4, n3) => (Module._DirectFunctionCall5Coll = wasmExports.DirectFunctionCall5Coll)(e, t2, r, a2, s4, o4, n3); Module._pairingheap_allocate = (e, t2) => (Module._pairingheap_allocate = wasmExports.pairingheap_allocate)(e, t2); Module._GenerationContextCreate = (e, t2, r, a2, s4) => (Module._GenerationContextCreate = wasmExports.GenerationContextCreate)(e, t2, r, a2, s4); Module._pgstat_progress_update_param = (e, t2) => (Module._pgstat_progress_update_param = wasmExports.pgstat_progress_update_param)(e, t2); Module.__hash_getbuf = (e, t2, r, a2) => (Module.__hash_getbuf = wasmExports._hash_getbuf)(e, t2, r, a2); Module.__hash_relbuf = (e, t2) => (Module.__hash_relbuf = wasmExports._hash_relbuf)(e, t2); Module.__hash_get_indextuple_hashkey = (e) => (Module.__hash_get_indextuple_hashkey = wasmExports._hash_get_indextuple_hashkey)(e); Module.__hash_getbuf_with_strategy = (e, t2, r, a2, s4) => (Module.__hash_getbuf_with_strategy = wasmExports._hash_getbuf_with_strategy)(e, t2, r, a2, s4); Module.__hash_ovflblkno_to_bitno = (e, t2) => (Module.__hash_ovflblkno_to_bitno = wasmExports._hash_ovflblkno_to_bitno)(e, t2); Module._list_member_oid = (e, t2) => (Module._list_member_oid = wasmExports.list_member_oid)(e, t2); Module._HeapTupleSatisfiesVisibility = (e, t2, r) => (Module._HeapTupleSatisfiesVisibility = wasmExports.HeapTupleSatisfiesVisibility)(e, t2, r); Module._read_stream_begin_relation = (e, t2, r, a2, s4, o4, n3) => (Module._read_stream_begin_relation = wasmExports.read_stream_begin_relation)(e, t2, r, a2, s4, o4, n3); Module._GetAccessStrategy = (e) => (Module._GetAccessStrategy = wasmExports.GetAccessStrategy)(e); Module._FreeAccessStrategy = (e) => (Module._FreeAccessStrategy = wasmExports.FreeAccessStrategy)(e); Module._read_stream_end = (e) => (Module._read_stream_end = wasmExports.read_stream_end)(e); Module._heap_getnext = (e, t2) => (Module._heap_getnext = wasmExports.heap_getnext)(e, t2); Module._HeapTupleSatisfiesVacuum = (e, t2, r) => (Module._HeapTupleSatisfiesVacuum = wasmExports.HeapTupleSatisfiesVacuum)(e, t2, r); Module._GetMultiXactIdMembers = (e, t2, r, a2) => (Module._GetMultiXactIdMembers = wasmExports.GetMultiXactIdMembers)(e, t2, r, a2); Module._TransactionIdPrecedes = (e, t2) => (Module._TransactionIdPrecedes = wasmExports.TransactionIdPrecedes)(e, t2); Module._HeapTupleGetUpdateXid = (e) => (Module._HeapTupleGetUpdateXid = wasmExports.HeapTupleGetUpdateXid)(e); Module._visibilitymap_clear = (e, t2, r, a2) => (Module._visibilitymap_clear = wasmExports.visibilitymap_clear)(e, t2, r, a2); Module._pgstat_count_heap_insert = (e, t2) => (Module._pgstat_count_heap_insert = wasmExports.pgstat_count_heap_insert)(e, t2); Module._ExecFetchSlotHeapTuple = (e, t2, r) => (Module._ExecFetchSlotHeapTuple = wasmExports.ExecFetchSlotHeapTuple)(e, t2, r); Module._PageGetHeapFreeSpace = (e) => (Module._PageGetHeapFreeSpace = wasmExports.PageGetHeapFreeSpace)(e); Module._visibilitymap_pin = (e, t2, r) => (Module._visibilitymap_pin = wasmExports.visibilitymap_pin)(e, t2, r); Module._HeapTupleSatisfiesUpdate = (e, t2, r) => (Module._HeapTupleSatisfiesUpdate = wasmExports.HeapTupleSatisfiesUpdate)(e, t2, r); Module._TransactionIdIsCurrentTransactionId = (e) => (Module._TransactionIdIsCurrentTransactionId = wasmExports.TransactionIdIsCurrentTransactionId)(e); Module._TransactionIdDidCommit = (e) => (Module._TransactionIdDidCommit = wasmExports.TransactionIdDidCommit)(e); Module._TransactionIdIsInProgress = (e) => (Module._TransactionIdIsInProgress = wasmExports.TransactionIdIsInProgress)(e); Module._bms_free = (e) => (Module._bms_free = wasmExports.bms_free)(e); Module._bms_add_members = (e, t2) => (Module._bms_add_members = wasmExports.bms_add_members)(e, t2); Module._bms_next_member = (e, t2) => (Module._bms_next_member = wasmExports.bms_next_member)(e, t2); Module._bms_overlap = (e, t2) => (Module._bms_overlap = wasmExports.bms_overlap)(e, t2); Module._MultiXactIdPrecedes = (e, t2) => (Module._MultiXactIdPrecedes = wasmExports.MultiXactIdPrecedes)(e, t2); Module._heap_tuple_needs_eventual_freeze = (e) => (Module._heap_tuple_needs_eventual_freeze = wasmExports.heap_tuple_needs_eventual_freeze)(e); Module._PrefetchBuffer = (e, t2, r, a2) => (Module._PrefetchBuffer = wasmExports.PrefetchBuffer)(e, t2, r, a2); Module._XLogRecGetBlockTagExtended = (e, t2, r, a2, s4, o4) => (Module._XLogRecGetBlockTagExtended = wasmExports.XLogRecGetBlockTagExtended)(e, t2, r, a2, s4, o4); Module._read_stream_next_buffer = (e, t2) => (Module._read_stream_next_buffer = wasmExports.read_stream_next_buffer)(e, t2); Module._smgrexists = (e, t2) => (Module._smgrexists = wasmExports.smgrexists)(e, t2); Module._table_slot_create = (e, t2) => (Module._table_slot_create = wasmExports.table_slot_create)(e, t2); Module._ExecDropSingleTupleTableSlot = (e) => (Module._ExecDropSingleTupleTableSlot = wasmExports.ExecDropSingleTupleTableSlot)(e); Module._CreateExecutorState = () => (Module._CreateExecutorState = wasmExports.CreateExecutorState)(); Module._MakePerTupleExprContext = (e) => (Module._MakePerTupleExprContext = wasmExports.MakePerTupleExprContext)(e); Module._GetOldestNonRemovableTransactionId = (e) => (Module._GetOldestNonRemovableTransactionId = wasmExports.GetOldestNonRemovableTransactionId)(e); Module._FreeExecutorState = (e) => (Module._FreeExecutorState = wasmExports.FreeExecutorState)(e); Module._MakeSingleTupleTableSlot = (e, t2) => (Module._MakeSingleTupleTableSlot = wasmExports.MakeSingleTupleTableSlot)(e, t2); Module._ExecStoreHeapTuple = (e, t2, r) => (Module._ExecStoreHeapTuple = wasmExports.ExecStoreHeapTuple)(e, t2, r); Module._visibilitymap_get_status = (e, t2, r) => (Module._visibilitymap_get_status = wasmExports.visibilitymap_get_status)(e, t2, r); Module._ExecStoreAllNullTuple = (e) => (Module._ExecStoreAllNullTuple = wasmExports.ExecStoreAllNullTuple)(e); Module._XidInMVCCSnapshot = (e, t2) => (Module._XidInMVCCSnapshot = wasmExports.XidInMVCCSnapshot)(e, t2); Module._hash_seq_init = (e, t2) => (Module._hash_seq_init = wasmExports.hash_seq_init)(e, t2); Module._hash_seq_search = (e) => (Module._hash_seq_search = wasmExports.hash_seq_search)(e); Module._ftruncate = (e, t2) => (Module._ftruncate = wasmExports.ftruncate)(e, t2); Module._fd_fsync_fname = (e, t2) => (Module._fd_fsync_fname = wasmExports.fd_fsync_fname)(e, t2); Module._get_namespace_name = (e) => (Module._get_namespace_name = wasmExports.get_namespace_name)(e); Module._GetRecordedFreeSpace = (e, t2) => (Module._GetRecordedFreeSpace = wasmExports.GetRecordedFreeSpace)(e, t2); Module._vac_estimate_reltuples = (e, t2, r, a2) => (Module._vac_estimate_reltuples = wasmExports.vac_estimate_reltuples)(e, t2, r, a2); Module._WaitLatch = (e, t2, r, a2) => (Module._WaitLatch = wasmExports.WaitLatch)(e, t2, r, a2); Module._ResetLatch = (e) => (Module._ResetLatch = wasmExports.ResetLatch)(e); Module._clock_gettime = (e, t2) => (Module._clock_gettime = wasmExports.clock_gettime)(e, t2); Module._WalUsageAccumDiff = (e, t2, r) => (Module._WalUsageAccumDiff = wasmExports.WalUsageAccumDiff)(e, t2, r); Module._BufferUsageAccumDiff = (e, t2, r) => (Module._BufferUsageAccumDiff = wasmExports.BufferUsageAccumDiff)(e, t2, r); Module._visibilitymap_prepare_truncate = (e, t2) => (Module._visibilitymap_prepare_truncate = wasmExports.visibilitymap_prepare_truncate)(e, t2); Module._pg_class_aclcheck = (e, t2, r) => (Module._pg_class_aclcheck = wasmExports.pg_class_aclcheck)(e, t2, r); Module._btboolcmp = (e) => (Module._btboolcmp = wasmExports.btboolcmp)(e); Module._btint2cmp = (e) => (Module._btint2cmp = wasmExports.btint2cmp)(e); Module._btint4cmp = (e) => (Module._btint4cmp = wasmExports.btint4cmp)(e); Module._btint8cmp = (e) => (Module._btint8cmp = wasmExports.btint8cmp)(e); Module._btoidcmp = (e) => (Module._btoidcmp = wasmExports.btoidcmp)(e); Module._btcharcmp = (e) => (Module._btcharcmp = wasmExports.btcharcmp)(e); Module.__bt_form_posting = (e, t2, r) => (Module.__bt_form_posting = wasmExports._bt_form_posting)(e, t2, r); Module.__bt_mkscankey = (e, t2) => (Module.__bt_mkscankey = wasmExports._bt_mkscankey)(e, t2); Module.__bt_checkpage = (e, t2) => (Module.__bt_checkpage = wasmExports._bt_checkpage)(e, t2); Module.__bt_compare = (e, t2, r, a2) => (Module.__bt_compare = wasmExports._bt_compare)(e, t2, r, a2); Module.__bt_relbuf = (e, t2) => (Module.__bt_relbuf = wasmExports._bt_relbuf)(e, t2); Module.__bt_search = (e, t2, r, a2, s4) => (Module.__bt_search = wasmExports._bt_search)(e, t2, r, a2, s4); Module.__bt_binsrch_insert = (e, t2) => (Module.__bt_binsrch_insert = wasmExports._bt_binsrch_insert)(e, t2); Module.__bt_freestack = (e) => (Module.__bt_freestack = wasmExports._bt_freestack)(e); Module.__bt_metaversion = (e, t2, r) => (Module.__bt_metaversion = wasmExports._bt_metaversion)(e, t2, r); Module.__bt_allequalimage = (e, t2) => (Module.__bt_allequalimage = wasmExports._bt_allequalimage)(e, t2); Module._before_shmem_exit = (e, t2) => (Module._before_shmem_exit = wasmExports.before_shmem_exit)(e, t2); Module._cancel_before_shmem_exit = (e, t2) => (Module._cancel_before_shmem_exit = wasmExports.cancel_before_shmem_exit)(e, t2); Module._pg_re_throw = () => (Module._pg_re_throw = wasmExports.pg_re_throw)(); Module._get_opfamily_member = (e, t2, r, a2) => (Module._get_opfamily_member = wasmExports.get_opfamily_member)(e, t2, r, a2); Module.__bt_check_natts = (e, t2, r, a2) => (Module.__bt_check_natts = wasmExports._bt_check_natts)(e, t2, r, a2); Module._timestamptz_to_str = (e) => (Module._timestamptz_to_str = wasmExports.timestamptz_to_str)(e); Module._XLogRecGetBlockRefInfo = (e, t2, r, a2, s4) => (Module._XLogRecGetBlockRefInfo = wasmExports.XLogRecGetBlockRefInfo)(e, t2, r, a2, s4); Module._varstr_cmp = (e, t2, r, a2, s4) => (Module._varstr_cmp = wasmExports.varstr_cmp)(e, t2, r, a2, s4); Module._exprType = (e) => (Module._exprType = wasmExports.exprType)(e); Module._GetActiveSnapshot = () => (Module._GetActiveSnapshot = wasmExports.GetActiveSnapshot)(); Module._errdetail_relkind_not_supported = (e) => (Module._errdetail_relkind_not_supported = wasmExports.errdetail_relkind_not_supported)(e); Module._table_openrv = (e, t2) => (Module._table_openrv = wasmExports.table_openrv)(e, t2); Module._table_slot_callbacks = (e) => (Module._table_slot_callbacks = wasmExports.table_slot_callbacks)(e); Module._clamp_row_est = (e) => (Module._clamp_row_est = wasmExports.clamp_row_est)(e); Module._estimate_expression_value = (e, t2) => (Module._estimate_expression_value = wasmExports.estimate_expression_value)(e, t2); Module._XLogFlush = (e) => (Module._XLogFlush = wasmExports.XLogFlush)(e); Module._get_call_result_type = (e, t2, r) => (Module._get_call_result_type = wasmExports.get_call_result_type)(e, t2, r); Module._HeapTupleHeaderGetDatum = (e) => (Module._HeapTupleHeaderGetDatum = wasmExports.HeapTupleHeaderGetDatum)(e); Module._GenericXLogStart = (e) => (Module._GenericXLogStart = wasmExports.GenericXLogStart)(e); Module._GenericXLogRegisterBuffer = (e, t2, r) => (Module._GenericXLogRegisterBuffer = wasmExports.GenericXLogRegisterBuffer)(e, t2, r); Module._GenericXLogFinish = (e) => (Module._GenericXLogFinish = wasmExports.GenericXLogFinish)(e); Module._GenericXLogAbort = (e) => (Module._GenericXLogAbort = wasmExports.GenericXLogAbort)(e); Module._errmsg_plural = (e, t2, r, a2) => (Module._errmsg_plural = wasmExports.errmsg_plural)(e, t2, r, a2); Module._ReadNextMultiXactId = () => (Module._ReadNextMultiXactId = wasmExports.ReadNextMultiXactId)(); Module._ReadMultiXactIdRange = (e, t2) => (Module._ReadMultiXactIdRange = wasmExports.ReadMultiXactIdRange)(e, t2); Module._MultiXactIdPrecedesOrEquals = (e, t2) => (Module._MultiXactIdPrecedesOrEquals = wasmExports.MultiXactIdPrecedesOrEquals)(e, t2); Module._init_MultiFuncCall = (e) => (Module._init_MultiFuncCall = wasmExports.init_MultiFuncCall)(e); Module._TupleDescGetAttInMetadata = (e) => (Module._TupleDescGetAttInMetadata = wasmExports.TupleDescGetAttInMetadata)(e); Module._per_MultiFuncCall = (e) => (Module._per_MultiFuncCall = wasmExports.per_MultiFuncCall)(e); Module._BuildTupleFromCStrings = (e, t2) => (Module._BuildTupleFromCStrings = wasmExports.BuildTupleFromCStrings)(e, t2); Module._end_MultiFuncCall = (e, t2) => (Module._end_MultiFuncCall = wasmExports.end_MultiFuncCall)(e, t2); Module._GetCurrentSubTransactionId = () => (Module._GetCurrentSubTransactionId = wasmExports.GetCurrentSubTransactionId)(); Module._WaitForBackgroundWorkerShutdown = (e) => (Module._WaitForBackgroundWorkerShutdown = wasmExports.WaitForBackgroundWorkerShutdown)(e); Module._RegisterDynamicBackgroundWorker = (e, t2) => (Module._RegisterDynamicBackgroundWorker = wasmExports.RegisterDynamicBackgroundWorker)(e, t2); Module._BackgroundWorkerUnblockSignals = () => (Module._BackgroundWorkerUnblockSignals = wasmExports.BackgroundWorkerUnblockSignals)(); Module._BackgroundWorkerInitializeConnectionByOid = (e, t2, r) => (Module._BackgroundWorkerInitializeConnectionByOid = wasmExports.BackgroundWorkerInitializeConnectionByOid)(e, t2, r); Module._GetDatabaseEncoding = () => (Module._GetDatabaseEncoding = wasmExports.GetDatabaseEncoding)(); Module._RmgrNotFound = (e) => (Module._RmgrNotFound = wasmExports.RmgrNotFound)(e); Module._InitMaterializedSRF = (e, t2) => (Module._InitMaterializedSRF = wasmExports.InitMaterializedSRF)(e, t2); Module._tuplestore_putvalues = (e, t2, r, a2) => (Module._tuplestore_putvalues = wasmExports.tuplestore_putvalues)(e, t2, r, a2); Module._AllocateFile = (e, t2) => (Module._AllocateFile = wasmExports.AllocateFile)(e, t2); Module._FreeFile = (e) => (Module._FreeFile = wasmExports.FreeFile)(e); Module._fd_durable_rename = (e, t2, r) => (Module._fd_durable_rename = wasmExports.fd_durable_rename)(e, t2, r); Module._BlessTupleDesc = (e) => (Module._BlessTupleDesc = wasmExports.BlessTupleDesc)(e); Module._fstat = (e, t2) => (Module._fstat = wasmExports.fstat)(e, t2); Module._superuser_arg = (e) => (Module._superuser_arg = wasmExports.superuser_arg)(e); Module._wal_segment_close = (e) => (Module._wal_segment_close = wasmExports.wal_segment_close)(e); Module._wal_segment_open = (e, t2, r) => (Module._wal_segment_open = wasmExports.wal_segment_open)(e, t2, r); Module._XLogReaderAllocate = (e, t2, r, a2) => (Module._XLogReaderAllocate = wasmExports.XLogReaderAllocate)(e, t2, r, a2); Module._XLogReadRecord = (e, t2) => (Module._XLogReadRecord = wasmExports.XLogReadRecord)(e, t2); Module._XLogReaderFree = (e) => (Module._XLogReaderFree = wasmExports.XLogReaderFree)(e); Module._GetTopFullTransactionId = () => (Module._GetTopFullTransactionId = wasmExports.GetTopFullTransactionId)(); Module._GetCurrentTransactionNestLevel = () => (Module._GetCurrentTransactionNestLevel = wasmExports.GetCurrentTransactionNestLevel)(); Module._ResourceOwnerCreate = (e, t2) => (Module._ResourceOwnerCreate = wasmExports.ResourceOwnerCreate)(e, t2); Module._RegisterXactCallback = (e, t2) => (Module._RegisterXactCallback = wasmExports.RegisterXactCallback)(e, t2); Module._RegisterSubXactCallback = (e, t2) => (Module._RegisterSubXactCallback = wasmExports.RegisterSubXactCallback)(e, t2); Module._BeginInternalSubTransaction = (e) => (Module._BeginInternalSubTransaction = wasmExports.BeginInternalSubTransaction)(e); Module._ReleaseCurrentSubTransaction = () => (Module._ReleaseCurrentSubTransaction = wasmExports.ReleaseCurrentSubTransaction)(); Module._ResourceOwnerDelete = (e) => (Module._ResourceOwnerDelete = wasmExports.ResourceOwnerDelete)(e); Module._RollbackAndReleaseCurrentSubTransaction = () => (Module._RollbackAndReleaseCurrentSubTransaction = wasmExports.RollbackAndReleaseCurrentSubTransaction)(); Module._ReleaseExternalFD = () => (Module._ReleaseExternalFD = wasmExports.ReleaseExternalFD)(); Module._GetFlushRecPtr = (e) => (Module._GetFlushRecPtr = wasmExports.GetFlushRecPtr)(e); Module._GetXLogReplayRecPtr = (e) => (Module._GetXLogReplayRecPtr = wasmExports.GetXLogReplayRecPtr)(e); Module._TimestampDifferenceMilliseconds = (e, t2) => (Module._TimestampDifferenceMilliseconds = wasmExports.TimestampDifferenceMilliseconds)(e, t2); Module._numeric_in = (e) => (Module._numeric_in = wasmExports.numeric_in)(e); Module._DirectFunctionCall3Coll = (e, t2, r, a2, s4) => (Module._DirectFunctionCall3Coll = wasmExports.DirectFunctionCall3Coll)(e, t2, r, a2, s4); Module._XLogFindNextRecord = (e, t2) => (Module._XLogFindNextRecord = wasmExports.XLogFindNextRecord)(e, t2); Module._RestoreBlockImage = (e, t2, r) => (Module._RestoreBlockImage = wasmExports.RestoreBlockImage)(e, t2, r); Module._timestamptz_in = (e) => (Module._timestamptz_in = wasmExports.timestamptz_in)(e); Module._fscanf = (e, t2, r) => (Module._fscanf = wasmExports.fscanf)(e, t2, r); Module._XLogRecStoreStats = (e, t2) => (Module._XLogRecStoreStats = wasmExports.XLogRecStoreStats)(e, t2); Module._hash_get_num_entries = (e) => (Module._hash_get_num_entries = wasmExports.hash_get_num_entries)(e); Module._read_local_xlog_page_no_wait = (e, t2, r, a2, s4) => (Module._read_local_xlog_page_no_wait = wasmExports.read_local_xlog_page_no_wait)(e, t2, r, a2, s4); Module._escape_json = (e, t2) => (Module._escape_json = wasmExports.escape_json)(e, t2); Module._list_sort = (e, t2) => (Module._list_sort = wasmExports.list_sort)(e, t2); Module._pg_checksum_page = (e, t2) => (Module._pg_checksum_page = wasmExports.pg_checksum_page)(e, t2); Module._bbsink_forward_end_archive = (e) => (Module._bbsink_forward_end_archive = wasmExports.bbsink_forward_end_archive)(e); Module._bbsink_forward_begin_manifest = (e) => (Module._bbsink_forward_begin_manifest = wasmExports.bbsink_forward_begin_manifest)(e); Module._bbsink_forward_end_manifest = (e) => (Module._bbsink_forward_end_manifest = wasmExports.bbsink_forward_end_manifest)(e); Module._bbsink_forward_end_backup = (e, t2, r) => (Module._bbsink_forward_end_backup = wasmExports.bbsink_forward_end_backup)(e, t2, r); Module._bbsink_forward_cleanup = (e) => (Module._bbsink_forward_cleanup = wasmExports.bbsink_forward_cleanup)(e); Module._list_concat = (e, t2) => (Module._list_concat = wasmExports.list_concat)(e, t2); Module._bbsink_forward_begin_backup = (e) => (Module._bbsink_forward_begin_backup = wasmExports.bbsink_forward_begin_backup)(e); Module._bbsink_forward_archive_contents = (e, t2) => (Module._bbsink_forward_archive_contents = wasmExports.bbsink_forward_archive_contents)(e, t2); Module._bbsink_forward_begin_archive = (e, t2) => (Module._bbsink_forward_begin_archive = wasmExports.bbsink_forward_begin_archive)(e, t2); Module._bbsink_forward_manifest_contents = (e, t2) => (Module._bbsink_forward_manifest_contents = wasmExports.bbsink_forward_manifest_contents)(e, t2); Module._has_privs_of_role = (e, t2) => (Module._has_privs_of_role = wasmExports.has_privs_of_role)(e, t2); Module._BaseBackupAddTarget = (e, t2, r) => (Module._BaseBackupAddTarget = wasmExports.BaseBackupAddTarget)(e, t2, r); Module._list_copy = (e) => (Module._list_copy = wasmExports.list_copy)(e); Module._tuplestore_puttuple = (e, t2) => (Module._tuplestore_puttuple = wasmExports.tuplestore_puttuple)(e, t2); Module._makeRangeVar = (e, t2, r) => (Module._makeRangeVar = wasmExports.makeRangeVar)(e, t2, r); Module._DefineIndex = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._DefineIndex = wasmExports.DefineIndex)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._fread = (e, t2, r, a2) => (Module._fread = wasmExports.fread)(e, t2, r, a2); Module._clearerr = (e) => (Module._clearerr = wasmExports.clearerr)(e); Module._copyObjectImpl = (e) => (Module._copyObjectImpl = wasmExports.copyObjectImpl)(e); Module._lappend_oid = (e, t2) => (Module._lappend_oid = wasmExports.lappend_oid)(e, t2); Module._makeTypeNameFromNameList = (e) => (Module._makeTypeNameFromNameList = wasmExports.makeTypeNameFromNameList)(e); Module._CatalogTupleUpdate = (e, t2, r) => (Module._CatalogTupleUpdate = wasmExports.CatalogTupleUpdate)(e, t2, r); Module._get_rel_name = (e) => (Module._get_rel_name = wasmExports.get_rel_name)(e); Module._CatalogTupleDelete = (e, t2) => (Module._CatalogTupleDelete = wasmExports.CatalogTupleDelete)(e, t2); Module._CatalogTupleInsert = (e, t2) => (Module._CatalogTupleInsert = wasmExports.CatalogTupleInsert)(e, t2); Module._recordDependencyOn = (e, t2, r) => (Module._recordDependencyOn = wasmExports.recordDependencyOn)(e, t2, r); Module._get_element_type = (e) => (Module._get_element_type = wasmExports.get_element_type)(e); Module._object_aclcheck = (e, t2, r, a2) => (Module._object_aclcheck = wasmExports.object_aclcheck)(e, t2, r, a2); Module._superuser = () => (Module._superuser = wasmExports.superuser)(); Module._SearchSysCacheAttName = (e, t2) => (Module._SearchSysCacheAttName = wasmExports.SearchSysCacheAttName)(e, t2); Module._new_object_addresses = () => (Module._new_object_addresses = wasmExports.new_object_addresses)(); Module._free_object_addresses = (e) => (Module._free_object_addresses = wasmExports.free_object_addresses)(e); Module._performMultipleDeletions = (e, t2, r) => (Module._performMultipleDeletions = wasmExports.performMultipleDeletions)(e, t2, r); Module._recordDependencyOnExpr = (e, t2, r, a2) => (Module._recordDependencyOnExpr = wasmExports.recordDependencyOnExpr)(e, t2, r, a2); Module._query_tree_walker_impl = (e, t2, r, a2) => (Module._query_tree_walker_impl = wasmExports.query_tree_walker_impl)(e, t2, r, a2); Module._expression_tree_walker_impl = (e, t2, r) => (Module._expression_tree_walker_impl = wasmExports.expression_tree_walker_impl)(e, t2, r); Module._add_exact_object_address = (e, t2) => (Module._add_exact_object_address = wasmExports.add_exact_object_address)(e, t2); Module._get_rel_relkind = (e) => (Module._get_rel_relkind = wasmExports.get_rel_relkind)(e); Module._get_typtype = (e) => (Module._get_typtype = wasmExports.get_typtype)(e); Module._list_delete_last = (e) => (Module._list_delete_last = wasmExports.list_delete_last)(e); Module._type_is_collatable = (e) => (Module._type_is_collatable = wasmExports.type_is_collatable)(e); Module._GetSysCacheOid = (e, t2, r, a2, s4, o4) => (Module._GetSysCacheOid = wasmExports.GetSysCacheOid)(e, t2, r, a2, s4, o4); Module._CheckTableNotInUse = (e, t2) => (Module._CheckTableNotInUse = wasmExports.CheckTableNotInUse)(e, t2); Module._construct_array = (e, t2, r, a2, s4, o4) => (Module._construct_array = wasmExports.construct_array)(e, t2, r, a2, s4, o4); Module._make_parsestate = (e) => (Module._make_parsestate = wasmExports.make_parsestate)(e); Module._transformExpr = (e, t2, r) => (Module._transformExpr = wasmExports.transformExpr)(e, t2, r); Module._equal = (e, t2) => (Module._equal = wasmExports.equal)(e, t2); Module._pull_var_clause = (e, t2) => (Module._pull_var_clause = wasmExports.pull_var_clause)(e, t2); Module._get_attname = (e, t2, r) => (Module._get_attname = wasmExports.get_attname)(e, t2, r); Module._coerce_to_target_type = (e, t2, r, a2, s4, o4, n3, _3) => (Module._coerce_to_target_type = wasmExports.coerce_to_target_type)(e, t2, r, a2, s4, o4, n3, _3); Module._nodeToString = (e) => (Module._nodeToString = wasmExports.nodeToString)(e); Module._parser_errposition = (e, t2) => (Module._parser_errposition = wasmExports.parser_errposition)(e, t2); Module._exprTypmod = (e) => (Module._exprTypmod = wasmExports.exprTypmod)(e); Module._get_base_element_type = (e) => (Module._get_base_element_type = wasmExports.get_base_element_type)(e); Module._SystemFuncName = (e) => (Module._SystemFuncName = wasmExports.SystemFuncName)(e); Module._CreateTrigger = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._CreateTrigger = wasmExports.CreateTrigger)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._plan_create_index_workers = (e, t2) => (Module._plan_create_index_workers = wasmExports.plan_create_index_workers)(e, t2); Module._get_rel_namespace = (e) => (Module._get_rel_namespace = wasmExports.get_rel_namespace)(e); Module._ConditionalLockRelationOid = (e, t2) => (Module._ConditionalLockRelationOid = wasmExports.ConditionalLockRelationOid)(e, t2); Module._RelnameGetRelid = (e) => (Module._RelnameGetRelid = wasmExports.RelnameGetRelid)(e); Module._get_relkind_objtype = (e) => (Module._get_relkind_objtype = wasmExports.get_relkind_objtype)(e); Module._RelationIsVisible = (e) => (Module._RelationIsVisible = wasmExports.RelationIsVisible)(e); Module._get_func_arg_info = (e, t2, r, a2) => (Module._get_func_arg_info = wasmExports.get_func_arg_info)(e, t2, r, a2); Module._NameListToString = (e) => (Module._NameListToString = wasmExports.NameListToString)(e); Module._OpernameGetOprid = (e, t2, r) => (Module._OpernameGetOprid = wasmExports.OpernameGetOprid)(e, t2, r); Module._makeRangeVarFromNameList = (e) => (Module._makeRangeVarFromNameList = wasmExports.makeRangeVarFromNameList)(e); Module._quote_identifier = (e) => (Module._quote_identifier = wasmExports.quote_identifier)(e); Module._GetSearchPathMatcher = (e) => (Module._GetSearchPathMatcher = wasmExports.GetSearchPathMatcher)(e); Module._SearchPathMatchesCurrentEnvironment = (e) => (Module._SearchPathMatchesCurrentEnvironment = wasmExports.SearchPathMatchesCurrentEnvironment)(e); Module._get_collation_oid = (e, t2) => (Module._get_collation_oid = wasmExports.get_collation_oid)(e, t2); Module._CacheRegisterSyscacheCallback = (e, t2, r) => (Module._CacheRegisterSyscacheCallback = wasmExports.CacheRegisterSyscacheCallback)(e, t2, r); Module._get_extension_oid = (e, t2) => (Module._get_extension_oid = wasmExports.get_extension_oid)(e, t2); Module._get_role_oid = (e, t2) => (Module._get_role_oid = wasmExports.get_role_oid)(e, t2); Module._GetForeignServerByName = (e, t2) => (Module._GetForeignServerByName = wasmExports.GetForeignServerByName)(e, t2); Module._typeStringToTypeName = (e, t2) => (Module._typeStringToTypeName = wasmExports.typeStringToTypeName)(e, t2); Module._list_make2_impl = (e, t2, r) => (Module._list_make2_impl = wasmExports.list_make2_impl)(e, t2, r); Module._GetUserNameFromId = (e, t2) => (Module._GetUserNameFromId = wasmExports.GetUserNameFromId)(e, t2); Module._format_type_extended = (e, t2, r) => (Module._format_type_extended = wasmExports.format_type_extended)(e, t2, r); Module._quote_qualified_identifier = (e, t2) => (Module._quote_qualified_identifier = wasmExports.quote_qualified_identifier)(e, t2); Module._get_tablespace_name = (e) => (Module._get_tablespace_name = wasmExports.get_tablespace_name)(e); Module._GetForeignServerExtended = (e, t2) => (Module._GetForeignServerExtended = wasmExports.GetForeignServerExtended)(e, t2); Module._GetForeignServer = (e) => (Module._GetForeignServer = wasmExports.GetForeignServer)(e); Module._construct_empty_array = (e) => (Module._construct_empty_array = wasmExports.construct_empty_array)(e); Module._format_type_be_qualified = (e) => (Module._format_type_be_qualified = wasmExports.format_type_be_qualified)(e); Module._get_namespace_name_or_temp = (e) => (Module._get_namespace_name_or_temp = wasmExports.get_namespace_name_or_temp)(e); Module._list_make3_impl = (e, t2, r, a2) => (Module._list_make3_impl = wasmExports.list_make3_impl)(e, t2, r, a2); Module._construct_md_array = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._construct_md_array = wasmExports.construct_md_array)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._pull_varattnos = (e, t2, r) => (Module._pull_varattnos = wasmExports.pull_varattnos)(e, t2, r); Module._get_func_name = (e) => (Module._get_func_name = wasmExports.get_func_name)(e); Module._construct_array_builtin = (e, t2, r) => (Module._construct_array_builtin = wasmExports.construct_array_builtin)(e, t2, r); Module._makeObjectName = (e, t2, r) => (Module._makeObjectName = wasmExports.makeObjectName)(e, t2, r); Module._get_primary_key_attnos = (e, t2, r) => (Module._get_primary_key_attnos = wasmExports.get_primary_key_attnos)(e, t2, r); Module._bms_is_subset = (e, t2) => (Module._bms_is_subset = wasmExports.bms_is_subset)(e, t2); Module._getExtensionOfObject = (e, t2) => (Module._getExtensionOfObject = wasmExports.getExtensionOfObject)(e, t2); Module._find_inheritance_children = (e, t2) => (Module._find_inheritance_children = wasmExports.find_inheritance_children)(e, t2); Module._lappend_int = (e, t2) => (Module._lappend_int = wasmExports.lappend_int)(e, t2); Module._has_superclass = (e) => (Module._has_superclass = wasmExports.has_superclass)(e); Module._CheckFunctionValidatorAccess = (e, t2) => (Module._CheckFunctionValidatorAccess = wasmExports.CheckFunctionValidatorAccess)(e, t2); Module._AcquireRewriteLocks = (e, t2, r) => (Module._AcquireRewriteLocks = wasmExports.AcquireRewriteLocks)(e, t2, r); Module._function_parse_error_transpose = (e) => (Module._function_parse_error_transpose = wasmExports.function_parse_error_transpose)(e); Module._geterrposition = () => (Module._geterrposition = wasmExports.geterrposition)(); Module._getinternalerrposition = () => (Module._getinternalerrposition = wasmExports.getinternalerrposition)(); Module._pg_mblen = (e) => (Module._pg_mblen = wasmExports.pg_mblen)(e); Module._pg_mbstrlen_with_len = (e, t2) => (Module._pg_mbstrlen_with_len = wasmExports.pg_mbstrlen_with_len)(e, t2); Module._errposition = (e) => (Module._errposition = wasmExports.errposition)(e); Module._internalerrposition = (e) => (Module._internalerrposition = wasmExports.internalerrposition)(e); Module._internalerrquery = (e) => (Module._internalerrquery = wasmExports.internalerrquery)(e); Module._list_delete_nth_cell = (e, t2) => (Module._list_delete_nth_cell = wasmExports.list_delete_nth_cell)(e, t2); Module._get_array_type = (e) => (Module._get_array_type = wasmExports.get_array_type)(e); Module._smgrtruncate2 = (e, t2, r, a2, s4) => (Module._smgrtruncate2 = wasmExports.smgrtruncate2)(e, t2, r, a2, s4); Module._smgrreadv = (e, t2, r, a2, s4) => (Module._smgrreadv = wasmExports.smgrreadv)(e, t2, r, a2, s4); Module._NewRelationCreateToastTable = (e, t2) => (Module._NewRelationCreateToastTable = wasmExports.NewRelationCreateToastTable)(e, t2); Module._transformStmt = (e, t2) => (Module._transformStmt = wasmExports.transformStmt)(e, t2); Module._exprLocation = (e) => (Module._exprLocation = wasmExports.exprLocation)(e); Module._ParseFuncOrColumn = (e, t2, r, a2, s4, o4, n3) => (Module._ParseFuncOrColumn = wasmExports.ParseFuncOrColumn)(e, t2, r, a2, s4, o4, n3); Module._exprCollation = (e) => (Module._exprCollation = wasmExports.exprCollation)(e); Module._transformDistinctClause = (e, t2, r, a2) => (Module._transformDistinctClause = wasmExports.transformDistinctClause)(e, t2, r, a2); Module._makeTargetEntry = (e, t2, r, a2) => (Module._makeTargetEntry = wasmExports.makeTargetEntry)(e, t2, r, a2); Module._makeAlias = (e, t2) => (Module._makeAlias = wasmExports.makeAlias)(e, t2); Module._addRangeTableEntryForSubquery = (e, t2, r, a2, s4) => (Module._addRangeTableEntryForSubquery = wasmExports.addRangeTableEntryForSubquery)(e, t2, r, a2, s4); Module._makeVar = (e, t2, r, a2, s4, o4) => (Module._makeVar = wasmExports.makeVar)(e, t2, r, a2, s4, o4); Module._makeBoolean = (e) => (Module._makeBoolean = wasmExports.makeBoolean)(e); Module._makeInteger = (e) => (Module._makeInteger = wasmExports.makeInteger)(e); Module._makeTypeName = (e) => (Module._makeTypeName = wasmExports.makeTypeName)(e); Module._makeFuncCall = (e, t2, r, a2) => (Module._makeFuncCall = wasmExports.makeFuncCall)(e, t2, r, a2); Module._list_make4_impl = (e, t2, r, a2, s4) => (Module._list_make4_impl = wasmExports.list_make4_impl)(e, t2, r, a2, s4); Module._get_sortgroupclause_tle = (e, t2) => (Module._get_sortgroupclause_tle = wasmExports.get_sortgroupclause_tle)(e, t2); Module._flatten_join_alias_vars = (e, t2, r) => (Module._flatten_join_alias_vars = wasmExports.flatten_join_alias_vars)(e, t2, r); Module._list_member_int = (e, t2) => (Module._list_member_int = wasmExports.list_member_int)(e, t2); Module._addRangeTableEntryForENR = (e, t2, r) => (Module._addRangeTableEntryForENR = wasmExports.addRangeTableEntryForENR)(e, t2, r); Module._typenameTypeIdAndMod = (e, t2, r, a2) => (Module._typenameTypeIdAndMod = wasmExports.typenameTypeIdAndMod)(e, t2, r, a2); Module._get_typcollation = (e) => (Module._get_typcollation = wasmExports.get_typcollation)(e); Module._strip_implicit_coercions = (e) => (Module._strip_implicit_coercions = wasmExports.strip_implicit_coercions)(e); Module._get_sortgroupref_tle = (e, t2) => (Module._get_sortgroupref_tle = wasmExports.get_sortgroupref_tle)(e, t2); Module._contain_aggs_of_level = (e, t2) => (Module._contain_aggs_of_level = wasmExports.contain_aggs_of_level)(e, t2); Module._typeidType = (e) => (Module._typeidType = wasmExports.typeidType)(e); Module._typeTypeCollation = (e) => (Module._typeTypeCollation = wasmExports.typeTypeCollation)(e); Module._typeLen = (e) => (Module._typeLen = wasmExports.typeLen)(e); Module._typeByVal = (e) => (Module._typeByVal = wasmExports.typeByVal)(e); Module._makeConst = (e, t2, r, a2, s4, o4, n3) => (Module._makeConst = wasmExports.makeConst)(e, t2, r, a2, s4, o4, n3); Module._lookup_rowtype_tupdesc = (e, t2) => (Module._lookup_rowtype_tupdesc = wasmExports.lookup_rowtype_tupdesc)(e, t2); Module._bms_del_member = (e, t2) => (Module._bms_del_member = wasmExports.bms_del_member)(e, t2); Module._list_member = (e, t2) => (Module._list_member = wasmExports.list_member)(e, t2); Module._type_is_rowtype = (e) => (Module._type_is_rowtype = wasmExports.type_is_rowtype)(e); Module._bit_in = (e) => (Module._bit_in = wasmExports.bit_in)(e); Module._bms_union = (e, t2) => (Module._bms_union = wasmExports.bms_union)(e, t2); Module._varstr_levenshtein_less_equal = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._varstr_levenshtein_less_equal = wasmExports.varstr_levenshtein_less_equal)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._errsave_start = (e, t2) => (Module._errsave_start = wasmExports.errsave_start)(e, t2); Module._errsave_finish = (e, t2, r, a2) => (Module._errsave_finish = wasmExports.errsave_finish)(e, t2, r, a2); Module._makeColumnDef = (e, t2, r, a2) => (Module._makeColumnDef = wasmExports.makeColumnDef)(e, t2, r, a2); Module._GetDefaultOpClass = (e, t2) => (Module._GetDefaultOpClass = wasmExports.GetDefaultOpClass)(e, t2); Module._scanner_init = (e, t2, r, a2) => (Module._scanner_init = wasmExports.scanner_init)(e, t2, r, a2); Module._scanner_finish = (e) => (Module._scanner_finish = wasmExports.scanner_finish)(e); Module._core_yylex = (e, t2, r) => (Module._core_yylex = wasmExports.core_yylex)(e, t2, r); Module._isxdigit = (e) => (Module._isxdigit = wasmExports.isxdigit)(e); Module._scanner_isspace = (e) => (Module._scanner_isspace = wasmExports.scanner_isspace)(e); Module._truncate_identifier = (e, t2, r) => (Module._truncate_identifier = wasmExports.truncate_identifier)(e, t2, r); Module._pg_database_encoding_max_length = () => (Module._pg_database_encoding_max_length = wasmExports.pg_database_encoding_max_length)(); Module._namein = (e) => (Module._namein = wasmExports.namein)(e); Module._BlockSampler_Init = (e, t2, r, a2) => (Module._BlockSampler_Init = wasmExports.BlockSampler_Init)(e, t2, r, a2); Module._reservoir_init_selection_state = (e, t2) => (Module._reservoir_init_selection_state = wasmExports.reservoir_init_selection_state)(e, t2); Module._reservoir_get_next_S = (e, t2, r) => (Module._reservoir_get_next_S = wasmExports.reservoir_get_next_S)(e, t2, r); Module._sampler_random_fract = (e) => (Module._sampler_random_fract = wasmExports.sampler_random_fract)(e); Module._BlockSampler_HasMore = (e) => (Module._BlockSampler_HasMore = wasmExports.BlockSampler_HasMore)(e); Module._BlockSampler_Next = (e) => (Module._BlockSampler_Next = wasmExports.BlockSampler_Next)(e); Module._Async_Notify = (e, t2) => (Module._Async_Notify = wasmExports.Async_Notify)(e, t2); Module._RangeVarCallbackMaintainsTable = (e, t2, r, a2) => (Module._RangeVarCallbackMaintainsTable = wasmExports.RangeVarCallbackMaintainsTable)(e, t2, r, a2); Module._make_new_heap = (e, t2, r, a2, s4) => (Module._make_new_heap = wasmExports.make_new_heap)(e, t2, r, a2, s4); Module._finish_heap_swap = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._finish_heap_swap = wasmExports.finish_heap_swap)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._wasm_OpenPipeStream = (e, t2) => (Module._wasm_OpenPipeStream = wasmExports.wasm_OpenPipeStream)(e, t2); Module._ClosePipeStream = (e) => (Module._ClosePipeStream = wasmExports.ClosePipeStream)(e); Module._BeginCopyFrom = (e, t2, r, a2, s4, o4, n3, _3) => (Module._BeginCopyFrom = wasmExports.BeginCopyFrom)(e, t2, r, a2, s4, o4, n3, _3); Module._EndCopyFrom = (e) => (Module._EndCopyFrom = wasmExports.EndCopyFrom)(e); Module._ProcessCopyOptions = (e, t2, r, a2) => (Module._ProcessCopyOptions = wasmExports.ProcessCopyOptions)(e, t2, r, a2); Module._CopyFromErrorCallback = (e) => (Module._CopyFromErrorCallback = wasmExports.CopyFromErrorCallback)(e); Module._NextCopyFrom = (e, t2, r, a2) => (Module._NextCopyFrom = wasmExports.NextCopyFrom)(e, t2, r, a2); Module._ExecInitExpr = (e, t2) => (Module._ExecInitExpr = wasmExports.ExecInitExpr)(e, t2); Module._tolower = (e) => (Module._tolower = wasmExports.tolower)(e); Module._PushCopiedSnapshot = (e) => (Module._PushCopiedSnapshot = wasmExports.PushCopiedSnapshot)(e); Module._UpdateActiveSnapshotCommandId = () => (Module._UpdateActiveSnapshotCommandId = wasmExports.UpdateActiveSnapshotCommandId)(); Module._CreateQueryDesc = (e, t2, r, a2, s4, o4, n3, _3) => (Module._CreateQueryDesc = wasmExports.CreateQueryDesc)(e, t2, r, a2, s4, o4, n3, _3); Module._ExecutorStart = (e, t2) => (Module._ExecutorStart = wasmExports.ExecutorStart)(e, t2); Module._ExecutorFinish = (e) => (Module._ExecutorFinish = wasmExports.ExecutorFinish)(e); Module._ExecutorEnd = (e) => (Module._ExecutorEnd = wasmExports.ExecutorEnd)(e); Module._FreeQueryDesc = (e) => (Module._FreeQueryDesc = wasmExports.FreeQueryDesc)(e); Module._pg_server_to_any = (e, t2, r) => (Module._pg_server_to_any = wasmExports.pg_server_to_any)(e, t2, r); Module._ExecutorRun = (e, t2, r, a2) => (Module._ExecutorRun = wasmExports.ExecutorRun)(e, t2, r, a2); Module._CreateTableAsRelExists = (e) => (Module._CreateTableAsRelExists = wasmExports.CreateTableAsRelExists)(e); Module._DefineRelation = (e, t2, r, a2, s4, o4) => (Module._DefineRelation = wasmExports.DefineRelation)(e, t2, r, a2, s4, o4); Module._oidin = (e) => (Module._oidin = wasmExports.oidin)(e); Module._GetCommandTagName = (e) => (Module._GetCommandTagName = wasmExports.GetCommandTagName)(e); Module._ExplainBeginOutput = (e) => (Module._ExplainBeginOutput = wasmExports.ExplainBeginOutput)(e); Module._NewExplainState = () => (Module._NewExplainState = wasmExports.NewExplainState)(); Module._ExplainEndOutput = (e) => (Module._ExplainEndOutput = wasmExports.ExplainEndOutput)(e); Module._ExplainPrintPlan = (e, t2) => (Module._ExplainPrintPlan = wasmExports.ExplainPrintPlan)(e, t2); Module._ExplainPrintTriggers = (e, t2) => (Module._ExplainPrintTriggers = wasmExports.ExplainPrintTriggers)(e, t2); Module._ExplainPrintJITSummary = (e, t2) => (Module._ExplainPrintJITSummary = wasmExports.ExplainPrintJITSummary)(e, t2); Module._InstrEndLoop = (e) => (Module._InstrEndLoop = wasmExports.InstrEndLoop)(e); Module._ExplainPropertyInteger = (e, t2, r, a2) => (Module._ExplainPropertyInteger = wasmExports.ExplainPropertyInteger)(e, t2, r, a2); Module._ExplainQueryText = (e, t2) => (Module._ExplainQueryText = wasmExports.ExplainQueryText)(e, t2); Module._ExplainPropertyText = (e, t2, r) => (Module._ExplainPropertyText = wasmExports.ExplainPropertyText)(e, t2, r); Module._ExplainQueryParameters = (e, t2, r) => (Module._ExplainQueryParameters = wasmExports.ExplainQueryParameters)(e, t2, r); Module._get_func_namespace = (e) => (Module._get_func_namespace = wasmExports.get_func_namespace)(e); Module._get_rel_type_id = (e) => (Module._get_rel_type_id = wasmExports.get_rel_type_id)(e); Module._set_config_option = (e, t2, r, a2, s4, o4, n3, _3) => (Module._set_config_option = wasmExports.set_config_option)(e, t2, r, a2, s4, o4, n3, _3); Module._pg_any_to_server = (e, t2, r) => (Module._pg_any_to_server = wasmExports.pg_any_to_server)(e, t2, r); Module._DirectFunctionCall4Coll = (e, t2, r, a2, s4, o4) => (Module._DirectFunctionCall4Coll = wasmExports.DirectFunctionCall4Coll)(e, t2, r, a2, s4, o4); Module._list_delete_cell = (e, t2) => (Module._list_delete_cell = wasmExports.list_delete_cell)(e, t2); Module._GetForeignDataWrapper = (e) => (Module._GetForeignDataWrapper = wasmExports.GetForeignDataWrapper)(e); Module._CreateExprContext = (e) => (Module._CreateExprContext = wasmExports.CreateExprContext)(e); Module._EnsurePortalSnapshotExists = () => (Module._EnsurePortalSnapshotExists = wasmExports.EnsurePortalSnapshotExists)(); Module._CheckIndexCompatible = (e, t2, r, a2) => (Module._CheckIndexCompatible = wasmExports.CheckIndexCompatible)(e, t2, r, a2); Module._pgstat_count_truncate = (e) => (Module._pgstat_count_truncate = wasmExports.pgstat_count_truncate)(e); Module._SPI_connect = () => (Module._SPI_connect = wasmExports.SPI_connect)(); Module._SPI_exec = (e, t2) => (Module._SPI_exec = wasmExports.SPI_exec)(e, t2); Module._SPI_execute = (e, t2, r) => (Module._SPI_execute = wasmExports.SPI_execute)(e, t2, r); Module._SPI_getvalue = (e, t2, r) => (Module._SPI_getvalue = wasmExports.SPI_getvalue)(e, t2, r); Module._generate_operator_clause = (e, t2, r, a2, s4, o4) => (Module._generate_operator_clause = wasmExports.generate_operator_clause)(e, t2, r, a2, s4, o4); Module._SPI_finish = () => (Module._SPI_finish = wasmExports.SPI_finish)(); Module._CreateTransientRelDestReceiver = (e) => (Module._CreateTransientRelDestReceiver = wasmExports.CreateTransientRelDestReceiver)(e); Module._MemoryContextSetIdentifier = (e, t2) => (Module._MemoryContextSetIdentifier = wasmExports.MemoryContextSetIdentifier)(e, t2); Module._checkExprHasSubLink = (e) => (Module._checkExprHasSubLink = wasmExports.checkExprHasSubLink)(e); Module._SetTuplestoreDestReceiverParams = (e, t2, r, a2, s4, o4) => (Module._SetTuplestoreDestReceiverParams = wasmExports.SetTuplestoreDestReceiverParams)(e, t2, r, a2, s4, o4); Module._tuplestore_rescan = (e) => (Module._tuplestore_rescan = wasmExports.tuplestore_rescan)(e); Module._MemoryContextDeleteChildren = (e) => (Module._MemoryContextDeleteChildren = wasmExports.MemoryContextDeleteChildren)(e); Module._ReleaseCachedPlan = (e, t2) => (Module._ReleaseCachedPlan = wasmExports.ReleaseCachedPlan)(e, t2); Module._nextval = (e) => (Module._nextval = wasmExports.nextval)(e); Module._textToQualifiedNameList = (e) => (Module._textToQualifiedNameList = wasmExports.textToQualifiedNameList)(e); Module._tuplestore_gettupleslot = (e, t2, r, a2) => (Module._tuplestore_gettupleslot = wasmExports.tuplestore_gettupleslot)(e, t2, r, a2); Module._list_delete = (e, t2) => (Module._list_delete = wasmExports.list_delete)(e, t2); Module._tuplestore_end = (e) => (Module._tuplestore_end = wasmExports.tuplestore_end)(e); Module._quote_literal_cstr = (e) => (Module._quote_literal_cstr = wasmExports.quote_literal_cstr)(e); Module._contain_mutable_functions = (e) => (Module._contain_mutable_functions = wasmExports.contain_mutable_functions)(e); Module._ExecuteTruncateGuts = (e, t2, r, a2, s4, o4) => (Module._ExecuteTruncateGuts = wasmExports.ExecuteTruncateGuts)(e, t2, r, a2, s4, o4); Module._bms_make_singleton = (e) => (Module._bms_make_singleton = wasmExports.bms_make_singleton)(e); Module._tuplestore_puttupleslot = (e, t2) => (Module._tuplestore_puttupleslot = wasmExports.tuplestore_puttupleslot)(e, t2); Module._tuplestore_begin_heap = (e, t2, r) => (Module._tuplestore_begin_heap = wasmExports.tuplestore_begin_heap)(e, t2, r); Module._ExecForceStoreHeapTuple = (e, t2, r) => (Module._ExecForceStoreHeapTuple = wasmExports.ExecForceStoreHeapTuple)(e, t2, r); Module._strtod = (e, t2) => (Module._strtod = wasmExports.strtod)(e, t2); Module._plain_crypt_verify = (e, t2, r, a2) => (Module._plain_crypt_verify = wasmExports.plain_crypt_verify)(e, t2, r, a2); Module._ProcessConfigFile = (e) => (Module._ProcessConfigFile = wasmExports.ProcessConfigFile)(e); Module._ExecReScan = (e) => (Module._ExecReScan = wasmExports.ExecReScan)(e); Module._ExecAsyncResponse = (e) => (Module._ExecAsyncResponse = wasmExports.ExecAsyncResponse)(e); Module._ExecAsyncRequestDone = (e, t2) => (Module._ExecAsyncRequestDone = wasmExports.ExecAsyncRequestDone)(e, t2); Module._ExecAsyncRequestPending = (e) => (Module._ExecAsyncRequestPending = wasmExports.ExecAsyncRequestPending)(e); Module._ExprEvalPushStep = (e, t2) => (Module._ExprEvalPushStep = wasmExports.ExprEvalPushStep)(e, t2); Module._ExecInitExprWithParams = (e, t2) => (Module._ExecInitExprWithParams = wasmExports.ExecInitExprWithParams)(e, t2); Module._ExecInitExprList = (e, t2) => (Module._ExecInitExprList = wasmExports.ExecInitExprList)(e, t2); Module._MakeExpandedObjectReadOnlyInternal = (e) => (Module._MakeExpandedObjectReadOnlyInternal = wasmExports.MakeExpandedObjectReadOnlyInternal)(e); Module._tuplesort_puttupleslot = (e, t2) => (Module._tuplesort_puttupleslot = wasmExports.tuplesort_puttupleslot)(e, t2); Module._ArrayGetNItems = (e, t2) => (Module._ArrayGetNItems = wasmExports.ArrayGetNItems)(e, t2); Module._expanded_record_fetch_tupdesc = (e) => (Module._expanded_record_fetch_tupdesc = wasmExports.expanded_record_fetch_tupdesc)(e); Module._expanded_record_fetch_field = (e, t2, r) => (Module._expanded_record_fetch_field = wasmExports.expanded_record_fetch_field)(e, t2, r); Module._JsonbValueToJsonb = (e) => (Module._JsonbValueToJsonb = wasmExports.JsonbValueToJsonb)(e); Module._boolout = (e) => (Module._boolout = wasmExports.boolout)(e); Module._lookup_rowtype_tupdesc_domain = (e, t2, r) => (Module._lookup_rowtype_tupdesc_domain = wasmExports.lookup_rowtype_tupdesc_domain)(e, t2, r); Module._MemoryContextGetParent = (e) => (Module._MemoryContextGetParent = wasmExports.MemoryContextGetParent)(e); Module._DeleteExpandedObject = (e) => (Module._DeleteExpandedObject = wasmExports.DeleteExpandedObject)(e); Module._ExecFindJunkAttributeInTlist = (e, t2) => (Module._ExecFindJunkAttributeInTlist = wasmExports.ExecFindJunkAttributeInTlist)(e, t2); Module._standard_ExecutorStart = (e, t2) => (Module._standard_ExecutorStart = wasmExports.standard_ExecutorStart)(e, t2); Module._standard_ExecutorRun = (e, t2, r, a2) => (Module._standard_ExecutorRun = wasmExports.standard_ExecutorRun)(e, t2, r, a2); Module._standard_ExecutorFinish = (e) => (Module._standard_ExecutorFinish = wasmExports.standard_ExecutorFinish)(e); Module._standard_ExecutorEnd = (e) => (Module._standard_ExecutorEnd = wasmExports.standard_ExecutorEnd)(e); Module._InstrAlloc = (e, t2, r) => (Module._InstrAlloc = wasmExports.InstrAlloc)(e, t2, r); Module._get_typlenbyval = (e, t2, r) => (Module._get_typlenbyval = wasmExports.get_typlenbyval)(e, t2, r); Module._InputFunctionCall = (e, t2, r, a2) => (Module._InputFunctionCall = wasmExports.InputFunctionCall)(e, t2, r, a2); Module._FreeExprContext = (e, t2) => (Module._FreeExprContext = wasmExports.FreeExprContext)(e, t2); Module._ExecOpenScanRelation = (e, t2, r) => (Module._ExecOpenScanRelation = wasmExports.ExecOpenScanRelation)(e, t2, r); Module._bms_intersect = (e, t2) => (Module._bms_intersect = wasmExports.bms_intersect)(e, t2); Module._ExecGetReturningSlot = (e, t2) => (Module._ExecGetReturningSlot = wasmExports.ExecGetReturningSlot)(e, t2); Module._ExecGetResultRelCheckAsUser = (e, t2) => (Module._ExecGetResultRelCheckAsUser = wasmExports.ExecGetResultRelCheckAsUser)(e, t2); Module._get_call_expr_argtype = (e, t2) => (Module._get_call_expr_argtype = wasmExports.get_call_expr_argtype)(e, t2); Module._tuplestore_clear = (e) => (Module._tuplestore_clear = wasmExports.tuplestore_clear)(e); Module._InstrUpdateTupleCount = (e, t2) => (Module._InstrUpdateTupleCount = wasmExports.InstrUpdateTupleCount)(e, t2); Module._tuplesort_begin_heap = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._tuplesort_begin_heap = wasmExports.tuplesort_begin_heap)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._tuplesort_gettupleslot = (e, t2, r, a2, s4) => (Module._tuplesort_gettupleslot = wasmExports.tuplesort_gettupleslot)(e, t2, r, a2, s4); Module._AddWaitEventToSet = (e, t2, r, a2, s4) => (Module._AddWaitEventToSet = wasmExports.AddWaitEventToSet)(e, t2, r, a2, s4); Module._GetNumRegisteredWaitEvents = (e) => (Module._GetNumRegisteredWaitEvents = wasmExports.GetNumRegisteredWaitEvents)(e); Module._get_attstatsslot = (e, t2, r, a2, s4) => (Module._get_attstatsslot = wasmExports.get_attstatsslot)(e, t2, r, a2, s4); Module._free_attstatsslot = (e) => (Module._free_attstatsslot = wasmExports.free_attstatsslot)(e); Module._tuplesort_reset = (e) => (Module._tuplesort_reset = wasmExports.tuplesort_reset)(e); Module._pairingheap_first = (e) => (Module._pairingheap_first = wasmExports.pairingheap_first)(e); Module._bms_nonempty_difference = (e, t2) => (Module._bms_nonempty_difference = wasmExports.bms_nonempty_difference)(e, t2); Module._SPI_connect_ext = (e) => (Module._SPI_connect_ext = wasmExports.SPI_connect_ext)(e); Module._SPI_commit = () => (Module._SPI_commit = wasmExports.SPI_commit)(); Module._CopyErrorData = () => (Module._CopyErrorData = wasmExports.CopyErrorData)(); Module._ReThrowError = (e) => (Module._ReThrowError = wasmExports.ReThrowError)(e); Module._SPI_commit_and_chain = () => (Module._SPI_commit_and_chain = wasmExports.SPI_commit_and_chain)(); Module._SPI_rollback = () => (Module._SPI_rollback = wasmExports.SPI_rollback)(); Module._SPI_rollback_and_chain = () => (Module._SPI_rollback_and_chain = wasmExports.SPI_rollback_and_chain)(); Module._SPI_freetuptable = (e) => (Module._SPI_freetuptable = wasmExports.SPI_freetuptable)(e); Module._SPI_execute_extended = (e, t2) => (Module._SPI_execute_extended = wasmExports.SPI_execute_extended)(e, t2); Module._SPI_execute_plan = (e, t2, r, a2, s4) => (Module._SPI_execute_plan = wasmExports.SPI_execute_plan)(e, t2, r, a2, s4); Module._SPI_execp = (e, t2, r, a2) => (Module._SPI_execp = wasmExports.SPI_execp)(e, t2, r, a2); Module._SPI_execute_plan_extended = (e, t2) => (Module._SPI_execute_plan_extended = wasmExports.SPI_execute_plan_extended)(e, t2); Module._SPI_execute_plan_with_paramlist = (e, t2, r, a2) => (Module._SPI_execute_plan_with_paramlist = wasmExports.SPI_execute_plan_with_paramlist)(e, t2, r, a2); Module._SPI_prepare = (e, t2, r) => (Module._SPI_prepare = wasmExports.SPI_prepare)(e, t2, r); Module._SPI_prepare_extended = (e, t2) => (Module._SPI_prepare_extended = wasmExports.SPI_prepare_extended)(e, t2); Module._SPI_keepplan = (e) => (Module._SPI_keepplan = wasmExports.SPI_keepplan)(e); Module._SPI_freeplan = (e) => (Module._SPI_freeplan = wasmExports.SPI_freeplan)(e); Module._SPI_copytuple = (e) => (Module._SPI_copytuple = wasmExports.SPI_copytuple)(e); Module._SPI_returntuple = (e, t2) => (Module._SPI_returntuple = wasmExports.SPI_returntuple)(e, t2); Module._SPI_fnumber = (e, t2) => (Module._SPI_fnumber = wasmExports.SPI_fnumber)(e, t2); Module._SPI_fname = (e, t2) => (Module._SPI_fname = wasmExports.SPI_fname)(e, t2); Module._SPI_getbinval = (e, t2, r, a2) => (Module._SPI_getbinval = wasmExports.SPI_getbinval)(e, t2, r, a2); Module._SPI_gettype = (e, t2) => (Module._SPI_gettype = wasmExports.SPI_gettype)(e, t2); Module._SPI_gettypeid = (e, t2) => (Module._SPI_gettypeid = wasmExports.SPI_gettypeid)(e, t2); Module._SPI_getrelname = (e) => (Module._SPI_getrelname = wasmExports.SPI_getrelname)(e); Module._SPI_palloc = (e) => (Module._SPI_palloc = wasmExports.SPI_palloc)(e); Module._SPI_datumTransfer = (e, t2, r) => (Module._SPI_datumTransfer = wasmExports.SPI_datumTransfer)(e, t2, r); Module._datumTransfer = (e, t2, r) => (Module._datumTransfer = wasmExports.datumTransfer)(e, t2, r); Module._SPI_cursor_open_with_paramlist = (e, t2, r, a2) => (Module._SPI_cursor_open_with_paramlist = wasmExports.SPI_cursor_open_with_paramlist)(e, t2, r, a2); Module._SPI_cursor_parse_open = (e, t2, r) => (Module._SPI_cursor_parse_open = wasmExports.SPI_cursor_parse_open)(e, t2, r); Module._SPI_cursor_find = (e) => (Module._SPI_cursor_find = wasmExports.SPI_cursor_find)(e); Module._SPI_cursor_fetch = (e, t2, r) => (Module._SPI_cursor_fetch = wasmExports.SPI_cursor_fetch)(e, t2, r); Module._SPI_scroll_cursor_fetch = (e, t2, r) => (Module._SPI_scroll_cursor_fetch = wasmExports.SPI_scroll_cursor_fetch)(e, t2, r); Module._SPI_scroll_cursor_move = (e, t2, r) => (Module._SPI_scroll_cursor_move = wasmExports.SPI_scroll_cursor_move)(e, t2, r); Module._SPI_cursor_close = (e) => (Module._SPI_cursor_close = wasmExports.SPI_cursor_close)(e); Module._SPI_plan_is_valid = (e) => (Module._SPI_plan_is_valid = wasmExports.SPI_plan_is_valid)(e); Module._SPI_result_code_string = (e) => (Module._SPI_result_code_string = wasmExports.SPI_result_code_string)(e); Module._SPI_plan_get_plan_sources = (e) => (Module._SPI_plan_get_plan_sources = wasmExports.SPI_plan_get_plan_sources)(e); Module._SPI_plan_get_cached_plan = (e) => (Module._SPI_plan_get_cached_plan = wasmExports.SPI_plan_get_cached_plan)(e); Module._SPI_register_relation = (e) => (Module._SPI_register_relation = wasmExports.SPI_register_relation)(e); Module._create_queryEnv = () => (Module._create_queryEnv = wasmExports.create_queryEnv)(); Module._register_ENR = (e, t2) => (Module._register_ENR = wasmExports.register_ENR)(e, t2); Module._SPI_register_trigger_data = (e) => (Module._SPI_register_trigger_data = wasmExports.SPI_register_trigger_data)(e); Module._tuplestore_tuple_count = (e) => (Module._tuplestore_tuple_count = wasmExports.tuplestore_tuple_count)(e); Module._GetUserMapping = (e, t2) => (Module._GetUserMapping = wasmExports.GetUserMapping)(e, t2); Module._GetForeignTable = (e) => (Module._GetForeignTable = wasmExports.GetForeignTable)(e); Module._GetForeignColumnOptions = (e, t2) => (Module._GetForeignColumnOptions = wasmExports.GetForeignColumnOptions)(e, t2); Module._initClosestMatch = (e, t2, r) => (Module._initClosestMatch = wasmExports.initClosestMatch)(e, t2, r); Module._updateClosestMatch = (e, t2) => (Module._updateClosestMatch = wasmExports.updateClosestMatch)(e, t2); Module._getClosestMatch = (e) => (Module._getClosestMatch = wasmExports.getClosestMatch)(e); Module._GetExistingLocalJoinPath = (e) => (Module._GetExistingLocalJoinPath = wasmExports.GetExistingLocalJoinPath)(e); Module._bloom_create = (e, t2, r) => (Module._bloom_create = wasmExports.bloom_create)(e, t2, r); Module._bloom_free = (e) => (Module._bloom_free = wasmExports.bloom_free)(e); Module._bloom_add_element = (e, t2, r) => (Module._bloom_add_element = wasmExports.bloom_add_element)(e, t2, r); Module._bloom_lacks_element = (e, t2, r) => (Module._bloom_lacks_element = wasmExports.bloom_lacks_element)(e, t2, r); Module._bloom_prop_bits_set = (e) => (Module._bloom_prop_bits_set = wasmExports.bloom_prop_bits_set)(e); Module._socket = (e, t2, r) => (Module._socket = wasmExports.socket)(e, t2, r); Module._connect = (e, t2, r) => (Module._connect = wasmExports.connect)(e, t2, r); Module._send = (e, t2, r, a2) => (Module._send = wasmExports.send)(e, t2, r, a2); Module._recv = (e, t2, r, a2) => (Module._recv = wasmExports.recv)(e, t2, r, a2); Module._be_lo_unlink = (e) => (Module._be_lo_unlink = wasmExports.be_lo_unlink)(e); Module._set_read_write_cbs = (e, t2) => (Module._set_read_write_cbs = wasmExports.set_read_write_cbs)(e, t2); Module._setsockopt = (e, t2, r, a2, s4) => (Module._setsockopt = wasmExports.setsockopt)(e, t2, r, a2, s4); Module._getsockopt = (e, t2, r, a2, s4) => (Module._getsockopt = wasmExports.getsockopt)(e, t2, r, a2, s4); Module._getsockname = (e, t2, r) => (Module._getsockname = wasmExports.getsockname)(e, t2, r); Module._poll = (e, t2, r) => (Module._poll = wasmExports.poll)(e, t2, r); Module._pg_mb2wchar_with_len = (e, t2, r) => (Module._pg_mb2wchar_with_len = wasmExports.pg_mb2wchar_with_len)(e, t2, r); Module._pg_regcomp = (e, t2, r, a2, s4) => (Module._pg_regcomp = wasmExports.pg_regcomp)(e, t2, r, a2, s4); Module._pg_regerror = (e, t2, r, a2) => (Module._pg_regerror = wasmExports.pg_regerror)(e, t2, r, a2); Module._strcat = (e, t2) => (Module._strcat = wasmExports.strcat)(e, t2); Module._pq_sendtext = (e, t2, r) => (Module._pq_sendtext = wasmExports.pq_sendtext)(e, t2, r); Module._pq_sendfloat4 = (e, t2) => (Module._pq_sendfloat4 = wasmExports.pq_sendfloat4)(e, t2); Module._pq_sendfloat8 = (e, t2) => (Module._pq_sendfloat8 = wasmExports.pq_sendfloat8)(e, t2); Module._pq_begintypsend = (e) => (Module._pq_begintypsend = wasmExports.pq_begintypsend)(e); Module._pq_endtypsend = (e) => (Module._pq_endtypsend = wasmExports.pq_endtypsend)(e); Module._pq_getmsgfloat4 = (e) => (Module._pq_getmsgfloat4 = wasmExports.pq_getmsgfloat4)(e); Module._pq_getmsgfloat8 = (e) => (Module._pq_getmsgfloat8 = wasmExports.pq_getmsgfloat8)(e); Module._pq_getmsgtext = (e, t2, r) => (Module._pq_getmsgtext = wasmExports.pq_getmsgtext)(e, t2, r); Module._pg_strtoint32 = (e) => (Module._pg_strtoint32 = wasmExports.pg_strtoint32)(e); Module._bms_membership = (e) => (Module._bms_membership = wasmExports.bms_membership)(e); Module._list_make5_impl = (e, t2, r, a2, s4, o4) => (Module._list_make5_impl = wasmExports.list_make5_impl)(e, t2, r, a2, s4, o4); Module._list_insert_nth = (e, t2, r) => (Module._list_insert_nth = wasmExports.list_insert_nth)(e, t2, r); Module._list_member_ptr = (e, t2) => (Module._list_member_ptr = wasmExports.list_member_ptr)(e, t2); Module._list_append_unique_ptr = (e, t2) => (Module._list_append_unique_ptr = wasmExports.list_append_unique_ptr)(e, t2); Module._make_opclause = (e, t2, r, a2, s4, o4, n3) => (Module._make_opclause = wasmExports.make_opclause)(e, t2, r, a2, s4, o4, n3); Module._exprIsLengthCoercion = (e, t2) => (Module._exprIsLengthCoercion = wasmExports.exprIsLengthCoercion)(e, t2); Module._fix_opfuncids = (e) => (Module._fix_opfuncids = wasmExports.fix_opfuncids)(e); Module._CleanQuerytext = (e, t2, r) => (Module._CleanQuerytext = wasmExports.CleanQuerytext)(e, t2, r); Module._EnableQueryId = () => (Module._EnableQueryId = wasmExports.EnableQueryId)(); Module._find_base_rel = (e, t2) => (Module._find_base_rel = wasmExports.find_base_rel)(e, t2); Module._add_path = (e, t2) => (Module._add_path = wasmExports.add_path)(e, t2); Module._pathkeys_contained_in = (e, t2) => (Module._pathkeys_contained_in = wasmExports.pathkeys_contained_in)(e, t2); Module._create_sort_path = (e, t2, r, a2, s4) => (Module._create_sort_path = wasmExports.create_sort_path)(e, t2, r, a2, s4); Module._set_baserel_size_estimates = (e, t2) => (Module._set_baserel_size_estimates = wasmExports.set_baserel_size_estimates)(e, t2); Module._clauselist_selectivity = (e, t2, r, a2, s4) => (Module._clauselist_selectivity = wasmExports.clauselist_selectivity)(e, t2, r, a2, s4); Module._get_tablespace_page_costs = (e, t2, r) => (Module._get_tablespace_page_costs = wasmExports.get_tablespace_page_costs)(e, t2, r); Module._cost_qual_eval = (e, t2, r) => (Module._cost_qual_eval = wasmExports.cost_qual_eval)(e, t2, r); Module._estimate_num_groups = (e, t2, r, a2, s4) => (Module._estimate_num_groups = wasmExports.estimate_num_groups)(e, t2, r, a2, s4); Module._cost_sort = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._cost_sort = wasmExports.cost_sort)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._get_sortgrouplist_exprs = (e, t2) => (Module._get_sortgrouplist_exprs = wasmExports.get_sortgrouplist_exprs)(e, t2); Module._make_restrictinfo = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._make_restrictinfo = wasmExports.make_restrictinfo)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._generate_implied_equalities_for_column = (e, t2, r, a2, s4) => (Module._generate_implied_equalities_for_column = wasmExports.generate_implied_equalities_for_column)(e, t2, r, a2, s4); Module._eclass_useful_for_merging = (e, t2, r) => (Module._eclass_useful_for_merging = wasmExports.eclass_useful_for_merging)(e, t2, r); Module._join_clause_is_movable_to = (e, t2) => (Module._join_clause_is_movable_to = wasmExports.join_clause_is_movable_to)(e, t2); Module._get_plan_rowmark = (e, t2) => (Module._get_plan_rowmark = wasmExports.get_plan_rowmark)(e, t2); Module._update_mergeclause_eclasses = (e, t2) => (Module._update_mergeclause_eclasses = wasmExports.update_mergeclause_eclasses)(e, t2); Module._find_join_rel = (e, t2) => (Module._find_join_rel = wasmExports.find_join_rel)(e, t2); Module._make_canonical_pathkey = (e, t2, r, a2, s4) => (Module._make_canonical_pathkey = wasmExports.make_canonical_pathkey)(e, t2, r, a2, s4); Module._get_sortgroupref_clause_noerr = (e, t2) => (Module._get_sortgroupref_clause_noerr = wasmExports.get_sortgroupref_clause_noerr)(e, t2); Module._extract_actual_clauses = (e, t2) => (Module._extract_actual_clauses = wasmExports.extract_actual_clauses)(e, t2); Module._change_plan_targetlist = (e, t2, r) => (Module._change_plan_targetlist = wasmExports.change_plan_targetlist)(e, t2, r); Module._make_foreignscan = (e, t2, r, a2, s4, o4, n3, _3) => (Module._make_foreignscan = wasmExports.make_foreignscan)(e, t2, r, a2, s4, o4, n3, _3); Module._tlist_member = (e, t2) => (Module._tlist_member = wasmExports.tlist_member)(e, t2); Module._pull_vars_of_level = (e, t2) => (Module._pull_vars_of_level = wasmExports.pull_vars_of_level)(e, t2); Module._IncrementVarSublevelsUp = (e, t2, r) => (Module._IncrementVarSublevelsUp = wasmExports.IncrementVarSublevelsUp)(e, t2, r); Module._standard_planner = (e, t2, r, a2) => (Module._standard_planner = wasmExports.standard_planner)(e, t2, r, a2); Module._get_relids_in_jointree = (e, t2, r) => (Module._get_relids_in_jointree = wasmExports.get_relids_in_jointree)(e, t2, r); Module._add_new_columns_to_pathtarget = (e, t2) => (Module._add_new_columns_to_pathtarget = wasmExports.add_new_columns_to_pathtarget)(e, t2); Module._get_agg_clause_costs = (e, t2, r) => (Module._get_agg_clause_costs = wasmExports.get_agg_clause_costs)(e, t2, r); Module._grouping_is_sortable = (e) => (Module._grouping_is_sortable = wasmExports.grouping_is_sortable)(e); Module._copy_pathtarget = (e) => (Module._copy_pathtarget = wasmExports.copy_pathtarget)(e); Module._create_projection_path = (e, t2, r, a2) => (Module._create_projection_path = wasmExports.create_projection_path)(e, t2, r, a2); Module._GetSysCacheHashValue = (e, t2, r, a2, s4) => (Module._GetSysCacheHashValue = wasmExports.GetSysCacheHashValue)(e, t2, r, a2, s4); Module._get_translated_update_targetlist = (e, t2, r, a2) => (Module._get_translated_update_targetlist = wasmExports.get_translated_update_targetlist)(e, t2, r, a2); Module._add_row_identity_var = (e, t2, r, a2) => (Module._add_row_identity_var = wasmExports.add_row_identity_var)(e, t2, r, a2); Module._get_rel_all_updated_cols = (e, t2) => (Module._get_rel_all_updated_cols = wasmExports.get_rel_all_updated_cols)(e, t2); Module._get_baserel_parampathinfo = (e, t2, r) => (Module._get_baserel_parampathinfo = wasmExports.get_baserel_parampathinfo)(e, t2, r); Module._create_foreignscan_path = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4) => (Module._create_foreignscan_path = wasmExports.create_foreignscan_path)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4); Module._create_foreign_join_path = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4) => (Module._create_foreign_join_path = wasmExports.create_foreign_join_path)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4); Module._create_foreign_upper_path = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._create_foreign_upper_path = wasmExports.create_foreign_upper_path)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._adjust_limit_rows_costs = (e, t2, r, a2, s4) => (Module._adjust_limit_rows_costs = wasmExports.adjust_limit_rows_costs)(e, t2, r, a2, s4); Module._add_to_flat_tlist = (e, t2) => (Module._add_to_flat_tlist = wasmExports.add_to_flat_tlist)(e, t2); Module._get_fn_expr_argtype = (e, t2) => (Module._get_fn_expr_argtype = wasmExports.get_fn_expr_argtype)(e, t2); Module._on_shmem_exit = (e, t2) => (Module._on_shmem_exit = wasmExports.on_shmem_exit)(e, t2); Module._SignalHandlerForConfigReload = (e) => (Module._SignalHandlerForConfigReload = wasmExports.SignalHandlerForConfigReload)(e); Module._SignalHandlerForShutdownRequest = (e) => (Module._SignalHandlerForShutdownRequest = wasmExports.SignalHandlerForShutdownRequest)(e); Module._procsignal_sigusr1_handler = (e) => (Module._procsignal_sigusr1_handler = wasmExports.procsignal_sigusr1_handler)(e); Module._RegisterBackgroundWorker = (e) => (Module._RegisterBackgroundWorker = wasmExports.RegisterBackgroundWorker)(e); Module._WaitForBackgroundWorkerStartup = (e, t2) => (Module._WaitForBackgroundWorkerStartup = wasmExports.WaitForBackgroundWorkerStartup)(e, t2); Module._GetConfigOption = (e, t2, r) => (Module._GetConfigOption = wasmExports.GetConfigOption)(e, t2, r); Module._toupper = (e) => (Module._toupper = wasmExports.toupper)(e); Module._pg_reg_getinitialstate = (e) => (Module._pg_reg_getinitialstate = wasmExports.pg_reg_getinitialstate)(e); Module._pg_reg_getfinalstate = (e) => (Module._pg_reg_getfinalstate = wasmExports.pg_reg_getfinalstate)(e); Module._pg_reg_getnumoutarcs = (e, t2) => (Module._pg_reg_getnumoutarcs = wasmExports.pg_reg_getnumoutarcs)(e, t2); Module._pg_reg_getoutarcs = (e, t2, r, a2) => (Module._pg_reg_getoutarcs = wasmExports.pg_reg_getoutarcs)(e, t2, r, a2); Module._pg_reg_getnumcolors = (e) => (Module._pg_reg_getnumcolors = wasmExports.pg_reg_getnumcolors)(e); Module._pg_reg_colorisbegin = (e, t2) => (Module._pg_reg_colorisbegin = wasmExports.pg_reg_colorisbegin)(e, t2); Module._pg_reg_colorisend = (e, t2) => (Module._pg_reg_colorisend = wasmExports.pg_reg_colorisend)(e, t2); Module._pg_reg_getnumcharacters = (e, t2) => (Module._pg_reg_getnumcharacters = wasmExports.pg_reg_getnumcharacters)(e, t2); Module._pg_reg_getcharacters = (e, t2, r, a2) => (Module._pg_reg_getcharacters = wasmExports.pg_reg_getcharacters)(e, t2, r, a2); Module._OutputPluginPrepareWrite = (e, t2) => (Module._OutputPluginPrepareWrite = wasmExports.OutputPluginPrepareWrite)(e, t2); Module._OutputPluginWrite = (e, t2) => (Module._OutputPluginWrite = wasmExports.OutputPluginWrite)(e, t2); Module._array_contains_nulls = (e) => (Module._array_contains_nulls = wasmExports.array_contains_nulls)(e); Module._hash_seq_term = (e) => (Module._hash_seq_term = wasmExports.hash_seq_term)(e); Module._FreeErrorData = (e) => (Module._FreeErrorData = wasmExports.FreeErrorData)(e); Module._RelidByRelfilenumber = (e, t2) => (Module._RelidByRelfilenumber = wasmExports.RelidByRelfilenumber)(e, t2); Module._WaitLatchOrSocket = (e, t2, r, a2, s4) => (Module._WaitLatchOrSocket = wasmExports.WaitLatchOrSocket)(e, t2, r, a2, s4); Module._get_row_security_policies = (e, t2, r, a2, s4, o4, n3) => (Module._get_row_security_policies = wasmExports.get_row_security_policies)(e, t2, r, a2, s4, o4, n3); Module._hash_estimate_size = (e, t2) => (Module._hash_estimate_size = wasmExports.hash_estimate_size)(e, t2); Module._ShmemInitHash = (e, t2, r, a2, s4) => (Module._ShmemInitHash = wasmExports.ShmemInitHash)(e, t2, r, a2, s4); Module._LockBufHdr = (e) => (Module._LockBufHdr = wasmExports.LockBufHdr)(e); Module._EvictUnpinnedBuffer = (e) => (Module._EvictUnpinnedBuffer = wasmExports.EvictUnpinnedBuffer)(e); Module._have_free_buffer = () => (Module._have_free_buffer = wasmExports.have_free_buffer)(); Module._copy_file = (e, t2) => (Module._copy_file = wasmExports.copy_file)(e, t2); Module._AcquireExternalFD = () => (Module._AcquireExternalFD = wasmExports.AcquireExternalFD)(); Module._GetNamedDSMSegment = (e, t2, r, a2) => (Module._GetNamedDSMSegment = wasmExports.GetNamedDSMSegment)(e, t2, r, a2); Module._RequestAddinShmemSpace = (e) => (Module._RequestAddinShmemSpace = wasmExports.RequestAddinShmemSpace)(e); Module._GetRunningTransactionData = () => (Module._GetRunningTransactionData = wasmExports.GetRunningTransactionData)(); Module._BackendXidGetPid = (e) => (Module._BackendXidGetPid = wasmExports.BackendXidGetPid)(e); Module._LWLockRegisterTranche = (e, t2) => (Module._LWLockRegisterTranche = wasmExports.LWLockRegisterTranche)(e, t2); Module._GetNamedLWLockTranche = (e) => (Module._GetNamedLWLockTranche = wasmExports.GetNamedLWLockTranche)(e); Module._LWLockNewTrancheId = () => (Module._LWLockNewTrancheId = wasmExports.LWLockNewTrancheId)(); Module._RequestNamedLWLockTranche = (e, t2) => (Module._RequestNamedLWLockTranche = wasmExports.RequestNamedLWLockTranche)(e, t2); Module._standard_ProcessUtility = (e, t2, r, a2, s4, o4, n3, _3) => (Module._standard_ProcessUtility = wasmExports.standard_ProcessUtility)(e, t2, r, a2, s4, o4, n3, _3); Module._lookup_ts_dictionary_cache = (e) => (Module._lookup_ts_dictionary_cache = wasmExports.lookup_ts_dictionary_cache)(e); Module._get_tsearch_config_filename = (e, t2) => (Module._get_tsearch_config_filename = wasmExports.get_tsearch_config_filename)(e, t2); Module._lowerstr = (e) => (Module._lowerstr = wasmExports.lowerstr)(e); Module._readstoplist = (e, t2, r) => (Module._readstoplist = wasmExports.readstoplist)(e, t2, r); Module._lowerstr_with_len = (e, t2) => (Module._lowerstr_with_len = wasmExports.lowerstr_with_len)(e, t2); Module._searchstoplist = (e, t2) => (Module._searchstoplist = wasmExports.searchstoplist)(e, t2); Module._tsearch_readline_begin = (e, t2) => (Module._tsearch_readline_begin = wasmExports.tsearch_readline_begin)(e, t2); Module._tsearch_readline = (e) => (Module._tsearch_readline = wasmExports.tsearch_readline)(e); Module._t_isspace = (e) => (Module._t_isspace = wasmExports.t_isspace)(e); Module._tsearch_readline_end = (e) => (Module._tsearch_readline_end = wasmExports.tsearch_readline_end)(e); Module._stringToQualifiedNameList = (e, t2) => (Module._stringToQualifiedNameList = wasmExports.stringToQualifiedNameList)(e, t2); Module._t_isdigit = (e) => (Module._t_isdigit = wasmExports.t_isdigit)(e); Module._t_isalnum = (e) => (Module._t_isalnum = wasmExports.t_isalnum)(e); Module._get_restriction_variable = (e, t2, r, a2, s4, o4) => (Module._get_restriction_variable = wasmExports.get_restriction_variable)(e, t2, r, a2, s4, o4); Module._MemoryContextAllocHuge = (e, t2) => (Module._MemoryContextAllocHuge = wasmExports.MemoryContextAllocHuge)(e, t2); Module._WaitEventExtensionNew = (e) => (Module._WaitEventExtensionNew = wasmExports.WaitEventExtensionNew)(e); Module._expand_array = (e, t2, r) => (Module._expand_array = wasmExports.expand_array)(e, t2, r); Module._arraycontsel = (e) => (Module._arraycontsel = wasmExports.arraycontsel)(e); Module._arraycontjoinsel = (e) => (Module._arraycontjoinsel = wasmExports.arraycontjoinsel)(e); Module._initArrayResult = (e, t2, r) => (Module._initArrayResult = wasmExports.initArrayResult)(e, t2, r); Module._array_create_iterator = (e, t2, r) => (Module._array_create_iterator = wasmExports.array_create_iterator)(e, t2, r); Module._array_iterate = (e, t2, r) => (Module._array_iterate = wasmExports.array_iterate)(e, t2, r); Module._ArrayGetIntegerTypmods = (e, t2) => (Module._ArrayGetIntegerTypmods = wasmExports.ArrayGetIntegerTypmods)(e, t2); Module._boolin = (e) => (Module._boolin = wasmExports.boolin)(e); Module._cash_cmp = (e) => (Module._cash_cmp = wasmExports.cash_cmp)(e); Module._int64_to_numeric = (e) => (Module._int64_to_numeric = wasmExports.int64_to_numeric)(e); Module._numeric_div = (e) => (Module._numeric_div = wasmExports.numeric_div)(e); Module._date_eq = (e) => (Module._date_eq = wasmExports.date_eq)(e); Module._date_lt = (e) => (Module._date_lt = wasmExports.date_lt)(e); Module._date_le = (e) => (Module._date_le = wasmExports.date_le)(e); Module._date_gt = (e) => (Module._date_gt = wasmExports.date_gt)(e); Module._date_ge = (e) => (Module._date_ge = wasmExports.date_ge)(e); Module._date_cmp = (e) => (Module._date_cmp = wasmExports.date_cmp)(e); Module._date_mi = (e) => (Module._date_mi = wasmExports.date_mi)(e); Module._time_eq = (e) => (Module._time_eq = wasmExports.time_eq)(e); Module._time_lt = (e) => (Module._time_lt = wasmExports.time_lt)(e); Module._time_le = (e) => (Module._time_le = wasmExports.time_le)(e); Module._time_gt = (e) => (Module._time_gt = wasmExports.time_gt)(e); Module._time_ge = (e) => (Module._time_ge = wasmExports.time_ge)(e); Module._time_cmp = (e) => (Module._time_cmp = wasmExports.time_cmp)(e); Module._time_mi_time = (e) => (Module._time_mi_time = wasmExports.time_mi_time)(e); Module._timetz_cmp = (e) => (Module._timetz_cmp = wasmExports.timetz_cmp)(e); Module._TransferExpandedObject = (e, t2) => (Module._TransferExpandedObject = wasmExports.TransferExpandedObject)(e, t2); Module._numeric_lt = (e) => (Module._numeric_lt = wasmExports.numeric_lt)(e); Module._numeric_ge = (e) => (Module._numeric_ge = wasmExports.numeric_ge)(e); Module._err_generic_string = (e, t2) => (Module._err_generic_string = wasmExports.err_generic_string)(e, t2); Module._domain_check = (e, t2, r, a2, s4) => (Module._domain_check = wasmExports.domain_check)(e, t2, r, a2, s4); Module._enum_lt = (e) => (Module._enum_lt = wasmExports.enum_lt)(e); Module._enum_le = (e) => (Module._enum_le = wasmExports.enum_le)(e); Module._enum_ge = (e) => (Module._enum_ge = wasmExports.enum_ge)(e); Module._enum_gt = (e) => (Module._enum_gt = wasmExports.enum_gt)(e); Module._enum_cmp = (e) => (Module._enum_cmp = wasmExports.enum_cmp)(e); Module._make_expanded_record_from_typeid = (e, t2, r) => (Module._make_expanded_record_from_typeid = wasmExports.make_expanded_record_from_typeid)(e, t2, r); Module._make_expanded_record_from_tupdesc = (e, t2) => (Module._make_expanded_record_from_tupdesc = wasmExports.make_expanded_record_from_tupdesc)(e, t2); Module._make_expanded_record_from_exprecord = (e, t2) => (Module._make_expanded_record_from_exprecord = wasmExports.make_expanded_record_from_exprecord)(e, t2); Module._expanded_record_set_tuple = (e, t2, r, a2) => (Module._expanded_record_set_tuple = wasmExports.expanded_record_set_tuple)(e, t2, r, a2); Module._expanded_record_get_tuple = (e) => (Module._expanded_record_get_tuple = wasmExports.expanded_record_get_tuple)(e); Module._deconstruct_expanded_record = (e) => (Module._deconstruct_expanded_record = wasmExports.deconstruct_expanded_record)(e); Module._expanded_record_lookup_field = (e, t2, r) => (Module._expanded_record_lookup_field = wasmExports.expanded_record_lookup_field)(e, t2, r); Module._expanded_record_set_field_internal = (e, t2, r, a2, s4, o4) => (Module._expanded_record_set_field_internal = wasmExports.expanded_record_set_field_internal)(e, t2, r, a2, s4, o4); Module._expanded_record_set_fields = (e, t2, r, a2) => (Module._expanded_record_set_fields = wasmExports.expanded_record_set_fields)(e, t2, r, a2); Module._float4in_internal = (e, t2, r, a2, s4) => (Module._float4in_internal = wasmExports.float4in_internal)(e, t2, r, a2, s4); Module._strtof = (e, t2) => (Module._strtof = wasmExports.strtof)(e, t2); Module._float8in_internal = (e, t2, r, a2, s4) => (Module._float8in_internal = wasmExports.float8in_internal)(e, t2, r, a2, s4); Module._float8out_internal = (e) => (Module._float8out_internal = wasmExports.float8out_internal)(e); Module._btfloat4cmp = (e) => (Module._btfloat4cmp = wasmExports.btfloat4cmp)(e); Module._btfloat8cmp = (e) => (Module._btfloat8cmp = wasmExports.btfloat8cmp)(e); Module._acos = (e) => (Module._acos = wasmExports.acos)(e); Module._asin = (e) => (Module._asin = wasmExports.asin)(e); Module._cos = (e) => (Module._cos = wasmExports.cos)(e); Module._str_tolower = (e, t2, r) => (Module._str_tolower = wasmExports.str_tolower)(e, t2, r); Module._pushJsonbValue = (e, t2, r) => (Module._pushJsonbValue = wasmExports.pushJsonbValue)(e, t2, r); Module._numeric_float4 = (e) => (Module._numeric_float4 = wasmExports.numeric_float4)(e); Module._numeric_cmp = (e) => (Module._numeric_cmp = wasmExports.numeric_cmp)(e); Module._numeric_eq = (e) => (Module._numeric_eq = wasmExports.numeric_eq)(e); Module._numeric_is_nan = (e) => (Module._numeric_is_nan = wasmExports.numeric_is_nan)(e); Module._timestamp_cmp = (e) => (Module._timestamp_cmp = wasmExports.timestamp_cmp)(e); Module._macaddr_cmp = (e) => (Module._macaddr_cmp = wasmExports.macaddr_cmp)(e); Module._macaddr_lt = (e) => (Module._macaddr_lt = wasmExports.macaddr_lt)(e); Module._macaddr_le = (e) => (Module._macaddr_le = wasmExports.macaddr_le)(e); Module._macaddr_eq = (e) => (Module._macaddr_eq = wasmExports.macaddr_eq)(e); Module._macaddr_ge = (e) => (Module._macaddr_ge = wasmExports.macaddr_ge)(e); Module._macaddr_gt = (e) => (Module._macaddr_gt = wasmExports.macaddr_gt)(e); Module._macaddr8_cmp = (e) => (Module._macaddr8_cmp = wasmExports.macaddr8_cmp)(e); Module._macaddr8_lt = (e) => (Module._macaddr8_lt = wasmExports.macaddr8_lt)(e); Module._macaddr8_le = (e) => (Module._macaddr8_le = wasmExports.macaddr8_le)(e); Module._macaddr8_eq = (e) => (Module._macaddr8_eq = wasmExports.macaddr8_eq)(e); Module._macaddr8_ge = (e) => (Module._macaddr8_ge = wasmExports.macaddr8_ge)(e); Module._macaddr8_gt = (e) => (Module._macaddr8_gt = wasmExports.macaddr8_gt)(e); Module._current_query = (e) => (Module._current_query = wasmExports.current_query)(e); Module._unpack_sql_state = (e) => (Module._unpack_sql_state = wasmExports.unpack_sql_state)(e); Module._get_fn_expr_rettype = (e) => (Module._get_fn_expr_rettype = wasmExports.get_fn_expr_rettype)(e); Module._btnamecmp = (e) => (Module._btnamecmp = wasmExports.btnamecmp)(e); Module._inet_in = (e) => (Module._inet_in = wasmExports.inet_in)(e); Module._network_cmp = (e) => (Module._network_cmp = wasmExports.network_cmp)(e); Module._convert_network_to_scalar = (e, t2, r) => (Module._convert_network_to_scalar = wasmExports.convert_network_to_scalar)(e, t2, r); Module._numeric_gt = (e) => (Module._numeric_gt = wasmExports.numeric_gt)(e); Module._numeric_le = (e) => (Module._numeric_le = wasmExports.numeric_le)(e); Module._numeric_float8_no_overflow = (e) => (Module._numeric_float8_no_overflow = wasmExports.numeric_float8_no_overflow)(e); Module._oidout = (e) => (Module._oidout = wasmExports.oidout)(e); Module._interval_mi = (e) => (Module._interval_mi = wasmExports.interval_mi)(e); Module._quote_ident = (e) => (Module._quote_ident = wasmExports.quote_ident)(e); Module._pg_wchar2mb_with_len = (e, t2, r) => (Module._pg_wchar2mb_with_len = wasmExports.pg_wchar2mb_with_len)(e, t2, r); Module._pg_get_indexdef_columns_extended = (e, t2) => (Module._pg_get_indexdef_columns_extended = wasmExports.pg_get_indexdef_columns_extended)(e, t2); Module._pg_get_querydef = (e, t2) => (Module._pg_get_querydef = wasmExports.pg_get_querydef)(e, t2); Module._strcspn = (e, t2) => (Module._strcspn = wasmExports.strcspn)(e, t2); Module._generic_restriction_selectivity = (e, t2, r, a2, s4, o4) => (Module._generic_restriction_selectivity = wasmExports.generic_restriction_selectivity)(e, t2, r, a2, s4, o4); Module._genericcostestimate = (e, t2, r, a2) => (Module._genericcostestimate = wasmExports.genericcostestimate)(e, t2, r, a2); Module._tidin = (e) => (Module._tidin = wasmExports.tidin)(e); Module._tidout = (e) => (Module._tidout = wasmExports.tidout)(e); Module._timestamp_in = (e) => (Module._timestamp_in = wasmExports.timestamp_in)(e); Module._timestamp_eq = (e) => (Module._timestamp_eq = wasmExports.timestamp_eq)(e); Module._timestamp_lt = (e) => (Module._timestamp_lt = wasmExports.timestamp_lt)(e); Module._timestamp_gt = (e) => (Module._timestamp_gt = wasmExports.timestamp_gt)(e); Module._timestamp_le = (e) => (Module._timestamp_le = wasmExports.timestamp_le)(e); Module._timestamp_ge = (e) => (Module._timestamp_ge = wasmExports.timestamp_ge)(e); Module._interval_eq = (e) => (Module._interval_eq = wasmExports.interval_eq)(e); Module._interval_lt = (e) => (Module._interval_lt = wasmExports.interval_lt)(e); Module._interval_gt = (e) => (Module._interval_gt = wasmExports.interval_gt)(e); Module._interval_le = (e) => (Module._interval_le = wasmExports.interval_le)(e); Module._interval_ge = (e) => (Module._interval_ge = wasmExports.interval_ge)(e); Module._interval_cmp = (e) => (Module._interval_cmp = wasmExports.interval_cmp)(e); Module._timestamp_mi = (e) => (Module._timestamp_mi = wasmExports.timestamp_mi)(e); Module._interval_um = (e) => (Module._interval_um = wasmExports.interval_um)(e); Module._has_fn_opclass_options = (e) => (Module._has_fn_opclass_options = wasmExports.has_fn_opclass_options)(e); Module._uuid_in = (e) => (Module._uuid_in = wasmExports.uuid_in)(e); Module._uuid_out = (e) => (Module._uuid_out = wasmExports.uuid_out)(e); Module._uuid_cmp = (e) => (Module._uuid_cmp = wasmExports.uuid_cmp)(e); Module._varbit_in = (e) => (Module._varbit_in = wasmExports.varbit_in)(e); Module._biteq = (e) => (Module._biteq = wasmExports.biteq)(e); Module._bitlt = (e) => (Module._bitlt = wasmExports.bitlt)(e); Module._bitle = (e) => (Module._bitle = wasmExports.bitle)(e); Module._bitgt = (e) => (Module._bitgt = wasmExports.bitgt)(e); Module._bitge = (e) => (Module._bitge = wasmExports.bitge)(e); Module._bitcmp = (e) => (Module._bitcmp = wasmExports.bitcmp)(e); Module._bpchareq = (e) => (Module._bpchareq = wasmExports.bpchareq)(e); Module._bpcharlt = (e) => (Module._bpcharlt = wasmExports.bpcharlt)(e); Module._bpcharle = (e) => (Module._bpcharle = wasmExports.bpcharle)(e); Module._bpchargt = (e) => (Module._bpchargt = wasmExports.bpchargt)(e); Module._bpcharge = (e) => (Module._bpcharge = wasmExports.bpcharge)(e); Module._bpcharcmp = (e) => (Module._bpcharcmp = wasmExports.bpcharcmp)(e); Module._texteq = (e) => (Module._texteq = wasmExports.texteq)(e); Module._text_lt = (e) => (Module._text_lt = wasmExports.text_lt)(e); Module._text_le = (e) => (Module._text_le = wasmExports.text_le)(e); Module._text_gt = (e) => (Module._text_gt = wasmExports.text_gt)(e); Module._text_ge = (e) => (Module._text_ge = wasmExports.text_ge)(e); Module._bttextcmp = (e) => (Module._bttextcmp = wasmExports.bttextcmp)(e); Module._byteaeq = (e) => (Module._byteaeq = wasmExports.byteaeq)(e); Module._bytealt = (e) => (Module._bytealt = wasmExports.bytealt)(e); Module._byteale = (e) => (Module._byteale = wasmExports.byteale)(e); Module._byteagt = (e) => (Module._byteagt = wasmExports.byteagt)(e); Module._byteage = (e) => (Module._byteage = wasmExports.byteage)(e); Module._byteacmp = (e) => (Module._byteacmp = wasmExports.byteacmp)(e); Module._to_hex32 = (e) => (Module._to_hex32 = wasmExports.to_hex32)(e); Module._varstr_levenshtein = (e, t2, r, a2, s4, o4, n3, _3) => (Module._varstr_levenshtein = wasmExports.varstr_levenshtein)(e, t2, r, a2, s4, o4, n3, _3); Module._pg_xml_init = (e) => (Module._pg_xml_init = wasmExports.pg_xml_init)(e); Module._xmlInitParser = () => (Module._xmlInitParser = wasmExports.xmlInitParser)(); Module._xml_ereport = (e, t2, r, a2) => (Module._xml_ereport = wasmExports.xml_ereport)(e, t2, r, a2); Module._pg_xml_done = (e, t2) => (Module._pg_xml_done = wasmExports.pg_xml_done)(e, t2); Module._xmlXPathNewContext = (e) => (Module._xmlXPathNewContext = wasmExports.xmlXPathNewContext)(e); Module._xmlXPathFreeContext = (e) => (Module._xmlXPathFreeContext = wasmExports.xmlXPathFreeContext)(e); Module._xmlFreeDoc = (e) => (Module._xmlFreeDoc = wasmExports.xmlFreeDoc)(e); Module._xmlXPathCtxtCompile = (e, t2) => (Module._xmlXPathCtxtCompile = wasmExports.xmlXPathCtxtCompile)(e, t2); Module._xmlXPathCompiledEval = (e, t2) => (Module._xmlXPathCompiledEval = wasmExports.xmlXPathCompiledEval)(e, t2); Module._xmlXPathFreeObject = (e) => (Module._xmlXPathFreeObject = wasmExports.xmlXPathFreeObject)(e); Module._xmlXPathFreeCompExpr = (e) => (Module._xmlXPathFreeCompExpr = wasmExports.xmlXPathFreeCompExpr)(e); Module._xmlStrdup = (e) => (Module._xmlStrdup = wasmExports.xmlStrdup)(e); Module._xmlEncodeSpecialChars = (e, t2) => (Module._xmlEncodeSpecialChars = wasmExports.xmlEncodeSpecialChars)(e, t2); Module._xmlStrlen = (e) => (Module._xmlStrlen = wasmExports.xmlStrlen)(e); Module._xmlBufferCreate = () => (Module._xmlBufferCreate = wasmExports.xmlBufferCreate)(); Module._xmlBufferFree = (e) => (Module._xmlBufferFree = wasmExports.xmlBufferFree)(e); Module._xmlXPathCastNodeToString = (e) => (Module._xmlXPathCastNodeToString = wasmExports.xmlXPathCastNodeToString)(e); Module._xmlNodeDump = (e, t2, r, a2, s4) => (Module._xmlNodeDump = wasmExports.xmlNodeDump)(e, t2, r, a2, s4); Module._get_typsubscript = (e, t2) => (Module._get_typsubscript = wasmExports.get_typsubscript)(e, t2); Module._CachedPlanAllowsSimpleValidityCheck = (e, t2, r) => (Module._CachedPlanAllowsSimpleValidityCheck = wasmExports.CachedPlanAllowsSimpleValidityCheck)(e, t2, r); Module._CachedPlanIsSimplyValid = (e, t2, r) => (Module._CachedPlanIsSimplyValid = wasmExports.CachedPlanIsSimplyValid)(e, t2, r); Module._GetCachedExpression = (e) => (Module._GetCachedExpression = wasmExports.GetCachedExpression)(e); Module._FreeCachedExpression = (e) => (Module._FreeCachedExpression = wasmExports.FreeCachedExpression)(e); Module._ReleaseAllPlanCacheRefsInOwner = (e) => (Module._ReleaseAllPlanCacheRefsInOwner = wasmExports.ReleaseAllPlanCacheRefsInOwner)(e); Module._in_error_recursion_trouble = () => (Module._in_error_recursion_trouble = wasmExports.in_error_recursion_trouble)(); Module._GetErrorContextStack = () => (Module._GetErrorContextStack = wasmExports.GetErrorContextStack)(); Module._find_rendezvous_variable = (e) => (Module._find_rendezvous_variable = wasmExports.find_rendezvous_variable)(e); Module._CallerFInfoFunctionCall2 = (e, t2, r, a2, s4) => (Module._CallerFInfoFunctionCall2 = wasmExports.CallerFInfoFunctionCall2)(e, t2, r, a2, s4); Module._FunctionCall0Coll = (e, t2) => (Module._FunctionCall0Coll = wasmExports.FunctionCall0Coll)(e, t2); Module._resolve_polymorphic_argtypes = (e, t2, r, a2) => (Module._resolve_polymorphic_argtypes = wasmExports.resolve_polymorphic_argtypes)(e, t2, r, a2); Module._pg_bindtextdomain = (e) => (Module._pg_bindtextdomain = wasmExports.pg_bindtextdomain)(e); Module._DefineCustomBoolVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._DefineCustomBoolVariable = wasmExports.DefineCustomBoolVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._DefineCustomIntVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._DefineCustomIntVariable = wasmExports.DefineCustomIntVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._DefineCustomRealVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._DefineCustomRealVariable = wasmExports.DefineCustomRealVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._DefineCustomStringVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._DefineCustomStringVariable = wasmExports.DefineCustomStringVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._DefineCustomEnumVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4) => (Module._DefineCustomEnumVariable = wasmExports.DefineCustomEnumVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4); Module._MarkGUCPrefixReserved = (e) => (Module._MarkGUCPrefixReserved = wasmExports.MarkGUCPrefixReserved)(e); Module._sampler_random_init_state = (e, t2) => (Module._sampler_random_init_state = wasmExports.sampler_random_init_state)(e, t2); Module._pchomp = (e) => (Module._pchomp = wasmExports.pchomp)(e); Module._PinPortal = (e) => (Module._PinPortal = wasmExports.PinPortal)(e); Module._UnpinPortal = (e) => (Module._UnpinPortal = wasmExports.UnpinPortal)(e); Module._xmlBufferWriteCHAR = (e, t2) => (Module._xmlBufferWriteCHAR = wasmExports.xmlBufferWriteCHAR)(e, t2); Module._xmlBufferWriteChar = (e, t2) => (Module._xmlBufferWriteChar = wasmExports.xmlBufferWriteChar)(e, t2); Module._xmlReadMemory = (e, t2, r, a2, s4) => (Module._xmlReadMemory = wasmExports.xmlReadMemory)(e, t2, r, a2, s4); Module._xmlDocGetRootElement = (e) => (Module._xmlDocGetRootElement = wasmExports.xmlDocGetRootElement)(e); Module._xmlXPathIsNaN = (e) => (Module._xmlXPathIsNaN = wasmExports.xmlXPathIsNaN)(e); Module._xmlXPathCastToBoolean = (e) => (Module._xmlXPathCastToBoolean = wasmExports.xmlXPathCastToBoolean)(e); Module._xmlXPathCastToNumber = (e) => (Module._xmlXPathCastToNumber = wasmExports.xmlXPathCastToNumber)(e); var ___dl_seterr = (e, t2) => (___dl_seterr = wasmExports.__dl_seterr)(e, t2); Module._gmtime = (e) => (Module._gmtime = wasmExports.gmtime)(e); var _htonl = (e) => (_htonl = wasmExports.htonl)(e), _htons = (e) => (_htons = wasmExports.htons)(e); Module._ioctl = (e, t2, r) => (Module._ioctl = wasmExports.ioctl)(e, t2, r); var _emscripten_builtin_memalign = (e, t2) => (_emscripten_builtin_memalign = wasmExports.emscripten_builtin_memalign)(e, t2), _ntohs = (e) => (_ntohs = wasmExports.ntohs)(e); Module._srand = (e) => (Module._srand = wasmExports.srand)(e); Module._rand = () => (Module._rand = wasmExports.rand)(); var __emscripten_timeout = (e, t2) => (__emscripten_timeout = wasmExports._emscripten_timeout)(e, t2), _setThrew = (e, t2) => (_setThrew = wasmExports.setThrew)(e, t2), __emscripten_tempret_set = (e) => (__emscripten_tempret_set = wasmExports._emscripten_tempret_set)(e), __emscripten_tempret_get = () => (__emscripten_tempret_get = wasmExports._emscripten_tempret_get)(), __emscripten_stack_restore = (e) => (__emscripten_stack_restore = wasmExports._emscripten_stack_restore)(e), __emscripten_stack_alloc = (e) => (__emscripten_stack_alloc = wasmExports._emscripten_stack_alloc)(e), _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports.emscripten_stack_get_current)(); Module._InterruptPending = 2677872; Module._MyLatch = 2678060; Module._CritSectionCount = 2677924; Module._MyProc = 2647676; Module._pg_global_prng_state = 2624256; Module._error_context_stack = 2676168; Module._GUC_check_errdetail_string = 2681820; Module._IsUnderPostmaster = 2677953; Module._CurrentMemoryContext = 2683248; Module._stdout = 2537152; Module._debug_query_string = 2538700; Module._MyProcPort = 2678048; Module.___THREW__ = 2698916; Module.___threwValue = 2698920; Module._MyDatabaseId = 2677932; Module._TopMemoryContext = 2683252; Module._PG_exception_stack = 2676172; Module._MyProcPid = 2678024; Module._stdin = 2537e3; Module._ScanKeywords = 2374040; Module._pg_number_of_ones = 925120; Module._LocalBufferBlockPointers = 2644252; Module._BufferBlocks = 2638988; Module._wal_level = 2387920; Module._SnapshotAnyData = 2474096; Module._maintenance_work_mem = 2421576; Module._ParallelWorkerNumber = 2379480; Module._MainLWLockArray = 2645860; Module._CurrentResourceOwner = 2683296; Module._work_mem = 2421560; Module._NBuffers = 2421584; Module._bsysscan = 2625492; Module._CheckXidAlive = 2625488; Module._RecentXmin = 2474188; Module._XactIsoLevel = 2387784; Module._pgWalUsage = 2628960; Module._pgBufferUsage = 2628832; Module._TTSOpsVirtual = 2391608; Module._TransamVariables = 2625480; Module._TopTransactionContext = 2683272; Module._RmgrTable = 2379504; Module._process_shared_preload_libraries_in_progress = 2681216; Module._wal_segment_size = 2387940; Module._TopTransactionResourceOwner = 2683304; Module._arch_module_check_errdetail_string = 2638372; Module._object_access_hook = 2627600; Module._InvalidObjectAddress = 1520620; Module._check_function_bodies = 2421750; Module._post_parse_analyze_hook = 2627640; Module._ScanKeywordTokens = 1551648; Module._SPI_processed = 2628984; Module._SPI_tuptable = 2628992; Module._TTSOpsMinimalTuple = 2391712; Module._check_password_hook = 2627908; Module._ConfigReloadPending = 2638360; Module._max_parallel_maintenance_workers = 2421580; Module._DateStyle = 2421548; Module._ExecutorStart_hook = 2628808; Module._ExecutorRun_hook = 2628812; Module._ExecutorFinish_hook = 2628816; Module._ExecutorEnd_hook = 2628820; Module._SPI_result = 2628996; Module._ClientAuthentication_hook = 2629168; Module._cpu_tuple_cost = 2392168; Module._cpu_operator_cost = 2392184; Module._seq_page_cost = 2392152; Module._planner_hook = 2638056; Module._ShutdownRequestPending = 2638364; Module._MyStartTime = 2678032; Module._cluster_name = 2421800; Module._application_name = 2682044; Module._BufferDescriptors = 2638984; Module._shmem_startup_hook = 2644932; Module._ProcessUtility_hook = 2647764; Module._IntervalStyle = 2677956; Module._extra_float_digits = 2411976; Module._pg_crc32_table = 2112288; Module._xmlFree = 2523400; Module._shmem_request_hook = 2681220;
5285
+ var _fflush = Module._fflush = (e) => (_fflush = Module._fflush = wasmExports.fflush)(e); Module.___errno_location = () => (Module.___errno_location = wasmExports.__errno_location)(); Module._ProcessInterrupts = () => (Module._ProcessInterrupts = wasmExports.ProcessInterrupts)(); Module._errstart_cold = (e, t2) => (Module._errstart_cold = wasmExports.errstart_cold)(e, t2); Module._errcode = (e) => (Module._errcode = wasmExports.errcode)(e); Module._errmsg = (e, t2) => (Module._errmsg = wasmExports.errmsg)(e, t2); Module._errfinish = (e, t2, r) => (Module._errfinish = wasmExports.errfinish)(e, t2, r); Module._puts = (e) => (Module._puts = wasmExports.puts)(e); Module._errstart = (e, t2) => (Module._errstart = wasmExports.errstart)(e, t2); Module._errmsg_internal = (e, t2) => (Module._errmsg_internal = wasmExports.errmsg_internal)(e, t2); Module._errdetail = (e, t2) => (Module._errdetail = wasmExports.errdetail)(e, t2); Module._errhint = (e, t2) => (Module._errhint = wasmExports.errhint)(e, t2); Module._pg_parse_query = (e) => (Module._pg_parse_query = wasmExports.pg_parse_query)(e); Module._gettimeofday = (e, t2) => (Module._gettimeofday = wasmExports.gettimeofday)(e, t2); Module._raw_parser = (e, t2) => (Module._raw_parser = wasmExports.raw_parser)(e, t2); Module._initStringInfo = (e) => (Module._initStringInfo = wasmExports.initStringInfo)(e); Module._appendStringInfoString = (e, t2) => (Module._appendStringInfoString = wasmExports.appendStringInfoString)(e, t2); Module._appendStringInfo = (e, t2, r) => (Module._appendStringInfo = wasmExports.appendStringInfo)(e, t2, r); Module._errdetail_internal = (e, t2) => (Module._errdetail_internal = wasmExports.errdetail_internal)(e, t2); Module._pfree = (e) => (Module._pfree = wasmExports.pfree)(e); Module._list_make1_impl = (e, t2) => (Module._list_make1_impl = wasmExports.list_make1_impl)(e, t2); Module._QueryRewrite = (e) => (Module._QueryRewrite = wasmExports.QueryRewrite)(e); Module._pg_plan_query = (e, t2, r, a2) => (Module._pg_plan_query = wasmExports.pg_plan_query)(e, t2, r, a2); Module._palloc0 = (e) => (Module._palloc0 = wasmExports.palloc0)(e); Module._lappend = (e, t2) => (Module._lappend = wasmExports.lappend)(e, t2); Module._GetCurrentTimestamp = () => (Module._GetCurrentTimestamp = wasmExports.GetCurrentTimestamp)(); Module._pg_prng_double = (e) => (Module._pg_prng_double = wasmExports.pg_prng_double)(e); Module._pg_snprintf = (e, t2, r, a2) => (Module._pg_snprintf = wasmExports.pg_snprintf)(e, t2, r, a2); Module._die = (e) => (Module._die = wasmExports.die)(e); Module._check_stack_depth = () => (Module._check_stack_depth = wasmExports.check_stack_depth)(); Module._pre_format_elog_string = (e, t2) => (Module._pre_format_elog_string = wasmExports.pre_format_elog_string)(e, t2); Module._format_elog_string = (e, t2) => (Module._format_elog_string = wasmExports.format_elog_string)(e, t2); Module._pstrdup = (e) => (Module._pstrdup = wasmExports.pstrdup)(e); Module._SplitIdentifierString = (e, t2, r) => (Module._SplitIdentifierString = wasmExports.SplitIdentifierString)(e, t2, r); Module._list_free = (e) => (Module._list_free = wasmExports.list_free)(e); Module._pg_strcasecmp = (e, t2) => (Module._pg_strcasecmp = wasmExports.pg_strcasecmp)(e, t2); Module._guc_malloc = (e, t2) => (Module._guc_malloc = wasmExports.guc_malloc)(e, t2); Module._SetConfigOption = (e, t2, r, a2) => (Module._SetConfigOption = wasmExports.SetConfigOption)(e, t2, r, a2); Module._pg_sprintf = (e, t2, r) => (Module._pg_sprintf = wasmExports.pg_sprintf)(e, t2, r); Module._strcmp = (e, t2) => (Module._strcmp = wasmExports.strcmp)(e, t2); Module._atoi = (e) => (Module._atoi = wasmExports.atoi)(e); Module._pgl_shutdown = () => (Module._pgl_shutdown = wasmExports.pgl_shutdown)(); Module._pgl_closed = () => (Module._pgl_closed = wasmExports.pgl_closed)(); Module._MemoryContextReset = (e) => (Module._MemoryContextReset = wasmExports.MemoryContextReset)(e); Module._resetStringInfo = (e) => (Module._resetStringInfo = wasmExports.resetStringInfo)(e); Module._getc = (e) => (Module._getc = wasmExports.getc)(e); Module._appendStringInfoChar = (e, t2) => (Module._appendStringInfoChar = wasmExports.appendStringInfoChar)(e, t2); Module._strlen = (e) => (Module._strlen = wasmExports.strlen)(e); Module._strncmp = (e, t2, r) => (Module._strncmp = wasmExports.strncmp)(e, t2, r); Module._pg_fprintf = (e, t2, r) => (Module._pg_fprintf = wasmExports.pg_fprintf)(e, t2, r); Module._pgstat_report_activity = (e, t2) => (Module._pgstat_report_activity = wasmExports.pgstat_report_activity)(e, t2); Module._errhidestmt = (e) => (Module._errhidestmt = wasmExports.errhidestmt)(e); Module._GetTransactionSnapshot = () => (Module._GetTransactionSnapshot = wasmExports.GetTransactionSnapshot)(); Module._PushActiveSnapshot = (e) => (Module._PushActiveSnapshot = wasmExports.PushActiveSnapshot)(e); Module._AllocSetContextCreateInternal = (e, t2, r, a2, s4) => (Module._AllocSetContextCreateInternal = wasmExports.AllocSetContextCreateInternal)(e, t2, r, a2, s4); Module._PopActiveSnapshot = () => (Module._PopActiveSnapshot = wasmExports.PopActiveSnapshot)(); Module._CreateDestReceiver = (e) => (Module._CreateDestReceiver = wasmExports.CreateDestReceiver)(e); Module._CommitTransactionCommand = () => (Module._CommitTransactionCommand = wasmExports.CommitTransactionCommand)(); Module._CommandCounterIncrement = () => (Module._CommandCounterIncrement = wasmExports.CommandCounterIncrement)(); Module._MemoryContextDelete = (e) => (Module._MemoryContextDelete = wasmExports.MemoryContextDelete)(e); Module._StartTransactionCommand = () => (Module._StartTransactionCommand = wasmExports.StartTransactionCommand)(); Module.___wasm_setjmp_test = (e, t2) => (Module.___wasm_setjmp_test = wasmExports.__wasm_setjmp_test)(e, t2); Module._pg_printf = (e, t2) => (Module._pg_printf = wasmExports.pg_printf)(e, t2); Module.___wasm_setjmp = (e, t2, r) => (Module.___wasm_setjmp = wasmExports.__wasm_setjmp)(e, t2, r); Module._FlushErrorState = () => (Module._FlushErrorState = wasmExports.FlushErrorState)(); Module._emscripten_longjmp = (e, t2) => (Module._emscripten_longjmp = wasmExports.emscripten_longjmp)(e, t2); Module._enlargeStringInfo = (e, t2) => (Module._enlargeStringInfo = wasmExports.enlargeStringInfo)(e, t2); var _malloc = Module._malloc = (e) => (_malloc = Module._malloc = wasmExports.malloc)(e); Module._realloc = (e, t2) => (Module._realloc = wasmExports.realloc)(e, t2); Module._strspn = (e, t2) => (Module._strspn = wasmExports.strspn)(e, t2); Module._memcpy = (e, t2, r) => (Module._memcpy = wasmExports.memcpy)(e, t2, r); Module._fileno = (e) => (Module._fileno = wasmExports.fileno)(e); Module._strchr = (e, t2) => (Module._strchr = wasmExports.strchr)(e, t2); Module._free = (e) => (Module._free = wasmExports.free)(e); Module._pg_vsnprintf = (e, t2, r, a2) => (Module._pg_vsnprintf = wasmExports.pg_vsnprintf)(e, t2, r, a2); Module._strcpy = (e, t2) => (Module._strcpy = wasmExports.strcpy)(e, t2); Module._psprintf = (e, t2) => (Module._psprintf = wasmExports.psprintf)(e, t2); Module._stat = (e, t2) => (Module._stat = wasmExports.stat)(e, t2); Module._fwrite = (e, t2, r, a2) => (Module._fwrite = wasmExports.fwrite)(e, t2, r, a2); Module._strftime = (e, t2, r, a2) => (Module._strftime = wasmExports.strftime)(e, t2, r, a2); Module._strstr = (e, t2) => (Module._strstr = wasmExports.strstr)(e, t2); Module._strtol = (e, t2, r) => (Module._strtol = wasmExports.strtol)(e, t2, r); Module._ferror = (e) => (Module._ferror = wasmExports.ferror)(e); Module._clear_error = () => (Module._clear_error = wasmExports.clear_error)(); Module._interactive_one = (e, t2) => (Module._interactive_one = wasmExports.interactive_one)(e, t2); Module._pq_getmsgint = (e, t2) => (Module._pq_getmsgint = wasmExports.pq_getmsgint)(e, t2); Module._palloc = (e) => (Module._palloc = wasmExports.palloc)(e); Module._makeParamList = (e) => (Module._makeParamList = wasmExports.makeParamList)(e); Module._getTypeInputInfo = (e, t2, r) => (Module._getTypeInputInfo = wasmExports.getTypeInputInfo)(e, t2, r); Module._pnstrdup = (e, t2) => (Module._pnstrdup = wasmExports.pnstrdup)(e, t2); Module._MemoryContextSetParent = (e, t2) => (Module._MemoryContextSetParent = wasmExports.MemoryContextSetParent)(e, t2); Module._pgl_backend = () => (Module._pgl_backend = wasmExports.pgl_backend)(); Module._pgl_initdb = () => (Module._pgl_initdb = wasmExports.pgl_initdb)(); Module._main = (e, t2) => (Module._main = wasmExports.__main_argc_argv)(e, t2); Module._appendStringInfoStringQuoted = (e, t2, r) => (Module._appendStringInfoStringQuoted = wasmExports.appendStringInfoStringQuoted)(e, t2, r); Module._set_errcontext_domain = (e) => (Module._set_errcontext_domain = wasmExports.set_errcontext_domain)(e); Module._errcontext_msg = (e, t2) => (Module._errcontext_msg = wasmExports.errcontext_msg)(e, t2); Module._memchr = (e, t2, r) => (Module._memchr = wasmExports.memchr)(e, t2, r); Module._strrchr = (e, t2) => (Module._strrchr = wasmExports.strrchr)(e, t2); Module._xsltFreeStylesheet = (e) => (Module._xsltFreeStylesheet = wasmExports.xsltFreeStylesheet)(e); Module._xsltParseStylesheetDoc = (e) => (Module._xsltParseStylesheetDoc = wasmExports.xsltParseStylesheetDoc)(e); Module._xsltSaveResultToString = (e, t2, r, a2) => (Module._xsltSaveResultToString = wasmExports.xsltSaveResultToString)(e, t2, r, a2); Module._xsltCleanupGlobals = () => (Module._xsltCleanupGlobals = wasmExports.xsltCleanupGlobals)(); Module._xsltNewTransformContext = (e, t2) => (Module._xsltNewTransformContext = wasmExports.xsltNewTransformContext)(e, t2); Module._xsltFreeTransformContext = (e) => (Module._xsltFreeTransformContext = wasmExports.xsltFreeTransformContext)(e); Module._xsltApplyStylesheetUser = (e, t2, r, a2, s4, o4) => (Module._xsltApplyStylesheetUser = wasmExports.xsltApplyStylesheetUser)(e, t2, r, a2, s4, o4); Module._xsltNewSecurityPrefs = () => (Module._xsltNewSecurityPrefs = wasmExports.xsltNewSecurityPrefs)(); Module._xsltFreeSecurityPrefs = (e) => (Module._xsltFreeSecurityPrefs = wasmExports.xsltFreeSecurityPrefs)(e); Module._xsltSetSecurityPrefs = (e, t2, r) => (Module._xsltSetSecurityPrefs = wasmExports.xsltSetSecurityPrefs)(e, t2, r); Module._xsltSetCtxtSecurityPrefs = (e, t2) => (Module._xsltSetCtxtSecurityPrefs = wasmExports.xsltSetCtxtSecurityPrefs)(e, t2); Module._xsltSecurityForbid = (e, t2, r) => (Module._xsltSecurityForbid = wasmExports.xsltSecurityForbid)(e, t2, r); Module._replace_percent_placeholders = (e, t2, r, a2) => (Module._replace_percent_placeholders = wasmExports.replace_percent_placeholders)(e, t2, r, a2); Module._memset = (e, t2, r) => (Module._memset = wasmExports.memset)(e, t2, r); Module._MemoryContextAllocZero = (e, t2) => (Module._MemoryContextAllocZero = wasmExports.MemoryContextAllocZero)(e, t2); Module._MemoryContextAllocExtended = (e, t2, r) => (Module._MemoryContextAllocExtended = wasmExports.MemoryContextAllocExtended)(e, t2, r); Module._hash_bytes = (e, t2) => (Module._hash_bytes = wasmExports.hash_bytes)(e, t2); Module._memcmp = (e, t2, r) => (Module._memcmp = wasmExports.memcmp)(e, t2, r); Module._repalloc = (e, t2) => (Module._repalloc = wasmExports.repalloc)(e, t2); Module._pg_qsort = (e, t2, r, a2) => (Module._pg_qsort = wasmExports.pg_qsort)(e, t2, r, a2); Module._OpenTransientFile = (e, t2) => (Module._OpenTransientFile = wasmExports.OpenTransientFile)(e, t2); Module._errcode_for_file_access = () => (Module._errcode_for_file_access = wasmExports.errcode_for_file_access)(); Module._read = (e, t2, r) => (Module._read = wasmExports.read)(e, t2, r); Module._CloseTransientFile = (e) => (Module._CloseTransientFile = wasmExports.CloseTransientFile)(e); Module._close = (e) => (Module._close = wasmExports.close)(e); Module.___multi3 = (e, t2, r, a2, s4) => (Module.___multi3 = wasmExports.__multi3)(e, t2, r, a2, s4); Module._isalnum = (e) => (Module._isalnum = wasmExports.isalnum)(e); Module._wait_result_to_str = (e) => (Module._wait_result_to_str = wasmExports.wait_result_to_str)(e); Module._float_to_shortest_decimal_bufn = (e, t2) => (Module._float_to_shortest_decimal_bufn = wasmExports.float_to_shortest_decimal_bufn)(e, t2); Module._float_to_shortest_decimal_buf = (e, t2) => (Module._float_to_shortest_decimal_buf = wasmExports.float_to_shortest_decimal_buf)(e, t2); Module._memmove = (e, t2, r) => (Module._memmove = wasmExports.memmove)(e, t2, r); Module._pwrite = (e, t2, r, a2) => (Module._pwrite = wasmExports.pwrite)(e, t2, r, a2); Module._hash_bytes_extended = (e, t2, r) => (Module._hash_bytes_extended = wasmExports.hash_bytes_extended)(e, t2, r); var _calloc = (e, t2) => (_calloc = wasmExports.calloc)(e, t2); Module._IsValidJsonNumber = (e, t2) => (Module._IsValidJsonNumber = wasmExports.IsValidJsonNumber)(e, t2); Module._appendBinaryStringInfo = (e, t2, r) => (Module._appendBinaryStringInfo = wasmExports.appendBinaryStringInfo)(e, t2, r); Module._makeStringInfo = () => (Module._makeStringInfo = wasmExports.makeStringInfo)(); Module._GetDatabaseEncodingName = () => (Module._GetDatabaseEncodingName = wasmExports.GetDatabaseEncodingName)(); Module._ScanKeywordLookup = (e, t2) => (Module._ScanKeywordLookup = wasmExports.ScanKeywordLookup)(e, t2); Module._strtoul = (e, t2, r) => (Module._strtoul = wasmExports.strtoul)(e, t2, r); Module._sscanf = (e, t2, r) => (Module._sscanf = wasmExports.sscanf)(e, t2, r); Module._pg_prng_uint64 = (e) => (Module._pg_prng_uint64 = wasmExports.pg_prng_uint64)(e); Module._pg_prng_uint32 = (e) => (Module._pg_prng_uint32 = wasmExports.pg_prng_uint32)(e); Module._log = (e) => (Module._log = wasmExports.log)(e); Module._sin = (e) => (Module._sin = wasmExports.sin)(e); Module._forkname_to_number = (e) => (Module._forkname_to_number = wasmExports.forkname_to_number)(e); Module._unlink = (e) => (Module._unlink = wasmExports.unlink)(e); Module._pg_utf_mblen_private = (e) => (Module._pg_utf_mblen_private = wasmExports.pg_utf_mblen_private)(e); Module._bsearch = (e, t2, r, a2, s4) => (Module._bsearch = wasmExports.bsearch)(e, t2, r, a2, s4); Module._palloc_extended = (e, t2) => (Module._palloc_extended = wasmExports.palloc_extended)(e, t2); Module._appendStringInfoSpaces = (e, t2) => (Module._appendStringInfoSpaces = wasmExports.appendStringInfoSpaces)(e, t2); Module._fcntl = (e, t2, r) => (Module._fcntl = wasmExports.fcntl)(e, t2, r); Module._pg_popcount_optimized = (e, t2) => (Module._pg_popcount_optimized = wasmExports.pg_popcount_optimized)(e, t2); Module._pg_strong_random = (e, t2) => (Module._pg_strong_random = wasmExports.pg_strong_random)(e, t2); Module._open = (e, t2, r) => (Module._open = wasmExports.open)(e, t2, r); Module._pg_usleep = (e) => (Module._pg_usleep = wasmExports.pg_usleep)(e); Module._nanosleep = (e, t2) => (Module._nanosleep = wasmExports.nanosleep)(e, t2); Module._getpid = () => (Module._getpid = wasmExports.getpid)(); Module._qsort_arg = (e, t2, r, a2, s4) => (Module._qsort_arg = wasmExports.qsort_arg)(e, t2, r, a2, s4); Module._RelationGetNumberOfBlocksInFork = (e, t2) => (Module._RelationGetNumberOfBlocksInFork = wasmExports.RelationGetNumberOfBlocksInFork)(e, t2); Module._ExtendBufferedRel = (e, t2, r, a2) => (Module._ExtendBufferedRel = wasmExports.ExtendBufferedRel)(e, t2, r, a2); Module._MarkBufferDirty = (e) => (Module._MarkBufferDirty = wasmExports.MarkBufferDirty)(e); Module._XLogBeginInsert = () => (Module._XLogBeginInsert = wasmExports.XLogBeginInsert)(); Module._XLogRegisterData = (e, t2) => (Module._XLogRegisterData = wasmExports.XLogRegisterData)(e, t2); Module._XLogInsert = (e, t2) => (Module._XLogInsert = wasmExports.XLogInsert)(e, t2); Module._UnlockReleaseBuffer = (e) => (Module._UnlockReleaseBuffer = wasmExports.UnlockReleaseBuffer)(e); Module._brin_build_desc = (e) => (Module._brin_build_desc = wasmExports.brin_build_desc)(e); Module._EnterParallelMode = () => (Module._EnterParallelMode = wasmExports.EnterParallelMode)(); Module._CreateParallelContext = (e, t2, r) => (Module._CreateParallelContext = wasmExports.CreateParallelContext)(e, t2, r); Module._RegisterSnapshot = (e) => (Module._RegisterSnapshot = wasmExports.RegisterSnapshot)(e); Module._table_parallelscan_estimate = (e, t2) => (Module._table_parallelscan_estimate = wasmExports.table_parallelscan_estimate)(e, t2); Module._add_size = (e, t2) => (Module._add_size = wasmExports.add_size)(e, t2); Module._tuplesort_estimate_shared = (e) => (Module._tuplesort_estimate_shared = wasmExports.tuplesort_estimate_shared)(e); Module._InitializeParallelDSM = (e) => (Module._InitializeParallelDSM = wasmExports.InitializeParallelDSM)(e); Module._UnregisterSnapshot = (e) => (Module._UnregisterSnapshot = wasmExports.UnregisterSnapshot)(e); Module._DestroyParallelContext = (e) => (Module._DestroyParallelContext = wasmExports.DestroyParallelContext)(e); Module._ExitParallelMode = () => (Module._ExitParallelMode = wasmExports.ExitParallelMode)(); Module._shm_toc_allocate = (e, t2) => (Module._shm_toc_allocate = wasmExports.shm_toc_allocate)(e, t2); Module._ConditionVariableInit = (e) => (Module._ConditionVariableInit = wasmExports.ConditionVariableInit)(e); Module._s_init_lock_sema = (e, t2) => (Module._s_init_lock_sema = wasmExports.s_init_lock_sema)(e, t2); Module._table_parallelscan_initialize = (e, t2, r) => (Module._table_parallelscan_initialize = wasmExports.table_parallelscan_initialize)(e, t2, r); Module._tuplesort_initialize_shared = (e, t2, r) => (Module._tuplesort_initialize_shared = wasmExports.tuplesort_initialize_shared)(e, t2, r); Module._shm_toc_insert = (e, t2, r) => (Module._shm_toc_insert = wasmExports.shm_toc_insert)(e, t2, r); Module._LaunchParallelWorkers = (e) => (Module._LaunchParallelWorkers = wasmExports.LaunchParallelWorkers)(e); Module._WaitForParallelWorkersToAttach = (e) => (Module._WaitForParallelWorkersToAttach = wasmExports.WaitForParallelWorkersToAttach)(e); Module._tas_sema = (e) => (Module._tas_sema = wasmExports.tas_sema)(e); Module._s_lock = (e, t2, r, a2) => (Module._s_lock = wasmExports.s_lock)(e, t2, r, a2); Module._s_unlock_sema = (e) => (Module._s_unlock_sema = wasmExports.s_unlock_sema)(e); Module._ConditionVariableSleep = (e, t2) => (Module._ConditionVariableSleep = wasmExports.ConditionVariableSleep)(e, t2); Module._ConditionVariableCancelSleep = () => (Module._ConditionVariableCancelSleep = wasmExports.ConditionVariableCancelSleep)(); Module._tuplesort_performsort = (e) => (Module._tuplesort_performsort = wasmExports.tuplesort_performsort)(e); Module._tuplesort_end = (e) => (Module._tuplesort_end = wasmExports.tuplesort_end)(e); Module._brin_deform_tuple = (e, t2, r) => (Module._brin_deform_tuple = wasmExports.brin_deform_tuple)(e, t2, r); Module._log_newpage_buffer = (e, t2) => (Module._log_newpage_buffer = wasmExports.log_newpage_buffer)(e, t2); Module._LockBuffer = (e, t2) => (Module._LockBuffer = wasmExports.LockBuffer)(e, t2); Module._ReleaseBuffer = (e) => (Module._ReleaseBuffer = wasmExports.ReleaseBuffer)(e); Module._IndexGetRelation = (e, t2) => (Module._IndexGetRelation = wasmExports.IndexGetRelation)(e, t2); Module._table_open = (e, t2) => (Module._table_open = wasmExports.table_open)(e, t2); Module._ReadBufferExtended = (e, t2, r, a2, s4) => (Module._ReadBufferExtended = wasmExports.ReadBufferExtended)(e, t2, r, a2, s4); Module._table_close = (e, t2) => (Module._table_close = wasmExports.table_close)(e, t2); Module._build_reloptions = (e, t2, r, a2, s4, o4) => (Module._build_reloptions = wasmExports.build_reloptions)(e, t2, r, a2, s4, o4); Module._RelationGetIndexScan = (e, t2, r) => (Module._RelationGetIndexScan = wasmExports.RelationGetIndexScan)(e, t2, r); Module._pgstat_assoc_relation = (e) => (Module._pgstat_assoc_relation = wasmExports.pgstat_assoc_relation)(e); Module._index_getprocinfo = (e, t2, r) => (Module._index_getprocinfo = wasmExports.index_getprocinfo)(e, t2, r); Module._fmgr_info_copy = (e, t2, r) => (Module._fmgr_info_copy = wasmExports.fmgr_info_copy)(e, t2, r); Module._FunctionCall4Coll = (e, t2, r, a2, s4, o4) => (Module._FunctionCall4Coll = wasmExports.FunctionCall4Coll)(e, t2, r, a2, s4, o4); Module._FunctionCall1Coll = (e, t2, r) => (Module._FunctionCall1Coll = wasmExports.FunctionCall1Coll)(e, t2, r); Module._brin_free_desc = (e) => (Module._brin_free_desc = wasmExports.brin_free_desc)(e); Module._WaitForParallelWorkersToFinish = (e) => (Module._WaitForParallelWorkersToFinish = wasmExports.WaitForParallelWorkersToFinish)(e); Module._PageGetFreeSpace = (e) => (Module._PageGetFreeSpace = wasmExports.PageGetFreeSpace)(e); Module._BufferGetBlockNumber = (e) => (Module._BufferGetBlockNumber = wasmExports.BufferGetBlockNumber)(e); Module._BuildIndexInfo = (e) => (Module._BuildIndexInfo = wasmExports.BuildIndexInfo)(e); Module._Int64GetDatum = (e) => (Module._Int64GetDatum = wasmExports.Int64GetDatum)(e); Module._DirectFunctionCall2Coll = (e, t2, r, a2) => (Module._DirectFunctionCall2Coll = wasmExports.DirectFunctionCall2Coll)(e, t2, r, a2); Module._RecoveryInProgress = () => (Module._RecoveryInProgress = wasmExports.RecoveryInProgress)(); Module._GetUserIdAndSecContext = (e, t2) => (Module._GetUserIdAndSecContext = wasmExports.GetUserIdAndSecContext)(e, t2); Module._SetUserIdAndSecContext = (e, t2) => (Module._SetUserIdAndSecContext = wasmExports.SetUserIdAndSecContext)(e, t2); Module._NewGUCNestLevel = () => (Module._NewGUCNestLevel = wasmExports.NewGUCNestLevel)(); Module._RestrictSearchPath = () => (Module._RestrictSearchPath = wasmExports.RestrictSearchPath)(); Module._index_open = (e, t2) => (Module._index_open = wasmExports.index_open)(e, t2); Module._object_ownercheck = (e, t2, r) => (Module._object_ownercheck = wasmExports.object_ownercheck)(e, t2, r); Module._aclcheck_error = (e, t2, r) => (Module._aclcheck_error = wasmExports.aclcheck_error)(e, t2, r); Module._AtEOXact_GUC = (e, t2) => (Module._AtEOXact_GUC = wasmExports.AtEOXact_GUC)(e, t2); Module._relation_close = (e, t2) => (Module._relation_close = wasmExports.relation_close)(e, t2); Module._GetUserId = () => (Module._GetUserId = wasmExports.GetUserId)(); Module._ReadBuffer = (e, t2) => (Module._ReadBuffer = wasmExports.ReadBuffer)(e, t2); Module._shm_toc_lookup = (e, t2, r) => (Module._shm_toc_lookup = wasmExports.shm_toc_lookup)(e, t2, r); Module._tuplesort_attach_shared = (e, t2) => (Module._tuplesort_attach_shared = wasmExports.tuplesort_attach_shared)(e, t2); Module._index_close = (e, t2) => (Module._index_close = wasmExports.index_close)(e, t2); Module._table_beginscan_parallel = (e, t2) => (Module._table_beginscan_parallel = wasmExports.table_beginscan_parallel)(e, t2); Module._ConditionVariableSignal = (e) => (Module._ConditionVariableSignal = wasmExports.ConditionVariableSignal)(e); Module._datumCopy = (e, t2, r) => (Module._datumCopy = wasmExports.datumCopy)(e, t2, r); Module._lookup_type_cache = (e, t2) => (Module._lookup_type_cache = wasmExports.lookup_type_cache)(e, t2); Module._get_fn_opclass_options = (e) => (Module._get_fn_opclass_options = wasmExports.get_fn_opclass_options)(e); Module._pg_detoast_datum = (e) => (Module._pg_detoast_datum = wasmExports.pg_detoast_datum)(e); Module._index_getprocid = (e, t2, r) => (Module._index_getprocid = wasmExports.index_getprocid)(e, t2, r); Module._init_local_reloptions = (e, t2) => (Module._init_local_reloptions = wasmExports.init_local_reloptions)(e, t2); Module._FunctionCall2Coll = (e, t2, r, a2) => (Module._FunctionCall2Coll = wasmExports.FunctionCall2Coll)(e, t2, r, a2); Module._SysCacheGetAttrNotNull = (e, t2, r) => (Module._SysCacheGetAttrNotNull = wasmExports.SysCacheGetAttrNotNull)(e, t2, r); Module._ReleaseSysCache = (e) => (Module._ReleaseSysCache = wasmExports.ReleaseSysCache)(e); Module._fmgr_info_cxt = (e, t2, r) => (Module._fmgr_info_cxt = wasmExports.fmgr_info_cxt)(e, t2, r); Module._Float8GetDatum = (e) => (Module._Float8GetDatum = wasmExports.Float8GetDatum)(e); Module._numeric_sub = (e) => (Module._numeric_sub = wasmExports.numeric_sub)(e); Module._DirectFunctionCall1Coll = (e, t2, r) => (Module._DirectFunctionCall1Coll = wasmExports.DirectFunctionCall1Coll)(e, t2, r); Module._pg_detoast_datum_packed = (e) => (Module._pg_detoast_datum_packed = wasmExports.pg_detoast_datum_packed)(e); Module._add_local_int_reloption = (e, t2, r, a2, s4, o4, n3) => (Module._add_local_int_reloption = wasmExports.add_local_int_reloption)(e, t2, r, a2, s4, o4, n3); Module._getTypeOutputInfo = (e, t2, r) => (Module._getTypeOutputInfo = wasmExports.getTypeOutputInfo)(e, t2, r); Module._fmgr_info = (e, t2) => (Module._fmgr_info = wasmExports.fmgr_info)(e, t2); Module._OutputFunctionCall = (e, t2) => (Module._OutputFunctionCall = wasmExports.OutputFunctionCall)(e, t2); Module._cstring_to_text_with_len = (e, t2) => (Module._cstring_to_text_with_len = wasmExports.cstring_to_text_with_len)(e, t2); Module._accumArrayResult = (e, t2, r, a2, s4) => (Module._accumArrayResult = wasmExports.accumArrayResult)(e, t2, r, a2, s4); Module._makeArrayResult = (e, t2) => (Module._makeArrayResult = wasmExports.makeArrayResult)(e, t2); Module._OidOutputFunctionCall = (e, t2) => (Module._OidOutputFunctionCall = wasmExports.OidOutputFunctionCall)(e, t2); Module._cstring_to_text = (e) => (Module._cstring_to_text = wasmExports.cstring_to_text)(e); Module._PageGetExactFreeSpace = (e) => (Module._PageGetExactFreeSpace = wasmExports.PageGetExactFreeSpace)(e); Module._PageIndexTupleOverwrite = (e, t2, r, a2) => (Module._PageIndexTupleOverwrite = wasmExports.PageIndexTupleOverwrite)(e, t2, r, a2); Module._PageInit = (e, t2, r) => (Module._PageInit = wasmExports.PageInit)(e, t2, r); Module._PageAddItemExtended = (e, t2, r, a2, s4) => (Module._PageAddItemExtended = wasmExports.PageAddItemExtended)(e, t2, r, a2, s4); Module._LockRelationForExtension = (e, t2) => (Module._LockRelationForExtension = wasmExports.LockRelationForExtension)(e, t2); Module._UnlockRelationForExtension = (e, t2) => (Module._UnlockRelationForExtension = wasmExports.UnlockRelationForExtension)(e, t2); Module._smgropen = (e, t2) => (Module._smgropen = wasmExports.smgropen)(e, t2); Module._smgrpin = (e) => (Module._smgrpin = wasmExports.smgrpin)(e); Module._ItemPointerEquals = (e, t2) => (Module._ItemPointerEquals = wasmExports.ItemPointerEquals)(e, t2); Module._detoast_external_attr = (e) => (Module._detoast_external_attr = wasmExports.detoast_external_attr)(e); Module._CreateTemplateTupleDesc = (e) => (Module._CreateTemplateTupleDesc = wasmExports.CreateTemplateTupleDesc)(e); Module._TupleDescInitEntry = (e, t2, r, a2, s4, o4) => (Module._TupleDescInitEntry = wasmExports.TupleDescInitEntry)(e, t2, r, a2, s4, o4); Module._SearchSysCache1 = (e, t2) => (Module._SearchSysCache1 = wasmExports.SearchSysCache1)(e, t2); Module._SearchSysCacheList = (e, t2, r, a2, s4) => (Module._SearchSysCacheList = wasmExports.SearchSysCacheList)(e, t2, r, a2, s4); Module._check_amproc_signature = (e, t2, r, a2, s4, o4) => (Module._check_amproc_signature = wasmExports.check_amproc_signature)(e, t2, r, a2, s4, o4); Module._check_amoptsproc_signature = (e) => (Module._check_amoptsproc_signature = wasmExports.check_amoptsproc_signature)(e); Module._format_procedure = (e) => (Module._format_procedure = wasmExports.format_procedure)(e); Module._format_operator = (e) => (Module._format_operator = wasmExports.format_operator)(e); Module._check_amop_signature = (e, t2, r, a2) => (Module._check_amop_signature = wasmExports.check_amop_signature)(e, t2, r, a2); Module._identify_opfamily_groups = (e, t2) => (Module._identify_opfamily_groups = wasmExports.identify_opfamily_groups)(e, t2); Module._format_type_be = (e) => (Module._format_type_be = wasmExports.format_type_be)(e); Module._ReleaseCatCacheList = (e) => (Module._ReleaseCatCacheList = wasmExports.ReleaseCatCacheList)(e); Module._format_type_with_typemod = (e, t2) => (Module._format_type_with_typemod = wasmExports.format_type_with_typemod)(e, t2); Module._DatumGetEOHP = (e) => (Module._DatumGetEOHP = wasmExports.DatumGetEOHP)(e); Module._EOH_get_flat_size = (e) => (Module._EOH_get_flat_size = wasmExports.EOH_get_flat_size)(e); Module._EOH_flatten_into = (e, t2, r) => (Module._EOH_flatten_into = wasmExports.EOH_flatten_into)(e, t2, r); Module._getmissingattr = (e, t2, r) => (Module._getmissingattr = wasmExports.getmissingattr)(e, t2, r); Module._hash_create = (e, t2, r, a2) => (Module._hash_create = wasmExports.hash_create)(e, t2, r, a2); Module._hash_search = (e, t2, r, a2) => (Module._hash_search = wasmExports.hash_search)(e, t2, r, a2); Module._nocachegetattr = (e, t2, r) => (Module._nocachegetattr = wasmExports.nocachegetattr)(e, t2, r); Module._heap_form_tuple = (e, t2, r) => (Module._heap_form_tuple = wasmExports.heap_form_tuple)(e, t2, r); Module._heap_modify_tuple = (e, t2, r, a2, s4) => (Module._heap_modify_tuple = wasmExports.heap_modify_tuple)(e, t2, r, a2, s4); Module._heap_deform_tuple = (e, t2, r, a2) => (Module._heap_deform_tuple = wasmExports.heap_deform_tuple)(e, t2, r, a2); Module._heap_modify_tuple_by_cols = (e, t2, r, a2, s4, o4) => (Module._heap_modify_tuple_by_cols = wasmExports.heap_modify_tuple_by_cols)(e, t2, r, a2, s4, o4); Module._heap_freetuple = (e) => (Module._heap_freetuple = wasmExports.heap_freetuple)(e); Module._index_form_tuple = (e, t2, r) => (Module._index_form_tuple = wasmExports.index_form_tuple)(e, t2, r); Module._nocache_index_getattr = (e, t2, r) => (Module._nocache_index_getattr = wasmExports.nocache_index_getattr)(e, t2, r); Module._index_deform_tuple = (e, t2, r, a2) => (Module._index_deform_tuple = wasmExports.index_deform_tuple)(e, t2, r, a2); Module._slot_getsomeattrs_int = (e, t2) => (Module._slot_getsomeattrs_int = wasmExports.slot_getsomeattrs_int)(e, t2); Module._pg_ltoa = (e, t2) => (Module._pg_ltoa = wasmExports.pg_ltoa)(e, t2); Module._relation_open = (e, t2) => (Module._relation_open = wasmExports.relation_open)(e, t2); Module._LockRelationOid = (e, t2) => (Module._LockRelationOid = wasmExports.LockRelationOid)(e, t2); Module._try_relation_open = (e, t2) => (Module._try_relation_open = wasmExports.try_relation_open)(e, t2); Module._relation_openrv = (e, t2) => (Module._relation_openrv = wasmExports.relation_openrv)(e, t2); Module._RangeVarGetRelidExtended = (e, t2, r, a2, s4) => (Module._RangeVarGetRelidExtended = wasmExports.RangeVarGetRelidExtended)(e, t2, r, a2, s4); Module._add_reloption_kind = () => (Module._add_reloption_kind = wasmExports.add_reloption_kind)(); Module._register_reloptions_validator = (e, t2) => (Module._register_reloptions_validator = wasmExports.register_reloptions_validator)(e, t2); Module._add_int_reloption = (e, t2, r, a2, s4, o4, n3) => (Module._add_int_reloption = wasmExports.add_int_reloption)(e, t2, r, a2, s4, o4, n3); Module._MemoryContextStrdup = (e, t2) => (Module._MemoryContextStrdup = wasmExports.MemoryContextStrdup)(e, t2); Module._transformRelOptions = (e, t2, r, a2, s4, o4) => (Module._transformRelOptions = wasmExports.transformRelOptions)(e, t2, r, a2, s4, o4); Module._deconstruct_array_builtin = (e, t2, r, a2, s4) => (Module._deconstruct_array_builtin = wasmExports.deconstruct_array_builtin)(e, t2, r, a2, s4); Module._defGetString = (e) => (Module._defGetString = wasmExports.defGetString)(e); Module._defGetBoolean = (e) => (Module._defGetBoolean = wasmExports.defGetBoolean)(e); Module._untransformRelOptions = (e) => (Module._untransformRelOptions = wasmExports.untransformRelOptions)(e); Module._text_to_cstring = (e) => (Module._text_to_cstring = wasmExports.text_to_cstring)(e); Module._makeString = (e) => (Module._makeString = wasmExports.makeString)(e); Module._makeDefElem = (e, t2, r) => (Module._makeDefElem = wasmExports.makeDefElem)(e, t2, r); Module._heap_reloptions = (e, t2, r) => (Module._heap_reloptions = wasmExports.heap_reloptions)(e, t2, r); Module._MemoryContextAlloc = (e, t2) => (Module._MemoryContextAlloc = wasmExports.MemoryContextAlloc)(e, t2); Module._parse_bool = (e, t2) => (Module._parse_bool = wasmExports.parse_bool)(e, t2); Module._parse_int = (e, t2, r, a2) => (Module._parse_int = wasmExports.parse_int)(e, t2, r, a2); Module._parse_real = (e, t2, r, a2) => (Module._parse_real = wasmExports.parse_real)(e, t2, r, a2); Module._ScanKeyInit = (e, t2, r, a2, s4) => (Module._ScanKeyInit = wasmExports.ScanKeyInit)(e, t2, r, a2, s4); Module._dsm_segment_handle = (e) => (Module._dsm_segment_handle = wasmExports.dsm_segment_handle)(e); Module._dsm_create = (e, t2) => (Module._dsm_create = wasmExports.dsm_create)(e, t2); Module._dsm_segment_address = (e) => (Module._dsm_segment_address = wasmExports.dsm_segment_address)(e); Module._dsm_attach = (e) => (Module._dsm_attach = wasmExports.dsm_attach)(e); Module._dsm_detach = (e) => (Module._dsm_detach = wasmExports.dsm_detach)(e); Module._ShmemInitStruct = (e, t2, r) => (Module._ShmemInitStruct = wasmExports.ShmemInitStruct)(e, t2, r); Module._LWLockAcquire = (e, t2) => (Module._LWLockAcquire = wasmExports.LWLockAcquire)(e, t2); Module._LWLockRelease = (e) => (Module._LWLockRelease = wasmExports.LWLockRelease)(e); Module._LWLockInitialize = (e, t2) => (Module._LWLockInitialize = wasmExports.LWLockInitialize)(e, t2); Module._MemoryContextMemAllocated = (e, t2) => (Module._MemoryContextMemAllocated = wasmExports.MemoryContextMemAllocated)(e, t2); Module._GetCurrentCommandId = (e) => (Module._GetCurrentCommandId = wasmExports.GetCurrentCommandId)(e); Module._toast_open_indexes = (e, t2, r, a2) => (Module._toast_open_indexes = wasmExports.toast_open_indexes)(e, t2, r, a2); Module._RelationGetIndexList = (e) => (Module._RelationGetIndexList = wasmExports.RelationGetIndexList)(e); Module._systable_beginscan = (e, t2, r, a2, s4, o4) => (Module._systable_beginscan = wasmExports.systable_beginscan)(e, t2, r, a2, s4, o4); Module._systable_getnext = (e) => (Module._systable_getnext = wasmExports.systable_getnext)(e); Module._systable_endscan = (e) => (Module._systable_endscan = wasmExports.systable_endscan)(e); Module._toast_close_indexes = (e, t2, r) => (Module._toast_close_indexes = wasmExports.toast_close_indexes)(e, t2, r); Module._systable_beginscan_ordered = (e, t2, r, a2, s4) => (Module._systable_beginscan_ordered = wasmExports.systable_beginscan_ordered)(e, t2, r, a2, s4); Module._systable_getnext_ordered = (e, t2) => (Module._systable_getnext_ordered = wasmExports.systable_getnext_ordered)(e, t2); Module._systable_endscan_ordered = (e) => (Module._systable_endscan_ordered = wasmExports.systable_endscan_ordered)(e); Module._init_toast_snapshot = (e) => (Module._init_toast_snapshot = wasmExports.init_toast_snapshot)(e); Module._convert_tuples_by_position = (e, t2, r) => (Module._convert_tuples_by_position = wasmExports.convert_tuples_by_position)(e, t2, r); Module._execute_attr_map_tuple = (e, t2) => (Module._execute_attr_map_tuple = wasmExports.execute_attr_map_tuple)(e, t2); Module._ExecStoreVirtualTuple = (e) => (Module._ExecStoreVirtualTuple = wasmExports.ExecStoreVirtualTuple)(e); Module._bms_is_member = (e, t2) => (Module._bms_is_member = wasmExports.bms_is_member)(e, t2); Module._bms_add_member = (e, t2) => (Module._bms_add_member = wasmExports.bms_add_member)(e, t2); Module._CreateTupleDescCopy = (e) => (Module._CreateTupleDescCopy = wasmExports.CreateTupleDescCopy)(e); Module._DecrTupleDescRefCount = (e) => (Module._DecrTupleDescRefCount = wasmExports.DecrTupleDescRefCount)(e); Module._datumIsEqual = (e, t2, r, a2) => (Module._datumIsEqual = wasmExports.datumIsEqual)(e, t2, r, a2); Module._TupleDescInitEntryCollation = (e, t2, r) => (Module._TupleDescInitEntryCollation = wasmExports.TupleDescInitEntryCollation)(e, t2, r); Module._stringToNode = (e) => (Module._stringToNode = wasmExports.stringToNode)(e); Module._pg_detoast_datum_copy = (e) => (Module._pg_detoast_datum_copy = wasmExports.pg_detoast_datum_copy)(e); Module._get_typlenbyvalalign = (e, t2, r, a2) => (Module._get_typlenbyvalalign = wasmExports.get_typlenbyvalalign)(e, t2, r, a2); Module._deconstruct_array = (e, t2, r, a2, s4, o4, n3, _3) => (Module._deconstruct_array = wasmExports.deconstruct_array)(e, t2, r, a2, s4, o4, n3, _3); Module._tbm_add_tuples = (e, t2, r, a2) => (Module._tbm_add_tuples = wasmExports.tbm_add_tuples)(e, t2, r, a2); Module._ginPostingListDecode = (e, t2) => (Module._ginPostingListDecode = wasmExports.ginPostingListDecode)(e, t2); Module._ItemPointerCompare = (e, t2) => (Module._ItemPointerCompare = wasmExports.ItemPointerCompare)(e, t2); Module._LockPage = (e, t2, r) => (Module._LockPage = wasmExports.LockPage)(e, t2, r); Module._UnlockPage = (e, t2, r) => (Module._UnlockPage = wasmExports.UnlockPage)(e, t2, r); Module._vacuum_delay_point = () => (Module._vacuum_delay_point = wasmExports.vacuum_delay_point)(); Module._RecordFreeIndexPage = (e, t2) => (Module._RecordFreeIndexPage = wasmExports.RecordFreeIndexPage)(e, t2); Module._IndexFreeSpaceMapVacuum = (e) => (Module._IndexFreeSpaceMapVacuum = wasmExports.IndexFreeSpaceMapVacuum)(e); Module._log_newpage_range = (e, t2, r, a2, s4) => (Module._log_newpage_range = wasmExports.log_newpage_range)(e, t2, r, a2, s4); Module._GetFreeIndexPage = (e) => (Module._GetFreeIndexPage = wasmExports.GetFreeIndexPage)(e); Module._ConditionalLockBuffer = (e) => (Module._ConditionalLockBuffer = wasmExports.ConditionalLockBuffer)(e); Module._LockBufferForCleanup = (e) => (Module._LockBufferForCleanup = wasmExports.LockBufferForCleanup)(e); Module._gistcheckpage = (e, t2) => (Module._gistcheckpage = wasmExports.gistcheckpage)(e, t2); Module._PageIndexMultiDelete = (e, t2, r) => (Module._PageIndexMultiDelete = wasmExports.PageIndexMultiDelete)(e, t2, r); Module._smgrnblocks = (e, t2) => (Module._smgrnblocks = wasmExports.smgrnblocks)(e, t2); Module._list_free_deep = (e) => (Module._list_free_deep = wasmExports.list_free_deep)(e); Module._pairingheap_remove_first = (e) => (Module._pairingheap_remove_first = wasmExports.pairingheap_remove_first)(e); Module._pairingheap_add = (e, t2) => (Module._pairingheap_add = wasmExports.pairingheap_add)(e, t2); Module._float_overflow_error = () => (Module._float_overflow_error = wasmExports.float_overflow_error)(); Module._float_underflow_error = () => (Module._float_underflow_error = wasmExports.float_underflow_error)(); Module._DirectFunctionCall5Coll = (e, t2, r, a2, s4, o4, n3) => (Module._DirectFunctionCall5Coll = wasmExports.DirectFunctionCall5Coll)(e, t2, r, a2, s4, o4, n3); Module._pairingheap_allocate = (e, t2) => (Module._pairingheap_allocate = wasmExports.pairingheap_allocate)(e, t2); Module._GenerationContextCreate = (e, t2, r, a2, s4) => (Module._GenerationContextCreate = wasmExports.GenerationContextCreate)(e, t2, r, a2, s4); Module._pgstat_progress_update_param = (e, t2) => (Module._pgstat_progress_update_param = wasmExports.pgstat_progress_update_param)(e, t2); Module.__hash_getbuf = (e, t2, r, a2) => (Module.__hash_getbuf = wasmExports._hash_getbuf)(e, t2, r, a2); Module.__hash_relbuf = (e, t2) => (Module.__hash_relbuf = wasmExports._hash_relbuf)(e, t2); Module.__hash_get_indextuple_hashkey = (e) => (Module.__hash_get_indextuple_hashkey = wasmExports._hash_get_indextuple_hashkey)(e); Module.__hash_getbuf_with_strategy = (e, t2, r, a2, s4) => (Module.__hash_getbuf_with_strategy = wasmExports._hash_getbuf_with_strategy)(e, t2, r, a2, s4); Module.__hash_ovflblkno_to_bitno = (e, t2) => (Module.__hash_ovflblkno_to_bitno = wasmExports._hash_ovflblkno_to_bitno)(e, t2); Module._list_member_oid = (e, t2) => (Module._list_member_oid = wasmExports.list_member_oid)(e, t2); Module._HeapTupleSatisfiesVisibility = (e, t2, r) => (Module._HeapTupleSatisfiesVisibility = wasmExports.HeapTupleSatisfiesVisibility)(e, t2, r); Module._read_stream_begin_relation = (e, t2, r, a2, s4, o4, n3) => (Module._read_stream_begin_relation = wasmExports.read_stream_begin_relation)(e, t2, r, a2, s4, o4, n3); Module._GetAccessStrategy = (e) => (Module._GetAccessStrategy = wasmExports.GetAccessStrategy)(e); Module._FreeAccessStrategy = (e) => (Module._FreeAccessStrategy = wasmExports.FreeAccessStrategy)(e); Module._read_stream_end = (e) => (Module._read_stream_end = wasmExports.read_stream_end)(e); Module._heap_getnext = (e, t2) => (Module._heap_getnext = wasmExports.heap_getnext)(e, t2); Module._HeapTupleSatisfiesVacuum = (e, t2, r) => (Module._HeapTupleSatisfiesVacuum = wasmExports.HeapTupleSatisfiesVacuum)(e, t2, r); Module._GetMultiXactIdMembers = (e, t2, r, a2) => (Module._GetMultiXactIdMembers = wasmExports.GetMultiXactIdMembers)(e, t2, r, a2); Module._TransactionIdPrecedes = (e, t2) => (Module._TransactionIdPrecedes = wasmExports.TransactionIdPrecedes)(e, t2); Module._HeapTupleGetUpdateXid = (e) => (Module._HeapTupleGetUpdateXid = wasmExports.HeapTupleGetUpdateXid)(e); Module._visibilitymap_clear = (e, t2, r, a2) => (Module._visibilitymap_clear = wasmExports.visibilitymap_clear)(e, t2, r, a2); Module._pgstat_count_heap_insert = (e, t2) => (Module._pgstat_count_heap_insert = wasmExports.pgstat_count_heap_insert)(e, t2); Module._ExecFetchSlotHeapTuple = (e, t2, r) => (Module._ExecFetchSlotHeapTuple = wasmExports.ExecFetchSlotHeapTuple)(e, t2, r); Module._PageGetHeapFreeSpace = (e) => (Module._PageGetHeapFreeSpace = wasmExports.PageGetHeapFreeSpace)(e); Module._visibilitymap_pin = (e, t2, r) => (Module._visibilitymap_pin = wasmExports.visibilitymap_pin)(e, t2, r); Module._HeapTupleSatisfiesUpdate = (e, t2, r) => (Module._HeapTupleSatisfiesUpdate = wasmExports.HeapTupleSatisfiesUpdate)(e, t2, r); Module._TransactionIdIsCurrentTransactionId = (e) => (Module._TransactionIdIsCurrentTransactionId = wasmExports.TransactionIdIsCurrentTransactionId)(e); Module._TransactionIdDidCommit = (e) => (Module._TransactionIdDidCommit = wasmExports.TransactionIdDidCommit)(e); Module._TransactionIdIsInProgress = (e) => (Module._TransactionIdIsInProgress = wasmExports.TransactionIdIsInProgress)(e); Module._bms_free = (e) => (Module._bms_free = wasmExports.bms_free)(e); Module._bms_add_members = (e, t2) => (Module._bms_add_members = wasmExports.bms_add_members)(e, t2); Module._bms_next_member = (e, t2) => (Module._bms_next_member = wasmExports.bms_next_member)(e, t2); Module._bms_overlap = (e, t2) => (Module._bms_overlap = wasmExports.bms_overlap)(e, t2); Module._MultiXactIdPrecedes = (e, t2) => (Module._MultiXactIdPrecedes = wasmExports.MultiXactIdPrecedes)(e, t2); Module._heap_tuple_needs_eventual_freeze = (e) => (Module._heap_tuple_needs_eventual_freeze = wasmExports.heap_tuple_needs_eventual_freeze)(e); Module._PrefetchBuffer = (e, t2, r, a2) => (Module._PrefetchBuffer = wasmExports.PrefetchBuffer)(e, t2, r, a2); Module._XLogRecGetBlockTagExtended = (e, t2, r, a2, s4, o4) => (Module._XLogRecGetBlockTagExtended = wasmExports.XLogRecGetBlockTagExtended)(e, t2, r, a2, s4, o4); Module._read_stream_next_buffer = (e, t2) => (Module._read_stream_next_buffer = wasmExports.read_stream_next_buffer)(e, t2); Module._smgrexists = (e, t2) => (Module._smgrexists = wasmExports.smgrexists)(e, t2); Module._table_slot_create = (e, t2) => (Module._table_slot_create = wasmExports.table_slot_create)(e, t2); Module._ExecDropSingleTupleTableSlot = (e) => (Module._ExecDropSingleTupleTableSlot = wasmExports.ExecDropSingleTupleTableSlot)(e); Module._CreateExecutorState = () => (Module._CreateExecutorState = wasmExports.CreateExecutorState)(); Module._MakePerTupleExprContext = (e) => (Module._MakePerTupleExprContext = wasmExports.MakePerTupleExprContext)(e); Module._GetOldestNonRemovableTransactionId = (e) => (Module._GetOldestNonRemovableTransactionId = wasmExports.GetOldestNonRemovableTransactionId)(e); Module._FreeExecutorState = (e) => (Module._FreeExecutorState = wasmExports.FreeExecutorState)(e); Module._MakeSingleTupleTableSlot = (e, t2) => (Module._MakeSingleTupleTableSlot = wasmExports.MakeSingleTupleTableSlot)(e, t2); Module._ExecStoreHeapTuple = (e, t2, r) => (Module._ExecStoreHeapTuple = wasmExports.ExecStoreHeapTuple)(e, t2, r); Module._visibilitymap_get_status = (e, t2, r) => (Module._visibilitymap_get_status = wasmExports.visibilitymap_get_status)(e, t2, r); Module._ExecStoreAllNullTuple = (e) => (Module._ExecStoreAllNullTuple = wasmExports.ExecStoreAllNullTuple)(e); Module._XidInMVCCSnapshot = (e, t2) => (Module._XidInMVCCSnapshot = wasmExports.XidInMVCCSnapshot)(e, t2); Module._hash_seq_init = (e, t2) => (Module._hash_seq_init = wasmExports.hash_seq_init)(e, t2); Module._hash_seq_search = (e) => (Module._hash_seq_search = wasmExports.hash_seq_search)(e); Module._ftruncate = (e, t2) => (Module._ftruncate = wasmExports.ftruncate)(e, t2); Module._fd_fsync_fname = (e, t2) => (Module._fd_fsync_fname = wasmExports.fd_fsync_fname)(e, t2); Module._get_namespace_name = (e) => (Module._get_namespace_name = wasmExports.get_namespace_name)(e); Module._GetRecordedFreeSpace = (e, t2) => (Module._GetRecordedFreeSpace = wasmExports.GetRecordedFreeSpace)(e, t2); Module._vac_estimate_reltuples = (e, t2, r, a2) => (Module._vac_estimate_reltuples = wasmExports.vac_estimate_reltuples)(e, t2, r, a2); Module._WaitLatch = (e, t2, r, a2) => (Module._WaitLatch = wasmExports.WaitLatch)(e, t2, r, a2); Module._ResetLatch = (e) => (Module._ResetLatch = wasmExports.ResetLatch)(e); Module._clock_gettime = (e, t2) => (Module._clock_gettime = wasmExports.clock_gettime)(e, t2); Module._WalUsageAccumDiff = (e, t2, r) => (Module._WalUsageAccumDiff = wasmExports.WalUsageAccumDiff)(e, t2, r); Module._BufferUsageAccumDiff = (e, t2, r) => (Module._BufferUsageAccumDiff = wasmExports.BufferUsageAccumDiff)(e, t2, r); Module._visibilitymap_prepare_truncate = (e, t2) => (Module._visibilitymap_prepare_truncate = wasmExports.visibilitymap_prepare_truncate)(e, t2); Module._pg_class_aclcheck = (e, t2, r) => (Module._pg_class_aclcheck = wasmExports.pg_class_aclcheck)(e, t2, r); Module._btboolcmp = (e) => (Module._btboolcmp = wasmExports.btboolcmp)(e); Module._btint2cmp = (e) => (Module._btint2cmp = wasmExports.btint2cmp)(e); Module._btint4cmp = (e) => (Module._btint4cmp = wasmExports.btint4cmp)(e); Module._btint8cmp = (e) => (Module._btint8cmp = wasmExports.btint8cmp)(e); Module._btoidcmp = (e) => (Module._btoidcmp = wasmExports.btoidcmp)(e); Module._btcharcmp = (e) => (Module._btcharcmp = wasmExports.btcharcmp)(e); Module.__bt_form_posting = (e, t2, r) => (Module.__bt_form_posting = wasmExports._bt_form_posting)(e, t2, r); Module.__bt_mkscankey = (e, t2) => (Module.__bt_mkscankey = wasmExports._bt_mkscankey)(e, t2); Module.__bt_checkpage = (e, t2) => (Module.__bt_checkpage = wasmExports._bt_checkpage)(e, t2); Module.__bt_compare = (e, t2, r, a2) => (Module.__bt_compare = wasmExports._bt_compare)(e, t2, r, a2); Module.__bt_relbuf = (e, t2) => (Module.__bt_relbuf = wasmExports._bt_relbuf)(e, t2); Module.__bt_search = (e, t2, r, a2, s4) => (Module.__bt_search = wasmExports._bt_search)(e, t2, r, a2, s4); Module.__bt_binsrch_insert = (e, t2) => (Module.__bt_binsrch_insert = wasmExports._bt_binsrch_insert)(e, t2); Module.__bt_freestack = (e) => (Module.__bt_freestack = wasmExports._bt_freestack)(e); Module.__bt_metaversion = (e, t2, r) => (Module.__bt_metaversion = wasmExports._bt_metaversion)(e, t2, r); Module.__bt_allequalimage = (e, t2) => (Module.__bt_allequalimage = wasmExports._bt_allequalimage)(e, t2); Module._before_shmem_exit = (e, t2) => (Module._before_shmem_exit = wasmExports.before_shmem_exit)(e, t2); Module._cancel_before_shmem_exit = (e, t2) => (Module._cancel_before_shmem_exit = wasmExports.cancel_before_shmem_exit)(e, t2); Module._pg_re_throw = () => (Module._pg_re_throw = wasmExports.pg_re_throw)(); Module._get_opfamily_member = (e, t2, r, a2) => (Module._get_opfamily_member = wasmExports.get_opfamily_member)(e, t2, r, a2); Module.__bt_check_natts = (e, t2, r, a2) => (Module.__bt_check_natts = wasmExports._bt_check_natts)(e, t2, r, a2); Module._timestamptz_to_str = (e) => (Module._timestamptz_to_str = wasmExports.timestamptz_to_str)(e); Module._XLogRecGetBlockRefInfo = (e, t2, r, a2, s4) => (Module._XLogRecGetBlockRefInfo = wasmExports.XLogRecGetBlockRefInfo)(e, t2, r, a2, s4); Module._varstr_cmp = (e, t2, r, a2, s4) => (Module._varstr_cmp = wasmExports.varstr_cmp)(e, t2, r, a2, s4); Module._exprType = (e) => (Module._exprType = wasmExports.exprType)(e); Module._GetActiveSnapshot = () => (Module._GetActiveSnapshot = wasmExports.GetActiveSnapshot)(); Module._errdetail_relkind_not_supported = (e) => (Module._errdetail_relkind_not_supported = wasmExports.errdetail_relkind_not_supported)(e); Module._table_openrv = (e, t2) => (Module._table_openrv = wasmExports.table_openrv)(e, t2); Module._table_slot_callbacks = (e) => (Module._table_slot_callbacks = wasmExports.table_slot_callbacks)(e); Module._clamp_row_est = (e) => (Module._clamp_row_est = wasmExports.clamp_row_est)(e); Module._estimate_expression_value = (e, t2) => (Module._estimate_expression_value = wasmExports.estimate_expression_value)(e, t2); Module._XLogFlush = (e) => (Module._XLogFlush = wasmExports.XLogFlush)(e); Module._get_call_result_type = (e, t2, r) => (Module._get_call_result_type = wasmExports.get_call_result_type)(e, t2, r); Module._HeapTupleHeaderGetDatum = (e) => (Module._HeapTupleHeaderGetDatum = wasmExports.HeapTupleHeaderGetDatum)(e); Module._GenericXLogStart = (e) => (Module._GenericXLogStart = wasmExports.GenericXLogStart)(e); Module._GenericXLogRegisterBuffer = (e, t2, r) => (Module._GenericXLogRegisterBuffer = wasmExports.GenericXLogRegisterBuffer)(e, t2, r); Module._GenericXLogFinish = (e) => (Module._GenericXLogFinish = wasmExports.GenericXLogFinish)(e); Module._GenericXLogAbort = (e) => (Module._GenericXLogAbort = wasmExports.GenericXLogAbort)(e); Module._errmsg_plural = (e, t2, r, a2) => (Module._errmsg_plural = wasmExports.errmsg_plural)(e, t2, r, a2); Module._ReadNextMultiXactId = () => (Module._ReadNextMultiXactId = wasmExports.ReadNextMultiXactId)(); Module._ReadMultiXactIdRange = (e, t2) => (Module._ReadMultiXactIdRange = wasmExports.ReadMultiXactIdRange)(e, t2); Module._MultiXactIdPrecedesOrEquals = (e, t2) => (Module._MultiXactIdPrecedesOrEquals = wasmExports.MultiXactIdPrecedesOrEquals)(e, t2); Module._init_MultiFuncCall = (e) => (Module._init_MultiFuncCall = wasmExports.init_MultiFuncCall)(e); Module._TupleDescGetAttInMetadata = (e) => (Module._TupleDescGetAttInMetadata = wasmExports.TupleDescGetAttInMetadata)(e); Module._per_MultiFuncCall = (e) => (Module._per_MultiFuncCall = wasmExports.per_MultiFuncCall)(e); Module._BuildTupleFromCStrings = (e, t2) => (Module._BuildTupleFromCStrings = wasmExports.BuildTupleFromCStrings)(e, t2); Module._end_MultiFuncCall = (e, t2) => (Module._end_MultiFuncCall = wasmExports.end_MultiFuncCall)(e, t2); Module._GetCurrentSubTransactionId = () => (Module._GetCurrentSubTransactionId = wasmExports.GetCurrentSubTransactionId)(); Module._WaitForBackgroundWorkerShutdown = (e) => (Module._WaitForBackgroundWorkerShutdown = wasmExports.WaitForBackgroundWorkerShutdown)(e); Module._RegisterDynamicBackgroundWorker = (e, t2) => (Module._RegisterDynamicBackgroundWorker = wasmExports.RegisterDynamicBackgroundWorker)(e, t2); Module._BackgroundWorkerUnblockSignals = () => (Module._BackgroundWorkerUnblockSignals = wasmExports.BackgroundWorkerUnblockSignals)(); Module._BackgroundWorkerInitializeConnectionByOid = (e, t2, r) => (Module._BackgroundWorkerInitializeConnectionByOid = wasmExports.BackgroundWorkerInitializeConnectionByOid)(e, t2, r); Module._GetDatabaseEncoding = () => (Module._GetDatabaseEncoding = wasmExports.GetDatabaseEncoding)(); Module._RmgrNotFound = (e) => (Module._RmgrNotFound = wasmExports.RmgrNotFound)(e); Module._InitMaterializedSRF = (e, t2) => (Module._InitMaterializedSRF = wasmExports.InitMaterializedSRF)(e, t2); Module._tuplestore_putvalues = (e, t2, r, a2) => (Module._tuplestore_putvalues = wasmExports.tuplestore_putvalues)(e, t2, r, a2); Module._AllocateFile = (e, t2) => (Module._AllocateFile = wasmExports.AllocateFile)(e, t2); Module._FreeFile = (e) => (Module._FreeFile = wasmExports.FreeFile)(e); Module._fd_durable_rename = (e, t2, r) => (Module._fd_durable_rename = wasmExports.fd_durable_rename)(e, t2, r); Module._BlessTupleDesc = (e) => (Module._BlessTupleDesc = wasmExports.BlessTupleDesc)(e); Module._fstat = (e, t2) => (Module._fstat = wasmExports.fstat)(e, t2); Module._superuser_arg = (e) => (Module._superuser_arg = wasmExports.superuser_arg)(e); Module._wal_segment_close = (e) => (Module._wal_segment_close = wasmExports.wal_segment_close)(e); Module._wal_segment_open = (e, t2, r) => (Module._wal_segment_open = wasmExports.wal_segment_open)(e, t2, r); Module._XLogReaderAllocate = (e, t2, r, a2) => (Module._XLogReaderAllocate = wasmExports.XLogReaderAllocate)(e, t2, r, a2); Module._XLogReadRecord = (e, t2) => (Module._XLogReadRecord = wasmExports.XLogReadRecord)(e, t2); Module._XLogReaderFree = (e) => (Module._XLogReaderFree = wasmExports.XLogReaderFree)(e); Module._GetTopFullTransactionId = () => (Module._GetTopFullTransactionId = wasmExports.GetTopFullTransactionId)(); Module._GetCurrentTransactionNestLevel = () => (Module._GetCurrentTransactionNestLevel = wasmExports.GetCurrentTransactionNestLevel)(); Module._ResourceOwnerCreate = (e, t2) => (Module._ResourceOwnerCreate = wasmExports.ResourceOwnerCreate)(e, t2); Module._RegisterXactCallback = (e, t2) => (Module._RegisterXactCallback = wasmExports.RegisterXactCallback)(e, t2); Module._RegisterSubXactCallback = (e, t2) => (Module._RegisterSubXactCallback = wasmExports.RegisterSubXactCallback)(e, t2); Module._BeginInternalSubTransaction = (e) => (Module._BeginInternalSubTransaction = wasmExports.BeginInternalSubTransaction)(e); Module._ReleaseCurrentSubTransaction = () => (Module._ReleaseCurrentSubTransaction = wasmExports.ReleaseCurrentSubTransaction)(); Module._ResourceOwnerDelete = (e) => (Module._ResourceOwnerDelete = wasmExports.ResourceOwnerDelete)(e); Module._RollbackAndReleaseCurrentSubTransaction = () => (Module._RollbackAndReleaseCurrentSubTransaction = wasmExports.RollbackAndReleaseCurrentSubTransaction)(); Module._ReleaseExternalFD = () => (Module._ReleaseExternalFD = wasmExports.ReleaseExternalFD)(); Module._GetFlushRecPtr = (e) => (Module._GetFlushRecPtr = wasmExports.GetFlushRecPtr)(e); Module._GetXLogReplayRecPtr = (e) => (Module._GetXLogReplayRecPtr = wasmExports.GetXLogReplayRecPtr)(e); Module._TimestampDifferenceMilliseconds = (e, t2) => (Module._TimestampDifferenceMilliseconds = wasmExports.TimestampDifferenceMilliseconds)(e, t2); Module._numeric_in = (e) => (Module._numeric_in = wasmExports.numeric_in)(e); Module._DirectFunctionCall3Coll = (e, t2, r, a2, s4) => (Module._DirectFunctionCall3Coll = wasmExports.DirectFunctionCall3Coll)(e, t2, r, a2, s4); Module._XLogFindNextRecord = (e, t2) => (Module._XLogFindNextRecord = wasmExports.XLogFindNextRecord)(e, t2); Module._RestoreBlockImage = (e, t2, r) => (Module._RestoreBlockImage = wasmExports.RestoreBlockImage)(e, t2, r); Module._timestamptz_in = (e) => (Module._timestamptz_in = wasmExports.timestamptz_in)(e); Module._fscanf = (e, t2, r) => (Module._fscanf = wasmExports.fscanf)(e, t2, r); Module._XLogRecStoreStats = (e, t2) => (Module._XLogRecStoreStats = wasmExports.XLogRecStoreStats)(e, t2); Module._hash_get_num_entries = (e) => (Module._hash_get_num_entries = wasmExports.hash_get_num_entries)(e); Module._read_local_xlog_page_no_wait = (e, t2, r, a2, s4) => (Module._read_local_xlog_page_no_wait = wasmExports.read_local_xlog_page_no_wait)(e, t2, r, a2, s4); Module._escape_json = (e, t2) => (Module._escape_json = wasmExports.escape_json)(e, t2); Module._list_sort = (e, t2) => (Module._list_sort = wasmExports.list_sort)(e, t2); Module._pg_checksum_page = (e, t2) => (Module._pg_checksum_page = wasmExports.pg_checksum_page)(e, t2); Module._bbsink_forward_end_archive = (e) => (Module._bbsink_forward_end_archive = wasmExports.bbsink_forward_end_archive)(e); Module._bbsink_forward_begin_manifest = (e) => (Module._bbsink_forward_begin_manifest = wasmExports.bbsink_forward_begin_manifest)(e); Module._bbsink_forward_end_manifest = (e) => (Module._bbsink_forward_end_manifest = wasmExports.bbsink_forward_end_manifest)(e); Module._bbsink_forward_end_backup = (e, t2, r) => (Module._bbsink_forward_end_backup = wasmExports.bbsink_forward_end_backup)(e, t2, r); Module._bbsink_forward_cleanup = (e) => (Module._bbsink_forward_cleanup = wasmExports.bbsink_forward_cleanup)(e); Module._list_concat = (e, t2) => (Module._list_concat = wasmExports.list_concat)(e, t2); Module._bbsink_forward_begin_backup = (e) => (Module._bbsink_forward_begin_backup = wasmExports.bbsink_forward_begin_backup)(e); Module._bbsink_forward_archive_contents = (e, t2) => (Module._bbsink_forward_archive_contents = wasmExports.bbsink_forward_archive_contents)(e, t2); Module._bbsink_forward_begin_archive = (e, t2) => (Module._bbsink_forward_begin_archive = wasmExports.bbsink_forward_begin_archive)(e, t2); Module._bbsink_forward_manifest_contents = (e, t2) => (Module._bbsink_forward_manifest_contents = wasmExports.bbsink_forward_manifest_contents)(e, t2); Module._has_privs_of_role = (e, t2) => (Module._has_privs_of_role = wasmExports.has_privs_of_role)(e, t2); Module._BaseBackupAddTarget = (e, t2, r) => (Module._BaseBackupAddTarget = wasmExports.BaseBackupAddTarget)(e, t2, r); Module._list_copy = (e) => (Module._list_copy = wasmExports.list_copy)(e); Module._tuplestore_puttuple = (e, t2) => (Module._tuplestore_puttuple = wasmExports.tuplestore_puttuple)(e, t2); Module._makeRangeVar = (e, t2, r) => (Module._makeRangeVar = wasmExports.makeRangeVar)(e, t2, r); Module._DefineIndex = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._DefineIndex = wasmExports.DefineIndex)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._fread = (e, t2, r, a2) => (Module._fread = wasmExports.fread)(e, t2, r, a2); Module._clearerr = (e) => (Module._clearerr = wasmExports.clearerr)(e); Module._copyObjectImpl = (e) => (Module._copyObjectImpl = wasmExports.copyObjectImpl)(e); Module._lappend_oid = (e, t2) => (Module._lappend_oid = wasmExports.lappend_oid)(e, t2); Module._makeTypeNameFromNameList = (e) => (Module._makeTypeNameFromNameList = wasmExports.makeTypeNameFromNameList)(e); Module._CatalogTupleUpdate = (e, t2, r) => (Module._CatalogTupleUpdate = wasmExports.CatalogTupleUpdate)(e, t2, r); Module._get_rel_name = (e) => (Module._get_rel_name = wasmExports.get_rel_name)(e); Module._CatalogTupleDelete = (e, t2) => (Module._CatalogTupleDelete = wasmExports.CatalogTupleDelete)(e, t2); Module._CatalogTupleInsert = (e, t2) => (Module._CatalogTupleInsert = wasmExports.CatalogTupleInsert)(e, t2); Module._recordDependencyOn = (e, t2, r) => (Module._recordDependencyOn = wasmExports.recordDependencyOn)(e, t2, r); Module._get_element_type = (e) => (Module._get_element_type = wasmExports.get_element_type)(e); Module._object_aclcheck = (e, t2, r, a2) => (Module._object_aclcheck = wasmExports.object_aclcheck)(e, t2, r, a2); Module._superuser = () => (Module._superuser = wasmExports.superuser)(); Module._SearchSysCacheAttName = (e, t2) => (Module._SearchSysCacheAttName = wasmExports.SearchSysCacheAttName)(e, t2); Module._new_object_addresses = () => (Module._new_object_addresses = wasmExports.new_object_addresses)(); Module._free_object_addresses = (e) => (Module._free_object_addresses = wasmExports.free_object_addresses)(e); Module._performMultipleDeletions = (e, t2, r) => (Module._performMultipleDeletions = wasmExports.performMultipleDeletions)(e, t2, r); Module._recordDependencyOnExpr = (e, t2, r, a2) => (Module._recordDependencyOnExpr = wasmExports.recordDependencyOnExpr)(e, t2, r, a2); Module._query_tree_walker_impl = (e, t2, r, a2) => (Module._query_tree_walker_impl = wasmExports.query_tree_walker_impl)(e, t2, r, a2); Module._expression_tree_walker_impl = (e, t2, r) => (Module._expression_tree_walker_impl = wasmExports.expression_tree_walker_impl)(e, t2, r); Module._add_exact_object_address = (e, t2) => (Module._add_exact_object_address = wasmExports.add_exact_object_address)(e, t2); Module._get_rel_relkind = (e) => (Module._get_rel_relkind = wasmExports.get_rel_relkind)(e); Module._get_typtype = (e) => (Module._get_typtype = wasmExports.get_typtype)(e); Module._list_delete_last = (e) => (Module._list_delete_last = wasmExports.list_delete_last)(e); Module._type_is_collatable = (e) => (Module._type_is_collatable = wasmExports.type_is_collatable)(e); Module._GetSysCacheOid = (e, t2, r, a2, s4, o4) => (Module._GetSysCacheOid = wasmExports.GetSysCacheOid)(e, t2, r, a2, s4, o4); Module._CheckTableNotInUse = (e, t2) => (Module._CheckTableNotInUse = wasmExports.CheckTableNotInUse)(e, t2); Module._construct_array = (e, t2, r, a2, s4, o4) => (Module._construct_array = wasmExports.construct_array)(e, t2, r, a2, s4, o4); Module._make_parsestate = (e) => (Module._make_parsestate = wasmExports.make_parsestate)(e); Module._transformExpr = (e, t2, r) => (Module._transformExpr = wasmExports.transformExpr)(e, t2, r); Module._equal = (e, t2) => (Module._equal = wasmExports.equal)(e, t2); Module._pull_var_clause = (e, t2) => (Module._pull_var_clause = wasmExports.pull_var_clause)(e, t2); Module._get_attname = (e, t2, r) => (Module._get_attname = wasmExports.get_attname)(e, t2, r); Module._coerce_to_target_type = (e, t2, r, a2, s4, o4, n3, _3) => (Module._coerce_to_target_type = wasmExports.coerce_to_target_type)(e, t2, r, a2, s4, o4, n3, _3); Module._nodeToString = (e) => (Module._nodeToString = wasmExports.nodeToString)(e); Module._parser_errposition = (e, t2) => (Module._parser_errposition = wasmExports.parser_errposition)(e, t2); Module._exprTypmod = (e) => (Module._exprTypmod = wasmExports.exprTypmod)(e); Module._get_base_element_type = (e) => (Module._get_base_element_type = wasmExports.get_base_element_type)(e); Module._SystemFuncName = (e) => (Module._SystemFuncName = wasmExports.SystemFuncName)(e); Module._CreateTrigger = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._CreateTrigger = wasmExports.CreateTrigger)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._plan_create_index_workers = (e, t2) => (Module._plan_create_index_workers = wasmExports.plan_create_index_workers)(e, t2); Module._get_rel_namespace = (e) => (Module._get_rel_namespace = wasmExports.get_rel_namespace)(e); Module._ConditionalLockRelationOid = (e, t2) => (Module._ConditionalLockRelationOid = wasmExports.ConditionalLockRelationOid)(e, t2); Module._RelnameGetRelid = (e) => (Module._RelnameGetRelid = wasmExports.RelnameGetRelid)(e); Module._get_relkind_objtype = (e) => (Module._get_relkind_objtype = wasmExports.get_relkind_objtype)(e); Module._RelationIsVisible = (e) => (Module._RelationIsVisible = wasmExports.RelationIsVisible)(e); Module._get_func_arg_info = (e, t2, r, a2) => (Module._get_func_arg_info = wasmExports.get_func_arg_info)(e, t2, r, a2); Module._NameListToString = (e) => (Module._NameListToString = wasmExports.NameListToString)(e); Module._OpernameGetOprid = (e, t2, r) => (Module._OpernameGetOprid = wasmExports.OpernameGetOprid)(e, t2, r); Module._makeRangeVarFromNameList = (e) => (Module._makeRangeVarFromNameList = wasmExports.makeRangeVarFromNameList)(e); Module._quote_identifier = (e) => (Module._quote_identifier = wasmExports.quote_identifier)(e); Module._GetSearchPathMatcher = (e) => (Module._GetSearchPathMatcher = wasmExports.GetSearchPathMatcher)(e); Module._SearchPathMatchesCurrentEnvironment = (e) => (Module._SearchPathMatchesCurrentEnvironment = wasmExports.SearchPathMatchesCurrentEnvironment)(e); Module._get_collation_oid = (e, t2) => (Module._get_collation_oid = wasmExports.get_collation_oid)(e, t2); Module._CacheRegisterSyscacheCallback = (e, t2, r) => (Module._CacheRegisterSyscacheCallback = wasmExports.CacheRegisterSyscacheCallback)(e, t2, r); Module._get_extension_oid = (e, t2) => (Module._get_extension_oid = wasmExports.get_extension_oid)(e, t2); Module._get_role_oid = (e, t2) => (Module._get_role_oid = wasmExports.get_role_oid)(e, t2); Module._GetForeignServerByName = (e, t2) => (Module._GetForeignServerByName = wasmExports.GetForeignServerByName)(e, t2); Module._typeStringToTypeName = (e, t2) => (Module._typeStringToTypeName = wasmExports.typeStringToTypeName)(e, t2); Module._list_make2_impl = (e, t2, r) => (Module._list_make2_impl = wasmExports.list_make2_impl)(e, t2, r); Module._GetUserNameFromId = (e, t2) => (Module._GetUserNameFromId = wasmExports.GetUserNameFromId)(e, t2); Module._format_type_extended = (e, t2, r) => (Module._format_type_extended = wasmExports.format_type_extended)(e, t2, r); Module._quote_qualified_identifier = (e, t2) => (Module._quote_qualified_identifier = wasmExports.quote_qualified_identifier)(e, t2); Module._get_tablespace_name = (e) => (Module._get_tablespace_name = wasmExports.get_tablespace_name)(e); Module._GetForeignServerExtended = (e, t2) => (Module._GetForeignServerExtended = wasmExports.GetForeignServerExtended)(e, t2); Module._GetForeignServer = (e) => (Module._GetForeignServer = wasmExports.GetForeignServer)(e); Module._construct_empty_array = (e) => (Module._construct_empty_array = wasmExports.construct_empty_array)(e); Module._format_type_be_qualified = (e) => (Module._format_type_be_qualified = wasmExports.format_type_be_qualified)(e); Module._get_namespace_name_or_temp = (e) => (Module._get_namespace_name_or_temp = wasmExports.get_namespace_name_or_temp)(e); Module._list_make3_impl = (e, t2, r, a2) => (Module._list_make3_impl = wasmExports.list_make3_impl)(e, t2, r, a2); Module._construct_md_array = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._construct_md_array = wasmExports.construct_md_array)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._pull_varattnos = (e, t2, r) => (Module._pull_varattnos = wasmExports.pull_varattnos)(e, t2, r); Module._get_func_name = (e) => (Module._get_func_name = wasmExports.get_func_name)(e); Module._construct_array_builtin = (e, t2, r) => (Module._construct_array_builtin = wasmExports.construct_array_builtin)(e, t2, r); Module._makeObjectName = (e, t2, r) => (Module._makeObjectName = wasmExports.makeObjectName)(e, t2, r); Module._get_primary_key_attnos = (e, t2, r) => (Module._get_primary_key_attnos = wasmExports.get_primary_key_attnos)(e, t2, r); Module._bms_is_subset = (e, t2) => (Module._bms_is_subset = wasmExports.bms_is_subset)(e, t2); Module._getExtensionOfObject = (e, t2) => (Module._getExtensionOfObject = wasmExports.getExtensionOfObject)(e, t2); Module._find_inheritance_children = (e, t2) => (Module._find_inheritance_children = wasmExports.find_inheritance_children)(e, t2); Module._lappend_int = (e, t2) => (Module._lappend_int = wasmExports.lappend_int)(e, t2); Module._has_superclass = (e) => (Module._has_superclass = wasmExports.has_superclass)(e); Module._CheckFunctionValidatorAccess = (e, t2) => (Module._CheckFunctionValidatorAccess = wasmExports.CheckFunctionValidatorAccess)(e, t2); Module._AcquireRewriteLocks = (e, t2, r) => (Module._AcquireRewriteLocks = wasmExports.AcquireRewriteLocks)(e, t2, r); Module._function_parse_error_transpose = (e) => (Module._function_parse_error_transpose = wasmExports.function_parse_error_transpose)(e); Module._geterrposition = () => (Module._geterrposition = wasmExports.geterrposition)(); Module._getinternalerrposition = () => (Module._getinternalerrposition = wasmExports.getinternalerrposition)(); Module._pg_mblen = (e) => (Module._pg_mblen = wasmExports.pg_mblen)(e); Module._pg_mbstrlen_with_len = (e, t2) => (Module._pg_mbstrlen_with_len = wasmExports.pg_mbstrlen_with_len)(e, t2); Module._errposition = (e) => (Module._errposition = wasmExports.errposition)(e); Module._internalerrposition = (e) => (Module._internalerrposition = wasmExports.internalerrposition)(e); Module._internalerrquery = (e) => (Module._internalerrquery = wasmExports.internalerrquery)(e); Module._list_delete_nth_cell = (e, t2) => (Module._list_delete_nth_cell = wasmExports.list_delete_nth_cell)(e, t2); Module._get_array_type = (e) => (Module._get_array_type = wasmExports.get_array_type)(e); Module._smgrtruncate2 = (e, t2, r, a2, s4) => (Module._smgrtruncate2 = wasmExports.smgrtruncate2)(e, t2, r, a2, s4); Module._smgrreadv = (e, t2, r, a2, s4) => (Module._smgrreadv = wasmExports.smgrreadv)(e, t2, r, a2, s4); Module._NewRelationCreateToastTable = (e, t2) => (Module._NewRelationCreateToastTable = wasmExports.NewRelationCreateToastTable)(e, t2); Module._transformStmt = (e, t2) => (Module._transformStmt = wasmExports.transformStmt)(e, t2); Module._exprLocation = (e) => (Module._exprLocation = wasmExports.exprLocation)(e); Module._ParseFuncOrColumn = (e, t2, r, a2, s4, o4, n3) => (Module._ParseFuncOrColumn = wasmExports.ParseFuncOrColumn)(e, t2, r, a2, s4, o4, n3); Module._exprCollation = (e) => (Module._exprCollation = wasmExports.exprCollation)(e); Module._transformDistinctClause = (e, t2, r, a2) => (Module._transformDistinctClause = wasmExports.transformDistinctClause)(e, t2, r, a2); Module._makeTargetEntry = (e, t2, r, a2) => (Module._makeTargetEntry = wasmExports.makeTargetEntry)(e, t2, r, a2); Module._makeAlias = (e, t2) => (Module._makeAlias = wasmExports.makeAlias)(e, t2); Module._addRangeTableEntryForSubquery = (e, t2, r, a2, s4) => (Module._addRangeTableEntryForSubquery = wasmExports.addRangeTableEntryForSubquery)(e, t2, r, a2, s4); Module._makeVar = (e, t2, r, a2, s4, o4) => (Module._makeVar = wasmExports.makeVar)(e, t2, r, a2, s4, o4); Module._makeBoolean = (e) => (Module._makeBoolean = wasmExports.makeBoolean)(e); Module._makeInteger = (e) => (Module._makeInteger = wasmExports.makeInteger)(e); Module._makeTypeName = (e) => (Module._makeTypeName = wasmExports.makeTypeName)(e); Module._makeFuncCall = (e, t2, r, a2) => (Module._makeFuncCall = wasmExports.makeFuncCall)(e, t2, r, a2); Module._list_make4_impl = (e, t2, r, a2, s4) => (Module._list_make4_impl = wasmExports.list_make4_impl)(e, t2, r, a2, s4); Module._get_sortgroupclause_tle = (e, t2) => (Module._get_sortgroupclause_tle = wasmExports.get_sortgroupclause_tle)(e, t2); Module._flatten_join_alias_vars = (e, t2, r) => (Module._flatten_join_alias_vars = wasmExports.flatten_join_alias_vars)(e, t2, r); Module._list_member_int = (e, t2) => (Module._list_member_int = wasmExports.list_member_int)(e, t2); Module._addRangeTableEntryForENR = (e, t2, r) => (Module._addRangeTableEntryForENR = wasmExports.addRangeTableEntryForENR)(e, t2, r); Module._typenameTypeIdAndMod = (e, t2, r, a2) => (Module._typenameTypeIdAndMod = wasmExports.typenameTypeIdAndMod)(e, t2, r, a2); Module._get_typcollation = (e) => (Module._get_typcollation = wasmExports.get_typcollation)(e); Module._strip_implicit_coercions = (e) => (Module._strip_implicit_coercions = wasmExports.strip_implicit_coercions)(e); Module._get_sortgroupref_tle = (e, t2) => (Module._get_sortgroupref_tle = wasmExports.get_sortgroupref_tle)(e, t2); Module._contain_aggs_of_level = (e, t2) => (Module._contain_aggs_of_level = wasmExports.contain_aggs_of_level)(e, t2); Module._typeidType = (e) => (Module._typeidType = wasmExports.typeidType)(e); Module._typeTypeCollation = (e) => (Module._typeTypeCollation = wasmExports.typeTypeCollation)(e); Module._typeLen = (e) => (Module._typeLen = wasmExports.typeLen)(e); Module._typeByVal = (e) => (Module._typeByVal = wasmExports.typeByVal)(e); Module._makeConst = (e, t2, r, a2, s4, o4, n3) => (Module._makeConst = wasmExports.makeConst)(e, t2, r, a2, s4, o4, n3); Module._lookup_rowtype_tupdesc = (e, t2) => (Module._lookup_rowtype_tupdesc = wasmExports.lookup_rowtype_tupdesc)(e, t2); Module._bms_del_member = (e, t2) => (Module._bms_del_member = wasmExports.bms_del_member)(e, t2); Module._list_member = (e, t2) => (Module._list_member = wasmExports.list_member)(e, t2); Module._type_is_rowtype = (e) => (Module._type_is_rowtype = wasmExports.type_is_rowtype)(e); Module._bit_in = (e) => (Module._bit_in = wasmExports.bit_in)(e); Module._bms_union = (e, t2) => (Module._bms_union = wasmExports.bms_union)(e, t2); Module._varstr_levenshtein_less_equal = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._varstr_levenshtein_less_equal = wasmExports.varstr_levenshtein_less_equal)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._errsave_start = (e, t2) => (Module._errsave_start = wasmExports.errsave_start)(e, t2); Module._errsave_finish = (e, t2, r, a2) => (Module._errsave_finish = wasmExports.errsave_finish)(e, t2, r, a2); Module._makeColumnDef = (e, t2, r, a2) => (Module._makeColumnDef = wasmExports.makeColumnDef)(e, t2, r, a2); Module._GetDefaultOpClass = (e, t2) => (Module._GetDefaultOpClass = wasmExports.GetDefaultOpClass)(e, t2); Module._scanner_init = (e, t2, r, a2) => (Module._scanner_init = wasmExports.scanner_init)(e, t2, r, a2); Module._scanner_finish = (e) => (Module._scanner_finish = wasmExports.scanner_finish)(e); Module._core_yylex = (e, t2, r) => (Module._core_yylex = wasmExports.core_yylex)(e, t2, r); Module._isxdigit = (e) => (Module._isxdigit = wasmExports.isxdigit)(e); Module._scanner_isspace = (e) => (Module._scanner_isspace = wasmExports.scanner_isspace)(e); Module._truncate_identifier = (e, t2, r) => (Module._truncate_identifier = wasmExports.truncate_identifier)(e, t2, r); Module._pg_database_encoding_max_length = () => (Module._pg_database_encoding_max_length = wasmExports.pg_database_encoding_max_length)(); Module._namein = (e) => (Module._namein = wasmExports.namein)(e); Module._BlockSampler_Init = (e, t2, r, a2) => (Module._BlockSampler_Init = wasmExports.BlockSampler_Init)(e, t2, r, a2); Module._reservoir_init_selection_state = (e, t2) => (Module._reservoir_init_selection_state = wasmExports.reservoir_init_selection_state)(e, t2); Module._reservoir_get_next_S = (e, t2, r) => (Module._reservoir_get_next_S = wasmExports.reservoir_get_next_S)(e, t2, r); Module._sampler_random_fract = (e) => (Module._sampler_random_fract = wasmExports.sampler_random_fract)(e); Module._BlockSampler_HasMore = (e) => (Module._BlockSampler_HasMore = wasmExports.BlockSampler_HasMore)(e); Module._BlockSampler_Next = (e) => (Module._BlockSampler_Next = wasmExports.BlockSampler_Next)(e); Module._Async_Notify = (e, t2) => (Module._Async_Notify = wasmExports.Async_Notify)(e, t2); Module._RangeVarCallbackMaintainsTable = (e, t2, r, a2) => (Module._RangeVarCallbackMaintainsTable = wasmExports.RangeVarCallbackMaintainsTable)(e, t2, r, a2); Module._make_new_heap = (e, t2, r, a2, s4) => (Module._make_new_heap = wasmExports.make_new_heap)(e, t2, r, a2, s4); Module._finish_heap_swap = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._finish_heap_swap = wasmExports.finish_heap_swap)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._wasm_OpenPipeStream = (e, t2) => (Module._wasm_OpenPipeStream = wasmExports.wasm_OpenPipeStream)(e, t2); Module._ClosePipeStream = (e) => (Module._ClosePipeStream = wasmExports.ClosePipeStream)(e); Module._BeginCopyFrom = (e, t2, r, a2, s4, o4, n3, _3) => (Module._BeginCopyFrom = wasmExports.BeginCopyFrom)(e, t2, r, a2, s4, o4, n3, _3); Module._EndCopyFrom = (e) => (Module._EndCopyFrom = wasmExports.EndCopyFrom)(e); Module._ProcessCopyOptions = (e, t2, r, a2) => (Module._ProcessCopyOptions = wasmExports.ProcessCopyOptions)(e, t2, r, a2); Module._CopyFromErrorCallback = (e) => (Module._CopyFromErrorCallback = wasmExports.CopyFromErrorCallback)(e); Module._NextCopyFrom = (e, t2, r, a2) => (Module._NextCopyFrom = wasmExports.NextCopyFrom)(e, t2, r, a2); Module._ExecInitExpr = (e, t2) => (Module._ExecInitExpr = wasmExports.ExecInitExpr)(e, t2); Module._tolower = (e) => (Module._tolower = wasmExports.tolower)(e); Module._PushCopiedSnapshot = (e) => (Module._PushCopiedSnapshot = wasmExports.PushCopiedSnapshot)(e); Module._UpdateActiveSnapshotCommandId = () => (Module._UpdateActiveSnapshotCommandId = wasmExports.UpdateActiveSnapshotCommandId)(); Module._CreateQueryDesc = (e, t2, r, a2, s4, o4, n3, _3) => (Module._CreateQueryDesc = wasmExports.CreateQueryDesc)(e, t2, r, a2, s4, o4, n3, _3); Module._ExecutorStart = (e, t2) => (Module._ExecutorStart = wasmExports.ExecutorStart)(e, t2); Module._ExecutorFinish = (e) => (Module._ExecutorFinish = wasmExports.ExecutorFinish)(e); Module._ExecutorEnd = (e) => (Module._ExecutorEnd = wasmExports.ExecutorEnd)(e); Module._FreeQueryDesc = (e) => (Module._FreeQueryDesc = wasmExports.FreeQueryDesc)(e); Module._pg_server_to_any = (e, t2, r) => (Module._pg_server_to_any = wasmExports.pg_server_to_any)(e, t2, r); Module._ExecutorRun = (e, t2, r, a2) => (Module._ExecutorRun = wasmExports.ExecutorRun)(e, t2, r, a2); Module._CreateTableAsRelExists = (e) => (Module._CreateTableAsRelExists = wasmExports.CreateTableAsRelExists)(e); Module._DefineRelation = (e, t2, r, a2, s4, o4) => (Module._DefineRelation = wasmExports.DefineRelation)(e, t2, r, a2, s4, o4); Module._oidin = (e) => (Module._oidin = wasmExports.oidin)(e); Module._GetCommandTagName = (e) => (Module._GetCommandTagName = wasmExports.GetCommandTagName)(e); Module._ExplainBeginOutput = (e) => (Module._ExplainBeginOutput = wasmExports.ExplainBeginOutput)(e); Module._NewExplainState = () => (Module._NewExplainState = wasmExports.NewExplainState)(); Module._ExplainEndOutput = (e) => (Module._ExplainEndOutput = wasmExports.ExplainEndOutput)(e); Module._ExplainPrintPlan = (e, t2) => (Module._ExplainPrintPlan = wasmExports.ExplainPrintPlan)(e, t2); Module._ExplainPrintTriggers = (e, t2) => (Module._ExplainPrintTriggers = wasmExports.ExplainPrintTriggers)(e, t2); Module._ExplainPrintJITSummary = (e, t2) => (Module._ExplainPrintJITSummary = wasmExports.ExplainPrintJITSummary)(e, t2); Module._InstrEndLoop = (e) => (Module._InstrEndLoop = wasmExports.InstrEndLoop)(e); Module._ExplainPropertyInteger = (e, t2, r, a2) => (Module._ExplainPropertyInteger = wasmExports.ExplainPropertyInteger)(e, t2, r, a2); Module._ExplainQueryText = (e, t2) => (Module._ExplainQueryText = wasmExports.ExplainQueryText)(e, t2); Module._ExplainPropertyText = (e, t2, r) => (Module._ExplainPropertyText = wasmExports.ExplainPropertyText)(e, t2, r); Module._ExplainQueryParameters = (e, t2, r) => (Module._ExplainQueryParameters = wasmExports.ExplainQueryParameters)(e, t2, r); Module._get_func_namespace = (e) => (Module._get_func_namespace = wasmExports.get_func_namespace)(e); Module._get_rel_type_id = (e) => (Module._get_rel_type_id = wasmExports.get_rel_type_id)(e); Module._set_config_option = (e, t2, r, a2, s4, o4, n3, _3) => (Module._set_config_option = wasmExports.set_config_option)(e, t2, r, a2, s4, o4, n3, _3); Module._pg_any_to_server = (e, t2, r) => (Module._pg_any_to_server = wasmExports.pg_any_to_server)(e, t2, r); Module._DirectFunctionCall4Coll = (e, t2, r, a2, s4, o4) => (Module._DirectFunctionCall4Coll = wasmExports.DirectFunctionCall4Coll)(e, t2, r, a2, s4, o4); Module._list_delete_cell = (e, t2) => (Module._list_delete_cell = wasmExports.list_delete_cell)(e, t2); Module._GetForeignDataWrapper = (e) => (Module._GetForeignDataWrapper = wasmExports.GetForeignDataWrapper)(e); Module._CreateExprContext = (e) => (Module._CreateExprContext = wasmExports.CreateExprContext)(e); Module._EnsurePortalSnapshotExists = () => (Module._EnsurePortalSnapshotExists = wasmExports.EnsurePortalSnapshotExists)(); Module._CheckIndexCompatible = (e, t2, r, a2) => (Module._CheckIndexCompatible = wasmExports.CheckIndexCompatible)(e, t2, r, a2); Module._pgstat_count_truncate = (e) => (Module._pgstat_count_truncate = wasmExports.pgstat_count_truncate)(e); Module._SPI_connect = () => (Module._SPI_connect = wasmExports.SPI_connect)(); Module._SPI_exec = (e, t2) => (Module._SPI_exec = wasmExports.SPI_exec)(e, t2); Module._SPI_execute = (e, t2, r) => (Module._SPI_execute = wasmExports.SPI_execute)(e, t2, r); Module._SPI_getvalue = (e, t2, r) => (Module._SPI_getvalue = wasmExports.SPI_getvalue)(e, t2, r); Module._generate_operator_clause = (e, t2, r, a2, s4, o4) => (Module._generate_operator_clause = wasmExports.generate_operator_clause)(e, t2, r, a2, s4, o4); Module._SPI_finish = () => (Module._SPI_finish = wasmExports.SPI_finish)(); Module._CreateTransientRelDestReceiver = (e) => (Module._CreateTransientRelDestReceiver = wasmExports.CreateTransientRelDestReceiver)(e); Module._MemoryContextSetIdentifier = (e, t2) => (Module._MemoryContextSetIdentifier = wasmExports.MemoryContextSetIdentifier)(e, t2); Module._checkExprHasSubLink = (e) => (Module._checkExprHasSubLink = wasmExports.checkExprHasSubLink)(e); Module._SetTuplestoreDestReceiverParams = (e, t2, r, a2, s4, o4) => (Module._SetTuplestoreDestReceiverParams = wasmExports.SetTuplestoreDestReceiverParams)(e, t2, r, a2, s4, o4); Module._tuplestore_rescan = (e) => (Module._tuplestore_rescan = wasmExports.tuplestore_rescan)(e); Module._MemoryContextDeleteChildren = (e) => (Module._MemoryContextDeleteChildren = wasmExports.MemoryContextDeleteChildren)(e); Module._ReleaseCachedPlan = (e, t2) => (Module._ReleaseCachedPlan = wasmExports.ReleaseCachedPlan)(e, t2); Module._nextval = (e) => (Module._nextval = wasmExports.nextval)(e); Module._textToQualifiedNameList = (e) => (Module._textToQualifiedNameList = wasmExports.textToQualifiedNameList)(e); Module._tuplestore_gettupleslot = (e, t2, r, a2) => (Module._tuplestore_gettupleslot = wasmExports.tuplestore_gettupleslot)(e, t2, r, a2); Module._list_delete = (e, t2) => (Module._list_delete = wasmExports.list_delete)(e, t2); Module._tuplestore_end = (e) => (Module._tuplestore_end = wasmExports.tuplestore_end)(e); Module._quote_literal_cstr = (e) => (Module._quote_literal_cstr = wasmExports.quote_literal_cstr)(e); Module._contain_mutable_functions = (e) => (Module._contain_mutable_functions = wasmExports.contain_mutable_functions)(e); Module._ExecuteTruncateGuts = (e, t2, r, a2, s4, o4) => (Module._ExecuteTruncateGuts = wasmExports.ExecuteTruncateGuts)(e, t2, r, a2, s4, o4); Module._bms_make_singleton = (e) => (Module._bms_make_singleton = wasmExports.bms_make_singleton)(e); Module._tuplestore_puttupleslot = (e, t2) => (Module._tuplestore_puttupleslot = wasmExports.tuplestore_puttupleslot)(e, t2); Module._tuplestore_begin_heap = (e, t2, r) => (Module._tuplestore_begin_heap = wasmExports.tuplestore_begin_heap)(e, t2, r); Module._ExecForceStoreHeapTuple = (e, t2, r) => (Module._ExecForceStoreHeapTuple = wasmExports.ExecForceStoreHeapTuple)(e, t2, r); Module._strtod = (e, t2) => (Module._strtod = wasmExports.strtod)(e, t2); Module._plain_crypt_verify = (e, t2, r, a2) => (Module._plain_crypt_verify = wasmExports.plain_crypt_verify)(e, t2, r, a2); Module._ProcessConfigFile = (e) => (Module._ProcessConfigFile = wasmExports.ProcessConfigFile)(e); Module._ExecReScan = (e) => (Module._ExecReScan = wasmExports.ExecReScan)(e); Module._ExecAsyncResponse = (e) => (Module._ExecAsyncResponse = wasmExports.ExecAsyncResponse)(e); Module._ExecAsyncRequestDone = (e, t2) => (Module._ExecAsyncRequestDone = wasmExports.ExecAsyncRequestDone)(e, t2); Module._ExecAsyncRequestPending = (e) => (Module._ExecAsyncRequestPending = wasmExports.ExecAsyncRequestPending)(e); Module._ExprEvalPushStep = (e, t2) => (Module._ExprEvalPushStep = wasmExports.ExprEvalPushStep)(e, t2); Module._ExecInitExprWithParams = (e, t2) => (Module._ExecInitExprWithParams = wasmExports.ExecInitExprWithParams)(e, t2); Module._ExecInitExprList = (e, t2) => (Module._ExecInitExprList = wasmExports.ExecInitExprList)(e, t2); Module._MakeExpandedObjectReadOnlyInternal = (e) => (Module._MakeExpandedObjectReadOnlyInternal = wasmExports.MakeExpandedObjectReadOnlyInternal)(e); Module._tuplesort_puttupleslot = (e, t2) => (Module._tuplesort_puttupleslot = wasmExports.tuplesort_puttupleslot)(e, t2); Module._ArrayGetNItems = (e, t2) => (Module._ArrayGetNItems = wasmExports.ArrayGetNItems)(e, t2); Module._expanded_record_fetch_tupdesc = (e) => (Module._expanded_record_fetch_tupdesc = wasmExports.expanded_record_fetch_tupdesc)(e); Module._expanded_record_fetch_field = (e, t2, r) => (Module._expanded_record_fetch_field = wasmExports.expanded_record_fetch_field)(e, t2, r); Module._JsonbValueToJsonb = (e) => (Module._JsonbValueToJsonb = wasmExports.JsonbValueToJsonb)(e); Module._boolout = (e) => (Module._boolout = wasmExports.boolout)(e); Module._lookup_rowtype_tupdesc_domain = (e, t2, r) => (Module._lookup_rowtype_tupdesc_domain = wasmExports.lookup_rowtype_tupdesc_domain)(e, t2, r); Module._MemoryContextGetParent = (e) => (Module._MemoryContextGetParent = wasmExports.MemoryContextGetParent)(e); Module._DeleteExpandedObject = (e) => (Module._DeleteExpandedObject = wasmExports.DeleteExpandedObject)(e); Module._ExecFindJunkAttributeInTlist = (e, t2) => (Module._ExecFindJunkAttributeInTlist = wasmExports.ExecFindJunkAttributeInTlist)(e, t2); Module._standard_ExecutorStart = (e, t2) => (Module._standard_ExecutorStart = wasmExports.standard_ExecutorStart)(e, t2); Module._standard_ExecutorRun = (e, t2, r, a2) => (Module._standard_ExecutorRun = wasmExports.standard_ExecutorRun)(e, t2, r, a2); Module._standard_ExecutorFinish = (e) => (Module._standard_ExecutorFinish = wasmExports.standard_ExecutorFinish)(e); Module._standard_ExecutorEnd = (e) => (Module._standard_ExecutorEnd = wasmExports.standard_ExecutorEnd)(e); Module._InstrAlloc = (e, t2, r) => (Module._InstrAlloc = wasmExports.InstrAlloc)(e, t2, r); Module._get_typlenbyval = (e, t2, r) => (Module._get_typlenbyval = wasmExports.get_typlenbyval)(e, t2, r); Module._InputFunctionCall = (e, t2, r, a2) => (Module._InputFunctionCall = wasmExports.InputFunctionCall)(e, t2, r, a2); Module._FreeExprContext = (e, t2) => (Module._FreeExprContext = wasmExports.FreeExprContext)(e, t2); Module._ExecOpenScanRelation = (e, t2, r) => (Module._ExecOpenScanRelation = wasmExports.ExecOpenScanRelation)(e, t2, r); Module._bms_intersect = (e, t2) => (Module._bms_intersect = wasmExports.bms_intersect)(e, t2); Module._ExecGetReturningSlot = (e, t2) => (Module._ExecGetReturningSlot = wasmExports.ExecGetReturningSlot)(e, t2); Module._ExecGetResultRelCheckAsUser = (e, t2) => (Module._ExecGetResultRelCheckAsUser = wasmExports.ExecGetResultRelCheckAsUser)(e, t2); Module._get_call_expr_argtype = (e, t2) => (Module._get_call_expr_argtype = wasmExports.get_call_expr_argtype)(e, t2); Module._tuplestore_clear = (e) => (Module._tuplestore_clear = wasmExports.tuplestore_clear)(e); Module._InstrUpdateTupleCount = (e, t2) => (Module._InstrUpdateTupleCount = wasmExports.InstrUpdateTupleCount)(e, t2); Module._tuplesort_begin_heap = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._tuplesort_begin_heap = wasmExports.tuplesort_begin_heap)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._tuplesort_gettupleslot = (e, t2, r, a2, s4) => (Module._tuplesort_gettupleslot = wasmExports.tuplesort_gettupleslot)(e, t2, r, a2, s4); Module._AddWaitEventToSet = (e, t2, r, a2, s4) => (Module._AddWaitEventToSet = wasmExports.AddWaitEventToSet)(e, t2, r, a2, s4); Module._GetNumRegisteredWaitEvents = (e) => (Module._GetNumRegisteredWaitEvents = wasmExports.GetNumRegisteredWaitEvents)(e); Module._get_attstatsslot = (e, t2, r, a2, s4) => (Module._get_attstatsslot = wasmExports.get_attstatsslot)(e, t2, r, a2, s4); Module._free_attstatsslot = (e) => (Module._free_attstatsslot = wasmExports.free_attstatsslot)(e); Module._tuplesort_reset = (e) => (Module._tuplesort_reset = wasmExports.tuplesort_reset)(e); Module._pairingheap_first = (e) => (Module._pairingheap_first = wasmExports.pairingheap_first)(e); Module._bms_nonempty_difference = (e, t2) => (Module._bms_nonempty_difference = wasmExports.bms_nonempty_difference)(e, t2); Module._SPI_connect_ext = (e) => (Module._SPI_connect_ext = wasmExports.SPI_connect_ext)(e); Module._SPI_commit = () => (Module._SPI_commit = wasmExports.SPI_commit)(); Module._CopyErrorData = () => (Module._CopyErrorData = wasmExports.CopyErrorData)(); Module._ReThrowError = (e) => (Module._ReThrowError = wasmExports.ReThrowError)(e); Module._SPI_commit_and_chain = () => (Module._SPI_commit_and_chain = wasmExports.SPI_commit_and_chain)(); Module._SPI_rollback = () => (Module._SPI_rollback = wasmExports.SPI_rollback)(); Module._SPI_rollback_and_chain = () => (Module._SPI_rollback_and_chain = wasmExports.SPI_rollback_and_chain)(); Module._SPI_freetuptable = (e) => (Module._SPI_freetuptable = wasmExports.SPI_freetuptable)(e); Module._SPI_execute_extended = (e, t2) => (Module._SPI_execute_extended = wasmExports.SPI_execute_extended)(e, t2); Module._SPI_execute_plan = (e, t2, r, a2, s4) => (Module._SPI_execute_plan = wasmExports.SPI_execute_plan)(e, t2, r, a2, s4); Module._SPI_execp = (e, t2, r, a2) => (Module._SPI_execp = wasmExports.SPI_execp)(e, t2, r, a2); Module._SPI_execute_plan_extended = (e, t2) => (Module._SPI_execute_plan_extended = wasmExports.SPI_execute_plan_extended)(e, t2); Module._SPI_execute_plan_with_paramlist = (e, t2, r, a2) => (Module._SPI_execute_plan_with_paramlist = wasmExports.SPI_execute_plan_with_paramlist)(e, t2, r, a2); Module._SPI_prepare = (e, t2, r) => (Module._SPI_prepare = wasmExports.SPI_prepare)(e, t2, r); Module._SPI_prepare_extended = (e, t2) => (Module._SPI_prepare_extended = wasmExports.SPI_prepare_extended)(e, t2); Module._SPI_keepplan = (e) => (Module._SPI_keepplan = wasmExports.SPI_keepplan)(e); Module._SPI_freeplan = (e) => (Module._SPI_freeplan = wasmExports.SPI_freeplan)(e); Module._SPI_copytuple = (e) => (Module._SPI_copytuple = wasmExports.SPI_copytuple)(e); Module._SPI_returntuple = (e, t2) => (Module._SPI_returntuple = wasmExports.SPI_returntuple)(e, t2); Module._SPI_fnumber = (e, t2) => (Module._SPI_fnumber = wasmExports.SPI_fnumber)(e, t2); Module._SPI_fname = (e, t2) => (Module._SPI_fname = wasmExports.SPI_fname)(e, t2); Module._SPI_getbinval = (e, t2, r, a2) => (Module._SPI_getbinval = wasmExports.SPI_getbinval)(e, t2, r, a2); Module._SPI_gettype = (e, t2) => (Module._SPI_gettype = wasmExports.SPI_gettype)(e, t2); Module._SPI_gettypeid = (e, t2) => (Module._SPI_gettypeid = wasmExports.SPI_gettypeid)(e, t2); Module._SPI_getrelname = (e) => (Module._SPI_getrelname = wasmExports.SPI_getrelname)(e); Module._SPI_palloc = (e) => (Module._SPI_palloc = wasmExports.SPI_palloc)(e); Module._SPI_datumTransfer = (e, t2, r) => (Module._SPI_datumTransfer = wasmExports.SPI_datumTransfer)(e, t2, r); Module._datumTransfer = (e, t2, r) => (Module._datumTransfer = wasmExports.datumTransfer)(e, t2, r); Module._SPI_cursor_open_with_paramlist = (e, t2, r, a2) => (Module._SPI_cursor_open_with_paramlist = wasmExports.SPI_cursor_open_with_paramlist)(e, t2, r, a2); Module._SPI_cursor_parse_open = (e, t2, r) => (Module._SPI_cursor_parse_open = wasmExports.SPI_cursor_parse_open)(e, t2, r); Module._SPI_cursor_find = (e) => (Module._SPI_cursor_find = wasmExports.SPI_cursor_find)(e); Module._SPI_cursor_fetch = (e, t2, r) => (Module._SPI_cursor_fetch = wasmExports.SPI_cursor_fetch)(e, t2, r); Module._SPI_scroll_cursor_fetch = (e, t2, r) => (Module._SPI_scroll_cursor_fetch = wasmExports.SPI_scroll_cursor_fetch)(e, t2, r); Module._SPI_scroll_cursor_move = (e, t2, r) => (Module._SPI_scroll_cursor_move = wasmExports.SPI_scroll_cursor_move)(e, t2, r); Module._SPI_cursor_close = (e) => (Module._SPI_cursor_close = wasmExports.SPI_cursor_close)(e); Module._SPI_plan_is_valid = (e) => (Module._SPI_plan_is_valid = wasmExports.SPI_plan_is_valid)(e); Module._SPI_result_code_string = (e) => (Module._SPI_result_code_string = wasmExports.SPI_result_code_string)(e); Module._SPI_plan_get_plan_sources = (e) => (Module._SPI_plan_get_plan_sources = wasmExports.SPI_plan_get_plan_sources)(e); Module._SPI_plan_get_cached_plan = (e) => (Module._SPI_plan_get_cached_plan = wasmExports.SPI_plan_get_cached_plan)(e); Module._SPI_register_relation = (e) => (Module._SPI_register_relation = wasmExports.SPI_register_relation)(e); Module._create_queryEnv = () => (Module._create_queryEnv = wasmExports.create_queryEnv)(); Module._register_ENR = (e, t2) => (Module._register_ENR = wasmExports.register_ENR)(e, t2); Module._SPI_register_trigger_data = (e) => (Module._SPI_register_trigger_data = wasmExports.SPI_register_trigger_data)(e); Module._tuplestore_tuple_count = (e) => (Module._tuplestore_tuple_count = wasmExports.tuplestore_tuple_count)(e); Module._GetUserMapping = (e, t2) => (Module._GetUserMapping = wasmExports.GetUserMapping)(e, t2); Module._GetForeignTable = (e) => (Module._GetForeignTable = wasmExports.GetForeignTable)(e); Module._GetForeignColumnOptions = (e, t2) => (Module._GetForeignColumnOptions = wasmExports.GetForeignColumnOptions)(e, t2); Module._initClosestMatch = (e, t2, r) => (Module._initClosestMatch = wasmExports.initClosestMatch)(e, t2, r); Module._updateClosestMatch = (e, t2) => (Module._updateClosestMatch = wasmExports.updateClosestMatch)(e, t2); Module._getClosestMatch = (e) => (Module._getClosestMatch = wasmExports.getClosestMatch)(e); Module._GetExistingLocalJoinPath = (e) => (Module._GetExistingLocalJoinPath = wasmExports.GetExistingLocalJoinPath)(e); Module._bloom_create = (e, t2, r) => (Module._bloom_create = wasmExports.bloom_create)(e, t2, r); Module._bloom_free = (e) => (Module._bloom_free = wasmExports.bloom_free)(e); Module._bloom_add_element = (e, t2, r) => (Module._bloom_add_element = wasmExports.bloom_add_element)(e, t2, r); Module._bloom_lacks_element = (e, t2, r) => (Module._bloom_lacks_element = wasmExports.bloom_lacks_element)(e, t2, r); Module._bloom_prop_bits_set = (e) => (Module._bloom_prop_bits_set = wasmExports.bloom_prop_bits_set)(e); Module._socket = (e, t2, r) => (Module._socket = wasmExports.socket)(e, t2, r); Module._connect = (e, t2, r) => (Module._connect = wasmExports.connect)(e, t2, r); Module._send = (e, t2, r, a2) => (Module._send = wasmExports.send)(e, t2, r, a2); Module._recv = (e, t2, r, a2) => (Module._recv = wasmExports.recv)(e, t2, r, a2); Module._be_lo_unlink = (e) => (Module._be_lo_unlink = wasmExports.be_lo_unlink)(e); Module._set_read_write_cbs = (e, t2) => (Module._set_read_write_cbs = wasmExports.set_read_write_cbs)(e, t2); Module._setsockopt = (e, t2, r, a2, s4) => (Module._setsockopt = wasmExports.setsockopt)(e, t2, r, a2, s4); Module._getsockopt = (e, t2, r, a2, s4) => (Module._getsockopt = wasmExports.getsockopt)(e, t2, r, a2, s4); Module._getsockname = (e, t2, r) => (Module._getsockname = wasmExports.getsockname)(e, t2, r); Module._poll = (e, t2, r) => (Module._poll = wasmExports.poll)(e, t2, r); Module._pg_mb2wchar_with_len = (e, t2, r) => (Module._pg_mb2wchar_with_len = wasmExports.pg_mb2wchar_with_len)(e, t2, r); Module._pg_regcomp = (e, t2, r, a2, s4) => (Module._pg_regcomp = wasmExports.pg_regcomp)(e, t2, r, a2, s4); Module._pg_regerror = (e, t2, r, a2) => (Module._pg_regerror = wasmExports.pg_regerror)(e, t2, r, a2); Module._strcat = (e, t2) => (Module._strcat = wasmExports.strcat)(e, t2); Module._pq_sendtext = (e, t2, r) => (Module._pq_sendtext = wasmExports.pq_sendtext)(e, t2, r); Module._pq_sendfloat4 = (e, t2) => (Module._pq_sendfloat4 = wasmExports.pq_sendfloat4)(e, t2); Module._pq_sendfloat8 = (e, t2) => (Module._pq_sendfloat8 = wasmExports.pq_sendfloat8)(e, t2); Module._pq_begintypsend = (e) => (Module._pq_begintypsend = wasmExports.pq_begintypsend)(e); Module._pq_endtypsend = (e) => (Module._pq_endtypsend = wasmExports.pq_endtypsend)(e); Module._pq_getmsgfloat4 = (e) => (Module._pq_getmsgfloat4 = wasmExports.pq_getmsgfloat4)(e); Module._pq_getmsgfloat8 = (e) => (Module._pq_getmsgfloat8 = wasmExports.pq_getmsgfloat8)(e); Module._pq_getmsgtext = (e, t2, r) => (Module._pq_getmsgtext = wasmExports.pq_getmsgtext)(e, t2, r); Module._pg_strtoint32 = (e) => (Module._pg_strtoint32 = wasmExports.pg_strtoint32)(e); Module._bms_membership = (e) => (Module._bms_membership = wasmExports.bms_membership)(e); Module._list_make5_impl = (e, t2, r, a2, s4, o4) => (Module._list_make5_impl = wasmExports.list_make5_impl)(e, t2, r, a2, s4, o4); Module._list_insert_nth = (e, t2, r) => (Module._list_insert_nth = wasmExports.list_insert_nth)(e, t2, r); Module._list_member_ptr = (e, t2) => (Module._list_member_ptr = wasmExports.list_member_ptr)(e, t2); Module._list_append_unique_ptr = (e, t2) => (Module._list_append_unique_ptr = wasmExports.list_append_unique_ptr)(e, t2); Module._make_opclause = (e, t2, r, a2, s4, o4, n3) => (Module._make_opclause = wasmExports.make_opclause)(e, t2, r, a2, s4, o4, n3); Module._exprIsLengthCoercion = (e, t2) => (Module._exprIsLengthCoercion = wasmExports.exprIsLengthCoercion)(e, t2); Module._fix_opfuncids = (e) => (Module._fix_opfuncids = wasmExports.fix_opfuncids)(e); Module._CleanQuerytext = (e, t2, r) => (Module._CleanQuerytext = wasmExports.CleanQuerytext)(e, t2, r); Module._EnableQueryId = () => (Module._EnableQueryId = wasmExports.EnableQueryId)(); Module._find_base_rel = (e, t2) => (Module._find_base_rel = wasmExports.find_base_rel)(e, t2); Module._add_path = (e, t2) => (Module._add_path = wasmExports.add_path)(e, t2); Module._pathkeys_contained_in = (e, t2) => (Module._pathkeys_contained_in = wasmExports.pathkeys_contained_in)(e, t2); Module._create_sort_path = (e, t2, r, a2, s4) => (Module._create_sort_path = wasmExports.create_sort_path)(e, t2, r, a2, s4); Module._set_baserel_size_estimates = (e, t2) => (Module._set_baserel_size_estimates = wasmExports.set_baserel_size_estimates)(e, t2); Module._clauselist_selectivity = (e, t2, r, a2, s4) => (Module._clauselist_selectivity = wasmExports.clauselist_selectivity)(e, t2, r, a2, s4); Module._get_tablespace_page_costs = (e, t2, r) => (Module._get_tablespace_page_costs = wasmExports.get_tablespace_page_costs)(e, t2, r); Module._cost_qual_eval = (e, t2, r) => (Module._cost_qual_eval = wasmExports.cost_qual_eval)(e, t2, r); Module._estimate_num_groups = (e, t2, r, a2, s4) => (Module._estimate_num_groups = wasmExports.estimate_num_groups)(e, t2, r, a2, s4); Module._cost_sort = (e, t2, r, a2, s4, o4, n3, _3, l3) => (Module._cost_sort = wasmExports.cost_sort)(e, t2, r, a2, s4, o4, n3, _3, l3); Module._get_sortgrouplist_exprs = (e, t2) => (Module._get_sortgrouplist_exprs = wasmExports.get_sortgrouplist_exprs)(e, t2); Module._make_restrictinfo = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._make_restrictinfo = wasmExports.make_restrictinfo)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._generate_implied_equalities_for_column = (e, t2, r, a2, s4) => (Module._generate_implied_equalities_for_column = wasmExports.generate_implied_equalities_for_column)(e, t2, r, a2, s4); Module._eclass_useful_for_merging = (e, t2, r) => (Module._eclass_useful_for_merging = wasmExports.eclass_useful_for_merging)(e, t2, r); Module._join_clause_is_movable_to = (e, t2) => (Module._join_clause_is_movable_to = wasmExports.join_clause_is_movable_to)(e, t2); Module._get_plan_rowmark = (e, t2) => (Module._get_plan_rowmark = wasmExports.get_plan_rowmark)(e, t2); Module._update_mergeclause_eclasses = (e, t2) => (Module._update_mergeclause_eclasses = wasmExports.update_mergeclause_eclasses)(e, t2); Module._find_join_rel = (e, t2) => (Module._find_join_rel = wasmExports.find_join_rel)(e, t2); Module._make_canonical_pathkey = (e, t2, r, a2, s4) => (Module._make_canonical_pathkey = wasmExports.make_canonical_pathkey)(e, t2, r, a2, s4); Module._get_sortgroupref_clause_noerr = (e, t2) => (Module._get_sortgroupref_clause_noerr = wasmExports.get_sortgroupref_clause_noerr)(e, t2); Module._extract_actual_clauses = (e, t2) => (Module._extract_actual_clauses = wasmExports.extract_actual_clauses)(e, t2); Module._change_plan_targetlist = (e, t2, r) => (Module._change_plan_targetlist = wasmExports.change_plan_targetlist)(e, t2, r); Module._make_foreignscan = (e, t2, r, a2, s4, o4, n3, _3) => (Module._make_foreignscan = wasmExports.make_foreignscan)(e, t2, r, a2, s4, o4, n3, _3); Module._tlist_member = (e, t2) => (Module._tlist_member = wasmExports.tlist_member)(e, t2); Module._pull_vars_of_level = (e, t2) => (Module._pull_vars_of_level = wasmExports.pull_vars_of_level)(e, t2); Module._IncrementVarSublevelsUp = (e, t2, r) => (Module._IncrementVarSublevelsUp = wasmExports.IncrementVarSublevelsUp)(e, t2, r); Module._standard_planner = (e, t2, r, a2) => (Module._standard_planner = wasmExports.standard_planner)(e, t2, r, a2); Module._get_relids_in_jointree = (e, t2, r) => (Module._get_relids_in_jointree = wasmExports.get_relids_in_jointree)(e, t2, r); Module._add_new_columns_to_pathtarget = (e, t2) => (Module._add_new_columns_to_pathtarget = wasmExports.add_new_columns_to_pathtarget)(e, t2); Module._get_agg_clause_costs = (e, t2, r) => (Module._get_agg_clause_costs = wasmExports.get_agg_clause_costs)(e, t2, r); Module._grouping_is_sortable = (e) => (Module._grouping_is_sortable = wasmExports.grouping_is_sortable)(e); Module._copy_pathtarget = (e) => (Module._copy_pathtarget = wasmExports.copy_pathtarget)(e); Module._create_projection_path = (e, t2, r, a2) => (Module._create_projection_path = wasmExports.create_projection_path)(e, t2, r, a2); Module._GetSysCacheHashValue = (e, t2, r, a2, s4) => (Module._GetSysCacheHashValue = wasmExports.GetSysCacheHashValue)(e, t2, r, a2, s4); Module._get_translated_update_targetlist = (e, t2, r, a2) => (Module._get_translated_update_targetlist = wasmExports.get_translated_update_targetlist)(e, t2, r, a2); Module._add_row_identity_var = (e, t2, r, a2) => (Module._add_row_identity_var = wasmExports.add_row_identity_var)(e, t2, r, a2); Module._get_rel_all_updated_cols = (e, t2) => (Module._get_rel_all_updated_cols = wasmExports.get_rel_all_updated_cols)(e, t2); Module._get_baserel_parampathinfo = (e, t2, r) => (Module._get_baserel_parampathinfo = wasmExports.get_baserel_parampathinfo)(e, t2, r); Module._create_foreignscan_path = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4) => (Module._create_foreignscan_path = wasmExports.create_foreignscan_path)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4); Module._create_foreign_join_path = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4) => (Module._create_foreign_join_path = wasmExports.create_foreign_join_path)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4); Module._create_foreign_upper_path = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._create_foreign_upper_path = wasmExports.create_foreign_upper_path)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._adjust_limit_rows_costs = (e, t2, r, a2, s4) => (Module._adjust_limit_rows_costs = wasmExports.adjust_limit_rows_costs)(e, t2, r, a2, s4); Module._add_to_flat_tlist = (e, t2) => (Module._add_to_flat_tlist = wasmExports.add_to_flat_tlist)(e, t2); Module._get_fn_expr_argtype = (e, t2) => (Module._get_fn_expr_argtype = wasmExports.get_fn_expr_argtype)(e, t2); Module._on_shmem_exit = (e, t2) => (Module._on_shmem_exit = wasmExports.on_shmem_exit)(e, t2); Module._SignalHandlerForConfigReload = (e) => (Module._SignalHandlerForConfigReload = wasmExports.SignalHandlerForConfigReload)(e); Module._SignalHandlerForShutdownRequest = (e) => (Module._SignalHandlerForShutdownRequest = wasmExports.SignalHandlerForShutdownRequest)(e); Module._procsignal_sigusr1_handler = (e) => (Module._procsignal_sigusr1_handler = wasmExports.procsignal_sigusr1_handler)(e); Module._RegisterBackgroundWorker = (e) => (Module._RegisterBackgroundWorker = wasmExports.RegisterBackgroundWorker)(e); Module._WaitForBackgroundWorkerStartup = (e, t2) => (Module._WaitForBackgroundWorkerStartup = wasmExports.WaitForBackgroundWorkerStartup)(e, t2); Module._GetConfigOption = (e, t2, r) => (Module._GetConfigOption = wasmExports.GetConfigOption)(e, t2, r); Module._toupper = (e) => (Module._toupper = wasmExports.toupper)(e); Module._pg_reg_getinitialstate = (e) => (Module._pg_reg_getinitialstate = wasmExports.pg_reg_getinitialstate)(e); Module._pg_reg_getfinalstate = (e) => (Module._pg_reg_getfinalstate = wasmExports.pg_reg_getfinalstate)(e); Module._pg_reg_getnumoutarcs = (e, t2) => (Module._pg_reg_getnumoutarcs = wasmExports.pg_reg_getnumoutarcs)(e, t2); Module._pg_reg_getoutarcs = (e, t2, r, a2) => (Module._pg_reg_getoutarcs = wasmExports.pg_reg_getoutarcs)(e, t2, r, a2); Module._pg_reg_getnumcolors = (e) => (Module._pg_reg_getnumcolors = wasmExports.pg_reg_getnumcolors)(e); Module._pg_reg_colorisbegin = (e, t2) => (Module._pg_reg_colorisbegin = wasmExports.pg_reg_colorisbegin)(e, t2); Module._pg_reg_colorisend = (e, t2) => (Module._pg_reg_colorisend = wasmExports.pg_reg_colorisend)(e, t2); Module._pg_reg_getnumcharacters = (e, t2) => (Module._pg_reg_getnumcharacters = wasmExports.pg_reg_getnumcharacters)(e, t2); Module._pg_reg_getcharacters = (e, t2, r, a2) => (Module._pg_reg_getcharacters = wasmExports.pg_reg_getcharacters)(e, t2, r, a2); Module._OutputPluginPrepareWrite = (e, t2) => (Module._OutputPluginPrepareWrite = wasmExports.OutputPluginPrepareWrite)(e, t2); Module._OutputPluginWrite = (e, t2) => (Module._OutputPluginWrite = wasmExports.OutputPluginWrite)(e, t2); Module._array_contains_nulls = (e) => (Module._array_contains_nulls = wasmExports.array_contains_nulls)(e); Module._hash_seq_term = (e) => (Module._hash_seq_term = wasmExports.hash_seq_term)(e); Module._FreeErrorData = (e) => (Module._FreeErrorData = wasmExports.FreeErrorData)(e); Module._RelidByRelfilenumber = (e, t2) => (Module._RelidByRelfilenumber = wasmExports.RelidByRelfilenumber)(e, t2); Module._WaitLatchOrSocket = (e, t2, r, a2, s4) => (Module._WaitLatchOrSocket = wasmExports.WaitLatchOrSocket)(e, t2, r, a2, s4); Module._get_row_security_policies = (e, t2, r, a2, s4, o4, n3) => (Module._get_row_security_policies = wasmExports.get_row_security_policies)(e, t2, r, a2, s4, o4, n3); Module._hash_estimate_size = (e, t2) => (Module._hash_estimate_size = wasmExports.hash_estimate_size)(e, t2); Module._ShmemInitHash = (e, t2, r, a2, s4) => (Module._ShmemInitHash = wasmExports.ShmemInitHash)(e, t2, r, a2, s4); Module._LockBufHdr = (e) => (Module._LockBufHdr = wasmExports.LockBufHdr)(e); Module._EvictUnpinnedBuffer = (e) => (Module._EvictUnpinnedBuffer = wasmExports.EvictUnpinnedBuffer)(e); Module._have_free_buffer = () => (Module._have_free_buffer = wasmExports.have_free_buffer)(); Module._copy_file = (e, t2) => (Module._copy_file = wasmExports.copy_file)(e, t2); Module._AcquireExternalFD = () => (Module._AcquireExternalFD = wasmExports.AcquireExternalFD)(); Module._GetNamedDSMSegment = (e, t2, r, a2) => (Module._GetNamedDSMSegment = wasmExports.GetNamedDSMSegment)(e, t2, r, a2); Module._RequestAddinShmemSpace = (e) => (Module._RequestAddinShmemSpace = wasmExports.RequestAddinShmemSpace)(e); Module._GetRunningTransactionData = () => (Module._GetRunningTransactionData = wasmExports.GetRunningTransactionData)(); Module._BackendXidGetPid = (e) => (Module._BackendXidGetPid = wasmExports.BackendXidGetPid)(e); Module._LWLockRegisterTranche = (e, t2) => (Module._LWLockRegisterTranche = wasmExports.LWLockRegisterTranche)(e, t2); Module._GetNamedLWLockTranche = (e) => (Module._GetNamedLWLockTranche = wasmExports.GetNamedLWLockTranche)(e); Module._LWLockNewTrancheId = () => (Module._LWLockNewTrancheId = wasmExports.LWLockNewTrancheId)(); Module._RequestNamedLWLockTranche = (e, t2) => (Module._RequestNamedLWLockTranche = wasmExports.RequestNamedLWLockTranche)(e, t2); Module._standard_ProcessUtility = (e, t2, r, a2, s4, o4, n3, _3) => (Module._standard_ProcessUtility = wasmExports.standard_ProcessUtility)(e, t2, r, a2, s4, o4, n3, _3); Module._lookup_ts_dictionary_cache = (e) => (Module._lookup_ts_dictionary_cache = wasmExports.lookup_ts_dictionary_cache)(e); Module._get_tsearch_config_filename = (e, t2) => (Module._get_tsearch_config_filename = wasmExports.get_tsearch_config_filename)(e, t2); Module._lowerstr = (e) => (Module._lowerstr = wasmExports.lowerstr)(e); Module._readstoplist = (e, t2, r) => (Module._readstoplist = wasmExports.readstoplist)(e, t2, r); Module._lowerstr_with_len = (e, t2) => (Module._lowerstr_with_len = wasmExports.lowerstr_with_len)(e, t2); Module._searchstoplist = (e, t2) => (Module._searchstoplist = wasmExports.searchstoplist)(e, t2); Module._tsearch_readline_begin = (e, t2) => (Module._tsearch_readline_begin = wasmExports.tsearch_readline_begin)(e, t2); Module._tsearch_readline = (e) => (Module._tsearch_readline = wasmExports.tsearch_readline)(e); Module._t_isspace = (e) => (Module._t_isspace = wasmExports.t_isspace)(e); Module._tsearch_readline_end = (e) => (Module._tsearch_readline_end = wasmExports.tsearch_readline_end)(e); Module._stringToQualifiedNameList = (e, t2) => (Module._stringToQualifiedNameList = wasmExports.stringToQualifiedNameList)(e, t2); Module._t_isdigit = (e) => (Module._t_isdigit = wasmExports.t_isdigit)(e); Module._t_isalnum = (e) => (Module._t_isalnum = wasmExports.t_isalnum)(e); Module._get_restriction_variable = (e, t2, r, a2, s4, o4) => (Module._get_restriction_variable = wasmExports.get_restriction_variable)(e, t2, r, a2, s4, o4); Module._MemoryContextAllocHuge = (e, t2) => (Module._MemoryContextAllocHuge = wasmExports.MemoryContextAllocHuge)(e, t2); Module._WaitEventExtensionNew = (e) => (Module._WaitEventExtensionNew = wasmExports.WaitEventExtensionNew)(e); Module._expand_array = (e, t2, r) => (Module._expand_array = wasmExports.expand_array)(e, t2, r); Module._arraycontsel = (e) => (Module._arraycontsel = wasmExports.arraycontsel)(e); Module._arraycontjoinsel = (e) => (Module._arraycontjoinsel = wasmExports.arraycontjoinsel)(e); Module._initArrayResult = (e, t2, r) => (Module._initArrayResult = wasmExports.initArrayResult)(e, t2, r); Module._array_create_iterator = (e, t2, r) => (Module._array_create_iterator = wasmExports.array_create_iterator)(e, t2, r); Module._array_iterate = (e, t2, r) => (Module._array_iterate = wasmExports.array_iterate)(e, t2, r); Module._ArrayGetIntegerTypmods = (e, t2) => (Module._ArrayGetIntegerTypmods = wasmExports.ArrayGetIntegerTypmods)(e, t2); Module._boolin = (e) => (Module._boolin = wasmExports.boolin)(e); Module._cash_cmp = (e) => (Module._cash_cmp = wasmExports.cash_cmp)(e); Module._int64_to_numeric = (e) => (Module._int64_to_numeric = wasmExports.int64_to_numeric)(e); Module._numeric_div = (e) => (Module._numeric_div = wasmExports.numeric_div)(e); Module._date_eq = (e) => (Module._date_eq = wasmExports.date_eq)(e); Module._date_lt = (e) => (Module._date_lt = wasmExports.date_lt)(e); Module._date_le = (e) => (Module._date_le = wasmExports.date_le)(e); Module._date_gt = (e) => (Module._date_gt = wasmExports.date_gt)(e); Module._date_ge = (e) => (Module._date_ge = wasmExports.date_ge)(e); Module._date_cmp = (e) => (Module._date_cmp = wasmExports.date_cmp)(e); Module._date_mi = (e) => (Module._date_mi = wasmExports.date_mi)(e); Module._time_eq = (e) => (Module._time_eq = wasmExports.time_eq)(e); Module._time_lt = (e) => (Module._time_lt = wasmExports.time_lt)(e); Module._time_le = (e) => (Module._time_le = wasmExports.time_le)(e); Module._time_gt = (e) => (Module._time_gt = wasmExports.time_gt)(e); Module._time_ge = (e) => (Module._time_ge = wasmExports.time_ge)(e); Module._time_cmp = (e) => (Module._time_cmp = wasmExports.time_cmp)(e); Module._time_mi_time = (e) => (Module._time_mi_time = wasmExports.time_mi_time)(e); Module._timetz_cmp = (e) => (Module._timetz_cmp = wasmExports.timetz_cmp)(e); Module._TransferExpandedObject = (e, t2) => (Module._TransferExpandedObject = wasmExports.TransferExpandedObject)(e, t2); Module._numeric_lt = (e) => (Module._numeric_lt = wasmExports.numeric_lt)(e); Module._numeric_ge = (e) => (Module._numeric_ge = wasmExports.numeric_ge)(e); Module._err_generic_string = (e, t2) => (Module._err_generic_string = wasmExports.err_generic_string)(e, t2); Module._domain_check = (e, t2, r, a2, s4) => (Module._domain_check = wasmExports.domain_check)(e, t2, r, a2, s4); Module._enum_lt = (e) => (Module._enum_lt = wasmExports.enum_lt)(e); Module._enum_le = (e) => (Module._enum_le = wasmExports.enum_le)(e); Module._enum_ge = (e) => (Module._enum_ge = wasmExports.enum_ge)(e); Module._enum_gt = (e) => (Module._enum_gt = wasmExports.enum_gt)(e); Module._enum_cmp = (e) => (Module._enum_cmp = wasmExports.enum_cmp)(e); Module._make_expanded_record_from_typeid = (e, t2, r) => (Module._make_expanded_record_from_typeid = wasmExports.make_expanded_record_from_typeid)(e, t2, r); Module._make_expanded_record_from_tupdesc = (e, t2) => (Module._make_expanded_record_from_tupdesc = wasmExports.make_expanded_record_from_tupdesc)(e, t2); Module._make_expanded_record_from_exprecord = (e, t2) => (Module._make_expanded_record_from_exprecord = wasmExports.make_expanded_record_from_exprecord)(e, t2); Module._expanded_record_set_tuple = (e, t2, r, a2) => (Module._expanded_record_set_tuple = wasmExports.expanded_record_set_tuple)(e, t2, r, a2); Module._expanded_record_get_tuple = (e) => (Module._expanded_record_get_tuple = wasmExports.expanded_record_get_tuple)(e); Module._deconstruct_expanded_record = (e) => (Module._deconstruct_expanded_record = wasmExports.deconstruct_expanded_record)(e); Module._expanded_record_lookup_field = (e, t2, r) => (Module._expanded_record_lookup_field = wasmExports.expanded_record_lookup_field)(e, t2, r); Module._expanded_record_set_field_internal = (e, t2, r, a2, s4, o4) => (Module._expanded_record_set_field_internal = wasmExports.expanded_record_set_field_internal)(e, t2, r, a2, s4, o4); Module._expanded_record_set_fields = (e, t2, r, a2) => (Module._expanded_record_set_fields = wasmExports.expanded_record_set_fields)(e, t2, r, a2); Module._float4in_internal = (e, t2, r, a2, s4) => (Module._float4in_internal = wasmExports.float4in_internal)(e, t2, r, a2, s4); Module._strtof = (e, t2) => (Module._strtof = wasmExports.strtof)(e, t2); Module._float8in_internal = (e, t2, r, a2, s4) => (Module._float8in_internal = wasmExports.float8in_internal)(e, t2, r, a2, s4); Module._float8out_internal = (e) => (Module._float8out_internal = wasmExports.float8out_internal)(e); Module._btfloat4cmp = (e) => (Module._btfloat4cmp = wasmExports.btfloat4cmp)(e); Module._btfloat8cmp = (e) => (Module._btfloat8cmp = wasmExports.btfloat8cmp)(e); Module._acos = (e) => (Module._acos = wasmExports.acos)(e); Module._asin = (e) => (Module._asin = wasmExports.asin)(e); Module._cos = (e) => (Module._cos = wasmExports.cos)(e); Module._str_tolower = (e, t2, r) => (Module._str_tolower = wasmExports.str_tolower)(e, t2, r); Module._pushJsonbValue = (e, t2, r) => (Module._pushJsonbValue = wasmExports.pushJsonbValue)(e, t2, r); Module._numeric_float4 = (e) => (Module._numeric_float4 = wasmExports.numeric_float4)(e); Module._numeric_cmp = (e) => (Module._numeric_cmp = wasmExports.numeric_cmp)(e); Module._numeric_eq = (e) => (Module._numeric_eq = wasmExports.numeric_eq)(e); Module._numeric_is_nan = (e) => (Module._numeric_is_nan = wasmExports.numeric_is_nan)(e); Module._timestamp_cmp = (e) => (Module._timestamp_cmp = wasmExports.timestamp_cmp)(e); Module._macaddr_cmp = (e) => (Module._macaddr_cmp = wasmExports.macaddr_cmp)(e); Module._macaddr_lt = (e) => (Module._macaddr_lt = wasmExports.macaddr_lt)(e); Module._macaddr_le = (e) => (Module._macaddr_le = wasmExports.macaddr_le)(e); Module._macaddr_eq = (e) => (Module._macaddr_eq = wasmExports.macaddr_eq)(e); Module._macaddr_ge = (e) => (Module._macaddr_ge = wasmExports.macaddr_ge)(e); Module._macaddr_gt = (e) => (Module._macaddr_gt = wasmExports.macaddr_gt)(e); Module._macaddr8_cmp = (e) => (Module._macaddr8_cmp = wasmExports.macaddr8_cmp)(e); Module._macaddr8_lt = (e) => (Module._macaddr8_lt = wasmExports.macaddr8_lt)(e); Module._macaddr8_le = (e) => (Module._macaddr8_le = wasmExports.macaddr8_le)(e); Module._macaddr8_eq = (e) => (Module._macaddr8_eq = wasmExports.macaddr8_eq)(e); Module._macaddr8_ge = (e) => (Module._macaddr8_ge = wasmExports.macaddr8_ge)(e); Module._macaddr8_gt = (e) => (Module._macaddr8_gt = wasmExports.macaddr8_gt)(e); Module._current_query = (e) => (Module._current_query = wasmExports.current_query)(e); Module._unpack_sql_state = (e) => (Module._unpack_sql_state = wasmExports.unpack_sql_state)(e); Module._get_fn_expr_rettype = (e) => (Module._get_fn_expr_rettype = wasmExports.get_fn_expr_rettype)(e); Module._btnamecmp = (e) => (Module._btnamecmp = wasmExports.btnamecmp)(e); Module._inet_in = (e) => (Module._inet_in = wasmExports.inet_in)(e); Module._network_cmp = (e) => (Module._network_cmp = wasmExports.network_cmp)(e); Module._convert_network_to_scalar = (e, t2, r) => (Module._convert_network_to_scalar = wasmExports.convert_network_to_scalar)(e, t2, r); Module._numeric_gt = (e) => (Module._numeric_gt = wasmExports.numeric_gt)(e); Module._numeric_le = (e) => (Module._numeric_le = wasmExports.numeric_le)(e); Module._numeric_float8_no_overflow = (e) => (Module._numeric_float8_no_overflow = wasmExports.numeric_float8_no_overflow)(e); Module._oidout = (e) => (Module._oidout = wasmExports.oidout)(e); Module._interval_mi = (e) => (Module._interval_mi = wasmExports.interval_mi)(e); Module._quote_ident = (e) => (Module._quote_ident = wasmExports.quote_ident)(e); Module._pg_wchar2mb_with_len = (e, t2, r) => (Module._pg_wchar2mb_with_len = wasmExports.pg_wchar2mb_with_len)(e, t2, r); Module._pg_get_indexdef_columns_extended = (e, t2) => (Module._pg_get_indexdef_columns_extended = wasmExports.pg_get_indexdef_columns_extended)(e, t2); Module._pg_get_querydef = (e, t2) => (Module._pg_get_querydef = wasmExports.pg_get_querydef)(e, t2); Module._strcspn = (e, t2) => (Module._strcspn = wasmExports.strcspn)(e, t2); Module._generic_restriction_selectivity = (e, t2, r, a2, s4, o4) => (Module._generic_restriction_selectivity = wasmExports.generic_restriction_selectivity)(e, t2, r, a2, s4, o4); Module._genericcostestimate = (e, t2, r, a2) => (Module._genericcostestimate = wasmExports.genericcostestimate)(e, t2, r, a2); Module._tidin = (e) => (Module._tidin = wasmExports.tidin)(e); Module._tidout = (e) => (Module._tidout = wasmExports.tidout)(e); Module._timestamp_in = (e) => (Module._timestamp_in = wasmExports.timestamp_in)(e); Module._timestamp_eq = (e) => (Module._timestamp_eq = wasmExports.timestamp_eq)(e); Module._timestamp_lt = (e) => (Module._timestamp_lt = wasmExports.timestamp_lt)(e); Module._timestamp_gt = (e) => (Module._timestamp_gt = wasmExports.timestamp_gt)(e); Module._timestamp_le = (e) => (Module._timestamp_le = wasmExports.timestamp_le)(e); Module._timestamp_ge = (e) => (Module._timestamp_ge = wasmExports.timestamp_ge)(e); Module._interval_eq = (e) => (Module._interval_eq = wasmExports.interval_eq)(e); Module._interval_lt = (e) => (Module._interval_lt = wasmExports.interval_lt)(e); Module._interval_gt = (e) => (Module._interval_gt = wasmExports.interval_gt)(e); Module._interval_le = (e) => (Module._interval_le = wasmExports.interval_le)(e); Module._interval_ge = (e) => (Module._interval_ge = wasmExports.interval_ge)(e); Module._interval_cmp = (e) => (Module._interval_cmp = wasmExports.interval_cmp)(e); Module._timestamp_mi = (e) => (Module._timestamp_mi = wasmExports.timestamp_mi)(e); Module._interval_um = (e) => (Module._interval_um = wasmExports.interval_um)(e); Module._has_fn_opclass_options = (e) => (Module._has_fn_opclass_options = wasmExports.has_fn_opclass_options)(e); Module._uuid_in = (e) => (Module._uuid_in = wasmExports.uuid_in)(e); Module._uuid_out = (e) => (Module._uuid_out = wasmExports.uuid_out)(e); Module._uuid_cmp = (e) => (Module._uuid_cmp = wasmExports.uuid_cmp)(e); Module._varbit_in = (e) => (Module._varbit_in = wasmExports.varbit_in)(e); Module._biteq = (e) => (Module._biteq = wasmExports.biteq)(e); Module._bitlt = (e) => (Module._bitlt = wasmExports.bitlt)(e); Module._bitle = (e) => (Module._bitle = wasmExports.bitle)(e); Module._bitgt = (e) => (Module._bitgt = wasmExports.bitgt)(e); Module._bitge = (e) => (Module._bitge = wasmExports.bitge)(e); Module._bitcmp = (e) => (Module._bitcmp = wasmExports.bitcmp)(e); Module._bpchareq = (e) => (Module._bpchareq = wasmExports.bpchareq)(e); Module._bpcharlt = (e) => (Module._bpcharlt = wasmExports.bpcharlt)(e); Module._bpcharle = (e) => (Module._bpcharle = wasmExports.bpcharle)(e); Module._bpchargt = (e) => (Module._bpchargt = wasmExports.bpchargt)(e); Module._bpcharge = (e) => (Module._bpcharge = wasmExports.bpcharge)(e); Module._bpcharcmp = (e) => (Module._bpcharcmp = wasmExports.bpcharcmp)(e); Module._texteq = (e) => (Module._texteq = wasmExports.texteq)(e); Module._text_lt = (e) => (Module._text_lt = wasmExports.text_lt)(e); Module._text_le = (e) => (Module._text_le = wasmExports.text_le)(e); Module._text_gt = (e) => (Module._text_gt = wasmExports.text_gt)(e); Module._text_ge = (e) => (Module._text_ge = wasmExports.text_ge)(e); Module._bttextcmp = (e) => (Module._bttextcmp = wasmExports.bttextcmp)(e); Module._byteaeq = (e) => (Module._byteaeq = wasmExports.byteaeq)(e); Module._bytealt = (e) => (Module._bytealt = wasmExports.bytealt)(e); Module._byteale = (e) => (Module._byteale = wasmExports.byteale)(e); Module._byteagt = (e) => (Module._byteagt = wasmExports.byteagt)(e); Module._byteage = (e) => (Module._byteage = wasmExports.byteage)(e); Module._byteacmp = (e) => (Module._byteacmp = wasmExports.byteacmp)(e); Module._to_hex32 = (e) => (Module._to_hex32 = wasmExports.to_hex32)(e); Module._varstr_levenshtein = (e, t2, r, a2, s4, o4, n3, _3) => (Module._varstr_levenshtein = wasmExports.varstr_levenshtein)(e, t2, r, a2, s4, o4, n3, _3); Module._pg_xml_init = (e) => (Module._pg_xml_init = wasmExports.pg_xml_init)(e); Module._xmlInitParser = () => (Module._xmlInitParser = wasmExports.xmlInitParser)(); Module._xml_ereport = (e, t2, r, a2) => (Module._xml_ereport = wasmExports.xml_ereport)(e, t2, r, a2); Module._pg_xml_done = (e, t2) => (Module._pg_xml_done = wasmExports.pg_xml_done)(e, t2); Module._xmlXPathNewContext = (e) => (Module._xmlXPathNewContext = wasmExports.xmlXPathNewContext)(e); Module._xmlXPathFreeContext = (e) => (Module._xmlXPathFreeContext = wasmExports.xmlXPathFreeContext)(e); Module._xmlFreeDoc = (e) => (Module._xmlFreeDoc = wasmExports.xmlFreeDoc)(e); Module._xmlXPathCtxtCompile = (e, t2) => (Module._xmlXPathCtxtCompile = wasmExports.xmlXPathCtxtCompile)(e, t2); Module._xmlXPathCompiledEval = (e, t2) => (Module._xmlXPathCompiledEval = wasmExports.xmlXPathCompiledEval)(e, t2); Module._xmlXPathFreeObject = (e) => (Module._xmlXPathFreeObject = wasmExports.xmlXPathFreeObject)(e); Module._xmlXPathFreeCompExpr = (e) => (Module._xmlXPathFreeCompExpr = wasmExports.xmlXPathFreeCompExpr)(e); Module._xmlStrdup = (e) => (Module._xmlStrdup = wasmExports.xmlStrdup)(e); Module._xmlEncodeSpecialChars = (e, t2) => (Module._xmlEncodeSpecialChars = wasmExports.xmlEncodeSpecialChars)(e, t2); Module._xmlStrlen = (e) => (Module._xmlStrlen = wasmExports.xmlStrlen)(e); Module._xmlBufferCreate = () => (Module._xmlBufferCreate = wasmExports.xmlBufferCreate)(); Module._xmlBufferFree = (e) => (Module._xmlBufferFree = wasmExports.xmlBufferFree)(e); Module._xmlXPathCastNodeToString = (e) => (Module._xmlXPathCastNodeToString = wasmExports.xmlXPathCastNodeToString)(e); Module._xmlNodeDump = (e, t2, r, a2, s4) => (Module._xmlNodeDump = wasmExports.xmlNodeDump)(e, t2, r, a2, s4); Module._get_typsubscript = (e, t2) => (Module._get_typsubscript = wasmExports.get_typsubscript)(e, t2); Module._CachedPlanAllowsSimpleValidityCheck = (e, t2, r) => (Module._CachedPlanAllowsSimpleValidityCheck = wasmExports.CachedPlanAllowsSimpleValidityCheck)(e, t2, r); Module._CachedPlanIsSimplyValid = (e, t2, r) => (Module._CachedPlanIsSimplyValid = wasmExports.CachedPlanIsSimplyValid)(e, t2, r); Module._GetCachedExpression = (e) => (Module._GetCachedExpression = wasmExports.GetCachedExpression)(e); Module._FreeCachedExpression = (e) => (Module._FreeCachedExpression = wasmExports.FreeCachedExpression)(e); Module._ReleaseAllPlanCacheRefsInOwner = (e) => (Module._ReleaseAllPlanCacheRefsInOwner = wasmExports.ReleaseAllPlanCacheRefsInOwner)(e); Module._in_error_recursion_trouble = () => (Module._in_error_recursion_trouble = wasmExports.in_error_recursion_trouble)(); Module._GetErrorContextStack = () => (Module._GetErrorContextStack = wasmExports.GetErrorContextStack)(); Module._find_rendezvous_variable = (e) => (Module._find_rendezvous_variable = wasmExports.find_rendezvous_variable)(e); Module._CallerFInfoFunctionCall2 = (e, t2, r, a2, s4) => (Module._CallerFInfoFunctionCall2 = wasmExports.CallerFInfoFunctionCall2)(e, t2, r, a2, s4); Module._FunctionCall0Coll = (e, t2) => (Module._FunctionCall0Coll = wasmExports.FunctionCall0Coll)(e, t2); Module._resolve_polymorphic_argtypes = (e, t2, r, a2) => (Module._resolve_polymorphic_argtypes = wasmExports.resolve_polymorphic_argtypes)(e, t2, r, a2); Module._pg_bindtextdomain = (e) => (Module._pg_bindtextdomain = wasmExports.pg_bindtextdomain)(e); Module._DefineCustomBoolVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._DefineCustomBoolVariable = wasmExports.DefineCustomBoolVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._DefineCustomIntVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._DefineCustomIntVariable = wasmExports.DefineCustomIntVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._DefineCustomRealVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2) => (Module._DefineCustomRealVariable = wasmExports.DefineCustomRealVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4, d2); Module._DefineCustomStringVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4) => (Module._DefineCustomStringVariable = wasmExports.DefineCustomStringVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4); Module._DefineCustomEnumVariable = (e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4) => (Module._DefineCustomEnumVariable = wasmExports.DefineCustomEnumVariable)(e, t2, r, a2, s4, o4, n3, _3, l3, p4, m4); Module._MarkGUCPrefixReserved = (e) => (Module._MarkGUCPrefixReserved = wasmExports.MarkGUCPrefixReserved)(e); Module._sampler_random_init_state = (e, t2) => (Module._sampler_random_init_state = wasmExports.sampler_random_init_state)(e, t2); Module._pchomp = (e) => (Module._pchomp = wasmExports.pchomp)(e); Module._PinPortal = (e) => (Module._PinPortal = wasmExports.PinPortal)(e); Module._UnpinPortal = (e) => (Module._UnpinPortal = wasmExports.UnpinPortal)(e); Module._xmlBufferWriteCHAR = (e, t2) => (Module._xmlBufferWriteCHAR = wasmExports.xmlBufferWriteCHAR)(e, t2); Module._xmlBufferWriteChar = (e, t2) => (Module._xmlBufferWriteChar = wasmExports.xmlBufferWriteChar)(e, t2); Module._xmlReadMemory = (e, t2, r, a2, s4) => (Module._xmlReadMemory = wasmExports.xmlReadMemory)(e, t2, r, a2, s4); Module._xmlDocGetRootElement = (e) => (Module._xmlDocGetRootElement = wasmExports.xmlDocGetRootElement)(e); Module._xmlXPathIsNaN = (e) => (Module._xmlXPathIsNaN = wasmExports.xmlXPathIsNaN)(e); Module._xmlXPathCastToBoolean = (e) => (Module._xmlXPathCastToBoolean = wasmExports.xmlXPathCastToBoolean)(e); Module._xmlXPathCastToNumber = (e) => (Module._xmlXPathCastToNumber = wasmExports.xmlXPathCastToNumber)(e); var ___dl_seterr = (e, t2) => (___dl_seterr = wasmExports.__dl_seterr)(e, t2); Module._gmtime = (e) => (Module._gmtime = wasmExports.gmtime)(e); var _htonl = (e) => (_htonl = wasmExports.htonl)(e), _htons = (e) => (_htons = wasmExports.htons)(e); Module._ioctl = (e, t2, r) => (Module._ioctl = wasmExports.ioctl)(e, t2, r); var _emscripten_builtin_memalign = (e, t2) => (_emscripten_builtin_memalign = wasmExports.emscripten_builtin_memalign)(e, t2), _ntohs = (e) => (_ntohs = wasmExports.ntohs)(e); Module._srand = (e) => (Module._srand = wasmExports.srand)(e); Module._rand = () => (Module._rand = wasmExports.rand)(); var __emscripten_timeout = (e, t2) => (__emscripten_timeout = wasmExports._emscripten_timeout)(e, t2), _setThrew = (e, t2) => (_setThrew = wasmExports.setThrew)(e, t2), __emscripten_tempret_set = (e) => (__emscripten_tempret_set = wasmExports._emscripten_tempret_set)(e), __emscripten_tempret_get = () => (__emscripten_tempret_get = wasmExports._emscripten_tempret_get)(), __emscripten_stack_restore = (e) => (__emscripten_stack_restore = wasmExports._emscripten_stack_restore)(e), __emscripten_stack_alloc = (e) => (__emscripten_stack_alloc = wasmExports._emscripten_stack_alloc)(e), _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports.emscripten_stack_get_current)(); Module._InterruptPending = 2677872; Module._MyLatch = 2678060; Module._CritSectionCount = 2677924; Module._MyProc = 2647676; Module._pg_global_prng_state = 2624256; Module._error_context_stack = 2676168; Module._GUC_check_errdetail_string = 2681820; Module._IsUnderPostmaster = 2677953; Module._CurrentMemoryContext = 2683248; Module._stdout = 2537152; Module._debug_query_string = 2538700; Module._MyProcPort = 2678048; Module.___THREW__ = 2698916; Module.___threwValue = 2698920; Module._MyDatabaseId = 2677932; Module._TopMemoryContext = 2683252; Module._PG_exception_stack = 2676172; Module._MyProcPid = 2678024; Module._stdin = 2537e3; Module._ScanKeywords = 2374040; Module._pg_number_of_ones = 925120; Module._LocalBufferBlockPointers = 2644252; Module._BufferBlocks = 2638988; Module._wal_level = 2387920; Module._SnapshotAnyData = 2474096; Module._maintenance_work_mem = 2421576; Module._ParallelWorkerNumber = 2379480; Module._MainLWLockArray = 2645860; Module._CurrentResourceOwner = 2683296; Module._work_mem = 2421560; Module._NBuffers = 2421584; Module._bsysscan = 2625492; Module._CheckXidAlive = 2625488; Module._RecentXmin = 2474188; Module._XactIsoLevel = 2387784; Module._pgWalUsage = 2628960; Module._pgBufferUsage = 2628832; Module._TTSOpsVirtual = 2391608; Module._TransamVariables = 2625480; Module._TopTransactionContext = 2683272; Module._RmgrTable = 2379504; Module._process_shared_preload_libraries_in_progress = 2681216; Module._wal_segment_size = 2387940; Module._TopTransactionResourceOwner = 2683304; Module._arch_module_check_errdetail_string = 2638372; Module._object_access_hook = 2627600; Module._InvalidObjectAddress = 1520620; Module._check_function_bodies = 2421750; Module._post_parse_analyze_hook = 2627640; Module._ScanKeywordTokens = 1551648; Module._SPI_processed = 2628984; Module._SPI_tuptable = 2628992; Module._TTSOpsMinimalTuple = 2391712; Module._check_password_hook = 2627908; Module._ConfigReloadPending = 2638360; Module._max_parallel_maintenance_workers = 2421580; Module._DateStyle = 2421548; Module._ExecutorStart_hook = 2628808; Module._ExecutorRun_hook = 2628812; Module._ExecutorFinish_hook = 2628816; Module._ExecutorEnd_hook = 2628820; Module._SPI_result = 2628996; Module._ClientAuthentication_hook = 2629168; Module._cpu_tuple_cost = 2392168; Module._cpu_operator_cost = 2392184; Module._seq_page_cost = 2392152; Module._planner_hook = 2638056; Module._ShutdownRequestPending = 2638364; Module._MyStartTime = 2678032; Module._cluster_name = 2421800; Module._application_name = 2682044; Module._BufferDescriptors = 2638984; Module._shmem_startup_hook = 2644932; Module._ProcessUtility_hook = 2647764; Module._IntervalStyle = 2677956; Module._extra_float_digits = 2411976; Module._pg_crc32_table = 2112288; Module._xmlFree = 2523400; Module._shmem_request_hook = 2681220;
5285
5286
  function invoke_iii(e, t2, r) {
5286
5287
  var a2 = stackSave();
5287
5288
  try {
@@ -6519,19 +6520,19 @@ async function getConversationScopedArtifacts(params) {
6519
6520
  if (visibleMessageIds.length === 0) {
6520
6521
  return [];
6521
6522
  }
6522
- const { getLedgerArtifacts: getLedgerArtifacts3 } = await import('@inkeep/agents-core');
6523
+ const { getLedgerArtifacts: getLedgerArtifacts4 } = await import('@inkeep/agents-core');
6523
6524
  const dbClient2 = (await Promise.resolve().then(() => (init_dbClient(), dbClient_exports))).default;
6524
6525
  const visibleTaskIds = visibleMessages.map((msg) => msg.taskId).filter((taskId) => Boolean(taskId));
6525
6526
  const referenceArtifacts = [];
6526
6527
  for (const taskId of visibleTaskIds) {
6527
- const artifacts = await getLedgerArtifacts3(dbClient2)({
6528
+ const artifacts = await getLedgerArtifacts4(dbClient2)({
6528
6529
  scopes: { tenantId, projectId },
6529
6530
  taskId
6530
6531
  });
6531
6532
  referenceArtifacts.push(...artifacts);
6532
6533
  }
6533
- const logger29 = (await Promise.resolve().then(() => (init_logger(), logger_exports))).getLogger("conversations");
6534
- logger29.debug(
6534
+ const logger30 = (await Promise.resolve().then(() => (init_logger(), logger_exports))).getLogger("conversations");
6535
+ logger30.debug(
6535
6536
  {
6536
6537
  conversationId,
6537
6538
  visibleMessages: visibleMessages.length,
@@ -6543,8 +6544,8 @@ async function getConversationScopedArtifacts(params) {
6543
6544
  );
6544
6545
  return referenceArtifacts;
6545
6546
  } catch (error) {
6546
- const logger29 = (await Promise.resolve().then(() => (init_logger(), logger_exports))).getLogger("conversations");
6547
- logger29.error(
6547
+ const logger30 = (await Promise.resolve().then(() => (init_logger(), logger_exports))).getLogger("conversations");
6548
+ logger30.error(
6548
6549
  {
6549
6550
  error: error instanceof Error ? error.message : "Unknown error",
6550
6551
  conversationId
@@ -6586,14 +6587,14 @@ const execute = ${executeCode}
6586
6587
  })();
6587
6588
  `;
6588
6589
  }
6589
- function parseExecutionResult(stdout, functionId, logger29) {
6590
+ function parseExecutionResult(stdout, functionId, logger30) {
6590
6591
  try {
6591
6592
  const outputLines = stdout.split("\n").filter((line) => line.trim());
6592
6593
  const resultLine = outputLines[outputLines.length - 1];
6593
6594
  return JSON.parse(resultLine);
6594
6595
  } catch (parseError) {
6595
- if (logger29) {
6596
- logger29.warn(
6596
+ if (logger30) {
6597
+ logger30.warn(
6597
6598
  {
6598
6599
  functionId,
6599
6600
  stdout,
@@ -6609,13 +6610,13 @@ var init_sandbox_utils = __esm({
6609
6610
  "src/tools/sandbox-utils.ts"() {
6610
6611
  }
6611
6612
  });
6612
- var logger16, ExecutionSemaphore, NativeSandboxExecutor;
6613
+ var logger17, ExecutionSemaphore, NativeSandboxExecutor;
6613
6614
  var init_NativeSandboxExecutor = __esm({
6614
6615
  "src/tools/NativeSandboxExecutor.ts"() {
6615
6616
  init_execution_limits();
6616
6617
  init_logger();
6617
6618
  init_sandbox_utils();
6618
- logger16 = agentsCore.getLogger("native-sandbox-executor");
6619
+ logger17 = agentsCore.getLogger("native-sandbox-executor");
6619
6620
  ExecutionSemaphore = class {
6620
6621
  permits;
6621
6622
  waitQueue = [];
@@ -6687,7 +6688,7 @@ var init_NativeSandboxExecutor = __esm({
6687
6688
  getSemaphore(vcpus) {
6688
6689
  const effectiveVcpus = Math.max(1, vcpus || 1);
6689
6690
  if (!this.executionSemaphores.has(effectiveVcpus)) {
6690
- logger16.debug({ vcpus: effectiveVcpus }, "Creating new execution semaphore");
6691
+ logger17.debug({ vcpus: effectiveVcpus }, "Creating new execution semaphore");
6691
6692
  this.executionSemaphores.set(effectiveVcpus, new ExecutionSemaphore(effectiveVcpus));
6692
6693
  }
6693
6694
  const semaphore = this.executionSemaphores.get(effectiveVcpus);
@@ -6724,7 +6725,7 @@ var init_NativeSandboxExecutor = __esm({
6724
6725
  if (now - sandbox.lastUsed < FUNCTION_TOOL_SANDBOX_POOL_TTL_MS && sandbox.useCount < FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT) {
6725
6726
  sandbox.lastUsed = now;
6726
6727
  sandbox.useCount++;
6727
- logger16.debug(
6728
+ logger17.debug(
6728
6729
  {
6729
6730
  poolKey,
6730
6731
  useCount: sandbox.useCount,
@@ -6751,14 +6752,14 @@ var init_NativeSandboxExecutor = __esm({
6751
6752
  useCount: 1,
6752
6753
  dependencies
6753
6754
  };
6754
- logger16.debug({ poolKey, sandboxDir }, "Added sandbox to pool");
6755
+ logger17.debug({ poolKey, sandboxDir }, "Added sandbox to pool");
6755
6756
  }
6756
6757
  cleanupSandbox(sandboxDir) {
6757
6758
  try {
6758
6759
  s3.rmSync(sandboxDir, { recursive: true, force: true });
6759
- logger16.debug({ sandboxDir }, "Cleaned up sandbox");
6760
+ logger17.debug({ sandboxDir }, "Cleaned up sandbox");
6760
6761
  } catch (error) {
6761
- logger16.warn({ sandboxDir, error }, "Failed to clean up sandbox");
6762
+ logger17.warn({ sandboxDir, error }, "Failed to clean up sandbox");
6762
6763
  }
6763
6764
  }
6764
6765
  startPoolCleanup() {
@@ -6775,7 +6776,7 @@ var init_NativeSandboxExecutor = __esm({
6775
6776
  delete this.sandboxPool[key];
6776
6777
  });
6777
6778
  if (keysToDelete.length > 0) {
6778
- logger16.debug({ cleanedCount: keysToDelete.length }, "Cleaned up expired sandboxes");
6779
+ logger17.debug({ cleanedCount: keysToDelete.length }, "Cleaned up expired sandboxes");
6779
6780
  }
6780
6781
  }, FUNCTION_TOOL_SANDBOX_CLEANUP_INTERVAL_MS);
6781
6782
  }
@@ -6804,7 +6805,7 @@ var init_NativeSandboxExecutor = __esm({
6804
6805
  return hasCjsSyntax ? "cjs" : "esm";
6805
6806
  }
6806
6807
  if (hasEsmSyntax && hasCjsSyntax) {
6807
- logger16.warn(
6808
+ logger17.warn(
6808
6809
  { executeCode: `${executeCode.substring(0, 100)}...` },
6809
6810
  "Both ESM and CommonJS syntax detected, defaulting to ESM"
6810
6811
  );
@@ -6821,7 +6822,7 @@ var init_NativeSandboxExecutor = __esm({
6821
6822
  async executeFunctionTool(toolId, args2, config) {
6822
6823
  const vcpus = config.sandboxConfig?.vcpus || 1;
6823
6824
  const semaphore = this.getSemaphore(vcpus);
6824
- logger16.debug(
6825
+ logger17.debug(
6825
6826
  {
6826
6827
  toolId,
6827
6828
  vcpus,
@@ -6839,7 +6840,7 @@ var init_NativeSandboxExecutor = __esm({
6839
6840
  async executeInSandbox_Internal(toolId, args2, config) {
6840
6841
  const dependencies = config.dependencies || {};
6841
6842
  const dependencyHash = this.generateDependencyHash(dependencies);
6842
- logger16.debug(
6843
+ logger17.debug(
6843
6844
  {
6844
6845
  toolId,
6845
6846
  dependencies,
@@ -6855,7 +6856,7 @@ var init_NativeSandboxExecutor = __esm({
6855
6856
  sandboxDir = o3.join(this.tempDir, `sandbox-${dependencyHash}-${Date.now()}`);
6856
6857
  s3.mkdirSync(sandboxDir, { recursive: true });
6857
6858
  isNewSandbox = true;
6858
- logger16.debug(
6859
+ logger17.debug(
6859
6860
  {
6860
6861
  toolId,
6861
6862
  dependencyHash,
@@ -6926,15 +6927,15 @@ var init_NativeSandboxExecutor = __esm({
6926
6927
  });
6927
6928
  npm.on("close", (code) => {
6928
6929
  if (code === 0) {
6929
- logger16.debug({ sandboxDir }, "Dependencies installed successfully");
6930
+ logger17.debug({ sandboxDir }, "Dependencies installed successfully");
6930
6931
  resolve2();
6931
6932
  } else {
6932
- logger16.error({ sandboxDir, code, stderr }, "Failed to install dependencies");
6933
+ logger17.error({ sandboxDir, code, stderr }, "Failed to install dependencies");
6933
6934
  reject(new Error(`npm install failed with code ${code}: ${stderr}`));
6934
6935
  }
6935
6936
  });
6936
6937
  npm.on("error", (err2) => {
6937
- logger16.error({ sandboxDir, error: err2 }, "Failed to spawn npm install");
6938
+ logger17.error({ sandboxDir, error: err2 }, "Failed to spawn npm install");
6938
6939
  reject(err2);
6939
6940
  });
6940
6941
  });
@@ -6981,7 +6982,7 @@ var init_NativeSandboxExecutor = __esm({
6981
6982
  stderr += dataStr;
6982
6983
  });
6983
6984
  const timeoutId = setTimeout(() => {
6984
- logger16.warn({ sandboxDir, timeout }, "Function execution timed out, killing process");
6985
+ logger17.warn({ sandboxDir, timeout }, "Function execution timed out, killing process");
6985
6986
  node.kill("SIGTERM");
6986
6987
  const forceKillTimeout = Math.min(Math.max(timeout / 10, 2e3), 5e3);
6987
6988
  setTimeout(() => {
@@ -6996,7 +6997,7 @@ var init_NativeSandboxExecutor = __esm({
6996
6997
  clearTimeout(timeoutId);
6997
6998
  if (code === 0) {
6998
6999
  try {
6999
- const result = parseExecutionResult(stdout, "function", logger16);
7000
+ const result = parseExecutionResult(stdout, "function", logger17);
7000
7001
  if (typeof result === "object" && result !== null && "success" in result) {
7001
7002
  const parsed = result;
7002
7003
  if (parsed.success) {
@@ -7008,18 +7009,18 @@ var init_NativeSandboxExecutor = __esm({
7008
7009
  resolve2(result);
7009
7010
  }
7010
7011
  } catch (parseError) {
7011
- logger16.error({ stdout, stderr, parseError }, "Failed to parse function result");
7012
+ logger17.error({ stdout, stderr, parseError }, "Failed to parse function result");
7012
7013
  reject(new Error(`Invalid function result: ${stdout}`));
7013
7014
  }
7014
7015
  } else {
7015
7016
  const errorMsg = signal ? `Function execution killed by signal ${signal}: ${stderr}` : `Function execution failed with code ${code}: ${stderr}`;
7016
- logger16.error({ code, signal, stderr }, "Function execution failed");
7017
+ logger17.error({ code, signal, stderr }, "Function execution failed");
7017
7018
  reject(new Error(errorMsg));
7018
7019
  }
7019
7020
  });
7020
7021
  node.on("error", (error) => {
7021
7022
  clearTimeout(timeoutId);
7022
- logger16.error({ sandboxDir, error }, "Failed to spawn node process");
7023
+ logger17.error({ sandboxDir, error }, "Failed to spawn node process");
7023
7024
  reject(error);
7024
7025
  });
7025
7026
  });
@@ -7027,13 +7028,13 @@ var init_NativeSandboxExecutor = __esm({
7027
7028
  };
7028
7029
  }
7029
7030
  });
7030
- var logger17, VercelSandboxExecutor;
7031
+ var logger18, VercelSandboxExecutor;
7031
7032
  var init_VercelSandboxExecutor = __esm({
7032
7033
  "src/tools/VercelSandboxExecutor.ts"() {
7033
7034
  init_execution_limits();
7034
7035
  init_logger();
7035
7036
  init_sandbox_utils();
7036
- logger17 = agentsCore.getLogger("VercelSandboxExecutor");
7037
+ logger18 = agentsCore.getLogger("VercelSandboxExecutor");
7037
7038
  VercelSandboxExecutor = class _VercelSandboxExecutor {
7038
7039
  static instance;
7039
7040
  config;
@@ -7041,7 +7042,7 @@ var init_VercelSandboxExecutor = __esm({
7041
7042
  cleanupInterval = null;
7042
7043
  constructor(config) {
7043
7044
  this.config = config;
7044
- logger17.info(
7045
+ logger18.info(
7045
7046
  {
7046
7047
  teamId: config.teamId,
7047
7048
  projectId: config.projectId,
@@ -7078,7 +7079,7 @@ var init_VercelSandboxExecutor = __esm({
7078
7079
  const now = Date.now();
7079
7080
  const age = now - cached.createdAt;
7080
7081
  if (age > FUNCTION_TOOL_SANDBOX_POOL_TTL_MS || cached.useCount >= FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT) {
7081
- logger17.debug(
7082
+ logger18.debug(
7082
7083
  {
7083
7084
  dependencyHash,
7084
7085
  age,
@@ -7091,7 +7092,7 @@ var init_VercelSandboxExecutor = __esm({
7091
7092
  this.removeSandbox(dependencyHash);
7092
7093
  return null;
7093
7094
  }
7094
- logger17.debug(
7095
+ logger18.debug(
7095
7096
  {
7096
7097
  dependencyHash,
7097
7098
  useCount: cached.useCount,
@@ -7111,7 +7112,7 @@ var init_VercelSandboxExecutor = __esm({
7111
7112
  useCount: 0,
7112
7113
  dependencies
7113
7114
  });
7114
- logger17.debug(
7115
+ logger18.debug(
7115
7116
  {
7116
7117
  dependencyHash,
7117
7118
  poolSize: this.sandboxPool.size
@@ -7136,9 +7137,9 @@ var init_VercelSandboxExecutor = __esm({
7136
7137
  if (cached) {
7137
7138
  try {
7138
7139
  await cached.sandbox.stop();
7139
- logger17.debug({ dependencyHash }, "Sandbox stopped");
7140
+ logger18.debug({ dependencyHash }, "Sandbox stopped");
7140
7141
  } catch (error) {
7141
- logger17.warn({ error, dependencyHash }, "Error stopping sandbox");
7142
+ logger18.warn({ error, dependencyHash }, "Error stopping sandbox");
7142
7143
  }
7143
7144
  this.sandboxPool.delete(dependencyHash);
7144
7145
  }
@@ -7157,7 +7158,7 @@ var init_VercelSandboxExecutor = __esm({
7157
7158
  }
7158
7159
  }
7159
7160
  if (toRemove.length > 0) {
7160
- logger17.info(
7161
+ logger18.info(
7161
7162
  {
7162
7163
  count: toRemove.length,
7163
7164
  poolSize: this.sandboxPool.size
@@ -7178,7 +7179,7 @@ var init_VercelSandboxExecutor = __esm({
7178
7179
  clearInterval(this.cleanupInterval);
7179
7180
  this.cleanupInterval = null;
7180
7181
  }
7181
- logger17.info(
7182
+ logger18.info(
7182
7183
  {
7183
7184
  poolSize: this.sandboxPool.size
7184
7185
  },
@@ -7215,7 +7216,7 @@ var init_VercelSandboxExecutor = __esm({
7215
7216
  const envLines = [];
7216
7217
  for (const varName of envVarNames) {
7217
7218
  envLines.push(`${varName}=""`);
7218
- logger17.debug({ varName }, "Adding environment variable placeholder to sandbox");
7219
+ logger18.debug({ varName }, "Adding environment variable placeholder to sandbox");
7219
7220
  }
7220
7221
  return envLines.join("\n");
7221
7222
  }
@@ -7228,7 +7229,7 @@ var init_VercelSandboxExecutor = __esm({
7228
7229
  const dependencies = toolConfig.dependencies || {};
7229
7230
  const dependencyHash = this.generateDependencyHash(dependencies);
7230
7231
  try {
7231
- logger17.info(
7232
+ logger18.info(
7232
7233
  {
7233
7234
  functionId,
7234
7235
  functionName: toolConfig.name,
@@ -7251,7 +7252,7 @@ var init_VercelSandboxExecutor = __esm({
7251
7252
  },
7252
7253
  runtime: this.config.runtime
7253
7254
  });
7254
- logger17.info(
7255
+ logger18.info(
7255
7256
  {
7256
7257
  functionId,
7257
7258
  sandboxId: sandbox$1.sandboxId,
@@ -7261,7 +7262,7 @@ var init_VercelSandboxExecutor = __esm({
7261
7262
  );
7262
7263
  this.addToPool(dependencyHash, sandbox$1, dependencies);
7263
7264
  } else {
7264
- logger17.info(
7265
+ logger18.info(
7265
7266
  {
7266
7267
  functionId,
7267
7268
  sandboxId: sandbox$1.sandboxId,
@@ -7273,7 +7274,7 @@ var init_VercelSandboxExecutor = __esm({
7273
7274
  this.incrementUseCount(dependencyHash);
7274
7275
  try {
7275
7276
  if (isNewSandbox && toolConfig.dependencies && Object.keys(toolConfig.dependencies).length > 0) {
7276
- logger17.debug(
7277
+ logger18.debug(
7277
7278
  {
7278
7279
  functionId,
7279
7280
  functionName: toolConfig.name,
@@ -7306,7 +7307,7 @@ var init_VercelSandboxExecutor = __esm({
7306
7307
  if (installCmd.exitCode !== 0) {
7307
7308
  throw new Error(`Failed to install dependencies: ${installStderr}`);
7308
7309
  }
7309
- logger17.info(
7310
+ logger18.info(
7310
7311
  {
7311
7312
  functionId,
7312
7313
  dependencyHash
@@ -7329,7 +7330,7 @@ var init_VercelSandboxExecutor = __esm({
7329
7330
  path: ".env",
7330
7331
  content: Buffer.from(envFileContent, "utf-8")
7331
7332
  });
7332
- logger17.info(
7333
+ logger18.info(
7333
7334
  {
7334
7335
  functionId,
7335
7336
  envVarCount: envVars.size,
@@ -7340,7 +7341,7 @@ var init_VercelSandboxExecutor = __esm({
7340
7341
  }
7341
7342
  }
7342
7343
  await sandbox$1.writeFiles(filesToWrite);
7343
- logger17.info(
7344
+ logger18.info(
7344
7345
  {
7345
7346
  functionId,
7346
7347
  runtime: this.config.runtime === "typescript" ? "tsx" : "node",
@@ -7371,7 +7372,7 @@ var init_VercelSandboxExecutor = __esm({
7371
7372
  }
7372
7373
  const executionTime = Date.now() - startTime;
7373
7374
  if (executeCmd.exitCode !== 0) {
7374
- logger17.error(
7375
+ logger18.error(
7375
7376
  {
7376
7377
  functionId,
7377
7378
  exitCode: executeCmd.exitCode,
@@ -7386,8 +7387,8 @@ var init_VercelSandboxExecutor = __esm({
7386
7387
  executionTime
7387
7388
  };
7388
7389
  }
7389
- const result = parseExecutionResult(executeStdout, functionId, logger17);
7390
- logger17.info(
7390
+ const result = parseExecutionResult(executeStdout, functionId, logger18);
7391
+ logger18.info(
7391
7392
  {
7392
7393
  functionId,
7393
7394
  executionTime
@@ -7407,7 +7408,7 @@ var init_VercelSandboxExecutor = __esm({
7407
7408
  } catch (error) {
7408
7409
  const executionTime = Date.now() - startTime;
7409
7410
  const errorMessage = error instanceof Error ? error.message : String(error);
7410
- logger17.error(
7411
+ logger18.error(
7411
7412
  {
7412
7413
  functionId,
7413
7414
  error: errorMessage,
@@ -7432,19 +7433,19 @@ var SandboxExecutorFactory_exports = {};
7432
7433
  __export(SandboxExecutorFactory_exports, {
7433
7434
  SandboxExecutorFactory: () => SandboxExecutorFactory
7434
7435
  });
7435
- var logger18, SandboxExecutorFactory;
7436
+ var logger19, SandboxExecutorFactory;
7436
7437
  var init_SandboxExecutorFactory = __esm({
7437
7438
  "src/tools/SandboxExecutorFactory.ts"() {
7438
7439
  init_logger();
7439
7440
  init_NativeSandboxExecutor();
7440
7441
  init_VercelSandboxExecutor();
7441
- logger18 = agentsCore.getLogger("SandboxExecutorFactory");
7442
+ logger19 = agentsCore.getLogger("SandboxExecutorFactory");
7442
7443
  SandboxExecutorFactory = class _SandboxExecutorFactory {
7443
7444
  static instance;
7444
7445
  nativeExecutor = null;
7445
7446
  vercelExecutors = /* @__PURE__ */ new Map();
7446
7447
  constructor() {
7447
- logger18.info({}, "SandboxExecutorFactory initialized");
7448
+ logger19.info({}, "SandboxExecutorFactory initialized");
7448
7449
  }
7449
7450
  /**
7450
7451
  * Get singleton instance of SandboxExecutorFactory
@@ -7477,7 +7478,7 @@ var init_SandboxExecutorFactory = __esm({
7477
7478
  async executeInNativeSandbox(functionId, args2, config) {
7478
7479
  if (!this.nativeExecutor) {
7479
7480
  this.nativeExecutor = NativeSandboxExecutor.getInstance();
7480
- logger18.info({}, "Native sandbox executor created");
7481
+ logger19.info({}, "Native sandbox executor created");
7481
7482
  }
7482
7483
  return this.nativeExecutor.executeFunctionTool(functionId, args2, config);
7483
7484
  }
@@ -7490,7 +7491,7 @@ var init_SandboxExecutorFactory = __esm({
7490
7491
  if (!this.vercelExecutors.has(configKey)) {
7491
7492
  const executor2 = VercelSandboxExecutor.getInstance(vercelConfig);
7492
7493
  this.vercelExecutors.set(configKey, executor2);
7493
- logger18.info(
7494
+ logger19.info(
7494
7495
  {
7495
7496
  teamId: vercelConfig.teamId,
7496
7497
  projectId: vercelConfig.projectId
@@ -7512,13 +7513,13 @@ var init_SandboxExecutorFactory = __esm({
7512
7513
  * Clean up all sandbox executors
7513
7514
  */
7514
7515
  async cleanup() {
7515
- logger18.info({}, "Cleaning up sandbox executors");
7516
+ logger19.info({}, "Cleaning up sandbox executors");
7516
7517
  this.nativeExecutor = null;
7517
7518
  for (const [key, executor] of this.vercelExecutors.entries()) {
7518
7519
  await executor.cleanup();
7519
7520
  this.vercelExecutors.delete(key);
7520
7521
  }
7521
- logger18.info({}, "Sandbox executor cleanup completed");
7522
+ logger19.info({}, "Sandbox executor cleanup completed");
7522
7523
  }
7523
7524
  };
7524
7525
  }
@@ -7597,7 +7598,7 @@ var defaultContextManager = new contextAsyncHooks.AsyncLocalStorageContextManage
7597
7598
  var defaultTextMapPropagator = new core.CompositePropagator({
7598
7599
  propagators: [new core.W3CTraceContextPropagator(), new core.W3CBaggagePropagator()]
7599
7600
  });
7600
- new sdkNode.NodeSDK({
7601
+ var defaultSDK = new sdkNode.NodeSDK({
7601
7602
  resource: defaultResource,
7602
7603
  contextManager: defaultContextManager,
7603
7604
  textMapPropagator: defaultTextMapPropagator,
@@ -7611,8 +7612,6 @@ async function flushBatchProcessor() {
7611
7612
  logger.warn({ error }, "Failed to flush batch processor");
7612
7613
  }
7613
7614
  }
7614
-
7615
- // src/app.ts
7616
7615
  init_logger();
7617
7616
 
7618
7617
  // src/middleware/api-key-auth.ts
@@ -7621,6 +7620,10 @@ init_env();
7621
7620
  init_logger();
7622
7621
 
7623
7622
  // src/types/execution-context.ts
7623
+ function getUserIdFromContext(ctx) {
7624
+ const metadata2 = ctx.metadata;
7625
+ return metadata2?.initiatedBy?.type === "user" ? metadata2.initiatedBy.id : void 0;
7626
+ }
7624
7627
  function createExecutionContext(params) {
7625
7628
  return {
7626
7629
  apiKey: params.apiKey,
@@ -9234,7 +9237,7 @@ var ArtifactService = class _ArtifactService {
9234
9237
  const summaryValidation = validateAgainstSchema(summaryData, previewSchema);
9235
9238
  const fullValidation = validateAgainstSchema(fullData, fullSchema);
9236
9239
  if (!summaryValidation.hasRequiredFields) {
9237
- const error = new Error(
9240
+ new Error(
9238
9241
  `Cannot save artifact: Missing required fields [${summaryValidation.missingRequired.join(", ")}] for '${artifactType}' schema. Required: [${summaryValidation.missingRequired.join(", ")}]. Found: [${summaryValidation.actualFields.join(", ")}]. Consider using a different artifact component type that matches your data structure.`
9239
9242
  );
9240
9243
  logger6.error(
@@ -9245,9 +9248,13 @@ var ArtifactService = class _ArtifactService {
9245
9248
  actualFields: summaryValidation.actualFields,
9246
9249
  schemaExpected: previewSchema?.properties ? Object.keys(previewSchema.properties) : []
9247
9250
  },
9248
- "Blocking artifact save due to missing required fields"
9251
+ "Artifact creation failed due to missing required fields - continuing with generation"
9249
9252
  );
9250
- throw error;
9253
+ return {
9254
+ summary: summaryValidation,
9255
+ full: fullValidation,
9256
+ schemaFound: !!previewSchema
9257
+ };
9251
9258
  }
9252
9259
  if (!summaryValidation.hasExpectedFields || summaryValidation.extraFields.length > 0) {
9253
9260
  logger6.warn(
@@ -9397,7 +9404,7 @@ var ArtifactService = class _ArtifactService {
9397
9404
  * Used by AgentSession to save artifacts after name/description generation
9398
9405
  */
9399
9406
  async saveArtifact(artifact) {
9400
- let summaryData = artifact.data;
9407
+ let summaryData = artifact.summaryData || artifact.data;
9401
9408
  let fullData = artifact.data;
9402
9409
  if (this.context.artifactComponents) {
9403
9410
  const artifactComponent = this.context.artifactComponents.find(
@@ -9985,7 +9992,6 @@ var AgentSession = class {
9985
9992
  * Send data operation to stream when emit operations is enabled
9986
9993
  */
9987
9994
  async sendDataOperation(event) {
9988
- console.log("sendDataOperation called with event", Date.now());
9989
9995
  try {
9990
9996
  const streamHelper = getStreamHelper(this.sessionId);
9991
9997
  if (streamHelper) {
@@ -10036,6 +10042,8 @@ var AgentSession = class {
10036
10042
  return `Task completed: ${event.data.targetSubAgent} \u2192 ${event.data.fromSubAgent}`;
10037
10043
  case "artifact_saved":
10038
10044
  return `Artifact saved: ${event.data.artifactType || "unknown type"}`;
10045
+ case "compression":
10046
+ return `Compressed ${event.data.messageCount} messages and ${event.data.artifactCount} artifacts (${event.data.reason})`;
10039
10047
  default:
10040
10048
  return `${event.eventType} event`;
10041
10049
  }
@@ -10282,13 +10290,30 @@ var AgentSession = class {
10282
10290
  /**
10283
10291
  * Clean up status update resources when session ends
10284
10292
  */
10285
- cleanup() {
10293
+ async cleanup() {
10286
10294
  this.isEnded = true;
10287
10295
  if (this.statusUpdateTimer) {
10288
10296
  clearInterval(this.statusUpdateTimer);
10289
10297
  this.statusUpdateTimer = void 0;
10290
10298
  }
10291
10299
  this.statusUpdateState = void 0;
10300
+ if (this.pendingArtifacts.size > 0) {
10301
+ const maxWaitTime = 1e4;
10302
+ const startTime = Date.now();
10303
+ while (this.pendingArtifacts.size > 0 && Date.now() - startTime < maxWaitTime) {
10304
+ await new Promise((resolve2) => setTimeout(resolve2, 100));
10305
+ }
10306
+ if (this.pendingArtifacts.size > 0) {
10307
+ logger8.warn(
10308
+ {
10309
+ sessionId: this.sessionId,
10310
+ pendingCount: this.pendingArtifacts.size,
10311
+ pendingIds: Array.from(this.pendingArtifacts)
10312
+ },
10313
+ "Cleanup proceeding with pending artifacts still processing"
10314
+ );
10315
+ }
10316
+ }
10292
10317
  this.pendingArtifacts.clear();
10293
10318
  this.artifactProcessingErrors.clear();
10294
10319
  this.artifactCache.clear();
@@ -10901,17 +10926,59 @@ ${this.statusUpdateState?.config.prompt?.trim() || ""}`;
10901
10926
  (event) => event.eventType === "tool_result" && event.data && "toolCallId" in event.data && event.data.toolCallId === artifactData.metadata?.toolCallId
10902
10927
  );
10903
10928
  const toolContext = toolCallEvent ? {
10904
- toolName: toolCallEvent.data.toolName,
10905
10929
  args: toolCallEvent.data.args
10906
10930
  } : null;
10907
- const prompt = `Name this artifact (max 50 chars) and describe it (max 150 chars).
10931
+ let existingNames = [];
10932
+ try {
10933
+ if (artifactData.tenantId && artifactData.projectId && artifactData.taskId) {
10934
+ const existingArtifacts = await agentsCore.getLedgerArtifacts(dbClient_default)({
10935
+ scopes: { tenantId: artifactData.tenantId, projectId: artifactData.projectId },
10936
+ taskId: artifactData.taskId
10937
+ });
10938
+ existingNames = existingArtifacts.map((a2) => a2.name).filter(Boolean);
10939
+ }
10940
+ } catch (error) {
10941
+ logger8.warn(
10942
+ {
10943
+ sessionId: this.sessionId,
10944
+ artifactId: artifactData.artifactId,
10945
+ error: error instanceof Error ? error.message : "Unknown error"
10946
+ },
10947
+ "Failed to fetch existing artifact names for context"
10948
+ );
10949
+ }
10950
+ const toolName = artifactData.metadata?.toolName || "unknown";
10951
+ const toolCallId = artifactData.metadata?.toolCallId || "unknown";
10952
+ const prompt = `Create a unique name and description for this tool result artifact.
10953
+
10954
+ CRITICAL: Your name must be different from these existing artifacts: ${existingNames.length > 0 ? existingNames.join(", ") : "None yet"}
10908
10955
 
10909
- Tool Context: ${toolContext ? JSON.stringify(toolContext, null, 2) : "No tool context"}
10910
- Context: ${conversationHistory?.slice(-200) || "Processing"}
10956
+ Tool Context: ${toolContext ? JSON.stringify(toolContext.args, null, 2) : "No args"}
10957
+ Context: ${conversationHistory?.slice(-200) || "No context"}
10911
10958
  Type: ${artifactData.artifactType || "data"}
10912
- Data: ${JSON.stringify(artifactData.data || artifactData.summaryData, null, 2)}
10959
+ Data: ${JSON.stringify(artifactData.data || artifactData.summaryData || {}, null, 2)}
10960
+
10961
+ Requirements:
10962
+ - Name: Max 50 chars, be extremely specific to THIS EXACT tool execution
10963
+ - Description: Max 150 chars, describe what THIS SPECIFIC tool call returned
10964
+ - Focus on the unique aspects of this particular tool execution result
10965
+ - Be descriptive about the actual content returned, not just the tool type
10966
+
10967
+ BAD Examples (too generic):
10968
+ - "Search Results"
10969
+ - "Tool Results"
10970
+ - "${toolName} Results"
10971
+ - "Data from ${toolName}"
10972
+ - "Tool Output"
10973
+ - "Search Data"
10974
+
10975
+ GOOD Examples:
10976
+ - "GitHub API Rate Limits & Auth Methods"
10977
+ - "React Component Props Documentation"
10978
+ - "Database Schema for User Tables"
10979
+ - "Pricing Tiers with Enterprise Features"
10913
10980
 
10914
- Make it specific and relevant.`;
10981
+ Make the name extremely specific to what this tool call actually returned, not generic.`;
10915
10982
  let modelToUse = this.statusUpdateState?.summarizerModel;
10916
10983
  if (!modelToUse?.model?.trim()) {
10917
10984
  if (!this.statusUpdateState?.baseModel?.model?.trim()) {
@@ -10965,9 +11032,10 @@ Make it specific and relevant.`;
10965
11032
  }
10966
11033
  let result;
10967
11034
  if (!modelToUse) {
11035
+ const toolCallSuffix = artifactData.metadata?.toolCallId?.slice(-8) || Date.now().toString().slice(-8);
10968
11036
  result = {
10969
- name: `Artifact ${artifactData.artifactId.substring(0, 8)}`,
10970
- description: `${artifactData.artifactType || "Data"} from ${artifactData.metadata?.toolCallId || "tool results"}`
11037
+ name: `${artifactData.artifactType || "Artifact"} ${toolCallSuffix}`,
11038
+ description: `${artifactData.artifactType || "Data"} from ${artifactData.metadata?.toolName || "tool"} (${artifactData.metadata?.toolCallId || "tool results"})`
10971
11039
  };
10972
11040
  } else {
10973
11041
  const model = agentsCore.ModelFactory.createModel(modelToUse);
@@ -11062,13 +11130,32 @@ Make it specific and relevant.`;
11062
11130
  );
11063
11131
  result = object;
11064
11132
  }
11133
+ if (existingNames.includes(result.name)) {
11134
+ const toolCallSuffix = toolCallId.slice(-8);
11135
+ const originalName = result.name;
11136
+ result.name = result.name.length + toolCallSuffix.length + 1 <= 50 ? `${result.name} ${toolCallSuffix}` : `${result.name.substring(0, 50 - toolCallSuffix.length - 1)} ${toolCallSuffix}`;
11137
+ logger8.info(
11138
+ {
11139
+ sessionId: this.sessionId,
11140
+ artifactId: artifactData.artifactId,
11141
+ originalName,
11142
+ uniqueName: result.name,
11143
+ reason: "Name conflict resolved with toolCallId suffix"
11144
+ },
11145
+ "Updated artifact name for uniqueness"
11146
+ );
11147
+ }
11065
11148
  try {
11149
+ if (!this.artifactService) {
11150
+ throw new Error("ArtifactService is not initialized");
11151
+ }
11066
11152
  await this.artifactService.saveArtifact({
11067
11153
  artifactId: artifactData.artifactId,
11068
11154
  name: result.name,
11069
11155
  description: result.description,
11070
11156
  type: artifactData.artifactType || "source",
11071
11157
  data: artifactData.data || {},
11158
+ summaryData: artifactData.summaryData,
11072
11159
  metadata: artifactData.metadata || {},
11073
11160
  toolCallId: artifactData.toolCallId
11074
11161
  });
@@ -11084,7 +11171,13 @@ Make it specific and relevant.`;
11084
11171
  {
11085
11172
  sessionId: this.sessionId,
11086
11173
  artifactId: artifactData.artifactId,
11087
- error: saveError instanceof Error ? saveError.message : "Unknown error"
11174
+ error: saveError instanceof Error ? saveError.message : "Unknown error",
11175
+ errorName: saveError instanceof Error ? saveError.name : void 0,
11176
+ errorCause: saveError instanceof Error ? saveError.cause : void 0,
11177
+ errorCode: saveError?.code || saveError?.errno || void 0,
11178
+ artifactType: artifactData.artifactType,
11179
+ dataKeys: artifactData.data ? Object.keys(artifactData.data) : [],
11180
+ metadataKeys: artifactData.metadata ? Object.keys(artifactData.metadata) : []
11088
11181
  },
11089
11182
  "Main artifact save failed, will attempt fallback"
11090
11183
  );
@@ -11105,6 +11198,7 @@ Make it specific and relevant.`;
11105
11198
  description: `${artifactData.artifactType || "Data"} from ${artifactData.metadata?.toolName || "tool results"}`,
11106
11199
  type: artifactData.artifactType || "source",
11107
11200
  data: artifactData.data || {},
11201
+ summaryData: artifactData.summaryData,
11108
11202
  metadata: artifactData.metadata || {},
11109
11203
  toolCallId: artifactData.toolCallId
11110
11204
  });
@@ -11123,7 +11217,13 @@ Make it specific and relevant.`;
11123
11217
  {
11124
11218
  sessionId: this.sessionId,
11125
11219
  artifactId: artifactData.artifactId,
11126
- error: fallbackError instanceof Error ? fallbackError.message : "Unknown error"
11220
+ error: fallbackError instanceof Error ? fallbackError.message : "Unknown error",
11221
+ errorName: fallbackError instanceof Error ? fallbackError.name : void 0,
11222
+ errorCause: fallbackError instanceof Error ? fallbackError.cause : void 0,
11223
+ errorCode: fallbackError?.code || fallbackError?.errno || void 0,
11224
+ artifactType: artifactData.artifactType,
11225
+ dataKeys: artifactData.data ? Object.keys(artifactData.data) : [],
11226
+ metadataKeys: artifactData.metadata ? Object.keys(artifactData.metadata) : []
11127
11227
  },
11128
11228
  "Failed to save artifact even with fallback"
11129
11229
  );
@@ -11252,7 +11352,7 @@ var AgentSessionManager = class {
11252
11352
  /**
11253
11353
  * End a session and return the final event data
11254
11354
  */
11255
- endSession(sessionId) {
11355
+ async endSession(sessionId) {
11256
11356
  const session = this.sessions.get(sessionId);
11257
11357
  if (!session) {
11258
11358
  logger8.warn({ sessionId }, "Attempted to end non-existent session");
@@ -11261,7 +11361,7 @@ var AgentSessionManager = class {
11261
11361
  const events = session.getEvents();
11262
11362
  const summary = session.getSummary();
11263
11363
  logger8.info({ sessionId, summary }, "AgentSession ended");
11264
- session.cleanup();
11364
+ await session.cleanup();
11265
11365
  this.sessions.delete(sessionId);
11266
11366
  return events;
11267
11367
  }
@@ -11769,9 +11869,660 @@ ${chunk}`;
11769
11869
  }
11770
11870
  };
11771
11871
 
11872
+ // src/services/MidGenerationCompressor.ts
11873
+ init_logger();
11874
+
11875
+ // src/tools/distill-conversation-tool.ts
11876
+ init_logger();
11877
+ var logger10 = agentsCore.getLogger("distill-conversation-tool");
11878
+ var ConversationSummarySchema = zod.z.object({
11879
+ type: zod.z.literal("conversation_summary_v1"),
11880
+ session_id: zod.z.string().nullable().optional(),
11881
+ high_level: zod.z.string().describe("1-3 sentences capturing what was discovered and learned"),
11882
+ user_intent: zod.z.string().describe("Current main goal or what the user wants to accomplish"),
11883
+ decisions: zod.z.array(zod.z.string()).describe("Concrete decisions made about approach or implementation (\u22645 items)"),
11884
+ open_questions: zod.z.array(zod.z.string()).describe("Unresolved questions about the subject matter (\u22645 items)"),
11885
+ next_steps: zod.z.object({
11886
+ for_agent: zod.z.array(zod.z.string()).describe(
11887
+ "Content-focused actions: what to discover, analyze, or present. Don't get trapped in an infinite loop of tool calls. You have already done a lot of work that is why you are being compressed. Don't encourage too much more work."
11888
+ ),
11889
+ for_user: zod.z.array(zod.z.string()).describe("Actions for user based on discovered content")
11890
+ }),
11891
+ related_artifacts: zod.z.array(
11892
+ zod.z.object({
11893
+ id: zod.z.string().describe("Artifact ID"),
11894
+ name: zod.z.string().describe("Human-readable name describing the content"),
11895
+ tool_name: zod.z.string().describe("Tool that generated this artifact (e.g. search-inkeep-docs)"),
11896
+ tool_call_id: zod.z.string().describe("Specific tool call ID for precise referencing"),
11897
+ content_type: zod.z.string().describe("Type of content (e.g. search_results, api_response, documentation)"),
11898
+ key_findings: zod.z.array(zod.z.string()).describe("2-3 most important findings from this specific artifact")
11899
+ })
11900
+ ).optional().describe("Artifacts containing detailed findings with citation info")
11901
+ });
11902
+ async function distillConversation(params) {
11903
+ const { messages, conversationId, currentSummary, summarizerModel, toolCallToArtifactMap } = params;
11904
+ try {
11905
+ const modelToUse = summarizerModel;
11906
+ if (!modelToUse?.model?.trim()) {
11907
+ throw new Error("Summarizer model is required");
11908
+ }
11909
+ const model = agentsCore.ModelFactory.createModel(modelToUse);
11910
+ const existingSummaryContext = currentSummary ? `**Current summary:**
11911
+
11912
+ \`\`\`json
11913
+ ${JSON.stringify(currentSummary, null, 2)}
11914
+ \`\`\`` : "**Current summary:** None (first distillation)";
11915
+ const formattedMessages = messages.map((msg) => {
11916
+ const parts2 = [];
11917
+ if (typeof msg.content === "string") {
11918
+ parts2.push(msg.content);
11919
+ } else if (Array.isArray(msg.content)) {
11920
+ for (const block of msg.content) {
11921
+ if (block.type === "text") {
11922
+ parts2.push(block.text);
11923
+ } else if (block.type === "tool-call") {
11924
+ parts2.push(
11925
+ `[TOOL CALL] ${block.toolName}(${JSON.stringify(block.input)}) [ID: ${block.toolCallId}]`
11926
+ );
11927
+ } else if (block.type === "tool-result") {
11928
+ const artifactId = toolCallToArtifactMap?.[block.toolCallId];
11929
+ const artifactInfo = artifactId ? `
11930
+ [ARTIFACT CREATED: ${artifactId}]` : "";
11931
+ parts2.push(
11932
+ `[TOOL RESULT] ${block.toolName} [ID: ${block.toolCallId}]${artifactInfo}
11933
+ Result: ${JSON.stringify(block.result)}`
11934
+ );
11935
+ }
11936
+ }
11937
+ } else if (msg.content?.text) {
11938
+ parts2.push(msg.content.text);
11939
+ }
11940
+ return parts2.length > 0 ? `${msg.role || "system"}: ${parts2.join("\n")}` : "";
11941
+ }).filter((line) => line.trim().length > 0).join("\n\n");
11942
+ logger10.debug(
11943
+ {
11944
+ conversationId,
11945
+ messageCount: messages.length,
11946
+ formattedLength: formattedMessages.length,
11947
+ sampleMessages: messages.slice(0, 2).map((m4) => ({ role: m4.role, contentType: typeof m4.content, hasContent: !!m4.content }))
11948
+ },
11949
+ "Formatting messages for distillation"
11950
+ );
11951
+ const prompt = `You are a conversation summarization assistant. Your job is to create or update a compact, structured summary that captures VALUABLE CONTENT and FINDINGS, not just operational details.
11952
+
11953
+ ${existingSummaryContext}
11954
+
11955
+ **Messages to summarize:**
11956
+
11957
+ \`\`\`text
11958
+ ${formattedMessages}
11959
+ \`\`\`
11960
+
11961
+ Create/update a summary using this exact JSON schema:
11962
+
11963
+ \`\`\`json
11964
+ {
11965
+ "type": "conversation_summary_v1",
11966
+ "session_id": "<conversationId>",
11967
+ "high_level": "<1\u20133 sentences capturing what was discovered and learned>",
11968
+ "user_intent": "<current main goal>",
11969
+ "decisions": ["<concrete decisions made>"],
11970
+ "open_questions": ["<unresolved issues>"],
11971
+ "next_steps": {
11972
+ "for_agent": ["<what agent should do>"],
11973
+ "for_user": ["<what user should do>"]
11974
+ },
11975
+ "related_artifacts": [
11976
+ {
11977
+ "id": "<artifact_id>",
11978
+ "name": "<descriptive name>",
11979
+ "tool_name": "<tool_name>",
11980
+ "tool_call_id": "<tool_call_id>",
11981
+ "content_type": "<search_results|api_response|documentation>",
11982
+ "key_findings": ["<important finding 1>", "<important finding 2>"]
11983
+ }
11984
+ ]
11985
+ }
11986
+ \`\`\`
11987
+
11988
+ **CRITICAL RULES - FOCUS ON CONTENT NOT OPERATIONS:**
11989
+ \u{1F3AF} **EXTRACT VALUABLE FINDINGS**: Capture the actual information discovered, data retrieved, insights gained
11990
+ \u{1F3AF} **IGNORE OPERATIONAL DETAILS**: Don't mention "tool was used", "artifact was created", "messages were compressed"
11991
+ \u{1F3AF} **PRESERVE SUBSTANCE**: Include specific facts, features, capabilities, configurations, results found
11992
+ \u{1F3AF} **BUILD KNOWLEDGE**: When updating existing summary, ADD new discoveries to existing knowledge
11993
+ \u{1F3AF} **BE CONCRETE**: Use specific details from tool results, not generic descriptions
11994
+ \u{1F3AF} **BE CONCISE**: Keep ALL fields brief - you are compressing to save context, not writing a report
11995
+ \u{1F3AF} **LIMIT NEXT STEPS**: Agent has already done substantial work - suggest minimal follow-up actions only
11996
+
11997
+ **Examples:**
11998
+ \u274C BAD: "Assistant used search tool and created artifacts"
11999
+ \u2705 GOOD: "Inkeep supports streaming structured objects, OpenAI-compatible APIs, analytics logging, and Zendesk integration"
12000
+
12001
+ \u274C BAD: "Tool calls were made to gather information"
12002
+ \u2705 GOOD: "Platform includes 10 feature categories: chat widgets, knowledge base, analytics, integrations, theming options"
12003
+
12004
+ **Focus on WHAT WAS LEARNED, not HOW IT WAS LEARNED**
12005
+
12006
+ Return **only** valid JSON.`;
12007
+ const { object: summary } = await ai.generateObject({
12008
+ model,
12009
+ prompt,
12010
+ schema: ConversationSummarySchema
12011
+ });
12012
+ summary.session_id = conversationId;
12013
+ logger10.info(
12014
+ {
12015
+ conversationId,
12016
+ messageCount: messages.length,
12017
+ artifactsCount: summary.related_artifacts?.length || 0,
12018
+ decisionsCount: summary.decisions.length
12019
+ },
12020
+ "Successfully distilled conversation"
12021
+ );
12022
+ return summary;
12023
+ } catch (error) {
12024
+ logger10.error(
12025
+ {
12026
+ conversationId,
12027
+ messageCount: messages.length,
12028
+ error: error instanceof Error ? error.message : "Unknown error"
12029
+ },
12030
+ "Failed to distill conversation"
12031
+ );
12032
+ return {
12033
+ type: "conversation_summary_v1",
12034
+ session_id: conversationId,
12035
+ high_level: "Ongoing conversation session",
12036
+ user_intent: "Continue working on current task",
12037
+ related_artifacts: [],
12038
+ decisions: [],
12039
+ open_questions: ["Review recent work and determine next steps"],
12040
+ next_steps: {
12041
+ for_agent: ["Continue with current task"],
12042
+ for_user: ["Provide additional guidance if needed"]
12043
+ }
12044
+ };
12045
+ }
12046
+ }
12047
+
12048
+ // src/services/MidGenerationCompressor.ts
12049
+ var logger11 = agentsCore.getLogger("MidGenerationCompressor");
12050
+ function getCompressionConfigFromEnv() {
12051
+ return {
12052
+ hardLimit: parseInt(process.env.AGENTS_COMPRESSION_HARD_LIMIT || "120000"),
12053
+ safetyBuffer: parseInt(process.env.AGENTS_COMPRESSION_SAFETY_BUFFER || "20000"),
12054
+ enabled: process.env.AGENTS_COMPRESSION_ENABLED !== "false"
12055
+ // Default enabled
12056
+ };
12057
+ }
12058
+ var MidGenerationCompressor = class {
12059
+ // Track cumulative summary across compression cycles
12060
+ constructor(sessionId, conversationId, tenantId, projectId, config, summarizerModel, baseModel) {
12061
+ this.sessionId = sessionId;
12062
+ this.conversationId = conversationId;
12063
+ this.tenantId = tenantId;
12064
+ this.projectId = projectId;
12065
+ this.config = config;
12066
+ this.summarizerModel = summarizerModel;
12067
+ this.baseModel = baseModel;
12068
+ }
12069
+ shouldCompress = false;
12070
+ processedToolCalls = /* @__PURE__ */ new Set();
12071
+ // Track already compressed tool call IDs
12072
+ lastProcessedMessageIndex = 0;
12073
+ // Track where we left off in message processing
12074
+ cumulativeSummary = null;
12075
+ /**
12076
+ * Get the hard limit for compression decisions
12077
+ */
12078
+ getHardLimit() {
12079
+ return this.config.hardLimit;
12080
+ }
12081
+ /**
12082
+ * Estimate tokens (4 chars = 1 token)
12083
+ */
12084
+ estimateTokens(content) {
12085
+ const text = typeof content === "string" ? content : JSON.stringify(content);
12086
+ return Math.ceil(text.length / 4);
12087
+ }
12088
+ /**
12089
+ * Calculate total context size
12090
+ */
12091
+ calculateContextSize(messages) {
12092
+ const messageTokens = messages.reduce((total, msg) => {
12093
+ let msgTokens = 0;
12094
+ if (Array.isArray(msg.content)) {
12095
+ for (const block of msg.content) {
12096
+ if (block.type === "text") {
12097
+ msgTokens += this.estimateTokens(block.text || "");
12098
+ } else if (block.type === "tool-call") {
12099
+ msgTokens += this.estimateTokens(
12100
+ JSON.stringify({
12101
+ toolCallId: block.toolCallId,
12102
+ toolName: block.toolName,
12103
+ input: block.input
12104
+ })
12105
+ );
12106
+ } else if (block.type === "tool-result") {
12107
+ msgTokens += this.estimateTokens(
12108
+ JSON.stringify({
12109
+ toolCallId: block.toolCallId,
12110
+ toolName: block.toolName,
12111
+ output: block.output
12112
+ })
12113
+ );
12114
+ }
12115
+ }
12116
+ } else if (typeof msg.content === "string") {
12117
+ msgTokens += this.estimateTokens(msg.content);
12118
+ } else if (msg.content) {
12119
+ msgTokens += this.estimateTokens(JSON.stringify(msg.content));
12120
+ }
12121
+ return total + msgTokens;
12122
+ }, 0);
12123
+ return messageTokens;
12124
+ }
12125
+ /**
12126
+ * Manual compression request from LLM tool
12127
+ */
12128
+ requestManualCompression(reason) {
12129
+ this.shouldCompress = true;
12130
+ logger11.info(
12131
+ {
12132
+ sessionId: this.sessionId,
12133
+ reason: reason || "Manual request from LLM"
12134
+ },
12135
+ "Manual compression requested"
12136
+ );
12137
+ }
12138
+ /**
12139
+ * Check if compression is needed (either automatic or manual)
12140
+ */
12141
+ isCompressionNeeded(messages) {
12142
+ if (this.shouldCompress) return true;
12143
+ const contextSize = this.calculateContextSize(messages);
12144
+ const remaining = this.config.hardLimit - contextSize;
12145
+ return remaining <= this.config.safetyBuffer;
12146
+ }
12147
+ /**
12148
+ * Perform compression: save all tool results as artifacts and create summary
12149
+ */
12150
+ async compress(messages) {
12151
+ const contextSizeBefore = this.calculateContextSize(messages);
12152
+ logger11.info(
12153
+ {
12154
+ sessionId: this.sessionId,
12155
+ messageCount: messages.length,
12156
+ contextSize: contextSizeBefore
12157
+ },
12158
+ "COMPRESSION: Starting compression"
12159
+ );
12160
+ const toolResultCount = messages.reduce((count, msg) => {
12161
+ if (Array.isArray(msg.content)) {
12162
+ return count + msg.content.filter((block) => block.type === "tool-result").length;
12163
+ }
12164
+ return count;
12165
+ }, 0);
12166
+ logger11.debug({ toolResultCount }, "Tool results found for compression");
12167
+ const toolCallToArtifactMap = await this.saveToolResultsAsArtifacts(messages);
12168
+ const summary = await this.createConversationSummary(messages, toolCallToArtifactMap);
12169
+ const contextSizeAfter = this.estimateTokens(JSON.stringify(summary));
12170
+ const session = agentSessionManager.getSession(this.sessionId);
12171
+ if (session) {
12172
+ const wasManualRequest = this.shouldCompress;
12173
+ session.recordEvent("compression", this.sessionId, {
12174
+ reason: wasManualRequest ? "manual" : "automatic",
12175
+ messageCount: messages.length,
12176
+ artifactCount: Object.keys(toolCallToArtifactMap).length,
12177
+ contextSizeBefore,
12178
+ contextSizeAfter,
12179
+ compressionType: "mid_generation"
12180
+ });
12181
+ }
12182
+ this.shouldCompress = false;
12183
+ logger11.info(
12184
+ {
12185
+ sessionId: this.sessionId,
12186
+ artifactsCreated: Object.keys(toolCallToArtifactMap).length,
12187
+ messageCount: messages.length,
12188
+ contextSizeBefore,
12189
+ contextSizeAfter,
12190
+ artifactIds: Object.values(toolCallToArtifactMap)
12191
+ },
12192
+ "COMPRESSION: Compression completed successfully"
12193
+ );
12194
+ return { artifactIds: Object.values(toolCallToArtifactMap), summary };
12195
+ }
12196
+ /**
12197
+ * 1. Save NEW tool results as artifacts (only process messages since last compression)
12198
+ */
12199
+ async saveToolResultsAsArtifacts(messages) {
12200
+ const session = agentSessionManager.getSession(this.sessionId);
12201
+ if (!session) {
12202
+ throw new Error(`No session found: ${this.sessionId}`);
12203
+ }
12204
+ const toolCallToArtifactMap = {};
12205
+ const newMessages = messages.slice(this.lastProcessedMessageIndex);
12206
+ logger11.debug(
12207
+ {
12208
+ totalMessages: messages.length,
12209
+ newMessages: newMessages.length,
12210
+ startIndex: this.lastProcessedMessageIndex
12211
+ },
12212
+ "Starting compression artifact processing"
12213
+ );
12214
+ for (const message of newMessages) {
12215
+ if (Array.isArray(message.content)) {
12216
+ for (const block of message.content) {
12217
+ if (block.type === "tool-result") {
12218
+ if (block.toolName === "get_reference_artifact" || block.toolName === "thinking_complete") {
12219
+ logger11.debug(
12220
+ {
12221
+ toolCallId: block.toolCallId,
12222
+ toolName: block.toolName
12223
+ },
12224
+ "Skipping special tool - not creating artifacts"
12225
+ );
12226
+ this.processedToolCalls.add(block.toolCallId);
12227
+ continue;
12228
+ }
12229
+ if (this.processedToolCalls.has(block.toolCallId)) {
12230
+ logger11.debug(
12231
+ {
12232
+ toolCallId: block.toolCallId,
12233
+ toolName: block.toolName
12234
+ },
12235
+ "Skipping already processed tool call"
12236
+ );
12237
+ continue;
12238
+ }
12239
+ const artifactId = `compress_${block.toolName || "tool"}_${block.toolCallId || Date.now()}_${crypto2.randomUUID().slice(0, 8)}`;
12240
+ logger11.debug(
12241
+ {
12242
+ artifactId,
12243
+ toolName: block.toolName,
12244
+ toolCallId: block.toolCallId
12245
+ },
12246
+ "Saving compression artifact"
12247
+ );
12248
+ let toolInput = null;
12249
+ if (Array.isArray(message.content)) {
12250
+ const toolCall = message.content.find(
12251
+ (b3) => b3.type === "tool-call" && b3.toolCallId === block.toolCallId
12252
+ );
12253
+ toolInput = toolCall?.input;
12254
+ }
12255
+ const cleanToolResult = this.removeStructureHints(block.output);
12256
+ const toolResultData = {
12257
+ toolName: block.toolName,
12258
+ toolInput,
12259
+ toolResult: cleanToolResult,
12260
+ compressedAt: (/* @__PURE__ */ new Date()).toISOString()
12261
+ };
12262
+ if (this.isEmpty(toolResultData)) {
12263
+ logger11.debug(
12264
+ {
12265
+ toolName: block.toolName,
12266
+ toolCallId: block.toolCallId
12267
+ },
12268
+ "Skipping empty tool result"
12269
+ );
12270
+ continue;
12271
+ }
12272
+ const artifactData = {
12273
+ artifactId,
12274
+ taskId: `task_${this.conversationId}-${this.sessionId}`,
12275
+ toolCallId: block.toolCallId,
12276
+ artifactType: "tool_result",
12277
+ pendingGeneration: true,
12278
+ // Triggers LLM-generated name/description
12279
+ tenantId: this.tenantId,
12280
+ projectId: this.projectId,
12281
+ contextId: this.conversationId,
12282
+ subAgentId: this.sessionId,
12283
+ metadata: {
12284
+ toolCallId: block.toolCallId,
12285
+ toolName: block.toolName,
12286
+ compressionReason: "mid_generation_context_limit"
12287
+ },
12288
+ // Pass data in the format expected by ArtifactSavedData interface
12289
+ summaryData: {
12290
+ toolName: block.toolName,
12291
+ note: "Compressed tool result - see full data for details"
12292
+ },
12293
+ data: toolResultData
12294
+ // Full tool result data
12295
+ };
12296
+ const fullData = artifactData.data;
12297
+ const hasFullData = fullData && typeof fullData === "object" && Object.keys(fullData).length > 0 && // Check if toolResult specifically has content
12298
+ fullData.toolResult && (typeof fullData.toolResult !== "object" || Object.keys(fullData.toolResult).length > 0);
12299
+ if (!hasFullData) {
12300
+ logger11.debug(
12301
+ {
12302
+ artifactId,
12303
+ toolName: block.toolName,
12304
+ toolCallId: block.toolCallId
12305
+ },
12306
+ "Skipping empty compression artifact"
12307
+ );
12308
+ continue;
12309
+ }
12310
+ session.recordEvent("artifact_saved", this.sessionId, artifactData);
12311
+ this.processedToolCalls.add(block.toolCallId);
12312
+ toolCallToArtifactMap[block.toolCallId] = artifactId;
12313
+ }
12314
+ }
12315
+ }
12316
+ }
12317
+ this.lastProcessedMessageIndex = messages.length;
12318
+ logger11.debug(
12319
+ {
12320
+ totalArtifactsCreated: Object.keys(toolCallToArtifactMap).length,
12321
+ newMessageIndex: this.lastProcessedMessageIndex
12322
+ },
12323
+ "Compression artifact processing completed"
12324
+ );
12325
+ return toolCallToArtifactMap;
12326
+ }
12327
+ /**
12328
+ * 3. Create conversation summary with artifact references
12329
+ */
12330
+ async createConversationSummary(messages, toolCallToArtifactMap) {
12331
+ const textMessages = this.extractTextMessages(messages, toolCallToArtifactMap);
12332
+ logger11.debug(
12333
+ {
12334
+ sessionId: this.sessionId,
12335
+ messageCount: messages.length,
12336
+ textMessageCount: textMessages.length,
12337
+ artifactCount: Object.keys(toolCallToArtifactMap).length,
12338
+ sampleMessages: messages.slice(0, 2).map((m4) => ({
12339
+ role: m4.role,
12340
+ contentType: typeof m4.content,
12341
+ contentPreview: typeof m4.content === "string" ? m4.content.substring(0, 100) : "array/object"
12342
+ }))
12343
+ },
12344
+ "Starting distillation with debug info"
12345
+ );
12346
+ const summary = await distillConversation({
12347
+ messages,
12348
+ conversationId: this.conversationId,
12349
+ currentSummary: this.cumulativeSummary,
12350
+ // Pass existing summary for cumulative building
12351
+ summarizerModel: this.summarizerModel,
12352
+ toolCallToArtifactMap
12353
+ // Pass mapping for message formatting
12354
+ });
12355
+ this.cumulativeSummary = summary;
12356
+ logger11.debug(
12357
+ {
12358
+ sessionId: this.sessionId,
12359
+ summaryGenerated: !!summary,
12360
+ summaryHighLevel: summary?.high_level,
12361
+ artifactsCount: summary?.related_artifacts?.length || 0
12362
+ },
12363
+ "Distillation completed"
12364
+ );
12365
+ return {
12366
+ text_messages: textMessages,
12367
+ summary
12368
+ };
12369
+ }
12370
+ /**
12371
+ * Extract text messages and convert tool calls to descriptive text
12372
+ * Avoids API tool-call/tool-result pairing issues while preserving context
12373
+ */
12374
+ extractTextMessages(messages, toolCallToArtifactMap) {
12375
+ const textMessages = [];
12376
+ const toolCallPairs = /* @__PURE__ */ new Map();
12377
+ for (const message of messages) {
12378
+ if (Array.isArray(message.content)) {
12379
+ for (const block of message.content) {
12380
+ if (block.type === "tool-call") {
12381
+ if (!toolCallPairs.has(block.toolCallId)) {
12382
+ toolCallPairs.set(block.toolCallId, { call: block, result: null });
12383
+ } else {
12384
+ toolCallPairs.get(block.toolCallId).call = block;
12385
+ }
12386
+ } else if (block.type === "tool-result") {
12387
+ if (!toolCallPairs.has(block.toolCallId)) {
12388
+ toolCallPairs.set(block.toolCallId, { call: null, result: block });
12389
+ } else {
12390
+ toolCallPairs.get(block.toolCallId).result = block;
12391
+ }
12392
+ }
12393
+ }
12394
+ }
12395
+ }
12396
+ for (const message of messages) {
12397
+ if (message.role === "assistant" && typeof message.content === "string") {
12398
+ textMessages.push({
12399
+ role: message.role,
12400
+ content: message.content
12401
+ });
12402
+ } else if (message.role === "assistant" && Array.isArray(message.content)) {
12403
+ const textParts = [];
12404
+ const toolCallsInMessage = /* @__PURE__ */ new Set();
12405
+ const preservedBlocks = [];
12406
+ for (const block of message.content) {
12407
+ if (block.type === "text") {
12408
+ textParts.push(block.text);
12409
+ } else if (block.type === "tool-call" && block.toolName === "thinking_complete") ; else if (block.type === "tool-call") {
12410
+ toolCallsInMessage.add(block.toolCallId);
12411
+ }
12412
+ }
12413
+ for (const toolCallId of toolCallsInMessage) {
12414
+ const pair = toolCallPairs.get(toolCallId);
12415
+ const artifactId = toolCallToArtifactMap[toolCallId];
12416
+ if (pair?.call) {
12417
+ const args2 = JSON.stringify(pair.call.input);
12418
+ const artifactText = artifactId ? ` Results compressed into artifact: ${artifactId}.` : " Results were compressed but not saved.";
12419
+ textParts.push(`I called ${pair.call.toolName}(${args2}).${artifactText}`);
12420
+ }
12421
+ }
12422
+ if (preservedBlocks.length > 0 && textParts.length > 0) {
12423
+ const content = [...preservedBlocks];
12424
+ if (textParts.length > 0) {
12425
+ content.push({ type: "text", text: textParts.join("\n\n") });
12426
+ }
12427
+ textMessages.push({
12428
+ role: message.role,
12429
+ content
12430
+ });
12431
+ } else if (preservedBlocks.length > 0) {
12432
+ textMessages.push({
12433
+ role: message.role,
12434
+ content: preservedBlocks
12435
+ });
12436
+ } else if (textParts.length > 0) {
12437
+ textMessages.push({
12438
+ role: message.role,
12439
+ content: textParts.join("\n\n")
12440
+ });
12441
+ }
12442
+ }
12443
+ }
12444
+ return textMessages;
12445
+ }
12446
+ // Removed focus hint helper methods - no longer needed since tool results are in formatted messages
12447
+ /**
12448
+ * Check if tool result data is effectively empty
12449
+ */
12450
+ isEmpty(toolResultData) {
12451
+ if (!toolResultData || typeof toolResultData !== "object") {
12452
+ return true;
12453
+ }
12454
+ const { toolResult } = toolResultData;
12455
+ if (!toolResult) {
12456
+ return true;
12457
+ }
12458
+ if (typeof toolResult === "object" && !Array.isArray(toolResult)) {
12459
+ const keys = Object.keys(toolResult);
12460
+ if (keys.length === 0) {
12461
+ return true;
12462
+ }
12463
+ return keys.every((key) => {
12464
+ const value = toolResult[key];
12465
+ if (value === null || value === void 0 || value === "") {
12466
+ return true;
12467
+ }
12468
+ if (Array.isArray(value) && value.length === 0) {
12469
+ return true;
12470
+ }
12471
+ if (typeof value === "object" && Object.keys(value).length === 0) {
12472
+ return true;
12473
+ }
12474
+ return false;
12475
+ });
12476
+ }
12477
+ if (Array.isArray(toolResult) && toolResult.length === 0) {
12478
+ return true;
12479
+ }
12480
+ if (typeof toolResult === "string" && toolResult.trim() === "") {
12481
+ return true;
12482
+ }
12483
+ return false;
12484
+ }
12485
+ /**
12486
+ * Recursively remove _structureHints from an object
12487
+ */
12488
+ removeStructureHints(obj) {
12489
+ if (obj === null || obj === void 0) {
12490
+ return obj;
12491
+ }
12492
+ if (Array.isArray(obj)) {
12493
+ return obj.map((item) => this.removeStructureHints(item));
12494
+ }
12495
+ if (typeof obj === "object") {
12496
+ const cleaned = {};
12497
+ for (const [key, value] of Object.entries(obj)) {
12498
+ if (key !== "_structureHints") {
12499
+ cleaned[key] = this.removeStructureHints(value);
12500
+ }
12501
+ }
12502
+ return cleaned;
12503
+ }
12504
+ return obj;
12505
+ }
12506
+ /**
12507
+ * Get current state for debugging
12508
+ */
12509
+ getState() {
12510
+ return {
12511
+ shouldCompress: this.shouldCompress,
12512
+ config: this.config
12513
+ };
12514
+ }
12515
+ /**
12516
+ * Get the current compression summary
12517
+ */
12518
+ getCompressionSummary() {
12519
+ return this.cumulativeSummary;
12520
+ }
12521
+ };
12522
+
11772
12523
  // src/services/PendingToolApprovalManager.ts
11773
12524
  init_logger();
11774
- var logger10 = agentsCore.getLogger("PendingToolApprovalManager");
12525
+ var logger12 = agentsCore.getLogger("PendingToolApprovalManager");
11775
12526
  var APPROVAL_CLEANUP_INTERVAL_MS = 2 * 60 * 1e3;
11776
12527
  var APPROVAL_TIMEOUT_MS = 10 * 60 * 1e3;
11777
12528
  var PendingToolApprovalManager = class _PendingToolApprovalManager {
@@ -11810,7 +12561,7 @@ var PendingToolApprovalManager = class _PendingToolApprovalManager {
11810
12561
  timeoutId
11811
12562
  };
11812
12563
  this.pendingApprovals.set(toolCallId, approval);
11813
- logger10.info(
12564
+ logger12.info(
11814
12565
  {
11815
12566
  toolCallId,
11816
12567
  toolName,
@@ -11827,10 +12578,10 @@ var PendingToolApprovalManager = class _PendingToolApprovalManager {
11827
12578
  approveToolCall(toolCallId) {
11828
12579
  const approval = this.pendingApprovals.get(toolCallId);
11829
12580
  if (!approval) {
11830
- logger10.warn({ toolCallId }, "Tool approval not found or already processed");
12581
+ logger12.warn({ toolCallId }, "Tool approval not found or already processed");
11831
12582
  return false;
11832
12583
  }
11833
- logger10.info(
12584
+ logger12.info(
11834
12585
  {
11835
12586
  toolCallId,
11836
12587
  toolName: approval.toolName,
@@ -11849,10 +12600,10 @@ var PendingToolApprovalManager = class _PendingToolApprovalManager {
11849
12600
  denyToolCall(toolCallId, reason) {
11850
12601
  const approval = this.pendingApprovals.get(toolCallId);
11851
12602
  if (!approval) {
11852
- logger10.warn({ toolCallId }, "Tool approval not found or already processed");
12603
+ logger12.warn({ toolCallId }, "Tool approval not found or already processed");
11853
12604
  return false;
11854
12605
  }
11855
- logger10.info(
12606
+ logger12.info(
11856
12607
  {
11857
12608
  toolCallId,
11858
12609
  toolName: approval.toolName,
@@ -11884,7 +12635,7 @@ var PendingToolApprovalManager = class _PendingToolApprovalManager {
11884
12635
  }
11885
12636
  }
11886
12637
  if (cleanedUp > 0) {
11887
- logger10.info({ cleanedUp }, "Cleaned up expired tool approvals");
12638
+ logger12.info({ cleanedUp }, "Cleaned up expired tool approvals");
11888
12639
  }
11889
12640
  }
11890
12641
  /**
@@ -11908,7 +12659,7 @@ var pendingToolApprovalManager = PendingToolApprovalManager.getInstance();
11908
12659
 
11909
12660
  // src/services/ResponseFormatter.ts
11910
12661
  init_logger();
11911
- var logger11 = agentsCore.getLogger("ResponseFormatter");
12662
+ var logger13 = agentsCore.getLogger("ResponseFormatter");
11912
12663
  var ResponseFormatter = class {
11913
12664
  artifactParser;
11914
12665
  subAgentId;
@@ -11967,7 +12718,7 @@ var ResponseFormatter = class {
11967
12718
  return { parts: parts2 };
11968
12719
  } catch (error) {
11969
12720
  agentsCore.setSpanWithError(span, error instanceof Error ? error : new Error(String(error)));
11970
- logger11.error({ error, responseObject }, "Error formatting object response");
12721
+ logger13.error({ error, responseObject }, "Error formatting object response");
11971
12722
  return {
11972
12723
  parts: [{ kind: "data", data: responseObject }]
11973
12724
  };
@@ -12023,7 +12774,7 @@ var ResponseFormatter = class {
12023
12774
  return { parts: parts2 };
12024
12775
  } catch (error) {
12025
12776
  agentsCore.setSpanWithError(span, error instanceof Error ? error : new Error(String(error)));
12026
- logger11.error({ error, responseText }, "Error formatting response");
12777
+ logger13.error({ error, responseText }, "Error formatting response");
12027
12778
  return { text: responseText };
12028
12779
  } finally {
12029
12780
  span.end();
@@ -12103,49 +12854,6 @@ function generateToolId() {
12103
12854
  // src/utils/artifact-component-schema.ts
12104
12855
  init_logger();
12105
12856
 
12106
- // src/utils/data-component-schema.ts
12107
- init_logger();
12108
- var logger12 = agentsCore.getLogger("DataComponentSchema");
12109
- function jsonSchemaToZod(jsonSchema) {
12110
- if (!jsonSchema || typeof jsonSchema !== "object") {
12111
- logger12.warn({ jsonSchema }, "Invalid JSON schema provided, using string fallback");
12112
- return zodOpenapi.z.string();
12113
- }
12114
- switch (jsonSchema.type) {
12115
- case "object":
12116
- if (jsonSchema.properties) {
12117
- const shape = {};
12118
- for (const [key, prop] of Object.entries(jsonSchema.properties)) {
12119
- shape[key] = jsonSchemaToZod(prop);
12120
- }
12121
- return zodOpenapi.z.object(shape);
12122
- }
12123
- return zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown());
12124
- case "array": {
12125
- const itemSchema = jsonSchema.items ? jsonSchemaToZod(jsonSchema.items) : zodOpenapi.z.unknown();
12126
- return zodOpenapi.z.array(itemSchema);
12127
- }
12128
- case "string":
12129
- return zodOpenapi.z.string();
12130
- case "number":
12131
- case "integer":
12132
- return zodOpenapi.z.number();
12133
- case "boolean":
12134
- return zodOpenapi.z.boolean();
12135
- case "null":
12136
- return zodOpenapi.z.null();
12137
- default:
12138
- logger12.warn(
12139
- {
12140
- unsupportedType: jsonSchema.type,
12141
- schema: jsonSchema
12142
- },
12143
- "Unsupported JSON schema type, using unknown validation"
12144
- );
12145
- return zodOpenapi.z.unknown();
12146
- }
12147
- }
12148
-
12149
12857
  // src/utils/SchemaProcessor.ts
12150
12858
  init_logger();
12151
12859
  var SchemaProcessor = class _SchemaProcessor {
@@ -12392,7 +13100,7 @@ var ArtifactReferenceSchema = class _ArtifactReferenceSchema {
12392
13100
  return zodOpenapi.z.object({
12393
13101
  id: zodOpenapi.z.string(),
12394
13102
  name: zodOpenapi.z.literal("Artifact"),
12395
- props: jsonSchemaToZod(_ArtifactReferenceSchema.ARTIFACT_PROPS_SCHEMA)
13103
+ props: agentsCore.jsonSchemaToZod(_ArtifactReferenceSchema.ARTIFACT_PROPS_SCHEMA)
12396
13104
  });
12397
13105
  }
12398
13106
  /**
@@ -12445,7 +13153,7 @@ var ArtifactCreateSchema = class {
12445
13153
  return zodOpenapi.z.object({
12446
13154
  id: zodOpenapi.z.string(),
12447
13155
  name: zodOpenapi.z.literal(`ArtifactCreate_${component.name}`),
12448
- props: jsonSchemaToZod(propsSchema)
13156
+ props: agentsCore.jsonSchemaToZod(propsSchema)
12449
13157
  });
12450
13158
  });
12451
13159
  }
@@ -12505,7 +13213,7 @@ function parseEmbeddedJson(data) {
12505
13213
 
12506
13214
  // src/a2a/client.ts
12507
13215
  init_logger();
12508
- var logger13 = agentsCore.getLogger("a2aClient");
13216
+ var logger14 = agentsCore.getLogger("a2aClient");
12509
13217
  var DEFAULT_BACKOFF = {
12510
13218
  initialInterval: 500,
12511
13219
  maxInterval: 6e4,
@@ -12712,7 +13420,7 @@ var A2AClient = class {
12712
13420
  try {
12713
13421
  const res = await fn2();
12714
13422
  if (attempt > 0) {
12715
- logger13.info(
13423
+ logger14.info(
12716
13424
  {
12717
13425
  attempts: attempt + 1,
12718
13426
  elapsedTime: Date.now() - start2
@@ -12727,7 +13435,7 @@ var A2AClient = class {
12727
13435
  }
12728
13436
  const elapsed = Date.now() - start2;
12729
13437
  if (elapsed > maxElapsedTime) {
12730
- logger13.warn(
13438
+ logger14.warn(
12731
13439
  {
12732
13440
  attempts: attempt + 1,
12733
13441
  elapsedTime: elapsed,
@@ -12748,7 +13456,7 @@ var A2AClient = class {
12748
13456
  retryInterval = initialInterval * attempt ** exponent + Math.random() * 1e3;
12749
13457
  }
12750
13458
  const delayMs = Math.min(retryInterval, maxInterval);
12751
- logger13.info(
13459
+ logger14.info(
12752
13460
  {
12753
13461
  attempt: attempt + 1,
12754
13462
  delayMs,
@@ -12839,7 +13547,7 @@ var A2AClient = class {
12839
13547
  });
12840
13548
  }
12841
13549
  if (rpcResponse.id !== requestId2) {
12842
- logger13.warn(
13550
+ logger14.warn(
12843
13551
  {
12844
13552
  method,
12845
13553
  expectedId: requestId2,
@@ -13036,7 +13744,7 @@ var A2AClient = class {
13036
13744
  try {
13037
13745
  while (true) {
13038
13746
  const { done, value } = await reader.read();
13039
- logger13.info({ done, value }, "parseA2ASseStream");
13747
+ logger14.info({ done, value }, "parseA2ASseStream");
13040
13748
  if (done) {
13041
13749
  if (eventDataBuffer.trim()) {
13042
13750
  const result = this._processSseEventData(
@@ -13127,7 +13835,7 @@ init_execution_limits();
13127
13835
  init_conversations();
13128
13836
  init_dbClient();
13129
13837
  init_logger();
13130
- var logger14 = agentsCore.getLogger("relationships Tools");
13838
+ var logger15 = agentsCore.getLogger("relationships Tools");
13131
13839
  var A2A_RETRY_STATUS_CODES = ["429", "500", "502", "503", "504"];
13132
13840
  var generateTransferToolDescription = (config) => {
13133
13841
  let toolsSection = "";
@@ -13152,9 +13860,9 @@ Can Delegate To:
13152
13860
  ${delegateList}`;
13153
13861
  }
13154
13862
  if (config.tools && config.tools.length > 0) {
13155
- const toolDescriptions = config.tools.map((tool3) => {
13156
- const toolsList = tool3.availableTools?.map((t2) => ` - ${t2.name}: ${t2.description || "No description available"}`).join("\n") || "";
13157
- return `MCP Server: ${tool3.name}
13863
+ const toolDescriptions = config.tools.map((tool4) => {
13864
+ const toolsList = tool4.availableTools?.map((t2) => ` - ${t2.name}: ${t2.description || "No description available"}`).join("\n") || "";
13865
+ return `MCP Server: ${tool4.name}
13158
13866
  ${toolsList}`;
13159
13867
  }).join("\n\n");
13160
13868
  toolsSection = `
@@ -13180,9 +13888,9 @@ var generateDelegateToolDescription = (delegateRelation) => {
13180
13888
  if (delegateRelation.type === "internal" && "tools" in config) {
13181
13889
  const agentConfig = config;
13182
13890
  if (agentConfig.tools && agentConfig.tools.length > 0) {
13183
- const toolDescriptions = agentConfig.tools.map((tool3) => {
13184
- const toolsList = tool3.availableTools?.map((t2) => ` - ${t2.name}: ${t2.description || "No description available"}`).join("\n") || "";
13185
- return `MCP Server: ${tool3.name}
13891
+ const toolDescriptions = agentConfig.tools.map((tool4) => {
13892
+ const toolsList = tool4.availableTools?.map((t2) => ` - ${t2.name}: ${t2.description || "No description available"}`).join("\n") || "";
13893
+ return `MCP Server: ${tool4.name}
13186
13894
  ${toolsList}`;
13187
13895
  }).join("\n\n");
13188
13896
  toolsSection = `
@@ -13238,7 +13946,7 @@ var createTransferToAgentTool = ({
13238
13946
  [agentsCore.SPAN_KEYS.TRANSFER_TO_SUB_AGENT_ID]: transferConfig.id ?? "unknown"
13239
13947
  });
13240
13948
  }
13241
- logger14.info(
13949
+ logger15.info(
13242
13950
  {
13243
13951
  transferTo: transferConfig.id ?? "unknown",
13244
13952
  fromSubAgent: callingAgentId
@@ -13259,7 +13967,7 @@ var createTransferToAgentTool = ({
13259
13967
  fromSubAgentId: callingAgentId
13260
13968
  // Include the calling agent ID for tracking
13261
13969
  };
13262
- logger14.info(
13970
+ logger15.info(
13263
13971
  {
13264
13972
  transferResult,
13265
13973
  transferResultKeys: Object.keys(transferResult)
@@ -13406,7 +14114,7 @@ function createDelegateToAgentTool({
13406
14114
  ...isInternal ? { fromSubAgentId: callingAgentId } : { fromExternalAgentId: callingAgentId }
13407
14115
  }
13408
14116
  };
13409
- logger14.info({ messageToSend }, "messageToSend");
14117
+ logger15.info({ messageToSend }, "messageToSend");
13410
14118
  await agentsCore.createMessage(dbClient_default)({
13411
14119
  id: agentsCore.generateId(),
13412
14120
  tenantId,
@@ -13469,7 +14177,7 @@ function createDelegateToAgentTool({
13469
14177
 
13470
14178
  // src/agents/SystemPromptBuilder.ts
13471
14179
  init_logger();
13472
- var logger15 = agentsCore.getLogger("SystemPromptBuilder");
14180
+ var logger16 = agentsCore.getLogger("SystemPromptBuilder");
13473
14181
  var SystemPromptBuilder = class {
13474
14182
  constructor(version, versionConfig) {
13475
14183
  this.version = version;
@@ -13485,12 +14193,12 @@ var SystemPromptBuilder = class {
13485
14193
  this.templates.set(name2, content);
13486
14194
  }
13487
14195
  this.loaded = true;
13488
- logger15.debug(
14196
+ logger16.debug(
13489
14197
  { templateCount: this.templates.size, version: this.version },
13490
14198
  `Loaded ${this.templates.size} templates for version ${this.version}`
13491
14199
  );
13492
14200
  } catch (error) {
13493
- logger15.error({ error }, `Failed to load templates for version ${this.version}`);
14201
+ logger16.error({ error }, `Failed to load templates for version ${this.version}`);
13494
14202
  throw new Error(`Template loading failed: ${error}`);
13495
14203
  }
13496
14204
  }
@@ -13731,7 +14439,14 @@ var Phase1Config = class _Phase1Config {
13731
14439
  throw new Error("System prompt template not loaded");
13732
14440
  }
13733
14441
  let systemPrompt = systemPromptTemplate;
13734
- systemPrompt = systemPrompt.replace("{{CORE_INSTRUCTIONS}}", config.corePrompt);
14442
+ if (config.corePrompt && config.corePrompt.trim()) {
14443
+ systemPrompt = systemPrompt.replace("{{CORE_INSTRUCTIONS}}", config.corePrompt);
14444
+ } else {
14445
+ systemPrompt = systemPrompt.replace(
14446
+ /<core_instructions>\s*\{\{CORE_INSTRUCTIONS\}\}\s*<\/core_instructions>/g,
14447
+ ""
14448
+ );
14449
+ }
13735
14450
  const agentContextSection = this.generateAgentContextSection(config.prompt);
13736
14451
  systemPrompt = systemPrompt.replace("{{AGENT_CONTEXT_SECTION}}", agentContextSection);
13737
14452
  const toolData = this.isToolDataArray(config.tools) ? config.tools : _Phase1Config.convertMcpToolsToToolData(config.tools);
@@ -13761,7 +14476,7 @@ var Phase1Config = class _Phase1Config {
13761
14476
  return systemPrompt;
13762
14477
  }
13763
14478
  generateAgentContextSection(prompt) {
13764
- if (!prompt) {
14479
+ if (!prompt || prompt.trim() === "") {
13765
14480
  return "";
13766
14481
  }
13767
14482
  return `
@@ -13874,6 +14589,8 @@ CREATING ARTIFACTS (SERVES AS CITATION):
13874
14589
  Use the artifact:create annotation to extract data from tool results. The creation itself serves as a citation.
13875
14590
  Format: <artifact:create id="unique-id" tool="tool_call_id" type="TypeName" base="selector.path" details='{"key":"jmespath_selector"}' />
13876
14591
 
14592
+ \u26A0\uFE0F IMPORTANT: Do not create artifacts from get_reference_artifact tool results - these are already compressed artifacts being retrieved. Only create artifacts from original research and analysis tools.
14593
+
13877
14594
  \u{1F6A8} CRITICAL: DETAILS PROPS USE JMESPATH SELECTORS, NOT LITERAL VALUES! \u{1F6A8}
13878
14595
 
13879
14596
  \u274C WRONG - Using literal values:
@@ -13898,6 +14615,8 @@ THE details PROPERTY MUST CONTAIN JMESPATH SELECTORS THAT EXTRACT DATA FROM THE
13898
14615
  \u274C NEVER: [?text ~ contains(@, 'word')] (~ with @ operator)
13899
14616
  \u274C NEVER: contains(@, 'text') (@ operator usage)
13900
14617
  \u274C NEVER: [?field=="value"] (double quotes in filters)
14618
+ \u274C NEVER: [?field=='value'] (escaped quotes in filters)
14619
+ \u274C NEVER: [?field=='"'"'value'"'"'] (nightmare quote mixing)
13901
14620
  \u274C NEVER: result.items[?type=='doc'][?status=='active'] (chained filters)
13902
14621
 
13903
14622
  \u2705 CORRECT JMESPATH SYNTAX:
@@ -13909,6 +14628,11 @@ THE details PROPERTY MUST CONTAIN JMESPATH SELECTORS THAT EXTRACT DATA FROM THE
13909
14628
  \u2705 [?contains(text, 'Founder')] (contains haystack, needle format)
13910
14629
  \u2705 source.content[?contains(text, 'Founder')].text (correct filter usage)
13911
14630
 
14631
+ \u{1F6A8} MANDATORY QUOTE PATTERN - FOLLOW EXACTLY:
14632
+ - ALWAYS: base="path[?field=='value']" (double quotes outside, single inside)
14633
+ - This is the ONLY allowed pattern - any other pattern WILL FAIL
14634
+ - NEVER escape quotes, NEVER mix quote types, NEVER use complex quoting
14635
+
13912
14636
  \u{1F6A8} CRITICAL: EXAMINE TOOL RESULTS BEFORE CREATING SELECTORS! \u{1F6A8}
13913
14637
 
13914
14638
  STEP 1: INSPECT THE ACTUAL DATA FIRST
@@ -13947,7 +14671,7 @@ Only use artifact:ref when you need to cite the SAME artifact again for a differ
13947
14671
  Format: <artifact:ref id="artifact-id" tool="tool_call_id" />
13948
14672
 
13949
14673
  EXAMPLE TEXT RESPONSE:
13950
- "I found the authentication documentation. <artifact:create id='auth-doc-1' tool='call_xyz789' type='APIDoc' base='result.documents[?type=="auth"]' details='{"title":"metadata.title","endpoint":"api.endpoint","description":"content.description","parameters":"spec.parameters","examples":"examples.sample_code"}' /> The documentation explains OAuth 2.0 implementation in detail.
14674
+ "I found the authentication documentation. <artifact:create id='auth-doc-1' tool='call_xyz789' type='APIDoc' base="result.documents[?type=='auth']" details='{"title":"metadata.title","endpoint":"api.endpoint","description":"content.description","parameters":"spec.parameters","examples":"examples.sample_code"}' /> The documentation explains OAuth 2.0 implementation in detail.
13951
14675
 
13952
14676
  The process involves three main steps: registration, token exchange, and API calls. As mentioned in the authentication documentation <artifact:ref id='auth-doc-1' tool='call_xyz789' />, you'll need to register your application first."
13953
14677
 
@@ -14085,27 +14809,27 @@ ${creationInstructions}
14085
14809
  if (tools.length === 0) {
14086
14810
  return '<available_tools description="No tools are currently available"></available_tools>';
14087
14811
  }
14088
- const toolsXml = tools.map((tool3) => this.generateToolXml(templates, tool3)).join("\n ");
14812
+ const toolsXml = tools.map((tool4) => this.generateToolXml(templates, tool4)).join("\n ");
14089
14813
  return `<available_tools description="These are the tools available for you to use to accomplish tasks">
14090
14814
  ${toolsXml}
14091
14815
  </available_tools>`;
14092
14816
  }
14093
- generateToolXml(templates, tool3) {
14817
+ generateToolXml(templates, tool4) {
14094
14818
  const toolTemplate = templates.get("tool");
14095
14819
  if (!toolTemplate) {
14096
14820
  throw new Error("Tool template not loaded");
14097
14821
  }
14098
14822
  let toolXml = toolTemplate;
14099
- toolXml = toolXml.replace("{{TOOL_NAME}}", tool3.name);
14823
+ toolXml = toolXml.replace("{{TOOL_NAME}}", tool4.name);
14100
14824
  toolXml = toolXml.replace(
14101
14825
  "{{TOOL_DESCRIPTION}}",
14102
- tool3.description || "No description available"
14826
+ tool4.description || "No description available"
14103
14827
  );
14104
14828
  toolXml = toolXml.replace(
14105
14829
  "{{TOOL_USAGE_GUIDELINES}}",
14106
- tool3.usageGuidelines || "Use this tool when appropriate."
14830
+ tool4.usageGuidelines || "Use this tool when appropriate."
14107
14831
  );
14108
- const parametersXml = this.generateParametersXml(tool3.inputSchema);
14832
+ const parametersXml = this.generateParametersXml(tool4.inputSchema);
14109
14833
  toolXml = toolXml.replace("{{TOOL_PARAMETERS_SCHEMA}}", parametersXml);
14110
14834
  return toolXml;
14111
14835
  }
@@ -14288,6 +15012,8 @@ CREATING ARTIFACTS (SERVES AS CITATION):
14288
15012
  Use the appropriate ArtifactCreate_[Type] component to extract and structure data from tool results.
14289
15013
  The creation itself serves as a citation - no additional reference needed.
14290
15014
 
15015
+ \u26A0\uFE0F IMPORTANT: Do not create artifacts from get_reference_artifact tool results - these are already compressed artifacts being retrieved. Only create artifacts from original research and analysis tools.
15016
+
14291
15017
  \u{1F6AB} FORBIDDEN JMESPATH PATTERNS:
14292
15018
  \u274C NEVER: [?title~'.*text.*'] (regex patterns with ~ operator)
14293
15019
  \u274C NEVER: [?field~'pattern.*'] (any ~ operator usage)
@@ -14445,7 +15171,7 @@ ${componentDescriptions}`;
14445
15171
  dataComponentXml = dataComponentXml.replace("{{COMPONENT_NAME}}", dataComponent.name);
14446
15172
  dataComponentXml = dataComponentXml.replace(
14447
15173
  "{{COMPONENT_DESCRIPTION}}",
14448
- dataComponent.description
15174
+ dataComponent.description || ""
14449
15175
  );
14450
15176
  dataComponentXml = dataComponentXml.replace(
14451
15177
  "{{COMPONENT_PROPS_SCHEMA}}",
@@ -14541,7 +15267,14 @@ ${artifact_retrieval_guidance_default}
14541
15267
  artifactComponents
14542
15268
  );
14543
15269
  let phase2Prompt = system_prompt_default2;
14544
- phase2Prompt = phase2Prompt.replace("{{CORE_INSTRUCTIONS}}", corePrompt);
15270
+ if (corePrompt && corePrompt.trim()) {
15271
+ phase2Prompt = phase2Prompt.replace("{{CORE_INSTRUCTIONS}}", corePrompt);
15272
+ } else {
15273
+ phase2Prompt = phase2Prompt.replace(
15274
+ /<core_instructions>\s*\{\{CORE_INSTRUCTIONS\}\}\s*<\/core_instructions>/g,
15275
+ ""
15276
+ );
15277
+ }
14545
15278
  phase2Prompt = phase2Prompt.replace("{{DATA_COMPONENTS_SECTION}}", dataComponentsSection);
14546
15279
  phase2Prompt = phase2Prompt.replace("{{ARTIFACTS_SECTION}}", artifactsSection);
14547
15280
  phase2Prompt = phase2Prompt.replace("{{ARTIFACT_GUIDANCE_SECTION}}", artifactGuidance);
@@ -14560,7 +15293,7 @@ function hasToolCallWithPrefix(prefix) {
14560
15293
  return false;
14561
15294
  };
14562
15295
  }
14563
- var logger19 = agentsCore.getLogger("Agent");
15296
+ var logger20 = agentsCore.getLogger("Agent");
14564
15297
  function validateModel(modelString, modelType) {
14565
15298
  if (!modelString?.trim()) {
14566
15299
  throw new Error(
@@ -14569,8 +15302,8 @@ function validateModel(modelString, modelType) {
14569
15302
  }
14570
15303
  return modelString.trim();
14571
15304
  }
14572
- function isValidTool(tool3) {
14573
- return tool3 && typeof tool3 === "object" && typeof tool3.description === "string" && tool3.inputSchema && typeof tool3.execute === "function";
15305
+ function isValidTool(tool4) {
15306
+ return tool4 && typeof tool4 === "object" && typeof tool4.description === "string" && tool4.inputSchema && typeof tool4.execute === "function";
14574
15307
  }
14575
15308
  var Agent = class {
14576
15309
  config;
@@ -14586,6 +15319,7 @@ var Agent = class {
14586
15319
  credentialStoreRegistry;
14587
15320
  mcpClientCache = /* @__PURE__ */ new Map();
14588
15321
  mcpConnectionLocks = /* @__PURE__ */ new Map();
15322
+ currentCompressor = null;
14589
15323
  constructor(config, credentialStoreRegistry) {
14590
15324
  this.artifactComponents = config.artifactComponents || [];
14591
15325
  let processedDataComponents = config.dataComponents || [];
@@ -14666,6 +15400,32 @@ var Agent = class {
14666
15400
  }
14667
15401
  return sanitizedTools;
14668
15402
  }
15403
+ #createRelationToolName(prefix, targetId) {
15404
+ return `${prefix}_to_${targetId.toLowerCase().replace(/\s+/g, "_")}`;
15405
+ }
15406
+ #getRelationshipIdForTool(toolName, toolType) {
15407
+ if (toolType === "mcp") {
15408
+ const matchingTool = this.config.tools?.find((tool4) => {
15409
+ if (tool4.config?.type !== "mcp") {
15410
+ return false;
15411
+ }
15412
+ if (tool4.availableTools?.some((available) => available.name === toolName)) {
15413
+ return true;
15414
+ }
15415
+ if (tool4.config.mcp.activeTools?.includes(toolName)) {
15416
+ return true;
15417
+ }
15418
+ return tool4.name === toolName;
15419
+ });
15420
+ return matchingTool?.relationshipId;
15421
+ }
15422
+ if (toolType === "delegation") {
15423
+ const relation = this.config.delegateRelations.find(
15424
+ (relation2) => this.#createRelationToolName("delegate", relation2.config.id) === toolName
15425
+ );
15426
+ return relation?.config.relationId;
15427
+ }
15428
+ }
14669
15429
  /**
14670
15430
  * Get the primary model settings for text generation and thinking
14671
15431
  * Requires model to be configured at project level
@@ -14709,9 +15469,59 @@ var Agent = class {
14709
15469
  providerOptions: baseConfig.providerOptions
14710
15470
  };
14711
15471
  }
15472
+ /**
15473
+ * Get the model settings for summarization/distillation
15474
+ * Falls back to base model if summarizer not configured
15475
+ */
15476
+ getSummarizerModel() {
15477
+ if (!this.config.models) {
15478
+ throw new Error(
15479
+ "Model configuration is required. Please configure models at the project level."
15480
+ );
15481
+ }
15482
+ const summarizerConfig = this.config.models.summarizer;
15483
+ const baseConfig = this.config.models.base;
15484
+ if (summarizerConfig) {
15485
+ return {
15486
+ model: validateModel(summarizerConfig.model, "Summarizer"),
15487
+ providerOptions: summarizerConfig.providerOptions
15488
+ };
15489
+ }
15490
+ if (!baseConfig) {
15491
+ throw new Error(
15492
+ "Base model configuration is required for summarizer fallback. Please configure models at the project level."
15493
+ );
15494
+ }
15495
+ return {
15496
+ model: validateModel(baseConfig.model, "Base (fallback for summarizer)"),
15497
+ providerOptions: baseConfig.providerOptions
15498
+ };
15499
+ }
14712
15500
  setConversationId(conversationId) {
14713
15501
  this.conversationId = conversationId;
14714
15502
  }
15503
+ /**
15504
+ * Simple compression fallback: drop oldest messages to fit under token limit
15505
+ */
15506
+ simpleCompression(messages, targetTokens) {
15507
+ if (messages.length === 0) return messages;
15508
+ const estimateTokens = (msg) => {
15509
+ const content = typeof msg.content === "string" ? msg.content : JSON.stringify(msg.content);
15510
+ return Math.ceil(content.length / 4);
15511
+ };
15512
+ let totalTokens = messages.reduce((sum, msg) => sum + estimateTokens(msg), 0);
15513
+ if (totalTokens <= targetTokens) {
15514
+ return messages;
15515
+ }
15516
+ const result = [...messages];
15517
+ while (totalTokens > targetTokens && result.length > 1) {
15518
+ const dropped = result.shift();
15519
+ if (dropped) {
15520
+ totalTokens -= estimateTokens(dropped);
15521
+ }
15522
+ }
15523
+ return result;
15524
+ }
14715
15525
  /**
14716
15526
  * Set delegation status for this agent instance
14717
15527
  */
@@ -14734,10 +15544,11 @@ var Agent = class {
14734
15544
  /**
14735
15545
  * Wraps a tool with streaming lifecycle tracking (start, complete, error) and AgentSession recording
14736
15546
  */
14737
- wrapToolWithStreaming(toolName, toolDefinition, streamRequestId, toolType, relationshipId, options) {
15547
+ wrapToolWithStreaming(toolName, toolDefinition, streamRequestId, toolType, options) {
14738
15548
  if (!toolDefinition || typeof toolDefinition !== "object" || !("execute" in toolDefinition)) {
14739
15549
  return toolDefinition;
14740
15550
  }
15551
+ const relationshipId = this.#getRelationshipIdForTool(toolName, toolType);
14741
15552
  const originalExecute = toolDefinition.execute;
14742
15553
  return {
14743
15554
  ...toolDefinition,
@@ -14746,14 +15557,21 @@ var Agent = class {
14746
15557
  const toolCallId = context?.toolCallId || generateToolId();
14747
15558
  const activeSpan = api.trace.getActiveSpan();
14748
15559
  if (activeSpan) {
14749
- activeSpan.setAttributes({
15560
+ const attributes = {
14750
15561
  "conversation.id": this.conversationId,
14751
15562
  "tool.purpose": toolDefinition.description || "No description provided",
14752
15563
  "ai.toolType": toolType || "unknown",
14753
15564
  "subAgent.name": this.config.name || "unknown",
14754
15565
  "subAgent.id": this.config.id || "unknown",
14755
15566
  "agent.id": this.config.agentId || "unknown"
14756
- });
15567
+ };
15568
+ if (options?.mcpServerId) {
15569
+ attributes["ai.toolCall.mcpServerId"] = options.mcpServerId;
15570
+ }
15571
+ if (options?.mcpServerName) {
15572
+ attributes["ai.toolCall.mcpServerName"] = options.mcpServerName;
15573
+ }
15574
+ activeSpan.setAttributes(attributes);
14757
15575
  }
14758
15576
  const isInternalTool = toolName.includes("save_tool_result") || toolName.includes("thinking_complete") || toolName.startsWith("transfer_to_");
14759
15577
  const needsApproval = options?.needsApproval || false;
@@ -14806,7 +15624,7 @@ var Agent = class {
14806
15624
  };
14807
15625
  await agentsCore.createMessage(dbClient_default)(messagePayload);
14808
15626
  } catch (error) {
14809
- logger19.warn(
15627
+ logger20.warn(
14810
15628
  { error, toolName, toolCallId, conversationId: toolResultConversationId },
14811
15629
  "Failed to store tool result in conversation history"
14812
15630
  );
@@ -14844,10 +15662,9 @@ var Agent = class {
14844
15662
  }
14845
15663
  getRelationTools(runtimeContext, sessionId) {
14846
15664
  const { transferRelations = [], delegateRelations = [] } = this.config;
14847
- const createToolName = (prefix, subAgentId) => `${prefix}_to_${subAgentId.toLowerCase().replace(/\s+/g, "_")}`;
14848
15665
  return Object.fromEntries([
14849
15666
  ...transferRelations.map((agentConfig) => {
14850
- const toolName = createToolName("transfer", agentConfig.id);
15667
+ const toolName = this.#createRelationToolName("transfer", agentConfig.id);
14851
15668
  return [
14852
15669
  toolName,
14853
15670
  this.wrapToolWithStreaming(
@@ -14864,7 +15681,7 @@ var Agent = class {
14864
15681
  ];
14865
15682
  }),
14866
15683
  ...delegateRelations.map((relation) => {
14867
- const toolName = createToolName("delegate", relation.config.id);
15684
+ const toolName = this.#createRelationToolName("delegate", relation.config.id);
14868
15685
  return [
14869
15686
  toolName,
14870
15687
  this.wrapToolWithStreaming(
@@ -14895,14 +15712,13 @@ var Agent = class {
14895
15712
  ]);
14896
15713
  }
14897
15714
  async getMcpTools(sessionId, streamRequestId) {
14898
- const mcpTools = this.config.tools?.filter((tool3) => {
14899
- return tool3.config?.type === "mcp";
15715
+ const mcpTools = this.config.tools?.filter((tool4) => {
15716
+ return tool4.config?.type === "mcp";
14900
15717
  }) || [];
14901
- const tools = await Promise.all(mcpTools.map((tool3) => this.getMcpTool(tool3)) || []) || [];
15718
+ const tools = await Promise.all(mcpTools.map((tool4) => this.getMcpTool(tool4)) || []) || [];
14902
15719
  if (!sessionId) {
14903
15720
  const wrappedTools2 = {};
14904
- for (const [index, toolSet] of tools.entries()) {
14905
- const relationshipId = mcpTools[index]?.relationshipId;
15721
+ for (const toolSet of tools) {
14906
15722
  for (const [toolName, toolDef] of Object.entries(toolSet.tools)) {
14907
15723
  const needsApproval = toolSet.toolPolicies?.[toolName]?.needsApproval || false;
14908
15724
  const enhancedTool = {
@@ -14914,23 +15730,25 @@ var Agent = class {
14914
15730
  enhancedTool,
14915
15731
  streamRequestId,
14916
15732
  "mcp",
14917
- relationshipId,
14918
- { needsApproval }
15733
+ {
15734
+ needsApproval,
15735
+ mcpServerId: toolSet.mcpServerId,
15736
+ mcpServerName: toolSet.mcpServerName
15737
+ }
14919
15738
  );
14920
15739
  }
14921
15740
  }
14922
15741
  return wrappedTools2;
14923
15742
  }
14924
15743
  const wrappedTools = {};
14925
- for (const [index, toolResult] of tools.entries()) {
14926
- const relationshipId = mcpTools[index]?.relationshipId;
15744
+ for (const toolResult of tools) {
14927
15745
  for (const [toolName, originalTool] of Object.entries(toolResult.tools)) {
14928
15746
  if (!isValidTool(originalTool)) {
14929
- logger19.error({ toolName }, "Invalid MCP tool structure - missing required properties");
15747
+ logger20.error({ toolName }, "Invalid MCP tool structure - missing required properties");
14930
15748
  continue;
14931
15749
  }
14932
15750
  const needsApproval = toolResult.toolPolicies?.[toolName]?.needsApproval || false;
14933
- logger19.debug(
15751
+ logger20.debug(
14934
15752
  {
14935
15753
  toolName,
14936
15754
  toolPolicies: toolResult.toolPolicies,
@@ -14944,7 +15762,7 @@ var Agent = class {
14944
15762
  inputSchema: originalTool.inputSchema,
14945
15763
  execute: async (args2, { toolCallId }) => {
14946
15764
  if (needsApproval) {
14947
- logger19.info(
15765
+ logger20.info(
14948
15766
  { toolName, toolCallId, args: args2 },
14949
15767
  "Tool requires approval - waiting for user response"
14950
15768
  );
@@ -14990,7 +15808,7 @@ var Agent = class {
14990
15808
  }
14991
15809
  },
14992
15810
  (denialSpan) => {
14993
- logger19.info(
15811
+ logger20.info(
14994
15812
  { toolName, toolCallId, reason: approvalResult.reason },
14995
15813
  "Tool execution denied by user"
14996
15814
  );
@@ -15011,18 +15829,18 @@ var Agent = class {
15011
15829
  }
15012
15830
  },
15013
15831
  (approvedSpan) => {
15014
- logger19.info({ toolName, toolCallId }, "Tool approved, continuing with execution");
15832
+ logger20.info({ toolName, toolCallId }, "Tool approved, continuing with execution");
15015
15833
  approvedSpan.setStatus({ code: api.SpanStatusCode.OK });
15016
15834
  approvedSpan.end();
15017
15835
  }
15018
15836
  );
15019
15837
  }
15020
- logger19.debug({ toolName, toolCallId }, "MCP Tool Called");
15838
+ logger20.debug({ toolName, toolCallId }, "MCP Tool Called");
15021
15839
  try {
15022
15840
  const rawResult = await originalTool.execute(args2, { toolCallId });
15023
15841
  if (rawResult && typeof rawResult === "object" && rawResult.isError) {
15024
15842
  const errorMessage = rawResult.content?.[0]?.text || "MCP tool returned an error";
15025
- logger19.error(
15843
+ logger20.error(
15026
15844
  { toolName, toolCallId, errorMessage, rawResult },
15027
15845
  "MCP tool returned error status"
15028
15846
  );
@@ -15034,6 +15852,7 @@ var Agent = class {
15034
15852
  timestamp: Date.now()
15035
15853
  });
15036
15854
  if (streamRequestId) {
15855
+ const relationshipId = this.#getRelationshipIdForTool(toolName, "mcp");
15037
15856
  agentSessionManager.recordEvent(streamRequestId, "error", this.config.id, {
15038
15857
  message: `MCP tool "${toolName}" failed: ${errorMessage}`,
15039
15858
  code: "mcp_tool_error",
@@ -15072,7 +15891,7 @@ var Agent = class {
15072
15891
  });
15073
15892
  return { result: enhancedResult, toolCallId };
15074
15893
  } catch (error) {
15075
- logger19.error({ toolName, toolCallId, error }, "MCP tool execution failed");
15894
+ logger20.error({ toolName, toolCallId, error }, "MCP tool execution failed");
15076
15895
  throw error;
15077
15896
  }
15078
15897
  }
@@ -15082,8 +15901,11 @@ var Agent = class {
15082
15901
  sessionWrappedTool,
15083
15902
  streamRequestId,
15084
15903
  "mcp",
15085
- relationshipId,
15086
- { needsApproval }
15904
+ {
15905
+ needsApproval,
15906
+ mcpServerId: toolResult.mcpServerId,
15907
+ mcpServerName: toolResult.mcpServerName
15908
+ }
15087
15909
  );
15088
15910
  }
15089
15911
  }
@@ -15092,28 +15914,28 @@ var Agent = class {
15092
15914
  /**
15093
15915
  * Convert database McpTool to builder MCPToolConfig format
15094
15916
  */
15095
- convertToMCPToolConfig(tool3, agentToolRelationHeaders) {
15096
- if (tool3.config.type !== "mcp") {
15097
- throw new Error(`Cannot convert non-MCP tool to MCP config: ${tool3.id}`);
15917
+ convertToMCPToolConfig(tool4, agentToolRelationHeaders) {
15918
+ if (tool4.config.type !== "mcp") {
15919
+ throw new Error(`Cannot convert non-MCP tool to MCP config: ${tool4.id}`);
15098
15920
  }
15099
15921
  return {
15100
- id: tool3.id,
15101
- name: tool3.name,
15102
- description: tool3.name,
15922
+ id: tool4.id,
15923
+ name: tool4.name,
15924
+ description: tool4.name,
15103
15925
  // Use name as description fallback
15104
- serverUrl: tool3.config.mcp.server.url,
15105
- activeTools: tool3.config.mcp.activeTools,
15106
- mcpType: tool3.config.mcp.server.url.includes("api.nango.dev") ? agentsCore.MCPServerType.nango : agentsCore.MCPServerType.generic,
15107
- transport: tool3.config.mcp.transport,
15926
+ serverUrl: tool4.config.mcp.server.url,
15927
+ activeTools: tool4.config.mcp.activeTools,
15928
+ mcpType: tool4.config.mcp.server.url.includes("api.nango.dev") ? agentsCore.MCPServerType.nango : agentsCore.MCPServerType.generic,
15929
+ transport: tool4.config.mcp.transport,
15108
15930
  headers: {
15109
- ...tool3.headers,
15931
+ ...tool4.headers,
15110
15932
  ...agentToolRelationHeaders
15111
15933
  }
15112
15934
  };
15113
15935
  }
15114
- async getMcpTool(tool3) {
15115
- const cacheKey = `${this.config.tenantId}-${this.config.projectId}-${tool3.id}-${tool3.credentialReferenceId || "no-cred"}`;
15116
- const credentialReferenceId = tool3.credentialReferenceId;
15936
+ async getMcpTool(tool4) {
15937
+ const cacheKey = `${this.config.tenantId}-${this.config.projectId}-${tool4.id}-${tool4.credentialReferenceId || "no-cred"}`;
15938
+ const credentialReferenceId = tool4.credentialReferenceId;
15117
15939
  const toolsForAgent = await agentsCore.getToolsForAgent(dbClient_default)({
15118
15940
  scopes: {
15119
15941
  tenantId: this.config.tenantId,
@@ -15122,12 +15944,56 @@ var Agent = class {
15122
15944
  subAgentId: this.config.id
15123
15945
  }
15124
15946
  });
15125
- const toolRelation = toolsForAgent.data.find((t2) => t2.toolId === tool3.id);
15947
+ const toolRelation = toolsForAgent.data.find((t2) => t2.toolId === tool4.id);
15126
15948
  const agentToolRelationHeaders = toolRelation?.headers || void 0;
15127
15949
  const selectedTools = toolRelation?.selectedTools || void 0;
15128
15950
  const toolPolicies = toolRelation?.toolPolicies || {};
15129
15951
  let serverConfig;
15130
- if (credentialReferenceId && this.credentialStuffer) {
15952
+ const isUserScoped = tool4.credentialScope === "user";
15953
+ const userId = this.config.userId;
15954
+ if (isUserScoped && userId && this.credentialStuffer) {
15955
+ const userCredentialReference = await agentsCore.getUserScopedCredentialReference(dbClient_default)({
15956
+ scopes: {
15957
+ tenantId: this.config.tenantId,
15958
+ projectId: this.config.projectId
15959
+ },
15960
+ toolId: tool4.id,
15961
+ userId
15962
+ });
15963
+ if (userCredentialReference) {
15964
+ const storeReference = {
15965
+ credentialStoreId: userCredentialReference.credentialStoreId,
15966
+ retrievalParams: userCredentialReference.retrievalParams || {}
15967
+ };
15968
+ serverConfig = await this.credentialStuffer.buildMcpServerConfig(
15969
+ {
15970
+ tenantId: this.config.tenantId,
15971
+ projectId: this.config.projectId,
15972
+ contextConfigId: this.config.contextConfigId || void 0,
15973
+ conversationId: this.conversationId || void 0
15974
+ },
15975
+ this.convertToMCPToolConfig(tool4, agentToolRelationHeaders),
15976
+ storeReference,
15977
+ selectedTools
15978
+ );
15979
+ } else {
15980
+ logger20.warn(
15981
+ { toolId: tool4.id, userId },
15982
+ "User-scoped tool has no credential connected for this user"
15983
+ );
15984
+ serverConfig = await this.credentialStuffer.buildMcpServerConfig(
15985
+ {
15986
+ tenantId: this.config.tenantId,
15987
+ projectId: this.config.projectId,
15988
+ contextConfigId: this.config.contextConfigId || void 0,
15989
+ conversationId: this.conversationId || void 0
15990
+ },
15991
+ this.convertToMCPToolConfig(tool4, agentToolRelationHeaders),
15992
+ void 0,
15993
+ selectedTools
15994
+ );
15995
+ }
15996
+ } else if (credentialReferenceId && this.credentialStuffer) {
15131
15997
  const credentialReference = await agentsCore.getCredentialReference(dbClient_default)({
15132
15998
  scopes: {
15133
15999
  tenantId: this.config.tenantId,
@@ -15149,7 +16015,7 @@ var Agent = class {
15149
16015
  contextConfigId: this.config.contextConfigId || void 0,
15150
16016
  conversationId: this.conversationId || void 0
15151
16017
  },
15152
- this.convertToMCPToolConfig(tool3, agentToolRelationHeaders),
16018
+ this.convertToMCPToolConfig(tool4, agentToolRelationHeaders),
15153
16019
  storeReference,
15154
16020
  selectedTools
15155
16021
  );
@@ -15161,28 +16027,41 @@ var Agent = class {
15161
16027
  contextConfigId: this.config.contextConfigId || void 0,
15162
16028
  conversationId: this.conversationId || void 0
15163
16029
  },
15164
- this.convertToMCPToolConfig(tool3, agentToolRelationHeaders),
16030
+ this.convertToMCPToolConfig(tool4, agentToolRelationHeaders),
15165
16031
  void 0,
15166
16032
  selectedTools
15167
16033
  );
15168
16034
  } else {
15169
- if (tool3.config.type !== "mcp") {
15170
- throw new Error(`Cannot build server config for non-MCP tool: ${tool3.id}`);
16035
+ if (tool4.config.type !== "mcp") {
16036
+ throw new Error(`Cannot build server config for non-MCP tool: ${tool4.id}`);
15171
16037
  }
15172
16038
  serverConfig = {
15173
- type: tool3.config.mcp.transport?.type || agentsCore.MCPTransportType.streamableHttp,
15174
- url: tool3.config.mcp.server.url,
15175
- activeTools: tool3.config.mcp.activeTools,
16039
+ type: tool4.config.mcp.transport?.type || agentsCore.MCPTransportType.streamableHttp,
16040
+ url: tool4.config.mcp.server.url,
16041
+ activeTools: tool4.config.mcp.activeTools,
15176
16042
  selectedTools,
15177
16043
  headers: agentToolRelationHeaders
15178
16044
  };
15179
16045
  }
15180
- logger19.info(
16046
+ if (serverConfig.url?.toString().includes("composio.dev")) {
16047
+ const urlObj = new URL(serverConfig.url.toString());
16048
+ if (isUserScoped && userId) {
16049
+ urlObj.searchParams.set("user_id", userId);
16050
+ } else {
16051
+ const SEPARATOR = "||";
16052
+ urlObj.searchParams.set(
16053
+ "user_id",
16054
+ `${this.config.tenantId}${SEPARATOR}${this.config.projectId}`
16055
+ );
16056
+ }
16057
+ serverConfig.url = urlObj.toString();
16058
+ }
16059
+ logger20.info(
15181
16060
  {
15182
- toolName: tool3.name,
16061
+ toolName: tool4.name,
15183
16062
  credentialReferenceId,
15184
16063
  transportType: serverConfig.type,
15185
- headers: tool3.headers
16064
+ headers: tool4.headers
15186
16065
  },
15187
16066
  "Built MCP server config with credentials"
15188
16067
  );
@@ -15194,7 +16073,7 @@ var Agent = class {
15194
16073
  if (!client) {
15195
16074
  let connectionPromise = this.mcpConnectionLocks.get(cacheKey);
15196
16075
  if (!connectionPromise) {
15197
- connectionPromise = this.createMcpConnection(tool3, serverConfig);
16076
+ connectionPromise = this.createMcpConnection(tool4, serverConfig);
15198
16077
  this.mcpConnectionLocks.set(cacheKey, connectionPromise);
15199
16078
  }
15200
16079
  try {
@@ -15202,9 +16081,9 @@ var Agent = class {
15202
16081
  this.mcpClientCache.set(cacheKey, client);
15203
16082
  } catch (error) {
15204
16083
  this.mcpConnectionLocks.delete(cacheKey);
15205
- logger19.error(
16084
+ logger20.error(
15206
16085
  {
15207
- toolName: tool3.name,
16086
+ toolName: tool4.name,
15208
16087
  subAgentId: this.config.id,
15209
16088
  cacheKey,
15210
16089
  error: error instanceof Error ? error.message : String(error)
@@ -15222,13 +16101,13 @@ var Agent = class {
15222
16101
  "ai.toolCall",
15223
16102
  {
15224
16103
  attributes: {
15225
- "ai.toolCall.name": tool3.name,
16104
+ "ai.toolCall.name": tool4.name,
15226
16105
  "ai.toolCall.args": JSON.stringify({ operation: "mcp_tool_discovery" }),
15227
16106
  "ai.toolCall.result": JSON.stringify({
15228
16107
  status: "no_tools_available",
15229
16108
  message: `MCP server has 0 effective tools. Double check the selected tools in your agent and the active tools in the MCP server configuration.`,
15230
- serverUrl: tool3.config.type === "mcp" ? tool3.config.mcp.server.url : "unknown",
15231
- originalToolName: tool3.name
16109
+ serverUrl: tool4.config.type === "mcp" ? tool4.config.mcp.server.url : "unknown",
16110
+ originalToolName: tool4.name
15232
16111
  }),
15233
16112
  "ai.toolType": "mcp",
15234
16113
  "subAgent.name": this.config.name || "unknown",
@@ -15240,14 +16119,14 @@ var Agent = class {
15240
16119
  }
15241
16120
  },
15242
16121
  (span) => {
15243
- agentsCore.setSpanWithError(span, new Error(`0 effective tools available for ${tool3.name}`));
16122
+ agentsCore.setSpanWithError(span, new Error(`0 effective tools available for ${tool4.name}`));
15244
16123
  agentSessionManager.recordEvent(streamRequestId, "error", this.config.id, {
15245
16124
  message: `MCP server has 0 effective tools. Double check the selected tools in your graph and the active tools in the MCP server configuration.`,
15246
16125
  code: "no_tools_available",
15247
16126
  severity: "error",
15248
16127
  context: {
15249
- toolName: tool3.name,
15250
- serverUrl: tool3.config.type === "mcp" ? tool3.config.mcp.server.url : "unknown",
16128
+ toolName: tool4.name,
16129
+ serverUrl: tool4.config.type === "mcp" ? tool4.config.mcp.server.url : "unknown",
15251
16130
  operation: "mcp_tool_discovery"
15252
16131
  }
15253
16132
  });
@@ -15256,20 +16135,20 @@ var Agent = class {
15256
16135
  );
15257
16136
  }
15258
16137
  }
15259
- return { tools, toolPolicies };
16138
+ return { tools, toolPolicies, mcpServerId: tool4.id, mcpServerName: tool4.name };
15260
16139
  }
15261
- async createMcpConnection(tool3, serverConfig) {
16140
+ async createMcpConnection(tool4, serverConfig) {
15262
16141
  const client = new agentsCore.McpClient({
15263
- name: tool3.name,
16142
+ name: tool4.name,
15264
16143
  server: serverConfig
15265
16144
  });
15266
16145
  try {
15267
16146
  await client.connect();
15268
16147
  return client;
15269
16148
  } catch (error) {
15270
- logger19.error(
16149
+ logger20.error(
15271
16150
  {
15272
- toolName: tool3.name,
16151
+ toolName: tool4.name,
15273
16152
  subAgentId: this.config.id,
15274
16153
  error: error instanceof Error ? error.message : String(error)
15275
16154
  },
@@ -15309,7 +16188,7 @@ var Agent = class {
15309
16188
  for (const functionToolDef of functionToolsData) {
15310
16189
  const functionId = functionToolDef.functionId;
15311
16190
  if (!functionId) {
15312
- logger19.warn(
16191
+ logger20.warn(
15313
16192
  { functionToolId: functionToolDef.id },
15314
16193
  "Function tool missing functionId reference"
15315
16194
  );
@@ -15323,18 +16202,18 @@ var Agent = class {
15323
16202
  }
15324
16203
  });
15325
16204
  if (!functionData) {
15326
- logger19.warn(
16205
+ logger20.warn(
15327
16206
  { functionId, functionToolId: functionToolDef.id },
15328
16207
  "Function not found in functions table"
15329
16208
  );
15330
16209
  continue;
15331
16210
  }
15332
- const zodSchema = jsonSchemaToZod(functionData.inputSchema);
16211
+ const zodSchema = agentsCore.jsonSchemaToZod(functionData.inputSchema);
15333
16212
  const aiTool = ai.tool({
15334
16213
  description: functionToolDef.description || functionToolDef.name,
15335
16214
  inputSchema: zodSchema,
15336
16215
  execute: async (args2, { toolCallId }) => {
15337
- logger19.debug(
16216
+ logger20.debug(
15338
16217
  { toolName: functionToolDef.name, toolCallId, args: args2 },
15339
16218
  "Function Tool Called"
15340
16219
  );
@@ -15361,7 +16240,7 @@ var Agent = class {
15361
16240
  });
15362
16241
  return { result, toolCallId };
15363
16242
  } catch (error) {
15364
- logger19.error(
16243
+ logger20.error(
15365
16244
  {
15366
16245
  toolName: functionToolDef.name,
15367
16246
  toolCallId,
@@ -15381,7 +16260,7 @@ var Agent = class {
15381
16260
  );
15382
16261
  }
15383
16262
  } catch (error) {
15384
- logger19.error({ error }, "Failed to load function tools from database");
16263
+ logger20.error({ error }, "Failed to load function tools from database");
15385
16264
  }
15386
16265
  return functionTools;
15387
16266
  }
@@ -15391,7 +16270,7 @@ var Agent = class {
15391
16270
  async getResolvedContext(conversationId, headers2) {
15392
16271
  try {
15393
16272
  if (!this.config.contextConfigId) {
15394
- logger19.debug({ agentId: this.config.agentId }, "No context config found for agent");
16273
+ logger20.debug({ agentId: this.config.agentId }, "No context config found for agent");
15395
16274
  return null;
15396
16275
  }
15397
16276
  const contextConfig = await agentsCore.getContextConfigById(dbClient_default)({
@@ -15403,7 +16282,7 @@ var Agent = class {
15403
16282
  id: this.config.contextConfigId
15404
16283
  });
15405
16284
  if (!contextConfig) {
15406
- logger19.warn({ contextConfigId: this.config.contextConfigId }, "Context config not found");
16285
+ logger20.warn({ contextConfigId: this.config.contextConfigId }, "Context config not found");
15407
16286
  return null;
15408
16287
  }
15409
16288
  if (!this.contextResolver) {
@@ -15419,7 +16298,7 @@ var Agent = class {
15419
16298
  ...result.resolvedContext,
15420
16299
  $env: process.env
15421
16300
  };
15422
- logger19.debug(
16301
+ logger20.debug(
15423
16302
  {
15424
16303
  conversationId,
15425
16304
  contextConfigId: contextConfig.id,
@@ -15433,7 +16312,7 @@ var Agent = class {
15433
16312
  );
15434
16313
  return contextWithBuiltins;
15435
16314
  } catch (error) {
15436
- logger19.error(
16315
+ logger20.error(
15437
16316
  {
15438
16317
  conversationId,
15439
16318
  error: error instanceof Error ? error.message : "Unknown error"
@@ -15457,7 +16336,7 @@ var Agent = class {
15457
16336
  });
15458
16337
  return agentDefinition?.prompt || void 0;
15459
16338
  } catch (error) {
15460
- logger19.warn(
16339
+ logger20.warn(
15461
16340
  {
15462
16341
  agentId: this.config.agentId,
15463
16342
  error: error instanceof Error ? error.message : "Unknown error"
@@ -15486,7 +16365,7 @@ var Agent = class {
15486
16365
  (subAgent) => "artifactComponents" in subAgent && subAgent.artifactComponents && subAgent.artifactComponents.length > 0
15487
16366
  );
15488
16367
  } catch (error) {
15489
- logger19.warn(
16368
+ logger20.warn(
15490
16369
  {
15491
16370
  agentId: this.config.agentId,
15492
16371
  tenantId: this.config.tenantId,
@@ -15504,18 +16383,19 @@ var Agent = class {
15504
16383
  */
15505
16384
  async buildPhase2SystemPrompt(runtimeContext) {
15506
16385
  const phase2Config = new Phase2Config();
15507
- const hasAgentArtifactComponents = await this.hasAgentArtifactComponents();
16386
+ const compressionConfig = getCompressionConfigFromEnv();
16387
+ const hasAgentArtifactComponents = await this.hasAgentArtifactComponents() || compressionConfig.enabled;
15508
16388
  const conversationId = runtimeContext?.metadata?.conversationId || runtimeContext?.contextId;
15509
16389
  const resolvedContext = conversationId ? await this.getResolvedContext(conversationId) : null;
15510
- let processedPrompt = this.config.prompt;
15511
- if (resolvedContext) {
16390
+ let processedPrompt = this.config.prompt || "";
16391
+ if (resolvedContext && this.config.prompt) {
15512
16392
  try {
15513
16393
  processedPrompt = agentsCore.TemplateEngine.render(this.config.prompt, resolvedContext, {
15514
16394
  strict: false,
15515
16395
  preserveUnresolved: false
15516
16396
  });
15517
16397
  } catch (error) {
15518
- logger19.error(
16398
+ logger20.error(
15519
16399
  {
15520
16400
  conversationId,
15521
16401
  error: error instanceof Error ? error.message : "Unknown error"
@@ -15554,15 +16434,15 @@ var Agent = class {
15554
16434
  this.setConversationId(conversationId);
15555
16435
  }
15556
16436
  const resolvedContext = conversationId ? await this.getResolvedContext(conversationId) : null;
15557
- let processedPrompt = this.config.prompt;
15558
- if (resolvedContext) {
16437
+ let processedPrompt = this.config.prompt || "";
16438
+ if (resolvedContext && this.config.prompt) {
15559
16439
  try {
15560
16440
  processedPrompt = agentsCore.TemplateEngine.render(this.config.prompt, resolvedContext, {
15561
16441
  strict: false,
15562
16442
  preserveUnresolved: false
15563
16443
  });
15564
16444
  } catch (error) {
15565
- logger19.error(
16445
+ logger20.error(
15566
16446
  {
15567
16447
  conversationId,
15568
16448
  error: error instanceof Error ? error.message : "Unknown error"
@@ -15577,25 +16457,25 @@ var Agent = class {
15577
16457
  const functionTools = await this.getFunctionTools(streamRequestId || "");
15578
16458
  const relationTools = this.getRelationTools(runtimeContext);
15579
16459
  const allTools = { ...mcpTools, ...functionTools, ...relationTools };
15580
- logger19.info(
16460
+ logger20.info(
15581
16461
  {
15582
16462
  mcpTools: Object.keys(mcpTools),
15583
16463
  functionTools: Object.keys(functionTools),
15584
16464
  relationTools: Object.keys(relationTools),
15585
16465
  allTools: Object.keys(allTools),
15586
- functionToolsDetails: Object.entries(functionTools).map(([name2, tool3]) => ({
16466
+ functionToolsDetails: Object.entries(functionTools).map(([name2, tool4]) => ({
15587
16467
  name: name2,
15588
- hasExecute: typeof tool3.execute === "function",
15589
- hasDescription: !!tool3.description,
15590
- hasInputSchema: !!tool3.inputSchema
16468
+ hasExecute: typeof tool4.execute === "function",
16469
+ hasDescription: !!tool4.description,
16470
+ hasInputSchema: !!tool4.inputSchema
15591
16471
  }))
15592
16472
  },
15593
16473
  "Tools loaded for agent"
15594
16474
  );
15595
- const toolDefinitions = Object.entries(allTools).map(([name2, tool3]) => ({
16475
+ const toolDefinitions = Object.entries(allTools).map(([name2, tool4]) => ({
15596
16476
  name: name2,
15597
- description: tool3.description || "",
15598
- inputSchema: tool3.inputSchema || tool3.parameters || {},
16477
+ description: tool4.description || "",
16478
+ inputSchema: tool4.inputSchema || tool4.parameters || {},
15599
16479
  usageGuidelines: name2.startsWith("transfer_to_") || name2.startsWith("delegate_to_") ? `Use this tool to ${name2.startsWith("transfer_to_") ? "transfer" : "delegate"} to another agent when appropriate.` : "Use this tool when appropriate for the task at hand."
15600
16480
  }));
15601
16481
  const { getConversationScopedArtifacts: getConversationScopedArtifacts2 } = await Promise.resolve().then(() => (init_conversations(), conversations_exports));
@@ -15616,7 +16496,7 @@ var Agent = class {
15616
16496
  preserveUnresolved: false
15617
16497
  });
15618
16498
  } catch (error) {
15619
- logger19.error(
16499
+ logger20.error(
15620
16500
  {
15621
16501
  conversationId,
15622
16502
  error: error instanceof Error ? error.message : "Unknown error"
@@ -15626,7 +16506,8 @@ var Agent = class {
15626
16506
  }
15627
16507
  }
15628
16508
  const shouldIncludeArtifactComponents = !excludeDataComponents;
15629
- const hasAgentArtifactComponents = await this.hasAgentArtifactComponents();
16509
+ const compressionConfig = getCompressionConfigFromEnv();
16510
+ const hasAgentArtifactComponents = await this.hasAgentArtifactComponents() || compressionConfig.enabled;
15630
16511
  const config = {
15631
16512
  corePrompt: processedPrompt,
15632
16513
  prompt,
@@ -15649,7 +16530,7 @@ var Agent = class {
15649
16530
  toolCallId: zodOpenapi.z.string().describe("The tool call ID associated with this artifact.")
15650
16531
  }),
15651
16532
  execute: async ({ artifactId, toolCallId }) => {
15652
- logger19.info({ artifactId, toolCallId }, "get_artifact_full executed");
16533
+ logger20.info({ artifactId, toolCallId }, "get_artifact_full executed");
15653
16534
  const streamRequestId = this.getStreamRequestId();
15654
16535
  const artifactService = agentSessionManager.getArtifactService(streamRequestId);
15655
16536
  if (!artifactService) {
@@ -15685,7 +16566,8 @@ var Agent = class {
15685
16566
  // Provide a default tool set that is always available to the agent.
15686
16567
  async getDefaultTools(streamRequestId) {
15687
16568
  const defaultTools = {};
15688
- if (await this.agentHasArtifactComponents()) {
16569
+ const compressionConfig = getCompressionConfigFromEnv();
16570
+ if (await this.agentHasArtifactComponents() || compressionConfig.enabled) {
15689
16571
  defaultTools.get_reference_artifact = this.getArtifactTools();
15690
16572
  }
15691
16573
  const hasStructuredOutput = this.config.dataComponents && this.config.dataComponents.length > 0;
@@ -15700,6 +16582,37 @@ var Agent = class {
15700
16582
  );
15701
16583
  }
15702
16584
  }
16585
+ logger20.info(
16586
+ { agentId: this.config.id, streamRequestId },
16587
+ "Adding compress_context tool to defaultTools"
16588
+ );
16589
+ defaultTools.compress_context = ai.tool({
16590
+ description: "Manually compress the current conversation context to save space. Use when shifting topics, completing major tasks, or when context feels cluttered.",
16591
+ inputSchema: zodOpenapi.z.object({
16592
+ reason: zodOpenapi.z.string().describe(
16593
+ 'Why you are requesting compression (e.g., "shifting from research to coding", "completed analysis phase")'
16594
+ )
16595
+ }),
16596
+ execute: async ({ reason }) => {
16597
+ logger20.info(
16598
+ {
16599
+ agentId: this.config.id,
16600
+ streamRequestId,
16601
+ reason
16602
+ },
16603
+ "Manual compression requested by LLM"
16604
+ );
16605
+ if (this.currentCompressor) {
16606
+ this.currentCompressor.requestManualCompression(reason);
16607
+ }
16608
+ return {
16609
+ status: "compression_requested",
16610
+ reason,
16611
+ message: "Context compression will be applied on the next generation step. Previous work has been summarized and saved as artifacts."
16612
+ };
16613
+ }
16614
+ });
16615
+ logger20.info("getDefaultTools returning tools:", Object.keys(defaultTools).join(", "));
15703
16616
  return defaultTools;
15704
16617
  }
15705
16618
  getStreamRequestId() {
@@ -15945,7 +16858,7 @@ ${output}`;
15945
16858
  };
15946
16859
  return enhanced;
15947
16860
  } catch (error) {
15948
- logger19.warn({ error }, "Failed to enhance tool result with structure hints");
16861
+ logger20.warn({ error }, "Failed to enhance tool result with structure hints");
15949
16862
  return result;
15950
16863
  }
15951
16864
  }
@@ -15960,7 +16873,7 @@ ${output}`;
15960
16873
  }
15961
16874
  });
15962
16875
  } catch (error) {
15963
- logger19.error(
16876
+ logger20.error(
15964
16877
  { error, agentId: this.config.agentId },
15965
16878
  "Failed to check agent artifact components"
15966
16879
  );
@@ -16077,7 +16990,7 @@ ${output}`;
16077
16990
  const configuredTimeout = modelSettings.maxDuration ? Math.min(modelSettings.maxDuration * 1e3, LLM_GENERATION_MAX_ALLOWED_TIMEOUT_MS) : shouldStreamPhase1 ? LLM_GENERATION_FIRST_CALL_TIMEOUT_MS_STREAMING : LLM_GENERATION_FIRST_CALL_TIMEOUT_MS_NON_STREAMING;
16078
16991
  const timeoutMs = Math.min(configuredTimeout, LLM_GENERATION_MAX_ALLOWED_TIMEOUT_MS);
16079
16992
  if (modelSettings.maxDuration && modelSettings.maxDuration * 1e3 > LLM_GENERATION_MAX_ALLOWED_TIMEOUT_MS) {
16080
- logger19.warn(
16993
+ logger20.warn(
16081
16994
  {
16082
16995
  requestedTimeout: modelSettings.maxDuration * 1e3,
16083
16996
  appliedTimeout: timeoutMs,
@@ -16096,6 +17009,18 @@ ${output}`;
16096
17009
  role: "user",
16097
17010
  content: userMessage
16098
17011
  });
17012
+ const originalMessageCount = messages.length;
17013
+ const compressionConfig = getCompressionConfigFromEnv();
17014
+ const compressor = compressionConfig.enabled ? new MidGenerationCompressor(
17015
+ sessionId,
17016
+ contextId,
17017
+ this.config.tenantId,
17018
+ this.config.projectId,
17019
+ compressionConfig,
17020
+ this.getSummarizerModel(),
17021
+ primaryModelSettings
17022
+ ) : null;
17023
+ this.currentCompressor = compressor;
16099
17024
  if (shouldStreamPhase1) {
16100
17025
  const streamConfig = {
16101
17026
  ...modelSettings,
@@ -16106,6 +17031,87 @@ ${output}`;
16106
17031
  ...streamConfig,
16107
17032
  messages,
16108
17033
  tools: sanitizedTools,
17034
+ prepareStep: async ({ messages: stepMessages }) => {
17035
+ if (!compressor) {
17036
+ return {};
17037
+ }
17038
+ const compressionNeeded = compressor.isCompressionNeeded(stepMessages);
17039
+ if (compressionNeeded) {
17040
+ logger20.info(
17041
+ {
17042
+ compressorState: compressor.getState()
17043
+ },
17044
+ "Triggering layered mid-generation compression"
17045
+ );
17046
+ try {
17047
+ const originalMessages = stepMessages.slice(0, originalMessageCount);
17048
+ const generatedMessages = stepMessages.slice(originalMessageCount);
17049
+ if (generatedMessages.length > 0) {
17050
+ const compressionResult = await compressor.compress(generatedMessages);
17051
+ const finalMessages = [...originalMessages];
17052
+ if (compressionResult.summary.text_messages && compressionResult.summary.text_messages.length > 0) {
17053
+ finalMessages.push(...compressionResult.summary.text_messages);
17054
+ }
17055
+ const summaryMessage = JSON.stringify({
17056
+ high_level: compressionResult.summary?.summary?.high_level,
17057
+ user_intent: compressionResult.summary?.summary?.user_intent,
17058
+ decisions: compressionResult.summary?.summary?.decisions,
17059
+ open_questions: compressionResult.summary?.summary?.open_questions,
17060
+ next_steps: compressionResult.summary?.summary?.next_steps,
17061
+ related_artifacts: compressionResult?.summary?.summary?.related_artifacts
17062
+ });
17063
+ finalMessages.push({
17064
+ role: "user",
17065
+ content: `Based on your research, here's what you've discovered: ${summaryMessage}
17066
+
17067
+ Now please provide your answer to my original question using this context.`
17068
+ });
17069
+ logger20.info(
17070
+ {
17071
+ originalTotal: stepMessages.length,
17072
+ compressed: finalMessages.length,
17073
+ originalKept: originalMessages.length,
17074
+ generatedCompressed: generatedMessages.length
17075
+ },
17076
+ "Generated content compression completed"
17077
+ );
17078
+ logger20.info({ summaryMessage }, "Summary message");
17079
+ return { messages: finalMessages };
17080
+ }
17081
+ return {};
17082
+ } catch (error) {
17083
+ logger20.error(
17084
+ {
17085
+ error: error instanceof Error ? error.message : String(error),
17086
+ stack: error instanceof Error ? error.stack : void 0
17087
+ },
17088
+ "Smart compression failed, falling back to simple compression"
17089
+ );
17090
+ try {
17091
+ const targetSize = Math.floor(compressor.getHardLimit() * 0.5);
17092
+ const fallbackMessages = this.simpleCompression(stepMessages, targetSize);
17093
+ logger20.info(
17094
+ {
17095
+ originalCount: stepMessages.length,
17096
+ compressedCount: fallbackMessages.length,
17097
+ compressionType: "simple_fallback"
17098
+ },
17099
+ "Simple compression fallback completed"
17100
+ );
17101
+ return { messages: fallbackMessages };
17102
+ } catch (fallbackError) {
17103
+ logger20.error(
17104
+ {
17105
+ error: fallbackError instanceof Error ? fallbackError.message : String(fallbackError)
17106
+ },
17107
+ "Fallback compression also failed, continuing without compression"
17108
+ );
17109
+ return {};
17110
+ }
17111
+ }
17112
+ }
17113
+ return {};
17114
+ },
16109
17115
  stopWhen: async ({ steps }) => {
16110
17116
  const last = steps.at(-1);
16111
17117
  if (last && "text" in last && last.text) {
@@ -16119,7 +17125,7 @@ ${output}`;
16119
17125
  }
16120
17126
  );
16121
17127
  } catch (error) {
16122
- logger19.debug({ error }, "Failed to track agent reasoning");
17128
+ logger20.debug({ error }, "Failed to track agent reasoning");
16123
17129
  }
16124
17130
  }
16125
17131
  if (last && last["content"] && last["content"].length > 0) {
@@ -16241,6 +17247,87 @@ ${output}`;
16241
17247
  ...genConfig,
16242
17248
  messages,
16243
17249
  tools: sanitizedTools,
17250
+ prepareStep: async ({ messages: stepMessages }) => {
17251
+ if (!compressor) {
17252
+ return {};
17253
+ }
17254
+ const compressionNeeded = compressor.isCompressionNeeded(stepMessages);
17255
+ if (compressionNeeded) {
17256
+ logger20.info(
17257
+ {
17258
+ compressorState: compressor.getState()
17259
+ },
17260
+ "Triggering layered mid-generation compression"
17261
+ );
17262
+ try {
17263
+ const originalMessages = stepMessages.slice(0, originalMessageCount);
17264
+ const generatedMessages = stepMessages.slice(originalMessageCount);
17265
+ if (generatedMessages.length > 0) {
17266
+ const compressionResult = await compressor.compress(generatedMessages);
17267
+ const finalMessages = [...originalMessages];
17268
+ if (compressionResult.summary.text_messages && compressionResult.summary.text_messages.length > 0) {
17269
+ finalMessages.push(...compressionResult.summary.text_messages);
17270
+ }
17271
+ const summaryMessage = JSON.stringify({
17272
+ high_level: compressionResult.summary?.summary?.high_level,
17273
+ user_intent: compressionResult.summary?.summary?.user_intent,
17274
+ decisions: compressionResult.summary?.summary?.decisions,
17275
+ open_questions: compressionResult.summary?.summary?.open_questions,
17276
+ next_steps: compressionResult.summary?.summary?.next_steps,
17277
+ related_artifacts: compressionResult?.summary?.summary?.related_artifacts
17278
+ });
17279
+ finalMessages.push({
17280
+ role: "user",
17281
+ content: `Based on your research, here's what you've discovered: ${summaryMessage}
17282
+
17283
+ Now please provide your answer to my original question using this context.`
17284
+ });
17285
+ logger20.info(
17286
+ {
17287
+ originalTotal: stepMessages.length,
17288
+ compressed: finalMessages.length,
17289
+ originalKept: originalMessages.length,
17290
+ generatedCompressed: generatedMessages.length
17291
+ },
17292
+ "Generated content compression completed"
17293
+ );
17294
+ logger20.info({ summaryMessage }, "Summary message");
17295
+ return { messages: finalMessages };
17296
+ }
17297
+ return {};
17298
+ } catch (error) {
17299
+ logger20.error(
17300
+ {
17301
+ error: error instanceof Error ? error.message : String(error),
17302
+ stack: error instanceof Error ? error.stack : void 0
17303
+ },
17304
+ "Smart compression failed, falling back to simple compression"
17305
+ );
17306
+ try {
17307
+ const targetSize = Math.floor(compressor.getHardLimit() * 0.5);
17308
+ const fallbackMessages = this.simpleCompression(stepMessages, targetSize);
17309
+ logger20.info(
17310
+ {
17311
+ originalCount: stepMessages.length,
17312
+ compressedCount: fallbackMessages.length,
17313
+ compressionType: "simple_fallback"
17314
+ },
17315
+ "Simple compression fallback completed"
17316
+ );
17317
+ return { messages: fallbackMessages };
17318
+ } catch (fallbackError) {
17319
+ logger20.error(
17320
+ {
17321
+ error: fallbackError instanceof Error ? fallbackError.message : String(fallbackError)
17322
+ },
17323
+ "Fallback compression also failed, continuing without compression"
17324
+ );
17325
+ return {};
17326
+ }
17327
+ }
17328
+ }
17329
+ return {};
17330
+ },
16244
17331
  stopWhen: async ({ steps }) => {
16245
17332
  const last = steps.at(-1);
16246
17333
  if (last && "text" in last && last.text) {
@@ -16254,7 +17341,7 @@ ${output}`;
16254
17341
  }
16255
17342
  );
16256
17343
  } catch (error) {
16257
- logger19.debug({ error }, "Failed to track agent reasoning");
17344
+ logger20.debug({ error }, "Failed to track agent reasoning");
16258
17345
  }
16259
17346
  }
16260
17347
  if (steps.length >= 2) {
@@ -16292,7 +17379,22 @@ ${output}`;
16292
17379
  const thinkingCompleteCall = response.steps?.flatMap((s4) => s4.toolCalls || [])?.find((tc) => tc.toolName === "thinking_complete");
16293
17380
  if (thinkingCompleteCall) {
16294
17381
  const reasoningFlow = [];
16295
- if (response.steps) {
17382
+ const compressionSummary = this.currentCompressor?.getCompressionSummary();
17383
+ if (compressionSummary) {
17384
+ const summaryContent = JSON.stringify(compressionSummary, null, 2);
17385
+ reasoningFlow.push({
17386
+ role: "assistant",
17387
+ content: `## Research Summary (Compressed)
17388
+
17389
+ Based on tool executions, here's the comprehensive summary:
17390
+
17391
+ \`\`\`json
17392
+ ${summaryContent}
17393
+ \`\`\`
17394
+
17395
+ This summary represents all tool execution results in compressed form. Full details are preserved in artifacts.`
17396
+ });
17397
+ } else if (response.steps) {
16296
17398
  response.steps.forEach((step) => {
16297
17399
  if (step.toolCalls && step.toolResults) {
16298
17400
  step.toolCalls.forEach((call, index) => {
@@ -16364,7 +17466,7 @@ ${output}${structureHintsFormatted}`;
16364
17466
  const componentSchemas = [];
16365
17467
  if (this.config.dataComponents && this.config.dataComponents.length > 0) {
16366
17468
  this.config.dataComponents.forEach((dc) => {
16367
- const propsSchema = jsonSchemaToZod(dc.props);
17469
+ const propsSchema = agentsCore.jsonSchemaToZod(dc.props);
16368
17470
  componentSchemas.push(
16369
17471
  zodOpenapi.z.object({
16370
17472
  id: zodOpenapi.z.string(),
@@ -16401,7 +17503,7 @@ ${output}${structureHintsFormatted}`;
16401
17503
  LLM_GENERATION_MAX_ALLOWED_TIMEOUT_MS
16402
17504
  );
16403
17505
  if (structuredModelSettings.maxDuration && structuredModelSettings.maxDuration * 1e3 > LLM_GENERATION_MAX_ALLOWED_TIMEOUT_MS) {
16404
- logger19.warn(
17506
+ logger20.warn(
16405
17507
  {
16406
17508
  requestedTimeout: structuredModelSettings.maxDuration * 1e3,
16407
17509
  appliedTimeout: phase2TimeoutMs,
@@ -16424,6 +17526,12 @@ ${output}${structureHintsFormatted}`;
16424
17526
  }
16425
17527
  phase2Messages.push({ role: "user", content: userMessage });
16426
17528
  phase2Messages.push(...reasoningFlow);
17529
+ if (reasoningFlow.length > 0 && reasoningFlow[reasoningFlow.length - 1]?.role === "assistant") {
17530
+ phase2Messages.push({
17531
+ role: "user",
17532
+ content: "Continue with the structured response."
17533
+ });
17534
+ }
16427
17535
  const streamResult = ai.streamObject({
16428
17536
  ...structuredModelSettings,
16429
17537
  messages: phase2Messages,
@@ -16494,6 +17602,12 @@ ${output}${structureHintsFormatted}`;
16494
17602
  }
16495
17603
  phase2Messages.push({ role: "user", content: userMessage });
16496
17604
  phase2Messages.push(...reasoningFlow);
17605
+ if (reasoningFlow.length > 0 && reasoningFlow[reasoningFlow.length - 1]?.role === "assistant") {
17606
+ phase2Messages.push({
17607
+ role: "user",
17608
+ content: "Continue with the structured response."
17609
+ });
17610
+ }
16497
17611
  const structuredResponse = await ai.generateObject(
16498
17612
  withJsonPostProcessing2({
16499
17613
  ...structuredModelSettings,
@@ -16564,8 +17678,10 @@ ${output}${structureHintsFormatted}`;
16564
17678
  generationType
16565
17679
  });
16566
17680
  }
17681
+ this.currentCompressor = null;
16567
17682
  return formattedResponse;
16568
17683
  } catch (error) {
17684
+ this.currentCompressor = null;
16569
17685
  const errorToThrow = error instanceof Error ? error : new Error(String(error));
16570
17686
  agentsCore.setSpanWithError(span, errorToThrow);
16571
17687
  span.end();
@@ -16577,7 +17693,7 @@ ${output}${structureHintsFormatted}`;
16577
17693
  };
16578
17694
 
16579
17695
  // src/agents/generateTaskHandler.ts
16580
- var logger20 = agentsCore.getLogger("generateTaskHandler");
17696
+ var logger21 = agentsCore.getLogger("generateTaskHandler");
16581
17697
  var createTaskHandler = (config, credentialStoreRegistry) => {
16582
17698
  return async (task) => {
16583
17699
  try {
@@ -16695,7 +17811,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16695
17811
  return { ...relation, description: enhancedDescription };
16696
17812
  }
16697
17813
  } catch (error) {
16698
- logger20.warn({ subAgentId: relation.id, error }, "Failed to enhance agent description");
17814
+ logger21.warn({ subAgentId: relation.id, error }, "Failed to enhance agent description");
16699
17815
  }
16700
17816
  return relation;
16701
17817
  })
@@ -16753,7 +17869,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16753
17869
  };
16754
17870
  }
16755
17871
  } catch (error) {
16756
- logger20.warn(
17872
+ logger21.warn(
16757
17873
  { targetAgentId: relation.targetAgentId, error },
16758
17874
  "Failed to enhance team agent description"
16759
17875
  );
@@ -16761,7 +17877,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16761
17877
  return relation;
16762
17878
  })
16763
17879
  );
16764
- const prompt = "prompt" in config.agentSchema ? config.agentSchema.prompt : "";
17880
+ const prompt = "prompt" in config.agentSchema ? config.agentSchema.prompt || void 0 : "";
16765
17881
  const models = "models" in config.agentSchema ? config.agentSchema.models : void 0;
16766
17882
  const stopWhen = "stopWhen" in config.agentSchema ? config.agentSchema.stopWhen : void 0;
16767
17883
  const toolsForAgentResult = await Promise.all(
@@ -16770,11 +17886,12 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16770
17886
  item.tool,
16771
17887
  dbClient_default,
16772
17888
  credentialStoreRegistry,
16773
- item.id
17889
+ item.id,
17890
+ config.userId
16774
17891
  );
16775
17892
  if (item.selectedTools && item.selectedTools.length > 0) {
16776
17893
  const selectedToolsSet = new Set(item.selectedTools);
16777
- mcpTool.availableTools = mcpTool.availableTools?.filter((tool3) => selectedToolsSet.has(tool3.name)) || [];
17894
+ mcpTool.availableTools = mcpTool.availableTools?.filter((tool4) => selectedToolsSet.has(tool4.name)) || [];
16778
17895
  }
16779
17896
  return mcpTool;
16780
17897
  })
@@ -16787,6 +17904,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16787
17904
  agentId: config.agentId,
16788
17905
  baseUrl: config.baseUrl,
16789
17906
  apiKey: config.apiKey,
17907
+ userId: config.userId,
16790
17908
  name: config.name,
16791
17909
  description: config.description || "",
16792
17910
  prompt,
@@ -16800,7 +17918,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16800
17918
  baseUrl: config.baseUrl,
16801
17919
  apiKey: config.apiKey,
16802
17920
  name: relation.name,
16803
- description: relation.description,
17921
+ description: relation.description || void 0,
16804
17922
  prompt: "",
16805
17923
  delegateRelations: [],
16806
17924
  subAgentRelations: [],
@@ -16840,7 +17958,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16840
17958
  targetTransferRelations = transferRel;
16841
17959
  targetDelegateRelations = delegateRel;
16842
17960
  } catch (err2) {
16843
- logger20.info(
17961
+ logger21.info(
16844
17962
  {
16845
17963
  agentId: relation.id,
16846
17964
  error: err2?.message || "Unknown error"
@@ -16854,12 +17972,13 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16854
17972
  item.tool,
16855
17973
  dbClient_default,
16856
17974
  credentialStoreRegistry,
16857
- item.id
17975
+ item.id,
17976
+ config.userId
16858
17977
  );
16859
17978
  if (item.selectedTools && item.selectedTools.length > 0) {
16860
17979
  const selectedToolsSet = new Set(item.selectedTools);
16861
17980
  mcpTool.availableTools = mcpTool.availableTools?.filter(
16862
- (tool3) => selectedToolsSet.has(tool3.name)
17981
+ (tool4) => selectedToolsSet.has(tool4.name)
16863
17982
  ) || [];
16864
17983
  }
16865
17984
  return mcpTool;
@@ -16903,7 +18022,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16903
18022
  projectId: config.projectId,
16904
18023
  agentId: config.agentId,
16905
18024
  name: relation.name,
16906
- description: relation.description,
18025
+ description: relation.description || void 0,
16907
18026
  prompt: "",
16908
18027
  delegateRelations: targetDelegateRelationsConfig,
16909
18028
  subAgentRelations: [],
@@ -16918,13 +18037,14 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16918
18037
  type: "internal",
16919
18038
  config: {
16920
18039
  id: relation.id,
18040
+ relationId: relation.relationId,
16921
18041
  tenantId: config.tenantId,
16922
18042
  projectId: config.projectId,
16923
18043
  agentId: config.agentId,
16924
18044
  baseUrl: config.baseUrl,
16925
18045
  apiKey: config.apiKey,
16926
18046
  name: relation.name,
16927
- description: relation.description,
18047
+ description: relation.description || void 0,
16928
18048
  prompt: "",
16929
18049
  delegateRelations: [],
16930
18050
  // Simplified - no nested relations
@@ -16979,7 +18099,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16979
18099
  const taskIdMatch = task.id.match(/^task_([^-]+-[^-]+-\d+)-/);
16980
18100
  if (taskIdMatch) {
16981
18101
  contextId = taskIdMatch[1];
16982
- logger20.info(
18102
+ logger21.info(
16983
18103
  {
16984
18104
  taskId: task.id,
16985
18105
  extractedContextId: contextId,
@@ -16997,7 +18117,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
16997
18117
  agent.setDelegationStatus(isDelegation);
16998
18118
  agent.setDelegationId(delegationId);
16999
18119
  if (isDelegation) {
17000
- logger20.info(
18120
+ logger21.info(
17001
18121
  { subAgentId: config.subAgentId, taskId: task.id, delegationId },
17002
18122
  "Delegated agent - streaming disabled"
17003
18123
  );
@@ -17034,7 +18154,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
17034
18154
  const toolResult = allToolResults.find(
17035
18155
  (result) => result.toolCallId === toolCall.toolCallId
17036
18156
  );
17037
- logger20.info(
18157
+ logger21.info(
17038
18158
  {
17039
18159
  toolCallName: toolCall.toolName,
17040
18160
  toolCallId: toolCall.toolCallId,
@@ -17051,7 +18171,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
17051
18171
  const transferReason = responseText || allThoughts[allThoughts.length - 1]?.text || "Agent requested transfer. No reason provided.";
17052
18172
  if (toolResult?.output && isValidTransferResult(toolResult.output)) {
17053
18173
  const transferResult = toolResult.output;
17054
- logger20.info(
18174
+ logger21.info(
17055
18175
  {
17056
18176
  validationPassed: true,
17057
18177
  transferResult,
@@ -17068,7 +18188,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
17068
18188
  reason: transferReason,
17069
18189
  original_message: userMessage
17070
18190
  };
17071
- logger20.info(
18191
+ logger21.info(
17072
18192
  {
17073
18193
  artifactData,
17074
18194
  artifactDataKeys: Object.keys(artifactData)
@@ -17093,7 +18213,7 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
17093
18213
  ]
17094
18214
  };
17095
18215
  }
17096
- logger20.warn(
18216
+ logger21.warn(
17097
18217
  {
17098
18218
  hasToolResult: !!toolResult,
17099
18219
  hasOutput: !!toolResult?.output,
@@ -17122,7 +18242,9 @@ var createTaskHandler = (config, credentialStoreRegistry) => {
17122
18242
  } catch (error) {
17123
18243
  console.error("Task handler error:", error);
17124
18244
  const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
17125
- const isConnectionRefused = errorMessage.includes("Connection refused. Please check if the MCP server is running.");
18245
+ const isConnectionRefused = errorMessage.includes(
18246
+ "Connection refused. Please check if the MCP server is running."
18247
+ );
17126
18248
  return {
17127
18249
  status: {
17128
18250
  state: agentsCore.TaskState.Failed,
@@ -17174,17 +18296,18 @@ var createTaskHandlerConfig = async (params) => {
17174
18296
  baseUrl: params.baseUrl,
17175
18297
  apiKey: params.apiKey,
17176
18298
  name: subAgent.name,
17177
- description: subAgent.description,
18299
+ description: subAgent.description || void 0,
17178
18300
  conversationHistoryConfig: effectiveConversationHistoryConfig,
17179
18301
  contextConfigId: agent?.contextConfigId || void 0,
17180
- sandboxConfig: params.sandboxConfig
18302
+ sandboxConfig: params.sandboxConfig,
18303
+ userId: params.userId
17181
18304
  };
17182
18305
  };
17183
18306
 
17184
18307
  // src/data/agents.ts
17185
18308
  init_logger();
17186
18309
  init_dbClient();
17187
- var logger21 = agentsCore.getLogger("agents");
18310
+ var logger22 = agentsCore.getLogger("agents");
17188
18311
  function createAgentCard({
17189
18312
  dbAgent,
17190
18313
  baseUrl
@@ -17254,7 +18377,8 @@ async function hydrateAgent({
17254
18377
  baseUrl,
17255
18378
  apiKey,
17256
18379
  credentialStoreRegistry,
17257
- sandboxConfig
18380
+ sandboxConfig,
18381
+ userId
17258
18382
  }) {
17259
18383
  try {
17260
18384
  const taskHandlerConfig = await createTaskHandlerConfig({
@@ -17264,7 +18388,8 @@ async function hydrateAgent({
17264
18388
  subAgentId: dbAgent.id,
17265
18389
  baseUrl,
17266
18390
  apiKey,
17267
- sandboxConfig
18391
+ sandboxConfig,
18392
+ userId
17268
18393
  });
17269
18394
  const taskHandler = createTaskHandler(taskHandlerConfig, credentialStoreRegistry);
17270
18395
  const agentCard = createAgentCard({
@@ -17287,12 +18412,13 @@ async function hydrateAgent({
17287
18412
  async function getRegisteredAgent(params) {
17288
18413
  const { executionContext, credentialStoreRegistry, sandboxConfig } = params;
17289
18414
  const { tenantId, projectId, agentId, subAgentId, baseUrl, apiKey } = executionContext;
18415
+ const userId = getUserIdFromContext(executionContext);
17290
18416
  let dbAgent;
17291
18417
  if (!subAgentId) {
17292
18418
  const agent = await agentsCore.getAgentWithDefaultSubAgent(dbClient_default)({
17293
18419
  scopes: { tenantId, projectId, agentId }
17294
18420
  });
17295
- logger21.info({ agent }, "agent with default sub agent");
18421
+ logger22.info({ agent }, "agent with default sub agent");
17296
18422
  if (!agent || !agent.defaultSubAgent) {
17297
18423
  return null;
17298
18424
  }
@@ -17317,7 +18443,8 @@ async function getRegisteredAgent(params) {
17317
18443
  baseUrl: agentFrameworkBaseUrl,
17318
18444
  credentialStoreRegistry,
17319
18445
  apiKey,
17320
- sandboxConfig
18446
+ sandboxConfig,
18447
+ userId
17321
18448
  });
17322
18449
  }
17323
18450
 
@@ -17325,7 +18452,7 @@ async function getRegisteredAgent(params) {
17325
18452
  init_dbClient();
17326
18453
  init_logger();
17327
18454
  var app = new zodOpenapi.OpenAPIHono();
17328
- var logger22 = agentsCore.getLogger("agents");
18455
+ var logger23 = agentsCore.getLogger("agents");
17329
18456
  app.openapi(
17330
18457
  zodOpenapi.createRoute({
17331
18458
  method: "get",
@@ -17363,7 +18490,7 @@ app.openapi(
17363
18490
  tracestate: c2.req.header("tracestate"),
17364
18491
  baggage: c2.req.header("baggage")
17365
18492
  };
17366
- logger22.info(
18493
+ logger23.info(
17367
18494
  {
17368
18495
  otelHeaders,
17369
18496
  path: c2.req.path,
@@ -17373,8 +18500,8 @@ app.openapi(
17373
18500
  );
17374
18501
  const executionContext = agentsCore.getRequestExecutionContext(c2);
17375
18502
  const { tenantId, projectId, agentId, subAgentId } = executionContext;
17376
- logger22.info({ executionContext }, "executionContext");
17377
- logger22.info(
18503
+ logger23.info({ executionContext }, "executionContext");
18504
+ logger23.info(
17378
18505
  {
17379
18506
  message: "getRegisteredAgent (agent-level)",
17380
18507
  tenantId,
@@ -17391,7 +18518,7 @@ app.openapi(
17391
18518
  credentialStoreRegistry: credentialStores,
17392
18519
  sandboxConfig
17393
18520
  });
17394
- logger22.info({ agent }, "agent registered: well-known agent.json");
18521
+ logger23.info({ agent }, "agent registered: well-known agent.json");
17395
18522
  if (!agent) {
17396
18523
  throw agentsCore.createApiError({
17397
18524
  code: "not_found",
@@ -17407,7 +18534,7 @@ app.post("/a2a", async (c2) => {
17407
18534
  tracestate: c2.req.header("tracestate"),
17408
18535
  baggage: c2.req.header("baggage")
17409
18536
  };
17410
- logger22.info(
18537
+ logger23.info(
17411
18538
  {
17412
18539
  otelHeaders,
17413
18540
  path: c2.req.path,
@@ -17418,7 +18545,7 @@ app.post("/a2a", async (c2) => {
17418
18545
  const executionContext = agentsCore.getRequestExecutionContext(c2);
17419
18546
  const { tenantId, projectId, agentId, subAgentId } = executionContext;
17420
18547
  if (subAgentId) {
17421
- logger22.info(
18548
+ logger23.info(
17422
18549
  {
17423
18550
  message: "a2a (agent-level)",
17424
18551
  tenantId,
@@ -17447,7 +18574,7 @@ app.post("/a2a", async (c2) => {
17447
18574
  }
17448
18575
  return a2aHandler(c2, agent2);
17449
18576
  }
17450
- logger22.info(
18577
+ logger23.info(
17451
18578
  {
17452
18579
  message: "a2a (agent-level)",
17453
18580
  tenantId,
@@ -17532,14 +18659,14 @@ function extractTransferData(task) {
17532
18659
  }
17533
18660
 
17534
18661
  // src/a2a/transfer.ts
17535
- var logger23 = agentsCore.getLogger("Transfer");
18662
+ var logger24 = agentsCore.getLogger("Transfer");
17536
18663
  async function executeTransfer({
17537
18664
  tenantId,
17538
18665
  threadId,
17539
18666
  projectId,
17540
18667
  targetSubAgentId
17541
18668
  }) {
17542
- logger23.info(
18669
+ logger24.info(
17543
18670
  {
17544
18671
  targetAgent: targetSubAgentId,
17545
18672
  threadId,
@@ -17554,12 +18681,12 @@ async function executeTransfer({
17554
18681
  threadId,
17555
18682
  subAgentId: targetSubAgentId
17556
18683
  });
17557
- logger23.info(
18684
+ logger24.info(
17558
18685
  { targetAgent: targetSubAgentId, threadId },
17559
18686
  "Successfully updated active_sub_agent_id in database"
17560
18687
  );
17561
18688
  } catch (error) {
17562
- logger23.error(
18689
+ logger24.error(
17563
18690
  { error, targetAgent: targetSubAgentId, threadId },
17564
18691
  "Failed to update active_sub_agent_id"
17565
18692
  );
@@ -18131,7 +19258,7 @@ function createBufferingStreamHelper() {
18131
19258
  var createMCPStreamHelper = createBufferingStreamHelper;
18132
19259
 
18133
19260
  // src/handlers/executionHandler.ts
18134
- var logger24 = agentsCore.getLogger("ExecutionHandler");
19261
+ var logger25 = agentsCore.getLogger("ExecutionHandler");
18135
19262
  var ExecutionHandler = class {
18136
19263
  MAX_ERRORS = AGENT_EXECUTION_MAX_CONSECUTIVE_ERRORS;
18137
19264
  /**
@@ -18164,7 +19291,7 @@ var ExecutionHandler = class {
18164
19291
  if (emitOperations) {
18165
19292
  agentSessionManager.enableEmitOperations(requestId2);
18166
19293
  }
18167
- logger24.info(
19294
+ logger25.info(
18168
19295
  { sessionId: requestId2, agentId, conversationId, emitOperations },
18169
19296
  "Created AgentSession for message execution"
18170
19297
  );
@@ -18197,7 +19324,7 @@ var ExecutionHandler = class {
18197
19324
  );
18198
19325
  }
18199
19326
  } catch (modelError) {
18200
- logger24.warn(
19327
+ logger25.warn(
18201
19328
  {
18202
19329
  error: modelError instanceof Error ? modelError.message : "Unknown error",
18203
19330
  agentId
@@ -18212,7 +19339,7 @@ var ExecutionHandler = class {
18212
19339
  }
18213
19340
  }
18214
19341
  } catch (error) {
18215
- logger24.error(
19342
+ logger25.error(
18216
19343
  {
18217
19344
  error: error instanceof Error ? error.message : "Unknown error",
18218
19345
  stack: error instanceof Error ? error.stack : void 0
@@ -18228,7 +19355,7 @@ var ExecutionHandler = class {
18228
19355
  try {
18229
19356
  await sseHelper.writeOperation(agentInitializingOp(requestId2, agentId));
18230
19357
  const taskId = `task_${conversationId}-${requestId2}`;
18231
- logger24.info(
19358
+ logger25.info(
18232
19359
  { taskId, currentAgentId, conversationId, requestId: requestId2 },
18233
19360
  "Attempting to create or reuse existing task"
18234
19361
  );
@@ -18252,7 +19379,7 @@ var ExecutionHandler = class {
18252
19379
  sub_agent_id: currentAgentId
18253
19380
  }
18254
19381
  });
18255
- logger24.info(
19382
+ logger25.info(
18256
19383
  {
18257
19384
  taskId,
18258
19385
  createdTaskMetadata: Array.isArray(task) ? task[0]?.metadata : task?.metadata
@@ -18261,27 +19388,27 @@ var ExecutionHandler = class {
18261
19388
  );
18262
19389
  } catch (error) {
18263
19390
  if (error?.cause?.code === "23505") {
18264
- logger24.info(
19391
+ logger25.info(
18265
19392
  { taskId, error: error.message },
18266
19393
  "Task already exists, fetching existing task"
18267
19394
  );
18268
19395
  const existingTask = await agentsCore.getTask(dbClient_default)({ id: taskId });
18269
19396
  if (existingTask) {
18270
19397
  task = existingTask;
18271
- logger24.info(
19398
+ logger25.info(
18272
19399
  { taskId, existingTask },
18273
19400
  "Successfully reused existing task from race condition"
18274
19401
  );
18275
19402
  } else {
18276
- logger24.error({ taskId, error }, "Task constraint failed but task not found");
19403
+ logger25.error({ taskId, error }, "Task constraint failed but task not found");
18277
19404
  throw error;
18278
19405
  }
18279
19406
  } else {
18280
- logger24.error({ taskId, error }, "Failed to create task due to non-constraint error");
19407
+ logger25.error({ taskId, error }, "Failed to create task due to non-constraint error");
18281
19408
  throw error;
18282
19409
  }
18283
19410
  }
18284
- logger24.debug(
19411
+ logger25.debug(
18285
19412
  {
18286
19413
  timestamp: /* @__PURE__ */ new Date(),
18287
19414
  executionType: "create_initial_task",
@@ -18300,7 +19427,7 @@ var ExecutionHandler = class {
18300
19427
  const maxTransfers = agentConfig?.stopWhen?.transferCountIs ?? agentsCore.AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT;
18301
19428
  while (iterations < maxTransfers) {
18302
19429
  iterations++;
18303
- logger24.info(
19430
+ logger25.info(
18304
19431
  { iterations, currentAgentId, agentId, conversationId, fromSubAgentId },
18305
19432
  `Execution loop iteration ${iterations} with agent ${currentAgentId}, transfer from: ${fromSubAgentId || "none"}`
18306
19433
  );
@@ -18308,10 +19435,10 @@ var ExecutionHandler = class {
18308
19435
  scopes: { tenantId, projectId },
18309
19436
  conversationId
18310
19437
  });
18311
- logger24.info({ activeAgent }, "activeAgent");
19438
+ logger25.info({ activeAgent }, "activeAgent");
18312
19439
  if (activeAgent && activeAgent.activeSubAgentId !== currentAgentId) {
18313
19440
  currentAgentId = activeAgent.activeSubAgentId;
18314
- logger24.info({ currentAgentId }, `Updated current agent to: ${currentAgentId}`);
19441
+ logger25.info({ currentAgentId }, `Updated current agent to: ${currentAgentId}`);
18315
19442
  }
18316
19443
  const agentBaseUrl = `${baseUrl}/agents`;
18317
19444
  const a2aClient = new A2AClient(agentBaseUrl, {
@@ -18352,13 +19479,13 @@ var ExecutionHandler = class {
18352
19479
  });
18353
19480
  if (!messageResponse?.result) {
18354
19481
  errorCount++;
18355
- logger24.error(
19482
+ logger25.error(
18356
19483
  { currentAgentId, iterations, errorCount },
18357
19484
  `No response from agent ${currentAgentId} on iteration ${iterations} (error ${errorCount}/${this.MAX_ERRORS})`
18358
19485
  );
18359
19486
  if (errorCount >= this.MAX_ERRORS) {
18360
19487
  const errorMessage2 = `Maximum error limit (${this.MAX_ERRORS}) reached`;
18361
- logger24.error({ maxErrors: this.MAX_ERRORS, errorCount }, errorMessage2);
19488
+ logger25.error({ maxErrors: this.MAX_ERRORS, errorCount }, errorMessage2);
18362
19489
  await sseHelper.writeOperation(errorOp(errorMessage2, currentAgentId || "system"));
18363
19490
  if (task) {
18364
19491
  await agentsCore.updateTask(dbClient_default)({
@@ -18373,7 +19500,7 @@ var ExecutionHandler = class {
18373
19500
  }
18374
19501
  });
18375
19502
  }
18376
- agentSessionManager.endSession(requestId2);
19503
+ await agentSessionManager.endSession(requestId2);
18377
19504
  unregisterStreamHelper(requestId2);
18378
19505
  return { success: false, error: errorMessage2, iterations };
18379
19506
  }
@@ -18382,7 +19509,7 @@ var ExecutionHandler = class {
18382
19509
  if (isTransferTask(messageResponse.result)) {
18383
19510
  const transferData = extractTransferData(messageResponse.result);
18384
19511
  if (!transferData) {
18385
- logger24.error(
19512
+ logger25.error(
18386
19513
  { result: messageResponse.result },
18387
19514
  "Transfer detected but no transfer data found"
18388
19515
  );
@@ -18391,7 +19518,7 @@ var ExecutionHandler = class {
18391
19518
  const { targetSubAgentId, fromSubAgentId: transferFromAgent } = transferData;
18392
19519
  const firstArtifact = messageResponse.result.artifacts[0];
18393
19520
  const transferReason = firstArtifact?.parts[1]?.kind === "text" ? firstArtifact.parts[1].text : "Transfer initiated";
18394
- logger24.info({ targetSubAgentId, transferReason, transferFromAgent }, "Transfer response");
19521
+ logger25.info({ targetSubAgentId, transferReason, transferFromAgent }, "Transfer response");
18395
19522
  await agentsCore.createMessage(dbClient_default)({
18396
19523
  id: agentsCore.generateId(),
18397
19524
  tenantId,
@@ -18422,7 +19549,7 @@ var ExecutionHandler = class {
18422
19549
  if (success) {
18423
19550
  fromSubAgentId = currentAgentId;
18424
19551
  currentAgentId = newAgentId;
18425
- logger24.info(
19552
+ logger25.info(
18426
19553
  {
18427
19554
  transferFrom: fromSubAgentId,
18428
19555
  transferTo: currentAgentId,
@@ -18436,7 +19563,7 @@ var ExecutionHandler = class {
18436
19563
  let responseParts = [];
18437
19564
  if (messageResponse.result.streamedContent?.parts) {
18438
19565
  responseParts = messageResponse.result.streamedContent.parts;
18439
- logger24.info(
19566
+ logger25.info(
18440
19567
  { partsCount: responseParts.length },
18441
19568
  "Using streamed content for conversation history"
18442
19569
  );
@@ -18444,7 +19571,7 @@ var ExecutionHandler = class {
18444
19571
  responseParts = messageResponse.result.artifacts?.flatMap(
18445
19572
  (artifact) => artifact.parts || []
18446
19573
  ) || [];
18447
- logger24.info(
19574
+ logger25.info(
18448
19575
  { partsCount: responseParts.length },
18449
19576
  "Using artifacts for conversation history (fallback)"
18450
19577
  );
@@ -18453,7 +19580,7 @@ var ExecutionHandler = class {
18453
19580
  const agentSessionData = agentSessionManager.getSession(requestId2);
18454
19581
  if (agentSessionData) {
18455
19582
  const sessionSummary = agentSessionData.getSummary();
18456
- logger24.info(sessionSummary, "AgentSession data after completion");
19583
+ logger25.info(sessionSummary, "AgentSession data after completion");
18457
19584
  }
18458
19585
  let textContent = "";
18459
19586
  for (const part of responseParts) {
@@ -18507,22 +19634,22 @@ var ExecutionHandler = class {
18507
19634
  }
18508
19635
  });
18509
19636
  const updateTaskEnd = Date.now();
18510
- logger24.info(
19637
+ logger25.info(
18511
19638
  { duration: updateTaskEnd - updateTaskStart },
18512
19639
  "Completed updateTask operation"
18513
19640
  );
18514
19641
  await sseHelper.writeOperation(completionOp(currentAgentId, iterations));
18515
19642
  await sseHelper.complete();
18516
- logger24.info({}, "Ending AgentSession and cleaning up");
18517
- agentSessionManager.endSession(requestId2);
18518
- logger24.info({}, "Cleaning up streamHelper");
19643
+ logger25.info({}, "Ending AgentSession and cleaning up");
19644
+ await agentSessionManager.endSession(requestId2);
19645
+ logger25.info({}, "Cleaning up streamHelper");
18519
19646
  unregisterStreamHelper(requestId2);
18520
19647
  let response;
18521
19648
  if (sseHelper instanceof BufferingStreamHelper) {
18522
19649
  const captured = sseHelper.getCapturedResponse();
18523
19650
  response = captured.text || "No response content";
18524
19651
  }
18525
- logger24.info({}, "ExecutionHandler returning success");
19652
+ logger25.info({}, "ExecutionHandler returning success");
18526
19653
  return { success: true, iterations, response };
18527
19654
  } catch (error) {
18528
19655
  agentsCore.setSpanWithError(span, error instanceof Error ? error : new Error(String(error)));
@@ -18533,13 +19660,13 @@ var ExecutionHandler = class {
18533
19660
  });
18534
19661
  }
18535
19662
  errorCount++;
18536
- logger24.warn(
19663
+ logger25.warn(
18537
19664
  { iterations, errorCount },
18538
19665
  `No valid response or transfer on iteration ${iterations} (error ${errorCount}/${this.MAX_ERRORS})`
18539
19666
  );
18540
19667
  if (errorCount >= this.MAX_ERRORS) {
18541
19668
  const errorMessage2 = `Maximum error limit (${this.MAX_ERRORS}) reached`;
18542
- logger24.error({ maxErrors: this.MAX_ERRORS, errorCount }, errorMessage2);
19669
+ logger25.error({ maxErrors: this.MAX_ERRORS, errorCount }, errorMessage2);
18543
19670
  await sseHelper.writeOperation(errorOp(errorMessage2, currentAgentId || "system"));
18544
19671
  if (task) {
18545
19672
  await agentsCore.updateTask(dbClient_default)({
@@ -18554,13 +19681,13 @@ var ExecutionHandler = class {
18554
19681
  }
18555
19682
  });
18556
19683
  }
18557
- agentSessionManager.endSession(requestId2);
19684
+ await agentSessionManager.endSession(requestId2);
18558
19685
  unregisterStreamHelper(requestId2);
18559
19686
  return { success: false, error: errorMessage2, iterations };
18560
19687
  }
18561
19688
  }
18562
19689
  const errorMessage = `Maximum transfer limit (${maxTransfers}) reached without completion`;
18563
- logger24.error({ maxTransfers, iterations }, errorMessage);
19690
+ logger25.error({ maxTransfers, iterations }, errorMessage);
18564
19691
  await sseHelper.writeOperation(errorOp(errorMessage, currentAgentId || "system"));
18565
19692
  if (task) {
18566
19693
  await agentsCore.updateTask(dbClient_default)({
@@ -18575,11 +19702,11 @@ var ExecutionHandler = class {
18575
19702
  }
18576
19703
  });
18577
19704
  }
18578
- agentSessionManager.endSession(requestId2);
19705
+ await agentSessionManager.endSession(requestId2);
18579
19706
  unregisterStreamHelper(requestId2);
18580
19707
  return { success: false, error: errorMessage, iterations };
18581
19708
  } catch (error) {
18582
- logger24.error({ error }, "Error in execution handler");
19709
+ logger25.error({ error }, "Error in execution handler");
18583
19710
  const errorMessage = error instanceof Error ? error.message : "Unknown execution error";
18584
19711
  await sseHelper.writeOperation(
18585
19712
  errorOp(`Execution error: ${errorMessage}`, currentAgentId || "system")
@@ -18597,7 +19724,7 @@ var ExecutionHandler = class {
18597
19724
  }
18598
19725
  });
18599
19726
  }
18600
- agentSessionManager.endSession(requestId2);
19727
+ await agentSessionManager.endSession(requestId2);
18601
19728
  unregisterStreamHelper(requestId2);
18602
19729
  return { success: false, error: errorMessage, iterations };
18603
19730
  }
@@ -18607,7 +19734,7 @@ var ExecutionHandler = class {
18607
19734
  // src/routes/chat.ts
18608
19735
  init_logger();
18609
19736
  var app2 = new zodOpenapi.OpenAPIHono();
18610
- var logger25 = agentsCore.getLogger("completionsHandler");
19737
+ var logger26 = agentsCore.getLogger("completionsHandler");
18611
19738
  var chatCompletionsRoute = zodOpenapi.createRoute({
18612
19739
  method: "post",
18613
19740
  path: "/completions",
@@ -18725,7 +19852,7 @@ app2.openapi(chatCompletionsRoute, async (c2) => {
18725
19852
  tracestate: c2.req.header("tracestate"),
18726
19853
  baggage: c2.req.header("baggage")
18727
19854
  };
18728
- logger25.info(
19855
+ logger26.info(
18729
19856
  {
18730
19857
  otelHeaders,
18731
19858
  path: c2.req.path,
@@ -18834,7 +19961,7 @@ app2.openapi(chatCompletionsRoute, async (c2) => {
18834
19961
  dbClient: dbClient_default,
18835
19962
  credentialStores
18836
19963
  });
18837
- logger25.info(
19964
+ logger26.info(
18838
19965
  {
18839
19966
  tenantId,
18840
19967
  projectId,
@@ -18882,7 +20009,7 @@ app2.openapi(chatCompletionsRoute, async (c2) => {
18882
20009
  try {
18883
20010
  const sseHelper = createSSEStreamHelper(stream2, requestId2, timestamp);
18884
20011
  await sseHelper.writeRole();
18885
- logger25.info({ subAgentId }, "Starting execution");
20012
+ logger26.info({ subAgentId }, "Starting execution");
18886
20013
  const emitOperationsHeader = c2.req.header("x-emit-operations");
18887
20014
  const emitOperations = emitOperationsHeader === "true";
18888
20015
  const executionHandler = new ExecutionHandler();
@@ -18895,7 +20022,7 @@ app2.openapi(chatCompletionsRoute, async (c2) => {
18895
20022
  sseHelper,
18896
20023
  emitOperations
18897
20024
  });
18898
- logger25.info(
20025
+ logger26.info(
18899
20026
  { result },
18900
20027
  `Execution completed: ${result.success ? "success" : "failed"} after ${result.iterations} iterations`
18901
20028
  );
@@ -18909,7 +20036,7 @@ app2.openapi(chatCompletionsRoute, async (c2) => {
18909
20036
  }
18910
20037
  await sseHelper.complete();
18911
20038
  } catch (error) {
18912
- logger25.error(
20039
+ logger26.error(
18913
20040
  {
18914
20041
  error: error instanceof Error ? error.message : error,
18915
20042
  stack: error instanceof Error ? error.stack : void 0
@@ -18926,13 +20053,13 @@ app2.openapi(chatCompletionsRoute, async (c2) => {
18926
20053
  );
18927
20054
  await sseHelper.complete();
18928
20055
  } catch (streamError) {
18929
- logger25.error({ streamError }, "Failed to write error to stream");
20056
+ logger26.error({ streamError }, "Failed to write error to stream");
18930
20057
  }
18931
20058
  }
18932
20059
  });
18933
20060
  });
18934
20061
  } catch (error) {
18935
- logger25.error(
20062
+ logger26.error(
18936
20063
  {
18937
20064
  error: error instanceof Error ? error.message : error,
18938
20065
  stack: error instanceof Error ? error.stack : void 0
@@ -18960,7 +20087,7 @@ var chat_default = app2;
18960
20087
  init_dbClient();
18961
20088
  init_logger();
18962
20089
  var app3 = new zodOpenapi.OpenAPIHono();
18963
- var logger26 = agentsCore.getLogger("chatDataStream");
20090
+ var logger27 = agentsCore.getLogger("chatDataStream");
18964
20091
  var chatDataStreamRoute = zodOpenapi.createRoute({
18965
20092
  method: "post",
18966
20093
  path: "/chat",
@@ -19087,7 +20214,7 @@ app3.openapi(chatDataStreamRoute, async (c2) => {
19087
20214
  });
19088
20215
  const lastUserMessage = body2.messages.filter((m4) => m4.role === "user").slice(-1)[0];
19089
20216
  const userText = typeof lastUserMessage?.content === "string" ? lastUserMessage.content : lastUserMessage?.parts?.map((p4) => p4.text).join("") || "";
19090
- logger26.info({ userText, lastUserMessage }, "userText");
20217
+ logger27.info({ userText, lastUserMessage }, "userText");
19091
20218
  const messageSpan = api.trace.getActiveSpan();
19092
20219
  if (messageSpan) {
19093
20220
  messageSpan.setAttributes({
@@ -19170,7 +20297,7 @@ app3.openapi(chatDataStreamRoute, async (c2) => {
19170
20297
  await streamHelper.writeOperation(errorOp("Unable to process request", "system"));
19171
20298
  }
19172
20299
  } catch (err2) {
19173
- logger26.error({ err: err2 }, "Streaming error");
20300
+ logger27.error({ err: err2 }, "Streaming error");
19174
20301
  await streamHelper.writeOperation(errorOp("Internal server error", "system"));
19175
20302
  } finally {
19176
20303
  if ("cleanup" in streamHelper && typeof streamHelper.cleanup === "function") {
@@ -19192,7 +20319,7 @@ app3.openapi(chatDataStreamRoute, async (c2) => {
19192
20319
  );
19193
20320
  });
19194
20321
  } catch (error) {
19195
- logger26.error(
20322
+ logger27.error(
19196
20323
  {
19197
20324
  error,
19198
20325
  errorMessage: error instanceof Error ? error.message : String(error),
@@ -19281,7 +20408,7 @@ app3.openapi(toolApprovalRoute, async (c2) => {
19281
20408
  const { tenantId, projectId } = executionContext;
19282
20409
  const requestBody = await c2.req.json();
19283
20410
  const { conversationId, toolCallId, approved, reason } = requestBody;
19284
- logger26.info(
20411
+ logger27.info(
19285
20412
  {
19286
20413
  conversationId,
19287
20414
  toolCallId,
@@ -19310,7 +20437,7 @@ app3.openapi(toolApprovalRoute, async (c2) => {
19310
20437
  span.setStatus({ code: 1, message: "Tool call not found" });
19311
20438
  return c2.json({ error: "Tool call not found or already processed" }, 404);
19312
20439
  }
19313
- logger26.info({ conversationId, toolCallId, approved }, "Tool approval processed successfully");
20440
+ logger27.info({ conversationId, toolCallId, approved }, "Tool approval processed successfully");
19314
20441
  span.setStatus({ code: 1, message: "Success" });
19315
20442
  return c2.json({
19316
20443
  success: true,
@@ -19318,7 +20445,7 @@ app3.openapi(toolApprovalRoute, async (c2) => {
19318
20445
  });
19319
20446
  } catch (error) {
19320
20447
  const errorMessage = error instanceof Error ? error.message : "Unknown error";
19321
- logger26.error(
20448
+ logger27.error(
19322
20449
  {
19323
20450
  error: errorMessage,
19324
20451
  stack: error instanceof Error ? error.stack : void 0
@@ -19343,7 +20470,7 @@ var chatDataStream_default = app3;
19343
20470
  // src/routes/mcp.ts
19344
20471
  init_dbClient();
19345
20472
  init_logger();
19346
- var logger27 = agentsCore.getLogger("mcp");
20473
+ var logger28 = agentsCore.getLogger("mcp");
19347
20474
  var MockResponseSingleton = class _MockResponseSingleton {
19348
20475
  static instance;
19349
20476
  mockRes;
@@ -19397,21 +20524,21 @@ var createSpoofInitMessage = (mcpProtocolVersion) => ({
19397
20524
  id: 0
19398
20525
  });
19399
20526
  var spoofTransportInitialization = async (transport, req, sessionId, mcpProtocolVersion) => {
19400
- logger27.info({ sessionId }, "Spoofing initialization message to set transport state");
20527
+ logger28.info({ sessionId }, "Spoofing initialization message to set transport state");
19401
20528
  const spoofInitMessage = createSpoofInitMessage(mcpProtocolVersion);
19402
20529
  const mockRes = MockResponseSingleton.getInstance().getMockResponse();
19403
20530
  try {
19404
20531
  await transport.handleRequest(req, mockRes, spoofInitMessage);
19405
- logger27.info({ sessionId }, "Successfully spoofed initialization");
20532
+ logger28.info({ sessionId }, "Successfully spoofed initialization");
19406
20533
  } catch (spoofError) {
19407
- logger27.warn({ sessionId, error: spoofError }, "Spoof initialization failed, continuing anyway");
20534
+ logger28.warn({ sessionId, error: spoofError }, "Spoof initialization failed, continuing anyway");
19408
20535
  }
19409
20536
  };
19410
20537
  var validateSession = async (req, res, body2, tenantId, projectId, agentId) => {
19411
20538
  const sessionId = req.headers["mcp-session-id"];
19412
- logger27.info({ sessionId }, "Received MCP session ID");
20539
+ logger28.info({ sessionId }, "Received MCP session ID");
19413
20540
  if (!sessionId) {
19414
- logger27.info({ body: body2 }, "Missing session ID");
20541
+ logger28.info({ body: body2 }, "Missing session ID");
19415
20542
  res.writeHead(400).end(
19416
20543
  JSON.stringify({
19417
20544
  jsonrpc: "2.0",
@@ -19438,7 +20565,7 @@ var validateSession = async (req, res, body2, tenantId, projectId, agentId) => {
19438
20565
  scopes: { tenantId, projectId },
19439
20566
  conversationId: sessionId
19440
20567
  });
19441
- logger27.info(
20568
+ logger28.info(
19442
20569
  {
19443
20570
  sessionId,
19444
20571
  conversationFound: !!conversation,
@@ -19449,7 +20576,7 @@ var validateSession = async (req, res, body2, tenantId, projectId, agentId) => {
19449
20576
  "Conversation lookup result"
19450
20577
  );
19451
20578
  if (!conversation || conversation.metadata?.sessionData?.sessionType !== "mcp" || conversation.metadata?.sessionData?.agentId !== agentId) {
19452
- logger27.info(
20579
+ logger28.info(
19453
20580
  { sessionId, conversationId: conversation?.id },
19454
20581
  "MCP session not found or invalid"
19455
20582
  );
@@ -19510,7 +20637,7 @@ var executeAgentQuery = async (executionContext, conversationId, query, defaultS
19510
20637
  requestId: requestId2,
19511
20638
  sseHelper: mcpStreamHelper
19512
20639
  });
19513
- logger27.info(
20640
+ logger28.info(
19514
20641
  { result },
19515
20642
  `Execution completed: ${result.success ? "success" : "failed"} after ${result.iterations} iterations`
19516
20643
  );
@@ -19594,7 +20721,7 @@ var getServer = async (headers2, executionContext, conversationId, credentialSto
19594
20721
  dbClient: dbClient_default,
19595
20722
  credentialStores
19596
20723
  });
19597
- logger27.info(
20724
+ logger28.info(
19598
20725
  {
19599
20726
  tenantId,
19600
20727
  projectId,
@@ -19656,7 +20783,7 @@ var validateRequestParameters = (c2) => {
19656
20783
  };
19657
20784
  var handleInitializationRequest = async (body2, executionContext, validatedContext, req, res, c2, credentialStores) => {
19658
20785
  const { tenantId, projectId, agentId } = executionContext;
19659
- logger27.info({ body: body2 }, "Received initialization request");
20786
+ logger28.info({ body: body2 }, "Received initialization request");
19660
20787
  const sessionId = agentsCore.getConversationId();
19661
20788
  const activeSpan = api.trace.getActiveSpan();
19662
20789
  if (activeSpan) {
@@ -19712,7 +20839,7 @@ var handleInitializationRequest = async (body2, executionContext, validatedConte
19712
20839
  }
19713
20840
  }
19714
20841
  });
19715
- logger27.info(
20842
+ logger28.info(
19716
20843
  { sessionId, conversationId: conversation.id },
19717
20844
  "Created MCP session as conversation"
19718
20845
  );
@@ -19721,9 +20848,9 @@ var handleInitializationRequest = async (body2, executionContext, validatedConte
19721
20848
  });
19722
20849
  const server = await getServer(validatedContext, executionContext, sessionId, credentialStores);
19723
20850
  await server.connect(transport);
19724
- logger27.info({ sessionId }, "Server connected for initialization");
20851
+ logger28.info({ sessionId }, "Server connected for initialization");
19725
20852
  res.setHeader("Mcp-Session-Id", sessionId);
19726
- logger27.info(
20853
+ logger28.info(
19727
20854
  {
19728
20855
  sessionId,
19729
20856
  bodyMethod: body2?.method,
@@ -19732,7 +20859,7 @@ var handleInitializationRequest = async (body2, executionContext, validatedConte
19732
20859
  "About to handle initialization request"
19733
20860
  );
19734
20861
  await transport.handleRequest(req, res, body2);
19735
- logger27.info({ sessionId }, "Successfully handled initialization request");
20862
+ logger28.info({ sessionId }, "Successfully handled initialization request");
19736
20863
  return fetchToNode.toFetchResponse(res);
19737
20864
  });
19738
20865
  };
@@ -19759,8 +20886,8 @@ var handleExistingSessionRequest = async (body2, executionContext, validatedCont
19759
20886
  sessionId,
19760
20887
  conversation.metadata?.session_data?.mcpProtocolVersion
19761
20888
  );
19762
- logger27.info({ sessionId }, "Server connected and transport initialized");
19763
- logger27.info(
20889
+ logger28.info({ sessionId }, "Server connected and transport initialized");
20890
+ logger28.info(
19764
20891
  {
19765
20892
  sessionId,
19766
20893
  bodyKeys: Object.keys(body2 || {}),
@@ -19774,9 +20901,9 @@ var handleExistingSessionRequest = async (body2, executionContext, validatedCont
19774
20901
  );
19775
20902
  try {
19776
20903
  await transport.handleRequest(req, res, body2);
19777
- logger27.info({ sessionId }, "Successfully handled MCP request");
20904
+ logger28.info({ sessionId }, "Successfully handled MCP request");
19778
20905
  } catch (transportError) {
19779
- logger27.error(
20906
+ logger28.error(
19780
20907
  {
19781
20908
  sessionId,
19782
20909
  error: transportError,
@@ -19827,13 +20954,13 @@ app4.openapi(
19827
20954
  }
19828
20955
  const { executionContext } = paramValidation;
19829
20956
  const body2 = c2.get("requestBody") || {};
19830
- logger27.info({ body: body2, bodyKeys: Object.keys(body2 || {}) }, "Parsed request body");
20957
+ logger28.info({ body: body2, bodyKeys: Object.keys(body2 || {}) }, "Parsed request body");
19831
20958
  const isInitRequest = body2.method === "initialize";
19832
20959
  const { req, res } = fetchToNode.toReqRes(c2.req.raw);
19833
20960
  const validatedContext = c2.get("validatedContext") || {};
19834
20961
  const credentialStores = c2.get("credentialStores");
19835
- logger27.info({ validatedContext }, "Validated context");
19836
- logger27.info({ req }, "request");
20962
+ logger28.info({ validatedContext }, "Validated context");
20963
+ logger28.info({ req }, "request");
19837
20964
  if (isInitRequest) {
19838
20965
  return await handleInitializationRequest(
19839
20966
  body2,
@@ -19854,7 +20981,7 @@ app4.openapi(
19854
20981
  credentialStores
19855
20982
  );
19856
20983
  } catch (e) {
19857
- logger27.error(
20984
+ logger28.error(
19858
20985
  {
19859
20986
  error: e instanceof Error ? e.message : e,
19860
20987
  stack: e instanceof Error ? e.stack : void 0
@@ -19866,7 +20993,7 @@ app4.openapi(
19866
20993
  }
19867
20994
  );
19868
20995
  app4.get("/", async (c2) => {
19869
- logger27.info({}, "Received GET MCP request");
20996
+ logger28.info({}, "Received GET MCP request");
19870
20997
  return c2.json(
19871
20998
  {
19872
20999
  jsonrpc: "2.0",
@@ -19880,7 +21007,7 @@ app4.get("/", async (c2) => {
19880
21007
  );
19881
21008
  });
19882
21009
  app4.delete("/", async (c2) => {
19883
- logger27.info({}, "Received DELETE MCP request");
21010
+ logger28.info({}, "Received DELETE MCP request");
19884
21011
  return c2.json(
19885
21012
  {
19886
21013
  jsonrpc: "2.0",
@@ -19893,7 +21020,7 @@ app4.delete("/", async (c2) => {
19893
21020
  var mcp_default = app4;
19894
21021
 
19895
21022
  // src/app.ts
19896
- var logger28 = agentsCore.getLogger("agents-run-api");
21023
+ var logger29 = agentsCore.getLogger("agents-run-api");
19897
21024
  function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
19898
21025
  const app6 = new zodOpenapi.OpenAPIHono();
19899
21026
  app6.use("*", otel.otel());
@@ -19912,7 +21039,7 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
19912
21039
  const body2 = await c2.req.json();
19913
21040
  c2.set("requestBody", body2);
19914
21041
  } catch (error) {
19915
- logger28.debug({ error }, "Failed to parse JSON body, continuing without parsed body");
21042
+ logger29.debug({ error }, "Failed to parse JSON body, continuing without parsed body");
19916
21043
  }
19917
21044
  }
19918
21045
  return next();
@@ -19963,8 +21090,8 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
19963
21090
  if (!isExpectedError) {
19964
21091
  const errorMessage = err2 instanceof Error ? err2.message : String(err2);
19965
21092
  const errorStack = err2 instanceof Error ? err2.stack : void 0;
19966
- if (logger28) {
19967
- logger28.error(
21093
+ if (logger29) {
21094
+ logger29.error(
19968
21095
  {
19969
21096
  error: err2,
19970
21097
  message: errorMessage,
@@ -19976,8 +21103,8 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
19976
21103
  );
19977
21104
  }
19978
21105
  } else {
19979
- if (logger28) {
19980
- logger28.error(
21106
+ if (logger29) {
21107
+ logger29.error(
19981
21108
  {
19982
21109
  error: err2,
19983
21110
  path: c2.req.path,
@@ -19994,8 +21121,8 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
19994
21121
  const response = err2.getResponse();
19995
21122
  return response;
19996
21123
  } catch (responseError) {
19997
- if (logger28) {
19998
- logger28.error({ error: responseError }, "Error while handling HTTPException response");
21124
+ if (logger29) {
21125
+ logger29.error({ error: responseError }, "Error while handling HTTPException response");
19999
21126
  }
20000
21127
  }
20001
21128
  }
@@ -20029,7 +21156,7 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
20029
21156
  app6.use("*", async (c2, next) => {
20030
21157
  const executionContext = c2.get("executionContext");
20031
21158
  if (!executionContext) {
20032
- logger28.debug({}, "Empty execution context");
21159
+ logger29.debug({}, "Empty execution context");
20033
21160
  return next();
20034
21161
  }
20035
21162
  const { tenantId, projectId, agentId } = executionContext;
@@ -20038,7 +21165,7 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
20038
21165
  if (requestBody) {
20039
21166
  conversationId = requestBody.conversationId;
20040
21167
  if (!conversationId) {
20041
- logger28.debug({ requestBody }, "No conversation ID found in request body");
21168
+ logger29.debug({ requestBody }, "No conversation ID found in request body");
20042
21169
  }
20043
21170
  }
20044
21171
  const entries = Object.fromEntries(
@@ -20053,7 +21180,7 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
20053
21180
  })
20054
21181
  );
20055
21182
  if (!Object.keys(entries).length) {
20056
- logger28.debug({}, "Empty entries for baggage");
21183
+ logger29.debug({}, "Empty entries for baggage");
20057
21184
  return next();
20058
21185
  }
20059
21186
  const bag = Object.entries(entries).reduce(
@@ -20107,6 +21234,7 @@ function createExecutionHono(serverConfig, credentialStores, sandboxConfig) {
20107
21234
  }
20108
21235
 
20109
21236
  // src/index.ts
21237
+ defaultSDK.start();
20110
21238
  var defaultConfig = {
20111
21239
  port: 3003,
20112
21240
  serverOptions: {