@oliphaunt/wasix-ts 0.1.0

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.
Files changed (169) hide show
  1. package/ARCHITECTURE.md +655 -0
  2. package/CHANGELOG.md +33 -0
  3. package/LICENSE +21 -0
  4. package/README.md +404 -0
  5. package/THIRD_PARTY_NOTICES.md +20 -0
  6. package/lib/archive.d.ts +21 -0
  7. package/lib/archive.js +336 -0
  8. package/lib/asset-source.d.ts +4 -0
  9. package/lib/asset-source.js +15 -0
  10. package/lib/byte-channel.d.ts +27 -0
  11. package/lib/byte-channel.js +170 -0
  12. package/lib/client-common.d.ts +6 -0
  13. package/lib/client-common.js +36 -0
  14. package/lib/client.d.ts +7 -0
  15. package/lib/client.js +24 -0
  16. package/lib/database-root.d.ts +19 -0
  17. package/lib/database-root.js +139 -0
  18. package/lib/database.d.ts +135 -0
  19. package/lib/database.js +1039 -0
  20. package/lib/descriptor-validation.d.ts +10 -0
  21. package/lib/descriptor-validation.js +75 -0
  22. package/lib/direct-client-common.d.ts +50 -0
  23. package/lib/direct-client-common.js +717 -0
  24. package/lib/direct-client.d.ts +4 -0
  25. package/lib/direct-client.js +13 -0
  26. package/lib/direct.node.d.ts +2 -0
  27. package/lib/direct.node.js +2 -0
  28. package/lib/errors.d.ts +25 -0
  29. package/lib/errors.js +34 -0
  30. package/lib/extension-descriptor.d.ts +14 -0
  31. package/lib/extension-descriptor.js +419 -0
  32. package/lib/extensions.d.ts +68 -0
  33. package/lib/extensions.js +769 -0
  34. package/lib/host/LICENSE +21 -0
  35. package/lib/host/index.d.mts +123 -0
  36. package/lib/host/index.mjs +11 -0
  37. package/lib/host/provenance.json +16 -0
  38. package/lib/host/wasmer_js_bg.wasm +0 -0
  39. package/lib/host/worker.mjs +11 -0
  40. package/lib/host-runtime.d.ts +5 -0
  41. package/lib/host-runtime.js +13 -0
  42. package/lib/icu-descriptor.d.ts +3 -0
  43. package/lib/icu-descriptor.js +92 -0
  44. package/lib/index.bun.d.ts +2 -0
  45. package/lib/index.bun.js +2 -0
  46. package/lib/index.d.ts +2 -0
  47. package/lib/index.deno.d.ts +2 -0
  48. package/lib/index.deno.js +2 -0
  49. package/lib/index.js +2 -0
  50. package/lib/index.node.d.ts +2 -0
  51. package/lib/index.node.js +2 -0
  52. package/lib/internal-common.d.ts +12 -0
  53. package/lib/internal-common.js +274 -0
  54. package/lib/internal.d.ts +5 -0
  55. package/lib/internal.js +42 -0
  56. package/lib/internal.node.d.ts +5 -0
  57. package/lib/internal.node.js +8 -0
  58. package/lib/native-addon.d.ts +111 -0
  59. package/lib/native-addon.js +223 -0
  60. package/lib/native-server.d.ts +21 -0
  61. package/lib/native-server.js +109 -0
  62. package/lib/native-session.d.ts +60 -0
  63. package/lib/native-session.js +565 -0
  64. package/lib/node-actor.d.ts +7 -0
  65. package/lib/node-actor.js +10 -0
  66. package/lib/node-client-common.d.ts +9 -0
  67. package/lib/node-client-common.js +35 -0
  68. package/lib/node-client.d.ts +4 -0
  69. package/lib/node-client.js +13 -0
  70. package/lib/node-direct.d.ts +7 -0
  71. package/lib/node-direct.js +10 -0
  72. package/lib/node-worker-options.d.ts +5 -0
  73. package/lib/node-worker-options.js +65 -0
  74. package/lib/node-worker-port.d.ts +4 -0
  75. package/lib/node-worker-port.js +116 -0
  76. package/lib/node-worker.d.ts +1 -0
  77. package/lib/node-worker.js +38 -0
  78. package/lib/pgwire-connection.d.ts +60 -0
  79. package/lib/pgwire-connection.js +528 -0
  80. package/lib/pgwire.d.ts +3 -0
  81. package/lib/pgwire.js +105 -0
  82. package/lib/physical-archive.d.ts +29 -0
  83. package/lib/physical-archive.js +527 -0
  84. package/lib/protocol.d.ts +1 -0
  85. package/lib/protocol.js +1 -0
  86. package/lib/public.d.ts +4 -0
  87. package/lib/public.js +3 -0
  88. package/lib/query.d.ts +1 -0
  89. package/lib/query.js +1 -0
  90. package/lib/rpc.d.ts +203 -0
  91. package/lib/rpc.js +84 -0
  92. package/lib/runtime-descriptor.d.ts +3 -0
  93. package/lib/runtime-descriptor.js +79 -0
  94. package/lib/server.node.d.ts +1 -0
  95. package/lib/server.node.js +1 -0
  96. package/lib/startup-config.d.ts +2 -0
  97. package/lib/startup-config.js +19 -0
  98. package/lib/storage/bun.d.ts +6 -0
  99. package/lib/storage/bun.js +6 -0
  100. package/lib/storage/deno.d.ts +7 -0
  101. package/lib/storage/deno.js +7 -0
  102. package/lib/storage/incremental-storage.d.ts +25 -0
  103. package/lib/storage/incremental-storage.js +154 -0
  104. package/lib/storage/indexed-db-provider.d.ts +40 -0
  105. package/lib/storage/indexed-db-provider.js +259 -0
  106. package/lib/storage/indexed-db.d.ts +9 -0
  107. package/lib/storage/indexed-db.js +11 -0
  108. package/lib/storage/node.d.ts +10 -0
  109. package/lib/storage/node.js +13 -0
  110. package/lib/storage/opfs-pool.d.ts +31 -0
  111. package/lib/storage/opfs-pool.js +1271 -0
  112. package/lib/storage/opfs-provider.d.ts +4 -0
  113. package/lib/storage/opfs-provider.js +257 -0
  114. package/lib/storage/opfs.d.ts +8 -0
  115. package/lib/storage/opfs.js +10 -0
  116. package/lib/storage/restore-cleanup.d.ts +4 -0
  117. package/lib/storage/restore-cleanup.js +22 -0
  118. package/lib/storage/web-lock.d.ts +2 -0
  119. package/lib/storage/web-lock.js +64 -0
  120. package/lib/storage-provider.d.ts +47 -0
  121. package/lib/storage-provider.js +141 -0
  122. package/lib/storage-snapshot.d.ts +44 -0
  123. package/lib/storage-snapshot.js +274 -0
  124. package/lib/storage.d.ts +46 -0
  125. package/lib/storage.js +83 -0
  126. package/lib/tool-runtime.d.ts +43 -0
  127. package/lib/tool-runtime.js +93 -0
  128. package/lib/tool-worker-common.d.ts +48 -0
  129. package/lib/tool-worker-common.js +97 -0
  130. package/lib/tool-worker.d.ts +1 -0
  131. package/lib/tool-worker.js +10 -0
  132. package/lib/types.d.ts +230 -0
  133. package/lib/types.js +1 -0
  134. package/lib/wasix-runtime.d.ts +24 -0
  135. package/lib/wasix-runtime.js +186 -0
  136. package/lib/worker-client.d.ts +4 -0
  137. package/lib/worker-client.js +45 -0
  138. package/lib/worker-dispatch.d.ts +11 -0
  139. package/lib/worker-dispatch.js +174 -0
  140. package/lib/worker-entry.bun.d.ts +2 -0
  141. package/lib/worker-entry.bun.js +2 -0
  142. package/lib/worker-entry.d.ts +2 -0
  143. package/lib/worker-entry.deno.d.ts +2 -0
  144. package/lib/worker-entry.deno.js +2 -0
  145. package/lib/worker-entry.js +2 -0
  146. package/lib/worker-entry.node.d.ts +2 -0
  147. package/lib/worker-entry.node.js +2 -0
  148. package/lib/worker-node-client.d.ts +4 -0
  149. package/lib/worker-node-client.js +55 -0
  150. package/lib/worker-rpc.d.ts +36 -0
  151. package/lib/worker-rpc.js +422 -0
  152. package/lib/worker-transfer.d.ts +6 -0
  153. package/lib/worker-transfer.js +11 -0
  154. package/lib/worker.d.ts +1 -0
  155. package/lib/worker.js +21 -0
  156. package/lib/zstd.d.ts +4 -0
  157. package/lib/zstd.js +12 -0
  158. package/node_modules/@oliphaunt/js-core/README.md +7 -0
  159. package/node_modules/@oliphaunt/js-core/dist/commonjs/protocol.d.ts +1 -0
  160. package/node_modules/@oliphaunt/js-core/dist/commonjs/protocol.js +22 -0
  161. package/node_modules/@oliphaunt/js-core/dist/commonjs/query.d.ts +255 -0
  162. package/node_modules/@oliphaunt/js-core/dist/commonjs/query.js +2068 -0
  163. package/node_modules/@oliphaunt/js-core/dist/module/package.json +3 -0
  164. package/node_modules/@oliphaunt/js-core/dist/module/protocol.d.ts +1 -0
  165. package/node_modules/@oliphaunt/js-core/dist/module/protocol.js +19 -0
  166. package/node_modules/@oliphaunt/js-core/dist/module/query.d.ts +255 -0
  167. package/node_modules/@oliphaunt/js-core/dist/module/query.js +2039 -0
  168. package/node_modules/@oliphaunt/js-core/package.json +21 -0
  169. package/package.json +122 -0
@@ -0,0 +1,139 @@
1
+ import { PHYSICAL_FORMAT as CARRIER_PHYSICAL_FORMAT, POSTGRES_MAJOR as CARRIER_POSTGRES_MAJOR, } from '@oliphaunt/liboliphaunt-wasix';
2
+ export const DATABASE_ROOT_DESCRIPTOR = '.oliphaunt.json';
3
+ export const DATABASE_ROOT_SCHEMA = 'oliphaunt-database-root-v1';
4
+ export const DATABASE_ROOT_PGDATA = 'pgdata';
5
+ export const DATABASE_ROOT_POSTGRES_MAJOR = CARRIER_POSTGRES_MAJOR;
6
+ export const WASIX_PHYSICAL_FORMAT = CARRIER_PHYSICAL_FORMAT;
7
+ export const NATIVE_PHYSICAL_FORMAT = 'native-pg18-v1';
8
+ export function wasixDatabaseRootDescriptor() {
9
+ return {
10
+ schema: DATABASE_ROOT_SCHEMA,
11
+ engineFamily: 'wasix',
12
+ pgdata: DATABASE_ROOT_PGDATA,
13
+ postgresMajor: DATABASE_ROOT_POSTGRES_MAJOR,
14
+ physicalFormat: WASIX_PHYSICAL_FORMAT,
15
+ };
16
+ }
17
+ export function parseDatabaseRootDescriptor(value) {
18
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
19
+ return undefined;
20
+ const descriptor = value;
21
+ const keys = Object.keys(descriptor).sort();
22
+ if (keys.length !== 5 ||
23
+ keys[0] !== 'engineFamily' ||
24
+ keys[1] !== 'pgdata' ||
25
+ keys[2] !== 'physicalFormat' ||
26
+ keys[3] !== 'postgresMajor' ||
27
+ keys[4] !== 'schema') {
28
+ return undefined;
29
+ }
30
+ if (descriptor.schema !== DATABASE_ROOT_SCHEMA ||
31
+ (descriptor.engineFamily !== 'native' && descriptor.engineFamily !== 'wasix') ||
32
+ descriptor.pgdata !== DATABASE_ROOT_PGDATA ||
33
+ descriptor.postgresMajor !== DATABASE_ROOT_POSTGRES_MAJOR ||
34
+ (descriptor.engineFamily === 'native'
35
+ ? descriptor.physicalFormat !== NATIVE_PHYSICAL_FORMAT
36
+ : descriptor.physicalFormat !== WASIX_PHYSICAL_FORMAT)) {
37
+ return undefined;
38
+ }
39
+ return descriptor;
40
+ }
41
+ /** Parse the root descriptor while rejecting duplicate JSON keys. */
42
+ export function parseDatabaseRootDescriptorText(text) {
43
+ return parseDatabaseRootDescriptor(parseJsonWithUniqueObjectKeys(text));
44
+ }
45
+ /** Parse JSON while retaining the duplicate-key rejection lost by JSON.parse(). */
46
+ export function parseJsonWithUniqueObjectKeys(text) {
47
+ try {
48
+ const value = JSON.parse(text);
49
+ const end = scanJsonValue(text, skipWhitespace(text, 0));
50
+ return end !== undefined && skipWhitespace(text, end) === text.length ? value : undefined;
51
+ }
52
+ catch {
53
+ return undefined;
54
+ }
55
+ }
56
+ function readJsonString(text, offset) {
57
+ if (text[offset] !== '"')
58
+ return undefined;
59
+ for (let index = offset + 1; index < text.length; index += 1) {
60
+ const character = text[index];
61
+ if (character === '\\') {
62
+ index += 1;
63
+ continue;
64
+ }
65
+ if (character === '"') {
66
+ const value = JSON.parse(text.slice(offset, index + 1));
67
+ return typeof value === 'string' ? { value, next: index + 1 } : undefined;
68
+ }
69
+ }
70
+ return undefined;
71
+ }
72
+ function scanJsonValue(text, offset) {
73
+ if (text[offset] === '"')
74
+ return readJsonString(text, offset)?.next;
75
+ if (text[offset] === '{')
76
+ return scanJsonObject(text, offset);
77
+ if (text[offset] === '[')
78
+ return scanJsonArray(text, offset);
79
+ let end = offset;
80
+ while (end < text.length &&
81
+ text[end] !== ',' &&
82
+ text[end] !== '}' &&
83
+ text[end] !== ']' &&
84
+ !isJsonWhitespace(text[end])) {
85
+ end += 1;
86
+ }
87
+ return end > offset ? end : undefined;
88
+ }
89
+ function scanJsonObject(text, offset) {
90
+ let next = skipWhitespace(text, offset + 1);
91
+ if (text[next] === '}')
92
+ return next + 1;
93
+ const keys = new Set();
94
+ while (next < text.length) {
95
+ const key = readJsonString(text, next);
96
+ if (key === undefined || keys.has(key.value))
97
+ return undefined;
98
+ keys.add(key.value);
99
+ next = skipWhitespace(text, key.next);
100
+ if (text[next] !== ':')
101
+ return undefined;
102
+ const valueEnd = scanJsonValue(text, skipWhitespace(text, next + 1));
103
+ if (valueEnd === undefined)
104
+ return undefined;
105
+ next = skipWhitespace(text, valueEnd);
106
+ if (text[next] === '}')
107
+ return next + 1;
108
+ if (text[next] !== ',')
109
+ return undefined;
110
+ next = skipWhitespace(text, next + 1);
111
+ }
112
+ return undefined;
113
+ }
114
+ function scanJsonArray(text, offset) {
115
+ let next = skipWhitespace(text, offset + 1);
116
+ if (text[next] === ']')
117
+ return next + 1;
118
+ while (next < text.length) {
119
+ const valueEnd = scanJsonValue(text, next);
120
+ if (valueEnd === undefined)
121
+ return undefined;
122
+ next = skipWhitespace(text, valueEnd);
123
+ if (text[next] === ']')
124
+ return next + 1;
125
+ if (text[next] !== ',')
126
+ return undefined;
127
+ next = skipWhitespace(text, next + 1);
128
+ }
129
+ return undefined;
130
+ }
131
+ function skipWhitespace(text, offset) {
132
+ while (offset < text.length && isJsonWhitespace(text[offset])) {
133
+ offset += 1;
134
+ }
135
+ return offset;
136
+ }
137
+ function isJsonWhitespace(character) {
138
+ return character === ' ' || character === '\t' || character === '\n' || character === '\r';
139
+ }
@@ -0,0 +1,135 @@
1
+ import { type CommandResult, type DescribeResult, type ExecResult, type InferQueryRow, type ParameterOptions, type QueryParam, type QueryOptions, type QueryResult, type RawQueryResult } from './query.js';
2
+ import type { WasixStorageSyncBoundary } from './storage-provider.js';
3
+ import type { WasixProtocolConnection } from './pgwire-connection.js';
4
+ import type { WasixPgDumpProcessOptions, WasixToolProcessOptions, WasixToolProcessResult } from './tool-runtime.js';
5
+ import type { BinaryInput, OliphauntDatabase, OliphauntTransaction, ProtocolChunkCallback } from './types.js';
6
+ /** @internal Buffered protocol fallbacks use the same observable callback granularity. */
7
+ export declare const WASIX_PROTOCOL_CALLBACK_CHUNK_BYTES: number;
8
+ type QueryReadOptions = Omit<QueryOptions, 'encoders'>;
9
+ /** @internal Publish a promise before starting reentrant ownership teardown. */
10
+ export declare function createWasixDeferred<T>(): Readonly<{
11
+ promise: Promise<T>;
12
+ resolve(value: T | PromiseLike<T>): void;
13
+ reject(error: unknown): void;
14
+ }>;
15
+ export type WasixDatabaseIdentity = Readonly<{
16
+ username: string;
17
+ database: string;
18
+ }>;
19
+ export type WasixDatabaseResource = Readonly<{
20
+ close(): void | Promise<void>;
21
+ }>;
22
+ /** @internal Observable ownership loss for execution sessions with a fallible transport. */
23
+ export type WasixDatabaseSessionTerminalState = Readonly<{
24
+ /** True only after the execution owner has terminated unexpectedly. */
25
+ readonly terminal: boolean;
26
+ /** The first transport failure that made the execution owner terminal. */
27
+ readonly failure: Error | undefined;
28
+ }>;
29
+ /** @internal Validate the explicit PostgreSQL startup identity once at open. */
30
+ export declare function normalizeWasixDatabaseIdentity(username: string, database: string): WasixDatabaseIdentity;
31
+ /** @internal Host-publication policy for one pgwire exchange. */
32
+ export type WasixPersistenceMode = 'sync' | 'defer';
33
+ export type WasixProtocolConnectionMode = 'server' | 'tool';
34
+ /** @internal Whether a stream completed normally or recovered after stopping callback delivery. */
35
+ export type WasixProtocolStreamOutcome = 'complete' | 'callbackAborted';
36
+ /** @internal A database FIFO slot whose guest connection starts explicitly. */
37
+ export type WasixProtocolConnectionReservation = Readonly<{
38
+ start(): Promise<void>;
39
+ cancel(): void;
40
+ }>;
41
+ /** @internal Execution seam shared by caller- and package-owned database handles. */
42
+ export type WasixDatabaseSession = {
43
+ /** The session can safely block away from its public caller while serving a connection. */
44
+ readonly supportsProtocolConnections?: boolean;
45
+ readonly identity?: WasixDatabaseIdentity;
46
+ /** Optional shared state for an execution owner that can die independently of the handle. */
47
+ readonly terminalState?: WasixDatabaseSessionTerminalState;
48
+ exec(input: Uint8Array, persistence?: WasixPersistenceMode): Promise<Uint8Array>;
49
+ execStream?(input: Uint8Array, onChunk: ProtocolChunkCallback, persistence?: WasixPersistenceMode): Promise<WasixProtocolStreamOutcome>;
50
+ sync(boundary: WasixStorageSyncBoundary): Promise<void>;
51
+ /** Internal test seams may omit backup; production sessions always provide it. */
52
+ backup?(): Promise<Uint8Array>;
53
+ runPgDump?(options: WasixPgDumpProcessOptions): Promise<WasixToolProcessResult>;
54
+ /** Internal Node-compatible native path for both packaged frontend tools. */
55
+ runTool?(options: WasixToolProcessOptions): Promise<WasixToolProcessResult>;
56
+ serve?(connection: WasixProtocolConnection, mode: WasixProtocolConnectionMode): Promise<void>;
57
+ /**
58
+ * Begin the session's one terminal teardown attempt.
59
+ *
60
+ * Implementations must stop admitting work immediately, return the same
61
+ * promise to every later caller, and remain terminal even when teardown
62
+ * rejects after owned transport or host resources have been destroyed.
63
+ */
64
+ close(): Promise<void>;
65
+ /** Force-stop an SDK-owned execution lane when orderly shutdown stalls. */
66
+ abort?(): void | Promise<void>;
67
+ };
68
+ type ForgottenDatabaseGeneration = Readonly<Record<never, never>>;
69
+ type FinalizationRegistryLike = Readonly<{
70
+ register(target: object, heldValue: ForgottenDatabaseGeneration, unregisterToken: object): void;
71
+ unregister(unregisterToken: object): boolean;
72
+ }>;
73
+ type FinalizationRegistryFactory = (cleanup: (generation: ForgottenDatabaseGeneration) => void) => FinalizationRegistryLike;
74
+ export type WasixForgottenDatabaseRegistration = Readonly<{
75
+ generation: ForgottenDatabaseGeneration;
76
+ }>;
77
+ /**
78
+ * Tracks only session owners, never their public database handles.
79
+ *
80
+ * The finalizer's held value is an opaque generation token. The session lives
81
+ * in a separately keyed table, so an already queued finalizer can atomically
82
+ * prove that it still owns the exact registration before scheduling cleanup.
83
+ *
84
+ * @internal
85
+ */
86
+ export declare class WasixForgottenDatabaseRegistry {
87
+ #private;
88
+ constructor(createRegistry?: FinalizationRegistryFactory, schedule?: (work: () => void) => void);
89
+ register(owner: object, session: WasixDatabaseSession): WasixForgottenDatabaseRegistration;
90
+ unregister(registration: WasixForgottenDatabaseRegistration): void;
91
+ }
92
+ /** @internal Public database state machine; construction stays behind Oliphaunt.open(). */
93
+ export declare class WasixDatabaseImpl implements OliphauntDatabase {
94
+ #private;
95
+ constructor(session: WasixDatabaseSession, forgottenRegistry?: WasixForgottenDatabaseRegistry | undefined);
96
+ get closed(): boolean;
97
+ execute(sql: string, parameters?: ReadonlyArray<QueryParam>, options?: ParameterOptions): Promise<CommandResult>;
98
+ query<Row = never, const Options extends QueryOptions = {}>(sql: string, parameters?: ReadonlyArray<QueryParam>, options?: Options & QueryOptions): Promise<QueryResult<InferQueryRow<Options, Row>>>;
99
+ queryRaw(sql: string, parameters?: ReadonlyArray<QueryParam>, options?: ParameterOptions): Promise<RawQueryResult>;
100
+ exec<Row = never, const Options extends QueryReadOptions = {}>(sql: string, options?: Options & QueryReadOptions): Promise<ExecResult<InferQueryRow<Options, Row>>>;
101
+ describe(sql: string, parameterTypeOids?: ReadonlyArray<number>): Promise<DescribeResult>;
102
+ execProtocolRaw(input: BinaryInput): Promise<Uint8Array>;
103
+ execProtocolRawStream(input: BinaryInput, onChunk: ProtocolChunkCallback): Promise<void>;
104
+ backup(): Promise<Uint8Array>;
105
+ /** @internal Run pg_dump in the database-owning execution realm without another transport. */
106
+ runPgDump(options: WasixToolProcessOptions): Promise<WasixToolProcessResult>;
107
+ /** @internal Run a packaged tool without the legacy Wasmer tool worker. */
108
+ runNativeTool(options: WasixToolProcessOptions): Promise<WasixToolProcessResult>;
109
+ /** @internal Serialized connection ownership used by optional server/tool packages. */
110
+ runProtocolConnection(connection: WasixProtocolConnection, mode: WasixProtocolConnectionMode): Promise<void>;
111
+ /** @internal Reserve call order without entering the guest before a client is ready. */
112
+ reserveProtocolConnection(connection: WasixProtocolConnection, mode: WasixProtocolConnectionMode): WasixProtocolConnectionReservation;
113
+ transaction<T>(body: (transaction: OliphauntTransaction) => Promise<T> | T): Promise<T>;
114
+ close(): Promise<void>;
115
+ /** @internal Register package-owned state that must not outlive this database. */
116
+ registerResource(resource: WasixDatabaseResource): void;
117
+ /** @internal Identity used by private protocol clients such as pg_dump and psql. */
118
+ get identity(): WasixDatabaseIdentity;
119
+ [Symbol.asyncDispose](): Promise<void>;
120
+ }
121
+ /** @internal Optional packages acquire exclusive ownership without expanding the public class. */
122
+ export declare function runWasixProtocolConnection(database: OliphauntDatabase, connection: WasixProtocolConnection, mode: WasixProtocolConnectionMode): Promise<void>;
123
+ /** @internal Execute pg_dump in the realm that owns this database. */
124
+ export declare function runWasixPgDumpProcess(database: OliphauntDatabase, options: WasixToolProcessOptions): Promise<WasixToolProcessResult>;
125
+ /** @internal Return undefined only when this realm uses the browser Wasmer backend. */
126
+ export declare function tryRunWasixNativeToolProcess(database: OliphauntDatabase, options: WasixToolProcessOptions): Promise<WasixToolProcessResult> | undefined;
127
+ /** @internal Reserve a Worker-owned connection in the database FIFO. */
128
+ export declare function reserveWasixProtocolConnection(database: OliphauntDatabase, connection: WasixProtocolConnection, mode: WasixProtocolConnectionMode): WasixProtocolConnectionReservation;
129
+ /** @internal Fail before loading a tool or opening a listener for unsupported placement. */
130
+ export declare function assertWasixProtocolConnectionTarget(database: OliphauntDatabase): asserts database is WasixDatabaseImpl;
131
+ /** @internal Attach an optional-package resource without adding public database methods. */
132
+ export declare function registerWasixDatabaseResource(database: OliphauntDatabase, resource: WasixDatabaseResource): void;
133
+ /** @internal Return the exact startup identity owned by a WASIX database handle. */
134
+ export declare function getWasixDatabaseIdentity(database: OliphauntDatabase): WasixDatabaseIdentity;
135
+ export {};